status
stringclasses
1 value
repo_name
stringclasses
31 values
repo_url
stringclasses
31 values
issue_id
int64
1
104k
title
stringlengths
4
369
body
stringlengths
0
254k
issue_url
stringlengths
37
56
pull_url
stringlengths
37
54
before_fix_sha
stringlengths
40
40
after_fix_sha
stringlengths
40
40
report_datetime
unknown
language
stringclasses
5 values
commit_datetime
unknown
updated_file
stringlengths
4
188
file_content
stringlengths
0
5.12M
closed
dagger/dagger
https://github.com/dagger/dagger
2,114
🐞 universe: python cannot support alternate paths to the python interpreter
### What is the issue? `docker.#Run` has a concrete definition that the command is always `python3` I will add a one-line PR to fix this. ### Log output After changing pkg/universe.dagger.io/python/test/test.cue to add `image: "python3.8": ``` 3:37PM FTL system | failed to load plan: 0: conflicting values "python3.8" and "python3": /d/workspace/github.com/nottheeconomist/dagger/pkg/universe.dagger.io/docker/run.cue:92:11 /d/workspace/github.com/nottheeconomist/dagger/pkg/universe.dagger.io/python/python.cue:45:12 /d/workspace/github.com/nottheeconomist/dagger/pkg/universe.dagger.io/python/test/test.cue:35:20 ``` ### Steps to reproduce Call `docker.#Run` while specifying a `command: name:` as anything but `python3` ### Dagger version dagger 0.2.4 (b32c8732) linux/amd64 ### OS version Ubuntu 20.04.1 LTS (through WSL)
https://github.com/dagger/dagger/issues/2114
https://github.com/dagger/dagger/pull/5898
268c1062a902c8bade88eedde8daee5ed90affdf
b6584895cd339b0ec3684b690dde092f7ba01b17
"2022-04-10T22:50:17Z"
go
"2023-10-16T15:55:38Z"
website/yarn.lock
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. # yarn lockfile v1 "@algolia/autocomplete-core@1.7.1": version "1.7.1" resolved "https://registry.npmjs.org/@algolia/autocomplete-core/-/autocomplete-core-1.7.1.tgz" integrity sha512-eiZw+fxMzNQn01S8dA/hcCpoWCOCwcIIEUtHHdzN5TGB3IpzLbuhqFeTfh2OUhhgkE8Uo17+wH+QJ/wYyQmmzg== dependencies: "@algolia/autocomplete-shared" "1.7.1" "@algolia/autocomplete-preset-algolia@1.7.1": version "1.7.1" resolved "https://registry.npmjs.org/@algolia/autocomplete-preset-algolia/-/autocomplete-preset-algolia-1.7.1.tgz" integrity sha512-pJwmIxeJCymU1M6cGujnaIYcY3QPOVYZOXhFkWVM7IxKzy272BwCvMFMyc5NpG/QmiObBxjo7myd060OeTNJXg== dependencies: "@algolia/autocomplete-shared" "1.7.1" "@algolia/autocomplete-shared@1.7.1": version "1.7.1" resolved "https://registry.npmjs.org/@algolia/autocomplete-shared/-/autocomplete-shared-1.7.1.tgz" integrity sha512-eTmGVqY3GeyBTT8IWiB2K5EuURAqhnumfktAEoHxfDY2o7vg2rSnO16ZtIG0fMgt3py28Vwgq42/bVEuaQV7pg== "@algolia/cache-browser-local-storage@4.11.0": version "4.11.0" resolved "https://registry.npmjs.org/@algolia/cache-browser-local-storage/-/cache-browser-local-storage-4.11.0.tgz" integrity sha512-4sr9vHIG1fVA9dONagdzhsI/6M5mjs/qOe2xUP0yBmwsTsuwiZq3+Xu6D3dsxsuFetcJgC6ydQoCW8b7fDJHYQ== dependencies: "@algolia/cache-common" "4.11.0" "@algolia/cache-browser-local-storage@4.13.1": version "4.13.1" resolved "https://registry.npmjs.org/@algolia/cache-browser-local-storage/-/cache-browser-local-storage-4.13.1.tgz" integrity sha512-UAUVG2PEfwd/FfudsZtYnidJ9eSCpS+LW9cQiesePQLz41NAcddKxBak6eP2GErqyFagSlnVXe/w2E9h2m2ttg== dependencies: "@algolia/cache-common" "4.13.1" "@algolia/cache-common@4.11.0": version "4.11.0" resolved "https://registry.npmjs.org/@algolia/cache-common/-/cache-common-4.11.0.tgz" integrity sha512-lODcJRuPXqf+6mp0h6bOxPMlbNoyn3VfjBVcQh70EDP0/xExZbkpecgHyyZK4kWg+evu+mmgvTK3GVHnet/xKw== "@algolia/cache-common@4.13.1": version "4.13.1" resolved "https://registry.npmjs.org/@algolia/cache-common/-/cache-common-4.13.1.tgz" integrity sha512-7Vaf6IM4L0Jkl3sYXbwK+2beQOgVJ0mKFbz/4qSxKd1iy2Sp77uTAazcX+Dlexekg1fqGUOSO7HS4Sx47ZJmjA== "@algolia/cache-in-memory@4.11.0": version "4.11.0" resolved "https://registry.npmjs.org/@algolia/cache-in-memory/-/cache-in-memory-4.11.0.tgz" integrity sha512-aBz+stMSTBOBaBEQ43zJXz2DnwS7fL6dR0e2myehAgtfAWlWwLDHruc/98VOy1ZAcBk1blE2LCU02bT5HekGxQ== dependencies: "@algolia/cache-common" "4.11.0" "@algolia/cache-in-memory@4.13.1": version "4.13.1" resolved "https://registry.npmjs.org/@algolia/cache-in-memory/-/cache-in-memory-4.13.1.tgz" integrity sha512-pZzybCDGApfA/nutsFK1P0Sbsq6fYJU3DwIvyKg4pURerlJM4qZbB9bfLRef0FkzfQu7W11E4cVLCIOWmyZeuQ== dependencies: "@algolia/cache-common" "4.13.1" "@algolia/client-account@4.11.0": version "4.11.0" resolved "https://registry.npmjs.org/@algolia/client-account/-/client-account-4.11.0.tgz" integrity sha512-jwmFBoUSzoMwMqgD3PmzFJV/d19p1RJXB6C1ADz4ju4mU7rkaQLtqyZroQpheLoU5s5Tilmn/T8/0U2XLoJCRQ== dependencies: "@algolia/client-common" "4.11.0" "@algolia/client-search" "4.11.0" "@algolia/transporter" "4.11.0" "@algolia/client-account@4.13.1": version "4.13.1" resolved "https://registry.npmjs.org/@algolia/client-account/-/client-account-4.13.1.tgz" integrity sha512-TFLiZ1KqMiir3FNHU+h3b0MArmyaHG+eT8Iojio6TdpeFcAQ1Aiy+2gb3SZk3+pgRJa/BxGmDkRUwE5E/lv3QQ== dependencies: "@algolia/client-common" "4.13.1" "@algolia/client-search" "4.13.1" "@algolia/transporter" "4.13.1" "@algolia/client-analytics@4.11.0": version "4.11.0" resolved "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-4.11.0.tgz" integrity sha512-v5U9585aeEdYml7JqggHAj3E5CQ+jPwGVztPVhakBk8H/cmLyPS2g8wvmIbaEZCHmWn4TqFj3EBHVYxAl36fSA== dependencies: "@algolia/client-common" "4.11.0" "@algolia/client-search" "4.11.0" "@algolia/requester-common" "4.11.0" "@algolia/transporter" "4.11.0" "@algolia/client-analytics@4.13.1": version "4.13.1" resolved "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-4.13.1.tgz" integrity sha512-iOS1JBqh7xaL5x00M5zyluZ9+9Uy9GqtYHv/2SMuzNW1qP7/0doz1lbcsP3S7KBbZANJTFHUOfuqyRLPk91iFA== dependencies: "@algolia/client-common" "4.13.1" "@algolia/client-search" "4.13.1" "@algolia/requester-common" "4.13.1" "@algolia/transporter" "4.13.1" "@algolia/client-common@4.11.0": version "4.11.0" resolved "https://registry.npmjs.org/@algolia/client-common/-/client-common-4.11.0.tgz" integrity sha512-Qy+F+TZq12kc7tgfC+FM3RvYH/Ati7sUiUv/LkvlxFwNwNPwWGoZO81AzVSareXT/ksDDrabD4mHbdTbBPTRmQ== dependencies: "@algolia/requester-common" "4.11.0" "@algolia/transporter" "4.11.0" "@algolia/client-common@4.13.1": version "4.13.1" resolved "https://registry.npmjs.org/@algolia/client-common/-/client-common-4.13.1.tgz" integrity sha512-LcDoUE0Zz3YwfXJL6lJ2OMY2soClbjrrAKB6auYVMNJcoKZZ2cbhQoFR24AYoxnGUYBER/8B+9sTBj5bj/Gqbg== dependencies: "@algolia/requester-common" "4.13.1" "@algolia/transporter" "4.13.1" "@algolia/client-personalization@4.11.0": version "4.11.0" resolved "https://registry.npmjs.org/@algolia/client-personalization/-/client-personalization-4.11.0.tgz" integrity sha512-mI+X5IKiijHAzf9fy8VSl/GTT67dzFDnJ0QAM8D9cMPevnfX4U72HRln3Mjd0xEaYUOGve8TK/fMg7d3Z5yG6g== dependencies: "@algolia/client-common" "4.11.0" "@algolia/requester-common" "4.11.0" "@algolia/transporter" "4.11.0" "@algolia/client-personalization@4.13.1": version "4.13.1" resolved "https://registry.npmjs.org/@algolia/client-personalization/-/client-personalization-4.13.1.tgz" integrity sha512-1CqrOW1ypVrB4Lssh02hP//YxluoIYXAQCpg03L+/RiXJlCs+uIqlzC0ctpQPmxSlTK6h07kr50JQoYH/TIM9w== dependencies: "@algolia/client-common" "4.13.1" "@algolia/requester-common" "4.13.1" "@algolia/transporter" "4.13.1" "@algolia/client-search@4.11.0": version "4.11.0" resolved "https://registry.npmjs.org/@algolia/client-search/-/client-search-4.11.0.tgz" integrity sha512-iovPLc5YgiXBdw2qMhU65sINgo9umWbHFzInxoNErWnYoTQWfXsW6P54/NlKx5uscoLVjSf+5RUWwFu5BX+lpw== dependencies: "@algolia/client-common" "4.11.0" "@algolia/requester-common" "4.11.0" "@algolia/transporter" "4.11.0" "@algolia/client-search@4.13.1": version "4.13.1" resolved "https://registry.npmjs.org/@algolia/client-search/-/client-search-4.13.1.tgz" integrity sha512-YQKYA83MNRz3FgTNM+4eRYbSmHi0WWpo019s5SeYcL3HUan/i5R09VO9dk3evELDFJYciiydSjbsmhBzbpPP2A== dependencies: "@algolia/client-common" "4.13.1" "@algolia/requester-common" "4.13.1" "@algolia/transporter" "4.13.1" "@algolia/events@^4.0.1": version "4.0.1" resolved "https://registry.npmjs.org/@algolia/events/-/events-4.0.1.tgz" integrity sha512-FQzvOCgoFXAbf5Y6mYozw2aj5KCJoA3m4heImceldzPSMbdyS4atVjJzXKMsfX3wnZTFYwkkt8/z8UesLHlSBQ== "@algolia/logger-common@4.11.0": version "4.11.0" resolved "https://registry.npmjs.org/@algolia/logger-common/-/logger-common-4.11.0.tgz" integrity sha512-pRMJFeOY8hoWKIxWuGHIrqnEKN/kqKh7UilDffG/+PeEGxBuku+Wq5CfdTFG0C9ewUvn8mAJn5BhYA5k8y0Jqg== "@algolia/logger-common@4.13.1": version "4.13.1" resolved "https://registry.npmjs.org/@algolia/logger-common/-/logger-common-4.13.1.tgz" integrity sha512-L6slbL/OyZaAXNtS/1A8SAbOJeEXD5JcZeDCPYDqSTYScfHu+2ePRTDMgUTY4gQ7HsYZ39N1LujOd8WBTmM2Aw== "@algolia/logger-console@4.11.0": version "4.11.0" resolved "https://registry.npmjs.org/@algolia/logger-console/-/logger-console-4.11.0.tgz" integrity sha512-wXztMk0a3VbNmYP8Kpc+F7ekuvaqZmozM2eTLok0XIshpAeZ/NJDHDffXK2Pw+NF0wmHqurptLYwKoikjBYvhQ== dependencies: "@algolia/logger-common" "4.11.0" "@algolia/logger-console@4.13.1": version "4.13.1" resolved "https://registry.npmjs.org/@algolia/logger-console/-/logger-console-4.13.1.tgz" integrity sha512-7jQOTftfeeLlnb3YqF8bNgA2GZht7rdKkJ31OCeSH2/61haO0tWPoNRjZq9XLlgMQZH276pPo0NdiArcYPHjCA== dependencies: "@algolia/logger-common" "4.13.1" "@algolia/requester-browser-xhr@4.11.0": version "4.11.0" resolved "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-4.11.0.tgz" integrity sha512-Fp3SfDihAAFR8bllg8P5ouWi3+qpEVN5e7hrtVIYldKBOuI/qFv80Zv/3/AMKNJQRYglS4zWyPuqrXm58nz6KA== dependencies: "@algolia/requester-common" "4.11.0" "@algolia/requester-browser-xhr@4.13.1": version "4.13.1" resolved "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-4.13.1.tgz" integrity sha512-oa0CKr1iH6Nc7CmU6RE7TnXMjHnlyp7S80pP/LvZVABeJHX3p/BcSCKovNYWWltgTxUg0U1o+2uuy8BpMKljwA== dependencies: "@algolia/requester-common" "4.13.1" "@algolia/requester-common@4.11.0": version "4.11.0" resolved "https://registry.npmjs.org/@algolia/requester-common/-/requester-common-4.11.0.tgz" integrity sha512-+cZGe/9fuYgGuxjaBC+xTGBkK7OIYdfapxhfvEf03dviLMPmhmVYFJtJlzAjQ2YmGDJpHrGgAYj3i/fbs8yhiA== "@algolia/requester-common@4.13.1": version "4.13.1" resolved "https://registry.npmjs.org/@algolia/requester-common/-/requester-common-4.13.1.tgz" integrity sha512-eGVf0ID84apfFEuXsaoSgIxbU3oFsIbz4XiotU3VS8qGCJAaLVUC5BUJEkiFENZIhon7hIB4d0RI13HY4RSA+w== "@algolia/requester-node-http@4.11.0": version "4.11.0" resolved "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-4.11.0.tgz" integrity sha512-qJIk9SHRFkKDi6dMT9hba8X1J1z92T5AZIgl+tsApjTGIRQXJLTIm+0q4yOefokfu4CoxYwRZ9QAq+ouGwfeOg== dependencies: "@algolia/requester-common" "4.11.0" "@algolia/requester-node-http@4.13.1": version "4.13.1" resolved "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-4.13.1.tgz" integrity sha512-7C0skwtLdCz5heKTVe/vjvrqgL/eJxmiEjHqXdtypcE5GCQCYI15cb+wC4ytYioZDMiuDGeVYmCYImPoEgUGPw== dependencies: "@algolia/requester-common" "4.13.1" "@algolia/transporter@4.11.0": version "4.11.0" resolved "https://registry.npmjs.org/@algolia/transporter/-/transporter-4.11.0.tgz" integrity sha512-k4dyxiaEfYpw4UqybK9q7lrFzehygo6KV3OCYJMMdX0IMWV0m4DXdU27c1zYRYtthaFYaBzGF4Kjcl8p8vxCKw== dependencies: "@algolia/cache-common" "4.11.0" "@algolia/logger-common" "4.11.0" "@algolia/requester-common" "4.11.0" "@algolia/transporter@4.13.1": version "4.13.1" resolved "https://registry.npmjs.org/@algolia/transporter/-/transporter-4.13.1.tgz" integrity sha512-pICnNQN7TtrcYJqqPEXByV8rJ8ZRU2hCiIKLTLRyNpghtQG3VAFk6fVtdzlNfdUGZcehSKGarPIZEHlQXnKjgw== dependencies: "@algolia/cache-common" "4.13.1" "@algolia/logger-common" "4.13.1" "@algolia/requester-common" "4.13.1" "@ampproject/remapping@^2.2.0": version "2.2.1" resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.1.tgz#99e8e11851128b8702cd57c33684f1d0f260b630" integrity sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg== dependencies: "@jridgewell/gen-mapping" "^0.3.0" "@jridgewell/trace-mapping" "^0.3.9" "@anvilco/apollo-server-plugin-introspection-metadata@^2.0.1": version "2.0.1" resolved "https://registry.yarnpkg.com/@anvilco/apollo-server-plugin-introspection-metadata/-/apollo-server-plugin-introspection-metadata-2.0.1.tgz#07b9fd1d36e1f7d0c23b0082445e371c0b624659" integrity sha512-IL5ssMS3qBNwcVAs1/VERU6BHdGuTbi0id5Qb/pQ9N9/BNveWIXnWVyTzlpB0hAqh7ju2AhDrgqjsus+eAOy5w== dependencies: lodash.get "^4.4.2" lodash.set "^4.3.2" "@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.16.0", "@babel/code-frame@^7.8.3": version "7.16.0" resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.16.0.tgz" integrity sha512-IF4EOMEV+bfYwOmNxGzSnjR2EmQod7f1UXOpZM3l4i4o4QNwzjtJAu/HxdjHq0aYBvdqMuQEY1eg0nqW9ZPORA== dependencies: "@babel/highlight" "^7.16.0" "@babel/code-frame@^7.18.6": version "7.18.6" resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz" integrity sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q== dependencies: "@babel/highlight" "^7.18.6" "@babel/code-frame@^7.21.4": version "7.21.4" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.21.4.tgz#d0fa9e4413aca81f2b23b9442797bda1826edb39" integrity sha512-LYvhNKfwWSPpocw8GI7gpK2nq3HSDuEPC/uSYaALSJu9xjsalaaYFOq0Pwt5KmVqwEbZlDu81aLXwBOmD/Fv9g== dependencies: "@babel/highlight" "^7.18.6" "@babel/compat-data@^7.13.11", "@babel/compat-data@^7.19.3": version "7.19.4" resolved "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.19.4.tgz" integrity sha512-CHIGpJcUQ5lU9KrPHTjBMhVwQG6CQjxfg36fGXl3qk/Gik1WwWachaXFuo0uCWJT/mStOKtcbFJCaVLihC1CMw== "@babel/compat-data@^7.17.7", "@babel/compat-data@^7.20.0": version "7.20.0" resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.20.0.tgz#9b61938c5f688212c7b9ae363a819df7d29d4093" integrity sha512-Gt9jszFJYq7qzXVK4slhc6NzJXnOVmRECWcVjF/T23rNXD9NtWQ0W3qxdg+p9wWIB+VQw3GYV/U2Ha9bRTfs4w== "@babel/compat-data@^7.22.0", "@babel/compat-data@^7.22.3": version "7.22.3" resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.22.3.tgz#cd502a6a0b6e37d7ad72ce7e71a7160a3ae36f7e" integrity sha512-aNtko9OPOwVESUFp3MZfD8Uzxl7JzSeJpd7npIoxCasU37PFbAQRpKglkaKwlHOyeJdrREpo8TW8ldrkYWwvIQ== "@babel/core@7.12.9": version "7.12.9" resolved "https://registry.npmjs.org/@babel/core/-/core-7.12.9.tgz" integrity sha512-gTXYh3M5wb7FRXQy+FErKFAv90BnlOuNn1QkCK2lREoPAjrQCO49+HVSrFoe5uakFAF5eenS75KbO2vQiLrTMQ== dependencies: "@babel/code-frame" "^7.10.4" "@babel/generator" "^7.12.5" "@babel/helper-module-transforms" "^7.12.1" "@babel/helpers" "^7.12.5" "@babel/parser" "^7.12.7" "@babel/template" "^7.12.7" "@babel/traverse" "^7.12.9" "@babel/types" "^7.12.7" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.1" json5 "^2.1.2" lodash "^4.17.19" resolve "^1.3.2" semver "^5.4.1" source-map "^0.5.0" "@babel/core@^7.18.6", "@babel/core@^7.19.6", "@babel/core@^7.21.3": version "7.22.1" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.22.1.tgz#5de51c5206f4c6f5533562838337a603c1033cfd" integrity sha512-Hkqu7J4ynysSXxmAahpN1jjRwVJ+NdpraFLIWflgjpVob3KNyK3/tIUc7Q7szed8WMp0JNa7Qtd1E9Oo22F9gA== dependencies: "@ampproject/remapping" "^2.2.0" "@babel/code-frame" "^7.21.4" "@babel/generator" "^7.22.0" "@babel/helper-compilation-targets" "^7.22.1" "@babel/helper-module-transforms" "^7.22.1" "@babel/helpers" "^7.22.0" "@babel/parser" "^7.22.0" "@babel/template" "^7.21.9" "@babel/traverse" "^7.22.1" "@babel/types" "^7.22.0" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.2" json5 "^2.2.2" semver "^6.3.0" "@babel/generator@^7.12.5", "@babel/generator@^7.18.7", "@babel/generator@^7.20.0": version "7.20.0" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.20.0.tgz#0bfc5379e0efb05ca6092091261fcdf7ec36249d" integrity sha512-GUPcXxWibClgmYJuIwC2Bc2Lg+8b9VjaJ+HlNdACEVt+Wlr1eoU1OPZjZRm7Hzl0gaTsUZNQfeihvZJhG7oc3w== dependencies: "@babel/types" "^7.20.0" "@jridgewell/gen-mapping" "^0.3.2" jsesc "^2.5.1" "@babel/generator@^7.22.0", "@babel/generator@^7.22.3": version "7.22.3" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.22.3.tgz#0ff675d2edb93d7596c5f6728b52615cfc0df01e" integrity sha512-C17MW4wlk//ES/CJDL51kPNwl+qiBQyN7b9SKyVp11BLGFeSPoVaHrv+MNt8jwQFhQWowW88z1eeBx3pFz9v8A== dependencies: "@babel/types" "^7.22.3" "@jridgewell/gen-mapping" "^0.3.2" "@jridgewell/trace-mapping" "^0.3.17" jsesc "^2.5.1" "@babel/helper-annotate-as-pure@^7.16.0": version "7.16.0" resolved "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.16.0.tgz" integrity sha512-ItmYF9vR4zA8cByDocY05o0LGUkp1zhbTQOH1NFyl5xXEqlTJQCEJjieriw+aFpxo16swMxUnUiKS7a/r4vtHg== dependencies: "@babel/types" "^7.16.0" "@babel/helper-annotate-as-pure@^7.18.6": version "7.18.6" resolved "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.18.6.tgz" integrity sha512-duORpUiYrEpzKIop6iNbjnwKLAKnJ47csTyRACyEmWj0QdUrm5aqNJGHSSEQSUAvNW0ojX0dOmK9dZduvkfeXA== dependencies: "@babel/types" "^7.18.6" "@babel/helper-builder-binary-assignment-operator-visitor@^7.18.6": version "7.18.6" resolved "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.18.6.tgz" integrity sha512-KT10c1oWEpmrIRYnthbzHgoOf6B+Xd6a5yhdbNtdhtG7aO1or5HViuf1TQR36xY/QprXA5nvxO6nAjhJ4y38jw== dependencies: "@babel/helper-explode-assignable-expression" "^7.18.6" "@babel/types" "^7.18.6" "@babel/helper-compilation-targets@^7.13.0", "@babel/helper-compilation-targets@^7.18.9": version "7.19.3" resolved "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.19.3.tgz" integrity sha512-65ESqLGyGmLvgR0mst5AdW1FkNlj9rQsCKduzEoEPhBCDFGXvz2jW6bXFG6i0/MrV2s7hhXjjb2yAzcPuQlLwg== dependencies: "@babel/compat-data" "^7.19.3" "@babel/helper-validator-option" "^7.18.6" browserslist "^4.21.3" semver "^6.3.0" "@babel/helper-compilation-targets@^7.17.7": version "7.20.0" resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.0.tgz#6bf5374d424e1b3922822f1d9bdaa43b1a139d0a" integrity sha512-0jp//vDGp9e8hZzBc6N/KwA5ZK3Wsm/pfm4CrY7vzegkVxc65SgSn6wYOnwHe9Js9HRQ1YTCKLGPzDtaS3RoLQ== dependencies: "@babel/compat-data" "^7.20.0" "@babel/helper-validator-option" "^7.18.6" browserslist "^4.21.3" semver "^6.3.0" "@babel/helper-compilation-targets@^7.20.7", "@babel/helper-compilation-targets@^7.22.1": version "7.22.1" resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.1.tgz#bfcd6b7321ffebe33290d68550e2c9d7eb7c7a58" integrity sha512-Rqx13UM3yVB5q0D/KwQ8+SPfX/+Rnsy1Lw1k/UwOC4KC6qrzIQoY3lYnBu5EHKBlEHHcj0M0W8ltPSkD8rqfsQ== dependencies: "@babel/compat-data" "^7.22.0" "@babel/helper-validator-option" "^7.21.0" browserslist "^4.21.3" lru-cache "^5.1.1" semver "^6.3.0" "@babel/helper-create-class-features-plugin@^7.21.0", "@babel/helper-create-class-features-plugin@^7.22.1": version "7.22.1" resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.22.1.tgz#ae3de70586cc757082ae3eba57240d42f468c41b" integrity sha512-SowrZ9BWzYFgzUMwUmowbPSGu6CXL5MSuuCkG3bejahSpSymioPmuLdhPxNOc9MjuNGjy7M/HaXvJ8G82Lywlw== dependencies: "@babel/helper-annotate-as-pure" "^7.18.6" "@babel/helper-environment-visitor" "^7.22.1" "@babel/helper-function-name" "^7.21.0" "@babel/helper-member-expression-to-functions" "^7.22.0" "@babel/helper-optimise-call-expression" "^7.18.6" "@babel/helper-replace-supers" "^7.22.1" "@babel/helper-skip-transparent-expression-wrappers" "^7.20.0" "@babel/helper-split-export-declaration" "^7.18.6" semver "^6.3.0" "@babel/helper-create-regexp-features-plugin@^7.16.0": version "7.16.0" resolved "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.16.0.tgz" integrity sha512-3DyG0zAFAZKcOp7aVr33ddwkxJ0Z0Jr5V99y3I690eYLpukJsJvAbzTy1ewoCqsML8SbIrjH14Jc/nSQ4TvNPA== dependencies: "@babel/helper-annotate-as-pure" "^7.16.0" regexpu-core "^4.7.1" "@babel/helper-create-regexp-features-plugin@^7.18.6": version "7.18.6" resolved "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.18.6.tgz" integrity sha512-7LcpH1wnQLGrI+4v+nPp+zUvIkF9x0ddv1Hkdue10tg3gmRnLy97DXh4STiOf1qeIInyD69Qv5kKSZzKD8B/7A== dependencies: "@babel/helper-annotate-as-pure" "^7.18.6" regexpu-core "^5.1.0" "@babel/helper-create-regexp-features-plugin@^7.22.1": version "7.22.1" resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.22.1.tgz#a7ed9a8488b45b467fca353cd1a44dc5f0cf5c70" integrity sha512-WWjdnfR3LPIe+0EY8td7WmjhytxXtjKAEpnAxun/hkNiyOaPlvGK+NZaBFIdi9ndYV3Gav7BpFvtUwnaJlwi1w== dependencies: "@babel/helper-annotate-as-pure" "^7.18.6" regexpu-core "^5.3.1" semver "^6.3.0" "@babel/helper-define-polyfill-provider@^0.3.1": version "0.3.1" resolved "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.1.tgz" integrity sha512-J9hGMpJQmtWmj46B3kBHmL38UhJGhYX7eqkcq+2gsstyYt341HmPeWspihX43yVRA0mS+8GGk2Gckc7bY/HCmA== dependencies: "@babel/helper-compilation-targets" "^7.13.0" "@babel/helper-module-imports" "^7.12.13" "@babel/helper-plugin-utils" "^7.13.0" "@babel/traverse" "^7.13.0" debug "^4.1.1" lodash.debounce "^4.0.8" resolve "^1.14.2" semver "^6.1.2" "@babel/helper-define-polyfill-provider@^0.4.0": version "0.4.0" resolved "https://registry.yarnpkg.com/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.4.0.tgz#487053f103110f25b9755c5980e031e93ced24d8" integrity sha512-RnanLx5ETe6aybRi1cO/edaRH+bNYWaryCEmjDDYyNr4wnSzyOp8T0dWipmqVHKEY3AbVKUom50AKSlj1zmKbg== dependencies: "@babel/helper-compilation-targets" "^7.17.7" "@babel/helper-plugin-utils" "^7.16.7" debug "^4.1.1" lodash.debounce "^4.0.8" resolve "^1.14.2" semver "^6.1.2" "@babel/helper-environment-visitor@^7.18.6", "@babel/helper-environment-visitor@^7.18.9": version "7.18.9" resolved "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz" integrity sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg== "@babel/helper-environment-visitor@^7.22.1": version "7.22.1" resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.1.tgz#ac3a56dbada59ed969d712cf527bd8271fe3eba8" integrity sha512-Z2tgopurB/kTbidvzeBrc2To3PUP/9i5MUe+fU6QJCQDyPwSH2oRapkLw3KGECDYSjhQZCNxEvNvZlLw8JjGwA== "@babel/helper-explode-assignable-expression@^7.18.6": version "7.18.6" resolved "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.18.6.tgz" integrity sha512-eyAYAsQmB80jNfg4baAtLeWAQHfHFiR483rzFK+BhETlGZaQC9bsfrugfXDCbRHLQbIA7U5NxhhOxN7p/dWIcg== dependencies: "@babel/types" "^7.18.6" "@babel/helper-function-name@^7.18.9", "@babel/helper-function-name@^7.19.0": version "7.19.0" resolved "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.19.0.tgz" integrity sha512-WAwHBINyrpqywkUH0nTnNgI5ina5TFn85HKS0pbPDfxFfhyR/aNQEn4hGi1P1JyT//I0t4OgXUlofzWILRvS5w== dependencies: "@babel/template" "^7.18.10" "@babel/types" "^7.19.0" "@babel/helper-function-name@^7.21.0": version "7.21.0" resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.21.0.tgz#d552829b10ea9f120969304023cd0645fa00b1b4" integrity sha512-HfK1aMRanKHpxemaY2gqBmL04iAPOPRj7DxtNbiDOrJK+gdwkiNRVpCpUJYbUT+aZyemKN8brqTOxzCaG6ExRg== dependencies: "@babel/template" "^7.20.7" "@babel/types" "^7.21.0" "@babel/helper-hoist-variables@^7.18.6": version "7.18.6" resolved "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz" integrity sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q== dependencies: "@babel/types" "^7.18.6" "@babel/helper-member-expression-to-functions@^7.18.6": version "7.18.6" resolved "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.18.6.tgz" integrity sha512-CeHxqwwipekotzPDUuJOfIMtcIHBuc7WAzLmTYWctVigqS5RktNMQ5bEwQSuGewzYnCtTWa3BARXeiLxDTv+Ng== dependencies: "@babel/types" "^7.18.6" "@babel/helper-member-expression-to-functions@^7.22.0": version "7.22.3" resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.22.3.tgz#4b77a12c1b4b8e9e28736ed47d8b91f00976911f" integrity sha512-Gl7sK04b/2WOb6OPVeNy9eFKeD3L6++CzL3ykPOWqTn08xgYYK0wz4TUh2feIImDXxcVW3/9WQ1NMKY66/jfZA== dependencies: "@babel/types" "^7.22.3" "@babel/helper-module-imports@^7.12.13": version "7.16.0" resolved "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.16.0.tgz" integrity sha512-kkH7sWzKPq0xt3H1n+ghb4xEMP8k0U7XV3kkB+ZGy69kDk2ySFW1qPi06sjKzFY3t1j6XbJSqr4mF9L7CYVyhg== dependencies: "@babel/types" "^7.16.0" "@babel/helper-module-imports@^7.18.6": version "7.18.6" resolved "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz" integrity sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA== dependencies: "@babel/types" "^7.18.6" "@babel/helper-module-imports@^7.21.4": version "7.21.4" resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.21.4.tgz#ac88b2f76093637489e718a90cec6cf8a9b029af" integrity sha512-orajc5T2PsRYUN3ZryCEFeMDYwyw09c/pZeaQEZPH0MpKzSvn3e0uXsDBu3k03VI+9DBiRo+l22BfKTpKwa/Wg== dependencies: "@babel/types" "^7.21.4" "@babel/helper-module-transforms@^7.12.1", "@babel/helper-module-transforms@^7.18.6": version "7.19.0" resolved "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.19.0.tgz" integrity sha512-3HBZ377Fe14RbLIA+ac3sY4PTgpxHVkFrESaWhoI5PuyXPBBX8+C34qblV9G89ZtycGJCmCI/Ut+VUDK4bltNQ== dependencies: "@babel/helper-environment-visitor" "^7.18.9" "@babel/helper-module-imports" "^7.18.6" "@babel/helper-simple-access" "^7.18.6" "@babel/helper-split-export-declaration" "^7.18.6" "@babel/helper-validator-identifier" "^7.18.6" "@babel/template" "^7.18.10" "@babel/traverse" "^7.19.0" "@babel/types" "^7.19.0" "@babel/helper-module-transforms@^7.20.11", "@babel/helper-module-transforms@^7.21.5", "@babel/helper-module-transforms@^7.22.1": version "7.22.1" resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.22.1.tgz#e0cad47fedcf3cae83c11021696376e2d5a50c63" integrity sha512-dxAe9E7ySDGbQdCVOY/4+UcD8M9ZFqZcZhSPsPacvCG4M+9lwtDDQfI2EoaSvmf7W/8yCBkGU0m7Pvt1ru3UZw== dependencies: "@babel/helper-environment-visitor" "^7.22.1" "@babel/helper-module-imports" "^7.21.4" "@babel/helper-simple-access" "^7.21.5" "@babel/helper-split-export-declaration" "^7.18.6" "@babel/helper-validator-identifier" "^7.19.1" "@babel/template" "^7.21.9" "@babel/traverse" "^7.22.1" "@babel/types" "^7.22.0" "@babel/helper-optimise-call-expression@^7.18.6": version "7.18.6" resolved "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.18.6.tgz" integrity sha512-HP59oD9/fEHQkdcbgFCnbmgH5vIQTJbxh2yf+CdM89/glUNnuzr87Q8GIjGEnOktTROemO0Pe0iPAYbqZuOUiA== dependencies: "@babel/types" "^7.18.6" "@babel/helper-plugin-utils@7.10.4": version "7.10.4" resolved "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.4.tgz" integrity sha512-O4KCvQA6lLiMU9l2eawBPMf1xPP8xPfB3iEQw150hOVTqj/rfXz0ThTb4HEzqQfs2Bmo5Ay8BzxfzVtBrr9dVg== "@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.13.0", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": version "7.14.5" resolved "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz" integrity sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ== "@babel/helper-plugin-utils@^7.16.7", "@babel/helper-plugin-utils@^7.19.0": version "7.19.0" resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.19.0.tgz#4796bb14961521f0f8715990bee2fb6e51ce21bf" integrity sha512-40Ryx7I8mT+0gaNxm8JGTZFUITNqdLAgdg0hXzeVZxVD6nFsdhQvip6v8dqkRHzsz1VFpFAaOCHNn0vKBL7Czw== "@babel/helper-plugin-utils@^7.18.6": version "7.18.6" resolved "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.18.6.tgz" integrity sha512-gvZnm1YAAxh13eJdkb9EWHBnF3eAub3XTLCZEehHT2kWxiKVRL64+ae5Y6Ivne0mVHmMYKT+xWgZO+gQhuLUBg== "@babel/helper-plugin-utils@^7.18.9": version "7.18.9" resolved "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.18.9.tgz" integrity sha512-aBXPT3bmtLryXaoJLyYPXPlSD4p1ld9aYeR+sJNOZjJJGiOpb+fKfh3NkcCu7J54nUJwCERPBExCCpyCOHnu/w== "@babel/helper-plugin-utils@^7.20.2", "@babel/helper-plugin-utils@^7.21.5": version "7.21.5" resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.21.5.tgz#345f2377d05a720a4e5ecfa39cbf4474a4daed56" integrity sha512-0WDaIlXKOX/3KfBK/dwP1oQGiPh6rjMkT7HIRv7i5RR2VUMwrx5ZL0dwBkKx7+SW1zwNdgjHd34IMk5ZjTeHVg== "@babel/helper-remap-async-to-generator@^7.18.9": version "7.18.9" resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.18.9.tgz#997458a0e3357080e54e1d79ec347f8a8cd28519" integrity sha512-dI7q50YKd8BAv3VEfgg7PS7yD3Rtbi2J1XMXaalXO0W0164hYLnh8zpjRS0mte9MfVp/tltvr/cfdXPvJr1opA== dependencies: "@babel/helper-annotate-as-pure" "^7.18.6" "@babel/helper-environment-visitor" "^7.18.9" "@babel/helper-wrap-function" "^7.18.9" "@babel/types" "^7.18.9" "@babel/helper-replace-supers@^7.18.6": version "7.18.6" resolved "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.18.6.tgz" integrity sha512-fTf7zoXnUGl9gF25fXCWE26t7Tvtyn6H4hkLSYhATwJvw2uYxd3aoXplMSe0g9XbwK7bmxNes7+FGO0rB/xC0g== dependencies: "@babel/helper-environment-visitor" "^7.18.6" "@babel/helper-member-expression-to-functions" "^7.18.6" "@babel/helper-optimise-call-expression" "^7.18.6" "@babel/traverse" "^7.18.6" "@babel/types" "^7.18.6" "@babel/helper-replace-supers@^7.20.7", "@babel/helper-replace-supers@^7.22.1": version "7.22.1" resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.22.1.tgz#38cf6e56f7dc614af63a21b45565dd623f0fdc95" integrity sha512-ut4qrkE4AuSfrwHSps51ekR1ZY/ygrP1tp0WFm8oVq6nzc/hvfV/22JylndIbsf2U2M9LOMwiSddr6y+78j+OQ== dependencies: "@babel/helper-environment-visitor" "^7.22.1" "@babel/helper-member-expression-to-functions" "^7.22.0" "@babel/helper-optimise-call-expression" "^7.18.6" "@babel/template" "^7.21.9" "@babel/traverse" "^7.22.1" "@babel/types" "^7.22.0" "@babel/helper-simple-access@^7.18.6": version "7.18.6" resolved "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.18.6.tgz" integrity sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g== dependencies: "@babel/types" "^7.18.6" "@babel/helper-simple-access@^7.21.5": version "7.21.5" resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.21.5.tgz#d697a7971a5c39eac32c7e63c0921c06c8a249ee" integrity sha512-ENPDAMC1wAjR0uaCUwliBdiSl1KBJAVnMTzXqi64c2MG8MPR6ii4qf7bSXDqSFbr4W6W028/rf5ivoHop5/mkg== dependencies: "@babel/types" "^7.21.5" "@babel/helper-skip-transparent-expression-wrappers@^7.20.0": version "7.20.0" resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.20.0.tgz#fbe4c52f60518cab8140d77101f0e63a8a230684" integrity sha512-5y1JYeNKfvnT8sZcK9DVRtpTbGiomYIHviSP3OQWmDPU3DeH4a1ZlT/N2lyQ5P8egjcRaT/Y9aNqUxK0WsnIIg== dependencies: "@babel/types" "^7.20.0" "@babel/helper-split-export-declaration@^7.18.6": version "7.18.6" resolved "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz" integrity sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA== dependencies: "@babel/types" "^7.18.6" "@babel/helper-string-parser@^7.19.4": version "7.19.4" resolved "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz" integrity sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw== "@babel/helper-string-parser@^7.21.5": version "7.21.5" resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.21.5.tgz#2b3eea65443c6bdc31c22d037c65f6d323b6b2bd" integrity sha512-5pTUx3hAJaZIdW99sJ6ZUUgWq/Y+Hja7TowEnLNMm1VivRgZQL3vpBY3qUACVsvw+yQU6+YgfBVmcbLaZtrA1w== "@babel/helper-validator-identifier@^7.15.7", "@babel/helper-validator-identifier@^7.18.6", "@babel/helper-validator-identifier@^7.19.1": version "7.19.1" resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz" integrity sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w== "@babel/helper-validator-option@^7.18.6": version "7.18.6" resolved "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz" integrity sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw== "@babel/helper-validator-option@^7.21.0": version "7.21.0" resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.21.0.tgz#8224c7e13ace4bafdc4004da2cf064ef42673180" integrity sha512-rmL/B8/f0mKS2baE9ZpyTcTavvEuWhTTW8amjzXNvYG4AwBsqTLikfXsEofsJEfKHf+HQVQbFOHy6o+4cnC/fQ== "@babel/helper-wrap-function@^7.18.9": version "7.19.0" resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.19.0.tgz#89f18335cff1152373222f76a4b37799636ae8b1" integrity sha512-txX8aN8CZyYGTwcLhlk87KRqncAzhh5TpQamZUa0/u3an36NtDpUP6bQgBCBcLeBs09R/OwQu3OjK0k/HwfNDg== dependencies: "@babel/helper-function-name" "^7.19.0" "@babel/template" "^7.18.10" "@babel/traverse" "^7.19.0" "@babel/types" "^7.19.0" "@babel/helpers@^7.12.5": version "7.19.4" resolved "https://registry.npmjs.org/@babel/helpers/-/helpers-7.19.4.tgz" integrity sha512-G+z3aOx2nfDHwX/kyVii5fJq+bgscg89/dJNWpYeKeBv3v9xX8EIabmx1k6u9LS04H7nROFVRVK+e3k0VHp+sw== dependencies: "@babel/template" "^7.18.10" "@babel/traverse" "^7.19.4" "@babel/types" "^7.19.4" "@babel/helpers@^7.22.0": version "7.22.3" resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.22.3.tgz#53b74351da9684ea2f694bf0877998da26dd830e" integrity sha512-jBJ7jWblbgr7r6wYZHMdIqKc73ycaTcCaWRq4/2LpuPHcx7xMlZvpGQkOYc9HeSjn6rcx15CPlgVcBtZ4WZJ2w== dependencies: "@babel/template" "^7.21.9" "@babel/traverse" "^7.22.1" "@babel/types" "^7.22.3" "@babel/highlight@^7.16.0": version "7.16.0" resolved "https://registry.npmjs.org/@babel/highlight/-/highlight-7.16.0.tgz" integrity sha512-t8MH41kUQylBtu2+4IQA3atqevA2lRgqA2wyVB/YiWmsDSuylZZuXOUy9ric30hfzauEFfdsuk/eXTRrGrfd0g== dependencies: "@babel/helper-validator-identifier" "^7.15.7" chalk "^2.0.0" js-tokens "^4.0.0" "@babel/highlight@^7.18.6": version "7.18.6" resolved "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz" integrity sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g== dependencies: "@babel/helper-validator-identifier" "^7.18.6" chalk "^2.0.0" js-tokens "^4.0.0" "@babel/parser@^7.12.7", "@babel/parser@^7.18.10", "@babel/parser@^7.18.8": version "7.19.4" resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.19.4.tgz" integrity sha512-qpVT7gtuOLjWeDTKLkJ6sryqLliBaFpAtGeqw5cs5giLldvh+Ch0plqnUMKoVAUS6ZEueQQiZV+p5pxtPitEsA== "@babel/parser@^7.20.0": version "7.20.0" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.20.0.tgz#b26133c888da4d79b0d3edcf42677bcadc783046" integrity sha512-G9VgAhEaICnz8iiJeGJQyVl6J2nTjbW0xeisva0PK6XcKsga7BIaqm4ZF8Rg1Wbaqmy6znspNqhPaPkyukujzg== "@babel/parser@^7.21.9", "@babel/parser@^7.22.0", "@babel/parser@^7.22.4": version "7.22.4" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.22.4.tgz#a770e98fd785c231af9d93f6459d36770993fb32" integrity sha512-VLLsx06XkEYqBtE5YGPwfSGwfrjnyPP5oiGty3S8pQLFDFLaS8VwWSIxkTXpcvr5zeYLE6+MBNl2npl/YnfofA== "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.18.6": version "7.18.6" resolved "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.18.6.tgz" integrity sha512-Dgxsyg54Fx1d4Nge8UnvTrED63vrwOdPmyvPzlNN/boaliRP54pm3pGzZD1SJUwrBA+Cs/xdG8kXX6Mn/RfISQ== dependencies: "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.22.3": version "7.22.3" resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.22.3.tgz#a75be1365c0c3188c51399a662168c1c98108659" integrity sha512-6r4yRwEnorYByILoDRnEqxtojYKuiIv9FojW2E8GUKo9eWBwbKcd9IiZOZpdyXc64RmyGGyPu3/uAcrz/dq2kQ== dependencies: "@babel/helper-plugin-utils" "^7.21.5" "@babel/helper-skip-transparent-expression-wrappers" "^7.20.0" "@babel/plugin-transform-optional-chaining" "^7.22.3" "@babel/plugin-proposal-object-rest-spread@7.12.1": version "7.12.1" resolved "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.12.1.tgz" integrity sha512-s6SowJIjzlhx8o7lsFx5zmY4At6CTtDvgNQDdPzkBQucle58A6b/TTeEBYtyDgmcXjUTM+vE8YOGHZzzbc/ioA== dependencies: "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-syntax-object-rest-spread" "^7.8.0" "@babel/plugin-transform-parameters" "^7.12.1" "@babel/plugin-proposal-private-property-in-object@^7.21.0": version "7.21.0" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0.tgz#19496bd9883dd83c23c7d7fc45dcd9ad02dfa1dc" integrity sha512-ha4zfehbJjc5MmXBlHec1igel5TJXXLDDRbuJ4+XT2TJcyD9/V1919BA8gMvsdHcNMBy4WBUBiRb3nw/EQUtBw== dependencies: "@babel/helper-annotate-as-pure" "^7.18.6" "@babel/helper-create-class-features-plugin" "^7.21.0" "@babel/helper-plugin-utils" "^7.20.2" "@babel/plugin-syntax-private-property-in-object" "^7.14.5" "@babel/plugin-proposal-unicode-property-regex@^7.4.4": version "7.16.0" resolved "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.16.0.tgz" integrity sha512-ti7IdM54NXv29cA4+bNNKEMS4jLMCbJgl+Drv+FgYy0erJLAxNAIXcNjNjrRZEcWq0xJHsNVwQezskMFpF8N9g== dependencies: "@babel/helper-create-regexp-features-plugin" "^7.16.0" "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" resolved "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz" integrity sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw== dependencies: "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-class-properties@^7.12.13": version "7.12.13" resolved "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz" integrity sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA== dependencies: "@babel/helper-plugin-utils" "^7.12.13" "@babel/plugin-syntax-class-static-block@^7.14.5": version "7.14.5" resolved "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz" integrity sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw== dependencies: "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-syntax-dynamic-import@^7.8.3": version "7.8.3" resolved "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz" integrity sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ== dependencies: "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-export-namespace-from@^7.8.3": version "7.8.3" resolved "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz" integrity sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q== dependencies: "@babel/helper-plugin-utils" "^7.8.3" "@babel/plugin-syntax-import-assertions@^7.20.0": version "7.20.0" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.20.0.tgz#bb50e0d4bea0957235390641209394e87bdb9cc4" integrity sha512-IUh1vakzNoWalR8ch/areW7qFopR2AEw03JlG7BbrDqmQ4X3q9uuipQwSGrUn7oGiemKjtSLDhNtQHzMHr1JdQ== dependencies: "@babel/helper-plugin-utils" "^7.19.0" "@babel/plugin-syntax-import-attributes@^7.22.3": version "7.22.3" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.22.3.tgz#d7168f22b9b49a6cc1792cec78e06a18ad2e7b4b" integrity sha512-i35jZJv6aO7hxEbIWQ41adVfOzjm9dcYDNeWlBMd8p0ZQRtNUCBrmGwZt+H5lb+oOC9a3svp956KP0oWGA1YsA== dependencies: "@babel/helper-plugin-utils" "^7.21.5" "@babel/plugin-syntax-import-meta@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz#ee601348c370fa334d2207be158777496521fd51" integrity sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g== dependencies: "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-syntax-json-strings@^7.8.3": version "7.8.3" resolved "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz" integrity sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA== dependencies: "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-jsx@7.12.1": version "7.12.1" resolved "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.12.1.tgz" integrity sha512-1yRi7yAtB0ETgxdY9ti/p2TivUxJkTdhu/ZbF9MshVGqOx1TdB3b7xCXs49Fupgg50N45KcAsRP/ZqWjs9SRjg== dependencies: "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-syntax-jsx@^7.18.6": version "7.18.6" resolved "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.18.6.tgz" integrity sha512-6mmljtAedFGTWu2p/8WIORGwy+61PLgOMPOdazc7YoJ9ZCWUyFy3A6CpPkRKLKD1ToAesxX8KGEViAiLo9N+7Q== dependencies: "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-syntax-jsx@^7.21.4": version "7.21.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.21.4.tgz#f264ed7bf40ffc9ec239edabc17a50c4f5b6fea2" integrity sha512-5hewiLct5OKyh6PLKEYaFclcqtIgCb6bmELouxjF6up5q3Sov7rOayW4RwhbaBL0dit8rA80GNfY+UuDp2mBbQ== dependencies: "@babel/helper-plugin-utils" "^7.20.2" "@babel/plugin-syntax-logical-assignment-operators@^7.10.4": version "7.10.4" resolved "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz" integrity sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig== dependencies: "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-syntax-nullish-coalescing-operator@^7.8.3": version "7.8.3" resolved "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz" integrity sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ== dependencies: "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-numeric-separator@^7.10.4": version "7.10.4" resolved "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz" integrity sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug== dependencies: "@babel/helper-plugin-utils" "^7.10.4" "@babel/plugin-syntax-object-rest-spread@7.8.3", "@babel/plugin-syntax-object-rest-spread@^7.8.0", "@babel/plugin-syntax-object-rest-spread@^7.8.3": version "7.8.3" resolved "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz" integrity sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA== dependencies: "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-optional-catch-binding@^7.8.3": version "7.8.3" resolved "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz" integrity sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q== dependencies: "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-optional-chaining@^7.8.3": version "7.8.3" resolved "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz" integrity sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg== dependencies: "@babel/helper-plugin-utils" "^7.8.0" "@babel/plugin-syntax-private-property-in-object@^7.14.5": version "7.14.5" resolved "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz" integrity sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg== dependencies: "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-syntax-top-level-await@^7.14.5": version "7.14.5" resolved "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz" integrity sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw== dependencies: "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-syntax-typescript@^7.21.4": version "7.21.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.21.4.tgz#2751948e9b7c6d771a8efa59340c15d4a2891ff8" integrity sha512-xz0D39NvhQn4t4RNsHmDnnsaQizIlUkdtYvLs8La1BlfjQ6JEwxkJGeqJMW2tAXx+q6H+WFuUTXNdYVpEya0YA== dependencies: "@babel/helper-plugin-utils" "^7.20.2" "@babel/plugin-syntax-unicode-sets-regex@^7.18.6": version "7.18.6" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-unicode-sets-regex/-/plugin-syntax-unicode-sets-regex-7.18.6.tgz#d49a3b3e6b52e5be6740022317580234a6a47357" integrity sha512-727YkEAPwSIQTv5im8QHz3upqp92JTWhidIC81Tdx4VJYIte/VndKf1qKrfnnhPLiPghStWfvC/iFaMCQu7Nqg== dependencies: "@babel/helper-create-regexp-features-plugin" "^7.18.6" "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-transform-arrow-functions@^7.21.5": version "7.21.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.21.5.tgz#9bb42a53de447936a57ba256fbf537fc312b6929" integrity sha512-wb1mhwGOCaXHDTcsRYMKF9e5bbMgqwxtqa2Y1ifH96dXJPwbuLX9qHy3clhrxVqgMz7nyNXs8VkxdH8UBcjKqA== dependencies: "@babel/helper-plugin-utils" "^7.21.5" "@babel/plugin-transform-async-generator-functions@^7.22.3": version "7.22.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.22.3.tgz#3ed99924c354fb9e80dabb2cc8d002c702e94527" integrity sha512-36A4Aq48t66btydbZd5Fk0/xJqbpg/v4QWI4AH4cYHBXy9Mu42UOupZpebKFiCFNT9S9rJFcsld0gsv0ayLjtA== dependencies: "@babel/helper-environment-visitor" "^7.22.1" "@babel/helper-plugin-utils" "^7.21.5" "@babel/helper-remap-async-to-generator" "^7.18.9" "@babel/plugin-syntax-async-generators" "^7.8.4" "@babel/plugin-transform-async-to-generator@^7.20.7": version "7.20.7" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.20.7.tgz#dfee18623c8cb31deb796aa3ca84dda9cea94354" integrity sha512-Uo5gwHPT9vgnSXQxqGtpdufUiWp96gk7yiP4Mp5bm1QMkEmLXBO7PAGYbKoJ6DhAwiNkcHFBol/x5zZZkL/t0Q== dependencies: "@babel/helper-module-imports" "^7.18.6" "@babel/helper-plugin-utils" "^7.20.2" "@babel/helper-remap-async-to-generator" "^7.18.9" "@babel/plugin-transform-block-scoped-functions@^7.18.6": version "7.18.6" resolved "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.18.6.tgz" integrity sha512-ExUcOqpPWnliRcPqves5HJcJOvHvIIWfuS4sroBUenPuMdmW+SMHDakmtS7qOo13sVppmUijqeTv7qqGsvURpQ== dependencies: "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-transform-block-scoping@^7.21.0": version "7.21.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.21.0.tgz#e737b91037e5186ee16b76e7ae093358a5634f02" integrity sha512-Mdrbunoh9SxwFZapeHVrwFmri16+oYotcZysSzhNIVDwIAb1UV+kvnxULSYq9J3/q5MDG+4X6w8QVgD1zhBXNQ== dependencies: "@babel/helper-plugin-utils" "^7.20.2" "@babel/plugin-transform-class-properties@^7.22.3": version "7.22.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.22.3.tgz#3407145e513830df77f0cef828b8b231c166fe4c" integrity sha512-mASLsd6rhOrLZ5F3WbCxkzl67mmOnqik0zrg5W6D/X0QMW7HtvnoL1dRARLKIbMP3vXwkwziuLesPqWVGIl6Bw== dependencies: "@babel/helper-create-class-features-plugin" "^7.22.1" "@babel/helper-plugin-utils" "^7.21.5" "@babel/plugin-transform-class-static-block@^7.22.3": version "7.22.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.22.3.tgz#e352cf33567385c731a8f21192efeba760358773" integrity sha512-5BirgNWNOx7cwbTJCOmKFJ1pZjwk5MUfMIwiBBvsirCJMZeQgs5pk6i1OlkVg+1Vef5LfBahFOrdCnAWvkVKMw== dependencies: "@babel/helper-create-class-features-plugin" "^7.22.1" "@babel/helper-plugin-utils" "^7.21.5" "@babel/plugin-syntax-class-static-block" "^7.14.5" "@babel/plugin-transform-classes@^7.21.0": version "7.21.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.21.0.tgz#f469d0b07a4c5a7dbb21afad9e27e57b47031665" integrity sha512-RZhbYTCEUAe6ntPehC4hlslPWosNHDox+vAs4On/mCLRLfoDVHf6hVEd7kuxr1RnHwJmxFfUM3cZiZRmPxJPXQ== dependencies: "@babel/helper-annotate-as-pure" "^7.18.6" "@babel/helper-compilation-targets" "^7.20.7" "@babel/helper-environment-visitor" "^7.18.9" "@babel/helper-function-name" "^7.21.0" "@babel/helper-optimise-call-expression" "^7.18.6" "@babel/helper-plugin-utils" "^7.20.2" "@babel/helper-replace-supers" "^7.20.7" "@babel/helper-split-export-declaration" "^7.18.6" globals "^11.1.0" "@babel/plugin-transform-computed-properties@^7.21.5": version "7.21.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.21.5.tgz#3a2d8bb771cd2ef1cd736435f6552fe502e11b44" integrity sha512-TR653Ki3pAwxBxUe8srfF3e4Pe3FTA46uaNHYyQwIoM4oWKSoOZiDNyHJ0oIoDIUPSRQbQG7jzgVBX3FPVne1Q== dependencies: "@babel/helper-plugin-utils" "^7.21.5" "@babel/template" "^7.20.7" "@babel/plugin-transform-destructuring@^7.21.3": version "7.21.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.21.3.tgz#73b46d0fd11cd6ef57dea8a381b1215f4959d401" integrity sha512-bp6hwMFzuiE4HqYEyoGJ/V2LeIWn+hLVKc4pnj++E5XQptwhtcGmSayM029d/j2X1bPKGTlsyPwAubuU22KhMA== dependencies: "@babel/helper-plugin-utils" "^7.20.2" "@babel/plugin-transform-dotall-regex@^7.18.6": version "7.18.6" resolved "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.18.6.tgz" integrity sha512-6S3jpun1eEbAxq7TdjLotAsl4WpQI9DxfkycRcKrjhQYzU87qpXdknpBg/e+TdcMehqGnLFi7tnFUBR02Vq6wg== dependencies: "@babel/helper-create-regexp-features-plugin" "^7.18.6" "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-transform-dotall-regex@^7.4.4": version "7.16.0" resolved "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.16.0.tgz" integrity sha512-FXlDZfQeLILfJlC6I1qyEwcHK5UpRCFkaoVyA1nk9A1L1Yu583YO4un2KsLBsu3IJb4CUbctZks8tD9xPQubLw== dependencies: "@babel/helper-create-regexp-features-plugin" "^7.16.0" "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-transform-duplicate-keys@^7.18.9": version "7.18.9" resolved "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.18.9.tgz" integrity sha512-d2bmXCtZXYc59/0SanQKbiWINadaJXqtvIQIzd4+hNwkWBgyCd5F/2t1kXoUdvPMrxzPvhK6EMQRROxsue+mfw== dependencies: "@babel/helper-plugin-utils" "^7.18.9" "@babel/plugin-transform-dynamic-import@^7.22.1": version "7.22.1" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.22.1.tgz#6c56afaf896a07026330cf39714532abed8d9ed1" integrity sha512-rlhWtONnVBPdmt+jeewS0qSnMz/3yLFrqAP8hHC6EDcrYRSyuz9f9yQhHvVn2Ad6+yO9fHXac5piudeYrInxwQ== dependencies: "@babel/helper-plugin-utils" "^7.21.5" "@babel/plugin-syntax-dynamic-import" "^7.8.3" "@babel/plugin-transform-exponentiation-operator@^7.18.6": version "7.18.6" resolved "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.18.6.tgz" integrity sha512-wzEtc0+2c88FVR34aQmiz56dxEkxr2g8DQb/KfaFa1JYXOFVsbhvAonFN6PwVWj++fKmku8NP80plJ5Et4wqHw== dependencies: "@babel/helper-builder-binary-assignment-operator-visitor" "^7.18.6" "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-transform-export-namespace-from@^7.22.3": version "7.22.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.22.3.tgz#9b8700aa495007d3bebac8358d1c562434b680b9" integrity sha512-5Ti1cHLTDnt3vX61P9KZ5IG09bFXp4cDVFJIAeCZuxu9OXXJJZp5iP0n/rzM2+iAutJY+KWEyyHcRaHlpQ/P5g== dependencies: "@babel/helper-plugin-utils" "^7.21.5" "@babel/plugin-syntax-export-namespace-from" "^7.8.3" "@babel/plugin-transform-for-of@^7.21.5": version "7.21.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.21.5.tgz#e890032b535f5a2e237a18535f56a9fdaa7b83fc" integrity sha512-nYWpjKW/7j/I/mZkGVgHJXh4bA1sfdFnJoOXwJuj4m3Q2EraO/8ZyrkCau9P5tbHQk01RMSt6KYLCsW7730SXQ== dependencies: "@babel/helper-plugin-utils" "^7.21.5" "@babel/plugin-transform-function-name@^7.18.9": version "7.18.9" resolved "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.18.9.tgz" integrity sha512-WvIBoRPaJQ5yVHzcnJFor7oS5Ls0PYixlTYE63lCj2RtdQEl15M68FXQlxnG6wdraJIXRdR7KI+hQ7q/9QjrCQ== dependencies: "@babel/helper-compilation-targets" "^7.18.9" "@babel/helper-function-name" "^7.18.9" "@babel/helper-plugin-utils" "^7.18.9" "@babel/plugin-transform-json-strings@^7.22.3": version "7.22.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.22.3.tgz#a181b8679cf7c93e9d0e3baa5b1776d65be601a9" integrity sha512-IuvOMdeOOY2X4hRNAT6kwbePtK21BUyrAEgLKviL8pL6AEEVUVcqtRdN/HJXBLGIbt9T3ETmXRnFedRRmQNTYw== dependencies: "@babel/helper-plugin-utils" "^7.21.5" "@babel/plugin-syntax-json-strings" "^7.8.3" "@babel/plugin-transform-literals@^7.18.9": version "7.18.9" resolved "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.18.9.tgz" integrity sha512-IFQDSRoTPnrAIrI5zoZv73IFeZu2dhu6irxQjY9rNjTT53VmKg9fenjvoiOWOkJ6mm4jKVPtdMzBY98Fp4Z4cg== dependencies: "@babel/helper-plugin-utils" "^7.18.9" "@babel/plugin-transform-logical-assignment-operators@^7.22.3": version "7.22.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.22.3.tgz#9e021455810f33b0baccb82fb759b194f5dc36f0" integrity sha512-CbayIfOw4av2v/HYZEsH+Klks3NC2/MFIR3QR8gnpGNNPEaq2fdlVCRYG/paKs7/5hvBLQ+H70pGWOHtlNEWNA== dependencies: "@babel/helper-plugin-utils" "^7.21.5" "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" "@babel/plugin-transform-member-expression-literals@^7.18.6": version "7.18.6" resolved "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.18.6.tgz" integrity sha512-qSF1ihLGO3q+/g48k85tUjD033C29TNTVB2paCwZPVmOsjn9pClvYYrM2VeJpBY2bcNkuny0YUyTNRyRxJ54KA== dependencies: "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-transform-modules-amd@^7.20.11": version "7.20.11" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.20.11.tgz#3daccca8e4cc309f03c3a0c4b41dc4b26f55214a" integrity sha512-NuzCt5IIYOW0O30UvqktzHYR2ud5bOWbY0yaxWZ6G+aFzOMJvrs5YHNikrbdaT15+KNO31nPOy5Fim3ku6Zb5g== dependencies: "@babel/helper-module-transforms" "^7.20.11" "@babel/helper-plugin-utils" "^7.20.2" "@babel/plugin-transform-modules-commonjs@^7.21.5": version "7.21.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.21.5.tgz#d69fb947eed51af91de82e4708f676864e5e47bc" integrity sha512-OVryBEgKUbtqMoB7eG2rs6UFexJi6Zj6FDXx+esBLPTCxCNxAY9o+8Di7IsUGJ+AVhp5ncK0fxWUBd0/1gPhrQ== dependencies: "@babel/helper-module-transforms" "^7.21.5" "@babel/helper-plugin-utils" "^7.21.5" "@babel/helper-simple-access" "^7.21.5" "@babel/plugin-transform-modules-systemjs@^7.22.3": version "7.22.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.22.3.tgz#cc507e03e88d87b016feaeb5dae941e6ef50d91e" integrity sha512-V21W3bKLxO3ZjcBJZ8biSvo5gQ85uIXW2vJfh7JSWf/4SLUSr1tOoHX3ruN4+Oqa2m+BKfsxTR1I+PsvkIWvNw== dependencies: "@babel/helper-hoist-variables" "^7.18.6" "@babel/helper-module-transforms" "^7.22.1" "@babel/helper-plugin-utils" "^7.21.5" "@babel/helper-validator-identifier" "^7.19.1" "@babel/plugin-transform-modules-umd@^7.18.6": version "7.18.6" resolved "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.18.6.tgz" integrity sha512-dcegErExVeXcRqNtkRU/z8WlBLnvD4MRnHgNs3MytRO1Mn1sHRyhbcpYbVMGclAqOjdW+9cfkdZno9dFdfKLfQ== dependencies: "@babel/helper-module-transforms" "^7.18.6" "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-transform-named-capturing-groups-regex@^7.22.3": version "7.22.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.22.3.tgz#db6fb77e6b3b53ec3b8d370246f0b7cf67d35ab4" integrity sha512-c6HrD/LpUdNNJsISQZpds3TXvfYIAbo+efE9aWmY/PmSRD0agrJ9cPMt4BmArwUQ7ZymEWTFjTyp+yReLJZh0Q== dependencies: "@babel/helper-create-regexp-features-plugin" "^7.22.1" "@babel/helper-plugin-utils" "^7.21.5" "@babel/plugin-transform-new-target@^7.22.3": version "7.22.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.22.3.tgz#deb0377d741cbee2f45305868b9026dcd6dd96e2" integrity sha512-5RuJdSo89wKdkRTqtM9RVVJzHum9c2s0te9rB7vZC1zKKxcioWIy+xcu4OoIAjyFZhb/bp5KkunuLin1q7Ct+w== dependencies: "@babel/helper-plugin-utils" "^7.21.5" "@babel/plugin-transform-nullish-coalescing-operator@^7.22.3": version "7.22.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.22.3.tgz#8c519f8bf5af94a9ca6f65cf422a9d3396e542b9" integrity sha512-CpaoNp16nX7ROtLONNuCyenYdY/l7ZsR6aoVa7rW7nMWisoNoQNIH5Iay/4LDyRjKMuElMqXiBoOQCDLTMGZiw== dependencies: "@babel/helper-plugin-utils" "^7.21.5" "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" "@babel/plugin-transform-numeric-separator@^7.22.3": version "7.22.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.22.3.tgz#02493070ca6685884b0eee705363ee4da2132ab0" integrity sha512-+AF88fPDJrnseMh5vD9+SH6wq4ZMvpiTMHh58uLs+giMEyASFVhcT3NkoyO+NebFCNnpHJEq5AXO2txV4AGPDQ== dependencies: "@babel/helper-plugin-utils" "^7.21.5" "@babel/plugin-syntax-numeric-separator" "^7.10.4" "@babel/plugin-transform-object-rest-spread@^7.22.3": version "7.22.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.22.3.tgz#da6fba693effb8c203d8c3bdf7bf4e2567e802e9" integrity sha512-38bzTsqMMCI46/TQnJwPPpy33EjLCc1Gsm2hRTF6zTMWnKsN61vdrpuzIEGQyKEhDSYDKyZHrrd5FMj4gcUHhw== dependencies: "@babel/compat-data" "^7.22.3" "@babel/helper-compilation-targets" "^7.22.1" "@babel/helper-plugin-utils" "^7.21.5" "@babel/plugin-syntax-object-rest-spread" "^7.8.3" "@babel/plugin-transform-parameters" "^7.22.3" "@babel/plugin-transform-object-super@^7.18.6": version "7.18.6" resolved "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.18.6.tgz" integrity sha512-uvGz6zk+pZoS1aTZrOvrbj6Pp/kK2mp45t2B+bTDre2UgsZZ8EZLSJtUg7m/no0zOJUWgFONpB7Zv9W2tSaFlA== dependencies: "@babel/helper-plugin-utils" "^7.18.6" "@babel/helper-replace-supers" "^7.18.6" "@babel/plugin-transform-optional-catch-binding@^7.22.3": version "7.22.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.22.3.tgz#e971a083fc7d209d9cd18253853af1db6d8dc42f" integrity sha512-bnDFWXFzWY0BsOyqaoSXvMQ2F35zutQipugog/rqotL2S4ciFOKlRYUu9djt4iq09oh2/34hqfRR2k1dIvuu4g== dependencies: "@babel/helper-plugin-utils" "^7.21.5" "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" "@babel/plugin-transform-optional-chaining@^7.22.3": version "7.22.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.22.3.tgz#5fd24a4a7843b76da6aeec23c7f551da5d365290" integrity sha512-63v3/UFFxhPKT8j8u1jTTGVyITxl7/7AfOqK8C5gz1rHURPUGe3y5mvIf68eYKGoBNahtJnTxBKug4BQOnzeJg== dependencies: "@babel/helper-plugin-utils" "^7.21.5" "@babel/helper-skip-transparent-expression-wrappers" "^7.20.0" "@babel/plugin-syntax-optional-chaining" "^7.8.3" "@babel/plugin-transform-parameters@^7.12.1": version "7.16.3" resolved "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.16.3.tgz" integrity sha512-3MaDpJrOXT1MZ/WCmkOFo7EtmVVC8H4EUZVrHvFOsmwkk4lOjQj8rzv8JKUZV4YoQKeoIgk07GO+acPU9IMu/w== dependencies: "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-transform-parameters@^7.22.3": version "7.22.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.22.3.tgz#24477acfd2fd2bc901df906c9bf17fbcfeee900d" integrity sha512-x7QHQJHPuD9VmfpzboyGJ5aHEr9r7DsAsdxdhJiTB3J3j8dyl+NFZ+rX5Q2RWFDCs61c06qBfS4ys2QYn8UkMw== dependencies: "@babel/helper-plugin-utils" "^7.21.5" "@babel/plugin-transform-private-methods@^7.22.3": version "7.22.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.22.3.tgz#adac38020bab5047482d3297107c1f58e9c574f6" integrity sha512-fC7jtjBPFqhqpPAE+O4LKwnLq7gGkD3ZmC2E3i4qWH34mH3gOg2Xrq5YMHUq6DM30xhqM1DNftiRaSqVjEG+ug== dependencies: "@babel/helper-create-class-features-plugin" "^7.22.1" "@babel/helper-plugin-utils" "^7.21.5" "@babel/plugin-transform-private-property-in-object@^7.22.3": version "7.22.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.22.3.tgz#031621b02c7b7d95389de1a3dba2fe9e8c548e56" integrity sha512-C7MMl4qWLpgVCbXfj3UW8rR1xeCnisQ0cU7YJHV//8oNBS0aCIVg1vFnZXxOckHhEpQyqNNkWmvSEWnMLlc+Vw== dependencies: "@babel/helper-annotate-as-pure" "^7.18.6" "@babel/helper-create-class-features-plugin" "^7.22.1" "@babel/helper-plugin-utils" "^7.21.5" "@babel/plugin-syntax-private-property-in-object" "^7.14.5" "@babel/plugin-transform-property-literals@^7.18.6": version "7.18.6" resolved "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.18.6.tgz" integrity sha512-cYcs6qlgafTud3PAzrrRNbQtfpQ8+y/+M5tKmksS9+M1ckbH6kzY8MrexEM9mcA6JDsukE19iIRvAyYl463sMg== dependencies: "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-transform-react-constant-elements@^7.18.12", "@babel/plugin-transform-react-constant-elements@^7.21.3": version "7.22.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-react-constant-elements/-/plugin-transform-react-constant-elements-7.22.3.tgz#b87a436c3377f29b37409f9c02c99c9ce377909d" integrity sha512-b5J6muxQYp4H7loAQv/c7GO5cPuRA6H5hx4gO+/Hn+Cu9MRQU0PNiUoWq1L//8sq6kFSNxGXFb2XTaUfa9y+Pg== dependencies: "@babel/helper-plugin-utils" "^7.21.5" "@babel/plugin-transform-react-display-name@^7.18.6": version "7.18.6" resolved "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.18.6.tgz" integrity sha512-TV4sQ+T013n61uMoygyMRm+xf04Bd5oqFpv2jAEQwSZ8NwQA7zeRPg1LMVg2PWi3zWBz+CLKD+v5bcpZ/BS0aA== dependencies: "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-transform-react-jsx-development@^7.18.6": version "7.18.6" resolved "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-development/-/plugin-transform-react-jsx-development-7.18.6.tgz" integrity sha512-SA6HEjwYFKF7WDjWcMcMGUimmw/nhNRDWxr+KaLSCrkD/LMDBvWRmHAYgE1HDeF8KUuI8OAu+RT6EOtKxSW2qA== dependencies: "@babel/plugin-transform-react-jsx" "^7.18.6" "@babel/plugin-transform-react-jsx@^7.18.6": version "7.18.6" resolved "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.18.6.tgz" integrity sha512-Mz7xMPxoy9kPS/JScj6fJs03TZ/fZ1dJPlMjRAgTaxaS0fUBk8FV/A2rRgfPsVCZqALNwMexD+0Uaf5zlcKPpw== dependencies: "@babel/helper-annotate-as-pure" "^7.18.6" "@babel/helper-module-imports" "^7.18.6" "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-syntax-jsx" "^7.18.6" "@babel/types" "^7.18.6" "@babel/plugin-transform-react-pure-annotations@^7.18.6": version "7.18.6" resolved "https://registry.npmjs.org/@babel/plugin-transform-react-pure-annotations/-/plugin-transform-react-pure-annotations-7.18.6.tgz" integrity sha512-I8VfEPg9r2TRDdvnHgPepTKvuRomzA8+u+nhY7qSI1fR2hRNebasZEETLyM5mAUr0Ku56OkXJ0I7NHJnO6cJiQ== dependencies: "@babel/helper-annotate-as-pure" "^7.18.6" "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-transform-regenerator@^7.21.5": version "7.21.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.21.5.tgz#576c62f9923f94bcb1c855adc53561fd7913724e" integrity sha512-ZoYBKDb6LyMi5yCsByQ5jmXsHAQDDYeexT1Szvlmui+lADvfSecr5Dxd/PkrTC3pAD182Fcju1VQkB4oCp9M+w== dependencies: "@babel/helper-plugin-utils" "^7.21.5" regenerator-transform "^0.15.1" "@babel/plugin-transform-reserved-words@^7.18.6": version "7.18.6" resolved "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.18.6.tgz" integrity sha512-oX/4MyMoypzHjFrT1CdivfKZ+XvIPMFXwwxHp/r0Ddy2Vuomt4HDFGmft1TAY2yiTKiNSsh3kjBAzcM8kSdsjA== dependencies: "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-transform-runtime@^7.18.6": version "7.18.6" resolved "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.18.6.tgz" integrity sha512-8uRHk9ZmRSnWqUgyae249EJZ94b0yAGLBIqzZzl+0iEdbno55Pmlt/32JZsHwXD9k/uZj18Aqqk35wBX4CBTXA== dependencies: "@babel/helper-module-imports" "^7.18.6" "@babel/helper-plugin-utils" "^7.18.6" babel-plugin-polyfill-corejs2 "^0.3.1" babel-plugin-polyfill-corejs3 "^0.5.2" babel-plugin-polyfill-regenerator "^0.3.1" semver "^6.3.0" "@babel/plugin-transform-shorthand-properties@^7.18.6": version "7.18.6" resolved "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.18.6.tgz" integrity sha512-eCLXXJqv8okzg86ywZJbRn19YJHU4XUa55oz2wbHhaQVn/MM+XhukiT7SYqp/7o00dg52Rj51Ny+Ecw4oyoygw== dependencies: "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-transform-spread@^7.20.7": version "7.20.7" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.20.7.tgz#c2d83e0b99d3bf83e07b11995ee24bf7ca09401e" integrity sha512-ewBbHQ+1U/VnH1fxltbJqDeWBU1oNLG8Dj11uIv3xVf7nrQu0bPGe5Rf716r7K5Qz+SqtAOVswoVunoiBtGhxw== dependencies: "@babel/helper-plugin-utils" "^7.20.2" "@babel/helper-skip-transparent-expression-wrappers" "^7.20.0" "@babel/plugin-transform-sticky-regex@^7.18.6": version "7.18.6" resolved "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.18.6.tgz" integrity sha512-kfiDrDQ+PBsQDO85yj1icueWMfGfJFKN1KCkndygtu/C9+XUfydLC8Iv5UYJqRwy4zk8EcplRxEOeLyjq1gm6Q== dependencies: "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-transform-template-literals@^7.18.9": version "7.18.9" resolved "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.18.9.tgz" integrity sha512-S8cOWfT82gTezpYOiVaGHrCbhlHgKhQt8XH5ES46P2XWmX92yisoZywf5km75wv5sYcXDUCLMmMxOLCtthDgMA== dependencies: "@babel/helper-plugin-utils" "^7.18.9" "@babel/plugin-transform-typeof-symbol@^7.18.9": version "7.18.9" resolved "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.18.9.tgz" integrity sha512-SRfwTtF11G2aemAZWivL7PD+C9z52v9EvMqH9BuYbabyPuKUvSWks3oCg6041pT925L4zVFqaVBeECwsmlguEw== dependencies: "@babel/helper-plugin-utils" "^7.18.9" "@babel/plugin-transform-typescript@^7.21.3": version "7.22.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.22.3.tgz#8f662cec8ba88c873f1c7663c0c94e3f68592f09" integrity sha512-pyjnCIniO5PNaEuGxT28h0HbMru3qCVrMqVgVOz/krComdIrY9W6FCLBq9NWHY8HDGaUlan+UhmZElDENIfCcw== dependencies: "@babel/helper-annotate-as-pure" "^7.18.6" "@babel/helper-create-class-features-plugin" "^7.22.1" "@babel/helper-plugin-utils" "^7.21.5" "@babel/plugin-syntax-typescript" "^7.21.4" "@babel/plugin-transform-unicode-escapes@^7.21.5": version "7.21.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.21.5.tgz#1e55ed6195259b0e9061d81f5ef45a9b009fb7f2" integrity sha512-LYm/gTOwZqsYohlvFUe/8Tujz75LqqVC2w+2qPHLR+WyWHGCZPN1KBpJCJn+4Bk4gOkQy/IXKIge6az5MqwlOg== dependencies: "@babel/helper-plugin-utils" "^7.21.5" "@babel/plugin-transform-unicode-property-regex@^7.22.3": version "7.22.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.22.3.tgz#597b6a614dc93eaae605ee293e674d79d32eb380" integrity sha512-5ScJ+OmdX+O6HRuMGW4kv7RL9vIKdtdAj9wuWUKy1wbHY3jaM/UlyIiC1G7J6UJiiyMukjjK0QwL3P0vBd0yYg== dependencies: "@babel/helper-create-regexp-features-plugin" "^7.22.1" "@babel/helper-plugin-utils" "^7.21.5" "@babel/plugin-transform-unicode-regex@^7.18.6": version "7.18.6" resolved "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.18.6.tgz" integrity sha512-gE7A6Lt7YLnNOL3Pb9BNeZvi+d8l7tcRrG4+pwJjK9hD2xX4mEvjlQW60G9EEmfXVYRPv9VRQcyegIVHCql/AA== dependencies: "@babel/helper-create-regexp-features-plugin" "^7.18.6" "@babel/helper-plugin-utils" "^7.18.6" "@babel/plugin-transform-unicode-sets-regex@^7.22.3": version "7.22.3" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.22.3.tgz#7c14ee33fa69782b0101d0f7143d3fc73ce00700" integrity sha512-hNufLdkF8vqywRp+P55j4FHXqAX2LRUccoZHH7AFn1pq5ZOO2ISKW9w13bFZVjBoTqeve2HOgoJCcaziJVhGNw== dependencies: "@babel/helper-create-regexp-features-plugin" "^7.22.1" "@babel/helper-plugin-utils" "^7.21.5" "@babel/preset-env@^7.18.6", "@babel/preset-env@^7.19.4", "@babel/preset-env@^7.20.2": version "7.22.4" resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.22.4.tgz#c86a82630f0e8c61d9bb9327b7b896732028cbed" integrity sha512-c3lHOjbwBv0TkhYCr+XCR6wKcSZ1QbQTVdSkZUaVpLv8CVWotBMArWUi5UAJrcrQaEnleVkkvaV8F/pmc/STZQ== dependencies: "@babel/compat-data" "^7.22.3" "@babel/helper-compilation-targets" "^7.22.1" "@babel/helper-plugin-utils" "^7.21.5" "@babel/helper-validator-option" "^7.21.0" "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression" "^7.18.6" "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining" "^7.22.3" "@babel/plugin-proposal-private-property-in-object" "^7.21.0" "@babel/plugin-syntax-async-generators" "^7.8.4" "@babel/plugin-syntax-class-properties" "^7.12.13" "@babel/plugin-syntax-class-static-block" "^7.14.5" "@babel/plugin-syntax-dynamic-import" "^7.8.3" "@babel/plugin-syntax-export-namespace-from" "^7.8.3" "@babel/plugin-syntax-import-assertions" "^7.20.0" "@babel/plugin-syntax-import-attributes" "^7.22.3" "@babel/plugin-syntax-import-meta" "^7.10.4" "@babel/plugin-syntax-json-strings" "^7.8.3" "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" "@babel/plugin-syntax-numeric-separator" "^7.10.4" "@babel/plugin-syntax-object-rest-spread" "^7.8.3" "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" "@babel/plugin-syntax-optional-chaining" "^7.8.3" "@babel/plugin-syntax-private-property-in-object" "^7.14.5" "@babel/plugin-syntax-top-level-await" "^7.14.5" "@babel/plugin-syntax-unicode-sets-regex" "^7.18.6" "@babel/plugin-transform-arrow-functions" "^7.21.5" "@babel/plugin-transform-async-generator-functions" "^7.22.3" "@babel/plugin-transform-async-to-generator" "^7.20.7" "@babel/plugin-transform-block-scoped-functions" "^7.18.6" "@babel/plugin-transform-block-scoping" "^7.21.0" "@babel/plugin-transform-class-properties" "^7.22.3" "@babel/plugin-transform-class-static-block" "^7.22.3" "@babel/plugin-transform-classes" "^7.21.0" "@babel/plugin-transform-computed-properties" "^7.21.5" "@babel/plugin-transform-destructuring" "^7.21.3" "@babel/plugin-transform-dotall-regex" "^7.18.6" "@babel/plugin-transform-duplicate-keys" "^7.18.9" "@babel/plugin-transform-dynamic-import" "^7.22.1" "@babel/plugin-transform-exponentiation-operator" "^7.18.6" "@babel/plugin-transform-export-namespace-from" "^7.22.3" "@babel/plugin-transform-for-of" "^7.21.5" "@babel/plugin-transform-function-name" "^7.18.9" "@babel/plugin-transform-json-strings" "^7.22.3" "@babel/plugin-transform-literals" "^7.18.9" "@babel/plugin-transform-logical-assignment-operators" "^7.22.3" "@babel/plugin-transform-member-expression-literals" "^7.18.6" "@babel/plugin-transform-modules-amd" "^7.20.11" "@babel/plugin-transform-modules-commonjs" "^7.21.5" "@babel/plugin-transform-modules-systemjs" "^7.22.3" "@babel/plugin-transform-modules-umd" "^7.18.6" "@babel/plugin-transform-named-capturing-groups-regex" "^7.22.3" "@babel/plugin-transform-new-target" "^7.22.3" "@babel/plugin-transform-nullish-coalescing-operator" "^7.22.3" "@babel/plugin-transform-numeric-separator" "^7.22.3" "@babel/plugin-transform-object-rest-spread" "^7.22.3" "@babel/plugin-transform-object-super" "^7.18.6" "@babel/plugin-transform-optional-catch-binding" "^7.22.3" "@babel/plugin-transform-optional-chaining" "^7.22.3" "@babel/plugin-transform-parameters" "^7.22.3" "@babel/plugin-transform-private-methods" "^7.22.3" "@babel/plugin-transform-private-property-in-object" "^7.22.3" "@babel/plugin-transform-property-literals" "^7.18.6" "@babel/plugin-transform-regenerator" "^7.21.5" "@babel/plugin-transform-reserved-words" "^7.18.6" "@babel/plugin-transform-shorthand-properties" "^7.18.6" "@babel/plugin-transform-spread" "^7.20.7" "@babel/plugin-transform-sticky-regex" "^7.18.6" "@babel/plugin-transform-template-literals" "^7.18.9" "@babel/plugin-transform-typeof-symbol" "^7.18.9" "@babel/plugin-transform-unicode-escapes" "^7.21.5" "@babel/plugin-transform-unicode-property-regex" "^7.22.3" "@babel/plugin-transform-unicode-regex" "^7.18.6" "@babel/plugin-transform-unicode-sets-regex" "^7.22.3" "@babel/preset-modules" "^0.1.5" "@babel/types" "^7.22.4" babel-plugin-polyfill-corejs2 "^0.4.3" babel-plugin-polyfill-corejs3 "^0.8.1" babel-plugin-polyfill-regenerator "^0.5.0" core-js-compat "^3.30.2" semver "^6.3.0" "@babel/preset-modules@^0.1.5": version "0.1.5" resolved "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.5.tgz" integrity sha512-A57th6YRG7oR3cq/yt/Y84MvGgE0eJG2F1JLhKuyG+jFxEgrd/HAMJatiFtmOiZurz+0DkrvbheCLaV5f2JfjA== dependencies: "@babel/helper-plugin-utils" "^7.0.0" "@babel/plugin-proposal-unicode-property-regex" "^7.4.4" "@babel/plugin-transform-dotall-regex" "^7.4.4" "@babel/types" "^7.4.4" esutils "^2.0.2" "@babel/preset-react@^7.18.6": version "7.18.6" resolved "https://registry.npmjs.org/@babel/preset-react/-/preset-react-7.18.6.tgz" integrity sha512-zXr6atUmyYdiWRVLOZahakYmOBHtWc2WGCkP8PYTgZi0iJXDY2CN180TdrIW4OGOAdLc7TifzDIvtx6izaRIzg== dependencies: "@babel/helper-plugin-utils" "^7.18.6" "@babel/helper-validator-option" "^7.18.6" "@babel/plugin-transform-react-display-name" "^7.18.6" "@babel/plugin-transform-react-jsx" "^7.18.6" "@babel/plugin-transform-react-jsx-development" "^7.18.6" "@babel/plugin-transform-react-pure-annotations" "^7.18.6" "@babel/preset-typescript@^7.18.6", "@babel/preset-typescript@^7.21.0": version "7.21.5" resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.21.5.tgz#68292c884b0e26070b4d66b202072d391358395f" integrity sha512-iqe3sETat5EOrORXiQ6rWfoOg2y68Cs75B9wNxdPW4kixJxh7aXQE1KPdWLDniC24T/6dSnguF33W9j/ZZQcmA== dependencies: "@babel/helper-plugin-utils" "^7.21.5" "@babel/helper-validator-option" "^7.21.0" "@babel/plugin-syntax-jsx" "^7.21.4" "@babel/plugin-transform-modules-commonjs" "^7.21.5" "@babel/plugin-transform-typescript" "^7.21.3" "@babel/regjsgen@^0.8.0": version "0.8.0" resolved "https://registry.yarnpkg.com/@babel/regjsgen/-/regjsgen-0.8.0.tgz#f0ba69b075e1f05fb2825b7fad991e7adbb18310" integrity sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA== "@babel/runtime-corejs3@^7.18.6": version "7.18.6" resolved "https://registry.npmjs.org/@babel/runtime-corejs3/-/runtime-corejs3-7.18.6.tgz" integrity sha512-cOu5wH2JFBgMjje+a+fz2JNIWU4GzYpl05oSob3UDvBEh6EuIn+TXFHMmBbhSb+k/4HMzgKCQfEEDArAWNF9Cw== dependencies: core-js-pure "^3.20.2" regenerator-runtime "^0.13.4" "@babel/runtime@^7.1.2", "@babel/runtime@^7.10.2", "@babel/runtime@^7.10.3", "@babel/runtime@^7.12.1", "@babel/runtime@^7.12.13", "@babel/runtime@^7.12.5", "@babel/runtime@^7.18.6", "@babel/runtime@^7.8.4": version "7.18.6" resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.18.6.tgz" integrity sha512-t9wi7/AW6XtKahAe20Yw0/mMljKq0B1r2fPdvaAdV/KPDZewFXdaaa6K7lxmZBZ8FBNpCiAT6iHPmd6QO9bKfQ== dependencies: regenerator-runtime "^0.13.4" "@babel/template@^7.12.7", "@babel/template@^7.18.10": version "7.18.10" resolved "https://registry.npmjs.org/@babel/template/-/template-7.18.10.tgz" integrity sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA== dependencies: "@babel/code-frame" "^7.18.6" "@babel/parser" "^7.18.10" "@babel/types" "^7.18.10" "@babel/template@^7.20.7", "@babel/template@^7.21.9": version "7.21.9" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.21.9.tgz#bf8dad2859130ae46088a99c1f265394877446fb" integrity sha512-MK0X5k8NKOuWRamiEfc3KEJiHMTkGZNUjzMipqCGDDc6ijRl/B7RGSKVGncu4Ro/HdyzzY6cmoXuKI2Gffk7vQ== dependencies: "@babel/code-frame" "^7.21.4" "@babel/parser" "^7.21.9" "@babel/types" "^7.21.5" "@babel/traverse@^7.12.9", "@babel/traverse@^7.13.0", "@babel/traverse@^7.18.6", "@babel/traverse@^7.18.8", "@babel/traverse@^7.19.0", "@babel/traverse@^7.19.4": version "7.20.0" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.20.0.tgz#538c4c6ce6255f5666eba02252a7b59fc2d5ed98" integrity sha512-5+cAXQNARgjRUK0JWu2UBwja4JLSO/rBMPJzpsKb+oBF5xlUuCfljQepS4XypBQoiigL0VQjTZy6WiONtUdScQ== dependencies: "@babel/code-frame" "^7.18.6" "@babel/generator" "^7.20.0" "@babel/helper-environment-visitor" "^7.18.9" "@babel/helper-function-name" "^7.19.0" "@babel/helper-hoist-variables" "^7.18.6" "@babel/helper-split-export-declaration" "^7.18.6" "@babel/parser" "^7.20.0" "@babel/types" "^7.20.0" debug "^4.1.0" globals "^11.1.0" "@babel/traverse@^7.22.1": version "7.22.4" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.22.4.tgz#c3cf96c5c290bd13b55e29d025274057727664c0" integrity sha512-Tn1pDsjIcI+JcLKq1AVlZEr4226gpuAQTsLMorsYg9tuS/kG7nuwwJ4AB8jfQuEgb/COBwR/DqJxmoiYFu5/rQ== dependencies: "@babel/code-frame" "^7.21.4" "@babel/generator" "^7.22.3" "@babel/helper-environment-visitor" "^7.22.1" "@babel/helper-function-name" "^7.21.0" "@babel/helper-hoist-variables" "^7.18.6" "@babel/helper-split-export-declaration" "^7.18.6" "@babel/parser" "^7.22.4" "@babel/types" "^7.22.4" debug "^4.1.0" globals "^11.1.0" "@babel/types@^7.12.7", "@babel/types@^7.16.0", "@babel/types@^7.18.10", "@babel/types@^7.18.6", "@babel/types@^7.18.9", "@babel/types@^7.19.0", "@babel/types@^7.19.4", "@babel/types@^7.4.4": version "7.19.4" resolved "https://registry.npmjs.org/@babel/types/-/types-7.19.4.tgz" integrity sha512-M5LK7nAeS6+9j7hAq+b3fQs+pNfUtTGq+yFFfHnauFA8zQtLRfmuipmsKDKKLuyG+wC8ABW43A153YNawNTEtw== dependencies: "@babel/helper-string-parser" "^7.19.4" "@babel/helper-validator-identifier" "^7.19.1" to-fast-properties "^2.0.0" "@babel/types@^7.20.0": version "7.20.0" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.20.0.tgz#52c94cf8a7e24e89d2a194c25c35b17a64871479" integrity sha512-Jlgt3H0TajCW164wkTOTzHkZb075tMQMULzrLUoUeKmO7eFL96GgDxf7/Axhc5CAuKE3KFyVW1p6ysKsi2oXAg== dependencies: "@babel/helper-string-parser" "^7.19.4" "@babel/helper-validator-identifier" "^7.19.1" to-fast-properties "^2.0.0" "@babel/types@^7.21.0", "@babel/types@^7.21.3", "@babel/types@^7.21.4", "@babel/types@^7.21.5", "@babel/types@^7.22.0", "@babel/types@^7.22.3", "@babel/types@^7.22.4": version "7.22.4" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.22.4.tgz#56a2653ae7e7591365dabf20b76295410684c071" integrity sha512-Tx9x3UBHTTsMSW85WB2kphxYQVvrZ/t1FxD88IpSgIjiUJlCm9z+xWIDwyo1vffTwSqteqyznB8ZE9vYYk16zA== dependencies: "@babel/helper-string-parser" "^7.21.5" "@babel/helper-validator-identifier" "^7.19.1" to-fast-properties "^2.0.0" "@braintree/sanitize-url@^6.0.0": version "6.0.1" resolved "https://registry.yarnpkg.com/@braintree/sanitize-url/-/sanitize-url-6.0.1.tgz#45ff061b9ded1c6e4474b33b336ebb1b986b825a" integrity sha512-zr9Qs9KFQiEvMWdZesjcmRJlUck5NR+eKGS1uyKk+oYTWwlYrsoPEi6VmG6/TzBD1hKCGEimrhTgGS6hvn/xIQ== "@colors/colors@1.5.0": version "1.5.0" resolved "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz" integrity sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ== "@docsearch/css@3.1.1": version "3.1.1" resolved "https://registry.npmjs.org/@docsearch/css/-/css-3.1.1.tgz" integrity sha512-utLgg7E1agqQeqCJn05DWC7XXMk4tMUUnL7MZupcknRu2OzGN13qwey2qA/0NAKkVBGugiWtON0+rlU0QIPojg== "@docsearch/react@^3.1.1": version "3.1.1" resolved "https://registry.npmjs.org/@docsearch/react/-/react-3.1.1.tgz" integrity sha512-cfoql4qvtsVRqBMYxhlGNpvyy/KlCoPqjIsJSZYqYf9AplZncKjLBTcwBu6RXFMVCe30cIFljniI4OjqAU67pQ== dependencies: "@algolia/autocomplete-core" "1.7.1" "@algolia/autocomplete-preset-algolia" "1.7.1" "@docsearch/css" "3.1.1" algoliasearch "^4.0.0" "@docusaurus/core@2.4.0", "@docusaurus/core@^2.0.0-beta.5", "@docusaurus/core@^2.4.0": version "2.4.0" resolved "https://registry.yarnpkg.com/@docusaurus/core/-/core-2.4.0.tgz#a12c175cb2e5a7e4582e65876a50813f6168913d" integrity sha512-J55/WEoIpRcLf3afO5POHPguVZosKmJEQWKBL+K7TAnfuE7i+Y0NPLlkKtnWCehagGsgTqClfQEexH/UT4kELA== dependencies: "@babel/core" "^7.18.6" "@babel/generator" "^7.18.7" "@babel/plugin-syntax-dynamic-import" "^7.8.3" "@babel/plugin-transform-runtime" "^7.18.6" "@babel/preset-env" "^7.18.6" "@babel/preset-react" "^7.18.6" "@babel/preset-typescript" "^7.18.6" "@babel/runtime" "^7.18.6" "@babel/runtime-corejs3" "^7.18.6" "@babel/traverse" "^7.18.8" "@docusaurus/cssnano-preset" "2.4.0" "@docusaurus/logger" "2.4.0" "@docusaurus/mdx-loader" "2.4.0" "@docusaurus/react-loadable" "5.5.2" "@docusaurus/utils" "2.4.0" "@docusaurus/utils-common" "2.4.0" "@docusaurus/utils-validation" "2.4.0" "@slorber/static-site-generator-webpack-plugin" "^4.0.7" "@svgr/webpack" "^6.2.1" autoprefixer "^10.4.7" babel-loader "^8.2.5" babel-plugin-dynamic-import-node "^2.3.3" boxen "^6.2.1" chalk "^4.1.2" chokidar "^3.5.3" clean-css "^5.3.0" cli-table3 "^0.6.2" combine-promises "^1.1.0" commander "^5.1.0" copy-webpack-plugin "^11.0.0" core-js "^3.23.3" css-loader "^6.7.1" css-minimizer-webpack-plugin "^4.0.0" cssnano "^5.1.12" del "^6.1.1" detect-port "^1.3.0" escape-html "^1.0.3" eta "^2.0.0" file-loader "^6.2.0" fs-extra "^10.1.0" html-minifier-terser "^6.1.0" html-tags "^3.2.0" html-webpack-plugin "^5.5.0" import-fresh "^3.3.0" leven "^3.1.0" lodash "^4.17.21" mini-css-extract-plugin "^2.6.1" postcss "^8.4.14" postcss-loader "^7.0.0" prompts "^2.4.2" react-dev-utils "^12.0.1" react-helmet-async "^1.3.0" react-loadable "npm:@docusaurus/react-loadable@5.5.2" react-loadable-ssr-addon-v5-slorber "^1.0.1" react-router "^5.3.3" react-router-config "^5.1.1" react-router-dom "^5.3.3" rtl-detect "^1.0.4" semver "^7.3.7" serve-handler "^6.1.3" shelljs "^0.8.5" terser-webpack-plugin "^5.3.3" tslib "^2.4.0" update-notifier "^5.1.0" url-loader "^4.1.1" wait-on "^6.0.1" webpack "^5.73.0" webpack-bundle-analyzer "^4.5.0" webpack-dev-server "^4.9.3" webpack-merge "^5.8.0" webpackbar "^5.0.2" "@docusaurus/cssnano-preset@2.4.0": version "2.4.0" resolved "https://registry.yarnpkg.com/@docusaurus/cssnano-preset/-/cssnano-preset-2.4.0.tgz#9213586358e0cce517f614af041eb7d184f8add6" integrity sha512-RmdiA3IpsLgZGXRzqnmTbGv43W4OD44PCo+6Q/aYjEM2V57vKCVqNzuafE94jv0z/PjHoXUrjr69SaRymBKYYw== dependencies: cssnano-preset-advanced "^5.3.8" postcss "^8.4.14" postcss-sort-media-queries "^4.2.1" tslib "^2.4.0" "@docusaurus/logger@2.4.0": version "2.4.0" resolved "https://registry.yarnpkg.com/@docusaurus/logger/-/logger-2.4.0.tgz#393d91ad9ecdb9a8f80167dd6a34d4b45219b835" integrity sha512-T8+qR4APN+MjcC9yL2Es+xPJ2923S9hpzDmMtdsOcUGLqpCGBbU1vp3AAqDwXtVgFkq+NsEk7sHdVsfLWR/AXw== dependencies: chalk "^4.1.2" tslib "^2.4.0" "@docusaurus/mdx-loader@2.4.0": version "2.4.0" resolved "https://registry.yarnpkg.com/@docusaurus/mdx-loader/-/mdx-loader-2.4.0.tgz#c6310342904af2f203e7df86a9df623f86840f2d" integrity sha512-GWoH4izZKOmFoC+gbI2/y8deH/xKLvzz/T5BsEexBye8EHQlwsA7FMrVa48N063bJBH4FUOiRRXxk5rq9cC36g== dependencies: "@babel/parser" "^7.18.8" "@babel/traverse" "^7.18.8" "@docusaurus/logger" "2.4.0" "@docusaurus/utils" "2.4.0" "@mdx-js/mdx" "^1.6.22" escape-html "^1.0.3" file-loader "^6.2.0" fs-extra "^10.1.0" image-size "^1.0.1" mdast-util-to-string "^2.0.0" remark-emoji "^2.2.0" stringify-object "^3.3.0" tslib "^2.4.0" unified "^9.2.2" unist-util-visit "^2.0.3" url-loader "^4.1.1" webpack "^5.73.0" "@docusaurus/module-type-aliases@2.4.0": version "2.4.0" resolved "https://registry.yarnpkg.com/@docusaurus/module-type-aliases/-/module-type-aliases-2.4.0.tgz#6961605d20cd46f86163ed8c2d83d438b02b4028" integrity sha512-YEQO2D3UXs72qCn8Cr+RlycSQXVGN9iEUyuHwTuK4/uL/HFomB2FHSU0vSDM23oLd+X/KibQ3Ez6nGjQLqXcHg== dependencies: "@docusaurus/react-loadable" "5.5.2" "@docusaurus/types" "2.4.0" "@types/history" "^4.7.11" "@types/react" "*" "@types/react-router-config" "*" "@types/react-router-dom" "*" react-helmet-async "*" react-loadable "npm:@docusaurus/react-loadable@5.5.2" "@docusaurus/plugin-content-blog@2.4.0": version "2.4.0" resolved "https://registry.yarnpkg.com/@docusaurus/plugin-content-blog/-/plugin-content-blog-2.4.0.tgz#50dbfbc7b51f152ae660385fd8b34076713374c3" integrity sha512-YwkAkVUxtxoBAIj/MCb4ohN0SCtHBs4AS75jMhPpf67qf3j+U/4n33cELq7567hwyZ6fMz2GPJcVmctzlGGThQ== dependencies: "@docusaurus/core" "2.4.0" "@docusaurus/logger" "2.4.0" "@docusaurus/mdx-loader" "2.4.0" "@docusaurus/types" "2.4.0" "@docusaurus/utils" "2.4.0" "@docusaurus/utils-common" "2.4.0" "@docusaurus/utils-validation" "2.4.0" cheerio "^1.0.0-rc.12" feed "^4.2.2" fs-extra "^10.1.0" lodash "^4.17.21" reading-time "^1.5.0" tslib "^2.4.0" unist-util-visit "^2.0.3" utility-types "^3.10.0" webpack "^5.73.0" "@docusaurus/plugin-content-docs@2.4.0": version "2.4.0" resolved "https://registry.yarnpkg.com/@docusaurus/plugin-content-docs/-/plugin-content-docs-2.4.0.tgz#36e235adf902325735b873b4f535205884363728" integrity sha512-ic/Z/ZN5Rk/RQo+Io6rUGpToOtNbtPloMR2JcGwC1xT2riMu6zzfSwmBi9tHJgdXH6CB5jG+0dOZZO8QS5tmDg== dependencies: "@docusaurus/core" "2.4.0" "@docusaurus/logger" "2.4.0" "@docusaurus/mdx-loader" "2.4.0" "@docusaurus/module-type-aliases" "2.4.0" "@docusaurus/types" "2.4.0" "@docusaurus/utils" "2.4.0" "@docusaurus/utils-validation" "2.4.0" "@types/react-router-config" "^5.0.6" combine-promises "^1.1.0" fs-extra "^10.1.0" import-fresh "^3.3.0" js-yaml "^4.1.0" lodash "^4.17.21" tslib "^2.4.0" utility-types "^3.10.0" webpack "^5.73.0" "@docusaurus/plugin-content-pages@2.4.0": version "2.4.0" resolved "https://registry.yarnpkg.com/@docusaurus/plugin-content-pages/-/plugin-content-pages-2.4.0.tgz#6169909a486e1eae0ddffff0b1717ce4332db4d4" integrity sha512-Pk2pOeOxk8MeU3mrTU0XLIgP9NZixbdcJmJ7RUFrZp1Aj42nd0RhIT14BGvXXyqb8yTQlk4DmYGAzqOfBsFyGw== dependencies: "@docusaurus/core" "2.4.0" "@docusaurus/mdx-loader" "2.4.0" "@docusaurus/types" "2.4.0" "@docusaurus/utils" "2.4.0" "@docusaurus/utils-validation" "2.4.0" fs-extra "^10.1.0" tslib "^2.4.0" webpack "^5.73.0" "@docusaurus/plugin-debug@2.4.0": version "2.4.0" resolved "https://registry.yarnpkg.com/@docusaurus/plugin-debug/-/plugin-debug-2.4.0.tgz#1ad513fe9bcaf017deccf62df8b8843faeeb7d37" integrity sha512-KC56DdYjYT7Txyux71vXHXGYZuP6yYtqwClvYpjKreWIHWus5Zt6VNi23rMZv3/QKhOCrN64zplUbdfQMvddBQ== dependencies: "@docusaurus/core" "2.4.0" "@docusaurus/types" "2.4.0" "@docusaurus/utils" "2.4.0" fs-extra "^10.1.0" react-json-view "^1.21.3" tslib "^2.4.0" "@docusaurus/plugin-google-analytics@2.4.0": version "2.4.0" resolved "https://registry.yarnpkg.com/@docusaurus/plugin-google-analytics/-/plugin-google-analytics-2.4.0.tgz#8062d7a09d366329dfd3ce4e8a619da8624b6cc3" integrity sha512-uGUzX67DOAIglygdNrmMOvEp8qG03X20jMWadeqVQktS6nADvozpSLGx4J0xbkblhJkUzN21WiilsP9iVP+zkw== dependencies: "@docusaurus/core" "2.4.0" "@docusaurus/types" "2.4.0" "@docusaurus/utils-validation" "2.4.0" tslib "^2.4.0" "@docusaurus/plugin-google-gtag@2.4.0": version "2.4.0" resolved "https://registry.yarnpkg.com/@docusaurus/plugin-google-gtag/-/plugin-google-gtag-2.4.0.tgz#a8efda476f971410dfb3aab1cfe1f0f7d269adc5" integrity sha512-adj/70DANaQs2+TF/nRdMezDXFAV/O/pjAbUgmKBlyOTq5qoMe0Tk4muvQIwWUmiUQxFJe+sKlZGM771ownyOg== dependencies: "@docusaurus/core" "2.4.0" "@docusaurus/types" "2.4.0" "@docusaurus/utils-validation" "2.4.0" tslib "^2.4.0" "@docusaurus/plugin-google-tag-manager@2.4.0": version "2.4.0" resolved "https://registry.yarnpkg.com/@docusaurus/plugin-google-tag-manager/-/plugin-google-tag-manager-2.4.0.tgz#9a94324ac496835fc34e233cc60441df4e04dfdd" integrity sha512-E66uGcYs4l7yitmp/8kMEVQftFPwV9iC62ORh47Veqzs6ExwnhzBkJmwDnwIysHBF1vlxnzET0Fl2LfL5fRR3A== dependencies: "@docusaurus/core" "2.4.0" "@docusaurus/types" "2.4.0" "@docusaurus/utils-validation" "2.4.0" tslib "^2.4.0" "@docusaurus/plugin-sitemap@2.4.0": version "2.4.0" resolved "https://registry.yarnpkg.com/@docusaurus/plugin-sitemap/-/plugin-sitemap-2.4.0.tgz#ba0eb43565039fe011bdd874b5c5d7252b19d709" integrity sha512-pZxh+ygfnI657sN8a/FkYVIAmVv0CGk71QMKqJBOfMmDHNN1FeDeFkBjWP49ejBqpqAhjufkv5UWq3UOu2soCw== dependencies: "@docusaurus/core" "2.4.0" "@docusaurus/logger" "2.4.0" "@docusaurus/types" "2.4.0" "@docusaurus/utils" "2.4.0" "@docusaurus/utils-common" "2.4.0" "@docusaurus/utils-validation" "2.4.0" fs-extra "^10.1.0" sitemap "^7.1.1" tslib "^2.4.0" "@docusaurus/preset-classic@^2.4.0": version "2.4.0" resolved "https://registry.yarnpkg.com/@docusaurus/preset-classic/-/preset-classic-2.4.0.tgz#92fdcfab35d8d0ffb8c38bcbf439e4e1cb0566a3" integrity sha512-/5z5o/9bc6+P5ool2y01PbJhoGddEGsC0ej1MF6mCoazk8A+kW4feoUd68l7Bnv01rCnG3xy7kHUQP97Y0grUA== dependencies: "@docusaurus/core" "2.4.0" "@docusaurus/plugin-content-blog" "2.4.0" "@docusaurus/plugin-content-docs" "2.4.0" "@docusaurus/plugin-content-pages" "2.4.0" "@docusaurus/plugin-debug" "2.4.0" "@docusaurus/plugin-google-analytics" "2.4.0" "@docusaurus/plugin-google-gtag" "2.4.0" "@docusaurus/plugin-google-tag-manager" "2.4.0" "@docusaurus/plugin-sitemap" "2.4.0" "@docusaurus/theme-classic" "2.4.0" "@docusaurus/theme-common" "2.4.0" "@docusaurus/theme-search-algolia" "2.4.0" "@docusaurus/types" "2.4.0" "@docusaurus/react-loadable@5.5.2", "react-loadable@npm:@docusaurus/react-loadable@5.5.2": version "5.5.2" resolved "https://registry.npmjs.org/@docusaurus/react-loadable/-/react-loadable-5.5.2.tgz" integrity sha512-A3dYjdBGuy0IGT+wyLIGIKLRE+sAk1iNk0f1HjNDysO7u8lhL4N3VEm+FAubmJbAztn94F7MxBTPmnixbiyFdQ== dependencies: "@types/react" "*" prop-types "^15.6.2" "@docusaurus/theme-classic@2.4.0": version "2.4.0" resolved "https://registry.yarnpkg.com/@docusaurus/theme-classic/-/theme-classic-2.4.0.tgz#a5404967b00adec3472efca4c3b3f6a5e2021c78" integrity sha512-GMDX5WU6Z0OC65eQFgl3iNNEbI9IMJz9f6KnOyuMxNUR6q0qVLsKCNopFUDfFNJ55UU50o7P7o21yVhkwpfJ9w== dependencies: "@docusaurus/core" "2.4.0" "@docusaurus/mdx-loader" "2.4.0" "@docusaurus/module-type-aliases" "2.4.0" "@docusaurus/plugin-content-blog" "2.4.0" "@docusaurus/plugin-content-docs" "2.4.0" "@docusaurus/plugin-content-pages" "2.4.0" "@docusaurus/theme-common" "2.4.0" "@docusaurus/theme-translations" "2.4.0" "@docusaurus/types" "2.4.0" "@docusaurus/utils" "2.4.0" "@docusaurus/utils-common" "2.4.0" "@docusaurus/utils-validation" "2.4.0" "@mdx-js/react" "^1.6.22" clsx "^1.2.1" copy-text-to-clipboard "^3.0.1" infima "0.2.0-alpha.43" lodash "^4.17.21" nprogress "^0.2.0" postcss "^8.4.14" prism-react-renderer "^1.3.5" prismjs "^1.28.0" react-router-dom "^5.3.3" rtlcss "^3.5.0" tslib "^2.4.0" utility-types "^3.10.0" "@docusaurus/theme-common@2.4.0": version "2.4.0" resolved "https://registry.yarnpkg.com/@docusaurus/theme-common/-/theme-common-2.4.0.tgz#626096fe9552d240a2115b492c7e12099070cf2d" integrity sha512-IkG/l5f/FLY6cBIxtPmFnxpuPzc5TupuqlOx+XDN+035MdQcAh8wHXXZJAkTeYDeZ3anIUSUIvWa7/nRKoQEfg== dependencies: "@docusaurus/mdx-loader" "2.4.0" "@docusaurus/module-type-aliases" "2.4.0" "@docusaurus/plugin-content-blog" "2.4.0" "@docusaurus/plugin-content-docs" "2.4.0" "@docusaurus/plugin-content-pages" "2.4.0" "@docusaurus/utils" "2.4.0" "@docusaurus/utils-common" "2.4.0" "@types/history" "^4.7.11" "@types/react" "*" "@types/react-router-config" "*" clsx "^1.2.1" parse-numeric-range "^1.3.0" prism-react-renderer "^1.3.5" tslib "^2.4.0" use-sync-external-store "^1.2.0" utility-types "^3.10.0" "@docusaurus/theme-mermaid@^2.4.0": version "2.4.0" resolved "https://registry.yarnpkg.com/@docusaurus/theme-mermaid/-/theme-mermaid-2.4.0.tgz#a969a3ec3387de7dafb6156feb3920f83cdeffe8" integrity sha512-qB4cMDn93iwQ5JzhLgHsME5DgUbISMKgk6nP6tEWqepP3S/WXR1L/uRAH8xXbuRhJgzERHM/f6riyv0cNIQeTg== dependencies: "@docusaurus/core" "2.4.0" "@docusaurus/module-type-aliases" "2.4.0" "@docusaurus/theme-common" "2.4.0" "@docusaurus/types" "2.4.0" "@docusaurus/utils-validation" "2.4.0" "@mdx-js/react" "^1.6.22" mermaid "^9.2.2" tslib "^2.4.0" "@docusaurus/theme-search-algolia@2.4.0": version "2.4.0" resolved "https://registry.yarnpkg.com/@docusaurus/theme-search-algolia/-/theme-search-algolia-2.4.0.tgz#07d297d50c44446d6bc5a37be39afb8f014084e1" integrity sha512-pPCJSCL1Qt4pu/Z0uxBAuke0yEBbxh0s4fOvimna7TEcBLPq0x06/K78AaABXrTVQM6S0vdocFl9EoNgU17hqA== dependencies: "@docsearch/react" "^3.1.1" "@docusaurus/core" "2.4.0" "@docusaurus/logger" "2.4.0" "@docusaurus/plugin-content-docs" "2.4.0" "@docusaurus/theme-common" "2.4.0" "@docusaurus/theme-translations" "2.4.0" "@docusaurus/utils" "2.4.0" "@docusaurus/utils-validation" "2.4.0" algoliasearch "^4.13.1" algoliasearch-helper "^3.10.0" clsx "^1.2.1" eta "^2.0.0" fs-extra "^10.1.0" lodash "^4.17.21" tslib "^2.4.0" utility-types "^3.10.0" "@docusaurus/theme-translations@2.4.0": version "2.4.0" resolved "https://registry.yarnpkg.com/@docusaurus/theme-translations/-/theme-translations-2.4.0.tgz#62dacb7997322f4c5a828b3ab66177ec6769eb33" integrity sha512-kEoITnPXzDPUMBHk3+fzEzbopxLD3fR5sDoayNH0vXkpUukA88/aDL1bqkhxWZHA3LOfJ3f0vJbOwmnXW5v85Q== dependencies: fs-extra "^10.1.0" tslib "^2.4.0" "@docusaurus/types@2.4.0", "@docusaurus/types@^2.0.0-beta.5": version "2.4.0" resolved "https://registry.yarnpkg.com/@docusaurus/types/-/types-2.4.0.tgz#f94f89a0253778b617c5d40ac6f16b17ec55ce41" integrity sha512-xaBXr+KIPDkIaef06c+i2HeTqVNixB7yFut5fBXPGI2f1rrmEV2vLMznNGsFwvZ5XmA3Quuefd4OGRkdo97Dhw== dependencies: "@types/history" "^4.7.11" "@types/react" "*" commander "^5.1.0" joi "^17.6.0" react-helmet-async "^1.3.0" utility-types "^3.10.0" webpack "^5.73.0" webpack-merge "^5.8.0" "@docusaurus/utils-common@2.4.0": version "2.4.0" resolved "https://registry.yarnpkg.com/@docusaurus/utils-common/-/utils-common-2.4.0.tgz#eb2913871860ed32e73858b4c7787dd820c5558d" integrity sha512-zIMf10xuKxddYfLg5cS19x44zud/E9I7lj3+0bv8UIs0aahpErfNrGhijEfJpAfikhQ8tL3m35nH3hJ3sOG82A== dependencies: tslib "^2.4.0" "@docusaurus/utils-validation@2.4.0": version "2.4.0" resolved "https://registry.yarnpkg.com/@docusaurus/utils-validation/-/utils-validation-2.4.0.tgz#1ed92bfab5da321c4a4d99cad28a15627091aa90" integrity sha512-IrBsBbbAp6y7mZdJx4S4pIA7dUyWSA0GNosPk6ZJ0fX3uYIEQgcQSGIgTeSC+8xPEx3c16o03en1jSDpgQgz/w== dependencies: "@docusaurus/logger" "2.4.0" "@docusaurus/utils" "2.4.0" joi "^17.6.0" js-yaml "^4.1.0" tslib "^2.4.0" "@docusaurus/utils@2.4.0", "@docusaurus/utils@^2.0.0-beta.5": version "2.4.0" resolved "https://registry.yarnpkg.com/@docusaurus/utils/-/utils-2.4.0.tgz#fdf0c3545819e48bb57eafc5057495fd4d50e900" integrity sha512-89hLYkvtRX92j+C+ERYTuSUK6nF9bGM32QThcHPg2EDDHVw6FzYQXmX6/p+pU5SDyyx5nBlE4qXR92RxCAOqfg== dependencies: "@docusaurus/logger" "2.4.0" "@svgr/webpack" "^6.2.1" escape-string-regexp "^4.0.0" file-loader "^6.2.0" fs-extra "^10.1.0" github-slugger "^1.4.0" globby "^11.1.0" gray-matter "^4.0.3" js-yaml "^4.1.0" lodash "^4.17.21" micromatch "^4.0.5" resolve-pathname "^3.0.0" shelljs "^0.8.5" tslib "^2.4.0" url-loader "^4.1.1" webpack "^5.73.0" "@graphql-tools/load-files@^6.3.2": version "6.6.1" resolved "https://registry.yarnpkg.com/@graphql-tools/load-files/-/load-files-6.6.1.tgz#91ce18d910baf8678459486d8cccd474767bec0a" integrity sha512-nd4GOjdD68bdJkHfRepILb0gGwF63mJI7uD4oJuuf2Kzeq8LorKa6WfyxUhdMuLmZhnx10zdAlWPfwv1NOAL4Q== dependencies: globby "11.1.0" tslib "^2.4.0" unixify "1.0.0" "@graphql-tools/merge@8.3.12", "@graphql-tools/merge@^8.1.2": version "8.3.12" resolved "https://registry.yarnpkg.com/@graphql-tools/merge/-/merge-8.3.12.tgz#e3f2e5d8a7b34fb689cda66799d845cbc919e464" integrity sha512-BFL8r4+FrqecPnIW0H8UJCBRQ4Y8Ep60aujw9c/sQuFmQTiqgWgpphswMGfaosP2zUinDE3ojU5wwcS2IJnumA== dependencies: "@graphql-tools/utils" "9.1.1" tslib "^2.4.0" "@graphql-tools/schema@^9.0.1": version "9.0.10" resolved "https://registry.yarnpkg.com/@graphql-tools/schema/-/schema-9.0.10.tgz#77ba3dfab241f0232dc0d3ba03201663b63714e2" integrity sha512-lV0o4df9SpPiaeeDAzgdCJ2o2N9Wvsp0SMHlF2qDbh9aFCFQRsXuksgiDm2yTgT3TG5OtUes/t0D6uPjPZFUbQ== dependencies: "@graphql-tools/merge" "8.3.12" "@graphql-tools/utils" "9.1.1" tslib "^2.4.0" value-or-promise "1.0.11" "@graphql-tools/utils@9.1.1": version "9.1.1" resolved "https://registry.yarnpkg.com/@graphql-tools/utils/-/utils-9.1.1.tgz#b47ea8f0d18c038c5c1c429e72caa5c25039fbab" integrity sha512-DXKLIEDbihK24fktR2hwp/BNIVwULIHaSTNTNhXS+19vgT50eX9wndx1bPxGwHnVBOONcwjXy0roQac49vdt/w== dependencies: tslib "^2.4.0" "@graphql-tools/utils@^9.1.1": version "9.1.3" resolved "https://registry.yarnpkg.com/@graphql-tools/utils/-/utils-9.1.3.tgz#861f87057b313726136fa6ddfbd2380eae906599" integrity sha512-bbJyKhs6awp1/OmP+WKA1GOyu9UbgZGkhIj5srmiMGLHohEOKMjW784Sk0BZil1w2x95UPu0WHw6/d/HVCACCg== dependencies: tslib "^2.4.0" "@hapi/hoek@^9.0.0": version "9.2.1" resolved "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.2.1.tgz" integrity sha512-gfta+H8aziZsm8pZa0vj04KO6biEiisppNgA1kbJvFrrWu9Vm7eaUEy76DIxsuTaWvti5fkJVhllWc6ZTE+Mdw== "@hapi/topo@^5.0.0": version "5.1.0" resolved "https://registry.npmjs.org/@hapi/topo/-/topo-5.1.0.tgz" integrity sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg== dependencies: "@hapi/hoek" "^9.0.0" "@jest/schemas@^29.0.0": version "29.0.0" resolved "https://registry.npmjs.org/@jest/schemas/-/schemas-29.0.0.tgz" integrity sha512-3Ab5HgYIIAnS0HjqJHQYZS+zXc4tUmTmBH3z83ajI6afXp8X3ZtdLX+nXx+I7LNkJD7uN9LAVhgnjDgZa2z0kA== dependencies: "@sinclair/typebox" "^0.24.1" "@jest/types@^29.2.0": version "29.2.0" resolved "https://registry.npmjs.org/@jest/types/-/types-29.2.0.tgz" integrity sha512-mfgpQz4Z2xGo37m6KD8xEpKelaVzvYVRijmLPePn9pxgaPEtX+SqIyPNzzoeCPXKYbB4L/wYSgXDL8o3Gop78Q== dependencies: "@jest/schemas" "^29.0.0" "@types/istanbul-lib-coverage" "^2.0.0" "@types/istanbul-reports" "^3.0.0" "@types/node" "*" "@types/yargs" "^17.0.8" chalk "^4.0.0" "@jridgewell/gen-mapping@^0.3.0", "@jridgewell/gen-mapping@^0.3.2": version "0.3.2" resolved "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz" integrity sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A== dependencies: "@jridgewell/set-array" "^1.0.1" "@jridgewell/sourcemap-codec" "^1.4.10" "@jridgewell/trace-mapping" "^0.3.9" "@jridgewell/resolve-uri@3.1.0", "@jridgewell/resolve-uri@^3.0.3": version "3.1.0" resolved "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz" integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== "@jridgewell/set-array@^1.0.1": version "1.1.2" resolved "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz" integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== "@jridgewell/source-map@^0.3.2": version "0.3.2" resolved "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.2.tgz" integrity sha512-m7O9o2uR8k2ObDysZYzdfhb08VuEml5oWGiosa1VdaPZ/A6QyPkAJuwN0Q1lhULOf6B7MtQmHENS743hWtCrgw== dependencies: "@jridgewell/gen-mapping" "^0.3.0" "@jridgewell/trace-mapping" "^0.3.9" "@jridgewell/sourcemap-codec@1.4.14", "@jridgewell/sourcemap-codec@^1.4.10": version "1.4.14" resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz" integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== "@jridgewell/trace-mapping@^0.3.14", "@jridgewell/trace-mapping@^0.3.9": version "0.3.14" resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.14.tgz" integrity sha512-bJWEfQ9lPTvm3SneWwRFVLzrh6nhjwqw7TUFFBEMzwvg7t7PCDenf2lDwqo4NQXzdpgBXyFgDWnQA+2vkruksQ== dependencies: "@jridgewell/resolve-uri" "^3.0.3" "@jridgewell/sourcemap-codec" "^1.4.10" "@jridgewell/trace-mapping@^0.3.17": version "0.3.18" resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.18.tgz#25783b2086daf6ff1dcb53c9249ae480e4dd4cd6" integrity sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA== dependencies: "@jridgewell/resolve-uri" "3.1.0" "@jridgewell/sourcemap-codec" "1.4.14" "@leichtgewicht/ip-codec@^2.0.1": version "2.0.4" resolved "https://registry.npmjs.org/@leichtgewicht/ip-codec/-/ip-codec-2.0.4.tgz" integrity sha512-Hcv+nVC0kZnQ3tD9GVu5xSMR4VVYOteQIr/hwFPVEvPdlXqgGEuRjiheChHgdM+JyqdgNcmzZOX/tnl0JOiI7A== "@mdx-js/mdx@^1.6.22": version "1.6.22" resolved "https://registry.npmjs.org/@mdx-js/mdx/-/mdx-1.6.22.tgz" integrity sha512-AMxuLxPz2j5/6TpF/XSdKpQP1NlG0z11dFOlq+2IP/lSgl11GY8ji6S/rgsViN/L0BDvHvUMruRb7ub+24LUYA== dependencies: "@babel/core" "7.12.9" "@babel/plugin-syntax-jsx" "7.12.1" "@babel/plugin-syntax-object-rest-spread" "7.8.3" "@mdx-js/util" "1.6.22" babel-plugin-apply-mdx-type-prop "1.6.22" babel-plugin-extract-import-names "1.6.22" camelcase-css "2.0.1" detab "2.0.4" hast-util-raw "6.0.1" lodash.uniq "4.5.0" mdast-util-to-hast "10.0.1" remark-footnotes "2.0.0" remark-mdx "1.6.22" remark-parse "8.0.3" remark-squeeze-paragraphs "4.0.0" style-to-object "0.3.0" unified "9.2.0" unist-builder "2.0.3" unist-util-visit "2.0.3" "@mdx-js/react@^1.6.22": version "1.6.22" resolved "https://registry.npmjs.org/@mdx-js/react/-/react-1.6.22.tgz" integrity sha512-TDoPum4SHdfPiGSAaRBw7ECyI8VaHpK8GJugbJIJuqyh6kzw9ZLJZW3HGL3NNrJGxcAixUvqROm+YuQOo5eXtg== "@mdx-js/util@1.6.22": version "1.6.22" resolved "https://registry.npmjs.org/@mdx-js/util/-/util-1.6.22.tgz" integrity sha512-H1rQc1ZOHANWBvPcW+JpGwr+juXSxM8Q8YCkm3GhZd8REu1fHR3z99CErO1p9pkcfcxZnMdIZdIsXkOHY0NilA== "@nodelib/fs.scandir@2.1.5": version "2.1.5" resolved "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz" integrity sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g== dependencies: "@nodelib/fs.stat" "2.0.5" run-parallel "^1.1.9" "@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": version "2.0.5" resolved "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz" integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== "@nodelib/fs.walk@^1.2.3": version "1.2.8" resolved "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz" integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== dependencies: "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" "@polka/url@^1.0.0-next.20": version "1.0.0-next.21" resolved "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.21.tgz" integrity sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g== "@sideway/address@^4.1.3": version "4.1.3" resolved "https://registry.npmjs.org/@sideway/address/-/address-4.1.3.tgz" integrity sha512-8ncEUtmnTsMmL7z1YPB47kPUq7LpKWJNFPsRzHiIajGC5uXlWGn+AmkYPcHNl8S4tcEGx+cnORnNYaw2wvL+LQ== dependencies: "@hapi/hoek" "^9.0.0" "@sideway/formula@^3.0.0": version "3.0.1" resolved "https://registry.yarnpkg.com/@sideway/formula/-/formula-3.0.1.tgz#80fcbcbaf7ce031e0ef2dd29b1bfc7c3f583611f" integrity sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg== "@sideway/pinpoint@^2.0.0": version "2.0.0" resolved "https://registry.npmjs.org/@sideway/pinpoint/-/pinpoint-2.0.0.tgz" integrity sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ== "@sinclair/typebox@^0.24.1": version "0.24.46" resolved "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.24.46.tgz" integrity sha512-ng4ut1z2MCBhK/NwDVwIQp3pAUOCs/KNaW3cBxdFB2xTDrOuo1xuNmpr/9HHFhxqIvHrs1NTH3KJg6q+JSy1Kw== "@sindresorhus/is@^0.14.0": version "0.14.0" resolved "https://registry.npmjs.org/@sindresorhus/is/-/is-0.14.0.tgz" integrity sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ== "@slorber/static-site-generator-webpack-plugin@^4.0.7": version "4.0.7" resolved "https://registry.npmjs.org/@slorber/static-site-generator-webpack-plugin/-/static-site-generator-webpack-plugin-4.0.7.tgz" integrity sha512-Ug7x6z5lwrz0WqdnNFOMYrDQNTPAprvHLSh6+/fmml3qUiz6l5eq+2MzLKWtn/q5K5NpSiFsZTP/fck/3vjSxA== dependencies: eval "^0.1.8" p-map "^4.0.0" webpack-sources "^3.2.2" "@svgr/babel-plugin-add-jsx-attribute@8.0.0": version "8.0.0" resolved "https://registry.yarnpkg.com/@svgr/babel-plugin-add-jsx-attribute/-/babel-plugin-add-jsx-attribute-8.0.0.tgz#4001f5d5dd87fa13303e36ee106e3ff3a7eb8b22" integrity sha512-b9MIk7yhdS1pMCZM8VeNfUlSKVRhsHZNMl5O9SfaX0l0t5wjdgu4IDzGB8bpnGBBOjGST3rRFVsaaEtI4W6f7g== "@svgr/babel-plugin-add-jsx-attribute@^6.5.1": version "6.5.1" resolved "https://registry.yarnpkg.com/@svgr/babel-plugin-add-jsx-attribute/-/babel-plugin-add-jsx-attribute-6.5.1.tgz#74a5d648bd0347bda99d82409d87b8ca80b9a1ba" integrity sha512-9PYGcXrAxitycIjRmZB+Q0JaN07GZIWaTBIGQzfaZv+qr1n8X1XUEJ5rZ/vx6OVD9RRYlrNnXWExQXcmZeD/BQ== "@svgr/babel-plugin-remove-jsx-attribute@*": version "6.5.0" resolved "https://registry.npmjs.org/@svgr/babel-plugin-remove-jsx-attribute/-/babel-plugin-remove-jsx-attribute-6.5.0.tgz" integrity sha512-8zYdkym7qNyfXpWvu4yq46k41pyNM9SOstoWhKlm+IfdCE1DdnRKeMUPsWIEO/DEkaWxJ8T9esNdG3QwQ93jBA== "@svgr/babel-plugin-remove-jsx-attribute@8.0.0": version "8.0.0" resolved "https://registry.yarnpkg.com/@svgr/babel-plugin-remove-jsx-attribute/-/babel-plugin-remove-jsx-attribute-8.0.0.tgz#69177f7937233caca3a1afb051906698f2f59186" integrity sha512-BcCkm/STipKvbCl6b7QFrMh/vx00vIP63k2eM66MfHJzPr6O2U0jYEViXkHJWqXqQYjdeA9cuCl5KWmlwjDvbA== "@svgr/babel-plugin-remove-jsx-empty-expression@*": version "6.5.0" resolved "https://registry.npmjs.org/@svgr/babel-plugin-remove-jsx-empty-expression/-/babel-plugin-remove-jsx-empty-expression-6.5.0.tgz" integrity sha512-NFdxMq3xA42Kb1UbzCVxplUc0iqSyM9X8kopImvFnB+uSDdzIHOdbs1op8ofAvVRtbg4oZiyRl3fTYeKcOe9Iw== "@svgr/babel-plugin-remove-jsx-empty-expression@8.0.0": version "8.0.0" resolved "https://registry.yarnpkg.com/@svgr/babel-plugin-remove-jsx-empty-expression/-/babel-plugin-remove-jsx-empty-expression-8.0.0.tgz#c2c48104cfd7dcd557f373b70a56e9e3bdae1d44" integrity sha512-5BcGCBfBxB5+XSDSWnhTThfI9jcO5f0Ai2V24gZpG+wXF14BzwxxdDb4g6trdOux0rhibGs385BeFMSmxtS3uA== "@svgr/babel-plugin-replace-jsx-attribute-value@8.0.0": version "8.0.0" resolved "https://registry.yarnpkg.com/@svgr/babel-plugin-replace-jsx-attribute-value/-/babel-plugin-replace-jsx-attribute-value-8.0.0.tgz#8fbb6b2e91fa26ac5d4aa25c6b6e4f20f9c0ae27" integrity sha512-KVQ+PtIjb1BuYT3ht8M5KbzWBhdAjjUPdlMtpuw/VjT8coTrItWX6Qafl9+ji831JaJcu6PJNKCV0bp01lBNzQ== "@svgr/babel-plugin-replace-jsx-attribute-value@^6.5.1": version "6.5.1" resolved "https://registry.yarnpkg.com/@svgr/babel-plugin-replace-jsx-attribute-value/-/babel-plugin-replace-jsx-attribute-value-6.5.1.tgz#fb9d22ea26d2bc5e0a44b763d4c46d5d3f596c60" integrity sha512-8DPaVVE3fd5JKuIC29dqyMB54sA6mfgki2H2+swh+zNJoynC8pMPzOkidqHOSc6Wj032fhl8Z0TVn1GiPpAiJg== "@svgr/babel-plugin-svg-dynamic-title@8.0.0": version "8.0.0" resolved "https://registry.yarnpkg.com/@svgr/babel-plugin-svg-dynamic-title/-/babel-plugin-svg-dynamic-title-8.0.0.tgz#1d5ba1d281363fc0f2f29a60d6d936f9bbc657b0" integrity sha512-omNiKqwjNmOQJ2v6ge4SErBbkooV2aAWwaPFs2vUY7p7GhVkzRkJ00kILXQvRhA6miHnNpXv7MRnnSjdRjK8og== "@svgr/babel-plugin-svg-dynamic-title@^6.5.1": version "6.5.1" resolved "https://registry.yarnpkg.com/@svgr/babel-plugin-svg-dynamic-title/-/babel-plugin-svg-dynamic-title-6.5.1.tgz#01b2024a2b53ffaa5efceaa0bf3e1d5a4c520ce4" integrity sha512-FwOEi0Il72iAzlkaHrlemVurgSQRDFbk0OC8dSvD5fSBPHltNh7JtLsxmZUhjYBZo2PpcU/RJvvi6Q0l7O7ogw== "@svgr/babel-plugin-svg-em-dimensions@8.0.0": version "8.0.0" resolved "https://registry.yarnpkg.com/@svgr/babel-plugin-svg-em-dimensions/-/babel-plugin-svg-em-dimensions-8.0.0.tgz#35e08df300ea8b1d41cb8f62309c241b0369e501" integrity sha512-mURHYnu6Iw3UBTbhGwE/vsngtCIbHE43xCRK7kCw4t01xyGqb2Pd+WXekRRoFOBIY29ZoOhUCTEweDMdrjfi9g== "@svgr/babel-plugin-svg-em-dimensions@^6.5.1": version "6.5.1" resolved "https://registry.yarnpkg.com/@svgr/babel-plugin-svg-em-dimensions/-/babel-plugin-svg-em-dimensions-6.5.1.tgz#dd3fa9f5b24eb4f93bcf121c3d40ff5facecb217" integrity sha512-gWGsiwjb4tw+ITOJ86ndY/DZZ6cuXMNE/SjcDRg+HLuCmwpcjOktwRF9WgAiycTqJD/QXqL2f8IzE2Rzh7aVXA== "@svgr/babel-plugin-transform-react-native-svg@8.1.0": version "8.1.0" resolved "https://registry.yarnpkg.com/@svgr/babel-plugin-transform-react-native-svg/-/babel-plugin-transform-react-native-svg-8.1.0.tgz#90a8b63998b688b284f255c6a5248abd5b28d754" integrity sha512-Tx8T58CHo+7nwJ+EhUwx3LfdNSG9R2OKfaIXXs5soiy5HtgoAEkDay9LIimLOcG8dJQH1wPZp/cnAv6S9CrR1Q== "@svgr/babel-plugin-transform-react-native-svg@^6.5.1": version "6.5.1" resolved "https://registry.yarnpkg.com/@svgr/babel-plugin-transform-react-native-svg/-/babel-plugin-transform-react-native-svg-6.5.1.tgz#1d8e945a03df65b601551097d8f5e34351d3d305" integrity sha512-2jT3nTayyYP7kI6aGutkyfJ7UMGtuguD72OjeGLwVNyfPRBD8zQthlvL+fAbAKk5n9ZNcvFkp/b1lZ7VsYqVJg== "@svgr/babel-plugin-transform-svg-component@8.0.0": version "8.0.0" resolved "https://registry.yarnpkg.com/@svgr/babel-plugin-transform-svg-component/-/babel-plugin-transform-svg-component-8.0.0.tgz#013b4bfca88779711f0ed2739f3f7efcefcf4f7e" integrity sha512-DFx8xa3cZXTdb/k3kfPeaixecQLgKh5NVBMwD0AQxOzcZawK4oo1Jh9LbrcACUivsCA7TLG8eeWgrDXjTMhRmw== "@svgr/babel-plugin-transform-svg-component@^6.5.1": version "6.5.1" resolved "https://registry.yarnpkg.com/@svgr/babel-plugin-transform-svg-component/-/babel-plugin-transform-svg-component-6.5.1.tgz#48620b9e590e25ff95a80f811544218d27f8a250" integrity sha512-a1p6LF5Jt33O3rZoVRBqdxL350oge54iZWHNI6LJB5tQ7EelvD/Mb1mfBiZNAan0dt4i3VArkFRjA4iObuNykQ== "@svgr/babel-preset@8.1.0": version "8.1.0" resolved "https://registry.yarnpkg.com/@svgr/babel-preset/-/babel-preset-8.1.0.tgz#0e87119aecdf1c424840b9d4565b7137cabf9ece" integrity sha512-7EYDbHE7MxHpv4sxvnVPngw5fuR6pw79SkcrILHJ/iMpuKySNCl5W1qcwPEpU+LgyRXOaAFgH0KhwD18wwg6ug== dependencies: "@svgr/babel-plugin-add-jsx-attribute" "8.0.0" "@svgr/babel-plugin-remove-jsx-attribute" "8.0.0" "@svgr/babel-plugin-remove-jsx-empty-expression" "8.0.0" "@svgr/babel-plugin-replace-jsx-attribute-value" "8.0.0" "@svgr/babel-plugin-svg-dynamic-title" "8.0.0" "@svgr/babel-plugin-svg-em-dimensions" "8.0.0" "@svgr/babel-plugin-transform-react-native-svg" "8.1.0" "@svgr/babel-plugin-transform-svg-component" "8.0.0" "@svgr/babel-preset@^6.5.1": version "6.5.1" resolved "https://registry.yarnpkg.com/@svgr/babel-preset/-/babel-preset-6.5.1.tgz#b90de7979c8843c5c580c7e2ec71f024b49eb828" integrity sha512-6127fvO/FF2oi5EzSQOAjo1LE3OtNVh11R+/8FXa+mHx1ptAaS4cknIjnUA7e6j6fwGGJ17NzaTJFUwOV2zwCw== dependencies: "@svgr/babel-plugin-add-jsx-attribute" "^6.5.1" "@svgr/babel-plugin-remove-jsx-attribute" "*" "@svgr/babel-plugin-remove-jsx-empty-expression" "*" "@svgr/babel-plugin-replace-jsx-attribute-value" "^6.5.1" "@svgr/babel-plugin-svg-dynamic-title" "^6.5.1" "@svgr/babel-plugin-svg-em-dimensions" "^6.5.1" "@svgr/babel-plugin-transform-react-native-svg" "^6.5.1" "@svgr/babel-plugin-transform-svg-component" "^6.5.1" "@svgr/core@8.1.0": version "8.1.0" resolved "https://registry.yarnpkg.com/@svgr/core/-/core-8.1.0.tgz#41146f9b40b1a10beaf5cc4f361a16a3c1885e88" integrity sha512-8QqtOQT5ACVlmsvKOJNEaWmRPmcojMOzCz4Hs2BGG/toAp/K38LcsMRyLp349glq5AzJbCEeimEoxaX6v/fLrA== dependencies: "@babel/core" "^7.21.3" "@svgr/babel-preset" "8.1.0" camelcase "^6.2.0" cosmiconfig "^8.1.3" snake-case "^3.0.4" "@svgr/core@^6.5.1": version "6.5.1" resolved "https://registry.yarnpkg.com/@svgr/core/-/core-6.5.1.tgz#d3e8aa9dbe3fbd747f9ee4282c1c77a27410488a" integrity sha512-/xdLSWxK5QkqG524ONSjvg3V/FkNyCv538OIBdQqPNaAta3AsXj/Bd2FbvR87yMbXO2hFSWiAe/Q6IkVPDw+mw== dependencies: "@babel/core" "^7.19.6" "@svgr/babel-preset" "^6.5.1" "@svgr/plugin-jsx" "^6.5.1" camelcase "^6.2.0" cosmiconfig "^7.0.1" "@svgr/hast-util-to-babel-ast@8.0.0": version "8.0.0" resolved "https://registry.yarnpkg.com/@svgr/hast-util-to-babel-ast/-/hast-util-to-babel-ast-8.0.0.tgz#6952fd9ce0f470e1aded293b792a2705faf4ffd4" integrity sha512-EbDKwO9GpfWP4jN9sGdYwPBU0kdomaPIL2Eu4YwmgP+sJeXT+L7bMwJUBnhzfH8Q2qMBqZ4fJwpCyYsAN3mt2Q== dependencies: "@babel/types" "^7.21.3" entities "^4.4.0" "@svgr/hast-util-to-babel-ast@^6.5.1": version "6.5.1" resolved "https://registry.yarnpkg.com/@svgr/hast-util-to-babel-ast/-/hast-util-to-babel-ast-6.5.1.tgz#81800bd09b5bcdb968bf6ee7c863d2288fdb80d2" integrity sha512-1hnUxxjd83EAxbL4a0JDJoD3Dao3hmjvyvyEV8PzWmLK3B9m9NPlW7GKjFyoWE8nM7HnXzPcmmSyOW8yOddSXw== dependencies: "@babel/types" "^7.20.0" entities "^4.4.0" "@svgr/plugin-jsx@8.1.0": version "8.1.0" resolved "https://registry.yarnpkg.com/@svgr/plugin-jsx/-/plugin-jsx-8.1.0.tgz#96969f04a24b58b174ee4cd974c60475acbd6928" integrity sha512-0xiIyBsLlr8quN+WyuxooNW9RJ0Dpr8uOnH/xrCVO8GLUcwHISwj1AG0k+LFzteTkAA0GbX0kj9q6Dk70PTiPA== dependencies: "@babel/core" "^7.21.3" "@svgr/babel-preset" "8.1.0" "@svgr/hast-util-to-babel-ast" "8.0.0" svg-parser "^2.0.4" "@svgr/plugin-jsx@^6.5.1": version "6.5.1" resolved "https://registry.yarnpkg.com/@svgr/plugin-jsx/-/plugin-jsx-6.5.1.tgz#0e30d1878e771ca753c94e69581c7971542a7072" integrity sha512-+UdQxI3jgtSjCykNSlEMuy1jSRQlGC7pqBCPvkG/2dATdWo082zHTTK3uhnAju2/6XpE6B5mZ3z4Z8Ns01S8Gw== dependencies: "@babel/core" "^7.19.6" "@svgr/babel-preset" "^6.5.1" "@svgr/hast-util-to-babel-ast" "^6.5.1" svg-parser "^2.0.4" "@svgr/plugin-svgo@8.1.0": version "8.1.0" resolved "https://registry.yarnpkg.com/@svgr/plugin-svgo/-/plugin-svgo-8.1.0.tgz#b115b7b967b564f89ac58feae89b88c3decd0f00" integrity sha512-Ywtl837OGO9pTLIN/onoWLmDQ4zFUycI1g76vuKGEz6evR/ZTJlJuz3G/fIkb6OVBJ2g0o6CGJzaEjfmEo3AHA== dependencies: cosmiconfig "^8.1.3" deepmerge "^4.3.1" svgo "^3.0.2" "@svgr/plugin-svgo@^6.5.1": version "6.5.1" resolved "https://registry.yarnpkg.com/@svgr/plugin-svgo/-/plugin-svgo-6.5.1.tgz#0f91910e988fc0b842f88e0960c2862e022abe84" integrity sha512-omvZKf8ixP9z6GWgwbtmP9qQMPX4ODXi+wzbVZgomNFsUIlHA1sf4fThdwTWSsZGgvGAG6yE+b/F5gWUkcZ/iQ== dependencies: cosmiconfig "^7.0.1" deepmerge "^4.2.2" svgo "^2.8.0" "@svgr/webpack@^6.2.1": version "6.5.1" resolved "https://registry.yarnpkg.com/@svgr/webpack/-/webpack-6.5.1.tgz#ecf027814fc1cb2decc29dc92f39c3cf691e40e8" integrity sha512-cQ/AsnBkXPkEK8cLbv4Dm7JGXq2XrumKnL1dRpJD9rIO2fTIlJI9a1uCciYG1F2aUsox/hJQyNGbt3soDxSRkA== dependencies: "@babel/core" "^7.19.6" "@babel/plugin-transform-react-constant-elements" "^7.18.12" "@babel/preset-env" "^7.19.4" "@babel/preset-react" "^7.18.6" "@babel/preset-typescript" "^7.18.6" "@svgr/core" "^6.5.1" "@svgr/plugin-jsx" "^6.5.1" "@svgr/plugin-svgo" "^6.5.1" "@svgr/webpack@^8.1.0": version "8.1.0" resolved "https://registry.yarnpkg.com/@svgr/webpack/-/webpack-8.1.0.tgz#16f1b5346f102f89fda6ec7338b96a701d8be0c2" integrity sha512-LnhVjMWyMQV9ZmeEy26maJk+8HTIbd59cH4F2MJ439k9DqejRisfFNGAPvRYlKETuh9LrImlS8aKsBgKjMA8WA== dependencies: "@babel/core" "^7.21.3" "@babel/plugin-transform-react-constant-elements" "^7.21.3" "@babel/preset-env" "^7.20.2" "@babel/preset-react" "^7.18.6" "@babel/preset-typescript" "^7.21.0" "@svgr/core" "8.1.0" "@svgr/plugin-jsx" "8.1.0" "@svgr/plugin-svgo" "8.1.0" "@szmarczak/http-timer@^1.1.2": version "1.1.2" resolved "https://registry.npmjs.org/@szmarczak/http-timer/-/http-timer-1.1.2.tgz" integrity sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA== dependencies: defer-to-connect "^1.0.1" "@trysound/sax@0.2.0": version "0.2.0" resolved "https://registry.npmjs.org/@trysound/sax/-/sax-0.2.0.tgz" integrity sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA== "@types/body-parser@*": version "1.19.2" resolved "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz" integrity sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g== dependencies: "@types/connect" "*" "@types/node" "*" "@types/bonjour@^3.5.9": version "3.5.10" resolved "https://registry.npmjs.org/@types/bonjour/-/bonjour-3.5.10.tgz" integrity sha512-p7ienRMiS41Nu2/igbJxxLDWrSZ0WxM8UQgCeO9KhoVF7cOVFkrKsiDr1EsJIla8vV3oEEjGcz11jc5yimhzZw== dependencies: "@types/node" "*" "@types/concat-stream@^1.6.0": version "1.6.1" resolved "https://registry.yarnpkg.com/@types/concat-stream/-/concat-stream-1.6.1.tgz#24bcfc101ecf68e886aaedce60dfd74b632a1b74" integrity sha512-eHE4cQPoj6ngxBZMvVf6Hw7Mh4jMW4U9lpGmS5GBPB9RYxlFg+CHaVN7ErNY4W9XfLIEn20b4VDYaIrbq0q4uA== dependencies: "@types/node" "*" "@types/connect-history-api-fallback@^1.3.5": version "1.3.5" resolved "https://registry.npmjs.org/@types/connect-history-api-fallback/-/connect-history-api-fallback-1.3.5.tgz" integrity sha512-h8QJa8xSb1WD4fpKBDcATDNGXghFj6/3GRWG6dhmRcu0RX1Ubasur2Uvx5aeEwlf0MwblEC2bMzzMQntxnw/Cw== dependencies: "@types/express-serve-static-core" "*" "@types/node" "*" "@types/connect@*": version "3.4.35" resolved "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz" integrity sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ== dependencies: "@types/node" "*" "@types/eslint-scope@^3.7.3": version "3.7.4" resolved "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.4.tgz" integrity sha512-9K4zoImiZc3HlIp6AVUDE4CWYx22a+lhSZMYNpbjW04+YF0KWj4pJXnEMjdnFTiQibFFmElcsasJXDbdI/EPhA== dependencies: "@types/eslint" "*" "@types/estree" "*" "@types/eslint@*": version "8.4.6" resolved "https://registry.npmjs.org/@types/eslint/-/eslint-8.4.6.tgz" integrity sha512-/fqTbjxyFUaYNO7VcW5g+4npmqVACz1bB7RTHYuLj+PRjw9hrCwrUXVQFpChUS0JsyEFvMZ7U/PfmvWgxJhI9g== dependencies: "@types/estree" "*" "@types/json-schema" "*" "@types/estree@*", "@types/estree@^0.0.51": version "0.0.51" resolved "https://registry.npmjs.org/@types/estree/-/estree-0.0.51.tgz" integrity sha512-CuPgU6f3eT/XgKKPqKd/gLZV1Xmvf1a2R5POBOGQa6uv82xpls89HU5zKeVoyR8XzHd1RGNOlQlvUe3CFkjWNQ== "@types/express-serve-static-core@*", "@types/express-serve-static-core@^4.17.18": version "4.17.28" resolved "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.28.tgz" integrity sha512-P1BJAEAW3E2DJUlkgq4tOL3RyMunoWXqbSCygWo5ZIWTjUgN1YnaXWW4VWl/oc8vs/XoYibEGBKP0uZyF4AHig== dependencies: "@types/node" "*" "@types/qs" "*" "@types/range-parser" "*" "@types/express@*", "@types/express@^4.17.13": version "4.17.13" resolved "https://registry.npmjs.org/@types/express/-/express-4.17.13.tgz" integrity sha512-6bSZTPaTIACxn48l50SR+axgrqm6qXFIxrdAKaG6PaJk3+zuUr35hBlgT7vOmJcum+OEaIBLtHV/qloEAFITeA== dependencies: "@types/body-parser" "*" "@types/express-serve-static-core" "^4.17.18" "@types/qs" "*" "@types/serve-static" "*" "@types/form-data@0.0.33": version "0.0.33" resolved "https://registry.yarnpkg.com/@types/form-data/-/form-data-0.0.33.tgz#c9ac85b2a5fd18435b8c85d9ecb50e6d6c893ff8" integrity sha512-8BSvG1kGm83cyJITQMZSulnl6QV8jqAGreJsc5tPu1Jq0vTSOiY/k24Wx82JRpWwZSqrala6sd5rWi6aNXvqcw== dependencies: "@types/node" "*" "@types/hast@^2.0.0": version "2.3.4" resolved "https://registry.npmjs.org/@types/hast/-/hast-2.3.4.tgz" integrity sha512-wLEm0QvaoawEDoTRwzTXp4b4jpwiJDvR5KMnFnVodm3scufTlBOWRD6N1OBf9TZMhjlNsSfcO5V+7AF4+Vy+9g== dependencies: "@types/unist" "*" "@types/history@^4.7.11": version "4.7.11" resolved "https://registry.npmjs.org/@types/history/-/history-4.7.11.tgz" integrity sha512-qjDJRrmvBMiTx+jyLxvLfJU7UznFuokDv4f3WRuriHKERccVpFU+8XMQUAbDzoiJCsmexxRExQeMwwCdamSKDA== "@types/html-minifier-terser@^6.0.0": version "6.1.0" resolved "https://registry.npmjs.org/@types/html-minifier-terser/-/html-minifier-terser-6.1.0.tgz" integrity sha512-oh/6byDPnL1zeNXFrDXFLyZjkr1MsBG667IM792caf1L2UPOOMf65NFzjUH/ltyfwjAGfs1rsX1eftK0jC/KIg== "@types/http-proxy@^1.17.8": version "1.17.9" resolved "https://registry.npmjs.org/@types/http-proxy/-/http-proxy-1.17.9.tgz" integrity sha512-QsbSjA/fSk7xB+UXlCT3wHBy5ai9wOcNDWwZAtud+jXhwOM3l+EYZh8Lng4+/6n8uar0J7xILzqftJdJ/Wdfkw== dependencies: "@types/node" "*" "@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0": version "2.0.4" resolved "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz" integrity sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g== "@types/istanbul-lib-report@*": version "3.0.0" resolved "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz" integrity sha512-plGgXAPfVKFoYfa9NpYDAkseG+g6Jr294RqeqcqDixSbU34MZVJRi/P+7Y8GDpzkEwLaGZZOpKIEmeVZNtKsrg== dependencies: "@types/istanbul-lib-coverage" "*" "@types/istanbul-reports@^3.0.0": version "3.0.1" resolved "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.1.tgz" integrity sha512-c3mAZEuK0lvBp8tmuL74XRKn1+y2dcwOUpH7x4WrF6gk1GIgiluDRgMYQtw2OFcBvAJWlt6ASU3tSqxp0Uu0Aw== dependencies: "@types/istanbul-lib-report" "*" "@types/json-schema@*", "@types/json-schema@^7.0.4", "@types/json-schema@^7.0.5", "@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9": version "7.0.9" resolved "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz" integrity sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ== "@types/mdast@^3.0.0": version "3.0.10" resolved "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.10.tgz" integrity sha512-W864tg/Osz1+9f4lrGTZpCSO5/z4608eUp19tbozkq2HJK6i3z1kT0H9tlADXuYIb1YYOBByU4Jsqkk75q48qA== dependencies: "@types/unist" "*" "@types/mime@^1": version "1.3.2" resolved "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz" integrity sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw== "@types/node@*", "@types/node@^17.0.5": version "17.0.21" resolved "https://registry.npmjs.org/@types/node/-/node-17.0.21.tgz" integrity sha512-DBZCJbhII3r90XbQxI8Y9IjjiiOGlZ0Hr32omXIZvwwZ7p4DMMXGrKXVyPfuoBOri9XNtL0UK69jYIBIsRX3QQ== "@types/node@^10.0.3": version "10.17.60" resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.60.tgz#35f3d6213daed95da7f0f73e75bcc6980e90597b" integrity sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw== "@types/node@^8.0.0": version "8.10.66" resolved "https://registry.yarnpkg.com/@types/node/-/node-8.10.66.tgz#dd035d409df322acc83dff62a602f12a5783bbb3" integrity sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw== "@types/parse-json@^4.0.0": version "4.0.0" resolved "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz" integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA== "@types/parse5@^5.0.0": version "5.0.3" resolved "https://registry.npmjs.org/@types/parse5/-/parse5-5.0.3.tgz" integrity sha512-kUNnecmtkunAoQ3CnjmMkzNU/gtxG8guhi+Fk2U/kOpIKjIMKnXGp4IJCgQJrXSgMsWYimYG4TGjz/UzbGEBTw== "@types/prop-types@*": version "15.7.4" resolved "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.4.tgz" integrity sha512-rZ5drC/jWjrArrS8BR6SIr4cWpW09RNTYt9AMZo3Jwwif+iacXAqgVjm0B0Bv/S1jhDXKHqRVNCbACkJ89RAnQ== "@types/qs@*", "@types/qs@^6.2.31": version "6.9.7" resolved "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz" integrity sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw== "@types/range-parser@*": version "1.2.4" resolved "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.4.tgz" integrity sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw== "@types/react-router-config@*", "@types/react-router-config@^5.0.6": version "5.0.6" resolved "https://registry.npmjs.org/@types/react-router-config/-/react-router-config-5.0.6.tgz" integrity sha512-db1mx37a1EJDf1XeX8jJN7R3PZABmJQXR8r28yUjVMFSjkmnQo6X6pOEEmNl+Tp2gYQOGPdYbFIipBtdElZ3Yg== dependencies: "@types/history" "^4.7.11" "@types/react" "*" "@types/react-router" "*" "@types/react-router-dom@*": version "5.3.3" resolved "https://registry.npmjs.org/@types/react-router-dom/-/react-router-dom-5.3.3.tgz" integrity sha512-kpqnYK4wcdm5UaWI3fLcELopqLrHgLqNsdpHauzlQktfkHL3npOSwtj1Uz9oKBAzs7lFtVkV8j83voAz2D8fhw== dependencies: "@types/history" "^4.7.11" "@types/react" "*" "@types/react-router" "*" "@types/react-router@*": version "5.1.18" resolved "https://registry.npmjs.org/@types/react-router/-/react-router-5.1.18.tgz" integrity sha512-YYknwy0D0iOwKQgz9v8nOzt2J6l4gouBmDnWqUUznltOTaon+r8US8ky8HvN0tXvc38U9m6z/t2RsVsnd1zM0g== dependencies: "@types/history" "^4.7.11" "@types/react" "*" "@types/react@*": version "17.0.38" resolved "https://registry.npmjs.org/@types/react/-/react-17.0.38.tgz" integrity sha512-SI92X1IA+FMnP3qM5m4QReluXzhcmovhZnLNm3pyeQlooi02qI7sLiepEYqT678uNiyc25XfCqxREFpy3W7YhQ== dependencies: "@types/prop-types" "*" "@types/scheduler" "*" csstype "^3.0.2" "@types/retry@^0.12.0": version "0.12.1" resolved "https://registry.npmjs.org/@types/retry/-/retry-0.12.1.tgz" integrity sha512-xoDlM2S4ortawSWORYqsdU+2rxdh4LRW9ytc3zmT37RIKQh6IHyKwwtKhKis9ah8ol07DCkZxPt8BBvPjC6v4g== "@types/sax@^1.2.1": version "1.2.3" resolved "https://registry.npmjs.org/@types/sax/-/sax-1.2.3.tgz" integrity sha512-+QSw6Tqvs/KQpZX8DvIl3hZSjNFLW/OqE5nlyHXtTwODaJvioN2rOWpBNEWZp2HZUFhOh+VohmJku/WxEXU2XA== dependencies: "@types/node" "*" "@types/scheduler@*": version "0.16.2" resolved "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.2.tgz" integrity sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew== "@types/serve-index@^1.9.1": version "1.9.1" resolved "https://registry.npmjs.org/@types/serve-index/-/serve-index-1.9.1.tgz" integrity sha512-d/Hs3nWDxNL2xAczmOVZNj92YZCS6RGxfBPjKzuu/XirCgXdpKEb88dYNbrYGint6IVWLNP+yonwVAuRC0T2Dg== dependencies: "@types/express" "*" "@types/serve-static@*", "@types/serve-static@^1.13.10": version "1.13.10" resolved "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.13.10.tgz" integrity sha512-nCkHGI4w7ZgAdNkrEu0bv+4xNV/XDqW+DydknebMOQwkpDGx8G+HTlj7R7ABI8i8nKxVw0wtKPi1D+lPOkh4YQ== dependencies: "@types/mime" "^1" "@types/node" "*" "@types/sockjs@^0.3.33": version "0.3.33" resolved "https://registry.npmjs.org/@types/sockjs/-/sockjs-0.3.33.tgz" integrity sha512-f0KEEe05NvUnat+boPTZ0dgaLZ4SfSouXUgv5noUiefG2ajgKjmETo9ZJyuqsl7dfl2aHlLJUiki6B4ZYldiiw== dependencies: "@types/node" "*" "@types/unist@*", "@types/unist@^2.0.0", "@types/unist@^2.0.2", "@types/unist@^2.0.3": version "2.0.6" resolved "https://registry.npmjs.org/@types/unist/-/unist-2.0.6.tgz" integrity sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ== "@types/ws@^8.5.1": version "8.5.3" resolved "https://registry.npmjs.org/@types/ws/-/ws-8.5.3.tgz" integrity sha512-6YOoWjruKj1uLf3INHH7D3qTXwFfEsg1kf3c0uDdSBJwfa/llkwIjrAGV7j7mVgGNbzTQ3HiHKKDXl6bJPD97w== dependencies: "@types/node" "*" "@types/yargs-parser@*": version "21.0.0" resolved "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.0.tgz" integrity sha512-iO9ZQHkZxHn4mSakYV0vFHAVDyEOIJQrV2uZ06HxEPcx+mt8swXoZHIbaaJ2crJYFfErySgktuTZ3BeLz+XmFA== "@types/yargs@^17.0.8": version "17.0.13" resolved "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.13.tgz" integrity sha512-9sWaruZk2JGxIQU+IhI1fhPYRcQ0UuTNuKuCW9bR5fp7qi2Llf7WDzNa17Cy7TKnh3cdxDOiyTu6gaLS0eDatg== dependencies: "@types/yargs-parser" "*" "@webassemblyjs/ast@1.11.1": version "1.11.1" resolved "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz" integrity sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw== dependencies: "@webassemblyjs/helper-numbers" "1.11.1" "@webassemblyjs/helper-wasm-bytecode" "1.11.1" "@webassemblyjs/floating-point-hex-parser@1.11.1": version "1.11.1" resolved "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz" integrity sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ== "@webassemblyjs/helper-api-error@1.11.1": version "1.11.1" resolved "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz" integrity sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg== "@webassemblyjs/helper-buffer@1.11.1": version "1.11.1" resolved "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz" integrity sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA== "@webassemblyjs/helper-numbers@1.11.1": version "1.11.1" resolved "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz" integrity sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ== dependencies: "@webassemblyjs/floating-point-hex-parser" "1.11.1" "@webassemblyjs/helper-api-error" "1.11.1" "@xtuc/long" "4.2.2" "@webassemblyjs/helper-wasm-bytecode@1.11.1": version "1.11.1" resolved "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz" integrity sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q== "@webassemblyjs/helper-wasm-section@1.11.1": version "1.11.1" resolved "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz" integrity sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg== dependencies: "@webassemblyjs/ast" "1.11.1" "@webassemblyjs/helper-buffer" "1.11.1" "@webassemblyjs/helper-wasm-bytecode" "1.11.1" "@webassemblyjs/wasm-gen" "1.11.1" "@webassemblyjs/ieee754@1.11.1": version "1.11.1" resolved "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz" integrity sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ== dependencies: "@xtuc/ieee754" "^1.2.0" "@webassemblyjs/leb128@1.11.1": version "1.11.1" resolved "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.1.tgz" integrity sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw== dependencies: "@xtuc/long" "4.2.2" "@webassemblyjs/utf8@1.11.1": version "1.11.1" resolved "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.1.tgz" integrity sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ== "@webassemblyjs/wasm-edit@1.11.1": version "1.11.1" resolved "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz" integrity sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA== dependencies: "@webassemblyjs/ast" "1.11.1" "@webassemblyjs/helper-buffer" "1.11.1" "@webassemblyjs/helper-wasm-bytecode" "1.11.1" "@webassemblyjs/helper-wasm-section" "1.11.1" "@webassemblyjs/wasm-gen" "1.11.1" "@webassemblyjs/wasm-opt" "1.11.1" "@webassemblyjs/wasm-parser" "1.11.1" "@webassemblyjs/wast-printer" "1.11.1" "@webassemblyjs/wasm-gen@1.11.1": version "1.11.1" resolved "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz" integrity sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA== dependencies: "@webassemblyjs/ast" "1.11.1" "@webassemblyjs/helper-wasm-bytecode" "1.11.1" "@webassemblyjs/ieee754" "1.11.1" "@webassemblyjs/leb128" "1.11.1" "@webassemblyjs/utf8" "1.11.1" "@webassemblyjs/wasm-opt@1.11.1": version "1.11.1" resolved "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz" integrity sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw== dependencies: "@webassemblyjs/ast" "1.11.1" "@webassemblyjs/helper-buffer" "1.11.1" "@webassemblyjs/wasm-gen" "1.11.1" "@webassemblyjs/wasm-parser" "1.11.1" "@webassemblyjs/wasm-parser@1.11.1": version "1.11.1" resolved "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz" integrity sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA== dependencies: "@webassemblyjs/ast" "1.11.1" "@webassemblyjs/helper-api-error" "1.11.1" "@webassemblyjs/helper-wasm-bytecode" "1.11.1" "@webassemblyjs/ieee754" "1.11.1" "@webassemblyjs/leb128" "1.11.1" "@webassemblyjs/utf8" "1.11.1" "@webassemblyjs/wast-printer@1.11.1": version "1.11.1" resolved "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz" integrity sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg== dependencies: "@webassemblyjs/ast" "1.11.1" "@xtuc/long" "4.2.2" "@xtuc/ieee754@^1.2.0": version "1.2.0" resolved "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz" integrity sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA== "@xtuc/long@4.2.2": version "4.2.2" resolved "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz" integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== JSONStream@~1.3.1: version "1.3.5" resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.5.tgz#3208c1f08d3a4d99261ab64f92302bc15e111ca0" integrity sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ== dependencies: jsonparse "^1.2.0" through ">=2.2.7 <3" abbrev@1, abbrev@^1.0.0, abbrev@~1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" integrity sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q== accepts@~1.3.4, accepts@~1.3.5: version "1.3.7" resolved "https://registry.npmjs.org/accepts/-/accepts-1.3.7.tgz" integrity sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA== dependencies: mime-types "~2.1.24" negotiator "0.6.2" accepts@~1.3.8: version "1.3.8" resolved "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz" integrity sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw== dependencies: mime-types "~2.1.34" negotiator "0.6.3" acorn-import-assertions@^1.7.6: version "1.8.0" resolved "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz" integrity sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw== acorn-walk@^8.0.0: version "8.2.0" resolved "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz" integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== acorn@^8.0.4, acorn@^8.5.0, acorn@^8.7.1: version "8.7.1" resolved "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz" integrity sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A== address@^1.0.1, address@^1.1.2: version "1.1.2" resolved "https://registry.npmjs.org/address/-/address-1.1.2.tgz" integrity sha512-aT6camzM4xEA54YVJYSqxz1kv4IHnQZRtThJJHhUMRExaU5spC7jX5ugSwTaTgJliIgs4VhZOk7htClvQ/LmRA== agent-base@4, agent-base@^4.1.0, agent-base@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.3.0.tgz#8165f01c436009bccad0b1d122f05ed770efc6ee" integrity sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg== dependencies: es6-promisify "^5.0.0" agentkeepalive@^3.3.0: version "3.5.2" resolved "https://registry.yarnpkg.com/agentkeepalive/-/agentkeepalive-3.5.2.tgz#a113924dd3fa24a0bc3b78108c450c2abee00f67" integrity sha512-e0L/HNe6qkQ7H19kTlRRqUibEAwDK5AFk6y3PtMsuut2VAH6+Q4xZml1tNDJD7kSAyqmbG/K08K5WEJYtUrSlQ== dependencies: humanize-ms "^1.2.1" aggregate-error@^3.0.0: version "3.1.0" resolved "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz" integrity sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA== dependencies: clean-stack "^2.0.0" indent-string "^4.0.0" ajv-formats@^2.1.1: version "2.1.1" resolved "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz" integrity sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA== dependencies: ajv "^8.0.0" ajv-keywords@^3.4.1, ajv-keywords@^3.5.2: version "3.5.2" resolved "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz" integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== ajv-keywords@^5.0.0: version "5.1.0" resolved "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-5.1.0.tgz" integrity sha512-YCS/JNFAUyr5vAuhk1DWm1CBxRHW9LbJ2ozWeemrIqpbsqKjHVxYPyi5GC0rjZIT5JxJ3virVTS8wk4i/Z+krw== dependencies: fast-deep-equal "^3.1.3" ajv@^4.9.1: version "4.11.8" resolved "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz" integrity sha512-I/bSHSNEcFFqXLf91nchoNB9D1Kie3QKcWdchYUaoIg1+1bdWDkdfdlvdIOJbi9U8xR0y+MWc5D+won9v95WlQ== dependencies: co "^4.6.0" json-stable-stringify "^1.0.1" ajv@^6.12.2, ajv@^6.12.4, ajv@^6.12.5: version "6.12.6" resolved "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== dependencies: fast-deep-equal "^3.1.1" fast-json-stable-stringify "^2.0.0" json-schema-traverse "^0.4.1" uri-js "^4.2.2" ajv@^8.0.0, ajv@^8.8.0: version "8.11.0" resolved "https://registry.npmjs.org/ajv/-/ajv-8.11.0.tgz" integrity sha512-wGgprdCvMalC0BztXvitD2hC04YffAvtsUn93JbGXYLAtCUO4xd17mCCZQxUOItiBwZvJScWo8NIvQMQ71rdpg== dependencies: fast-deep-equal "^3.1.1" json-schema-traverse "^1.0.0" require-from-string "^2.0.2" uri-js "^4.2.2" algoliasearch-helper@^3.10.0: version "3.10.0" resolved "https://registry.npmjs.org/algoliasearch-helper/-/algoliasearch-helper-3.10.0.tgz" integrity sha512-4E4od8qWWDMVvQ3jaRX6Oks/k35ywD011wAA4LbYMMjOtaZV6VWaTjRr4iN2bdaXP2o1BP7SLFMBf3wvnHmd8Q== dependencies: "@algolia/events" "^4.0.1" algoliasearch@^4.0.0: version "4.11.0" resolved "https://registry.npmjs.org/algoliasearch/-/algoliasearch-4.11.0.tgz" integrity sha512-IXRj8kAP2WrMmj+eoPqPc6P7Ncq1yZkFiyDrjTBObV1ADNL8Z/KdZ+dWC5MmYcBLAbcB/mMCpak5N/D1UIZvsA== dependencies: "@algolia/cache-browser-local-storage" "4.11.0" "@algolia/cache-common" "4.11.0" "@algolia/cache-in-memory" "4.11.0" "@algolia/client-account" "4.11.0" "@algolia/client-analytics" "4.11.0" "@algolia/client-common" "4.11.0" "@algolia/client-personalization" "4.11.0" "@algolia/client-search" "4.11.0" "@algolia/logger-common" "4.11.0" "@algolia/logger-console" "4.11.0" "@algolia/requester-browser-xhr" "4.11.0" "@algolia/requester-common" "4.11.0" "@algolia/requester-node-http" "4.11.0" "@algolia/transporter" "4.11.0" algoliasearch@^4.13.1: version "4.13.1" resolved "https://registry.npmjs.org/algoliasearch/-/algoliasearch-4.13.1.tgz" integrity sha512-dtHUSE0caWTCE7liE1xaL+19AFf6kWEcyn76uhcitWpntqvicFHXKFoZe5JJcv9whQOTRM6+B8qJz6sFj+rDJA== dependencies: "@algolia/cache-browser-local-storage" "4.13.1" "@algolia/cache-common" "4.13.1" "@algolia/cache-in-memory" "4.13.1" "@algolia/client-account" "4.13.1" "@algolia/client-analytics" "4.13.1" "@algolia/client-common" "4.13.1" "@algolia/client-personalization" "4.13.1" "@algolia/client-search" "4.13.1" "@algolia/logger-common" "4.13.1" "@algolia/logger-console" "4.13.1" "@algolia/requester-browser-xhr" "4.13.1" "@algolia/requester-common" "4.13.1" "@algolia/requester-node-http" "4.13.1" "@algolia/transporter" "4.13.1" ansi-align@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/ansi-align/-/ansi-align-2.0.0.tgz" integrity sha512-TdlOggdA/zURfMYa7ABC66j+oqfMew58KpJMbUlH3bcZP1b+cBHIHDDn5uH9INsxrHBPjsqM0tDB4jPTF/vgJA== dependencies: string-width "^2.0.0" ansi-align@^3.0.0, ansi-align@^3.0.1: version "3.0.1" resolved "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz" integrity sha512-IOfwwBF5iczOjp/WeY4YxyjqAFMQoZufdQWDd19SEExbVLNXqvpzSJ/M7Za4/sCPmQ0+GRquoA7bGcINcxew6w== dependencies: string-width "^4.1.0" ansi-html-community@^0.0.8: version "0.0.8" resolved "https://registry.npmjs.org/ansi-html-community/-/ansi-html-community-0.0.8.tgz" integrity sha512-1APHAyr3+PCamwNw3bXCPp4HFLONZt/yIH0sZp0/469KWNTEy+qN5jQ3GVX6DMZ1UXAi34yVwtTeaG/HpBuuzw== ansi-regex@^2.0.0: version "2.1.1" resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz" integrity sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA== ansi-regex@^3.0.0, ansi-regex@~3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.1.tgz#123d6479e92ad45ad897d4054e3c7ca7db4944e1" integrity sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw== ansi-regex@^5.0.1: version "5.0.1" resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz" integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== ansi-regex@^6.0.1: version "6.0.1" resolved "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz" integrity sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA== ansi-sequence-parser@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/ansi-sequence-parser/-/ansi-sequence-parser-1.1.0.tgz#4d790f31236ac20366b23b3916b789e1bde39aed" integrity sha512-lEm8mt52to2fT8GhciPCGeCXACSz2UwIN4X2e2LJSnZ5uAbn2/dsYdOmUXq0AtWS5cpAupysIneExOgH0Vd2TQ== ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz" integrity sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA== ansi-styles@^3.2.1: version "3.2.1" resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz" integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== dependencies: color-convert "^1.9.0" ansi-styles@^4.0.0, ansi-styles@^4.1.0: version "4.3.0" resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz" integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== dependencies: color-convert "^2.0.1" ansi-styles@^6.1.0: version "6.1.0" resolved "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.1.0.tgz" integrity sha512-VbqNsoz55SYGczauuup0MFUyXNQviSpFTj1RQtFzmQLk18qbVSpTFFGMT293rmDaQuKCT6InmbuEyUne4mTuxQ== ansicolors@~0.3.2: version "0.3.2" resolved "https://registry.npmjs.org/ansicolors/-/ansicolors-0.3.2.tgz" integrity sha512-QXu7BPrP29VllRxH8GwB7x5iX5qWKAAMLqKQGWTeLWVlNHNOpVMJ91dsxQAIWXpjuW5wqvxu3Jd/nRjrJ+0pqg== ansistyles@~0.1.3: version "0.1.3" resolved "https://registry.npmjs.org/ansistyles/-/ansistyles-0.1.3.tgz" integrity sha512-6QWEyvMgIXX0eO972y7YPBLSBsq7UWKFAoNNTLGaOJ9bstcEL9sCbcjf96dVfNDdUsRoGOK82vWFJlKApXds7g== anymatch@~3.1.2: version "3.1.2" resolved "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz" integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg== dependencies: normalize-path "^3.0.0" picomatch "^2.0.4" aproba@^1.0.3, aproba@~1.1.2: version "1.1.2" resolved "https://registry.npmjs.org/aproba/-/aproba-1.1.2.tgz" integrity sha512-ZpYajIfO0j2cOFTO955KUMIKNmj6zhX8kVztMAxFsDaMwz+9Z9SV0uou2pC9HJqcfpffOsjnbrDMvkNy+9RXPw== aproba@^1.1.1: version "1.2.0" resolved "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz" integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== archy@~1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz" integrity sha512-Xg+9RwCg/0p32teKdGMPTPnVXKD0w3DfHnFTficozsAgsvq2XenPJq/MYpzzQ/v8zrOyJn6Ds39VA4JIDwFfqw== are-we-there-yet@~1.1.2: version "1.1.7" resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.7.tgz#b15474a932adab4ff8a50d9adfa7e4e926f21146" integrity sha512-nxwy40TuMiUGqMyRHgCSWZ9FM4VAoRP4xUYSTv5ImRog+h9yISPbVH7H8fASCIzYn9wlEv4zvFL7uKDMCFQm3g== dependencies: delegates "^1.0.0" readable-stream "^2.0.6" arg@^5.0.0: version "5.0.1" resolved "https://registry.npmjs.org/arg/-/arg-5.0.1.tgz" integrity sha512-e0hDa9H2Z9AwFkk2qDlwhoMYE4eToKarchkQHovNdLTCYMHZHeRjI71crOh+dio4K6u1IcwubQqo79Ga4CyAQA== argparse@^1.0.7: version "1.0.10" resolved "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz" integrity sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg== dependencies: sprintf-js "~1.0.2" argparse@^2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz" integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== array-each@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/array-each/-/array-each-1.0.1.tgz#a794af0c05ab1752846ee753a1f211a05ba0c44f" integrity sha512-zHjL5SZa68hkKHBFBK6DJCTtr9sfTCPCaph/L7tMSLcTFgy+zX7E+6q5UArbtOtMBCtxdICpfTCspRse+ywyXA== array-flatten@1.1.1: version "1.1.1" resolved "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz" integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= array-flatten@^2.1.2: version "2.1.2" resolved "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.2.tgz" integrity sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ== array-slice@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/array-slice/-/array-slice-1.1.0.tgz#e368ea15f89bc7069f7ffb89aec3a6c7d4ac22d4" integrity sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w== array-union@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz" integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== asap@^2.0.0, asap@~2.0.3, asap@~2.0.6: version "2.0.6" resolved "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz" integrity sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY= asn1@~0.2.3: version "0.2.6" resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.6.tgz#0d3a7bb6e64e02a90c0303b31f292868ea09a08d" integrity sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ== dependencies: safer-buffer "~2.1.0" assert-plus@1.0.0, assert-plus@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz" integrity sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw== assert-plus@^0.2.0: version "0.2.0" resolved "https://registry.npmjs.org/assert-plus/-/assert-plus-0.2.0.tgz" integrity sha512-u1L0ZLywRziOVjUhRxI0Qg9G+4RnFB9H/Rq40YWn0dieDgO7vAYeJz6jKAO6t/aruzlDFLAPkQTT87e+f8Imaw== assert@1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/assert/-/assert-1.4.1.tgz#99912d591836b5a6f5b345c0f07eefc08fc65d91" integrity sha512-N+aAxov+CKVS3JuhDIQFr24XvZvwE96Wlhk9dytTg/GmwWoghdOvR8dspx8MVz71O+Y0pA3UPqHF68D6iy8UvQ== dependencies: util "0.10.3" async-limiter@~1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd" integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ== async@^2.6.0: version "2.6.4" resolved "https://registry.yarnpkg.com/async/-/async-2.6.4.tgz#706b7ff6084664cd7eae713f6f965433b5504221" integrity sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA== dependencies: lodash "^4.17.14" async@^3.2.0, async@^3.2.3, async@~3.2.0: version "3.2.4" resolved "https://registry.yarnpkg.com/async/-/async-3.2.4.tgz#2d22e00f8cddeb5fde5dd33522b56d1cf569a81c" integrity sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ== asynckit@^0.4.0: version "0.4.0" resolved "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz" integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== at-least-node@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz" integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== autoprefixer@^10.3.7, autoprefixer@^10.4.7: version "10.4.7" resolved "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.7.tgz" integrity sha512-ypHju4Y2Oav95SipEcCcI5J7CGPuvz8oat7sUtYj3ClK44bldfvtvcxK6IEK++7rqB7YchDGzweZIBG+SD0ZAA== dependencies: browserslist "^4.20.3" caniuse-lite "^1.0.30001335" fraction.js "^4.2.0" normalize-range "^0.1.2" picocolors "^1.0.0" postcss-value-parser "^4.2.0" aws-sign2@~0.6.0: version "0.6.0" resolved "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.6.0.tgz" integrity sha512-JnJpAS0p9RmixkOvW2XwDxxzs1bd4/VAGIl6Q0EC5YOo+p+hqIhtDhn/nmFnB/xUNXbLkpE2mOjgVIBRKD4xYw== aws4@^1.2.1: version "1.11.0" resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59" integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA== axios@^0.25.0: version "0.25.0" resolved "https://registry.npmjs.org/axios/-/axios-0.25.0.tgz" integrity sha512-cD8FOb0tRH3uuEe6+evtAbgJtfxr7ly3fQjYcMcuPlgkwVS9xboaVIpcDV+cYQe+yGykgwZCs1pzjntcGa6l5g== dependencies: follow-redirects "^1.14.7" babel-loader@^8.2.5: version "8.2.5" resolved "https://registry.npmjs.org/babel-loader/-/babel-loader-8.2.5.tgz" integrity sha512-OSiFfH89LrEMiWd4pLNqGz4CwJDtbs2ZVc+iGu2HrkRfPxId9F2anQj38IxWpmRfsUY0aBZYi1EFcd3mhtRMLQ== dependencies: find-cache-dir "^3.3.1" loader-utils "^2.0.0" make-dir "^3.1.0" schema-utils "^2.6.5" babel-plugin-apply-mdx-type-prop@1.6.22: version "1.6.22" resolved "https://registry.npmjs.org/babel-plugin-apply-mdx-type-prop/-/babel-plugin-apply-mdx-type-prop-1.6.22.tgz" integrity sha512-VefL+8o+F/DfK24lPZMtJctrCVOfgbqLAGZSkxwhazQv4VxPg3Za/i40fu22KR2m8eEda+IfSOlPLUSIiLcnCQ== dependencies: "@babel/helper-plugin-utils" "7.10.4" "@mdx-js/util" "1.6.22" babel-plugin-dynamic-import-node@^2.3.3: version "2.3.3" resolved "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz" integrity sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ== dependencies: object.assign "^4.1.0" babel-plugin-extract-import-names@1.6.22: version "1.6.22" resolved "https://registry.npmjs.org/babel-plugin-extract-import-names/-/babel-plugin-extract-import-names-1.6.22.tgz" integrity sha512-yJ9BsJaISua7d8zNT7oRG1ZLBJCIdZ4PZqmH8qa9N5AK01ifk3fnkc98AXhtzE7UkfCsEumvoQWgoYLhOnJ7jQ== dependencies: "@babel/helper-plugin-utils" "7.10.4" babel-plugin-polyfill-corejs2@^0.3.1: version "0.3.1" resolved "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.1.tgz" integrity sha512-v7/T6EQcNfVLfcN2X8Lulb7DjprieyLWJK/zOWH5DUYcAgex9sP3h25Q+DLsX9TloXe3y1O8l2q2Jv9q8UVB9w== dependencies: "@babel/compat-data" "^7.13.11" "@babel/helper-define-polyfill-provider" "^0.3.1" semver "^6.1.1" babel-plugin-polyfill-corejs2@^0.4.3: version "0.4.3" resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.3.tgz#75044d90ba5043a5fb559ac98496f62f3eb668fd" integrity sha512-bM3gHc337Dta490gg+/AseNB9L4YLHxq1nGKZZSHbhXv4aTYU2MD2cjza1Ru4S6975YLTaL1K8uJf6ukJhhmtw== dependencies: "@babel/compat-data" "^7.17.7" "@babel/helper-define-polyfill-provider" "^0.4.0" semver "^6.1.1" babel-plugin-polyfill-corejs3@^0.5.2: version "0.5.2" resolved "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.5.2.tgz" integrity sha512-G3uJih0XWiID451fpeFaYGVuxHEjzKTHtc9uGFEjR6hHrvNzeS/PX+LLLcetJcytsB5m4j+K3o/EpXJNb/5IEQ== dependencies: "@babel/helper-define-polyfill-provider" "^0.3.1" core-js-compat "^3.21.0" babel-plugin-polyfill-corejs3@^0.8.1: version "0.8.1" resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.8.1.tgz#39248263c38191f0d226f928d666e6db1b4b3a8a" integrity sha512-ikFrZITKg1xH6pLND8zT14UPgjKHiGLqex7rGEZCH2EvhsneJaJPemmpQaIZV5AL03II+lXylw3UmddDK8RU5Q== dependencies: "@babel/helper-define-polyfill-provider" "^0.4.0" core-js-compat "^3.30.1" babel-plugin-polyfill-regenerator@^0.3.1: version "0.3.1" resolved "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.3.1.tgz" integrity sha512-Y2B06tvgHYt1x0yz17jGkGeeMr5FeKUu+ASJ+N6nB5lQ8Dapfg42i0OVrf8PNGJ3zKL4A23snMi1IRwrqqND7A== dependencies: "@babel/helper-define-polyfill-provider" "^0.3.1" babel-plugin-polyfill-regenerator@^0.5.0: version "0.5.0" resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.5.0.tgz#e7344d88d9ef18a3c47ded99362ae4a757609380" integrity sha512-hDJtKjMLVa7Z+LwnTCxoDLQj6wdc+B8dun7ayF2fYieI6OzfuvcLMB32ihJZ4UhCBwNYGl5bg/x/P9cMdnkc2g== dependencies: "@babel/helper-define-polyfill-provider" "^0.4.0" bail@^1.0.0: version "1.0.5" resolved "https://registry.npmjs.org/bail/-/bail-1.0.5.tgz" integrity sha512-xFbRxM1tahm08yHBP16MMjVUAvDaBMD38zsM9EMAUN61omwLmKlOpB/Zku5QkjZ8TZ4vn53pj+t518cH0S03RQ== balanced-match@^1.0.0: version "1.0.2" resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz" integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== base16@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/base16/-/base16-1.0.0.tgz" integrity sha1-4pf2DX7BAUp6lxo568ipjAtoHnA= basic-auth@~2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/basic-auth/-/basic-auth-2.0.1.tgz#b998279bf47ce38344b4f3cf916d4679bbf51e3a" integrity sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg== dependencies: safe-buffer "5.1.2" batch@0.6.1: version "0.6.1" resolved "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz" integrity sha1-3DQxT05nkxgJP8dgJyUl+UvyXBY= bcrypt-pbkdf@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" integrity sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w== dependencies: tweetnacl "^0.14.3" big.js@^5.2.2: version "5.2.2" resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" integrity sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ== binary-extensions@^2.0.0: version "2.2.0" resolved "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz" integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== bl@^1.0.0: version "1.2.3" resolved "https://registry.yarnpkg.com/bl/-/bl-1.2.3.tgz#1e8dd80142eac80d7158c9dccc047fb620e035e7" integrity sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww== dependencies: readable-stream "^2.3.5" safe-buffer "^5.1.1" block-stream@*: version "0.0.9" resolved "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz" integrity sha512-OorbnJVPII4DuUKbjARAe8u8EfqOmkEEaSFIyoQ7OjTHn6kafxWl0wLgoZ2rXaYd7MyLcDaU4TmhfxtwgcccMQ== dependencies: inherits "~2.0.0" bluebird@^3.5.0, bluebird@^3.5.1: version "3.7.2" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== bluebird@~3.5.0: version "3.5.5" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.5.tgz#a8d0afd73251effbbd5fe384a77d73003c17a71f" integrity sha512-5am6HnnfN+urzt4yfg7IgTbotDjIT/u8AJpEt0sIU9FtXfVeezXAPKswrG+xKUCOYAINpSdgZVDU6QFh+cuH3w== body-parser@1.20.0: version "1.20.0" resolved "https://registry.npmjs.org/body-parser/-/body-parser-1.20.0.tgz" integrity sha512-DfJ+q6EPcGKZD1QWUjSpqp+Q7bDQTsQIF4zfUAtZ6qk+H/3/QRhg9CEp39ss+/T2vw0+HaidC0ecJj/DRLIaKg== dependencies: bytes "3.1.2" content-type "~1.0.4" debug "2.6.9" depd "2.0.0" destroy "1.2.0" http-errors "2.0.0" iconv-lite "0.4.24" on-finished "2.4.1" qs "6.10.3" raw-body "2.5.1" type-is "~1.6.18" unpipe "1.0.0" body@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/body/-/body-5.1.0.tgz#e4ba0ce410a46936323367609ecb4e6553125069" integrity sha512-chUsBxGRtuElD6fmw1gHLpvnKdVLK302peeFa9ZqAEk8TyzZ3fygLyUEDDPTJvL9+Bor0dIwn6ePOsRM2y0zQQ== dependencies: continuable-cache "^0.3.1" error "^7.0.0" raw-body "~1.1.0" safe-json-parse "~1.0.1" bonjour-service@^1.0.11: version "1.0.12" resolved "https://registry.npmjs.org/bonjour-service/-/bonjour-service-1.0.12.tgz" integrity sha512-pMmguXYCu63Ug37DluMKEHdxc+aaIf/ay4YbF8Gxtba+9d3u+rmEWy61VK3Z3hp8Rskok3BunHYnG0dUHAsblw== dependencies: array-flatten "^2.1.2" dns-equal "^1.0.0" fast-deep-equal "^3.1.3" multicast-dns "^7.2.4" boolbase@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz" integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24= boom@2.x.x: version "2.10.1" resolved "https://registry.npmjs.org/boom/-/boom-2.10.1.tgz" integrity sha512-KbiZEa9/vofNcVJXGwdWWn25reQ3V3dHBWbS07FTF3/TOehLnm9GEhJV4T6ZvGPkShRpmUqYwnaCrkj0mRnP6Q== dependencies: hoek "2.x.x" boxen@^1.0.0, boxen@^1.2.1: version "1.3.0" resolved "https://registry.npmjs.org/boxen/-/boxen-1.3.0.tgz" integrity sha512-TNPjfTr432qx7yOjQyaXm3dSR0MH9vXp7eT1BFSl/C51g+EFnOR9hTg1IreahGBmDNCehscshe45f+C1TBZbLw== dependencies: ansi-align "^2.0.0" camelcase "^4.0.0" chalk "^2.0.1" cli-boxes "^1.0.0" string-width "^2.0.0" term-size "^1.2.0" widest-line "^2.0.0" boxen@^5.0.0: version "5.1.2" resolved "https://registry.npmjs.org/boxen/-/boxen-5.1.2.tgz" integrity sha512-9gYgQKXx+1nP8mP7CzFyaUARhg7D3n1dF/FnErWmu9l6JvGpNUN278h0aSb+QjoiKSWG+iZ3uHrcqk0qrY9RQQ== dependencies: ansi-align "^3.0.0" camelcase "^6.2.0" chalk "^4.1.0" cli-boxes "^2.2.1" string-width "^4.2.2" type-fest "^0.20.2" widest-line "^3.1.0" wrap-ansi "^7.0.0" boxen@^6.2.1: version "6.2.1" resolved "https://registry.npmjs.org/boxen/-/boxen-6.2.1.tgz" integrity sha512-H4PEsJXfFI/Pt8sjDWbHlQPx4zL/bvSQjcilJmaulGt5mLDorHOHpmdXAJcBcmru7PhYSp/cDMWRko4ZUMFkSw== dependencies: ansi-align "^3.0.1" camelcase "^6.2.0" chalk "^4.1.2" cli-boxes "^3.0.0" string-width "^5.0.1" type-fest "^2.5.0" widest-line "^4.0.1" wrap-ansi "^8.0.1" brace-expansion@^1.1.7: version "1.1.11" resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz" integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== dependencies: balanced-match "^1.0.0" concat-map "0.0.1" brace-expansion@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== dependencies: balanced-match "^1.0.0" braces@^3.0.1, braces@^3.0.2, braces@~3.0.2: version "3.0.2" resolved "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz" integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== dependencies: fill-range "^7.0.1" browserslist@^4.0.0, browserslist@^4.14.5, browserslist@^4.16.6, browserslist@^4.18.1, browserslist@^4.20.3, browserslist@^4.21.0, browserslist@^4.21.3: version "4.21.4" resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.21.4.tgz" integrity sha512-CBHJJdDmgjl3daYjN5Cp5kbTf1mUhZoS+beLklHIvkOWscs83YAhLlF3Wsh/lciQYAcbBJgTOD44VtG31ZM4Hw== dependencies: caniuse-lite "^1.0.30001400" electron-to-chromium "^1.4.251" node-releases "^2.0.6" update-browserslist-db "^1.0.9" browserslist@^4.21.5: version "4.21.7" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.7.tgz#e2b420947e5fb0a58e8f4668ae6e23488127e551" integrity sha512-BauCXrQ7I2ftSqd2mvKHGo85XR0u7Ru3C/Hxsy/0TkfCtjrmAbPdzLGasmoiBxplpDXlPvdjX9u7srIMfgasNA== dependencies: caniuse-lite "^1.0.30001489" electron-to-chromium "^1.4.411" node-releases "^2.0.12" update-browserslist-db "^1.0.11" buffer-alloc-unsafe@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz#bd7dc26ae2972d0eda253be061dba992349c19f0" integrity sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg== buffer-alloc@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/buffer-alloc/-/buffer-alloc-1.2.0.tgz#890dd90d923a873e08e10e5fd51a57e5b7cce0ec" integrity sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow== dependencies: buffer-alloc-unsafe "^1.1.0" buffer-fill "^1.0.0" buffer-fill@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/buffer-fill/-/buffer-fill-1.0.0.tgz#f8f78b76789888ef39f205cd637f68e702122b2c" integrity sha512-T7zexNBwiiaCOGDg9xNX9PBmjrubblRkENuptryuI64URkXDFum9il/JGL8Lm8wYfAXpredVXXZz7eMHilimiQ== buffer-from@^1.0.0: version "1.1.2" resolved "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz" integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== builtin-modules@^1.0.0: version "1.1.1" resolved "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz" integrity sha512-wxXCdllwGhI2kCC0MnvTGYTMvnVZTvqgypkiTI8Pa5tcz2i6VqsqwYGgqwXji+4RgCzms6EajE4IxiUH6HH8nQ== builtins@^1.0.3: version "1.0.3" resolved "https://registry.npmjs.org/builtins/-/builtins-1.0.3.tgz" integrity sha512-uYBjakWipfaO/bXI7E8rq6kpwHRZK5cNYrUv2OzZSI/FvmdMyXJ2tG9dKcjEC5YHmHpUAwsargWIZNWdxb/bnQ== bytes@1: version "1.0.0" resolved "https://registry.yarnpkg.com/bytes/-/bytes-1.0.0.tgz#3569ede8ba34315fab99c3e92cb04c7220de1fa8" integrity sha512-/x68VkHLeTl3/Ll8IvxdwzhrT+IyKc52e/oyHhA2RwqPqswSnjVbSddfPRwAsJtbilMAPSRWwAlpxdYsSWOTKQ== bytes@3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz" integrity sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg= bytes@3.1.2: version "3.1.2" resolved "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz" integrity sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg== cacache@^10.0.0: version "10.0.4" resolved "https://registry.yarnpkg.com/cacache/-/cacache-10.0.4.tgz#6452367999eff9d4188aefd9a14e9d7c6a263460" integrity sha512-Dph0MzuH+rTQzGPNT9fAnrPmMmjKfST6trxJeK7NQuHRaVw24VzPRWTmg9MpcwOVQZO0E1FBICUlFeNaKPIfHA== dependencies: bluebird "^3.5.1" chownr "^1.0.1" glob "^7.1.2" graceful-fs "^4.1.11" lru-cache "^4.1.1" mississippi "^2.0.0" mkdirp "^0.5.1" move-concurrently "^1.0.1" promise-inflight "^1.0.1" rimraf "^2.6.2" ssri "^5.2.4" unique-filename "^1.1.0" y18n "^4.0.0" cacache@^9.2.9, cacache@~9.2.9: version "9.2.9" resolved "https://registry.npmjs.org/cacache/-/cacache-9.2.9.tgz" integrity sha512-ghg1j5OyTJ6qsrqU++dN23QiTDxb5AZCFGsF3oB+v9v/gY+F4X8L/0gdQMEjd+8Ot3D29M2etX5PKozHRn2JQw== dependencies: bluebird "^3.5.0" chownr "^1.0.1" glob "^7.1.2" graceful-fs "^4.1.11" lru-cache "^4.1.1" mississippi "^1.3.0" mkdirp "^0.5.1" move-concurrently "^1.0.1" promise-inflight "^1.0.1" rimraf "^2.6.1" ssri "^4.1.6" unique-filename "^1.1.0" y18n "^3.2.1" cacheable-request@^6.0.0: version "6.1.0" resolved "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz" integrity sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg== dependencies: clone-response "^1.0.2" get-stream "^5.1.0" http-cache-semantics "^4.0.0" keyv "^3.0.0" lowercase-keys "^2.0.0" normalize-url "^4.1.0" responselike "^1.0.2" call-bind@^1.0.0: version "1.0.2" resolved "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz" integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== dependencies: function-bind "^1.1.1" get-intrinsic "^1.0.2" call-limit@~1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/call-limit/-/call-limit-1.1.1.tgz#ef15f2670db3f1992557e2d965abc459e6e358d4" integrity sha512-5twvci5b9eRBw2wCfPtN0GmlR2/gadZqyFpPhOK6CvMFoFgA+USnZ6Jpu1lhG9h85pQ3Ouil3PfXWRD4EUaRiQ== callsites@^3.0.0: version "3.1.0" resolved "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz" integrity sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ== camel-case@^4.1.2: version "4.1.2" resolved "https://registry.npmjs.org/camel-case/-/camel-case-4.1.2.tgz" integrity sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw== dependencies: pascal-case "^3.1.2" tslib "^2.0.3" camelcase-css@2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/camelcase-css/-/camelcase-css-2.0.1.tgz" integrity sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA== camelcase@^4.0.0, camelcase@^4.1.0: version "4.1.0" resolved "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz" integrity sha512-FxAv7HpHrXbh3aPo4o2qxHay2lkLY3x5Mw3KeE4KQE8ysVfziWeRZDwcjauvwBSGEC/nXUPzZy8zeh4HokqOnw== camelcase@^6.2.0: version "6.2.1" resolved "https://registry.npmjs.org/camelcase/-/camelcase-6.2.1.tgz" integrity sha512-tVI4q5jjFV5CavAU8DXfza/TJcZutVKo/5Foskmsqcm0MsL91moHvwiGNnqaa2o6PF/7yT5ikDRcVcl8Rj6LCA== caniuse-api@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/caniuse-api/-/caniuse-api-3.0.0.tgz" integrity sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw== dependencies: browserslist "^4.0.0" caniuse-lite "^1.0.0" lodash.memoize "^4.1.2" lodash.uniq "^4.5.0" caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001335, caniuse-lite@^1.0.30001400: version "1.0.30001419" resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001419.tgz" integrity sha512-aFO1r+g6R7TW+PNQxKzjITwLOyDhVRLjW0LcwS/HCZGUUKTGNp9+IwLC4xyDSZBygVL/mxaFR3HIV6wEKQuSzw== caniuse-lite@^1.0.30001489: version "1.0.30001492" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001492.tgz#4a06861788a52b4c81fd3344573b68cc87fe062b" integrity sha512-2efF8SAZwgAX1FJr87KWhvuJxnGJKOnctQa8xLOskAXNXq8oiuqgl6u1kk3fFpsp3GgvzlRjiK1sl63hNtFADw== capture-stack-trace@^1.0.0: version "1.0.1" resolved "https://registry.npmjs.org/capture-stack-trace/-/capture-stack-trace-1.0.1.tgz" integrity sha512-mYQLZnx5Qt1JgB1WEiMCf2647plpGeQ2NMR/5L0HNZzGQo4fuSPnK+wjfPnKZV0aiJDgzmWqqkV/g7JD+DW0qw== caseless@^0.12.0, caseless@~0.12.0: version "0.12.0" resolved "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz" integrity sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw== ccount@^1.0.0: version "1.1.0" resolved "https://registry.npmjs.org/ccount/-/ccount-1.1.0.tgz" integrity sha512-vlNK021QdI7PNeiUh/lKkC/mNHHfV0m/Ad5JoI0TYtlBnJAslM/JIkm/tGC88bkLIwO6OQ5uV6ztS6kVAtCDlg== chalk@4.1.2, chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.2, chalk@~4.1.0: version "4.1.2" resolved "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz" integrity sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA== dependencies: ansi-styles "^4.1.0" supports-color "^7.1.0" chalk@^1.0.0, chalk@^1.1.1: version "1.1.3" resolved "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz" integrity sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A== dependencies: ansi-styles "^2.2.1" escape-string-regexp "^1.0.2" has-ansi "^2.0.0" strip-ansi "^3.0.0" supports-color "^2.0.0" chalk@^2.0.0, chalk@^2.0.1: version "2.4.2" resolved "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== dependencies: ansi-styles "^3.2.1" escape-string-regexp "^1.0.5" supports-color "^5.3.0" character-entities-legacy@^1.0.0: version "1.1.4" resolved "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-1.1.4.tgz" integrity sha512-3Xnr+7ZFS1uxeiUDvV02wQ+QDbc55o97tIV5zHScSPJpcLm/r0DFPcoY3tYRp+VZukxuMeKgXYmsXQHO05zQeA== character-entities@^1.0.0: version "1.2.4" resolved "https://registry.npmjs.org/character-entities/-/character-entities-1.2.4.tgz" integrity sha512-iBMyeEHxfVnIakwOuDXpVkc54HijNgCyQB2w0VfGQThle6NXn50zU6V/u+LDhxHcDUPojn6Kpga3PTAD8W1bQw== character-reference-invalid@^1.0.0: version "1.1.4" resolved "https://registry.npmjs.org/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz" integrity sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg== cheerio-select@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/cheerio-select/-/cheerio-select-2.1.0.tgz" integrity sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g== dependencies: boolbase "^1.0.0" css-select "^5.1.0" css-what "^6.1.0" domelementtype "^2.3.0" domhandler "^5.0.3" domutils "^3.0.1" cheerio@^1.0.0-rc.10, cheerio@^1.0.0-rc.12: version "1.0.0-rc.12" resolved "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.12.tgz" integrity sha512-VqR8m68vM46BNnuZ5NtnGBKIE/DfN0cRIzg9n40EIq9NOv90ayxLBXA8fXC5gquFRGJSTRqBq25Jt2ECLR431Q== dependencies: cheerio-select "^2.1.0" dom-serializer "^2.0.0" domhandler "^5.0.3" domutils "^3.0.1" htmlparser2 "^8.0.1" parse5 "^7.0.0" parse5-htmlparser2-tree-adapter "^7.0.0" "chokidar@>=3.0.0 <4.0.0", chokidar@^3.4.2, chokidar@^3.5.3: version "3.5.3" resolved "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz" integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw== dependencies: anymatch "~3.1.2" braces "~3.0.2" glob-parent "~5.1.2" is-binary-path "~2.1.0" is-glob "~4.0.1" normalize-path "~3.0.0" readdirp "~3.6.0" optionalDependencies: fsevents "~2.3.2" chownr@^1.0.1, chownr@~1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz" integrity sha512-cKnqUJAC8G6cuN1DiRRTifu+s1BlAQNtalzGphFEV0pl0p46dsxJD4l1AOlyKJeLZOFzo3c34R7F3djxaCu8Kw== chrome-trace-event@^1.0.2: version "1.0.3" resolved "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz" integrity sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg== ci-info@^1.5.0: version "1.6.0" resolved "https://registry.npmjs.org/ci-info/-/ci-info-1.6.0.tgz" integrity sha512-vsGdkwSCDpWmP80ncATX7iea5DWQemg1UgCW5J8tqjU3lYw4FBYuj89J0CTVomA7BEfvSZd84GmHko+MxFQU2A== ci-info@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz" integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== ci-info@^3.2.0: version "3.5.0" resolved "https://registry.npmjs.org/ci-info/-/ci-info-3.5.0.tgz" integrity sha512-yH4RezKOGlOhxkmhbeNuC4eYZKAUsEaGtBuBzDDP1eFUKiccDWzBABxBfOx31IDwDIXMTxWuwAxUGModvkbuVw== clean-css@^5.2.2, clean-css@^5.3.0: version "5.3.1" resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-5.3.1.tgz#d0610b0b90d125196a2894d35366f734e5d7aa32" integrity sha512-lCr8OHhiWCTw4v8POJovCoh4T7I9U11yVsPjMWWnnMmp9ZowCxyad1Pathle/9HjaDp+fdQKjO9fQydE6RHTZg== dependencies: source-map "~0.6.0" clean-css@^5.3.2: version "5.3.2" resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-5.3.2.tgz#70ecc7d4d4114921f5d298349ff86a31a9975224" integrity sha512-JVJbM+f3d3Q704rF4bqQ5UUyTtuJ0JRKNbTKVEeujCCBoMdkEi+V+e8oktO9qGQNSvHrFTM6JZRXrUvGR1czww== dependencies: source-map "~0.6.0" clean-stack@^2.0.0: version "2.2.0" resolved "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz" integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== cli-boxes@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/cli-boxes/-/cli-boxes-1.0.0.tgz" integrity sha512-3Fo5wu8Ytle8q9iCzS4D2MWVL2X7JVWRiS1BnXbTFDhS9c/REkM9vd1AmabsoZoY5/dGi5TT9iKL8Kb6DeBRQg== cli-boxes@^2.2.1: version "2.2.1" resolved "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz" integrity sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw== cli-boxes@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/cli-boxes/-/cli-boxes-3.0.0.tgz" integrity sha512-/lzGpEWL/8PfI0BmBOPRwp0c/wFNX1RdUML3jK/RcSBA9T8mZDdQpqYBKtCFTOfQbwPqWEOpjqW+Fnayc0969g== cli-table3@^0.6.2: version "0.6.2" resolved "https://registry.npmjs.org/cli-table3/-/cli-table3-0.6.2.tgz" integrity sha512-QyavHCaIC80cMivimWu4aWHilIpiDpfm3hGmqAmXVL1UsnbLuBSMd21hTX6VY4ZSDSM73ESLeF8TOYId3rBTbw== dependencies: string-width "^4.2.0" optionalDependencies: "@colors/colors" "1.5.0" cliui@^4.0.0: version "4.1.0" resolved "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz" integrity sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ== dependencies: string-width "^2.1.1" strip-ansi "^4.0.0" wrap-ansi "^2.0.0" clone-deep@^4.0.1: version "4.0.1" resolved "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz" integrity sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ== dependencies: is-plain-object "^2.0.4" kind-of "^6.0.2" shallow-clone "^3.0.0" clone-response@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/clone-response/-/clone-response-1.0.2.tgz" integrity sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws= dependencies: mimic-response "^1.0.0" clone@^1.0.2: version "1.0.4" resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" integrity sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg== clsx@^1.2.1: version "1.2.1" resolved "https://registry.npmjs.org/clsx/-/clsx-1.2.1.tgz" integrity sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg== clsx@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/clsx/-/clsx-2.0.0.tgz#12658f3fd98fafe62075595a5c30e43d18f3d00b" integrity sha512-rQ1+kcj+ttHG0MKVGBUXwayCCF1oh39BF5COIpRzuCEv8Mwjv0XucrI2ExNTOn9IlLifGClWQcU9BrZORvtw6Q== cmd-shim@~2.0.2: version "2.0.2" resolved "https://registry.npmjs.org/cmd-shim/-/cmd-shim-2.0.2.tgz" integrity sha512-NLt0ntM0kvuSNrToO0RTFiNRHdioWsLW+OgDAEVDvIivsYwR+AjlzvLaMJ2Z+SNRpV3vdsDrHp1WI00eetDYzw== dependencies: graceful-fs "^4.1.2" mkdirp "~0.5.0" co@^4.6.0: version "4.6.0" resolved "https://registry.npmjs.org/co/-/co-4.6.0.tgz" integrity sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ== code-point-at@^1.0.0: version "1.1.0" resolved "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz" integrity sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA== coffeescript@^2.6.1: version "2.7.0" resolved "https://registry.yarnpkg.com/coffeescript/-/coffeescript-2.7.0.tgz#a43ec03be6885d6d1454850ea70b9409c391279c" integrity sha512-hzWp6TUE2d/jCcN67LrW1eh5b/rSDKQK6oD6VMLlggYVUUFexgTH9z3dNYihzX4RMhze5FTUsUmOXViJKFQR/A== collapse-white-space@^1.0.2: version "1.0.6" resolved "https://registry.npmjs.org/collapse-white-space/-/collapse-white-space-1.0.6.tgz" integrity sha512-jEovNnrhMuqyCcjfEJA56v0Xq8SkIoPKDyaHahwo3POf4qcSXqMYuwNcOTzp74vTsR9Tn08z4MxWqAhcekogkQ== color-convert@^1.9.0: version "1.9.3" resolved "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz" integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== dependencies: color-name "1.1.3" color-convert@^2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz" integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== dependencies: color-name "~1.1.4" color-name@1.1.3: version "1.1.3" resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz" integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= color-name@~1.1.4: version "1.1.4" resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== colord@^2.9.1: version "2.9.1" resolved "https://registry.npmjs.org/colord/-/colord-2.9.1.tgz" integrity sha512-4LBMSt09vR0uLnPVkOUBnmxgoaeN4ewRbx801wY/bXcltXfpR/G46OdWn96XpYmCWuYvO46aBZP4NgX8HpNAcw== colorette@^2.0.10: version "2.0.16" resolved "https://registry.npmjs.org/colorette/-/colorette-2.0.16.tgz" integrity sha512-hUewv7oMjCp+wkBv5Rm0v87eJhq4woh5rSR+42YSQJKecCqgIqNkZ6lAlQms/BwHPJA5NKMRlpxPRv0n8HQW6g== colors@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63" integrity sha512-ENwblkFQpqqia6b++zLD/KUWafYlVY/UNnAp7oz7LY7E924wmpye416wBOmvv/HMWzl8gL1kJlfvId/1Dg176w== columnify@~1.5.4: version "1.5.4" resolved "https://registry.npmjs.org/columnify/-/columnify-1.5.4.tgz" integrity sha512-rFl+iXVT1nhLQPfGDw+3WcS8rmm7XsLKUmhsGE3ihzzpIikeGrTaZPIRKYWeLsLBypsHzjXIvYEltVUZS84XxQ== dependencies: strip-ansi "^3.0.0" wcwidth "^1.0.0" combine-promises@^1.1.0: version "1.1.0" resolved "https://registry.npmjs.org/combine-promises/-/combine-promises-1.1.0.tgz" integrity sha512-ZI9jvcLDxqwaXEixOhArm3r7ReIivsXkpbyEWyeOhzz1QS0iSgBPnWvEqvIQtYyamGCYA88gFhmUrs9hrrQ0pg== combined-stream@^1.0.5, combined-stream@^1.0.6, combined-stream@~1.0.5: version "1.0.8" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== dependencies: delayed-stream "~1.0.0" comma-separated-tokens@^1.0.0: version "1.0.8" resolved "https://registry.npmjs.org/comma-separated-tokens/-/comma-separated-tokens-1.0.8.tgz" integrity sha512-GHuDRO12Sypu2cV70d1dkA2EUmXHgntrzbpvOB+Qy+49ypNfGgFQIC2fhhXbnyrJRynDCAARsT7Ou0M6hirpfw== commander@7, commander@^7.2.0: version "7.2.0" resolved "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz" integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== commander@^10.0.0: version "10.0.0" resolved "https://registry.yarnpkg.com/commander/-/commander-10.0.0.tgz#71797971162cd3cf65f0b9d24eb28f8d303acdf1" integrity sha512-zS5PnTI22FIRM6ylNW8G4Ap0IEOyk62fhLSD0+uHRT9McRCLGpkVNvao4bjimpK/GShynyQkFFxHhwMcETmduA== commander@^2.19.0, commander@^2.20.0: version "2.20.3" resolved "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== commander@^5.1.0: version "5.1.0" resolved "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz" integrity sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg== commander@^8.3.0: version "8.3.0" resolved "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz" integrity sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww== commondir@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz" integrity sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs= compressible@~2.0.16: version "2.0.18" resolved "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz" integrity sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg== dependencies: mime-db ">= 1.43.0 < 2" compression@^1.7.4: version "1.7.4" resolved "https://registry.npmjs.org/compression/-/compression-1.7.4.tgz" integrity sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ== dependencies: accepts "~1.3.5" bytes "3.0.0" compressible "~2.0.16" debug "2.6.9" on-headers "~1.0.2" safe-buffer "5.1.2" vary "~1.1.2" concat-map@0.0.1: version "0.0.1" resolved "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= concat-stream@^1.5.0, concat-stream@^1.5.2, concat-stream@^1.6.0, concat-stream@^1.6.2: version "1.6.2" resolved "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz" integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== dependencies: buffer-from "^1.0.0" inherits "^2.0.3" readable-stream "^2.2.2" typedarray "^0.0.6" config-chain@^1.1.13, config-chain@~1.1.11: version "1.1.13" resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.13.tgz#fad0795aa6a6cdaff9ed1b68e9dff94372c232f4" integrity sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ== dependencies: ini "^1.3.4" proto-list "~1.2.1" configstore@^3.0.0: version "3.1.5" resolved "https://registry.yarnpkg.com/configstore/-/configstore-3.1.5.tgz#e9af331fadc14dabd544d3e7e76dc446a09a530f" integrity sha512-nlOhI4+fdzoK5xmJ+NY+1gZK56bwEaWZr8fYuXohZ9Vkc1o3a4T/R3M+yE/w7x/ZVJ1zF8c+oaOvF0dztdUgmA== dependencies: dot-prop "^4.2.1" graceful-fs "^4.1.2" make-dir "^1.0.0" unique-string "^1.0.0" write-file-atomic "^2.0.0" xdg-basedir "^3.0.0" configstore@^5.0.1: version "5.0.1" resolved "https://registry.npmjs.org/configstore/-/configstore-5.0.1.tgz" integrity sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA== dependencies: dot-prop "^5.2.0" graceful-fs "^4.1.2" make-dir "^3.0.0" unique-string "^2.0.0" write-file-atomic "^3.0.0" xdg-basedir "^4.0.0" connect-history-api-fallback@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/connect-history-api-fallback/-/connect-history-api-fallback-2.0.0.tgz" integrity sha512-U73+6lQFmfiNPrYbXqr6kZ1i1wiRqXnp2nhMsINseWXO8lDau0LGEffJ8kQi4EjLZympVgRdvqjAgiZ1tgzDDA== connect-livereload@^0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/connect-livereload/-/connect-livereload-0.6.1.tgz#1ac0c8bb9d9cfd5b28b629987a56a9239db9baaa" integrity sha512-3R0kMOdL7CjJpU66fzAkCe6HNtd3AavCS4m+uW4KtJjrdGPT0SQEZieAYd+cm+lJoBznNQ4lqipYWkhBMgk00g== connect@^3.7.0: version "3.7.0" resolved "https://registry.yarnpkg.com/connect/-/connect-3.7.0.tgz#5d49348910caa5e07a01800b030d0c35f20484f8" integrity sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ== dependencies: debug "2.6.9" finalhandler "1.1.2" parseurl "~1.3.3" utils-merge "1.0.1" consola@^2.15.3: version "2.15.3" resolved "https://registry.npmjs.org/consola/-/consola-2.15.3.tgz" integrity sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw== console-control-strings@^1.0.0, console-control-strings@~1.1.0: version "1.1.0" resolved "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz" integrity sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ== content-disposition@0.5.2: version "0.5.2" resolved "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz" integrity sha1-DPaLud318r55YcOoUXjLhdunjLQ= content-disposition@0.5.4: version "0.5.4" resolved "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz" integrity sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ== dependencies: safe-buffer "5.2.1" content-type@~1.0.4: version "1.0.4" resolved "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz" integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== continuable-cache@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/continuable-cache/-/continuable-cache-0.3.1.tgz#bd727a7faed77e71ff3985ac93351a912733ad0f" integrity sha512-TF30kpKhTH8AGCG3dut0rdd/19B7Z+qCnrMoBLpyQu/2drZdNrrpcjPEoJeSVsQM+8KmWG5O56oPDjSSUsuTyA== convert-source-map@^1.7.0: version "1.8.0" resolved "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz" integrity sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA== dependencies: safe-buffer "~5.1.1" cookie-signature@1.0.6: version "1.0.6" resolved "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz" integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw= cookie@0.5.0: version "0.5.0" resolved "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz" integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw== copy-concurrently@^1.0.0: version "1.0.5" resolved "https://registry.npmjs.org/copy-concurrently/-/copy-concurrently-1.0.5.tgz" integrity sha512-f2domd9fsVDFtaFcbaRZuYXwtdmnzqbADSwhSWYxYB/Q8zsdUUFMXVRwXGDMWmbEzAn1kdRrtI1T/KTFOL4X2A== dependencies: aproba "^1.1.1" fs-write-stream-atomic "^1.0.8" iferr "^0.1.5" mkdirp "^0.5.1" rimraf "^2.5.4" run-queue "^1.0.0" copy-text-to-clipboard@^3.0.1: version "3.0.1" resolved "https://registry.npmjs.org/copy-text-to-clipboard/-/copy-text-to-clipboard-3.0.1.tgz" integrity sha512-rvVsHrpFcL4F2P8ihsoLdFHmd404+CMg71S756oRSeQgqk51U3kicGdnvfkrxva0xXH92SjGS62B0XIJsbh+9Q== copy-webpack-plugin@^11.0.0: version "11.0.0" resolved "https://registry.npmjs.org/copy-webpack-plugin/-/copy-webpack-plugin-11.0.0.tgz" integrity sha512-fX2MWpamkW0hZxMEg0+mYnA40LTosOSa5TqZ9GYIBzyJa9C3QUaMPSE2xAi/buNr8u89SfD9wHSQVBzrRa/SOQ== dependencies: fast-glob "^3.2.11" glob-parent "^6.0.1" globby "^13.1.1" normalize-path "^3.0.0" schema-utils "^4.0.0" serialize-javascript "^6.0.0" core-js-compat@^3.21.0: version "3.23.3" resolved "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.23.3.tgz" integrity sha512-WSzUs2h2vvmKsacLHNTdpyOC9k43AEhcGoFlVgCY4L7aw98oSBKtPL6vD0/TqZjRWRQYdDSLkzZIni4Crbbiqw== dependencies: browserslist "^4.21.0" semver "7.0.0" core-js-compat@^3.30.1, core-js-compat@^3.30.2: version "3.30.2" resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.30.2.tgz#83f136e375babdb8c80ad3c22d67c69098c1dd8b" integrity sha512-nriW1nuJjUgvkEjIot1Spwakz52V9YkYHZAQG6A1eCgC8AA1p0zngrQEP9R0+V6hji5XilWKG1Bd0YRppmGimA== dependencies: browserslist "^4.21.5" core-js-pure@^3.20.2: version "3.20.2" resolved "https://registry.npmjs.org/core-js-pure/-/core-js-pure-3.20.2.tgz" integrity sha512-CmWHvSKn2vNL6p6StNp1EmMIfVY/pqn3JLAjfZQ8WZGPOlGoO92EkX9/Mk81i6GxvoPXjUqEQnpM3rJ5QxxIOg== core-js@^3.23.3: version "3.23.3" resolved "https://registry.npmjs.org/core-js/-/core-js-3.23.3.tgz" integrity sha512-oAKwkj9xcWNBAvGbT//WiCdOMpb9XQG92/Fe3ABFM/R16BsHgePG00mFOgKf7IsCtfj8tA1kHtf/VwErhriz5Q== core-util-is@1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" integrity sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ== core-util-is@~1.0.0: version "1.0.3" resolved "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz" integrity sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ== cosmiconfig@^6.0.0: version "6.0.0" resolved "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-6.0.0.tgz" integrity sha512-xb3ZL6+L8b9JLLCx3ZdoZy4+2ECphCMo2PwqgP1tlfVq6M6YReyzBJtvWWtbDSpNr9hn96pkCiZqUcFEc+54Qg== dependencies: "@types/parse-json" "^4.0.0" import-fresh "^3.1.0" parse-json "^5.0.0" path-type "^4.0.0" yaml "^1.7.2" cosmiconfig@^7.0.0, cosmiconfig@^7.0.1: version "7.0.1" resolved "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.0.1.tgz" integrity sha512-a1YWNUV2HwGimB7dU2s1wUMurNKjpx60HxBB6xUM8Re+2s1g1IIfJvFR0/iCF+XHdE0GMTKTuLR32UQff4TEyQ== dependencies: "@types/parse-json" "^4.0.0" import-fresh "^3.2.1" parse-json "^5.0.0" path-type "^4.0.0" yaml "^1.10.0" cosmiconfig@^8.1.3: version "8.1.3" resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-8.1.3.tgz#0e614a118fcc2d9e5afc2f87d53cd09931015689" integrity sha512-/UkO2JKI18b5jVMJUp0lvKFMpa/Gye+ZgZjKD+DGEN9y7NRcf/nK1A0sp67ONmKtnDCNMS44E6jrk0Yc3bDuUw== dependencies: import-fresh "^3.2.1" js-yaml "^4.1.0" parse-json "^5.0.0" path-type "^4.0.0" create-error-class@^3.0.0: version "3.0.2" resolved "https://registry.npmjs.org/create-error-class/-/create-error-class-3.0.2.tgz" integrity sha512-gYTKKexFO3kh200H1Nit76sRwRtOY32vQd3jpAQKpLtZqyNsSQNfI4N7o3eP2wUjV35pTWKRYqFUDBvUha/Pkw== dependencies: capture-stack-trace "^1.0.0" cross-fetch@^3.0.4: version "3.1.5" resolved "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz" integrity sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw== dependencies: node-fetch "2.6.7" cross-spawn@^5.0.1: version "5.1.0" resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz" integrity sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A== dependencies: lru-cache "^4.0.1" shebang-command "^1.2.0" which "^1.2.9" cross-spawn@^6.0.0: version "6.0.5" resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz" integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== dependencies: nice-try "^1.0.4" path-key "^2.0.1" semver "^5.5.0" shebang-command "^1.2.0" which "^1.2.9" cross-spawn@^7.0.3: version "7.0.3" resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz" integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== dependencies: path-key "^3.1.0" shebang-command "^2.0.0" which "^2.0.1" cryptiles@2.x.x: version "2.0.5" resolved "https://registry.npmjs.org/cryptiles/-/cryptiles-2.0.5.tgz" integrity sha512-FFN5KwpvvQTTS5hWPxrU8/QE4kQUc6uwZcrnlMBN82t1MgAtq8mnoDwINBly9Tdr02seeIIhtdF+UH1feBYGog== dependencies: boom "2.x.x" crypto-random-string@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-1.0.0.tgz" integrity sha512-GsVpkFPlycH7/fRR7Dhcmnoii54gV1nz7y4CWyeFS14N+JVBBhY+r8amRHE4BwSYal7BPTDp8isvAlCxyFt3Hg== crypto-random-string@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-2.0.0.tgz" integrity sha512-v1plID3y9r/lPhviJ1wrXpLeyUIGAZ2SHNYTEapm7/8A9nLPoyvVp3RK/EPFqn5kEznyWgYZNsRtYYIWbuG8KA== css-declaration-sorter@^6.3.0: version "6.3.0" resolved "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-6.3.0.tgz" integrity sha512-OGT677UGHJTAVMRhPO+HJ4oKln3wkBTwtDFH0ojbqm+MJm6xuDMHp2nkhh/ThaBqq20IbraBQSWKfSLNHQO9Og== css-loader@^6.7.1: version "6.7.1" resolved "https://registry.npmjs.org/css-loader/-/css-loader-6.7.1.tgz" integrity sha512-yB5CNFa14MbPJcomwNh3wLThtkZgcNyI2bNMRt8iE5Z8Vwl7f8vQXFAzn2HDOJvtDq2NTZBUGMSUNNyrv3/+cw== dependencies: icss-utils "^5.1.0" postcss "^8.4.7" postcss-modules-extract-imports "^3.0.0" postcss-modules-local-by-default "^4.0.0" postcss-modules-scope "^3.0.0" postcss-modules-values "^4.0.0" postcss-value-parser "^4.2.0" semver "^7.3.5" css-minimizer-webpack-plugin@^4.0.0: version "4.2.2" resolved "https://registry.npmjs.org/css-minimizer-webpack-plugin/-/css-minimizer-webpack-plugin-4.2.2.tgz" integrity sha512-s3Of/4jKfw1Hj9CxEO1E5oXhQAxlayuHO2y/ML+C6I9sQ7FdzfEV6QgMLN3vI+qFsjJGIAFLKtQK7t8BOXAIyA== dependencies: cssnano "^5.1.8" jest-worker "^29.1.2" postcss "^8.4.17" schema-utils "^4.0.0" serialize-javascript "^6.0.0" source-map "^0.6.1" css-select@^4.1.3: version "4.1.3" resolved "https://registry.npmjs.org/css-select/-/css-select-4.1.3.tgz" integrity sha512-gT3wBNd9Nj49rAbmtFHj1cljIAOLYSX1nZ8CB7TBO3INYckygm5B7LISU/szY//YmdiSLbJvDLOx9VnMVpMBxA== dependencies: boolbase "^1.0.0" css-what "^5.0.0" domhandler "^4.2.0" domutils "^2.6.0" nth-check "^2.0.0" css-select@^5.1.0: version "5.1.0" resolved "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz" integrity sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg== dependencies: boolbase "^1.0.0" css-what "^6.1.0" domhandler "^5.0.2" domutils "^3.0.1" nth-check "^2.0.1" css-tree@^1.1.2, css-tree@^1.1.3: version "1.1.3" resolved "https://registry.npmjs.org/css-tree/-/css-tree-1.1.3.tgz" integrity sha512-tRpdppF7TRazZrjJ6v3stzv93qxRcSsFmW6cX0Zm2NVKpxE1WV1HblnghVv9TreireHkqI/VDEsfolRF1p6y7Q== dependencies: mdn-data "2.0.14" source-map "^0.6.1" css-tree@^2.2.1: version "2.3.1" resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-2.3.1.tgz#10264ce1e5442e8572fc82fbe490644ff54b5c20" integrity sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw== dependencies: mdn-data "2.0.30" source-map-js "^1.0.1" css-tree@~2.2.0: version "2.2.1" resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-2.2.1.tgz#36115d382d60afd271e377f9c5f67d02bd48c032" integrity sha512-OA0mILzGc1kCOCSJerOeqDxDQ4HOh+G8NbOJFOTgOCzpw7fCBubk0fEyxp8AgOL/jvLgYA/uV0cMbe43ElF1JA== dependencies: mdn-data "2.0.28" source-map-js "^1.0.1" css-what@^5.0.0: version "5.1.0" resolved "https://registry.npmjs.org/css-what/-/css-what-5.1.0.tgz" integrity sha512-arSMRWIIFY0hV8pIxZMEfmMI47Wj3R/aWpZDDxWYCPEiOMv6tfOrnpDtgxBYPEQD4V0Y/958+1TdC3iWTFcUPw== css-what@^6.1.0: version "6.1.0" resolved "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz" integrity sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw== cssesc@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz" integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== cssnano-preset-advanced@^5.3.8: version "5.3.8" resolved "https://registry.npmjs.org/cssnano-preset-advanced/-/cssnano-preset-advanced-5.3.8.tgz" integrity sha512-xUlLLnEB1LjpEik+zgRNlk8Y/koBPPtONZjp7JKbXigeAmCrFvq9H0pXW5jJV45bQWAlmJ0sKy+IMr0XxLYQZg== dependencies: autoprefixer "^10.3.7" cssnano-preset-default "^5.2.12" postcss-discard-unused "^5.1.0" postcss-merge-idents "^5.1.1" postcss-reduce-idents "^5.2.0" postcss-zindex "^5.1.0" cssnano-preset-default@^5.2.12: version "5.2.12" resolved "https://registry.npmjs.org/cssnano-preset-default/-/cssnano-preset-default-5.2.12.tgz" integrity sha512-OyCBTZi+PXgylz9HAA5kHyoYhfGcYdwFmyaJzWnzxuGRtnMw/kR6ilW9XzlzlRAtB6PLT/r+prYgkef7hngFew== dependencies: css-declaration-sorter "^6.3.0" cssnano-utils "^3.1.0" postcss-calc "^8.2.3" postcss-colormin "^5.3.0" postcss-convert-values "^5.1.2" postcss-discard-comments "^5.1.2" postcss-discard-duplicates "^5.1.0" postcss-discard-empty "^5.1.1" postcss-discard-overridden "^5.1.0" postcss-merge-longhand "^5.1.6" postcss-merge-rules "^5.1.2" postcss-minify-font-values "^5.1.0" postcss-minify-gradients "^5.1.1" postcss-minify-params "^5.1.3" postcss-minify-selectors "^5.2.1" postcss-normalize-charset "^5.1.0" postcss-normalize-display-values "^5.1.0" postcss-normalize-positions "^5.1.1" postcss-normalize-repeat-style "^5.1.1" postcss-normalize-string "^5.1.0" postcss-normalize-timing-functions "^5.1.0" postcss-normalize-unicode "^5.1.0" postcss-normalize-url "^5.1.0" postcss-normalize-whitespace "^5.1.1" postcss-ordered-values "^5.1.3" postcss-reduce-initial "^5.1.0" postcss-reduce-transforms "^5.1.0" postcss-svgo "^5.1.0" postcss-unique-selectors "^5.1.1" cssnano-utils@^3.1.0: version "3.1.0" resolved "https://registry.npmjs.org/cssnano-utils/-/cssnano-utils-3.1.0.tgz" integrity sha512-JQNR19/YZhz4psLX/rQ9M83e3z2Wf/HdJbryzte4a3NSuafyp9w/I4U+hx5C2S9g41qlstH7DEWnZaaj83OuEA== cssnano@^5.1.12, cssnano@^5.1.8: version "5.1.12" resolved "https://registry.npmjs.org/cssnano/-/cssnano-5.1.12.tgz" integrity sha512-TgvArbEZu0lk/dvg2ja+B7kYoD7BBCmn3+k58xD0qjrGHsFzXY/wKTo9M5egcUCabPol05e/PVoIu79s2JN4WQ== dependencies: cssnano-preset-default "^5.2.12" lilconfig "^2.0.3" yaml "^1.10.2" csso@^4.2.0: version "4.2.0" resolved "https://registry.npmjs.org/csso/-/csso-4.2.0.tgz" integrity sha512-wvlcdIbf6pwKEk7vHj8/Bkc0B4ylXZruLvOgs9doS5eOsOpuodOV2zJChSpkp+pRpYQLQMeF04nr3Z68Sta9jA== dependencies: css-tree "^1.1.2" csso@^5.0.5: version "5.0.5" resolved "https://registry.yarnpkg.com/csso/-/csso-5.0.5.tgz#f9b7fe6cc6ac0b7d90781bb16d5e9874303e2ca6" integrity sha512-0LrrStPOdJj+SPCCrGhzryycLjwcgUSHBtxNA8aIDxf0GLsRh1cKYhB00Gd1lDOS4yGH69+SNn13+TWbVHETFQ== dependencies: css-tree "~2.2.0" csstype@^3.0.2: version "3.0.10" resolved "https://registry.npmjs.org/csstype/-/csstype-3.0.10.tgz" integrity sha512-2u44ZG2OcNUO9HDp/Jl8C07x6pU/eTR3ncV91SiK3dhG9TWvRVsCoJw14Ckx5DgWkzGA3waZWO3d7pgqpUI/XA== cyclist@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/cyclist/-/cyclist-1.0.1.tgz" integrity sha512-NJGVKPS81XejHcLhaLJS7plab0fK3slPh11mESeeDq2W4ZI5kUKK/LRRdVDvjJseojbPB7ZwjnyOybg3Igea/A== "d3-array@2 - 3", "d3-array@2.10.0 - 3", "d3-array@2.5.0 - 3", d3-array@3, d3-array@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/d3-array/-/d3-array-3.2.0.tgz#15bf96cd9b7333e02eb8de8053d78962eafcff14" integrity sha512-3yXFQo0oG3QCxbF06rMPFyGRMGJNS7NvsV1+2joOjbBE+9xvWQ8+GcMJAjRCzw06zQ3/arXeJgbPYcjUCuC+3g== dependencies: internmap "1 - 2" d3-axis@3: version "3.0.0" resolved "https://registry.yarnpkg.com/d3-axis/-/d3-axis-3.0.0.tgz#c42a4a13e8131d637b745fc2973824cfeaf93322" integrity sha512-IH5tgjV4jE/GhHkRV0HiVYPDtvfjHQlQfJHs0usq7M30XcSBvOotpmH1IgkcXsO/5gEQZD43B//fc7SRT5S+xw== d3-brush@3: version "3.0.0" resolved "https://registry.yarnpkg.com/d3-brush/-/d3-brush-3.0.0.tgz#6f767c4ed8dcb79de7ede3e1c0f89e63ef64d31c" integrity sha512-ALnjWlVYkXsVIGlOsuWH1+3udkYFI48Ljihfnh8FZPF2QS9o+PzGLBslO0PjzVoHLZ2KCVgAM8NVkXPJB2aNnQ== dependencies: d3-dispatch "1 - 3" d3-drag "2 - 3" d3-interpolate "1 - 3" d3-selection "3" d3-transition "3" d3-chord@3: version "3.0.1" resolved "https://registry.yarnpkg.com/d3-chord/-/d3-chord-3.0.1.tgz#d156d61f485fce8327e6abf339cb41d8cbba6966" integrity sha512-VE5S6TNa+j8msksl7HwjxMHDM2yNK3XCkusIlpX5kwauBfXuyLAtNg9jCp/iHH61tgI4sb6R/EIMWCqEIdjT/g== dependencies: d3-path "1 - 3" "d3-color@1 - 3", d3-color@3: version "3.1.0" resolved "https://registry.yarnpkg.com/d3-color/-/d3-color-3.1.0.tgz#395b2833dfac71507f12ac2f7af23bf819de24e2" integrity sha512-zg/chbXyeBtMQ1LbD/WSoW2DpC3I0mpmPdW+ynRTj/x2DAWYrIY7qeZIHidozwV24m4iavr15lNwIwLxRmOxhA== d3-contour@4: version "4.0.0" resolved "https://registry.yarnpkg.com/d3-contour/-/d3-contour-4.0.0.tgz#5a1337c6da0d528479acdb5db54bc81a0ff2ec6b" integrity sha512-7aQo0QHUTu/Ko3cP9YK9yUTxtoDEiDGwnBHyLxG5M4vqlBkO/uixMRele3nfsfj6UXOcuReVpVXzAboGraYIJw== dependencies: d3-array "^3.2.0" d3-delaunay@6: version "6.0.2" resolved "https://registry.yarnpkg.com/d3-delaunay/-/d3-delaunay-6.0.2.tgz#7fd3717ad0eade2fc9939f4260acfb503f984e92" integrity sha512-IMLNldruDQScrcfT+MWnazhHbDJhcRJyOEBAJfwQnHle1RPh6WDuLvxNArUju2VSMSUuKlY5BGHRJ2cYyoFLQQ== dependencies: delaunator "5" "d3-dispatch@1 - 3", d3-dispatch@3: version "3.0.1" resolved "https://registry.yarnpkg.com/d3-dispatch/-/d3-dispatch-3.0.1.tgz#5fc75284e9c2375c36c839411a0cf550cbfc4d5e" integrity sha512-rzUyPU/S7rwUflMyLc1ETDeBj0NRuHKKAcvukozwhshr6g6c5d8zh4c2gQjY2bZ0dXeGLWc1PF174P2tVvKhfg== "d3-drag@2 - 3", d3-drag@3: version "3.0.0" resolved "https://registry.yarnpkg.com/d3-drag/-/d3-drag-3.0.0.tgz#994aae9cd23c719f53b5e10e3a0a6108c69607ba" integrity sha512-pWbUJLdETVA8lQNJecMxoXfH6x+mO2UQo8rSmZ+QqxcbyA3hfeprFgIT//HW2nlHChWeIIMwS2Fq+gEARkhTkg== dependencies: d3-dispatch "1 - 3" d3-selection "3" "d3-dsv@1 - 3", d3-dsv@3: version "3.0.1" resolved "https://registry.yarnpkg.com/d3-dsv/-/d3-dsv-3.0.1.tgz#c63af978f4d6a0d084a52a673922be2160789b73" integrity sha512-UG6OvdI5afDIFP9w4G0mNq50dSOsXHJaRE8arAS5o9ApWnIElp8GZw1Dun8vP8OyHOZ/QJUKUJwxiiCCnUwm+Q== dependencies: commander "7" iconv-lite "0.6" rw "1" "d3-ease@1 - 3", d3-ease@3: version "3.0.1" resolved "https://registry.yarnpkg.com/d3-ease/-/d3-ease-3.0.1.tgz#9658ac38a2140d59d346160f1f6c30fda0bd12f4" integrity sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w== d3-fetch@3: version "3.0.1" resolved "https://registry.yarnpkg.com/d3-fetch/-/d3-fetch-3.0.1.tgz#83141bff9856a0edb5e38de89cdcfe63d0a60a22" integrity sha512-kpkQIM20n3oLVBKGg6oHrUchHM3xODkTzjMoj7aWQFq5QEM+R6E4WkzT5+tojDY7yjez8KgCBRoj4aEr99Fdqw== dependencies: d3-dsv "1 - 3" d3-force@3: version "3.0.0" resolved "https://registry.yarnpkg.com/d3-force/-/d3-force-3.0.0.tgz#3e2ba1a61e70888fe3d9194e30d6d14eece155c4" integrity sha512-zxV/SsA+U4yte8051P4ECydjD/S+qeYtnaIyAs9tgHCqfguma/aAQDjo85A9Z6EKhBirHRJHXIgJUlffT4wdLg== dependencies: d3-dispatch "1 - 3" d3-quadtree "1 - 3" d3-timer "1 - 3" "d3-format@1 - 3", d3-format@3: version "3.1.0" resolved "https://registry.yarnpkg.com/d3-format/-/d3-format-3.1.0.tgz#9260e23a28ea5cb109e93b21a06e24e2ebd55641" integrity sha512-YyUI6AEuY/Wpt8KWLgZHsIU86atmikuoOmCfommt0LYHiQSPjvX2AcFc38PX0CBpr2RCyZhjex+NS/LPOv6YqA== d3-geo@3: version "3.0.1" resolved "https://registry.yarnpkg.com/d3-geo/-/d3-geo-3.0.1.tgz#4f92362fd8685d93e3b1fae0fd97dc8980b1ed7e" integrity sha512-Wt23xBych5tSy9IYAM1FR2rWIBFWa52B/oF/GYe5zbdHrg08FU8+BuI6X4PvTwPDdqdAdq04fuWJpELtsaEjeA== dependencies: d3-array "2.5.0 - 3" d3-hierarchy@3: version "3.1.2" resolved "https://registry.yarnpkg.com/d3-hierarchy/-/d3-hierarchy-3.1.2.tgz#b01cd42c1eed3d46db77a5966cf726f8c09160c6" integrity sha512-FX/9frcub54beBdugHjDCdikxThEqjnR93Qt7PvQTOHxyiNCAlvMrHhclk3cD5VeAaq9fxmfRp+CnWw9rEMBuA== "d3-interpolate@1 - 3", "d3-interpolate@1.2.0 - 3", d3-interpolate@3: version "3.0.1" resolved "https://registry.yarnpkg.com/d3-interpolate/-/d3-interpolate-3.0.1.tgz#3c47aa5b32c5b3dfb56ef3fd4342078a632b400d" integrity sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g== dependencies: d3-color "1 - 3" "d3-path@1 - 3", d3-path@3: version "3.0.1" resolved "https://registry.yarnpkg.com/d3-path/-/d3-path-3.0.1.tgz#f09dec0aaffd770b7995f1a399152bf93052321e" integrity sha512-gq6gZom9AFZby0YLduxT1qmrp4xpBA1YZr19OI717WIdKE2OM5ETq5qrHLb301IgxhLwcuxvGZVLeeWc/k1I6w== d3-polygon@3: version "3.0.1" resolved "https://registry.yarnpkg.com/d3-polygon/-/d3-polygon-3.0.1.tgz#0b45d3dd1c48a29c8e057e6135693ec80bf16398" integrity sha512-3vbA7vXYwfe1SYhED++fPUQlWSYTTGmFmQiany/gdbiWgU/iEyQzyymwL9SkJjFFuCS4902BSzewVGsHHmHtXg== "d3-quadtree@1 - 3", d3-quadtree@3: version "3.0.1" resolved "https://registry.yarnpkg.com/d3-quadtree/-/d3-quadtree-3.0.1.tgz#6dca3e8be2b393c9a9d514dabbd80a92deef1a4f" integrity sha512-04xDrxQTDTCFwP5H6hRhsRcb9xxv2RzkcsygFzmkSIOJy3PeRJP7sNk3VRIbKXcog561P9oU0/rVH6vDROAgUw== d3-random@3: version "3.0.1" resolved "https://registry.yarnpkg.com/d3-random/-/d3-random-3.0.1.tgz#d4926378d333d9c0bfd1e6fa0194d30aebaa20f4" integrity sha512-FXMe9GfxTxqd5D6jFsQ+DJ8BJS4E/fT5mqqdjovykEB2oFbTMDVdg1MGFxfQW+FBOGoB++k8swBrgwSHT1cUXQ== d3-scale-chromatic@3: version "3.0.0" resolved "https://registry.yarnpkg.com/d3-scale-chromatic/-/d3-scale-chromatic-3.0.0.tgz#15b4ceb8ca2bb0dcb6d1a641ee03d59c3b62376a" integrity sha512-Lx9thtxAKrO2Pq6OO2Ua474opeziKr279P/TKZsMAhYyNDD3EnCffdbgeSYN5O7m2ByQsxtuP2CSDczNUIZ22g== dependencies: d3-color "1 - 3" d3-interpolate "1 - 3" d3-scale@4: version "4.0.2" resolved "https://registry.yarnpkg.com/d3-scale/-/d3-scale-4.0.2.tgz#82b38e8e8ff7080764f8dcec77bd4be393689396" integrity sha512-GZW464g1SH7ag3Y7hXjf8RoUuAFIqklOAq3MRl4OaWabTFJY9PN/E1YklhXLh+OQ3fM9yS2nOkCoS+WLZ6kvxQ== dependencies: d3-array "2.10.0 - 3" d3-format "1 - 3" d3-interpolate "1.2.0 - 3" d3-time "2.1.1 - 3" d3-time-format "2 - 4" "d3-selection@2 - 3", d3-selection@3: version "3.0.0" resolved "https://registry.yarnpkg.com/d3-selection/-/d3-selection-3.0.0.tgz#c25338207efa72cc5b9bd1458a1a41901f1e1b31" integrity sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ== d3-shape@3: version "3.1.0" resolved "https://registry.yarnpkg.com/d3-shape/-/d3-shape-3.1.0.tgz#c8a495652d83ea6f524e482fca57aa3f8bc32556" integrity sha512-tGDh1Muf8kWjEDT/LswZJ8WF85yDZLvVJpYU9Nq+8+yW1Z5enxrmXOhTArlkaElU+CTn0OTVNli+/i+HP45QEQ== dependencies: d3-path "1 - 3" "d3-time-format@2 - 4", d3-time-format@4: version "4.1.0" resolved "https://registry.yarnpkg.com/d3-time-format/-/d3-time-format-4.1.0.tgz#7ab5257a5041d11ecb4fe70a5c7d16a195bb408a" integrity sha512-dJxPBlzC7NugB2PDLwo9Q8JiTR3M3e4/XANkreKSUxF8vvXKqm1Yfq4Q5dl8budlunRVlUUaDUgFt7eA8D6NLg== dependencies: d3-time "1 - 3" "d3-time@1 - 3", "d3-time@2.1.1 - 3", d3-time@3: version "3.0.0" resolved "https://registry.yarnpkg.com/d3-time/-/d3-time-3.0.0.tgz#65972cb98ae2d4954ef5c932e8704061335d4975" integrity sha512-zmV3lRnlaLI08y9IMRXSDshQb5Nj77smnfpnd2LrBa/2K281Jijactokeak14QacHs/kKq0AQ121nidNYlarbQ== dependencies: d3-array "2 - 3" "d3-timer@1 - 3", d3-timer@3: version "3.0.1" resolved "https://registry.yarnpkg.com/d3-timer/-/d3-timer-3.0.1.tgz#6284d2a2708285b1abb7e201eda4380af35e63b0" integrity sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA== "d3-transition@2 - 3", d3-transition@3: version "3.0.1" resolved "https://registry.yarnpkg.com/d3-transition/-/d3-transition-3.0.1.tgz#6869fdde1448868077fdd5989200cb61b2a1645f" integrity sha512-ApKvfjsSR6tg06xrL434C0WydLr7JewBB3V+/39RMHsaXTOG0zmt/OAXeng5M5LBm0ojmxJrpomQVZ1aPvBL4w== dependencies: d3-color "1 - 3" d3-dispatch "1 - 3" d3-ease "1 - 3" d3-interpolate "1 - 3" d3-timer "1 - 3" d3-zoom@3: version "3.0.0" resolved "https://registry.yarnpkg.com/d3-zoom/-/d3-zoom-3.0.0.tgz#d13f4165c73217ffeaa54295cd6969b3e7aee8f3" integrity sha512-b8AmV3kfQaqWAuacbPuNbL6vahnOJflOhexLzMMNLga62+/nh0JzvJ0aO/5a5MVgUFGS7Hu1P9P03o3fJkDCyw== dependencies: d3-dispatch "1 - 3" d3-drag "2 - 3" d3-interpolate "1 - 3" d3-selection "2 - 3" d3-transition "2 - 3" d3@^7.0.0: version "7.6.1" resolved "https://registry.yarnpkg.com/d3/-/d3-7.6.1.tgz#b21af9563485ed472802f8c611cc43be6c37c40c" integrity sha512-txMTdIHFbcpLx+8a0IFhZsbp+PfBBPt8yfbmukZTQFroKuFqIwqswF0qE5JXWefylaAVpSXFoKm3yP+jpNLFLw== dependencies: d3-array "3" d3-axis "3" d3-brush "3" d3-chord "3" d3-color "3" d3-contour "4" d3-delaunay "6" d3-dispatch "3" d3-drag "3" d3-dsv "3" d3-ease "3" d3-fetch "3" d3-force "3" d3-format "3" d3-geo "3" d3-hierarchy "3" d3-interpolate "3" d3-path "3" d3-polygon "3" d3-quadtree "3" d3-random "3" d3-scale "4" d3-scale-chromatic "3" d3-selection "3" d3-shape "3" d3-time "3" d3-time-format "4" d3-timer "3" d3-transition "3" d3-zoom "3" d3@^7.7.0: version "7.8.2" resolved "https://registry.yarnpkg.com/d3/-/d3-7.8.2.tgz#2bdb3c178d095ae03b107a18837ae049838e372d" integrity sha512-WXty7qOGSHb7HR7CfOzwN1Gw04MUOzN8qh9ZUsvwycIMb4DYMpY9xczZ6jUorGtO6bR9BPMPaueIKwiDxu9uiQ== dependencies: d3-array "3" d3-axis "3" d3-brush "3" d3-chord "3" d3-color "3" d3-contour "4" d3-delaunay "6" d3-dispatch "3" d3-drag "3" d3-dsv "3" d3-ease "3" d3-fetch "3" d3-force "3" d3-format "3" d3-geo "3" d3-hierarchy "3" d3-interpolate "3" d3-path "3" d3-polygon "3" d3-quadtree "3" d3-random "3" d3-scale "4" d3-scale-chromatic "3" d3-selection "3" d3-shape "3" d3-time "3" d3-time-format "4" d3-timer "3" d3-transition "3" d3-zoom "3" dagre-d3-es@7.0.6: version "7.0.6" resolved "https://registry.yarnpkg.com/dagre-d3-es/-/dagre-d3-es-7.0.6.tgz#8cab465ff95aca8a1ca2292d07e1fb31b5db83f2" integrity sha512-CaaE/nZh205ix+Up4xsnlGmpog5GGm81Upi2+/SBHxwNwrccBb3K51LzjZ1U6hgvOlAEUsVWf1xSTzCyKpJ6+Q== dependencies: d3 "^7.7.0" lodash-es "^4.17.21" dashdash@^1.12.0: version "1.14.1" resolved "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz" integrity sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g== dependencies: assert-plus "^1.0.0" dateformat@~3.0.3: version "3.0.3" resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q== debug@2.6.9, debug@^2.6.0: version "2.6.9" resolved "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz" integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== dependencies: ms "2.0.0" debug@3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== dependencies: ms "2.0.0" debug@^3.1.0: version "3.2.7" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== dependencies: ms "^2.1.1" debug@^4.1.0, debug@^4.1.1: version "4.3.3" resolved "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz" integrity sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q== dependencies: ms "2.1.2" debuglog@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/debuglog/-/debuglog-1.0.1.tgz" integrity sha512-syBZ+rnAK3EgMsH2aYEOLUW7mZSY9Gb+0wUMCFsZvcmiz+HigA0LOcq/HoQqVuGG+EKykunc7QG2bzrponfaSw== decamelize@^1.1.1: version "1.2.0" resolved "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz" integrity sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA== decompress-response@^3.3.0: version "3.3.0" resolved "https://registry.npmjs.org/decompress-response/-/decompress-response-3.3.0.tgz" integrity sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M= dependencies: mimic-response "^1.0.0" deep-extend@^0.6.0: version "0.6.0" resolved "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz" integrity sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA== deepmerge@^4.2.2: version "4.2.2" resolved "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz" integrity sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg== deepmerge@^4.3.1: version "4.3.1" resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a" integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A== default-gateway@^6.0.3: version "6.0.3" resolved "https://registry.npmjs.org/default-gateway/-/default-gateway-6.0.3.tgz" integrity sha512-fwSOJsbbNzZ/CUFpqFBqYfYNLj1NbMPm8MMCIzHjC83iSJRBEGmDUxU+WP661BaBQImeC2yHwXtz+P/O9o+XEg== dependencies: execa "^5.0.0" defaults@^1.0.3: version "1.0.3" resolved "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz" integrity sha512-s82itHOnYrN0Ib8r+z7laQz3sdE+4FP3d9Q7VLO7U+KRT+CR0GsWuyHxzdAY82I7cXv0G/twrqomTJLOssO5HA== dependencies: clone "^1.0.2" defer-to-connect@^1.0.1: version "1.1.3" resolved "https://registry.npmjs.org/defer-to-connect/-/defer-to-connect-1.1.3.tgz" integrity sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ== define-lazy-prop@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz" integrity sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og== define-properties@^1.1.3: version "1.1.3" resolved "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz" integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== dependencies: object-keys "^1.0.12" del@^6.1.1: version "6.1.1" resolved "https://registry.npmjs.org/del/-/del-6.1.1.tgz" integrity sha512-ua8BhapfP0JUJKC/zV9yHHDW/rDoDxP4Zhn3AkA6/xT6gY7jYXJiaeyBZznYVujhZZET+UgcbZiQ7sN3WqcImg== dependencies: globby "^11.0.1" graceful-fs "^4.2.4" is-glob "^4.0.1" is-path-cwd "^2.2.0" is-path-inside "^3.0.2" p-map "^4.0.0" rimraf "^3.0.2" slash "^3.0.0" delaunator@5: version "5.0.0" resolved "https://registry.yarnpkg.com/delaunator/-/delaunator-5.0.0.tgz#60f052b28bd91c9b4566850ebf7756efe821d81b" integrity sha512-AyLvtyJdbv/U1GkiS6gUUzclRoAY4Gs75qkMygJJhU75LW4DNuSF2RMzpxs9jw9Oz1BobHjTdkG3zdP55VxAqw== dependencies: robust-predicates "^3.0.0" delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz" integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== delegates@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz" integrity sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ== depd@2.0.0, depd@~2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz" integrity sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw== depd@~1.1.2: version "1.1.2" resolved "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz" integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= destroy@1.2.0: version "1.2.0" resolved "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz" integrity sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg== detab@2.0.4: version "2.0.4" resolved "https://registry.npmjs.org/detab/-/detab-2.0.4.tgz" integrity sha512-8zdsQA5bIkoRECvCrNKPla84lyoR7DSAyf7p0YgXzBO9PDJx8KntPUay7NS6yp+KdxdVtiE5SpHKtbp2ZQyA9g== dependencies: repeat-string "^1.5.4" detect-file@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/detect-file/-/detect-file-1.0.0.tgz#f0d66d03672a825cb1b73bdb3fe62310c8e552b7" integrity sha512-DtCOLG98P007x7wiiOmfI0fi3eIKyWiLTGJ2MDnVi/E04lWGbf+JzrRHMm0rgIIZJGtHpKpbVgLWHrv8xXpc3Q== detect-indent@~5.0.0: version "5.0.0" resolved "https://registry.npmjs.org/detect-indent/-/detect-indent-5.0.0.tgz" integrity sha512-rlpvsxUtM0PQvy9iZe640/IWwWYyBsTApREbA1pHOpmOUIl9MkP/U4z7vTtg4Oaojvqhxt7sdufnT0EzGaR31g== detect-node@^2.0.4: version "2.1.0" resolved "https://registry.npmjs.org/detect-node/-/detect-node-2.1.0.tgz" integrity sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g== detect-port-alt@^1.1.6: version "1.1.6" resolved "https://registry.npmjs.org/detect-port-alt/-/detect-port-alt-1.1.6.tgz" integrity sha512-5tQykt+LqfJFBEYaDITx7S7cR7mJ/zQmLXZ2qt5w04ainYZw6tBf9dBunMjVeVOdYVRUzUOE4HkY5J7+uttb5Q== dependencies: address "^1.0.1" debug "^2.6.0" detect-port@^1.3.0: version "1.3.0" resolved "https://registry.npmjs.org/detect-port/-/detect-port-1.3.0.tgz" integrity sha512-E+B1gzkl2gqxt1IhUzwjrxBKRqx1UzC3WLONHinn8S3T6lwV/agVCyitiFOsGJ/eYuEUBvD71MZHy3Pv1G9doQ== dependencies: address "^1.0.1" debug "^2.6.0" dezalgo@^1.0.0, dezalgo@~1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/dezalgo/-/dezalgo-1.0.4.tgz#751235260469084c132157dfa857f386d4c33d81" integrity sha512-rXSP0bf+5n0Qonsb+SVVfNfIsimO4HEtmnIpPHY8Q1UCzKlQrDMfdobr8nJOOsRgWCyMRqeSBQzmWUMq7zvVig== dependencies: asap "^2.0.0" wrappy "1" dir-glob@^3.0.1: version "3.0.1" resolved "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz" integrity sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA== dependencies: path-type "^4.0.0" dns-equal@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz" integrity sha1-s55/HabrCnW6nBcySzR1PEfgZU0= dns-packet@^5.2.2: version "5.3.1" resolved "https://registry.npmjs.org/dns-packet/-/dns-packet-5.3.1.tgz" integrity sha512-spBwIj0TK0Ey3666GwIdWVfUpLyubpU53BTCu8iPn4r4oXd9O14Hjg3EHw3ts2oed77/SeckunUYCyRlSngqHw== dependencies: "@leichtgewicht/ip-codec" "^2.0.1" docusaurus-plugin-image-zoom@^0.1.1: version "0.1.1" resolved "https://registry.npmjs.org/docusaurus-plugin-image-zoom/-/docusaurus-plugin-image-zoom-0.1.1.tgz" integrity sha512-cJXo5TKh9OR1gE4B5iS5ovLWYYDFwatqRm00iXFPOaShZG99l5tgkDKgbQPAwSL9wg4I+wz3aMwkOtDhMIpKDQ== dependencies: medium-zoom "^1.0.6" docusaurus-plugin-includes@^1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/docusaurus-plugin-includes/-/docusaurus-plugin-includes-1.1.4.tgz#5c18f66f299b4e02d1eb454d8123c2d160ee0c33" integrity sha512-4L7Eqker4xh1dyWZoz2Isz6JQTg8CWZvvSQyX2IHpEPjwovvD5DpEHHRlSk7gJLQNasWPP9DTHTd0fxFZ6jl2g== dependencies: "@docusaurus/core" "^2.0.0-beta.5" "@docusaurus/types" "^2.0.0-beta.5" "@docusaurus/utils" "^2.0.0-beta.5" fs-extra "^10.0.0" path "^0.12.7" docusaurus-plugin-sass@^0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/docusaurus-plugin-sass/-/docusaurus-plugin-sass-0.2.3.tgz#5b61f7e560d236cfc1531ed497ac32fc166fc5e2" integrity sha512-FbaE06K8NF8SPUYTwiG+83/jkXrwHJ/Afjqz3SUIGon6QvFwSSoKOcoxGQmUBnjTOk+deUONDx8jNWsegFJcBQ== dependencies: sass-loader "^10.1.1" docusaurus-plugin-typedoc@^0.19.2: version "0.19.2" resolved "https://registry.yarnpkg.com/docusaurus-plugin-typedoc/-/docusaurus-plugin-typedoc-0.19.2.tgz#2507047176b38c862155eedf31e5ced177cd90f7" integrity sha512-N4B2MOaXIyu+FloFn6zVbGgSqszeFQE/7ZIgFakpkVg5F0rfysiDGac2PHbPf4o8DWdyyviJOAuhXk6U7Febeg== docusaurus2-dotenv@^1.4.0: version "1.4.0" resolved "https://registry.npmjs.org/docusaurus2-dotenv/-/docusaurus2-dotenv-1.4.0.tgz" integrity sha512-iWqem5fnBAyeBBtX75Fxp71uUAnwFaXzOmade8zAhN4vL3RG9m27sLSRwjJGVVgIkEo3esjGyCcTGTiCjfi+sg== dependencies: dotenv-webpack "1.7.0" dom-converter@^0.2.0: version "0.2.0" resolved "https://registry.npmjs.org/dom-converter/-/dom-converter-0.2.0.tgz" integrity sha512-gd3ypIPfOMr9h5jIKq8E3sHOTCjeirnl0WK5ZdS1AW0Odt0b1PaWaHdJ4Qk4klv+YB9aJBS7mESXjFoDQPu6DA== dependencies: utila "~0.4" dom-serializer@^1.0.1: version "1.3.2" resolved "https://registry.npmjs.org/dom-serializer/-/dom-serializer-1.3.2.tgz" integrity sha512-5c54Bk5Dw4qAxNOI1pFEizPSjVsx5+bpJKmL2kPn8JhBUq2q09tTCa3mjijun2NfK78NMouDYNMBkOrPZiS+ig== dependencies: domelementtype "^2.0.1" domhandler "^4.2.0" entities "^2.0.0" dom-serializer@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz" integrity sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg== dependencies: domelementtype "^2.3.0" domhandler "^5.0.2" entities "^4.2.0" domelementtype@^2.0.1, domelementtype@^2.2.0, domelementtype@^2.3.0: version "2.3.0" resolved "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz" integrity sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw== domhandler@^4.0.0: version "4.3.1" resolved "https://registry.npmjs.org/domhandler/-/domhandler-4.3.1.tgz" integrity sha512-GrwoxYN+uWlzO8uhUXRl0P+kHE4GtVPfYzVLcUxPL7KNdHKj66vvlhiweIHqYYXWlw+T8iLMp42Lm67ghw4WMQ== dependencies: domelementtype "^2.2.0" domhandler@^4.2.0: version "4.3.0" resolved "https://registry.npmjs.org/domhandler/-/domhandler-4.3.0.tgz" integrity sha512-fC0aXNQXqKSFTr2wDNZDhsEYjCiYsDWl3D01kwt25hm1YIPyDGHvvi3rw+PLqHAl/m71MaiF7d5zvBr0p5UB2g== dependencies: domelementtype "^2.2.0" domhandler@^5.0.1, domhandler@^5.0.2, domhandler@^5.0.3: version "5.0.3" resolved "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz" integrity sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w== dependencies: domelementtype "^2.3.0" dompurify@2.4.1: version "2.4.1" resolved "https://registry.yarnpkg.com/dompurify/-/dompurify-2.4.1.tgz#f9cb1a275fde9af6f2d0a2644ef648dd6847b631" integrity sha512-ewwFzHzrrneRjxzmK6oVz/rZn9VWspGFRDb4/rRtIsM1n36t9AKma/ye8syCpcw+XJ25kOK/hOG7t1j2I2yBqA== domutils@^2.5.2, domutils@^2.6.0: version "2.8.0" resolved "https://registry.npmjs.org/domutils/-/domutils-2.8.0.tgz" integrity sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A== dependencies: dom-serializer "^1.0.1" domelementtype "^2.2.0" domhandler "^4.2.0" domutils@^3.0.1: version "3.0.1" resolved "https://registry.npmjs.org/domutils/-/domutils-3.0.1.tgz" integrity sha512-z08c1l761iKhDFtfXO04C7kTdPBLi41zwOZl00WS8b5eiaebNpY00HKbztwBq+e3vyqWNwWF3mP9YLUeqIrF+Q== dependencies: dom-serializer "^2.0.0" domelementtype "^2.3.0" domhandler "^5.0.1" domutils@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/domutils/-/domutils-3.1.0.tgz#c47f551278d3dc4b0b1ab8cbb42d751a6f0d824e" integrity sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA== dependencies: dom-serializer "^2.0.0" domelementtype "^2.3.0" domhandler "^5.0.3" dot-case@^3.0.4: version "3.0.4" resolved "https://registry.npmjs.org/dot-case/-/dot-case-3.0.4.tgz" integrity sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w== dependencies: no-case "^3.0.4" tslib "^2.0.3" dot-prop@^4.2.1: version "4.2.1" resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-4.2.1.tgz#45884194a71fc2cda71cbb4bceb3a4dd2f433ba4" integrity sha512-l0p4+mIuJIua0mhxGoh4a+iNL9bmeK5DvnSVQa6T0OhrVmaEa1XScX5Etc673FePCJOArq/4Pa2cLGODUWTPOQ== dependencies: is-obj "^1.0.0" dot-prop@^5.2.0: version "5.3.0" resolved "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz" integrity sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q== dependencies: is-obj "^2.0.0" dotenv-defaults@^1.0.2: version "1.1.1" resolved "https://registry.npmjs.org/dotenv-defaults/-/dotenv-defaults-1.1.1.tgz" integrity sha512-6fPRo9o/3MxKvmRZBD3oNFdxODdhJtIy1zcJeUSCs6HCy4tarUpd+G67UTU9tF6OWXeSPqsm4fPAB+2eY9Rt9Q== dependencies: dotenv "^6.2.0" dotenv-webpack@1.7.0: version "1.7.0" resolved "https://registry.npmjs.org/dotenv-webpack/-/dotenv-webpack-1.7.0.tgz" integrity sha512-wwNtOBW/6gLQSkb8p43y0Wts970A3xtNiG/mpwj9MLUhtPCQG6i+/DSXXoNN7fbPCU/vQ7JjwGmgOeGZSSZnsw== dependencies: dotenv-defaults "^1.0.2" dotenv@^5.0.1: version "5.0.1" resolved "https://registry.npmjs.org/dotenv/-/dotenv-5.0.1.tgz" integrity sha512-4As8uPrjfwb7VXC+WnLCbXK7y+Ueb2B3zgNCePYfhxS1PYeaO1YTeplffTEcbfLhvFNGLAz90VvJs9yomG7bow== dotenv@^6.2.0: version "6.2.0" resolved "https://registry.npmjs.org/dotenv/-/dotenv-6.2.0.tgz" integrity sha512-HygQCKUBSFl8wKQZBSemMywRWcEDNidvNbjGVyZu3nbZ8qq9ubiPoGLMdRDpfSrpkkm9BXYFkpKxxFX38o/76w== duplexer3@^0.1.4: version "0.1.4" resolved "https://registry.npmjs.org/duplexer3/-/duplexer3-0.1.4.tgz" integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI= duplexer@^0.1.1, duplexer@^0.1.2: version "0.1.2" resolved "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz" integrity sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg== duplexify@^3.4.2, duplexify@^3.5.1, duplexify@^3.6.0: version "3.7.1" resolved "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz" integrity sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g== dependencies: end-of-stream "^1.0.0" inherits "^2.0.1" readable-stream "^2.0.0" stream-shift "^1.0.0" eastasianwidth@^0.2.0: version "0.2.0" resolved "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz" integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA== ecc-jsbn@~0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" integrity sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw== dependencies: jsbn "~0.1.0" safer-buffer "^2.1.0" editor@~1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/editor/-/editor-1.0.0.tgz" integrity sha512-SoRmbGStwNYHgKfjOrX2L0mUvp9bUVv0uPppZSOMAntEbcFtoC3MKF5b3T6HQPXKIV+QGY3xPO3JK5it5lVkuw== editorconfig@^0.15.3: version "0.15.3" resolved "https://registry.yarnpkg.com/editorconfig/-/editorconfig-0.15.3.tgz#bef84c4e75fb8dcb0ce5cee8efd51c15999befc5" integrity sha512-M9wIMFx96vq0R4F+gRpY3o2exzb8hEj/n9S8unZtHSvYjibBp/iMufSzvmOcV/laG0ZtuTVGtiJggPOSW2r93g== dependencies: commander "^2.19.0" lru-cache "^4.1.5" semver "^5.6.0" sigmund "^1.0.1" ee-first@1.1.1: version "1.1.1" resolved "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz" integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= electron-to-chromium@^1.4.251: version "1.4.283" resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.283.tgz" integrity sha512-g6RQ9zCOV+U5QVHW9OpFR7rdk/V7xfopNXnyAamdpFgCHgZ1sjI8VuR1+zG2YG/TZk+tQ8mpNkug4P8FU0fuOA== electron-to-chromium@^1.4.411: version "1.4.417" resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.417.tgz#a0c7eb992e68287fa50c8da5a5238b01f20b9a82" integrity sha512-8rY8HdCxuSVY8wku3i/eDac4g1b4cSbruzocenrqBlzqruAZYHjQCHIjC66dLR9DXhEHTojsC4EjhZ8KmzwXqA== emoji-regex@^8.0.0: version "8.0.0" resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz" integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== emoji-regex@^9.2.2: version "9.2.2" resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz" integrity sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg== emojis-list@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-3.0.0.tgz#5570662046ad29e2e916e71aae260abdff4f6a78" integrity sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q== emoticon@^3.2.0: version "3.2.0" resolved "https://registry.npmjs.org/emoticon/-/emoticon-3.2.0.tgz" integrity sha512-SNujglcLTTg+lDAcApPNgEdudaqQFiAbJCqzjNxJkvN9vAwCGi0uu8IUVvx+f16h+V44KCY6Y2yboroc9pilHg== encodeurl@~1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz" integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= encoding@^0.1.11: version "0.1.13" resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.13.tgz#56574afdd791f54a8e9b2785c0582a2d26210fa9" integrity sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A== dependencies: iconv-lite "^0.6.2" end-of-stream@^1.0.0, end-of-stream@^1.1.0: version "1.4.4" resolved "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz" integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== dependencies: once "^1.4.0" enhanced-resolve@^5.10.0: version "5.10.0" resolved "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.10.0.tgz" integrity sha512-T0yTFjdpldGY8PmuXXR0PyQ1ufZpEGiHVrp7zHKB7jdR4qlmZHhONVM5AQOAWXuF/w3dnHbEQVrNptJgt7F+cQ== dependencies: graceful-fs "^4.2.4" tapable "^2.2.0" entities@^2.0.0: version "2.2.0" resolved "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz" integrity sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A== entities@^4.2.0, entities@^4.3.0: version "4.3.0" resolved "https://registry.npmjs.org/entities/-/entities-4.3.0.tgz" integrity sha512-/iP1rZrSEJ0DTlPiX+jbzlA3eVkY/e8L8SozroF395fIqE3TYF/Nz7YOMAawta+vLmyJ/hkGNNPcSbMADCCXbg== entities@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/entities/-/entities-4.4.0.tgz#97bdaba170339446495e653cfd2db78962900174" integrity sha512-oYp7156SP8LkeGD0GF85ad1X9Ai79WtRsZ2gxJqtBuzH+98YUV6jkHEKlZkMbcrjJjIVJNIDP/3WL9wQkoPbWA== entities@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/entities/-/entities-4.5.0.tgz#5d268ea5e7113ec74c4d033b79ea5a35a488fb48" integrity sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw== err-code@^1.0.0: version "1.1.2" resolved "https://registry.npmjs.org/err-code/-/err-code-1.1.2.tgz" integrity sha512-CJAN+O0/yA1CKfRn9SXOGctSpEM7DCon/r/5r2eXFMY2zCCJBasFhcM5I+1kh3Ap11FsQCX+vGHceNPvpWKhoA== "errno@>=0.1.1 <0.2.0-0": version "0.1.8" resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.8.tgz#8bb3e9c7d463be4976ff888f76b4809ebc2e811f" integrity sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A== dependencies: prr "~1.0.1" error-ex@^1.3.1: version "1.3.2" resolved "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz" integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== dependencies: is-arrayish "^0.2.1" error@^7.0.0: version "7.2.1" resolved "https://registry.yarnpkg.com/error/-/error-7.2.1.tgz#eab21a4689b5f684fc83da84a0e390de82d94894" integrity sha512-fo9HBvWnx3NGUKMvMwB/CBCMMrfEJgbDTVDEkPygA3Bdd3lM1OyCd+rbQ8BwnpF6GdVeOLDNmyL4N5Bg80ZvdA== dependencies: string-template "~0.2.1" es-module-lexer@^0.9.0: version "0.9.3" resolved "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.9.3.tgz" integrity sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ== es6-promise@^4.0.3: version "4.2.8" resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.8.tgz#4eb21594c972bc40553d276e510539143db53e0a" integrity sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w== es6-promisify@^5.0.0: version "5.0.0" resolved "https://registry.npmjs.org/es6-promisify/-/es6-promisify-5.0.0.tgz" integrity sha512-C+d6UdsYDk0lMebHNR4S2NybQMMngAOnOwYBQjTOiv0MkoJMP0Myw2mgpDLBcpfCmRLxyFqYhS/CfOENq4SJhQ== dependencies: es6-promise "^4.0.3" escalade@^3.1.1: version "3.1.1" resolved "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz" integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== escape-goat@^2.0.0: version "2.1.1" resolved "https://registry.npmjs.org/escape-goat/-/escape-goat-2.1.1.tgz" integrity sha512-8/uIhbG12Csjy2JEW7D9pHbreaVaS/OpN3ycnyvElTdwM5n6GY6W6e2IPemfvGZeUMqZ9A/3GqIZMgKnBhAw/Q== escape-html@^1.0.3, escape-html@~1.0.3: version "1.0.3" resolved "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz" integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= escape-string-regexp@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz" integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== eslint-scope@5.1.1: version "5.1.1" resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz" integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== dependencies: esrecurse "^4.3.0" estraverse "^4.1.1" esprima@^4.0.0: version "4.0.1" resolved "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== esrecurse@^4.3.0: version "4.3.0" resolved "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz" integrity sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag== dependencies: estraverse "^5.2.0" estraverse@^4.1.1: version "4.3.0" resolved "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz" integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== estraverse@^5.2.0: version "5.3.0" resolved "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz" integrity sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA== esutils@^2.0.2: version "2.0.3" resolved "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz" integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== eta@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/eta/-/eta-2.0.0.tgz#376865fadebc899e5b6dfce82fae64cbbe47e594" integrity sha512-NqE7S2VmVwgMS8yBxsH4VgNQjNjLq1gfGU0u9I6Cjh468nPRMoDfGdK9n1p/3Dvsw3ebklDkZsFAnKJ9sefjBA== etag@~1.8.1: version "1.8.1" resolved "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz" integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= eval@^0.1.8: version "0.1.8" resolved "https://registry.npmjs.org/eval/-/eval-0.1.8.tgz" integrity sha512-EzV94NYKoO09GLXGjXj9JIlXijVck4ONSr5wiCWDvhsvj5jxSrzTmRU/9C1DyB6uToszLs8aifA6NQ7lEQdvFw== dependencies: "@types/node" "*" require-like ">= 0.1.1" eventemitter2@~0.4.13: version "0.4.14" resolved "https://registry.yarnpkg.com/eventemitter2/-/eventemitter2-0.4.14.tgz#8f61b75cde012b2e9eb284d4545583b5643b61ab" integrity sha512-K7J4xq5xAD5jHsGM5ReWXRTFa3JRGofHiMcVgQ8PRwgWxzjHpMWCIzsmyf60+mh8KLsqYPcjUMa0AC4hd6lPyQ== eventemitter3@^4.0.0: version "4.0.7" resolved "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz" integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw== events@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924" integrity sha512-kEcvvCBByWXGnZy6JUlgAp2gBIUjfCAV6P6TgT1/aaQKcmuAEC4OZTV1I4EWQLz2gxZw76atuVyvHhTxvi0Flw== events@^3.2.0: version "3.3.0" resolved "https://registry.npmjs.org/events/-/events-3.3.0.tgz" integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== execa@^0.7.0: version "0.7.0" resolved "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz" integrity sha512-RztN09XglpYI7aBBrJCPW95jEH7YF1UEPOoX9yDhUTPdp7mK+CQvnLTuD10BNXZ3byLTu2uehZ8EcKT/4CGiFw== dependencies: cross-spawn "^5.0.1" get-stream "^3.0.0" is-stream "^1.1.0" npm-run-path "^2.0.0" p-finally "^1.0.0" signal-exit "^3.0.0" strip-eof "^1.0.0" execa@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz" integrity sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA== dependencies: cross-spawn "^6.0.0" get-stream "^4.0.0" is-stream "^1.1.0" npm-run-path "^2.0.0" p-finally "^1.0.0" signal-exit "^3.0.0" strip-eof "^1.0.0" execa@^5.0.0: version "5.1.1" resolved "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz" integrity sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg== dependencies: cross-spawn "^7.0.3" get-stream "^6.0.0" human-signals "^2.1.0" is-stream "^2.0.0" merge-stream "^2.0.0" npm-run-path "^4.0.1" onetime "^5.1.2" signal-exit "^3.0.3" strip-final-newline "^2.0.0" exit@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" integrity sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ== expand-tilde@^2.0.0, expand-tilde@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-2.0.2.tgz#97e801aa052df02454de46b02bf621642cdc8502" integrity sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw== dependencies: homedir-polyfill "^1.0.1" express@^4.17.3: version "4.18.1" resolved "https://registry.npmjs.org/express/-/express-4.18.1.tgz" integrity sha512-zZBcOX9TfehHQhtupq57OF8lFZ3UZi08Y97dwFCkD8p9d/d2Y3M+ykKcwaMDEL+4qyUolgBDX6AblpR3fL212Q== dependencies: accepts "~1.3.8" array-flatten "1.1.1" body-parser "1.20.0" content-disposition "0.5.4" content-type "~1.0.4" cookie "0.5.0" cookie-signature "1.0.6" debug "2.6.9" depd "2.0.0" encodeurl "~1.0.2" escape-html "~1.0.3" etag "~1.8.1" finalhandler "1.2.0" fresh "0.5.2" http-errors "2.0.0" merge-descriptors "1.0.1" methods "~1.1.2" on-finished "2.4.1" parseurl "~1.3.3" path-to-regexp "0.1.7" proxy-addr "~2.0.7" qs "6.10.3" range-parser "~1.2.1" safe-buffer "5.2.1" send "0.18.0" serve-static "1.15.0" setprototypeof "1.2.0" statuses "2.0.1" type-is "~1.6.18" utils-merge "1.0.1" vary "~1.1.2" extend-shallow@^2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz" integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= dependencies: is-extendable "^0.1.0" extend@^3.0.0, extend@^3.0.2, extend@~3.0.0: version "3.0.2" resolved "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz" integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== extsprintf@1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" integrity sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g== extsprintf@^1.2.0: version "1.4.1" resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.1.tgz#8d172c064867f235c0c84a596806d279bf4bcc07" integrity sha512-Wrk35e8ydCKDj/ArClo1VrPVmN8zph5V4AtHwIuHhvMXsKf73UT3BOD+azBIW+3wOJ4FhEH7zyaJCFvChjYvMA== fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" resolved "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== fast-glob@^3.1.1, fast-glob@^3.2.11, fast-glob@^3.2.12, fast-glob@^3.2.9: version "3.2.12" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.2.12.tgz#7f39ec99c2e6ab030337142da9e0c18f37afae80" integrity sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w== dependencies: "@nodelib/fs.stat" "^2.0.2" "@nodelib/fs.walk" "^1.2.3" glob-parent "^5.1.2" merge2 "^1.3.0" micromatch "^4.0.4" fast-json-stable-stringify@^2.0.0: version "2.1.0" resolved "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz" integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== fast-url-parser@1.1.3: version "1.1.3" resolved "https://registry.npmjs.org/fast-url-parser/-/fast-url-parser-1.1.3.tgz" integrity sha1-9K8+qfNNiicc9YrSs3WfQx8LMY0= dependencies: punycode "^1.3.2" fastq@^1.6.0: version "1.13.0" resolved "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz" integrity sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw== dependencies: reusify "^1.0.4" faye-websocket@^0.11.3: version "0.11.4" resolved "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.4.tgz" integrity sha512-CzbClwlXAuiRQAlUyfqPgvPoNKTckTPGfwZV4ZdAhVcP2lh9KUxJg2b5GkE7XbjKQ3YJnQ9z6D9ntLAlB+tP8g== dependencies: websocket-driver ">=0.5.1" faye-websocket@~0.10.0: version "0.10.0" resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.10.0.tgz#4e492f8d04dfb6f89003507f6edbf2d501e7c6f4" integrity sha512-Xhj93RXbMSq8urNCUq4p9l0P6hnySJ/7YNRhYNug0bLOuii7pKO7xQFb5mx9xZXWCar88pLPb805PvUkwrLZpQ== dependencies: websocket-driver ">=0.5.1" fbemitter@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/fbemitter/-/fbemitter-3.0.0.tgz" integrity sha512-KWKaceCwKQU0+HPoop6gn4eOHk50bBv/VxjJtGMfwmJt3D29JpN4H4eisCtIPA+a8GVBam+ldMMpMjJUvpDyHw== dependencies: fbjs "^3.0.0" fbjs-css-vars@^1.0.0: version "1.0.2" resolved "https://registry.npmjs.org/fbjs-css-vars/-/fbjs-css-vars-1.0.2.tgz" integrity sha512-b2XGFAFdWZWg0phtAWLHCk836A1Xann+I+Dgd3Gk64MHKZO44FfoD1KxyvbSh0qZsIoXQGGlVztIY+oitJPpRQ== fbjs@^3.0.0: version "3.0.1" resolved "https://registry.npmjs.org/fbjs/-/fbjs-3.0.1.tgz" integrity sha512-8+vkGyT4lNDRKHQNPp0yh/6E7FfkLg89XqQbOYnvntRh+8RiSD43yrh9E5ejp1muCizTL4nDVG+y8W4e+LROHg== dependencies: cross-fetch "^3.0.4" fbjs-css-vars "^1.0.0" loose-envify "^1.0.0" object-assign "^4.1.0" promise "^7.1.1" setimmediate "^1.0.5" ua-parser-js "^0.7.30" feed@^4.2.2: version "4.2.2" resolved "https://registry.npmjs.org/feed/-/feed-4.2.2.tgz" integrity sha512-u5/sxGfiMfZNtJ3OvQpXcvotFpYkL0n9u9mM2vkui2nGo8b4wvDkJ8gAkYqbA8QpGyFCv3RK0Z+Iv+9veCS9bQ== dependencies: xml-js "^1.6.11" figures@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg== dependencies: escape-string-regexp "^1.0.5" file-loader@^6.2.0: version "6.2.0" resolved "https://registry.npmjs.org/file-loader/-/file-loader-6.2.0.tgz" integrity sha512-qo3glqyTa61Ytg4u73GultjHGjdRyig3tG6lPtyX/jOEJvHif9uB0/OCI2Kif6ctF3caQTW2G5gym21oAsI4pw== dependencies: loader-utils "^2.0.0" schema-utils "^3.0.0" file-sync-cmp@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/file-sync-cmp/-/file-sync-cmp-0.1.1.tgz#a5e7a8ffbfa493b43b923bbd4ca89a53b63b612b" integrity sha512-0k45oWBokCqh2MOexeYKpyqmGKG+8mQ2Wd8iawx+uWd/weWJQAZ6SoPybagdCI4xFisag8iAR77WPm4h3pTfxA== filesize@^8.0.6: version "8.0.7" resolved "https://registry.npmjs.org/filesize/-/filesize-8.0.7.tgz" integrity sha512-pjmC+bkIF8XI7fWaH8KxHcZL3DPybs1roSKP4rKDvy20tAWwIObE4+JIseG2byfGKhud5ZnM4YSGKBz7Sh0ndQ== fill-range@^7.0.1: version "7.0.1" resolved "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz" integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== dependencies: to-regex-range "^5.0.1" finalhandler@1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d" integrity sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA== dependencies: debug "2.6.9" encodeurl "~1.0.2" escape-html "~1.0.3" on-finished "~2.3.0" parseurl "~1.3.3" statuses "~1.5.0" unpipe "~1.0.0" finalhandler@1.2.0: version "1.2.0" resolved "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz" integrity sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg== dependencies: debug "2.6.9" encodeurl "~1.0.2" escape-html "~1.0.3" on-finished "2.4.1" parseurl "~1.3.3" statuses "2.0.1" unpipe "~1.0.0" find-cache-dir@^3.3.1: version "3.3.2" resolved "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz" integrity sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig== dependencies: commondir "^1.0.1" make-dir "^3.0.2" pkg-dir "^4.1.0" find-up@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz" integrity sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ== dependencies: locate-path "^2.0.0" find-up@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz" integrity sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg== dependencies: locate-path "^3.0.0" find-up@^4.0.0: version "4.1.0" resolved "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz" integrity sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw== dependencies: locate-path "^5.0.0" path-exists "^4.0.0" find-up@^5.0.0: version "5.0.0" resolved "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz" integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== dependencies: locate-path "^6.0.0" path-exists "^4.0.0" findup-sync@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-4.0.0.tgz#956c9cdde804052b881b428512905c4a5f2cdef0" integrity sha512-6jvvn/12IC4quLBL1KNokxC7wWTvYncaVUYSoxWw7YykPLuRrnv4qdHcSOywOI5RpkOVGeQRtWM8/q+G6W6qfQ== dependencies: detect-file "^1.0.0" is-glob "^4.0.0" micromatch "^4.0.2" resolve-dir "^1.0.1" findup-sync@~0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-0.3.0.tgz#37930aa5d816b777c03445e1966cc6790a4c0b16" integrity sha512-z8Nrwhi6wzxNMIbxlrTzuUW6KWuKkogZ/7OdDVq+0+kxn77KUH1nipx8iU6suqkHqc4y6n7a9A8IpmxY/pTjWg== dependencies: glob "~5.0.0" fined@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/fined/-/fined-1.2.0.tgz#d00beccf1aa2b475d16d423b0238b713a2c4a37b" integrity sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng== dependencies: expand-tilde "^2.0.2" is-plain-object "^2.0.3" object.defaults "^1.1.0" object.pick "^1.2.0" parse-filepath "^1.0.1" flagged-respawn@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/flagged-respawn/-/flagged-respawn-1.0.1.tgz#e7de6f1279ddd9ca9aac8a5971d618606b3aab41" integrity sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q== flush-write-stream@^1.0.0: version "1.1.1" resolved "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz" integrity sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w== dependencies: inherits "^2.0.3" readable-stream "^2.3.6" flux@^4.0.1: version "4.0.2" resolved "https://registry.npmjs.org/flux/-/flux-4.0.2.tgz" integrity sha512-u/ucO5ezm3nBvdaSGkWpDlzCePoV+a9x3KHmy13TV/5MzOaCZDN8Mfd94jmf0nOi8ZZay+nOKbBUkOe2VNaupQ== dependencies: fbemitter "^3.0.0" fbjs "^3.0.0" follow-redirects@^1.0.0: version "1.14.8" resolved "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.8.tgz" integrity sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA== follow-redirects@^1.14.7: version "1.14.9" resolved "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.9.tgz" integrity sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w== for-in@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" integrity sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ== for-own@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/for-own/-/for-own-1.0.0.tgz#c63332f415cedc4b04dbfe70cf836494c53cb44b" integrity sha512-0OABksIGrxKK8K4kynWkQ7y1zounQxP+CWnyclVwj81KW3vlLlGUx57DKGcP/LH216GzqnstnPocF16Nxs0Ycg== dependencies: for-in "^1.0.1" forever-agent@~0.6.1: version "0.6.1" resolved "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz" integrity sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw== fork-ts-checker-webpack-plugin@^6.5.0: version "6.5.0" resolved "https://registry.npmjs.org/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-6.5.0.tgz" integrity sha512-cS178Y+xxtIjEUorcHddKS7yCMlrDPV31mt47blKKRfMd70Kxu5xruAFE2o9sDY6wVC5deuob/u/alD04YYHnw== dependencies: "@babel/code-frame" "^7.8.3" "@types/json-schema" "^7.0.5" chalk "^4.1.0" chokidar "^3.4.2" cosmiconfig "^6.0.0" deepmerge "^4.2.2" fs-extra "^9.0.0" glob "^7.1.6" memfs "^3.1.2" minimatch "^3.0.4" schema-utils "2.7.0" semver "^7.3.2" tapable "^1.0.0" form-data@^2.2.0: version "2.5.1" resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.5.1.tgz#f2cbec57b5e59e23716e128fe44d4e5dd23895f4" integrity sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA== dependencies: asynckit "^0.4.0" combined-stream "^1.0.6" mime-types "^2.1.12" form-data@~2.1.1: version "2.1.4" resolved "https://registry.npmjs.org/form-data/-/form-data-2.1.4.tgz" integrity sha512-8HWGSLAPr+AG0hBpsqi5Ob8HrLStN/LWeqhpFl14d7FJgHK48TmgLoALPz69XSUR65YJzDfLUX/BM8+MLJLghQ== dependencies: asynckit "^0.4.0" combined-stream "^1.0.5" mime-types "^2.1.12" forwarded@0.2.0: version "0.2.0" resolved "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz" integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow== fraction.js@^4.2.0: version "4.2.0" resolved "https://registry.npmjs.org/fraction.js/-/fraction.js-4.2.0.tgz" integrity sha512-MhLuK+2gUcnZe8ZHlaaINnQLl0xRIGRfcGk2yl8xoQAfHrSsL3rYu6FCmBdkdbhc9EPlwyGHewaRsvwRMJtAlA== fresh@0.5.2: version "0.5.2" resolved "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz" integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= from2@^1.3.0: version "1.3.0" resolved "https://registry.npmjs.org/from2/-/from2-1.3.0.tgz" integrity sha512-1eKYoECvhpM4IT70THQV8XNfmZoIlnROymbwOSazfmQO3kK+zCV+LSqUDzl7gDo3MZddCFeVa9Zg3Hi6FXqcgg== dependencies: inherits "~2.0.1" readable-stream "~1.1.10" from2@^2.1.0: version "2.3.0" resolved "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz" integrity sha512-OMcX/4IC/uqEPVgGeyfN22LJk6AZrMkRZHxcHBMBvHScDGgwTm2GT2Wkgtocyd3JfZffjj2kYUDXXII0Fk9W0g== dependencies: inherits "^2.0.1" readable-stream "^2.0.0" fs-constants@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== fs-extra@^10.0.0, fs-extra@^10.1.0: version "10.1.0" resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz" integrity sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ== dependencies: graceful-fs "^4.2.0" jsonfile "^6.0.1" universalify "^2.0.0" fs-extra@^9.0.0: version "9.1.0" resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz" integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== dependencies: at-least-node "^1.0.0" graceful-fs "^4.2.0" jsonfile "^6.0.1" universalify "^2.0.0" fs-monkey@1.0.3: version "1.0.3" resolved "https://registry.npmjs.org/fs-monkey/-/fs-monkey-1.0.3.tgz" integrity sha512-cybjIfiiE+pTWicSCLFHSrXZ6EilF30oh91FDP9S2B051prEa7QWfrVTQm10/dDpswBDXZugPa1Ogu8Yh+HV0Q== fs-vacuum@~1.2.10: version "1.2.10" resolved "https://registry.npmjs.org/fs-vacuum/-/fs-vacuum-1.2.10.tgz" integrity sha512-bwbv1FcWYwxN1F08I1THN8nS4Qe/pGq0gM8dy1J34vpxxp3qgZKJPPaqex36RyZO0sD2J+2ocnbwC2d/OjYICQ== dependencies: graceful-fs "^4.1.2" path-is-inside "^1.0.1" rimraf "^2.5.2" fs-write-stream-atomic@^1.0.8, fs-write-stream-atomic@~1.0.10: version "1.0.10" resolved "https://registry.npmjs.org/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz" integrity sha512-gehEzmPn2nAwr39eay+x3X34Ra+M2QlVUTLhkXPjWdeO8RF9kszk116avgBJM3ZyNHgHXBNx+VmPaFC36k0PzA== dependencies: graceful-fs "^4.1.2" iferr "^0.1.5" imurmurhash "^0.1.4" readable-stream "1 || 2" fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= fsevents@~2.3.2: version "2.3.2" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== fstream-ignore@^1.0.0: version "1.0.5" resolved "https://registry.npmjs.org/fstream-ignore/-/fstream-ignore-1.0.5.tgz" integrity sha512-VVRuOs41VUqptEGiR0N5ZoWEcfGvbGRqLINyZAhHRnF3DH5wrqjNkYr3VbRoZnI41BZgO7zIVdiobc13TVI1ow== dependencies: fstream "^1.0.0" inherits "2" minimatch "^3.0.0" fstream-npm@~1.2.1: version "1.2.1" resolved "https://registry.npmjs.org/fstream-npm/-/fstream-npm-1.2.1.tgz" integrity sha512-iBHpm/LmD1qw0TlHMAqVd9rwdU6M+EHRUnPkXpRi5G/Hf0FIFH+oZFryodAU2MFNfGRh/CzhUFlMKV3pdeOTDw== dependencies: fstream-ignore "^1.0.0" inherits "2" fstream@^1.0.0, fstream@^1.0.12, fstream@~1.0.11: version "1.0.12" resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.12.tgz#4e8ba8ee2d48be4f7d0de505455548eae5932045" integrity sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg== dependencies: graceful-fs "^4.1.2" inherits "~2.0.0" mkdirp ">=0.5 0" rimraf "2" function-bind@^1.1.1: version "1.1.1" resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== gauge@~2.7.3: version "2.7.4" resolved "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz" integrity sha512-14x4kjc6lkD3ltw589k0NrPD6cCNTD6CWoVUNpB85+DrtONoZn+Rug6xZU5RvSC4+TZPxA5AnBibQYAvZn41Hg== dependencies: aproba "^1.0.3" console-control-strings "^1.0.0" has-unicode "^2.0.0" object-assign "^4.1.0" signal-exit "^3.0.0" string-width "^1.0.1" strip-ansi "^3.0.1" wide-align "^1.1.0" gaze@^1.1.0: version "1.1.3" resolved "https://registry.yarnpkg.com/gaze/-/gaze-1.1.3.tgz#c441733e13b927ac8c0ff0b4c3b033f28812924a" integrity sha512-BRdNm8hbWzFzWHERTrejLqwHDfS4GibPoq5wjTPIoJHoBtKGPg3xAFfxmM+9ztbXelxcf2hwQcaz1PtmFeue8g== dependencies: globule "^1.0.0" genfun@^4.0.1: version "4.0.1" resolved "https://registry.npmjs.org/genfun/-/genfun-4.0.1.tgz" integrity sha512-48yv1eDS5Qrz6cbSDBBik0u7jCgC/eA9eZrl9MIN1LfKzFTuGt6EHgr31YM8yT9cjb5BplXb4Iz3VtOYmgt8Jg== gensync@^1.0.0-beta.1, gensync@^1.0.0-beta.2: version "1.0.0-beta.2" resolved "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz" integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== get-caller-file@^1.0.1: version "1.0.3" resolved "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz" integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w== get-intrinsic@^1.0.2: version "1.1.1" resolved "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz" integrity sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q== dependencies: function-bind "^1.1.1" has "^1.0.3" has-symbols "^1.0.1" get-own-enumerable-property-symbols@^3.0.0: version "3.0.2" resolved "https://registry.npmjs.org/get-own-enumerable-property-symbols/-/get-own-enumerable-property-symbols-3.0.2.tgz" integrity sha512-I0UBV/XOz1XkIJHEUDMZAbzCThU/H8DxmSfmdGcKPnVhu2VfFqr34jr9777IyaTYvxjedWhqVIilEDsCdP5G6g== get-port@^3.1.0: version "3.2.0" resolved "https://registry.yarnpkg.com/get-port/-/get-port-3.2.0.tgz#dd7ce7de187c06c8bf353796ac71e099f0980ebc" integrity sha512-x5UJKlgeUiNT8nyo/AcnwLnZuZNcSjSw0kogRB+Whd1fjjFq4B1hySFxSFWWSn4mIBzg3sRNUDFYc4g5gjPoLg== get-stream@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz" integrity sha512-GlhdIUuVakc8SJ6kK0zAFbiGzRFzNnY4jUuEbV9UROo4Y+0Ny4fjvcZFVTeDA4odpFyOQzaw6hXukJSq/f28sQ== get-stream@^4.0.0, get-stream@^4.1.0: version "4.1.0" resolved "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz" integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w== dependencies: pump "^3.0.0" get-stream@^5.1.0: version "5.2.0" resolved "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz" integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA== dependencies: pump "^3.0.0" get-stream@^6.0.0: version "6.0.1" resolved "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz" integrity sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg== getobject@~1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/getobject/-/getobject-1.0.2.tgz#25ec87a50370f6dcc3c6ba7ef43c4c16215c4c89" integrity sha512-2zblDBaFcb3rB4rF77XVnuINOE2h2k/OnqXAiy0IrTxUfV1iFp3la33oAQVY9pCpWU268WFYVt2t71hlMuLsOg== getpass@^0.1.1: version "0.1.7" resolved "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz" integrity sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng== dependencies: assert-plus "^1.0.0" github-slugger@^1.4.0: version "1.4.0" resolved "https://registry.npmjs.org/github-slugger/-/github-slugger-1.4.0.tgz" integrity sha512-w0dzqw/nt51xMVmlaV1+JRzN+oCa1KfcgGEWhxUG16wbdA+Xnt/yoFO8Z8x/V82ZcZ0wy6ln9QDup5avbhiDhQ== glob-parent@^5.1.2, glob-parent@~5.1.2: version "5.1.2" resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz" integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== dependencies: is-glob "^4.0.1" glob-parent@^6.0.1: version "6.0.2" resolved "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz" integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== dependencies: is-glob "^4.0.3" glob-to-regexp@^0.4.1: version "0.4.1" resolved "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz" integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== glob@^7.0.0, glob@^7.1.3, glob@^7.1.6: version "7.2.0" resolved "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz" integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" inherits "2" minimatch "^3.0.4" once "^1.3.0" path-is-absolute "^1.0.0" glob@^7.0.3, glob@^7.1.1, glob@^7.1.2: version "7.2.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" integrity sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" inherits "2" minimatch "^3.1.1" once "^1.3.0" path-is-absolute "^1.0.0" glob@^8.0.3: version "8.0.3" resolved "https://registry.yarnpkg.com/glob/-/glob-8.0.3.tgz#415c6eb2deed9e502c68fa44a272e6da6eeca42e" integrity sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" inherits "2" minimatch "^5.0.1" once "^1.3.0" glob@~5.0.0: version "5.0.15" resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" integrity sha512-c9IPMazfRITpmAAKi22dK1VKxGDX9ehhqfABDriL/lzO92xcUKEJPQHrVA/2YHSNFB4iFlykVmWvwo48nr3OxA== dependencies: inflight "^1.0.4" inherits "2" minimatch "2 || 3" once "^1.3.0" path-is-absolute "^1.0.0" glob@~7.1.1, glob@~7.1.2, glob@~7.1.6: version "7.1.7" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ== dependencies: fs.realpath "^1.0.0" inflight "^1.0.4" inherits "2" minimatch "^3.0.4" once "^1.3.0" path-is-absolute "^1.0.0" global-dirs@^0.1.0: version "0.1.1" resolved "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz" integrity sha512-NknMLn7F2J7aflwFOlGdNIuCDpN3VGoSoB+aap3KABFWbHVn1TCgFC+np23J8W2BiZbjfEw3BFBycSMv1AFblg== dependencies: ini "^1.3.4" global-dirs@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/global-dirs/-/global-dirs-3.0.0.tgz" integrity sha512-v8ho2DS5RiCjftj1nD9NmnfaOzTdud7RRnVd9kFNOjqZbISlx5DQ+OrTkywgd0dIt7oFCvKetZSHoHcP3sDdiA== dependencies: ini "2.0.0" global-modules@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-1.0.0.tgz#6d770f0eb523ac78164d72b5e71a8877265cc3ea" integrity sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg== dependencies: global-prefix "^1.0.1" is-windows "^1.0.1" resolve-dir "^1.0.0" global-modules@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz" integrity sha512-NGbfmJBp9x8IxyJSd1P+otYK8vonoJactOogrVfFRIAEY1ukil8RSKDz2Yo7wh1oihl51l/r6W4epkeKJHqL8A== dependencies: global-prefix "^3.0.0" global-prefix@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-1.0.2.tgz#dbf743c6c14992593c655568cb66ed32c0122ebe" integrity sha512-5lsx1NUDHtSjfg0eHlmYvZKv8/nVqX4ckFbM+FrGcQ+04KWcWFo9P5MxPZYSzUvyzmdTbI7Eix8Q4IbELDqzKg== dependencies: expand-tilde "^2.0.2" homedir-polyfill "^1.0.1" ini "^1.3.4" is-windows "^1.0.1" which "^1.2.14" global-prefix@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/global-prefix/-/global-prefix-3.0.0.tgz" integrity sha512-awConJSVCHVGND6x3tmMaKcQvwXLhjdkmomy2W+Goaui8YPgYgXJZewhg3fWC+DlfqqQuWg8AwqjGTD2nAPVWg== dependencies: ini "^1.3.5" kind-of "^6.0.2" which "^1.3.1" globals@^11.1.0: version "11.12.0" resolved "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== globby@11.1.0, globby@^11.1.0: version "11.1.0" resolved "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz" integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== dependencies: array-union "^2.1.0" dir-glob "^3.0.1" fast-glob "^3.2.9" ignore "^5.2.0" merge2 "^1.4.1" slash "^3.0.0" globby@^11.0.1, globby@^11.0.4: version "11.0.4" resolved "https://registry.npmjs.org/globby/-/globby-11.0.4.tgz" integrity sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg== dependencies: array-union "^2.1.0" dir-glob "^3.0.1" fast-glob "^3.1.1" ignore "^5.1.4" merge2 "^1.3.0" slash "^3.0.0" globby@^13.1.1: version "13.1.2" resolved "https://registry.npmjs.org/globby/-/globby-13.1.2.tgz" integrity sha512-LKSDZXToac40u8Q1PQtZihbNdTYSNMuWe+K5l+oa6KgDzSvVrHXlJy40hUP522RjAIoNLJYBJi7ow+rbFpIhHQ== dependencies: dir-glob "^3.0.1" fast-glob "^3.2.11" ignore "^5.2.0" merge2 "^1.4.1" slash "^4.0.0" globule@^1.0.0: version "1.3.4" resolved "https://registry.yarnpkg.com/globule/-/globule-1.3.4.tgz#7c11c43056055a75a6e68294453c17f2796170fb" integrity sha512-OPTIfhMBh7JbBYDpa5b+Q5ptmMWKwcNcFSR/0c6t8V4f3ZAVBEsKNY37QdVqmLRYSMhOUGYrY0QhSoEpzGr/Eg== dependencies: glob "~7.1.1" lodash "^4.17.21" minimatch "~3.0.2" got@^6.7.1: version "6.7.1" resolved "https://registry.npmjs.org/got/-/got-6.7.1.tgz" integrity sha512-Y/K3EDuiQN9rTZhBvPRWMLXIKdeD1Rj0nzunfoi0Yyn5WBEbzxXKU9Ub2X41oZBagVWOBU3MuDonFMgPWQFnwg== dependencies: create-error-class "^3.0.0" duplexer3 "^0.1.4" get-stream "^3.0.0" is-redirect "^1.0.0" is-retry-allowed "^1.0.0" is-stream "^1.0.0" lowercase-keys "^1.0.0" safe-buffer "^5.0.1" timed-out "^4.0.0" unzip-response "^2.0.1" url-parse-lax "^1.0.0" got@^9.6.0: version "9.6.0" resolved "https://registry.npmjs.org/got/-/got-9.6.0.tgz" integrity sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q== dependencies: "@sindresorhus/is" "^0.14.0" "@szmarczak/http-timer" "^1.1.2" cacheable-request "^6.0.0" decompress-response "^3.3.0" duplexer3 "^0.1.4" get-stream "^4.1.0" lowercase-keys "^1.0.1" mimic-response "^1.0.1" p-cancelable "^1.0.0" to-readable-stream "^1.0.0" url-parse-lax "^3.0.0" graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4, graceful-fs@^4.2.6, graceful-fs@^4.2.9, graceful-fs@~4.2.10: version "4.2.10" resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz" integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== graceful-fs@~4.1.11: version "4.1.15" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00" integrity sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA== graphql-scalars@^1.15.0: version "1.20.1" resolved "https://registry.yarnpkg.com/graphql-scalars/-/graphql-scalars-1.20.1.tgz#295817deff224ac0562545858e370447b97e7457" integrity sha512-HCSosMh8l/DVYL3/wCesnZOb+gbiaO/XlZQEIKOkWDJUGBrc15xWAs5TCQVmrycT0tbEInii+J8eoOyMwxx8zg== dependencies: tslib "~2.4.0" graphql@^16.3.0: version "16.6.0" resolved "https://registry.yarnpkg.com/graphql/-/graphql-16.6.0.tgz#c2dcffa4649db149f6282af726c8c83f1c7c5fdb" integrity sha512-KPIBPDlW7NxrbT/eh4qPXz5FiFdL5UbaA0XUNz2Rp3Z3hqBSkbj0GVjwFDztsWVauZUWsbKHgMg++sk8UX0bkw== gray-matter@^4.0.3: version "4.0.3" resolved "https://registry.npmjs.org/gray-matter/-/gray-matter-4.0.3.tgz" integrity sha512-5v6yZd4JK3eMI3FqqCouswVqwugaA9r4dNZB1wwcmrD02QkV5H0y7XBQW8QwQqEaZY1pM9aqORSORhJRdNK44Q== dependencies: js-yaml "^3.13.1" kind-of "^6.0.2" section-matter "^1.0.0" strip-bom-string "^1.0.0" grunt-cli@~1.4.3: version "1.4.3" resolved "https://registry.yarnpkg.com/grunt-cli/-/grunt-cli-1.4.3.tgz#22c9f1a3d2780bf9b0d206e832e40f8f499175ff" integrity sha512-9Dtx/AhVeB4LYzsViCjUQkd0Kw0McN2gYpdmGYKtE2a5Yt7v1Q+HYZVWhqXc/kGnxlMtqKDxSwotiGeFmkrCoQ== dependencies: grunt-known-options "~2.0.0" interpret "~1.1.0" liftup "~3.0.1" nopt "~4.0.1" v8flags "~3.2.0" grunt-contrib-clean@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/grunt-contrib-clean/-/grunt-contrib-clean-2.0.1.tgz#062e8019d31bfca35af8929a2ee1063c6c46dd2d" integrity sha512-uRvnXfhiZt8akb/ZRDHJpQQtkkVkqc/opWO4Po/9ehC2hPxgptB9S6JHDC/Nxswo4CJSM0iFPT/Iym3cEMWzKA== dependencies: async "^3.2.3" rimraf "^2.6.2" grunt-contrib-concat@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/grunt-contrib-concat/-/grunt-contrib-concat-2.1.0.tgz#9ac62117a18b48d1bfccb3eef46c960bbd163d75" integrity sha512-Vnl95JIOxfhEN7bnYIlCgQz41kkbi7tsZ/9a4usZmxNxi1S2YAIOy8ysFmO8u4MN26Apal1O106BwARdaNxXQw== dependencies: chalk "^4.1.2" source-map "^0.5.3" grunt-contrib-connect@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/grunt-contrib-connect/-/grunt-contrib-connect-3.0.0.tgz#720e9ef39f976b804baf994345c2f6ecfdf3b264" integrity sha512-L1GXk6PqDP/meX0IOX1MByBvOph6h8Pvx4/iBIYD7dpokVCAAQPR/IIV1jkTONEM09xig/Y8/y3R9Fqc8U3HSA== dependencies: async "^3.2.0" connect "^3.7.0" connect-livereload "^0.6.1" morgan "^1.10.0" node-http2 "^4.0.1" opn "^6.0.0" portscanner "^2.2.0" serve-index "^1.9.1" serve-static "^1.14.1" grunt-contrib-copy@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/grunt-contrib-copy/-/grunt-contrib-copy-1.0.0.tgz#7060c6581e904b8ab0d00f076e0a8f6e3e7c3573" integrity sha512-gFRFUB0ZbLcjKb67Magz1yOHGBkyU6uL29hiEW1tdQ9gQt72NuMKIy/kS6dsCbV0cZ0maNCb0s6y+uT1FKU7jA== dependencies: chalk "^1.1.1" file-sync-cmp "^0.1.0" grunt-contrib-cssmin@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/grunt-contrib-cssmin/-/grunt-contrib-cssmin-5.0.0.tgz#c572bc20e8d085fcd66fc1c53dcd20d2c6e9b547" integrity sha512-SNp4H4+85mm2xaHYi83FBHuOXylpi5vcwgtNoYCZBbkgeXQXoeTAKa59VODRb0woTDBvxouP91Ff5PzCkikg6g== dependencies: chalk "^4.1.2" clean-css "^5.3.2" maxmin "^3.0.0" grunt-contrib-uglify@^5.0.1: version "5.2.2" resolved "https://registry.yarnpkg.com/grunt-contrib-uglify/-/grunt-contrib-uglify-5.2.2.tgz#447c0b58451a1fca20768371e07e723a870dfe98" integrity sha512-ITxiWxrjjP+RZu/aJ5GLvdele+sxlznh+6fK9Qckio5ma8f7Iv8woZjRkGfafvpuygxNefOJNc+hfjjBayRn2Q== dependencies: chalk "^4.1.2" maxmin "^3.0.0" uglify-js "^3.16.1" uri-path "^1.0.0" grunt-contrib-watch@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/grunt-contrib-watch/-/grunt-contrib-watch-1.1.0.tgz#c143ca5b824b288a024b856639a5345aedb78ed4" integrity sha512-yGweN+0DW5yM+oo58fRu/XIRrPcn3r4tQx+nL7eMRwjpvk+rQY6R8o94BPK0i2UhTg9FN21hS+m8vR8v9vXfeg== dependencies: async "^2.6.0" gaze "^1.1.0" lodash "^4.17.10" tiny-lr "^1.1.1" grunt-known-options@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/grunt-known-options/-/grunt-known-options-2.0.0.tgz#cac641e897f9a0a680b8c9839803d35f3325103c" integrity sha512-GD7cTz0I4SAede1/+pAbmJRG44zFLPipVtdL9o3vqx9IEyb7b4/Y3s7r6ofI3CchR5GvYJ+8buCSioDv5dQLiA== grunt-legacy-log-utils@~2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/grunt-legacy-log-utils/-/grunt-legacy-log-utils-2.1.0.tgz#49a8c7dc74051476dcc116c32faf9db8646856ef" integrity sha512-lwquaPXJtKQk0rUM1IQAop5noEpwFqOXasVoedLeNzaibf/OPWjKYvvdqnEHNmU+0T0CaReAXIbGo747ZD+Aaw== dependencies: chalk "~4.1.0" lodash "~4.17.19" grunt-legacy-log@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/grunt-legacy-log/-/grunt-legacy-log-3.0.0.tgz#1c6eaf92371ea415af31ea84ce50d434ef6d39c4" integrity sha512-GHZQzZmhyq0u3hr7aHW4qUH0xDzwp2YXldLPZTCjlOeGscAOWWPftZG3XioW8MasGp+OBRIu39LFx14SLjXRcA== dependencies: colors "~1.1.2" grunt-legacy-log-utils "~2.1.0" hooker "~0.2.3" lodash "~4.17.19" grunt-legacy-util@~2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/grunt-legacy-util/-/grunt-legacy-util-2.0.1.tgz#0f929d13a2faf9988c9917c82bff609e2d9ba255" integrity sha512-2bQiD4fzXqX8rhNdXkAywCadeqiPiay0oQny77wA2F3WF4grPJXCvAcyoWUJV+po/b15glGkxuSiQCK299UC2w== dependencies: async "~3.2.0" exit "~0.1.2" getobject "~1.0.0" hooker "~0.2.3" lodash "~4.17.21" underscore.string "~3.3.5" which "~2.0.2" grunt-sass@^3.0.2: version "3.1.0" resolved "https://registry.yarnpkg.com/grunt-sass/-/grunt-sass-3.1.0.tgz#a5936cc2a80ec08092d9f31c101dc307d1e4f71c" integrity sha512-90s27H7FoCDcA8C8+R0GwC+ntYD3lG6S/jqcavWm3bn9RiJTmSfOvfbFa1PXx4NbBWuiGQMLfQTj/JvvqT5w6A== grunt@~1.5.3: version "1.5.3" resolved "https://registry.yarnpkg.com/grunt/-/grunt-1.5.3.tgz#3214101d11257b7e83cf2b38ea173b824deab76a" integrity sha512-mKwmo4X2d8/4c/BmcOETHek675uOqw0RuA/zy12jaspWqvTp4+ZeQF1W+OTpcbncnaBsfbQJ6l0l4j+Sn/GmaQ== dependencies: dateformat "~3.0.3" eventemitter2 "~0.4.13" exit "~0.1.2" findup-sync "~0.3.0" glob "~7.1.6" grunt-cli "~1.4.3" grunt-known-options "~2.0.0" grunt-legacy-log "~3.0.0" grunt-legacy-util "~2.0.1" iconv-lite "~0.4.13" js-yaml "~3.14.0" minimatch "~3.0.4" mkdirp "~1.0.4" nopt "~3.0.6" rimraf "~3.0.2" gzip-size@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-5.1.1.tgz#cb9bee692f87c0612b232840a873904e4c135274" integrity sha512-FNHi6mmoHvs1mxZAds4PpdCS6QG8B4C1krxJsMutgxl5t3+GlRTzzI3NEkifXx2pVsOvJdOGSmIgDhQ55FwdPA== dependencies: duplexer "^0.1.1" pify "^4.0.1" gzip-size@^6.0.0: version "6.0.0" resolved "https://registry.npmjs.org/gzip-size/-/gzip-size-6.0.0.tgz" integrity sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q== dependencies: duplexer "^0.1.2" handle-thing@^2.0.0: version "2.0.1" resolved "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.1.tgz" integrity sha512-9Qn4yBxelxoh2Ow62nP+Ka/kMnOXRi8BXnRaUwezLNhqelnN49xKz4F/dPP8OYLxLxq6JDtZb2i9XznUQbNPTg== handlebars@^4.7.7: version "4.7.7" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.7.tgz#9ce33416aad02dbd6c8fafa8240d5d98004945a1" integrity sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA== dependencies: minimist "^1.2.5" neo-async "^2.6.0" source-map "^0.6.1" wordwrap "^1.0.0" optionalDependencies: uglify-js "^3.1.4" har-schema@^1.0.5: version "1.0.5" resolved "https://registry.npmjs.org/har-schema/-/har-schema-1.0.5.tgz" integrity sha512-f8xf2GOR6Rgwc9FPTLNzgwB+JQ2/zMauYXSWmX5YV5acex6VomT0ocSuwR7BfXo5MpHi+jL+saaux2fwsGJDKQ== har-validator@~4.2.1: version "4.2.1" resolved "https://registry.npmjs.org/har-validator/-/har-validator-4.2.1.tgz" integrity sha512-5Gbp6RAftMYYV3UEI4c4Vv3+a4dQ7taVyvHt+/L6kRt+f4HX1GweAk5UDWN0SvdVnRBzGQ6OG89pGaD9uSFnVw== dependencies: ajv "^4.9.1" har-schema "^1.0.5" has-ansi@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz" integrity sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg== dependencies: ansi-regex "^2.0.0" has-flag@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz" integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= has-flag@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== has-symbols@^1.0.1: version "1.0.2" resolved "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz" integrity sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw== has-unicode@^2.0.0, has-unicode@~2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz" integrity sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ== has-yarn@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/has-yarn/-/has-yarn-2.1.0.tgz" integrity sha512-UqBRqi4ju7T+TqGNdqAO0PaSVGsDGJUBQvk9eUWNGRY1CFGDzYhLWoM7JQEemnlvVcv/YEmc2wNW8BC24EnUsw== has@^1.0.3: version "1.0.3" resolved "https://registry.npmjs.org/has/-/has-1.0.3.tgz" integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== dependencies: function-bind "^1.1.1" hast-to-hyperscript@^9.0.0: version "9.0.1" resolved "https://registry.npmjs.org/hast-to-hyperscript/-/hast-to-hyperscript-9.0.1.tgz" integrity sha512-zQgLKqF+O2F72S1aa4y2ivxzSlko3MAvxkwG8ehGmNiqd98BIN3JM1rAJPmplEyLmGLO2QZYJtIneOSZ2YbJuA== dependencies: "@types/unist" "^2.0.3" comma-separated-tokens "^1.0.0" property-information "^5.3.0" space-separated-tokens "^1.0.0" style-to-object "^0.3.0" unist-util-is "^4.0.0" web-namespaces "^1.0.0" hast-util-from-parse5@^6.0.0: version "6.0.1" resolved "https://registry.npmjs.org/hast-util-from-parse5/-/hast-util-from-parse5-6.0.1.tgz" integrity sha512-jeJUWiN5pSxW12Rh01smtVkZgZr33wBokLzKLwinYOUfSzm1Nl/c3GUGebDyOKjdsRgMvoVbV0VpAcpjF4NrJA== dependencies: "@types/parse5" "^5.0.0" hastscript "^6.0.0" property-information "^5.0.0" vfile "^4.0.0" vfile-location "^3.2.0" web-namespaces "^1.0.0" hast-util-parse-selector@^2.0.0: version "2.2.5" resolved "https://registry.npmjs.org/hast-util-parse-selector/-/hast-util-parse-selector-2.2.5.tgz" integrity sha512-7j6mrk/qqkSehsM92wQjdIgWM2/BW61u/53G6xmC8i1OmEdKLHbk419QKQUjz6LglWsfqoiHmyMRkP1BGjecNQ== hast-util-raw@6.0.1: version "6.0.1" resolved "https://registry.npmjs.org/hast-util-raw/-/hast-util-raw-6.0.1.tgz" integrity sha512-ZMuiYA+UF7BXBtsTBNcLBF5HzXzkyE6MLzJnL605LKE8GJylNjGc4jjxazAHUtcwT5/CEt6afRKViYB4X66dig== dependencies: "@types/hast" "^2.0.0" hast-util-from-parse5 "^6.0.0" hast-util-to-parse5 "^6.0.0" html-void-elements "^1.0.0" parse5 "^6.0.0" unist-util-position "^3.0.0" vfile "^4.0.0" web-namespaces "^1.0.0" xtend "^4.0.0" zwitch "^1.0.0" hast-util-to-parse5@^6.0.0: version "6.0.0" resolved "https://registry.npmjs.org/hast-util-to-parse5/-/hast-util-to-parse5-6.0.0.tgz" integrity sha512-Lu5m6Lgm/fWuz8eWnrKezHtVY83JeRGaNQ2kn9aJgqaxvVkFCZQBEhgodZUDUvoodgyROHDb3r5IxAEdl6suJQ== dependencies: hast-to-hyperscript "^9.0.0" property-information "^5.0.0" web-namespaces "^1.0.0" xtend "^4.0.0" zwitch "^1.0.0" hastscript@^6.0.0: version "6.0.0" resolved "https://registry.npmjs.org/hastscript/-/hastscript-6.0.0.tgz" integrity sha512-nDM6bvd7lIqDUiYEiu5Sl/+6ReP0BMk/2f4U/Rooccxkj0P5nm+acM5PrGJ/t5I8qPGiqZSE6hVAwZEdZIvP4w== dependencies: "@types/hast" "^2.0.0" comma-separated-tokens "^1.0.0" hast-util-parse-selector "^2.0.0" property-information "^5.0.0" space-separated-tokens "^1.0.0" hawk@~3.1.3: version "3.1.3" resolved "https://registry.npmjs.org/hawk/-/hawk-3.1.3.tgz" integrity sha512-X8xbmTc1cbPXcQV4WkLcRMALuyoxhfpFATmyuCxJPOAvrDS4DNnsTAOmKUxMTOWU6TzrTOkxPKwIx5ZOpJVSrg== dependencies: boom "2.x.x" cryptiles "2.x.x" hoek "2.x.x" sntp "1.x.x" he@^1.2.0: version "1.2.0" resolved "https://registry.npmjs.org/he/-/he-1.2.0.tgz" integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== highlight.js@^11.4.0: version "11.6.0" resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-11.6.0.tgz#a50e9da05763f1bb0c1322c8f4f755242cff3f5a" integrity sha512-ig1eqDzJaB0pqEvlPVIpSSyMaO92bH1N2rJpLMN/nX396wTpDA4Eq0uK+7I/2XG17pFaaKE0kjV/XPeGt7Evjw== history@^4.9.0: version "4.10.1" resolved "https://registry.npmjs.org/history/-/history-4.10.1.tgz" integrity sha512-36nwAD620w12kuzPAsyINPWJqlNbij+hpK1k9XRloDtym8mxzGYl2c17LnV6IAGB2Dmg4tEa7G7DlawS0+qjew== dependencies: "@babel/runtime" "^7.1.2" loose-envify "^1.2.0" resolve-pathname "^3.0.0" tiny-invariant "^1.0.2" tiny-warning "^1.0.0" value-equal "^1.0.1" hoek@2.x.x: version "2.16.3" resolved "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz" integrity sha512-V6Yw1rIcYV/4JsnggjBU0l4Kr+EXhpwqXRusENU1Xx6ro00IHPHYNynCuBTOZAPlr3AAmLvchH9I7N/VUdvOwQ== hoist-non-react-statics@^3.1.0: version "3.3.2" resolved "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz" integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw== dependencies: react-is "^16.7.0" homedir-polyfill@^1.0.1: version "1.0.3" resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz#743298cef4e5af3e194161fbadcc2151d3a058e8" integrity sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA== dependencies: parse-passwd "^1.0.0" hooker@~0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/hooker/-/hooker-0.2.3.tgz#b834f723cc4a242aa65963459df6d984c5d3d959" integrity sha512-t+UerCsQviSymAInD01Pw+Dn/usmz1sRO+3Zk1+lx8eg+WKpD2ulcwWqHHL0+aseRBr+3+vIhiG1K1JTwaIcTA== hosted-git-info@^2.1.4, hosted-git-info@^2.4.2, hosted-git-info@~2.5.0: version "2.5.0" resolved "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz" integrity sha512-pNgbURSuab90KbTqvRPsseaTxOJCZBD0a7t+haSN33piP9cCM4l0CqdzAif2hUqm716UovKB2ROmiabGAKVXyg== hosted-git-info@^2.7.1: version "2.8.9" resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw== hpack.js@^2.1.6: version "2.1.6" resolved "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz" integrity sha1-h3dMCUnlE/QuhFdbPEVoH63ioLI= dependencies: inherits "^2.0.1" obuf "^1.0.0" readable-stream "^2.0.1" wbuf "^1.1.0" html-entities@^2.3.2: version "2.3.2" resolved "https://registry.npmjs.org/html-entities/-/html-entities-2.3.2.tgz" integrity sha512-c3Ab/url5ksaT0WyleslpBEthOzWhrjQbg75y7XUsfSzi3Dgzt0l8w5e7DylRn15MTlMMD58dTfzddNS2kcAjQ== html-minifier-terser@^6.0.2, html-minifier-terser@^6.1.0: version "6.1.0" resolved "https://registry.npmjs.org/html-minifier-terser/-/html-minifier-terser-6.1.0.tgz" integrity sha512-YXxSlJBZTP7RS3tWnQw74ooKa6L9b9i9QYXY21eUEvhZ3u9XLfv6OnFsQq6RxkhHygsaUMvYsZRV5rU/OVNZxw== dependencies: camel-case "^4.1.2" clean-css "^5.2.2" commander "^8.3.0" he "^1.2.0" param-case "^3.0.4" relateurl "^0.2.7" terser "^5.10.0" html-tags@^3.2.0: version "3.2.0" resolved "https://registry.npmjs.org/html-tags/-/html-tags-3.2.0.tgz" integrity sha512-vy7ClnArOZwCnqZgvv+ddgHgJiAFXe3Ge9ML5/mBctVJoUoYPCdxVucOywjDARn6CVoh3dRSFdPHy2sX80L0Wg== html-void-elements@^1.0.0: version "1.0.5" resolved "https://registry.npmjs.org/html-void-elements/-/html-void-elements-1.0.5.tgz" integrity sha512-uE/TxKuyNIcx44cIWnjr/rfIATDH7ZaOMmstu0CwhFG1Dunhlp4OC6/NMbhiwoq5BpW0ubi303qnEk/PZj614w== html-webpack-plugin@^5.5.0: version "5.5.0" resolved "https://registry.npmjs.org/html-webpack-plugin/-/html-webpack-plugin-5.5.0.tgz" integrity sha512-sy88PC2cRTVxvETRgUHFrL4No3UxvcH8G1NepGhqaTT+GXN2kTamqasot0inS5hXeg1cMbFDt27zzo9p35lZVw== dependencies: "@types/html-minifier-terser" "^6.0.0" html-minifier-terser "^6.0.2" lodash "^4.17.21" pretty-error "^4.0.0" tapable "^2.0.0" htmlparser2@^6.1.0: version "6.1.0" resolved "https://registry.npmjs.org/htmlparser2/-/htmlparser2-6.1.0.tgz" integrity sha512-gyyPk6rgonLFEDGoeRgQNaEUvdJ4ktTmmUh/h2t7s+M8oPpIPxgNACWa+6ESR57kXstwqPiCut0V8NRpcwgU7A== dependencies: domelementtype "^2.0.1" domhandler "^4.0.0" domutils "^2.5.2" entities "^2.0.0" htmlparser2@^8.0.1: version "8.0.1" resolved "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.1.tgz" integrity sha512-4lVbmc1diZC7GUJQtRQ5yBAeUCL1exyMwmForWkRLnwyzWBFxN633SALPMGYaWZvKe9j1pRZJpauvmxENSp/EA== dependencies: domelementtype "^2.3.0" domhandler "^5.0.2" domutils "^3.0.1" entities "^4.3.0" htmlparser2@~9.0.0: version "9.0.0" resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-9.0.0.tgz#e431142b7eeb1d91672742dea48af8ac7140cddb" integrity sha512-uxbSI98wmFT/G4P2zXx4OVx04qWUmyFPrD2/CNepa2Zo3GPNaCaaxElDgwUrwYWkK1nr9fft0Ya8dws8coDLLQ== dependencies: domelementtype "^2.3.0" domhandler "^5.0.3" domutils "^3.1.0" entities "^4.5.0" http-basic@^8.1.1: version "8.1.3" resolved "https://registry.yarnpkg.com/http-basic/-/http-basic-8.1.3.tgz#a7cabee7526869b9b710136970805b1004261bbf" integrity sha512-/EcDMwJZh3mABI2NhGfHOGOeOZITqfkEO4p/xK+l3NpyncIHUQBoMvCSF/b5GqvKtySC2srL/GGG3+EtlqlmCw== dependencies: caseless "^0.12.0" concat-stream "^1.6.2" http-response-object "^3.0.1" parse-cache-control "^1.0.1" http-cache-semantics@^3.8.0: version "3.8.1" resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz#39b0e16add9b605bf0a9ef3d9daaf4843b4cacd2" integrity sha512-5ai2iksyV8ZXmnZhHH4rWPoxxistEexSi5936zIQ1bnNTW5VnA85B6P/VpXiRM017IgRvb2kKo1a//y+0wSp3w== http-cache-semantics@^4.0.0: version "4.1.0" resolved "https://registry.npmjs.org/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz" integrity sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ== http-deceiver@^1.2.7: version "1.2.7" resolved "https://registry.npmjs.org/http-deceiver/-/http-deceiver-1.2.7.tgz" integrity sha1-+nFolEq5pRnTN8sL7HKE3D5yPYc= http-errors@2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz" integrity sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ== dependencies: depd "2.0.0" inherits "2.0.4" setprototypeof "1.2.0" statuses "2.0.1" toidentifier "1.0.1" http-errors@~1.6.2: version "1.6.3" resolved "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz" integrity sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0= dependencies: depd "~1.1.2" inherits "2.0.3" setprototypeof "1.1.0" statuses ">= 1.4.0 < 2" http-parser-js@>=0.5.1: version "0.5.5" resolved "https://registry.npmjs.org/http-parser-js/-/http-parser-js-0.5.5.tgz" integrity sha512-x+JVEkO2PoM8qqpbPbOL3cqHPwerep7OwzK7Ay+sMQjKzaKCqWvjoXm5tqMP9tXWWTnTzAjIhXg+J99XYuPhPA== http-proxy-agent@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz#e4821beef5b2142a2026bd73926fe537631c5405" integrity sha512-qwHbBLV7WviBl0rQsOzH6o5lwyOIvwp/BdFnvVxXORldu5TmjFfjzBcWUWS5kWAZhmv+JtiDhSuQCp4sBfbIgg== dependencies: agent-base "4" debug "3.1.0" http-proxy-middleware@^2.0.3: version "2.0.6" resolved "https://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-2.0.6.tgz" integrity sha512-ya/UeJ6HVBYxrgYotAZo1KvPWlgB48kUJLDePFeneHsVujFaW5WNj2NgWCAE//B1Dl02BIfYlpNgBy8Kf8Rjmw== dependencies: "@types/http-proxy" "^1.17.8" http-proxy "^1.18.1" is-glob "^4.0.1" is-plain-obj "^3.0.0" micromatch "^4.0.2" http-proxy@^1.18.1: version "1.18.1" resolved "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz" integrity sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ== dependencies: eventemitter3 "^4.0.0" follow-redirects "^1.0.0" requires-port "^1.0.0" http-response-object@^3.0.1: version "3.0.2" resolved "https://registry.yarnpkg.com/http-response-object/-/http-response-object-3.0.2.tgz#7f435bb210454e4360d074ef1f989d5ea8aa9810" integrity sha512-bqX0XTF6fnXSQcEJ2Iuyr75yVakyjIDCqroJQ/aHfSdlM743Cwqoi2nDYMzLGWUcuTWGWy8AAvOKXTfiv6q9RA== dependencies: "@types/node" "^10.0.3" http-signature@~1.1.0: version "1.1.1" resolved "https://registry.npmjs.org/http-signature/-/http-signature-1.1.1.tgz" integrity sha512-iUn0NcRULlDGtqNLN1Jxmzayk8ogm7NToldASyZBpM2qggbphjXzNOiw3piN8tgz+e/DRs6X5gAzFwTI6BCRcg== dependencies: assert-plus "^0.2.0" jsprim "^1.2.2" sshpk "^1.7.0" https-browserify@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-0.0.1.tgz#3f91365cabe60b77ed0ebba24b454e3e09d95a82" integrity sha512-EjDQFbgJr1vDD/175UJeSX3ncQ3+RUnCL5NkthQGHvF4VNHlzTy8ifJfTqz47qiPRqaFH58+CbuG3x51WuB1XQ== https-proxy-agent@^2.1.0: version "2.2.4" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.4.tgz#4ee7a737abd92678a293d9b34a1af4d0d08c787b" integrity sha512-OmvfoQ53WLjtA9HeYP9RNrWMJzzAz1JGaSFr1nijg0PVR1JaD/xbJq1mdEIIlxGpXp9eSe/O2LgU9DJmTPd0Eg== dependencies: agent-base "^4.3.0" debug "^3.1.0" human-signals@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz" integrity sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw== humanize-ms@^1.2.1: version "1.2.1" resolved "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz" integrity sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ== dependencies: ms "^2.0.0" iconv-lite@0.4.24, iconv-lite@~0.4.13: version "0.4.24" resolved "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz" integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== dependencies: safer-buffer ">= 2.1.2 < 3" iconv-lite@0.6, iconv-lite@^0.6.2: version "0.6.3" resolved "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz" integrity sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw== dependencies: safer-buffer ">= 2.1.2 < 3.0.0" icss-utils@^5.0.0, icss-utils@^5.1.0: version "5.1.0" resolved "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz" integrity sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA== iferr@^0.1.5, iferr@~0.1.5: version "0.1.5" resolved "https://registry.npmjs.org/iferr/-/iferr-0.1.5.tgz" integrity sha512-DUNFN5j7Tln0D+TxzloUjKB+CtVu6myn0JEFak6dG18mNt9YkQ6lzGCdafwofISZ1lLF3xRHJ98VKy9ynkcFaA== ignore@^5.1.4: version "5.1.9" resolved "https://registry.npmjs.org/ignore/-/ignore-5.1.9.tgz" integrity sha512-2zeMQpbKz5dhZ9IwL0gbxSW5w0NK/MSAMtNuhgIHEPmaU3vPdKPL0UdvUCXs5SS4JAwsBxysK5sFMW8ocFiVjQ== ignore@^5.2.0: version "5.2.0" resolved "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz" integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== image-size@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/image-size/-/image-size-1.0.1.tgz" integrity sha512-VAwkvNSNGClRw9mDHhc5Efax8PLlsOGcUTh0T/LIriC8vPA3U5PdqXWqkz406MoYHMKW8Uf9gWr05T/rYB44kQ== dependencies: queue "6.0.2" immer@^9.0.7: version "9.0.12" resolved "https://registry.npmjs.org/immer/-/immer-9.0.12.tgz" integrity sha512-lk7UNmSbAukB5B6dh9fnh5D0bJTOFKxVg2cyJWTYrWRfhLrLMBquONcUs3aFq507hNoIZEDDh8lb8UtOizSMhA== immutable@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/immutable/-/immutable-4.0.0.tgz" integrity sha512-zIE9hX70qew5qTUjSS7wi1iwj/l7+m54KWU247nhM3v806UdGj1yDndXj+IOYxxtW9zyLI+xqFNZjTuDaLUqFw== import-fresh@^3.1.0, import-fresh@^3.2.1, import-fresh@^3.3.0: version "3.3.0" resolved "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz" integrity sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw== dependencies: parent-module "^1.0.0" resolve-from "^4.0.0" import-lazy@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz" integrity sha1-BWmOPUXIjo1+nZLLBYTnfwlvPkM= imurmurhash@^0.1.4: version "0.1.4" resolved "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz" integrity sha1-khi5srkoojixPcT7a21XbyMUU+o= indent-string@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz" integrity sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg== infima@0.2.0-alpha.43: version "0.2.0-alpha.43" resolved "https://registry.yarnpkg.com/infima/-/infima-0.2.0-alpha.43.tgz#f7aa1d7b30b6c08afef441c726bac6150228cbe0" integrity sha512-2uw57LvUqW0rK/SWYnd/2rRfxNA5DDNOh33jxF7fy46VWoNhGxiUQyVZHbBMjQ33mQem0cjdDVwgWVAmlRfgyQ== inflight@^1.0.4, inflight@~1.0.6: version "1.0.6" resolved "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz" integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= dependencies: once "^1.3.0" wrappy "1" inherits@2, inherits@2.0.4, inherits@^2.0.0, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3: version "2.0.4" resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== inherits@2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1" integrity sha512-8nWq2nLTAwd02jTqJExUYFSD/fKq6VH9Y/oG2accc/kdI0V98Bag8d5a4gi3XHz73rDWa2PvTtvcWYquKqSENA== inherits@2.0.3: version "2.0.3" resolved "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= ini@2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/ini/-/ini-2.0.0.tgz" integrity sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA== ini@^1.3.4, ini@^1.3.5, ini@~1.3.0, ini@~1.3.4: version "1.3.8" resolved "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz" integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== init-package-json@~1.10.1: version "1.10.3" resolved "https://registry.yarnpkg.com/init-package-json/-/init-package-json-1.10.3.tgz#45ffe2f610a8ca134f2bd1db5637b235070f6cbe" integrity sha512-zKSiXKhQveNteyhcj1CoOP8tqp1QuxPIPBl8Bid99DGLFqA1p87M6lNgfjJHSBoWJJlidGOv5rWjyYKEB3g2Jw== dependencies: glob "^7.1.1" npm-package-arg "^4.0.0 || ^5.0.0 || ^6.0.0" promzard "^0.3.0" read "~1.0.1" read-package-json "1 || 2" semver "2.x || 3.x || 4 || 5" validate-npm-package-license "^3.0.1" validate-npm-package-name "^3.0.0" inline-style-parser@0.1.1: version "0.1.1" resolved "https://registry.npmjs.org/inline-style-parser/-/inline-style-parser-0.1.1.tgz" integrity sha512-7NXolsK4CAS5+xvdj5OMMbI962hU/wvwoxk+LWR9Ek9bVtyuuYScDN6eS0rUm6TxApFpw7CX1o4uJzcd4AyD3Q== "internmap@1 - 2": version "2.0.3" resolved "https://registry.yarnpkg.com/internmap/-/internmap-2.0.3.tgz#6685f23755e43c524e251d29cbc97248e3061009" integrity sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg== interpret@^1.0.0: version "1.4.0" resolved "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz" integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA== interpret@~1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.1.0.tgz#7ed1b1410c6a0e0f78cf95d3b8440c63f78b8614" integrity sha512-CLM8SNMDu7C5psFCn6Wg/tgpj/bKAg7hc2gWqcuR9OD5Ft9PhBpIu8PLicPeis+xDd6YX2ncI8MCA64I9tftIA== invariant@^2.2.4: version "2.2.4" resolved "https://registry.npmjs.org/invariant/-/invariant-2.2.4.tgz" integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== dependencies: loose-envify "^1.0.0" invert-kv@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz" integrity sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA== ip@^1.1.4: version "1.1.8" resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.8.tgz#ae05948f6b075435ed3307acce04629da8cdbf48" integrity sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg== ipaddr.js@1.9.1: version "1.9.1" resolved "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz" integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== ipaddr.js@^2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.0.1.tgz" integrity sha512-1qTgH9NG+IIJ4yfKs2e6Pp1bZg8wbDbKHT21HrLIeYBTRLgMYKnMTPAuI3Lcs61nfx5h1xlXnbJtH1kX5/d/ng== is-absolute@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-absolute/-/is-absolute-1.0.0.tgz#395e1ae84b11f26ad1795e73c17378e48a301576" integrity sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA== dependencies: is-relative "^1.0.0" is-windows "^1.0.1" is-alphabetical@1.0.4, is-alphabetical@^1.0.0: version "1.0.4" resolved "https://registry.npmjs.org/is-alphabetical/-/is-alphabetical-1.0.4.tgz" integrity sha512-DwzsA04LQ10FHTZuL0/grVDk4rFoVH1pjAToYwBrHSxcrBIGQuXrQMtD5U1b0U2XVgKZCTLLP8u2Qxqhy3l2Vg== is-alphanumerical@^1.0.0: version "1.0.4" resolved "https://registry.npmjs.org/is-alphanumerical/-/is-alphanumerical-1.0.4.tgz" integrity sha512-UzoZUr+XfVz3t3v4KyGEniVL9BDRoQtY7tOyrRybkVNjDFWyo1yhXNGrrBTQxp3ib9BLAWs7k2YKBQsFRkZG9A== dependencies: is-alphabetical "^1.0.0" is-decimal "^1.0.0" is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz" integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= is-binary-path@~2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz" integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== dependencies: binary-extensions "^2.0.0" is-buffer@^2.0.0: version "2.0.5" resolved "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz" integrity sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ== is-builtin-module@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz" integrity sha512-C2wz7Juo5pUZTFQVer9c+9b4qw3I5T/CHQxQyhVu7BJel6C22FmsLIWsdseYyOw6xz9Pqy9eJWSkQ7+3iN1HVw== dependencies: builtin-modules "^1.0.0" is-ci@^1.0.10: version "1.2.1" resolved "https://registry.npmjs.org/is-ci/-/is-ci-1.2.1.tgz" integrity sha512-s6tfsaQaQi3JNciBH6shVqEDvhGut0SUXr31ag8Pd8BBbVVlcGfWhpPmEOoM6RJ5TFhbypvf5yyRw/VXW1IiWg== dependencies: ci-info "^1.5.0" is-ci@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz" integrity sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w== dependencies: ci-info "^2.0.0" is-core-module@^2.2.0: version "2.8.0" resolved "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.0.tgz" integrity sha512-vd15qHsaqrRL7dtH6QNuy0ndJmRDrS9HAM1CAiSifNUFv4x1a0CCVsj18hJ1mShxIG6T2i1sO78MkP56r0nYRw== dependencies: has "^1.0.3" is-core-module@^2.8.0: version "2.8.1" resolved "https://registry.npmjs.org/is-core-module/-/is-core-module-2.8.1.tgz" integrity sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA== dependencies: has "^1.0.3" is-core-module@^2.9.0: version "2.10.0" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.10.0.tgz#9012ede0a91c69587e647514e1d5277019e728ed" integrity sha512-Erxj2n/LDAZ7H8WNJXd9tw38GYM3dv8rk8Zcs+jJuxYTW7sozH+SS8NtrSjVL1/vpLvWi1hxy96IzjJ3EHTJJg== dependencies: has "^1.0.3" is-decimal@^1.0.0: version "1.0.4" resolved "https://registry.npmjs.org/is-decimal/-/is-decimal-1.0.4.tgz" integrity sha512-RGdriMmQQvZ2aqaQq3awNA6dCGtKpiDFcOzrTWrDAT2MiWrKQVPmxLGHl7Y2nNu6led0kEyoX0enY0qXYsv9zw== is-docker@^2.0.0, is-docker@^2.1.1: version "2.2.1" resolved "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz" integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== is-extendable@^0.1.0: version "0.1.1" resolved "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz" integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz" integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= is-fullwidth-code-point@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz" integrity sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw== dependencies: number-is-nan "^1.0.0" is-fullwidth-code-point@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz" integrity sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w== is-fullwidth-code-point@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz" integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== is-glob@^4.0.0, is-glob@^4.0.1, is-glob@^4.0.3, is-glob@~4.0.1: version "4.0.3" resolved "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz" integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== dependencies: is-extglob "^2.1.1" is-hexadecimal@^1.0.0: version "1.0.4" resolved "https://registry.npmjs.org/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz" integrity sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw== is-installed-globally@^0.1.0: version "0.1.0" resolved "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.1.0.tgz" integrity sha512-ERNhMg+i/XgDwPIPF3u24qpajVreaiSuvpb1Uu0jugw7KKcxGyCX8cgp8P5fwTmAuXku6beDHHECdKArjlg7tw== dependencies: global-dirs "^0.1.0" is-path-inside "^1.0.0" is-installed-globally@^0.4.0: version "0.4.0" resolved "https://registry.npmjs.org/is-installed-globally/-/is-installed-globally-0.4.0.tgz" integrity sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ== dependencies: global-dirs "^3.0.0" is-path-inside "^3.0.2" is-npm@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/is-npm/-/is-npm-1.0.0.tgz" integrity sha512-9r39FIr3d+KD9SbX0sfMsHzb5PP3uimOiwr3YupUaUFG4W0l1U57Rx3utpttV7qz5U3jmrO5auUa04LU9pyHsg== is-npm@^5.0.0: version "5.0.0" resolved "https://registry.npmjs.org/is-npm/-/is-npm-5.0.0.tgz" integrity sha512-WW/rQLOazUq+ST/bCAVBp/2oMERWLsR7OrKyt052dNDk4DHcDE0/7QSXITlmi+VBcV13DfIbysG3tZJm5RfdBA== is-number-like@^1.0.3: version "1.0.8" resolved "https://registry.yarnpkg.com/is-number-like/-/is-number-like-1.0.8.tgz#2e129620b50891042e44e9bbbb30593e75cfbbe3" integrity sha512-6rZi3ezCyFcn5L71ywzz2bS5b2Igl1En3eTlZlvKjpz1n3IZLAYMbKYAIQgFmEu0GENg92ziU/faEOA/aixjbA== dependencies: lodash.isfinite "^3.3.2" is-number@^7.0.0: version "7.0.0" resolved "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz" integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== is-obj@^1.0.0, is-obj@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz" integrity sha1-PkcprB9f3gJc19g6iW2rn09n2w8= is-obj@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz" integrity sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w== is-path-cwd@^2.2.0: version "2.2.0" resolved "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz" integrity sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ== is-path-inside@^1.0.0: version "1.0.1" resolved "https://registry.npmjs.org/is-path-inside/-/is-path-inside-1.0.1.tgz" integrity sha512-qhsCR/Esx4U4hg/9I19OVUAJkGWtjRYHMRgUMZE2TDdj+Ag+kttZanLupfddNyglzz50cUlmWzUaI37GDfNx/g== dependencies: path-is-inside "^1.0.1" is-path-inside@^3.0.2: version "3.0.3" resolved "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz" integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== is-plain-obj@^2.0.0: version "2.1.0" resolved "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz" integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== is-plain-obj@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-3.0.0.tgz" integrity sha512-gwsOE28k+23GP1B6vFl1oVh/WOzmawBrKwo5Ev6wMKzPkaXaCDIQKzLnvsA42DRlbVTWorkgTKIviAKCWkfUwA== is-plain-object@^2.0.3, is-plain-object@^2.0.4: version "2.0.4" resolved "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz" integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== dependencies: isobject "^3.0.1" is-redirect@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/is-redirect/-/is-redirect-1.0.0.tgz" integrity sha512-cr/SlUEe5zOGmzvj9bUyC4LVvkNVAXu4GytXLNMr1pny+a65MpQ9IJzFHD5vi7FyJgb4qt27+eS3TuQnqB+RQw== is-regexp@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/is-regexp/-/is-regexp-1.0.0.tgz" integrity sha1-/S2INUXEa6xaYz57mgnof6LLUGk= is-relative@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-relative/-/is-relative-1.0.0.tgz#a1bb6935ce8c5dba1e8b9754b9b2dcc020e2260d" integrity sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA== dependencies: is-unc-path "^1.0.0" is-retry-allowed@^1.0.0: version "1.2.0" resolved "https://registry.npmjs.org/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz" integrity sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg== is-root@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/is-root/-/is-root-2.1.0.tgz" integrity sha512-AGOriNp96vNBd3HtU+RzFEc75FfR5ymiYv8E553I71SCeXBiMsVDUtdio1OEFvrPyLIQ9tVR5RxXIFe5PUFjMg== is-stream@^1.0.0, is-stream@^1.1.0: version "1.1.0" resolved "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz" integrity sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ== is-stream@^2.0.0: version "2.0.1" resolved "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz" integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== is-typedarray@^1.0.0, is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz" integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= is-unc-path@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-unc-path/-/is-unc-path-1.0.0.tgz#d731e8898ed090a12c352ad2eaed5095ad322c9d" integrity sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ== dependencies: unc-path-regex "^0.1.2" is-whitespace-character@^1.0.0: version "1.0.4" resolved "https://registry.npmjs.org/is-whitespace-character/-/is-whitespace-character-1.0.4.tgz" integrity sha512-SDweEzfIZM0SJV0EUga669UTKlmL0Pq8Lno0QDQsPnvECB3IM2aP0gdx5TrU0A01MAPfViaZiI2V1QMZLaKK5w== is-windows@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== is-word-character@^1.0.0: version "1.0.4" resolved "https://registry.npmjs.org/is-word-character/-/is-word-character-1.0.4.tgz" integrity sha512-5SMO8RVennx3nZrqtKwCGyyetPE9VDba5ugvKLaD4KopPG5kR4mQ7tNt/r7feL5yt5h3lpuBbIUmCOG2eSzXHA== is-wsl@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d" integrity sha512-gfygJYZ2gLTDlmbWMI0CE2MwnFzSN/2SZfkMlItC4K/JBlsWVDB0bO6XhqcY13YXE7iMcAJnzTCJjPiTeJJ0Mw== is-wsl@^2.2.0: version "2.2.0" resolved "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz" integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== dependencies: is-docker "^2.0.0" is-yarn-global@^0.3.0: version "0.3.0" resolved "https://registry.npmjs.org/is-yarn-global/-/is-yarn-global-0.3.0.tgz" integrity sha512-VjSeb/lHmkoyd8ryPVIKvOCn4D1koMqY+vqyjjUfc3xyKtP4dYOxM44sZrnqQSzSds3xyOrUTLTC9LVCVgLngw== isarray@0.0.1: version "0.0.1" resolved "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" integrity sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8= isarray@~1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= isexe@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz" integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= isobject@^3.0.0, isobject@^3.0.1: version "3.0.1" resolved "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz" integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= isstream@~0.1.2: version "0.1.2" resolved "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz" integrity sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g== jest-util@^29.2.0: version "29.2.0" resolved "https://registry.npmjs.org/jest-util/-/jest-util-29.2.0.tgz" integrity sha512-8M1dx12ujkBbnhwytrezWY0Ut79hbflwodE+qZKjxSRz5qt4xDp6dQQJaOCFvCmE0QJqp9KyEK33lpPNjnhevw== dependencies: "@jest/types" "^29.2.0" "@types/node" "*" chalk "^4.0.0" ci-info "^3.2.0" graceful-fs "^4.2.9" picomatch "^2.2.3" jest-worker@^27.4.5: version "27.5.1" resolved "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz" integrity sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg== dependencies: "@types/node" "*" merge-stream "^2.0.0" supports-color "^8.0.0" jest-worker@^29.1.2: version "29.2.0" resolved "https://registry.npmjs.org/jest-worker/-/jest-worker-29.2.0.tgz" integrity sha512-mluOlMbRX1H59vGVzPcVg2ALfCausbBpxC8a2KWOzInhYHZibbHH8CB0C1JkmkpfurrkOYgF7FPmypuom1OM9A== dependencies: "@types/node" "*" jest-util "^29.2.0" merge-stream "^2.0.0" supports-color "^8.0.0" joi@^17.6.0: version "17.6.0" resolved "https://registry.npmjs.org/joi/-/joi-17.6.0.tgz" integrity sha512-OX5dG6DTbcr/kbMFj0KGYxuew69HPcAE3K/sZpEV2nP6e/j/C0HV+HNiBPCASxdx5T7DMoa0s8UeHWMnb6n2zw== dependencies: "@hapi/hoek" "^9.0.0" "@hapi/topo" "^5.0.0" "@sideway/address" "^4.1.3" "@sideway/formula" "^3.0.0" "@sideway/pinpoint" "^2.0.0" js-beautify@~1.14.7: version "1.14.7" resolved "https://registry.yarnpkg.com/js-beautify/-/js-beautify-1.14.7.tgz#9206296de33f86dc106d3e50a35b7cf8729703b2" integrity sha512-5SOX1KXPFKx+5f6ZrPsIPEY7NwKeQz47n3jm2i+XeHx9MoRsfQenlOP13FQhWvg8JRS0+XLO6XYUQ2GX+q+T9A== dependencies: config-chain "^1.1.13" editorconfig "^0.15.3" glob "^8.0.3" nopt "^6.0.0" "js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== js-yaml@^3.13.1, js-yaml@~3.14.0: version "3.14.1" resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz" integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== dependencies: argparse "^1.0.7" esprima "^4.0.0" js-yaml@^4.1.0: version "4.1.0" resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz" integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== dependencies: argparse "^2.0.1" jsbn@~0.1.0: version "0.1.1" resolved "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz" integrity sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg== jsesc@^2.5.1: version "2.5.2" resolved "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz" integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== jsesc@~0.5.0: version "0.5.0" resolved "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz" integrity sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0= json-buffer@3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz" integrity sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg= json-parse-better-errors@^1.0.0, json-parse-better-errors@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9" integrity sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw== json-parse-even-better-errors@^2.3.0, json-parse-even-better-errors@^2.3.1: version "2.3.1" resolved "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz" integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== json-schema-traverse@^0.4.1: version "0.4.1" resolved "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz" integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== json-schema-traverse@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz" integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== json-schema@0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.4.0.tgz#f7de4cf6efab838ebaeb3236474cbba5a1930ab5" integrity sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA== json-stable-stringify@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz" integrity sha512-i/J297TW6xyj7sDFa7AmBPkQvLIxWr2kKPWI26tXydnZrzVAocNqn5DMNT1Mzk0vit1V5UkRM7C1KdVNp7Lmcg== dependencies: jsonify "~0.0.0" json-stringify-pretty-compact@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/json-stringify-pretty-compact/-/json-stringify-pretty-compact-3.0.0.tgz#f71ef9d82ef16483a407869556588e91b681d9ab" integrity sha512-Rc2suX5meI0S3bfdZuA7JMFBGkJ875ApfVyq2WHELjBiiG22My/l7/8zPpH/CfFVQHuVLd8NLR0nv6vi0BYYKA== json-stringify-safe@~5.0.1: version "5.0.1" resolved "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz" integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA== json5@^2.1.2, json5@^2.2.0: version "2.2.2" resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.2.tgz#64471c5bdcc564c18f7c1d4df2e2297f2457c5ab" integrity sha512-46Tk9JiOL2z7ytNQWFLpj99RZkVgeHf87yGQKsIkaPz1qSH9UczKH1rO7K3wgRselo0tYMUNfecYpm/p1vC7tQ== json5@^2.2.2: version "2.2.3" resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== jsonc-parser@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.2.0.tgz#31ff3f4c2b9793f89c67212627c51c6394f88e76" integrity sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w== jsonfile@^6.0.1: version "6.1.0" resolved "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz" integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== dependencies: universalify "^2.0.0" optionalDependencies: graceful-fs "^4.1.6" jsonify@~0.0.0: version "0.0.0" resolved "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz" integrity sha512-trvBk1ki43VZptdBI5rIlG4YOzyeH/WefQt5rj1grasPn4iiZWKet8nkgc4GlsAylaztn0qZfUYOiTsASJFdNA== jsonparse@^1.2.0: version "1.3.1" resolved "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz" integrity sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg== jsprim@^1.2.2: version "1.4.2" resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.2.tgz#712c65533a15c878ba59e9ed5f0e26d5b77c5feb" integrity sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw== dependencies: assert-plus "1.0.0" extsprintf "1.3.0" json-schema "0.4.0" verror "1.10.0" keyv@^3.0.0: version "3.1.0" resolved "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz" integrity sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA== dependencies: json-buffer "3.0.0" khroma@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/khroma/-/khroma-2.0.0.tgz#7577de98aed9f36c7a474c4d453d94c0d6c6588b" integrity sha512-2J8rDNlQWbtiNYThZRvmMv5yt44ZakX+Tz5ZIp/mN1pt4snn+m030Va5Z4v8xA0cQFDXBwO/8i42xL4QPsVk3g== kind-of@^6.0.0, kind-of@^6.0.2: version "6.0.3" resolved "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz" integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== kleur@^3.0.3: version "3.0.3" resolved "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz" integrity sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w== klona@^2.0.4, klona@^2.0.5: version "2.0.5" resolved "https://registry.npmjs.org/klona/-/klona-2.0.5.tgz" integrity sha512-pJiBpiXMbt7dkzXe8Ghj/u4FfXOOa98fPW+bihOJ4SjnoijweJrNThJfd3ifXpXhREjpoF2mZVH1GfS9LV3kHQ== latest-version@^3.0.0: version "3.1.0" resolved "https://registry.npmjs.org/latest-version/-/latest-version-3.1.0.tgz" integrity sha512-Be1YRHWWlZaSsrz2U+VInk+tO0EwLIyV+23RhWLINJYwg/UIikxjlj3MhH37/6/EDCAusjajvMkMMUXRaMWl/w== dependencies: package-json "^4.0.0" latest-version@^5.1.0: version "5.1.0" resolved "https://registry.npmjs.org/latest-version/-/latest-version-5.1.0.tgz" integrity sha512-weT+r0kTkRQdCdYCNtkMwWXQTMEswKrFBkm4ckQOMVhhqhIMI1UT2hMj+1iigIhgSZm5gTmrRXBNoGUgaTY1xA== dependencies: package-json "^6.3.0" lazy-property@~1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/lazy-property/-/lazy-property-1.0.0.tgz" integrity sha512-O52TK7FHpBPzdtvc5GoF0EPLQIBMqrAupANPGBidPkrDpl9IXlzuma3T+m0o0OpkRVPmTu3SDoT7985lw4KbNQ== lcid@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz" integrity sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA== dependencies: invert-kv "^2.0.0" leven@^3.1.0: version "3.1.0" resolved "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz" integrity sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A== libnpx@10.2.2: version "10.2.2" resolved "https://registry.npmjs.org/libnpx/-/libnpx-10.2.2.tgz" integrity sha512-ujaYToga1SAX5r7FU5ShMFi88CWpY75meNZtr6RtEyv4l2ZK3+Wgvxq2IqlwWBiDZOqhumdeiocPS1aKrCMe3A== dependencies: dotenv "^5.0.1" npm-package-arg "^6.0.0" rimraf "^2.6.2" safe-buffer "^5.1.0" update-notifier "^2.3.0" which "^1.3.0" y18n "^4.0.0" yargs "^11.0.0" liftup@~3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/liftup/-/liftup-3.0.1.tgz#1cb81aff0f368464ed3a5f1a7286372d6b1a60ce" integrity sha512-yRHaiQDizWSzoXk3APcA71eOI/UuhEkNN9DiW2Tt44mhYzX4joFoCZlxsSOF7RyeLlfqzFLQI1ngFq3ggMPhOw== dependencies: extend "^3.0.2" findup-sync "^4.0.0" fined "^1.2.0" flagged-respawn "^1.0.1" is-plain-object "^2.0.4" object.map "^1.0.1" rechoir "^0.7.0" resolve "^1.19.0" lilconfig@^2.0.3: version "2.0.4" resolved "https://registry.npmjs.org/lilconfig/-/lilconfig-2.0.4.tgz" integrity sha512-bfTIN7lEsiooCocSISTWXkiWJkRqtL9wYtYy+8EK3Y41qh3mpwPU0ycTOgjdY9ErwXCc8QyrQp82bdL0Xkm9yA== lines-and-columns@^1.1.6: version "1.2.4" resolved "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz" integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== livereload-js@^2.3.0: version "2.4.0" resolved "https://registry.yarnpkg.com/livereload-js/-/livereload-js-2.4.0.tgz#447c31cf1ea9ab52fc20db615c5ddf678f78009c" integrity sha512-XPQH8Z2GDP/Hwz2PCDrh2mth4yFejwA1OZ/81Ti3LgKyhDcEjsSsqFWZojHG0va/duGd+WyosY7eXLDoOyqcPw== loader-runner@^4.2.0: version "4.3.0" resolved "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz" integrity sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg== loader-utils@^2.0.0: version "2.0.4" resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-2.0.4.tgz#8b5cb38b5c34a9a018ee1fc0e6a066d1dfcc528c" integrity sha512-xXqpXoINfFhgua9xiqD8fPFHgkoq1mmmpE92WlDbm9rNRd/EbRb+Gqf908T2DMfuHjjJlksiK2RbHVOdD/MqSw== dependencies: big.js "^5.2.2" emojis-list "^3.0.0" json5 "^2.1.2" loader-utils@^3.2.0: version "3.2.0" resolved "https://registry.npmjs.org/loader-utils/-/loader-utils-3.2.0.tgz" integrity sha512-HVl9ZqccQihZ7JM85dco1MvO9G+ONvxoGa9rkhzFsneGLKSUg1gJf9bWzhRhcvm2qChhWpebQhP44qxjKIUCaQ== locate-path@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz" integrity sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA== dependencies: p-locate "^2.0.0" path-exists "^3.0.0" locate-path@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz" integrity sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A== dependencies: p-locate "^3.0.0" path-exists "^3.0.0" locate-path@^5.0.0: version "5.0.0" resolved "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz" integrity sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g== dependencies: p-locate "^4.1.0" locate-path@^6.0.0: version "6.0.0" resolved "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz" integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== dependencies: p-locate "^5.0.0" lockfile@~1.0.3: version "1.0.4" resolved "https://registry.yarnpkg.com/lockfile/-/lockfile-1.0.4.tgz#07f819d25ae48f87e538e6578b6964a4981a5609" integrity sha512-cvbTwETRfsFh4nHsL1eGWapU1XFi5Ot9E85sWAwia7Y7EgB7vfqcZhTKZ+l7hCGxSPoushMv5GKhT5PdLv03WA== dependencies: signal-exit "^3.0.2" lodash-es@^4.17.21: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.21.tgz#43e626c46e6591b7750beb2b50117390c609e3ee" integrity sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw== lodash._baseuniq@~4.6.0: version "4.6.0" resolved "https://registry.npmjs.org/lodash._baseuniq/-/lodash._baseuniq-4.6.0.tgz" integrity sha512-Ja1YevpHZctlI5beLA7oc5KNDhGcPixFhcqSiORHNsp/1QTv7amAXzw+gu4YOvErqVlMVyIJGgtzeepCnnur0A== dependencies: lodash._createset "~4.0.0" lodash._root "~3.0.0" lodash._createset@~4.0.0: version "4.0.3" resolved "https://registry.npmjs.org/lodash._createset/-/lodash._createset-4.0.3.tgz" integrity sha512-GTkC6YMprrJZCYU3zcqZj+jkXkrXzq3IPBcF/fIPpNEAB4hZEtXU8zp/RwKOvZl43NUmwDbyRk3+ZTbeRdEBXA== lodash._root@~3.0.0: version "3.0.1" resolved "https://registry.npmjs.org/lodash._root/-/lodash._root-3.0.1.tgz" integrity sha512-O0pWuFSK6x4EXhM1dhZ8gchNtG7JMqBtrHdoUFUWXD7dJnNSUze1GuyQr5sOs0aCvgGeI3o/OJW8f4ca7FDxmQ== lodash.clonedeep@~4.5.0: version "4.5.0" resolved "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz" integrity sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ== lodash.curry@^4.0.1: version "4.1.1" resolved "https://registry.npmjs.org/lodash.curry/-/lodash.curry-4.1.1.tgz" integrity sha1-JI42By7ekGUB11lmIAqG2riyMXA= lodash.debounce@^4.0.8: version "4.0.8" resolved "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz" integrity sha1-gteb/zCmfEAF/9XiUVMArZyk168= lodash.defaults@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-4.2.0.tgz#d09178716ffea4dde9e5fb7b37f6f0802274580c" integrity sha512-qjxPLHd3r5DnsdGacqOMU6pb/avJzdh9tFX2ymgoZE27BmjXrNy/y4LoaiTeAb+O3gL8AfpJGtqfX/ae2leYYQ== lodash.flow@^3.3.0: version "3.5.0" resolved "https://registry.npmjs.org/lodash.flow/-/lodash.flow-3.5.0.tgz" integrity sha1-h79AKSuM+D5OjOGjrkIJ4gBxZ1o= lodash.get@^4.4.2: version "4.4.2" resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" integrity sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ== lodash.isfinite@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/lodash.isfinite/-/lodash.isfinite-3.3.2.tgz#fb89b65a9a80281833f0b7478b3a5104f898ebb3" integrity sha512-7FGG40uhC8Mm633uKW1r58aElFlBlxCrg9JfSi3P6aYiWmfiWF0PgMd86ZUsxE5GwWPdHoS2+48bwTh2VPkIQA== lodash.memoize@^4.1.2: version "4.1.2" resolved "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-4.1.2.tgz" integrity sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4= lodash.set@^4.3.2: version "4.3.2" resolved "https://registry.yarnpkg.com/lodash.set/-/lodash.set-4.3.2.tgz#d8757b1da807dde24816b0d6a84bea1a76230b23" integrity sha512-4hNPN5jlm/N/HLMCO43v8BXKq9Z7QdAGc/VGrRD61w8gN9g/6jF9A4L1pbUgBLCffi0w9VsXfTOij5x8iTyFvg== lodash.union@~4.6.0: version "4.6.0" resolved "https://registry.npmjs.org/lodash.union/-/lodash.union-4.6.0.tgz" integrity sha512-c4pB2CdGrGdjMKYLA+XiRDO7Y0PRQbm/Gzg8qMj+QH+pFVAoTp5sBpO0odL3FjoPCGjK96p6qsP+yQoiLoOBcw== lodash.uniq@4.5.0, lodash.uniq@^4.5.0, lodash.uniq@~4.5.0: version "4.5.0" resolved "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz" integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= lodash.unset@^4.5.2: version "4.5.2" resolved "https://registry.yarnpkg.com/lodash.unset/-/lodash.unset-4.5.2.tgz#370d1d3e85b72a7e1b0cdf2d272121306f23e4ed" integrity sha512-bwKX88k2JhCV9D1vtE8+naDKlLiGrSmf8zi/Y9ivFHwbmRfA8RxS/aVJ+sIht2XOwqoNr4xUPUkGZpc1sHFEKg== lodash.without@~4.4.0: version "4.4.0" resolved "https://registry.npmjs.org/lodash.without/-/lodash.without-4.4.0.tgz" integrity sha512-M3MefBwfDhgKgINVuBJCO1YR3+gf6s9HNJsIiZ/Ru77Ws6uTb9eBuvrkpzO+9iLoAaRodGuq7tyrPCx+74QYGQ== lodash@^4.17.10, lodash@^4.17.14, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@~4.17.19, lodash@~4.17.21: version "4.17.21" resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.2.0, loose-envify@^1.3.1, loose-envify@^1.4.0: version "1.4.0" resolved "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz" integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== dependencies: js-tokens "^3.0.0 || ^4.0.0" lower-case@^2.0.2: version "2.0.2" resolved "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz" integrity sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg== dependencies: tslib "^2.0.3" lowercase-keys@^1.0.0, lowercase-keys@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-1.0.1.tgz" integrity sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA== lowercase-keys@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/lowercase-keys/-/lowercase-keys-2.0.0.tgz" integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA== lru-cache@^4.0.1, lru-cache@^4.1.1, lru-cache@^4.1.5, lru-cache@~4.1.1: version "4.1.5" resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz" integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== dependencies: pseudomap "^1.0.2" yallist "^2.1.2" lru-cache@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== dependencies: yallist "^3.0.2" lru-cache@^6.0.0: version "6.0.0" resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz" integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA== dependencies: yallist "^4.0.0" lunr@^2.3.9: version "2.3.9" resolved "https://registry.yarnpkg.com/lunr/-/lunr-2.3.9.tgz#18b123142832337dd6e964df1a5a7707b25d35e1" integrity sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow== make-dir@^1.0.0: version "1.3.0" resolved "https://registry.npmjs.org/make-dir/-/make-dir-1.3.0.tgz" integrity sha512-2w31R7SJtieJJnQtGc7RVL2StM2vGYVfqUOvUDxH6bC6aJTxPxTF0GnIgCyu7tjockiUWAYQRbxa7vKn34s5sQ== dependencies: pify "^3.0.0" make-dir@^3.0.0, make-dir@^3.0.2, make-dir@^3.1.0: version "3.1.0" resolved "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz" integrity sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw== dependencies: semver "^6.0.0" make-fetch-happen@^2.4.13: version "2.6.0" resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-2.6.0.tgz#8474aa52198f6b1ae4f3094c04e8370d35ea8a38" integrity sha512-FFq0lNI0ax+n9IWzWpH8A4JdgYiAp2DDYIZ3rsaav8JDe8I+72CzK6PQW/oom15YDZpV5bYW/9INd6nIJ2ZfZw== dependencies: agentkeepalive "^3.3.0" cacache "^10.0.0" http-cache-semantics "^3.8.0" http-proxy-agent "^2.0.0" https-proxy-agent "^2.1.0" lru-cache "^4.1.1" mississippi "^1.2.0" node-fetch-npm "^2.0.2" promise-retry "^1.1.1" socks-proxy-agent "^3.0.1" ssri "^5.0.0" make-iterator@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/make-iterator/-/make-iterator-1.0.1.tgz#29b33f312aa8f547c4a5e490f56afcec99133ad6" integrity sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw== dependencies: kind-of "^6.0.2" map-age-cleaner@^0.1.1: version "0.1.3" resolved "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz" integrity sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w== dependencies: p-defer "^1.0.0" map-cache@^0.2.0: version "0.2.2" resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" integrity sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg== markdown-escapes@^1.0.0: version "1.0.4" resolved "https://registry.npmjs.org/markdown-escapes/-/markdown-escapes-1.0.4.tgz" integrity sha512-8z4efJYk43E0upd0NbVXwgSTQs6cT3T06etieCMEg7dRbzCbxUCK/GHlX8mhHRDcp+OLlHkPKsvqQTCvsRl2cg== marked@^4.0.12, marked@^4.3.0: version "4.3.0" resolved "https://registry.yarnpkg.com/marked/-/marked-4.3.0.tgz#796362821b019f734054582038b116481b456cf3" integrity sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A== maxmin@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/maxmin/-/maxmin-3.0.0.tgz#3ee9acc8a2b9f2b5416e94f5705319df8a9c71e6" integrity sha512-wcahMInmGtg/7c6a75fr21Ch/Ks1Tb+Jtoan5Ft4bAI0ZvJqyOw8kkM7e7p8hDSzY805vmxwHT50KcjGwKyJ0g== dependencies: chalk "^4.1.0" figures "^3.2.0" gzip-size "^5.1.1" pretty-bytes "^5.3.0" mdast-squeeze-paragraphs@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/mdast-squeeze-paragraphs/-/mdast-squeeze-paragraphs-4.0.0.tgz" integrity sha512-zxdPn69hkQ1rm4J+2Cs2j6wDEv7O17TfXTJ33tl/+JPIoEmtV9t2ZzBM5LPHE8QlHsmVD8t3vPKCyY3oH+H8MQ== dependencies: unist-util-remove "^2.0.0" mdast-util-definitions@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/mdast-util-definitions/-/mdast-util-definitions-4.0.0.tgz" integrity sha512-k8AJ6aNnUkB7IE+5azR9h81O5EQ/cTDXtWdMq9Kk5KcEW/8ritU5CeLg/9HhOC++nALHBlaogJ5jz0Ybk3kPMQ== dependencies: unist-util-visit "^2.0.0" mdast-util-to-hast@10.0.1: version "10.0.1" resolved "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-10.0.1.tgz" integrity sha512-BW3LM9SEMnjf4HXXVApZMt8gLQWVNXc3jryK0nJu/rOXPOnlkUjmdkDlmxMirpbU9ILncGFIwLH/ubnWBbcdgA== dependencies: "@types/mdast" "^3.0.0" "@types/unist" "^2.0.0" mdast-util-definitions "^4.0.0" mdurl "^1.0.0" unist-builder "^2.0.0" unist-util-generated "^1.0.0" unist-util-position "^3.0.0" unist-util-visit "^2.0.0" mdast-util-to-string@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-2.0.0.tgz" integrity sha512-AW4DRS3QbBayY/jJmD8437V1Gombjf8RSOUCMFBuo5iHi58AGEgVCKQ+ezHkZZDpAQS75hcBMpLqjpJTjtUL7w== mdn-data@2.0.14: version "2.0.14" resolved "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz" integrity sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow== mdn-data@2.0.28: version "2.0.28" resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.28.tgz#5ec48e7bef120654539069e1ae4ddc81ca490eba" integrity sha512-aylIc7Z9y4yzHYAJNuESG3hfhC+0Ibp/MAMiaOZgNv4pmEdFyfZhhhny4MNiAfWdBQ1RQ2mfDWmM1x8SvGyp8g== mdn-data@2.0.30: version "2.0.30" resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-2.0.30.tgz#ce4df6f80af6cfbe218ecd5c552ba13c4dfa08cc" integrity sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA== mdurl@^1.0.0: version "1.0.1" resolved "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz" integrity sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4= media-typer@0.3.0: version "0.3.0" resolved "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz" integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= medium-zoom@^1.0.6: version "1.0.6" resolved "https://registry.npmjs.org/medium-zoom/-/medium-zoom-1.0.6.tgz" integrity sha512-UdiUWfvz9fZMg1pzf4dcuqA0W079o0mpqbTnOz5ip4VGYX96QjmbM+OgOU/0uOzAytxC0Ny4z+VcYQnhdifimg== mem@^4.0.0: version "4.3.0" resolved "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz" integrity sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w== dependencies: map-age-cleaner "^0.1.1" mimic-fn "^2.0.0" p-is-promise "^2.0.0" memfs@^3.1.2: version "3.4.0" resolved "https://registry.npmjs.org/memfs/-/memfs-3.4.0.tgz" integrity sha512-o/RfP0J1d03YwsAxyHxAYs2kyJp55AFkMazlFAZFR2I2IXkxiUTXRabJ6RmNNCQ83LAD2jy52Khj0m3OffpNdA== dependencies: fs-monkey "1.0.3" memfs@^3.4.1: version "3.4.1" resolved "https://registry.npmjs.org/memfs/-/memfs-3.4.1.tgz" integrity sha512-1c9VPVvW5P7I85c35zAdEr1TD5+F11IToIHIlrVIcflfnzPkJa0ZoYEoEdYDP8KgPFoSZ/opDrUsAoZWym3mtw== dependencies: fs-monkey "1.0.3" merge-descriptors@1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz" integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E= merge-stream@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz" integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== merge2@^1.3.0, merge2@^1.4.1: version "1.4.1" resolved "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== mermaid@^9.2.2: version "9.3.0" resolved "https://registry.yarnpkg.com/mermaid/-/mermaid-9.3.0.tgz#8bd7c4a44b53e4e85c53a0a474442e9c273494ae" integrity sha512-mGl0BM19TD/HbU/LmlaZbjBi//tojelg8P/mxD6pPZTAYaI+VawcyBdqRsoUHSc7j71PrMdJ3HBadoQNdvP5cg== dependencies: "@braintree/sanitize-url" "^6.0.0" d3 "^7.0.0" dagre-d3-es "7.0.6" dompurify "2.4.1" khroma "^2.0.0" lodash-es "^4.17.21" moment-mini "^2.24.0" non-layered-tidy-tree-layout "^2.0.2" stylis "^4.1.2" uuid "^9.0.0" methods@~1.1.2: version "1.1.2" resolved "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz" integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= microfiber@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/microfiber/-/microfiber-2.0.1.tgz#0abd2b3b3907a2112fbf91e8c9b5850adc1ce38e" integrity sha512-AncT2Xrs01ejYrnmYz7Z6QnOT3Kfu9du/fC3VHxOCjFm+W9Bn1eOQKmmLrj2anxS6A8mbPBo3Ij5w9dHJSFOgg== dependencies: lodash.defaults "^4.2.0" lodash.get "^4.4.2" lodash.unset "^4.5.2" micromatch@^4.0.2, micromatch@^4.0.4: version "4.0.4" resolved "https://registry.npmjs.org/micromatch/-/micromatch-4.0.4.tgz" integrity sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg== dependencies: braces "^3.0.1" picomatch "^2.2.3" micromatch@^4.0.5: version "4.0.5" resolved "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz" integrity sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA== dependencies: braces "^3.0.2" picomatch "^2.3.1" mime-db@1.51.0, "mime-db@>= 1.43.0 < 2": version "1.51.0" resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.51.0.tgz" integrity sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g== mime-db@1.52.0: version "1.52.0" resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz" integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== mime-db@~1.33.0: version "1.33.0" resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.33.0.tgz" integrity sha512-BHJ/EKruNIqJf/QahvxwQZXKygOQ256myeN/Ew+THcAa5q+PjyTTMMeNQC4DZw5AwfvelsUrA6B67NKMqXDbzQ== mime-types@2.1.18: version "2.1.18" resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.18.tgz" integrity sha512-lc/aahn+t4/SWV/qcmumYjymLsWfN3ELhpmVuUFjgsORruuZPVSwAQryq+HHGvO/SI2KVX26bx+En+zhM8g8hQ== dependencies: mime-db "~1.33.0" mime-types@^2.1.12, mime-types@~2.1.34, mime-types@~2.1.7: version "2.1.35" resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz" integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== dependencies: mime-db "1.52.0" mime-types@^2.1.27, mime-types@^2.1.31, mime-types@~2.1.17, mime-types@~2.1.24: version "2.1.34" resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.34.tgz" integrity sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A== dependencies: mime-db "1.51.0" mime@1.6.0: version "1.6.0" resolved "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz" integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== mimic-fn@^2.0.0, mimic-fn@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== mimic-response@^1.0.0, mimic-response@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/mimic-response/-/mimic-response-1.0.1.tgz" integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== min-indent@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869" integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg== mini-create-react-context@^0.4.0: version "0.4.1" resolved "https://registry.npmjs.org/mini-create-react-context/-/mini-create-react-context-0.4.1.tgz" integrity sha512-YWCYEmd5CQeHGSAKrYvXgmzzkrvssZcuuQDDeqkT+PziKGMgE+0MCCtcKbROzocGBG1meBLl2FotlRwf4gAzbQ== dependencies: "@babel/runtime" "^7.12.1" tiny-warning "^1.0.3" mini-css-extract-plugin@^2.6.1: version "2.6.1" resolved "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-2.6.1.tgz" integrity sha512-wd+SD57/K6DiV7jIR34P+s3uckTRuQvx0tKPcvjFlrEylk6P4mQ2KSWk1hblj1Kxaqok7LogKOieygXqBczNlg== dependencies: schema-utils "^4.0.0" minimalistic-assert@^1.0.0: version "1.0.1" resolved "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz" integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== "minimatch@2 || 3", minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.4, minimatch@^3.1.1: version "3.1.2" resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== dependencies: brace-expansion "^1.1.7" minimatch@3.0.4: version "3.0.4" resolved "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz" integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== dependencies: brace-expansion "^1.1.7" minimatch@^5.0.1: version "5.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.2.tgz#0939d7d6f0898acbd1508abe534d1929368a8fff" integrity sha512-bNH9mmM9qsJ2X4r2Nat1B//1dJVcn3+iBLa3IgqJ7EbGaDNepL9QSHOxN4ng33s52VMMhhIfgCYDk3C4ZmlDAg== dependencies: brace-expansion "^2.0.1" minimatch@^9.0.0: version "9.0.1" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.1.tgz#8a555f541cf976c622daf078bb28f29fb927c253" integrity sha512-0jWhJpD/MdhPXwPuiRkCbfYfSKp2qnn2eOc279qI7f+osl/l+prKSrvhg157zSYvx/1nmgn2NqdT6k2Z7zSH9w== dependencies: brace-expansion "^2.0.1" minimatch@~3.0.2, minimatch@~3.0.4: version "3.0.8" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.8.tgz#5e6a59bd11e2ab0de1cfb843eb2d82e546c321c1" integrity sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q== dependencies: brace-expansion "^1.1.7" minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6: version "1.2.6" resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz" integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== mississippi@^1.2.0, mississippi@^1.3.0, mississippi@~1.3.0: version "1.3.1" resolved "https://registry.yarnpkg.com/mississippi/-/mississippi-1.3.1.tgz#2a8bb465e86550ac8b36a7b6f45599171d78671e" integrity sha512-/6rB8YXFbAtsUVRphIRQqB0+9c7VaPHCjVtvto+JqwVxgz8Zz+I+f68/JgQ+Pb4VlZb2svA9OtdXnHHsZz7ltg== dependencies: concat-stream "^1.5.0" duplexify "^3.4.2" end-of-stream "^1.1.0" flush-write-stream "^1.0.0" from2 "^2.1.0" parallel-transform "^1.1.0" pump "^1.0.0" pumpify "^1.3.3" stream-each "^1.1.0" through2 "^2.0.0" mississippi@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/mississippi/-/mississippi-2.0.0.tgz#3442a508fafc28500486feea99409676e4ee5a6f" integrity sha512-zHo8v+otD1J10j/tC+VNoGK9keCuByhKovAvdn74dmxJl9+mWHnx6EMsDN4lgRoMI/eYo2nchAxniIbUPb5onw== dependencies: concat-stream "^1.5.0" duplexify "^3.4.2" end-of-stream "^1.1.0" flush-write-stream "^1.0.0" from2 "^2.1.0" parallel-transform "^1.1.0" pump "^2.0.1" pumpify "^1.3.3" stream-each "^1.1.0" through2 "^2.0.0" "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1: version "0.5.6" resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz" integrity sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw== dependencies: minimist "^1.2.6" mkdirp@~1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== moment-mini@^2.24.0: version "2.29.4" resolved "https://registry.yarnpkg.com/moment-mini/-/moment-mini-2.29.4.tgz#cbbcdc58ce1b267506f28ea6668dbe060a32758f" integrity sha512-uhXpYwHFeiTbY9KSgPPRoo1nt8OxNVdMVoTBYHfSEKeRkIkwGpO+gERmhuhBtzfaeOyTkykSrm2+noJBgqt3Hg== morgan@^1.10.0: version "1.10.0" resolved "https://registry.yarnpkg.com/morgan/-/morgan-1.10.0.tgz#091778abc1fc47cd3509824653dae1faab6b17d7" integrity sha512-AbegBVI4sh6El+1gNwvD5YIck7nSA36weD7xvIxG4in80j/UoK8AEGaWnnz8v1GxonMCltmlNs5ZKbGvl9b1XQ== dependencies: basic-auth "~2.0.1" debug "2.6.9" depd "~2.0.0" on-finished "~2.3.0" on-headers "~1.0.2" move-concurrently@^1.0.1, move-concurrently@~1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz" integrity sha512-hdrFxZOycD/g6A6SoI2bB5NA/5NEqD0569+S47WZhPvm46sD50ZHdYaFmnua5lndde9rCHGjmfK7Z8BuCt/PcQ== dependencies: aproba "^1.1.1" copy-concurrently "^1.0.0" fs-write-stream-atomic "^1.0.8" mkdirp "^0.5.1" rimraf "^2.5.4" run-queue "^1.0.3" mrmime@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/mrmime/-/mrmime-1.0.0.tgz" integrity sha512-a70zx7zFfVO7XpnQ2IX1Myh9yY4UYvfld/dikWRnsXxbyvMcfz+u6UfgNAtH+k2QqtJuzVpv6eLTx1G2+WKZbQ== ms@2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz" integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= ms@2.1.2: version "2.1.2" resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== ms@2.1.3, ms@^2.0.0, ms@^2.1.1: version "2.1.3" resolved "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== multicast-dns@^7.2.4: version "7.2.5" resolved "https://registry.npmjs.org/multicast-dns/-/multicast-dns-7.2.5.tgz" integrity sha512-2eznPJP8z2BFLX50tf0LuODrpINqP1RVIm/CObbTcBRITQgmC/TjcREF1NeTBzIcR5XO/ukWo+YHOjBbFwIupg== dependencies: dns-packet "^5.2.2" thunky "^1.0.2" mute-stream@~0.0.4: version "0.0.8" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== nanoid@^3.3.4: version "3.3.4" resolved "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz" integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw== negotiator@0.6.2: version "0.6.2" resolved "https://registry.npmjs.org/negotiator/-/negotiator-0.6.2.tgz" integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== negotiator@0.6.3: version "0.6.3" resolved "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz" integrity sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg== neo-async@^2.6.0, neo-async@^2.6.2: version "2.6.2" resolved "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz" integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== nice-try@^1.0.4: version "1.0.5" resolved "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz" integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== no-case@^3.0.4: version "3.0.4" resolved "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz" integrity sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg== dependencies: lower-case "^2.0.2" tslib "^2.0.3" node-emoji@^1.10.0: version "1.11.0" resolved "https://registry.npmjs.org/node-emoji/-/node-emoji-1.11.0.tgz" integrity sha512-wo2DpQkQp7Sjm2A0cq+sN7EHKO6Sl0ctXeBdFZrL9T9+UywORbufTcTZxom8YqpLQt/FqNMUkOpkZrJVYSKD3A== dependencies: lodash "^4.17.21" node-fetch-npm@^2.0.2: version "2.0.4" resolved "https://registry.yarnpkg.com/node-fetch-npm/-/node-fetch-npm-2.0.4.tgz#6507d0e17a9ec0be3bec516958a497cec54bf5a4" integrity sha512-iOuIQDWDyjhv9qSDrj9aq/klt6F9z1p2otB3AV7v3zBDcL/x+OfGsvGQZZCcMZbUf4Ujw1xGNQkjvGnVT22cKg== dependencies: encoding "^0.1.11" json-parse-better-errors "^1.0.0" safe-buffer "^5.1.1" node-fetch@2.6.7: version "2.6.7" resolved "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz" integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ== dependencies: whatwg-url "^5.0.0" node-forge@^1: version "1.3.1" resolved "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz" integrity sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA== node-gyp@~3.6.2: version "3.6.3" resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-3.6.3.tgz#369fcb09146ae2167f25d8d23d8b49cc1a110d8d" integrity sha512-7789TDMqJpv5iHxn1cAESCBEC/sBHAFxAvgXAcvzWenEWl0qf6E2Kk/Xwdl5ZclktUJzxJPVa27OMkBvaHKqCQ== dependencies: fstream "^1.0.0" glob "^7.0.3" graceful-fs "^4.1.2" minimatch "^3.0.2" mkdirp "^0.5.0" nopt "2 || 3" npmlog "0 || 1 || 2 || 3 || 4" osenv "0" request ">=2.9.0 <2.82.0" rimraf "2" semver "~5.3.0" tar "^2.0.0" which "1" node-http2@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/node-http2/-/node-http2-4.0.1.tgz#164ff53b5dd22c84f0af142b877c5eaeb6809959" integrity sha512-AP21BjQsOAMTCJCCkdXUUMa1o7/Qx+yAWHnHZbCf8RhZ+hKMjB9rUkAtnfayk/yGj1qapZ5eBHZJBpk1dqdNlw== dependencies: assert "1.4.1" events "1.1.1" https-browserify "0.0.1" setimmediate "^1.0.5" stream-browserify "2.0.1" timers-browserify "2.0.2" url "^0.11.0" websocket-stream "^5.0.1" node-releases@^2.0.12: version "2.0.12" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.12.tgz#35627cc224a23bfb06fb3380f2b3afaaa7eb1039" integrity sha512-QzsYKWhXTWx8h1kIvqfnC++o0pEmpRQA/aenALsL2F4pqNVr7YzcdMlDij5WBnwftRbJCNJL/O7zdKaxKPHqgQ== node-releases@^2.0.6: version "2.0.6" resolved "https://registry.npmjs.org/node-releases/-/node-releases-2.0.6.tgz" integrity sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg== non-layered-tidy-tree-layout@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/non-layered-tidy-tree-layout/-/non-layered-tidy-tree-layout-2.0.2.tgz#57d35d13c356643fc296a55fb11ac15e74da7804" integrity sha512-gkXMxRzUH+PB0ax9dUN0yYF0S25BqeAYqhgMaLUFmpXLEk7Fcu8f4emJuOAY0V8kjDICxROIKsTAKsV/v355xw== "nopt@2 || 3", nopt@~3.0.6: version "3.0.6" resolved "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz" integrity sha512-4GUt3kSEYmk4ITxzB/b9vaIDfUVWN/Ml1Fwl11IlnIG2iaJ9O6WXZ9SrYM9NLI8OCBieN2Y8SWC2oJV0RQ7qYg== dependencies: abbrev "1" nopt@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/nopt/-/nopt-6.0.0.tgz#245801d8ebf409c6df22ab9d95b65e1309cdb16d" integrity sha512-ZwLpbTgdhuZUnZzjd7nb1ZV+4DoiC6/sfiVKok72ym/4Tlf+DFdlHYmT2JPmcNNWV6Pi3SDf1kT+A4r9RTuT9g== dependencies: abbrev "^1.0.0" nopt@~4.0.1: version "4.0.3" resolved "https://registry.yarnpkg.com/nopt/-/nopt-4.0.3.tgz#a375cad9d02fd921278d954c2254d5aa57e15e48" integrity sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg== dependencies: abbrev "1" osenv "^0.1.4" normalize-package-data@^2.0.0, normalize-package-data@^2.4.0, "normalize-package-data@~1.0.1 || ^2.0.0": version "2.5.0" resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== dependencies: hosted-git-info "^2.1.4" resolve "^1.10.0" semver "2 || 3 || 4 || 5" validate-npm-package-license "^3.0.1" normalize-package-data@~2.4.0: version "2.4.2" resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.2.tgz#6b2abd85774e51f7936f1395e45acb905dc849b2" integrity sha512-YcMnjqeoUckXTPKZSAsPjUPLxH85XotbpqK3w4RyCwdFQSU5FxxBys8buehkSfg0j9fKvV1hn7O0+8reEgkAiw== dependencies: hosted-git-info "^2.1.4" is-builtin-module "^1.0.0" semver "2 || 3 || 4 || 5" validate-npm-package-license "^3.0.1" normalize-path@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9" integrity sha512-3pKJwH184Xo/lnH6oyP1q2pMd7HcypqqmRs91/6/i2CGtWwIKGCkOOMTm/zXbgTEWHw1uNpNi/igc3ePOYHb6w== dependencies: remove-trailing-separator "^1.0.1" normalize-path@^3.0.0, normalize-path@~3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz" integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== normalize-range@^0.1.2: version "0.1.2" resolved "https://registry.npmjs.org/normalize-range/-/normalize-range-0.1.2.tgz" integrity sha1-LRDAa9/TEuqXd2laTShDlFa3WUI= normalize-url@^4.1.0: version "4.5.1" resolved "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz" integrity sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA== normalize-url@^6.0.1: version "6.1.0" resolved "https://registry.npmjs.org/normalize-url/-/normalize-url-6.1.0.tgz" integrity sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A== npm-cache-filename@~1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/npm-cache-filename/-/npm-cache-filename-1.0.2.tgz" integrity sha512-5v2y1KG06izpGvZJDSBR5q1Ej+NaPDO05yAAWBJE6+3eiId0R176Gz3Qc2vEmJnE+VGul84g6Qpq8fXzD82/JA== npm-install-checks@~3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/npm-install-checks/-/npm-install-checks-3.0.2.tgz#ab2e32ad27baa46720706908e5b14c1852de44d9" integrity sha512-E4kzkyZDIWoin6uT5howP8VDvkM+E8IQDcHAycaAxMbwkqhIg5eEYALnXOl3Hq9MrkdQB/2/g1xwBINXdKSRkg== dependencies: semver "^2.3.0 || 3.x || 4 || 5" npm-normalize-package-bin@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz#6e79a41f23fd235c0623218228da7d9c23b8f6e2" integrity sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA== "npm-package-arg@^3.0.0 || ^4.0.0 || ^5.0.0", npm-package-arg@^5.1.2, npm-package-arg@~5.1.2: version "5.1.2" resolved "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-5.1.2.tgz" integrity sha512-wJBsrf0qpypPT7A0LART18hCdyhpCMxeTtcb0X4IZO2jsP6Om7EHN1d9KSKiqD+KVH030RVNpWS9thk+pb7wzA== dependencies: hosted-git-info "^2.4.2" osenv "^0.1.4" semver "^5.1.0" validate-npm-package-name "^3.0.0" "npm-package-arg@^4.0.0 || ^5.0.0 || ^6.0.0", npm-package-arg@^6.0.0: version "6.1.1" resolved "https://registry.npmjs.org/npm-package-arg/-/npm-package-arg-6.1.1.tgz" integrity sha512-qBpssaL3IOZWi5vEKUKW0cO7kzLeT+EQO9W8RsLOZf76KF9E/K9+wH0C7t06HXPpaH8WH5xF1MExLuCwbTqRUg== dependencies: hosted-git-info "^2.7.1" osenv "^0.1.5" semver "^5.6.0" validate-npm-package-name "^3.0.0" npm-pick-manifest@^1.0.4: version "1.0.4" resolved "https://registry.npmjs.org/npm-pick-manifest/-/npm-pick-manifest-1.0.4.tgz" integrity sha512-MKxNdeyOZysPRTTbHtW0M5Fw38Jo/3ARsoGw5qjCfS+XGjvNB/Gb4qtAZUFmKPM2mVum+eX559eHvKywU856BQ== dependencies: npm-package-arg "^5.1.2" semver "^5.3.0" npm-registry-client@~8.4.0: version "8.4.0" resolved "https://registry.npmjs.org/npm-registry-client/-/npm-registry-client-8.4.0.tgz" integrity sha512-PVNfqq0lyRdFnE//nDmn3CC9uqTsr8Bya9KPLIevlXMfkP0m4RpCVyFFk0W1Gfx436kKwyhLA6J+lV+rgR81gQ== dependencies: concat-stream "^1.5.2" graceful-fs "^4.1.6" normalize-package-data "~1.0.1 || ^2.0.0" npm-package-arg "^3.0.0 || ^4.0.0 || ^5.0.0" once "^1.3.3" request "^2.74.0" retry "^0.10.0" semver "2 >=2.2.1 || 3.x || 4 || 5" slide "^1.1.3" ssri "^4.1.2" optionalDependencies: npmlog "2 || ^3.1.0 || ^4.0.0" npm-run-path@^2.0.0: version "2.0.2" resolved "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz" integrity sha512-lJxZYlT4DW/bRUtFh1MQIWqmLwQfAxnqWG4HhEdjMlkrJYnJn0Jrr2u3mgxqaWsdiBc76TYkTG/mhrnYTuzfHw== dependencies: path-key "^2.0.0" npm-run-path@^4.0.1: version "4.0.1" resolved "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz" integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== dependencies: path-key "^3.0.0" npm-user-validate@~1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/npm-user-validate/-/npm-user-validate-1.0.1.tgz#31428fc5475fe8416023f178c0ab47935ad8c561" integrity sha512-uQwcd/tY+h1jnEaze6cdX/LrhWhoBxfSknxentoqmIuStxUExxjWd3ULMLFPiFUrZKbOVMowH6Jq2FRWfmhcEw== npm@5.1.0: version "5.1.0" resolved "https://registry.npmjs.org/npm/-/npm-5.1.0.tgz" integrity sha512-pt5ClxEmY/dLpb60SmGQQBKi3nB6Ljx1FXmpoCUdAULlGqGVn2uCyXxPCWFbcuHGthT7qGiaGa1wOfs/UjGYMw== dependencies: JSONStream "~1.3.1" abbrev "~1.1.0" ansi-regex "~3.0.0" ansicolors "~0.3.2" ansistyles "~0.1.3" aproba "~1.1.2" archy "~1.0.0" bluebird "~3.5.0" cacache "~9.2.9" call-limit "~1.1.0" chownr "~1.0.1" cmd-shim "~2.0.2" columnify "~1.5.4" config-chain "~1.1.11" detect-indent "~5.0.0" dezalgo "~1.0.3" editor "~1.0.0" fs-vacuum "~1.2.10" fs-write-stream-atomic "~1.0.10" fstream "~1.0.11" fstream-npm "~1.2.1" glob "~7.1.2" graceful-fs "~4.1.11" has-unicode "~2.0.1" hosted-git-info "~2.5.0" iferr "~0.1.5" inflight "~1.0.6" inherits "~2.0.3" ini "~1.3.4" init-package-json "~1.10.1" lazy-property "~1.0.0" lockfile "~1.0.3" lodash._baseuniq "~4.6.0" lodash.clonedeep "~4.5.0" lodash.union "~4.6.0" lodash.uniq "~4.5.0" lodash.without "~4.4.0" lru-cache "~4.1.1" mississippi "~1.3.0" mkdirp "~0.5.1" move-concurrently "~1.0.1" node-gyp "~3.6.2" nopt "~4.0.1" normalize-package-data "~2.4.0" npm-cache-filename "~1.0.2" npm-install-checks "~3.0.0" npm-package-arg "~5.1.2" npm-registry-client "~8.4.0" npm-user-validate "~1.0.0" npmlog "~4.1.2" once "~1.4.0" opener "~1.4.3" osenv "~0.1.4" pacote "~2.7.38" path-is-inside "~1.0.2" promise-inflight "~1.0.1" read "~1.0.7" read-cmd-shim "~1.0.1" read-installed "~4.0.3" read-package-json "~2.0.9" read-package-tree "~5.1.6" readable-stream "~2.3.2" request "~2.81.0" retry "~0.10.1" rimraf "~2.6.1" safe-buffer "~5.1.1" semver "~5.3.0" sha "~2.0.1" slide "~1.1.6" sorted-object "~2.0.1" sorted-union-stream "~2.1.3" ssri "~4.1.6" strip-ansi "~4.0.0" tar "~2.2.1" text-table "~0.2.0" uid-number "0.0.6" umask "~1.1.0" unique-filename "~1.1.0" unpipe "~1.0.0" update-notifier "~2.2.0" uuid "~3.1.0" validate-npm-package-name "~3.0.0" which "~1.2.14" worker-farm "~1.3.1" wrappy "~1.0.2" write-file-atomic "~2.1.0" "npmlog@0 || 1 || 2 || 3 || 4", "npmlog@2 || ^3.1.0 || ^4.0.0", npmlog@~4.1.2: version "4.1.2" resolved "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz" integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== dependencies: are-we-there-yet "~1.1.2" console-control-strings "~1.1.0" gauge "~2.7.3" set-blocking "~2.0.0" nprogress@^0.2.0: version "0.2.0" resolved "https://registry.npmjs.org/nprogress/-/nprogress-0.2.0.tgz" integrity sha1-y480xTIT2JVyP8urkH6UIq28r7E= npx@^10.2.2: version "10.2.2" resolved "https://registry.npmjs.org/npx/-/npx-10.2.2.tgz" integrity sha512-eImmySusyeWphzs5iNh791XbZnZG0FSNvM4KSah34pdQQIDsdTDhIwg1sjN3AIVcjGLpbQ/YcfqHPshKZQK1fA== dependencies: libnpx "10.2.2" npm "5.1.0" nth-check@^2.0.0: version "2.0.1" resolved "https://registry.npmjs.org/nth-check/-/nth-check-2.0.1.tgz" integrity sha512-it1vE95zF6dTT9lBsYbxvqh0Soy4SPowchj0UBGj/V6cTPnXXtQOPUbhZ6CmGzAD/rW22LQK6E96pcdJXk4A4w== dependencies: boolbase "^1.0.0" nth-check@^2.0.1: version "2.1.1" resolved "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz" integrity sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w== dependencies: boolbase "^1.0.0" number-is-nan@^1.0.0: version "1.0.1" resolved "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz" integrity sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ== oauth-sign@~0.8.1: version "0.8.2" resolved "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz" integrity sha512-VlF07iu3VV3+BTXj43Nmp6Irt/G7j/NgEctUS6IweH1RGhURjjCc2NWtzXFPXXWWfc7hgbXQdtiQu2LGp6MxUg== object-assign@^4.1.0, object-assign@^4.1.1: version "4.1.1" resolved "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz" integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= object-inspect@^1.9.0: version "1.12.0" resolved "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz" integrity sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g== object-keys@^1.0.12, object-keys@^1.1.1: version "1.1.1" resolved "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz" integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== object.assign@^4.1.0: version "4.1.2" resolved "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz" integrity sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ== dependencies: call-bind "^1.0.0" define-properties "^1.1.3" has-symbols "^1.0.1" object-keys "^1.1.1" object.defaults@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/object.defaults/-/object.defaults-1.1.0.tgz#3a7f868334b407dea06da16d88d5cd29e435fecf" integrity sha512-c/K0mw/F11k4dEUBMW8naXUuBuhxRCfG7W+yFy8EcijU/rSmazOUd1XAEEe6bC0OuXY4HUKjTJv7xbxIMqdxrA== dependencies: array-each "^1.0.1" array-slice "^1.0.0" for-own "^1.0.0" isobject "^3.0.0" object.map@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/object.map/-/object.map-1.0.1.tgz#cf83e59dc8fcc0ad5f4250e1f78b3b81bd801d37" integrity sha512-3+mAJu2PLfnSVGHwIWubpOFLscJANBKuB/6A4CxBstc4aqwQY0FWcsppuy4jU5GSB95yES5JHSI+33AWuS4k6w== dependencies: for-own "^1.0.0" make-iterator "^1.0.0" object.pick@^1.2.0: version "1.3.0" resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" integrity sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ== dependencies: isobject "^3.0.1" obuf@^1.0.0, obuf@^1.1.2: version "1.1.2" resolved "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz" integrity sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg== on-finished@2.4.1: version "2.4.1" resolved "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz" integrity sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg== dependencies: ee-first "1.1.1" on-finished@~2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" integrity sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww== dependencies: ee-first "1.1.1" on-headers@~1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz" integrity sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA== once@^1.3.0, once@^1.3.1, once@^1.3.3, once@^1.4.0, once@~1.4.0: version "1.4.0" resolved "https://registry.npmjs.org/once/-/once-1.4.0.tgz" integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= dependencies: wrappy "1" onetime@^5.1.2: version "5.1.2" resolved "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz" integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== dependencies: mimic-fn "^2.1.0" open@^8.0.9, open@^8.4.0: version "8.4.0" resolved "https://registry.npmjs.org/open/-/open-8.4.0.tgz" integrity sha512-XgFPPM+B28FtCCgSb9I+s9szOC1vZRSwgWsRUA5ylIxRTgKozqjOCrVOqGsYABPYK5qnfqClxZTFBa8PKt2v6Q== dependencies: define-lazy-prop "^2.0.0" is-docker "^2.1.1" is-wsl "^2.2.0" opener@^1.5.2: version "1.5.2" resolved "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz" integrity sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A== opener@~1.4.3: version "1.4.3" resolved "https://registry.npmjs.org/opener/-/opener-1.4.3.tgz" integrity sha512-4Im9TrPJcjAYyGR5gBe3yZnBzw5n3Bfh1ceHHGNOpMurINKc6RdSIPXMyon4BZacJbJc36lLkhipioGbWh5pwg== opn@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/opn/-/opn-6.0.0.tgz#3c5b0db676d5f97da1233d1ed42d182bc5a27d2d" integrity sha512-I9PKfIZC+e4RXZ/qr1RhgyCnGgYX0UEIlXgWnCOVACIvFgaC9rz6Won7xbdhoHrd8IIhV7YEpHjreNUNkqCGkQ== dependencies: is-wsl "^1.1.0" os-homedir@^1.0.0: version "1.0.2" resolved "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz" integrity sha512-B5JU3cabzk8c67mRRd3ECmROafjYMXbuzlwtqdM8IbS8ktlTix8aFGb2bAGKrSRIlnfKwovGUUr72JUPyOb6kQ== os-locale@^3.1.0: version "3.1.0" resolved "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz" integrity sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q== dependencies: execa "^1.0.0" lcid "^2.0.0" mem "^4.0.0" os-tmpdir@^1.0.0: version "1.0.2" resolved "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz" integrity sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g== osenv@0, osenv@^0.1.4, osenv@^0.1.5, osenv@~0.1.4: version "0.1.5" resolved "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz" integrity sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g== dependencies: os-homedir "^1.0.0" os-tmpdir "^1.0.0" p-cancelable@^1.0.0: version "1.1.0" resolved "https://registry.npmjs.org/p-cancelable/-/p-cancelable-1.1.0.tgz" integrity sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw== p-defer@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz" integrity sha512-wB3wfAxZpk2AzOfUMJNL+d36xothRSyj8EXOa4f6GMqYDN9BJaaSISbsk+wS9abmnebVw95C2Kb5t85UmpCxuw== p-finally@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz" integrity sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow== p-is-promise@^2.0.0: version "2.1.0" resolved "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.1.0.tgz" integrity sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg== p-limit@^1.1.0: version "1.3.0" resolved "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz" integrity sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q== dependencies: p-try "^1.0.0" p-limit@^2.0.0, p-limit@^2.2.0: version "2.3.0" resolved "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz" integrity sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w== dependencies: p-try "^2.0.0" p-limit@^3.0.2: version "3.1.0" resolved "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz" integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== dependencies: yocto-queue "^0.1.0" p-locate@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz" integrity sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg== dependencies: p-limit "^1.1.0" p-locate@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz" integrity sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ== dependencies: p-limit "^2.0.0" p-locate@^4.1.0: version "4.1.0" resolved "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz" integrity sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A== dependencies: p-limit "^2.2.0" p-locate@^5.0.0: version "5.0.0" resolved "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz" integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== dependencies: p-limit "^3.0.2" p-map@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/p-map/-/p-map-4.0.0.tgz" integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ== dependencies: aggregate-error "^3.0.0" p-retry@^4.5.0: version "4.6.1" resolved "https://registry.npmjs.org/p-retry/-/p-retry-4.6.1.tgz" integrity sha512-e2xXGNhZOZ0lfgR9kL34iGlU8N/KO0xZnQxVEwdeOvpqNDQfdnxIYizvWtK8RglUa3bGqI8g0R/BdfzLMxRkiA== dependencies: "@types/retry" "^0.12.0" retry "^0.13.1" p-try@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz" integrity sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww== p-try@^2.0.0: version "2.2.0" resolved "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz" integrity sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ== package-json@^4.0.0: version "4.0.1" resolved "https://registry.npmjs.org/package-json/-/package-json-4.0.1.tgz" integrity sha512-q/R5GrMek0vzgoomq6rm9OX+3PQve8sLwTirmK30YB3Cu0Bbt9OX9M/SIUnroN5BGJkzwGsFwDaRGD9EwBOlCA== dependencies: got "^6.7.1" registry-auth-token "^3.0.1" registry-url "^3.0.3" semver "^5.1.0" package-json@^6.3.0: version "6.5.0" resolved "https://registry.npmjs.org/package-json/-/package-json-6.5.0.tgz" integrity sha512-k3bdm2n25tkyxcjSKzB5x8kfVxlMdgsbPr0GkZcwHsLpba6cBjqCt1KlcChKEvxHIcTB1FVMuwoijZ26xex5MQ== dependencies: got "^9.6.0" registry-auth-token "^4.0.0" registry-url "^5.0.0" semver "^6.2.0" pacote@~2.7.38: version "2.7.38" resolved "https://registry.npmjs.org/pacote/-/pacote-2.7.38.tgz" integrity sha512-XxHUyHQB7QCVBxoXeVu0yKxT+2PvJucsc0+1E+6f95lMUxEAYERgSAc71ckYXrYr35Ew3xFU/LrhdIK21GQFFA== dependencies: bluebird "^3.5.0" cacache "^9.2.9" glob "^7.1.2" lru-cache "^4.1.1" make-fetch-happen "^2.4.13" minimatch "^3.0.4" mississippi "^1.2.0" normalize-package-data "^2.4.0" npm-package-arg "^5.1.2" npm-pick-manifest "^1.0.4" osenv "^0.1.4" promise-inflight "^1.0.1" promise-retry "^1.1.1" protoduck "^4.0.0" safe-buffer "^5.1.1" semver "^5.3.0" ssri "^4.1.6" tar-fs "^1.15.3" tar-stream "^1.5.4" unique-filename "^1.1.0" which "^1.2.12" parallel-transform@^1.1.0: version "1.2.0" resolved "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.2.0.tgz" integrity sha512-P2vSmIu38uIlvdcU7fDkyrxj33gTUy/ABO5ZUbGowxNCopBq/OoD42bP4UmMrJoPyk4Uqf0mu3mtWBhHCZD8yg== dependencies: cyclist "^1.0.1" inherits "^2.0.3" readable-stream "^2.1.5" param-case@^3.0.4: version "3.0.4" resolved "https://registry.npmjs.org/param-case/-/param-case-3.0.4.tgz" integrity sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A== dependencies: dot-case "^3.0.4" tslib "^2.0.3" parent-module@^1.0.0: version "1.0.1" resolved "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz" integrity sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g== dependencies: callsites "^3.0.0" parse-cache-control@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/parse-cache-control/-/parse-cache-control-1.0.1.tgz#8eeab3e54fa56920fe16ba38f77fa21aacc2d74e" integrity sha512-60zvsJReQPX5/QP0Kzfd/VrpjScIQ7SHBW6bFCYfEP+fp0Eppr1SHhIO5nd1PjZtvclzSzES9D/p5nFJurwfWg== parse-entities@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/parse-entities/-/parse-entities-2.0.0.tgz" integrity sha512-kkywGpCcRYhqQIchaWqZ875wzpS/bMKhz5HnN3p7wveJTkTtyAB/AlnS0f8DFSqYW1T82t6yEAkEcB+A1I3MbQ== dependencies: character-entities "^1.0.0" character-entities-legacy "^1.0.0" character-reference-invalid "^1.0.0" is-alphanumerical "^1.0.0" is-decimal "^1.0.0" is-hexadecimal "^1.0.0" parse-filepath@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/parse-filepath/-/parse-filepath-1.0.2.tgz#a632127f53aaf3d15876f5872f3ffac763d6c891" integrity sha512-FwdRXKCohSVeXqwtYonZTXtbGJKrn+HNyWDYVcp5yuJlesTwNH4rsmRZ+GrKAPJ5bLpRxESMeS+Rl0VCHRvB2Q== dependencies: is-absolute "^1.0.0" map-cache "^0.2.0" path-root "^0.1.1" parse-json@^5.0.0: version "5.2.0" resolved "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz" integrity sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg== dependencies: "@babel/code-frame" "^7.0.0" error-ex "^1.3.1" json-parse-even-better-errors "^2.3.0" lines-and-columns "^1.1.6" parse-numeric-range@^1.3.0: version "1.3.0" resolved "https://registry.npmjs.org/parse-numeric-range/-/parse-numeric-range-1.3.0.tgz" integrity sha512-twN+njEipszzlMJd4ONUYgSfZPDxgHhT9Ahed5uTigpQn90FggW4SA/AIPq/6a149fTbE9qBEcSwE3FAEp6wQQ== parse-passwd@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" integrity sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q== parse5-htmlparser2-tree-adapter@^7.0.0: version "7.0.0" resolved "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.0.0.tgz" integrity sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g== dependencies: domhandler "^5.0.2" parse5 "^7.0.0" parse5@^6.0.0: version "6.0.1" resolved "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz" integrity sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw== parse5@^7.0.0: version "7.0.0" resolved "https://registry.npmjs.org/parse5/-/parse5-7.0.0.tgz" integrity sha512-y/t8IXSPWTuRZqXc0ajH/UwDj4mnqLEbSttNbThcFhGrZuOyoyvNBO85PBp2jQa55wY9d07PBNjsK8ZP3K5U6g== dependencies: entities "^4.3.0" parseurl@~1.3.2, parseurl@~1.3.3: version "1.3.3" resolved "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz" integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== pascal-case@^3.1.2: version "3.1.2" resolved "https://registry.npmjs.org/pascal-case/-/pascal-case-3.1.2.tgz" integrity sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g== dependencies: no-case "^3.0.4" tslib "^2.0.3" path-exists@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz" integrity sha1-zg6+ql94yxiSXqfYENe1mwEP1RU= path-exists@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz" integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== path-is-absolute@^1.0.0: version "1.0.1" resolved "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= path-is-inside@1.0.2, path-is-inside@^1.0.1, path-is-inside@~1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz" integrity sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM= path-key@^2.0.0, path-key@^2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz" integrity sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw== path-key@^3.0.0, path-key@^3.1.0: version "3.1.1" resolved "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== path-parse@^1.0.6, path-parse@^1.0.7: version "1.0.7" resolved "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== path-root-regex@^0.1.0: version "0.1.2" resolved "https://registry.yarnpkg.com/path-root-regex/-/path-root-regex-0.1.2.tgz#bfccdc8df5b12dc52c8b43ec38d18d72c04ba96d" integrity sha512-4GlJ6rZDhQZFE0DPVKh0e9jmZ5egZfxTkp7bcRDuPlJXbAwhxcl2dINPUAsjLdejqaLsCeg8axcLjIbvBjN4pQ== path-root@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/path-root/-/path-root-0.1.1.tgz#9a4a6814cac1c0cd73360a95f32083c8ea4745b7" integrity sha512-QLcPegTHF11axjfojBIoDygmS2E3Lf+8+jI6wOVmNVenrKSo3mFdSGiIgdSHenczw3wPtlVMQaFVwGmM7BJdtg== dependencies: path-root-regex "^0.1.0" path-to-regexp@0.1.7: version "0.1.7" resolved "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz" integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= path-to-regexp@2.2.1: version "2.2.1" resolved "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-2.2.1.tgz" integrity sha512-gu9bD6Ta5bwGrrU8muHzVOBFFREpp2iRkVfhBJahwJ6p6Xw20SjT0MxLnwkjOibQmGSYhiUnf2FLe7k+jcFmGQ== path-to-regexp@^1.7.0: version "1.8.0" resolved "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz" integrity sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA== dependencies: isarray "0.0.1" path-type@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz" integrity sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw== path@^0.12.7: version "0.12.7" resolved "https://registry.yarnpkg.com/path/-/path-0.12.7.tgz#d4dc2a506c4ce2197eb481ebfcd5b36c0140b10f" integrity sha512-aXXC6s+1w7otVF9UletFkFcDsJeO7lSZBPUQhtb5O0xJe8LtYhj/GxldoL09bBj9+ZmE2hNoHqQSFMN5fikh4Q== dependencies: process "^0.11.1" util "^0.10.3" performance-now@^0.2.0: version "0.2.0" resolved "https://registry.npmjs.org/performance-now/-/performance-now-0.2.0.tgz" integrity sha512-YHk5ez1hmMR5LOkb9iJkLKqoBlL7WD5M8ljC75ZfzXriuBIVNuecaXuU7e+hOwyqf24Wxhh7Vxgt7Hnw9288Tg== picocolors@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz" integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3: version "2.3.0" resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz" integrity sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw== picomatch@^2.3.1: version "2.3.1" resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== pify@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz" integrity sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg== pify@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" integrity sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g== pkg-dir@^4.1.0: version "4.2.0" resolved "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz" integrity sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ== dependencies: find-up "^4.0.0" pkg-up@^3.1.0: version "3.1.0" resolved "https://registry.npmjs.org/pkg-up/-/pkg-up-3.1.0.tgz" integrity sha512-nDywThFk1i4BQK4twPQ6TA4RT8bDY96yeuCVBWL3ePARCiEKDRSrNGbFIgUJpLp+XeIR65v8ra7WuJOFUBtkMA== dependencies: find-up "^3.0.0" portscanner@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/portscanner/-/portscanner-2.2.0.tgz#6059189b3efa0965c9d96a56b958eb9508411cf1" integrity sha512-IFroCz/59Lqa2uBvzK3bKDbDDIEaAY8XJ1jFxcLWTqosrsc32//P4VuSB2vZXoHiHqOmx8B5L5hnKOxL/7FlPw== dependencies: async "^2.6.0" is-number-like "^1.0.3" postcss-calc@^8.2.3: version "8.2.4" resolved "https://registry.npmjs.org/postcss-calc/-/postcss-calc-8.2.4.tgz" integrity sha512-SmWMSJmB8MRnnULldx0lQIyhSNvuDl9HfrZkaqqE/WHAhToYsAvDq+yAsA/kIyINDszOp3Rh0GFoNuH5Ypsm3Q== dependencies: postcss-selector-parser "^6.0.9" postcss-value-parser "^4.2.0" postcss-colormin@^5.3.0: version "5.3.0" resolved "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-5.3.0.tgz" integrity sha512-WdDO4gOFG2Z8n4P8TWBpshnL3JpmNmJwdnfP2gbk2qBA8PWwOYcmjmI/t3CmMeL72a7Hkd+x/Mg9O2/0rD54Pg== dependencies: browserslist "^4.16.6" caniuse-api "^3.0.0" colord "^2.9.1" postcss-value-parser "^4.2.0" postcss-convert-values@^5.1.2: version "5.1.2" resolved "https://registry.npmjs.org/postcss-convert-values/-/postcss-convert-values-5.1.2.tgz" integrity sha512-c6Hzc4GAv95B7suy4udszX9Zy4ETyMCgFPUDtWjdFTKH1SE9eFY/jEpHSwTH1QPuwxHpWslhckUQWbNRM4ho5g== dependencies: browserslist "^4.20.3" postcss-value-parser "^4.2.0" postcss-discard-comments@^5.1.2: version "5.1.2" resolved "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-5.1.2.tgz" integrity sha512-+L8208OVbHVF2UQf1iDmRcbdjJkuBF6IS29yBDSiWUIzpYaAhtNl6JYnYm12FnkeCwQqF5LeklOu6rAqgfBZqQ== postcss-discard-duplicates@^5.1.0: version "5.1.0" resolved "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-5.1.0.tgz" integrity sha512-zmX3IoSI2aoenxHV6C7plngHWWhUOV3sP1T8y2ifzxzbtnuhk1EdPwm0S1bIUNaJ2eNbWeGLEwzw8huPD67aQw== postcss-discard-empty@^5.1.1: version "5.1.1" resolved "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-5.1.1.tgz" integrity sha512-zPz4WljiSuLWsI0ir4Mcnr4qQQ5e1Ukc3i7UfE2XcrwKK2LIPIqE5jxMRxO6GbI3cv//ztXDsXwEWT3BHOGh3A== postcss-discard-overridden@^5.1.0: version "5.1.0" resolved "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-5.1.0.tgz" integrity sha512-21nOL7RqWR1kasIVdKs8HNqQJhFxLsyRfAnUDm4Fe4t4mCWL9OJiHvlHPjcd8zc5Myu89b/7wZDnOSjFgeWRtw== postcss-discard-unused@^5.1.0: version "5.1.0" resolved "https://registry.npmjs.org/postcss-discard-unused/-/postcss-discard-unused-5.1.0.tgz" integrity sha512-KwLWymI9hbwXmJa0dkrzpRbSJEh0vVUd7r8t0yOGPcfKzyJJxFM8kLyC5Ev9avji6nY95pOp1W6HqIrfT+0VGw== dependencies: postcss-selector-parser "^6.0.5" postcss-loader@^7.0.0: version "7.0.1" resolved "https://registry.npmjs.org/postcss-loader/-/postcss-loader-7.0.1.tgz" integrity sha512-VRviFEyYlLjctSM93gAZtcJJ/iSkPZ79zWbN/1fSH+NisBByEiVLqpdVDrPLVSi8DX0oJo12kL/GppTBdKVXiQ== dependencies: cosmiconfig "^7.0.0" klona "^2.0.5" semver "^7.3.7" postcss-merge-idents@^5.1.1: version "5.1.1" resolved "https://registry.npmjs.org/postcss-merge-idents/-/postcss-merge-idents-5.1.1.tgz" integrity sha512-pCijL1TREiCoog5nQp7wUe+TUonA2tC2sQ54UGeMmryK3UFGIYKqDyjnqd6RcuI4znFn9hWSLNN8xKE/vWcUQw== dependencies: cssnano-utils "^3.1.0" postcss-value-parser "^4.2.0" postcss-merge-longhand@^5.1.6: version "5.1.6" resolved "https://registry.npmjs.org/postcss-merge-longhand/-/postcss-merge-longhand-5.1.6.tgz" integrity sha512-6C/UGF/3T5OE2CEbOuX7iNO63dnvqhGZeUnKkDeifebY0XqkkvrctYSZurpNE902LDf2yKwwPFgotnfSoPhQiw== dependencies: postcss-value-parser "^4.2.0" stylehacks "^5.1.0" postcss-merge-rules@^5.1.2: version "5.1.2" resolved "https://registry.npmjs.org/postcss-merge-rules/-/postcss-merge-rules-5.1.2.tgz" integrity sha512-zKMUlnw+zYCWoPN6yhPjtcEdlJaMUZ0WyVcxTAmw3lkkN/NDMRkOkiuctQEoWAOvH7twaxUUdvBWl0d4+hifRQ== dependencies: browserslist "^4.16.6" caniuse-api "^3.0.0" cssnano-utils "^3.1.0" postcss-selector-parser "^6.0.5" postcss-minify-font-values@^5.1.0: version "5.1.0" resolved "https://registry.npmjs.org/postcss-minify-font-values/-/postcss-minify-font-values-5.1.0.tgz" integrity sha512-el3mYTgx13ZAPPirSVsHqFzl+BBBDrXvbySvPGFnQcTI4iNslrPaFq4muTkLZmKlGk4gyFAYUBMH30+HurREyA== dependencies: postcss-value-parser "^4.2.0" postcss-minify-gradients@^5.1.1: version "5.1.1" resolved "https://registry.npmjs.org/postcss-minify-gradients/-/postcss-minify-gradients-5.1.1.tgz" integrity sha512-VGvXMTpCEo4qHTNSa9A0a3D+dxGFZCYwR6Jokk+/3oB6flu2/PnPXAh2x7x52EkY5xlIHLm+Le8tJxe/7TNhzw== dependencies: colord "^2.9.1" cssnano-utils "^3.1.0" postcss-value-parser "^4.2.0" postcss-minify-params@^5.1.3: version "5.1.3" resolved "https://registry.npmjs.org/postcss-minify-params/-/postcss-minify-params-5.1.3.tgz" integrity sha512-bkzpWcjykkqIujNL+EVEPOlLYi/eZ050oImVtHU7b4lFS82jPnsCb44gvC6pxaNt38Els3jWYDHTjHKf0koTgg== dependencies: browserslist "^4.16.6" cssnano-utils "^3.1.0" postcss-value-parser "^4.2.0" postcss-minify-selectors@^5.2.1: version "5.2.1" resolved "https://registry.npmjs.org/postcss-minify-selectors/-/postcss-minify-selectors-5.2.1.tgz" integrity sha512-nPJu7OjZJTsVUmPdm2TcaiohIwxP+v8ha9NehQ2ye9szv4orirRU3SDdtUmKH+10nzn0bAyOXZ0UEr7OpvLehg== dependencies: postcss-selector-parser "^6.0.5" postcss-modules-extract-imports@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz" integrity sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw== postcss-modules-local-by-default@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.0.tgz" integrity sha512-sT7ihtmGSF9yhm6ggikHdV0hlziDTX7oFoXtuVWeDd3hHObNkcHRo9V3yg7vCAY7cONyxJC/XXCmmiHHcvX7bQ== dependencies: icss-utils "^5.0.0" postcss-selector-parser "^6.0.2" postcss-value-parser "^4.1.0" postcss-modules-scope@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.0.0.tgz" integrity sha512-hncihwFA2yPath8oZ15PZqvWGkWf+XUfQgUGamS4LqoP1anQLOsOJw0vr7J7IwLpoY9fatA2qiGUGmuZL0Iqlg== dependencies: postcss-selector-parser "^6.0.4" postcss-modules-values@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz" integrity sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ== dependencies: icss-utils "^5.0.0" postcss-normalize-charset@^5.1.0: version "5.1.0" resolved "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-5.1.0.tgz" integrity sha512-mSgUJ+pd/ldRGVx26p2wz9dNZ7ji6Pn8VWBajMXFf8jk7vUoSrZ2lt/wZR7DtlZYKesmZI680qjr2CeFF2fbUg== postcss-normalize-display-values@^5.1.0: version "5.1.0" resolved "https://registry.npmjs.org/postcss-normalize-display-values/-/postcss-normalize-display-values-5.1.0.tgz" integrity sha512-WP4KIM4o2dazQXWmFaqMmcvsKmhdINFblgSeRgn8BJ6vxaMyaJkwAzpPpuvSIoG/rmX3M+IrRZEz2H0glrQNEA== dependencies: postcss-value-parser "^4.2.0" postcss-normalize-positions@^5.1.1: version "5.1.1" resolved "https://registry.npmjs.org/postcss-normalize-positions/-/postcss-normalize-positions-5.1.1.tgz" integrity sha512-6UpCb0G4eofTCQLFVuI3EVNZzBNPiIKcA1AKVka+31fTVySphr3VUgAIULBhxZkKgwLImhzMR2Bw1ORK+37INg== dependencies: postcss-value-parser "^4.2.0" postcss-normalize-repeat-style@^5.1.1: version "5.1.1" resolved "https://registry.npmjs.org/postcss-normalize-repeat-style/-/postcss-normalize-repeat-style-5.1.1.tgz" integrity sha512-mFpLspGWkQtBcWIRFLmewo8aC3ImN2i/J3v8YCFUwDnPu3Xz4rLohDO26lGjwNsQxB3YF0KKRwspGzE2JEuS0g== dependencies: postcss-value-parser "^4.2.0" postcss-normalize-string@^5.1.0: version "5.1.0" resolved "https://registry.npmjs.org/postcss-normalize-string/-/postcss-normalize-string-5.1.0.tgz" integrity sha512-oYiIJOf4T9T1N4i+abeIc7Vgm/xPCGih4bZz5Nm0/ARVJ7K6xrDlLwvwqOydvyL3RHNf8qZk6vo3aatiw/go3w== dependencies: postcss-value-parser "^4.2.0" postcss-normalize-timing-functions@^5.1.0: version "5.1.0" resolved "https://registry.npmjs.org/postcss-normalize-timing-functions/-/postcss-normalize-timing-functions-5.1.0.tgz" integrity sha512-DOEkzJ4SAXv5xkHl0Wa9cZLF3WCBhF3o1SKVxKQAa+0pYKlueTpCgvkFAHfk+Y64ezX9+nITGrDZeVGgITJXjg== dependencies: postcss-value-parser "^4.2.0" postcss-normalize-unicode@^5.1.0: version "5.1.0" resolved "https://registry.npmjs.org/postcss-normalize-unicode/-/postcss-normalize-unicode-5.1.0.tgz" integrity sha512-J6M3MizAAZ2dOdSjy2caayJLQT8E8K9XjLce8AUQMwOrCvjCHv24aLC/Lps1R1ylOfol5VIDMaM/Lo9NGlk1SQ== dependencies: browserslist "^4.16.6" postcss-value-parser "^4.2.0" postcss-normalize-url@^5.1.0: version "5.1.0" resolved "https://registry.npmjs.org/postcss-normalize-url/-/postcss-normalize-url-5.1.0.tgz" integrity sha512-5upGeDO+PVthOxSmds43ZeMeZfKH+/DKgGRD7TElkkyS46JXAUhMzIKiCa7BabPeIy3AQcTkXwVVN7DbqsiCew== dependencies: normalize-url "^6.0.1" postcss-value-parser "^4.2.0" postcss-normalize-whitespace@^5.1.1: version "5.1.1" resolved "https://registry.npmjs.org/postcss-normalize-whitespace/-/postcss-normalize-whitespace-5.1.1.tgz" integrity sha512-83ZJ4t3NUDETIHTa3uEg6asWjSBYL5EdkVB0sDncx9ERzOKBVJIUeDO9RyA9Zwtig8El1d79HBp0JEi8wvGQnA== dependencies: postcss-value-parser "^4.2.0" postcss-ordered-values@^5.1.3: version "5.1.3" resolved "https://registry.npmjs.org/postcss-ordered-values/-/postcss-ordered-values-5.1.3.tgz" integrity sha512-9UO79VUhPwEkzbb3RNpqqghc6lcYej1aveQteWY+4POIwlqkYE21HKWaLDF6lWNuqCobEAyTovVhtI32Rbv2RQ== dependencies: cssnano-utils "^3.1.0" postcss-value-parser "^4.2.0" postcss-reduce-idents@^5.2.0: version "5.2.0" resolved "https://registry.npmjs.org/postcss-reduce-idents/-/postcss-reduce-idents-5.2.0.tgz" integrity sha512-BTrLjICoSB6gxbc58D5mdBK8OhXRDqud/zodYfdSi52qvDHdMwk+9kB9xsM8yJThH/sZU5A6QVSmMmaN001gIg== dependencies: postcss-value-parser "^4.2.0" postcss-reduce-initial@^5.1.0: version "5.1.0" resolved "https://registry.npmjs.org/postcss-reduce-initial/-/postcss-reduce-initial-5.1.0.tgz" integrity sha512-5OgTUviz0aeH6MtBjHfbr57tml13PuedK/Ecg8szzd4XRMbYxH4572JFG067z+FqBIf6Zp/d+0581glkvvWMFw== dependencies: browserslist "^4.16.6" caniuse-api "^3.0.0" postcss-reduce-transforms@^5.1.0: version "5.1.0" resolved "https://registry.npmjs.org/postcss-reduce-transforms/-/postcss-reduce-transforms-5.1.0.tgz" integrity sha512-2fbdbmgir5AvpW9RLtdONx1QoYG2/EtqpNQbFASDlixBbAYuTcJ0dECwlqNqH7VbaUnEnh8SrxOe2sRIn24XyQ== dependencies: postcss-value-parser "^4.2.0" postcss-selector-parser@^6.0.2, postcss-selector-parser@^6.0.4, postcss-selector-parser@^6.0.5: version "6.0.6" resolved "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.6.tgz" integrity sha512-9LXrvaaX3+mcv5xkg5kFwqSzSH1JIObIx51PrndZwlmznwXRfxMddDvo9gve3gVR8ZTKgoFDdWkbRFmEhT4PMg== dependencies: cssesc "^3.0.0" util-deprecate "^1.0.2" postcss-selector-parser@^6.0.9: version "6.0.9" resolved "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.9.tgz" integrity sha512-UO3SgnZOVTwu4kyLR22UQ1xZh086RyNZppb7lLAKBFK8a32ttG5i87Y/P3+2bRSjZNyJ1B7hfFNo273tKe9YxQ== dependencies: cssesc "^3.0.0" util-deprecate "^1.0.2" postcss-sort-media-queries@^4.2.1: version "4.2.1" resolved "https://registry.npmjs.org/postcss-sort-media-queries/-/postcss-sort-media-queries-4.2.1.tgz" integrity sha512-9VYekQalFZ3sdgcTjXMa0dDjsfBVHXlraYJEMiOJ/2iMmI2JGCMavP16z3kWOaRu8NSaJCTgVpB/IVpH5yT9YQ== dependencies: sort-css-media-queries "2.0.4" postcss-svgo@^5.1.0: version "5.1.0" resolved "https://registry.npmjs.org/postcss-svgo/-/postcss-svgo-5.1.0.tgz" integrity sha512-D75KsH1zm5ZrHyxPakAxJWtkyXew5qwS70v56exwvw542d9CRtTo78K0WeFxZB4G7JXKKMbEZtZayTGdIky/eA== dependencies: postcss-value-parser "^4.2.0" svgo "^2.7.0" postcss-unique-selectors@^5.1.1: version "5.1.1" resolved "https://registry.npmjs.org/postcss-unique-selectors/-/postcss-unique-selectors-5.1.1.tgz" integrity sha512-5JiODlELrz8L2HwxfPnhOWZYWDxVHWL83ufOv84NrcgipI7TaeRsatAhK4Tr2/ZiYldpK/wBvw5BD3qfaK96GA== dependencies: postcss-selector-parser "^6.0.5" postcss-value-parser@^4.1.0, postcss-value-parser@^4.2.0: version "4.2.0" resolved "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz" integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== postcss-zindex@^5.1.0: version "5.1.0" resolved "https://registry.npmjs.org/postcss-zindex/-/postcss-zindex-5.1.0.tgz" integrity sha512-fgFMf0OtVSBR1va1JNHYgMxYk73yhn/qb4uQDq1DLGYolz8gHCyr/sesEuGUaYs58E3ZJRcpoGuPVoB7Meiq9A== postcss@^8.3.11, postcss@^8.4.14, postcss@^8.4.17, postcss@^8.4.19, postcss@^8.4.7: version "8.4.19" resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.19.tgz#61178e2add236b17351897c8bcc0b4c8ecab56fc" integrity sha512-h+pbPsyhlYj6N2ozBmHhHrs9DzGmbaarbLvWipMRO7RLS+v4onj26MPFXA5OBYFxyqYhUJK456SwDcY9H2/zsA== dependencies: nanoid "^3.3.4" picocolors "^1.0.0" source-map-js "^1.0.2" posthog-docusaurus@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/posthog-docusaurus/-/posthog-docusaurus-2.0.0.tgz#8b8ac890a2d780c8097a1a9766a3d24d2a1f1177" integrity sha512-nDSTIhmH/Fexv347Gx6wBCE97Z+fZTj0p/gqVYAaolMwSdVuzwyFWcFA+aW9uzA5Y5hjzRwwKJJOrIv8smkYkA== prepend-http@^1.0.1: version "1.0.4" resolved "https://registry.npmjs.org/prepend-http/-/prepend-http-1.0.4.tgz" integrity sha512-PhmXi5XmoyKw1Un4E+opM2KcsJInDvKyuOumcjjw3waw86ZNjHwVUOOWLc4bCzLdcKNaWBH9e99sbWzDQsVaYg== prepend-http@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz" integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc= pretty-bytes@^5.3.0: version "5.6.0" resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-5.6.0.tgz#356256f643804773c82f64723fe78c92c62beaeb" integrity sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg== pretty-error@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/pretty-error/-/pretty-error-4.0.0.tgz" integrity sha512-AoJ5YMAcXKYxKhuJGdcvse+Voc6v1RgnsR3nWcYU7q4t6z0Q6T86sv5Zq8VIRbOWWFpvdGE83LtdSMNd+6Y0xw== dependencies: lodash "^4.17.20" renderkid "^3.0.0" pretty-time@^1.1.0: version "1.1.0" resolved "https://registry.npmjs.org/pretty-time/-/pretty-time-1.1.0.tgz" integrity sha512-28iF6xPQrP8Oa6uxE6a1biz+lWeTOAPKggvjB8HAs6nVMKZwf5bG++632Dx614hIWgUPkgivRfG+a8uAXGTIbA== prism-react-renderer@^1.3.5: version "1.3.5" resolved "https://registry.npmjs.org/prism-react-renderer/-/prism-react-renderer-1.3.5.tgz" integrity sha512-IJ+MSwBWKG+SM3b2SUfdrhC+gu01QkV2KmRQgREThBfSQRoufqRfxfHUxpG1WcaFjP+kojcFyO9Qqtpgt3qLCg== prismjs@^1.28.0: version "1.28.0" resolved "https://registry.npmjs.org/prismjs/-/prismjs-1.28.0.tgz" integrity sha512-8aaXdYvl1F7iC7Xm1spqSaY/OJBpYW3v+KJ+F17iYxvdc8sfjW194COK5wVhMZX45tGteiBQgdvD/nhxcRwylw== process-nextick-args@~2.0.0: version "2.0.1" resolved "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz" integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== process@^0.11.1: version "0.11.10" resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A== promise-inflight@^1.0.1, promise-inflight@~1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/promise-inflight/-/promise-inflight-1.0.1.tgz" integrity sha512-6zWPyEOFaQBJYcGMHBKTKJ3u6TBsnMFOIZSa6ce1e/ZrrsOlnHRHbabMjLiBYKp+n44X9eUI6VUPaukCXHuG4g== promise-retry@^1.1.1: version "1.1.1" resolved "https://registry.npmjs.org/promise-retry/-/promise-retry-1.1.1.tgz" integrity sha512-StEy2osPr28o17bIW776GtwO6+Q+M9zPiZkYfosciUUMYqjhU/ffwRAH0zN2+uvGyUsn8/YICIHRzLbPacpZGw== dependencies: err-code "^1.0.0" retry "^0.10.0" promise@^7.1.1: version "7.3.1" resolved "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz" integrity sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg== dependencies: asap "~2.0.3" promise@^8.0.0: version "8.3.0" resolved "https://registry.yarnpkg.com/promise/-/promise-8.3.0.tgz#8cb333d1edeb61ef23869fbb8a4ea0279ab60e0a" integrity sha512-rZPNPKTOYVNEEKFaq1HqTgOwZD+4/YHS5ukLzQCypkj+OkYx7iv0mA91lJlpPPZ8vMau3IIGj5Qlwrx+8iiSmg== dependencies: asap "~2.0.6" prompts@^2.4.2: version "2.4.2" resolved "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz" integrity sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q== dependencies: kleur "^3.0.3" sisteransi "^1.0.5" promzard@^0.3.0: version "0.3.0" resolved "https://registry.npmjs.org/promzard/-/promzard-0.3.0.tgz" integrity sha512-JZeYqd7UAcHCwI+sTOeUDYkvEU+1bQ7iE0UT1MgB/tERkAPkesW46MrpIySzODi+owTjZtiF8Ay5j9m60KmMBw== dependencies: read "1" prop-types@^15.6.2, prop-types@^15.7.2: version "15.7.2" resolved "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz" integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ== dependencies: loose-envify "^1.4.0" object-assign "^4.1.1" react-is "^16.8.1" property-information@^5.0.0, property-information@^5.3.0: version "5.6.0" resolved "https://registry.npmjs.org/property-information/-/property-information-5.6.0.tgz" integrity sha512-YUHSPk+A30YPv+0Qf8i9Mbfe/C0hdPXk1s1jPVToV8pk8BQtpw10ct89Eo7OWkutrwqvT0eicAxlOg3dOAu8JA== dependencies: xtend "^4.0.0" proto-list@~1.2.1: version "1.2.4" resolved "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz" integrity sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA== protoduck@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/protoduck/-/protoduck-4.0.0.tgz" integrity sha512-9sxuz0YTU/68O98xuDn8NBxTVH9EuMhrBTxZdiBL0/qxRmWhB/5a8MagAebDa+98vluAZTs8kMZibCdezbRCeQ== dependencies: genfun "^4.0.1" proxy-addr@~2.0.7: version "2.0.7" resolved "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz" integrity sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg== dependencies: forwarded "0.2.0" ipaddr.js "1.9.1" prr@~1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz" integrity sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw== pseudomap@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz" integrity sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ== pump@^1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/pump/-/pump-1.0.3.tgz#5dfe8311c33bbf6fc18261f9f34702c47c08a954" integrity sha512-8k0JupWme55+9tCVE+FS5ULT3K6AbgqrGa58lTT49RpyfwwcGedHqaC5LlQNdEAumn/wFsu6aPwkuPMioy8kqw== dependencies: end-of-stream "^1.1.0" once "^1.3.1" pump@^2.0.0, pump@^2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz" integrity sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA== dependencies: end-of-stream "^1.1.0" once "^1.3.1" pump@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz" integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== dependencies: end-of-stream "^1.1.0" once "^1.3.1" pumpify@^1.3.3: version "1.5.1" resolved "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz" integrity sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ== dependencies: duplexify "^3.6.0" inherits "^2.0.3" pump "^2.0.0" punycode@1.3.2: version "1.3.2" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" integrity sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw== punycode@^1.3.2, punycode@^1.4.1: version "1.4.1" resolved "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz" integrity sha1-wNWmOycYgArY4esPpSachN1BhF4= punycode@^2.1.0: version "2.1.1" resolved "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz" integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== pupa@^2.1.1: version "2.1.1" resolved "https://registry.npmjs.org/pupa/-/pupa-2.1.1.tgz" integrity sha512-l1jNAspIBSFqbT+y+5FosojNpVpF94nlI+wDUpqP9enwOTfHx9f0gh5nB96vl+6yTpsJsypeNrwfzPrKuHB41A== dependencies: escape-goat "^2.0.0" pure-color@^1.2.0: version "1.3.0" resolved "https://registry.npmjs.org/pure-color/-/pure-color-1.3.0.tgz" integrity sha1-H+Bk+wrIUfDeYTIKi/eWg2Qi8z4= qs@6.10.3: version "6.10.3" resolved "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz" integrity sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ== dependencies: side-channel "^1.0.4" qs@^6.4.0: version "6.11.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.11.0.tgz#fd0d963446f7a65e1367e01abd85429453f0c37a" integrity sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q== dependencies: side-channel "^1.0.4" qs@~6.4.0: version "6.4.1" resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.1.tgz#2bad97710a5b661c366b378b1e3a44a592ff45e6" integrity sha512-LQy1Q1fcva/UsnP/6Iaa4lVeM49WiOitu2T4hZCyA/elLKu37L99qcBJk4VCCk+rdLvnMzfKyiN3SZTqdAZGSQ== querystring@0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" integrity sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g== querystringify@^2.2.0: version "2.2.0" resolved "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz" integrity sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ== queue-microtask@^1.2.2: version "1.2.3" resolved "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz" integrity sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A== queue@6.0.2: version "6.0.2" resolved "https://registry.npmjs.org/queue/-/queue-6.0.2.tgz" integrity sha512-iHZWu+q3IdFZFX36ro/lKBkSvfkztY5Y7HMiPlOUjhupPcG2JMfst2KKEpu5XndviX/3UhFbRngUPNKtgvtZiA== dependencies: inherits "~2.0.3" randombytes@^2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz" integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== dependencies: safe-buffer "^5.1.0" range-parser@1.2.0: version "1.2.0" resolved "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz" integrity sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4= range-parser@^1.2.1, range-parser@~1.2.1: version "1.2.1" resolved "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz" integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== raw-body@2.5.1: version "2.5.1" resolved "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz" integrity sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig== dependencies: bytes "3.1.2" http-errors "2.0.0" iconv-lite "0.4.24" unpipe "1.0.0" raw-body@~1.1.0: version "1.1.7" resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-1.1.7.tgz#1d027c2bfa116acc6623bca8f00016572a87d425" integrity sha512-WmJJU2e9Y6M5UzTOkHaM7xJGAPQD8PNzx3bAd2+uhZAim6wDk6dAZxPVYLF67XhbR4hmKGh33Lpmh4XWrCH5Mg== dependencies: bytes "1" string_decoder "0.10" rc@^1.0.1, rc@^1.1.6, rc@^1.2.8: version "1.2.8" resolved "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz" integrity sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw== dependencies: deep-extend "^0.6.0" ini "~1.3.0" minimist "^1.2.0" strip-json-comments "~2.0.1" react-base16-styling@^0.6.0: version "0.6.0" resolved "https://registry.npmjs.org/react-base16-styling/-/react-base16-styling-0.6.0.tgz" integrity sha1-7yFW1mz0E5aVyKFniGy2nqZgeSw= dependencies: base16 "^1.0.0" lodash.curry "^4.0.1" lodash.flow "^3.3.0" pure-color "^1.2.0" react-dev-utils@^12.0.1: version "12.0.1" resolved "https://registry.npmjs.org/react-dev-utils/-/react-dev-utils-12.0.1.tgz" integrity sha512-84Ivxmr17KjUupyqzFode6xKhjwuEJDROWKJy/BthkL7Wn6NJ8h4WE6k/exAv6ImS+0oZLRRW5j/aINMHyeGeQ== dependencies: "@babel/code-frame" "^7.16.0" address "^1.1.2" browserslist "^4.18.1" chalk "^4.1.2" cross-spawn "^7.0.3" detect-port-alt "^1.1.6" escape-string-regexp "^4.0.0" filesize "^8.0.6" find-up "^5.0.0" fork-ts-checker-webpack-plugin "^6.5.0" global-modules "^2.0.0" globby "^11.0.4" gzip-size "^6.0.0" immer "^9.0.7" is-root "^2.1.0" loader-utils "^3.2.0" open "^8.4.0" pkg-up "^3.1.0" prompts "^2.4.2" react-error-overlay "^6.0.11" recursive-readdir "^2.2.2" shell-quote "^1.7.3" strip-ansi "^6.0.1" text-table "^0.2.0" react-dom@^17.0.1: version "17.0.2" resolved "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz" integrity sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA== dependencies: loose-envify "^1.1.0" object-assign "^4.1.1" scheduler "^0.20.2" react-error-overlay@^6.0.11: version "6.0.11" resolved "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-6.0.11.tgz" integrity sha512-/6UZ2qgEyH2aqzYZgQPxEnz33NJ2gNsnHA2o5+o4wW9bLM/JYQitNP9xPhsXwC08hMMovfGe/8retsdDsczPRg== react-fast-compare@^3.2.0: version "3.2.0" resolved "https://registry.npmjs.org/react-fast-compare/-/react-fast-compare-3.2.0.tgz" integrity sha512-rtGImPZ0YyLrscKI9xTpV8psd6I8VAtjKCzQDlzyDvqJA8XOW78TXYQwNRNd8g8JZnDu8q9Fu/1v4HPAVwVdHA== react-helmet-async@*, react-helmet-async@^1.3.0: version "1.3.0" resolved "https://registry.npmjs.org/react-helmet-async/-/react-helmet-async-1.3.0.tgz" integrity sha512-9jZ57/dAn9t3q6hneQS0wukqC2ENOBgMNVEhb/ZG9ZSxUetzVIw4iAmEU38IaVg3QGYauQPhSeUTuIUtFglWpg== dependencies: "@babel/runtime" "^7.12.5" invariant "^2.2.4" prop-types "^15.7.2" react-fast-compare "^3.2.0" shallowequal "^1.1.0" react-is@^16.6.0, react-is@^16.7.0, react-is@^16.8.1: version "16.13.1" resolved "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz" integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ== react-json-view@^1.21.3: version "1.21.3" resolved "https://registry.npmjs.org/react-json-view/-/react-json-view-1.21.3.tgz" integrity sha512-13p8IREj9/x/Ye4WI/JpjhoIwuzEgUAtgJZNBJckfzJt1qyh24BdTm6UQNGnyTq9dapQdrqvquZTo3dz1X6Cjw== dependencies: flux "^4.0.1" react-base16-styling "^0.6.0" react-lifecycles-compat "^3.0.4" react-textarea-autosize "^8.3.2" react-lifecycles-compat@^3.0.4: version "3.0.4" resolved "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz" integrity sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA== react-loadable-ssr-addon-v5-slorber@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/react-loadable-ssr-addon-v5-slorber/-/react-loadable-ssr-addon-v5-slorber-1.0.1.tgz" integrity sha512-lq3Lyw1lGku8zUEJPDxsNm1AfYHBrO9Y1+olAYwpUJ2IGFBskM0DMKok97A6LWUpHm+o7IvQBOWu9MLenp9Z+A== dependencies: "@babel/runtime" "^7.10.3" react-router-config@^5.1.1: version "5.1.1" resolved "https://registry.npmjs.org/react-router-config/-/react-router-config-5.1.1.tgz" integrity sha512-DuanZjaD8mQp1ppHjgnnUnyOlqYXZVjnov/JzFhjLEwd3Z4dYjMSnqrEzzGThH47vpCOqPPwJM2FtthLeJ8Pbg== dependencies: "@babel/runtime" "^7.1.2" react-router-dom@^5.3.3: version "5.3.3" resolved "https://registry.npmjs.org/react-router-dom/-/react-router-dom-5.3.3.tgz" integrity sha512-Ov0tGPMBgqmbu5CDmN++tv2HQ9HlWDuWIIqn4b88gjlAN5IHI+4ZUZRcpz9Hl0azFIwihbLDYw1OiHGRo7ZIng== dependencies: "@babel/runtime" "^7.12.13" history "^4.9.0" loose-envify "^1.3.1" prop-types "^15.6.2" react-router "5.3.3" tiny-invariant "^1.0.2" tiny-warning "^1.0.0" react-router@5.3.3, react-router@^5.3.3: version "5.3.3" resolved "https://registry.npmjs.org/react-router/-/react-router-5.3.3.tgz" integrity sha512-mzQGUvS3bM84TnbtMYR8ZjKnuPJ71IjSzR+DE6UkUqvN4czWIqEs17yLL8xkAycv4ev0AiN+IGrWu88vJs/p2w== dependencies: "@babel/runtime" "^7.12.13" history "^4.9.0" hoist-non-react-statics "^3.1.0" loose-envify "^1.3.1" mini-create-react-context "^0.4.0" path-to-regexp "^1.7.0" prop-types "^15.6.2" react-is "^16.6.0" tiny-invariant "^1.0.2" tiny-warning "^1.0.0" react-social-login-buttons@^3.9.1: version "3.9.1" resolved "https://registry.yarnpkg.com/react-social-login-buttons/-/react-social-login-buttons-3.9.1.tgz#c0595ac314a09e4d6024134ff0cc9901879179ff" integrity sha512-KtucVWvdnIZ0icG99WJ3usQUJYmlKsOIBYGyngcuNSVyyYdZtif4KHY80qnCg+teDlgYr54ToQtg3x26ZqaS2w== react-textarea-autosize@^8.3.2: version "8.3.3" resolved "https://registry.npmjs.org/react-textarea-autosize/-/react-textarea-autosize-8.3.3.tgz" integrity sha512-2XlHXK2TDxS6vbQaoPbMOfQ8GK7+irc2fVK6QFIcC8GOnH3zI/v481n+j1L0WaPVvKxwesnY93fEfH++sus2rQ== dependencies: "@babel/runtime" "^7.10.2" use-composed-ref "^1.0.0" use-latest "^1.0.0" react@^17.0.1: version "17.0.2" resolved "https://registry.npmjs.org/react/-/react-17.0.2.tgz" integrity sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA== dependencies: loose-envify "^1.1.0" object-assign "^4.1.1" read-cmd-shim@~1.0.1: version "1.0.5" resolved "https://registry.yarnpkg.com/read-cmd-shim/-/read-cmd-shim-1.0.5.tgz#87e43eba50098ba5a32d0ceb583ab8e43b961c16" integrity sha512-v5yCqQ/7okKoZZkBQUAfTsQ3sVJtXdNfbPnI5cceppoxEVLYA3k+VtV2omkeo8MS94JCy4fSiUwlRBAwCVRPUA== dependencies: graceful-fs "^4.1.2" read-installed@~4.0.3: version "4.0.3" resolved "https://registry.npmjs.org/read-installed/-/read-installed-4.0.3.tgz" integrity sha512-O03wg/IYuV/VtnK2h/KXEt9VIbMUFbk3ERG0Iu4FhLZw0EP0T9znqrYDGn6ncbEsXUFaUjiVAWXHzxwt3lhRPQ== dependencies: debuglog "^1.0.1" read-package-json "^2.0.0" readdir-scoped-modules "^1.0.0" semver "2 || 3 || 4 || 5" slide "~1.1.3" util-extend "^1.0.1" optionalDependencies: graceful-fs "^4.1.2" "read-package-json@1 || 2", read-package-json@^2.0.0: version "2.1.2" resolved "https://registry.yarnpkg.com/read-package-json/-/read-package-json-2.1.2.tgz#6992b2b66c7177259feb8eaac73c3acd28b9222a" integrity sha512-D1KmuLQr6ZSJS0tW8hf3WGpRlwszJOXZ3E8Yd/DNRaM5d+1wVRZdHlpGBLAuovjr28LbWvjpWkBHMxpRGGjzNA== dependencies: glob "^7.1.1" json-parse-even-better-errors "^2.3.0" normalize-package-data "^2.0.0" npm-normalize-package-bin "^1.0.0" read-package-json@~2.0.9: version "2.0.13" resolved "https://registry.yarnpkg.com/read-package-json/-/read-package-json-2.0.13.tgz#2e82ebd9f613baa6d2ebe3aa72cefe3f68e41f4a" integrity sha512-/1dZ7TRZvGrYqE0UAfN6qQb5GYBsNcqS1C0tNK601CFOJmtHI7NIGXwetEPU/OtoFHZL3hDxm4rolFFVE9Bnmg== dependencies: glob "^7.1.1" json-parse-better-errors "^1.0.1" normalize-package-data "^2.0.0" slash "^1.0.0" optionalDependencies: graceful-fs "^4.1.2" read-package-tree@~5.1.6: version "5.1.6" resolved "https://registry.npmjs.org/read-package-tree/-/read-package-tree-5.1.6.tgz" integrity sha512-FCX1aT3GWyY658wzDICef4p+n0dB+ENRct8E/Qyvppj6xVpOYerBHfUu7OP5Rt1/393Tdglguf5ju5DEX4wZNg== dependencies: debuglog "^1.0.1" dezalgo "^1.0.0" once "^1.3.0" read-package-json "^2.0.0" readdir-scoped-modules "^1.0.0" read@1, read@~1.0.1, read@~1.0.7: version "1.0.7" resolved "https://registry.npmjs.org/read/-/read-1.0.7.tgz" integrity sha512-rSOKNYUmaxy0om1BNjMN4ezNT6VKK+2xF4GBhc81mkH7L60i6dp8qPYrkndNLT3QPphoII3maL9PVC9XmhHwVQ== dependencies: mute-stream "~0.0.4" "readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.0, readable-stream@^2.3.3, readable-stream@^2.3.5, readable-stream@^2.3.6, readable-stream@~2.3.2, readable-stream@~2.3.6: version "2.3.7" resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz" integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== dependencies: core-util-is "~1.0.0" inherits "~2.0.3" isarray "~1.0.0" process-nextick-args "~2.0.0" safe-buffer "~5.1.1" string_decoder "~1.1.1" util-deprecate "~1.0.1" readable-stream@^3.0.6: version "3.6.0" resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz" integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== dependencies: inherits "^2.0.3" string_decoder "^1.1.1" util-deprecate "^1.0.1" readable-stream@~1.1.10: version "1.1.14" resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz" integrity sha512-+MeVjFf4L44XUkhM1eYbD8fyEsxcV81pqMSR5gblfcLCHfZvbrqy4/qYHE+/R5HoBUT11WV5O08Cr1n3YXkWVQ== dependencies: core-util-is "~1.0.0" inherits "~2.0.1" isarray "0.0.1" string_decoder "~0.10.x" readdir-scoped-modules@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/readdir-scoped-modules/-/readdir-scoped-modules-1.1.0.tgz#8d45407b4f870a0dcaebc0e28670d18e74514309" integrity sha512-asaikDeqAQg7JifRsZn1NJZXo9E+VwlyCfbkZhwyISinqk5zNS6266HS5kah6P0SaQKGF6SkNnZVHUzHFYxYDw== dependencies: debuglog "^1.0.1" dezalgo "^1.0.0" graceful-fs "^4.1.2" once "^1.3.0" readdirp@~3.6.0: version "3.6.0" resolved "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz" integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA== dependencies: picomatch "^2.2.1" reading-time@^1.5.0: version "1.5.0" resolved "https://registry.npmjs.org/reading-time/-/reading-time-1.5.0.tgz" integrity sha512-onYyVhBNr4CmAxFsKS7bz+uTLRakypIe4R+5A824vBSkQy/hB3fZepoVEf8OVAxzLvK+H/jm9TzpI3ETSm64Kg== rechoir@^0.6.2: version "0.6.2" resolved "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz" integrity sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q= dependencies: resolve "^1.1.6" rechoir@^0.7.0: version "0.7.1" resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.7.1.tgz#9478a96a1ca135b5e88fc027f03ee92d6c645686" integrity sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg== dependencies: resolve "^1.9.0" recursive-readdir@^2.2.2: version "2.2.2" resolved "https://registry.npmjs.org/recursive-readdir/-/recursive-readdir-2.2.2.tgz" integrity sha512-nRCcW9Sj7NuZwa2XvH9co8NPeXUBhZP7CRKJtU+cS6PW9FpCIFoI5ib0NT1ZrbNuPoRy0ylyCaUL8Gih4LSyFg== dependencies: minimatch "3.0.4" regenerate-unicode-properties@^10.0.1: version "10.0.1" resolved "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.0.1.tgz" integrity sha512-vn5DU6yg6h8hP/2OkQo3K7uVILvY4iu0oI4t3HFa81UPkhGJwkRwM10JEc3upjdhHjs/k8GJY1sRBhk5sr69Bw== dependencies: regenerate "^1.4.2" regenerate-unicode-properties@^10.1.0: version "10.1.0" resolved "https://registry.yarnpkg.com/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.0.tgz#7c3192cab6dd24e21cb4461e5ddd7dd24fa8374c" integrity sha512-d1VudCLoIGitcU/hEg2QqvyGZQmdC0Lf8BqdOMXGFSvJP4bNV1+XqbPQeHHLD51Jh4QJJ225dlIFvY4Ly6MXmQ== dependencies: regenerate "^1.4.2" regenerate-unicode-properties@^9.0.0: version "9.0.0" resolved "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-9.0.0.tgz" integrity sha512-3E12UeNSPfjrgwjkR81m5J7Aw/T55Tu7nUyZVQYCKEOs+2dkxEY+DpPtZzO4YruuiPb7NkYLVcyJC4+zCbk5pA== dependencies: regenerate "^1.4.2" regenerate@^1.4.2: version "1.4.2" resolved "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz" integrity sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A== regenerator-runtime@^0.13.4: version "0.13.9" resolved "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz" integrity sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA== regenerator-transform@^0.15.1: version "0.15.1" resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.15.1.tgz#f6c4e99fc1b4591f780db2586328e4d9a9d8dc56" integrity sha512-knzmNAcuyxV+gQCufkYcvOqX/qIIfHLv0u5x79kRxuGojfYVky1f15TzZEu2Avte8QGepvUNTnLskf8E6X6Vyg== dependencies: "@babel/runtime" "^7.8.4" regexpu-core@^4.7.1: version "4.8.0" resolved "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.8.0.tgz" integrity sha512-1F6bYsoYiz6is+oz70NWur2Vlh9KWtswuRuzJOfeYUrfPX2o8n74AnUVaOGDbUqVGO9fNHu48/pjJO4sNVwsOg== dependencies: regenerate "^1.4.2" regenerate-unicode-properties "^9.0.0" regjsgen "^0.5.2" regjsparser "^0.7.0" unicode-match-property-ecmascript "^2.0.0" unicode-match-property-value-ecmascript "^2.0.0" regexpu-core@^5.1.0: version "5.1.0" resolved "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.1.0.tgz" integrity sha512-bb6hk+xWd2PEOkj5It46A16zFMs2mv86Iwpdu94la4S3sJ7C973h2dHpYKwIBGaWSO7cIRJ+UX0IeMaWcO4qwA== dependencies: regenerate "^1.4.2" regenerate-unicode-properties "^10.0.1" regjsgen "^0.6.0" regjsparser "^0.8.2" unicode-match-property-ecmascript "^2.0.0" unicode-match-property-value-ecmascript "^2.0.0" regexpu-core@^5.3.1: version "5.3.2" resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-5.3.2.tgz#11a2b06884f3527aec3e93dbbf4a3b958a95546b" integrity sha512-RAM5FlZz+Lhmo7db9L298p2vHP5ZywrVXmVXpmAD9GuL5MPH6t9ROw1iA/wfHkQ76Qe7AaPF0nGuim96/IrQMQ== dependencies: "@babel/regjsgen" "^0.8.0" regenerate "^1.4.2" regenerate-unicode-properties "^10.1.0" regjsparser "^0.9.1" unicode-match-property-ecmascript "^2.0.0" unicode-match-property-value-ecmascript "^2.1.0" registry-auth-token@^3.0.1: version "3.4.0" resolved "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-3.4.0.tgz" integrity sha512-4LM6Fw8eBQdwMYcES4yTnn2TqIasbXuwDx3um+QRs7S55aMKCBKBxvPXl2RiUjHwuJLTyYfxSpmfSAjQpcuP+A== dependencies: rc "^1.1.6" safe-buffer "^5.0.1" registry-auth-token@^4.0.0: version "4.2.1" resolved "https://registry.npmjs.org/registry-auth-token/-/registry-auth-token-4.2.1.tgz" integrity sha512-6gkSb4U6aWJB4SF2ZvLb76yCBjcvufXBqvvEx1HbmKPkutswjW1xNVRY0+daljIYRbogN7O0etYSlbiaEQyMyw== dependencies: rc "^1.2.8" registry-url@^3.0.3: version "3.1.0" resolved "https://registry.npmjs.org/registry-url/-/registry-url-3.1.0.tgz" integrity sha512-ZbgR5aZEdf4UKZVBPYIgaglBmSF2Hi94s2PcIHhRGFjKYu+chjJdYfHn4rt3hB6eCKLJ8giVIIfgMa1ehDfZKA== dependencies: rc "^1.0.1" registry-url@^5.0.0: version "5.1.0" resolved "https://registry.npmjs.org/registry-url/-/registry-url-5.1.0.tgz" integrity sha512-8acYXXTI0AkQv6RAOjE3vOaIXZkT9wo4LOFbBKYQEEnnMNBpKqdUrI6S4NT0KPIo/WVvJ5tE/X5LF/TQUf0ekw== dependencies: rc "^1.2.8" regjsgen@^0.5.2: version "0.5.2" resolved "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.2.tgz" integrity sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A== regjsgen@^0.6.0: version "0.6.0" resolved "https://registry.npmjs.org/regjsgen/-/regjsgen-0.6.0.tgz" integrity sha512-ozE883Uigtqj3bx7OhL1KNbCzGyW2NQZPl6Hs09WTvCuZD5sTI4JY58bkbQWa/Y9hxIsvJ3M8Nbf7j54IqeZbA== regjsparser@^0.7.0: version "0.7.0" resolved "https://registry.npmjs.org/regjsparser/-/regjsparser-0.7.0.tgz" integrity sha512-A4pcaORqmNMDVwUjWoTzuhwMGpP+NykpfqAsEgI1FSH/EzC7lrN5TMd+kN8YCovX+jMpu8eaqXgXPCa0g8FQNQ== dependencies: jsesc "~0.5.0" regjsparser@^0.8.2: version "0.8.4" resolved "https://registry.npmjs.org/regjsparser/-/regjsparser-0.8.4.tgz" integrity sha512-J3LABycON/VNEu3abOviqGHuB/LOtOQj8SKmfP9anY5GfAVw/SPjwzSjxGjbZXIxbGfqTHtJw58C2Li/WkStmA== dependencies: jsesc "~0.5.0" regjsparser@^0.9.1: version "0.9.1" resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.9.1.tgz#272d05aa10c7c1f67095b1ff0addae8442fc5709" integrity sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ== dependencies: jsesc "~0.5.0" relateurl@^0.2.7: version "0.2.7" resolved "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz" integrity sha1-VNvzd+UUQKypCkzSdGANP/LYiKk= remark-code-import@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/remark-code-import/-/remark-code-import-1.2.0.tgz#2f879c05909eb5f7cf5a1236bab415010eec69dd" integrity sha512-fgwLruqlZbVOIhCJFjY+JDwPZhA4/eK3InJzN8Ox8UDdtudpG212JwtRj6la+lAzJU7JmSEyewZSukVZdknt3Q== dependencies: strip-indent "^4.0.0" to-gatsby-remark-plugin "^0.1.0" unist-util-visit "^4.1.0" remark-emoji@^2.2.0: version "2.2.0" resolved "https://registry.npmjs.org/remark-emoji/-/remark-emoji-2.2.0.tgz" integrity sha512-P3cj9s5ggsUvWw5fS2uzCHJMGuXYRb0NnZqYlNecewXt8QBU9n5vW3DUUKOhepS8F9CwdMx9B8a3i7pqFWAI5w== dependencies: emoticon "^3.2.0" node-emoji "^1.10.0" unist-util-visit "^2.0.3" remark-footnotes@2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/remark-footnotes/-/remark-footnotes-2.0.0.tgz" integrity sha512-3Clt8ZMH75Ayjp9q4CorNeyjwIxHFcTkaektplKGl2A1jNGEUey8cKL0ZC5vJwfcD5GFGsNLImLG/NGzWIzoMQ== remark-mdx@1.6.22: version "1.6.22" resolved "https://registry.npmjs.org/remark-mdx/-/remark-mdx-1.6.22.tgz" integrity sha512-phMHBJgeV76uyFkH4rvzCftLfKCr2RZuF+/gmVcaKrpsihyzmhXjA0BEMDaPTXG5y8qZOKPVo83NAOX01LPnOQ== dependencies: "@babel/core" "7.12.9" "@babel/helper-plugin-utils" "7.10.4" "@babel/plugin-proposal-object-rest-spread" "7.12.1" "@babel/plugin-syntax-jsx" "7.12.1" "@mdx-js/util" "1.6.22" is-alphabetical "1.0.4" remark-parse "8.0.3" unified "9.2.0" remark-parse@8.0.3: version "8.0.3" resolved "https://registry.npmjs.org/remark-parse/-/remark-parse-8.0.3.tgz" integrity sha512-E1K9+QLGgggHxCQtLt++uXltxEprmWzNfg+MxpfHsZlrddKzZ/hZyWHDbK3/Ap8HJQqYJRXP+jHczdL6q6i85Q== dependencies: ccount "^1.0.0" collapse-white-space "^1.0.2" is-alphabetical "^1.0.0" is-decimal "^1.0.0" is-whitespace-character "^1.0.0" is-word-character "^1.0.0" markdown-escapes "^1.0.0" parse-entities "^2.0.0" repeat-string "^1.5.4" state-toggle "^1.0.0" trim "0.0.1" trim-trailing-lines "^1.0.0" unherit "^1.0.4" unist-util-remove-position "^2.0.0" vfile-location "^3.0.0" xtend "^4.0.1" remark-squeeze-paragraphs@4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/remark-squeeze-paragraphs/-/remark-squeeze-paragraphs-4.0.0.tgz" integrity sha512-8qRqmL9F4nuLPIgl92XUuxI3pFxize+F1H0e/W3llTk0UsjJaj01+RrirkMw7P21RKe4X6goQhYRSvNWX+70Rw== dependencies: mdast-squeeze-paragraphs "^4.0.0" remove-trailing-separator@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" integrity sha512-/hS+Y0u3aOfIETiaiirUFwDBDzmXPvO+jAfKTitUngIPzdKc6Z0LoFjM/CK5PL4C+eKwHohlHAb6H0VFfmmUsw== renderkid@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/renderkid/-/renderkid-3.0.0.tgz" integrity sha512-q/7VIQA8lmM1hF+jn+sFSPWGlMkSAeNYcPLmDQx2zzuiDfaLrOmumR8iaUKlenFgh0XRPIUeSPlH3A+AW3Z5pg== dependencies: css-select "^4.1.3" dom-converter "^0.2.0" htmlparser2 "^6.1.0" lodash "^4.17.21" strip-ansi "^6.0.1" repeat-string@^1.5.4: version "1.6.1" resolved "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz" integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= "request@>=2.9.0 <2.82.0", request@^2.74.0, request@~2.81.0: version "2.81.0" resolved "https://registry.npmjs.org/request/-/request-2.81.0.tgz" integrity sha512-IZnsR7voF0miGSu29EXPRgPTuEsI/+aibNSBbN1pplrfartF5wDYGADz3iD9vmBVf2r00rckWZf8BtS5kk7Niw== dependencies: aws-sign2 "~0.6.0" aws4 "^1.2.1" caseless "~0.12.0" combined-stream "~1.0.5" extend "~3.0.0" forever-agent "~0.6.1" form-data "~2.1.1" har-validator "~4.2.1" hawk "~3.1.3" http-signature "~1.1.0" is-typedarray "~1.0.0" isstream "~0.1.2" json-stringify-safe "~5.0.1" mime-types "~2.1.7" oauth-sign "~0.8.1" performance-now "^0.2.0" qs "~6.4.0" safe-buffer "^5.0.1" stringstream "~0.0.4" tough-cookie "~2.3.0" tunnel-agent "^0.6.0" uuid "^3.0.0" require-directory@^2.1.1: version "2.1.1" resolved "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz" integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q== require-from-string@^2.0.2: version "2.0.2" resolved "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz" integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== "require-like@>= 0.1.1": version "0.1.2" resolved "https://registry.npmjs.org/require-like/-/require-like-0.1.2.tgz" integrity sha1-rW8wwTvs15cBDEaK+ndcDAprR/o= require-main-filename@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz" integrity sha512-IqSUtOVP4ksd1C/ej5zeEh/BIP2ajqpn8c5x+q99gvcIG/Qf0cud5raVnE/Dwd0ua9TXYDoDc0RE5hBSdz22Ug== requires-port@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz" integrity sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8= resolve-dir@^1.0.0, resolve-dir@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/resolve-dir/-/resolve-dir-1.0.1.tgz#79a40644c362be82f26effe739c9bb5382046f43" integrity sha512-R7uiTjECzvOsWSfdM0QKFNBVFcK27aHOUwdvK53BcW8zqnGdYp0Fbj82cy54+2A4P2tFM22J5kRfe1R+lM/1yg== dependencies: expand-tilde "^2.0.0" global-modules "^1.0.0" resolve-from@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz" integrity sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g== resolve-pathname@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/resolve-pathname/-/resolve-pathname-3.0.0.tgz" integrity sha512-C7rARubxI8bXFNB/hqcp/4iUeIXJhJZvFPFPiSPRnhU5UPxzMFIl+2E6yY6c4k9giDJAhtV+enfA+G89N6Csng== resolve@^1.1.6: version "1.21.0" resolved "https://registry.npmjs.org/resolve/-/resolve-1.21.0.tgz" integrity sha512-3wCbTpk5WJlyE4mSOtDLhqQmGFi0/TD9VPwmiolnk8U0wRgMEktqCXd3vy5buTO3tljvalNvKrjHEfrd2WpEKA== dependencies: is-core-module "^2.8.0" path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" resolve@^1.10.0, resolve@^1.19.0, resolve@^1.9.0: version "1.22.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== dependencies: is-core-module "^2.9.0" path-parse "^1.0.7" supports-preserve-symlinks-flag "^1.0.0" resolve@^1.14.2, resolve@^1.3.2: version "1.20.0" resolved "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz" integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A== dependencies: is-core-module "^2.2.0" path-parse "^1.0.6" responselike@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/responselike/-/responselike-1.0.2.tgz" integrity sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec= dependencies: lowercase-keys "^1.0.0" retry@^0.10.0, retry@~0.10.1: version "0.10.1" resolved "https://registry.npmjs.org/retry/-/retry-0.10.1.tgz" integrity sha512-ZXUSQYTHdl3uS7IuCehYfMzKyIDBNoAuUblvy5oGO5UJSUTmStUUVPXbA9Qxd173Bgre53yCQczQuHgRWAdvJQ== retry@^0.13.1: version "0.13.1" resolved "https://registry.npmjs.org/retry/-/retry-0.13.1.tgz" integrity sha512-XQBQ3I8W1Cge0Seh+6gjj03LbmRFWuoszgK9ooCpwYIrhhoO80pfq4cUkU5DkknwfOfFteRwlZ56PYOGYyFWdg== reusify@^1.0.4: version "1.0.4" resolved "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== rimraf@2, rimraf@^2.5.2, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2: version "2.7.1" resolved "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz" integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== dependencies: glob "^7.1.3" rimraf@^3.0.0, rimraf@^3.0.2, rimraf@~3.0.2: version "3.0.2" resolved "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz" integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== dependencies: glob "^7.1.3" rimraf@~2.6.1: version "2.6.3" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== dependencies: glob "^7.1.3" robust-predicates@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/robust-predicates/-/robust-predicates-3.0.1.tgz#ecde075044f7f30118682bd9fb3f123109577f9a" integrity sha512-ndEIpszUHiG4HtDsQLeIuMvRsDnn8c8rYStabochtUeCvfuvNptb5TUbVD68LRAILPX7p9nqQGh4xJgn3EHS/g== rtl-detect@^1.0.4: version "1.0.4" resolved "https://registry.npmjs.org/rtl-detect/-/rtl-detect-1.0.4.tgz" integrity sha512-EBR4I2VDSSYr7PkBmFy04uhycIpDKp+21p/jARYXlCSjQksTBQcJ0HFUPOO79EPPH5JS6VAhiIQbycf0O3JAxQ== rtlcss@^3.5.0: version "3.5.0" resolved "https://registry.npmjs.org/rtlcss/-/rtlcss-3.5.0.tgz" integrity sha512-wzgMaMFHQTnyi9YOwsx9LjOxYXJPzS8sYnFaKm6R5ysvTkwzHiB0vxnbHwchHQT65PTdBjDG21/kQBWI7q9O7A== dependencies: find-up "^5.0.0" picocolors "^1.0.0" postcss "^8.3.11" strip-json-comments "^3.1.1" run-parallel@^1.1.9: version "1.2.0" resolved "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz" integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA== dependencies: queue-microtask "^1.2.2" run-queue@^1.0.0, run-queue@^1.0.3: version "1.0.3" resolved "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz" integrity sha512-ntymy489o0/QQplUDnpYAYUsO50K9SBrIVaKCWDOJzYJts0f9WH9RFJkyagebkw5+y1oi00R7ynNW/d12GBumg== dependencies: aproba "^1.1.1" rw@1: version "1.3.3" resolved "https://registry.yarnpkg.com/rw/-/rw-1.3.3.tgz#3f862dfa91ab766b14885ef4d01124bfda074fb4" integrity sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ== rxjs@^7.5.4: version "7.5.5" resolved "https://registry.npmjs.org/rxjs/-/rxjs-7.5.5.tgz" integrity sha512-sy+H0pQofO95VDmFLzyaw9xNJU4KTRSwQIGM6+iG3SypAtCiLDzpeG8sJrNCWn2Up9km+KhkvTdbkrdy+yzZdw== dependencies: tslib "^2.1.0" safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz" integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== safe-buffer@5.2.1, safe-buffer@>=5.1.0, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2: version "5.2.1" resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== safe-json-parse@~1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/safe-json-parse/-/safe-json-parse-1.0.1.tgz#3e76723e38dfdda13c9b1d29a1e07ffee4b30b57" integrity sha512-o0JmTu17WGUaUOHa1l0FPGXKBfijbxK6qoHzlkihsDXxzBHvJcA7zgviKR92Xs841rX9pK16unfphLq0/KqX7A== "safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: version "2.1.2" resolved "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz" integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== sass-loader@^10.1.1: version "10.2.0" resolved "https://registry.npmjs.org/sass-loader/-/sass-loader-10.2.0.tgz" integrity sha512-kUceLzC1gIHz0zNJPpqRsJyisWatGYNFRmv2CKZK2/ngMJgLqxTbXwe/hJ85luyvZkgqU3VlJ33UVF2T/0g6mw== dependencies: klona "^2.0.4" loader-utils "^2.0.0" neo-async "^2.6.2" schema-utils "^3.0.0" semver "^7.3.2" sass@^1.32.13, sass@^1.66.1: version "1.66.1" resolved "https://registry.yarnpkg.com/sass/-/sass-1.66.1.tgz#04b51c4671e4650aa393740e66a4e58b44d055b1" integrity sha512-50c+zTsZOJVgFfTgwwEzkjA3/QACgdNsKueWPyAR0mRINIvLAStVQBbPg14iuqEQ74NPDbXzJARJ/O4SI1zftA== dependencies: chokidar ">=3.0.0 <4.0.0" immutable "^4.0.0" source-map-js ">=0.6.2 <2.0.0" sax@^1.2.4: version "1.2.4" resolved "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz" integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== scheduler@^0.20.2: version "0.20.2" resolved "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz" integrity sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ== dependencies: loose-envify "^1.1.0" object-assign "^4.1.1" schema-utils@2.7.0: version "2.7.0" resolved "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.0.tgz" integrity sha512-0ilKFI6QQF5nxDZLFn2dMjvc4hjg/Wkg7rHd3jK6/A4a1Hl9VFdQWvgB1UMGoU94pad1P/8N7fMcEnLnSiju8A== dependencies: "@types/json-schema" "^7.0.4" ajv "^6.12.2" ajv-keywords "^3.4.1" schema-utils@^2.6.5: version "2.7.1" resolved "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.1.tgz" integrity sha512-SHiNtMOUGWBQJwzISiVYKu82GiV4QYGePp3odlY1tuKO7gPtphAT5R/py0fA6xtbgLL/RvtJZnU9b8s0F1q0Xg== dependencies: "@types/json-schema" "^7.0.5" ajv "^6.12.4" ajv-keywords "^3.5.2" schema-utils@^3.0.0, schema-utils@^3.1.0, schema-utils@^3.1.1: version "3.1.1" resolved "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz" integrity sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw== dependencies: "@types/json-schema" "^7.0.8" ajv "^6.12.5" ajv-keywords "^3.5.2" schema-utils@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/schema-utils/-/schema-utils-4.0.0.tgz" integrity sha512-1edyXKgh6XnJsJSQ8mKWXnN/BVaIbFMLpouRUrXgVq7WYne5kw3MW7UPhO44uRXQSIpTSXoJbmrR2X0w9kUTyg== dependencies: "@types/json-schema" "^7.0.9" ajv "^8.8.0" ajv-formats "^2.1.1" ajv-keywords "^5.0.0" section-matter@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/section-matter/-/section-matter-1.0.0.tgz" integrity sha512-vfD3pmTzGpufjScBh50YHKzEu2lxBWhVEHsNGoEXmCmn2hKGfeNLYMzCJpe8cD7gqX7TJluOVpBkAequ6dgMmA== dependencies: extend-shallow "^2.0.1" kind-of "^6.0.0" select-hose@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz" integrity sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo= selfsigned@^2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/selfsigned/-/selfsigned-2.0.1.tgz" integrity sha512-LmME957M1zOsUhG+67rAjKfiWFox3SBxE/yymatMZsAx+oMrJ0YQ8AToOnyCm7xbeg2ep37IHLxdu0o2MavQOQ== dependencies: node-forge "^1" semver-diff@^2.0.0: version "2.1.0" resolved "https://registry.npmjs.org/semver-diff/-/semver-diff-2.1.0.tgz" integrity sha512-gL8F8L4ORwsS0+iQ34yCYv///jsOq0ZL7WP55d1HnJ32o7tyFYEFQZQA22mrLIacZdU6xecaBBZ+uEiffGNyXw== dependencies: semver "^5.0.3" semver-diff@^3.1.1: version "3.1.1" resolved "https://registry.npmjs.org/semver-diff/-/semver-diff-3.1.1.tgz" integrity sha512-GX0Ix/CJcHyB8c4ykpHGIAvLyOwOobtM/8d+TQkAd81/bEjgPHrfba41Vpesr7jX/t8Uh+R3EX9eAS5be+jQYg== dependencies: semver "^6.3.0" "semver@2 >=2.2.1 || 3.x || 4 || 5", "semver@2 || 3 || 4 || 5", "semver@2.x || 3.x || 4 || 5", "semver@^2.3.0 || 3.x || 4 || 5", semver@^5.0.3, semver@^5.1.0, semver@^5.3.0, semver@^5.4.1, semver@^5.5.0, semver@^5.6.0: version "5.7.1" resolved "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== semver@7.0.0: version "7.0.0" resolved "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz" integrity sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A== semver@^6.0.0, semver@^6.1.1, semver@^6.1.2, semver@^6.2.0, semver@^6.3.0: version "6.3.0" resolved "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7: version "7.3.7" resolved "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz" integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g== dependencies: lru-cache "^6.0.0" semver@~5.3.0: version "5.3.0" resolved "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz" integrity sha512-mfmm3/H9+67MCVix1h+IXTpDwL6710LyHuk7+cWC9T1mE0qz4iHhh6r4hU2wrIT9iTsAAC2XQRvfblL028cpLw== send@0.18.0: version "0.18.0" resolved "https://registry.npmjs.org/send/-/send-0.18.0.tgz" integrity sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg== dependencies: debug "2.6.9" depd "2.0.0" destroy "1.2.0" encodeurl "~1.0.2" escape-html "~1.0.3" etag "~1.8.1" fresh "0.5.2" http-errors "2.0.0" mime "1.6.0" ms "2.1.3" on-finished "2.4.1" range-parser "~1.2.1" statuses "2.0.1" serialize-javascript@^6.0.0: version "6.0.0" resolved "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz" integrity sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag== dependencies: randombytes "^2.1.0" serve-handler@^6.1.3: version "6.1.3" resolved "https://registry.npmjs.org/serve-handler/-/serve-handler-6.1.3.tgz" integrity sha512-FosMqFBNrLyeiIDvP1zgO6YoTzFYHxLDEIavhlmQ+knB2Z7l1t+kGLHkZIDN7UVWqQAmKI3D20A6F6jo3nDd4w== dependencies: bytes "3.0.0" content-disposition "0.5.2" fast-url-parser "1.1.3" mime-types "2.1.18" minimatch "3.0.4" path-is-inside "1.0.2" path-to-regexp "2.2.1" range-parser "1.2.0" serve-index@^1.9.1: version "1.9.1" resolved "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz" integrity sha1-03aNabHn2C5c4FD/9bRTvqEqkjk= dependencies: accepts "~1.3.4" batch "0.6.1" debug "2.6.9" escape-html "~1.0.3" http-errors "~1.6.2" mime-types "~2.1.17" parseurl "~1.3.2" serve-static@1.15.0, serve-static@^1.14.1: version "1.15.0" resolved "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz" integrity sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g== dependencies: encodeurl "~1.0.2" escape-html "~1.0.3" parseurl "~1.3.3" send "0.18.0" set-blocking@^2.0.0, set-blocking@~2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz" integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== setimmediate@^1.0.4, setimmediate@^1.0.5: version "1.0.5" resolved "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz" integrity sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU= setprototypeof@1.1.0: version "1.1.0" resolved "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz" integrity sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ== setprototypeof@1.2.0: version "1.2.0" resolved "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz" integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== sha@~2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/sha/-/sha-2.0.1.tgz" integrity sha512-Lj/GiNro+/4IIvhDvTo2HDqTmQkbqgg/O3lbkM5lMgagriGPpWamxtq1KJPx7mCvyF1/HG6Hs7zaYaj4xpfXbA== dependencies: graceful-fs "^4.1.2" readable-stream "^2.0.2" shallow-clone@^3.0.0: version "3.0.1" resolved "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz" integrity sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA== dependencies: kind-of "^6.0.2" shallowequal@^1.1.0: version "1.1.0" resolved "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz" integrity sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ== shebang-command@^1.2.0: version "1.2.0" resolved "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz" integrity sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg== dependencies: shebang-regex "^1.0.0" shebang-command@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz" integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== dependencies: shebang-regex "^3.0.0" shebang-regex@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz" integrity sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ== shebang-regex@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz" integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== shell-quote@^1.7.3: version "1.7.3" resolved "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.3.tgz" integrity sha512-Vpfqwm4EnqGdlsBFNmHhxhElJYrdfcxPThu+ryKS5J8L/fhAwLazFZtq+S+TWZ9ANj2piSQLGj6NQg+lKPmxrw== shelljs@^0.8.5: version "0.8.5" resolved "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz" integrity sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow== dependencies: glob "^7.0.0" interpret "^1.0.0" rechoir "^0.6.2" shiki@^0.14.1: version "0.14.1" resolved "https://registry.yarnpkg.com/shiki/-/shiki-0.14.1.tgz#9fbe082d0a8aa2ad63df4fbf2ee11ec924aa7ee1" integrity sha512-+Jz4nBkCBe0mEDqo1eKRcCdjRtrCjozmcbTUjbPTX7OOJfEbTZzlUWlZtGe3Gb5oV1/jnojhG//YZc3rs9zSEw== dependencies: ansi-sequence-parser "^1.1.0" jsonc-parser "^3.2.0" vscode-oniguruma "^1.7.0" vscode-textmate "^8.0.0" side-channel@^1.0.4: version "1.0.4" resolved "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz" integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== dependencies: call-bind "^1.0.0" get-intrinsic "^1.0.2" object-inspect "^1.9.0" sigmund@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/sigmund/-/sigmund-1.0.1.tgz#3ff21f198cad2175f9f3b781853fd94d0d19b590" integrity sha512-fCvEXfh6NWpm+YSuY2bpXb/VIihqWA6hLsgboC+0nl71Q7N7o2eaCW8mJa/NLvQhs6jpd3VZV4UiUQlV6+lc8g== signal-exit@^3.0.0: version "3.0.7" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== signal-exit@^3.0.2, signal-exit@^3.0.3: version "3.0.6" resolved "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.6.tgz" integrity sha512-sDl4qMFpijcGw22U5w63KmD3cZJfBuFlVNbVMKje2keoKML7X2UzWbc4XrmEbDwg0NXJc3yv4/ox7b+JWb57kQ== sirv@^1.0.7: version "1.0.19" resolved "https://registry.npmjs.org/sirv/-/sirv-1.0.19.tgz" integrity sha512-JuLThK3TnZG1TAKDwNIqNq6QA2afLOCcm+iE8D1Kj3GA40pSPsxQjjJl0J8X3tsR7T+CP1GavpzLwYkgVLWrZQ== dependencies: "@polka/url" "^1.0.0-next.20" mrmime "^1.0.0" totalist "^1.0.0" sisteransi@^1.0.5: version "1.0.5" resolved "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz" integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg== sitemap@^7.1.1: version "7.1.1" resolved "https://registry.npmjs.org/sitemap/-/sitemap-7.1.1.tgz" integrity sha512-mK3aFtjz4VdJN0igpIJrinf3EO8U8mxOPsTBzSsy06UtjZQJ3YY3o3Xa7zSc5nMqcMrRwlChHZ18Kxg0caiPBg== dependencies: "@types/node" "^17.0.5" "@types/sax" "^1.2.1" arg "^5.0.0" sax "^1.2.4" slash@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" integrity sha512-3TYDR7xWt4dIqV2JauJr+EJeW356RXijHeUlO+8djJ+uBXPn8/2dpzBc8yQhh583sVvc9CvFAeQVgijsH+PNNg== slash@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== slash@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/slash/-/slash-4.0.0.tgz" integrity sha512-3dOsAHXXUkQTpOYcoAxLIorMTp4gIQr5IW3iVb7A7lFIp0VHhnynm9izx6TssdrIcVIESAlVjtnO2K8bg+Coew== slide@^1.1.3, slide@^1.1.5, slide@~1.1.3, slide@~1.1.6: version "1.1.6" resolved "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz" integrity sha512-NwrtjCg+lZoqhFU8fOwl4ay2ei8PaqCBOUV3/ektPY9trO1yQ1oXEfmHAhKArUVUr/hOHvy5f6AdP17dCM0zMw== smart-buffer@^1.0.13: version "1.1.15" resolved "https://registry.npmjs.org/smart-buffer/-/smart-buffer-1.1.15.tgz" integrity sha512-1+8bxygjTsNfvQe0/0pNBesTOlSHtOeG6b6LYbvsZCCHDKYZ40zcQo6YTnZBWrBSLWOCbrHljLdEmGMYebu7aQ== snake-case@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/snake-case/-/snake-case-3.0.4.tgz#4f2bbd568e9935abdfd593f34c691dadb49c452c" integrity sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg== dependencies: dot-case "^3.0.4" tslib "^2.0.3" sntp@1.x.x: version "1.0.9" resolved "https://registry.npmjs.org/sntp/-/sntp-1.0.9.tgz" integrity sha512-7bgVOAnPj3XjrKY577S+puCKGCRlUrcrEdsMeRXlg9Ghf5df/xNi6sONUa43WrHUd3TjJBF7O04jYoiY0FVa0A== dependencies: hoek "2.x.x" sockjs@^0.3.24: version "0.3.24" resolved "https://registry.npmjs.org/sockjs/-/sockjs-0.3.24.tgz" integrity sha512-GJgLTZ7vYb/JtPSSZ10hsOYIvEYsjbNU+zPdIHcUaWVNUEPivzxku31865sSSud0Da0W4lEeOPlmw93zLQchuQ== dependencies: faye-websocket "^0.11.3" uuid "^8.3.2" websocket-driver "^0.7.4" socks-proxy-agent@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-3.0.1.tgz#2eae7cf8e2a82d34565761539a7f9718c5617659" integrity sha512-ZwEDymm204mTzvdqyUqOdovVr2YRd2NYskrYrF2LXyZ9qDiMAoFESGK8CRphiO7rtbo2Y757k2Nia3x2hGtalA== dependencies: agent-base "^4.1.0" socks "^1.1.10" socks@^1.1.10: version "1.1.10" resolved "https://registry.npmjs.org/socks/-/socks-1.1.10.tgz" integrity sha512-ArX4vGPULWjKDKgUnW8YzfI2uXW7kzgkJuB0GnFBA/PfT3exrrOk+7Wk2oeb894Qf20u1PWv9LEgrO0Z82qAzA== dependencies: ip "^1.1.4" smart-buffer "^1.0.13" sort-css-media-queries@2.0.4: version "2.0.4" resolved "https://registry.npmjs.org/sort-css-media-queries/-/sort-css-media-queries-2.0.4.tgz" integrity sha512-PAIsEK/XupCQwitjv7XxoMvYhT7EAfyzI3hsy/MyDgTvc+Ft55ctdkctJLOy6cQejaIC+zjpUL4djFVm2ivOOw== sorted-object@~2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/sorted-object/-/sorted-object-2.0.1.tgz" integrity sha512-oKAAs26HeTu3qbawzUGCkTOBv/5MRrcuJyRWwbfEnWdpXnXsj+WEM3HTvarV73tMcf9uBEZNZoNDVRL62VLxzA== sorted-union-stream@~2.1.3: version "2.1.3" resolved "https://registry.npmjs.org/sorted-union-stream/-/sorted-union-stream-2.1.3.tgz" integrity sha512-RaKskQJZkmVREIwyAFho1RRU+sKjDdg51Crvxg2VxmIyiIrNhPNoJD/by5/pklWBXAZoO6LfAAGv8xd47p9TnQ== dependencies: from2 "^1.3.0" stream-iterate "^1.1.0" "source-map-js@>=0.6.2 <2.0.0", source-map-js@^1.0.1, source-map-js@^1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz" integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw== source-map-support@~0.5.20: version "0.5.21" resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz" integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== dependencies: buffer-from "^1.0.0" source-map "^0.6.0" source-map@^0.5.0, source-map@^0.5.3: version "0.5.7" resolved "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz" integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0: version "0.6.1" resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== space-separated-tokens@^1.0.0: version "1.1.5" resolved "https://registry.npmjs.org/space-separated-tokens/-/space-separated-tokens-1.1.5.tgz" integrity sha512-q/JSVd1Lptzhf5bkYm4ob4iWPjx0KiRe3sRFBNrVqbJkFaBm5vbbowy1mymoPNLRa52+oadOhJ+K49wsSeSjTA== spdx-correct@^3.0.0: version "3.1.1" resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.1.tgz#dece81ac9c1e6713e5f7d1b6f17d468fa53d89a9" integrity sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w== dependencies: spdx-expression-parse "^3.0.0" spdx-license-ids "^3.0.0" spdx-exceptions@^2.1.0: version "2.3.0" resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz#3f28ce1a77a00372683eade4a433183527a2163d" integrity sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A== spdx-expression-parse@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz#cf70f50482eefdc98e3ce0a6833e4a53ceeba679" integrity sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q== dependencies: spdx-exceptions "^2.1.0" spdx-license-ids "^3.0.0" spdx-license-ids@^3.0.0: version "3.0.12" resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.12.tgz#69077835abe2710b65f03969898b6637b505a779" integrity sha512-rr+VVSXtRhO4OHbXUiAF7xW3Bo9DuuF6C5jH+q/x15j2jniycgKbxU09Hr0WqlSLUs4i4ltHGXqTe7VHclYWyA== spdy-transport@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/spdy-transport/-/spdy-transport-3.0.0.tgz" integrity sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw== dependencies: debug "^4.1.0" detect-node "^2.0.4" hpack.js "^2.1.6" obuf "^1.1.2" readable-stream "^3.0.6" wbuf "^1.7.3" spdy@^4.0.2: version "4.0.2" resolved "https://registry.npmjs.org/spdy/-/spdy-4.0.2.tgz" integrity sha512-r46gZQZQV+Kl9oItvl1JZZqJKGr+oEkB08A6BzkiR7593/7IbtuncXHd2YoYeTsG4157ZssMu9KYvUHLcjcDoA== dependencies: debug "^4.1.0" handle-thing "^2.0.0" http-deceiver "^1.2.7" select-hose "^2.0.0" spdy-transport "^3.0.0" spectaql@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/spectaql/-/spectaql-2.3.0.tgz#6072b949f8bfb91efe2d0534dc39c48e993df594" integrity sha512-fk0zWo6R8F/5l5Gy6dpbTyiituXXRpCUcIxj8VTRwbSw2+Xj2xNRkYJC3fIEwTaeNshL88Pts5fnFxFGNA1K7A== dependencies: "@anvilco/apollo-server-plugin-introspection-metadata" "^2.0.1" "@graphql-tools/load-files" "^6.3.2" "@graphql-tools/merge" "^8.1.2" "@graphql-tools/schema" "^9.0.1" "@graphql-tools/utils" "^9.1.1" cheerio "^1.0.0-rc.10" coffeescript "^2.6.1" commander "^10.0.0" fast-glob "^3.2.12" graceful-fs "~4.2.10" graphql "^16.3.0" graphql-scalars "^1.15.0" grunt "~1.5.3" grunt-contrib-clean "^2.0.0" grunt-contrib-concat "^2.1.0" grunt-contrib-connect "^3.0.0" grunt-contrib-copy "^1.0.0" grunt-contrib-cssmin "^5.0.0" grunt-contrib-uglify "^5.0.1" grunt-contrib-watch "^1.1.0" grunt-sass "^3.0.2" handlebars "^4.7.7" highlight.js "^11.4.0" htmlparser2 "~9.0.0" js-beautify "~1.14.7" js-yaml "^4.1.0" json-stringify-pretty-compact "^3.0.0" json5 "^2.2.0" lodash "^4.17.21" marked "^4.0.12" microfiber "^2.0.1" postcss "^8.4.19" sass "^1.32.13" sync-request "^6.1.0" tmp "0.2.1" sprintf-js@^1.1.1: version "1.1.2" resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.2.tgz#da1765262bf8c0f571749f2ad6c26300207ae673" integrity sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug== sprintf-js@~1.0.2: version "1.0.3" resolved "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz" integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= sshpk@^1.7.0: version "1.17.0" resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.17.0.tgz#578082d92d4fe612b13007496e543fa0fbcbe4c5" integrity sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ== dependencies: asn1 "~0.2.3" assert-plus "^1.0.0" bcrypt-pbkdf "^1.0.0" dashdash "^1.12.0" ecc-jsbn "~0.1.1" getpass "^0.1.1" jsbn "~0.1.0" safer-buffer "^2.0.2" tweetnacl "~0.14.0" ssri@^4.1.2, ssri@^4.1.6, ssri@~4.1.6: version "4.1.6" resolved "https://registry.npmjs.org/ssri/-/ssri-4.1.6.tgz" integrity sha512-WUbCdgSAMQjTFZRWvSPpauryvREEA+Krn19rx67UlJEJx/M192ZHxMmJXjZ4tkdFm+Sb0SXGlENeQVlA5wY7kA== dependencies: safe-buffer "^5.1.0" ssri@^5.0.0, ssri@^5.2.4: version "5.3.0" resolved "https://registry.yarnpkg.com/ssri/-/ssri-5.3.0.tgz#ba3872c9c6d33a0704a7d71ff045e5ec48999d06" integrity sha512-XRSIPqLij52MtgoQavH/x/dU1qVKtWUAAZeOHsR9c2Ddi4XerFy3mc1alf+dLJKl9EUIm/Ht+EowFkTUOA6GAQ== dependencies: safe-buffer "^5.1.1" stable@^0.1.8: version "0.1.8" resolved "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz" integrity sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w== state-toggle@^1.0.0: version "1.0.3" resolved "https://registry.npmjs.org/state-toggle/-/state-toggle-1.0.3.tgz" integrity sha512-d/5Z4/2iiCnHw6Xzghyhb+GcmF89bxwgXG60wjIiZaxnymbyOmI8Hk4VqHXiVVp6u2ysaskFfXg3ekCj4WNftQ== statuses@2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz" integrity sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ== "statuses@>= 1.4.0 < 2", statuses@~1.5.0: version "1.5.0" resolved "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz" integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= std-env@^3.0.1: version "3.0.1" resolved "https://registry.npmjs.org/std-env/-/std-env-3.0.1.tgz" integrity sha512-mC1Ps9l77/97qeOZc+HrOL7TIaOboHqMZ24dGVQrlxFcpPpfCHpH+qfUT7Dz+6mlG8+JPA1KfBQo19iC/+Ngcw== stream-browserify@2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.1.tgz#66266ee5f9bdb9940a4e4514cafb43bb71e5c9db" integrity sha512-nmQnY9D9TlnfQIkYJCCWxvCcQODilFRZIw14gCMYQVXOiY4E1Ze1VMxB+6y3qdXHpTordULo2qWloHmNcNAQYw== dependencies: inherits "~2.0.1" readable-stream "^2.0.2" stream-each@^1.1.0: version "1.2.3" resolved "https://registry.npmjs.org/stream-each/-/stream-each-1.2.3.tgz" integrity sha512-vlMC2f8I2u/bZGqkdfLQW/13Zihpej/7PmSiMQsbYddxuTsJp8vRe2x2FvVExZg7FaOds43ROAuFJwPR4MTZLw== dependencies: end-of-stream "^1.1.0" stream-shift "^1.0.0" stream-iterate@^1.1.0: version "1.2.0" resolved "https://registry.npmjs.org/stream-iterate/-/stream-iterate-1.2.0.tgz" integrity sha512-QVfGkdBQ8NzsSIiL3rV6AoFFWwMvlg1qpTwVQaMGY5XYThDUuNM4hYSzi8pbKlimTsWyQdaWRZE+jwlPsMiiZw== dependencies: readable-stream "^2.1.5" stream-shift "^1.0.0" stream-shift@^1.0.0: version "1.0.1" resolved "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz" integrity sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ== string-template@~0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/string-template/-/string-template-0.2.1.tgz#42932e598a352d01fc22ec3367d9d84eec6c9add" integrity sha512-Yptehjogou2xm4UJbxJ4CxgZx12HBfeystp0y3x7s4Dj32ltVVG1Gg8YhKjHZkHicuKpZX/ffilA8505VbUbpw== string-width@^1.0.1: version "1.0.2" resolved "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz" integrity sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw== dependencies: code-point-at "^1.0.0" is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.0.0, string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.2: version "4.2.3" resolved "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== dependencies: emoji-regex "^8.0.0" is-fullwidth-code-point "^3.0.0" strip-ansi "^6.0.1" string-width@^2.0.0, string-width@^2.1.1: version "2.1.1" resolved "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz" integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== dependencies: is-fullwidth-code-point "^2.0.0" strip-ansi "^4.0.0" string-width@^5.0.1: version "5.1.2" resolved "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz" integrity sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA== dependencies: eastasianwidth "^0.2.0" emoji-regex "^9.2.2" strip-ansi "^7.0.1" string_decoder@0.10, string_decoder@~0.10.x: version "0.10.31" resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" integrity sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ== string_decoder@^1.1.1, string_decoder@~1.1.1: version "1.1.1" resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz" integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== dependencies: safe-buffer "~5.1.0" stringify-object@^3.3.0: version "3.3.0" resolved "https://registry.npmjs.org/stringify-object/-/stringify-object-3.3.0.tgz" integrity sha512-rHqiFh1elqCQ9WPLIC8I0Q/g/wj5J1eMkyoiD6eoQApWHP0FtlK7rqnhmabL5VUY9JQCcqwwvlOaSuutekgyrw== dependencies: get-own-enumerable-property-symbols "^3.0.0" is-obj "^1.0.1" is-regexp "^1.0.0" stringstream@~0.0.4: version "0.0.6" resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.6.tgz#7880225b0d4ad10e30927d167a1d6f2fd3b33a72" integrity sha512-87GEBAkegbBcweToUrdzf3eLhWNg06FJTebl4BVJz/JgWy8CvEr9dRtX5qWphiynMSQlxxi+QqN0z5T32SLlhA== strip-ansi@^3.0.0, strip-ansi@^3.0.1: version "3.0.1" resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz" integrity sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg== dependencies: ansi-regex "^2.0.0" strip-ansi@^4.0.0, strip-ansi@~4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz" integrity sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow== dependencies: ansi-regex "^3.0.0" strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== dependencies: ansi-regex "^5.0.1" strip-ansi@^7.0.1: version "7.0.1" resolved "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz" integrity sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw== dependencies: ansi-regex "^6.0.1" strip-bom-string@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/strip-bom-string/-/strip-bom-string-1.0.0.tgz" integrity sha1-5SEekiQ2n7uB1jOi8ABE3IztrZI= strip-eof@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz" integrity sha512-7FCwGGmx8mD5xQd3RPUvnSpUXHM3BWuzjtpD4TXsfcZ9EL4azvVVUscFYwD9nx8Kh+uCBC00XBtAykoMHwTh8Q== strip-final-newline@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz" integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== strip-indent@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/strip-indent/-/strip-indent-4.0.0.tgz#b41379433dd06f5eae805e21d631e07ee670d853" integrity sha512-mnVSV2l+Zv6BLpSD/8V87CW/y9EmmbYzGCIavsnsI6/nwn26DwffM/yztm30Z/I2DY9wdS3vXVCMnHDgZaVNoA== dependencies: min-indent "^1.0.1" strip-json-comments@^3.1.1: version "3.1.1" resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== strip-json-comments@~2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz" integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo= style-to-object@0.3.0, style-to-object@^0.3.0: version "0.3.0" resolved "https://registry.npmjs.org/style-to-object/-/style-to-object-0.3.0.tgz" integrity sha512-CzFnRRXhzWIdItT3OmF8SQfWyahHhjq3HwcMNCNLn+N7klOOqPjMeG/4JSu77D7ypZdGvSzvkrbyeTMizz2VrA== dependencies: inline-style-parser "0.1.1" stylehacks@^5.1.0: version "5.1.0" resolved "https://registry.npmjs.org/stylehacks/-/stylehacks-5.1.0.tgz" integrity sha512-SzLmvHQTrIWfSgljkQCw2++C9+Ne91d/6Sp92I8c5uHTcy/PgeHamwITIbBW9wnFTY/3ZfSXR9HIL6Ikqmcu6Q== dependencies: browserslist "^4.16.6" postcss-selector-parser "^6.0.4" stylis@^4.1.2: version "4.1.3" resolved "https://registry.yarnpkg.com/stylis/-/stylis-4.1.3.tgz#fd2fbe79f5fed17c55269e16ed8da14c84d069f7" integrity sha512-GP6WDNWf+o403jrEp9c5jibKavrtLW+/qYGhFxFrG8maXhwTBI7gLLhiBb0o7uFccWN+EOS9aMO6cGHWAO07OA== supports-color@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz" integrity sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g== supports-color@^5.3.0: version "5.5.0" resolved "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz" integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== dependencies: has-flag "^3.0.0" supports-color@^7.1.0: version "7.2.0" resolved "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz" integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== dependencies: has-flag "^4.0.0" supports-color@^8.0.0: version "8.1.1" resolved "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz" integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== dependencies: has-flag "^4.0.0" supports-preserve-symlinks-flag@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz" integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== svg-parser@^2.0.4: version "2.0.4" resolved "https://registry.npmjs.org/svg-parser/-/svg-parser-2.0.4.tgz" integrity sha512-e4hG1hRwoOdRb37cIMSgzNsxyzKfayW6VOflrwvR+/bzrkyxY/31WkbgnQpgtrNp1SdpJvpUAGTa/ZoiPNDuRQ== svgo@^2.7.0, svgo@^2.8.0: version "2.8.0" resolved "https://registry.npmjs.org/svgo/-/svgo-2.8.0.tgz" integrity sha512-+N/Q9kV1+F+UeWYoSiULYo4xYSDQlTgb+ayMobAXPwMnLvop7oxKMo9OzIrX5x3eS4L4f2UHhc9axXwY8DpChg== dependencies: "@trysound/sax" "0.2.0" commander "^7.2.0" css-select "^4.1.3" css-tree "^1.1.3" csso "^4.2.0" picocolors "^1.0.0" stable "^0.1.8" svgo@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/svgo/-/svgo-3.0.2.tgz#5e99eeea42c68ee0dc46aa16da093838c262fe0a" integrity sha512-Z706C1U2pb1+JGP48fbazf3KxHrWOsLme6Rv7imFBn5EnuanDW1GPaA/P1/dvObE670JDePC3mnj0k0B7P0jjQ== dependencies: "@trysound/sax" "0.2.0" commander "^7.2.0" css-select "^5.1.0" css-tree "^2.2.1" csso "^5.0.5" picocolors "^1.0.0" sync-request@^6.1.0: version "6.1.0" resolved "https://registry.yarnpkg.com/sync-request/-/sync-request-6.1.0.tgz#e96217565b5e50bbffe179868ba75532fb597e68" integrity sha512-8fjNkrNlNCrVc/av+Jn+xxqfCjYaBoHqCsDz6mt030UMxJGr+GSfCV1dQt2gRtlL63+VPidwDVLr7V2OcTSdRw== dependencies: http-response-object "^3.0.1" sync-rpc "^1.2.1" then-request "^6.0.0" sync-rpc@^1.2.1: version "1.3.6" resolved "https://registry.yarnpkg.com/sync-rpc/-/sync-rpc-1.3.6.tgz#b2e8b2550a12ccbc71df8644810529deb68665a7" integrity sha512-J8jTXuZzRlvU7HemDgHi3pGnh/rkoqR/OZSjhTyyZrEkkYQbk7Z33AXp37mkPfPpfdOuj7Ex3H/TJM1z48uPQw== dependencies: get-port "^3.1.0" tapable@^1.0.0: version "1.1.3" resolved "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz" integrity sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA== tapable@^2.0.0, tapable@^2.1.1, tapable@^2.2.0: version "2.2.1" resolved "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz" integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== tar-fs@^1.15.3: version "1.16.3" resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-1.16.3.tgz#966a628841da2c4010406a82167cbd5e0c72d509" integrity sha512-NvCeXpYx7OsmOh8zIOP/ebG55zZmxLE0etfWRbWok+q2Qo8x/vOR/IJT1taADXPe+jsiu9axDb3X4B+iIgNlKw== dependencies: chownr "^1.0.1" mkdirp "^0.5.1" pump "^1.0.0" tar-stream "^1.1.2" tar-stream@^1.1.2, tar-stream@^1.5.4: version "1.6.2" resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-1.6.2.tgz#8ea55dab37972253d9a9af90fdcd559ae435c555" integrity sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A== dependencies: bl "^1.0.0" buffer-alloc "^1.2.0" end-of-stream "^1.0.0" fs-constants "^1.0.0" readable-stream "^2.3.0" to-buffer "^1.1.1" xtend "^4.0.0" tar@^2.0.0, tar@~2.2.1: version "2.2.2" resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.2.tgz#0ca8848562c7299b8b446ff6a4d60cdbb23edc40" integrity sha512-FCEhQ/4rE1zYv9rYXJw/msRqsnmlje5jHP6huWeBZ704jUTy02c5AZyWujpMR1ax6mVw9NyJMfuK2CMDWVIfgA== dependencies: block-stream "*" fstream "^1.0.12" inherits "2" term-size@^1.2.0: version "1.2.0" resolved "https://registry.npmjs.org/term-size/-/term-size-1.2.0.tgz" integrity sha512-7dPUZQGy/+m3/wjVz3ZW5dobSoD/02NxJpoXUX0WIyjfVS3l0c+b/+9phIDFA7FHzkYtwtMFgeGZ/Y8jVTeqQQ== dependencies: execa "^0.7.0" terser-webpack-plugin@^5.1.3, terser-webpack-plugin@^5.3.3: version "5.3.6" resolved "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.6.tgz" integrity sha512-kfLFk+PoLUQIbLmB1+PZDMRSZS99Mp+/MHqDNmMA6tOItzRt+Npe3E+fsMs5mfcM0wCtrrdU387UnV+vnSffXQ== dependencies: "@jridgewell/trace-mapping" "^0.3.14" jest-worker "^27.4.5" schema-utils "^3.1.1" serialize-javascript "^6.0.0" terser "^5.14.1" terser@^5.10.0, terser@^5.14.1: version "5.14.2" resolved "https://registry.npmjs.org/terser/-/terser-5.14.2.tgz" integrity sha512-oL0rGeM/WFQCUd0y2QrWxYnq7tfSuKBiqTjRPWrRgB46WD/kiwHwF8T23z78H6Q6kGCuuHcPB+KULHRdxvVGQA== dependencies: "@jridgewell/source-map" "^0.3.2" acorn "^8.5.0" commander "^2.20.0" source-map-support "~0.5.20" text-table@^0.2.0, text-table@~0.2.0: version "0.2.0" resolved "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz" integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= then-request@^6.0.0: version "6.0.2" resolved "https://registry.yarnpkg.com/then-request/-/then-request-6.0.2.tgz#ec18dd8b5ca43aaee5cb92f7e4c1630e950d4f0c" integrity sha512-3ZBiG7JvP3wbDzA9iNY5zJQcHL4jn/0BWtXIkagfz7QgOL/LqjCEOBQuJNZfu0XYnv5JhKh+cDxCPM4ILrqruA== dependencies: "@types/concat-stream" "^1.6.0" "@types/form-data" "0.0.33" "@types/node" "^8.0.0" "@types/qs" "^6.2.31" caseless "~0.12.0" concat-stream "^1.6.0" form-data "^2.2.0" http-basic "^8.1.1" http-response-object "^3.0.1" promise "^8.0.0" qs "^6.4.0" through2@^2.0.0: version "2.0.5" resolved "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz" integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== dependencies: readable-stream "~2.3.6" xtend "~4.0.1" "through@>=2.2.7 <3": version "2.3.8" resolved "https://registry.npmjs.org/through/-/through-2.3.8.tgz" integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== thunky@^1.0.2: version "1.1.0" resolved "https://registry.npmjs.org/thunky/-/thunky-1.1.0.tgz" integrity sha512-eHY7nBftgThBqOyHGVN+l8gF0BucP09fMo0oO/Lb0w1OF80dJv+lDVpXG60WMQvkcxAkNybKsrEIE3ZtKGmPrA== timed-out@^4.0.0: version "4.0.1" resolved "https://registry.npmjs.org/timed-out/-/timed-out-4.0.1.tgz" integrity sha512-G7r3AhovYtr5YKOWQkta8RKAPb+J9IsO4uVmzjl8AZwfhs8UcUwTiD6gcJYSgOtzyjvQKrKYn41syHbUWMkafA== timers-browserify@2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.2.tgz#ab4883cf597dcd50af211349a00fbca56ac86b86" integrity sha512-O7UB405+hxP2OWqlBdlUMxZVEdsi8NOWL2c730Cs6zeO1l1AkxygvTm6yC4nTw84iGbFcqxbIkkrdNKzq/3Fvg== dependencies: setimmediate "^1.0.4" tiny-invariant@^1.0.2: version "1.2.0" resolved "https://registry.npmjs.org/tiny-invariant/-/tiny-invariant-1.2.0.tgz" integrity sha512-1Uhn/aqw5C6RI4KejVeTg6mIS7IqxnLJ8Mv2tV5rTc0qWobay7pDUz6Wi392Cnc8ak1H0F2cjoRzb2/AW4+Fvg== tiny-lr@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/tiny-lr/-/tiny-lr-1.1.1.tgz#9fa547412f238fedb068ee295af8b682c98b2aab" integrity sha512-44yhA3tsaRoMOjQQ+5v5mVdqef+kH6Qze9jTpqtVufgYjYt08zyZAwNwwVBj3i1rJMnR52IxOW0LK0vBzgAkuA== dependencies: body "^5.1.0" debug "^3.1.0" faye-websocket "~0.10.0" livereload-js "^2.3.0" object-assign "^4.1.0" qs "^6.4.0" tiny-warning@^1.0.0, tiny-warning@^1.0.3: version "1.0.3" resolved "https://registry.npmjs.org/tiny-warning/-/tiny-warning-1.0.3.tgz" integrity sha512-lBN9zLN/oAf68o3zNXYrdCt1kP8WsiGW8Oo2ka41b2IM5JL/S1CTyX1rW0mb/zSuJun0ZUrDxx4sqvYS2FWzPA== tmp@0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.2.1.tgz#8457fc3037dcf4719c251367a1af6500ee1ccf14" integrity sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ== dependencies: rimraf "^3.0.0" to-buffer@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/to-buffer/-/to-buffer-1.1.1.tgz#493bd48f62d7c43fcded313a03dcadb2e1213a80" integrity sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg== to-fast-properties@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz" integrity sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= to-gatsby-remark-plugin@^0.1.0: version "0.1.0" resolved "https://registry.npmjs.org/to-gatsby-remark-plugin/-/to-gatsby-remark-plugin-0.1.0.tgz" integrity sha512-blmhJ/gIrytWnWLgPSRCkhCPeki6UBK2daa3k9mGahN7GjwHu8KrS7F70MvwlsG7IE794JLgwAdCbi4hU4faFQ== dependencies: to-vfile "^6.1.0" to-readable-stream@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/to-readable-stream/-/to-readable-stream-1.0.0.tgz" integrity sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q== to-regex-range@^5.0.1: version "5.0.1" resolved "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz" integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== dependencies: is-number "^7.0.0" to-vfile@^6.1.0: version "6.1.0" resolved "https://registry.npmjs.org/to-vfile/-/to-vfile-6.1.0.tgz" integrity sha512-BxX8EkCxOAZe+D/ToHdDsJcVI4HqQfmw0tCkp31zf3dNP/XWIAjU4CmeuSwsSoOzOTqHPOL0KUzyZqJplkD0Qw== dependencies: is-buffer "^2.0.0" vfile "^4.0.0" toidentifier@1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz" integrity sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA== totalist@^1.0.0: version "1.1.0" resolved "https://registry.npmjs.org/totalist/-/totalist-1.1.0.tgz" integrity sha512-gduQwd1rOdDMGxFG1gEvhV88Oirdo2p+KjoYFU7k2g+i7n6AFFbDQ5kMPUsW0pNbfQsB/cwXvT1i4Bue0s9g5g== tough-cookie@~2.3.0: version "2.3.4" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.4.tgz#ec60cee38ac675063ffc97a5c18970578ee83655" integrity sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA== dependencies: punycode "^1.4.1" tr46@~0.0.3: version "0.0.3" resolved "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz" integrity sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o= trim-trailing-lines@^1.0.0: version "1.1.4" resolved "https://registry.npmjs.org/trim-trailing-lines/-/trim-trailing-lines-1.1.4.tgz" integrity sha512-rjUWSqnfTNrjbB9NQWfPMH/xRK1deHeGsHoVfpxJ++XeYXE0d6B1En37AHfw3jtfTU7dzMzZL2jjpe8Qb5gLIQ== trim@0.0.1: version "0.0.1" resolved "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz" integrity sha1-WFhUf2spB1fulczMZm+1AITEYN0= trough@^1.0.0: version "1.0.5" resolved "https://registry.npmjs.org/trough/-/trough-1.0.5.tgz" integrity sha512-rvuRbTarPXmMb79SmzEp8aqXNKcK+y0XaB298IXueQ8I2PsrATcPBCSPyK/dDNa2iWOhKlfNnOjdAOTBU/nkFA== ts-essentials@^2.0.3: version "2.0.12" resolved "https://registry.npmjs.org/ts-essentials/-/ts-essentials-2.0.12.tgz" integrity sha512-3IVX4nI6B5cc31/GFFE+i8ey/N2eA0CZDbo6n0yrz0zDX8ZJ8djmU1p+XRz7G3is0F3bB3pu2pAroFdAWQKU3w== tslib@^2.0.3, tslib@^2.1.0, tslib@^2.4.0, tslib@~2.4.0: version "2.4.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.1.tgz#0d0bfbaac2880b91e22df0768e55be9753a5b17e" integrity sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA== tunnel-agent@^0.6.0: version "0.6.0" resolved "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz" integrity sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w== dependencies: safe-buffer "^5.0.1" tweetnacl@^0.14.3, tweetnacl@~0.14.0: version "0.14.5" resolved "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz" integrity sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA== type-fest@^0.20.2: version "0.20.2" resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz" integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== type-fest@^2.5.0: version "2.12.0" resolved "https://registry.npmjs.org/type-fest/-/type-fest-2.12.0.tgz" integrity sha512-Qe5GRT+n/4GoqCNGGVp5Snapg1Omq3V7irBJB3EaKsp7HWDo5Gv2d/67gfNyV+d5EXD+x/RF5l1h4yJ7qNkcGA== type-is@~1.6.18: version "1.6.18" resolved "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz" integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== dependencies: media-typer "0.3.0" mime-types "~2.1.24" typedarray-to-buffer@^3.1.5: version "3.1.5" resolved "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz" integrity sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q== dependencies: is-typedarray "^1.0.0" typedarray@^0.0.6: version "0.0.6" resolved "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz" integrity sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA== typedoc-plugin-markdown@^3.16.0: version "3.16.0" resolved "https://registry.yarnpkg.com/typedoc-plugin-markdown/-/typedoc-plugin-markdown-3.16.0.tgz#98da250271aafade8b6740a8116a97cd3941abcd" integrity sha512-eeiC78fDNGFwemPIHiwRC+mEC7W5jwt3fceUev2gJ2nFnXpVHo8eRrpC9BLWZDee6ehnz/sPmNjizbXwpfaTBw== dependencies: handlebars "^4.7.7" typedoc@^0.24.7: version "0.24.7" resolved "https://registry.yarnpkg.com/typedoc/-/typedoc-0.24.7.tgz#7eeb272a1894b3789acc1a94b3f2ae8e7330ee39" integrity sha512-zzfKDFIZADA+XRIp2rMzLe9xZ6pt12yQOhCr7cD7/PBTjhPmMyMvGrkZ2lPNJitg3Hj1SeiYFNzCsSDrlpxpKw== dependencies: lunr "^2.3.9" marked "^4.3.0" minimatch "^9.0.0" shiki "^0.14.1" typescript@^5.0.4: version "5.0.4" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.0.4.tgz#b217fd20119bd61a94d4011274e0ab369058da3b" integrity sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw== ua-parser-js@^0.7.30: version "0.7.33" resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.33.tgz#1d04acb4ccef9293df6f70f2c3d22f3030d8b532" integrity sha512-s8ax/CeZdK9R/56Sui0WM6y9OFREJarMRHqLB2EwkovemBxNQ+Bqu8GAsUnVcXKgphb++ghr/B2BZx4mahujPw== uglify-js@^3.1.4, uglify-js@^3.16.1: version "3.17.4" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.17.4.tgz#61678cf5fa3f5b7eb789bb345df29afb8257c22c" integrity sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g== uid-number@0.0.6: version "0.0.6" resolved "https://registry.npmjs.org/uid-number/-/uid-number-0.0.6.tgz" integrity sha512-c461FXIljswCuscZn67xq9PpszkPT6RjheWFQTgCyabJrTUozElanb0YEqv2UGgk247YpcJkFBuSGNvBlpXM9w== ultron@~1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.1.1.tgz#9fe1536a10a664a65266a1e3ccf85fd36302bc9c" integrity sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og== umask@~1.1.0: version "1.1.0" resolved "https://registry.npmjs.org/umask/-/umask-1.1.0.tgz" integrity sha512-lE/rxOhmiScJu9L6RTNVgB/zZbF+vGC0/p6D3xnkAePI2o0sMyFG966iR5Ki50OI/0mNi2yaRnxfLsPmEZF/JA== unc-path-regex@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa" integrity sha512-eXL4nmJT7oCpkZsHZUOJo8hcX3GbsiDOa0Qu9F646fi8dT3XuSVopVqAcEiVzSKKH7UoDti23wNX3qGFxcW5Qg== underscore.string@~3.3.5: version "3.3.6" resolved "https://registry.yarnpkg.com/underscore.string/-/underscore.string-3.3.6.tgz#ad8cf23d7423cb3b53b898476117588f4e2f9159" integrity sha512-VoC83HWXmCrF6rgkyxS9GHv8W9Q5nhMKho+OadDJGzL2oDYbYEppBaCMH6pFlwLeqj2QS+hhkw2kpXkSdD1JxQ== dependencies: sprintf-js "^1.1.1" util-deprecate "^1.0.2" unherit@^1.0.4: version "1.1.3" resolved "https://registry.npmjs.org/unherit/-/unherit-1.1.3.tgz" integrity sha512-Ft16BJcnapDKp0+J/rqFC3Rrk6Y/Ng4nzsC028k2jdDII/rdZ7Wd3pPT/6+vIIxRagwRc9K0IUX0Ra4fKvw+WQ== dependencies: inherits "^2.0.0" xtend "^4.0.0" unicode-canonical-property-names-ecmascript@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz" integrity sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ== unicode-match-property-ecmascript@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz" integrity sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q== dependencies: unicode-canonical-property-names-ecmascript "^2.0.0" unicode-property-aliases-ecmascript "^2.0.0" unicode-match-property-value-ecmascript@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.0.0.tgz" integrity sha512-7Yhkc0Ye+t4PNYzOGKedDhXbYIBe1XEQYQxOPyhcXNMJ0WCABqqj6ckydd6pWRZTHV4GuCPKdBAUiMc60tsKVw== unicode-match-property-value-ecmascript@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.1.0.tgz#cb5fffdcd16a05124f5a4b0bf7c3770208acbbe0" integrity sha512-qxkjQt6qjg/mYscYMC0XKRn3Rh0wFPlfxB0xkt9CfyTvpX1Ra0+rAmdX2QyAobptSEvuy4RtpPRui6XkV+8wjA== unicode-property-aliases-ecmascript@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.0.0.tgz" integrity sha512-5Zfuy9q/DFr4tfO7ZPeVXb1aPoeQSdeFMLpYuFebehDAhbuevLs5yxSZmIFN1tP5F9Wl4IpJrYojg85/zgyZHQ== unified@9.2.0: version "9.2.0" resolved "https://registry.npmjs.org/unified/-/unified-9.2.0.tgz" integrity sha512-vx2Z0vY+a3YoTj8+pttM3tiJHCwY5UFbYdiWrwBEbHmK8pvsPj2rtAX2BFfgXen8T39CJWblWRDT4L5WGXtDdg== dependencies: bail "^1.0.0" extend "^3.0.0" is-buffer "^2.0.0" is-plain-obj "^2.0.0" trough "^1.0.0" vfile "^4.0.0" unified@^9.2.2: version "9.2.2" resolved "https://registry.npmjs.org/unified/-/unified-9.2.2.tgz" integrity sha512-Sg7j110mtefBD+qunSLO1lqOEKdrwBFBrR6Qd8f4uwkhWNlbkaqwHse6e7QvD3AP/MNoJdEDLaf8OxYyoWgorQ== dependencies: bail "^1.0.0" extend "^3.0.0" is-buffer "^2.0.0" is-plain-obj "^2.0.0" trough "^1.0.0" vfile "^4.0.0" unique-filename@^1.1.0, unique-filename@~1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-1.1.1.tgz#1d69769369ada0583103a1e6ae87681b56573230" integrity sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ== dependencies: unique-slug "^2.0.0" unique-slug@^2.0.0: version "2.0.2" resolved "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.2.tgz" integrity sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w== dependencies: imurmurhash "^0.1.4" unique-string@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/unique-string/-/unique-string-1.0.0.tgz" integrity sha512-ODgiYu03y5g76A1I9Gt0/chLCzQjvzDy7DsZGsLOE/1MrF6wriEskSncj1+/C58Xk/kPZDppSctDybCwOSaGAg== dependencies: crypto-random-string "^1.0.0" unique-string@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/unique-string/-/unique-string-2.0.0.tgz" integrity sha512-uNaeirEPvpZWSgzwsPGtU2zVSTrn/8L5q/IexZmH0eH6SA73CmAA5U4GwORTxQAZs95TAXLNqeLoPPNO5gZfWg== dependencies: crypto-random-string "^2.0.0" unist-builder@2.0.3, unist-builder@^2.0.0: version "2.0.3" resolved "https://registry.npmjs.org/unist-builder/-/unist-builder-2.0.3.tgz" integrity sha512-f98yt5pnlMWlzP539tPc4grGMsFaQQlP/vM396b00jngsiINumNmsY8rkXjfoi1c6QaM8nQ3vaGDuoKWbe/1Uw== unist-util-generated@^1.0.0: version "1.1.6" resolved "https://registry.npmjs.org/unist-util-generated/-/unist-util-generated-1.1.6.tgz" integrity sha512-cln2Mm1/CZzN5ttGK7vkoGw+RZ8VcUH6BtGbq98DDtRGquAAOXig1mrBQYelOwMXYS8rK+vZDyyojSjp7JX+Lg== unist-util-is@^4.0.0: version "4.1.0" resolved "https://registry.npmjs.org/unist-util-is/-/unist-util-is-4.1.0.tgz" integrity sha512-ZOQSsnce92GrxSqlnEEseX0gi7GH9zTJZ0p9dtu87WRb/37mMPO2Ilx1s/t9vBHrFhbgweUwb+t7cIn5dxPhZg== unist-util-is@^5.0.0: version "5.1.1" resolved "https://registry.yarnpkg.com/unist-util-is/-/unist-util-is-5.1.1.tgz#e8aece0b102fa9bc097b0fef8f870c496d4a6236" integrity sha512-F5CZ68eYzuSvJjGhCLPL3cYx45IxkqXSetCcRgUXtbcm50X2L9oOWQlfUfDdAf+6Pd27YDblBfdtmsThXmwpbQ== unist-util-position@^3.0.0: version "3.1.0" resolved "https://registry.npmjs.org/unist-util-position/-/unist-util-position-3.1.0.tgz" integrity sha512-w+PkwCbYSFw8vpgWD0v7zRCl1FpY3fjDSQ3/N/wNd9Ffa4gPi8+4keqt99N3XW6F99t/mUzp2xAhNmfKWp95QA== unist-util-remove-position@^2.0.0: version "2.0.1" resolved "https://registry.npmjs.org/unist-util-remove-position/-/unist-util-remove-position-2.0.1.tgz" integrity sha512-fDZsLYIe2uT+oGFnuZmy73K6ZxOPG/Qcm+w7jbEjaFcJgbQ6cqjs/eSPzXhsmGpAsWPkqZM9pYjww5QTn3LHMA== dependencies: unist-util-visit "^2.0.0" unist-util-remove@^2.0.0: version "2.1.0" resolved "https://registry.npmjs.org/unist-util-remove/-/unist-util-remove-2.1.0.tgz" integrity sha512-J8NYPyBm4baYLdCbjmf1bhPu45Cr1MWTm77qd9istEkzWpnN6O9tMsEbB2JhNnBCqGENRqEWomQ+He6au0B27Q== dependencies: unist-util-is "^4.0.0" unist-util-stringify-position@^2.0.0: version "2.0.3" resolved "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-2.0.3.tgz" integrity sha512-3faScn5I+hy9VleOq/qNbAd6pAx7iH5jYBMS9I1HgQVijz/4mv5Bvw5iw1sC/90CODiKo81G/ps8AJrISn687g== dependencies: "@types/unist" "^2.0.2" unist-util-visit-parents@^3.0.0: version "3.1.1" resolved "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.1.1.tgz" integrity sha512-1KROIZWo6bcMrZEwiH2UrXDyalAa0uqzWCxCJj6lPOvTve2WkfgCytoDTPaMnodXh1WrXOq0haVYHj99ynJlsg== dependencies: "@types/unist" "^2.0.0" unist-util-is "^4.0.0" unist-util-visit-parents@^5.1.1: version "5.1.1" resolved "https://registry.yarnpkg.com/unist-util-visit-parents/-/unist-util-visit-parents-5.1.1.tgz#868f353e6fce6bf8fa875b251b0f4fec3be709bb" integrity sha512-gks4baapT/kNRaWxuGkl5BIhoanZo7sC/cUT/JToSRNL1dYoXRFl75d++NkjYk4TAu2uv2Px+l8guMajogeuiw== dependencies: "@types/unist" "^2.0.0" unist-util-is "^5.0.0" unist-util-visit@2.0.3, unist-util-visit@^2.0.0, unist-util-visit@^2.0.3: version "2.0.3" resolved "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.3.tgz" integrity sha512-iJ4/RczbJMkD0712mGktuGpm/U4By4FfDonL7N/9tATGIF4imikjOuagyMY53tnZq3NP6BcmlrHhEKAfGWjh7Q== dependencies: "@types/unist" "^2.0.0" unist-util-is "^4.0.0" unist-util-visit-parents "^3.0.0" unist-util-visit@^4.1.0: version "4.1.1" resolved "https://registry.yarnpkg.com/unist-util-visit/-/unist-util-visit-4.1.1.tgz#1c4842d70bd3df6cc545276f5164f933390a9aad" integrity sha512-n9KN3WV9k4h1DxYR1LoajgN93wpEi/7ZplVe02IoB4gH5ctI1AaF2670BLHQYbwj+pY83gFtyeySFiyMHJklrg== dependencies: "@types/unist" "^2.0.0" unist-util-is "^5.0.0" unist-util-visit-parents "^5.1.1" universalify@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/universalify/-/universalify-2.0.0.tgz" integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== unixify@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unixify/-/unixify-1.0.0.tgz#3a641c8c2ffbce4da683a5c70f03a462940c2090" integrity sha512-6bc58dPYhCMHHuwxldQxO3RRNZ4eCogZ/st++0+fcC1nr0jiGUtAdBJ2qzmLQWSxbtz42pWt4QQMiZ9HvZf5cg== dependencies: normalize-path "^2.1.1" unpipe@1.0.0, unpipe@~1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz" integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= unzip-response@^2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/unzip-response/-/unzip-response-2.0.1.tgz" integrity sha512-N0XH6lqDtFH84JxptQoZYmloF4nzrQqqrAymNj+/gW60AO2AZgOcf4O/nUXJcYfyQkqvMo9lSupBZmmgvuVXlw== update-browserslist-db@^1.0.11: version "1.0.11" resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz#9a2a641ad2907ae7b3616506f4b977851db5b940" integrity sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA== dependencies: escalade "^3.1.1" picocolors "^1.0.0" update-browserslist-db@^1.0.9: version "1.0.10" resolved "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz" integrity sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ== dependencies: escalade "^3.1.1" picocolors "^1.0.0" update-notifier@^2.3.0: version "2.5.0" resolved "https://registry.npmjs.org/update-notifier/-/update-notifier-2.5.0.tgz" integrity sha512-gwMdhgJHGuj/+wHJJs9e6PcCszpxR1b236igrOkUofGhqJuG+amlIKwApH1IW1WWl7ovZxsX49lMBWLxSdm5Dw== dependencies: boxen "^1.2.1" chalk "^2.0.1" configstore "^3.0.0" import-lazy "^2.1.0" is-ci "^1.0.10" is-installed-globally "^0.1.0" is-npm "^1.0.0" latest-version "^3.0.0" semver-diff "^2.0.0" xdg-basedir "^3.0.0" update-notifier@^5.1.0: version "5.1.0" resolved "https://registry.npmjs.org/update-notifier/-/update-notifier-5.1.0.tgz" integrity sha512-ItnICHbeMh9GqUy31hFPrD1kcuZ3rpxDZbf4KUDavXwS0bW5m7SLbDQpGX3UYr072cbrF5hFUs3r5tUsPwjfHw== dependencies: boxen "^5.0.0" chalk "^4.1.0" configstore "^5.0.1" has-yarn "^2.1.0" import-lazy "^2.1.0" is-ci "^2.0.0" is-installed-globally "^0.4.0" is-npm "^5.0.0" is-yarn-global "^0.3.0" latest-version "^5.1.0" pupa "^2.1.1" semver "^7.3.4" semver-diff "^3.1.1" xdg-basedir "^4.0.0" update-notifier@~2.2.0: version "2.2.0" resolved "https://registry.npmjs.org/update-notifier/-/update-notifier-2.2.0.tgz" integrity sha512-BrfvANq8gJjhtaeDiK1QFunFoo5ad9BJ+bTgeSaonpHUzjTtCdzqzuxCSKYfRvS/R20BAYT8HlCMZO2r4xDaQg== dependencies: boxen "^1.0.0" chalk "^1.0.0" configstore "^3.0.0" import-lazy "^2.1.0" is-npm "^1.0.0" latest-version "^3.0.0" semver-diff "^2.0.0" xdg-basedir "^3.0.0" uri-js@^4.2.2: version "4.4.1" resolved "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz" integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== dependencies: punycode "^2.1.0" uri-path@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/uri-path/-/uri-path-1.0.0.tgz#9747f018358933c31de0fccfd82d138e67262e32" integrity sha512-8pMuAn4KacYdGMkFaoQARicp4HSw24/DHOVKWqVRJ8LhhAwPPFpdGvdL9184JVmUwe7vz7Z9n6IqI6t5n2ELdg== url-loader@^4.1.1: version "4.1.1" resolved "https://registry.npmjs.org/url-loader/-/url-loader-4.1.1.tgz" integrity sha512-3BTV812+AVHHOJQO8O5MkWgZ5aosP7GnROJwvzLS9hWDj00lZ6Z0wNak423Lp9PBZN05N+Jk/N5Si8jRAlGyWA== dependencies: loader-utils "^2.0.0" mime-types "^2.1.27" schema-utils "^3.0.0" url-parse-lax@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-1.0.0.tgz" integrity sha512-BVA4lR5PIviy2PMseNd2jbFQ+jwSwQGdJejf5ctd1rEXt0Ypd7yanUK9+lYechVlN5VaTJGsu2U/3MDDu6KgBA== dependencies: prepend-http "^1.0.1" url-parse-lax@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/url-parse-lax/-/url-parse-lax-3.0.0.tgz" integrity sha1-FrXK/Afb42dsGxmZF3gj1lA6yww= dependencies: prepend-http "^2.0.0" url@^0.11.0: version "0.11.0" resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" integrity sha512-kbailJa29QrtXnxgq+DdCEGlbTeYM2eJUxsz6vjZavrCYPMIFHMKQmSKYAIuUK2i7hgPm28a8piX5NTUtM/LKQ== dependencies: punycode "1.3.2" querystring "0.2.0" use-composed-ref@^1.0.0: version "1.1.0" resolved "https://registry.npmjs.org/use-composed-ref/-/use-composed-ref-1.1.0.tgz" integrity sha512-my1lNHGWsSDAhhVAT4MKs6IjBUtG6ZG11uUqexPH9PptiIZDQOzaF4f5tEbJ2+7qvNbtXNBbU3SfmN+fXlWDhg== dependencies: ts-essentials "^2.0.3" use-isomorphic-layout-effect@^1.0.0: version "1.1.1" resolved "https://registry.npmjs.org/use-isomorphic-layout-effect/-/use-isomorphic-layout-effect-1.1.1.tgz" integrity sha512-L7Evj8FGcwo/wpbv/qvSfrkHFtOpCzvM5yl2KVyDJoylVuSvzphiiasmjgQPttIGBAy2WKiBNR98q8w7PiNgKQ== use-latest@^1.0.0: version "1.2.0" resolved "https://registry.npmjs.org/use-latest/-/use-latest-1.2.0.tgz" integrity sha512-d2TEuG6nSLKQLAfW3By8mKr8HurOlTkul0sOpxbClIv4SQ4iOd7BYr7VIzdbktUCnv7dua/60xzd8igMU6jmyw== dependencies: use-isomorphic-layout-effect "^1.0.0" use-sync-external-store@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz#7dbefd6ef3fe4e767a0cf5d7287aacfb5846928a" integrity sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA== util-deprecate@^1.0.1, util-deprecate@^1.0.2, util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz" integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= util-extend@^1.0.1: version "1.0.3" resolved "https://registry.npmjs.org/util-extend/-/util-extend-1.0.3.tgz" integrity sha512-mLs5zAK+ctllYBj+iAQvlDCwoxU/WDOUaJkcFudeiAX6OajC6BKXJUa9a+tbtkC11dz2Ufb7h0lyvIOVn4LADA== util@0.10.3: version "0.10.3" resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9" integrity sha512-5KiHfsmkqacuKjkRkdV7SsfDJ2EGiPsK92s2MhNSY0craxjTdKTtqKsJaCWp4LW33ZZ0OPUv1WO/TFvNQRiQxQ== dependencies: inherits "2.0.1" util@^0.10.3: version "0.10.4" resolved "https://registry.yarnpkg.com/util/-/util-0.10.4.tgz#3aa0125bfe668a4672de58857d3ace27ecb76901" integrity sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A== dependencies: inherits "2.0.3" utila@~0.4: version "0.4.0" resolved "https://registry.npmjs.org/utila/-/utila-0.4.0.tgz" integrity sha512-Z0DbgELS9/L/75wZbro8xAnT50pBVFQZ+hUEueGDU5FN51YSCYM+jdxsfCiHjwNP/4LCDD0i/graKpeBnOXKRA== utility-types@^3.10.0: version "3.10.0" resolved "https://registry.npmjs.org/utility-types/-/utility-types-3.10.0.tgz" integrity sha512-O11mqxmi7wMKCo6HKFt5AhO4BwY3VV68YU07tgxfz8zJTIxr4BpsezN49Ffwy9j3ZpwwJp4fkRwjRzq3uWE6Rg== utils-merge@1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz" integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= uuid@^3.0.0, uuid@~3.1.0: version "3.1.0" resolved "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz" integrity sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g== uuid@^8.3.2: version "8.3.2" resolved "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== uuid@^9.0.0: version "9.0.0" resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.0.tgz#592f550650024a38ceb0c562f2f6aa435761efb5" integrity sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg== v8flags@~3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-3.2.0.tgz#b243e3b4dfd731fa774e7492128109a0fe66d656" integrity sha512-mH8etigqMfiGWdeXpaaqGfs6BndypxusHHcv2qSHyZkGEznCd/qAXCWWRzeowtL54147cktFOC4P5y+kl8d8Jg== dependencies: homedir-polyfill "^1.0.1" validate-npm-package-license@^3.0.1: version "3.0.4" resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== dependencies: spdx-correct "^3.0.0" spdx-expression-parse "^3.0.0" validate-npm-package-name@^3.0.0, validate-npm-package-name@~3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/validate-npm-package-name/-/validate-npm-package-name-3.0.0.tgz" integrity sha512-M6w37eVCMMouJ9V/sdPGnC5H4uDr73/+xdq0FBLO3TFFX1+7wiUY6Es328NN+y43tmY+doUdN9g9J21vqB7iLw== dependencies: builtins "^1.0.3" value-equal@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/value-equal/-/value-equal-1.0.1.tgz" integrity sha512-NOJ6JZCAWr0zlxZt+xqCHNTEKOsrks2HQd4MqhP1qy4z1SkbEP467eNx6TgDKXMvUOb+OENfJCZwM+16n7fRfw== value-or-promise@1.0.11: version "1.0.11" resolved "https://registry.yarnpkg.com/value-or-promise/-/value-or-promise-1.0.11.tgz#3e90299af31dd014fe843fe309cefa7c1d94b140" integrity sha512-41BrgH+dIbCFXClcSapVs5M6GkENd3gQOJpEfPDNa71LsUGMXDL0jMWpI/Rh7WhX+Aalfz2TTS3Zt5pUsbnhLg== vary@~1.1.2: version "1.1.2" resolved "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz" integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= verror@1.10.0: version "1.10.0" resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" integrity sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw== dependencies: assert-plus "^1.0.0" core-util-is "1.0.2" extsprintf "^1.2.0" vfile-location@^3.0.0, vfile-location@^3.2.0: version "3.2.0" resolved "https://registry.npmjs.org/vfile-location/-/vfile-location-3.2.0.tgz" integrity sha512-aLEIZKv/oxuCDZ8lkJGhuhztf/BW4M+iHdCwglA/eWc+vtuRFJj8EtgceYFX4LRjOhCAAiNHsKGssC6onJ+jbA== vfile-message@^2.0.0: version "2.0.4" resolved "https://registry.npmjs.org/vfile-message/-/vfile-message-2.0.4.tgz" integrity sha512-DjssxRGkMvifUOJre00juHoP9DPWuzjxKuMDrhNbk2TdaYYBNMStsNhEOt3idrtI12VQYM/1+iM0KOzXi4pxwQ== dependencies: "@types/unist" "^2.0.0" unist-util-stringify-position "^2.0.0" vfile@^4.0.0: version "4.2.1" resolved "https://registry.npmjs.org/vfile/-/vfile-4.2.1.tgz" integrity sha512-O6AE4OskCG5S1emQ/4gl8zK586RqA3srz3nfK/Viy0UPToBc5Trp9BVFb1u0CjsKrAWwnpr4ifM/KBXPWwJbCA== dependencies: "@types/unist" "^2.0.0" is-buffer "^2.0.0" unist-util-stringify-position "^2.0.0" vfile-message "^2.0.0" vscode-oniguruma@^1.7.0: version "1.7.0" resolved "https://registry.yarnpkg.com/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz#439bfad8fe71abd7798338d1cd3dc53a8beea94b" integrity sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA== vscode-textmate@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/vscode-textmate/-/vscode-textmate-8.0.0.tgz#2c7a3b1163ef0441097e0b5d6389cd5504b59e5d" integrity sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg== wait-on@^6.0.1: version "6.0.1" resolved "https://registry.npmjs.org/wait-on/-/wait-on-6.0.1.tgz" integrity sha512-zht+KASY3usTY5u2LgaNqn/Cd8MukxLGjdcZxT2ns5QzDmTFc4XoWBgC+C/na+sMRZTuVygQoMYwdcVjHnYIVw== dependencies: axios "^0.25.0" joi "^17.6.0" lodash "^4.17.21" minimist "^1.2.5" rxjs "^7.5.4" watchpack@^2.4.0: version "2.4.0" resolved "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz" integrity sha512-Lcvm7MGST/4fup+ifyKi2hjyIAwcdI4HRgtvTpIUxBRhB+RFtUh8XtDOxUfctVCnhVi+QQj49i91OyvzkJl6cg== dependencies: glob-to-regexp "^0.4.1" graceful-fs "^4.1.2" wbuf@^1.1.0, wbuf@^1.7.3: version "1.7.3" resolved "https://registry.npmjs.org/wbuf/-/wbuf-1.7.3.tgz" integrity sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA== dependencies: minimalistic-assert "^1.0.0" wcwidth@^1.0.0: version "1.0.1" resolved "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz" integrity sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg== dependencies: defaults "^1.0.3" web-namespaces@^1.0.0: version "1.1.4" resolved "https://registry.npmjs.org/web-namespaces/-/web-namespaces-1.1.4.tgz" integrity sha512-wYxSGajtmoP4WxfejAPIr4l0fVh+jeMXZb08wNc0tMg6xsfZXj3cECqIK0G7ZAqUq0PP8WlMDtaOGVBTAWztNw== webidl-conversions@^3.0.0: version "3.0.1" resolved "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz" integrity sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE= webpack-bundle-analyzer@^4.5.0: version "4.5.0" resolved "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.5.0.tgz" integrity sha512-GUMZlM3SKwS8Z+CKeIFx7CVoHn3dXFcUAjT/dcZQQmfSZGvitPfMob2ipjai7ovFFqPvTqkEZ/leL4O0YOdAYQ== dependencies: acorn "^8.0.4" acorn-walk "^8.0.0" chalk "^4.1.0" commander "^7.2.0" gzip-size "^6.0.0" lodash "^4.17.20" opener "^1.5.2" sirv "^1.0.7" ws "^7.3.1" webpack-dev-middleware@^5.3.1: version "5.3.1" resolved "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-5.3.1.tgz" integrity sha512-81EujCKkyles2wphtdrnPg/QqegC/AtqNH//mQkBYSMqwFVCQrxM6ktB2O/SPlZy7LqeEfTbV3cZARGQz6umhg== dependencies: colorette "^2.0.10" memfs "^3.4.1" mime-types "^2.1.31" range-parser "^1.2.1" schema-utils "^4.0.0" webpack-dev-server@^4.9.3: version "4.9.3" resolved "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-4.9.3.tgz" integrity sha512-3qp/eoboZG5/6QgiZ3llN8TUzkSpYg1Ko9khWX1h40MIEUNS2mDoIa8aXsPfskER+GbTvs/IJZ1QTBBhhuetSw== dependencies: "@types/bonjour" "^3.5.9" "@types/connect-history-api-fallback" "^1.3.5" "@types/express" "^4.17.13" "@types/serve-index" "^1.9.1" "@types/serve-static" "^1.13.10" "@types/sockjs" "^0.3.33" "@types/ws" "^8.5.1" ansi-html-community "^0.0.8" bonjour-service "^1.0.11" chokidar "^3.5.3" colorette "^2.0.10" compression "^1.7.4" connect-history-api-fallback "^2.0.0" default-gateway "^6.0.3" express "^4.17.3" graceful-fs "^4.2.6" html-entities "^2.3.2" http-proxy-middleware "^2.0.3" ipaddr.js "^2.0.1" open "^8.0.9" p-retry "^4.5.0" rimraf "^3.0.2" schema-utils "^4.0.0" selfsigned "^2.0.1" serve-index "^1.9.1" sockjs "^0.3.24" spdy "^4.0.2" webpack-dev-middleware "^5.3.1" ws "^8.4.2" webpack-merge@^5.8.0: version "5.8.0" resolved "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.8.0.tgz" integrity sha512-/SaI7xY0831XwP6kzuwhKWVKDP9t1QY1h65lAFLbZqMPIuYcD9QAW4u9STIbU9kaJbPBB/geU/gLr1wDjOhQ+Q== dependencies: clone-deep "^4.0.1" wildcard "^2.0.0" webpack-sources@^3.2.2, webpack-sources@^3.2.3: version "3.2.3" resolved "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz" integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== webpack@^5.73.0: version "5.76.1" resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.76.1.tgz#7773de017e988bccb0f13c7d75ec245f377d295c" integrity sha512-4+YIK4Abzv8172/SGqObnUjaIHjLEuUasz9EwQj/9xmPPkYJy2Mh03Q/lJfSD3YLzbxy5FeTq5Uw0323Oh6SJQ== dependencies: "@types/eslint-scope" "^3.7.3" "@types/estree" "^0.0.51" "@webassemblyjs/ast" "1.11.1" "@webassemblyjs/wasm-edit" "1.11.1" "@webassemblyjs/wasm-parser" "1.11.1" acorn "^8.7.1" acorn-import-assertions "^1.7.6" browserslist "^4.14.5" chrome-trace-event "^1.0.2" enhanced-resolve "^5.10.0" es-module-lexer "^0.9.0" eslint-scope "5.1.1" events "^3.2.0" glob-to-regexp "^0.4.1" graceful-fs "^4.2.9" json-parse-even-better-errors "^2.3.1" loader-runner "^4.2.0" mime-types "^2.1.27" neo-async "^2.6.2" schema-utils "^3.1.0" tapable "^2.1.1" terser-webpack-plugin "^5.1.3" watchpack "^2.4.0" webpack-sources "^3.2.3" webpackbar@^5.0.2: version "5.0.2" resolved "https://registry.npmjs.org/webpackbar/-/webpackbar-5.0.2.tgz" integrity sha512-BmFJo7veBDgQzfWXl/wwYXr/VFus0614qZ8i9znqcl9fnEdiVkdbi0TedLQ6xAK92HZHDJ0QmyQ0fmuZPAgCYQ== dependencies: chalk "^4.1.0" consola "^2.15.3" pretty-time "^1.1.0" std-env "^3.0.1" websocket-driver@>=0.5.1, websocket-driver@^0.7.4: version "0.7.4" resolved "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.4.tgz" integrity sha512-b17KeDIQVjvb0ssuSDF2cYXSg2iztliJ4B9WdsuB6J952qCPKmnVq4DyW5motImXHDC1cBT/1UezrJVsKw5zjg== dependencies: http-parser-js ">=0.5.1" safe-buffer ">=5.1.0" websocket-extensions ">=0.1.1" websocket-extensions@>=0.1.1: version "0.1.4" resolved "https://registry.npmjs.org/websocket-extensions/-/websocket-extensions-0.1.4.tgz" integrity sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg== websocket-stream@^5.0.1: version "5.5.2" resolved "https://registry.yarnpkg.com/websocket-stream/-/websocket-stream-5.5.2.tgz#49d87083d96839f0648f5513bbddd581f496b8a2" integrity sha512-8z49MKIHbGk3C4HtuHWDtYX8mYej1wWabjthC/RupM9ngeukU4IWoM46dgth1UOS/T4/IqgEdCDJuMe2039OQQ== dependencies: duplexify "^3.5.1" inherits "^2.0.1" readable-stream "^2.3.3" safe-buffer "^5.1.2" ws "^3.2.0" xtend "^4.0.0" whatwg-url@^5.0.0: version "5.0.0" resolved "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz" integrity sha1-lmRU6HZUYuN2RNNib2dCzotwll0= dependencies: tr46 "~0.0.3" webidl-conversions "^3.0.0" which-module@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz" integrity sha512-B+enWhmw6cjfVC7kS8Pj9pCrKSc5txArRyaYGe088shv/FGWH+0Rjx/xPgtsWfsUtS27FkP697E4DDhgrgoc0Q== which@1, which@^1.2.12, which@~1.2.14: version "1.2.14" resolved "https://registry.npmjs.org/which/-/which-1.2.14.tgz" integrity sha512-16uPglFkRPzgiUXYMi1Jf8Z5EzN1iB4V0ZtMXcHZnwsBtQhhHeCqoWw7tsUY42hJGNDWtUsVLTjakIa5BgAxCw== dependencies: isexe "^2.0.0" which@^1.2.14, which@^1.2.9, which@^1.3.0, which@^1.3.1: version "1.3.1" resolved "https://registry.npmjs.org/which/-/which-1.3.1.tgz" integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== dependencies: isexe "^2.0.0" which@^2.0.1, which@~2.0.2: version "2.0.2" resolved "https://registry.npmjs.org/which/-/which-2.0.2.tgz" integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== dependencies: isexe "^2.0.0" wide-align@^1.1.0: version "1.1.5" resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.5.tgz#df1d4c206854369ecf3c9a4898f1b23fbd9d15d3" integrity sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg== dependencies: string-width "^1.0.2 || 2 || 3 || 4" widest-line@^2.0.0: version "2.0.1" resolved "https://registry.npmjs.org/widest-line/-/widest-line-2.0.1.tgz" integrity sha512-Ba5m9/Fa4Xt9eb2ELXt77JxVDV8w7qQrH0zS/TWSJdLyAwQjWoOzpzj5lwVftDz6n/EOu3tNACS84v509qwnJA== dependencies: string-width "^2.1.1" widest-line@^3.1.0: version "3.1.0" resolved "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz" integrity sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg== dependencies: string-width "^4.0.0" widest-line@^4.0.1: version "4.0.1" resolved "https://registry.npmjs.org/widest-line/-/widest-line-4.0.1.tgz" integrity sha512-o0cyEG0e8GPzT4iGHphIOh0cJOV8fivsXxddQasHPHfoZf1ZexrfeA21w2NaEN1RHE+fXlfISmOE8R9N3u3Qig== dependencies: string-width "^5.0.1" wildcard@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/wildcard/-/wildcard-2.0.0.tgz" integrity sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw== wordwrap@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q== worker-farm@~1.3.1: version "1.3.1" resolved "https://registry.npmjs.org/worker-farm/-/worker-farm-1.3.1.tgz" integrity sha512-ikAfMCRFdPRJjXG4TzMI2bs/I7kZPJrejDFbSUG6n0JptwUHEPfq/7Uap/aylHjPhxyfTueeWRmakCsLA5xJsg== dependencies: errno ">=0.1.1 <0.2.0-0" xtend ">=4.0.0 <4.1.0-0" wrap-ansi@^2.0.0: version "2.1.0" resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz" integrity sha512-vAaEaDM946gbNpH5pLVNR+vX2ht6n0Bt3GXwVB1AuAqZosOvHNF3P7wDnh8KLkSqgUh0uh77le7Owgoz+Z9XBw== dependencies: string-width "^1.0.1" strip-ansi "^3.0.1" wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== dependencies: ansi-styles "^4.0.0" string-width "^4.1.0" strip-ansi "^6.0.0" wrap-ansi@^8.0.1: version "8.0.1" resolved "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.0.1.tgz" integrity sha512-QFF+ufAqhoYHvoHdajT/Po7KoXVBPXS2bgjIam5isfWJPfIOnQZ50JtUiVvCv/sjgacf3yRrt2ZKUZ/V4itN4g== dependencies: ansi-styles "^6.1.0" string-width "^5.0.1" strip-ansi "^7.0.1" wrappy@1, wrappy@~1.0.2: version "1.0.2" resolved "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= write-file-atomic@^2.0.0: version "2.4.3" resolved "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz" integrity sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ== dependencies: graceful-fs "^4.1.11" imurmurhash "^0.1.4" signal-exit "^3.0.2" write-file-atomic@^3.0.0: version "3.0.3" resolved "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz" integrity sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q== dependencies: imurmurhash "^0.1.4" is-typedarray "^1.0.0" signal-exit "^3.0.2" typedarray-to-buffer "^3.1.5" write-file-atomic@~2.1.0: version "2.1.0" resolved "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.1.0.tgz" integrity sha512-0TZ20a+xcIl4u0+Mj5xDH2yOWdmQiXlKf9Hm+TgDXjTMsEYb+gDrmb8e8UNAzMCitX8NBqG4Z/FUQIyzv/R1JQ== dependencies: graceful-fs "^4.1.11" imurmurhash "^0.1.4" slide "^1.1.5" ws@^3.2.0: version "3.3.3" resolved "https://registry.yarnpkg.com/ws/-/ws-3.3.3.tgz#f1cf84fe2d5e901ebce94efaece785f187a228f2" integrity sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA== dependencies: async-limiter "~1.0.0" safe-buffer "~5.1.0" ultron "~1.1.0" ws@^7.3.1: version "7.5.6" resolved "https://registry.npmjs.org/ws/-/ws-7.5.6.tgz" integrity sha512-6GLgCqo2cy2A2rjCNFlxQS6ZljG/coZfZXclldI8FB/1G3CCI36Zd8xy2HrFVACi8tfk5XrgLQEk+P0Tnz9UcA== ws@^8.4.2: version "8.5.0" resolved "https://registry.npmjs.org/ws/-/ws-8.5.0.tgz" integrity sha512-BWX0SWVgLPzYwF8lTzEy1egjhS4S4OEAHfsO8o65WOVsrnSRGaSiUaa9e0ggGlkMTtBlmOpEXiie9RUcBO86qg== xdg-basedir@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-3.0.0.tgz" integrity sha512-1Dly4xqlulvPD3fZUQJLY+FUIeqN3N2MM3uqe4rCJftAvOjFa3jFGfctOgluGx4ahPbUCsZkmJILiP0Vi4T6lQ== xdg-basedir@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-4.0.0.tgz" integrity sha512-PSNhEJDejZYV7h50BohL09Er9VaIefr2LMAf3OEmpCkjOi34eYyQYAXUTjEQtZJTKcF0E2UKTh+osDLsgNim9Q== xml-js@^1.6.11: version "1.6.11" resolved "https://registry.npmjs.org/xml-js/-/xml-js-1.6.11.tgz" integrity sha512-7rVi2KMfwfWFl+GpPg6m80IVMWXLRjO+PxTq7V2CDhoGak0wzYzFgUY2m4XJ47OGdXd8eLE8EmwfAmdjw7lC1g== dependencies: sax "^1.2.4" "xtend@>=4.0.0 <4.1.0-0", xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.1: version "4.0.2" resolved "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz" integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== y18n@^3.2.1: version "3.2.2" resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.2.tgz#85c901bd6470ce71fc4bb723ad209b70f7f28696" integrity sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ== y18n@^4.0.0: version "4.0.3" resolved "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz" integrity sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ== yallist@^2.1.2: version "2.1.2" resolved "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz" integrity sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A== yallist@^3.0.2: version "3.1.1" resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== yallist@^4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== yaml@^1.10.0, yaml@^1.10.2, yaml@^1.7.2: version "1.10.2" resolved "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz" integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== yargs-parser@^9.0.2: version "9.0.2" resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-9.0.2.tgz" integrity sha512-CswCfdOgCr4MMsT1GzbEJ7Z2uYudWyrGX8Bgh/0eyCzj/DXWdKq6a/ADufkzI1WAOIW6jYaXJvRyLhDO0kfqBw== dependencies: camelcase "^4.1.0" yargs@^11.0.0: version "11.1.1" resolved "https://registry.npmjs.org/yargs/-/yargs-11.1.1.tgz" integrity sha512-PRU7gJrJaXv3q3yQZ/+/X6KBswZiaQ+zOmdprZcouPYtQgvNU35i+68M4b1ZHLZtYFT5QObFLV+ZkmJYcwKdiw== dependencies: cliui "^4.0.0" decamelize "^1.1.1" find-up "^2.1.0" get-caller-file "^1.0.1" os-locale "^3.1.0" require-directory "^2.1.1" require-main-filename "^1.0.1" set-blocking "^2.0.0" string-width "^2.0.0" which-module "^2.0.0" y18n "^3.2.1" yargs-parser "^9.0.2" yocto-queue@^0.1.0: version "0.1.0" resolved "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz" integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== zwitch@^1.0.0: version "1.0.5" resolved "https://registry.npmjs.org/zwitch/-/zwitch-1.0.5.tgz" integrity sha512-V50KMwwzqJV0NpZIZFwfOD5/lyny3WlSzRiXgA0G7VUnRlqttta1L6UQIHzd6EuBY/cHGfwTIck7w1yH6Q5zUw==
closed
dagger/dagger
https://github.com/dagger/dagger
5,871
Zenith: custom return types require at least one method defined
Custom function return types require at least one empty method defined on them to be detected by codegen (note the JSON tags are currently required, #5860). ```go // This is for a module "foo" package main import ( "context" ) type Foo struct{} type X struct { Message string `json:"message"` } // This function definition is required, or we don't detect and incorporate this into schema generation. // func (x *X) Void() {} func (m *Foo) MyFunction(ctx context.Context, stringArg string) X { return X{Message: stringArg} } ``` ``` $ echo '{foo{myFunction(stringArg: "hello"){message}}' | dagger query -m ". Error: failed to get loaded module ID: input:1: host.directory.asModule.serve failed to install module schema: schema validation failed: input:1813: Undefined type X. ```
https://github.com/dagger/dagger/issues/5871
https://github.com/dagger/dagger/pull/5893
c847458d6df1e184487e3a29f6d00a86ef67e661
b74df2479214020502fcb917d77325f00bd4d4e1
"2023-10-11T10:50:42Z"
go
"2023-10-18T12:22:03Z"
cmd/codegen/generator/go/templates/modules.go
package templates import ( "encoding/json" "fmt" "go/ast" "go/token" "go/types" "path/filepath" "sort" "strings" . "github.com/dave/jennifer/jen" // nolint:revive,stylecheck "github.com/fatih/structtag" "github.com/iancoleman/strcase" "golang.org/x/tools/go/packages" ) /* TODO: * Handle types from 3rd party imports in the type signature * Add packages.NeedImports and packages.NeedDependencies to packages.Load opts, ensure performance is okay (or deal with that by lazy loading) * Fix problem where changing a function signature requires running `dagger mod sync` twice (first one will result in package errors being seen, second one fixes) * Use Overlays field in packages.Config to provide partial generation of dagger.gen.go, without the unupdated code we generate here * Handle automatically re-running `dagger mod sync` when invoking functions from CLI, to save users from having to always remember while developing locally * Support methods defined on non-pointer receivers */ /* moduleMainSrc generates the source code of the main func for Dagger Module code using the Go SDK. The overall idea is that users just need to create a struct with the same name as their Module and then add methods to that struct to implement their Module. Methods on that struct become Functions. They are also free to return custom objects from Functions, which themselves may have methods that become Functions too. However, only the "top-level" Module struct's Functions will be directly invokable. This is essentially just the GraphQL execution model. The implementation works by parsing the user's code and generating a main func that reads function call inputs from the Engine, calls the relevant function and returns the result. The generated code is mostly a giant switch/case on the object+function name, with each case doing json deserialization of the input arguments and calling the actual Go function. */ func (funcs goTemplateFuncs) moduleMainSrc() string { if funcs.modulePkg == nil { // during bootstrapping, we might not have code yet, since it takes // multiple passes. return `func main() { panic("no code yet") }` } ps := &parseState{ pkg: funcs.modulePkg, fset: funcs.moduleFset, methods: make(map[string][]method), } pkgScope := funcs.modulePkg.Types.Scope() objFunctionCases := map[string][]Code{} createMod := Qual("dag", "CurrentModule").Call() objs := []types.Object{} for _, name := range pkgScope.Names() { obj := pkgScope.Lookup(name) if obj == nil { continue } objs = append(objs, obj) } // preserve definition order, so developer can keep more important / // entrypoint types higher up sort.Slice(objs, func(i, j int) bool { return objs[i].Pos() < objs[j].Pos() }) for _, obj := range objs { named, isNamed := obj.Type().(*types.Named) if !isNamed { continue } strct, isStruct := named.Underlying().(*types.Struct) if !isStruct { // TODO(vito): could possibly support non-struct types, but why bother continue } // TODO(vito): hacky: need to run this before fillObjectFunctionCases so it // collects all the methods objType, err := ps.goStructToAPIType(strct, named) if err != nil { panic(err) } if err := ps.fillObjectFunctionCases(named, objFunctionCases); err != nil { // errors indicate an internal problem rather than something w/ user code, so panic instead panic(err) } if len(objFunctionCases[obj.Name()]) == 0 { // no functions on this object, so don't add it to the module continue } // Add the object to the module createMod = dotLine(createMod, "WithObject").Call(Add(Line(), objType)) } // TODO: sort cases and functions based on their definition order return strings.Join([]string{mainSrc, invokeSrc(objFunctionCases, createMod)}, "\n") } func dotLine(a *Statement, id string) *Statement { return a.Op(".").Line().Id(id) } const ( // The static part of the generated code. It calls out to the "invoke" func, which is the mostly // dynamically generated code that actually calls the user's functions. mainSrc = `func main() { ctx := context.Background() fnCall := dag.CurrentFunctionCall() parentName, err := fnCall.ParentName(ctx) if err != nil { fmt.Println(err.Error()) os.Exit(2) } fnName, err := fnCall.Name(ctx) if err != nil { fmt.Println(err.Error()) os.Exit(2) } parentJson, err := fnCall.Parent(ctx) if err != nil { fmt.Println(err.Error()) os.Exit(2) } fnArgs, err := fnCall.InputArgs(ctx) if err != nil { fmt.Println(err.Error()) os.Exit(2) } inputArgs := map[string][]byte{} for _, fnArg := range fnArgs { argName, err := fnArg.Name(ctx) if err != nil { fmt.Println(err.Error()) os.Exit(2) } argValue, err := fnArg.Value(ctx) if err != nil { fmt.Println(err.Error()) os.Exit(2) } inputArgs[argName] = []byte(argValue) } result, err := invoke(ctx, []byte(parentJson), parentName, fnName, inputArgs) if err != nil { fmt.Println(err.Error()) os.Exit(2) } resultBytes, err := json.Marshal(result) if err != nil { fmt.Println(err.Error()) os.Exit(2) } _, err = fnCall.ReturnValue(ctx, JSON(resultBytes)) if err != nil { fmt.Println(err.Error()) os.Exit(2) } } ` parentJSONVar = "parentJSON" parentNameVar = "parentName" fnNameVar = "fnName" inputArgsVar = "inputArgs" invokeFuncName = "invoke" ) // the source code of the invoke func, which is the mostly dynamically generated code that actually calls the user's functions func invokeSrc(objFunctionCases map[string][]Code, createMod Code) string { // each `case` statement for every object name, which makes up the body of the invoke func objCases := []Code{} for objName, functionCases := range objFunctionCases { objCases = append(objCases, Case(Lit(objName)).Block(Switch(Id(fnNameVar)).Block(functionCases...))) } // when the object name is empty, return the module definition objCases = append(objCases, Case(Lit("")).Block( Return(createMod, Nil()), )) // default case (return error) objCases = append(objCases, Default().Block( Return(Nil(), Qual("fmt", "Errorf").Call(Lit("unknown object %s"), Id(parentNameVar))), )) objSwitch := Switch(Id(parentNameVar)).Block(objCases...) // func invoke( invokeFunc := Func().Id(invokeFuncName).Params( // ctx context.Context, Id("ctx").Qual("context", "Context"), // parentJSON []byte, Id(parentJSONVar).Index().Byte(), // parentName string, Id(parentNameVar).String(), // fnName string, Id(fnNameVar).String(), // inputArgs map[string][]byte, Id(inputArgsVar).Map(String()).Index().Byte(), ).Params( // ) (any, Id("any"), // error) Error(), ).Block(objSwitch) return fmt.Sprintf("%#v", invokeFunc) } func renderNameOrStruct(t types.Type) string { if ptr, ok := t.(*types.Pointer); ok { return "*" + renderNameOrStruct(ptr.Elem()) } if named, ok := t.(*types.Named); ok { // assume local return named.Obj().Name() } // HACK(vito): this is passed to Id(), which is a bit weird, but works return t.String() } var checkErrStatement = If(Err().Op("!=").Nil()).Block( // fmt.Println(err.Error()) Qual("fmt", "Println").Call(Err().Dot("Error").Call()), // os.Exit(2) Qual("os", "Exit").Call(Lit(2)), ) // fillObjectFunctionCases recursively fills out the `cases` map with entries for object name -> `case` statement blocks // for each function in that object func (ps *parseState) fillObjectFunctionCases(type_ types.Type, cases map[string][]Code) error { var objName string switch x := type_.(type) { case *types.Pointer: return ps.fillObjectFunctionCases(x.Elem(), cases) case *types.Named: objName = x.Obj().Name() default: return nil } if existingCases := cases[objName]; len(existingCases) > 0 { // handles recursive types, e.g. objects with chainable methods that return themselves return nil } methods := ps.methods[objName] if len(methods) == 0 { return nil } for _, method := range methods { fnName, sig := method.name, method.sig statements := []Code{ Var().Id("err").Error(), } parentVarName := "parent" statements = append(statements, Var().Id(parentVarName).Id(objName), Err().Op("=").Qual("json", "Unmarshal").Call(Id(parentJSONVar), Op("&").Id(parentVarName)), checkErrStatement, ) fnCallArgs := []Code{Op("&").Id(parentVarName)} for i := 0; i < sig.Params().Len(); i++ { arg := sig.Params().At(i) if i == 0 && arg.Type().String() == "context.Context" { fnCallArgs = append(fnCallArgs, Id("ctx")) continue } if opts, ok := namedOrDirectStruct(arg.Type()); ok { optsName := arg.Name() statements = append(statements, Var().Id(optsName).Id(renderNameOrStruct(arg.Type()))) for f := 0; f < opts.NumFields(); f++ { param := opts.Field(f) argName := strcase.ToLowerCamel(param.Name()) statements = append(statements, If(Id(inputArgsVar).Index(Lit(argName)).Op("!=").Nil()).Block( Err().Op("=").Qual("json", "Unmarshal").Call( Index().Byte().Parens(Id(inputArgsVar).Index(Lit(argName))), Op("&").Id(optsName).Dot(param.Name()), ), checkErrStatement, )) } fnCallArgs = append(fnCallArgs, Id(optsName)) } else { argName := strcase.ToLowerCamel(arg.Name()) statements = append(statements, Var().Id(argName).Id(renderNameOrStruct(arg.Type())), Err().Op("=").Qual("json", "Unmarshal").Call( Index().Byte().Parens(Id(inputArgsVar).Index(Lit(argName))), Op("&").Id(argName), ), checkErrStatement, ) fnCallArgs = append(fnCallArgs, Id(argName)) } } results := sig.Results() switch results.Len() { case 2: // assume second value is error if results.At(1).Type().String() != errorTypeName { // sanity check return fmt.Errorf("second return value must be error, have %s", results.At(0).Type().String()) } statements = append(statements, Return( Parens(Op("*").Id(objName)).Dot(fnName).Call(fnCallArgs...), )) cases[objName] = append(cases[objName], Case(Lit(fnName)).Block(statements...)) if err := ps.fillObjectFunctionCases(results.At(0).Type(), cases); err != nil { return err } case 1: if results.At(0).Type().String() == errorTypeName { // void error return statements = append(statements, Return( Nil(), Parens(Op("*").Id(objName)).Dot(fnName).Call(fnCallArgs...), )) cases[objName] = append(cases[objName], Case(Lit(fnName)).Block(statements...)) } else { // non-error return statements = append(statements, Return( Parens(Op("*").Id(objName)).Dot(fnName).Call(fnCallArgs...), Nil(), )) cases[objName] = append(cases[objName], Case(Lit(fnName)).Block(statements...)) if err := ps.fillObjectFunctionCases(results.At(0).Type(), cases); err != nil { return err } } case 0: // void return // // NB(vito): it's really weird to have a fully void return (not even // error), but we should still support it for completeness. statements = append(statements, Parens(Op("*").Id(objName)).Dot(fnName).Call(fnCallArgs...), Return(Nil(), Nil())) cases[objName] = append(cases[objName], Case(Lit(fnName)).Block(statements...)) default: return fmt.Errorf("unexpected number of results from method %s: %d", fnName, results.Len()) } } // default case (return error) cases[objName] = append(cases[objName], Default().Block( Return(Nil(), Qual("fmt", "Errorf").Call(Lit("unknown function %s"), Id(fnNameVar))), )) return nil } type parseState struct { pkg *packages.Package fset *token.FileSet methods map[string][]method } type method struct { name string sig *types.Signature } func (ps *parseState) goTypeToAPIType(typ types.Type, named *types.Named) (*Statement, error) { switch t := typ.(type) { case *types.Named: // Named types are any types declared like `type Foo <...>` typeDef, err := ps.goTypeToAPIType(t.Underlying(), t) if err != nil { return nil, fmt.Errorf("failed to convert named type: %w", err) } return typeDef, nil case *types.Pointer: return ps.goTypeToAPIType(t.Elem(), named) case *types.Basic: if t.Kind() == types.Invalid { return nil, fmt.Errorf("invalid type: %+v", t) } var kind Code switch t.Info() { case types.IsString: kind = Id("Stringkind") case types.IsInteger: kind = Id("Integerkind") case types.IsBoolean: kind = Id("Booleankind") default: return nil, fmt.Errorf("unsupported basic type: %+v", t) } return Qual("dag", "TypeDef").Call().Dot("WithKind").Call( kind, ), nil case *types.Slice: elemTypeDef, err := ps.goTypeToAPIType(t.Elem(), nil) if err != nil { return nil, fmt.Errorf("failed to convert slice element type: %w", err) } return Qual("dag", "TypeDef").Call().Dot("WithListOf").Call( elemTypeDef, ), nil case *types.Struct: if named == nil { return nil, fmt.Errorf("struct types must be named") } typeName := named.Obj().Name() if typeName == "" { return nil, fmt.Errorf("struct types must be named") } return Qual("dag", "TypeDef").Call().Dot("WithObject").Call( Lit(typeName), ), nil default: return nil, fmt.Errorf("unsupported type %T", t) } } const errorTypeName = "error" func (ps *parseState) goStructToAPIType(t *types.Struct, named *types.Named) (*Statement, error) { if named == nil { return nil, fmt.Errorf("struct types must be named") } typeName := named.Obj().Name() if typeName == "" { return nil, fmt.Errorf("struct types must be named") } // args for WithObject withObjectArgs := []Code{ Lit(typeName), } withObjectOpts := []Code{} // Fill out the Description with the comment above the struct (if any) typeSpec, err := ps.typeSpecForNamedType(named) if err != nil { return nil, fmt.Errorf("failed to find decl for named type %s: %w", typeName, err) } if doc := typeSpec.Doc; doc != nil { // TODO(vito): for some reason this is always nil withObjectOpts = append(withObjectOpts, Id("Description").Op(":").Lit(doc.Text())) } if len(withObjectOpts) > 0 { withObjectArgs = append(withObjectArgs, Id("TypeDefWithObjectOpts").Values(withObjectOpts...)) } typeDef := Qual("dag", "TypeDef").Call().Dot("WithObject").Call(withObjectArgs...) tokenFile := ps.fset.File(named.Obj().Pos()) isDaggerGenerated := filepath.Base(tokenFile.Name()) == "dagger.gen.go" // TODO: don't hardcode methods := []*types.Func{} // Fill out any Functions on the object, which are methods on the struct // TODO: support methods defined on non-pointer receivers methodSet := types.NewMethodSet(types.NewPointer(named)) for i := 0; i < methodSet.Len(); i++ { methodObj := methodSet.At(i).Obj() methodTokenFile := ps.fset.File(methodObj.Pos()) methodIsDaggerGenerated := filepath.Base(methodTokenFile.Name()) == "dagger.gen.go" // TODO: don't hardcode if methodIsDaggerGenerated { // We don't care about pre-existing methods on core types or objects from dependency modules. continue } method, ok := methodObj.(*types.Func) if !ok { return nil, fmt.Errorf("expected method to be a func, got %T", methodObj) } if !method.Exported() { continue } methods = append(methods, method) } sort.Slice(methods, func(i, j int) bool { return methods[i].Pos() < methods[j].Pos() }) for _, method := range methods { fnTypeDef, err := ps.goMethodToAPIFunctionDef(typeName, method, named) if err != nil { return nil, fmt.Errorf("failed to convert method %s to function def: %w", method.Name(), err) } typeDef = dotLine(typeDef, "WithFunction").Call(Add(Line(), fnTypeDef)) } if isDaggerGenerated { // If this object is from the core API or another dependency, we only care // about any new methods being attached to it, so we're all done in this // case return typeDef, nil } astStructType, ok := typeSpec.Type.(*ast.StructType) if !ok { return nil, fmt.Errorf("expected type spec to be a struct, got %T", typeSpec.Type) } // Fill out the static fields of the struct (if any) for i := 0; i < t.NumFields(); i++ { field := t.Field(i) if !field.Exported() { continue } fieldTypeDef, err := ps.goTypeToAPIType(field.Type(), nil) if err != nil { return nil, fmt.Errorf("failed to convert field type: %w", err) } var description string if doc := astStructType.Fields.List[i].Doc; doc != nil { description = doc.Text() } withFieldArgs := []Code{ Lit(field.Name()), fieldTypeDef, } if description != "" { withFieldArgs = append(withFieldArgs, Id("TypeDefWithFieldOpts").Values( Id("Description").Op(":").Lit(description), )) } typeDef = dotLine(typeDef, "WithField").Call(withFieldArgs...) } return typeDef, nil } var voidDef = Qual("dag", "TypeDef").Call(). Dot("WithKind").Call(Id("Voidkind")). Dot("WithOptional").Call(Lit(true)) func (ps *parseState) goMethodToAPIFunctionDef(typeName string, fn *types.Func, named *types.Named) (*Statement, error) { methodSig, ok := fn.Type().(*types.Signature) if !ok { return nil, fmt.Errorf("expected method to be a func, got %T", fn.Type()) } // stash away the method signature so we can remember details on how it's // invoked (e.g. no error return, no ctx arg, error-only return, etc) ps.methods[typeName] = append(ps.methods[typeName], method{ name: fn.Name(), sig: methodSig, }) var err error var fnReturnType *Statement methodResults := methodSig.Results() switch methodResults.Len() { case 0: fnReturnType = voidDef case 1: result := methodResults.At(0).Type() if result.String() == errorTypeName { fnReturnType = voidDef } else { fnReturnType, err = ps.goTypeToAPIType(result, nil) if err != nil { return nil, fmt.Errorf("failed to convert result type: %w", err) } } case 2: result := methodResults.At(0).Type() fnReturnType, err = ps.goTypeToAPIType(result, nil) if err != nil { return nil, fmt.Errorf("failed to convert result type: %w", err) } default: return nil, fmt.Errorf("method %s has too many return values", fn.Name()) } fnDef := Qual("dag", "Function").Call(Lit(fn.Name()), Add(Line(), fnReturnType)) funcDecl, err := ps.declForFunc(fn) if err != nil { return nil, fmt.Errorf("failed to find decl for method %s: %w", fn.Name(), err) } if doc := funcDecl.Doc; doc != nil { fnDef = dotLine(fnDef, "WithDescription").Call(Lit(doc.Text())) } for i := 0; i < methodSig.Params().Len(); i++ { param := methodSig.Params().At(i) if i == 0 && param.Type().String() == "context.Context" { // ignore ctx arg continue } if opts, ok := namedOrDirectStruct(param.Type()); ok { for f := 0; f < opts.NumFields(); f++ { param := opts.Field(f) tags, err := structtag.Parse(opts.Tag(f)) if err != nil { return nil, fmt.Errorf("failed to parse struct tag: %w", err) } argTypeDef, err := ps.goTypeToAPIType(param.Type(), nil) if err != nil { return nil, fmt.Errorf("failed to convert param type: %w", err) } argOptional := true if tags != nil { if tag, err := tags.Get("required"); err == nil { argOptional = tag.Value() == "true" } } // all values in a struct are optional argTypeDef = argTypeDef.Dot("WithOptional").Call(Lit(argOptional)) // arguments to WithArg argArgs := []Code{ Lit(param.Name()), argTypeDef, } argOpts := []Code{} if tags != nil { // TODO: support this? // if tag, err := tags.Get("name"); err == nil { // def.Name = tag.Value() // } if tag, err := tags.Get("doc"); err == nil { argOpts = append(argOpts, Id("Description").Op(":").Lit(tag.Value())) } if tag, err := tags.Get("default"); err == nil { var jsonEnc string if param.Type().String() == "string" { enc, err := json.Marshal(tag.Value()) if err != nil { return nil, fmt.Errorf("failed to marshal default value: %w", err) } jsonEnc = string(enc) } else { jsonEnc = tag.Value() // assume JSON encoded } argOpts = append(argOpts, Id("DefaultValue").Op(":").Id("JSON").Call(Lit(jsonEnc))) } } if len(argOpts) > 0 { argArgs = append(argArgs, Id("FunctionWithArgOpts").Values(argOpts...)) } fnDef = dotLine(fnDef, "WithArg").Call(argArgs...) } } else { argTypeDef, err := ps.goTypeToAPIType(param.Type(), nil) if err != nil { return nil, fmt.Errorf("failed to convert param type: %w", err) } fnDef = dotLine(fnDef, "WithArg").Call(Lit(param.Name()), argTypeDef) } } return fnDef, nil } func namedOrDirectStruct(t types.Type) (*types.Struct, bool) { switch x := t.(type) { case *types.Named: return namedOrDirectStruct(x.Underlying()) case *types.Struct: return x, true default: return nil, false } } // typeSpecForNamedType returns the *ast* type spec for the given Named type. This is needed // because the types.Named object does not have the comments associated with the type, which // we want to parse. func (ps *parseState) typeSpecForNamedType(namedType *types.Named) (*ast.TypeSpec, error) { tokenFile := ps.fset.File(namedType.Obj().Pos()) if tokenFile == nil { return nil, fmt.Errorf("no file for %s", namedType.Obj().Name()) } for _, f := range ps.pkg.Syntax { if ps.fset.File(f.Pos()) != tokenFile { continue } for _, decl := range f.Decls { genDecl, ok := decl.(*ast.GenDecl) if !ok { continue } for _, spec := range genDecl.Specs { typeSpec, ok := spec.(*ast.TypeSpec) if !ok { continue } if typeSpec.Name.Name == namedType.Obj().Name() { return typeSpec, nil } } } } return nil, fmt.Errorf("no decl for %s", namedType.Obj().Name()) } // declForFunc returns the *ast* func decl for the given Func type. This is needed // because the types.Func object does not have the comments associated with the type, which // we want to parse. func (ps *parseState) declForFunc(fnType *types.Func) (*ast.FuncDecl, error) { tokenFile := ps.fset.File(fnType.Pos()) if tokenFile == nil { return nil, fmt.Errorf("no file for %s", fnType.Name()) } for _, f := range ps.pkg.Syntax { if ps.fset.File(f.Pos()) != tokenFile { continue } for _, decl := range f.Decls { fnDecl, ok := decl.(*ast.FuncDecl) if ok && fnDecl.Name.Name == fnType.Name() { return fnDecl, nil } } } return nil, fmt.Errorf("no decl for %s", fnType.Name()) }
closed
dagger/dagger
https://github.com/dagger/dagger
5,871
Zenith: custom return types require at least one method defined
Custom function return types require at least one empty method defined on them to be detected by codegen (note the JSON tags are currently required, #5860). ```go // This is for a module "foo" package main import ( "context" ) type Foo struct{} type X struct { Message string `json:"message"` } // This function definition is required, or we don't detect and incorporate this into schema generation. // func (x *X) Void() {} func (m *Foo) MyFunction(ctx context.Context, stringArg string) X { return X{Message: stringArg} } ``` ``` $ echo '{foo{myFunction(stringArg: "hello"){message}}' | dagger query -m ". Error: failed to get loaded module ID: input:1: host.directory.asModule.serve failed to install module schema: schema validation failed: input:1813: Undefined type X. ```
https://github.com/dagger/dagger/issues/5871
https://github.com/dagger/dagger/pull/5893
c847458d6df1e184487e3a29f6d00a86ef67e661
b74df2479214020502fcb917d77325f00bd4d4e1
"2023-10-11T10:50:42Z"
go
"2023-10-18T12:22:03Z"
core/integration/module_test.go
package core import ( "context" _ "embed" "errors" "fmt" "os" "path/filepath" "strconv" "strings" "testing" "time" "dagger.io/dagger" "github.com/iancoleman/strcase" "github.com/moby/buildkit/identity" "github.com/stretchr/testify/require" ) /* TODO: add coverage for * dagger mod use * dagger mod sync * that the codegen of the testdata envs are up to date (or incorporate that into a cli command) * if a dependency changes, then checks should re-run */ func TestModuleGoInit(t *testing.T) { t.Run("from scratch", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=bare", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{bare{myFunction(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"bare":{"myFunction":{"stdout":"hello\n"}}}`, out) }) t.Run("kebab-cases Go module name, camel-cases Dagger module name", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=My-Module", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{myModule{myFunction(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"myModule":{"myFunction":{"stdout":"hello\n"}}}`, out) generated, err := modGen.File("go.mod").Contents(ctx) require.NoError(t, err) require.Contains(t, generated, "module my-module") }) t.Run("creates go.mod beneath an existing go.mod if root points beneath it", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/go.mod", dagger.ContainerWithNewFileOpts{ Contents: "module example.com/test\n", }). WithNewFile("/work/foo.go", dagger.ContainerWithNewFileOpts{ Contents: "package foo\n", }). WithWorkdir("/work/ci"). With(daggerExec("mod", "init", "--name=beneathGoMod", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{beneathGoMod{myFunction(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"beneathGoMod":{"myFunction":{"stdout":"hello\n"}}}`, out) t.Run("names Go module after Dagger module", func(t *testing.T) { generated, err := modGen.File("go.mod").Contents(ctx) require.NoError(t, err) require.Contains(t, generated, "module beneath-go-mod") }) }) t.Run("respects existing go.mod", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithExec([]string{"go", "mod", "init", "example.com/test"}). With(daggerExec("mod", "init", "--name=hasGoMod", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{hasGoMod{myFunction(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"hasGoMod":{"myFunction":{"stdout":"hello\n"}}}`, out) t.Run("preserves module name", func(t *testing.T) { generated, err := modGen.File("go.mod").Contents(ctx) require.NoError(t, err) require.Contains(t, generated, "module example.com/test") }) }) t.Run("respects parent go.mod if root points to it", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithExec([]string{"go", "mod", "init", "example.com/test"}). WithNewFile("/work/foo.go", dagger.ContainerWithNewFileOpts{ Contents: "package foo\n", }). WithWorkdir("/work/child"). With(daggerExec("mod", "init", "--name=child", "--sdk=go", "--root=..")). WithNewFile("/work/child/main.go", dagger.ContainerWithNewFileOpts{ Contents: ` package main import "os" type Child struct{} func (m *Child) Root() *Directory { wd, err := os.Getwd() if err != nil { panic(err) } return dag.Host().Directory(wd+"/..") } `, }) generated := modGen. // explicitly sync to see whether it makes a go.mod With(daggerExec("mod", "sync")). Directory(".") logGen(ctx, t, generated) out, err := modGen. With(daggerQuery(`{child{root{entries}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"child":{"root":{"entries":["child","foo.go","go.mod","go.sum"]}}}`, out) childEntries, err := generated.Entries(ctx) require.NoError(t, err) require.NotContains(t, childEntries, "go.mod") t.Run("preserves parent module name", func(t *testing.T) { generated, err := modGen.File("/work/go.mod").Contents(ctx) require.NoError(t, err) require.Contains(t, generated, "module example.com/test") }) }) t.Run("respects existing go.mod even if root points to parent that has go.mod", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithExec([]string{"go", "mod", "init", "example.com/test"}). WithNewFile("/work/foo.go", dagger.ContainerWithNewFileOpts{ Contents: "package foo\n", }). WithWorkdir("/work/child"). WithExec([]string{"go", "mod", "init", "my-mod"}). With(daggerExec("mod", "init", "--name=child", "--sdk=go", "--root=..")). WithNewFile("/work/child/main.go", dagger.ContainerWithNewFileOpts{ Contents: ` package main import "os" type Child struct{} func (m *Child) Root() *Directory { wd, err := os.Getwd() if err != nil { panic(err) } return dag.Host().Directory(wd+"/..") } `, }) generated := modGen. // explicitly sync to see whether it makes a go.mod With(daggerExec("mod", "sync")). Directory(".") logGen(ctx, t, generated) out, err := modGen. With(daggerQuery(`{child{root{entries}}}`)). Stdout(ctx) require.NoError(t, err) // no go.sum require.JSONEq(t, `{"child":{"root":{"entries":["child","foo.go","go.mod"]}}}`, out) childEntries, err := generated.Entries(ctx) require.NoError(t, err) require.Contains(t, childEntries, "go.mod") require.Contains(t, childEntries, "go.sum") }) t.Run("respects existing main.go", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: ` package main type HasMainGo struct {} func (m *HasMainGo) Hello() string { return "Hello, world!" } `, }). With(daggerExec("mod", "init", "--name=hasMainGo", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{hasMainGo{hello}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"hasMainGo":{"hello":"Hello, world!"}}`, out) }) t.Run("respects existing main.go even if it uses types not generated yet", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: ` package main type HasDaggerTypes struct {} func (m *HasDaggerTypes) Hello() *Container { return dag.Container(). From("` + alpineImage + `"). WithExec([]string{"echo", "Hello, world!"}) } `, }). With(daggerExec("mod", "init", "--name=hasDaggerTypes", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{hasDaggerTypes{hello{stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"hasDaggerTypes":{"hello":{"stdout":"Hello, world!\n"}}}`, out) }) t.Run("respects existing package without creating main.go", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/notmain.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type HasNotMainGo struct {} func (m *HasNotMainGo) Hello() string { return "Hello, world!" } `, }). With(daggerExec("mod", "init", "--name=hasNotMainGo", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{hasNotMainGo{hello}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"hasNotMainGo":{"hello":"Hello, world!"}}`, out) }) } func TestModuleGoGit(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := goGitBase(t, c). With(daggerExec("mod", "init", "--name=bare", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{bare{myFunction(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"bare":{"myFunction":{"stdout":"hello\n"}}}`, out) t.Run("configures .gitignore", func(t *testing.T) { ignore, err := modGen.File(".gitignore").Contents(ctx) require.NoError(t, err) require.Contains(t, ignore, "/dagger.gen.go\n") require.Contains(t, ignore, "/internal/querybuilder/\n") }) t.Run("configures .gitattributes", func(t *testing.T) { t.Skip("it doesn't anymore, since it's .gitignored anyway") attributes, err := modGen.File(".gitattributes").Contents(ctx) require.NoError(t, err) require.Contains(t, attributes, "/dagger.gen.go linguist-generated=true\n") }) } func TestModuleGoGitRemovesIgnored(t *testing.T) { t.Parallel() c, ctx := connect(t) committedModGen := goGitBase(t, c). With(daggerExec("mod", "init", "--name=bare", "--sdk=go")). WithExec([]string{"rm", ".gitignore"}). // simulate old path scheme to show we ignore it too to help transition WithExec([]string{"cp", "-a", "./internal/querybuilder", "./querybuilder"}). WithExec([]string{"git", "add", "."}). WithExec([]string{"git", "commit", "-m", "init with generated files"}) changedAfterSync, err := committedModGen. With(daggerExec("mod", "sync")). WithExec([]string{"git", "diff"}). // for debugging WithExec([]string{"git", "status", "--short"}). Stdout(ctx) require.NoError(t, err) t.Logf("changed after sync:\n%s", changedAfterSync) require.Contains(t, changedAfterSync, "D dagger.gen.go\n") require.Contains(t, changedAfterSync, "D querybuilder/marshal.go\n") require.Contains(t, changedAfterSync, "D querybuilder/querybuilder.go\n") require.Contains(t, changedAfterSync, "D internal/querybuilder/marshal.go\n") require.Contains(t, changedAfterSync, "D internal/querybuilder/querybuilder.go\n") } //go:embed testdata/modules/go/minimal/main.go var goSignatures string func TestModuleGoSignatures(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: goSignatures, }) logGen(ctx, t, modGen.Directory(".")) t.Run("func Hello() string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{hello}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"hello":"hello"}}`, out) }) t.Run("func Echo(string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echo(msg: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echo":"hello...hello...hello..."}}`, out) }) t.Run("func HelloContext(context.Context) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{helloContext}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"helloContext":"hello context"}}`, out) }) t.Run("func EchoContext(context.Context, string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoContext(msg: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoContext":"ctx.hello...ctx.hello...ctx.hello..."}}`, out) }) t.Run("func HelloStringError() (string, error)", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{helloStringError}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"helloStringError":"hello i worked"}}`, out) }) t.Run("func HelloVoid()", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{helloVoid}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"helloVoid":null}}`, out) }) t.Run("func HelloVoidError() error", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{helloVoidError}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"helloVoidError":null}}`, out) }) t.Run("func EchoOpts(string, Opts) error", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOpts(msg: "hi")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOpts":"hi...hi...hi..."}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOpts(msg: "hi", suffix: "!", times: 2)}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOpts":"hi!hi!"}}`, out) }) t.Run("func EchoOptsInline(string, struct{Suffix string, Times int}) error", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOptsInline(msg: "hi")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInline":"hi...hi...hi..."}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOptsInline(msg: "hi", suffix: "!", times: 2)}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInline":"hi!hi!"}}`, out) }) } //go:embed testdata/modules/go/extend/main.go var goExtend string func TestModuleGoExtendCore(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: goExtend, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerQuery(`{container{from(address:"` + alpineImage + `"){echo(msg:"hi!")}}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"container":{"from":{"echo":"hi!\n"}}}`, out) } //go:embed testdata/modules/go/custom-types/main.go var customTypes string func TestModuleGoCustomTypes(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: customTypes, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerQuery(`{test{repeater(msg:"echo!", times: 3){render}}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"test":{"repeater":{"render":"echo!echo!echo!"}}}`, out) } //go:embed testdata/modules/go/use/dep/main.go var useInner string //go:embed testdata/modules/go/use/main.go var useOuter string func TestModuleGoUseLocal(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/dep"). With(daggerExec("mod", "init", "--name=dep", "--sdk=go")). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=use", "--sdk=go")). WithNewFile("/work/dep/main.go", dagger.ContainerWithNewFileOpts{ Contents: useInner, }). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: useOuter, }). With(daggerExec("mod", "use", "./dep")). WithEnvVariable("BUST", identity.NewID()) // NB(vito): hmm... logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerQuery(`{use{useHello}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"use":{"useHello":"hello"}}`, out) // cannot use transitive dependency directly _, err = modGen.With(daggerQuery(`{dep{hello}}`)).Stdout(ctx) require.Error(t, err) require.ErrorContains(t, err, `Cannot query field "dep" on type "Query".`) } func TestModuleGoUseLocalMulti(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/foo"). WithNewFile("/work/foo/main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Foo struct {} func (m *Foo) Name() string { return "foo" } `, }). With(daggerExec("mod", "init", "--name=foo", "--sdk=go")). WithWorkdir("/work/bar"). WithNewFile("/work/bar/main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Bar struct {} func (m *Bar) Name() string { return "bar" } `, }). With(daggerExec("mod", "init", "--name=bar", "--sdk=go")). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=use", "--sdk=go")). With(daggerExec("mod", "use", "./foo")). With(daggerExec("mod", "use", "./bar")). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main import "context" import "fmt" type Use struct {} func (m *Use) Names(ctx context.Context) ([]string, error) { fooName, err := dag.Foo().Name(ctx) if err != nil { return nil, fmt.Errorf("foo.name: %w", err) } barName, err := dag.Bar().Name(ctx) if err != nil { return nil, fmt.Errorf("bar.name: %w", err) } return []string{fooName, barName}, nil } `, }). WithEnvVariable("BUST", identity.NewID()) // NB(vito): hmm... logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerQuery(`{use{names}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"use":{"names":["foo", "bar"]}}`, out) } //go:embed testdata/modules/go/wrapper/main.go var wrapper string func TestModuleGoWrapping(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=wrapper", "--sdk=go")). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: wrapper, }) logGen(ctx, t, modGen.Directory(".")) id := identity.NewID() out, err := modGen.With(daggerQuery( fmt.Sprintf(`{wrapper{container{echo(msg:%q){unwrap{stdout}}}}}`, id), )).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, fmt.Sprintf(`{"wrapper":{"container":{"echo":{"unwrap":{"stdout":%q}}}}}`, id), out) } func TestModuleConfigAPI(t *testing.T) { t.Parallel() c, ctx := connect(t) moduleDir := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/subdir"). With(daggerExec("mod", "init", "--name=test", "--sdk=go", "--root=..")). Directory("/work") cfg := c.ModuleConfig(moduleDir, dagger.ModuleConfigOpts{Subpath: "subdir"}) name, err := cfg.Name(ctx) require.NoError(t, err) require.Equal(t, "test", name) sdk, err := cfg.SDK(ctx) require.NoError(t, err) require.Equal(t, "go", sdk) root, err := cfg.Root(ctx) require.NoError(t, err) require.Equal(t, "..", root) } func TestModulePython(t *testing.T) { // TODO: simple e2e test for now, can be split out into many different tests with different focuses t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("./pyproject.toml", dagger.ContainerWithNewFileOpts{ Contents: `[project] name = "test" version = "0.0.0" `, }). WithNewFile("./src/main.py", dagger.ContainerWithNewFileOpts{ Contents: `from dagger.ext import function @function def hello(name: str) -> str: """Say hello to someone.""" return f"Hello, {name}!" `, }). With(daggerExec("mod", "init", "--name=test", "--sdk=python")) t.Run("func Hello() string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{test{hello(name: "there")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"test":{"hello":"Hello, there!"}}`, out) }) } func TestEnvCmd(t *testing.T) { t.Skip("pending conversion to modules") t.Parallel() type testCase struct { environmentPath string expectedSDK string expectedName string expectedRoot string } for _, tc := range []testCase{ { environmentPath: "core/integration/testdata/environments/go/basic", expectedSDK: "go", expectedName: "basic", expectedRoot: "../../../../../../", }, } { tc := tc for _, testGitEnv := range []bool{false, true} { testGitEnv := testGitEnv testName := "local environment" if testGitEnv { testName = "git environment" } testName += "/" + tc.environmentPath t.Run(testName, func(t *testing.T) { t.Parallel() c, ctx := connect(t) stderr, err := CLITestContainer(ctx, t, c). WithLoadedEnv(tc.environmentPath, testGitEnv). CallEnv(). Stderr(ctx) require.NoError(t, err) require.Contains(t, stderr, fmt.Sprintf(`"root": %q`, tc.expectedRoot)) require.Contains(t, stderr, fmt.Sprintf(`"name": %q`, tc.expectedName)) require.Contains(t, stderr, fmt.Sprintf(`"sdk": %q`, tc.expectedSDK)) }) } } } func TestEnvCmdHelps(t *testing.T) { t.Skip("pending conversion to modules") t.Parallel() c, ctx := connect(t) baseCtr := CLITestContainer(ctx, t, c).WithHelpArg(true) // test with no env specified noEnvCtr := baseCtr // test with a valid local env validLocalEnvCtr := baseCtr.WithLoadedEnv("core/integration/testdata/environments/go/basic", false) // test with a broken local env (this helps ensure that we aren't actually running the entrypoints, if we did we'd get an error) brokenLocalEnvCtr := baseCtr.WithLoadedEnv("core/integration/testdata/environments/go/broken", false) for _, ctr := range []*DaggerCLIContainer{noEnvCtr, validLocalEnvCtr, brokenLocalEnvCtr} { type testCase struct { testName string cmdCtr *DaggerCLIContainer expectedOutput string } for _, tc := range []testCase{ { testName: "dagger env/" + ctr.EnvArg, cmdCtr: ctr.CallEnv(), expectedOutput: "Usage:\n dagger environment [flags]\n\nAliases:\n environment, env", }, { testName: "dagger env init/" + ctr.EnvArg, cmdCtr: ctr.CallEnvInit(), expectedOutput: "Usage:\n dagger environment init", }, { testName: "dagger env sync/" + ctr.EnvArg, cmdCtr: ctr.CallEnvSync(), expectedOutput: "Usage:\n dagger environment sync", }, { testName: "dagger env extend/" + ctr.EnvArg, cmdCtr: ctr.CallEnvExtend("./fake/dep"), expectedOutput: "Usage:\n dagger environment extend", }, { testName: "dagger checks/" + ctr.EnvArg, cmdCtr: ctr.CallChecks(), expectedOutput: "Usage:\n dagger checks", }, } { tc := tc t.Run(tc.testName, func(t *testing.T) { t.Parallel() stdout, err := tc.cmdCtr.Stdout(ctx) require.NoError(t, err) require.Contains(t, stdout, tc.expectedOutput) }) } } } func TestEnvCmdInit(t *testing.T) { t.Skip("pending conversion to modules") t.Parallel() type testCase struct { testName string environmentPath string sdk string name string root string expectedErrorMessage string } for _, tc := range []testCase{ { testName: "explicit environment dir/go", environmentPath: "/var/testenvironment/subdir", sdk: "go", name: identity.NewID(), root: "../", }, { testName: "explicit environment dir/python", environmentPath: "/var/testenvironment/subdir", sdk: "python", name: identity.NewID(), root: "../..", }, { testName: "explicit environment file", environmentPath: "/var/testenvironment/subdir/dagger.json", sdk: "python", name: identity.NewID(), }, { testName: "implicit environment", sdk: "go", name: identity.NewID(), }, { testName: "implicit environment with root", environmentPath: "/var/testenvironment", sdk: "python", name: identity.NewID(), root: "..", }, { testName: "invalid sdk", environmentPath: "/var/testenvironment", sdk: "c++--", name: identity.NewID(), expectedErrorMessage: "unsupported environment SDK", }, { testName: "error on git", environmentPath: "git://github.com/dagger/dagger.git", sdk: "go", name: identity.NewID(), expectedErrorMessage: "environment init is not supported for git environments", }, } { tc := tc t.Run(tc.testName, func(t *testing.T) { t.Parallel() c, ctx := connect(t) ctr := CLITestContainer(ctx, t, c). WithEnvArg(tc.environmentPath). WithSDKArg(tc.sdk). WithNameArg(tc.name). CallEnvInit() if tc.expectedErrorMessage != "" { _, err := ctr.Sync(ctx) require.ErrorContains(t, err, tc.expectedErrorMessage) return } expectedConfigPath := tc.environmentPath if !strings.HasSuffix(expectedConfigPath, "dagger.json") { expectedConfigPath = filepath.Join(expectedConfigPath, "dagger.json") } _, err := ctr.File(expectedConfigPath).Contents(ctx) require.NoError(t, err) // TODO: test rest of SDKs once custom codegen is supported if tc.sdk == "go" { codegenFile := filepath.Join(filepath.Dir(expectedConfigPath), "dagger.gen.go") _, err := ctr.File(codegenFile).Contents(ctx) require.NoError(t, err) } stderr, err := ctr.CallEnv().Stderr(ctx) require.NoError(t, err) require.Contains(t, stderr, fmt.Sprintf(`"name": %q`, tc.name)) require.Contains(t, stderr, fmt.Sprintf(`"sdk": %q`, tc.sdk)) }) } t.Run("error on existing environment", func(t *testing.T) { t.Parallel() c, ctx := connect(t) _, err := CLITestContainer(ctx, t, c). WithLoadedEnv("core/integration/testdata/environments/go/basic", false). WithSDKArg("go"). WithNameArg("foo"). CallEnvInit(). Sync(ctx) require.ErrorContains(t, err, "environment init config path already exists") }) } func TestEnvChecks(t *testing.T) { t.Skip("pending conversion to modules") t.Parallel() allChecks := []string{ "cool-static-check", "sad-static-check", "cool-container-check", "sad-container-check", "cool-composite-check", "sad-composite-check", "another-cool-static-check", "another-sad-static-check", "cool-composite-check-from-explicit-dep", "sad-composite-check-from-explicit-dep", "cool-composite-check-from-dynamic-dep", "sad-composite-check-from-dynamic-dep", "cool-check-only-return", "cool-check-result-only-return", "cool-string-only-return", "cool-error-only-return", "sad-error-only-return", "cool-string-error-return", "sad-string-error-return", } compositeCheckToSubcheckNames := map[string][]string{ "cool-composite-check": { "cool-subcheck-a", "cool-subcheck-b", }, "sad-composite-check": { "sad-subcheck-a", "sad-subcheck-b", }, "cool-composite-check-from-explicit-dep": { "another-cool-static-check", "another-cool-container-check", "another-cool-composite-check", }, "sad-composite-check-from-explicit-dep": { "another-sad-static-check", "another-sad-container-check", "another-sad-composite-check", }, "cool-composite-check-from-dynamic-dep": { "yet-another-cool-static-check", "yet-another-cool-container-check", "yet-another-cool-composite-check", }, "sad-composite-check-from-dynamic-dep": { "yet-another-sad-static-check", "yet-another-sad-container-check", "yet-another-sad-composite-check", }, "another-cool-composite-check": { "another-cool-subcheck-a", "another-cool-subcheck-b", }, "another-sad-composite-check": { "another-sad-subcheck-a", "another-sad-subcheck-b", }, "yet-another-cool-composite-check": { "yet-another-cool-subcheck-a", "yet-another-cool-subcheck-b", }, "yet-another-sad-composite-check": { "yet-another-sad-subcheck-a", "yet-another-sad-subcheck-b", }, } // should be aligned w/ `func checkOutput` in ./testdata/environments/go/basic/main.go checkOutput := func(name string) string { return "WE ARE RUNNING CHECK " + strcase.ToKebab(name) } type testCase struct { name string environmentPath string selectedChecks []string expectFailure bool } for _, tc := range []testCase{ { name: "happy-path", environmentPath: "core/integration/testdata/environments/go/basic", selectedChecks: []string{ "cool-static-check", "cool-container-check", "cool-composite-check", "another-cool-static-check", "cool-composite-check-from-explicit-dep", "cool-composite-check-from-dynamic-dep", "cool-check-only-return", "cool-check-result-only-return", "cool-string-only-return", "cool-error-only-return", "cool-string-error-return", }, }, { name: "sad-path", expectFailure: true, environmentPath: "core/integration/testdata/environments/go/basic", selectedChecks: []string{ "sad-static-check", "sad-container-check", "sad-composite-check", "another-sad-static-check", "sad-composite-check-from-explicit-dep", "sad-composite-check-from-dynamic-dep", "sad-error-only-return", "sad-string-error-return", }, }, { name: "mixed-path", expectFailure: true, environmentPath: "core/integration/testdata/environments/go/basic", // run all checks, don't select any }, } { tc := tc for _, testGitEnv := range []bool{false, true} { testGitEnv := testGitEnv testName := tc.name testName += "/gitenv=" + strconv.FormatBool(testGitEnv) testName += "/" + tc.environmentPath t.Run(testName, func(t *testing.T) { t.Parallel() c, ctx := connect(t) stderr, err := CLITestContainer(ctx, t, c). WithLoadedEnv(tc.environmentPath, testGitEnv). CallChecks(tc.selectedChecks...). Stderr(ctx) if tc.expectFailure { require.Error(t, err) execErr := new(dagger.ExecError) require.True(t, errors.As(err, &execErr)) stderr = execErr.Stderr } else { require.NoError(t, err) } selectedChecks := tc.selectedChecks if len(selectedChecks) == 0 { selectedChecks = allChecks } curChecks := selectedChecks for len(curChecks) > 0 { var nextChecks []string for _, checkName := range curChecks { subChecks, ok := compositeCheckToSubcheckNames[checkName] if ok { nextChecks = append(nextChecks, subChecks...) } else { // special case for successful error only check, doesn't have output if checkName == "cool-error-only-return" { continue } require.Contains(t, stderr, checkOutput(checkName)) } } curChecks = nextChecks } }) } } } func daggerExec(args ...string) dagger.WithContainerFunc { return func(c *dagger.Container) *dagger.Container { return c.WithExec(append([]string{"dagger", "--debug"}, args...), dagger.ContainerWithExecOpts{ ExperimentalPrivilegedNesting: true, }) } } func daggerQuery(query string) dagger.WithContainerFunc { return func(c *dagger.Container) *dagger.Container { return c.WithExec([]string{"dagger", "--debug", "query"}, dagger.ContainerWithExecOpts{ Stdin: query, ExperimentalPrivilegedNesting: true, }) } } func goGitBase(t *testing.T, c *dagger.Client) *dagger.Container { t.Helper() return c.Container().From(golangImage). WithExec([]string{"apk", "add", "git"}). WithExec([]string{"git", "config", "--global", "user.email", "dagger@example.com"}). WithExec([]string{"git", "config", "--global", "user.name", "Dagger Tests"}). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithExec([]string{"git", "init"}) } func logGen(ctx context.Context, t *testing.T, modSrc *dagger.Directory) { t.Helper() generated, err := modSrc.File("dagger.gen.go").Contents(ctx) require.NoError(t, err) t.Cleanup(func() { t.Name() fileName := filepath.Join( os.TempDir(), t.Name(), fmt.Sprintf("dagger.gen.%d.go", time.Now().Unix()), ) if err := os.MkdirAll(filepath.Dir(fileName), 0o755); err != nil { t.Logf("failed to create temp dir for generated code: %v", err) return } if err := os.WriteFile(fileName, []byte(generated), 0644); err != nil { t.Logf("failed to write generated code to %s: %v", fileName, err) } else { t.Logf("wrote generated code to %s", fileName) } }) }
closed
dagger/dagger
https://github.com/dagger/dagger
5,917
ci: use separate cache mounts for different python versions
We are getting flaky pip cache errors like https://github.com/dagger/dagger/actions/runs/6552195369/job/17794987073#step:4:1007 @helderco suggested it may be due to separate python versions being used in parallel on the same cache mount: https://github.com/dagger/dagger/pull/5906#issuecomment-1767391090 (I'll squash this quick since the flakes are quite annoying; just filing issue since I'm currently squashing something else and don't want to forget)
https://github.com/dagger/dagger/issues/5917
https://github.com/dagger/dagger/pull/5919
d6b3585f481dba441b77f521fd2b094e483b31c7
7560f6ec3e061c94adcb75740124c670cd4d07c7
"2023-10-18T21:04:46Z"
go
"2023-10-19T02:21:32Z"
internal/mage/sdk/python.go
package sdk import ( "context" "errors" "fmt" "os" "strings" "github.com/dagger/dagger/internal/mage/util" "dagger.io/dagger" "github.com/magefile/mage/mg" "golang.org/x/sync/errgroup" ) var ( pythonGeneratedAPIPath = "sdk/python/src/dagger/client/gen.py" pythonDefaultVersion = "3.11" ) var _ SDK = Python{} type Python mg.Namespace // Lint lints the Python SDK func (t Python) Lint(ctx context.Context) error { c, err := dagger.Connect(ctx, dagger.WithLogOutput(os.Stderr)) if err != nil { return err } defer c.Close() c = c.Pipeline("sdk").Pipeline("python").Pipeline("lint") eg, gctx := errgroup.WithContext(ctx) base := pythonBase(c, pythonDefaultVersion) eg.Go(func() error { path := "docs/current" _, err = base. WithDirectory( fmt.Sprintf("/%s", path), util.Repository(c).Directory(path), dagger.ContainerWithDirectoryOpts{ Include: []string{ "**/*.py", ".ruff.toml", }, }, ). WithExec([]string{"hatch", "run", "lint"}). Sync(gctx) return err }) eg.Go(func() error { return lintGeneratedCode(func() error { return t.Generate(gctx) }, pythonGeneratedAPIPath) }) return eg.Wait() } // Test tests the Python SDK func (t Python) Test(ctx context.Context) error { c, err := dagger.Connect(ctx, dagger.WithLogOutput(os.Stderr)) if err != nil { return err } defer c.Close() c = c.Pipeline("sdk").Pipeline("python").Pipeline("test") versions := []string{"3.10", "3.11"} devEngine, endpoint, err := util.CIDevEngineContainerAndEndpoint(ctx, c.Pipeline("dev-engine"), util.DevEngineOpts{Name: "sdk-python-test"}) if err != nil { return err } cliBinPath := "/.dagger-cli" eg, gctx := errgroup.WithContext(ctx) for _, version := range versions { version := version c := c.Pipeline(version) base := pythonBase(c, version) eg.Go(func() error { _, err := base. WithServiceBinding("dagger-engine", devEngine). WithEnvVariable("_EXPERIMENTAL_DAGGER_RUNNER_HOST", endpoint). WithMountedFile(cliBinPath, util.DaggerBinary(c)). WithEnvVariable("_EXPERIMENTAL_DAGGER_CLI_BIN", cliBinPath). WithExec([]string{"hatch", "run", "test", "--exitfirst"}). Sync(gctx) return err }) // Test build dist := pythonBaseEnv(c, version). Pipeline("build"). WithMountedDirectory( "/dist", base.Pipeline("build"). WithExec([]string{"hatch", "build", "--clean"}). Directory("dist"), ) for name, ext := range map[string]string{"sdist": "tar.gz", "bdist": "whl"} { name := name ext := ext eg.Go(func() error { _, err := dist.Pipeline(name). WithExec([]string{"sh", "-c", "pip install /dist/*" + ext}). WithExec([]string{"python", "-c", "import dagger"}). Sync(gctx) return err }) } } return eg.Wait() } // Generate re-generates the SDK API func (t Python) Generate(ctx context.Context) error { c, err := dagger.Connect(ctx, dagger.WithLogOutput(os.Stderr)) if err != nil { return err } defer c.Close() c = c.Pipeline("sdk").Pipeline("python").Pipeline("generate") devEngine, endpoint, err := util.CIDevEngineContainerAndEndpoint(ctx, c.Pipeline("dev-engine"), util.DevEngineOpts{Name: "sdk-python-generate"}) if err != nil { return err } cliBinPath := "/.dagger-cli" generated, err := pythonBase(c, pythonDefaultVersion). WithServiceBinding("dagger-engine", devEngine). WithEnvVariable("_EXPERIMENTAL_DAGGER_RUNNER_HOST", endpoint). WithMountedFile(cliBinPath, util.DaggerBinary(c)). WithEnvVariable("_EXPERIMENTAL_DAGGER_CLI_BIN", cliBinPath). WithWorkdir("/"). WithExec([]string{cliBinPath, "run", "python", "-m", "dagger", "generate", pythonGeneratedAPIPath}). WithExec([]string{"black", pythonGeneratedAPIPath}). File(pythonGeneratedAPIPath). Contents(ctx) if err != nil { return err } return os.WriteFile(pythonGeneratedAPIPath, []byte(generated), 0o600) } // Publish publishes the Python SDK func (t Python) Publish(ctx context.Context, tag string) error { c, err := dagger.Connect(ctx, dagger.WithLogOutput(os.Stderr)) if err != nil { return err } defer c.Close() c = c.Pipeline("sdk").Pipeline("python").Pipeline("publish") var ( version = strings.TrimPrefix(tag, "sdk/python/v") token = os.Getenv("PYPI_TOKEN") repo = os.Getenv("PYPI_REPO") ) if token == "" { return errors.New("PYPI_TOKEN environment variable must be set") } if repo == "" || repo == "pypi" { repo = "main" } _, err = pythonBase(c, pythonDefaultVersion). WithEnvVariable("SETUPTOOLS_SCM_PRETEND_VERSION", version). WithEnvVariable("HATCH_INDEX_REPO", repo). WithEnvVariable("HATCH_INDEX_USER", "__token__"). WithSecretVariable("HATCH_INDEX_AUTH", c.SetSecret("pypiToken", token)). WithExec([]string{"hatch", "build"}). WithExec([]string{"hatch", "publish"}). Sync(ctx) return err } // Bump the Python SDK's Engine dependency func (t Python) Bump(_ context.Context, version string) error { // trim leading v from version version = strings.TrimPrefix(version, "v") engineReference := fmt.Sprintf("# Code generated by dagger. DO NOT EDIT.\n\nCLI_VERSION = %q\n", version) // NOTE: if you change this path, be sure to update .github/workflows/publish.yml so that // provision tests run whenever this file changes. return os.WriteFile("sdk/python/src/dagger/_engine/_version.py", []byte(engineReference), 0o600) } // pythonBaseEnv returns a general python environment, without source files. func pythonBaseEnv(c *dagger.Client, version string) *dagger.Container { pipx := c.HTTP("https://github.com/pypa/pipx/releases/download/1.2.0/pipx.pyz") venv := "/opt/venv" return c.Container(). From(fmt.Sprintf("python:%s-slim", version)). WithEnvVariable("PIPX_BIN_DIR", "/usr/local/bin"). WithMountedCache("/root/.cache/pip", c.CacheVolume("pip_cache")). WithMountedCache("/root/.local/pipx/cache", c.CacheVolume("pipx_cache")). WithMountedCache("/root/.cache/hatch", c.CacheVolume("hatch_cache")). WithMountedFile("/pipx.pyz", pipx). WithExec([]string{"python", "/pipx.pyz", "install", "hatch==1.7.0"}). WithExec([]string{"python", "-m", "venv", venv}). WithEnvVariable("VIRTUAL_ENV", venv). WithEnvVariable( "PATH", "$VIRTUAL_ENV/bin:$PATH", dagger.ContainerWithEnvVariableOpts{ Expand: true, }, ). WithEnvVariable("HATCH_ENV_TYPE_VIRTUAL_PATH", venv) } // pythonBase returns a python container with the Python SDK source files // added and dependencies installed. func pythonBase(c *dagger.Client, version string) *dagger.Container { var ( appDir = "sdk/python" reqFile = "requirements.txt" ) src := util.Repository(c).Directory(appDir) // Mirror the same dir structure from the repo because of the // relative paths in ruff (for docs linting). mountPath := fmt.Sprintf("/%s", appDir) reqPath := fmt.Sprintf("%s/%s", appDir, reqFile) return pythonBaseEnv(c, version). WithFile(reqPath, src.File(reqFile)). WithExec([]string{"pip", "install", "-r", reqPath}). WithDirectory(mountPath, src). WithWorkdir(mountPath). WithExec([]string{"pip", "install", "."}) }
closed
dagger/dagger
https://github.com/dagger/dagger
5,055
🖐️ How do we specify registry mirrors?
### What happened? What did you expect to happen? Some people (e.g: #4217), including myself, are trying to use a private registry as a mirror for the Docker Hub registry. This, [according to the Buildkit documentation](https://docs.docker.com/build/buildkit/configure/) is achieved with the following `/etc/buildkit.toml` file: ```toml debug = true [registry."docker.io"] mirrors = ["mirror.gcr.io"] ``` How does one do that for Dagger? As an example, the following method should pull from `mirror.gcr.io/golang:latest`: ```golang func build(ctx context.Context) error { fmt.Println("Building with Dagger") // initialize Dagger client client, err := dagger.Connect(ctx, dagger.WithLogOutput(os.Stdout)) if err != nil { return err } defer client.Close() // get reference to the local project src := client.Host().Directory(".") // get `golang` image golang := client.Container().From("golang:latest") // mount cloned repository into `golang` image golang = golang.WithDirectory("/src", src).WithWorkdir("/src") // define the application build command path := "build/" golang = golang.WithExec([]string{"go", "build", "-o", path}) // get reference to build output directory in container output := golang.Directory(path) // write contents of container build/ directory to the host _, err = output.Export(ctx, path) if err != nil { return err } return nil } ``` Any tips?
https://github.com/dagger/dagger/issues/5055
https://github.com/dagger/dagger/pull/5828
33cdd129e5395e538df38aaca8a34baa38b90c5f
74e6393e816af380e410f7582e37de5c52ea02e8
"2023-04-28T16:28:41Z"
go
"2023-10-19T06:11:07Z"
core/docs/d7yxc-operator_manual.md
--- slug: /d7yxc/operator_manual displayed_sidebar: "0.3" --- # Dagger operator manual ## Architecture ```mermaid flowchart LR subgraph ClientHost[Client Host] client[Client tool] -- queries --> router subgraph cli[Session] router[GraphQL API Server] localdir[Local Directory Synchronization] unixsock[Local Socket Forwarding] end end subgraph Runner[Runner] RunnerAPI[Runner API Server] RunnerAPI --> containers[Exec Containers] RunnerAPI --> cache cache <--> containers end RunnerAPI <--> Sources[External Container Registries, Git Repos, etc.] router --> RunnerAPI localdir <--> RunnerAPI unixsock <--> RunnerAPI ``` There are 3 major parts to the Dagger architecture: ### Client tool This is the code (usually a custom command-line tool or script) making calls to the Dagger API. It typically uses one of the official Dagger SDKs, but in general could use any GraphQL client. The default path of an official SDK is to automatically download+cache a CLI binary, which will itself automatically start up a runner via `docker`. However, there are experimental ways of using pre-installed CLI binaries and custom provisioned runners, which are detailed more in subsequent sections. ### Session A session is served by a `dagger` CLI subcommand: 1. If you use an SDK, by default it will use an automatically downloaded CLI binary and invoke a different subcommand to start a session for the duration of the `dagger.Connect` call. 1. If you wrap execution of the client tool with `dagger run`, a session will be setup that lasts for the duration of that command. This overrides the default behavior of official SDKs. A session is responsible for: - Serving the GraphQL API to clients - Currently this is just the core API. Extensions will make it, as the name suggests, extensible. - The synchronization of local directories into pipeline containers - The state of a local directory will be frozen on first use for the duration of a session - The proxying of local sockets to exec containers - Managing secrets available to pipelines in the session - Managing the resolution of unpinned sources to specific versions - E.g. the mapping of `image:latest` to a specific digest, mapping of a git branch to a specific commit, etc. - This mapping will happen once per-session on first use and be frozen for the rest of the session after Sessions are expected to be run on the same host as the SDK client, and ideally with the same privileges and working directory; otherwise local resources like directories and sockets will differ from that which is local to the client. ### Runner A runner is the "backend" of the Dagger engine where containers are actually executed. Runners are responsible for: - Executing containers specified by pipelines - Pulling container images, git repos and other sources needed for pipeline execution - Pushing container images to registries - Managing the cache backing pipeline execution The runner is distributed as a container image, making it easy to run on various container runtimes like Docker, Kubernetes, Podman, etc. It's typically run persistently, as opposed to sessions which only last for the duration of `dagger run` or `dagger.Connect` in an SDK. ## FAQ ### What are the steps for using a custom runner? There are more [details](#runner-details) worth reviewing, but the consolidated steps are: 1. Determine the runner version required by checking the release notes of the SDK you intend to use. 1. If changes to the base image are needed, make those and push them somewhere. If no changes are needed, just use it as is. 1. Start the runner image in your target of choice, keeping the [requirements](#execution-requirements) and [configuration](#configuration) in mind. 1. Export the `_EXPERIMENTAL_DAGGER_RUNNER_HOST` environment variable with [a value pointing to your target](#connection-interface). 1. Call `dagger run` or execute SDK code directly with that environment variable set. ### What compatibility is there between SDK, CLI and Runner versions? This is only needed if you are using a custom provisioned runner or a pre-installed CLI. If you are just using an SDK directly a CLI and runner will be provisioned automatically at compatible versions. The CLI+Runner share a version number. SDKs have their own version number, but they are currently only guaranteed to be compatible with a single CLI+Runner version at a time. To ensure that an SDK will be used with a compatible CLI and runner: 1. Check the release notes of the SDK, which will point to the required CLI+Runner version. 1. If using a custom provisioned runner, use the base image at that version as detailed in [Distribution and Versioning]. 1. If using a pre-installed CLI, install the CLI at that version as detailed in [Versioning](#versioning). 1. Once the runner and/or CLI are setup, you are safe to upgrade your SDK to the newest version. ### Can I run the Dagger Engine as a "rootless" container? Not at this time. "Rootless mode" means running the Dagger Engine as a container without the `--privileged` flag. In this case, the container would not run as the "root" user of the system. Currently, the Dagger Engine cannot be run as a rootless container; network and filesystem constraints related to rootless usage would currently significantly limit its capabilities and performance. #### Filesystem constraints The Dagger Engine relies on the `overlayfs` snapshotter for efficient construction of container filesystems. However, only relatively recent Linux kernel versions fully support `overlayfs` inside of rootless user namespaces. On older kernels, there are fallback options such as [`fuse-overlayfs`](https://github.com/containers/fuse-overlayfs), but they come with their own complications in terms of degraded performance and host-specific setup. We've not yet invested in the significant work it would take to support+document running optimally on each kernel version, hence the limitation at this time. #### Network constraints Running the Dagger Engine in rootless mode constrains network management due to the fact that it's not possible for a rootless container to move a network device from the host network namespace to its own network namespace. It is possible to use userspace TCP/IP implementations such as [slirp](https://github.com/rootless-containers/slirp4netns) as a workaround, but they often significantly decrease network performance. This [comparison table of network drivers](https://github.com/rootless-containers/rootlesskit/blob/master/docs/network.md#network-drivers) shows that `slirp` is at least five times slower than a root-privileged network driver. Newer options for more performant userspace network stacks have arisen in recent years, but they are generally either reliant on relatively recent kernel versions or in a nascent stage that would require significant validation around robustness+security. ## Runner Details ### Distribution and Versioning The runner is distributed as a container image at `registry.dagger.io/engine`. - Tags are made for the version of each release. - For example, the [`v0.3.7` release](https://github.com/dagger/dagger/releases/tag/v0.3.7) has a corresponding image at `registry.dagger.io/engine:v0.3.7` ### Execution Requirements 1. The runner container currently needs root capabilities, including among others `CAP_SYS_ADMIN`, in order to execute pipelines. - For example, this will be granted when using the `--privileged` flag of `docker run`. - There is an issue for [supporting rootless execution](https://github.com/dagger/dagger/issues/1287). 1. The runner container should be given a volume at `/var/lib/dagger`. - Otherwise runner execution may be extremely slow. This is due to the fact that it relies on overlayfs mounts for efficient operation, which isn't possible when `/var/lib/dagger` is itself an overlayfs. - For example, this can be provided to a `docker run` command as `-v dagger-engine:/var/lib/dagger` 1. The container image comes with a default entrypoint which should be used to start the runner, no extra args are needed. 1. The container image comes with a default config file at `/etc/dagger/engine.toml` - The `insecure-entitlements = ["security.insecure"]` setting enables use of the `InsecureRootCapabilities` flag in `WithExec`. Removing that line will result in an error when trying to use that flag. ### Configuration Right now very few configuration knobs are suppported as we are still working out the best interface for exposing them. Currently supported is: #### Custom CA Certs If you need any extra CA certs to be included in order to, e.g. push images to a private registry, they can be included under `/etc/ssl/certs` in the runner image. This can be accomplished by building a custom engine image using ours as a base or by mounting them into a container created from our image at runtime. #### Disabling Privileged Execs By default, the Dagger engine allows execs to run with root capabilities when the `InsecureRootCapabilities` field is set to true in the `WithExec` API. This can be disabled by overriding the default engine config at `/etc/dagger/engine.toml` to remove the line `insecure-entitlements = ["security.insecure"]` #### Registry Mirrors If you want to use a registry mirror, you can append the configuration to `/etc/dagger/engine.toml` using this format: ```toml [registry."docker.io"] mirrors = ["mirror.gcr.io"] ``` You can repeat that for as many registries and mirrors you want, e.g. ```toml [registry."docker.io"] mirrors = ["mirror.a.com", "mirror.b.com"] [registry."some.other.registry.com"] mirrors = ["mirror.foo.com", "mirror.bar.com"] ``` ### Connection Interface After the runner starts up, the CLI needs to connect to it. In the default path, this will all happen automatically. However if the `_EXPERIMENTAL_DAGGER_RUNNER_HOST` env var is set, then the CLI will instead connect to the endpoint specified there. It currently accepts values in the following format: 1. `docker-container://<container name>` - Connect to the runner inside the given docker container. - Requires the docker CLI be present and usable. Will result in shelling out to `docker exec`. 1. `docker-image://<container image reference>` - Start the runner in docker using the provided container image, pulling it locally if needed - Requires the docker CLI be present and usable. 1. `podman-container://<container name>` - Connect to the runner inside the given podman container. 1. `kube-pod://<podname>?context=<context>&namespace=<namespace>&container=<container>` - Connect to the runner inside the given k8s pod. Query strings params like context and namespace are optional. 1. `unix://<path to unix socket>` - Connect to the runner over the provided unix socket. 1. `tcp://<addr:port>` - Connect to the runner over tcp to the provided addr+port. No encryption will be setup. > **Warning** > Dagger itself does not setup any encryption of data sent on this wire, so it relies on the underlying connection type to implement this when needed. If you are using a connection type that does not layer encryption then all queries and responses will be sent in plaintext over the wire from the CLI to the Runner. ## CLI Details ### Versioning The CLI is released in tandem with the runner and thus shares a version number with it. As of right now, each CLI version is expected to be used only with a runner image at the corresponding version. Backwards/forwards compatibility is not guaranteed yet. Instructions on installing the CLI, including at a particular version, can be found in [our docs](https://docs.dagger.io/cli/465058/install). # Appendix These sections have more technical and "under-the-hood" details. ## Dagger Session Interface (DSI) When an SDK calls `dagger.Connect`, there are two possible paths. ### DSI Basic This path requires that execution of the SDK code be wrapped with `dagger run`, e.g. `dagger run go run main.go` or `dagger run yarn build`. ```mermaid sequenceDiagram autonumber participant dagger run participant localhost participant SDK participant runner alt _EXPERIMENTAL_DAGGER_RUNNER_HOST is NOT set dagger run ->> runner : Start automatically via docker end dagger run ->> runner : Connect activate dagger run dagger run ->> localhost : Listen dagger run ->> SDK : Exec child process with<br>$DAGGER_SESSION_PORT<br>$DAGGER_SESSION_TOKEN loop SDK ->> localhost : GraphQL Query Request (HTTP GET) localhost ->> dagger run : GraphQL Query Request (HTTP GET) dagger run ->> runner : Pipeline Execution dagger run ->> localhost : GraphQL Query Response localhost ->> SDK : GraphQL Query Response end deactivate dagger run ``` (1-2) `dagger run` first checks to see if `_EXPERIMENTAL_DAGGER_RUNNER_HOST` is set. If not, the default path of provisioning a runner by shelling out to `docker` will kick in. Either way, a connection with the runner is established. (3) `dagger run` listens on localhost on a random free port and generates a random uuid to use as a session token - The session token is checked as an HTTP basic auth header to prevent others from connecting to the session over localhost (4) `dagger run` then execs the specified child process (e.g. `go run` or `yarn build`) with the randomly selected port and session token provided as environment variables: `DAGGER_SESSION_PORT` and `DAGGER_SESSION_TOKEN` (5-9) Any Dagger SDK can then send GraphQL HTTP requests to the localhost listener, including the session token as a basic auth header. This continues until the child process exits, at which time the session closes. ### DSI Advanced - Automatic Provisioning This path is followed when SDK code is executed directly, not wrapped with `dagger run`. The differences from DSI basic are: 1. The SDK is responsible for starting its own session. This requires it invoke the CLI as a subprocess (whereas with `dagger run` the relationship is inversed) 1. The CLI does not necessarily need to be pre-installed, the SDK will download a CLI binary at a compatible version (unless `_EXPERIMENTAL_DAGGER_CLI_BIN` is set). ```mermaid sequenceDiagram autonumber participant CLI distribution participant SDK participant localhost participant dagger session participant runner alt _EXPERIMENTAL_DAGGER_CLI_BIN is NOT set SDK ->> CLI distribution : https://dl.dagger.io/dagger/releases/<version>/checksums.txt CLI distribution ->> SDK : HTTP Response SDK ->> CLI distribution : https://dl.dagger.io/dagger/releases/<version>/<platform specific archive> CLI distribution ->> SDK : HTTP Response SDK ->> SDK : verify downloaded archive matches checksum SDK ->> dagger session : cache CLI bin in XDG_CACHE_HOME end SDK ->> dagger session : Fork/exec child process alt _EXPERIMENTAL_DAGGER_RUNNER_HOST is NOT set dagger session ->> runner : Start automatically via docker end dagger session ->> runner : Connect activate dagger session dagger session ->> localhost : Listen dagger session ->> SDK : Write JSON encoded port and token to stdout pipe loop SDK ->> localhost : GraphQL Query Request (HTTP GET) localhost ->> dagger session : GraphQL Query Request (HTTP GET) dagger session ->> runner : Pipeline Execution dagger session ->> localhost : GraphQL Query Response localhost ->> SDK : GraphQL Query Response end deactivate dagger session ``` (1) The SDK first checks to see if `_EXPERIMENTAL_DAGGER_CLI_BIN` is set. - If so, that'll be used as the CLI bin. - If not, then the SDK will check `$XDG_CACHE_HOME` for the CLI binary of the expected version. The expected version is a hardcoded string in the SDK source code. (2-5) If the CLI binary is not already cached, then checksums and the CLI archive will be downloaded. (6-7) If the checksum matches, then the archive is unpacked and the CLI binary will be cached with a name matching its version. (8) The SDK then execs the downloaded binary as a child process. It invokes a hidden subcommand, `dagger session`, which is only intended to be used by SDKs. (9-10) `dagger session` checks to see if `_EXPERIMENTAL_DAGGER_RUNNER_HOST` is set. If not, the default path of provisioning a runner by shelling out to `docker` will kick in. A connection with the runner is established. (11-12) `dagger session` listens on a random available port on localhost and generates a random uuid to use as a session token (same as described in the [previous section](#dsi-basic)). The port being listened on and the session token are serialized to JSON and then written to stdout, which is a pipe connected back to the SDK parent process. (13-17) The SDK then sends GraphQL HTTP requests to the localhost listener, including the session token as a basic auth header.
closed
dagger/dagger
https://github.com/dagger/dagger
5,055
🖐️ How do we specify registry mirrors?
### What happened? What did you expect to happen? Some people (e.g: #4217), including myself, are trying to use a private registry as a mirror for the Docker Hub registry. This, [according to the Buildkit documentation](https://docs.docker.com/build/buildkit/configure/) is achieved with the following `/etc/buildkit.toml` file: ```toml debug = true [registry."docker.io"] mirrors = ["mirror.gcr.io"] ``` How does one do that for Dagger? As an example, the following method should pull from `mirror.gcr.io/golang:latest`: ```golang func build(ctx context.Context) error { fmt.Println("Building with Dagger") // initialize Dagger client client, err := dagger.Connect(ctx, dagger.WithLogOutput(os.Stdout)) if err != nil { return err } defer client.Close() // get reference to the local project src := client.Host().Directory(".") // get `golang` image golang := client.Container().From("golang:latest") // mount cloned repository into `golang` image golang = golang.WithDirectory("/src", src).WithWorkdir("/src") // define the application build command path := "build/" golang = golang.WithExec([]string{"go", "build", "-o", path}) // get reference to build output directory in container output := golang.Directory(path) // write contents of container build/ directory to the host _, err = output.Export(ctx, path) if err != nil { return err } return nil } ``` Any tips?
https://github.com/dagger/dagger/issues/5055
https://github.com/dagger/dagger/pull/5828
33cdd129e5395e538df38aaca8a34baa38b90c5f
74e6393e816af380e410f7582e37de5c52ea02e8
"2023-04-28T16:28:41Z"
go
"2023-10-19T06:11:07Z"
docs/current/faq.md
--- slug: /faq --- import Tabs from "@theme/Tabs"; import TabItem from "@theme/TabItem"; # FAQ ## General ### What is the Dagger Platform? We're building the devops operating system, an integrated platform to orchestrate the delivery of applications to the cloud from start to finish. The Dagger Platform includes the Dagger Engine, Dagger Cloud, and the Dagger SDKs. Soon we will deliver the capability to publish and leverage prebuilt modules to further accelerate the adoption of Dagger across an organization’s pipelines. ### How do I install Dagger? Refer to the documentation for information on how to install the [Dagger CLI](./cli/465058-install.md) and the Dagger [Go](./sdk/go/371491-install.md), [Node.js](./sdk/nodejs/835948-install.md) and [Python](./sdk/python/866944-install.md) SDKs. ### How do I update Dagger? :::tip [Learn more about compatibility between the Dagger Engine, the Dagger CLI and Dagger SDKs](#what-compatibility-is-there-between-the-dagger-engine-dagger-sdks-and-dagger-cli-versions). ::: #### CLI To install a Dagger CLI that matches your OS & architecture, run the following next to the `bin` directory where `dagger` is currently installed, e.g. `/usr/local`: ```shell curl -L https://dl.dagger.io/dagger/install.sh | sh ``` The above will create `./bin/dagger`. If your user account doesn't have sufficient privileges to install in the specified location and `sudo` is available, use the following command instead: ```shell curl -L https://dl.dagger.io/dagger/install.sh | sudo sh ``` Homebrew users can alternatively use the following commands: ```shell brew update brew upgrade dagger ``` #### SDKs To update a Dagger SDK, follow the same procedure that you would follow to update any other SDK package in your chosen development environment. For example: - Go SDK ```shell go get -u dagger.io/dagger ``` - Node.js SDK <Tabs> <TabItem value="npm"> ```shell npm install @dagger.io/dagger@latest --save-dev ``` </TabItem> <TabItem value="yarn"> ```shell yarn upgrade --latest @dagger.io/dagger --dev ``` </TabItem> </Tabs> - Python SDK <Tabs> <TabItem value="PyPI"> ```shell pip install -U dagger-io ``` </TabItem> <TabItem value="Conda"> ```shell conda update dagger-io ``` </TabItem> </Tabs> ### What compatibility is there between the Dagger Engine, Dagger SDKs and Dagger CLI versions? - The Dagger CLI is released in tandem with the Dagger Engine and thus shares a version number with it. - Dagger SDKs automatically provision a Dagger Engine at a compatible version. Each release notes the compatible Dagger Engine version in its release notes. If running from the CLI, or providing a CLI for the SDK to use via the `_EXPERIMENTAL_DAGGER_CLI_BIN` variable, check the release notes of the SDK, which indicate the required CLI and Engine versions. The image below shows an example of the compatibility information available in the release notes: ![Release information](/img/current/faq/release-notes.png) ### How do I uninstall Dagger? Follow these steps: 1. To uninstall a Dagger SDK, follow the same procedure that you would follow to uninstall any other SDK package in your chosen development environment. 1. Remove the Dagger CLI using the following command: ```shell sudo rm /usr/local/bin/dagger ``` Homebrew users can alternatively use the following command: ```shell brew uninstall dagger ``` 1. Remove the Dagger container using the following commands: ```shell docker rm --force --volumes "$(docker ps --quiet --filter='name=^dagger-engine-')" ``` 1. Remove the `dagger` sub-directory of your local cache and configuration directories (`$XDG_CACHE_HOME` and `$XDG_CONFIG_HOME` on Linux or the equivalent for other platforms): <Tabs> <TabItem value="macOS"> ```shell rm -rf ~/Library/Caches/dagger rm -rf ~/Library/Application\ Support/dagger ``` </TabItem> <TabItem value="Linux"> ```shell rm -rf ~/.cache/dagger rm -rf ~/.config/dagger ``` </TabItem> </Tabs> :::note The paths listed above are defaults and may require adjustment for your specific environment. The third-party packages Dagger uses to determine these paths are listed below: - Go (SDK and CLI): [https://github.com/adrg/xdg](https://github.com/adrg/xdg) - Node.js: [https://github.com/sindresorhus/env-paths](https://github.com/sindresorhus/env-paths) - Python: [https://github.com/platformdirs/platformdirs](https://github.com/platformdirs/platformdirs) ::: ### What are Dagger's caching features? Dagger is able to cache: - Operations, such as copying files or directories to a container, running tests, compiling code, etc. - Volumes, such as data caches or package manager caches Operations are automatically cached every time a Dagger pipeline runs. [Cache volumes](./quickstart/635927-caching.mdx) must be explicity defined and used in your Dagger pipeline code. ### Can I run the Dagger Engine as a "rootless" container? No. "Rootless mode" means running the Dagger Engine as a container without the `--privileged` flag. In this case, the container would not run as the "root" user of the system. Currently, the Dagger Engine cannot be run as a rootless container; network and filesystem constraints related to rootless usage would significantly limit its capabilities and performance. [Read more about these constraints](https://github.com/dagger/dagger/blob/main/core/docs/d7yxc-operator_manual.md). ### I am stuck. How can I get help? Join us on [Discord](https://discord.com/invite/dagger-io), and ask your question in our [help forum](https://discord.com/channels/707636530424053791/1030538312508776540). Our team will be happy to help you there! ## Dagger Cloud ### What is Dagger Cloud? Dagger Cloud complements the Dagger Engine with a production-grade control plane. Features of Dagger Cloud include pipeline visualization, operational insights, and distributed caching. ### Is Dagger Cloud a hosting service for Dagger Engines? No, Dagger Cloud is a “bring your own compute” service. The Dagger Engine can run on a wide variety of machines, including most development and CI platforms. If the Dagger Engine can run on it, then Dagger Cloud supports it. ### Which CI providers does Dagger Cloud work with? Because the Dagger Engine can integrate seamlessly with practically any CI, there is no limit to the type and number of CI providers that Dagger Cloud can work with to provide Dagger pipeline visualization, operational insights, and distributed caching. Users report successfully leveraging Dagger with: GitLab, CircleCI, GitHub Actions, Jenkins,Tekton and many more. ### What is pipeline visualization? Dagger Cloud provides a web interface to visualize each step of your pipeline, drill down to detailed logs, understand how long operations took to run, and whether operations were cached. ### What operational insights does Dagger Cloud provide? Dagger Cloud collects telemetry from all your organization’s Dagger Engines, whether they run in development or CI, and presents it all to you in one place. This gives you a unique view on all pipelines, both pre-push and post-push. ### What is distributed caching? One of Dagger’s superpowers is that it caches everything. On a single machine (like a laptop or long-running server), caching "just works", because the same Dagger Engine writing to the cache is also reading from it. But in a multi-machine configuration (like an elastic CI cluster), things get more complicated because all machines are continuously producing and consuming large amounts of cache data. How do we get the right cache data to the right machine at the right time, without wasting compute, networking, or storage resources? This is a complex problem which requires a distributed caching service, to orchestrate the movement of data between all machines in the cluster, and a centralized storage service. Because Dagger Cloud receives telemetry from all Dagger Engines, it can model the state of the cluster and make optimal caching decisions. The more telemetry data it receives, the smarter it becomes. ### Does distributed caching support ephemeral CI runners? Yes. Ephemeral runners, by definition, lack caching; the runner’s local storage is purged when the runner is spun down. However, when your CI is connected to Dagger Cloud, these ephemeral runners gain all the benefits of a persistent shared cache. ### Does Dagger Cloud store my cache data? Yes. For distributed caching to work, it requires two components: a centralized storage service and an orchestrator. Dagger Cloud provides both, in one integrated package. ### Where does Dagger Cloud store my cache data? Dagger Cloud features a global data storage service spanning 26 regions across 3 cloud providers: AWS, Google Cloud Platform, and Cloudflare R2. The region closest to your compute is automatically selected. ### Does Dagger Cloud support “bring your own storage” for distributed caching? The ability to "bring your own storage" is coming soon. Please reach out to us if this capability is needed for your organization. ### How do I connect my pipelines to Dagger Cloud? Refer to our [getting started guide](./cloud/572923-get-started.md) for detailed information on connecting Dagger Cloud with your CI provider or CI tool. ## Dagger SDKs ### What language SDKs are available for Dagger? We currently offer a [Go SDK](/sdk/go), a [Node.js SDK](/sdk/nodejs) and a [Python SDK](/sdk/python). Waiting for your favorite language to be supported? [Let us know which one](https://airtable.com/shrzABOn1wCk5yBF4), and we'll notify you when it's ready. ### How do I log in to a container registry using a Dagger SDK? There are two options available: 1. Use the [`Container.withRegistryAuth()`](https://docs.dagger.io/api/reference/#Container-withRegistryAuth) GraphQL API method. A native equivalent of this method is available in each Dagger SDK ([example](./guides/723462-use-secrets.md#use-secrets-with-dagger-sdk-methods)). 1. Dagger SDKs can use your existing Docker credentials without requiring separate authentication. Simply execute `docker login` against your container registry on the host where your Dagger pipelines are running. ## Dagger API ### What API query language does Dagger use? Dagger uses GraphQL as its low-level language-agnostic API query language. ### Do I need to know GraphQL to use Dagger? No. You only need to know one of Dagger's supported SDKs languages to use Dagger. The translation to underlying GraphQL API calls is handled internally by the Dagger SDK of your choice. ### There's no SDK for &lt;language&gt; yet. Can I still use Dagger? Yes. It's possible to use the Dagger GraphQL API from any language that [supports GraphQL](https://graphql.org/code/) ([example](./api/254103-build-custom-client.md)) or from the [Dagger CLI](./cli/index.md).
closed
dagger/dagger
https://github.com/dagger/dagger
5,911
POST http://dagger/query rpc error
Every Dagger run has something like: ``` [0.08s] Failed to connect; retrying... name:"error" value:"make request: Post \"http://dagger/query\": rpc error: code = Unknown desc = server \"wu4a6pa0asl96zq39iaijneaq\" not found" ``` It seems like it can be safely ignored, but the error message is concerning.
https://github.com/dagger/dagger/issues/5911
https://github.com/dagger/dagger/pull/5918
70609dd344b7703de9ea52e2162ea574358e3fda
572bd3de9340dea4121627163f4f7b58c818beb4
"2023-10-18T17:09:08Z"
go
"2023-10-19T17:12:45Z"
engine/client/client.go
package client import ( "context" "encoding/base64" "encoding/json" "errors" "fmt" "io" "net" "net/http" "net/http/httptest" "net/url" "os" "path/filepath" "strconv" "strings" "sync" "time" "dagger.io/dagger" "github.com/Khan/genqlient/graphql" "github.com/cenkalti/backoff/v4" "github.com/docker/cli/cli/config" "github.com/google/uuid" controlapi "github.com/moby/buildkit/api/services/control" bkclient "github.com/moby/buildkit/client" "github.com/moby/buildkit/identity" bksession "github.com/moby/buildkit/session" "github.com/moby/buildkit/session/auth/authprovider" "github.com/moby/buildkit/session/filesync" "github.com/moby/buildkit/session/grpchijack" "github.com/opencontainers/go-digest" "github.com/tonistiigi/fsutil" fstypes "github.com/tonistiigi/fsutil/types" "github.com/vito/progrock" "golang.org/x/sync/errgroup" "google.golang.org/grpc" "github.com/dagger/dagger/core/pipeline" "github.com/dagger/dagger/engine" "github.com/dagger/dagger/engine/session" "github.com/dagger/dagger/telemetry" ) type Params struct { // The id of the server to connect to, or if blank a new one // should be started. ServerID string // Parent client IDs of this Dagger client. // // Used by Dagger-in-Dagger so that nested sessions can resolve addresses // passed from the parent. ParentClientIDs []string SecretToken string RunnerHost string // host of dagger engine runner serving buildkit apis UserAgent string DisableHostRW bool JournalFile string ProgrockWriter progrock.Writer EngineNameCallback func(string) CloudURLCallback func(string) // TODO: doc if this stays in ModuleDigest digest.Digest FunctionContextDigest digest.Digest } type Client struct { Params eg *errgroup.Group internalCtx context.Context internalCancel context.CancelFunc closeCtx context.Context closeRequests context.CancelFunc closeMu sync.RWMutex Recorder *progrock.Recorder httpClient *http.Client bkClient *bkclient.Client bkSession *bksession.Session // A client for the dagger API that is directly hooked up to this engine client. // Currently used for the dagger CLI so it can avoid making a subprocess of itself... daggerClient *dagger.Client upstreamCacheImportOptions []*controlapi.CacheOptionsEntry upstreamCacheExportOptions []*controlapi.CacheOptionsEntry hostname string nestedSessionPort int labels []pipeline.Label } func Connect(ctx context.Context, params Params) (_ *Client, _ context.Context, rerr error) { c := &Client{Params: params} if c.SecretToken == "" { c.SecretToken = uuid.New().String() } if c.ServerID == "" { c.ServerID = identity.NewID() } c.internalCtx, c.internalCancel = context.WithCancel(context.Background()) c.eg, c.internalCtx = errgroup.WithContext(c.internalCtx) defer func() { if rerr != nil { c.internalCancel() } }() c.closeCtx, c.closeRequests = context.WithCancel(context.Background()) // progress progMultiW := progrock.MultiWriter{} if c.ProgrockWriter != nil { progMultiW = append(progMultiW, c.ProgrockWriter) } if c.JournalFile != "" { fw, err := newProgrockFileWriter(c.JournalFile) if err != nil { return nil, nil, err } progMultiW = append(progMultiW, fw) } tel := telemetry.New() var cloudURL string if tel.Enabled() { cloudURL = tel.URL() progMultiW = append(progMultiW, telemetry.NewWriter(tel)) } c.Recorder = progrock.NewRecorder(progMultiW) ctx = progrock.ToContext(ctx, c.Recorder) nestedSessionPortVal, isNestedSession := os.LookupEnv("DAGGER_SESSION_PORT") if isNestedSession { nestedSessionPort, err := strconv.Atoi(nestedSessionPortVal) if err != nil { return nil, nil, fmt.Errorf("parse DAGGER_SESSION_PORT: %w", err) } c.nestedSessionPort = nestedSessionPort c.SecretToken = os.Getenv("DAGGER_SESSION_TOKEN") c.httpClient = &http.Client{ Transport: &http.Transport{ DialContext: c.DialContext, DisableKeepAlives: true, }, } if err := c.daggerConnect(ctx); err != nil { return nil, nil, fmt.Errorf("failed to connect to dagger: %w", err) } return c, ctx, nil } initGroup := progrock.FromContext(ctx).WithGroup("init", progrock.Weak()) loader := initGroup.Vertex("starting-engine", "connect") defer func() { loader.Done(rerr) }() // Check if any of the upstream cache importers/exporters are enabled. // Note that this is not the cache service support in engine/cache/, that // is a different feature which is configured in the engine daemon. var err error c.upstreamCacheImportOptions, c.upstreamCacheExportOptions, err = allCacheConfigsFromEnv() if err != nil { return nil, nil, fmt.Errorf("cache config from env: %w", err) } remote, err := url.Parse(c.RunnerHost) if err != nil { return nil, nil, fmt.Errorf("parse runner host: %w", err) } engineTask := loader.Task("starting engine") bkClient, bkInfo, err := newBuildkitClient(ctx, remote, c.UserAgent, loader) engineTask.Done(err) if err != nil { return nil, nil, fmt.Errorf("new client: %w", err) } c.bkClient = bkClient defer func() { if rerr != nil { c.bkClient.Close() } }() if c.EngineNameCallback != nil { engineName := fmt.Sprintf("%s (version %s)", bkInfo.BuildkitVersion.Revision, bkInfo.BuildkitVersion.Version) c.EngineNameCallback(engineName) } hostname, err := os.Hostname() if err != nil { return nil, nil, fmt.Errorf("get hostname: %w", err) } c.hostname = hostname sessionTask := loader.Task("starting session") sharedKey := c.ServerID // share a session across servers bkSession, err := bksession.NewSession(ctx, identity.NewID(), sharedKey) if err != nil { return nil, nil, fmt.Errorf("new s: %w", err) } c.bkSession = bkSession defer func() { if rerr != nil { c.bkSession.Close() } }() workdir, err := os.Getwd() if err != nil { return nil, nil, fmt.Errorf("get workdir: %w", err) } c.labels = pipeline.LoadVCSLabels(workdir) c.labels = append(c.labels, pipeline.LoadClientLabels(engine.Version)...) c.internalCtx = engine.ContextWithClientMetadata(c.internalCtx, &engine.ClientMetadata{ ClientID: c.ID(), ClientSecretToken: c.SecretToken, ServerID: c.ServerID, ClientHostname: c.hostname, Labels: c.labels, ParentClientIDs: c.ParentClientIDs, ModuleDigest: c.ModuleDigest, FunctionContextDigest: c.FunctionContextDigest, }) // progress bkSession.Allow(progRockAttachable{progMultiW}) // filesync if !c.DisableHostRW { bkSession.Allow(AnyDirSource{}) bkSession.Allow(AnyDirTarget{}) } // sockets bkSession.Allow(SocketProvider{ EnableHostNetworkAccess: !c.DisableHostRW, }) // registry auth bkSession.Allow(authprovider.NewDockerAuthProvider(config.LoadDefaultConfigFile(os.Stderr), nil)) // host=>container networking c.Recorder = progrock.NewRecorder(progMultiW) bkSession.Allow(session.NewTunnelListenerAttachable(c.Recorder)) ctx = progrock.ToContext(ctx, c.Recorder) // connect to the server, registering our session attachables and starting the server if not // already started c.eg.Go(func() error { return bkSession.Run(c.internalCtx, func(ctx context.Context, proto string, meta map[string][]string) (net.Conn, error) { return grpchijack.Dialer(c.bkClient.ControlClient())(ctx, proto, engine.ClientMetadata{ RegisterClient: true, ClientID: c.ID(), ClientSecretToken: c.SecretToken, ServerID: c.ServerID, ParentClientIDs: c.ParentClientIDs, ClientHostname: hostname, UpstreamCacheImportConfig: c.upstreamCacheImportOptions, Labels: c.labels, ModuleDigest: c.ModuleDigest, FunctionContextDigest: c.FunctionContextDigest, }.AppendToMD(meta)) }) }) // Try connecting to the session server to make sure it's running c.httpClient = &http.Client{Transport: &http.Transport{ DialContext: c.DialContext, // connection re-use in combination with the underlying grpc stream makes // managing the lifetime of connections very confusing, so disabling for now // TODO: For performance, it would be better to figure out a way to re-enable this DisableKeepAlives: true, }} bo := backoff.NewExponentialBackOff() bo.InitialInterval = 100 * time.Millisecond connectRetryCtx, connectRetryCancel := context.WithTimeout(ctx, 300*time.Second) defer connectRetryCancel() err = backoff.Retry(func() error { ctx, cancel := context.WithTimeout(connectRetryCtx, bo.NextBackOff()) defer cancel() innerErr := c.Do(ctx, `{defaultPlatform}`, "", nil, nil) if innerErr != nil { fmt.Fprintln(loader.Stdout(), "Failed to connect; retrying...", progrock.ErrorLabel(innerErr)) } else { fmt.Fprintln(loader.Stdout(), "OK!") } return innerErr }, backoff.WithContext(bo, connectRetryCtx)) sessionTask.Done(err) if err != nil { return nil, nil, fmt.Errorf("connect: %w", err) } if c.CloudURLCallback != nil && cloudURL != "" { c.CloudURLCallback(cloudURL) } if err := c.daggerConnect(ctx); err != nil { return nil, nil, fmt.Errorf("failed to connect to dagger: %w", err) } return c, ctx, nil } func (c *Client) daggerConnect(ctx context.Context) error { var err error c.daggerClient, err = dagger.Connect(context.Background(), dagger.WithConn(EngineConn(c)), dagger.WithSkipCompatibilityCheck()) return err } func (c *Client) Close() (rerr error) { // shutdown happens outside of c.closeMu, since it requires a connection if err := c.shutdownServer(); err != nil { rerr = errors.Join(rerr, fmt.Errorf("shutdown: %w", err)) } c.closeMu.Lock() defer c.closeMu.Unlock() select { case <-c.closeCtx.Done(): // already closed return nil default: } if len(c.upstreamCacheExportOptions) > 0 { cacheExportCtx, cacheExportCancel := context.WithTimeout(c.internalCtx, 600*time.Second) defer cacheExportCancel() _, err := c.bkClient.ControlClient().Solve(cacheExportCtx, &controlapi.SolveRequest{ Cache: controlapi.CacheOptions{ Exports: c.upstreamCacheExportOptions, }, }) rerr = errors.Join(rerr, err) } c.closeRequests() if c.internalCancel != nil { c.internalCancel() } if c.daggerClient != nil { c.eg.Go(c.daggerClient.Close) } if c.httpClient != nil { c.eg.Go(func() error { c.httpClient.CloseIdleConnections() return nil }) } if c.bkSession != nil { c.eg.Go(c.bkSession.Close) } if c.bkClient != nil { c.eg.Go(c.bkClient.Close) } if err := c.eg.Wait(); err != nil { rerr = errors.Join(rerr, err) } // mark all groups completed // close the recorder so the UI exits if c.Recorder != nil { c.Recorder.Complete() c.Recorder.Close() } return rerr } func (c *Client) shutdownServer() error { ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) defer cancel() req, err := http.NewRequestWithContext(ctx, "POST", "http://dagger/shutdown", nil) if err != nil { return fmt.Errorf("new request: %w", err) } req.SetBasicAuth(c.SecretToken, "") resp, err := c.httpClient.Do(req) if err != nil { return fmt.Errorf("do shutdown: %w", err) } return resp.Body.Close() } func (c *Client) withClientCloseCancel(ctx context.Context) (context.Context, context.CancelFunc, error) { c.closeMu.RLock() defer c.closeMu.RUnlock() select { case <-c.closeCtx.Done(): return nil, nil, errors.New("client closed") default: } ctx, cancel := context.WithCancel(ctx) go func() { select { case <-c.closeCtx.Done(): cancel() case <-ctx.Done(): } }() return ctx, cancel, nil } func (c *Client) ID() string { return c.bkSession.ID() } func (c *Client) DialContext(ctx context.Context, _, _ string) (conn net.Conn, err error) { // NOTE: the context given to grpchijack.Dialer is for the lifetime of the stream. // If http connection re-use is enabled, that can be far past this DialContext call. ctx, cancel, err := c.withClientCloseCancel(ctx) if err != nil { return nil, err } isNestedSession := c.nestedSessionPort != 0 if isNestedSession { conn, err = (&net.Dialer{ Cancel: ctx.Done(), KeepAlive: -1, // disable for now }).Dial("tcp", "127.0.0.1:"+strconv.Itoa(c.nestedSessionPort)) } else { conn, err = grpchijack.Dialer(c.bkClient.ControlClient())(ctx, "", engine.ClientMetadata{ ClientID: c.ID(), ClientSecretToken: c.SecretToken, ServerID: c.ServerID, ClientHostname: c.hostname, ParentClientIDs: c.ParentClientIDs, Labels: c.labels, ModuleDigest: c.ModuleDigest, FunctionContextDigest: c.FunctionContextDigest, }.ToGRPCMD()) } if err != nil { return nil, err } go func() { <-c.closeCtx.Done() cancel() conn.Close() }() return conn, nil } func (c *Client) Do( ctx context.Context, query string, opName string, variables map[string]any, data any, ) (rerr error) { ctx, cancel, err := c.withClientCloseCancel(ctx) if err != nil { return err } defer cancel() gqlClient := graphql.NewClient("http://dagger/query", doerWithHeaders{ inner: c.httpClient, headers: http.Header{ "Authorization": []string{"Basic " + base64.StdEncoding.EncodeToString([]byte(c.SecretToken+":"))}, }, }) req := &graphql.Request{ Query: query, Variables: variables, OpName: opName, } resp := &graphql.Response{} err = gqlClient.MakeRequest(ctx, req, resp) if err != nil { return fmt.Errorf("make request: %w", err) } if resp.Errors != nil { errs := make([]error, len(resp.Errors)) for i, err := range resp.Errors { errs[i] = err } return errors.Join(errs...) } if data != nil { dataBytes, err := json.Marshal(resp.Data) if err != nil { return fmt.Errorf("marshal data: %w", err) } err = json.Unmarshal(dataBytes, data) if err != nil { return fmt.Errorf("unmarshal data: %w", err) } } return nil } func (c *Client) ServeHTTP(w http.ResponseWriter, r *http.Request) { ctx, cancel, err := c.withClientCloseCancel(r.Context()) if err != nil { w.WriteHeader(http.StatusBadGateway) w.Write([]byte("client has closed: " + err.Error())) return } r = r.WithContext(ctx) defer cancel() if c.SecretToken != "" { username, _, ok := r.BasicAuth() if !ok || username != c.SecretToken { w.Header().Set("WWW-Authenticate", `Basic realm="Access to the Dagger engine session"`) w.WriteHeader(http.StatusUnauthorized) return } } proxyReq := &http.Request{ Method: r.Method, URL: &url.URL{ Scheme: "http", Host: "dagger", Path: r.URL.Path, }, Header: r.Header, Body: r.Body, } proxyReq = proxyReq.WithContext(ctx) resp, err := c.httpClient.Do(proxyReq) if err != nil { w.WriteHeader(http.StatusBadGateway) w.Write([]byte("http do: " + err.Error())) return } defer resp.Body.Close() for k, v := range resp.Header { w.Header()[k] = v } w.WriteHeader(resp.StatusCode) _, err = io.Copy(w, resp.Body) if err != nil { panic(err) // don't write header because we already wrote to the body, which isn't allowed } } // A client to the Dagger API hooked up directly with this engine client. func (c *Client) Dagger() *dagger.Client { return c.daggerClient } // Local dir imports type AnyDirSource struct{} func (s AnyDirSource) Register(server *grpc.Server) { filesync.RegisterFileSyncServer(server, s) } func (s AnyDirSource) TarStream(stream filesync.FileSync_TarStreamServer) error { return fmt.Errorf("tarstream not supported") } func (s AnyDirSource) DiffCopy(stream filesync.FileSync_DiffCopyServer) error { opts, err := engine.LocalImportOptsFromContext(stream.Context()) if err != nil { return fmt.Errorf("get local import opts: %w", err) } if opts.ReadSingleFileOnly { // just stream the file bytes to the caller fileContents, err := os.ReadFile(opts.Path) if err != nil { return fmt.Errorf("read file: %w", err) } if len(fileContents) > int(opts.MaxFileSize) { // NOTE: can lift this size restriction by chunking if ever needed return fmt.Errorf("file contents too large: %d > %d", len(fileContents), opts.MaxFileSize) } return stream.SendMsg(&filesync.BytesMessage{Data: fileContents}) } // otherwise, do the whole directory sync back to the caller return fsutil.Send(stream.Context(), stream, fsutil.NewFS(opts.Path, &fsutil.WalkOpt{ IncludePatterns: opts.IncludePatterns, ExcludePatterns: opts.ExcludePatterns, FollowPaths: opts.FollowPaths, Map: func(p string, st *fstypes.Stat) fsutil.MapResult { st.Uid = 0 st.Gid = 0 return fsutil.MapResultKeep }, }), nil) } // Local dir exports type AnyDirTarget struct{} func (t AnyDirTarget) Register(server *grpc.Server) { filesync.RegisterFileSendServer(server, t) } func (AnyDirTarget) DiffCopy(stream filesync.FileSend_DiffCopyServer) (rerr error) { opts, err := engine.LocalExportOptsFromContext(stream.Context()) if err != nil { return fmt.Errorf("get local export opts: %w", err) } if !opts.IsFileStream { // we're writing a full directory tree, normal fsutil.Receive is good if err := os.MkdirAll(opts.Path, 0o700); err != nil { return fmt.Errorf("failed to create synctarget dest dir %s: %w", opts.Path, err) } err := fsutil.Receive(stream.Context(), stream, opts.Path, fsutil.ReceiveOpt{ Merge: true, Filter: func(path string, stat *fstypes.Stat) bool { stat.Uid = uint32(os.Getuid()) stat.Gid = uint32(os.Getgid()) return true }, }) if err != nil { return fmt.Errorf("failed to receive fs changes: %w", err) } return nil } // This is either a file export or a container tarball export, we'll just be receiving BytesMessages with // the contents and can write them directly to the destination path. // If the dest is a directory that already exists, we will never delete it and replace it with the file. // However, if allowParentDirPath is set, we will write the file underneath that existing directory. // But if allowParentDirPath is not set, which is the default setting in our API right now, we will return // an error when path is a pre-existing directory. allowParentDirPath := opts.AllowParentDirPath // File exports specifically (as opposed to container tar exports) have an original filename that we will // use in the case where dest is a directory and allowParentDirPath is set, in which case we need to know // what to name the file underneath the pre-existing directory. fileOriginalName := opts.FileOriginalName var destParentDir string var finalDestPath string stat, err := os.Lstat(opts.Path) switch { case errors.Is(err, os.ErrNotExist): // we are writing the file to a new path destParentDir = filepath.Dir(opts.Path) finalDestPath = opts.Path case err != nil: // something went unrecoverably wrong if stat failed and it wasn't just because the path didn't exist return fmt.Errorf("failed to stat synctarget dest %s: %w", opts.Path, err) case !stat.IsDir(): // we are overwriting an existing file destParentDir = filepath.Dir(opts.Path) finalDestPath = opts.Path case !allowParentDirPath: // we are writing to an existing directory, but allowParentDirPath is not set, so fail return fmt.Errorf("destination %q is a directory; must be a file path unless allowParentDirPath is set", opts.Path) default: // we are writing to an existing directory, and allowParentDirPath is set, // so write the file under the directory using the same file name as the source file if fileOriginalName == "" { // NOTE: we could instead just default to some name like container.tar or something if desired return fmt.Errorf("cannot export container tar to existing directory %q", opts.Path) } destParentDir = opts.Path finalDestPath = filepath.Join(destParentDir, fileOriginalName) } if err := os.MkdirAll(destParentDir, 0o700); err != nil { return fmt.Errorf("failed to create synctarget dest dir %s: %w", destParentDir, err) } if opts.FileMode == 0 { opts.FileMode = 0o600 } destF, err := os.OpenFile(finalDestPath, os.O_CREATE|os.O_WRONLY|os.O_TRUNC, opts.FileMode) if err != nil { return fmt.Errorf("failed to create synctarget dest file %s: %w", finalDestPath, err) } defer destF.Close() for { msg := filesync.BytesMessage{} if err := stream.RecvMsg(&msg); err != nil { if errors.Is(err, io.EOF) { return nil } return err } if _, err := destF.Write(msg.Data); err != nil { return err } } } type progRockAttachable struct { writer progrock.Writer } func (a progRockAttachable) Register(srv *grpc.Server) { progrock.RegisterProgressServiceServer(srv, progrock.NewRPCReceiver(a.writer)) } const ( // cache configs that should be applied to be import and export cacheConfigEnvName = "_EXPERIMENTAL_DAGGER_CACHE_CONFIG" // cache configs for imports only cacheImportsConfigEnvName = "_EXPERIMENTAL_DAGGER_CACHE_IMPORT_CONFIG" // cache configs for exports only cacheExportsConfigEnvName = "_EXPERIMENTAL_DAGGER_CACHE_EXPORT_CONFIG" ) // env is in form k1=v1,k2=v2;k3=v3... with ';' used to separate multiple cache configs. // any value that itself needs ';' can use '\;' to escape it. func cacheConfigFromEnv(envName string) ([]*controlapi.CacheOptionsEntry, error) { envVal, ok := os.LookupEnv(envName) if !ok { return nil, nil } configKVs := strings.Split(envVal, ";") // handle '\;' as an escape in case ';' needs to be used in a cache config setting rather than as // a delimiter between multiple cache configs for i := len(configKVs) - 2; i >= 0; i-- { if strings.HasSuffix(configKVs[i], `\`) { configKVs[i] = configKVs[i][:len(configKVs[i])-1] + ";" + configKVs[i+1] configKVs = append(configKVs[:i+1], configKVs[i+2:]...) } } cacheConfigs := make([]*controlapi.CacheOptionsEntry, 0, len(configKVs)) for _, kvsStr := range configKVs { kvs := strings.Split(kvsStr, ",") if len(kvs) == 0 { continue } attrs := make(map[string]string) for _, kv := range kvs { parts := strings.SplitN(kv, "=", 2) if len(parts) != 2 { return nil, fmt.Errorf("invalid form for cache config %q", kv) } attrs[parts[0]] = parts[1] } typeVal, ok := attrs["type"] if !ok { return nil, fmt.Errorf("missing type in cache config: %q", envVal) } delete(attrs, "type") cacheConfigs = append(cacheConfigs, &controlapi.CacheOptionsEntry{ Type: typeVal, Attrs: attrs, }) } return cacheConfigs, nil } func allCacheConfigsFromEnv() (cacheImportConfigs []*controlapi.CacheOptionsEntry, cacheExportConfigs []*controlapi.CacheOptionsEntry, rerr error) { // cache import only configs cacheImportConfigs, err := cacheConfigFromEnv(cacheImportsConfigEnvName) if err != nil { return nil, nil, fmt.Errorf("cache import config from env: %w", err) } // cache export only configs cacheExportConfigs, err = cacheConfigFromEnv(cacheExportsConfigEnvName) if err != nil { return nil, nil, fmt.Errorf("cache export config from env: %w", err) } // this env sets configs for both imports and exports cacheConfigs, err := cacheConfigFromEnv(cacheConfigEnvName) if err != nil { return nil, nil, fmt.Errorf("cache config from env: %w", err) } for _, cfg := range cacheConfigs { cacheImportConfigs = append(cacheImportConfigs, cfg) cacheExportConfigs = append(cacheExportConfigs, cfg) } return cacheImportConfigs, cacheExportConfigs, nil } type doerWithHeaders struct { inner graphql.Doer headers http.Header } func (d doerWithHeaders) Do(req *http.Request) (*http.Response, error) { for k, v := range d.headers { req.Header[k] = v } return d.inner.Do(req) } func EngineConn(engineClient *Client) DirectConn { return func(req *http.Request) (*http.Response, error) { req.SetBasicAuth(engineClient.SecretToken, "") resp := httptest.NewRecorder() engineClient.ServeHTTP(resp, req) return resp.Result(), nil } } type DirectConn func(*http.Request) (*http.Response, error) func (f DirectConn) Do(r *http.Request) (*http.Response, error) { return f(r) } func (f DirectConn) Host() string { return ":mem:" } func (f DirectConn) Close() error { return nil }
closed
dagger/dagger
https://github.com/dagger/dagger
5,930
🐞 Can't hide secrets in Git Clones
### What is the issue? Discord here -> https://discord.com/channels/707636530424053791/1164639553865383947 I must use HTTPS / GH Token, can't use SSH for git clones. There is no way for me to hide credentials that are in the git https url. The below snippet will print my `please-dont-print` password all over the place :( ```golang package main import ( "context" "os" "dagger.io/dagger" log "github.com/sirupsen/logrus" ) func main() { var err error ctx := context.Background() c, err := dagger.Connect(ctx, dagger.WithLogOutput(os.Stdout), dagger.WithLogOutput(os.Stderr)) if err != nil { log.Error(err) } gitUrlRaw := "https://username:please-dont-print@github.com/dagger/dagger" c.SetSecret("ghApiToken", gitUrlRaw) src := c.Git(gitUrlRaw, dagger.GitOpts{KeepGitDir: true}). Branch("main"). Tree() c.Container().WithMountedDirectory("/src", src).WithExec([]string{"ls", "-la", "/src"}).Stdout(ctx) } ``` ### Log output ``` ➜ dagger-debug dagger run go run . ┣─╮ │ ▽ init │ █ [1.49s] connect │ ┣ [1.16s] starting engine │ ┣ [0.20s] starting session │ ┻ █ [2.64s] go run . █ [0.72s] git://stobias123:please-dont-print@github.com/dagger/dagger#main ┃ 94c8f92d7dd99616e4c6db05e5d0e4cd94ab13d6 refs/heads/main █ [0.22s] ERROR exec ls -la /src ``` ### Steps to reproduce run above snippet ### SDK version 0.8.7 ### OS version osx
https://github.com/dagger/dagger/issues/5930
https://github.com/dagger/dagger/pull/5951
752f324037801df10c9598c50eee0577d22a7f24
69bd45f6f777c6e8a949176e2d6014fd6388b812
"2023-10-19T20:20:00Z"
go
"2023-10-24T09:59:36Z"
core/secret.go
package core import ( "context" "errors" "sync" "github.com/dagger/dagger/core/resourceid" "github.com/dagger/dagger/engine/buildkit" "github.com/moby/buildkit/session/secrets" "github.com/opencontainers/go-digest" ) // Secret is a content-addressed secret. type Secret struct { // Name specifies the arbitrary name/id of the secret. Name string `json:"name,omitempty"` } func NewDynamicSecret(name string) *Secret { return &Secret{ Name: name, } } func (secret *Secret) Clone() *Secret { cp := *secret return &cp } func (secret *Secret) ID() (SecretID, error) { return resourceid.Encode(secret) } func (secret *Secret) Digest() (digest.Digest, error) { return stableDigest(secret) } // ErrNotFound indicates a secret can not be found. var ErrNotFound = errors.New("secret not found") func NewSecretStore() *SecretStore { return &SecretStore{ secrets: map[string][]byte{}, } } var _ secrets.SecretStore = &SecretStore{} type SecretStore struct { mu sync.Mutex secrets map[string][]byte bk *buildkit.Client } func (store *SecretStore) SetBuildkitClient(bk *buildkit.Client) { store.bk = bk } // AddSecret adds the secret identified by user defined name with its plaintext // value to the secret store. func (store *SecretStore) AddSecret(_ context.Context, name string, plaintext []byte) (SecretID, error) { store.mu.Lock() defer store.mu.Unlock() secret := NewDynamicSecret(name) // add the plaintext to the map store.secrets[secret.Name] = plaintext return secret.ID() } // GetSecret returns the plaintext secret value. // // Its argument may either be the user defined name originally specified within // a SecretID, or a full SecretID value. // // A user defined name will be received when secrets are used in a Dockerfile // build. // // In all other cases, a SecretID is expected. func (store *SecretStore) GetSecret(ctx context.Context, idOrName string) ([]byte, error) { store.mu.Lock() defer store.mu.Unlock() var name string if secret, err := SecretID(idOrName).Decode(); err == nil { name = secret.Name } else { name = idOrName } plaintext, ok := store.secrets[name] if !ok { return nil, ErrNotFound } return plaintext, nil }
closed
dagger/dagger
https://github.com/dagger/dagger
5,930
🐞 Can't hide secrets in Git Clones
### What is the issue? Discord here -> https://discord.com/channels/707636530424053791/1164639553865383947 I must use HTTPS / GH Token, can't use SSH for git clones. There is no way for me to hide credentials that are in the git https url. The below snippet will print my `please-dont-print` password all over the place :( ```golang package main import ( "context" "os" "dagger.io/dagger" log "github.com/sirupsen/logrus" ) func main() { var err error ctx := context.Background() c, err := dagger.Connect(ctx, dagger.WithLogOutput(os.Stdout), dagger.WithLogOutput(os.Stderr)) if err != nil { log.Error(err) } gitUrlRaw := "https://username:please-dont-print@github.com/dagger/dagger" c.SetSecret("ghApiToken", gitUrlRaw) src := c.Git(gitUrlRaw, dagger.GitOpts{KeepGitDir: true}). Branch("main"). Tree() c.Container().WithMountedDirectory("/src", src).WithExec([]string{"ls", "-la", "/src"}).Stdout(ctx) } ``` ### Log output ``` ➜ dagger-debug dagger run go run . ┣─╮ │ ▽ init │ █ [1.49s] connect │ ┣ [1.16s] starting engine │ ┣ [0.20s] starting session │ ┻ █ [2.64s] go run . █ [0.72s] git://stobias123:please-dont-print@github.com/dagger/dagger#main ┃ 94c8f92d7dd99616e4c6db05e5d0e4cd94ab13d6 refs/heads/main █ [0.22s] ERROR exec ls -la /src ``` ### Steps to reproduce run above snippet ### SDK version 0.8.7 ### OS version osx
https://github.com/dagger/dagger/issues/5930
https://github.com/dagger/dagger/pull/5951
752f324037801df10c9598c50eee0577d22a7f24
69bd45f6f777c6e8a949176e2d6014fd6388b812
"2023-10-19T20:20:00Z"
go
"2023-10-24T09:59:36Z"
core/secret_test.go
closed
dagger/dagger
https://github.com/dagger/dagger
5,953
🐞 `dagger call -m <git-module>` fails if remote module contains dependencies with local path
### What is the issue? When we call a module with local dependency using `git-ref`, cli isn't able to find dependencies. `dagger.json` for following error log https://github.com/aweris/gale/blob/0fcf43c126b03fc4296f05970328aaca085c18af/daggerverse/gale/dagger.json#L1-L9 ### Log output ```shell dagger call --mod github.com/aweris/gale/daggerverse/gale@0fcf43c126b03fc4296f05970328aaca085c18af ✘ build "dagger call" ERROR [4.15s] ├ [4.15s] loading module ✘ asModule ERROR [0.00s] • Engine: 61b34bf9d33e (version v0.9.0) ⧗ 5.44s ✔ 27 ✘ 2 Error: failed to get loaded module ID: input:1: git.commit.tree.directory.asModule failed to create module from config `.::`: failed to get config file: lstat dagger.json: no such file or directory ``` ### Steps to reproduce - create a module with has a dependency on the local path. - push module to repository - make a `dagger call -m <git-ref>` ### SDK version Dagger CLI v0.9.0 ### OS version macOS 14.0
https://github.com/dagger/dagger/issues/5953
https://github.com/dagger/dagger/pull/5955
0b52104f252de11914914520948bf83c94d2068c
51baf38f1c59be4d4935a2d2ca5af4b642f21a2e
"2023-10-23T16:39:21Z"
go
"2023-10-24T16:05:15Z"
cmd/dagger/module.go
package main import ( "context" "encoding/json" "fmt" "os" "path/filepath" "sort" "strings" "dagger.io/dagger" "github.com/dagger/dagger/core/modules" "github.com/dagger/dagger/engine/client" "github.com/iancoleman/strcase" "github.com/spf13/cobra" "github.com/spf13/pflag" "github.com/vito/progrock" ) var ( moduleURL string moduleFlags = pflag.NewFlagSet("module", pflag.ContinueOnError) sdk string moduleName string moduleRoot string ) const ( moduleURLDefault = "." ) func init() { moduleFlags.StringVarP(&moduleURL, "mod", "m", "", "Path to dagger.json config file for the module or a directory containing that file. Either local path (e.g. \"/path/to/some/dir\") or a git repo (e.g. \"git://github.com/dagger/dagger?ref=branch?subpath=path/to/some/dir\").") moduleFlags.BoolVar(&focus, "focus", true, "Only show output for focused commands.") moduleCmd.PersistentFlags().AddFlagSet(moduleFlags) listenCmd.PersistentFlags().AddFlagSet(moduleFlags) queryCmd.PersistentFlags().AddFlagSet(moduleFlags) funcCmds.AddFlagSet(moduleFlags) moduleInitCmd.PersistentFlags().StringVar(&sdk, "sdk", "", "SDK name or image ref to use for the module") moduleInitCmd.MarkPersistentFlagRequired("sdk") moduleInitCmd.PersistentFlags().StringVar(&moduleName, "name", "", "Name of the new module") moduleInitCmd.MarkPersistentFlagRequired("name") moduleInitCmd.PersistentFlags().StringVarP(&moduleRoot, "root", "", "", "Root directory that should be loaded for the full module context. Defaults to the parent directory containing dagger.json.") // also include codegen flags since codegen will run on module init moduleCmd.AddCommand(moduleInitCmd) moduleCmd.AddCommand(moduleUseCmd) moduleCmd.AddCommand(moduleSyncCmd) } var moduleCmd = &cobra.Command{ Use: "module", Aliases: []string{"mod"}, Short: "Manage dagger modules", Long: "Manage dagger modules. By default, print the configuration of the specified module in json format.", Hidden: true, // for now, remove once we're ready for primetime RunE: func(cmd *cobra.Command, args []string) error { ctx := cmd.Context() return withEngineAndTUI(ctx, client.Params{}, func(ctx context.Context, engineClient *client.Client) (err error) { mod, _, err := getModuleFlagConfig(ctx, engineClient.Dagger()) if err != nil { return fmt.Errorf("failed to get module: %w", err) } var cfg *modules.Config switch { case mod.Local: cfg, err = mod.Config(ctx, nil) if err != nil { return fmt.Errorf("failed to get local module config: %w", err) } case mod.Git != nil: rec := progrock.FromContext(ctx) vtx := rec.Vertex("get-mod-config", strings.Join(os.Args, " ")) defer func() { vtx.Done(err) }() readConfigTask := vtx.Task("reading git module config") cfg, err = mod.Config(ctx, engineClient.Dagger()) readConfigTask.Done(err) if err != nil { return fmt.Errorf("failed to get git module config: %w", err) } } cfgBytes, err := json.MarshalIndent(cfg, "", " ") if err != nil { return fmt.Errorf("failed to marshal module config: %w", err) } cmd.Println(string(cfgBytes)) return nil }) }, } var moduleInitCmd = &cobra.Command{ Use: "init", Short: "Initialize a new dagger module in a local directory.", Hidden: false, RunE: func(cmd *cobra.Command, _ []string) (rerr error) { ctx := cmd.Context() return withEngineAndTUI(ctx, client.Params{}, func(ctx context.Context, engineClient *client.Client) (err error) { dag := engineClient.Dagger() mod, _, err := getModuleFlagConfig(ctx, dag) if err != nil { return fmt.Errorf("failed to get module: %w", err) } if mod.Git != nil { return fmt.Errorf("module init is not supported for git modules") } if exists, err := mod.modExists(ctx, nil); err == nil && exists { return fmt.Errorf("module init config path already exists: %s", mod.Path) } cfg := modules.NewConfig(moduleName, sdk, moduleRoot) return updateModuleConfig(ctx, engineClient, mod, cfg, cmd) }) }, } var moduleUseCmd = &cobra.Command{ Use: "use", Short: "Add a new dependency to a dagger module", Hidden: false, RunE: func(cmd *cobra.Command, extraArgs []string) (rerr error) { ctx := cmd.Context() return withEngineAndTUI(ctx, client.Params{}, func(ctx context.Context, engineClient *client.Client) (err error) { modFlagCfg, _, err := getModuleFlagConfig(ctx, engineClient.Dagger()) if err != nil { return fmt.Errorf("failed to get module: %w", err) } if modFlagCfg.Git != nil { return fmt.Errorf("module use is not supported for git modules") } modCfg, err := modFlagCfg.Config(ctx, engineClient.Dagger()) if err != nil { return fmt.Errorf("failed to get module config: %w", err) } var deps []string deps = append(deps, modCfg.Dependencies...) deps = append(deps, extraArgs...) depSet := make(map[string]*modules.Ref) for _, dep := range deps { depMod, err := modules.ResolveModuleDependency(ctx, engineClient.Dagger(), modFlagCfg.Ref, dep) if err != nil { return fmt.Errorf("failed to get module: %w", err) } depSet[depMod.Symbolic()] = depMod } modCfg.Dependencies = nil for _, dep := range depSet { modCfg.Dependencies = append(modCfg.Dependencies, dep.String()) } sort.Strings(modCfg.Dependencies) return updateModuleConfig(ctx, engineClient, modFlagCfg, modCfg, cmd) }) }, } var moduleSyncCmd = &cobra.Command{ Use: "sync", Short: "Synchronize a dagger module with the latest version of its extensions", Hidden: false, RunE: func(cmd *cobra.Command, extraArgs []string) (rerr error) { ctx := cmd.Context() return withEngineAndTUI(ctx, client.Params{}, func(ctx context.Context, engineClient *client.Client) (err error) { modFlagCfg, _, err := getModuleFlagConfig(ctx, engineClient.Dagger()) if err != nil { return fmt.Errorf("failed to get module: %w", err) } if modFlagCfg.Git != nil { return fmt.Errorf("module sync is not supported for git modules") } modCfg, err := modFlagCfg.Config(ctx, engineClient.Dagger()) if err != nil { return fmt.Errorf("failed to get module config: %w", err) } return updateModuleConfig(ctx, engineClient, modFlagCfg, modCfg, cmd) }) }, } func updateModuleConfig( ctx context.Context, engineClient *client.Client, modFlag *moduleFlagConfig, modCfg *modules.Config, cmd *cobra.Command, ) (rerr error) { rec := progrock.FromContext(ctx) if !modFlag.Local { // nothing to do return nil } moduleDir, err := modFlag.LocalSourcePath() if err != nil { // TODO: impossible given Local check, would be nice to make unrepresentable return err } configPath := filepath.Join(moduleDir, modules.Filename) cfgBytes, err := json.MarshalIndent(modCfg, "", " ") if err != nil { return fmt.Errorf("failed to marshal module config: %w", err) } _, parentDirStatErr := os.Stat(moduleDir) switch { case parentDirStatErr == nil: // already exists, nothing to do case os.IsNotExist(parentDirStatErr): // make the parent dir, but if something goes wrong, clean it up in the defer if err := os.MkdirAll(moduleDir, 0o755); err != nil { return fmt.Errorf("failed to create module config directory: %w", err) } defer func() { if rerr != nil { os.RemoveAll(moduleDir) } }() default: return fmt.Errorf("failed to stat parent directory: %w", parentDirStatErr) } var cfgFileMode os.FileMode = 0o644 originalContents, configFileReadErr := os.ReadFile(configPath) switch { case configFileReadErr == nil: // attempt to restore the original file if it already existed and something goes wrong stat, err := os.Stat(configPath) if err != nil { return fmt.Errorf("failed to stat module config: %w", err) } cfgFileMode = stat.Mode() defer func() { if rerr != nil { os.WriteFile(configPath, originalContents, cfgFileMode) } }() case os.IsNotExist(configFileReadErr): // remove it if it didn't exist already and something goes wrong defer func() { if rerr != nil { os.Remove(configPath) } }() default: return fmt.Errorf("failed to read module config: %w", configFileReadErr) } // nolint:gosec if err := os.WriteFile(configPath, append(cfgBytes, '\n'), cfgFileMode); err != nil { return fmt.Errorf("failed to write module config: %w", err) } dag := engineClient.Dagger() mod, err := modFlag.AsModule(ctx, dag) if err != nil { return fmt.Errorf("failed to load module: %w", err) } codegen := mod.GeneratedCode() if err := automateVCS(ctx, moduleDir, codegen); err != nil { return fmt.Errorf("failed to automate vcs: %w", err) } entries, err := codegen.Code().Entries(ctx) if err != nil { return fmt.Errorf("failed to get codegen output entries: %w", err) } rec.Debug("syncing generated files", progrock.Labelf("entries", "%v", entries)) if _, err := codegen.Code().Export(ctx, moduleDir); err != nil { return fmt.Errorf("failed to export codegen output: %w", err) } return nil } func getModuleFlagConfig(ctx context.Context, dag *dagger.Client) (*moduleFlagConfig, bool, error) { wasSet := false moduleURL := moduleURL if moduleURL == "" { // it's unset or default value, use mod if present if v, ok := os.LookupEnv("DAGGER_MODULE"); ok { moduleURL = v wasSet = true } // it's still unset, set to the default if moduleURL == "" { moduleURL = moduleURLDefault } } else { wasSet = true } cfg, err := getModuleFlagConfigFromURL(ctx, dag, moduleURL) return cfg, wasSet, err } func getModuleFlagConfigFromURL(ctx context.Context, dag *dagger.Client, moduleURL string) (*moduleFlagConfig, error) { modRef, err := modules.ResolveMovingRef(ctx, dag, moduleURL) if err != nil { return nil, fmt.Errorf("failed to parse module URL: %w", err) } return &moduleFlagConfig{modRef}, nil } // moduleFlagConfig holds the module settings provided by the user via flags (or defaults if not set) type moduleFlagConfig struct { *modules.Ref } func (p moduleFlagConfig) load(ctx context.Context, c *dagger.Client) (*dagger.Module, error) { mod, err := p.AsModule(ctx, c) if err != nil { return nil, fmt.Errorf("failed to load module: %w", err) } // NB(vito): do NOT Serve the dependency; that installs it to the 'global' // schema view! we only want dependencies served directly to the dependent // module. return mod, nil } func (p moduleFlagConfig) modExists(ctx context.Context, c *dagger.Client) (bool, error) { switch { case p.Local: configPath := modules.NormalizeConfigPath(p.Path) _, err := os.Stat(configPath) if err == nil { return true, nil } if os.IsNotExist(err) { return false, nil } return false, fmt.Errorf("failed to stat module config: %w", err) case p.Git != nil: configPath := modules.NormalizeConfigPath(p.SubPath) _, err := c.Git(p.Git.CloneURL).Commit(p.Version).Tree().File(configPath).Sync(ctx) // TODO: this could technically fail for other reasons, but is okay enough for now, it will // still fail later if something else went wrong return err == nil, nil default: return false, fmt.Errorf("invalid module") } } func loadModCmdWrapper( fn func(context.Context, *client.Client, *dagger.Module, *cobra.Command, []string) error, presetSecretToken string, ) func(*cobra.Command, []string) error { return func(cmd *cobra.Command, cmdArgs []string) error { return withEngineAndTUI(cmd.Context(), client.Params{ SecretToken: presetSecretToken, }, func(ctx context.Context, engineClient *client.Client) (err error) { rec := progrock.FromContext(ctx) vtx := rec.Vertex("cmd-loader", strings.Join(os.Args, " ")) defer func() { vtx.Done(err) }() load := vtx.Task("loading module") loadedMod, err := loadMod(ctx, engineClient.Dagger()) load.Done(err) if err != nil { return err } return fn(ctx, engineClient, loadedMod, cmd, cmdArgs) }) } } func loadMod(ctx context.Context, c *dagger.Client) (*dagger.Module, error) { mod, modRequired, err := getModuleFlagConfig(ctx, c) if err != nil { return nil, fmt.Errorf("failed to get module config: %w", err) } modExists, err := mod.modExists(ctx, c) if err != nil { return nil, fmt.Errorf("failed to check if module exists: %w", err) } if !modExists && !modRequired { // only allow failing to load the mod when it was explicitly requested // by the user return nil, nil } loadedMod, err := mod.load(ctx, c) if err != nil { return nil, fmt.Errorf("failed to load module: %w", err) } // TODO: hack to unlazy mod so it's actually loaded // TODO: is this still needed? // TODO(vito): this came up again, specifically because I wanted the // dependencies to be started and served before doing schema introspection // for codegen. still seems useful, OR we could somehow have schema // introspection block/synchronize on loading dependencies automatically // _, err = loadedMod.ID(ctx) // if err != nil { // return nil, fmt.Errorf("failed to get loaded module ID: %w", err) // } // TODO(vito): immediate follow-up: turns out what I want is to Serve here // but _not_ Serve for each dependency, since we don't want them all // installed into the same schema - transitive deps should not be included. _, err = loadedMod.Serve(ctx) if err != nil { return nil, fmt.Errorf("failed to get loaded module ID: %w", err) } return loadedMod, nil } // loadModObjects loads the objects defined by the given module in an easier to use data structure. func loadModObjects(ctx context.Context, dag *dagger.Client, mod *dagger.Module) (*moduleDef, error) { var res struct { Module *moduleDef } err := dag.Do(ctx, &dagger.Request{ Query: ` query Objects($module: ModuleID!) { module: loadModuleFromID(id: $module) { name objects { asObject { name functions { name description returnType { kind asObject { name } asList { elementTypeDef { kind asObject { name } } } } args { name description defaultValue typeDef { kind optional asObject { name } asList { elementTypeDef { kind asObject { name } } } } } } fields { name description typeDef { kind optional asObject { name } asList { elementTypeDef { kind asObject { name } } } } } } } } } `, Variables: map[string]interface{}{ "module": mod, }, }, &dagger.Response{ Data: &res, }) if err != nil { err = fmt.Errorf("query module objects: %w", err) } return res.Module, err } // moduleDef is a representation of dagger.Module. type moduleDef struct { Name string Objects []*modTypeDef } // AsObjects returns the module's object type definitions. func (m *moduleDef) AsObjects() []*modObject { var defs []*modObject for _, typeDef := range m.Objects { if typeDef.AsObject != nil { defs = append(defs, typeDef.AsObject) } } return defs } // GetObject retrieves a saved object type definition from the module. func (m *moduleDef) GetObject(name string) *modObject { for _, obj := range m.AsObjects() { // Normalize name in case an SDK uses a different convention for object names. if gqlObjectName(obj.Name) == gqlObjectName(name) { return obj } } return nil } func (m *moduleDef) GetMainObject() *modObject { return m.GetObject(m.Name) } // LoadObject attempts to replace a function's return object type or argument's // object type with with one from the module's object type definitions, to // recover missing function definitions in those places when chaining functions. func (m *moduleDef) LoadObject(typeDef *modTypeDef) { if typeDef.AsObject != nil && typeDef.AsObject.Functions == nil && typeDef.AsObject.Fields == nil { obj := m.GetObject(typeDef.AsObject.Name) if obj != nil { typeDef.AsObject = obj } } } // modTypeDef is a representation of dagger.TypeDef. type modTypeDef struct { Kind dagger.TypeDefKind Optional bool AsObject *modObject AsList *modList } // modObject is a representation of dagger.ObjectTypeDef. type modObject struct { Name string Functions []*modFunction Fields []*modField } // modList is a representation of dagger.ListTypeDef. type modList struct { ElementTypeDef *modTypeDef } // modField is a representation of dagger.FieldTypeDef. type modField struct { Name string Description string TypeDef *modTypeDef } // modFunction is a representation of dagger.Function. type modFunction struct { Name string Description string ReturnType *modTypeDef Args []*modFunctionArg } // modFunctionArg is a representation of dagger.FunctionArg. type modFunctionArg struct { Name string Description string TypeDef *modTypeDef DefaultValue dagger.JSON flagName string } // FlagName returns the name of the argument using CLI naming conventions. func (r *modFunctionArg) FlagName() string { if r.flagName == "" { r.flagName = cliName(r.Name) } return r.flagName } func getDefaultValue[T any](r *modFunctionArg) (T, error) { var val T err := json.Unmarshal([]byte(r.DefaultValue), &val) return val, err } // gqlObjectName converts casing to a GraphQL object name func gqlObjectName(name string) string { return strcase.ToCamel(name) } // gqlFieldName converts casing to a GraphQL object field name func gqlFieldName(name string) string { return strcase.ToLowerCamel(name) } // gqlArgName converts casing to a GraphQL field argument name func gqlArgName(name string) string { return strcase.ToLowerCamel(name) } // cliName converts casing to the CLI convention (kebab) func cliName(name string) string { return strcase.ToKebab(name) }
closed
dagger/dagger
https://github.com/dagger/dagger
5,953
🐞 `dagger call -m <git-module>` fails if remote module contains dependencies with local path
### What is the issue? When we call a module with local dependency using `git-ref`, cli isn't able to find dependencies. `dagger.json` for following error log https://github.com/aweris/gale/blob/0fcf43c126b03fc4296f05970328aaca085c18af/daggerverse/gale/dagger.json#L1-L9 ### Log output ```shell dagger call --mod github.com/aweris/gale/daggerverse/gale@0fcf43c126b03fc4296f05970328aaca085c18af ✘ build "dagger call" ERROR [4.15s] ├ [4.15s] loading module ✘ asModule ERROR [0.00s] • Engine: 61b34bf9d33e (version v0.9.0) ⧗ 5.44s ✔ 27 ✘ 2 Error: failed to get loaded module ID: input:1: git.commit.tree.directory.asModule failed to create module from config `.::`: failed to get config file: lstat dagger.json: no such file or directory ``` ### Steps to reproduce - create a module with has a dependency on the local path. - push module to repository - make a `dagger call -m <git-ref>` ### SDK version Dagger CLI v0.9.0 ### OS version macOS 14.0
https://github.com/dagger/dagger/issues/5953
https://github.com/dagger/dagger/pull/5955
0b52104f252de11914914520948bf83c94d2068c
51baf38f1c59be4d4935a2d2ca5af4b642f21a2e
"2023-10-23T16:39:21Z"
go
"2023-10-24T16:05:15Z"
core/module.go
package core import ( "encoding/json" "fmt" "path" "path/filepath" "strings" "github.com/dagger/dagger/core/modules" "github.com/dagger/dagger/core/pipeline" "github.com/dagger/dagger/core/resourceid" "github.com/dagger/dagger/engine/buildkit" "github.com/moby/buildkit/client/llb" "github.com/moby/buildkit/solver/pb" "github.com/opencontainers/go-digest" ocispecs "github.com/opencontainers/image-spec/specs-go/v1" "golang.org/x/sync/errgroup" ) const ( ModMetaDirPath = "/.daggermod" ModMetaInputPath = "input.json" ModMetaOutputPath = "output.json" ModMetaDepsDirPath = "deps" ) type Module struct { // The module's source code root directory SourceDirectory *Directory `json:"sourceDirectory"` // If set, the subdir of the SourceDirectory that contains the module's source code SourceDirectorySubpath string `json:"sourceDirectorySubpath"` // The name of the module Name string `json:"name"` // The doc string of the module, if any Description string `json:"description"` // Dependencies of the module Dependencies []*Module `json:"dependencies"` // Dependencies as configured by the module DependencyConfig []string `json:"dependencyConfig"` // The module's objects Objects []*TypeDef `json:"objects,omitempty"` // The module's SDK, as set in the module config file SDK string `json:"sdk,omitempty"` // Below are not in public graphql API // The container used to execute the module's functions, // derived from the SDK, source directory, and workdir. Runtime *Container `json:"runtime,omitempty"` // The module's platform Platform ocispecs.Platform `json:"platform,omitempty"` // The pipeline in which the module was created Pipeline pipeline.Path `json:"pipeline,omitempty"` } func (mod *Module) ID() (ModuleID, error) { return resourceid.Encode(mod) } func (mod *Module) Digest() (digest.Digest, error) { return stableDigest(mod) } // DigestWithoutFunctions gives a digest after unsetting Functions, which is useful // as a digest of the "base" Module that's stable before+after loading Functions. func (mod *Module) DigestWithoutObjects() (digest.Digest, error) { mod = mod.Clone() mod.Objects = nil return stableDigest(mod) } func (mod *Module) PBDefinitions() ([]*pb.Definition, error) { var defs []*pb.Definition if mod.SourceDirectory != nil { dirDefs, err := mod.SourceDirectory.PBDefinitions() if err != nil { return nil, err } defs = append(defs, dirDefs...) } if mod.Runtime != nil { ctrDefs, err := mod.Runtime.PBDefinitions() if err != nil { return nil, err } defs = append(defs, ctrDefs...) } for _, dep := range mod.Dependencies { depDefs, err := dep.PBDefinitions() if err != nil { return nil, err } defs = append(defs, depDefs...) } return defs, nil } func (mod Module) Clone() *Module { cp := mod if mod.SourceDirectory != nil { cp.SourceDirectory = mod.SourceDirectory.Clone() } if mod.Runtime != nil { cp.Runtime = mod.Runtime.Clone() } cp.Dependencies = make([]*Module, len(mod.Dependencies)) for i, dep := range mod.Dependencies { cp.Dependencies[i] = dep.Clone() } cp.Objects = make([]*TypeDef, len(mod.Objects)) for i, def := range mod.Objects { cp.Objects[i] = def.Clone() } return &cp } func NewModule(platform ocispecs.Platform, pipeline pipeline.Path) *Module { return &Module{ Platform: platform, Pipeline: pipeline, } } // Load the module config as parsed from the given File func LoadModuleConfigFromFile( ctx *Context, bk *buildkit.Client, svcs *Services, configFile *File, ) (*modules.Config, error) { configBytes, err := configFile.Contents(ctx, bk, svcs) if err != nil { return nil, fmt.Errorf("failed to read config file: %w", err) } var cfg modules.Config if err := json.Unmarshal(configBytes, &cfg); err != nil { return nil, fmt.Errorf("failed to unmarshal config: %w", err) } return &cfg, nil } // Load the module config from the module from the given diretory at the given path func LoadModuleConfig( ctx *Context, bk *buildkit.Client, svcs *Services, sourceDir *Directory, configPath string, ) (string, *modules.Config, error) { configPath = modules.NormalizeConfigPath(configPath) configFile, err := sourceDir.File(ctx, bk, svcs, configPath) if err != nil { return "", nil, fmt.Errorf("failed to get config file: %w", err) } cfg, err := LoadModuleConfigFromFile(ctx, bk, svcs, configFile) if err != nil { return "", nil, fmt.Errorf("failed to load config: %w", err) } return configPath, cfg, nil } // callback for retrieving the runtime container for a module; needs to be callback since only the schema/module.go implementation // knows how to call modules to get the container type getRuntimeFunc func(ctx *Context, sourceDir *Directory, sourceDirSubpath string, sdkName string) (*Container, error) // FromConfig creates a module from a dagger.json config file. func (mod *Module) FromConfig( ctx *Context, bk *buildkit.Client, svcs *Services, progSock string, sourceDir *Directory, configPath string, getRuntime getRuntimeFunc, ) (*Module, error) { configPath, cfg, err := LoadModuleConfig(ctx, bk, svcs, sourceDir, configPath) if err != nil { return nil, err } // Recursively load the configs of all the dependencies var eg errgroup.Group mod.Dependencies = make([]*Module, len(cfg.Dependencies)) for i, depURL := range cfg.Dependencies { i, depURL := i, depURL eg.Go(func() error { depMod, err := NewModule(mod.Platform, mod.Pipeline).FromRef(ctx, bk, svcs, progSock, sourceDir, configPath, depURL, getRuntime) if err != nil { return fmt.Errorf("failed to get dependency mod from ref %q: %w", depURL, err) } mod.Dependencies[i] = depMod return nil }) } if err := eg.Wait(); err != nil { return nil, err } // Reposition the root of the sourceDir in case it's pointing to a subdir of current sourceDir if cfg.Root != "" { rootPath := filepath.Join("/", filepath.Dir(configPath), cfg.Root) if rootPath != "/" { var err error sourceDir, err = sourceDir.Directory(ctx, bk, svcs, rootPath) if err != nil { return nil, fmt.Errorf("failed to get root directory: %w", err) } configPath = filepath.Join("/", strings.TrimPrefix(configPath, rootPath)) } } // fill in the module settings and set the runtime container mod.SourceDirectory = sourceDir mod.SourceDirectorySubpath = filepath.Dir(configPath) mod.Name = cfg.Name mod.DependencyConfig = cfg.Dependencies mod.SDK = cfg.SDK mod.Runtime, err = getRuntime(ctx, mod.SourceDirectory, mod.SourceDirectorySubpath, mod.SDK) if err != nil { return nil, fmt.Errorf("failed to get runtime: %w", err) } return mod, nil } // Load the module from the given module reference. parentSrcDir and parentSrcSubpath are used to resolve local module refs // if needed (i.e. this is a local dep of another module) func (mod *Module) FromRef( ctx *Context, bk *buildkit.Client, svcs *Services, progSock string, parentSrcDir *Directory, // nil if not being loaded as a dep of another mod parentSrcSubpath string, // "" if not being loaded as a dep of another mod moduleRefStr string, getRuntime getRuntimeFunc, ) (*Module, error) { modRef, err := modules.ResolveStableRef(moduleRefStr) if err != nil { return nil, fmt.Errorf("failed to parse dependency url %q: %w", moduleRefStr, err) } // TODO: In theory should first load *just* the config file, figure out the include/exclude, and then load everything else // based on that. That's not straightforward because we can't get the config file until we've loaded the dep... // May need to have `dagger mod use` and `dagger mod sync` automatically include dependency include/exclude filters in // dagger.json. var sourceDir *Directory var configPath string switch { case modRef.Local: if parentSrcDir == nil { return nil, fmt.Errorf("invalid local module ref is local relative to nil parent %q", moduleRefStr) } sourceDir = parentSrcDir configPath = modules.NormalizeConfigPath(path.Join("/", path.Dir(parentSrcSubpath), modRef.Path)) case modRef.Git != nil: var err error sourceDir, err = NewDirectorySt(ctx, llb.Git(modRef.Git.CloneURL, modRef.Version), "", mod.Pipeline, mod.Platform, nil) if err != nil { return nil, fmt.Errorf("failed to create git directory: %w", err) } configPath = modules.NormalizeConfigPath(modRef.SubPath) default: return nil, fmt.Errorf("invalid module ref %q", moduleRefStr) } return mod.FromConfig(ctx, bk, svcs, progSock, sourceDir, configPath, getRuntime) } func (mod *Module) WithObject(def *TypeDef) (*Module, error) { mod = mod.Clone() if def.AsObject == nil { return nil, fmt.Errorf("expected object type def, got %s: %+v", def.Kind, def) } mod.Objects = append(mod.Objects, def) return mod, nil }
closed
dagger/dagger
https://github.com/dagger/dagger
5,953
🐞 `dagger call -m <git-module>` fails if remote module contains dependencies with local path
### What is the issue? When we call a module with local dependency using `git-ref`, cli isn't able to find dependencies. `dagger.json` for following error log https://github.com/aweris/gale/blob/0fcf43c126b03fc4296f05970328aaca085c18af/daggerverse/gale/dagger.json#L1-L9 ### Log output ```shell dagger call --mod github.com/aweris/gale/daggerverse/gale@0fcf43c126b03fc4296f05970328aaca085c18af ✘ build "dagger call" ERROR [4.15s] ├ [4.15s] loading module ✘ asModule ERROR [0.00s] • Engine: 61b34bf9d33e (version v0.9.0) ⧗ 5.44s ✔ 27 ✘ 2 Error: failed to get loaded module ID: input:1: git.commit.tree.directory.asModule failed to create module from config `.::`: failed to get config file: lstat dagger.json: no such file or directory ``` ### Steps to reproduce - create a module with has a dependency on the local path. - push module to repository - make a `dagger call -m <git-ref>` ### SDK version Dagger CLI v0.9.0 ### OS version macOS 14.0
https://github.com/dagger/dagger/issues/5953
https://github.com/dagger/dagger/pull/5955
0b52104f252de11914914520948bf83c94d2068c
51baf38f1c59be4d4935a2d2ca5af4b642f21a2e
"2023-10-23T16:39:21Z"
go
"2023-10-24T16:05:15Z"
core/modules/resolver.go
package modules import ( "bufio" "bytes" "context" "encoding/json" "fmt" "os" "path" "path/filepath" "strings" "dagger.io/dagger" ) // Ref contains all of the information we're able to learn about a provided // module ref. type Ref struct { Path string // Path is the provided path for the module. Version string // Version is the provided version for the module, if any. Local bool // Local indicates that the module's Path is just a local path. Git *GitRef // Git is the resolved Git information. SubPath string // Subdir is the subdirectory within the fetched source. } type GitRef struct { HTMLURL string // HTMLURL is the URL a user can use to browse the repo. CloneURL string // CloneURL is the URL to clone. Commit string // Commit is the commit to check out. } func (ref *Ref) String() string { if ref.Local { p, err := ref.LocalSourcePath() if err != nil { // should be impossible given the ref.Local guard panic(err) } return p } if ref.Version == "" { return ref.Path } return fmt.Sprintf("%s@%s", ref.Path, ref.Version) } func (ref *Ref) Symbolic() string { var root string switch { case ref.Local: root = ref.Path case ref.Git != nil: root = ref.Git.CloneURL default: panic("invalid module ref") } return path.Join(root, ref.SubPath) } func (ref *Ref) LocalSourcePath() (string, error) { if ref.Local { // TODO(vito): This may be worth a rethink, but the idea is for local // modules to be represented as a 'subpath' of their outer module, that way // they can do things like refer to sibling modules at ../foo. But this // hasn't been proved out. Anyway, at this layer we need to preserve the // subpath because this gets printed to `dagger.json`, and without this the // module will depend on itself, leading to an infinite loop. return path.Join(ref.Path, ref.SubPath), nil } return "", fmt.Errorf("cannot get local source path for non-local module") } func (ref *Ref) Config(ctx context.Context, c *dagger.Client) (*Config, error) { switch { case ref.Local: configBytes, err := os.ReadFile(path.Join(ref.Path, Filename)) if err != nil { return nil, fmt.Errorf("failed to read local config file: %w", err) } var cfg Config if err := json.Unmarshal(configBytes, &cfg); err != nil { return nil, fmt.Errorf("failed to parse local config file: %w", err) } return &cfg, nil case ref.Git != nil: if c == nil { return nil, fmt.Errorf("cannot load git module config with nil dagger client") } repoDir := c.Git(ref.Git.CloneURL).Commit(ref.Version).Tree() var configPath string if ref.SubPath != "" { configPath = path.Join(ref.SubPath, Filename) } else { configPath = Filename } configStr, err := repoDir.File(configPath).Contents(ctx) if err != nil { return nil, fmt.Errorf("failed to read git config file: %w", err) } var cfg Config if err := json.Unmarshal([]byte(configStr), &cfg); err != nil { return nil, fmt.Errorf("failed to parse git config file: %w", err) } return &cfg, nil default: panic("invalid module ref") } } func (ref *Ref) AsModule(ctx context.Context, c *dagger.Client) (*dagger.Module, error) { cfg, err := ref.Config(ctx, c) if err != nil { return nil, fmt.Errorf("failed to get module config: %w", err) } switch { case ref.Local: localSrc, err := ref.LocalSourcePath() if err != nil { // should be impossible given the ref.Local guard panic(err) } modRootDir, subdirRelPath, err := cfg.RootAndSubpath(localSrc) if err != nil { return nil, fmt.Errorf("failed to get module root: %w", err) } return c.Host().Directory(modRootDir, dagger.HostDirectoryOpts{ Include: cfg.Include, Exclude: cfg.Exclude, }).AsModule(dagger.DirectoryAsModuleOpts{ SourceSubpath: subdirRelPath, }), nil case ref.Git != nil: rootPath := path.Clean(path.Join(ref.SubPath, cfg.Root)) if strings.HasPrefix(rootPath, "..") { return nil, fmt.Errorf("module config path %q is not under module root %q", ref.SubPath, rootPath) } return c.Git(ref.Git.CloneURL).Commit(ref.Version).Tree(). Directory(rootPath). AsModule(), nil default: return nil, fmt.Errorf("invalid module (local=%t, git=%t)", ref.Local, ref.Git != nil) } } // TODO dedup with ResolveMovingRef func ResolveStableRef(modQuery string) (*Ref, error) { modPath, modVersion, hasVersion := strings.Cut(modQuery, "@") ref := &Ref{ Path: modPath, } // TODO: figure out how to support arbitrary repos in a predictable way. // Maybe piggyback on whatever Go supports? (the whole <meta go-import> // thing) isGitHub := strings.HasPrefix(modPath, "github.com/") if !hasVersion { if isGitHub { return nil, fmt.Errorf("no version provided for remote ref: %s", modQuery) } // assume local path // // NB(vito): HTTP URLs should be supported by taking a sha256 digest as the // version. so it should be safe to assume no version = local path. as a // rule, if it's local we don't need to version it; if it's remote, we do. ref.Local = true return ref, nil } ref.Git = &GitRef{} // assume git for now, HTTP can come later if !isGitHub { return nil, fmt.Errorf("for now, only github.com/ paths are supported: %s", modPath) } segments := strings.SplitN(modPath, "/", 4) if len(segments) < 3 { return nil, fmt.Errorf("invalid github.com path: %s", modPath) } ref.Git.CloneURL = "https://" + segments[0] + "/" + segments[1] + "/" + segments[2] if !hasVersion { return nil, fmt.Errorf("no version provided for %s", modPath) } ref.Version = modVersion // assume commit ref.Git.Commit = modVersion // assume commit if len(segments) == 4 { ref.SubPath = segments[3] ref.Git.HTMLURL = "https://" + segments[0] + "/" + segments[1] + "/" + segments[2] + "/tree/" + ref.Version + "/" + ref.SubPath } else { ref.Git.HTMLURL = "https://" + segments[0] + "/" + segments[1] + "/" + segments[2] } return ref, nil } func ResolveMovingRef(ctx context.Context, dag *dagger.Client, modQuery string) (*Ref, error) { modPath, modVersion, hasVersion := strings.Cut(modQuery, "@") ref := &Ref{ Path: modPath, } // TODO: figure out how to support arbitrary repos in a predictable way. // Maybe piggyback on whatever Go supports? (the whole <meta go-import> // thing) isGitHub := strings.HasPrefix(modPath, "github.com/") if !hasVersion && !isGitHub { // assume local path // // NB(vito): HTTP URLs should be supported by taking a sha256 digest as the // version. so it should be safe to assume no version = local path. as a // rule, if it's local we don't need to version it; if it's remote, we do. ref.Local = true return ref, nil } ref.Git = &GitRef{} // assume git for now, HTTP can come later if !isGitHub { return nil, fmt.Errorf("for now, only github.com/ paths are supported: %q", modQuery) } segments := strings.SplitN(modPath, "/", 4) if len(segments) < 3 { return nil, fmt.Errorf("invalid github.com path: %s", modPath) } ref.Git.CloneURL = "https://" + segments[0] + "/" + segments[1] + "/" + segments[2] if !hasVersion { var err error modVersion, err = defaultBranch(ctx, dag, ref.Git.CloneURL) if err != nil { return nil, fmt.Errorf("determine default branch: %w", err) } } gitCommit, err := resolveGitRef(ctx, dag, ref.Git.CloneURL, modVersion) if err != nil { return nil, fmt.Errorf("resolve git ref: %w", err) } ref.Version = gitCommit // TODO preserve semver here ref.Git.Commit = gitCommit // but tell the truth here if len(segments) == 4 { ref.SubPath = segments[3] ref.Git.HTMLURL = "https://" + segments[0] + "/" + segments[1] + "/" + segments[2] + "/tree/" + ref.Version + "/" + ref.SubPath } else { ref.Git.HTMLURL = "https://" + segments[0] + "/" + segments[1] + "/" + segments[2] } return ref, nil } func ResolveModuleDependency(ctx context.Context, dag *dagger.Client, parent *Ref, urlStr string) (*Ref, error) { mod, err := ResolveMovingRef(ctx, dag, urlStr) if err != nil { return nil, fmt.Errorf("failed to resolve module: %w", err) } if mod.Local { // make local modules relative to the parent module cp := *parent if cp.SubPath != "" { cp.SubPath = filepath.Join(cp.SubPath, mod.Path) } else { cp.SubPath = mod.Path } return &cp, nil } return mod, nil } func defaultBranch(ctx context.Context, dag *dagger.Client, repo string) (string, error) { output, err := dag.Container(). From("alpine/git"). WithExec([]string{"git", "ls-remote", "--symref", repo, "HEAD"}, dagger.ContainerWithExecOpts{ SkipEntrypoint: true, }). Stdout(ctx) if err != nil { return "", err } scanner := bufio.NewScanner(bytes.NewBufferString(output)) for scanner.Scan() { fields := strings.Fields(scanner.Text()) if len(fields) < 3 { continue } if fields[0] == "ref:" && fields[2] == "HEAD" { return strings.TrimPrefix(fields[1], "refs/heads/"), nil } } return "", fmt.Errorf("could not deduce default branch from output:\n%s", output) } func resolveGitRef(ctx context.Context, dag *dagger.Client, repo, ref string) (string, error) { repoDir := dag.Git(repo, dagger.GitOpts{KeepGitDir: true}).Commit(ref).Tree() output, err := dag.Container(). From("alpine/git"). WithMountedDirectory("/repo", repoDir). WithWorkdir("/repo"). WithExec([]string{"git", "rev-parse", "HEAD"}, dagger.ContainerWithExecOpts{ SkipEntrypoint: true, }). Stdout(ctx) if err != nil { return "", err } return strings.TrimSpace(output), nil }
closed
dagger/dagger
https://github.com/dagger/dagger
5,904
Zenith: fix handling of list inputs
```go package main import ( "fmt" ) type Test struct{} type Foo struct { Msg string } func (m *Test) TestListInput(foos []Foo) string { return fmt.Sprintf("%+v", foos) } ``` Currently fails when building the module w/ error `41: [0.44s] ./dagger.gen.go:4250:15: undefined: test` Something must have broken in handling of list input types at some point I'm guessing? cc @jedevc @vito This should at least work in terms of codegen, handling it in `dagger call` is also important but probably a separate task, unless of course we already handled it (cc @helderco)
https://github.com/dagger/dagger/issues/5904
https://github.com/dagger/dagger/pull/5907
db901c8fe4c70cc32336e304492ca37f12b8f389
e8ad5c62275172e3d54ae46447e741ff5d603450
"2023-10-16T18:21:57Z"
go
"2023-10-25T19:38:59Z"
.changes/unreleased/Breaking-20231024-152415.yaml
closed
dagger/dagger
https://github.com/dagger/dagger
5,904
Zenith: fix handling of list inputs
```go package main import ( "fmt" ) type Test struct{} type Foo struct { Msg string } func (m *Test) TestListInput(foos []Foo) string { return fmt.Sprintf("%+v", foos) } ``` Currently fails when building the module w/ error `41: [0.44s] ./dagger.gen.go:4250:15: undefined: test` Something must have broken in handling of list input types at some point I'm guessing? cc @jedevc @vito This should at least work in terms of codegen, handling it in `dagger call` is also important but probably a separate task, unless of course we already handled it (cc @helderco)
https://github.com/dagger/dagger/issues/5904
https://github.com/dagger/dagger/pull/5907
db901c8fe4c70cc32336e304492ca37f12b8f389
e8ad5c62275172e3d54ae46447e741ff5d603450
"2023-10-16T18:21:57Z"
go
"2023-10-25T19:38:59Z"
cmd/codegen/generator/go/templates/modules.go
package templates import ( "encoding/json" "fmt" "go/ast" "go/token" "go/types" "path/filepath" "sort" "strings" . "github.com/dave/jennifer/jen" // nolint:revive,stylecheck "github.com/fatih/structtag" "github.com/iancoleman/strcase" "golang.org/x/tools/go/packages" ) const daggerGenFilename = "dagger.gen.go" /* TODO: * Handle types from 3rd party imports in the type signature * Add packages.NeedImports and packages.NeedDependencies to packages.Load opts, ensure performance is okay (or deal with that by lazy loading) * Fix problem where changing a function signature requires running `dagger mod sync` twice (first one will result in package errors being seen, second one fixes) * Use Overlays field in packages.Config to provide partial generation of dagger.gen.go, without the unupdated code we generate here * Handle automatically re-running `dagger mod sync` when invoking functions from CLI, to save users from having to always remember while developing locally * Support methods defined on non-pointer receivers */ /* moduleMainSrc generates the source code of the main func for Dagger Module code using the Go SDK. The overall idea is that users just need to create a struct with the same name as their Module and then add methods to that struct to implement their Module. Methods on that struct become Functions. They are also free to return custom objects from Functions, which themselves may have methods that become Functions too. However, only the "top-level" Module struct's Functions will be directly invokable. This is essentially just the GraphQL execution model. The implementation works by parsing the user's code and generating a main func that reads function call inputs from the Engine, calls the relevant function and returns the result. The generated code is mostly a giant switch/case on the object+function name, with each case doing json deserialization of the input arguments and calling the actual Go function. */ func (funcs goTemplateFuncs) moduleMainSrc() string { if funcs.modulePkg == nil { // during bootstrapping, we might not have code yet, since it takes // multiple passes. return `func main() { panic("no code yet") }` } ps := &parseState{ pkg: funcs.modulePkg, fset: funcs.moduleFset, methods: make(map[string][]method), } pkgScope := funcs.modulePkg.Types.Scope() objFunctionCases := map[string][]Code{} createMod := Qual("dag", "CurrentModule").Call() objs := []types.Object{} for _, name := range pkgScope.Names() { obj := pkgScope.Lookup(name) if obj == nil { continue } objs = append(objs, obj) } // preserve definition order, so developer can keep more important / // entrypoint types higher up sort.Slice(objs, func(i, j int) bool { return objs[i].Pos() < objs[j].Pos() }) tps := []types.Type{} for _, obj := range objs { tps = append(tps, obj.Type()) } added := map[string]struct{}{} topLevel := true for len(tps) != 0 { for _, tp := range tps { named, isNamed := tp.(*types.Named) if !isNamed { continue } obj := named.Obj() if obj.Pkg() != funcs.modulePkg.Types { continue } strct, isStruct := named.Underlying().(*types.Struct) if !isStruct { // TODO(vito): could possibly support non-struct types, but why bother continue } // avoid adding a struct definition twice (if it's referenced in two function signatures) if _, ok := added[obj.Name()]; ok { continue } // TODO(vito): hacky: need to run this before fillObjectFunctionCases so it // collects all the methods objType, err := ps.goStructToAPIType(strct, named) if err != nil { panic(err) } if objType == nil { // not including in module schema, skip it continue } if err := ps.fillObjectFunctionCases(named, objFunctionCases); err != nil { // errors indicate an internal problem rather than something w/ user code, so panic instead panic(err) } if len(objFunctionCases[obj.Name()]) == 0 { if topLevel { // no functions on this top-level object, so don't add it to the module continue } tokenFile := ps.fset.File(named.Obj().Pos()) isDaggerGenerated := filepath.Base(tokenFile.Name()) == daggerGenFilename if isDaggerGenerated { // skip objects from outside this module continue } } // Add the object to the module createMod = dotLine(createMod, "WithObject").Call(Add(Line(), objType)) added[obj.Name()] = struct{}{} } tps, ps.extraTypes = ps.extraTypes, nil topLevel = false } // TODO: sort cases and functions based on their definition order return strings.Join([]string{mainSrc, invokeSrc(objFunctionCases, createMod)}, "\n") } func dotLine(a *Statement, id string) *Statement { return a.Op(".").Line().Id(id) } const ( // The static part of the generated code. It calls out to the "invoke" func, which is the mostly // dynamically generated code that actually calls the user's functions. mainSrc = `func main() { ctx := context.Background() fnCall := dag.CurrentFunctionCall() parentName, err := fnCall.ParentName(ctx) if err != nil { fmt.Println(err.Error()) os.Exit(2) } fnName, err := fnCall.Name(ctx) if err != nil { fmt.Println(err.Error()) os.Exit(2) } parentJson, err := fnCall.Parent(ctx) if err != nil { fmt.Println(err.Error()) os.Exit(2) } fnArgs, err := fnCall.InputArgs(ctx) if err != nil { fmt.Println(err.Error()) os.Exit(2) } inputArgs := map[string][]byte{} for _, fnArg := range fnArgs { argName, err := fnArg.Name(ctx) if err != nil { fmt.Println(err.Error()) os.Exit(2) } argValue, err := fnArg.Value(ctx) if err != nil { fmt.Println(err.Error()) os.Exit(2) } inputArgs[argName] = []byte(argValue) } result, err := invoke(ctx, []byte(parentJson), parentName, fnName, inputArgs) if err != nil { fmt.Println(err.Error()) os.Exit(2) } resultBytes, err := json.Marshal(result) if err != nil { fmt.Println(err.Error()) os.Exit(2) } _, err = fnCall.ReturnValue(ctx, JSON(resultBytes)) if err != nil { fmt.Println(err.Error()) os.Exit(2) } } ` parentJSONVar = "parentJSON" parentNameVar = "parentName" fnNameVar = "fnName" inputArgsVar = "inputArgs" invokeFuncName = "invoke" ) // the source code of the invoke func, which is the mostly dynamically generated code that actually calls the user's functions func invokeSrc(objFunctionCases map[string][]Code, createMod Code) string { // each `case` statement for every object name, which makes up the body of the invoke func objCases := []Code{} for objName, functionCases := range objFunctionCases { objCases = append(objCases, Case(Lit(objName)).Block(Switch(Id(fnNameVar)).Block(functionCases...))) } // when the object name is empty, return the module definition objCases = append(objCases, Case(Lit("")).Block( Return(createMod, Nil()), )) // default case (return error) objCases = append(objCases, Default().Block( Return(Nil(), Qual("fmt", "Errorf").Call(Lit("unknown object %s"), Id(parentNameVar))), )) objSwitch := Switch(Id(parentNameVar)).Block(objCases...) // func invoke( invokeFunc := Func().Id(invokeFuncName).Params( // ctx context.Context, Id("ctx").Qual("context", "Context"), // parentJSON []byte, Id(parentJSONVar).Index().Byte(), // parentName string, Id(parentNameVar).String(), // fnName string, Id(fnNameVar).String(), // inputArgs map[string][]byte, Id(inputArgsVar).Map(String()).Index().Byte(), ).Params( // ) (any, Id("any"), // error) Error(), ).Block(objSwitch) return fmt.Sprintf("%#v", invokeFunc) } func renderNameOrStruct(t types.Type) string { if ptr, ok := t.(*types.Pointer); ok { return "*" + renderNameOrStruct(ptr.Elem()) } if named, ok := t.(*types.Named); ok { // assume local return named.Obj().Name() } // HACK(vito): this is passed to Id(), which is a bit weird, but works return t.String() } var checkErrStatement = If(Err().Op("!=").Nil()).Block( // fmt.Println(err.Error()) Qual("fmt", "Println").Call(Err().Dot("Error").Call()), // os.Exit(2) Qual("os", "Exit").Call(Lit(2)), ) // fillObjectFunctionCases recursively fills out the `cases` map with entries for object name -> `case` statement blocks // for each function in that object func (ps *parseState) fillObjectFunctionCases(type_ types.Type, cases map[string][]Code) error { var objName string switch x := type_.(type) { case *types.Pointer: return ps.fillObjectFunctionCases(x.Elem(), cases) case *types.Named: objName = x.Obj().Name() default: return nil } if existingCases := cases[objName]; len(existingCases) > 0 { // handles recursive types, e.g. objects with chainable methods that return themselves return nil } methods := ps.methods[objName] if len(methods) == 0 { return nil } for _, method := range methods { fnName, sig := method.name, method.sig statements := []Code{ Var().Id("err").Error(), } parentVarName := "parent" statements = append(statements, Var().Id(parentVarName).Id(objName), Err().Op("=").Qual("json", "Unmarshal").Call(Id(parentJSONVar), Op("&").Id(parentVarName)), checkErrStatement, ) fnCallArgs := []Code{Op("&").Id(parentVarName)} for i := 0; i < sig.Params().Len(); i++ { arg := sig.Params().At(i) if i == 0 && arg.Type().String() == "context.Context" { fnCallArgs = append(fnCallArgs, Id("ctx")) continue } if opts, ok := namedOrDirectStruct(arg.Type()); ok { optsName := arg.Name() statements = append(statements, Var().Id(optsName).Id(renderNameOrStruct(arg.Type()))) for f := 0; f < opts.NumFields(); f++ { param := opts.Field(f) argName := strcase.ToLowerCamel(param.Name()) statements = append(statements, If(Id(inputArgsVar).Index(Lit(argName)).Op("!=").Nil()).Block( Err().Op("=").Qual("json", "Unmarshal").Call( Index().Byte().Parens(Id(inputArgsVar).Index(Lit(argName))), Op("&").Id(optsName).Dot(param.Name()), ), checkErrStatement, )) } fnCallArgs = append(fnCallArgs, Id(optsName)) } else { argName := strcase.ToLowerCamel(arg.Name()) statements = append(statements, Var().Id(argName).Id(renderNameOrStruct(arg.Type())), Err().Op("=").Qual("json", "Unmarshal").Call( Index().Byte().Parens(Id(inputArgsVar).Index(Lit(argName))), Op("&").Id(argName), ), checkErrStatement, ) fnCallArgs = append(fnCallArgs, Id(argName)) } } results := sig.Results() switch results.Len() { case 2: // assume second value is error if results.At(1).Type().String() != errorTypeName { // sanity check return fmt.Errorf("second return value must be error, have %s", results.At(0).Type().String()) } statements = append(statements, Return( Parens(Op("*").Id(objName)).Dot(fnName).Call(fnCallArgs...), )) cases[objName] = append(cases[objName], Case(Lit(fnName)).Block(statements...)) if err := ps.fillObjectFunctionCases(results.At(0).Type(), cases); err != nil { return err } case 1: if results.At(0).Type().String() == errorTypeName { // void error return statements = append(statements, Return( Nil(), Parens(Op("*").Id(objName)).Dot(fnName).Call(fnCallArgs...), )) cases[objName] = append(cases[objName], Case(Lit(fnName)).Block(statements...)) } else { // non-error return statements = append(statements, Return( Parens(Op("*").Id(objName)).Dot(fnName).Call(fnCallArgs...), Nil(), )) cases[objName] = append(cases[objName], Case(Lit(fnName)).Block(statements...)) if err := ps.fillObjectFunctionCases(results.At(0).Type(), cases); err != nil { return err } } case 0: // void return // // NB(vito): it's really weird to have a fully void return (not even // error), but we should still support it for completeness. statements = append(statements, Parens(Op("*").Id(objName)).Dot(fnName).Call(fnCallArgs...), Return(Nil(), Nil())) cases[objName] = append(cases[objName], Case(Lit(fnName)).Block(statements...)) default: return fmt.Errorf("unexpected number of results from method %s: %d", fnName, results.Len()) } } // default case (return error) cases[objName] = append(cases[objName], Default().Block( Return(Nil(), Qual("fmt", "Errorf").Call(Lit("unknown function %s"), Id(fnNameVar))), )) return nil } type parseState struct { pkg *packages.Package fset *token.FileSet methods map[string][]method extraTypes []types.Type } type method struct { name string sig *types.Signature } func (ps *parseState) goTypeToAPIType(typ types.Type, named *types.Named) (*Statement, error) { ps.extraTypes = append(ps.extraTypes, typ) switch t := typ.(type) { case *types.Named: // Named types are any types declared like `type Foo <...>` typeDef, err := ps.goTypeToAPIType(t.Underlying(), t) if err != nil { return nil, fmt.Errorf("failed to convert named type: %w", err) } return typeDef, nil case *types.Pointer: return ps.goTypeToAPIType(t.Elem(), named) case *types.Basic: if t.Kind() == types.Invalid { return nil, fmt.Errorf("invalid type: %+v", t) } var kind Code switch t.Info() { case types.IsString: kind = Id("Stringkind") case types.IsInteger: kind = Id("Integerkind") case types.IsBoolean: kind = Id("Booleankind") default: return nil, fmt.Errorf("unsupported basic type: %+v", t) } return Qual("dag", "TypeDef").Call().Dot("WithKind").Call( kind, ), nil case *types.Slice: elemTypeDef, err := ps.goTypeToAPIType(t.Elem(), nil) if err != nil { return nil, fmt.Errorf("failed to convert slice element type: %w", err) } return Qual("dag", "TypeDef").Call().Dot("WithListOf").Call( elemTypeDef, ), nil case *types.Struct: if named == nil { return nil, fmt.Errorf("struct types must be named") } typeName := named.Obj().Name() if typeName == "" { return nil, fmt.Errorf("struct types must be named") } return Qual("dag", "TypeDef").Call().Dot("WithObject").Call( Lit(typeName), ), nil default: return nil, fmt.Errorf("unsupported type %T", t) } } const errorTypeName = "error" func (ps *parseState) goStructToAPIType(t *types.Struct, named *types.Named) (*Statement, error) { if named == nil { return nil, fmt.Errorf("struct types must be named") } typeName := named.Obj().Name() if typeName == "" { return nil, fmt.Errorf("struct types must be named") } // We don't support extending objects from outside this module, so we will // be skipping it. But first we want to verify the user isn't adding methods // to it (in which case we error out). tokenFile := ps.fset.File(named.Obj().Pos()) objectIsDaggerGenerated := filepath.Base(tokenFile.Name()) == daggerGenFilename methods := []*types.Func{} methodSet := types.NewMethodSet(types.NewPointer(named)) // Fill out any Functions on the object, which are methods on the struct // TODO: support methods defined on non-pointer receivers for i := 0; i < methodSet.Len(); i++ { methodObj := methodSet.At(i).Obj() methodTokenFile := ps.fset.File(methodObj.Pos()) methodIsDaggerGenerated := filepath.Base(methodTokenFile.Name()) == daggerGenFilename // TODO: don't hardcode if methodIsDaggerGenerated { // We don't care about pre-existing methods on core types or objects from dependency modules. continue } if objectIsDaggerGenerated { return nil, fmt.Errorf("cannot define methods on objects from outside this module") } method, ok := methodObj.(*types.Func) if !ok { return nil, fmt.Errorf("expected method to be a func, got %T", methodObj) } if !method.Exported() { continue } methods = append(methods, method) } if objectIsDaggerGenerated { return nil, nil } sort.Slice(methods, func(i, j int) bool { return methods[i].Pos() < methods[j].Pos() }) // args for WithObject withObjectArgs := []Code{ Lit(typeName), } withObjectOpts := []Code{} // Fill out the Description with the comment above the struct (if any) typeSpec, err := ps.typeSpecForNamedType(named) if err != nil { return nil, fmt.Errorf("failed to find decl for named type %s: %w", typeName, err) } if doc := typeSpec.Doc; doc != nil { // TODO(vito): for some reason this is always nil withObjectOpts = append(withObjectOpts, Id("Description").Op(":").Lit(doc.Text())) } if len(withObjectOpts) > 0 { withObjectArgs = append(withObjectArgs, Id("TypeDefWithObjectOpts").Values(withObjectOpts...)) } typeDef := Qual("dag", "TypeDef").Call().Dot("WithObject").Call(withObjectArgs...) for _, method := range methods { fnTypeDef, err := ps.goMethodToAPIFunctionDef(typeName, method, named) if err != nil { return nil, fmt.Errorf("failed to convert method %s to function def: %w", method.Name(), err) } typeDef = dotLine(typeDef, "WithFunction").Call(Add(Line(), fnTypeDef)) } astStructType, ok := typeSpec.Type.(*ast.StructType) if !ok { return nil, fmt.Errorf("expected type spec to be a struct, got %T", typeSpec.Type) } // Fill out the static fields of the struct (if any) for i := 0; i < t.NumFields(); i++ { field := t.Field(i) if !field.Exported() { continue } fieldTypeDef, err := ps.goTypeToAPIType(field.Type(), nil) if err != nil { return nil, fmt.Errorf("failed to convert field type: %w", err) } var description string if doc := astStructType.Fields.List[i].Doc; doc != nil { description = doc.Text() } withFieldArgs := []Code{ Lit(field.Name()), fieldTypeDef, } if description != "" { withFieldArgs = append(withFieldArgs, Id("TypeDefWithFieldOpts").Values( Id("Description").Op(":").Lit(description), )) } typeDef = dotLine(typeDef, "WithField").Call(withFieldArgs...) } return typeDef, nil } var voidDef = Qual("dag", "TypeDef").Call(). Dot("WithKind").Call(Id("Voidkind")). Dot("WithOptional").Call(Lit(true)) func (ps *parseState) goMethodToAPIFunctionDef(typeName string, fn *types.Func, named *types.Named) (*Statement, error) { methodSig, ok := fn.Type().(*types.Signature) if !ok { return nil, fmt.Errorf("expected method to be a func, got %T", fn.Type()) } // stash away the method signature so we can remember details on how it's // invoked (e.g. no error return, no ctx arg, error-only return, etc) ps.methods[typeName] = append(ps.methods[typeName], method{ name: fn.Name(), sig: methodSig, }) var err error var fnReturnType *Statement methodResults := methodSig.Results() switch methodResults.Len() { case 0: fnReturnType = voidDef case 1: result := methodResults.At(0).Type() if result.String() == errorTypeName { fnReturnType = voidDef } else { fnReturnType, err = ps.goTypeToAPIType(result, nil) if err != nil { return nil, fmt.Errorf("failed to convert result type: %w", err) } } case 2: result := methodResults.At(0).Type() fnReturnType, err = ps.goTypeToAPIType(result, nil) if err != nil { return nil, fmt.Errorf("failed to convert result type: %w", err) } default: return nil, fmt.Errorf("method %s has too many return values", fn.Name()) } fnDef := Qual("dag", "Function").Call(Lit(fn.Name()), Add(Line(), fnReturnType)) funcDecl, err := ps.declForFunc(fn) if err != nil { return nil, fmt.Errorf("failed to find decl for method %s: %w", fn.Name(), err) } if doc := funcDecl.Doc; doc != nil { fnDef = dotLine(fnDef, "WithDescription").Call(Lit(doc.Text())) } for i := 0; i < methodSig.Params().Len(); i++ { param := methodSig.Params().At(i) if i == 0 && param.Type().String() == "context.Context" { // ignore ctx arg continue } if opts, ok := namedOrDirectStruct(param.Type()); ok { for f := 0; f < opts.NumFields(); f++ { param := opts.Field(f) tags, err := structtag.Parse(opts.Tag(f)) if err != nil { return nil, fmt.Errorf("failed to parse struct tag: %w", err) } argTypeDef, err := ps.goTypeToAPIType(param.Type(), nil) if err != nil { return nil, fmt.Errorf("failed to convert param type: %w", err) } argOptional := true if tags != nil { if tag, err := tags.Get("required"); err == nil { argOptional = tag.Value() == "true" } } // all values in a struct are optional argTypeDef = argTypeDef.Dot("WithOptional").Call(Lit(argOptional)) // arguments to WithArg argArgs := []Code{ Lit(param.Name()), argTypeDef, } argOpts := []Code{} if tags != nil { // TODO: support this? // if tag, err := tags.Get("name"); err == nil { // def.Name = tag.Value() // } if tag, err := tags.Get("doc"); err == nil { argOpts = append(argOpts, Id("Description").Op(":").Lit(tag.Value())) } if tag, err := tags.Get("default"); err == nil { var jsonEnc string if param.Type().String() == "string" { enc, err := json.Marshal(tag.Value()) if err != nil { return nil, fmt.Errorf("failed to marshal default value: %w", err) } jsonEnc = string(enc) } else { jsonEnc = tag.Value() // assume JSON encoded } argOpts = append(argOpts, Id("DefaultValue").Op(":").Id("JSON").Call(Lit(jsonEnc))) } } if len(argOpts) > 0 { argArgs = append(argArgs, Id("FunctionWithArgOpts").Values(argOpts...)) } fnDef = dotLine(fnDef, "WithArg").Call(argArgs...) } } else { argTypeDef, err := ps.goTypeToAPIType(param.Type(), nil) if err != nil { return nil, fmt.Errorf("failed to convert param type: %w", err) } fnDef = dotLine(fnDef, "WithArg").Call(Lit(param.Name()), argTypeDef) } } return fnDef, nil } func namedOrDirectStruct(t types.Type) (*types.Struct, bool) { switch x := t.(type) { case *types.Named: return namedOrDirectStruct(x.Underlying()) case *types.Struct: return x, true default: return nil, false } } // typeSpecForNamedType returns the *ast* type spec for the given Named type. This is needed // because the types.Named object does not have the comments associated with the type, which // we want to parse. func (ps *parseState) typeSpecForNamedType(namedType *types.Named) (*ast.TypeSpec, error) { tokenFile := ps.fset.File(namedType.Obj().Pos()) if tokenFile == nil { return nil, fmt.Errorf("no file for %s", namedType.Obj().Name()) } for _, f := range ps.pkg.Syntax { if ps.fset.File(f.Pos()) != tokenFile { continue } for _, decl := range f.Decls { genDecl, ok := decl.(*ast.GenDecl) if !ok { continue } for _, spec := range genDecl.Specs { typeSpec, ok := spec.(*ast.TypeSpec) if !ok { continue } if typeSpec.Name.Name == namedType.Obj().Name() { return typeSpec, nil } } } } return nil, fmt.Errorf("no decl for %s", namedType.Obj().Name()) } // declForFunc returns the *ast* func decl for the given Func type. This is needed // because the types.Func object does not have the comments associated with the type, which // we want to parse. func (ps *parseState) declForFunc(fnType *types.Func) (*ast.FuncDecl, error) { tokenFile := ps.fset.File(fnType.Pos()) if tokenFile == nil { return nil, fmt.Errorf("no file for %s", fnType.Name()) } for _, f := range ps.pkg.Syntax { if ps.fset.File(f.Pos()) != tokenFile { continue } for _, decl := range f.Decls { fnDecl, ok := decl.(*ast.FuncDecl) if ok && fnDecl.Name.Name == fnType.Name() { return fnDecl, nil } } } return nil, fmt.Errorf("no decl for %s", fnType.Name()) }
closed
dagger/dagger
https://github.com/dagger/dagger
5,904
Zenith: fix handling of list inputs
```go package main import ( "fmt" ) type Test struct{} type Foo struct { Msg string } func (m *Test) TestListInput(foos []Foo) string { return fmt.Sprintf("%+v", foos) } ``` Currently fails when building the module w/ error `41: [0.44s] ./dagger.gen.go:4250:15: undefined: test` Something must have broken in handling of list input types at some point I'm guessing? cc @jedevc @vito This should at least work in terms of codegen, handling it in `dagger call` is also important but probably a separate task, unless of course we already handled it (cc @helderco)
https://github.com/dagger/dagger/issues/5904
https://github.com/dagger/dagger/pull/5907
db901c8fe4c70cc32336e304492ca37f12b8f389
e8ad5c62275172e3d54ae46447e741ff5d603450
"2023-10-16T18:21:57Z"
go
"2023-10-25T19:38:59Z"
cmd/codegen/generator/go/templates/src/header.go.tmpl
// Code generated by dagger. DO NOT EDIT. package {{.PackageName}} import ( "context" "encoding/json" "errors" "fmt" "net" "net/http" "os" "strconv" "runtime" "fmt" "reflect" "github.com/Khan/genqlient/graphql" "{{.PackageImport}}/querybuilder" ) // assertNotNil panic if the given value is nil. // This function is used to validate that input with pointer type are not nil. // See https://github.com/dagger/dagger/issues/5696 for more context. func assertNotNil(argName string, value any) { // We use reflect because just comparing value to nil is not working since // the value is wrapped into a type when passed as parameter. // E.g., nil become (*dagger.File)(nil). if reflect.ValueOf(value).IsNil() { panic(fmt.Sprintf("unexpected nil pointer for argument %q", argName)) } }
closed
dagger/dagger
https://github.com/dagger/dagger
5,904
Zenith: fix handling of list inputs
```go package main import ( "fmt" ) type Test struct{} type Foo struct { Msg string } func (m *Test) TestListInput(foos []Foo) string { return fmt.Sprintf("%+v", foos) } ``` Currently fails when building the module w/ error `41: [0.44s] ./dagger.gen.go:4250:15: undefined: test` Something must have broken in handling of list input types at some point I'm guessing? cc @jedevc @vito This should at least work in terms of codegen, handling it in `dagger call` is also important but probably a separate task, unless of course we already handled it (cc @helderco)
https://github.com/dagger/dagger/issues/5904
https://github.com/dagger/dagger/pull/5907
db901c8fe4c70cc32336e304492ca37f12b8f389
e8ad5c62275172e3d54ae46447e741ff5d603450
"2023-10-16T18:21:57Z"
go
"2023-10-25T19:38:59Z"
core/integration/module_test.go
package core import ( "context" _ "embed" "errors" "fmt" "os" "path/filepath" "strconv" "strings" "testing" "time" "dagger.io/dagger" "github.com/iancoleman/strcase" "github.com/moby/buildkit/identity" "github.com/stretchr/testify/require" "golang.org/x/sync/errgroup" ) /* TODO: add coverage for * dagger mod use * dagger mod sync * that the codegen of the testdata envs are up to date (or incorporate that into a cli command) * if a dependency changes, then checks should re-run */ func TestModuleGoInit(t *testing.T) { t.Run("from scratch", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=bare", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{bare{myFunction(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"bare":{"myFunction":{"stdout":"hello\n"}}}`, out) }) t.Run("kebab-cases Go module name, camel-cases Dagger module name", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=My-Module", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{myModule{myFunction(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"myModule":{"myFunction":{"stdout":"hello\n"}}}`, out) generated, err := modGen.File("go.mod").Contents(ctx) require.NoError(t, err) require.Contains(t, generated, "module my-module") }) t.Run("creates go.mod beneath an existing go.mod if root points beneath it", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/go.mod", dagger.ContainerWithNewFileOpts{ Contents: "module example.com/test\n", }). WithNewFile("/work/foo.go", dagger.ContainerWithNewFileOpts{ Contents: "package foo\n", }). WithWorkdir("/work/ci"). With(daggerExec("mod", "init", "--name=beneathGoMod", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{beneathGoMod{myFunction(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"beneathGoMod":{"myFunction":{"stdout":"hello\n"}}}`, out) t.Run("names Go module after Dagger module", func(t *testing.T) { generated, err := modGen.File("go.mod").Contents(ctx) require.NoError(t, err) require.Contains(t, generated, "module beneath-go-mod") }) }) t.Run("respects existing go.mod", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithExec([]string{"go", "mod", "init", "example.com/test"}). With(daggerExec("mod", "init", "--name=hasGoMod", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{hasGoMod{myFunction(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"hasGoMod":{"myFunction":{"stdout":"hello\n"}}}`, out) t.Run("preserves module name", func(t *testing.T) { generated, err := modGen.File("go.mod").Contents(ctx) require.NoError(t, err) require.Contains(t, generated, "module example.com/test") }) }) t.Run("respects parent go.mod if root points to it", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithExec([]string{"go", "mod", "init", "example.com/test"}). WithNewFile("/work/foo.go", dagger.ContainerWithNewFileOpts{ Contents: "package foo\n", }). WithWorkdir("/work/child"). With(daggerExec("mod", "init", "--name=child", "--sdk=go", "--root=..")). WithNewFile("/work/child/main.go", dagger.ContainerWithNewFileOpts{ Contents: ` package main import "os" type Child struct{} func (m *Child) Root() *Directory { wd, err := os.Getwd() if err != nil { panic(err) } return dag.Host().Directory(wd+"/..") } `, }) generated := modGen. // explicitly sync to see whether it makes a go.mod With(daggerExec("mod", "sync")). Directory(".") logGen(ctx, t, generated) out, err := modGen. With(daggerQuery(`{child{root{entries}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"child":{"root":{"entries":["child","foo.go","go.mod","go.sum"]}}}`, out) childEntries, err := generated.Entries(ctx) require.NoError(t, err) require.NotContains(t, childEntries, "go.mod") t.Run("preserves parent module name", func(t *testing.T) { generated, err := modGen.File("/work/go.mod").Contents(ctx) require.NoError(t, err) require.Contains(t, generated, "module example.com/test") }) }) t.Run("respects existing go.mod even if root points to parent that has go.mod", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithExec([]string{"go", "mod", "init", "example.com/test"}). WithNewFile("/work/foo.go", dagger.ContainerWithNewFileOpts{ Contents: "package foo\n", }). WithWorkdir("/work/child"). WithExec([]string{"go", "mod", "init", "my-mod"}). With(daggerExec("mod", "init", "--name=child", "--sdk=go", "--root=..")). WithNewFile("/work/child/main.go", dagger.ContainerWithNewFileOpts{ Contents: ` package main import "os" type Child struct{} func (m *Child) Root() *Directory { wd, err := os.Getwd() if err != nil { panic(err) } return dag.Host().Directory(wd+"/..") } `, }) generated := modGen. // explicitly sync to see whether it makes a go.mod With(daggerExec("mod", "sync")). Directory(".") logGen(ctx, t, generated) out, err := modGen. With(daggerQuery(`{child{root{entries}}}`)). Stdout(ctx) require.NoError(t, err) // no go.sum require.JSONEq(t, `{"child":{"root":{"entries":["child","foo.go","go.mod"]}}}`, out) childEntries, err := generated.Entries(ctx) require.NoError(t, err) require.Contains(t, childEntries, "go.mod") require.Contains(t, childEntries, "go.sum") }) t.Run("respects existing main.go", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: ` package main type HasMainGo struct {} func (m *HasMainGo) Hello() string { return "Hello, world!" } `, }). With(daggerExec("mod", "init", "--name=hasMainGo", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{hasMainGo{hello}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"hasMainGo":{"hello":"Hello, world!"}}`, out) }) t.Run("respects existing main.go even if it uses types not generated yet", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: ` package main type HasDaggerTypes struct {} func (m *HasDaggerTypes) Hello() *Container { return dag.Container(). From("` + alpineImage + `"). WithExec([]string{"echo", "Hello, world!"}) } `, }). With(daggerExec("mod", "init", "--name=hasDaggerTypes", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{hasDaggerTypes{hello{stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"hasDaggerTypes":{"hello":{"stdout":"Hello, world!\n"}}}`, out) }) t.Run("respects existing package without creating main.go", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/notmain.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type HasNotMainGo struct {} func (m *HasNotMainGo) Hello() string { return "Hello, world!" } `, }). With(daggerExec("mod", "init", "--name=hasNotMainGo", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{hasNotMainGo{hello}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"hasNotMainGo":{"hello":"Hello, world!"}}`, out) }) } func TestModuleGit(t *testing.T) { t.Parallel() type testCase struct { sdk string gitignores []string gitattributes string } for _, tc := range []testCase{ { sdk: "go", gitignores: []string{ "/dagger.gen.go\n", "/querybuilder/\n", }, }, { sdk: "python", gitignores: []string{ "/sdk\n", }, }, } { tc := tc t.Run(fmt.Sprintf("module %s git", tc.sdk), func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := goGitBase(t, c). With(daggerExec("mod", "init", "--name=bare", "--sdk="+tc.sdk)) if tc.sdk == "go" { logGen(ctx, t, modGen.Directory(".")) } out, err := modGen. With(daggerQuery(`{bare{myFunction(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"bare":{"myFunction":{"stdout":"hello\n"}}}`, out) t.Run("configures .gitignore", func(t *testing.T) { ignore, err := modGen.File(".gitignore").Contents(ctx) require.NoError(t, err) for _, gitignore := range tc.gitignores { require.Contains(t, ignore, gitignore) } }) }) } } func TestModuleGoGitRemovesIgnored(t *testing.T) { t.Parallel() c, ctx := connect(t) committedModGen := goGitBase(t, c). With(daggerExec("mod", "init", "--name=bare", "--sdk=go")). WithExec([]string{"rm", ".gitignore"}). // simulate old path scheme to show we ignore it too to help transition WithExec([]string{"mkdir", "./internal"}). WithExec([]string{"cp", "-a", "./querybuilder", "./internal/querybuilder"}). WithExec([]string{"git", "add", "."}). WithExec([]string{"git", "commit", "-m", "init with generated files"}) changedAfterSync, err := committedModGen. With(daggerExec("mod", "sync")). WithExec([]string{"git", "diff"}). // for debugging WithExec([]string{"git", "status", "--short"}). Stdout(ctx) require.NoError(t, err) t.Logf("changed after sync:\n%s", changedAfterSync) require.Contains(t, changedAfterSync, "D dagger.gen.go\n") require.Contains(t, changedAfterSync, "D querybuilder/marshal.go\n") require.Contains(t, changedAfterSync, "D querybuilder/querybuilder.go\n") require.Contains(t, changedAfterSync, "D internal/querybuilder/marshal.go\n") require.Contains(t, changedAfterSync, "D internal/querybuilder/querybuilder.go\n") } func TestModulePythonGitRemovesIgnored(t *testing.T) { t.Parallel() c, ctx := connect(t) committedModGen := goGitBase(t, c). With(daggerExec("mod", "init", "--name=bare", "--sdk=python")). WithExec([]string{"rm", ".gitignore"}). WithExec([]string{"git", "add", "."}). WithExec([]string{"git", "commit", "-m", "init with generated files"}) changedAfterSync, err := committedModGen. With(daggerExec("mod", "sync")). WithExec([]string{"git", "diff"}). // for debugging WithExec([]string{"git", "status", "--short"}). Stdout(ctx) require.NoError(t, err) t.Logf("changed after sync:\n%s", changedAfterSync) require.Contains(t, changedAfterSync, "D sdk/pyproject.toml\n") require.Contains(t, changedAfterSync, "D sdk/src/dagger/__init__.py\n") } //go:embed testdata/modules/go/minimal/main.go var goSignatures string func TestModuleGoSignatures(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: goSignatures, }) logGen(ctx, t, modGen.Directory(".")) t.Run("func Hello() string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{hello}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"hello":"hello"}}`, out) }) t.Run("func Echo(string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echo(msg: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echo":"hello...hello...hello..."}}`, out) }) t.Run("func HelloContext(context.Context) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{helloContext}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"helloContext":"hello context"}}`, out) }) t.Run("func EchoContext(context.Context, string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoContext(msg: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoContext":"ctx.hello...ctx.hello...ctx.hello..."}}`, out) }) t.Run("func HelloStringError() (string, error)", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{helloStringError}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"helloStringError":"hello i worked"}}`, out) }) t.Run("func HelloVoid()", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{helloVoid}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"helloVoid":null}}`, out) }) t.Run("func HelloVoidError() error", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{helloVoidError}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"helloVoidError":null}}`, out) }) t.Run("func EchoOpts(string, Opts) error", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOpts(msg: "hi")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOpts":"hi...hi...hi..."}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOpts(msg: "hi", suffix: "!", times: 2)}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOpts":"hi!hi!"}}`, out) }) t.Run("func EchoOptsInline(string, struct{Suffix string, Times int}) error", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOptsInline(msg: "hi")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInline":"hi...hi...hi..."}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOptsInline(msg: "hi", suffix: "!", times: 2)}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInline":"hi!hi!"}}`, out) }) } //go:embed testdata/modules/go/extend/main.go var goExtend string // this is no longer allowed, but verify the SDK errors out func TestModuleGoExtendCore(t *testing.T) { t.Parallel() var logs safeBuffer c, ctx := connect(t, dagger.WithLogOutput(&logs)) _, err := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: goExtend, }). With(daggerExec("mod", "sync")). Sync(ctx) require.Error(t, err) require.NoError(t, c.Close()) require.Contains(t, logs.String(), "cannot define methods on objects from outside this module") } //go:embed testdata/modules/go/custom-types/main.go var customTypes string func TestModuleGoCustomTypes(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: customTypes, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerQuery(`{test{repeater(msg:"echo!", times: 3){render}}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"test":{"repeater":{"render":"echo!echo!echo!"}}}`, out) } func TestModuleGoReturnTypeDetection(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=foo", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Foo struct {} type X struct { Message string ` + "`json:\"message\"`" + ` } func (m *Foo) MyFunction() X { return X{Message: "foo"} } `, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerQuery(`{foo{myFunction{message}}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"foo":{"myFunction":{"message":"foo"}}}`, out) } //go:embed testdata/modules/go/use/dep/main.go var useInner string //go:embed testdata/modules/go/use/main.go var useOuter string func TestModuleGoUseLocal(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/dep"). With(daggerExec("mod", "init", "--name=dep", "--sdk=go")). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=use", "--sdk=go")). WithNewFile("/work/dep/main.go", dagger.ContainerWithNewFileOpts{ Contents: useInner, }). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: useOuter, }). With(daggerExec("mod", "use", "./dep")). WithEnvVariable("BUST", identity.NewID()) // NB(vito): hmm... logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerQuery(`{use{useHello}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"use":{"useHello":"hello"}}`, out) // cannot use transitive dependency directly _, err = modGen.With(daggerQuery(`{dep{hello}}`)).Stdout(ctx) require.Error(t, err) require.ErrorContains(t, err, `Cannot query field "dep" on type "Query".`) } func TestModuleGoUseLocalMulti(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/foo"). WithNewFile("/work/foo/main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Foo struct {} func (m *Foo) Name() string { return "foo" } `, }). With(daggerExec("mod", "init", "--name=foo", "--sdk=go")). WithWorkdir("/work/bar"). WithNewFile("/work/bar/main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Bar struct {} func (m *Bar) Name() string { return "bar" } `, }). With(daggerExec("mod", "init", "--name=bar", "--sdk=go")). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=use", "--sdk=go")). With(daggerExec("mod", "use", "./foo")). With(daggerExec("mod", "use", "./bar")). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main import "context" import "fmt" type Use struct {} func (m *Use) Names(ctx context.Context) ([]string, error) { fooName, err := dag.Foo().Name(ctx) if err != nil { return nil, fmt.Errorf("foo.name: %w", err) } barName, err := dag.Bar().Name(ctx) if err != nil { return nil, fmt.Errorf("bar.name: %w", err) } return []string{fooName, barName}, nil } `, }). WithEnvVariable("BUST", identity.NewID()) // NB(vito): hmm... logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerQuery(`{use{names}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"use":{"names":["foo", "bar"]}}`, out) } //go:embed testdata/modules/go/wrapper/main.go var wrapper string func TestModuleGoWrapping(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=wrapper", "--sdk=go")). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: wrapper, }) logGen(ctx, t, modGen.Directory(".")) id := identity.NewID() out, err := modGen.With(daggerQuery( fmt.Sprintf(`{wrapper{container{echo(msg:%q){unwrap{stdout}}}}}`, id), )).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, fmt.Sprintf(`{"wrapper":{"container":{"echo":{"unwrap":{"stdout":%q}}}}}`, id), out) } func TestModuleConfigAPI(t *testing.T) { t.Parallel() c, ctx := connect(t) moduleDir := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/subdir"). With(daggerExec("mod", "init", "--name=test", "--sdk=go", "--root=..")). Directory("/work") cfg := c.ModuleConfig(moduleDir, dagger.ModuleConfigOpts{Subpath: "subdir"}) name, err := cfg.Name(ctx) require.NoError(t, err) require.Equal(t, "test", name) sdk, err := cfg.SDK(ctx) require.NoError(t, err) require.Equal(t, "go", sdk) root, err := cfg.Root(ctx) require.NoError(t, err) require.Equal(t, "..", root) } func TestModulePythonInit(t *testing.T) { t.Run("from scratch", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=bare", "--sdk=python")) out, err := modGen. With(daggerQuery(`{bare{myFunction(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"bare":{"myFunction":{"stdout":"hello\n"}}}`, out) }) t.Run("respects existing pyproject.toml", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("pyproject.toml", dagger.ContainerWithNewFileOpts{ Contents: `[project] name = "has-pyproject" version = "0.0.0" `, }). With(daggerExec("mod", "init", "--name=hasPyproject", "--sdk=python")) out, err := modGen. With(daggerQuery(`{hasPyproject{myFunction(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"hasPyproject":{"myFunction":{"stdout":"hello\n"}}}`, out) t.Run("preserves module name", func(t *testing.T) { generated, err := modGen.File("pyproject.toml").Contents(ctx) require.NoError(t, err) require.Contains(t, generated, `name = "has-pyproject"`) }) }) t.Run("respects existing main.py", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/src/main/__init__.py", dagger.ContainerWithNewFileOpts{ Contents: "from . import notmain\n", }). WithNewFile("/work/src/main/notmain.py", dagger.ContainerWithNewFileOpts{ Contents: `from dagger.mod import function @function def hello() -> str: return "Hello, world!" `, }). With(daggerExec("mod", "init", "--name=hasMainPy", "--sdk=python")) out, err := modGen. With(daggerQuery(`{hasMainPy{hello}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"hasMainPy":{"hello":"Hello, world!"}}`, out) }) } func TestModuleLotsOfFunctions(t *testing.T) { t.Parallel() const funcCount = 100 t.Run("go sdk", func(t *testing.T) { t.Parallel() c, ctx := connect(t) mainSrc := ` package main type PotatoSack struct {} ` for i := 0; i < funcCount; i++ { mainSrc += fmt.Sprintf(` func (m *PotatoSack) Potato%d() string { return "potato #%d" } `, i, i) } modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: mainSrc, }). With(daggerExec("mod", "init", "--name=potatoSack", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) var eg errgroup.Group for i := 0; i < funcCount; i++ { i := i // just verify a subset work if i%10 != 0 { continue } eg.Go(func() error { _, err := modGen. With(daggerCall(fmt.Sprintf("potato%d", i))). Sync(ctx) return err }) } require.NoError(t, eg.Wait()) }) t.Run("python sdk", func(t *testing.T) { t.Parallel() c, ctx := connect(t) mainSrc := `from dagger.mod import function ` for i := 0; i < funcCount; i++ { mainSrc += fmt.Sprintf(` @function def potato_%d() -> str: return "potato #%d" `, i, i) } modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("./src/main.py", dagger.ContainerWithNewFileOpts{ Contents: mainSrc, }). With(daggerExec("mod", "init", "--name=potatoSack", "--sdk=python")) var eg errgroup.Group for i := 0; i < funcCount; i++ { i := i // just verify a subset work if i%10 != 0 { continue } eg.Go(func() error { _, err := modGen. With(daggerCall(fmt.Sprintf("potato%d", i))). Sync(ctx) return err }) } require.NoError(t, eg.Wait()) }) } func TestModuleNamespacing(t *testing.T) { t.Parallel() c, ctx := connect(t) moduleSrcPath, err := filepath.Abs("./testdata/modules/go/namespacing") require.NoError(t, err) ctr := c.Container().From(alpineImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithMountedDirectory("/work", c.Host().Directory(moduleSrcPath)). WithWorkdir("/work") out, err := ctr. With(daggerQuery(`{test{fn(s:"yo")}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"test":{"fn":"1:yo 2:yo"}}`, out) } func TestEnvCmd(t *testing.T) { t.Skip("pending conversion to modules") t.Parallel() type testCase struct { environmentPath string expectedSDK string expectedName string expectedRoot string } for _, tc := range []testCase{ { environmentPath: "core/integration/testdata/environments/go/basic", expectedSDK: "go", expectedName: "basic", expectedRoot: "../../../../../../", }, } { tc := tc for _, testGitEnv := range []bool{false, true} { testGitEnv := testGitEnv testName := "local environment" if testGitEnv { testName = "git environment" } testName += "/" + tc.environmentPath t.Run(testName, func(t *testing.T) { t.Parallel() c, ctx := connect(t) stderr, err := CLITestContainer(ctx, t, c). WithLoadedEnv(tc.environmentPath, testGitEnv). CallEnv(). Stderr(ctx) require.NoError(t, err) require.Contains(t, stderr, fmt.Sprintf(`"root": %q`, tc.expectedRoot)) require.Contains(t, stderr, fmt.Sprintf(`"name": %q`, tc.expectedName)) require.Contains(t, stderr, fmt.Sprintf(`"sdk": %q`, tc.expectedSDK)) }) } } } func TestEnvCmdHelps(t *testing.T) { t.Skip("pending conversion to modules") t.Parallel() c, ctx := connect(t) baseCtr := CLITestContainer(ctx, t, c).WithHelpArg(true) // test with no env specified noEnvCtr := baseCtr // test with a valid local env validLocalEnvCtr := baseCtr.WithLoadedEnv("core/integration/testdata/environments/go/basic", false) // test with a broken local env (this helps ensure that we aren't actually running the entrypoints, if we did we'd get an error) brokenLocalEnvCtr := baseCtr.WithLoadedEnv("core/integration/testdata/environments/go/broken", false) for _, ctr := range []*DaggerCLIContainer{noEnvCtr, validLocalEnvCtr, brokenLocalEnvCtr} { type testCase struct { testName string cmdCtr *DaggerCLIContainer expectedOutput string } for _, tc := range []testCase{ { testName: "dagger env/" + ctr.EnvArg, cmdCtr: ctr.CallEnv(), expectedOutput: "Usage:\n dagger environment [flags]\n\nAliases:\n environment, env", }, { testName: "dagger env init/" + ctr.EnvArg, cmdCtr: ctr.CallEnvInit(), expectedOutput: "Usage:\n dagger environment init", }, { testName: "dagger env sync/" + ctr.EnvArg, cmdCtr: ctr.CallEnvSync(), expectedOutput: "Usage:\n dagger environment sync", }, { testName: "dagger env extend/" + ctr.EnvArg, cmdCtr: ctr.CallEnvExtend("./fake/dep"), expectedOutput: "Usage:\n dagger environment extend", }, { testName: "dagger checks/" + ctr.EnvArg, cmdCtr: ctr.CallChecks(), expectedOutput: "Usage:\n dagger checks", }, } { tc := tc t.Run(tc.testName, func(t *testing.T) { t.Parallel() stdout, err := tc.cmdCtr.Stdout(ctx) require.NoError(t, err) require.Contains(t, stdout, tc.expectedOutput) }) } } } func TestEnvCmdInit(t *testing.T) { t.Skip("pending conversion to modules") t.Parallel() type testCase struct { testName string environmentPath string sdk string name string root string expectedErrorMessage string } for _, tc := range []testCase{ { testName: "explicit environment dir/go", environmentPath: "/var/testenvironment/subdir", sdk: "go", name: identity.NewID(), root: "../", }, { testName: "explicit environment dir/python", environmentPath: "/var/testenvironment/subdir", sdk: "python", name: identity.NewID(), root: "../..", }, { testName: "explicit environment file", environmentPath: "/var/testenvironment/subdir/dagger.json", sdk: "python", name: identity.NewID(), }, { testName: "implicit environment", sdk: "go", name: identity.NewID(), }, { testName: "implicit environment with root", environmentPath: "/var/testenvironment", sdk: "python", name: identity.NewID(), root: "..", }, { testName: "invalid sdk", environmentPath: "/var/testenvironment", sdk: "c++--", name: identity.NewID(), expectedErrorMessage: "unsupported environment SDK", }, { testName: "error on git", environmentPath: "git://github.com/dagger/dagger.git", sdk: "go", name: identity.NewID(), expectedErrorMessage: "environment init is not supported for git environments", }, } { tc := tc t.Run(tc.testName, func(t *testing.T) { t.Parallel() c, ctx := connect(t) ctr := CLITestContainer(ctx, t, c). WithEnvArg(tc.environmentPath). WithSDKArg(tc.sdk). WithNameArg(tc.name). CallEnvInit() if tc.expectedErrorMessage != "" { _, err := ctr.Sync(ctx) require.ErrorContains(t, err, tc.expectedErrorMessage) return } expectedConfigPath := tc.environmentPath if !strings.HasSuffix(expectedConfigPath, "dagger.json") { expectedConfigPath = filepath.Join(expectedConfigPath, "dagger.json") } _, err := ctr.File(expectedConfigPath).Contents(ctx) require.NoError(t, err) // TODO: test rest of SDKs once custom codegen is supported if tc.sdk == "go" { codegenFile := filepath.Join(filepath.Dir(expectedConfigPath), "dagger.gen.go") _, err := ctr.File(codegenFile).Contents(ctx) require.NoError(t, err) } stderr, err := ctr.CallEnv().Stderr(ctx) require.NoError(t, err) require.Contains(t, stderr, fmt.Sprintf(`"name": %q`, tc.name)) require.Contains(t, stderr, fmt.Sprintf(`"sdk": %q`, tc.sdk)) }) } t.Run("error on existing environment", func(t *testing.T) { t.Parallel() c, ctx := connect(t) _, err := CLITestContainer(ctx, t, c). WithLoadedEnv("core/integration/testdata/environments/go/basic", false). WithSDKArg("go"). WithNameArg("foo"). CallEnvInit(). Sync(ctx) require.ErrorContains(t, err, "environment init config path already exists") }) } func TestEnvChecks(t *testing.T) { t.Skip("pending conversion to modules") t.Parallel() allChecks := []string{ "cool-static-check", "sad-static-check", "cool-container-check", "sad-container-check", "cool-composite-check", "sad-composite-check", "another-cool-static-check", "another-sad-static-check", "cool-composite-check-from-explicit-dep", "sad-composite-check-from-explicit-dep", "cool-composite-check-from-dynamic-dep", "sad-composite-check-from-dynamic-dep", "cool-check-only-return", "cool-check-result-only-return", "cool-string-only-return", "cool-error-only-return", "sad-error-only-return", "cool-string-error-return", "sad-string-error-return", } compositeCheckToSubcheckNames := map[string][]string{ "cool-composite-check": { "cool-subcheck-a", "cool-subcheck-b", }, "sad-composite-check": { "sad-subcheck-a", "sad-subcheck-b", }, "cool-composite-check-from-explicit-dep": { "another-cool-static-check", "another-cool-container-check", "another-cool-composite-check", }, "sad-composite-check-from-explicit-dep": { "another-sad-static-check", "another-sad-container-check", "another-sad-composite-check", }, "cool-composite-check-from-dynamic-dep": { "yet-another-cool-static-check", "yet-another-cool-container-check", "yet-another-cool-composite-check", }, "sad-composite-check-from-dynamic-dep": { "yet-another-sad-static-check", "yet-another-sad-container-check", "yet-another-sad-composite-check", }, "another-cool-composite-check": { "another-cool-subcheck-a", "another-cool-subcheck-b", }, "another-sad-composite-check": { "another-sad-subcheck-a", "another-sad-subcheck-b", }, "yet-another-cool-composite-check": { "yet-another-cool-subcheck-a", "yet-another-cool-subcheck-b", }, "yet-another-sad-composite-check": { "yet-another-sad-subcheck-a", "yet-another-sad-subcheck-b", }, } // should be aligned w/ `func checkOutput` in ./testdata/environments/go/basic/main.go checkOutput := func(name string) string { return "WE ARE RUNNING CHECK " + strcase.ToKebab(name) } type testCase struct { name string environmentPath string selectedChecks []string expectFailure bool } for _, tc := range []testCase{ { name: "happy-path", environmentPath: "core/integration/testdata/environments/go/basic", selectedChecks: []string{ "cool-static-check", "cool-container-check", "cool-composite-check", "another-cool-static-check", "cool-composite-check-from-explicit-dep", "cool-composite-check-from-dynamic-dep", "cool-check-only-return", "cool-check-result-only-return", "cool-string-only-return", "cool-error-only-return", "cool-string-error-return", }, }, { name: "sad-path", expectFailure: true, environmentPath: "core/integration/testdata/environments/go/basic", selectedChecks: []string{ "sad-static-check", "sad-container-check", "sad-composite-check", "another-sad-static-check", "sad-composite-check-from-explicit-dep", "sad-composite-check-from-dynamic-dep", "sad-error-only-return", "sad-string-error-return", }, }, { name: "mixed-path", expectFailure: true, environmentPath: "core/integration/testdata/environments/go/basic", // run all checks, don't select any }, } { tc := tc for _, testGitEnv := range []bool{false, true} { testGitEnv := testGitEnv testName := tc.name testName += "/gitenv=" + strconv.FormatBool(testGitEnv) testName += "/" + tc.environmentPath t.Run(testName, func(t *testing.T) { t.Parallel() c, ctx := connect(t) stderr, err := CLITestContainer(ctx, t, c). WithLoadedEnv(tc.environmentPath, testGitEnv). CallChecks(tc.selectedChecks...). Stderr(ctx) if tc.expectFailure { require.Error(t, err) execErr := new(dagger.ExecError) require.True(t, errors.As(err, &execErr)) stderr = execErr.Stderr } else { require.NoError(t, err) } selectedChecks := tc.selectedChecks if len(selectedChecks) == 0 { selectedChecks = allChecks } curChecks := selectedChecks for len(curChecks) > 0 { var nextChecks []string for _, checkName := range curChecks { subChecks, ok := compositeCheckToSubcheckNames[checkName] if ok { nextChecks = append(nextChecks, subChecks...) } else { // special case for successful error only check, doesn't have output if checkName == "cool-error-only-return" { continue } require.Contains(t, stderr, checkOutput(checkName)) } } curChecks = nextChecks } }) } } } func daggerExec(args ...string) dagger.WithContainerFunc { return func(c *dagger.Container) *dagger.Container { return c.WithExec(append([]string{"dagger", "--debug"}, args...), dagger.ContainerWithExecOpts{ ExperimentalPrivilegedNesting: true, }) } } func daggerQuery(query string) dagger.WithContainerFunc { return func(c *dagger.Container) *dagger.Container { return c.WithExec([]string{"dagger", "--debug", "query"}, dagger.ContainerWithExecOpts{ Stdin: query, ExperimentalPrivilegedNesting: true, }) } } // TODO: support args func daggerCall(fnName string) dagger.WithContainerFunc { return func(c *dagger.Container) *dagger.Container { return c.WithExec([]string{"dagger", "--debug", "call", fnName}, dagger.ContainerWithExecOpts{ ExperimentalPrivilegedNesting: true, }) } } func goGitBase(t *testing.T, c *dagger.Client) *dagger.Container { t.Helper() return c.Container().From(golangImage). WithExec([]string{"apk", "add", "git"}). WithExec([]string{"git", "config", "--global", "user.email", "dagger@example.com"}). WithExec([]string{"git", "config", "--global", "user.name", "Dagger Tests"}). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithExec([]string{"git", "init"}) } func logGen(ctx context.Context, t *testing.T, modSrc *dagger.Directory) { t.Helper() generated, err := modSrc.File("dagger.gen.go").Contents(ctx) require.NoError(t, err) t.Cleanup(func() { t.Name() fileName := filepath.Join( os.TempDir(), t.Name(), fmt.Sprintf("dagger.gen.%d.go", time.Now().Unix()), ) if err := os.MkdirAll(filepath.Dir(fileName), 0o755); err != nil { t.Logf("failed to create temp dir for generated code: %v", err) return } if err := os.WriteFile(fileName, []byte(generated), 0644); err != nil { t.Logf("failed to write generated code to %s: %v", fileName, err) } else { t.Logf("wrote generated code to %s", fileName) } }) }
closed
dagger/dagger
https://github.com/dagger/dagger
5,904
Zenith: fix handling of list inputs
```go package main import ( "fmt" ) type Test struct{} type Foo struct { Msg string } func (m *Test) TestListInput(foos []Foo) string { return fmt.Sprintf("%+v", foos) } ``` Currently fails when building the module w/ error `41: [0.44s] ./dagger.gen.go:4250:15: undefined: test` Something must have broken in handling of list input types at some point I'm guessing? cc @jedevc @vito This should at least work in terms of codegen, handling it in `dagger call` is also important but probably a separate task, unless of course we already handled it (cc @helderco)
https://github.com/dagger/dagger/issues/5904
https://github.com/dagger/dagger/pull/5907
db901c8fe4c70cc32336e304492ca37f12b8f389
e8ad5c62275172e3d54ae46447e741ff5d603450
"2023-10-16T18:21:57Z"
go
"2023-10-25T19:38:59Z"
core/integration/testdata/modules/go/minimal/main.go
package main import ( "context" "strings" ) type Minimal struct{} func (m *Minimal) Hello() string { return "hello" } func (m *Minimal) Echo(msg string) string { return m.EchoOpts(msg, EchoOpts{ // TODO(vito): gotcha! Because we're calling the method directly, defaults // are not applied. Maybe the default:"..." struct tag should be removed in // favor of handling it at runtime? Maybe it should be kept anyway as a // convenience, and this won't be a common footgun? Suffix: "...", Times: 3, }) } func (m *Minimal) HelloContext(ctx context.Context) string { return "hello context" } func (m *Minimal) EchoContext(ctx context.Context, msg string) string { return m.Echo("ctx." + msg) } func (m *Minimal) HelloStringError(ctx context.Context) (string, error) { return "hello i worked", nil } func (m *Minimal) HelloVoid() {} func (m *Minimal) HelloVoidError() error { return nil } type EchoOpts struct { Suffix string `doc:"String to append to the echoed message." default:"..."` Times int `doc:"Number of times to repeat the message." default:"3"` } func (m *Minimal) EchoOpts(msg string, opts EchoOpts) string { return m.EchoOptsInline(msg, opts) } func (m *Minimal) EchoOptsInline(msg string, opts struct { Suffix string `doc:"String to append to the echoed message." default:"..."` Times int `doc:"Number of times to repeat the message." default:"3"` }) string { msg += opts.Suffix return strings.Repeat(msg, opts.Times) }
closed
dagger/dagger
https://github.com/dagger/dagger
5,904
Zenith: fix handling of list inputs
```go package main import ( "fmt" ) type Test struct{} type Foo struct { Msg string } func (m *Test) TestListInput(foos []Foo) string { return fmt.Sprintf("%+v", foos) } ``` Currently fails when building the module w/ error `41: [0.44s] ./dagger.gen.go:4250:15: undefined: test` Something must have broken in handling of list input types at some point I'm guessing? cc @jedevc @vito This should at least work in terms of codegen, handling it in `dagger call` is also important but probably a separate task, unless of course we already handled it (cc @helderco)
https://github.com/dagger/dagger/issues/5904
https://github.com/dagger/dagger/pull/5907
db901c8fe4c70cc32336e304492ca37f12b8f389
e8ad5c62275172e3d54ae46447e741ff5d603450
"2023-10-16T18:21:57Z"
go
"2023-10-25T19:38:59Z"
docs/current/labs/project-zenith.md
--- slug: /labs/project-zenith title: "Project Zenith" displayed_sidebar: "labs" --- <head> <meta name="robots" content="noindex" /> </head> :::danger This is a short-lived page documenting a future release of Dagger. This release is currently experimental and should not be considered production-ready. If you arrived at this page by accident, you can [return to the official documentation](../index.md). ::: ## Overview _Project Zenith_ is the codename of a future release of Dagger, currently in development. Certain features of Project Zenith are available in Dagger v0.9 with more coming rapidly. The goal of the project is to make Dagger more accessible, by delivering it as a CLI tool rather than just a library. Features of Project Zenith include: - Major expansion of the `dagger` CLI, removing the need to create a custom CLI for each project. - Major expansion of the Dagger API, with a complete cross-language extension and composition system. - An open ecosystem of reusable content, to take advantage of the extension and composition system called the [Daggerverse](https://daggerverse.dev/). ## How to get involved The Dagger Engine is developed in the open, and Project Zenith is no exception. - Discussions take place [on the Dagger Discord](https://discord.gg/dagger-io) in the `#project-zenith` channel. We love to hear from you, and there are no stupid questions! - Contributors and testers meet every Friday at 09:00 Pacific time [on our Discord audio room](https://discord.com/channels/707636530424053791/911305510882513037). If you get stuck, check out the [Troubleshooting guide](#troubleshooting) below. ## How to use it Pre-requisites: - A shell (bash, zsh, etc) - [Docker](https://docs.docker.com/engine/install/) ### Downloading an experimental build Since Dagger version v0.9 ships with Project Zenith functionality enabled, you can simply install the latest v0.9.x release of the Dagger CLI using [the install docs](https://docs.dagger.io/cli/465058/install). :::note Certain experimental Project Zenith features like `dagger call`, `dagger shell`, and `dagger up` are not shown in top level help output, but have help text under `dagger help call` and `dagger help shell`, etc. ::: ## Creating your first Module Create a new directory on your filesystem and run `dagger mod init` to bootstrap your first module. We'll call it `potato` here, but you can choose your favorite food. ```sh mkdir potato/ cd potato/ # initialize Dagger module # NOTE: Node.js modules are not yet available, but under development. dagger mod init --name=potato --sdk=go ``` This will generate a `dagger.json` module file, an initial `main.go` source file, as well as a generated `dagger.gen.go` and `internal` folder for the generated module code. If you like, you can run the generated `main.go` like so: ```sh dagger call my-function --string-arg 'Hello daggernauts!' ``` or ```sh echo '{potato{myFunction(stringArg:"Hello daggernauts!"){id}}}' | dagger query ``` :::note When using `dagger call` to call module functions, do not explicitly use the name of the local or remote module. ::: :::note When using `dagger call`, all names (functions, arguments, struct fields, etc) are converted into a shell-friendly "kebab-case" style. When using `dagger query` and GraphQL, all names are converted into a language-agnostic "camelCase" style. ::: Let's try changing the `main.go`. We named our module `potato`, so that means all methods on the `Potato` type are published as functions. Let's replace the template with something simpler: ```go package main type Potato struct{} func (m *Potato) HelloWorld() string { return "Hello daggernauts!" } ``` Next, run `dagger mod sync`. **You will need to run this command after every change to your module's interface** (e.g. when you add/remove functions or change their parameters and return types). :::note Module functions are flexible in what parameters they can take. You can include an optional `context.Context`, and an optional `error` result. These are all valid variations of the above: ```go func (m *Potato) HelloWorld() string func (m *Potato) HelloWorld() (string, error) func (m *Potato) HelloWorld(ctx context.Context) string func (m *Potato) HelloWorld(ctx context.Context) (string, error) ``` ::: To run the new function, once again use `dagger call` or `dagger query`: ```sh dagger call hello-world ``` or ```sh echo '{potato{helloWorld}}' | dagger query ``` Your functions can accept and return multiple different types, not just basic builtin types. For example, to take an object (which you can use to provide optional parameters, or to group large numbers of parameters together): ```go package main import "fmt" type Potato struct{} type PotatoOptions struct { Count int Mashed bool } func (m *Potato) HelloWorld(opts PotatoOptions) string { if opts.Mashed { return fmt.Sprintf("Hello world, I have mashed %d potatoes", opts.Count) } return fmt.Sprintf("Hello world, I have %d potatoes", opts.Count) } ``` :::note Use `--help` at the end of `dagger call` to get help on the commands and flags available. ::: These options can then be set using `dagger call` or `dagger query` (exactly as if they'd been specified as top-level options): ```sh dagger call hello-world --count 10 --mashed true ``` or ```sh echo '{potato{helloWorld(count:10, mashed:true)}}' | dagger query ``` Or, to return a custom type: ```go package main type Potato struct{} // HACK: to be queried, custom object fields require `json` tags type PotatoMessage struct { Message string `json:"message"` From string `json:"from"` } // HACK: this is temporarily required to ensure that the codegen discovers // PotatoMessage func (msg PotatoMessage) Void() {} func (m *Potato) HelloWorld(message string) PotatoMessage { return PotatoMessage{ Message: message, From: "potato@example.com", } } ``` ```sh dagger call hello-world --message "I am a potato" message dagger call hello-world --message "I am a potato" from ``` or ```sh echo '{potato{helloWorld(message: "I am a potato"){message, from}}}' | dagger query ``` ## More things you can do ### Call other modules Modules can call each other! To add a dependency to your module, you can use `dagger mod use`: ```sh dagger mod use github.com/shykes/daggerverse/helloWorld@26f8ed9f1748ec8c9345281add850fd392441990 ``` This module will be added to your `dagger.json`: ```json "dependencies": [ "github.com/shykes/daggerverse/helloWorld@26f8ed9f1748ec8c9345281add850fd392441990" ] ``` You can also use local modules as dependencies. However, they must be stored in a sub-directory of your module. For example: ```sh dagger mod use ./path/to/module ``` The module will be added to your codegeneration, so you can access it from your own module's code: ```go func (m *Potato) HelloWorld(ctx context.Context) (string, error) { return dag.HelloWorld().Message(ctx) } ``` You can find other modules to use on <https://daggerverse.dev>. #### Module locations You can consume modules from lots of different sources. The easiest way to `dagger use`, `dagger call`, or `dagger query` a module is to reference it by its GitHub URL (similar to Go package strings). For example: ```sh dagger call test -m "github.com/user/repo@main" ``` or ```sh dagger query -m "github.com/user/repo@main" <<EOF query test { ... } EOF ``` or, if your module is in a subdirectory of the Git repository: ```sh dagger call test -m "github.com/user/repo/subdirectory@main" ``` or ```sh dagger query -m "github.com/user/repo/subdirectory@main" <<EOF query test { ... } EOF ``` You can also use modules from the local disk, without needing to push them to GitHub! ```sh dagger call test -m "./path/to/module" ``` or ```sh dagger query -m "./path/to/module" <<EOF query test { ... } EOF ``` #### Publishing your own modules You can publish your own modules to the [Daggerverse](https://daggerverse.dev), so that other users can easily discover them. At the moment, the Daggerverse is only used to discover other modules, all the data is stored and fetched from GitHub. To publish a module, create a Git repository for it and push to GitHub: ```sh # assuming your module is in "potato/" git init git add potato/ git commit -m "Initial commit" git remote add origin git@github.com:<user>/daggerverse.git git push origin main ``` Next, navigate to <https://daggerverse.dev>, and use the top-module bar to paste the GitHub link to your module (`github.com/<user>/daggerverse.git`), then click "Crawl". :::note You don't _have_ to use `daggerverse` as the name of your Git repository -- it's just a handy way to have all your modules in one Git repository together. But you can always split them out into separate repositories, or name it something different if you like! ::: ### Chaining As mentioned above, your functions can return custom objects, which in turn can define new functions! This allows for "chaining" of functions in the same style as the core Dagger API. As long as your object can be JSON-serialized by your SDK, its state will be preserved and passed to the next function in the chain. Here is an example module using the Go SDK: ```go // A dagger module for saying hello world! package main import ( "context" "fmt" ) type HelloWorld struct { Greeting string Name string } func (hello *HelloWorld) WithGreeting(ctx context.Context, greeting string) (*HelloWorld, error) { hello.Greeting = greeting return hello, nil } func (hello *HelloWorld) WithName(ctx context.Context, name string) (*HelloWorld, error) { hello.Name = name return hello, nil } func (hello *HelloWorld) Message(ctx context.Context) (string, error) { var ( greeting = hello.Greeting name = hello.Name ) if greeting == "" { greeting = "Hello" } if name == "" { name = "World" } return fmt.Sprintf("%s, %s!", greeting, name), nil } ``` And here is an example query for this module: ```graphql { helloWorld { message withName(name: "Monde") { withGreeting(greeting: "Bonjour") { message } } } } ``` The result will be: ```json { "helloWorld": { "message": "Hello, World!", "withName": { "withGreeting": { "message": "Bonjour, Monde!" } } } } ``` ## Known issues - A module's public fields require a `json:"foo"` tag to be queriable. - Custom objects in a module require at least one method to be defined on them to be detected by the codegen. - When referencing another module as a local dependency, the dependent module must be stored in a sub-directory of the parent module. - Custom struct types used as parameters cannot be nested and contain other structs themselves. - Calls to functions across modules will be run exactly _once_ per-session -- after that, the result will be cached, but only until the next session (a new `dagger query`, etc). - At some point, we will add more fine-grained cache-control. - Currently, Go and Python are the only supported languages for module development. - Python module development is not yet on par with Go. - Node.js modules are not yet available, but under development. ## Tips and tricks - The context and error return are optional in the module's function signature; remove them if you don't need them. - A module's private fields will not be persisted. ## Troubleshooting Zenith still isn't complete! So, if you come across bugs, it helps to have some techniques for working out what's going on. If you run into problems, please share in the `#zenith-help` channel in the [Dagger Discord](https://discord.gg/dagger-io)! ### Rerun commands with `--focus=false` Sometimes, the Dagger client logs are automatically collapsed and don't contain all the information from a failure. To make sure that logs aren't automatically collapsed, you can run any `dagger` subcommand with the `--focus=false` flag to disable this behavior. ### Access the `docker logs` The Dagger Engine runs in a dedicated container. You can find the container: ```shell DAGGER_ENGINE_DOCKER_CONTAINER="$(docker container list --all --filter 'name=^dagger-engine-*' --format '{{.Names}}')" ``` You can then access the logs for the container: ```shell docker logs $DAGGER_ENGINE_DOCKER_CONTAINER ```
closed
dagger/dagger
https://github.com/dagger/dagger
5,904
Zenith: fix handling of list inputs
```go package main import ( "fmt" ) type Test struct{} type Foo struct { Msg string } func (m *Test) TestListInput(foos []Foo) string { return fmt.Sprintf("%+v", foos) } ``` Currently fails when building the module w/ error `41: [0.44s] ./dagger.gen.go:4250:15: undefined: test` Something must have broken in handling of list input types at some point I'm guessing? cc @jedevc @vito This should at least work in terms of codegen, handling it in `dagger call` is also important but probably a separate task, unless of course we already handled it (cc @helderco)
https://github.com/dagger/dagger/issues/5904
https://github.com/dagger/dagger/pull/5907
db901c8fe4c70cc32336e304492ca37f12b8f389
e8ad5c62275172e3d54ae46447e741ff5d603450
"2023-10-16T18:21:57Z"
go
"2023-10-25T19:38:59Z"
go.mod
module github.com/dagger/dagger go 1.20 replace dagger.io/dagger => ./sdk/go replace github.com/dagger/dagger/internal/mage => ./internal/mage require ( dagger.io/dagger v0.9.0 github.com/99designs/gqlgen v0.17.34 // indirect github.com/armon/circbuf v0.0.0-20190214190532-5111143e8da2 // indirect github.com/aws/aws-sdk-go-v2/config v1.18.21 // indirect github.com/aws/aws-sdk-go-v2/credentials v1.13.20 // indirect github.com/aws/aws-sdk-go-v2/service/s3 v1.31.3 // indirect github.com/charmbracelet/bubbles v0.16.1 github.com/charmbracelet/bubbletea v0.24.2 github.com/containerd/containerd v1.7.2 github.com/containerd/fuse-overlayfs-snapshotter v1.0.6 github.com/containerd/stargz-snapshotter v0.14.3 github.com/containernetworking/cni v1.1.2 github.com/coreos/go-systemd/v22 v22.5.0 github.com/dagger/graphql v0.0.0-20230919174923-21d038582a21 github.com/dagger/graphql-go-tools v0.0.0-20231012004527-77189e400b6e github.com/docker/distribution v2.8.2+incompatible github.com/google/go-containerregistry v0.15.2 github.com/google/uuid v1.3.0 github.com/iancoleman/strcase v0.3.0 // https://github.com/moby/buildkit/commit/86e25b3ad8c20fc420669949f24bb86c74082b2f github.com/moby/buildkit v0.13.0-beta1.0.20231011161957-86e25b3ad8c2 github.com/opencontainers/go-digest v1.0.0 github.com/opencontainers/image-spec v1.1.0-rc3 github.com/opencontainers/runtime-spec v1.1.0-rc.2 github.com/pelletier/go-toml v1.9.5 github.com/pkg/errors v0.9.1 github.com/sirupsen/logrus v1.9.3 github.com/spf13/cobra v1.7.0 github.com/stretchr/testify v1.8.4 github.com/tonistiigi/fsutil v0.0.0-20230629203738-36ef4d8c0dbb github.com/urfave/cli v1.22.12 github.com/weaveworks/common v0.0.0-20230119144549-0aaa5abd1e63 github.com/zeebo/xxh3 v1.0.2 go.etcd.io/bbolt v1.3.7 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.45.0 go.opentelemetry.io/otel v1.19.0 go.opentelemetry.io/otel/exporters/jaeger v1.17.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0 go.opentelemetry.io/otel/sdk v1.19.0 go.opentelemetry.io/otel/trace v1.19.0 go.opentelemetry.io/proto/otlp v1.0.0 golang.org/x/crypto v0.14.0 golang.org/x/mod v0.13.0 golang.org/x/sync v0.4.0 golang.org/x/sys v0.13.0 golang.org/x/term v0.13.0 google.golang.org/grpc v1.58.2 oss.terrastruct.com/d2 v0.4.0 ) require ( github.com/blang/semver v3.5.1+incompatible github.com/charmbracelet/lipgloss v0.8.0 github.com/dagger/dagger/internal/mage v0.0.0-00010101000000-000000000000 github.com/dave/jennifer v1.7.0 github.com/dschmidt/go-layerfs v0.1.0 github.com/fatih/structtag v1.2.0 github.com/go-git/go-git/v5 v5.9.0 github.com/gogo/protobuf v1.3.2 github.com/google/go-github/v50 v50.2.0 github.com/gorilla/websocket v1.5.0 github.com/icholy/replace v0.6.0 github.com/jackpal/gateway v1.0.7 github.com/juju/ansiterm v1.0.0 github.com/koron-go/prefixw v1.0.0 github.com/mackerelio/go-osstat v0.2.4 github.com/mattn/go-isatty v0.0.19 github.com/moby/sys/mount v0.3.3 github.com/muesli/termenv v0.15.2 github.com/nxadm/tail v1.4.8 github.com/opencontainers/runc v1.1.9 github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 github.com/prometheus/procfs v0.12.0 github.com/psanford/memfs v0.0.0-20230130182539-4dbf7e3e865e github.com/rs/cors v1.10.0 github.com/rs/zerolog v1.30.0 github.com/shurcooL/graphql v0.0.0-20220606043923-3cf50f8a0a29 github.com/vito/midterm v0.1.4 github.com/vito/progrock v0.10.2-0.20230913234310-64b4a1cfb007 golang.org/x/exp v0.0.0-20231006140011-7918f672742d golang.org/x/oauth2 v0.13.0 golang.org/x/tools v0.14.0 ) require ( github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect github.com/muesli/cancelreader v0.2.2 // indirect github.com/muesli/reflow v0.3.0 // indirect ) require ( cdr.dev/slog v1.4.2 // indirect dario.cat/mergo v1.0.0 // indirect github.com/AdaLogics/go-fuzz-headers v0.0.0-20230106234847-43070de90fa1 // indirect github.com/Azure/azure-sdk-for-go/sdk/azcore v1.1.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.1.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.4.1 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v0.6.0 // indirect github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect github.com/PuerkitoBio/goquery v1.8.1 // indirect github.com/acomagu/bufpipe v1.0.4 // indirect github.com/agnivade/levenshtein v1.1.1 // indirect github.com/alecthomas/chroma v0.10.0 // indirect github.com/alecthomas/chroma/v2 v2.7.0 // indirect github.com/anchore/go-struct-converter v0.0.0-20221118182256-c68fdcfa2092 // indirect github.com/andybalholm/cascadia v1.3.1 // indirect github.com/aws/aws-sdk-go-v2 v1.17.8 // indirect github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.10 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.2 // indirect github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.62 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.32 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.26 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.3.33 // indirect github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.24 // indirect github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.11 // indirect github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.27 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.26 // indirect github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.14.1 // indirect github.com/aws/aws-sdk-go-v2/service/sso v1.12.8 // indirect github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.8 // indirect github.com/aws/aws-sdk-go-v2/service/sts v1.18.9 // indirect github.com/aws/smithy-go v1.13.5 // indirect github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/charmbracelet/harmonica v0.2.0 // indirect github.com/cloudflare/circl v1.3.3 // indirect github.com/containerd/go-cni v1.1.9 // indirect github.com/containerd/go-runc v1.1.0 // indirect github.com/containerd/typeurl/v2 v2.1.1 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect github.com/cyphar/filepath-securejoin v0.2.4 // indirect github.com/dimchansky/utfbom v1.1.1 // indirect github.com/distribution/reference v0.5.0 // indirect github.com/dlclark/regexp2 v1.9.0 // indirect github.com/docker/go-metrics v0.0.1 // indirect github.com/dop251/goja v0.0.0-20230402114112-623f9dda9079 // indirect github.com/emirpasic/gods v1.18.1 // indirect github.com/fatih/color v1.15.0 // indirect github.com/fogleman/ease v0.0.0-20170301025033-8da417bf1776 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect github.com/go-git/go-billy/v5 v5.5.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.5.1 // indirect github.com/go-sourcemap/sourcemap v2.1.3+incompatible // indirect github.com/golang-jwt/jwt/v4 v4.4.2 // indirect github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect github.com/google/go-cmp v0.5.9 // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/google/pprof v0.0.0-20230406165453-00490a63f317 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect github.com/hanwen/go-fuse/v2 v2.2.0 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/go-retryablehttp v0.7.2 // indirect github.com/hashicorp/golang-lru v0.5.4 // indirect github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jonboulle/clockwork v0.4.0 // indirect github.com/jung-kurt/gofpdf v1.16.2 // indirect github.com/kevinburke/ssh_config v1.2.0 // indirect github.com/klauspost/cpuid/v2 v2.0.9 // indirect github.com/kylelemons/godebug v1.1.0 // indirect github.com/lucasb-eyer/go-colorful v1.2.0 // indirect github.com/lunixbochs/vtclean v1.0.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-localereader v0.0.1 // indirect github.com/mattn/go-runewidth v0.0.14 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/mazznoer/csscolorparser v0.1.3 // indirect github.com/mitchellh/hashstructure/v2 v2.0.2 // indirect github.com/moby/sys/mountinfo v0.6.2 // indirect github.com/moby/sys/sequential v0.5.0 // indirect github.com/opencontainers/selinux v1.11.0 // indirect github.com/package-url/packageurl-go v0.1.1-0.20220428063043-89078438f170 // indirect github.com/pjbgf/sha1cd v0.3.0 // indirect github.com/pkg/profile v1.5.0 // indirect github.com/prometheus/client_golang v1.14.0 // indirect github.com/prometheus/client_model v0.3.0 // indirect github.com/prometheus/common v0.42.0 // indirect github.com/rivo/uniseg v0.4.4 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/sergi/go-diff v1.3.1 // indirect github.com/skeema/knownhosts v1.2.0 // indirect github.com/spdx/tools-golang v0.5.1 // indirect github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.0 // indirect github.com/tonistiigi/go-actions-cache v0.0.0-20220404170428-0bdeb6e1eac7 // indirect github.com/tonistiigi/go-archvariant v1.0.0 // indirect github.com/tonistiigi/vt100 v0.0.0-20230623042737-f9a4f7ef6531 // indirect github.com/weaveworks/promrus v1.2.0 // indirect github.com/xanzy/ssh-agent v0.3.3 // indirect github.com/yuin/goldmark v1.5.4 // indirect github.com/zmb3/spotify/v2 v2.3.1 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.45.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0 // indirect go.opentelemetry.io/otel/metric v1.19.0 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/image v0.7.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect gonum.org/v1/plot v0.12.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect oss.terrastruct.com/util-go v0.0.0-20230320053557-dcb5aac7d972 // indirect ) require ( github.com/Khan/genqlient v0.6.0 github.com/Microsoft/go-winio v0.6.1 // indirect github.com/Microsoft/hcsshim v0.10.0-rc.8 // indirect github.com/adrg/xdg v0.4.0 github.com/agext/levenshtein v1.2.3 // indirect github.com/cenkalti/backoff/v4 v4.2.1 github.com/containerd/cgroups v1.1.0 // indirect github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 // indirect github.com/containerd/continuity v0.4.1 github.com/containerd/fifo v1.1.0 // indirect github.com/containerd/nydus-snapshotter v0.8.2 // indirect github.com/containerd/stargz-snapshotter/estargz v0.14.3 // indirect github.com/containerd/ttrpc v1.2.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/docker/cli v24.0.5+incompatible github.com/docker/docker v24.0.0-rc.2.0.20230905130451-032797ea4bcb+incompatible github.com/docker/docker-credential-helpers v0.7.0 // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/felixge/httpsnoop v1.0.3 // indirect github.com/go-logr/logr v1.2.4 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/gofrs/flock v0.8.1 github.com/gogo/googleapis v1.4.1 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 github.com/in-toto/in-toto-golang v0.5.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/klauspost/compress v1.16.5 github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/moby/locker v1.0.1 github.com/moby/patternmatcher v0.6.0 // indirect github.com/moby/sys/signal v0.7.0 // indirect github.com/morikuni/aec v1.0.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/secure-systems-lab/go-securesystemslib v0.4.0 // indirect github.com/shibumi/go-pathspec v1.3.0 // indirect github.com/spf13/pflag v1.0.5 github.com/tidwall/gjson v1.15.0 github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea github.com/vbatts/tar-split v0.11.3 // indirect github.com/vektah/gqlparser/v2 v2.5.6 go.opencensus.io v0.24.0 // indirect golang.org/x/net v0.16.0 golang.org/x/text v0.13.0 golang.org/x/time v0.3.0 // indirect google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98 // indirect google.golang.org/protobuf v1.31.0 gopkg.in/yaml.v3 v3.0.1 )
closed
dagger/dagger
https://github.com/dagger/dagger
5,904
Zenith: fix handling of list inputs
```go package main import ( "fmt" ) type Test struct{} type Foo struct { Msg string } func (m *Test) TestListInput(foos []Foo) string { return fmt.Sprintf("%+v", foos) } ``` Currently fails when building the module w/ error `41: [0.44s] ./dagger.gen.go:4250:15: undefined: test` Something must have broken in handling of list input types at some point I'm guessing? cc @jedevc @vito This should at least work in terms of codegen, handling it in `dagger call` is also important but probably a separate task, unless of course we already handled it (cc @helderco)
https://github.com/dagger/dagger/issues/5904
https://github.com/dagger/dagger/pull/5907
db901c8fe4c70cc32336e304492ca37f12b8f389
e8ad5c62275172e3d54ae46447e741ff5d603450
"2023-10-16T18:21:57Z"
go
"2023-10-25T19:38:59Z"
go.sum
bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= bazil.org/fuse v0.0.0-20180421153158-65cc252bf669/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= cdr.dev/slog v1.4.2 h1:fIfiqASYQFJBZiASwL825atyzeA96NsqSxx2aL61P8I= cdr.dev/slog v1.4.2/go.mod h1:0EkH+GkFNxizNR+GAXUEdUHanxUH5t9zqPILmPM/Vn8= cloud.google.com/go v0.25.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.31.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.37.2/go.mod h1:H8IAquKe2L30IxoupDgqTaQvKSwF/c8prYHynGIWQbA= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.39.0/go.mod h1:rVLT6fkc8chs9sfPtFc1SBH6em7n+ZoXaG+87tDISts= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= cloud.google.com/go v0.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw= cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= cloud.google.com/go v0.110.4 h1:1JYyxKMN9hd5dR2MYTPWkGUgcoxVVhg0LKNKEo0qvmk= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= cloud.google.com/go/compute v1.21.0 h1:JNBsyXVoOoNJtTQcnEY5uYpZIbeCTYIeDe0Xh1bySMk= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= cloud.google.com/go/logging v1.7.0 h1:CJYxlNNNNAMkHp9em/YEXcfJg+rPDg7YfwoRpMU+t5I= cloud.google.com/go/longrunning v0.5.1 h1:Fr7TXftcqTudoyRJa113hyaqlGdiBQkp0Gq7tErFDWI= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= code.gitea.io/sdk/gitea v0.12.0/go.mod h1:z3uwDV/b9Ls47NGukYM9XhnHtqPh/J+t40lsUrR6JDY= contrib.go.opencensus.io/exporter/aws v0.0.0-20181029163544-2befc13012d0/go.mod h1:uu1P0UCM/6RbsMrgPa98ll8ZcHM858i/AD06a9aLRCA= contrib.go.opencensus.io/exporter/ocagent v0.5.0/go.mod h1:ImxhfLRpxoYiSq891pBrLVhN+qmP8BTVvdH2YLs7Gl0= contrib.go.opencensus.io/exporter/stackdriver v0.12.1/go.mod h1:iwB6wGarfphGGe/e5CWqyUk/cLzKnWsOKPVW3no6OTw= contrib.go.opencensus.io/integrations/ocsql v0.1.4/go.mod h1:8DsSdjz3F+APR+0z0WkU1aRorQCFfRxvqjUUPMbF3fE= contrib.go.opencensus.io/resource v0.1.1/go.mod h1:F361eGI91LCmW1I/Saf+rX0+OFcigGlFvXwEGEnkRLA= dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= git.apache.org/thrift.git v0.12.0/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= git.sr.ht/~sbinet/gg v0.3.1 h1:LNhjNn8DerC8f9DHLz6lS0YYul/b602DUxDgGkd/Aik= github.com/99designs/gqlgen v0.17.34 h1:5cS5/OKFguQt+Ws56uj9FlG2xm1IlcJWNF2jrMIKYFQ= github.com/99designs/gqlgen v0.17.34/go.mod h1:Axcd3jIFHBVcqzixujJQr1wGqE+lGTpz6u4iZBZg1G8= github.com/AdaLogics/go-fuzz-headers v0.0.0-20230106234847-43070de90fa1 h1:EKPd1INOIyr5hWOWhvpmQpY6tKjeG0hT1s3AMC/9fic= github.com/AdaLogics/go-fuzz-headers v0.0.0-20230106234847-43070de90fa1/go.mod h1:VzwV+t+dZ9j/H867F1M2ziD+yLHtB46oM35FxxMJ4d0= github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20221215162035-5330a85ea652 h1:+vTEFqeoeur6XSq06bs+roX3YiT49gUniJK7Zky7Xjg= github.com/AkihiroSuda/containerd-fuse-overlayfs v1.0.0/go.mod h1:0mMDvQFeLbbn1Wy8P2j3hwFhqBq+FKn8OZPno8WLmp8= github.com/Azure/azure-amqp-common-go/v2 v2.1.0/go.mod h1:R8rea+gJRuJR6QxTir/XuEd+YuKoUiazDC/N96FiDEU= github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4= github.com/Azure/azure-pipeline-go v0.2.2/go.mod h1:4rQ/NZncSvGqNkkOsNpOU1tgoNuIlp9AfUH5G1tvCHc= github.com/Azure/azure-sdk-for-go v16.2.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go v19.1.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go v29.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go v30.1.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go v35.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go v38.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go v42.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.1.0 h1:Ut0ZGdOwJDw0npYEg+TLlPls3Pq6JiZaP2/aGKir7Zw= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.1.0/go.mod h1:uGG2W01BaETf0Ozp+QxxKJdMBNRWPdstHG0Fmdwn1/U= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.1.0 h1:QkAcEIAKbNL4KoFr4SathZPhDhF4mVwpBMFlYjyAqy8= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.1.0/go.mod h1:bhXu1AjYL+wutSL/kpSq6s7733q2Rb0yuot9Zgfqa/0= github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0 h1:jp0dGvZ7ZK0mgqnTSClMxa5xuRL7NZgHameVYF6BurY= github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0/go.mod h1:eWRD7oawr1Mu1sLCawqVc0CUiF43ia3qQMxLscsKQ9w= github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.4.1 h1:QSdcrd/UFJv6Bp/CfoVf2SrENpFn9P6Yh8yb+xNhYMM= github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.4.1/go.mod h1:eZ4g6GUvXiGulfIbbhh1Xr4XwUYaYaWMqzGD/284wCA= github.com/Azure/azure-service-bus-go v0.9.1/go.mod h1:yzBx6/BUGfjfeqbRZny9AQIbIe3AcV9WZbAdpkoXOa0= github.com/Azure/azure-storage-blob-go v0.8.0/go.mod h1:lPI3aLPpuLTeUwh1sViKXFxwl2B6teiRqI0deQUvsw0= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-autorest v10.8.1+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest v10.15.5+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest v12.0.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest v14.1.1+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= github.com/Azure/go-autorest/autorest v0.9.3/go.mod h1:GsRuLYvwzLjjjRoWEIyMUaYq8GNUx2nRB378IPt/1p0= github.com/Azure/go-autorest/autorest v0.9.6/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= github.com/Azure/go-autorest/autorest v0.10.2/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= github.com/Azure/go-autorest/autorest/adal v0.8.1/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= github.com/Azure/go-autorest/autorest/adal v0.8.2/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= github.com/Azure/go-autorest/autorest/adal v0.8.3/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= github.com/Azure/go-autorest/autorest/azure/auth v0.4.2/go.mod h1:90gmfKdlmKgfjUpnCEpOJzsUEjrWDSLwHIG73tSXddM= github.com/Azure/go-autorest/autorest/azure/cli v0.3.1/go.mod h1:ZG5p860J94/0kI9mNJVoIoLgXcirM2gF5i2kWloofxw= github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= github.com/Azure/go-autorest/autorest/to v0.2.0/go.mod h1:GunWKJp1AEqgMaGLV+iocmRAJWqST1wQYhyyjXJ3SJc= github.com/Azure/go-autorest/autorest/to v0.3.0/go.mod h1:MgwOyqaIuKdG4TL/2ywSsIWKAfJfgHDo8ObuUk3t5sA= github.com/Azure/go-autorest/autorest/validation v0.1.0/go.mod h1:Ha3z/SqBeaalWQvokg3NZAlQTalVMtOIAs1aGK7G6u8= github.com/Azure/go-autorest/autorest/validation v0.2.0/go.mod h1:3EEqHnBxQGHXRYq3HT1WyXAvT7LLY3tl70hw6tQIbjI= github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/AzureAD/microsoft-authentication-library-for-go v0.6.0 h1:XMEdVDFxgulDDl0lQmAZS6j8gRQ/0pJ+ZpXH2FHVtDc= github.com/AzureAD/microsoft-authentication-library-for-go v0.6.0/go.mod h1:BDJ5qMFKx9DugEg3+uQSDCdbYPr5s9vBTrL9P8TpqOU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/Djarvur/go-err113 v0.0.0-20200410182137-af658d038157/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= github.com/Djarvur/go-err113 v0.1.0/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= github.com/GoogleCloudPlatform/cloudsql-proxy v0.0.0-20191009163259-e802c2cb94ae/go.mod h1:mjwGPas4yKduTyubHvD1Atl9r1rUq8DfVy+gkVvZ+oo= github.com/GoogleCloudPlatform/k8s-cloud-provider v0.0.0-20190822182118-27a4ced34534/go.mod h1:iroGtC8B3tQiqtds1l+mgk/BBOrxbqjH+eUfFQYRc14= github.com/Khan/genqlient v0.6.0 h1:Bwb1170ekuNIVIwTJEqvO8y7RxBxXu639VJOkKSrwAk= github.com/Khan/genqlient v0.6.0/go.mod h1:rvChwWVTqXhiapdhLDV4bp9tz/Xvtewwkon4DpWWCRM= github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/Masterminds/semver/v3 v3.0.3/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= github.com/Masterminds/semver/v3 v3.1.0 h1:Y2lUDsFKVRSYGojLJ1yLxSXdMmMYTYls0rCvoqmMUQk= github.com/Masterminds/semver/v3 v3.1.0/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= github.com/Microsoft/go-winio v0.4.15-0.20200908182639-5b44b70ab3ab/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= github.com/Microsoft/go-winio v0.4.15/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/Microsoft/hcsshim v0.8.7/go.mod h1:OHd7sQqRFrYd3RmSgbgji+ctCwkbq2wbEYNSzOYtcBQ= github.com/Microsoft/hcsshim v0.8.9/go.mod h1:5692vkUqntj1idxauYlpoINNKeqCiG6Sg38RRsjT5y8= github.com/Microsoft/hcsshim v0.8.10/go.mod h1:g5uw8EV2mAlzqe94tfNBNdr89fnbD/n3HV0OhsddkmM= github.com/Microsoft/hcsshim v0.10.0-rc.8 h1:YSZVvlIIDD1UxQpJp0h+dnpLUw+TrY0cx8obKsp3bek= github.com/Microsoft/hcsshim v0.10.0-rc.8/go.mod h1:OEthFdQv/AD2RAdzR6Mm1N1KPCztGKDurW1Z8b8VGMM= github.com/Microsoft/hcsshim/test v0.0.0-20200826032352-301c83a30e7c/go.mod h1:30A5igQ91GEmhYJF8TaRP79pMBOYynRsyOByfVV0dU4= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/OpenPeeDeeP/depguard v1.0.1/go.mod h1:xsIw86fROiiwelg+jB2uM9PiKihMMmUx/1V+TNhjQvM= github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 h1:kkhsdkhsCvIsutKu5zLMgWtgh9YxGCNAw8Ad8hjwfYg= github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= github.com/PuerkitoBio/goquery v1.8.1 h1:uQxhNlArOIdbrH1tr0UXwdVFgDcZDrZVdcpygAcwmWM= github.com/PuerkitoBio/goquery v1.8.1/go.mod h1:Q8ICL1kNUJ2sXGoAhPGUdYDJvgQgHzJsnnd3H7Ho5jQ= github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= github.com/acomagu/bufpipe v1.0.4 h1:e3H4WUzM3npvo5uv95QuJM3cQspFNtFBzvJ2oNjKIDQ= github.com/acomagu/bufpipe v1.0.4/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= github.com/adrg/xdg v0.4.0 h1:RzRqFcjH4nE5C6oTAxhBtoE2IRyjBSa62SCbyPidvls= github.com/adrg/xdg v0.4.0/go.mod h1:N6ag73EX4wyxeaoeHctc1mas01KZgsj5tYiAIwqJE/E= github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRBij0P8= github.com/agnivade/levenshtein v1.1.1/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo= github.com/ajstarks/svgo v0.0.0-20211024235047-1546f124cd8b h1:slYM766cy2nI3BwyRiyQj/Ud48djTMtMebDqepE95rw= github.com/alecthomas/assert/v2 v2.2.1 h1:XivOgYcduV98QCahG8T5XTezV5bylXe+lBxLG2K2ink= github.com/alecthomas/chroma v0.10.0 h1:7XDcGkCQopCNKjZHfYrNLraA+M7e0fMiJ/Mfikbfjek= github.com/alecthomas/chroma v0.10.0/go.mod h1:jtJATyUxlIORhUOFNA9NZDWGAQ8wpxQQqNSB4rjA/1s= github.com/alecthomas/chroma/v2 v2.7.0 h1:hm1rY6c/Ob4eGclpQ7X/A3yhqBOZNUTk9q+yhyLIViI= github.com/alecthomas/chroma/v2 v2.7.0/go.mod h1:yrkMI9807G1ROx13fhe1v6PN2DDeaR73L3d+1nmYQtw= github.com/alecthomas/kingpin v2.2.6+incompatible/go.mod h1:59OFYbFVLKQKq+mqrL6Rw5bR0c3ACQaawgXx0QYndlE= github.com/alecthomas/repr v0.2.0 h1:HAzS41CIzNW5syS8Mf9UwXhNH1J9aix/BvDRf1Ml2Yk= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= github.com/anchore/go-struct-converter v0.0.0-20221118182256-c68fdcfa2092 h1:aM1rlcoLz8y5B2r4tTLMiVTrMtpfY0O8EScKJxaSaEc= github.com/anchore/go-struct-converter v0.0.0-20221118182256-c68fdcfa2092/go.mod h1:rYqSE9HbjzpHTI74vwPvae4ZVYZd1lue2ta6xHPdblA= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/andybalholm/cascadia v1.3.1 h1:nhxRkql1kdYCc8Snf7D5/D3spOX+dBgjA6u8x004T2c= github.com/andybalholm/cascadia v1.3.1/go.mod h1:R4bJ1UQfqADjvDa4P6HZHLh/3OxWWEqc0Sk8XGwHqvA= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apex/log v1.1.4/go.mod h1:AlpoD9aScyQfJDVHmLMEcx4oU6LqzkWp4Mg9GdAcEvQ= github.com/apex/log v1.3.0/go.mod h1:jd8Vpsr46WAe3EZSQ/IUMs2qQD/GOycT5rPWCO1yGcs= github.com/apex/logs v0.0.4/go.mod h1:XzxuLZ5myVHDy9SAmYpamKKRNApGj54PfYLcFrXqDwo= github.com/aphistic/golf v0.0.0-20180712155816-02c07f170c5a/go.mod h1:3NqKYiepwy8kCu4PNA+aP7WUV72eXWJeP9/r3/K9aLE= github.com/aphistic/sweet v0.2.0/go.mod h1:fWDlIh/isSE9n6EPsRmC0det+whmX6dJid3stzu0Xys= github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0 h1:jfIu9sQUG6Ig+0+Ap1h4unLjW6YQJpKZVmUzxsD4E/Q= github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0/go.mod h1:t2tdKJDJF9BV14lnkjHmOQgcvEKgtqs5a1N3LNdJhGE= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/circbuf v0.0.0-20190214190532-5111143e8da2 h1:7Ip0wMmLHLRJdrloDxZfhMm0xrLXZS8+COSu2bXmEQs= github.com/armon/circbuf v0.0.0-20190214190532-5111143e8da2/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= github.com/aws/aws-sdk-go v1.15.27/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= github.com/aws/aws-sdk-go v1.15.90/go.mod h1:es1KtYUFs7le0xQ3rOihkuoVD90z7D0fR2Qm4S00/gU= github.com/aws/aws-sdk-go v1.16.26/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.19.18/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.19.45/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.20.6/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.25.11/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.27.1/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.31.6/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= github.com/aws/aws-sdk-go-v2 v1.17.8 h1:GMupCNNI7FARX27L7GjCJM8NgivWbRgpjNI/hOQjFS8= github.com/aws/aws-sdk-go-v2 v1.17.8/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.10 h1:dK82zF6kkPeCo8J1e+tGx4JdvDIQzj7ygIoLg8WMuGs= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.10/go.mod h1:VeTZetY5KRJLuD/7fkQXMU6Mw7H5m/KP2J5Iy9osMno= github.com/aws/aws-sdk-go-v2/config v1.18.21 h1:ENTXWKwE8b9YXgQCsruGLhvA9bhg+RqAsL9XEMEsa2c= github.com/aws/aws-sdk-go-v2/config v1.18.21/go.mod h1:+jPQiVPz1diRnjj6VGqWcLK6EzNmQ42l7J3OqGTLsSY= github.com/aws/aws-sdk-go-v2/credentials v1.13.20 h1:oZCEFcrMppP/CNiS8myzv9JgOzq2s0d3v3MXYil/mxQ= github.com/aws/aws-sdk-go-v2/credentials v1.13.20/go.mod h1:xtZnXErtbZ8YGXC3+8WfajpMBn5Ga/3ojZdxHq6iI8o= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.2 h1:jOzQAesnBFDmz93feqKnsTHsXrlwWORNZMFHMV+WLFU= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.2/go.mod h1:cDh1p6XkSGSwSRIArWRc6+UqAQ7x4alQ0QfpVR6f+co= github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.62 h1:LhVbe/UDWvBT/jp5LYAweFVH8s+DNtT07Qp2riWEovU= github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.62/go.mod h1:4xCuu1TSwhW5UH6WOdtS4/x/9UfMr2XplzKc86Ffj78= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.32 h1:dpbVNUjczQ8Ae3QKHbpHBpfvaVkRdesxpTOe9pTouhU= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.32/go.mod h1:RudqOgadTWdcS3t/erPQo24pcVEoYyqj/kKW5Vya21I= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.26 h1:QH2kOS3Ht7x+u0gHCh06CXL/h6G8LQJFpZfFBYBNboo= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.26/go.mod h1:vq86l7956VgFr0/FWQ2BWnK07QC3WYsepKzy33qqY5U= github.com/aws/aws-sdk-go-v2/internal/ini v1.3.33 h1:HbH1VjUgrCdLJ+4lnnuLI4iVNRvBbBELGaJ5f69ClA8= github.com/aws/aws-sdk-go-v2/internal/ini v1.3.33/go.mod h1:zG2FcwjQarWaqXSCGpgcr3RSjZ6dHGguZSppUL0XR7Q= github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.24 h1:zsg+5ouVLLbePknVZlUMm1ptwyQLkjjLMWnN+kVs5dA= github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.24/go.mod h1:+fFaIjycTmpV6hjmPTbyU9Kp5MI/lA+bbibcAtmlhYA= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.11 h1:y2+VQzC6Zh2ojtV2LoC0MNwHWc6qXv/j2vrQtlftkdA= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.11/go.mod h1:iV4q2hsqtNECrfmlXyord9u4zyuFEJX9eLgLpSPzWA8= github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.27 h1:qIw7Hg5eJEc1uSxg3hRwAthPAO7NeOd4dPxhaTi0yB0= github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.27/go.mod h1:Zz0kvhcSlu3NX4XJkaGgdjaa+u7a9LYuy8JKxA5v3RM= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.26 h1:uUt4XctZLhl9wBE1L8lobU3bVN8SNUP7T+olb0bWBO4= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.26/go.mod h1:Bd4C/4PkVGubtNe5iMXu5BNnaBi/9t/UsFspPt4ram8= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.14.1 h1:lRWp3bNu5wy0X3a8GS42JvZFlv++AKsMdzEnoiVJrkg= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.14.1/go.mod h1:VXBHSxdN46bsJrkniN68psSwbyBKsazQfU2yX/iSDso= github.com/aws/aws-sdk-go-v2/service/s3 v1.31.3 h1:MG+2UlhyBL3oCOoHbUQh+Sqr3elN0I5PBe0MtVh0xMg= github.com/aws/aws-sdk-go-v2/service/s3 v1.31.3/go.mod h1:aSl9/LJltSz1cVusiR/Mu8tvI4Sv/5w/WWrJmmkNii0= github.com/aws/aws-sdk-go-v2/service/sso v1.12.8 h1:5cb3D6xb006bPTqEfCNaEA6PPEfBXxxy4NNeX/44kGk= github.com/aws/aws-sdk-go-v2/service/sso v1.12.8/go.mod h1:GNIveDnP+aE3jujyUSH5aZ/rktsTM5EvtKnCqBZawdw= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.8 h1:NZaj0ngZMzsubWZbrEFSB4rgSQRbFq38Sd6KBxHuOIU= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.8/go.mod h1:44qFP1g7pfd+U+sQHLPalAPKnyfTZjJsYR4xIwsJy5o= github.com/aws/aws-sdk-go-v2/service/sts v1.18.9 h1:Qf1aWwnsNkyAoqDqmdM3nHwN78XQjec27LjM6b9vyfI= github.com/aws/aws-sdk-go-v2/service/sts v1.18.9/go.mod h1:yyW88BEPXA2fGFyI2KCcZC3dNpiT0CZAHaF+i656/tQ= github.com/aws/smithy-go v1.13.5 h1:hgz0X/DX0dGqTYpGALqXJoRKRj5oQ7150i5FdTePzO8= github.com/aws/smithy-go v1.13.5/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59/go.mod h1:q/89r3U2H7sSsE2t6Kca0lfwTK8JdoNGS/yzM/4iH5I= github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8= github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/blakesmith/ar v0.0.0-20190502131153-809d4375e1fb/go.mod h1:PkYb9DJNAwrSvRx5DYA+gUcOIgTGVMNkfSCbZM8cWpI= github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= github.com/bombsimon/wsl/v2 v2.0.0/go.mod h1:mf25kr/SqFEPhhcxW1+7pxzGlW+hIl/hYTKY95VwV8U= github.com/bombsimon/wsl/v2 v2.2.0/go.mod h1:Azh8c3XGEJl9LyX0/sFC+CKMc7Ssgua0g+6abzXN4Pg= github.com/bombsimon/wsl/v3 v3.0.0/go.mod h1:st10JtZYLE4D5sC7b8xV4zTKZwAQjCH/Hy2Pm1FNZIc= github.com/bombsimon/wsl/v3 v3.1.0/go.mod h1:st10JtZYLE4D5sC7b8xV4zTKZwAQjCH/Hy2Pm1FNZIc= github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g= github.com/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0BsqsP2LwDJ9aOkm/6J86V6lyAXCoQWGw3K50= github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/caarlos0/ctrlc v1.0.0/go.mod h1:CdXpj4rmq0q/1Eb44M9zi2nKB0QraNKuRGYGrrHhcQw= github.com/campoy/unique v0.0.0-20180121183637-88950e537e7e/go.mod h1:9IOqJGCPMSc6E5ydlp5NIonxObaeu/Iub/X03EKPVYo= github.com/cavaliercoder/go-cpio v0.0.0-20180626203310-925f9528c45e/go.mod h1:oDpT4efm8tSYHXV5tHSdRvBet/b/QzxZ+XyyPehvm3A= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/charmbracelet/bubbles v0.16.1 h1:6uzpAAaT9ZqKssntbvZMlksWHruQLNxg49H5WdeuYSY= github.com/charmbracelet/bubbles v0.16.1/go.mod h1:2QCp9LFlEsBQMvIYERr7Ww2H2bA7xen1idUDIzm/+Xc= github.com/charmbracelet/bubbletea v0.24.2 h1:uaQIKx9Ai6Gdh5zpTbGiWpytMU+CfsPp06RaW2cx/SY= github.com/charmbracelet/bubbletea v0.24.2/go.mod h1:XdrNrV4J8GiyshTtx3DNuYkR1FDaJmO3l2nejekbsgg= github.com/charmbracelet/harmonica v0.2.0 h1:8NxJWRWg/bzKqqEaaeFNipOu77YR5t8aSwG4pgaUBiQ= github.com/charmbracelet/harmonica v0.2.0/go.mod h1:KSri/1RMQOZLbw7AHqgcBycp8pgJnQMYYT8QZRqZ1Ao= github.com/charmbracelet/lipgloss v0.8.0 h1:IS00fk4XAHcf8uZKc3eHeMUTCxUH6NkaTrdyCQk84RU= github.com/charmbracelet/lipgloss v0.8.0/go.mod h1:p4eYUZZJ/0oXTuCQKFF8mqyKCz0ja6y+7DniDDw5KKU= github.com/checkpoint-restore/go-criu/v4 v4.1.0/go.mod h1:xUQBLp4RLc5zJtWY++yjOoMoB5lihDt7fai+75m+rGw= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/logex v1.2.0/go.mod h1:9+9sk7u7pGNWYMkh0hdiL++6OeibzJccyQU4p4MedaY= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/readline v1.5.0/go.mod h1:x22KAscuvRqlLoK9CsoYsmxoXZMMFVyOl86cAH8qUic= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/chzyer/test v0.0.0-20210722231415-061457976a23/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/cilium/ebpf v0.0.0-20200110133405-4032b1d8aae3/go.mod h1:MA5e5Lr8slmEg9bt0VpxxWqJlO4iwu3FBdHUzV7wQVg= github.com/cilium/ebpf v0.0.0-20200702112145-1c8d4c9ef775/go.mod h1:7cR51M8ViRLIdUjrmSXlK9pkrsDlLHbO8jiB8X8JnOc= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/circl v1.3.3 h1:fE/Qz0QdIGqeWfnwq0RE0R7MI51s0M2E4Ga9kq5AEMs= github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/codahale/hdrhistogram v0.0.0-20160425231609-f8ad88b59a58/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/codahale/rfc6979 v0.0.0-20141003034818-6a90f24967eb h1:EDmT6Q9Zs+SbUoc7Ik9EfrFqcylYqgPZ9ANSbTAntnE= github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko= github.com/containerd/cgroups v0.0.0-20200531161412-0dbf7f05ba59/go.mod h1:pA0z1pT8KYB3TCXK/ocprsh7MAkoW8bZVzPdih9snmM= github.com/containerd/cgroups v0.0.0-20200710171044-318312a37340/go.mod h1:s5q4SojHctfxANBDvMeIaIovkq29IP48TKAxnhYRxvo= github.com/containerd/cgroups v1.1.0 h1:v8rEWFl6EoqHB+swVNjVoCJE8o3jX7e8nqBGPLaDFBM= github.com/containerd/cgroups v1.1.0/go.mod h1:6ppBcbh/NOOUU+dMKrykgaBnK9lCIBxHqJDGwsa1mIw= github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= github.com/containerd/console v0.0.0-20191206165004-02ecf6a7291e/go.mod h1:8Pf4gM6VEbTNRIT26AyyU7hxdQU3MvAvxVI0sc00XBE= github.com/containerd/console v1.0.0/go.mod h1:8Pf4gM6VEbTNRIT26AyyU7hxdQU3MvAvxVI0sc00XBE= github.com/containerd/console v1.0.1/go.mod h1:XUsP6YE/mKtz6bxc+I8UiKKTP04qjQL4qcS3XoQ5xkw= github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 h1:q2hJAaP1k2wIvVRd/hEHD7lacgqrCPS+k8g1MndzfWY= github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81/go.mod h1:YynlIjWYF8myEu6sdkwKIvGQq+cOckRm6So2avqoYAk= github.com/containerd/containerd v1.3.0-beta.2.0.20190828155532-0293cbd26c69/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/containerd v1.3.0/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/containerd v1.3.2/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/containerd v1.4.0/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/containerd v1.4.1-0.20201117152358-0edc412565dc/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/containerd v1.7.2 h1:UF2gdONnxO8I6byZXDi5sXWiWvlW3D/sci7dTQimEJo= github.com/containerd/containerd v1.7.2/go.mod h1:afcz74+K10M/+cjGHIVQrCt3RAQhUSCAjJ9iMYhhkuI= github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= github.com/containerd/continuity v0.0.0-20200710164510-efbc4488d8fe/go.mod h1:cECdGN1O8G9bgKTlLhuPJimka6Xb/Gg7vYzCTNVxhvo= github.com/containerd/continuity v0.4.1 h1:wQnVrjIyQ8vhU2sgOiL5T07jo+ouqc2bnKsv5/EqGhU= github.com/containerd/continuity v0.4.1/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ/7o4JzpodfroQ= github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= github.com/containerd/fifo v0.0.0-20200410184934-f15a3290365b/go.mod h1:jPQ2IAeZRCYxpS/Cm1495vGFww6ecHmMk1YJH2Q5ln0= github.com/containerd/fifo v1.1.0 h1:4I2mbh5stb1u6ycIABlBw9zgtlK8viPI9QkQNRQEEmY= github.com/containerd/fifo v1.1.0/go.mod h1:bmC4NWMbXlt2EZ0Hc7Fx7QzTFxgPID13eH0Qu+MAb2o= github.com/containerd/fuse-overlayfs-snapshotter v1.0.6 h1:MWwG/UOQv6J2hvRgKGduhJn5yKZPl4ly+PWMhfPnMzU= github.com/containerd/fuse-overlayfs-snapshotter v1.0.6/go.mod h1:gfcR4++fMRl37UvYy4Kw6JrQIra1bFFQVVtWEp1oon4= github.com/containerd/go-cni v1.0.1/go.mod h1:+vUpYxKvAF72G9i1WoDOiPGRtQpqsNW/ZHtSlv++smU= github.com/containerd/go-cni v1.1.9 h1:ORi7P1dYzCwVM6XPN4n3CbkuOx/NZ2DOqy+SHRdo9rU= github.com/containerd/go-cni v1.1.9/go.mod h1:XYrZJ1d5W6E2VOvjffL3IZq0Dz6bsVlERHbekNK90PM= github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0= github.com/containerd/go-runc v0.0.0-20200220073739-7016d3ce2328/go.mod h1:PpyHrqVs8FTi9vpyHwPwiNEGaACDxT/N/pLcvMSRA9g= github.com/containerd/go-runc v0.0.0-20201020171139-16b287bc67d0/go.mod h1:cNU0ZbCgCQVZK4lgG3P+9tn9/PaJNmoDXPpoJhDR+Ok= github.com/containerd/go-runc v1.1.0 h1:OX4f+/i2y5sUT7LhmcJH7GYrjjhHa1QI4e8yO0gGleA= github.com/containerd/go-runc v1.1.0/go.mod h1:xJv2hFF7GvHtTJd9JqTS2UVxMkULUYw4JN5XAUZqH5U= github.com/containerd/nydus-snapshotter v0.8.2 h1:7SOrMU2YmLzfbsr5J7liMZJlNi5WT6vtIOxLGv+iz7E= github.com/containerd/nydus-snapshotter v0.8.2/go.mod h1:UJILTN5LVBRY+dt8BGJbp72Xy729hUZsOugObEI3/O8= github.com/containerd/stargz-snapshotter v0.0.0-20201027054423-3a04e4c2c116/go.mod h1:o59b3PCKVAf9jjiKtCc/9hLAd+5p/rfhBfm6aBcTEr4= github.com/containerd/stargz-snapshotter v0.14.3 h1:OTUVZoPSPs8mGgmQUE1dqw3WX/3nrsmsurW7UPLWl1U= github.com/containerd/stargz-snapshotter v0.14.3/go.mod h1:j2Ya4JeA5gMZJr8BchSkPjlcCEh++auAxp4nidPI6N0= github.com/containerd/stargz-snapshotter/estargz v0.14.3 h1:OqlDCK3ZVUO6C3B/5FSkDwbkEETK84kQgEeFwDC+62k= github.com/containerd/stargz-snapshotter/estargz v0.14.3/go.mod h1:KY//uOCIkSuNAHhJogcZtrNHdKrA99/FCCRjE3HD36o= github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= github.com/containerd/ttrpc v1.0.1/go.mod h1:UAxOpgT9ziI0gJrmKvgcZivgxOp8iFPSk8httJEt98Y= github.com/containerd/ttrpc v1.2.2 h1:9vqZr0pxwOF5koz6N0N3kJ0zDHokrcPxIR/ZR2YFtOs= github.com/containerd/ttrpc v1.2.2/go.mod h1:sIT6l32Ph/H9cvnJsfXM5drIVzTr5A2flTf1G5tYZak= github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc= github.com/containerd/typeurl v1.0.1/go.mod h1:TB1hUtrpaiO88KEK56ijojHS1+NeF0izUACaJW2mdXg= github.com/containerd/typeurl/v2 v2.1.1 h1:3Q4Pt7i8nYwy2KmQWIw2+1hTvwTE/6w9FqcttATPO/4= github.com/containerd/typeurl/v2 v2.1.1/go.mod h1:IDp2JFvbwZ31H8dQbEIY7sDl2L3o3HZj1hsSQlywkQ0= github.com/containernetworking/cni v0.8.0/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= github.com/containernetworking/cni v1.1.2 h1:wtRGZVv7olUHMOqouPpn3cXJWpJgM6+EUl31EQbXALQ= github.com/containernetworking/cni v1.1.2/go.mod h1:sDpYKmGVENF3s6uvMvGgldDWeG8dMxakj/u+i9ht9vw= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= github.com/coreos/go-systemd/v22 v22.4.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/dagger/graphql v0.0.0-20230919174923-21d038582a21 h1:6H/36Lk+mcSXxlbjjIMUYd4DR+aqCzeaRigK5dUe/a0= github.com/dagger/graphql v0.0.0-20230919174923-21d038582a21/go.mod h1:jxe8vuRdvEbdLR5nrc6F7gLPmPeJhGe2DbIgEok+pCA= github.com/dagger/graphql-go-tools v0.0.0-20231012004527-77189e400b6e h1:5fyK89J8og+XMW5JetgXzaxRhoI9UrS0BhrNskj4cuA= github.com/dagger/graphql-go-tools v0.0.0-20231012004527-77189e400b6e/go.mod h1:SXt7tSY8l+OVghRddofY+eDdv8EK82N0JlrrfrkqFEw= github.com/dave/jennifer v1.7.0 h1:uRbSBH9UTS64yXbh4FrMHfgfY762RD+C7bUPKODpSJE= github.com/dave/jennifer v1.7.0/go.mod h1:nXbxhEmQfOZhWml3D1cDK5M1FLnMSozpbFN/m3RmGZc= github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba/go.mod h1:dV8lFg6daOBZbT6/BDGIz6Y3WFGn8juu6G+CQ6LHtl0= github.com/devigned/tab v0.1.1/go.mod h1:XG9mPq0dFghrYvoBF3xdRrJzSTX1b7IQrvaL9mzjeJY= github.com/dgrijalva/jwt-go v0.0.0-20170104182250-a601269ab70c/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48 h1:fRzb/w+pyskVMQ+UbP35JkH8yB7MYb4q/qhBarqZE6g= github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA= github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8= github.com/dimchansky/utfbom v1.1.1 h1:vV6w1AhK4VMnhBno/TPVCoK9U/LP0PkLCS9tbxHdi/U= github.com/dimchansky/utfbom v1.1.1/go.mod h1:SxdoEBH5qIqFocHMyGOXVAybYJdr71b1Q/j0mACtrfE= github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/dlclark/regexp2 v1.4.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= github.com/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= github.com/dlclark/regexp2 v1.7.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= github.com/dlclark/regexp2 v1.9.0 h1:pTK/l/3qYIKaRXuHnEnIf7Y5NxfRPfpb7dis6/gdlVI= github.com/dlclark/regexp2 v1.9.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= github.com/dnaeon/go-vcr v1.1.0 h1:ReYa/UBrRyQdant9B4fNHGoCNKw6qh6P0fsdGmZpR7c= github.com/docker/cli v0.0.0-20190925022749-754388324470/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/cli v0.0.0-20191017083524-a8ff7f821017/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/cli v20.10.0-beta1.0.20201029214301-1d20b15adc38+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/cli v24.0.5+incompatible h1:WeBimjvS0eKdH4Ygx+ihVq1Q++xg36M/rMi4aXAvodc= github.com/docker/cli v24.0.5+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/distribution v0.0.0-20190905152932-14b96e55d84c/go.mod h1:0+TTO4EOBfRPhZXAeF1Vu+W3hHZ8eLp8PgKVZlcvtFY= github.com/docker/distribution v2.6.0-rc.1.0.20180327202408-83389a148052+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v0.0.0-20200511152416-a93e9eb0e95c/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v1.4.2-0.20180531152204-71cd53e4a197/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v1.4.2-0.20190924003213-a8608b5b67c7/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v17.12.0-ce-rc1.0.20200730172259-9f28837c1d93+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v20.10.0-beta1.0.20201110211921-af34b94a78a1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v24.0.0-rc.2.0.20230905130451-032797ea4bcb+incompatible h1:1UUPAB9PAPUbM10+qIKPL5tKZ+VAddWgbQUf+x1QBfI= github.com/docker/docker v24.0.0-rc.2.0.20230905130451-032797ea4bcb+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker-credential-helpers v0.6.3/go.mod h1:WRaJzqw3CTB9bk10avuGsjVBZsD05qeibJ1/TYlvc0Y= github.com/docker/docker-credential-helpers v0.7.0 h1:xtCHsjxogADNZcdv1pKUHXryefjlVRqWqIhk/uXJp0A= github.com/docker/docker-credential-helpers v0.7.0/go.mod h1:rETQfLdHNT3foU5kuNkFR1R1V12OJRRO5lzt2D1b5X0= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c h1:+pKlWGMw7gf6bQ+oDZB4KHQFypsfjYlq/C4rfL7D3g8= github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= github.com/docker/go-metrics v0.0.0-20180209012529-399ea8c73916/go.mod h1:/u0gXw0Gay3ceNrsHubL3BtdOL2fHf93USgMTe0W5dI= github.com/docker/go-metrics v0.0.1 h1:AgB/0SvBxihN0X8OR4SjsblXkbMvalQ8cjmtKQ2rQV8= github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw= github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/libnetwork v0.8.0-dev.2.0.20200917202933-d0951081b35f/go.mod h1:93m0aTqz6z+g32wla4l4WxTrdtvBRmVzYRkYvasA5Z8= github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dop251/goja v0.0.0-20211022113120-dc8c55024d06/go.mod h1:R9ET47fwRVRPZnOGvHxxhuZcbrMCuiqOz3Rlrh4KSnk= github.com/dop251/goja v0.0.0-20230402114112-623f9dda9079 h1:xkbJGxVnk5sM8/LXeTKaBOfAZrI+iqvIPyH8oK1c6CQ= github.com/dop251/goja v0.0.0-20230402114112-623f9dda9079/go.mod h1:QMWlm50DNe14hD7t24KEqZuUdC9sOTy8W6XbCU1mlw4= github.com/dop251/goja_nodejs v0.0.0-20210225215109-d91c329300e7/go.mod h1:hn7BA7c8pLvoGndExHudxTDKZ84Pyvv+90pbBjbTz0Y= github.com/dop251/goja_nodejs v0.0.0-20211022123610-8dd9abb0616d/go.mod h1:DngW8aVqWbuLRMHItjPUyqdj+HWPvnQe8V8y1nDpIbM= github.com/dschmidt/go-layerfs v0.1.0 h1:jE6aHDfjNzS/31DS48th6EkmELwTa1Uf+aO4jRkBs3U= github.com/dschmidt/go-layerfs v0.1.0/go.mod h1:m62aff0hn23Q/tQBRiNSeLD7EUuimDvsuCvCpzBr3Gw= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a h1:mATvB/9r/3gvcejNsXKSkQ6lcIaNec2nyfOdlTBR2lU= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA= github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/fogleman/ease v0.0.0-20170301025033-8da417bf1776 h1:VRIbnDWRmAh5yBdz+J6yFMF5vso1It6vn+WmM/5l7MA= github.com/fogleman/ease v0.0.0-20170301025033-8da417bf1776/go.mod h1:9wvnDu3YOfxzWM9Cst40msBF1C2UdQgDv962oTxSuMs= github.com/fortytw2/leaktest v1.2.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/gliderlabs/ssh v0.3.5 h1:OcaySEmAQJgyYcArR+gGGTHCyE7nvhEMTlYY+Dp8CpY= github.com/go-critic/go-critic v0.4.1/go.mod h1:7/14rZGnZbY6E38VEGk2kVhoq6itzc1E68facVDK23g= github.com/go-critic/go-critic v0.4.3/go.mod h1:j4O3D4RoIwRqlZw5jJpx0BNfXWWbpcJoKu5cYSe4YmQ= github.com/go-fonts/liberation v0.2.0 h1:jAkAWJP4S+OsrPLZM4/eC9iW7CtHy+HBXrEwZXWo5VM= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic= github.com/go-git/go-billy/v5 v5.5.0 h1:yEY4yhzCDuMGSv83oGxiBotRzhwhNr8VZyphhiu+mTU= github.com/go-git/go-billy/v5 v5.5.0/go.mod h1:hmexnoNsr2SJU1Ju67OaNz5ASJY3+sHgFRpCtpDCKow= github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20230305113008-0c11038e723f h1:Pz0DHeFij3XFhoBRGUDPzSJ+w2UcK5/0JvF8DRI58r8= github.com/go-git/go-git/v5 v5.9.0 h1:cD9SFA7sHVRdJ7AYck1ZaAa/yeuBvGPxwXDL8cxrObY= github.com/go-git/go-git/v5 v5.9.0/go.mod h1:RKIqga24sWdMGZF+1Ekv9kylsDz6LzdTSI2s/OsZWE0= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-ini/ini v1.25.4/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-latex/latex v0.0.0-20210823091927-c0d11ff05a81 h1:6zl3BbBhdnMkpSj2YY30qV3gDcVBGtFgVsV3+/i+mKQ= github.com/go-lintpack/lintpack v0.5.2/go.mod h1:NwZuYi2nUHho8XEIZ6SIxihrnPoqBTDqfpXvXAN0sXM= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-pdf/fpdf v0.6.0 h1:MlgtGIfsdMEEQJr2le6b/HNr1ZlQwxyWr77r2aj2U/8= github.com/go-sourcemap/sourcemap v2.1.3+incompatible h1:W1iEw64niKVGogNgBN3ePyLFfuisuzeidWPMPWmECqU= github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-toolsmith/astcast v1.0.0/go.mod h1:mt2OdQTeAQcY4DQgPSArJjHCcOwlX+Wl/kwN+LbLGQ4= github.com/go-toolsmith/astcopy v1.0.0/go.mod h1:vrgyG+5Bxrnz4MZWPF+pI4R8h3qKRjjyvV/DSez4WVQ= github.com/go-toolsmith/astequal v0.0.0-20180903214952-dcb477bfacd6/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY= github.com/go-toolsmith/astequal v1.0.0/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY= github.com/go-toolsmith/astfmt v0.0.0-20180903215011-8f8ee99c3086/go.mod h1:mP93XdblcopXwlyN4X4uodxXQhldPGZbcEJIimQHrkg= github.com/go-toolsmith/astfmt v1.0.0/go.mod h1:cnWmsOAuq4jJY6Ct5YWlVLmcmLMn1JUPuQIHCY7CJDw= github.com/go-toolsmith/astinfo v0.0.0-20180906194353-9809ff7efb21/go.mod h1:dDStQCHtmZpYOmjRP/8gHHnCCch3Zz3oEgCdZVdtweU= github.com/go-toolsmith/astp v0.0.0-20180903215135-0af7e3c24f30/go.mod h1:SV2ur98SGypH1UjcPpCatrV5hPazG6+IfNHbkDXBRrk= github.com/go-toolsmith/astp v1.0.0/go.mod h1:RSyrtpVlfTFGDYRbrjyWP1pYu//tSFcvdYrA8meBmLI= github.com/go-toolsmith/pkgload v0.0.0-20181119091011-e9e65178eee8/go.mod h1:WoMrjiy4zvdS+Bg6z9jZH82QXwkcgCBX6nOfnmdaHks= github.com/go-toolsmith/pkgload v1.0.0/go.mod h1:5eFArkbO80v7Z0kdngIxsRXRMTaX4Ilcwuh3clNrQJc= github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8= github.com/go-toolsmith/typep v1.0.0/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= github.com/go-toolsmith/typep v1.0.2/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gofrs/flock v0.0.0-20190320160742-5135e617513b/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gofrs/flock v0.7.3/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.2.0/go.mod h1:Njal3psf3qN6dwBtQfUmBZh2ybovJ0tlu3o/AC7HYjU= github.com/gogo/googleapis v1.3.2/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/gogo/status v1.0.3/go.mod h1:SavQ51ycCLnc7dGyJxp8YAmudx8xqiVrRf+6IXRsugc= github.com/golang-jwt/jwt/v4 v4.1.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang-jwt/jwt/v4 v4.4.2 h1:rcc4lwaZgFMCZ5jxF9ABolDcIHdBytAFgqFPbSJQAYs= github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.1.0 h1:/d3pCKDPWNnvIWe0vVUpNP32qc8U3PDVxySP/y360qE= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2/go.mod h1:k9Qvh+8juN+UKMCS/3jFtGICgW8O96FVaZsaxdzDkR4= github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a/go.mod h1:ryS0uhF+x9jgbj/N71xsEqODy9BN81/GonCZiOzirOk= github.com/golangci/errcheck v0.0.0-20181223084120-ef45e06d44b6/go.mod h1:DbHgvLiFKX1Sh2T1w8Q/h4NAI8MHIpzCdnBUDTXU3I0= github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613/go.mod h1:SyvUF2NxV+sN8upjjeVYr5W7tyxaT1JVtvhKhOn2ii8= github.com/golangci/goconst v0.0.0-20180610141641-041c5f2b40f3/go.mod h1:JXrF4TWy4tXYn62/9x8Wm/K/dm06p8tCKwFRDPZG/1o= github.com/golangci/gocyclo v0.0.0-20180528134321-2becd97e67ee/go.mod h1:ozx7R9SIwqmqf5pRP90DhR2Oay2UIjGuKheCBCNwAYU= github.com/golangci/gocyclo v0.0.0-20180528144436-0a533e8fa43d/go.mod h1:ozx7R9SIwqmqf5pRP90DhR2Oay2UIjGuKheCBCNwAYU= github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a/go.mod h1:9qCChq59u/eW8im404Q2WWTrnBUQKjpNYKMbU4M7EFU= github.com/golangci/golangci-lint v1.23.7/go.mod h1:g/38bxfhp4rI7zeWSxcdIeHTQGS58TCak8FYcyCmavQ= github.com/golangci/golangci-lint v1.27.0/go.mod h1:+eZALfxIuthdrHPtfM7w/R3POJLjHDfJJw8XZl9xOng= github.com/golangci/ineffassign v0.0.0-20190609212857-42439a7714cc/go.mod h1:e5tpTHCfVze+7EpLEozzMB3eafxo2KT5veNg1k6byQU= github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0/go.mod h1:66R6K6P6VWk9I95jvqGxkqJxVWGFy9XlDwLwVz1RCFg= github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca/go.mod h1:tvlJhZqDe4LMs4ZHD0oMUlt9G2LWuDGoisJTBzLMV9o= github.com/golangci/misspell v0.0.0-20180809174111-950f5d19e770/go.mod h1:dEbvlSfYbMQDtrpRMQU675gSDLDNa8sCPPChZ7PhiVA= github.com/golangci/misspell v0.3.5/go.mod h1:dEbvlSfYbMQDtrpRMQU675gSDLDNa8sCPPChZ7PhiVA= github.com/golangci/prealloc v0.0.0-20180630174525-215b22d4de21/go.mod h1:tf5+bzsHdTM0bsB7+8mt0GUMvjCgwLpTapNZHU8AajI= github.com/golangci/revgrep v0.0.0-20180526074752-d9c87f5ffaf0/go.mod h1:qOQCunEYvmd/TLamH+7LlVccLvUH5kZNhbCgTHoBbp4= github.com/golangci/revgrep v0.0.0-20180812185044-276a5c0a1039/go.mod h1:qOQCunEYvmd/TLamH+7LlVccLvUH5kZNhbCgTHoBbp4= github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4/go.mod h1:Izgrg8RkN3rCIMLGE9CyYmU9pY2Jer6DgANEnZ/L/cQ= github.com/google/btree v0.0.0-20180124185431-e89373fe6b4a/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/crfs v0.0.0-20191108021818-71d77da419c9/go.mod h1:etGhoOqfwPkooV6aqoX3eBGQOJblqdoc9XvWOeuxpPw= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-containerregistry v0.0.0-20191010200024-a3d713f9b7f8/go.mod h1:KyKXa9ciM8+lgMXwOVsXi7UxGrsf9mM61Mzs+xKUrKE= github.com/google/go-containerregistry v0.1.2/go.mod h1:GPivBPgdAyd2SU+vf6EpsgOtWDuPqjW0hJZt4rNdTZ4= github.com/google/go-containerregistry v0.15.2 h1:MMkSh+tjSdnmJZO7ljvEqV1DjfekB6VUEAZgy3a+TQE= github.com/google/go-containerregistry v0.15.2/go.mod h1:wWK+LnOv4jXMM23IT/F1wdYftGWGr47Is8CG+pmHK1Q= github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= github.com/google/go-github/v28 v28.1.1/go.mod h1:bsqJWQX05omyWVmc00nEUql9mhQyv38lDZ8kPZcQVoM= github.com/google/go-github/v50 v50.2.0 h1:j2FyongEHlO9nxXLc+LP3wuBSVU9mVxfpdYUexMpIfk= github.com/google/go-github/v50 v50.2.0/go.mod h1:VBY8FB6yPIjrtKhozXv4FQupxKLS6H4m6xFZlT43q8Q= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/go-replayers/grpcreplay v0.1.0/go.mod h1:8Ig2Idjpr6gifRd6pNVggX6TC1Zw6Jx74AKp7QNH2QE= github.com/google/go-replayers/httpreplay v0.1.0/go.mod h1:YKZViNhiGgqdBlUbI2MwGpq4pXxNmhJLPHQ7cv2b5no= github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian v2.1.1-0.20190517191504-25dcb96d9e51+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20230207041349-798e818bf904/go.mod h1:uglQLonpP8qtYCYyzA+8c/9qtqgA3qsXGYqCPKARAFg= github.com/google/pprof v0.0.0-20230406165453-00490a63f317 h1:hFhpt7CTmR3DX+b4R19ydQFtofxT0Sv3QsKNMVQYTMQ= github.com/google/pprof v0.0.0-20230406165453-00490a63f317/go.mod h1:79YE0hCXdHag9sBkw2o+N/YnZtTkXi0UT9Nnixa5eYk= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/rpmpack v0.0.0-20191226140753-aa36bfddb3a0/go.mod h1:RaTPr0KUf2K7fnZYLNDrr8rxAamWs3iNywJLtQ2AzBg= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/subcommands v1.0.1/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/wire v0.3.0/go.mod h1:i1DMg/Lu8Sz5yYl25iOdmc5CT5qusaa+zmRWs16741s= github.com/google/wire v0.4.0/go.mod h1:ngWDr9Qvq3yZA10YrxfyGELY/AFWGVpy9c1LTRi1EoU= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/gax-go v2.0.0+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= github.com/googleapis/gax-go v2.0.2+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.2.2/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= github.com/gookit/color v1.2.4/go.mod h1:AhIE+pS6D4Ql0SQWbBeXPHw7gY0/sjHoA4s/n1KB7xg= github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/goreleaser/goreleaser v0.136.0/go.mod h1:wiKrPUeSNh6Wu8nUHxZydSOVQ/OZvOaO7DTtFqie904= github.com/goreleaser/nfpm v1.2.1/go.mod h1:TtWrABZozuLOttX2uDlYyECfQX7x5XYkVxhjYcR6G9w= github.com/goreleaser/nfpm v1.3.0/go.mod h1:w0p7Kc9TAUgWMyrub63ex3M2Mgw88M4GZXoTq5UCb40= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v0.0.0-20150720190736-60c7bfde3e33/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gostaticanalysis/analysisutil v0.0.0-20190318220348-4088753ea4d3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= github.com/gostaticanalysis/analysisutil v0.0.3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= github.com/gotestyourself/gotestyourself v2.2.0+incompatible/go.mod h1:zZKM6oeNM8k+FRljX1mnzVYeS8wiGgQyvST1/GafPbY= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.2.0/go.mod h1:mJzapYve32yjrKlk9GbyCZHuPgZsrbyIbyKhSzOpg6s= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.5.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= github.com/grpc-ecosystem/grpc-gateway v1.6.2/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= github.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.2/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms= github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg= github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw= github.com/hanwen/go-fuse v1.0.0/go.mod h1:unqXarDXqzAk0rt98O2tVndEPIpUgLD9+rwFisZH3Ok= github.com/hanwen/go-fuse/v2 v2.0.3/go.mod h1:0EQM6aH2ctVpvZ6a+onrQ/vaykxh2GH7hy3e13vzTUY= github.com/hanwen/go-fuse/v2 v2.2.0 h1:jo5QZYmBLNcl9ovypWaQ5yXMSSV+Ch68xoC3rtZvvBM= github.com/hanwen/go-fuse/v2 v2.2.0/go.mod h1:B1nGE/6RBFyBRC1RRnf23UpwCdyJ31eukw34oAKukAc= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= github.com/hashicorp/go-hclog v1.2.0 h1:La19f8d7WIlm4ogzNHB0JGqs5AUDAZ2UfCY4sJXcJdM= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-retryablehttp v0.6.4/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= github.com/hashicorp/go-retryablehttp v0.6.6/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= github.com/hashicorp/go-retryablehttp v0.7.2 h1:AcYqCvkpalPnPF2pn0KamgwamS42TqUDDYFRKq/RAd0= github.com/hashicorp/go-retryablehttp v0.7.2/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hashicorp/uuid v0.0.0-20160311170451-ebb0a03e909c/go.mod h1:fHzc09UnyJyqyW+bFuq864eh+wC7dj65aXmXLRe5to0= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20220319035150-800ac71e25c2/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w= github.com/icholy/replace v0.6.0 h1:EBiD2pGqZIOJAbEaf/5GVRaD/Pmbb4n+K3LrBdXd4dw= github.com/icholy/replace v0.6.0/go.mod h1:zzi8pxElj2t/5wHHHYmH45D+KxytX/t4w3ClY5nlK+g= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.9/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/in-toto/in-toto-golang v0.5.0 h1:hb8bgwr0M2hGdDsLjkJ3ZqJ8JFLL/tgYdAxF/XEFBbY= github.com/in-toto/in-toto-golang v0.5.0/go.mod h1:/Rq0IZHLV7Ku5gielPT4wPHJfH1GdHMCq8+WPxw8/BE= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/ishidawataru/sctp v0.0.0-20191218070446-00ab2ac2db07/go.mod h1:co9pwDoBCm1kGxawmb4sPq0cSIOOWNPT4KnHotMP1Zg= github.com/jackpal/gateway v1.0.7 h1:7tIFeCGmpyrMx9qvT0EgYUi7cxVW48a0mMvnIL17bPM= github.com/jackpal/gateway v1.0.7/go.mod h1:aRcO0UFKt+MgIZmRmvOmnejdDT4Y1DNiNOsSd1AcIbA= github.com/jaguilar/vt100 v0.0.0-20150826170717-2703a27b14ea/go.mod h1:QMdK4dGB3YhEW2BmA1wgGpPYI3HZy/5gD705PXKUVSg= github.com/jarcoal/httpmock v1.0.5/go.mod h1:ATjnClrvW/3tijVmpL/va5Z3aAyGvqU3gCT8nX0Txik= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU= github.com/jingyugao/rowserrcheck v0.0.0-20191204022205-72ab7603b68a/go.mod h1:xRskid8CManxVta/ALEhJha/pweKBaVG6fWgc0yH25s= github.com/jirfag/go-printf-func-name v0.0.0-20191110105641-45db9963cdd3/go.mod h1:HEWGJkRDzjJY2sqdDwxccsGicWEf9BQOZsq2tV+xzM0= github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af/go.mod h1:HEWGJkRDzjJY2sqdDwxccsGicWEf9BQOZsq2tV+xzM0= github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jmoiron/sqlx v1.2.1-0.20190826204134-d7d95172beb5/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= github.com/joefitzgerald/rainbow-reporter v0.1.0/go.mod h1:481CNgqmVHQZzdIbN52CupLJyoVwB10FQ/IQlF1pdL8= github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jonboulle/clockwork v0.4.0 h1:p4Cf1aMWXnXAUh8lVfewRBx1zaTSYKrKMF2g3ST4RZ4= github.com/jonboulle/clockwork v0.4.0/go.mod h1:xgRqUGwRcjKCO1vbZUEtSLrqKoPSsUpK7fnezOII0kc= github.com/jpillora/backoff v0.0.0-20180909062703-3050d21c67d7/go.mod h1:2iMrUgbbvHEiQClaW2NsSzMyGHqN+rDFqY705q49KG0= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v0.0.0-20180701071628-ab8a2e0c74be/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/juju/ansiterm v1.0.0 h1:gmMvnZRq7JZJx6jkfSq9/+2LMrVEwGwt7UR6G+lmDEg= github.com/juju/ansiterm v1.0.0/go.mod h1:PyXUpnI3olx3bsPcHt98FGPX/KCFZ1Fi+hw1XLI6384= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/jung-kurt/gofpdf v1.0.0/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/jung-kurt/gofpdf v1.16.2 h1:jgbatWHfRlPYiK85qgevsZTHviWXKwB1TTiKdz5PtRc= github.com/jung-kurt/gofpdf v1.16.2/go.mod h1:1hl7y57EsiPAkLbOwzpzqgx1A30nQCk/YmFV8S2vmK0= github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.16.5 h1:IFV2oUNUzZaz+XyusxpLzpzS8Pt5rh0Z16For/djlyI= github.com/klauspost/compress v1.16.5/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/klauspost/cpuid v0.0.0-20180405133222-e7e905edc00e/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBFYa4= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/koron-go/prefixw v1.0.0 h1:p7OC1ffZ/z+Miz0j/Ddt4fVYr8g4W9BKWkViAZ+1LmI= github.com/koron-go/prefixw v1.0.0/go.mod h1:WZvD0yrbCrkJD23tq03BhCu1ucn5ZenktcXt39QbPyk= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.1.1/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/logrusorgru/aurora v0.0.0-20181002194514-a7b3b318ed4e/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= github.com/lunixbochs/vtclean v1.0.0 h1:xu2sLAri4lGiovBDQKxl5mrXyESr3gUr5m5SM5+LVb8= github.com/lunixbochs/vtclean v1.0.0/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI= github.com/mackerelio/go-osstat v0.2.4 h1:qxGbdPkFo65PXOb/F/nhDKpF2nGmGaCFDLXoZjJTtUs= github.com/mackerelio/go-osstat v0.2.4/go.mod h1:Zy+qzGdZs3A9cuIqmgbJvwbmLQH9dJvtio5ZjJTbdlQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= github.com/maratori/testpackage v1.0.1/go.mod h1:ddKdw+XG0Phzhx8BFDTKgpWP4i7MpApTE5fXSKAqwDU= github.com/marstr/guid v1.1.0/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho= github.com/matoous/godox v0.0.0-20190911065817-5d6d842e92eb/go.mod h1:1BELzlh859Sh1c6+90blK8lbYy0kwQf1bYlBhBysy1s= github.com/matryer/is v1.2.0 h1:92UTHpy8CDwaJ08GqLDzhhuixiBUUD1p3AU6PHddz4A= github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.10/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= github.com/mattn/go-ieproxy v0.0.1/go.mod h1:pYabZ6IHcRpFh7vIaLfK7rdcWgFEb3SFJ6/gNWuh88E= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-localereader v0.0.1 h1:ygSAOl7ZXTx4RdPYinUpg6W99U8jWvWi9Ye2JC/oIi4= github.com/mattn/go-localereader v0.0.1/go.mod h1:8fBrzywKY7BI3czFoHkuzRoWE9C+EiG4R1k4Cjx5p88= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-shellwords v1.0.10/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y= github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-zglob v0.0.1/go.mod h1:9fxibJccNxU2cnpIKLRRFA7zX7qhkJIQWBb449FYHOo= github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/maxbrunsfeld/counterfeiter/v6 v6.2.2/go.mod h1:eD9eIE7cdwcMi9rYluz88Jz2VyhSmden33/aXg4oVIY= github.com/mazznoer/csscolorparser v0.1.3 h1:vug4zh6loQxAUxfU1DZEu70gTPufDPspamZlHAkKcxE= github.com/mazznoer/csscolorparser v0.1.3/go.mod h1:Aj22+L/rYN/Y6bj3bYqO3N6g1dtdHtGfQ32xZ5PJQic= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-ps v0.0.0-20190716172923-621e5597135b/go.mod h1:r1VsdOzOPt1ZSrGZWFoNhsAedKnEd6r9Np1+5blZCWk= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= github.com/mitchellh/hashstructure v1.0.0/go.mod h1:QjSHrPWS+BGUVBYkbTZWEnOh3G1DutKwClXU/ABz6AQ= github.com/mitchellh/hashstructure/v2 v2.0.2 h1:vGKWl0YJqUNxE8d+h8f6NJLcCJrgbhC4NcD46KavDd4= github.com/mitchellh/hashstructure/v2 v2.0.2/go.mod h1:MG3aRVU/N29oo/V/IhBX8GR/zz4kQkprJgF2EVszyDE= github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.3.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQZAeMln+1tSwduZz7+Af5oFlKirV/MSYes2A= github.com/moby/buildkit v0.8.1/go.mod h1:/kyU1hKy/aYCuP39GZA9MaKioovHku57N6cqlKZIaiQ= github.com/moby/buildkit v0.13.0-beta1.0.20231011161957-86e25b3ad8c2 h1:tZXkMdj5mkYi92esqc8EtNuPePwhLKotK4w/CFpSZAM= github.com/moby/buildkit v0.13.0-beta1.0.20231011161957-86e25b3ad8c2/go.mod h1:oSHnUZH7sNtAFLyeN1syf46SuzMThKsCQaioNEqJVUk= github.com/moby/locker v1.0.1 h1:fOXqR41zeveg4fFODix+1Ch4mj/gT0NE1XJbp/epuBg= github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc= github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= github.com/moby/sys/mount v0.1.0/go.mod h1:FVQFLDRWwyBjDTBNQXDlWnSFREqOo3OKX9aqhmeoo74= github.com/moby/sys/mount v0.1.1/go.mod h1:FVQFLDRWwyBjDTBNQXDlWnSFREqOo3OKX9aqhmeoo74= github.com/moby/sys/mount v0.3.3 h1:fX1SVkXFJ47XWDoeFW4Sq7PdQJnV2QIDZAqjNqgEjUs= github.com/moby/sys/mount v0.3.3/go.mod h1:PBaEorSNTLG5t/+4EgukEQVlAvVEc6ZjTySwKdqp5K0= github.com/moby/sys/mountinfo v0.1.0/go.mod h1:w2t2Avltqx8vE7gX5l+QiBKxODu2TX0+Syr3h52Tw4o= github.com/moby/sys/mountinfo v0.1.3/go.mod h1:w2t2Avltqx8vE7gX5l+QiBKxODu2TX0+Syr3h52Tw4o= github.com/moby/sys/mountinfo v0.4.0/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= github.com/moby/sys/mountinfo v0.6.2 h1:BzJjoreD5BMFNmD9Rus6gdd1pLuecOFPt8wC+Vygl78= github.com/moby/sys/mountinfo v0.6.2/go.mod h1:IJb6JQeOklcdMU9F5xQ8ZALD+CUr5VlGpwtX+VE0rpI= github.com/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc= github.com/moby/sys/sequential v0.5.0/go.mod h1:tH2cOOs5V9MlPiXcQzRC+eEyab644PWKGRYaaV5ZZlo= github.com/moby/sys/signal v0.7.0 h1:25RW3d5TnQEoKvRbEKUGay6DCQ46IxAVTT9CUMgmsSI= github.com/moby/sys/signal v0.7.0/go.mod h1:GQ6ObYZfqacOwTtlXvcmh9A26dVRul/hbOZn88Kg8Tg= github.com/moby/term v0.0.0-20200915141129-7f0af18e79f2/go.mod h1:TjQg8pa4iejrUrjiz0MCtMV38jdMNW4doKSiBrEvCQQ= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180320133207-05fbef0ca5da/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/mozilla/tls-observatory v0.0.0-20190404164649-a3c1b6cfecfd/go.mod h1:SrKMQvPiws7F7iqYp8/TX+IhxCYhzr6N/1yb8cwHsGk= github.com/mozilla/tls-observatory v0.0.0-20200317151703-4fa42e1c2dee/go.mod h1:SrKMQvPiws7F7iqYp8/TX+IhxCYhzr6N/1yb8cwHsGk= github.com/mrunalp/fileutils v0.0.0-20200520151820-abd8a0e76976/go.mod h1:x8F1gnqOkIEiO4rqoeEEEqQbo7HjGMTvyoq3gej4iT0= github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 h1:ZK8zHtRHOkbHy6Mmr5D264iyp3TiX5OmNcI5cIARiQI= github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6/go.mod h1:CJlz5H+gyd6CUWT45Oy4q24RdLyn7Md9Vj2/ldJBSIo= github.com/muesli/cancelreader v0.2.2 h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELUXHmA= github.com/muesli/cancelreader v0.2.2/go.mod h1:3XuTXfFS2VjM+HTLZY9Ak0l6eUKfijIfMUZ4EgX0QYo= github.com/muesli/reflow v0.3.0 h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s= github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKtnHY/8= github.com/muesli/termenv v0.15.2 h1:GohcuySI0QmI3wN8Ok9PtKGkgkFIk7y6Vpb5PvrY+Wo= github.com/muesli/termenv v0.15.2/go.mod h1:Epx+iuz8sNs7mNKhxzH4fWXGNpZwUaJKRS1noLXviQ8= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/nakabonne/nestif v0.3.0/go.mod h1:dI314BppzXjJ4HsCnbo7XzrJHPszZsjnk5wEBSYHI2c= github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d/go.mod h1:o96djdrsSGy3AWPyBgZMAGfxZNfgntdJG+11KU4QvbU= github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo/v2 v2.1.3 h1:e/3Cwtogj0HA+25nMP1jCMDIf8RtRYbGwGGuBIFztkc= github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.8.1/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.0.0/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/image-spec v1.1.0-rc3 h1:fzg1mXZFj8YdPeNkRXMg+zb88BFV0Ys52cJydRwBkb8= github.com/opencontainers/image-spec v1.1.0-rc3/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8= github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/opencontainers/runc v1.0.0-rc10/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/opencontainers/runc v1.0.0-rc92/go.mod h1:X1zlU4p7wOlX4+WRCz+hvlRv8phdL7UqbYD+vQwNMmE= github.com/opencontainers/runc v1.1.9 h1:XR0VIHTGce5eWPkaPesqTBrhW2yAcaraWfsEalNwQLM= github.com/opencontainers/runc v1.1.9/go.mod h1:CbUumNnWCuTGFukNXahoo/RFBZvDAgRh/smNYNOhA50= github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.0.1/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.0.3-0.20200728170252-4d89ac9fbff6/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.1.0-rc.2 h1:ucBtEms2tamYYW/SvGpvq9yUN0NEVL6oyLEwDcTSrk8= github.com/opencontainers/runtime-spec v1.1.0-rc.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39/go.mod h1:r3f7wjNzSs2extwzU3Y+6pKfobzPh+kKFJ3ofN+3nfs= github.com/opencontainers/selinux v1.6.0/go.mod h1:VVGKuOLlE7v4PJyT6h7mNWvq1rzqiriPsEqVhc+svHE= github.com/opencontainers/selinux v1.11.0 h1:+5Zbo97w3Lbmb3PeqQtpmTkMwsW5nRI3YaLpt7tQ7oU= github.com/opencontainers/selinux v1.11.0/go.mod h1:E5dMC3VPuVvVHDYmi78qvhJp8+M586T4DlDRYpFkyec= github.com/opentracing-contrib/go-grpc v0.0.0-20180928155321-4b5a12d3ff02/go.mod h1:JNdpVEzCpXBgIiv4ds+TzhN1hrtxq6ClLrTlT9OQRSc= github.com/opentracing-contrib/go-stdlib v0.0.0-20190519235532-cf7a6c988dc9/go.mod h1:PLldrQSroqzH70Xl+1DQcGnefIbqsKR7UDaiux3zV+w= github.com/opentracing-contrib/go-stdlib v1.0.0/go.mod h1:qtI1ogk+2JhVPIXVc6q+NHziSmy2W5GbdQZFUHADCBU= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= github.com/openzipkin/zipkin-go v0.1.3/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= github.com/package-url/packageurl-go v0.1.1-0.20220428063043-89078438f170 h1:DiLBVp4DAcZlBVBEtJpNWZpZVq0AEeCY7Hqk8URVs4o= github.com/package-url/packageurl-go v0.1.1-0.20220428063043-89078438f170/go.mod h1:uQd4a7Rh3ZsVg5j0lNyAfyxIeGde9yrlhjF78GzeW0c= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.8.0/go.mod h1:D6yutnOGMveHEPV7VQOuvI/gXY61bv+9bAOTRnLElKs= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d/go.mod h1:3OzsM7FXDQlpCiw2j81fOmAwQLnZnLGXVKUzeKQXIAw= github.com/phpdave11/gofpdi v1.0.7/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1-0.20171018195549-f15c970de5b7/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.5.0 h1:042Buzk+NhDI+DeSAA62RwJL8VAuZUMQZUjCsRz1Mug= github.com/pkg/profile v1.5.0/go.mod h1:qBsxPvzyUincmltOk6iyRVxHYg4adc0OFOv72ZdLa18= github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/prometheus/client_golang v0.0.0-20180209125602-c332b6f63c06/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= github.com/prometheus/common v0.0.0-20180110214958-89604d197083/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM= github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= github.com/prometheus/exporter-toolkit v0.8.2/go.mod h1:00shzmJL7KxcsabLWcONwpyNEuWhREOnFqZW7vadFS0= github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.0-20190522114515-bc1a522cf7b1/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/psanford/memfs v0.0.0-20230130182539-4dbf7e3e865e h1:51xcRlSMBU5rhM9KahnJGfEsBPVPz3182TgFRowA8yY= github.com/psanford/memfs v0.0.0-20230130182539-4dbf7e3e865e/go.mod h1:tcaRap0jS3eifrEEllL6ZMd9dg8IlDpi2S1oARrQ+NI= github.com/quasilyte/go-consistent v0.0.0-20190521200055-c6f3937de18c/go.mod h1:5STLWrekHfjyYwxBRVRXNOSewLJ3PWfDJd1VyTS21fI= github.com/quasilyte/go-ruleguard v0.1.2-0.20200318202121-b00d7a75d3d8/go.mod h1:CGFX09Ci3pq9QZdj86B+VGIdNj4VyCo2iPOGS9esB/k= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/remyoudompheng/bigfft v0.0.0-20170806203942-52369c62f446/go.mod h1:uYEyJGbgTkfkS4+E/PavXkNJcbFIpEtjt2B0KDQ5+9M= github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.1.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.5.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/rs/cors v1.10.0 h1:62NOS1h+r8p1mW6FM0FSB0exioXLhd/sh15KpjWBZ+8= github.com/rs/cors v1.10.0/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.30.0 h1:SymVODrcRsaRaSInD9yQtKbtWqwsfoPcRff/oRXLj4c= github.com/rs/zerolog v1.30.0/go.mod h1:/tk+P47gFdPXq4QYjvCmT5/Gsug2nagsFWBWhAiSi1w= github.com/rubiojr/go-vhd v0.0.0-20160810183302-0bfd3b39853c/go.mod h1:DM5xW0nvfNNm2uytzsvhI3OnX8uzaRAg8UX/CnDqbto= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w= github.com/ryancurrah/gomodguard v1.0.4/go.mod h1:9T/Cfuxs5StfsocWr4WzDL36HqnX0fVb9d5fSEaLhoE= github.com/ryancurrah/gomodguard v1.1.0/go.mod h1:4O8tr7hBODaGE6VIhfJDHcwzh5GUccKSJBU0UMXJFVM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/sassoftware/go-rpmutils v0.0.0-20190420191620-a8f1baeba37b/go.mod h1:am+Fp8Bt506lA3Rk3QCmSqmYmLMnPDhdDUcosQCAx+I= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/sclevine/spec v1.2.0/go.mod h1:W4J29eT/Kzv7/b9IWLB055Z+qvVC9vt0Arko24q7p+U= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/sebdah/goldie/v2 v2.5.3 h1:9ES/mNN+HNUbNWpVAlrzuZ7jE+Nrczbj8uFRjM7624Y= github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= github.com/secure-systems-lab/go-securesystemslib v0.4.0 h1:b23VGrQhTA8cN2CbBw7/FulN9fTtqYUdS5+Oxzt+DUE= github.com/secure-systems-lab/go-securesystemslib v0.4.0/go.mod h1:FGBZgq2tXWICsxWQW1msNf49F0Pf2Op5Htayx335Qbs= github.com/securego/gosec v0.0.0-20200103095621-79fbf3af8d83/go.mod h1:vvbZ2Ae7AzSq3/kywjUDxSNq2SJ27RxCz2un0H3ePqE= github.com/securego/gosec v0.0.0-20200401082031-e946c8c39989/go.mod h1:i9l/TNj+yDFh9SZXUTvspXTjbFXgZGP/UvhU1S65A4A= github.com/securego/gosec/v2 v2.3.0/go.mod h1:UzeVyUXbxukhLeHKV3VVqo7HdoQR9MrRfFmZYotn8ME= github.com/sercand/kuberesolver v2.4.0+incompatible/go.mod h1:lWF3GL0xptCB/vCiJPl/ZshwPsX/n4Y7u0CW9E7aQIQ= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I= github.com/serialx/hashring v0.0.0-20190422032157-8b2912629002/go.mod h1:/yeG0My1xr/u+HZrFQ1tOQQQQrOawfyMUH13ai5brBc= github.com/shibumi/go-pathspec v1.3.0 h1:QUyMZhFo0Md5B8zV8x2tesohbb5kfbpTi9rBnKh5dkI= github.com/shibumi/go-pathspec v1.3.0/go.mod h1:Xutfslp817l2I1cZvgcfeMQJG5QnU2lh5tVaaMCl3jE= github.com/shirou/gopsutil v0.0.0-20190901111213-e4ec7b275ada/go.mod h1:WWnYX4lzhCH5h/3YBfyVA3VbLYjlMZZAQcW9ojMexNc= github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4/go.mod h1:qsXQc7+bwAM3Q1u/4XEfrquwF8Lw7D7y5cD8CuHnfIc= github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= github.com/shurcooL/graphql v0.0.0-20220606043923-3cf50f8a0a29 h1:B1PEwpArrNp4dkQrfxh/abbBAOZBVp0ds+fBEOUOqOc= github.com/shurcooL/graphql v0.0.0-20220606043923-3cf50f8a0a29/go.mod h1:AuYgA5Kyo4c7HfUmvRGs/6rGlMMV/6B1bVnB9JxJEEg= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/skeema/knownhosts v1.2.0 h1:h9r9cf0+u7wSE+M183ZtMGgOJKiL96brpaz5ekfJCpM= github.com/skeema/knownhosts v1.2.0/go.mod h1:g4fPeYpque7P0xefxtGzV81ihjC8sX2IqpAoNkjxbMo= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/assertions v1.0.0/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9/go.mod h1:SnhjPscd9TpLiy1LpzGSKh3bXCfxxXuqd9xmQJy3slM= github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smartystreets/gunit v1.0.0/go.mod h1:qwPWnhz6pn0NnRBP++URONOVyNkPyr4SauJk4cUOwJs= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/sourcegraph/go-diff v0.5.1/go.mod h1:j2dHj3m8aZgQO8lMTcTnBcXkRRRqi34cd2MNlA9u1mE= github.com/sourcegraph/go-diff v0.5.3/go.mod h1:v9JDtjCE4HHHCZGId75rg8gkKKa98RVjBcBGsVmMmak= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spdx/gordf v0.0.0-20201111095634-7098f93598fb/go.mod h1:uKWaldnbMnjsSAXRurWqqrdyZen1R7kxl8TkmWk2OyM= github.com/spdx/tools-golang v0.5.1 h1:fJg3SVOGG+eIva9ZUBm/hvyA7PIPVFjRxUKe6fdAgwE= github.com/spdx/tools-golang v0.5.1/go.mod h1:/DRDQuBfB37HctM29YtrX1v+bXiVmT2OpQDalRmX9aU= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/spf13/viper v1.6.1/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/stretchr/objx v0.0.0-20180129172003-8a3f7159479f/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v0.0.0-20180303142811-b89eecf5ca5d/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA= github.com/tdakkota/asciicheck v0.0.0-20200416190851-d7f85be797a2/go.mod h1:yHp0ai0Z9gUljN3o0xMhYJnH/IcvkdTBOX2fmJ93JEM= github.com/tdakkota/asciicheck v0.0.0-20200416200610-e657995f937b/go.mod h1:yHp0ai0Z9gUljN3o0xMhYJnH/IcvkdTBOX2fmJ93JEM= github.com/tetafro/godot v0.3.7/go.mod h1:/7NLHhv08H1+8DNj0MElpAACw1ajsCuf3TKNQxA5S+0= github.com/tetafro/godot v0.4.2/go.mod h1:/7NLHhv08H1+8DNj0MElpAACw1ajsCuf3TKNQxA5S+0= github.com/tidwall/gjson v1.15.0 h1:5n/pM+v3r5ujuNl4YLZLsQ+UE5jlkLVm7jMzT5Mpolw= github.com/tidwall/gjson v1.15.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/timakin/bodyclose v0.0.0-20190930140734-f7f2e9bca95e/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk= github.com/timakin/bodyclose v0.0.0-20200424151742-cb6215831a94/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk= github.com/tj/assert v0.0.0-20171129193455-018094318fb0/go.mod h1:mZ9/Rh9oLWpLLDRpvE+3b7gP/C2YyLFYxNmcLnPTMe0= github.com/tj/go-elastic v0.0.0-20171221160941-36157cbbebc2/go.mod h1:WjeM0Oo1eNAjXGDx2yma7uG2XoyRZTq1uv3M/o7imD0= github.com/tj/go-kinesis v0.0.0-20171128231115-08b17f58cb1b/go.mod h1:/yhzCV0xPfx6jb1bBgRFjl5lytqVqZXEaeqWP8lTEao= github.com/tj/go-spin v1.1.0/go.mod h1:Mg1mzmePZm4dva8Qz60H2lHwmJ2loum4VIrLgVnKwh4= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tommy-muehle/go-mnd v1.1.1/go.mod h1:dSUh0FtTP8VhvkL1S+gUR1OKd9ZnSaozuI6r3m6wOig= github.com/tommy-muehle/go-mnd v1.3.1-0.20200224220436-e6f9a994e8fa/go.mod h1:dSUh0FtTP8VhvkL1S+gUR1OKd9ZnSaozuI6r3m6wOig= github.com/tonistiigi/fsutil v0.0.0-20201103201449-0834f99b7b85/go.mod h1:a7cilN64dG941IOXfhJhlH0qB92hxJ9A1ewrdUmJ6xo= github.com/tonistiigi/fsutil v0.0.0-20230629203738-36ef4d8c0dbb h1:uUe8rNyVXM8moActoBol6Xf6xX2GMr7SosR2EywMvGg= github.com/tonistiigi/fsutil v0.0.0-20230629203738-36ef4d8c0dbb/go.mod h1:SxX/oNQ/ag6Vaoli547ipFK9J7BZn5JqJG0JE8lf8bA= github.com/tonistiigi/go-actions-cache v0.0.0-20220404170428-0bdeb6e1eac7 h1:8eY6m1mjgyB8XySUR7WvebTM8D/Vs86jLJzD/Tw7zkc= github.com/tonistiigi/go-actions-cache v0.0.0-20220404170428-0bdeb6e1eac7/go.mod h1:qqvyZqkfwkoJuPU/bw61bItaoO0SJ8YSW0vSVRRvsRg= github.com/tonistiigi/go-archvariant v1.0.0 h1:5LC1eDWiBNflnTF1prCiX09yfNHIxDC/aukdhCdTyb0= github.com/tonistiigi/go-archvariant v1.0.0/go.mod h1:TxFmO5VS6vMq2kvs3ht04iPXtu2rUT/erOnGFYfk5Ho= github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea h1:SXhTLE6pb6eld/v/cCndK0AMpt1wiVFb/YYmqB3/QG0= github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea/go.mod h1:WPnis/6cRcDZSUvVmezrxJPkiO87ThFYsoUiMwWNDJk= github.com/tonistiigi/vt100 v0.0.0-20230623042737-f9a4f7ef6531 h1:Y/M5lygoNPKwVNLMPXgVfsRT40CSFKXCxuU8LoHySjs= github.com/tonistiigi/vt100 v0.0.0-20230623042737-f9a4f7ef6531/go.mod h1:ulncasL3N9uLrVann0m+CDlJKWsIAP34MPcOJF6VRvc= github.com/uber/jaeger-client-go v2.25.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= github.com/uber/jaeger-client-go v2.28.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= github.com/uber/jaeger-lib v2.2.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ulikunitz/xz v0.5.6/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4ABRW8= github.com/ulikunitz/xz v0.5.7/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/ultraware/funlen v0.0.2/go.mod h1:Dp4UiAus7Wdb9KUZsYWZEWiRzGuM2kXM1lPbfaF6xhA= github.com/ultraware/whitespace v0.0.4/go.mod h1:aVMh/gQve5Maj9hQ/hg+F75lr/X5A89uZnzAmWSineA= github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli v1.22.12 h1:igJgVw1JdKH+trcLWLeLwZjU9fEfPesQ+9/e4MQ44S8= github.com/urfave/cli v1.22.12/go.mod h1:sSBEIC79qR6OvcmsD4U3KABeOTxDqQtdDnaFuUN30b8= github.com/uudashr/gocognit v1.0.1/go.mod h1:j44Ayx2KW4+oB6SWMv8KsmHzZrOInQav7D3cQMJ5JUM= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasthttp v1.2.0/go.mod h1:4vX61m6KN+xDduDNwXrhIAVZaZaZiQ1luJk8LWSxF3s= github.com/valyala/quicktemplate v1.2.0/go.mod h1:EH+4AkTd43SvgIbQHYu59/cJyxDoOVRUAfrukLPuGJ4= github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= github.com/vbatts/tar-split v0.11.3 h1:hLFqsOLQ1SsppQNTMpkpPXClLDfC2A3Zgy9OUU+RVck= github.com/vbatts/tar-split v0.11.3/go.mod h1:9QlHN18E+fEH7RdG+QAJJcuya3rqT7eXSTY7wGrAokY= github.com/vdemeester/k8s-pkg-credentialprovider v1.17.4/go.mod h1:inCTmtUdr5KJbreVojo06krnTgaeAz/Z7lynpPk/Q2c= github.com/vektah/gqlparser/v2 v2.5.6 h1:Ou14T0N1s191eRMZ1gARVqohcbe1e8FrcONScsq8cRU= github.com/vektah/gqlparser/v2 v2.5.6/go.mod h1:z8xXUff237NntSuH8mLFijZ+1tjV1swDbpDqjJmk6ME= github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= github.com/vito/midterm v0.1.4 h1:SALq5mQ+AgzeZxjL4loB6Uk5TZc9JMyX2ELA/NVH65c= github.com/vito/midterm v0.1.4/go.mod h1:Mm3u6lrpzo2EFSJbwksKOdottTJzYePK8c1KJy4aRbk= github.com/vito/progrock v0.10.2-0.20230913234310-64b4a1cfb007 h1:RMNnjVKSImroyzJMINdkfNmlxFiBLGP30tjBH4GYgBE= github.com/vito/progrock v0.10.2-0.20230913234310-64b4a1cfb007/go.mod h1:ysw2W2gc20Snmlc0a34JbWO45HPM0oXO8IC59hyFc3k= github.com/vmware/govmomi v0.20.3/go.mod h1:URlwyTFZX72RmxtxuaFL2Uj3fD1JTvZdx59bHWk6aFU= github.com/weaveworks/common v0.0.0-20230119144549-0aaa5abd1e63 h1:qZcnPZbiX8gGs3VmipVc3ft29vPYBZzlox/04Von6+k= github.com/weaveworks/common v0.0.0-20230119144549-0aaa5abd1e63/go.mod h1:KoQ+3z63GUJzQ7AhU0AWQNU+LPda2EwL/cx1PlbDzVQ= github.com/weaveworks/promrus v1.2.0 h1:jOLf6pe6/vss4qGHjXmGz4oDJQA+AOCqEL3FvvZGz7M= github.com/weaveworks/promrus v1.2.0/go.mod h1:SaE82+OJ91yqjrE1rsvBWVzNZKcHYFtMUyS1+Ogs/KA= github.com/willf/bitset v1.1.11-0.20200630133818-d5bec3311243/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= github.com/xanzy/go-gitlab v0.31.0/go.mod h1:sPLojNBn68fMUWSxIJtdVVIP8uSBYqesTfDUseX11Ug= github.com/xanzy/go-gitlab v0.32.0/go.mod h1:sPLojNBn68fMUWSxIJtdVVIP8uSBYqesTfDUseX11Ug= github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8/go.mod h1:HUYIGzjTL3rfEspMxjDjgmT5uz5wzYJKVo23qUhYTos= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yuin/goldmark v1.5.4 h1:2uY/xC0roWy8IBEGLgB1ywIoEJFGmRrX21YQcvGZzjU= github.com/yuin/goldmark v1.5.4/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs= github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA= github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg= github.com/zeebo/assert v1.3.0 h1:g7C04CbJuIDKNPFHmsk4hwZDO5O+kntRxzaUoNXj+IQ= github.com/zeebo/xxh3 v1.0.2 h1:xZmwmqxHZA8AI603jOQ0tMqmBr9lPeFwGg6d+xy9DC0= github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA= github.com/zmb3/spotify/v2 v2.3.1 h1:aEyIPotROM3JJjHMCImFROgnPIUpzVo8wymYSaPSd9w= github.com/zmb3/spotify/v2 v2.3.1/go.mod h1:+LVh9CafHu7SedyqYmEf12Rd01dIVlEL845yNhksW0E= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ= go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.opencensus.io v0.15.0/go.mod h1:UffZAU+4sDEINUGP/B7UfBBkq4fqLu9zXAX7ke6CHW0= go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA= go.opencensus.io v0.19.1/go.mod h1:gug0GbSHa8Pafr0d2urOSgoXHZ6x/RUlaiT0d9pqb4A= go.opencensus.io v0.19.2/go.mod h1:NO/8qkisMZLZ1FCsKNqtJPwc8/TaclWyY0B6wcYNg9M= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.45.0 h1:RsQi0qJ2imFfCvZabqzM9cNXBG8k6gXMv1A0cXRmH6A= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.45.0/go.mod h1:vsh3ySueQCiKPxFLvjWC4Z135gIa34TQ/NSqkDTZYUM= go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.45.0 h1:2ea0IkZBsWH+HA2GkD+7+hRw2u97jzdFyRtXuO14a1s= go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.45.0/go.mod h1:4m3RnBBb+7dB9d21y510oO1pdB1V4J6smNf14WXcBFQ= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 h1:x8Z78aZx8cOF0+Kkazoc7lwUNMGy0LrzEMxTm4BbTxg= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0/go.mod h1:62CPTSry9QZtOaSsE3tOzhx6LzDhHnXJ6xHeMNNiM6Q= go.opentelemetry.io/otel v1.19.0 h1:MuS/TNf4/j4IXsZuJegVzI1cwut7Qc00344rgH7p8bs= go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY= go.opentelemetry.io/otel/exporters/jaeger v1.17.0 h1:D7UpUy2Xc2wsi1Ras6V40q806WM07rqoCWzXu7Sqy+4= go.opentelemetry.io/otel/exporters/jaeger v1.17.0/go.mod h1:nPCqOnEH9rNLKqH/+rrUjiMzHJdV1BlpKcTwRTyKkKI= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 h1:Mne5On7VWdx7omSrSSZvM4Kw7cS7NQkOOmLcgscI51U= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0/go.mod h1:IPtUMKL4O3tH5y+iXVyAXqpAwMuzC1IrxVS81rummfE= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0 h1:3d+S281UTjM+AbF31XSOYn1qXn3BgIdWl8HNEpx08Jk= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0/go.mod h1:0+KuTDyKL4gjKCF75pHOX4wuzYDUZYfAQdSu43o+Z2I= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0 h1:IeMeyr1aBvBiPVYihXIaeIZba6b8E1bYp7lbdxK8CQg= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0/go.mod h1:oVdCUtjq9MK9BlS7TtucsQwUcXcymNiEDjgDD2jMtZU= go.opentelemetry.io/otel/metric v1.19.0 h1:aTzpGtV0ar9wlV4Sna9sdJyII5jTVJEvKETPiOKwvpE= go.opentelemetry.io/otel/metric v1.19.0/go.mod h1:L5rUsV9kM1IxCj1MmSdS+JQAcVm319EUrDVLrt7jqt8= go.opentelemetry.io/otel/sdk v1.19.0 h1:6USY6zH+L8uMH8L3t1enZPR3WFEmSTADlqldyHtJi3o= go.opentelemetry.io/otel/sdk v1.19.0/go.mod h1:NedEbbS4w3C6zElbLdPJKOpJQOrGUJ+GfzpjUvI0v1A= go.opentelemetry.io/otel/trace v1.19.0 h1:DFVQmlVbfVeOuBRrwdtaehRrWiL1JoVs9CPIQ1Dzxpg= go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmYZpYojqMnX2vo= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.1/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= go.uber.org/goleak v1.2.1/go.mod h1:qlT2yGI9QafXHhZZLxlSuNsMw3FFLxBr+tBRlmO1xH4= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= gocloud.dev v0.19.0/go.mod h1:SmKwiR8YwIMMJvQBKLsC3fHNyMwXLw3PMDO+VVteJMI= golang.org/x/build v0.0.0-20190314133821-5284462c4bec/go.mod h1:atTaCNAy0f16Ah5aV1gMSwgiKVHwu/JncqDpuRr7lS4= golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191002192127-34f69633bfdc/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201117144127-c1f2f97bffc9/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20221012134737-56aed061732a/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190312203227-4b39c73a6495/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI= golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/image v0.0.0-20190910094157-69e4b8554b2a/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/image v0.7.0 h1:gzS29xtG1J5ybQlv0PuyfE3nmc6R4qB73m6LUUmvFuw= golang.org/x/image v0.7.0/go.mod h1:nd/q4ef1AKKYl/4kft7g+6UyGbdiqWqTP1ZAbRoV7Rg= golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20181217174547-8f45f776aaf1/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY= golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180911220305-26e67e76b6c3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181029044818-c44066c5c816/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181106065722-10aee1819953/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181108082009-03003ca0c849/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190619014844-b5b0513f8c1b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191112182307-2180aed22343/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210916014120-12bc252f5db8/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/net v0.16.0 h1:7eBu7KsSvFDtSXUIDbh3aqlK4DPsZ1rByC8PFfBThos= golang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20180724155351-3d292e4d0cdc/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181106182150-f42d05182288/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210810183815-faf39c7919d5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.13.0 h1:jDDenyj+WgFtmV3zYVoi8aE2BwtXFLWOA67ZfNWftiY= golang.org/x/oauth2 v0.13.0/go.mod h1:/JMhi4ZRXAf4HG9LiNmxvk+45+96RUlVThiH8FzNBn0= golang.org/x/perf v0.0.0-20180704124530-6e6d33e29852/go.mod h1:JLpeXjPJfIyPr5TlbXLkXWLhP8nz10XfvxElABhCtcw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ= golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181029174526-d69651ed3497/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181218192612-074acd46bca6/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190514135907-3a4b5fb9f71f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190602015325-4c4f7f33c9ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190620070143-6f217b454f45/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191112214154-59a1497f0cea/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191210023423-ac6580df4449/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200120151820-655fe14d7479/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200916030750-2334cc1a136f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200917073148-efd3b9a0ff20/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201013081832-0aaa2718063a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220906165534-d0df966e6959/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181117154741-2ddaf7f79a09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181219222714-6e267b5cc78e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190110163146-51295c7ec13a/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190221204921-83362c3779f5/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190311215038-5c2858a9cfe5/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190322203728-c1a832b0ad89/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190422233926-fe54fb35175b/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190521203540-521d6ed310dd/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190706070813-72ffa07ba3db/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= golang.org/x/tools v0.0.0-20190719005602-e377ae9d6386/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190910044552-dd2b5c81c578/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190920225731-5eefd052ad72/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113232020-e2727e816f5a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200102140908-9497f49d5709/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200204192400-7124308813f3/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200324003944-a576cf524670/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200331202046-9d5940d49312/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200414032229-332987a829c3/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200422022333-3d57cf2e726e/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200426102838-f3a5411a4c3b/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200502202811-ed308ab3e770/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.14.0 h1:jvNa2pY0M4r62jkRQ6RwEZZyPcymeL9XZMLBbV7U2nc= golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= gonum.org/v1/gonum v0.0.0-20190331200053-3d26580ed485/go.mod h1:2ltnJ7xHfj0zHS40VVPYEAAMTa3ZGguvHGBSJeRWqE0= gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= gonum.org/v1/netlib v0.0.0-20190331212654-76723241ea4e/go.mod h1:kS+toOQn6AQKjmKJ7gzohV1XkqsFehRA2FbsbkopSuQ= gonum.org/v1/plot v0.12.0 h1:y1ZNmfz/xHuHvtgFe8USZVyykQo5ERXPnspQNVK15Og= gonum.org/v1/plot v0.12.0/go.mod h1:PgiMf9+3A3PnZdJIciIXmyN1FwdAA6rXELSN761oQkw= google.golang.org/api v0.0.0-20160322025152-9bf6e6e569ff/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.0.0-20181030000543-1d582fd0359e/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.0.0-20181220000619-583d854617af/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.2.0/go.mod h1:IfRCZScioGtypHNTlz3gFk67J8uePVW7uDTBzXuIkhU= google.golang.org/api v0.3.0/go.mod h1:IuvZyQh8jgscv8qWfQ4ABd8m7hEudgBFM/EdhA3BnXw= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.5.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.6.0/go.mod h1:btoxGiFvQNVUZQ8W08zLtrVS08CNpINPEfxXxgJL1Q4= google.golang.org/api v0.6.1-0.20190607001116-5213b8090861/go.mod h1:btoxGiFvQNVUZQ8W08zLtrVS08CNpINPEfxXxgJL1Q4= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.25.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/cloud v0.0.0-20151119220103-975617b05ea8/go.mod h1:0H1ncTHf11KCFhTc/+EFRbzSCOZx+VUbRMk55Yv5MYk= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20181029155118-b69ba1387ce2/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20181219182458-5a97ab628bfb/go.mod h1:7Ep/1NZk928CDR8SjdVbjWNpdIf6nzjE3BTgJDr2Atg= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190508193815-b515fa19cec8/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= google.golang.org/genproto v0.0.0-20190620144150-6af8c5fc6601/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200117163144-32f20d992d24/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200527145253-8367513e4ece/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210329143202-679c6ae281ee/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98 h1:Z0hjGZePRE0ZBWotvtrwxFNrNE9CUAGtplaDK5NNI/g= google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98/go.mod h1:S7mY02OqCJTD0E1OiQy1F72PWFB4bZJ87cAtLPYgDR0= google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 h1:FmF5cCW94Ij59cfpoLiwTgodWmm60eEV0CjlsVg2fuw= google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.58.2 h1:SXUpjxeVF3FKrTYQI4f4KvbGD5u2xccdYdurwowix5I= google.golang.org/grpc v1.58.2/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20141024133853-64131543e789/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.0/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.56.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/warnings.v0 v0.1.1/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20180920025451-e3ad64cb4ed3/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.5/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.0.0-20180904230853-4e7be11eab3f/go.mod h1:iuAfoD4hCxJ8Onx9kaTIt30j7jUFS00AXQi6QMi99vA= k8s.io/api v0.17.4/go.mod h1:5qxx6vjmwUVG2nHQTKGlLts8Tbok8PzHl4vHtVFuZCA= k8s.io/api v0.19.0/go.mod h1:I1K45XlvTrDjmj5LoM5LuP/KYrhWbjUKT/SoPG0qTjw= k8s.io/apimachinery v0.0.0-20180904193909-def12e63c512/go.mod h1:ccL7Eh7zubPUSh9A3USN90/OzHNSVN6zxzde07TDCL0= k8s.io/apimachinery v0.17.4/go.mod h1:gxLnyZcGNdZTCLnq3fgzyg2A5BVCHTNDFrw8AmuJ+0g= k8s.io/apimachinery v0.19.0/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA= k8s.io/apiserver v0.17.4/go.mod h1:5ZDQ6Xr5MNBxyi3iUZXS84QOhZl+W7Oq2us/29c0j9I= k8s.io/client-go v0.0.0-20180910083459-2cefa64ff137/go.mod h1:7vJpHMYJwNQCWgzmNV+VYUl1zCObLyodBc8nIyt8L5s= k8s.io/client-go v0.17.4/go.mod h1:ouF6o5pz3is8qU0/qYL2RnoxOPqgfuidYLowytyLJmc= k8s.io/client-go v0.19.0/go.mod h1:H9E/VT95blcFQnlyShFgnFT9ZnJOAceiUHM3MlRC+mU= k8s.io/cloud-provider v0.17.4/go.mod h1:XEjKDzfD+b9MTLXQFlDGkk6Ho8SGMpaU8Uugx/KNK9U= k8s.io/code-generator v0.17.2/go.mod h1:DVmfPQgxQENqDIzVR2ddLXMH34qeszkKSdH/N+s+38s= k8s.io/component-base v0.17.4/go.mod h1:5BRqHMbbQPm2kKu35v3G+CpVq4K0RJKC7TRioF0I9lE= k8s.io/cri-api v0.17.3/go.mod h1:X1sbHmuXhwaHs9xxYffLqJogVsnI+f6cPRcgPel7ywM= k8s.io/csi-translation-lib v0.17.4/go.mod h1:CsxmjwxEI0tTNMzffIAcgR9lX4wOh6AKHdxQrT7L0oo= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20190822140433-26a664648505/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/kube-openapi v0.0.0-20180731170545-e3762e86a74c/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc= k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= k8s.io/kubernetes v1.11.10/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= k8s.io/legacy-cloud-providers v0.17.4/go.mod h1:FikRNoD64ECjkxO36gkDgJeiQWwyZTuBkhu+yxOc1Js= k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= kernel.org/pub/linux/libs/security/libcap/cap v1.2.67 h1:sPQ9qlSNR26fToTKbxe/HDWJlXvBLqGmt84LGCQkOy0= kernel.org/pub/linux/libs/security/libcap/psx v1.2.67 h1:NxbXJ7pDVq0FKBsqjieT92QDXI2XaqH2HAi4QcCOHt8= modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw= modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk= modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k= modernc.org/strutil v1.0.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs= modernc.org/xc v1.0.0/go.mod h1:mRNCo0bvLjGhHO9WsyuKVU4q0ceiDDDoEeWDJHrNx8I= mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc= mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4= mvdan.cc/unparam v0.0.0-20190720180237-d51796306d8f/go.mod h1:4G1h5nDURzA3bwVMZIVpwbkw+04kSxk3rAtzlimaUJw= mvdan.cc/unparam v0.0.0-20200501210554-b37ab49443f7/go.mod h1:HGC5lll35J70Y5v7vCGb9oLhHoScFwkHDJm/05RdSTc= oss.terrastruct.com/d2 v0.4.0 h1:ZZwO68uN8UYkEObuJuSMnV1qfcaVLLlJEOnjPuavdJg= oss.terrastruct.com/d2 v0.4.0/go.mod h1:EKjuT3J/wss0geBmUhq+LgZBlqRu438+h89g0+hvhEw= oss.terrastruct.com/util-go v0.0.0-20230320053557-dcb5aac7d972 h1:HS7fg2GzGsqRLApsoh7ztaLMvXzxSln/Hfz4wy4tIDA= oss.terrastruct.com/util-go v0.0.0-20230320053557-dcb5aac7d972/go.mod h1:eMWv0sOtD9T2RUl90DLWfuShZCYp4NrsqNpI8eqO6U4= pack.ag/amqp v0.11.2/go.mod h1:4/cbmt4EJXSKlG6LCfWHoqmN0uFdy5i/+YFz+fTfhV4= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1 h1:k1MczvYDUvJBe93bYd7wrZLLUEcLZAuF824/I4e5Xr4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= sigs.k8s.io/structured-merge-diff v1.0.1-0.20191108220359-b1b620dd3f06/go.mod h1:/ULNhyfzRopfcjskuui0cTITekDduZ7ycKN3oUT9R18= sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4/go.mod h1:ketZ/q3QxT9HOBeFhu6RdvsftgpsbFHBF5Cas6cDKZ0= sourcegraph.com/sqs/pbtypes v1.0.0/go.mod h1:3AciMUv4qUuRHRHhOG4TZOB+72GdPVz5k+c648qsFS4=
closed
dagger/dagger
https://github.com/dagger/dagger
5,904
Zenith: fix handling of list inputs
```go package main import ( "fmt" ) type Test struct{} type Foo struct { Msg string } func (m *Test) TestListInput(foos []Foo) string { return fmt.Sprintf("%+v", foos) } ``` Currently fails when building the module w/ error `41: [0.44s] ./dagger.gen.go:4250:15: undefined: test` Something must have broken in handling of list input types at some point I'm guessing? cc @jedevc @vito This should at least work in terms of codegen, handling it in `dagger call` is also important but probably a separate task, unless of course we already handled it (cc @helderco)
https://github.com/dagger/dagger/issues/5904
https://github.com/dagger/dagger/pull/5907
db901c8fe4c70cc32336e304492ca37f12b8f389
e8ad5c62275172e3d54ae46447e741ff5d603450
"2023-10-16T18:21:57Z"
go
"2023-10-25T19:38:59Z"
sdk/go/dagger.gen.go
// Code generated by dagger. DO NOT EDIT. package dagger import ( "context" "encoding/json" "fmt" "reflect" "github.com/Khan/genqlient/graphql" "dagger.io/dagger/querybuilder" ) // assertNotNil panic if the given value is nil. // This function is used to validate that input with pointer type are not nil. // See https://github.com/dagger/dagger/issues/5696 for more context. func assertNotNil(argName string, value any) { // We use reflect because just comparing value to nil is not working since // the value is wrapped into a type when passed as parameter. // E.g., nil become (*dagger.File)(nil). if reflect.ValueOf(value).IsNil() { panic(fmt.Sprintf("unexpected nil pointer for argument %q", argName)) } } // A global cache volume identifier. type CacheVolumeID string // A unique container identifier. Null designates an empty container (scratch). type ContainerID string // A content-addressed directory identifier. type DirectoryID string // A file identifier. type FileID string // A reference to a FunctionArg. type FunctionArgID string // A reference to a Function. type FunctionID string // A reference to GeneratedCode. type GeneratedCodeID string // An arbitrary JSON-encoded value. type JSON string // A reference to a Module. type ModuleID string // The platform config OS and architecture in a Container. // // The format is [os]/[platform]/[version] (e.g., "darwin/arm64/v7", "windows/amd64", "linux/arm64"). type Platform string // A unique identifier for a secret. type SecretID string // A unique service identifier. type ServiceID string // A content-addressed socket identifier. type SocketID string // A reference to a TypeDef. type TypeDefID string // The absense of a value. // // A Null Void is used as a placeholder for resolvers that do not return anything. type Void string // Key value object that represents a build argument. type BuildArg struct { // The build argument name. Name string `json:"name"` // The build argument value. Value string `json:"value"` } // Key value object that represents a Pipeline label. type PipelineLabel struct { // Label name. Name string `json:"name"` // Label value. Value string `json:"value"` } // Port forwarding rules for tunneling network traffic. type PortForward struct { // Destination port for traffic. Backend int `json:"backend"` // Port to expose to clients. If unspecified, a default will be chosen. Frontend int `json:"frontend"` // Protocol to use for traffic. Protocol NetworkProtocol `json:"protocol,omitempty"` } // A directory whose contents persist across runs. type CacheVolume struct { q *querybuilder.Selection c graphql.Client id *CacheVolumeID } func (r *CacheVolume) ID(ctx context.Context) (CacheVolumeID, error) { if r.id != nil { return *r.id, nil } q := r.q.Select("id") var response CacheVolumeID q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // XXX_GraphQLType is an internal function. It returns the native GraphQL type name func (r *CacheVolume) XXX_GraphQLType() string { return "CacheVolume" } // XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object func (r *CacheVolume) XXX_GraphQLIDType() string { return "CacheVolumeID" } // XXX_GraphQLID is an internal function. It returns the underlying type ID func (r *CacheVolume) XXX_GraphQLID(ctx context.Context) (string, error) { id, err := r.ID(ctx) if err != nil { return "", err } return string(id), nil } func (r *CacheVolume) MarshalJSON() ([]byte, error) { id, err := r.ID(context.Background()) if err != nil { return nil, err } return json.Marshal(id) } // An OCI-compatible container, also known as a docker container. type Container struct { q *querybuilder.Selection c graphql.Client envVariable *string export *bool id *ContainerID imageRef *string label *string platform *Platform publish *string shellEndpoint *string stderr *string stdout *string sync *ContainerID user *string workdir *string } type WithContainerFunc func(r *Container) *Container // With calls the provided function with current Container. // // This is useful for reusability and readability by not breaking the calling chain. func (r *Container) With(f WithContainerFunc) *Container { return f(r) } // Turn the container into a Service. // // Be sure to set any exposed ports before this conversion. func (r *Container) AsService() *Service { q := r.q.Select("asService") return &Service{ q: q, c: r.c, } } // ContainerAsTarballOpts contains options for Container.AsTarball type ContainerAsTarballOpts struct { // Identifiers for other platform specific containers. // Used for multi-platform image. PlatformVariants []*Container // Force each layer of the image to use the specified compression algorithm. // If this is unset, then if a layer already has a compressed blob in the engine's // cache, that will be used (this can result in a mix of compression algorithms for // different layers). If this is unset and a layer has no compressed blob in the // engine's cache, then it will be compressed using Gzip. ForcedCompression ImageLayerCompression // Use the specified media types for the image's layers. Defaults to OCI, which // is largely compatible with most recent container runtimes, but Docker may be needed // for older runtimes without OCI support. MediaTypes ImageMediaTypes } // Returns a File representing the container serialized to a tarball. func (r *Container) AsTarball(opts ...ContainerAsTarballOpts) *File { q := r.q.Select("asTarball") for i := len(opts) - 1; i >= 0; i-- { // `platformVariants` optional argument if !querybuilder.IsZeroValue(opts[i].PlatformVariants) { q = q.Arg("platformVariants", opts[i].PlatformVariants) } // `forcedCompression` optional argument if !querybuilder.IsZeroValue(opts[i].ForcedCompression) { q = q.Arg("forcedCompression", opts[i].ForcedCompression) } // `mediaTypes` optional argument if !querybuilder.IsZeroValue(opts[i].MediaTypes) { q = q.Arg("mediaTypes", opts[i].MediaTypes) } } return &File{ q: q, c: r.c, } } // ContainerBuildOpts contains options for Container.Build type ContainerBuildOpts struct { // Path to the Dockerfile to use. // // Default: './Dockerfile'. Dockerfile string // Additional build arguments. BuildArgs []BuildArg // Target build stage to build. Target string // Secrets to pass to the build. // // They will be mounted at /run/secrets/[secret-name] in the build container // // They can be accessed in the Dockerfile using the "secret" mount type // and mount path /run/secrets/[secret-name] // e.g. RUN --mount=type=secret,id=my-secret curl url?token=$(cat /run/secrets/my-secret)" Secrets []*Secret } // Initializes this container from a Dockerfile build. func (r *Container) Build(context *Directory, opts ...ContainerBuildOpts) *Container { assertNotNil("context", context) q := r.q.Select("build") for i := len(opts) - 1; i >= 0; i-- { // `dockerfile` optional argument if !querybuilder.IsZeroValue(opts[i].Dockerfile) { q = q.Arg("dockerfile", opts[i].Dockerfile) } // `buildArgs` optional argument if !querybuilder.IsZeroValue(opts[i].BuildArgs) { q = q.Arg("buildArgs", opts[i].BuildArgs) } // `target` optional argument if !querybuilder.IsZeroValue(opts[i].Target) { q = q.Arg("target", opts[i].Target) } // `secrets` optional argument if !querybuilder.IsZeroValue(opts[i].Secrets) { q = q.Arg("secrets", opts[i].Secrets) } } q = q.Arg("context", context) return &Container{ q: q, c: r.c, } } // Retrieves default arguments for future commands. func (r *Container) DefaultArgs(ctx context.Context) ([]string, error) { q := r.q.Select("defaultArgs") var response []string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Retrieves a directory at the given path. // // Mounts are included. func (r *Container) Directory(path string) *Directory { q := r.q.Select("directory") q = q.Arg("path", path) return &Directory{ q: q, c: r.c, } } // Retrieves entrypoint to be prepended to the arguments of all commands. func (r *Container) Entrypoint(ctx context.Context) ([]string, error) { q := r.q.Select("entrypoint") var response []string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Retrieves the value of the specified environment variable. func (r *Container) EnvVariable(ctx context.Context, name string) (string, error) { if r.envVariable != nil { return *r.envVariable, nil } q := r.q.Select("envVariable") q = q.Arg("name", name) var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Retrieves the list of environment variables passed to commands. func (r *Container) EnvVariables(ctx context.Context) ([]EnvVariable, error) { q := r.q.Select("envVariables") q = q.Select("name value") type envVariables struct { Name string Value string } convert := func(fields []envVariables) []EnvVariable { out := []EnvVariable{} for i := range fields { val := EnvVariable{name: &fields[i].Name, value: &fields[i].Value} out = append(out, val) } return out } var response []envVariables q = q.Bind(&response) err := q.Execute(ctx, r.c) if err != nil { return nil, err } return convert(response), nil } // ContainerExportOpts contains options for Container.Export type ContainerExportOpts struct { // Identifiers for other platform specific containers. // Used for multi-platform image. PlatformVariants []*Container // Force each layer of the exported image to use the specified compression algorithm. // If this is unset, then if a layer already has a compressed blob in the engine's // cache, that will be used (this can result in a mix of compression algorithms for // different layers). If this is unset and a layer has no compressed blob in the // engine's cache, then it will be compressed using Gzip. ForcedCompression ImageLayerCompression // Use the specified media types for the exported image's layers. Defaults to OCI, which // is largely compatible with most recent container runtimes, but Docker may be needed // for older runtimes without OCI support. MediaTypes ImageMediaTypes } // Writes the container as an OCI tarball to the destination file path on the host for the specified platform variants. // // Return true on success. // It can also publishes platform variants. func (r *Container) Export(ctx context.Context, path string, opts ...ContainerExportOpts) (bool, error) { if r.export != nil { return *r.export, nil } q := r.q.Select("export") for i := len(opts) - 1; i >= 0; i-- { // `platformVariants` optional argument if !querybuilder.IsZeroValue(opts[i].PlatformVariants) { q = q.Arg("platformVariants", opts[i].PlatformVariants) } // `forcedCompression` optional argument if !querybuilder.IsZeroValue(opts[i].ForcedCompression) { q = q.Arg("forcedCompression", opts[i].ForcedCompression) } // `mediaTypes` optional argument if !querybuilder.IsZeroValue(opts[i].MediaTypes) { q = q.Arg("mediaTypes", opts[i].MediaTypes) } } q = q.Arg("path", path) var response bool q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Retrieves the list of exposed ports. // // This includes ports already exposed by the image, even if not // explicitly added with dagger. func (r *Container) ExposedPorts(ctx context.Context) ([]Port, error) { q := r.q.Select("exposedPorts") q = q.Select("description port protocol") type exposedPorts struct { Description string Port int Protocol NetworkProtocol } convert := func(fields []exposedPorts) []Port { out := []Port{} for i := range fields { val := Port{description: &fields[i].Description, port: &fields[i].Port, protocol: &fields[i].Protocol} out = append(out, val) } return out } var response []exposedPorts q = q.Bind(&response) err := q.Execute(ctx, r.c) if err != nil { return nil, err } return convert(response), nil } // Retrieves a file at the given path. // // Mounts are included. func (r *Container) File(path string) *File { q := r.q.Select("file") q = q.Arg("path", path) return &File{ q: q, c: r.c, } } // Initializes this container from a pulled base image. func (r *Container) From(address string) *Container { q := r.q.Select("from") q = q.Arg("address", address) return &Container{ q: q, c: r.c, } } // A unique identifier for this container. func (r *Container) ID(ctx context.Context) (ContainerID, error) { if r.id != nil { return *r.id, nil } q := r.q.Select("id") var response ContainerID q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // XXX_GraphQLType is an internal function. It returns the native GraphQL type name func (r *Container) XXX_GraphQLType() string { return "Container" } // XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object func (r *Container) XXX_GraphQLIDType() string { return "ContainerID" } // XXX_GraphQLID is an internal function. It returns the underlying type ID func (r *Container) XXX_GraphQLID(ctx context.Context) (string, error) { id, err := r.ID(ctx) if err != nil { return "", err } return string(id), nil } func (r *Container) MarshalJSON() ([]byte, error) { id, err := r.ID(context.Background()) if err != nil { return nil, err } return json.Marshal(id) } // The unique image reference which can only be retrieved immediately after the 'Container.From' call. func (r *Container) ImageRef(ctx context.Context) (string, error) { if r.imageRef != nil { return *r.imageRef, nil } q := r.q.Select("imageRef") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // ContainerImportOpts contains options for Container.Import type ContainerImportOpts struct { // Identifies the tag to import from the archive, if the archive bundles // multiple tags. Tag string } // Reads the container from an OCI tarball. // // NOTE: this involves unpacking the tarball to an OCI store on the host at // $XDG_CACHE_DIR/dagger/oci. This directory can be removed whenever you like. func (r *Container) Import(source *File, opts ...ContainerImportOpts) *Container { assertNotNil("source", source) q := r.q.Select("import") for i := len(opts) - 1; i >= 0; i-- { // `tag` optional argument if !querybuilder.IsZeroValue(opts[i].Tag) { q = q.Arg("tag", opts[i].Tag) } } q = q.Arg("source", source) return &Container{ q: q, c: r.c, } } // Retrieves the value of the specified label. func (r *Container) Label(ctx context.Context, name string) (string, error) { if r.label != nil { return *r.label, nil } q := r.q.Select("label") q = q.Arg("name", name) var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Retrieves the list of labels passed to container. func (r *Container) Labels(ctx context.Context) ([]Label, error) { q := r.q.Select("labels") q = q.Select("name value") type labels struct { Name string Value string } convert := func(fields []labels) []Label { out := []Label{} for i := range fields { val := Label{name: &fields[i].Name, value: &fields[i].Value} out = append(out, val) } return out } var response []labels q = q.Bind(&response) err := q.Execute(ctx, r.c) if err != nil { return nil, err } return convert(response), nil } // Retrieves the list of paths where a directory is mounted. func (r *Container) Mounts(ctx context.Context) ([]string, error) { q := r.q.Select("mounts") var response []string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // ContainerPipelineOpts contains options for Container.Pipeline type ContainerPipelineOpts struct { // Pipeline description. Description string // Pipeline labels. Labels []PipelineLabel } // Creates a named sub-pipeline func (r *Container) Pipeline(name string, opts ...ContainerPipelineOpts) *Container { q := r.q.Select("pipeline") for i := len(opts) - 1; i >= 0; i-- { // `description` optional argument if !querybuilder.IsZeroValue(opts[i].Description) { q = q.Arg("description", opts[i].Description) } // `labels` optional argument if !querybuilder.IsZeroValue(opts[i].Labels) { q = q.Arg("labels", opts[i].Labels) } } q = q.Arg("name", name) return &Container{ q: q, c: r.c, } } // The platform this container executes and publishes as. func (r *Container) Platform(ctx context.Context) (Platform, error) { if r.platform != nil { return *r.platform, nil } q := r.q.Select("platform") var response Platform q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // ContainerPublishOpts contains options for Container.Publish type ContainerPublishOpts struct { // Identifiers for other platform specific containers. // Used for multi-platform image. PlatformVariants []*Container // Force each layer of the published image to use the specified compression algorithm. // If this is unset, then if a layer already has a compressed blob in the engine's // cache, that will be used (this can result in a mix of compression algorithms for // different layers). If this is unset and a layer has no compressed blob in the // engine's cache, then it will be compressed using Gzip. ForcedCompression ImageLayerCompression // Use the specified media types for the published image's layers. Defaults to OCI, which // is largely compatible with most recent registries, but Docker may be needed for older // registries without OCI support. MediaTypes ImageMediaTypes } // Publishes this container as a new image to the specified address. // // Publish returns a fully qualified ref. // It can also publish platform variants. func (r *Container) Publish(ctx context.Context, address string, opts ...ContainerPublishOpts) (string, error) { if r.publish != nil { return *r.publish, nil } q := r.q.Select("publish") for i := len(opts) - 1; i >= 0; i-- { // `platformVariants` optional argument if !querybuilder.IsZeroValue(opts[i].PlatformVariants) { q = q.Arg("platformVariants", opts[i].PlatformVariants) } // `forcedCompression` optional argument if !querybuilder.IsZeroValue(opts[i].ForcedCompression) { q = q.Arg("forcedCompression", opts[i].ForcedCompression) } // `mediaTypes` optional argument if !querybuilder.IsZeroValue(opts[i].MediaTypes) { q = q.Arg("mediaTypes", opts[i].MediaTypes) } } q = q.Arg("address", address) var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Retrieves this container's root filesystem. Mounts are not included. func (r *Container) Rootfs() *Directory { q := r.q.Select("rootfs") return &Directory{ q: q, c: r.c, } } // Return a websocket endpoint that, if connected to, will start the container with a TTY streamed // over the websocket. // // Primarily intended for internal use with the dagger CLI. func (r *Container) ShellEndpoint(ctx context.Context) (string, error) { if r.shellEndpoint != nil { return *r.shellEndpoint, nil } q := r.q.Select("shellEndpoint") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The error stream of the last executed command. // // Will execute default command if none is set, or error if there's no default. func (r *Container) Stderr(ctx context.Context) (string, error) { if r.stderr != nil { return *r.stderr, nil } q := r.q.Select("stderr") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The output stream of the last executed command. // // Will execute default command if none is set, or error if there's no default. func (r *Container) Stdout(ctx context.Context) (string, error) { if r.stdout != nil { return *r.stdout, nil } q := r.q.Select("stdout") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Forces evaluation of the pipeline in the engine. // // It doesn't run the default command if no exec has been set. func (r *Container) Sync(ctx context.Context) (*Container, error) { q := r.q.Select("sync") return r, q.Execute(ctx, r.c) } // Retrieves the user to be set for all commands. func (r *Container) User(ctx context.Context) (string, error) { if r.user != nil { return *r.user, nil } q := r.q.Select("user") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // ContainerWithDefaultArgsOpts contains options for Container.WithDefaultArgs type ContainerWithDefaultArgsOpts struct { // Arguments to prepend to future executions (e.g., ["-v", "--no-cache"]). Args []string } // Configures default arguments for future commands. func (r *Container) WithDefaultArgs(opts ...ContainerWithDefaultArgsOpts) *Container { q := r.q.Select("withDefaultArgs") for i := len(opts) - 1; i >= 0; i-- { // `args` optional argument if !querybuilder.IsZeroValue(opts[i].Args) { q = q.Arg("args", opts[i].Args) } } return &Container{ q: q, c: r.c, } } // ContainerWithDirectoryOpts contains options for Container.WithDirectory type ContainerWithDirectoryOpts struct { // Patterns to exclude in the written directory (e.g., ["node_modules/**", ".gitignore", ".git/"]). Exclude []string // Patterns to include in the written directory (e.g., ["*.go", "go.mod", "go.sum"]). Include []string // A user:group to set for the directory and its contents. // // The user and group can either be an ID (1000:1000) or a name (foo:bar). // // If the group is omitted, it defaults to the same as the user. Owner string } // Retrieves this container plus a directory written at the given path. func (r *Container) WithDirectory(path string, directory *Directory, opts ...ContainerWithDirectoryOpts) *Container { assertNotNil("directory", directory) q := r.q.Select("withDirectory") for i := len(opts) - 1; i >= 0; i-- { // `exclude` optional argument if !querybuilder.IsZeroValue(opts[i].Exclude) { q = q.Arg("exclude", opts[i].Exclude) } // `include` optional argument if !querybuilder.IsZeroValue(opts[i].Include) { q = q.Arg("include", opts[i].Include) } // `owner` optional argument if !querybuilder.IsZeroValue(opts[i].Owner) { q = q.Arg("owner", opts[i].Owner) } } q = q.Arg("path", path) q = q.Arg("directory", directory) return &Container{ q: q, c: r.c, } } // Retrieves this container but with a different command entrypoint. func (r *Container) WithEntrypoint(args []string) *Container { q := r.q.Select("withEntrypoint") q = q.Arg("args", args) return &Container{ q: q, c: r.c, } } // ContainerWithEnvVariableOpts contains options for Container.WithEnvVariable type ContainerWithEnvVariableOpts struct { // Replace ${VAR} or $VAR in the value according to the current environment // variables defined in the container (e.g., "/opt/bin:$PATH"). Expand bool } // Retrieves this container plus the given environment variable. func (r *Container) WithEnvVariable(name string, value string, opts ...ContainerWithEnvVariableOpts) *Container { q := r.q.Select("withEnvVariable") for i := len(opts) - 1; i >= 0; i-- { // `expand` optional argument if !querybuilder.IsZeroValue(opts[i].Expand) { q = q.Arg("expand", opts[i].Expand) } } q = q.Arg("name", name) q = q.Arg("value", value) return &Container{ q: q, c: r.c, } } // ContainerWithExecOpts contains options for Container.WithExec type ContainerWithExecOpts struct { // If the container has an entrypoint, ignore it for args rather than using it to wrap them. SkipEntrypoint bool // Content to write to the command's standard input before closing (e.g., "Hello world"). Stdin string // Redirect the command's standard output to a file in the container (e.g., "/tmp/stdout"). RedirectStdout string // Redirect the command's standard error to a file in the container (e.g., "/tmp/stderr"). RedirectStderr string // Provides dagger access to the executed command. // // Do not use this option unless you trust the command being executed. // The command being executed WILL BE GRANTED FULL ACCESS TO YOUR HOST FILESYSTEM. ExperimentalPrivilegedNesting bool // Execute the command with all root capabilities. This is similar to running a command // with "sudo" or executing `docker run` with the `--privileged` flag. Containerization // does not provide any security guarantees when using this option. It should only be used // when absolutely necessary and only with trusted commands. InsecureRootCapabilities bool } // Retrieves this container after executing the specified command inside it. func (r *Container) WithExec(args []string, opts ...ContainerWithExecOpts) *Container { q := r.q.Select("withExec") for i := len(opts) - 1; i >= 0; i-- { // `skipEntrypoint` optional argument if !querybuilder.IsZeroValue(opts[i].SkipEntrypoint) { q = q.Arg("skipEntrypoint", opts[i].SkipEntrypoint) } // `stdin` optional argument if !querybuilder.IsZeroValue(opts[i].Stdin) { q = q.Arg("stdin", opts[i].Stdin) } // `redirectStdout` optional argument if !querybuilder.IsZeroValue(opts[i].RedirectStdout) { q = q.Arg("redirectStdout", opts[i].RedirectStdout) } // `redirectStderr` optional argument if !querybuilder.IsZeroValue(opts[i].RedirectStderr) { q = q.Arg("redirectStderr", opts[i].RedirectStderr) } // `experimentalPrivilegedNesting` optional argument if !querybuilder.IsZeroValue(opts[i].ExperimentalPrivilegedNesting) { q = q.Arg("experimentalPrivilegedNesting", opts[i].ExperimentalPrivilegedNesting) } // `insecureRootCapabilities` optional argument if !querybuilder.IsZeroValue(opts[i].InsecureRootCapabilities) { q = q.Arg("insecureRootCapabilities", opts[i].InsecureRootCapabilities) } } q = q.Arg("args", args) return &Container{ q: q, c: r.c, } } // ContainerWithExposedPortOpts contains options for Container.WithExposedPort type ContainerWithExposedPortOpts struct { // Transport layer network protocol Protocol NetworkProtocol // Optional port description Description string } // Expose a network port. // // Exposed ports serve two purposes: // - For health checks and introspection, when running services // - For setting the EXPOSE OCI field when publishing the container func (r *Container) WithExposedPort(port int, opts ...ContainerWithExposedPortOpts) *Container { q := r.q.Select("withExposedPort") for i := len(opts) - 1; i >= 0; i-- { // `protocol` optional argument if !querybuilder.IsZeroValue(opts[i].Protocol) { q = q.Arg("protocol", opts[i].Protocol) } // `description` optional argument if !querybuilder.IsZeroValue(opts[i].Description) { q = q.Arg("description", opts[i].Description) } } q = q.Arg("port", port) return &Container{ q: q, c: r.c, } } // ContainerWithFileOpts contains options for Container.WithFile type ContainerWithFileOpts struct { // Permission given to the copied file (e.g., 0600). // // Default: 0644. Permissions int // A user:group to set for the file. // // The user and group can either be an ID (1000:1000) or a name (foo:bar). // // If the group is omitted, it defaults to the same as the user. Owner string } // Retrieves this container plus the contents of the given file copied to the given path. func (r *Container) WithFile(path string, source *File, opts ...ContainerWithFileOpts) *Container { assertNotNil("source", source) q := r.q.Select("withFile") for i := len(opts) - 1; i >= 0; i-- { // `permissions` optional argument if !querybuilder.IsZeroValue(opts[i].Permissions) { q = q.Arg("permissions", opts[i].Permissions) } // `owner` optional argument if !querybuilder.IsZeroValue(opts[i].Owner) { q = q.Arg("owner", opts[i].Owner) } } q = q.Arg("path", path) q = q.Arg("source", source) return &Container{ q: q, c: r.c, } } // Indicate that subsequent operations should be featured more prominently in // the UI. func (r *Container) WithFocus() *Container { q := r.q.Select("withFocus") return &Container{ q: q, c: r.c, } } // Retrieves this container plus the given label. func (r *Container) WithLabel(name string, value string) *Container { q := r.q.Select("withLabel") q = q.Arg("name", name) q = q.Arg("value", value) return &Container{ q: q, c: r.c, } } // ContainerWithMountedCacheOpts contains options for Container.WithMountedCache type ContainerWithMountedCacheOpts struct { // Identifier of the directory to use as the cache volume's root. Source *Directory // Sharing mode of the cache volume. Sharing CacheSharingMode // A user:group to set for the mounted cache directory. // // Note that this changes the ownership of the specified mount along with the // initial filesystem provided by source (if any). It does not have any effect // if/when the cache has already been created. // // The user and group can either be an ID (1000:1000) or a name (foo:bar). // // If the group is omitted, it defaults to the same as the user. Owner string } // Retrieves this container plus a cache volume mounted at the given path. func (r *Container) WithMountedCache(path string, cache *CacheVolume, opts ...ContainerWithMountedCacheOpts) *Container { assertNotNil("cache", cache) q := r.q.Select("withMountedCache") for i := len(opts) - 1; i >= 0; i-- { // `source` optional argument if !querybuilder.IsZeroValue(opts[i].Source) { q = q.Arg("source", opts[i].Source) } // `sharing` optional argument if !querybuilder.IsZeroValue(opts[i].Sharing) { q = q.Arg("sharing", opts[i].Sharing) } // `owner` optional argument if !querybuilder.IsZeroValue(opts[i].Owner) { q = q.Arg("owner", opts[i].Owner) } } q = q.Arg("path", path) q = q.Arg("cache", cache) return &Container{ q: q, c: r.c, } } // ContainerWithMountedDirectoryOpts contains options for Container.WithMountedDirectory type ContainerWithMountedDirectoryOpts struct { // A user:group to set for the mounted directory and its contents. // // The user and group can either be an ID (1000:1000) or a name (foo:bar). // // If the group is omitted, it defaults to the same as the user. Owner string } // Retrieves this container plus a directory mounted at the given path. func (r *Container) WithMountedDirectory(path string, source *Directory, opts ...ContainerWithMountedDirectoryOpts) *Container { assertNotNil("source", source) q := r.q.Select("withMountedDirectory") for i := len(opts) - 1; i >= 0; i-- { // `owner` optional argument if !querybuilder.IsZeroValue(opts[i].Owner) { q = q.Arg("owner", opts[i].Owner) } } q = q.Arg("path", path) q = q.Arg("source", source) return &Container{ q: q, c: r.c, } } // ContainerWithMountedFileOpts contains options for Container.WithMountedFile type ContainerWithMountedFileOpts struct { // A user or user:group to set for the mounted file. // // The user and group can either be an ID (1000:1000) or a name (foo:bar). // // If the group is omitted, it defaults to the same as the user. Owner string } // Retrieves this container plus a file mounted at the given path. func (r *Container) WithMountedFile(path string, source *File, opts ...ContainerWithMountedFileOpts) *Container { assertNotNil("source", source) q := r.q.Select("withMountedFile") for i := len(opts) - 1; i >= 0; i-- { // `owner` optional argument if !querybuilder.IsZeroValue(opts[i].Owner) { q = q.Arg("owner", opts[i].Owner) } } q = q.Arg("path", path) q = q.Arg("source", source) return &Container{ q: q, c: r.c, } } // ContainerWithMountedSecretOpts contains options for Container.WithMountedSecret type ContainerWithMountedSecretOpts struct { // A user:group to set for the mounted secret. // // The user and group can either be an ID (1000:1000) or a name (foo:bar). // // If the group is omitted, it defaults to the same as the user. Owner string // Permission given to the mounted secret (e.g., 0600). // This option requires an owner to be set to be active. // // Default: 0400. Mode int } // Retrieves this container plus a secret mounted into a file at the given path. func (r *Container) WithMountedSecret(path string, source *Secret, opts ...ContainerWithMountedSecretOpts) *Container { assertNotNil("source", source) q := r.q.Select("withMountedSecret") for i := len(opts) - 1; i >= 0; i-- { // `owner` optional argument if !querybuilder.IsZeroValue(opts[i].Owner) { q = q.Arg("owner", opts[i].Owner) } // `mode` optional argument if !querybuilder.IsZeroValue(opts[i].Mode) { q = q.Arg("mode", opts[i].Mode) } } q = q.Arg("path", path) q = q.Arg("source", source) return &Container{ q: q, c: r.c, } } // Retrieves this container plus a temporary directory mounted at the given path. func (r *Container) WithMountedTemp(path string) *Container { q := r.q.Select("withMountedTemp") q = q.Arg("path", path) return &Container{ q: q, c: r.c, } } // ContainerWithNewFileOpts contains options for Container.WithNewFile type ContainerWithNewFileOpts struct { // Content of the file to write (e.g., "Hello world!"). Contents string // Permission given to the written file (e.g., 0600). // // Default: 0644. Permissions int // A user:group to set for the file. // // The user and group can either be an ID (1000:1000) or a name (foo:bar). // // If the group is omitted, it defaults to the same as the user. Owner string } // Retrieves this container plus a new file written at the given path. func (r *Container) WithNewFile(path string, opts ...ContainerWithNewFileOpts) *Container { q := r.q.Select("withNewFile") for i := len(opts) - 1; i >= 0; i-- { // `contents` optional argument if !querybuilder.IsZeroValue(opts[i].Contents) { q = q.Arg("contents", opts[i].Contents) } // `permissions` optional argument if !querybuilder.IsZeroValue(opts[i].Permissions) { q = q.Arg("permissions", opts[i].Permissions) } // `owner` optional argument if !querybuilder.IsZeroValue(opts[i].Owner) { q = q.Arg("owner", opts[i].Owner) } } q = q.Arg("path", path) return &Container{ q: q, c: r.c, } } // Retrieves this container with a registry authentication for a given address. func (r *Container) WithRegistryAuth(address string, username string, secret *Secret) *Container { assertNotNil("secret", secret) q := r.q.Select("withRegistryAuth") q = q.Arg("address", address) q = q.Arg("username", username) q = q.Arg("secret", secret) return &Container{ q: q, c: r.c, } } // Initializes this container from this DirectoryID. func (r *Container) WithRootfs(directory *Directory) *Container { assertNotNil("directory", directory) q := r.q.Select("withRootfs") q = q.Arg("directory", directory) return &Container{ q: q, c: r.c, } } // Retrieves this container plus an env variable containing the given secret. func (r *Container) WithSecretVariable(name string, secret *Secret) *Container { assertNotNil("secret", secret) q := r.q.Select("withSecretVariable") q = q.Arg("name", name) q = q.Arg("secret", secret) return &Container{ q: q, c: r.c, } } // Establish a runtime dependency on a service. // // The service will be started automatically when needed and detached when it is // no longer needed, executing the default command if none is set. // // The service will be reachable from the container via the provided hostname alias. // // The service dependency will also convey to any files or directories produced by the container. func (r *Container) WithServiceBinding(alias string, service *Service) *Container { assertNotNil("service", service) q := r.q.Select("withServiceBinding") q = q.Arg("alias", alias) q = q.Arg("service", service) return &Container{ q: q, c: r.c, } } // ContainerWithUnixSocketOpts contains options for Container.WithUnixSocket type ContainerWithUnixSocketOpts struct { // A user:group to set for the mounted socket. // // The user and group can either be an ID (1000:1000) or a name (foo:bar). // // If the group is omitted, it defaults to the same as the user. Owner string } // Retrieves this container plus a socket forwarded to the given Unix socket path. func (r *Container) WithUnixSocket(path string, source *Socket, opts ...ContainerWithUnixSocketOpts) *Container { assertNotNil("source", source) q := r.q.Select("withUnixSocket") for i := len(opts) - 1; i >= 0; i-- { // `owner` optional argument if !querybuilder.IsZeroValue(opts[i].Owner) { q = q.Arg("owner", opts[i].Owner) } } q = q.Arg("path", path) q = q.Arg("source", source) return &Container{ q: q, c: r.c, } } // Retrieves this container with a different command user. func (r *Container) WithUser(name string) *Container { q := r.q.Select("withUser") q = q.Arg("name", name) return &Container{ q: q, c: r.c, } } // Retrieves this container with a different working directory. func (r *Container) WithWorkdir(path string) *Container { q := r.q.Select("withWorkdir") q = q.Arg("path", path) return &Container{ q: q, c: r.c, } } // Retrieves this container minus the given environment variable. func (r *Container) WithoutEnvVariable(name string) *Container { q := r.q.Select("withoutEnvVariable") q = q.Arg("name", name) return &Container{ q: q, c: r.c, } } // ContainerWithoutExposedPortOpts contains options for Container.WithoutExposedPort type ContainerWithoutExposedPortOpts struct { // Port protocol to unexpose Protocol NetworkProtocol } // Unexpose a previously exposed port. func (r *Container) WithoutExposedPort(port int, opts ...ContainerWithoutExposedPortOpts) *Container { q := r.q.Select("withoutExposedPort") for i := len(opts) - 1; i >= 0; i-- { // `protocol` optional argument if !querybuilder.IsZeroValue(opts[i].Protocol) { q = q.Arg("protocol", opts[i].Protocol) } } q = q.Arg("port", port) return &Container{ q: q, c: r.c, } } // Indicate that subsequent operations should not be featured more prominently // in the UI. // // This is the initial state of all containers. func (r *Container) WithoutFocus() *Container { q := r.q.Select("withoutFocus") return &Container{ q: q, c: r.c, } } // Retrieves this container minus the given environment label. func (r *Container) WithoutLabel(name string) *Container { q := r.q.Select("withoutLabel") q = q.Arg("name", name) return &Container{ q: q, c: r.c, } } // Retrieves this container after unmounting everything at the given path. func (r *Container) WithoutMount(path string) *Container { q := r.q.Select("withoutMount") q = q.Arg("path", path) return &Container{ q: q, c: r.c, } } // Retrieves this container without the registry authentication of a given address. func (r *Container) WithoutRegistryAuth(address string) *Container { q := r.q.Select("withoutRegistryAuth") q = q.Arg("address", address) return &Container{ q: q, c: r.c, } } // Retrieves this container with a previously added Unix socket removed. func (r *Container) WithoutUnixSocket(path string) *Container { q := r.q.Select("withoutUnixSocket") q = q.Arg("path", path) return &Container{ q: q, c: r.c, } } // Retrieves the working directory for all commands. func (r *Container) Workdir(ctx context.Context) (string, error) { if r.workdir != nil { return *r.workdir, nil } q := r.q.Select("workdir") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // A directory. type Directory struct { q *querybuilder.Selection c graphql.Client export *bool id *DirectoryID sync *DirectoryID } type WithDirectoryFunc func(r *Directory) *Directory // With calls the provided function with current Directory. // // This is useful for reusability and readability by not breaking the calling chain. func (r *Directory) With(f WithDirectoryFunc) *Directory { return f(r) } // DirectoryAsModuleOpts contains options for Directory.AsModule type DirectoryAsModuleOpts struct { // An optional subpath of the directory which contains the module's source // code. // // This is needed when the module code is in a subdirectory but requires // parent directories to be loaded in order to execute. For example, the // module source code may need a go.mod, project.toml, package.json, etc. file // from a parent directory. // // If not set, the module source code is loaded from the root of the // directory. SourceSubpath string } // Load the directory as a Dagger module func (r *Directory) AsModule(opts ...DirectoryAsModuleOpts) *Module { q := r.q.Select("asModule") for i := len(opts) - 1; i >= 0; i-- { // `sourceSubpath` optional argument if !querybuilder.IsZeroValue(opts[i].SourceSubpath) { q = q.Arg("sourceSubpath", opts[i].SourceSubpath) } } return &Module{ q: q, c: r.c, } } // Gets the difference between this directory and an another directory. func (r *Directory) Diff(other *Directory) *Directory { assertNotNil("other", other) q := r.q.Select("diff") q = q.Arg("other", other) return &Directory{ q: q, c: r.c, } } // Retrieves a directory at the given path. func (r *Directory) Directory(path string) *Directory { q := r.q.Select("directory") q = q.Arg("path", path) return &Directory{ q: q, c: r.c, } } // DirectoryDockerBuildOpts contains options for Directory.DockerBuild type DirectoryDockerBuildOpts struct { // Path to the Dockerfile to use (e.g., "frontend.Dockerfile"). // // Defaults: './Dockerfile'. Dockerfile string // The platform to build. Platform Platform // Build arguments to use in the build. BuildArgs []BuildArg // Target build stage to build. Target string // Secrets to pass to the build. // // They will be mounted at /run/secrets/[secret-name]. Secrets []*Secret } // Builds a new Docker container from this directory. func (r *Directory) DockerBuild(opts ...DirectoryDockerBuildOpts) *Container { q := r.q.Select("dockerBuild") for i := len(opts) - 1; i >= 0; i-- { // `dockerfile` optional argument if !querybuilder.IsZeroValue(opts[i].Dockerfile) { q = q.Arg("dockerfile", opts[i].Dockerfile) } // `platform` optional argument if !querybuilder.IsZeroValue(opts[i].Platform) { q = q.Arg("platform", opts[i].Platform) } // `buildArgs` optional argument if !querybuilder.IsZeroValue(opts[i].BuildArgs) { q = q.Arg("buildArgs", opts[i].BuildArgs) } // `target` optional argument if !querybuilder.IsZeroValue(opts[i].Target) { q = q.Arg("target", opts[i].Target) } // `secrets` optional argument if !querybuilder.IsZeroValue(opts[i].Secrets) { q = q.Arg("secrets", opts[i].Secrets) } } return &Container{ q: q, c: r.c, } } // DirectoryEntriesOpts contains options for Directory.Entries type DirectoryEntriesOpts struct { // Location of the directory to look at (e.g., "/src"). Path string } // Returns a list of files and directories at the given path. func (r *Directory) Entries(ctx context.Context, opts ...DirectoryEntriesOpts) ([]string, error) { q := r.q.Select("entries") for i := len(opts) - 1; i >= 0; i-- { // `path` optional argument if !querybuilder.IsZeroValue(opts[i].Path) { q = q.Arg("path", opts[i].Path) } } var response []string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Writes the contents of the directory to a path on the host. func (r *Directory) Export(ctx context.Context, path string) (bool, error) { if r.export != nil { return *r.export, nil } q := r.q.Select("export") q = q.Arg("path", path) var response bool q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Retrieves a file at the given path. func (r *Directory) File(path string) *File { q := r.q.Select("file") q = q.Arg("path", path) return &File{ q: q, c: r.c, } } // The content-addressed identifier of the directory. func (r *Directory) ID(ctx context.Context) (DirectoryID, error) { if r.id != nil { return *r.id, nil } q := r.q.Select("id") var response DirectoryID q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // XXX_GraphQLType is an internal function. It returns the native GraphQL type name func (r *Directory) XXX_GraphQLType() string { return "Directory" } // XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object func (r *Directory) XXX_GraphQLIDType() string { return "DirectoryID" } // XXX_GraphQLID is an internal function. It returns the underlying type ID func (r *Directory) XXX_GraphQLID(ctx context.Context) (string, error) { id, err := r.ID(ctx) if err != nil { return "", err } return string(id), nil } func (r *Directory) MarshalJSON() ([]byte, error) { id, err := r.ID(context.Background()) if err != nil { return nil, err } return json.Marshal(id) } // DirectoryPipelineOpts contains options for Directory.Pipeline type DirectoryPipelineOpts struct { // Pipeline description. Description string // Pipeline labels. Labels []PipelineLabel } // Creates a named sub-pipeline func (r *Directory) Pipeline(name string, opts ...DirectoryPipelineOpts) *Directory { q := r.q.Select("pipeline") for i := len(opts) - 1; i >= 0; i-- { // `description` optional argument if !querybuilder.IsZeroValue(opts[i].Description) { q = q.Arg("description", opts[i].Description) } // `labels` optional argument if !querybuilder.IsZeroValue(opts[i].Labels) { q = q.Arg("labels", opts[i].Labels) } } q = q.Arg("name", name) return &Directory{ q: q, c: r.c, } } // Force evaluation in the engine. func (r *Directory) Sync(ctx context.Context) (*Directory, error) { q := r.q.Select("sync") return r, q.Execute(ctx, r.c) } // DirectoryWithDirectoryOpts contains options for Directory.WithDirectory type DirectoryWithDirectoryOpts struct { // Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]). Exclude []string // Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]). Include []string } // Retrieves this directory plus a directory written at the given path. func (r *Directory) WithDirectory(path string, directory *Directory, opts ...DirectoryWithDirectoryOpts) *Directory { assertNotNil("directory", directory) q := r.q.Select("withDirectory") for i := len(opts) - 1; i >= 0; i-- { // `exclude` optional argument if !querybuilder.IsZeroValue(opts[i].Exclude) { q = q.Arg("exclude", opts[i].Exclude) } // `include` optional argument if !querybuilder.IsZeroValue(opts[i].Include) { q = q.Arg("include", opts[i].Include) } } q = q.Arg("path", path) q = q.Arg("directory", directory) return &Directory{ q: q, c: r.c, } } // DirectoryWithFileOpts contains options for Directory.WithFile type DirectoryWithFileOpts struct { // Permission given to the copied file (e.g., 0600). // // Default: 0644. Permissions int } // Retrieves this directory plus the contents of the given file copied to the given path. func (r *Directory) WithFile(path string, source *File, opts ...DirectoryWithFileOpts) *Directory { assertNotNil("source", source) q := r.q.Select("withFile") for i := len(opts) - 1; i >= 0; i-- { // `permissions` optional argument if !querybuilder.IsZeroValue(opts[i].Permissions) { q = q.Arg("permissions", opts[i].Permissions) } } q = q.Arg("path", path) q = q.Arg("source", source) return &Directory{ q: q, c: r.c, } } // DirectoryWithNewDirectoryOpts contains options for Directory.WithNewDirectory type DirectoryWithNewDirectoryOpts struct { // Permission granted to the created directory (e.g., 0777). // // Default: 0755. Permissions int } // Retrieves this directory plus a new directory created at the given path. func (r *Directory) WithNewDirectory(path string, opts ...DirectoryWithNewDirectoryOpts) *Directory { q := r.q.Select("withNewDirectory") for i := len(opts) - 1; i >= 0; i-- { // `permissions` optional argument if !querybuilder.IsZeroValue(opts[i].Permissions) { q = q.Arg("permissions", opts[i].Permissions) } } q = q.Arg("path", path) return &Directory{ q: q, c: r.c, } } // DirectoryWithNewFileOpts contains options for Directory.WithNewFile type DirectoryWithNewFileOpts struct { // Permission given to the copied file (e.g., 0600). // // Default: 0644. Permissions int } // Retrieves this directory plus a new file written at the given path. func (r *Directory) WithNewFile(path string, contents string, opts ...DirectoryWithNewFileOpts) *Directory { q := r.q.Select("withNewFile") for i := len(opts) - 1; i >= 0; i-- { // `permissions` optional argument if !querybuilder.IsZeroValue(opts[i].Permissions) { q = q.Arg("permissions", opts[i].Permissions) } } q = q.Arg("path", path) q = q.Arg("contents", contents) return &Directory{ q: q, c: r.c, } } // Retrieves this directory with all file/dir timestamps set to the given time. func (r *Directory) WithTimestamps(timestamp int) *Directory { q := r.q.Select("withTimestamps") q = q.Arg("timestamp", timestamp) return &Directory{ q: q, c: r.c, } } // Retrieves this directory with the directory at the given path removed. func (r *Directory) WithoutDirectory(path string) *Directory { q := r.q.Select("withoutDirectory") q = q.Arg("path", path) return &Directory{ q: q, c: r.c, } } // Retrieves this directory with the file at the given path removed. func (r *Directory) WithoutFile(path string) *Directory { q := r.q.Select("withoutFile") q = q.Arg("path", path) return &Directory{ q: q, c: r.c, } } // A simple key value object that represents an environment variable. type EnvVariable struct { q *querybuilder.Selection c graphql.Client name *string value *string } // The environment variable name. func (r *EnvVariable) Name(ctx context.Context) (string, error) { if r.name != nil { return *r.name, nil } q := r.q.Select("name") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The environment variable value. func (r *EnvVariable) Value(ctx context.Context) (string, error) { if r.value != nil { return *r.value, nil } q := r.q.Select("value") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // A definition of a field on a custom object defined in a Module. // A field on an object has a static value, as opposed to a function on an // object whose value is computed by invoking code (and can accept arguments). type FieldTypeDef struct { q *querybuilder.Selection c graphql.Client description *string name *string } // A doc string for the field, if any func (r *FieldTypeDef) Description(ctx context.Context) (string, error) { if r.description != nil { return *r.description, nil } q := r.q.Select("description") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The name of the field in the object func (r *FieldTypeDef) Name(ctx context.Context) (string, error) { if r.name != nil { return *r.name, nil } q := r.q.Select("name") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The type of the field func (r *FieldTypeDef) TypeDef() *TypeDef { q := r.q.Select("typeDef") return &TypeDef{ q: q, c: r.c, } } // A file. type File struct { q *querybuilder.Selection c graphql.Client contents *string export *bool id *FileID size *int sync *FileID } type WithFileFunc func(r *File) *File // With calls the provided function with current File. // // This is useful for reusability and readability by not breaking the calling chain. func (r *File) With(f WithFileFunc) *File { return f(r) } // Retrieves the contents of the file. func (r *File) Contents(ctx context.Context) (string, error) { if r.contents != nil { return *r.contents, nil } q := r.q.Select("contents") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // FileExportOpts contains options for File.Export type FileExportOpts struct { // If allowParentDirPath is true, the path argument can be a directory path, in which case // the file will be created in that directory. AllowParentDirPath bool } // Writes the file to a file path on the host. func (r *File) Export(ctx context.Context, path string, opts ...FileExportOpts) (bool, error) { if r.export != nil { return *r.export, nil } q := r.q.Select("export") for i := len(opts) - 1; i >= 0; i-- { // `allowParentDirPath` optional argument if !querybuilder.IsZeroValue(opts[i].AllowParentDirPath) { q = q.Arg("allowParentDirPath", opts[i].AllowParentDirPath) } } q = q.Arg("path", path) var response bool q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Retrieves the content-addressed identifier of the file. func (r *File) ID(ctx context.Context) (FileID, error) { if r.id != nil { return *r.id, nil } q := r.q.Select("id") var response FileID q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // XXX_GraphQLType is an internal function. It returns the native GraphQL type name func (r *File) XXX_GraphQLType() string { return "File" } // XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object func (r *File) XXX_GraphQLIDType() string { return "FileID" } // XXX_GraphQLID is an internal function. It returns the underlying type ID func (r *File) XXX_GraphQLID(ctx context.Context) (string, error) { id, err := r.ID(ctx) if err != nil { return "", err } return string(id), nil } func (r *File) MarshalJSON() ([]byte, error) { id, err := r.ID(context.Background()) if err != nil { return nil, err } return json.Marshal(id) } // Gets the size of the file, in bytes. func (r *File) Size(ctx context.Context) (int, error) { if r.size != nil { return *r.size, nil } q := r.q.Select("size") var response int q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Force evaluation in the engine. func (r *File) Sync(ctx context.Context) (*File, error) { q := r.q.Select("sync") return r, q.Execute(ctx, r.c) } // Retrieves this file with its created/modified timestamps set to the given time. func (r *File) WithTimestamps(timestamp int) *File { q := r.q.Select("withTimestamps") q = q.Arg("timestamp", timestamp) return &File{ q: q, c: r.c, } } // Function represents a resolver provided by a Module. // // A function always evaluates against a parent object and is given a set of // named arguments. type Function struct { q *querybuilder.Selection c graphql.Client description *string id *FunctionID name *string } type WithFunctionFunc func(r *Function) *Function // With calls the provided function with current Function. // // This is useful for reusability and readability by not breaking the calling chain. func (r *Function) With(f WithFunctionFunc) *Function { return f(r) } // Arguments accepted by this function, if any func (r *Function) Args(ctx context.Context) ([]FunctionArg, error) { q := r.q.Select("args") q = q.Select("id") type args struct { Id FunctionArgID } convert := func(fields []args) []FunctionArg { out := []FunctionArg{} for i := range fields { val := FunctionArg{id: &fields[i].Id} val.q = querybuilder.Query().Select("loadFunctionArgFromID").Arg("id", fields[i].Id) val.c = r.c out = append(out, val) } return out } var response []args q = q.Bind(&response) err := q.Execute(ctx, r.c) if err != nil { return nil, err } return convert(response), nil } // A doc string for the function, if any func (r *Function) Description(ctx context.Context) (string, error) { if r.description != nil { return *r.description, nil } q := r.q.Select("description") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The ID of the function func (r *Function) ID(ctx context.Context) (FunctionID, error) { if r.id != nil { return *r.id, nil } q := r.q.Select("id") var response FunctionID q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // XXX_GraphQLType is an internal function. It returns the native GraphQL type name func (r *Function) XXX_GraphQLType() string { return "Function" } // XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object func (r *Function) XXX_GraphQLIDType() string { return "FunctionID" } // XXX_GraphQLID is an internal function. It returns the underlying type ID func (r *Function) XXX_GraphQLID(ctx context.Context) (string, error) { id, err := r.ID(ctx) if err != nil { return "", err } return string(id), nil } func (r *Function) MarshalJSON() ([]byte, error) { id, err := r.ID(context.Background()) if err != nil { return nil, err } return json.Marshal(id) } // The name of the function func (r *Function) Name(ctx context.Context) (string, error) { if r.name != nil { return *r.name, nil } q := r.q.Select("name") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The type returned by this function func (r *Function) ReturnType() *TypeDef { q := r.q.Select("returnType") return &TypeDef{ q: q, c: r.c, } } // FunctionWithArgOpts contains options for Function.WithArg type FunctionWithArgOpts struct { // A doc string for the argument, if any Description string // A default value to use for this argument if not explicitly set by the caller, if any DefaultValue JSON } // Returns the function with the provided argument func (r *Function) WithArg(name string, typeDef *TypeDef, opts ...FunctionWithArgOpts) *Function { assertNotNil("typeDef", typeDef) q := r.q.Select("withArg") for i := len(opts) - 1; i >= 0; i-- { // `description` optional argument if !querybuilder.IsZeroValue(opts[i].Description) { q = q.Arg("description", opts[i].Description) } // `defaultValue` optional argument if !querybuilder.IsZeroValue(opts[i].DefaultValue) { q = q.Arg("defaultValue", opts[i].DefaultValue) } } q = q.Arg("name", name) q = q.Arg("typeDef", typeDef) return &Function{ q: q, c: r.c, } } // Returns the function with the doc string func (r *Function) WithDescription(description string) *Function { q := r.q.Select("withDescription") q = q.Arg("description", description) return &Function{ q: q, c: r.c, } } // An argument accepted by a function. // // This is a specification for an argument at function definition time, not an // argument passed at function call time. type FunctionArg struct { q *querybuilder.Selection c graphql.Client defaultValue *JSON description *string id *FunctionArgID name *string } // A default value to use for this argument when not explicitly set by the caller, if any func (r *FunctionArg) DefaultValue(ctx context.Context) (JSON, error) { if r.defaultValue != nil { return *r.defaultValue, nil } q := r.q.Select("defaultValue") var response JSON q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // A doc string for the argument, if any func (r *FunctionArg) Description(ctx context.Context) (string, error) { if r.description != nil { return *r.description, nil } q := r.q.Select("description") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The ID of the argument func (r *FunctionArg) ID(ctx context.Context) (FunctionArgID, error) { if r.id != nil { return *r.id, nil } q := r.q.Select("id") var response FunctionArgID q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // XXX_GraphQLType is an internal function. It returns the native GraphQL type name func (r *FunctionArg) XXX_GraphQLType() string { return "FunctionArg" } // XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object func (r *FunctionArg) XXX_GraphQLIDType() string { return "FunctionArgID" } // XXX_GraphQLID is an internal function. It returns the underlying type ID func (r *FunctionArg) XXX_GraphQLID(ctx context.Context) (string, error) { id, err := r.ID(ctx) if err != nil { return "", err } return string(id), nil } func (r *FunctionArg) MarshalJSON() ([]byte, error) { id, err := r.ID(context.Background()) if err != nil { return nil, err } return json.Marshal(id) } // The name of the argument func (r *FunctionArg) Name(ctx context.Context) (string, error) { if r.name != nil { return *r.name, nil } q := r.q.Select("name") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The type of the argument func (r *FunctionArg) TypeDef() *TypeDef { q := r.q.Select("typeDef") return &TypeDef{ q: q, c: r.c, } } type FunctionCall struct { q *querybuilder.Selection c graphql.Client name *string parent *JSON parentName *string returnValue *Void } // The argument values the function is being invoked with. func (r *FunctionCall) InputArgs(ctx context.Context) ([]FunctionCallArgValue, error) { q := r.q.Select("inputArgs") q = q.Select("name value") type inputArgs struct { Name string Value JSON } convert := func(fields []inputArgs) []FunctionCallArgValue { out := []FunctionCallArgValue{} for i := range fields { val := FunctionCallArgValue{name: &fields[i].Name, value: &fields[i].Value} out = append(out, val) } return out } var response []inputArgs q = q.Bind(&response) err := q.Execute(ctx, r.c) if err != nil { return nil, err } return convert(response), nil } // The name of the function being called. func (r *FunctionCall) Name(ctx context.Context) (string, error) { if r.name != nil { return *r.name, nil } q := r.q.Select("name") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The value of the parent object of the function being called. // If the function is "top-level" to the module, this is always an empty object. func (r *FunctionCall) Parent(ctx context.Context) (JSON, error) { if r.parent != nil { return *r.parent, nil } q := r.q.Select("parent") var response JSON q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The name of the parent object of the function being called. // If the function is "top-level" to the module, this is the name of the module. func (r *FunctionCall) ParentName(ctx context.Context) (string, error) { if r.parentName != nil { return *r.parentName, nil } q := r.q.Select("parentName") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Set the return value of the function call to the provided value. // The value should be a string of the JSON serialization of the return value. func (r *FunctionCall) ReturnValue(ctx context.Context, value JSON) (Void, error) { if r.returnValue != nil { return *r.returnValue, nil } q := r.q.Select("returnValue") q = q.Arg("value", value) var response Void q = q.Bind(&response) return response, q.Execute(ctx, r.c) } type FunctionCallArgValue struct { q *querybuilder.Selection c graphql.Client name *string value *JSON } // The name of the argument. func (r *FunctionCallArgValue) Name(ctx context.Context) (string, error) { if r.name != nil { return *r.name, nil } q := r.q.Select("name") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The value of the argument represented as a string of the JSON serialization. func (r *FunctionCallArgValue) Value(ctx context.Context) (JSON, error) { if r.value != nil { return *r.value, nil } q := r.q.Select("value") var response JSON q = q.Bind(&response) return response, q.Execute(ctx, r.c) } type GeneratedCode struct { q *querybuilder.Selection c graphql.Client id *GeneratedCodeID } type WithGeneratedCodeFunc func(r *GeneratedCode) *GeneratedCode // With calls the provided function with current GeneratedCode. // // This is useful for reusability and readability by not breaking the calling chain. func (r *GeneratedCode) With(f WithGeneratedCodeFunc) *GeneratedCode { return f(r) } // The directory containing the generated code func (r *GeneratedCode) Code() *Directory { q := r.q.Select("code") return &Directory{ q: q, c: r.c, } } func (r *GeneratedCode) ID(ctx context.Context) (GeneratedCodeID, error) { if r.id != nil { return *r.id, nil } q := r.q.Select("id") var response GeneratedCodeID q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // XXX_GraphQLType is an internal function. It returns the native GraphQL type name func (r *GeneratedCode) XXX_GraphQLType() string { return "GeneratedCode" } // XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object func (r *GeneratedCode) XXX_GraphQLIDType() string { return "GeneratedCodeID" } // XXX_GraphQLID is an internal function. It returns the underlying type ID func (r *GeneratedCode) XXX_GraphQLID(ctx context.Context) (string, error) { id, err := r.ID(ctx) if err != nil { return "", err } return string(id), nil } func (r *GeneratedCode) MarshalJSON() ([]byte, error) { id, err := r.ID(context.Background()) if err != nil { return nil, err } return json.Marshal(id) } // List of paths to mark generated in version control (i.e. .gitattributes) func (r *GeneratedCode) VcsGeneratedPaths(ctx context.Context) ([]string, error) { q := r.q.Select("vcsGeneratedPaths") var response []string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // List of paths to ignore in version control (i.e. .gitignore) func (r *GeneratedCode) VcsIgnoredPaths(ctx context.Context) ([]string, error) { q := r.q.Select("vcsIgnoredPaths") var response []string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Set the list of paths to mark generated in version control func (r *GeneratedCode) WithVCSGeneratedPaths(paths []string) *GeneratedCode { q := r.q.Select("withVCSGeneratedPaths") q = q.Arg("paths", paths) return &GeneratedCode{ q: q, c: r.c, } } // Set the list of paths to ignore in version control func (r *GeneratedCode) WithVCSIgnoredPaths(paths []string) *GeneratedCode { q := r.q.Select("withVCSIgnoredPaths") q = q.Arg("paths", paths) return &GeneratedCode{ q: q, c: r.c, } } // A git ref (tag, branch or commit). type GitRef struct { q *querybuilder.Selection c graphql.Client } // GitRefTreeOpts contains options for GitRef.Tree type GitRefTreeOpts struct { SSHKnownHosts string SSHAuthSocket *Socket } // The filesystem tree at this ref. func (r *GitRef) Tree(opts ...GitRefTreeOpts) *Directory { q := r.q.Select("tree") for i := len(opts) - 1; i >= 0; i-- { // `sshKnownHosts` optional argument if !querybuilder.IsZeroValue(opts[i].SSHKnownHosts) { q = q.Arg("sshKnownHosts", opts[i].SSHKnownHosts) } // `sshAuthSocket` optional argument if !querybuilder.IsZeroValue(opts[i].SSHAuthSocket) { q = q.Arg("sshAuthSocket", opts[i].SSHAuthSocket) } } return &Directory{ q: q, c: r.c, } } // A git repository. type GitRepository struct { q *querybuilder.Selection c graphql.Client } // Returns details on one branch. func (r *GitRepository) Branch(name string) *GitRef { q := r.q.Select("branch") q = q.Arg("name", name) return &GitRef{ q: q, c: r.c, } } // Returns details on one commit. func (r *GitRepository) Commit(id string) *GitRef { q := r.q.Select("commit") q = q.Arg("id", id) return &GitRef{ q: q, c: r.c, } } // Returns details on one tag. func (r *GitRepository) Tag(name string) *GitRef { q := r.q.Select("tag") q = q.Arg("name", name) return &GitRef{ q: q, c: r.c, } } // Information about the host execution environment. type Host struct { q *querybuilder.Selection c graphql.Client } // HostDirectoryOpts contains options for Host.Directory type HostDirectoryOpts struct { // Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]). Exclude []string // Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]). Include []string } // Accesses a directory on the host. func (r *Host) Directory(path string, opts ...HostDirectoryOpts) *Directory { q := r.q.Select("directory") for i := len(opts) - 1; i >= 0; i-- { // `exclude` optional argument if !querybuilder.IsZeroValue(opts[i].Exclude) { q = q.Arg("exclude", opts[i].Exclude) } // `include` optional argument if !querybuilder.IsZeroValue(opts[i].Include) { q = q.Arg("include", opts[i].Include) } } q = q.Arg("path", path) return &Directory{ q: q, c: r.c, } } // Accesses a file on the host. func (r *Host) File(path string) *File { q := r.q.Select("file") q = q.Arg("path", path) return &File{ q: q, c: r.c, } } // HostServiceOpts contains options for Host.Service type HostServiceOpts struct { // Upstream host to forward traffic to. Host string } // Creates a service that forwards traffic to a specified address via the host. func (r *Host) Service(ports []PortForward, opts ...HostServiceOpts) *Service { q := r.q.Select("service") for i := len(opts) - 1; i >= 0; i-- { // `host` optional argument if !querybuilder.IsZeroValue(opts[i].Host) { q = q.Arg("host", opts[i].Host) } } q = q.Arg("ports", ports) return &Service{ q: q, c: r.c, } } // Sets a secret given a user-defined name and the file path on the host, and returns the secret. // The file is limited to a size of 512000 bytes. func (r *Host) SetSecretFile(name string, path string) *Secret { q := r.q.Select("setSecretFile") q = q.Arg("name", name) q = q.Arg("path", path) return &Secret{ q: q, c: r.c, } } // HostTunnelOpts contains options for Host.Tunnel type HostTunnelOpts struct { // Map each service port to the same port on the host, as if the service were // running natively. // // Note: enabling may result in port conflicts. Native bool // Configure explicit port forwarding rules for the tunnel. // // If a port's frontend is unspecified or 0, a random port will be chosen by // the host. // // If no ports are given, all of the service's ports are forwarded. If native // is true, each port maps to the same port on the host. If native is false, // each port maps to a random port chosen by the host. // // If ports are given and native is true, the ports are additive. Ports []PortForward } // Creates a tunnel that forwards traffic from the host to a service. func (r *Host) Tunnel(service *Service, opts ...HostTunnelOpts) *Service { assertNotNil("service", service) q := r.q.Select("tunnel") for i := len(opts) - 1; i >= 0; i-- { // `native` optional argument if !querybuilder.IsZeroValue(opts[i].Native) { q = q.Arg("native", opts[i].Native) } // `ports` optional argument if !querybuilder.IsZeroValue(opts[i].Ports) { q = q.Arg("ports", opts[i].Ports) } } q = q.Arg("service", service) return &Service{ q: q, c: r.c, } } // Accesses a Unix socket on the host. func (r *Host) UnixSocket(path string) *Socket { q := r.q.Select("unixSocket") q = q.Arg("path", path) return &Socket{ q: q, c: r.c, } } // A simple key value object that represents a label. type Label struct { q *querybuilder.Selection c graphql.Client name *string value *string } // The label name. func (r *Label) Name(ctx context.Context) (string, error) { if r.name != nil { return *r.name, nil } q := r.q.Select("name") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The label value. func (r *Label) Value(ctx context.Context) (string, error) { if r.value != nil { return *r.value, nil } q := r.q.Select("value") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // A definition of a list type in a Module. type ListTypeDef struct { q *querybuilder.Selection c graphql.Client } // The type of the elements in the list func (r *ListTypeDef) ElementTypeDef() *TypeDef { q := r.q.Select("elementTypeDef") return &TypeDef{ q: q, c: r.c, } } type Module struct { q *querybuilder.Selection c graphql.Client description *string id *ModuleID name *string sdk *string serve *Void sourceDirectorySubPath *string } type WithModuleFunc func(r *Module) *Module // With calls the provided function with current Module. // // This is useful for reusability and readability by not breaking the calling chain. func (r *Module) With(f WithModuleFunc) *Module { return f(r) } // Modules used by this module func (r *Module) Dependencies(ctx context.Context) ([]Module, error) { q := r.q.Select("dependencies") q = q.Select("id") type dependencies struct { Id ModuleID } convert := func(fields []dependencies) []Module { out := []Module{} for i := range fields { val := Module{id: &fields[i].Id} val.q = querybuilder.Query().Select("loadModuleFromID").Arg("id", fields[i].Id) val.c = r.c out = append(out, val) } return out } var response []dependencies q = q.Bind(&response) err := q.Execute(ctx, r.c) if err != nil { return nil, err } return convert(response), nil } // The dependencies as configured by the module func (r *Module) DependencyConfig(ctx context.Context) ([]string, error) { q := r.q.Select("dependencyConfig") var response []string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The doc string of the module, if any func (r *Module) Description(ctx context.Context) (string, error) { if r.description != nil { return *r.description, nil } q := r.q.Select("description") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The code generated by the SDK's runtime func (r *Module) GeneratedCode() *GeneratedCode { q := r.q.Select("generatedCode") return &GeneratedCode{ q: q, c: r.c, } } // The ID of the module func (r *Module) ID(ctx context.Context) (ModuleID, error) { if r.id != nil { return *r.id, nil } q := r.q.Select("id") var response ModuleID q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // XXX_GraphQLType is an internal function. It returns the native GraphQL type name func (r *Module) XXX_GraphQLType() string { return "Module" } // XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object func (r *Module) XXX_GraphQLIDType() string { return "ModuleID" } // XXX_GraphQLID is an internal function. It returns the underlying type ID func (r *Module) XXX_GraphQLID(ctx context.Context) (string, error) { id, err := r.ID(ctx) if err != nil { return "", err } return string(id), nil } func (r *Module) MarshalJSON() ([]byte, error) { id, err := r.ID(context.Background()) if err != nil { return nil, err } return json.Marshal(id) } // The name of the module func (r *Module) Name(ctx context.Context) (string, error) { if r.name != nil { return *r.name, nil } q := r.q.Select("name") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Objects served by this module func (r *Module) Objects(ctx context.Context) ([]TypeDef, error) { q := r.q.Select("objects") q = q.Select("id") type objects struct { Id TypeDefID } convert := func(fields []objects) []TypeDef { out := []TypeDef{} for i := range fields { val := TypeDef{id: &fields[i].Id} val.q = querybuilder.Query().Select("loadTypeDefFromID").Arg("id", fields[i].Id) val.c = r.c out = append(out, val) } return out } var response []objects q = q.Bind(&response) err := q.Execute(ctx, r.c) if err != nil { return nil, err } return convert(response), nil } // The SDK used by this module. Either a name of a builtin SDK or a module ref pointing to the SDK's implementation. func (r *Module) SDK(ctx context.Context) (string, error) { if r.sdk != nil { return *r.sdk, nil } q := r.q.Select("sdk") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Serve a module's API in the current session. // // Note: this can only be called once per session. // In the future, it could return a stream or service to remove the side effect. func (r *Module) Serve(ctx context.Context) (Void, error) { if r.serve != nil { return *r.serve, nil } q := r.q.Select("serve") var response Void q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The directory containing the module's source code func (r *Module) SourceDirectory() *Directory { q := r.q.Select("sourceDirectory") return &Directory{ q: q, c: r.c, } } // The module's subpath within the source directory func (r *Module) SourceDirectorySubPath(ctx context.Context) (string, error) { if r.sourceDirectorySubPath != nil { return *r.sourceDirectorySubPath, nil } q := r.q.Select("sourceDirectorySubPath") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // This module plus the given Object type and associated functions func (r *Module) WithObject(object *TypeDef) *Module { assertNotNil("object", object) q := r.q.Select("withObject") q = q.Arg("object", object) return &Module{ q: q, c: r.c, } } // Static configuration for a module (e.g. parsed contents of dagger.json) type ModuleConfig struct { q *querybuilder.Selection c graphql.Client name *string root *string sdk *string } // Modules that this module depends on. func (r *ModuleConfig) Dependencies(ctx context.Context) ([]string, error) { q := r.q.Select("dependencies") var response []string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Exclude these file globs when loading the module root. func (r *ModuleConfig) Exclude(ctx context.Context) ([]string, error) { q := r.q.Select("exclude") var response []string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Include only these file globs when loading the module root. func (r *ModuleConfig) Include(ctx context.Context) ([]string, error) { q := r.q.Select("include") var response []string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The name of the module. func (r *ModuleConfig) Name(ctx context.Context) (string, error) { if r.name != nil { return *r.name, nil } q := r.q.Select("name") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The root directory of the module's project, which may be above the module source code. func (r *ModuleConfig) Root(ctx context.Context) (string, error) { if r.root != nil { return *r.root, nil } q := r.q.Select("root") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Either the name of a built-in SDK ('go', 'python', etc.) OR a module reference pointing to the SDK's module implementation. func (r *ModuleConfig) SDK(ctx context.Context) (string, error) { if r.sdk != nil { return *r.sdk, nil } q := r.q.Select("sdk") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // A definition of a custom object defined in a Module. type ObjectTypeDef struct { q *querybuilder.Selection c graphql.Client description *string name *string } // The doc string for the object, if any func (r *ObjectTypeDef) Description(ctx context.Context) (string, error) { if r.description != nil { return *r.description, nil } q := r.q.Select("description") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Static fields defined on this object, if any func (r *ObjectTypeDef) Fields(ctx context.Context) ([]FieldTypeDef, error) { q := r.q.Select("fields") q = q.Select("description name") type fields struct { Description string Name string } convert := func(fields []fields) []FieldTypeDef { out := []FieldTypeDef{} for i := range fields { val := FieldTypeDef{description: &fields[i].Description, name: &fields[i].Name} out = append(out, val) } return out } var response []fields q = q.Bind(&response) err := q.Execute(ctx, r.c) if err != nil { return nil, err } return convert(response), nil } // Functions defined on this object, if any func (r *ObjectTypeDef) Functions(ctx context.Context) ([]Function, error) { q := r.q.Select("functions") q = q.Select("id") type functions struct { Id FunctionID } convert := func(fields []functions) []Function { out := []Function{} for i := range fields { val := Function{id: &fields[i].Id} val.q = querybuilder.Query().Select("loadFunctionFromID").Arg("id", fields[i].Id) val.c = r.c out = append(out, val) } return out } var response []functions q = q.Bind(&response) err := q.Execute(ctx, r.c) if err != nil { return nil, err } return convert(response), nil } // The name of the object func (r *ObjectTypeDef) Name(ctx context.Context) (string, error) { if r.name != nil { return *r.name, nil } q := r.q.Select("name") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // A port exposed by a container. type Port struct { q *querybuilder.Selection c graphql.Client description *string port *int protocol *NetworkProtocol } // The port description. func (r *Port) Description(ctx context.Context) (string, error) { if r.description != nil { return *r.description, nil } q := r.q.Select("description") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The port number. func (r *Port) Port(ctx context.Context) (int, error) { if r.port != nil { return *r.port, nil } q := r.q.Select("port") var response int q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The transport layer network protocol. func (r *Port) Protocol(ctx context.Context) (NetworkProtocol, error) { if r.protocol != nil { return *r.protocol, nil } q := r.q.Select("protocol") var response NetworkProtocol q = q.Bind(&response) return response, q.Execute(ctx, r.c) } type WithClientFunc func(r *Client) *Client // With calls the provided function with current Client. // // This is useful for reusability and readability by not breaking the calling chain. func (r *Client) With(f WithClientFunc) *Client { return f(r) } // Constructs a cache volume for a given cache key. func (r *Client) CacheVolume(key string) *CacheVolume { q := r.q.Select("cacheVolume") q = q.Arg("key", key) return &CacheVolume{ q: q, c: r.c, } } // Checks if the current Dagger Engine is compatible with an SDK's required version. func (r *Client) CheckVersionCompatibility(ctx context.Context, version string) (bool, error) { q := r.q.Select("checkVersionCompatibility") q = q.Arg("version", version) var response bool q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // ContainerOpts contains options for Client.Container type ContainerOpts struct { ID ContainerID Platform Platform } // Creates a scratch container or loads one by ID. // // Optional platform argument initializes new containers to execute and publish // as that platform. Platform defaults to that of the builder's host. func (r *Client) Container(opts ...ContainerOpts) *Container { q := r.q.Select("container") for i := len(opts) - 1; i >= 0; i-- { // `id` optional argument if !querybuilder.IsZeroValue(opts[i].ID) { q = q.Arg("id", opts[i].ID) } // `platform` optional argument if !querybuilder.IsZeroValue(opts[i].Platform) { q = q.Arg("platform", opts[i].Platform) } } return &Container{ q: q, c: r.c, } } // The FunctionCall context that the SDK caller is currently executing in. // If the caller is not currently executing in a function, this will return // an error. func (r *Client) CurrentFunctionCall() *FunctionCall { q := r.q.Select("currentFunctionCall") return &FunctionCall{ q: q, c: r.c, } } // The module currently being served in the session, if any. func (r *Client) CurrentModule() *Module { q := r.q.Select("currentModule") return &Module{ q: q, c: r.c, } } // The default platform of the builder. func (r *Client) DefaultPlatform(ctx context.Context) (Platform, error) { q := r.q.Select("defaultPlatform") var response Platform q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // DirectoryOpts contains options for Client.Directory type DirectoryOpts struct { ID DirectoryID } // Creates an empty directory or loads one by ID. func (r *Client) Directory(opts ...DirectoryOpts) *Directory { q := r.q.Select("directory") for i := len(opts) - 1; i >= 0; i-- { // `id` optional argument if !querybuilder.IsZeroValue(opts[i].ID) { q = q.Arg("id", opts[i].ID) } } return &Directory{ q: q, c: r.c, } } // Loads a file by ID. // // Deprecated: Use LoadFileFromID instead. func (r *Client) File(id FileID) *File { q := r.q.Select("file") q = q.Arg("id", id) return &File{ q: q, c: r.c, } } // Create a function. func (r *Client) Function(name string, returnType *TypeDef) *Function { assertNotNil("returnType", returnType) q := r.q.Select("function") q = q.Arg("name", name) q = q.Arg("returnType", returnType) return &Function{ q: q, c: r.c, } } // Create a code generation result, given a directory containing the generated // code. func (r *Client) GeneratedCode(code *Directory) *GeneratedCode { assertNotNil("code", code) q := r.q.Select("generatedCode") q = q.Arg("code", code) return &GeneratedCode{ q: q, c: r.c, } } // GitOpts contains options for Client.Git type GitOpts struct { // Set to true to keep .git directory. KeepGitDir bool // A service which must be started before the repo is fetched. ExperimentalServiceHost *Service } // Queries a git repository. func (r *Client) Git(url string, opts ...GitOpts) *GitRepository { q := r.q.Select("git") for i := len(opts) - 1; i >= 0; i-- { // `keepGitDir` optional argument if !querybuilder.IsZeroValue(opts[i].KeepGitDir) { q = q.Arg("keepGitDir", opts[i].KeepGitDir) } // `experimentalServiceHost` optional argument if !querybuilder.IsZeroValue(opts[i].ExperimentalServiceHost) { q = q.Arg("experimentalServiceHost", opts[i].ExperimentalServiceHost) } } q = q.Arg("url", url) return &GitRepository{ q: q, c: r.c, } } // Queries the host environment. func (r *Client) Host() *Host { q := r.q.Select("host") return &Host{ q: q, c: r.c, } } // HTTPOpts contains options for Client.HTTP type HTTPOpts struct { // A service which must be started before the URL is fetched. ExperimentalServiceHost *Service } // Returns a file containing an http remote url content. func (r *Client) HTTP(url string, opts ...HTTPOpts) *File { q := r.q.Select("http") for i := len(opts) - 1; i >= 0; i-- { // `experimentalServiceHost` optional argument if !querybuilder.IsZeroValue(opts[i].ExperimentalServiceHost) { q = q.Arg("experimentalServiceHost", opts[i].ExperimentalServiceHost) } } q = q.Arg("url", url) return &File{ q: q, c: r.c, } } // Load a CacheVolume from its ID. func (r *Client) LoadCacheVolumeFromID(id CacheVolumeID) *CacheVolume { q := r.q.Select("loadCacheVolumeFromID") q = q.Arg("id", id) return &CacheVolume{ q: q, c: r.c, } } // Loads a container from an ID. func (r *Client) LoadContainerFromID(id ContainerID) *Container { q := r.q.Select("loadContainerFromID") q = q.Arg("id", id) return &Container{ q: q, c: r.c, } } // Load a Directory from its ID. func (r *Client) LoadDirectoryFromID(id DirectoryID) *Directory { q := r.q.Select("loadDirectoryFromID") q = q.Arg("id", id) return &Directory{ q: q, c: r.c, } } // Load a File from its ID. func (r *Client) LoadFileFromID(id FileID) *File { q := r.q.Select("loadFileFromID") q = q.Arg("id", id) return &File{ q: q, c: r.c, } } // Load a function argument by ID. func (r *Client) LoadFunctionArgFromID(id FunctionArgID) *FunctionArg { q := r.q.Select("loadFunctionArgFromID") q = q.Arg("id", id) return &FunctionArg{ q: q, c: r.c, } } // Load a function by ID. func (r *Client) LoadFunctionFromID(id FunctionID) *Function { q := r.q.Select("loadFunctionFromID") q = q.Arg("id", id) return &Function{ q: q, c: r.c, } } // Load a GeneratedCode by ID. func (r *Client) LoadGeneratedCodeFromID(id GeneratedCodeID) *GeneratedCode { q := r.q.Select("loadGeneratedCodeFromID") q = q.Arg("id", id) return &GeneratedCode{ q: q, c: r.c, } } // Load a module by ID. func (r *Client) LoadModuleFromID(id ModuleID) *Module { q := r.q.Select("loadModuleFromID") q = q.Arg("id", id) return &Module{ q: q, c: r.c, } } // Load a Secret from its ID. func (r *Client) LoadSecretFromID(id SecretID) *Secret { q := r.q.Select("loadSecretFromID") q = q.Arg("id", id) return &Secret{ q: q, c: r.c, } } // Loads a service from ID. func (r *Client) LoadServiceFromID(id ServiceID) *Service { q := r.q.Select("loadServiceFromID") q = q.Arg("id", id) return &Service{ q: q, c: r.c, } } // Load a Socket from its ID. func (r *Client) LoadSocketFromID(id SocketID) *Socket { q := r.q.Select("loadSocketFromID") q = q.Arg("id", id) return &Socket{ q: q, c: r.c, } } // Load a TypeDef by ID. func (r *Client) LoadTypeDefFromID(id TypeDefID) *TypeDef { q := r.q.Select("loadTypeDefFromID") q = q.Arg("id", id) return &TypeDef{ q: q, c: r.c, } } // Create a new module. func (r *Client) Module() *Module { q := r.q.Select("module") return &Module{ q: q, c: r.c, } } // ModuleConfigOpts contains options for Client.ModuleConfig type ModuleConfigOpts struct { Subpath string } // Load the static configuration for a module from the given source directory and optional subpath. func (r *Client) ModuleConfig(sourceDirectory *Directory, opts ...ModuleConfigOpts) *ModuleConfig { assertNotNil("sourceDirectory", sourceDirectory) q := r.q.Select("moduleConfig") for i := len(opts) - 1; i >= 0; i-- { // `subpath` optional argument if !querybuilder.IsZeroValue(opts[i].Subpath) { q = q.Arg("subpath", opts[i].Subpath) } } q = q.Arg("sourceDirectory", sourceDirectory) return &ModuleConfig{ q: q, c: r.c, } } // PipelineOpts contains options for Client.Pipeline type PipelineOpts struct { // Pipeline description. Description string // Pipeline labels. Labels []PipelineLabel } // Creates a named sub-pipeline. func (r *Client) Pipeline(name string, opts ...PipelineOpts) *Client { q := r.q.Select("pipeline") for i := len(opts) - 1; i >= 0; i-- { // `description` optional argument if !querybuilder.IsZeroValue(opts[i].Description) { q = q.Arg("description", opts[i].Description) } // `labels` optional argument if !querybuilder.IsZeroValue(opts[i].Labels) { q = q.Arg("labels", opts[i].Labels) } } q = q.Arg("name", name) return &Client{ q: q, c: r.c, } } // Loads a secret from its ID. // // Deprecated: Use LoadSecretFromID instead func (r *Client) Secret(id SecretID) *Secret { q := r.q.Select("secret") q = q.Arg("id", id) return &Secret{ q: q, c: r.c, } } // Sets a secret given a user defined name to its plaintext and returns the secret. // The plaintext value is limited to a size of 128000 bytes. func (r *Client) SetSecret(name string, plaintext string) *Secret { q := r.q.Select("setSecret") q = q.Arg("name", name) q = q.Arg("plaintext", plaintext) return &Secret{ q: q, c: r.c, } } // SocketOpts contains options for Client.Socket type SocketOpts struct { ID SocketID } // Loads a socket by its ID. // // Deprecated: Use LoadSocketFromID instead. func (r *Client) Socket(opts ...SocketOpts) *Socket { q := r.q.Select("socket") for i := len(opts) - 1; i >= 0; i-- { // `id` optional argument if !querybuilder.IsZeroValue(opts[i].ID) { q = q.Arg("id", opts[i].ID) } } return &Socket{ q: q, c: r.c, } } // Create a new TypeDef. func (r *Client) TypeDef() *TypeDef { q := r.q.Select("typeDef") return &TypeDef{ q: q, c: r.c, } } // A reference to a secret value, which can be handled more safely than the value itself. type Secret struct { q *querybuilder.Selection c graphql.Client id *SecretID plaintext *string } // The identifier for this secret. func (r *Secret) ID(ctx context.Context) (SecretID, error) { if r.id != nil { return *r.id, nil } q := r.q.Select("id") var response SecretID q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // XXX_GraphQLType is an internal function. It returns the native GraphQL type name func (r *Secret) XXX_GraphQLType() string { return "Secret" } // XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object func (r *Secret) XXX_GraphQLIDType() string { return "SecretID" } // XXX_GraphQLID is an internal function. It returns the underlying type ID func (r *Secret) XXX_GraphQLID(ctx context.Context) (string, error) { id, err := r.ID(ctx) if err != nil { return "", err } return string(id), nil } func (r *Secret) MarshalJSON() ([]byte, error) { id, err := r.ID(context.Background()) if err != nil { return nil, err } return json.Marshal(id) } // The value of this secret. func (r *Secret) Plaintext(ctx context.Context) (string, error) { if r.plaintext != nil { return *r.plaintext, nil } q := r.q.Select("plaintext") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } type Service struct { q *querybuilder.Selection c graphql.Client endpoint *string hostname *string id *ServiceID start *ServiceID stop *ServiceID } // ServiceEndpointOpts contains options for Service.Endpoint type ServiceEndpointOpts struct { // The exposed port number for the endpoint Port int // Return a URL with the given scheme, eg. http for http:// Scheme string } // Retrieves an endpoint that clients can use to reach this container. // // If no port is specified, the first exposed port is used. If none exist an error is returned. // // If a scheme is specified, a URL is returned. Otherwise, a host:port pair is returned. func (r *Service) Endpoint(ctx context.Context, opts ...ServiceEndpointOpts) (string, error) { if r.endpoint != nil { return *r.endpoint, nil } q := r.q.Select("endpoint") for i := len(opts) - 1; i >= 0; i-- { // `port` optional argument if !querybuilder.IsZeroValue(opts[i].Port) { q = q.Arg("port", opts[i].Port) } // `scheme` optional argument if !querybuilder.IsZeroValue(opts[i].Scheme) { q = q.Arg("scheme", opts[i].Scheme) } } var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Retrieves a hostname which can be used by clients to reach this container. func (r *Service) Hostname(ctx context.Context) (string, error) { if r.hostname != nil { return *r.hostname, nil } q := r.q.Select("hostname") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // A unique identifier for this service. func (r *Service) ID(ctx context.Context) (ServiceID, error) { if r.id != nil { return *r.id, nil } q := r.q.Select("id") var response ServiceID q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // XXX_GraphQLType is an internal function. It returns the native GraphQL type name func (r *Service) XXX_GraphQLType() string { return "Service" } // XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object func (r *Service) XXX_GraphQLIDType() string { return "ServiceID" } // XXX_GraphQLID is an internal function. It returns the underlying type ID func (r *Service) XXX_GraphQLID(ctx context.Context) (string, error) { id, err := r.ID(ctx) if err != nil { return "", err } return string(id), nil } func (r *Service) MarshalJSON() ([]byte, error) { id, err := r.ID(context.Background()) if err != nil { return nil, err } return json.Marshal(id) } // Retrieves the list of ports provided by the service. func (r *Service) Ports(ctx context.Context) ([]Port, error) { q := r.q.Select("ports") q = q.Select("description port protocol") type ports struct { Description string Port int Protocol NetworkProtocol } convert := func(fields []ports) []Port { out := []Port{} for i := range fields { val := Port{description: &fields[i].Description, port: &fields[i].Port, protocol: &fields[i].Protocol} out = append(out, val) } return out } var response []ports q = q.Bind(&response) err := q.Execute(ctx, r.c) if err != nil { return nil, err } return convert(response), nil } // Start the service and wait for its health checks to succeed. // // Services bound to a Container do not need to be manually started. func (r *Service) Start(ctx context.Context) (*Service, error) { q := r.q.Select("start") return r, q.Execute(ctx, r.c) } // Stop the service. func (r *Service) Stop(ctx context.Context) (*Service, error) { q := r.q.Select("stop") return r, q.Execute(ctx, r.c) } type Socket struct { q *querybuilder.Selection c graphql.Client id *SocketID } // The content-addressed identifier of the socket. func (r *Socket) ID(ctx context.Context) (SocketID, error) { if r.id != nil { return *r.id, nil } q := r.q.Select("id") var response SocketID q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // XXX_GraphQLType is an internal function. It returns the native GraphQL type name func (r *Socket) XXX_GraphQLType() string { return "Socket" } // XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object func (r *Socket) XXX_GraphQLIDType() string { return "SocketID" } // XXX_GraphQLID is an internal function. It returns the underlying type ID func (r *Socket) XXX_GraphQLID(ctx context.Context) (string, error) { id, err := r.ID(ctx) if err != nil { return "", err } return string(id), nil } func (r *Socket) MarshalJSON() ([]byte, error) { id, err := r.ID(context.Background()) if err != nil { return nil, err } return json.Marshal(id) } // A definition of a parameter or return type in a Module. type TypeDef struct { q *querybuilder.Selection c graphql.Client id *TypeDefID kind *TypeDefKind optional *bool } type WithTypeDefFunc func(r *TypeDef) *TypeDef // With calls the provided function with current TypeDef. // // This is useful for reusability and readability by not breaking the calling chain. func (r *TypeDef) With(f WithTypeDefFunc) *TypeDef { return f(r) } // If kind is LIST, the list-specific type definition. // If kind is not LIST, this will be null. func (r *TypeDef) AsList() *ListTypeDef { q := r.q.Select("asList") return &ListTypeDef{ q: q, c: r.c, } } // If kind is OBJECT, the object-specific type definition. // If kind is not OBJECT, this will be null. func (r *TypeDef) AsObject() *ObjectTypeDef { q := r.q.Select("asObject") return &ObjectTypeDef{ q: q, c: r.c, } } func (r *TypeDef) ID(ctx context.Context) (TypeDefID, error) { if r.id != nil { return *r.id, nil } q := r.q.Select("id") var response TypeDefID q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // XXX_GraphQLType is an internal function. It returns the native GraphQL type name func (r *TypeDef) XXX_GraphQLType() string { return "TypeDef" } // XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object func (r *TypeDef) XXX_GraphQLIDType() string { return "TypeDefID" } // XXX_GraphQLID is an internal function. It returns the underlying type ID func (r *TypeDef) XXX_GraphQLID(ctx context.Context) (string, error) { id, err := r.ID(ctx) if err != nil { return "", err } return string(id), nil } func (r *TypeDef) MarshalJSON() ([]byte, error) { id, err := r.ID(context.Background()) if err != nil { return nil, err } return json.Marshal(id) } // The kind of type this is (e.g. primitive, list, object) func (r *TypeDef) Kind(ctx context.Context) (TypeDefKind, error) { if r.kind != nil { return *r.kind, nil } q := r.q.Select("kind") var response TypeDefKind q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Whether this type can be set to null. Defaults to false. func (r *TypeDef) Optional(ctx context.Context) (bool, error) { if r.optional != nil { return *r.optional, nil } q := r.q.Select("optional") var response bool q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // TypeDefWithFieldOpts contains options for TypeDef.WithField type TypeDefWithFieldOpts struct { // A doc string for the field, if any Description string } // Adds a static field for an Object TypeDef, failing if the type is not an object. func (r *TypeDef) WithField(name string, typeDef *TypeDef, opts ...TypeDefWithFieldOpts) *TypeDef { assertNotNil("typeDef", typeDef) q := r.q.Select("withField") for i := len(opts) - 1; i >= 0; i-- { // `description` optional argument if !querybuilder.IsZeroValue(opts[i].Description) { q = q.Arg("description", opts[i].Description) } } q = q.Arg("name", name) q = q.Arg("typeDef", typeDef) return &TypeDef{ q: q, c: r.c, } } // Adds a function for an Object TypeDef, failing if the type is not an object. func (r *TypeDef) WithFunction(function *Function) *TypeDef { assertNotNil("function", function) q := r.q.Select("withFunction") q = q.Arg("function", function) return &TypeDef{ q: q, c: r.c, } } // Sets the kind of the type. func (r *TypeDef) WithKind(kind TypeDefKind) *TypeDef { q := r.q.Select("withKind") q = q.Arg("kind", kind) return &TypeDef{ q: q, c: r.c, } } // Returns a TypeDef of kind List with the provided type for its elements. func (r *TypeDef) WithListOf(elementType *TypeDef) *TypeDef { assertNotNil("elementType", elementType) q := r.q.Select("withListOf") q = q.Arg("elementType", elementType) return &TypeDef{ q: q, c: r.c, } } // TypeDefWithObjectOpts contains options for TypeDef.WithObject type TypeDefWithObjectOpts struct { Description string } // Returns a TypeDef of kind Object with the provided name. // // Note that an object's fields and functions may be omitted if the intent is // only to refer to an object. This is how functions are able to return their // own object, or any other circular reference. func (r *TypeDef) WithObject(name string, opts ...TypeDefWithObjectOpts) *TypeDef { q := r.q.Select("withObject") for i := len(opts) - 1; i >= 0; i-- { // `description` optional argument if !querybuilder.IsZeroValue(opts[i].Description) { q = q.Arg("description", opts[i].Description) } } q = q.Arg("name", name) return &TypeDef{ q: q, c: r.c, } } // Sets whether this type can be set to null. func (r *TypeDef) WithOptional(optional bool) *TypeDef { q := r.q.Select("withOptional") q = q.Arg("optional", optional) return &TypeDef{ q: q, c: r.c, } } type CacheSharingMode string func (CacheSharingMode) IsEnum() {} const ( Locked CacheSharingMode = "LOCKED" Private CacheSharingMode = "PRIVATE" Shared CacheSharingMode = "SHARED" ) type ImageLayerCompression string func (ImageLayerCompression) IsEnum() {} const ( Estargz ImageLayerCompression = "EStarGZ" Gzip ImageLayerCompression = "Gzip" Uncompressed ImageLayerCompression = "Uncompressed" Zstd ImageLayerCompression = "Zstd" ) type ImageMediaTypes string func (ImageMediaTypes) IsEnum() {} const ( Dockermediatypes ImageMediaTypes = "DockerMediaTypes" Ocimediatypes ImageMediaTypes = "OCIMediaTypes" ) type NetworkProtocol string func (NetworkProtocol) IsEnum() {} const ( Tcp NetworkProtocol = "TCP" Udp NetworkProtocol = "UDP" ) type TypeDefKind string func (TypeDefKind) IsEnum() {} const ( Booleankind TypeDefKind = "BooleanKind" Integerkind TypeDefKind = "IntegerKind" Listkind TypeDefKind = "ListKind" Objectkind TypeDefKind = "ObjectKind" Stringkind TypeDefKind = "StringKind" Voidkind TypeDefKind = "VoidKind" )
closed
dagger/dagger
https://github.com/dagger/dagger
5,864
Zenith: Fix `Opts` types in Go SDK
From @jedevc: --- Looks like `Opt` types can't be pointers, e.g. something like this doesn't work: ```go type EchoOpts struct { Suffix string `doc:"String to append to the echoed message." default:"..."` Times int `doc:"Number of times to repeat the message." default:"3"` } func (m *Minimal) EchoOpts(msg string, opts *EchoOpts) string { return m.EchoOptsInline(msg, opts) } ``` The arg type needs to be changed to `opts EchoOpts` for it to work as intended. Giving: ``` Error: failed to get loaded module ID: input:1: host.directory.asModule.serve failed to install module schema: schema validation failed: input:1809: Undefined type EchoOptsID. ``` --- `Opts` structs cannot be nested: ```go package main import "fmt" type Potato struct{} type PotatoOptions struct { Count int TestingOptions TestingOptions } type TestingOptions struct { Foo string } func (m *Potato) HelloWorld(opts PotatoOptions) string { return fmt.Sprintf("Hello world, I have %d potatoes (%s)", opts.Count, opts.TestingOptions.Foo) } ``` ``` Error: failed to get loaded module ID: input:1: host.directory.asModule.serve failed to install module schema: schema validation failed: input:1803: Undefined type TestingOptionsID. ```
https://github.com/dagger/dagger/issues/5864
https://github.com/dagger/dagger/pull/5907
db901c8fe4c70cc32336e304492ca37f12b8f389
e8ad5c62275172e3d54ae46447e741ff5d603450
"2023-10-10T22:55:05Z"
go
"2023-10-25T19:38:59Z"
.changes/unreleased/Breaking-20231024-152415.yaml
closed
dagger/dagger
https://github.com/dagger/dagger
5,864
Zenith: Fix `Opts` types in Go SDK
From @jedevc: --- Looks like `Opt` types can't be pointers, e.g. something like this doesn't work: ```go type EchoOpts struct { Suffix string `doc:"String to append to the echoed message." default:"..."` Times int `doc:"Number of times to repeat the message." default:"3"` } func (m *Minimal) EchoOpts(msg string, opts *EchoOpts) string { return m.EchoOptsInline(msg, opts) } ``` The arg type needs to be changed to `opts EchoOpts` for it to work as intended. Giving: ``` Error: failed to get loaded module ID: input:1: host.directory.asModule.serve failed to install module schema: schema validation failed: input:1809: Undefined type EchoOptsID. ``` --- `Opts` structs cannot be nested: ```go package main import "fmt" type Potato struct{} type PotatoOptions struct { Count int TestingOptions TestingOptions } type TestingOptions struct { Foo string } func (m *Potato) HelloWorld(opts PotatoOptions) string { return fmt.Sprintf("Hello world, I have %d potatoes (%s)", opts.Count, opts.TestingOptions.Foo) } ``` ``` Error: failed to get loaded module ID: input:1: host.directory.asModule.serve failed to install module schema: schema validation failed: input:1803: Undefined type TestingOptionsID. ```
https://github.com/dagger/dagger/issues/5864
https://github.com/dagger/dagger/pull/5907
db901c8fe4c70cc32336e304492ca37f12b8f389
e8ad5c62275172e3d54ae46447e741ff5d603450
"2023-10-10T22:55:05Z"
go
"2023-10-25T19:38:59Z"
cmd/codegen/generator/go/templates/modules.go
package templates import ( "encoding/json" "fmt" "go/ast" "go/token" "go/types" "path/filepath" "sort" "strings" . "github.com/dave/jennifer/jen" // nolint:revive,stylecheck "github.com/fatih/structtag" "github.com/iancoleman/strcase" "golang.org/x/tools/go/packages" ) const daggerGenFilename = "dagger.gen.go" /* TODO: * Handle types from 3rd party imports in the type signature * Add packages.NeedImports and packages.NeedDependencies to packages.Load opts, ensure performance is okay (or deal with that by lazy loading) * Fix problem where changing a function signature requires running `dagger mod sync` twice (first one will result in package errors being seen, second one fixes) * Use Overlays field in packages.Config to provide partial generation of dagger.gen.go, without the unupdated code we generate here * Handle automatically re-running `dagger mod sync` when invoking functions from CLI, to save users from having to always remember while developing locally * Support methods defined on non-pointer receivers */ /* moduleMainSrc generates the source code of the main func for Dagger Module code using the Go SDK. The overall idea is that users just need to create a struct with the same name as their Module and then add methods to that struct to implement their Module. Methods on that struct become Functions. They are also free to return custom objects from Functions, which themselves may have methods that become Functions too. However, only the "top-level" Module struct's Functions will be directly invokable. This is essentially just the GraphQL execution model. The implementation works by parsing the user's code and generating a main func that reads function call inputs from the Engine, calls the relevant function and returns the result. The generated code is mostly a giant switch/case on the object+function name, with each case doing json deserialization of the input arguments and calling the actual Go function. */ func (funcs goTemplateFuncs) moduleMainSrc() string { if funcs.modulePkg == nil { // during bootstrapping, we might not have code yet, since it takes // multiple passes. return `func main() { panic("no code yet") }` } ps := &parseState{ pkg: funcs.modulePkg, fset: funcs.moduleFset, methods: make(map[string][]method), } pkgScope := funcs.modulePkg.Types.Scope() objFunctionCases := map[string][]Code{} createMod := Qual("dag", "CurrentModule").Call() objs := []types.Object{} for _, name := range pkgScope.Names() { obj := pkgScope.Lookup(name) if obj == nil { continue } objs = append(objs, obj) } // preserve definition order, so developer can keep more important / // entrypoint types higher up sort.Slice(objs, func(i, j int) bool { return objs[i].Pos() < objs[j].Pos() }) tps := []types.Type{} for _, obj := range objs { tps = append(tps, obj.Type()) } added := map[string]struct{}{} topLevel := true for len(tps) != 0 { for _, tp := range tps { named, isNamed := tp.(*types.Named) if !isNamed { continue } obj := named.Obj() if obj.Pkg() != funcs.modulePkg.Types { continue } strct, isStruct := named.Underlying().(*types.Struct) if !isStruct { // TODO(vito): could possibly support non-struct types, but why bother continue } // avoid adding a struct definition twice (if it's referenced in two function signatures) if _, ok := added[obj.Name()]; ok { continue } // TODO(vito): hacky: need to run this before fillObjectFunctionCases so it // collects all the methods objType, err := ps.goStructToAPIType(strct, named) if err != nil { panic(err) } if objType == nil { // not including in module schema, skip it continue } if err := ps.fillObjectFunctionCases(named, objFunctionCases); err != nil { // errors indicate an internal problem rather than something w/ user code, so panic instead panic(err) } if len(objFunctionCases[obj.Name()]) == 0 { if topLevel { // no functions on this top-level object, so don't add it to the module continue } tokenFile := ps.fset.File(named.Obj().Pos()) isDaggerGenerated := filepath.Base(tokenFile.Name()) == daggerGenFilename if isDaggerGenerated { // skip objects from outside this module continue } } // Add the object to the module createMod = dotLine(createMod, "WithObject").Call(Add(Line(), objType)) added[obj.Name()] = struct{}{} } tps, ps.extraTypes = ps.extraTypes, nil topLevel = false } // TODO: sort cases and functions based on their definition order return strings.Join([]string{mainSrc, invokeSrc(objFunctionCases, createMod)}, "\n") } func dotLine(a *Statement, id string) *Statement { return a.Op(".").Line().Id(id) } const ( // The static part of the generated code. It calls out to the "invoke" func, which is the mostly // dynamically generated code that actually calls the user's functions. mainSrc = `func main() { ctx := context.Background() fnCall := dag.CurrentFunctionCall() parentName, err := fnCall.ParentName(ctx) if err != nil { fmt.Println(err.Error()) os.Exit(2) } fnName, err := fnCall.Name(ctx) if err != nil { fmt.Println(err.Error()) os.Exit(2) } parentJson, err := fnCall.Parent(ctx) if err != nil { fmt.Println(err.Error()) os.Exit(2) } fnArgs, err := fnCall.InputArgs(ctx) if err != nil { fmt.Println(err.Error()) os.Exit(2) } inputArgs := map[string][]byte{} for _, fnArg := range fnArgs { argName, err := fnArg.Name(ctx) if err != nil { fmt.Println(err.Error()) os.Exit(2) } argValue, err := fnArg.Value(ctx) if err != nil { fmt.Println(err.Error()) os.Exit(2) } inputArgs[argName] = []byte(argValue) } result, err := invoke(ctx, []byte(parentJson), parentName, fnName, inputArgs) if err != nil { fmt.Println(err.Error()) os.Exit(2) } resultBytes, err := json.Marshal(result) if err != nil { fmt.Println(err.Error()) os.Exit(2) } _, err = fnCall.ReturnValue(ctx, JSON(resultBytes)) if err != nil { fmt.Println(err.Error()) os.Exit(2) } } ` parentJSONVar = "parentJSON" parentNameVar = "parentName" fnNameVar = "fnName" inputArgsVar = "inputArgs" invokeFuncName = "invoke" ) // the source code of the invoke func, which is the mostly dynamically generated code that actually calls the user's functions func invokeSrc(objFunctionCases map[string][]Code, createMod Code) string { // each `case` statement for every object name, which makes up the body of the invoke func objCases := []Code{} for objName, functionCases := range objFunctionCases { objCases = append(objCases, Case(Lit(objName)).Block(Switch(Id(fnNameVar)).Block(functionCases...))) } // when the object name is empty, return the module definition objCases = append(objCases, Case(Lit("")).Block( Return(createMod, Nil()), )) // default case (return error) objCases = append(objCases, Default().Block( Return(Nil(), Qual("fmt", "Errorf").Call(Lit("unknown object %s"), Id(parentNameVar))), )) objSwitch := Switch(Id(parentNameVar)).Block(objCases...) // func invoke( invokeFunc := Func().Id(invokeFuncName).Params( // ctx context.Context, Id("ctx").Qual("context", "Context"), // parentJSON []byte, Id(parentJSONVar).Index().Byte(), // parentName string, Id(parentNameVar).String(), // fnName string, Id(fnNameVar).String(), // inputArgs map[string][]byte, Id(inputArgsVar).Map(String()).Index().Byte(), ).Params( // ) (any, Id("any"), // error) Error(), ).Block(objSwitch) return fmt.Sprintf("%#v", invokeFunc) } func renderNameOrStruct(t types.Type) string { if ptr, ok := t.(*types.Pointer); ok { return "*" + renderNameOrStruct(ptr.Elem()) } if named, ok := t.(*types.Named); ok { // assume local return named.Obj().Name() } // HACK(vito): this is passed to Id(), which is a bit weird, but works return t.String() } var checkErrStatement = If(Err().Op("!=").Nil()).Block( // fmt.Println(err.Error()) Qual("fmt", "Println").Call(Err().Dot("Error").Call()), // os.Exit(2) Qual("os", "Exit").Call(Lit(2)), ) // fillObjectFunctionCases recursively fills out the `cases` map with entries for object name -> `case` statement blocks // for each function in that object func (ps *parseState) fillObjectFunctionCases(type_ types.Type, cases map[string][]Code) error { var objName string switch x := type_.(type) { case *types.Pointer: return ps.fillObjectFunctionCases(x.Elem(), cases) case *types.Named: objName = x.Obj().Name() default: return nil } if existingCases := cases[objName]; len(existingCases) > 0 { // handles recursive types, e.g. objects with chainable methods that return themselves return nil } methods := ps.methods[objName] if len(methods) == 0 { return nil } for _, method := range methods { fnName, sig := method.name, method.sig statements := []Code{ Var().Id("err").Error(), } parentVarName := "parent" statements = append(statements, Var().Id(parentVarName).Id(objName), Err().Op("=").Qual("json", "Unmarshal").Call(Id(parentJSONVar), Op("&").Id(parentVarName)), checkErrStatement, ) fnCallArgs := []Code{Op("&").Id(parentVarName)} for i := 0; i < sig.Params().Len(); i++ { arg := sig.Params().At(i) if i == 0 && arg.Type().String() == "context.Context" { fnCallArgs = append(fnCallArgs, Id("ctx")) continue } if opts, ok := namedOrDirectStruct(arg.Type()); ok { optsName := arg.Name() statements = append(statements, Var().Id(optsName).Id(renderNameOrStruct(arg.Type()))) for f := 0; f < opts.NumFields(); f++ { param := opts.Field(f) argName := strcase.ToLowerCamel(param.Name()) statements = append(statements, If(Id(inputArgsVar).Index(Lit(argName)).Op("!=").Nil()).Block( Err().Op("=").Qual("json", "Unmarshal").Call( Index().Byte().Parens(Id(inputArgsVar).Index(Lit(argName))), Op("&").Id(optsName).Dot(param.Name()), ), checkErrStatement, )) } fnCallArgs = append(fnCallArgs, Id(optsName)) } else { argName := strcase.ToLowerCamel(arg.Name()) statements = append(statements, Var().Id(argName).Id(renderNameOrStruct(arg.Type())), Err().Op("=").Qual("json", "Unmarshal").Call( Index().Byte().Parens(Id(inputArgsVar).Index(Lit(argName))), Op("&").Id(argName), ), checkErrStatement, ) fnCallArgs = append(fnCallArgs, Id(argName)) } } results := sig.Results() switch results.Len() { case 2: // assume second value is error if results.At(1).Type().String() != errorTypeName { // sanity check return fmt.Errorf("second return value must be error, have %s", results.At(0).Type().String()) } statements = append(statements, Return( Parens(Op("*").Id(objName)).Dot(fnName).Call(fnCallArgs...), )) cases[objName] = append(cases[objName], Case(Lit(fnName)).Block(statements...)) if err := ps.fillObjectFunctionCases(results.At(0).Type(), cases); err != nil { return err } case 1: if results.At(0).Type().String() == errorTypeName { // void error return statements = append(statements, Return( Nil(), Parens(Op("*").Id(objName)).Dot(fnName).Call(fnCallArgs...), )) cases[objName] = append(cases[objName], Case(Lit(fnName)).Block(statements...)) } else { // non-error return statements = append(statements, Return( Parens(Op("*").Id(objName)).Dot(fnName).Call(fnCallArgs...), Nil(), )) cases[objName] = append(cases[objName], Case(Lit(fnName)).Block(statements...)) if err := ps.fillObjectFunctionCases(results.At(0).Type(), cases); err != nil { return err } } case 0: // void return // // NB(vito): it's really weird to have a fully void return (not even // error), but we should still support it for completeness. statements = append(statements, Parens(Op("*").Id(objName)).Dot(fnName).Call(fnCallArgs...), Return(Nil(), Nil())) cases[objName] = append(cases[objName], Case(Lit(fnName)).Block(statements...)) default: return fmt.Errorf("unexpected number of results from method %s: %d", fnName, results.Len()) } } // default case (return error) cases[objName] = append(cases[objName], Default().Block( Return(Nil(), Qual("fmt", "Errorf").Call(Lit("unknown function %s"), Id(fnNameVar))), )) return nil } type parseState struct { pkg *packages.Package fset *token.FileSet methods map[string][]method extraTypes []types.Type } type method struct { name string sig *types.Signature } func (ps *parseState) goTypeToAPIType(typ types.Type, named *types.Named) (*Statement, error) { ps.extraTypes = append(ps.extraTypes, typ) switch t := typ.(type) { case *types.Named: // Named types are any types declared like `type Foo <...>` typeDef, err := ps.goTypeToAPIType(t.Underlying(), t) if err != nil { return nil, fmt.Errorf("failed to convert named type: %w", err) } return typeDef, nil case *types.Pointer: return ps.goTypeToAPIType(t.Elem(), named) case *types.Basic: if t.Kind() == types.Invalid { return nil, fmt.Errorf("invalid type: %+v", t) } var kind Code switch t.Info() { case types.IsString: kind = Id("Stringkind") case types.IsInteger: kind = Id("Integerkind") case types.IsBoolean: kind = Id("Booleankind") default: return nil, fmt.Errorf("unsupported basic type: %+v", t) } return Qual("dag", "TypeDef").Call().Dot("WithKind").Call( kind, ), nil case *types.Slice: elemTypeDef, err := ps.goTypeToAPIType(t.Elem(), nil) if err != nil { return nil, fmt.Errorf("failed to convert slice element type: %w", err) } return Qual("dag", "TypeDef").Call().Dot("WithListOf").Call( elemTypeDef, ), nil case *types.Struct: if named == nil { return nil, fmt.Errorf("struct types must be named") } typeName := named.Obj().Name() if typeName == "" { return nil, fmt.Errorf("struct types must be named") } return Qual("dag", "TypeDef").Call().Dot("WithObject").Call( Lit(typeName), ), nil default: return nil, fmt.Errorf("unsupported type %T", t) } } const errorTypeName = "error" func (ps *parseState) goStructToAPIType(t *types.Struct, named *types.Named) (*Statement, error) { if named == nil { return nil, fmt.Errorf("struct types must be named") } typeName := named.Obj().Name() if typeName == "" { return nil, fmt.Errorf("struct types must be named") } // We don't support extending objects from outside this module, so we will // be skipping it. But first we want to verify the user isn't adding methods // to it (in which case we error out). tokenFile := ps.fset.File(named.Obj().Pos()) objectIsDaggerGenerated := filepath.Base(tokenFile.Name()) == daggerGenFilename methods := []*types.Func{} methodSet := types.NewMethodSet(types.NewPointer(named)) // Fill out any Functions on the object, which are methods on the struct // TODO: support methods defined on non-pointer receivers for i := 0; i < methodSet.Len(); i++ { methodObj := methodSet.At(i).Obj() methodTokenFile := ps.fset.File(methodObj.Pos()) methodIsDaggerGenerated := filepath.Base(methodTokenFile.Name()) == daggerGenFilename // TODO: don't hardcode if methodIsDaggerGenerated { // We don't care about pre-existing methods on core types or objects from dependency modules. continue } if objectIsDaggerGenerated { return nil, fmt.Errorf("cannot define methods on objects from outside this module") } method, ok := methodObj.(*types.Func) if !ok { return nil, fmt.Errorf("expected method to be a func, got %T", methodObj) } if !method.Exported() { continue } methods = append(methods, method) } if objectIsDaggerGenerated { return nil, nil } sort.Slice(methods, func(i, j int) bool { return methods[i].Pos() < methods[j].Pos() }) // args for WithObject withObjectArgs := []Code{ Lit(typeName), } withObjectOpts := []Code{} // Fill out the Description with the comment above the struct (if any) typeSpec, err := ps.typeSpecForNamedType(named) if err != nil { return nil, fmt.Errorf("failed to find decl for named type %s: %w", typeName, err) } if doc := typeSpec.Doc; doc != nil { // TODO(vito): for some reason this is always nil withObjectOpts = append(withObjectOpts, Id("Description").Op(":").Lit(doc.Text())) } if len(withObjectOpts) > 0 { withObjectArgs = append(withObjectArgs, Id("TypeDefWithObjectOpts").Values(withObjectOpts...)) } typeDef := Qual("dag", "TypeDef").Call().Dot("WithObject").Call(withObjectArgs...) for _, method := range methods { fnTypeDef, err := ps.goMethodToAPIFunctionDef(typeName, method, named) if err != nil { return nil, fmt.Errorf("failed to convert method %s to function def: %w", method.Name(), err) } typeDef = dotLine(typeDef, "WithFunction").Call(Add(Line(), fnTypeDef)) } astStructType, ok := typeSpec.Type.(*ast.StructType) if !ok { return nil, fmt.Errorf("expected type spec to be a struct, got %T", typeSpec.Type) } // Fill out the static fields of the struct (if any) for i := 0; i < t.NumFields(); i++ { field := t.Field(i) if !field.Exported() { continue } fieldTypeDef, err := ps.goTypeToAPIType(field.Type(), nil) if err != nil { return nil, fmt.Errorf("failed to convert field type: %w", err) } var description string if doc := astStructType.Fields.List[i].Doc; doc != nil { description = doc.Text() } withFieldArgs := []Code{ Lit(field.Name()), fieldTypeDef, } if description != "" { withFieldArgs = append(withFieldArgs, Id("TypeDefWithFieldOpts").Values( Id("Description").Op(":").Lit(description), )) } typeDef = dotLine(typeDef, "WithField").Call(withFieldArgs...) } return typeDef, nil } var voidDef = Qual("dag", "TypeDef").Call(). Dot("WithKind").Call(Id("Voidkind")). Dot("WithOptional").Call(Lit(true)) func (ps *parseState) goMethodToAPIFunctionDef(typeName string, fn *types.Func, named *types.Named) (*Statement, error) { methodSig, ok := fn.Type().(*types.Signature) if !ok { return nil, fmt.Errorf("expected method to be a func, got %T", fn.Type()) } // stash away the method signature so we can remember details on how it's // invoked (e.g. no error return, no ctx arg, error-only return, etc) ps.methods[typeName] = append(ps.methods[typeName], method{ name: fn.Name(), sig: methodSig, }) var err error var fnReturnType *Statement methodResults := methodSig.Results() switch methodResults.Len() { case 0: fnReturnType = voidDef case 1: result := methodResults.At(0).Type() if result.String() == errorTypeName { fnReturnType = voidDef } else { fnReturnType, err = ps.goTypeToAPIType(result, nil) if err != nil { return nil, fmt.Errorf("failed to convert result type: %w", err) } } case 2: result := methodResults.At(0).Type() fnReturnType, err = ps.goTypeToAPIType(result, nil) if err != nil { return nil, fmt.Errorf("failed to convert result type: %w", err) } default: return nil, fmt.Errorf("method %s has too many return values", fn.Name()) } fnDef := Qual("dag", "Function").Call(Lit(fn.Name()), Add(Line(), fnReturnType)) funcDecl, err := ps.declForFunc(fn) if err != nil { return nil, fmt.Errorf("failed to find decl for method %s: %w", fn.Name(), err) } if doc := funcDecl.Doc; doc != nil { fnDef = dotLine(fnDef, "WithDescription").Call(Lit(doc.Text())) } for i := 0; i < methodSig.Params().Len(); i++ { param := methodSig.Params().At(i) if i == 0 && param.Type().String() == "context.Context" { // ignore ctx arg continue } if opts, ok := namedOrDirectStruct(param.Type()); ok { for f := 0; f < opts.NumFields(); f++ { param := opts.Field(f) tags, err := structtag.Parse(opts.Tag(f)) if err != nil { return nil, fmt.Errorf("failed to parse struct tag: %w", err) } argTypeDef, err := ps.goTypeToAPIType(param.Type(), nil) if err != nil { return nil, fmt.Errorf("failed to convert param type: %w", err) } argOptional := true if tags != nil { if tag, err := tags.Get("required"); err == nil { argOptional = tag.Value() == "true" } } // all values in a struct are optional argTypeDef = argTypeDef.Dot("WithOptional").Call(Lit(argOptional)) // arguments to WithArg argArgs := []Code{ Lit(param.Name()), argTypeDef, } argOpts := []Code{} if tags != nil { // TODO: support this? // if tag, err := tags.Get("name"); err == nil { // def.Name = tag.Value() // } if tag, err := tags.Get("doc"); err == nil { argOpts = append(argOpts, Id("Description").Op(":").Lit(tag.Value())) } if tag, err := tags.Get("default"); err == nil { var jsonEnc string if param.Type().String() == "string" { enc, err := json.Marshal(tag.Value()) if err != nil { return nil, fmt.Errorf("failed to marshal default value: %w", err) } jsonEnc = string(enc) } else { jsonEnc = tag.Value() // assume JSON encoded } argOpts = append(argOpts, Id("DefaultValue").Op(":").Id("JSON").Call(Lit(jsonEnc))) } } if len(argOpts) > 0 { argArgs = append(argArgs, Id("FunctionWithArgOpts").Values(argOpts...)) } fnDef = dotLine(fnDef, "WithArg").Call(argArgs...) } } else { argTypeDef, err := ps.goTypeToAPIType(param.Type(), nil) if err != nil { return nil, fmt.Errorf("failed to convert param type: %w", err) } fnDef = dotLine(fnDef, "WithArg").Call(Lit(param.Name()), argTypeDef) } } return fnDef, nil } func namedOrDirectStruct(t types.Type) (*types.Struct, bool) { switch x := t.(type) { case *types.Named: return namedOrDirectStruct(x.Underlying()) case *types.Struct: return x, true default: return nil, false } } // typeSpecForNamedType returns the *ast* type spec for the given Named type. This is needed // because the types.Named object does not have the comments associated with the type, which // we want to parse. func (ps *parseState) typeSpecForNamedType(namedType *types.Named) (*ast.TypeSpec, error) { tokenFile := ps.fset.File(namedType.Obj().Pos()) if tokenFile == nil { return nil, fmt.Errorf("no file for %s", namedType.Obj().Name()) } for _, f := range ps.pkg.Syntax { if ps.fset.File(f.Pos()) != tokenFile { continue } for _, decl := range f.Decls { genDecl, ok := decl.(*ast.GenDecl) if !ok { continue } for _, spec := range genDecl.Specs { typeSpec, ok := spec.(*ast.TypeSpec) if !ok { continue } if typeSpec.Name.Name == namedType.Obj().Name() { return typeSpec, nil } } } } return nil, fmt.Errorf("no decl for %s", namedType.Obj().Name()) } // declForFunc returns the *ast* func decl for the given Func type. This is needed // because the types.Func object does not have the comments associated with the type, which // we want to parse. func (ps *parseState) declForFunc(fnType *types.Func) (*ast.FuncDecl, error) { tokenFile := ps.fset.File(fnType.Pos()) if tokenFile == nil { return nil, fmt.Errorf("no file for %s", fnType.Name()) } for _, f := range ps.pkg.Syntax { if ps.fset.File(f.Pos()) != tokenFile { continue } for _, decl := range f.Decls { fnDecl, ok := decl.(*ast.FuncDecl) if ok && fnDecl.Name.Name == fnType.Name() { return fnDecl, nil } } } return nil, fmt.Errorf("no decl for %s", fnType.Name()) }
closed
dagger/dagger
https://github.com/dagger/dagger
5,864
Zenith: Fix `Opts` types in Go SDK
From @jedevc: --- Looks like `Opt` types can't be pointers, e.g. something like this doesn't work: ```go type EchoOpts struct { Suffix string `doc:"String to append to the echoed message." default:"..."` Times int `doc:"Number of times to repeat the message." default:"3"` } func (m *Minimal) EchoOpts(msg string, opts *EchoOpts) string { return m.EchoOptsInline(msg, opts) } ``` The arg type needs to be changed to `opts EchoOpts` for it to work as intended. Giving: ``` Error: failed to get loaded module ID: input:1: host.directory.asModule.serve failed to install module schema: schema validation failed: input:1809: Undefined type EchoOptsID. ``` --- `Opts` structs cannot be nested: ```go package main import "fmt" type Potato struct{} type PotatoOptions struct { Count int TestingOptions TestingOptions } type TestingOptions struct { Foo string } func (m *Potato) HelloWorld(opts PotatoOptions) string { return fmt.Sprintf("Hello world, I have %d potatoes (%s)", opts.Count, opts.TestingOptions.Foo) } ``` ``` Error: failed to get loaded module ID: input:1: host.directory.asModule.serve failed to install module schema: schema validation failed: input:1803: Undefined type TestingOptionsID. ```
https://github.com/dagger/dagger/issues/5864
https://github.com/dagger/dagger/pull/5907
db901c8fe4c70cc32336e304492ca37f12b8f389
e8ad5c62275172e3d54ae46447e741ff5d603450
"2023-10-10T22:55:05Z"
go
"2023-10-25T19:38:59Z"
cmd/codegen/generator/go/templates/src/header.go.tmpl
// Code generated by dagger. DO NOT EDIT. package {{.PackageName}} import ( "context" "encoding/json" "errors" "fmt" "net" "net/http" "os" "strconv" "runtime" "fmt" "reflect" "github.com/Khan/genqlient/graphql" "{{.PackageImport}}/querybuilder" ) // assertNotNil panic if the given value is nil. // This function is used to validate that input with pointer type are not nil. // See https://github.com/dagger/dagger/issues/5696 for more context. func assertNotNil(argName string, value any) { // We use reflect because just comparing value to nil is not working since // the value is wrapped into a type when passed as parameter. // E.g., nil become (*dagger.File)(nil). if reflect.ValueOf(value).IsNil() { panic(fmt.Sprintf("unexpected nil pointer for argument %q", argName)) } }
closed
dagger/dagger
https://github.com/dagger/dagger
5,864
Zenith: Fix `Opts` types in Go SDK
From @jedevc: --- Looks like `Opt` types can't be pointers, e.g. something like this doesn't work: ```go type EchoOpts struct { Suffix string `doc:"String to append to the echoed message." default:"..."` Times int `doc:"Number of times to repeat the message." default:"3"` } func (m *Minimal) EchoOpts(msg string, opts *EchoOpts) string { return m.EchoOptsInline(msg, opts) } ``` The arg type needs to be changed to `opts EchoOpts` for it to work as intended. Giving: ``` Error: failed to get loaded module ID: input:1: host.directory.asModule.serve failed to install module schema: schema validation failed: input:1809: Undefined type EchoOptsID. ``` --- `Opts` structs cannot be nested: ```go package main import "fmt" type Potato struct{} type PotatoOptions struct { Count int TestingOptions TestingOptions } type TestingOptions struct { Foo string } func (m *Potato) HelloWorld(opts PotatoOptions) string { return fmt.Sprintf("Hello world, I have %d potatoes (%s)", opts.Count, opts.TestingOptions.Foo) } ``` ``` Error: failed to get loaded module ID: input:1: host.directory.asModule.serve failed to install module schema: schema validation failed: input:1803: Undefined type TestingOptionsID. ```
https://github.com/dagger/dagger/issues/5864
https://github.com/dagger/dagger/pull/5907
db901c8fe4c70cc32336e304492ca37f12b8f389
e8ad5c62275172e3d54ae46447e741ff5d603450
"2023-10-10T22:55:05Z"
go
"2023-10-25T19:38:59Z"
core/integration/module_test.go
package core import ( "context" _ "embed" "errors" "fmt" "os" "path/filepath" "strconv" "strings" "testing" "time" "dagger.io/dagger" "github.com/iancoleman/strcase" "github.com/moby/buildkit/identity" "github.com/stretchr/testify/require" "golang.org/x/sync/errgroup" ) /* TODO: add coverage for * dagger mod use * dagger mod sync * that the codegen of the testdata envs are up to date (or incorporate that into a cli command) * if a dependency changes, then checks should re-run */ func TestModuleGoInit(t *testing.T) { t.Run("from scratch", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=bare", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{bare{myFunction(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"bare":{"myFunction":{"stdout":"hello\n"}}}`, out) }) t.Run("kebab-cases Go module name, camel-cases Dagger module name", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=My-Module", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{myModule{myFunction(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"myModule":{"myFunction":{"stdout":"hello\n"}}}`, out) generated, err := modGen.File("go.mod").Contents(ctx) require.NoError(t, err) require.Contains(t, generated, "module my-module") }) t.Run("creates go.mod beneath an existing go.mod if root points beneath it", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/go.mod", dagger.ContainerWithNewFileOpts{ Contents: "module example.com/test\n", }). WithNewFile("/work/foo.go", dagger.ContainerWithNewFileOpts{ Contents: "package foo\n", }). WithWorkdir("/work/ci"). With(daggerExec("mod", "init", "--name=beneathGoMod", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{beneathGoMod{myFunction(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"beneathGoMod":{"myFunction":{"stdout":"hello\n"}}}`, out) t.Run("names Go module after Dagger module", func(t *testing.T) { generated, err := modGen.File("go.mod").Contents(ctx) require.NoError(t, err) require.Contains(t, generated, "module beneath-go-mod") }) }) t.Run("respects existing go.mod", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithExec([]string{"go", "mod", "init", "example.com/test"}). With(daggerExec("mod", "init", "--name=hasGoMod", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{hasGoMod{myFunction(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"hasGoMod":{"myFunction":{"stdout":"hello\n"}}}`, out) t.Run("preserves module name", func(t *testing.T) { generated, err := modGen.File("go.mod").Contents(ctx) require.NoError(t, err) require.Contains(t, generated, "module example.com/test") }) }) t.Run("respects parent go.mod if root points to it", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithExec([]string{"go", "mod", "init", "example.com/test"}). WithNewFile("/work/foo.go", dagger.ContainerWithNewFileOpts{ Contents: "package foo\n", }). WithWorkdir("/work/child"). With(daggerExec("mod", "init", "--name=child", "--sdk=go", "--root=..")). WithNewFile("/work/child/main.go", dagger.ContainerWithNewFileOpts{ Contents: ` package main import "os" type Child struct{} func (m *Child) Root() *Directory { wd, err := os.Getwd() if err != nil { panic(err) } return dag.Host().Directory(wd+"/..") } `, }) generated := modGen. // explicitly sync to see whether it makes a go.mod With(daggerExec("mod", "sync")). Directory(".") logGen(ctx, t, generated) out, err := modGen. With(daggerQuery(`{child{root{entries}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"child":{"root":{"entries":["child","foo.go","go.mod","go.sum"]}}}`, out) childEntries, err := generated.Entries(ctx) require.NoError(t, err) require.NotContains(t, childEntries, "go.mod") t.Run("preserves parent module name", func(t *testing.T) { generated, err := modGen.File("/work/go.mod").Contents(ctx) require.NoError(t, err) require.Contains(t, generated, "module example.com/test") }) }) t.Run("respects existing go.mod even if root points to parent that has go.mod", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithExec([]string{"go", "mod", "init", "example.com/test"}). WithNewFile("/work/foo.go", dagger.ContainerWithNewFileOpts{ Contents: "package foo\n", }). WithWorkdir("/work/child"). WithExec([]string{"go", "mod", "init", "my-mod"}). With(daggerExec("mod", "init", "--name=child", "--sdk=go", "--root=..")). WithNewFile("/work/child/main.go", dagger.ContainerWithNewFileOpts{ Contents: ` package main import "os" type Child struct{} func (m *Child) Root() *Directory { wd, err := os.Getwd() if err != nil { panic(err) } return dag.Host().Directory(wd+"/..") } `, }) generated := modGen. // explicitly sync to see whether it makes a go.mod With(daggerExec("mod", "sync")). Directory(".") logGen(ctx, t, generated) out, err := modGen. With(daggerQuery(`{child{root{entries}}}`)). Stdout(ctx) require.NoError(t, err) // no go.sum require.JSONEq(t, `{"child":{"root":{"entries":["child","foo.go","go.mod"]}}}`, out) childEntries, err := generated.Entries(ctx) require.NoError(t, err) require.Contains(t, childEntries, "go.mod") require.Contains(t, childEntries, "go.sum") }) t.Run("respects existing main.go", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: ` package main type HasMainGo struct {} func (m *HasMainGo) Hello() string { return "Hello, world!" } `, }). With(daggerExec("mod", "init", "--name=hasMainGo", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{hasMainGo{hello}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"hasMainGo":{"hello":"Hello, world!"}}`, out) }) t.Run("respects existing main.go even if it uses types not generated yet", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: ` package main type HasDaggerTypes struct {} func (m *HasDaggerTypes) Hello() *Container { return dag.Container(). From("` + alpineImage + `"). WithExec([]string{"echo", "Hello, world!"}) } `, }). With(daggerExec("mod", "init", "--name=hasDaggerTypes", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{hasDaggerTypes{hello{stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"hasDaggerTypes":{"hello":{"stdout":"Hello, world!\n"}}}`, out) }) t.Run("respects existing package without creating main.go", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/notmain.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type HasNotMainGo struct {} func (m *HasNotMainGo) Hello() string { return "Hello, world!" } `, }). With(daggerExec("mod", "init", "--name=hasNotMainGo", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{hasNotMainGo{hello}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"hasNotMainGo":{"hello":"Hello, world!"}}`, out) }) } func TestModuleGit(t *testing.T) { t.Parallel() type testCase struct { sdk string gitignores []string gitattributes string } for _, tc := range []testCase{ { sdk: "go", gitignores: []string{ "/dagger.gen.go\n", "/querybuilder/\n", }, }, { sdk: "python", gitignores: []string{ "/sdk\n", }, }, } { tc := tc t.Run(fmt.Sprintf("module %s git", tc.sdk), func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := goGitBase(t, c). With(daggerExec("mod", "init", "--name=bare", "--sdk="+tc.sdk)) if tc.sdk == "go" { logGen(ctx, t, modGen.Directory(".")) } out, err := modGen. With(daggerQuery(`{bare{myFunction(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"bare":{"myFunction":{"stdout":"hello\n"}}}`, out) t.Run("configures .gitignore", func(t *testing.T) { ignore, err := modGen.File(".gitignore").Contents(ctx) require.NoError(t, err) for _, gitignore := range tc.gitignores { require.Contains(t, ignore, gitignore) } }) }) } } func TestModuleGoGitRemovesIgnored(t *testing.T) { t.Parallel() c, ctx := connect(t) committedModGen := goGitBase(t, c). With(daggerExec("mod", "init", "--name=bare", "--sdk=go")). WithExec([]string{"rm", ".gitignore"}). // simulate old path scheme to show we ignore it too to help transition WithExec([]string{"mkdir", "./internal"}). WithExec([]string{"cp", "-a", "./querybuilder", "./internal/querybuilder"}). WithExec([]string{"git", "add", "."}). WithExec([]string{"git", "commit", "-m", "init with generated files"}) changedAfterSync, err := committedModGen. With(daggerExec("mod", "sync")). WithExec([]string{"git", "diff"}). // for debugging WithExec([]string{"git", "status", "--short"}). Stdout(ctx) require.NoError(t, err) t.Logf("changed after sync:\n%s", changedAfterSync) require.Contains(t, changedAfterSync, "D dagger.gen.go\n") require.Contains(t, changedAfterSync, "D querybuilder/marshal.go\n") require.Contains(t, changedAfterSync, "D querybuilder/querybuilder.go\n") require.Contains(t, changedAfterSync, "D internal/querybuilder/marshal.go\n") require.Contains(t, changedAfterSync, "D internal/querybuilder/querybuilder.go\n") } func TestModulePythonGitRemovesIgnored(t *testing.T) { t.Parallel() c, ctx := connect(t) committedModGen := goGitBase(t, c). With(daggerExec("mod", "init", "--name=bare", "--sdk=python")). WithExec([]string{"rm", ".gitignore"}). WithExec([]string{"git", "add", "."}). WithExec([]string{"git", "commit", "-m", "init with generated files"}) changedAfterSync, err := committedModGen. With(daggerExec("mod", "sync")). WithExec([]string{"git", "diff"}). // for debugging WithExec([]string{"git", "status", "--short"}). Stdout(ctx) require.NoError(t, err) t.Logf("changed after sync:\n%s", changedAfterSync) require.Contains(t, changedAfterSync, "D sdk/pyproject.toml\n") require.Contains(t, changedAfterSync, "D sdk/src/dagger/__init__.py\n") } //go:embed testdata/modules/go/minimal/main.go var goSignatures string func TestModuleGoSignatures(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: goSignatures, }) logGen(ctx, t, modGen.Directory(".")) t.Run("func Hello() string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{hello}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"hello":"hello"}}`, out) }) t.Run("func Echo(string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echo(msg: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echo":"hello...hello...hello..."}}`, out) }) t.Run("func HelloContext(context.Context) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{helloContext}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"helloContext":"hello context"}}`, out) }) t.Run("func EchoContext(context.Context, string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoContext(msg: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoContext":"ctx.hello...ctx.hello...ctx.hello..."}}`, out) }) t.Run("func HelloStringError() (string, error)", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{helloStringError}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"helloStringError":"hello i worked"}}`, out) }) t.Run("func HelloVoid()", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{helloVoid}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"helloVoid":null}}`, out) }) t.Run("func HelloVoidError() error", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{helloVoidError}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"helloVoidError":null}}`, out) }) t.Run("func EchoOpts(string, Opts) error", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOpts(msg: "hi")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOpts":"hi...hi...hi..."}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOpts(msg: "hi", suffix: "!", times: 2)}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOpts":"hi!hi!"}}`, out) }) t.Run("func EchoOptsInline(string, struct{Suffix string, Times int}) error", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOptsInline(msg: "hi")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInline":"hi...hi...hi..."}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOptsInline(msg: "hi", suffix: "!", times: 2)}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInline":"hi!hi!"}}`, out) }) } //go:embed testdata/modules/go/extend/main.go var goExtend string // this is no longer allowed, but verify the SDK errors out func TestModuleGoExtendCore(t *testing.T) { t.Parallel() var logs safeBuffer c, ctx := connect(t, dagger.WithLogOutput(&logs)) _, err := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: goExtend, }). With(daggerExec("mod", "sync")). Sync(ctx) require.Error(t, err) require.NoError(t, c.Close()) require.Contains(t, logs.String(), "cannot define methods on objects from outside this module") } //go:embed testdata/modules/go/custom-types/main.go var customTypes string func TestModuleGoCustomTypes(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: customTypes, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerQuery(`{test{repeater(msg:"echo!", times: 3){render}}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"test":{"repeater":{"render":"echo!echo!echo!"}}}`, out) } func TestModuleGoReturnTypeDetection(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=foo", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Foo struct {} type X struct { Message string ` + "`json:\"message\"`" + ` } func (m *Foo) MyFunction() X { return X{Message: "foo"} } `, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerQuery(`{foo{myFunction{message}}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"foo":{"myFunction":{"message":"foo"}}}`, out) } //go:embed testdata/modules/go/use/dep/main.go var useInner string //go:embed testdata/modules/go/use/main.go var useOuter string func TestModuleGoUseLocal(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/dep"). With(daggerExec("mod", "init", "--name=dep", "--sdk=go")). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=use", "--sdk=go")). WithNewFile("/work/dep/main.go", dagger.ContainerWithNewFileOpts{ Contents: useInner, }). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: useOuter, }). With(daggerExec("mod", "use", "./dep")). WithEnvVariable("BUST", identity.NewID()) // NB(vito): hmm... logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerQuery(`{use{useHello}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"use":{"useHello":"hello"}}`, out) // cannot use transitive dependency directly _, err = modGen.With(daggerQuery(`{dep{hello}}`)).Stdout(ctx) require.Error(t, err) require.ErrorContains(t, err, `Cannot query field "dep" on type "Query".`) } func TestModuleGoUseLocalMulti(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/foo"). WithNewFile("/work/foo/main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Foo struct {} func (m *Foo) Name() string { return "foo" } `, }). With(daggerExec("mod", "init", "--name=foo", "--sdk=go")). WithWorkdir("/work/bar"). WithNewFile("/work/bar/main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Bar struct {} func (m *Bar) Name() string { return "bar" } `, }). With(daggerExec("mod", "init", "--name=bar", "--sdk=go")). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=use", "--sdk=go")). With(daggerExec("mod", "use", "./foo")). With(daggerExec("mod", "use", "./bar")). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main import "context" import "fmt" type Use struct {} func (m *Use) Names(ctx context.Context) ([]string, error) { fooName, err := dag.Foo().Name(ctx) if err != nil { return nil, fmt.Errorf("foo.name: %w", err) } barName, err := dag.Bar().Name(ctx) if err != nil { return nil, fmt.Errorf("bar.name: %w", err) } return []string{fooName, barName}, nil } `, }). WithEnvVariable("BUST", identity.NewID()) // NB(vito): hmm... logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerQuery(`{use{names}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"use":{"names":["foo", "bar"]}}`, out) } //go:embed testdata/modules/go/wrapper/main.go var wrapper string func TestModuleGoWrapping(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=wrapper", "--sdk=go")). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: wrapper, }) logGen(ctx, t, modGen.Directory(".")) id := identity.NewID() out, err := modGen.With(daggerQuery( fmt.Sprintf(`{wrapper{container{echo(msg:%q){unwrap{stdout}}}}}`, id), )).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, fmt.Sprintf(`{"wrapper":{"container":{"echo":{"unwrap":{"stdout":%q}}}}}`, id), out) } func TestModuleConfigAPI(t *testing.T) { t.Parallel() c, ctx := connect(t) moduleDir := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/subdir"). With(daggerExec("mod", "init", "--name=test", "--sdk=go", "--root=..")). Directory("/work") cfg := c.ModuleConfig(moduleDir, dagger.ModuleConfigOpts{Subpath: "subdir"}) name, err := cfg.Name(ctx) require.NoError(t, err) require.Equal(t, "test", name) sdk, err := cfg.SDK(ctx) require.NoError(t, err) require.Equal(t, "go", sdk) root, err := cfg.Root(ctx) require.NoError(t, err) require.Equal(t, "..", root) } func TestModulePythonInit(t *testing.T) { t.Run("from scratch", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=bare", "--sdk=python")) out, err := modGen. With(daggerQuery(`{bare{myFunction(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"bare":{"myFunction":{"stdout":"hello\n"}}}`, out) }) t.Run("respects existing pyproject.toml", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("pyproject.toml", dagger.ContainerWithNewFileOpts{ Contents: `[project] name = "has-pyproject" version = "0.0.0" `, }). With(daggerExec("mod", "init", "--name=hasPyproject", "--sdk=python")) out, err := modGen. With(daggerQuery(`{hasPyproject{myFunction(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"hasPyproject":{"myFunction":{"stdout":"hello\n"}}}`, out) t.Run("preserves module name", func(t *testing.T) { generated, err := modGen.File("pyproject.toml").Contents(ctx) require.NoError(t, err) require.Contains(t, generated, `name = "has-pyproject"`) }) }) t.Run("respects existing main.py", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/src/main/__init__.py", dagger.ContainerWithNewFileOpts{ Contents: "from . import notmain\n", }). WithNewFile("/work/src/main/notmain.py", dagger.ContainerWithNewFileOpts{ Contents: `from dagger.mod import function @function def hello() -> str: return "Hello, world!" `, }). With(daggerExec("mod", "init", "--name=hasMainPy", "--sdk=python")) out, err := modGen. With(daggerQuery(`{hasMainPy{hello}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"hasMainPy":{"hello":"Hello, world!"}}`, out) }) } func TestModuleLotsOfFunctions(t *testing.T) { t.Parallel() const funcCount = 100 t.Run("go sdk", func(t *testing.T) { t.Parallel() c, ctx := connect(t) mainSrc := ` package main type PotatoSack struct {} ` for i := 0; i < funcCount; i++ { mainSrc += fmt.Sprintf(` func (m *PotatoSack) Potato%d() string { return "potato #%d" } `, i, i) } modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: mainSrc, }). With(daggerExec("mod", "init", "--name=potatoSack", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) var eg errgroup.Group for i := 0; i < funcCount; i++ { i := i // just verify a subset work if i%10 != 0 { continue } eg.Go(func() error { _, err := modGen. With(daggerCall(fmt.Sprintf("potato%d", i))). Sync(ctx) return err }) } require.NoError(t, eg.Wait()) }) t.Run("python sdk", func(t *testing.T) { t.Parallel() c, ctx := connect(t) mainSrc := `from dagger.mod import function ` for i := 0; i < funcCount; i++ { mainSrc += fmt.Sprintf(` @function def potato_%d() -> str: return "potato #%d" `, i, i) } modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("./src/main.py", dagger.ContainerWithNewFileOpts{ Contents: mainSrc, }). With(daggerExec("mod", "init", "--name=potatoSack", "--sdk=python")) var eg errgroup.Group for i := 0; i < funcCount; i++ { i := i // just verify a subset work if i%10 != 0 { continue } eg.Go(func() error { _, err := modGen. With(daggerCall(fmt.Sprintf("potato%d", i))). Sync(ctx) return err }) } require.NoError(t, eg.Wait()) }) } func TestModuleNamespacing(t *testing.T) { t.Parallel() c, ctx := connect(t) moduleSrcPath, err := filepath.Abs("./testdata/modules/go/namespacing") require.NoError(t, err) ctr := c.Container().From(alpineImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithMountedDirectory("/work", c.Host().Directory(moduleSrcPath)). WithWorkdir("/work") out, err := ctr. With(daggerQuery(`{test{fn(s:"yo")}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"test":{"fn":"1:yo 2:yo"}}`, out) } func TestEnvCmd(t *testing.T) { t.Skip("pending conversion to modules") t.Parallel() type testCase struct { environmentPath string expectedSDK string expectedName string expectedRoot string } for _, tc := range []testCase{ { environmentPath: "core/integration/testdata/environments/go/basic", expectedSDK: "go", expectedName: "basic", expectedRoot: "../../../../../../", }, } { tc := tc for _, testGitEnv := range []bool{false, true} { testGitEnv := testGitEnv testName := "local environment" if testGitEnv { testName = "git environment" } testName += "/" + tc.environmentPath t.Run(testName, func(t *testing.T) { t.Parallel() c, ctx := connect(t) stderr, err := CLITestContainer(ctx, t, c). WithLoadedEnv(tc.environmentPath, testGitEnv). CallEnv(). Stderr(ctx) require.NoError(t, err) require.Contains(t, stderr, fmt.Sprintf(`"root": %q`, tc.expectedRoot)) require.Contains(t, stderr, fmt.Sprintf(`"name": %q`, tc.expectedName)) require.Contains(t, stderr, fmt.Sprintf(`"sdk": %q`, tc.expectedSDK)) }) } } } func TestEnvCmdHelps(t *testing.T) { t.Skip("pending conversion to modules") t.Parallel() c, ctx := connect(t) baseCtr := CLITestContainer(ctx, t, c).WithHelpArg(true) // test with no env specified noEnvCtr := baseCtr // test with a valid local env validLocalEnvCtr := baseCtr.WithLoadedEnv("core/integration/testdata/environments/go/basic", false) // test with a broken local env (this helps ensure that we aren't actually running the entrypoints, if we did we'd get an error) brokenLocalEnvCtr := baseCtr.WithLoadedEnv("core/integration/testdata/environments/go/broken", false) for _, ctr := range []*DaggerCLIContainer{noEnvCtr, validLocalEnvCtr, brokenLocalEnvCtr} { type testCase struct { testName string cmdCtr *DaggerCLIContainer expectedOutput string } for _, tc := range []testCase{ { testName: "dagger env/" + ctr.EnvArg, cmdCtr: ctr.CallEnv(), expectedOutput: "Usage:\n dagger environment [flags]\n\nAliases:\n environment, env", }, { testName: "dagger env init/" + ctr.EnvArg, cmdCtr: ctr.CallEnvInit(), expectedOutput: "Usage:\n dagger environment init", }, { testName: "dagger env sync/" + ctr.EnvArg, cmdCtr: ctr.CallEnvSync(), expectedOutput: "Usage:\n dagger environment sync", }, { testName: "dagger env extend/" + ctr.EnvArg, cmdCtr: ctr.CallEnvExtend("./fake/dep"), expectedOutput: "Usage:\n dagger environment extend", }, { testName: "dagger checks/" + ctr.EnvArg, cmdCtr: ctr.CallChecks(), expectedOutput: "Usage:\n dagger checks", }, } { tc := tc t.Run(tc.testName, func(t *testing.T) { t.Parallel() stdout, err := tc.cmdCtr.Stdout(ctx) require.NoError(t, err) require.Contains(t, stdout, tc.expectedOutput) }) } } } func TestEnvCmdInit(t *testing.T) { t.Skip("pending conversion to modules") t.Parallel() type testCase struct { testName string environmentPath string sdk string name string root string expectedErrorMessage string } for _, tc := range []testCase{ { testName: "explicit environment dir/go", environmentPath: "/var/testenvironment/subdir", sdk: "go", name: identity.NewID(), root: "../", }, { testName: "explicit environment dir/python", environmentPath: "/var/testenvironment/subdir", sdk: "python", name: identity.NewID(), root: "../..", }, { testName: "explicit environment file", environmentPath: "/var/testenvironment/subdir/dagger.json", sdk: "python", name: identity.NewID(), }, { testName: "implicit environment", sdk: "go", name: identity.NewID(), }, { testName: "implicit environment with root", environmentPath: "/var/testenvironment", sdk: "python", name: identity.NewID(), root: "..", }, { testName: "invalid sdk", environmentPath: "/var/testenvironment", sdk: "c++--", name: identity.NewID(), expectedErrorMessage: "unsupported environment SDK", }, { testName: "error on git", environmentPath: "git://github.com/dagger/dagger.git", sdk: "go", name: identity.NewID(), expectedErrorMessage: "environment init is not supported for git environments", }, } { tc := tc t.Run(tc.testName, func(t *testing.T) { t.Parallel() c, ctx := connect(t) ctr := CLITestContainer(ctx, t, c). WithEnvArg(tc.environmentPath). WithSDKArg(tc.sdk). WithNameArg(tc.name). CallEnvInit() if tc.expectedErrorMessage != "" { _, err := ctr.Sync(ctx) require.ErrorContains(t, err, tc.expectedErrorMessage) return } expectedConfigPath := tc.environmentPath if !strings.HasSuffix(expectedConfigPath, "dagger.json") { expectedConfigPath = filepath.Join(expectedConfigPath, "dagger.json") } _, err := ctr.File(expectedConfigPath).Contents(ctx) require.NoError(t, err) // TODO: test rest of SDKs once custom codegen is supported if tc.sdk == "go" { codegenFile := filepath.Join(filepath.Dir(expectedConfigPath), "dagger.gen.go") _, err := ctr.File(codegenFile).Contents(ctx) require.NoError(t, err) } stderr, err := ctr.CallEnv().Stderr(ctx) require.NoError(t, err) require.Contains(t, stderr, fmt.Sprintf(`"name": %q`, tc.name)) require.Contains(t, stderr, fmt.Sprintf(`"sdk": %q`, tc.sdk)) }) } t.Run("error on existing environment", func(t *testing.T) { t.Parallel() c, ctx := connect(t) _, err := CLITestContainer(ctx, t, c). WithLoadedEnv("core/integration/testdata/environments/go/basic", false). WithSDKArg("go"). WithNameArg("foo"). CallEnvInit(). Sync(ctx) require.ErrorContains(t, err, "environment init config path already exists") }) } func TestEnvChecks(t *testing.T) { t.Skip("pending conversion to modules") t.Parallel() allChecks := []string{ "cool-static-check", "sad-static-check", "cool-container-check", "sad-container-check", "cool-composite-check", "sad-composite-check", "another-cool-static-check", "another-sad-static-check", "cool-composite-check-from-explicit-dep", "sad-composite-check-from-explicit-dep", "cool-composite-check-from-dynamic-dep", "sad-composite-check-from-dynamic-dep", "cool-check-only-return", "cool-check-result-only-return", "cool-string-only-return", "cool-error-only-return", "sad-error-only-return", "cool-string-error-return", "sad-string-error-return", } compositeCheckToSubcheckNames := map[string][]string{ "cool-composite-check": { "cool-subcheck-a", "cool-subcheck-b", }, "sad-composite-check": { "sad-subcheck-a", "sad-subcheck-b", }, "cool-composite-check-from-explicit-dep": { "another-cool-static-check", "another-cool-container-check", "another-cool-composite-check", }, "sad-composite-check-from-explicit-dep": { "another-sad-static-check", "another-sad-container-check", "another-sad-composite-check", }, "cool-composite-check-from-dynamic-dep": { "yet-another-cool-static-check", "yet-another-cool-container-check", "yet-another-cool-composite-check", }, "sad-composite-check-from-dynamic-dep": { "yet-another-sad-static-check", "yet-another-sad-container-check", "yet-another-sad-composite-check", }, "another-cool-composite-check": { "another-cool-subcheck-a", "another-cool-subcheck-b", }, "another-sad-composite-check": { "another-sad-subcheck-a", "another-sad-subcheck-b", }, "yet-another-cool-composite-check": { "yet-another-cool-subcheck-a", "yet-another-cool-subcheck-b", }, "yet-another-sad-composite-check": { "yet-another-sad-subcheck-a", "yet-another-sad-subcheck-b", }, } // should be aligned w/ `func checkOutput` in ./testdata/environments/go/basic/main.go checkOutput := func(name string) string { return "WE ARE RUNNING CHECK " + strcase.ToKebab(name) } type testCase struct { name string environmentPath string selectedChecks []string expectFailure bool } for _, tc := range []testCase{ { name: "happy-path", environmentPath: "core/integration/testdata/environments/go/basic", selectedChecks: []string{ "cool-static-check", "cool-container-check", "cool-composite-check", "another-cool-static-check", "cool-composite-check-from-explicit-dep", "cool-composite-check-from-dynamic-dep", "cool-check-only-return", "cool-check-result-only-return", "cool-string-only-return", "cool-error-only-return", "cool-string-error-return", }, }, { name: "sad-path", expectFailure: true, environmentPath: "core/integration/testdata/environments/go/basic", selectedChecks: []string{ "sad-static-check", "sad-container-check", "sad-composite-check", "another-sad-static-check", "sad-composite-check-from-explicit-dep", "sad-composite-check-from-dynamic-dep", "sad-error-only-return", "sad-string-error-return", }, }, { name: "mixed-path", expectFailure: true, environmentPath: "core/integration/testdata/environments/go/basic", // run all checks, don't select any }, } { tc := tc for _, testGitEnv := range []bool{false, true} { testGitEnv := testGitEnv testName := tc.name testName += "/gitenv=" + strconv.FormatBool(testGitEnv) testName += "/" + tc.environmentPath t.Run(testName, func(t *testing.T) { t.Parallel() c, ctx := connect(t) stderr, err := CLITestContainer(ctx, t, c). WithLoadedEnv(tc.environmentPath, testGitEnv). CallChecks(tc.selectedChecks...). Stderr(ctx) if tc.expectFailure { require.Error(t, err) execErr := new(dagger.ExecError) require.True(t, errors.As(err, &execErr)) stderr = execErr.Stderr } else { require.NoError(t, err) } selectedChecks := tc.selectedChecks if len(selectedChecks) == 0 { selectedChecks = allChecks } curChecks := selectedChecks for len(curChecks) > 0 { var nextChecks []string for _, checkName := range curChecks { subChecks, ok := compositeCheckToSubcheckNames[checkName] if ok { nextChecks = append(nextChecks, subChecks...) } else { // special case for successful error only check, doesn't have output if checkName == "cool-error-only-return" { continue } require.Contains(t, stderr, checkOutput(checkName)) } } curChecks = nextChecks } }) } } } func daggerExec(args ...string) dagger.WithContainerFunc { return func(c *dagger.Container) *dagger.Container { return c.WithExec(append([]string{"dagger", "--debug"}, args...), dagger.ContainerWithExecOpts{ ExperimentalPrivilegedNesting: true, }) } } func daggerQuery(query string) dagger.WithContainerFunc { return func(c *dagger.Container) *dagger.Container { return c.WithExec([]string{"dagger", "--debug", "query"}, dagger.ContainerWithExecOpts{ Stdin: query, ExperimentalPrivilegedNesting: true, }) } } // TODO: support args func daggerCall(fnName string) dagger.WithContainerFunc { return func(c *dagger.Container) *dagger.Container { return c.WithExec([]string{"dagger", "--debug", "call", fnName}, dagger.ContainerWithExecOpts{ ExperimentalPrivilegedNesting: true, }) } } func goGitBase(t *testing.T, c *dagger.Client) *dagger.Container { t.Helper() return c.Container().From(golangImage). WithExec([]string{"apk", "add", "git"}). WithExec([]string{"git", "config", "--global", "user.email", "dagger@example.com"}). WithExec([]string{"git", "config", "--global", "user.name", "Dagger Tests"}). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithExec([]string{"git", "init"}) } func logGen(ctx context.Context, t *testing.T, modSrc *dagger.Directory) { t.Helper() generated, err := modSrc.File("dagger.gen.go").Contents(ctx) require.NoError(t, err) t.Cleanup(func() { t.Name() fileName := filepath.Join( os.TempDir(), t.Name(), fmt.Sprintf("dagger.gen.%d.go", time.Now().Unix()), ) if err := os.MkdirAll(filepath.Dir(fileName), 0o755); err != nil { t.Logf("failed to create temp dir for generated code: %v", err) return } if err := os.WriteFile(fileName, []byte(generated), 0644); err != nil { t.Logf("failed to write generated code to %s: %v", fileName, err) } else { t.Logf("wrote generated code to %s", fileName) } }) }
closed
dagger/dagger
https://github.com/dagger/dagger
5,864
Zenith: Fix `Opts` types in Go SDK
From @jedevc: --- Looks like `Opt` types can't be pointers, e.g. something like this doesn't work: ```go type EchoOpts struct { Suffix string `doc:"String to append to the echoed message." default:"..."` Times int `doc:"Number of times to repeat the message." default:"3"` } func (m *Minimal) EchoOpts(msg string, opts *EchoOpts) string { return m.EchoOptsInline(msg, opts) } ``` The arg type needs to be changed to `opts EchoOpts` for it to work as intended. Giving: ``` Error: failed to get loaded module ID: input:1: host.directory.asModule.serve failed to install module schema: schema validation failed: input:1809: Undefined type EchoOptsID. ``` --- `Opts` structs cannot be nested: ```go package main import "fmt" type Potato struct{} type PotatoOptions struct { Count int TestingOptions TestingOptions } type TestingOptions struct { Foo string } func (m *Potato) HelloWorld(opts PotatoOptions) string { return fmt.Sprintf("Hello world, I have %d potatoes (%s)", opts.Count, opts.TestingOptions.Foo) } ``` ``` Error: failed to get loaded module ID: input:1: host.directory.asModule.serve failed to install module schema: schema validation failed: input:1803: Undefined type TestingOptionsID. ```
https://github.com/dagger/dagger/issues/5864
https://github.com/dagger/dagger/pull/5907
db901c8fe4c70cc32336e304492ca37f12b8f389
e8ad5c62275172e3d54ae46447e741ff5d603450
"2023-10-10T22:55:05Z"
go
"2023-10-25T19:38:59Z"
core/integration/testdata/modules/go/minimal/main.go
package main import ( "context" "strings" ) type Minimal struct{} func (m *Minimal) Hello() string { return "hello" } func (m *Minimal) Echo(msg string) string { return m.EchoOpts(msg, EchoOpts{ // TODO(vito): gotcha! Because we're calling the method directly, defaults // are not applied. Maybe the default:"..." struct tag should be removed in // favor of handling it at runtime? Maybe it should be kept anyway as a // convenience, and this won't be a common footgun? Suffix: "...", Times: 3, }) } func (m *Minimal) HelloContext(ctx context.Context) string { return "hello context" } func (m *Minimal) EchoContext(ctx context.Context, msg string) string { return m.Echo("ctx." + msg) } func (m *Minimal) HelloStringError(ctx context.Context) (string, error) { return "hello i worked", nil } func (m *Minimal) HelloVoid() {} func (m *Minimal) HelloVoidError() error { return nil } type EchoOpts struct { Suffix string `doc:"String to append to the echoed message." default:"..."` Times int `doc:"Number of times to repeat the message." default:"3"` } func (m *Minimal) EchoOpts(msg string, opts EchoOpts) string { return m.EchoOptsInline(msg, opts) } func (m *Minimal) EchoOptsInline(msg string, opts struct { Suffix string `doc:"String to append to the echoed message." default:"..."` Times int `doc:"Number of times to repeat the message." default:"3"` }) string { msg += opts.Suffix return strings.Repeat(msg, opts.Times) }
closed
dagger/dagger
https://github.com/dagger/dagger
5,864
Zenith: Fix `Opts` types in Go SDK
From @jedevc: --- Looks like `Opt` types can't be pointers, e.g. something like this doesn't work: ```go type EchoOpts struct { Suffix string `doc:"String to append to the echoed message." default:"..."` Times int `doc:"Number of times to repeat the message." default:"3"` } func (m *Minimal) EchoOpts(msg string, opts *EchoOpts) string { return m.EchoOptsInline(msg, opts) } ``` The arg type needs to be changed to `opts EchoOpts` for it to work as intended. Giving: ``` Error: failed to get loaded module ID: input:1: host.directory.asModule.serve failed to install module schema: schema validation failed: input:1809: Undefined type EchoOptsID. ``` --- `Opts` structs cannot be nested: ```go package main import "fmt" type Potato struct{} type PotatoOptions struct { Count int TestingOptions TestingOptions } type TestingOptions struct { Foo string } func (m *Potato) HelloWorld(opts PotatoOptions) string { return fmt.Sprintf("Hello world, I have %d potatoes (%s)", opts.Count, opts.TestingOptions.Foo) } ``` ``` Error: failed to get loaded module ID: input:1: host.directory.asModule.serve failed to install module schema: schema validation failed: input:1803: Undefined type TestingOptionsID. ```
https://github.com/dagger/dagger/issues/5864
https://github.com/dagger/dagger/pull/5907
db901c8fe4c70cc32336e304492ca37f12b8f389
e8ad5c62275172e3d54ae46447e741ff5d603450
"2023-10-10T22:55:05Z"
go
"2023-10-25T19:38:59Z"
docs/current/labs/project-zenith.md
--- slug: /labs/project-zenith title: "Project Zenith" displayed_sidebar: "labs" --- <head> <meta name="robots" content="noindex" /> </head> :::danger This is a short-lived page documenting a future release of Dagger. This release is currently experimental and should not be considered production-ready. If you arrived at this page by accident, you can [return to the official documentation](../index.md). ::: ## Overview _Project Zenith_ is the codename of a future release of Dagger, currently in development. Certain features of Project Zenith are available in Dagger v0.9 with more coming rapidly. The goal of the project is to make Dagger more accessible, by delivering it as a CLI tool rather than just a library. Features of Project Zenith include: - Major expansion of the `dagger` CLI, removing the need to create a custom CLI for each project. - Major expansion of the Dagger API, with a complete cross-language extension and composition system. - An open ecosystem of reusable content, to take advantage of the extension and composition system called the [Daggerverse](https://daggerverse.dev/). ## How to get involved The Dagger Engine is developed in the open, and Project Zenith is no exception. - Discussions take place [on the Dagger Discord](https://discord.gg/dagger-io) in the `#project-zenith` channel. We love to hear from you, and there are no stupid questions! - Contributors and testers meet every Friday at 09:00 Pacific time [on our Discord audio room](https://discord.com/channels/707636530424053791/911305510882513037). If you get stuck, check out the [Troubleshooting guide](#troubleshooting) below. ## How to use it Pre-requisites: - A shell (bash, zsh, etc) - [Docker](https://docs.docker.com/engine/install/) ### Downloading an experimental build Since Dagger version v0.9 ships with Project Zenith functionality enabled, you can simply install the latest v0.9.x release of the Dagger CLI using [the install docs](https://docs.dagger.io/cli/465058/install). :::note Certain experimental Project Zenith features like `dagger call`, `dagger shell`, and `dagger up` are not shown in top level help output, but have help text under `dagger help call` and `dagger help shell`, etc. ::: ## Creating your first Module Create a new directory on your filesystem and run `dagger mod init` to bootstrap your first module. We'll call it `potato` here, but you can choose your favorite food. ```sh mkdir potato/ cd potato/ # initialize Dagger module # NOTE: Node.js modules are not yet available, but under development. dagger mod init --name=potato --sdk=go ``` This will generate a `dagger.json` module file, an initial `main.go` source file, as well as a generated `dagger.gen.go` and `internal` folder for the generated module code. If you like, you can run the generated `main.go` like so: ```sh dagger call my-function --string-arg 'Hello daggernauts!' ``` or ```sh echo '{potato{myFunction(stringArg:"Hello daggernauts!"){id}}}' | dagger query ``` :::note When using `dagger call` to call module functions, do not explicitly use the name of the local or remote module. ::: :::note When using `dagger call`, all names (functions, arguments, struct fields, etc) are converted into a shell-friendly "kebab-case" style. When using `dagger query` and GraphQL, all names are converted into a language-agnostic "camelCase" style. ::: Let's try changing the `main.go`. We named our module `potato`, so that means all methods on the `Potato` type are published as functions. Let's replace the template with something simpler: ```go package main type Potato struct{} func (m *Potato) HelloWorld() string { return "Hello daggernauts!" } ``` Next, run `dagger mod sync`. **You will need to run this command after every change to your module's interface** (e.g. when you add/remove functions or change their parameters and return types). :::note Module functions are flexible in what parameters they can take. You can include an optional `context.Context`, and an optional `error` result. These are all valid variations of the above: ```go func (m *Potato) HelloWorld() string func (m *Potato) HelloWorld() (string, error) func (m *Potato) HelloWorld(ctx context.Context) string func (m *Potato) HelloWorld(ctx context.Context) (string, error) ``` ::: To run the new function, once again use `dagger call` or `dagger query`: ```sh dagger call hello-world ``` or ```sh echo '{potato{helloWorld}}' | dagger query ``` Your functions can accept and return multiple different types, not just basic builtin types. For example, to take an object (which you can use to provide optional parameters, or to group large numbers of parameters together): ```go package main import "fmt" type Potato struct{} type PotatoOptions struct { Count int Mashed bool } func (m *Potato) HelloWorld(opts PotatoOptions) string { if opts.Mashed { return fmt.Sprintf("Hello world, I have mashed %d potatoes", opts.Count) } return fmt.Sprintf("Hello world, I have %d potatoes", opts.Count) } ``` :::note Use `--help` at the end of `dagger call` to get help on the commands and flags available. ::: These options can then be set using `dagger call` or `dagger query` (exactly as if they'd been specified as top-level options): ```sh dagger call hello-world --count 10 --mashed true ``` or ```sh echo '{potato{helloWorld(count:10, mashed:true)}}' | dagger query ``` Or, to return a custom type: ```go package main type Potato struct{} // HACK: to be queried, custom object fields require `json` tags type PotatoMessage struct { Message string `json:"message"` From string `json:"from"` } // HACK: this is temporarily required to ensure that the codegen discovers // PotatoMessage func (msg PotatoMessage) Void() {} func (m *Potato) HelloWorld(message string) PotatoMessage { return PotatoMessage{ Message: message, From: "potato@example.com", } } ``` ```sh dagger call hello-world --message "I am a potato" message dagger call hello-world --message "I am a potato" from ``` or ```sh echo '{potato{helloWorld(message: "I am a potato"){message, from}}}' | dagger query ``` ## More things you can do ### Call other modules Modules can call each other! To add a dependency to your module, you can use `dagger mod use`: ```sh dagger mod use github.com/shykes/daggerverse/helloWorld@26f8ed9f1748ec8c9345281add850fd392441990 ``` This module will be added to your `dagger.json`: ```json "dependencies": [ "github.com/shykes/daggerverse/helloWorld@26f8ed9f1748ec8c9345281add850fd392441990" ] ``` You can also use local modules as dependencies. However, they must be stored in a sub-directory of your module. For example: ```sh dagger mod use ./path/to/module ``` The module will be added to your codegeneration, so you can access it from your own module's code: ```go func (m *Potato) HelloWorld(ctx context.Context) (string, error) { return dag.HelloWorld().Message(ctx) } ``` You can find other modules to use on <https://daggerverse.dev>. #### Module locations You can consume modules from lots of different sources. The easiest way to `dagger use`, `dagger call`, or `dagger query` a module is to reference it by its GitHub URL (similar to Go package strings). For example: ```sh dagger call test -m "github.com/user/repo@main" ``` or ```sh dagger query -m "github.com/user/repo@main" <<EOF query test { ... } EOF ``` or, if your module is in a subdirectory of the Git repository: ```sh dagger call test -m "github.com/user/repo/subdirectory@main" ``` or ```sh dagger query -m "github.com/user/repo/subdirectory@main" <<EOF query test { ... } EOF ``` You can also use modules from the local disk, without needing to push them to GitHub! ```sh dagger call test -m "./path/to/module" ``` or ```sh dagger query -m "./path/to/module" <<EOF query test { ... } EOF ``` #### Publishing your own modules You can publish your own modules to the [Daggerverse](https://daggerverse.dev), so that other users can easily discover them. At the moment, the Daggerverse is only used to discover other modules, all the data is stored and fetched from GitHub. To publish a module, create a Git repository for it and push to GitHub: ```sh # assuming your module is in "potato/" git init git add potato/ git commit -m "Initial commit" git remote add origin git@github.com:<user>/daggerverse.git git push origin main ``` Next, navigate to <https://daggerverse.dev>, and use the top-module bar to paste the GitHub link to your module (`github.com/<user>/daggerverse.git`), then click "Crawl". :::note You don't _have_ to use `daggerverse` as the name of your Git repository -- it's just a handy way to have all your modules in one Git repository together. But you can always split them out into separate repositories, or name it something different if you like! ::: ### Chaining As mentioned above, your functions can return custom objects, which in turn can define new functions! This allows for "chaining" of functions in the same style as the core Dagger API. As long as your object can be JSON-serialized by your SDK, its state will be preserved and passed to the next function in the chain. Here is an example module using the Go SDK: ```go // A dagger module for saying hello world! package main import ( "context" "fmt" ) type HelloWorld struct { Greeting string Name string } func (hello *HelloWorld) WithGreeting(ctx context.Context, greeting string) (*HelloWorld, error) { hello.Greeting = greeting return hello, nil } func (hello *HelloWorld) WithName(ctx context.Context, name string) (*HelloWorld, error) { hello.Name = name return hello, nil } func (hello *HelloWorld) Message(ctx context.Context) (string, error) { var ( greeting = hello.Greeting name = hello.Name ) if greeting == "" { greeting = "Hello" } if name == "" { name = "World" } return fmt.Sprintf("%s, %s!", greeting, name), nil } ``` And here is an example query for this module: ```graphql { helloWorld { message withName(name: "Monde") { withGreeting(greeting: "Bonjour") { message } } } } ``` The result will be: ```json { "helloWorld": { "message": "Hello, World!", "withName": { "withGreeting": { "message": "Bonjour, Monde!" } } } } ``` ## Known issues - A module's public fields require a `json:"foo"` tag to be queriable. - Custom objects in a module require at least one method to be defined on them to be detected by the codegen. - When referencing another module as a local dependency, the dependent module must be stored in a sub-directory of the parent module. - Custom struct types used as parameters cannot be nested and contain other structs themselves. - Calls to functions across modules will be run exactly _once_ per-session -- after that, the result will be cached, but only until the next session (a new `dagger query`, etc). - At some point, we will add more fine-grained cache-control. - Currently, Go and Python are the only supported languages for module development. - Python module development is not yet on par with Go. - Node.js modules are not yet available, but under development. ## Tips and tricks - The context and error return are optional in the module's function signature; remove them if you don't need them. - A module's private fields will not be persisted. ## Troubleshooting Zenith still isn't complete! So, if you come across bugs, it helps to have some techniques for working out what's going on. If you run into problems, please share in the `#zenith-help` channel in the [Dagger Discord](https://discord.gg/dagger-io)! ### Rerun commands with `--focus=false` Sometimes, the Dagger client logs are automatically collapsed and don't contain all the information from a failure. To make sure that logs aren't automatically collapsed, you can run any `dagger` subcommand with the `--focus=false` flag to disable this behavior. ### Access the `docker logs` The Dagger Engine runs in a dedicated container. You can find the container: ```shell DAGGER_ENGINE_DOCKER_CONTAINER="$(docker container list --all --filter 'name=^dagger-engine-*' --format '{{.Names}}')" ``` You can then access the logs for the container: ```shell docker logs $DAGGER_ENGINE_DOCKER_CONTAINER ```
closed
dagger/dagger
https://github.com/dagger/dagger
5,864
Zenith: Fix `Opts` types in Go SDK
From @jedevc: --- Looks like `Opt` types can't be pointers, e.g. something like this doesn't work: ```go type EchoOpts struct { Suffix string `doc:"String to append to the echoed message." default:"..."` Times int `doc:"Number of times to repeat the message." default:"3"` } func (m *Minimal) EchoOpts(msg string, opts *EchoOpts) string { return m.EchoOptsInline(msg, opts) } ``` The arg type needs to be changed to `opts EchoOpts` for it to work as intended. Giving: ``` Error: failed to get loaded module ID: input:1: host.directory.asModule.serve failed to install module schema: schema validation failed: input:1809: Undefined type EchoOptsID. ``` --- `Opts` structs cannot be nested: ```go package main import "fmt" type Potato struct{} type PotatoOptions struct { Count int TestingOptions TestingOptions } type TestingOptions struct { Foo string } func (m *Potato) HelloWorld(opts PotatoOptions) string { return fmt.Sprintf("Hello world, I have %d potatoes (%s)", opts.Count, opts.TestingOptions.Foo) } ``` ``` Error: failed to get loaded module ID: input:1: host.directory.asModule.serve failed to install module schema: schema validation failed: input:1803: Undefined type TestingOptionsID. ```
https://github.com/dagger/dagger/issues/5864
https://github.com/dagger/dagger/pull/5907
db901c8fe4c70cc32336e304492ca37f12b8f389
e8ad5c62275172e3d54ae46447e741ff5d603450
"2023-10-10T22:55:05Z"
go
"2023-10-25T19:38:59Z"
go.mod
module github.com/dagger/dagger go 1.20 replace dagger.io/dagger => ./sdk/go replace github.com/dagger/dagger/internal/mage => ./internal/mage require ( dagger.io/dagger v0.9.0 github.com/99designs/gqlgen v0.17.34 // indirect github.com/armon/circbuf v0.0.0-20190214190532-5111143e8da2 // indirect github.com/aws/aws-sdk-go-v2/config v1.18.21 // indirect github.com/aws/aws-sdk-go-v2/credentials v1.13.20 // indirect github.com/aws/aws-sdk-go-v2/service/s3 v1.31.3 // indirect github.com/charmbracelet/bubbles v0.16.1 github.com/charmbracelet/bubbletea v0.24.2 github.com/containerd/containerd v1.7.2 github.com/containerd/fuse-overlayfs-snapshotter v1.0.6 github.com/containerd/stargz-snapshotter v0.14.3 github.com/containernetworking/cni v1.1.2 github.com/coreos/go-systemd/v22 v22.5.0 github.com/dagger/graphql v0.0.0-20230919174923-21d038582a21 github.com/dagger/graphql-go-tools v0.0.0-20231012004527-77189e400b6e github.com/docker/distribution v2.8.2+incompatible github.com/google/go-containerregistry v0.15.2 github.com/google/uuid v1.3.0 github.com/iancoleman/strcase v0.3.0 // https://github.com/moby/buildkit/commit/86e25b3ad8c20fc420669949f24bb86c74082b2f github.com/moby/buildkit v0.13.0-beta1.0.20231011161957-86e25b3ad8c2 github.com/opencontainers/go-digest v1.0.0 github.com/opencontainers/image-spec v1.1.0-rc3 github.com/opencontainers/runtime-spec v1.1.0-rc.2 github.com/pelletier/go-toml v1.9.5 github.com/pkg/errors v0.9.1 github.com/sirupsen/logrus v1.9.3 github.com/spf13/cobra v1.7.0 github.com/stretchr/testify v1.8.4 github.com/tonistiigi/fsutil v0.0.0-20230629203738-36ef4d8c0dbb github.com/urfave/cli v1.22.12 github.com/weaveworks/common v0.0.0-20230119144549-0aaa5abd1e63 github.com/zeebo/xxh3 v1.0.2 go.etcd.io/bbolt v1.3.7 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.45.0 go.opentelemetry.io/otel v1.19.0 go.opentelemetry.io/otel/exporters/jaeger v1.17.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0 go.opentelemetry.io/otel/sdk v1.19.0 go.opentelemetry.io/otel/trace v1.19.0 go.opentelemetry.io/proto/otlp v1.0.0 golang.org/x/crypto v0.14.0 golang.org/x/mod v0.13.0 golang.org/x/sync v0.4.0 golang.org/x/sys v0.13.0 golang.org/x/term v0.13.0 google.golang.org/grpc v1.58.2 oss.terrastruct.com/d2 v0.4.0 ) require ( github.com/blang/semver v3.5.1+incompatible github.com/charmbracelet/lipgloss v0.8.0 github.com/dagger/dagger/internal/mage v0.0.0-00010101000000-000000000000 github.com/dave/jennifer v1.7.0 github.com/dschmidt/go-layerfs v0.1.0 github.com/fatih/structtag v1.2.0 github.com/go-git/go-git/v5 v5.9.0 github.com/gogo/protobuf v1.3.2 github.com/google/go-github/v50 v50.2.0 github.com/gorilla/websocket v1.5.0 github.com/icholy/replace v0.6.0 github.com/jackpal/gateway v1.0.7 github.com/juju/ansiterm v1.0.0 github.com/koron-go/prefixw v1.0.0 github.com/mackerelio/go-osstat v0.2.4 github.com/mattn/go-isatty v0.0.19 github.com/moby/sys/mount v0.3.3 github.com/muesli/termenv v0.15.2 github.com/nxadm/tail v1.4.8 github.com/opencontainers/runc v1.1.9 github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 github.com/prometheus/procfs v0.12.0 github.com/psanford/memfs v0.0.0-20230130182539-4dbf7e3e865e github.com/rs/cors v1.10.0 github.com/rs/zerolog v1.30.0 github.com/shurcooL/graphql v0.0.0-20220606043923-3cf50f8a0a29 github.com/vito/midterm v0.1.4 github.com/vito/progrock v0.10.2-0.20230913234310-64b4a1cfb007 golang.org/x/exp v0.0.0-20231006140011-7918f672742d golang.org/x/oauth2 v0.13.0 golang.org/x/tools v0.14.0 ) require ( github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect github.com/muesli/cancelreader v0.2.2 // indirect github.com/muesli/reflow v0.3.0 // indirect ) require ( cdr.dev/slog v1.4.2 // indirect dario.cat/mergo v1.0.0 // indirect github.com/AdaLogics/go-fuzz-headers v0.0.0-20230106234847-43070de90fa1 // indirect github.com/Azure/azure-sdk-for-go/sdk/azcore v1.1.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.1.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.4.1 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v0.6.0 // indirect github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect github.com/PuerkitoBio/goquery v1.8.1 // indirect github.com/acomagu/bufpipe v1.0.4 // indirect github.com/agnivade/levenshtein v1.1.1 // indirect github.com/alecthomas/chroma v0.10.0 // indirect github.com/alecthomas/chroma/v2 v2.7.0 // indirect github.com/anchore/go-struct-converter v0.0.0-20221118182256-c68fdcfa2092 // indirect github.com/andybalholm/cascadia v1.3.1 // indirect github.com/aws/aws-sdk-go-v2 v1.17.8 // indirect github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.10 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.2 // indirect github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.62 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.32 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.26 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.3.33 // indirect github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.24 // indirect github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.11 // indirect github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.27 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.26 // indirect github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.14.1 // indirect github.com/aws/aws-sdk-go-v2/service/sso v1.12.8 // indirect github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.8 // indirect github.com/aws/aws-sdk-go-v2/service/sts v1.18.9 // indirect github.com/aws/smithy-go v1.13.5 // indirect github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/charmbracelet/harmonica v0.2.0 // indirect github.com/cloudflare/circl v1.3.3 // indirect github.com/containerd/go-cni v1.1.9 // indirect github.com/containerd/go-runc v1.1.0 // indirect github.com/containerd/typeurl/v2 v2.1.1 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect github.com/cyphar/filepath-securejoin v0.2.4 // indirect github.com/dimchansky/utfbom v1.1.1 // indirect github.com/distribution/reference v0.5.0 // indirect github.com/dlclark/regexp2 v1.9.0 // indirect github.com/docker/go-metrics v0.0.1 // indirect github.com/dop251/goja v0.0.0-20230402114112-623f9dda9079 // indirect github.com/emirpasic/gods v1.18.1 // indirect github.com/fatih/color v1.15.0 // indirect github.com/fogleman/ease v0.0.0-20170301025033-8da417bf1776 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect github.com/go-git/go-billy/v5 v5.5.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.5.1 // indirect github.com/go-sourcemap/sourcemap v2.1.3+incompatible // indirect github.com/golang-jwt/jwt/v4 v4.4.2 // indirect github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect github.com/google/go-cmp v0.5.9 // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/google/pprof v0.0.0-20230406165453-00490a63f317 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect github.com/hanwen/go-fuse/v2 v2.2.0 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/go-retryablehttp v0.7.2 // indirect github.com/hashicorp/golang-lru v0.5.4 // indirect github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jonboulle/clockwork v0.4.0 // indirect github.com/jung-kurt/gofpdf v1.16.2 // indirect github.com/kevinburke/ssh_config v1.2.0 // indirect github.com/klauspost/cpuid/v2 v2.0.9 // indirect github.com/kylelemons/godebug v1.1.0 // indirect github.com/lucasb-eyer/go-colorful v1.2.0 // indirect github.com/lunixbochs/vtclean v1.0.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-localereader v0.0.1 // indirect github.com/mattn/go-runewidth v0.0.14 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/mazznoer/csscolorparser v0.1.3 // indirect github.com/mitchellh/hashstructure/v2 v2.0.2 // indirect github.com/moby/sys/mountinfo v0.6.2 // indirect github.com/moby/sys/sequential v0.5.0 // indirect github.com/opencontainers/selinux v1.11.0 // indirect github.com/package-url/packageurl-go v0.1.1-0.20220428063043-89078438f170 // indirect github.com/pjbgf/sha1cd v0.3.0 // indirect github.com/pkg/profile v1.5.0 // indirect github.com/prometheus/client_golang v1.14.0 // indirect github.com/prometheus/client_model v0.3.0 // indirect github.com/prometheus/common v0.42.0 // indirect github.com/rivo/uniseg v0.4.4 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/sergi/go-diff v1.3.1 // indirect github.com/skeema/knownhosts v1.2.0 // indirect github.com/spdx/tools-golang v0.5.1 // indirect github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.0 // indirect github.com/tonistiigi/go-actions-cache v0.0.0-20220404170428-0bdeb6e1eac7 // indirect github.com/tonistiigi/go-archvariant v1.0.0 // indirect github.com/tonistiigi/vt100 v0.0.0-20230623042737-f9a4f7ef6531 // indirect github.com/weaveworks/promrus v1.2.0 // indirect github.com/xanzy/ssh-agent v0.3.3 // indirect github.com/yuin/goldmark v1.5.4 // indirect github.com/zmb3/spotify/v2 v2.3.1 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.45.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0 // indirect go.opentelemetry.io/otel/metric v1.19.0 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/image v0.7.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect gonum.org/v1/plot v0.12.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect oss.terrastruct.com/util-go v0.0.0-20230320053557-dcb5aac7d972 // indirect ) require ( github.com/Khan/genqlient v0.6.0 github.com/Microsoft/go-winio v0.6.1 // indirect github.com/Microsoft/hcsshim v0.10.0-rc.8 // indirect github.com/adrg/xdg v0.4.0 github.com/agext/levenshtein v1.2.3 // indirect github.com/cenkalti/backoff/v4 v4.2.1 github.com/containerd/cgroups v1.1.0 // indirect github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 // indirect github.com/containerd/continuity v0.4.1 github.com/containerd/fifo v1.1.0 // indirect github.com/containerd/nydus-snapshotter v0.8.2 // indirect github.com/containerd/stargz-snapshotter/estargz v0.14.3 // indirect github.com/containerd/ttrpc v1.2.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/docker/cli v24.0.5+incompatible github.com/docker/docker v24.0.0-rc.2.0.20230905130451-032797ea4bcb+incompatible github.com/docker/docker-credential-helpers v0.7.0 // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/felixge/httpsnoop v1.0.3 // indirect github.com/go-logr/logr v1.2.4 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/gofrs/flock v0.8.1 github.com/gogo/googleapis v1.4.1 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 github.com/in-toto/in-toto-golang v0.5.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/klauspost/compress v1.16.5 github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/moby/locker v1.0.1 github.com/moby/patternmatcher v0.6.0 // indirect github.com/moby/sys/signal v0.7.0 // indirect github.com/morikuni/aec v1.0.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/secure-systems-lab/go-securesystemslib v0.4.0 // indirect github.com/shibumi/go-pathspec v1.3.0 // indirect github.com/spf13/pflag v1.0.5 github.com/tidwall/gjson v1.15.0 github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea github.com/vbatts/tar-split v0.11.3 // indirect github.com/vektah/gqlparser/v2 v2.5.6 go.opencensus.io v0.24.0 // indirect golang.org/x/net v0.16.0 golang.org/x/text v0.13.0 golang.org/x/time v0.3.0 // indirect google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98 // indirect google.golang.org/protobuf v1.31.0 gopkg.in/yaml.v3 v3.0.1 )
closed
dagger/dagger
https://github.com/dagger/dagger
5,864
Zenith: Fix `Opts` types in Go SDK
From @jedevc: --- Looks like `Opt` types can't be pointers, e.g. something like this doesn't work: ```go type EchoOpts struct { Suffix string `doc:"String to append to the echoed message." default:"..."` Times int `doc:"Number of times to repeat the message." default:"3"` } func (m *Minimal) EchoOpts(msg string, opts *EchoOpts) string { return m.EchoOptsInline(msg, opts) } ``` The arg type needs to be changed to `opts EchoOpts` for it to work as intended. Giving: ``` Error: failed to get loaded module ID: input:1: host.directory.asModule.serve failed to install module schema: schema validation failed: input:1809: Undefined type EchoOptsID. ``` --- `Opts` structs cannot be nested: ```go package main import "fmt" type Potato struct{} type PotatoOptions struct { Count int TestingOptions TestingOptions } type TestingOptions struct { Foo string } func (m *Potato) HelloWorld(opts PotatoOptions) string { return fmt.Sprintf("Hello world, I have %d potatoes (%s)", opts.Count, opts.TestingOptions.Foo) } ``` ``` Error: failed to get loaded module ID: input:1: host.directory.asModule.serve failed to install module schema: schema validation failed: input:1803: Undefined type TestingOptionsID. ```
https://github.com/dagger/dagger/issues/5864
https://github.com/dagger/dagger/pull/5907
db901c8fe4c70cc32336e304492ca37f12b8f389
e8ad5c62275172e3d54ae46447e741ff5d603450
"2023-10-10T22:55:05Z"
go
"2023-10-25T19:38:59Z"
go.sum
bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= bazil.org/fuse v0.0.0-20180421153158-65cc252bf669/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= cdr.dev/slog v1.4.2 h1:fIfiqASYQFJBZiASwL825atyzeA96NsqSxx2aL61P8I= cdr.dev/slog v1.4.2/go.mod h1:0EkH+GkFNxizNR+GAXUEdUHanxUH5t9zqPILmPM/Vn8= cloud.google.com/go v0.25.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.31.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.37.2/go.mod h1:H8IAquKe2L30IxoupDgqTaQvKSwF/c8prYHynGIWQbA= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.39.0/go.mod h1:rVLT6fkc8chs9sfPtFc1SBH6em7n+ZoXaG+87tDISts= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= cloud.google.com/go v0.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw= cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= cloud.google.com/go v0.110.4 h1:1JYyxKMN9hd5dR2MYTPWkGUgcoxVVhg0LKNKEo0qvmk= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= cloud.google.com/go/compute v1.21.0 h1:JNBsyXVoOoNJtTQcnEY5uYpZIbeCTYIeDe0Xh1bySMk= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= cloud.google.com/go/logging v1.7.0 h1:CJYxlNNNNAMkHp9em/YEXcfJg+rPDg7YfwoRpMU+t5I= cloud.google.com/go/longrunning v0.5.1 h1:Fr7TXftcqTudoyRJa113hyaqlGdiBQkp0Gq7tErFDWI= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= code.gitea.io/sdk/gitea v0.12.0/go.mod h1:z3uwDV/b9Ls47NGukYM9XhnHtqPh/J+t40lsUrR6JDY= contrib.go.opencensus.io/exporter/aws v0.0.0-20181029163544-2befc13012d0/go.mod h1:uu1P0UCM/6RbsMrgPa98ll8ZcHM858i/AD06a9aLRCA= contrib.go.opencensus.io/exporter/ocagent v0.5.0/go.mod h1:ImxhfLRpxoYiSq891pBrLVhN+qmP8BTVvdH2YLs7Gl0= contrib.go.opencensus.io/exporter/stackdriver v0.12.1/go.mod h1:iwB6wGarfphGGe/e5CWqyUk/cLzKnWsOKPVW3no6OTw= contrib.go.opencensus.io/integrations/ocsql v0.1.4/go.mod h1:8DsSdjz3F+APR+0z0WkU1aRorQCFfRxvqjUUPMbF3fE= contrib.go.opencensus.io/resource v0.1.1/go.mod h1:F361eGI91LCmW1I/Saf+rX0+OFcigGlFvXwEGEnkRLA= dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= git.apache.org/thrift.git v0.12.0/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= git.sr.ht/~sbinet/gg v0.3.1 h1:LNhjNn8DerC8f9DHLz6lS0YYul/b602DUxDgGkd/Aik= github.com/99designs/gqlgen v0.17.34 h1:5cS5/OKFguQt+Ws56uj9FlG2xm1IlcJWNF2jrMIKYFQ= github.com/99designs/gqlgen v0.17.34/go.mod h1:Axcd3jIFHBVcqzixujJQr1wGqE+lGTpz6u4iZBZg1G8= github.com/AdaLogics/go-fuzz-headers v0.0.0-20230106234847-43070de90fa1 h1:EKPd1INOIyr5hWOWhvpmQpY6tKjeG0hT1s3AMC/9fic= github.com/AdaLogics/go-fuzz-headers v0.0.0-20230106234847-43070de90fa1/go.mod h1:VzwV+t+dZ9j/H867F1M2ziD+yLHtB46oM35FxxMJ4d0= github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20221215162035-5330a85ea652 h1:+vTEFqeoeur6XSq06bs+roX3YiT49gUniJK7Zky7Xjg= github.com/AkihiroSuda/containerd-fuse-overlayfs v1.0.0/go.mod h1:0mMDvQFeLbbn1Wy8P2j3hwFhqBq+FKn8OZPno8WLmp8= github.com/Azure/azure-amqp-common-go/v2 v2.1.0/go.mod h1:R8rea+gJRuJR6QxTir/XuEd+YuKoUiazDC/N96FiDEU= github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4= github.com/Azure/azure-pipeline-go v0.2.2/go.mod h1:4rQ/NZncSvGqNkkOsNpOU1tgoNuIlp9AfUH5G1tvCHc= github.com/Azure/azure-sdk-for-go v16.2.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go v19.1.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go v29.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go v30.1.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go v35.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go v38.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go v42.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.1.0 h1:Ut0ZGdOwJDw0npYEg+TLlPls3Pq6JiZaP2/aGKir7Zw= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.1.0/go.mod h1:uGG2W01BaETf0Ozp+QxxKJdMBNRWPdstHG0Fmdwn1/U= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.1.0 h1:QkAcEIAKbNL4KoFr4SathZPhDhF4mVwpBMFlYjyAqy8= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.1.0/go.mod h1:bhXu1AjYL+wutSL/kpSq6s7733q2Rb0yuot9Zgfqa/0= github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0 h1:jp0dGvZ7ZK0mgqnTSClMxa5xuRL7NZgHameVYF6BurY= github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0/go.mod h1:eWRD7oawr1Mu1sLCawqVc0CUiF43ia3qQMxLscsKQ9w= github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.4.1 h1:QSdcrd/UFJv6Bp/CfoVf2SrENpFn9P6Yh8yb+xNhYMM= github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.4.1/go.mod h1:eZ4g6GUvXiGulfIbbhh1Xr4XwUYaYaWMqzGD/284wCA= github.com/Azure/azure-service-bus-go v0.9.1/go.mod h1:yzBx6/BUGfjfeqbRZny9AQIbIe3AcV9WZbAdpkoXOa0= github.com/Azure/azure-storage-blob-go v0.8.0/go.mod h1:lPI3aLPpuLTeUwh1sViKXFxwl2B6teiRqI0deQUvsw0= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-autorest v10.8.1+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest v10.15.5+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest v12.0.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest v14.1.1+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= github.com/Azure/go-autorest/autorest v0.9.3/go.mod h1:GsRuLYvwzLjjjRoWEIyMUaYq8GNUx2nRB378IPt/1p0= github.com/Azure/go-autorest/autorest v0.9.6/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= github.com/Azure/go-autorest/autorest v0.10.2/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= github.com/Azure/go-autorest/autorest/adal v0.8.1/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= github.com/Azure/go-autorest/autorest/adal v0.8.2/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= github.com/Azure/go-autorest/autorest/adal v0.8.3/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= github.com/Azure/go-autorest/autorest/azure/auth v0.4.2/go.mod h1:90gmfKdlmKgfjUpnCEpOJzsUEjrWDSLwHIG73tSXddM= github.com/Azure/go-autorest/autorest/azure/cli v0.3.1/go.mod h1:ZG5p860J94/0kI9mNJVoIoLgXcirM2gF5i2kWloofxw= github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= github.com/Azure/go-autorest/autorest/to v0.2.0/go.mod h1:GunWKJp1AEqgMaGLV+iocmRAJWqST1wQYhyyjXJ3SJc= github.com/Azure/go-autorest/autorest/to v0.3.0/go.mod h1:MgwOyqaIuKdG4TL/2ywSsIWKAfJfgHDo8ObuUk3t5sA= github.com/Azure/go-autorest/autorest/validation v0.1.0/go.mod h1:Ha3z/SqBeaalWQvokg3NZAlQTalVMtOIAs1aGK7G6u8= github.com/Azure/go-autorest/autorest/validation v0.2.0/go.mod h1:3EEqHnBxQGHXRYq3HT1WyXAvT7LLY3tl70hw6tQIbjI= github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/AzureAD/microsoft-authentication-library-for-go v0.6.0 h1:XMEdVDFxgulDDl0lQmAZS6j8gRQ/0pJ+ZpXH2FHVtDc= github.com/AzureAD/microsoft-authentication-library-for-go v0.6.0/go.mod h1:BDJ5qMFKx9DugEg3+uQSDCdbYPr5s9vBTrL9P8TpqOU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/Djarvur/go-err113 v0.0.0-20200410182137-af658d038157/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= github.com/Djarvur/go-err113 v0.1.0/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= github.com/GoogleCloudPlatform/cloudsql-proxy v0.0.0-20191009163259-e802c2cb94ae/go.mod h1:mjwGPas4yKduTyubHvD1Atl9r1rUq8DfVy+gkVvZ+oo= github.com/GoogleCloudPlatform/k8s-cloud-provider v0.0.0-20190822182118-27a4ced34534/go.mod h1:iroGtC8B3tQiqtds1l+mgk/BBOrxbqjH+eUfFQYRc14= github.com/Khan/genqlient v0.6.0 h1:Bwb1170ekuNIVIwTJEqvO8y7RxBxXu639VJOkKSrwAk= github.com/Khan/genqlient v0.6.0/go.mod h1:rvChwWVTqXhiapdhLDV4bp9tz/Xvtewwkon4DpWWCRM= github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/Masterminds/semver/v3 v3.0.3/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= github.com/Masterminds/semver/v3 v3.1.0 h1:Y2lUDsFKVRSYGojLJ1yLxSXdMmMYTYls0rCvoqmMUQk= github.com/Masterminds/semver/v3 v3.1.0/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= github.com/Microsoft/go-winio v0.4.15-0.20200908182639-5b44b70ab3ab/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= github.com/Microsoft/go-winio v0.4.15/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/Microsoft/hcsshim v0.8.7/go.mod h1:OHd7sQqRFrYd3RmSgbgji+ctCwkbq2wbEYNSzOYtcBQ= github.com/Microsoft/hcsshim v0.8.9/go.mod h1:5692vkUqntj1idxauYlpoINNKeqCiG6Sg38RRsjT5y8= github.com/Microsoft/hcsshim v0.8.10/go.mod h1:g5uw8EV2mAlzqe94tfNBNdr89fnbD/n3HV0OhsddkmM= github.com/Microsoft/hcsshim v0.10.0-rc.8 h1:YSZVvlIIDD1UxQpJp0h+dnpLUw+TrY0cx8obKsp3bek= github.com/Microsoft/hcsshim v0.10.0-rc.8/go.mod h1:OEthFdQv/AD2RAdzR6Mm1N1KPCztGKDurW1Z8b8VGMM= github.com/Microsoft/hcsshim/test v0.0.0-20200826032352-301c83a30e7c/go.mod h1:30A5igQ91GEmhYJF8TaRP79pMBOYynRsyOByfVV0dU4= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/OpenPeeDeeP/depguard v1.0.1/go.mod h1:xsIw86fROiiwelg+jB2uM9PiKihMMmUx/1V+TNhjQvM= github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 h1:kkhsdkhsCvIsutKu5zLMgWtgh9YxGCNAw8Ad8hjwfYg= github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= github.com/PuerkitoBio/goquery v1.8.1 h1:uQxhNlArOIdbrH1tr0UXwdVFgDcZDrZVdcpygAcwmWM= github.com/PuerkitoBio/goquery v1.8.1/go.mod h1:Q8ICL1kNUJ2sXGoAhPGUdYDJvgQgHzJsnnd3H7Ho5jQ= github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= github.com/acomagu/bufpipe v1.0.4 h1:e3H4WUzM3npvo5uv95QuJM3cQspFNtFBzvJ2oNjKIDQ= github.com/acomagu/bufpipe v1.0.4/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= github.com/adrg/xdg v0.4.0 h1:RzRqFcjH4nE5C6oTAxhBtoE2IRyjBSa62SCbyPidvls= github.com/adrg/xdg v0.4.0/go.mod h1:N6ag73EX4wyxeaoeHctc1mas01KZgsj5tYiAIwqJE/E= github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRBij0P8= github.com/agnivade/levenshtein v1.1.1/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo= github.com/ajstarks/svgo v0.0.0-20211024235047-1546f124cd8b h1:slYM766cy2nI3BwyRiyQj/Ud48djTMtMebDqepE95rw= github.com/alecthomas/assert/v2 v2.2.1 h1:XivOgYcduV98QCahG8T5XTezV5bylXe+lBxLG2K2ink= github.com/alecthomas/chroma v0.10.0 h1:7XDcGkCQopCNKjZHfYrNLraA+M7e0fMiJ/Mfikbfjek= github.com/alecthomas/chroma v0.10.0/go.mod h1:jtJATyUxlIORhUOFNA9NZDWGAQ8wpxQQqNSB4rjA/1s= github.com/alecthomas/chroma/v2 v2.7.0 h1:hm1rY6c/Ob4eGclpQ7X/A3yhqBOZNUTk9q+yhyLIViI= github.com/alecthomas/chroma/v2 v2.7.0/go.mod h1:yrkMI9807G1ROx13fhe1v6PN2DDeaR73L3d+1nmYQtw= github.com/alecthomas/kingpin v2.2.6+incompatible/go.mod h1:59OFYbFVLKQKq+mqrL6Rw5bR0c3ACQaawgXx0QYndlE= github.com/alecthomas/repr v0.2.0 h1:HAzS41CIzNW5syS8Mf9UwXhNH1J9aix/BvDRf1Ml2Yk= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= github.com/anchore/go-struct-converter v0.0.0-20221118182256-c68fdcfa2092 h1:aM1rlcoLz8y5B2r4tTLMiVTrMtpfY0O8EScKJxaSaEc= github.com/anchore/go-struct-converter v0.0.0-20221118182256-c68fdcfa2092/go.mod h1:rYqSE9HbjzpHTI74vwPvae4ZVYZd1lue2ta6xHPdblA= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/andybalholm/cascadia v1.3.1 h1:nhxRkql1kdYCc8Snf7D5/D3spOX+dBgjA6u8x004T2c= github.com/andybalholm/cascadia v1.3.1/go.mod h1:R4bJ1UQfqADjvDa4P6HZHLh/3OxWWEqc0Sk8XGwHqvA= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apex/log v1.1.4/go.mod h1:AlpoD9aScyQfJDVHmLMEcx4oU6LqzkWp4Mg9GdAcEvQ= github.com/apex/log v1.3.0/go.mod h1:jd8Vpsr46WAe3EZSQ/IUMs2qQD/GOycT5rPWCO1yGcs= github.com/apex/logs v0.0.4/go.mod h1:XzxuLZ5myVHDy9SAmYpamKKRNApGj54PfYLcFrXqDwo= github.com/aphistic/golf v0.0.0-20180712155816-02c07f170c5a/go.mod h1:3NqKYiepwy8kCu4PNA+aP7WUV72eXWJeP9/r3/K9aLE= github.com/aphistic/sweet v0.2.0/go.mod h1:fWDlIh/isSE9n6EPsRmC0det+whmX6dJid3stzu0Xys= github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0 h1:jfIu9sQUG6Ig+0+Ap1h4unLjW6YQJpKZVmUzxsD4E/Q= github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0/go.mod h1:t2tdKJDJF9BV14lnkjHmOQgcvEKgtqs5a1N3LNdJhGE= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/circbuf v0.0.0-20190214190532-5111143e8da2 h1:7Ip0wMmLHLRJdrloDxZfhMm0xrLXZS8+COSu2bXmEQs= github.com/armon/circbuf v0.0.0-20190214190532-5111143e8da2/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= github.com/aws/aws-sdk-go v1.15.27/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= github.com/aws/aws-sdk-go v1.15.90/go.mod h1:es1KtYUFs7le0xQ3rOihkuoVD90z7D0fR2Qm4S00/gU= github.com/aws/aws-sdk-go v1.16.26/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.19.18/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.19.45/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.20.6/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.25.11/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.27.1/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.31.6/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= github.com/aws/aws-sdk-go-v2 v1.17.8 h1:GMupCNNI7FARX27L7GjCJM8NgivWbRgpjNI/hOQjFS8= github.com/aws/aws-sdk-go-v2 v1.17.8/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.10 h1:dK82zF6kkPeCo8J1e+tGx4JdvDIQzj7ygIoLg8WMuGs= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.10/go.mod h1:VeTZetY5KRJLuD/7fkQXMU6Mw7H5m/KP2J5Iy9osMno= github.com/aws/aws-sdk-go-v2/config v1.18.21 h1:ENTXWKwE8b9YXgQCsruGLhvA9bhg+RqAsL9XEMEsa2c= github.com/aws/aws-sdk-go-v2/config v1.18.21/go.mod h1:+jPQiVPz1diRnjj6VGqWcLK6EzNmQ42l7J3OqGTLsSY= github.com/aws/aws-sdk-go-v2/credentials v1.13.20 h1:oZCEFcrMppP/CNiS8myzv9JgOzq2s0d3v3MXYil/mxQ= github.com/aws/aws-sdk-go-v2/credentials v1.13.20/go.mod h1:xtZnXErtbZ8YGXC3+8WfajpMBn5Ga/3ojZdxHq6iI8o= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.2 h1:jOzQAesnBFDmz93feqKnsTHsXrlwWORNZMFHMV+WLFU= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.2/go.mod h1:cDh1p6XkSGSwSRIArWRc6+UqAQ7x4alQ0QfpVR6f+co= github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.62 h1:LhVbe/UDWvBT/jp5LYAweFVH8s+DNtT07Qp2riWEovU= github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.62/go.mod h1:4xCuu1TSwhW5UH6WOdtS4/x/9UfMr2XplzKc86Ffj78= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.32 h1:dpbVNUjczQ8Ae3QKHbpHBpfvaVkRdesxpTOe9pTouhU= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.32/go.mod h1:RudqOgadTWdcS3t/erPQo24pcVEoYyqj/kKW5Vya21I= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.26 h1:QH2kOS3Ht7x+u0gHCh06CXL/h6G8LQJFpZfFBYBNboo= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.26/go.mod h1:vq86l7956VgFr0/FWQ2BWnK07QC3WYsepKzy33qqY5U= github.com/aws/aws-sdk-go-v2/internal/ini v1.3.33 h1:HbH1VjUgrCdLJ+4lnnuLI4iVNRvBbBELGaJ5f69ClA8= github.com/aws/aws-sdk-go-v2/internal/ini v1.3.33/go.mod h1:zG2FcwjQarWaqXSCGpgcr3RSjZ6dHGguZSppUL0XR7Q= github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.24 h1:zsg+5ouVLLbePknVZlUMm1ptwyQLkjjLMWnN+kVs5dA= github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.24/go.mod h1:+fFaIjycTmpV6hjmPTbyU9Kp5MI/lA+bbibcAtmlhYA= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.11 h1:y2+VQzC6Zh2ojtV2LoC0MNwHWc6qXv/j2vrQtlftkdA= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.11/go.mod h1:iV4q2hsqtNECrfmlXyord9u4zyuFEJX9eLgLpSPzWA8= github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.27 h1:qIw7Hg5eJEc1uSxg3hRwAthPAO7NeOd4dPxhaTi0yB0= github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.27/go.mod h1:Zz0kvhcSlu3NX4XJkaGgdjaa+u7a9LYuy8JKxA5v3RM= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.26 h1:uUt4XctZLhl9wBE1L8lobU3bVN8SNUP7T+olb0bWBO4= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.26/go.mod h1:Bd4C/4PkVGubtNe5iMXu5BNnaBi/9t/UsFspPt4ram8= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.14.1 h1:lRWp3bNu5wy0X3a8GS42JvZFlv++AKsMdzEnoiVJrkg= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.14.1/go.mod h1:VXBHSxdN46bsJrkniN68psSwbyBKsazQfU2yX/iSDso= github.com/aws/aws-sdk-go-v2/service/s3 v1.31.3 h1:MG+2UlhyBL3oCOoHbUQh+Sqr3elN0I5PBe0MtVh0xMg= github.com/aws/aws-sdk-go-v2/service/s3 v1.31.3/go.mod h1:aSl9/LJltSz1cVusiR/Mu8tvI4Sv/5w/WWrJmmkNii0= github.com/aws/aws-sdk-go-v2/service/sso v1.12.8 h1:5cb3D6xb006bPTqEfCNaEA6PPEfBXxxy4NNeX/44kGk= github.com/aws/aws-sdk-go-v2/service/sso v1.12.8/go.mod h1:GNIveDnP+aE3jujyUSH5aZ/rktsTM5EvtKnCqBZawdw= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.8 h1:NZaj0ngZMzsubWZbrEFSB4rgSQRbFq38Sd6KBxHuOIU= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.8/go.mod h1:44qFP1g7pfd+U+sQHLPalAPKnyfTZjJsYR4xIwsJy5o= github.com/aws/aws-sdk-go-v2/service/sts v1.18.9 h1:Qf1aWwnsNkyAoqDqmdM3nHwN78XQjec27LjM6b9vyfI= github.com/aws/aws-sdk-go-v2/service/sts v1.18.9/go.mod h1:yyW88BEPXA2fGFyI2KCcZC3dNpiT0CZAHaF+i656/tQ= github.com/aws/smithy-go v1.13.5 h1:hgz0X/DX0dGqTYpGALqXJoRKRj5oQ7150i5FdTePzO8= github.com/aws/smithy-go v1.13.5/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59/go.mod h1:q/89r3U2H7sSsE2t6Kca0lfwTK8JdoNGS/yzM/4iH5I= github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8= github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/blakesmith/ar v0.0.0-20190502131153-809d4375e1fb/go.mod h1:PkYb9DJNAwrSvRx5DYA+gUcOIgTGVMNkfSCbZM8cWpI= github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= github.com/bombsimon/wsl/v2 v2.0.0/go.mod h1:mf25kr/SqFEPhhcxW1+7pxzGlW+hIl/hYTKY95VwV8U= github.com/bombsimon/wsl/v2 v2.2.0/go.mod h1:Azh8c3XGEJl9LyX0/sFC+CKMc7Ssgua0g+6abzXN4Pg= github.com/bombsimon/wsl/v3 v3.0.0/go.mod h1:st10JtZYLE4D5sC7b8xV4zTKZwAQjCH/Hy2Pm1FNZIc= github.com/bombsimon/wsl/v3 v3.1.0/go.mod h1:st10JtZYLE4D5sC7b8xV4zTKZwAQjCH/Hy2Pm1FNZIc= github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g= github.com/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0BsqsP2LwDJ9aOkm/6J86V6lyAXCoQWGw3K50= github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/caarlos0/ctrlc v1.0.0/go.mod h1:CdXpj4rmq0q/1Eb44M9zi2nKB0QraNKuRGYGrrHhcQw= github.com/campoy/unique v0.0.0-20180121183637-88950e537e7e/go.mod h1:9IOqJGCPMSc6E5ydlp5NIonxObaeu/Iub/X03EKPVYo= github.com/cavaliercoder/go-cpio v0.0.0-20180626203310-925f9528c45e/go.mod h1:oDpT4efm8tSYHXV5tHSdRvBet/b/QzxZ+XyyPehvm3A= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/charmbracelet/bubbles v0.16.1 h1:6uzpAAaT9ZqKssntbvZMlksWHruQLNxg49H5WdeuYSY= github.com/charmbracelet/bubbles v0.16.1/go.mod h1:2QCp9LFlEsBQMvIYERr7Ww2H2bA7xen1idUDIzm/+Xc= github.com/charmbracelet/bubbletea v0.24.2 h1:uaQIKx9Ai6Gdh5zpTbGiWpytMU+CfsPp06RaW2cx/SY= github.com/charmbracelet/bubbletea v0.24.2/go.mod h1:XdrNrV4J8GiyshTtx3DNuYkR1FDaJmO3l2nejekbsgg= github.com/charmbracelet/harmonica v0.2.0 h1:8NxJWRWg/bzKqqEaaeFNipOu77YR5t8aSwG4pgaUBiQ= github.com/charmbracelet/harmonica v0.2.0/go.mod h1:KSri/1RMQOZLbw7AHqgcBycp8pgJnQMYYT8QZRqZ1Ao= github.com/charmbracelet/lipgloss v0.8.0 h1:IS00fk4XAHcf8uZKc3eHeMUTCxUH6NkaTrdyCQk84RU= github.com/charmbracelet/lipgloss v0.8.0/go.mod h1:p4eYUZZJ/0oXTuCQKFF8mqyKCz0ja6y+7DniDDw5KKU= github.com/checkpoint-restore/go-criu/v4 v4.1.0/go.mod h1:xUQBLp4RLc5zJtWY++yjOoMoB5lihDt7fai+75m+rGw= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/logex v1.2.0/go.mod h1:9+9sk7u7pGNWYMkh0hdiL++6OeibzJccyQU4p4MedaY= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/readline v1.5.0/go.mod h1:x22KAscuvRqlLoK9CsoYsmxoXZMMFVyOl86cAH8qUic= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/chzyer/test v0.0.0-20210722231415-061457976a23/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/cilium/ebpf v0.0.0-20200110133405-4032b1d8aae3/go.mod h1:MA5e5Lr8slmEg9bt0VpxxWqJlO4iwu3FBdHUzV7wQVg= github.com/cilium/ebpf v0.0.0-20200702112145-1c8d4c9ef775/go.mod h1:7cR51M8ViRLIdUjrmSXlK9pkrsDlLHbO8jiB8X8JnOc= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/circl v1.3.3 h1:fE/Qz0QdIGqeWfnwq0RE0R7MI51s0M2E4Ga9kq5AEMs= github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/codahale/hdrhistogram v0.0.0-20160425231609-f8ad88b59a58/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/codahale/rfc6979 v0.0.0-20141003034818-6a90f24967eb h1:EDmT6Q9Zs+SbUoc7Ik9EfrFqcylYqgPZ9ANSbTAntnE= github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko= github.com/containerd/cgroups v0.0.0-20200531161412-0dbf7f05ba59/go.mod h1:pA0z1pT8KYB3TCXK/ocprsh7MAkoW8bZVzPdih9snmM= github.com/containerd/cgroups v0.0.0-20200710171044-318312a37340/go.mod h1:s5q4SojHctfxANBDvMeIaIovkq29IP48TKAxnhYRxvo= github.com/containerd/cgroups v1.1.0 h1:v8rEWFl6EoqHB+swVNjVoCJE8o3jX7e8nqBGPLaDFBM= github.com/containerd/cgroups v1.1.0/go.mod h1:6ppBcbh/NOOUU+dMKrykgaBnK9lCIBxHqJDGwsa1mIw= github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= github.com/containerd/console v0.0.0-20191206165004-02ecf6a7291e/go.mod h1:8Pf4gM6VEbTNRIT26AyyU7hxdQU3MvAvxVI0sc00XBE= github.com/containerd/console v1.0.0/go.mod h1:8Pf4gM6VEbTNRIT26AyyU7hxdQU3MvAvxVI0sc00XBE= github.com/containerd/console v1.0.1/go.mod h1:XUsP6YE/mKtz6bxc+I8UiKKTP04qjQL4qcS3XoQ5xkw= github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 h1:q2hJAaP1k2wIvVRd/hEHD7lacgqrCPS+k8g1MndzfWY= github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81/go.mod h1:YynlIjWYF8myEu6sdkwKIvGQq+cOckRm6So2avqoYAk= github.com/containerd/containerd v1.3.0-beta.2.0.20190828155532-0293cbd26c69/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/containerd v1.3.0/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/containerd v1.3.2/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/containerd v1.4.0/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/containerd v1.4.1-0.20201117152358-0edc412565dc/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/containerd v1.7.2 h1:UF2gdONnxO8I6byZXDi5sXWiWvlW3D/sci7dTQimEJo= github.com/containerd/containerd v1.7.2/go.mod h1:afcz74+K10M/+cjGHIVQrCt3RAQhUSCAjJ9iMYhhkuI= github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= github.com/containerd/continuity v0.0.0-20200710164510-efbc4488d8fe/go.mod h1:cECdGN1O8G9bgKTlLhuPJimka6Xb/Gg7vYzCTNVxhvo= github.com/containerd/continuity v0.4.1 h1:wQnVrjIyQ8vhU2sgOiL5T07jo+ouqc2bnKsv5/EqGhU= github.com/containerd/continuity v0.4.1/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ/7o4JzpodfroQ= github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= github.com/containerd/fifo v0.0.0-20200410184934-f15a3290365b/go.mod h1:jPQ2IAeZRCYxpS/Cm1495vGFww6ecHmMk1YJH2Q5ln0= github.com/containerd/fifo v1.1.0 h1:4I2mbh5stb1u6ycIABlBw9zgtlK8viPI9QkQNRQEEmY= github.com/containerd/fifo v1.1.0/go.mod h1:bmC4NWMbXlt2EZ0Hc7Fx7QzTFxgPID13eH0Qu+MAb2o= github.com/containerd/fuse-overlayfs-snapshotter v1.0.6 h1:MWwG/UOQv6J2hvRgKGduhJn5yKZPl4ly+PWMhfPnMzU= github.com/containerd/fuse-overlayfs-snapshotter v1.0.6/go.mod h1:gfcR4++fMRl37UvYy4Kw6JrQIra1bFFQVVtWEp1oon4= github.com/containerd/go-cni v1.0.1/go.mod h1:+vUpYxKvAF72G9i1WoDOiPGRtQpqsNW/ZHtSlv++smU= github.com/containerd/go-cni v1.1.9 h1:ORi7P1dYzCwVM6XPN4n3CbkuOx/NZ2DOqy+SHRdo9rU= github.com/containerd/go-cni v1.1.9/go.mod h1:XYrZJ1d5W6E2VOvjffL3IZq0Dz6bsVlERHbekNK90PM= github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0= github.com/containerd/go-runc v0.0.0-20200220073739-7016d3ce2328/go.mod h1:PpyHrqVs8FTi9vpyHwPwiNEGaACDxT/N/pLcvMSRA9g= github.com/containerd/go-runc v0.0.0-20201020171139-16b287bc67d0/go.mod h1:cNU0ZbCgCQVZK4lgG3P+9tn9/PaJNmoDXPpoJhDR+Ok= github.com/containerd/go-runc v1.1.0 h1:OX4f+/i2y5sUT7LhmcJH7GYrjjhHa1QI4e8yO0gGleA= github.com/containerd/go-runc v1.1.0/go.mod h1:xJv2hFF7GvHtTJd9JqTS2UVxMkULUYw4JN5XAUZqH5U= github.com/containerd/nydus-snapshotter v0.8.2 h1:7SOrMU2YmLzfbsr5J7liMZJlNi5WT6vtIOxLGv+iz7E= github.com/containerd/nydus-snapshotter v0.8.2/go.mod h1:UJILTN5LVBRY+dt8BGJbp72Xy729hUZsOugObEI3/O8= github.com/containerd/stargz-snapshotter v0.0.0-20201027054423-3a04e4c2c116/go.mod h1:o59b3PCKVAf9jjiKtCc/9hLAd+5p/rfhBfm6aBcTEr4= github.com/containerd/stargz-snapshotter v0.14.3 h1:OTUVZoPSPs8mGgmQUE1dqw3WX/3nrsmsurW7UPLWl1U= github.com/containerd/stargz-snapshotter v0.14.3/go.mod h1:j2Ya4JeA5gMZJr8BchSkPjlcCEh++auAxp4nidPI6N0= github.com/containerd/stargz-snapshotter/estargz v0.14.3 h1:OqlDCK3ZVUO6C3B/5FSkDwbkEETK84kQgEeFwDC+62k= github.com/containerd/stargz-snapshotter/estargz v0.14.3/go.mod h1:KY//uOCIkSuNAHhJogcZtrNHdKrA99/FCCRjE3HD36o= github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= github.com/containerd/ttrpc v1.0.1/go.mod h1:UAxOpgT9ziI0gJrmKvgcZivgxOp8iFPSk8httJEt98Y= github.com/containerd/ttrpc v1.2.2 h1:9vqZr0pxwOF5koz6N0N3kJ0zDHokrcPxIR/ZR2YFtOs= github.com/containerd/ttrpc v1.2.2/go.mod h1:sIT6l32Ph/H9cvnJsfXM5drIVzTr5A2flTf1G5tYZak= github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc= github.com/containerd/typeurl v1.0.1/go.mod h1:TB1hUtrpaiO88KEK56ijojHS1+NeF0izUACaJW2mdXg= github.com/containerd/typeurl/v2 v2.1.1 h1:3Q4Pt7i8nYwy2KmQWIw2+1hTvwTE/6w9FqcttATPO/4= github.com/containerd/typeurl/v2 v2.1.1/go.mod h1:IDp2JFvbwZ31H8dQbEIY7sDl2L3o3HZj1hsSQlywkQ0= github.com/containernetworking/cni v0.8.0/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= github.com/containernetworking/cni v1.1.2 h1:wtRGZVv7olUHMOqouPpn3cXJWpJgM6+EUl31EQbXALQ= github.com/containernetworking/cni v1.1.2/go.mod h1:sDpYKmGVENF3s6uvMvGgldDWeG8dMxakj/u+i9ht9vw= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= github.com/coreos/go-systemd/v22 v22.4.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/dagger/graphql v0.0.0-20230919174923-21d038582a21 h1:6H/36Lk+mcSXxlbjjIMUYd4DR+aqCzeaRigK5dUe/a0= github.com/dagger/graphql v0.0.0-20230919174923-21d038582a21/go.mod h1:jxe8vuRdvEbdLR5nrc6F7gLPmPeJhGe2DbIgEok+pCA= github.com/dagger/graphql-go-tools v0.0.0-20231012004527-77189e400b6e h1:5fyK89J8og+XMW5JetgXzaxRhoI9UrS0BhrNskj4cuA= github.com/dagger/graphql-go-tools v0.0.0-20231012004527-77189e400b6e/go.mod h1:SXt7tSY8l+OVghRddofY+eDdv8EK82N0JlrrfrkqFEw= github.com/dave/jennifer v1.7.0 h1:uRbSBH9UTS64yXbh4FrMHfgfY762RD+C7bUPKODpSJE= github.com/dave/jennifer v1.7.0/go.mod h1:nXbxhEmQfOZhWml3D1cDK5M1FLnMSozpbFN/m3RmGZc= github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba/go.mod h1:dV8lFg6daOBZbT6/BDGIz6Y3WFGn8juu6G+CQ6LHtl0= github.com/devigned/tab v0.1.1/go.mod h1:XG9mPq0dFghrYvoBF3xdRrJzSTX1b7IQrvaL9mzjeJY= github.com/dgrijalva/jwt-go v0.0.0-20170104182250-a601269ab70c/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48 h1:fRzb/w+pyskVMQ+UbP35JkH8yB7MYb4q/qhBarqZE6g= github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA= github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8= github.com/dimchansky/utfbom v1.1.1 h1:vV6w1AhK4VMnhBno/TPVCoK9U/LP0PkLCS9tbxHdi/U= github.com/dimchansky/utfbom v1.1.1/go.mod h1:SxdoEBH5qIqFocHMyGOXVAybYJdr71b1Q/j0mACtrfE= github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/dlclark/regexp2 v1.4.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= github.com/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= github.com/dlclark/regexp2 v1.7.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= github.com/dlclark/regexp2 v1.9.0 h1:pTK/l/3qYIKaRXuHnEnIf7Y5NxfRPfpb7dis6/gdlVI= github.com/dlclark/regexp2 v1.9.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= github.com/dnaeon/go-vcr v1.1.0 h1:ReYa/UBrRyQdant9B4fNHGoCNKw6qh6P0fsdGmZpR7c= github.com/docker/cli v0.0.0-20190925022749-754388324470/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/cli v0.0.0-20191017083524-a8ff7f821017/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/cli v20.10.0-beta1.0.20201029214301-1d20b15adc38+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/cli v24.0.5+incompatible h1:WeBimjvS0eKdH4Ygx+ihVq1Q++xg36M/rMi4aXAvodc= github.com/docker/cli v24.0.5+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/distribution v0.0.0-20190905152932-14b96e55d84c/go.mod h1:0+TTO4EOBfRPhZXAeF1Vu+W3hHZ8eLp8PgKVZlcvtFY= github.com/docker/distribution v2.6.0-rc.1.0.20180327202408-83389a148052+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v0.0.0-20200511152416-a93e9eb0e95c/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v1.4.2-0.20180531152204-71cd53e4a197/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v1.4.2-0.20190924003213-a8608b5b67c7/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v17.12.0-ce-rc1.0.20200730172259-9f28837c1d93+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v20.10.0-beta1.0.20201110211921-af34b94a78a1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v24.0.0-rc.2.0.20230905130451-032797ea4bcb+incompatible h1:1UUPAB9PAPUbM10+qIKPL5tKZ+VAddWgbQUf+x1QBfI= github.com/docker/docker v24.0.0-rc.2.0.20230905130451-032797ea4bcb+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker-credential-helpers v0.6.3/go.mod h1:WRaJzqw3CTB9bk10avuGsjVBZsD05qeibJ1/TYlvc0Y= github.com/docker/docker-credential-helpers v0.7.0 h1:xtCHsjxogADNZcdv1pKUHXryefjlVRqWqIhk/uXJp0A= github.com/docker/docker-credential-helpers v0.7.0/go.mod h1:rETQfLdHNT3foU5kuNkFR1R1V12OJRRO5lzt2D1b5X0= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c h1:+pKlWGMw7gf6bQ+oDZB4KHQFypsfjYlq/C4rfL7D3g8= github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= github.com/docker/go-metrics v0.0.0-20180209012529-399ea8c73916/go.mod h1:/u0gXw0Gay3ceNrsHubL3BtdOL2fHf93USgMTe0W5dI= github.com/docker/go-metrics v0.0.1 h1:AgB/0SvBxihN0X8OR4SjsblXkbMvalQ8cjmtKQ2rQV8= github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw= github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/libnetwork v0.8.0-dev.2.0.20200917202933-d0951081b35f/go.mod h1:93m0aTqz6z+g32wla4l4WxTrdtvBRmVzYRkYvasA5Z8= github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dop251/goja v0.0.0-20211022113120-dc8c55024d06/go.mod h1:R9ET47fwRVRPZnOGvHxxhuZcbrMCuiqOz3Rlrh4KSnk= github.com/dop251/goja v0.0.0-20230402114112-623f9dda9079 h1:xkbJGxVnk5sM8/LXeTKaBOfAZrI+iqvIPyH8oK1c6CQ= github.com/dop251/goja v0.0.0-20230402114112-623f9dda9079/go.mod h1:QMWlm50DNe14hD7t24KEqZuUdC9sOTy8W6XbCU1mlw4= github.com/dop251/goja_nodejs v0.0.0-20210225215109-d91c329300e7/go.mod h1:hn7BA7c8pLvoGndExHudxTDKZ84Pyvv+90pbBjbTz0Y= github.com/dop251/goja_nodejs v0.0.0-20211022123610-8dd9abb0616d/go.mod h1:DngW8aVqWbuLRMHItjPUyqdj+HWPvnQe8V8y1nDpIbM= github.com/dschmidt/go-layerfs v0.1.0 h1:jE6aHDfjNzS/31DS48th6EkmELwTa1Uf+aO4jRkBs3U= github.com/dschmidt/go-layerfs v0.1.0/go.mod h1:m62aff0hn23Q/tQBRiNSeLD7EUuimDvsuCvCpzBr3Gw= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a h1:mATvB/9r/3gvcejNsXKSkQ6lcIaNec2nyfOdlTBR2lU= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA= github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4= github.com/fatih/structtag v1.2.0/go.mod h1:mBJUNpUnHmRKrKlQQlmCrh5PuhftFbNv8Ys4/aAZl94= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/fogleman/ease v0.0.0-20170301025033-8da417bf1776 h1:VRIbnDWRmAh5yBdz+J6yFMF5vso1It6vn+WmM/5l7MA= github.com/fogleman/ease v0.0.0-20170301025033-8da417bf1776/go.mod h1:9wvnDu3YOfxzWM9Cst40msBF1C2UdQgDv962oTxSuMs= github.com/fortytw2/leaktest v1.2.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/gliderlabs/ssh v0.3.5 h1:OcaySEmAQJgyYcArR+gGGTHCyE7nvhEMTlYY+Dp8CpY= github.com/go-critic/go-critic v0.4.1/go.mod h1:7/14rZGnZbY6E38VEGk2kVhoq6itzc1E68facVDK23g= github.com/go-critic/go-critic v0.4.3/go.mod h1:j4O3D4RoIwRqlZw5jJpx0BNfXWWbpcJoKu5cYSe4YmQ= github.com/go-fonts/liberation v0.2.0 h1:jAkAWJP4S+OsrPLZM4/eC9iW7CtHy+HBXrEwZXWo5VM= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic= github.com/go-git/go-billy/v5 v5.5.0 h1:yEY4yhzCDuMGSv83oGxiBotRzhwhNr8VZyphhiu+mTU= github.com/go-git/go-billy/v5 v5.5.0/go.mod h1:hmexnoNsr2SJU1Ju67OaNz5ASJY3+sHgFRpCtpDCKow= github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20230305113008-0c11038e723f h1:Pz0DHeFij3XFhoBRGUDPzSJ+w2UcK5/0JvF8DRI58r8= github.com/go-git/go-git/v5 v5.9.0 h1:cD9SFA7sHVRdJ7AYck1ZaAa/yeuBvGPxwXDL8cxrObY= github.com/go-git/go-git/v5 v5.9.0/go.mod h1:RKIqga24sWdMGZF+1Ekv9kylsDz6LzdTSI2s/OsZWE0= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-ini/ini v1.25.4/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-latex/latex v0.0.0-20210823091927-c0d11ff05a81 h1:6zl3BbBhdnMkpSj2YY30qV3gDcVBGtFgVsV3+/i+mKQ= github.com/go-lintpack/lintpack v0.5.2/go.mod h1:NwZuYi2nUHho8XEIZ6SIxihrnPoqBTDqfpXvXAN0sXM= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-pdf/fpdf v0.6.0 h1:MlgtGIfsdMEEQJr2le6b/HNr1ZlQwxyWr77r2aj2U/8= github.com/go-sourcemap/sourcemap v2.1.3+incompatible h1:W1iEw64niKVGogNgBN3ePyLFfuisuzeidWPMPWmECqU= github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-toolsmith/astcast v1.0.0/go.mod h1:mt2OdQTeAQcY4DQgPSArJjHCcOwlX+Wl/kwN+LbLGQ4= github.com/go-toolsmith/astcopy v1.0.0/go.mod h1:vrgyG+5Bxrnz4MZWPF+pI4R8h3qKRjjyvV/DSez4WVQ= github.com/go-toolsmith/astequal v0.0.0-20180903214952-dcb477bfacd6/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY= github.com/go-toolsmith/astequal v1.0.0/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY= github.com/go-toolsmith/astfmt v0.0.0-20180903215011-8f8ee99c3086/go.mod h1:mP93XdblcopXwlyN4X4uodxXQhldPGZbcEJIimQHrkg= github.com/go-toolsmith/astfmt v1.0.0/go.mod h1:cnWmsOAuq4jJY6Ct5YWlVLmcmLMn1JUPuQIHCY7CJDw= github.com/go-toolsmith/astinfo v0.0.0-20180906194353-9809ff7efb21/go.mod h1:dDStQCHtmZpYOmjRP/8gHHnCCch3Zz3oEgCdZVdtweU= github.com/go-toolsmith/astp v0.0.0-20180903215135-0af7e3c24f30/go.mod h1:SV2ur98SGypH1UjcPpCatrV5hPazG6+IfNHbkDXBRrk= github.com/go-toolsmith/astp v1.0.0/go.mod h1:RSyrtpVlfTFGDYRbrjyWP1pYu//tSFcvdYrA8meBmLI= github.com/go-toolsmith/pkgload v0.0.0-20181119091011-e9e65178eee8/go.mod h1:WoMrjiy4zvdS+Bg6z9jZH82QXwkcgCBX6nOfnmdaHks= github.com/go-toolsmith/pkgload v1.0.0/go.mod h1:5eFArkbO80v7Z0kdngIxsRXRMTaX4Ilcwuh3clNrQJc= github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8= github.com/go-toolsmith/typep v1.0.0/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= github.com/go-toolsmith/typep v1.0.2/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gofrs/flock v0.0.0-20190320160742-5135e617513b/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gofrs/flock v0.7.3/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.2.0/go.mod h1:Njal3psf3qN6dwBtQfUmBZh2ybovJ0tlu3o/AC7HYjU= github.com/gogo/googleapis v1.3.2/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/gogo/status v1.0.3/go.mod h1:SavQ51ycCLnc7dGyJxp8YAmudx8xqiVrRf+6IXRsugc= github.com/golang-jwt/jwt/v4 v4.1.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang-jwt/jwt/v4 v4.4.2 h1:rcc4lwaZgFMCZ5jxF9ABolDcIHdBytAFgqFPbSJQAYs= github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.1.0 h1:/d3pCKDPWNnvIWe0vVUpNP32qc8U3PDVxySP/y360qE= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2/go.mod h1:k9Qvh+8juN+UKMCS/3jFtGICgW8O96FVaZsaxdzDkR4= github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a/go.mod h1:ryS0uhF+x9jgbj/N71xsEqODy9BN81/GonCZiOzirOk= github.com/golangci/errcheck v0.0.0-20181223084120-ef45e06d44b6/go.mod h1:DbHgvLiFKX1Sh2T1w8Q/h4NAI8MHIpzCdnBUDTXU3I0= github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613/go.mod h1:SyvUF2NxV+sN8upjjeVYr5W7tyxaT1JVtvhKhOn2ii8= github.com/golangci/goconst v0.0.0-20180610141641-041c5f2b40f3/go.mod h1:JXrF4TWy4tXYn62/9x8Wm/K/dm06p8tCKwFRDPZG/1o= github.com/golangci/gocyclo v0.0.0-20180528134321-2becd97e67ee/go.mod h1:ozx7R9SIwqmqf5pRP90DhR2Oay2UIjGuKheCBCNwAYU= github.com/golangci/gocyclo v0.0.0-20180528144436-0a533e8fa43d/go.mod h1:ozx7R9SIwqmqf5pRP90DhR2Oay2UIjGuKheCBCNwAYU= github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a/go.mod h1:9qCChq59u/eW8im404Q2WWTrnBUQKjpNYKMbU4M7EFU= github.com/golangci/golangci-lint v1.23.7/go.mod h1:g/38bxfhp4rI7zeWSxcdIeHTQGS58TCak8FYcyCmavQ= github.com/golangci/golangci-lint v1.27.0/go.mod h1:+eZALfxIuthdrHPtfM7w/R3POJLjHDfJJw8XZl9xOng= github.com/golangci/ineffassign v0.0.0-20190609212857-42439a7714cc/go.mod h1:e5tpTHCfVze+7EpLEozzMB3eafxo2KT5veNg1k6byQU= github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0/go.mod h1:66R6K6P6VWk9I95jvqGxkqJxVWGFy9XlDwLwVz1RCFg= github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca/go.mod h1:tvlJhZqDe4LMs4ZHD0oMUlt9G2LWuDGoisJTBzLMV9o= github.com/golangci/misspell v0.0.0-20180809174111-950f5d19e770/go.mod h1:dEbvlSfYbMQDtrpRMQU675gSDLDNa8sCPPChZ7PhiVA= github.com/golangci/misspell v0.3.5/go.mod h1:dEbvlSfYbMQDtrpRMQU675gSDLDNa8sCPPChZ7PhiVA= github.com/golangci/prealloc v0.0.0-20180630174525-215b22d4de21/go.mod h1:tf5+bzsHdTM0bsB7+8mt0GUMvjCgwLpTapNZHU8AajI= github.com/golangci/revgrep v0.0.0-20180526074752-d9c87f5ffaf0/go.mod h1:qOQCunEYvmd/TLamH+7LlVccLvUH5kZNhbCgTHoBbp4= github.com/golangci/revgrep v0.0.0-20180812185044-276a5c0a1039/go.mod h1:qOQCunEYvmd/TLamH+7LlVccLvUH5kZNhbCgTHoBbp4= github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4/go.mod h1:Izgrg8RkN3rCIMLGE9CyYmU9pY2Jer6DgANEnZ/L/cQ= github.com/google/btree v0.0.0-20180124185431-e89373fe6b4a/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/crfs v0.0.0-20191108021818-71d77da419c9/go.mod h1:etGhoOqfwPkooV6aqoX3eBGQOJblqdoc9XvWOeuxpPw= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-containerregistry v0.0.0-20191010200024-a3d713f9b7f8/go.mod h1:KyKXa9ciM8+lgMXwOVsXi7UxGrsf9mM61Mzs+xKUrKE= github.com/google/go-containerregistry v0.1.2/go.mod h1:GPivBPgdAyd2SU+vf6EpsgOtWDuPqjW0hJZt4rNdTZ4= github.com/google/go-containerregistry v0.15.2 h1:MMkSh+tjSdnmJZO7ljvEqV1DjfekB6VUEAZgy3a+TQE= github.com/google/go-containerregistry v0.15.2/go.mod h1:wWK+LnOv4jXMM23IT/F1wdYftGWGr47Is8CG+pmHK1Q= github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= github.com/google/go-github/v28 v28.1.1/go.mod h1:bsqJWQX05omyWVmc00nEUql9mhQyv38lDZ8kPZcQVoM= github.com/google/go-github/v50 v50.2.0 h1:j2FyongEHlO9nxXLc+LP3wuBSVU9mVxfpdYUexMpIfk= github.com/google/go-github/v50 v50.2.0/go.mod h1:VBY8FB6yPIjrtKhozXv4FQupxKLS6H4m6xFZlT43q8Q= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/go-replayers/grpcreplay v0.1.0/go.mod h1:8Ig2Idjpr6gifRd6pNVggX6TC1Zw6Jx74AKp7QNH2QE= github.com/google/go-replayers/httpreplay v0.1.0/go.mod h1:YKZViNhiGgqdBlUbI2MwGpq4pXxNmhJLPHQ7cv2b5no= github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian v2.1.1-0.20190517191504-25dcb96d9e51+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20230207041349-798e818bf904/go.mod h1:uglQLonpP8qtYCYyzA+8c/9qtqgA3qsXGYqCPKARAFg= github.com/google/pprof v0.0.0-20230406165453-00490a63f317 h1:hFhpt7CTmR3DX+b4R19ydQFtofxT0Sv3QsKNMVQYTMQ= github.com/google/pprof v0.0.0-20230406165453-00490a63f317/go.mod h1:79YE0hCXdHag9sBkw2o+N/YnZtTkXi0UT9Nnixa5eYk= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/rpmpack v0.0.0-20191226140753-aa36bfddb3a0/go.mod h1:RaTPr0KUf2K7fnZYLNDrr8rxAamWs3iNywJLtQ2AzBg= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/subcommands v1.0.1/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/wire v0.3.0/go.mod h1:i1DMg/Lu8Sz5yYl25iOdmc5CT5qusaa+zmRWs16741s= github.com/google/wire v0.4.0/go.mod h1:ngWDr9Qvq3yZA10YrxfyGELY/AFWGVpy9c1LTRi1EoU= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/gax-go v2.0.0+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= github.com/googleapis/gax-go v2.0.2+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.2.2/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= github.com/gookit/color v1.2.4/go.mod h1:AhIE+pS6D4Ql0SQWbBeXPHw7gY0/sjHoA4s/n1KB7xg= github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/goreleaser/goreleaser v0.136.0/go.mod h1:wiKrPUeSNh6Wu8nUHxZydSOVQ/OZvOaO7DTtFqie904= github.com/goreleaser/nfpm v1.2.1/go.mod h1:TtWrABZozuLOttX2uDlYyECfQX7x5XYkVxhjYcR6G9w= github.com/goreleaser/nfpm v1.3.0/go.mod h1:w0p7Kc9TAUgWMyrub63ex3M2Mgw88M4GZXoTq5UCb40= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v0.0.0-20150720190736-60c7bfde3e33/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gostaticanalysis/analysisutil v0.0.0-20190318220348-4088753ea4d3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= github.com/gostaticanalysis/analysisutil v0.0.3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= github.com/gotestyourself/gotestyourself v2.2.0+incompatible/go.mod h1:zZKM6oeNM8k+FRljX1mnzVYeS8wiGgQyvST1/GafPbY= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.2.0/go.mod h1:mJzapYve32yjrKlk9GbyCZHuPgZsrbyIbyKhSzOpg6s= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.5.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= github.com/grpc-ecosystem/grpc-gateway v1.6.2/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= github.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.2/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms= github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg= github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw= github.com/hanwen/go-fuse v1.0.0/go.mod h1:unqXarDXqzAk0rt98O2tVndEPIpUgLD9+rwFisZH3Ok= github.com/hanwen/go-fuse/v2 v2.0.3/go.mod h1:0EQM6aH2ctVpvZ6a+onrQ/vaykxh2GH7hy3e13vzTUY= github.com/hanwen/go-fuse/v2 v2.2.0 h1:jo5QZYmBLNcl9ovypWaQ5yXMSSV+Ch68xoC3rtZvvBM= github.com/hanwen/go-fuse/v2 v2.2.0/go.mod h1:B1nGE/6RBFyBRC1RRnf23UpwCdyJ31eukw34oAKukAc= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= github.com/hashicorp/go-hclog v1.2.0 h1:La19f8d7WIlm4ogzNHB0JGqs5AUDAZ2UfCY4sJXcJdM= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-retryablehttp v0.6.4/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= github.com/hashicorp/go-retryablehttp v0.6.6/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= github.com/hashicorp/go-retryablehttp v0.7.2 h1:AcYqCvkpalPnPF2pn0KamgwamS42TqUDDYFRKq/RAd0= github.com/hashicorp/go-retryablehttp v0.7.2/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hashicorp/uuid v0.0.0-20160311170451-ebb0a03e909c/go.mod h1:fHzc09UnyJyqyW+bFuq864eh+wC7dj65aXmXLRe5to0= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20220319035150-800ac71e25c2/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w= github.com/icholy/replace v0.6.0 h1:EBiD2pGqZIOJAbEaf/5GVRaD/Pmbb4n+K3LrBdXd4dw= github.com/icholy/replace v0.6.0/go.mod h1:zzi8pxElj2t/5wHHHYmH45D+KxytX/t4w3ClY5nlK+g= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.9/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/in-toto/in-toto-golang v0.5.0 h1:hb8bgwr0M2hGdDsLjkJ3ZqJ8JFLL/tgYdAxF/XEFBbY= github.com/in-toto/in-toto-golang v0.5.0/go.mod h1:/Rq0IZHLV7Ku5gielPT4wPHJfH1GdHMCq8+WPxw8/BE= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/ishidawataru/sctp v0.0.0-20191218070446-00ab2ac2db07/go.mod h1:co9pwDoBCm1kGxawmb4sPq0cSIOOWNPT4KnHotMP1Zg= github.com/jackpal/gateway v1.0.7 h1:7tIFeCGmpyrMx9qvT0EgYUi7cxVW48a0mMvnIL17bPM= github.com/jackpal/gateway v1.0.7/go.mod h1:aRcO0UFKt+MgIZmRmvOmnejdDT4Y1DNiNOsSd1AcIbA= github.com/jaguilar/vt100 v0.0.0-20150826170717-2703a27b14ea/go.mod h1:QMdK4dGB3YhEW2BmA1wgGpPYI3HZy/5gD705PXKUVSg= github.com/jarcoal/httpmock v1.0.5/go.mod h1:ATjnClrvW/3tijVmpL/va5Z3aAyGvqU3gCT8nX0Txik= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU= github.com/jingyugao/rowserrcheck v0.0.0-20191204022205-72ab7603b68a/go.mod h1:xRskid8CManxVta/ALEhJha/pweKBaVG6fWgc0yH25s= github.com/jirfag/go-printf-func-name v0.0.0-20191110105641-45db9963cdd3/go.mod h1:HEWGJkRDzjJY2sqdDwxccsGicWEf9BQOZsq2tV+xzM0= github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af/go.mod h1:HEWGJkRDzjJY2sqdDwxccsGicWEf9BQOZsq2tV+xzM0= github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jmoiron/sqlx v1.2.1-0.20190826204134-d7d95172beb5/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= github.com/joefitzgerald/rainbow-reporter v0.1.0/go.mod h1:481CNgqmVHQZzdIbN52CupLJyoVwB10FQ/IQlF1pdL8= github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jonboulle/clockwork v0.4.0 h1:p4Cf1aMWXnXAUh8lVfewRBx1zaTSYKrKMF2g3ST4RZ4= github.com/jonboulle/clockwork v0.4.0/go.mod h1:xgRqUGwRcjKCO1vbZUEtSLrqKoPSsUpK7fnezOII0kc= github.com/jpillora/backoff v0.0.0-20180909062703-3050d21c67d7/go.mod h1:2iMrUgbbvHEiQClaW2NsSzMyGHqN+rDFqY705q49KG0= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v0.0.0-20180701071628-ab8a2e0c74be/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/juju/ansiterm v1.0.0 h1:gmMvnZRq7JZJx6jkfSq9/+2LMrVEwGwt7UR6G+lmDEg= github.com/juju/ansiterm v1.0.0/go.mod h1:PyXUpnI3olx3bsPcHt98FGPX/KCFZ1Fi+hw1XLI6384= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/jung-kurt/gofpdf v1.0.0/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/jung-kurt/gofpdf v1.16.2 h1:jgbatWHfRlPYiK85qgevsZTHviWXKwB1TTiKdz5PtRc= github.com/jung-kurt/gofpdf v1.16.2/go.mod h1:1hl7y57EsiPAkLbOwzpzqgx1A30nQCk/YmFV8S2vmK0= github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.16.5 h1:IFV2oUNUzZaz+XyusxpLzpzS8Pt5rh0Z16For/djlyI= github.com/klauspost/compress v1.16.5/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/klauspost/cpuid v0.0.0-20180405133222-e7e905edc00e/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBFYa4= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/koron-go/prefixw v1.0.0 h1:p7OC1ffZ/z+Miz0j/Ddt4fVYr8g4W9BKWkViAZ+1LmI= github.com/koron-go/prefixw v1.0.0/go.mod h1:WZvD0yrbCrkJD23tq03BhCu1ucn5ZenktcXt39QbPyk= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.1.1/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/logrusorgru/aurora v0.0.0-20181002194514-a7b3b318ed4e/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= github.com/lunixbochs/vtclean v1.0.0 h1:xu2sLAri4lGiovBDQKxl5mrXyESr3gUr5m5SM5+LVb8= github.com/lunixbochs/vtclean v1.0.0/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI= github.com/mackerelio/go-osstat v0.2.4 h1:qxGbdPkFo65PXOb/F/nhDKpF2nGmGaCFDLXoZjJTtUs= github.com/mackerelio/go-osstat v0.2.4/go.mod h1:Zy+qzGdZs3A9cuIqmgbJvwbmLQH9dJvtio5ZjJTbdlQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= github.com/maratori/testpackage v1.0.1/go.mod h1:ddKdw+XG0Phzhx8BFDTKgpWP4i7MpApTE5fXSKAqwDU= github.com/marstr/guid v1.1.0/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho= github.com/matoous/godox v0.0.0-20190911065817-5d6d842e92eb/go.mod h1:1BELzlh859Sh1c6+90blK8lbYy0kwQf1bYlBhBysy1s= github.com/matryer/is v1.2.0 h1:92UTHpy8CDwaJ08GqLDzhhuixiBUUD1p3AU6PHddz4A= github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.10/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= github.com/mattn/go-ieproxy v0.0.1/go.mod h1:pYabZ6IHcRpFh7vIaLfK7rdcWgFEb3SFJ6/gNWuh88E= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-localereader v0.0.1 h1:ygSAOl7ZXTx4RdPYinUpg6W99U8jWvWi9Ye2JC/oIi4= github.com/mattn/go-localereader v0.0.1/go.mod h1:8fBrzywKY7BI3czFoHkuzRoWE9C+EiG4R1k4Cjx5p88= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-shellwords v1.0.10/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y= github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-zglob v0.0.1/go.mod h1:9fxibJccNxU2cnpIKLRRFA7zX7qhkJIQWBb449FYHOo= github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/maxbrunsfeld/counterfeiter/v6 v6.2.2/go.mod h1:eD9eIE7cdwcMi9rYluz88Jz2VyhSmden33/aXg4oVIY= github.com/mazznoer/csscolorparser v0.1.3 h1:vug4zh6loQxAUxfU1DZEu70gTPufDPspamZlHAkKcxE= github.com/mazznoer/csscolorparser v0.1.3/go.mod h1:Aj22+L/rYN/Y6bj3bYqO3N6g1dtdHtGfQ32xZ5PJQic= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-ps v0.0.0-20190716172923-621e5597135b/go.mod h1:r1VsdOzOPt1ZSrGZWFoNhsAedKnEd6r9Np1+5blZCWk= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= github.com/mitchellh/hashstructure v1.0.0/go.mod h1:QjSHrPWS+BGUVBYkbTZWEnOh3G1DutKwClXU/ABz6AQ= github.com/mitchellh/hashstructure/v2 v2.0.2 h1:vGKWl0YJqUNxE8d+h8f6NJLcCJrgbhC4NcD46KavDd4= github.com/mitchellh/hashstructure/v2 v2.0.2/go.mod h1:MG3aRVU/N29oo/V/IhBX8GR/zz4kQkprJgF2EVszyDE= github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.3.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQZAeMln+1tSwduZz7+Af5oFlKirV/MSYes2A= github.com/moby/buildkit v0.8.1/go.mod h1:/kyU1hKy/aYCuP39GZA9MaKioovHku57N6cqlKZIaiQ= github.com/moby/buildkit v0.13.0-beta1.0.20231011161957-86e25b3ad8c2 h1:tZXkMdj5mkYi92esqc8EtNuPePwhLKotK4w/CFpSZAM= github.com/moby/buildkit v0.13.0-beta1.0.20231011161957-86e25b3ad8c2/go.mod h1:oSHnUZH7sNtAFLyeN1syf46SuzMThKsCQaioNEqJVUk= github.com/moby/locker v1.0.1 h1:fOXqR41zeveg4fFODix+1Ch4mj/gT0NE1XJbp/epuBg= github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc= github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= github.com/moby/sys/mount v0.1.0/go.mod h1:FVQFLDRWwyBjDTBNQXDlWnSFREqOo3OKX9aqhmeoo74= github.com/moby/sys/mount v0.1.1/go.mod h1:FVQFLDRWwyBjDTBNQXDlWnSFREqOo3OKX9aqhmeoo74= github.com/moby/sys/mount v0.3.3 h1:fX1SVkXFJ47XWDoeFW4Sq7PdQJnV2QIDZAqjNqgEjUs= github.com/moby/sys/mount v0.3.3/go.mod h1:PBaEorSNTLG5t/+4EgukEQVlAvVEc6ZjTySwKdqp5K0= github.com/moby/sys/mountinfo v0.1.0/go.mod h1:w2t2Avltqx8vE7gX5l+QiBKxODu2TX0+Syr3h52Tw4o= github.com/moby/sys/mountinfo v0.1.3/go.mod h1:w2t2Avltqx8vE7gX5l+QiBKxODu2TX0+Syr3h52Tw4o= github.com/moby/sys/mountinfo v0.4.0/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= github.com/moby/sys/mountinfo v0.6.2 h1:BzJjoreD5BMFNmD9Rus6gdd1pLuecOFPt8wC+Vygl78= github.com/moby/sys/mountinfo v0.6.2/go.mod h1:IJb6JQeOklcdMU9F5xQ8ZALD+CUr5VlGpwtX+VE0rpI= github.com/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc= github.com/moby/sys/sequential v0.5.0/go.mod h1:tH2cOOs5V9MlPiXcQzRC+eEyab644PWKGRYaaV5ZZlo= github.com/moby/sys/signal v0.7.0 h1:25RW3d5TnQEoKvRbEKUGay6DCQ46IxAVTT9CUMgmsSI= github.com/moby/sys/signal v0.7.0/go.mod h1:GQ6ObYZfqacOwTtlXvcmh9A26dVRul/hbOZn88Kg8Tg= github.com/moby/term v0.0.0-20200915141129-7f0af18e79f2/go.mod h1:TjQg8pa4iejrUrjiz0MCtMV38jdMNW4doKSiBrEvCQQ= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180320133207-05fbef0ca5da/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/mozilla/tls-observatory v0.0.0-20190404164649-a3c1b6cfecfd/go.mod h1:SrKMQvPiws7F7iqYp8/TX+IhxCYhzr6N/1yb8cwHsGk= github.com/mozilla/tls-observatory v0.0.0-20200317151703-4fa42e1c2dee/go.mod h1:SrKMQvPiws7F7iqYp8/TX+IhxCYhzr6N/1yb8cwHsGk= github.com/mrunalp/fileutils v0.0.0-20200520151820-abd8a0e76976/go.mod h1:x8F1gnqOkIEiO4rqoeEEEqQbo7HjGMTvyoq3gej4iT0= github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 h1:ZK8zHtRHOkbHy6Mmr5D264iyp3TiX5OmNcI5cIARiQI= github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6/go.mod h1:CJlz5H+gyd6CUWT45Oy4q24RdLyn7Md9Vj2/ldJBSIo= github.com/muesli/cancelreader v0.2.2 h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELUXHmA= github.com/muesli/cancelreader v0.2.2/go.mod h1:3XuTXfFS2VjM+HTLZY9Ak0l6eUKfijIfMUZ4EgX0QYo= github.com/muesli/reflow v0.3.0 h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s= github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKtnHY/8= github.com/muesli/termenv v0.15.2 h1:GohcuySI0QmI3wN8Ok9PtKGkgkFIk7y6Vpb5PvrY+Wo= github.com/muesli/termenv v0.15.2/go.mod h1:Epx+iuz8sNs7mNKhxzH4fWXGNpZwUaJKRS1noLXviQ8= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/nakabonne/nestif v0.3.0/go.mod h1:dI314BppzXjJ4HsCnbo7XzrJHPszZsjnk5wEBSYHI2c= github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d/go.mod h1:o96djdrsSGy3AWPyBgZMAGfxZNfgntdJG+11KU4QvbU= github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo/v2 v2.1.3 h1:e/3Cwtogj0HA+25nMP1jCMDIf8RtRYbGwGGuBIFztkc= github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.8.1/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.0.0/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/image-spec v1.1.0-rc3 h1:fzg1mXZFj8YdPeNkRXMg+zb88BFV0Ys52cJydRwBkb8= github.com/opencontainers/image-spec v1.1.0-rc3/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8= github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/opencontainers/runc v1.0.0-rc10/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/opencontainers/runc v1.0.0-rc92/go.mod h1:X1zlU4p7wOlX4+WRCz+hvlRv8phdL7UqbYD+vQwNMmE= github.com/opencontainers/runc v1.1.9 h1:XR0VIHTGce5eWPkaPesqTBrhW2yAcaraWfsEalNwQLM= github.com/opencontainers/runc v1.1.9/go.mod h1:CbUumNnWCuTGFukNXahoo/RFBZvDAgRh/smNYNOhA50= github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.0.1/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.0.3-0.20200728170252-4d89ac9fbff6/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.1.0-rc.2 h1:ucBtEms2tamYYW/SvGpvq9yUN0NEVL6oyLEwDcTSrk8= github.com/opencontainers/runtime-spec v1.1.0-rc.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39/go.mod h1:r3f7wjNzSs2extwzU3Y+6pKfobzPh+kKFJ3ofN+3nfs= github.com/opencontainers/selinux v1.6.0/go.mod h1:VVGKuOLlE7v4PJyT6h7mNWvq1rzqiriPsEqVhc+svHE= github.com/opencontainers/selinux v1.11.0 h1:+5Zbo97w3Lbmb3PeqQtpmTkMwsW5nRI3YaLpt7tQ7oU= github.com/opencontainers/selinux v1.11.0/go.mod h1:E5dMC3VPuVvVHDYmi78qvhJp8+M586T4DlDRYpFkyec= github.com/opentracing-contrib/go-grpc v0.0.0-20180928155321-4b5a12d3ff02/go.mod h1:JNdpVEzCpXBgIiv4ds+TzhN1hrtxq6ClLrTlT9OQRSc= github.com/opentracing-contrib/go-stdlib v0.0.0-20190519235532-cf7a6c988dc9/go.mod h1:PLldrQSroqzH70Xl+1DQcGnefIbqsKR7UDaiux3zV+w= github.com/opentracing-contrib/go-stdlib v1.0.0/go.mod h1:qtI1ogk+2JhVPIXVc6q+NHziSmy2W5GbdQZFUHADCBU= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= github.com/openzipkin/zipkin-go v0.1.3/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= github.com/package-url/packageurl-go v0.1.1-0.20220428063043-89078438f170 h1:DiLBVp4DAcZlBVBEtJpNWZpZVq0AEeCY7Hqk8URVs4o= github.com/package-url/packageurl-go v0.1.1-0.20220428063043-89078438f170/go.mod h1:uQd4a7Rh3ZsVg5j0lNyAfyxIeGde9yrlhjF78GzeW0c= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.8.0/go.mod h1:D6yutnOGMveHEPV7VQOuvI/gXY61bv+9bAOTRnLElKs= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d/go.mod h1:3OzsM7FXDQlpCiw2j81fOmAwQLnZnLGXVKUzeKQXIAw= github.com/phpdave11/gofpdi v1.0.7/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1-0.20171018195549-f15c970de5b7/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.5.0 h1:042Buzk+NhDI+DeSAA62RwJL8VAuZUMQZUjCsRz1Mug= github.com/pkg/profile v1.5.0/go.mod h1:qBsxPvzyUincmltOk6iyRVxHYg4adc0OFOv72ZdLa18= github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/prometheus/client_golang v0.0.0-20180209125602-c332b6f63c06/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= github.com/prometheus/common v0.0.0-20180110214958-89604d197083/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM= github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= github.com/prometheus/exporter-toolkit v0.8.2/go.mod h1:00shzmJL7KxcsabLWcONwpyNEuWhREOnFqZW7vadFS0= github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.0-20190522114515-bc1a522cf7b1/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/psanford/memfs v0.0.0-20230130182539-4dbf7e3e865e h1:51xcRlSMBU5rhM9KahnJGfEsBPVPz3182TgFRowA8yY= github.com/psanford/memfs v0.0.0-20230130182539-4dbf7e3e865e/go.mod h1:tcaRap0jS3eifrEEllL6ZMd9dg8IlDpi2S1oARrQ+NI= github.com/quasilyte/go-consistent v0.0.0-20190521200055-c6f3937de18c/go.mod h1:5STLWrekHfjyYwxBRVRXNOSewLJ3PWfDJd1VyTS21fI= github.com/quasilyte/go-ruleguard v0.1.2-0.20200318202121-b00d7a75d3d8/go.mod h1:CGFX09Ci3pq9QZdj86B+VGIdNj4VyCo2iPOGS9esB/k= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/remyoudompheng/bigfft v0.0.0-20170806203942-52369c62f446/go.mod h1:uYEyJGbgTkfkS4+E/PavXkNJcbFIpEtjt2B0KDQ5+9M= github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.1.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.5.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/rs/cors v1.10.0 h1:62NOS1h+r8p1mW6FM0FSB0exioXLhd/sh15KpjWBZ+8= github.com/rs/cors v1.10.0/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.30.0 h1:SymVODrcRsaRaSInD9yQtKbtWqwsfoPcRff/oRXLj4c= github.com/rs/zerolog v1.30.0/go.mod h1:/tk+P47gFdPXq4QYjvCmT5/Gsug2nagsFWBWhAiSi1w= github.com/rubiojr/go-vhd v0.0.0-20160810183302-0bfd3b39853c/go.mod h1:DM5xW0nvfNNm2uytzsvhI3OnX8uzaRAg8UX/CnDqbto= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w= github.com/ryancurrah/gomodguard v1.0.4/go.mod h1:9T/Cfuxs5StfsocWr4WzDL36HqnX0fVb9d5fSEaLhoE= github.com/ryancurrah/gomodguard v1.1.0/go.mod h1:4O8tr7hBODaGE6VIhfJDHcwzh5GUccKSJBU0UMXJFVM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/sassoftware/go-rpmutils v0.0.0-20190420191620-a8f1baeba37b/go.mod h1:am+Fp8Bt506lA3Rk3QCmSqmYmLMnPDhdDUcosQCAx+I= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/sclevine/spec v1.2.0/go.mod h1:W4J29eT/Kzv7/b9IWLB055Z+qvVC9vt0Arko24q7p+U= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/sebdah/goldie/v2 v2.5.3 h1:9ES/mNN+HNUbNWpVAlrzuZ7jE+Nrczbj8uFRjM7624Y= github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= github.com/secure-systems-lab/go-securesystemslib v0.4.0 h1:b23VGrQhTA8cN2CbBw7/FulN9fTtqYUdS5+Oxzt+DUE= github.com/secure-systems-lab/go-securesystemslib v0.4.0/go.mod h1:FGBZgq2tXWICsxWQW1msNf49F0Pf2Op5Htayx335Qbs= github.com/securego/gosec v0.0.0-20200103095621-79fbf3af8d83/go.mod h1:vvbZ2Ae7AzSq3/kywjUDxSNq2SJ27RxCz2un0H3ePqE= github.com/securego/gosec v0.0.0-20200401082031-e946c8c39989/go.mod h1:i9l/TNj+yDFh9SZXUTvspXTjbFXgZGP/UvhU1S65A4A= github.com/securego/gosec/v2 v2.3.0/go.mod h1:UzeVyUXbxukhLeHKV3VVqo7HdoQR9MrRfFmZYotn8ME= github.com/sercand/kuberesolver v2.4.0+incompatible/go.mod h1:lWF3GL0xptCB/vCiJPl/ZshwPsX/n4Y7u0CW9E7aQIQ= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I= github.com/serialx/hashring v0.0.0-20190422032157-8b2912629002/go.mod h1:/yeG0My1xr/u+HZrFQ1tOQQQQrOawfyMUH13ai5brBc= github.com/shibumi/go-pathspec v1.3.0 h1:QUyMZhFo0Md5B8zV8x2tesohbb5kfbpTi9rBnKh5dkI= github.com/shibumi/go-pathspec v1.3.0/go.mod h1:Xutfslp817l2I1cZvgcfeMQJG5QnU2lh5tVaaMCl3jE= github.com/shirou/gopsutil v0.0.0-20190901111213-e4ec7b275ada/go.mod h1:WWnYX4lzhCH5h/3YBfyVA3VbLYjlMZZAQcW9ojMexNc= github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4/go.mod h1:qsXQc7+bwAM3Q1u/4XEfrquwF8Lw7D7y5cD8CuHnfIc= github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= github.com/shurcooL/graphql v0.0.0-20220606043923-3cf50f8a0a29 h1:B1PEwpArrNp4dkQrfxh/abbBAOZBVp0ds+fBEOUOqOc= github.com/shurcooL/graphql v0.0.0-20220606043923-3cf50f8a0a29/go.mod h1:AuYgA5Kyo4c7HfUmvRGs/6rGlMMV/6B1bVnB9JxJEEg= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/skeema/knownhosts v1.2.0 h1:h9r9cf0+u7wSE+M183ZtMGgOJKiL96brpaz5ekfJCpM= github.com/skeema/knownhosts v1.2.0/go.mod h1:g4fPeYpque7P0xefxtGzV81ihjC8sX2IqpAoNkjxbMo= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/assertions v1.0.0/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9/go.mod h1:SnhjPscd9TpLiy1LpzGSKh3bXCfxxXuqd9xmQJy3slM= github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smartystreets/gunit v1.0.0/go.mod h1:qwPWnhz6pn0NnRBP++URONOVyNkPyr4SauJk4cUOwJs= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/sourcegraph/go-diff v0.5.1/go.mod h1:j2dHj3m8aZgQO8lMTcTnBcXkRRRqi34cd2MNlA9u1mE= github.com/sourcegraph/go-diff v0.5.3/go.mod h1:v9JDtjCE4HHHCZGId75rg8gkKKa98RVjBcBGsVmMmak= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spdx/gordf v0.0.0-20201111095634-7098f93598fb/go.mod h1:uKWaldnbMnjsSAXRurWqqrdyZen1R7kxl8TkmWk2OyM= github.com/spdx/tools-golang v0.5.1 h1:fJg3SVOGG+eIva9ZUBm/hvyA7PIPVFjRxUKe6fdAgwE= github.com/spdx/tools-golang v0.5.1/go.mod h1:/DRDQuBfB37HctM29YtrX1v+bXiVmT2OpQDalRmX9aU= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/spf13/viper v1.6.1/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/stretchr/objx v0.0.0-20180129172003-8a3f7159479f/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v0.0.0-20180303142811-b89eecf5ca5d/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA= github.com/tdakkota/asciicheck v0.0.0-20200416190851-d7f85be797a2/go.mod h1:yHp0ai0Z9gUljN3o0xMhYJnH/IcvkdTBOX2fmJ93JEM= github.com/tdakkota/asciicheck v0.0.0-20200416200610-e657995f937b/go.mod h1:yHp0ai0Z9gUljN3o0xMhYJnH/IcvkdTBOX2fmJ93JEM= github.com/tetafro/godot v0.3.7/go.mod h1:/7NLHhv08H1+8DNj0MElpAACw1ajsCuf3TKNQxA5S+0= github.com/tetafro/godot v0.4.2/go.mod h1:/7NLHhv08H1+8DNj0MElpAACw1ajsCuf3TKNQxA5S+0= github.com/tidwall/gjson v1.15.0 h1:5n/pM+v3r5ujuNl4YLZLsQ+UE5jlkLVm7jMzT5Mpolw= github.com/tidwall/gjson v1.15.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/timakin/bodyclose v0.0.0-20190930140734-f7f2e9bca95e/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk= github.com/timakin/bodyclose v0.0.0-20200424151742-cb6215831a94/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk= github.com/tj/assert v0.0.0-20171129193455-018094318fb0/go.mod h1:mZ9/Rh9oLWpLLDRpvE+3b7gP/C2YyLFYxNmcLnPTMe0= github.com/tj/go-elastic v0.0.0-20171221160941-36157cbbebc2/go.mod h1:WjeM0Oo1eNAjXGDx2yma7uG2XoyRZTq1uv3M/o7imD0= github.com/tj/go-kinesis v0.0.0-20171128231115-08b17f58cb1b/go.mod h1:/yhzCV0xPfx6jb1bBgRFjl5lytqVqZXEaeqWP8lTEao= github.com/tj/go-spin v1.1.0/go.mod h1:Mg1mzmePZm4dva8Qz60H2lHwmJ2loum4VIrLgVnKwh4= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tommy-muehle/go-mnd v1.1.1/go.mod h1:dSUh0FtTP8VhvkL1S+gUR1OKd9ZnSaozuI6r3m6wOig= github.com/tommy-muehle/go-mnd v1.3.1-0.20200224220436-e6f9a994e8fa/go.mod h1:dSUh0FtTP8VhvkL1S+gUR1OKd9ZnSaozuI6r3m6wOig= github.com/tonistiigi/fsutil v0.0.0-20201103201449-0834f99b7b85/go.mod h1:a7cilN64dG941IOXfhJhlH0qB92hxJ9A1ewrdUmJ6xo= github.com/tonistiigi/fsutil v0.0.0-20230629203738-36ef4d8c0dbb h1:uUe8rNyVXM8moActoBol6Xf6xX2GMr7SosR2EywMvGg= github.com/tonistiigi/fsutil v0.0.0-20230629203738-36ef4d8c0dbb/go.mod h1:SxX/oNQ/ag6Vaoli547ipFK9J7BZn5JqJG0JE8lf8bA= github.com/tonistiigi/go-actions-cache v0.0.0-20220404170428-0bdeb6e1eac7 h1:8eY6m1mjgyB8XySUR7WvebTM8D/Vs86jLJzD/Tw7zkc= github.com/tonistiigi/go-actions-cache v0.0.0-20220404170428-0bdeb6e1eac7/go.mod h1:qqvyZqkfwkoJuPU/bw61bItaoO0SJ8YSW0vSVRRvsRg= github.com/tonistiigi/go-archvariant v1.0.0 h1:5LC1eDWiBNflnTF1prCiX09yfNHIxDC/aukdhCdTyb0= github.com/tonistiigi/go-archvariant v1.0.0/go.mod h1:TxFmO5VS6vMq2kvs3ht04iPXtu2rUT/erOnGFYfk5Ho= github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea h1:SXhTLE6pb6eld/v/cCndK0AMpt1wiVFb/YYmqB3/QG0= github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea/go.mod h1:WPnis/6cRcDZSUvVmezrxJPkiO87ThFYsoUiMwWNDJk= github.com/tonistiigi/vt100 v0.0.0-20230623042737-f9a4f7ef6531 h1:Y/M5lygoNPKwVNLMPXgVfsRT40CSFKXCxuU8LoHySjs= github.com/tonistiigi/vt100 v0.0.0-20230623042737-f9a4f7ef6531/go.mod h1:ulncasL3N9uLrVann0m+CDlJKWsIAP34MPcOJF6VRvc= github.com/uber/jaeger-client-go v2.25.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= github.com/uber/jaeger-client-go v2.28.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= github.com/uber/jaeger-lib v2.2.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ulikunitz/xz v0.5.6/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4ABRW8= github.com/ulikunitz/xz v0.5.7/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/ultraware/funlen v0.0.2/go.mod h1:Dp4UiAus7Wdb9KUZsYWZEWiRzGuM2kXM1lPbfaF6xhA= github.com/ultraware/whitespace v0.0.4/go.mod h1:aVMh/gQve5Maj9hQ/hg+F75lr/X5A89uZnzAmWSineA= github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli v1.22.12 h1:igJgVw1JdKH+trcLWLeLwZjU9fEfPesQ+9/e4MQ44S8= github.com/urfave/cli v1.22.12/go.mod h1:sSBEIC79qR6OvcmsD4U3KABeOTxDqQtdDnaFuUN30b8= github.com/uudashr/gocognit v1.0.1/go.mod h1:j44Ayx2KW4+oB6SWMv8KsmHzZrOInQav7D3cQMJ5JUM= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasthttp v1.2.0/go.mod h1:4vX61m6KN+xDduDNwXrhIAVZaZaZiQ1luJk8LWSxF3s= github.com/valyala/quicktemplate v1.2.0/go.mod h1:EH+4AkTd43SvgIbQHYu59/cJyxDoOVRUAfrukLPuGJ4= github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= github.com/vbatts/tar-split v0.11.3 h1:hLFqsOLQ1SsppQNTMpkpPXClLDfC2A3Zgy9OUU+RVck= github.com/vbatts/tar-split v0.11.3/go.mod h1:9QlHN18E+fEH7RdG+QAJJcuya3rqT7eXSTY7wGrAokY= github.com/vdemeester/k8s-pkg-credentialprovider v1.17.4/go.mod h1:inCTmtUdr5KJbreVojo06krnTgaeAz/Z7lynpPk/Q2c= github.com/vektah/gqlparser/v2 v2.5.6 h1:Ou14T0N1s191eRMZ1gARVqohcbe1e8FrcONScsq8cRU= github.com/vektah/gqlparser/v2 v2.5.6/go.mod h1:z8xXUff237NntSuH8mLFijZ+1tjV1swDbpDqjJmk6ME= github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= github.com/vito/midterm v0.1.4 h1:SALq5mQ+AgzeZxjL4loB6Uk5TZc9JMyX2ELA/NVH65c= github.com/vito/midterm v0.1.4/go.mod h1:Mm3u6lrpzo2EFSJbwksKOdottTJzYePK8c1KJy4aRbk= github.com/vito/progrock v0.10.2-0.20230913234310-64b4a1cfb007 h1:RMNnjVKSImroyzJMINdkfNmlxFiBLGP30tjBH4GYgBE= github.com/vito/progrock v0.10.2-0.20230913234310-64b4a1cfb007/go.mod h1:ysw2W2gc20Snmlc0a34JbWO45HPM0oXO8IC59hyFc3k= github.com/vmware/govmomi v0.20.3/go.mod h1:URlwyTFZX72RmxtxuaFL2Uj3fD1JTvZdx59bHWk6aFU= github.com/weaveworks/common v0.0.0-20230119144549-0aaa5abd1e63 h1:qZcnPZbiX8gGs3VmipVc3ft29vPYBZzlox/04Von6+k= github.com/weaveworks/common v0.0.0-20230119144549-0aaa5abd1e63/go.mod h1:KoQ+3z63GUJzQ7AhU0AWQNU+LPda2EwL/cx1PlbDzVQ= github.com/weaveworks/promrus v1.2.0 h1:jOLf6pe6/vss4qGHjXmGz4oDJQA+AOCqEL3FvvZGz7M= github.com/weaveworks/promrus v1.2.0/go.mod h1:SaE82+OJ91yqjrE1rsvBWVzNZKcHYFtMUyS1+Ogs/KA= github.com/willf/bitset v1.1.11-0.20200630133818-d5bec3311243/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= github.com/xanzy/go-gitlab v0.31.0/go.mod h1:sPLojNBn68fMUWSxIJtdVVIP8uSBYqesTfDUseX11Ug= github.com/xanzy/go-gitlab v0.32.0/go.mod h1:sPLojNBn68fMUWSxIJtdVVIP8uSBYqesTfDUseX11Ug= github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8/go.mod h1:HUYIGzjTL3rfEspMxjDjgmT5uz5wzYJKVo23qUhYTos= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yuin/goldmark v1.5.4 h1:2uY/xC0roWy8IBEGLgB1ywIoEJFGmRrX21YQcvGZzjU= github.com/yuin/goldmark v1.5.4/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs= github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA= github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg= github.com/zeebo/assert v1.3.0 h1:g7C04CbJuIDKNPFHmsk4hwZDO5O+kntRxzaUoNXj+IQ= github.com/zeebo/xxh3 v1.0.2 h1:xZmwmqxHZA8AI603jOQ0tMqmBr9lPeFwGg6d+xy9DC0= github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA= github.com/zmb3/spotify/v2 v2.3.1 h1:aEyIPotROM3JJjHMCImFROgnPIUpzVo8wymYSaPSd9w= github.com/zmb3/spotify/v2 v2.3.1/go.mod h1:+LVh9CafHu7SedyqYmEf12Rd01dIVlEL845yNhksW0E= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ= go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.opencensus.io v0.15.0/go.mod h1:UffZAU+4sDEINUGP/B7UfBBkq4fqLu9zXAX7ke6CHW0= go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA= go.opencensus.io v0.19.1/go.mod h1:gug0GbSHa8Pafr0d2urOSgoXHZ6x/RUlaiT0d9pqb4A= go.opencensus.io v0.19.2/go.mod h1:NO/8qkisMZLZ1FCsKNqtJPwc8/TaclWyY0B6wcYNg9M= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.45.0 h1:RsQi0qJ2imFfCvZabqzM9cNXBG8k6gXMv1A0cXRmH6A= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.45.0/go.mod h1:vsh3ySueQCiKPxFLvjWC4Z135gIa34TQ/NSqkDTZYUM= go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.45.0 h1:2ea0IkZBsWH+HA2GkD+7+hRw2u97jzdFyRtXuO14a1s= go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.45.0/go.mod h1:4m3RnBBb+7dB9d21y510oO1pdB1V4J6smNf14WXcBFQ= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 h1:x8Z78aZx8cOF0+Kkazoc7lwUNMGy0LrzEMxTm4BbTxg= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0/go.mod h1:62CPTSry9QZtOaSsE3tOzhx6LzDhHnXJ6xHeMNNiM6Q= go.opentelemetry.io/otel v1.19.0 h1:MuS/TNf4/j4IXsZuJegVzI1cwut7Qc00344rgH7p8bs= go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY= go.opentelemetry.io/otel/exporters/jaeger v1.17.0 h1:D7UpUy2Xc2wsi1Ras6V40q806WM07rqoCWzXu7Sqy+4= go.opentelemetry.io/otel/exporters/jaeger v1.17.0/go.mod h1:nPCqOnEH9rNLKqH/+rrUjiMzHJdV1BlpKcTwRTyKkKI= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 h1:Mne5On7VWdx7omSrSSZvM4Kw7cS7NQkOOmLcgscI51U= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0/go.mod h1:IPtUMKL4O3tH5y+iXVyAXqpAwMuzC1IrxVS81rummfE= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0 h1:3d+S281UTjM+AbF31XSOYn1qXn3BgIdWl8HNEpx08Jk= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0/go.mod h1:0+KuTDyKL4gjKCF75pHOX4wuzYDUZYfAQdSu43o+Z2I= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0 h1:IeMeyr1aBvBiPVYihXIaeIZba6b8E1bYp7lbdxK8CQg= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0/go.mod h1:oVdCUtjq9MK9BlS7TtucsQwUcXcymNiEDjgDD2jMtZU= go.opentelemetry.io/otel/metric v1.19.0 h1:aTzpGtV0ar9wlV4Sna9sdJyII5jTVJEvKETPiOKwvpE= go.opentelemetry.io/otel/metric v1.19.0/go.mod h1:L5rUsV9kM1IxCj1MmSdS+JQAcVm319EUrDVLrt7jqt8= go.opentelemetry.io/otel/sdk v1.19.0 h1:6USY6zH+L8uMH8L3t1enZPR3WFEmSTADlqldyHtJi3o= go.opentelemetry.io/otel/sdk v1.19.0/go.mod h1:NedEbbS4w3C6zElbLdPJKOpJQOrGUJ+GfzpjUvI0v1A= go.opentelemetry.io/otel/trace v1.19.0 h1:DFVQmlVbfVeOuBRrwdtaehRrWiL1JoVs9CPIQ1Dzxpg= go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmYZpYojqMnX2vo= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.1/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= go.uber.org/goleak v1.2.1/go.mod h1:qlT2yGI9QafXHhZZLxlSuNsMw3FFLxBr+tBRlmO1xH4= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= gocloud.dev v0.19.0/go.mod h1:SmKwiR8YwIMMJvQBKLsC3fHNyMwXLw3PMDO+VVteJMI= golang.org/x/build v0.0.0-20190314133821-5284462c4bec/go.mod h1:atTaCNAy0f16Ah5aV1gMSwgiKVHwu/JncqDpuRr7lS4= golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191002192127-34f69633bfdc/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201117144127-c1f2f97bffc9/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20221012134737-56aed061732a/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190312203227-4b39c73a6495/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI= golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/image v0.0.0-20190910094157-69e4b8554b2a/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/image v0.7.0 h1:gzS29xtG1J5ybQlv0PuyfE3nmc6R4qB73m6LUUmvFuw= golang.org/x/image v0.7.0/go.mod h1:nd/q4ef1AKKYl/4kft7g+6UyGbdiqWqTP1ZAbRoV7Rg= golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20181217174547-8f45f776aaf1/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY= golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180911220305-26e67e76b6c3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181029044818-c44066c5c816/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181106065722-10aee1819953/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181108082009-03003ca0c849/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190619014844-b5b0513f8c1b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191112182307-2180aed22343/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210916014120-12bc252f5db8/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/net v0.16.0 h1:7eBu7KsSvFDtSXUIDbh3aqlK4DPsZ1rByC8PFfBThos= golang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20180724155351-3d292e4d0cdc/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181106182150-f42d05182288/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210810183815-faf39c7919d5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.13.0 h1:jDDenyj+WgFtmV3zYVoi8aE2BwtXFLWOA67ZfNWftiY= golang.org/x/oauth2 v0.13.0/go.mod h1:/JMhi4ZRXAf4HG9LiNmxvk+45+96RUlVThiH8FzNBn0= golang.org/x/perf v0.0.0-20180704124530-6e6d33e29852/go.mod h1:JLpeXjPJfIyPr5TlbXLkXWLhP8nz10XfvxElABhCtcw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ= golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181029174526-d69651ed3497/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181218192612-074acd46bca6/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190514135907-3a4b5fb9f71f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190602015325-4c4f7f33c9ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190620070143-6f217b454f45/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191112214154-59a1497f0cea/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191210023423-ac6580df4449/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200120151820-655fe14d7479/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200916030750-2334cc1a136f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200917073148-efd3b9a0ff20/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201013081832-0aaa2718063a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220906165534-d0df966e6959/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181117154741-2ddaf7f79a09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181219222714-6e267b5cc78e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190110163146-51295c7ec13a/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190221204921-83362c3779f5/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190311215038-5c2858a9cfe5/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190322203728-c1a832b0ad89/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190422233926-fe54fb35175b/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190521203540-521d6ed310dd/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190706070813-72ffa07ba3db/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= golang.org/x/tools v0.0.0-20190719005602-e377ae9d6386/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190910044552-dd2b5c81c578/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190920225731-5eefd052ad72/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113232020-e2727e816f5a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200102140908-9497f49d5709/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200204192400-7124308813f3/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200324003944-a576cf524670/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200331202046-9d5940d49312/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200414032229-332987a829c3/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200422022333-3d57cf2e726e/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200426102838-f3a5411a4c3b/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200502202811-ed308ab3e770/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.14.0 h1:jvNa2pY0M4r62jkRQ6RwEZZyPcymeL9XZMLBbV7U2nc= golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= gonum.org/v1/gonum v0.0.0-20190331200053-3d26580ed485/go.mod h1:2ltnJ7xHfj0zHS40VVPYEAAMTa3ZGguvHGBSJeRWqE0= gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= gonum.org/v1/netlib v0.0.0-20190331212654-76723241ea4e/go.mod h1:kS+toOQn6AQKjmKJ7gzohV1XkqsFehRA2FbsbkopSuQ= gonum.org/v1/plot v0.12.0 h1:y1ZNmfz/xHuHvtgFe8USZVyykQo5ERXPnspQNVK15Og= gonum.org/v1/plot v0.12.0/go.mod h1:PgiMf9+3A3PnZdJIciIXmyN1FwdAA6rXELSN761oQkw= google.golang.org/api v0.0.0-20160322025152-9bf6e6e569ff/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.0.0-20181030000543-1d582fd0359e/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.0.0-20181220000619-583d854617af/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.2.0/go.mod h1:IfRCZScioGtypHNTlz3gFk67J8uePVW7uDTBzXuIkhU= google.golang.org/api v0.3.0/go.mod h1:IuvZyQh8jgscv8qWfQ4ABd8m7hEudgBFM/EdhA3BnXw= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.5.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.6.0/go.mod h1:btoxGiFvQNVUZQ8W08zLtrVS08CNpINPEfxXxgJL1Q4= google.golang.org/api v0.6.1-0.20190607001116-5213b8090861/go.mod h1:btoxGiFvQNVUZQ8W08zLtrVS08CNpINPEfxXxgJL1Q4= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.25.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/cloud v0.0.0-20151119220103-975617b05ea8/go.mod h1:0H1ncTHf11KCFhTc/+EFRbzSCOZx+VUbRMk55Yv5MYk= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20181029155118-b69ba1387ce2/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20181219182458-5a97ab628bfb/go.mod h1:7Ep/1NZk928CDR8SjdVbjWNpdIf6nzjE3BTgJDr2Atg= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190508193815-b515fa19cec8/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= google.golang.org/genproto v0.0.0-20190620144150-6af8c5fc6601/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200117163144-32f20d992d24/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200527145253-8367513e4ece/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210329143202-679c6ae281ee/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98 h1:Z0hjGZePRE0ZBWotvtrwxFNrNE9CUAGtplaDK5NNI/g= google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98/go.mod h1:S7mY02OqCJTD0E1OiQy1F72PWFB4bZJ87cAtLPYgDR0= google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 h1:FmF5cCW94Ij59cfpoLiwTgodWmm60eEV0CjlsVg2fuw= google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.58.2 h1:SXUpjxeVF3FKrTYQI4f4KvbGD5u2xccdYdurwowix5I= google.golang.org/grpc v1.58.2/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20141024133853-64131543e789/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.0/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.56.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/warnings.v0 v0.1.1/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20180920025451-e3ad64cb4ed3/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.5/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.0.0-20180904230853-4e7be11eab3f/go.mod h1:iuAfoD4hCxJ8Onx9kaTIt30j7jUFS00AXQi6QMi99vA= k8s.io/api v0.17.4/go.mod h1:5qxx6vjmwUVG2nHQTKGlLts8Tbok8PzHl4vHtVFuZCA= k8s.io/api v0.19.0/go.mod h1:I1K45XlvTrDjmj5LoM5LuP/KYrhWbjUKT/SoPG0qTjw= k8s.io/apimachinery v0.0.0-20180904193909-def12e63c512/go.mod h1:ccL7Eh7zubPUSh9A3USN90/OzHNSVN6zxzde07TDCL0= k8s.io/apimachinery v0.17.4/go.mod h1:gxLnyZcGNdZTCLnq3fgzyg2A5BVCHTNDFrw8AmuJ+0g= k8s.io/apimachinery v0.19.0/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA= k8s.io/apiserver v0.17.4/go.mod h1:5ZDQ6Xr5MNBxyi3iUZXS84QOhZl+W7Oq2us/29c0j9I= k8s.io/client-go v0.0.0-20180910083459-2cefa64ff137/go.mod h1:7vJpHMYJwNQCWgzmNV+VYUl1zCObLyodBc8nIyt8L5s= k8s.io/client-go v0.17.4/go.mod h1:ouF6o5pz3is8qU0/qYL2RnoxOPqgfuidYLowytyLJmc= k8s.io/client-go v0.19.0/go.mod h1:H9E/VT95blcFQnlyShFgnFT9ZnJOAceiUHM3MlRC+mU= k8s.io/cloud-provider v0.17.4/go.mod h1:XEjKDzfD+b9MTLXQFlDGkk6Ho8SGMpaU8Uugx/KNK9U= k8s.io/code-generator v0.17.2/go.mod h1:DVmfPQgxQENqDIzVR2ddLXMH34qeszkKSdH/N+s+38s= k8s.io/component-base v0.17.4/go.mod h1:5BRqHMbbQPm2kKu35v3G+CpVq4K0RJKC7TRioF0I9lE= k8s.io/cri-api v0.17.3/go.mod h1:X1sbHmuXhwaHs9xxYffLqJogVsnI+f6cPRcgPel7ywM= k8s.io/csi-translation-lib v0.17.4/go.mod h1:CsxmjwxEI0tTNMzffIAcgR9lX4wOh6AKHdxQrT7L0oo= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20190822140433-26a664648505/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/kube-openapi v0.0.0-20180731170545-e3762e86a74c/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc= k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= k8s.io/kubernetes v1.11.10/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= k8s.io/legacy-cloud-providers v0.17.4/go.mod h1:FikRNoD64ECjkxO36gkDgJeiQWwyZTuBkhu+yxOc1Js= k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= kernel.org/pub/linux/libs/security/libcap/cap v1.2.67 h1:sPQ9qlSNR26fToTKbxe/HDWJlXvBLqGmt84LGCQkOy0= kernel.org/pub/linux/libs/security/libcap/psx v1.2.67 h1:NxbXJ7pDVq0FKBsqjieT92QDXI2XaqH2HAi4QcCOHt8= modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw= modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk= modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k= modernc.org/strutil v1.0.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs= modernc.org/xc v1.0.0/go.mod h1:mRNCo0bvLjGhHO9WsyuKVU4q0ceiDDDoEeWDJHrNx8I= mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc= mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4= mvdan.cc/unparam v0.0.0-20190720180237-d51796306d8f/go.mod h1:4G1h5nDURzA3bwVMZIVpwbkw+04kSxk3rAtzlimaUJw= mvdan.cc/unparam v0.0.0-20200501210554-b37ab49443f7/go.mod h1:HGC5lll35J70Y5v7vCGb9oLhHoScFwkHDJm/05RdSTc= oss.terrastruct.com/d2 v0.4.0 h1:ZZwO68uN8UYkEObuJuSMnV1qfcaVLLlJEOnjPuavdJg= oss.terrastruct.com/d2 v0.4.0/go.mod h1:EKjuT3J/wss0geBmUhq+LgZBlqRu438+h89g0+hvhEw= oss.terrastruct.com/util-go v0.0.0-20230320053557-dcb5aac7d972 h1:HS7fg2GzGsqRLApsoh7ztaLMvXzxSln/Hfz4wy4tIDA= oss.terrastruct.com/util-go v0.0.0-20230320053557-dcb5aac7d972/go.mod h1:eMWv0sOtD9T2RUl90DLWfuShZCYp4NrsqNpI8eqO6U4= pack.ag/amqp v0.11.2/go.mod h1:4/cbmt4EJXSKlG6LCfWHoqmN0uFdy5i/+YFz+fTfhV4= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1 h1:k1MczvYDUvJBe93bYd7wrZLLUEcLZAuF824/I4e5Xr4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= sigs.k8s.io/structured-merge-diff v1.0.1-0.20191108220359-b1b620dd3f06/go.mod h1:/ULNhyfzRopfcjskuui0cTITekDduZ7ycKN3oUT9R18= sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4/go.mod h1:ketZ/q3QxT9HOBeFhu6RdvsftgpsbFHBF5Cas6cDKZ0= sourcegraph.com/sqs/pbtypes v1.0.0/go.mod h1:3AciMUv4qUuRHRHhOG4TZOB+72GdPVz5k+c648qsFS4=
closed
dagger/dagger
https://github.com/dagger/dagger
5,864
Zenith: Fix `Opts` types in Go SDK
From @jedevc: --- Looks like `Opt` types can't be pointers, e.g. something like this doesn't work: ```go type EchoOpts struct { Suffix string `doc:"String to append to the echoed message." default:"..."` Times int `doc:"Number of times to repeat the message." default:"3"` } func (m *Minimal) EchoOpts(msg string, opts *EchoOpts) string { return m.EchoOptsInline(msg, opts) } ``` The arg type needs to be changed to `opts EchoOpts` for it to work as intended. Giving: ``` Error: failed to get loaded module ID: input:1: host.directory.asModule.serve failed to install module schema: schema validation failed: input:1809: Undefined type EchoOptsID. ``` --- `Opts` structs cannot be nested: ```go package main import "fmt" type Potato struct{} type PotatoOptions struct { Count int TestingOptions TestingOptions } type TestingOptions struct { Foo string } func (m *Potato) HelloWorld(opts PotatoOptions) string { return fmt.Sprintf("Hello world, I have %d potatoes (%s)", opts.Count, opts.TestingOptions.Foo) } ``` ``` Error: failed to get loaded module ID: input:1: host.directory.asModule.serve failed to install module schema: schema validation failed: input:1803: Undefined type TestingOptionsID. ```
https://github.com/dagger/dagger/issues/5864
https://github.com/dagger/dagger/pull/5907
db901c8fe4c70cc32336e304492ca37f12b8f389
e8ad5c62275172e3d54ae46447e741ff5d603450
"2023-10-10T22:55:05Z"
go
"2023-10-25T19:38:59Z"
sdk/go/dagger.gen.go
// Code generated by dagger. DO NOT EDIT. package dagger import ( "context" "encoding/json" "fmt" "reflect" "github.com/Khan/genqlient/graphql" "dagger.io/dagger/querybuilder" ) // assertNotNil panic if the given value is nil. // This function is used to validate that input with pointer type are not nil. // See https://github.com/dagger/dagger/issues/5696 for more context. func assertNotNil(argName string, value any) { // We use reflect because just comparing value to nil is not working since // the value is wrapped into a type when passed as parameter. // E.g., nil become (*dagger.File)(nil). if reflect.ValueOf(value).IsNil() { panic(fmt.Sprintf("unexpected nil pointer for argument %q", argName)) } } // A global cache volume identifier. type CacheVolumeID string // A unique container identifier. Null designates an empty container (scratch). type ContainerID string // A content-addressed directory identifier. type DirectoryID string // A file identifier. type FileID string // A reference to a FunctionArg. type FunctionArgID string // A reference to a Function. type FunctionID string // A reference to GeneratedCode. type GeneratedCodeID string // An arbitrary JSON-encoded value. type JSON string // A reference to a Module. type ModuleID string // The platform config OS and architecture in a Container. // // The format is [os]/[platform]/[version] (e.g., "darwin/arm64/v7", "windows/amd64", "linux/arm64"). type Platform string // A unique identifier for a secret. type SecretID string // A unique service identifier. type ServiceID string // A content-addressed socket identifier. type SocketID string // A reference to a TypeDef. type TypeDefID string // The absense of a value. // // A Null Void is used as a placeholder for resolvers that do not return anything. type Void string // Key value object that represents a build argument. type BuildArg struct { // The build argument name. Name string `json:"name"` // The build argument value. Value string `json:"value"` } // Key value object that represents a Pipeline label. type PipelineLabel struct { // Label name. Name string `json:"name"` // Label value. Value string `json:"value"` } // Port forwarding rules for tunneling network traffic. type PortForward struct { // Destination port for traffic. Backend int `json:"backend"` // Port to expose to clients. If unspecified, a default will be chosen. Frontend int `json:"frontend"` // Protocol to use for traffic. Protocol NetworkProtocol `json:"protocol,omitempty"` } // A directory whose contents persist across runs. type CacheVolume struct { q *querybuilder.Selection c graphql.Client id *CacheVolumeID } func (r *CacheVolume) ID(ctx context.Context) (CacheVolumeID, error) { if r.id != nil { return *r.id, nil } q := r.q.Select("id") var response CacheVolumeID q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // XXX_GraphQLType is an internal function. It returns the native GraphQL type name func (r *CacheVolume) XXX_GraphQLType() string { return "CacheVolume" } // XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object func (r *CacheVolume) XXX_GraphQLIDType() string { return "CacheVolumeID" } // XXX_GraphQLID is an internal function. It returns the underlying type ID func (r *CacheVolume) XXX_GraphQLID(ctx context.Context) (string, error) { id, err := r.ID(ctx) if err != nil { return "", err } return string(id), nil } func (r *CacheVolume) MarshalJSON() ([]byte, error) { id, err := r.ID(context.Background()) if err != nil { return nil, err } return json.Marshal(id) } // An OCI-compatible container, also known as a docker container. type Container struct { q *querybuilder.Selection c graphql.Client envVariable *string export *bool id *ContainerID imageRef *string label *string platform *Platform publish *string shellEndpoint *string stderr *string stdout *string sync *ContainerID user *string workdir *string } type WithContainerFunc func(r *Container) *Container // With calls the provided function with current Container. // // This is useful for reusability and readability by not breaking the calling chain. func (r *Container) With(f WithContainerFunc) *Container { return f(r) } // Turn the container into a Service. // // Be sure to set any exposed ports before this conversion. func (r *Container) AsService() *Service { q := r.q.Select("asService") return &Service{ q: q, c: r.c, } } // ContainerAsTarballOpts contains options for Container.AsTarball type ContainerAsTarballOpts struct { // Identifiers for other platform specific containers. // Used for multi-platform image. PlatformVariants []*Container // Force each layer of the image to use the specified compression algorithm. // If this is unset, then if a layer already has a compressed blob in the engine's // cache, that will be used (this can result in a mix of compression algorithms for // different layers). If this is unset and a layer has no compressed blob in the // engine's cache, then it will be compressed using Gzip. ForcedCompression ImageLayerCompression // Use the specified media types for the image's layers. Defaults to OCI, which // is largely compatible with most recent container runtimes, but Docker may be needed // for older runtimes without OCI support. MediaTypes ImageMediaTypes } // Returns a File representing the container serialized to a tarball. func (r *Container) AsTarball(opts ...ContainerAsTarballOpts) *File { q := r.q.Select("asTarball") for i := len(opts) - 1; i >= 0; i-- { // `platformVariants` optional argument if !querybuilder.IsZeroValue(opts[i].PlatformVariants) { q = q.Arg("platformVariants", opts[i].PlatformVariants) } // `forcedCompression` optional argument if !querybuilder.IsZeroValue(opts[i].ForcedCompression) { q = q.Arg("forcedCompression", opts[i].ForcedCompression) } // `mediaTypes` optional argument if !querybuilder.IsZeroValue(opts[i].MediaTypes) { q = q.Arg("mediaTypes", opts[i].MediaTypes) } } return &File{ q: q, c: r.c, } } // ContainerBuildOpts contains options for Container.Build type ContainerBuildOpts struct { // Path to the Dockerfile to use. // // Default: './Dockerfile'. Dockerfile string // Additional build arguments. BuildArgs []BuildArg // Target build stage to build. Target string // Secrets to pass to the build. // // They will be mounted at /run/secrets/[secret-name] in the build container // // They can be accessed in the Dockerfile using the "secret" mount type // and mount path /run/secrets/[secret-name] // e.g. RUN --mount=type=secret,id=my-secret curl url?token=$(cat /run/secrets/my-secret)" Secrets []*Secret } // Initializes this container from a Dockerfile build. func (r *Container) Build(context *Directory, opts ...ContainerBuildOpts) *Container { assertNotNil("context", context) q := r.q.Select("build") for i := len(opts) - 1; i >= 0; i-- { // `dockerfile` optional argument if !querybuilder.IsZeroValue(opts[i].Dockerfile) { q = q.Arg("dockerfile", opts[i].Dockerfile) } // `buildArgs` optional argument if !querybuilder.IsZeroValue(opts[i].BuildArgs) { q = q.Arg("buildArgs", opts[i].BuildArgs) } // `target` optional argument if !querybuilder.IsZeroValue(opts[i].Target) { q = q.Arg("target", opts[i].Target) } // `secrets` optional argument if !querybuilder.IsZeroValue(opts[i].Secrets) { q = q.Arg("secrets", opts[i].Secrets) } } q = q.Arg("context", context) return &Container{ q: q, c: r.c, } } // Retrieves default arguments for future commands. func (r *Container) DefaultArgs(ctx context.Context) ([]string, error) { q := r.q.Select("defaultArgs") var response []string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Retrieves a directory at the given path. // // Mounts are included. func (r *Container) Directory(path string) *Directory { q := r.q.Select("directory") q = q.Arg("path", path) return &Directory{ q: q, c: r.c, } } // Retrieves entrypoint to be prepended to the arguments of all commands. func (r *Container) Entrypoint(ctx context.Context) ([]string, error) { q := r.q.Select("entrypoint") var response []string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Retrieves the value of the specified environment variable. func (r *Container) EnvVariable(ctx context.Context, name string) (string, error) { if r.envVariable != nil { return *r.envVariable, nil } q := r.q.Select("envVariable") q = q.Arg("name", name) var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Retrieves the list of environment variables passed to commands. func (r *Container) EnvVariables(ctx context.Context) ([]EnvVariable, error) { q := r.q.Select("envVariables") q = q.Select("name value") type envVariables struct { Name string Value string } convert := func(fields []envVariables) []EnvVariable { out := []EnvVariable{} for i := range fields { val := EnvVariable{name: &fields[i].Name, value: &fields[i].Value} out = append(out, val) } return out } var response []envVariables q = q.Bind(&response) err := q.Execute(ctx, r.c) if err != nil { return nil, err } return convert(response), nil } // ContainerExportOpts contains options for Container.Export type ContainerExportOpts struct { // Identifiers for other platform specific containers. // Used for multi-platform image. PlatformVariants []*Container // Force each layer of the exported image to use the specified compression algorithm. // If this is unset, then if a layer already has a compressed blob in the engine's // cache, that will be used (this can result in a mix of compression algorithms for // different layers). If this is unset and a layer has no compressed blob in the // engine's cache, then it will be compressed using Gzip. ForcedCompression ImageLayerCompression // Use the specified media types for the exported image's layers. Defaults to OCI, which // is largely compatible with most recent container runtimes, but Docker may be needed // for older runtimes without OCI support. MediaTypes ImageMediaTypes } // Writes the container as an OCI tarball to the destination file path on the host for the specified platform variants. // // Return true on success. // It can also publishes platform variants. func (r *Container) Export(ctx context.Context, path string, opts ...ContainerExportOpts) (bool, error) { if r.export != nil { return *r.export, nil } q := r.q.Select("export") for i := len(opts) - 1; i >= 0; i-- { // `platformVariants` optional argument if !querybuilder.IsZeroValue(opts[i].PlatformVariants) { q = q.Arg("platformVariants", opts[i].PlatformVariants) } // `forcedCompression` optional argument if !querybuilder.IsZeroValue(opts[i].ForcedCompression) { q = q.Arg("forcedCompression", opts[i].ForcedCompression) } // `mediaTypes` optional argument if !querybuilder.IsZeroValue(opts[i].MediaTypes) { q = q.Arg("mediaTypes", opts[i].MediaTypes) } } q = q.Arg("path", path) var response bool q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Retrieves the list of exposed ports. // // This includes ports already exposed by the image, even if not // explicitly added with dagger. func (r *Container) ExposedPorts(ctx context.Context) ([]Port, error) { q := r.q.Select("exposedPorts") q = q.Select("description port protocol") type exposedPorts struct { Description string Port int Protocol NetworkProtocol } convert := func(fields []exposedPorts) []Port { out := []Port{} for i := range fields { val := Port{description: &fields[i].Description, port: &fields[i].Port, protocol: &fields[i].Protocol} out = append(out, val) } return out } var response []exposedPorts q = q.Bind(&response) err := q.Execute(ctx, r.c) if err != nil { return nil, err } return convert(response), nil } // Retrieves a file at the given path. // // Mounts are included. func (r *Container) File(path string) *File { q := r.q.Select("file") q = q.Arg("path", path) return &File{ q: q, c: r.c, } } // Initializes this container from a pulled base image. func (r *Container) From(address string) *Container { q := r.q.Select("from") q = q.Arg("address", address) return &Container{ q: q, c: r.c, } } // A unique identifier for this container. func (r *Container) ID(ctx context.Context) (ContainerID, error) { if r.id != nil { return *r.id, nil } q := r.q.Select("id") var response ContainerID q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // XXX_GraphQLType is an internal function. It returns the native GraphQL type name func (r *Container) XXX_GraphQLType() string { return "Container" } // XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object func (r *Container) XXX_GraphQLIDType() string { return "ContainerID" } // XXX_GraphQLID is an internal function. It returns the underlying type ID func (r *Container) XXX_GraphQLID(ctx context.Context) (string, error) { id, err := r.ID(ctx) if err != nil { return "", err } return string(id), nil } func (r *Container) MarshalJSON() ([]byte, error) { id, err := r.ID(context.Background()) if err != nil { return nil, err } return json.Marshal(id) } // The unique image reference which can only be retrieved immediately after the 'Container.From' call. func (r *Container) ImageRef(ctx context.Context) (string, error) { if r.imageRef != nil { return *r.imageRef, nil } q := r.q.Select("imageRef") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // ContainerImportOpts contains options for Container.Import type ContainerImportOpts struct { // Identifies the tag to import from the archive, if the archive bundles // multiple tags. Tag string } // Reads the container from an OCI tarball. // // NOTE: this involves unpacking the tarball to an OCI store on the host at // $XDG_CACHE_DIR/dagger/oci. This directory can be removed whenever you like. func (r *Container) Import(source *File, opts ...ContainerImportOpts) *Container { assertNotNil("source", source) q := r.q.Select("import") for i := len(opts) - 1; i >= 0; i-- { // `tag` optional argument if !querybuilder.IsZeroValue(opts[i].Tag) { q = q.Arg("tag", opts[i].Tag) } } q = q.Arg("source", source) return &Container{ q: q, c: r.c, } } // Retrieves the value of the specified label. func (r *Container) Label(ctx context.Context, name string) (string, error) { if r.label != nil { return *r.label, nil } q := r.q.Select("label") q = q.Arg("name", name) var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Retrieves the list of labels passed to container. func (r *Container) Labels(ctx context.Context) ([]Label, error) { q := r.q.Select("labels") q = q.Select("name value") type labels struct { Name string Value string } convert := func(fields []labels) []Label { out := []Label{} for i := range fields { val := Label{name: &fields[i].Name, value: &fields[i].Value} out = append(out, val) } return out } var response []labels q = q.Bind(&response) err := q.Execute(ctx, r.c) if err != nil { return nil, err } return convert(response), nil } // Retrieves the list of paths where a directory is mounted. func (r *Container) Mounts(ctx context.Context) ([]string, error) { q := r.q.Select("mounts") var response []string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // ContainerPipelineOpts contains options for Container.Pipeline type ContainerPipelineOpts struct { // Pipeline description. Description string // Pipeline labels. Labels []PipelineLabel } // Creates a named sub-pipeline func (r *Container) Pipeline(name string, opts ...ContainerPipelineOpts) *Container { q := r.q.Select("pipeline") for i := len(opts) - 1; i >= 0; i-- { // `description` optional argument if !querybuilder.IsZeroValue(opts[i].Description) { q = q.Arg("description", opts[i].Description) } // `labels` optional argument if !querybuilder.IsZeroValue(opts[i].Labels) { q = q.Arg("labels", opts[i].Labels) } } q = q.Arg("name", name) return &Container{ q: q, c: r.c, } } // The platform this container executes and publishes as. func (r *Container) Platform(ctx context.Context) (Platform, error) { if r.platform != nil { return *r.platform, nil } q := r.q.Select("platform") var response Platform q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // ContainerPublishOpts contains options for Container.Publish type ContainerPublishOpts struct { // Identifiers for other platform specific containers. // Used for multi-platform image. PlatformVariants []*Container // Force each layer of the published image to use the specified compression algorithm. // If this is unset, then if a layer already has a compressed blob in the engine's // cache, that will be used (this can result in a mix of compression algorithms for // different layers). If this is unset and a layer has no compressed blob in the // engine's cache, then it will be compressed using Gzip. ForcedCompression ImageLayerCompression // Use the specified media types for the published image's layers. Defaults to OCI, which // is largely compatible with most recent registries, but Docker may be needed for older // registries without OCI support. MediaTypes ImageMediaTypes } // Publishes this container as a new image to the specified address. // // Publish returns a fully qualified ref. // It can also publish platform variants. func (r *Container) Publish(ctx context.Context, address string, opts ...ContainerPublishOpts) (string, error) { if r.publish != nil { return *r.publish, nil } q := r.q.Select("publish") for i := len(opts) - 1; i >= 0; i-- { // `platformVariants` optional argument if !querybuilder.IsZeroValue(opts[i].PlatformVariants) { q = q.Arg("platformVariants", opts[i].PlatformVariants) } // `forcedCompression` optional argument if !querybuilder.IsZeroValue(opts[i].ForcedCompression) { q = q.Arg("forcedCompression", opts[i].ForcedCompression) } // `mediaTypes` optional argument if !querybuilder.IsZeroValue(opts[i].MediaTypes) { q = q.Arg("mediaTypes", opts[i].MediaTypes) } } q = q.Arg("address", address) var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Retrieves this container's root filesystem. Mounts are not included. func (r *Container) Rootfs() *Directory { q := r.q.Select("rootfs") return &Directory{ q: q, c: r.c, } } // Return a websocket endpoint that, if connected to, will start the container with a TTY streamed // over the websocket. // // Primarily intended for internal use with the dagger CLI. func (r *Container) ShellEndpoint(ctx context.Context) (string, error) { if r.shellEndpoint != nil { return *r.shellEndpoint, nil } q := r.q.Select("shellEndpoint") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The error stream of the last executed command. // // Will execute default command if none is set, or error if there's no default. func (r *Container) Stderr(ctx context.Context) (string, error) { if r.stderr != nil { return *r.stderr, nil } q := r.q.Select("stderr") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The output stream of the last executed command. // // Will execute default command if none is set, or error if there's no default. func (r *Container) Stdout(ctx context.Context) (string, error) { if r.stdout != nil { return *r.stdout, nil } q := r.q.Select("stdout") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Forces evaluation of the pipeline in the engine. // // It doesn't run the default command if no exec has been set. func (r *Container) Sync(ctx context.Context) (*Container, error) { q := r.q.Select("sync") return r, q.Execute(ctx, r.c) } // Retrieves the user to be set for all commands. func (r *Container) User(ctx context.Context) (string, error) { if r.user != nil { return *r.user, nil } q := r.q.Select("user") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // ContainerWithDefaultArgsOpts contains options for Container.WithDefaultArgs type ContainerWithDefaultArgsOpts struct { // Arguments to prepend to future executions (e.g., ["-v", "--no-cache"]). Args []string } // Configures default arguments for future commands. func (r *Container) WithDefaultArgs(opts ...ContainerWithDefaultArgsOpts) *Container { q := r.q.Select("withDefaultArgs") for i := len(opts) - 1; i >= 0; i-- { // `args` optional argument if !querybuilder.IsZeroValue(opts[i].Args) { q = q.Arg("args", opts[i].Args) } } return &Container{ q: q, c: r.c, } } // ContainerWithDirectoryOpts contains options for Container.WithDirectory type ContainerWithDirectoryOpts struct { // Patterns to exclude in the written directory (e.g., ["node_modules/**", ".gitignore", ".git/"]). Exclude []string // Patterns to include in the written directory (e.g., ["*.go", "go.mod", "go.sum"]). Include []string // A user:group to set for the directory and its contents. // // The user and group can either be an ID (1000:1000) or a name (foo:bar). // // If the group is omitted, it defaults to the same as the user. Owner string } // Retrieves this container plus a directory written at the given path. func (r *Container) WithDirectory(path string, directory *Directory, opts ...ContainerWithDirectoryOpts) *Container { assertNotNil("directory", directory) q := r.q.Select("withDirectory") for i := len(opts) - 1; i >= 0; i-- { // `exclude` optional argument if !querybuilder.IsZeroValue(opts[i].Exclude) { q = q.Arg("exclude", opts[i].Exclude) } // `include` optional argument if !querybuilder.IsZeroValue(opts[i].Include) { q = q.Arg("include", opts[i].Include) } // `owner` optional argument if !querybuilder.IsZeroValue(opts[i].Owner) { q = q.Arg("owner", opts[i].Owner) } } q = q.Arg("path", path) q = q.Arg("directory", directory) return &Container{ q: q, c: r.c, } } // Retrieves this container but with a different command entrypoint. func (r *Container) WithEntrypoint(args []string) *Container { q := r.q.Select("withEntrypoint") q = q.Arg("args", args) return &Container{ q: q, c: r.c, } } // ContainerWithEnvVariableOpts contains options for Container.WithEnvVariable type ContainerWithEnvVariableOpts struct { // Replace ${VAR} or $VAR in the value according to the current environment // variables defined in the container (e.g., "/opt/bin:$PATH"). Expand bool } // Retrieves this container plus the given environment variable. func (r *Container) WithEnvVariable(name string, value string, opts ...ContainerWithEnvVariableOpts) *Container { q := r.q.Select("withEnvVariable") for i := len(opts) - 1; i >= 0; i-- { // `expand` optional argument if !querybuilder.IsZeroValue(opts[i].Expand) { q = q.Arg("expand", opts[i].Expand) } } q = q.Arg("name", name) q = q.Arg("value", value) return &Container{ q: q, c: r.c, } } // ContainerWithExecOpts contains options for Container.WithExec type ContainerWithExecOpts struct { // If the container has an entrypoint, ignore it for args rather than using it to wrap them. SkipEntrypoint bool // Content to write to the command's standard input before closing (e.g., "Hello world"). Stdin string // Redirect the command's standard output to a file in the container (e.g., "/tmp/stdout"). RedirectStdout string // Redirect the command's standard error to a file in the container (e.g., "/tmp/stderr"). RedirectStderr string // Provides dagger access to the executed command. // // Do not use this option unless you trust the command being executed. // The command being executed WILL BE GRANTED FULL ACCESS TO YOUR HOST FILESYSTEM. ExperimentalPrivilegedNesting bool // Execute the command with all root capabilities. This is similar to running a command // with "sudo" or executing `docker run` with the `--privileged` flag. Containerization // does not provide any security guarantees when using this option. It should only be used // when absolutely necessary and only with trusted commands. InsecureRootCapabilities bool } // Retrieves this container after executing the specified command inside it. func (r *Container) WithExec(args []string, opts ...ContainerWithExecOpts) *Container { q := r.q.Select("withExec") for i := len(opts) - 1; i >= 0; i-- { // `skipEntrypoint` optional argument if !querybuilder.IsZeroValue(opts[i].SkipEntrypoint) { q = q.Arg("skipEntrypoint", opts[i].SkipEntrypoint) } // `stdin` optional argument if !querybuilder.IsZeroValue(opts[i].Stdin) { q = q.Arg("stdin", opts[i].Stdin) } // `redirectStdout` optional argument if !querybuilder.IsZeroValue(opts[i].RedirectStdout) { q = q.Arg("redirectStdout", opts[i].RedirectStdout) } // `redirectStderr` optional argument if !querybuilder.IsZeroValue(opts[i].RedirectStderr) { q = q.Arg("redirectStderr", opts[i].RedirectStderr) } // `experimentalPrivilegedNesting` optional argument if !querybuilder.IsZeroValue(opts[i].ExperimentalPrivilegedNesting) { q = q.Arg("experimentalPrivilegedNesting", opts[i].ExperimentalPrivilegedNesting) } // `insecureRootCapabilities` optional argument if !querybuilder.IsZeroValue(opts[i].InsecureRootCapabilities) { q = q.Arg("insecureRootCapabilities", opts[i].InsecureRootCapabilities) } } q = q.Arg("args", args) return &Container{ q: q, c: r.c, } } // ContainerWithExposedPortOpts contains options for Container.WithExposedPort type ContainerWithExposedPortOpts struct { // Transport layer network protocol Protocol NetworkProtocol // Optional port description Description string } // Expose a network port. // // Exposed ports serve two purposes: // - For health checks and introspection, when running services // - For setting the EXPOSE OCI field when publishing the container func (r *Container) WithExposedPort(port int, opts ...ContainerWithExposedPortOpts) *Container { q := r.q.Select("withExposedPort") for i := len(opts) - 1; i >= 0; i-- { // `protocol` optional argument if !querybuilder.IsZeroValue(opts[i].Protocol) { q = q.Arg("protocol", opts[i].Protocol) } // `description` optional argument if !querybuilder.IsZeroValue(opts[i].Description) { q = q.Arg("description", opts[i].Description) } } q = q.Arg("port", port) return &Container{ q: q, c: r.c, } } // ContainerWithFileOpts contains options for Container.WithFile type ContainerWithFileOpts struct { // Permission given to the copied file (e.g., 0600). // // Default: 0644. Permissions int // A user:group to set for the file. // // The user and group can either be an ID (1000:1000) or a name (foo:bar). // // If the group is omitted, it defaults to the same as the user. Owner string } // Retrieves this container plus the contents of the given file copied to the given path. func (r *Container) WithFile(path string, source *File, opts ...ContainerWithFileOpts) *Container { assertNotNil("source", source) q := r.q.Select("withFile") for i := len(opts) - 1; i >= 0; i-- { // `permissions` optional argument if !querybuilder.IsZeroValue(opts[i].Permissions) { q = q.Arg("permissions", opts[i].Permissions) } // `owner` optional argument if !querybuilder.IsZeroValue(opts[i].Owner) { q = q.Arg("owner", opts[i].Owner) } } q = q.Arg("path", path) q = q.Arg("source", source) return &Container{ q: q, c: r.c, } } // Indicate that subsequent operations should be featured more prominently in // the UI. func (r *Container) WithFocus() *Container { q := r.q.Select("withFocus") return &Container{ q: q, c: r.c, } } // Retrieves this container plus the given label. func (r *Container) WithLabel(name string, value string) *Container { q := r.q.Select("withLabel") q = q.Arg("name", name) q = q.Arg("value", value) return &Container{ q: q, c: r.c, } } // ContainerWithMountedCacheOpts contains options for Container.WithMountedCache type ContainerWithMountedCacheOpts struct { // Identifier of the directory to use as the cache volume's root. Source *Directory // Sharing mode of the cache volume. Sharing CacheSharingMode // A user:group to set for the mounted cache directory. // // Note that this changes the ownership of the specified mount along with the // initial filesystem provided by source (if any). It does not have any effect // if/when the cache has already been created. // // The user and group can either be an ID (1000:1000) or a name (foo:bar). // // If the group is omitted, it defaults to the same as the user. Owner string } // Retrieves this container plus a cache volume mounted at the given path. func (r *Container) WithMountedCache(path string, cache *CacheVolume, opts ...ContainerWithMountedCacheOpts) *Container { assertNotNil("cache", cache) q := r.q.Select("withMountedCache") for i := len(opts) - 1; i >= 0; i-- { // `source` optional argument if !querybuilder.IsZeroValue(opts[i].Source) { q = q.Arg("source", opts[i].Source) } // `sharing` optional argument if !querybuilder.IsZeroValue(opts[i].Sharing) { q = q.Arg("sharing", opts[i].Sharing) } // `owner` optional argument if !querybuilder.IsZeroValue(opts[i].Owner) { q = q.Arg("owner", opts[i].Owner) } } q = q.Arg("path", path) q = q.Arg("cache", cache) return &Container{ q: q, c: r.c, } } // ContainerWithMountedDirectoryOpts contains options for Container.WithMountedDirectory type ContainerWithMountedDirectoryOpts struct { // A user:group to set for the mounted directory and its contents. // // The user and group can either be an ID (1000:1000) or a name (foo:bar). // // If the group is omitted, it defaults to the same as the user. Owner string } // Retrieves this container plus a directory mounted at the given path. func (r *Container) WithMountedDirectory(path string, source *Directory, opts ...ContainerWithMountedDirectoryOpts) *Container { assertNotNil("source", source) q := r.q.Select("withMountedDirectory") for i := len(opts) - 1; i >= 0; i-- { // `owner` optional argument if !querybuilder.IsZeroValue(opts[i].Owner) { q = q.Arg("owner", opts[i].Owner) } } q = q.Arg("path", path) q = q.Arg("source", source) return &Container{ q: q, c: r.c, } } // ContainerWithMountedFileOpts contains options for Container.WithMountedFile type ContainerWithMountedFileOpts struct { // A user or user:group to set for the mounted file. // // The user and group can either be an ID (1000:1000) or a name (foo:bar). // // If the group is omitted, it defaults to the same as the user. Owner string } // Retrieves this container plus a file mounted at the given path. func (r *Container) WithMountedFile(path string, source *File, opts ...ContainerWithMountedFileOpts) *Container { assertNotNil("source", source) q := r.q.Select("withMountedFile") for i := len(opts) - 1; i >= 0; i-- { // `owner` optional argument if !querybuilder.IsZeroValue(opts[i].Owner) { q = q.Arg("owner", opts[i].Owner) } } q = q.Arg("path", path) q = q.Arg("source", source) return &Container{ q: q, c: r.c, } } // ContainerWithMountedSecretOpts contains options for Container.WithMountedSecret type ContainerWithMountedSecretOpts struct { // A user:group to set for the mounted secret. // // The user and group can either be an ID (1000:1000) or a name (foo:bar). // // If the group is omitted, it defaults to the same as the user. Owner string // Permission given to the mounted secret (e.g., 0600). // This option requires an owner to be set to be active. // // Default: 0400. Mode int } // Retrieves this container plus a secret mounted into a file at the given path. func (r *Container) WithMountedSecret(path string, source *Secret, opts ...ContainerWithMountedSecretOpts) *Container { assertNotNil("source", source) q := r.q.Select("withMountedSecret") for i := len(opts) - 1; i >= 0; i-- { // `owner` optional argument if !querybuilder.IsZeroValue(opts[i].Owner) { q = q.Arg("owner", opts[i].Owner) } // `mode` optional argument if !querybuilder.IsZeroValue(opts[i].Mode) { q = q.Arg("mode", opts[i].Mode) } } q = q.Arg("path", path) q = q.Arg("source", source) return &Container{ q: q, c: r.c, } } // Retrieves this container plus a temporary directory mounted at the given path. func (r *Container) WithMountedTemp(path string) *Container { q := r.q.Select("withMountedTemp") q = q.Arg("path", path) return &Container{ q: q, c: r.c, } } // ContainerWithNewFileOpts contains options for Container.WithNewFile type ContainerWithNewFileOpts struct { // Content of the file to write (e.g., "Hello world!"). Contents string // Permission given to the written file (e.g., 0600). // // Default: 0644. Permissions int // A user:group to set for the file. // // The user and group can either be an ID (1000:1000) or a name (foo:bar). // // If the group is omitted, it defaults to the same as the user. Owner string } // Retrieves this container plus a new file written at the given path. func (r *Container) WithNewFile(path string, opts ...ContainerWithNewFileOpts) *Container { q := r.q.Select("withNewFile") for i := len(opts) - 1; i >= 0; i-- { // `contents` optional argument if !querybuilder.IsZeroValue(opts[i].Contents) { q = q.Arg("contents", opts[i].Contents) } // `permissions` optional argument if !querybuilder.IsZeroValue(opts[i].Permissions) { q = q.Arg("permissions", opts[i].Permissions) } // `owner` optional argument if !querybuilder.IsZeroValue(opts[i].Owner) { q = q.Arg("owner", opts[i].Owner) } } q = q.Arg("path", path) return &Container{ q: q, c: r.c, } } // Retrieves this container with a registry authentication for a given address. func (r *Container) WithRegistryAuth(address string, username string, secret *Secret) *Container { assertNotNil("secret", secret) q := r.q.Select("withRegistryAuth") q = q.Arg("address", address) q = q.Arg("username", username) q = q.Arg("secret", secret) return &Container{ q: q, c: r.c, } } // Initializes this container from this DirectoryID. func (r *Container) WithRootfs(directory *Directory) *Container { assertNotNil("directory", directory) q := r.q.Select("withRootfs") q = q.Arg("directory", directory) return &Container{ q: q, c: r.c, } } // Retrieves this container plus an env variable containing the given secret. func (r *Container) WithSecretVariable(name string, secret *Secret) *Container { assertNotNil("secret", secret) q := r.q.Select("withSecretVariable") q = q.Arg("name", name) q = q.Arg("secret", secret) return &Container{ q: q, c: r.c, } } // Establish a runtime dependency on a service. // // The service will be started automatically when needed and detached when it is // no longer needed, executing the default command if none is set. // // The service will be reachable from the container via the provided hostname alias. // // The service dependency will also convey to any files or directories produced by the container. func (r *Container) WithServiceBinding(alias string, service *Service) *Container { assertNotNil("service", service) q := r.q.Select("withServiceBinding") q = q.Arg("alias", alias) q = q.Arg("service", service) return &Container{ q: q, c: r.c, } } // ContainerWithUnixSocketOpts contains options for Container.WithUnixSocket type ContainerWithUnixSocketOpts struct { // A user:group to set for the mounted socket. // // The user and group can either be an ID (1000:1000) or a name (foo:bar). // // If the group is omitted, it defaults to the same as the user. Owner string } // Retrieves this container plus a socket forwarded to the given Unix socket path. func (r *Container) WithUnixSocket(path string, source *Socket, opts ...ContainerWithUnixSocketOpts) *Container { assertNotNil("source", source) q := r.q.Select("withUnixSocket") for i := len(opts) - 1; i >= 0; i-- { // `owner` optional argument if !querybuilder.IsZeroValue(opts[i].Owner) { q = q.Arg("owner", opts[i].Owner) } } q = q.Arg("path", path) q = q.Arg("source", source) return &Container{ q: q, c: r.c, } } // Retrieves this container with a different command user. func (r *Container) WithUser(name string) *Container { q := r.q.Select("withUser") q = q.Arg("name", name) return &Container{ q: q, c: r.c, } } // Retrieves this container with a different working directory. func (r *Container) WithWorkdir(path string) *Container { q := r.q.Select("withWorkdir") q = q.Arg("path", path) return &Container{ q: q, c: r.c, } } // Retrieves this container minus the given environment variable. func (r *Container) WithoutEnvVariable(name string) *Container { q := r.q.Select("withoutEnvVariable") q = q.Arg("name", name) return &Container{ q: q, c: r.c, } } // ContainerWithoutExposedPortOpts contains options for Container.WithoutExposedPort type ContainerWithoutExposedPortOpts struct { // Port protocol to unexpose Protocol NetworkProtocol } // Unexpose a previously exposed port. func (r *Container) WithoutExposedPort(port int, opts ...ContainerWithoutExposedPortOpts) *Container { q := r.q.Select("withoutExposedPort") for i := len(opts) - 1; i >= 0; i-- { // `protocol` optional argument if !querybuilder.IsZeroValue(opts[i].Protocol) { q = q.Arg("protocol", opts[i].Protocol) } } q = q.Arg("port", port) return &Container{ q: q, c: r.c, } } // Indicate that subsequent operations should not be featured more prominently // in the UI. // // This is the initial state of all containers. func (r *Container) WithoutFocus() *Container { q := r.q.Select("withoutFocus") return &Container{ q: q, c: r.c, } } // Retrieves this container minus the given environment label. func (r *Container) WithoutLabel(name string) *Container { q := r.q.Select("withoutLabel") q = q.Arg("name", name) return &Container{ q: q, c: r.c, } } // Retrieves this container after unmounting everything at the given path. func (r *Container) WithoutMount(path string) *Container { q := r.q.Select("withoutMount") q = q.Arg("path", path) return &Container{ q: q, c: r.c, } } // Retrieves this container without the registry authentication of a given address. func (r *Container) WithoutRegistryAuth(address string) *Container { q := r.q.Select("withoutRegistryAuth") q = q.Arg("address", address) return &Container{ q: q, c: r.c, } } // Retrieves this container with a previously added Unix socket removed. func (r *Container) WithoutUnixSocket(path string) *Container { q := r.q.Select("withoutUnixSocket") q = q.Arg("path", path) return &Container{ q: q, c: r.c, } } // Retrieves the working directory for all commands. func (r *Container) Workdir(ctx context.Context) (string, error) { if r.workdir != nil { return *r.workdir, nil } q := r.q.Select("workdir") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // A directory. type Directory struct { q *querybuilder.Selection c graphql.Client export *bool id *DirectoryID sync *DirectoryID } type WithDirectoryFunc func(r *Directory) *Directory // With calls the provided function with current Directory. // // This is useful for reusability and readability by not breaking the calling chain. func (r *Directory) With(f WithDirectoryFunc) *Directory { return f(r) } // DirectoryAsModuleOpts contains options for Directory.AsModule type DirectoryAsModuleOpts struct { // An optional subpath of the directory which contains the module's source // code. // // This is needed when the module code is in a subdirectory but requires // parent directories to be loaded in order to execute. For example, the // module source code may need a go.mod, project.toml, package.json, etc. file // from a parent directory. // // If not set, the module source code is loaded from the root of the // directory. SourceSubpath string } // Load the directory as a Dagger module func (r *Directory) AsModule(opts ...DirectoryAsModuleOpts) *Module { q := r.q.Select("asModule") for i := len(opts) - 1; i >= 0; i-- { // `sourceSubpath` optional argument if !querybuilder.IsZeroValue(opts[i].SourceSubpath) { q = q.Arg("sourceSubpath", opts[i].SourceSubpath) } } return &Module{ q: q, c: r.c, } } // Gets the difference between this directory and an another directory. func (r *Directory) Diff(other *Directory) *Directory { assertNotNil("other", other) q := r.q.Select("diff") q = q.Arg("other", other) return &Directory{ q: q, c: r.c, } } // Retrieves a directory at the given path. func (r *Directory) Directory(path string) *Directory { q := r.q.Select("directory") q = q.Arg("path", path) return &Directory{ q: q, c: r.c, } } // DirectoryDockerBuildOpts contains options for Directory.DockerBuild type DirectoryDockerBuildOpts struct { // Path to the Dockerfile to use (e.g., "frontend.Dockerfile"). // // Defaults: './Dockerfile'. Dockerfile string // The platform to build. Platform Platform // Build arguments to use in the build. BuildArgs []BuildArg // Target build stage to build. Target string // Secrets to pass to the build. // // They will be mounted at /run/secrets/[secret-name]. Secrets []*Secret } // Builds a new Docker container from this directory. func (r *Directory) DockerBuild(opts ...DirectoryDockerBuildOpts) *Container { q := r.q.Select("dockerBuild") for i := len(opts) - 1; i >= 0; i-- { // `dockerfile` optional argument if !querybuilder.IsZeroValue(opts[i].Dockerfile) { q = q.Arg("dockerfile", opts[i].Dockerfile) } // `platform` optional argument if !querybuilder.IsZeroValue(opts[i].Platform) { q = q.Arg("platform", opts[i].Platform) } // `buildArgs` optional argument if !querybuilder.IsZeroValue(opts[i].BuildArgs) { q = q.Arg("buildArgs", opts[i].BuildArgs) } // `target` optional argument if !querybuilder.IsZeroValue(opts[i].Target) { q = q.Arg("target", opts[i].Target) } // `secrets` optional argument if !querybuilder.IsZeroValue(opts[i].Secrets) { q = q.Arg("secrets", opts[i].Secrets) } } return &Container{ q: q, c: r.c, } } // DirectoryEntriesOpts contains options for Directory.Entries type DirectoryEntriesOpts struct { // Location of the directory to look at (e.g., "/src"). Path string } // Returns a list of files and directories at the given path. func (r *Directory) Entries(ctx context.Context, opts ...DirectoryEntriesOpts) ([]string, error) { q := r.q.Select("entries") for i := len(opts) - 1; i >= 0; i-- { // `path` optional argument if !querybuilder.IsZeroValue(opts[i].Path) { q = q.Arg("path", opts[i].Path) } } var response []string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Writes the contents of the directory to a path on the host. func (r *Directory) Export(ctx context.Context, path string) (bool, error) { if r.export != nil { return *r.export, nil } q := r.q.Select("export") q = q.Arg("path", path) var response bool q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Retrieves a file at the given path. func (r *Directory) File(path string) *File { q := r.q.Select("file") q = q.Arg("path", path) return &File{ q: q, c: r.c, } } // The content-addressed identifier of the directory. func (r *Directory) ID(ctx context.Context) (DirectoryID, error) { if r.id != nil { return *r.id, nil } q := r.q.Select("id") var response DirectoryID q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // XXX_GraphQLType is an internal function. It returns the native GraphQL type name func (r *Directory) XXX_GraphQLType() string { return "Directory" } // XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object func (r *Directory) XXX_GraphQLIDType() string { return "DirectoryID" } // XXX_GraphQLID is an internal function. It returns the underlying type ID func (r *Directory) XXX_GraphQLID(ctx context.Context) (string, error) { id, err := r.ID(ctx) if err != nil { return "", err } return string(id), nil } func (r *Directory) MarshalJSON() ([]byte, error) { id, err := r.ID(context.Background()) if err != nil { return nil, err } return json.Marshal(id) } // DirectoryPipelineOpts contains options for Directory.Pipeline type DirectoryPipelineOpts struct { // Pipeline description. Description string // Pipeline labels. Labels []PipelineLabel } // Creates a named sub-pipeline func (r *Directory) Pipeline(name string, opts ...DirectoryPipelineOpts) *Directory { q := r.q.Select("pipeline") for i := len(opts) - 1; i >= 0; i-- { // `description` optional argument if !querybuilder.IsZeroValue(opts[i].Description) { q = q.Arg("description", opts[i].Description) } // `labels` optional argument if !querybuilder.IsZeroValue(opts[i].Labels) { q = q.Arg("labels", opts[i].Labels) } } q = q.Arg("name", name) return &Directory{ q: q, c: r.c, } } // Force evaluation in the engine. func (r *Directory) Sync(ctx context.Context) (*Directory, error) { q := r.q.Select("sync") return r, q.Execute(ctx, r.c) } // DirectoryWithDirectoryOpts contains options for Directory.WithDirectory type DirectoryWithDirectoryOpts struct { // Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]). Exclude []string // Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]). Include []string } // Retrieves this directory plus a directory written at the given path. func (r *Directory) WithDirectory(path string, directory *Directory, opts ...DirectoryWithDirectoryOpts) *Directory { assertNotNil("directory", directory) q := r.q.Select("withDirectory") for i := len(opts) - 1; i >= 0; i-- { // `exclude` optional argument if !querybuilder.IsZeroValue(opts[i].Exclude) { q = q.Arg("exclude", opts[i].Exclude) } // `include` optional argument if !querybuilder.IsZeroValue(opts[i].Include) { q = q.Arg("include", opts[i].Include) } } q = q.Arg("path", path) q = q.Arg("directory", directory) return &Directory{ q: q, c: r.c, } } // DirectoryWithFileOpts contains options for Directory.WithFile type DirectoryWithFileOpts struct { // Permission given to the copied file (e.g., 0600). // // Default: 0644. Permissions int } // Retrieves this directory plus the contents of the given file copied to the given path. func (r *Directory) WithFile(path string, source *File, opts ...DirectoryWithFileOpts) *Directory { assertNotNil("source", source) q := r.q.Select("withFile") for i := len(opts) - 1; i >= 0; i-- { // `permissions` optional argument if !querybuilder.IsZeroValue(opts[i].Permissions) { q = q.Arg("permissions", opts[i].Permissions) } } q = q.Arg("path", path) q = q.Arg("source", source) return &Directory{ q: q, c: r.c, } } // DirectoryWithNewDirectoryOpts contains options for Directory.WithNewDirectory type DirectoryWithNewDirectoryOpts struct { // Permission granted to the created directory (e.g., 0777). // // Default: 0755. Permissions int } // Retrieves this directory plus a new directory created at the given path. func (r *Directory) WithNewDirectory(path string, opts ...DirectoryWithNewDirectoryOpts) *Directory { q := r.q.Select("withNewDirectory") for i := len(opts) - 1; i >= 0; i-- { // `permissions` optional argument if !querybuilder.IsZeroValue(opts[i].Permissions) { q = q.Arg("permissions", opts[i].Permissions) } } q = q.Arg("path", path) return &Directory{ q: q, c: r.c, } } // DirectoryWithNewFileOpts contains options for Directory.WithNewFile type DirectoryWithNewFileOpts struct { // Permission given to the copied file (e.g., 0600). // // Default: 0644. Permissions int } // Retrieves this directory plus a new file written at the given path. func (r *Directory) WithNewFile(path string, contents string, opts ...DirectoryWithNewFileOpts) *Directory { q := r.q.Select("withNewFile") for i := len(opts) - 1; i >= 0; i-- { // `permissions` optional argument if !querybuilder.IsZeroValue(opts[i].Permissions) { q = q.Arg("permissions", opts[i].Permissions) } } q = q.Arg("path", path) q = q.Arg("contents", contents) return &Directory{ q: q, c: r.c, } } // Retrieves this directory with all file/dir timestamps set to the given time. func (r *Directory) WithTimestamps(timestamp int) *Directory { q := r.q.Select("withTimestamps") q = q.Arg("timestamp", timestamp) return &Directory{ q: q, c: r.c, } } // Retrieves this directory with the directory at the given path removed. func (r *Directory) WithoutDirectory(path string) *Directory { q := r.q.Select("withoutDirectory") q = q.Arg("path", path) return &Directory{ q: q, c: r.c, } } // Retrieves this directory with the file at the given path removed. func (r *Directory) WithoutFile(path string) *Directory { q := r.q.Select("withoutFile") q = q.Arg("path", path) return &Directory{ q: q, c: r.c, } } // A simple key value object that represents an environment variable. type EnvVariable struct { q *querybuilder.Selection c graphql.Client name *string value *string } // The environment variable name. func (r *EnvVariable) Name(ctx context.Context) (string, error) { if r.name != nil { return *r.name, nil } q := r.q.Select("name") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The environment variable value. func (r *EnvVariable) Value(ctx context.Context) (string, error) { if r.value != nil { return *r.value, nil } q := r.q.Select("value") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // A definition of a field on a custom object defined in a Module. // A field on an object has a static value, as opposed to a function on an // object whose value is computed by invoking code (and can accept arguments). type FieldTypeDef struct { q *querybuilder.Selection c graphql.Client description *string name *string } // A doc string for the field, if any func (r *FieldTypeDef) Description(ctx context.Context) (string, error) { if r.description != nil { return *r.description, nil } q := r.q.Select("description") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The name of the field in the object func (r *FieldTypeDef) Name(ctx context.Context) (string, error) { if r.name != nil { return *r.name, nil } q := r.q.Select("name") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The type of the field func (r *FieldTypeDef) TypeDef() *TypeDef { q := r.q.Select("typeDef") return &TypeDef{ q: q, c: r.c, } } // A file. type File struct { q *querybuilder.Selection c graphql.Client contents *string export *bool id *FileID size *int sync *FileID } type WithFileFunc func(r *File) *File // With calls the provided function with current File. // // This is useful for reusability and readability by not breaking the calling chain. func (r *File) With(f WithFileFunc) *File { return f(r) } // Retrieves the contents of the file. func (r *File) Contents(ctx context.Context) (string, error) { if r.contents != nil { return *r.contents, nil } q := r.q.Select("contents") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // FileExportOpts contains options for File.Export type FileExportOpts struct { // If allowParentDirPath is true, the path argument can be a directory path, in which case // the file will be created in that directory. AllowParentDirPath bool } // Writes the file to a file path on the host. func (r *File) Export(ctx context.Context, path string, opts ...FileExportOpts) (bool, error) { if r.export != nil { return *r.export, nil } q := r.q.Select("export") for i := len(opts) - 1; i >= 0; i-- { // `allowParentDirPath` optional argument if !querybuilder.IsZeroValue(opts[i].AllowParentDirPath) { q = q.Arg("allowParentDirPath", opts[i].AllowParentDirPath) } } q = q.Arg("path", path) var response bool q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Retrieves the content-addressed identifier of the file. func (r *File) ID(ctx context.Context) (FileID, error) { if r.id != nil { return *r.id, nil } q := r.q.Select("id") var response FileID q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // XXX_GraphQLType is an internal function. It returns the native GraphQL type name func (r *File) XXX_GraphQLType() string { return "File" } // XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object func (r *File) XXX_GraphQLIDType() string { return "FileID" } // XXX_GraphQLID is an internal function. It returns the underlying type ID func (r *File) XXX_GraphQLID(ctx context.Context) (string, error) { id, err := r.ID(ctx) if err != nil { return "", err } return string(id), nil } func (r *File) MarshalJSON() ([]byte, error) { id, err := r.ID(context.Background()) if err != nil { return nil, err } return json.Marshal(id) } // Gets the size of the file, in bytes. func (r *File) Size(ctx context.Context) (int, error) { if r.size != nil { return *r.size, nil } q := r.q.Select("size") var response int q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Force evaluation in the engine. func (r *File) Sync(ctx context.Context) (*File, error) { q := r.q.Select("sync") return r, q.Execute(ctx, r.c) } // Retrieves this file with its created/modified timestamps set to the given time. func (r *File) WithTimestamps(timestamp int) *File { q := r.q.Select("withTimestamps") q = q.Arg("timestamp", timestamp) return &File{ q: q, c: r.c, } } // Function represents a resolver provided by a Module. // // A function always evaluates against a parent object and is given a set of // named arguments. type Function struct { q *querybuilder.Selection c graphql.Client description *string id *FunctionID name *string } type WithFunctionFunc func(r *Function) *Function // With calls the provided function with current Function. // // This is useful for reusability and readability by not breaking the calling chain. func (r *Function) With(f WithFunctionFunc) *Function { return f(r) } // Arguments accepted by this function, if any func (r *Function) Args(ctx context.Context) ([]FunctionArg, error) { q := r.q.Select("args") q = q.Select("id") type args struct { Id FunctionArgID } convert := func(fields []args) []FunctionArg { out := []FunctionArg{} for i := range fields { val := FunctionArg{id: &fields[i].Id} val.q = querybuilder.Query().Select("loadFunctionArgFromID").Arg("id", fields[i].Id) val.c = r.c out = append(out, val) } return out } var response []args q = q.Bind(&response) err := q.Execute(ctx, r.c) if err != nil { return nil, err } return convert(response), nil } // A doc string for the function, if any func (r *Function) Description(ctx context.Context) (string, error) { if r.description != nil { return *r.description, nil } q := r.q.Select("description") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The ID of the function func (r *Function) ID(ctx context.Context) (FunctionID, error) { if r.id != nil { return *r.id, nil } q := r.q.Select("id") var response FunctionID q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // XXX_GraphQLType is an internal function. It returns the native GraphQL type name func (r *Function) XXX_GraphQLType() string { return "Function" } // XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object func (r *Function) XXX_GraphQLIDType() string { return "FunctionID" } // XXX_GraphQLID is an internal function. It returns the underlying type ID func (r *Function) XXX_GraphQLID(ctx context.Context) (string, error) { id, err := r.ID(ctx) if err != nil { return "", err } return string(id), nil } func (r *Function) MarshalJSON() ([]byte, error) { id, err := r.ID(context.Background()) if err != nil { return nil, err } return json.Marshal(id) } // The name of the function func (r *Function) Name(ctx context.Context) (string, error) { if r.name != nil { return *r.name, nil } q := r.q.Select("name") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The type returned by this function func (r *Function) ReturnType() *TypeDef { q := r.q.Select("returnType") return &TypeDef{ q: q, c: r.c, } } // FunctionWithArgOpts contains options for Function.WithArg type FunctionWithArgOpts struct { // A doc string for the argument, if any Description string // A default value to use for this argument if not explicitly set by the caller, if any DefaultValue JSON } // Returns the function with the provided argument func (r *Function) WithArg(name string, typeDef *TypeDef, opts ...FunctionWithArgOpts) *Function { assertNotNil("typeDef", typeDef) q := r.q.Select("withArg") for i := len(opts) - 1; i >= 0; i-- { // `description` optional argument if !querybuilder.IsZeroValue(opts[i].Description) { q = q.Arg("description", opts[i].Description) } // `defaultValue` optional argument if !querybuilder.IsZeroValue(opts[i].DefaultValue) { q = q.Arg("defaultValue", opts[i].DefaultValue) } } q = q.Arg("name", name) q = q.Arg("typeDef", typeDef) return &Function{ q: q, c: r.c, } } // Returns the function with the doc string func (r *Function) WithDescription(description string) *Function { q := r.q.Select("withDescription") q = q.Arg("description", description) return &Function{ q: q, c: r.c, } } // An argument accepted by a function. // // This is a specification for an argument at function definition time, not an // argument passed at function call time. type FunctionArg struct { q *querybuilder.Selection c graphql.Client defaultValue *JSON description *string id *FunctionArgID name *string } // A default value to use for this argument when not explicitly set by the caller, if any func (r *FunctionArg) DefaultValue(ctx context.Context) (JSON, error) { if r.defaultValue != nil { return *r.defaultValue, nil } q := r.q.Select("defaultValue") var response JSON q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // A doc string for the argument, if any func (r *FunctionArg) Description(ctx context.Context) (string, error) { if r.description != nil { return *r.description, nil } q := r.q.Select("description") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The ID of the argument func (r *FunctionArg) ID(ctx context.Context) (FunctionArgID, error) { if r.id != nil { return *r.id, nil } q := r.q.Select("id") var response FunctionArgID q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // XXX_GraphQLType is an internal function. It returns the native GraphQL type name func (r *FunctionArg) XXX_GraphQLType() string { return "FunctionArg" } // XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object func (r *FunctionArg) XXX_GraphQLIDType() string { return "FunctionArgID" } // XXX_GraphQLID is an internal function. It returns the underlying type ID func (r *FunctionArg) XXX_GraphQLID(ctx context.Context) (string, error) { id, err := r.ID(ctx) if err != nil { return "", err } return string(id), nil } func (r *FunctionArg) MarshalJSON() ([]byte, error) { id, err := r.ID(context.Background()) if err != nil { return nil, err } return json.Marshal(id) } // The name of the argument func (r *FunctionArg) Name(ctx context.Context) (string, error) { if r.name != nil { return *r.name, nil } q := r.q.Select("name") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The type of the argument func (r *FunctionArg) TypeDef() *TypeDef { q := r.q.Select("typeDef") return &TypeDef{ q: q, c: r.c, } } type FunctionCall struct { q *querybuilder.Selection c graphql.Client name *string parent *JSON parentName *string returnValue *Void } // The argument values the function is being invoked with. func (r *FunctionCall) InputArgs(ctx context.Context) ([]FunctionCallArgValue, error) { q := r.q.Select("inputArgs") q = q.Select("name value") type inputArgs struct { Name string Value JSON } convert := func(fields []inputArgs) []FunctionCallArgValue { out := []FunctionCallArgValue{} for i := range fields { val := FunctionCallArgValue{name: &fields[i].Name, value: &fields[i].Value} out = append(out, val) } return out } var response []inputArgs q = q.Bind(&response) err := q.Execute(ctx, r.c) if err != nil { return nil, err } return convert(response), nil } // The name of the function being called. func (r *FunctionCall) Name(ctx context.Context) (string, error) { if r.name != nil { return *r.name, nil } q := r.q.Select("name") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The value of the parent object of the function being called. // If the function is "top-level" to the module, this is always an empty object. func (r *FunctionCall) Parent(ctx context.Context) (JSON, error) { if r.parent != nil { return *r.parent, nil } q := r.q.Select("parent") var response JSON q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The name of the parent object of the function being called. // If the function is "top-level" to the module, this is the name of the module. func (r *FunctionCall) ParentName(ctx context.Context) (string, error) { if r.parentName != nil { return *r.parentName, nil } q := r.q.Select("parentName") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Set the return value of the function call to the provided value. // The value should be a string of the JSON serialization of the return value. func (r *FunctionCall) ReturnValue(ctx context.Context, value JSON) (Void, error) { if r.returnValue != nil { return *r.returnValue, nil } q := r.q.Select("returnValue") q = q.Arg("value", value) var response Void q = q.Bind(&response) return response, q.Execute(ctx, r.c) } type FunctionCallArgValue struct { q *querybuilder.Selection c graphql.Client name *string value *JSON } // The name of the argument. func (r *FunctionCallArgValue) Name(ctx context.Context) (string, error) { if r.name != nil { return *r.name, nil } q := r.q.Select("name") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The value of the argument represented as a string of the JSON serialization. func (r *FunctionCallArgValue) Value(ctx context.Context) (JSON, error) { if r.value != nil { return *r.value, nil } q := r.q.Select("value") var response JSON q = q.Bind(&response) return response, q.Execute(ctx, r.c) } type GeneratedCode struct { q *querybuilder.Selection c graphql.Client id *GeneratedCodeID } type WithGeneratedCodeFunc func(r *GeneratedCode) *GeneratedCode // With calls the provided function with current GeneratedCode. // // This is useful for reusability and readability by not breaking the calling chain. func (r *GeneratedCode) With(f WithGeneratedCodeFunc) *GeneratedCode { return f(r) } // The directory containing the generated code func (r *GeneratedCode) Code() *Directory { q := r.q.Select("code") return &Directory{ q: q, c: r.c, } } func (r *GeneratedCode) ID(ctx context.Context) (GeneratedCodeID, error) { if r.id != nil { return *r.id, nil } q := r.q.Select("id") var response GeneratedCodeID q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // XXX_GraphQLType is an internal function. It returns the native GraphQL type name func (r *GeneratedCode) XXX_GraphQLType() string { return "GeneratedCode" } // XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object func (r *GeneratedCode) XXX_GraphQLIDType() string { return "GeneratedCodeID" } // XXX_GraphQLID is an internal function. It returns the underlying type ID func (r *GeneratedCode) XXX_GraphQLID(ctx context.Context) (string, error) { id, err := r.ID(ctx) if err != nil { return "", err } return string(id), nil } func (r *GeneratedCode) MarshalJSON() ([]byte, error) { id, err := r.ID(context.Background()) if err != nil { return nil, err } return json.Marshal(id) } // List of paths to mark generated in version control (i.e. .gitattributes) func (r *GeneratedCode) VcsGeneratedPaths(ctx context.Context) ([]string, error) { q := r.q.Select("vcsGeneratedPaths") var response []string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // List of paths to ignore in version control (i.e. .gitignore) func (r *GeneratedCode) VcsIgnoredPaths(ctx context.Context) ([]string, error) { q := r.q.Select("vcsIgnoredPaths") var response []string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Set the list of paths to mark generated in version control func (r *GeneratedCode) WithVCSGeneratedPaths(paths []string) *GeneratedCode { q := r.q.Select("withVCSGeneratedPaths") q = q.Arg("paths", paths) return &GeneratedCode{ q: q, c: r.c, } } // Set the list of paths to ignore in version control func (r *GeneratedCode) WithVCSIgnoredPaths(paths []string) *GeneratedCode { q := r.q.Select("withVCSIgnoredPaths") q = q.Arg("paths", paths) return &GeneratedCode{ q: q, c: r.c, } } // A git ref (tag, branch or commit). type GitRef struct { q *querybuilder.Selection c graphql.Client } // GitRefTreeOpts contains options for GitRef.Tree type GitRefTreeOpts struct { SSHKnownHosts string SSHAuthSocket *Socket } // The filesystem tree at this ref. func (r *GitRef) Tree(opts ...GitRefTreeOpts) *Directory { q := r.q.Select("tree") for i := len(opts) - 1; i >= 0; i-- { // `sshKnownHosts` optional argument if !querybuilder.IsZeroValue(opts[i].SSHKnownHosts) { q = q.Arg("sshKnownHosts", opts[i].SSHKnownHosts) } // `sshAuthSocket` optional argument if !querybuilder.IsZeroValue(opts[i].SSHAuthSocket) { q = q.Arg("sshAuthSocket", opts[i].SSHAuthSocket) } } return &Directory{ q: q, c: r.c, } } // A git repository. type GitRepository struct { q *querybuilder.Selection c graphql.Client } // Returns details on one branch. func (r *GitRepository) Branch(name string) *GitRef { q := r.q.Select("branch") q = q.Arg("name", name) return &GitRef{ q: q, c: r.c, } } // Returns details on one commit. func (r *GitRepository) Commit(id string) *GitRef { q := r.q.Select("commit") q = q.Arg("id", id) return &GitRef{ q: q, c: r.c, } } // Returns details on one tag. func (r *GitRepository) Tag(name string) *GitRef { q := r.q.Select("tag") q = q.Arg("name", name) return &GitRef{ q: q, c: r.c, } } // Information about the host execution environment. type Host struct { q *querybuilder.Selection c graphql.Client } // HostDirectoryOpts contains options for Host.Directory type HostDirectoryOpts struct { // Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]). Exclude []string // Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]). Include []string } // Accesses a directory on the host. func (r *Host) Directory(path string, opts ...HostDirectoryOpts) *Directory { q := r.q.Select("directory") for i := len(opts) - 1; i >= 0; i-- { // `exclude` optional argument if !querybuilder.IsZeroValue(opts[i].Exclude) { q = q.Arg("exclude", opts[i].Exclude) } // `include` optional argument if !querybuilder.IsZeroValue(opts[i].Include) { q = q.Arg("include", opts[i].Include) } } q = q.Arg("path", path) return &Directory{ q: q, c: r.c, } } // Accesses a file on the host. func (r *Host) File(path string) *File { q := r.q.Select("file") q = q.Arg("path", path) return &File{ q: q, c: r.c, } } // HostServiceOpts contains options for Host.Service type HostServiceOpts struct { // Upstream host to forward traffic to. Host string } // Creates a service that forwards traffic to a specified address via the host. func (r *Host) Service(ports []PortForward, opts ...HostServiceOpts) *Service { q := r.q.Select("service") for i := len(opts) - 1; i >= 0; i-- { // `host` optional argument if !querybuilder.IsZeroValue(opts[i].Host) { q = q.Arg("host", opts[i].Host) } } q = q.Arg("ports", ports) return &Service{ q: q, c: r.c, } } // Sets a secret given a user-defined name and the file path on the host, and returns the secret. // The file is limited to a size of 512000 bytes. func (r *Host) SetSecretFile(name string, path string) *Secret { q := r.q.Select("setSecretFile") q = q.Arg("name", name) q = q.Arg("path", path) return &Secret{ q: q, c: r.c, } } // HostTunnelOpts contains options for Host.Tunnel type HostTunnelOpts struct { // Map each service port to the same port on the host, as if the service were // running natively. // // Note: enabling may result in port conflicts. Native bool // Configure explicit port forwarding rules for the tunnel. // // If a port's frontend is unspecified or 0, a random port will be chosen by // the host. // // If no ports are given, all of the service's ports are forwarded. If native // is true, each port maps to the same port on the host. If native is false, // each port maps to a random port chosen by the host. // // If ports are given and native is true, the ports are additive. Ports []PortForward } // Creates a tunnel that forwards traffic from the host to a service. func (r *Host) Tunnel(service *Service, opts ...HostTunnelOpts) *Service { assertNotNil("service", service) q := r.q.Select("tunnel") for i := len(opts) - 1; i >= 0; i-- { // `native` optional argument if !querybuilder.IsZeroValue(opts[i].Native) { q = q.Arg("native", opts[i].Native) } // `ports` optional argument if !querybuilder.IsZeroValue(opts[i].Ports) { q = q.Arg("ports", opts[i].Ports) } } q = q.Arg("service", service) return &Service{ q: q, c: r.c, } } // Accesses a Unix socket on the host. func (r *Host) UnixSocket(path string) *Socket { q := r.q.Select("unixSocket") q = q.Arg("path", path) return &Socket{ q: q, c: r.c, } } // A simple key value object that represents a label. type Label struct { q *querybuilder.Selection c graphql.Client name *string value *string } // The label name. func (r *Label) Name(ctx context.Context) (string, error) { if r.name != nil { return *r.name, nil } q := r.q.Select("name") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The label value. func (r *Label) Value(ctx context.Context) (string, error) { if r.value != nil { return *r.value, nil } q := r.q.Select("value") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // A definition of a list type in a Module. type ListTypeDef struct { q *querybuilder.Selection c graphql.Client } // The type of the elements in the list func (r *ListTypeDef) ElementTypeDef() *TypeDef { q := r.q.Select("elementTypeDef") return &TypeDef{ q: q, c: r.c, } } type Module struct { q *querybuilder.Selection c graphql.Client description *string id *ModuleID name *string sdk *string serve *Void sourceDirectorySubPath *string } type WithModuleFunc func(r *Module) *Module // With calls the provided function with current Module. // // This is useful for reusability and readability by not breaking the calling chain. func (r *Module) With(f WithModuleFunc) *Module { return f(r) } // Modules used by this module func (r *Module) Dependencies(ctx context.Context) ([]Module, error) { q := r.q.Select("dependencies") q = q.Select("id") type dependencies struct { Id ModuleID } convert := func(fields []dependencies) []Module { out := []Module{} for i := range fields { val := Module{id: &fields[i].Id} val.q = querybuilder.Query().Select("loadModuleFromID").Arg("id", fields[i].Id) val.c = r.c out = append(out, val) } return out } var response []dependencies q = q.Bind(&response) err := q.Execute(ctx, r.c) if err != nil { return nil, err } return convert(response), nil } // The dependencies as configured by the module func (r *Module) DependencyConfig(ctx context.Context) ([]string, error) { q := r.q.Select("dependencyConfig") var response []string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The doc string of the module, if any func (r *Module) Description(ctx context.Context) (string, error) { if r.description != nil { return *r.description, nil } q := r.q.Select("description") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The code generated by the SDK's runtime func (r *Module) GeneratedCode() *GeneratedCode { q := r.q.Select("generatedCode") return &GeneratedCode{ q: q, c: r.c, } } // The ID of the module func (r *Module) ID(ctx context.Context) (ModuleID, error) { if r.id != nil { return *r.id, nil } q := r.q.Select("id") var response ModuleID q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // XXX_GraphQLType is an internal function. It returns the native GraphQL type name func (r *Module) XXX_GraphQLType() string { return "Module" } // XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object func (r *Module) XXX_GraphQLIDType() string { return "ModuleID" } // XXX_GraphQLID is an internal function. It returns the underlying type ID func (r *Module) XXX_GraphQLID(ctx context.Context) (string, error) { id, err := r.ID(ctx) if err != nil { return "", err } return string(id), nil } func (r *Module) MarshalJSON() ([]byte, error) { id, err := r.ID(context.Background()) if err != nil { return nil, err } return json.Marshal(id) } // The name of the module func (r *Module) Name(ctx context.Context) (string, error) { if r.name != nil { return *r.name, nil } q := r.q.Select("name") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Objects served by this module func (r *Module) Objects(ctx context.Context) ([]TypeDef, error) { q := r.q.Select("objects") q = q.Select("id") type objects struct { Id TypeDefID } convert := func(fields []objects) []TypeDef { out := []TypeDef{} for i := range fields { val := TypeDef{id: &fields[i].Id} val.q = querybuilder.Query().Select("loadTypeDefFromID").Arg("id", fields[i].Id) val.c = r.c out = append(out, val) } return out } var response []objects q = q.Bind(&response) err := q.Execute(ctx, r.c) if err != nil { return nil, err } return convert(response), nil } // The SDK used by this module. Either a name of a builtin SDK or a module ref pointing to the SDK's implementation. func (r *Module) SDK(ctx context.Context) (string, error) { if r.sdk != nil { return *r.sdk, nil } q := r.q.Select("sdk") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Serve a module's API in the current session. // // Note: this can only be called once per session. // In the future, it could return a stream or service to remove the side effect. func (r *Module) Serve(ctx context.Context) (Void, error) { if r.serve != nil { return *r.serve, nil } q := r.q.Select("serve") var response Void q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The directory containing the module's source code func (r *Module) SourceDirectory() *Directory { q := r.q.Select("sourceDirectory") return &Directory{ q: q, c: r.c, } } // The module's subpath within the source directory func (r *Module) SourceDirectorySubPath(ctx context.Context) (string, error) { if r.sourceDirectorySubPath != nil { return *r.sourceDirectorySubPath, nil } q := r.q.Select("sourceDirectorySubPath") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // This module plus the given Object type and associated functions func (r *Module) WithObject(object *TypeDef) *Module { assertNotNil("object", object) q := r.q.Select("withObject") q = q.Arg("object", object) return &Module{ q: q, c: r.c, } } // Static configuration for a module (e.g. parsed contents of dagger.json) type ModuleConfig struct { q *querybuilder.Selection c graphql.Client name *string root *string sdk *string } // Modules that this module depends on. func (r *ModuleConfig) Dependencies(ctx context.Context) ([]string, error) { q := r.q.Select("dependencies") var response []string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Exclude these file globs when loading the module root. func (r *ModuleConfig) Exclude(ctx context.Context) ([]string, error) { q := r.q.Select("exclude") var response []string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Include only these file globs when loading the module root. func (r *ModuleConfig) Include(ctx context.Context) ([]string, error) { q := r.q.Select("include") var response []string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The name of the module. func (r *ModuleConfig) Name(ctx context.Context) (string, error) { if r.name != nil { return *r.name, nil } q := r.q.Select("name") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The root directory of the module's project, which may be above the module source code. func (r *ModuleConfig) Root(ctx context.Context) (string, error) { if r.root != nil { return *r.root, nil } q := r.q.Select("root") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Either the name of a built-in SDK ('go', 'python', etc.) OR a module reference pointing to the SDK's module implementation. func (r *ModuleConfig) SDK(ctx context.Context) (string, error) { if r.sdk != nil { return *r.sdk, nil } q := r.q.Select("sdk") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // A definition of a custom object defined in a Module. type ObjectTypeDef struct { q *querybuilder.Selection c graphql.Client description *string name *string } // The doc string for the object, if any func (r *ObjectTypeDef) Description(ctx context.Context) (string, error) { if r.description != nil { return *r.description, nil } q := r.q.Select("description") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Static fields defined on this object, if any func (r *ObjectTypeDef) Fields(ctx context.Context) ([]FieldTypeDef, error) { q := r.q.Select("fields") q = q.Select("description name") type fields struct { Description string Name string } convert := func(fields []fields) []FieldTypeDef { out := []FieldTypeDef{} for i := range fields { val := FieldTypeDef{description: &fields[i].Description, name: &fields[i].Name} out = append(out, val) } return out } var response []fields q = q.Bind(&response) err := q.Execute(ctx, r.c) if err != nil { return nil, err } return convert(response), nil } // Functions defined on this object, if any func (r *ObjectTypeDef) Functions(ctx context.Context) ([]Function, error) { q := r.q.Select("functions") q = q.Select("id") type functions struct { Id FunctionID } convert := func(fields []functions) []Function { out := []Function{} for i := range fields { val := Function{id: &fields[i].Id} val.q = querybuilder.Query().Select("loadFunctionFromID").Arg("id", fields[i].Id) val.c = r.c out = append(out, val) } return out } var response []functions q = q.Bind(&response) err := q.Execute(ctx, r.c) if err != nil { return nil, err } return convert(response), nil } // The name of the object func (r *ObjectTypeDef) Name(ctx context.Context) (string, error) { if r.name != nil { return *r.name, nil } q := r.q.Select("name") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // A port exposed by a container. type Port struct { q *querybuilder.Selection c graphql.Client description *string port *int protocol *NetworkProtocol } // The port description. func (r *Port) Description(ctx context.Context) (string, error) { if r.description != nil { return *r.description, nil } q := r.q.Select("description") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The port number. func (r *Port) Port(ctx context.Context) (int, error) { if r.port != nil { return *r.port, nil } q := r.q.Select("port") var response int q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The transport layer network protocol. func (r *Port) Protocol(ctx context.Context) (NetworkProtocol, error) { if r.protocol != nil { return *r.protocol, nil } q := r.q.Select("protocol") var response NetworkProtocol q = q.Bind(&response) return response, q.Execute(ctx, r.c) } type WithClientFunc func(r *Client) *Client // With calls the provided function with current Client. // // This is useful for reusability and readability by not breaking the calling chain. func (r *Client) With(f WithClientFunc) *Client { return f(r) } // Constructs a cache volume for a given cache key. func (r *Client) CacheVolume(key string) *CacheVolume { q := r.q.Select("cacheVolume") q = q.Arg("key", key) return &CacheVolume{ q: q, c: r.c, } } // Checks if the current Dagger Engine is compatible with an SDK's required version. func (r *Client) CheckVersionCompatibility(ctx context.Context, version string) (bool, error) { q := r.q.Select("checkVersionCompatibility") q = q.Arg("version", version) var response bool q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // ContainerOpts contains options for Client.Container type ContainerOpts struct { ID ContainerID Platform Platform } // Creates a scratch container or loads one by ID. // // Optional platform argument initializes new containers to execute and publish // as that platform. Platform defaults to that of the builder's host. func (r *Client) Container(opts ...ContainerOpts) *Container { q := r.q.Select("container") for i := len(opts) - 1; i >= 0; i-- { // `id` optional argument if !querybuilder.IsZeroValue(opts[i].ID) { q = q.Arg("id", opts[i].ID) } // `platform` optional argument if !querybuilder.IsZeroValue(opts[i].Platform) { q = q.Arg("platform", opts[i].Platform) } } return &Container{ q: q, c: r.c, } } // The FunctionCall context that the SDK caller is currently executing in. // If the caller is not currently executing in a function, this will return // an error. func (r *Client) CurrentFunctionCall() *FunctionCall { q := r.q.Select("currentFunctionCall") return &FunctionCall{ q: q, c: r.c, } } // The module currently being served in the session, if any. func (r *Client) CurrentModule() *Module { q := r.q.Select("currentModule") return &Module{ q: q, c: r.c, } } // The default platform of the builder. func (r *Client) DefaultPlatform(ctx context.Context) (Platform, error) { q := r.q.Select("defaultPlatform") var response Platform q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // DirectoryOpts contains options for Client.Directory type DirectoryOpts struct { ID DirectoryID } // Creates an empty directory or loads one by ID. func (r *Client) Directory(opts ...DirectoryOpts) *Directory { q := r.q.Select("directory") for i := len(opts) - 1; i >= 0; i-- { // `id` optional argument if !querybuilder.IsZeroValue(opts[i].ID) { q = q.Arg("id", opts[i].ID) } } return &Directory{ q: q, c: r.c, } } // Loads a file by ID. // // Deprecated: Use LoadFileFromID instead. func (r *Client) File(id FileID) *File { q := r.q.Select("file") q = q.Arg("id", id) return &File{ q: q, c: r.c, } } // Create a function. func (r *Client) Function(name string, returnType *TypeDef) *Function { assertNotNil("returnType", returnType) q := r.q.Select("function") q = q.Arg("name", name) q = q.Arg("returnType", returnType) return &Function{ q: q, c: r.c, } } // Create a code generation result, given a directory containing the generated // code. func (r *Client) GeneratedCode(code *Directory) *GeneratedCode { assertNotNil("code", code) q := r.q.Select("generatedCode") q = q.Arg("code", code) return &GeneratedCode{ q: q, c: r.c, } } // GitOpts contains options for Client.Git type GitOpts struct { // Set to true to keep .git directory. KeepGitDir bool // A service which must be started before the repo is fetched. ExperimentalServiceHost *Service } // Queries a git repository. func (r *Client) Git(url string, opts ...GitOpts) *GitRepository { q := r.q.Select("git") for i := len(opts) - 1; i >= 0; i-- { // `keepGitDir` optional argument if !querybuilder.IsZeroValue(opts[i].KeepGitDir) { q = q.Arg("keepGitDir", opts[i].KeepGitDir) } // `experimentalServiceHost` optional argument if !querybuilder.IsZeroValue(opts[i].ExperimentalServiceHost) { q = q.Arg("experimentalServiceHost", opts[i].ExperimentalServiceHost) } } q = q.Arg("url", url) return &GitRepository{ q: q, c: r.c, } } // Queries the host environment. func (r *Client) Host() *Host { q := r.q.Select("host") return &Host{ q: q, c: r.c, } } // HTTPOpts contains options for Client.HTTP type HTTPOpts struct { // A service which must be started before the URL is fetched. ExperimentalServiceHost *Service } // Returns a file containing an http remote url content. func (r *Client) HTTP(url string, opts ...HTTPOpts) *File { q := r.q.Select("http") for i := len(opts) - 1; i >= 0; i-- { // `experimentalServiceHost` optional argument if !querybuilder.IsZeroValue(opts[i].ExperimentalServiceHost) { q = q.Arg("experimentalServiceHost", opts[i].ExperimentalServiceHost) } } q = q.Arg("url", url) return &File{ q: q, c: r.c, } } // Load a CacheVolume from its ID. func (r *Client) LoadCacheVolumeFromID(id CacheVolumeID) *CacheVolume { q := r.q.Select("loadCacheVolumeFromID") q = q.Arg("id", id) return &CacheVolume{ q: q, c: r.c, } } // Loads a container from an ID. func (r *Client) LoadContainerFromID(id ContainerID) *Container { q := r.q.Select("loadContainerFromID") q = q.Arg("id", id) return &Container{ q: q, c: r.c, } } // Load a Directory from its ID. func (r *Client) LoadDirectoryFromID(id DirectoryID) *Directory { q := r.q.Select("loadDirectoryFromID") q = q.Arg("id", id) return &Directory{ q: q, c: r.c, } } // Load a File from its ID. func (r *Client) LoadFileFromID(id FileID) *File { q := r.q.Select("loadFileFromID") q = q.Arg("id", id) return &File{ q: q, c: r.c, } } // Load a function argument by ID. func (r *Client) LoadFunctionArgFromID(id FunctionArgID) *FunctionArg { q := r.q.Select("loadFunctionArgFromID") q = q.Arg("id", id) return &FunctionArg{ q: q, c: r.c, } } // Load a function by ID. func (r *Client) LoadFunctionFromID(id FunctionID) *Function { q := r.q.Select("loadFunctionFromID") q = q.Arg("id", id) return &Function{ q: q, c: r.c, } } // Load a GeneratedCode by ID. func (r *Client) LoadGeneratedCodeFromID(id GeneratedCodeID) *GeneratedCode { q := r.q.Select("loadGeneratedCodeFromID") q = q.Arg("id", id) return &GeneratedCode{ q: q, c: r.c, } } // Load a module by ID. func (r *Client) LoadModuleFromID(id ModuleID) *Module { q := r.q.Select("loadModuleFromID") q = q.Arg("id", id) return &Module{ q: q, c: r.c, } } // Load a Secret from its ID. func (r *Client) LoadSecretFromID(id SecretID) *Secret { q := r.q.Select("loadSecretFromID") q = q.Arg("id", id) return &Secret{ q: q, c: r.c, } } // Loads a service from ID. func (r *Client) LoadServiceFromID(id ServiceID) *Service { q := r.q.Select("loadServiceFromID") q = q.Arg("id", id) return &Service{ q: q, c: r.c, } } // Load a Socket from its ID. func (r *Client) LoadSocketFromID(id SocketID) *Socket { q := r.q.Select("loadSocketFromID") q = q.Arg("id", id) return &Socket{ q: q, c: r.c, } } // Load a TypeDef by ID. func (r *Client) LoadTypeDefFromID(id TypeDefID) *TypeDef { q := r.q.Select("loadTypeDefFromID") q = q.Arg("id", id) return &TypeDef{ q: q, c: r.c, } } // Create a new module. func (r *Client) Module() *Module { q := r.q.Select("module") return &Module{ q: q, c: r.c, } } // ModuleConfigOpts contains options for Client.ModuleConfig type ModuleConfigOpts struct { Subpath string } // Load the static configuration for a module from the given source directory and optional subpath. func (r *Client) ModuleConfig(sourceDirectory *Directory, opts ...ModuleConfigOpts) *ModuleConfig { assertNotNil("sourceDirectory", sourceDirectory) q := r.q.Select("moduleConfig") for i := len(opts) - 1; i >= 0; i-- { // `subpath` optional argument if !querybuilder.IsZeroValue(opts[i].Subpath) { q = q.Arg("subpath", opts[i].Subpath) } } q = q.Arg("sourceDirectory", sourceDirectory) return &ModuleConfig{ q: q, c: r.c, } } // PipelineOpts contains options for Client.Pipeline type PipelineOpts struct { // Pipeline description. Description string // Pipeline labels. Labels []PipelineLabel } // Creates a named sub-pipeline. func (r *Client) Pipeline(name string, opts ...PipelineOpts) *Client { q := r.q.Select("pipeline") for i := len(opts) - 1; i >= 0; i-- { // `description` optional argument if !querybuilder.IsZeroValue(opts[i].Description) { q = q.Arg("description", opts[i].Description) } // `labels` optional argument if !querybuilder.IsZeroValue(opts[i].Labels) { q = q.Arg("labels", opts[i].Labels) } } q = q.Arg("name", name) return &Client{ q: q, c: r.c, } } // Loads a secret from its ID. // // Deprecated: Use LoadSecretFromID instead func (r *Client) Secret(id SecretID) *Secret { q := r.q.Select("secret") q = q.Arg("id", id) return &Secret{ q: q, c: r.c, } } // Sets a secret given a user defined name to its plaintext and returns the secret. // The plaintext value is limited to a size of 128000 bytes. func (r *Client) SetSecret(name string, plaintext string) *Secret { q := r.q.Select("setSecret") q = q.Arg("name", name) q = q.Arg("plaintext", plaintext) return &Secret{ q: q, c: r.c, } } // SocketOpts contains options for Client.Socket type SocketOpts struct { ID SocketID } // Loads a socket by its ID. // // Deprecated: Use LoadSocketFromID instead. func (r *Client) Socket(opts ...SocketOpts) *Socket { q := r.q.Select("socket") for i := len(opts) - 1; i >= 0; i-- { // `id` optional argument if !querybuilder.IsZeroValue(opts[i].ID) { q = q.Arg("id", opts[i].ID) } } return &Socket{ q: q, c: r.c, } } // Create a new TypeDef. func (r *Client) TypeDef() *TypeDef { q := r.q.Select("typeDef") return &TypeDef{ q: q, c: r.c, } } // A reference to a secret value, which can be handled more safely than the value itself. type Secret struct { q *querybuilder.Selection c graphql.Client id *SecretID plaintext *string } // The identifier for this secret. func (r *Secret) ID(ctx context.Context) (SecretID, error) { if r.id != nil { return *r.id, nil } q := r.q.Select("id") var response SecretID q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // XXX_GraphQLType is an internal function. It returns the native GraphQL type name func (r *Secret) XXX_GraphQLType() string { return "Secret" } // XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object func (r *Secret) XXX_GraphQLIDType() string { return "SecretID" } // XXX_GraphQLID is an internal function. It returns the underlying type ID func (r *Secret) XXX_GraphQLID(ctx context.Context) (string, error) { id, err := r.ID(ctx) if err != nil { return "", err } return string(id), nil } func (r *Secret) MarshalJSON() ([]byte, error) { id, err := r.ID(context.Background()) if err != nil { return nil, err } return json.Marshal(id) } // The value of this secret. func (r *Secret) Plaintext(ctx context.Context) (string, error) { if r.plaintext != nil { return *r.plaintext, nil } q := r.q.Select("plaintext") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } type Service struct { q *querybuilder.Selection c graphql.Client endpoint *string hostname *string id *ServiceID start *ServiceID stop *ServiceID } // ServiceEndpointOpts contains options for Service.Endpoint type ServiceEndpointOpts struct { // The exposed port number for the endpoint Port int // Return a URL with the given scheme, eg. http for http:// Scheme string } // Retrieves an endpoint that clients can use to reach this container. // // If no port is specified, the first exposed port is used. If none exist an error is returned. // // If a scheme is specified, a URL is returned. Otherwise, a host:port pair is returned. func (r *Service) Endpoint(ctx context.Context, opts ...ServiceEndpointOpts) (string, error) { if r.endpoint != nil { return *r.endpoint, nil } q := r.q.Select("endpoint") for i := len(opts) - 1; i >= 0; i-- { // `port` optional argument if !querybuilder.IsZeroValue(opts[i].Port) { q = q.Arg("port", opts[i].Port) } // `scheme` optional argument if !querybuilder.IsZeroValue(opts[i].Scheme) { q = q.Arg("scheme", opts[i].Scheme) } } var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Retrieves a hostname which can be used by clients to reach this container. func (r *Service) Hostname(ctx context.Context) (string, error) { if r.hostname != nil { return *r.hostname, nil } q := r.q.Select("hostname") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // A unique identifier for this service. func (r *Service) ID(ctx context.Context) (ServiceID, error) { if r.id != nil { return *r.id, nil } q := r.q.Select("id") var response ServiceID q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // XXX_GraphQLType is an internal function. It returns the native GraphQL type name func (r *Service) XXX_GraphQLType() string { return "Service" } // XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object func (r *Service) XXX_GraphQLIDType() string { return "ServiceID" } // XXX_GraphQLID is an internal function. It returns the underlying type ID func (r *Service) XXX_GraphQLID(ctx context.Context) (string, error) { id, err := r.ID(ctx) if err != nil { return "", err } return string(id), nil } func (r *Service) MarshalJSON() ([]byte, error) { id, err := r.ID(context.Background()) if err != nil { return nil, err } return json.Marshal(id) } // Retrieves the list of ports provided by the service. func (r *Service) Ports(ctx context.Context) ([]Port, error) { q := r.q.Select("ports") q = q.Select("description port protocol") type ports struct { Description string Port int Protocol NetworkProtocol } convert := func(fields []ports) []Port { out := []Port{} for i := range fields { val := Port{description: &fields[i].Description, port: &fields[i].Port, protocol: &fields[i].Protocol} out = append(out, val) } return out } var response []ports q = q.Bind(&response) err := q.Execute(ctx, r.c) if err != nil { return nil, err } return convert(response), nil } // Start the service and wait for its health checks to succeed. // // Services bound to a Container do not need to be manually started. func (r *Service) Start(ctx context.Context) (*Service, error) { q := r.q.Select("start") return r, q.Execute(ctx, r.c) } // Stop the service. func (r *Service) Stop(ctx context.Context) (*Service, error) { q := r.q.Select("stop") return r, q.Execute(ctx, r.c) } type Socket struct { q *querybuilder.Selection c graphql.Client id *SocketID } // The content-addressed identifier of the socket. func (r *Socket) ID(ctx context.Context) (SocketID, error) { if r.id != nil { return *r.id, nil } q := r.q.Select("id") var response SocketID q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // XXX_GraphQLType is an internal function. It returns the native GraphQL type name func (r *Socket) XXX_GraphQLType() string { return "Socket" } // XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object func (r *Socket) XXX_GraphQLIDType() string { return "SocketID" } // XXX_GraphQLID is an internal function. It returns the underlying type ID func (r *Socket) XXX_GraphQLID(ctx context.Context) (string, error) { id, err := r.ID(ctx) if err != nil { return "", err } return string(id), nil } func (r *Socket) MarshalJSON() ([]byte, error) { id, err := r.ID(context.Background()) if err != nil { return nil, err } return json.Marshal(id) } // A definition of a parameter or return type in a Module. type TypeDef struct { q *querybuilder.Selection c graphql.Client id *TypeDefID kind *TypeDefKind optional *bool } type WithTypeDefFunc func(r *TypeDef) *TypeDef // With calls the provided function with current TypeDef. // // This is useful for reusability and readability by not breaking the calling chain. func (r *TypeDef) With(f WithTypeDefFunc) *TypeDef { return f(r) } // If kind is LIST, the list-specific type definition. // If kind is not LIST, this will be null. func (r *TypeDef) AsList() *ListTypeDef { q := r.q.Select("asList") return &ListTypeDef{ q: q, c: r.c, } } // If kind is OBJECT, the object-specific type definition. // If kind is not OBJECT, this will be null. func (r *TypeDef) AsObject() *ObjectTypeDef { q := r.q.Select("asObject") return &ObjectTypeDef{ q: q, c: r.c, } } func (r *TypeDef) ID(ctx context.Context) (TypeDefID, error) { if r.id != nil { return *r.id, nil } q := r.q.Select("id") var response TypeDefID q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // XXX_GraphQLType is an internal function. It returns the native GraphQL type name func (r *TypeDef) XXX_GraphQLType() string { return "TypeDef" } // XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object func (r *TypeDef) XXX_GraphQLIDType() string { return "TypeDefID" } // XXX_GraphQLID is an internal function. It returns the underlying type ID func (r *TypeDef) XXX_GraphQLID(ctx context.Context) (string, error) { id, err := r.ID(ctx) if err != nil { return "", err } return string(id), nil } func (r *TypeDef) MarshalJSON() ([]byte, error) { id, err := r.ID(context.Background()) if err != nil { return nil, err } return json.Marshal(id) } // The kind of type this is (e.g. primitive, list, object) func (r *TypeDef) Kind(ctx context.Context) (TypeDefKind, error) { if r.kind != nil { return *r.kind, nil } q := r.q.Select("kind") var response TypeDefKind q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Whether this type can be set to null. Defaults to false. func (r *TypeDef) Optional(ctx context.Context) (bool, error) { if r.optional != nil { return *r.optional, nil } q := r.q.Select("optional") var response bool q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // TypeDefWithFieldOpts contains options for TypeDef.WithField type TypeDefWithFieldOpts struct { // A doc string for the field, if any Description string } // Adds a static field for an Object TypeDef, failing if the type is not an object. func (r *TypeDef) WithField(name string, typeDef *TypeDef, opts ...TypeDefWithFieldOpts) *TypeDef { assertNotNil("typeDef", typeDef) q := r.q.Select("withField") for i := len(opts) - 1; i >= 0; i-- { // `description` optional argument if !querybuilder.IsZeroValue(opts[i].Description) { q = q.Arg("description", opts[i].Description) } } q = q.Arg("name", name) q = q.Arg("typeDef", typeDef) return &TypeDef{ q: q, c: r.c, } } // Adds a function for an Object TypeDef, failing if the type is not an object. func (r *TypeDef) WithFunction(function *Function) *TypeDef { assertNotNil("function", function) q := r.q.Select("withFunction") q = q.Arg("function", function) return &TypeDef{ q: q, c: r.c, } } // Sets the kind of the type. func (r *TypeDef) WithKind(kind TypeDefKind) *TypeDef { q := r.q.Select("withKind") q = q.Arg("kind", kind) return &TypeDef{ q: q, c: r.c, } } // Returns a TypeDef of kind List with the provided type for its elements. func (r *TypeDef) WithListOf(elementType *TypeDef) *TypeDef { assertNotNil("elementType", elementType) q := r.q.Select("withListOf") q = q.Arg("elementType", elementType) return &TypeDef{ q: q, c: r.c, } } // TypeDefWithObjectOpts contains options for TypeDef.WithObject type TypeDefWithObjectOpts struct { Description string } // Returns a TypeDef of kind Object with the provided name. // // Note that an object's fields and functions may be omitted if the intent is // only to refer to an object. This is how functions are able to return their // own object, or any other circular reference. func (r *TypeDef) WithObject(name string, opts ...TypeDefWithObjectOpts) *TypeDef { q := r.q.Select("withObject") for i := len(opts) - 1; i >= 0; i-- { // `description` optional argument if !querybuilder.IsZeroValue(opts[i].Description) { q = q.Arg("description", opts[i].Description) } } q = q.Arg("name", name) return &TypeDef{ q: q, c: r.c, } } // Sets whether this type can be set to null. func (r *TypeDef) WithOptional(optional bool) *TypeDef { q := r.q.Select("withOptional") q = q.Arg("optional", optional) return &TypeDef{ q: q, c: r.c, } } type CacheSharingMode string func (CacheSharingMode) IsEnum() {} const ( Locked CacheSharingMode = "LOCKED" Private CacheSharingMode = "PRIVATE" Shared CacheSharingMode = "SHARED" ) type ImageLayerCompression string func (ImageLayerCompression) IsEnum() {} const ( Estargz ImageLayerCompression = "EStarGZ" Gzip ImageLayerCompression = "Gzip" Uncompressed ImageLayerCompression = "Uncompressed" Zstd ImageLayerCompression = "Zstd" ) type ImageMediaTypes string func (ImageMediaTypes) IsEnum() {} const ( Dockermediatypes ImageMediaTypes = "DockerMediaTypes" Ocimediatypes ImageMediaTypes = "OCIMediaTypes" ) type NetworkProtocol string func (NetworkProtocol) IsEnum() {} const ( Tcp NetworkProtocol = "TCP" Udp NetworkProtocol = "UDP" ) type TypeDefKind string func (TypeDefKind) IsEnum() {} const ( Booleankind TypeDefKind = "BooleanKind" Integerkind TypeDefKind = "IntegerKind" Listkind TypeDefKind = "ListKind" Objectkind TypeDefKind = "ObjectKind" Stringkind TypeDefKind = "StringKind" Voidkind TypeDefKind = "VoidKind" )
closed
dagger/dagger
https://github.com/dagger/dagger
5,971
🐞 `runtime error: index out of range` error when generating `go` modules
### What is the issue? Using common parameter types like following code block causing `runtime error: index out of range` while generating module code. ```go func (ar *ActionRun) WithInput(name, value string) *ActionRun { ar.Config.With = append(ar.Config.With, fmt.Sprintf("%s=%s", name, value)) return ar } ``` ### Log output ```shell dagger mod sync ✘ asModule(sourceSubpath: "daggerverse/actions/runtime") ERROR [3.18s] ✘ exec /usr/local/bin/codegen --module . --propagate-logs=true ERROR [0.39s] ┃ Error: generate code: template: module:56:3: executing "module" at <Modu ┃ MainSrc>: error calling ModuleMainSrc: runtime error: index out of range ┃ 1] with length 1 ┃ Usage: ┃ codegen [flags] ┃ ┃ Flags: ┃ -h, --help help for codegen ┃ --lang string language to generate (default "go") ┃ --module string module to load and codegen dependency code ┃ -o, --output string output directory (default ".") ┃ --propagate-logs propagate logs directly to progrock.sock ┃ ┃ Error: generate code: template: module:56:3: executing "module" at <Modu ┃ MainSrc>: error calling ModuleMainSrc: runtime error: index out of range ┃ 1] with length 1 ✘ generating go module: actions-runtime ERROR [0.28s] • Engine: d8c37de1d5af (version devel ()) ⧗ 4.89s ✔ 238 ∅ 2 ✘ 3 Error: failed to automate vcs: failed to get vcs ignored paths: input:1: host.directory.asModule failed to call module "actions-runtime" to get functions: failed to get function output directory: process "/usr/local/bin/codegen --module . --propagate-logs=true" did not complete successfully: exit code: 1 ``` ### Steps to reproduce - Create a go module - Add command to module using shared type parameter like `func (ar *ActionRun) WithInput(name, value string) *ActionRun` - Run `dagger mod sync` ### SDK version Go SDK v0.9.1, Dagger CLI v0.9.1 ### OS version macOS 14.0
https://github.com/dagger/dagger/issues/5971
https://github.com/dagger/dagger/pull/5972
c8990707600e665638707f19c12d4ecb80ef3e3a
35442c542873fd260cddbcbed2ece93ce4b5a79f
"2023-10-26T15:48:07Z"
go
"2023-10-26T17:53:44Z"
cmd/codegen/generator/go/templates/modules.go
package templates import ( "encoding/json" "fmt" "go/ast" "go/token" "go/types" "path/filepath" "sort" "strings" . "github.com/dave/jennifer/jen" // nolint:revive,stylecheck "github.com/iancoleman/strcase" "golang.org/x/tools/go/packages" ) const ( daggerGenFilename = "dagger.gen.go" // TODO: don't hardcode contextTypename = "context.Context" ) /* TODO: * Handle types from 3rd party imports in the type signature * Add packages.NeedImports and packages.NeedDependencies to packages.Load opts, ensure performance is okay (or deal with that by lazy loading) * Fix problem where changing a function signature requires running `dagger mod sync` twice (first one will result in package errors being seen, second one fixes) * Use Overlays field in packages.Config to provide partial generation of dagger.gen.go, without the unupdated code we generate here * Handle automatically re-running `dagger mod sync` when invoking functions from CLI, to save users from having to always remember while developing locally * Support methods defined on non-pointer receivers */ /* moduleMainSrc generates the source code of the main func for Dagger Module code using the Go SDK. The overall idea is that users just need to create a struct with the same name as their Module and then add methods to that struct to implement their Module. Methods on that struct become Functions. They are also free to return custom objects from Functions, which themselves may have methods that become Functions too. However, only the "top-level" Module struct's Functions will be directly invokable. This is essentially just the GraphQL execution model. The implementation works by parsing the user's code and generating a main func that reads function call inputs from the Engine, calls the relevant function and returns the result. The generated code is mostly a giant switch/case on the object+function name, with each case doing json deserialization of the input arguments and calling the actual Go function. */ func (funcs goTemplateFuncs) moduleMainSrc() string { if funcs.modulePkg == nil { // during bootstrapping, we might not have code yet, since it takes // multiple passes. return `func main() { panic("no code yet") }` } ps := &parseState{ pkg: funcs.modulePkg, fset: funcs.moduleFset, methods: make(map[string][]method), } pkgScope := funcs.modulePkg.Types.Scope() objFunctionCases := map[string][]Code{} createMod := Qual("dag", "CurrentModule").Call() objs := []types.Object{} for _, name := range pkgScope.Names() { obj := pkgScope.Lookup(name) if obj == nil { continue } objs = append(objs, obj) } // preserve definition order, so developer can keep more important / // entrypoint types higher up sort.Slice(objs, func(i, j int) bool { return objs[i].Pos() < objs[j].Pos() }) tps := []types.Type{} for _, obj := range objs { tps = append(tps, obj.Type()) } added := map[string]struct{}{} topLevel := true for len(tps) != 0 { for _, tp := range tps { named, isNamed := tp.(*types.Named) if !isNamed { continue } obj := named.Obj() if obj.Pkg() != funcs.modulePkg.Types { continue } strct, isStruct := named.Underlying().(*types.Struct) if !isStruct { // TODO(vito): could possibly support non-struct types, but why bother continue } // avoid adding a struct definition twice (if it's referenced in two function signatures) if _, ok := added[obj.Name()]; ok { continue } // TODO(vito): hacky: need to run this before fillObjectFunctionCases so it // collects all the methods objType, err := ps.goStructToAPIType(strct, named) if err != nil { panic(err) } if objType == nil { // not including in module schema, skip it continue } if err := ps.fillObjectFunctionCases(named, objFunctionCases); err != nil { // errors indicate an internal problem rather than something w/ user code, so panic instead panic(err) } if len(objFunctionCases[obj.Name()]) == 0 { if topLevel { // no functions on this top-level object, so don't add it to the module continue } if ps.isDaggerGenerated(named.Obj()) { // skip objects from outside this module continue } } // Add the object to the module createMod = dotLine(createMod, "WithObject").Call(Add(Line(), objType)) added[obj.Name()] = struct{}{} } tps, ps.extraTypes = ps.extraTypes, nil topLevel = false } // TODO: sort cases and functions based on their definition order return strings.Join([]string{mainSrc, invokeSrc(objFunctionCases, createMod)}, "\n") } func dotLine(a *Statement, id string) *Statement { return a.Op(".").Line().Id(id) } const ( // The static part of the generated code. It calls out to the "invoke" func, which is the mostly // dynamically generated code that actually calls the user's functions. mainSrc = `func main() { ctx := context.Background() fnCall := dag.CurrentFunctionCall() parentName, err := fnCall.ParentName(ctx) if err != nil { fmt.Println(err.Error()) os.Exit(2) } fnName, err := fnCall.Name(ctx) if err != nil { fmt.Println(err.Error()) os.Exit(2) } parentJson, err := fnCall.Parent(ctx) if err != nil { fmt.Println(err.Error()) os.Exit(2) } fnArgs, err := fnCall.InputArgs(ctx) if err != nil { fmt.Println(err.Error()) os.Exit(2) } inputArgs := map[string][]byte{} for _, fnArg := range fnArgs { argName, err := fnArg.Name(ctx) if err != nil { fmt.Println(err.Error()) os.Exit(2) } argValue, err := fnArg.Value(ctx) if err != nil { fmt.Println(err.Error()) os.Exit(2) } inputArgs[argName] = []byte(argValue) } result, err := invoke(ctx, []byte(parentJson), parentName, fnName, inputArgs) if err != nil { fmt.Println(err.Error()) os.Exit(2) } resultBytes, err := json.Marshal(result) if err != nil { fmt.Println(err.Error()) os.Exit(2) } _, err = fnCall.ReturnValue(ctx, JSON(resultBytes)) if err != nil { fmt.Println(err.Error()) os.Exit(2) } } ` parentJSONVar = "parentJSON" parentNameVar = "parentName" fnNameVar = "fnName" inputArgsVar = "inputArgs" invokeFuncName = "invoke" ) // the source code of the invoke func, which is the mostly dynamically generated code that actually calls the user's functions func invokeSrc(objFunctionCases map[string][]Code, createMod Code) string { // each `case` statement for every object name, which makes up the body of the invoke func objCases := []Code{} for objName, functionCases := range objFunctionCases { objCases = append(objCases, Case(Lit(objName)).Block(Switch(Id(fnNameVar)).Block(functionCases...))) } // when the object name is empty, return the module definition objCases = append(objCases, Case(Lit("")).Block( Return(createMod, Nil()), )) // default case (return error) objCases = append(objCases, Default().Block( Return(Nil(), Qual("fmt", "Errorf").Call(Lit("unknown object %s"), Id(parentNameVar))), )) objSwitch := Switch(Id(parentNameVar)).Block(objCases...) // func invoke( invokeFunc := Func().Id(invokeFuncName).Params( // ctx context.Context, Id("ctx").Qual("context", "Context"), // parentJSON []byte, Id(parentJSONVar).Index().Byte(), // parentName string, Id(parentNameVar).String(), // fnName string, Id(fnNameVar).String(), // inputArgs map[string][]byte, Id(inputArgsVar).Map(String()).Index().Byte(), ).Params( // ) (any, Id("any"), // error) Error(), ).Block(objSwitch) return fmt.Sprintf("%#v", invokeFunc) } // TODO: use jennifer for generating this magical typedef func renderNameOrStruct(t types.Type) string { if ptr, ok := t.(*types.Pointer); ok { return "*" + renderNameOrStruct(ptr.Elem()) } if sl, ok := t.(*types.Slice); ok { return "[]" + renderNameOrStruct(sl.Elem()) } if st, ok := t.(*types.Struct); ok { result := "struct {\n" for i := 0; i < st.NumFields(); i++ { if !st.Field(i).Embedded() { result += st.Field(i).Name() + " " } result += renderNameOrStruct(st.Field(i).Type()) if tag := st.Tag(i); tag != "" { result += " `" + tag + "`" } result += "\n" } result += "}" return result } if named, ok := t.(*types.Named); ok { // Assume local // // TODO: this isn't always true - we likely want to support returning // types from other packages as well. However, this is tricky - how // should we handle returning *time.Time? We should probably convert // this to a graphql type that all langs can convert to their native // representation. base := named.Obj().Name() if typeArgs := named.TypeArgs(); typeArgs.Len() > 0 { base += "[" for i := 0; i < typeArgs.Len(); i++ { if i > 0 { base += ", " } base += renderNameOrStruct(typeArgs.At(i)) } base += "]" } return base } // HACK(vito): this is passed to Id(), which is a bit weird, but works return t.String() } var checkErrStatement = If(Err().Op("!=").Nil()).Block( // fmt.Println(err.Error()) Qual("fmt", "Println").Call(Err().Dot("Error").Call()), // os.Exit(2) Qual("os", "Exit").Call(Lit(2)), ) // fillObjectFunctionCases recursively fills out the `cases` map with entries for object name -> `case` statement blocks // for each function in that object func (ps *parseState) fillObjectFunctionCases(type_ types.Type, cases map[string][]Code) error { var objName string switch x := type_.(type) { case *types.Pointer: return ps.fillObjectFunctionCases(x.Elem(), cases) case *types.Named: objName = x.Obj().Name() default: return nil } if existingCases := cases[objName]; len(existingCases) > 0 { // handles recursive types, e.g. objects with chainable methods that return themselves return nil } methods := ps.methods[objName] if len(methods) == 0 { return nil } for _, method := range methods { fnName, sig := method.fn.Name(), method.fn.Type().(*types.Signature) statements := []Code{ Var().Id("err").Error(), } parentVarName := "parent" statements = append(statements, Var().Id(parentVarName).Id(objName), Err().Op("=").Qual("json", "Unmarshal").Call(Id(parentJSONVar), Op("&").Id(parentVarName)), checkErrStatement, ) fnCallArgs := []Code{Op("&").Id(parentVarName)} vars := map[string]struct{}{} for i, spec := range method.paramSpecs { if i == 0 && spec.paramType.String() == contextTypename { fnCallArgs = append(fnCallArgs, Id("ctx")) continue } var varName string var varType types.Type var target *Statement if spec.parent == nil { varName = strcase.ToLowerCamel(spec.name) varType = spec.paramType target = Id(varName) } else { // create only one declaration for option structs varName = spec.parent.name varType = spec.parent.paramType target = Id(spec.parent.name).Dot(spec.name) } if _, ok := vars[varName]; !ok { vars[varName] = struct{}{} tp, access := findOptsAccessPattern(varType, Id(varName)) statements = append(statements, Var().Id(varName).Id(renderNameOrStruct(tp))) if spec.variadic { fnCallArgs = append(fnCallArgs, access.Op("...")) } else { fnCallArgs = append(fnCallArgs, access) } } statements = append(statements, If(Id(inputArgsVar).Index(Lit(spec.graphqlName())).Op("!=").Nil()).Block( Err().Op("=").Qual("json", "Unmarshal").Call( Index().Byte().Parens(Id(inputArgsVar).Index(Lit(spec.graphqlName()))), Op("&").Add(target), ), checkErrStatement, )) } results := sig.Results() switch results.Len() { case 2: // assume second value is error if results.At(1).Type().String() != errorTypeName { // sanity check return fmt.Errorf("second return value must be error, have %s", results.At(0).Type().String()) } statements = append(statements, Return( Parens(Op("*").Id(objName)).Dot(fnName).Call(fnCallArgs...), )) cases[objName] = append(cases[objName], Case(Lit(fnName)).Block(statements...)) if err := ps.fillObjectFunctionCases(results.At(0).Type(), cases); err != nil { return err } case 1: if results.At(0).Type().String() == errorTypeName { // void error return statements = append(statements, Return( Nil(), Parens(Op("*").Id(objName)).Dot(fnName).Call(fnCallArgs...), )) cases[objName] = append(cases[objName], Case(Lit(fnName)).Block(statements...)) } else { // non-error return statements = append(statements, Return( Parens(Op("*").Id(objName)).Dot(fnName).Call(fnCallArgs...), Nil(), )) cases[objName] = append(cases[objName], Case(Lit(fnName)).Block(statements...)) if err := ps.fillObjectFunctionCases(results.At(0).Type(), cases); err != nil { return err } } case 0: // void return // // NB(vito): it's really weird to have a fully void return (not even // error), but we should still support it for completeness. statements = append(statements, Parens(Op("*").Id(objName)).Dot(fnName).Call(fnCallArgs...), Return(Nil(), Nil())) cases[objName] = append(cases[objName], Case(Lit(fnName)).Block(statements...)) default: return fmt.Errorf("unexpected number of results from method %s: %d", fnName, results.Len()) } } // default case (return error) cases[objName] = append(cases[objName], Default().Block( Return(Nil(), Qual("fmt", "Errorf").Call(Lit("unknown function %s"), Id(fnNameVar))), )) return nil } type parseState struct { pkg *packages.Package fset *token.FileSet methods map[string][]method extraTypes []types.Type } type method struct { fn *types.Func paramSpecs []paramSpec } func (ps *parseState) goTypeToAPIType(typ types.Type, named *types.Named) (*Statement, error) { ps.extraTypes = append(ps.extraTypes, typ) switch t := typ.(type) { case *types.Named: // Named types are any types declared like `type Foo <...>` typeDef, err := ps.goTypeToAPIType(t.Underlying(), t) if err != nil { return nil, fmt.Errorf("failed to convert named type: %w", err) } return typeDef, nil case *types.Pointer: return ps.goTypeToAPIType(t.Elem(), named) case *types.Basic: if t.Kind() == types.Invalid { return nil, fmt.Errorf("invalid type: %+v", t) } var kind Code switch t.Info() { case types.IsString: kind = Id("Stringkind") case types.IsInteger: kind = Id("Integerkind") case types.IsBoolean: kind = Id("Booleankind") default: return nil, fmt.Errorf("unsupported basic type: %+v", t) } return Qual("dag", "TypeDef").Call().Dot("WithKind").Call( kind, ), nil case *types.Slice: elemTypeDef, err := ps.goTypeToAPIType(t.Elem(), nil) if err != nil { return nil, fmt.Errorf("failed to convert slice element type: %w", err) } return Qual("dag", "TypeDef").Call().Dot("WithListOf").Call( elemTypeDef, ), nil case *types.Struct: if named == nil { return nil, fmt.Errorf("struct types must be named") } typeName := named.Obj().Name() if typeName == "" { return nil, fmt.Errorf("struct types must be named") } return Qual("dag", "TypeDef").Call().Dot("WithObject").Call( Lit(typeName), ), nil default: return nil, fmt.Errorf("unsupported type %T", t) } } const errorTypeName = "error" func (ps *parseState) goStructToAPIType(t *types.Struct, named *types.Named) (*Statement, error) { if named == nil { return nil, fmt.Errorf("struct types must be named") } typeName := named.Obj().Name() if typeName == "" { return nil, fmt.Errorf("struct types must be named") } // We don't support extending objects from outside this module, so we will // be skipping it. But first we want to verify the user isn't adding methods // to it (in which case we error out). objectIsDaggerGenerated := ps.isDaggerGenerated(named.Obj()) methods := []*types.Func{} methodSet := types.NewMethodSet(types.NewPointer(named)) // Fill out any Functions on the object, which are methods on the struct // TODO: support methods defined on non-pointer receivers for i := 0; i < methodSet.Len(); i++ { methodObj := methodSet.At(i).Obj() if ps.isDaggerGenerated(methodObj) { // We don't care about pre-existing methods on core types or objects from dependency modules. continue } if objectIsDaggerGenerated { return nil, fmt.Errorf("cannot define methods on objects from outside this module") } method, ok := methodObj.(*types.Func) if !ok { return nil, fmt.Errorf("expected method to be a func, got %T", methodObj) } if !method.Exported() { continue } methods = append(methods, method) } if objectIsDaggerGenerated { return nil, nil } sort.Slice(methods, func(i, j int) bool { return methods[i].Pos() < methods[j].Pos() }) // args for WithObject withObjectArgs := []Code{ Lit(typeName), } withObjectOpts := []Code{} // Fill out the Description with the comment above the struct (if any) typeSpec, err := ps.typeSpecForNamedType(named) if err != nil { return nil, fmt.Errorf("failed to find decl for named type %s: %w", typeName, err) } if doc := typeSpec.Doc; doc != nil { // TODO(vito): for some reason this is always nil withObjectOpts = append(withObjectOpts, Id("Description").Op(":").Lit(doc.Text())) } if len(withObjectOpts) > 0 { withObjectArgs = append(withObjectArgs, Id("TypeDefWithObjectOpts").Values(withObjectOpts...)) } typeDef := Qual("dag", "TypeDef").Call().Dot("WithObject").Call(withObjectArgs...) for _, method := range methods { fnTypeDef, err := ps.goMethodToAPIFunctionDef(typeName, method, named) if err != nil { return nil, fmt.Errorf("failed to convert method %s to function def: %w", method.Name(), err) } typeDef = dotLine(typeDef, "WithFunction").Call(Add(Line(), fnTypeDef)) } astStructType, ok := typeSpec.Type.(*ast.StructType) if !ok { return nil, fmt.Errorf("expected type spec to be a struct, got %T", typeSpec.Type) } // Fill out the static fields of the struct (if any) for i := 0; i < t.NumFields(); i++ { field := t.Field(i) if !field.Exported() { continue } fieldTypeDef, err := ps.goTypeToAPIType(field.Type(), nil) if err != nil { return nil, fmt.Errorf("failed to convert field type: %w", err) } var description string if doc := astStructType.Fields.List[i].Doc; doc != nil { description = doc.Text() } withFieldArgs := []Code{ Lit(field.Name()), fieldTypeDef, } if description != "" { withFieldArgs = append(withFieldArgs, Id("TypeDefWithFieldOpts").Values( Id("Description").Op(":").Lit(description), )) } typeDef = dotLine(typeDef, "WithField").Call(withFieldArgs...) } return typeDef, nil } var voidDef = Qual("dag", "TypeDef").Call(). Dot("WithKind").Call(Id("Voidkind")). Dot("WithOptional").Call(Lit(true)) func (ps *parseState) goMethodToAPIFunctionDef(typeName string, fn *types.Func, named *types.Named) (*Statement, error) { methodSig, ok := fn.Type().(*types.Signature) if !ok { return nil, fmt.Errorf("expected method to be a func, got %T", fn.Type()) } // stash away the method signature so we can remember details on how it's // invoked (e.g. no error return, no ctx arg, error-only return, etc) specs, err := ps.parseParamSpecs(fn) if err != nil { return nil, err } ps.methods[typeName] = append(ps.methods[typeName], method{fn: fn, paramSpecs: specs}) var fnReturnType *Statement methodResults := methodSig.Results() switch methodResults.Len() { case 0: fnReturnType = voidDef case 1: result := methodResults.At(0).Type() if result.String() == errorTypeName { fnReturnType = voidDef } else { fnReturnType, err = ps.goTypeToAPIType(result, nil) if err != nil { return nil, fmt.Errorf("failed to convert result type: %w", err) } } case 2: result := methodResults.At(0).Type() fnReturnType, err = ps.goTypeToAPIType(result, nil) if err != nil { return nil, fmt.Errorf("failed to convert result type: %w", err) } default: return nil, fmt.Errorf("method %s has too many return values", fn.Name()) } fnDef := Qual("dag", "Function").Call(Lit(fn.Name()), Add(Line(), fnReturnType)) funcDecl, err := ps.declForFunc(fn) if err != nil { return nil, fmt.Errorf("failed to find decl for method %s: %w", fn.Name(), err) } if doc := funcDecl.Doc; doc != nil { fnDef = dotLine(fnDef, "WithDescription").Call(Lit(doc.Text())) } for i, spec := range specs { if i == 0 && spec.paramType.String() == contextTypename { // ignore ctx arg continue } typeDef, err := ps.goTypeToAPIType(spec.baseType, nil) if err != nil { return nil, fmt.Errorf("failed to convert param type: %w", err) } if spec.optional { typeDef = typeDef.Dot("WithOptional").Call(Lit(true)) } // arguments to WithArg args := []Code{Lit(spec.graphqlName()), typeDef} argOpts := []Code{} if spec.description != "" { argOpts = append(argOpts, Id("Description").Op(":").Lit(spec.description)) } if spec.defaultValue != "" { var jsonEnc string if spec.baseType.String() == "string" { enc, err := json.Marshal(spec.defaultValue) if err != nil { return nil, fmt.Errorf("failed to marshal default value: %w", err) } jsonEnc = string(enc) } else { jsonEnc = spec.defaultValue } argOpts = append(argOpts, Id("DefaultValue").Op(":").Id("JSON").Call(Lit(jsonEnc))) } if len(argOpts) > 0 { args = append(args, Id("FunctionWithArgOpts").Values(argOpts...)) } fnDef = dotLine(fnDef, "WithArg").Call(args...) } return fnDef, nil } func (ps *parseState) parseParamSpecs(fn *types.Func) ([]paramSpec, error) { sig := fn.Type().(*types.Signature) params := sig.Params() if params.Len() == 0 { return nil, nil } specs := make([]paramSpec, 0, params.Len()) i := 0 if params.At(i).Type().String() == contextTypename { spec, err := ps.parseParamSpecVar(params.At(i)) if err != nil { return nil, err } specs = append(specs, spec) i++ } fnDecl, err := ps.declForFunc(fn) if err != nil { return nil, err } // is the first data param an inline struct? if so, process each field of // the struct as a top-level param if i+1 == params.Len() { param := params.At(i) paramType, ok := asInlineStruct(param.Type()) if ok { stype, ok := asInlineStructAst(fnDecl.Type.Params.List[i].Type) if !ok { return nil, fmt.Errorf("expected struct type for %s", param.Name()) } parent := &paramSpec{ name: params.At(i).Name(), paramType: param.Type(), baseType: param.Type(), } for f := 0; f < paramType.NumFields(); f++ { spec, err := ps.parseParamSpecVar(paramType.Field(f)) if err != nil { return nil, err } spec.parent = parent spec.description = stype.Fields.List[f].Doc.Text() if spec.description == "" { spec.description = stype.Fields.List[f].Comment.Text() } spec.description = strings.TrimSpace(spec.description) specs = append(specs, spec) } return specs, nil } } // if other parameter passing schemes fail, just treat each remaining arg // as a top-level param for ; i < params.Len(); i++ { spec, err := ps.parseParamSpecVar(params.At(i)) if err != nil { return nil, err } if sig.Variadic() && i == params.Len()-1 { spec.variadic = true } if cmt, err := ps.commentForFuncField(fnDecl, i); err == nil { spec.description = cmt.Text() spec.description = strings.TrimSpace(spec.description) } specs = append(specs, spec) } return specs, nil } func (ps *parseState) parseParamSpecVar(field *types.Var) (paramSpec, error) { if _, ok := field.Type().(*types.Struct); ok { return paramSpec{}, fmt.Errorf("nested structs are not supported") } paramType := field.Type() baseType := paramType for { ptr, ok := baseType.(*types.Pointer) if !ok { break } baseType = ptr.Elem() } optional := false if named, ok := baseType.(*types.Named); ok { if named.Obj().Name() == "Optional" && ps.isDaggerGenerated(named.Obj()) { typeArgs := named.TypeArgs() if typeArgs.Len() != 1 { return paramSpec{}, fmt.Errorf("optional type must have exactly one type argument") } optional = true baseType = typeArgs.At(0) for { ptr, ok := baseType.(*types.Pointer) if !ok { break } baseType = ptr.Elem() } } } return paramSpec{ name: field.Name(), paramType: paramType, baseType: baseType, optional: optional, }, nil } type paramSpec struct { name string description string optional bool variadic bool defaultValue string // NOTE: defaultVal is not currently populated // paramType is the full type declared in the function signature, which may // include pointer types, Optional, etc paramType types.Type // baseType is the simplified base type derived from the function signature baseType types.Type // parent is set if this paramSpec is nested inside a parent inline struct, // and is used to create a declaration of the entire inline struct parent *paramSpec } func (spec *paramSpec) graphqlName() string { return strcase.ToLowerCamel(spec.name) } // typeSpecForNamedType returns the *ast* type spec for the given Named type. This is needed // because the types.Named object does not have the comments associated with the type, which // we want to parse. func (ps *parseState) typeSpecForNamedType(namedType *types.Named) (*ast.TypeSpec, error) { tokenFile := ps.fset.File(namedType.Obj().Pos()) if tokenFile == nil { return nil, fmt.Errorf("no file for %s", namedType.Obj().Name()) } for _, f := range ps.pkg.Syntax { if ps.fset.File(f.Pos()) != tokenFile { continue } for _, decl := range f.Decls { genDecl, ok := decl.(*ast.GenDecl) if !ok { continue } for _, spec := range genDecl.Specs { typeSpec, ok := spec.(*ast.TypeSpec) if !ok { continue } if typeSpec.Name.Name == namedType.Obj().Name() { return typeSpec, nil } } } } return nil, fmt.Errorf("no decl for %s", namedType.Obj().Name()) } // declForFunc returns the *ast* func decl for the given Func type. This is needed // because the types.Func object does not have the comments associated with the type, which // we want to parse. func (ps *parseState) declForFunc(fnType *types.Func) (*ast.FuncDecl, error) { tokenFile := ps.fset.File(fnType.Pos()) if tokenFile == nil { return nil, fmt.Errorf("no file for %s", fnType.Name()) } for _, f := range ps.pkg.Syntax { if ps.fset.File(f.Pos()) != tokenFile { continue } for _, decl := range f.Decls { fnDecl, ok := decl.(*ast.FuncDecl) if ok && fnDecl.Name.Name == fnType.Name() { return fnDecl, nil } } } return nil, fmt.Errorf("no decl for %s", fnType.Name()) } // commentForFuncField returns the *ast* comment group for the given position. This // is needed because function args (despite being fields) don't have comments // associated with them, so this is a neat little hack to get them out. func (ps *parseState) commentForFuncField(fnDecl *ast.FuncDecl, i int) (*ast.CommentGroup, error) { pos := fnDecl.Type.Params.List[i].Pos() tokenFile := ps.fset.File(pos) if tokenFile == nil { return nil, fmt.Errorf("no file for function %s", fnDecl.Name.Name) } line := tokenFile.Line(pos) allowDocComment := true allowLineComment := true if i == 0 && tokenFile.Line(fnDecl.Pos()) == line { // the argument is on the same line as the function declaration, so // there is no doc comment to find allowDocComment = false } else if i > 0 && tokenFile.Line(fnDecl.Type.Params.List[i-1].Pos()) == line { // the argument is on the same line as the previous argument, so again // there is no doc comment to find allowDocComment = false } if i+1 < len(fnDecl.Type.Params.List) && tokenFile.Line(fnDecl.Type.Params.List[i+1].Pos()) == line { // the argument is on the same line as the next argument, so there is // no line comment to find allowLineComment = false } for _, f := range ps.pkg.Syntax { if ps.fset.File(f.Pos()) != tokenFile { continue } if allowDocComment { // take the last position in the last line, and try and find a // comment that contains it npos := tokenFile.LineStart(tokenFile.Line(pos)) - 1 for _, comment := range f.Comments { if comment.Pos() <= npos && npos <= comment.End() { // TODO(jedevc): we need to make sure that this comment has // no content before it return comment, nil } } } if allowLineComment { // if no doc-style comment found, fallback to the current line to // find a comment at the end of the line npos := tokenFile.LineStart(tokenFile.Line(pos)+1) - 1 for _, comment := range f.Comments { if comment.Pos() <= npos && npos <= comment.End() { return comment, nil } } } } return nil, fmt.Errorf("no comment for function %s", fnDecl.Name.Name) } func (ps *parseState) isDaggerGenerated(obj types.Object) bool { tokenFile := ps.fset.File(obj.Pos()) return filepath.Base(tokenFile.Name()) == daggerGenFilename } // findOptsAccessPattern takes a type and a base statement (the name of a // variable that has the target type) and produces a type that can be used in a // variable declaration, as well as a statement that has the same type as the // target statement. // // This is essentially for helping resolve the pointeriness of types: a type of // **T and a variable p becomes T and &&p. This means we can *always* construct // an Opts object and unmarshal into it without having nil dereferences. func findOptsAccessPattern(t types.Type, access *Statement) (types.Type, *Statement) { switch t := t.(type) { case *types.Pointer: // taking the address of an address isn't allowed - so we use a ptr // helper function t2, val := findOptsAccessPattern(t.Elem(), access) return t2, Id("ptr").Call(val) // case *types.Slice: // t2, val := findOptsAccessPattern(t.Elem(), access) // return t2, Index().Id(renderNameOrStruct(t.Elem())).Values(val) default: return t, access } } func asInlineStruct(t types.Type) (*types.Struct, bool) { switch t := t.(type) { case *types.Pointer: return asInlineStruct(t.Elem()) case *types.Struct: return t, true default: return nil, false } } func asInlineStructAst(t ast.Node) (*ast.StructType, bool) { switch t := t.(type) { case *ast.StarExpr: return asInlineStructAst(t.X) case *ast.StructType: return t, true default: return nil, false } }
closed
dagger/dagger
https://github.com/dagger/dagger
5,971
🐞 `runtime error: index out of range` error when generating `go` modules
### What is the issue? Using common parameter types like following code block causing `runtime error: index out of range` while generating module code. ```go func (ar *ActionRun) WithInput(name, value string) *ActionRun { ar.Config.With = append(ar.Config.With, fmt.Sprintf("%s=%s", name, value)) return ar } ``` ### Log output ```shell dagger mod sync ✘ asModule(sourceSubpath: "daggerverse/actions/runtime") ERROR [3.18s] ✘ exec /usr/local/bin/codegen --module . --propagate-logs=true ERROR [0.39s] ┃ Error: generate code: template: module:56:3: executing "module" at <Modu ┃ MainSrc>: error calling ModuleMainSrc: runtime error: index out of range ┃ 1] with length 1 ┃ Usage: ┃ codegen [flags] ┃ ┃ Flags: ┃ -h, --help help for codegen ┃ --lang string language to generate (default "go") ┃ --module string module to load and codegen dependency code ┃ -o, --output string output directory (default ".") ┃ --propagate-logs propagate logs directly to progrock.sock ┃ ┃ Error: generate code: template: module:56:3: executing "module" at <Modu ┃ MainSrc>: error calling ModuleMainSrc: runtime error: index out of range ┃ 1] with length 1 ✘ generating go module: actions-runtime ERROR [0.28s] • Engine: d8c37de1d5af (version devel ()) ⧗ 4.89s ✔ 238 ∅ 2 ✘ 3 Error: failed to automate vcs: failed to get vcs ignored paths: input:1: host.directory.asModule failed to call module "actions-runtime" to get functions: failed to get function output directory: process "/usr/local/bin/codegen --module . --propagate-logs=true" did not complete successfully: exit code: 1 ``` ### Steps to reproduce - Create a go module - Add command to module using shared type parameter like `func (ar *ActionRun) WithInput(name, value string) *ActionRun` - Run `dagger mod sync` ### SDK version Go SDK v0.9.1, Dagger CLI v0.9.1 ### OS version macOS 14.0
https://github.com/dagger/dagger/issues/5971
https://github.com/dagger/dagger/pull/5972
c8990707600e665638707f19c12d4ecb80ef3e3a
35442c542873fd260cddbcbed2ece93ce4b5a79f
"2023-10-26T15:48:07Z"
go
"2023-10-26T17:53:44Z"
core/integration/module_test.go
package core import ( "context" _ "embed" "errors" "fmt" "os" "path/filepath" "strconv" "strings" "testing" "time" "dagger.io/dagger" "github.com/iancoleman/strcase" "github.com/moby/buildkit/identity" "github.com/stretchr/testify/require" "github.com/tidwall/gjson" "golang.org/x/sync/errgroup" ) /* TODO: add coverage for * dagger mod use * dagger mod sync * that the codegen of the testdata envs are up to date (or incorporate that into a cli command) * if a dependency changes, then checks should re-run */ func TestModuleGoInit(t *testing.T) { t.Run("from scratch", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=bare", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{bare{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"bare":{"containerEcho":{"stdout":"hello\n"}}}`, out) }) t.Run("kebab-cases Go module name, camel-cases Dagger module name", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=My-Module", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{myModule{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"myModule":{"containerEcho":{"stdout":"hello\n"}}}`, out) generated, err := modGen.File("go.mod").Contents(ctx) require.NoError(t, err) require.Contains(t, generated, "module my-module") }) t.Run("creates go.mod beneath an existing go.mod if root points beneath it", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/go.mod", dagger.ContainerWithNewFileOpts{ Contents: "module example.com/test\n", }). WithNewFile("/work/foo.go", dagger.ContainerWithNewFileOpts{ Contents: "package foo\n", }). WithWorkdir("/work/ci"). With(daggerExec("mod", "init", "--name=beneathGoMod", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{beneathGoMod{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"beneathGoMod":{"containerEcho":{"stdout":"hello\n"}}}`, out) t.Run("names Go module after Dagger module", func(t *testing.T) { generated, err := modGen.File("go.mod").Contents(ctx) require.NoError(t, err) require.Contains(t, generated, "module beneath-go-mod") }) }) t.Run("respects existing go.mod", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithExec([]string{"go", "mod", "init", "example.com/test"}). With(daggerExec("mod", "init", "--name=hasGoMod", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{hasGoMod{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"hasGoMod":{"containerEcho":{"stdout":"hello\n"}}}`, out) t.Run("preserves module name", func(t *testing.T) { generated, err := modGen.File("go.mod").Contents(ctx) require.NoError(t, err) require.Contains(t, generated, "module example.com/test") }) }) t.Run("respects parent go.mod if root points to it", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithExec([]string{"go", "mod", "init", "example.com/test"}). WithNewFile("/work/foo.go", dagger.ContainerWithNewFileOpts{ Contents: "package foo\n", }). WithWorkdir("/work/child"). With(daggerExec("mod", "init", "--name=child", "--sdk=go", "--root=..")). WithNewFile("/work/child/main.go", dagger.ContainerWithNewFileOpts{ Contents: ` package main import "os" type Child struct{} func (m *Child) Root() *Directory { wd, err := os.Getwd() if err != nil { panic(err) } return dag.Host().Directory(wd+"/..") } `, }) generated := modGen. // explicitly sync to see whether it makes a go.mod With(daggerExec("mod", "sync")). Directory(".") logGen(ctx, t, generated) out, err := modGen. With(daggerQuery(`{child{root{entries}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"child":{"root":{"entries":["child","foo.go","go.mod","go.sum"]}}}`, out) childEntries, err := generated.Entries(ctx) require.NoError(t, err) require.NotContains(t, childEntries, "go.mod") t.Run("preserves parent module name", func(t *testing.T) { generated, err := modGen.File("/work/go.mod").Contents(ctx) require.NoError(t, err) require.Contains(t, generated, "module example.com/test") }) }) t.Run("respects existing go.mod even if root points to parent that has go.mod", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithExec([]string{"go", "mod", "init", "example.com/test"}). WithNewFile("/work/foo.go", dagger.ContainerWithNewFileOpts{ Contents: "package foo\n", }). WithWorkdir("/work/child"). WithExec([]string{"go", "mod", "init", "my-mod"}). With(daggerExec("mod", "init", "--name=child", "--sdk=go", "--root=..")). WithNewFile("/work/child/main.go", dagger.ContainerWithNewFileOpts{ Contents: ` package main import "os" type Child struct{} func (m *Child) Root() *Directory { wd, err := os.Getwd() if err != nil { panic(err) } return dag.Host().Directory(wd+"/..") } `, }) generated := modGen. // explicitly sync to see whether it makes a go.mod With(daggerExec("mod", "sync")). Directory(".") logGen(ctx, t, generated) out, err := modGen. With(daggerQuery(`{child{root{entries}}}`)). Stdout(ctx) require.NoError(t, err) // no go.sum require.JSONEq(t, `{"child":{"root":{"entries":["child","foo.go","go.mod"]}}}`, out) childEntries, err := generated.Entries(ctx) require.NoError(t, err) require.Contains(t, childEntries, "go.mod") require.Contains(t, childEntries, "go.sum") }) t.Run("respects existing main.go", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: ` package main type HasMainGo struct {} func (m *HasMainGo) Hello() string { return "Hello, world!" } `, }). With(daggerExec("mod", "init", "--name=hasMainGo", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{hasMainGo{hello}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"hasMainGo":{"hello":"Hello, world!"}}`, out) }) t.Run("respects existing main.go even if it uses types not generated yet", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: ` package main type HasDaggerTypes struct {} func (m *HasDaggerTypes) Hello() *Container { return dag.Container(). From("` + alpineImage + `"). WithExec([]string{"echo", "Hello, world!"}) } `, }). With(daggerExec("mod", "init", "--name=hasDaggerTypes", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{hasDaggerTypes{hello{stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"hasDaggerTypes":{"hello":{"stdout":"Hello, world!\n"}}}`, out) }) t.Run("respects existing package without creating main.go", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/notmain.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type HasNotMainGo struct {} func (m *HasNotMainGo) Hello() string { return "Hello, world!" } `, }). With(daggerExec("mod", "init", "--name=hasNotMainGo", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{hasNotMainGo{hello}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"hasNotMainGo":{"hello":"Hello, world!"}}`, out) }) } func TestModuleGit(t *testing.T) { t.Parallel() type testCase struct { sdk string gitignores []string gitattributes string } for _, tc := range []testCase{ { sdk: "go", gitignores: []string{ "/dagger.gen.go\n", "/querybuilder/\n", }, }, { sdk: "python", gitignores: []string{ "/sdk\n", }, }, } { tc := tc t.Run(fmt.Sprintf("module %s git", tc.sdk), func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := goGitBase(t, c). With(daggerExec("mod", "init", "--name=bare", "--sdk="+tc.sdk)) if tc.sdk == "go" { logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{bare{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"bare":{"containerEcho":{"stdout":"hello\n"}}}`, out) } else { out, err := modGen. With(daggerQuery(`{bare{myFunction(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"bare":{"myFunction":{"stdout":"hello\n"}}}`, out) } t.Run("configures .gitignore", func(t *testing.T) { ignore, err := modGen.File(".gitignore").Contents(ctx) require.NoError(t, err) for _, gitignore := range tc.gitignores { require.Contains(t, ignore, gitignore) } }) }) } } func TestModuleGoGitRemovesIgnored(t *testing.T) { t.Parallel() c, ctx := connect(t) committedModGen := goGitBase(t, c). With(daggerExec("mod", "init", "--name=bare", "--sdk=go")). WithExec([]string{"rm", ".gitignore"}). // simulate old path scheme to show we ignore it too to help transition WithExec([]string{"mkdir", "./internal"}). WithExec([]string{"cp", "-a", "./querybuilder", "./internal/querybuilder"}). WithExec([]string{"git", "add", "."}). WithExec([]string{"git", "commit", "-m", "init with generated files"}) changedAfterSync, err := committedModGen. With(daggerExec("mod", "sync")). WithExec([]string{"git", "diff"}). // for debugging WithExec([]string{"git", "status", "--short"}). Stdout(ctx) require.NoError(t, err) t.Logf("changed after sync:\n%s", changedAfterSync) require.Contains(t, changedAfterSync, "D dagger.gen.go\n") require.Contains(t, changedAfterSync, "D querybuilder/marshal.go\n") require.Contains(t, changedAfterSync, "D querybuilder/querybuilder.go\n") require.Contains(t, changedAfterSync, "D internal/querybuilder/marshal.go\n") require.Contains(t, changedAfterSync, "D internal/querybuilder/querybuilder.go\n") } func TestModulePythonGitRemovesIgnored(t *testing.T) { t.Parallel() c, ctx := connect(t) committedModGen := goGitBase(t, c). With(daggerExec("mod", "init", "--name=bare", "--sdk=python")). WithExec([]string{"rm", ".gitignore"}). WithExec([]string{"git", "add", "."}). WithExec([]string{"git", "commit", "-m", "init with generated files"}) changedAfterSync, err := committedModGen. With(daggerExec("mod", "sync")). WithExec([]string{"git", "diff"}). // for debugging WithExec([]string{"git", "status", "--short"}). Stdout(ctx) require.NoError(t, err) t.Logf("changed after sync:\n%s", changedAfterSync) require.Contains(t, changedAfterSync, "D sdk/pyproject.toml\n") require.Contains(t, changedAfterSync, "D sdk/src/dagger/__init__.py\n") } //go:embed testdata/modules/go/minimal/main.go var goSignatures string func TestModuleGoSignatures(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: goSignatures, }) logGen(ctx, t, modGen.Directory(".")) t.Run("func Hello() string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{hello}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"hello":"hello"}}`, out) }) t.Run("func Echo(string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echo(msg: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echo":"hello...hello...hello..."}}`, out) }) t.Run("func EchoPointer(*string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoPointer(msg: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoPointer":"hello...hello...hello..."}}`, out) }) t.Run("func EchoPointerPointer(**string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoPointerPointer(msg: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoPointerPointer":"hello...hello...hello..."}}`, out) }) t.Run("func EchoOptional(string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOptional(msg: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptional":"hello...hello...hello..."}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOptional}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptional":"default...default...default..."}}`, out) }) t.Run("func EchoOptionalPointer(string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOptionalPointer(msg: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptionalPointer":"hello...hello...hello..."}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOptionalPointer}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptionalPointer":"default...default...default..."}}`, out) }) t.Run("func Echoes([]string) []string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoes(msgs: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoes":["hello...hello...hello..."]}}`, out) }) t.Run("func EchoesVariadic(...string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoesVariadic(msgs: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoesVariadic":"hello...hello...hello..."}}`, out) }) t.Run("func HelloContext(context.Context) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{helloContext}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"helloContext":"hello context"}}`, out) }) t.Run("func EchoContext(context.Context, string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoContext(msg: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoContext":"ctx.hello...ctx.hello...ctx.hello..."}}`, out) }) t.Run("func HelloStringError() (string, error)", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{helloStringError}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"helloStringError":"hello i worked"}}`, out) }) t.Run("func HelloVoid()", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{helloVoid}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"helloVoid":null}}`, out) }) t.Run("func HelloVoidError() error", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{helloVoidError}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"helloVoidError":null}}`, out) }) t.Run("func EchoOpts(string, string, int) error", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOpts(msg: "hi")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOpts":"hi"}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOpts(msg: "hi", suffix: "!", times: 2)}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOpts":"hi!hi!"}}`, out) }) t.Run("func EchoOptsInline(struct{string, string, int}) error", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOptsInline(msg: "hi")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInline":"hi"}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOptsInline(msg: "hi", suffix: "!", times: 2)}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInline":"hi!hi!"}}`, out) }) t.Run("func EchoOptsInlinePointer(*struct{string, string, int}) error", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOptsInlinePointer(msg: "hi")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInlinePointer":"hi"}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOptsInlinePointer(msg: "hi", suffix: "!", times: 2)}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInlinePointer":"hi!hi!"}}`, out) }) t.Run("func EchoOptsInlineCtx(ctx, struct{string, string, int}) error", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOptsInlineCtx(msg: "hi")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInlineCtx":"hi"}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOptsInlineCtx(msg: "hi", suffix: "!", times: 2)}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInlineCtx":"hi!hi!"}}`, out) }) t.Run("func EchoOptsInlineTags(struct{string, string, int}) error", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOptsInlineTags(msg: "hi")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInlineTags":"hi"}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOptsInlineTags(msg: "hi", suffix: "!", times: 2)}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInlineTags":"hi!hi!"}}`, out) }) } var inspectModule = daggerQuery(` query { host { directory(path: ".") { asModule { objects { asObject { name functions { name description args { name description } } } } } } } } `) func TestModuleGoDocs(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: goSignatures, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(inspectModule).Stdout(ctx) require.NoError(t, err) obj := gjson.Get(out, "host.directory.asModule.objects.0.asObject") require.Equal(t, "Minimal", obj.Get("name").String()) hello := obj.Get(`functions.#(name="hello")`) require.Equal(t, "hello", hello.Get("name").String()) require.Empty(t, hello.Get("description").String()) require.Empty(t, hello.Get("args").Array()) // test the args-based form echoOpts := obj.Get(`functions.#(name="echoOpts")`) require.Equal(t, "echoOpts", echoOpts.Get("name").String()) require.Equal(t, "EchoOpts does some opts things", echoOpts.Get("description").String()) require.Len(t, echoOpts.Get("args").Array(), 3) require.Equal(t, "msg", echoOpts.Get("args.0.name").String()) require.Equal(t, "the message to echo", echoOpts.Get("args.0.description").String()) require.Equal(t, "suffix", echoOpts.Get("args.1.name").String()) require.Equal(t, "String to append to the echoed message", echoOpts.Get("args.1.description").String()) require.Equal(t, "times", echoOpts.Get("args.2.name").String()) require.Equal(t, "Number of times to repeat the message", echoOpts.Get("args.2.description").String()) // test the inline struct form echoOpts = obj.Get(`functions.#(name="echoOptsInline")`) require.Equal(t, "echoOptsInline", echoOpts.Get("name").String()) require.Equal(t, "EchoOptsInline does some opts things", echoOpts.Get("description").String()) require.Len(t, echoOpts.Get("args").Array(), 3) require.Equal(t, "msg", echoOpts.Get("args.0.name").String()) require.Equal(t, "the message to echo", echoOpts.Get("args.0.description").String()) require.Equal(t, "suffix", echoOpts.Get("args.1.name").String()) require.Equal(t, "String to append to the echoed message", echoOpts.Get("args.1.description").String()) require.Equal(t, "times", echoOpts.Get("args.2.name").String()) require.Equal(t, "Number of times to repeat the message", echoOpts.Get("args.2.description").String()) } func TestModuleGoDocsEdgeCases(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Minimal struct {} // some docs func (m *Minimal) Hello(foo string, bar string, // hello baz string, qux string, x string, // lol ) string { return foo + bar } func (m *Minimal) HelloAgain( foo string, // docs for foo bar string, ) string { return foo + bar } `, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(inspectModule).Stdout(ctx) require.NoError(t, err) obj := gjson.Get(out, "host.directory.asModule.objects.0.asObject") require.Equal(t, "Minimal", obj.Get("name").String()) hello := obj.Get(`functions.#(name="hello")`) require.Equal(t, "hello", hello.Get("name").String()) require.Len(t, hello.Get("args").Array(), 5) require.Equal(t, "foo", hello.Get("args.0.name").String()) require.Equal(t, "", hello.Get("args.0.description").String()) require.Equal(t, "bar", hello.Get("args.1.name").String()) require.Equal(t, "", hello.Get("args.1.description").String()) require.Equal(t, "baz", hello.Get("args.2.name").String()) require.Equal(t, "hello", hello.Get("args.2.description").String()) require.Equal(t, "qux", hello.Get("args.3.name").String()) require.Equal(t, "", hello.Get("args.3.description").String()) require.Equal(t, "x", hello.Get("args.4.name").String()) require.Equal(t, "lol", hello.Get("args.4.description").String()) // hello = obj.Get(`functions.#(name="helloAgain")`) // require.Equal(t, "helloAgain", hello.Get("name").String()) // require.Len(t, hello.Get("args").Array(), 2) // require.Equal(t, "foo", hello.Get("args.0.name").String()) // require.Equal(t, "docs for foo", hello.Get("args.0.description").String()) // require.Equal(t, "bar", hello.Get("args.1.name").String()) // require.Equal(t, "", hello.Get("args.1.description").String()) } func TestModuleGoSignaturesMixMatch(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Minimal struct {} func (m *Minimal) Hello(name string, opts struct{}, opts2 struct{}) string { return name } `, }) logGen(ctx, t, modGen.Directory(".")) _, err := modGen.With(daggerQuery(`{minimal{hello}}`)).Stdout(ctx) require.Error(t, err) } func TestModuleGoSignaturesIDable(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Minimal struct {} type Custom struct { Data string } func (m *Minimal) Hello() string { return "hello" } func (m *Minimal) UseCustom(custom *Custom) string { return custom.Data } `, }) logGen(ctx, t, modGen.Directory(".")) // Currently, IDable modules are *not* supported, and should fail with an // error that fails to find the ID type. _, err := modGen.With(daggerQuery(`{minimal{hello}}`)).Stdout(ctx) require.Error(t, err) require.Contains(t, err.Error(), "Undefined type MinimalCustomID") } //go:embed testdata/modules/go/extend/main.go var goExtend string // this is no longer allowed, but verify the SDK errors out func TestModuleGoExtendCore(t *testing.T) { t.Parallel() var logs safeBuffer c, ctx := connect(t, dagger.WithLogOutput(&logs)) _, err := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: goExtend, }). With(daggerExec("mod", "sync")). Sync(ctx) require.Error(t, err) require.NoError(t, c.Close()) require.Contains(t, logs.String(), "cannot define methods on objects from outside this module") } //go:embed testdata/modules/go/custom-types/main.go var customTypes string func TestModuleGoCustomTypes(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: customTypes, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerQuery(`{test{repeater(msg:"echo!", times: 3){render}}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"test":{"repeater":{"render":"echo!echo!echo!"}}}`, out) } func TestModuleGoReturnTypeDetection(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=foo", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Foo struct {} type X struct { Message string ` + "`json:\"message\"`" + ` } func (m *Foo) MyFunction() X { return X{Message: "foo"} } `, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerQuery(`{foo{myFunction{message}}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"foo":{"myFunction":{"message":"foo"}}}`, out) } //go:embed testdata/modules/go/use/dep/main.go var useInner string //go:embed testdata/modules/go/use/main.go var useOuter string func TestModuleGoUseLocal(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/dep"). With(daggerExec("mod", "init", "--name=dep", "--sdk=go")). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=use", "--sdk=go")). WithNewFile("/work/dep/main.go", dagger.ContainerWithNewFileOpts{ Contents: useInner, }). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: useOuter, }). With(daggerExec("mod", "use", "./dep")). WithEnvVariable("BUST", identity.NewID()) // NB(vito): hmm... logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerQuery(`{use{useHello}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"use":{"useHello":"hello"}}`, out) // cannot use transitive dependency directly _, err = modGen.With(daggerQuery(`{dep{hello}}`)).Stdout(ctx) require.Error(t, err) require.ErrorContains(t, err, `Cannot query field "dep" on type "Query".`) } func TestModuleGoUseLocalMulti(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/foo"). WithNewFile("/work/foo/main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Foo struct {} func (m *Foo) Name() string { return "foo" } `, }). With(daggerExec("mod", "init", "--name=foo", "--sdk=go")). WithWorkdir("/work/bar"). WithNewFile("/work/bar/main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Bar struct {} func (m *Bar) Name() string { return "bar" } `, }). With(daggerExec("mod", "init", "--name=bar", "--sdk=go")). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=use", "--sdk=go")). With(daggerExec("mod", "use", "./foo")). With(daggerExec("mod", "use", "./bar")). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main import "context" import "fmt" type Use struct {} func (m *Use) Names(ctx context.Context) ([]string, error) { fooName, err := dag.Foo().Name(ctx) if err != nil { return nil, fmt.Errorf("foo.name: %w", err) } barName, err := dag.Bar().Name(ctx) if err != nil { return nil, fmt.Errorf("bar.name: %w", err) } return []string{fooName, barName}, nil } `, }). WithEnvVariable("BUST", identity.NewID()) // NB(vito): hmm... logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerQuery(`{use{names}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"use":{"names":["foo", "bar"]}}`, out) } //go:embed testdata/modules/go/wrapper/main.go var wrapper string func TestModuleGoWrapping(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=wrapper", "--sdk=go")). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: wrapper, }) logGen(ctx, t, modGen.Directory(".")) id := identity.NewID() out, err := modGen.With(daggerQuery( fmt.Sprintf(`{wrapper{container{echo(msg:%q){unwrap{stdout}}}}}`, id), )).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, fmt.Sprintf(`{"wrapper":{"container":{"echo":{"unwrap":{"stdout":%q}}}}}`, id), out) } func TestModuleConfigAPI(t *testing.T) { t.Parallel() c, ctx := connect(t) moduleDir := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/subdir"). With(daggerExec("mod", "init", "--name=test", "--sdk=go", "--root=..")). Directory("/work") cfg := c.ModuleConfig(moduleDir, dagger.ModuleConfigOpts{Subpath: "subdir"}) name, err := cfg.Name(ctx) require.NoError(t, err) require.Equal(t, "test", name) sdk, err := cfg.SDK(ctx) require.NoError(t, err) require.Equal(t, "go", sdk) root, err := cfg.Root(ctx) require.NoError(t, err) require.Equal(t, "..", root) } func TestModulePythonInit(t *testing.T) { t.Run("from scratch", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=bare", "--sdk=python")) out, err := modGen. With(daggerQuery(`{bare{myFunction(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"bare":{"myFunction":{"stdout":"hello\n"}}}`, out) }) t.Run("respects existing pyproject.toml", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("pyproject.toml", dagger.ContainerWithNewFileOpts{ Contents: `[project] name = "has-pyproject" version = "0.0.0" `, }). With(daggerExec("mod", "init", "--name=hasPyproject", "--sdk=python")) out, err := modGen. With(daggerQuery(`{hasPyproject{myFunction(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"hasPyproject":{"myFunction":{"stdout":"hello\n"}}}`, out) t.Run("preserves module name", func(t *testing.T) { generated, err := modGen.File("pyproject.toml").Contents(ctx) require.NoError(t, err) require.Contains(t, generated, `name = "has-pyproject"`) }) }) t.Run("respects existing main.py", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/src/main/__init__.py", dagger.ContainerWithNewFileOpts{ Contents: "from . import notmain\n", }). WithNewFile("/work/src/main/notmain.py", dagger.ContainerWithNewFileOpts{ Contents: `from dagger.mod import function @function def hello() -> str: return "Hello, world!" `, }). With(daggerExec("mod", "init", "--name=hasMainPy", "--sdk=python")) out, err := modGen. With(daggerQuery(`{hasMainPy{hello}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"hasMainPy":{"hello":"Hello, world!"}}`, out) }) } func TestModuleLotsOfFunctions(t *testing.T) { t.Parallel() const funcCount = 100 t.Run("go sdk", func(t *testing.T) { t.Parallel() c, ctx := connect(t) mainSrc := ` package main type PotatoSack struct {} ` for i := 0; i < funcCount; i++ { mainSrc += fmt.Sprintf(` func (m *PotatoSack) Potato%d() string { return "potato #%d" } `, i, i) } modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: mainSrc, }). With(daggerExec("mod", "init", "--name=potatoSack", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) var eg errgroup.Group for i := 0; i < funcCount; i++ { i := i // just verify a subset work if i%10 != 0 { continue } eg.Go(func() error { _, err := modGen. With(daggerCall(fmt.Sprintf("potato%d", i))). Sync(ctx) return err }) } require.NoError(t, eg.Wait()) }) t.Run("python sdk", func(t *testing.T) { t.Parallel() c, ctx := connect(t) mainSrc := `from dagger.mod import function ` for i := 0; i < funcCount; i++ { mainSrc += fmt.Sprintf(` @function def potato_%d() -> str: return "potato #%d" `, i, i) } modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("./src/main.py", dagger.ContainerWithNewFileOpts{ Contents: mainSrc, }). With(daggerExec("mod", "init", "--name=potatoSack", "--sdk=python")) var eg errgroup.Group for i := 0; i < funcCount; i++ { i := i // just verify a subset work if i%10 != 0 { continue } eg.Go(func() error { _, err := modGen. With(daggerCall(fmt.Sprintf("potato%d", i))). Sync(ctx) return err }) } require.NoError(t, eg.Wait()) }) } func TestModuleNamespacing(t *testing.T) { t.Parallel() c, ctx := connect(t) moduleSrcPath, err := filepath.Abs("./testdata/modules/go/namespacing") require.NoError(t, err) ctr := c.Container().From(alpineImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithMountedDirectory("/work", c.Host().Directory(moduleSrcPath)). WithWorkdir("/work") out, err := ctr. With(daggerQuery(`{test{fn(s:"yo")}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"test":{"fn":"1:yo 2:yo"}}`, out) } func TestEnvCmd(t *testing.T) { t.Skip("pending conversion to modules") t.Parallel() type testCase struct { environmentPath string expectedSDK string expectedName string expectedRoot string } for _, tc := range []testCase{ { environmentPath: "core/integration/testdata/environments/go/basic", expectedSDK: "go", expectedName: "basic", expectedRoot: "../../../../../../", }, } { tc := tc for _, testGitEnv := range []bool{false, true} { testGitEnv := testGitEnv testName := "local environment" if testGitEnv { testName = "git environment" } testName += "/" + tc.environmentPath t.Run(testName, func(t *testing.T) { t.Parallel() c, ctx := connect(t) stderr, err := CLITestContainer(ctx, t, c). WithLoadedEnv(tc.environmentPath, testGitEnv). CallEnv(). Stderr(ctx) require.NoError(t, err) require.Contains(t, stderr, fmt.Sprintf(`"root": %q`, tc.expectedRoot)) require.Contains(t, stderr, fmt.Sprintf(`"name": %q`, tc.expectedName)) require.Contains(t, stderr, fmt.Sprintf(`"sdk": %q`, tc.expectedSDK)) }) } } } func TestEnvCmdHelps(t *testing.T) { t.Skip("pending conversion to modules") t.Parallel() c, ctx := connect(t) baseCtr := CLITestContainer(ctx, t, c).WithHelpArg(true) // test with no env specified noEnvCtr := baseCtr // test with a valid local env validLocalEnvCtr := baseCtr.WithLoadedEnv("core/integration/testdata/environments/go/basic", false) // test with a broken local env (this helps ensure that we aren't actually running the entrypoints, if we did we'd get an error) brokenLocalEnvCtr := baseCtr.WithLoadedEnv("core/integration/testdata/environments/go/broken", false) for _, ctr := range []*DaggerCLIContainer{noEnvCtr, validLocalEnvCtr, brokenLocalEnvCtr} { type testCase struct { testName string cmdCtr *DaggerCLIContainer expectedOutput string } for _, tc := range []testCase{ { testName: "dagger env/" + ctr.EnvArg, cmdCtr: ctr.CallEnv(), expectedOutput: "Usage:\n dagger environment [flags]\n\nAliases:\n environment, env", }, { testName: "dagger env init/" + ctr.EnvArg, cmdCtr: ctr.CallEnvInit(), expectedOutput: "Usage:\n dagger environment init", }, { testName: "dagger env sync/" + ctr.EnvArg, cmdCtr: ctr.CallEnvSync(), expectedOutput: "Usage:\n dagger environment sync", }, { testName: "dagger env extend/" + ctr.EnvArg, cmdCtr: ctr.CallEnvExtend("./fake/dep"), expectedOutput: "Usage:\n dagger environment extend", }, { testName: "dagger checks/" + ctr.EnvArg, cmdCtr: ctr.CallChecks(), expectedOutput: "Usage:\n dagger checks", }, } { tc := tc t.Run(tc.testName, func(t *testing.T) { t.Parallel() stdout, err := tc.cmdCtr.Stdout(ctx) require.NoError(t, err) require.Contains(t, stdout, tc.expectedOutput) }) } } } func TestEnvCmdInit(t *testing.T) { t.Skip("pending conversion to modules") t.Parallel() type testCase struct { testName string environmentPath string sdk string name string root string expectedErrorMessage string } for _, tc := range []testCase{ { testName: "explicit environment dir/go", environmentPath: "/var/testenvironment/subdir", sdk: "go", name: identity.NewID(), root: "../", }, { testName: "explicit environment dir/python", environmentPath: "/var/testenvironment/subdir", sdk: "python", name: identity.NewID(), root: "../..", }, { testName: "explicit environment file", environmentPath: "/var/testenvironment/subdir/dagger.json", sdk: "python", name: identity.NewID(), }, { testName: "implicit environment", sdk: "go", name: identity.NewID(), }, { testName: "implicit environment with root", environmentPath: "/var/testenvironment", sdk: "python", name: identity.NewID(), root: "..", }, { testName: "invalid sdk", environmentPath: "/var/testenvironment", sdk: "c++--", name: identity.NewID(), expectedErrorMessage: "unsupported environment SDK", }, { testName: "error on git", environmentPath: "git://github.com/dagger/dagger.git", sdk: "go", name: identity.NewID(), expectedErrorMessage: "environment init is not supported for git environments", }, } { tc := tc t.Run(tc.testName, func(t *testing.T) { t.Parallel() c, ctx := connect(t) ctr := CLITestContainer(ctx, t, c). WithEnvArg(tc.environmentPath). WithSDKArg(tc.sdk). WithNameArg(tc.name). CallEnvInit() if tc.expectedErrorMessage != "" { _, err := ctr.Sync(ctx) require.ErrorContains(t, err, tc.expectedErrorMessage) return } expectedConfigPath := tc.environmentPath if !strings.HasSuffix(expectedConfigPath, "dagger.json") { expectedConfigPath = filepath.Join(expectedConfigPath, "dagger.json") } _, err := ctr.File(expectedConfigPath).Contents(ctx) require.NoError(t, err) // TODO: test rest of SDKs once custom codegen is supported if tc.sdk == "go" { codegenFile := filepath.Join(filepath.Dir(expectedConfigPath), "dagger.gen.go") _, err := ctr.File(codegenFile).Contents(ctx) require.NoError(t, err) } stderr, err := ctr.CallEnv().Stderr(ctx) require.NoError(t, err) require.Contains(t, stderr, fmt.Sprintf(`"name": %q`, tc.name)) require.Contains(t, stderr, fmt.Sprintf(`"sdk": %q`, tc.sdk)) }) } t.Run("error on existing environment", func(t *testing.T) { t.Parallel() c, ctx := connect(t) _, err := CLITestContainer(ctx, t, c). WithLoadedEnv("core/integration/testdata/environments/go/basic", false). WithSDKArg("go"). WithNameArg("foo"). CallEnvInit(). Sync(ctx) require.ErrorContains(t, err, "environment init config path already exists") }) } func TestEnvChecks(t *testing.T) { t.Skip("pending conversion to modules") t.Parallel() allChecks := []string{ "cool-static-check", "sad-static-check", "cool-container-check", "sad-container-check", "cool-composite-check", "sad-composite-check", "another-cool-static-check", "another-sad-static-check", "cool-composite-check-from-explicit-dep", "sad-composite-check-from-explicit-dep", "cool-composite-check-from-dynamic-dep", "sad-composite-check-from-dynamic-dep", "cool-check-only-return", "cool-check-result-only-return", "cool-string-only-return", "cool-error-only-return", "sad-error-only-return", "cool-string-error-return", "sad-string-error-return", } compositeCheckToSubcheckNames := map[string][]string{ "cool-composite-check": { "cool-subcheck-a", "cool-subcheck-b", }, "sad-composite-check": { "sad-subcheck-a", "sad-subcheck-b", }, "cool-composite-check-from-explicit-dep": { "another-cool-static-check", "another-cool-container-check", "another-cool-composite-check", }, "sad-composite-check-from-explicit-dep": { "another-sad-static-check", "another-sad-container-check", "another-sad-composite-check", }, "cool-composite-check-from-dynamic-dep": { "yet-another-cool-static-check", "yet-another-cool-container-check", "yet-another-cool-composite-check", }, "sad-composite-check-from-dynamic-dep": { "yet-another-sad-static-check", "yet-another-sad-container-check", "yet-another-sad-composite-check", }, "another-cool-composite-check": { "another-cool-subcheck-a", "another-cool-subcheck-b", }, "another-sad-composite-check": { "another-sad-subcheck-a", "another-sad-subcheck-b", }, "yet-another-cool-composite-check": { "yet-another-cool-subcheck-a", "yet-another-cool-subcheck-b", }, "yet-another-sad-composite-check": { "yet-another-sad-subcheck-a", "yet-another-sad-subcheck-b", }, } // should be aligned w/ `func checkOutput` in ./testdata/environments/go/basic/main.go checkOutput := func(name string) string { return "WE ARE RUNNING CHECK " + strcase.ToKebab(name) } type testCase struct { name string environmentPath string selectedChecks []string expectFailure bool } for _, tc := range []testCase{ { name: "happy-path", environmentPath: "core/integration/testdata/environments/go/basic", selectedChecks: []string{ "cool-static-check", "cool-container-check", "cool-composite-check", "another-cool-static-check", "cool-composite-check-from-explicit-dep", "cool-composite-check-from-dynamic-dep", "cool-check-only-return", "cool-check-result-only-return", "cool-string-only-return", "cool-error-only-return", "cool-string-error-return", }, }, { name: "sad-path", expectFailure: true, environmentPath: "core/integration/testdata/environments/go/basic", selectedChecks: []string{ "sad-static-check", "sad-container-check", "sad-composite-check", "another-sad-static-check", "sad-composite-check-from-explicit-dep", "sad-composite-check-from-dynamic-dep", "sad-error-only-return", "sad-string-error-return", }, }, { name: "mixed-path", expectFailure: true, environmentPath: "core/integration/testdata/environments/go/basic", // run all checks, don't select any }, } { tc := tc for _, testGitEnv := range []bool{false, true} { testGitEnv := testGitEnv testName := tc.name testName += "/gitenv=" + strconv.FormatBool(testGitEnv) testName += "/" + tc.environmentPath t.Run(testName, func(t *testing.T) { t.Parallel() c, ctx := connect(t) stderr, err := CLITestContainer(ctx, t, c). WithLoadedEnv(tc.environmentPath, testGitEnv). CallChecks(tc.selectedChecks...). Stderr(ctx) if tc.expectFailure { require.Error(t, err) execErr := new(dagger.ExecError) require.True(t, errors.As(err, &execErr)) stderr = execErr.Stderr } else { require.NoError(t, err) } selectedChecks := tc.selectedChecks if len(selectedChecks) == 0 { selectedChecks = allChecks } curChecks := selectedChecks for len(curChecks) > 0 { var nextChecks []string for _, checkName := range curChecks { subChecks, ok := compositeCheckToSubcheckNames[checkName] if ok { nextChecks = append(nextChecks, subChecks...) } else { // special case for successful error only check, doesn't have output if checkName == "cool-error-only-return" { continue } require.Contains(t, stderr, checkOutput(checkName)) } } curChecks = nextChecks } }) } } } func daggerExec(args ...string) dagger.WithContainerFunc { return func(c *dagger.Container) *dagger.Container { return c.WithExec(append([]string{"dagger", "--debug"}, args...), dagger.ContainerWithExecOpts{ ExperimentalPrivilegedNesting: true, }) } } func daggerQuery(query string) dagger.WithContainerFunc { return func(c *dagger.Container) *dagger.Container { return c.WithExec([]string{"dagger", "--debug", "query"}, dagger.ContainerWithExecOpts{ Stdin: query, ExperimentalPrivilegedNesting: true, }) } } // TODO: support args func daggerCall(fnName string) dagger.WithContainerFunc { return func(c *dagger.Container) *dagger.Container { return c.WithExec([]string{"dagger", "--debug", "call", fnName}, dagger.ContainerWithExecOpts{ ExperimentalPrivilegedNesting: true, }) } } func goGitBase(t *testing.T, c *dagger.Client) *dagger.Container { t.Helper() return c.Container().From(golangImage). WithExec([]string{"apk", "add", "git"}). WithExec([]string{"git", "config", "--global", "user.email", "dagger@example.com"}). WithExec([]string{"git", "config", "--global", "user.name", "Dagger Tests"}). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithExec([]string{"git", "init"}) } func logGen(ctx context.Context, t *testing.T, modSrc *dagger.Directory) { t.Helper() generated, err := modSrc.File("dagger.gen.go").Contents(ctx) require.NoError(t, err) t.Cleanup(func() { t.Name() fileName := filepath.Join( os.TempDir(), t.Name(), fmt.Sprintf("dagger.gen.%d.go", time.Now().Unix()), ) if err := os.MkdirAll(filepath.Dir(fileName), 0o755); err != nil { t.Logf("failed to create temp dir for generated code: %v", err) return } if err := os.WriteFile(fileName, []byte(generated), 0644); err != nil { t.Logf("failed to write generated code to %s: %v", fileName, err) } else { t.Logf("wrote generated code to %s", fileName) } }) }
closed
dagger/dagger
https://github.com/dagger/dagger
5,975
Zenith: error creating module named "Go"
``` ~/G/g/F/P/go ❯❯❯ dagger mod init --name Go --sdk go bugfix/prevent-stack-smashing ✱ ◼ ✘ asModule(sourceSubpath: ".") ERROR [0.92s] ✘ ..... ✘ generating go module: Go ERROR [0.09s] ├ [0.02s] go mod tidy ┃ writing dagger.gen.go ┃ writing go.mod ┃ writing go.sum ┃ writing main.go ┃ creating directory querybuilder ┃ writing querybuilder/marshal.go ┃ writing querybuilder/querybuilder.go ┃ panic: go: internal error: missing go root module ┃ ┃ goroutine 1 [running]: ┃ cmd/go/internal/modload.mustHaveGoRoot(...) ┃ cmd/go/internal/modload/buildlist.go:104 ┃ cmd/go/internal/modload.newRequirements(0xe0?, {0x4000218b40?, 0x543be0?, 0x40001720f0?}, 0x5aedc0?) ┃ cmd/go/internal/modload/buildlist.go:118 +0x584 ┃ cmd/go/internal/modload.updateUnprunedRoots({0x71df30?, 0xab31e0?}, 0x0?, 0x40000f20a0, {0x0, 0x0, 0x3d0f40?}) ┃ cmd/go/internal/modload/buildlist.go:1465 +0x820 ┃ cmd/go/internal/modload.updateRoots({0x71df30?, 0xab31e0?}, 0x0?, 0x40000a80c0?, {0x0?, 0x2?, 0x40000a80c0?}, {0x0?, 0x0?, 0x40000a80d0?}, ...) ┃ cmd/go/internal/modload/buildlist.go:781 +0x6c ┃ cmd/go/internal/modload.loadModFile({0x71df30, 0xab31e0}, 0x40000fe280) ┃ cmd/go/internal/modload/init.go:939 +0x134c ┃ cmd/go/internal/modload.LoadPackages({0x71df30?, 0xab31e0}, {{0x0, 0x0}, 0x4000119ef0, 0x1, {0x0, 0x0}, 0x1, 0x1, ...}, ...) ┃ cmd/go/internal/modload/load.go:345 +0x31c ┃ cmd/go/internal/modcmd.runTidy({0x71df30, 0xab31e0}, 0x40000ea4c8?, {0x400009e1a0?, 0x54c8e0?, 0x10edbc?}) ┃ cmd/go/internal/modcmd/tidy.go:127 +0x204 ┃ main.invoke(0xa70ea0, {0x400009e1a0, 0x1, 0x1}) ┃ cmd/go/main.go:268 +0x4f0 ┃ main.main() ┃ cmd/go/main.go:186 +0x754 ┃ needs another pass... • Engine: c8919d4606c0 (version v0.9.1) ``` Not immediately sure why this would happen (other names like "Golang" are find); need to dig through stack trace.
https://github.com/dagger/dagger/issues/5975
https://github.com/dagger/dagger/pull/5983
dfdb520e16167d2629fb005bfedb20522270e580
77600801b2a6bc4552cfc4fc5ae4307826e29334
"2023-10-26T19:25:12Z"
go
"2023-10-27T09:22:51Z"
cmd/codegen/generator/go/generator.go
package gogenerator import ( "bytes" "context" "fmt" "go/format" "go/token" "os" "os/exec" "path" "path/filepath" "strings" "dagger.io/dagger" "github.com/dagger/dagger/cmd/codegen/generator" "github.com/dagger/dagger/cmd/codegen/generator/go/templates" "github.com/dagger/dagger/cmd/codegen/introspection" "github.com/dschmidt/go-layerfs" "github.com/iancoleman/strcase" "github.com/psanford/memfs" "golang.org/x/mod/modfile" "golang.org/x/tools/go/packages" "golang.org/x/tools/imports" ) const ClientGenFile = "dagger.gen.go" const StarterTemplateFile = "main.go" type GoGenerator struct { Config generator.Config } func (g *GoGenerator) Generate(ctx context.Context, schema *introspection.Schema) (*generator.GeneratedState, error) { generator.SetSchema(schema) // 1. if no go.mod, generate go.mod // 2. if no .go files, bootstrap package main // 2a. generate dagger.gen.go from base client, // 2b. add stub main.go // 3. load package, generate dagger.gen.go (possibly again) mfs := memfs.New() genSt := &generator.GeneratedState{ Overlay: layerfs.New(mfs, dagger.QueryBuilder), PostCommands: []*exec.Cmd{ // run 'go mod tidy' after generating to fix and prune dependencies exec.Command("go", "mod", "tidy"), }, } pkgInfo, partial, err := g.bootstrapMod(ctx, mfs) if err != nil { return nil, fmt.Errorf("bootstrap package: %w", err) } outDir := g.Config.OutputDir initialGoFiles, err := filepath.Glob(filepath.Join(outDir, "*.go")) if err != nil { return nil, fmt.Errorf("glob go files: %w", err) } genFile := filepath.Join(outDir, ClientGenFile) if _, err := os.Stat(genFile); err != nil { // assume package main, default for modules pkgInfo.PackageName = "main" // generate an initial dagger.gen.go from the base Dagger API baseCfg := g.Config baseCfg.ModuleConfig = nil if err := generateCode(ctx, baseCfg, schema, mfs, pkgInfo, nil, nil); err != nil { return nil, fmt.Errorf("generate code: %w", err) } partial = true } if len(initialGoFiles) == 0 { // write an initial main.go if no main pkg exists yet if err := mfs.WriteFile(StarterTemplateFile, []byte(g.baseModuleSource()), 0600); err != nil { return nil, err } // main.go is actually an input to codegen, so this requires another pass partial = true } if partial { genSt.NeedRegenerate = true return genSt, nil } pkg, fset, err := loadPackage(ctx, outDir) if err != nil { return nil, fmt.Errorf("load package %q: %w", outDir, err) } // respect existing package name pkgInfo.PackageName = pkg.Name if err := generateCode(ctx, g.Config, schema, mfs, pkgInfo, pkg, fset); err != nil { return nil, fmt.Errorf("generate code: %w", err) } return genSt, nil } type PackageInfo struct { PackageName string // Go package name, typically "main" PackageImport string // import path of package in which this file appears } func (g *GoGenerator) bootstrapMod(ctx context.Context, mfs *memfs.FS) (*PackageInfo, bool, error) { var needsRegen bool outDir := g.Config.OutputDir info := &PackageInfo{} // use embedded go.mod as basis for pinning versions sdkMod, err := modfile.Parse("go.mod", dagger.GoMod, nil) if err != nil { return nil, false, fmt.Errorf("parse embedded go.mod: %w", err) } newMod := new(modfile.File) if content, err := os.ReadFile(filepath.Join(outDir, "go.mod")); err == nil { // respect existing go.mod currentMod, err := modfile.Parse("go.mod", content, nil) if err != nil { return nil, false, fmt.Errorf("parse go.mod: %w", err) } newMod = currentMod for _, req := range sdkMod.Require { newMod.AddRequire(req.Mod.Path, req.Mod.Version) } info.PackageImport = currentMod.Module.Mod.Path } else { if g.Config.ModuleConfig != nil { rootDir, subdirRelPath, err := g.Config.ModuleConfig.RootAndSubpath(outDir) if err != nil { return nil, false, fmt.Errorf("failed to get module root: %w", err) } // when a module is configured, look for a go.mod in its root dir instead // // this is a necessary part of bootstrapping: SDKs such as the Go SDK // will want to have a runtime module that lives in the same Go module as // the generated client, which typically lives in the parent directory. if pkg, _, err := loadPackage(ctx, rootDir); err == nil { return &PackageInfo{ // leave package name blank // TODO: maybe we don't even need to return it? PackageImport: path.Join(pkg.Module.Path, subdirRelPath), }, false, nil } // bootstrap go.mod using dependencies from the embedded Go SDK newModName := strcase.ToKebab(g.Config.ModuleConfig.Name) newMod.AddModuleStmt(newModName) newMod.SetRequire(sdkMod.Require) info.PackageImport = newModName needsRegen = true } else { // no module; assume client-only codegen if pkg, _, err := loadPackage(ctx, outDir); err == nil { return &PackageInfo{ PackageName: pkg.Name, PackageImport: pkg.Module.Path, }, false, nil } return nil, false, fmt.Errorf("no module name configured and no existing package found") } } modBody, err := newMod.Format() if err != nil { return nil, false, fmt.Errorf("format go.mod: %w", err) } if err := mfs.WriteFile("go.mod", modBody, 0600); err != nil { return nil, false, err } if err := mfs.WriteFile("go.sum", dagger.GoSum, 0600); err != nil { return nil, false, err } return info, needsRegen, nil } func generateCode( ctx context.Context, cfg generator.Config, schema *introspection.Schema, mfs *memfs.FS, pkgInfo *PackageInfo, pkg *packages.Package, fset *token.FileSet, ) error { funcs := templates.GoTemplateFuncs(ctx, schema, cfg.ModuleConfig, pkg, fset) headerData := struct { *PackageInfo Schema *introspection.Schema }{ PackageInfo: pkgInfo, Schema: schema, } var render []string var header bytes.Buffer if err := templates.Header(funcs).Execute(&header, headerData); err != nil { return err } render = append(render, header.String()) err := schema.Visit(introspection.VisitHandlers{ Scalar: func(t *introspection.Type) error { var out bytes.Buffer if err := templates.Scalar(funcs).Execute(&out, t); err != nil { return err } render = append(render, out.String()) return nil }, Object: func(t *introspection.Type) error { var out bytes.Buffer if err := templates.Object(funcs).Execute(&out, struct { *introspection.Type IsModuleCode bool }{ Type: t, IsModuleCode: cfg.ModuleConfig != nil, }); err != nil { return err } render = append(render, out.String()) return nil }, Enum: func(t *introspection.Type) error { var out bytes.Buffer if err := templates.Enum(funcs).Execute(&out, t); err != nil { return err } render = append(render, out.String()) return nil }, Input: func(t *introspection.Type) error { var out bytes.Buffer if err := templates.Input(funcs).Execute(&out, t); err != nil { return err } render = append(render, out.String()) return nil }, }) if err != nil { return err } if cfg.ModuleConfig != nil { moduleData := struct { Schema *introspection.Schema }{ Schema: schema, } var moduleMain bytes.Buffer if err := templates.Module(funcs).Execute(&moduleMain, moduleData); err != nil { return err } render = append(render, moduleMain.String()) } source := strings.Join(render, "\n") formatted, err := format.Source([]byte(source)) if err != nil { return fmt.Errorf("error formatting generated code: %T %+v %w\nsource:\n%s", err, err, err, source) } formatted, err = imports.Process(filepath.Join(cfg.OutputDir, "dummy.go"), formatted, nil) if err != nil { return fmt.Errorf("error formatting generated code: %T %+v %w\nsource:\n%s", err, err, err, source) } if err := mfs.WriteFile(ClientGenFile, formatted, 0600); err != nil { return err } return nil } func loadPackage(ctx context.Context, dir string) (*packages.Package, *token.FileSet, error) { fset := token.NewFileSet() pkgs, err := packages.Load(&packages.Config{ Context: ctx, Dir: dir, Tests: false, Fset: fset, Mode: packages.NeedName | packages.NeedTypes | packages.NeedSyntax | packages.NeedTypesInfo | packages.NeedModule, }, ".") if err != nil { return nil, nil, err } switch len(pkgs) { case 0: return nil, nil, fmt.Errorf("no packages found in %s", dir) case 1: if pkgs[0].Name == "" { // this happens when loading an empty dir within an existing Go module return nil, nil, fmt.Errorf("package name is empty") } return pkgs[0], fset, nil default: // this would mean I don't understand how loading '.' works return nil, nil, fmt.Errorf("expected 1 package, got %d", len(pkgs)) } } func (g *GoGenerator) baseModuleSource() string { moduleStructName := strcase.ToCamel(g.Config.ModuleConfig.Name) return fmt.Sprintf(`package main import ( "context" ) type %s struct {} // example usage: "dagger call container-echo --string-arg yo" func (m *%s) ContainerEcho(stringArg string) *Container { return dag.Container().From("alpine:latest").WithExec([]string{"echo", stringArg}) } // example usage: "dagger call grep-dir --directory-arg . --pattern GrepDir" func (m *%s) GrepDir(ctx context.Context, directoryArg *Directory, pattern string) (string, error) { return dag.Container(). From("alpine:latest"). WithMountedDirectory("/mnt", directoryArg). WithWorkdir("/mnt"). WithExec([]string{"grep", "-R", pattern, "."}). Stdout(ctx) } `, moduleStructName, moduleStructName, moduleStructName) }
closed
dagger/dagger
https://github.com/dagger/dagger
5,975
Zenith: error creating module named "Go"
``` ~/G/g/F/P/go ❯❯❯ dagger mod init --name Go --sdk go bugfix/prevent-stack-smashing ✱ ◼ ✘ asModule(sourceSubpath: ".") ERROR [0.92s] ✘ ..... ✘ generating go module: Go ERROR [0.09s] ├ [0.02s] go mod tidy ┃ writing dagger.gen.go ┃ writing go.mod ┃ writing go.sum ┃ writing main.go ┃ creating directory querybuilder ┃ writing querybuilder/marshal.go ┃ writing querybuilder/querybuilder.go ┃ panic: go: internal error: missing go root module ┃ ┃ goroutine 1 [running]: ┃ cmd/go/internal/modload.mustHaveGoRoot(...) ┃ cmd/go/internal/modload/buildlist.go:104 ┃ cmd/go/internal/modload.newRequirements(0xe0?, {0x4000218b40?, 0x543be0?, 0x40001720f0?}, 0x5aedc0?) ┃ cmd/go/internal/modload/buildlist.go:118 +0x584 ┃ cmd/go/internal/modload.updateUnprunedRoots({0x71df30?, 0xab31e0?}, 0x0?, 0x40000f20a0, {0x0, 0x0, 0x3d0f40?}) ┃ cmd/go/internal/modload/buildlist.go:1465 +0x820 ┃ cmd/go/internal/modload.updateRoots({0x71df30?, 0xab31e0?}, 0x0?, 0x40000a80c0?, {0x0?, 0x2?, 0x40000a80c0?}, {0x0?, 0x0?, 0x40000a80d0?}, ...) ┃ cmd/go/internal/modload/buildlist.go:781 +0x6c ┃ cmd/go/internal/modload.loadModFile({0x71df30, 0xab31e0}, 0x40000fe280) ┃ cmd/go/internal/modload/init.go:939 +0x134c ┃ cmd/go/internal/modload.LoadPackages({0x71df30?, 0xab31e0}, {{0x0, 0x0}, 0x4000119ef0, 0x1, {0x0, 0x0}, 0x1, 0x1, ...}, ...) ┃ cmd/go/internal/modload/load.go:345 +0x31c ┃ cmd/go/internal/modcmd.runTidy({0x71df30, 0xab31e0}, 0x40000ea4c8?, {0x400009e1a0?, 0x54c8e0?, 0x10edbc?}) ┃ cmd/go/internal/modcmd/tidy.go:127 +0x204 ┃ main.invoke(0xa70ea0, {0x400009e1a0, 0x1, 0x1}) ┃ cmd/go/main.go:268 +0x4f0 ┃ main.main() ┃ cmd/go/main.go:186 +0x754 ┃ needs another pass... • Engine: c8919d4606c0 (version v0.9.1) ``` Not immediately sure why this would happen (other names like "Golang" are find); need to dig through stack trace.
https://github.com/dagger/dagger/issues/5975
https://github.com/dagger/dagger/pull/5983
dfdb520e16167d2629fb005bfedb20522270e580
77600801b2a6bc4552cfc4fc5ae4307826e29334
"2023-10-26T19:25:12Z"
go
"2023-10-27T09:22:51Z"
core/integration/module_test.go
package core import ( "context" _ "embed" "errors" "fmt" "os" "path/filepath" "strconv" "strings" "testing" "time" "dagger.io/dagger" "github.com/iancoleman/strcase" "github.com/moby/buildkit/identity" "github.com/stretchr/testify/require" "github.com/tidwall/gjson" "golang.org/x/sync/errgroup" ) /* TODO: add coverage for * dagger mod use * dagger mod sync * that the codegen of the testdata envs are up to date (or incorporate that into a cli command) * if a dependency changes, then checks should re-run */ func TestModuleGoInit(t *testing.T) { t.Run("from scratch", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=bare", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{bare{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"bare":{"containerEcho":{"stdout":"hello\n"}}}`, out) }) t.Run("kebab-cases Go module name, camel-cases Dagger module name", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=My-Module", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{myModule{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"myModule":{"containerEcho":{"stdout":"hello\n"}}}`, out) generated, err := modGen.File("go.mod").Contents(ctx) require.NoError(t, err) require.Contains(t, generated, "module my-module") }) t.Run("creates go.mod beneath an existing go.mod if root points beneath it", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/go.mod", dagger.ContainerWithNewFileOpts{ Contents: "module example.com/test\n", }). WithNewFile("/work/foo.go", dagger.ContainerWithNewFileOpts{ Contents: "package foo\n", }). WithWorkdir("/work/ci"). With(daggerExec("mod", "init", "--name=beneathGoMod", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{beneathGoMod{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"beneathGoMod":{"containerEcho":{"stdout":"hello\n"}}}`, out) t.Run("names Go module after Dagger module", func(t *testing.T) { generated, err := modGen.File("go.mod").Contents(ctx) require.NoError(t, err) require.Contains(t, generated, "module beneath-go-mod") }) }) t.Run("respects existing go.mod", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithExec([]string{"go", "mod", "init", "example.com/test"}). With(daggerExec("mod", "init", "--name=hasGoMod", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{hasGoMod{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"hasGoMod":{"containerEcho":{"stdout":"hello\n"}}}`, out) t.Run("preserves module name", func(t *testing.T) { generated, err := modGen.File("go.mod").Contents(ctx) require.NoError(t, err) require.Contains(t, generated, "module example.com/test") }) }) t.Run("respects parent go.mod if root points to it", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithExec([]string{"go", "mod", "init", "example.com/test"}). WithNewFile("/work/foo.go", dagger.ContainerWithNewFileOpts{ Contents: "package foo\n", }). WithWorkdir("/work/child"). With(daggerExec("mod", "init", "--name=child", "--sdk=go", "--root=..")). WithNewFile("/work/child/main.go", dagger.ContainerWithNewFileOpts{ Contents: ` package main import "os" type Child struct{} func (m *Child) Root() *Directory { wd, err := os.Getwd() if err != nil { panic(err) } return dag.Host().Directory(wd+"/..") } `, }) generated := modGen. // explicitly sync to see whether it makes a go.mod With(daggerExec("mod", "sync")). Directory(".") logGen(ctx, t, generated) out, err := modGen. With(daggerQuery(`{child{root{entries}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"child":{"root":{"entries":["child","foo.go","go.mod","go.sum"]}}}`, out) childEntries, err := generated.Entries(ctx) require.NoError(t, err) require.NotContains(t, childEntries, "go.mod") t.Run("preserves parent module name", func(t *testing.T) { generated, err := modGen.File("/work/go.mod").Contents(ctx) require.NoError(t, err) require.Contains(t, generated, "module example.com/test") }) }) t.Run("respects existing go.mod even if root points to parent that has go.mod", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithExec([]string{"go", "mod", "init", "example.com/test"}). WithNewFile("/work/foo.go", dagger.ContainerWithNewFileOpts{ Contents: "package foo\n", }). WithWorkdir("/work/child"). WithExec([]string{"go", "mod", "init", "my-mod"}). With(daggerExec("mod", "init", "--name=child", "--sdk=go", "--root=..")). WithNewFile("/work/child/main.go", dagger.ContainerWithNewFileOpts{ Contents: ` package main import "os" type Child struct{} func (m *Child) Root() *Directory { wd, err := os.Getwd() if err != nil { panic(err) } return dag.Host().Directory(wd+"/..") } `, }) generated := modGen. // explicitly sync to see whether it makes a go.mod With(daggerExec("mod", "sync")). Directory(".") logGen(ctx, t, generated) out, err := modGen. With(daggerQuery(`{child{root{entries}}}`)). Stdout(ctx) require.NoError(t, err) // no go.sum require.JSONEq(t, `{"child":{"root":{"entries":["child","foo.go","go.mod"]}}}`, out) childEntries, err := generated.Entries(ctx) require.NoError(t, err) require.Contains(t, childEntries, "go.mod") require.Contains(t, childEntries, "go.sum") }) t.Run("respects existing main.go", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: ` package main type HasMainGo struct {} func (m *HasMainGo) Hello() string { return "Hello, world!" } `, }). With(daggerExec("mod", "init", "--name=hasMainGo", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{hasMainGo{hello}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"hasMainGo":{"hello":"Hello, world!"}}`, out) }) t.Run("respects existing main.go even if it uses types not generated yet", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: ` package main type HasDaggerTypes struct {} func (m *HasDaggerTypes) Hello() *Container { return dag.Container(). From("` + alpineImage + `"). WithExec([]string{"echo", "Hello, world!"}) } `, }). With(daggerExec("mod", "init", "--name=hasDaggerTypes", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{hasDaggerTypes{hello{stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"hasDaggerTypes":{"hello":{"stdout":"Hello, world!\n"}}}`, out) }) t.Run("respects existing package without creating main.go", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/notmain.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type HasNotMainGo struct {} func (m *HasNotMainGo) Hello() string { return "Hello, world!" } `, }). With(daggerExec("mod", "init", "--name=hasNotMainGo", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{hasNotMainGo{hello}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"hasNotMainGo":{"hello":"Hello, world!"}}`, out) }) } func TestModuleInitLICENSE(t *testing.T) { t.Run("bootstraps Apache-2.0 LICENSE file if none found", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=licensed-to-ill", "--sdk=go")) content, err := modGen.File("LICENSE").Contents(ctx) require.NoError(t, err) require.Contains(t, content, "Apache License, Version 2.0") }) t.Run("creates LICENSE file in the directory specified by -m", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "-m", "./mymod", "--name=licensed-to-ill", "--sdk=go")) content, err := modGen.File("mymod/LICENSE").Contents(ctx) require.NoError(t, err) require.Contains(t, content, "Apache License, Version 2.0") }) t.Run("does not bootstrap LICENSE file if it exists in the parent dir", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/LICENSE", dagger.ContainerWithNewFileOpts{ Contents: "doesnt matter", }). WithWorkdir("/work/sub"). With(daggerExec("mod", "init", "--name=licensed-to-ill", "--sdk=go")) _, err := modGen.File("LICENSE").Contents(ctx) require.Error(t, err) }) t.Run("bootstraps a LICENSE file when requested, even if it exists in the parent dir", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/LICENSE", dagger.ContainerWithNewFileOpts{ Contents: "doesnt matter", }). WithWorkdir("/work/sub"). With(daggerExec("mod", "init", "--name=licensed-to-ill", "--sdk=go", "--license=MIT")) content, err := modGen.File("LICENSE").Contents(ctx) require.NoError(t, err) require.Contains(t, content, "MIT License") }) } func TestModuleGit(t *testing.T) { t.Parallel() type testCase struct { sdk string gitignores []string gitattributes string } for _, tc := range []testCase{ { sdk: "go", gitignores: []string{ "/dagger.gen.go\n", "/querybuilder/\n", }, }, { sdk: "python", gitignores: []string{ "/sdk\n", }, }, } { tc := tc t.Run(fmt.Sprintf("module %s git", tc.sdk), func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := goGitBase(t, c). With(daggerExec("mod", "init", "--name=bare", "--sdk="+tc.sdk)) if tc.sdk == "go" { logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{bare{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"bare":{"containerEcho":{"stdout":"hello\n"}}}`, out) } else { out, err := modGen. With(daggerQuery(`{bare{myFunction(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"bare":{"myFunction":{"stdout":"hello\n"}}}`, out) } t.Run("configures .gitignore", func(t *testing.T) { ignore, err := modGen.File(".gitignore").Contents(ctx) require.NoError(t, err) for _, gitignore := range tc.gitignores { require.Contains(t, ignore, gitignore) } }) }) } } func TestModuleGoGitRemovesIgnored(t *testing.T) { t.Parallel() c, ctx := connect(t) committedModGen := goGitBase(t, c). With(daggerExec("mod", "init", "--name=bare", "--sdk=go")). WithExec([]string{"rm", ".gitignore"}). // simulate old path scheme to show we ignore it too to help transition WithExec([]string{"mkdir", "./internal"}). WithExec([]string{"cp", "-a", "./querybuilder", "./internal/querybuilder"}). WithExec([]string{"git", "add", "."}). WithExec([]string{"git", "commit", "-m", "init with generated files"}) changedAfterSync, err := committedModGen. With(daggerExec("mod", "sync")). WithExec([]string{"git", "diff"}). // for debugging WithExec([]string{"git", "status", "--short"}). Stdout(ctx) require.NoError(t, err) t.Logf("changed after sync:\n%s", changedAfterSync) require.Contains(t, changedAfterSync, "D dagger.gen.go\n") require.Contains(t, changedAfterSync, "D querybuilder/marshal.go\n") require.Contains(t, changedAfterSync, "D querybuilder/querybuilder.go\n") require.Contains(t, changedAfterSync, "D internal/querybuilder/marshal.go\n") require.Contains(t, changedAfterSync, "D internal/querybuilder/querybuilder.go\n") } func TestModulePythonGitRemovesIgnored(t *testing.T) { t.Parallel() c, ctx := connect(t) committedModGen := goGitBase(t, c). With(daggerExec("mod", "init", "--name=bare", "--sdk=python")). WithExec([]string{"rm", ".gitignore"}). WithExec([]string{"git", "add", "."}). WithExec([]string{"git", "commit", "-m", "init with generated files"}) changedAfterSync, err := committedModGen. With(daggerExec("mod", "sync")). WithExec([]string{"git", "diff"}). // for debugging WithExec([]string{"git", "status", "--short"}). Stdout(ctx) require.NoError(t, err) t.Logf("changed after sync:\n%s", changedAfterSync) require.Contains(t, changedAfterSync, "D sdk/pyproject.toml\n") require.Contains(t, changedAfterSync, "D sdk/src/dagger/__init__.py\n") } //go:embed testdata/modules/go/minimal/main.go var goSignatures string func TestModuleGoSignatures(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: goSignatures, }) logGen(ctx, t, modGen.Directory(".")) t.Run("func Hello() string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{hello}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"hello":"hello"}}`, out) }) t.Run("func Echo(string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echo(msg: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echo":"hello...hello...hello..."}}`, out) }) t.Run("func EchoPointer(*string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoPointer(msg: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoPointer":"hello...hello...hello..."}}`, out) }) t.Run("func EchoPointerPointer(**string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoPointerPointer(msg: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoPointerPointer":"hello...hello...hello..."}}`, out) }) t.Run("func EchoOptional(string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOptional(msg: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptional":"hello...hello...hello..."}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOptional}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptional":"default...default...default..."}}`, out) }) t.Run("func EchoOptionalPointer(string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOptionalPointer(msg: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptionalPointer":"hello...hello...hello..."}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOptionalPointer}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptionalPointer":"default...default...default..."}}`, out) }) t.Run("func Echoes([]string) []string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoes(msgs: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoes":["hello...hello...hello..."]}}`, out) }) t.Run("func EchoesVariadic(...string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoesVariadic(msgs: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoesVariadic":"hello...hello...hello..."}}`, out) }) t.Run("func HelloContext(context.Context) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{helloContext}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"helloContext":"hello context"}}`, out) }) t.Run("func EchoContext(context.Context, string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoContext(msg: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoContext":"ctx.hello...ctx.hello...ctx.hello..."}}`, out) }) t.Run("func HelloStringError() (string, error)", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{helloStringError}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"helloStringError":"hello i worked"}}`, out) }) t.Run("func HelloVoid()", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{helloVoid}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"helloVoid":null}}`, out) }) t.Run("func HelloVoidError() error", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{helloVoidError}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"helloVoidError":null}}`, out) }) t.Run("func EchoOpts(string, string, int) error", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOpts(msg: "hi")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOpts":"hi"}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOpts(msg: "hi", suffix: "!", times: 2)}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOpts":"hi!hi!"}}`, out) }) t.Run("func EchoOptsInline(struct{string, string, int}) error", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOptsInline(msg: "hi")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInline":"hi"}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOptsInline(msg: "hi", suffix: "!", times: 2)}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInline":"hi!hi!"}}`, out) }) t.Run("func EchoOptsInlinePointer(*struct{string, string, int}) error", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOptsInlinePointer(msg: "hi")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInlinePointer":"hi"}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOptsInlinePointer(msg: "hi", suffix: "!", times: 2)}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInlinePointer":"hi!hi!"}}`, out) }) t.Run("func EchoOptsInlineCtx(ctx, struct{string, string, int}) error", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOptsInlineCtx(msg: "hi")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInlineCtx":"hi"}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOptsInlineCtx(msg: "hi", suffix: "!", times: 2)}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInlineCtx":"hi!hi!"}}`, out) }) t.Run("func EchoOptsInlineTags(struct{string, string, int}) error", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOptsInlineTags(msg: "hi")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInlineTags":"hi"}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOptsInlineTags(msg: "hi", suffix: "!", times: 2)}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInlineTags":"hi!hi!"}}`, out) }) } var inspectModule = daggerQuery(` query { host { directory(path: ".") { asModule { objects { asObject { name functions { name description args { name description } } } } } } } } `) func TestModuleGoDocs(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: goSignatures, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(inspectModule).Stdout(ctx) require.NoError(t, err) obj := gjson.Get(out, "host.directory.asModule.objects.0.asObject") require.Equal(t, "Minimal", obj.Get("name").String()) hello := obj.Get(`functions.#(name="hello")`) require.Equal(t, "hello", hello.Get("name").String()) require.Empty(t, hello.Get("description").String()) require.Empty(t, hello.Get("args").Array()) // test the args-based form echoOpts := obj.Get(`functions.#(name="echoOpts")`) require.Equal(t, "echoOpts", echoOpts.Get("name").String()) require.Equal(t, "EchoOpts does some opts things", echoOpts.Get("description").String()) require.Len(t, echoOpts.Get("args").Array(), 3) require.Equal(t, "msg", echoOpts.Get("args.0.name").String()) require.Equal(t, "the message to echo", echoOpts.Get("args.0.description").String()) require.Equal(t, "suffix", echoOpts.Get("args.1.name").String()) require.Equal(t, "String to append to the echoed message", echoOpts.Get("args.1.description").String()) require.Equal(t, "times", echoOpts.Get("args.2.name").String()) require.Equal(t, "Number of times to repeat the message", echoOpts.Get("args.2.description").String()) // test the inline struct form echoOpts = obj.Get(`functions.#(name="echoOptsInline")`) require.Equal(t, "echoOptsInline", echoOpts.Get("name").String()) require.Equal(t, "EchoOptsInline does some opts things", echoOpts.Get("description").String()) require.Len(t, echoOpts.Get("args").Array(), 3) require.Equal(t, "msg", echoOpts.Get("args.0.name").String()) require.Equal(t, "the message to echo", echoOpts.Get("args.0.description").String()) require.Equal(t, "suffix", echoOpts.Get("args.1.name").String()) require.Equal(t, "String to append to the echoed message", echoOpts.Get("args.1.description").String()) require.Equal(t, "times", echoOpts.Get("args.2.name").String()) require.Equal(t, "Number of times to repeat the message", echoOpts.Get("args.2.description").String()) } func TestModuleGoDocsEdgeCases(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Minimal struct {} // some docs func (m *Minimal) Hello(foo string, bar string, // hello baz string, qux string, x string, // lol ) string { return foo + bar } func (m *Minimal) HelloMore( // foo here foo, // bar here bar string, ) string { return foo + bar } func (m *Minimal) HelloAgain( foo string, // docs for foo bar string, ) string { return foo + bar } `, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(inspectModule).Stdout(ctx) require.NoError(t, err) obj := gjson.Get(out, "host.directory.asModule.objects.0.asObject") require.Equal(t, "Minimal", obj.Get("name").String()) hello := obj.Get(`functions.#(name="hello")`) require.Equal(t, "hello", hello.Get("name").String()) require.Len(t, hello.Get("args").Array(), 5) require.Equal(t, "foo", hello.Get("args.0.name").String()) require.Equal(t, "", hello.Get("args.0.description").String()) require.Equal(t, "bar", hello.Get("args.1.name").String()) require.Equal(t, "", hello.Get("args.1.description").String()) require.Equal(t, "baz", hello.Get("args.2.name").String()) require.Equal(t, "hello", hello.Get("args.2.description").String()) require.Equal(t, "qux", hello.Get("args.3.name").String()) require.Equal(t, "", hello.Get("args.3.description").String()) require.Equal(t, "x", hello.Get("args.4.name").String()) require.Equal(t, "lol", hello.Get("args.4.description").String()) hello = obj.Get(`functions.#(name="helloMore")`) require.Equal(t, "helloMore", hello.Get("name").String()) require.Len(t, hello.Get("args").Array(), 2) require.Equal(t, "foo", hello.Get("args.0.name").String()) require.Equal(t, "foo here", hello.Get("args.0.description").String()) require.Equal(t, "bar", hello.Get("args.1.name").String()) require.Equal(t, "bar here", hello.Get("args.1.description").String()) // hello = obj.Get(`functions.#(name="helloAgain")`) // require.Equal(t, "helloAgain", hello.Get("name").String()) // require.Len(t, hello.Get("args").Array(), 2) // require.Equal(t, "foo", hello.Get("args.0.name").String()) // require.Equal(t, "docs for foo", hello.Get("args.0.description").String()) // require.Equal(t, "bar", hello.Get("args.1.name").String()) // require.Equal(t, "", hello.Get("args.1.description").String()) } func TestModuleGoSignaturesUnexported(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Minimal struct {} type Foo struct {} type bar struct {} func (m *Minimal) Hello(name string) string { return name } func (f *Foo) Hello(name string) string { return name } func (b *bar) Hello(name string) string { return name } `, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(inspectModule).Stdout(ctx) require.NoError(t, err) objs := gjson.Get(out, "host.directory.asModule.objects") require.Equal(t, 2, len(objs.Array())) minimal := objs.Get(`0.asObject`) require.Equal(t, "Minimal", minimal.Get("name").String()) foo := objs.Get(`1.asObject`) require.Equal(t, "MinimalFoo", foo.Get("name").String()) modGen = c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Minimal struct {} type Foo struct { Bar bar } type bar struct {} func (m *Minimal) Hello(name string) string { return name } func (f *Foo) Hello(name string) string { return name } func (b *bar) Hello(name string) string { return name } `, }) logGen(ctx, t, modGen.Directory(".")) _, err = modGen.With(inspectModule).Stderr(ctx) require.Error(t, err) } func TestModuleGoSignaturesMixMatch(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Minimal struct {} func (m *Minimal) Hello(name string, opts struct{}, opts2 struct{}) string { return name } `, }) logGen(ctx, t, modGen.Directory(".")) _, err := modGen.With(daggerQuery(`{minimal{hello}}`)).Stdout(ctx) require.Error(t, err) } func TestModuleGoSignaturesIDable(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Minimal struct {} type Custom struct { Data string } func (m *Minimal) Hello() string { return "hello" } func (m *Minimal) UseCustom(custom *Custom) string { return custom.Data } `, }) logGen(ctx, t, modGen.Directory(".")) // Currently, IDable modules are *not* supported, and should fail with an // error that fails to find the ID type. _, err := modGen.With(daggerQuery(`{minimal{hello}}`)).Stdout(ctx) require.Error(t, err) require.Contains(t, err.Error(), "Undefined type MinimalCustomID") } //go:embed testdata/modules/go/extend/main.go var goExtend string // this is no longer allowed, but verify the SDK errors out func TestModuleGoExtendCore(t *testing.T) { t.Parallel() var logs safeBuffer c, ctx := connect(t, dagger.WithLogOutput(&logs)) _, err := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: goExtend, }). With(daggerExec("mod", "sync")). Sync(ctx) require.Error(t, err) require.NoError(t, c.Close()) require.Contains(t, logs.String(), "cannot define methods on objects from outside this module") } //go:embed testdata/modules/go/custom-types/main.go var customTypes string func TestModuleGoCustomTypes(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: customTypes, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerQuery(`{test{repeater(msg:"echo!", times: 3){render}}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"test":{"repeater":{"render":"echo!echo!echo!"}}}`, out) } func TestModuleGoReturnTypeDetection(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=foo", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Foo struct {} type X struct { Message string ` + "`json:\"message\"`" + ` } func (m *Foo) MyFunction() X { return X{Message: "foo"} } `, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerQuery(`{foo{myFunction{message}}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"foo":{"myFunction":{"message":"foo"}}}`, out) } //go:embed testdata/modules/go/use/dep/main.go var useInner string //go:embed testdata/modules/go/use/main.go var useOuter string func TestModuleGoUseLocal(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/dep"). With(daggerExec("mod", "init", "--name=dep", "--sdk=go")). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=use", "--sdk=go")). WithNewFile("/work/dep/main.go", dagger.ContainerWithNewFileOpts{ Contents: useInner, }). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: useOuter, }). With(daggerExec("mod", "use", "./dep")). WithEnvVariable("BUST", identity.NewID()) // NB(vito): hmm... logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerQuery(`{use{useHello}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"use":{"useHello":"hello"}}`, out) // cannot use transitive dependency directly _, err = modGen.With(daggerQuery(`{dep{hello}}`)).Stdout(ctx) require.Error(t, err) require.ErrorContains(t, err, `Cannot query field "dep" on type "Query".`) } func TestModuleGoUseLocalMulti(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/foo"). WithNewFile("/work/foo/main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Foo struct {} func (m *Foo) Name() string { return "foo" } `, }). With(daggerExec("mod", "init", "--name=foo", "--sdk=go")). WithWorkdir("/work/bar"). WithNewFile("/work/bar/main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Bar struct {} func (m *Bar) Name() string { return "bar" } `, }). With(daggerExec("mod", "init", "--name=bar", "--sdk=go")). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=use", "--sdk=go")). With(daggerExec("mod", "use", "./foo")). With(daggerExec("mod", "use", "./bar")). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main import "context" import "fmt" type Use struct {} func (m *Use) Names(ctx context.Context) ([]string, error) { fooName, err := dag.Foo().Name(ctx) if err != nil { return nil, fmt.Errorf("foo.name: %w", err) } barName, err := dag.Bar().Name(ctx) if err != nil { return nil, fmt.Errorf("bar.name: %w", err) } return []string{fooName, barName}, nil } `, }). WithEnvVariable("BUST", identity.NewID()) // NB(vito): hmm... logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerQuery(`{use{names}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"use":{"names":["foo", "bar"]}}`, out) } //go:embed testdata/modules/go/wrapper/main.go var wrapper string func TestModuleGoWrapping(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=wrapper", "--sdk=go")). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: wrapper, }) logGen(ctx, t, modGen.Directory(".")) id := identity.NewID() out, err := modGen.With(daggerQuery( fmt.Sprintf(`{wrapper{container{echo(msg:%q){unwrap{stdout}}}}}`, id), )).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, fmt.Sprintf(`{"wrapper":{"container":{"echo":{"unwrap":{"stdout":%q}}}}}`, id), out) } func TestModuleConfigAPI(t *testing.T) { t.Parallel() c, ctx := connect(t) moduleDir := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/subdir"). With(daggerExec("mod", "init", "--name=test", "--sdk=go", "--root=..")). Directory("/work") cfg := c.ModuleConfig(moduleDir, dagger.ModuleConfigOpts{Subpath: "subdir"}) name, err := cfg.Name(ctx) require.NoError(t, err) require.Equal(t, "test", name) sdk, err := cfg.SDK(ctx) require.NoError(t, err) require.Equal(t, "go", sdk) root, err := cfg.Root(ctx) require.NoError(t, err) require.Equal(t, "..", root) } func TestModulePythonInit(t *testing.T) { t.Run("from scratch", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=bare", "--sdk=python")) out, err := modGen. With(daggerQuery(`{bare{myFunction(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"bare":{"myFunction":{"stdout":"hello\n"}}}`, out) }) t.Run("respects existing pyproject.toml", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("pyproject.toml", dagger.ContainerWithNewFileOpts{ Contents: `[project] name = "has-pyproject" version = "0.0.0" `, }). With(daggerExec("mod", "init", "--name=hasPyproject", "--sdk=python")) out, err := modGen. With(daggerQuery(`{hasPyproject{myFunction(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"hasPyproject":{"myFunction":{"stdout":"hello\n"}}}`, out) t.Run("preserves module name", func(t *testing.T) { generated, err := modGen.File("pyproject.toml").Contents(ctx) require.NoError(t, err) require.Contains(t, generated, `name = "has-pyproject"`) }) }) t.Run("respects existing main.py", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/src/main/__init__.py", dagger.ContainerWithNewFileOpts{ Contents: "from . import notmain\n", }). WithNewFile("/work/src/main/notmain.py", dagger.ContainerWithNewFileOpts{ Contents: `from dagger.mod import function @function def hello() -> str: return "Hello, world!" `, }). With(daggerExec("mod", "init", "--name=hasMainPy", "--sdk=python")) out, err := modGen. With(daggerQuery(`{hasMainPy{hello}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"hasMainPy":{"hello":"Hello, world!"}}`, out) }) } func TestModuleLotsOfFunctions(t *testing.T) { t.Parallel() const funcCount = 100 t.Run("go sdk", func(t *testing.T) { t.Parallel() c, ctx := connect(t) mainSrc := ` package main type PotatoSack struct {} ` for i := 0; i < funcCount; i++ { mainSrc += fmt.Sprintf(` func (m *PotatoSack) Potato%d() string { return "potato #%d" } `, i, i) } modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: mainSrc, }). With(daggerExec("mod", "init", "--name=potatoSack", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) var eg errgroup.Group for i := 0; i < funcCount; i++ { i := i // just verify a subset work if i%10 != 0 { continue } eg.Go(func() error { _, err := modGen. With(daggerCall(fmt.Sprintf("potato%d", i))). Sync(ctx) return err }) } require.NoError(t, eg.Wait()) }) t.Run("python sdk", func(t *testing.T) { t.Parallel() c, ctx := connect(t) mainSrc := `from dagger.mod import function ` for i := 0; i < funcCount; i++ { mainSrc += fmt.Sprintf(` @function def potato_%d() -> str: return "potato #%d" `, i, i) } modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("./src/main.py", dagger.ContainerWithNewFileOpts{ Contents: mainSrc, }). With(daggerExec("mod", "init", "--name=potatoSack", "--sdk=python")) var eg errgroup.Group for i := 0; i < funcCount; i++ { i := i // just verify a subset work if i%10 != 0 { continue } eg.Go(func() error { _, err := modGen. With(daggerCall(fmt.Sprintf("potato%d", i))). Sync(ctx) return err }) } require.NoError(t, eg.Wait()) }) } func TestModuleNamespacing(t *testing.T) { t.Parallel() c, ctx := connect(t) moduleSrcPath, err := filepath.Abs("./testdata/modules/go/namespacing") require.NoError(t, err) ctr := c.Container().From(alpineImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithMountedDirectory("/work", c.Host().Directory(moduleSrcPath)). WithWorkdir("/work") out, err := ctr. With(daggerQuery(`{test{fn(s:"yo")}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"test":{"fn":"1:yo 2:yo"}}`, out) } func TestEnvCmd(t *testing.T) { t.Skip("pending conversion to modules") t.Parallel() type testCase struct { environmentPath string expectedSDK string expectedName string expectedRoot string } for _, tc := range []testCase{ { environmentPath: "core/integration/testdata/environments/go/basic", expectedSDK: "go", expectedName: "basic", expectedRoot: "../../../../../../", }, } { tc := tc for _, testGitEnv := range []bool{false, true} { testGitEnv := testGitEnv testName := "local environment" if testGitEnv { testName = "git environment" } testName += "/" + tc.environmentPath t.Run(testName, func(t *testing.T) { t.Parallel() c, ctx := connect(t) stderr, err := CLITestContainer(ctx, t, c). WithLoadedEnv(tc.environmentPath, testGitEnv). CallEnv(). Stderr(ctx) require.NoError(t, err) require.Contains(t, stderr, fmt.Sprintf(`"root": %q`, tc.expectedRoot)) require.Contains(t, stderr, fmt.Sprintf(`"name": %q`, tc.expectedName)) require.Contains(t, stderr, fmt.Sprintf(`"sdk": %q`, tc.expectedSDK)) }) } } } func TestEnvCmdHelps(t *testing.T) { t.Skip("pending conversion to modules") t.Parallel() c, ctx := connect(t) baseCtr := CLITestContainer(ctx, t, c).WithHelpArg(true) // test with no env specified noEnvCtr := baseCtr // test with a valid local env validLocalEnvCtr := baseCtr.WithLoadedEnv("core/integration/testdata/environments/go/basic", false) // test with a broken local env (this helps ensure that we aren't actually running the entrypoints, if we did we'd get an error) brokenLocalEnvCtr := baseCtr.WithLoadedEnv("core/integration/testdata/environments/go/broken", false) for _, ctr := range []*DaggerCLIContainer{noEnvCtr, validLocalEnvCtr, brokenLocalEnvCtr} { type testCase struct { testName string cmdCtr *DaggerCLIContainer expectedOutput string } for _, tc := range []testCase{ { testName: "dagger env/" + ctr.EnvArg, cmdCtr: ctr.CallEnv(), expectedOutput: "Usage:\n dagger environment [flags]\n\nAliases:\n environment, env", }, { testName: "dagger env init/" + ctr.EnvArg, cmdCtr: ctr.CallEnvInit(), expectedOutput: "Usage:\n dagger environment init", }, { testName: "dagger env sync/" + ctr.EnvArg, cmdCtr: ctr.CallEnvSync(), expectedOutput: "Usage:\n dagger environment sync", }, { testName: "dagger env extend/" + ctr.EnvArg, cmdCtr: ctr.CallEnvExtend("./fake/dep"), expectedOutput: "Usage:\n dagger environment extend", }, { testName: "dagger checks/" + ctr.EnvArg, cmdCtr: ctr.CallChecks(), expectedOutput: "Usage:\n dagger checks", }, } { tc := tc t.Run(tc.testName, func(t *testing.T) { t.Parallel() stdout, err := tc.cmdCtr.Stdout(ctx) require.NoError(t, err) require.Contains(t, stdout, tc.expectedOutput) }) } } } func TestEnvCmdInit(t *testing.T) { t.Skip("pending conversion to modules") t.Parallel() type testCase struct { testName string environmentPath string sdk string name string root string expectedErrorMessage string } for _, tc := range []testCase{ { testName: "explicit environment dir/go", environmentPath: "/var/testenvironment/subdir", sdk: "go", name: identity.NewID(), root: "../", }, { testName: "explicit environment dir/python", environmentPath: "/var/testenvironment/subdir", sdk: "python", name: identity.NewID(), root: "../..", }, { testName: "explicit environment file", environmentPath: "/var/testenvironment/subdir/dagger.json", sdk: "python", name: identity.NewID(), }, { testName: "implicit environment", sdk: "go", name: identity.NewID(), }, { testName: "implicit environment with root", environmentPath: "/var/testenvironment", sdk: "python", name: identity.NewID(), root: "..", }, { testName: "invalid sdk", environmentPath: "/var/testenvironment", sdk: "c++--", name: identity.NewID(), expectedErrorMessage: "unsupported environment SDK", }, { testName: "error on git", environmentPath: "git://github.com/dagger/dagger.git", sdk: "go", name: identity.NewID(), expectedErrorMessage: "environment init is not supported for git environments", }, } { tc := tc t.Run(tc.testName, func(t *testing.T) { t.Parallel() c, ctx := connect(t) ctr := CLITestContainer(ctx, t, c). WithEnvArg(tc.environmentPath). WithSDKArg(tc.sdk). WithNameArg(tc.name). CallEnvInit() if tc.expectedErrorMessage != "" { _, err := ctr.Sync(ctx) require.ErrorContains(t, err, tc.expectedErrorMessage) return } expectedConfigPath := tc.environmentPath if !strings.HasSuffix(expectedConfigPath, "dagger.json") { expectedConfigPath = filepath.Join(expectedConfigPath, "dagger.json") } _, err := ctr.File(expectedConfigPath).Contents(ctx) require.NoError(t, err) // TODO: test rest of SDKs once custom codegen is supported if tc.sdk == "go" { codegenFile := filepath.Join(filepath.Dir(expectedConfigPath), "dagger.gen.go") _, err := ctr.File(codegenFile).Contents(ctx) require.NoError(t, err) } stderr, err := ctr.CallEnv().Stderr(ctx) require.NoError(t, err) require.Contains(t, stderr, fmt.Sprintf(`"name": %q`, tc.name)) require.Contains(t, stderr, fmt.Sprintf(`"sdk": %q`, tc.sdk)) }) } t.Run("error on existing environment", func(t *testing.T) { t.Parallel() c, ctx := connect(t) _, err := CLITestContainer(ctx, t, c). WithLoadedEnv("core/integration/testdata/environments/go/basic", false). WithSDKArg("go"). WithNameArg("foo"). CallEnvInit(). Sync(ctx) require.ErrorContains(t, err, "environment init config path already exists") }) } func TestEnvChecks(t *testing.T) { t.Skip("pending conversion to modules") t.Parallel() allChecks := []string{ "cool-static-check", "sad-static-check", "cool-container-check", "sad-container-check", "cool-composite-check", "sad-composite-check", "another-cool-static-check", "another-sad-static-check", "cool-composite-check-from-explicit-dep", "sad-composite-check-from-explicit-dep", "cool-composite-check-from-dynamic-dep", "sad-composite-check-from-dynamic-dep", "cool-check-only-return", "cool-check-result-only-return", "cool-string-only-return", "cool-error-only-return", "sad-error-only-return", "cool-string-error-return", "sad-string-error-return", } compositeCheckToSubcheckNames := map[string][]string{ "cool-composite-check": { "cool-subcheck-a", "cool-subcheck-b", }, "sad-composite-check": { "sad-subcheck-a", "sad-subcheck-b", }, "cool-composite-check-from-explicit-dep": { "another-cool-static-check", "another-cool-container-check", "another-cool-composite-check", }, "sad-composite-check-from-explicit-dep": { "another-sad-static-check", "another-sad-container-check", "another-sad-composite-check", }, "cool-composite-check-from-dynamic-dep": { "yet-another-cool-static-check", "yet-another-cool-container-check", "yet-another-cool-composite-check", }, "sad-composite-check-from-dynamic-dep": { "yet-another-sad-static-check", "yet-another-sad-container-check", "yet-another-sad-composite-check", }, "another-cool-composite-check": { "another-cool-subcheck-a", "another-cool-subcheck-b", }, "another-sad-composite-check": { "another-sad-subcheck-a", "another-sad-subcheck-b", }, "yet-another-cool-composite-check": { "yet-another-cool-subcheck-a", "yet-another-cool-subcheck-b", }, "yet-another-sad-composite-check": { "yet-another-sad-subcheck-a", "yet-another-sad-subcheck-b", }, } // should be aligned w/ `func checkOutput` in ./testdata/environments/go/basic/main.go checkOutput := func(name string) string { return "WE ARE RUNNING CHECK " + strcase.ToKebab(name) } type testCase struct { name string environmentPath string selectedChecks []string expectFailure bool } for _, tc := range []testCase{ { name: "happy-path", environmentPath: "core/integration/testdata/environments/go/basic", selectedChecks: []string{ "cool-static-check", "cool-container-check", "cool-composite-check", "another-cool-static-check", "cool-composite-check-from-explicit-dep", "cool-composite-check-from-dynamic-dep", "cool-check-only-return", "cool-check-result-only-return", "cool-string-only-return", "cool-error-only-return", "cool-string-error-return", }, }, { name: "sad-path", expectFailure: true, environmentPath: "core/integration/testdata/environments/go/basic", selectedChecks: []string{ "sad-static-check", "sad-container-check", "sad-composite-check", "another-sad-static-check", "sad-composite-check-from-explicit-dep", "sad-composite-check-from-dynamic-dep", "sad-error-only-return", "sad-string-error-return", }, }, { name: "mixed-path", expectFailure: true, environmentPath: "core/integration/testdata/environments/go/basic", // run all checks, don't select any }, } { tc := tc for _, testGitEnv := range []bool{false, true} { testGitEnv := testGitEnv testName := tc.name testName += "/gitenv=" + strconv.FormatBool(testGitEnv) testName += "/" + tc.environmentPath t.Run(testName, func(t *testing.T) { t.Parallel() c, ctx := connect(t) stderr, err := CLITestContainer(ctx, t, c). WithLoadedEnv(tc.environmentPath, testGitEnv). CallChecks(tc.selectedChecks...). Stderr(ctx) if tc.expectFailure { require.Error(t, err) execErr := new(dagger.ExecError) require.True(t, errors.As(err, &execErr)) stderr = execErr.Stderr } else { require.NoError(t, err) } selectedChecks := tc.selectedChecks if len(selectedChecks) == 0 { selectedChecks = allChecks } curChecks := selectedChecks for len(curChecks) > 0 { var nextChecks []string for _, checkName := range curChecks { subChecks, ok := compositeCheckToSubcheckNames[checkName] if ok { nextChecks = append(nextChecks, subChecks...) } else { // special case for successful error only check, doesn't have output if checkName == "cool-error-only-return" { continue } require.Contains(t, stderr, checkOutput(checkName)) } } curChecks = nextChecks } }) } } } func daggerExec(args ...string) dagger.WithContainerFunc { return func(c *dagger.Container) *dagger.Container { return c.WithExec(append([]string{"dagger", "--debug"}, args...), dagger.ContainerWithExecOpts{ ExperimentalPrivilegedNesting: true, }) } } func daggerQuery(query string) dagger.WithContainerFunc { return func(c *dagger.Container) *dagger.Container { return c.WithExec([]string{"dagger", "--debug", "query"}, dagger.ContainerWithExecOpts{ Stdin: query, ExperimentalPrivilegedNesting: true, }) } } // TODO: support args func daggerCall(fnName string) dagger.WithContainerFunc { return func(c *dagger.Container) *dagger.Container { return c.WithExec([]string{"dagger", "--debug", "call", fnName}, dagger.ContainerWithExecOpts{ ExperimentalPrivilegedNesting: true, }) } } func goGitBase(t *testing.T, c *dagger.Client) *dagger.Container { t.Helper() return c.Container().From(golangImage). WithExec([]string{"apk", "add", "git"}). WithExec([]string{"git", "config", "--global", "user.email", "dagger@example.com"}). WithExec([]string{"git", "config", "--global", "user.name", "Dagger Tests"}). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithExec([]string{"git", "init"}) } func logGen(ctx context.Context, t *testing.T, modSrc *dagger.Directory) { t.Helper() generated, err := modSrc.File("dagger.gen.go").Contents(ctx) require.NoError(t, err) t.Cleanup(func() { t.Name() fileName := filepath.Join( os.TempDir(), t.Name(), fmt.Sprintf("dagger.gen.%d.go", time.Now().Unix()), ) if err := os.MkdirAll(filepath.Dir(fileName), 0o755); err != nil { t.Logf("failed to create temp dir for generated code: %v", err) return } if err := os.WriteFile(fileName, []byte(generated), 0644); err != nil { t.Logf("failed to write generated code to %s: %v", fileName, err) } else { t.Logf("wrote generated code to %s", fileName) } }) }
closed
dagger/dagger
https://github.com/dagger/dagger
3,090
Host key failed while using another @dagger.io/dagger repo
I'm trying to use my fork for the nodejs sdk like this: ```json "devDependencies": { "@dagger.io/dagger": "git+ssh://git@github.com:slumbering/cloak.git#demov2-sdk-jf" } ``` I get the following error: ```sh dagger/dagger#3064 /_shim yarn install dagger/dagger#3064 0.274 yarn install v1.22.17 dagger/dagger#3064 0.348 [1/4] Resolving packages... dagger/dagger#3064 0.722 [2/4] Fetching packages... dagger/dagger#3064 16.91 info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command. dagger/dagger#3064 16.91 error Command failed. dagger/dagger#3064 16.91 Exit code: 128 dagger/dagger#3064 16.91 Command: git dagger/dagger#3064 16.91 Arguments: ls-remote --tags --heads git@github.com:slumbering/cloak.git dagger/dagger#3064 16.91 Directory: /src dagger/dagger#3064 16.91 Output: dagger/dagger#3064 16.91 Host key verification failed. dagger/dagger#3064 16.91 fatal: Could not read from remote repository. dagger/dagger#3064 16.91 dagger/dagger#3064 16.91 Please make sure you have the correct access rights dagger/dagger#3064 16.91 and the repository exists. dagger/dagger#3064 ERROR: process "/_shim yarn install" did not complete successfully: exit code: 128 ```
https://github.com/dagger/dagger/issues/3090
https://github.com/dagger/dagger/pull/6000
6d053580767455219d4c1b65bb562c83920bcae9
73eadf183d051e22ae9d56bed962e07e1a02e8cd
"2022-09-01T15:08:31Z"
go
"2023-10-28T14:42:04Z"
sdk/java/pom.xml
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>io.dagger</groupId> <artifactId>dagger-sdk-parent</artifactId> <version>1.0.0-SNAPSHOT</version> <packaging>pom</packaging> <modules> <module>dagger-codegen-maven-plugin</module> <module>dagger-java-sdk</module> <module>dagger-java-samples</module> </modules> <dependencyManagement> <dependencies> <dependency> <groupId>io.dagger</groupId> <artifactId>dagger-java-sdk</artifactId> <version>${project.version}</version> </dependency> <dependency> <groupId>io.smallrye</groupId> <artifactId>smallrye-graphql-client-api</artifactId> <version>${smallrye-graphql.version}</version> </dependency> <dependency> <groupId>io.smallrye</groupId> <artifactId>smallrye-graphql-client-implementation-vertx</artifactId> <version>${smallrye-graphql.version}</version> </dependency> <dependency> <groupId>jakarta.json</groupId> <artifactId>jakarta.json-api</artifactId> <version>${jakarta.json-api.version}</version> </dependency> <dependency> <groupId>jakarta.json.bind</groupId> <artifactId>jakarta.json.bind-api</artifactId> <version>${jakarta.json.bind-api.version}</version> </dependency> <dependency> <groupId>com.jayway.jsonpath</groupId> <artifactId>json-path</artifactId> <version>${json-path.version}</version> </dependency> <dependency> <groupId>org.eclipse</groupId> <artifactId>yasson</artifactId> <version>${yasson.version}</version> </dependency> <dependency> <groupId>com.squareup</groupId> <artifactId>javapoet</artifactId> <version>${javapoet.version}</version> </dependency> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> <version>${commons-lang.version}</version> </dependency> <dependency> <groupId>net.kothar</groupId> <artifactId>xdg-java</artifactId> <version>${xdg-java.version}</version> </dependency> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-compress</artifactId> <version>${commons-compress.version}</version> </dependency> <dependency> <groupId>com.ongres</groupId> <artifactId>fluent-process</artifactId> <version>${fluent-process.version}</version> </dependency> <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-plugin-api</artifactId> <version>${maven-plugin-api.version}</version> </dependency> <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-project</artifactId> <version>${maven-project.version}</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>${slf4j-api.version}</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-simple</artifactId> <version>${slf4j-simple.version}</version> </dependency> <dependency> <groupId>org.apache.maven.plugin-tools</groupId> <artifactId>maven-plugin-annotations</artifactId> <version>${maven-plugin-annotations.version}</version> </dependency> <dependency> <groupId>org.junit</groupId> <artifactId>junit-bom</artifactId> <version>${junit.version}</version> <type>pom</type> <scope>import</scope> </dependency> <dependency> <groupId>uk.org.webcompere</groupId> <artifactId>system-stubs-jupiter</artifactId> <version>${system-stubs-jupiter.version}</version> </dependency> <dependency> <groupId>org.assertj</groupId> <artifactId>assertj-core</artifactId> <version>${assertj-core.version}</version> </dependency> <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-core</artifactId> <version>${mockito-core.version}</version> </dependency> </dependencies> </dependencyManagement> <build> <pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> <version>${maven-resources-plugin.version}</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>${maven-compiler-plugin.version}</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-failsafe-plugin</artifactId> <version>${maven-failsafe-plugin.version}</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <version>${maven-javadoc-plugin.version}</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-source-plugin</artifactId> <version>${maven-source-plugin.version}</version> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>maven-versions-plugin</artifactId> <version>${maven-versions-plugin.version}</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-assembly-plugin</artifactId> <version>${maven-assembly-plugin.version}</version> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>${exec-maven-plugin.version}</version> </plugin> <plugin> <groupId>de.m3y.maven</groupId> <artifactId>inject-maven-plugin</artifactId> <version>${inject-maven-plugin.version}</version> </plugin> <plugin> <groupId>com.spotify.fmt</groupId> <artifactId>fmt-maven-plugin</artifactId> <version>${fmt-maven-plugin.version}</version> </plugin> <plugin> <groupId>io.dagger</groupId> <artifactId>dagger-codegen-maven-plugin</artifactId> <version>${project.version}</version> </plugin> </plugins> </pluginManagement> </build> <profiles> <profile> <id>release</id> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-source-plugin</artifactId> <executions> <execution> <goals> <goal>jar-no-fork</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <executions> <execution> <goals> <goal>jar</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-failsafe-plugin</artifactId> <configuration> <skipITs>true</skipITs> </configuration> </plugin> </plugins> </build> </profile> </profiles> <properties> <maven.compiler.source>17</maven.compiler.source> <maven.compiler.target>17</maven.compiler.target> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <daggerengine.version>devel</daggerengine.version> <assertj-core.version>3.24.2</assertj-core.version> <commons-compress.version>1.21</commons-compress.version> <commons-lang.version>3.12.0</commons-lang.version> <exec-maven-plugin.version>3.1.0</exec-maven-plugin.version> <fluent-process.version>1.0.1</fluent-process.version> <fmt-maven-plugin.version>2.21.1</fmt-maven-plugin.version> <inject-maven-plugin.version>1.4</inject-maven-plugin.version> <jakarta.json-api.version>2.1.2</jakarta.json-api.version> <jakarta.json.bind-api.version>3.0.0</jakarta.json.bind-api.version> <javapoet.version>1.13.0</javapoet.version> <json-path.version>2.8.0</json-path.version> <junit.version>5.10.0</junit.version> <maven-assembly-plugin.version>3.6.0</maven-assembly-plugin.version> <maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version> <maven-failsafe-plugin.version>3.0.0</maven-failsafe-plugin.version> <maven-javadoc-plugin.version>3.5.0</maven-javadoc-plugin.version> <maven-plugin-api.version>3.8.8</maven-plugin-api.version> <maven-plugin-annotations.version>3.8.1</maven-plugin-annotations.version> <maven-project.version>2.2.1</maven-project.version> <maven-resources-plugin.version>3.3.1</maven-resources-plugin.version> <maven-source-plugin.version>3.3.0</maven-source-plugin.version> <maven-versions-plugin.version>2.16.0</maven-versions-plugin.version> <mockito-core.version>5.2.0</mockito-core.version> <slf4j-api.version>2.0.0</slf4j-api.version> <slf4j-simple.version>2.0.7</slf4j-simple.version> <smallrye-graphql.version>2.2.1</smallrye-graphql.version> <system-stubs-jupiter.version>2.0.2</system-stubs-jupiter.version> <xdg-java.version>0.1.1</xdg-java.version> <yasson.version>3.0.3</yasson.version> </properties> </project>
closed
dagger/dagger
https://github.com/dagger/dagger
3,096
NodeJS SDK: decide how to package
Two approaches: 1. Monorepo - we keep it in cloak. This may mean we need to move its package.json to the root of the repo (not sure though, this is a requirement when specifying a dep on it using `git+ssh`, but maybe its not needed if we move to use `npm publish`) 2. Own-repo - we move it to something like `dagger/cloak-nodejs-sdk` cc @slumbering @crjm
https://github.com/dagger/dagger/issues/3096
https://github.com/dagger/dagger/pull/6000
6d053580767455219d4c1b65bb562c83920bcae9
73eadf183d051e22ae9d56bed962e07e1a02e8cd
"2022-08-25T18:57:54Z"
go
"2023-10-28T14:42:04Z"
sdk/java/pom.xml
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>io.dagger</groupId> <artifactId>dagger-sdk-parent</artifactId> <version>1.0.0-SNAPSHOT</version> <packaging>pom</packaging> <modules> <module>dagger-codegen-maven-plugin</module> <module>dagger-java-sdk</module> <module>dagger-java-samples</module> </modules> <dependencyManagement> <dependencies> <dependency> <groupId>io.dagger</groupId> <artifactId>dagger-java-sdk</artifactId> <version>${project.version}</version> </dependency> <dependency> <groupId>io.smallrye</groupId> <artifactId>smallrye-graphql-client-api</artifactId> <version>${smallrye-graphql.version}</version> </dependency> <dependency> <groupId>io.smallrye</groupId> <artifactId>smallrye-graphql-client-implementation-vertx</artifactId> <version>${smallrye-graphql.version}</version> </dependency> <dependency> <groupId>jakarta.json</groupId> <artifactId>jakarta.json-api</artifactId> <version>${jakarta.json-api.version}</version> </dependency> <dependency> <groupId>jakarta.json.bind</groupId> <artifactId>jakarta.json.bind-api</artifactId> <version>${jakarta.json.bind-api.version}</version> </dependency> <dependency> <groupId>com.jayway.jsonpath</groupId> <artifactId>json-path</artifactId> <version>${json-path.version}</version> </dependency> <dependency> <groupId>org.eclipse</groupId> <artifactId>yasson</artifactId> <version>${yasson.version}</version> </dependency> <dependency> <groupId>com.squareup</groupId> <artifactId>javapoet</artifactId> <version>${javapoet.version}</version> </dependency> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> <version>${commons-lang.version}</version> </dependency> <dependency> <groupId>net.kothar</groupId> <artifactId>xdg-java</artifactId> <version>${xdg-java.version}</version> </dependency> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-compress</artifactId> <version>${commons-compress.version}</version> </dependency> <dependency> <groupId>com.ongres</groupId> <artifactId>fluent-process</artifactId> <version>${fluent-process.version}</version> </dependency> <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-plugin-api</artifactId> <version>${maven-plugin-api.version}</version> </dependency> <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-project</artifactId> <version>${maven-project.version}</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>${slf4j-api.version}</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-simple</artifactId> <version>${slf4j-simple.version}</version> </dependency> <dependency> <groupId>org.apache.maven.plugin-tools</groupId> <artifactId>maven-plugin-annotations</artifactId> <version>${maven-plugin-annotations.version}</version> </dependency> <dependency> <groupId>org.junit</groupId> <artifactId>junit-bom</artifactId> <version>${junit.version}</version> <type>pom</type> <scope>import</scope> </dependency> <dependency> <groupId>uk.org.webcompere</groupId> <artifactId>system-stubs-jupiter</artifactId> <version>${system-stubs-jupiter.version}</version> </dependency> <dependency> <groupId>org.assertj</groupId> <artifactId>assertj-core</artifactId> <version>${assertj-core.version}</version> </dependency> <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-core</artifactId> <version>${mockito-core.version}</version> </dependency> </dependencies> </dependencyManagement> <build> <pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> <version>${maven-resources-plugin.version}</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>${maven-compiler-plugin.version}</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-failsafe-plugin</artifactId> <version>${maven-failsafe-plugin.version}</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <version>${maven-javadoc-plugin.version}</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-source-plugin</artifactId> <version>${maven-source-plugin.version}</version> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>maven-versions-plugin</artifactId> <version>${maven-versions-plugin.version}</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-assembly-plugin</artifactId> <version>${maven-assembly-plugin.version}</version> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>${exec-maven-plugin.version}</version> </plugin> <plugin> <groupId>de.m3y.maven</groupId> <artifactId>inject-maven-plugin</artifactId> <version>${inject-maven-plugin.version}</version> </plugin> <plugin> <groupId>com.spotify.fmt</groupId> <artifactId>fmt-maven-plugin</artifactId> <version>${fmt-maven-plugin.version}</version> </plugin> <plugin> <groupId>io.dagger</groupId> <artifactId>dagger-codegen-maven-plugin</artifactId> <version>${project.version}</version> </plugin> </plugins> </pluginManagement> </build> <profiles> <profile> <id>release</id> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-source-plugin</artifactId> <executions> <execution> <goals> <goal>jar-no-fork</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <executions> <execution> <goals> <goal>jar</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-failsafe-plugin</artifactId> <configuration> <skipITs>true</skipITs> </configuration> </plugin> </plugins> </build> </profile> </profiles> <properties> <maven.compiler.source>17</maven.compiler.source> <maven.compiler.target>17</maven.compiler.target> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <daggerengine.version>devel</daggerengine.version> <assertj-core.version>3.24.2</assertj-core.version> <commons-compress.version>1.21</commons-compress.version> <commons-lang.version>3.12.0</commons-lang.version> <exec-maven-plugin.version>3.1.0</exec-maven-plugin.version> <fluent-process.version>1.0.1</fluent-process.version> <fmt-maven-plugin.version>2.21.1</fmt-maven-plugin.version> <inject-maven-plugin.version>1.4</inject-maven-plugin.version> <jakarta.json-api.version>2.1.2</jakarta.json-api.version> <jakarta.json.bind-api.version>3.0.0</jakarta.json.bind-api.version> <javapoet.version>1.13.0</javapoet.version> <json-path.version>2.8.0</json-path.version> <junit.version>5.10.0</junit.version> <maven-assembly-plugin.version>3.6.0</maven-assembly-plugin.version> <maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version> <maven-failsafe-plugin.version>3.0.0</maven-failsafe-plugin.version> <maven-javadoc-plugin.version>3.5.0</maven-javadoc-plugin.version> <maven-plugin-api.version>3.8.8</maven-plugin-api.version> <maven-plugin-annotations.version>3.8.1</maven-plugin-annotations.version> <maven-project.version>2.2.1</maven-project.version> <maven-resources-plugin.version>3.3.1</maven-resources-plugin.version> <maven-source-plugin.version>3.3.0</maven-source-plugin.version> <maven-versions-plugin.version>2.16.0</maven-versions-plugin.version> <mockito-core.version>5.2.0</mockito-core.version> <slf4j-api.version>2.0.0</slf4j-api.version> <slf4j-simple.version>2.0.7</slf4j-simple.version> <smallrye-graphql.version>2.2.1</smallrye-graphql.version> <system-stubs-jupiter.version>2.0.2</system-stubs-jupiter.version> <xdg-java.version>0.1.1</xdg-java.version> <yasson.version>3.0.3</yasson.version> </properties> </project>
closed
dagger/dagger
https://github.com/dagger/dagger
3,099
Core API: support cache mounts
There should be a way to mount cache directories when executing a command in a container.
https://github.com/dagger/dagger/issues/3099
https://github.com/dagger/dagger/pull/6000
6d053580767455219d4c1b65bb562c83920bcae9
73eadf183d051e22ae9d56bed962e07e1a02e8cd
"2022-08-25T08:58:12Z"
go
"2023-10-28T14:42:04Z"
sdk/java/pom.xml
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>io.dagger</groupId> <artifactId>dagger-sdk-parent</artifactId> <version>1.0.0-SNAPSHOT</version> <packaging>pom</packaging> <modules> <module>dagger-codegen-maven-plugin</module> <module>dagger-java-sdk</module> <module>dagger-java-samples</module> </modules> <dependencyManagement> <dependencies> <dependency> <groupId>io.dagger</groupId> <artifactId>dagger-java-sdk</artifactId> <version>${project.version}</version> </dependency> <dependency> <groupId>io.smallrye</groupId> <artifactId>smallrye-graphql-client-api</artifactId> <version>${smallrye-graphql.version}</version> </dependency> <dependency> <groupId>io.smallrye</groupId> <artifactId>smallrye-graphql-client-implementation-vertx</artifactId> <version>${smallrye-graphql.version}</version> </dependency> <dependency> <groupId>jakarta.json</groupId> <artifactId>jakarta.json-api</artifactId> <version>${jakarta.json-api.version}</version> </dependency> <dependency> <groupId>jakarta.json.bind</groupId> <artifactId>jakarta.json.bind-api</artifactId> <version>${jakarta.json.bind-api.version}</version> </dependency> <dependency> <groupId>com.jayway.jsonpath</groupId> <artifactId>json-path</artifactId> <version>${json-path.version}</version> </dependency> <dependency> <groupId>org.eclipse</groupId> <artifactId>yasson</artifactId> <version>${yasson.version}</version> </dependency> <dependency> <groupId>com.squareup</groupId> <artifactId>javapoet</artifactId> <version>${javapoet.version}</version> </dependency> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> <version>${commons-lang.version}</version> </dependency> <dependency> <groupId>net.kothar</groupId> <artifactId>xdg-java</artifactId> <version>${xdg-java.version}</version> </dependency> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-compress</artifactId> <version>${commons-compress.version}</version> </dependency> <dependency> <groupId>com.ongres</groupId> <artifactId>fluent-process</artifactId> <version>${fluent-process.version}</version> </dependency> <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-plugin-api</artifactId> <version>${maven-plugin-api.version}</version> </dependency> <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-project</artifactId> <version>${maven-project.version}</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>${slf4j-api.version}</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-simple</artifactId> <version>${slf4j-simple.version}</version> </dependency> <dependency> <groupId>org.apache.maven.plugin-tools</groupId> <artifactId>maven-plugin-annotations</artifactId> <version>${maven-plugin-annotations.version}</version> </dependency> <dependency> <groupId>org.junit</groupId> <artifactId>junit-bom</artifactId> <version>${junit.version}</version> <type>pom</type> <scope>import</scope> </dependency> <dependency> <groupId>uk.org.webcompere</groupId> <artifactId>system-stubs-jupiter</artifactId> <version>${system-stubs-jupiter.version}</version> </dependency> <dependency> <groupId>org.assertj</groupId> <artifactId>assertj-core</artifactId> <version>${assertj-core.version}</version> </dependency> <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-core</artifactId> <version>${mockito-core.version}</version> </dependency> </dependencies> </dependencyManagement> <build> <pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> <version>${maven-resources-plugin.version}</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>${maven-compiler-plugin.version}</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-failsafe-plugin</artifactId> <version>${maven-failsafe-plugin.version}</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <version>${maven-javadoc-plugin.version}</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-source-plugin</artifactId> <version>${maven-source-plugin.version}</version> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>maven-versions-plugin</artifactId> <version>${maven-versions-plugin.version}</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-assembly-plugin</artifactId> <version>${maven-assembly-plugin.version}</version> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>${exec-maven-plugin.version}</version> </plugin> <plugin> <groupId>de.m3y.maven</groupId> <artifactId>inject-maven-plugin</artifactId> <version>${inject-maven-plugin.version}</version> </plugin> <plugin> <groupId>com.spotify.fmt</groupId> <artifactId>fmt-maven-plugin</artifactId> <version>${fmt-maven-plugin.version}</version> </plugin> <plugin> <groupId>io.dagger</groupId> <artifactId>dagger-codegen-maven-plugin</artifactId> <version>${project.version}</version> </plugin> </plugins> </pluginManagement> </build> <profiles> <profile> <id>release</id> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-source-plugin</artifactId> <executions> <execution> <goals> <goal>jar-no-fork</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <executions> <execution> <goals> <goal>jar</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-failsafe-plugin</artifactId> <configuration> <skipITs>true</skipITs> </configuration> </plugin> </plugins> </build> </profile> </profiles> <properties> <maven.compiler.source>17</maven.compiler.source> <maven.compiler.target>17</maven.compiler.target> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <daggerengine.version>devel</daggerengine.version> <assertj-core.version>3.24.2</assertj-core.version> <commons-compress.version>1.21</commons-compress.version> <commons-lang.version>3.12.0</commons-lang.version> <exec-maven-plugin.version>3.1.0</exec-maven-plugin.version> <fluent-process.version>1.0.1</fluent-process.version> <fmt-maven-plugin.version>2.21.1</fmt-maven-plugin.version> <inject-maven-plugin.version>1.4</inject-maven-plugin.version> <jakarta.json-api.version>2.1.2</jakarta.json-api.version> <jakarta.json.bind-api.version>3.0.0</jakarta.json.bind-api.version> <javapoet.version>1.13.0</javapoet.version> <json-path.version>2.8.0</json-path.version> <junit.version>5.10.0</junit.version> <maven-assembly-plugin.version>3.6.0</maven-assembly-plugin.version> <maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version> <maven-failsafe-plugin.version>3.0.0</maven-failsafe-plugin.version> <maven-javadoc-plugin.version>3.5.0</maven-javadoc-plugin.version> <maven-plugin-api.version>3.8.8</maven-plugin-api.version> <maven-plugin-annotations.version>3.8.1</maven-plugin-annotations.version> <maven-project.version>2.2.1</maven-project.version> <maven-resources-plugin.version>3.3.1</maven-resources-plugin.version> <maven-source-plugin.version>3.3.0</maven-source-plugin.version> <maven-versions-plugin.version>2.16.0</maven-versions-plugin.version> <mockito-core.version>5.2.0</mockito-core.version> <slf4j-api.version>2.0.0</slf4j-api.version> <slf4j-simple.version>2.0.7</slf4j-simple.version> <smallrye-graphql.version>2.2.1</smallrye-graphql.version> <system-stubs-jupiter.version>2.0.2</system-stubs-jupiter.version> <xdg-java.version>0.1.1</xdg-java.version> <yasson.version>3.0.3</yasson.version> </properties> </project>
closed
dagger/dagger
https://github.com/dagger/dagger
3,077
[ts] Implement client libraries
You should be able to use typed generated clients for calling other extensions when using Typescript. Highly related to the corresponding go issue, could be tackled together possibly: https://github.com/dagger/dagger/issues/3079
https://github.com/dagger/dagger/issues/3077
https://github.com/dagger/dagger/pull/6000
6d053580767455219d4c1b65bb562c83920bcae9
73eadf183d051e22ae9d56bed962e07e1a02e8cd
"2022-08-05T20:33:33Z"
go
"2023-10-28T14:42:04Z"
sdk/java/pom.xml
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>io.dagger</groupId> <artifactId>dagger-sdk-parent</artifactId> <version>1.0.0-SNAPSHOT</version> <packaging>pom</packaging> <modules> <module>dagger-codegen-maven-plugin</module> <module>dagger-java-sdk</module> <module>dagger-java-samples</module> </modules> <dependencyManagement> <dependencies> <dependency> <groupId>io.dagger</groupId> <artifactId>dagger-java-sdk</artifactId> <version>${project.version}</version> </dependency> <dependency> <groupId>io.smallrye</groupId> <artifactId>smallrye-graphql-client-api</artifactId> <version>${smallrye-graphql.version}</version> </dependency> <dependency> <groupId>io.smallrye</groupId> <artifactId>smallrye-graphql-client-implementation-vertx</artifactId> <version>${smallrye-graphql.version}</version> </dependency> <dependency> <groupId>jakarta.json</groupId> <artifactId>jakarta.json-api</artifactId> <version>${jakarta.json-api.version}</version> </dependency> <dependency> <groupId>jakarta.json.bind</groupId> <artifactId>jakarta.json.bind-api</artifactId> <version>${jakarta.json.bind-api.version}</version> </dependency> <dependency> <groupId>com.jayway.jsonpath</groupId> <artifactId>json-path</artifactId> <version>${json-path.version}</version> </dependency> <dependency> <groupId>org.eclipse</groupId> <artifactId>yasson</artifactId> <version>${yasson.version}</version> </dependency> <dependency> <groupId>com.squareup</groupId> <artifactId>javapoet</artifactId> <version>${javapoet.version}</version> </dependency> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> <version>${commons-lang.version}</version> </dependency> <dependency> <groupId>net.kothar</groupId> <artifactId>xdg-java</artifactId> <version>${xdg-java.version}</version> </dependency> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-compress</artifactId> <version>${commons-compress.version}</version> </dependency> <dependency> <groupId>com.ongres</groupId> <artifactId>fluent-process</artifactId> <version>${fluent-process.version}</version> </dependency> <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-plugin-api</artifactId> <version>${maven-plugin-api.version}</version> </dependency> <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-project</artifactId> <version>${maven-project.version}</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>${slf4j-api.version}</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-simple</artifactId> <version>${slf4j-simple.version}</version> </dependency> <dependency> <groupId>org.apache.maven.plugin-tools</groupId> <artifactId>maven-plugin-annotations</artifactId> <version>${maven-plugin-annotations.version}</version> </dependency> <dependency> <groupId>org.junit</groupId> <artifactId>junit-bom</artifactId> <version>${junit.version}</version> <type>pom</type> <scope>import</scope> </dependency> <dependency> <groupId>uk.org.webcompere</groupId> <artifactId>system-stubs-jupiter</artifactId> <version>${system-stubs-jupiter.version}</version> </dependency> <dependency> <groupId>org.assertj</groupId> <artifactId>assertj-core</artifactId> <version>${assertj-core.version}</version> </dependency> <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-core</artifactId> <version>${mockito-core.version}</version> </dependency> </dependencies> </dependencyManagement> <build> <pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> <version>${maven-resources-plugin.version}</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>${maven-compiler-plugin.version}</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-failsafe-plugin</artifactId> <version>${maven-failsafe-plugin.version}</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <version>${maven-javadoc-plugin.version}</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-source-plugin</artifactId> <version>${maven-source-plugin.version}</version> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>maven-versions-plugin</artifactId> <version>${maven-versions-plugin.version}</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-assembly-plugin</artifactId> <version>${maven-assembly-plugin.version}</version> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>${exec-maven-plugin.version}</version> </plugin> <plugin> <groupId>de.m3y.maven</groupId> <artifactId>inject-maven-plugin</artifactId> <version>${inject-maven-plugin.version}</version> </plugin> <plugin> <groupId>com.spotify.fmt</groupId> <artifactId>fmt-maven-plugin</artifactId> <version>${fmt-maven-plugin.version}</version> </plugin> <plugin> <groupId>io.dagger</groupId> <artifactId>dagger-codegen-maven-plugin</artifactId> <version>${project.version}</version> </plugin> </plugins> </pluginManagement> </build> <profiles> <profile> <id>release</id> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-source-plugin</artifactId> <executions> <execution> <goals> <goal>jar-no-fork</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <executions> <execution> <goals> <goal>jar</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-failsafe-plugin</artifactId> <configuration> <skipITs>true</skipITs> </configuration> </plugin> </plugins> </build> </profile> </profiles> <properties> <maven.compiler.source>17</maven.compiler.source> <maven.compiler.target>17</maven.compiler.target> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <daggerengine.version>devel</daggerengine.version> <assertj-core.version>3.24.2</assertj-core.version> <commons-compress.version>1.21</commons-compress.version> <commons-lang.version>3.12.0</commons-lang.version> <exec-maven-plugin.version>3.1.0</exec-maven-plugin.version> <fluent-process.version>1.0.1</fluent-process.version> <fmt-maven-plugin.version>2.21.1</fmt-maven-plugin.version> <inject-maven-plugin.version>1.4</inject-maven-plugin.version> <jakarta.json-api.version>2.1.2</jakarta.json-api.version> <jakarta.json.bind-api.version>3.0.0</jakarta.json.bind-api.version> <javapoet.version>1.13.0</javapoet.version> <json-path.version>2.8.0</json-path.version> <junit.version>5.10.0</junit.version> <maven-assembly-plugin.version>3.6.0</maven-assembly-plugin.version> <maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version> <maven-failsafe-plugin.version>3.0.0</maven-failsafe-plugin.version> <maven-javadoc-plugin.version>3.5.0</maven-javadoc-plugin.version> <maven-plugin-api.version>3.8.8</maven-plugin-api.version> <maven-plugin-annotations.version>3.8.1</maven-plugin-annotations.version> <maven-project.version>2.2.1</maven-project.version> <maven-resources-plugin.version>3.3.1</maven-resources-plugin.version> <maven-source-plugin.version>3.3.0</maven-source-plugin.version> <maven-versions-plugin.version>2.16.0</maven-versions-plugin.version> <mockito-core.version>5.2.0</mockito-core.version> <slf4j-api.version>2.0.0</slf4j-api.version> <slf4j-simple.version>2.0.7</slf4j-simple.version> <smallrye-graphql.version>2.2.1</smallrye-graphql.version> <system-stubs-jupiter.version>2.0.2</system-stubs-jupiter.version> <xdg-java.version>0.1.1</xdg-java.version> <yasson.version>3.0.3</yasson.version> </properties> </project>
closed
dagger/dagger
https://github.com/dagger/dagger
3,078
[ts] Autogenerate implementation stubs
TS authors still have to write implementation from scratch based on their schema. We should support generating the implementation skeleton similar to the go dx today. Can add support for `--sdk=ts` to `cloak generate` as part of this.
https://github.com/dagger/dagger/issues/3078
https://github.com/dagger/dagger/pull/6000
6d053580767455219d4c1b65bb562c83920bcae9
73eadf183d051e22ae9d56bed962e07e1a02e8cd
"2022-08-05T20:31:20Z"
go
"2023-10-28T14:42:04Z"
sdk/java/pom.xml
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>io.dagger</groupId> <artifactId>dagger-sdk-parent</artifactId> <version>1.0.0-SNAPSHOT</version> <packaging>pom</packaging> <modules> <module>dagger-codegen-maven-plugin</module> <module>dagger-java-sdk</module> <module>dagger-java-samples</module> </modules> <dependencyManagement> <dependencies> <dependency> <groupId>io.dagger</groupId> <artifactId>dagger-java-sdk</artifactId> <version>${project.version}</version> </dependency> <dependency> <groupId>io.smallrye</groupId> <artifactId>smallrye-graphql-client-api</artifactId> <version>${smallrye-graphql.version}</version> </dependency> <dependency> <groupId>io.smallrye</groupId> <artifactId>smallrye-graphql-client-implementation-vertx</artifactId> <version>${smallrye-graphql.version}</version> </dependency> <dependency> <groupId>jakarta.json</groupId> <artifactId>jakarta.json-api</artifactId> <version>${jakarta.json-api.version}</version> </dependency> <dependency> <groupId>jakarta.json.bind</groupId> <artifactId>jakarta.json.bind-api</artifactId> <version>${jakarta.json.bind-api.version}</version> </dependency> <dependency> <groupId>com.jayway.jsonpath</groupId> <artifactId>json-path</artifactId> <version>${json-path.version}</version> </dependency> <dependency> <groupId>org.eclipse</groupId> <artifactId>yasson</artifactId> <version>${yasson.version}</version> </dependency> <dependency> <groupId>com.squareup</groupId> <artifactId>javapoet</artifactId> <version>${javapoet.version}</version> </dependency> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> <version>${commons-lang.version}</version> </dependency> <dependency> <groupId>net.kothar</groupId> <artifactId>xdg-java</artifactId> <version>${xdg-java.version}</version> </dependency> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-compress</artifactId> <version>${commons-compress.version}</version> </dependency> <dependency> <groupId>com.ongres</groupId> <artifactId>fluent-process</artifactId> <version>${fluent-process.version}</version> </dependency> <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-plugin-api</artifactId> <version>${maven-plugin-api.version}</version> </dependency> <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-project</artifactId> <version>${maven-project.version}</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>${slf4j-api.version}</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-simple</artifactId> <version>${slf4j-simple.version}</version> </dependency> <dependency> <groupId>org.apache.maven.plugin-tools</groupId> <artifactId>maven-plugin-annotations</artifactId> <version>${maven-plugin-annotations.version}</version> </dependency> <dependency> <groupId>org.junit</groupId> <artifactId>junit-bom</artifactId> <version>${junit.version}</version> <type>pom</type> <scope>import</scope> </dependency> <dependency> <groupId>uk.org.webcompere</groupId> <artifactId>system-stubs-jupiter</artifactId> <version>${system-stubs-jupiter.version}</version> </dependency> <dependency> <groupId>org.assertj</groupId> <artifactId>assertj-core</artifactId> <version>${assertj-core.version}</version> </dependency> <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-core</artifactId> <version>${mockito-core.version}</version> </dependency> </dependencies> </dependencyManagement> <build> <pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> <version>${maven-resources-plugin.version}</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>${maven-compiler-plugin.version}</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-failsafe-plugin</artifactId> <version>${maven-failsafe-plugin.version}</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <version>${maven-javadoc-plugin.version}</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-source-plugin</artifactId> <version>${maven-source-plugin.version}</version> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>maven-versions-plugin</artifactId> <version>${maven-versions-plugin.version}</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-assembly-plugin</artifactId> <version>${maven-assembly-plugin.version}</version> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>${exec-maven-plugin.version}</version> </plugin> <plugin> <groupId>de.m3y.maven</groupId> <artifactId>inject-maven-plugin</artifactId> <version>${inject-maven-plugin.version}</version> </plugin> <plugin> <groupId>com.spotify.fmt</groupId> <artifactId>fmt-maven-plugin</artifactId> <version>${fmt-maven-plugin.version}</version> </plugin> <plugin> <groupId>io.dagger</groupId> <artifactId>dagger-codegen-maven-plugin</artifactId> <version>${project.version}</version> </plugin> </plugins> </pluginManagement> </build> <profiles> <profile> <id>release</id> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-source-plugin</artifactId> <executions> <execution> <goals> <goal>jar-no-fork</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <executions> <execution> <goals> <goal>jar</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-failsafe-plugin</artifactId> <configuration> <skipITs>true</skipITs> </configuration> </plugin> </plugins> </build> </profile> </profiles> <properties> <maven.compiler.source>17</maven.compiler.source> <maven.compiler.target>17</maven.compiler.target> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <daggerengine.version>devel</daggerengine.version> <assertj-core.version>3.24.2</assertj-core.version> <commons-compress.version>1.21</commons-compress.version> <commons-lang.version>3.12.0</commons-lang.version> <exec-maven-plugin.version>3.1.0</exec-maven-plugin.version> <fluent-process.version>1.0.1</fluent-process.version> <fmt-maven-plugin.version>2.21.1</fmt-maven-plugin.version> <inject-maven-plugin.version>1.4</inject-maven-plugin.version> <jakarta.json-api.version>2.1.2</jakarta.json-api.version> <jakarta.json.bind-api.version>3.0.0</jakarta.json.bind-api.version> <javapoet.version>1.13.0</javapoet.version> <json-path.version>2.8.0</json-path.version> <junit.version>5.10.0</junit.version> <maven-assembly-plugin.version>3.6.0</maven-assembly-plugin.version> <maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version> <maven-failsafe-plugin.version>3.0.0</maven-failsafe-plugin.version> <maven-javadoc-plugin.version>3.5.0</maven-javadoc-plugin.version> <maven-plugin-api.version>3.8.8</maven-plugin-api.version> <maven-plugin-annotations.version>3.8.1</maven-plugin-annotations.version> <maven-project.version>2.2.1</maven-project.version> <maven-resources-plugin.version>3.3.1</maven-resources-plugin.version> <maven-source-plugin.version>3.3.0</maven-source-plugin.version> <maven-versions-plugin.version>2.16.0</maven-versions-plugin.version> <mockito-core.version>5.2.0</mockito-core.version> <slf4j-api.version>2.0.0</slf4j-api.version> <slf4j-simple.version>2.0.7</slf4j-simple.version> <smallrye-graphql.version>2.2.1</smallrye-graphql.version> <system-stubs-jupiter.version>2.0.2</system-stubs-jupiter.version> <xdg-java.version>0.1.1</xdg-java.version> <yasson.version>3.0.3</yasson.version> </properties> </project>
closed
dagger/dagger
https://github.com/dagger/dagger
130
ENV from fetched container is lost
When doing a `#FetchContainer`, `ENV` instructions (such as `PATH`) are lost.
https://github.com/dagger/dagger/issues/130
https://github.com/dagger/dagger/pull/6010
16b9328aefbc68c3897e503ff24feb8e8ba5de16
47837d05154c8d9a12784f9db055b8090980847a
"2021-02-19T08:39:47Z"
go
"2023-10-30T14:09:32Z"
go.mod
module github.com/dagger/dagger go 1.20 replace dagger.io/dagger => ./sdk/go replace github.com/dagger/dagger/internal/mage => ./internal/mage require ( dagger.io/dagger v0.9.1 github.com/99designs/gqlgen v0.17.34 // indirect github.com/armon/circbuf v0.0.0-20190214190532-5111143e8da2 // indirect github.com/aws/aws-sdk-go-v2/config v1.18.21 // indirect github.com/aws/aws-sdk-go-v2/credentials v1.13.20 // indirect github.com/aws/aws-sdk-go-v2/service/s3 v1.31.3 // indirect github.com/charmbracelet/bubbles v0.16.1 github.com/charmbracelet/bubbletea v0.24.2 github.com/containerd/containerd v1.7.2 github.com/containerd/fuse-overlayfs-snapshotter v1.0.6 github.com/containerd/stargz-snapshotter v0.14.3 github.com/containernetworking/cni v1.1.2 github.com/coreos/go-systemd/v22 v22.5.0 github.com/dagger/graphql v0.0.0-20230919174923-21d038582a21 github.com/dagger/graphql-go-tools v0.0.0-20231012004527-77189e400b6e github.com/docker/distribution v2.8.2+incompatible github.com/google/go-containerregistry v0.15.2 github.com/google/uuid v1.3.0 github.com/iancoleman/strcase v0.3.0 // https://github.com/moby/buildkit/commit/86e25b3ad8c20fc420669949f24bb86c74082b2f github.com/moby/buildkit v0.13.0-beta1.0.20231011161957-86e25b3ad8c2 github.com/opencontainers/go-digest v1.0.0 github.com/opencontainers/image-spec v1.1.0-rc3 github.com/opencontainers/runtime-spec v1.1.0-rc.2 github.com/pelletier/go-toml v1.9.5 github.com/pkg/errors v0.9.1 github.com/sirupsen/logrus v1.9.3 github.com/spf13/cobra v1.7.0 github.com/stretchr/testify v1.8.4 github.com/tonistiigi/fsutil v0.0.0-20230629203738-36ef4d8c0dbb github.com/urfave/cli v1.22.12 github.com/weaveworks/common v0.0.0-20230119144549-0aaa5abd1e63 github.com/zeebo/xxh3 v1.0.2 go.etcd.io/bbolt v1.3.7 // indirect go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.45.0 go.opentelemetry.io/otel v1.19.0 go.opentelemetry.io/otel/exporters/jaeger v1.17.0 go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0 go.opentelemetry.io/otel/sdk v1.19.0 go.opentelemetry.io/otel/trace v1.19.0 go.opentelemetry.io/proto/otlp v1.0.0 golang.org/x/crypto v0.14.0 golang.org/x/mod v0.13.0 golang.org/x/sync v0.4.0 golang.org/x/sys v0.13.0 golang.org/x/term v0.13.0 google.golang.org/grpc v1.58.3 oss.terrastruct.com/d2 v0.4.0 ) require ( github.com/blang/semver v3.5.1+incompatible github.com/charmbracelet/lipgloss v0.8.0 github.com/dagger/dagger/internal/mage v0.0.0-00010101000000-000000000000 github.com/dave/jennifer v1.7.0 github.com/dschmidt/go-layerfs v0.1.0 github.com/go-git/go-git/v5 v5.9.0 github.com/gogo/protobuf v1.3.2 github.com/google/go-github/v50 v50.2.0 github.com/gorilla/websocket v1.5.0 github.com/icholy/replace v0.6.0 github.com/jackpal/gateway v1.0.7 github.com/juju/ansiterm v1.0.0 github.com/koron-go/prefixw v1.0.0 github.com/mackerelio/go-osstat v0.2.4 github.com/mattn/go-isatty v0.0.19 github.com/moby/sys/mount v0.3.3 github.com/muesli/termenv v0.15.2 github.com/nxadm/tail v1.4.8 github.com/opencontainers/runc v1.1.9 github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 github.com/prometheus/procfs v0.12.0 github.com/psanford/memfs v0.0.0-20230130182539-4dbf7e3e865e github.com/rs/cors v1.10.0 github.com/rs/zerolog v1.30.0 github.com/shurcooL/graphql v0.0.0-20220606043923-3cf50f8a0a29 github.com/vito/midterm v0.1.4 github.com/vito/progrock v0.10.2-0.20230913234310-64b4a1cfb007 golang.org/x/exp v0.0.0-20231006140011-7918f672742d golang.org/x/oauth2 v0.13.0 golang.org/x/tools v0.14.0 ) require ( github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect github.com/muesli/cancelreader v0.2.2 // indirect github.com/muesli/reflow v0.3.0 // indirect ) require ( cdr.dev/slog v1.4.2 // indirect dario.cat/mergo v1.0.0 // indirect github.com/AdaLogics/go-fuzz-headers v0.0.0-20230106234847-43070de90fa1 // indirect github.com/Azure/azure-sdk-for-go/sdk/azcore v1.1.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.1.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.4.1 // indirect github.com/AzureAD/microsoft-authentication-library-for-go v0.6.0 // indirect github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 // indirect github.com/PuerkitoBio/goquery v1.8.1 // indirect github.com/acomagu/bufpipe v1.0.4 // indirect github.com/agnivade/levenshtein v1.1.1 // indirect github.com/alecthomas/chroma v0.10.0 // indirect github.com/alecthomas/chroma/v2 v2.7.0 // indirect github.com/anchore/go-struct-converter v0.0.0-20221118182256-c68fdcfa2092 // indirect github.com/andybalholm/cascadia v1.3.1 // indirect github.com/aws/aws-sdk-go-v2 v1.17.8 // indirect github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.10 // indirect github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.2 // indirect github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.62 // indirect github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.32 // indirect github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.26 // indirect github.com/aws/aws-sdk-go-v2/internal/ini v1.3.33 // indirect github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.24 // indirect github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.11 // indirect github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.27 // indirect github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.26 // indirect github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.14.1 // indirect github.com/aws/aws-sdk-go-v2/service/sso v1.12.8 // indirect github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.8 // indirect github.com/aws/aws-sdk-go-v2/service/sts v1.18.9 // indirect github.com/aws/smithy-go v1.13.5 // indirect github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/charmbracelet/harmonica v0.2.0 // indirect github.com/cloudflare/circl v1.3.3 // indirect github.com/containerd/go-cni v1.1.9 // indirect github.com/containerd/go-runc v1.1.0 // indirect github.com/containerd/typeurl/v2 v2.1.1 // indirect github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect github.com/cyphar/filepath-securejoin v0.2.4 // indirect github.com/dimchansky/utfbom v1.1.1 // indirect github.com/distribution/reference v0.5.0 // indirect github.com/dlclark/regexp2 v1.9.0 // indirect github.com/docker/go-metrics v0.0.1 // indirect github.com/dop251/goja v0.0.0-20230402114112-623f9dda9079 // indirect github.com/emirpasic/gods v1.18.1 // indirect github.com/fatih/color v1.15.0 // indirect github.com/fogleman/ease v0.0.0-20170301025033-8da417bf1776 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect github.com/go-git/go-billy/v5 v5.5.0 // indirect github.com/go-kit/log v0.2.1 // indirect github.com/go-logfmt/logfmt v0.5.1 // indirect github.com/go-sourcemap/sourcemap v2.1.3+incompatible // indirect github.com/golang-jwt/jwt/v4 v4.4.2 // indirect github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect github.com/google/go-cmp v0.5.9 // indirect github.com/google/go-querystring v1.1.0 // indirect github.com/google/pprof v0.0.0-20230406165453-00490a63f317 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect github.com/hanwen/go-fuse/v2 v2.2.0 // indirect github.com/hashicorp/errwrap v1.1.0 // indirect github.com/hashicorp/go-cleanhttp v0.5.2 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect github.com/hashicorp/go-retryablehttp v0.7.2 // indirect github.com/hashicorp/golang-lru v0.5.4 // indirect github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jonboulle/clockwork v0.4.0 // indirect github.com/jung-kurt/gofpdf v1.16.2 // indirect github.com/kevinburke/ssh_config v1.2.0 // indirect github.com/klauspost/cpuid/v2 v2.0.9 // indirect github.com/kylelemons/godebug v1.1.0 // indirect github.com/lucasb-eyer/go-colorful v1.2.0 // indirect github.com/lunixbochs/vtclean v1.0.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-localereader v0.0.1 // indirect github.com/mattn/go-runewidth v0.0.14 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect github.com/mazznoer/csscolorparser v0.1.3 // indirect github.com/mitchellh/go-spdx v0.1.0 // indirect github.com/mitchellh/hashstructure/v2 v2.0.2 // indirect github.com/moby/sys/mountinfo v0.6.2 // indirect github.com/moby/sys/sequential v0.5.0 // indirect github.com/opencontainers/selinux v1.11.0 // indirect github.com/package-url/packageurl-go v0.1.1-0.20220428063043-89078438f170 // indirect github.com/pjbgf/sha1cd v0.3.0 // indirect github.com/pkg/profile v1.5.0 // indirect github.com/prometheus/client_golang v1.14.0 // indirect github.com/prometheus/client_model v0.3.0 // indirect github.com/prometheus/common v0.42.0 // indirect github.com/rivo/uniseg v0.4.4 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/sergi/go-diff v1.3.1 // indirect github.com/skeema/knownhosts v1.2.0 // indirect github.com/spdx/tools-golang v0.5.1 // indirect github.com/tidwall/match v1.1.1 // indirect github.com/tidwall/pretty v1.2.0 // indirect github.com/tonistiigi/go-actions-cache v0.0.0-20220404170428-0bdeb6e1eac7 // indirect github.com/tonistiigi/go-archvariant v1.0.0 // indirect github.com/tonistiigi/vt100 v0.0.0-20230623042737-f9a4f7ef6531 // indirect github.com/weaveworks/promrus v1.2.0 // indirect github.com/xanzy/ssh-agent v0.3.3 // indirect github.com/yuin/goldmark v1.5.4 // indirect github.com/zmb3/spotify/v2 v2.3.1 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.45.0 // indirect go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 // indirect go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0 // indirect go.opentelemetry.io/otel/metric v1.19.0 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/image v0.7.0 // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect gonum.org/v1/plot v0.12.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect gopkg.in/warnings.v0 v0.1.2 // indirect oss.terrastruct.com/util-go v0.0.0-20230320053557-dcb5aac7d972 // indirect ) require ( github.com/Khan/genqlient v0.6.0 github.com/Microsoft/go-winio v0.6.1 // indirect github.com/Microsoft/hcsshim v0.10.0-rc.8 // indirect github.com/adrg/xdg v0.4.0 github.com/agext/levenshtein v1.2.3 // indirect github.com/cenkalti/backoff/v4 v4.2.1 github.com/containerd/cgroups v1.1.0 // indirect github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 // indirect github.com/containerd/continuity v0.4.1 github.com/containerd/fifo v1.1.0 // indirect github.com/containerd/nydus-snapshotter v0.8.2 // indirect github.com/containerd/stargz-snapshotter/estargz v0.14.3 // indirect github.com/containerd/ttrpc v1.2.2 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/docker/cli v24.0.5+incompatible github.com/docker/docker v24.0.0-rc.2.0.20230905130451-032797ea4bcb+incompatible github.com/docker/docker-credential-helpers v0.7.0 // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.5.0 // indirect github.com/felixge/httpsnoop v1.0.3 // indirect github.com/go-logr/logr v1.2.4 // indirect github.com/go-logr/stdr v1.2.2 // indirect github.com/gofrs/flock v0.8.1 github.com/gogo/googleapis v1.4.1 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 github.com/in-toto/in-toto-golang v0.5.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/klauspost/compress v1.16.5 github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/moby/locker v1.0.1 github.com/moby/patternmatcher v0.6.0 github.com/moby/sys/signal v0.7.0 // indirect github.com/morikuni/aec v1.0.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/secure-systems-lab/go-securesystemslib v0.4.0 // indirect github.com/shibumi/go-pathspec v1.3.0 // indirect github.com/spf13/pflag v1.0.5 github.com/tidwall/gjson v1.15.0 github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea github.com/vbatts/tar-split v0.11.3 // indirect github.com/vektah/gqlparser/v2 v2.5.6 go.opencensus.io v0.24.0 // indirect golang.org/x/net v0.16.0 golang.org/x/text v0.13.0 golang.org/x/time v0.3.0 // indirect google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98 // indirect google.golang.org/protobuf v1.31.0 gopkg.in/yaml.v3 v3.0.1 )
closed
dagger/dagger
https://github.com/dagger/dagger
130
ENV from fetched container is lost
When doing a `#FetchContainer`, `ENV` instructions (such as `PATH`) are lost.
https://github.com/dagger/dagger/issues/130
https://github.com/dagger/dagger/pull/6010
16b9328aefbc68c3897e503ff24feb8e8ba5de16
47837d05154c8d9a12784f9db055b8090980847a
"2021-02-19T08:39:47Z"
go
"2023-10-30T14:09:32Z"
go.sum
bazil.org/fuse v0.0.0-20160811212531-371fbbdaa898/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= bazil.org/fuse v0.0.0-20180421153158-65cc252bf669/go.mod h1:Xbm+BRKSBEpa4q4hTSxohYNQpsxXPbPry4JJWOB3LB8= cdr.dev/slog v1.4.2 h1:fIfiqASYQFJBZiASwL825atyzeA96NsqSxx2aL61P8I= cdr.dev/slog v1.4.2/go.mod h1:0EkH+GkFNxizNR+GAXUEdUHanxUH5t9zqPILmPM/Vn8= cloud.google.com/go v0.25.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.31.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.37.2/go.mod h1:H8IAquKe2L30IxoupDgqTaQvKSwF/c8prYHynGIWQbA= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.39.0/go.mod h1:rVLT6fkc8chs9sfPtFc1SBH6em7n+ZoXaG+87tDISts= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= cloud.google.com/go v0.51.0/go.mod h1:hWtGJ6gnXH+KgDv+V0zFGDvpi07n3z8ZNj3T1RW0Gcw= cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY= cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM= cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY= cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ= cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI= cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4= cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc= cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA= cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A= cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc= cloud.google.com/go v0.110.4 h1:1JYyxKMN9hd5dR2MYTPWkGUgcoxVVhg0LKNKEo0qvmk= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow= cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s= cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= cloud.google.com/go/compute v1.21.0 h1:JNBsyXVoOoNJtTQcnEY5uYpZIbeCTYIeDe0Xh1bySMk= cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY= cloud.google.com/go/logging v1.7.0 h1:CJYxlNNNNAMkHp9em/YEXcfJg+rPDg7YfwoRpMU+t5I= cloud.google.com/go/longrunning v0.5.1 h1:Fr7TXftcqTudoyRJa113hyaqlGdiBQkp0Gq7tErFDWI= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y= code.gitea.io/sdk/gitea v0.12.0/go.mod h1:z3uwDV/b9Ls47NGukYM9XhnHtqPh/J+t40lsUrR6JDY= contrib.go.opencensus.io/exporter/aws v0.0.0-20181029163544-2befc13012d0/go.mod h1:uu1P0UCM/6RbsMrgPa98ll8ZcHM858i/AD06a9aLRCA= contrib.go.opencensus.io/exporter/ocagent v0.5.0/go.mod h1:ImxhfLRpxoYiSq891pBrLVhN+qmP8BTVvdH2YLs7Gl0= contrib.go.opencensus.io/exporter/stackdriver v0.12.1/go.mod h1:iwB6wGarfphGGe/e5CWqyUk/cLzKnWsOKPVW3no6OTw= contrib.go.opencensus.io/integrations/ocsql v0.1.4/go.mod h1:8DsSdjz3F+APR+0z0WkU1aRorQCFfRxvqjUUPMbF3fE= contrib.go.opencensus.io/resource v0.1.1/go.mod h1:F361eGI91LCmW1I/Saf+rX0+OFcigGlFvXwEGEnkRLA= dario.cat/mergo v1.0.0 h1:AGCNq9Evsj31mOgNPcLyXc+4PNABt905YmuqPYYpBWk= dario.cat/mergo v1.0.0/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= git.apache.org/thrift.git v0.12.0/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg= git.sr.ht/~sbinet/gg v0.3.1 h1:LNhjNn8DerC8f9DHLz6lS0YYul/b602DUxDgGkd/Aik= github.com/99designs/gqlgen v0.17.34 h1:5cS5/OKFguQt+Ws56uj9FlG2xm1IlcJWNF2jrMIKYFQ= github.com/99designs/gqlgen v0.17.34/go.mod h1:Axcd3jIFHBVcqzixujJQr1wGqE+lGTpz6u4iZBZg1G8= github.com/AdaLogics/go-fuzz-headers v0.0.0-20230106234847-43070de90fa1 h1:EKPd1INOIyr5hWOWhvpmQpY6tKjeG0hT1s3AMC/9fic= github.com/AdaLogics/go-fuzz-headers v0.0.0-20230106234847-43070de90fa1/go.mod h1:VzwV+t+dZ9j/H867F1M2ziD+yLHtB46oM35FxxMJ4d0= github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20221215162035-5330a85ea652 h1:+vTEFqeoeur6XSq06bs+roX3YiT49gUniJK7Zky7Xjg= github.com/AkihiroSuda/containerd-fuse-overlayfs v1.0.0/go.mod h1:0mMDvQFeLbbn1Wy8P2j3hwFhqBq+FKn8OZPno8WLmp8= github.com/Azure/azure-amqp-common-go/v2 v2.1.0/go.mod h1:R8rea+gJRuJR6QxTir/XuEd+YuKoUiazDC/N96FiDEU= github.com/Azure/azure-pipeline-go v0.2.1/go.mod h1:UGSo8XybXnIGZ3epmeBw7Jdz+HiUVpqIlpz/HKHylF4= github.com/Azure/azure-pipeline-go v0.2.2/go.mod h1:4rQ/NZncSvGqNkkOsNpOU1tgoNuIlp9AfUH5G1tvCHc= github.com/Azure/azure-sdk-for-go v16.2.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go v19.1.1+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go v29.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go v30.1.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go v35.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go v38.0.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go v42.3.0+incompatible/go.mod h1:9XXNKU+eRnpl9moKnB4QOLf1HestfXbmab5FXxiDBjc= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.1.0 h1:Ut0ZGdOwJDw0npYEg+TLlPls3Pq6JiZaP2/aGKir7Zw= github.com/Azure/azure-sdk-for-go/sdk/azcore v1.1.0/go.mod h1:uGG2W01BaETf0Ozp+QxxKJdMBNRWPdstHG0Fmdwn1/U= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.1.0 h1:QkAcEIAKbNL4KoFr4SathZPhDhF4mVwpBMFlYjyAqy8= github.com/Azure/azure-sdk-for-go/sdk/azidentity v1.1.0/go.mod h1:bhXu1AjYL+wutSL/kpSq6s7733q2Rb0yuot9Zgfqa/0= github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0 h1:jp0dGvZ7ZK0mgqnTSClMxa5xuRL7NZgHameVYF6BurY= github.com/Azure/azure-sdk-for-go/sdk/internal v1.0.0/go.mod h1:eWRD7oawr1Mu1sLCawqVc0CUiF43ia3qQMxLscsKQ9w= github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.4.1 h1:QSdcrd/UFJv6Bp/CfoVf2SrENpFn9P6Yh8yb+xNhYMM= github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.4.1/go.mod h1:eZ4g6GUvXiGulfIbbhh1Xr4XwUYaYaWMqzGD/284wCA= github.com/Azure/azure-service-bus-go v0.9.1/go.mod h1:yzBx6/BUGfjfeqbRZny9AQIbIe3AcV9WZbAdpkoXOa0= github.com/Azure/azure-storage-blob-go v0.8.0/go.mod h1:lPI3aLPpuLTeUwh1sViKXFxwl2B6teiRqI0deQUvsw0= github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78/go.mod h1:LmzpDX56iTiv29bbRTIsUNlaFfuhWRQBWjQdVyAevI8= github.com/Azure/go-autorest v10.8.1+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest v10.15.5+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest v12.0.0+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest v14.1.1+incompatible/go.mod h1:r+4oMnoxhatjLLJ6zxSWATqVooLgysK6ZNox3g/xq24= github.com/Azure/go-autorest/autorest v0.9.0/go.mod h1:xyHB1BMZT0cuDHU7I0+g046+BFDTQ8rEZB0s4Yfa6bI= github.com/Azure/go-autorest/autorest v0.9.3/go.mod h1:GsRuLYvwzLjjjRoWEIyMUaYq8GNUx2nRB378IPt/1p0= github.com/Azure/go-autorest/autorest v0.9.6/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= github.com/Azure/go-autorest/autorest v0.10.2/go.mod h1:/FALq9T/kS7b5J5qsQ+RSTUdAmGFqi0vUdVNNx8q630= github.com/Azure/go-autorest/autorest/adal v0.5.0/go.mod h1:8Z9fGy2MpX0PvDjB1pEgQTmVqjGhiHBW7RJJEciWzS0= github.com/Azure/go-autorest/autorest/adal v0.8.0/go.mod h1:Z6vX6WXXuyieHAXwMj0S6HY6e6wcHn37qQMBQlvY3lc= github.com/Azure/go-autorest/autorest/adal v0.8.1/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= github.com/Azure/go-autorest/autorest/adal v0.8.2/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= github.com/Azure/go-autorest/autorest/adal v0.8.3/go.mod h1:ZjhuQClTqx435SRJ2iMlOxPYt3d2C/T/7TiQCVZSn3Q= github.com/Azure/go-autorest/autorest/azure/auth v0.4.2/go.mod h1:90gmfKdlmKgfjUpnCEpOJzsUEjrWDSLwHIG73tSXddM= github.com/Azure/go-autorest/autorest/azure/cli v0.3.1/go.mod h1:ZG5p860J94/0kI9mNJVoIoLgXcirM2gF5i2kWloofxw= github.com/Azure/go-autorest/autorest/date v0.1.0/go.mod h1:plvfp3oPSKwf2DNjlBjWF/7vwR+cUD/ELuzDCXwHUVA= github.com/Azure/go-autorest/autorest/date v0.2.0/go.mod h1:vcORJHLJEh643/Ioh9+vPmf1Ij9AEBM5FuBIXLmIy0g= github.com/Azure/go-autorest/autorest/mocks v0.1.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.2.0/go.mod h1:OTyCOPRA2IgIlWxVYxBee2F5Gr4kF2zd2J5cFRaIDN0= github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN3SVSiiO77gL2j2ronKKP0syM= github.com/Azure/go-autorest/autorest/to v0.2.0/go.mod h1:GunWKJp1AEqgMaGLV+iocmRAJWqST1wQYhyyjXJ3SJc= github.com/Azure/go-autorest/autorest/to v0.3.0/go.mod h1:MgwOyqaIuKdG4TL/2ywSsIWKAfJfgHDo8ObuUk3t5sA= github.com/Azure/go-autorest/autorest/validation v0.1.0/go.mod h1:Ha3z/SqBeaalWQvokg3NZAlQTalVMtOIAs1aGK7G6u8= github.com/Azure/go-autorest/autorest/validation v0.2.0/go.mod h1:3EEqHnBxQGHXRYq3HT1WyXAvT7LLY3tl70hw6tQIbjI= github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc= github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk= github.com/AzureAD/microsoft-authentication-library-for-go v0.6.0 h1:XMEdVDFxgulDDl0lQmAZS6j8gRQ/0pJ+ZpXH2FHVtDc= github.com/AzureAD/microsoft-authentication-library-for-go v0.6.0/go.mod h1:BDJ5qMFKx9DugEg3+uQSDCdbYPr5s9vBTrL9P8TpqOU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/Djarvur/go-err113 v0.0.0-20200410182137-af658d038157/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= github.com/Djarvur/go-err113 v0.1.0/go.mod h1:4UJr5HIiMZrwgkSPdsjy2uOQExX/WEILpIrO9UPGuXs= github.com/GoogleCloudPlatform/cloudsql-proxy v0.0.0-20191009163259-e802c2cb94ae/go.mod h1:mjwGPas4yKduTyubHvD1Atl9r1rUq8DfVy+gkVvZ+oo= github.com/GoogleCloudPlatform/k8s-cloud-provider v0.0.0-20190822182118-27a4ced34534/go.mod h1:iroGtC8B3tQiqtds1l+mgk/BBOrxbqjH+eUfFQYRc14= github.com/Khan/genqlient v0.6.0 h1:Bwb1170ekuNIVIwTJEqvO8y7RxBxXu639VJOkKSrwAk= github.com/Khan/genqlient v0.6.0/go.mod h1:rvChwWVTqXhiapdhLDV4bp9tz/Xvtewwkon4DpWWCRM= github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww= github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y= github.com/Masterminds/semver/v3 v3.0.3/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= github.com/Masterminds/semver/v3 v3.1.0 h1:Y2lUDsFKVRSYGojLJ1yLxSXdMmMYTYls0rCvoqmMUQk= github.com/Masterminds/semver/v3 v3.1.0/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= github.com/Microsoft/go-winio v0.4.15-0.20200908182639-5b44b70ab3ab/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= github.com/Microsoft/go-winio v0.4.15/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/Microsoft/hcsshim v0.8.7/go.mod h1:OHd7sQqRFrYd3RmSgbgji+ctCwkbq2wbEYNSzOYtcBQ= github.com/Microsoft/hcsshim v0.8.9/go.mod h1:5692vkUqntj1idxauYlpoINNKeqCiG6Sg38RRsjT5y8= github.com/Microsoft/hcsshim v0.8.10/go.mod h1:g5uw8EV2mAlzqe94tfNBNdr89fnbD/n3HV0OhsddkmM= github.com/Microsoft/hcsshim v0.10.0-rc.8 h1:YSZVvlIIDD1UxQpJp0h+dnpLUw+TrY0cx8obKsp3bek= github.com/Microsoft/hcsshim v0.10.0-rc.8/go.mod h1:OEthFdQv/AD2RAdzR6Mm1N1KPCztGKDurW1Z8b8VGMM= github.com/Microsoft/hcsshim/test v0.0.0-20200826032352-301c83a30e7c/go.mod h1:30A5igQ91GEmhYJF8TaRP79pMBOYynRsyOByfVV0dU4= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/OpenPeeDeeP/depguard v1.0.1/go.mod h1:xsIw86fROiiwelg+jB2uM9PiKihMMmUx/1V+TNhjQvM= github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371 h1:kkhsdkhsCvIsutKu5zLMgWtgh9YxGCNAw8Ad8hjwfYg= github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0= github.com/PuerkitoBio/goquery v1.8.1 h1:uQxhNlArOIdbrH1tr0UXwdVFgDcZDrZVdcpygAcwmWM= github.com/PuerkitoBio/goquery v1.8.1/go.mod h1:Q8ICL1kNUJ2sXGoAhPGUdYDJvgQgHzJsnnd3H7Ho5jQ= github.com/PuerkitoBio/purell v1.0.0/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0= github.com/PuerkitoBio/urlesc v0.0.0-20160726150825-5bd2802263f2/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE= github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= github.com/StackExchange/wmi v0.0.0-20180116203802-5d049714c4a6/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= github.com/acomagu/bufpipe v1.0.4 h1:e3H4WUzM3npvo5uv95QuJM3cQspFNtFBzvJ2oNjKIDQ= github.com/acomagu/bufpipe v1.0.4/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= github.com/adrg/xdg v0.4.0 h1:RzRqFcjH4nE5C6oTAxhBtoE2IRyjBSa62SCbyPidvls= github.com/adrg/xdg v0.4.0/go.mod h1:N6ag73EX4wyxeaoeHctc1mas01KZgsj5tYiAIwqJE/E= github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRBij0P8= github.com/agnivade/levenshtein v1.1.1/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo= github.com/ajstarks/svgo v0.0.0-20211024235047-1546f124cd8b h1:slYM766cy2nI3BwyRiyQj/Ud48djTMtMebDqepE95rw= github.com/alecthomas/assert/v2 v2.2.1 h1:XivOgYcduV98QCahG8T5XTezV5bylXe+lBxLG2K2ink= github.com/alecthomas/chroma v0.10.0 h1:7XDcGkCQopCNKjZHfYrNLraA+M7e0fMiJ/Mfikbfjek= github.com/alecthomas/chroma v0.10.0/go.mod h1:jtJATyUxlIORhUOFNA9NZDWGAQ8wpxQQqNSB4rjA/1s= github.com/alecthomas/chroma/v2 v2.7.0 h1:hm1rY6c/Ob4eGclpQ7X/A3yhqBOZNUTk9q+yhyLIViI= github.com/alecthomas/chroma/v2 v2.7.0/go.mod h1:yrkMI9807G1ROx13fhe1v6PN2DDeaR73L3d+1nmYQtw= github.com/alecthomas/kingpin v2.2.6+incompatible/go.mod h1:59OFYbFVLKQKq+mqrL6Rw5bR0c3ACQaawgXx0QYndlE= github.com/alecthomas/repr v0.2.0 h1:HAzS41CIzNW5syS8Mf9UwXhNH1J9aix/BvDRf1Ml2Yk= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= github.com/anchore/go-struct-converter v0.0.0-20221118182256-c68fdcfa2092 h1:aM1rlcoLz8y5B2r4tTLMiVTrMtpfY0O8EScKJxaSaEc= github.com/anchore/go-struct-converter v0.0.0-20221118182256-c68fdcfa2092/go.mod h1:rYqSE9HbjzpHTI74vwPvae4ZVYZd1lue2ta6xHPdblA= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/andybalholm/cascadia v1.3.1 h1:nhxRkql1kdYCc8Snf7D5/D3spOX+dBgjA6u8x004T2c= github.com/andybalholm/cascadia v1.3.1/go.mod h1:R4bJ1UQfqADjvDa4P6HZHLh/3OxWWEqc0Sk8XGwHqvA= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= github.com/anmitsu/go-shlex v0.0.0-20200514113438-38f4b401e2be h1:9AeTilPcZAjCFIImctFaOjnTIavg87rW78vTPkQqLI8= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apex/log v1.1.4/go.mod h1:AlpoD9aScyQfJDVHmLMEcx4oU6LqzkWp4Mg9GdAcEvQ= github.com/apex/log v1.3.0/go.mod h1:jd8Vpsr46WAe3EZSQ/IUMs2qQD/GOycT5rPWCO1yGcs= github.com/apex/logs v0.0.4/go.mod h1:XzxuLZ5myVHDy9SAmYpamKKRNApGj54PfYLcFrXqDwo= github.com/aphistic/golf v0.0.0-20180712155816-02c07f170c5a/go.mod h1:3NqKYiepwy8kCu4PNA+aP7WUV72eXWJeP9/r3/K9aLE= github.com/aphistic/sweet v0.2.0/go.mod h1:fWDlIh/isSE9n6EPsRmC0det+whmX6dJid3stzu0Xys= github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0 h1:jfIu9sQUG6Ig+0+Ap1h4unLjW6YQJpKZVmUzxsD4E/Q= github.com/arbovm/levenshtein v0.0.0-20160628152529-48b4e1c0c4d0/go.mod h1:t2tdKJDJF9BV14lnkjHmOQgcvEKgtqs5a1N3LNdJhGE= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/circbuf v0.0.0-20190214190532-5111143e8da2 h1:7Ip0wMmLHLRJdrloDxZfhMm0xrLXZS8+COSu2bXmEQs= github.com/armon/circbuf v0.0.0-20190214190532-5111143e8da2/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= github.com/aws/aws-sdk-go v1.15.27/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= github.com/aws/aws-sdk-go v1.15.90/go.mod h1:es1KtYUFs7le0xQ3rOihkuoVD90z7D0fR2Qm4S00/gU= github.com/aws/aws-sdk-go v1.16.26/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.19.18/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.19.45/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.20.6/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.25.11/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.27.1/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.31.6/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0= github.com/aws/aws-sdk-go-v2 v1.17.8 h1:GMupCNNI7FARX27L7GjCJM8NgivWbRgpjNI/hOQjFS8= github.com/aws/aws-sdk-go-v2 v1.17.8/go.mod h1:uzbQtefpm44goOPmdKyAlXSNcwlRgF3ePWVW6EtJvvw= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.10 h1:dK82zF6kkPeCo8J1e+tGx4JdvDIQzj7ygIoLg8WMuGs= github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.4.10/go.mod h1:VeTZetY5KRJLuD/7fkQXMU6Mw7H5m/KP2J5Iy9osMno= github.com/aws/aws-sdk-go-v2/config v1.18.21 h1:ENTXWKwE8b9YXgQCsruGLhvA9bhg+RqAsL9XEMEsa2c= github.com/aws/aws-sdk-go-v2/config v1.18.21/go.mod h1:+jPQiVPz1diRnjj6VGqWcLK6EzNmQ42l7J3OqGTLsSY= github.com/aws/aws-sdk-go-v2/credentials v1.13.20 h1:oZCEFcrMppP/CNiS8myzv9JgOzq2s0d3v3MXYil/mxQ= github.com/aws/aws-sdk-go-v2/credentials v1.13.20/go.mod h1:xtZnXErtbZ8YGXC3+8WfajpMBn5Ga/3ojZdxHq6iI8o= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.2 h1:jOzQAesnBFDmz93feqKnsTHsXrlwWORNZMFHMV+WLFU= github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.13.2/go.mod h1:cDh1p6XkSGSwSRIArWRc6+UqAQ7x4alQ0QfpVR6f+co= github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.62 h1:LhVbe/UDWvBT/jp5LYAweFVH8s+DNtT07Qp2riWEovU= github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.11.62/go.mod h1:4xCuu1TSwhW5UH6WOdtS4/x/9UfMr2XplzKc86Ffj78= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.32 h1:dpbVNUjczQ8Ae3QKHbpHBpfvaVkRdesxpTOe9pTouhU= github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.32/go.mod h1:RudqOgadTWdcS3t/erPQo24pcVEoYyqj/kKW5Vya21I= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.26 h1:QH2kOS3Ht7x+u0gHCh06CXL/h6G8LQJFpZfFBYBNboo= github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.26/go.mod h1:vq86l7956VgFr0/FWQ2BWnK07QC3WYsepKzy33qqY5U= github.com/aws/aws-sdk-go-v2/internal/ini v1.3.33 h1:HbH1VjUgrCdLJ+4lnnuLI4iVNRvBbBELGaJ5f69ClA8= github.com/aws/aws-sdk-go-v2/internal/ini v1.3.33/go.mod h1:zG2FcwjQarWaqXSCGpgcr3RSjZ6dHGguZSppUL0XR7Q= github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.24 h1:zsg+5ouVLLbePknVZlUMm1ptwyQLkjjLMWnN+kVs5dA= github.com/aws/aws-sdk-go-v2/internal/v4a v1.0.24/go.mod h1:+fFaIjycTmpV6hjmPTbyU9Kp5MI/lA+bbibcAtmlhYA= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.11 h1:y2+VQzC6Zh2ojtV2LoC0MNwHWc6qXv/j2vrQtlftkdA= github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.9.11/go.mod h1:iV4q2hsqtNECrfmlXyord9u4zyuFEJX9eLgLpSPzWA8= github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.27 h1:qIw7Hg5eJEc1uSxg3hRwAthPAO7NeOd4dPxhaTi0yB0= github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.1.27/go.mod h1:Zz0kvhcSlu3NX4XJkaGgdjaa+u7a9LYuy8JKxA5v3RM= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.26 h1:uUt4XctZLhl9wBE1L8lobU3bVN8SNUP7T+olb0bWBO4= github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.26/go.mod h1:Bd4C/4PkVGubtNe5iMXu5BNnaBi/9t/UsFspPt4ram8= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.14.1 h1:lRWp3bNu5wy0X3a8GS42JvZFlv++AKsMdzEnoiVJrkg= github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.14.1/go.mod h1:VXBHSxdN46bsJrkniN68psSwbyBKsazQfU2yX/iSDso= github.com/aws/aws-sdk-go-v2/service/s3 v1.31.3 h1:MG+2UlhyBL3oCOoHbUQh+Sqr3elN0I5PBe0MtVh0xMg= github.com/aws/aws-sdk-go-v2/service/s3 v1.31.3/go.mod h1:aSl9/LJltSz1cVusiR/Mu8tvI4Sv/5w/WWrJmmkNii0= github.com/aws/aws-sdk-go-v2/service/sso v1.12.8 h1:5cb3D6xb006bPTqEfCNaEA6PPEfBXxxy4NNeX/44kGk= github.com/aws/aws-sdk-go-v2/service/sso v1.12.8/go.mod h1:GNIveDnP+aE3jujyUSH5aZ/rktsTM5EvtKnCqBZawdw= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.8 h1:NZaj0ngZMzsubWZbrEFSB4rgSQRbFq38Sd6KBxHuOIU= github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.8/go.mod h1:44qFP1g7pfd+U+sQHLPalAPKnyfTZjJsYR4xIwsJy5o= github.com/aws/aws-sdk-go-v2/service/sts v1.18.9 h1:Qf1aWwnsNkyAoqDqmdM3nHwN78XQjec27LjM6b9vyfI= github.com/aws/aws-sdk-go-v2/service/sts v1.18.9/go.mod h1:yyW88BEPXA2fGFyI2KCcZC3dNpiT0CZAHaF+i656/tQ= github.com/aws/smithy-go v1.13.5 h1:hgz0X/DX0dGqTYpGALqXJoRKRj5oQ7150i5FdTePzO8= github.com/aws/smithy-go v1.13.5/go.mod h1:Tg+OJXh4MB2R/uN61Ko2f6hTZwB/ZYGOtib8J3gBHzA= github.com/aybabtme/rgbterm v0.0.0-20170906152045-cc83f3b3ce59/go.mod h1:q/89r3U2H7sSsE2t6Kca0lfwTK8JdoNGS/yzM/4iH5I= github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8= github.com/beorn7/perks v0.0.0-20160804104726-4c0e84591b9a/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= github.com/bitly/go-simplejson v0.5.0/go.mod h1:cXHtHw4XUPsvGaxgjIAn8PhEWG9NfngEKAMDJEczWVA= github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/blakesmith/ar v0.0.0-20190502131153-809d4375e1fb/go.mod h1:PkYb9DJNAwrSvRx5DYA+gUcOIgTGVMNkfSCbZM8cWpI= github.com/blang/semver v3.1.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver v3.5.0+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/blang/semver v3.5.1+incompatible h1:cQNTCjp13qL8KC3Nbxr/y2Bqb63oX6wdnnjpJbkM4JQ= github.com/blang/semver v3.5.1+incompatible/go.mod h1:kRBLl5iJ+tD4TcOOxsy/0fnwebNt5EWlYSAyrTnjyyk= github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4= github.com/bombsimon/wsl/v2 v2.0.0/go.mod h1:mf25kr/SqFEPhhcxW1+7pxzGlW+hIl/hYTKY95VwV8U= github.com/bombsimon/wsl/v2 v2.2.0/go.mod h1:Azh8c3XGEJl9LyX0/sFC+CKMc7Ssgua0g+6abzXN4Pg= github.com/bombsimon/wsl/v3 v3.0.0/go.mod h1:st10JtZYLE4D5sC7b8xV4zTKZwAQjCH/Hy2Pm1FNZIc= github.com/bombsimon/wsl/v3 v3.1.0/go.mod h1:st10JtZYLE4D5sC7b8xV4zTKZwAQjCH/Hy2Pm1FNZIc= github.com/boombuler/barcode v1.0.0/go.mod h1:paBWMcWSl3LHKBqUq+rly7CNSldXjb2rDl3JlRe0mD8= github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g= github.com/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b/go.mod h1:obH5gd0BsqsP2LwDJ9aOkm/6J86V6lyAXCoQWGw3K50= github.com/bugsnag/panicwrap v0.0.0-20151223152923-e2c28503fcd0/go.mod h1:D/8v3kj0zr8ZAKg1AQ6crr+5VwKN5eIywRkfhyM/+dE= github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/caarlos0/ctrlc v1.0.0/go.mod h1:CdXpj4rmq0q/1Eb44M9zi2nKB0QraNKuRGYGrrHhcQw= github.com/campoy/unique v0.0.0-20180121183637-88950e537e7e/go.mod h1:9IOqJGCPMSc6E5ydlp5NIonxObaeu/Iub/X03EKPVYo= github.com/cavaliercoder/go-cpio v0.0.0-20180626203310-925f9528c45e/go.mod h1:oDpT4efm8tSYHXV5tHSdRvBet/b/QzxZ+XyyPehvm3A= github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/charmbracelet/bubbles v0.16.1 h1:6uzpAAaT9ZqKssntbvZMlksWHruQLNxg49H5WdeuYSY= github.com/charmbracelet/bubbles v0.16.1/go.mod h1:2QCp9LFlEsBQMvIYERr7Ww2H2bA7xen1idUDIzm/+Xc= github.com/charmbracelet/bubbletea v0.24.2 h1:uaQIKx9Ai6Gdh5zpTbGiWpytMU+CfsPp06RaW2cx/SY= github.com/charmbracelet/bubbletea v0.24.2/go.mod h1:XdrNrV4J8GiyshTtx3DNuYkR1FDaJmO3l2nejekbsgg= github.com/charmbracelet/harmonica v0.2.0 h1:8NxJWRWg/bzKqqEaaeFNipOu77YR5t8aSwG4pgaUBiQ= github.com/charmbracelet/harmonica v0.2.0/go.mod h1:KSri/1RMQOZLbw7AHqgcBycp8pgJnQMYYT8QZRqZ1Ao= github.com/charmbracelet/lipgloss v0.8.0 h1:IS00fk4XAHcf8uZKc3eHeMUTCxUH6NkaTrdyCQk84RU= github.com/charmbracelet/lipgloss v0.8.0/go.mod h1:p4eYUZZJ/0oXTuCQKFF8mqyKCz0ja6y+7DniDDw5KKU= github.com/checkpoint-restore/go-criu/v4 v4.1.0/go.mod h1:xUQBLp4RLc5zJtWY++yjOoMoB5lihDt7fai+75m+rGw= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/logex v1.2.0/go.mod h1:9+9sk7u7pGNWYMkh0hdiL++6OeibzJccyQU4p4MedaY= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/readline v1.5.0/go.mod h1:x22KAscuvRqlLoK9CsoYsmxoXZMMFVyOl86cAH8qUic= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/chzyer/test v0.0.0-20210722231415-061457976a23/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/cilium/ebpf v0.0.0-20200110133405-4032b1d8aae3/go.mod h1:MA5e5Lr8slmEg9bt0VpxxWqJlO4iwu3FBdHUzV7wQVg= github.com/cilium/ebpf v0.0.0-20200702112145-1c8d4c9ef775/go.mod h1:7cR51M8ViRLIdUjrmSXlK9pkrsDlLHbO8jiB8X8JnOc= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cloudflare/circl v1.3.3 h1:fE/Qz0QdIGqeWfnwq0RE0R7MI51s0M2E4Ga9kq5AEMs= github.com/cloudflare/circl v1.3.3/go.mod h1:5XYMA4rFBvNIrhs50XuiBJ15vF2pZn4nnUKZrLbUZFA= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= github.com/codahale/hdrhistogram v0.0.0-20160425231609-f8ad88b59a58/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/codahale/rfc6979 v0.0.0-20141003034818-6a90f24967eb h1:EDmT6Q9Zs+SbUoc7Ik9EfrFqcylYqgPZ9ANSbTAntnE= github.com/containerd/cgroups v0.0.0-20190919134610-bf292b21730f/go.mod h1:OApqhQ4XNSNC13gXIwDjhOQxjWa/NxkwZXJ1EvqT0ko= github.com/containerd/cgroups v0.0.0-20200531161412-0dbf7f05ba59/go.mod h1:pA0z1pT8KYB3TCXK/ocprsh7MAkoW8bZVzPdih9snmM= github.com/containerd/cgroups v0.0.0-20200710171044-318312a37340/go.mod h1:s5q4SojHctfxANBDvMeIaIovkq29IP48TKAxnhYRxvo= github.com/containerd/cgroups v1.1.0 h1:v8rEWFl6EoqHB+swVNjVoCJE8o3jX7e8nqBGPLaDFBM= github.com/containerd/cgroups v1.1.0/go.mod h1:6ppBcbh/NOOUU+dMKrykgaBnK9lCIBxHqJDGwsa1mIw= github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= github.com/containerd/console v0.0.0-20191206165004-02ecf6a7291e/go.mod h1:8Pf4gM6VEbTNRIT26AyyU7hxdQU3MvAvxVI0sc00XBE= github.com/containerd/console v1.0.0/go.mod h1:8Pf4gM6VEbTNRIT26AyyU7hxdQU3MvAvxVI0sc00XBE= github.com/containerd/console v1.0.1/go.mod h1:XUsP6YE/mKtz6bxc+I8UiKKTP04qjQL4qcS3XoQ5xkw= github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 h1:q2hJAaP1k2wIvVRd/hEHD7lacgqrCPS+k8g1MndzfWY= github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81/go.mod h1:YynlIjWYF8myEu6sdkwKIvGQq+cOckRm6So2avqoYAk= github.com/containerd/containerd v1.3.0-beta.2.0.20190828155532-0293cbd26c69/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/containerd v1.3.0/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/containerd v1.3.2/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/containerd v1.4.0/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/containerd v1.4.1-0.20201117152358-0edc412565dc/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= github.com/containerd/containerd v1.7.2 h1:UF2gdONnxO8I6byZXDi5sXWiWvlW3D/sci7dTQimEJo= github.com/containerd/containerd v1.7.2/go.mod h1:afcz74+K10M/+cjGHIVQrCt3RAQhUSCAjJ9iMYhhkuI= github.com/containerd/continuity v0.0.0-20190426062206-aaeac12a7ffc/go.mod h1:GL3xCUCBDV3CZiTSEKksMWbLE66hEyuu9qyDOOqM47Y= github.com/containerd/continuity v0.0.0-20200710164510-efbc4488d8fe/go.mod h1:cECdGN1O8G9bgKTlLhuPJimka6Xb/Gg7vYzCTNVxhvo= github.com/containerd/continuity v0.4.1 h1:wQnVrjIyQ8vhU2sgOiL5T07jo+ouqc2bnKsv5/EqGhU= github.com/containerd/continuity v0.4.1/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ/7o4JzpodfroQ= github.com/containerd/fifo v0.0.0-20190226154929-a9fb20d87448/go.mod h1:ODA38xgv3Kuk8dQz2ZQXpnv/UZZUHUCL7pnLehbXgQI= github.com/containerd/fifo v0.0.0-20200410184934-f15a3290365b/go.mod h1:jPQ2IAeZRCYxpS/Cm1495vGFww6ecHmMk1YJH2Q5ln0= github.com/containerd/fifo v1.1.0 h1:4I2mbh5stb1u6ycIABlBw9zgtlK8viPI9QkQNRQEEmY= github.com/containerd/fifo v1.1.0/go.mod h1:bmC4NWMbXlt2EZ0Hc7Fx7QzTFxgPID13eH0Qu+MAb2o= github.com/containerd/fuse-overlayfs-snapshotter v1.0.6 h1:MWwG/UOQv6J2hvRgKGduhJn5yKZPl4ly+PWMhfPnMzU= github.com/containerd/fuse-overlayfs-snapshotter v1.0.6/go.mod h1:gfcR4++fMRl37UvYy4Kw6JrQIra1bFFQVVtWEp1oon4= github.com/containerd/go-cni v1.0.1/go.mod h1:+vUpYxKvAF72G9i1WoDOiPGRtQpqsNW/ZHtSlv++smU= github.com/containerd/go-cni v1.1.9 h1:ORi7P1dYzCwVM6XPN4n3CbkuOx/NZ2DOqy+SHRdo9rU= github.com/containerd/go-cni v1.1.9/go.mod h1:XYrZJ1d5W6E2VOvjffL3IZq0Dz6bsVlERHbekNK90PM= github.com/containerd/go-runc v0.0.0-20180907222934-5a6d9f37cfa3/go.mod h1:IV7qH3hrUgRmyYrtgEeGWJfWbgcHL9CSRruz2Vqcph0= github.com/containerd/go-runc v0.0.0-20200220073739-7016d3ce2328/go.mod h1:PpyHrqVs8FTi9vpyHwPwiNEGaACDxT/N/pLcvMSRA9g= github.com/containerd/go-runc v0.0.0-20201020171139-16b287bc67d0/go.mod h1:cNU0ZbCgCQVZK4lgG3P+9tn9/PaJNmoDXPpoJhDR+Ok= github.com/containerd/go-runc v1.1.0 h1:OX4f+/i2y5sUT7LhmcJH7GYrjjhHa1QI4e8yO0gGleA= github.com/containerd/go-runc v1.1.0/go.mod h1:xJv2hFF7GvHtTJd9JqTS2UVxMkULUYw4JN5XAUZqH5U= github.com/containerd/nydus-snapshotter v0.8.2 h1:7SOrMU2YmLzfbsr5J7liMZJlNi5WT6vtIOxLGv+iz7E= github.com/containerd/nydus-snapshotter v0.8.2/go.mod h1:UJILTN5LVBRY+dt8BGJbp72Xy729hUZsOugObEI3/O8= github.com/containerd/stargz-snapshotter v0.0.0-20201027054423-3a04e4c2c116/go.mod h1:o59b3PCKVAf9jjiKtCc/9hLAd+5p/rfhBfm6aBcTEr4= github.com/containerd/stargz-snapshotter v0.14.3 h1:OTUVZoPSPs8mGgmQUE1dqw3WX/3nrsmsurW7UPLWl1U= github.com/containerd/stargz-snapshotter v0.14.3/go.mod h1:j2Ya4JeA5gMZJr8BchSkPjlcCEh++auAxp4nidPI6N0= github.com/containerd/stargz-snapshotter/estargz v0.14.3 h1:OqlDCK3ZVUO6C3B/5FSkDwbkEETK84kQgEeFwDC+62k= github.com/containerd/stargz-snapshotter/estargz v0.14.3/go.mod h1:KY//uOCIkSuNAHhJogcZtrNHdKrA99/FCCRjE3HD36o= github.com/containerd/ttrpc v0.0.0-20190828154514-0e0f228740de/go.mod h1:PvCDdDGpgqzQIzDW1TphrGLssLDZp2GuS+X5DkEJB8o= github.com/containerd/ttrpc v1.0.1/go.mod h1:UAxOpgT9ziI0gJrmKvgcZivgxOp8iFPSk8httJEt98Y= github.com/containerd/ttrpc v1.2.2 h1:9vqZr0pxwOF5koz6N0N3kJ0zDHokrcPxIR/ZR2YFtOs= github.com/containerd/ttrpc v1.2.2/go.mod h1:sIT6l32Ph/H9cvnJsfXM5drIVzTr5A2flTf1G5tYZak= github.com/containerd/typeurl v0.0.0-20180627222232-a93fcdb778cd/go.mod h1:Cm3kwCdlkCfMSHURc+r6fwoGH6/F1hH3S4sg0rLFWPc= github.com/containerd/typeurl v1.0.1/go.mod h1:TB1hUtrpaiO88KEK56ijojHS1+NeF0izUACaJW2mdXg= github.com/containerd/typeurl/v2 v2.1.1 h1:3Q4Pt7i8nYwy2KmQWIw2+1hTvwTE/6w9FqcttATPO/4= github.com/containerd/typeurl/v2 v2.1.1/go.mod h1:IDp2JFvbwZ31H8dQbEIY7sDl2L3o3HZj1hsSQlywkQ0= github.com/containernetworking/cni v0.8.0/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= github.com/containernetworking/cni v1.1.2 h1:wtRGZVv7olUHMOqouPpn3cXJWpJgM6+EUl31EQbXALQ= github.com/containernetworking/cni v1.1.2/go.mod h1:sDpYKmGVENF3s6uvMvGgldDWeG8dMxakj/u+i9ht9vw= github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd/v22 v22.0.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= github.com/coreos/go-systemd/v22 v22.1.0/go.mod h1:xO0FLkIi5MaZafQlIrOotqXZ90ih+1atmu1JpKERPPk= github.com/coreos/go-systemd/v22 v22.4.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180108230652-97fdf19511ea/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/dagger/graphql v0.0.0-20230919174923-21d038582a21 h1:6H/36Lk+mcSXxlbjjIMUYd4DR+aqCzeaRigK5dUe/a0= github.com/dagger/graphql v0.0.0-20230919174923-21d038582a21/go.mod h1:jxe8vuRdvEbdLR5nrc6F7gLPmPeJhGe2DbIgEok+pCA= github.com/dagger/graphql-go-tools v0.0.0-20231012004527-77189e400b6e h1:5fyK89J8og+XMW5JetgXzaxRhoI9UrS0BhrNskj4cuA= github.com/dagger/graphql-go-tools v0.0.0-20231012004527-77189e400b6e/go.mod h1:SXt7tSY8l+OVghRddofY+eDdv8EK82N0JlrrfrkqFEw= github.com/dave/jennifer v1.7.0 h1:uRbSBH9UTS64yXbh4FrMHfgfY762RD+C7bUPKODpSJE= github.com/dave/jennifer v1.7.0/go.mod h1:nXbxhEmQfOZhWml3D1cDK5M1FLnMSozpbFN/m3RmGZc= github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba/go.mod h1:dV8lFg6daOBZbT6/BDGIz6Y3WFGn8juu6G+CQ6LHtl0= github.com/devigned/tab v0.1.1/go.mod h1:XG9mPq0dFghrYvoBF3xdRrJzSTX1b7IQrvaL9mzjeJY= github.com/dgrijalva/jwt-go v0.0.0-20170104182250-a601269ab70c/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48 h1:fRzb/w+pyskVMQ+UbP35JkH8yB7MYb4q/qhBarqZE6g= github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA= github.com/dimchansky/utfbom v1.1.0/go.mod h1:rO41eb7gLfo8SF1jd9F8HplJm1Fewwi4mQvIirEdv+8= github.com/dimchansky/utfbom v1.1.1 h1:vV6w1AhK4VMnhBno/TPVCoK9U/LP0PkLCS9tbxHdi/U= github.com/dimchansky/utfbom v1.1.1/go.mod h1:SxdoEBH5qIqFocHMyGOXVAybYJdr71b1Q/j0mACtrfE= github.com/distribution/reference v0.5.0 h1:/FUIFXtfc/x2gpa5/VGfiGLuOIdYa1t65IKK2OFGvA0= github.com/distribution/reference v0.5.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E= github.com/dlclark/regexp2 v1.4.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= github.com/dlclark/regexp2 v1.4.1-0.20201116162257-a2a8dda75c91/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= github.com/dlclark/regexp2 v1.7.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= github.com/dlclark/regexp2 v1.9.0 h1:pTK/l/3qYIKaRXuHnEnIf7Y5NxfRPfpb7dis6/gdlVI= github.com/dlclark/regexp2 v1.9.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E= github.com/dnaeon/go-vcr v1.1.0 h1:ReYa/UBrRyQdant9B4fNHGoCNKw6qh6P0fsdGmZpR7c= github.com/docker/cli v0.0.0-20190925022749-754388324470/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/cli v0.0.0-20191017083524-a8ff7f821017/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/cli v20.10.0-beta1.0.20201029214301-1d20b15adc38+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/cli v24.0.5+incompatible h1:WeBimjvS0eKdH4Ygx+ihVq1Q++xg36M/rMi4aXAvodc= github.com/docker/cli v24.0.5+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/distribution v0.0.0-20190905152932-14b96e55d84c/go.mod h1:0+TTO4EOBfRPhZXAeF1Vu+W3hHZ8eLp8PgKVZlcvtFY= github.com/docker/distribution v2.6.0-rc.1.0.20180327202408-83389a148052+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8= github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/docker v0.0.0-20200511152416-a93e9eb0e95c/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v1.4.2-0.20180531152204-71cd53e4a197/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v1.4.2-0.20190924003213-a8608b5b67c7/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v17.12.0-ce-rc1.0.20200730172259-9f28837c1d93+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v20.10.0-beta1.0.20201110211921-af34b94a78a1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker v24.0.0-rc.2.0.20230905130451-032797ea4bcb+incompatible h1:1UUPAB9PAPUbM10+qIKPL5tKZ+VAddWgbQUf+x1QBfI= github.com/docker/docker v24.0.0-rc.2.0.20230905130451-032797ea4bcb+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker-credential-helpers v0.6.3/go.mod h1:WRaJzqw3CTB9bk10avuGsjVBZsD05qeibJ1/TYlvc0Y= github.com/docker/docker-credential-helpers v0.7.0 h1:xtCHsjxogADNZcdv1pKUHXryefjlVRqWqIhk/uXJp0A= github.com/docker/docker-credential-helpers v0.7.0/go.mod h1:rETQfLdHNT3foU5kuNkFR1R1V12OJRRO5lzt2D1b5X0= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c h1:+pKlWGMw7gf6bQ+oDZB4KHQFypsfjYlq/C4rfL7D3g8= github.com/docker/go-events v0.0.0-20190806004212-e31b211e4f1c/go.mod h1:Uw6UezgYA44ePAFQYUehOuCzmy5zmg/+nl2ZfMWGkpA= github.com/docker/go-metrics v0.0.0-20180209012529-399ea8c73916/go.mod h1:/u0gXw0Gay3ceNrsHubL3BtdOL2fHf93USgMTe0W5dI= github.com/docker/go-metrics v0.0.1 h1:AgB/0SvBxihN0X8OR4SjsblXkbMvalQ8cjmtKQ2rQV8= github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw= github.com/docker/go-units v0.3.3/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/libnetwork v0.8.0-dev.2.0.20200917202933-d0951081b35f/go.mod h1:93m0aTqz6z+g32wla4l4WxTrdtvBRmVzYRkYvasA5Z8= github.com/docker/libtrust v0.0.0-20150114040149-fa567046d9b1/go.mod h1:cyGadeNEkKy96OOhEzfZl+yxihPEzKnqJwvfuSUqbZE= github.com/docker/spdystream v0.0.0-20160310174837-449fdfce4d96/go.mod h1:Qh8CwZgvJUkLughtfhJv5dyTYa91l1fOUCrgjqmcifM= github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3ebgob9U8Nd0kOddGdZWjyMGR8Wziv+TBNwSE= github.com/dop251/goja v0.0.0-20211022113120-dc8c55024d06/go.mod h1:R9ET47fwRVRPZnOGvHxxhuZcbrMCuiqOz3Rlrh4KSnk= github.com/dop251/goja v0.0.0-20230402114112-623f9dda9079 h1:xkbJGxVnk5sM8/LXeTKaBOfAZrI+iqvIPyH8oK1c6CQ= github.com/dop251/goja v0.0.0-20230402114112-623f9dda9079/go.mod h1:QMWlm50DNe14hD7t24KEqZuUdC9sOTy8W6XbCU1mlw4= github.com/dop251/goja_nodejs v0.0.0-20210225215109-d91c329300e7/go.mod h1:hn7BA7c8pLvoGndExHudxTDKZ84Pyvv+90pbBjbTz0Y= github.com/dop251/goja_nodejs v0.0.0-20211022123610-8dd9abb0616d/go.mod h1:DngW8aVqWbuLRMHItjPUyqdj+HWPvnQe8V8y1nDpIbM= github.com/dschmidt/go-layerfs v0.1.0 h1:jE6aHDfjNzS/31DS48th6EkmELwTa1Uf+aO4jRkBs3U= github.com/dschmidt/go-layerfs v0.1.0/go.mod h1:m62aff0hn23Q/tQBRiNSeLD7EUuimDvsuCvCpzBr3Gw= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/elazarl/goproxy v0.0.0-20170405201442-c4fc26588b6e/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/elazarl/goproxy v0.0.0-20180725130230-947c36da3153/go.mod h1:/Zj4wYkgs4iZTTu3o/KG3Itv/qCCa8VVMlb3i9OVuzc= github.com/elazarl/goproxy v0.0.0-20230808193330-2592e75ae04a h1:mATvB/9r/3gvcejNsXKSkQ6lcIaNec2nyfOdlTBR2lU= github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ= github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0= github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA= github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= github.com/fatih/color v1.15.0 h1:kOqh6YHBtK8aywxGerMG2Eq3H6Qgoqeo13Bk2Mv/nBs= github.com/fatih/color v1.15.0/go.mod h1:0h5ZqXfHYED7Bhv2ZJamyIOUej9KtShiJESRwBDUSsw= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/felixge/httpsnoop v1.0.3 h1:s/nj+GCswXYzN5v2DpNMuMQYe+0DDwt5WVCU6CWBdXk= github.com/felixge/httpsnoop v1.0.3/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= github.com/fogleman/ease v0.0.0-20170301025033-8da417bf1776 h1:VRIbnDWRmAh5yBdz+J6yFMF5vso1It6vn+WmM/5l7MA= github.com/fogleman/ease v0.0.0-20170301025033-8da417bf1776/go.mod h1:9wvnDu3YOfxzWM9Cst40msBF1C2UdQgDv962oTxSuMs= github.com/fortytw2/leaktest v1.2.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/garyburd/redigo v0.0.0-20150301180006-535138d7bcd7/go.mod h1:NR3MbYisc3/PwhQ00EMzDiPmrwpPxAn5GI05/YaO1SY= github.com/ghodss/yaml v0.0.0-20150909031657-73d445a93680/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/gliderlabs/ssh v0.3.5 h1:OcaySEmAQJgyYcArR+gGGTHCyE7nvhEMTlYY+Dp8CpY= github.com/go-critic/go-critic v0.4.1/go.mod h1:7/14rZGnZbY6E38VEGk2kVhoq6itzc1E68facVDK23g= github.com/go-critic/go-critic v0.4.3/go.mod h1:j4O3D4RoIwRqlZw5jJpx0BNfXWWbpcJoKu5cYSe4YmQ= github.com/go-fonts/liberation v0.2.0 h1:jAkAWJP4S+OsrPLZM4/eC9iW7CtHy+HBXrEwZXWo5VM= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 h1:+zs/tPmkDkHx3U66DAb0lQFJrpS6731Oaa12ikc+DiI= github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376/go.mod h1:an3vInlBmSxCcxctByoQdvwPiA7DTK7jaaFDBTtu0ic= github.com/go-git/go-billy/v5 v5.5.0 h1:yEY4yhzCDuMGSv83oGxiBotRzhwhNr8VZyphhiu+mTU= github.com/go-git/go-billy/v5 v5.5.0/go.mod h1:hmexnoNsr2SJU1Ju67OaNz5ASJY3+sHgFRpCtpDCKow= github.com/go-git/go-git-fixtures/v4 v4.3.2-0.20230305113008-0c11038e723f h1:Pz0DHeFij3XFhoBRGUDPzSJ+w2UcK5/0JvF8DRI58r8= github.com/go-git/go-git/v5 v5.9.0 h1:cD9SFA7sHVRdJ7AYck1ZaAa/yeuBvGPxwXDL8cxrObY= github.com/go-git/go-git/v5 v5.9.0/go.mod h1:RKIqga24sWdMGZF+1Ekv9kylsDz6LzdTSI2s/OsZWE0= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-ini/ini v1.25.4/go.mod h1:ByCAeIL28uOIIG0E3PJtZPDL8WnHpFKFOtgjp+3Ies8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-kit/log v0.2.0/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU= github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0= github.com/go-latex/latex v0.0.0-20210823091927-c0d11ff05a81 h1:6zl3BbBhdnMkpSj2YY30qV3gDcVBGtFgVsV3+/i+mKQ= github.com/go-lintpack/lintpack v0.5.2/go.mod h1:NwZuYi2nUHho8XEIZ6SIxihrnPoqBTDqfpXvXAN0sXM= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A= github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA= github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/go-ole/go-ole v1.2.1/go.mod h1:7FAglXiTm7HKlQRDeOQ6ZNUHidzCWXuZWq/1dTyBNF8= github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= github.com/go-openapi/jsonpointer v0.19.2/go.mod h1:3akKfEdA7DF1sugOqz1dVQHBcuDBPKZGEoHC/NkiQRg= github.com/go-openapi/jsonpointer v0.19.3/go.mod h1:Pl9vOtqEWErmShwVjC8pYs9cog34VGT37dQOVbmoatg= github.com/go-openapi/jsonreference v0.0.0-20160704190145-13c6e3589ad9/go.mod h1:W3Z9FmVs9qj+KR4zFKmDPGiLdk1D9Rlm7cyMvf57TTg= github.com/go-openapi/jsonreference v0.19.2/go.mod h1:jMjeRr2HHw6nAVajTXJ4eiUwohSTlpa0o73RUL1owJc= github.com/go-openapi/jsonreference v0.19.3/go.mod h1:rjx6GuL8TTa9VaixXglHmQmIL98+wF9xc8zWvFonSJ8= github.com/go-openapi/spec v0.0.0-20160808142527-6aced65f8501/go.mod h1:J8+jY1nAiCcj+friV/PDoE1/3eeccG9LYBs0tYvLOWc= github.com/go-openapi/spec v0.19.3/go.mod h1:FpwSN1ksY1eteniUU7X0N/BgJ7a4WvBFVA8Lj9mJglo= github.com/go-openapi/swag v0.0.0-20160704191624-1d0bd113de87/go.mod h1:DXUve3Dpr1UfpPtxFw+EFuQ41HhCWZfha5jSVRG7C7I= github.com/go-openapi/swag v0.19.2/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-openapi/swag v0.19.5/go.mod h1:POnQmlKehdgb5mhVOsnJFsivZCEZ/vjK9gh66Z9tfKk= github.com/go-pdf/fpdf v0.6.0 h1:MlgtGIfsdMEEQJr2le6b/HNr1ZlQwxyWr77r2aj2U/8= github.com/go-sourcemap/sourcemap v2.1.3+incompatible h1:W1iEw64niKVGogNgBN3ePyLFfuisuzeidWPMPWmECqU= github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.4.1/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w= github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-toolsmith/astcast v1.0.0/go.mod h1:mt2OdQTeAQcY4DQgPSArJjHCcOwlX+Wl/kwN+LbLGQ4= github.com/go-toolsmith/astcopy v1.0.0/go.mod h1:vrgyG+5Bxrnz4MZWPF+pI4R8h3qKRjjyvV/DSez4WVQ= github.com/go-toolsmith/astequal v0.0.0-20180903214952-dcb477bfacd6/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY= github.com/go-toolsmith/astequal v1.0.0/go.mod h1:H+xSiq0+LtiDC11+h1G32h7Of5O3CYFJ99GVbS5lDKY= github.com/go-toolsmith/astfmt v0.0.0-20180903215011-8f8ee99c3086/go.mod h1:mP93XdblcopXwlyN4X4uodxXQhldPGZbcEJIimQHrkg= github.com/go-toolsmith/astfmt v1.0.0/go.mod h1:cnWmsOAuq4jJY6Ct5YWlVLmcmLMn1JUPuQIHCY7CJDw= github.com/go-toolsmith/astinfo v0.0.0-20180906194353-9809ff7efb21/go.mod h1:dDStQCHtmZpYOmjRP/8gHHnCCch3Zz3oEgCdZVdtweU= github.com/go-toolsmith/astp v0.0.0-20180903215135-0af7e3c24f30/go.mod h1:SV2ur98SGypH1UjcPpCatrV5hPazG6+IfNHbkDXBRrk= github.com/go-toolsmith/astp v1.0.0/go.mod h1:RSyrtpVlfTFGDYRbrjyWP1pYu//tSFcvdYrA8meBmLI= github.com/go-toolsmith/pkgload v0.0.0-20181119091011-e9e65178eee8/go.mod h1:WoMrjiy4zvdS+Bg6z9jZH82QXwkcgCBX6nOfnmdaHks= github.com/go-toolsmith/pkgload v1.0.0/go.mod h1:5eFArkbO80v7Z0kdngIxsRXRMTaX4Ilcwuh3clNrQJc= github.com/go-toolsmith/strparse v1.0.0/go.mod h1:YI2nUKP9YGZnL/L1/DLFBfixrcjslWct4wyljWhSRy8= github.com/go-toolsmith/typep v1.0.0/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= github.com/go-toolsmith/typep v1.0.2/go.mod h1:JSQCQMUPdRlMZFswiq3TGpNp1GMktqkR2Ns5AIQkATU= github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b/go.mod h1:aUCEOzzezBEjDBbFBoSiya/gduyIiWYRP6CnSFIV8AM= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gofrs/flock v0.0.0-20190320160742-5135e617513b/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gofrs/flock v0.7.3/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.2.0/go.mod h1:Njal3psf3qN6dwBtQfUmBZh2ybovJ0tlu3o/AC7HYjU= github.com/gogo/googleapis v1.3.2/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/gogo/status v1.0.3/go.mod h1:SavQ51ycCLnc7dGyJxp8YAmudx8xqiVrRf+6IXRsugc= github.com/golang-jwt/jwt/v4 v4.1.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= github.com/golang-jwt/jwt/v4 v4.4.2 h1:rcc4lwaZgFMCZ5jxF9ABolDcIHdBytAFgqFPbSJQAYs= github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/glog v1.1.0 h1:/d3pCKDPWNnvIWe0vVUpNP32qc8U3PDVxySP/y360qE= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs= github.com/golang/protobuf v0.0.0-20161109072736-4bd1920723d7/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2/go.mod h1:k9Qvh+8juN+UKMCS/3jFtGICgW8O96FVaZsaxdzDkR4= github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a/go.mod h1:ryS0uhF+x9jgbj/N71xsEqODy9BN81/GonCZiOzirOk= github.com/golangci/errcheck v0.0.0-20181223084120-ef45e06d44b6/go.mod h1:DbHgvLiFKX1Sh2T1w8Q/h4NAI8MHIpzCdnBUDTXU3I0= github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613/go.mod h1:SyvUF2NxV+sN8upjjeVYr5W7tyxaT1JVtvhKhOn2ii8= github.com/golangci/goconst v0.0.0-20180610141641-041c5f2b40f3/go.mod h1:JXrF4TWy4tXYn62/9x8Wm/K/dm06p8tCKwFRDPZG/1o= github.com/golangci/gocyclo v0.0.0-20180528134321-2becd97e67ee/go.mod h1:ozx7R9SIwqmqf5pRP90DhR2Oay2UIjGuKheCBCNwAYU= github.com/golangci/gocyclo v0.0.0-20180528144436-0a533e8fa43d/go.mod h1:ozx7R9SIwqmqf5pRP90DhR2Oay2UIjGuKheCBCNwAYU= github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a/go.mod h1:9qCChq59u/eW8im404Q2WWTrnBUQKjpNYKMbU4M7EFU= github.com/golangci/golangci-lint v1.23.7/go.mod h1:g/38bxfhp4rI7zeWSxcdIeHTQGS58TCak8FYcyCmavQ= github.com/golangci/golangci-lint v1.27.0/go.mod h1:+eZALfxIuthdrHPtfM7w/R3POJLjHDfJJw8XZl9xOng= github.com/golangci/ineffassign v0.0.0-20190609212857-42439a7714cc/go.mod h1:e5tpTHCfVze+7EpLEozzMB3eafxo2KT5veNg1k6byQU= github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0/go.mod h1:66R6K6P6VWk9I95jvqGxkqJxVWGFy9XlDwLwVz1RCFg= github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca/go.mod h1:tvlJhZqDe4LMs4ZHD0oMUlt9G2LWuDGoisJTBzLMV9o= github.com/golangci/misspell v0.0.0-20180809174111-950f5d19e770/go.mod h1:dEbvlSfYbMQDtrpRMQU675gSDLDNa8sCPPChZ7PhiVA= github.com/golangci/misspell v0.3.5/go.mod h1:dEbvlSfYbMQDtrpRMQU675gSDLDNa8sCPPChZ7PhiVA= github.com/golangci/prealloc v0.0.0-20180630174525-215b22d4de21/go.mod h1:tf5+bzsHdTM0bsB7+8mt0GUMvjCgwLpTapNZHU8AajI= github.com/golangci/revgrep v0.0.0-20180526074752-d9c87f5ffaf0/go.mod h1:qOQCunEYvmd/TLamH+7LlVccLvUH5kZNhbCgTHoBbp4= github.com/golangci/revgrep v0.0.0-20180812185044-276a5c0a1039/go.mod h1:qOQCunEYvmd/TLamH+7LlVccLvUH5kZNhbCgTHoBbp4= github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4/go.mod h1:Izgrg8RkN3rCIMLGE9CyYmU9pY2Jer6DgANEnZ/L/cQ= github.com/google/btree v0.0.0-20180124185431-e89373fe6b4a/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/crfs v0.0.0-20191108021818-71d77da419c9/go.mod h1:etGhoOqfwPkooV6aqoX3eBGQOJblqdoc9XvWOeuxpPw= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-containerregistry v0.0.0-20191010200024-a3d713f9b7f8/go.mod h1:KyKXa9ciM8+lgMXwOVsXi7UxGrsf9mM61Mzs+xKUrKE= github.com/google/go-containerregistry v0.1.2/go.mod h1:GPivBPgdAyd2SU+vf6EpsgOtWDuPqjW0hJZt4rNdTZ4= github.com/google/go-containerregistry v0.15.2 h1:MMkSh+tjSdnmJZO7ljvEqV1DjfekB6VUEAZgy3a+TQE= github.com/google/go-containerregistry v0.15.2/go.mod h1:wWK+LnOv4jXMM23IT/F1wdYftGWGr47Is8CG+pmHK1Q= github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ= github.com/google/go-github/v28 v28.1.1/go.mod h1:bsqJWQX05omyWVmc00nEUql9mhQyv38lDZ8kPZcQVoM= github.com/google/go-github/v50 v50.2.0 h1:j2FyongEHlO9nxXLc+LP3wuBSVU9mVxfpdYUexMpIfk= github.com/google/go-github/v50 v50.2.0/go.mod h1:VBY8FB6yPIjrtKhozXv4FQupxKLS6H4m6xFZlT43q8Q= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/go-replayers/grpcreplay v0.1.0/go.mod h1:8Ig2Idjpr6gifRd6pNVggX6TC1Zw6Jx74AKp7QNH2QE= github.com/google/go-replayers/httpreplay v0.1.0/go.mod h1:YKZViNhiGgqdBlUbI2MwGpq4pXxNmhJLPHQ7cv2b5no= github.com/google/gofuzz v0.0.0-20161122191042-44d81051d367/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf/go.mod h1:HP5RmnzzSNb993RKQDq4+1A4ia9nllfqcQFTQJedwGI= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian v2.1.1-0.20190517191504-25dcb96d9e51+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20230207041349-798e818bf904/go.mod h1:uglQLonpP8qtYCYyzA+8c/9qtqgA3qsXGYqCPKARAFg= github.com/google/pprof v0.0.0-20230406165453-00490a63f317 h1:hFhpt7CTmR3DX+b4R19ydQFtofxT0Sv3QsKNMVQYTMQ= github.com/google/pprof v0.0.0-20230406165453-00490a63f317/go.mod h1:79YE0hCXdHag9sBkw2o+N/YnZtTkXi0UT9Nnixa5eYk= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/rpmpack v0.0.0-20191226140753-aa36bfddb3a0/go.mod h1:RaTPr0KUf2K7fnZYLNDrr8rxAamWs3iNywJLtQ2AzBg= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510/go.mod h1:pupxD2MaaD3pAXIBCelhxNneeOaAeabZDe5s4K6zSpQ= github.com/google/subcommands v1.0.1/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/wire v0.3.0/go.mod h1:i1DMg/Lu8Sz5yYl25iOdmc5CT5qusaa+zmRWs16741s= github.com/google/wire v0.4.0/go.mod h1:ngWDr9Qvq3yZA10YrxfyGELY/AFWGVpy9c1LTRi1EoU= github.com/googleapis/enterprise-certificate-proxy v0.0.0-20220520183353-fd19c99a87aa/go.mod h1:17drOmN3MwGY7t0e+Ei9b45FFGA3fBs3x36SsCg1hq8= github.com/googleapis/gax-go v2.0.0+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= github.com/googleapis/gax-go v2.0.2+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0= github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM= github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM= github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM= github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c= github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.2.2/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/gnostic v0.4.1/go.mod h1:LRhVm6pbyptWbWbuZ38d1eyptfvIytN3ir6b65WBswg= github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= github.com/gookit/color v1.2.4/go.mod h1:AhIE+pS6D4Ql0SQWbBeXPHw7gY0/sjHoA4s/n1KB7xg= github.com/gophercloud/gophercloud v0.1.0/go.mod h1:vxM41WHh5uqHVBMZHzuwNOHh8XEoIEcSTewFxm1c5g8= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/goreleaser/goreleaser v0.136.0/go.mod h1:wiKrPUeSNh6Wu8nUHxZydSOVQ/OZvOaO7DTtFqie904= github.com/goreleaser/nfpm v1.2.1/go.mod h1:TtWrABZozuLOttX2uDlYyECfQX7x5XYkVxhjYcR6G9w= github.com/goreleaser/nfpm v1.3.0/go.mod h1:w0p7Kc9TAUgWMyrub63ex3M2Mgw88M4GZXoTq5UCb40= github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg= github.com/gorilla/handlers v0.0.0-20150720190736-60c7bfde3e33/go.mod h1:Qkdc/uu4tH4g6mTK6auzZ766c4CA0Ng8+o/OAirnOIQ= github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs= github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So= github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gostaticanalysis/analysisutil v0.0.0-20190318220348-4088753ea4d3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= github.com/gostaticanalysis/analysisutil v0.0.3/go.mod h1:eEOZF4jCKGi+aprrirO9e7WKB3beBRtWgqGunKl6pKE= github.com/gotestyourself/gotestyourself v2.2.0+incompatible/go.mod h1:zZKM6oeNM8k+FRljX1mnzVYeS8wiGgQyvST1/GafPbY= github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= github.com/grpc-ecosystem/go-grpc-middleware v1.2.0/go.mod h1:mJzapYve32yjrKlk9GbyCZHuPgZsrbyIbyKhSzOpg6s= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw= github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y= github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.5.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= github.com/grpc-ecosystem/grpc-gateway v1.6.2/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw= github.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.2/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms= github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0/go.mod h1:YN5jB8ie0yfIUg6VvR9Kz84aCaG7AsGZnLjhHbUqwPg= github.com/grpc-ecosystem/grpc-opentracing v0.0.0-20180507213350-8e809c8a8645/go.mod h1:6iZfnjpejD4L/4DwD7NryNaJyCQdzwWwH2MWhCA90Kw= github.com/hanwen/go-fuse v1.0.0/go.mod h1:unqXarDXqzAk0rt98O2tVndEPIpUgLD9+rwFisZH3Ok= github.com/hanwen/go-fuse/v2 v2.0.3/go.mod h1:0EQM6aH2ctVpvZ6a+onrQ/vaykxh2GH7hy3e13vzTUY= github.com/hanwen/go-fuse/v2 v2.2.0 h1:jo5QZYmBLNcl9ovypWaQ5yXMSSV+Ch68xoC3rtZvvBM= github.com/hanwen/go-fuse/v2 v2.2.0/go.mod h1:B1nGE/6RBFyBRC1RRnf23UpwCdyJ31eukw34oAKukAc= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/errwrap v0.0.0-20141028054710-7554cd9344ce/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= github.com/hashicorp/go-hclog v1.2.0 h1:La19f8d7WIlm4ogzNHB0JGqs5AUDAZ2UfCY4sJXcJdM= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc= github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v0.0.0-20161216184304-ed905158d874/go.mod h1:JMRHfdO9jKNzS/+BTlxCjKNQHg/jZAft8U7LloJvN7I= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= github.com/hashicorp/go-retryablehttp v0.6.4/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= github.com/hashicorp/go-retryablehttp v0.6.6/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= github.com/hashicorp/go-retryablehttp v0.7.2 h1:AcYqCvkpalPnPF2pn0KamgwamS42TqUDDYFRKq/RAd0= github.com/hashicorp/go-retryablehttp v0.7.2/go.mod h1:Jy/gPYAdjqffZ/yFGCFV2doI5wjtH1ewM9u8iYVjtX8= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.3/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hashicorp/uuid v0.0.0-20160311170451-ebb0a03e909c/go.mod h1:fHzc09UnyJyqyW+bFuq864eh+wC7dj65aXmXLRe5to0= github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/iancoleman/strcase v0.3.0 h1:nTXanmYxhfFAMjZL34Ov6gkzEsSJZ5DbhxWjvSASxEI= github.com/iancoleman/strcase v0.3.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20220319035150-800ac71e25c2/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w= github.com/icholy/replace v0.6.0 h1:EBiD2pGqZIOJAbEaf/5GVRaD/Pmbb4n+K3LrBdXd4dw= github.com/icholy/replace v0.6.0/go.mod h1:zzi8pxElj2t/5wHHHYmH45D+KxytX/t4w3ClY5nlK+g= github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.9/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/in-toto/in-toto-golang v0.5.0 h1:hb8bgwr0M2hGdDsLjkJ3ZqJ8JFLL/tgYdAxF/XEFBbY= github.com/in-toto/in-toto-golang v0.5.0/go.mod h1:/Rq0IZHLV7Ku5gielPT4wPHJfH1GdHMCq8+WPxw8/BE= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/ishidawataru/sctp v0.0.0-20191218070446-00ab2ac2db07/go.mod h1:co9pwDoBCm1kGxawmb4sPq0cSIOOWNPT4KnHotMP1Zg= github.com/jackpal/gateway v1.0.7 h1:7tIFeCGmpyrMx9qvT0EgYUi7cxVW48a0mMvnIL17bPM= github.com/jackpal/gateway v1.0.7/go.mod h1:aRcO0UFKt+MgIZmRmvOmnejdDT4Y1DNiNOsSd1AcIbA= github.com/jaguilar/vt100 v0.0.0-20150826170717-2703a27b14ea/go.mod h1:QMdK4dGB3YhEW2BmA1wgGpPYI3HZy/5gD705PXKUVSg= github.com/jarcoal/httpmock v1.0.5/go.mod h1:ATjnClrvW/3tijVmpL/va5Z3aAyGvqU3gCT8nX0Txik= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU= github.com/jingyugao/rowserrcheck v0.0.0-20191204022205-72ab7603b68a/go.mod h1:xRskid8CManxVta/ALEhJha/pweKBaVG6fWgc0yH25s= github.com/jirfag/go-printf-func-name v0.0.0-20191110105641-45db9963cdd3/go.mod h1:HEWGJkRDzjJY2sqdDwxccsGicWEf9BQOZsq2tV+xzM0= github.com/jirfag/go-printf-func-name v0.0.0-20200119135958-7558a9eaa5af/go.mod h1:HEWGJkRDzjJY2sqdDwxccsGicWEf9BQOZsq2tV+xzM0= github.com/jmespath/go-jmespath v0.0.0-20160202185014-0b12d6b521d8/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20160803190731-bd40a432e4c7/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jmoiron/sqlx v1.2.1-0.20190826204134-d7d95172beb5/go.mod h1:1FEQNm3xlJgrMD+FBdI9+xvCksHtbpVBBw5dYhBSsks= github.com/joefitzgerald/rainbow-reporter v0.1.0/go.mod h1:481CNgqmVHQZzdIbN52CupLJyoVwB10FQ/IQlF1pdL8= github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jonboulle/clockwork v0.4.0 h1:p4Cf1aMWXnXAUh8lVfewRBx1zaTSYKrKMF2g3ST4RZ4= github.com/jonboulle/clockwork v0.4.0/go.mod h1:xgRqUGwRcjKCO1vbZUEtSLrqKoPSsUpK7fnezOII0kc= github.com/jpillora/backoff v0.0.0-20180909062703-3050d21c67d7/go.mod h1:2iMrUgbbvHEiQClaW2NsSzMyGHqN+rDFqY705q49KG0= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v0.0.0-20180701071628-ab8a2e0c74be/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/juju/ansiterm v1.0.0 h1:gmMvnZRq7JZJx6jkfSq9/+2LMrVEwGwt7UR6G+lmDEg= github.com/juju/ansiterm v1.0.0/go.mod h1:PyXUpnI3olx3bsPcHt98FGPX/KCFZ1Fi+hw1XLI6384= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/jung-kurt/gofpdf v1.0.0/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/jung-kurt/gofpdf v1.16.2 h1:jgbatWHfRlPYiK85qgevsZTHviWXKwB1TTiKdz5PtRc= github.com/jung-kurt/gofpdf v1.16.2/go.mod h1:1hl7y57EsiPAkLbOwzpzqgx1A30nQCk/YmFV8S2vmK0= github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.4.0/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/compress v1.16.5 h1:IFV2oUNUzZaz+XyusxpLzpzS8Pt5rh0Z16For/djlyI= github.com/klauspost/compress v1.16.5/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE= github.com/klauspost/cpuid v0.0.0-20180405133222-e7e905edc00e/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBFYa4= github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/koron-go/prefixw v1.0.0 h1:p7OC1ffZ/z+Miz0j/Ddt4fVYr8g4W9BKWkViAZ+1LmI= github.com/koron-go/prefixw v1.0.0/go.mod h1:WZvD0yrbCrkJD23tq03BhCu1ucn5ZenktcXt39QbPyk= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA= github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw= github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.1.1/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/logrusorgru/aurora v0.0.0-20181002194514-a7b3b318ed4e/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= github.com/lunixbochs/vtclean v1.0.0 h1:xu2sLAri4lGiovBDQKxl5mrXyESr3gUr5m5SM5+LVb8= github.com/lunixbochs/vtclean v1.0.0/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI= github.com/mackerelio/go-osstat v0.2.4 h1:qxGbdPkFo65PXOb/F/nhDKpF2nGmGaCFDLXoZjJTtUs= github.com/mackerelio/go-osstat v0.2.4/go.mod h1:Zy+qzGdZs3A9cuIqmgbJvwbmLQH9dJvtio5ZjJTbdlQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190614124828-94de47d64c63/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.0.0-20190626092158-b2ccc519800e/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mailru/easyjson v0.7.0/go.mod h1:KAzv3t3aY1NaHWoQz1+4F1ccyAH66Jk7yos7ldAVICs= github.com/maratori/testpackage v1.0.1/go.mod h1:ddKdw+XG0Phzhx8BFDTKgpWP4i7MpApTE5fXSKAqwDU= github.com/marstr/guid v1.1.0/go.mod h1:74gB1z2wpxxInTG6yaqA7KrtM0NZ+RbrcqDvYHefzho= github.com/matoous/godox v0.0.0-20190911065817-5d6d842e92eb/go.mod h1:1BELzlh859Sh1c6+90blK8lbYy0kwQf1bYlBhBysy1s= github.com/matryer/is v1.2.0 h1:92UTHpy8CDwaJ08GqLDzhhuixiBUUD1p3AU6PHddz4A= github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ= github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.10/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-ieproxy v0.0.0-20190610004146-91bb50d98149/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= github.com/mattn/go-ieproxy v0.0.0-20190702010315-6dee0af9227d/go.mod h1:31jz6HNzdxOmlERGGEc4v/dMssOfmp2p5bT/okiKFFc= github.com/mattn/go-ieproxy v0.0.1/go.mod h1:pYabZ6IHcRpFh7vIaLfK7rdcWgFEb3SFJ6/gNWuh88E= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-localereader v0.0.1 h1:ygSAOl7ZXTx4RdPYinUpg6W99U8jWvWi9Ye2JC/oIi4= github.com/mattn/go-localereader v0.0.1/go.mod h1:8fBrzywKY7BI3czFoHkuzRoWE9C+EiG4R1k4Cjx5p88= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mattn/go-shellwords v1.0.10/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lLtQsUlTZDWQ8Y= github.com/mattn/go-sqlite3 v1.9.0/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= github.com/mattn/go-zglob v0.0.1/go.mod h1:9fxibJccNxU2cnpIKLRRFA7zX7qhkJIQWBb449FYHOo= github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= github.com/maxbrunsfeld/counterfeiter/v6 v6.2.2/go.mod h1:eD9eIE7cdwcMi9rYluz88Jz2VyhSmden33/aXg4oVIY= github.com/mazznoer/csscolorparser v0.1.3 h1:vug4zh6loQxAUxfU1DZEu70gTPufDPspamZlHAkKcxE= github.com/mazznoer/csscolorparser v0.1.3/go.mod h1:Aj22+L/rYN/Y6bj3bYqO3N6g1dtdHtGfQ32xZ5PJQic= github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-ps v0.0.0-20190716172923-621e5597135b/go.mod h1:r1VsdOzOPt1ZSrGZWFoNhsAedKnEd6r9Np1+5blZCWk= github.com/mitchellh/go-spdx v0.1.0 h1:50JnVzkL3kWreQ5Qb4Pi3Qx9e+bbYrt8QglJDpfeBEs= github.com/mitchellh/go-spdx v0.1.0/go.mod h1:FFi4Cg1fBuN/JCtPtP8PEDmcBjvO3gijQVl28YjIBVQ= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= github.com/mitchellh/hashstructure v1.0.0/go.mod h1:QjSHrPWS+BGUVBYkbTZWEnOh3G1DutKwClXU/ABz6AQ= github.com/mitchellh/hashstructure/v2 v2.0.2 h1:vGKWl0YJqUNxE8d+h8f6NJLcCJrgbhC4NcD46KavDd4= github.com/mitchellh/hashstructure/v2 v2.0.2/go.mod h1:MG3aRVU/N29oo/V/IhBX8GR/zz4kQkprJgF2EVszyDE= github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.3.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQZAeMln+1tSwduZz7+Af5oFlKirV/MSYes2A= github.com/moby/buildkit v0.8.1/go.mod h1:/kyU1hKy/aYCuP39GZA9MaKioovHku57N6cqlKZIaiQ= github.com/moby/buildkit v0.13.0-beta1.0.20231011161957-86e25b3ad8c2 h1:tZXkMdj5mkYi92esqc8EtNuPePwhLKotK4w/CFpSZAM= github.com/moby/buildkit v0.13.0-beta1.0.20231011161957-86e25b3ad8c2/go.mod h1:oSHnUZH7sNtAFLyeN1syf46SuzMThKsCQaioNEqJVUk= github.com/moby/locker v1.0.1 h1:fOXqR41zeveg4fFODix+1Ch4mj/gT0NE1XJbp/epuBg= github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc= github.com/moby/patternmatcher v0.6.0 h1:GmP9lR19aU5GqSSFko+5pRqHi+Ohk1O69aFiKkVGiPk= github.com/moby/patternmatcher v0.6.0/go.mod h1:hDPoyOpDY7OrrMDLaYoY3hf52gNCR/YOUYxkhApJIxc= github.com/moby/sys/mount v0.1.0/go.mod h1:FVQFLDRWwyBjDTBNQXDlWnSFREqOo3OKX9aqhmeoo74= github.com/moby/sys/mount v0.1.1/go.mod h1:FVQFLDRWwyBjDTBNQXDlWnSFREqOo3OKX9aqhmeoo74= github.com/moby/sys/mount v0.3.3 h1:fX1SVkXFJ47XWDoeFW4Sq7PdQJnV2QIDZAqjNqgEjUs= github.com/moby/sys/mount v0.3.3/go.mod h1:PBaEorSNTLG5t/+4EgukEQVlAvVEc6ZjTySwKdqp5K0= github.com/moby/sys/mountinfo v0.1.0/go.mod h1:w2t2Avltqx8vE7gX5l+QiBKxODu2TX0+Syr3h52Tw4o= github.com/moby/sys/mountinfo v0.1.3/go.mod h1:w2t2Avltqx8vE7gX5l+QiBKxODu2TX0+Syr3h52Tw4o= github.com/moby/sys/mountinfo v0.4.0/go.mod h1:rEr8tzG/lsIZHBtN/JjGG+LMYx9eXgW2JI+6q0qou+A= github.com/moby/sys/mountinfo v0.6.2 h1:BzJjoreD5BMFNmD9Rus6gdd1pLuecOFPt8wC+Vygl78= github.com/moby/sys/mountinfo v0.6.2/go.mod h1:IJb6JQeOklcdMU9F5xQ8ZALD+CUr5VlGpwtX+VE0rpI= github.com/moby/sys/sequential v0.5.0 h1:OPvI35Lzn9K04PBbCLW0g4LcFAJgHsvXsRyewg5lXtc= github.com/moby/sys/sequential v0.5.0/go.mod h1:tH2cOOs5V9MlPiXcQzRC+eEyab644PWKGRYaaV5ZZlo= github.com/moby/sys/signal v0.7.0 h1:25RW3d5TnQEoKvRbEKUGay6DCQ46IxAVTT9CUMgmsSI= github.com/moby/sys/signal v0.7.0/go.mod h1:GQ6ObYZfqacOwTtlXvcmh9A26dVRul/hbOZn88Kg8Tg= github.com/moby/term v0.0.0-20200915141129-7f0af18e79f2/go.mod h1:TjQg8pa4iejrUrjiz0MCtMV38jdMNW4doKSiBrEvCQQ= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180320133207-05fbef0ca5da/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= github.com/mozilla/tls-observatory v0.0.0-20190404164649-a3c1b6cfecfd/go.mod h1:SrKMQvPiws7F7iqYp8/TX+IhxCYhzr6N/1yb8cwHsGk= github.com/mozilla/tls-observatory v0.0.0-20200317151703-4fa42e1c2dee/go.mod h1:SrKMQvPiws7F7iqYp8/TX+IhxCYhzr6N/1yb8cwHsGk= github.com/mrunalp/fileutils v0.0.0-20200520151820-abd8a0e76976/go.mod h1:x8F1gnqOkIEiO4rqoeEEEqQbo7HjGMTvyoq3gej4iT0= github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 h1:ZK8zHtRHOkbHy6Mmr5D264iyp3TiX5OmNcI5cIARiQI= github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6/go.mod h1:CJlz5H+gyd6CUWT45Oy4q24RdLyn7Md9Vj2/ldJBSIo= github.com/muesli/cancelreader v0.2.2 h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELUXHmA= github.com/muesli/cancelreader v0.2.2/go.mod h1:3XuTXfFS2VjM+HTLZY9Ak0l6eUKfijIfMUZ4EgX0QYo= github.com/muesli/reflow v0.3.0 h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s= github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKtnHY/8= github.com/muesli/termenv v0.15.2 h1:GohcuySI0QmI3wN8Ok9PtKGkgkFIk7y6Vpb5PvrY+Wo= github.com/muesli/termenv v0.15.2/go.mod h1:Epx+iuz8sNs7mNKhxzH4fWXGNpZwUaJKRS1noLXviQ8= github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/nakabonne/nestif v0.3.0/go.mod h1:dI314BppzXjJ4HsCnbo7XzrJHPszZsjnk5wEBSYHI2c= github.com/nbutton23/zxcvbn-go v0.0.0-20180912185939-ae427f1e4c1d/go.mod h1:o96djdrsSGy3AWPyBgZMAGfxZNfgntdJG+11KU4QvbU= github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.8.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= github.com/onsi/ginkgo/v2 v2.1.3 h1:e/3Cwtogj0HA+25nMP1jCMDIf8RtRYbGwGGuBIFztkc= github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.8.1/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.0.0/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= github.com/opencontainers/image-spec v1.1.0-rc3 h1:fzg1mXZFj8YdPeNkRXMg+zb88BFV0Ys52cJydRwBkb8= github.com/opencontainers/image-spec v1.1.0-rc3/go.mod h1:X4pATf0uXsnn3g5aiGIsVnJBR4mxhKzfwmvK/B2NTm8= github.com/opencontainers/runc v0.0.0-20190115041553-12f6a991201f/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/opencontainers/runc v1.0.0-rc10/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U= github.com/opencontainers/runc v1.0.0-rc92/go.mod h1:X1zlU4p7wOlX4+WRCz+hvlRv8phdL7UqbYD+vQwNMmE= github.com/opencontainers/runc v1.1.9 h1:XR0VIHTGce5eWPkaPesqTBrhW2yAcaraWfsEalNwQLM= github.com/opencontainers/runc v1.1.9/go.mod h1:CbUumNnWCuTGFukNXahoo/RFBZvDAgRh/smNYNOhA50= github.com/opencontainers/runtime-spec v0.1.2-0.20190507144316-5b71a03e2700/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.0.1/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.0.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.0.3-0.20200728170252-4d89ac9fbff6/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-spec v1.1.0-rc.2 h1:ucBtEms2tamYYW/SvGpvq9yUN0NEVL6oyLEwDcTSrk8= github.com/opencontainers/runtime-spec v1.1.0-rc.2/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= github.com/opencontainers/runtime-tools v0.0.0-20181011054405-1d69bd0f9c39/go.mod h1:r3f7wjNzSs2extwzU3Y+6pKfobzPh+kKFJ3ofN+3nfs= github.com/opencontainers/selinux v1.6.0/go.mod h1:VVGKuOLlE7v4PJyT6h7mNWvq1rzqiriPsEqVhc+svHE= github.com/opencontainers/selinux v1.11.0 h1:+5Zbo97w3Lbmb3PeqQtpmTkMwsW5nRI3YaLpt7tQ7oU= github.com/opencontainers/selinux v1.11.0/go.mod h1:E5dMC3VPuVvVHDYmi78qvhJp8+M586T4DlDRYpFkyec= github.com/opentracing-contrib/go-grpc v0.0.0-20180928155321-4b5a12d3ff02/go.mod h1:JNdpVEzCpXBgIiv4ds+TzhN1hrtxq6ClLrTlT9OQRSc= github.com/opentracing-contrib/go-stdlib v0.0.0-20190519235532-cf7a6c988dc9/go.mod h1:PLldrQSroqzH70Xl+1DQcGnefIbqsKR7UDaiux3zV+w= github.com/opentracing-contrib/go-stdlib v1.0.0/go.mod h1:qtI1ogk+2JhVPIXVc6q+NHziSmy2W5GbdQZFUHADCBU= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= github.com/openzipkin/zipkin-go v0.1.3/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8= github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= github.com/package-url/packageurl-go v0.1.1-0.20220428063043-89078438f170 h1:DiLBVp4DAcZlBVBEtJpNWZpZVq0AEeCY7Hqk8URVs4o= github.com/package-url/packageurl-go v0.1.1-0.20220428063043-89078438f170/go.mod h1:uQd4a7Rh3ZsVg5j0lNyAfyxIeGde9yrlhjF78GzeW0c= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml v1.8.0/go.mod h1:D6yutnOGMveHEPV7VQOuvI/gXY61bv+9bAOTRnLElKs= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/peterbourgon/diskv v2.0.1+incompatible/go.mod h1:uqqh8zWWbv1HBMNONnaR/tNboyR3/BZd58JJSHlUSCU= github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d/go.mod h1:3OzsM7FXDQlpCiw2j81fOmAwQLnZnLGXVKUzeKQXIAw= github.com/phpdave11/gofpdi v1.0.7/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI= github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1-0.20171018195549-f15c970de5b7/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/profile v1.5.0 h1:042Buzk+NhDI+DeSAA62RwJL8VAuZUMQZUjCsRz1Mug= github.com/pkg/profile v1.5.0/go.mod h1:qBsxPvzyUincmltOk6iyRVxHYg4adc0OFOv72ZdLa18= github.com/pmezard/go-difflib v0.0.0-20151028094244-d8ed2627bdf0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= github.com/prometheus/client_golang v0.0.0-20180209125602-c332b6f63c06/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_golang v1.12.1/go.mod h1:3Z9XVyYiZYEO+YQWt3RD2R3jrbd179Rt297l4aS6nDY= github.com/prometheus/client_golang v1.13.0/go.mod h1:vTeo+zgvILHsnnj/39Ou/1fPN5nJFOEMgftOUOmlvYQ= github.com/prometheus/client_golang v1.14.0 h1:nJdhIvne2eSX/XRAFV9PcvFFRbrjbcTUj0VP62TMhnw= github.com/prometheus/client_golang v1.14.0/go.mod h1:8vpkKitgIVNcqrRBWh1C4TIUQgYNtG/XQE4E/Zae36Y= github.com/prometheus/client_model v0.0.0-20171117100541-99fa1f4be8e5/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/prometheus/client_model v0.3.0 h1:UBgGFHqYdG/TPFD1B1ogZywDqEkwp3fBMvqdiQ7Xew4= github.com/prometheus/client_model v0.3.0/go.mod h1:LDGWKZIo7rky3hgvBe+caln+Dr3dPggB5dvjtD7w9+w= github.com/prometheus/common v0.0.0-20180110214958-89604d197083/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA= github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI1YM= github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc= github.com/prometheus/exporter-toolkit v0.8.2/go.mod h1:00shzmJL7KxcsabLWcONwpyNEuWhREOnFqZW7vadFS0= github.com/prometheus/procfs v0.0.0-20180125133057-cb4147076ac7/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.0-20190522114515-bc1a522cf7b1/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= github.com/prometheus/procfs v0.0.5/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/psanford/memfs v0.0.0-20230130182539-4dbf7e3e865e h1:51xcRlSMBU5rhM9KahnJGfEsBPVPz3182TgFRowA8yY= github.com/psanford/memfs v0.0.0-20230130182539-4dbf7e3e865e/go.mod h1:tcaRap0jS3eifrEEllL6ZMd9dg8IlDpi2S1oARrQ+NI= github.com/quasilyte/go-consistent v0.0.0-20190521200055-c6f3937de18c/go.mod h1:5STLWrekHfjyYwxBRVRXNOSewLJ3PWfDJd1VyTS21fI= github.com/quasilyte/go-ruleguard v0.1.2-0.20200318202121-b00d7a75d3d8/go.mod h1:CGFX09Ci3pq9QZdj86B+VGIdNj4VyCo2iPOGS9esB/k= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/remyoudompheng/bigfft v0.0.0-20170806203942-52369c62f446/go.mod h1:uYEyJGbgTkfkS4+E/PavXkNJcbFIpEtjt2B0KDQ5+9M= github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.1.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.5.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M= github.com/rs/cors v1.10.0 h1:62NOS1h+r8p1mW6FM0FSB0exioXLhd/sh15KpjWBZ+8= github.com/rs/cors v1.10.0/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/zerolog v1.30.0 h1:SymVODrcRsaRaSInD9yQtKbtWqwsfoPcRff/oRXLj4c= github.com/rs/zerolog v1.30.0/go.mod h1:/tk+P47gFdPXq4QYjvCmT5/Gsug2nagsFWBWhAiSi1w= github.com/rubiojr/go-vhd v0.0.0-20160810183302-0bfd3b39853c/go.mod h1:DM5xW0nvfNNm2uytzsvhI3OnX8uzaRAg8UX/CnDqbto= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w= github.com/ryancurrah/gomodguard v1.0.4/go.mod h1:9T/Cfuxs5StfsocWr4WzDL36HqnX0fVb9d5fSEaLhoE= github.com/ryancurrah/gomodguard v1.1.0/go.mod h1:4O8tr7hBODaGE6VIhfJDHcwzh5GUccKSJBU0UMXJFVM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= github.com/sassoftware/go-rpmutils v0.0.0-20190420191620-a8f1baeba37b/go.mod h1:am+Fp8Bt506lA3Rk3QCmSqmYmLMnPDhdDUcosQCAx+I= github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/sclevine/spec v1.2.0/go.mod h1:W4J29eT/Kzv7/b9IWLB055Z+qvVC9vt0Arko24q7p+U= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/sebdah/goldie/v2 v2.5.3 h1:9ES/mNN+HNUbNWpVAlrzuZ7jE+Nrczbj8uFRjM7624Y= github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= github.com/secure-systems-lab/go-securesystemslib v0.4.0 h1:b23VGrQhTA8cN2CbBw7/FulN9fTtqYUdS5+Oxzt+DUE= github.com/secure-systems-lab/go-securesystemslib v0.4.0/go.mod h1:FGBZgq2tXWICsxWQW1msNf49F0Pf2Op5Htayx335Qbs= github.com/securego/gosec v0.0.0-20200103095621-79fbf3af8d83/go.mod h1:vvbZ2Ae7AzSq3/kywjUDxSNq2SJ27RxCz2un0H3ePqE= github.com/securego/gosec v0.0.0-20200401082031-e946c8c39989/go.mod h1:i9l/TNj+yDFh9SZXUTvspXTjbFXgZGP/UvhU1S65A4A= github.com/securego/gosec/v2 v2.3.0/go.mod h1:UzeVyUXbxukhLeHKV3VVqo7HdoQR9MrRfFmZYotn8ME= github.com/sercand/kuberesolver v2.4.0+incompatible/go.mod h1:lWF3GL0xptCB/vCiJPl/ZshwPsX/n4Y7u0CW9E7aQIQ= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8= github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I= github.com/serialx/hashring v0.0.0-20190422032157-8b2912629002/go.mod h1:/yeG0My1xr/u+HZrFQ1tOQQQQrOawfyMUH13ai5brBc= github.com/shibumi/go-pathspec v1.3.0 h1:QUyMZhFo0Md5B8zV8x2tesohbb5kfbpTi9rBnKh5dkI= github.com/shibumi/go-pathspec v1.3.0/go.mod h1:Xutfslp817l2I1cZvgcfeMQJG5QnU2lh5tVaaMCl3jE= github.com/shirou/gopsutil v0.0.0-20190901111213-e4ec7b275ada/go.mod h1:WWnYX4lzhCH5h/3YBfyVA3VbLYjlMZZAQcW9ojMexNc= github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4/go.mod h1:qsXQc7+bwAM3Q1u/4XEfrquwF8Lw7D7y5cD8CuHnfIc= github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= github.com/shurcooL/graphql v0.0.0-20220606043923-3cf50f8a0a29 h1:B1PEwpArrNp4dkQrfxh/abbBAOZBVp0ds+fBEOUOqOc= github.com/shurcooL/graphql v0.0.0-20220606043923-3cf50f8a0a29/go.mod h1:AuYgA5Kyo4c7HfUmvRGs/6rGlMMV/6B1bVnB9JxJEEg= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.0.4-0.20170822132746-89742aefa4b2/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/skeema/knownhosts v1.2.0 h1:h9r9cf0+u7wSE+M183ZtMGgOJKiL96brpaz5ekfJCpM= github.com/skeema/knownhosts v1.2.0/go.mod h1:g4fPeYpque7P0xefxtGzV81ihjC8sX2IqpAoNkjxbMo= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/assertions v1.0.0/go.mod h1:kHHU4qYBaI3q23Pp3VPrmWhuIUrLW/7eUrw0BU5VaoM= github.com/smartystreets/go-aws-auth v0.0.0-20180515143844-0c1422d1fdb9/go.mod h1:SnhjPscd9TpLiy1LpzGSKh3bXCfxxXuqd9xmQJy3slM= github.com/smartystreets/goconvey v0.0.0-20190330032615-68dc04aab96a/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/smartystreets/gunit v1.0.0/go.mod h1:qwPWnhz6pn0NnRBP++URONOVyNkPyr4SauJk4cUOwJs= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= github.com/sourcegraph/go-diff v0.5.1/go.mod h1:j2dHj3m8aZgQO8lMTcTnBcXkRRRqi34cd2MNlA9u1mE= github.com/sourcegraph/go-diff v0.5.3/go.mod h1:v9JDtjCE4HHHCZGId75rg8gkKKa98RVjBcBGsVmMmak= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spdx/gordf v0.0.0-20201111095634-7098f93598fb/go.mod h1:uKWaldnbMnjsSAXRurWqqrdyZen1R7kxl8TkmWk2OyM= github.com/spdx/tools-golang v0.5.1 h1:fJg3SVOGG+eIva9ZUBm/hvyA7PIPVFjRxUKe6fdAgwE= github.com/spdx/tools-golang v0.5.1/go.mod h1:/DRDQuBfB37HctM29YtrX1v+bXiVmT2OpQDalRmX9aU= github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= github.com/spf13/afero v1.2.2/go.mod h1:9ZxEEn6pIJ8Rxe320qSDBk6AsU0r9pR7Q4OcevTdifk= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRMrb0= github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= github.com/spf13/viper v1.6.1/go.mod h1:t3iDnF5Jlj76alVNuyFBk5oUMCvsrkbvZK0WQdfDi5k= github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/stretchr/objx v0.0.0-20180129172003-8a3f7159479f/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c= github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v0.0.0-20151208002404-e3a8ff8ce365/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v0.0.0-20180303142811-b89eecf5ca5d/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA= github.com/tdakkota/asciicheck v0.0.0-20200416190851-d7f85be797a2/go.mod h1:yHp0ai0Z9gUljN3o0xMhYJnH/IcvkdTBOX2fmJ93JEM= github.com/tdakkota/asciicheck v0.0.0-20200416200610-e657995f937b/go.mod h1:yHp0ai0Z9gUljN3o0xMhYJnH/IcvkdTBOX2fmJ93JEM= github.com/tetafro/godot v0.3.7/go.mod h1:/7NLHhv08H1+8DNj0MElpAACw1ajsCuf3TKNQxA5S+0= github.com/tetafro/godot v0.4.2/go.mod h1:/7NLHhv08H1+8DNj0MElpAACw1ajsCuf3TKNQxA5S+0= github.com/tidwall/gjson v1.15.0 h1:5n/pM+v3r5ujuNl4YLZLsQ+UE5jlkLVm7jMzT5Mpolw= github.com/tidwall/gjson v1.15.0/go.mod h1:/wbyibRr2FHMks5tjHJ5F8dMZh3AcwJEMf5vlfC0lxk= github.com/tidwall/match v1.1.1 h1:+Ho715JplO36QYgwN9PGYNhgZvoUSc9X2c80KVTi+GA= github.com/tidwall/match v1.1.1/go.mod h1:eRSPERbgtNPcGhD8UCthc6PmLEQXEWd3PRB5JTxsfmM= github.com/tidwall/pretty v1.2.0 h1:RWIZEg2iJ8/g6fDDYzMpobmaoGh5OLl4AXtGUGPcqCs= github.com/tidwall/pretty v1.2.0/go.mod h1:ITEVvHYasfjBbM0u2Pg8T2nJnzm8xPwvNhhsoaGGjNU= github.com/timakin/bodyclose v0.0.0-20190930140734-f7f2e9bca95e/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk= github.com/timakin/bodyclose v0.0.0-20200424151742-cb6215831a94/go.mod h1:Qimiffbc6q9tBWlVV6x0P9sat/ao1xEkREYPPj9hphk= github.com/tj/assert v0.0.0-20171129193455-018094318fb0/go.mod h1:mZ9/Rh9oLWpLLDRpvE+3b7gP/C2YyLFYxNmcLnPTMe0= github.com/tj/go-elastic v0.0.0-20171221160941-36157cbbebc2/go.mod h1:WjeM0Oo1eNAjXGDx2yma7uG2XoyRZTq1uv3M/o7imD0= github.com/tj/go-kinesis v0.0.0-20171128231115-08b17f58cb1b/go.mod h1:/yhzCV0xPfx6jb1bBgRFjl5lytqVqZXEaeqWP8lTEao= github.com/tj/go-spin v1.1.0/go.mod h1:Mg1mzmePZm4dva8Qz60H2lHwmJ2loum4VIrLgVnKwh4= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tommy-muehle/go-mnd v1.1.1/go.mod h1:dSUh0FtTP8VhvkL1S+gUR1OKd9ZnSaozuI6r3m6wOig= github.com/tommy-muehle/go-mnd v1.3.1-0.20200224220436-e6f9a994e8fa/go.mod h1:dSUh0FtTP8VhvkL1S+gUR1OKd9ZnSaozuI6r3m6wOig= github.com/tonistiigi/fsutil v0.0.0-20201103201449-0834f99b7b85/go.mod h1:a7cilN64dG941IOXfhJhlH0qB92hxJ9A1ewrdUmJ6xo= github.com/tonistiigi/fsutil v0.0.0-20230629203738-36ef4d8c0dbb h1:uUe8rNyVXM8moActoBol6Xf6xX2GMr7SosR2EywMvGg= github.com/tonistiigi/fsutil v0.0.0-20230629203738-36ef4d8c0dbb/go.mod h1:SxX/oNQ/ag6Vaoli547ipFK9J7BZn5JqJG0JE8lf8bA= github.com/tonistiigi/go-actions-cache v0.0.0-20220404170428-0bdeb6e1eac7 h1:8eY6m1mjgyB8XySUR7WvebTM8D/Vs86jLJzD/Tw7zkc= github.com/tonistiigi/go-actions-cache v0.0.0-20220404170428-0bdeb6e1eac7/go.mod h1:qqvyZqkfwkoJuPU/bw61bItaoO0SJ8YSW0vSVRRvsRg= github.com/tonistiigi/go-archvariant v1.0.0 h1:5LC1eDWiBNflnTF1prCiX09yfNHIxDC/aukdhCdTyb0= github.com/tonistiigi/go-archvariant v1.0.0/go.mod h1:TxFmO5VS6vMq2kvs3ht04iPXtu2rUT/erOnGFYfk5Ho= github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea h1:SXhTLE6pb6eld/v/cCndK0AMpt1wiVFb/YYmqB3/QG0= github.com/tonistiigi/units v0.0.0-20180711220420-6950e57a87ea/go.mod h1:WPnis/6cRcDZSUvVmezrxJPkiO87ThFYsoUiMwWNDJk= github.com/tonistiigi/vt100 v0.0.0-20230623042737-f9a4f7ef6531 h1:Y/M5lygoNPKwVNLMPXgVfsRT40CSFKXCxuU8LoHySjs= github.com/tonistiigi/vt100 v0.0.0-20230623042737-f9a4f7ef6531/go.mod h1:ulncasL3N9uLrVann0m+CDlJKWsIAP34MPcOJF6VRvc= github.com/uber/jaeger-client-go v2.25.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= github.com/uber/jaeger-client-go v2.28.0+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk= github.com/uber/jaeger-lib v2.2.0+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6+uUTzImX/AauajbLI56U= github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ulikunitz/xz v0.5.6/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4ABRW8= github.com/ulikunitz/xz v0.5.7/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/ultraware/funlen v0.0.2/go.mod h1:Dp4UiAus7Wdb9KUZsYWZEWiRzGuM2kXM1lPbfaF6xhA= github.com/ultraware/whitespace v0.0.4/go.mod h1:aVMh/gQve5Maj9hQ/hg+F75lr/X5A89uZnzAmWSineA= github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/urfave/cli v1.22.12 h1:igJgVw1JdKH+trcLWLeLwZjU9fEfPesQ+9/e4MQ44S8= github.com/urfave/cli v1.22.12/go.mod h1:sSBEIC79qR6OvcmsD4U3KABeOTxDqQtdDnaFuUN30b8= github.com/uudashr/gocognit v1.0.1/go.mod h1:j44Ayx2KW4+oB6SWMv8KsmHzZrOInQav7D3cQMJ5JUM= github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= github.com/valyala/fasthttp v1.2.0/go.mod h1:4vX61m6KN+xDduDNwXrhIAVZaZaZiQ1luJk8LWSxF3s= github.com/valyala/quicktemplate v1.2.0/go.mod h1:EH+4AkTd43SvgIbQHYu59/cJyxDoOVRUAfrukLPuGJ4= github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio= github.com/vbatts/tar-split v0.11.3 h1:hLFqsOLQ1SsppQNTMpkpPXClLDfC2A3Zgy9OUU+RVck= github.com/vbatts/tar-split v0.11.3/go.mod h1:9QlHN18E+fEH7RdG+QAJJcuya3rqT7eXSTY7wGrAokY= github.com/vdemeester/k8s-pkg-credentialprovider v1.17.4/go.mod h1:inCTmtUdr5KJbreVojo06krnTgaeAz/Z7lynpPk/Q2c= github.com/vektah/gqlparser/v2 v2.5.6 h1:Ou14T0N1s191eRMZ1gARVqohcbe1e8FrcONScsq8cRU= github.com/vektah/gqlparser/v2 v2.5.6/go.mod h1:z8xXUff237NntSuH8mLFijZ+1tjV1swDbpDqjJmk6ME= github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= github.com/vito/midterm v0.1.4 h1:SALq5mQ+AgzeZxjL4loB6Uk5TZc9JMyX2ELA/NVH65c= github.com/vito/midterm v0.1.4/go.mod h1:Mm3u6lrpzo2EFSJbwksKOdottTJzYePK8c1KJy4aRbk= github.com/vito/progrock v0.10.2-0.20230913234310-64b4a1cfb007 h1:RMNnjVKSImroyzJMINdkfNmlxFiBLGP30tjBH4GYgBE= github.com/vito/progrock v0.10.2-0.20230913234310-64b4a1cfb007/go.mod h1:ysw2W2gc20Snmlc0a34JbWO45HPM0oXO8IC59hyFc3k= github.com/vmware/govmomi v0.20.3/go.mod h1:URlwyTFZX72RmxtxuaFL2Uj3fD1JTvZdx59bHWk6aFU= github.com/weaveworks/common v0.0.0-20230119144549-0aaa5abd1e63 h1:qZcnPZbiX8gGs3VmipVc3ft29vPYBZzlox/04Von6+k= github.com/weaveworks/common v0.0.0-20230119144549-0aaa5abd1e63/go.mod h1:KoQ+3z63GUJzQ7AhU0AWQNU+LPda2EwL/cx1PlbDzVQ= github.com/weaveworks/promrus v1.2.0 h1:jOLf6pe6/vss4qGHjXmGz4oDJQA+AOCqEL3FvvZGz7M= github.com/weaveworks/promrus v1.2.0/go.mod h1:SaE82+OJ91yqjrE1rsvBWVzNZKcHYFtMUyS1+Ogs/KA= github.com/willf/bitset v1.1.11-0.20200630133818-d5bec3311243/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= github.com/xanzy/go-gitlab v0.31.0/go.mod h1:sPLojNBn68fMUWSxIJtdVVIP8uSBYqesTfDUseX11Ug= github.com/xanzy/go-gitlab v0.32.0/go.mod h1:sPLojNBn68fMUWSxIJtdVVIP8uSBYqesTfDUseX11Ug= github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ= github.com/xeipuuv/gojsonschema v0.0.0-20180618132009-1d523034197f/go.mod h1:5yf86TLmAcydyeJq5YvxkGPE2fm/u4myDekKRoLuqhs= github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8/go.mod h1:HUYIGzjTL3rfEspMxjDjgmT5uz5wzYJKVo23qUhYTos= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yuin/goldmark v1.5.4 h1:2uY/xC0roWy8IBEGLgB1ywIoEJFGmRrX21YQcvGZzjU= github.com/yuin/goldmark v1.5.4/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs= github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA= github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg= github.com/zeebo/assert v1.3.0 h1:g7C04CbJuIDKNPFHmsk4hwZDO5O+kntRxzaUoNXj+IQ= github.com/zeebo/xxh3 v1.0.2 h1:xZmwmqxHZA8AI603jOQ0tMqmBr9lPeFwGg6d+xy9DC0= github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA= github.com/zmb3/spotify/v2 v2.3.1 h1:aEyIPotROM3JJjHMCImFROgnPIUpzVo8wymYSaPSd9w= github.com/zmb3/spotify/v2 v2.3.1/go.mod h1:+LVh9CafHu7SedyqYmEf12Rd01dIVlEL845yNhksW0E= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ= go.etcd.io/bbolt v1.3.7/go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= go.opencensus.io v0.15.0/go.mod h1:UffZAU+4sDEINUGP/B7UfBBkq4fqLu9zXAX7ke6CHW0= go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA= go.opencensus.io v0.19.1/go.mod h1:gug0GbSHa8Pafr0d2urOSgoXHZ6x/RUlaiT0d9pqb4A= go.opencensus.io v0.19.2/go.mod h1:NO/8qkisMZLZ1FCsKNqtJPwc8/TaclWyY0B6wcYNg9M= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.45.0 h1:RsQi0qJ2imFfCvZabqzM9cNXBG8k6gXMv1A0cXRmH6A= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.45.0/go.mod h1:vsh3ySueQCiKPxFLvjWC4Z135gIa34TQ/NSqkDTZYUM= go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.45.0 h1:2ea0IkZBsWH+HA2GkD+7+hRw2u97jzdFyRtXuO14a1s= go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.45.0/go.mod h1:4m3RnBBb+7dB9d21y510oO1pdB1V4J6smNf14WXcBFQ= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0 h1:x8Z78aZx8cOF0+Kkazoc7lwUNMGy0LrzEMxTm4BbTxg= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.45.0/go.mod h1:62CPTSry9QZtOaSsE3tOzhx6LzDhHnXJ6xHeMNNiM6Q= go.opentelemetry.io/otel v1.19.0 h1:MuS/TNf4/j4IXsZuJegVzI1cwut7Qc00344rgH7p8bs= go.opentelemetry.io/otel v1.19.0/go.mod h1:i0QyjOq3UPoTzff0PJB2N66fb4S0+rSbSB15/oyH9fY= go.opentelemetry.io/otel/exporters/jaeger v1.17.0 h1:D7UpUy2Xc2wsi1Ras6V40q806WM07rqoCWzXu7Sqy+4= go.opentelemetry.io/otel/exporters/jaeger v1.17.0/go.mod h1:nPCqOnEH9rNLKqH/+rrUjiMzHJdV1BlpKcTwRTyKkKI= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0 h1:Mne5On7VWdx7omSrSSZvM4Kw7cS7NQkOOmLcgscI51U= go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.19.0/go.mod h1:IPtUMKL4O3tH5y+iXVyAXqpAwMuzC1IrxVS81rummfE= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0 h1:3d+S281UTjM+AbF31XSOYn1qXn3BgIdWl8HNEpx08Jk= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.19.0/go.mod h1:0+KuTDyKL4gjKCF75pHOX4wuzYDUZYfAQdSu43o+Z2I= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0 h1:IeMeyr1aBvBiPVYihXIaeIZba6b8E1bYp7lbdxK8CQg= go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.19.0/go.mod h1:oVdCUtjq9MK9BlS7TtucsQwUcXcymNiEDjgDD2jMtZU= go.opentelemetry.io/otel/metric v1.19.0 h1:aTzpGtV0ar9wlV4Sna9sdJyII5jTVJEvKETPiOKwvpE= go.opentelemetry.io/otel/metric v1.19.0/go.mod h1:L5rUsV9kM1IxCj1MmSdS+JQAcVm319EUrDVLrt7jqt8= go.opentelemetry.io/otel/sdk v1.19.0 h1:6USY6zH+L8uMH8L3t1enZPR3WFEmSTADlqldyHtJi3o= go.opentelemetry.io/otel/sdk v1.19.0/go.mod h1:NedEbbS4w3C6zElbLdPJKOpJQOrGUJ+GfzpjUvI0v1A= go.opentelemetry.io/otel/trace v1.19.0 h1:DFVQmlVbfVeOuBRrwdtaehRrWiL1JoVs9CPIQ1Dzxpg= go.opentelemetry.io/otel/trace v1.19.0/go.mod h1:mfaSyvGyEJEI0nyV2I4qhNQnbBOUUmYZpYojqMnX2vo= go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI= go.opentelemetry.io/proto/otlp v1.0.0 h1:T0TX0tmXU8a3CbNXzEKGeU5mIVOdf0oykP+u2lIVU/I= go.opentelemetry.io/proto/otlp v1.0.0/go.mod h1:Sy6pihPLfYHkr3NkUbEhGHFhINUSI/v80hjKIs5JXpM= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.1/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= go.uber.org/goleak v1.2.1/go.mod h1:qlT2yGI9QafXHhZZLxlSuNsMw3FFLxBr+tBRlmO1xH4= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE= gocloud.dev v0.19.0/go.mod h1:SmKwiR8YwIMMJvQBKLsC3fHNyMwXLw3PMDO+VVteJMI= golang.org/x/build v0.0.0-20190314133821-5284462c4bec/go.mod h1:atTaCNAy0f16Ah5aV1gMSwgiKVHwu/JncqDpuRr7lS4= golang.org/x/crypto v0.0.0-20171113213409-9f005a07e0d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190211182817-74369b46fc67/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191002192127-34f69633bfdc/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200220183623-bac4c82f6975/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201117144127-c1f2f97bffc9/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20221012134737-56aed061732a/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.3.1-0.20221117191849-2c476679df9a/go.mod h1:hebNnKkNXi2UzZN1eVRvBB7co0a+JxK6XbPiWVs/3J4= golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190125153040-c74c464bbbf2/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190312203227-4b39c73a6495/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI= golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/image v0.0.0-20190910094157-69e4b8554b2a/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/image v0.7.0 h1:gzS29xtG1J5ybQlv0PuyfE3nmc6R4qB73m6LUUmvFuw= golang.org/x/image v0.7.0/go.mod h1:nd/q4ef1AKKYl/4kft7g+6UyGbdiqWqTP1ZAbRoV7Rg= golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20181217174547-8f45f776aaf1/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY= golang.org/x/mod v0.13.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20170114055629-f2499483f923/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180911220305-26e67e76b6c3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181029044818-c44066c5c816/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181106065722-10aee1819953/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181108082009-03003ca0c849/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190619014844-b5b0513f8c1b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191004110552-13f9640d40b9/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191112182307-2180aed22343/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210916014120-12bc252f5db8/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= golang.org/x/net v0.0.0-20220607020251-c690dde0001d/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220624214902-1bab6f366d9e/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.0.0-20220909164309-bea034e7d591/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk= golang.org/x/net v0.2.0/go.mod h1:KqCZLdyyvdV855qA2rE3GC2aiw5xGR5TEjj8smXukLY= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc= golang.org/x/net v0.16.0 h1:7eBu7KsSvFDtSXUIDbh3aqlK4DPsZ1rByC8PFfBThos= golang.org/x/net v0.16.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/oauth2 v0.0.0-20180724155351-3d292e4d0cdc/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181106182150-f42d05182288/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190402181905-9f3314589c9a/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210810183815-faf39c7919d5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220608161450-d0670ef3b1eb/go.mod h1:jaDAt6Dkxork7LmZnYtzbRWj0W47D86a3TGe0YHBvmE= golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.13.0 h1:jDDenyj+WgFtmV3zYVoi8aE2BwtXFLWOA67ZfNWftiY= golang.org/x/oauth2 v0.13.0/go.mod h1:/JMhi4ZRXAf4HG9LiNmxvk+45+96RUlVThiH8FzNBn0= golang.org/x/perf v0.0.0-20180704124530-6e6d33e29852/go.mod h1:JLpeXjPJfIyPr5TlbXLkXWLhP8nz10XfvxElABhCtcw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.4.0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ= golang.org/x/sync v0.4.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= golang.org/x/sys v0.0.0-20170830134202-bb24a47a89ea/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181029174526-d69651ed3497/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181218192612-074acd46bca6/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190209173611-3b5209105503/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190514135907-3a4b5fb9f71f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190602015325-4c4f7f33c9ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190616124812-15dcb6c0061f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190620070143-6f217b454f45/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191022100944-742c48ecaeb7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191112214154-59a1497f0cea/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191210023423-ac6580df4449/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200120151820-655fe14d7479/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200622214017-ed371f2e16b4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200831180312-196b9ba8737a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200916030750-2334cc1a136f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200917073148-efd3b9a0ff20/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201013081832-0aaa2718063a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220610221304-9f5ed59c137d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220906165534-d0df966e6959/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/term v0.13.0 h1:bb+I9cTfFazGW51MZqBVmZy7+JEJMouUHTUSKVQLBek= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/text v0.0.0-20160726164857-2910a502d2bf/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181011042414-1f849cf54d09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181117154741-2ddaf7f79a09/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181219222714-6e267b5cc78e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190110163146-51295c7ec13a/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190221204921-83362c3779f5/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190311215038-5c2858a9cfe5/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190322203728-c1a832b0ad89/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190422233926-fe54fb35175b/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190521203540-521d6ed310dd/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190624222133-a101b041ded4/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190706070813-72ffa07ba3db/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= golang.org/x/tools v0.0.0-20190719005602-e377ae9d6386/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190910044552-dd2b5c81c578/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190920225731-5eefd052ad72/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191108193012-7d206e10da11/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113232020-e2727e816f5a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200102140908-9497f49d5709/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200204192400-7124308813f3/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200324003944-a576cf524670/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200331202046-9d5940d49312/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200414032229-332987a829c3/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200422022333-3d57cf2e726e/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200426102838-f3a5411a4c3b/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200502202811-ed308ab3e770/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= golang.org/x/tools v0.14.0 h1:jvNa2pY0M4r62jkRQ6RwEZZyPcymeL9XZMLBbV7U2nc= golang.org/x/tools v0.14.0/go.mod h1:uYBEerGOWcJyEORxN+Ek8+TT266gXkNlHdJBwexUsBg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20220609144429-65e65417b02f/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= gonum.org/v1/gonum v0.0.0-20190331200053-3d26580ed485/go.mod h1:2ltnJ7xHfj0zHS40VVPYEAAMTa3ZGguvHGBSJeRWqE0= gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= gonum.org/v1/netlib v0.0.0-20190331212654-76723241ea4e/go.mod h1:kS+toOQn6AQKjmKJ7gzohV1XkqsFehRA2FbsbkopSuQ= gonum.org/v1/plot v0.12.0 h1:y1ZNmfz/xHuHvtgFe8USZVyykQo5ERXPnspQNVK15Og= gonum.org/v1/plot v0.12.0/go.mod h1:PgiMf9+3A3PnZdJIciIXmyN1FwdAA6rXELSN761oQkw= google.golang.org/api v0.0.0-20160322025152-9bf6e6e569ff/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.0.0-20181030000543-1d582fd0359e/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.0.0-20181220000619-583d854617af/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= google.golang.org/api v0.2.0/go.mod h1:IfRCZScioGtypHNTlz3gFk67J8uePVW7uDTBzXuIkhU= google.golang.org/api v0.3.0/go.mod h1:IuvZyQh8jgscv8qWfQ4ABd8m7hEudgBFM/EdhA3BnXw= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.5.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.6.0/go.mod h1:btoxGiFvQNVUZQ8W08zLtrVS08CNpINPEfxXxgJL1Q4= google.golang.org/api v0.6.1-0.20190607001116-5213b8090861/go.mod h1:btoxGiFvQNVUZQ8W08zLtrVS08CNpINPEfxXxgJL1Q4= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.25.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo= google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4= google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw= google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU= google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k= google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE= google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI= google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I= google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo= google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g= google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA= google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8= google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs= google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA= google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw= google.golang.org/api v0.80.0/go.mod h1:xY3nI94gbvBrE0J6NHXhxOmW97HG7Khjkku6AFB3Hyg= google.golang.org/api v0.84.0/go.mod h1:NTsGnUFJMYROtiquksZHBWtHfeMC7iYthki7Eq3pa8o= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/cloud v0.0.0-20151119220103-975617b05ea8/go.mod h1:0H1ncTHf11KCFhTc/+EFRbzSCOZx+VUbRMk55Yv5MYk= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20181029155118-b69ba1387ce2/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20181219182458-5a97ab628bfb/go.mod h1:7Ep/1NZk928CDR8SjdVbjWNpdIf6nzjE3BTgJDr2Atg= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190508193815-b515fa19cec8/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= google.golang.org/genproto v0.0.0-20190620144150-6af8c5fc6601/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200117163144-32f20d992d24/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200527145253-8367513e4ece/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210329143202-679c6ae281ee/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A= google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24= google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k= google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48= google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w= google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY= google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc= google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E= google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo= google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220518221133-4f43b3371335/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220523171625-347a074981d8/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4= google.golang.org/genproto v0.0.0-20220608133413-ed9918b62aac/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20220616135557-88e70c0c3a90/go.mod h1:KEWEmljWE5zPzLBa/oHl6DaEt9LmfH6WtH1OHIvleBA= google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98 h1:Z0hjGZePRE0ZBWotvtrwxFNrNE9CUAGtplaDK5NNI/g= google.golang.org/genproto v0.0.0-20230711160842-782d3b101e98/go.mod h1:S7mY02OqCJTD0E1OiQy1F72PWFB4bZJ87cAtLPYgDR0= google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98 h1:FmF5cCW94Ij59cfpoLiwTgodWmm60eEV0CjlsVg2fuw= google.golang.org/genproto/googleapis/api v0.0.0-20230711160842-782d3b101e98/go.mod h1:rsr7RhLuwsDKL7RmgDDCUc6yaGr1iqceVb5Wv6f6YvQ= google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 h1:bVf09lpb+OJbByTj913DRJioFFAjf/ZGxEz7MajTp2U= google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98/go.mod h1:TUfxEVdsvPg18p6AslUXFoLdpED4oBnGwyqk3dV1XzM= google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE= google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34= google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ= google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.47.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk= google.golang.org/grpc v1.58.3 h1:BjnpXut1btbtgN/6sp+brB2Kbm2LjNXnidYujAVbSoQ= google.golang.org/grpc v1.58.3/go.mod h1:tgX3ZQDlNJGU96V6yHh1T/JeoBQ2TXdr43YbYSsCJk0= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20141024133853-64131543e789/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.0/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/ini.v1 v1.56.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/natefinch/lumberjack.v2 v2.0.0/go.mod h1:l0ndWWf7gzL7RNwBG7wST/UCcT4T24xpD6X8LsfU/+k= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/square/go-jose.v2 v2.2.2/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= gopkg.in/warnings.v0 v0.1.1/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI= gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.7/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= gotest.tools/v3 v3.0.2/go.mod h1:3SzNCllyD9/Y+b5r9JIKQ474KzkZyqLqEfYqMsX94Bk= gotest.tools/v3 v3.4.0 h1:ZazjZUfuVeZGLAmlKKuyv3IKP5orXcwtOwDQH6YVr6o= grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o= honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20180920025451-e3ad64cb4ed3/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.5/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.0.0-20180904230853-4e7be11eab3f/go.mod h1:iuAfoD4hCxJ8Onx9kaTIt30j7jUFS00AXQi6QMi99vA= k8s.io/api v0.17.4/go.mod h1:5qxx6vjmwUVG2nHQTKGlLts8Tbok8PzHl4vHtVFuZCA= k8s.io/api v0.19.0/go.mod h1:I1K45XlvTrDjmj5LoM5LuP/KYrhWbjUKT/SoPG0qTjw= k8s.io/apimachinery v0.0.0-20180904193909-def12e63c512/go.mod h1:ccL7Eh7zubPUSh9A3USN90/OzHNSVN6zxzde07TDCL0= k8s.io/apimachinery v0.17.4/go.mod h1:gxLnyZcGNdZTCLnq3fgzyg2A5BVCHTNDFrw8AmuJ+0g= k8s.io/apimachinery v0.19.0/go.mod h1:DnPGDnARWFvYa3pMHgSxtbZb7gpzzAZ1pTfaUNDVlmA= k8s.io/apiserver v0.17.4/go.mod h1:5ZDQ6Xr5MNBxyi3iUZXS84QOhZl+W7Oq2us/29c0j9I= k8s.io/client-go v0.0.0-20180910083459-2cefa64ff137/go.mod h1:7vJpHMYJwNQCWgzmNV+VYUl1zCObLyodBc8nIyt8L5s= k8s.io/client-go v0.17.4/go.mod h1:ouF6o5pz3is8qU0/qYL2RnoxOPqgfuidYLowytyLJmc= k8s.io/client-go v0.19.0/go.mod h1:H9E/VT95blcFQnlyShFgnFT9ZnJOAceiUHM3MlRC+mU= k8s.io/cloud-provider v0.17.4/go.mod h1:XEjKDzfD+b9MTLXQFlDGkk6Ho8SGMpaU8Uugx/KNK9U= k8s.io/code-generator v0.17.2/go.mod h1:DVmfPQgxQENqDIzVR2ddLXMH34qeszkKSdH/N+s+38s= k8s.io/component-base v0.17.4/go.mod h1:5BRqHMbbQPm2kKu35v3G+CpVq4K0RJKC7TRioF0I9lE= k8s.io/cri-api v0.17.3/go.mod h1:X1sbHmuXhwaHs9xxYffLqJogVsnI+f6cPRcgPel7ywM= k8s.io/csi-translation-lib v0.17.4/go.mod h1:CsxmjwxEI0tTNMzffIAcgR9lX4wOh6AKHdxQrT7L0oo= k8s.io/gengo v0.0.0-20190128074634-0689ccc1d7d6/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20190822140433-26a664648505/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/gengo v0.0.0-20200413195148-3a45101e95ac/go.mod h1:ezvh/TsK7cY6rbqRK0oQQ8IAqLxYwwyPxAX1Pzy0ii0= k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v0.3.0/go.mod h1:Gq+BEi5rUBO/HRz0bTSXDUcqjScdoY3a9IHpCEIOOfk= k8s.io/klog v1.0.0/go.mod h1:4Bi6QPql/J/LkTDqv7R/cd3hPo4k2DG6Ptcz060Ez5I= k8s.io/klog/v2 v2.0.0/go.mod h1:PBfzABfn139FHAV07az/IF9Wp1bkk3vpT2XSJ76fSDE= k8s.io/klog/v2 v2.2.0/go.mod h1:Od+F08eJP+W3HUb4pSrPpgp9DGU4GzlpG/TmITuYh/Y= k8s.io/kube-openapi v0.0.0-20180731170545-e3762e86a74c/go.mod h1:BXM9ceUBTj2QnfH2MK1odQs778ajze1RxcmP6S8RVVc= k8s.io/kube-openapi v0.0.0-20191107075043-30be4d16710a/go.mod h1:1TqjTSzOxsLGIKfj0lK8EeCP7K1iUG65v09OM0/WG5E= k8s.io/kube-openapi v0.0.0-20200805222855-6aeccd4b50c6/go.mod h1:UuqjUnNftUyPE5H64/qeyjQoUZhGpeFDVdxjTeEVN2o= k8s.io/kubernetes v1.11.10/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= k8s.io/legacy-cloud-providers v0.17.4/go.mod h1:FikRNoD64ECjkxO36gkDgJeiQWwyZTuBkhu+yxOc1Js= k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20200729134348-d5654de09c73/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA= kernel.org/pub/linux/libs/security/libcap/cap v1.2.67 h1:sPQ9qlSNR26fToTKbxe/HDWJlXvBLqGmt84LGCQkOy0= kernel.org/pub/linux/libs/security/libcap/psx v1.2.67 h1:NxbXJ7pDVq0FKBsqjieT92QDXI2XaqH2HAi4QcCOHt8= modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw= modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk= modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k= modernc.org/strutil v1.0.0/go.mod h1:lstksw84oURvj9y3tn8lGvRxyRC1S2+g5uuIzNfIOBs= modernc.org/xc v1.0.0/go.mod h1:mRNCo0bvLjGhHO9WsyuKVU4q0ceiDDDoEeWDJHrNx8I= mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc= mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b/go.mod h1:2odslEg/xrtNQqCYg2/jCoyKnw3vv5biOc3JnIcYfL4= mvdan.cc/unparam v0.0.0-20190720180237-d51796306d8f/go.mod h1:4G1h5nDURzA3bwVMZIVpwbkw+04kSxk3rAtzlimaUJw= mvdan.cc/unparam v0.0.0-20200501210554-b37ab49443f7/go.mod h1:HGC5lll35J70Y5v7vCGb9oLhHoScFwkHDJm/05RdSTc= oss.terrastruct.com/d2 v0.4.0 h1:ZZwO68uN8UYkEObuJuSMnV1qfcaVLLlJEOnjPuavdJg= oss.terrastruct.com/d2 v0.4.0/go.mod h1:EKjuT3J/wss0geBmUhq+LgZBlqRu438+h89g0+hvhEw= oss.terrastruct.com/util-go v0.0.0-20230320053557-dcb5aac7d972 h1:HS7fg2GzGsqRLApsoh7ztaLMvXzxSln/Hfz4wy4tIDA= oss.terrastruct.com/util-go v0.0.0-20230320053557-dcb5aac7d972/go.mod h1:eMWv0sOtD9T2RUl90DLWfuShZCYp4NrsqNpI8eqO6U4= pack.ag/amqp v0.11.2/go.mod h1:4/cbmt4EJXSKlG6LCfWHoqmN0uFdy5i/+YFz+fTfhV4= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1 h1:k1MczvYDUvJBe93bYd7wrZLLUEcLZAuF824/I4e5Xr4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:wWxsB5ozmmv/SG7nM11ayaAW51xMvak/t1r0CSlcokI= sigs.k8s.io/structured-merge-diff v1.0.1-0.20191108220359-b1b620dd3f06/go.mod h1:/ULNhyfzRopfcjskuui0cTITekDduZ7ycKN3oUT9R18= sigs.k8s.io/structured-merge-diff/v4 v4.0.1/go.mod h1:bJZC9H9iH24zzfZ/41RGcq60oK1F7G282QMXDPYydCw= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8= sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4/go.mod h1:ketZ/q3QxT9HOBeFhu6RdvsftgpsbFHBF5Cas6cDKZ0= sourcegraph.com/sqs/pbtypes v1.0.0/go.mod h1:3AciMUv4qUuRHRHhOG4TZOB+72GdPVz5k+c648qsFS4=
closed
dagger/dagger
https://github.com/dagger/dagger
5,927
Services v2: Python null types on PortForward
The optional types on PortForward, `frontend` and `protocol` are being sent as `null` to the API when they are not set in the Python SDK. ``` gql.transport.exceptions.TransportQueryError: {'message': 'Syntax Error GraphQL request (3:41) Unexpected Name "null"\n\n2: host {\n3: service: service(ports: [{frontend: null, backend: 3306, protoc ┃ ol: TCP}]) {\n ^\n4: id: id\n', 'locations': [{'line': 3, 'column': 41}]} ```
https://github.com/dagger/dagger/issues/5927
https://github.com/dagger/dagger/pull/6087
ae77f7e930cb917df48850dd5a05b4b3023a9cf4
93fd238a29c2ddde605b9c3a2d9fafa3cf33d989
"2023-10-19T16:07:22Z"
go
"2023-11-08T14:01:14Z"
sdk/python/pyproject.toml
[build-system] requires = ["hatchling", "hatch-vcs"] build-backend = "hatchling.build" [project] name = "dagger-io" dynamic = ["version"] description = "A client package for running Dagger pipelines in Python." readme = "README.md" license = "Apache-2.0" authors = [ {name = "Dagger", email = "hello@dagger.io"}, ] classifiers = [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Framework :: AnyIO", "Framework :: Pytest", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Typing :: Typed", ] requires-python = ">=3.10" dependencies = [ "anyio>=3.6.2", "cattrs>=22.2.0", "graphql-core>=3.2.3", # TODO: replace gql and httpx dependencies with "gql[httpx]>=3.5.0" when # it's released: https://github.com/graphql-python/gql/releases "gql>=3.4.0", "httpx>=0.23.1", "beartype>=0.11.0", "platformdirs>=2.6.2", "typing_extensions>=4.8.0", "rich>=10.11.0", ] [project.urls] "Homepage" = "https://dagger.io" "Documentation" = "https://docs.dagger.io/sdk/python" "Repository" = "https://github.com/dagger/dagger/tree/main/sdk/python" "Tracker" = "https://github.com/dagger/dagger/issues" "Release Notes" = "https://github.com/dagger/dagger/releases?q=tag%3Asdk%2Fpython%2Fv0" "Community" = "https://discord.gg/ufnyBtc8uY" "Twitter" = "https://twitter.com/dagger_io" [tool.hatch.version] source = "vcs" fallback-version = "0.0.0" [tool.hatch.build.targets.sdist] only-include = [ "src", "tests", "docs", "CHANGELOG.md", ] [tool.hatch.build.targets.wheel] packages = ["src/dagger"] [tool.hatch.envs.default] dependencies = [ "black>=22.3.0", "ruff>=0.0.218", "pytest>=7.2.0", "pytest-mock>=3.10.0", "pytest-subprocess>=1.4.2", "pytest-lazy-fixture>=0.6.3", "pytest-httpx>=0.21.3", ] [tool.hatch.envs.default.scripts] fmt = [ "ruff --fix-only -e {args:. ../../docs/current}", "black {args:. ../../docs/current}", ] lint = [ "ruff check {args:. ../../docs/current}", "black --check {args:. ../../docs/current}", ] test = "pytest -W default" testunit = "pytest -m 'not slow'" # Lock dependencies for CI, otherwise we could get failing checks on # unrelated PRs but not needed locally because it can help catch issues # early from dependency updates. lock = "hatch dep show requirements --all | pip-compile --annotate --resolver=backtracking -U -o requirements.txt -" [tool.hatch.envs.default.env-vars] CUSTOM_COMPILE_COMMAND = "hatch run lock" [tool.hatch.envs.typing] extra-dependencies = ["mypy>=0.942"] scripts = {check = "mypy {args:src/dagger tests}"} [tool.hatch.envs.docs] template = "docs" dependencies = [ "sphinx>=5.3.0", "sphinx-rtd-theme~=1.3.0", ] [tool.hatch.envs.docs.scripts] build = "sphinx-build -v docs docs/_build" server = "python -m http.server -d docs/_build" preview = [ "build", "server", ] [tool.pytest.ini_options] testpaths = ["tests/"] addopts = [ "--import-mode=importlib", ] markers = [ "slow: mark test as slow (integration)", "provision: mark provisioning tests", ] [tool.mypy] disallow_untyped_defs = false follow_imports = "normal" # ignore_missing_imports = true install_types = true non_interactive = true warn_redundant_casts = true pretty = true show_column_numbers = true warn_no_return = false warn_unused_ignores = true [tool.black] include = '\.pyi?$' target-version = ["py310", "py311"] [tool.ruff] src = ["src", "tests"] exclude = ["experimental/*/pyproject.toml"] target-version = "py310" select = ["ALL"] ignore = [ # Type inferrance is ok in a lot of places. "ANN", # This rule doesn't know to ignore a subclass override # so we get false positives for unused arguments. "ARG002", # Black can handle trailing commas automatically. "COM812", # Can't control using a library with boolean arguments. "FBT", # TODO: Document public modules and packages. "D100", "D104", # Imperative mood only makes sense in functions, not classes. "D401", # Not using timezones in this project. "DTZ", # Allow logging with default %. You need custom setup to use `extra`. "G002", # Valid use in pytest, docs and examples. "INP001", # Unnecessary variable assignment before `return` statement # doesn't seem to work as expected. "RET504", # We don't use asserts as runtime validation guarantees. "S101", # Don't guard types. Don't want to stringize them. "TCH", # Don't require author and link in TODO comments. "TD002", "TD003", "FIX002", # Pandas "PD", ] unfixable = [ # Don't remove `print` statements, just warn. "T201", ] [tool.ruff.isort] known-first-party = ["dagger"] [tool.ruff.flake8-bugbear] extend-immutable-calls = ["typer.Option"] [tool.ruff.per-file-ignores] "./docs/*" = ["D1"] "./experimental/*" = ["D1", "T201"] "./src/dagger/client/gen.py" = [ # Not much control over field names and docs coming from the API. # Note: We could detect built-in shadowing like the reserved # keywords but these built-ins aren't being used in the generated # code so no need to bother. "A", "D", # Too hard to properly wrap long lines in codegen. "E501", # Allow access to private members as it's controlled by our own library. "SLF001", # Too many arguments to function call. "PLR0913", # `Optional` is preferred over `| None` because of how # beartype handles forward references. "UP007", ] # Ignore built-in shadowing in test mocks. "./tests/client/test_inputs.py" = ["A", "ERA001"] "./tests/*.py" = [ # Ignore security issues in tests. "S", # Magic value comparison doesn't apply to tests. "PLR2004", # Allow more than one statement in pytest.raises. "PT012", # No public interfaces. "D1", ] # Allow some patterns to redefine imports in __init__. "__init__.py" = ["I001", "F401", "F403", "PLC0414"] # Typer uses boolean parameters for the CLI. Let it. "./src/**/cli.py" = ["FBT"] [tool.ruff.pydocstyle] convention = "numpy"
closed
dagger/dagger
https://github.com/dagger/dagger
5,927
Services v2: Python null types on PortForward
The optional types on PortForward, `frontend` and `protocol` are being sent as `null` to the API when they are not set in the Python SDK. ``` gql.transport.exceptions.TransportQueryError: {'message': 'Syntax Error GraphQL request (3:41) Unexpected Name "null"\n\n2: host {\n3: service: service(ports: [{frontend: null, backend: 3306, protoc ┃ ol: TCP}]) {\n ^\n4: id: id\n', 'locations': [{'line': 3, 'column': 41}]} ```
https://github.com/dagger/dagger/issues/5927
https://github.com/dagger/dagger/pull/6087
ae77f7e930cb917df48850dd5a05b4b3023a9cf4
93fd238a29c2ddde605b9c3a2d9fafa3cf33d989
"2023-10-19T16:07:22Z"
go
"2023-11-08T14:01:14Z"
sdk/python/src/dagger/client/_core.py
import functools import logging import typing from collections import deque from dataclasses import MISSING, asdict, dataclass, field, replace from typing import ( Any, TypeVar, get_type_hints, overload, ) import anyio import cattrs import graphql import httpx from beartype.door import TypeHint from cattrs.preconf.json import make_converter as make_json_converter from gql.dsl import DSLField, DSLQuery, DSLSchema, DSLSelectable, DSLType, dsl_gql from gql.transport.exceptions import ( TransportClosed, TransportProtocolError, TransportQueryError, TransportServerError, ) from dagger import ( ExecuteTimeoutError, InvalidQueryError, TransportError, ) from dagger._exceptions import _query_error_from_transport from dagger.client.base import Scalar, Type from ._guards import ( IDType, InputHint, InputSeqHint, is_id_type, is_id_type_sequence, is_id_type_subclass, ) from ._session import BaseConnection, SharedConnection logger = logging.getLogger(__name__) T = TypeVar("T") class Arg(typing.NamedTuple): name: str # GraphQL name value: Any default: Any = MISSING def as_input(self): if InputHint.is_bearable(self.value): return asdict(self.value) if InputSeqHint.is_bearable(self.value): return [asdict(v) for v in self.value] return self.value @dataclass(slots=True) class Field: type_name: str name: str args: dict[str, Any] children: dict[str, "Field"] = field(default_factory=dict) def to_dsl(self, schema: DSLSchema) -> DSLField: type_: DSLType = getattr(schema, self.type_name) field_ = getattr(type_, self.name)(**self.args) if self.children: field_ = field_.select( **{name: child.to_dsl(schema) for name, child in self.children.items()} ) return field_ def add_child(self, child: "Field") -> "Field": return replace(self, children={child.name: child}) @dataclass(slots=True) class Context: conn: BaseConnection selections: deque[Field] = field(default_factory=deque) converter: cattrs.Converter = field(init=False) def __post_init__(self): self.converter = make_converter(self) def select( self, type_name: str, field_name: str, args: typing.Sequence[Arg] ) -> "Context": args_ = { arg.name: arg.as_input() for arg in args if arg.value is not arg.default } field_ = Field(type_name, field_name, args_) selections = self.selections.copy() selections.append(field_) return replace(self, selections=selections) def select_multiple(self, type_name: str, **fields: str) -> "Context": selections = self.selections.copy() parent = selections.pop() # When selecting multiple fields, set them as children of the last # selection to make `build` logic simpler. field_ = replace( parent, # Using kwargs for alias names. This way the returned result # is already formatted with the python name we expect. children={k: Field(type_name, v, {}) for k, v in fields.items()}, ) selections.append(field_) return replace(self, selections=selections) async def build(self) -> DSLSelectable: if not self.selections: msg = "No field has been selected" raise InvalidQueryError(msg) def _collapse(child: Field, field_: Field): return field_.add_child(child) # This transforms the selection set into a single root Field, where # the `children` attribute is set to the next selection in the set, # and so on... root = functools.reduce(_collapse, reversed(self.selections)) # `to_dsl` will cascade to all children, until the end. return root.to_dsl(DSLSchema(await self.conn.session.get_schema())) async def query(self) -> graphql.DocumentNode: return dsl_gql(DSLQuery(await self.build())) @overload async def execute(self, return_type: None = None) -> None: ... @overload async def execute(self, return_type: type[T]) -> T: ... async def execute(self, return_type: type[T] | None = None) -> T | None: await self.resolve_ids() query = await self.query() try: result = await self.conn.session.execute(query) except httpx.TimeoutException as e: msg = ( "Request timed out. Try setting a higher timeout value in " "for this connection." ) raise ExecuteTimeoutError(msg) from e except httpx.RequestError as e: msg = f"Failed to make request: {e}" raise TransportError(msg) from e except TransportClosed as e: msg = ( "Connection to engine has been closed. Make sure you're " "calling the API within a `dagger.Connection()` context." ) raise TransportError(msg) from e except (TransportProtocolError, TransportServerError) as e: msg = f"Unexpected response from engine: {e}" raise TransportError(msg) from e except TransportQueryError as e: if error := _query_error_from_transport(e, query): raise error from e raise return self.get_value(result, return_type) if return_type else None @overload def get_value(self, value: None, return_type: Any) -> None: ... @overload def get_value(self, value: dict[str, Any], return_type: type[T]) -> T: ... def get_value(self, value: dict[str, Any] | None, return_type: type[T]) -> T | None: type_hint = TypeHint(return_type) for f in self.selections: if not isinstance(value, dict): break value = value[f.name] if value is None and not type_hint.is_bearable(value): msg = ( "Required field got a null response. Check if parent fields are valid." ) raise InvalidQueryError(msg) return self.converter.structure(value, return_type) async def resolve_ids(self) -> None: """Replace Type object instances with their ID implicitly.""" # mutating to avoid re-fetching on forked pipeline async def _resolve_id(pos: int, k: str, v: IDType): sel = self.selections[pos] sel.args[k] = await v.id() async def _resolve_seq_id(pos: int, idx: int, k: str, v: IDType): sel = self.selections[pos] sel.args[k][idx] = await v.id() # resolve all ids concurrently async with anyio.create_task_group() as tg: for i, sel in enumerate(self.selections): for k, v in sel.args.items(): # check if it's a sequence of Type objects if is_id_type_sequence(v): # make sure it's a list, to mutate by index sel.args[k] = list(v) for seq_i, seq_v in enumerate(sel.args[k]): if is_id_type(seq_v): tg.start_soon(_resolve_seq_id, i, seq_i, k, seq_v) elif is_id_type(v): tg.start_soon(_resolve_id, i, k, v) def make_converter(ctx: Context): conv = make_json_converter(detailed_validation=False) # For types that were returned from a list we need to set # their private attributes with a custom structuring function. def _needs_hook(cls: type) -> bool: return issubclass(cls, Type) and hasattr(cls, "__slots__") def _struct(d: dict[str, Any], cls: type) -> Any: obj = cls(ctx) hints = get_type_hints(cls) for slot in getattr(cls, "__slots__", ()): t = hints.get(slot) if t and slot in d: setattr(obj, slot, conv.structure(d[slot], t)) return obj conv.register_structure_hook_func( _needs_hook, _struct, ) return conv _Type = TypeVar("_Type", bound=Type) class Root(Type): """Top level query object type (a.k.a. Query).""" @classmethod def _graphql_name(cls) -> str: return "Query" @classmethod def from_context(cls, ctx: Context): return cls(replace(ctx, selections=deque())) @classmethod def from_connection(cls, conn: BaseConnection): return cls(Context(conn)) def __init__(self, ctx: Context | None = None): # Since SharedConnection is a singleton, we could make Context optional # in every Type like here, but let's keep it only for the root object for now. super().__init__(ctx or Context(SharedConnection())) def _get_object_instance(self, id_: str | Scalar, cls: type[_Type]) -> _Type: if not is_id_type_subclass(cls): msg = f"Unsupported type '{cls.__name__}'" raise TypeError(msg) if type(id_) is not cls._id_type() and not isinstance(id_, str): msg = f"Expected id type '{cls._id_type()}', got '{type(id_)}'" raise TypeError(msg) assert issubclass(cls, Type) ctx = self._select(cls._from_id_query_field(), [Arg("id", id_)]) return cls(ctx)
closed
dagger/dagger
https://github.com/dagger/dagger
5,927
Services v2: Python null types on PortForward
The optional types on PortForward, `frontend` and `protocol` are being sent as `null` to the API when they are not set in the Python SDK. ``` gql.transport.exceptions.TransportQueryError: {'message': 'Syntax Error GraphQL request (3:41) Unexpected Name "null"\n\n2: host {\n3: service: service(ports: [{frontend: null, backend: 3306, protoc ┃ ol: TCP}]) {\n ^\n4: id: id\n', 'locations': [{'line': 3, 'column': 41}]} ```
https://github.com/dagger/dagger/issues/5927
https://github.com/dagger/dagger/pull/6087
ae77f7e930cb917df48850dd5a05b4b3023a9cf4
93fd238a29c2ddde605b9c3a2d9fafa3cf33d989
"2023-10-19T16:07:22Z"
go
"2023-11-08T14:01:14Z"
sdk/python/src/dagger/client/_guards.py
import contextlib import functools import inspect import typing from collections.abc import Callable, Coroutine, Sequence from dataclasses import is_dataclass from typing import Annotated, Any, ParamSpec, TypeGuard, TypeVar, overload from beartype import beartype from beartype.door import TypeHint from beartype.roar import BeartypeCallHintViolation from beartype.vale import Is, IsInstance, IsSubclass from .base import Input, Scalar, Type InputType = Annotated[Input, Is[lambda o: is_dataclass(o)]] InputHint = TypeHint(InputType) InputTypeSeq = Annotated[Sequence[InputType], ~IsInstance[str]] InputSeqHint = TypeHint(InputTypeSeq) @typing.runtime_checkable class FromIDType(typing.Protocol): @classmethod def _id_type(cls) -> Scalar: ... @classmethod def _from_id_query_field(cls) -> str: ... IDTypeSubclass = Annotated[FromIDType, IsSubclass[Type, FromIDType]] IDTypeSubclassHint = TypeHint(IDTypeSubclass) def is_id_type_subclass(v: type) -> TypeGuard[type[IDTypeSubclass]]: return IDTypeSubclassHint.is_bearable(v) @typing.runtime_checkable class HasID(typing.Protocol): async def id(self) -> Scalar: # noqa: A003 ... IDType = Annotated[HasID, IsInstance[Type]] IDTypeSeq = Annotated[Sequence[IDType], ~IsInstance[str]] IDTypeHint = TypeHint(IDType) IDTypeSeqHint = TypeHint(IDTypeSeq) def is_id_type(v: object) -> TypeGuard[IDType]: return IDTypeHint.is_bearable(v) def is_id_type_sequence(v: object) -> TypeGuard[IDTypeSeq]: return IDTypeSeqHint.is_bearable(v) _T = TypeVar("_T") _P = ParamSpec("_P") @overload def typecheck( func: Callable[_P, Coroutine[Any, Any, _T]] ) -> Callable[_P, Coroutine[Any, Any, _T]]: ... @overload def typecheck(func: Callable[_P, _T]) -> Callable[_P, _T]: ... def typecheck( func: Callable[_P, _T | Coroutine[Any, Any, _T]] ) -> Callable[_P, _T | Coroutine[Any, Any, _T]]: ... """ Runtime type checking. Allows fast failure, before sending requests to the API, and with greater detail over the specific method and parameter with invalid type to help debug. This includes catching typos or forgetting to await a coroutine, but it's less forgiving in some instances. For example, an `args: Sequence[str]` parameter set as `args=["echo", 123]` was easily converting the int 123 to a string by the dynamic query builder. Now it'll fail. """ # Using beartype for the hard work, just tune the traceback a bit. # Hiding as **implementation detail** for now. The project is young # but very active and with good plans on making it very modular/pluggable. # Decorating here allows basic checks during definition time # so it'll be catched early, during development. bear = beartype(func) @contextlib.contextmanager def _handle_exception(): try: yield except BeartypeCallHintViolation as e: # Tweak the error message a bit. msg = str(e).replace("@beartyped ", "") # Everything in `dagger.api.gen.` is exported under `dagger.`. msg = msg.replace("dagger.client.gen.", "dagger.") # No API methods accept a coroutine, add hint. if "<coroutine object" in msg: msg = f"{msg} Did you forget to await?" # The following `raise` line will show in traceback, keep # the noise down to minimum by instantiating outside of it. err = TypeError(msg).with_traceback(None) raise err from None if inspect.iscoroutinefunction(bear): @functools.wraps(func) async def async_wrapper(*args: _P.args, **kwargs: _P.kwargs) -> _T: with _handle_exception(): return await bear(*args, **kwargs) return async_wrapper if inspect.isfunction(bear): @functools.wraps(func) def wrapper(*args: _P.args, **kwargs: _P.kwargs) -> _T: with _handle_exception(): return bear(*args, **kwargs) return wrapper return bear
closed
dagger/dagger
https://github.com/dagger/dagger
5,927
Services v2: Python null types on PortForward
The optional types on PortForward, `frontend` and `protocol` are being sent as `null` to the API when they are not set in the Python SDK. ``` gql.transport.exceptions.TransportQueryError: {'message': 'Syntax Error GraphQL request (3:41) Unexpected Name "null"\n\n2: host {\n3: service: service(ports: [{frontend: null, backend: 3306, protoc ┃ ol: TCP}]) {\n ^\n4: id: id\n', 'locations': [{'line': 3, 'column': 41}]} ```
https://github.com/dagger/dagger/issues/5927
https://github.com/dagger/dagger/pull/6087
ae77f7e930cb917df48850dd5a05b4b3023a9cf4
93fd238a29c2ddde605b9c3a2d9fafa3cf33d989
"2023-10-19T16:07:22Z"
go
"2023-11-08T14:01:14Z"
sdk/python/tests/client/test_codegen.py
from textwrap import dedent import pytest from graphql import GraphQLArgument as Argument from graphql import GraphQLEnumType, GraphQLEnumValue, GraphQLID from graphql import GraphQLField as Field from graphql import GraphQLInputField as Input from graphql import GraphQLInputField as InputField from graphql import GraphQLInputObjectType as InputObject from graphql import GraphQLInt as Int from graphql import GraphQLList as List from graphql import GraphQLNonNull as NonNull from graphql import GraphQLObjectType as Object from graphql import GraphQLScalarType as Scalar from graphql import GraphQLString as String from dagger._codegen.generator import ( Context, _InputField, format_input_type, format_name, format_output_type, ) from dagger._codegen.generator import Enum as EnumHandler from dagger._codegen.generator import Scalar as ScalarHandler @pytest.fixture() def ctx(): return Context( id_map={ "CacheID": "CacheVolume", "FileID": "File", "SecretID": "Secret", }, id_query_map={ "ContainerID": "container", "DirectoryID": "directory", }, simple_objects_map={}, remaining={"Secret"}, ) @pytest.mark.parametrize( ("graphql", "expected"), [ ("stdout", "stdout"), ("envVariable", "env_variable"), # casing ("from", "from_"), # reserved keyword ("type", "type"), # builtin ("withFS", "with_fs"), # initialism ], ) def test_format_name(graphql, expected): assert format_name(graphql) == expected opts = InputObject( "Options", fields={ "key": InputField(NonNull(Scalar("CacheID"))), "name": InputField(String), }, ) @pytest.mark.parametrize( ("graphql", "expected"), [ (NonNull(List(NonNull(String))), "list[str]"), (List(String), "Optional[list[Optional[str]]]"), (List(NonNull(String)), "Optional[list[str]]"), (NonNull(Scalar("FileID")), "File"), (Scalar("FileID"), "Optional[File]"), (NonNull(opts), "Options"), (opts, "Optional[Options]"), (NonNull(List(NonNull(opts))), "list[Options]"), (NonNull(List(opts)), "list[Optional[Options]]"), (List(NonNull(opts)), "Optional[list[Options]]"), (List(opts), "Optional[list[Optional[Options]]]"), ], ) def test_format_input_type(graphql, expected, ctx: Context): assert format_input_type(graphql, ctx.id_map) == expected cache_volume = Object( "CacheVolume", fields={ "id": Field( NonNull(Scalar("CacheID")), {}, ), }, ) @pytest.mark.parametrize( ("graphql", "expected"), [ (NonNull(List(NonNull(String))), "list[str]"), (List(String), "Optional[list[Optional[str]]]"), (List(NonNull(String)), "Optional[list[str]]"), (NonNull(Scalar("FileID")), "FileID"), (Scalar("FileID"), "Optional[FileID]"), (NonNull(cache_volume), "CacheVolume"), (cache_volume, "CacheVolume"), (List(NonNull(cache_volume)), "list[CacheVolume]"), (List(cache_volume), "list[Optional[CacheVolume]]"), ], ) def test_format_output_type(graphql, expected): assert format_output_type(graphql) == expected @pytest.mark.parametrize( ("name", "args", "expected"), [ ("args", (NonNull(List(String)),), "args: Sequence[Optional[str]]"), ("secret", (NonNull(Scalar("SecretID")),), "secret: Secret"), ("secret", (Scalar("SecretID"),), "secret: Optional[Secret] = None"), ("from", (String, None), "from_: Optional[str] = None"), ("lines", (Int, 1), "lines: Optional[int] = 1"), ( "configPath", (NonNull(String), "/dagger.json"), 'config_path: str = "/dagger.json"', ), ], ) @pytest.mark.parametrize("cls", [Argument, Input]) def test_input_field_param(cls, name, args, expected, ctx: Context): assert _InputField(ctx, name, cls(*args)).as_param() == expected @pytest.mark.parametrize( ("name", "args", "expected"), [ ( "context", (NonNull(Scalar("DirectoryID")),), 'Arg("context", context),', ), ( "secret", (Scalar("SecretID"),), 'Arg("secret", secret, None),', ), ( "lines", (Int, 1), 'Arg("lines", lines, 1),', ), ( "from", (String, None), 'Arg("from", from_, None),', ), ( "configPath", (NonNull(String), "/dagger.json"), 'Arg("configPath", config_path, "/dagger.json"),', ), ], ) @pytest.mark.parametrize("cls", [Argument, Input]) def test_input_field_arg(cls, name, args, expected, ctx: Context): assert _InputField(ctx, name, cls(*args)).as_arg() == expected @pytest.mark.parametrize( ("type_", "expected"), [ (GraphQLID, False), (String, False), (Int, False), (Scalar("FileID"), True), (Object("Container", {}), False), ], ) def test_scalar_predicate(type_, expected, ctx: Context): assert ScalarHandler(ctx).predicate(type_) is expected @pytest.mark.parametrize( ("type_", "expected"), [ # with doc ( Scalar("SecretID", description="A unique identifier for a secret."), dedent( ''' class SecretID(Scalar): """A unique identifier for a secret.""" ''', ), ), # without doc ( Scalar("FileID"), dedent( """ class FileID(Scalar): ... """, ), ), ], ) def test_scalar_render(type_, expected, ctx: Context): handler = ScalarHandler(ctx) assert handler.render(type_) == expected @pytest.mark.parametrize( ("type_", "expected"), [ # with doc ( GraphQLEnumType( "Enumeration", { "ONE": GraphQLEnumValue("ONE", description="First value."), "TWO": GraphQLEnumValue("TWO", description="Second value."), "THREE": GraphQLEnumValue("THREE", description="Third value."), }, description="Example of an enumeration.", ), dedent( ''' class Enumeration(Enum): """Example of an enumeration.""" ONE = "ONE" """First value.""" THREE = "THREE" """Third value.""" TWO = "TWO" """Second value.""" ''', ), ), # without doc ( GraphQLEnumType( "Enumeration", { "ONE": GraphQLEnumValue("ONE"), "TWO": GraphQLEnumValue("TWO"), "THREE": GraphQLEnumValue("THREE"), }, ), dedent( """ class Enumeration(Enum): ONE = "ONE" THREE = "THREE" TWO = "TWO" """, ), ), ], ) def test_enum_render(type_, expected, ctx: Context): handler = EnumHandler(ctx) assert handler.render(type_) == expected
closed
dagger/dagger
https://github.com/dagger/dagger
5,927
Services v2: Python null types on PortForward
The optional types on PortForward, `frontend` and `protocol` are being sent as `null` to the API when they are not set in the Python SDK. ``` gql.transport.exceptions.TransportQueryError: {'message': 'Syntax Error GraphQL request (3:41) Unexpected Name "null"\n\n2: host {\n3: service: service(ports: [{frontend: null, backend: 3306, protoc ┃ ol: TCP}]) {\n ^\n4: id: id\n', 'locations': [{'line': 3, 'column': 41}]} ```
https://github.com/dagger/dagger/issues/5927
https://github.com/dagger/dagger/pull/6087
ae77f7e930cb917df48850dd5a05b4b3023a9cf4
93fd238a29c2ddde605b9c3a2d9fafa3cf33d989
"2023-10-19T16:07:22Z"
go
"2023-11-08T14:01:14Z"
sdk/python/tests/client/test_default_client.py
import pytest import dagger from dagger._connection import SharedConnection from dagger._engine.conn import provision_engine pytestmark = [ pytest.mark.anyio, pytest.mark.slow, ] @pytest.fixture(scope="module") def anyio_backend(): return "asyncio" def test_singleton(): assert SharedConnection() is SharedConnection() async def test_context_manager_provision(): conn = SharedConnection() assert not conn.is_connected(), "Connection should not be established yet." async with dagger.connection(): assert conn.is_connected(), "Connection should be established." out = await ( dagger.container() .from_("alpine:3.16.2") .with_exec(["echo", "-n", "hello"]) .stdout() ) assert out == "hello" assert not conn.is_connected(), "Connection should be closed." class TestConnectionManagement: @pytest.fixture(scope="class", autouse=True) async def _setup(self): # This allow running these tests from the host by auto provisioning. async with provision_engine(dagger.Config(retry=None)) as engine: # Just setup connection, don't connect yet. # We want to test connect and disconnect. conn = engine.get_shared_client_connection() conn_params = conn._params # noqa: SLF001 engine_params = engine.connect_params assert conn_params is not None, "Connection params should be set." assert engine_params is not None, "Engine params should be set." assert conn_params.url == engine_params.url yield @pytest.fixture(autouse=True) async def _assert_connection_status(self): conn = SharedConnection() # Each test should start and end with no established client session. assert not conn.is_connected(), "Connection should not be established yet." yield assert not conn.is_connected(), "Connection should be closed." async def test_connect_with_context_manager(self): async with await dagger.connect() as conn: assert conn.is_connected(), "Connection should be established." out = await ( dagger.container() .from_("alpine:3.16.2") .with_exec(["echo", "-n", "hello"]) .stdout() ) assert out == "hello" async def test_connect_and_close(self): conn = await dagger.connect() assert conn.is_connected(), "Connection should be established." out = await ( dagger.container() .from_("alpine:3.16.2") .with_exec(["echo", "-n", "hello"]) .stdout() ) assert out == "hello" await conn.close() async def test_connect_and_global_close(self): await dagger.connect() out = await ( dagger.container() .from_("alpine:3.16.2") .with_exec(["echo", "-n", "hello"]) .stdout() ) assert out == "hello" await dagger.close() async def test_lazy_connect_and_global_close(self): out = await ( dagger.container() .from_("alpine:3.16.2") .with_exec(["echo", "-n", "hello"]) .stdout() ) assert out == "hello" await dagger.close() async def test_closing(self): async with dagger.closing() as conn: assert not conn.is_connected(), "Connection should not be established." out = await ( dagger.container() .from_("alpine:3.16.2") .with_exec(["echo", "-n", "hello"]) .stdout() ) assert out == "hello"
closed
dagger/dagger
https://github.com/dagger/dagger
5,927
Services v2: Python null types on PortForward
The optional types on PortForward, `frontend` and `protocol` are being sent as `null` to the API when they are not set in the Python SDK. ``` gql.transport.exceptions.TransportQueryError: {'message': 'Syntax Error GraphQL request (3:41) Unexpected Name "null"\n\n2: host {\n3: service: service(ports: [{frontend: null, backend: 3306, protoc ┃ ol: TCP}]) {\n ^\n4: id: id\n', 'locations': [{'line': 3, 'column': 41}]} ```
https://github.com/dagger/dagger/issues/5927
https://github.com/dagger/dagger/pull/6087
ae77f7e930cb917df48850dd5a05b4b3023a9cf4
93fd238a29c2ddde605b9c3a2d9fafa3cf33d989
"2023-10-19T16:07:22Z"
go
"2023-11-08T14:01:14Z"
sdk/python/tests/client/test_integration.py
from datetime import datetime from textwrap import dedent import pytest import dagger pytestmark = [ pytest.mark.anyio, pytest.mark.slow, ] @pytest.fixture(scope="module") def anyio_backend(): return "asyncio" @pytest.fixture(autouse=True, scope="module") async def _connection(): async with dagger.connection(dagger.Config(retry=None)): yield async def test_container(): alpine = dagger.container().from_("alpine:3.16.2") version = await alpine.with_exec(["cat", "/etc/alpine-release"]).stdout() assert version == "3.16.2\n" async def test_git_repository(): repo = dagger.git("https://github.com/dagger/dagger").tag("v0.3.0").tree() readme = await repo.file("README.md").contents() assert readme.split("\n")[0] == "## What is Dagger?" async def test_container_build(): repo = dagger.git("https://github.com/dagger/dagger").tag("v0.3.0").tree() dagger_img = dagger.container().build(repo) out = await dagger_img.with_exec(["version"]).stdout() words = out.strip().split(" ") assert words[0] == "dagger" async def test_container_build_args(): dockerfile = """\ FROM alpine:3.16.2 ARG SPAM=spam ENV SPAM=$SPAM CMD printenv """ out = await ( dagger.container() .build( dagger.directory().with_new_file("Dockerfile", dockerfile), build_args=[dagger.BuildArg("SPAM", "egg")], ) .stdout() ) assert "SPAM=egg" in out @pytest.mark.parametrize("val", ["spam", ""]) async def test_container_with_env_variable(val): out = await ( dagger.container() .from_("alpine:3.16.2") .with_env_variable("FOO", val) .with_exec(["sh", "-c", "echo -n $FOO"]) .stdout() ) assert out == val async def test_container_with_mounted_directory(): dir_ = ( dagger.directory() .with_new_file("hello.txt", "Hello, world!") .with_new_file("goodbye.txt", "Goodbye, world!") ) container = ( dagger.container().from_("alpine:3.16.2").with_mounted_directory("/mnt", dir_) ) out = await container.with_exec(["ls", "/mnt"]).stdout() assert out == dedent( """\ goodbye.txt hello.txt """, ) async def test_container_with_mounted_cache(): cache_key = "example-cache" filename = datetime.now().strftime("%Y-%m-%d-%H-%M-%S") container = ( dagger.container() .from_("alpine:3.16.2") .with_mounted_cache("/cache", dagger.cache_volume(cache_key)) ) out = "" for i in range(5): out = await container.with_exec( [ "sh", "-c", f"echo $0 >> /cache/{filename}.txt; cat /cache/{filename}.txt", str(i), ], ).stdout() assert out == "0\n1\n2\n3\n4\n" async def test_directory(): dir_ = ( dagger.directory() .with_new_file("hello.txt", "Hello, world!") .with_new_file("goodbye.txt", "Goodbye, world!") ) entries = await dir_.entries() assert entries == ["goodbye.txt", "hello.txt"] async def test_host_directory(): readme = await dagger.host().directory(".").file("README.md").contents() assert "Dagger" in readme async def test_object_sequence(tmp_path): # Test that a sequence of objects doesn't fail. # In this case, we're using Container.export's # platform_variants which is a Sequence[Container]. variants = [ dagger.container(platform=dagger.Platform(platform)) .from_("alpine:3.16.2") .with_exec(["uname", "-m"]) for platform in ("linux/amd64", "linux/arm64") ] await dagger.container().export( path=str(tmp_path / "export.tar.gz"), platform_variants=variants, ) async def test_container_with(): def env(ctr: dagger.Container): return ctr.with_env_variable("FOO", "bar") def secret(token: str): def _secret(ctr: dagger.Container): return ctr.with_secret_variable("TOKEN", dagger.set_secret("TOKEN", token)) return _secret await ( dagger.container() .from_("alpine:3.16.2") .with_(env) .with_(secret("baz")) .with_exec(["sh", "-c", "test $FOO = bar && test $TOKEN = baz"]) .sync() ) async def test_container_sync(): base = dagger.container().from_("alpine:3.16.2") # short cirtcut with pytest.raises(dagger.QueryError, match="foobar"): await base.with_exec(["foobar"]).sync() # chaining out = await (await base.with_exec(["echo", "spam"]).sync()).stdout() assert out == "spam\n" async def test_container_awaitable(): base = dagger.container().from_("alpine:3.16.2") # short cirtcut with pytest.raises(dagger.QueryError, match="foobar"): await base.with_exec(["foobar"]) # chaining out = await (await base.with_exec(["echo", "spam"])).stdout() assert out == "spam\n" async def test_directory_sync(): # This feature is tested in core, we're just testing if # sync in different types work. base = dagger.directory().with_new_file("foo", "bar") # short cirtcut with pytest.raises(dagger.QueryError, match="no such file or directory"): await base.directory("foobar").sync() # chaining entries = await (await base.sync()).entries() assert entries == ["foo"] async def test_return_list_of_objects(): envs = await dagger.container().from_("alpine:3.16.2").env_variables() assert await envs[0].name() == "PATH" async def test_env_variable_set(mocker): """Check if private properties can be set manually.""" ctx = mocker.MagicMock() ctx.select.return_value = ctx ctx.execute = mocker.AsyncMock(return_value="BAR") env_var = dagger.EnvVariable(ctx) env_var._name = "FOO" # noqa: SLF001 env_var._value = "foo" # noqa: SLF001 ctx.select.assert_not_called() assert await env_var.name() == "FOO" assert await env_var.value() == "foo" async def test_env_variable_empty(mocker): """Check if private properties don't interrupt normal flow if not set.""" ctx = mocker.MagicMock() ctx.select.return_value = ctx ctx.execute = mocker.AsyncMock(return_value="BAR") env_var = dagger.EnvVariable(ctx) assert await env_var.name() == "BAR"
closed
dagger/dagger
https://github.com/dagger/dagger
5,927
Services v2: Python null types on PortForward
The optional types on PortForward, `frontend` and `protocol` are being sent as `null` to the API when they are not set in the Python SDK. ``` gql.transport.exceptions.TransportQueryError: {'message': 'Syntax Error GraphQL request (3:41) Unexpected Name "null"\n\n2: host {\n3: service: service(ports: [{frontend: null, backend: 3306, protoc ┃ ol: TCP}]) {\n ^\n4: id: id\n', 'locations': [{'line': 3, 'column': 41}]} ```
https://github.com/dagger/dagger/issues/5927
https://github.com/dagger/dagger/pull/6087
ae77f7e930cb917df48850dd5a05b4b3023a9cf4
93fd238a29c2ddde605b9c3a2d9fafa3cf33d989
"2023-10-19T16:07:22Z"
go
"2023-11-08T14:01:14Z"
sdk/python/tests/modules/test_registration.py
import pytest import dagger from dagger.mod import Annotated, Arg, Module from dagger.mod._exceptions import NameConflictError, UserError def test_object_type_resolvers(): mod = Module() @mod.object_type class ExposedClass: private_field: str exposed_field: str = mod.field() def private_method(self) -> str: ... @mod.function def exposed_method(self) -> str: ... def private_function() -> str: ... @mod.function def exposed_function() -> str: ... resolvers = [ (r.name, r.origin.__name__ if r.origin else None) for r in mod._resolvers # noqa: SLF001 ] assert resolvers == [ ("exposed_method", "ExposedClass"), ("exposed_field", "ExposedClass"), ("exposed_function", None), ] def test_no_main_object(): mod = Module() @mod.object_type class Bar: @mod.function def method(self): ... with pytest.raises(UserError, match="doesn't define"): mod.get_resolvers("foo") def test_toplevel_and_class_conflict(): mod = Module() @mod.object_type class Foo: @mod.function def method(self): ... @mod.function def func(): ... with pytest.raises(NameConflictError, match="not both"): mod.get_resolvers("foo") def test_resolver_name_conflict(): mod = Module() @mod.function def foo(): ... @mod.function(name="foo") def foo_(): ... with pytest.raises(NameConflictError, match="“Foo.foo” is defined 2 times"): mod.get_resolvers("foo") @pytest.mark.parametrize( ("mod_name", "class_name"), [ ("foo", "Foo"), ("foo-bar", "FooBar"), ("foo_bar", "FooBar"), ("fooBar", "FooBar"), ("FooBar", "FooBar"), ], ) def test_main_object_name(mod_name, class_name): mod = Module() @mod.function def func(): ... resolvers = mod.get_resolvers(mod_name) assert next(iter(resolvers.keys())).name == class_name @pytest.mark.anyio() async def test_function_and_arg_name_override(): mod = Module() @mod.function(name="import") def import_(from_: Annotated[str, Arg("from")]) -> str: return from_ resolver = mod.get_resolver(mod.get_resolvers("foo"), "Foo", "import") result = await mod.get_result(resolver, dagger.JSON("{}"), {"from": "bar"}) assert result == "bar" async def get_result( mod: Module, parent_name: str, parent_json: str, resolver_name: str, inputs: dict, ): resolver = mod.get_resolver(mod.get_resolvers("foo"), parent_name, resolver_name) return await mod.get_result(resolver, dagger.JSON(parent_json), inputs) @pytest.mark.anyio() class TestNameOverrides: @pytest.fixture(scope="class") def mod(self): _mod = Module() @_mod.object_type class Bar: with_: str = _mod.field(name="with") @_mod.function def bar() -> Bar: return Bar(with_="bar") @_mod.function(name="import") def import_(from_: Annotated[str, Arg("from")]) -> str: return from_ return _mod async def test_function_and_arg_name(self, mod: Module): assert await get_result(mod, "Foo", "{}", "import", {"from": "egg"}) == "egg" async def test_field_unstructure(self, mod: Module): assert await get_result(mod, "Foo", "{}", "bar", {}) == {"with": "bar"} async def test_field_structure(self, mod: Module): assert await get_result(mod, "Bar", '{"with": "baz"}', "with", {}) == "baz"
closed
dagger/dagger
https://github.com/dagger/dagger
6,096
🐞 Python modules: A regular union is documented as a fallback
### What is the issue? When not providing documentation with `Annotated[str | None, Doc("foobar")]`, the union itself is annotated: <pre> Usage: dagger call foo [flags] Flags: <strong> --bar string Represent a PEP 604 union type E.g. for int | str</strong> -h, --help help for foo </pre> It should be empty in this case. ### Steps to reproduce Create module with: ```python from dagger.mod import function @function def foo(bar: str | None = None) -> str: return bar or "foobar" ```` Check help: ```shell ❯ dagger call foo --help ``` ### SDK version Python SDK v0.9.3 ### OS version macOS 13.5.2
https://github.com/dagger/dagger/issues/6096
https://github.com/dagger/dagger/pull/6097
f737550ed8e30b00b510dc07ef2df8a6f14618f3
40a445b12e2886d3305a56de4f14803412c158f1
"2023-11-13T14:18:51Z"
go
"2023-11-14T16:27:11Z"
sdk/python/src/dagger/mod/_utils.py
import builtins import functools import inspect import operator import types import typing from collections.abc import Awaitable from functools import partial from typing import Any, TypeAlias, TypeVar, cast, get_args, get_origin import anyio import anyio.from_thread import anyio.to_thread import cattrs import cattrs.v import typing_extensions from graphql.pyutils import snake_to_camel from ._arguments import Arg asyncify = anyio.to_thread.run_sync syncify = anyio.from_thread.run T = TypeVar("T") AwaitableOrValue: TypeAlias = Awaitable[T] | T async def await_maybe(value: AwaitableOrValue[T]) -> T: return await value if inspect.isawaitable(value) else cast(T, value) def transform_error( exc: Exception, msg: str = "", origin: Any | None = None, typ: type | None = None, ) -> str: """Transform a cattrs error into a list of error messages.""" path = "$" if origin is not None: path = getattr(origin, "__qualname__", "") if hasattr(origin, "__module__"): path = f"{origin.__module__}.{path}" fn = partial(cattrs.transform_error, path=path) if typ is not None: fn = partial( fn, format_exception=lambda e, _: cattrs.v.format_exception(e, typ) ) errors = "; ".join(error.removesuffix(" @ $") for error in fn(exc)) return f"{msg}: {errors}" if msg else errors def to_pascal_case(s: str) -> str: """Convert a string to PascalCase.""" return snake_to_camel(s.replace("-", "_")) def to_camel_case(s: str) -> str: """Convert a string to camelCase.""" return snake_to_camel(s.replace("-", "_"), upper=False) def get_doc(obj: Any) -> str | None: """Get the last Doc() in an annotated type or the docstring of an object.""" if is_annotated(obj): return next( ( arg.documentation for arg in reversed(typing.get_args(obj)) if isinstance(arg, typing_extensions.Doc) ), None, ) return None if inspect.getmodule(obj) == builtins else inspect.getdoc(obj) def get_arg_name(annotation: type) -> str | None: """Get an alternative name in last Arg() of an annotated type.""" if is_annotated(annotation): return next( ( arg.name for arg in reversed(typing.get_args(annotation)) if isinstance(arg, Arg) ), None, ) return None def is_optional(tp: type) -> bool: """Returns True if the annotation is SomeType | None. Does not support Annotated types. Use only on types that have been resolved with get_type_hints. """ # Optionals are represented as unions if get_origin(tp) is not types.UnionType: return False # For a Union to be optional it needs to have at least one None type. return any(x == None.__class__ for x in get_args(tp)) def non_optional(tp: type) -> type: """Removes None from a union. Does not support Annotated types. Use only on types that have been resolved with get_type_hints. """ if not is_optional(tp): return tp args = [x for x in get_args(tp) if x != None.__class__] return args[0] if len(args) == 1 else functools.reduce(operator.or_, args) _T = TypeVar("_T", bound=type) def is_annotated(annotation: type) -> typing.TypeGuard[typing.Annotated]: """Check if the given type is an annotated type.""" return typing.get_origin(annotation) in ( typing.Annotated, typing_extensions.Annotated, ) def strip_annotations(t: _T) -> _T: """Strip the annotations from a given type.""" return strip_annotations(typing.get_args(t)[0]) if is_annotated(t) else t
closed
dagger/dagger
https://github.com/dagger/dagger
6,096
🐞 Python modules: A regular union is documented as a fallback
### What is the issue? When not providing documentation with `Annotated[str | None, Doc("foobar")]`, the union itself is annotated: <pre> Usage: dagger call foo [flags] Flags: <strong> --bar string Represent a PEP 604 union type E.g. for int | str</strong> -h, --help help for foo </pre> It should be empty in this case. ### Steps to reproduce Create module with: ```python from dagger.mod import function @function def foo(bar: str | None = None) -> str: return bar or "foobar" ```` Check help: ```shell ❯ dagger call foo --help ``` ### SDK version Python SDK v0.9.3 ### OS version macOS 13.5.2
https://github.com/dagger/dagger/issues/6096
https://github.com/dagger/dagger/pull/6097
f737550ed8e30b00b510dc07ef2df8a6f14618f3
40a445b12e2886d3305a56de4f14803412c158f1
"2023-11-13T14:18:51Z"
go
"2023-11-14T16:27:11Z"
sdk/python/tests/modules/test_utils.py
from typing import Annotated import pytest from typing_extensions import Doc from dagger.mod._arguments import Arg from dagger.mod._utils import get_arg_name, get_doc, is_optional, non_optional @pytest.mark.parametrize( ("typ", "expected"), [ (str, False), (str | int, False), (str | None, True), ], ) def test_is_optional(typ, expected): assert is_optional(typ) == expected @pytest.mark.parametrize( ("typ", "expected"), [ (str, str), (str | None, str), (str | int | None, str | int), (str | int, str | int), ], ) def test_non_optional(typ, expected): assert non_optional(typ) == expected class ClassWithDocstring: """Foo.""" def func_with_docstring(): """Foo.""" @pytest.mark.parametrize( "annotation", [ ClassWithDocstring, ClassWithDocstring(), func_with_docstring, Annotated[str, Doc("Foo.")], Annotated[str, Doc("Foo."), "Not supported"], Annotated[str, Doc("Bar."), Doc("Foo.")], ], ) def test_get_doc(annotation): assert get_doc(annotation) == "Foo." class ClassWithoutDocstring: ... def func_without_docstring(): ... @pytest.mark.parametrize( "annotation", [ ClassWithoutDocstring, ClassWithoutDocstring(), func_without_docstring, str, Annotated[str, "Not supported"], Annotated[str, Arg("foo")], ], ) def test_no_annotated_doc(annotation): assert get_doc(annotation) is None def test_get_arg_name(): assert get_arg_name(Annotated[str, Arg("foo")]) == "foo" def test_get_last_arg_name(): assert get_arg_name(Annotated[str, Arg("foo"), Arg("bar")]) == "bar" @pytest.mark.parametrize( "annotation", [ str, Annotated[str, Doc("foo")], ], ) def test_no_get_arg_name(annotation): assert get_arg_name(annotation) is None
closed
dagger/dagger
https://github.com/dagger/dagger
6,094
🐞 Python modules: "unsupported union type" error when using `Optional[str]` in a parameter
### What is the issue? Can't use `Optional` in a function parameter (module). Reported by user in [Discord](https://discord.com/channels/707636530424053791/1172173031007862835). ### Log output ``` TypeError: Unsupported union type: typing.Optional[str] ``` ### Steps to reproduce With this module: ```python from typing import Optional from dagger.mod import function @function def foo(bar: Optional[str] = None) str: return bar or "foobar" ``` Run: ```shell ❯ dagger call ``` ### SDK version Python SDK v0.9.3 ### OS version macOs 13.5.2
https://github.com/dagger/dagger/issues/6094
https://github.com/dagger/dagger/pull/6095
40a445b12e2886d3305a56de4f14803412c158f1
86ea539f8a91914981f1be9593d6005c63b7aa7c
"2023-11-13T13:57:03Z"
go
"2023-11-14T16:52:07Z"
sdk/python/pyproject.toml
[build-system] requires = ["hatchling", "hatch-vcs"] build-backend = "hatchling.build" [project] name = "dagger-io" dynamic = ["version"] description = "A client package for running Dagger pipelines in Python." readme = "README.md" license = "Apache-2.0" authors = [ {name = "Dagger", email = "hello@dagger.io"}, ] classifiers = [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Framework :: AnyIO", "Framework :: Pytest", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Typing :: Typed", ] requires-python = ">=3.10" dependencies = [ "anyio>=3.6.2", "cattrs>=22.2.0", "graphql-core>=3.2.3", # TODO: replace gql and httpx dependencies with "gql[httpx]>=3.5.0" when # it's released: https://github.com/graphql-python/gql/releases "gql>=3.4.0", "httpx>=0.23.1", "beartype>=0.11.0", "platformdirs>=2.6.2", "typing_extensions>=4.8.0", "rich>=10.11.0", ] [project.urls] "Homepage" = "https://dagger.io" "Documentation" = "https://docs.dagger.io/sdk/python" "Repository" = "https://github.com/dagger/dagger/tree/main/sdk/python" "Tracker" = "https://github.com/dagger/dagger/issues" "Release Notes" = "https://github.com/dagger/dagger/releases?q=tag%3Asdk%2Fpython%2Fv0" "Community" = "https://discord.gg/ufnyBtc8uY" "Twitter" = "https://twitter.com/dagger_io" [tool.hatch.version] source = "vcs" fallback-version = "0.0.0" [tool.hatch.build.targets.sdist] only-include = [ "src", "tests", "docs", "CHANGELOG.md", ] [tool.hatch.build.targets.wheel] packages = ["src/dagger"] [tool.hatch.envs.default] dependencies = [ "black>=22.3.0", "ruff>=0.0.218", "pytest>=7.2.0", "pytest-mock>=3.10.0", "pytest-subprocess>=1.4.2", "pytest-lazy-fixture>=0.6.3", "pytest-httpx>=0.21.3", ] [tool.hatch.envs.default.scripts] fmt = [ "ruff --fix-only -e {args:. ../../docs/current}", "black {args:. ../../docs/current}", ] lint = [ "ruff check {args:. ../../docs/current}", "black --check {args:. ../../docs/current}", ] test = "pytest -W default" testunit = "pytest -m 'not slow'" # Lock dependencies for CI, otherwise we could get failing checks on # unrelated PRs but not needed locally because it can help catch issues # early from dependency updates. lock = "hatch dep show requirements --all | pip-compile --annotate --resolver=backtracking -U -o requirements.txt -" [tool.hatch.envs.default.env-vars] CUSTOM_COMPILE_COMMAND = "hatch run lock" [tool.hatch.envs.typing] extra-dependencies = ["mypy>=0.942"] scripts = {check = "mypy {args:src/dagger tests}"} [tool.hatch.envs.docs] template = "docs" dependencies = [ "sphinx>=5.3.0", "sphinx-rtd-theme~=1.3.0", ] [tool.hatch.envs.docs.scripts] build = "sphinx-build -v docs docs/_build" server = "python -m http.server -d docs/_build" preview = [ "build", "server", ] [tool.pytest.ini_options] testpaths = ["tests/"] addopts = [ "--import-mode=importlib", ] markers = [ "slow: mark test as slow (integration)", "provision: mark provisioning tests", ] [tool.mypy] disallow_untyped_defs = false follow_imports = "normal" # ignore_missing_imports = true install_types = true non_interactive = true warn_redundant_casts = true pretty = true show_column_numbers = true warn_no_return = false warn_unused_ignores = true [tool.black] include = '\.pyi?$' target-version = ["py310", "py311"] [tool.ruff] src = ["src", "tests"] exclude = ["experimental/*/pyproject.toml"] target-version = "py310" select = ["ALL"] ignore = [ # Type inferrance is ok in a lot of places. "ANN", # This rule doesn't know to ignore a subclass override # so we get false positives for unused arguments. "ARG002", # Black can handle trailing commas automatically. "COM812", # Can't control using a library with boolean arguments. "FBT", # TODO: Document public modules and packages. "D100", "D104", # Imperative mood only makes sense in functions, not classes. "D401", # Not using timezones in this project. "DTZ", # Allow logging with default %. You need custom setup to use `extra`. "G002", # Valid use in pytest, docs and examples. "INP001", # Unnecessary variable assignment before `return` statement # doesn't seem to work as expected. "RET504", # We don't use asserts as runtime validation guarantees. "S101", # Don't guard types. Don't want to stringize them. "TCH", # Don't require author and link in TODO comments. "TD002", "TD003", "FIX002", # Pandas "PD", ] unfixable = [ # Don't remove `print` statements, just warn. "T201", ] [tool.ruff.isort] known-first-party = ["dagger"] [tool.ruff.flake8-bugbear] extend-immutable-calls = ["typer.Option"] [tool.ruff.per-file-ignores] "./docs/*" = ["D1"] "./experimental/*" = ["D1", "T201"] "./src/dagger/client/gen.py" = [ # Not much control over field names and docs coming from the API. # Note: We could detect built-in shadowing like the reserved # keywords but these built-ins aren't being used in the generated # code so no need to bother. "A", "D", # Too hard to properly wrap long lines in codegen. "E501", # Allow access to private members as it's controlled by our own library. "SLF001", # Too many arguments to function call. "PLR0913", # `Optional` is preferred over `| None` because of how # beartype handles forward references. "UP007", ] # Ignore built-in shadowing in test mocks. "./tests/client/test_inputs.py" = ["A", "ERA001"] "./tests/*.py" = [ # Ignore security issues in tests. "S", # Magic value comparison doesn't apply to tests. "PLR2004", # Allow more than one statement in pytest.raises. "PT012", # No public interfaces. "D1", # Allow accessing private fields in tests. "SLF001", ] # Allow some patterns to redefine imports in __init__. "__init__.py" = ["I001", "F401", "F403", "PLC0414"] # Typer uses boolean parameters for the CLI. Let it. "./src/**/cli.py" = ["FBT"] [tool.ruff.pydocstyle] convention = "numpy"
closed
dagger/dagger
https://github.com/dagger/dagger
6,094
🐞 Python modules: "unsupported union type" error when using `Optional[str]` in a parameter
### What is the issue? Can't use `Optional` in a function parameter (module). Reported by user in [Discord](https://discord.com/channels/707636530424053791/1172173031007862835). ### Log output ``` TypeError: Unsupported union type: typing.Optional[str] ``` ### Steps to reproduce With this module: ```python from typing import Optional from dagger.mod import function @function def foo(bar: Optional[str] = None) str: return bar or "foobar" ``` Run: ```shell ❯ dagger call ``` ### SDK version Python SDK v0.9.3 ### OS version macOs 13.5.2
https://github.com/dagger/dagger/issues/6094
https://github.com/dagger/dagger/pull/6095
40a445b12e2886d3305a56de4f14803412c158f1
86ea539f8a91914981f1be9593d6005c63b7aa7c
"2023-11-13T13:57:03Z"
go
"2023-11-14T16:52:07Z"
sdk/python/src/dagger/mod/_converter.py
import inspect import logging import typing from collections.abc import Sequence import typing_extensions from cattrs.preconf.json import make_converter as make_json_converter from ._types import MissingType, ObjectDefinition from ._utils import ( get_doc, is_optional, non_optional, strip_annotations, syncify, ) logger = logging.getLogger(__name__) if typing.TYPE_CHECKING: from dagger import TypeDef def make_converter(): import dagger from dagger.client._guards import is_id_type, is_id_type_subclass conv = make_json_converter( omit_if_default=True, detailed_validation=True, ) # TODO: register cache volume for custom handling since it's different # than the other types. def dagger_type_structure(id_, cls): """Get dagger object type from id.""" cls = strip_annotations(cls) return dagger.default_client()._get_object_instance(id_, cls) # noqa: SLF001 def dagger_type_unstructure(obj): """Get id from dagger object.""" if not is_id_type(obj): msg = f"Expected dagger Type object, got `{type(obj)}`" raise TypeError(msg) return syncify(obj.id) conv.register_structure_hook_func( is_id_type_subclass, dagger_type_structure, ) conv.register_unstructure_hook_func( is_id_type_subclass, dagger_type_unstructure, ) return conv def to_typedef(annotation: type) -> "TypeDef": # noqa: C901 """Convert Python object to API type.""" assert typing.get_origin(annotation) not in ( typing.Annotated, typing_extensions.Annotated, ), "Annotated types should be handled by the caller." import dagger from dagger.client._guards import is_id_type_subclass td = dagger.type_def() if is_optional(annotation): td = td.with_optional(True) annotation = non_optional(annotation) if annotation is MissingType: return td.with_kind(dagger.TypeDefKind.VoidKind) builtins = { str: dagger.TypeDefKind.StringKind, int: dagger.TypeDefKind.IntegerKind, bool: dagger.TypeDefKind.BooleanKind, } if annotation in builtins: return td.with_kind(builtins[annotation]) if origin := typing.get_origin(annotation): # Can't represent unions in the API. if origin is typing.Union: msg = f"Unsupported union type: {annotation}" raise TypeError(msg) if issubclass(origin, Sequence): of_type, *rest = typing.get_args(annotation) if rest: msg = ( "Unsupported sequence type with multiple " f"element types: {annotation}" ) raise TypeError(msg) return td.with_list_of(to_typedef(of_type)) elif issubclass(annotation, Sequence): msg = ( "Unsupported sequence type without subscripted " f"elements type: {annotation}" ) raise TypeError(msg) if inspect.isclass(annotation): custom_obj: ObjectDefinition | None = getattr( annotation, "__dagger_type__", None ) if custom_obj is not None: return td.with_object( custom_obj.name, description=custom_obj.doc, ) if is_id_type_subclass(annotation): return td.with_object(annotation.__name__) return td.with_object( annotation.__name__, description=get_doc(annotation), ) msg = f"Unsupported type: {annotation!r}" raise TypeError(msg)
closed
dagger/dagger
https://github.com/dagger/dagger
6,094
🐞 Python modules: "unsupported union type" error when using `Optional[str]` in a parameter
### What is the issue? Can't use `Optional` in a function parameter (module). Reported by user in [Discord](https://discord.com/channels/707636530424053791/1172173031007862835). ### Log output ``` TypeError: Unsupported union type: typing.Optional[str] ``` ### Steps to reproduce With this module: ```python from typing import Optional from dagger.mod import function @function def foo(bar: Optional[str] = None) str: return bar or "foobar" ``` Run: ```shell ❯ dagger call ``` ### SDK version Python SDK v0.9.3 ### OS version macOs 13.5.2
https://github.com/dagger/dagger/issues/6094
https://github.com/dagger/dagger/pull/6095
40a445b12e2886d3305a56de4f14803412c158f1
86ea539f8a91914981f1be9593d6005c63b7aa7c
"2023-11-13T13:57:03Z"
go
"2023-11-14T16:52:07Z"
sdk/python/src/dagger/mod/_utils.py
import builtins import functools import inspect import operator import types import typing from collections.abc import Awaitable from functools import partial from typing import Any, TypeAlias, TypeVar, cast, get_args, get_origin import anyio import anyio.from_thread import anyio.to_thread import cattrs import cattrs.v import typing_extensions from graphql.pyutils import snake_to_camel from ._arguments import Arg asyncify = anyio.to_thread.run_sync syncify = anyio.from_thread.run T = TypeVar("T") AwaitableOrValue: TypeAlias = Awaitable[T] | T async def await_maybe(value: AwaitableOrValue[T]) -> T: return await value if inspect.isawaitable(value) else cast(T, value) def transform_error( exc: Exception, msg: str = "", origin: Any | None = None, typ: type | None = None, ) -> str: """Transform a cattrs error into a list of error messages.""" path = "$" if origin is not None: path = getattr(origin, "__qualname__", "") if hasattr(origin, "__module__"): path = f"{origin.__module__}.{path}" fn = partial(cattrs.transform_error, path=path) if typ is not None: fn = partial( fn, format_exception=lambda e, _: cattrs.v.format_exception(e, typ) ) errors = "; ".join(error.removesuffix(" @ $") for error in fn(exc)) return f"{msg}: {errors}" if msg else errors def to_pascal_case(s: str) -> str: """Convert a string to PascalCase.""" return snake_to_camel(s.replace("-", "_")) def to_camel_case(s: str) -> str: """Convert a string to camelCase.""" return snake_to_camel(s.replace("-", "_"), upper=False) def get_doc(obj: Any) -> str | None: """Get the last Doc() in an annotated type or the docstring of an object.""" if is_annotated(obj): return next( ( arg.documentation for arg in reversed(typing.get_args(obj)) if isinstance(arg, typing_extensions.Doc) ), None, ) if inspect.getmodule(obj) != builtins and ( inspect.isclass(obj) or inspect.isfunction(obj) ): return inspect.getdoc(obj) return None def get_arg_name(annotation: type) -> str | None: """Get an alternative name in last Arg() of an annotated type.""" if is_annotated(annotation): return next( ( arg.name for arg in reversed(typing.get_args(annotation)) if isinstance(arg, Arg) ), None, ) return None def is_optional(tp: type) -> bool: """Returns True if the annotation is SomeType | None. Does not support Annotated types. Use only on types that have been resolved with get_type_hints. """ # Optionals are represented as unions if get_origin(tp) is not types.UnionType: return False # For a Union to be optional it needs to have at least one None type. return any(x == None.__class__ for x in get_args(tp)) def non_optional(tp: type) -> type: """Removes None from a union. Does not support Annotated types. Use only on types that have been resolved with get_type_hints. """ if not is_optional(tp): return tp args = [x for x in get_args(tp) if x != None.__class__] return args[0] if len(args) == 1 else functools.reduce(operator.or_, args) _T = TypeVar("_T", bound=type) def is_annotated(annotation: type) -> typing.TypeGuard[typing.Annotated]: """Check if the given type is an annotated type.""" return typing.get_origin(annotation) in ( typing.Annotated, typing_extensions.Annotated, ) def strip_annotations(t: _T) -> _T: """Strip the annotations from a given type.""" return strip_annotations(typing.get_args(t)[0]) if is_annotated(t) else t
closed
dagger/dagger
https://github.com/dagger/dagger
6,094
🐞 Python modules: "unsupported union type" error when using `Optional[str]` in a parameter
### What is the issue? Can't use `Optional` in a function parameter (module). Reported by user in [Discord](https://discord.com/channels/707636530424053791/1172173031007862835). ### Log output ``` TypeError: Unsupported union type: typing.Optional[str] ``` ### Steps to reproduce With this module: ```python from typing import Optional from dagger.mod import function @function def foo(bar: Optional[str] = None) str: return bar or "foobar" ``` Run: ```shell ❯ dagger call ``` ### SDK version Python SDK v0.9.3 ### OS version macOs 13.5.2
https://github.com/dagger/dagger/issues/6094
https://github.com/dagger/dagger/pull/6095
40a445b12e2886d3305a56de4f14803412c158f1
86ea539f8a91914981f1be9593d6005c63b7aa7c
"2023-11-13T13:57:03Z"
go
"2023-11-14T16:52:07Z"
sdk/python/tests/modules/test_utils.py
from typing import Annotated import pytest from typing_extensions import Doc from dagger.mod._arguments import Arg from dagger.mod._utils import get_arg_name, get_doc, is_optional, non_optional @pytest.mark.parametrize( ("typ", "expected"), [ (str, False), (str | int, False), (str | None, True), ], ) def test_is_optional(typ, expected): assert is_optional(typ) == expected @pytest.mark.parametrize( ("typ", "expected"), [ (str, str), (str | None, str), (str | int | None, str | int), (str | int, str | int), ], ) def test_non_optional(typ, expected): assert non_optional(typ) == expected class ClassWithDocstring: """Foo.""" def func_with_docstring(): """Foo.""" async def async_func_with_docstring(): """Foo.""" @pytest.mark.parametrize( "annotation", [ ClassWithDocstring, func_with_docstring, async_func_with_docstring, Annotated[str, Doc("Foo.")], Annotated[str | None, Doc("Foo.")], Annotated[str, Doc("Foo."), "Not supported"], Annotated[str, Doc("Bar."), Doc("Foo.")], ], ) def test_get_doc(annotation): assert get_doc(annotation) == "Foo." class ClassWithoutDocstring: ... def func_without_docstring(): ... async def async_func_without_docstring(): ... @pytest.mark.parametrize( "annotation", [ ClassWithoutDocstring, func_without_docstring, async_func_without_docstring, str, str | None, Annotated[str, "Not supported"], Annotated[str, Arg("foo")], ], ) def test_no_annotated_doc(annotation): assert get_doc(annotation) is None def test_get_arg_name(): assert get_arg_name(Annotated[str, Arg("foo")]) == "foo" def test_get_last_arg_name(): assert get_arg_name(Annotated[str, Arg("foo"), Arg("bar")]) == "bar" @pytest.mark.parametrize( "annotation", [ str, Annotated[str, Doc("foo")], ], ) def test_no_get_arg_name(annotation): assert get_arg_name(annotation) is None
closed
dagger/dagger
https://github.com/dagger/dagger
6,090
Python SDK: module dependency w/ doc string that ends in `"` causes error
Repro: ``` mkdir -p test/submod cd test/submod dagger mod init --sdk=go --name=submod cd .. dagger mod init --sdk=python --name=test dagger mod install ./submod dagger functions ``` Error: ``` ✘ exec /runtime ERROR [0.49s] ┃ Traceback (most recent call last): ┃ File "/runtime", line 3, in <module> ┃ from dagger.mod.cli import app ┃ File "/sdk/src/dagger/__init__.py", line 22, in <module> ┃ from .client.gen import * ┃ File "/sdk/src/dagger/client/gen.py", line 4254 ┃ """example usage: "dagger call container-echo --string-arg yo"""" ┃ ^ ┃ SyntaxError: unterminated string literal (detected at line 4254) ``` The problem is that the dependency has a doc string that ends in `"`, which breaks when wrapped w/ `"""` cc @helderco
https://github.com/dagger/dagger/issues/6090
https://github.com/dagger/dagger/pull/6104
758604428f70ac78df9106017e2dfa2f62436ecf
0def6c777bbd4f7b284f9bee68d8f3f58e16c0b6
"2023-11-08T16:55:48Z"
go
"2023-11-14T19:25:49Z"
sdk/python/.changes/unreleased/Fixed-20231113-164527.yaml
closed
dagger/dagger
https://github.com/dagger/dagger
6,090
Python SDK: module dependency w/ doc string that ends in `"` causes error
Repro: ``` mkdir -p test/submod cd test/submod dagger mod init --sdk=go --name=submod cd .. dagger mod init --sdk=python --name=test dagger mod install ./submod dagger functions ``` Error: ``` ✘ exec /runtime ERROR [0.49s] ┃ Traceback (most recent call last): ┃ File "/runtime", line 3, in <module> ┃ from dagger.mod.cli import app ┃ File "/sdk/src/dagger/__init__.py", line 22, in <module> ┃ from .client.gen import * ┃ File "/sdk/src/dagger/client/gen.py", line 4254 ┃ """example usage: "dagger call container-echo --string-arg yo"""" ┃ ^ ┃ SyntaxError: unterminated string literal (detected at line 4254) ``` The problem is that the dependency has a doc string that ends in `"`, which breaks when wrapped w/ `"""` cc @helderco
https://github.com/dagger/dagger/issues/6090
https://github.com/dagger/dagger/pull/6104
758604428f70ac78df9106017e2dfa2f62436ecf
0def6c777bbd4f7b284f9bee68d8f3f58e16c0b6
"2023-11-08T16:55:48Z"
go
"2023-11-14T19:25:49Z"
sdk/python/src/dagger/_codegen/generator.py
import enum import functools import itertools import logging import re import textwrap from abc import ABC, abstractmethod from collections.abc import Callable, Iterator from dataclasses import InitVar, dataclass, field from datetime import date, datetime, time from decimal import Decimal from functools import partial from itertools import chain, groupby from keyword import iskeyword from operator import itemgetter from typing import ( ClassVar, Generic, ParamSpec, Protocol, TypeAlias, TypeGuard, TypeVar, cast, ) from graphql import ( GraphQLArgument, GraphQLEnumType, GraphQLField, GraphQLFieldMap, GraphQLInputField, GraphQLInputFieldMap, GraphQLInputObjectType, GraphQLInputType, GraphQLLeafType, GraphQLList, GraphQLNamedType, GraphQLNonNull, GraphQLObjectType, GraphQLOutputType, GraphQLScalarType, GraphQLSchema, GraphQLType, GraphQLWrappingType, Undefined, assert_leaf_type, assert_object_type, get_named_type, is_leaf_type, is_required_argument, ) from graphql.pyutils import camel_to_snake from graphql.type.schema import TypeMap ACRONYM_RE = re.compile(r"([A-Z\d]+)(?=[A-Z\d]|$)") """Pattern for grouping initialisms.""" DEPRECATION_RE = re.compile(r"`([a-zA-Z\d_]+)`") """Pattern for extracting replaced references in deprecations.""" logger = logging.getLogger(__name__) indent = partial(textwrap.indent, prefix=" " * 4) wrap = textwrap.wrap wrap_indent = partial(wrap, initial_indent=" " * 4, subsequent_indent=" " * 4) T_ParamSpec = ParamSpec("T_ParamSpec") # These alias types are used to make the code more self-documenting. IDName: TypeAlias = str TypeName: TypeAlias = str FieldName: TypeAlias = str PythonName: TypeAlias = str OutputTypeFormat: TypeAlias = str IDMap: TypeAlias = dict[IDName, TypeName] IDQueryMap: TypeAlias = dict[IDName, FieldName] SimpleFieldMap: TypeAlias = dict[FieldName, "SimpleField"] SimpleObjectsMap: TypeAlias = dict[TypeName, SimpleFieldMap] def joiner(func: Callable[T_ParamSpec, Iterator[str]]) -> Callable[T_ParamSpec, str]: """Join elements with a new line from an iterator.""" @functools.wraps(func) def wrapper(*args: T_ParamSpec.args, **kwargs: T_ParamSpec.kwargs) -> str: return "\n".join(func(*args, **kwargs)) return wrapper class Scalars(enum.Enum): ID = str Int = int String = str # noqa: PIE796 Float = float Boolean = bool Date = date DateTime = datetime Time = time Decimal = Decimal @classmethod def from_type(cls, t: GraphQLScalarType) -> str: try: return cls[t.name].value.__name__ except KeyError: return t.name @dataclass class Context: """Shared state during execution.""" id_map: IDMap """Map to convert ids (custom scalars) to corresponding types.""" id_query_map: IDQueryMap """Map to convert types to ids.""" simple_objects_map: SimpleObjectsMap """Map of simple leaf fields for types that are returned in lists.""" defined: set[str] = field(default_factory=set) """Types that have already been defined.""" remaining: set[str] = field(default_factory=set) """Remaining type names that haven't been defined yet.""" def process_type(self, name: str): # This is only needed to keep track of remaining types because # of forward references. self.remaining.remove(name) self.defined.add(name) _H = TypeVar("_H", bound=GraphQLNamedType) """Handler generic type""" Predicate: TypeAlias = Callable[..., bool] @dataclass class Handler(ABC, Generic[_H]): ctx: Context """Generation execution context.""" predicate: ClassVar[Predicate] = staticmethod(lambda _: False) """Does this handler render the given type?""" def supertype_name(self, _: _H) -> str: return self.__class__.__name__ def type_name(self, t: _H) -> str: return t.name @joiner def render(self, t: _H) -> Iterator[str]: yield "" yield self.render_head(t) yield indent(self.render_body(t)) yield "" def render_head(self, t: _H) -> str: return f"class {self.type_name(t)}({self.supertype_name(t)}):" @joiner def render_body(self, t: _H) -> Iterator[str]: if t.description: yield from wrap(doc(t.description)) @joiner def generate(schema: GraphQLSchema) -> Iterator[str]: """Code generation main function.""" yield textwrap.dedent( """\ # Code generated by dagger. DO NOT EDIT. import warnings from collections.abc import Callable, Sequence from dataclasses import dataclass from typing import Optional from ._core import Arg, Root from ._guards import typecheck from .base import Enum, Input, Scalar, Type """, ) # Pre-create handy maps to make handler code simpler. id_map = create_id_map(schema.type_map) id_query_map = create_id_query_map(id_map, schema.type_map) simple_objects_map = create_simple_objects_map(schema.type_map) # shared state between all handler instances ctx = Context( id_map=id_map, id_query_map=id_query_map, simple_objects_map=simple_objects_map, ) handlers: tuple[Handler, ...] = ( Scalar(ctx), Enum(ctx), Input(ctx), Object(ctx), ) # Split into two iterators to update ctx.remaining. types_n, types_g = itertools.tee(get_grouped_types(handlers, schema.type_map)) # Track types that haven't been defined yet, to format as a forward reference. ctx.remaining.update(name for _, name, _ in types_n) for handler, type_name, named_type in types_g: yield handler.render(named_type) ctx.process_type(type_name) yield render_default_client( ctx.defined, get_root_fields(schema.type_map), ) yield "" yield "__all__ = [" yield from (indent(f"{quote(name)},") for name in sorted(ctx.defined)) yield "]" def create_id_map(type_map: TypeMap) -> IDMap: """Create a map of id type names to object type names. Used to replace custom scalars by objects in inputs. """ def _iter(): for type_name, t in type_map.items(): if not is_object_type(t): continue fields: dict[str, GraphQLField] = t.fields for field_name, f in fields.items(): if field_name == "id": field_type = get_named_type(f.type) yield field_type.name, type_name return dict(_iter()) def create_id_query_map(id_map: IDMap, type_map: TypeMap) -> IDQueryMap: """Create a map of id type names to Query field names. Collects fields under Query that receive an id argument and return an object type that also has an id field that returns the same id type as the Query field argument. Example: `Query.directory(id: DirectoryID): Directory` matches `Directory.id(): DirectoryID` Used to create a classmethod that returns a Directory instance from a DirectoryID by telling us which field to query for. """ def _iter(): for field_name, f in get_root_fields(type_map).items(): field_type = get_named_type(f.type) id_arg = f.args.get("id") # Ignore fields that have required arguments other than id. if not id_arg or any( is_required_argument(arg) for arg_name, arg in f.args.items() if arg_name != "id" ): continue id_type = get_named_type(id_arg.type) if id_map.get(id_type.name) == field_type.name: yield id_type.name, field_name return dict(_iter()) def get_root_fields(type_map: TypeMap) -> GraphQLFieldMap: """Get all fields under Query.""" return cast(GraphQLObjectType, type_map["Query"]).fields @joiner def render_default_client( defined: set[str], root_fields: GraphQLFieldMap ) -> Iterator[str]: names = sorted(format_name(name) for name in root_fields) yield "_client = Client()" yield from (f"{name} = _client.{name}" for name in names) defined.update(names) yield textwrap.dedent( '''\ def default_client() -> Client: """Return the default client instance.""" return _client ''' ) defined.add("default_client") @dataclass(slots=True) class SimpleField: name: InitVar[str] graphql_type: InitVar[GraphQLLeafType] python_name: str = field(init=False) graphql_name: str = field(init=False) type_format: str = field(init=False) def __post_init__(self, name: str, graphql_field: GraphQLLeafType): graphql_field = assert_leaf_type(graphql_field) self.graphql_name = name # Create a private version of the field to avoid name clashes. self.python_name = f"_{format_name(name)}" self.type_format = format_output_type(graphql_field) def as_kwarg(self) -> str: return f"{self}={quote(self.graphql_name)}" def as_attr(self) -> str: return f"{self}: {self.type_format}" def __str__(self) -> str: return self.python_name def create_simple_objects_map(type_map: TypeMap) -> SimpleObjectsMap: """Create a map of object type names that are returned in lists. The values are maps of python attribute names to the simple leaf GraphQL fields that they represent. This is used to populate object types with pre-selected fields when they are returned in lists because our simple chainable API makes it hard to query a field that comes from a list (i.e., which index in the list to get the result from?). """ def _leaf_fields(named_type: GraphQLNamedType): # Assertion for type checker. Already guaranteed by get_lists_of_object_types object_type = assert_object_type(named_type) for f_name, f in object_type.fields.items(): field_name = str(f_name) # This strips all wrapping (e.g., List, NonNull) from the type. named_field_type = get_named_type(f.type) # Ignore id fields which have special meaning. if field_name != "id" and is_leaf_type(named_field_type): yield field_name, SimpleField(field_name, named_field_type) return { named_type.name: dict(_leaf_fields(type_map[named_type.name])) for named_type in set(get_lists_of_object_types(type_map)) } def get_lists_of_object_types(type_map: TypeMap): """Get object types that are returned in lists.""" for t in type_map.values(): if t.name.startswith("_") or not is_object_type(t): continue for f in t.fields.values(): if is_list_of_objects_type(f.type): yield get_named_type(f.type) def get_grouped_types(handlers: tuple[Handler, ...], type_map: TypeMap): """Group types by handler and sorted by their name.""" def _filtered(): for n, t in type_map.items(): if n.startswith("_") or is_builtin_scalar_type(t): continue for i, handler in enumerate(handlers): if handler.predicate(t): yield i, n for _, items in groupby(sorted(_filtered()), itemgetter(0)): for index, name in items: named_type = type_map[name] handler = handlers[index] formatted_name = handler.type_name(named_type) yield handler, formatted_name, named_type # TODO: these typeguards should be contributed upstream # https://github.com/graphql-python/graphql-core/issues/183 def is_required_type(t: GraphQLType) -> TypeGuard[GraphQLNonNull]: return isinstance(t, GraphQLNonNull) def is_list_type(t: GraphQLType) -> TypeGuard[GraphQLList]: if is_required_type(t): t = t.of_type return isinstance(t, GraphQLList) def is_list_of_objects_type( t: GraphQLType, ) -> TypeGuard[GraphQLList[GraphQLObjectType]]: return is_list_type(t) and is_object_type(get_named_type(t)) def is_wrapping_type(t: GraphQLType) -> TypeGuard[GraphQLWrappingType]: return isinstance(t, GraphQLWrappingType) def is_scalar_type(t: GraphQLType) -> TypeGuard[GraphQLScalarType]: return isinstance(t, GraphQLScalarType) def is_input_object_type(t: GraphQLType) -> TypeGuard[GraphQLInputObjectType]: return isinstance(t, GraphQLInputObjectType) def is_object_type(t: GraphQLType) -> TypeGuard[GraphQLObjectType]: return isinstance(t, GraphQLObjectType) def is_output_leaf_type(t: GraphQLOutputType) -> TypeGuard[GraphQLLeafType]: return is_leaf_type(get_named_type(t)) def is_custom_scalar_type(t: GraphQLType) -> TypeGuard[GraphQLScalarType]: t = get_named_type(t) return is_scalar_type(t) and t.name not in Scalars.__members__ def is_builtin_scalar_type(t: GraphQLNamedType) -> TypeGuard[GraphQLScalarType]: return is_scalar_type(t) and not is_custom_scalar_type(t) def is_enum_type(t: GraphQLNamedType) -> TypeGuard[GraphQLEnumType]: return isinstance(t, GraphQLEnumType) def is_self_chainable(t: GraphQLObjectType) -> bool: """Checks if an object type has any fields that return that same type.""" return any( f for f in t.fields.values() # Only consider fields that return a non-null object. if is_required_type(f.type) and is_object_type(f.type.of_type) and f.type.of_type.name == t.name ) def format_name(s: str) -> str: """Format a GraphQL field or argument name into Python.""" # rewrite acronyms, initialisms and abbreviations s = ACRONYM_RE.sub(lambda m: m.group(0).title(), s) s = camel_to_snake(s) if iskeyword(s): s += "_" return s def format_input_type(t: GraphQLInputType, id_map: IDMap) -> str: """May be used in an input object field or an object field parameter.""" if is_required_type(t): t = t.of_type fmt = "%s" else: fmt = "Optional[%s]" if is_list_type(t): return fmt % f"list[{format_input_type(t.of_type, id_map)}]" if is_custom_scalar_type(t) and t.name in id_map: return fmt % id_map[t.name] return fmt % (Scalars.from_type(t) if is_scalar_type(t) else get_named_type(t).name) def format_output_type(t: GraphQLOutputType) -> str: """May be used as the output type of an object field.""" # When returning objects we're in query building mode, so don't return # None even if the field's return is optional. if not is_output_leaf_type(t) and not is_required_type(t): t = GraphQLNonNull(t) return format_input_type(t, {}) def output_type_description(t: GraphQLOutputType) -> str: if is_wrapping_type(t): return output_type_description(t.of_type) if isinstance(t, GraphQLNamedType) and t.description: return t.description return "" def doc(s: str) -> str: """Wrap string in docstring quotes.""" if "\n" in s: s = f"{s}\n" return f'"""{s}"""' def quote(s: str) -> str: """Wrap string in quotes.""" return f'"{s}"' class _InputField: """Input object field or object field argument.""" def __init__( self, ctx: Context, name: str, graphql: GraphQLInputField | GraphQLArgument, parent: "_ObjectField| None" = None, ) -> None: self.ctx = ctx self.graphql_name = name self.graphql = graphql self.name = format_name(name) self.named_type = get_named_type(graphql.type) # On object type fields, don't replace ID scalar with object # only if field name is `id` and the corresponding type is different # from the output type (e.g., `file(id: FileID) -> File`). id_map = ctx.id_map if ( name == "id" and is_custom_scalar_type(graphql.type) and self.named_type.name in id_map and parent and get_named_type(parent.graphql.type).name == id_map[self.named_type.name] ): id_map = {} self.type = format_input_type(graphql.type, id_map) self.description = graphql.description self.has_default = graphql.default_value is not Undefined self.default_value = graphql.default_value if not is_required_type(graphql.type) and not self.has_default: self.default_value = None self.has_default = True @joiner def __str__(self) -> Iterator[str]: """Output for an InputObject field.""" yield "" field = self.as_param() # Add quotes around types that haven't been defined yet (forward references). if self.ctx.remaining: field = re.sub(rf"\b({'|'.join(self.ctx.remaining)})\b", r'"\1"', field) yield field if self.description: yield doc(self.description) def as_param(self) -> str: """As a parameter in a function signature.""" # broaden list types to Sequence on field inputs typ = re.sub(r"list\[", "Sequence[", self.type) out = f"{self.name}: {typ}" if self.has_default: # repr uses single quotes for strings, contrary to black val = repr(self.default_value).replace("'", '"') out = f"{out} = {val}" return out @joiner def as_doc(self) -> Iterator[str]: """As a part of a docstring.""" yield f"{self.name}:" if self.description: for line in self.description.split("\n"): yield from wrap_indent(line) def as_arg(self) -> str: """As a Arg object for the query builder.""" params = [quote(self.graphql_name), self.name] comment = "" if self.has_default: # repr uses single quotes for strings, contrary to black params.append(repr(self.default_value).replace("'", '"')) return f"Arg({', '.join(params)}),{comment}" class _ObjectField: """Field of an object type.""" def __init__( self, ctx: Context, name: str, field: GraphQLField, parent: GraphQLObjectType, ) -> None: self.ctx = ctx self.graphql_name = name self.graphql = field self.name = format_name(name) self.named_type = get_named_type(field.type) self.required_args = [] self.default_args = [] for args in field.args.items(): arg = _InputField(ctx, *args, parent=self) (self.default_args if arg.has_default else self.required_args).append(arg) self.args = self.required_args + self.default_args self.description = field.description self.is_custom_scalar = is_custom_scalar_type(field.type) self.is_leaf = is_output_leaf_type(field.type) self.is_exec = self.is_leaf self.type = format_output_type(field.type).replace("Query", "Client") self.parent_name = get_named_type(parent).name # If this field returns a list of objects, get the type's fields # for pre-selection. self.sub_select_slots = () if is_list_of_objects_type(field.type): self.is_exec = True self.sub_select_slots = tuple( ctx.simple_objects_map.get(self.named_type.name, {}).values() ) # Slot fields are fields that can be prefilled from the result of a list. self.slot_field = self.ctx.simple_objects_map.get(self.parent_name, {}).get( name ) # Currently, `sync` is the only field where the error is all we # care about but more could be added later. # To avoid wasting a result, we return the ID which is a leaf value # and triggers execution, but then convert to object in the SDK to # allow continued chaining. self.convert_id = False if ( name != "id" and self.is_leaf and self.is_custom_scalar and self.named_type.name in ctx.id_map ): converted = ctx.id_map[self.named_type.name] if self.parent_name == converted: self.type = converted self.convert_id = True self.id_query_field = self.ctx.id_query_map.get(self.named_type.name) @joiner def __str__(self) -> Iterator[str]: yield from ( "", "@typecheck", self.func_signature(), indent(self.func_body()), ) # convenience to await any object that has a sync method # without having to call it explicitly if self.is_leaf and self.name == "sync": yield from ( "", "def __await__(self):", indent("return self.sync().__await__()"), ) if self.name == "id": yield from ( "", "@classmethod", "def _id_type(cls) -> type[Scalar]:", indent(f"return {self.type}"), ) if self.id_query_field: yield from ( "", "@classmethod", "def _from_id_query_field(cls):", indent(f'return "{self.id_query_field}"'), ) def func_signature(self) -> str: params = ", ".join( chain( ("self",), (a.as_param() for a in self.required_args), ("*",) if self.default_args else (), (a.as_param() for a in self.default_args), ) ) # arbitrary heuristic to force trailing comma in long signatures if len(params) > 40: # noqa: PLR2004 params = f"{params}," sig = f"def {self.name}({params}) -> {self.type}:" if self.is_exec: sig = f"async {sig}" # Add quotes around types that haven't been defined yet (forward references). if self.ctx.remaining: sig = re.sub(rf"\b({'|'.join(self.ctx.remaining)})\b", r'"\1"', sig) return sig @joiner def func_body(self) -> Iterator[str]: if docstring := self.func_doc(): yield doc(docstring) if deprecated := self.deprecated(): msg = f'Method "{self.name}" is deprecated: {deprecated}'.replace( '"', '\\"' ) yield textwrap.dedent( f"""\ warnings.warn( "{msg}", DeprecationWarning, stacklevel=4, )\ """ ) if self.slot_field: yield f'if hasattr(self, "{self.slot_field.python_name}"):' yield indent(f"return self.{self.slot_field.python_name}") if not self.args: yield "_args: list[Arg] = []" else: yield "_args = [" yield from (indent(arg.as_arg()) for arg in self.args) yield "]" yield f'_ctx = self._select("{self.graphql_name}", _args)' if self.is_exec: if self.convert_id: if _field := self.id_query_field: yield f"_id = await _ctx.execute({self.named_type.name})" yield ( f'_ctx = Client.from_context(_ctx)._select("{_field}",' ' [Arg("id", _id)])' ) yield f"return {self.type}(_ctx)" else: yield "await _ctx.execute()" yield "return self" else: if slots := self.sub_select_slots: target = self.named_type.name kwargs = ", ".join(s.as_kwarg() for s in slots) yield f"_ctx = {target}(_ctx)._select_multiple({kwargs},)" yield f"return await _ctx.execute({self.type})" else: yield f"return {self.type}(_ctx)" def func_doc(self) -> str: def _out(): if self.description: yield (textwrap.fill(line) for line in self.description.splitlines()) if deprecated := self.deprecated(":py:meth:`", "`"): yield chain( (".. deprecated::",), wrap_indent(deprecated), ) if self.name == "id": yield ( "Note", "----", "This is lazyly evaluated, no operation is actually run.", ) if any(arg.description for arg in self.args): yield chain( ( "Parameters", "----------", ), (arg.as_doc() for arg in self.args), ) if self.is_leaf: return_doc = output_type_description(self.graphql.type) if not self.convert_id and return_doc: yield chain( ( "Returns", "-------", self.type, ), wrap_indent(return_doc), ) yield chain( ( "Raises", "------", "ExecuteTimeoutError", ), wrap_indent( "If the time to execute the query exceeds the " "configured timeout." ), ( "QueryError", indent("If the API returns an error."), ), ) return "\n\n".join("\n".join(section) for section in _out()) def deprecated(self, prefix='"', suffix='"') -> str: def _format_name(m): name = format_name(m.group().strip("`")) return f"{prefix}{name}{suffix}" return ( DEPRECATION_RE.sub(_format_name, reason) if (reason := self.graphql.deprecation_reason) else "" ) @dataclass class Scalar(Handler[GraphQLScalarType]): predicate: ClassVar[Predicate] = staticmethod(is_custom_scalar_type) def render_body(self, t: GraphQLScalarType) -> str: return super().render_body(t) or "..." @dataclass class Enum(Handler[GraphQLEnumType]): predicate: ClassVar[Predicate] = staticmethod(is_enum_type) @joiner def render_body(self, t: GraphQLEnumType) -> Iterator[str]: if body := super().render_body(t): yield body for name, value in sorted(t.values.items()): yield "" # repr uses single quotes for strings, contrary to black val = repr(value.value).replace("'", '"') yield f"{name} = {val}" if value.description: yield doc(value.description) class Field(Protocol): name: str graphql_name: str def __str__(self) -> str: ... _O = TypeVar("_O", GraphQLInputObjectType, GraphQLObjectType) """Object handler generic type""" _F: TypeAlias = _InputField | _ObjectField class ObjectHandler(Handler[_O]): @abstractmethod def fields(self, t: _O) -> Iterator[_F]: ... @joiner def render_body(self, t: _O) -> Iterator[str]: if body := super().render_body(t): yield body if slots := self.ctx.simple_objects_map.get(t.name): yield "" yield f"__slots__ = ({', '.join(quote(str(s)) for s in slots.values())},)" yield "" yield from (s.as_attr() for s in slots.values()) yield from ( str(field) # Sorting by graphql name rather than python name for # consistency with other SDKs. for field in sorted( self.fields(t), key=lambda f: (getattr(f, "has_default", False), f.graphql_name), ) ) class Input(ObjectHandler[GraphQLInputObjectType]): predicate: ClassVar[Predicate] = staticmethod(is_input_object_type) def render_head(self, t: GraphQLInputObjectType) -> str: return f"@dataclass(slots=True)\n{super().render_head(t)}" def fields(self, t: GraphQLInputObjectType) -> Iterator[_InputField]: return ( _InputField(self.ctx, *args) for args in cast(GraphQLInputFieldMap, t.fields).items() ) class Object(ObjectHandler[GraphQLObjectType]): predicate: ClassVar[Predicate] = staticmethod(is_object_type) def supertype_name(self, t: GraphQLObjectType) -> str: return "Root" if t.name == "Query" else "Type" def type_name(self, t: GraphQLObjectType) -> str: return super().type_name(t).replace("Query", "Client") def fields(self, t: GraphQLObjectType) -> Iterator[_ObjectField]: return ( _ObjectField(self.ctx, *args, t) for args in cast(GraphQLFieldMap, t.fields).items() ) @joiner def render_body(self, t: GraphQLObjectType) -> Iterator[str]: yield super().render_body(t) if is_self_chainable(t): self_name = self.type_name(t) yield textwrap.dedent( f''' def with_(self, cb: Callable[["{self_name}"], "{self_name}"]) -> "{self_name}": """Call the provided callable with current {self_name}. This is useful for reusability and readability by not breaking the calling chain. """ return cb(self) ''' # noqa: E501 )
closed
dagger/dagger
https://github.com/dagger/dagger
6,090
Python SDK: module dependency w/ doc string that ends in `"` causes error
Repro: ``` mkdir -p test/submod cd test/submod dagger mod init --sdk=go --name=submod cd .. dagger mod init --sdk=python --name=test dagger mod install ./submod dagger functions ``` Error: ``` ✘ exec /runtime ERROR [0.49s] ┃ Traceback (most recent call last): ┃ File "/runtime", line 3, in <module> ┃ from dagger.mod.cli import app ┃ File "/sdk/src/dagger/__init__.py", line 22, in <module> ┃ from .client.gen import * ┃ File "/sdk/src/dagger/client/gen.py", line 4254 ┃ """example usage: "dagger call container-echo --string-arg yo"""" ┃ ^ ┃ SyntaxError: unterminated string literal (detected at line 4254) ``` The problem is that the dependency has a doc string that ends in `"`, which breaks when wrapped w/ `"""` cc @helderco
https://github.com/dagger/dagger/issues/6090
https://github.com/dagger/dagger/pull/6104
758604428f70ac78df9106017e2dfa2f62436ecf
0def6c777bbd4f7b284f9bee68d8f3f58e16c0b6
"2023-11-08T16:55:48Z"
go
"2023-11-14T19:25:49Z"
sdk/python/tests/client/test_codegen.py
from textwrap import dedent import pytest from graphql import GraphQLArgument as Argument from graphql import GraphQLEnumType, GraphQLEnumValue, GraphQLID from graphql import GraphQLField as Field from graphql import GraphQLInputField as Input from graphql import GraphQLInputField as InputField from graphql import GraphQLInputObjectType as InputObject from graphql import GraphQLInt as Int from graphql import GraphQLList as List from graphql import GraphQLNonNull as NonNull from graphql import GraphQLObjectType as Object from graphql import GraphQLScalarType as Scalar from graphql import GraphQLString as String from dagger._codegen.generator import ( Context, _InputField, format_input_type, format_name, format_output_type, ) from dagger._codegen.generator import Enum as EnumHandler from dagger._codegen.generator import Scalar as ScalarHandler @pytest.fixture() def ctx(): return Context( id_map={ "CacheVolumeID": "CacheVolume", "FileID": "File", "SecretID": "Secret", }, id_query_map={ "ContainerID": "container", "DirectoryID": "directory", }, simple_objects_map={}, remaining={"Secret"}, ) @pytest.mark.parametrize( ("graphql", "expected"), [ ("stdout", "stdout"), ("envVariable", "env_variable"), # casing ("from", "from_"), # reserved keyword ("type", "type"), # builtin ("withFS", "with_fs"), # initialism ], ) def test_format_name(graphql, expected): assert format_name(graphql) == expected opts = InputObject( "Options", fields={ "key": InputField(NonNull(Scalar("CacheVolumeID"))), "name": InputField(String), }, ) @pytest.mark.parametrize( ("graphql", "expected"), [ (NonNull(List(NonNull(String))), "list[str]"), (List(String), "Optional[list[Optional[str]]]"), (List(NonNull(String)), "Optional[list[str]]"), (NonNull(Scalar("FileID")), "File"), (Scalar("FileID"), "Optional[File]"), (NonNull(opts), "Options"), (opts, "Optional[Options]"), (NonNull(List(NonNull(opts))), "list[Options]"), (NonNull(List(opts)), "list[Optional[Options]]"), (List(NonNull(opts)), "Optional[list[Options]]"), (List(opts), "Optional[list[Optional[Options]]]"), ], ) def test_format_input_type(graphql, expected, ctx: Context): assert format_input_type(graphql, ctx.id_map) == expected cache_volume = Object( "CacheVolume", fields={ "id": Field( NonNull(Scalar("CacheVolumeID")), {}, ), }, ) @pytest.mark.parametrize( ("graphql", "expected"), [ (NonNull(List(NonNull(String))), "list[str]"), (List(String), "Optional[list[Optional[str]]]"), (List(NonNull(String)), "Optional[list[str]]"), (NonNull(Scalar("FileID")), "FileID"), (Scalar("FileID"), "Optional[FileID]"), (NonNull(cache_volume), "CacheVolume"), (cache_volume, "CacheVolume"), (List(NonNull(cache_volume)), "list[CacheVolume]"), (List(cache_volume), "list[Optional[CacheVolume]]"), ], ) def test_format_output_type(graphql, expected): assert format_output_type(graphql) == expected @pytest.mark.parametrize( ("name", "args", "expected"), [ ("args", (NonNull(List(String)),), "args: Sequence[Optional[str]]"), ("secret", (NonNull(Scalar("SecretID")),), "secret: Secret"), ("secret", (Scalar("SecretID"),), "secret: Optional[Secret] = None"), ("from", (String, None), "from_: Optional[str] = None"), ("lines", (Int, 1), "lines: Optional[int] = 1"), ( "configPath", (NonNull(String), "/dagger.json"), 'config_path: str = "/dagger.json"', ), ], ) @pytest.mark.parametrize("cls", [Argument, Input]) def test_input_field_param(cls, name, args, expected, ctx: Context): assert _InputField(ctx, name, cls(*args)).as_param() == expected @pytest.mark.parametrize( ("name", "args", "expected"), [ ( "context", (NonNull(Scalar("DirectoryID")),), 'Arg("context", context),', ), ( "secret", (Scalar("SecretID"),), 'Arg("secret", secret, None),', ), ( "lines", (Int, 1), 'Arg("lines", lines, 1),', ), ( "from", (String, None), 'Arg("from", from_, None),', ), ( "configPath", (NonNull(String), "/dagger.json"), 'Arg("configPath", config_path, "/dagger.json"),', ), ], ) @pytest.mark.parametrize("cls", [Argument, Input]) def test_input_field_arg(cls, name, args, expected, ctx: Context): assert _InputField(ctx, name, cls(*args)).as_arg() == expected @pytest.mark.parametrize( ("type_", "expected"), [ (GraphQLID, False), (String, False), (Int, False), (Scalar("FileID"), True), (Object("Container", {}), False), ], ) def test_scalar_predicate(type_, expected, ctx: Context): assert ScalarHandler(ctx).predicate(type_) is expected @pytest.mark.parametrize( ("type_", "expected"), [ # with doc ( Scalar("SecretID", description="A unique identifier for a secret."), dedent( ''' class SecretID(Scalar): """A unique identifier for a secret.""" ''', ), ), # without doc ( Scalar("FileID"), dedent( """ class FileID(Scalar): ... """, ), ), ], ) def test_scalar_render(type_, expected, ctx: Context): handler = ScalarHandler(ctx) assert handler.render(type_) == expected @pytest.mark.parametrize( ("type_", "expected"), [ # with doc ( GraphQLEnumType( "Enumeration", { "ONE": GraphQLEnumValue("ONE", description="First value."), "TWO": GraphQLEnumValue("TWO", description="Second value."), "THREE": GraphQLEnumValue("THREE", description="Third value."), }, description="Example of an enumeration.", ), dedent( ''' class Enumeration(Enum): """Example of an enumeration.""" ONE = "ONE" """First value.""" THREE = "THREE" """Third value.""" TWO = "TWO" """Second value.""" ''', ), ), # without doc ( GraphQLEnumType( "Enumeration", { "ONE": GraphQLEnumValue("ONE"), "TWO": GraphQLEnumValue("TWO"), "THREE": GraphQLEnumValue("THREE"), }, ), dedent( """ class Enumeration(Enum): ONE = "ONE" THREE = "THREE" TWO = "TWO" """, ), ), ], ) def test_enum_render(type_, expected, ctx: Context): handler = EnumHandler(ctx) assert handler.render(type_) == expected
closed
dagger/dagger
https://github.com/dagger/dagger
5,860
Zenith: fix Go struct field json serialization
https://github.com/dagger/dagger/pull/5757#issuecomment-1744739721 Right now if you have something like: ```go type Foo struct { Bar `json:"blahblah"` } ``` The graphql schema for `Foo` will be populated with a field called `Bar`, but when we do json serialization we use `blahblah`, which means that if you try to query for the value of the `Bar` field, our gql server hits the trivial resolver codepath and looks for `bar` in the json object and doesn't find it (since it's been serialized to `blahblah`). My first thought was that if a json struct tag is present, we should use that as the graphql field name rather than the go name. That would fix this problem I think, but it's more debatable whether it's surprising behavior (or honestly if anyone will really care about this). --- Possibly related issue from https://github.com/dagger/dagger/pull/5757#issuecomment-1752775608 ```golang package main import ( "context" ) type Foo struct{} type Test struct { X string Y int } func (t *Test) Void() {} func (m *Foo) MyFunction(ctx context.Context) Test { return Test{X: "hello", Y: 1337} } ``` ```bash $ echo '{foo{myFunction{x}}}' | dagger query -m "" ... ⧗ 1.17s ✔ 22 ∅ 20 ✘ 2 Error: make request: input:1: foo.myFunction.x Cannot return null for non-nullable field Test.x. ``` If I modify the struct with JSON field names, the above works: ```golang type Test struct { X string `json:"x"` Y int `json:"y"` } ``` --- cc @vito @jedevc
https://github.com/dagger/dagger/issues/5860
https://github.com/dagger/dagger/pull/6057
2c554b2ac26c4c6863893bac94d85108cecb48d9
e1d69edbfd0f94c93489edac4d9d6050c36fc3b7
"2023-10-10T22:50:32Z"
go
"2023-11-14T23:56:25Z"
cmd/codegen/generator/go/templates/modules.go
package templates import ( "encoding/json" "fmt" "go/ast" "go/token" "go/types" "os" "path/filepath" "runtime/debug" "sort" "strings" . "github.com/dave/jennifer/jen" // nolint:revive,stylecheck "github.com/iancoleman/strcase" "golang.org/x/tools/go/packages" ) const ( daggerGenFilename = "dagger.gen.go" // TODO: don't hardcode contextTypename = "context.Context" ) /* TODO: * Handle types from 3rd party imports in the type signature * Add packages.NeedImports and packages.NeedDependencies to packages.Load opts, ensure performance is okay (or deal with that by lazy loading) * Fix problem where changing a function signature requires running `dagger mod sync` twice (first one will result in package errors being seen, second one fixes) * Use Overlays field in packages.Config to provide partial generation of dagger.gen.go, without the unupdated code we generate here * Handle automatically re-running `dagger mod sync` when invoking functions from CLI, to save users from having to always remember while developing locally * Support methods defined on non-pointer receivers */ /* moduleMainSrc generates the source code of the main func for Dagger Module code using the Go SDK. The overall idea is that users just need to create a struct with the same name as their Module and then add methods to that struct to implement their Module. Methods on that struct become Functions. They are also free to return custom objects from Functions, which themselves may have methods that become Functions too. However, only the "top-level" Module struct's Functions will be directly invokable. This is essentially just the GraphQL execution model. The implementation works by parsing the user's code and generating a main func that reads function call inputs from the Engine, calls the relevant function and returns the result. The generated code is mostly a giant switch/case on the object+function name, with each case doing json deserialization of the input arguments and calling the actual Go function. */ func (funcs goTemplateFuncs) moduleMainSrc() (string, error) { // HACK: the code in this func can be pretty flaky and tricky to debug - // it's much easier to debug when we actually have stack traces, so we grab // those on a panic defer func() { if r := recover(); r != nil { fmt.Fprintf(os.Stderr, "internal error during module code generation: %v\n", r) debug.PrintStack() panic(r) } }() if funcs.modulePkg == nil { // during bootstrapping, we might not have code yet, since it takes // multiple passes. return `func main() { panic("no code yet") }`, nil } ps := &parseState{ pkg: funcs.modulePkg, fset: funcs.moduleFset, methods: make(map[string][]method), } pkgScope := funcs.modulePkg.Types.Scope() objFunctionCases := map[string][]Code{} createMod := Qual("dag", "CurrentModule").Call() objs := []types.Object{} for _, name := range pkgScope.Names() { obj := pkgScope.Lookup(name) if obj == nil { continue } objs = append(objs, obj) } // preserve definition order, so developer can keep more important / // entrypoint types higher up sort.Slice(objs, func(i, j int) bool { return objs[i].Pos() < objs[j].Pos() }) tps := []types.Type{} for _, obj := range objs { tps = append(tps, obj.Type()) } added := map[string]struct{}{} topLevel := true for len(tps) != 0 { var nextTps []types.Type for _, tp := range tps { named, isNamed := tp.(*types.Named) if !isNamed { continue } obj := named.Obj() if obj.Pkg() != funcs.modulePkg.Types { // the type must be created in the target package continue } if !obj.Exported() { // the type must be exported if !topLevel { return "", fmt.Errorf("cannot code-generate unexported type %s", obj.Name()) } continue } strct, isStruct := named.Underlying().(*types.Struct) if !isStruct { // TODO(vito): could possibly support non-struct types, but why bother continue } // avoid adding a struct definition twice (if it's referenced in two function signatures) if _, ok := added[obj.Name()]; ok { continue } // TODO(vito): hacky: need to run this before fillObjectFunctionCases so it // collects all the methods objType, extraTypes, err := ps.goStructToAPIType(strct, named) if err != nil { return "", err } if objType == nil { // not including in module schema, skip it continue } if err := ps.fillObjectFunctionCases(named, objFunctionCases); err != nil { // errors indicate an internal problem rather than something w/ user code, so error instead return "", fmt.Errorf("failed to generate function cases for %s: %w", obj.Name(), err) } if len(objFunctionCases[obj.Name()]) == 0 { if topLevel { // no functions on this top-level object, so don't add it to the module continue } if ps.isDaggerGenerated(named.Obj()) { // skip objects from outside this module continue } } // Add the object to the module createMod = dotLine(createMod, "WithObject").Call(Add(Line(), objType)) added[obj.Name()] = struct{}{} // If the object has any extra sub-types (e.g. for function return // values), add them to the list of types to process nextTps = append(nextTps, extraTypes...) } tps, nextTps = nextTps, nil topLevel = false } // TODO: sort cases and functions based on their definition order return strings.Join([]string{mainSrc, invokeSrc(objFunctionCases, createMod)}, "\n"), nil } func dotLine(a *Statement, id string) *Statement { return a.Op(".").Line().Id(id) } const ( // The static part of the generated code. It calls out to the "invoke" func, which is the mostly // dynamically generated code that actually calls the user's functions. mainSrc = `func main() { ctx := context.Background() fnCall := dag.CurrentFunctionCall() parentName, err := fnCall.ParentName(ctx) if err != nil { fmt.Println(err.Error()) os.Exit(2) } fnName, err := fnCall.Name(ctx) if err != nil { fmt.Println(err.Error()) os.Exit(2) } parentJson, err := fnCall.Parent(ctx) if err != nil { fmt.Println(err.Error()) os.Exit(2) } fnArgs, err := fnCall.InputArgs(ctx) if err != nil { fmt.Println(err.Error()) os.Exit(2) } inputArgs := map[string][]byte{} for _, fnArg := range fnArgs { argName, err := fnArg.Name(ctx) if err != nil { fmt.Println(err.Error()) os.Exit(2) } argValue, err := fnArg.Value(ctx) if err != nil { fmt.Println(err.Error()) os.Exit(2) } inputArgs[argName] = []byte(argValue) } result, err := invoke(ctx, []byte(parentJson), parentName, fnName, inputArgs) if err != nil { fmt.Println(err.Error()) os.Exit(2) } resultBytes, err := json.Marshal(result) if err != nil { fmt.Println(err.Error()) os.Exit(2) } _, err = fnCall.ReturnValue(ctx, JSON(resultBytes)) if err != nil { fmt.Println(err.Error()) os.Exit(2) } } ` parentJSONVar = "parentJSON" parentNameVar = "parentName" fnNameVar = "fnName" inputArgsVar = "inputArgs" invokeFuncName = "invoke" ) // the source code of the invoke func, which is the mostly dynamically generated code that actually calls the user's functions func invokeSrc(objFunctionCases map[string][]Code, createMod Code) string { // each `case` statement for every object name, which makes up the body of the invoke func objCases := []Code{} for objName, functionCases := range objFunctionCases { objCases = append(objCases, Case(Lit(objName)).Block(Switch(Id(fnNameVar)).Block(functionCases...))) } // when the object name is empty, return the module definition objCases = append(objCases, Case(Lit("")).Block( Return(createMod, Nil()), )) // default case (return error) objCases = append(objCases, Default().Block( Return(Nil(), Qual("fmt", "Errorf").Call(Lit("unknown object %s"), Id(parentNameVar))), )) objSwitch := Switch(Id(parentNameVar)).Block(objCases...) // func invoke( invokeFunc := Func().Id(invokeFuncName).Params( // ctx context.Context, Id("ctx").Qual("context", "Context"), // parentJSON []byte, Id(parentJSONVar).Index().Byte(), // parentName string, Id(parentNameVar).String(), // fnName string, Id(fnNameVar).String(), // inputArgs map[string][]byte, Id(inputArgsVar).Map(String()).Index().Byte(), ).Params( // ) (any, Id("any"), // error) Error(), ).Block(objSwitch) return fmt.Sprintf("%#v", invokeFunc) } // TODO: use jennifer for generating this magical typedef func renderNameOrStruct(t types.Type) string { if ptr, ok := t.(*types.Pointer); ok { return "*" + renderNameOrStruct(ptr.Elem()) } if sl, ok := t.(*types.Slice); ok { return "[]" + renderNameOrStruct(sl.Elem()) } if st, ok := t.(*types.Struct); ok { result := "struct {\n" for i := 0; i < st.NumFields(); i++ { if !st.Field(i).Embedded() { result += st.Field(i).Name() + " " } result += renderNameOrStruct(st.Field(i).Type()) if tag := st.Tag(i); tag != "" { result += " `" + tag + "`" } result += "\n" } result += "}" return result } if named, ok := t.(*types.Named); ok { // Assume local // // TODO: this isn't always true - we likely want to support returning // types from other packages as well. However, this is tricky - how // should we handle returning *time.Time? We should probably convert // this to a graphql type that all langs can convert to their native // representation. base := named.Obj().Name() if typeArgs := named.TypeArgs(); typeArgs.Len() > 0 { base += "[" for i := 0; i < typeArgs.Len(); i++ { if i > 0 { base += ", " } base += renderNameOrStruct(typeArgs.At(i)) } base += "]" } return base } // HACK(vito): this is passed to Id(), which is a bit weird, but works return t.String() } var checkErrStatement = If(Err().Op("!=").Nil()).Block( // fmt.Println(err.Error()) Qual("fmt", "Println").Call(Err().Dot("Error").Call()), // os.Exit(2) Qual("os", "Exit").Call(Lit(2)), ) // fillObjectFunctionCases recursively fills out the `cases` map with entries for object name -> `case` statement blocks // for each function in that object func (ps *parseState) fillObjectFunctionCases(type_ types.Type, cases map[string][]Code) error { var objName string switch x := type_.(type) { case *types.Pointer: return ps.fillObjectFunctionCases(x.Elem(), cases) case *types.Named: objName = x.Obj().Name() default: return nil } if existingCases := cases[objName]; len(existingCases) > 0 { // handles recursive types, e.g. objects with chainable methods that return themselves return nil } methods := ps.methods[objName] if len(methods) == 0 { return nil } for _, method := range methods { fnName, sig := method.fn.Name(), method.fn.Type().(*types.Signature) statements := []Code{ Var().Id("err").Error(), } parentVarName := "parent" statements = append(statements, Var().Id(parentVarName).Id(objName), Err().Op("=").Qual("json", "Unmarshal").Call(Id(parentJSONVar), Op("&").Id(parentVarName)), checkErrStatement, ) fnCallArgs := []Code{Op("&").Id(parentVarName)} vars := map[string]struct{}{} for i, spec := range method.paramSpecs { if i == 0 && spec.paramType.String() == contextTypename { fnCallArgs = append(fnCallArgs, Id("ctx")) continue } var varName string var varType types.Type var target *Statement if spec.parent == nil { varName = strcase.ToLowerCamel(spec.name) varType = spec.paramType target = Id(varName) } else { // create only one declaration for option structs varName = spec.parent.name varType = spec.parent.paramType target = Id(spec.parent.name).Dot(spec.name) } if _, ok := vars[varName]; !ok { vars[varName] = struct{}{} tp, access := findOptsAccessPattern(varType, Id(varName)) statements = append(statements, Var().Id(varName).Id(renderNameOrStruct(tp))) if spec.variadic { fnCallArgs = append(fnCallArgs, access.Op("...")) } else { fnCallArgs = append(fnCallArgs, access) } } statements = append(statements, If(Id(inputArgsVar).Index(Lit(spec.graphqlName())).Op("!=").Nil()).Block( Err().Op("=").Qual("json", "Unmarshal").Call( Index().Byte().Parens(Id(inputArgsVar).Index(Lit(spec.graphqlName()))), Op("&").Add(target), ), checkErrStatement, )) } results := sig.Results() switch results.Len() { case 2: // assume second value is error if results.At(1).Type().String() != errorTypeName { // sanity check return fmt.Errorf("second return value must be error, have %s", results.At(0).Type().String()) } statements = append(statements, Return( Parens(Op("*").Id(objName)).Dot(fnName).Call(fnCallArgs...), )) cases[objName] = append(cases[objName], Case(Lit(fnName)).Block(statements...)) if err := ps.fillObjectFunctionCases(results.At(0).Type(), cases); err != nil { return err } case 1: if results.At(0).Type().String() == errorTypeName { // void error return statements = append(statements, Return( Nil(), Parens(Op("*").Id(objName)).Dot(fnName).Call(fnCallArgs...), )) cases[objName] = append(cases[objName], Case(Lit(fnName)).Block(statements...)) } else { // non-error return statements = append(statements, Return( Parens(Op("*").Id(objName)).Dot(fnName).Call(fnCallArgs...), Nil(), )) cases[objName] = append(cases[objName], Case(Lit(fnName)).Block(statements...)) if err := ps.fillObjectFunctionCases(results.At(0).Type(), cases); err != nil { return err } } case 0: // void return // // NB(vito): it's really weird to have a fully void return (not even // error), but we should still support it for completeness. statements = append(statements, Parens(Op("*").Id(objName)).Dot(fnName).Call(fnCallArgs...), Return(Nil(), Nil())) cases[objName] = append(cases[objName], Case(Lit(fnName)).Block(statements...)) default: return fmt.Errorf("unexpected number of results from method %s: %d", fnName, results.Len()) } } // default case (return error) cases[objName] = append(cases[objName], Default().Block( Return(Nil(), Qual("fmt", "Errorf").Call(Lit("unknown function %s"), Id(fnNameVar))), )) return nil } type parseState struct { pkg *packages.Package fset *token.FileSet methods map[string][]method } type method struct { fn *types.Func paramSpecs []paramSpec } func (ps *parseState) goTypeToAPIType(typ types.Type, named *types.Named) (*Statement, *types.Named, error) { switch t := typ.(type) { case *types.Named: // Named types are any types declared like `type Foo <...>` typeDef, _, err := ps.goTypeToAPIType(t.Underlying(), t) if err != nil { return nil, nil, fmt.Errorf("failed to convert named type: %w", err) } return typeDef, t, nil case *types.Pointer: return ps.goTypeToAPIType(t.Elem(), named) case *types.Slice: elemTypeDef, underlying, err := ps.goTypeToAPIType(t.Elem(), nil) if err != nil { return nil, nil, fmt.Errorf("failed to convert slice element type: %w", err) } return Qual("dag", "TypeDef").Call().Dot("WithListOf").Call( elemTypeDef, ), underlying, nil case *types.Basic: if t.Kind() == types.Invalid { return nil, nil, fmt.Errorf("invalid type: %+v", t) } var kind Code switch t.Info() { case types.IsString: kind = Id("Stringkind") case types.IsInteger: kind = Id("Integerkind") case types.IsBoolean: kind = Id("Booleankind") default: return nil, nil, fmt.Errorf("unsupported basic type: %+v", t) } return Qual("dag", "TypeDef").Call().Dot("WithKind").Call( kind, ), named, nil case *types.Struct: if named == nil { return nil, nil, fmt.Errorf("struct types must be named") } typeName := named.Obj().Name() if typeName == "" { return nil, nil, fmt.Errorf("struct types must be named") } return Qual("dag", "TypeDef").Call().Dot("WithObject").Call( Lit(typeName), ), named, nil default: return nil, nil, fmt.Errorf("unsupported type %T", t) } } const errorTypeName = "error" func (ps *parseState) goStructToAPIType(t *types.Struct, named *types.Named) (*Statement, []types.Type, error) { if named == nil { return nil, nil, fmt.Errorf("struct types must be named") } typeName := named.Obj().Name() if typeName == "" { return nil, nil, fmt.Errorf("struct types must be named") } // We don't support extending objects from outside this module, so we will // be skipping it. But first we want to verify the user isn't adding methods // to it (in which case we error out). objectIsDaggerGenerated := ps.isDaggerGenerated(named.Obj()) methods := []*types.Func{} methodSet := types.NewMethodSet(types.NewPointer(named)) // Fill out any Functions on the object, which are methods on the struct // TODO: support methods defined on non-pointer receivers for i := 0; i < methodSet.Len(); i++ { methodObj := methodSet.At(i).Obj() if ps.isDaggerGenerated(methodObj) { // We don't care about pre-existing methods on core types or objects from dependency modules. continue } if objectIsDaggerGenerated { return nil, nil, fmt.Errorf("cannot define methods on objects from outside this module") } method, ok := methodObj.(*types.Func) if !ok { return nil, nil, fmt.Errorf("expected method to be a func, got %T", methodObj) } if !method.Exported() { continue } methods = append(methods, method) } if objectIsDaggerGenerated { return nil, nil, nil } sort.Slice(methods, func(i, j int) bool { return methods[i].Pos() < methods[j].Pos() }) // args for WithObject withObjectArgs := []Code{ Lit(typeName), } withObjectOpts := []Code{} // Fill out the Description with the comment above the struct (if any) typeSpec, err := ps.typeSpecForNamedType(named) if err != nil { return nil, nil, fmt.Errorf("failed to find decl for named type %s: %w", typeName, err) } if doc := typeSpec.Doc; doc != nil { // TODO(vito): for some reason this is always nil withObjectOpts = append(withObjectOpts, Id("Description").Op(":").Lit(doc.Text())) } if len(withObjectOpts) > 0 { withObjectArgs = append(withObjectArgs, Id("TypeDefWithObjectOpts").Values(withObjectOpts...)) } typeDef := Qual("dag", "TypeDef").Call().Dot("WithObject").Call(withObjectArgs...) var subTypes []types.Type for _, method := range methods { fnTypeDef, functionSubTypes, err := ps.goMethodToAPIFunctionDef(typeName, method, named) if err != nil { return nil, nil, fmt.Errorf("failed to convert method %s to function def: %w", method.Name(), err) } subTypes = append(subTypes, functionSubTypes...) typeDef = dotLine(typeDef, "WithFunction").Call(Add(Line(), fnTypeDef)) } astStructType, ok := typeSpec.Type.(*ast.StructType) if !ok { return nil, nil, fmt.Errorf("expected type spec to be a struct, got %T", typeSpec.Type) } // Fill out the static fields of the struct (if any) for i := 0; i < t.NumFields(); i++ { field := t.Field(i) if !field.Exported() { continue } fieldTypeDef, subType, err := ps.goTypeToAPIType(field.Type(), nil) if err != nil { return nil, nil, fmt.Errorf("failed to convert field type: %w", err) } if subType != nil { subTypes = append(subTypes, subType) } var description string if doc := astStructType.Fields.List[i].Doc; doc != nil { description = doc.Text() } withFieldArgs := []Code{ Lit(field.Name()), fieldTypeDef, } if description != "" { withFieldArgs = append(withFieldArgs, Id("TypeDefWithFieldOpts").Values( Id("Description").Op(":").Lit(description), )) } typeDef = dotLine(typeDef, "WithField").Call(withFieldArgs...) } return typeDef, subTypes, nil } var voidDef = Qual("dag", "TypeDef").Call(). Dot("WithKind").Call(Id("Voidkind")). Dot("WithOptional").Call(Lit(true)) func (ps *parseState) goMethodToAPIFunctionDef(typeName string, fn *types.Func, named *types.Named) (*Statement, []types.Type, error) { methodSig, ok := fn.Type().(*types.Signature) if !ok { return nil, nil, fmt.Errorf("expected method to be a func, got %T", fn.Type()) } // stash away the method signature so we can remember details on how it's // invoked (e.g. no error return, no ctx arg, error-only return, etc) specs, err := ps.parseParamSpecs(fn) if err != nil { return nil, nil, err } ps.methods[typeName] = append(ps.methods[typeName], method{fn: fn, paramSpecs: specs}) var fnReturnType *Statement var subTypes []types.Type methodResults := methodSig.Results() var returnSubType *types.Named switch methodResults.Len() { case 0: fnReturnType = voidDef case 1: result := methodResults.At(0).Type() if result.String() == errorTypeName { fnReturnType = voidDef } else { fnReturnType, returnSubType, err = ps.goTypeToAPIType(result, nil) if err != nil { return nil, nil, fmt.Errorf("failed to convert result type: %w", err) } } case 2: result := methodResults.At(0).Type() subTypes = append(subTypes, result) fnReturnType, returnSubType, err = ps.goTypeToAPIType(result, nil) if err != nil { return nil, nil, fmt.Errorf("failed to convert result type: %w", err) } default: return nil, nil, fmt.Errorf("method %s has too many return values", fn.Name()) } if returnSubType != nil { subTypes = append(subTypes, returnSubType) } fnDef := Qual("dag", "Function").Call(Lit(fn.Name()), Add(Line(), fnReturnType)) funcDecl, err := ps.declForFunc(fn) if err != nil { return nil, nil, fmt.Errorf("failed to find decl for method %s: %w", fn.Name(), err) } if doc := funcDecl.Doc; doc != nil { fnDef = dotLine(fnDef, "WithDescription").Call(Lit(doc.Text())) } for i, spec := range specs { if i == 0 && spec.paramType.String() == contextTypename { // ignore ctx arg continue } typeDef, subType, err := ps.goTypeToAPIType(spec.baseType, nil) if err != nil { return nil, nil, fmt.Errorf("failed to convert param type: %w", err) } if subType != nil { subTypes = append(subTypes, subType) } if spec.optional { typeDef = typeDef.Dot("WithOptional").Call(Lit(true)) } // arguments to WithArg args := []Code{Lit(spec.graphqlName()), typeDef} argOpts := []Code{} if spec.description != "" { argOpts = append(argOpts, Id("Description").Op(":").Lit(spec.description)) } if spec.defaultValue != "" { var jsonEnc string if spec.baseType.String() == "string" { enc, err := json.Marshal(spec.defaultValue) if err != nil { return nil, nil, fmt.Errorf("failed to marshal default value: %w", err) } jsonEnc = string(enc) } else { jsonEnc = spec.defaultValue } argOpts = append(argOpts, Id("DefaultValue").Op(":").Id("JSON").Call(Lit(jsonEnc))) } if len(argOpts) > 0 { args = append(args, Id("FunctionWithArgOpts").Values(argOpts...)) } fnDef = dotLine(fnDef, "WithArg").Call(args...) } return fnDef, subTypes, nil } func (ps *parseState) parseParamSpecs(fn *types.Func) ([]paramSpec, error) { sig := fn.Type().(*types.Signature) params := sig.Params() if params.Len() == 0 { return nil, nil } specs := make([]paramSpec, 0, params.Len()) i := 0 if params.At(i).Type().String() == contextTypename { spec, err := ps.parseParamSpecVar(params.At(i)) if err != nil { return nil, err } specs = append(specs, spec) i++ } fnDecl, err := ps.declForFunc(fn) if err != nil { return nil, err } // is the first data param an inline struct? if so, process each field of // the struct as a top-level param if i+1 == params.Len() { param := params.At(i) paramType, ok := asInlineStruct(param.Type()) if ok { stype, ok := asInlineStructAst(fnDecl.Type.Params.List[i].Type) if !ok { return nil, fmt.Errorf("expected struct type for %s", param.Name()) } parent := &paramSpec{ name: params.At(i).Name(), paramType: param.Type(), baseType: param.Type(), } paramFields := unpackASTFields(stype.Fields) for f := 0; f < paramType.NumFields(); f++ { spec, err := ps.parseParamSpecVar(paramType.Field(f)) if err != nil { return nil, err } spec.parent = parent spec.description = paramFields[f].Doc.Text() if spec.description == "" { spec.description = paramFields[f].Comment.Text() } spec.description = strings.TrimSpace(spec.description) specs = append(specs, spec) } return specs, nil } } // if other parameter passing schemes fail, just treat each remaining arg // as a top-level param paramFields := unpackASTFields(fnDecl.Type.Params) for ; i < params.Len(); i++ { spec, err := ps.parseParamSpecVar(params.At(i)) if err != nil { return nil, err } if sig.Variadic() && i == params.Len()-1 { spec.variadic = true } if cmt, err := ps.commentForFuncField(fnDecl, paramFields, i); err == nil { spec.description = cmt.Text() spec.description = strings.TrimSpace(spec.description) } specs = append(specs, spec) } return specs, nil } func (ps *parseState) parseParamSpecVar(field *types.Var) (paramSpec, error) { if _, ok := field.Type().(*types.Struct); ok { return paramSpec{}, fmt.Errorf("nested structs are not supported") } paramType := field.Type() baseType := paramType for { ptr, ok := baseType.(*types.Pointer) if !ok { break } baseType = ptr.Elem() } optional := false if named, ok := baseType.(*types.Named); ok { if named.Obj().Name() == "Optional" && ps.isDaggerGenerated(named.Obj()) { typeArgs := named.TypeArgs() if typeArgs.Len() != 1 { return paramSpec{}, fmt.Errorf("optional type must have exactly one type argument") } optional = true baseType = typeArgs.At(0) for { ptr, ok := baseType.(*types.Pointer) if !ok { break } baseType = ptr.Elem() } } } return paramSpec{ name: field.Name(), paramType: paramType, baseType: baseType, optional: optional, }, nil } type paramSpec struct { name string description string optional bool variadic bool defaultValue string // NOTE: defaultVal is not currently populated // paramType is the full type declared in the function signature, which may // include pointer types, Optional, etc paramType types.Type // baseType is the simplified base type derived from the function signature baseType types.Type // parent is set if this paramSpec is nested inside a parent inline struct, // and is used to create a declaration of the entire inline struct parent *paramSpec } func (spec *paramSpec) graphqlName() string { return strcase.ToLowerCamel(spec.name) } // typeSpecForNamedType returns the *ast* type spec for the given Named type. This is needed // because the types.Named object does not have the comments associated with the type, which // we want to parse. func (ps *parseState) typeSpecForNamedType(namedType *types.Named) (*ast.TypeSpec, error) { tokenFile := ps.fset.File(namedType.Obj().Pos()) if tokenFile == nil { return nil, fmt.Errorf("no file for %s", namedType.Obj().Name()) } for _, f := range ps.pkg.Syntax { if ps.fset.File(f.Pos()) != tokenFile { continue } for _, decl := range f.Decls { genDecl, ok := decl.(*ast.GenDecl) if !ok { continue } for _, spec := range genDecl.Specs { typeSpec, ok := spec.(*ast.TypeSpec) if !ok { continue } if typeSpec.Name.Name == namedType.Obj().Name() { return typeSpec, nil } } } } return nil, fmt.Errorf("no decl for %s", namedType.Obj().Name()) } // declForFunc returns the *ast* func decl for the given Func type. This is needed // because the types.Func object does not have the comments associated with the type, which // we want to parse. func (ps *parseState) declForFunc(fnType *types.Func) (*ast.FuncDecl, error) { tokenFile := ps.fset.File(fnType.Pos()) if tokenFile == nil { return nil, fmt.Errorf("no file for %s", fnType.Name()) } for _, f := range ps.pkg.Syntax { if ps.fset.File(f.Pos()) != tokenFile { continue } for _, decl := range f.Decls { fnDecl, ok := decl.(*ast.FuncDecl) if ok && fnDecl.Name.Name == fnType.Name() { return fnDecl, nil } } } return nil, fmt.Errorf("no decl for %s", fnType.Name()) } // commentForFuncField returns the *ast* comment group for the given position. This // is needed because function args (despite being fields) don't have comments // associated with them, so this is a neat little hack to get them out. func (ps *parseState) commentForFuncField(fnDecl *ast.FuncDecl, unpackedParams []*ast.Field, i int) (*ast.CommentGroup, error) { pos := unpackedParams[i].Pos() tokenFile := ps.fset.File(pos) if tokenFile == nil { return nil, fmt.Errorf("no file for function %s", fnDecl.Name.Name) } line := tokenFile.Line(pos) allowDocComment := true allowLineComment := true if i == 0 { fieldStartLine := tokenFile.Line(fnDecl.Type.Params.Pos()) if fieldStartLine == line || fieldStartLine == line-1 { // the argument is on the same (or next) line as the function // declaration, so there is no doc comment to find allowDocComment = false } } else { prevArgLine := tokenFile.Line(unpackedParams[i-1].Pos()) if prevArgLine == line || prevArgLine == line-1 { // the argument is on the same (or next) line as the previous // argument, so again there is no doc comment to find allowDocComment = false } } if i+1 < len(fnDecl.Type.Params.List) { nextArgLine := tokenFile.Line(unpackedParams[i+1].Pos()) if nextArgLine == line { // the argument is on the same line as the next argument, so there is // no line comment to find allowLineComment = false } } else { fieldEndLine := tokenFile.Line(fnDecl.Type.Params.End()) if fieldEndLine == line { // the argument is on the same line as the end of the field list, so there // is no line comment to find allowLineComment = false } } for _, f := range ps.pkg.Syntax { if ps.fset.File(f.Pos()) != tokenFile { continue } if allowDocComment { // take the last position in the last line, and try and find a // comment that contains it npos := tokenFile.LineStart(tokenFile.Line(pos)) - 1 for _, comment := range f.Comments { if comment.Pos() <= npos && npos <= comment.End() { return comment, nil } } } if allowLineComment { // if no doc-style comment found, fallback to the current line to // find a comment at the end of the line npos := tokenFile.LineStart(tokenFile.Line(pos)+1) - 1 for _, comment := range f.Comments { if comment.Pos() <= npos && npos <= comment.End() { return comment, nil } } } } return nil, fmt.Errorf("no comment for function %s", fnDecl.Name.Name) } func (ps *parseState) isDaggerGenerated(obj types.Object) bool { tokenFile := ps.fset.File(obj.Pos()) return filepath.Base(tokenFile.Name()) == daggerGenFilename } // findOptsAccessPattern takes a type and a base statement (the name of a // variable that has the target type) and produces a type that can be used in a // variable declaration, as well as a statement that has the same type as the // target statement. // // This is essentially for helping resolve the pointeriness of types: a type of // **T and a variable p becomes T and &&p. This means we can *always* construct // an Opts object and unmarshal into it without having nil dereferences. func findOptsAccessPattern(t types.Type, access *Statement) (types.Type, *Statement) { switch t := t.(type) { case *types.Pointer: // taking the address of an address isn't allowed - so we use a ptr // helper function t2, val := findOptsAccessPattern(t.Elem(), access) return t2, Id("ptr").Call(val) // case *types.Slice: // t2, val := findOptsAccessPattern(t.Elem(), access) // return t2, Index().Id(renderNameOrStruct(t.Elem())).Values(val) default: return t, access } } func asInlineStruct(t types.Type) (*types.Struct, bool) { switch t := t.(type) { case *types.Pointer: return asInlineStruct(t.Elem()) case *types.Struct: return t, true default: return nil, false } } func asInlineStructAst(t ast.Node) (*ast.StructType, bool) { switch t := t.(type) { case *ast.StarExpr: return asInlineStructAst(t.X) case *ast.StructType: return t, true default: return nil, false } } func unpackASTFields(fields *ast.FieldList) []*ast.Field { var unpacked []*ast.Field for _, field := range fields.List { for i, name := range field.Names { field := *field field.Names = []*ast.Ident{name} if i != 0 { field.Doc = nil field.Comment = nil } unpacked = append(unpacked, &field) } } return unpacked }
closed
dagger/dagger
https://github.com/dagger/dagger
5,860
Zenith: fix Go struct field json serialization
https://github.com/dagger/dagger/pull/5757#issuecomment-1744739721 Right now if you have something like: ```go type Foo struct { Bar `json:"blahblah"` } ``` The graphql schema for `Foo` will be populated with a field called `Bar`, but when we do json serialization we use `blahblah`, which means that if you try to query for the value of the `Bar` field, our gql server hits the trivial resolver codepath and looks for `bar` in the json object and doesn't find it (since it's been serialized to `blahblah`). My first thought was that if a json struct tag is present, we should use that as the graphql field name rather than the go name. That would fix this problem I think, but it's more debatable whether it's surprising behavior (or honestly if anyone will really care about this). --- Possibly related issue from https://github.com/dagger/dagger/pull/5757#issuecomment-1752775608 ```golang package main import ( "context" ) type Foo struct{} type Test struct { X string Y int } func (t *Test) Void() {} func (m *Foo) MyFunction(ctx context.Context) Test { return Test{X: "hello", Y: 1337} } ``` ```bash $ echo '{foo{myFunction{x}}}' | dagger query -m "" ... ⧗ 1.17s ✔ 22 ∅ 20 ✘ 2 Error: make request: input:1: foo.myFunction.x Cannot return null for non-nullable field Test.x. ``` If I modify the struct with JSON field names, the above works: ```golang type Test struct { X string `json:"x"` Y int `json:"y"` } ``` --- cc @vito @jedevc
https://github.com/dagger/dagger/issues/5860
https://github.com/dagger/dagger/pull/6057
2c554b2ac26c4c6863893bac94d85108cecb48d9
e1d69edbfd0f94c93489edac4d9d6050c36fc3b7
"2023-10-10T22:50:32Z"
go
"2023-11-14T23:56:25Z"
core/function.go
package core import ( "fmt" "strings" "github.com/dagger/dagger/core/resourceid" "github.com/iancoleman/strcase" "github.com/opencontainers/go-digest" ) type Function struct { // Name is the standardized name of the function (lowerCamelCase), as used for the resolver in the graphql schema Name string `json:"name"` Description string `json:"description"` Args []*FunctionArg `json:"args"` ReturnType *TypeDef `json:"returnType"` // Below are not in public API // OriginalName of the parent object ParentOriginalName string `json:"parentOriginalName,omitempty"` // The original name of the function as provided by the SDK that defined it, used // when invoking the SDK so it doesn't need to think as hard about case conversions OriginalName string `json:"originalName,omitempty"` } func NewFunction(name string, returnType *TypeDef) *Function { return &Function{ Name: strcase.ToLowerCamel(name), ReturnType: returnType, OriginalName: name, } } func (fn *Function) ID() (FunctionID, error) { return resourceid.Encode(fn) } func (fn *Function) Digest() (digest.Digest, error) { return stableDigest(fn) } func (fn Function) Clone() *Function { cp := fn cp.Args = make([]*FunctionArg, len(fn.Args)) for i, arg := range fn.Args { cp.Args[i] = arg.Clone() } if fn.ReturnType != nil { cp.ReturnType = fn.ReturnType.Clone() } return &cp } func (fn *Function) WithDescription(desc string) *Function { fn = fn.Clone() fn.Description = strings.TrimSpace(desc) return fn } func (fn *Function) WithArg(name string, typeDef *TypeDef, desc string, defaultValue any) *Function { fn = fn.Clone() fn.Args = append(fn.Args, &FunctionArg{ Name: strcase.ToLowerCamel(name), Description: desc, TypeDef: typeDef, DefaultValue: defaultValue, OriginalName: name, }) return fn } type FunctionArg struct { // Name is the standardized name of the argument (lowerCamelCase), as used for the resolver in the graphql schema Name string `json:"name"` Description string `json:"description"` TypeDef *TypeDef `json:"typeDef"` DefaultValue any `json:"defaultValue"` // Below are not in public API // The original name of the argument as provided by the SDK that defined it. OriginalName string `json:"originalName,omitempty"` } func (arg FunctionArg) Clone() *FunctionArg { cp := arg cp.TypeDef = arg.TypeDef.Clone() // NB(vito): don't bother copying DefaultValue, it's already 'any' so it's // hard to imagine anything actually mutating it at runtime vs. replacing it // wholesale. return &cp } type TypeDef struct { Kind TypeDefKind `json:"kind"` Optional bool `json:"optional"` AsList *ListTypeDef `json:"asList"` AsObject *ObjectTypeDef `json:"asObject"` } func (typeDef *TypeDef) ID() (TypeDefID, error) { return resourceid.Encode(typeDef) } func (typeDef *TypeDef) Digest() (digest.Digest, error) { return stableDigest(typeDef) } func (typeDef TypeDef) Clone() *TypeDef { cp := typeDef if typeDef.AsList != nil { cp.AsList = typeDef.AsList.Clone() } if typeDef.AsObject != nil { cp.AsObject = typeDef.AsObject.Clone() } return &cp } func (typeDef *TypeDef) WithKind(kind TypeDefKind) *TypeDef { typeDef = typeDef.Clone() typeDef.Kind = kind return typeDef } func (typeDef *TypeDef) WithListOf(elem *TypeDef) *TypeDef { typeDef = typeDef.WithKind(TypeDefKindList) typeDef.AsList = &ListTypeDef{ ElementTypeDef: elem, } return typeDef } func (typeDef *TypeDef) WithObject(name, desc string) *TypeDef { typeDef = typeDef.WithKind(TypeDefKindObject) typeDef.AsObject = NewObjectTypeDef(name, desc) return typeDef } func (typeDef *TypeDef) WithOptional(optional bool) *TypeDef { typeDef = typeDef.Clone() typeDef.Optional = optional return typeDef } func (typeDef *TypeDef) WithObjectField(name string, fieldType *TypeDef, desc string) (*TypeDef, error) { if typeDef.AsObject == nil { return nil, fmt.Errorf("cannot add function to non-object type: %s", typeDef.Kind) } typeDef = typeDef.Clone() typeDef.AsObject.Fields = append(typeDef.AsObject.Fields, &FieldTypeDef{ Name: name, Description: desc, TypeDef: fieldType, }) return typeDef, nil } func (typeDef *TypeDef) WithObjectFunction(fn *Function) (*TypeDef, error) { if typeDef.AsObject == nil { return nil, fmt.Errorf("cannot add function to non-object type: %s", typeDef.Kind) } typeDef = typeDef.Clone() fn = fn.Clone() fn.ParentOriginalName = typeDef.AsObject.OriginalName typeDef.AsObject.Functions = append(typeDef.AsObject.Functions, fn) return typeDef, nil } type ObjectTypeDef struct { // Name is the standardized name of the object (CamelCase), as used for the object in the graphql schema Name string `json:"name"` Description string `json:"description"` Fields []*FieldTypeDef `json:"fields"` Functions []*Function `json:"functions"` // Below are not in public API // The original name of the object as provided by the SDK that defined it, used // when invoking the SDK so it doesn't need to think as hard about case conversions OriginalName string `json:"originalName,omitempty"` } func NewObjectTypeDef(name, description string) *ObjectTypeDef { return &ObjectTypeDef{ Name: strcase.ToCamel(name), OriginalName: name, } } func (typeDef ObjectTypeDef) Clone() *ObjectTypeDef { cp := typeDef cp.Fields = make([]*FieldTypeDef, len(typeDef.Fields)) for i, field := range typeDef.Fields { cp.Fields[i] = field.Clone() } cp.Functions = make([]*Function, len(typeDef.Functions)) for i, fn := range typeDef.Functions { cp.Functions[i] = fn.Clone() } return &cp } func (typeDef ObjectTypeDef) FieldByName(name string) (*FieldTypeDef, bool) { for _, field := range typeDef.Fields { if field.Name == name { return field, true } } return nil, false } func (typeDef ObjectTypeDef) FunctionByName(name string) (*Function, bool) { for _, fn := range typeDef.Functions { if fn.Name == name { return fn, true } } return nil, false } type FieldTypeDef struct { Name string `json:"name"` Description string `json:"description"` TypeDef *TypeDef `json:"typeDef"` } func (typeDef FieldTypeDef) Clone() *FieldTypeDef { cp := typeDef if typeDef.TypeDef != nil { cp.TypeDef = typeDef.TypeDef.Clone() } return &cp } type ListTypeDef struct { ElementTypeDef *TypeDef `json:"elementTypeDef"` } func (typeDef ListTypeDef) Clone() *ListTypeDef { cp := typeDef if typeDef.ElementTypeDef != nil { cp.ElementTypeDef = typeDef.ElementTypeDef.Clone() } return &cp } type TypeDefKind string func (k TypeDefKind) String() string { return string(k) } const ( TypeDefKindString TypeDefKind = "StringKind" TypeDefKindInteger TypeDefKind = "IntegerKind" TypeDefKindBoolean TypeDefKind = "BooleanKind" TypeDefKindList TypeDefKind = "ListKind" TypeDefKindObject TypeDefKind = "ObjectKind" TypeDefKindVoid TypeDefKind = "VoidKind" ) type FunctionCall struct { Name string `json:"name"` ParentName string `json:"parentName"` Parent any `json:"parent"` InputArgs []*CallInput `json:"inputArgs"` } func (fnCall *FunctionCall) Digest() (digest.Digest, error) { return stableDigest(fnCall) } type CallInput struct { Name string `json:"name"` Value any `json:"value"` }
closed
dagger/dagger
https://github.com/dagger/dagger
5,860
Zenith: fix Go struct field json serialization
https://github.com/dagger/dagger/pull/5757#issuecomment-1744739721 Right now if you have something like: ```go type Foo struct { Bar `json:"blahblah"` } ``` The graphql schema for `Foo` will be populated with a field called `Bar`, but when we do json serialization we use `blahblah`, which means that if you try to query for the value of the `Bar` field, our gql server hits the trivial resolver codepath and looks for `bar` in the json object and doesn't find it (since it's been serialized to `blahblah`). My first thought was that if a json struct tag is present, we should use that as the graphql field name rather than the go name. That would fix this problem I think, but it's more debatable whether it's surprising behavior (or honestly if anyone will really care about this). --- Possibly related issue from https://github.com/dagger/dagger/pull/5757#issuecomment-1752775608 ```golang package main import ( "context" ) type Foo struct{} type Test struct { X string Y int } func (t *Test) Void() {} func (m *Foo) MyFunction(ctx context.Context) Test { return Test{X: "hello", Y: 1337} } ``` ```bash $ echo '{foo{myFunction{x}}}' | dagger query -m "" ... ⧗ 1.17s ✔ 22 ∅ 20 ✘ 2 Error: make request: input:1: foo.myFunction.x Cannot return null for non-nullable field Test.x. ``` If I modify the struct with JSON field names, the above works: ```golang type Test struct { X string `json:"x"` Y int `json:"y"` } ``` --- cc @vito @jedevc
https://github.com/dagger/dagger/issues/5860
https://github.com/dagger/dagger/pull/6057
2c554b2ac26c4c6863893bac94d85108cecb48d9
e1d69edbfd0f94c93489edac4d9d6050c36fc3b7
"2023-10-10T22:50:32Z"
go
"2023-11-14T23:56:25Z"
core/integration/module_test.go
package core import ( "context" _ "embed" "encoding/json" "errors" "fmt" "go/format" "os" "path/filepath" "strconv" "strings" "testing" "time" "dagger.io/dagger" "github.com/dagger/dagger/core/modules" "github.com/iancoleman/strcase" "github.com/moby/buildkit/identity" "github.com/stretchr/testify/require" "github.com/tidwall/gjson" "golang.org/x/sync/errgroup" ) /* TODO: add coverage for * dagger mod use * dagger mod sync * that the codegen of the testdata envs are up to date (or incorporate that into a cli command) * if a dependency changes, then checks should re-run */ func TestModuleGoInit(t *testing.T) { t.Run("from scratch", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=bare", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{bare{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"bare":{"containerEcho":{"stdout":"hello\n"}}}`, out) }) t.Run("reserved go.mod name", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=go", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{go{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"go":{"containerEcho":{"stdout":"hello\n"}}}`, out) }) t.Run("uses expected Go module name, camel-cases Dagger module name", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=My-Module", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{myModule{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"myModule":{"containerEcho":{"stdout":"hello\n"}}}`, out) generated, err := modGen.File("go.mod").Contents(ctx) require.NoError(t, err) require.Contains(t, generated, "module main") }) t.Run("creates go.mod beneath an existing go.mod if root points beneath it", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/go.mod", dagger.ContainerWithNewFileOpts{ Contents: "module example.com/test\n", }). WithNewFile("/work/foo.go", dagger.ContainerWithNewFileOpts{ Contents: "package foo\n", }). WithWorkdir("/work/ci"). With(daggerExec("mod", "init", "--name=beneathGoMod", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{beneathGoMod{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"beneathGoMod":{"containerEcho":{"stdout":"hello\n"}}}`, out) t.Run("names Go module after Dagger module", func(t *testing.T) { generated, err := modGen.File("go.mod").Contents(ctx) require.NoError(t, err) require.Contains(t, generated, "module main") }) }) t.Run("respects existing go.mod", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithExec([]string{"go", "mod", "init", "example.com/test"}). With(daggerExec("mod", "init", "--name=hasGoMod", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{hasGoMod{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"hasGoMod":{"containerEcho":{"stdout":"hello\n"}}}`, out) t.Run("preserves module name", func(t *testing.T) { generated, err := modGen.File("go.mod").Contents(ctx) require.NoError(t, err) require.Contains(t, generated, "module example.com/test") }) }) t.Run("respects parent go.mod if root points to it", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithExec([]string{"go", "mod", "init", "example.com/test"}). WithNewFile("/work/foo.go", dagger.ContainerWithNewFileOpts{ Contents: "package foo\n", }). WithWorkdir("/work/child"). With(daggerExec("mod", "init", "--name=child", "--sdk=go", "--root=..")). WithNewFile("/work/child/main.go", dagger.ContainerWithNewFileOpts{ Contents: ` package main import "os" type Child struct{} func (m *Child) Root() *Directory { wd, err := os.Getwd() if err != nil { panic(err) } return dag.Host().Directory(wd+"/..") } `, }) generated := modGen. // explicitly sync to see whether it makes a go.mod With(daggerExec("mod", "sync")). Directory(".") logGen(ctx, t, generated) out, err := modGen. With(daggerQuery(`{child{root{entries}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"child":{"root":{"entries":["child","foo.go","go.mod","go.sum"]}}}`, out) childEntries, err := generated.Entries(ctx) require.NoError(t, err) require.NotContains(t, childEntries, "go.mod") t.Run("preserves parent module name", func(t *testing.T) { generated, err := modGen.File("/work/go.mod").Contents(ctx) require.NoError(t, err) require.Contains(t, generated, "module example.com/test") }) }) t.Run("respects existing go.mod even if root points to parent that has go.mod", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithExec([]string{"go", "mod", "init", "example.com/test"}). WithNewFile("/work/foo.go", dagger.ContainerWithNewFileOpts{ Contents: "package foo\n", }). WithWorkdir("/work/child"). WithExec([]string{"go", "mod", "init", "my-mod"}). With(daggerExec("mod", "init", "--name=child", "--sdk=go", "--root=..")). WithNewFile("/work/child/main.go", dagger.ContainerWithNewFileOpts{ Contents: ` package main import "os" type Child struct{} func (m *Child) Root() *Directory { wd, err := os.Getwd() if err != nil { panic(err) } return dag.Host().Directory(wd+"/..") } `, }) generated := modGen. // explicitly sync to see whether it makes a go.mod With(daggerExec("mod", "sync")). Directory(".") logGen(ctx, t, generated) out, err := modGen. With(daggerQuery(`{child{root{entries}}}`)). Stdout(ctx) require.NoError(t, err) // no go.sum require.JSONEq(t, `{"child":{"root":{"entries":["child","foo.go","go.mod"]}}}`, out) childEntries, err := generated.Entries(ctx) require.NoError(t, err) require.Contains(t, childEntries, "go.mod") require.Contains(t, childEntries, "go.sum") }) t.Run("respects existing main.go", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: ` package main type HasMainGo struct {} func (m *HasMainGo) Hello() string { return "Hello, world!" } `, }). With(daggerExec("mod", "init", "--name=hasMainGo", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{hasMainGo{hello}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"hasMainGo":{"hello":"Hello, world!"}}`, out) }) t.Run("respects existing main.go even if it uses types not generated yet", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: ` package main type HasDaggerTypes struct {} func (m *HasDaggerTypes) Hello() *Container { return dag.Container(). From("` + alpineImage + `"). WithExec([]string{"echo", "Hello, world!"}) } `, }). With(daggerExec("mod", "init", "--name=hasDaggerTypes", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{hasDaggerTypes{hello{stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"hasDaggerTypes":{"hello":{"stdout":"Hello, world!\n"}}}`, out) }) t.Run("respects existing package without creating main.go", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/notmain.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type HasNotMainGo struct {} func (m *HasNotMainGo) Hello() string { return "Hello, world!" } `, }). With(daggerExec("mod", "init", "--name=hasNotMainGo", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{hasNotMainGo{hello}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"hasNotMainGo":{"hello":"Hello, world!"}}`, out) }) } func TestModuleInitLICENSE(t *testing.T) { t.Run("bootstraps Apache-2.0 LICENSE file if none found", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=licensed-to-ill", "--sdk=go")) content, err := modGen.File("LICENSE").Contents(ctx) require.NoError(t, err) require.Contains(t, content, "Apache License, Version 2.0") }) t.Run("creates LICENSE file in the directory specified by -m", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "-m", "./mymod", "--name=licensed-to-ill", "--sdk=go")) content, err := modGen.File("mymod/LICENSE").Contents(ctx) require.NoError(t, err) require.Contains(t, content, "Apache License, Version 2.0") }) t.Run("does not bootstrap LICENSE file if it exists in the parent dir", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/LICENSE", dagger.ContainerWithNewFileOpts{ Contents: "doesnt matter", }). WithWorkdir("/work/sub"). With(daggerExec("mod", "init", "--name=licensed-to-ill", "--sdk=go")) _, err := modGen.File("LICENSE").Contents(ctx) require.Error(t, err) }) t.Run("bootstraps a LICENSE file when requested, even if it exists in the parent dir", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/LICENSE", dagger.ContainerWithNewFileOpts{ Contents: "doesnt matter", }). WithWorkdir("/work/sub"). With(daggerExec("mod", "init", "--name=licensed-to-ill", "--sdk=go", "--license=MIT")) content, err := modGen.File("LICENSE").Contents(ctx) require.NoError(t, err) require.Contains(t, content, "MIT License") }) } func TestModuleGit(t *testing.T) { t.Parallel() type testCase struct { sdk string gitignores []string } for _, tc := range []testCase{ { sdk: "go", gitignores: []string{ "/dagger.gen.go\n", "/querybuilder/\n", }, }, { sdk: "python", gitignores: []string{ "/sdk\n", }, }, } { tc := tc t.Run(fmt.Sprintf("module %s git", tc.sdk), func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := goGitBase(t, c). With(daggerExec("mod", "init", "--name=bare", "--sdk="+tc.sdk)) if tc.sdk == "go" { logGen(ctx, t, modGen.Directory(".")) } out, err := modGen. With(daggerQuery(`{bare{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"bare":{"containerEcho":{"stdout":"hello\n"}}}`, out) t.Run("configures .gitignore", func(t *testing.T) { ignore, err := modGen.File(".gitignore").Contents(ctx) require.NoError(t, err) for _, gitignore := range tc.gitignores { require.Contains(t, ignore, gitignore) } }) }) } } func TestModuleGoGitRemovesIgnored(t *testing.T) { t.Parallel() c, ctx := connect(t) committedModGen := goGitBase(t, c). With(daggerExec("mod", "init", "--name=bare", "--sdk=go")). WithExec([]string{"rm", ".gitignore"}). // simulate old path scheme to show we ignore it too to help transition WithExec([]string{"mkdir", "./internal"}). WithExec([]string{"cp", "-a", "./querybuilder", "./internal/querybuilder"}). WithExec([]string{"git", "add", "."}). WithExec([]string{"git", "commit", "-m", "init with generated files"}) changedAfterSync, err := committedModGen. With(daggerExec("mod", "sync")). WithExec([]string{"git", "diff"}). // for debugging WithExec([]string{"git", "status", "--short"}). Stdout(ctx) require.NoError(t, err) t.Logf("changed after sync:\n%s", changedAfterSync) require.Contains(t, changedAfterSync, "D dagger.gen.go\n") require.Contains(t, changedAfterSync, "D querybuilder/marshal.go\n") require.Contains(t, changedAfterSync, "D querybuilder/querybuilder.go\n") require.Contains(t, changedAfterSync, "D internal/querybuilder/marshal.go\n") require.Contains(t, changedAfterSync, "D internal/querybuilder/querybuilder.go\n") } func TestModulePythonGitRemovesIgnored(t *testing.T) { t.Parallel() c, ctx := connect(t) committedModGen := goGitBase(t, c). With(daggerExec("mod", "init", "--name=bare", "--sdk=python")). WithExec([]string{"rm", ".gitignore"}). WithExec([]string{"git", "add", "."}). WithExec([]string{"git", "commit", "-m", "init with generated files"}) changedAfterSync, err := committedModGen. With(daggerExec("mod", "sync")). WithExec([]string{"git", "diff"}). // for debugging WithExec([]string{"git", "status", "--short"}). Stdout(ctx) require.NoError(t, err) t.Logf("changed after sync:\n%s", changedAfterSync) require.Contains(t, changedAfterSync, "D sdk/pyproject.toml\n") require.Contains(t, changedAfterSync, "D sdk/src/dagger/__init__.py\n") } //go:embed testdata/modules/go/minimal/main.go var goSignatures string func TestModuleGoSignatures(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: goSignatures, }) logGen(ctx, t, modGen.Directory(".")) t.Run("func Hello() string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{hello}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"hello":"hello"}}`, out) }) t.Run("func Echo(string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echo(msg: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echo":"hello...hello...hello..."}}`, out) }) t.Run("func EchoPointer(*string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoPointer(msg: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoPointer":"hello...hello...hello..."}}`, out) }) t.Run("func EchoPointerPointer(**string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoPointerPointer(msg: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoPointerPointer":"hello...hello...hello..."}}`, out) }) t.Run("func EchoOptional(string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOptional(msg: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptional":"hello...hello...hello..."}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOptional}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptional":"default...default...default..."}}`, out) }) t.Run("func EchoOptionalPointer(string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOptionalPointer(msg: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptionalPointer":"hello...hello...hello..."}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOptionalPointer}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptionalPointer":"default...default...default..."}}`, out) }) t.Run("func EchoOptionalSlice([]string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOptionalSlice(msg: ["hello", "there"])}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptionalSlice":"hello+there...hello+there...hello+there..."}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOptionalSlice}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptionalSlice":"foobar...foobar...foobar..."}}`, out) }) t.Run("func Echoes([]string) []string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoes(msgs: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoes":["hello...hello...hello..."]}}`, out) }) t.Run("func EchoesVariadic(...string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoesVariadic(msgs: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoesVariadic":"hello...hello...hello..."}}`, out) }) t.Run("func HelloContext(context.Context) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{helloContext}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"helloContext":"hello context"}}`, out) }) t.Run("func EchoContext(context.Context, string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoContext(msg: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoContext":"ctx.hello...ctx.hello...ctx.hello..."}}`, out) }) t.Run("func HelloStringError() (string, error)", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{helloStringError}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"helloStringError":"hello i worked"}}`, out) }) t.Run("func HelloVoid()", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{helloVoid}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"helloVoid":null}}`, out) }) t.Run("func HelloVoidError() error", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{helloVoidError}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"helloVoidError":null}}`, out) }) t.Run("func EchoOpts(string, string, int) error", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOpts(msg: "hi")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOpts":"hi"}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOpts(msg: "hi", suffix: "!", times: 2)}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOpts":"hi!hi!"}}`, out) }) t.Run("func EchoOptsInline(struct{string, string, int}) error", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOptsInline(msg: "hi")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInline":"hi"}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOptsInline(msg: "hi", suffix: "!", times: 2)}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInline":"hi!hi!"}}`, out) }) t.Run("func EchoOptsInlinePointer(*struct{string, string, int}) error", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOptsInlinePointer(msg: "hi")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInlinePointer":"hi"}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOptsInlinePointer(msg: "hi", suffix: "!", times: 2)}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInlinePointer":"hi!hi!"}}`, out) }) t.Run("func EchoOptsInlineCtx(ctx, struct{string, string, int}) error", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOptsInlineCtx(msg: "hi")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInlineCtx":"hi"}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOptsInlineCtx(msg: "hi", suffix: "!", times: 2)}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInlineCtx":"hi!hi!"}}`, out) }) t.Run("func EchoOptsInlineTags(struct{string, string, int}) error", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOptsInlineTags(msg: "hi")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInlineTags":"hi"}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOptsInlineTags(msg: "hi", suffix: "!", times: 2)}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInlineTags":"hi!hi!"}}`, out) }) } func TestModuleGoSignaturesBuiltinTypes(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main import "context" type Minimal struct {} func (m *Minimal) Read(ctx context.Context, dir Directory) (string, error) { return dir.File("foo").Contents(ctx) } func (m *Minimal) ReadPointer(ctx context.Context, dir *Directory) (string, error) { return dir.File("foo").Contents(ctx) } func (m *Minimal) ReadSlice(ctx context.Context, dir []Directory) (string, error) { return dir[0].File("foo").Contents(ctx) } func (m *Minimal) ReadVariadic(ctx context.Context, dir ...Directory) (string, error) { return dir[0].File("foo").Contents(ctx) } func (m *Minimal) ReadOptional(ctx context.Context, dir Optional[Directory]) (string, error) { d, ok := dir.Get() if ok { return d.File("foo").Contents(ctx) } return "", nil } `, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerQuery(`{directory{withNewFile(path: "foo", contents: "bar"){id}}}`)).Stdout(ctx) require.NoError(t, err) dirID := gjson.Get(out, "directory.withNewFile.id").String() t.Run("func Read(ctx, Directory) (string, error)", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(fmt.Sprintf(`{minimal{read(dir: "%s")}}`, dirID))).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"read":"bar"}}`, out) }) t.Run("func ReadPointer(ctx, *Directory) (string, error)", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(fmt.Sprintf(`{minimal{readPointer(dir: "%s")}}`, dirID))).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"readPointer":"bar"}}`, out) }) t.Run("func ReadSlice(ctx, []Directory) (string, error)", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(fmt.Sprintf(`{minimal{readSlice(dir: ["%s"])}}`, dirID))).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"readSlice":"bar"}}`, out) }) t.Run("func ReadVariadic(ctx, ...Directory) (string, error)", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(fmt.Sprintf(`{minimal{readVariadic(dir: ["%s"])}}`, dirID))).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"readVariadic":"bar"}}`, out) }) t.Run("func ReadOptional(ctx, Optional[Directory]) (string, error)", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(fmt.Sprintf(`{minimal{readOptional(dir: "%s")}}`, dirID))).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"readOptional":"bar"}}`, out) out, err = modGen.With(daggerQuery(`{minimal{readOptional}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"readOptional":""}}`, out) }) } func TestModuleGoSignaturesUnexported(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Minimal struct {} type Foo struct {} type bar struct {} func (m *Minimal) Hello(name string) string { return name } func (f *Foo) Hello(name string) string { return name } func (b *bar) Hello(name string) string { return name } `, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(inspectModule).Stdout(ctx) require.NoError(t, err) objs := gjson.Get(out, "host.directory.asModule.objects") require.Equal(t, 2, len(objs.Array())) minimal := objs.Get(`0.asObject`) require.Equal(t, "Minimal", minimal.Get("name").String()) foo := objs.Get(`1.asObject`) require.Equal(t, "MinimalFoo", foo.Get("name").String()) modGen = c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Minimal struct {} type Foo struct { Bar bar } type bar struct {} func (m *Minimal) Hello(name string) string { return name } func (f *Foo) Hello(name string) string { return name } func (b *bar) Hello(name string) string { return name } `, }) logGen(ctx, t, modGen.Directory(".")) _, err = modGen.With(inspectModule).Stderr(ctx) require.Error(t, err) } func TestModuleGoSignaturesMixMatch(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Minimal struct {} func (m *Minimal) Hello(name string, opts struct{}, opts2 struct{}) string { return name } `, }) logGen(ctx, t, modGen.Directory(".")) _, err := modGen.With(daggerQuery(`{minimal{hello}}`)).Stdout(ctx) require.Error(t, err) } func TestModuleGoSignaturesIDable(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Minimal struct {} type Custom struct { Data string } func (m *Minimal) Hello() string { return "hello" } func (m *Minimal) UseCustom(custom *Custom) string { return custom.Data } `, }) logGen(ctx, t, modGen.Directory(".")) // Currently, IDable modules are *not* supported, and should fail with an // error that fails to find the ID type. _, err := modGen.With(daggerQuery(`{minimal{hello}}`)).Stdout(ctx) require.Error(t, err) require.Contains(t, err.Error(), "Undefined type MinimalCustomID") } var inspectModule = daggerQuery(` query { host { directory(path: ".") { asModule { objects { asObject { name functions { name description args { name description } } } } } } } } `) func TestModuleGoDocs(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: goSignatures, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(inspectModule).Stdout(ctx) require.NoError(t, err) obj := gjson.Get(out, "host.directory.asModule.objects.0.asObject") require.Equal(t, "Minimal", obj.Get("name").String()) hello := obj.Get(`functions.#(name="hello")`) require.Equal(t, "hello", hello.Get("name").String()) require.Empty(t, hello.Get("description").String()) require.Empty(t, hello.Get("args").Array()) // test the args-based form echoOpts := obj.Get(`functions.#(name="echoOpts")`) require.Equal(t, "echoOpts", echoOpts.Get("name").String()) require.Equal(t, "EchoOpts does some opts things", echoOpts.Get("description").String()) require.Len(t, echoOpts.Get("args").Array(), 3) require.Equal(t, "msg", echoOpts.Get("args.0.name").String()) require.Equal(t, "the message to echo", echoOpts.Get("args.0.description").String()) require.Equal(t, "suffix", echoOpts.Get("args.1.name").String()) require.Equal(t, "String to append to the echoed message", echoOpts.Get("args.1.description").String()) require.Equal(t, "times", echoOpts.Get("args.2.name").String()) require.Equal(t, "Number of times to repeat the message", echoOpts.Get("args.2.description").String()) // test the inline struct form echoOpts = obj.Get(`functions.#(name="echoOptsInline")`) require.Equal(t, "echoOptsInline", echoOpts.Get("name").String()) require.Equal(t, "EchoOptsInline does some opts things", echoOpts.Get("description").String()) require.Len(t, echoOpts.Get("args").Array(), 3) require.Equal(t, "msg", echoOpts.Get("args.0.name").String()) require.Equal(t, "the message to echo", echoOpts.Get("args.0.description").String()) require.Equal(t, "suffix", echoOpts.Get("args.1.name").String()) require.Equal(t, "String to append to the echoed message", echoOpts.Get("args.1.description").String()) require.Equal(t, "times", echoOpts.Get("args.2.name").String()) require.Equal(t, "Number of times to repeat the message", echoOpts.Get("args.2.description").String()) } func TestModuleGoDocsEdgeCases(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Minimal struct {} // some docs func (m *Minimal) Hello(foo string, bar string, // hello baz string, qux string, x string, // lol ) string { return foo + bar } func (m *Minimal) HelloMore( // foo here foo, // bar here bar string, ) string { return foo + bar } func (m *Minimal) HelloMoreInline(opts struct{ // foo here foo, bar string }) string { return opts.foo + opts.bar } func (m *Minimal) HelloAgain( // docs for helloagain foo string, bar string, // docs for bar baz string, ) string { return foo + bar } func (m *Minimal) HelloFinal( foo string) string { // woops return foo } `, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(inspectModule).Stdout(ctx) require.NoError(t, err) obj := gjson.Get(out, "host.directory.asModule.objects.0.asObject") require.Equal(t, "Minimal", obj.Get("name").String()) hello := obj.Get(`functions.#(name="hello")`) require.Equal(t, "hello", hello.Get("name").String()) require.Len(t, hello.Get("args").Array(), 5) require.Equal(t, "foo", hello.Get("args.0.name").String()) require.Equal(t, "", hello.Get("args.0.description").String()) require.Equal(t, "bar", hello.Get("args.1.name").String()) require.Equal(t, "", hello.Get("args.1.description").String()) require.Equal(t, "baz", hello.Get("args.2.name").String()) require.Equal(t, "hello", hello.Get("args.2.description").String()) require.Equal(t, "qux", hello.Get("args.3.name").String()) require.Equal(t, "", hello.Get("args.3.description").String()) require.Equal(t, "x", hello.Get("args.4.name").String()) require.Equal(t, "lol", hello.Get("args.4.description").String()) hello = obj.Get(`functions.#(name="helloMore")`) require.Equal(t, "helloMore", hello.Get("name").String()) require.Len(t, hello.Get("args").Array(), 2) require.Equal(t, "foo", hello.Get("args.0.name").String()) require.Equal(t, "foo here", hello.Get("args.0.description").String()) require.Equal(t, "bar", hello.Get("args.1.name").String()) require.Equal(t, "bar here", hello.Get("args.1.description").String()) hello = obj.Get(`functions.#(name="helloMoreInline")`) require.Equal(t, "helloMoreInline", hello.Get("name").String()) require.Len(t, hello.Get("args").Array(), 2) require.Equal(t, "foo", hello.Get("args.0.name").String()) require.Equal(t, "foo here", hello.Get("args.0.description").String()) require.Equal(t, "bar", hello.Get("args.1.name").String()) require.Equal(t, "", hello.Get("args.1.description").String()) hello = obj.Get(`functions.#(name="helloAgain")`) require.Equal(t, "helloAgain", hello.Get("name").String()) require.Len(t, hello.Get("args").Array(), 3) require.Equal(t, "foo", hello.Get("args.0.name").String()) require.Equal(t, "", hello.Get("args.0.description").String()) require.Equal(t, "bar", hello.Get("args.1.name").String()) require.Equal(t, "docs for bar", hello.Get("args.1.description").String()) require.Equal(t, "baz", hello.Get("args.2.name").String()) require.Equal(t, "", hello.Get("args.2.description").String()) hello = obj.Get(`functions.#(name="helloFinal")`) require.Equal(t, "helloFinal", hello.Get("name").String()) require.Len(t, hello.Get("args").Array(), 1) require.Equal(t, "foo", hello.Get("args.0.name").String()) require.Equal(t, "", hello.Get("args.0.description").String()) } //go:embed testdata/modules/go/extend/main.go var goExtend string // this is no longer allowed, but verify the SDK errors out func TestModuleGoExtendCore(t *testing.T) { t.Parallel() var logs safeBuffer c, ctx := connect(t, dagger.WithLogOutput(&logs)) _, err := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: goExtend, }). With(daggerExec("mod", "sync")). Sync(ctx) require.Error(t, err) require.NoError(t, c.Close()) require.Contains(t, logs.String(), "cannot define methods on objects from outside this module") } //go:embed testdata/modules/go/custom-types/main.go var goCustomTypes string //go:embed testdata/modules/python/custom-types/main.py var pythonCustomTypes string func TestModuleCustomTypes(t *testing.T) { t.Parallel() type testCase struct { sdk string sourcePath string sourceContent string } for _, tc := range []testCase{ { sdk: "go", sourcePath: "main.go", sourceContent: goCustomTypes, }, { sdk: "python", sourcePath: "src/main.py", sourceContent: pythonCustomTypes, }, } { t.Run(fmt.Sprintf("custom %s types", tc.sdk), func(t *testing.T) { c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk="+tc.sdk)). WithNewFile(tc.sourcePath, dagger.ContainerWithNewFileOpts{ Contents: tc.sourceContent, }) if tc.sdk == "go" { logGen(ctx, t, modGen.Directory(".")) } out, err := modGen.With(daggerQuery(`{test{repeater(msg:"echo!", times: 3){render}}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"test":{"repeater":{"render":"echo!echo!echo!"}}}`, out) }) } } func TestModuleGoReturnTypeDetection(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=foo", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Foo struct {} type X struct { Message string ` + "`json:\"message\"`" + ` } func (m *Foo) MyFunction() X { return X{Message: "foo"} } `, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerQuery(`{foo{myFunction{message}}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"foo":{"myFunction":{"message":"foo"}}}`, out) } func TestModuleGoGlobalVarDAG(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=foo", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main import "context" type Foo struct {} var someDefault = dag.Container().From("alpine:latest") func (m *Foo) Fn(ctx context.Context) (string, error) { return someDefault.WithExec([]string{"echo", "foo"}).Stdout(ctx) } `, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerQuery(`{foo{fn}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"foo":{"fn":"foo\n"}}`, out) } //go:embed testdata/modules/go/use/dep/main.go var useInner string //go:embed testdata/modules/go/use/main.go var useOuter string func TestModuleUseLocal(t *testing.T) { t.Parallel() c, ctx := connect(t) t.Run("go uses go", func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/dep"). With(daggerExec("mod", "init", "--name=dep", "--sdk=go")). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=use", "--sdk=go")). WithNewFile("/work/dep/main.go", dagger.ContainerWithNewFileOpts{ Contents: useInner, }). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: useOuter, }). With(daggerExec("mod", "install", "./dep")). WithEnvVariable("BUST", identity.NewID()) // NB(vito): hmm... logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerQuery(`{use{useHello}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"use":{"useHello":"hello"}}`, out) // cannot use transitive dependency directly _, err = modGen.With(daggerQuery(`{dep{hello}}`)).Stdout(ctx) require.Error(t, err) require.ErrorContains(t, err, `Cannot query field "dep" on type "Query".`) }) t.Run("python uses go", func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/dep"). With(daggerExec("mod", "init", "--name=dep", "--sdk=go")). WithNewFile("/work/dep/main.go", dagger.ContainerWithNewFileOpts{ Contents: useInner, }). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=use", "--sdk=python")). With(daggerExec("mod", "install", "./dep")). WithNewFile("/work/src/main.py", dagger.ContainerWithNewFileOpts{ Contents: `from dagger.mod import function import dagger @function def use_hello() -> str: return dagger.dep().hello() `, }) out, err := modGen.With(daggerQuery(`{use{useHello}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"use":{"useHello":"hello"}}`, out) // cannot use transitive dependency directly _, err = modGen.With(daggerQuery(`{dep{hello}}`)).Stdout(ctx) require.Error(t, err) require.ErrorContains(t, err, `Cannot query field "dep" on type "Query".`) }) } func TestModuleCodegenonDepChange(t *testing.T) { t.Parallel() c, ctx := connect(t) t.Run("go uses go", func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/dep"). With(daggerExec("mod", "init", "--name=dep", "--sdk=go")). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=use", "--sdk=go")). WithNewFile("/work/dep/main.go", dagger.ContainerWithNewFileOpts{ Contents: useInner, }). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: useOuter, }). With(daggerExec("mod", "install", "./dep")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerQuery(`{use{useHello}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"use":{"useHello":"hello"}}`, out) // make back-incompatible change to dep newInner := strings.ReplaceAll(useInner, `Hello()`, `Hellov2()`) modGen = modGen. WithNewFile("/work/dep/main.go", dagger.ContainerWithNewFileOpts{ Contents: newInner, }). WithExec([]string{"sh", "-c", "dagger mod sync"}, dagger.ContainerWithExecOpts{ ExperimentalPrivilegedNesting: true, }) codegenContents, err := modGen.File("/work/dagger.gen.go").Contents(ctx) require.NoError(t, err) require.Contains(t, codegenContents, "Hellov2") newOuter := strings.ReplaceAll(useOuter, `Hello(ctx)`, `Hellov2(ctx)`) modGen = modGen. WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: newOuter, }) out, err = modGen.With(daggerQuery(`{use{useHello}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"use":{"useHello":"hello"}}`, out) }) t.Run("python uses go", func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/dep"). With(daggerExec("mod", "init", "--name=dep", "--sdk=go")). WithNewFile("/work/dep/main.go", dagger.ContainerWithNewFileOpts{ Contents: useInner, }). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=use", "--sdk=python")). With(daggerExec("mod", "install", "./dep")). WithNewFile("/work/src/main.py", dagger.ContainerWithNewFileOpts{ Contents: `from dagger.mod import function import dagger @function def use_hello() -> str: return dagger.dep().hello() `, }) out, err := modGen.With(daggerQuery(`{use{useHello}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"use":{"useHello":"hello"}}`, out) // make back-incompatible change to dep newInner := strings.ReplaceAll(useInner, `Hello()`, `Hellov2()`) modGen = modGen. WithNewFile("/work/dep/main.go", dagger.ContainerWithNewFileOpts{ Contents: newInner, }). WithExec([]string{"sh", "-c", "dagger mod sync"}, dagger.ContainerWithExecOpts{ ExperimentalPrivilegedNesting: true, }) codegenContents, err := modGen.File("/work/sdk/src/dagger/client/gen.py").Contents(ctx) require.NoError(t, err) require.Contains(t, codegenContents, "hellov2") modGen = modGen. WithNewFile("/work/src/main.py", dagger.ContainerWithNewFileOpts{ Contents: `from dagger.mod import function import dagger @function def use_hello() -> str: return dagger.dep().hellov2() `, }) out, err = modGen.With(daggerQuery(`{use{useHello}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"use":{"useHello":"hello"}}`, out) }) } func TestModuleGoUseLocalMulti(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/foo"). WithNewFile("/work/foo/main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Foo struct {} func (m *Foo) Name() string { return "foo" } `, }). With(daggerExec("mod", "init", "--name=foo", "--sdk=go")). WithWorkdir("/work/bar"). WithNewFile("/work/bar/main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Bar struct {} func (m *Bar) Name() string { return "bar" } `, }). With(daggerExec("mod", "init", "--name=bar", "--sdk=go")). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=use", "--sdk=go")). With(daggerExec("mod", "install", "./foo")). With(daggerExec("mod", "install", "./bar")). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main import "context" import "fmt" type Use struct {} func (m *Use) Names(ctx context.Context) ([]string, error) { fooName, err := dag.Foo().Name(ctx) if err != nil { return nil, fmt.Errorf("foo.name: %w", err) } barName, err := dag.Bar().Name(ctx) if err != nil { return nil, fmt.Errorf("bar.name: %w", err) } return []string{fooName, barName}, nil } `, }). WithEnvVariable("BUST", identity.NewID()) // NB(vito): hmm... logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerQuery(`{use{names}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"use":{"names":["foo", "bar"]}}`, out) } //go:embed testdata/modules/go/wrapper/main.go var wrapper string func TestModuleGoWrapping(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=wrapper", "--sdk=go")). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: wrapper, }) logGen(ctx, t, modGen.Directory(".")) id := identity.NewID() out, err := modGen.With(daggerQuery( fmt.Sprintf(`{wrapper{container{echo(msg:%q){unwrap{stdout}}}}}`, id), )).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, fmt.Sprintf(`{"wrapper":{"container":{"echo":{"unwrap":{"stdout":%q}}}}}`, id), out) } func TestModuleConfigAPI(t *testing.T) { t.Parallel() c, ctx := connect(t) moduleDir := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/subdir"). With(daggerExec("mod", "init", "--name=test", "--sdk=go", "--root=..")). Directory("/work") cfg := c.ModuleConfig(moduleDir, dagger.ModuleConfigOpts{Subpath: "subdir"}) name, err := cfg.Name(ctx) require.NoError(t, err) require.Equal(t, "test", name) sdk, err := cfg.SDK(ctx) require.NoError(t, err) require.Equal(t, "go", sdk) root, err := cfg.Root(ctx) require.NoError(t, err) require.Equal(t, "..", root) } func TestModulePythonInit(t *testing.T) { t.Run("from scratch", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=bare", "--sdk=python")) out, err := modGen. With(daggerQuery(`{bare{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"bare":{"containerEcho":{"stdout":"hello\n"}}}`, out) }) t.Run("with different root", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/child"). With(daggerExec("mod", "init", "--name=bare", "--sdk=python", "--root=..")) out, err := modGen. With(daggerQuery(`{bare{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"bare":{"containerEcho":{"stdout":"hello\n"}}}`, out) }) t.Run("respects existing pyproject.toml", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("pyproject.toml", dagger.ContainerWithNewFileOpts{ Contents: `[project] name = "has-pyproject" version = "0.0.0" `, }). With(daggerExec("mod", "init", "--name=hasPyproject", "--sdk=python")) out, err := modGen. With(daggerQuery(`{hasPyproject{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"hasPyproject":{"containerEcho":{"stdout":"hello\n"}}}`, out) t.Run("preserves module name", func(t *testing.T) { generated, err := modGen.File("pyproject.toml").Contents(ctx) require.NoError(t, err) require.Contains(t, generated, `name = "has-pyproject"`) }) }) t.Run("respects existing main.py", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/src/main/__init__.py", dagger.ContainerWithNewFileOpts{ Contents: "from . import notmain\n", }). WithNewFile("/work/src/main/notmain.py", dagger.ContainerWithNewFileOpts{ Contents: `from dagger.mod import function @function def hello() -> str: return "Hello, world!" `, }). With(daggerExec("mod", "init", "--name=hasMainPy", "--sdk=python")) out, err := modGen. With(daggerQuery(`{hasMainPy{hello}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"hasMainPy":{"hello":"Hello, world!"}}`, out) }) } func TestModuleLotsOfFunctions(t *testing.T) { t.Parallel() const funcCount = 100 t.Run("go sdk", func(t *testing.T) { t.Parallel() c, ctx := connect(t) mainSrc := ` package main type PotatoSack struct {} ` for i := 0; i < funcCount; i++ { mainSrc += fmt.Sprintf(` func (m *PotatoSack) Potato%d() string { return "potato #%d" } `, i, i) } modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: mainSrc, }). With(daggerExec("mod", "init", "--name=potatoSack", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) var eg errgroup.Group for i := 0; i < funcCount; i++ { i := i // just verify a subset work if i%10 != 0 { continue } eg.Go(func() error { _, err := modGen. With(daggerCall(fmt.Sprintf("potato%d", i))). Sync(ctx) return err }) } require.NoError(t, eg.Wait()) }) t.Run("python sdk", func(t *testing.T) { t.Parallel() c, ctx := connect(t) mainSrc := `from dagger.mod import function ` for i := 0; i < funcCount; i++ { mainSrc += fmt.Sprintf(` @function def potato_%d() -> str: return "potato #%d" `, i, i) } modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("./src/main.py", dagger.ContainerWithNewFileOpts{ Contents: mainSrc, }). With(daggerExec("mod", "init", "--name=potatoSack", "--sdk=python")) var eg errgroup.Group for i := 0; i < funcCount; i++ { i := i // just verify a subset work if i%10 != 0 { continue } eg.Go(func() error { _, err := modGen. With(daggerCall(fmt.Sprintf("potato%d", i))). Sync(ctx) return err }) } require.NoError(t, eg.Wait()) }) } func TestModuleLotsOfDeps(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work") modCount := 0 getModMainSrc := func(name string, depNames []string) string { t.Helper() mainSrc := fmt.Sprintf(`package main import "context" type %s struct {} func (m *%s) Fn(ctx context.Context) (string, error) { s := "%s" var depS string _ = depS var err error _ = err `, strcase.ToCamel(name), strcase.ToCamel(name), name) for _, depName := range depNames { mainSrc += fmt.Sprintf(` depS, err = dag.%s().Fn(ctx) if err != nil { return "", err } s += depS `, strcase.ToCamel(depName)) } mainSrc += "return s, nil\n}\n" fmted, err := format.Source([]byte(mainSrc)) require.NoError(t, err) return string(fmted) } // need to construct dagger.json directly in order to avoid excessive // `dagger mod use` calls while constructing the huge DAG of deps getModDaggerConfig := func(name string, depNames []string) string { t.Helper() var depVals []string for _, depName := range depNames { depVals = append(depVals, "../"+depName) } cfg := modules.Config{ Name: name, Root: "..", SDK: "go", Dependencies: depVals, } bs, err := json.Marshal(cfg) require.NoError(t, err) return string(bs) } addModulesWithDeps := func(newMods int, depNames []string) []string { t.Helper() var newModNames []string for i := 0; i < newMods; i++ { name := fmt.Sprintf("mod%d", modCount) modCount++ newModNames = append(newModNames, name) modGen = modGen. WithWorkdir("/work/"+name). WithNewFile("./main.go", dagger.ContainerWithNewFileOpts{ Contents: getModMainSrc(name, depNames), }). WithNewFile("./dagger.json", dagger.ContainerWithNewFileOpts{ Contents: getModDaggerConfig(name, depNames), }) } return newModNames } // Create a base module, then add 6 layers of deps, where each layer has one more module // than the last of modules as the previous layer and each module within the layer has a // dep on each module from the previous layer. Finally add a single module at the top that // depends on all modules from the last layer and call that. // Basically, this creates a quadratically growing DAG of modules and verifies we // handle it efficiently enough to be callable. curDeps := addModulesWithDeps(1, nil) for i := 0; i < 6; i++ { curDeps = addModulesWithDeps(len(curDeps)+1, curDeps) } addModulesWithDeps(1, curDeps) _, err := modGen.With(daggerCall("fn")).Stdout(ctx) require.NoError(t, err) } func TestModuleNamespacing(t *testing.T) { t.Parallel() c, ctx := connect(t) moduleSrcPath, err := filepath.Abs("./testdata/modules/go/namespacing") require.NoError(t, err) ctr := c.Container().From(alpineImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithMountedDirectory("/work", c.Host().Directory(moduleSrcPath)). WithWorkdir("/work") out, err := ctr. With(daggerQuery(`{test{fn(s:"yo")}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"test":{"fn":"1:yo 2:yo"}}`, out) } func TestModuleRoots(t *testing.T) { t.Parallel() c, ctx := connect(t) moduleSrcPath, err := filepath.Abs("./testdata/modules/go/roots") require.NoError(t, err) entries, err := os.ReadDir(moduleSrcPath) require.NoError(t, err) ctr := c.Container().From(alpineImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithMountedDirectory("/work", c.Host().Directory(moduleSrcPath)) for _, entry := range entries { entry := entry t.Run(entry.Name(), func(t *testing.T) { t.Parallel() ctr := ctr.WithWorkdir("/work/" + entry.Name()) out, err := ctr. With(daggerQuery(fmt.Sprintf(`{%s{hello}}`, strcase.ToLowerCamel(entry.Name())))). Stdout(ctx) if strings.HasPrefix(entry.Name(), "good-") { require.NoError(t, err) require.JSONEq(t, fmt.Sprintf(`{"%s":{"hello": "hello"}}`, strcase.ToLowerCamel(entry.Name())), out) } else if strings.HasPrefix(entry.Name(), "bad-") { require.Error(t, err) require.Regexp(t, "is not under( module)? root", err.Error()) } }) } } func TestModuleDaggerCall(t *testing.T) { t.Parallel() c, ctx := connect(t) t.Run("service args", func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main import ( "context" ) type Test struct {} func (m *Test) Fn(ctx context.Context, svc *Service) (string, error) { return dag.Container().From("alpine:3.18").WithExec([]string{"apk", "add", "curl"}). WithServiceBinding("daserver", svc). WithExec([]string{"curl", "http://daserver:8000"}). Stdout(ctx) } `, }) logGen(ctx, t, modGen.Directory(".")) httpServer, _ := httpService(ctx, t, c, "im up") endpoint, err := httpServer.Endpoint(ctx) require.NoError(t, err) out, err := modGen. WithServiceBinding("testserver", httpServer). With(daggerCall("fn", "--svc", "tcp://"+endpoint)).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "im up") }) t.Run("list args", func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("foo.txt", dagger.ContainerWithNewFileOpts{ Contents: "bar", }). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main import ( "context" "strings" ) type Minimal struct {} func (m *Minimal) Hello(msgs []string) string { return strings.Join(msgs, "+") } func (m *Minimal) Reads(ctx context.Context, files []File) (string, error) { var contents []string for _, f := range files { content, err := f.Contents(ctx) if err != nil { return "", err } contents = append(contents, content) } return strings.Join(contents, "+"), nil } `, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerCall("hello", "--msgs", "yo", "--msgs", "my", "--msgs", "friend")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "yo+my+friend") out, err = modGen.With(daggerCall("reads", "--files=foo.txt", "--files=foo.txt")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "bar+bar") }) t.Run("return list objects", func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Minimal struct {} type Foo struct { Bar int ` + "`" + `json:"bar"` + "`" + ` } func (m *Minimal) Fn() []*Foo { var foos []*Foo for i := 0; i < 3; i++ { foos = append(foos, &Foo{Bar: i}) } return foos } `, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerCall("fn", "bar")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "0\n1\n2") }) t.Run("directory arg inputs", func(t *testing.T) { t.Parallel() t.Run("local dir", func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk=go")). WithNewFile("/dir/subdir/foo.txt", dagger.ContainerWithNewFileOpts{ Contents: "foo", }). WithNewFile("/dir/subdir/bar.txt", dagger.ContainerWithNewFileOpts{ Contents: "bar", }). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Test struct {} func (m *Test) Fn(dir *Directory) *Directory { return dir } `, }) out, err := modGen.With(daggerCall("fn", "--dir", "/dir/subdir")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "bar.txt\nfoo.txt") out, err = modGen.With(daggerCall("fn", "--dir", "file:///dir/subdir")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "bar.txt\nfoo.txt") }) t.Run("git dir", func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Test struct {} func (m *Test) Fn(dir *Directory, subpath Optional[string]) *Directory { return dir.Directory(subpath.GetOr(".")) } `, }) for _, tc := range []struct { baseURL string subpath string }{ { baseURL: "https://github.com/dagger/dagger", }, { baseURL: "https://github.com/dagger/dagger", subpath: ".changes", }, { baseURL: "https://github.com/dagger/dagger.git", }, { baseURL: "https://github.com/dagger/dagger.git", subpath: ".changes", }, } { tc := tc t.Run(fmt.Sprintf("%s:%s", tc.baseURL, tc.subpath), func(t *testing.T) { t.Parallel() url := tc.baseURL + "#v0.9.1" if tc.subpath != "" { url += ":" + tc.subpath } args := []string{"fn", "--dir", url} if tc.subpath == "" { args = append(args, "--subpath", ".changes") } out, err := modGen.With(daggerCall(args...)).Stdout(ctx) require.NoError(t, err) require.Contains(t, out, "v0.9.1.md") require.NotContains(t, out, "v0.9.2.md") }) } }) }) } func TestModuleGoSyncDeps(t *testing.T) { // verify that changes to deps result in a sync to the depender module t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/dep"). With(daggerExec("mod", "init", "--name=dep", "--sdk=go")). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=use", "--sdk=go")). WithNewFile("/work/dep/main.go", dagger.ContainerWithNewFileOpts{ Contents: useInner, }). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: useOuter, }). With(daggerExec("mod", "install", "./dep")) logGen(ctx, t, modGen.Directory(".")) modGen = modGen.With(daggerQuery(`{use{useHello}}`)) out, err := modGen.Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"use":{"useHello":"hello"}}`, out) newInner := strings.ReplaceAll(useInner, `"hello"`, `"goodbye"`) modGen = modGen. WithNewFile("/work/dep/main.go", dagger.ContainerWithNewFileOpts{ Contents: newInner, }). With(daggerExec("mod", "sync")) logGen(ctx, t, modGen.Directory(".")) out, err = modGen.With(daggerQuery(`{use{useHello}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"use":{"useHello":"goodbye"}}`, out) } //go:embed testdata/modules/go/id/arg/main.go var badIDArgGoSrc string //go:embed testdata/modules/python/id/arg/src/main.py var badIDArgPySrc string //go:embed testdata/modules/go/id/field/main.go var badIDFieldGoSrc string //go:embed testdata/modules/go/id/fn/main.go var badIDFnGoSrc string //go:embed testdata/modules/python/id/fn/src/main.py var badIDFnPySrc string func TestModuleReservedWords(t *testing.T) { // verify disallowed names are rejected t.Parallel() c, ctx := connect(t) t.Run("id", func(t *testing.T) { t.Parallel() t.Run("arg", func(t *testing.T) { t.Parallel() t.Run("go", func(t *testing.T) { t.Parallel() _, err := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk=go")). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: badIDArgGoSrc, }). With(daggerQuery(`{test{fn(id:"no")}}`)). Sync(ctx) require.ErrorContains(t, err, "cannot define argument with reserved name \"id\"") }) t.Run("python", func(t *testing.T) { t.Parallel() _, err := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk=python")). WithNewFile("/work/src/main.py", dagger.ContainerWithNewFileOpts{ Contents: badIDArgPySrc, }). With(daggerQuery(`{test{fn(id:"no")}}`)). Sync(ctx) require.ErrorContains(t, err, "cannot define argument with reserved name \"id\"") }) }) t.Run("field", func(t *testing.T) { t.Parallel() t.Run("go", func(t *testing.T) { t.Parallel() _, err := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk=go")). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: badIDFieldGoSrc, }). With(daggerQuery(`{test{fn{id}}}`)). Sync(ctx) require.ErrorContains(t, err, "cannot define field with reserved name \"ID\"") }) }) t.Run("fn", func(t *testing.T) { t.Parallel() t.Run("go", func(t *testing.T) { t.Parallel() _, err := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk=go")). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: badIDFnGoSrc, }). With(daggerQuery(`{test{id}}`)). Sync(ctx) require.ErrorContains(t, err, "cannot define function with reserved name \"id\"") }) t.Run("python", func(t *testing.T) { t.Parallel() _, err := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk=python")). WithNewFile("/work/src/main.py", dagger.ContainerWithNewFileOpts{ Contents: badIDFnPySrc, }). With(daggerQuery(`{test{fn(id:"no")}}`)). Sync(ctx) require.ErrorContains(t, err, "cannot define function with reserved name \"id\"") }) }) }) } func TestEnvCmd(t *testing.T) { t.Skip("pending conversion to modules") t.Parallel() type testCase struct { environmentPath string expectedSDK string expectedName string expectedRoot string } for _, tc := range []testCase{ { environmentPath: "core/integration/testdata/environments/go/basic", expectedSDK: "go", expectedName: "basic", expectedRoot: "../../../../../../", }, } { tc := tc for _, testGitEnv := range []bool{false, true} { testGitEnv := testGitEnv testName := "local environment" if testGitEnv { testName = "git environment" } testName += "/" + tc.environmentPath t.Run(testName, func(t *testing.T) { t.Parallel() c, ctx := connect(t) stderr, err := CLITestContainer(ctx, t, c). WithLoadedEnv(tc.environmentPath, testGitEnv). CallEnv(). Stderr(ctx) require.NoError(t, err) require.Contains(t, stderr, fmt.Sprintf(`"root": %q`, tc.expectedRoot)) require.Contains(t, stderr, fmt.Sprintf(`"name": %q`, tc.expectedName)) require.Contains(t, stderr, fmt.Sprintf(`"sdk": %q`, tc.expectedSDK)) }) } } } func TestEnvCmdHelps(t *testing.T) { t.Skip("pending conversion to modules") t.Parallel() c, ctx := connect(t) baseCtr := CLITestContainer(ctx, t, c).WithHelpArg(true) // test with no env specified noEnvCtr := baseCtr // test with a valid local env validLocalEnvCtr := baseCtr.WithLoadedEnv("core/integration/testdata/environments/go/basic", false) // test with a broken local env (this helps ensure that we aren't actually running the entrypoints, if we did we'd get an error) brokenLocalEnvCtr := baseCtr.WithLoadedEnv("core/integration/testdata/environments/go/broken", false) for _, ctr := range []*DaggerCLIContainer{noEnvCtr, validLocalEnvCtr, brokenLocalEnvCtr} { type testCase struct { testName string cmdCtr *DaggerCLIContainer expectedOutput string } for _, tc := range []testCase{ { testName: "dagger env/" + ctr.EnvArg, cmdCtr: ctr.CallEnv(), expectedOutput: "Usage:\n dagger environment [flags]\n\nAliases:\n environment, env", }, { testName: "dagger env init/" + ctr.EnvArg, cmdCtr: ctr.CallEnvInit(), expectedOutput: "Usage:\n dagger environment init", }, { testName: "dagger env sync/" + ctr.EnvArg, cmdCtr: ctr.CallEnvSync(), expectedOutput: "Usage:\n dagger environment sync", }, { testName: "dagger env extend/" + ctr.EnvArg, cmdCtr: ctr.CallEnvExtend("./fake/dep"), expectedOutput: "Usage:\n dagger environment extend", }, { testName: "dagger checks/" + ctr.EnvArg, cmdCtr: ctr.CallChecks(), expectedOutput: "Usage:\n dagger checks", }, } { tc := tc t.Run(tc.testName, func(t *testing.T) { t.Parallel() stdout, err := tc.cmdCtr.Stdout(ctx) require.NoError(t, err) require.Contains(t, stdout, tc.expectedOutput) }) } } } func TestEnvCmdInit(t *testing.T) { t.Skip("pending conversion to modules") t.Parallel() type testCase struct { testName string environmentPath string sdk string name string root string expectedErrorMessage string } for _, tc := range []testCase{ { testName: "explicit environment dir/go", environmentPath: "/var/testenvironment/subdir", sdk: "go", name: identity.NewID(), root: "../", }, { testName: "explicit environment dir/python", environmentPath: "/var/testenvironment/subdir", sdk: "python", name: identity.NewID(), root: "../..", }, { testName: "explicit environment file", environmentPath: "/var/testenvironment/subdir/dagger.json", sdk: "python", name: identity.NewID(), }, { testName: "implicit environment", sdk: "go", name: identity.NewID(), }, { testName: "implicit environment with root", environmentPath: "/var/testenvironment", sdk: "python", name: identity.NewID(), root: "..", }, { testName: "invalid sdk", environmentPath: "/var/testenvironment", sdk: "c++--", name: identity.NewID(), expectedErrorMessage: "unsupported environment SDK", }, { testName: "error on git", environmentPath: "git://github.com/dagger/dagger.git", sdk: "go", name: identity.NewID(), expectedErrorMessage: "environment init is not supported for git environments", }, } { tc := tc t.Run(tc.testName, func(t *testing.T) { t.Parallel() c, ctx := connect(t) ctr := CLITestContainer(ctx, t, c). WithEnvArg(tc.environmentPath). WithSDKArg(tc.sdk). WithNameArg(tc.name). CallEnvInit() if tc.expectedErrorMessage != "" { _, err := ctr.Sync(ctx) require.ErrorContains(t, err, tc.expectedErrorMessage) return } expectedConfigPath := tc.environmentPath if !strings.HasSuffix(expectedConfigPath, "dagger.json") { expectedConfigPath = filepath.Join(expectedConfigPath, "dagger.json") } _, err := ctr.File(expectedConfigPath).Contents(ctx) require.NoError(t, err) // TODO: test rest of SDKs once custom codegen is supported if tc.sdk == "go" { codegenFile := filepath.Join(filepath.Dir(expectedConfigPath), "dagger.gen.go") _, err := ctr.File(codegenFile).Contents(ctx) require.NoError(t, err) } stderr, err := ctr.CallEnv().Stderr(ctx) require.NoError(t, err) require.Contains(t, stderr, fmt.Sprintf(`"name": %q`, tc.name)) require.Contains(t, stderr, fmt.Sprintf(`"sdk": %q`, tc.sdk)) }) } t.Run("error on existing environment", func(t *testing.T) { t.Parallel() c, ctx := connect(t) _, err := CLITestContainer(ctx, t, c). WithLoadedEnv("core/integration/testdata/environments/go/basic", false). WithSDKArg("go"). WithNameArg("foo"). CallEnvInit(). Sync(ctx) require.ErrorContains(t, err, "environment init config path already exists") }) } func TestEnvChecks(t *testing.T) { t.Skip("pending conversion to modules") t.Parallel() allChecks := []string{ "cool-static-check", "sad-static-check", "cool-container-check", "sad-container-check", "cool-composite-check", "sad-composite-check", "another-cool-static-check", "another-sad-static-check", "cool-composite-check-from-explicit-dep", "sad-composite-check-from-explicit-dep", "cool-composite-check-from-dynamic-dep", "sad-composite-check-from-dynamic-dep", "cool-check-only-return", "cool-check-result-only-return", "cool-string-only-return", "cool-error-only-return", "sad-error-only-return", "cool-string-error-return", "sad-string-error-return", } compositeCheckToSubcheckNames := map[string][]string{ "cool-composite-check": { "cool-subcheck-a", "cool-subcheck-b", }, "sad-composite-check": { "sad-subcheck-a", "sad-subcheck-b", }, "cool-composite-check-from-explicit-dep": { "another-cool-static-check", "another-cool-container-check", "another-cool-composite-check", }, "sad-composite-check-from-explicit-dep": { "another-sad-static-check", "another-sad-container-check", "another-sad-composite-check", }, "cool-composite-check-from-dynamic-dep": { "yet-another-cool-static-check", "yet-another-cool-container-check", "yet-another-cool-composite-check", }, "sad-composite-check-from-dynamic-dep": { "yet-another-sad-static-check", "yet-another-sad-container-check", "yet-another-sad-composite-check", }, "another-cool-composite-check": { "another-cool-subcheck-a", "another-cool-subcheck-b", }, "another-sad-composite-check": { "another-sad-subcheck-a", "another-sad-subcheck-b", }, "yet-another-cool-composite-check": { "yet-another-cool-subcheck-a", "yet-another-cool-subcheck-b", }, "yet-another-sad-composite-check": { "yet-another-sad-subcheck-a", "yet-another-sad-subcheck-b", }, } // should be aligned w/ `func checkOutput` in ./testdata/environments/go/basic/main.go checkOutput := func(name string) string { return "WE ARE RUNNING CHECK " + strcase.ToKebab(name) } type testCase struct { name string environmentPath string selectedChecks []string expectFailure bool } for _, tc := range []testCase{ { name: "happy-path", environmentPath: "core/integration/testdata/environments/go/basic", selectedChecks: []string{ "cool-static-check", "cool-container-check", "cool-composite-check", "another-cool-static-check", "cool-composite-check-from-explicit-dep", "cool-composite-check-from-dynamic-dep", "cool-check-only-return", "cool-check-result-only-return", "cool-string-only-return", "cool-error-only-return", "cool-string-error-return", }, }, { name: "sad-path", expectFailure: true, environmentPath: "core/integration/testdata/environments/go/basic", selectedChecks: []string{ "sad-static-check", "sad-container-check", "sad-composite-check", "another-sad-static-check", "sad-composite-check-from-explicit-dep", "sad-composite-check-from-dynamic-dep", "sad-error-only-return", "sad-string-error-return", }, }, { name: "mixed-path", expectFailure: true, environmentPath: "core/integration/testdata/environments/go/basic", // run all checks, don't select any }, } { tc := tc for _, testGitEnv := range []bool{false, true} { testGitEnv := testGitEnv testName := tc.name testName += "/gitenv=" + strconv.FormatBool(testGitEnv) testName += "/" + tc.environmentPath t.Run(testName, func(t *testing.T) { t.Parallel() c, ctx := connect(t) stderr, err := CLITestContainer(ctx, t, c). WithLoadedEnv(tc.environmentPath, testGitEnv). CallChecks(tc.selectedChecks...). Stderr(ctx) if tc.expectFailure { require.Error(t, err) execErr := new(dagger.ExecError) require.True(t, errors.As(err, &execErr)) stderr = execErr.Stderr } else { require.NoError(t, err) } selectedChecks := tc.selectedChecks if len(selectedChecks) == 0 { selectedChecks = allChecks } curChecks := selectedChecks for len(curChecks) > 0 { var nextChecks []string for _, checkName := range curChecks { subChecks, ok := compositeCheckToSubcheckNames[checkName] if ok { nextChecks = append(nextChecks, subChecks...) } else { // special case for successful error only check, doesn't have output if checkName == "cool-error-only-return" { continue } require.Contains(t, stderr, checkOutput(checkName)) } } curChecks = nextChecks } }) } } } func daggerExec(args ...string) dagger.WithContainerFunc { return func(c *dagger.Container) *dagger.Container { return c.WithExec(append([]string{"dagger", "--debug"}, args...), dagger.ContainerWithExecOpts{ ExperimentalPrivilegedNesting: true, }) } } func daggerQuery(query string) dagger.WithContainerFunc { return func(c *dagger.Container) *dagger.Container { return c.WithExec([]string{"dagger", "--debug", "query"}, dagger.ContainerWithExecOpts{ Stdin: query, ExperimentalPrivilegedNesting: true, }) } } func daggerCall(args ...string) dagger.WithContainerFunc { return func(c *dagger.Container) *dagger.Container { return c.WithExec(append([]string{"dagger", "--debug", "call"}, args...), dagger.ContainerWithExecOpts{ ExperimentalPrivilegedNesting: true, }) } } func goGitBase(t *testing.T, c *dagger.Client) *dagger.Container { t.Helper() return c.Container().From(golangImage). WithExec([]string{"apk", "add", "git"}). WithExec([]string{"git", "config", "--global", "user.email", "dagger@example.com"}). WithExec([]string{"git", "config", "--global", "user.name", "Dagger Tests"}). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithExec([]string{"git", "init"}) } func logGen(ctx context.Context, t *testing.T, modSrc *dagger.Directory) { t.Helper() generated, err := modSrc.File("dagger.gen.go").Contents(ctx) require.NoError(t, err) t.Cleanup(func() { t.Name() fileName := filepath.Join( os.TempDir(), t.Name(), fmt.Sprintf("dagger.gen.%d.go", time.Now().Unix()), ) if err := os.MkdirAll(filepath.Dir(fileName), 0o755); err != nil { t.Logf("failed to create temp dir for generated code: %v", err) return } if err := os.WriteFile(fileName, []byte(generated), 0644); err != nil { t.Logf("failed to write generated code to %s: %v", fileName, err) } else { t.Logf("wrote generated code to %s", fileName) } }) }
closed
dagger/dagger
https://github.com/dagger/dagger
5,860
Zenith: fix Go struct field json serialization
https://github.com/dagger/dagger/pull/5757#issuecomment-1744739721 Right now if you have something like: ```go type Foo struct { Bar `json:"blahblah"` } ``` The graphql schema for `Foo` will be populated with a field called `Bar`, but when we do json serialization we use `blahblah`, which means that if you try to query for the value of the `Bar` field, our gql server hits the trivial resolver codepath and looks for `bar` in the json object and doesn't find it (since it's been serialized to `blahblah`). My first thought was that if a json struct tag is present, we should use that as the graphql field name rather than the go name. That would fix this problem I think, but it's more debatable whether it's surprising behavior (or honestly if anyone will really care about this). --- Possibly related issue from https://github.com/dagger/dagger/pull/5757#issuecomment-1752775608 ```golang package main import ( "context" ) type Foo struct{} type Test struct { X string Y int } func (t *Test) Void() {} func (m *Foo) MyFunction(ctx context.Context) Test { return Test{X: "hello", Y: 1337} } ``` ```bash $ echo '{foo{myFunction{x}}}' | dagger query -m "" ... ⧗ 1.17s ✔ 22 ∅ 20 ✘ 2 Error: make request: input:1: foo.myFunction.x Cannot return null for non-nullable field Test.x. ``` If I modify the struct with JSON field names, the above works: ```golang type Test struct { X string `json:"x"` Y int `json:"y"` } ``` --- cc @vito @jedevc
https://github.com/dagger/dagger/issues/5860
https://github.com/dagger/dagger/pull/6057
2c554b2ac26c4c6863893bac94d85108cecb48d9
e1d69edbfd0f94c93489edac4d9d6050c36fc3b7
"2023-10-10T22:50:32Z"
go
"2023-11-14T23:56:25Z"
core/schema/module.go
package schema import ( "bytes" "context" "encoding/base64" "encoding/json" "fmt" "path/filepath" "runtime/debug" "strconv" "strings" "github.com/dagger/dagger/core" "github.com/dagger/dagger/core/modules" "github.com/dagger/dagger/engine" "github.com/dagger/dagger/engine/buildkit" "github.com/dagger/graphql" "github.com/iancoleman/strcase" bkgw "github.com/moby/buildkit/frontend/gateway/client" "github.com/opencontainers/go-digest" ocispecs "github.com/opencontainers/image-spec/specs-go/v1" "github.com/vektah/gqlparser/v2/ast" "github.com/vektah/gqlparser/v2/formatter" "golang.org/x/sync/errgroup" ) type moduleSchema struct { *MergedSchemas moduleCache *core.CacheMap[digest.Digest, *core.Module] dependenciesCache *core.CacheMap[digest.Digest, []*core.Module] } var _ ExecutableSchema = &moduleSchema{} func (s *moduleSchema) Name() string { return "module" } func (s *moduleSchema) Schema() string { return strings.Join([]string{Module, Function, InternalSDK}, "\n") } func (s *moduleSchema) Dependencies() []ExecutableSchema { return nil } func (s *moduleSchema) Resolvers() Resolvers { rs := Resolvers{ "Query": ObjectResolver{ "module": ToResolver(s.module), "currentModule": ToResolver(s.currentModule), "function": ToResolver(s.function), "currentFunctionCall": ToResolver(s.currentFunctionCall), "typeDef": ToResolver(s.typeDef), "generatedCode": ToResolver(s.generatedCode), "moduleConfig": ToResolver(s.moduleConfig), }, "Directory": ObjectResolver{ "asModule": ToResolver(s.directoryAsModule), }, "FunctionCall": ObjectResolver{ "returnValue": ToVoidResolver(s.functionCallReturnValue), "parent": ToResolver(s.functionCallParent), }, } ResolveIDable[core.Module](rs, "Module", ObjectResolver{ "dependencies": ToResolver(s.moduleDependencies), "objects": ToResolver(s.moduleObjects), "withObject": ToResolver(s.moduleWithObject), "generatedCode": ToResolver(s.moduleGeneratedCode), "serve": ToVoidResolver(s.moduleServe), }) ResolveIDable[core.Function](rs, "Function", ObjectResolver{ "withDescription": ToResolver(s.functionWithDescription), "withArg": ToResolver(s.functionWithArg), }) ResolveIDable[core.FunctionArg](rs, "FunctionArg", ObjectResolver{}) ResolveIDable[core.TypeDef](rs, "TypeDef", ObjectResolver{ "kind": ToResolver(s.typeDefKind), "withOptional": ToResolver(s.typeDefWithOptional), "withKind": ToResolver(s.typeDefWithKind), "withListOf": ToResolver(s.typeDefWithListOf), "withObject": ToResolver(s.typeDefWithObject), "withField": ToResolver(s.typeDefWithObjectField), "withFunction": ToResolver(s.typeDefWithObjectFunction), }) ResolveIDable[core.GeneratedCode](rs, "GeneratedCode", ObjectResolver{ "withVCSIgnoredPaths": ToResolver(s.generatedCodeWithVCSIgnoredPaths), "withVCSGeneratedPaths": ToResolver(s.generatedCodeWithVCSGeneratedPaths), }) return rs } func (s *moduleSchema) typeDef(ctx context.Context, _ *core.Query, args struct { ID core.TypeDefID Kind core.TypeDefKind }) (*core.TypeDef, error) { if args.ID != "" { return args.ID.Decode() } return &core.TypeDef{ Kind: args.Kind, }, nil } func (s *moduleSchema) typeDefWithOptional(ctx context.Context, def *core.TypeDef, args struct { Optional bool }) (*core.TypeDef, error) { return def.WithOptional(args.Optional), nil } func (s *moduleSchema) typeDefWithKind(ctx context.Context, def *core.TypeDef, args struct { Kind core.TypeDefKind }) (*core.TypeDef, error) { return def.WithKind(args.Kind), nil } func (s *moduleSchema) typeDefWithListOf(ctx context.Context, def *core.TypeDef, args struct { ElementType core.TypeDefID }) (*core.TypeDef, error) { elemType, err := args.ElementType.Decode() if err != nil { return nil, fmt.Errorf("failed to decode element type: %w", err) } return def.WithListOf(elemType), nil } func (s *moduleSchema) typeDefWithObject(ctx context.Context, def *core.TypeDef, args struct { Name string Description string }) (*core.TypeDef, error) { return def.WithObject(args.Name, args.Description), nil } func (s *moduleSchema) typeDefWithObjectField(ctx context.Context, def *core.TypeDef, args struct { Name string TypeDef core.TypeDefID Description string }) (*core.TypeDef, error) { fieldType, err := args.TypeDef.Decode() if err != nil { return nil, fmt.Errorf("failed to decode element type: %w", err) } return def.WithObjectField(args.Name, fieldType, args.Description) } func (s *moduleSchema) typeDefWithObjectFunction(ctx context.Context, def *core.TypeDef, args struct { Function core.FunctionID }) (*core.TypeDef, error) { fn, err := args.Function.Decode() if err != nil { return nil, fmt.Errorf("failed to decode element type: %w", err) } return def.WithObjectFunction(fn) } func (s *moduleSchema) typeDefKind(ctx context.Context, def *core.TypeDef, args any) (string, error) { return def.Kind.String(), nil } func (s *moduleSchema) generatedCode(ctx context.Context, _ *core.Query, args struct { Code core.DirectoryID }) (*core.GeneratedCode, error) { dir, err := args.Code.Decode() if err != nil { return nil, err } return core.NewGeneratedCode(dir), nil } func (s *moduleSchema) generatedCodeWithVCSIgnoredPaths(ctx context.Context, code *core.GeneratedCode, args struct { Paths []string }) (*core.GeneratedCode, error) { return code.WithVCSIgnoredPaths(args.Paths), nil } func (s *moduleSchema) generatedCodeWithVCSGeneratedPaths(ctx context.Context, code *core.GeneratedCode, args struct { Paths []string }) (*core.GeneratedCode, error) { return code.WithVCSGeneratedPaths(args.Paths), nil } type moduleArgs struct { ID core.ModuleID } func (s *moduleSchema) module(ctx context.Context, query *core.Query, args moduleArgs) (*core.Module, error) { if args.ID == "" { return core.NewModule(s.platform, query.PipelinePath()), nil } return args.ID.Decode() } type moduleConfigArgs struct { SourceDirectory core.DirectoryID Subpath string } func (s *moduleSchema) moduleConfig(ctx context.Context, query *core.Query, args moduleConfigArgs) (*modules.Config, error) { srcDir, err := args.SourceDirectory.Decode() if err != nil { return nil, fmt.Errorf("failed to decode source directory: %w", err) } _, cfg, err := core.LoadModuleConfig(ctx, s.bk, s.services, srcDir, args.Subpath) return cfg, err } func (s *moduleSchema) currentModule(ctx context.Context, _ *core.Query, _ any) (*core.Module, error) { // The caller should have been given a digest of the ModuleContext its executing in, which is passed along // as request context metadata. return s.MergedSchemas.currentModule(ctx) } func (s *moduleSchema) function(ctx context.Context, _ *core.Query, args struct { Name string ReturnType core.TypeDefID }) (*core.Function, error) { returnType, err := args.ReturnType.Decode() if err != nil { return nil, fmt.Errorf("failed to decode return type: %w", err) } return core.NewFunction(args.Name, returnType), nil } func (s *moduleSchema) currentFunctionCall(ctx context.Context, _ *core.Query, _ any) (*core.FunctionCall, error) { return s.MergedSchemas.currentFunctionCall(ctx) } type asModuleArgs struct { SourceSubpath string } func (s *moduleSchema) directoryAsModule(ctx context.Context, sourceDir *core.Directory, args asModuleArgs) (_ *core.Module, rerr error) { defer func() { if err := recover(); err != nil { debug.PrintStack() rerr = fmt.Errorf("panic in directoryAsModule: %v %s", err, string(debug.Stack())) } }() mod := core.NewModule(s.platform, sourceDir.Pipeline) mod, err := mod.FromConfig(ctx, s.bk, s.services, s.progSockPath, sourceDir, args.SourceSubpath, s.runtimeForModule) if err != nil { return nil, fmt.Errorf("failed to create module from config: %w", err) } return mod, nil } func (s *moduleSchema) moduleGeneratedCode(ctx context.Context, mod *core.Module, _ any) (*core.GeneratedCode, error) { sdk, err := s.sdkForModule(ctx, mod) if err != nil { return nil, fmt.Errorf("failed to load sdk for module %s: %w", mod.Name, err) } return sdk.Codegen(ctx, mod) } func (s *moduleSchema) moduleServe(ctx context.Context, mod *core.Module, args any) (rerr error) { defer func() { if err := recover(); err != nil { rerr = fmt.Errorf("panic in moduleServe: %s\n%s", err, debug.Stack()) } }() mod, err := s.loadModuleTypes(ctx, mod) if err != nil { return fmt.Errorf("failed to load module types: %w", err) } schemaView, err := s.currentSchemaView(ctx) if err != nil { return err } err = s.serveModuleToView(ctx, mod, schemaView) if err != nil { return err } return nil } func (s *moduleSchema) moduleObjects(ctx context.Context, mod *core.Module, _ any) ([]*core.TypeDef, error) { mod, err := s.loadModuleTypes(ctx, mod) if err != nil { return nil, fmt.Errorf("failed to load module types: %w", err) } return mod.Objects, nil } func (s *moduleSchema) moduleWithObject(ctx context.Context, module *core.Module, args struct { Object core.TypeDefID }) (_ *core.Module, rerr error) { def, err := args.Object.Decode() if err != nil { return nil, err } return module.WithObject(def) } func (s *moduleSchema) functionCallReturnValue(ctx context.Context, fnCall *core.FunctionCall, args struct{ Value any }) error { // TODO: error out if caller is not coming from a module valueBytes, err := json.Marshal(args.Value) if err != nil { return fmt.Errorf("failed to marshal function return value: %w", err) } // The return is implemented by exporting the result back to the caller's filesystem. This ensures that // the result is cached as part of the module function's Exec while also keeping SDKs as agnostic as possible // to the format + location of that result. return s.bk.IOReaderExport(ctx, bytes.NewReader(valueBytes), filepath.Join(core.ModMetaDirPath, core.ModMetaOutputPath), 0600) } func (s *moduleSchema) functionCallParent(ctx context.Context, fnCall *core.FunctionCall, _ any) (any, error) { if fnCall.Parent == nil { return struct{}{}, nil } return fnCall.Parent, nil } func (s *moduleSchema) functionWithDescription(ctx context.Context, fn *core.Function, args struct { Description string }) (*core.Function, error) { return fn.WithDescription(args.Description), nil } func (s *moduleSchema) functionWithArg(ctx context.Context, fn *core.Function, args struct { Name string TypeDef core.TypeDefID Description string DefaultValue any }) (*core.Function, error) { argType, err := args.TypeDef.Decode() if err != nil { return nil, fmt.Errorf("failed to decode arg type: %w", err) } return fn.WithArg(args.Name, argType, args.Description, args.DefaultValue), nil } type functionCallArgs struct { Input []*core.CallInput ParentOriginalName string Parent any Module *core.Module Cache bool } func (s *moduleSchema) functionCall(ctx context.Context, fn *core.Function, args functionCallArgs) (any, error) { // TODO: if return type non-null, assert on that here // will already be set for internal calls, which close over a fn that doesn't // have ModuleID set yet mod := args.Module if mod == nil { return nil, fmt.Errorf("function %s has no module", fn.Name) } callParams := &core.FunctionCall{ Name: fn.OriginalName, ParentName: args.ParentOriginalName, Parent: args.Parent, InputArgs: args.Input, } schemaView, moduleContextDigest, err := s.registerModuleFunctionCall(mod, callParams) if err != nil { return nil, fmt.Errorf("failed to handle module function call: %w", err) } ctr := mod.Runtime metaDir := core.NewScratchDirectory(mod.Pipeline, mod.Platform) ctr, err = ctr.WithMountedDirectory(ctx, s.bk, core.ModMetaDirPath, metaDir, "", false) if err != nil { return nil, fmt.Errorf("failed to mount mod metadata directory: %w", err) } // Mount in read-only dep module filesystems to ensure that if they change, this module's cache is // also invalidated. Read-only forces buildkit to always use content-based cache keys. deps, err := s.dependenciesOf(ctx, mod) if err != nil { return nil, fmt.Errorf("failed to get module dependencies: %w", err) } for _, dep := range deps { dirMntPath := filepath.Join(core.ModMetaDirPath, core.ModMetaDepsDirPath, dep.Name, "dir") sourceDir, err := dep.SourceDirectory.Directory(ctx, s.bk, s.services, dep.SourceDirectorySubpath) if err != nil { return nil, fmt.Errorf("failed to mount dep directory: %w", err) } ctr, err = ctr.WithMountedDirectory(ctx, s.bk, dirMntPath, sourceDir, "", true) if err != nil { return nil, fmt.Errorf("failed to mount dep directory: %w", err) } } // Also mount in the function call parameters so they are part of the exec cache key callParamsBytes, err := json.Marshal(callParams) if err != nil { return nil, fmt.Errorf("failed to marshal input: %w", err) } inputFileDir, err := core.NewScratchDirectory(mod.Pipeline, mod.Platform).WithNewFile(ctx, core.ModMetaInputPath, callParamsBytes, 0600, nil) if err != nil { return nil, fmt.Errorf("failed to create input file: %w", err) } inputFile, err := inputFileDir.File(ctx, s.bk, s.services, core.ModMetaInputPath) if err != nil { return nil, fmt.Errorf("failed to get input file: %w", err) } ctr, err = ctr.WithMountedFile(ctx, s.bk, filepath.Join(core.ModMetaDirPath, core.ModMetaInputPath), inputFile, "", true) if err != nil { return nil, fmt.Errorf("failed to mount input file: %w", err) } if !args.Cache { // TODO: allow caching for calls coming from "inside the house" // [shykes] inject a cachebuster before runtime exec, // to fix crippling mandatory memoization of all functions. // [sipsma] use the ServerID so that we only bust once-per-session and thus avoid exponential runtime complexity clientMetadata, err := engine.ClientMetadataFromContext(ctx) if err != nil { return nil, fmt.Errorf("failed to get client metadata: %w", err) } busterKey := base64.StdEncoding.EncodeToString([]byte(clientMetadata.ServerID)) busterTon := core.NewScratchDirectory(mod.Pipeline, mod.Platform) ctr, err = ctr.WithMountedDirectory(ctx, s.bk, "/"+busterKey, busterTon, "", true) if err != nil { return nil, fmt.Errorf("failed to inject session cache key: %s", err) } } // Setup the Exec for the Function call and evaluate it ctr, err = ctr.WithExec(ctx, s.bk, s.progSockPath, mod.Platform, core.ContainerExecOpts{ ModuleContextDigest: moduleContextDigest, ExperimentalPrivilegedNesting: true, NestedInSameSession: true, }) if err != nil { return nil, fmt.Errorf("failed to exec function: %w", err) } ctrOutputDir, err := ctr.Directory(ctx, s.bk, s.services, core.ModMetaDirPath) if err != nil { return nil, fmt.Errorf("failed to get function output directory: %w", err) } result, err := ctrOutputDir.Evaluate(ctx, s.bk, s.services) if err != nil { return nil, fmt.Errorf("failed to evaluate function: %w", err) } if result == nil { return nil, fmt.Errorf("function returned nil result") } // TODO: if any error happens below, we should really prune the cache of the result, otherwise // we can end up in a state where we have a cached result with a dependency blob that we don't // guarantee the continued existence of... /* TODO: re-add support for interpreting exit code exitCodeStr, err := ctr.MetaFileContents(ctx, s.bk, s.progSockPath, "exitCode") if err != nil { return nil, fmt.Errorf("failed to read function exit code: %w", err) } exitCodeUint64, err := strconv.ParseUint(exitCodeStr, 10, 32) if err != nil { return nil, fmt.Errorf("failed to parse function exit code: %w", err) } exitCode := uint32(exitCodeUint64) */ // Read the output of the function outputBytes, err := result.Ref.ReadFile(ctx, bkgw.ReadRequest{ Filename: core.ModMetaOutputPath, }) if err != nil { return nil, fmt.Errorf("failed to read function output file: %w", err) } var rawOutput any if err := json.Unmarshal(outputBytes, &rawOutput); err != nil { return nil, fmt.Errorf("failed to unmarshal result: %s", err) } if err := s.linkDependencyBlobs(ctx, result, rawOutput, fn.ReturnType, schemaView); err != nil { return nil, fmt.Errorf("failed to link dependency blobs: %w", err) } return rawOutput, nil } // Utilities not in the schema // If the result of a Function call contains IDs of resources, we need to ensure that the cache entry for the // Function call is linked for the cache entries of those resources if those entries aren't reproducible. // Right now, the only unreproducible output are local dir imports, which are represented as blob:// sources. // linkDependencyBlobs finds all such blob:// sources and adds a cache lease on that blob in the content store // to the cacheResult of the function call. // // If we didn't do this, then it would be possible for Buildkit to prune the content pointed to by the blob:// // source without pruning the function call cache entry. That would result callers being able to evaluate the // result of a function call but hitting an error about missing content. func (s *moduleSchema) linkDependencyBlobs(ctx context.Context, cacheResult *buildkit.Result, value any, typeDef *core.TypeDef, schemaView *schemaView) error { switch typeDef.Kind { case core.TypeDefKindString, core.TypeDefKindInteger, core.TypeDefKindBoolean, core.TypeDefKindVoid: return nil case core.TypeDefKindList: listValue, ok := value.([]any) if !ok { return fmt.Errorf("expected list value, got %T", value) } for _, elem := range listValue { if err := s.linkDependencyBlobs(ctx, cacheResult, elem, typeDef.AsList.ElementTypeDef, schemaView); err != nil { return fmt.Errorf("failed to link dependency blobs: %w", err) } } return nil case core.TypeDefKindObject: _, isIDable := s.idableObjectResolver(typeDef.AsObject.Name, schemaView) if !isIDable { // This object is not IDable but we still need to check its Fields for any objects that may contain // IDable objects mapValue, ok := value.(map[string]any) if !ok { return fmt.Errorf("expected object value for %s, got %T", typeDef.AsObject.Name, value) } for fieldName, fieldValue := range mapValue { field, ok := typeDef.AsObject.FieldByName(fieldName) if !ok { continue } if err := s.linkDependencyBlobs(ctx, cacheResult, fieldValue, field.TypeDef, schemaView); err != nil { return fmt.Errorf("failed to link dependency blobs: %w", err) } } return nil } // This is an IDable core type, check to see if it has any blobs:// we need to link with. idStr, ok := value.(string) if !ok { return fmt.Errorf("expected string value for id result, got %T", value) } resource, err := core.ResourceFromID(idStr) if err != nil { return fmt.Errorf("failed to get resource from ID: %w", err) } pbDefinitioner, ok := resource.(core.HasPBDefinitions) if !ok { // no dependency blobs to handle return nil } pbDefs, err := pbDefinitioner.PBDefinitions() if err != nil { return fmt.Errorf("failed to get pb definitions: %w", err) } dependencyBlobs := map[digest.Digest]*ocispecs.Descriptor{} for _, pbDef := range pbDefs { dag, err := buildkit.DefToDAG(pbDef) if err != nil { return fmt.Errorf("failed to convert pb definition to dag: %w", err) } blobs, err := dag.BlobDependencies() if err != nil { return fmt.Errorf("failed to get blob dependencies: %w", err) } for k, v := range blobs { dependencyBlobs[k] = v } } if err := cacheResult.Ref.AddDependencyBlobs(ctx, dependencyBlobs); err != nil { return fmt.Errorf("failed to add dependency blob: %w", err) } return nil default: return fmt.Errorf("unhandled type def kind %q", typeDef.Kind) } } // Check to see if the given object name is one of our core API's IDable types, returning the // IDableObjectResolver if so. func (s *moduleSchema) idableObjectResolver(objName string, dest *schemaView) (IDableObjectResolver, bool) { objName = gqlObjectName(objName) resolver, ok := dest.resolvers()[objName] if !ok { return nil, false } idableResolver, ok := resolver.(IDableObjectResolver) return idableResolver, ok } // Each Module gets its own isolated "schema view" where the core API plus its direct deps are served. // serveModuleToDigest stitches in the schema for the given mod to the given schema view. func (s *moduleSchema) serveModuleToView(ctx context.Context, mod *core.Module, schemaView *schemaView) error { mod, err := s.loadModuleTypes(ctx, mod) if err != nil { return fmt.Errorf("failed to load dep module functions: %w", err) } cacheKey := digest.FromString(mod.Name + "." + schemaView.viewDigest.String()) // TODO: it makes no sense to use this cache since we don't need a core.Module, but also doesn't hurt, but make a separate one anyways for clarity _, err = s.moduleCache.GetOrInitialize(cacheKey, func() (*core.Module, error) { executableSchema, err := s.moduleToSchemaFor(ctx, mod, schemaView) if err != nil { return nil, fmt.Errorf("failed to convert module to executable schema: %w", err) } if err := schemaView.addSchemas(executableSchema); err != nil { return nil, fmt.Errorf("failed to install module schema: %w", err) } return mod, nil }) return err } // loadModuleTypes invokes the Module to ask for the Objects+Functions it defines and returns the updated // Module object w/ those TypeDefs included. func (s *moduleSchema) loadModuleTypes(ctx context.Context, mod *core.Module) (*core.Module, error) { // We use the base digest as cache key because loadModuleTypes should behave idempotently, // returning the same Module object whether or not its Objects+Runtime were already loaded. dgst, err := mod.BaseDigest() if err != nil { return nil, fmt.Errorf("failed to get module digest: %w", err) } return s.moduleCache.GetOrInitialize(dgst, func() (*core.Module, error) { schemaView, err := s.installDeps(ctx, mod) if err != nil { return nil, fmt.Errorf("failed to install module dependencies: %w", err) } // canned function for asking the SDK to return the module + functions it provides getModDefFn := core.NewFunction( "", // no name indicates that the SDK should return the module &core.TypeDef{ Kind: core.TypeDefKindObject, AsObject: core.NewObjectTypeDef("Module", ""), }, ) result, err := s.functionCall(ctx, getModDefFn, functionCallArgs{ Module: mod, Cache: true, // ParentName is empty to signify we're querying to get the constructed module }) if err != nil { return nil, fmt.Errorf("failed to call module %q to get functions: %w", mod.Name, err) } idStr, ok := result.(string) if !ok { return nil, fmt.Errorf("expected string result, got %T", result) } mod, err = core.ModuleID(idStr).Decode() if err != nil { return nil, fmt.Errorf("failed to decode module: %w", err) } for _, obj := range mod.Objects { if err := s.validateTypeDef(obj, schemaView); err != nil { return nil, fmt.Errorf("failed to validate type def: %w", err) } // namespace the module objects + function extensions s.namespaceTypeDef(obj, mod, schemaView) } return mod, nil }) } func (s *moduleSchema) moduleDependencies(ctx context.Context, mod *core.Module, _ any) ([]*core.Module, error) { return s.dependenciesOf(ctx, mod) } func (s *moduleSchema) dependenciesOf(ctx context.Context, mod *core.Module) ([]*core.Module, error) { dgst, err := mod.BaseDigest() if err != nil { return nil, fmt.Errorf("failed to get module digest: %w", err) } return s.dependenciesCache.GetOrInitialize(dgst, func() ([]*core.Module, error) { var eg errgroup.Group deps := make([]*core.Module, len(mod.DependencyConfig)) for i, depURL := range mod.DependencyConfig { i, depURL := i, depURL eg.Go(func() error { depMod, err := core.NewModule(mod.Platform, mod.Pipeline).FromRef( ctx, s.bk, s.services, s.progSockPath, mod.SourceDirectory, mod.SourceDirectorySubpath, depURL, s.runtimeForModule, ) if err != nil { return fmt.Errorf("failed to get dependency mod from ref %q: %w", depURL, err) } deps[i] = depMod return nil }) } if err := eg.Wait(); err != nil { return nil, err } return deps, nil }) } // installDeps stitches in the schemas for all the deps of the given module to the module's // schema view. func (s *moduleSchema) installDeps(ctx context.Context, module *core.Module) (*schemaView, error) { schemaView, err := s.getModuleSchemaView(module) if err != nil { return nil, err } deps, err := s.dependenciesOf(ctx, module) if err != nil { return nil, fmt.Errorf("failed to get module dependencies: %w", err) } return schemaView, s.installDepsToSchemaView(ctx, deps, schemaView) } func (s *moduleSchema) installDepsToSchemaView( ctx context.Context, deps []*core.Module, schemaView *schemaView, ) error { var eg errgroup.Group for _, dep := range deps { dep := dep eg.Go(func() error { if err := s.serveModuleToView(ctx, dep, schemaView); err != nil { return fmt.Errorf("failed to install dependency %q: %w", dep.Name, err) } return nil }) } return eg.Wait() } /* TODO: for module->schema conversion * Need to handle IDable type as input argument (schema should accept ID as input type) * Need to handle corner case where a single object is used as both input+output (append "Input" to name?) * Handle case where scalar from core is returned? Might need API updates unless we hack it and say they are all strings for now... * If an object from another non-core Module makes its way into this Module's schema, need to include the relevant schema+resolvers for that too. */ // moduleToSchema converts a Module to an ExecutableSchema that can be stitched in to an existing schema. // It presumes that the Module's Functions have already been loaded. func (s *moduleSchema) moduleToSchemaFor(ctx context.Context, module *core.Module, dest *schemaView) (ExecutableSchema, error) { schemaDoc := &ast.SchemaDocument{} newResolvers := Resolvers{} for _, def := range module.Objects { objTypeDef := def.AsObject objName := gqlObjectName(objTypeDef.Name) // get the schema + resolvers for the object as a whole objType, err := s.typeDefToSchema(def, false) if err != nil { return nil, fmt.Errorf("failed to convert module to schema: %w", err) } // check whether this is a pre-existing object (from core or another module) _, preExistingObject := dest.resolvers()[objName] if preExistingObject { // modules can reference types from core/other modules as types, but they // can't attach any new fields or functions to them if len(objTypeDef.Fields) > 0 || len(objTypeDef.Functions) > 0 { return nil, fmt.Errorf("cannot attach new fields or functions to object %q from outside module", objName) } continue } astDef := &ast.Definition{ Name: objName, Description: formatGqlDescription(objTypeDef.Description), Kind: ast.Object, } newObjResolver := ObjectResolver{} for _, field := range objTypeDef.Fields { fieldASTType, err := s.typeDefToSchema(field.TypeDef, false) if err != nil { return nil, err } fieldName := gqlFieldName(field.Name) astDef.Fields = append(astDef.Fields, &ast.FieldDefinition{ Name: fieldName, Description: formatGqlDescription(field.Description), Type: fieldASTType, }) // if this is an IDable type, add a resolver that converts the ID into // the real object, otherwise its schema will be called against the // string if field.TypeDef.Kind == core.TypeDefKindObject { newObjResolver[fieldName] = func(p graphql.ResolveParams) (any, error) { res, err := graphql.DefaultResolveFn(p) if err != nil { return nil, err } id, ok := res.(string) if !ok { return nil, fmt.Errorf("expected string %sID, got %T", field.TypeDef.AsObject.Name, res) } return core.ResourceFromID(id) } } else { // no resolver to add; fields rely on the graphql "trivial resolver" // where the value is just read from the parent object _ = 1 } } for _, fn := range objTypeDef.Functions { resolver, err := s.functionResolver(astDef, module, fn, dest) if err != nil { return nil, err } newObjResolver[gqlFieldName(fn.Name)] = resolver } if len(newObjResolver) > 0 { newResolvers[objName] = newObjResolver } if len(astDef.Fields) > 0 { schemaDoc.Definitions = append(schemaDoc.Definitions, astDef) } constructorName := gqlFieldName(def.AsObject.Name) if constructorName == gqlFieldName(module.Name) { // stitch in the module object right under Query schemaDoc.Extensions = append(schemaDoc.Extensions, &ast.Definition{ Name: "Query", Kind: ast.Object, Fields: ast.FieldList{&ast.FieldDefinition{ Name: constructorName, // TODO is it correct to set it here too vs. type definition? // Description: def.AsObject.Description, Type: objType, }}, }) newResolvers["Query"] = ObjectResolver{ constructorName: PassthroughResolver, } } } buf := &bytes.Buffer{} formatter.NewFormatter(buf).FormatSchemaDocument(schemaDoc) schemaStr := buf.String() return StaticSchema(StaticSchemaParams{ Name: module.Name, Schema: schemaStr, Resolvers: newResolvers, }), nil } /* This formats comments in the schema as: """ comment """ Which avoids corner cases where the comment ends in a `"`. */ func formatGqlDescription(desc string) string { return "\n" + strings.TrimSpace(desc) + "\n" } func (s *moduleSchema) typeDefToSchema(typeDef *core.TypeDef, isInput bool) (*ast.Type, error) { switch typeDef.Kind { case core.TypeDefKindString: return &ast.Type{ NamedType: "String", NonNull: !typeDef.Optional, }, nil case core.TypeDefKindInteger: return &ast.Type{ NamedType: "Int", NonNull: !typeDef.Optional, }, nil case core.TypeDefKindBoolean: return &ast.Type{ NamedType: "Boolean", NonNull: !typeDef.Optional, }, nil case core.TypeDefKindVoid: return &ast.Type{ NamedType: "Void", NonNull: !typeDef.Optional, }, nil case core.TypeDefKindList: if typeDef.AsList == nil { return nil, fmt.Errorf("expected list type def, got nil") } astType, err := s.typeDefToSchema(typeDef.AsList.ElementTypeDef, isInput) if err != nil { return nil, err } return &ast.Type{ Elem: astType, NonNull: !typeDef.Optional, }, nil case core.TypeDefKindObject: if typeDef.AsObject == nil { return nil, fmt.Errorf("expected object type def, got nil") } objTypeDef := typeDef.AsObject objName := gqlObjectName(objTypeDef.Name) if isInput { // idable types use their ID scalar as the input value return &ast.Type{NamedType: objName + "ID", NonNull: !typeDef.Optional}, nil } return &ast.Type{NamedType: objName, NonNull: !typeDef.Optional}, nil default: return nil, fmt.Errorf("unsupported type kind %q", typeDef.Kind) } } func (s *moduleSchema) functionResolver( parentObj *ast.Definition, module *core.Module, fn *core.Function, dest *schemaView, ) (graphql.FieldResolveFn, error) { fnName := gqlFieldName(fn.Name) objFnName := fmt.Sprintf("%s.%s", parentObj.Name, fnName) returnASTType, err := s.typeDefToSchema(fn.ReturnType, false) if err != nil { return nil, err } var argASTTypes ast.ArgumentDefinitionList for _, fnArg := range fn.Args { argASTType, err := s.typeDefToSchema(fnArg.TypeDef, true) if err != nil { return nil, err } defaultValue, err := astDefaultValue(fnArg.TypeDef, fnArg.DefaultValue) if err != nil { return nil, err } argASTTypes = append(argASTTypes, &ast.ArgumentDefinition{ Name: gqlArgName(fnArg.Name), Description: formatGqlDescription(fnArg.Description), Type: argASTType, DefaultValue: defaultValue, }) } fieldDef := &ast.FieldDefinition{ Name: fnName, Description: formatGqlDescription(fn.Description), Type: returnASTType, Arguments: argASTTypes, } parentObj.Fields = append(parentObj.Fields, fieldDef) // Our core "id-able" types are serialized as their ID over the wire, but need to be decoded into // their object here. We can identify those types since their object resolvers are wrapped in // ToIDableObjectResolver. var returnIDableObjectResolver IDableObjectResolver if fn.ReturnType.Kind == core.TypeDefKindObject { returnIDableObjectResolver, _ = s.idableObjectResolver(fn.ReturnType.AsObject.Name, dest) } parentIDableObjectResolver, _ := s.idableObjectResolver(parentObj.Name, dest) return ToResolver(func(ctx context.Context, parent any, args map[string]any) (_ any, rerr error) { defer func() { if r := recover(); r != nil { rerr = fmt.Errorf("panic in %s: %s %s", objFnName, r, string(debug.Stack())) } }() if parentIDableObjectResolver != nil { id, err := parentIDableObjectResolver.ToID(parent) if err != nil { return nil, fmt.Errorf("failed to get parent ID: %w", err) } parent = id } argNames := make(map[string]string, len(fn.Args)) for _, arg := range fn.Args { argNames[arg.Name] = arg.OriginalName } var callInput []*core.CallInput for k, v := range args { n, ok := argNames[k] if !ok { continue } callInput = append(callInput, &core.CallInput{ Name: n, Value: v, }) } result, err := s.functionCall(ctx, fn, functionCallArgs{ Module: module, Input: callInput, ParentOriginalName: fn.ParentOriginalName, Parent: parent, }) if err != nil { return nil, fmt.Errorf("failed to call function %q: %w", objFnName, err) } if returnIDableObjectResolver == nil { return result, nil } id, ok := result.(string) if !ok { return nil, fmt.Errorf("expected string ID result for %s, got %T", objFnName, result) } return returnIDableObjectResolver.FromID(id) }), nil } // relevant ast code we need to work with here: // https://github.com/vektah/gqlparser/blob/35199fce1fa1b73c27f23c84f4430f47ac93329e/ast/value.go#L44 func astDefaultValue(typeDef *core.TypeDef, val any) (*ast.Value, error) { if val == nil { // no default value for this arg return nil, nil } switch typeDef.Kind { case core.TypeDefKindString: strVal, ok := val.(string) if !ok { return nil, fmt.Errorf("expected string default value, got %T", val) } return &ast.Value{ Kind: ast.StringValue, Raw: strVal, }, nil case core.TypeDefKindInteger: var intVal int switch val := val.(type) { case int: intVal = val case float64: // JSON unmarshaling to `any' intVal = int(val) default: return nil, fmt.Errorf("expected integer default value, got %T", val) } return &ast.Value{ Kind: ast.IntValue, Raw: strconv.Itoa(intVal), }, nil case core.TypeDefKindBoolean: boolVal, ok := val.(bool) if !ok { return nil, fmt.Errorf("expected bool default value, got %T", val) } return &ast.Value{ Kind: ast.BooleanValue, Raw: strconv.FormatBool(boolVal), }, nil case core.TypeDefKindVoid: if val != nil { return nil, fmt.Errorf("expected nil value, got %T", val) } return &ast.Value{ Kind: ast.NullValue, Raw: "null", }, nil case core.TypeDefKindList: astVal := &ast.Value{Kind: ast.ListValue} // val is coming from deserializing a json string (see jsonResolver), so it should be []any listVal, ok := val.([]any) if !ok { return nil, fmt.Errorf("expected list default value, got %T", val) } for _, elemVal := range listVal { elemASTVal, err := astDefaultValue(typeDef.AsList.ElementTypeDef, elemVal) if err != nil { return nil, fmt.Errorf("failed to get default value for list element: %w", err) } astVal.Children = append(astVal.Children, &ast.ChildValue{ Value: elemASTVal, }) } return astVal, nil case core.TypeDefKindObject: astVal := &ast.Value{Kind: ast.ObjectValue} // val is coming from deserializing a json string (see jsonResolver), so it should be map[string]any mapVal, ok := val.(map[string]any) if !ok { return nil, fmt.Errorf("expected object default value, got %T", val) } for name, val := range mapVal { name = gqlFieldName(name) field, ok := typeDef.AsObject.FieldByName(name) if !ok { return nil, fmt.Errorf("object field %s.%s not found", typeDef.AsObject.Name, name) } fieldASTVal, err := astDefaultValue(field.TypeDef, val) if err != nil { return nil, fmt.Errorf("failed to get default value for object field %q: %w", name, err) } astVal.Children = append(astVal.Children, &ast.ChildValue{ Name: name, Value: fieldASTVal, }) } return astVal, nil default: return nil, fmt.Errorf("unsupported type kind %q", typeDef.Kind) } } func (s *moduleSchema) validateTypeDef(typeDef *core.TypeDef, schemaView *schemaView) error { switch typeDef.Kind { case core.TypeDefKindList: return s.validateTypeDef(typeDef.AsList.ElementTypeDef, schemaView) case core.TypeDefKindObject: obj := typeDef.AsObject baseObjName := gqlObjectName(obj.Name) // check whether this is a pre-existing object from core or another module _, preExistingObject := schemaView.resolvers()[baseObjName] if preExistingObject { // already validated, skip return nil } for _, field := range obj.Fields { if gqlFieldName(field.Name) == "id" { return fmt.Errorf("cannot define field with reserved name %q on object %q", field.Name, obj.Name) } if err := s.validateTypeDef(field.TypeDef, schemaView); err != nil { return err } } for _, fn := range obj.Functions { if gqlFieldName(fn.Name) == "id" { return fmt.Errorf("cannot define function with reserved name %q on object %q", fn.Name, obj.Name) } if err := s.validateTypeDef(fn.ReturnType, schemaView); err != nil { return err } for _, arg := range fn.Args { if gqlArgName(arg.Name) == "id" { return fmt.Errorf("cannot define argument with reserved name %q on function %q", arg.Name, fn.Name) } if err := s.validateTypeDef(arg.TypeDef, schemaView); err != nil { return err } } } } return nil } // TODO: Should we handle trying to namespace the object in the doc strings? Or would that require too much magic to accomplish consistently? func (s *moduleSchema) namespaceTypeDef(typeDef *core.TypeDef, mod *core.Module, schemaView *schemaView) { switch typeDef.Kind { case core.TypeDefKindList: s.namespaceTypeDef(typeDef.AsList.ElementTypeDef, mod, schemaView) case core.TypeDefKindObject: obj := typeDef.AsObject baseObjName := gqlObjectName(obj.Name) // check whether this is a pre-existing object from core or another module _, preExistingObject := schemaView.resolvers()[baseObjName] // only namespace objects defined in this module if !preExistingObject { obj.Name = namespaceObject(obj.Name, mod.Name) } for _, field := range obj.Fields { s.namespaceTypeDef(field.TypeDef, mod, schemaView) } for _, fn := range obj.Functions { s.namespaceTypeDef(fn.ReturnType, mod, schemaView) for _, arg := range fn.Args { s.namespaceTypeDef(arg.TypeDef, mod, schemaView) } } } } // TODO: all these should be called during creation of Function+TypeDefs, not scattered all over the place func gqlObjectName(name string) string { // gql object name is capitalized camel case return strcase.ToCamel(name) } func namespaceObject(objName, namespace string) string { // don't namespace the main module object itself (already is named after the module) if gqlObjectName(objName) == gqlObjectName(namespace) { return objName } return gqlObjectName(namespace + "_" + objName) } func gqlFieldName(name string) string { // gql field name is uncapitalized camel case return strcase.ToLowerCamel(name) } func gqlArgName(name string) string { // gql arg name is uncapitalized camel case return strcase.ToLowerCamel(name) }
closed
dagger/dagger
https://github.com/dagger/dagger
5,791
🐞 secrets scrubbing implementation causes excessive log output latency
### What is the issue? # Context We have a dagger pipeline which, at some point, [mounts secrets](https://github.com/airbytehq/airbyte/blob/327d3c9ae8e14b28bf2bdf7528b22f86f510d629/airbyte-ci/connectors/pipelines/pipelines/actions/environments.py#L1053) to a container which is then runs [integration tests](https://github.com/airbytehq/airbyte/blob/327d3c9ae8e14b28bf2bdf7528b22f86f510d629/airbyte-ci/connectors/pipelines/pipelines/gradle.py#L157) by with_exec'ing a task in gradle. We are just as bad computer programmers as anyone and sometimes we introduce regressions which cause our integration tests to hang. In our particular case, the bug we introduced was that we tried to connect a jdbc driver to a nonexistent host and we'd hit some absurdly large timeout in our code. What's unexpected, and why I'm filing an issue right now, is that dagger would be completely silent about the output of this `with_exec` step until it eventually failed. # The problem I eventually found that dagger's secrets scrubbing implementation is to blame. In our case, we mount about 20 secrets files, which while a lot, doesn't seem that crazy. I read dagger's code [1] and it appears that if there's a nonzero number of secrets mounted (env vars or files) the output gets piped through `replace.Chain` which chains a bunch of `Transformer` instances from go's transform module [2]. There's one instance per secret and each appears to wrap a reader with a hardcoded buffer of 4kB [3]. In our case, our gradle process was simply not chatty enough to overcome this buffering and so it seemed like it didn't do anything. We're on an old version of dagger but the problem seems still present in the `main` branch from what I can tell. # My expectations as a user The need to scrub secrets is not in question. However, `transform` appears to be written in a way that biases throughput over latency, when in our case exactly the opposite is desirable: when scrubbing secrets my expectation is that the output becomes visible to me _as soon as possible_. I don't want to wait for some arbitrary unconfigurable buffer to fill up and I certainly don't want that behaviour to be `O(n)` to the number of secrets mounted. I say as soon as possible but that's not strictly speaking true, it's not like each rune has to pass through as soon as it's determined that it's not part of a prefix of one of the secrets. This being textual output, I'd be fine if it was each _line_ that gets passed through ASAP. I'm guessing this would also be undoubtedly less complicated to implement on your end and I'm also guessing that most secrets are not multiline (or if they are, it's only a handful of lines). tl;dr: no need to go crazy here, but I'll be happy with reasonable and predictable behaviour. # Repro I didn't look into how dagger is tested but the desired behaviour of the return value of `NewSecretScrubReader` seems adequately unit-testable from my naive standpoint: 1. mock mounting 1, 10 and 100 secrets in each test case; 2. kick off a goroutine with an `io.Reader` which mocks a `with_exec`'ed process' `stdout`; 3. have that `io.Reader` serve a fixed number of bytes and then block on a channel, then serve a bunch more bytes, then block again; 4. concurrently, expect the `io.Reader` returned by `NewSecretScrubReader` to read an expected subset of those bytes, then unblock the channel, then read another expected subset of bytes, then unblock again. # Notes Dear dagger maintainers: I hope you're not finding me overprescriptive here or feel that I'm babying you. Far from it! I'm being deliberately wordy because I'm reasonably hopeful that this issue is quite cheap to fix so I'm provide as much info as I can to that aim. On our end, it sure caused a lot of head-scratching. This is only an issue in an interactive setting: developing locally, or looking at dagger.cloud, which is probably why it went unnoticed (I didn't find any similar issue, though I only did a quick search). # References [1] https://github.com/dagger/dagger/blob/v0.6.4/cmd/shim/main.go#L294 [2] https://golang.org/x/text/transform [3] https://cs.opensource.google/go/x/text/+/refs/tags/v0.13.0:transform/transform.go;l=130 ### Log output _No response_ ### Steps to reproduce _No response_ ### SDK version 0.6.4 ### OS version irrelevant, I believe, but macOS and some unremarkable linux distro
https://github.com/dagger/dagger/issues/5791
https://github.com/dagger/dagger/pull/6034
b28daae7531cdb2ed7c2ced9da2c69fd3b080ee7
80180aaaed1e1e91a13dbf7df7e0411a9a54c7d3
"2023-09-18T13:41:28Z"
go
"2023-11-20T14:49:50Z"
cmd/shim/secret_scrub.go
package main import ( "fmt" "io" "io/fs" "path/filepath" "strings" "github.com/dagger/dagger/core" "github.com/icholy/replace" "golang.org/x/text/transform" ) var ( // scrubString will be used as replacement for found secrets: scrubString = []byte("***") ) func NewSecretScrubReader(r io.Reader, currentDirPath string, fsys fs.FS, env []string, secretsToScrub core.SecretToScrubInfo) (io.Reader, error) { secrets := loadSecretsToScrubFromEnv(env, secretsToScrub.Envs) fileSecrets, err := loadSecretsToScrubFromFiles(currentDirPath, fsys, secretsToScrub.Files) if err != nil { return nil, fmt.Errorf("could not load secrets from file: %w", err) } secrets = append(secrets, fileSecrets...) secretAsBytes := make([][]byte, 0) for _, v := range secrets { // Skip empty env: if len(v) == 0 { continue } secretAsBytes = append(secretAsBytes, []byte(v)) } replaceChain := make([]transform.Transformer, 0) for _, s := range secretAsBytes { replaceChain = append( replaceChain, replace.Bytes(s, scrubString), ) } return replace.Chain(r, replaceChain...), nil } // loadSecretsToScrubFromEnv loads secrets value from env if they are in secretsToScrub. func loadSecretsToScrubFromEnv(env []string, secretsToScrub []string) []string { secrets := []string{} for _, envKV := range env { envName, envValue, ok := strings.Cut(envKV, "=") // no env value for this secret if !ok { continue } for _, envToScrub := range secretsToScrub { if envName == envToScrub { secrets = append(secrets, envValue) } } } return secrets } // loadSecretsToScrubFromFiles loads secrets from file path in secretFilePathsToScrub from the fsys, accessed from the absolute currentDirPathAbs. // It will attempt to make any file path as absolute file path by joining it with the currentDirPathAbs if need be. func loadSecretsToScrubFromFiles(currentDirPathAbs string, fsys fs.FS, secretFilePathsToScrub []string) ([]string, error) { secrets := make([]string, 0, len(secretFilePathsToScrub)) for _, fileToScrub := range secretFilePathsToScrub { absFileToScrub := fileToScrub if !filepath.IsAbs(fileToScrub) { absFileToScrub = filepath.Join("/", fileToScrub) } if strings.HasPrefix(fileToScrub, currentDirPathAbs) || strings.HasPrefix(fileToScrub, currentDirPathAbs[1:]) { absFileToScrub = strings.TrimPrefix(fileToScrub, currentDirPathAbs) absFileToScrub = filepath.Join("/", absFileToScrub) } // we remove the first `/` from the absolute path to fileToScrub to work with fs.ReadFile secret, err := fs.ReadFile(fsys, absFileToScrub[1:]) if err != nil { return nil, fmt.Errorf("secret value not available for: %w", err) } secrets = append(secrets, string(secret)) } return secrets, nil }
closed
dagger/dagger
https://github.com/dagger/dagger
5,791
🐞 secrets scrubbing implementation causes excessive log output latency
### What is the issue? # Context We have a dagger pipeline which, at some point, [mounts secrets](https://github.com/airbytehq/airbyte/blob/327d3c9ae8e14b28bf2bdf7528b22f86f510d629/airbyte-ci/connectors/pipelines/pipelines/actions/environments.py#L1053) to a container which is then runs [integration tests](https://github.com/airbytehq/airbyte/blob/327d3c9ae8e14b28bf2bdf7528b22f86f510d629/airbyte-ci/connectors/pipelines/pipelines/gradle.py#L157) by with_exec'ing a task in gradle. We are just as bad computer programmers as anyone and sometimes we introduce regressions which cause our integration tests to hang. In our particular case, the bug we introduced was that we tried to connect a jdbc driver to a nonexistent host and we'd hit some absurdly large timeout in our code. What's unexpected, and why I'm filing an issue right now, is that dagger would be completely silent about the output of this `with_exec` step until it eventually failed. # The problem I eventually found that dagger's secrets scrubbing implementation is to blame. In our case, we mount about 20 secrets files, which while a lot, doesn't seem that crazy. I read dagger's code [1] and it appears that if there's a nonzero number of secrets mounted (env vars or files) the output gets piped through `replace.Chain` which chains a bunch of `Transformer` instances from go's transform module [2]. There's one instance per secret and each appears to wrap a reader with a hardcoded buffer of 4kB [3]. In our case, our gradle process was simply not chatty enough to overcome this buffering and so it seemed like it didn't do anything. We're on an old version of dagger but the problem seems still present in the `main` branch from what I can tell. # My expectations as a user The need to scrub secrets is not in question. However, `transform` appears to be written in a way that biases throughput over latency, when in our case exactly the opposite is desirable: when scrubbing secrets my expectation is that the output becomes visible to me _as soon as possible_. I don't want to wait for some arbitrary unconfigurable buffer to fill up and I certainly don't want that behaviour to be `O(n)` to the number of secrets mounted. I say as soon as possible but that's not strictly speaking true, it's not like each rune has to pass through as soon as it's determined that it's not part of a prefix of one of the secrets. This being textual output, I'd be fine if it was each _line_ that gets passed through ASAP. I'm guessing this would also be undoubtedly less complicated to implement on your end and I'm also guessing that most secrets are not multiline (or if they are, it's only a handful of lines). tl;dr: no need to go crazy here, but I'll be happy with reasonable and predictable behaviour. # Repro I didn't look into how dagger is tested but the desired behaviour of the return value of `NewSecretScrubReader` seems adequately unit-testable from my naive standpoint: 1. mock mounting 1, 10 and 100 secrets in each test case; 2. kick off a goroutine with an `io.Reader` which mocks a `with_exec`'ed process' `stdout`; 3. have that `io.Reader` serve a fixed number of bytes and then block on a channel, then serve a bunch more bytes, then block again; 4. concurrently, expect the `io.Reader` returned by `NewSecretScrubReader` to read an expected subset of those bytes, then unblock the channel, then read another expected subset of bytes, then unblock again. # Notes Dear dagger maintainers: I hope you're not finding me overprescriptive here or feel that I'm babying you. Far from it! I'm being deliberately wordy because I'm reasonably hopeful that this issue is quite cheap to fix so I'm provide as much info as I can to that aim. On our end, it sure caused a lot of head-scratching. This is only an issue in an interactive setting: developing locally, or looking at dagger.cloud, which is probably why it went unnoticed (I didn't find any similar issue, though I only did a quick search). # References [1] https://github.com/dagger/dagger/blob/v0.6.4/cmd/shim/main.go#L294 [2] https://golang.org/x/text/transform [3] https://cs.opensource.google/go/x/text/+/refs/tags/v0.13.0:transform/transform.go;l=130 ### Log output _No response_ ### Steps to reproduce _No response_ ### SDK version 0.6.4 ### OS version irrelevant, I believe, but macOS and some unremarkable linux distro
https://github.com/dagger/dagger/issues/5791
https://github.com/dagger/dagger/pull/6034
b28daae7531cdb2ed7c2ced9da2c69fd3b080ee7
80180aaaed1e1e91a13dbf7df7e0411a9a54c7d3
"2023-09-18T13:41:28Z"
go
"2023-11-20T14:49:50Z"
cmd/shim/secret_scrub_test.go
package main import ( "bufio" "bytes" _ "embed" "fmt" "io" "testing" "testing/fstest" "github.com/dagger/dagger/core" "github.com/stretchr/testify/require" ) var ( //nolint:typecheck //go:embed testdata/id_ed25519 sshSecretKey string //nolint:typecheck //go:embed testdata/id_ed25519.pub sshPublicKey string ) func TestSecretScrubWriterWrite(t *testing.T) { t.Parallel() fsys := fstest.MapFS{ "mysecret": &fstest.MapFile{ Data: []byte("my secret file"), }, "subdir/alsosecret": &fstest.MapFile{ Data: []byte("a subdir secret file \nwith line feed"), }, } env := []string{ "MY_SECRET_ID=my secret value", } t.Run("scrub files and env", func(t *testing.T) { var buf bytes.Buffer buf.WriteString("I love to share my secret value to my close ones. But I keep my secret file to myself. As well as a subdir secret file \nwith line feed.") currentDirPath := "/" r, err := NewSecretScrubReader(&buf, currentDirPath, fsys, env, core.SecretToScrubInfo{ Envs: []string{"MY_SECRET_ID"}, Files: []string{"/mysecret", "/subdir/alsosecret"}, }) require.NoError(t, err) out, err := io.ReadAll(r) require.NoError(t, err) want := "I love to share *** to my close ones. But I keep *** to myself. As well as ***." require.Equal(t, want, string(out)) }) t.Run("do not scrub empty env", func(t *testing.T) { env := append(env, "EMPTY_SECRET_ID=") currentDirPath := "/" fsys := fstest.MapFS{ "emptysecret": &fstest.MapFile{ Data: []byte(""), }, } var buf bytes.Buffer buf.WriteString("I love to share my secret value to my close ones. But I keep my secret file to myself.") r, err := NewSecretScrubReader(&buf, currentDirPath, fsys, env, core.SecretToScrubInfo{ Envs: []string{"EMPTY_SECRET_ID"}, Files: []string{"/emptysecret"}, }) require.NoError(t, err) out, err := io.ReadAll(r) require.NoError(t, err) want := "I love to share my secret value to my close ones. But I keep my secret file to myself." require.Equal(t, want, string(out)) }) } func TestLoadSecretsToScrubFromEnv(t *testing.T) { t.Parallel() secretValue := "my secret value" env := []string{ fmt.Sprintf("MY_SECRET_ID=%s", secretValue), "PUBLIC_STUFF=so public", } secretToScrub := core.SecretToScrubInfo{ Envs: []string{ "MY_SECRET_ID", }, } secrets := loadSecretsToScrubFromEnv(env, secretToScrub.Envs) require.NotContains(t, secrets, "PUBLIC_STUFF") require.Contains(t, secrets, secretValue) } func TestLoadSecretsToScrubFromFiles(t *testing.T) { t.Parallel() const currentDirPath = "/mnt" t.Run("/mnt, fs relative, secret absolute", func(t *testing.T) { fsys := fstest.MapFS{ "mysecret": &fstest.MapFile{ Data: []byte("my secret file"), }, "subdir/alsosecret": &fstest.MapFile{ Data: []byte("a subdir secret file"), }, } secretFilePathsToScrub := []string{"/mnt/mysecret", "/mnt/subdir/alsosecret"} secrets, err := loadSecretsToScrubFromFiles(currentDirPath, fsys, secretFilePathsToScrub) require.NoError(t, err) require.Contains(t, secrets, "my secret file") require.Contains(t, secrets, "a subdir secret file") }) t.Run("/mnt, fs relative, secret relative", func(t *testing.T) { fsys := fstest.MapFS{ "mysecret": &fstest.MapFile{ Data: []byte("my secret file"), }, "subdir/alsosecret": &fstest.MapFile{ Data: []byte("a subdir secret file"), }, } secretFilePathsToScrub := []string{"mysecret", "subdir/alsosecret"} secrets, err := loadSecretsToScrubFromFiles(currentDirPath, fsys, secretFilePathsToScrub) require.NoError(t, err) require.Contains(t, secrets, "my secret file") require.Contains(t, secrets, "a subdir secret file") }) t.Run("/mnt, fs absolute, secret relative", func(t *testing.T) { fsys := fstest.MapFS{ "mnt/mysecret": &fstest.MapFile{ Data: []byte("my secret file"), }, "mnt/subdir/alsosecret": &fstest.MapFile{ Data: []byte("a subdir secret file"), }, } secretFilePathsToScrub := []string{"mnt/mysecret", "mnt/subdir/alsosecret"} secrets, err := loadSecretsToScrubFromFiles(currentDirPath, fsys, secretFilePathsToScrub) require.NoError(t, err) require.Contains(t, secrets, "my secret file") require.Contains(t, secrets, "a subdir secret file") }) } func TestScrubSecretWrite(t *testing.T) { t.Parallel() envMap := map[string]string{ "secret1": "secret1 value", "secret2": "secret2", "sshSecretKey": sshSecretKey, "sshPublicKey": sshPublicKey, } env := []string{} for k, v := range envMap { env = append(env, fmt.Sprintf("%s=%s", k, v)) } envNames := []string{ "secret1", "secret2", "sshSecretKey", "sshPublicKey", } secretToScrubInfo := core.SecretToScrubInfo{ Envs: envNames, Files: []string{}, } t.Run("multiline secret", func(t *testing.T) { for input, expectedOutput := range map[string]string{ "aaa\n" + sshSecretKey + "\nbbb\nccc": "aaa\n***\nbbb\nccc", "aaa" + sshSecretKey + "bbb\nccc": "aaa***bbb\nccc", sshSecretKey: "***", } { var buf bytes.Buffer r, err := NewSecretScrubReader(&buf, "/", fstest.MapFS{}, env, secretToScrubInfo) require.NoError(t, err) _, err = buf.WriteString(input) require.NoError(t, err) out, err := io.ReadAll(r) require.NoError(t, err) require.Equal(t, expectedOutput, string(out)) } }) t.Run("single line secret", func(t *testing.T) { var buf bytes.Buffer r, err := NewSecretScrubReader(&buf, "/", fstest.MapFS{}, env, secretToScrubInfo) require.NoError(t, err) input := "aaa\nsecret1 value\nno secret\n" _, err = buf.WriteString(input) require.NoError(t, err) out, err := io.ReadAll(r) require.NoError(t, err) require.Equal(t, "aaa\n***\nno secret\n", string(out)) }) t.Run("multi write", func(t *testing.T) { var buf bytes.Buffer r, err := NewSecretScrubReader(&buf, "/", fstest.MapFS{}, env, secretToScrubInfo) require.NoError(t, err) inputLines := []string{ "secret1 value", "secret2", "nonsecret", } outputLines := []string{ "***", "***", "nonsecret", } // Do multi write: for _, s := range inputLines { buf.WriteString(s) buf.WriteRune('\n') } // Scan through SecretScrubReader and validate output: scanner := bufio.NewScanner(r) var i int for scanner.Scan() { out := scanner.Text() expected := outputLines[i] require.Equal(t, expected, out) i++ } require.Equal(t, len(outputLines), i) }) }
closed
dagger/dagger
https://github.com/dagger/dagger
6,091
🐞 Service bindings don't work with Elixir SDK
### What is the issue? I've tried converting the NodeJS docker with postgres example into Elixir, but the `.with_service_binding` doesn't seem to work properly - an error is always thrown. If I remove the service binding the workflow completes ok (although the tests fail, because they need the database). My workflow is: ```elixir defmodule Mix.Tasks.ElixirWithDagger.Test do use Mix.Task @impl Mix.Task def run(_args) do Application.ensure_all_started(:dagger) client = Dagger.connect!() app = client |> Dagger.Client.host() |> Dagger.Host.directory(".", exclude: ["deps", "_build"]) database = client |> Dagger.Client.container() |> Dagger.Container.from("postgres:16") |> Dagger.Container.with_env_variable("POSTGRES_PASSWORD", "test") |> Dagger.Container.with_exec(~w"postgres") |> Dagger.Container.with_exposed_port(5432) |> Dagger.Container.as_service() {:ok, _} = client |> Dagger.Client.container() |> Dagger.Container.from("hexpm/elixir:1.15.7-erlang-26.1.2-debian-bullseye-20231009-slim") |> Dagger.Container.with_exec(~w"apt-get update") |> Dagger.Container.with_exec(~w"apt-get install -y build-essential git") |> Dagger.Container.with_exec(~w"apt-get clean") |> Dagger.Container.with_exec(~w"rm -f /var/lib/apt/lists/*_*") |> Dagger.Container.with_mounted_directory("/app", app) |> Dagger.Container.with_workdir("/app") |> Dagger.Container.with_exec(~w"mix local.hex --force") |> Dagger.Container.with_exec(~w"mix local.rebar --force") |> Dagger.Container.with_exec(~w"mix deps.get") |> Dagger.Container.with_service_binding("db", database) |> Dagger.Container.with_env_variable("DB_HOST", "db") |> Dagger.Container.with_env_variable("DB_USER", "postgres") |> Dagger.Container.with_env_variable("DB_PASSWORD", "test") |> Dagger.Container.with_env_variable("DB_NAME", "postgres") |> Dagger.Container.with_exec(~w"mix test") |> Dagger.Sync.sync() Dagger.close(client) IO.puts("Tests succeeded!") end end ``` ### Log output The output from the Dagger CLI is: ``` ┃ ** (Protocol.UndefinedError) protocol String.Chars not implemented for {:query_timeout, :infinity} of type Tuple. This protocol is implemented for the following type(s): Atom, B ┃ itString, Date, DateTime, Decimal, Float, Integer, List, NaiveDateTime, Phoenix.LiveComponent.CID, Postgrex.Copy, Postgrex.Query, Time, URI, Version, Version.Requirement ┃ (elixir 1.15.7) lib/string/chars.ex:3: String.Chars.impl_for!/1 ┃ (elixir 1.15.7) lib/string/chars.ex:22: String.Chars.to_string/1 ┃ (dagger 0.9.3) lib/dagger/query_builder.ex:82: Dagger.QueryBuilder.Selection.encode_value/1 ┃ (elixir 1.15.7) lib/enum.ex:1693: Enum."-map/2-lists^map/1-1-"/2 ┃ (dagger 0.9.3) lib/dagger/query_builder.ex:65: Dagger.QueryBuilder.Selection.encode_value/1 ┃ (dagger 0.9.3) lib/dagger/query_builder.ex:76: anonymous fn/1 in Dagger.QueryBuilder.Selection.encode_value/1 ┃ (elixir 1.15.7) lib/enum.ex:1701: anonymous fn/3 in Enum.map/2 ┃ (stdlib 5.0.2) maps.erl:416: :maps.fold_1/4 ``` ### Steps to reproduce Run the above workflow with `dagger run mix elixir_with_dagger.test` ### SDK version dagger v0.9.3 (registry.dagger.io/engine) darwin/arm64 ### OS version macOS
https://github.com/dagger/dagger/issues/6091
https://github.com/dagger/dagger/pull/6099
a6ba9e8016145ff3d19c25fba9247b4678ed3504
5989170918a9c365699bf020acc733445e3a7330
"2023-11-10T12:20:50Z"
go
"2023-11-22T07:51:17Z"
sdk/elixir/.changes/unreleased/Fixed-20231113-215135.yaml
closed
dagger/dagger
https://github.com/dagger/dagger
6,091
🐞 Service bindings don't work with Elixir SDK
### What is the issue? I've tried converting the NodeJS docker with postgres example into Elixir, but the `.with_service_binding` doesn't seem to work properly - an error is always thrown. If I remove the service binding the workflow completes ok (although the tests fail, because they need the database). My workflow is: ```elixir defmodule Mix.Tasks.ElixirWithDagger.Test do use Mix.Task @impl Mix.Task def run(_args) do Application.ensure_all_started(:dagger) client = Dagger.connect!() app = client |> Dagger.Client.host() |> Dagger.Host.directory(".", exclude: ["deps", "_build"]) database = client |> Dagger.Client.container() |> Dagger.Container.from("postgres:16") |> Dagger.Container.with_env_variable("POSTGRES_PASSWORD", "test") |> Dagger.Container.with_exec(~w"postgres") |> Dagger.Container.with_exposed_port(5432) |> Dagger.Container.as_service() {:ok, _} = client |> Dagger.Client.container() |> Dagger.Container.from("hexpm/elixir:1.15.7-erlang-26.1.2-debian-bullseye-20231009-slim") |> Dagger.Container.with_exec(~w"apt-get update") |> Dagger.Container.with_exec(~w"apt-get install -y build-essential git") |> Dagger.Container.with_exec(~w"apt-get clean") |> Dagger.Container.with_exec(~w"rm -f /var/lib/apt/lists/*_*") |> Dagger.Container.with_mounted_directory("/app", app) |> Dagger.Container.with_workdir("/app") |> Dagger.Container.with_exec(~w"mix local.hex --force") |> Dagger.Container.with_exec(~w"mix local.rebar --force") |> Dagger.Container.with_exec(~w"mix deps.get") |> Dagger.Container.with_service_binding("db", database) |> Dagger.Container.with_env_variable("DB_HOST", "db") |> Dagger.Container.with_env_variable("DB_USER", "postgres") |> Dagger.Container.with_env_variable("DB_PASSWORD", "test") |> Dagger.Container.with_env_variable("DB_NAME", "postgres") |> Dagger.Container.with_exec(~w"mix test") |> Dagger.Sync.sync() Dagger.close(client) IO.puts("Tests succeeded!") end end ``` ### Log output The output from the Dagger CLI is: ``` ┃ ** (Protocol.UndefinedError) protocol String.Chars not implemented for {:query_timeout, :infinity} of type Tuple. This protocol is implemented for the following type(s): Atom, B ┃ itString, Date, DateTime, Decimal, Float, Integer, List, NaiveDateTime, Phoenix.LiveComponent.CID, Postgrex.Copy, Postgrex.Query, Time, URI, Version, Version.Requirement ┃ (elixir 1.15.7) lib/string/chars.ex:3: String.Chars.impl_for!/1 ┃ (elixir 1.15.7) lib/string/chars.ex:22: String.Chars.to_string/1 ┃ (dagger 0.9.3) lib/dagger/query_builder.ex:82: Dagger.QueryBuilder.Selection.encode_value/1 ┃ (elixir 1.15.7) lib/enum.ex:1693: Enum."-map/2-lists^map/1-1-"/2 ┃ (dagger 0.9.3) lib/dagger/query_builder.ex:65: Dagger.QueryBuilder.Selection.encode_value/1 ┃ (dagger 0.9.3) lib/dagger/query_builder.ex:76: anonymous fn/1 in Dagger.QueryBuilder.Selection.encode_value/1 ┃ (elixir 1.15.7) lib/enum.ex:1701: anonymous fn/3 in Enum.map/2 ┃ (stdlib 5.0.2) maps.erl:416: :maps.fold_1/4 ``` ### Steps to reproduce Run the above workflow with `dagger run mix elixir_with_dagger.test` ### SDK version dagger v0.9.3 (registry.dagger.io/engine) darwin/arm64 ### OS version macOS
https://github.com/dagger/dagger/issues/6091
https://github.com/dagger/dagger/pull/6099
a6ba9e8016145ff3d19c25fba9247b4678ed3504
5989170918a9c365699bf020acc733445e3a7330
"2023-11-10T12:20:50Z"
go
"2023-11-22T07:51:17Z"
sdk/elixir/lib/dagger/codegen/elixir/function.ex
defmodule Dagger.Codegen.Elixir.Function do @moduledoc false @id_modules_map %{ "CacheVolumeID" => "cache_volume", "ContainerID" => "container", "DirectoryID" => "directory", "FileID" => "file", "ProjectCommandID" => "project_command", "ProjectID" => "project", "SecretID" => "secret", "SocketID" => "socket" } def id_module_to_var_name(id_mod), do: Map.fetch!(@id_modules_map, id_mod) def format_var_name(name) when is_binary(name) do format_name(name) end defp format_fun_name(name) when is_atom(name) do name |> to_string() |> format_fun_name() end defp format_fun_name(name) when is_binary(name) do format_name(name) end defp format_name(name) when is_binary(name) do name |> Macro.underscore() |> String.to_atom() end def define(fun_name, args, guard \\ nil, body, opts \\ []) when is_list(args) do fun_name = format_fun_name(fun_name) doc = opts[:doc] |> doc_to_quote() deprecated = opts[:deprecated] |> deprecated_to_quote() typespec = opts[:spec] |> spec_to_quote(fun_name) fun = [ case guard do nil -> quote do def unquote(fun_name)(unquote_splicing(args)) do unquote(body) end end guard -> quote do def unquote(fun_name)(unquote_splicing(args)) when unquote(guard) do unquote(body) end end end ] quote do (unquote_splicing(doc ++ deprecated ++ typespec ++ fun)) end end defp doc_to_quote(nil) do [ quote do @doc false end ] end defp doc_to_quote(doc) when is_binary(doc) do [ quote do @doc unquote(doc) end ] end defp deprecated_to_quote(nil), do: [] defp deprecated_to_quote(deprecated) do [ quote do @deprecated unquote(deprecated) end ] end defp spec_to_quote(nil, _), do: [] defp spec_to_quote({arg_types, return_type}, fun_name) do [ quote do @spec unquote(fun_name)(unquote_splicing(arg_types)) :: unquote(return_type) end ] end end
closed
dagger/dagger
https://github.com/dagger/dagger
6,091
🐞 Service bindings don't work with Elixir SDK
### What is the issue? I've tried converting the NodeJS docker with postgres example into Elixir, but the `.with_service_binding` doesn't seem to work properly - an error is always thrown. If I remove the service binding the workflow completes ok (although the tests fail, because they need the database). My workflow is: ```elixir defmodule Mix.Tasks.ElixirWithDagger.Test do use Mix.Task @impl Mix.Task def run(_args) do Application.ensure_all_started(:dagger) client = Dagger.connect!() app = client |> Dagger.Client.host() |> Dagger.Host.directory(".", exclude: ["deps", "_build"]) database = client |> Dagger.Client.container() |> Dagger.Container.from("postgres:16") |> Dagger.Container.with_env_variable("POSTGRES_PASSWORD", "test") |> Dagger.Container.with_exec(~w"postgres") |> Dagger.Container.with_exposed_port(5432) |> Dagger.Container.as_service() {:ok, _} = client |> Dagger.Client.container() |> Dagger.Container.from("hexpm/elixir:1.15.7-erlang-26.1.2-debian-bullseye-20231009-slim") |> Dagger.Container.with_exec(~w"apt-get update") |> Dagger.Container.with_exec(~w"apt-get install -y build-essential git") |> Dagger.Container.with_exec(~w"apt-get clean") |> Dagger.Container.with_exec(~w"rm -f /var/lib/apt/lists/*_*") |> Dagger.Container.with_mounted_directory("/app", app) |> Dagger.Container.with_workdir("/app") |> Dagger.Container.with_exec(~w"mix local.hex --force") |> Dagger.Container.with_exec(~w"mix local.rebar --force") |> Dagger.Container.with_exec(~w"mix deps.get") |> Dagger.Container.with_service_binding("db", database) |> Dagger.Container.with_env_variable("DB_HOST", "db") |> Dagger.Container.with_env_variable("DB_USER", "postgres") |> Dagger.Container.with_env_variable("DB_PASSWORD", "test") |> Dagger.Container.with_env_variable("DB_NAME", "postgres") |> Dagger.Container.with_exec(~w"mix test") |> Dagger.Sync.sync() Dagger.close(client) IO.puts("Tests succeeded!") end end ``` ### Log output The output from the Dagger CLI is: ``` ┃ ** (Protocol.UndefinedError) protocol String.Chars not implemented for {:query_timeout, :infinity} of type Tuple. This protocol is implemented for the following type(s): Atom, B ┃ itString, Date, DateTime, Decimal, Float, Integer, List, NaiveDateTime, Phoenix.LiveComponent.CID, Postgrex.Copy, Postgrex.Query, Time, URI, Version, Version.Requirement ┃ (elixir 1.15.7) lib/string/chars.ex:3: String.Chars.impl_for!/1 ┃ (elixir 1.15.7) lib/string/chars.ex:22: String.Chars.to_string/1 ┃ (dagger 0.9.3) lib/dagger/query_builder.ex:82: Dagger.QueryBuilder.Selection.encode_value/1 ┃ (elixir 1.15.7) lib/enum.ex:1693: Enum."-map/2-lists^map/1-1-"/2 ┃ (dagger 0.9.3) lib/dagger/query_builder.ex:65: Dagger.QueryBuilder.Selection.encode_value/1 ┃ (dagger 0.9.3) lib/dagger/query_builder.ex:76: anonymous fn/1 in Dagger.QueryBuilder.Selection.encode_value/1 ┃ (elixir 1.15.7) lib/enum.ex:1701: anonymous fn/3 in Enum.map/2 ┃ (stdlib 5.0.2) maps.erl:416: :maps.fold_1/4 ``` ### Steps to reproduce Run the above workflow with `dagger run mix elixir_with_dagger.test` ### SDK version dagger v0.9.3 (registry.dagger.io/engine) darwin/arm64 ### OS version macOS
https://github.com/dagger/dagger/issues/6091
https://github.com/dagger/dagger/pull/6099
a6ba9e8016145ff3d19c25fba9247b4678ed3504
5989170918a9c365699bf020acc733445e3a7330
"2023-11-10T12:20:50Z"
go
"2023-11-22T07:51:17Z"
sdk/elixir/lib/dagger/codegen/elixir/module.ex
defmodule Dagger.Codegen.Elixir.Module do @moduledoc false @id_modules_map %{ "CacheVolumeID" => "CacheVolume", "ContainerID" => "Container", "DirectoryID" => "Directory", "FileID" => "File", "ProjectCommandID" => "ProjectCommand", "ProjectID" => "Project", "SecretID" => "Secret", "SocketID" => "Socket" } defmacro id_modules(), do: quote(do: Map.keys(@id_modules_map)) def id_module_to_module(id_mod), do: Map.fetch!(@id_modules_map, id_mod) def format_name(name) when is_binary(name) do name |> Macro.camelize() |> String.to_atom() end def from_name("Query") do from_name("Client") end def from_name(name) do Module.concat([Dagger, format_name(name)]) end end
closed
dagger/dagger
https://github.com/dagger/dagger
6,091
🐞 Service bindings don't work with Elixir SDK
### What is the issue? I've tried converting the NodeJS docker with postgres example into Elixir, but the `.with_service_binding` doesn't seem to work properly - an error is always thrown. If I remove the service binding the workflow completes ok (although the tests fail, because they need the database). My workflow is: ```elixir defmodule Mix.Tasks.ElixirWithDagger.Test do use Mix.Task @impl Mix.Task def run(_args) do Application.ensure_all_started(:dagger) client = Dagger.connect!() app = client |> Dagger.Client.host() |> Dagger.Host.directory(".", exclude: ["deps", "_build"]) database = client |> Dagger.Client.container() |> Dagger.Container.from("postgres:16") |> Dagger.Container.with_env_variable("POSTGRES_PASSWORD", "test") |> Dagger.Container.with_exec(~w"postgres") |> Dagger.Container.with_exposed_port(5432) |> Dagger.Container.as_service() {:ok, _} = client |> Dagger.Client.container() |> Dagger.Container.from("hexpm/elixir:1.15.7-erlang-26.1.2-debian-bullseye-20231009-slim") |> Dagger.Container.with_exec(~w"apt-get update") |> Dagger.Container.with_exec(~w"apt-get install -y build-essential git") |> Dagger.Container.with_exec(~w"apt-get clean") |> Dagger.Container.with_exec(~w"rm -f /var/lib/apt/lists/*_*") |> Dagger.Container.with_mounted_directory("/app", app) |> Dagger.Container.with_workdir("/app") |> Dagger.Container.with_exec(~w"mix local.hex --force") |> Dagger.Container.with_exec(~w"mix local.rebar --force") |> Dagger.Container.with_exec(~w"mix deps.get") |> Dagger.Container.with_service_binding("db", database) |> Dagger.Container.with_env_variable("DB_HOST", "db") |> Dagger.Container.with_env_variable("DB_USER", "postgres") |> Dagger.Container.with_env_variable("DB_PASSWORD", "test") |> Dagger.Container.with_env_variable("DB_NAME", "postgres") |> Dagger.Container.with_exec(~w"mix test") |> Dagger.Sync.sync() Dagger.close(client) IO.puts("Tests succeeded!") end end ``` ### Log output The output from the Dagger CLI is: ``` ┃ ** (Protocol.UndefinedError) protocol String.Chars not implemented for {:query_timeout, :infinity} of type Tuple. This protocol is implemented for the following type(s): Atom, B ┃ itString, Date, DateTime, Decimal, Float, Integer, List, NaiveDateTime, Phoenix.LiveComponent.CID, Postgrex.Copy, Postgrex.Query, Time, URI, Version, Version.Requirement ┃ (elixir 1.15.7) lib/string/chars.ex:3: String.Chars.impl_for!/1 ┃ (elixir 1.15.7) lib/string/chars.ex:22: String.Chars.to_string/1 ┃ (dagger 0.9.3) lib/dagger/query_builder.ex:82: Dagger.QueryBuilder.Selection.encode_value/1 ┃ (elixir 1.15.7) lib/enum.ex:1693: Enum."-map/2-lists^map/1-1-"/2 ┃ (dagger 0.9.3) lib/dagger/query_builder.ex:65: Dagger.QueryBuilder.Selection.encode_value/1 ┃ (dagger 0.9.3) lib/dagger/query_builder.ex:76: anonymous fn/1 in Dagger.QueryBuilder.Selection.encode_value/1 ┃ (elixir 1.15.7) lib/enum.ex:1701: anonymous fn/3 in Enum.map/2 ┃ (stdlib 5.0.2) maps.erl:416: :maps.fold_1/4 ``` ### Steps to reproduce Run the above workflow with `dagger run mix elixir_with_dagger.test` ### SDK version dagger v0.9.3 (registry.dagger.io/engine) darwin/arm64 ### OS version macOS
https://github.com/dagger/dagger/issues/6091
https://github.com/dagger/dagger/pull/6099
a6ba9e8016145ff3d19c25fba9247b4678ed3504
5989170918a9c365699bf020acc733445e3a7330
"2023-11-10T12:20:50Z"
go
"2023-11-22T07:51:17Z"
sdk/elixir/lib/dagger/codegen/elixir/templates/object_tmpl.ex
defmodule Dagger.Codegen.Elixir.Templates.Object do @moduledoc false alias Dagger.Codegen.Elixir.Function alias Dagger.Codegen.Elixir.Module, as: Mod alias Dagger.Codegen.Elixir.Type @id_modules [ "CacheVolumeID", "ContainerID", "DirectoryID", "FileID", "ProjectCommandID", "ProjectID", "SecretID", "SocketID" ] def render(full_type, types) do if is_simple_object?(full_type) do render_data_module(full_type, types) else render_api_module(full_type, types) end end defp is_simple_object?(%{"fields" => fields}) do not has_id_fields?(fields) and empty_args?(fields) end defp has_id_fields?(fields) do fields |> Enum.any?(fn %{"name" => name} -> name == "id" end) end defp empty_args?(fields) do fields |> Enum.all?(fn %{"args" => args} -> args == [] end) end defp render_data_module( %{ "name" => name, "fields" => fields, "description" => desc }, _ ) when name not in @id_modules do mod_name = Mod.from_name(name) desc = if desc == "" do name else desc end struct_fields = Enum.map(fields, &to_struct_field/1) data_type_t = {:%, [], [ {:__MODULE__, [], Elixir}, {:%{}, [], fields |> Enum.map(fn %{"type" => type} = field -> type = case type do %{"kind" => "NON_NULL", "ofType" => type} -> Type.render_type(type) type -> Type.render_type(type) |> Type.render_nullable_type() end {to_struct_field(field), type} end)} ]} quote do defmodule unquote(mod_name) do @moduledoc unquote(desc) @type t() :: unquote(data_type_t) @derive Nestru.Decoder defstruct unquote(struct_fields) end end end defp to_struct_field(%{"name" => name}) do name |> Macro.underscore() |> String.to_atom() end defp render_api_module( %{ "name" => name, "fields" => fields, "description" => desc }, types ) do mod_name = Mod.from_name(name) funs = Enum.map(fields, &render_function(&1, Function.format_var_name(name), types)) derive_sync = if Enum.any?(fields, fn %{"name" => name} -> name == "sync" end) do [ quote do @derive Dagger.Sync end ] else [] end desc = if desc == "" do name else desc end quote do defmodule unquote(mod_name) do @moduledoc unquote(desc) use Dagger.QueryBuilder @type t() :: %__MODULE__{} unquote_splicing(derive_sync) defstruct [:selection, :client] unquote_splicing(funs) end end end defp render_function( %{ "name" => name, "args" => args, "type" => type } = field, mod_var_name, types ) do mod_var_name = to_macro_var(mod_var_name) fun_args = [module_fun_arg(mod_var_name) | fun_args(args)] fun_body = format_function_body(name, {mod_var_name, args}, type, types) Function.define(name, fun_args, nil, fun_body, doc: format_doc(field), deprecated: deprecated_reason(field), spec: format_spec(field) ) end defp format_function_body( field_name, {mod_var_name, [%{"name" => "id"} = arg]}, type_ref, _types ) when field_name in ["file", "secret"] do name = case type_ref do %{"kind" => "OBJECT", "name" => name} -> name %{"kind" => "NON_NULL", "ofType" => %{"kind" => "OBJECT", "name" => name}} -> name end mod_name = Mod.from_name(name) arg_name = arg |> fun_arg_name() |> Function.format_var_name() quote do selection = select(unquote(mod_var_name).selection, unquote(field_name)) selection = arg(selection, "id", unquote(to_macro_var(arg_name))) %unquote(mod_name){ selection: selection, client: unquote(mod_var_name).client } end end defp format_function_body( field_name, {mod_var_name, args}, %{"kind" => "NON_NULL", "ofType" => %{"kind" => "OBJECT", "name" => name}}, _types ) when field_name != "moduleConfig" do name = if(name == "Query", do: "Client", else: name) mod_name = Mod.from_name(name) args = render_args(args) quote do selection = select(unquote(mod_var_name).selection, unquote(field_name)) unquote_splicing(args) %unquote(mod_name){ selection: selection, client: unquote(mod_var_name).client } end end defp format_function_body( field_name, {mod_var_name, args}, %{ "kind" => "NON_NULL", "ofType" => %{ "kind" => "LIST", "ofType" => %{"ofType" => %{"kind" => "OBJECT", "name" => name}} } }, types ) do args = render_args(args) selection_fields = types |> Enum.find(fn %{"name" => typename} -> typename == name end) |> then(fn %{"fields" => fields} -> get_in(fields, [Access.all(), "name"]) end) |> Enum.join(" ") return_module = Mod.from_name(name) quote do selection = select(unquote(mod_var_name).selection, unquote(field_name)) selection = select(selection, unquote(selection_fields)) unquote_splicing(args) with {:ok, data} <- execute(selection, unquote(mod_var_name).client) do Nestru.decode_from_list_of_maps(data, unquote(return_module)) end end end defp format_function_body(field_name, {mod_var_name, args}, type_ref, _types) do args = render_args(args) execute_block = case type_ref do %{"kind" => "OBJECT", "name" => name} -> return_module = Mod.from_name(name) quote do case execute(selection, unquote(mod_var_name).client) do {:ok, nil} -> {:ok, nil} {:ok, data} -> Nestru.decode_from_map(data, unquote(return_module)) error -> error end end _ -> quote do execute(selection, unquote(mod_var_name).client) end end quote do selection = select(unquote(mod_var_name).selection, unquote(field_name)) unquote_splicing(args) unquote(execute_block) end end defp deprecated_reason(%{"isDeprecated" => true, "deprecationReason" => reason}) do reason = String.trim_trailing(reason, ".") for [text, api] <- Regex.scan(~r/`(?<name>[a-zA-Z0-9]+)`/, reason), reduce: reason do reason -> String.replace(reason, text, "`#{Macro.underscore(api)}`") end end defp deprecated_reason(_), do: nil defp format_doc(%{"description" => desc, "args" => args}) do sep = [~c"\n", ~c"\n"] doc = [desc] required_args_doc = case format_required_args_doc(args) do [] -> [] args_doc -> ["## Required Arguments", ~c"\n", ~c"\n", args_doc] end optional_args_doc = case format_optional_args_doc(args) do [] -> [] args_doc -> ["## Optional Arguments", ~c"\n", ~c"\n", args_doc] end (doc ++ sep ++ required_args_doc ++ sep ++ optional_args_doc) |> IO.iodata_to_binary() |> String.trim() end defp format_required_args_doc(args) do args |> Enum.filter(&required_arg?/1) |> Enum.map(&format_arg_doc/1) |> Enum.intersperse(~c"\n") end defp format_optional_args_doc(args) do args |> Enum.filter(&(not required_arg?(&1))) |> Enum.map(&format_arg_doc/1) |> Enum.intersperse(~c"\n") end defp required_arg?(arg) do arg["type"]["kind"] == "NON_NULL" end defp format_arg_doc(%{"name" => name, "description" => description}) do name = Function.format_var_name(name) "* `#{name}` - #{description}" end defp render_args(args) do required_args = render_required_args(args) optional_args = render_optional_args(args) required_args ++ optional_args end defp render_required_args(args) do for arg <- args, arg["type"]["kind"] == "NON_NULL" do name = arg |> fun_arg_name() |> Function.format_var_name() case arg do %{"type" => %{"ofType" => %{"name" => type_name}}} when type_name in @id_modules -> mod = Mod.from_name(Mod.id_module_to_module(type_name)) quote do {:ok, id} = unquote(mod).id(unquote(to_macro_var(name))) selection = arg(selection, unquote(arg["name"]), id) end _ -> quote do selection = arg(selection, unquote(arg["name"]), unquote(to_macro_var(name))) end end end end defp render_optional_args(args) do for arg <- args, not required_arg?(arg) do name = arg["name"] arg_name = Function.format_var_name(name) render = case arg do %{ "type" => %{ "kind" => "LIST", "name" => nil, "ofType" => %{ "kind" => "NON_NULL", "name" => nil, "ofType" => %{"kind" => "SCALAR", "name" => type_name, "ofType" => nil} } } } when type_name in @id_modules -> mod = Mod.from_name(Mod.id_module_to_module(type_name)) quote do ids = optional_args[unquote(arg_name)] |> Enum.map(fn value -> {:ok, id} = unquote(mod).id(value) id end) arg(selection, unquote(name), ids) end %{ "type" => %{"kind" => "SCALAR", "name" => type_name, "ofType" => nil} } when type_name in @id_modules -> mod = Mod.from_name(Mod.id_module_to_module(type_name)) quote do {:ok, id} = unquote(mod).id(optional_args[unquote(arg_name)]) arg(selection, unquote(name), id) end _ -> quote do arg(selection, unquote(name), optional_args[unquote(arg_name)]) end end quote do selection = if is_nil(optional_args[unquote(arg_name)]) do selection else unquote(render) end end end end defp format_spec(%{"name" => name, "type" => type} = field) do return_type = case type do %{"kind" => "NON_NULL", "ofType" => %{"kind" => "OBJECT"} = type} -> Type.render_type(type) %{"kind" => "NON_NULL", "ofType" => type} -> Type.render_type(type) |> Type.render_result_type() type -> Type.render_type(type) |> Type.render_nullable_type() |> Type.render_result_type() end {[quote(do: t()) | render_arg_types(field["args"], name not in ["file", "secret"])], return_type} end defp render_arg_types(args, strip_id?) do {required_args, optional_args} = args |> Enum.split_with(&required_arg?/1) required_arg_types = for %{"type" => type} <- required_args do case type do %{"kind" => "NON_NULL", "ofType" => %{"kind" => "SCALAR"}} = type -> if strip_id? do update_in(type, ["ofType", "name"], fn name -> String.trim_trailing(name, "ID") end) else type end type -> type end |> Type.render_type() end if optional_args != [] do required_arg_types ++ [quote(do: keyword())] else required_arg_types end end defp module_fun_arg(mod_var_name) do quote do %__MODULE__{} = unquote(mod_var_name) end end defp fun_args([]), do: [] defp fun_args(args) do {required_args, optional_args} = args |> Enum.split_with(&required_arg?/1) required_fun_args(required_args) ++ optional_fun_args(optional_args) end defp required_fun_args(args) do args |> Enum.map(&Function.format_var_name(fun_arg_name(&1))) |> Enum.map(&to_macro_var/1) end defp optional_fun_args([]), do: [] defp optional_fun_args(_args) do [ quote do unquote(to_macro_var(:optional_args)) \\ [] end ] end defp fun_arg_name(%{"name" => "id", "type" => %{"ofType" => %{"name" => id_mod}}}) when id_mod in @id_modules do Function.id_module_to_var_name(id_mod) end defp fun_arg_name(%{"name" => name}) do name end defp to_macro_var(var), do: Macro.var(var, __MODULE__) end
closed
dagger/dagger
https://github.com/dagger/dagger
6,091
🐞 Service bindings don't work with Elixir SDK
### What is the issue? I've tried converting the NodeJS docker with postgres example into Elixir, but the `.with_service_binding` doesn't seem to work properly - an error is always thrown. If I remove the service binding the workflow completes ok (although the tests fail, because they need the database). My workflow is: ```elixir defmodule Mix.Tasks.ElixirWithDagger.Test do use Mix.Task @impl Mix.Task def run(_args) do Application.ensure_all_started(:dagger) client = Dagger.connect!() app = client |> Dagger.Client.host() |> Dagger.Host.directory(".", exclude: ["deps", "_build"]) database = client |> Dagger.Client.container() |> Dagger.Container.from("postgres:16") |> Dagger.Container.with_env_variable("POSTGRES_PASSWORD", "test") |> Dagger.Container.with_exec(~w"postgres") |> Dagger.Container.with_exposed_port(5432) |> Dagger.Container.as_service() {:ok, _} = client |> Dagger.Client.container() |> Dagger.Container.from("hexpm/elixir:1.15.7-erlang-26.1.2-debian-bullseye-20231009-slim") |> Dagger.Container.with_exec(~w"apt-get update") |> Dagger.Container.with_exec(~w"apt-get install -y build-essential git") |> Dagger.Container.with_exec(~w"apt-get clean") |> Dagger.Container.with_exec(~w"rm -f /var/lib/apt/lists/*_*") |> Dagger.Container.with_mounted_directory("/app", app) |> Dagger.Container.with_workdir("/app") |> Dagger.Container.with_exec(~w"mix local.hex --force") |> Dagger.Container.with_exec(~w"mix local.rebar --force") |> Dagger.Container.with_exec(~w"mix deps.get") |> Dagger.Container.with_service_binding("db", database) |> Dagger.Container.with_env_variable("DB_HOST", "db") |> Dagger.Container.with_env_variable("DB_USER", "postgres") |> Dagger.Container.with_env_variable("DB_PASSWORD", "test") |> Dagger.Container.with_env_variable("DB_NAME", "postgres") |> Dagger.Container.with_exec(~w"mix test") |> Dagger.Sync.sync() Dagger.close(client) IO.puts("Tests succeeded!") end end ``` ### Log output The output from the Dagger CLI is: ``` ┃ ** (Protocol.UndefinedError) protocol String.Chars not implemented for {:query_timeout, :infinity} of type Tuple. This protocol is implemented for the following type(s): Atom, B ┃ itString, Date, DateTime, Decimal, Float, Integer, List, NaiveDateTime, Phoenix.LiveComponent.CID, Postgrex.Copy, Postgrex.Query, Time, URI, Version, Version.Requirement ┃ (elixir 1.15.7) lib/string/chars.ex:3: String.Chars.impl_for!/1 ┃ (elixir 1.15.7) lib/string/chars.ex:22: String.Chars.to_string/1 ┃ (dagger 0.9.3) lib/dagger/query_builder.ex:82: Dagger.QueryBuilder.Selection.encode_value/1 ┃ (elixir 1.15.7) lib/enum.ex:1693: Enum."-map/2-lists^map/1-1-"/2 ┃ (dagger 0.9.3) lib/dagger/query_builder.ex:65: Dagger.QueryBuilder.Selection.encode_value/1 ┃ (dagger 0.9.3) lib/dagger/query_builder.ex:76: anonymous fn/1 in Dagger.QueryBuilder.Selection.encode_value/1 ┃ (elixir 1.15.7) lib/enum.ex:1701: anonymous fn/3 in Enum.map/2 ┃ (stdlib 5.0.2) maps.erl:416: :maps.fold_1/4 ``` ### Steps to reproduce Run the above workflow with `dagger run mix elixir_with_dagger.test` ### SDK version dagger v0.9.3 (registry.dagger.io/engine) darwin/arm64 ### OS version macOS
https://github.com/dagger/dagger/issues/6091
https://github.com/dagger/dagger/pull/6099
a6ba9e8016145ff3d19c25fba9247b4678ed3504
5989170918a9c365699bf020acc733445e3a7330
"2023-11-10T12:20:50Z"
go
"2023-11-22T07:51:17Z"
sdk/elixir/lib/dagger/gen/client.ex
# This file generated by `mix dagger.gen`. Please DO NOT EDIT. defmodule Dagger.Client do @moduledoc "Query" use Dagger.QueryBuilder @type t() :: %__MODULE__{} defstruct [:selection, :client] ( @doc "Constructs a cache volume for a given cache key.\n\n## Required Arguments\n\n* `key` - A string identifier to target this cache volume (e.g., \"modules-cache\")." @spec cache_volume(t(), Dagger.String.t()) :: Dagger.CacheVolume.t() def cache_volume(%__MODULE__{} = query, key) do selection = select(query.selection, "cacheVolume") selection = arg(selection, "key", key) %Dagger.CacheVolume{selection: selection, client: query.client} end ) ( @doc "Checks if the current Dagger Engine is compatible with an SDK's required version.\n\n## Required Arguments\n\n* `version` - The SDK's required version." @spec check_version_compatibility(t(), Dagger.String.t()) :: {:ok, Dagger.Boolean.t()} | {:error, term()} def check_version_compatibility(%__MODULE__{} = query, version) do selection = select(query.selection, "checkVersionCompatibility") selection = arg(selection, "version", version) execute(selection, query.client) end ) ( @doc "Creates a scratch container or loads one by ID.\n\nOptional platform argument initializes new containers to execute and publish\nas that platform. Platform defaults to that of the builder's host.\n\n\n\n## Optional Arguments\n\n* `id` - \n* `platform` -" @spec container(t(), keyword()) :: Dagger.Container.t() def container(%__MODULE__{} = query, optional_args \\ []) do selection = select(query.selection, "container") selection = if is_nil(optional_args[:id]) do selection else {:ok, id} = Dagger.Container.id(optional_args[:id]) arg(selection, "id", id) end selection = if is_nil(optional_args[:platform]) do selection else arg(selection, "platform", optional_args[:platform]) end %Dagger.Container{selection: selection, client: query.client} end ) ( @doc "The FunctionCall context that the SDK caller is currently executing in.\nIf the caller is not currently executing in a function, this will return\nan error." @spec current_function_call(t()) :: Dagger.FunctionCall.t() def current_function_call(%__MODULE__{} = query) do selection = select(query.selection, "currentFunctionCall") %Dagger.FunctionCall{selection: selection, client: query.client} end ) ( @doc "The module currently being served in the session, if any." @spec current_module(t()) :: {:ok, Dagger.Module.t() | nil} | {:error, term()} def current_module(%__MODULE__{} = query) do selection = select(query.selection, "currentModule") case execute(selection, query.client) do {:ok, nil} -> {:ok, nil} {:ok, data} -> Nestru.decode_from_map(data, Dagger.Module) error -> error end end ) ( @doc "The default platform of the builder." @spec default_platform(t()) :: {:ok, Dagger.Platform.t()} | {:error, term()} def default_platform(%__MODULE__{} = query) do selection = select(query.selection, "defaultPlatform") execute(selection, query.client) end ) ( @doc "Creates an empty directory or loads one by ID.\n\n\n\n## Optional Arguments\n\n* `id` -" @spec directory(t(), keyword()) :: Dagger.Directory.t() def directory(%__MODULE__{} = query, optional_args \\ []) do selection = select(query.selection, "directory") selection = if is_nil(optional_args[:id]) do selection else {:ok, id} = Dagger.Directory.id(optional_args[:id]) arg(selection, "id", id) end %Dagger.Directory{selection: selection, client: query.client} end ) ( @doc "Loads a file by ID.\n\n## Required Arguments\n\n* `id` -" @deprecated "Use `load_file_from_id` instead" @spec file(t(), Dagger.FileID.t()) :: {:ok, Dagger.File.t() | nil} | {:error, term()} def file(%__MODULE__{} = query, file) do selection = select(query.selection, "file") selection = arg(selection, "id", file) %Dagger.File{selection: selection, client: query.client} end ) ( @doc "Create a function.\n\n## Required Arguments\n\n* `name` - \n* `return_type` -" @spec function(t(), Dagger.String.t(), Dagger.TypeDef.t()) :: Dagger.Function.t() def function(%__MODULE__{} = query, name, return_type) do selection = select(query.selection, "function") selection = arg(selection, "name", name) selection = arg(selection, "returnType", return_type) %Dagger.Function{selection: selection, client: query.client} end ) ( @doc "Create a code generation result, given a directory containing the generated\ncode.\n\n## Required Arguments\n\n* `code` -" @spec generated_code(t(), Dagger.Directory.t()) :: Dagger.GeneratedCode.t() def generated_code(%__MODULE__{} = query, code) do selection = select(query.selection, "generatedCode") ( {:ok, id} = Dagger.Directory.id(code) selection = arg(selection, "code", id) ) %Dagger.GeneratedCode{selection: selection, client: query.client} end ) ( @doc "Queries a git repository.\n\n## Required Arguments\n\n* `url` - Url of the git repository.\nCan be formatted as https://{host}/{owner}/{repo}, git@{host}:{owner}/{repo}\nSuffix \".git\" is optional.\n\n## Optional Arguments\n\n* `keep_git_dir` - Set to true to keep .git directory.\n* `ssh_known_hosts` - Set SSH known hosts\n* `ssh_auth_socket` - Set SSH auth socket\n* `experimental_service_host` - A service which must be started before the repo is fetched." @spec git(t(), Dagger.String.t(), keyword()) :: Dagger.GitRepository.t() def git(%__MODULE__{} = query, url, optional_args \\ []) do selection = select(query.selection, "git") selection = arg(selection, "url", url) selection = if is_nil(optional_args[:keep_git_dir]) do selection else arg(selection, "keepGitDir", optional_args[:keep_git_dir]) end selection = if is_nil(optional_args[:ssh_known_hosts]) do selection else arg(selection, "sshKnownHosts", optional_args[:ssh_known_hosts]) end selection = if is_nil(optional_args[:ssh_auth_socket]) do selection else {:ok, id} = Dagger.Socket.id(optional_args[:ssh_auth_socket]) arg(selection, "sshAuthSocket", id) end selection = if is_nil(optional_args[:experimental_service_host]) do selection else arg(selection, "experimentalServiceHost", optional_args[:experimental_service_host]) end %Dagger.GitRepository{selection: selection, client: query.client} end ) ( @doc "Queries the host environment." @spec host(t()) :: Dagger.Host.t() def host(%__MODULE__{} = query) do selection = select(query.selection, "host") %Dagger.Host{selection: selection, client: query.client} end ) ( @doc "Returns a file containing an http remote url content.\n\n## Required Arguments\n\n* `url` - HTTP url to get the content from (e.g., \"https://docs.dagger.io\").\n\n## Optional Arguments\n\n* `experimental_service_host` - A service which must be started before the URL is fetched." @spec http(t(), Dagger.String.t(), keyword()) :: Dagger.File.t() def http(%__MODULE__{} = query, url, optional_args \\ []) do selection = select(query.selection, "http") selection = arg(selection, "url", url) selection = if is_nil(optional_args[:experimental_service_host]) do selection else arg(selection, "experimentalServiceHost", optional_args[:experimental_service_host]) end %Dagger.File{selection: selection, client: query.client} end ) ( @doc "Load a CacheVolume from its ID.\n\n## Required Arguments\n\n* `id` -" @spec load_cache_volume_from_id(t(), Dagger.CacheVolume.t()) :: Dagger.CacheVolume.t() def load_cache_volume_from_id(%__MODULE__{} = query, cache_volume) do selection = select(query.selection, "loadCacheVolumeFromID") ( {:ok, id} = Dagger.CacheVolume.id(cache_volume) selection = arg(selection, "id", id) ) %Dagger.CacheVolume{selection: selection, client: query.client} end ) ( @doc "Loads a container from an ID.\n\n## Required Arguments\n\n* `id` -" @spec load_container_from_id(t(), Dagger.Container.t()) :: Dagger.Container.t() def load_container_from_id(%__MODULE__{} = query, container) do selection = select(query.selection, "loadContainerFromID") ( {:ok, id} = Dagger.Container.id(container) selection = arg(selection, "id", id) ) %Dagger.Container{selection: selection, client: query.client} end ) ( @doc "Load a Directory from its ID.\n\n## Required Arguments\n\n* `id` -" @spec load_directory_from_id(t(), Dagger.Directory.t()) :: Dagger.Directory.t() def load_directory_from_id(%__MODULE__{} = query, directory) do selection = select(query.selection, "loadDirectoryFromID") ( {:ok, id} = Dagger.Directory.id(directory) selection = arg(selection, "id", id) ) %Dagger.Directory{selection: selection, client: query.client} end ) ( @doc "Load a File from its ID.\n\n## Required Arguments\n\n* `id` -" @spec load_file_from_id(t(), Dagger.File.t()) :: Dagger.File.t() def load_file_from_id(%__MODULE__{} = query, file) do selection = select(query.selection, "loadFileFromID") ( {:ok, id} = Dagger.File.id(file) selection = arg(selection, "id", id) ) %Dagger.File{selection: selection, client: query.client} end ) ( @doc "Load a function argument by ID.\n\n## Required Arguments\n\n* `id` -" @spec load_function_arg_from_id(t(), Dagger.FunctionArg.t()) :: Dagger.FunctionArg.t() def load_function_arg_from_id(%__MODULE__{} = query, id) do selection = select(query.selection, "loadFunctionArgFromID") selection = arg(selection, "id", id) %Dagger.FunctionArg{selection: selection, client: query.client} end ) ( @doc "Load a function by ID.\n\n## Required Arguments\n\n* `id` -" @spec load_function_from_id(t(), Dagger.Function.t()) :: Dagger.Function.t() def load_function_from_id(%__MODULE__{} = query, id) do selection = select(query.selection, "loadFunctionFromID") selection = arg(selection, "id", id) %Dagger.Function{selection: selection, client: query.client} end ) ( @doc "Load a GeneratedCode by ID.\n\n## Required Arguments\n\n* `id` -" @spec load_generated_code_from_id(t(), Dagger.GeneratedCode.t()) :: Dagger.GeneratedCode.t() def load_generated_code_from_id(%__MODULE__{} = query, id) do selection = select(query.selection, "loadGeneratedCodeFromID") selection = arg(selection, "id", id) %Dagger.GeneratedCode{selection: selection, client: query.client} end ) ( @doc "Load a module by ID.\n\n## Required Arguments\n\n* `id` -" @spec load_module_from_id(t(), Dagger.Module.t()) :: Dagger.Module.t() def load_module_from_id(%__MODULE__{} = query, id) do selection = select(query.selection, "loadModuleFromID") selection = arg(selection, "id", id) %Dagger.Module{selection: selection, client: query.client} end ) ( @doc "Load a Secret from its ID.\n\n## Required Arguments\n\n* `id` -" @spec load_secret_from_id(t(), Dagger.Secret.t()) :: Dagger.Secret.t() def load_secret_from_id(%__MODULE__{} = query, secret) do selection = select(query.selection, "loadSecretFromID") ( {:ok, id} = Dagger.Secret.id(secret) selection = arg(selection, "id", id) ) %Dagger.Secret{selection: selection, client: query.client} end ) ( @doc "Loads a service from ID.\n\n## Required Arguments\n\n* `id` -" @spec load_service_from_id(t(), Dagger.Service.t()) :: Dagger.Service.t() def load_service_from_id(%__MODULE__{} = query, id) do selection = select(query.selection, "loadServiceFromID") selection = arg(selection, "id", id) %Dagger.Service{selection: selection, client: query.client} end ) ( @doc "Load a Socket from its ID.\n\n## Required Arguments\n\n* `id` -" @spec load_socket_from_id(t(), Dagger.Socket.t()) :: Dagger.Socket.t() def load_socket_from_id(%__MODULE__{} = query, socket) do selection = select(query.selection, "loadSocketFromID") ( {:ok, id} = Dagger.Socket.id(socket) selection = arg(selection, "id", id) ) %Dagger.Socket{selection: selection, client: query.client} end ) ( @doc "Load a TypeDef by ID.\n\n## Required Arguments\n\n* `id` -" @spec load_type_def_from_id(t(), Dagger.TypeDef.t()) :: Dagger.TypeDef.t() def load_type_def_from_id(%__MODULE__{} = query, id) do selection = select(query.selection, "loadTypeDefFromID") selection = arg(selection, "id", id) %Dagger.TypeDef{selection: selection, client: query.client} end ) ( @doc "Create a new module." @spec module(t()) :: Dagger.Module.t() def module(%__MODULE__{} = query) do selection = select(query.selection, "module") %Dagger.Module{selection: selection, client: query.client} end ) ( @doc "Load the static configuration for a module from the given source directory and optional subpath.\n\n## Required Arguments\n\n* `source_directory` - \n\n## Optional Arguments\n\n* `subpath` -" @spec module_config(t(), Dagger.Directory.t(), keyword()) :: Dagger.ModuleConfig.t() def module_config(%__MODULE__{} = query, source_directory, optional_args \\ []) do selection = select(query.selection, "moduleConfig") ( {:ok, id} = Dagger.Directory.id(source_directory) selection = arg(selection, "sourceDirectory", id) ) selection = if is_nil(optional_args[:subpath]) do selection else arg(selection, "subpath", optional_args[:subpath]) end execute(selection, query.client) end ) ( @doc "Creates a named sub-pipeline.\n\n## Required Arguments\n\n* `name` - Pipeline name.\n\n## Optional Arguments\n\n* `description` - Pipeline description.\n* `labels` - Pipeline labels." @spec pipeline(t(), Dagger.String.t(), keyword()) :: Dagger.Client.t() def pipeline(%__MODULE__{} = query, name, optional_args \\ []) do selection = select(query.selection, "pipeline") selection = arg(selection, "name", name) selection = if is_nil(optional_args[:description]) do selection else arg(selection, "description", optional_args[:description]) end selection = if is_nil(optional_args[:labels]) do selection else arg(selection, "labels", optional_args[:labels]) end %Dagger.Client{selection: selection, client: query.client} end ) ( @doc "Loads a secret from its ID.\n\n## Required Arguments\n\n* `id` -" @deprecated "Use `load_secret_from_id` instead" @spec secret(t(), Dagger.SecretID.t()) :: Dagger.Secret.t() def secret(%__MODULE__{} = query, secret) do selection = select(query.selection, "secret") selection = arg(selection, "id", secret) %Dagger.Secret{selection: selection, client: query.client} end ) ( @doc "Sets a secret given a user defined name to its plaintext and returns the secret.\nThe plaintext value is limited to a size of 128000 bytes.\n\n## Required Arguments\n\n* `name` - The user defined name for this secret\n* `plaintext` - The plaintext of the secret" @spec set_secret(t(), Dagger.String.t(), Dagger.String.t()) :: Dagger.Secret.t() def set_secret(%__MODULE__{} = query, name, plaintext) do selection = select(query.selection, "setSecret") selection = arg(selection, "name", name) selection = arg(selection, "plaintext", plaintext) %Dagger.Secret{selection: selection, client: query.client} end ) ( @doc "Loads a socket by its ID.\n\n\n\n## Optional Arguments\n\n* `id` -" @deprecated "Use `load_socket_from_id` instead" @spec socket(t(), keyword()) :: Dagger.Socket.t() def socket(%__MODULE__{} = query, optional_args \\ []) do selection = select(query.selection, "socket") selection = if is_nil(optional_args[:id]) do selection else {:ok, id} = Dagger.Socket.id(optional_args[:id]) arg(selection, "id", id) end %Dagger.Socket{selection: selection, client: query.client} end ) ( @doc "Create a new TypeDef." @spec type_def(t()) :: Dagger.TypeDef.t() def type_def(%__MODULE__{} = query) do selection = select(query.selection, "typeDef") %Dagger.TypeDef{selection: selection, client: query.client} end ) end
closed
dagger/dagger
https://github.com/dagger/dagger
6,091
🐞 Service bindings don't work with Elixir SDK
### What is the issue? I've tried converting the NodeJS docker with postgres example into Elixir, but the `.with_service_binding` doesn't seem to work properly - an error is always thrown. If I remove the service binding the workflow completes ok (although the tests fail, because they need the database). My workflow is: ```elixir defmodule Mix.Tasks.ElixirWithDagger.Test do use Mix.Task @impl Mix.Task def run(_args) do Application.ensure_all_started(:dagger) client = Dagger.connect!() app = client |> Dagger.Client.host() |> Dagger.Host.directory(".", exclude: ["deps", "_build"]) database = client |> Dagger.Client.container() |> Dagger.Container.from("postgres:16") |> Dagger.Container.with_env_variable("POSTGRES_PASSWORD", "test") |> Dagger.Container.with_exec(~w"postgres") |> Dagger.Container.with_exposed_port(5432) |> Dagger.Container.as_service() {:ok, _} = client |> Dagger.Client.container() |> Dagger.Container.from("hexpm/elixir:1.15.7-erlang-26.1.2-debian-bullseye-20231009-slim") |> Dagger.Container.with_exec(~w"apt-get update") |> Dagger.Container.with_exec(~w"apt-get install -y build-essential git") |> Dagger.Container.with_exec(~w"apt-get clean") |> Dagger.Container.with_exec(~w"rm -f /var/lib/apt/lists/*_*") |> Dagger.Container.with_mounted_directory("/app", app) |> Dagger.Container.with_workdir("/app") |> Dagger.Container.with_exec(~w"mix local.hex --force") |> Dagger.Container.with_exec(~w"mix local.rebar --force") |> Dagger.Container.with_exec(~w"mix deps.get") |> Dagger.Container.with_service_binding("db", database) |> Dagger.Container.with_env_variable("DB_HOST", "db") |> Dagger.Container.with_env_variable("DB_USER", "postgres") |> Dagger.Container.with_env_variable("DB_PASSWORD", "test") |> Dagger.Container.with_env_variable("DB_NAME", "postgres") |> Dagger.Container.with_exec(~w"mix test") |> Dagger.Sync.sync() Dagger.close(client) IO.puts("Tests succeeded!") end end ``` ### Log output The output from the Dagger CLI is: ``` ┃ ** (Protocol.UndefinedError) protocol String.Chars not implemented for {:query_timeout, :infinity} of type Tuple. This protocol is implemented for the following type(s): Atom, B ┃ itString, Date, DateTime, Decimal, Float, Integer, List, NaiveDateTime, Phoenix.LiveComponent.CID, Postgrex.Copy, Postgrex.Query, Time, URI, Version, Version.Requirement ┃ (elixir 1.15.7) lib/string/chars.ex:3: String.Chars.impl_for!/1 ┃ (elixir 1.15.7) lib/string/chars.ex:22: String.Chars.to_string/1 ┃ (dagger 0.9.3) lib/dagger/query_builder.ex:82: Dagger.QueryBuilder.Selection.encode_value/1 ┃ (elixir 1.15.7) lib/enum.ex:1693: Enum."-map/2-lists^map/1-1-"/2 ┃ (dagger 0.9.3) lib/dagger/query_builder.ex:65: Dagger.QueryBuilder.Selection.encode_value/1 ┃ (dagger 0.9.3) lib/dagger/query_builder.ex:76: anonymous fn/1 in Dagger.QueryBuilder.Selection.encode_value/1 ┃ (elixir 1.15.7) lib/enum.ex:1701: anonymous fn/3 in Enum.map/2 ┃ (stdlib 5.0.2) maps.erl:416: :maps.fold_1/4 ``` ### Steps to reproduce Run the above workflow with `dagger run mix elixir_with_dagger.test` ### SDK version dagger v0.9.3 (registry.dagger.io/engine) darwin/arm64 ### OS version macOS
https://github.com/dagger/dagger/issues/6091
https://github.com/dagger/dagger/pull/6099
a6ba9e8016145ff3d19c25fba9247b4678ed3504
5989170918a9c365699bf020acc733445e3a7330
"2023-11-10T12:20:50Z"
go
"2023-11-22T07:51:17Z"
sdk/elixir/lib/dagger/gen/container.ex
# This file generated by `mix dagger.gen`. Please DO NOT EDIT. defmodule Dagger.Container do @moduledoc "An OCI-compatible container, also known as a docker container." use Dagger.QueryBuilder @type t() :: %__MODULE__{} @derive Dagger.Sync defstruct [:selection, :client] ( @doc "Turn the container into a Service.\n\nBe sure to set any exposed ports before this conversion." @spec as_service(t()) :: Dagger.Service.t() def as_service(%__MODULE__{} = container) do selection = select(container.selection, "asService") %Dagger.Service{selection: selection, client: container.client} end ) ( @doc "Returns a File representing the container serialized to a tarball.\n\n\n\n## Optional Arguments\n\n* `platform_variants` - Identifiers for other platform specific containers.\nUsed for multi-platform image.\n* `forced_compression` - Force each layer of the image to use the specified compression algorithm.\nIf this is unset, then if a layer already has a compressed blob in the engine's\ncache, that will be used (this can result in a mix of compression algorithms for\ndifferent layers). If this is unset and a layer has no compressed blob in the\nengine's cache, then it will be compressed using Gzip.\n* `media_types` - Use the specified media types for the image's layers. Defaults to OCI, which\nis largely compatible with most recent container runtimes, but Docker may be needed\nfor older runtimes without OCI support." @spec as_tarball(t(), keyword()) :: Dagger.File.t() def as_tarball(%__MODULE__{} = container, optional_args \\ []) do selection = select(container.selection, "asTarball") selection = if is_nil(optional_args[:platform_variants]) do selection else ids = optional_args[:platform_variants] |> Enum.map(fn value -> {:ok, id} = Dagger.Container.id(value) id end) arg(selection, "platformVariants", ids) end selection = if is_nil(optional_args[:forced_compression]) do selection else arg(selection, "forcedCompression", optional_args[:forced_compression]) end selection = if is_nil(optional_args[:media_types]) do selection else arg(selection, "mediaTypes", optional_args[:media_types]) end %Dagger.File{selection: selection, client: container.client} end ) ( @doc "Initializes this container from a Dockerfile build.\n\n## Required Arguments\n\n* `context` - Directory context used by the Dockerfile.\n\n## Optional Arguments\n\n* `dockerfile` - Path to the Dockerfile to use.\n\nDefault: './Dockerfile'.\n* `build_args` - Additional build arguments.\n* `target` - Target build stage to build.\n* `secrets` - Secrets to pass to the build.\n\nThey will be mounted at /run/secrets/[secret-name] in the build container\n\nThey can be accessed in the Dockerfile using the \"secret\" mount type\nand mount path /run/secrets/[secret-name]\ne.g. RUN --mount=type=secret,id=my-secret curl url?token=$(cat /run/secrets/my-secret)\"" @spec build(t(), Dagger.Directory.t(), keyword()) :: Dagger.Container.t() def build(%__MODULE__{} = container, context, optional_args \\ []) do selection = select(container.selection, "build") ( {:ok, id} = Dagger.Directory.id(context) selection = arg(selection, "context", id) ) selection = if is_nil(optional_args[:dockerfile]) do selection else arg(selection, "dockerfile", optional_args[:dockerfile]) end selection = if is_nil(optional_args[:build_args]) do selection else arg(selection, "buildArgs", optional_args[:build_args]) end selection = if is_nil(optional_args[:target]) do selection else arg(selection, "target", optional_args[:target]) end selection = if is_nil(optional_args[:secrets]) do selection else ids = optional_args[:secrets] |> Enum.map(fn value -> {:ok, id} = Dagger.Secret.id(value) id end) arg(selection, "secrets", ids) end %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Retrieves default arguments for future commands." @spec default_args(t()) :: {:ok, [Dagger.String.t()] | nil} | {:error, term()} def default_args(%__MODULE__{} = container) do selection = select(container.selection, "defaultArgs") execute(selection, container.client) end ) ( @doc "Retrieves a directory at the given path.\n\nMounts are included.\n\n## Required Arguments\n\n* `path` - The path of the directory to retrieve (e.g., \"./src\")." @spec directory(t(), Dagger.String.t()) :: Dagger.Directory.t() def directory(%__MODULE__{} = container, path) do selection = select(container.selection, "directory") selection = arg(selection, "path", path) %Dagger.Directory{selection: selection, client: container.client} end ) ( @doc "Retrieves entrypoint to be prepended to the arguments of all commands." @spec entrypoint(t()) :: {:ok, [Dagger.String.t()] | nil} | {:error, term()} def entrypoint(%__MODULE__{} = container) do selection = select(container.selection, "entrypoint") execute(selection, container.client) end ) ( @doc "Retrieves the value of the specified environment variable.\n\n## Required Arguments\n\n* `name` - The name of the environment variable to retrieve (e.g., \"PATH\")." @spec env_variable(t(), Dagger.String.t()) :: {:ok, Dagger.String.t() | nil} | {:error, term()} def env_variable(%__MODULE__{} = container, name) do selection = select(container.selection, "envVariable") selection = arg(selection, "name", name) execute(selection, container.client) end ) ( @doc "Retrieves the list of environment variables passed to commands." @spec env_variables(t()) :: {:ok, [Dagger.EnvVariable.t()]} | {:error, term()} def env_variables(%__MODULE__{} = container) do selection = select(container.selection, "envVariables") selection = select(selection, "name value") with {:ok, data} <- execute(selection, container.client) do Nestru.decode_from_list_of_maps(data, Dagger.EnvVariable) end end ) ( @doc "EXPERIMENTAL API! Subject to change/removal at any time.\n\nexperimentalWithAllGPUs configures all available GPUs on the host to be accessible to this container.\nThis currently works for Nvidia devices only." @spec experimental_with_all_gp_us(t()) :: Dagger.Container.t() def experimental_with_all_gp_us(%__MODULE__{} = container) do selection = select(container.selection, "experimentalWithAllGPUs") %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "EXPERIMENTAL API! Subject to change/removal at any time.\n\nexperimentalWithGPU configures the provided list of devices to be accesible to this container.\nThis currently works for Nvidia devices only.\n\n## Required Arguments\n\n* `devices` -" @spec experimental_with_gpu(t(), [Dagger.String.t()]) :: Dagger.Container.t() def experimental_with_gpu(%__MODULE__{} = container, devices) do selection = select(container.selection, "experimentalWithGPU") selection = arg(selection, "devices", devices) %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Writes the container as an OCI tarball to the destination file path on the host for the specified platform variants.\n\nReturn true on success.\nIt can also publishes platform variants.\n\n## Required Arguments\n\n* `path` - Host's destination path (e.g., \"./tarball\").\nPath can be relative to the engine's workdir or absolute.\n\n## Optional Arguments\n\n* `platform_variants` - Identifiers for other platform specific containers.\nUsed for multi-platform image.\n* `forced_compression` - Force each layer of the exported image to use the specified compression algorithm.\nIf this is unset, then if a layer already has a compressed blob in the engine's\ncache, that will be used (this can result in a mix of compression algorithms for\ndifferent layers). If this is unset and a layer has no compressed blob in the\nengine's cache, then it will be compressed using Gzip.\n* `media_types` - Use the specified media types for the exported image's layers. Defaults to OCI, which\nis largely compatible with most recent container runtimes, but Docker may be needed\nfor older runtimes without OCI support." @spec export(t(), Dagger.String.t(), keyword()) :: {:ok, Dagger.Boolean.t()} | {:error, term()} def export(%__MODULE__{} = container, path, optional_args \\ []) do selection = select(container.selection, "export") selection = arg(selection, "path", path) selection = if is_nil(optional_args[:platform_variants]) do selection else ids = optional_args[:platform_variants] |> Enum.map(fn value -> {:ok, id} = Dagger.Container.id(value) id end) arg(selection, "platformVariants", ids) end selection = if is_nil(optional_args[:forced_compression]) do selection else arg(selection, "forcedCompression", optional_args[:forced_compression]) end selection = if is_nil(optional_args[:media_types]) do selection else arg(selection, "mediaTypes", optional_args[:media_types]) end execute(selection, container.client) end ) ( @doc "Retrieves the list of exposed ports.\n\nThis includes ports already exposed by the image, even if not\nexplicitly added with dagger." @spec exposed_ports(t()) :: {:ok, [Dagger.Port.t()]} | {:error, term()} def exposed_ports(%__MODULE__{} = container) do selection = select(container.selection, "exposedPorts") selection = select(selection, "description port protocol") with {:ok, data} <- execute(selection, container.client) do Nestru.decode_from_list_of_maps(data, Dagger.Port) end end ) ( @doc "Retrieves a file at the given path.\n\nMounts are included.\n\n## Required Arguments\n\n* `path` - The path of the file to retrieve (e.g., \"./README.md\")." @spec file(t(), Dagger.String.t()) :: Dagger.File.t() def file(%__MODULE__{} = container, path) do selection = select(container.selection, "file") selection = arg(selection, "path", path) %Dagger.File{selection: selection, client: container.client} end ) ( @doc "Initializes this container from a pulled base image.\n\n## Required Arguments\n\n* `address` - Image's address from its registry.\n\nFormatted as [host]/[user]/[repo]:[tag] (e.g., \"docker.io/dagger/dagger:main\")." @spec from(t(), Dagger.String.t()) :: Dagger.Container.t() def from(%__MODULE__{} = container, address) do selection = select(container.selection, "from") selection = arg(selection, "address", address) %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "A unique identifier for this container." @spec id(t()) :: {:ok, Dagger.ContainerID.t()} | {:error, term()} def id(%__MODULE__{} = container) do selection = select(container.selection, "id") execute(selection, container.client) end ) ( @doc "The unique image reference which can only be retrieved immediately after the 'Container.From' call." @spec image_ref(t()) :: {:ok, Dagger.String.t() | nil} | {:error, term()} def image_ref(%__MODULE__{} = container) do selection = select(container.selection, "imageRef") execute(selection, container.client) end ) ( @doc "Reads the container from an OCI tarball.\n\nNOTE: this involves unpacking the tarball to an OCI store on the host at\n$XDG_CACHE_DIR/dagger/oci. This directory can be removed whenever you like.\n\n## Required Arguments\n\n* `source` - File to read the container from.\n\n## Optional Arguments\n\n* `tag` - Identifies the tag to import from the archive, if the archive bundles\nmultiple tags." @spec import(t(), Dagger.File.t(), keyword()) :: Dagger.Container.t() def import(%__MODULE__{} = container, source, optional_args \\ []) do selection = select(container.selection, "import") ( {:ok, id} = Dagger.File.id(source) selection = arg(selection, "source", id) ) selection = if is_nil(optional_args[:tag]) do selection else arg(selection, "tag", optional_args[:tag]) end %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Retrieves the value of the specified label.\n\n## Required Arguments\n\n* `name` -" @spec label(t(), Dagger.String.t()) :: {:ok, Dagger.String.t() | nil} | {:error, term()} def label(%__MODULE__{} = container, name) do selection = select(container.selection, "label") selection = arg(selection, "name", name) execute(selection, container.client) end ) ( @doc "Retrieves the list of labels passed to container." @spec labels(t()) :: {:ok, [Dagger.Label.t()]} | {:error, term()} def labels(%__MODULE__{} = container) do selection = select(container.selection, "labels") selection = select(selection, "name value") with {:ok, data} <- execute(selection, container.client) do Nestru.decode_from_list_of_maps(data, Dagger.Label) end end ) ( @doc "Retrieves the list of paths where a directory is mounted." @spec mounts(t()) :: {:ok, [Dagger.String.t()]} | {:error, term()} def mounts(%__MODULE__{} = container) do selection = select(container.selection, "mounts") execute(selection, container.client) end ) ( @doc "Creates a named sub-pipeline\n\n## Required Arguments\n\n* `name` - Pipeline name.\n\n## Optional Arguments\n\n* `description` - Pipeline description.\n* `labels` - Pipeline labels." @spec pipeline(t(), Dagger.String.t(), keyword()) :: Dagger.Container.t() def pipeline(%__MODULE__{} = container, name, optional_args \\ []) do selection = select(container.selection, "pipeline") selection = arg(selection, "name", name) selection = if is_nil(optional_args[:description]) do selection else arg(selection, "description", optional_args[:description]) end selection = if is_nil(optional_args[:labels]) do selection else arg(selection, "labels", optional_args[:labels]) end %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "The platform this container executes and publishes as." @spec platform(t()) :: {:ok, Dagger.Platform.t()} | {:error, term()} def platform(%__MODULE__{} = container) do selection = select(container.selection, "platform") execute(selection, container.client) end ) ( @doc "Publishes this container as a new image to the specified address.\n\nPublish returns a fully qualified ref.\nIt can also publish platform variants.\n\n## Required Arguments\n\n* `address` - Registry's address to publish the image to.\n\nFormatted as [host]/[user]/[repo]:[tag] (e.g. \"docker.io/dagger/dagger:main\").\n\n## Optional Arguments\n\n* `platform_variants` - Identifiers for other platform specific containers.\nUsed for multi-platform image.\n* `forced_compression` - Force each layer of the published image to use the specified compression algorithm.\nIf this is unset, then if a layer already has a compressed blob in the engine's\ncache, that will be used (this can result in a mix of compression algorithms for\ndifferent layers). If this is unset and a layer has no compressed blob in the\nengine's cache, then it will be compressed using Gzip.\n* `media_types` - Use the specified media types for the published image's layers. Defaults to OCI, which\nis largely compatible with most recent registries, but Docker may be needed for older\nregistries without OCI support." @spec publish(t(), Dagger.String.t(), keyword()) :: {:ok, Dagger.String.t()} | {:error, term()} def publish(%__MODULE__{} = container, address, optional_args \\ []) do selection = select(container.selection, "publish") selection = arg(selection, "address", address) selection = if is_nil(optional_args[:platform_variants]) do selection else ids = optional_args[:platform_variants] |> Enum.map(fn value -> {:ok, id} = Dagger.Container.id(value) id end) arg(selection, "platformVariants", ids) end selection = if is_nil(optional_args[:forced_compression]) do selection else arg(selection, "forcedCompression", optional_args[:forced_compression]) end selection = if is_nil(optional_args[:media_types]) do selection else arg(selection, "mediaTypes", optional_args[:media_types]) end execute(selection, container.client) end ) ( @doc "Retrieves this container's root filesystem. Mounts are not included." @spec rootfs(t()) :: Dagger.Directory.t() def rootfs(%__MODULE__{} = container) do selection = select(container.selection, "rootfs") %Dagger.Directory{selection: selection, client: container.client} end ) ( @doc "Return a websocket endpoint that, if connected to, will start the container with a TTY streamed\nover the websocket.\n\nPrimarily intended for internal use with the dagger CLI." @spec shell_endpoint(t()) :: {:ok, Dagger.String.t()} | {:error, term()} def shell_endpoint(%__MODULE__{} = container) do selection = select(container.selection, "shellEndpoint") execute(selection, container.client) end ) ( @doc "The error stream of the last executed command.\n\nWill execute default command if none is set, or error if there's no default." @spec stderr(t()) :: {:ok, Dagger.String.t()} | {:error, term()} def stderr(%__MODULE__{} = container) do selection = select(container.selection, "stderr") execute(selection, container.client) end ) ( @doc "The output stream of the last executed command.\n\nWill execute default command if none is set, or error if there's no default." @spec stdout(t()) :: {:ok, Dagger.String.t()} | {:error, term()} def stdout(%__MODULE__{} = container) do selection = select(container.selection, "stdout") execute(selection, container.client) end ) ( @doc "Forces evaluation of the pipeline in the engine.\n\nIt doesn't run the default command if no exec has been set." @spec sync(t()) :: {:ok, Dagger.ContainerID.t()} | {:error, term()} def sync(%__MODULE__{} = container) do selection = select(container.selection, "sync") execute(selection, container.client) end ) ( @doc "Retrieves the user to be set for all commands." @spec user(t()) :: {:ok, Dagger.String.t() | nil} | {:error, term()} def user(%__MODULE__{} = container) do selection = select(container.selection, "user") execute(selection, container.client) end ) ( @doc "Configures default arguments for future commands.\n\n\n\n## Optional Arguments\n\n* `args` - Arguments to prepend to future executions (e.g., [\"-v\", \"--no-cache\"])." @spec with_default_args(t(), keyword()) :: Dagger.Container.t() def with_default_args(%__MODULE__{} = container, optional_args \\ []) do selection = select(container.selection, "withDefaultArgs") selection = if is_nil(optional_args[:args]) do selection else arg(selection, "args", optional_args[:args]) end %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Retrieves this container plus a directory written at the given path.\n\n## Required Arguments\n\n* `path` - Location of the written directory (e.g., \"/tmp/directory\").\n* `directory` - Identifier of the directory to write\n\n## Optional Arguments\n\n* `exclude` - Patterns to exclude in the written directory (e.g., [\"node_modules/**\", \".gitignore\", \".git/\"]).\n* `include` - Patterns to include in the written directory (e.g., [\"*.go\", \"go.mod\", \"go.sum\"]).\n* `owner` - A user:group to set for the directory and its contents.\n\nThe user and group can either be an ID (1000:1000) or a name (foo:bar).\n\nIf the group is omitted, it defaults to the same as the user." @spec with_directory(t(), Dagger.String.t(), Dagger.Directory.t(), keyword()) :: Dagger.Container.t() def with_directory(%__MODULE__{} = container, path, directory, optional_args \\ []) do selection = select(container.selection, "withDirectory") selection = arg(selection, "path", path) ( {:ok, id} = Dagger.Directory.id(directory) selection = arg(selection, "directory", id) ) selection = if is_nil(optional_args[:exclude]) do selection else arg(selection, "exclude", optional_args[:exclude]) end selection = if is_nil(optional_args[:include]) do selection else arg(selection, "include", optional_args[:include]) end selection = if is_nil(optional_args[:owner]) do selection else arg(selection, "owner", optional_args[:owner]) end %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Retrieves this container but with a different command entrypoint.\n\n## Required Arguments\n\n* `args` - Entrypoint to use for future executions (e.g., [\"go\", \"run\"])." @spec with_entrypoint(t(), [Dagger.String.t()]) :: Dagger.Container.t() def with_entrypoint(%__MODULE__{} = container, args) do selection = select(container.selection, "withEntrypoint") selection = arg(selection, "args", args) %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Retrieves this container plus the given environment variable.\n\n## Required Arguments\n\n* `name` - The name of the environment variable (e.g., \"HOST\").\n* `value` - The value of the environment variable. (e.g., \"localhost\").\n\n## Optional Arguments\n\n* `expand` - Replace ${VAR} or $VAR in the value according to the current environment\nvariables defined in the container (e.g., \"/opt/bin:$PATH\")." @spec with_env_variable(t(), Dagger.String.t(), Dagger.String.t(), keyword()) :: Dagger.Container.t() def with_env_variable(%__MODULE__{} = container, name, value, optional_args \\ []) do selection = select(container.selection, "withEnvVariable") selection = arg(selection, "name", name) selection = arg(selection, "value", value) selection = if is_nil(optional_args[:expand]) do selection else arg(selection, "expand", optional_args[:expand]) end %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Retrieves this container after executing the specified command inside it.\n\n## Required Arguments\n\n* `args` - Command to run instead of the container's default command (e.g., [\"run\", \"main.go\"]).\n\nIf empty, the container's default command is used.\n\n## Optional Arguments\n\n* `skip_entrypoint` - If the container has an entrypoint, ignore it for args rather than using it to wrap them.\n* `stdin` - Content to write to the command's standard input before closing (e.g., \"Hello world\").\n* `redirect_stdout` - Redirect the command's standard output to a file in the container (e.g., \"/tmp/stdout\").\n* `redirect_stderr` - Redirect the command's standard error to a file in the container (e.g., \"/tmp/stderr\").\n* `experimental_privileged_nesting` - Provides dagger access to the executed command.\n\nDo not use this option unless you trust the command being executed.\nThe command being executed WILL BE GRANTED FULL ACCESS TO YOUR HOST FILESYSTEM.\n* `insecure_root_capabilities` - Execute the command with all root capabilities. This is similar to running a command\nwith \"sudo\" or executing `docker run` with the `--privileged` flag. Containerization\ndoes not provide any security guarantees when using this option. It should only be used\nwhen absolutely necessary and only with trusted commands." @spec with_exec(t(), [Dagger.String.t()], keyword()) :: Dagger.Container.t() def with_exec(%__MODULE__{} = container, args, optional_args \\ []) do selection = select(container.selection, "withExec") selection = arg(selection, "args", args) selection = if is_nil(optional_args[:skip_entrypoint]) do selection else arg(selection, "skipEntrypoint", optional_args[:skip_entrypoint]) end selection = if is_nil(optional_args[:stdin]) do selection else arg(selection, "stdin", optional_args[:stdin]) end selection = if is_nil(optional_args[:redirect_stdout]) do selection else arg(selection, "redirectStdout", optional_args[:redirect_stdout]) end selection = if is_nil(optional_args[:redirect_stderr]) do selection else arg(selection, "redirectStderr", optional_args[:redirect_stderr]) end selection = if is_nil(optional_args[:experimental_privileged_nesting]) do selection else arg( selection, "experimentalPrivilegedNesting", optional_args[:experimental_privileged_nesting] ) end selection = if is_nil(optional_args[:insecure_root_capabilities]) do selection else arg(selection, "insecureRootCapabilities", optional_args[:insecure_root_capabilities]) end %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Expose a network port.\n\nExposed ports serve two purposes:\n - For health checks and introspection, when running services\n - For setting the EXPOSE OCI field when publishing the container\n\n## Required Arguments\n\n* `port` - Port number to expose\n\n## Optional Arguments\n\n* `protocol` - Transport layer network protocol\n* `description` - Optional port description" @spec with_exposed_port(t(), Dagger.Int.t(), keyword()) :: Dagger.Container.t() def with_exposed_port(%__MODULE__{} = container, port, optional_args \\ []) do selection = select(container.selection, "withExposedPort") selection = arg(selection, "port", port) selection = if is_nil(optional_args[:protocol]) do selection else arg(selection, "protocol", optional_args[:protocol]) end selection = if is_nil(optional_args[:description]) do selection else arg(selection, "description", optional_args[:description]) end %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Retrieves this container plus the contents of the given file copied to the given path.\n\n## Required Arguments\n\n* `path` - Location of the copied file (e.g., \"/tmp/file.txt\").\n* `source` - Identifier of the file to copy.\n\n## Optional Arguments\n\n* `permissions` - Permission given to the copied file (e.g., 0600).\n\nDefault: 0644.\n* `owner` - A user:group to set for the file.\n\nThe user and group can either be an ID (1000:1000) or a name (foo:bar).\n\nIf the group is omitted, it defaults to the same as the user." @spec with_file(t(), Dagger.String.t(), Dagger.File.t(), keyword()) :: Dagger.Container.t() def with_file(%__MODULE__{} = container, path, source, optional_args \\ []) do selection = select(container.selection, "withFile") selection = arg(selection, "path", path) ( {:ok, id} = Dagger.File.id(source) selection = arg(selection, "source", id) ) selection = if is_nil(optional_args[:permissions]) do selection else arg(selection, "permissions", optional_args[:permissions]) end selection = if is_nil(optional_args[:owner]) do selection else arg(selection, "owner", optional_args[:owner]) end %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Indicate that subsequent operations should be featured more prominently in\nthe UI." @spec with_focus(t()) :: Dagger.Container.t() def with_focus(%__MODULE__{} = container) do selection = select(container.selection, "withFocus") %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Retrieves this container plus the given label.\n\n## Required Arguments\n\n* `name` - The name of the label (e.g., \"org.opencontainers.artifact.created\").\n* `value` - The value of the label (e.g., \"2023-01-01T00:00:00Z\")." @spec with_label(t(), Dagger.String.t(), Dagger.String.t()) :: Dagger.Container.t() def with_label(%__MODULE__{} = container, name, value) do selection = select(container.selection, "withLabel") selection = arg(selection, "name", name) selection = arg(selection, "value", value) %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Retrieves this container plus a cache volume mounted at the given path.\n\n## Required Arguments\n\n* `path` - Location of the cache directory (e.g., \"/cache/node_modules\").\n* `cache` - Identifier of the cache volume to mount.\n\n## Optional Arguments\n\n* `source` - Identifier of the directory to use as the cache volume's root.\n* `sharing` - Sharing mode of the cache volume.\n* `owner` - A user:group to set for the mounted cache directory.\n\nNote that this changes the ownership of the specified mount along with the\ninitial filesystem provided by source (if any). It does not have any effect\nif/when the cache has already been created.\n\nThe user and group can either be an ID (1000:1000) or a name (foo:bar).\n\nIf the group is omitted, it defaults to the same as the user." @spec with_mounted_cache(t(), Dagger.String.t(), Dagger.CacheVolume.t(), keyword()) :: Dagger.Container.t() def with_mounted_cache(%__MODULE__{} = container, path, cache, optional_args \\ []) do selection = select(container.selection, "withMountedCache") selection = arg(selection, "path", path) ( {:ok, id} = Dagger.CacheVolume.id(cache) selection = arg(selection, "cache", id) ) selection = if is_nil(optional_args[:source]) do selection else {:ok, id} = Dagger.Directory.id(optional_args[:source]) arg(selection, "source", id) end selection = if is_nil(optional_args[:sharing]) do selection else arg(selection, "sharing", optional_args[:sharing]) end selection = if is_nil(optional_args[:owner]) do selection else arg(selection, "owner", optional_args[:owner]) end %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Retrieves this container plus a directory mounted at the given path.\n\n## Required Arguments\n\n* `path` - Location of the mounted directory (e.g., \"/mnt/directory\").\n* `source` - Identifier of the mounted directory.\n\n## Optional Arguments\n\n* `owner` - A user:group to set for the mounted directory and its contents.\n\nThe user and group can either be an ID (1000:1000) or a name (foo:bar).\n\nIf the group is omitted, it defaults to the same as the user." @spec with_mounted_directory(t(), Dagger.String.t(), Dagger.Directory.t(), keyword()) :: Dagger.Container.t() def with_mounted_directory(%__MODULE__{} = container, path, source, optional_args \\ []) do selection = select(container.selection, "withMountedDirectory") selection = arg(selection, "path", path) ( {:ok, id} = Dagger.Directory.id(source) selection = arg(selection, "source", id) ) selection = if is_nil(optional_args[:owner]) do selection else arg(selection, "owner", optional_args[:owner]) end %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Retrieves this container plus a file mounted at the given path.\n\n## Required Arguments\n\n* `path` - Location of the mounted file (e.g., \"/tmp/file.txt\").\n* `source` - Identifier of the mounted file.\n\n## Optional Arguments\n\n* `owner` - A user or user:group to set for the mounted file.\n\nThe user and group can either be an ID (1000:1000) or a name (foo:bar).\n\nIf the group is omitted, it defaults to the same as the user." @spec with_mounted_file(t(), Dagger.String.t(), Dagger.File.t(), keyword()) :: Dagger.Container.t() def with_mounted_file(%__MODULE__{} = container, path, source, optional_args \\ []) do selection = select(container.selection, "withMountedFile") selection = arg(selection, "path", path) ( {:ok, id} = Dagger.File.id(source) selection = arg(selection, "source", id) ) selection = if is_nil(optional_args[:owner]) do selection else arg(selection, "owner", optional_args[:owner]) end %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Retrieves this container plus a secret mounted into a file at the given path.\n\n## Required Arguments\n\n* `path` - Location of the secret file (e.g., \"/tmp/secret.txt\").\n* `source` - Identifier of the secret to mount.\n\n## Optional Arguments\n\n* `owner` - A user:group to set for the mounted secret.\n\nThe user and group can either be an ID (1000:1000) or a name (foo:bar).\n\nIf the group is omitted, it defaults to the same as the user.\n* `mode` - Permission given to the mounted secret (e.g., 0600).\nThis option requires an owner to be set to be active.\n\nDefault: 0400." @spec with_mounted_secret(t(), Dagger.String.t(), Dagger.Secret.t(), keyword()) :: Dagger.Container.t() def with_mounted_secret(%__MODULE__{} = container, path, source, optional_args \\ []) do selection = select(container.selection, "withMountedSecret") selection = arg(selection, "path", path) ( {:ok, id} = Dagger.Secret.id(source) selection = arg(selection, "source", id) ) selection = if is_nil(optional_args[:owner]) do selection else arg(selection, "owner", optional_args[:owner]) end selection = if is_nil(optional_args[:mode]) do selection else arg(selection, "mode", optional_args[:mode]) end %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Retrieves this container plus a temporary directory mounted at the given path.\n\n## Required Arguments\n\n* `path` - Location of the temporary directory (e.g., \"/tmp/temp_dir\")." @spec with_mounted_temp(t(), Dagger.String.t()) :: Dagger.Container.t() def with_mounted_temp(%__MODULE__{} = container, path) do selection = select(container.selection, "withMountedTemp") selection = arg(selection, "path", path) %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Retrieves this container plus a new file written at the given path.\n\n## Required Arguments\n\n* `path` - Location of the written file (e.g., \"/tmp/file.txt\").\n\n## Optional Arguments\n\n* `contents` - Content of the file to write (e.g., \"Hello world!\").\n* `permissions` - Permission given to the written file (e.g., 0600).\n\nDefault: 0644.\n* `owner` - A user:group to set for the file.\n\nThe user and group can either be an ID (1000:1000) or a name (foo:bar).\n\nIf the group is omitted, it defaults to the same as the user." @spec with_new_file(t(), Dagger.String.t(), keyword()) :: Dagger.Container.t() def with_new_file(%__MODULE__{} = container, path, optional_args \\ []) do selection = select(container.selection, "withNewFile") selection = arg(selection, "path", path) selection = if is_nil(optional_args[:contents]) do selection else arg(selection, "contents", optional_args[:contents]) end selection = if is_nil(optional_args[:permissions]) do selection else arg(selection, "permissions", optional_args[:permissions]) end selection = if is_nil(optional_args[:owner]) do selection else arg(selection, "owner", optional_args[:owner]) end %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Retrieves this container with a registry authentication for a given address.\n\n## Required Arguments\n\n* `address` - Registry's address to bind the authentication to.\nFormatted as [host]/[user]/[repo]:[tag] (e.g. docker.io/dagger/dagger:main).\n* `username` - The username of the registry's account (e.g., \"Dagger\").\n* `secret` - The API key, password or token to authenticate to this registry." @spec with_registry_auth(t(), Dagger.String.t(), Dagger.String.t(), Dagger.Secret.t()) :: Dagger.Container.t() def with_registry_auth(%__MODULE__{} = container, address, username, secret) do selection = select(container.selection, "withRegistryAuth") selection = arg(selection, "address", address) selection = arg(selection, "username", username) ( {:ok, id} = Dagger.Secret.id(secret) selection = arg(selection, "secret", id) ) %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Initializes this container from this DirectoryID.\n\n## Required Arguments\n\n* `directory` -" @spec with_rootfs(t(), Dagger.Directory.t()) :: Dagger.Container.t() def with_rootfs(%__MODULE__{} = container, directory) do selection = select(container.selection, "withRootfs") ( {:ok, id} = Dagger.Directory.id(directory) selection = arg(selection, "directory", id) ) %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Retrieves this container plus an env variable containing the given secret.\n\n## Required Arguments\n\n* `name` - The name of the secret variable (e.g., \"API_SECRET\").\n* `secret` - The identifier of the secret value." @spec with_secret_variable(t(), Dagger.String.t(), Dagger.Secret.t()) :: Dagger.Container.t() def with_secret_variable(%__MODULE__{} = container, name, secret) do selection = select(container.selection, "withSecretVariable") selection = arg(selection, "name", name) ( {:ok, id} = Dagger.Secret.id(secret) selection = arg(selection, "secret", id) ) %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Establish a runtime dependency on a service.\n\nThe service will be started automatically when needed and detached when it is\nno longer needed, executing the default command if none is set.\n\nThe service will be reachable from the container via the provided hostname alias.\n\nThe service dependency will also convey to any files or directories produced by the container.\n\n## Required Arguments\n\n* `alias` - A name that can be used to reach the service from the container\n* `service` - Identifier of the service container" @spec with_service_binding(t(), Dagger.String.t(), Dagger.Service.t()) :: Dagger.Container.t() def with_service_binding(%__MODULE__{} = container, alias, service) do selection = select(container.selection, "withServiceBinding") selection = arg(selection, "alias", alias) selection = arg(selection, "service", service) %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Retrieves this container plus a socket forwarded to the given Unix socket path.\n\n## Required Arguments\n\n* `path` - Location of the forwarded Unix socket (e.g., \"/tmp/socket\").\n* `source` - Identifier of the socket to forward.\n\n## Optional Arguments\n\n* `owner` - A user:group to set for the mounted socket.\n\nThe user and group can either be an ID (1000:1000) or a name (foo:bar).\n\nIf the group is omitted, it defaults to the same as the user." @spec with_unix_socket(t(), Dagger.String.t(), Dagger.Socket.t(), keyword()) :: Dagger.Container.t() def with_unix_socket(%__MODULE__{} = container, path, source, optional_args \\ []) do selection = select(container.selection, "withUnixSocket") selection = arg(selection, "path", path) ( {:ok, id} = Dagger.Socket.id(source) selection = arg(selection, "source", id) ) selection = if is_nil(optional_args[:owner]) do selection else arg(selection, "owner", optional_args[:owner]) end %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Retrieves this container with a different command user.\n\n## Required Arguments\n\n* `name` - The user to set (e.g., \"root\")." @spec with_user(t(), Dagger.String.t()) :: Dagger.Container.t() def with_user(%__MODULE__{} = container, name) do selection = select(container.selection, "withUser") selection = arg(selection, "name", name) %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Retrieves this container with a different working directory.\n\n## Required Arguments\n\n* `path` - The path to set as the working directory (e.g., \"/app\")." @spec with_workdir(t(), Dagger.String.t()) :: Dagger.Container.t() def with_workdir(%__MODULE__{} = container, path) do selection = select(container.selection, "withWorkdir") selection = arg(selection, "path", path) %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Retrieves this container minus the given environment variable.\n\n## Required Arguments\n\n* `name` - The name of the environment variable (e.g., \"HOST\")." @spec without_env_variable(t(), Dagger.String.t()) :: Dagger.Container.t() def without_env_variable(%__MODULE__{} = container, name) do selection = select(container.selection, "withoutEnvVariable") selection = arg(selection, "name", name) %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Unexpose a previously exposed port.\n\n## Required Arguments\n\n* `port` - Port number to unexpose\n\n## Optional Arguments\n\n* `protocol` - Port protocol to unexpose" @spec without_exposed_port(t(), Dagger.Int.t(), keyword()) :: Dagger.Container.t() def without_exposed_port(%__MODULE__{} = container, port, optional_args \\ []) do selection = select(container.selection, "withoutExposedPort") selection = arg(selection, "port", port) selection = if is_nil(optional_args[:protocol]) do selection else arg(selection, "protocol", optional_args[:protocol]) end %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Indicate that subsequent operations should not be featured more prominently\nin the UI.\n\nThis is the initial state of all containers." @spec without_focus(t()) :: Dagger.Container.t() def without_focus(%__MODULE__{} = container) do selection = select(container.selection, "withoutFocus") %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Retrieves this container minus the given environment label.\n\n## Required Arguments\n\n* `name` - The name of the label to remove (e.g., \"org.opencontainers.artifact.created\")." @spec without_label(t(), Dagger.String.t()) :: Dagger.Container.t() def without_label(%__MODULE__{} = container, name) do selection = select(container.selection, "withoutLabel") selection = arg(selection, "name", name) %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Retrieves this container after unmounting everything at the given path.\n\n## Required Arguments\n\n* `path` - Location of the cache directory (e.g., \"/cache/node_modules\")." @spec without_mount(t(), Dagger.String.t()) :: Dagger.Container.t() def without_mount(%__MODULE__{} = container, path) do selection = select(container.selection, "withoutMount") selection = arg(selection, "path", path) %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Retrieves this container without the registry authentication of a given address.\n\n## Required Arguments\n\n* `address` - Registry's address to remove the authentication from.\nFormatted as [host]/[user]/[repo]:[tag] (e.g. docker.io/dagger/dagger:main)." @spec without_registry_auth(t(), Dagger.String.t()) :: Dagger.Container.t() def without_registry_auth(%__MODULE__{} = container, address) do selection = select(container.selection, "withoutRegistryAuth") selection = arg(selection, "address", address) %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Retrieves this container with a previously added Unix socket removed.\n\n## Required Arguments\n\n* `path` - Location of the socket to remove (e.g., \"/tmp/socket\")." @spec without_unix_socket(t(), Dagger.String.t()) :: Dagger.Container.t() def without_unix_socket(%__MODULE__{} = container, path) do selection = select(container.selection, "withoutUnixSocket") selection = arg(selection, "path", path) %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Retrieves the working directory for all commands." @spec workdir(t()) :: {:ok, Dagger.String.t() | nil} | {:error, term()} def workdir(%__MODULE__{} = container) do selection = select(container.selection, "workdir") execute(selection, container.client) end ) end
closed
dagger/dagger
https://github.com/dagger/dagger
6,091
🐞 Service bindings don't work with Elixir SDK
### What is the issue? I've tried converting the NodeJS docker with postgres example into Elixir, but the `.with_service_binding` doesn't seem to work properly - an error is always thrown. If I remove the service binding the workflow completes ok (although the tests fail, because they need the database). My workflow is: ```elixir defmodule Mix.Tasks.ElixirWithDagger.Test do use Mix.Task @impl Mix.Task def run(_args) do Application.ensure_all_started(:dagger) client = Dagger.connect!() app = client |> Dagger.Client.host() |> Dagger.Host.directory(".", exclude: ["deps", "_build"]) database = client |> Dagger.Client.container() |> Dagger.Container.from("postgres:16") |> Dagger.Container.with_env_variable("POSTGRES_PASSWORD", "test") |> Dagger.Container.with_exec(~w"postgres") |> Dagger.Container.with_exposed_port(5432) |> Dagger.Container.as_service() {:ok, _} = client |> Dagger.Client.container() |> Dagger.Container.from("hexpm/elixir:1.15.7-erlang-26.1.2-debian-bullseye-20231009-slim") |> Dagger.Container.with_exec(~w"apt-get update") |> Dagger.Container.with_exec(~w"apt-get install -y build-essential git") |> Dagger.Container.with_exec(~w"apt-get clean") |> Dagger.Container.with_exec(~w"rm -f /var/lib/apt/lists/*_*") |> Dagger.Container.with_mounted_directory("/app", app) |> Dagger.Container.with_workdir("/app") |> Dagger.Container.with_exec(~w"mix local.hex --force") |> Dagger.Container.with_exec(~w"mix local.rebar --force") |> Dagger.Container.with_exec(~w"mix deps.get") |> Dagger.Container.with_service_binding("db", database) |> Dagger.Container.with_env_variable("DB_HOST", "db") |> Dagger.Container.with_env_variable("DB_USER", "postgres") |> Dagger.Container.with_env_variable("DB_PASSWORD", "test") |> Dagger.Container.with_env_variable("DB_NAME", "postgres") |> Dagger.Container.with_exec(~w"mix test") |> Dagger.Sync.sync() Dagger.close(client) IO.puts("Tests succeeded!") end end ``` ### Log output The output from the Dagger CLI is: ``` ┃ ** (Protocol.UndefinedError) protocol String.Chars not implemented for {:query_timeout, :infinity} of type Tuple. This protocol is implemented for the following type(s): Atom, B ┃ itString, Date, DateTime, Decimal, Float, Integer, List, NaiveDateTime, Phoenix.LiveComponent.CID, Postgrex.Copy, Postgrex.Query, Time, URI, Version, Version.Requirement ┃ (elixir 1.15.7) lib/string/chars.ex:3: String.Chars.impl_for!/1 ┃ (elixir 1.15.7) lib/string/chars.ex:22: String.Chars.to_string/1 ┃ (dagger 0.9.3) lib/dagger/query_builder.ex:82: Dagger.QueryBuilder.Selection.encode_value/1 ┃ (elixir 1.15.7) lib/enum.ex:1693: Enum."-map/2-lists^map/1-1-"/2 ┃ (dagger 0.9.3) lib/dagger/query_builder.ex:65: Dagger.QueryBuilder.Selection.encode_value/1 ┃ (dagger 0.9.3) lib/dagger/query_builder.ex:76: anonymous fn/1 in Dagger.QueryBuilder.Selection.encode_value/1 ┃ (elixir 1.15.7) lib/enum.ex:1701: anonymous fn/3 in Enum.map/2 ┃ (stdlib 5.0.2) maps.erl:416: :maps.fold_1/4 ``` ### Steps to reproduce Run the above workflow with `dagger run mix elixir_with_dagger.test` ### SDK version dagger v0.9.3 (registry.dagger.io/engine) darwin/arm64 ### OS version macOS
https://github.com/dagger/dagger/issues/6091
https://github.com/dagger/dagger/pull/6099
a6ba9e8016145ff3d19c25fba9247b4678ed3504
5989170918a9c365699bf020acc733445e3a7330
"2023-11-10T12:20:50Z"
go
"2023-11-22T07:51:17Z"
sdk/elixir/lib/dagger/gen/host.ex
# This file generated by `mix dagger.gen`. Please DO NOT EDIT. defmodule Dagger.Host do @moduledoc "Information about the host execution environment." use Dagger.QueryBuilder @type t() :: %__MODULE__{} defstruct [:selection, :client] ( @doc "Accesses a directory on the host.\n\n## Required Arguments\n\n* `path` - Location of the directory to access (e.g., \".\").\n\n## Optional Arguments\n\n* `exclude` - Exclude artifacts that match the given pattern (e.g., [\"node_modules/\", \".git*\"]).\n* `include` - Include only artifacts that match the given pattern (e.g., [\"app/\", \"package.*\"])." @spec directory(t(), Dagger.String.t(), keyword()) :: Dagger.Directory.t() def directory(%__MODULE__{} = host, path, optional_args \\ []) do selection = select(host.selection, "directory") selection = arg(selection, "path", path) selection = if is_nil(optional_args[:exclude]) do selection else arg(selection, "exclude", optional_args[:exclude]) end selection = if is_nil(optional_args[:include]) do selection else arg(selection, "include", optional_args[:include]) end %Dagger.Directory{selection: selection, client: host.client} end ) ( @doc "Accesses a file on the host.\n\n## Required Arguments\n\n* `path` - Location of the file to retrieve (e.g., \"README.md\")." @spec file(t(), Dagger.String.t()) :: Dagger.File.t() def file(%__MODULE__{} = host, path) do selection = select(host.selection, "file") selection = arg(selection, "path", path) %Dagger.File{selection: selection, client: host.client} end ) ( @doc "Creates a service that forwards traffic to a specified address via the host.\n\n## Required Arguments\n\n* `ports` - Ports to expose via the service, forwarding through the host network.\n\nIf a port's frontend is unspecified or 0, it defaults to the same as the\nbackend port.\n\nAn empty set of ports is not valid; an error will be returned.\n\n## Optional Arguments\n\n* `host` - Upstream host to forward traffic to." @spec service(t(), [Dagger.PortForward.t()], keyword()) :: Dagger.Service.t() def service(%__MODULE__{} = host, ports, optional_args \\ []) do selection = select(host.selection, "service") selection = arg(selection, "ports", ports) selection = if is_nil(optional_args[:host]) do selection else arg(selection, "host", optional_args[:host]) end %Dagger.Service{selection: selection, client: host.client} end ) ( @doc "Sets a secret given a user-defined name and the file path on the host, and returns the secret.\nThe file is limited to a size of 512000 bytes.\n\n## Required Arguments\n\n* `name` - The user defined name for this secret.\n* `path` - Location of the file to set as a secret." @spec set_secret_file(t(), Dagger.String.t(), Dagger.String.t()) :: Dagger.Secret.t() def set_secret_file(%__MODULE__{} = host, name, path) do selection = select(host.selection, "setSecretFile") selection = arg(selection, "name", name) selection = arg(selection, "path", path) %Dagger.Secret{selection: selection, client: host.client} end ) ( @doc "Creates a tunnel that forwards traffic from the host to a service.\n\n## Required Arguments\n\n* `service` - Service to send traffic from the tunnel.\n\n## Optional Arguments\n\n* `native` - Map each service port to the same port on the host, as if the service were\nrunning natively.\n\nNote: enabling may result in port conflicts.\n* `ports` - Configure explicit port forwarding rules for the tunnel.\n\nIf a port's frontend is unspecified or 0, a random port will be chosen by\nthe host.\n\nIf no ports are given, all of the service's ports are forwarded. If native\nis true, each port maps to the same port on the host. If native is false,\neach port maps to a random port chosen by the host.\n\nIf ports are given and native is true, the ports are additive." @spec tunnel(t(), Dagger.Service.t(), keyword()) :: Dagger.Service.t() def tunnel(%__MODULE__{} = host, service, optional_args \\ []) do selection = select(host.selection, "tunnel") selection = arg(selection, "service", service) selection = if is_nil(optional_args[:native]) do selection else arg(selection, "native", optional_args[:native]) end selection = if is_nil(optional_args[:ports]) do selection else arg(selection, "ports", optional_args[:ports]) end %Dagger.Service{selection: selection, client: host.client} end ) ( @doc "Accesses a Unix socket on the host.\n\n## Required Arguments\n\n* `path` - Location of the Unix socket (e.g., \"/var/run/docker.sock\")." @spec unix_socket(t(), Dagger.String.t()) :: Dagger.Socket.t() def unix_socket(%__MODULE__{} = host, path) do selection = select(host.selection, "unixSocket") selection = arg(selection, "path", path) %Dagger.Socket{selection: selection, client: host.client} end ) end
closed
dagger/dagger
https://github.com/dagger/dagger
6,091
🐞 Service bindings don't work with Elixir SDK
### What is the issue? I've tried converting the NodeJS docker with postgres example into Elixir, but the `.with_service_binding` doesn't seem to work properly - an error is always thrown. If I remove the service binding the workflow completes ok (although the tests fail, because they need the database). My workflow is: ```elixir defmodule Mix.Tasks.ElixirWithDagger.Test do use Mix.Task @impl Mix.Task def run(_args) do Application.ensure_all_started(:dagger) client = Dagger.connect!() app = client |> Dagger.Client.host() |> Dagger.Host.directory(".", exclude: ["deps", "_build"]) database = client |> Dagger.Client.container() |> Dagger.Container.from("postgres:16") |> Dagger.Container.with_env_variable("POSTGRES_PASSWORD", "test") |> Dagger.Container.with_exec(~w"postgres") |> Dagger.Container.with_exposed_port(5432) |> Dagger.Container.as_service() {:ok, _} = client |> Dagger.Client.container() |> Dagger.Container.from("hexpm/elixir:1.15.7-erlang-26.1.2-debian-bullseye-20231009-slim") |> Dagger.Container.with_exec(~w"apt-get update") |> Dagger.Container.with_exec(~w"apt-get install -y build-essential git") |> Dagger.Container.with_exec(~w"apt-get clean") |> Dagger.Container.with_exec(~w"rm -f /var/lib/apt/lists/*_*") |> Dagger.Container.with_mounted_directory("/app", app) |> Dagger.Container.with_workdir("/app") |> Dagger.Container.with_exec(~w"mix local.hex --force") |> Dagger.Container.with_exec(~w"mix local.rebar --force") |> Dagger.Container.with_exec(~w"mix deps.get") |> Dagger.Container.with_service_binding("db", database) |> Dagger.Container.with_env_variable("DB_HOST", "db") |> Dagger.Container.with_env_variable("DB_USER", "postgres") |> Dagger.Container.with_env_variable("DB_PASSWORD", "test") |> Dagger.Container.with_env_variable("DB_NAME", "postgres") |> Dagger.Container.with_exec(~w"mix test") |> Dagger.Sync.sync() Dagger.close(client) IO.puts("Tests succeeded!") end end ``` ### Log output The output from the Dagger CLI is: ``` ┃ ** (Protocol.UndefinedError) protocol String.Chars not implemented for {:query_timeout, :infinity} of type Tuple. This protocol is implemented for the following type(s): Atom, B ┃ itString, Date, DateTime, Decimal, Float, Integer, List, NaiveDateTime, Phoenix.LiveComponent.CID, Postgrex.Copy, Postgrex.Query, Time, URI, Version, Version.Requirement ┃ (elixir 1.15.7) lib/string/chars.ex:3: String.Chars.impl_for!/1 ┃ (elixir 1.15.7) lib/string/chars.ex:22: String.Chars.to_string/1 ┃ (dagger 0.9.3) lib/dagger/query_builder.ex:82: Dagger.QueryBuilder.Selection.encode_value/1 ┃ (elixir 1.15.7) lib/enum.ex:1693: Enum."-map/2-lists^map/1-1-"/2 ┃ (dagger 0.9.3) lib/dagger/query_builder.ex:65: Dagger.QueryBuilder.Selection.encode_value/1 ┃ (dagger 0.9.3) lib/dagger/query_builder.ex:76: anonymous fn/1 in Dagger.QueryBuilder.Selection.encode_value/1 ┃ (elixir 1.15.7) lib/enum.ex:1701: anonymous fn/3 in Enum.map/2 ┃ (stdlib 5.0.2) maps.erl:416: :maps.fold_1/4 ``` ### Steps to reproduce Run the above workflow with `dagger run mix elixir_with_dagger.test` ### SDK version dagger v0.9.3 (registry.dagger.io/engine) darwin/arm64 ### OS version macOS
https://github.com/dagger/dagger/issues/6091
https://github.com/dagger/dagger/pull/6099
a6ba9e8016145ff3d19c25fba9247b4678ed3504
5989170918a9c365699bf020acc733445e3a7330
"2023-11-10T12:20:50Z"
go
"2023-11-22T07:51:17Z"
sdk/elixir/test/dagger/client_test.exs
defmodule Dagger.ClientTest do use ExUnit.Case, async: true alias Dagger.{ BuildArg, Client, Container, Directory, EnvVariable, File, GitRef, GitRepository, Host, QueryError, Secret, Sync } setup do client = Dagger.connect!() on_exit(fn -> Dagger.close(client) end) %{client: client} end test "container", %{client: client} do assert {:ok, version} = client |> Client.container() |> Container.from("alpine:3.16.2") |> Container.with_exec(["cat", "/etc/alpine-release"]) |> Container.stdout() assert version == "3.16.2\n" end test "git_repository", %{client: client} do assert {:ok, readme} = client |> Client.git("https://github.com/dagger/dagger") |> GitRepository.tag("v0.3.0") |> GitRef.tree() |> Directory.file("README.md") |> File.contents() assert ["## What is Dagger?" | _] = String.split(readme, "\n") end test "container build", %{client: client} do repo = client |> Client.git("https://github.com/dagger/dagger") |> GitRepository.tag("v0.3.0") |> GitRef.tree() assert {:ok, out} = client |> Client.container() |> Container.build(repo) |> Container.with_exec(["version"]) |> Container.stdout() assert ["dagger" | _] = out |> String.trim() |> String.split(" ") end test "container build args", %{client: client} do dockerfile = """ FROM alpine:3.16.2 ARG SPAM=spam ENV SPAM=$SPAM CMD printenv """ assert {:ok, out} = client |> Client.container() |> Container.build( client |> Client.directory() |> Directory.with_new_file("Dockerfile", dockerfile), build_args: [%BuildArg{name: "SPAM", value: "egg"}] ) |> Container.stdout() assert out =~ "SPAM=egg" end test "container with env variable", %{client: client} do for val <- ["spam", ""] do assert {:ok, out} = client |> Client.container() |> Container.from("alpine:3.16.2") |> Container.with_env_variable("FOO", val) |> Container.with_exec(["sh", "-c", "echo -n $FOO"]) |> Container.stdout() assert out == val end end test "container with mounted directory", %{client: client} do dir = client |> Client.directory() |> Directory.with_new_file("hello.txt", "Hello, world!") |> Directory.with_new_file("goodbye.txt", "Goodbye, world!") assert {:ok, out} = client |> Client.container() |> Container.from("alpine:3.16.2") |> Container.with_mounted_directory("/mnt", dir) |> Container.with_exec(["ls", "/mnt"]) |> Container.stdout() assert out == """ goodbye.txt hello.txt """ end test "container with mounted cache", %{client: client} do cache_key = "example-cache" filename = DateTime.utc_now() |> Calendar.strftime("%Y-%m-%d-%H-%M-%S") container = client |> Client.container() |> Container.from("alpine:3.16.2") |> Container.with_mounted_cache("/cache", Client.cache_volume(client, cache_key)) out = for i <- 1..5 do container |> Container.with_exec([ "sh", "-c", "echo $0 >> /cache/#{filename}.txt; cat /cache/#{filename}.txt", to_string(i) ]) |> Container.stdout() end assert [ {:ok, "1\n"}, {:ok, "1\n2\n"}, {:ok, "1\n2\n3\n"}, {:ok, "1\n2\n3\n4\n"}, {:ok, "1\n2\n3\n4\n5\n"} ] = out end test "directory", %{client: client} do {:ok, entries} = client |> Client.directory() |> Directory.with_new_file("hello.txt", "Hello, world!") |> Directory.with_new_file("goodbye.txt", "Goodbye, world!") |> Directory.entries() assert entries == ["goodbye.txt", "hello.txt"] end test "host directory", %{client: client} do assert {:ok, readme} = client |> Client.host() |> Host.directory(".") |> Directory.file("README.md") |> File.contents() assert readme =~ "Dagger" end test "return list of objects", %{client: client} do assert {:ok, envs} = client |> Client.container() |> Container.from("alpine:3.16.2") |> Container.env_variables() assert [%EnvVariable{name: "PATH"}] = envs end test "nullable", %{client: client} do assert {:ok, nil} = client |> Client.container() |> Container.from("alpine:3.16.2") |> Container.env_variable("NOTHING") end test "load file", %{client: client} do {:ok, id} = client |> Client.directory() |> Directory.with_new_file("hello.txt", "Hello, world!") |> Directory.file("hello.txt") |> File.id() assert {:ok, "Hello, world!"} = client |> Client.file(id) |> File.contents() end test "load secret", %{client: client} do {:ok, id} = client |> Client.set_secret("foo", "bar") |> Secret.id() assert {:ok, "bar"} = client |> Client.secret(id) |> Secret.plaintext() end test "container sync", %{client: client} do container = client |> Client.container() |> Container.from("alpine:3.16.2") assert {:error, %QueryError{}} = container |> Container.with_exec(["foobar"]) |> Sync.sync() assert {:ok, %Container{} = container} = container |> Container.with_exec(["echo", "spam"]) |> Sync.sync() assert {:ok, "spam\n"} = Container.stdout(container) end test "calling id before passing constructing arg", %{client: client} do dockerfile = """ FROM alpine RUN --mount=type=secret,id=the-secret echo "hello ${THE_SECRET}" """ Elixir.File.write!("Dockerfile", dockerfile) secret = client |> Client.set_secret("the-secret", "abcd") assert {:ok, _} = client |> Client.host() |> Host.directory(".") |> Directory.docker_build(dockerfile: "Dockerfile", secrets: [secret]) |> Sync.sync() Elixir.File.rm_rf!("Dockerfile") container = Client.container(client) assert %Container{} = Client.container(client, id: container) end test "env variable expand", %{client: client} do {:ok, env} = client |> Client.container() |> Container.from("alpine:3.16.2") |> Container.with_env_variable("A", "B") |> Container.with_env_variable("A", "C:${A}", expand: true) |> Container.env_variable("A") assert env == "C:B" end end
closed
dagger/dagger
https://github.com/dagger/dagger
6,162
Go SDK Modules: enable general type annotation support via comments
Discord discussion: https://discord.com/channels/707636530424053791/1177373379255349248 As we need to add more support in Go for things like marking a field as private, setting default values, etc. The most obvious option was to require use of structs (including the `Opts` struct idea, the "inline anonymous struct for args", etc.) and annotate more information via struct tags. However, after discussion we realized a better general solution would be to not rely on struct tags but instead add support for the equivalent functionality via specially formatted comments. The reasoning being that: 1. Struct tags are essentially just glorified comments (strings that get interpreted by reflection/ast parsing), so there's not much of a practical difference in that respect 2. Comments are more general in that they can be applied equivalently not only to fields of a struct but also to function args (similar to how we support doc strings on args today), functions as a whole, structs as a whole, etc. There's prior art for this: 1. Go's support for pragmas: https://dave.cheney.net/2018/01/08/gos-hidden-pragmas 2. K8s support for annotations: https://github.com/kubernetes-sigs/controller-tools/blob/881ffb4682cb5882f5764aca5a56fe9865bc9ed6/pkg/crd/testdata/cronjob_types.go#L105-L125 TBD the exact format of comments (i.e. use of a special prefix `//dagger: default=abc` vs something simpler like `//+default abc`). We should use this to support at least: 1. Optional (can co-exist w/ existing `Optional` type) 2. Default values (will be limited to what can be represented as a string, but that's ok) 3. Marking object fields as private (so not included in public API but still included in serialization of object) cc @vito @jedevc
https://github.com/dagger/dagger/issues/6162
https://github.com/dagger/dagger/pull/6179
e8097f5798af7f8b22f2a1be94a27c9800185053
a499195df3de436969c4477bb1e9f074aa586eb6
"2023-11-27T16:51:18Z"
go
"2023-12-06T14:29:35Z"
cmd/codegen/generator/go/templates/modules.go
package templates import ( "encoding/json" "fmt" "go/ast" "go/token" "go/types" "os" "path/filepath" "reflect" "runtime/debug" "sort" "strings" . "github.com/dave/jennifer/jen" // nolint:revive,stylecheck "github.com/iancoleman/strcase" "golang.org/x/tools/go/packages" ) const ( daggerGenFilename = "dagger.gen.go" contextTypename = "context.Context" constructorFuncName = "New" ) /* moduleMainSrc generates the source code of the main func for Dagger Module code using the Go SDK. The overall idea is that users just need to create a struct with the same name as their Module and then add methods to that struct to implement their Module. Methods on that struct become Functions. They are also free to return custom objects from Functions, which themselves may have methods that become Functions too. However, only the "top-level" Module struct's Functions will be directly invokable. This is essentially just the GraphQL execution model. The implementation works by parsing the user's code and generating a main func that reads function call inputs from the Engine, calls the relevant function and returns the result. The generated code is mostly a giant switch/case on the object+function name, with each case doing json deserialization of the input arguments and calling the actual Go function. */ func (funcs goTemplateFuncs) moduleMainSrc() (string, error) { // HACK: the code in this func can be pretty flaky and tricky to debug - // it's much easier to debug when we actually have stack traces, so we grab // those on a panic defer func() { if r := recover(); r != nil { fmt.Fprintf(os.Stderr, "internal error during module code generation: %v\n", r) debug.PrintStack() panic(r) } }() if funcs.modulePkg == nil { // during bootstrapping, we might not have code yet, since it takes // multiple passes. return `func main() { panic("no code yet") }`, nil } ps := &parseState{ pkg: funcs.modulePkg, fset: funcs.moduleFset, methods: make(map[string][]method), moduleName: funcs.module.Name, } pkgScope := funcs.modulePkg.Types.Scope() objFunctionCases := map[string][]Code{} createMod := Qual("dag", "CurrentModule").Call() objs := []types.Object{} for _, name := range pkgScope.Names() { obj := pkgScope.Lookup(name) if obj == nil { continue } objs = append(objs, obj) } // preserve definition order, so developer can keep more important / // entrypoint types higher up sort.Slice(objs, func(i, j int) bool { return objs[i].Pos() < objs[j].Pos() }) tps := []types.Type{} for _, obj := range objs { // check if this is the constructor func, save it for later if so fn, isFn := obj.(*types.Func) if isFn && fn.Name() == constructorFuncName { ps.constructor = fn continue } tps = append(tps, obj.Type()) } added := map[string]struct{}{} topLevel := true for len(tps) != 0 { var nextTps []types.Type for _, tp := range tps { named, isNamed := tp.(*types.Named) if !isNamed { continue } obj := named.Obj() if obj.Pkg() != funcs.modulePkg.Types { // the type must be created in the target package continue } if !obj.Exported() { // the type must be exported if !topLevel { return "", fmt.Errorf("cannot code-generate unexported type %s", obj.Name()) } continue } strct, isStruct := named.Underlying().(*types.Struct) if !isStruct { // TODO(vito): could possibly support non-struct types, but why bother continue } // avoid adding a struct definition twice (if it's referenced in two function signatures) if _, ok := added[obj.Name()]; ok { continue } // TODO(vito): hacky: need to run this before fillObjectFunctionCases so it // collects all the methods objType, extraTypes, err := ps.goStructToAPIType(strct, named) if err != nil { return "", err } if objType == nil { // not including in module schema, skip it continue } if err := ps.fillObjectFunctionCases(named, objFunctionCases); err != nil { // errors indicate an internal problem rather than something w/ user code, so error instead return "", fmt.Errorf("failed to generate function cases for %s: %w", obj.Name(), err) } if len(objFunctionCases[obj.Name()]) == 0 && !ps.isMainModuleObject(obj.Name()) { if topLevel { // no functions on this top-level object, so don't add it to the module continue } if ps.isDaggerGenerated(named.Obj()) { // skip objects from outside this module continue } } // Add the object to the module createMod = dotLine(createMod, "WithObject").Call(Add(Line(), objType)) added[obj.Name()] = struct{}{} // If the object has any extra sub-types (e.g. for function return // values), add them to the list of types to process nextTps = append(nextTps, extraTypes...) } tps, nextTps = nextTps, nil topLevel = false } // TODO: sort cases and functions based on their definition order return strings.Join([]string{mainSrc, invokeSrc(objFunctionCases, createMod)}, "\n"), nil } func dotLine(a *Statement, id string) *Statement { return a.Op(".").Line().Id(id) } const ( // The static part of the generated code. It calls out to the "invoke" func, which is the mostly // dynamically generated code that actually calls the user's functions. mainSrc = `func main() { ctx := context.Background() fnCall := dag.CurrentFunctionCall() parentName, err := fnCall.ParentName(ctx) if err != nil { fmt.Println(err.Error()) os.Exit(2) } fnName, err := fnCall.Name(ctx) if err != nil { fmt.Println(err.Error()) os.Exit(2) } parentJson, err := fnCall.Parent(ctx) if err != nil { fmt.Println(err.Error()) os.Exit(2) } fnArgs, err := fnCall.InputArgs(ctx) if err != nil { fmt.Println(err.Error()) os.Exit(2) } inputArgs := map[string][]byte{} for _, fnArg := range fnArgs { argName, err := fnArg.Name(ctx) if err != nil { fmt.Println(err.Error()) os.Exit(2) } argValue, err := fnArg.Value(ctx) if err != nil { fmt.Println(err.Error()) os.Exit(2) } inputArgs[argName] = []byte(argValue) } result, err := invoke(ctx, []byte(parentJson), parentName, fnName, inputArgs) if err != nil { fmt.Println(err.Error()) os.Exit(2) } resultBytes, err := json.Marshal(result) if err != nil { fmt.Println(err.Error()) os.Exit(2) } _, err = fnCall.ReturnValue(ctx, JSON(resultBytes)) if err != nil { fmt.Println(err.Error()) os.Exit(2) } } ` parentJSONVar = "parentJSON" parentNameVar = "parentName" fnNameVar = "fnName" inputArgsVar = "inputArgs" invokeFuncName = "invoke" ) // the source code of the invoke func, which is the mostly dynamically generated code that actually calls the user's functions func invokeSrc(objFunctionCases map[string][]Code, createMod Code) string { // each `case` statement for every object name, which makes up the body of the invoke func objCases := []Code{} for objName, functionCases := range objFunctionCases { objCases = append(objCases, Case(Lit(objName)).Block(Switch(Id(fnNameVar)).Block(functionCases...))) } // when the object name is empty, return the module definition objCases = append(objCases, Case(Lit("")).Block( Return(createMod, Nil()), )) // default case (return error) objCases = append(objCases, Default().Block( Return(Nil(), Qual("fmt", "Errorf").Call(Lit("unknown object %s"), Id(parentNameVar))), )) objSwitch := Switch(Id(parentNameVar)).Block(objCases...) // func invoke( invokeFunc := Func().Id(invokeFuncName).Params( // ctx context.Context, Id("ctx").Qual("context", "Context"), // parentJSON []byte, Id(parentJSONVar).Index().Byte(), // parentName string, Id(parentNameVar).String(), // fnName string, Id(fnNameVar).String(), // inputArgs map[string][]byte, Id(inputArgsVar).Map(String()).Index().Byte(), ).Params( // ) (_ any, Id("_").Id("any"), // err error) Id("err").Error(), ).Block(objSwitch) return fmt.Sprintf("%#v", invokeFunc) } // TODO: use jennifer for generating this magical typedef func renderNameOrStruct(t types.Type) string { if ptr, ok := t.(*types.Pointer); ok { return "*" + renderNameOrStruct(ptr.Elem()) } if sl, ok := t.(*types.Slice); ok { return "[]" + renderNameOrStruct(sl.Elem()) } if st, ok := t.(*types.Struct); ok { result := "struct {\n" for i := 0; i < st.NumFields(); i++ { if !st.Field(i).Embedded() { result += st.Field(i).Name() + " " } result += renderNameOrStruct(st.Field(i).Type()) if tag := st.Tag(i); tag != "" { result += " `" + tag + "`" } result += "\n" } result += "}" return result } if named, ok := t.(*types.Named); ok { // Assume local // // TODO: this isn't always true - we likely want to support returning // types from other packages as well. However, this is tricky - how // should we handle returning *time.Time? We should probably convert // this to a graphql type that all langs can convert to their native // representation. base := named.Obj().Name() if typeArgs := named.TypeArgs(); typeArgs.Len() > 0 { base += "[" for i := 0; i < typeArgs.Len(); i++ { if i > 0 { base += ", " } base += renderNameOrStruct(typeArgs.At(i)) } base += "]" } return base } // HACK(vito): this is passed to Id(), which is a bit weird, but works return t.String() } var checkErrStatement = If(Err().Op("!=").Nil()).Block( // fmt.Println(err.Error()) Qual("fmt", "Println").Call(Err().Dot("Error").Call()), // os.Exit(2) Qual("os", "Exit").Call(Lit(2)), ) // fillObjectFunctionCases recursively fills out the `cases` map with entries for object name -> `case` statement blocks // for each function in that object func (ps *parseState) fillObjectFunctionCases(type_ types.Type, cases map[string][]Code) error { var objName string switch x := type_.(type) { case *types.Pointer: return ps.fillObjectFunctionCases(x.Elem(), cases) case *types.Named: objName = x.Obj().Name() default: return nil } if existingCases := cases[objName]; len(existingCases) > 0 { // handles recursive types, e.g. objects with chainable methods that return themselves return nil } hasConstructor := ps.isMainModuleObject(objName) && ps.constructor != nil methods := ps.methods[objName] if len(methods) == 0 && !hasConstructor { return nil } for _, method := range methods { fnName, sig := method.fn.Name(), method.fn.Type().(*types.Signature) if err := ps.fillObjectFunctionCase(objName, fnName, fnName, sig, method.paramSpecs, cases); err != nil { return err } } // main module object constructor case if hasConstructor { sig, ok := ps.constructor.Type().(*types.Signature) if !ok { return fmt.Errorf("expected %s to be a function, got %T", constructorFuncName, ps.constructor.Type()) } paramSpecs, err := ps.parseParamSpecs(ps.constructor) if err != nil { return fmt.Errorf("failed to parse %s function: %w", constructorFuncName, err) } // Validate the constructor returns the main module object (further general validation happens in fillObjectFunctionCase) results := sig.Results() if results.Len() == 0 { return fmt.Errorf("%s must return a value", constructorFuncName) } resultType := results.At(0).Type() if ptrType, ok := resultType.(*types.Pointer); ok { resultType = ptrType.Elem() } namedType, ok := resultType.(*types.Named) if !ok { return fmt.Errorf("%s must return the main module object %q", constructorFuncName, objName) } if namedType.Obj().Name() != objName { return fmt.Errorf("%s must return the main module object %q", constructorFuncName, objName) } if err := ps.fillObjectFunctionCase(objName, ps.constructor.Name(), "", sig, paramSpecs, cases); err != nil { return err } } // default case (return error) cases[objName] = append(cases[objName], Default().Block( Return(Nil(), Qual("fmt", "Errorf").Call(Lit("unknown function %s"), Id(fnNameVar))), )) return nil } func (ps *parseState) fillObjectFunctionCase( objName string, fnName string, caseName string, // separate from fnName to handle constructor where the caseName is empty string sig *types.Signature, paramSpecs []paramSpec, cases map[string][]Code, ) error { statements := []Code{} parentVarName := "parent" statements = append(statements, Var().Id(parentVarName).Id(objName), Err().Op("=").Qual("json", "Unmarshal").Call(Id(parentJSONVar), Op("&").Id(parentVarName)), checkErrStatement, ) var fnCallArgs []Code if sig.Recv() != nil { fnCallArgs = []Code{Op("&").Id(parentVarName)} } vars := map[string]struct{}{} for i, spec := range paramSpecs { if i == 0 && spec.paramType.String() == contextTypename { fnCallArgs = append(fnCallArgs, Id("ctx")) continue } var varName string var varType types.Type var target *Statement if spec.parent == nil { varName = strcase.ToLowerCamel(spec.name) varType = spec.paramType target = Id(varName) } else { // create only one declaration for option structs varName = spec.parent.name varType = spec.parent.paramType target = Id(spec.parent.name).Dot(spec.name) } if _, ok := vars[varName]; !ok { vars[varName] = struct{}{} tp, access := findOptsAccessPattern(varType, Id(varName)) statements = append(statements, Var().Id(varName).Id(renderNameOrStruct(tp))) if spec.variadic { fnCallArgs = append(fnCallArgs, access.Op("...")) } else { fnCallArgs = append(fnCallArgs, access) } } statements = append(statements, If(Id(inputArgsVar).Index(Lit(spec.graphqlName())).Op("!=").Nil()).Block( Err().Op("=").Qual("json", "Unmarshal").Call( Index().Byte().Parens(Id(inputArgsVar).Index(Lit(spec.graphqlName()))), Op("&").Add(target), ), checkErrStatement, )) } results := sig.Results() var callStatement *Statement if sig.Recv() != nil { callStatement = Parens(Op("*").Id(objName)).Dot(fnName).Call(fnCallArgs...) } else { callStatement = Id(fnName).Call(fnCallArgs...) } switch results.Len() { case 2: // assume second value is error if results.At(1).Type().String() != errorTypeName { // sanity check return fmt.Errorf("second return value must be error, have %s", results.At(1).Type().String()) } statements = append(statements, Return(callStatement)) cases[objName] = append(cases[objName], Case(Lit(caseName)).Block(statements...)) if err := ps.fillObjectFunctionCases(results.At(0).Type(), cases); err != nil { return err } return nil case 1: if results.At(0).Type().String() == errorTypeName { // void error return statements = append(statements, Return(Nil(), callStatement)) cases[objName] = append(cases[objName], Case(Lit(caseName)).Block(statements...)) } else { // non-error return statements = append(statements, Return(callStatement, Nil())) cases[objName] = append(cases[objName], Case(Lit(caseName)).Block(statements...)) if err := ps.fillObjectFunctionCases(results.At(0).Type(), cases); err != nil { return err } } return nil case 0: // void return // // NB(vito): it's really weird to have a fully void return (not even // error), but we should still support it for completeness. statements = append(statements, callStatement, Return(Nil(), Nil())) cases[objName] = append(cases[objName], Case(Lit(caseName)).Block(statements...)) return nil default: return fmt.Errorf("unexpected number of results from function %s: %d", fnName, results.Len()) } } type parseState struct { pkg *packages.Package fset *token.FileSet methods map[string][]method moduleName string // If it exists, constructor is the New func that returns the main module object constructor *types.Func } func (ps *parseState) isMainModuleObject(name string) bool { return strcase.ToCamel(ps.moduleName) == strcase.ToCamel(name) } type method struct { fn *types.Func paramSpecs []paramSpec } func (ps *parseState) goTypeToAPIType(typ types.Type, named *types.Named) (*Statement, *types.Named, error) { switch t := typ.(type) { case *types.Named: // Named types are any types declared like `type Foo <...>` typeDef, _, err := ps.goTypeToAPIType(t.Underlying(), t) if err != nil { return nil, nil, fmt.Errorf("failed to convert named type: %w", err) } return typeDef, t, nil case *types.Pointer: return ps.goTypeToAPIType(t.Elem(), named) case *types.Slice: elemTypeDef, underlying, err := ps.goTypeToAPIType(t.Elem(), nil) if err != nil { return nil, nil, fmt.Errorf("failed to convert slice element type: %w", err) } return Qual("dag", "TypeDef").Call().Dot("WithListOf").Call( elemTypeDef, ), underlying, nil case *types.Basic: if t.Kind() == types.Invalid { return nil, nil, fmt.Errorf("invalid type: %+v", t) } var kind Code switch t.Info() { case types.IsString: kind = Id("Stringkind") case types.IsInteger: kind = Id("Integerkind") case types.IsBoolean: kind = Id("Booleankind") default: return nil, nil, fmt.Errorf("unsupported basic type: %+v", t) } return Qual("dag", "TypeDef").Call().Dot("WithKind").Call( kind, ), named, nil case *types.Struct: if named == nil { return nil, nil, fmt.Errorf("struct types must be named") } typeName := named.Obj().Name() if typeName == "" { return nil, nil, fmt.Errorf("struct types must be named") } return Qual("dag", "TypeDef").Call().Dot("WithObject").Call( Lit(typeName), ), named, nil default: return nil, nil, fmt.Errorf("unsupported type %T", t) } } const errorTypeName = "error" func (ps *parseState) goStructToAPIType(t *types.Struct, named *types.Named) (*Statement, []types.Type, error) { if named == nil { return nil, nil, fmt.Errorf("struct types must be named") } typeName := named.Obj().Name() if typeName == "" { return nil, nil, fmt.Errorf("struct types must be named") } // We don't support extending objects from outside this module, so we will // be skipping it. But first we want to verify the user isn't adding methods // to it (in which case we error out). objectIsDaggerGenerated := ps.isDaggerGenerated(named.Obj()) methods := []*types.Func{} methodSet := types.NewMethodSet(types.NewPointer(named)) // Fill out any Functions on the object, which are methods on the struct // TODO: support methods defined on non-pointer receivers for i := 0; i < methodSet.Len(); i++ { methodObj := methodSet.At(i).Obj() if ps.isDaggerGenerated(methodObj) { // We don't care about pre-existing methods on core types or objects from dependency modules. continue } if objectIsDaggerGenerated { return nil, nil, fmt.Errorf("cannot define methods on objects from outside this module") } method, ok := methodObj.(*types.Func) if !ok { return nil, nil, fmt.Errorf("expected method to be a func, got %T", methodObj) } if !method.Exported() { continue } methods = append(methods, method) } if objectIsDaggerGenerated { return nil, nil, nil } sort.Slice(methods, func(i, j int) bool { return methods[i].Pos() < methods[j].Pos() }) // args for WithObject withObjectArgs := []Code{ Lit(typeName), } withObjectOpts := []Code{} // Fill out the Description with the comment above the struct (if any) typeSpec, err := ps.typeSpecForNamedType(named) if err != nil { return nil, nil, fmt.Errorf("failed to find decl for named type %s: %w", typeName, err) } if comment := typeSpec.Doc.Text(); comment != "" { withObjectOpts = append(withObjectOpts, Id("Description").Op(":").Lit(strings.TrimSpace(comment))) } if len(withObjectOpts) > 0 { withObjectArgs = append(withObjectArgs, Id("TypeDefWithObjectOpts").Values(withObjectOpts...)) } typeDef := Qual("dag", "TypeDef").Call().Dot("WithObject").Call(withObjectArgs...) var subTypes []types.Type for _, method := range methods { fnTypeDef, functionSubTypes, err := ps.goFuncToAPIFunctionDef(typeName, method) if err != nil { return nil, nil, fmt.Errorf("failed to convert method %s to function def: %w", method.Name(), err) } subTypes = append(subTypes, functionSubTypes...) typeDef = dotLine(typeDef, "WithFunction").Call(Add(Line(), fnTypeDef)) } astStructType, ok := typeSpec.Type.(*ast.StructType) if !ok { return nil, nil, fmt.Errorf("expected type spec to be a struct, got %T", typeSpec.Type) } // Fill out the static fields of the struct (if any) astFields := unpackASTFields(astStructType.Fields) for i := 0; i < t.NumFields(); i++ { field := t.Field(i) if !field.Exported() { continue } fieldTypeDef, subType, err := ps.goTypeToAPIType(field.Type(), nil) if err != nil { return nil, nil, fmt.Errorf("failed to convert field type: %w", err) } if subType != nil { subTypes = append(subTypes, subType) } description := astFields[i].Doc.Text() if description == "" { description = astFields[i].Comment.Text() } description = strings.TrimSpace(description) name := field.Name() // override the name with the json tag if it was set - otherwise, we // end up asking for a name that we won't unmarshal correctly tag := reflect.StructTag(t.Tag(i)) if dt := tag.Get("json"); dt != "" { dt, _, _ = strings.Cut(dt, ",") if dt == "-" { continue } name = dt } withFieldArgs := []Code{ Lit(name), fieldTypeDef, } if description != "" { withFieldArgs = append(withFieldArgs, Id("TypeDefWithFieldOpts").Values( Id("Description").Op(":").Lit(description), )) } typeDef = dotLine(typeDef, "WithField").Call(withFieldArgs...) } if ps.isMainModuleObject(typeName) && ps.constructor != nil { fnTypeDef, _, err := ps.goFuncToAPIFunctionDef("", ps.constructor) if err != nil { return nil, nil, fmt.Errorf("failed to convert constructor to function def: %w", err) } typeDef = dotLine(typeDef, "WithConstructor").Call(Add(Line(), fnTypeDef)) } return typeDef, subTypes, nil } var voidDef = Qual("dag", "TypeDef").Call(). Dot("WithKind").Call(Id("Voidkind")). Dot("WithOptional").Call(Lit(true)) func (ps *parseState) goFuncToAPIFunctionDef(receiverTypeName string, fn *types.Func) (*Statement, []types.Type, error) { sig, ok := fn.Type().(*types.Signature) if !ok { return nil, nil, fmt.Errorf("expected method to be a func, got %T", fn.Type()) } // stash away the method signature so we can remember details on how it's // invoked (e.g. no error return, no ctx arg, error-only return, etc) specs, err := ps.parseParamSpecs(fn) if err != nil { return nil, nil, err } if receiverTypeName != "" { ps.methods[receiverTypeName] = append(ps.methods[receiverTypeName], method{fn: fn, paramSpecs: specs}) } var fnReturnType *Statement var subTypes []types.Type results := sig.Results() var returnSubType *types.Named switch results.Len() { case 0: fnReturnType = voidDef case 1: result := results.At(0).Type() if result.String() == errorTypeName { fnReturnType = voidDef } else { fnReturnType, returnSubType, err = ps.goTypeToAPIType(result, nil) if err != nil { return nil, nil, fmt.Errorf("failed to convert result type: %w", err) } } case 2: result := results.At(0).Type() subTypes = append(subTypes, result) fnReturnType, returnSubType, err = ps.goTypeToAPIType(result, nil) if err != nil { return nil, nil, fmt.Errorf("failed to convert result type: %w", err) } default: return nil, nil, fmt.Errorf("method %s has too many return values", fn.Name()) } if returnSubType != nil { subTypes = append(subTypes, returnSubType) } fnDef := Qual("dag", "Function").Call(Lit(fn.Name()), Add(Line(), fnReturnType)) funcDecl, err := ps.declForFunc(fn) if err != nil { return nil, nil, fmt.Errorf("failed to find decl for method %s: %w", fn.Name(), err) } if comment := funcDecl.Doc.Text(); comment != "" { fnDef = dotLine(fnDef, "WithDescription").Call(Lit(strings.TrimSpace(comment))) } for i, spec := range specs { if i == 0 && spec.paramType.String() == contextTypename { // ignore ctx arg continue } typeDef, subType, err := ps.goTypeToAPIType(spec.baseType, nil) if err != nil { return nil, nil, fmt.Errorf("failed to convert param type: %w", err) } if subType != nil { subTypes = append(subTypes, subType) } if spec.optional { typeDef = typeDef.Dot("WithOptional").Call(Lit(true)) } // arguments to WithArg args := []Code{Lit(spec.graphqlName()), typeDef} argOpts := []Code{} if spec.description != "" { argOpts = append(argOpts, Id("Description").Op(":").Lit(spec.description)) } if spec.defaultValue != "" { var jsonEnc string if spec.baseType.String() == "string" { enc, err := json.Marshal(spec.defaultValue) if err != nil { return nil, nil, fmt.Errorf("failed to marshal default value: %w", err) } jsonEnc = string(enc) } else { jsonEnc = spec.defaultValue } argOpts = append(argOpts, Id("DefaultValue").Op(":").Id("JSON").Call(Lit(jsonEnc))) } if len(argOpts) > 0 { args = append(args, Id("FunctionWithArgOpts").Values(argOpts...)) } fnDef = dotLine(fnDef, "WithArg").Call(args...) } return fnDef, subTypes, nil } func (ps *parseState) parseParamSpecs(fn *types.Func) ([]paramSpec, error) { sig := fn.Type().(*types.Signature) params := sig.Params() if params.Len() == 0 { return nil, nil } specs := make([]paramSpec, 0, params.Len()) i := 0 if params.At(i).Type().String() == contextTypename { spec, err := ps.parseParamSpecVar(params.At(i)) if err != nil { return nil, err } specs = append(specs, spec) i++ } fnDecl, err := ps.declForFunc(fn) if err != nil { return nil, err } // is the first data param an inline struct? if so, process each field of // the struct as a top-level param if i+1 == params.Len() { param := params.At(i) paramType, ok := asInlineStruct(param.Type()) if ok { stype, ok := asInlineStructAst(fnDecl.Type.Params.List[i].Type) if !ok { return nil, fmt.Errorf("expected struct type for %s", param.Name()) } parent := &paramSpec{ name: params.At(i).Name(), paramType: param.Type(), baseType: param.Type(), } paramFields := unpackASTFields(stype.Fields) for f := 0; f < paramType.NumFields(); f++ { spec, err := ps.parseParamSpecVar(paramType.Field(f)) if err != nil { return nil, err } spec.parent = parent spec.description = paramFields[f].Doc.Text() if spec.description == "" { spec.description = paramFields[f].Comment.Text() } spec.description = strings.TrimSpace(spec.description) specs = append(specs, spec) } return specs, nil } } // if other parameter passing schemes fail, just treat each remaining arg // as a top-level param paramFields := unpackASTFields(fnDecl.Type.Params) for ; i < params.Len(); i++ { spec, err := ps.parseParamSpecVar(params.At(i)) if err != nil { return nil, err } if sig.Variadic() && i == params.Len()-1 { spec.variadic = true } if cmt, err := ps.commentForFuncField(fnDecl, paramFields, i); err == nil { spec.description = cmt.Text() spec.description = strings.TrimSpace(spec.description) } specs = append(specs, spec) } return specs, nil } func (ps *parseState) parseParamSpecVar(field *types.Var) (paramSpec, error) { if _, ok := field.Type().(*types.Struct); ok { return paramSpec{}, fmt.Errorf("nested structs are not supported") } paramType := field.Type() baseType := paramType for { ptr, ok := baseType.(*types.Pointer) if !ok { break } baseType = ptr.Elem() } optional := false if named, ok := baseType.(*types.Named); ok { if named.Obj().Name() == "Optional" && ps.isDaggerGenerated(named.Obj()) { typeArgs := named.TypeArgs() if typeArgs.Len() != 1 { return paramSpec{}, fmt.Errorf("optional type must have exactly one type argument") } optional = true baseType = typeArgs.At(0) for { ptr, ok := baseType.(*types.Pointer) if !ok { break } baseType = ptr.Elem() } } } return paramSpec{ name: field.Name(), paramType: paramType, baseType: baseType, optional: optional, }, nil } type paramSpec struct { name string description string optional bool variadic bool defaultValue string // NOTE: defaultVal is not currently populated // paramType is the full type declared in the function signature, which may // include pointer types, Optional, etc paramType types.Type // baseType is the simplified base type derived from the function signature baseType types.Type // parent is set if this paramSpec is nested inside a parent inline struct, // and is used to create a declaration of the entire inline struct parent *paramSpec } func (spec *paramSpec) graphqlName() string { return strcase.ToLowerCamel(spec.name) } // typeSpecForNamedType returns the *ast* type spec for the given Named type. This is needed // because the types.Named object does not have the comments associated with the type, which // we want to parse. func (ps *parseState) typeSpecForNamedType(namedType *types.Named) (*ast.TypeSpec, error) { tokenFile := ps.fset.File(namedType.Obj().Pos()) if tokenFile == nil { return nil, fmt.Errorf("no file for %s", namedType.Obj().Name()) } for _, f := range ps.pkg.Syntax { if ps.fset.File(f.Pos()) != tokenFile { continue } for _, decl := range f.Decls { genDecl, ok := decl.(*ast.GenDecl) if !ok { continue } for _, spec := range genDecl.Specs { typeSpec, ok := spec.(*ast.TypeSpec) if !ok { continue } if typeSpec.Name.Name == namedType.Obj().Name() { if typeSpec.Doc == nil { typeSpec.Doc = genDecl.Doc } return typeSpec, nil } } } } return nil, fmt.Errorf("no decl for %s", namedType.Obj().Name()) } // declForFunc returns the *ast* func decl for the given Func type. This is needed // because the types.Func object does not have the comments associated with the type, which // we want to parse. func (ps *parseState) declForFunc(fnType *types.Func) (*ast.FuncDecl, error) { tokenFile := ps.fset.File(fnType.Pos()) if tokenFile == nil { return nil, fmt.Errorf("no file for %s", fnType.Name()) } for _, f := range ps.pkg.Syntax { if ps.fset.File(f.Pos()) != tokenFile { continue } for _, decl := range f.Decls { fnDecl, ok := decl.(*ast.FuncDecl) if ok && fnDecl.Name.Name == fnType.Name() { return fnDecl, nil } } } return nil, fmt.Errorf("no decl for %s", fnType.Name()) } // commentForFuncField returns the *ast* comment group for the given position. This // is needed because function args (despite being fields) don't have comments // associated with them, so this is a neat little hack to get them out. func (ps *parseState) commentForFuncField(fnDecl *ast.FuncDecl, unpackedParams []*ast.Field, i int) (*ast.CommentGroup, error) { pos := unpackedParams[i].Pos() tokenFile := ps.fset.File(pos) if tokenFile == nil { return nil, fmt.Errorf("no file for function %s", fnDecl.Name.Name) } line := tokenFile.Line(pos) allowDocComment := true allowLineComment := true if i == 0 { fieldStartLine := tokenFile.Line(fnDecl.Type.Params.Pos()) if fieldStartLine == line || fieldStartLine == line-1 { // the argument is on the same (or next) line as the function // declaration, so there is no doc comment to find allowDocComment = false } } else { prevArgLine := tokenFile.Line(unpackedParams[i-1].Pos()) if prevArgLine == line || prevArgLine == line-1 { // the argument is on the same (or next) line as the previous // argument, so again there is no doc comment to find allowDocComment = false } } if i+1 < len(fnDecl.Type.Params.List) { nextArgLine := tokenFile.Line(unpackedParams[i+1].Pos()) if nextArgLine == line { // the argument is on the same line as the next argument, so there is // no line comment to find allowLineComment = false } } else { fieldEndLine := tokenFile.Line(fnDecl.Type.Params.End()) if fieldEndLine == line { // the argument is on the same line as the end of the field list, so there // is no line comment to find allowLineComment = false } } for _, f := range ps.pkg.Syntax { if ps.fset.File(f.Pos()) != tokenFile { continue } if allowDocComment { // take the last position in the last line, and try and find a // comment that contains it npos := tokenFile.LineStart(tokenFile.Line(pos)) - 1 for _, comment := range f.Comments { if comment.Pos() <= npos && npos <= comment.End() { return comment, nil } } } if allowLineComment { // if no doc-style comment found, fallback to the current line to // find a comment at the end of the line npos := tokenFile.LineStart(tokenFile.Line(pos)+1) - 1 for _, comment := range f.Comments { if comment.Pos() <= npos && npos <= comment.End() { return comment, nil } } } } return nil, fmt.Errorf("no comment for function %s", fnDecl.Name.Name) } func (ps *parseState) isDaggerGenerated(obj types.Object) bool { tokenFile := ps.fset.File(obj.Pos()) return filepath.Base(tokenFile.Name()) == daggerGenFilename } // findOptsAccessPattern takes a type and a base statement (the name of a // variable that has the target type) and produces a type that can be used in a // variable declaration, as well as a statement that has the same type as the // target statement. // // This is essentially for helping resolve the pointeriness of types: a type of // **T and a variable p becomes T and &&p. This means we can *always* construct // an Opts object and unmarshal into it without having nil dereferences. func findOptsAccessPattern(t types.Type, access *Statement) (types.Type, *Statement) { switch t := t.(type) { case *types.Pointer: // taking the address of an address isn't allowed - so we use a ptr // helper function t2, val := findOptsAccessPattern(t.Elem(), access) return t2, Id("ptr").Call(val) // case *types.Slice: // t2, val := findOptsAccessPattern(t.Elem(), access) // return t2, Index().Id(renderNameOrStruct(t.Elem())).Values(val) default: return t, access } } func asInlineStruct(t types.Type) (*types.Struct, bool) { switch t := t.(type) { case *types.Pointer: return asInlineStruct(t.Elem()) case *types.Struct: return t, true default: return nil, false } } func asInlineStructAst(t ast.Node) (*ast.StructType, bool) { switch t := t.(type) { case *ast.StarExpr: return asInlineStructAst(t.X) case *ast.StructType: return t, true default: return nil, false } } func unpackASTFields(fields *ast.FieldList) []*ast.Field { var unpacked []*ast.Field for _, field := range fields.List { for i, name := range field.Names { field := *field field.Names = []*ast.Ident{name} if i != 0 { field.Doc = nil field.Comment = nil } unpacked = append(unpacked, &field) } } return unpacked }
closed
dagger/dagger
https://github.com/dagger/dagger
6,162
Go SDK Modules: enable general type annotation support via comments
Discord discussion: https://discord.com/channels/707636530424053791/1177373379255349248 As we need to add more support in Go for things like marking a field as private, setting default values, etc. The most obvious option was to require use of structs (including the `Opts` struct idea, the "inline anonymous struct for args", etc.) and annotate more information via struct tags. However, after discussion we realized a better general solution would be to not rely on struct tags but instead add support for the equivalent functionality via specially formatted comments. The reasoning being that: 1. Struct tags are essentially just glorified comments (strings that get interpreted by reflection/ast parsing), so there's not much of a practical difference in that respect 2. Comments are more general in that they can be applied equivalently not only to fields of a struct but also to function args (similar to how we support doc strings on args today), functions as a whole, structs as a whole, etc. There's prior art for this: 1. Go's support for pragmas: https://dave.cheney.net/2018/01/08/gos-hidden-pragmas 2. K8s support for annotations: https://github.com/kubernetes-sigs/controller-tools/blob/881ffb4682cb5882f5764aca5a56fe9865bc9ed6/pkg/crd/testdata/cronjob_types.go#L105-L125 TBD the exact format of comments (i.e. use of a special prefix `//dagger: default=abc` vs something simpler like `//+default abc`). We should use this to support at least: 1. Optional (can co-exist w/ existing `Optional` type) 2. Default values (will be limited to what can be represented as a string, but that's ok) 3. Marking object fields as private (so not included in public API but still included in serialization of object) cc @vito @jedevc
https://github.com/dagger/dagger/issues/6162
https://github.com/dagger/dagger/pull/6179
e8097f5798af7f8b22f2a1be94a27c9800185053
a499195df3de436969c4477bb1e9f074aa586eb6
"2023-11-27T16:51:18Z"
go
"2023-12-06T14:29:35Z"
cmd/codegen/generator/go/templates/modules_test.go
package templates import ( "go/token" "os" "path/filepath" "testing" "github.com/dagger/dagger/core/modules" "github.com/stretchr/testify/require" "golang.org/x/tools/go/packages" ) func TestModuleMainSrc(t *testing.T) { tmpdir := t.TempDir() testMain := `package main // My Cool Test module type TestMod struct {} // Foo does a thing func (m *TestMod) Foo(s string, i int, b bool) (string, error) { return "", nil } func main() {} ` err := os.WriteFile(filepath.Join(tmpdir, "main.go"), []byte(testMain), 0644) require.NoError(t, err) testGoMod := `module testMod go 1.20 ` err = os.WriteFile(filepath.Join(tmpdir, "go.mod"), []byte(testGoMod), 0644) require.NoError(t, err) fset := token.NewFileSet() pkgs, err := packages.Load(&packages.Config{ Dir: tmpdir, }, ".") require.NoError(t, err) funcs := goTemplateFuncs{ module: &modules.Config{ Name: "testMod", }, modulePkg: pkgs[0], moduleFset: fset, } // TODO: assert on contents generatedMain, err := funcs.moduleMainSrc() require.NoError(t, err) t.Log(generatedMain) }
closed
dagger/dagger
https://github.com/dagger/dagger
6,162
Go SDK Modules: enable general type annotation support via comments
Discord discussion: https://discord.com/channels/707636530424053791/1177373379255349248 As we need to add more support in Go for things like marking a field as private, setting default values, etc. The most obvious option was to require use of structs (including the `Opts` struct idea, the "inline anonymous struct for args", etc.) and annotate more information via struct tags. However, after discussion we realized a better general solution would be to not rely on struct tags but instead add support for the equivalent functionality via specially formatted comments. The reasoning being that: 1. Struct tags are essentially just glorified comments (strings that get interpreted by reflection/ast parsing), so there's not much of a practical difference in that respect 2. Comments are more general in that they can be applied equivalently not only to fields of a struct but also to function args (similar to how we support doc strings on args today), functions as a whole, structs as a whole, etc. There's prior art for this: 1. Go's support for pragmas: https://dave.cheney.net/2018/01/08/gos-hidden-pragmas 2. K8s support for annotations: https://github.com/kubernetes-sigs/controller-tools/blob/881ffb4682cb5882f5764aca5a56fe9865bc9ed6/pkg/crd/testdata/cronjob_types.go#L105-L125 TBD the exact format of comments (i.e. use of a special prefix `//dagger: default=abc` vs something simpler like `//+default abc`). We should use this to support at least: 1. Optional (can co-exist w/ existing `Optional` type) 2. Default values (will be limited to what can be represented as a string, but that's ok) 3. Marking object fields as private (so not included in public API but still included in serialization of object) cc @vito @jedevc
https://github.com/dagger/dagger/issues/6162
https://github.com/dagger/dagger/pull/6179
e8097f5798af7f8b22f2a1be94a27c9800185053
a499195df3de436969c4477bb1e9f074aa586eb6
"2023-11-27T16:51:18Z"
go
"2023-12-06T14:29:35Z"
core/integration/module_test.go
package core import ( "context" _ "embed" "encoding/json" "fmt" "go/format" "os" "path/filepath" "strings" "testing" "time" "dagger.io/dagger" "github.com/dagger/dagger/cmd/codegen/introspection" "github.com/dagger/dagger/core/modules" "github.com/iancoleman/strcase" "github.com/moby/buildkit/identity" "github.com/stretchr/testify/require" "github.com/tidwall/gjson" "golang.org/x/sync/errgroup" ) func TestModuleGoInit(t *testing.T) { t.Run("from scratch", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=bare", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{bare{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"bare":{"containerEcho":{"stdout":"hello\n"}}}`, out) }) t.Run("reserved go.mod name", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=go", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{go{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"go":{"containerEcho":{"stdout":"hello\n"}}}`, out) }) t.Run("uses expected Go module name, camel-cases Dagger module name", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=My-Module", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{myModule{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"myModule":{"containerEcho":{"stdout":"hello\n"}}}`, out) generated, err := modGen.File("go.mod").Contents(ctx) require.NoError(t, err) require.Contains(t, generated, "module main") }) t.Run("creates go.mod beneath an existing go.mod if root points beneath it", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/go.mod", dagger.ContainerWithNewFileOpts{ Contents: "module example.com/test\n", }). WithNewFile("/work/foo.go", dagger.ContainerWithNewFileOpts{ Contents: "package foo\n", }). WithWorkdir("/work/ci"). With(daggerExec("mod", "init", "--name=beneathGoMod", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{beneathGoMod{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"beneathGoMod":{"containerEcho":{"stdout":"hello\n"}}}`, out) t.Run("names Go module after Dagger module", func(t *testing.T) { generated, err := modGen.File("go.mod").Contents(ctx) require.NoError(t, err) require.Contains(t, generated, "module main") }) }) t.Run("respects existing go.mod", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithExec([]string{"go", "mod", "init", "example.com/test"}). With(daggerExec("mod", "init", "--name=hasGoMod", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{hasGoMod{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"hasGoMod":{"containerEcho":{"stdout":"hello\n"}}}`, out) t.Run("preserves module name", func(t *testing.T) { generated, err := modGen.File("go.mod").Contents(ctx) require.NoError(t, err) require.Contains(t, generated, "module example.com/test") }) }) t.Run("respects parent go.mod if root points to it", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithExec([]string{"go", "mod", "init", "example.com/test"}). WithNewFile("/work/foo.go", dagger.ContainerWithNewFileOpts{ Contents: "package foo\n", }). WithWorkdir("/work/child"). With(daggerExec("mod", "init", "--name=child", "--sdk=go", "--root=..")). WithNewFile("/work/child/main.go", dagger.ContainerWithNewFileOpts{ Contents: ` package main import "os" type Child struct{} func (m *Child) Root() *Directory { wd, err := os.Getwd() if err != nil { panic(err) } return dag.Host().Directory(wd+"/..") } `, }) generated := modGen. // explicitly sync to see whether it makes a go.mod With(daggerExec("mod", "sync")). Directory(".") logGen(ctx, t, generated) out, err := modGen. With(daggerQuery(`{child{root{entries}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"child":{"root":{"entries":["child","foo.go","go.mod","go.sum"]}}}`, out) childEntries, err := generated.Entries(ctx) require.NoError(t, err) require.NotContains(t, childEntries, "go.mod") t.Run("preserves parent module name", func(t *testing.T) { generated, err := modGen.File("/work/go.mod").Contents(ctx) require.NoError(t, err) require.Contains(t, generated, "module example.com/test") }) }) t.Run("respects existing go.mod even if root points to parent that has go.mod", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithExec([]string{"go", "mod", "init", "example.com/test"}). WithNewFile("/work/foo.go", dagger.ContainerWithNewFileOpts{ Contents: "package foo\n", }). WithWorkdir("/work/child"). WithExec([]string{"go", "mod", "init", "my-mod"}). With(daggerExec("mod", "init", "--name=child", "--sdk=go", "--root=..")). WithNewFile("/work/child/main.go", dagger.ContainerWithNewFileOpts{ Contents: ` package main import "os" type Child struct{} func (m *Child) Root() *Directory { wd, err := os.Getwd() if err != nil { panic(err) } return dag.Host().Directory(wd+"/..") } `, }) generated := modGen. // explicitly sync to see whether it makes a go.mod With(daggerExec("mod", "sync")). Directory(".") logGen(ctx, t, generated) out, err := modGen. With(daggerQuery(`{child{root{entries}}}`)). Stdout(ctx) require.NoError(t, err) // no go.sum require.JSONEq(t, `{"child":{"root":{"entries":["child","foo.go","go.mod"]}}}`, out) childEntries, err := generated.Entries(ctx) require.NoError(t, err) require.Contains(t, childEntries, "go.mod") require.Contains(t, childEntries, "go.sum") }) t.Run("respects existing main.go", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: ` package main type HasMainGo struct {} func (m *HasMainGo) Hello() string { return "Hello, world!" } `, }). With(daggerExec("mod", "init", "--name=hasMainGo", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{hasMainGo{hello}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"hasMainGo":{"hello":"Hello, world!"}}`, out) }) t.Run("respects existing main.go even if it uses types not generated yet", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: ` package main type HasDaggerTypes struct {} func (m *HasDaggerTypes) Hello() *Container { return dag.Container(). From("` + alpineImage + `"). WithExec([]string{"echo", "Hello, world!"}) } `, }). With(daggerExec("mod", "init", "--name=hasDaggerTypes", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{hasDaggerTypes{hello{stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"hasDaggerTypes":{"hello":{"stdout":"Hello, world!\n"}}}`, out) }) t.Run("respects existing package without creating main.go", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/notmain.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type HasNotMainGo struct {} func (m *HasNotMainGo) Hello() string { return "Hello, world!" } `, }). With(daggerExec("mod", "init", "--name=hasNotMainGo", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{hasNotMainGo{hello}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"hasNotMainGo":{"hello":"Hello, world!"}}`, out) }) } func TestModuleInitLICENSE(t *testing.T) { t.Run("bootstraps Apache-2.0 LICENSE file if none found", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=licensed-to-ill", "--sdk=go")) content, err := modGen.File("LICENSE").Contents(ctx) require.NoError(t, err) require.Contains(t, content, "Apache License, Version 2.0") }) t.Run("creates LICENSE file in the directory specified by -m", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "-m", "./mymod", "--name=licensed-to-ill", "--sdk=go")) content, err := modGen.File("mymod/LICENSE").Contents(ctx) require.NoError(t, err) require.Contains(t, content, "Apache License, Version 2.0") }) t.Run("does not bootstrap LICENSE file if it exists in the parent dir", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/LICENSE", dagger.ContainerWithNewFileOpts{ Contents: "doesnt matter", }). WithWorkdir("/work/sub"). With(daggerExec("mod", "init", "--name=licensed-to-ill", "--sdk=go")) _, err := modGen.File("LICENSE").Contents(ctx) require.Error(t, err) }) t.Run("bootstraps a LICENSE file when requested, even if it exists in the parent dir", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/LICENSE", dagger.ContainerWithNewFileOpts{ Contents: "doesnt matter", }). WithWorkdir("/work/sub"). With(daggerExec("mod", "init", "--name=licensed-to-ill", "--sdk=go", "--license=MIT")) content, err := modGen.File("LICENSE").Contents(ctx) require.NoError(t, err) require.Contains(t, content, "MIT License") }) } func TestModuleGit(t *testing.T) { t.Parallel() type testCase struct { sdk string gitignores []string } for _, tc := range []testCase{ { sdk: "go", gitignores: []string{ "/dagger.gen.go\n", "/querybuilder/\n", }, }, { sdk: "python", gitignores: []string{ "/sdk\n", }, }, } { tc := tc t.Run(fmt.Sprintf("module %s git", tc.sdk), func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := goGitBase(t, c). With(daggerExec("mod", "init", "--name=bare", "--sdk="+tc.sdk)) if tc.sdk == "go" { logGen(ctx, t, modGen.Directory(".")) } out, err := modGen. With(daggerQuery(`{bare{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"bare":{"containerEcho":{"stdout":"hello\n"}}}`, out) t.Run("configures .gitignore", func(t *testing.T) { ignore, err := modGen.File(".gitignore").Contents(ctx) require.NoError(t, err) for _, gitignore := range tc.gitignores { require.Contains(t, ignore, gitignore) } }) }) } } func TestModuleGoGitRemovesIgnored(t *testing.T) { t.Parallel() c, ctx := connect(t) committedModGen := goGitBase(t, c). With(daggerExec("mod", "init", "--name=bare", "--sdk=go")). WithExec([]string{"rm", ".gitignore"}). // simulate old path scheme to show we ignore it too to help transition WithExec([]string{"mkdir", "./internal"}). WithExec([]string{"cp", "-a", "./querybuilder", "./internal/querybuilder"}). WithExec([]string{"git", "add", "."}). WithExec([]string{"git", "commit", "-m", "init with generated files"}) changedAfterSync, err := committedModGen. With(daggerExec("mod", "sync")). WithExec([]string{"git", "diff"}). // for debugging WithExec([]string{"git", "status", "--short"}). Stdout(ctx) require.NoError(t, err) t.Logf("changed after sync:\n%s", changedAfterSync) require.Contains(t, changedAfterSync, "D dagger.gen.go\n") require.Contains(t, changedAfterSync, "D querybuilder/marshal.go\n") require.Contains(t, changedAfterSync, "D querybuilder/querybuilder.go\n") require.Contains(t, changedAfterSync, "D internal/querybuilder/marshal.go\n") require.Contains(t, changedAfterSync, "D internal/querybuilder/querybuilder.go\n") } func TestModulePythonGitRemovesIgnored(t *testing.T) { t.Parallel() c, ctx := connect(t) committedModGen := goGitBase(t, c). With(daggerExec("mod", "init", "--name=bare", "--sdk=python")). WithExec([]string{"rm", ".gitignore"}). WithExec([]string{"git", "add", "."}). WithExec([]string{"git", "commit", "-m", "init with generated files"}) changedAfterSync, err := committedModGen. With(daggerExec("mod", "sync")). WithExec([]string{"git", "diff"}). // for debugging WithExec([]string{"git", "status", "--short"}). Stdout(ctx) require.NoError(t, err) t.Logf("changed after sync:\n%s", changedAfterSync) require.Contains(t, changedAfterSync, "D sdk/pyproject.toml\n") require.Contains(t, changedAfterSync, "D sdk/src/dagger/__init__.py\n") } //go:embed testdata/modules/go/minimal/main.go var goSignatures string func TestModuleGoSignatures(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: goSignatures, }) logGen(ctx, t, modGen.Directory(".")) t.Run("func Hello() string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{hello}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"hello":"hello"}}`, out) }) t.Run("func Echo(string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echo(msg: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echo":"hello...hello...hello..."}}`, out) }) t.Run("func EchoPointer(*string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoPointer(msg: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoPointer":"hello...hello...hello..."}}`, out) }) t.Run("func EchoPointerPointer(**string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoPointerPointer(msg: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoPointerPointer":"hello...hello...hello..."}}`, out) }) t.Run("func EchoOptional(string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOptional(msg: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptional":"hello...hello...hello..."}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOptional}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptional":"default...default...default..."}}`, out) }) t.Run("func EchoOptionalPointer(string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOptionalPointer(msg: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptionalPointer":"hello...hello...hello..."}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOptionalPointer}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptionalPointer":"default...default...default..."}}`, out) }) t.Run("func EchoOptionalSlice([]string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOptionalSlice(msg: ["hello", "there"])}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptionalSlice":"hello+there...hello+there...hello+there..."}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOptionalSlice}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptionalSlice":"foobar...foobar...foobar..."}}`, out) }) t.Run("func Echoes([]string) []string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoes(msgs: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoes":["hello...hello...hello..."]}}`, out) }) t.Run("func EchoesVariadic(...string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoesVariadic(msgs: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoesVariadic":"hello...hello...hello..."}}`, out) }) t.Run("func HelloContext(context.Context) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{helloContext}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"helloContext":"hello context"}}`, out) }) t.Run("func EchoContext(context.Context, string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoContext(msg: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoContext":"ctx.hello...ctx.hello...ctx.hello..."}}`, out) }) t.Run("func HelloStringError() (string, error)", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{helloStringError}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"helloStringError":"hello i worked"}}`, out) }) t.Run("func HelloVoid()", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{helloVoid}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"helloVoid":null}}`, out) }) t.Run("func HelloVoidError() error", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{helloVoidError}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"helloVoidError":null}}`, out) }) t.Run("func EchoOpts(string, string, int) error", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOpts(msg: "hi")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOpts":"hi"}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOpts(msg: "hi", suffix: "!", times: 2)}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOpts":"hi!hi!"}}`, out) }) t.Run("func EchoOptsInline(struct{string, string, int}) error", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOptsInline(msg: "hi")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInline":"hi"}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOptsInline(msg: "hi", suffix: "!", times: 2)}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInline":"hi!hi!"}}`, out) }) t.Run("func EchoOptsInlinePointer(*struct{string, string, int}) error", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOptsInlinePointer(msg: "hi")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInlinePointer":"hi"}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOptsInlinePointer(msg: "hi", suffix: "!", times: 2)}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInlinePointer":"hi!hi!"}}`, out) }) t.Run("func EchoOptsInlineCtx(ctx, struct{string, string, int}) error", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOptsInlineCtx(msg: "hi")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInlineCtx":"hi"}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOptsInlineCtx(msg: "hi", suffix: "!", times: 2)}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInlineCtx":"hi!hi!"}}`, out) }) t.Run("func EchoOptsInlineTags(struct{string, string, int}) error", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOptsInlineTags(msg: "hi")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInlineTags":"hi"}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOptsInlineTags(msg: "hi", suffix: "!", times: 2)}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInlineTags":"hi!hi!"}}`, out) }) } func TestModuleGoSignaturesBuiltinTypes(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main import "context" type Minimal struct {} func (m *Minimal) Read(ctx context.Context, dir Directory) (string, error) { return dir.File("foo").Contents(ctx) } func (m *Minimal) ReadPointer(ctx context.Context, dir *Directory) (string, error) { return dir.File("foo").Contents(ctx) } func (m *Minimal) ReadSlice(ctx context.Context, dir []Directory) (string, error) { return dir[0].File("foo").Contents(ctx) } func (m *Minimal) ReadVariadic(ctx context.Context, dir ...Directory) (string, error) { return dir[0].File("foo").Contents(ctx) } func (m *Minimal) ReadOptional(ctx context.Context, dir Optional[Directory]) (string, error) { d, ok := dir.Get() if ok { return d.File("foo").Contents(ctx) } return "", nil } `, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerQuery(`{directory{withNewFile(path: "foo", contents: "bar"){id}}}`)).Stdout(ctx) require.NoError(t, err) dirID := gjson.Get(out, "directory.withNewFile.id").String() t.Run("func Read(ctx, Directory) (string, error)", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(fmt.Sprintf(`{minimal{read(dir: "%s")}}`, dirID))).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"read":"bar"}}`, out) }) t.Run("func ReadPointer(ctx, *Directory) (string, error)", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(fmt.Sprintf(`{minimal{readPointer(dir: "%s")}}`, dirID))).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"readPointer":"bar"}}`, out) }) t.Run("func ReadSlice(ctx, []Directory) (string, error)", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(fmt.Sprintf(`{minimal{readSlice(dir: ["%s"])}}`, dirID))).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"readSlice":"bar"}}`, out) }) t.Run("func ReadVariadic(ctx, ...Directory) (string, error)", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(fmt.Sprintf(`{minimal{readVariadic(dir: ["%s"])}}`, dirID))).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"readVariadic":"bar"}}`, out) }) t.Run("func ReadOptional(ctx, Optional[Directory]) (string, error)", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(fmt.Sprintf(`{minimal{readOptional(dir: "%s")}}`, dirID))).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"readOptional":"bar"}}`, out) out, err = modGen.With(daggerQuery(`{minimal{readOptional}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"readOptional":""}}`, out) }) } func TestModuleGoSignaturesUnexported(t *testing.T) { t.Parallel() var logs safeBuffer c, ctx := connect(t, dagger.WithLogOutput(&logs)) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Minimal struct {} type Foo struct {} type bar struct {} func (m *Minimal) Hello(name string) string { return name } func (f *Foo) Hello(name string) string { return name } func (b *bar) Hello(name string) string { return name } `, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(inspectModule).Stdout(ctx) require.NoError(t, err) objs := gjson.Get(out, "host.directory.asModule.objects") require.Equal(t, 2, len(objs.Array())) minimal := objs.Get(`0.asObject`) require.Equal(t, "Minimal", minimal.Get("name").String()) foo := objs.Get(`1.asObject`) require.Equal(t, "MinimalFoo", foo.Get("name").String()) modGen = c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Minimal struct {} type Foo struct { Bar bar } type bar struct {} func (m *Minimal) Hello(name string) string { return name } func (f *Foo) Hello(name string) string { return name } func (b *bar) Hello(name string) string { return name } `, }) logGen(ctx, t, modGen.Directory(".")) _, err = modGen.With(inspectModule).Stderr(ctx) require.Error(t, err) require.NoError(t, c.Close()) require.Contains(t, logs.String(), "cannot code-generate unexported type bar") } func TestModuleGoSignaturesMixMatch(t *testing.T) { t.Parallel() var logs safeBuffer c, ctx := connect(t, dagger.WithLogOutput(&logs)) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Minimal struct {} func (m *Minimal) Hello(name string, opts struct{}, opts2 struct{}) string { return name } `, }) logGen(ctx, t, modGen.Directory(".")) _, err := modGen.With(daggerQuery(`{minimal{hello}}`)).Stdout(ctx) require.Error(t, err) require.NoError(t, c.Close()) require.Contains(t, logs.String(), "nested structs are not supported") } var inspectModule = daggerQuery(` query { host { directory(path: ".") { asModule { objects { asObject { name description functions { name description args { name description } } fields { name description } } } } } } } `) func TestModuleGoDocs(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: goSignatures, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(inspectModule).Stdout(ctx) require.NoError(t, err) obj := gjson.Get(out, "host.directory.asModule.objects.0.asObject") require.Equal(t, "Minimal", obj.Get("name").String()) hello := obj.Get(`functions.#(name="hello")`) require.Equal(t, "hello", hello.Get("name").String()) require.Empty(t, hello.Get("description").String()) require.Empty(t, hello.Get("args").Array()) // test the args-based form echoOpts := obj.Get(`functions.#(name="echoOpts")`) require.Equal(t, "echoOpts", echoOpts.Get("name").String()) require.Equal(t, "EchoOpts does some opts things", echoOpts.Get("description").String()) require.Len(t, echoOpts.Get("args").Array(), 3) require.Equal(t, "msg", echoOpts.Get("args.0.name").String()) require.Equal(t, "the message to echo", echoOpts.Get("args.0.description").String()) require.Equal(t, "suffix", echoOpts.Get("args.1.name").String()) require.Equal(t, "String to append to the echoed message", echoOpts.Get("args.1.description").String()) require.Equal(t, "times", echoOpts.Get("args.2.name").String()) require.Equal(t, "Number of times to repeat the message", echoOpts.Get("args.2.description").String()) // test the inline struct form echoOpts = obj.Get(`functions.#(name="echoOptsInline")`) require.Equal(t, "echoOptsInline", echoOpts.Get("name").String()) require.Equal(t, "EchoOptsInline does some opts things", echoOpts.Get("description").String()) require.Len(t, echoOpts.Get("args").Array(), 3) require.Equal(t, "msg", echoOpts.Get("args.0.name").String()) require.Equal(t, "the message to echo", echoOpts.Get("args.0.description").String()) require.Equal(t, "suffix", echoOpts.Get("args.1.name").String()) require.Equal(t, "String to append to the echoed message", echoOpts.Get("args.1.description").String()) require.Equal(t, "times", echoOpts.Get("args.2.name").String()) require.Equal(t, "Number of times to repeat the message", echoOpts.Get("args.2.description").String()) } func TestModuleGoDocsEdgeCases(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main // Minimal is a thing type Minimal struct { // X is this X, Y string // Y is not this } // some docs func (m *Minimal) Hello(foo string, bar string, // hello baz string, qux string, x string, // lol ) string { return foo + bar } func (m *Minimal) HelloMore( // foo here foo, // bar here bar string, ) string { return foo + bar } func (m *Minimal) HelloMoreInline(opts struct{ // foo here foo, bar string }) string { return opts.foo + opts.bar } func (m *Minimal) HelloAgain( // docs for helloagain foo string, bar string, // docs for bar baz string, ) string { return foo + bar } func (m *Minimal) HelloFinal( foo string) string { // woops return foo } `, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(inspectModule).Stdout(ctx) require.NoError(t, err) obj := gjson.Get(out, "host.directory.asModule.objects.0.asObject") require.Equal(t, "Minimal", obj.Get("name").String()) require.Equal(t, "Minimal is a thing", obj.Get("description").String()) hello := obj.Get(`functions.#(name="hello")`) require.Equal(t, "hello", hello.Get("name").String()) require.Len(t, hello.Get("args").Array(), 5) require.Equal(t, "foo", hello.Get("args.0.name").String()) require.Equal(t, "", hello.Get("args.0.description").String()) require.Equal(t, "bar", hello.Get("args.1.name").String()) require.Equal(t, "", hello.Get("args.1.description").String()) require.Equal(t, "baz", hello.Get("args.2.name").String()) require.Equal(t, "hello", hello.Get("args.2.description").String()) require.Equal(t, "qux", hello.Get("args.3.name").String()) require.Equal(t, "", hello.Get("args.3.description").String()) require.Equal(t, "x", hello.Get("args.4.name").String()) require.Equal(t, "lol", hello.Get("args.4.description").String()) hello = obj.Get(`functions.#(name="helloMore")`) require.Equal(t, "helloMore", hello.Get("name").String()) require.Len(t, hello.Get("args").Array(), 2) require.Equal(t, "foo", hello.Get("args.0.name").String()) require.Equal(t, "foo here", hello.Get("args.0.description").String()) require.Equal(t, "bar", hello.Get("args.1.name").String()) require.Equal(t, "bar here", hello.Get("args.1.description").String()) hello = obj.Get(`functions.#(name="helloMoreInline")`) require.Equal(t, "helloMoreInline", hello.Get("name").String()) require.Len(t, hello.Get("args").Array(), 2) require.Equal(t, "foo", hello.Get("args.0.name").String()) require.Equal(t, "foo here", hello.Get("args.0.description").String()) require.Equal(t, "bar", hello.Get("args.1.name").String()) require.Equal(t, "", hello.Get("args.1.description").String()) hello = obj.Get(`functions.#(name="helloAgain")`) require.Equal(t, "helloAgain", hello.Get("name").String()) require.Len(t, hello.Get("args").Array(), 3) require.Equal(t, "foo", hello.Get("args.0.name").String()) require.Equal(t, "", hello.Get("args.0.description").String()) require.Equal(t, "bar", hello.Get("args.1.name").String()) require.Equal(t, "docs for bar", hello.Get("args.1.description").String()) require.Equal(t, "baz", hello.Get("args.2.name").String()) require.Equal(t, "", hello.Get("args.2.description").String()) hello = obj.Get(`functions.#(name="helloFinal")`) require.Equal(t, "helloFinal", hello.Get("name").String()) require.Len(t, hello.Get("args").Array(), 1) require.Equal(t, "foo", hello.Get("args.0.name").String()) require.Equal(t, "", hello.Get("args.0.description").String()) prop := obj.Get(`fields.#(name="x")`) require.Equal(t, "x", prop.Get("name").String()) require.Equal(t, "X is this", prop.Get("description").String()) prop = obj.Get(`fields.#(name="y")`) require.Equal(t, "y", prop.Get("name").String()) require.Equal(t, "", prop.Get("description").String()) } //go:embed testdata/modules/go/extend/main.go var goExtend string // this is no longer allowed, but verify the SDK errors out func TestModuleGoExtendCore(t *testing.T) { t.Parallel() var logs safeBuffer c, ctx := connect(t, dagger.WithLogOutput(&logs)) _, err := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: goExtend, }). With(daggerExec("mod", "sync")). Sync(ctx) require.Error(t, err) require.NoError(t, c.Close()) require.Contains(t, logs.String(), "cannot define methods on objects from outside this module") } //go:embed testdata/modules/go/custom-types/main.go var goCustomTypes string //go:embed testdata/modules/python/custom-types/main.py var pythonCustomTypes string func TestModuleCustomTypes(t *testing.T) { t.Parallel() type testCase struct { sdk string sourcePath string sourceContent string } for _, tc := range []testCase{ { sdk: "go", sourcePath: "main.go", sourceContent: goCustomTypes, }, { sdk: "python", sourcePath: "src/main.py", sourceContent: pythonCustomTypes, }, } { t.Run(fmt.Sprintf("custom %s types", tc.sdk), func(t *testing.T) { c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk="+tc.sdk)). WithNewFile(tc.sourcePath, dagger.ContainerWithNewFileOpts{ Contents: tc.sourceContent, }) if tc.sdk == "go" { logGen(ctx, t, modGen.Directory(".")) } out, err := modGen.With(daggerQuery(`{test{repeater(msg:"echo!", times: 3){render}}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"test":{"repeater":{"render":"echo!echo!echo!"}}}`, out) }) } } func TestModuleGoReturnTypeDetection(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=foo", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Foo struct {} type X struct { Message string ` + "`json:\"message\"`" + ` } func (m *Foo) MyFunction() X { return X{Message: "foo"} } `, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerQuery(`{foo{myFunction{message}}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"foo":{"myFunction":{"message":"foo"}}}`, out) } func TestModuleGoReturnStruct(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=foo", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Foo struct {} type X struct { Message string ` + "`json:\"message\"`" + ` When string ` + "`json:\"Timestamp\"`" + ` To string ` + "`json:\"recipient\"`" + ` From string } func (m *Foo) MyFunction() X { return X{Message: "foo", When: "now", To: "user", From: "admin"} } `, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerQuery(`{foo{myFunction{message, recipient, from, timestamp}}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"foo":{"myFunction":{"message":"foo", "recipient":"user", "from":"admin", "timestamp":"now"}}}`, out) } func TestModuleGoReturnNestedStruct(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=playground", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Playground struct{} type Foo struct { MsgContainer Bar } type Bar struct { Msg string } func (m *Playground) MyFunction() Foo { return Foo{MsgContainer: Bar{Msg: "hello world"}} } `, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerQuery(`{playground{myFunction{msgContainer{msg}}}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"playground":{"myFunction":{"msgContainer":{"msg": "hello world"}}}}`, out) } func TestModuleGoReturnCompositeCore(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=playground", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Playground struct{} func (m *Playground) MySlice() []*Container { return []*Container{dag.Container().From("alpine:latest").WithExec([]string{"echo", "hello world"})} } type Foo struct { Con *Container } func (m *Playground) MyStruct() *Foo { return &Foo{Con: dag.Container().From("alpine:latest").WithExec([]string{"echo", "hello world"})} } `, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerQuery(`{playground{mySlice{stdout}}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"playground":{"mySlice":[{"stdout":"hello world\n"}]}}`, out) out, err = modGen.With(daggerQuery(`{playground{myStruct{con{stdout}}}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"playground":{"myStruct":{"con":{"stdout":"hello world\n"}}}}`, out) } func TestModuleGoReturnComplexThing(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=playground", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Playground struct{} type ScanResult struct { Containers []*Container ` + "`json:\"targets\"`" + ` Report ScanReport } type ScanReport struct { Contents string ` + "`json:\"contents\"`" + ` Authors []string ` + "`json:\"Authors\"`" + ` } func (m *Playground) Scan() ScanResult { return ScanResult{ Containers: []*Container{ dag.Container().From("alpine:latest").WithExec([]string{"echo", "hello world"}), }, Report: ScanReport{ Contents: "hello world", Authors: []string{"foo", "bar"}, }, } } `, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerQuery(`{playground{scan{targets{stdout},report{contents,authors}}}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"playground":{"scan":{"targets":[{"stdout":"hello world\n"}],"report":{"contents":"hello world","authors":["foo","bar"]}}}}`, out) } func TestModuleGoGlobalVarDAG(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=foo", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main import "context" type Foo struct {} var someDefault = dag.Container().From("alpine:latest") func (m *Foo) Fn(ctx context.Context) (string, error) { return someDefault.WithExec([]string{"echo", "foo"}).Stdout(ctx) } `, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerQuery(`{foo{fn}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"foo":{"fn":"foo\n"}}`, out) } func TestModuleIDableType(t *testing.T) { t.Parallel() c, ctx := connect(t) type testCase struct { sdk string source string } for _, tc := range []testCase{ { sdk: "go", source: `package main type Foo struct { Data string } func (m *Foo) Set(data string) *Foo { m.Data = data return m } func (m *Foo) Get() string { return m.Data } `, }, { sdk: "python", source: `from typing import Self from dagger import field, function, object_type @object_type class Foo: data: str = "" @function def set(self, data: str) -> Self: self.data = data return self @function def get(self) -> str: return self.data `, }, } { tc := tc t.Run(tc.sdk, func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=foo", "--sdk="+tc.sdk)). With(sdkSource(tc.sdk, tc.source)) if tc.sdk == "go" { logGen(ctx, t, modGen.Directory(".")) } // sanity check out, err := modGen.With(daggerQuery(`{foo{set(data: "abc"){get}}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"foo":{"set":{"get": "abc"}}}`, out) out, err = modGen.With(daggerQuery(`{foo{set(data: "abc"){id}}}`)).Stdout(ctx) require.NoError(t, err) id := gjson.Get(out, "foo.set.id").String() require.Contains(t, id, "moddata:") out, err = modGen.With(daggerQuery(`{loadFooFromID(id: "%s"){get}}`, id)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"loadFooFromID":{"get": "abc"}}`, out) }) } } func TestModuleArgOwnType(t *testing.T) { // Verify use of a module's own object as an argument type. // The server needs to specifically decode the input type from an ID into // the raw JSON, since the module doesn't understand it's own types as IDs t.Parallel() c, ctx := connect(t) type testCase struct { sdk string source string } for _, tc := range []testCase{ { sdk: "go", source: `package main import "strings" type Foo struct{} type Message struct { Content string } func (m *Foo) SayHello(name string) Message { return Message{Content: "hello " + name} } func (m *Foo) Upper(msg Message) Message { msg.Content = strings.ToUpper(msg.Content) return msg } func (m *Foo) Uppers(msg []Message) []Message { for i := range msg { msg[i].Content = strings.ToUpper(msg[i].Content) } return msg }`, }, { sdk: "python", source: `from dagger import field, function, object_type @object_type class Message: content: str = field() @object_type class Foo: @function def say_hello(self, name: str) -> Message: return Message(content=f"hello {name}") @function def upper(self, msg: Message) -> Message: msg.content = msg.content.upper() return msg @function def uppers(self, msg: list[Message]) -> list[Message]: for m in msg: m.content = m.content.upper() return msg `, }, } { tc := tc t.Run(tc.sdk, func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=foo", "--sdk="+tc.sdk)). With(sdkSource(tc.sdk, tc.source)) if tc.sdk == "go" { logGen(ctx, t, modGen.Directory(".")) } out, err := modGen.With(daggerQuery(`{foo{sayHello(name: "world"){id}}}`)).Stdout(ctx) require.NoError(t, err) id := gjson.Get(out, "foo.sayHello.id").String() require.Contains(t, id, "moddata:") out, err = modGen.With(daggerQuery(`{foo{upper(msg:"%s"){content}}}`, id)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"foo":{"upper":{"content": "HELLO WORLD"}}}`, out) out, err = modGen.With(daggerQuery(`{foo{uppers(msg:["%s", "%s"]){content}}}`, id, id)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"foo":{"uppers":[{"content": "HELLO WORLD"}, {"content": "HELLO WORLD"}]}}`, out) }) } } func TestModuleConflictingSameNameDeps(t *testing.T) { // A -> B -> Dint // A -> C -> Dstr // where Dint and Dstr are modules with the same name and same object names but conflicting types t.Parallel() c, ctx := connect(t) ctr := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/dstr"). With(daggerExec("mod", "init", "--name=d", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type D struct{} type Obj struct { Foo string } func (m *D) Fn(foo string) Obj { return Obj{Foo: foo} } `, }) ctr = ctr. WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/dint"). With(daggerExec("mod", "init", "--name=d", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type D struct{} type Obj struct { Foo int } func (m *D) Fn(foo int) Obj { return Obj{Foo: foo} } `, }) ctr = ctr. WithWorkdir("/work/c"). With(daggerExec("mod", "init", "--name=c", "--sdk=go", "--root=..")). With(daggerExec("mod", "install", "../dstr")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main import ( "context" ) type C struct{} func (m *C) Fn(ctx context.Context, foo string) (string, error) { return dag.D().Fn(foo).Foo(ctx) } `, }) ctr = ctr. WithWorkdir("/work/b"). With(daggerExec("mod", "init", "--name=b", "--sdk=go", "--root=..")). With(daggerExec("mod", "install", "../dint")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main import ( "context" ) type B struct{} func (m *B) Fn(ctx context.Context, foo int) (int, error) { return dag.D().Fn(foo).Foo(ctx) } `, }) ctr = ctr. WithWorkdir("/work/a"). With(daggerExec("mod", "init", "--name=a", "--sdk=go", "--root=..")). With(daggerExec("mod", "install", "../b")). With(daggerExec("mod", "install", "../c")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main import ( "context" "strconv" ) type A struct{} func (m *A) Fn(ctx context.Context) (string, error) { fooStr, err := dag.C().Fn(ctx, "foo") if err != nil { return "", err } fooInt, err := dag.B().Fn(ctx, 123) if err != nil { return "", err } return fooStr + strconv.Itoa(fooInt), nil } `, }) out, err := ctr.With(daggerQuery(`{a{fn}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"a":{"fn": "foo123"}}`, out) // verify that no types from (transitive) deps show up types := currentSchema(ctx, t, ctr).Types require.NotNil(t, types.Get("A")) require.Nil(t, types.Get("B")) require.Nil(t, types.Get("C")) require.Nil(t, types.Get("D")) } func TestModuleWithOtherModuleTypes(t *testing.T) { t.Parallel() c, ctx := connect(t) ctr := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/dep"). With(daggerExec("mod", "init", "--name=dep", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Dep struct{} type Obj struct { Foo string } func (m *Dep) Fn() Obj { return Obj{Foo: "foo"} } `, }). WithWorkdir("/work/test"). With(daggerExec("mod", "init", "--name=test", "--sdk=go", "--root=..")). With(daggerExec("mod", "install", "../dep")) t.Run("return as other module object", func(t *testing.T) { t.Parallel() t.Run("direct", func(t *testing.T) { t.Parallel() _, err := ctr. WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Test struct{} func (m *Test) Fn() (*DepObj, error) { return nil, nil } `, }). With(daggerFunctions()). Stdout(ctx) require.Error(t, err) require.ErrorContains(t, err, fmt.Sprintf( "object %q function %q cannot return external type from dependency module %q", "Test", "Fn", "dep", )) }) t.Run("list", func(t *testing.T) { t.Parallel() _, err := ctr. WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Test struct{} func (m *Test) Fn() ([]*DepObj, error) { return nil, nil } `, }). With(daggerFunctions()). Stdout(ctx) require.Error(t, err) require.ErrorContains(t, err, fmt.Sprintf( "object %q function %q cannot return external type from dependency module %q", "Test", "Fn", "dep", )) }) }) t.Run("arg as other module object", func(t *testing.T) { t.Parallel() t.Run("direct", func(t *testing.T) { t.Parallel() _, err := ctr.WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Test struct{} func (m *Test) Fn(obj *DepObj) error { return nil } `, }). With(daggerFunctions()). Stdout(ctx) require.Error(t, err) require.ErrorContains(t, err, fmt.Sprintf( "object %q function %q arg %q cannot reference external type from dependency module %q", "Test", "Fn", "obj", "dep", )) }) t.Run("list", func(t *testing.T) { t.Parallel() _, err := ctr.WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Test struct{} func (m *Test) Fn(obj []*DepObj) error { return nil } `, }). With(daggerFunctions()). Stdout(ctx) require.Error(t, err) require.ErrorContains(t, err, fmt.Sprintf( "object %q function %q arg %q cannot reference external type from dependency module %q", "Test", "Fn", "obj", "dep", )) }) }) t.Run("field as other module object", func(t *testing.T) { t.Parallel() t.Run("direct", func(t *testing.T) { t.Parallel() _, err := ctr. WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Test struct{} type Obj struct { Foo *DepObj } func (m *Test) Fn() (*Obj, error) { return nil, nil } `, }). With(daggerFunctions()). Stdout(ctx) require.Error(t, err) require.ErrorContains(t, err, fmt.Sprintf( "object %q field %q cannot reference external type from dependency module %q", "Obj", "Foo", "dep", )) }) t.Run("list", func(t *testing.T) { t.Parallel() _, err := ctr. WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Test struct{} type Obj struct { Foo []*DepObj } func (m *Test) Fn() (*Obj, error) { return nil, nil } `, }). With(daggerFunctions()). Stdout(ctx) require.Error(t, err) require.ErrorContains(t, err, fmt.Sprintf( "object %q field %q cannot reference external type from dependency module %q", "Obj", "Foo", "dep", )) }) }) } //go:embed testdata/modules/go/use/dep/main.go var useInner string //go:embed testdata/modules/go/use/main.go var useOuter string func TestModuleUseLocal(t *testing.T) { t.Parallel() c, ctx := connect(t) t.Run("go uses go", func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/dep"). With(daggerExec("mod", "init", "--name=dep", "--sdk=go")). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=use", "--sdk=go")). WithNewFile("/work/dep/main.go", dagger.ContainerWithNewFileOpts{ Contents: useInner, }). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: useOuter, }). With(daggerExec("mod", "install", "./dep")). WithEnvVariable("BUST", identity.NewID()) // NB(vito): hmm... logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerQuery(`{use{useHello}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"use":{"useHello":"hello"}}`, out) // cannot use transitive dependency directly _, err = modGen.With(daggerQuery(`{dep{hello}}`)).Stdout(ctx) require.Error(t, err) require.ErrorContains(t, err, `Cannot query field "dep" on type "Query".`) }) t.Run("python uses go", func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/dep"). With(daggerExec("mod", "init", "--name=dep", "--sdk=go")). WithNewFile("/work/dep/main.go", dagger.ContainerWithNewFileOpts{ Contents: useInner, }). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=use", "--sdk=python")). With(daggerExec("mod", "install", "./dep")). WithNewFile("/work/src/main.py", dagger.ContainerWithNewFileOpts{ Contents: `from dagger import dag, function @function def use_hello() -> str: return dag.dep().hello() `, }) out, err := modGen.With(daggerQuery(`{use{useHello}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"use":{"useHello":"hello"}}`, out) // cannot use transitive dependency directly _, err = modGen.With(daggerQuery(`{dep{hello}}`)).Stdout(ctx) require.Error(t, err) require.ErrorContains(t, err, `Cannot query field "dep" on type "Query".`) }) } func TestModuleCodegenonDepChange(t *testing.T) { t.Parallel() c, ctx := connect(t) t.Run("go uses go", func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/dep"). With(daggerExec("mod", "init", "--name=dep", "--sdk=go")). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=use", "--sdk=go")). WithNewFile("/work/dep/main.go", dagger.ContainerWithNewFileOpts{ Contents: useInner, }). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: useOuter, }). With(daggerExec("mod", "install", "./dep")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerQuery(`{use{useHello}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"use":{"useHello":"hello"}}`, out) // make back-incompatible change to dep newInner := strings.ReplaceAll(useInner, `Hello()`, `Hellov2()`) modGen = modGen. WithNewFile("/work/dep/main.go", dagger.ContainerWithNewFileOpts{ Contents: newInner, }). WithExec([]string{"sh", "-c", "dagger mod sync"}, dagger.ContainerWithExecOpts{ ExperimentalPrivilegedNesting: true, }) codegenContents, err := modGen.File("/work/dagger.gen.go").Contents(ctx) require.NoError(t, err) require.Contains(t, codegenContents, "Hellov2") newOuter := strings.ReplaceAll(useOuter, `Hello(ctx)`, `Hellov2(ctx)`) modGen = modGen. WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: newOuter, }) out, err = modGen.With(daggerQuery(`{use{useHello}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"use":{"useHello":"hello"}}`, out) }) t.Run("python uses go", func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/dep"). With(daggerExec("mod", "init", "--name=dep", "--sdk=go")). WithNewFile("/work/dep/main.go", dagger.ContainerWithNewFileOpts{ Contents: useInner, }). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=use", "--sdk=python")). With(daggerExec("mod", "install", "./dep")). WithNewFile("/work/src/main.py", dagger.ContainerWithNewFileOpts{ Contents: `from dagger import dag, function @function def use_hello() -> str: return dag.dep().hello() `, }) out, err := modGen.With(daggerQuery(`{use{useHello}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"use":{"useHello":"hello"}}`, out) // make back-incompatible change to dep newInner := strings.ReplaceAll(useInner, `Hello()`, `Hellov2()`) modGen = modGen. WithNewFile("/work/dep/main.go", dagger.ContainerWithNewFileOpts{ Contents: newInner, }). WithExec([]string{"sh", "-c", "dagger mod sync"}, dagger.ContainerWithExecOpts{ ExperimentalPrivilegedNesting: true, }) codegenContents, err := modGen.File("/work/sdk/src/dagger/client/gen.py").Contents(ctx) require.NoError(t, err) require.Contains(t, codegenContents, "hellov2") modGen = modGen. WithNewFile("/work/src/main.py", dagger.ContainerWithNewFileOpts{ Contents: `from dagger import dag, function @function def use_hello() -> str: return dag.dep().hellov2() `, }) out, err = modGen.With(daggerQuery(`{use{useHello}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"use":{"useHello":"hello"}}`, out) }) } func TestModuleGoUseLocalMulti(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/foo"). WithNewFile("/work/foo/main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Foo struct {} func (m *Foo) Name() string { return "foo" } `, }). With(daggerExec("mod", "init", "--name=foo", "--sdk=go")). WithWorkdir("/work/bar"). WithNewFile("/work/bar/main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Bar struct {} func (m *Bar) Name() string { return "bar" } `, }). With(daggerExec("mod", "init", "--name=bar", "--sdk=go")). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=use", "--sdk=go")). With(daggerExec("mod", "install", "./foo")). With(daggerExec("mod", "install", "./bar")). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main import "context" import "fmt" type Use struct {} func (m *Use) Names(ctx context.Context) ([]string, error) { fooName, err := dag.Foo().Name(ctx) if err != nil { return nil, fmt.Errorf("foo.name: %w", err) } barName, err := dag.Bar().Name(ctx) if err != nil { return nil, fmt.Errorf("bar.name: %w", err) } return []string{fooName, barName}, nil } `, }). WithEnvVariable("BUST", identity.NewID()) // NB(vito): hmm... logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerQuery(`{use{names}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"use":{"names":["foo", "bar"]}}`, out) } func TestModuleConstructor(t *testing.T) { t.Parallel() c, ctx := connect(t) type testCase struct { sdk string source string } t.Run("basic", func(t *testing.T) { t.Parallel() for _, tc := range []testCase{ { sdk: "go", source: `package main import ( "context" ) func New( ctx context.Context, foo string, bar Optional[int], baz []string, dir *Directory, ) *Test { return &Test{ Foo: foo, Bar: bar.GetOr(42), Baz: baz, Dir: dir, } } type Test struct { Foo string Bar int Baz []string Dir *Directory } func (m *Test) GimmeFoo() string { return m.Foo } func (m *Test) GimmeBar() int { return m.Bar } func (m *Test) GimmeBaz() []string { return m.Baz } func (m *Test) GimmeDirEnts(ctx context.Context) ([]string, error) { return m.Dir.Entries(ctx) } `, }, { sdk: "python", source: `import dagger from dagger import field, function, object_type @object_type class Test: foo: str = field() dir: dagger.Directory = field() bar: int = field(default=42) baz: list[str] = field(default=list) @function def gimme_foo(self) -> str: return self.foo @function def gimme_bar(self) -> int: return self.bar @function def gimme_baz(self) -> list[str]: return self.baz @function async def gimme_dir_ents(self) -> list[str]: return await self.dir.entries() `, }, } { tc := tc t.Run(tc.sdk, func(t *testing.T) { t.Parallel() ctr := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/test"). With(daggerExec("mod", "init", "--name=test", "--sdk="+tc.sdk)). With(sdkSource(tc.sdk, tc.source)) out, err := ctr.With(daggerCall("--foo=abc", "--baz=x,y,z", "--dir=.", "foo")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "abc") out, err = ctr.With(daggerCall("--foo=abc", "--baz=x,y,z", "--dir=.", "gimme-foo")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "abc") out, err = ctr.With(daggerCall("--foo=abc", "--baz=x,y,z", "--dir=.", "bar")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "42") out, err = ctr.With(daggerCall("--foo=abc", "--baz=x,y,z", "--dir=.", "gimme-bar")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "42") out, err = ctr.With(daggerCall("--foo=abc", "--bar=123", "--baz=x,y,z", "--dir=.", "bar")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "123") out, err = ctr.With(daggerCall("--foo=abc", "--bar=123", "--baz=x,y,z", "--dir=.", "gimme-bar")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "123") out, err = ctr.With(daggerCall("--foo=abc", "--bar=123", "--baz=x,y,z", "--dir=.", "baz")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "x\ny\nz") out, err = ctr.With(daggerCall("--foo=abc", "--bar=123", "--baz=x,y,z", "--dir=.", "gimme-baz")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "x\ny\nz") out, err = ctr.With(daggerCall("--foo=abc", "--bar=123", "--baz=x,y,z", "--dir=.", "gimme-dir-ents")).Stdout(ctx) require.NoError(t, err) require.Contains(t, strings.TrimSpace(out), "dagger.json") }) } }) t.Run("fields only", func(t *testing.T) { t.Parallel() for _, tc := range []testCase{ { sdk: "go", source: `package main import ( "context" ) func New(ctx context.Context) (Test, error) { v, err := dag.Container().From("alpine:3.18.4").File("/etc/alpine-release").Contents(ctx) if err != nil { return Test{}, err } return Test{ AlpineVersion: v, }, nil } type Test struct { AlpineVersion string } `, }, { sdk: "python", source: `from dagger import dag, field, function, object_type @object_type class Test: alpine_version: str = field() @classmethod async def create(cls) -> "Test": return cls(alpine_version=await ( dag.container() .from_("alpine:3.18.4") .file("/etc/alpine-release") .contents() )) `, }, } { tc := tc t.Run(tc.sdk, func(t *testing.T) { t.Parallel() ctr := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/test"). With(daggerExec("mod", "init", "--name=test", "--sdk="+tc.sdk)). With(sdkSource(tc.sdk, tc.source)) out, err := ctr.With(daggerCall("alpine-version")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "3.18.4") }) } }) t.Run("return error", func(t *testing.T) { t.Parallel() for _, tc := range []testCase{ { sdk: "go", source: `package main import ( "fmt" ) func New() (*Test, error) { return nil, fmt.Errorf("too bad") } type Test struct { Foo string } `, }, { sdk: "python", source: `from dagger import object_type, field @object_type class Test: foo: str = field() def __init__(self): raise ValueError("too bad") `, }, } { tc := tc t.Run(tc.sdk, func(t *testing.T) { t.Parallel() var logs safeBuffer c, ctx := connect(t, dagger.WithLogOutput(&logs)) ctr := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/test"). With(daggerExec("mod", "init", "--name=test", "--sdk="+tc.sdk)). With(sdkSource(tc.sdk, tc.source)) _, err := ctr.With(daggerCall("foo")).Stdout(ctx) require.Error(t, err) require.Contains(t, logs.String(), "too bad") }) } }) t.Run("python: with default factory", func(t *testing.T) { t.Parallel() content := identity.NewID() ctr := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/test"). With(daggerExec("mod", "init", "--name=test", "--sdk=python")). With(sdkSource("python", fmt.Sprintf(`import dagger from dagger import dag, object_type, field @object_type class Test: foo: dagger.File = field(default=lambda: ( dag.directory() .with_new_file("foo.txt", contents="%s") .file("foo.txt") )) bar: list[str] = field(default=list) `, content), )) out, err := ctr.With(daggerCall("foo")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), content) out, err = ctr.With(daggerCall("--foo=dagger.json", "foo")).Stdout(ctx) require.NoError(t, err) require.Contains(t, out, `"sdk": "python"`) _, err = ctr.With(daggerCall("bar")).Sync(ctx) require.NoError(t, err) }) } //go:embed testdata/modules/go/wrapper/main.go var wrapper string func TestModuleGoWrapping(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=wrapper", "--sdk=go")). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: wrapper, }) logGen(ctx, t, modGen.Directory(".")) id := identity.NewID() out, err := modGen.With(daggerQuery( fmt.Sprintf(`{wrapper{container{echo(msg:%q){unwrap{stdout}}}}}`, id), )).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, fmt.Sprintf(`{"wrapper":{"container":{"echo":{"unwrap":{"stdout":%q}}}}}`, id), out) } func TestModuleConfigAPI(t *testing.T) { t.Parallel() c, ctx := connect(t) moduleDir := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/subdir"). With(daggerExec("mod", "init", "--name=test", "--sdk=go", "--root=..")). Directory("/work") cfg := c.ModuleConfig(moduleDir, dagger.ModuleConfigOpts{Subpath: "subdir"}) name, err := cfg.Name(ctx) require.NoError(t, err) require.Equal(t, "test", name) sdk, err := cfg.SDK(ctx) require.NoError(t, err) require.Equal(t, "go", sdk) root, err := cfg.Root(ctx) require.NoError(t, err) require.Equal(t, "..", root) } func TestModulePythonInit(t *testing.T) { t.Run("from scratch", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=bare", "--sdk=python")) out, err := modGen. With(daggerQuery(`{bare{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"bare":{"containerEcho":{"stdout":"hello\n"}}}`, out) }) t.Run("with different root", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/child"). With(daggerExec("mod", "init", "--name=bare", "--sdk=python", "--root=..")) out, err := modGen. With(daggerQuery(`{bare{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"bare":{"containerEcho":{"stdout":"hello\n"}}}`, out) }) t.Run("respects existing pyproject.toml", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("pyproject.toml", dagger.ContainerWithNewFileOpts{ Contents: `[project] name = "has-pyproject" version = "0.0.0" `, }). With(daggerExec("mod", "init", "--name=hasPyproject", "--sdk=python")) out, err := modGen. With(daggerQuery(`{hasPyproject{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"hasPyproject":{"containerEcho":{"stdout":"hello\n"}}}`, out) t.Run("preserves module name", func(t *testing.T) { generated, err := modGen.File("pyproject.toml").Contents(ctx) require.NoError(t, err) require.Contains(t, generated, `name = "has-pyproject"`) }) }) t.Run("respects existing main.py", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/src/main/__init__.py", dagger.ContainerWithNewFileOpts{ Contents: "from . import notmain\n", }). WithNewFile("/work/src/main/notmain.py", dagger.ContainerWithNewFileOpts{ Contents: `from dagger import function @function def hello() -> str: return "Hello, world!" `, }). With(daggerExec("mod", "init", "--name=hasMainPy", "--sdk=python")) out, err := modGen. With(daggerQuery(`{hasMainPy{hello}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"hasMainPy":{"hello":"Hello, world!"}}`, out) }) } func TestModulePythonReturnSelf(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=foo", "--sdk=python")). WithNewFile("src/main.py", dagger.ContainerWithNewFileOpts{ Contents: `from typing import Self from dagger import field, function, object_type @object_type class Foo: message: str = field(default="") @function def bar(self) -> Self: self.message = "foobar" return self `, }) out, err := modGen.With(daggerQuery(`{foo{bar{message}}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"foo":{"bar":{"message":"foobar"}}}`, out) } func TestModuleLotsOfFunctions(t *testing.T) { t.Parallel() const funcCount = 100 t.Run("go sdk", func(t *testing.T) { t.Parallel() c, ctx := connect(t) mainSrc := ` package main type PotatoSack struct {} ` for i := 0; i < funcCount; i++ { mainSrc += fmt.Sprintf(` func (m *PotatoSack) Potato%d() string { return "potato #%d" } `, i, i) } modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: mainSrc, }). With(daggerExec("mod", "init", "--name=potatoSack", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) var eg errgroup.Group for i := 0; i < funcCount; i++ { i := i // just verify a subset work if i%10 != 0 { continue } eg.Go(func() error { _, err := modGen. With(daggerCall(fmt.Sprintf("potato%d", i))). Sync(ctx) return err }) } require.NoError(t, eg.Wait()) }) t.Run("python sdk", func(t *testing.T) { t.Parallel() c, ctx := connect(t) mainSrc := `from dagger import function ` for i := 0; i < funcCount; i++ { mainSrc += fmt.Sprintf(` @function def potato_%d() -> str: return "potato #%d" `, i, i) } modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("./src/main.py", dagger.ContainerWithNewFileOpts{ Contents: mainSrc, }). With(daggerExec("mod", "init", "--name=potatoSack", "--sdk=python")) var eg errgroup.Group for i := 0; i < funcCount; i++ { i := i // just verify a subset work if i%10 != 0 { continue } eg.Go(func() error { _, err := modGen. With(daggerCall(fmt.Sprintf("potato%d", i))). Sync(ctx) return err }) } require.NoError(t, eg.Wait()) }) } func TestModuleLotsOfDeps(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work") modCount := 0 getModMainSrc := func(name string, depNames []string) string { t.Helper() mainSrc := fmt.Sprintf(`package main import "context" type %s struct {} func (m *%s) Fn(ctx context.Context) (string, error) { s := "%s" var depS string _ = depS var err error _ = err `, strcase.ToCamel(name), strcase.ToCamel(name), name) for _, depName := range depNames { mainSrc += fmt.Sprintf(` depS, err = dag.%s().Fn(ctx) if err != nil { return "", err } s += depS `, strcase.ToCamel(depName)) } mainSrc += "return s, nil\n}\n" fmted, err := format.Source([]byte(mainSrc)) require.NoError(t, err) return string(fmted) } // need to construct dagger.json directly in order to avoid excessive // `dagger mod use` calls while constructing the huge DAG of deps getModDaggerConfig := func(name string, depNames []string) string { t.Helper() var depVals []string for _, depName := range depNames { depVals = append(depVals, "../"+depName) } cfg := modules.Config{ Name: name, Root: "..", SDK: "go", Dependencies: depVals, } bs, err := json.Marshal(cfg) require.NoError(t, err) return string(bs) } addModulesWithDeps := func(newMods int, depNames []string) []string { t.Helper() var newModNames []string for i := 0; i < newMods; i++ { name := fmt.Sprintf("mod%d", modCount) modCount++ newModNames = append(newModNames, name) modGen = modGen. WithWorkdir("/work/"+name). WithNewFile("./main.go", dagger.ContainerWithNewFileOpts{ Contents: getModMainSrc(name, depNames), }). WithNewFile("./dagger.json", dagger.ContainerWithNewFileOpts{ Contents: getModDaggerConfig(name, depNames), }) } return newModNames } // Create a base module, then add 6 layers of deps, where each layer has one more module // than the previous layer and each module within the layer has a dep on each module // from the previous layer. Finally add a single module at the top that depends on all // modules from the last layer and call that. // Basically, this creates a quadratically growing DAG of modules and verifies we // handle it efficiently enough to be callable. curDeps := addModulesWithDeps(1, nil) for i := 0; i < 6; i++ { curDeps = addModulesWithDeps(len(curDeps)+1, curDeps) } addModulesWithDeps(1, curDeps) _, err := modGen.With(daggerCall("fn")).Stdout(ctx) require.NoError(t, err) } func TestModuleNamespacing(t *testing.T) { t.Parallel() c, ctx := connect(t) moduleSrcPath, err := filepath.Abs("./testdata/modules/go/namespacing") require.NoError(t, err) ctr := c.Container().From(alpineImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithMountedDirectory("/work", c.Host().Directory(moduleSrcPath)). WithWorkdir("/work") out, err := ctr. With(daggerQuery(`{test{fn(s:"yo")}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"test":{"fn":"1:yo 2:yo"}}`, out) } func TestModuleRoots(t *testing.T) { t.Parallel() c, ctx := connect(t) moduleSrcPath, err := filepath.Abs("./testdata/modules/go/roots") require.NoError(t, err) entries, err := os.ReadDir(moduleSrcPath) require.NoError(t, err) ctr := c.Container().From(alpineImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithMountedDirectory("/work", c.Host().Directory(moduleSrcPath)) for _, entry := range entries { entry := entry t.Run(entry.Name(), func(t *testing.T) { t.Parallel() ctr := ctr.WithWorkdir("/work/" + entry.Name()) out, err := ctr. With(daggerQuery(fmt.Sprintf(`{%s{hello}}`, strcase.ToLowerCamel(entry.Name())))). Stdout(ctx) if strings.HasPrefix(entry.Name(), "good-") { require.NoError(t, err) require.JSONEq(t, fmt.Sprintf(`{"%s":{"hello": "hello"}}`, strcase.ToLowerCamel(entry.Name())), out) } else if strings.HasPrefix(entry.Name(), "bad-") { require.Error(t, err) require.Regexp(t, "is not under( module)? root", err.Error()) } }) } } func TestModuleDaggerCall(t *testing.T) { t.Parallel() c, ctx := connect(t) t.Run("service args", func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main import ( "context" ) type Test struct {} func (m *Test) Fn(ctx context.Context, svc *Service) (string, error) { return dag.Container().From("alpine:3.18").WithExec([]string{"apk", "add", "curl"}). WithServiceBinding("daserver", svc). WithExec([]string{"curl", "http://daserver:8000"}). Stdout(ctx) } `, }) logGen(ctx, t, modGen.Directory(".")) httpServer, _ := httpService(ctx, t, c, "im up") endpoint, err := httpServer.Endpoint(ctx) require.NoError(t, err) out, err := modGen. WithServiceBinding("testserver", httpServer). With(daggerCall("fn", "--svc", "tcp://"+endpoint)).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "im up") }) t.Run("list args", func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("foo.txt", dagger.ContainerWithNewFileOpts{ Contents: "bar", }). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main import ( "context" "strings" ) type Minimal struct {} func (m *Minimal) Hello(msgs []string) string { return strings.Join(msgs, "+") } func (m *Minimal) Reads(ctx context.Context, files []File) (string, error) { var contents []string for _, f := range files { content, err := f.Contents(ctx) if err != nil { return "", err } contents = append(contents, content) } return strings.Join(contents, "+"), nil } `, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerCall("hello", "--msgs", "yo", "--msgs", "my", "--msgs", "friend")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "yo+my+friend") out, err = modGen.With(daggerCall("reads", "--files=foo.txt", "--files=foo.txt")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "bar+bar") }) t.Run("return list objects", func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Minimal struct {} type Foo struct { Bar int ` + "`" + `json:"bar"` + "`" + ` } func (m *Minimal) Fn() []*Foo { var foos []*Foo for i := 0; i < 3; i++ { foos = append(foos, &Foo{Bar: i}) } return foos } `, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerCall("fn", "bar")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "0\n1\n2") }) t.Run("directory arg inputs", func(t *testing.T) { t.Parallel() t.Run("local dir", func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk=go")). WithNewFile("/dir/subdir/foo.txt", dagger.ContainerWithNewFileOpts{ Contents: "foo", }). WithNewFile("/dir/subdir/bar.txt", dagger.ContainerWithNewFileOpts{ Contents: "bar", }). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Test struct {} func (m *Test) Fn(dir *Directory) *Directory { return dir } `, }) out, err := modGen.With(daggerCall("fn", "--dir", "/dir/subdir")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "bar.txt\nfoo.txt") out, err = modGen.With(daggerCall("fn", "--dir", "file:///dir/subdir")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "bar.txt\nfoo.txt") }) t.Run("git dir", func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Test struct {} func (m *Test) Fn(dir *Directory, subpath Optional[string]) *Directory { return dir.Directory(subpath.GetOr(".")) } `, }) for _, tc := range []struct { baseURL string subpath string }{ { baseURL: "https://github.com/dagger/dagger", }, { baseURL: "https://github.com/dagger/dagger", subpath: ".changes", }, { baseURL: "https://github.com/dagger/dagger.git", }, { baseURL: "https://github.com/dagger/dagger.git", subpath: ".changes", }, } { tc := tc t.Run(fmt.Sprintf("%s:%s", tc.baseURL, tc.subpath), func(t *testing.T) { t.Parallel() url := tc.baseURL + "#v0.9.1" if tc.subpath != "" { url += ":" + tc.subpath } args := []string{"fn", "--dir", url} if tc.subpath == "" { args = append(args, "--subpath", ".changes") } out, err := modGen.With(daggerCall(args...)).Stdout(ctx) require.NoError(t, err) require.Contains(t, out, "v0.9.1.md") require.NotContains(t, out, "v0.9.2.md") }) } }) }) } func TestModuleGoSyncDeps(t *testing.T) { // verify that changes to deps result in a sync to the depender module t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/dep"). With(daggerExec("mod", "init", "--name=dep", "--sdk=go")). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=use", "--sdk=go")). WithNewFile("/work/dep/main.go", dagger.ContainerWithNewFileOpts{ Contents: useInner, }). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: useOuter, }). With(daggerExec("mod", "install", "./dep")) logGen(ctx, t, modGen.Directory(".")) modGen = modGen.With(daggerQuery(`{use{useHello}}`)) out, err := modGen.Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"use":{"useHello":"hello"}}`, out) newInner := strings.ReplaceAll(useInner, `"hello"`, `"goodbye"`) modGen = modGen. WithNewFile("/work/dep/main.go", dagger.ContainerWithNewFileOpts{ Contents: newInner, }). With(daggerExec("mod", "sync")) logGen(ctx, t, modGen.Directory(".")) out, err = modGen.With(daggerQuery(`{use{useHello}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"use":{"useHello":"goodbye"}}`, out) } func TestModuleLoops(t *testing.T) { // verify circular module dependencies result in an error t.Parallel() c, ctx := connect(t) _, err := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/depA"). With(daggerExec("mod", "init", "--name=depA", "--sdk=go", "--root=..")). WithWorkdir("/work/depB"). With(daggerExec("mod", "init", "--name=depB", "--sdk=go", "--root=..")). With(daggerExec("mod", "install", "../depA")). WithWorkdir("/work/depC"). With(daggerExec("mod", "init", "--name=depC", "--sdk=go", "--root=..")). With(daggerExec("mod", "install", "../depB")). WithWorkdir("/work/depA"). With(daggerExec("mod", "install", "../depC")). Sync(ctx) require.ErrorContains(t, err, "module depA has a circular dependency") } //go:embed testdata/modules/go/id/arg/main.go var badIDArgGoSrc string //go:embed testdata/modules/python/id/arg/src/main.py var badIDArgPySrc string //go:embed testdata/modules/go/id/field/main.go var badIDFieldGoSrc string //go:embed testdata/modules/go/id/fn/main.go var badIDFnGoSrc string //go:embed testdata/modules/python/id/fn/src/main.py var badIDFnPySrc string func TestModuleReservedWords(t *testing.T) { // verify disallowed names are rejected t.Parallel() c, ctx := connect(t) t.Run("id", func(t *testing.T) { t.Parallel() t.Run("arg", func(t *testing.T) { t.Parallel() t.Run("go", func(t *testing.T) { t.Parallel() _, err := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk=go")). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: badIDArgGoSrc, }). With(daggerQuery(`{test{fn(id:"no")}}`)). Sync(ctx) require.ErrorContains(t, err, "cannot define argument with reserved name \"id\"") }) t.Run("python", func(t *testing.T) { t.Parallel() _, err := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk=python")). WithNewFile("/work/src/main.py", dagger.ContainerWithNewFileOpts{ Contents: badIDArgPySrc, }). With(daggerQuery(`{test{fn(id:"no")}}`)). Sync(ctx) require.ErrorContains(t, err, "cannot define argument with reserved name \"id\"") }) }) t.Run("field", func(t *testing.T) { t.Parallel() t.Run("go", func(t *testing.T) { t.Parallel() _, err := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk=go")). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: badIDFieldGoSrc, }). With(daggerQuery(`{test{fn{id}}}`)). Sync(ctx) require.ErrorContains(t, err, "cannot define field with reserved name \"id\"") }) }) t.Run("fn", func(t *testing.T) { t.Parallel() t.Run("go", func(t *testing.T) { t.Parallel() _, err := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk=go")). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: badIDFnGoSrc, }). With(daggerQuery(`{test{id}}`)). Sync(ctx) require.ErrorContains(t, err, "cannot define function with reserved name \"id\"") }) t.Run("python", func(t *testing.T) { t.Parallel() _, err := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk=python")). WithNewFile("/work/src/main.py", dagger.ContainerWithNewFileOpts{ Contents: badIDFnPySrc, }). With(daggerQuery(`{test{fn(id:"no")}}`)). Sync(ctx) require.ErrorContains(t, err, "cannot define function with reserved name \"id\"") }) }) }) } func daggerExec(args ...string) dagger.WithContainerFunc { return func(c *dagger.Container) *dagger.Container { return c.WithExec(append([]string{"dagger", "--debug"}, args...), dagger.ContainerWithExecOpts{ ExperimentalPrivilegedNesting: true, }) } } func daggerQuery(query string, args ...any) dagger.WithContainerFunc { query = fmt.Sprintf(query, args...) return func(c *dagger.Container) *dagger.Container { return c.WithExec([]string{"dagger", "--debug", "query"}, dagger.ContainerWithExecOpts{ Stdin: query, ExperimentalPrivilegedNesting: true, }) } } func daggerCall(args ...string) dagger.WithContainerFunc { return func(c *dagger.Container) *dagger.Container { return c.WithExec(append([]string{"dagger", "--debug", "call"}, args...), dagger.ContainerWithExecOpts{ ExperimentalPrivilegedNesting: true, }) } } func daggerFunctions(args ...string) dagger.WithContainerFunc { return func(c *dagger.Container) *dagger.Container { return c.WithExec(append([]string{"dagger", "--debug", "functions"}, args...), dagger.ContainerWithExecOpts{ ExperimentalPrivilegedNesting: true, }) } } func sdkSource(sdk, contents string) dagger.WithContainerFunc { return func(c *dagger.Container) *dagger.Container { var sourcePath string switch sdk { case "go": sourcePath = "main.go" case "python": sourcePath = "src/main.py" default: return c } return c.WithNewFile(sourcePath, dagger.ContainerWithNewFileOpts{ Contents: contents, }) } } func currentSchema(ctx context.Context, t *testing.T, ctr *dagger.Container) *introspection.Schema { t.Helper() out, err := ctr.With(daggerQuery(introspection.Query)).Stdout(ctx) require.NoError(t, err) var schemaResp introspection.Response err = json.Unmarshal([]byte(out), &schemaResp) require.NoError(t, err) return schemaResp.Schema } func goGitBase(t *testing.T, c *dagger.Client) *dagger.Container { t.Helper() return c.Container().From(golangImage). WithExec([]string{"apk", "add", "git"}). WithExec([]string{"git", "config", "--global", "user.email", "dagger@example.com"}). WithExec([]string{"git", "config", "--global", "user.name", "Dagger Tests"}). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithExec([]string{"git", "init"}) } func logGen(ctx context.Context, t *testing.T, modSrc *dagger.Directory) { t.Helper() generated, err := modSrc.File("dagger.gen.go").Contents(ctx) require.NoError(t, err) t.Cleanup(func() { t.Name() fileName := filepath.Join( os.TempDir(), t.Name(), fmt.Sprintf("dagger.gen.%d.go", time.Now().Unix()), ) if err := os.MkdirAll(filepath.Dir(fileName), 0o755); err != nil { t.Logf("failed to create temp dir for generated code: %v", err) return } if err := os.WriteFile(fileName, []byte(generated), 0644); err != nil { t.Logf("failed to write generated code to %s: %v", fileName, err) } else { t.Logf("wrote generated code to %s", fileName) } }) }
closed
dagger/dagger
https://github.com/dagger/dagger
6,162
Go SDK Modules: enable general type annotation support via comments
Discord discussion: https://discord.com/channels/707636530424053791/1177373379255349248 As we need to add more support in Go for things like marking a field as private, setting default values, etc. The most obvious option was to require use of structs (including the `Opts` struct idea, the "inline anonymous struct for args", etc.) and annotate more information via struct tags. However, after discussion we realized a better general solution would be to not rely on struct tags but instead add support for the equivalent functionality via specially formatted comments. The reasoning being that: 1. Struct tags are essentially just glorified comments (strings that get interpreted by reflection/ast parsing), so there's not much of a practical difference in that respect 2. Comments are more general in that they can be applied equivalently not only to fields of a struct but also to function args (similar to how we support doc strings on args today), functions as a whole, structs as a whole, etc. There's prior art for this: 1. Go's support for pragmas: https://dave.cheney.net/2018/01/08/gos-hidden-pragmas 2. K8s support for annotations: https://github.com/kubernetes-sigs/controller-tools/blob/881ffb4682cb5882f5764aca5a56fe9865bc9ed6/pkg/crd/testdata/cronjob_types.go#L105-L125 TBD the exact format of comments (i.e. use of a special prefix `//dagger: default=abc` vs something simpler like `//+default abc`). We should use this to support at least: 1. Optional (can co-exist w/ existing `Optional` type) 2. Default values (will be limited to what can be represented as a string, but that's ok) 3. Marking object fields as private (so not included in public API but still included in serialization of object) cc @vito @jedevc
https://github.com/dagger/dagger/issues/6162
https://github.com/dagger/dagger/pull/6179
e8097f5798af7f8b22f2a1be94a27c9800185053
a499195df3de436969c4477bb1e9f074aa586eb6
"2023-11-27T16:51:18Z"
go
"2023-12-06T14:29:35Z"
core/integration/testdata/modules/go/minimal/main.go
package main import ( "context" "strings" ) type Minimal struct{} func (m *Minimal) Hello() string { return "hello" } func (m *Minimal) Echo(msg string) string { return m.EchoOpts(msg, Opt("..."), Opt(3)) } func (m *Minimal) EchoPointer(msg *string) *string { v := m.Echo(*msg) return &v } func (m *Minimal) EchoPointerPointer(msg **string) **string { v := m.Echo(**msg) v2 := &v return &v2 } func (m *Minimal) EchoOptional(msg Optional[string]) string { v, ok := msg.Get() if !ok { v = "default" } return m.Echo(v) } func (m *Minimal) EchoOptionalPointer(msg **Optional[**string]) string { v, ok := (*msg).Get() if !ok { v = ptr(ptr("default")) } return m.Echo(**v) } func (m *Minimal) EchoOptionalSlice(msg Optional[[]string]) string { v := msg.GetOr([]string{"foobar"}) return m.Echo(strings.Join(v, "+")) } func (m *Minimal) Echoes(msgs []string) []string { return []string{m.Echo(strings.Join(msgs, " "))} } func (m *Minimal) EchoesVariadic(msgs ...string) string { return m.Echo(strings.Join(msgs, " ")) } func (m *Minimal) HelloContext(ctx context.Context) string { return "hello context" } func (m *Minimal) EchoContext(ctx context.Context, msg string) string { return m.Echo("ctx." + msg) } func (m *Minimal) HelloStringError(ctx context.Context) (string, error) { return "hello i worked", nil } func (m *Minimal) HelloVoid() {} func (m *Minimal) HelloVoidError() error { return nil } // EchoOpts does some opts things func (m *Minimal) EchoOpts( msg string, // the message to echo // String to append to the echoed message suffix Optional[string], // Number of times to repeat the message times Optional[int], ) string { msg += suffix.GetOr("") return strings.Repeat(msg, times.GetOr(1)) } // EchoOptsInline does some opts things func (m *Minimal) EchoOptsInline(opts struct { Msg string // the message to echo // String to append to the echoed message Suffix Optional[string] // Number of times to repeat the message Times Optional[int] }) string { return m.EchoOpts(opts.Msg, opts.Suffix, opts.Times) } func (m *Minimal) EchoOptsInlinePointer(opts *struct { Msg string // String to append to the echoed message Suffix Optional[string] // Number of times to repeat the message Times Optional[int] }) string { return m.EchoOptsInline(*opts) } func (m *Minimal) EchoOptsInlineCtx(ctx context.Context, opts struct { Msg string // String to append to the echoed message Suffix Optional[string] // Number of times to repeat the message Times Optional[int] }) string { return m.EchoOpts(opts.Msg, opts.Suffix, opts.Times) } func (m *Minimal) EchoOptsInlineTags(ctx context.Context, opts struct { Msg string // String to append to the echoed message Suffix Optional[string] `tag:"hello"` // Number of times to repeat the message Times Optional[int] `tag:"hello again"` }) string { return m.EchoOpts(opts.Msg, opts.Suffix, opts.Times) }
closed
dagger/dagger
https://github.com/dagger/dagger
6,163
🐞 WithMountedDirectory invalidating remote cache
### What is the issue? Given the following pipeline: ```go func main() { // initialize Dagger client ctx := context.Background() client, err := dagger.Connect(ctx, dagger.WithLogOutput(os.Stderr)) if err != nil { panic(err) } defer client.Close() src := client.Host().Directory(".", dagger.HostDirectoryOpts{ Include: []string{"bar"}, }) mountCache := client.Host().Directory("mount") _, err = client.Container(). From("alpine"). WithWorkdir("/root"). WithExec([]string{"apk", "add", "curl"}). WithMountedDirectory("/mount", mountCache). WithDirectory(".", src). WithExec([]string{"cat", "bar"}). Sync(ctx) if err != nil { panic(err) } } ``` Running that twice in my local setup, correctly caches all operations: ``` 130|marcos:tmp/test (⎈ |N/A)$ dagger run go run main.go ┣─╮ │ ▽ init │ █ [1.28s] connect │ ┣ [1.11s] starting engine │ ┣ [0.17s] starting session │ ┃ OK! │ ┻ █ [1.36s] go run main.go ┣─╮ │ ▽ host.directory mount │ █ [0.01s] upload mount from xps (client id: nf66pihk4bujhmj9nw5jrpzps) │ ┣ [0.00s] transferring mount: ┣─┼─╮ │ │ ▽ host.directory . │ │ █ [0.01s] upload . from xps (client id: nf66pihk4bujhmj9nw5jrpzps) (include: bar) │ │ ┣ [0.00s] transferring .: │ █ │ CACHED upload mount from xps (client id: nf66pihk4bujhmj9nw5jrpzps) │ █ │ [0.00s] blob://sha256:afad735041289d8662a90d002343ddac7dfdeca7ebb85fd3b1a786ff1a02183c │ ┣─┼─╮ blob://sha256:afad735041289d8662a90d002343ddac7dfdeca7ebb85fd3b1a786ff1a02183c │ ┻ │ │ │ █ │ CACHED upload . from xps (client id: nf66pihk4bujhmj9nw5jrpzps) (include: bar) │ █ │ [0.00s] blob://sha256:f4314233344fbbc7c171c06d5cace46282b4ee97b153ed06e0aa21ce6de98ae1 │ ╭─┫ │ blob://sha256:f4314233344fbbc7c171c06d5cace46282b4ee97b153ed06e0aa21ce6de98ae1 │ │ ┻ │ ┣─┼─╮ │ │ │ ▽ │ from alpine │ │ █ │ [1.11s] resolve image config for docker.io/library/alpine:latest │ │ █ │ [0.01s] pull docker.io/library/alpine:latest │ │ ┣ │ [0.01s] resolve docker.io/library/alpine@sha256:eece025e432126ce23f223450a0326fbebde39cdf496a85d8c016293fc851978 │ │ ┣─┼─╮ pull docker.io/library/alpine:latest │ │ ┻ │ │ █◀┼───┼─╯ CACHED exec apk add curl █◀╯ │ CACHED copy / /root █◀────╯ CACHED exec cat bar ``` When using magicache, for some reason the last `exec cat bar` operation doesn't seem to be cached at all: **output from a newly spawned engine** (local cache is empty): ``` ┣─╮ │ ▽ init │ █ [19.56s] connect │ ┣ [19.42s] starting engine │ ┣ [0.14s] starting session │ ┃ OK! │ ┻ █ [5.60s] go run main.go ┣─╮ │ ▽ host.directory . │ █ [0.04s] upload . from xps (client id: fvl7ohtwyhom301qxtt817rpg) (include: bar) │ ┣ [0.00s] transferring .: ┣─┼─╮ │ │ ▽ host.directory mount │ │ █ [0.04s] upload mount from xps (client id: fvl7ohtwyhom301qxtt817rpg) │ │ ┣ [0.00s] transferring mount: │ █ │ [0.01s] upload . from xps (client id: fvl7ohtwyhom301qxtt817rpg) (include: bar) │ ┣ │ [0.43s] █████████████ sha256:f4314233344fbbc7c171c06d5cace46282b4ee97b153ed06e0aa21ce6de98ae1 │ ┣ │ [0.01s] extracting sha256:f4314233344fbbc7c171c06d5cace46282b4ee97b153ed06e0aa21ce6de98ae1 │ │ █ [0.01s] upload mount from xps (client id: fvl7ohtwyhom301qxtt817rpg) │ │ ┣ [0.82s] █████████████ sha256:afad735041289d8662a90d002343ddac7dfdeca7ebb85fd3b1a786ff1a02183c │ │ ┣ [0.01s] extracting sha256:afad735041289d8662a90d002343ddac7dfdeca7ebb85fd3b1a786ff1a02183c │ █ │ [0.00s] blob://sha256:f4314233344fbbc7c171c06d5cace46282b4ee97b153ed06e0aa21ce6de98ae1 │ ┣─┼─╮ blob://sha256:f4314233344fbbc7c171c06d5cace46282b4ee97b153ed06e0aa21ce6de98ae1 │ ┻ │ │ │ █ │ [0.00s] blob://sha256:afad735041289d8662a90d002343ddac7dfdeca7ebb85fd3b1a786ff1a02183c │ ╭─┫ │ blob://sha256:afad735041289d8662a90d002343ddac7dfdeca7ebb85fd3b1a786ff1a02183c │ │ ┻ │ ┣─┼─╮ │ │ │ ▽ │ from alpine │ │ █ │ [2.12s] resolve image config for docker.io/library/alpine:latest │ │ █ │ [0.01s] pull docker.io/library/alpine:latest │ │ ┣ │ [0.01s] resolve docker.io/library/alpine@sha256:eece025e432126ce23f223450a0326fbebde39cdf496a85d8c016293fc851978 │ │ ┣─┼─╮ pull docker.io/library/alpine:latest │ │ ┻ │ │ █◀┼───┼─╯ CACHED exec apk add curl █◀┼───╯ CACHED copy / /root █◀╯ [0.30s] exec cat bar ┃ bar ┻ ``` ^ as you can see `exec cat bar` is not cached. If I check Dagger cloud, it also shows the same: ![image](https://github.com/dagger/dagger/assets/1578458/19367313-329b-4b46-8e84-6a8212109a2e) Looking a bit in-depth looks like there seems to be a `merge` op which is not cached when using magicache ![image](https://github.com/dagger/dagger/assets/1578458/35a9f9a2-6817-45ee-9abf-506243509078) Dagger cloud URL: https://dagger.cloud/runs/058cf603-4334-4b85-8fd2-80483e379df2 cc @RonanQuigley ### Log output N/A ### Steps to reproduce N/A ### SDK version Go SDK 0.9.3 ### OS version linux
https://github.com/dagger/dagger/issues/6163
https://github.com/dagger/dagger/pull/6211
099f2aebb0b486b6f584de1074f4ff1521541b07
a789dbe3747ad3cef142102447194d3e59f9ed7f
"2023-11-27T18:54:01Z"
go
"2023-12-06T17:02:45Z"
core/integration/remotecache_test.go
package core import ( "context" "fmt" "strings" "testing" "dagger.io/dagger" "github.com/moby/buildkit/identity" "github.com/stretchr/testify/require" "github.com/tidwall/gjson" ) const cliBinPath = "/.dagger-cli" func getDevEngineForRemoteCache(ctx context.Context, c *dagger.Client, cache *dagger.Service, cacheName string, index uint8) (devEngineSvc *dagger.Service, endpoint string, err error) { id := identity.NewID() networkCIDR := fmt.Sprintf("10.%d.0.0/16", 100+index) devEngineSvc = devEngineContainer(c). WithServiceBinding(cacheName, cache). WithExposedPort(1234, dagger.ContainerWithExposedPortOpts{Protocol: dagger.Tcp}). WithEnvVariable("ENGINE_ID", id). WithMountedCache("/var/lib/dagger", c.CacheVolume("dagger-dev-engine-state-"+identity.NewID())). WithExec([]string{ "--network-name", fmt.Sprintf("remotecache%d", index), "--network-cidr", networkCIDR, }, dagger.ContainerWithExecOpts{ InsecureRootCapabilities: true, }). AsService() endpoint, err = devEngineSvc.Endpoint(ctx, dagger.ServiceEndpointOpts{ Port: 1234, Scheme: "tcp", }) return devEngineSvc, endpoint, err } func TestRemoteCacheRegistry(t *testing.T) { t.Parallel() c, ctx := connect(t) registry := c.Pipeline("registry").Container().From("registry:2"). WithMountedCache("/var/lib/registry/", c.CacheVolume("remote-cache-registry-"+identity.NewID())). WithExposedPort(5000, dagger.ContainerWithExposedPortOpts{Protocol: dagger.Tcp}). AsService() cacheEnv := "type=registry,ref=registry:5000/test-cache,mode=max" devEngineA, endpointA, err := getDevEngineForRemoteCache(ctx, c, registry, "registry", 0) require.NoError(t, err) // This loads the dagger-cli binary from the host into the container, that was set up by // internal/mage/engine.go:test. This is used to communicate with the dev engine. daggerCli := daggerCliFile(t, c) outputA, err := c.Container().From(alpineImage). WithServiceBinding("dev-engine", devEngineA). WithMountedFile(cliBinPath, daggerCli). WithEnvVariable("_EXPERIMENTAL_DAGGER_CLI_BIN", cliBinPath). WithEnvVariable("_EXPERIMENTAL_DAGGER_RUNNER_HOST", endpointA). WithEnvVariable("_EXPERIMENTAL_DAGGER_CACHE_CONFIG", cacheEnv). WithNewFile("/.dagger-query.txt", dagger.ContainerWithNewFileOpts{ Contents: `{ container { from(address: "` + alpineImage + `") { withExec(args: ["sh", "-c", "head -c 128 /dev/random | sha256sum"]) { stdout } } } }`, }). WithExec([]string{ "sh", "-c", cliBinPath + ` query --doc .dagger-query.txt`, }).Stdout(ctx) require.NoError(t, err) shaA := strings.TrimSpace(gjson.Get(outputA, "container.from.withExec.stdout").String()) require.NotEmpty(t, shaA, "shaA is empty") devEngineB, endpointB, err := getDevEngineForRemoteCache(ctx, c, registry, "registry", 1) require.NoError(t, err) outputB, err := c.Container().From(alpineImage). WithServiceBinding("dev-engine", devEngineB). WithMountedFile(cliBinPath, daggerCli). WithEnvVariable("_EXPERIMENTAL_DAGGER_CLI_BIN", cliBinPath). WithEnvVariable("_EXPERIMENTAL_DAGGER_RUNNER_HOST", endpointB). WithEnvVariable("_EXPERIMENTAL_DAGGER_CACHE_CONFIG", cacheEnv). WithNewFile("/.dagger-query.txt", dagger.ContainerWithNewFileOpts{ Contents: `{ container { from(address: "` + alpineImage + `") { withExec(args: ["sh", "-c", "head -c 128 /dev/random | sha256sum"]) { stdout } } } }`, }). WithExec([]string{ "sh", "-c", cliBinPath + " query --doc .dagger-query.txt", }).Stdout(ctx) require.NoError(t, err) shaB := strings.TrimSpace(gjson.Get(outputB, "container.from.withExec.stdout").String()) require.NotEmpty(t, shaB, "shaB is empty") require.Equal(t, shaA, shaB) } /* Regression test for https://github.com/dagger/dagger/pull/5885 Idea is to: 1. Load in a local dir, use it to force evaluation 2. Export remote cache for the load 3. Load exact same local dir in a new engine that imports the cache 4. Make sure that works and there's no errors about lazy blobs missing The linked PR description above has more details. */ func TestRemoteCacheLazyBlobs(t *testing.T) { t.Parallel() c, ctx := connect(t) registry := c.Pipeline("registry").Container().From("registry:2"). WithMountedCache("/var/lib/registry/", c.CacheVolume("remote-cache-registry-"+identity.NewID())). WithExposedPort(5000, dagger.ContainerWithExposedPortOpts{Protocol: dagger.Tcp}). AsService() cacheEnv := "type=registry,ref=registry:5000/test-cache,mode=max" devEngineA, endpointA, err := getDevEngineForRemoteCache(ctx, c, registry, "registry", 10) require.NoError(t, err) daggerCli := daggerCliFile(t, c) outputA, err := c.Container().From(alpineImage). WithDirectory("/foo", c.Directory().WithDirectory("bar", c.Directory().WithNewFile("baz", "blah")).WithTimestamps(0)). WithServiceBinding("dev-engine", devEngineA). WithMountedFile(cliBinPath, daggerCli). WithEnvVariable("_EXPERIMENTAL_DAGGER_CLI_BIN", cliBinPath). WithEnvVariable("_EXPERIMENTAL_DAGGER_RUNNER_HOST", endpointA). WithEnvVariable("_EXPERIMENTAL_DAGGER_CACHE_CONFIG", cacheEnv). WithNewFile("/.dagger-query.txt", dagger.ContainerWithNewFileOpts{ Contents: `{ host { directory(path: "/foo/bar") { entries } } }`, }). WithExec([]string{ "sh", "-c", cliBinPath + ` query --doc .dagger-query.txt`, }).Stdout(ctx) require.NoErrorf(t, err, "outputA: %s", outputA) devEngineB, endpointB, err := getDevEngineForRemoteCache(ctx, c, registry, "registry", 11) require.NoError(t, err) outputB, err := c.Container().From(alpineImage). WithDirectory("/foo", c.Directory().WithDirectory("bar", c.Directory().WithNewFile("baz", "blah")).WithTimestamps(0)). WithServiceBinding("dev-engine", devEngineB). WithMountedFile(cliBinPath, daggerCli). WithEnvVariable("_EXPERIMENTAL_DAGGER_CLI_BIN", cliBinPath). WithEnvVariable("_EXPERIMENTAL_DAGGER_RUNNER_HOST", endpointB). WithEnvVariable("_EXPERIMENTAL_DAGGER_CACHE_CONFIG", cacheEnv). WithNewFile("/.dagger-query.txt", dagger.ContainerWithNewFileOpts{ Contents: `{ host { directory(path: "/foo/bar") { entries } } }`, }). WithExec([]string{ "sh", "-c", cliBinPath + " query --doc .dagger-query.txt", }).Stdout(ctx) require.NoErrorf(t, err, "outputB: %s", outputB) } func TestRemoteCacheS3(t *testing.T) { t.Parallel() t.Run("buildkit s3 caching", func(t *testing.T) { c, ctx := connect(t) bucket := "dagger-test-remote-cache-s3-" + identity.NewID() s3 := c.Pipeline("s3").Container().From("minio/minio"). WithMountedCache("/data", c.CacheVolume("minio-cache")). WithExposedPort(9000, dagger.ContainerWithExposedPortOpts{Protocol: dagger.Tcp}). WithExec([]string{"server", "/data"}). AsService() s3Endpoint, err := s3.Endpoint(ctx, dagger.ServiceEndpointOpts{Port: 9000, Scheme: "http"}) require.NoError(t, err) minioStdout, err := c.Container().From("minio/mc"). WithServiceBinding("s3", s3). WithEntrypoint([]string{"sh"}). WithExec([]string{"-c", "mc alias set minio http://s3:9000 minioadmin minioadmin && mc mb minio/" + bucket}). Stdout(ctx) require.NoError(t, err) require.Contains(t, minioStdout, "Bucket created successfully") s3Env := "type=s3,mode=max,endpoint_url=" + s3Endpoint + ",access_key_id=minioadmin,secret_access_key=minioadmin,region=mars,use_path_style=true,bucket=" + bucket devEngineA, endpointA, err := getDevEngineForRemoteCache(ctx, c, s3, "s3", 0) require.NoError(t, err) // This loads the dagger-cli binary from the host into the container, that was set up by // internal/mage/engine.go:test. This is used to communicate with the dev engine. daggerCli := c.Host().Directory("/dagger-dev/", dagger.HostDirectoryOpts{Include: []string{"dagger"}}).File("dagger") outputA, err := c.Container().From(alpineImage). WithServiceBinding("dev-engine", devEngineA). WithMountedFile(cliBinPath, daggerCli). WithEnvVariable("_EXPERIMENTAL_DAGGER_CLI_BIN", cliBinPath). WithEnvVariable("_EXPERIMENTAL_DAGGER_RUNNER_HOST", endpointA). WithEnvVariable("_EXPERIMENTAL_DAGGER_CACHE_CONFIG", s3Env). WithNewFile("/.dagger-query.txt", dagger.ContainerWithNewFileOpts{ Contents: `{ container { from(address: "` + alpineImage + `") { withExec(args: ["sh", "-c", "head -c 128 /dev/random | sha256sum"]) { stdout } } } }`, }). WithExec([]string{ "sh", "-c", cliBinPath + ` query --doc .dagger-query.txt`, }).Stdout(ctx) require.NoError(t, err) shaA := strings.TrimSpace(gjson.Get(outputA, "container.from.withExec.stdout").String()) require.NotEmpty(t, shaA, "shaA is empty") devEngineB, endpointB, err := getDevEngineForRemoteCache(ctx, c, s3, "s3", 1) require.NoError(t, err) outputB, err := c.Container().From(alpineImage). WithServiceBinding("dev-engine", devEngineB). WithMountedFile(cliBinPath, daggerCli). WithEnvVariable("_EXPERIMENTAL_DAGGER_CLI_BIN", cliBinPath). WithEnvVariable("_EXPERIMENTAL_DAGGER_RUNNER_HOST", endpointB). WithEnvVariable("_EXPERIMENTAL_DAGGER_CACHE_CONFIG", s3Env). WithNewFile("/.dagger-query.txt", dagger.ContainerWithNewFileOpts{ Contents: `{ container { from(address: "` + alpineImage + `") { withExec(args: ["sh", "-c", "head -c 128 /dev/random | sha256sum"]) { stdout } } } }`, }). WithExec([]string{ "sh", "-c", cliBinPath + " query --doc .dagger-query.txt", }).Stdout(ctx) require.NoError(t, err) shaB := strings.TrimSpace(gjson.Get(outputB, "container.from.withExec.stdout").String()) require.NotEmpty(t, shaB, "shaB is empty") require.Equal(t, shaA, shaB) }) } func TestRemoteCacheRegistryMultipleConfigs(t *testing.T) { t.Parallel() c, ctx := connect(t) defer c.Close() registry := c.Pipeline("registry").Container().From("registry:2"). WithMountedCache("/var/lib/registry/", c.CacheVolume("remote-cache-registry-"+identity.NewID())). WithExposedPort(5000, dagger.ContainerWithExposedPortOpts{Protocol: dagger.Tcp}). AsService() cacheConfigEnv1 := "type=registry,ref=registry:5000/test-cache:latest,mode=max" cacheConfigEnv2 := "type=registry,ref=registry:5000/test-cache-b:latest,mode=max" cacheEnv := strings.Join([]string{cacheConfigEnv1, cacheConfigEnv2}, ";") devEngineA, endpointA, err := getDevEngineForRemoteCache(ctx, c, registry, "registry", 20) require.NoError(t, err) // This loads the dagger-cli binary from the host into the container, that was set up by // internal/mage/engine.go:test. This is used to communicate with the dev engine. daggerCli := daggerCliFile(t, c) outputA, err := c.Container().From(alpineImage). WithServiceBinding("dev-engine", devEngineA). WithMountedFile(cliBinPath, daggerCli). WithEnvVariable("_EXPERIMENTAL_DAGGER_CLI_BIN", cliBinPath). WithEnvVariable("_EXPERIMENTAL_DAGGER_RUNNER_HOST", endpointA). WithEnvVariable("_EXPERIMENTAL_DAGGER_CACHE_CONFIG", cacheEnv). WithNewFile("/.dagger-query.txt", dagger.ContainerWithNewFileOpts{ Contents: `{ container { from(address: "` + alpineImage + `") { withExec(args: ["sh", "-c", "head -c 128 /dev/random | sha256sum"]) { stdout } } } }`, }). WithExec([]string{ "sh", "-c", cliBinPath + ` query --doc .dagger-query.txt`, }).Stdout(ctx) require.NoError(t, err) shaA := strings.TrimSpace(gjson.Get(outputA, "container.from.withExec.stdout").String()) require.NotEmpty(t, shaA, "shaA is empty") devEngineB, endpointB, err := getDevEngineForRemoteCache(ctx, c, registry, "registry", 21) require.NoError(t, err) outputB, err := c.Container().From(alpineImage). WithServiceBinding("dev-engine", devEngineB). WithMountedFile(cliBinPath, daggerCli). WithEnvVariable("_EXPERIMENTAL_DAGGER_CLI_BIN", cliBinPath). WithEnvVariable("_EXPERIMENTAL_DAGGER_RUNNER_HOST", endpointB). WithEnvVariable("_EXPERIMENTAL_DAGGER_CACHE_CONFIG", cacheConfigEnv1). WithNewFile("/.dagger-query.txt", dagger.ContainerWithNewFileOpts{ Contents: `{ container { from(address: "` + alpineImage + `") { withExec(args: ["sh", "-c", "head -c 128 /dev/random | sha256sum"]) { stdout } } } }`, }). WithExec([]string{ "sh", "-c", cliBinPath + " query --doc .dagger-query.txt", }).Stdout(ctx) require.NoError(t, err) shaB := strings.TrimSpace(gjson.Get(outputB, "container.from.withExec.stdout").String()) require.NotEmpty(t, shaB, "shaB is empty") require.Equal(t, shaA, shaB) devEngineC, endpointC, err := getDevEngineForRemoteCache(ctx, c, registry, "registry", 22) require.NoError(t, err) outputC, err := c.Container().From(alpineImage). WithServiceBinding("dev-engine", devEngineC). WithMountedFile(cliBinPath, daggerCli). WithEnvVariable("_EXPERIMENTAL_DAGGER_CLI_BIN", cliBinPath). WithEnvVariable("_EXPERIMENTAL_DAGGER_RUNNER_HOST", endpointC). WithEnvVariable("_EXPERIMENTAL_DAGGER_CACHE_CONFIG", cacheConfigEnv2). WithNewFile("/.dagger-query.txt", dagger.ContainerWithNewFileOpts{ Contents: `{ container { from(address: "` + alpineImage + `") { withExec(args: ["sh", "-c", "head -c 128 /dev/random | sha256sum"]) { stdout } } } }`, }). WithExec([]string{ "sh", "-c", cliBinPath + " query --doc .dagger-query.txt", }).Stdout(ctx) require.NoError(t, err) shaC := strings.TrimSpace(gjson.Get(outputC, "container.from.withExec.stdout").String()) require.NotEmpty(t, shaC, "shaC is empty") require.Equal(t, shaA, shaC) } func TestRemoteCacheRegistrySeparateImportExport(t *testing.T) { t.Parallel() c, ctx := connect(t) defer c.Close() registry := c.Pipeline("registry").Container().From("registry:2"). WithMountedCache("/var/lib/registry/", c.CacheVolume("remote-cache-registry-"+identity.NewID())). WithExposedPort(5000, dagger.ContainerWithExposedPortOpts{Protocol: dagger.Tcp}). AsService() // This loads the dagger-cli binary from the host into the container, that was set up by // internal/mage/engine.go:test. This is used to communicate with the dev engine. daggerCli := daggerCliFile(t, c) cacheEnvA := "type=registry,ref=registry:5000/test-cache-a:latest,mode=max" cacheEnvB := "type=registry,ref=registry:5000/test-cache-b:latest,mode=max" cacheEnvC := "type=registry,ref=registry:5000/test-cache-c:latest,mode=max" devEngineA, endpointA, err := getDevEngineForRemoteCache(ctx, c, registry, "registry", 0) require.NoError(t, err) outputA, err := c.Container().From(alpineImage). WithServiceBinding("dev-engine", devEngineA). WithMountedFile(cliBinPath, daggerCli). WithEnvVariable("_EXPERIMENTAL_DAGGER_CLI_BIN", cliBinPath). WithEnvVariable("_EXPERIMENTAL_DAGGER_RUNNER_HOST", endpointA). WithEnvVariable("_EXPERIMENTAL_DAGGER_CACHE_EXPORT_CONFIG", cacheEnvA). WithNewFile("/.dagger-query.txt", dagger.ContainerWithNewFileOpts{ Contents: `{ container { from(address: "` + alpineImage + `") { withExec(args: ["sh", "-c", "echo A >/dev/null; head -c 128 /dev/random | sha256sum"]) { stdout } } } }`, }). WithExec([]string{ "sh", "-c", cliBinPath + ` query --doc .dagger-query.txt`, }).Stdout(ctx) require.NoError(t, err) shaA := strings.TrimSpace(gjson.Get(outputA, "container.from.withExec.stdout").String()) require.NotEmpty(t, shaA, "shaA is empty") devEngineB, endpointB, err := getDevEngineForRemoteCache(ctx, c, registry, "registry", 1) require.NoError(t, err) outputB, err := c.Container().From(alpineImage). WithServiceBinding("dev-engine", devEngineB). WithMountedFile(cliBinPath, daggerCli). WithEnvVariable("_EXPERIMENTAL_DAGGER_CLI_BIN", cliBinPath). WithEnvVariable("_EXPERIMENTAL_DAGGER_RUNNER_HOST", endpointB). WithEnvVariable("_EXPERIMENTAL_DAGGER_CACHE_EXPORT_CONFIG", cacheEnvB). WithNewFile("/.dagger-query.txt", dagger.ContainerWithNewFileOpts{ Contents: `{ container { from(address: "` + alpineImage + `") { withExec(args: ["sh", "-c", "echo B >/dev/null; head -c 128 /dev/random | sha256sum"]) { stdout } } } }`, }). WithExec([]string{ "sh", "-c", cliBinPath + ` query --doc .dagger-query.txt`, }).Stdout(ctx) require.NoError(t, err) shaB := strings.TrimSpace(gjson.Get(outputB, "container.from.withExec.stdout").String()) require.NotEmpty(t, shaB, "shaB is empty") devEngineC, endpointC, err := getDevEngineForRemoteCache(ctx, c, registry, "registry", 2) require.NoError(t, err) ctrC := c.Container().From(alpineImage). WithServiceBinding("dev-engine", devEngineC). WithMountedFile(cliBinPath, daggerCli). WithEnvVariable("_EXPERIMENTAL_DAGGER_CLI_BIN", cliBinPath). WithEnvVariable("_EXPERIMENTAL_DAGGER_RUNNER_HOST", endpointC). WithEnvVariable("_EXPERIMENTAL_DAGGER_CACHE_IMPORT_CONFIG", strings.Join([]string{cacheEnvA, cacheEnvB}, ";")). WithEnvVariable("_EXPERIMENTAL_DAGGER_CACHE_EXPORT_CONFIG", cacheEnvC) outputC, err := ctrC.WithNewFile("/.dagger-query.txt", dagger.ContainerWithNewFileOpts{ Contents: `{ container { from(address: "` + alpineImage + `") { outputA: withExec(args: ["sh", "-c", "echo A >/dev/null; head -c 128 /dev/random | sha256sum"]) { stdout } outputB: withExec(args: ["sh", "-c", "echo B >/dev/null; head -c 128 /dev/random | sha256sum"]) { stdout } outputC: withExec(args: ["sh", "-c", "echo C >/dev/null; head -c 128 /dev/random | sha256sum"]) { stdout } } } }`, }).WithExec([]string{ "sh", "-c", cliBinPath + ` query --doc .dagger-query.txt`, }).Stdout(ctx) require.NoError(t, err) newA := strings.TrimSpace(gjson.Get(outputC, "container.from.outputA.stdout").String()) require.Equal(t, shaA, newA) newB := strings.TrimSpace(gjson.Get(outputC, "container.from.outputB.stdout").String()) require.Equal(t, shaB, newB) shaC := strings.TrimSpace(gjson.Get(outputC, "container.from.outputC.stdout").String()) require.NotEmpty(t, shaC, "shaC is empty") devEngineD, endpointD, err := getDevEngineForRemoteCache(ctx, c, registry, "registry", 3) require.NoError(t, err) outputD, err := c.Container().From(alpineImage). WithServiceBinding("dev-engine", devEngineD). WithMountedFile(cliBinPath, daggerCli). WithEnvVariable("_EXPERIMENTAL_DAGGER_CLI_BIN", cliBinPath). WithEnvVariable("_EXPERIMENTAL_DAGGER_RUNNER_HOST", endpointD). WithEnvVariable("_EXPERIMENTAL_DAGGER_CACHE_IMPORT_CONFIG", cacheEnvC). WithNewFile("/.dagger-query.txt", dagger.ContainerWithNewFileOpts{ Contents: `{ container { from(address: "` + alpineImage + `") { outputC: withExec(args: ["sh", "-c", "echo C >/dev/null; head -c 128 /dev/random | sha256sum"]) { stdout } } } }`, }). WithExec([]string{ "sh", "-c", cliBinPath + ` query --doc .dagger-query.txt`, }).Stdout(ctx) require.NoError(t, err) newC := strings.TrimSpace(gjson.Get(outputD, "container.from.outputC.stdout").String()) require.Equal(t, shaC, newC) }
closed
dagger/dagger
https://github.com/dagger/dagger
6,163
🐞 WithMountedDirectory invalidating remote cache
### What is the issue? Given the following pipeline: ```go func main() { // initialize Dagger client ctx := context.Background() client, err := dagger.Connect(ctx, dagger.WithLogOutput(os.Stderr)) if err != nil { panic(err) } defer client.Close() src := client.Host().Directory(".", dagger.HostDirectoryOpts{ Include: []string{"bar"}, }) mountCache := client.Host().Directory("mount") _, err = client.Container(). From("alpine"). WithWorkdir("/root"). WithExec([]string{"apk", "add", "curl"}). WithMountedDirectory("/mount", mountCache). WithDirectory(".", src). WithExec([]string{"cat", "bar"}). Sync(ctx) if err != nil { panic(err) } } ``` Running that twice in my local setup, correctly caches all operations: ``` 130|marcos:tmp/test (⎈ |N/A)$ dagger run go run main.go ┣─╮ │ ▽ init │ █ [1.28s] connect │ ┣ [1.11s] starting engine │ ┣ [0.17s] starting session │ ┃ OK! │ ┻ █ [1.36s] go run main.go ┣─╮ │ ▽ host.directory mount │ █ [0.01s] upload mount from xps (client id: nf66pihk4bujhmj9nw5jrpzps) │ ┣ [0.00s] transferring mount: ┣─┼─╮ │ │ ▽ host.directory . │ │ █ [0.01s] upload . from xps (client id: nf66pihk4bujhmj9nw5jrpzps) (include: bar) │ │ ┣ [0.00s] transferring .: │ █ │ CACHED upload mount from xps (client id: nf66pihk4bujhmj9nw5jrpzps) │ █ │ [0.00s] blob://sha256:afad735041289d8662a90d002343ddac7dfdeca7ebb85fd3b1a786ff1a02183c │ ┣─┼─╮ blob://sha256:afad735041289d8662a90d002343ddac7dfdeca7ebb85fd3b1a786ff1a02183c │ ┻ │ │ │ █ │ CACHED upload . from xps (client id: nf66pihk4bujhmj9nw5jrpzps) (include: bar) │ █ │ [0.00s] blob://sha256:f4314233344fbbc7c171c06d5cace46282b4ee97b153ed06e0aa21ce6de98ae1 │ ╭─┫ │ blob://sha256:f4314233344fbbc7c171c06d5cace46282b4ee97b153ed06e0aa21ce6de98ae1 │ │ ┻ │ ┣─┼─╮ │ │ │ ▽ │ from alpine │ │ █ │ [1.11s] resolve image config for docker.io/library/alpine:latest │ │ █ │ [0.01s] pull docker.io/library/alpine:latest │ │ ┣ │ [0.01s] resolve docker.io/library/alpine@sha256:eece025e432126ce23f223450a0326fbebde39cdf496a85d8c016293fc851978 │ │ ┣─┼─╮ pull docker.io/library/alpine:latest │ │ ┻ │ │ █◀┼───┼─╯ CACHED exec apk add curl █◀╯ │ CACHED copy / /root █◀────╯ CACHED exec cat bar ``` When using magicache, for some reason the last `exec cat bar` operation doesn't seem to be cached at all: **output from a newly spawned engine** (local cache is empty): ``` ┣─╮ │ ▽ init │ █ [19.56s] connect │ ┣ [19.42s] starting engine │ ┣ [0.14s] starting session │ ┃ OK! │ ┻ █ [5.60s] go run main.go ┣─╮ │ ▽ host.directory . │ █ [0.04s] upload . from xps (client id: fvl7ohtwyhom301qxtt817rpg) (include: bar) │ ┣ [0.00s] transferring .: ┣─┼─╮ │ │ ▽ host.directory mount │ │ █ [0.04s] upload mount from xps (client id: fvl7ohtwyhom301qxtt817rpg) │ │ ┣ [0.00s] transferring mount: │ █ │ [0.01s] upload . from xps (client id: fvl7ohtwyhom301qxtt817rpg) (include: bar) │ ┣ │ [0.43s] █████████████ sha256:f4314233344fbbc7c171c06d5cace46282b4ee97b153ed06e0aa21ce6de98ae1 │ ┣ │ [0.01s] extracting sha256:f4314233344fbbc7c171c06d5cace46282b4ee97b153ed06e0aa21ce6de98ae1 │ │ █ [0.01s] upload mount from xps (client id: fvl7ohtwyhom301qxtt817rpg) │ │ ┣ [0.82s] █████████████ sha256:afad735041289d8662a90d002343ddac7dfdeca7ebb85fd3b1a786ff1a02183c │ │ ┣ [0.01s] extracting sha256:afad735041289d8662a90d002343ddac7dfdeca7ebb85fd3b1a786ff1a02183c │ █ │ [0.00s] blob://sha256:f4314233344fbbc7c171c06d5cace46282b4ee97b153ed06e0aa21ce6de98ae1 │ ┣─┼─╮ blob://sha256:f4314233344fbbc7c171c06d5cace46282b4ee97b153ed06e0aa21ce6de98ae1 │ ┻ │ │ │ █ │ [0.00s] blob://sha256:afad735041289d8662a90d002343ddac7dfdeca7ebb85fd3b1a786ff1a02183c │ ╭─┫ │ blob://sha256:afad735041289d8662a90d002343ddac7dfdeca7ebb85fd3b1a786ff1a02183c │ │ ┻ │ ┣─┼─╮ │ │ │ ▽ │ from alpine │ │ █ │ [2.12s] resolve image config for docker.io/library/alpine:latest │ │ █ │ [0.01s] pull docker.io/library/alpine:latest │ │ ┣ │ [0.01s] resolve docker.io/library/alpine@sha256:eece025e432126ce23f223450a0326fbebde39cdf496a85d8c016293fc851978 │ │ ┣─┼─╮ pull docker.io/library/alpine:latest │ │ ┻ │ │ █◀┼───┼─╯ CACHED exec apk add curl █◀┼───╯ CACHED copy / /root █◀╯ [0.30s] exec cat bar ┃ bar ┻ ``` ^ as you can see `exec cat bar` is not cached. If I check Dagger cloud, it also shows the same: ![image](https://github.com/dagger/dagger/assets/1578458/19367313-329b-4b46-8e84-6a8212109a2e) Looking a bit in-depth looks like there seems to be a `merge` op which is not cached when using magicache ![image](https://github.com/dagger/dagger/assets/1578458/35a9f9a2-6817-45ee-9abf-506243509078) Dagger cloud URL: https://dagger.cloud/runs/058cf603-4334-4b85-8fd2-80483e379df2 cc @RonanQuigley ### Log output N/A ### Steps to reproduce N/A ### SDK version Go SDK 0.9.3 ### OS version linux
https://github.com/dagger/dagger/issues/6163
https://github.com/dagger/dagger/pull/6211
099f2aebb0b486b6f584de1074f4ff1521541b07
a789dbe3747ad3cef142102447194d3e59f9ed7f
"2023-11-27T18:54:01Z"
go
"2023-12-06T17:02:45Z"
engine/buildkit/filesync.go
package buildkit import ( "bytes" "context" "errors" "fmt" "io" "os" "path" "path/filepath" "strings" "github.com/containerd/continuity/fs" "github.com/dagger/dagger/engine" "github.com/dagger/dagger/engine/sources/blob" cacheconfig "github.com/moby/buildkit/cache/config" bkclient "github.com/moby/buildkit/client" "github.com/moby/buildkit/client/llb" bkgw "github.com/moby/buildkit/frontend/gateway/client" "github.com/moby/buildkit/session/filesync" "github.com/moby/buildkit/snapshot" bksolverpb "github.com/moby/buildkit/solver/pb" "github.com/moby/buildkit/util/bklog" "github.com/moby/buildkit/util/compression" bkworker "github.com/moby/buildkit/worker" specs "github.com/opencontainers/image-spec/specs-go/v1" "github.com/vito/progrock" ) func (c *Client) LocalImport( ctx context.Context, recorder *progrock.Recorder, platform specs.Platform, srcPath string, excludePatterns []string, includePatterns []string, ) (*bksolverpb.Definition, error) { srcPath = path.Clean(srcPath) if srcPath == ".." || strings.HasPrefix(srcPath, "../") { return nil, fmt.Errorf("path %q escapes workdir; use an absolute path instead", srcPath) } clientMetadata, err := engine.ClientMetadataFromContext(ctx) if err != nil { return nil, err } localOpts := []llb.LocalOption{ llb.SessionID(clientMetadata.ClientID), llb.SharedKeyHint(strings.Join([]string{clientMetadata.ClientHostname, srcPath}, " ")), } localName := fmt.Sprintf("upload %s from %s (client id: %s)", srcPath, clientMetadata.ClientHostname, clientMetadata.ClientID) if len(excludePatterns) > 0 { localName += fmt.Sprintf(" (exclude: %s)", strings.Join(excludePatterns, ", ")) localOpts = append(localOpts, llb.ExcludePatterns(excludePatterns)) } if len(includePatterns) > 0 { localName += fmt.Sprintf(" (include: %s)", strings.Join(includePatterns, ", ")) localOpts = append(localOpts, llb.IncludePatterns(includePatterns)) } localOpts = append(localOpts, llb.WithCustomName(localName)) localLLB := llb.Local(srcPath, localOpts...) // We still need to do a copy here for now because buildkit's cache calls Finalize on refs when getting their blobs // which makes the cache ref for the local ref unable to be reused. copyLLB := llb.Scratch().File( llb.Copy(localLLB, "/", "/"), llb.WithCustomNamef(localName), ) copyDef, err := copyLLB.Marshal(ctx, llb.Platform(platform)) if err != nil { return nil, err } copyPB := copyDef.ToPB() RecordVertexes(recorder, copyPB) res, err := c.Solve(ctx, bkgw.SolveRequest{ Definition: copyPB, Evaluate: true, }) if err != nil { return nil, err } resultProxy, err := res.SingleRef() if err != nil { return nil, fmt.Errorf("failed to get single ref: %s", err) } cachedRes, err := resultProxy.Result(ctx) if err != nil { return nil, wrapError(ctx, err, c.ID()) } workerRef, ok := cachedRes.Sys().(*bkworker.WorkerRef) if !ok { return nil, fmt.Errorf("invalid ref: %T", cachedRes.Sys()) } ref := workerRef.ImmutableRef // Force an unlazy of the copy in case it was lazy due to remote caching; we // need it to exist locally or else blob source won't work. // NOTE: in theory we could keep it lazy if we could get the descriptor handlers // for the remote over to the blob source code, but the plumbing to accomplish that // is tricky and ultimately only result in a marginal performance optimization. err = ref.Extract(ctx, nil) if err != nil { return nil, fmt.Errorf("failed to extract ref: %s", err) } remotes, err := ref.GetRemotes(ctx, true, cacheconfig.RefConfig{ Compression: compression.Config{ // TODO: double check whether using Zstd is best idea. It's the fastest, but // if it ends up in an exported image and the user tries to load that into // old docker versions, they will get an error unless they specify the force // compression option during export. Type: compression.Zstd, }, }, false, nil) if err != nil { return nil, fmt.Errorf("failed to get remotes: %s", err) } if len(remotes) != 1 { return nil, fmt.Errorf("expected 1 remote, got %d", len(remotes)) } remote := remotes[0] if len(remote.Descriptors) != 1 { return nil, fmt.Errorf("expected 1 descriptor, got %d", len(remote.Descriptors)) } desc := remote.Descriptors[0] blobDef, err := blob.LLB(desc).Marshal(ctx) if err != nil { return nil, fmt.Errorf("failed to marshal blob source: %s", err) } blobPB := blobDef.ToPB() // do a sync solve right now so we can release the cache ref for the local import // without giving up the lease on the blob _, err = c.Solve(ctx, bkgw.SolveRequest{ Definition: blobPB, Evaluate: true, }) if err != nil { return nil, fmt.Errorf("failed to solve blobsource: %w", wrapError(ctx, err, c.ID())) } return blobPB, nil } // Import a directory from the engine container, as opposed to from a client func (c *Client) EngineContainerLocalImport( ctx context.Context, recorder *progrock.Recorder, platform specs.Platform, srcPath string, excludePatterns []string, includePatterns []string, ) (*bksolverpb.Definition, error) { hostname, err := os.Hostname() if err != nil { return nil, fmt.Errorf("failed to get hostname for engine local import: %s", err) } ctx = engine.ContextWithClientMetadata(ctx, &engine.ClientMetadata{ ClientID: c.ID(), ClientHostname: hostname, }) return c.LocalImport(ctx, recorder, platform, srcPath, excludePatterns, includePatterns) } func (c *Client) ReadCallerHostFile(ctx context.Context, path string) ([]byte, error) { ctx, cancel, err := c.withClientCloseCancel(ctx) if err != nil { return nil, err } defer cancel() clientMetadata, err := engine.ClientMetadataFromContext(ctx) if err != nil { return nil, fmt.Errorf("failed to get requester session ID: %s", err) } ctx = engine.LocalImportOpts{ OwnerClientID: clientMetadata.ClientID, Path: path, ReadSingleFileOnly: true, MaxFileSize: MaxFileContentsChunkSize, }.AppendToOutgoingContext(ctx) clientCaller, err := c.SessionManager.Get(ctx, clientMetadata.ClientID, false) if err != nil { return nil, fmt.Errorf("failed to get requester session: %s", err) } diffCopyClient, err := filesync.NewFileSyncClient(clientCaller.Conn()).DiffCopy(ctx) if err != nil { return nil, fmt.Errorf("failed to create diff copy client: %s", err) } defer diffCopyClient.CloseSend() msg := filesync.BytesMessage{} err = diffCopyClient.RecvMsg(&msg) if err != nil { return nil, fmt.Errorf("failed to receive file bytes message: %s", err) } return msg.Data, nil } func (c *Client) LocalDirExport( ctx context.Context, def *bksolverpb.Definition, destPath string, ) (rerr error) { ctx = bklog.WithLogger(ctx, bklog.G(ctx).WithField("export_path", destPath)) bklog.G(ctx).Debug("exporting local dir") defer func() { lg := bklog.G(ctx) if rerr != nil { lg = lg.WithError(rerr) } lg.Debug("finished exporting local dir") }() ctx, cancel, err := c.withClientCloseCancel(ctx) if err != nil { return err } defer cancel() destPath = path.Clean(destPath) if destPath == ".." || strings.HasPrefix(destPath, "../") { return fmt.Errorf("path %q escapes workdir; use an absolute path instead", destPath) } res, err := c.Solve(ctx, bkgw.SolveRequest{Definition: def}) if err != nil { return fmt.Errorf("failed to solve for local export: %s", err) } cacheRes, err := ConvertToWorkerCacheResult(ctx, res) if err != nil { return fmt.Errorf("failed to convert result: %s", err) } exporter, err := c.Worker.Exporter(bkclient.ExporterLocal, c.SessionManager) if err != nil { return err } expInstance, err := exporter.Resolve(ctx, nil) if err != nil { return fmt.Errorf("failed to resolve exporter: %s", err) } clientMetadata, err := engine.ClientMetadataFromContext(ctx) if err != nil { return fmt.Errorf("failed to get requester session ID: %s", err) } ctx = engine.LocalExportOpts{ DestClientID: clientMetadata.ClientID, Path: destPath, }.AppendToOutgoingContext(ctx) _, descRef, err := expInstance.Export(ctx, cacheRes, clientMetadata.ClientID) if err != nil { return fmt.Errorf("failed to export: %s", err) } if descRef != nil { descRef.Release() } return nil } func (c *Client) LocalFileExport( ctx context.Context, def *bksolverpb.Definition, destPath string, filePath string, allowParentDirPath bool, ) (rerr error) { ctx = bklog.WithLogger(ctx, bklog.G(ctx). WithField("export_path", destPath). WithField("file_path", filePath). WithField("allow_parent_dir_path", allowParentDirPath), ) bklog.G(ctx).Debug("exporting local file") defer func() { lg := bklog.G(ctx) if rerr != nil { lg = lg.WithError(rerr) } lg.Debug("finished exporting local file") }() ctx, cancel, err := c.withClientCloseCancel(ctx) if err != nil { return err } defer cancel() destPath = path.Clean(destPath) if destPath == ".." || strings.HasPrefix(destPath, "../") { return fmt.Errorf("path %q escapes workdir; use an absolute path instead", destPath) } res, err := c.Solve(ctx, bkgw.SolveRequest{Definition: def, Evaluate: true}) if err != nil { return fmt.Errorf("failed to solve for local export: %s", err) } ref, err := res.SingleRef() if err != nil { return fmt.Errorf("failed to get single ref: %s", err) } mountable, err := ref.getMountable(ctx) if err != nil { return fmt.Errorf("failed to get mountable: %s", err) } mounter := snapshot.LocalMounter(mountable) mountPath, err := mounter.Mount() if err != nil { return fmt.Errorf("failed to mount: %s", err) } defer mounter.Unmount() mntFilePath, err := fs.RootPath(mountPath, filePath) if err != nil { return fmt.Errorf("failed to get root path: %s", err) } file, err := os.Open(mntFilePath) if err != nil { return fmt.Errorf("failed to open file: %s", err) } defer file.Close() stat, err := file.Stat() if err != nil { return fmt.Errorf("failed to stat file: %s", err) } clientMetadata, err := engine.ClientMetadataFromContext(ctx) if err != nil { return fmt.Errorf("failed to get requester session ID: %s", err) } ctx = engine.LocalExportOpts{ DestClientID: clientMetadata.ClientID, Path: destPath, IsFileStream: true, FileOriginalName: filepath.Base(filePath), AllowParentDirPath: allowParentDirPath, FileMode: stat.Mode().Perm(), }.AppendToOutgoingContext(ctx) clientCaller, err := c.SessionManager.Get(ctx, clientMetadata.ClientID, false) if err != nil { return fmt.Errorf("failed to get requester session: %s", err) } diffCopyClient, err := filesync.NewFileSendClient(clientCaller.Conn()).DiffCopy(ctx) if err != nil { return fmt.Errorf("failed to create diff copy client: %s", err) } defer diffCopyClient.CloseSend() fileSizeLeft := stat.Size() chunkSize := int64(MaxFileContentsChunkSize) for fileSizeLeft > 0 { buf := new(bytes.Buffer) // TODO: more efficient to use bufio.Writer, reuse buffers, sync.Pool, etc. n, err := io.CopyN(buf, file, chunkSize) if errors.Is(err, io.EOF) { err = nil } if err != nil { return fmt.Errorf("failed to read file: %s", err) } fileSizeLeft -= n err = diffCopyClient.SendMsg(&filesync.BytesMessage{Data: buf.Bytes()}) if errors.Is(err, io.EOF) { err := diffCopyClient.RecvMsg(struct{}{}) if err != nil { return fmt.Errorf("diff copy client error: %s", err) } } else if err != nil { return fmt.Errorf("failed to send file chunk: %s", err) } } if err := diffCopyClient.CloseSend(); err != nil { return fmt.Errorf("failed to close send: %s", err) } // wait for receiver to finish var msg filesync.BytesMessage if err := diffCopyClient.RecvMsg(&msg); err != io.EOF { return fmt.Errorf("unexpected closing recv msg: %s", err) } return nil } // IOReaderExport exports the contents of an io.Reader to the caller's local fs as a file // TODO: de-dupe this with the above method to extent possible func (c *Client) IOReaderExport(ctx context.Context, r io.Reader, destPath string, destMode os.FileMode) (rerr error) { ctx = bklog.WithLogger(ctx, bklog.G(ctx).WithField("export_path", destPath)) bklog.G(ctx).Debug("exporting bytes") defer func() { lg := bklog.G(ctx) if rerr != nil { lg = lg.WithError(rerr) } lg.Debug("finished exporting bytes") }() clientMetadata, err := engine.ClientMetadataFromContext(ctx) if err != nil { return fmt.Errorf("failed to get requester session ID: %s", err) } ctx = engine.LocalExportOpts{ DestClientID: clientMetadata.ClientID, Path: destPath, IsFileStream: true, FileOriginalName: filepath.Base(destPath), FileMode: destMode, }.AppendToOutgoingContext(ctx) clientCaller, err := c.SessionManager.Get(ctx, clientMetadata.ClientID, false) if err != nil { return fmt.Errorf("failed to get requester session: %s", err) } diffCopyClient, err := filesync.NewFileSendClient(clientCaller.Conn()).DiffCopy(ctx) if err != nil { return fmt.Errorf("failed to create diff copy client: %s", err) } defer diffCopyClient.CloseSend() chunkSize := int64(MaxFileContentsChunkSize) keepGoing := true for keepGoing { buf := new(bytes.Buffer) // TODO: more efficient to use bufio.Writer, reuse buffers, sync.Pool, etc. _, err := io.CopyN(buf, r, chunkSize) if errors.Is(err, io.EOF) { keepGoing = false err = nil } if err != nil { return fmt.Errorf("failed to read file: %s", err) } err = diffCopyClient.SendMsg(&filesync.BytesMessage{Data: buf.Bytes()}) if errors.Is(err, io.EOF) { err := diffCopyClient.RecvMsg(struct{}{}) if err != nil { return fmt.Errorf("diff copy client error: %s", err) } } else if err != nil { return fmt.Errorf("failed to send file chunk: %s", err) } } if err := diffCopyClient.CloseSend(); err != nil { return fmt.Errorf("failed to close send: %s", err) } // wait for receiver to finish var msg filesync.BytesMessage if err := diffCopyClient.RecvMsg(&msg); err != io.EOF { return fmt.Errorf("unexpected closing recv msg: %s", err) } return nil }
closed
dagger/dagger
https://github.com/dagger/dagger
6,163
🐞 WithMountedDirectory invalidating remote cache
### What is the issue? Given the following pipeline: ```go func main() { // initialize Dagger client ctx := context.Background() client, err := dagger.Connect(ctx, dagger.WithLogOutput(os.Stderr)) if err != nil { panic(err) } defer client.Close() src := client.Host().Directory(".", dagger.HostDirectoryOpts{ Include: []string{"bar"}, }) mountCache := client.Host().Directory("mount") _, err = client.Container(). From("alpine"). WithWorkdir("/root"). WithExec([]string{"apk", "add", "curl"}). WithMountedDirectory("/mount", mountCache). WithDirectory(".", src). WithExec([]string{"cat", "bar"}). Sync(ctx) if err != nil { panic(err) } } ``` Running that twice in my local setup, correctly caches all operations: ``` 130|marcos:tmp/test (⎈ |N/A)$ dagger run go run main.go ┣─╮ │ ▽ init │ █ [1.28s] connect │ ┣ [1.11s] starting engine │ ┣ [0.17s] starting session │ ┃ OK! │ ┻ █ [1.36s] go run main.go ┣─╮ │ ▽ host.directory mount │ █ [0.01s] upload mount from xps (client id: nf66pihk4bujhmj9nw5jrpzps) │ ┣ [0.00s] transferring mount: ┣─┼─╮ │ │ ▽ host.directory . │ │ █ [0.01s] upload . from xps (client id: nf66pihk4bujhmj9nw5jrpzps) (include: bar) │ │ ┣ [0.00s] transferring .: │ █ │ CACHED upload mount from xps (client id: nf66pihk4bujhmj9nw5jrpzps) │ █ │ [0.00s] blob://sha256:afad735041289d8662a90d002343ddac7dfdeca7ebb85fd3b1a786ff1a02183c │ ┣─┼─╮ blob://sha256:afad735041289d8662a90d002343ddac7dfdeca7ebb85fd3b1a786ff1a02183c │ ┻ │ │ │ █ │ CACHED upload . from xps (client id: nf66pihk4bujhmj9nw5jrpzps) (include: bar) │ █ │ [0.00s] blob://sha256:f4314233344fbbc7c171c06d5cace46282b4ee97b153ed06e0aa21ce6de98ae1 │ ╭─┫ │ blob://sha256:f4314233344fbbc7c171c06d5cace46282b4ee97b153ed06e0aa21ce6de98ae1 │ │ ┻ │ ┣─┼─╮ │ │ │ ▽ │ from alpine │ │ █ │ [1.11s] resolve image config for docker.io/library/alpine:latest │ │ █ │ [0.01s] pull docker.io/library/alpine:latest │ │ ┣ │ [0.01s] resolve docker.io/library/alpine@sha256:eece025e432126ce23f223450a0326fbebde39cdf496a85d8c016293fc851978 │ │ ┣─┼─╮ pull docker.io/library/alpine:latest │ │ ┻ │ │ █◀┼───┼─╯ CACHED exec apk add curl █◀╯ │ CACHED copy / /root █◀────╯ CACHED exec cat bar ``` When using magicache, for some reason the last `exec cat bar` operation doesn't seem to be cached at all: **output from a newly spawned engine** (local cache is empty): ``` ┣─╮ │ ▽ init │ █ [19.56s] connect │ ┣ [19.42s] starting engine │ ┣ [0.14s] starting session │ ┃ OK! │ ┻ █ [5.60s] go run main.go ┣─╮ │ ▽ host.directory . │ █ [0.04s] upload . from xps (client id: fvl7ohtwyhom301qxtt817rpg) (include: bar) │ ┣ [0.00s] transferring .: ┣─┼─╮ │ │ ▽ host.directory mount │ │ █ [0.04s] upload mount from xps (client id: fvl7ohtwyhom301qxtt817rpg) │ │ ┣ [0.00s] transferring mount: │ █ │ [0.01s] upload . from xps (client id: fvl7ohtwyhom301qxtt817rpg) (include: bar) │ ┣ │ [0.43s] █████████████ sha256:f4314233344fbbc7c171c06d5cace46282b4ee97b153ed06e0aa21ce6de98ae1 │ ┣ │ [0.01s] extracting sha256:f4314233344fbbc7c171c06d5cace46282b4ee97b153ed06e0aa21ce6de98ae1 │ │ █ [0.01s] upload mount from xps (client id: fvl7ohtwyhom301qxtt817rpg) │ │ ┣ [0.82s] █████████████ sha256:afad735041289d8662a90d002343ddac7dfdeca7ebb85fd3b1a786ff1a02183c │ │ ┣ [0.01s] extracting sha256:afad735041289d8662a90d002343ddac7dfdeca7ebb85fd3b1a786ff1a02183c │ █ │ [0.00s] blob://sha256:f4314233344fbbc7c171c06d5cace46282b4ee97b153ed06e0aa21ce6de98ae1 │ ┣─┼─╮ blob://sha256:f4314233344fbbc7c171c06d5cace46282b4ee97b153ed06e0aa21ce6de98ae1 │ ┻ │ │ │ █ │ [0.00s] blob://sha256:afad735041289d8662a90d002343ddac7dfdeca7ebb85fd3b1a786ff1a02183c │ ╭─┫ │ blob://sha256:afad735041289d8662a90d002343ddac7dfdeca7ebb85fd3b1a786ff1a02183c │ │ ┻ │ ┣─┼─╮ │ │ │ ▽ │ from alpine │ │ █ │ [2.12s] resolve image config for docker.io/library/alpine:latest │ │ █ │ [0.01s] pull docker.io/library/alpine:latest │ │ ┣ │ [0.01s] resolve docker.io/library/alpine@sha256:eece025e432126ce23f223450a0326fbebde39cdf496a85d8c016293fc851978 │ │ ┣─┼─╮ pull docker.io/library/alpine:latest │ │ ┻ │ │ █◀┼───┼─╯ CACHED exec apk add curl █◀┼───╯ CACHED copy / /root █◀╯ [0.30s] exec cat bar ┃ bar ┻ ``` ^ as you can see `exec cat bar` is not cached. If I check Dagger cloud, it also shows the same: ![image](https://github.com/dagger/dagger/assets/1578458/19367313-329b-4b46-8e84-6a8212109a2e) Looking a bit in-depth looks like there seems to be a `merge` op which is not cached when using magicache ![image](https://github.com/dagger/dagger/assets/1578458/35a9f9a2-6817-45ee-9abf-506243509078) Dagger cloud URL: https://dagger.cloud/runs/058cf603-4334-4b85-8fd2-80483e379df2 cc @RonanQuigley ### Log output N/A ### Steps to reproduce N/A ### SDK version Go SDK 0.9.3 ### OS version linux
https://github.com/dagger/dagger/issues/6163
https://github.com/dagger/dagger/pull/6211
099f2aebb0b486b6f584de1074f4ff1521541b07
a789dbe3747ad3cef142102447194d3e59f9ed7f
"2023-11-27T18:54:01Z"
go
"2023-12-06T17:02:45Z"
engine/sources/blob/blobsource.go
package blob import ( "context" "errors" "fmt" "strconv" "strings" "github.com/moby/buildkit/cache" "github.com/moby/buildkit/client/llb" "github.com/moby/buildkit/session" "github.com/moby/buildkit/solver" "github.com/moby/buildkit/solver/llbsolver/provenance" "github.com/moby/buildkit/solver/pb" "github.com/moby/buildkit/source" "github.com/opencontainers/go-digest" ocispecs "github.com/opencontainers/image-spec/specs-go/v1" ) const ( BlobScheme = "blob" MediaTypeAttr = "daggerBlobSourceMediaType" SizeAttr = "daggerBlobSourceSize" ) type Opt struct { CacheAccessor cache.Accessor } type blobSource struct { cache cache.Accessor } type SourceIdentifier struct { ocispecs.Descriptor } func (SourceIdentifier) Scheme() string { return BlobScheme } func (id SourceIdentifier) Capture(*provenance.Capture, string) error { // TODO: safe to skip? Even if so, should fill in someday once we support provenance return nil } func LLB(desc ocispecs.Descriptor) llb.State { attrs := map[string]string{ MediaTypeAttr: desc.MediaType, SizeAttr: strconv.Itoa(int(desc.Size)), } for k, v := range desc.Annotations { attrs[k] = v } return llb.NewState(llb.NewSource( fmt.Sprintf("%s://%s", BlobScheme, desc.Digest.String()), attrs, llb.Constraints{}, ).Output()) } func IdentifierFromPB(op *pb.SourceOp) (*SourceIdentifier, error) { scheme, ref, ok := strings.Cut(op.Identifier, "://") if !ok { return nil, fmt.Errorf("invalid blob source identifier %q", op.Identifier) } bs := &blobSource{} return bs.identifier(scheme, ref, op.GetAttrs(), nil) } func NewSource(opt Opt) (source.Source, error) { bs := &blobSource{ cache: opt.CacheAccessor, } return bs, nil } func (bs *blobSource) Schemes() []string { return []string{BlobScheme} } func (bs *blobSource) Identifier(scheme, ref string, sourceAttrs map[string]string, p *pb.Platform) (source.Identifier, error) { return bs.identifier(scheme, ref, sourceAttrs, p) } func (bs *blobSource) identifier(scheme, ref string, sourceAttrs map[string]string, _ *pb.Platform) (*SourceIdentifier, error) { desc := ocispecs.Descriptor{ Digest: digest.Digest(ref), Annotations: map[string]string{}, } for k, v := range sourceAttrs { switch k { case MediaTypeAttr: desc.MediaType = v case SizeAttr: blobSize, err := strconv.Atoi(v) if err != nil { return nil, fmt.Errorf("invalid blob size %q: %w", v, err) } desc.Size = int64(blobSize) default: desc.Annotations[k] = v } } return &SourceIdentifier{desc}, nil } func (bs *blobSource) Resolve(ctx context.Context, id source.Identifier, sm *session.Manager, _ solver.Vertex) (source.SourceInstance, error) { blobIdentifier, ok := id.(*SourceIdentifier) if !ok { return nil, fmt.Errorf("invalid blob identifier %v", id) } return &blobSourceInstance{ id: blobIdentifier, sm: sm, blobSource: bs, }, nil } type blobSourceInstance struct { id *SourceIdentifier sm *session.Manager *blobSource } func (bs *blobSourceInstance) CacheKey(context.Context, session.Group, int) (string, string, solver.CacheOpts, bool, error) { return "session:" + bs.id.Digest.String(), bs.id.Digest.String(), nil, true, nil } func (bs *blobSourceInstance) Snapshot(ctx context.Context, _ session.Group) (cache.ImmutableRef, error) { opts := []cache.RefOption{ // TODO: could also include description of original blob source by passing along more metadata cache.WithDescription(fmt.Sprintf("dagger blob source for %s", bs.id.Digest)), } ref, err := bs.cache.GetByBlob(ctx, bs.id.Descriptor, nil, opts...) var needsRemoteProviders cache.NeedsRemoteProviderError if errors.As(err, &needsRemoteProviders) { if optGetter := solver.CacheOptGetterOf(ctx); optGetter != nil { var keys []interface{} for _, dgst := range needsRemoteProviders { keys = append(keys, cache.DescHandlerKey(dgst)) } descHandlers := cache.DescHandlers(make(map[digest.Digest]*cache.DescHandler)) for k, v := range optGetter(true, keys...) { if key, ok := k.(cache.DescHandlerKey); ok { if handler, ok := v.(*cache.DescHandler); ok { descHandlers[digest.Digest(key)] = handler } } } opts = append(opts, descHandlers) ref, err = bs.cache.GetByBlob(ctx, bs.id.Descriptor, nil, opts...) } } if err != nil { return nil, fmt.Errorf("failed to load ref for blob snapshot: %w", err) } return ref, nil }
closed
dagger/dagger
https://github.com/dagger/dagger
5,991
Zenith: allow private fields in types
Creating an issue based on @shykes's comment here: https://discord.com/channels/707636530424053791/1120503349599543376/1166880734741549176 Today, an example type in Go might look something like: ```go type X struct { Foo string `json:"foo"` } ``` In this example, `Foo` is exported and persisted between multiple calls (since each function call is a separate execution of the go binary) as well as being queriable by the user / calling module. However, a relatively normal use case would be to want only that first property - a private field `Foo`, accessible and modifiable by the module, but inaccessible to the calling code. There are two main parts of this: - How should we mark a field as private at the API level? - We could have a `WithPrivate` call for fields, similar to `WithOptional` for function parameters. - This would mark the field as private, so we would always serialize/deserialize it, but would not generate it as part of the graphql schema for the module. - How should we indicate that the field is private in Go/Python/etc? - For Go, ideally we could use unexported fields as private - since `dagger.gen.go` is in the same package as `main.go`, then this wouldn't be a problem. However, a couple caveats: this would be the first thing (as far as I'm aware) to require access to private fields in `main.go` from `dagger.gen.go`, so it would be difficult to split this into a separate package later (if we wanted to prevent the user from accessing private parts of `dagger.gen.go`). It would still be possible though! We'd just need the code that accessed the parts of `main.go` to be auto-generated into the same package (and extract the internals into a separate package). Secondly, we'd then have no way to have fields with "forbidden types" - today, that's any structs (until we have module-defined IDable types), and any types declared outside the current package. This is similar in behavior to how args work today, so maybe this isn't a huge issue.
https://github.com/dagger/dagger/issues/5991
https://github.com/dagger/dagger/pull/6224
9a0f81a7367a675b13854f0be82694d4ebc44dd3
69da5d811ce20d7abc1d4af3a9912bb63ce93baf
"2023-10-27T14:51:01Z"
go
"2023-12-11T13:49:57Z"
cmd/codegen/generator/go/templates/modules.go
package templates import ( "encoding/json" "fmt" "go/ast" "go/token" "go/types" "maps" "os" "path/filepath" "reflect" "regexp" "runtime/debug" "sort" "strconv" "strings" . "github.com/dave/jennifer/jen" // nolint:revive,stylecheck "github.com/iancoleman/strcase" "golang.org/x/tools/go/packages" ) const ( daggerGenFilename = "dagger.gen.go" contextTypename = "context.Context" constructorFuncName = "New" ) /* moduleMainSrc generates the source code of the main func for Dagger Module code using the Go SDK. The overall idea is that users just need to create a struct with the same name as their Module and then add methods to that struct to implement their Module. Methods on that struct become Functions. They are also free to return custom objects from Functions, which themselves may have methods that become Functions too. However, only the "top-level" Module struct's Functions will be directly invokable. This is essentially just the GraphQL execution model. The implementation works by parsing the user's code and generating a main func that reads function call inputs from the Engine, calls the relevant function and returns the result. The generated code is mostly a giant switch/case on the object+function name, with each case doing json deserialization of the input arguments and calling the actual Go function. */ func (funcs goTemplateFuncs) moduleMainSrc() (string, error) { // HACK: the code in this func can be pretty flaky and tricky to debug - // it's much easier to debug when we actually have stack traces, so we grab // those on a panic defer func() { if r := recover(); r != nil { fmt.Fprintf(os.Stderr, "internal error during module code generation: %v\n", r) debug.PrintStack() panic(r) } }() if funcs.modulePkg == nil { // during bootstrapping, we might not have code yet, since it takes // multiple passes. return `func main() { panic("no code yet") }`, nil } ps := &parseState{ pkg: funcs.modulePkg, fset: funcs.moduleFset, methods: make(map[string][]method), moduleName: funcs.module.Name, } pkgScope := funcs.modulePkg.Types.Scope() objFunctionCases := map[string][]Code{} createMod := Qual("dag", "CurrentModule").Call() objs := []types.Object{} for _, name := range pkgScope.Names() { obj := pkgScope.Lookup(name) if obj == nil { continue } objs = append(objs, obj) } // preserve definition order, so developer can keep more important / // entrypoint types higher up sort.Slice(objs, func(i, j int) bool { return objs[i].Pos() < objs[j].Pos() }) tps := []types.Type{} for _, obj := range objs { // check if this is the constructor func, save it for later if so fn, isFn := obj.(*types.Func) if isFn && fn.Name() == constructorFuncName { ps.constructor = fn continue } tps = append(tps, obj.Type()) } added := map[string]struct{}{} topLevel := true for len(tps) != 0 { var nextTps []types.Type for _, tp := range tps { named, isNamed := tp.(*types.Named) if !isNamed { continue } obj := named.Obj() if obj.Pkg() != funcs.modulePkg.Types { // the type must be created in the target package continue } if !obj.Exported() { // the type must be exported if !topLevel { return "", fmt.Errorf("cannot code-generate unexported type %s", obj.Name()) } continue } strct, isStruct := named.Underlying().(*types.Struct) if !isStruct { // TODO(vito): could possibly support non-struct types, but why bother continue } // avoid adding a struct definition twice (if it's referenced in two function signatures) if _, ok := added[obj.Name()]; ok { continue } // TODO(vito): hacky: need to run this before fillObjectFunctionCases so it // collects all the methods objType, extraTypes, err := ps.goStructToAPIType(strct, named) if err != nil { return "", err } if objType == nil { // not including in module schema, skip it continue } if err := ps.fillObjectFunctionCases(named, objFunctionCases); err != nil { // errors indicate an internal problem rather than something w/ user code, so error instead return "", fmt.Errorf("failed to generate function cases for %s: %w", obj.Name(), err) } if len(objFunctionCases[obj.Name()]) == 0 && !ps.isMainModuleObject(obj.Name()) { if topLevel { // no functions on this top-level object, so don't add it to the module continue } if ps.isDaggerGenerated(named.Obj()) { // skip objects from outside this module continue } } // Add the object to the module createMod = dotLine(createMod, "WithObject").Call(Add(Line(), objType)) added[obj.Name()] = struct{}{} // If the object has any extra sub-types (e.g. for function return // values), add them to the list of types to process nextTps = append(nextTps, extraTypes...) } tps, nextTps = nextTps, nil topLevel = false } // TODO: sort cases and functions based on their definition order return strings.Join([]string{mainSrc, invokeSrc(objFunctionCases, createMod)}, "\n"), nil } func dotLine(a *Statement, id string) *Statement { return a.Op(".").Line().Id(id) } const ( // The static part of the generated code. It calls out to the "invoke" func, which is the mostly // dynamically generated code that actually calls the user's functions. mainSrc = `func main() { ctx := context.Background() fnCall := dag.CurrentFunctionCall() parentName, err := fnCall.ParentName(ctx) if err != nil { fmt.Println(err.Error()) os.Exit(2) } fnName, err := fnCall.Name(ctx) if err != nil { fmt.Println(err.Error()) os.Exit(2) } parentJson, err := fnCall.Parent(ctx) if err != nil { fmt.Println(err.Error()) os.Exit(2) } fnArgs, err := fnCall.InputArgs(ctx) if err != nil { fmt.Println(err.Error()) os.Exit(2) } inputArgs := map[string][]byte{} for _, fnArg := range fnArgs { argName, err := fnArg.Name(ctx) if err != nil { fmt.Println(err.Error()) os.Exit(2) } argValue, err := fnArg.Value(ctx) if err != nil { fmt.Println(err.Error()) os.Exit(2) } inputArgs[argName] = []byte(argValue) } result, err := invoke(ctx, []byte(parentJson), parentName, fnName, inputArgs) if err != nil { fmt.Println(err.Error()) os.Exit(2) } resultBytes, err := json.Marshal(result) if err != nil { fmt.Println(err.Error()) os.Exit(2) } _, err = fnCall.ReturnValue(ctx, JSON(resultBytes)) if err != nil { fmt.Println(err.Error()) os.Exit(2) } } ` parentJSONVar = "parentJSON" parentNameVar = "parentName" fnNameVar = "fnName" inputArgsVar = "inputArgs" invokeFuncName = "invoke" ) // the source code of the invoke func, which is the mostly dynamically generated code that actually calls the user's functions func invokeSrc(objFunctionCases map[string][]Code, createMod Code) string { // each `case` statement for every object name, which makes up the body of the invoke func objCases := []Code{} for objName, functionCases := range objFunctionCases { objCases = append(objCases, Case(Lit(objName)).Block(Switch(Id(fnNameVar)).Block(functionCases...))) } // when the object name is empty, return the module definition objCases = append(objCases, Case(Lit("")).Block( Return(createMod, Nil()), )) // default case (return error) objCases = append(objCases, Default().Block( Return(Nil(), Qual("fmt", "Errorf").Call(Lit("unknown object %s"), Id(parentNameVar))), )) objSwitch := Switch(Id(parentNameVar)).Block(objCases...) // func invoke( invokeFunc := Func().Id(invokeFuncName).Params( // ctx context.Context, Id("ctx").Qual("context", "Context"), // parentJSON []byte, Id(parentJSONVar).Index().Byte(), // parentName string, Id(parentNameVar).String(), // fnName string, Id(fnNameVar).String(), // inputArgs map[string][]byte, Id(inputArgsVar).Map(String()).Index().Byte(), ).Params( // ) (_ any, Id("_").Id("any"), // err error) Id("err").Error(), ).Block(objSwitch) return fmt.Sprintf("%#v", invokeFunc) } // TODO: use jennifer for generating this magical typedef func renderNameOrStruct(t types.Type) string { if ptr, ok := t.(*types.Pointer); ok { return "*" + renderNameOrStruct(ptr.Elem()) } if sl, ok := t.(*types.Slice); ok { return "[]" + renderNameOrStruct(sl.Elem()) } if st, ok := t.(*types.Struct); ok { result := "struct {\n" for i := 0; i < st.NumFields(); i++ { if !st.Field(i).Embedded() { result += st.Field(i).Name() + " " } result += renderNameOrStruct(st.Field(i).Type()) if tag := st.Tag(i); tag != "" { result += " `" + tag + "`" } result += "\n" } result += "}" return result } if named, ok := t.(*types.Named); ok { // Assume local // // TODO: this isn't always true - we likely want to support returning // types from other packages as well. However, this is tricky - how // should we handle returning *time.Time? We should probably convert // this to a graphql type that all langs can convert to their native // representation. base := named.Obj().Name() if typeArgs := named.TypeArgs(); typeArgs.Len() > 0 { base += "[" for i := 0; i < typeArgs.Len(); i++ { if i > 0 { base += ", " } base += renderNameOrStruct(typeArgs.At(i)) } base += "]" } return base } // HACK(vito): this is passed to Id(), which is a bit weird, but works return t.String() } var checkErrStatement = If(Err().Op("!=").Nil()).Block( // fmt.Println(err.Error()) Qual("fmt", "Println").Call(Err().Dot("Error").Call()), // os.Exit(2) Qual("os", "Exit").Call(Lit(2)), ) // fillObjectFunctionCases recursively fills out the `cases` map with entries for object name -> `case` statement blocks // for each function in that object func (ps *parseState) fillObjectFunctionCases(type_ types.Type, cases map[string][]Code) error { var objName string switch x := type_.(type) { case *types.Pointer: return ps.fillObjectFunctionCases(x.Elem(), cases) case *types.Named: objName = x.Obj().Name() default: return nil } if existingCases := cases[objName]; len(existingCases) > 0 { // handles recursive types, e.g. objects with chainable methods that return themselves return nil } hasConstructor := ps.isMainModuleObject(objName) && ps.constructor != nil methods := ps.methods[objName] if len(methods) == 0 && !hasConstructor { return nil } for _, method := range methods { fnName, sig := method.fn.Name(), method.fn.Type().(*types.Signature) if err := ps.fillObjectFunctionCase(objName, fnName, fnName, sig, method.paramSpecs, cases); err != nil { return err } } // main module object constructor case if hasConstructor { sig, ok := ps.constructor.Type().(*types.Signature) if !ok { return fmt.Errorf("expected %s to be a function, got %T", constructorFuncName, ps.constructor.Type()) } paramSpecs, err := ps.parseParamSpecs(ps.constructor) if err != nil { return fmt.Errorf("failed to parse %s function: %w", constructorFuncName, err) } // Validate the constructor returns the main module object (further general validation happens in fillObjectFunctionCase) results := sig.Results() if results.Len() == 0 { return fmt.Errorf("%s must return a value", constructorFuncName) } resultType := results.At(0).Type() if ptrType, ok := resultType.(*types.Pointer); ok { resultType = ptrType.Elem() } namedType, ok := resultType.(*types.Named) if !ok { return fmt.Errorf("%s must return the main module object %q", constructorFuncName, objName) } if namedType.Obj().Name() != objName { return fmt.Errorf("%s must return the main module object %q", constructorFuncName, objName) } if err := ps.fillObjectFunctionCase(objName, ps.constructor.Name(), "", sig, paramSpecs, cases); err != nil { return err } } // default case (return error) cases[objName] = append(cases[objName], Default().Block( Return(Nil(), Qual("fmt", "Errorf").Call(Lit("unknown function %s"), Id(fnNameVar))), )) return nil } func (ps *parseState) fillObjectFunctionCase( objName string, fnName string, caseName string, // separate from fnName to handle constructor where the caseName is empty string sig *types.Signature, paramSpecs []paramSpec, cases map[string][]Code, ) error { statements := []Code{} parentVarName := "parent" statements = append(statements, Var().Id(parentVarName).Id(objName), Err().Op("=").Qual("json", "Unmarshal").Call(Id(parentJSONVar), Op("&").Id(parentVarName)), checkErrStatement, ) var fnCallArgs []Code if sig.Recv() != nil { fnCallArgs = []Code{Op("&").Id(parentVarName)} } vars := map[string]struct{}{} for i, spec := range paramSpecs { if i == 0 && spec.paramType.String() == contextTypename { fnCallArgs = append(fnCallArgs, Id("ctx")) continue } var varName string var varType types.Type var target *Statement if spec.parent == nil { varName = strcase.ToLowerCamel(spec.name) varType = spec.paramType target = Id(varName) } else { // create only one declaration for option structs varName = spec.parent.name varType = spec.parent.paramType target = Id(spec.parent.name).Dot(spec.name) } if _, ok := vars[varName]; !ok { vars[varName] = struct{}{} tp := varType access := Id(varName) tp2, access2 := findOptsAccessPattern(varType, Id(varName)) // only apply the access pattern if this is an inline opts struct wrapper or an Optional type wrapper _, applyAccessPattern := tp2.(*types.Struct) // inline struct case if !applyAccessPattern { // check for Optional _, applyAccessPattern = ps.isOptionalWrapper(tp2) } if applyAccessPattern { tp = tp2 access = access2 } statements = append(statements, Var().Id(varName).Id(renderNameOrStruct(tp))) if spec.variadic { fnCallArgs = append(fnCallArgs, access.Op("...")) } else { fnCallArgs = append(fnCallArgs, access) } } statements = append(statements, If(Id(inputArgsVar).Index(Lit(spec.graphqlName())).Op("!=").Nil()).Block( Err().Op("=").Qual("json", "Unmarshal").Call( Index().Byte().Parens(Id(inputArgsVar).Index(Lit(spec.graphqlName()))), Op("&").Add(target), ), checkErrStatement, )) } results := sig.Results() var callStatement *Statement if sig.Recv() != nil { callStatement = Parens(Op("*").Id(objName)).Dot(fnName).Call(fnCallArgs...) } else { callStatement = Id(fnName).Call(fnCallArgs...) } switch results.Len() { case 2: // assume second value is error if results.At(1).Type().String() != errorTypeName { // sanity check return fmt.Errorf("second return value must be error, have %s", results.At(1).Type().String()) } statements = append(statements, Return(callStatement)) cases[objName] = append(cases[objName], Case(Lit(caseName)).Block(statements...)) if err := ps.fillObjectFunctionCases(results.At(0).Type(), cases); err != nil { return err } return nil case 1: if results.At(0).Type().String() == errorTypeName { // void error return statements = append(statements, Return(Nil(), callStatement)) cases[objName] = append(cases[objName], Case(Lit(caseName)).Block(statements...)) } else { // non-error return statements = append(statements, Return(callStatement, Nil())) cases[objName] = append(cases[objName], Case(Lit(caseName)).Block(statements...)) if err := ps.fillObjectFunctionCases(results.At(0).Type(), cases); err != nil { return err } } return nil case 0: // void return // // NB(vito): it's really weird to have a fully void return (not even // error), but we should still support it for completeness. statements = append(statements, callStatement, Return(Nil(), Nil())) cases[objName] = append(cases[objName], Case(Lit(caseName)).Block(statements...)) return nil default: return fmt.Errorf("unexpected number of results from function %s: %d", fnName, results.Len()) } } type parseState struct { pkg *packages.Package fset *token.FileSet methods map[string][]method moduleName string // If it exists, constructor is the New func that returns the main module object constructor *types.Func } func (ps *parseState) isMainModuleObject(name string) bool { return strcase.ToCamel(ps.moduleName) == strcase.ToCamel(name) } type method struct { fn *types.Func paramSpecs []paramSpec } func (ps *parseState) goTypeToAPIType(typ types.Type, named *types.Named) (*Statement, *types.Named, error) { switch t := typ.(type) { case *types.Named: // Named types are any types declared like `type Foo <...>` typeDef, _, err := ps.goTypeToAPIType(t.Underlying(), t) if err != nil { return nil, nil, fmt.Errorf("failed to convert named type: %w", err) } return typeDef, t, nil case *types.Pointer: return ps.goTypeToAPIType(t.Elem(), named) case *types.Slice: elemTypeDef, underlying, err := ps.goTypeToAPIType(t.Elem(), nil) if err != nil { return nil, nil, fmt.Errorf("failed to convert slice element type: %w", err) } return Qual("dag", "TypeDef").Call().Dot("WithListOf").Call( elemTypeDef, ), underlying, nil case *types.Basic: if t.Kind() == types.Invalid { return nil, nil, fmt.Errorf("invalid type: %+v", t) } var kind Code switch t.Info() { case types.IsString: kind = Id("Stringkind") case types.IsInteger: kind = Id("Integerkind") case types.IsBoolean: kind = Id("Booleankind") default: return nil, nil, fmt.Errorf("unsupported basic type: %+v", t) } return Qual("dag", "TypeDef").Call().Dot("WithKind").Call( kind, ), named, nil case *types.Struct: if named == nil { return nil, nil, fmt.Errorf("struct types must be named") } typeName := named.Obj().Name() if typeName == "" { return nil, nil, fmt.Errorf("struct types must be named") } return Qual("dag", "TypeDef").Call().Dot("WithObject").Call( Lit(typeName), ), named, nil default: return nil, nil, fmt.Errorf("unsupported type %T", t) } } const errorTypeName = "error" func (ps *parseState) goStructToAPIType(t *types.Struct, named *types.Named) (*Statement, []types.Type, error) { if named == nil { return nil, nil, fmt.Errorf("struct types must be named") } typeName := named.Obj().Name() if typeName == "" { return nil, nil, fmt.Errorf("struct types must be named") } // We don't support extending objects from outside this module, so we will // be skipping it. But first we want to verify the user isn't adding methods // to it (in which case we error out). objectIsDaggerGenerated := ps.isDaggerGenerated(named.Obj()) methods := []*types.Func{} methodSet := types.NewMethodSet(types.NewPointer(named)) // Fill out any Functions on the object, which are methods on the struct // TODO: support methods defined on non-pointer receivers for i := 0; i < methodSet.Len(); i++ { methodObj := methodSet.At(i).Obj() if ps.isDaggerGenerated(methodObj) { // We don't care about pre-existing methods on core types or objects from dependency modules. continue } if objectIsDaggerGenerated { return nil, nil, fmt.Errorf("cannot define methods on objects from outside this module") } method, ok := methodObj.(*types.Func) if !ok { return nil, nil, fmt.Errorf("expected method to be a func, got %T", methodObj) } if !method.Exported() { continue } methods = append(methods, method) } if objectIsDaggerGenerated { return nil, nil, nil } sort.Slice(methods, func(i, j int) bool { return methods[i].Pos() < methods[j].Pos() }) // args for WithObject withObjectArgs := []Code{ Lit(typeName), } withObjectOpts := []Code{} // Fill out the Description with the comment above the struct (if any) typeSpec, err := ps.typeSpecForNamedType(named) if err != nil { return nil, nil, fmt.Errorf("failed to find decl for named type %s: %w", typeName, err) } if comment := typeSpec.Doc.Text(); comment != "" { withObjectOpts = append(withObjectOpts, Id("Description").Op(":").Lit(strings.TrimSpace(comment))) } if len(withObjectOpts) > 0 { withObjectArgs = append(withObjectArgs, Id("TypeDefWithObjectOpts").Values(withObjectOpts...)) } typeDef := Qual("dag", "TypeDef").Call().Dot("WithObject").Call(withObjectArgs...) var subTypes []types.Type for _, method := range methods { fnTypeDef, functionSubTypes, err := ps.goFuncToAPIFunctionDef(typeName, method) if err != nil { return nil, nil, fmt.Errorf("failed to convert method %s to function def: %w", method.Name(), err) } subTypes = append(subTypes, functionSubTypes...) typeDef = dotLine(typeDef, "WithFunction").Call(Add(Line(), fnTypeDef)) } astStructType, ok := typeSpec.Type.(*ast.StructType) if !ok { return nil, nil, fmt.Errorf("expected type spec to be a struct, got %T", typeSpec.Type) } // Fill out the static fields of the struct (if any) astFields := unpackASTFields(astStructType.Fields) for i := 0; i < t.NumFields(); i++ { field := t.Field(i) if !field.Exported() { continue } fieldTypeDef, subType, err := ps.goTypeToAPIType(field.Type(), nil) if err != nil { return nil, nil, fmt.Errorf("failed to convert field type: %w", err) } if subType != nil { subTypes = append(subTypes, subType) } description := astFields[i].Doc.Text() if description == "" { description = astFields[i].Comment.Text() } description = strings.TrimSpace(description) name := field.Name() // override the name with the json tag if it was set - otherwise, we // end up asking for a name that we won't unmarshal correctly tag := reflect.StructTag(t.Tag(i)) if dt := tag.Get("json"); dt != "" { dt, _, _ = strings.Cut(dt, ",") if dt == "-" { continue } name = dt } withFieldArgs := []Code{ Lit(name), fieldTypeDef, } if description != "" { withFieldArgs = append(withFieldArgs, Id("TypeDefWithFieldOpts").Values( Id("Description").Op(":").Lit(description), )) } typeDef = dotLine(typeDef, "WithField").Call(withFieldArgs...) } if ps.isMainModuleObject(typeName) && ps.constructor != nil { fnTypeDef, _, err := ps.goFuncToAPIFunctionDef("", ps.constructor) if err != nil { return nil, nil, fmt.Errorf("failed to convert constructor to function def: %w", err) } typeDef = dotLine(typeDef, "WithConstructor").Call(Add(Line(), fnTypeDef)) } return typeDef, subTypes, nil } var voidDef = Qual("dag", "TypeDef").Call(). Dot("WithKind").Call(Id("Voidkind")). Dot("WithOptional").Call(Lit(true)) func (ps *parseState) goFuncToAPIFunctionDef(receiverTypeName string, fn *types.Func) (*Statement, []types.Type, error) { sig, ok := fn.Type().(*types.Signature) if !ok { return nil, nil, fmt.Errorf("expected method to be a func, got %T", fn.Type()) } // stash away the method signature so we can remember details on how it's // invoked (e.g. no error return, no ctx arg, error-only return, etc) specs, err := ps.parseParamSpecs(fn) if err != nil { return nil, nil, err } if receiverTypeName != "" { ps.methods[receiverTypeName] = append(ps.methods[receiverTypeName], method{fn: fn, paramSpecs: specs}) } var fnReturnType *Statement var subTypes []types.Type results := sig.Results() var returnSubType *types.Named switch results.Len() { case 0: fnReturnType = voidDef case 1: result := results.At(0).Type() if result.String() == errorTypeName { fnReturnType = voidDef } else { fnReturnType, returnSubType, err = ps.goTypeToAPIType(result, nil) if err != nil { return nil, nil, fmt.Errorf("failed to convert result type: %w", err) } } case 2: result := results.At(0).Type() subTypes = append(subTypes, result) fnReturnType, returnSubType, err = ps.goTypeToAPIType(result, nil) if err != nil { return nil, nil, fmt.Errorf("failed to convert result type: %w", err) } default: return nil, nil, fmt.Errorf("method %s has too many return values", fn.Name()) } if returnSubType != nil { subTypes = append(subTypes, returnSubType) } fnDef := Qual("dag", "Function").Call(Lit(fn.Name()), Add(Line(), fnReturnType)) funcDecl, err := ps.declForFunc(fn) if err != nil { return nil, nil, fmt.Errorf("failed to find decl for method %s: %w", fn.Name(), err) } if comment := funcDecl.Doc.Text(); comment != "" { fnDef = dotLine(fnDef, "WithDescription").Call(Lit(strings.TrimSpace(comment))) } for i, spec := range specs { if i == 0 && spec.paramType.String() == contextTypename { // ignore ctx arg continue } typeDef, subType, err := ps.goTypeToAPIType(spec.baseType, nil) if err != nil { return nil, nil, fmt.Errorf("failed to convert param type: %w", err) } if subType != nil { subTypes = append(subTypes, subType) } if spec.optional { typeDef = typeDef.Dot("WithOptional").Call(Lit(true)) } // arguments to WithArg args := []Code{Lit(spec.graphqlName()), typeDef} argOpts := []Code{} if spec.description != "" { argOpts = append(argOpts, Id("Description").Op(":").Lit(spec.description)) } if spec.defaultValue != "" { var jsonEnc string if spec.baseType.String() == "string" { enc, err := json.Marshal(spec.defaultValue) if err != nil { return nil, nil, fmt.Errorf("failed to marshal default value: %w", err) } jsonEnc = string(enc) } else { jsonEnc = spec.defaultValue } argOpts = append(argOpts, Id("DefaultValue").Op(":").Id("JSON").Call(Lit(jsonEnc))) } if len(argOpts) > 0 { args = append(args, Id("FunctionWithArgOpts").Values(argOpts...)) } fnDef = dotLine(fnDef, "WithArg").Call(args...) } return fnDef, subTypes, nil } func (ps *parseState) parseParamSpecs(fn *types.Func) ([]paramSpec, error) { sig := fn.Type().(*types.Signature) params := sig.Params() if params.Len() == 0 { return nil, nil } specs := make([]paramSpec, 0, params.Len()) i := 0 if params.At(i).Type().String() == contextTypename { spec, err := ps.parseParamSpecVar(params.At(i), "", "") if err != nil { return nil, err } specs = append(specs, spec) i++ } fnDecl, err := ps.declForFunc(fn) if err != nil { return nil, err } // is the first data param an inline struct? if so, process each field of // the struct as a top-level param if i+1 == params.Len() { param := params.At(i) paramType, ok := asInlineStruct(param.Type()) if ok { stype, ok := asInlineStructAst(fnDecl.Type.Params.List[i].Type) if !ok { return nil, fmt.Errorf("expected struct type for %s", param.Name()) } parent := &paramSpec{ name: params.At(i).Name(), paramType: param.Type(), baseType: param.Type(), } paramFields := unpackASTFields(stype.Fields) for f := 0; f < paramType.NumFields(); f++ { spec, err := ps.parseParamSpecVar(paramType.Field(f), paramFields[f].Doc.Text(), paramFields[f].Comment.Text()) if err != nil { return nil, err } spec.parent = parent specs = append(specs, spec) } return specs, nil } } // if other parameter passing schemes fail, just treat each remaining arg // as a top-level param paramFields := unpackASTFields(fnDecl.Type.Params) for ; i < params.Len(); i++ { docComment, lineComment := ps.commentForFuncField(fnDecl, paramFields, i) spec, err := ps.parseParamSpecVar(params.At(i), docComment.Text(), lineComment.Text()) if err != nil { return nil, err } if sig.Variadic() && i == params.Len()-1 { spec.variadic = true } specs = append(specs, spec) } return specs, nil } func (ps *parseState) parseParamSpecVar(field *types.Var, docComment string, lineComment string) (paramSpec, error) { if _, ok := field.Type().(*types.Struct); ok { return paramSpec{}, fmt.Errorf("nested structs are not supported") } paramType := field.Type() baseType := paramType for { ptr, ok := baseType.(*types.Pointer) if !ok { break } baseType = ptr.Elem() } optional := false defaultValue := "" if named, ok := ps.isOptionalWrapper(baseType); ok { typeArgs := named.TypeArgs() if typeArgs.Len() != 1 { return paramSpec{}, fmt.Errorf("optional type must have exactly one type argument") } optional = true baseType = typeArgs.At(0) for { ptr, ok := baseType.(*types.Pointer) if !ok { break } baseType = ptr.Elem() } } docPragmas, docComment := parsePragmaComment(docComment) linePragmas, lineComment := parsePragmaComment(lineComment) comment := strings.TrimSpace(docComment) if comment == "" { comment = strings.TrimSpace(lineComment) } pragmas := make(map[string]string) maps.Copy(pragmas, docPragmas) maps.Copy(pragmas, linePragmas) if v, ok := pragmas["default"]; ok { defaultValue = v } if v, ok := pragmas["optional"]; ok { if v == "" { optional = true } else { optional, _ = strconv.ParseBool(v) } } return paramSpec{ name: field.Name(), paramType: paramType, baseType: baseType, optional: optional, defaultValue: defaultValue, description: comment, }, nil } type paramSpec struct { name string description string optional bool variadic bool defaultValue string // paramType is the full type declared in the function signature, which may // include pointer types, Optional, etc paramType types.Type // baseType is the simplified base type derived from the function signature baseType types.Type // parent is set if this paramSpec is nested inside a parent inline struct, // and is used to create a declaration of the entire inline struct parent *paramSpec } func (spec *paramSpec) graphqlName() string { return strcase.ToLowerCamel(spec.name) } // typeSpecForNamedType returns the *ast* type spec for the given Named type. This is needed // because the types.Named object does not have the comments associated with the type, which // we want to parse. func (ps *parseState) typeSpecForNamedType(namedType *types.Named) (*ast.TypeSpec, error) { tokenFile := ps.fset.File(namedType.Obj().Pos()) if tokenFile == nil { return nil, fmt.Errorf("no file for %s", namedType.Obj().Name()) } for _, f := range ps.pkg.Syntax { if ps.fset.File(f.Pos()) != tokenFile { continue } for _, decl := range f.Decls { genDecl, ok := decl.(*ast.GenDecl) if !ok { continue } for _, spec := range genDecl.Specs { typeSpec, ok := spec.(*ast.TypeSpec) if !ok { continue } if typeSpec.Name.Name == namedType.Obj().Name() { if typeSpec.Doc == nil { typeSpec.Doc = genDecl.Doc } return typeSpec, nil } } } } return nil, fmt.Errorf("no decl for %s", namedType.Obj().Name()) } // declForFunc returns the *ast* func decl for the given Func type. This is needed // because the types.Func object does not have the comments associated with the type, which // we want to parse. func (ps *parseState) declForFunc(fnType *types.Func) (*ast.FuncDecl, error) { tokenFile := ps.fset.File(fnType.Pos()) if tokenFile == nil { return nil, fmt.Errorf("no file for %s", fnType.Name()) } for _, f := range ps.pkg.Syntax { if ps.fset.File(f.Pos()) != tokenFile { continue } for _, decl := range f.Decls { fnDecl, ok := decl.(*ast.FuncDecl) if ok && fnDecl.Name.Name == fnType.Name() { return fnDecl, nil } } } return nil, fmt.Errorf("no decl for %s", fnType.Name()) } // commentForFuncField returns the *ast* comment group for the given position. This // is needed because function args (despite being fields) don't have comments // associated with them, so this is a neat little hack to get them out. func (ps *parseState) commentForFuncField(fnDecl *ast.FuncDecl, unpackedParams []*ast.Field, i int) (docComment *ast.CommentGroup, lineComment *ast.CommentGroup) { pos := unpackedParams[i].Pos() tokenFile := ps.fset.File(pos) if tokenFile == nil { return nil, nil } line := tokenFile.Line(pos) allowDocComment := true allowLineComment := true if i == 0 { fieldStartLine := tokenFile.Line(fnDecl.Type.Params.Pos()) if fieldStartLine == line || fieldStartLine == line-1 { // the argument is on the same (or next) line as the function // declaration, so there is no doc comment to find allowDocComment = false } } else { prevArgLine := tokenFile.Line(unpackedParams[i-1].Pos()) if prevArgLine == line || prevArgLine == line-1 { // the argument is on the same (or next) line as the previous // argument, so again there is no doc comment to find allowDocComment = false } } if i+1 < len(fnDecl.Type.Params.List) { nextArgLine := tokenFile.Line(unpackedParams[i+1].Pos()) if nextArgLine == line { // the argument is on the same line as the next argument, so there is // no line comment to find allowLineComment = false } } else { fieldEndLine := tokenFile.Line(fnDecl.Type.Params.End()) if fieldEndLine == line { // the argument is on the same line as the end of the field list, so there // is no line comment to find allowLineComment = false } } for _, f := range ps.pkg.Syntax { if ps.fset.File(f.Pos()) != tokenFile { continue } if allowDocComment { // take the last position in the last line, and try and find a // comment that contains it npos := tokenFile.LineStart(tokenFile.Line(pos)) - 1 for _, comment := range f.Comments { if comment.Pos() <= npos && npos <= comment.End() { docComment = comment break } } } if allowLineComment { // take the last position in the current line, and try and find a // comment that contains it npos := tokenFile.LineStart(tokenFile.Line(pos)+1) - 1 for _, comment := range f.Comments { if comment.Pos() <= npos && npos <= comment.End() { lineComment = comment break } } } } return docComment, lineComment } func (ps *parseState) isDaggerGenerated(obj types.Object) bool { tokenFile := ps.fset.File(obj.Pos()) return filepath.Base(tokenFile.Name()) == daggerGenFilename } func (ps *parseState) isOptionalWrapper(typ types.Type) (*types.Named, bool) { named, ok := typ.(*types.Named) if !ok { return nil, false } if named.Obj().Name() == "Optional" && ps.isDaggerGenerated(named.Obj()) { return named, true } return nil, false } // findOptsAccessPattern takes a type and a base statement (the name of a // variable that has the target type) and produces a type that can be used in a // variable declaration, as well as a statement that has the same type as the // target statement. // // This is essentially for helping resolve the pointeriness of types: a type of // **T and a variable p becomes T and &&p. This means we can *always* construct // an Opts object and unmarshal into it without having nil dereferences. func findOptsAccessPattern(t types.Type, access *Statement) (types.Type, *Statement) { switch t := t.(type) { case *types.Pointer: // taking the address of an address isn't allowed - so we use a ptr // helper function t2, val := findOptsAccessPattern(t.Elem(), access) return t2, Id("ptr").Call(val) // case *types.Slice: // t2, val := findOptsAccessPattern(t.Elem(), access) // return t2, Index().Id(renderNameOrStruct(t.Elem())).Values(val) default: return t, access } } var pragmaCommentRegexp = regexp.MustCompile(`\+\s*(\S+?)(?:=(.+))?(?:\n|$)`) // parsePragmaComment parses a dagger "pragma", that is used to define additional metadata about a parameter. func parsePragmaComment(comment string) (data map[string]string, rest string) { data = map[string]string{} lastEnd := 0 for _, v := range pragmaCommentRegexp.FindAllStringSubmatchIndex(comment, -1) { var key, value string if v[2] != -1 { key = comment[v[2]:v[3]] } if v[4] != -1 { value = comment[v[4]:v[5]] } data[key] = value rest += comment[lastEnd:v[0]] lastEnd = v[1] } rest += comment[lastEnd:] return data, rest } func asInlineStruct(t types.Type) (*types.Struct, bool) { switch t := t.(type) { case *types.Pointer: return asInlineStruct(t.Elem()) case *types.Struct: return t, true default: return nil, false } } func asInlineStructAst(t ast.Node) (*ast.StructType, bool) { switch t := t.(type) { case *ast.StarExpr: return asInlineStructAst(t.X) case *ast.StructType: return t, true default: return nil, false } } func unpackASTFields(fields *ast.FieldList) []*ast.Field { var unpacked []*ast.Field for _, field := range fields.List { for i, name := range field.Names { field := *field field.Names = []*ast.Ident{name} if i != 0 { field.Doc = nil field.Comment = nil } unpacked = append(unpacked, &field) } } return unpacked }
closed
dagger/dagger
https://github.com/dagger/dagger
5,991
Zenith: allow private fields in types
Creating an issue based on @shykes's comment here: https://discord.com/channels/707636530424053791/1120503349599543376/1166880734741549176 Today, an example type in Go might look something like: ```go type X struct { Foo string `json:"foo"` } ``` In this example, `Foo` is exported and persisted between multiple calls (since each function call is a separate execution of the go binary) as well as being queriable by the user / calling module. However, a relatively normal use case would be to want only that first property - a private field `Foo`, accessible and modifiable by the module, but inaccessible to the calling code. There are two main parts of this: - How should we mark a field as private at the API level? - We could have a `WithPrivate` call for fields, similar to `WithOptional` for function parameters. - This would mark the field as private, so we would always serialize/deserialize it, but would not generate it as part of the graphql schema for the module. - How should we indicate that the field is private in Go/Python/etc? - For Go, ideally we could use unexported fields as private - since `dagger.gen.go` is in the same package as `main.go`, then this wouldn't be a problem. However, a couple caveats: this would be the first thing (as far as I'm aware) to require access to private fields in `main.go` from `dagger.gen.go`, so it would be difficult to split this into a separate package later (if we wanted to prevent the user from accessing private parts of `dagger.gen.go`). It would still be possible though! We'd just need the code that accessed the parts of `main.go` to be auto-generated into the same package (and extract the internals into a separate package). Secondly, we'd then have no way to have fields with "forbidden types" - today, that's any structs (until we have module-defined IDable types), and any types declared outside the current package. This is similar in behavior to how args work today, so maybe this isn't a huge issue.
https://github.com/dagger/dagger/issues/5991
https://github.com/dagger/dagger/pull/6224
9a0f81a7367a675b13854f0be82694d4ebc44dd3
69da5d811ce20d7abc1d4af3a9912bb63ce93baf
"2023-10-27T14:51:01Z"
go
"2023-12-11T13:49:57Z"
core/integration/module_test.go
package core import ( "context" _ "embed" "encoding/json" "fmt" "go/format" "os" "path/filepath" "strings" "testing" "time" "github.com/iancoleman/strcase" "github.com/moby/buildkit/identity" "github.com/stretchr/testify/require" "github.com/tidwall/gjson" "golang.org/x/sync/errgroup" "dagger.io/dagger" "github.com/dagger/dagger/cmd/codegen/introspection" "github.com/dagger/dagger/core/modules" ) func TestModuleGoInit(t *testing.T) { t.Run("from scratch", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=bare", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{bare{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"bare":{"containerEcho":{"stdout":"hello\n"}}}`, out) }) t.Run("reserved go.mod name", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=go", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{go{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"go":{"containerEcho":{"stdout":"hello\n"}}}`, out) }) t.Run("uses expected Go module name, camel-cases Dagger module name", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=My-Module", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{myModule{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"myModule":{"containerEcho":{"stdout":"hello\n"}}}`, out) generated, err := modGen.File("go.mod").Contents(ctx) require.NoError(t, err) require.Contains(t, generated, "module main") }) t.Run("creates go.mod beneath an existing go.mod if root points beneath it", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/go.mod", dagger.ContainerWithNewFileOpts{ Contents: "module example.com/test\n", }). WithNewFile("/work/foo.go", dagger.ContainerWithNewFileOpts{ Contents: "package foo\n", }). WithWorkdir("/work/ci"). With(daggerExec("mod", "init", "--name=beneathGoMod", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{beneathGoMod{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"beneathGoMod":{"containerEcho":{"stdout":"hello\n"}}}`, out) t.Run("names Go module after Dagger module", func(t *testing.T) { generated, err := modGen.File("go.mod").Contents(ctx) require.NoError(t, err) require.Contains(t, generated, "module main") }) }) t.Run("respects existing go.mod", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithExec([]string{"go", "mod", "init", "example.com/test"}). With(daggerExec("mod", "init", "--name=hasGoMod", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{hasGoMod{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"hasGoMod":{"containerEcho":{"stdout":"hello\n"}}}`, out) t.Run("preserves module name", func(t *testing.T) { generated, err := modGen.File("go.mod").Contents(ctx) require.NoError(t, err) require.Contains(t, generated, "module example.com/test") }) }) t.Run("respects parent go.mod if root points to it", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithExec([]string{"go", "mod", "init", "example.com/test"}). WithNewFile("/work/foo.go", dagger.ContainerWithNewFileOpts{ Contents: "package foo\n", }). WithWorkdir("/work/child"). With(daggerExec("mod", "init", "--name=child", "--sdk=go", "--root=..")). WithNewFile("/work/child/main.go", dagger.ContainerWithNewFileOpts{ Contents: ` package main import "os" type Child struct{} func (m *Child) Root() *Directory { wd, err := os.Getwd() if err != nil { panic(err) } return dag.Host().Directory(wd+"/..") } `, }) generated := modGen. // explicitly sync to see whether it makes a go.mod With(daggerExec("mod", "sync")). Directory(".") logGen(ctx, t, generated) out, err := modGen. With(daggerQuery(`{child{root{entries}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"child":{"root":{"entries":["child","foo.go","go.mod","go.sum"]}}}`, out) childEntries, err := generated.Entries(ctx) require.NoError(t, err) require.NotContains(t, childEntries, "go.mod") t.Run("preserves parent module name", func(t *testing.T) { generated, err := modGen.File("/work/go.mod").Contents(ctx) require.NoError(t, err) require.Contains(t, generated, "module example.com/test") }) }) t.Run("respects existing go.mod even if root points to parent that has go.mod", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithExec([]string{"go", "mod", "init", "example.com/test"}). WithNewFile("/work/foo.go", dagger.ContainerWithNewFileOpts{ Contents: "package foo\n", }). WithWorkdir("/work/child"). WithExec([]string{"go", "mod", "init", "my-mod"}). With(daggerExec("mod", "init", "--name=child", "--sdk=go", "--root=..")). WithNewFile("/work/child/main.go", dagger.ContainerWithNewFileOpts{ Contents: ` package main import "os" type Child struct{} func (m *Child) Root() *Directory { wd, err := os.Getwd() if err != nil { panic(err) } return dag.Host().Directory(wd+"/..") } `, }) generated := modGen. // explicitly sync to see whether it makes a go.mod With(daggerExec("mod", "sync")). Directory(".") logGen(ctx, t, generated) out, err := modGen. With(daggerQuery(`{child{root{entries}}}`)). Stdout(ctx) require.NoError(t, err) // no go.sum require.JSONEq(t, `{"child":{"root":{"entries":["child","foo.go","go.mod"]}}}`, out) childEntries, err := generated.Entries(ctx) require.NoError(t, err) require.Contains(t, childEntries, "go.mod") require.Contains(t, childEntries, "go.sum") }) t.Run("respects existing main.go", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: ` package main type HasMainGo struct {} func (m *HasMainGo) Hello() string { return "Hello, world!" } `, }). With(daggerExec("mod", "init", "--name=hasMainGo", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{hasMainGo{hello}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"hasMainGo":{"hello":"Hello, world!"}}`, out) }) t.Run("respects existing main.go even if it uses types not generated yet", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: ` package main type HasDaggerTypes struct {} func (m *HasDaggerTypes) Hello() *Container { return dag.Container(). From("` + alpineImage + `"). WithExec([]string{"echo", "Hello, world!"}) } `, }). With(daggerExec("mod", "init", "--name=hasDaggerTypes", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{hasDaggerTypes{hello{stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"hasDaggerTypes":{"hello":{"stdout":"Hello, world!\n"}}}`, out) }) t.Run("respects existing package without creating main.go", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/notmain.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type HasNotMainGo struct {} func (m *HasNotMainGo) Hello() string { return "Hello, world!" } `, }). With(daggerExec("mod", "init", "--name=hasNotMainGo", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{hasNotMainGo{hello}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"hasNotMainGo":{"hello":"Hello, world!"}}`, out) }) } func TestModuleInitLICENSE(t *testing.T) { t.Run("bootstraps Apache-2.0 LICENSE file if none found", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=licensed-to-ill", "--sdk=go")) content, err := modGen.File("LICENSE").Contents(ctx) require.NoError(t, err) require.Contains(t, content, "Apache License, Version 2.0") }) t.Run("creates LICENSE file in the directory specified by -m", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "-m", "./mymod", "--name=licensed-to-ill", "--sdk=go")) content, err := modGen.File("mymod/LICENSE").Contents(ctx) require.NoError(t, err) require.Contains(t, content, "Apache License, Version 2.0") }) t.Run("does not bootstrap LICENSE file if it exists in the parent dir", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/LICENSE", dagger.ContainerWithNewFileOpts{ Contents: "doesnt matter", }). WithWorkdir("/work/sub"). With(daggerExec("mod", "init", "--name=licensed-to-ill", "--sdk=go")) _, err := modGen.File("LICENSE").Contents(ctx) require.Error(t, err) }) t.Run("bootstraps a LICENSE file when requested, even if it exists in the parent dir", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/LICENSE", dagger.ContainerWithNewFileOpts{ Contents: "doesnt matter", }). WithWorkdir("/work/sub"). With(daggerExec("mod", "init", "--name=licensed-to-ill", "--sdk=go", "--license=MIT")) content, err := modGen.File("LICENSE").Contents(ctx) require.NoError(t, err) require.Contains(t, content, "MIT License") }) } func TestModuleGit(t *testing.T) { t.Parallel() type testCase struct { sdk string gitignores []string } for _, tc := range []testCase{ { sdk: "go", gitignores: []string{ "/dagger.gen.go\n", "/querybuilder/\n", }, }, { sdk: "python", gitignores: []string{ "/sdk\n", }, }, } { tc := tc t.Run(fmt.Sprintf("module %s git", tc.sdk), func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := goGitBase(t, c). With(daggerExec("mod", "init", "--name=bare", "--sdk="+tc.sdk)) if tc.sdk == "go" { logGen(ctx, t, modGen.Directory(".")) } out, err := modGen. With(daggerQuery(`{bare{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"bare":{"containerEcho":{"stdout":"hello\n"}}}`, out) t.Run("configures .gitignore", func(t *testing.T) { ignore, err := modGen.File(".gitignore").Contents(ctx) require.NoError(t, err) for _, gitignore := range tc.gitignores { require.Contains(t, ignore, gitignore) } }) }) } } func TestModuleGoGitRemovesIgnored(t *testing.T) { t.Parallel() c, ctx := connect(t) committedModGen := goGitBase(t, c). With(daggerExec("mod", "init", "--name=bare", "--sdk=go")). WithExec([]string{"rm", ".gitignore"}). // simulate old path scheme to show we ignore it too to help transition WithExec([]string{"mkdir", "./internal"}). WithExec([]string{"cp", "-a", "./querybuilder", "./internal/querybuilder"}). WithExec([]string{"git", "add", "."}). WithExec([]string{"git", "commit", "-m", "init with generated files"}) changedAfterSync, err := committedModGen. With(daggerExec("mod", "sync")). WithExec([]string{"git", "diff"}). // for debugging WithExec([]string{"git", "status", "--short"}). Stdout(ctx) require.NoError(t, err) t.Logf("changed after sync:\n%s", changedAfterSync) require.Contains(t, changedAfterSync, "D dagger.gen.go\n") require.Contains(t, changedAfterSync, "D querybuilder/marshal.go\n") require.Contains(t, changedAfterSync, "D querybuilder/querybuilder.go\n") require.Contains(t, changedAfterSync, "D internal/querybuilder/marshal.go\n") require.Contains(t, changedAfterSync, "D internal/querybuilder/querybuilder.go\n") } func TestModulePythonGitRemovesIgnored(t *testing.T) { t.Parallel() c, ctx := connect(t) committedModGen := goGitBase(t, c). With(daggerExec("mod", "init", "--name=bare", "--sdk=python")). WithExec([]string{"rm", ".gitignore"}). WithExec([]string{"git", "add", "."}). WithExec([]string{"git", "commit", "-m", "init with generated files"}) changedAfterSync, err := committedModGen. With(daggerExec("mod", "sync")). WithExec([]string{"git", "diff"}). // for debugging WithExec([]string{"git", "status", "--short"}). Stdout(ctx) require.NoError(t, err) t.Logf("changed after sync:\n%s", changedAfterSync) require.Contains(t, changedAfterSync, "D sdk/pyproject.toml\n") require.Contains(t, changedAfterSync, "D sdk/src/dagger/__init__.py\n") } //go:embed testdata/modules/go/minimal/main.go var goSignatures string func TestModuleGoSignatures(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: goSignatures, }) logGen(ctx, t, modGen.Directory(".")) t.Run("func Hello() string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{hello}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"hello":"hello"}}`, out) }) t.Run("func Echo(string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echo(msg: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echo":"hello...hello...hello..."}}`, out) }) t.Run("func EchoPointer(*string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoPointer(msg: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoPointer":"hello...hello...hello..."}}`, out) }) t.Run("func EchoPointerPointer(**string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoPointerPointer(msg: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoPointerPointer":"hello...hello...hello..."}}`, out) }) t.Run("func EchoOptional(string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOptional(msg: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptional":"hello...hello...hello..."}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOptional}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptional":"default...default...default..."}}`, out) }) t.Run("func EchoOptionalPointer(string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOptionalPointer(msg: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptionalPointer":"hello...hello...hello..."}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOptionalPointer}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptionalPointer":"default...default...default..."}}`, out) }) t.Run("func EchoOptionalSlice([]string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOptionalSlice(msg: ["hello", "there"])}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptionalSlice":"hello+there...hello+there...hello+there..."}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOptionalSlice}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptionalSlice":"foobar...foobar...foobar..."}}`, out) }) t.Run("func Echoes([]string) []string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoes(msgs: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoes":["hello...hello...hello..."]}}`, out) }) t.Run("func EchoesVariadic(...string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoesVariadic(msgs: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoesVariadic":"hello...hello...hello..."}}`, out) }) t.Run("func HelloContext(context.Context) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{helloContext}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"helloContext":"hello context"}}`, out) }) t.Run("func EchoContext(context.Context, string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoContext(msg: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoContext":"ctx.hello...ctx.hello...ctx.hello..."}}`, out) }) t.Run("func HelloStringError() (string, error)", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{helloStringError}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"helloStringError":"hello i worked"}}`, out) }) t.Run("func HelloVoid()", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{helloVoid}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"helloVoid":null}}`, out) }) t.Run("func HelloVoidError() error", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{helloVoidError}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"helloVoidError":null}}`, out) }) t.Run("func EchoOpts(string, string, int) error", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOpts(msg: "hi")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOpts":"hi"}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOpts(msg: "hi", suffix: "!", times: 2)}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOpts":"hi!hi!"}}`, out) }) t.Run("func EchoOptsInline(struct{string, string, int}) error", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOptsInline(msg: "hi")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInline":"hi"}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOptsInline(msg: "hi", suffix: "!", times: 2)}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInline":"hi!hi!"}}`, out) }) t.Run("func EchoOptsInlinePointer(*struct{string, string, int}) error", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOptsInlinePointer(msg: "hi")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInlinePointer":"hi"}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOptsInlinePointer(msg: "hi", suffix: "!", times: 2)}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInlinePointer":"hi!hi!"}}`, out) }) t.Run("func EchoOptsInlineCtx(ctx, struct{string, string, int}) error", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOptsInlineCtx(msg: "hi")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInlineCtx":"hi"}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOptsInlineCtx(msg: "hi", suffix: "!", times: 2)}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInlineCtx":"hi!hi!"}}`, out) }) t.Run("func EchoOptsInlineTags(struct{string, string, int}) error", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOptsInlineTags(msg: "hi")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInlineTags":"hi"}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOptsInlineTags(msg: "hi", suffix: "!", times: 2)}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInlineTags":"hi!hi!"}}`, out) }) t.Run("func EchoOptsPragmas(string, string, int) error", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOptsPragmas(msg: "hi")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsPragmas":"hi...hi...hi..."}}`, out) }) } func TestModuleGoSignaturesBuiltinTypes(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main import "context" type Minimal struct {} func (m *Minimal) Read(ctx context.Context, dir Directory) (string, error) { return dir.File("foo").Contents(ctx) } func (m *Minimal) ReadPointer(ctx context.Context, dir *Directory) (string, error) { return dir.File("foo").Contents(ctx) } func (m *Minimal) ReadSlice(ctx context.Context, dir []Directory) (string, error) { return dir[0].File("foo").Contents(ctx) } func (m *Minimal) ReadVariadic(ctx context.Context, dir ...Directory) (string, error) { return dir[0].File("foo").Contents(ctx) } func (m *Minimal) ReadOptional(ctx context.Context, dir Optional[Directory]) (string, error) { d, ok := dir.Get() if ok { return d.File("foo").Contents(ctx) } return "", nil } `, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerQuery(`{directory{withNewFile(path: "foo", contents: "bar"){id}}}`)).Stdout(ctx) require.NoError(t, err) dirID := gjson.Get(out, "directory.withNewFile.id").String() t.Run("func Read(ctx, Directory) (string, error)", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(fmt.Sprintf(`{minimal{read(dir: "%s")}}`, dirID))).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"read":"bar"}}`, out) }) t.Run("func ReadPointer(ctx, *Directory) (string, error)", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(fmt.Sprintf(`{minimal{readPointer(dir: "%s")}}`, dirID))).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"readPointer":"bar"}}`, out) }) t.Run("func ReadSlice(ctx, []Directory) (string, error)", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(fmt.Sprintf(`{minimal{readSlice(dir: ["%s"])}}`, dirID))).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"readSlice":"bar"}}`, out) }) t.Run("func ReadVariadic(ctx, ...Directory) (string, error)", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(fmt.Sprintf(`{minimal{readVariadic(dir: ["%s"])}}`, dirID))).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"readVariadic":"bar"}}`, out) }) t.Run("func ReadOptional(ctx, Optional[Directory]) (string, error)", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(fmt.Sprintf(`{minimal{readOptional(dir: "%s")}}`, dirID))).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"readOptional":"bar"}}`, out) out, err = modGen.With(daggerQuery(`{minimal{readOptional}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"readOptional":""}}`, out) }) } func TestModuleGoSignaturesUnexported(t *testing.T) { t.Parallel() var logs safeBuffer c, ctx := connect(t, dagger.WithLogOutput(&logs)) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Minimal struct {} type Foo struct {} type bar struct {} func (m *Minimal) Hello(name string) string { return name } func (f *Foo) Hello(name string) string { return name } func (b *bar) Hello(name string) string { return name } `, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(inspectModule).Stdout(ctx) require.NoError(t, err) objs := gjson.Get(out, "host.directory.asModule.objects") require.Equal(t, 2, len(objs.Array())) minimal := objs.Get(`0.asObject`) require.Equal(t, "Minimal", minimal.Get("name").String()) foo := objs.Get(`1.asObject`) require.Equal(t, "MinimalFoo", foo.Get("name").String()) modGen = c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Minimal struct {} type Foo struct { Bar bar } type bar struct {} func (m *Minimal) Hello(name string) string { return name } func (f *Foo) Hello(name string) string { return name } func (b *bar) Hello(name string) string { return name } `, }) logGen(ctx, t, modGen.Directory(".")) _, err = modGen.With(inspectModule).Stderr(ctx) require.Error(t, err) require.NoError(t, c.Close()) require.Contains(t, logs.String(), "cannot code-generate unexported type bar") } func TestModuleGoSignaturesMixMatch(t *testing.T) { t.Parallel() var logs safeBuffer c, ctx := connect(t, dagger.WithLogOutput(&logs)) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Minimal struct {} func (m *Minimal) Hello(name string, opts struct{}, opts2 struct{}) string { return name } `, }) logGen(ctx, t, modGen.Directory(".")) _, err := modGen.With(daggerQuery(`{minimal{hello}}`)).Stdout(ctx) require.Error(t, err) require.NoError(t, c.Close()) require.Contains(t, logs.String(), "nested structs are not supported") } var inspectModule = daggerQuery(` query { host { directory(path: ".") { asModule { objects { asObject { name description functions { name description args { name description defaultValue } } fields { name description } } } } } } } `) func TestModuleGoDocs(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: goSignatures, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(inspectModule).Stdout(ctx) require.NoError(t, err) obj := gjson.Get(out, "host.directory.asModule.objects.0.asObject") require.Equal(t, "Minimal", obj.Get("name").String()) hello := obj.Get(`functions.#(name="hello")`) require.Equal(t, "hello", hello.Get("name").String()) require.Empty(t, hello.Get("description").String()) require.Empty(t, hello.Get("args").Array()) // test the args-based form echoOpts := obj.Get(`functions.#(name="echoOpts")`) require.Equal(t, "echoOpts", echoOpts.Get("name").String()) require.Equal(t, "EchoOpts does some opts things", echoOpts.Get("description").String()) require.Len(t, echoOpts.Get("args").Array(), 3) require.Equal(t, "msg", echoOpts.Get("args.0.name").String()) require.Equal(t, "the message to echo", echoOpts.Get("args.0.description").String()) require.Equal(t, "suffix", echoOpts.Get("args.1.name").String()) require.Equal(t, "String to append to the echoed message", echoOpts.Get("args.1.description").String()) require.Equal(t, "times", echoOpts.Get("args.2.name").String()) require.Equal(t, "Number of times to repeat the message", echoOpts.Get("args.2.description").String()) // test the inline struct form echoOpts = obj.Get(`functions.#(name="echoOptsInline")`) require.Equal(t, "echoOptsInline", echoOpts.Get("name").String()) require.Equal(t, "EchoOptsInline does some opts things", echoOpts.Get("description").String()) require.Len(t, echoOpts.Get("args").Array(), 3) require.Equal(t, "msg", echoOpts.Get("args.0.name").String()) require.Equal(t, "the message to echo", echoOpts.Get("args.0.description").String()) require.Equal(t, "suffix", echoOpts.Get("args.1.name").String()) require.Equal(t, "String to append to the echoed message", echoOpts.Get("args.1.description").String()) require.Equal(t, "times", echoOpts.Get("args.2.name").String()) require.Equal(t, "Number of times to repeat the message", echoOpts.Get("args.2.description").String()) // test the arg-based form (with pragmas) echoOpts = obj.Get(`functions.#(name="echoOptsPragmas")`) require.Equal(t, "echoOptsPragmas", echoOpts.Get("name").String()) require.Len(t, echoOpts.Get("args").Array(), 3) require.Equal(t, "msg", echoOpts.Get("args.0.name").String()) require.Equal(t, "", echoOpts.Get("args.0.defaultValue").String()) require.Equal(t, "suffix", echoOpts.Get("args.1.name").String()) require.Equal(t, "String to append to the echoed message", echoOpts.Get("args.1.description").String()) require.Equal(t, "\"...\"", echoOpts.Get("args.1.defaultValue").String()) require.Equal(t, "times", echoOpts.Get("args.2.name").String()) require.Equal(t, "3", echoOpts.Get("args.2.defaultValue").String()) require.Equal(t, "Number of times to repeat the message", echoOpts.Get("args.2.description").String()) } func TestModuleGoDocsEdgeCases(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main // Minimal is a thing type Minimal struct { // X is this X, Y string // Y is not this } // some docs func (m *Minimal) Hello(foo string, bar string, // hello baz string, qux string, x string, // lol ) string { return foo + bar } func (m *Minimal) HelloMore( // foo here foo, // bar here bar string, ) string { return foo + bar } func (m *Minimal) HelloMoreInline(opts struct{ // foo here foo, bar string }) string { return opts.foo + opts.bar } func (m *Minimal) HelloAgain( // docs for helloagain foo string, bar string, // docs for bar baz string, ) string { return foo + bar } func (m *Minimal) HelloFinal( foo string) string { // woops return foo } `, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(inspectModule).Stdout(ctx) require.NoError(t, err) obj := gjson.Get(out, "host.directory.asModule.objects.0.asObject") require.Equal(t, "Minimal", obj.Get("name").String()) require.Equal(t, "Minimal is a thing", obj.Get("description").String()) hello := obj.Get(`functions.#(name="hello")`) require.Equal(t, "hello", hello.Get("name").String()) require.Len(t, hello.Get("args").Array(), 5) require.Equal(t, "foo", hello.Get("args.0.name").String()) require.Equal(t, "", hello.Get("args.0.description").String()) require.Equal(t, "bar", hello.Get("args.1.name").String()) require.Equal(t, "", hello.Get("args.1.description").String()) require.Equal(t, "baz", hello.Get("args.2.name").String()) require.Equal(t, "hello", hello.Get("args.2.description").String()) require.Equal(t, "qux", hello.Get("args.3.name").String()) require.Equal(t, "", hello.Get("args.3.description").String()) require.Equal(t, "x", hello.Get("args.4.name").String()) require.Equal(t, "lol", hello.Get("args.4.description").String()) hello = obj.Get(`functions.#(name="helloMore")`) require.Equal(t, "helloMore", hello.Get("name").String()) require.Len(t, hello.Get("args").Array(), 2) require.Equal(t, "foo", hello.Get("args.0.name").String()) require.Equal(t, "foo here", hello.Get("args.0.description").String()) require.Equal(t, "bar", hello.Get("args.1.name").String()) require.Equal(t, "bar here", hello.Get("args.1.description").String()) hello = obj.Get(`functions.#(name="helloMoreInline")`) require.Equal(t, "helloMoreInline", hello.Get("name").String()) require.Len(t, hello.Get("args").Array(), 2) require.Equal(t, "foo", hello.Get("args.0.name").String()) require.Equal(t, "foo here", hello.Get("args.0.description").String()) require.Equal(t, "bar", hello.Get("args.1.name").String()) require.Equal(t, "", hello.Get("args.1.description").String()) hello = obj.Get(`functions.#(name="helloAgain")`) require.Equal(t, "helloAgain", hello.Get("name").String()) require.Len(t, hello.Get("args").Array(), 3) require.Equal(t, "foo", hello.Get("args.0.name").String()) require.Equal(t, "", hello.Get("args.0.description").String()) require.Equal(t, "bar", hello.Get("args.1.name").String()) require.Equal(t, "docs for bar", hello.Get("args.1.description").String()) require.Equal(t, "baz", hello.Get("args.2.name").String()) require.Equal(t, "", hello.Get("args.2.description").String()) hello = obj.Get(`functions.#(name="helloFinal")`) require.Equal(t, "helloFinal", hello.Get("name").String()) require.Len(t, hello.Get("args").Array(), 1) require.Equal(t, "foo", hello.Get("args.0.name").String()) require.Equal(t, "", hello.Get("args.0.description").String()) prop := obj.Get(`fields.#(name="x")`) require.Equal(t, "x", prop.Get("name").String()) require.Equal(t, "X is this", prop.Get("description").String()) prop = obj.Get(`fields.#(name="y")`) require.Equal(t, "y", prop.Get("name").String()) require.Equal(t, "", prop.Get("description").String()) } func TestModuleGoOptionalMustBeNil(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Minimal struct {} func (m *Minimal) Foo(x *Optional[*string]) string { if v, _ := x.Get(); v != nil { panic("uh oh") } return "" } func (m *Minimal) Bar(opts struct { x *Optional[*string] }) string { if v, _ := opts.x.Get(); v != nil { panic("uh oh") } return "" } func (m *Minimal) Baz( // +optional x *string, ) string { if x != nil { panic("uh oh") } return "" } func (m *Minimal) Qux(opts struct { // +optional x *string }) string { if opts.x != nil { panic("uh oh") } return "" } `, }) logGen(ctx, t, modGen.Directory(".")) for _, name := range []string{"foo", "bar", "baz", "qux"} { out, err := modGen.With(daggerQuery(`{minimal{%s}}`, name)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, fmt.Sprintf(`{"minimal": {"%s": ""}}`, name), out) } } //go:embed testdata/modules/go/extend/main.go var goExtend string // this is no longer allowed, but verify the SDK errors out func TestModuleGoExtendCore(t *testing.T) { t.Parallel() var logs safeBuffer c, ctx := connect(t, dagger.WithLogOutput(&logs)) _, err := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: goExtend, }). With(daggerExec("mod", "sync")). Sync(ctx) require.Error(t, err) require.NoError(t, c.Close()) require.Contains(t, logs.String(), "cannot define methods on objects from outside this module") } //go:embed testdata/modules/go/custom-types/main.go var goCustomTypes string //go:embed testdata/modules/python/custom-types/main.py var pythonCustomTypes string func TestModuleCustomTypes(t *testing.T) { t.Parallel() type testCase struct { sdk string sourcePath string sourceContent string } for _, tc := range []testCase{ { sdk: "go", sourcePath: "main.go", sourceContent: goCustomTypes, }, { sdk: "python", sourcePath: "src/main.py", sourceContent: pythonCustomTypes, }, } { t.Run(fmt.Sprintf("custom %s types", tc.sdk), func(t *testing.T) { c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk="+tc.sdk)). WithNewFile(tc.sourcePath, dagger.ContainerWithNewFileOpts{ Contents: tc.sourceContent, }) if tc.sdk == "go" { logGen(ctx, t, modGen.Directory(".")) } out, err := modGen.With(daggerQuery(`{test{repeater(msg:"echo!", times: 3){render}}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"test":{"repeater":{"render":"echo!echo!echo!"}}}`, out) }) } } func TestModuleGoReturnTypeDetection(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=foo", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Foo struct {} type X struct { Message string ` + "`json:\"message\"`" + ` } func (m *Foo) MyFunction() X { return X{Message: "foo"} } `, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerQuery(`{foo{myFunction{message}}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"foo":{"myFunction":{"message":"foo"}}}`, out) } func TestModuleGoReturnStruct(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=foo", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Foo struct {} type X struct { Message string ` + "`json:\"message\"`" + ` When string ` + "`json:\"Timestamp\"`" + ` To string ` + "`json:\"recipient\"`" + ` From string } func (m *Foo) MyFunction() X { return X{Message: "foo", When: "now", To: "user", From: "admin"} } `, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerQuery(`{foo{myFunction{message, recipient, from, timestamp}}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"foo":{"myFunction":{"message":"foo", "recipient":"user", "from":"admin", "timestamp":"now"}}}`, out) } func TestModuleGoReturnNestedStruct(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=playground", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Playground struct{} type Foo struct { MsgContainer Bar } type Bar struct { Msg string } func (m *Playground) MyFunction() Foo { return Foo{MsgContainer: Bar{Msg: "hello world"}} } `, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerQuery(`{playground{myFunction{msgContainer{msg}}}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"playground":{"myFunction":{"msgContainer":{"msg": "hello world"}}}}`, out) } func TestModuleGoReturnCompositeCore(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=playground", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Playground struct{} func (m *Playground) MySlice() []*Container { return []*Container{dag.Container().From("alpine:latest").WithExec([]string{"echo", "hello world"})} } type Foo struct { Con *Container // verify fields can remain nil w/out error too UnsetFile *File } func (m *Playground) MyStruct() *Foo { return &Foo{Con: dag.Container().From("alpine:latest").WithExec([]string{"echo", "hello world"})} } `, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerQuery(`{playground{mySlice{stdout}}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"playground":{"mySlice":[{"stdout":"hello world\n"}]}}`, out) out, err = modGen.With(daggerQuery(`{playground{myStruct{con{stdout}}}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"playground":{"myStruct":{"con":{"stdout":"hello world\n"}}}}`, out) } func TestModuleGoReturnComplexThing(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=playground", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Playground struct{} type ScanResult struct { Containers []*Container ` + "`json:\"targets\"`" + ` Report ScanReport } type ScanReport struct { Contents string ` + "`json:\"contents\"`" + ` Authors []string ` + "`json:\"Authors\"`" + ` } func (m *Playground) Scan() ScanResult { return ScanResult{ Containers: []*Container{ dag.Container().From("alpine:latest").WithExec([]string{"echo", "hello world"}), }, Report: ScanReport{ Contents: "hello world", Authors: []string{"foo", "bar"}, }, } } `, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerQuery(`{playground{scan{targets{stdout},report{contents,authors}}}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"playground":{"scan":{"targets":[{"stdout":"hello world\n"}],"report":{"contents":"hello world","authors":["foo","bar"]}}}}`, out) } func TestModuleGoGlobalVarDAG(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=foo", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main import "context" type Foo struct {} var someDefault = dag.Container().From("alpine:latest") func (m *Foo) Fn(ctx context.Context) (string, error) { return someDefault.WithExec([]string{"echo", "foo"}).Stdout(ctx) } `, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerQuery(`{foo{fn}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"foo":{"fn":"foo\n"}}`, out) } func TestModuleIDableType(t *testing.T) { t.Parallel() c, ctx := connect(t) type testCase struct { sdk string source string } for _, tc := range []testCase{ { sdk: "go", source: `package main type Foo struct { Data string } func (m *Foo) Set(data string) *Foo { m.Data = data return m } func (m *Foo) Get() string { return m.Data } `, }, { sdk: "python", source: `from typing import Self from dagger import field, function, object_type @object_type class Foo: data: str = "" @function def set(self, data: str) -> Self: self.data = data return self @function def get(self) -> str: return self.data `, }, } { tc := tc t.Run(tc.sdk, func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=foo", "--sdk="+tc.sdk)). With(sdkSource(tc.sdk, tc.source)) if tc.sdk == "go" { logGen(ctx, t, modGen.Directory(".")) } // sanity check out, err := modGen.With(daggerQuery(`{foo{set(data: "abc"){get}}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"foo":{"set":{"get": "abc"}}}`, out) out, err = modGen.With(daggerQuery(`{foo{set(data: "abc"){id}}}`)).Stdout(ctx) require.NoError(t, err) id := gjson.Get(out, "foo.set.id").String() require.Contains(t, id, "moddata:") out, err = modGen.With(daggerQuery(`{loadFooFromID(id: "%s"){get}}`, id)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"loadFooFromID":{"get": "abc"}}`, out) }) } } func TestModuleArgOwnType(t *testing.T) { // Verify use of a module's own object as an argument type. // The server needs to specifically decode the input type from an ID into // the raw JSON, since the module doesn't understand it's own types as IDs t.Parallel() c, ctx := connect(t) type testCase struct { sdk string source string } for _, tc := range []testCase{ { sdk: "go", source: `package main import "strings" type Foo struct{} type Message struct { Content string } func (m *Foo) SayHello(name string) Message { return Message{Content: "hello " + name} } func (m *Foo) Upper(msg Message) Message { msg.Content = strings.ToUpper(msg.Content) return msg } func (m *Foo) Uppers(msg []Message) []Message { for i := range msg { msg[i].Content = strings.ToUpper(msg[i].Content) } return msg }`, }, { sdk: "python", source: `from dagger import field, function, object_type @object_type class Message: content: str = field() @object_type class Foo: @function def say_hello(self, name: str) -> Message: return Message(content=f"hello {name}") @function def upper(self, msg: Message) -> Message: msg.content = msg.content.upper() return msg @function def uppers(self, msg: list[Message]) -> list[Message]: for m in msg: m.content = m.content.upper() return msg `, }, } { tc := tc t.Run(tc.sdk, func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=foo", "--sdk="+tc.sdk)). With(sdkSource(tc.sdk, tc.source)) if tc.sdk == "go" { logGen(ctx, t, modGen.Directory(".")) } out, err := modGen.With(daggerQuery(`{foo{sayHello(name: "world"){id}}}`)).Stdout(ctx) require.NoError(t, err) id := gjson.Get(out, "foo.sayHello.id").String() require.Contains(t, id, "moddata:") out, err = modGen.With(daggerQuery(`{foo{upper(msg:"%s"){content}}}`, id)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"foo":{"upper":{"content": "HELLO WORLD"}}}`, out) out, err = modGen.With(daggerQuery(`{foo{uppers(msg:["%s", "%s"]){content}}}`, id, id)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"foo":{"uppers":[{"content": "HELLO WORLD"}, {"content": "HELLO WORLD"}]}}`, out) }) } } func TestModuleConflictingSameNameDeps(t *testing.T) { // A -> B -> Dint // A -> C -> Dstr // where Dint and Dstr are modules with the same name and same object names but conflicting types t.Parallel() c, ctx := connect(t) ctr := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/dstr"). With(daggerExec("mod", "init", "--name=d", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type D struct{} type Obj struct { Foo string } func (m *D) Fn(foo string) Obj { return Obj{Foo: foo} } `, }) ctr = ctr. WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/dint"). With(daggerExec("mod", "init", "--name=d", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type D struct{} type Obj struct { Foo int } func (m *D) Fn(foo int) Obj { return Obj{Foo: foo} } `, }) ctr = ctr. WithWorkdir("/work/c"). With(daggerExec("mod", "init", "--name=c", "--sdk=go", "--root=..")). With(daggerExec("mod", "install", "../dstr")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main import ( "context" ) type C struct{} func (m *C) Fn(ctx context.Context, foo string) (string, error) { return dag.D().Fn(foo).Foo(ctx) } `, }) ctr = ctr. WithWorkdir("/work/b"). With(daggerExec("mod", "init", "--name=b", "--sdk=go", "--root=..")). With(daggerExec("mod", "install", "../dint")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main import ( "context" ) type B struct{} func (m *B) Fn(ctx context.Context, foo int) (int, error) { return dag.D().Fn(foo).Foo(ctx) } `, }) ctr = ctr. WithWorkdir("/work/a"). With(daggerExec("mod", "init", "--name=a", "--sdk=go", "--root=..")). With(daggerExec("mod", "install", "../b")). With(daggerExec("mod", "install", "../c")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main import ( "context" "strconv" ) type A struct{} func (m *A) Fn(ctx context.Context) (string, error) { fooStr, err := dag.C().Fn(ctx, "foo") if err != nil { return "", err } fooInt, err := dag.B().Fn(ctx, 123) if err != nil { return "", err } return fooStr + strconv.Itoa(fooInt), nil } `, }) out, err := ctr.With(daggerQuery(`{a{fn}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"a":{"fn": "foo123"}}`, out) // verify that no types from (transitive) deps show up types := currentSchema(ctx, t, ctr).Types require.NotNil(t, types.Get("A")) require.Nil(t, types.Get("B")) require.Nil(t, types.Get("C")) require.Nil(t, types.Get("D")) } func TestModuleSelfAPICall(t *testing.T) { t.Parallel() c, ctx := connect(t) out, err := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main import ( "context" "github.com/Khan/genqlient/graphql" ) type Test struct{} func (m *Test) FnA(ctx context.Context) (string, error) { resp := &graphql.Response{} err := dag.c.MakeRequest(ctx, &graphql.Request{ Query: "{test{fnB}}", }, resp) if err != nil { return "", err } return resp.Data.(map[string]any)["test"].(map[string]any)["fnB"].(string), nil } func (m *Test) FnB() string { return "hi from b" } `, }). With(daggerQuery(`{test{fnA}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"test":{"fnA": "hi from b"}}`, out) } func TestModuleWithOtherModuleTypes(t *testing.T) { t.Parallel() c, ctx := connect(t) ctr := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/dep"). With(daggerExec("mod", "init", "--name=dep", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Dep struct{} type Obj struct { Foo string } func (m *Dep) Fn() Obj { return Obj{Foo: "foo"} } `, }). WithWorkdir("/work/test"). With(daggerExec("mod", "init", "--name=test", "--sdk=go", "--root=..")). With(daggerExec("mod", "install", "../dep")) t.Run("return as other module object", func(t *testing.T) { t.Parallel() t.Run("direct", func(t *testing.T) { t.Parallel() _, err := ctr. WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Test struct{} func (m *Test) Fn() (*DepObj, error) { return nil, nil } `, }). With(daggerFunctions()). Stdout(ctx) require.Error(t, err) require.ErrorContains(t, err, fmt.Sprintf( "object %q function %q cannot return external type from dependency module %q", "Test", "Fn", "dep", )) }) t.Run("list", func(t *testing.T) { t.Parallel() _, err := ctr. WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Test struct{} func (m *Test) Fn() ([]*DepObj, error) { return nil, nil } `, }). With(daggerFunctions()). Stdout(ctx) require.Error(t, err) require.ErrorContains(t, err, fmt.Sprintf( "object %q function %q cannot return external type from dependency module %q", "Test", "Fn", "dep", )) }) }) t.Run("arg as other module object", func(t *testing.T) { t.Parallel() t.Run("direct", func(t *testing.T) { t.Parallel() _, err := ctr.WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Test struct{} func (m *Test) Fn(obj *DepObj) error { return nil } `, }). With(daggerFunctions()). Stdout(ctx) require.Error(t, err) require.ErrorContains(t, err, fmt.Sprintf( "object %q function %q arg %q cannot reference external type from dependency module %q", "Test", "Fn", "obj", "dep", )) }) t.Run("list", func(t *testing.T) { t.Parallel() _, err := ctr.WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Test struct{} func (m *Test) Fn(obj []*DepObj) error { return nil } `, }). With(daggerFunctions()). Stdout(ctx) require.Error(t, err) require.ErrorContains(t, err, fmt.Sprintf( "object %q function %q arg %q cannot reference external type from dependency module %q", "Test", "Fn", "obj", "dep", )) }) }) t.Run("field as other module object", func(t *testing.T) { t.Parallel() t.Run("direct", func(t *testing.T) { t.Parallel() _, err := ctr. WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Test struct{} type Obj struct { Foo *DepObj } func (m *Test) Fn() (*Obj, error) { return nil, nil } `, }). With(daggerFunctions()). Stdout(ctx) require.Error(t, err) require.ErrorContains(t, err, fmt.Sprintf( "object %q field %q cannot reference external type from dependency module %q", "Obj", "Foo", "dep", )) }) t.Run("list", func(t *testing.T) { t.Parallel() _, err := ctr. WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Test struct{} type Obj struct { Foo []*DepObj } func (m *Test) Fn() (*Obj, error) { return nil, nil } `, }). With(daggerFunctions()). Stdout(ctx) require.Error(t, err) require.ErrorContains(t, err, fmt.Sprintf( "object %q field %q cannot reference external type from dependency module %q", "Obj", "Foo", "dep", )) }) }) } //go:embed testdata/modules/go/use/dep/main.go var useInner string //go:embed testdata/modules/go/use/main.go var useOuter string func TestModuleUseLocal(t *testing.T) { t.Parallel() c, ctx := connect(t) t.Run("go uses go", func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/dep"). With(daggerExec("mod", "init", "--name=dep", "--sdk=go")). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=use", "--sdk=go")). WithNewFile("/work/dep/main.go", dagger.ContainerWithNewFileOpts{ Contents: useInner, }). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: useOuter, }). With(daggerExec("mod", "install", "./dep")). WithEnvVariable("BUST", identity.NewID()) // NB(vito): hmm... logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerQuery(`{use{useHello}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"use":{"useHello":"hello"}}`, out) // cannot use transitive dependency directly _, err = modGen.With(daggerQuery(`{dep{hello}}`)).Stdout(ctx) require.Error(t, err) require.ErrorContains(t, err, `Cannot query field "dep" on type "Query".`) }) t.Run("python uses go", func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/dep"). With(daggerExec("mod", "init", "--name=dep", "--sdk=go")). WithNewFile("/work/dep/main.go", dagger.ContainerWithNewFileOpts{ Contents: useInner, }). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=use", "--sdk=python")). With(daggerExec("mod", "install", "./dep")). WithNewFile("/work/src/main.py", dagger.ContainerWithNewFileOpts{ Contents: `from dagger import dag, function @function def use_hello() -> str: return dag.dep().hello() `, }) out, err := modGen.With(daggerQuery(`{use{useHello}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"use":{"useHello":"hello"}}`, out) // cannot use transitive dependency directly _, err = modGen.With(daggerQuery(`{dep{hello}}`)).Stdout(ctx) require.Error(t, err) require.ErrorContains(t, err, `Cannot query field "dep" on type "Query".`) }) } func TestModuleCodegenonDepChange(t *testing.T) { t.Parallel() c, ctx := connect(t) t.Run("go uses go", func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/dep"). With(daggerExec("mod", "init", "--name=dep", "--sdk=go")). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=use", "--sdk=go")). WithNewFile("/work/dep/main.go", dagger.ContainerWithNewFileOpts{ Contents: useInner, }). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: useOuter, }). With(daggerExec("mod", "install", "./dep")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerQuery(`{use{useHello}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"use":{"useHello":"hello"}}`, out) // make back-incompatible change to dep newInner := strings.ReplaceAll(useInner, `Hello()`, `Hellov2()`) modGen = modGen. WithNewFile("/work/dep/main.go", dagger.ContainerWithNewFileOpts{ Contents: newInner, }). WithExec([]string{"sh", "-c", "dagger mod sync"}, dagger.ContainerWithExecOpts{ ExperimentalPrivilegedNesting: true, }) codegenContents, err := modGen.File("/work/dagger.gen.go").Contents(ctx) require.NoError(t, err) require.Contains(t, codegenContents, "Hellov2") newOuter := strings.ReplaceAll(useOuter, `Hello(ctx)`, `Hellov2(ctx)`) modGen = modGen. WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: newOuter, }) out, err = modGen.With(daggerQuery(`{use{useHello}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"use":{"useHello":"hello"}}`, out) }) t.Run("python uses go", func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/dep"). With(daggerExec("mod", "init", "--name=dep", "--sdk=go")). WithNewFile("/work/dep/main.go", dagger.ContainerWithNewFileOpts{ Contents: useInner, }). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=use", "--sdk=python")). With(daggerExec("mod", "install", "./dep")). WithNewFile("/work/src/main.py", dagger.ContainerWithNewFileOpts{ Contents: `from dagger import dag, function @function def use_hello() -> str: return dag.dep().hello() `, }) out, err := modGen.With(daggerQuery(`{use{useHello}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"use":{"useHello":"hello"}}`, out) // make back-incompatible change to dep newInner := strings.ReplaceAll(useInner, `Hello()`, `Hellov2()`) modGen = modGen. WithNewFile("/work/dep/main.go", dagger.ContainerWithNewFileOpts{ Contents: newInner, }). WithExec([]string{"sh", "-c", "dagger mod sync"}, dagger.ContainerWithExecOpts{ ExperimentalPrivilegedNesting: true, }) codegenContents, err := modGen.File("/work/sdk/src/dagger/client/gen.py").Contents(ctx) require.NoError(t, err) require.Contains(t, codegenContents, "hellov2") modGen = modGen. WithNewFile("/work/src/main.py", dagger.ContainerWithNewFileOpts{ Contents: `from dagger import dag, function @function def use_hello() -> str: return dag.dep().hellov2() `, }) out, err = modGen.With(daggerQuery(`{use{useHello}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"use":{"useHello":"hello"}}`, out) }) } func TestModuleGoUseLocalMulti(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/foo"). WithNewFile("/work/foo/main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Foo struct {} func (m *Foo) Name() string { return "foo" } `, }). With(daggerExec("mod", "init", "--name=foo", "--sdk=go")). WithWorkdir("/work/bar"). WithNewFile("/work/bar/main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Bar struct {} func (m *Bar) Name() string { return "bar" } `, }). With(daggerExec("mod", "init", "--name=bar", "--sdk=go")). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=use", "--sdk=go")). With(daggerExec("mod", "install", "./foo")). With(daggerExec("mod", "install", "./bar")). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main import "context" import "fmt" type Use struct {} func (m *Use) Names(ctx context.Context) ([]string, error) { fooName, err := dag.Foo().Name(ctx) if err != nil { return nil, fmt.Errorf("foo.name: %w", err) } barName, err := dag.Bar().Name(ctx) if err != nil { return nil, fmt.Errorf("bar.name: %w", err) } return []string{fooName, barName}, nil } `, }). WithEnvVariable("BUST", identity.NewID()) // NB(vito): hmm... logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerQuery(`{use{names}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"use":{"names":["foo", "bar"]}}`, out) } func TestModuleConstructor(t *testing.T) { t.Parallel() c, ctx := connect(t) type testCase struct { sdk string source string } t.Run("basic", func(t *testing.T) { t.Parallel() for _, tc := range []testCase{ { sdk: "go", source: `package main import ( "context" ) func New( ctx context.Context, foo string, bar Optional[int], baz []string, dir *Directory, ) *Test { return &Test{ Foo: foo, Bar: bar.GetOr(42), Baz: baz, Dir: dir, } } type Test struct { Foo string Bar int Baz []string Dir *Directory NeverSetDir *Directory } func (m *Test) GimmeFoo() string { return m.Foo } func (m *Test) GimmeBar() int { return m.Bar } func (m *Test) GimmeBaz() []string { return m.Baz } func (m *Test) GimmeDirEnts(ctx context.Context) ([]string, error) { return m.Dir.Entries(ctx) } `, }, { sdk: "python", source: `import dagger from dagger import field, function, object_type @object_type class Test: foo: str = field() dir: dagger.Directory = field() bar: int = field(default=42) baz: list[str] = field(default=list) never_set_dir: dagger.Directory | None = field(default=None) @function def gimme_foo(self) -> str: return self.foo @function def gimme_bar(self) -> int: return self.bar @function def gimme_baz(self) -> list[str]: return self.baz @function async def gimme_dir_ents(self) -> list[str]: return await self.dir.entries() `, }, } { tc := tc t.Run(tc.sdk, func(t *testing.T) { t.Parallel() ctr := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/test"). With(daggerExec("mod", "init", "--name=test", "--sdk="+tc.sdk)). With(sdkSource(tc.sdk, tc.source)) out, err := ctr.With(daggerCall("--foo=abc", "--baz=x,y,z", "--dir=.", "foo")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "abc") out, err = ctr.With(daggerCall("--foo=abc", "--baz=x,y,z", "--dir=.", "gimme-foo")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "abc") out, err = ctr.With(daggerCall("--foo=abc", "--baz=x,y,z", "--dir=.", "bar")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "42") out, err = ctr.With(daggerCall("--foo=abc", "--baz=x,y,z", "--dir=.", "gimme-bar")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "42") out, err = ctr.With(daggerCall("--foo=abc", "--bar=123", "--baz=x,y,z", "--dir=.", "bar")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "123") out, err = ctr.With(daggerCall("--foo=abc", "--bar=123", "--baz=x,y,z", "--dir=.", "gimme-bar")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "123") out, err = ctr.With(daggerCall("--foo=abc", "--bar=123", "--baz=x,y,z", "--dir=.", "baz")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "x\ny\nz") out, err = ctr.With(daggerCall("--foo=abc", "--bar=123", "--baz=x,y,z", "--dir=.", "gimme-baz")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "x\ny\nz") out, err = ctr.With(daggerCall("--foo=abc", "--bar=123", "--baz=x,y,z", "--dir=.", "gimme-dir-ents")).Stdout(ctx) require.NoError(t, err) require.Contains(t, strings.TrimSpace(out), "dagger.json") }) } }) t.Run("fields only", func(t *testing.T) { t.Parallel() for _, tc := range []testCase{ { sdk: "go", source: `package main import ( "context" ) func New(ctx context.Context) (Test, error) { v, err := dag.Container().From("alpine:3.18.4").File("/etc/alpine-release").Contents(ctx) if err != nil { return Test{}, err } return Test{ AlpineVersion: v, }, nil } type Test struct { AlpineVersion string } `, }, { sdk: "python", source: `from dagger import dag, field, function, object_type @object_type class Test: alpine_version: str = field() @classmethod async def create(cls) -> "Test": return cls(alpine_version=await ( dag.container() .from_("alpine:3.18.4") .file("/etc/alpine-release") .contents() )) `, }, } { tc := tc t.Run(tc.sdk, func(t *testing.T) { t.Parallel() ctr := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/test"). With(daggerExec("mod", "init", "--name=test", "--sdk="+tc.sdk)). With(sdkSource(tc.sdk, tc.source)) out, err := ctr.With(daggerCall("alpine-version")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "3.18.4") }) } }) t.Run("return error", func(t *testing.T) { t.Parallel() for _, tc := range []testCase{ { sdk: "go", source: `package main import ( "fmt" ) func New() (*Test, error) { return nil, fmt.Errorf("too bad") } type Test struct { Foo string } `, }, { sdk: "python", source: `from dagger import object_type, field @object_type class Test: foo: str = field() def __init__(self): raise ValueError("too bad") `, }, } { tc := tc t.Run(tc.sdk, func(t *testing.T) { t.Parallel() var logs safeBuffer c, ctx := connect(t, dagger.WithLogOutput(&logs)) ctr := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/test"). With(daggerExec("mod", "init", "--name=test", "--sdk="+tc.sdk)). With(sdkSource(tc.sdk, tc.source)) _, err := ctr.With(daggerCall("foo")).Stdout(ctx) require.Error(t, err) require.Contains(t, logs.String(), "too bad") }) } }) t.Run("python: with default factory", func(t *testing.T) { t.Parallel() content := identity.NewID() ctr := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/test"). With(daggerExec("mod", "init", "--name=test", "--sdk=python")). With(sdkSource("python", fmt.Sprintf(`import dagger from dagger import dag, object_type, field @object_type class Test: foo: dagger.File = field(default=lambda: ( dag.directory() .with_new_file("foo.txt", contents="%s") .file("foo.txt") )) bar: list[str] = field(default=list) `, content), )) out, err := ctr.With(daggerCall("foo")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), content) out, err = ctr.With(daggerCall("--foo=dagger.json", "foo")).Stdout(ctx) require.NoError(t, err) require.Contains(t, out, `"sdk": "python"`) _, err = ctr.With(daggerCall("bar")).Sync(ctx) require.NoError(t, err) }) } //go:embed testdata/modules/go/wrapper/main.go var wrapper string func TestModuleGoWrapping(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=wrapper", "--sdk=go")). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: wrapper, }) logGen(ctx, t, modGen.Directory(".")) id := identity.NewID() out, err := modGen.With(daggerQuery( fmt.Sprintf(`{wrapper{container{echo(msg:%q){unwrap{stdout}}}}}`, id), )).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, fmt.Sprintf(`{"wrapper":{"container":{"echo":{"unwrap":{"stdout":%q}}}}}`, id), out) } func TestModuleConfigAPI(t *testing.T) { t.Parallel() c, ctx := connect(t) moduleDir := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/subdir"). With(daggerExec("mod", "init", "--name=test", "--sdk=go", "--root=..")). Directory("/work") cfg := c.ModuleConfig(moduleDir, dagger.ModuleConfigOpts{Subpath: "subdir"}) name, err := cfg.Name(ctx) require.NoError(t, err) require.Equal(t, "test", name) sdk, err := cfg.SDK(ctx) require.NoError(t, err) require.Equal(t, "go", sdk) root, err := cfg.Root(ctx) require.NoError(t, err) require.Equal(t, "..", root) } func TestModulePythonInit(t *testing.T) { t.Run("from scratch", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=bare", "--sdk=python")) out, err := modGen. With(daggerQuery(`{bare{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"bare":{"containerEcho":{"stdout":"hello\n"}}}`, out) }) t.Run("with different root", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/child"). With(daggerExec("mod", "init", "--name=bare", "--sdk=python", "--root=..")) out, err := modGen. With(daggerQuery(`{bare{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"bare":{"containerEcho":{"stdout":"hello\n"}}}`, out) }) t.Run("respects existing pyproject.toml", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("pyproject.toml", dagger.ContainerWithNewFileOpts{ Contents: `[project] name = "has-pyproject" version = "0.0.0" `, }). With(daggerExec("mod", "init", "--name=hasPyproject", "--sdk=python")) out, err := modGen. With(daggerQuery(`{hasPyproject{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"hasPyproject":{"containerEcho":{"stdout":"hello\n"}}}`, out) t.Run("preserves module name", func(t *testing.T) { generated, err := modGen.File("pyproject.toml").Contents(ctx) require.NoError(t, err) require.Contains(t, generated, `name = "has-pyproject"`) }) }) t.Run("respects existing main.py", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/src/main/__init__.py", dagger.ContainerWithNewFileOpts{ Contents: "from . import notmain\n", }). WithNewFile("/work/src/main/notmain.py", dagger.ContainerWithNewFileOpts{ Contents: `from dagger import function @function def hello() -> str: return "Hello, world!" `, }). With(daggerExec("mod", "init", "--name=hasMainPy", "--sdk=python")) out, err := modGen. With(daggerQuery(`{hasMainPy{hello}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"hasMainPy":{"hello":"Hello, world!"}}`, out) }) } func TestModulePythonReturnSelf(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=foo", "--sdk=python")). WithNewFile("src/main.py", dagger.ContainerWithNewFileOpts{ Contents: `from typing import Self from dagger import field, function, object_type @object_type class Foo: message: str = field(default="") @function def bar(self) -> Self: self.message = "foobar" return self `, }) out, err := modGen.With(daggerQuery(`{foo{bar{message}}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"foo":{"bar":{"message":"foobar"}}}`, out) } func TestModuleTypescriptInit(t *testing.T) { t.Skip("unstable because of a typescript error") t.Run("from scratch", func(t *testing.T) { t.Skip("unstable because of a typescript error") t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=bare", "--sdk=typescript")) out, err := modGen. With(daggerQuery(`{bare{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"bare":{"containerEcho":{"stdout":"hello\n"}}}`, out) }) t.Run("with different root", func(t *testing.T) { t.Skip("unstable because of a typescript error") t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/child"). With(daggerExec("mod", "init", "--name=bare", "--sdk=typescript", "--root=..")) out, err := modGen. With(daggerQuery(`{bare{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"bare":{"containerEcho":{"stdout":"hello\n"}}}`, out) }) } func TestModuleLotsOfFunctions(t *testing.T) { t.Parallel() const funcCount = 100 t.Run("go sdk", func(t *testing.T) { t.Parallel() c, ctx := connect(t) mainSrc := ` package main type PotatoSack struct {} ` for i := 0; i < funcCount; i++ { mainSrc += fmt.Sprintf(` func (m *PotatoSack) Potato%d() string { return "potato #%d" } `, i, i) } modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: mainSrc, }). With(daggerExec("mod", "init", "--name=potatoSack", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) var eg errgroup.Group for i := 0; i < funcCount; i++ { i := i // just verify a subset work if i%10 != 0 { continue } eg.Go(func() error { _, err := modGen. With(daggerCall(fmt.Sprintf("potato%d", i))). Sync(ctx) return err }) } require.NoError(t, eg.Wait()) }) t.Run("python sdk", func(t *testing.T) { t.Parallel() c, ctx := connect(t) mainSrc := `from dagger import function ` for i := 0; i < funcCount; i++ { mainSrc += fmt.Sprintf(` @function def potato_%d() -> str: return "potato #%d" `, i, i) } modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("./src/main.py", dagger.ContainerWithNewFileOpts{ Contents: mainSrc, }). With(daggerExec("mod", "init", "--name=potatoSack", "--sdk=python")) var eg errgroup.Group for i := 0; i < funcCount; i++ { i := i // just verify a subset work if i%10 != 0 { continue } eg.Go(func() error { _, err := modGen. With(daggerCall(fmt.Sprintf("potato%d", i))). Sync(ctx) return err }) } require.NoError(t, eg.Wait()) }) } func TestModuleLotsOfDeps(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work") modCount := 0 getModMainSrc := func(name string, depNames []string) string { t.Helper() mainSrc := fmt.Sprintf(`package main import "context" type %s struct {} func (m *%s) Fn(ctx context.Context) (string, error) { s := "%s" var depS string _ = depS var err error _ = err `, strcase.ToCamel(name), strcase.ToCamel(name), name) for _, depName := range depNames { mainSrc += fmt.Sprintf(` depS, err = dag.%s().Fn(ctx) if err != nil { return "", err } s += depS `, strcase.ToCamel(depName)) } mainSrc += "return s, nil\n}\n" fmted, err := format.Source([]byte(mainSrc)) require.NoError(t, err) return string(fmted) } // need to construct dagger.json directly in order to avoid excessive // `dagger mod use` calls while constructing the huge DAG of deps getModDaggerConfig := func(name string, depNames []string) string { t.Helper() var depVals []string for _, depName := range depNames { depVals = append(depVals, "../"+depName) } cfg := modules.Config{ Name: name, Root: "..", SDK: "go", Dependencies: depVals, } bs, err := json.Marshal(cfg) require.NoError(t, err) return string(bs) } addModulesWithDeps := func(newMods int, depNames []string) []string { t.Helper() var newModNames []string for i := 0; i < newMods; i++ { name := fmt.Sprintf("mod%d", modCount) modCount++ newModNames = append(newModNames, name) modGen = modGen. WithWorkdir("/work/"+name). WithNewFile("./main.go", dagger.ContainerWithNewFileOpts{ Contents: getModMainSrc(name, depNames), }). WithNewFile("./dagger.json", dagger.ContainerWithNewFileOpts{ Contents: getModDaggerConfig(name, depNames), }) } return newModNames } // Create a base module, then add 6 layers of deps, where each layer has one more module // than the previous layer and each module within the layer has a dep on each module // from the previous layer. Finally add a single module at the top that depends on all // modules from the last layer and call that. // Basically, this creates a quadratically growing DAG of modules and verifies we // handle it efficiently enough to be callable. curDeps := addModulesWithDeps(1, nil) for i := 0; i < 6; i++ { curDeps = addModulesWithDeps(len(curDeps)+1, curDeps) } addModulesWithDeps(1, curDeps) _, err := modGen.With(daggerCall("fn")).Stdout(ctx) require.NoError(t, err) } func TestModuleNamespacing(t *testing.T) { t.Parallel() c, ctx := connect(t) moduleSrcPath, err := filepath.Abs("./testdata/modules/go/namespacing") require.NoError(t, err) ctr := c.Container().From(alpineImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithMountedDirectory("/work", c.Host().Directory(moduleSrcPath)). WithWorkdir("/work") out, err := ctr. With(daggerQuery(`{test{fn(s:"yo")}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"test":{"fn":"1:yo 2:yo"}}`, out) } func TestModuleRoots(t *testing.T) { t.Parallel() c, ctx := connect(t) moduleSrcPath, err := filepath.Abs("./testdata/modules/go/roots") require.NoError(t, err) entries, err := os.ReadDir(moduleSrcPath) require.NoError(t, err) ctr := c.Container().From(alpineImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithMountedDirectory("/work", c.Host().Directory(moduleSrcPath)) for _, entry := range entries { entry := entry t.Run(entry.Name(), func(t *testing.T) { t.Parallel() ctr := ctr.WithWorkdir("/work/" + entry.Name()) out, err := ctr. With(daggerQuery(fmt.Sprintf(`{%s{hello}}`, strcase.ToLowerCamel(entry.Name())))). Stdout(ctx) if strings.HasPrefix(entry.Name(), "good-") { require.NoError(t, err) require.JSONEq(t, fmt.Sprintf(`{"%s":{"hello": "hello"}}`, strcase.ToLowerCamel(entry.Name())), out) } else if strings.HasPrefix(entry.Name(), "bad-") { require.Error(t, err) require.Regexp(t, "is not under( module)? root", err.Error()) } }) } } func TestModuleDaggerCall(t *testing.T) { t.Parallel() c, ctx := connect(t) t.Run("service args", func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main import ( "context" ) type Test struct {} func (m *Test) Fn(ctx context.Context, svc *Service) (string, error) { return dag.Container().From("alpine:3.18").WithExec([]string{"apk", "add", "curl"}). WithServiceBinding("daserver", svc). WithExec([]string{"curl", "http://daserver:8000"}). Stdout(ctx) } `, }) logGen(ctx, t, modGen.Directory(".")) httpServer, _ := httpService(ctx, t, c, "im up") endpoint, err := httpServer.Endpoint(ctx) require.NoError(t, err) out, err := modGen. WithServiceBinding("testserver", httpServer). With(daggerCall("fn", "--svc", "tcp://"+endpoint)).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "im up") }) t.Run("list args", func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("foo.txt", dagger.ContainerWithNewFileOpts{ Contents: "bar", }). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main import ( "context" "strings" ) type Minimal struct {} func (m *Minimal) Hello(msgs []string) string { return strings.Join(msgs, "+") } func (m *Minimal) Reads(ctx context.Context, files []File) (string, error) { var contents []string for _, f := range files { content, err := f.Contents(ctx) if err != nil { return "", err } contents = append(contents, content) } return strings.Join(contents, "+"), nil } `, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerCall("hello", "--msgs", "yo", "--msgs", "my", "--msgs", "friend")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "yo+my+friend") out, err = modGen.With(daggerCall("reads", "--files=foo.txt", "--files=foo.txt")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "bar+bar") }) t.Run("return list objects", func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Minimal struct {} type Foo struct { Bar int ` + "`" + `json:"bar"` + "`" + ` } func (m *Minimal) Fn() []*Foo { var foos []*Foo for i := 0; i < 3; i++ { foos = append(foos, &Foo{Bar: i}) } return foos } `, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerCall("fn", "bar")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "0\n1\n2") }) t.Run("directory arg inputs", func(t *testing.T) { t.Parallel() t.Run("local dir", func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk=go")). WithNewFile("/dir/subdir/foo.txt", dagger.ContainerWithNewFileOpts{ Contents: "foo", }). WithNewFile("/dir/subdir/bar.txt", dagger.ContainerWithNewFileOpts{ Contents: "bar", }). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Test struct {} func (m *Test) Fn(dir *Directory) *Directory { return dir } `, }) out, err := modGen.With(daggerCall("fn", "--dir", "/dir/subdir")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "bar.txt\nfoo.txt") out, err = modGen.With(daggerCall("fn", "--dir", "file:///dir/subdir")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "bar.txt\nfoo.txt") }) t.Run("git dir", func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Test struct {} func (m *Test) Fn(dir *Directory, subpath Optional[string]) *Directory { return dir.Directory(subpath.GetOr(".")) } `, }) for _, tc := range []struct { baseURL string subpath string }{ { baseURL: "https://github.com/dagger/dagger", }, { baseURL: "https://github.com/dagger/dagger", subpath: ".changes", }, { baseURL: "https://github.com/dagger/dagger.git", }, { baseURL: "https://github.com/dagger/dagger.git", subpath: ".changes", }, } { tc := tc t.Run(fmt.Sprintf("%s:%s", tc.baseURL, tc.subpath), func(t *testing.T) { t.Parallel() url := tc.baseURL + "#v0.9.1" if tc.subpath != "" { url += ":" + tc.subpath } args := []string{"fn", "--dir", url} if tc.subpath == "" { args = append(args, "--subpath", ".changes") } out, err := modGen.With(daggerCall(args...)).Stdout(ctx) require.NoError(t, err) require.Contains(t, out, "v0.9.1.md") require.NotContains(t, out, "v0.9.2.md") }) } }) }) } func TestModuleGoSyncDeps(t *testing.T) { // verify that changes to deps result in a sync to the depender module t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/dep"). With(daggerExec("mod", "init", "--name=dep", "--sdk=go")). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=use", "--sdk=go")). WithNewFile("/work/dep/main.go", dagger.ContainerWithNewFileOpts{ Contents: useInner, }). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: useOuter, }). With(daggerExec("mod", "install", "./dep")) logGen(ctx, t, modGen.Directory(".")) modGen = modGen.With(daggerQuery(`{use{useHello}}`)) out, err := modGen.Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"use":{"useHello":"hello"}}`, out) newInner := strings.ReplaceAll(useInner, `"hello"`, `"goodbye"`) modGen = modGen. WithNewFile("/work/dep/main.go", dagger.ContainerWithNewFileOpts{ Contents: newInner, }). With(daggerExec("mod", "sync")) logGen(ctx, t, modGen.Directory(".")) out, err = modGen.With(daggerQuery(`{use{useHello}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"use":{"useHello":"goodbye"}}`, out) } func TestModuleLoops(t *testing.T) { // verify circular module dependencies result in an error t.Parallel() c, ctx := connect(t) _, err := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/depA"). With(daggerExec("mod", "init", "--name=depA", "--sdk=go", "--root=..")). WithWorkdir("/work/depB"). With(daggerExec("mod", "init", "--name=depB", "--sdk=go", "--root=..")). With(daggerExec("mod", "install", "../depA")). WithWorkdir("/work/depC"). With(daggerExec("mod", "init", "--name=depC", "--sdk=go", "--root=..")). With(daggerExec("mod", "install", "../depB")). WithWorkdir("/work/depA"). With(daggerExec("mod", "install", "../depC")). Sync(ctx) require.ErrorContains(t, err, "module depA has a circular dependency") } //go:embed testdata/modules/go/id/arg/main.go var badIDArgGoSrc string //go:embed testdata/modules/python/id/arg/src/main.py var badIDArgPySrc string //go:embed testdata/modules/go/id/field/main.go var badIDFieldGoSrc string //go:embed testdata/modules/go/id/fn/main.go var badIDFnGoSrc string //go:embed testdata/modules/python/id/fn/src/main.py var badIDFnPySrc string func TestModuleReservedWords(t *testing.T) { // verify disallowed names are rejected t.Parallel() c, ctx := connect(t) t.Run("id", func(t *testing.T) { t.Parallel() t.Run("arg", func(t *testing.T) { t.Parallel() t.Run("go", func(t *testing.T) { t.Parallel() _, err := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk=go")). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: badIDArgGoSrc, }). With(daggerQuery(`{test{fn(id:"no")}}`)). Sync(ctx) require.ErrorContains(t, err, "cannot define argument with reserved name \"id\"") }) t.Run("python", func(t *testing.T) { t.Parallel() _, err := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk=python")). WithNewFile("/work/src/main.py", dagger.ContainerWithNewFileOpts{ Contents: badIDArgPySrc, }). With(daggerQuery(`{test{fn(id:"no")}}`)). Sync(ctx) require.ErrorContains(t, err, "cannot define argument with reserved name \"id\"") }) }) t.Run("field", func(t *testing.T) { t.Parallel() t.Run("go", func(t *testing.T) { t.Parallel() _, err := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk=go")). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: badIDFieldGoSrc, }). With(daggerQuery(`{test{fn{id}}}`)). Sync(ctx) require.ErrorContains(t, err, "cannot define field with reserved name \"id\"") }) }) t.Run("fn", func(t *testing.T) { t.Parallel() t.Run("go", func(t *testing.T) { t.Parallel() _, err := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk=go")). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: badIDFnGoSrc, }). With(daggerQuery(`{test{id}}`)). Sync(ctx) require.ErrorContains(t, err, "cannot define function with reserved name \"id\"") }) t.Run("python", func(t *testing.T) { t.Parallel() _, err := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk=python")). WithNewFile("/work/src/main.py", dagger.ContainerWithNewFileOpts{ Contents: badIDFnPySrc, }). With(daggerQuery(`{test{fn(id:"no")}}`)). Sync(ctx) require.ErrorContains(t, err, "cannot define function with reserved name \"id\"") }) }) }) } func daggerExec(args ...string) dagger.WithContainerFunc { return func(c *dagger.Container) *dagger.Container { return c.WithExec(append([]string{"dagger", "--debug"}, args...), dagger.ContainerWithExecOpts{ ExperimentalPrivilegedNesting: true, }) } } func daggerQuery(query string, args ...any) dagger.WithContainerFunc { query = fmt.Sprintf(query, args...) return func(c *dagger.Container) *dagger.Container { return c.WithExec([]string{"dagger", "--debug", "query"}, dagger.ContainerWithExecOpts{ Stdin: query, ExperimentalPrivilegedNesting: true, }) } } func daggerCall(args ...string) dagger.WithContainerFunc { return func(c *dagger.Container) *dagger.Container { return c.WithExec(append([]string{"dagger", "--debug", "call"}, args...), dagger.ContainerWithExecOpts{ ExperimentalPrivilegedNesting: true, }) } } func daggerFunctions(args ...string) dagger.WithContainerFunc { return func(c *dagger.Container) *dagger.Container { return c.WithExec(append([]string{"dagger", "--debug", "functions"}, args...), dagger.ContainerWithExecOpts{ ExperimentalPrivilegedNesting: true, }) } } func sdkSource(sdk, contents string) dagger.WithContainerFunc { return func(c *dagger.Container) *dagger.Container { var sourcePath string switch sdk { case "go": sourcePath = "main.go" case "python": sourcePath = "src/main.py" default: return c } return c.WithNewFile(sourcePath, dagger.ContainerWithNewFileOpts{ Contents: contents, }) } } func currentSchema(ctx context.Context, t *testing.T, ctr *dagger.Container) *introspection.Schema { t.Helper() out, err := ctr.With(daggerQuery(introspection.Query)).Stdout(ctx) require.NoError(t, err) var schemaResp introspection.Response err = json.Unmarshal([]byte(out), &schemaResp) require.NoError(t, err) return schemaResp.Schema } func goGitBase(t *testing.T, c *dagger.Client) *dagger.Container { t.Helper() return c.Container().From(golangImage). WithExec([]string{"apk", "add", "git"}). WithExec([]string{"git", "config", "--global", "user.email", "dagger@example.com"}). WithExec([]string{"git", "config", "--global", "user.name", "Dagger Tests"}). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithExec([]string{"git", "init"}) } func logGen(ctx context.Context, t *testing.T, modSrc *dagger.Directory) { t.Helper() generated, err := modSrc.File("dagger.gen.go").Contents(ctx) require.NoError(t, err) t.Cleanup(func() { t.Name() fileName := filepath.Join( os.TempDir(), t.Name(), fmt.Sprintf("dagger.gen.%d.go", time.Now().Unix()), ) if err := os.MkdirAll(filepath.Dir(fileName), 0o755); err != nil { t.Logf("failed to create temp dir for generated code: %v", err) return } if err := os.WriteFile(fileName, []byte(generated), 0644); err != nil { t.Logf("failed to write generated code to %s: %v", fileName, err) } else { t.Logf("wrote generated code to %s", fileName) } }) }
closed
dagger/dagger
https://github.com/dagger/dagger
6,252
🐞 Module constructor returns pointer for empty object instead of returning nil for *Directory type
### What is the issue? When I created a module constructor with `// +optional=true` missing flag returned a pointer of the empty object instead of nil. Example Code: ```go package main func New( // +optional=true src *Directory, ) *A { return &A{Src: src} } type A struct { Src *Directory } func (m *A) IsEmpty() bool { return m.Src == nil } ``` ### Log output ```shell dagger call is-empty ✔ dagger call is-empty [1.38s] ┃ false • Cloud URL: https://dagger.cloud/runs/6ed9327f-a4e3-4257-9864-87733b642a5f • Engine: 64fae4326b32 (version v0.9.4) ⧗ 2.79s ✔ 31 ∅ 7 ``` ### Steps to reproduce The code from example can be used for reproducing the issue. ### SDK version GO SDK v0.9.4 ### OS version macOS 14.0 cc: @jedevc
https://github.com/dagger/dagger/issues/6252
https://github.com/dagger/dagger/pull/6257
fd8922f8b964be83bd3fed1490fda114641ac480
3b82755058493c63d399bf095b1c3c4b4eba2834
"2023-12-11T16:59:25Z"
go
"2023-12-13T11:16:00Z"
core/integration/module_test.go
package core import ( "context" _ "embed" "encoding/json" "fmt" "go/format" "os" "os/exec" "path/filepath" "strings" "testing" "time" "github.com/iancoleman/strcase" "github.com/moby/buildkit/identity" "github.com/stretchr/testify/require" "github.com/tidwall/gjson" "golang.org/x/sync/errgroup" "dagger.io/dagger" "github.com/dagger/dagger/cmd/codegen/introspection" "github.com/dagger/dagger/core/modules" ) func TestModuleGoInit(t *testing.T) { t.Run("from scratch", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=bare", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{bare{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"bare":{"containerEcho":{"stdout":"hello\n"}}}`, out) }) t.Run("reserved go.mod name", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=go", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{go{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"go":{"containerEcho":{"stdout":"hello\n"}}}`, out) }) t.Run("uses expected Go module name, camel-cases Dagger module name", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=My-Module", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{myModule{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"myModule":{"containerEcho":{"stdout":"hello\n"}}}`, out) generated, err := modGen.File("go.mod").Contents(ctx) require.NoError(t, err) require.Contains(t, generated, "module main") }) t.Run("creates go.mod beneath an existing go.mod if root points beneath it", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/go.mod", dagger.ContainerWithNewFileOpts{ Contents: "module example.com/test\n", }). WithNewFile("/work/foo.go", dagger.ContainerWithNewFileOpts{ Contents: "package foo\n", }). WithWorkdir("/work/ci"). With(daggerExec("mod", "init", "--name=beneathGoMod", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{beneathGoMod{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"beneathGoMod":{"containerEcho":{"stdout":"hello\n"}}}`, out) t.Run("names Go module after Dagger module", func(t *testing.T) { generated, err := modGen.File("go.mod").Contents(ctx) require.NoError(t, err) require.Contains(t, generated, "module main") }) }) t.Run("respects existing go.mod", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithExec([]string{"go", "mod", "init", "example.com/test"}). With(daggerExec("mod", "init", "--name=hasGoMod", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{hasGoMod{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"hasGoMod":{"containerEcho":{"stdout":"hello\n"}}}`, out) t.Run("preserves module name", func(t *testing.T) { generated, err := modGen.File("go.mod").Contents(ctx) require.NoError(t, err) require.Contains(t, generated, "module example.com/test") }) }) t.Run("respects parent go.mod if root points to it", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithExec([]string{"go", "mod", "init", "example.com/test"}). WithNewFile("/work/foo.go", dagger.ContainerWithNewFileOpts{ Contents: "package foo\n", }). WithWorkdir("/work/child"). With(daggerExec("mod", "init", "--name=child", "--sdk=go", "--root=..")). WithNewFile("/work/child/main.go", dagger.ContainerWithNewFileOpts{ Contents: ` package main import "os" type Child struct{} func (m *Child) Root() *Directory { wd, err := os.Getwd() if err != nil { panic(err) } return dag.Host().Directory(wd+"/..") } `, }) generated := modGen. // explicitly sync to see whether it makes a go.mod With(daggerExec("mod", "sync")). Directory(".") logGen(ctx, t, generated) out, err := modGen. With(daggerQuery(`{child{root{entries}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"child":{"root":{"entries":["child","foo.go","go.mod","go.sum"]}}}`, out) childEntries, err := generated.Entries(ctx) require.NoError(t, err) require.NotContains(t, childEntries, "go.mod") t.Run("preserves parent module name", func(t *testing.T) { generated, err := modGen.File("/work/go.mod").Contents(ctx) require.NoError(t, err) require.Contains(t, generated, "module example.com/test") }) }) t.Run("respects existing go.mod even if root points to parent that has go.mod", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithExec([]string{"go", "mod", "init", "example.com/test"}). WithNewFile("/work/foo.go", dagger.ContainerWithNewFileOpts{ Contents: "package foo\n", }). WithWorkdir("/work/child"). WithExec([]string{"go", "mod", "init", "my-mod"}). With(daggerExec("mod", "init", "--name=child", "--sdk=go", "--root=..")). WithNewFile("/work/child/main.go", dagger.ContainerWithNewFileOpts{ Contents: ` package main import "os" type Child struct{} func (m *Child) Root() *Directory { wd, err := os.Getwd() if err != nil { panic(err) } return dag.Host().Directory(wd+"/..") } `, }) generated := modGen. // explicitly sync to see whether it makes a go.mod With(daggerExec("mod", "sync")). Directory(".") logGen(ctx, t, generated) out, err := modGen. With(daggerQuery(`{child{root{entries}}}`)). Stdout(ctx) require.NoError(t, err) // no go.sum require.JSONEq(t, `{"child":{"root":{"entries":["child","foo.go","go.mod"]}}}`, out) childEntries, err := generated.Entries(ctx) require.NoError(t, err) require.Contains(t, childEntries, "go.mod") require.Contains(t, childEntries, "go.sum") }) t.Run("respects existing main.go", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: ` package main type HasMainGo struct {} func (m *HasMainGo) Hello() string { return "Hello, world!" } `, }). With(daggerExec("mod", "init", "--name=hasMainGo", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{hasMainGo{hello}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"hasMainGo":{"hello":"Hello, world!"}}`, out) }) t.Run("respects existing main.go even if it uses types not generated yet", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: ` package main type HasDaggerTypes struct {} func (m *HasDaggerTypes) Hello() *Container { return dag.Container(). From("` + alpineImage + `"). WithExec([]string{"echo", "Hello, world!"}) } `, }). With(daggerExec("mod", "init", "--name=hasDaggerTypes", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{hasDaggerTypes{hello{stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"hasDaggerTypes":{"hello":{"stdout":"Hello, world!\n"}}}`, out) }) t.Run("respects existing package without creating main.go", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/notmain.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type HasNotMainGo struct {} func (m *HasNotMainGo) Hello() string { return "Hello, world!" } `, }). With(daggerExec("mod", "init", "--name=hasNotMainGo", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{hasNotMainGo{hello}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"hasNotMainGo":{"hello":"Hello, world!"}}`, out) }) } func TestModuleInitLICENSE(t *testing.T) { t.Run("bootstraps Apache-2.0 LICENSE file if none found", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=licensed-to-ill", "--sdk=go")) content, err := modGen.File("LICENSE").Contents(ctx) require.NoError(t, err) require.Contains(t, content, "Apache License, Version 2.0") }) t.Run("creates LICENSE file in the directory specified by -m", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "-m", "./mymod", "--name=licensed-to-ill", "--sdk=go")) content, err := modGen.File("mymod/LICENSE").Contents(ctx) require.NoError(t, err) require.Contains(t, content, "Apache License, Version 2.0") }) t.Run("does not bootstrap LICENSE file if it exists in the parent dir", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/LICENSE", dagger.ContainerWithNewFileOpts{ Contents: "doesnt matter", }). WithWorkdir("/work/sub"). With(daggerExec("mod", "init", "--name=licensed-to-ill", "--sdk=go")) _, err := modGen.File("LICENSE").Contents(ctx) require.Error(t, err) }) t.Run("bootstraps a LICENSE file when requested, even if it exists in the parent dir", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/LICENSE", dagger.ContainerWithNewFileOpts{ Contents: "doesnt matter", }). WithWorkdir("/work/sub"). With(daggerExec("mod", "init", "--name=licensed-to-ill", "--sdk=go", "--license=MIT")) content, err := modGen.File("LICENSE").Contents(ctx) require.NoError(t, err) require.Contains(t, content, "MIT License") }) } func TestModuleGit(t *testing.T) { t.Parallel() type testCase struct { sdk string gitignores []string } for _, tc := range []testCase{ { sdk: "go", gitignores: []string{ "/dagger.gen.go\n", "/querybuilder/\n", }, }, { sdk: "python", gitignores: []string{ "/sdk\n", }, }, } { tc := tc t.Run(fmt.Sprintf("module %s git", tc.sdk), func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := goGitBase(t, c). With(daggerExec("mod", "init", "--name=bare", "--sdk="+tc.sdk)) if tc.sdk == "go" { logGen(ctx, t, modGen.Directory(".")) } out, err := modGen. With(daggerQuery(`{bare{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"bare":{"containerEcho":{"stdout":"hello\n"}}}`, out) t.Run("configures .gitignore", func(t *testing.T) { ignore, err := modGen.File(".gitignore").Contents(ctx) require.NoError(t, err) for _, gitignore := range tc.gitignores { require.Contains(t, ignore, gitignore) } }) }) } } func TestModuleGoGitRemovesIgnored(t *testing.T) { t.Parallel() c, ctx := connect(t) committedModGen := goGitBase(t, c). With(daggerExec("mod", "init", "--name=bare", "--sdk=go")). WithExec([]string{"rm", ".gitignore"}). // simulate old path scheme to show we ignore it too to help transition WithExec([]string{"mkdir", "./internal"}). WithExec([]string{"cp", "-a", "./querybuilder", "./internal/querybuilder"}). WithExec([]string{"git", "add", "."}). WithExec([]string{"git", "commit", "-m", "init with generated files"}) changedAfterSync, err := committedModGen. With(daggerExec("mod", "sync")). WithExec([]string{"git", "diff"}). // for debugging WithExec([]string{"git", "status", "--short"}). Stdout(ctx) require.NoError(t, err) t.Logf("changed after sync:\n%s", changedAfterSync) require.Contains(t, changedAfterSync, "D dagger.gen.go\n") require.Contains(t, changedAfterSync, "D querybuilder/marshal.go\n") require.Contains(t, changedAfterSync, "D querybuilder/querybuilder.go\n") require.Contains(t, changedAfterSync, "D internal/querybuilder/marshal.go\n") require.Contains(t, changedAfterSync, "D internal/querybuilder/querybuilder.go\n") } func TestModulePythonGitRemovesIgnored(t *testing.T) { t.Parallel() c, ctx := connect(t) committedModGen := goGitBase(t, c). With(daggerExec("mod", "init", "--name=bare", "--sdk=python")). WithExec([]string{"rm", ".gitignore"}). WithExec([]string{"git", "add", "."}). WithExec([]string{"git", "commit", "-m", "init with generated files"}) changedAfterSync, err := committedModGen. With(daggerExec("mod", "sync")). WithExec([]string{"git", "diff"}). // for debugging WithExec([]string{"git", "status", "--short"}). Stdout(ctx) require.NoError(t, err) t.Logf("changed after sync:\n%s", changedAfterSync) require.Contains(t, changedAfterSync, "D sdk/pyproject.toml\n") require.Contains(t, changedAfterSync, "D sdk/src/dagger/__init__.py\n") } //go:embed testdata/modules/go/minimal/main.go var goSignatures string func TestModuleGoSignatures(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: goSignatures, }) logGen(ctx, t, modGen.Directory(".")) t.Run("func Hello() string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{hello}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"hello":"hello"}}`, out) }) t.Run("func Echo(string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echo(msg: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echo":"hello...hello...hello..."}}`, out) }) t.Run("func EchoPointer(*string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoPointer(msg: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoPointer":"hello...hello...hello..."}}`, out) }) t.Run("func EchoPointerPointer(**string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoPointerPointer(msg: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoPointerPointer":"hello...hello...hello..."}}`, out) }) t.Run("func EchoOptional(string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOptional(msg: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptional":"hello...hello...hello..."}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOptional}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptional":"default...default...default..."}}`, out) }) t.Run("func EchoOptionalPointer(string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOptionalPointer(msg: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptionalPointer":"hello...hello...hello..."}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOptionalPointer}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptionalPointer":"default...default...default..."}}`, out) }) t.Run("func EchoOptionalSlice([]string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOptionalSlice(msg: ["hello", "there"])}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptionalSlice":"hello+there...hello+there...hello+there..."}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOptionalSlice}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptionalSlice":"foobar...foobar...foobar..."}}`, out) }) t.Run("func Echoes([]string) []string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoes(msgs: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoes":["hello...hello...hello..."]}}`, out) }) t.Run("func EchoesVariadic(...string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoesVariadic(msgs: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoesVariadic":"hello...hello...hello..."}}`, out) }) t.Run("func HelloContext(context.Context) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{helloContext}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"helloContext":"hello context"}}`, out) }) t.Run("func EchoContext(context.Context, string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoContext(msg: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoContext":"ctx.hello...ctx.hello...ctx.hello..."}}`, out) }) t.Run("func HelloStringError() (string, error)", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{helloStringError}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"helloStringError":"hello i worked"}}`, out) }) t.Run("func HelloVoid()", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{helloVoid}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"helloVoid":null}}`, out) }) t.Run("func HelloVoidError() error", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{helloVoidError}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"helloVoidError":null}}`, out) }) t.Run("func EchoOpts(string, string, int) error", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOpts(msg: "hi")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOpts":"hi"}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOpts(msg: "hi", suffix: "!", times: 2)}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOpts":"hi!hi!"}}`, out) }) t.Run("func EchoOptsInline(struct{string, string, int}) error", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOptsInline(msg: "hi")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInline":"hi"}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOptsInline(msg: "hi", suffix: "!", times: 2)}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInline":"hi!hi!"}}`, out) }) t.Run("func EchoOptsInlinePointer(*struct{string, string, int}) error", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOptsInlinePointer(msg: "hi")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInlinePointer":"hi"}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOptsInlinePointer(msg: "hi", suffix: "!", times: 2)}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInlinePointer":"hi!hi!"}}`, out) }) t.Run("func EchoOptsInlineCtx(ctx, struct{string, string, int}) error", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOptsInlineCtx(msg: "hi")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInlineCtx":"hi"}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOptsInlineCtx(msg: "hi", suffix: "!", times: 2)}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInlineCtx":"hi!hi!"}}`, out) }) t.Run("func EchoOptsInlineTags(struct{string, string, int}) error", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOptsInlineTags(msg: "hi")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInlineTags":"hi"}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOptsInlineTags(msg: "hi", suffix: "!", times: 2)}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInlineTags":"hi!hi!"}}`, out) }) t.Run("func EchoOptsPragmas(string, string, int) error", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOptsPragmas(msg: "hi")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsPragmas":"hi...hi...hi..."}}`, out) }) } func TestModuleGoSignaturesBuiltinTypes(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main import "context" type Minimal struct {} func (m *Minimal) Read(ctx context.Context, dir Directory) (string, error) { return dir.File("foo").Contents(ctx) } func (m *Minimal) ReadPointer(ctx context.Context, dir *Directory) (string, error) { return dir.File("foo").Contents(ctx) } func (m *Minimal) ReadSlice(ctx context.Context, dir []Directory) (string, error) { return dir[0].File("foo").Contents(ctx) } func (m *Minimal) ReadVariadic(ctx context.Context, dir ...Directory) (string, error) { return dir[0].File("foo").Contents(ctx) } func (m *Minimal) ReadOptional(ctx context.Context, dir Optional[Directory]) (string, error) { d, ok := dir.Get() if ok { return d.File("foo").Contents(ctx) } return "", nil } `, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerQuery(`{directory{withNewFile(path: "foo", contents: "bar"){id}}}`)).Stdout(ctx) require.NoError(t, err) dirID := gjson.Get(out, "directory.withNewFile.id").String() t.Run("func Read(ctx, Directory) (string, error)", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(fmt.Sprintf(`{minimal{read(dir: "%s")}}`, dirID))).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"read":"bar"}}`, out) }) t.Run("func ReadPointer(ctx, *Directory) (string, error)", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(fmt.Sprintf(`{minimal{readPointer(dir: "%s")}}`, dirID))).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"readPointer":"bar"}}`, out) }) t.Run("func ReadSlice(ctx, []Directory) (string, error)", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(fmt.Sprintf(`{minimal{readSlice(dir: ["%s"])}}`, dirID))).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"readSlice":"bar"}}`, out) }) t.Run("func ReadVariadic(ctx, ...Directory) (string, error)", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(fmt.Sprintf(`{minimal{readVariadic(dir: ["%s"])}}`, dirID))).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"readVariadic":"bar"}}`, out) }) t.Run("func ReadOptional(ctx, Optional[Directory]) (string, error)", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(fmt.Sprintf(`{minimal{readOptional(dir: "%s")}}`, dirID))).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"readOptional":"bar"}}`, out) out, err = modGen.With(daggerQuery(`{minimal{readOptional}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"readOptional":""}}`, out) }) } func TestModuleGoSignaturesUnexported(t *testing.T) { t.Parallel() var logs safeBuffer c, ctx := connect(t, dagger.WithLogOutput(&logs)) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Minimal struct {} type Foo struct {} type bar struct {} func (m *Minimal) Hello(name string) string { return name } func (f *Foo) Hello(name string) string { return name } func (b *bar) Hello(name string) string { return name } `, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(inspectModule).Stdout(ctx) require.NoError(t, err) objs := gjson.Get(out, "host.directory.asModule.objects") require.Equal(t, 2, len(objs.Array())) minimal := objs.Get(`0.asObject`) require.Equal(t, "Minimal", minimal.Get("name").String()) foo := objs.Get(`1.asObject`) require.Equal(t, "MinimalFoo", foo.Get("name").String()) modGen = c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Minimal struct {} type Foo struct { Bar bar } type bar struct {} func (m *Minimal) Hello(name string) string { return name } func (f *Foo) Hello(name string) string { return name } func (b *bar) Hello(name string) string { return name } `, }) logGen(ctx, t, modGen.Directory(".")) _, err = modGen.With(inspectModule).Stderr(ctx) require.Error(t, err) require.NoError(t, c.Close()) require.Contains(t, logs.String(), "cannot code-generate unexported type bar") } func TestModuleGoSignaturesMixMatch(t *testing.T) { t.Parallel() var logs safeBuffer c, ctx := connect(t, dagger.WithLogOutput(&logs)) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Minimal struct {} func (m *Minimal) Hello(name string, opts struct{}, opts2 struct{}) string { return name } `, }) logGen(ctx, t, modGen.Directory(".")) _, err := modGen.With(daggerQuery(`{minimal{hello}}`)).Stdout(ctx) require.Error(t, err) require.NoError(t, c.Close()) require.Contains(t, logs.String(), "nested structs are not supported") } var inspectModule = daggerQuery(` query { host { directory(path: ".") { asModule { objects { asObject { name description functions { name description args { name description defaultValue } } fields { name description } } } } } } } `) func TestModuleGoDocs(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: goSignatures, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(inspectModule).Stdout(ctx) require.NoError(t, err) obj := gjson.Get(out, "host.directory.asModule.objects.0.asObject") require.Equal(t, "Minimal", obj.Get("name").String()) hello := obj.Get(`functions.#(name="hello")`) require.Equal(t, "hello", hello.Get("name").String()) require.Empty(t, hello.Get("description").String()) require.Empty(t, hello.Get("args").Array()) // test the args-based form echoOpts := obj.Get(`functions.#(name="echoOpts")`) require.Equal(t, "echoOpts", echoOpts.Get("name").String()) require.Equal(t, "EchoOpts does some opts things", echoOpts.Get("description").String()) require.Len(t, echoOpts.Get("args").Array(), 3) require.Equal(t, "msg", echoOpts.Get("args.0.name").String()) require.Equal(t, "the message to echo", echoOpts.Get("args.0.description").String()) require.Equal(t, "suffix", echoOpts.Get("args.1.name").String()) require.Equal(t, "String to append to the echoed message", echoOpts.Get("args.1.description").String()) require.Equal(t, "times", echoOpts.Get("args.2.name").String()) require.Equal(t, "Number of times to repeat the message", echoOpts.Get("args.2.description").String()) // test the inline struct form echoOpts = obj.Get(`functions.#(name="echoOptsInline")`) require.Equal(t, "echoOptsInline", echoOpts.Get("name").String()) require.Equal(t, "EchoOptsInline does some opts things", echoOpts.Get("description").String()) require.Len(t, echoOpts.Get("args").Array(), 3) require.Equal(t, "msg", echoOpts.Get("args.0.name").String()) require.Equal(t, "the message to echo", echoOpts.Get("args.0.description").String()) require.Equal(t, "suffix", echoOpts.Get("args.1.name").String()) require.Equal(t, "String to append to the echoed message", echoOpts.Get("args.1.description").String()) require.Equal(t, "times", echoOpts.Get("args.2.name").String()) require.Equal(t, "Number of times to repeat the message", echoOpts.Get("args.2.description").String()) // test the arg-based form (with pragmas) echoOpts = obj.Get(`functions.#(name="echoOptsPragmas")`) require.Equal(t, "echoOptsPragmas", echoOpts.Get("name").String()) require.Len(t, echoOpts.Get("args").Array(), 3) require.Equal(t, "msg", echoOpts.Get("args.0.name").String()) require.Equal(t, "", echoOpts.Get("args.0.defaultValue").String()) require.Equal(t, "suffix", echoOpts.Get("args.1.name").String()) require.Equal(t, "String to append to the echoed message", echoOpts.Get("args.1.description").String()) require.Equal(t, "\"...\"", echoOpts.Get("args.1.defaultValue").String()) require.Equal(t, "times", echoOpts.Get("args.2.name").String()) require.Equal(t, "3", echoOpts.Get("args.2.defaultValue").String()) require.Equal(t, "Number of times to repeat the message", echoOpts.Get("args.2.description").String()) } func TestModuleGoDocsEdgeCases(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main // Minimal is a thing type Minimal struct { // X is this X, Y string // Y is not this // +private // Z string } // some docs func (m *Minimal) Hello(foo string, bar string, // hello baz string, qux string, x string, // lol ) string { return foo + bar } func (m *Minimal) HelloMore( // foo here foo, // bar here bar string, ) string { return foo + bar } func (m *Minimal) HelloMoreInline(opts struct{ // foo here foo, bar string }) string { return opts.foo + opts.bar } func (m *Minimal) HelloAgain( // docs for helloagain foo string, bar string, // docs for bar baz string, ) string { return foo + bar } func (m *Minimal) HelloFinal( foo string) string { // woops return foo } `, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(inspectModule).Stdout(ctx) require.NoError(t, err) obj := gjson.Get(out, "host.directory.asModule.objects.0.asObject") require.Equal(t, "Minimal", obj.Get("name").String()) require.Equal(t, "Minimal is a thing", obj.Get("description").String()) hello := obj.Get(`functions.#(name="hello")`) require.Equal(t, "hello", hello.Get("name").String()) require.Len(t, hello.Get("args").Array(), 5) require.Equal(t, "foo", hello.Get("args.0.name").String()) require.Equal(t, "", hello.Get("args.0.description").String()) require.Equal(t, "bar", hello.Get("args.1.name").String()) require.Equal(t, "", hello.Get("args.1.description").String()) require.Equal(t, "baz", hello.Get("args.2.name").String()) require.Equal(t, "hello", hello.Get("args.2.description").String()) require.Equal(t, "qux", hello.Get("args.3.name").String()) require.Equal(t, "", hello.Get("args.3.description").String()) require.Equal(t, "x", hello.Get("args.4.name").String()) require.Equal(t, "lol", hello.Get("args.4.description").String()) hello = obj.Get(`functions.#(name="helloMore")`) require.Equal(t, "helloMore", hello.Get("name").String()) require.Len(t, hello.Get("args").Array(), 2) require.Equal(t, "foo", hello.Get("args.0.name").String()) require.Equal(t, "foo here", hello.Get("args.0.description").String()) require.Equal(t, "bar", hello.Get("args.1.name").String()) require.Equal(t, "bar here", hello.Get("args.1.description").String()) hello = obj.Get(`functions.#(name="helloMoreInline")`) require.Equal(t, "helloMoreInline", hello.Get("name").String()) require.Len(t, hello.Get("args").Array(), 2) require.Equal(t, "foo", hello.Get("args.0.name").String()) require.Equal(t, "foo here", hello.Get("args.0.description").String()) require.Equal(t, "bar", hello.Get("args.1.name").String()) require.Equal(t, "", hello.Get("args.1.description").String()) hello = obj.Get(`functions.#(name="helloAgain")`) require.Equal(t, "helloAgain", hello.Get("name").String()) require.Len(t, hello.Get("args").Array(), 3) require.Equal(t, "foo", hello.Get("args.0.name").String()) require.Equal(t, "", hello.Get("args.0.description").String()) require.Equal(t, "bar", hello.Get("args.1.name").String()) require.Equal(t, "docs for bar", hello.Get("args.1.description").String()) require.Equal(t, "baz", hello.Get("args.2.name").String()) require.Equal(t, "", hello.Get("args.2.description").String()) hello = obj.Get(`functions.#(name="helloFinal")`) require.Equal(t, "helloFinal", hello.Get("name").String()) require.Len(t, hello.Get("args").Array(), 1) require.Equal(t, "foo", hello.Get("args.0.name").String()) require.Equal(t, "", hello.Get("args.0.description").String()) require.Len(t, obj.Get(`fields`).Array(), 2) prop := obj.Get(`fields.#(name="x")`) require.Equal(t, "x", prop.Get("name").String()) require.Equal(t, "X is this", prop.Get("description").String()) prop = obj.Get(`fields.#(name="y")`) require.Equal(t, "y", prop.Get("name").String()) require.Equal(t, "", prop.Get("description").String()) } func TestModuleGoOptionalMustBeNil(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Minimal struct {} func (m *Minimal) Foo(x *Optional[*string]) string { if v, _ := x.Get(); v != nil { panic("uh oh") } return "" } func (m *Minimal) Bar(opts struct { x *Optional[*string] }) string { if v, _ := opts.x.Get(); v != nil { panic("uh oh") } return "" } func (m *Minimal) Baz( // +optional x *string, ) string { if x != nil { panic("uh oh") } return "" } func (m *Minimal) Qux(opts struct { // +optional x *string }) string { if opts.x != nil { panic("uh oh") } return "" } `, }) logGen(ctx, t, modGen.Directory(".")) for _, name := range []string{"foo", "bar", "baz", "qux"} { out, err := modGen.With(daggerQuery(`{minimal{%s}}`, name)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, fmt.Sprintf(`{"minimal": {"%s": ""}}`, name), out) } } func TestModuleGoPrivateField(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Minimal struct { Foo string Bar string // +private } func (m *Minimal) Set(foo string, bar string) *Minimal { m.Foo = foo m.Bar = bar return m } func (m *Minimal) Hello() string { return m.Foo + m.Bar } `, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(inspectModule).Stdout(ctx) require.NoError(t, err) obj := gjson.Get(out, "host.directory.asModule.objects.0.asObject") require.Equal(t, "Minimal", obj.Get("name").String()) require.Len(t, obj.Get(`fields`).Array(), 1) prop := obj.Get(`fields.#(name="foo")`) require.Equal(t, "foo", prop.Get("name").String()) out, err = modGen.With(daggerQuery(`{minimal{set(foo: "abc", bar: "xyz"){hello}}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"set":{"hello": "abcxyz"}}}`, out) out, err = modGen.With(daggerQuery(`{minimal{set(foo: "abc", bar: "xyz"){foo}}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"set":{"foo": "abc"}}}`, out) _, err = modGen.With(daggerQuery(`{minimal{set(foo: "abc", bar: "xyz"){bar}}}`)).Stdout(ctx) require.ErrorContains(t, err, `Cannot query field "bar"`) } //go:embed testdata/modules/go/extend/main.go var goExtend string // this is no longer allowed, but verify the SDK errors out func TestModuleGoExtendCore(t *testing.T) { t.Parallel() var logs safeBuffer c, ctx := connect(t, dagger.WithLogOutput(&logs)) _, err := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: goExtend, }). With(daggerExec("mod", "sync")). Sync(ctx) require.Error(t, err) require.NoError(t, c.Close()) require.Contains(t, logs.String(), "cannot define methods on objects from outside this module") } //go:embed testdata/modules/go/custom-types/main.go var goCustomTypes string //go:embed testdata/modules/python/custom-types/main.py var pythonCustomTypes string func TestModuleCustomTypes(t *testing.T) { t.Parallel() type testCase struct { sdk string sourcePath string sourceContent string } for _, tc := range []testCase{ { sdk: "go", sourcePath: "main.go", sourceContent: goCustomTypes, }, { sdk: "python", sourcePath: "src/main.py", sourceContent: pythonCustomTypes, }, } { t.Run(fmt.Sprintf("custom %s types", tc.sdk), func(t *testing.T) { c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk="+tc.sdk)). WithNewFile(tc.sourcePath, dagger.ContainerWithNewFileOpts{ Contents: tc.sourceContent, }) if tc.sdk == "go" { logGen(ctx, t, modGen.Directory(".")) } out, err := modGen.With(daggerQuery(`{test{repeater(msg:"echo!", times: 3){render}}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"test":{"repeater":{"render":"echo!echo!echo!"}}}`, out) }) } } func TestModuleGoReturnTypeDetection(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=foo", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Foo struct {} type X struct { Message string ` + "`json:\"message\"`" + ` } func (m *Foo) MyFunction() X { return X{Message: "foo"} } `, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerQuery(`{foo{myFunction{message}}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"foo":{"myFunction":{"message":"foo"}}}`, out) } func TestModuleGoReturnStruct(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=foo", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Foo struct {} type X struct { Message string ` + "`json:\"message\"`" + ` When string ` + "`json:\"Timestamp\"`" + ` To string ` + "`json:\"recipient\"`" + ` From string } func (m *Foo) MyFunction() X { return X{Message: "foo", When: "now", To: "user", From: "admin"} } `, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerQuery(`{foo{myFunction{message, recipient, from, timestamp}}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"foo":{"myFunction":{"message":"foo", "recipient":"user", "from":"admin", "timestamp":"now"}}}`, out) } func TestModuleGoReturnNestedStruct(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=playground", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Playground struct{} type Foo struct { MsgContainer Bar } type Bar struct { Msg string } func (m *Playground) MyFunction() Foo { return Foo{MsgContainer: Bar{Msg: "hello world"}} } `, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerQuery(`{playground{myFunction{msgContainer{msg}}}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"playground":{"myFunction":{"msgContainer":{"msg": "hello world"}}}}`, out) } func TestModuleGoReturnCompositeCore(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=playground", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Playground struct{} func (m *Playground) MySlice() []*Container { return []*Container{dag.Container().From("alpine:latest").WithExec([]string{"echo", "hello world"})} } type Foo struct { Con *Container // verify fields can remain nil w/out error too UnsetFile *File } func (m *Playground) MyStruct() *Foo { return &Foo{Con: dag.Container().From("alpine:latest").WithExec([]string{"echo", "hello world"})} } `, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerQuery(`{playground{mySlice{stdout}}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"playground":{"mySlice":[{"stdout":"hello world\n"}]}}`, out) out, err = modGen.With(daggerQuery(`{playground{myStruct{con{stdout}}}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"playground":{"myStruct":{"con":{"stdout":"hello world\n"}}}}`, out) } func TestModuleGoReturnComplexThing(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=playground", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Playground struct{} type ScanResult struct { Containers []*Container ` + "`json:\"targets\"`" + ` Report ScanReport } type ScanReport struct { Contents string ` + "`json:\"contents\"`" + ` Authors []string ` + "`json:\"Authors\"`" + ` } func (m *Playground) Scan() ScanResult { return ScanResult{ Containers: []*Container{ dag.Container().From("alpine:latest").WithExec([]string{"echo", "hello world"}), }, Report: ScanReport{ Contents: "hello world", Authors: []string{"foo", "bar"}, }, } } `, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerQuery(`{playground{scan{targets{stdout},report{contents,authors}}}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"playground":{"scan":{"targets":[{"stdout":"hello world\n"}],"report":{"contents":"hello world","authors":["foo","bar"]}}}}`, out) } func TestModuleGoGlobalVarDAG(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=foo", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main import "context" type Foo struct {} var someDefault = dag.Container().From("alpine:latest") func (m *Foo) Fn(ctx context.Context) (string, error) { return someDefault.WithExec([]string{"echo", "foo"}).Stdout(ctx) } `, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerQuery(`{foo{fn}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"foo":{"fn":"foo\n"}}`, out) } func TestModuleIDableType(t *testing.T) { t.Parallel() c, ctx := connect(t) type testCase struct { sdk string source string } for _, tc := range []testCase{ { sdk: "go", source: `package main type Foo struct { Data string } func (m *Foo) Set(data string) *Foo { m.Data = data return m } func (m *Foo) Get() string { return m.Data } `, }, { sdk: "python", source: `from typing import Self from dagger import field, function, object_type @object_type class Foo: data: str = "" @function def set(self, data: str) -> Self: self.data = data return self @function def get(self) -> str: return self.data `, }, } { tc := tc t.Run(tc.sdk, func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=foo", "--sdk="+tc.sdk)). With(sdkSource(tc.sdk, tc.source)) if tc.sdk == "go" { logGen(ctx, t, modGen.Directory(".")) } // sanity check out, err := modGen.With(daggerQuery(`{foo{set(data: "abc"){get}}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"foo":{"set":{"get": "abc"}}}`, out) out, err = modGen.With(daggerQuery(`{foo{set(data: "abc"){id}}}`)).Stdout(ctx) require.NoError(t, err) id := gjson.Get(out, "foo.set.id").String() require.Contains(t, id, "moddata:") out, err = modGen.With(daggerQuery(`{loadFooFromID(id: "%s"){get}}`, id)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"loadFooFromID":{"get": "abc"}}`, out) }) } } func TestModuleArgOwnType(t *testing.T) { // Verify use of a module's own object as an argument type. // The server needs to specifically decode the input type from an ID into // the raw JSON, since the module doesn't understand it's own types as IDs t.Parallel() c, ctx := connect(t) type testCase struct { sdk string source string } for _, tc := range []testCase{ { sdk: "go", source: `package main import "strings" type Foo struct{} type Message struct { Content string } func (m *Foo) SayHello(name string) Message { return Message{Content: "hello " + name} } func (m *Foo) Upper(msg Message) Message { msg.Content = strings.ToUpper(msg.Content) return msg } func (m *Foo) Uppers(msg []Message) []Message { for i := range msg { msg[i].Content = strings.ToUpper(msg[i].Content) } return msg }`, }, { sdk: "python", source: `from dagger import field, function, object_type @object_type class Message: content: str = field() @object_type class Foo: @function def say_hello(self, name: str) -> Message: return Message(content=f"hello {name}") @function def upper(self, msg: Message) -> Message: msg.content = msg.content.upper() return msg @function def uppers(self, msg: list[Message]) -> list[Message]: for m in msg: m.content = m.content.upper() return msg `, }, } { tc := tc t.Run(tc.sdk, func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=foo", "--sdk="+tc.sdk)). With(sdkSource(tc.sdk, tc.source)) if tc.sdk == "go" { logGen(ctx, t, modGen.Directory(".")) } out, err := modGen.With(daggerQuery(`{foo{sayHello(name: "world"){id}}}`)).Stdout(ctx) require.NoError(t, err) id := gjson.Get(out, "foo.sayHello.id").String() require.Contains(t, id, "moddata:") out, err = modGen.With(daggerQuery(`{foo{upper(msg:"%s"){content}}}`, id)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"foo":{"upper":{"content": "HELLO WORLD"}}}`, out) out, err = modGen.With(daggerQuery(`{foo{uppers(msg:["%s", "%s"]){content}}}`, id, id)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"foo":{"uppers":[{"content": "HELLO WORLD"}, {"content": "HELLO WORLD"}]}}`, out) }) } } func TestModuleConflictingSameNameDeps(t *testing.T) { // A -> B -> Dint // A -> C -> Dstr // where Dint and Dstr are modules with the same name and same object names but conflicting types t.Parallel() c, ctx := connect(t) ctr := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/dstr"). With(daggerExec("mod", "init", "--name=d", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type D struct{} type Obj struct { Foo string } func (m *D) Fn(foo string) Obj { return Obj{Foo: foo} } `, }) ctr = ctr. WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/dint"). With(daggerExec("mod", "init", "--name=d", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type D struct{} type Obj struct { Foo int } func (m *D) Fn(foo int) Obj { return Obj{Foo: foo} } `, }) ctr = ctr. WithWorkdir("/work/c"). With(daggerExec("mod", "init", "--name=c", "--sdk=go", "--root=..")). With(daggerExec("mod", "install", "../dstr")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main import ( "context" ) type C struct{} func (m *C) Fn(ctx context.Context, foo string) (string, error) { return dag.D().Fn(foo).Foo(ctx) } `, }) ctr = ctr. WithWorkdir("/work/b"). With(daggerExec("mod", "init", "--name=b", "--sdk=go", "--root=..")). With(daggerExec("mod", "install", "../dint")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main import ( "context" ) type B struct{} func (m *B) Fn(ctx context.Context, foo int) (int, error) { return dag.D().Fn(foo).Foo(ctx) } `, }) ctr = ctr. WithWorkdir("/work/a"). With(daggerExec("mod", "init", "--name=a", "--sdk=go", "--root=..")). With(daggerExec("mod", "install", "../b")). With(daggerExec("mod", "install", "../c")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main import ( "context" "strconv" ) type A struct{} func (m *A) Fn(ctx context.Context) (string, error) { fooStr, err := dag.C().Fn(ctx, "foo") if err != nil { return "", err } fooInt, err := dag.B().Fn(ctx, 123) if err != nil { return "", err } return fooStr + strconv.Itoa(fooInt), nil } `, }) out, err := ctr.With(daggerQuery(`{a{fn}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"a":{"fn": "foo123"}}`, out) // verify that no types from (transitive) deps show up types := currentSchema(ctx, t, ctr).Types require.NotNil(t, types.Get("A")) require.Nil(t, types.Get("B")) require.Nil(t, types.Get("C")) require.Nil(t, types.Get("D")) } func TestModuleSelfAPICall(t *testing.T) { t.Parallel() c, ctx := connect(t) out, err := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main import ( "context" "github.com/Khan/genqlient/graphql" ) type Test struct{} func (m *Test) FnA(ctx context.Context) (string, error) { resp := &graphql.Response{} err := dag.c.MakeRequest(ctx, &graphql.Request{ Query: "{test{fnB}}", }, resp) if err != nil { return "", err } return resp.Data.(map[string]any)["test"].(map[string]any)["fnB"].(string), nil } func (m *Test) FnB() string { return "hi from b" } `, }). With(daggerQuery(`{test{fnA}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"test":{"fnA": "hi from b"}}`, out) } func TestModuleWithOtherModuleTypes(t *testing.T) { t.Parallel() c, ctx := connect(t) ctr := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/dep"). With(daggerExec("mod", "init", "--name=dep", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Dep struct{} type Obj struct { Foo string } func (m *Dep) Fn() Obj { return Obj{Foo: "foo"} } `, }). WithWorkdir("/work/test"). With(daggerExec("mod", "init", "--name=test", "--sdk=go", "--root=..")). With(daggerExec("mod", "install", "../dep")) t.Run("return as other module object", func(t *testing.T) { t.Parallel() t.Run("direct", func(t *testing.T) { t.Parallel() _, err := ctr. WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Test struct{} func (m *Test) Fn() (*DepObj, error) { return nil, nil } `, }). With(daggerFunctions()). Stdout(ctx) require.Error(t, err) require.ErrorContains(t, err, fmt.Sprintf( "object %q function %q cannot return external type from dependency module %q", "Test", "Fn", "dep", )) }) t.Run("list", func(t *testing.T) { t.Parallel() _, err := ctr. WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Test struct{} func (m *Test) Fn() ([]*DepObj, error) { return nil, nil } `, }). With(daggerFunctions()). Stdout(ctx) require.Error(t, err) require.ErrorContains(t, err, fmt.Sprintf( "object %q function %q cannot return external type from dependency module %q", "Test", "Fn", "dep", )) }) }) t.Run("arg as other module object", func(t *testing.T) { t.Parallel() t.Run("direct", func(t *testing.T) { t.Parallel() _, err := ctr.WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Test struct{} func (m *Test) Fn(obj *DepObj) error { return nil } `, }). With(daggerFunctions()). Stdout(ctx) require.Error(t, err) require.ErrorContains(t, err, fmt.Sprintf( "object %q function %q arg %q cannot reference external type from dependency module %q", "Test", "Fn", "obj", "dep", )) }) t.Run("list", func(t *testing.T) { t.Parallel() _, err := ctr.WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Test struct{} func (m *Test) Fn(obj []*DepObj) error { return nil } `, }). With(daggerFunctions()). Stdout(ctx) require.Error(t, err) require.ErrorContains(t, err, fmt.Sprintf( "object %q function %q arg %q cannot reference external type from dependency module %q", "Test", "Fn", "obj", "dep", )) }) }) t.Run("field as other module object", func(t *testing.T) { t.Parallel() t.Run("direct", func(t *testing.T) { t.Parallel() _, err := ctr. WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Test struct{} type Obj struct { Foo *DepObj } func (m *Test) Fn() (*Obj, error) { return nil, nil } `, }). With(daggerFunctions()). Stdout(ctx) require.Error(t, err) require.ErrorContains(t, err, fmt.Sprintf( "object %q field %q cannot reference external type from dependency module %q", "Obj", "Foo", "dep", )) }) t.Run("list", func(t *testing.T) { t.Parallel() _, err := ctr. WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Test struct{} type Obj struct { Foo []*DepObj } func (m *Test) Fn() (*Obj, error) { return nil, nil } `, }). With(daggerFunctions()). Stdout(ctx) require.Error(t, err) require.ErrorContains(t, err, fmt.Sprintf( "object %q field %q cannot reference external type from dependency module %q", "Obj", "Foo", "dep", )) }) }) } //go:embed testdata/modules/go/use/dep/main.go var useInner string //go:embed testdata/modules/go/use/main.go var useOuter string func TestModuleUseLocal(t *testing.T) { t.Parallel() c, ctx := connect(t) t.Run("go uses go", func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/dep"). With(daggerExec("mod", "init", "--name=dep", "--sdk=go")). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=use", "--sdk=go")). WithNewFile("/work/dep/main.go", dagger.ContainerWithNewFileOpts{ Contents: useInner, }). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: useOuter, }). With(daggerExec("mod", "install", "./dep")). WithEnvVariable("BUST", identity.NewID()) // NB(vito): hmm... logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerQuery(`{use{useHello}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"use":{"useHello":"hello"}}`, out) // cannot use transitive dependency directly _, err = modGen.With(daggerQuery(`{dep{hello}}`)).Stdout(ctx) require.Error(t, err) require.ErrorContains(t, err, `Cannot query field "dep" on type "Query".`) }) t.Run("python uses go", func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/dep"). With(daggerExec("mod", "init", "--name=dep", "--sdk=go")). WithNewFile("/work/dep/main.go", dagger.ContainerWithNewFileOpts{ Contents: useInner, }). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=use", "--sdk=python")). With(daggerExec("mod", "install", "./dep")). WithNewFile("/work/src/main.py", dagger.ContainerWithNewFileOpts{ Contents: `from dagger import dag, function @function def use_hello() -> str: return dag.dep().hello() `, }) out, err := modGen.With(daggerQuery(`{use{useHello}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"use":{"useHello":"hello"}}`, out) // cannot use transitive dependency directly _, err = modGen.With(daggerQuery(`{dep{hello}}`)).Stdout(ctx) require.Error(t, err) require.ErrorContains(t, err, `Cannot query field "dep" on type "Query".`) }) } func TestModuleCodegenonDepChange(t *testing.T) { t.Parallel() c, ctx := connect(t) t.Run("go uses go", func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/dep"). With(daggerExec("mod", "init", "--name=dep", "--sdk=go")). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=use", "--sdk=go")). WithNewFile("/work/dep/main.go", dagger.ContainerWithNewFileOpts{ Contents: useInner, }). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: useOuter, }). With(daggerExec("mod", "install", "./dep")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerQuery(`{use{useHello}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"use":{"useHello":"hello"}}`, out) // make back-incompatible change to dep newInner := strings.ReplaceAll(useInner, `Hello()`, `Hellov2()`) modGen = modGen. WithNewFile("/work/dep/main.go", dagger.ContainerWithNewFileOpts{ Contents: newInner, }). WithExec([]string{"sh", "-c", "dagger mod sync"}, dagger.ContainerWithExecOpts{ ExperimentalPrivilegedNesting: true, }) codegenContents, err := modGen.File("/work/dagger.gen.go").Contents(ctx) require.NoError(t, err) require.Contains(t, codegenContents, "Hellov2") newOuter := strings.ReplaceAll(useOuter, `Hello(ctx)`, `Hellov2(ctx)`) modGen = modGen. WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: newOuter, }) out, err = modGen.With(daggerQuery(`{use{useHello}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"use":{"useHello":"hello"}}`, out) }) t.Run("python uses go", func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/dep"). With(daggerExec("mod", "init", "--name=dep", "--sdk=go")). WithNewFile("/work/dep/main.go", dagger.ContainerWithNewFileOpts{ Contents: useInner, }). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=use", "--sdk=python")). With(daggerExec("mod", "install", "./dep")). WithNewFile("/work/src/main.py", dagger.ContainerWithNewFileOpts{ Contents: `from dagger import dag, function @function def use_hello() -> str: return dag.dep().hello() `, }) out, err := modGen.With(daggerQuery(`{use{useHello}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"use":{"useHello":"hello"}}`, out) // make back-incompatible change to dep newInner := strings.ReplaceAll(useInner, `Hello()`, `Hellov2()`) modGen = modGen. WithNewFile("/work/dep/main.go", dagger.ContainerWithNewFileOpts{ Contents: newInner, }). WithExec([]string{"sh", "-c", "dagger mod sync"}, dagger.ContainerWithExecOpts{ ExperimentalPrivilegedNesting: true, }) codegenContents, err := modGen.File("/work/sdk/src/dagger/client/gen.py").Contents(ctx) require.NoError(t, err) require.Contains(t, codegenContents, "hellov2") modGen = modGen. WithNewFile("/work/src/main.py", dagger.ContainerWithNewFileOpts{ Contents: `from dagger import dag, function @function def use_hello() -> str: return dag.dep().hellov2() `, }) out, err = modGen.With(daggerQuery(`{use{useHello}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"use":{"useHello":"hello"}}`, out) }) } func TestModuleGoUseLocalMulti(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/foo"). WithNewFile("/work/foo/main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Foo struct {} func (m *Foo) Name() string { return "foo" } `, }). With(daggerExec("mod", "init", "--name=foo", "--sdk=go")). WithWorkdir("/work/bar"). WithNewFile("/work/bar/main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Bar struct {} func (m *Bar) Name() string { return "bar" } `, }). With(daggerExec("mod", "init", "--name=bar", "--sdk=go")). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=use", "--sdk=go")). With(daggerExec("mod", "install", "./foo")). With(daggerExec("mod", "install", "./bar")). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main import "context" import "fmt" type Use struct {} func (m *Use) Names(ctx context.Context) ([]string, error) { fooName, err := dag.Foo().Name(ctx) if err != nil { return nil, fmt.Errorf("foo.name: %w", err) } barName, err := dag.Bar().Name(ctx) if err != nil { return nil, fmt.Errorf("bar.name: %w", err) } return []string{fooName, barName}, nil } `, }). WithEnvVariable("BUST", identity.NewID()) // NB(vito): hmm... logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerQuery(`{use{names}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"use":{"names":["foo", "bar"]}}`, out) } func TestModuleConstructor(t *testing.T) { t.Parallel() c, ctx := connect(t) type testCase struct { sdk string source string } t.Run("basic", func(t *testing.T) { t.Parallel() for _, tc := range []testCase{ { sdk: "go", source: `package main import ( "context" ) func New( ctx context.Context, foo string, bar Optional[int], baz []string, dir *Directory, ) *Test { return &Test{ Foo: foo, Bar: bar.GetOr(42), Baz: baz, Dir: dir, } } type Test struct { Foo string Bar int Baz []string Dir *Directory NeverSetDir *Directory } func (m *Test) GimmeFoo() string { return m.Foo } func (m *Test) GimmeBar() int { return m.Bar } func (m *Test) GimmeBaz() []string { return m.Baz } func (m *Test) GimmeDirEnts(ctx context.Context) ([]string, error) { return m.Dir.Entries(ctx) } `, }, { sdk: "python", source: `import dagger from dagger import field, function, object_type @object_type class Test: foo: str = field() dir: dagger.Directory = field() bar: int = field(default=42) baz: list[str] = field(default=list) never_set_dir: dagger.Directory | None = field(default=None) @function def gimme_foo(self) -> str: return self.foo @function def gimme_bar(self) -> int: return self.bar @function def gimme_baz(self) -> list[str]: return self.baz @function async def gimme_dir_ents(self) -> list[str]: return await self.dir.entries() `, }, } { tc := tc t.Run(tc.sdk, func(t *testing.T) { t.Parallel() ctr := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/test"). With(daggerExec("mod", "init", "--name=test", "--sdk="+tc.sdk)). With(sdkSource(tc.sdk, tc.source)) out, err := ctr.With(daggerCall("--foo=abc", "--baz=x,y,z", "--dir=.", "foo")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "abc") out, err = ctr.With(daggerCall("--foo=abc", "--baz=x,y,z", "--dir=.", "gimme-foo")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "abc") out, err = ctr.With(daggerCall("--foo=abc", "--baz=x,y,z", "--dir=.", "bar")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "42") out, err = ctr.With(daggerCall("--foo=abc", "--baz=x,y,z", "--dir=.", "gimme-bar")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "42") out, err = ctr.With(daggerCall("--foo=abc", "--bar=123", "--baz=x,y,z", "--dir=.", "bar")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "123") out, err = ctr.With(daggerCall("--foo=abc", "--bar=123", "--baz=x,y,z", "--dir=.", "gimme-bar")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "123") out, err = ctr.With(daggerCall("--foo=abc", "--bar=123", "--baz=x,y,z", "--dir=.", "baz")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "x\ny\nz") out, err = ctr.With(daggerCall("--foo=abc", "--bar=123", "--baz=x,y,z", "--dir=.", "gimme-baz")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "x\ny\nz") out, err = ctr.With(daggerCall("--foo=abc", "--bar=123", "--baz=x,y,z", "--dir=.", "gimme-dir-ents")).Stdout(ctx) require.NoError(t, err) require.Contains(t, strings.TrimSpace(out), "dagger.json") }) } }) t.Run("fields only", func(t *testing.T) { t.Parallel() for _, tc := range []testCase{ { sdk: "go", source: `package main import ( "context" ) func New(ctx context.Context) (Test, error) { v, err := dag.Container().From("alpine:3.18.4").File("/etc/alpine-release").Contents(ctx) if err != nil { return Test{}, err } return Test{ AlpineVersion: v, }, nil } type Test struct { AlpineVersion string } `, }, { sdk: "python", source: `from dagger import dag, field, function, object_type @object_type class Test: alpine_version: str = field() @classmethod async def create(cls) -> "Test": return cls(alpine_version=await ( dag.container() .from_("alpine:3.18.4") .file("/etc/alpine-release") .contents() )) `, }, } { tc := tc t.Run(tc.sdk, func(t *testing.T) { t.Parallel() ctr := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/test"). With(daggerExec("mod", "init", "--name=test", "--sdk="+tc.sdk)). With(sdkSource(tc.sdk, tc.source)) out, err := ctr.With(daggerCall("alpine-version")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "3.18.4") }) } }) t.Run("return error", func(t *testing.T) { t.Parallel() for _, tc := range []testCase{ { sdk: "go", source: `package main import ( "fmt" ) func New() (*Test, error) { return nil, fmt.Errorf("too bad") } type Test struct { Foo string } `, }, { sdk: "python", source: `from dagger import object_type, field @object_type class Test: foo: str = field() def __init__(self): raise ValueError("too bad") `, }, } { tc := tc t.Run(tc.sdk, func(t *testing.T) { t.Parallel() var logs safeBuffer c, ctx := connect(t, dagger.WithLogOutput(&logs)) ctr := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/test"). With(daggerExec("mod", "init", "--name=test", "--sdk="+tc.sdk)). With(sdkSource(tc.sdk, tc.source)) _, err := ctr.With(daggerCall("foo")).Stdout(ctx) require.Error(t, err) require.Contains(t, logs.String(), "too bad") }) } }) t.Run("python: with default factory", func(t *testing.T) { t.Parallel() content := identity.NewID() ctr := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/test"). With(daggerExec("mod", "init", "--name=test", "--sdk=python")). With(sdkSource("python", fmt.Sprintf(`import dagger from dagger import dag, object_type, field @object_type class Test: foo: dagger.File = field(default=lambda: ( dag.directory() .with_new_file("foo.txt", contents="%s") .file("foo.txt") )) bar: list[str] = field(default=list) `, content), )) out, err := ctr.With(daggerCall("foo")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), content) out, err = ctr.With(daggerCall("--foo=dagger.json", "foo")).Stdout(ctx) require.NoError(t, err) require.Contains(t, out, `"sdk": "python"`) _, err = ctr.With(daggerCall("bar")).Sync(ctx) require.NoError(t, err) }) } //go:embed testdata/modules/go/wrapper/main.go var wrapper string func TestModuleGoWrapping(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=wrapper", "--sdk=go")). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: wrapper, }) logGen(ctx, t, modGen.Directory(".")) id := identity.NewID() out, err := modGen.With(daggerQuery( fmt.Sprintf(`{wrapper{container{echo(msg:%q){unwrap{stdout}}}}}`, id), )).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, fmt.Sprintf(`{"wrapper":{"container":{"echo":{"unwrap":{"stdout":%q}}}}}`, id), out) } func TestModuleConfigAPI(t *testing.T) { t.Parallel() c, ctx := connect(t) moduleDir := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/subdir"). With(daggerExec("mod", "init", "--name=test", "--sdk=go", "--root=..")). Directory("/work") cfg := c.ModuleConfig(moduleDir, dagger.ModuleConfigOpts{Subpath: "subdir"}) name, err := cfg.Name(ctx) require.NoError(t, err) require.Equal(t, "test", name) sdk, err := cfg.SDK(ctx) require.NoError(t, err) require.Equal(t, "go", sdk) root, err := cfg.Root(ctx) require.NoError(t, err) require.Equal(t, "..", root) } func TestModulePythonInit(t *testing.T) { t.Run("from scratch", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=bare", "--sdk=python")) out, err := modGen. With(daggerQuery(`{bare{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"bare":{"containerEcho":{"stdout":"hello\n"}}}`, out) }) t.Run("with different root", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/child"). With(daggerExec("mod", "init", "--name=bare", "--sdk=python", "--root=..")) out, err := modGen. With(daggerQuery(`{bare{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"bare":{"containerEcho":{"stdout":"hello\n"}}}`, out) }) t.Run("respects existing pyproject.toml", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("pyproject.toml", dagger.ContainerWithNewFileOpts{ Contents: `[project] name = "has-pyproject" version = "0.0.0" `, }). With(daggerExec("mod", "init", "--name=hasPyproject", "--sdk=python")) out, err := modGen. With(daggerQuery(`{hasPyproject{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"hasPyproject":{"containerEcho":{"stdout":"hello\n"}}}`, out) t.Run("preserves module name", func(t *testing.T) { generated, err := modGen.File("pyproject.toml").Contents(ctx) require.NoError(t, err) require.Contains(t, generated, `name = "has-pyproject"`) }) }) t.Run("respects existing main.py", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/src/main/__init__.py", dagger.ContainerWithNewFileOpts{ Contents: "from . import notmain\n", }). WithNewFile("/work/src/main/notmain.py", dagger.ContainerWithNewFileOpts{ Contents: `from dagger import function @function def hello() -> str: return "Hello, world!" `, }). With(daggerExec("mod", "init", "--name=hasMainPy", "--sdk=python")) out, err := modGen. With(daggerQuery(`{hasMainPy{hello}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"hasMainPy":{"hello":"Hello, world!"}}`, out) }) } func TestModulePythonReturnSelf(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=foo", "--sdk=python")). WithNewFile("src/main.py", dagger.ContainerWithNewFileOpts{ Contents: `from typing import Self from dagger import field, function, object_type @object_type class Foo: message: str = field(default="") @function def bar(self) -> Self: self.message = "foobar" return self `, }) out, err := modGen.With(daggerQuery(`{foo{bar{message}}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"foo":{"bar":{"message":"foobar"}}}`, out) } func TestModuleTypescriptInit(t *testing.T) { t.Skip("unstable because of a typescript error") t.Run("from scratch", func(t *testing.T) { t.Skip("unstable because of a typescript error") t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=bare", "--sdk=typescript")) out, err := modGen. With(daggerQuery(`{bare{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"bare":{"containerEcho":{"stdout":"hello\n"}}}`, out) }) t.Run("with different root", func(t *testing.T) { t.Skip("unstable because of a typescript error") t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/child"). With(daggerExec("mod", "init", "--name=bare", "--sdk=typescript", "--root=..")) out, err := modGen. With(daggerQuery(`{bare{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"bare":{"containerEcho":{"stdout":"hello\n"}}}`, out) }) } func TestModuleLotsOfFunctions(t *testing.T) { t.Parallel() const funcCount = 100 t.Run("go sdk", func(t *testing.T) { t.Parallel() c, ctx := connect(t) mainSrc := ` package main type PotatoSack struct {} ` for i := 0; i < funcCount; i++ { mainSrc += fmt.Sprintf(` func (m *PotatoSack) Potato%d() string { return "potato #%d" } `, i, i) } modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: mainSrc, }). With(daggerExec("mod", "init", "--name=potatoSack", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) var eg errgroup.Group for i := 0; i < funcCount; i++ { i := i // just verify a subset work if i%10 != 0 { continue } eg.Go(func() error { _, err := modGen. With(daggerCall(fmt.Sprintf("potato%d", i))). Sync(ctx) return err }) } require.NoError(t, eg.Wait()) }) t.Run("python sdk", func(t *testing.T) { t.Parallel() c, ctx := connect(t) mainSrc := `from dagger import function ` for i := 0; i < funcCount; i++ { mainSrc += fmt.Sprintf(` @function def potato_%d() -> str: return "potato #%d" `, i, i) } modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("./src/main.py", dagger.ContainerWithNewFileOpts{ Contents: mainSrc, }). With(daggerExec("mod", "init", "--name=potatoSack", "--sdk=python")) var eg errgroup.Group for i := 0; i < funcCount; i++ { i := i // just verify a subset work if i%10 != 0 { continue } eg.Go(func() error { _, err := modGen. With(daggerCall(fmt.Sprintf("potato%d", i))). Sync(ctx) return err }) } require.NoError(t, eg.Wait()) }) } func TestModuleLotsOfDeps(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work") modCount := 0 getModMainSrc := func(name string, depNames []string) string { t.Helper() mainSrc := fmt.Sprintf(`package main import "context" type %s struct {} func (m *%s) Fn(ctx context.Context) (string, error) { s := "%s" var depS string _ = depS var err error _ = err `, strcase.ToCamel(name), strcase.ToCamel(name), name) for _, depName := range depNames { mainSrc += fmt.Sprintf(` depS, err = dag.%s().Fn(ctx) if err != nil { return "", err } s += depS `, strcase.ToCamel(depName)) } mainSrc += "return s, nil\n}\n" fmted, err := format.Source([]byte(mainSrc)) require.NoError(t, err) return string(fmted) } // need to construct dagger.json directly in order to avoid excessive // `dagger mod use` calls while constructing the huge DAG of deps getModDaggerConfig := func(name string, depNames []string) string { t.Helper() var depVals []string for _, depName := range depNames { depVals = append(depVals, "../"+depName) } cfg := modules.Config{ Name: name, Root: "..", SDK: "go", Dependencies: depVals, } bs, err := json.Marshal(cfg) require.NoError(t, err) return string(bs) } addModulesWithDeps := func(newMods int, depNames []string) []string { t.Helper() var newModNames []string for i := 0; i < newMods; i++ { name := fmt.Sprintf("mod%d", modCount) modCount++ newModNames = append(newModNames, name) modGen = modGen. WithWorkdir("/work/"+name). WithNewFile("./main.go", dagger.ContainerWithNewFileOpts{ Contents: getModMainSrc(name, depNames), }). WithNewFile("./dagger.json", dagger.ContainerWithNewFileOpts{ Contents: getModDaggerConfig(name, depNames), }) } return newModNames } // Create a base module, then add 6 layers of deps, where each layer has one more module // than the previous layer and each module within the layer has a dep on each module // from the previous layer. Finally add a single module at the top that depends on all // modules from the last layer and call that. // Basically, this creates a quadratically growing DAG of modules and verifies we // handle it efficiently enough to be callable. curDeps := addModulesWithDeps(1, nil) for i := 0; i < 6; i++ { curDeps = addModulesWithDeps(len(curDeps)+1, curDeps) } addModulesWithDeps(1, curDeps) _, err := modGen.With(daggerCall("fn")).Stdout(ctx) require.NoError(t, err) } func TestModuleNamespacing(t *testing.T) { t.Parallel() c, ctx := connect(t) moduleSrcPath, err := filepath.Abs("./testdata/modules/go/namespacing") require.NoError(t, err) ctr := c.Container().From(alpineImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithMountedDirectory("/work", c.Host().Directory(moduleSrcPath)). WithWorkdir("/work") out, err := ctr. With(daggerQuery(`{test{fn(s:"yo")}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"test":{"fn":"1:yo 2:yo"}}`, out) } func TestModuleRoots(t *testing.T) { t.Parallel() c, ctx := connect(t) moduleSrcPath, err := filepath.Abs("./testdata/modules/go/roots") require.NoError(t, err) entries, err := os.ReadDir(moduleSrcPath) require.NoError(t, err) ctr := c.Container().From(alpineImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithMountedDirectory("/work", c.Host().Directory(moduleSrcPath)) for _, entry := range entries { entry := entry t.Run(entry.Name(), func(t *testing.T) { t.Parallel() ctr := ctr.WithWorkdir("/work/" + entry.Name()) out, err := ctr. With(daggerQuery(fmt.Sprintf(`{%s{hello}}`, strcase.ToLowerCamel(entry.Name())))). Stdout(ctx) if strings.HasPrefix(entry.Name(), "good-") { require.NoError(t, err) require.JSONEq(t, fmt.Sprintf(`{"%s":{"hello": "hello"}}`, strcase.ToLowerCamel(entry.Name())), out) } else if strings.HasPrefix(entry.Name(), "bad-") { require.Error(t, err) require.Regexp(t, "is not under( module)? root", err.Error()) } }) } } func TestModuleDaggerCall(t *testing.T) { t.Parallel() c, ctx := connect(t) t.Run("service args", func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main import ( "context" ) type Test struct {} func (m *Test) Fn(ctx context.Context, svc *Service) (string, error) { return dag.Container().From("alpine:3.18").WithExec([]string{"apk", "add", "curl"}). WithServiceBinding("daserver", svc). WithExec([]string{"curl", "http://daserver:8000"}). Stdout(ctx) } `, }) logGen(ctx, t, modGen.Directory(".")) httpServer, _ := httpService(ctx, t, c, "im up") endpoint, err := httpServer.Endpoint(ctx) require.NoError(t, err) out, err := modGen. WithServiceBinding("testserver", httpServer). With(daggerCall("fn", "--svc", "tcp://"+endpoint)).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "im up") }) t.Run("list args", func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("foo.txt", dagger.ContainerWithNewFileOpts{ Contents: "bar", }). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main import ( "context" "strings" ) type Minimal struct {} func (m *Minimal) Hello(msgs []string) string { return strings.Join(msgs, "+") } func (m *Minimal) Reads(ctx context.Context, files []File) (string, error) { var contents []string for _, f := range files { content, err := f.Contents(ctx) if err != nil { return "", err } contents = append(contents, content) } return strings.Join(contents, "+"), nil } `, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerCall("hello", "--msgs", "yo", "--msgs", "my", "--msgs", "friend")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "yo+my+friend") out, err = modGen.With(daggerCall("reads", "--files=foo.txt", "--files=foo.txt")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "bar+bar") }) t.Run("return list objects", func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Minimal struct {} type Foo struct { Bar int ` + "`" + `json:"bar"` + "`" + ` } func (m *Minimal) Fn() []*Foo { var foos []*Foo for i := 0; i < 3; i++ { foos = append(foos, &Foo{Bar: i}) } return foos } `, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerCall("fn", "bar")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "0\n1\n2") }) t.Run("directory arg inputs", func(t *testing.T) { t.Parallel() t.Run("local dir", func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk=go")). WithNewFile("/dir/subdir/foo.txt", dagger.ContainerWithNewFileOpts{ Contents: "foo", }). WithNewFile("/dir/subdir/bar.txt", dagger.ContainerWithNewFileOpts{ Contents: "bar", }). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Test struct {} func (m *Test) Fn(dir *Directory) *Directory { return dir } `, }) out, err := modGen.With(daggerCall("fn", "--dir", "/dir/subdir")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "bar.txt\nfoo.txt") out, err = modGen.With(daggerCall("fn", "--dir", "file:///dir/subdir")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "bar.txt\nfoo.txt") }) t.Run("git dir", func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Test struct {} func (m *Test) Fn(dir *Directory, subpath Optional[string]) *Directory { return dir.Directory(subpath.GetOr(".")) } `, }) for _, tc := range []struct { baseURL string subpath string }{ { baseURL: "https://github.com/dagger/dagger", }, { baseURL: "https://github.com/dagger/dagger", subpath: ".changes", }, { baseURL: "https://github.com/dagger/dagger.git", }, { baseURL: "https://github.com/dagger/dagger.git", subpath: ".changes", }, } { tc := tc t.Run(fmt.Sprintf("%s:%s", tc.baseURL, tc.subpath), func(t *testing.T) { t.Parallel() url := tc.baseURL + "#v0.9.1" if tc.subpath != "" { url += ":" + tc.subpath } args := []string{"fn", "--dir", url} if tc.subpath == "" { args = append(args, "--subpath", ".changes") } out, err := modGen.With(daggerCall(args...)).Stdout(ctx) require.NoError(t, err) require.Contains(t, out, "v0.9.1.md") require.NotContains(t, out, "v0.9.2.md") }) } }) }) } func TestModuleGoSyncDeps(t *testing.T) { // verify that changes to deps result in a sync to the depender module t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/dep"). With(daggerExec("mod", "init", "--name=dep", "--sdk=go")). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=use", "--sdk=go")). WithNewFile("/work/dep/main.go", dagger.ContainerWithNewFileOpts{ Contents: useInner, }). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: useOuter, }). With(daggerExec("mod", "install", "./dep")) logGen(ctx, t, modGen.Directory(".")) modGen = modGen.With(daggerQuery(`{use{useHello}}`)) out, err := modGen.Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"use":{"useHello":"hello"}}`, out) newInner := strings.ReplaceAll(useInner, `"hello"`, `"goodbye"`) modGen = modGen. WithNewFile("/work/dep/main.go", dagger.ContainerWithNewFileOpts{ Contents: newInner, }). With(daggerExec("mod", "sync")) logGen(ctx, t, modGen.Directory(".")) out, err = modGen.With(daggerQuery(`{use{useHello}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"use":{"useHello":"goodbye"}}`, out) } func TestModuleLoops(t *testing.T) { // verify circular module dependencies result in an error t.Parallel() c, ctx := connect(t) _, err := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/depA"). With(daggerExec("mod", "init", "--name=depA", "--sdk=go", "--root=..")). WithWorkdir("/work/depB"). With(daggerExec("mod", "init", "--name=depB", "--sdk=go", "--root=..")). With(daggerExec("mod", "install", "../depA")). WithWorkdir("/work/depC"). With(daggerExec("mod", "init", "--name=depC", "--sdk=go", "--root=..")). With(daggerExec("mod", "install", "../depB")). WithWorkdir("/work/depA"). With(daggerExec("mod", "install", "../depC")). Sync(ctx) require.ErrorContains(t, err, "module depA has a circular dependency") } //go:embed testdata/modules/go/id/arg/main.go var badIDArgGoSrc string //go:embed testdata/modules/python/id/arg/src/main.py var badIDArgPySrc string //go:embed testdata/modules/go/id/field/main.go var badIDFieldGoSrc string //go:embed testdata/modules/go/id/fn/main.go var badIDFnGoSrc string //go:embed testdata/modules/python/id/fn/src/main.py var badIDFnPySrc string func TestModuleReservedWords(t *testing.T) { // verify disallowed names are rejected t.Parallel() c, ctx := connect(t) t.Run("id", func(t *testing.T) { t.Parallel() t.Run("arg", func(t *testing.T) { t.Parallel() t.Run("go", func(t *testing.T) { t.Parallel() _, err := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk=go")). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: badIDArgGoSrc, }). With(daggerQuery(`{test{fn(id:"no")}}`)). Sync(ctx) require.ErrorContains(t, err, "cannot define argument with reserved name \"id\"") }) t.Run("python", func(t *testing.T) { t.Parallel() _, err := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk=python")). WithNewFile("/work/src/main.py", dagger.ContainerWithNewFileOpts{ Contents: badIDArgPySrc, }). With(daggerQuery(`{test{fn(id:"no")}}`)). Sync(ctx) require.ErrorContains(t, err, "cannot define argument with reserved name \"id\"") }) }) t.Run("field", func(t *testing.T) { t.Parallel() t.Run("go", func(t *testing.T) { t.Parallel() _, err := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk=go")). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: badIDFieldGoSrc, }). With(daggerQuery(`{test{fn{id}}}`)). Sync(ctx) require.ErrorContains(t, err, "cannot define field with reserved name \"id\"") }) }) t.Run("fn", func(t *testing.T) { t.Parallel() t.Run("go", func(t *testing.T) { t.Parallel() _, err := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk=go")). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: badIDFnGoSrc, }). With(daggerQuery(`{test{id}}`)). Sync(ctx) require.ErrorContains(t, err, "cannot define function with reserved name \"id\"") }) t.Run("python", func(t *testing.T) { t.Parallel() _, err := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk=python")). WithNewFile("/work/src/main.py", dagger.ContainerWithNewFileOpts{ Contents: badIDFnPySrc, }). With(daggerQuery(`{test{fn(id:"no")}}`)). Sync(ctx) require.ErrorContains(t, err, "cannot define function with reserved name \"id\"") }) }) }) } func daggerExec(args ...string) dagger.WithContainerFunc { return func(c *dagger.Container) *dagger.Container { return c.WithExec(append([]string{"dagger", "--debug"}, args...), dagger.ContainerWithExecOpts{ ExperimentalPrivilegedNesting: true, }) } } func daggerQuery(query string, args ...any) dagger.WithContainerFunc { query = fmt.Sprintf(query, args...) return func(c *dagger.Container) *dagger.Container { return c.WithExec([]string{"dagger", "--debug", "query"}, dagger.ContainerWithExecOpts{ Stdin: query, ExperimentalPrivilegedNesting: true, }) } } func daggerCall(args ...string) dagger.WithContainerFunc { return func(c *dagger.Container) *dagger.Container { return c.WithExec(append([]string{"dagger", "--debug", "call"}, args...), dagger.ContainerWithExecOpts{ ExperimentalPrivilegedNesting: true, }) } } func daggerFunctions(args ...string) dagger.WithContainerFunc { return func(c *dagger.Container) *dagger.Container { return c.WithExec(append([]string{"dagger", "--debug", "functions"}, args...), dagger.ContainerWithExecOpts{ ExperimentalPrivilegedNesting: true, }) } } // command for a dagger cli call direct on the host func hostDaggerCommand(ctx context.Context, t testing.TB, workdir string, args ...string) *exec.Cmd { t.Helper() cmd := exec.CommandContext(ctx, daggerCliPath(t), args...) cmd.Dir = workdir return cmd } // runs a dagger cli command directly on the host, rather than in an exec func hostDaggerExec(ctx context.Context, t testing.TB, workdir string, args ...string) ([]byte, error) { t.Helper() cmd := hostDaggerCommand(ctx, t, workdir, args...) output, err := cmd.CombinedOutput() if err != nil { err = fmt.Errorf("%s: %w", string(output), err) } return output, err } func sdkSource(sdk, contents string) dagger.WithContainerFunc { return func(c *dagger.Container) *dagger.Container { var sourcePath string switch sdk { case "go": sourcePath = "main.go" case "python": sourcePath = "src/main.py" default: return c } return c.WithNewFile(sourcePath, dagger.ContainerWithNewFileOpts{ Contents: contents, }) } } func currentSchema(ctx context.Context, t *testing.T, ctr *dagger.Container) *introspection.Schema { t.Helper() out, err := ctr.With(daggerQuery(introspection.Query)).Stdout(ctx) require.NoError(t, err) var schemaResp introspection.Response err = json.Unmarshal([]byte(out), &schemaResp) require.NoError(t, err) return schemaResp.Schema } func goGitBase(t *testing.T, c *dagger.Client) *dagger.Container { t.Helper() return c.Container().From(golangImage). WithExec([]string{"apk", "add", "git"}). WithExec([]string{"git", "config", "--global", "user.email", "dagger@example.com"}). WithExec([]string{"git", "config", "--global", "user.name", "Dagger Tests"}). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithExec([]string{"git", "init"}) } func logGen(ctx context.Context, t *testing.T, modSrc *dagger.Directory) { t.Helper() generated, err := modSrc.File("dagger.gen.go").Contents(ctx) require.NoError(t, err) t.Cleanup(func() { t.Name() fileName := filepath.Join( os.TempDir(), t.Name(), fmt.Sprintf("dagger.gen.%d.go", time.Now().Unix()), ) if err := os.MkdirAll(filepath.Dir(fileName), 0o755); err != nil { t.Logf("failed to create temp dir for generated code: %v", err) return } if err := os.WriteFile(fileName, []byte(generated), 0644); err != nil { t.Logf("failed to write generated code to %s: %v", fileName, err) } else { t.Logf("wrote generated code to %s", fileName) } }) }
closed
dagger/dagger
https://github.com/dagger/dagger
6,252
🐞 Module constructor returns pointer for empty object instead of returning nil for *Directory type
### What is the issue? When I created a module constructor with `// +optional=true` missing flag returned a pointer of the empty object instead of nil. Example Code: ```go package main func New( // +optional=true src *Directory, ) *A { return &A{Src: src} } type A struct { Src *Directory } func (m *A) IsEmpty() bool { return m.Src == nil } ``` ### Log output ```shell dagger call is-empty ✔ dagger call is-empty [1.38s] ┃ false • Cloud URL: https://dagger.cloud/runs/6ed9327f-a4e3-4257-9864-87733b642a5f • Engine: 64fae4326b32 (version v0.9.4) ⧗ 2.79s ✔ 31 ∅ 7 ``` ### Steps to reproduce The code from example can be used for reproducing the issue. ### SDK version GO SDK v0.9.4 ### OS version macOS 14.0 cc: @jedevc
https://github.com/dagger/dagger/issues/6252
https://github.com/dagger/dagger/pull/6257
fd8922f8b964be83bd3fed1490fda114641ac480
3b82755058493c63d399bf095b1c3c4b4eba2834
"2023-12-11T16:59:25Z"
go
"2023-12-13T11:16:00Z"
core/schema/coremod.go
package schema import ( "context" "fmt" "github.com/dagger/dagger/core" "github.com/opencontainers/go-digest" ) // CoreMod is a special implementation of Mod for our core API, which is not *technically* a true module yet // but can be treated as one in terms of dependencies. It has no dependencies itself and is currently an // implicit dependency of every user module. type CoreMod struct { compiledSchema *CompiledSchema introspectionJSON string } var _ Mod = (*CoreMod)(nil) func (m *CoreMod) Name() string { return coreModuleName } func (m *CoreMod) DagDigest() digest.Digest { // core is always a leaf, so we just return a static digest return digest.FromString(coreModuleName) } func (m *CoreMod) Dependencies() []Mod { return nil } func (m *CoreMod) Schema(_ context.Context) ([]SchemaResolvers, error) { return []SchemaResolvers{m.compiledSchema.SchemaResolvers}, nil } func (m *CoreMod) SchemaIntrospectionJSON(_ context.Context) (string, error) { return m.introspectionJSON, nil } func (m *CoreMod) ModTypeFor(ctx context.Context, typeDef *core.TypeDef, checkDirectDeps bool) (ModType, bool, error) { switch typeDef.Kind { case core.TypeDefKindString, core.TypeDefKindInteger, core.TypeDefKindBoolean, core.TypeDefKindVoid: return &PrimitiveType{}, true, nil case core.TypeDefKindList: underlyingType, ok, err := m.ModTypeFor(ctx, typeDef.AsList.ElementTypeDef, checkDirectDeps) if err != nil { return nil, false, fmt.Errorf("failed to get underlying type: %w", err) } if !ok { return nil, false, nil } return &ListType{underlying: underlyingType}, true, nil case core.TypeDefKindObject: typeName := gqlObjectName(typeDef.AsObject.Name) resolver, ok := m.compiledSchema.Resolvers()[typeName] if !ok { return nil, false, nil } idableResolver, ok := resolver.(IDableObjectResolver) if !ok { return nil, false, nil } return &CoreModObject{coreMod: m, resolver: idableResolver}, true, nil default: return nil, false, fmt.Errorf("unexpected type def kind %s", typeDef.Kind) } } // CoreModObject represents objects from core (Container, Directory, etc.) type CoreModObject struct { coreMod *CoreMod resolver IDableObjectResolver } var _ ModType = (*CoreModObject)(nil) func (obj *CoreModObject) ConvertFromSDKResult(_ context.Context, value any) (any, error) { if value == nil { return nil, nil } id, ok := value.(string) if !ok { return value, nil } return obj.resolver.FromID(id) } func (obj *CoreModObject) ConvertToSDKInput(ctx context.Context, value any) (any, error) { return obj.resolver.ToID(value) } func (obj *CoreModObject) SourceMod() Mod { return obj.coreMod }
closed
dagger/dagger
https://github.com/dagger/dagger
6,252
🐞 Module constructor returns pointer for empty object instead of returning nil for *Directory type
### What is the issue? When I created a module constructor with `// +optional=true` missing flag returned a pointer of the empty object instead of nil. Example Code: ```go package main func New( // +optional=true src *Directory, ) *A { return &A{Src: src} } type A struct { Src *Directory } func (m *A) IsEmpty() bool { return m.Src == nil } ``` ### Log output ```shell dagger call is-empty ✔ dagger call is-empty [1.38s] ┃ false • Cloud URL: https://dagger.cloud/runs/6ed9327f-a4e3-4257-9864-87733b642a5f • Engine: 64fae4326b32 (version v0.9.4) ⧗ 2.79s ✔ 31 ∅ 7 ``` ### Steps to reproduce The code from example can be used for reproducing the issue. ### SDK version GO SDK v0.9.4 ### OS version macOS 14.0 cc: @jedevc
https://github.com/dagger/dagger/issues/6252
https://github.com/dagger/dagger/pull/6257
fd8922f8b964be83bd3fed1490fda114641ac480
3b82755058493c63d399bf095b1c3c4b4eba2834
"2023-12-11T16:59:25Z"
go
"2023-12-13T11:16:00Z"
core/schema/usermod.go
package schema import ( "bytes" "context" "fmt" "sync" "github.com/dagger/dagger/core" "github.com/dagger/dagger/core/resourceid" "github.com/dagger/graphql" "github.com/moby/buildkit/util/bklog" "github.com/opencontainers/go-digest" "github.com/vektah/gqlparser/v2/ast" "github.com/vektah/gqlparser/v2/formatter" ) /* A user defined module loaded into this server's DAG. */ type UserMod struct { api *APIServer metadata *core.Module deps *ModDeps sdk SDK dagDigest digest.Digest // should not be read directly, call m.Objects() instead lazilyLoadedObjects []*UserModObject loadObjectsErr error loadObjectsLock sync.Mutex } var _ Mod = (*UserMod)(nil) func newUserMod(api *APIServer, modMeta *core.Module, deps *ModDeps, sdk SDK) (*UserMod, error) { selfDigest, err := modMeta.BaseDigest() if err != nil { return nil, fmt.Errorf("failed to get module digest: %w", err) } dagDigest := digest.FromString(selfDigest.String() + " " + deps.DagDigest().String()) m := &UserMod{ api: api, metadata: modMeta, deps: deps, sdk: sdk, dagDigest: dagDigest, } return m, nil } func (m *UserMod) Name() string { return m.metadata.Name } func (m *UserMod) DagDigest() digest.Digest { return m.dagDigest } func (m *UserMod) Dependencies() []Mod { return m.deps.mods } func (m *UserMod) Codegen(ctx context.Context) (*core.GeneratedCode, error) { return m.sdk.Codegen(ctx, m) } func (m *UserMod) Runtime(ctx context.Context) (*core.Container, error) { return m.sdk.Runtime(ctx, m) } // The objects defined by this module, with namespacing applied func (m *UserMod) Objects(ctx context.Context) (loadedObjects []*UserModObject, rerr error) { m.loadObjectsLock.Lock() defer m.loadObjectsLock.Unlock() if len(m.lazilyLoadedObjects) > 0 { return m.lazilyLoadedObjects, nil } if m.loadObjectsErr != nil { return nil, m.loadObjectsErr } defer func() { m.lazilyLoadedObjects = loadedObjects m.loadObjectsErr = rerr }() runtime, err := m.Runtime(ctx) if err != nil { return nil, fmt.Errorf("failed to get module runtime: %w", err) } // construct a special function with no object or function name, which tells the SDK to return the module's definition // (in terms of objects, fields and functions) getModDefFn, err := newModFunction(ctx, m, nil, runtime, core.NewFunction("", &core.TypeDef{ Kind: core.TypeDefKindObject, AsObject: core.NewObjectTypeDef("Module", ""), })) if err != nil { return nil, fmt.Errorf("failed to create module definition function for module %q: %w", m.Name(), err) } result, err := getModDefFn.Call(ctx, &CallOpts{Cache: true, SkipSelfSchema: true}) if err != nil { return nil, fmt.Errorf("failed to call module %q to get functions: %w", m.Name(), err) } modMeta, ok := result.(*core.Module) if !ok { return nil, fmt.Errorf("expected Module result, got %T", result) } objs := make([]*UserModObject, 0, len(modMeta.Objects)) for _, objTypeDef := range modMeta.Objects { if err := m.validateTypeDef(ctx, objTypeDef); err != nil { return nil, fmt.Errorf("failed to validate type def: %w", err) } if err := m.namespaceTypeDef(ctx, objTypeDef); err != nil { return nil, fmt.Errorf("failed to namespace type def: %w", err) } obj, err := newModObject(ctx, m, objTypeDef) if err != nil { return nil, fmt.Errorf("failed to create object: %w", err) } objs = append(objs, obj) } return objs, nil } func (m *UserMod) ModTypeFor(ctx context.Context, typeDef *core.TypeDef, checkDirectDeps bool) (ModType, bool, error) { switch typeDef.Kind { case core.TypeDefKindString, core.TypeDefKindInteger, core.TypeDefKindBoolean, core.TypeDefKindVoid: return &PrimitiveType{}, true, nil case core.TypeDefKindList: underlyingType, ok, err := m.ModTypeFor(ctx, typeDef.AsList.ElementTypeDef, checkDirectDeps) if err != nil { return nil, false, fmt.Errorf("failed to get underlying type: %w", err) } if !ok { return nil, false, nil } return &ListType{underlying: underlyingType}, true, nil case core.TypeDefKindObject: if checkDirectDeps { // check to see if this is from a *direct* dependency depType, ok, err := m.deps.ModTypeFor(ctx, typeDef) if err != nil { return nil, false, fmt.Errorf("failed to get type from dependency: %w", err) } if ok { return depType, true, nil } } // otherwise it must be from this module objs, err := m.Objects(ctx) if err != nil { return nil, false, err } for _, obj := range objs { if obj.typeDef.AsObject.Name == typeDef.AsObject.Name { return obj, true, nil } } return nil, false, nil default: return nil, false, fmt.Errorf("unexpected type def kind %s", typeDef.Kind) } } func (m *UserMod) MainModuleObject(ctx context.Context) (*UserModObject, error) { objs, err := m.Objects(ctx) if err != nil { return nil, err } for _, obj := range objs { if obj.typeDef.AsObject.Name == gqlObjectName(m.metadata.Name) { return obj, nil } } return nil, fmt.Errorf("failed to find main module object %q", m.metadata.Name) } func (m *UserMod) Schema(ctx context.Context) ([]SchemaResolvers, error) { ctx = bklog.WithLogger(ctx, bklog.G(ctx).WithField("module", m.Name())) bklog.G(ctx).Debug("getting module schema") objs, err := m.Objects(ctx) if err != nil { return nil, err } schemas := make([]SchemaResolvers, 0, len(objs)) for _, obj := range objs { objSchemaDoc, objResolvers, err := obj.Schema(ctx) if err != nil { return nil, err } buf := &bytes.Buffer{} formatter.NewFormatter(buf).FormatSchemaDocument(objSchemaDoc) typeSchemaStr := buf.String() schema := StaticSchema(StaticSchemaParams{ Name: fmt.Sprintf("%s.%s", m.metadata.Name, obj.typeDef.AsObject.Name), Schema: typeSchemaStr, Resolvers: objResolvers, }) schemas = append(schemas, schema) } return schemas, nil } func (m *UserMod) SchemaIntrospectionJSON(ctx context.Context) (string, error) { return m.deps.SchemaIntrospectionJSON(ctx) } // verify the typedef is has no reserved names func (m *UserMod) validateTypeDef(ctx context.Context, typeDef *core.TypeDef) error { switch typeDef.Kind { case core.TypeDefKindList: return m.validateTypeDef(ctx, typeDef.AsList.ElementTypeDef) case core.TypeDefKindObject: obj := typeDef.AsObject // check whether this is a pre-existing object from core or another module modType, ok, err := m.deps.ModTypeFor(ctx, typeDef) if err != nil { return fmt.Errorf("failed to get mod type for type def: %w", err) } if ok { if sourceMod := modType.SourceMod(); sourceMod != nil && sourceMod.DagDigest() != m.DagDigest() { // already validated, skip return nil } } for _, field := range obj.Fields { if gqlFieldName(field.Name) == "id" { return fmt.Errorf("cannot define field with reserved name %q on object %q", field.Name, obj.Name) } if err := m.validateTypeDef(ctx, field.TypeDef); err != nil { return err } } for _, fn := range obj.Functions { if gqlFieldName(fn.Name) == "id" { return fmt.Errorf("cannot define function with reserved name %q on object %q", fn.Name, obj.Name) } if err := m.validateTypeDef(ctx, fn.ReturnType); err != nil { return err } for _, arg := range fn.Args { if gqlArgName(arg.Name) == "id" { return fmt.Errorf("cannot define argument with reserved name %q on function %q", arg.Name, fn.Name) } if err := m.validateTypeDef(ctx, arg.TypeDef); err != nil { return err } } } } return nil } // prefix the given typedef (and any recursively referenced typedefs) with this module's name for any objects func (m *UserMod) namespaceTypeDef(ctx context.Context, typeDef *core.TypeDef) error { switch typeDef.Kind { case core.TypeDefKindList: if err := m.namespaceTypeDef(ctx, typeDef.AsList.ElementTypeDef); err != nil { return err } case core.TypeDefKindObject: obj := typeDef.AsObject // only namespace objects defined in this module _, ok, err := m.deps.ModTypeFor(ctx, typeDef) if err != nil { return fmt.Errorf("failed to get mod type for type def: %w", err) } if !ok { obj.Name = namespaceObject(obj.Name, m.metadata.Name) } for _, field := range obj.Fields { if err := m.namespaceTypeDef(ctx, field.TypeDef); err != nil { return err } } for _, fn := range obj.Functions { if err := m.namespaceTypeDef(ctx, fn.ReturnType); err != nil { return err } for _, arg := range fn.Args { if err := m.namespaceTypeDef(ctx, arg.TypeDef); err != nil { return err } } } } return nil } // UserModObject is an object defined by a user module type UserModObject struct { api *APIServer mod *UserMod // the type def metadata, with namespacing already applied typeDef *core.TypeDef // should not be read directly, call Fields() and Functions() instead lazyLoadedFields []*UserModField lazyLoadedFunctions []*UserModFunction loadErr error loadLock sync.Mutex } var _ ModType = (*UserModObject)(nil) func newModObject(ctx context.Context, mod *UserMod, typeDef *core.TypeDef) (*UserModObject, error) { if typeDef.Kind != core.TypeDefKindObject { return nil, fmt.Errorf("expected object type def, got %s", typeDef.Kind) } obj := &UserModObject{ api: mod.api, mod: mod, typeDef: typeDef, } return obj, nil } func (obj *UserModObject) TypeDef() *core.TypeDef { return obj.typeDef } func (obj *UserModObject) ConvertFromSDKResult(ctx context.Context, value any) (any, error) { if value == nil { return nil, nil } switch value := value.(type) { case string: decodedMap, err := resourceid.DecodeModuleID(value, obj.typeDef.AsObject.Name) if err != nil { return nil, fmt.Errorf("failed to decode module id: %w", err) } return obj.ConvertFromSDKResult(ctx, decodedMap) case map[string]any: for k, v := range value { normalizedName := gqlFieldName(k) field, ok, err := obj.FieldByName(ctx, normalizedName) if err != nil { return nil, fmt.Errorf("failed to get field %q: %w", k, err) } if !ok { continue } delete(value, k) value[normalizedName], err = field.modType.ConvertFromSDKResult(ctx, v) if err != nil { return nil, fmt.Errorf("failed to convert field %q: %w", k, err) } } return value, nil default: return nil, fmt.Errorf("unexpected result value type %T for object %q", value, obj.typeDef.AsObject.Name) } } func (obj *UserModObject) ConvertToSDKInput(ctx context.Context, value any) (any, error) { if value == nil { return nil, nil } // NOTE: user mod objects are currently only passed as inputs to the module they originate from; modules // can't have inputs/outputs from other modules (other than core). These objects are also passed as their // direct json serialization rather than as an ID (so that SDKs can decode them without needing to make // calls to their own API). switch value := value.(type) { case string: return resourceid.DecodeModuleID(value, obj.typeDef.AsObject.Name) case map[string]any: for k, v := range value { normalizedName := gqlFieldName(k) field, ok, err := obj.FieldByName(ctx, normalizedName) if err != nil { return nil, fmt.Errorf("failed to get field %q: %w", k, err) } if !ok { continue } value[k], err = field.modType.ConvertToSDKInput(ctx, v) if err != nil { return nil, fmt.Errorf("failed to convert field %q: %w", k, err) } } return value, nil default: return nil, fmt.Errorf("unexpected input value type %T for object %q", value, obj.typeDef.AsObject.Name) } } func (obj *UserModObject) SourceMod() Mod { return obj.mod } func (obj *UserModObject) Fields(ctx context.Context) ([]*UserModField, error) { fields, _, err := obj.loadFieldsAndFunctions(ctx) if err != nil { return nil, err } return fields, nil } func (obj *UserModObject) Functions(ctx context.Context) ([]*UserModFunction, error) { _, functions, err := obj.loadFieldsAndFunctions(ctx) if err != nil { return nil, err } return functions, nil } func (obj *UserModObject) loadFieldsAndFunctions(ctx context.Context) ( loadedFields []*UserModField, loadedFunctions []*UserModFunction, rerr error, ) { obj.loadLock.Lock() defer obj.loadLock.Unlock() if len(obj.lazyLoadedFields) > 0 || len(obj.lazyLoadedFunctions) > 0 { return obj.lazyLoadedFields, obj.lazyLoadedFunctions, nil } if obj.loadErr != nil { return nil, nil, obj.loadErr } defer func() { obj.lazyLoadedFields = loadedFields obj.lazyLoadedFunctions = loadedFunctions obj.loadErr = rerr }() runtime, err := obj.mod.Runtime(ctx) if err != nil { return nil, nil, fmt.Errorf("failed to get module runtime: %w", err) } for _, fieldTypeDef := range obj.typeDef.AsObject.Fields { modField, err := newModField(ctx, obj, fieldTypeDef) if err != nil { return nil, nil, fmt.Errorf("failed to create field: %w", err) } loadedFields = append(loadedFields, modField) } for _, fn := range obj.typeDef.AsObject.Functions { modFunction, err := newModFunction(ctx, obj.mod, obj, runtime, fn) if err != nil { return nil, nil, fmt.Errorf("failed to create function: %w", err) } loadedFunctions = append(loadedFunctions, modFunction) } return loadedFields, loadedFunctions, nil } func (obj *UserModObject) FieldByName(ctx context.Context, name string) (*UserModField, bool, error) { fields, _, err := obj.loadFieldsAndFunctions(ctx) if err != nil { return nil, false, err } name = gqlFieldName(name) for _, f := range fields { if gqlFieldName(f.metadata.Name) == name { return f, true, nil } } return nil, false, nil } func (obj *UserModObject) FunctionByName(ctx context.Context, name string) (*UserModFunction, bool, error) { _, functions, err := obj.loadFieldsAndFunctions(ctx) if err != nil { return nil, false, err } name = gqlFieldName(name) for _, fn := range functions { if gqlFieldName(fn.metadata.Name) == name { return fn, true, nil } } return nil, false, nil } func (obj *UserModObject) Schema(ctx context.Context) (*ast.SchemaDocument, Resolvers, error) { ctx = bklog.WithLogger(ctx, bklog.G(ctx).WithField("object", obj.typeDef.AsObject.Name)) bklog.G(ctx).Debug("getting object schema") fields, functions, err := obj.loadFieldsAndFunctions(ctx) if err != nil { return nil, nil, err } typeSchemaDoc := &ast.SchemaDocument{} queryResolver := ObjectResolver{} typeSchemaResolvers := Resolvers{ "Query": queryResolver, } objTypeDef := obj.typeDef.AsObject objName := gqlObjectName(objTypeDef.Name) // get the schema + resolvers for the object as a whole objASTType, err := typeDefToASTType(obj.typeDef, false) if err != nil { return nil, nil, fmt.Errorf("failed to convert object to schema: %w", err) } // check whether this is a pre-existing object from a dependency module modType, ok, err := obj.mod.deps.ModTypeFor(ctx, obj.typeDef) if err != nil { return nil, nil, fmt.Errorf("failed to get mod type for type def: %w", err) } if ok { if sourceMod := modType.SourceMod(); sourceMod != nil && sourceMod.DagDigest() != obj.mod.DagDigest() { // modules can reference types from core/other modules as types, but they // can't attach any new fields or functions to them if len(objTypeDef.Fields) > 0 || len(objTypeDef.Functions) > 0 { return nil, nil, fmt.Errorf("cannot attach new fields or functions to object %q from outside module", objName) } return nil, nil, nil } } astDef := &ast.Definition{ Name: objName, Description: formatGqlDescription(objTypeDef.Description), Kind: ast.Object, } astIDDef := &ast.Definition{ Name: objName + "ID", Description: formatGqlDescription("%s identifier", objName), Kind: ast.Scalar, } astLoadDef := &ast.FieldDefinition{ Name: fmt.Sprintf("load%sFromID", objName), Description: formatGqlDescription("Loads a %s from an ID", objName), Arguments: ast.ArgumentDefinitionList{ &ast.ArgumentDefinition{ Name: "id", Type: ast.NonNullNamedType(objName+"ID", nil), }, }, Type: ast.NonNullNamedType(objName, nil), } newObjResolver := ObjectResolver{} astDef.Fields = append(astDef.Fields, &ast.FieldDefinition{ Name: "id", Description: formatGqlDescription("A unique identifier for a %s", objName), Type: ast.NonNullNamedType(objName+"ID", nil), }) newObjResolver["id"] = func(p graphql.ResolveParams) (any, error) { return resourceid.EncodeModule(objName, p.Source) } for _, field := range fields { fieldDef, resolver, err := field.Schema(ctx) if err != nil { return nil, nil, err } astDef.Fields = append(astDef.Fields, fieldDef) newObjResolver[fieldDef.Name] = resolver } for _, fn := range functions { fieldDef, resolver, err := fn.Schema(ctx) if err != nil { return nil, nil, err } astDef.Fields = append(astDef.Fields, fieldDef) newObjResolver[fieldDef.Name] = resolver } if len(newObjResolver) > 0 { typeSchemaResolvers[objName] = newObjResolver typeSchemaResolvers[objName+"ID"] = stringResolver[string]() queryResolver[fmt.Sprintf("load%sFromID", objName)] = func(p graphql.ResolveParams) (any, error) { return obj.ConvertFromSDKResult(ctx, p.Args["id"]) } } // handle object constructor var constructorFieldDef *ast.FieldDefinition var constructorResolver graphql.FieldResolveFn isMainModuleObject := objName == gqlObjectName(obj.mod.metadata.Name) if isMainModuleObject { constructorFieldDef = &ast.FieldDefinition{ Name: gqlFieldName(objName), Description: formatGqlDescription(objTypeDef.Description), Type: objASTType, } if objTypeDef.Constructor != nil { // use explicit user-defined constructor if provided fnTypeDef := objTypeDef.Constructor if fnTypeDef.ReturnType.Kind != core.TypeDefKindObject { return nil, nil, fmt.Errorf("constructor function for object %s must return that object", objTypeDef.OriginalName) } if fnTypeDef.ReturnType.AsObject.OriginalName != objTypeDef.OriginalName { return nil, nil, fmt.Errorf("constructor function for object %s must return that object", objTypeDef.OriginalName) } runtime, err := obj.mod.Runtime(ctx) if err != nil { return nil, nil, fmt.Errorf("failed to get module runtime: %w", err) } fn, err := newModFunction(ctx, obj.mod, obj, runtime, fnTypeDef) if err != nil { return nil, nil, fmt.Errorf("failed to create function: %w", err) } fieldDef, resolver, err := fn.Schema(ctx) if err != nil { return nil, nil, fmt.Errorf("failed to get schema for constructor function: %w", err) } constructorFieldDef.Arguments = fieldDef.Arguments constructorResolver = resolver } else { // otherwise default to a simple field with no args that returns an initially empty object constructorResolver = PassthroughResolver } typeSchemaDoc.Extensions = append(typeSchemaDoc.Extensions, &ast.Definition{ Name: "Query", Kind: ast.Object, Fields: ast.FieldList{constructorFieldDef}, }) queryResolver[constructorFieldDef.Name] = constructorResolver } if len(astDef.Fields) > 0 || constructorFieldDef != nil { typeSchemaDoc.Definitions = append(typeSchemaDoc.Definitions, astDef, astIDDef) typeSchemaDoc.Extensions = append(typeSchemaDoc.Extensions, &ast.Definition{ Name: "Query", Kind: ast.Object, Fields: ast.FieldList{astLoadDef}, }) } return typeSchemaDoc, typeSchemaResolvers, nil } type UserModField struct { obj *UserModObject metadata *core.FieldTypeDef modType ModType } func newModField(ctx context.Context, obj *UserModObject, metadata *core.FieldTypeDef) (*UserModField, error) { modType, ok, err := obj.mod.ModTypeFor(ctx, metadata.TypeDef, true) if err != nil { return nil, fmt.Errorf("failed to get mod type for field %q: %w", metadata.Name, err) } if !ok { return nil, fmt.Errorf("failed to get mod type for field %q", metadata.Name) } return &UserModField{ obj: obj, metadata: metadata, modType: modType, }, nil } func (f *UserModField) Schema(ctx context.Context) (*ast.FieldDefinition, graphql.FieldResolveFn, error) { typeDef := f.metadata.TypeDef fieldASTType, err := typeDefToASTType(typeDef, false) if err != nil { return nil, nil, err } // Check if this is a type from another (non-core) module, which is currently not allowed sourceMod := f.modType.SourceMod() if sourceMod != nil && sourceMod.Name() != coreModuleName && sourceMod.DagDigest() != f.obj.mod.DagDigest() { return nil, nil, fmt.Errorf("object %q field %q cannot reference external type from dependency module %q", f.obj.typeDef.AsObject.OriginalName, f.metadata.OriginalName, sourceMod.Name(), ) } fieldDef := &ast.FieldDefinition{ Name: f.metadata.Name, Description: formatGqlDescription(f.metadata.Description), Type: fieldASTType, } return fieldDef, func(p graphql.ResolveParams) (any, error) { res, err := graphql.DefaultResolveFn(p) if err != nil { return nil, err } return f.modType.ConvertFromSDKResult(ctx, res) }, nil }
closed
dagger/dagger
https://github.com/dagger/dagger
6,066
dagger mod publish should switch to `PUT /crawl` instead of `GET /crawl`
There has been a recent change - 7pm GMT on Nov. 5, 2023 - in the <https://daggerverse.dev> route that publishes a module. It used to be `GET /crawl`. It is not `PUT /crawl`. This private PR has more details: https://github.com/dagger/dagger.io/pull/3058#issuecomment-1793819422 This is a reminder that we need to change the route that `dagger mod publish` uses & also cut a new release. As a temporary workaround publish directly from <https://daggerverse.dev> instead. I will be travelling & will not have internet for the next 10 hours. Unless someone else doesn't beat me to it - @vito @sipsma @jedevc @helderco @marcosnils @aluzzardi - I will look into this when I get on the other side. 🛫
https://github.com/dagger/dagger/issues/6066
https://github.com/dagger/dagger/pull/6274
4d96689943afb13c23f5984dbe19e7967c912a7d
d63f3fb2f14314206d748a25a95abf8e9731bd52
"2023-11-06T11:07:55Z"
go
"2023-12-15T21:29:50Z"
cmd/dagger/module.go
package main import ( "context" "encoding/json" "fmt" "net/http" "net/url" "os" "path" "path/filepath" "strings" "dagger.io/dagger" "github.com/dagger/dagger/core/modules" "github.com/dagger/dagger/engine/client" "github.com/go-git/go-git/v5" "github.com/iancoleman/strcase" "github.com/moby/buildkit/util/gitutil" "github.com/spf13/cobra" "github.com/spf13/pflag" "github.com/vito/progrock" ) var ( moduleURL string moduleFlags = pflag.NewFlagSet("module", pflag.ContinueOnError) sdk string licenseID string moduleName string moduleRoot string force bool ) const ( moduleURLDefault = "." ) func init() { moduleFlags.StringVarP(&moduleURL, "mod", "m", "", "Path to dagger.json config file for the module or a directory containing that file. Either local path (e.g. \"/path/to/some/dir\") or a github repo (e.g. \"github.com/dagger/dagger/path/to/some/subdir\").") moduleFlags.BoolVar(&focus, "focus", true, "Only show output for focused commands.") moduleCmd.PersistentFlags().AddFlagSet(moduleFlags) listenCmd.PersistentFlags().AddFlagSet(moduleFlags) queryCmd.PersistentFlags().AddFlagSet(moduleFlags) funcCmds.AddFlagSet(moduleFlags) moduleInitCmd.PersistentFlags().StringVar(&sdk, "sdk", "", "SDK name or image ref to use for the module") moduleInitCmd.MarkPersistentFlagRequired("sdk") moduleInitCmd.PersistentFlags().StringVar(&moduleName, "name", "", "Name of the new module") moduleInitCmd.MarkPersistentFlagRequired("name") moduleInitCmd.PersistentFlags().StringVar(&licenseID, "license", "", "License identifier to generate - see https://spdx.org/licenses/") moduleInitCmd.PersistentFlags().StringVarP(&moduleRoot, "root", "", "", "Root directory that should be loaded for the full module context. Defaults to the parent directory containing dagger.json.") modulePublishCmd.PersistentFlags().BoolVarP(&force, "force", "f", false, "Force publish even if the git repository is not clean.") // also include codegen flags since codegen will run on module init moduleCmd.AddCommand(moduleInitCmd) moduleCmd.AddCommand(moduleInstallCmd) moduleCmd.AddCommand(moduleSyncCmd) moduleCmd.AddCommand(modulePublishCmd) } var moduleCmd = &cobra.Command{ Use: "module", Aliases: []string{"mod"}, Short: "Manage dagger modules", Long: "Manage dagger modules. By default, print the configuration of the specified module in json format.", Hidden: true, // for now, remove once we're ready for primetime RunE: func(cmd *cobra.Command, args []string) error { ctx := cmd.Context() return withEngineAndTUI(ctx, client.Params{}, func(ctx context.Context, engineClient *client.Client) (err error) { mod, _, err := getModuleRef(ctx, engineClient.Dagger()) if err != nil { return fmt.Errorf("failed to get module: %w", err) } var cfg *modules.Config switch { case mod.Local: cfg, err = mod.Config(ctx, nil) if err != nil { return fmt.Errorf("failed to get local module config: %w", err) } case mod.Git != nil: rec := progrock.FromContext(ctx) vtx := rec.Vertex("get-mod-config", strings.Join(os.Args, " ")) defer func() { vtx.Done(err) }() readConfigTask := vtx.Task("reading git module config") cfg, err = mod.Config(ctx, engineClient.Dagger()) readConfigTask.Done(err) if err != nil { return fmt.Errorf("failed to get git module config: %w", err) } } cfgBytes, err := json.MarshalIndent(cfg, "", " ") if err != nil { return fmt.Errorf("failed to marshal module config: %w", err) } cmd.Println(string(cfgBytes)) return nil }) }, } var moduleInitCmd = &cobra.Command{ Use: "init", Short: "Initialize a new dagger module in a local directory.", Hidden: false, RunE: func(cmd *cobra.Command, _ []string) (rerr error) { ctx := cmd.Context() return withEngineAndTUI(ctx, client.Params{}, func(ctx context.Context, engineClient *client.Client) (err error) { dag := engineClient.Dagger() ref, _, err := getModuleRef(ctx, dag) if err != nil { return fmt.Errorf("failed to get module: %w", err) } moduleDir, err := ref.LocalSourcePath() if err != nil { return fmt.Errorf("module init is only supported for local modules") } if _, err := ref.Config(ctx, nil); err == nil { return fmt.Errorf("module init config path already exists: %s", ref.Path) } if err := findOrCreateLicense(ctx, moduleDir); err != nil { return err } cfg := modules.NewConfig(moduleName, sdk, moduleRoot) return updateModuleConfig(ctx, dag, moduleDir, ref, cfg, cmd) }) }, } var moduleInstallCmd = &cobra.Command{ Use: "install", Aliases: []string{"use"}, Short: "Add a new dependency to a dagger module", Hidden: false, RunE: func(cmd *cobra.Command, extraArgs []string) (rerr error) { ctx := cmd.Context() return withEngineAndTUI(ctx, client.Params{}, func(ctx context.Context, engineClient *client.Client) (err error) { dag := engineClient.Dagger() ref, _, err := getModuleRef(ctx, dag) if err != nil { return fmt.Errorf("failed to get module: %w", err) } moduleDir, err := ref.LocalSourcePath() if err != nil { return fmt.Errorf("module use is only supported for local modules") } modCfg, err := ref.Config(ctx, dag) if err != nil { return fmt.Errorf("failed to get module config: %w", err) } if err := modCfg.Use(ctx, dag, ref, extraArgs...); err != nil { return fmt.Errorf("failed to add module dependency: %w", err) } return updateModuleConfig(ctx, dag, moduleDir, ref, modCfg, cmd) }) }, } var moduleSyncCmd = &cobra.Command{ Use: "sync", Short: "Synchronize a dagger module with the latest version of its extensions", Hidden: false, RunE: func(cmd *cobra.Command, extraArgs []string) (rerr error) { ctx := cmd.Context() return withEngineAndTUI(ctx, client.Params{}, func(ctx context.Context, engineClient *client.Client) (err error) { dag := engineClient.Dagger() ref, _, err := getModuleRef(ctx, dag) if err != nil { return fmt.Errorf("failed to get module: %w", err) } moduleDir, err := ref.LocalSourcePath() if err != nil { return fmt.Errorf("module sync is only supported for local modules") } modCfg, err := ref.Config(ctx, dag) if err != nil { return fmt.Errorf("failed to get module config: %w", err) } return updateModuleConfig(ctx, dag, moduleDir, ref, modCfg, cmd) }) }, } const daDaggerverse = "https://daggerverse.dev" var modulePublishCmd = &cobra.Command{ Use: "publish", Short: fmt.Sprintf("Publish your module to The Daggerverse (%s)", daDaggerverse), Hidden: false, RunE: func(cmd *cobra.Command, extraArgs []string) (rerr error) { ctx := cmd.Context() return withEngineAndTUI(ctx, client.Params{}, func(ctx context.Context, engineClient *client.Client) (err error) { rec := progrock.FromContext(ctx) vtx := rec.Vertex("publish", strings.Join(os.Args, " "), progrock.Focused()) defer func() { vtx.Done(err) }() cmd.SetOut(vtx.Stdout()) cmd.SetErr(vtx.Stderr()) dag := engineClient.Dagger() ref, _, err := getModuleRef(ctx, dag) if err != nil { return fmt.Errorf("failed to get module: %w", err) } moduleDir, err := ref.LocalSourcePath() if err != nil { return fmt.Errorf("module publish is only supported for local modules") } repo, err := git.PlainOpenWithOptions(moduleDir, &git.PlainOpenOptions{ DetectDotGit: true, }) if err != nil { return fmt.Errorf("failed to open git repo: %w", err) } wt, err := repo.Worktree() if err != nil { return fmt.Errorf("failed to get git worktree: %w", err) } st, err := wt.Status() if err != nil { return fmt.Errorf("failed to get git status: %w", err) } head, err := repo.Head() if err != nil { return fmt.Errorf("failed to get git HEAD: %w", err) } commit := head.Hash() rec.Debug("git commit", progrock.Labelf("commit", commit.String())) orig, err := repo.Remote("origin") if err != nil { return fmt.Errorf("failed to get git remote: %w", err) } refPath, err := originToPath(orig.Config().URLs[0]) if err != nil { return fmt.Errorf("failed to get module path: %w", err) } // calculate path relative to repo root gitRoot := wt.Filesystem.Root() absModDir, err := filepath.Abs(moduleDir) if err != nil { return fmt.Errorf("failed to get absolute module dir: %w", err) } pathFromRoot, err := filepath.Rel(gitRoot, absModDir) if err != nil { return fmt.Errorf("failed to get path from git root: %w", err) } // NB: you might think to ignore changes to files outside of the module, // but we should probably play it safe. in a monorepo for example this // could mean publishing a broken module because it depends on // uncommitted code in a dependent module. // // TODO: the proper fix here might be to check for dependent code, too. // Specifically I should be able to publish a dependency before // committing + pushing its dependers. but in the end it doesn't really // matter; just commit everything and _then_ publish. if !st.IsClean() && !force { cmd.Println(st) return fmt.Errorf("git repository is not clean; run with --force to ignore") } refStr := fmt.Sprintf("%s@%s", path.Join(refPath, pathFromRoot), commit) cmd.Println("publishing", refStr, "to", daDaggerverse) modURL, err := url.JoinPath(daDaggerverse, "mod", refStr) if err != nil { return fmt.Errorf("failed to get module URL: %w", err) } res, err := http.Get(modURL) // nolint: gosec if err != nil { return fmt.Errorf("failed to get module: %w", err) } // TODO(vito): inspect response, would be nice to surface errors here cmd.Printf("published to %s", modURL) return res.Body.Close() }) }, } func originToPath(origin string) (string, error) { url, err := gitutil.ParseURL(origin) if err != nil { return "", fmt.Errorf("failed to parse git remote origin URL: %w", err) } return strings.TrimSuffix(path.Join(url.Host, url.Path), ".git"), nil } func updateModuleConfig( ctx context.Context, dag *dagger.Client, moduleDir string, modFlag *modules.Ref, modCfg *modules.Config, cmd *cobra.Command, ) (rerr error) { rec := progrock.FromContext(ctx) configPath := filepath.Join(moduleDir, modules.Filename) cfgBytes, err := json.MarshalIndent(modCfg, "", " ") if err != nil { return fmt.Errorf("failed to marshal module config: %w", err) } _, parentDirStatErr := os.Stat(moduleDir) switch { case parentDirStatErr == nil: // already exists, nothing to do case os.IsNotExist(parentDirStatErr): // make the parent dir, but if something goes wrong, clean it up in the defer if err := os.MkdirAll(moduleDir, 0o755); err != nil { return fmt.Errorf("failed to create module config directory: %w", err) } defer func() { if rerr != nil { os.RemoveAll(moduleDir) } }() default: return fmt.Errorf("failed to stat parent directory: %w", parentDirStatErr) } var cfgFileMode os.FileMode = 0o644 originalContents, configFileReadErr := os.ReadFile(configPath) switch { case configFileReadErr == nil: // attempt to restore the original file if it already existed and something goes wrong stat, err := os.Stat(configPath) if err != nil { return fmt.Errorf("failed to stat module config: %w", err) } cfgFileMode = stat.Mode() defer func() { if rerr != nil { os.WriteFile(configPath, originalContents, cfgFileMode) } }() case os.IsNotExist(configFileReadErr): // remove it if it didn't exist already and something goes wrong defer func() { if rerr != nil { os.Remove(configPath) } }() default: return fmt.Errorf("failed to read module config: %w", configFileReadErr) } // nolint:gosec if err := os.WriteFile(configPath, append(cfgBytes, '\n'), cfgFileMode); err != nil { return fmt.Errorf("failed to write module config: %w", err) } mod, err := modFlag.AsModule(ctx, dag) if err != nil { return fmt.Errorf("failed to load module: %w", err) } codegen := mod.GeneratedCode() if err := automateVCS(ctx, moduleDir, codegen); err != nil { return fmt.Errorf("failed to automate vcs: %w", err) } entries, err := codegen.Code().Entries(ctx) if err != nil { return fmt.Errorf("failed to get codegen output entries: %w", err) } rec.Debug("syncing generated files", progrock.Labelf("entries", "%v", entries)) if _, err := codegen.Code().Export(ctx, moduleDir); err != nil { return fmt.Errorf("failed to export codegen output: %w", err) } return nil } func getModuleRef(ctx context.Context, dag *dagger.Client) (*modules.Ref, bool, error) { wasSet := false moduleURL := moduleURL if moduleURL == "" { // it's unset or default value, use mod if present if v, ok := os.LookupEnv("DAGGER_MODULE"); ok { moduleURL = v wasSet = true } // it's still unset, set to the default if moduleURL == "" { moduleURL = moduleURLDefault } } else { wasSet = true } cfg, err := modules.ResolveMovingRef(ctx, dag, moduleURL) return cfg, wasSet, err } func loadModCmdWrapper( fn func(context.Context, *client.Client, *dagger.Module, *cobra.Command, []string) error, presetSecretToken string, ) func(*cobra.Command, []string) error { return func(cmd *cobra.Command, cmdArgs []string) error { return withEngineAndTUI(cmd.Context(), client.Params{ SecretToken: presetSecretToken, }, func(ctx context.Context, engineClient *client.Client) (err error) { rec := progrock.FromContext(ctx) vtx := rec.Vertex("cmd-loader", strings.Join(os.Args, " ")) defer func() { vtx.Done(err) }() load := vtx.Task("loading module") loadedMod, err := loadMod(ctx, engineClient.Dagger()) load.Done(err) if err != nil { return err } return fn(ctx, engineClient, loadedMod, cmd, cmdArgs) }) } } func loadMod(ctx context.Context, c *dagger.Client) (*dagger.Module, error) { mod, modRequired, err := getModuleRef(ctx, c) if err != nil { return nil, fmt.Errorf("failed to get module config: %w", err) } // check that the module exists first if _, err := mod.Config(ctx, c); err != nil { if !modRequired { // only allow failing to load the mod when it was explicitly requested // by the user return nil, nil } return nil, fmt.Errorf("failed to load module config: %w", err) } loadedMod, err := mod.AsModule(ctx, c) if err != nil { return nil, fmt.Errorf("failed to load module: %w", err) } _, err = loadedMod.Serve(ctx) if err != nil { return nil, fmt.Errorf("failed to get loaded module ID: %w", err) } return loadedMod, nil } // loadModObjects loads the objects defined by the given module in an easier to use data structure. func loadModObjects(ctx context.Context, dag *dagger.Client, mod *dagger.Module) (*moduleDef, error) { var res struct { Module *moduleDef } err := dag.Do(ctx, &dagger.Request{ Query: ` query Objects($module: ModuleID!) { module: loadModuleFromID(id: $module) { name objects { asObject { name constructor { returnType { kind asObject { name } } args { name description defaultValue typeDef { kind optional asObject { name } asList { elementTypeDef { kind asObject { name } } } } } } functions { name description returnType { kind asObject { name } asList { elementTypeDef { kind asObject { name } } } } args { name description defaultValue typeDef { kind optional asObject { name } asList { elementTypeDef { kind asObject { name } } } } } } fields { name description typeDef { kind optional asObject { name } asList { elementTypeDef { kind asObject { name } } } } } } } } } `, Variables: map[string]interface{}{ "module": mod, }, }, &dagger.Response{ Data: &res, }) if err != nil { err = fmt.Errorf("query module objects: %w", err) } return res.Module, err } // moduleDef is a representation of dagger.Module. type moduleDef struct { Name string Objects []*modTypeDef } // AsObjects returns the module's object type definitions. func (m *moduleDef) AsObjects() []*modObject { var defs []*modObject for _, typeDef := range m.Objects { if typeDef.AsObject != nil { defs = append(defs, typeDef.AsObject) } } return defs } // GetObject retrieves a saved object type definition from the module. func (m *moduleDef) GetObject(name string) *modObject { for _, obj := range m.AsObjects() { // Normalize name in case an SDK uses a different convention for object names. if gqlObjectName(obj.Name) == gqlObjectName(name) { return obj } } return nil } func (m *moduleDef) GetMainObject() *modObject { return m.GetObject(m.Name) } // LoadObject attempts to replace a function's return object type or argument's // object type with with one from the module's object type definitions, to // recover missing function definitions in those places when chaining functions. func (m *moduleDef) LoadObject(typeDef *modTypeDef) { if typeDef.AsObject != nil && typeDef.AsObject.Functions == nil && typeDef.AsObject.Fields == nil { obj := m.GetObject(typeDef.AsObject.Name) if obj != nil { typeDef.AsObject = obj } } if typeDef.AsList != nil { m.LoadObject(typeDef.AsList.ElementTypeDef) } } // modTypeDef is a representation of dagger.TypeDef. type modTypeDef struct { Kind dagger.TypeDefKind Optional bool AsObject *modObject AsList *modList } func (t *modTypeDef) ObjectName() string { if t.AsObject != nil { return t.AsObject.Name } return "" } // modObject is a representation of dagger.ObjectTypeDef. type modObject struct { Name string Functions []*modFunction Fields []*modField Constructor *modFunction } // GetFunctions returns the object's function definitions as well as the fields, // which are treated as functions with no arguments. func (o *modObject) GetFunctions() []*modFunction { fns := make([]*modFunction, 0, len(o.Functions)+len(o.Fields)) for _, f := range o.Fields { fns = append(fns, &modFunction{ Name: f.Name, Description: f.Description, ReturnType: f.TypeDef, }) } fns = append(fns, o.Functions...) return fns } // modList is a representation of dagger.ListTypeDef. type modList struct { ElementTypeDef *modTypeDef } // modField is a representation of dagger.FieldTypeDef. type modField struct { Name string Description string TypeDef *modTypeDef } // modFunction is a representation of dagger.Function. type modFunction struct { Name string Description string ReturnType *modTypeDef Args []*modFunctionArg } // modFunctionArg is a representation of dagger.FunctionArg. type modFunctionArg struct { Name string Description string TypeDef *modTypeDef DefaultValue dagger.JSON flagName string } // FlagName returns the name of the argument using CLI naming conventions. func (r *modFunctionArg) FlagName() string { if r.flagName == "" { r.flagName = cliName(r.Name) } return r.flagName } func getDefaultValue[T any](r *modFunctionArg) (T, error) { var val T err := json.Unmarshal([]byte(r.DefaultValue), &val) return val, err } // gqlObjectName converts casing to a GraphQL object name func gqlObjectName(name string) string { return strcase.ToCamel(name) } // gqlFieldName converts casing to a GraphQL object field name func gqlFieldName(name string) string { return strcase.ToLowerCamel(name) } // gqlArgName converts casing to a GraphQL field argument name func gqlArgName(name string) string { return strcase.ToLowerCamel(name) } // cliName converts casing to the CLI convention (kebab) func cliName(name string) string { return strcase.ToKebab(name) }
closed
dagger/dagger
https://github.com/dagger/dagger
3,284
Use `withoutEntrypoint`, `withoutWorkdir`, `withoutUser` and `withoutDefaultArgs` to remove
Currently, passing nil or empty arguments to those function reinit the values. It's not that explicit and clear. It will make more API endpoints, but it's gonna be clearer.
https://github.com/dagger/dagger/issues/3284
https://github.com/dagger/dagger/pull/6278
568d802bb892f1e074cf74cfce2a551989418964
cd825bde699a0beb0adb5c2529da5469118a172b
"2022-10-07T15:00:07Z"
go
"2023-12-19T13:11:01Z"
.changes/unreleased/Added-20231215-115147.yaml
closed
dagger/dagger
https://github.com/dagger/dagger
3,284
Use `withoutEntrypoint`, `withoutWorkdir`, `withoutUser` and `withoutDefaultArgs` to remove
Currently, passing nil or empty arguments to those function reinit the values. It's not that explicit and clear. It will make more API endpoints, but it's gonna be clearer.
https://github.com/dagger/dagger/issues/3284
https://github.com/dagger/dagger/pull/6278
568d802bb892f1e074cf74cfce2a551989418964
cd825bde699a0beb0adb5c2529da5469118a172b
"2022-10-07T15:00:07Z"
go
"2023-12-19T13:11:01Z"
core/integration/container_test.go
package core import ( "bytes" _ "embed" "encoding/base64" "encoding/json" "fmt" "net/http" "os" "path" "path/filepath" "strconv" "strings" "testing" "github.com/containerd/containerd/platforms" "github.com/google/go-containerregistry/pkg/name" "github.com/google/go-containerregistry/pkg/v1/remote" "github.com/moby/buildkit/identity" ocispecs "github.com/opencontainers/image-spec/specs-go/v1" "github.com/stretchr/testify/require" "gopkg.in/yaml.v3" "dagger.io/dagger" "github.com/dagger/dagger/core" "github.com/dagger/dagger/core/schema" "github.com/dagger/dagger/engine/buildkit" "github.com/dagger/dagger/internal/testutil" ) func TestContainerScratch(t *testing.T) { t.Parallel() res := struct { Container struct { ID string Rootfs struct { Entries []string } } }{} err := testutil.Query( `{ container { id rootfs { entries } } }`, &res, nil) require.NoError(t, err) require.Empty(t, res.Container.Rootfs.Entries) } func TestContainerFrom(t *testing.T) { t.Parallel() res := struct { Container struct { From struct { File struct { Contents string } } } }{} err := testutil.Query( `{ container { from(address: "`+alpineImage+`") { file(path: "/etc/alpine-release") { contents } } } }`, &res, nil) require.NoError(t, err) require.Equal(t, res.Container.From.File.Contents, "3.18.2\n") } func TestContainerBuild(t *testing.T) { c, ctx := connect(t) contextDir := c.Directory(). WithNewFile("main.go", `package main import "fmt" import "os" func main() { for _, env := range os.Environ() { fmt.Println(env) } }`) t.Run("default Dockerfile location", func(t *testing.T) { src := contextDir. WithNewFile("Dockerfile", `FROM golang:1.18.2-alpine WORKDIR /src COPY main.go . RUN go mod init hello RUN go build -o /usr/bin/goenv main.go ENV FOO=bar CMD goenv `) env, err := c.Container().Build(src).Stdout(ctx) require.NoError(t, err) require.Contains(t, env, "FOO=bar\n") }) t.Run("custom Dockerfile location", func(t *testing.T) { src := contextDir. WithNewFile("subdir/Dockerfile.whee", `FROM golang:1.18.2-alpine WORKDIR /src COPY main.go . RUN go mod init hello RUN go build -o /usr/bin/goenv main.go ENV FOO=bar CMD goenv `) env, err := c.Container().Build(src, dagger.ContainerBuildOpts{ Dockerfile: "subdir/Dockerfile.whee", }).Stdout(ctx) require.NoError(t, err) require.Contains(t, env, "FOO=bar\n") }) t.Run("subdirectory with default Dockerfile location", func(t *testing.T) { src := contextDir. WithNewFile("Dockerfile", `FROM golang:1.18.2-alpine WORKDIR /src COPY main.go . RUN go mod init hello RUN go build -o /usr/bin/goenv main.go ENV FOO=bar CMD goenv `) sub := c.Directory().WithDirectory("subcontext", src).Directory("subcontext") env, err := c.Container().Build(sub).Stdout(ctx) require.NoError(t, err) require.Contains(t, env, "FOO=bar\n") }) t.Run("subdirectory with custom Dockerfile location", func(t *testing.T) { src := contextDir. WithNewFile("subdir/Dockerfile.whee", `FROM golang:1.18.2-alpine WORKDIR /src COPY main.go . RUN go mod init hello RUN go build -o /usr/bin/goenv main.go ENV FOO=bar CMD goenv `) sub := c.Directory().WithDirectory("subcontext", src).Directory("subcontext") env, err := c.Container().Build(sub, dagger.ContainerBuildOpts{ Dockerfile: "subdir/Dockerfile.whee", }).Stdout(ctx) require.NoError(t, err) require.Contains(t, env, "FOO=bar\n") }) t.Run("with build args", func(t *testing.T) { src := contextDir. WithNewFile("Dockerfile", `FROM golang:1.18.2-alpine ARG FOOARG=bar WORKDIR /src COPY main.go . RUN go mod init hello RUN go build -o /usr/bin/goenv main.go ENV FOO=$FOOARG CMD goenv `) env, err := c.Container().Build(src).Stdout(ctx) require.NoError(t, err) require.Contains(t, env, "FOO=bar\n") env, err = c.Container().Build(src, dagger.ContainerBuildOpts{BuildArgs: []dagger.BuildArg{{Name: "FOOARG", Value: "barbar"}}}).Stdout(ctx) require.NoError(t, err) require.Contains(t, env, "FOO=barbar\n") }) t.Run("with target", func(t *testing.T) { src := contextDir. WithNewFile("Dockerfile", `FROM golang:1.18.2-alpine AS base CMD echo "base" FROM base AS stage1 CMD echo "stage1" FROM base AS stage2 CMD echo "stage2" `) output, err := c.Container().Build(src).Stdout(ctx) require.NoError(t, err) require.Contains(t, output, "stage2\n") output, err = c.Container().Build(src, dagger.ContainerBuildOpts{Target: "stage1"}).Stdout(ctx) require.NoError(t, err) require.Contains(t, output, "stage1\n") require.NotContains(t, output, "stage2\n") }) t.Run("with build secrets", func(t *testing.T) { sec := c.SetSecret("my-secret", "barbar") src := contextDir. WithNewFile("Dockerfile", `FROM golang:1.18.2-alpine WORKDIR /src RUN --mount=type=secret,id=my-secret test "$(cat /run/secrets/my-secret)" = "barbar" RUN --mount=type=secret,id=my-secret cp /run/secrets/my-secret /secret CMD cat /secret `) stdout, err := c.Container().Build(src, dagger.ContainerBuildOpts{ Secrets: []*dagger.Secret{sec}, }).Stdout(ctx) require.NoError(t, err) require.Contains(t, stdout, "***") }) t.Run("just build, don't execute", func(t *testing.T) { src := contextDir. WithNewFile("Dockerfile", "FROM "+alpineImage+"\nCMD false") _, err := c.Container().Build(src).Sync(ctx) require.NoError(t, err) // unless there's a WithExec _, err = c.Container().Build(src).WithExec(nil).Sync(ctx) require.NotEmpty(t, err) }) t.Run("just build, short-circuit", func(t *testing.T) { src := contextDir. WithNewFile("Dockerfile", "FROM "+alpineImage+"\nRUN false") _, err := c.Container().Build(src).Sync(ctx) require.NotEmpty(t, err) }) } func TestContainerWithRootFS(t *testing.T) { t.Parallel() c, ctx := connect(t) alpine316 := c.Container().From(alpineImage) alpine316ReleaseStr, err := alpine316.File("/etc/alpine-release").Contents(ctx) require.NoError(t, err) alpine316ReleaseStr = strings.TrimSpace(alpine316ReleaseStr) dir := alpine316.Rootfs() _, err = c.Container().WithEnvVariable("ALPINE_RELEASE", alpine316ReleaseStr).WithRootfs(dir).WithExec([]string{ "/bin/sh", "-c", "test -f /etc/alpine-release && test \"$(head -n 1 /etc/alpine-release)\" = \"$ALPINE_RELEASE\"", }).Sync(ctx) require.NoError(t, err) alpine315 := c.Container().From(alpineImage) varVal := "testing123" alpine315WithVar := alpine315.WithEnvVariable("DAGGER_TEST", varVal) varValResp, err := alpine315WithVar.EnvVariable(ctx, "DAGGER_TEST") require.NoError(t, err) require.Equal(t, varVal, varValResp) alpine315ReplacedFS := alpine315WithVar.WithRootfs(dir) varValResp, err = alpine315ReplacedFS.EnvVariable(ctx, "DAGGER_TEST") require.NoError(t, err) require.Equal(t, varVal, varValResp) releaseStr, err := alpine315ReplacedFS.File("/etc/alpine-release").Contents(ctx) require.NoError(t, err) require.Equal(t, "3.18.2\n", releaseStr) } //go:embed testdata/hello.go var helloSrc string func TestContainerWithRootFSSubdir(t *testing.T) { t.Parallel() c, ctx := connect(t) hello := c.Directory().WithNewFile("main.go", helloSrc).File("main.go") ctr := c.Container(). From(golangImage). WithMountedFile("/src/main.go", hello). WithEnvVariable("CGO_ENABLED", "0"). WithExec([]string{"go", "build", "-o", "/out/hello", "/src/main.go"}) out, err := c.Container(). WithRootfs(ctr.Directory("/out")). WithExec([]string{"/hello"}). Stdout(ctx) require.NoError(t, err) require.Equal(t, "Hello, world!\n", out) } func TestContainerExecSync(t *testing.T) { t.Parallel() // A successful sync doesn't prove anything. As soon as you call other // leaves to check things, they could be the ones triggering execution. // Still, sync can be useful for short-circuiting. err := testutil.Query( `{ container { from(address: "`+alpineImage+`") { withExec(args: ["false"]) { sync } } } }`, nil, nil) require.Contains(t, err.Error(), `process "false" did not complete successfully`) } func TestContainerExecStdoutStderr(t *testing.T) { t.Parallel() res := struct { Container struct { From struct { WithExec struct { Stdout string Stderr string } } } }{} err := testutil.Query( `{ container { from(address: "`+alpineImage+`") { withExec(args: ["sh", "-c", "echo hello; echo goodbye >/dev/stderr"]) { stdout stderr } } } }`, &res, nil) require.NoError(t, err) require.Equal(t, res.Container.From.WithExec.Stdout, "hello\n") require.Equal(t, res.Container.From.WithExec.Stderr, "goodbye\n") } func TestContainerExecStdin(t *testing.T) { t.Parallel() res := struct { Container struct { From struct { WithExec struct { Stdout string } } } }{} err := testutil.Query( `{ container { from(address: "`+alpineImage+`") { withExec(args: ["cat"], stdin: "hello") { stdout } } } }`, &res, nil) require.NoError(t, err) require.Equal(t, res.Container.From.WithExec.Stdout, "hello") } func TestContainerExecRedirectStdoutStderr(t *testing.T) { t.Parallel() res := struct { Container struct { From struct { WithExec struct { Out, Err struct { Contents string } } } } }{} err := testutil.Query( `{ container { from(address: "`+alpineImage+`") { withExec( args: ["sh", "-c", "echo hello; echo goodbye >/dev/stderr"], redirectStdout: "out", redirectStderr: "err" ) { out: file(path: "out") { contents } err: file(path: "err") { contents } } } } }`, &res, nil) require.NoError(t, err) require.Equal(t, res.Container.From.WithExec.Out.Contents, "hello\n") require.Equal(t, res.Container.From.WithExec.Err.Contents, "goodbye\n") c, ctx := connect(t) execWithMount := c.Container().From(alpineImage). WithMountedDirectory("/mnt", c.Directory()). WithExec([]string{"sh", "-c", "echo hello; echo goodbye >/dev/stderr"}, dagger.ContainerWithExecOpts{ RedirectStdout: "/mnt/out", RedirectStderr: "/mnt/err", }) stdout, err := execWithMount.File("/mnt/out").Contents(ctx) require.NoError(t, err) require.Equal(t, "hello\n", stdout) stderr, err := execWithMount.File("/mnt/err").Contents(ctx) require.NoError(t, err) require.Equal(t, "goodbye\n", stderr) _, err = execWithMount.Stdout(ctx) require.NoError(t, err) require.Equal(t, "hello\n", stdout) _, err = execWithMount.Stderr(ctx) require.NoError(t, err) require.Equal(t, "goodbye\n", stderr) } func TestContainerExecWithWorkdir(t *testing.T) { t.Parallel() res := struct { Container struct { From struct { WithWorkdir struct { WithExec struct { Stdout string } } } } }{} err := testutil.Query( `{ container { from(address: "`+alpineImage+`") { withWorkdir(path: "/usr") { withExec(args: ["pwd"]) { stdout } } } } }`, &res, nil) require.NoError(t, err) require.Equal(t, res.Container.From.WithWorkdir.WithExec.Stdout, "/usr\n") } func TestContainerExecWithUser(t *testing.T) { t.Parallel() res := struct { Container struct { From struct { User string WithUser struct { User string WithExec struct { Stdout string } } } } }{} t.Run("user name", func(t *testing.T) { err := testutil.Query( `{ container { from(address: "`+alpineImage+`") { user withUser(name: "daemon") { user withExec(args: ["whoami"]) { stdout } } } } }`, &res, nil) require.NoError(t, err) require.Equal(t, "", res.Container.From.User) require.Equal(t, "daemon", res.Container.From.WithUser.User) require.Equal(t, "daemon\n", res.Container.From.WithUser.WithExec.Stdout) }) t.Run("user and group name", func(t *testing.T) { err := testutil.Query( `{ container { from(address: "`+alpineImage+`") { user withUser(name: "daemon:floppy") { user withExec(args: ["sh", "-c", "whoami; groups"]) { stdout } } } } }`, &res, nil) require.NoError(t, err) require.Equal(t, "", res.Container.From.User) require.Equal(t, "daemon:floppy", res.Container.From.WithUser.User) require.Equal(t, "daemon\nfloppy\n", res.Container.From.WithUser.WithExec.Stdout) }) t.Run("user ID", func(t *testing.T) { err := testutil.Query( `{ container { from(address: "`+alpineImage+`") { user withUser(name: "2") { user withExec(args: ["whoami"]) { stdout } } } } }`, &res, nil) require.NoError(t, err) require.Equal(t, "", res.Container.From.User) require.Equal(t, "2", res.Container.From.WithUser.User) require.Equal(t, "daemon\n", res.Container.From.WithUser.WithExec.Stdout) }) t.Run("user and group ID", func(t *testing.T) { err := testutil.Query( `{ container { from(address: "`+alpineImage+`") { user withUser(name: "2:11") { user withExec(args: ["sh", "-c", "whoami; groups"]) { stdout } } } } }`, &res, nil) require.NoError(t, err) require.Equal(t, "", res.Container.From.User) require.Equal(t, "2:11", res.Container.From.WithUser.User) require.Equal(t, "daemon\nfloppy\n", res.Container.From.WithUser.WithExec.Stdout) }) } func TestContainerExecWithEntrypoint(t *testing.T) { t.Parallel() c, ctx := connect(t) base := c.Container().From(alpineImage) before, err := base.Entrypoint(ctx) require.NoError(t, err) require.Empty(t, before) withEntry := base.WithEntrypoint([]string{"sh"}) after, err := withEntry.Entrypoint(ctx) require.NoError(t, err) require.Equal(t, []string{"sh"}, after) used, err := withEntry.WithExec([]string{"-c", "echo $HOME"}).Stdout(ctx) require.NoError(t, err) require.Equal(t, "/root\n", used) _, err = withEntry.WithExec([]string{"sh", "-c", "echo $HOME"}).Sync(ctx) require.Error(t, err) // 'sh sh -c echo $HOME' is not valid skipped, err := withEntry.WithExec([]string{"sh", "-c", "echo $HOME"}, dagger.ContainerWithExecOpts{ SkipEntrypoint: true, }).Stdout(ctx) require.NoError(t, err) require.Equal(t, "/root\n", skipped) withoutEntry := withEntry.WithEntrypoint(nil) removed, err := withoutEntry.Entrypoint(ctx) require.NoError(t, err) require.Empty(t, removed) } func TestContainerWithDefaultArgs(t *testing.T) { t.Parallel() res := struct { Container struct { From struct { Entrypoint []string DefaultArgs []string WithExec struct { Stdout string } WithDefaultArgs struct { Entrypoint []string DefaultArgs []string } WithEntrypoint struct { Entrypoint []string DefaultArgs []string WithExec struct { Stdout string } WithDefaultArgs struct { Entrypoint []string DefaultArgs []string WithExec struct { Stdout string } } } } } }{} err := testutil.Query( `{ container { from(address: "`+alpineImage+`") { entrypoint defaultArgs withDefaultArgs { entrypoint defaultArgs } withEntrypoint(args: ["sh", "-c"]) { entrypoint defaultArgs withExec(args: ["echo $HOME"]) { stdout } withDefaultArgs(args: ["id"]) { entrypoint defaultArgs withExec(args: []) { stdout } } } } } }`, &res, nil) t.Run("default alpine (no entrypoint)", func(t *testing.T) { require.NoError(t, err) require.Empty(t, res.Container.From.Entrypoint) require.Equal(t, []string{"/bin/sh"}, res.Container.From.DefaultArgs) }) t.Run("with nil default args", func(t *testing.T) { require.Empty(t, res.Container.From.WithDefaultArgs.Entrypoint) require.Empty(t, res.Container.From.WithDefaultArgs.DefaultArgs) }) t.Run("with entrypoint set", func(t *testing.T) { require.Equal(t, []string{"sh", "-c"}, res.Container.From.WithEntrypoint.Entrypoint) require.Equal(t, []string{"/bin/sh"}, res.Container.From.WithEntrypoint.DefaultArgs) }) t.Run("with exec args", func(t *testing.T) { require.Equal(t, "/root\n", res.Container.From.WithEntrypoint.WithExec.Stdout) }) t.Run("with default args set", func(t *testing.T) { require.Equal(t, []string{"sh", "-c"}, res.Container.From.WithEntrypoint.WithDefaultArgs.Entrypoint) require.Equal(t, []string{"id"}, res.Container.From.WithEntrypoint.WithDefaultArgs.DefaultArgs) require.Equal(t, "uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),11(floppy),20(dialout),26(tape),27(video)\n", res.Container.From.WithEntrypoint.WithDefaultArgs.WithExec.Stdout) }) } func TestContainerExecWithEnvVariable(t *testing.T) { t.Parallel() res := struct { Container struct { From struct { WithEnvVariable struct { WithExec struct { Stdout string } } } } }{} err := testutil.Query( `{ container { from(address: "`+alpineImage+`") { withEnvVariable(name: "FOO", value: "bar") { withExec(args: ["env"]) { stdout } } } } }`, &res, nil) require.NoError(t, err) require.Contains(t, res.Container.From.WithEnvVariable.WithExec.Stdout, "FOO=bar\n") } func TestContainerVariables(t *testing.T) { t.Parallel() res := struct { Container struct { From struct { EnvVariables []schema.EnvVariable WithExec struct { Stdout string } } } }{} err := testutil.Query( `{ container { from(address: "golang:1.18.2-alpine") { envVariables { name value } withExec(args: ["env"]) { stdout } } } }`, &res, nil) require.NoError(t, err) require.Equal(t, []schema.EnvVariable{ {Name: "PATH", Value: "/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"}, {Name: "GOLANG_VERSION", Value: "1.18.2"}, {Name: "GOPATH", Value: "/go"}, }, res.Container.From.EnvVariables) require.Contains(t, res.Container.From.WithExec.Stdout, "GOPATH=/go\n") } func TestContainerVariable(t *testing.T) { t.Parallel() res := struct { Container struct { From struct { EnvVariable *string } } }{} err := testutil.Query( `{ container { from(address: "golang:1.18.2-alpine") { envVariable(name: "GOLANG_VERSION") } } }`, &res, nil) require.NoError(t, err) require.NotNil(t, res.Container.From.EnvVariable) require.Equal(t, "1.18.2", *res.Container.From.EnvVariable) err = testutil.Query( `{ container { from(address: "golang:1.18.2-alpine") { envVariable(name: "UNKNOWN") } } }`, &res, nil) require.NoError(t, err) require.Nil(t, res.Container.From.EnvVariable) } func TestContainerWithoutVariable(t *testing.T) { t.Parallel() res := struct { Container struct { From struct { WithoutEnvVariable struct { EnvVariables []schema.EnvVariable WithExec struct { Stdout string } } } } }{} err := testutil.Query( `{ container { from(address: "golang:1.18.2-alpine") { withoutEnvVariable(name: "GOLANG_VERSION") { envVariables { name value } withExec(args: ["env"]) { stdout } } } } }`, &res, nil) require.NoError(t, err) require.Equal(t, res.Container.From.WithoutEnvVariable.EnvVariables, []schema.EnvVariable{ {Name: "PATH", Value: "/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"}, {Name: "GOPATH", Value: "/go"}, }) require.NotContains(t, res.Container.From.WithoutEnvVariable.WithExec.Stdout, "GOLANG_VERSION") } func TestContainerEnvVariablesReplace(t *testing.T) { t.Parallel() res := struct { Container struct { From struct { WithEnvVariable struct { EnvVariables []schema.EnvVariable WithExec struct { Stdout string } } } } }{} err := testutil.Query( `{ container { from(address: "golang:1.18.2-alpine") { withEnvVariable(name: "GOPATH", value: "/gone") { envVariables { name value } withExec(args: ["env"]) { stdout } } } } }`, &res, nil) require.NoError(t, err) require.Equal(t, res.Container.From.WithEnvVariable.EnvVariables, []schema.EnvVariable{ {Name: "PATH", Value: "/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"}, {Name: "GOLANG_VERSION", Value: "1.18.2"}, {Name: "GOPATH", Value: "/gone"}, }) require.Contains(t, res.Container.From.WithEnvVariable.WithExec.Stdout, "GOPATH=/gone\n") } func TestContainerWithEnvVariableExpand(t *testing.T) { t.Parallel() c, ctx := connect(t) t.Run("add env var without expansion", func(t *testing.T) { out, err := c.Container(). From(alpineImage). WithEnvVariable("FOO", "foo:$PATH"). WithExec([]string{"printenv", "FOO"}). Stdout(ctx) require.NoError(t, err) require.Equal(t, "foo:$PATH\n", out) }) t.Run("add env var with expansion", func(t *testing.T) { out, err := c.Container(). From(alpineImage). WithEnvVariable("USER_PATH", "/opt"). WithEnvVariable( "PATH", "${USER_PATH}/bin:$PATH", dagger.ContainerWithEnvVariableOpts{ Expand: true, }, ). WithExec([]string{"printenv", "PATH"}). Stdout(ctx) require.NoError(t, err) require.Equal(t, "/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\n", out, ) }) } func TestContainerLabel(t *testing.T) { c, ctx := connect(t) t.Run("container with new label", func(t *testing.T) { label, err := c.Container().From(alpineImage).WithLabel("FOO", "BAR").Label(ctx, "FOO") require.NoError(t, err) require.Contains(t, label, "BAR") }) // implementing this test as GraphQL query until // https://github.com/dagger/dagger/issues/4398 gets resolved t.Run("container labels", func(t *testing.T) { res := struct { Container struct { From struct { Labels []schema.Label } } }{} err := testutil.Query( `{ container { from(address: "nginx") { labels { name value } } } }`, &res, nil) require.NoError(t, err) require.Equal(t, []schema.Label{ {Name: "maintainer", Value: "NGINX Docker Maintainers <docker-maint@nginx.com>"}, }, res.Container.From.Labels) }) t.Run("container without label", func(t *testing.T) { label, err := c.Container().From("nginx").WithoutLabel("maintainer").Label(ctx, "maintainer") require.NoError(t, err) require.Empty(t, label) }) t.Run("container replace label", func(t *testing.T) { label, err := c.Container().From("nginx").WithLabel("maintainer", "bar").Label(ctx, "maintainer") require.NoError(t, err) require.Contains(t, label, "bar") }) t.Run("container with new label - nil panics", func(t *testing.T) { label, err := c.Container().WithLabel("FOO", "BAR").Label(ctx, "FOO") require.NoError(t, err) require.Contains(t, label, "BAR") }) t.Run("container label - nil panics", func(t *testing.T) { label, err := c.Container().Label(ctx, "FOO") require.NoError(t, err) require.Empty(t, label) }) t.Run("container without label - nil panics", func(t *testing.T) { label, err := c.Container().WithoutLabel("maintainer").Label(ctx, "maintainer") require.NoError(t, err) require.Empty(t, label) }) // implementing this test as GraphQL query until // https://github.com/dagger/dagger/issues/4398 gets resolved t.Run("container labels - nil panics", func(t *testing.T) { res := struct { Container struct { From struct { Labels []schema.Label } } }{} err := testutil.Query( `{ container { labels { name value } } }`, &res, nil) require.NoError(t, err) require.Empty(t, res.Container.From.Labels) }) } func TestContainerWorkdir(t *testing.T) { t.Parallel() res := struct { Container struct { From struct { Workdir string WithExec struct { Stdout string } } } }{} err := testutil.Query( `{ container { from(address: "golang:1.18.2-alpine") { workdir withExec(args: ["pwd"]) { stdout } } } }`, &res, nil) require.NoError(t, err) require.Equal(t, res.Container.From.Workdir, "/go") require.Equal(t, res.Container.From.WithExec.Stdout, "/go\n") } func TestContainerWithWorkdir(t *testing.T) { t.Parallel() res := struct { Container struct { From struct { WithWorkdir struct { Workdir string WithExec struct { Stdout string } } } } }{} err := testutil.Query( `{ container { from(address: "golang:1.18.2-alpine") { withWorkdir(path: "/usr") { workdir withExec(args: ["pwd"]) { stdout } } } } }`, &res, nil) require.NoError(t, err) require.Equal(t, res.Container.From.WithWorkdir.Workdir, "/usr") require.Equal(t, res.Container.From.WithWorkdir.WithExec.Stdout, "/usr\n") } func TestContainerWithMountedDirectory(t *testing.T) { t.Parallel() dirRes := struct { Directory struct { WithNewFile struct { WithNewFile struct { ID string } } } }{} err := testutil.Query( `{ directory { withNewFile(path: "some-file", contents: "some-content") { withNewFile(path: "some-dir/sub-file", contents: "sub-content") { id } } } }`, &dirRes, nil) require.NoError(t, err) id := dirRes.Directory.WithNewFile.WithNewFile.ID execRes := struct { Container struct { From struct { WithMountedDirectory struct { WithExec struct { Stdout string WithExec struct { Stdout string } } } } } }{} err = testutil.Query( `query Test($id: DirectoryID!) { container { from(address: "`+alpineImage+`") { withMountedDirectory(path: "/mnt", source: $id) { withExec(args: ["cat", "/mnt/some-file"]) { stdout withExec(args: ["cat", "/mnt/some-dir/sub-file"]) { stdout } } } } } }`, &execRes, &testutil.QueryOptions{Variables: map[string]any{ "id": id, }}) require.NoError(t, err) require.Equal(t, "some-content", execRes.Container.From.WithMountedDirectory.WithExec.Stdout) require.Equal(t, "sub-content", execRes.Container.From.WithMountedDirectory.WithExec.WithExec.Stdout) } func TestContainerWithMountedDirectorySourcePath(t *testing.T) { t.Parallel() dirRes := struct { Directory struct { WithNewFile struct { WithNewFile struct { Directory struct { ID string } } } } }{} err := testutil.Query( `{ directory { withNewFile(path: "some-file", contents: "some-content") { withNewFile(path: "some-dir/sub-file", contents: "sub-content") { directory(path: "some-dir") { id } } } } }`, &dirRes, nil) require.NoError(t, err) id := dirRes.Directory.WithNewFile.WithNewFile.Directory.ID execRes := struct { Container struct { From struct { WithMountedDirectory struct { WithExec struct { WithExec struct { Stdout string } } } } } }{} err = testutil.Query( `query Test($id: DirectoryID!) { container { from(address: "`+alpineImage+`") { withMountedDirectory(path: "/mnt", source: $id) { withExec(args: ["sh", "-c", "echo >> /mnt/sub-file; echo -n more-content >> /mnt/sub-file"]) { withExec(args: ["cat", "/mnt/sub-file"]) { stdout } } } } } }`, &execRes, &testutil.QueryOptions{Variables: map[string]any{ "id": id, }}) require.NoError(t, err) require.Equal(t, "sub-content\nmore-content", execRes.Container.From.WithMountedDirectory.WithExec.WithExec.Stdout) } func TestContainerWithMountedDirectoryPropagation(t *testing.T) { t.Parallel() dirRes := struct { Directory struct { WithNewFile struct { ID core.DirectoryID } } }{} err := testutil.Query( `{ directory { withNewFile(path: "some-file", contents: "some-content") { id } } }`, &dirRes, nil, dagger.WithLogOutput(os.Stdout)) require.NoError(t, err) id := dirRes.Directory.WithNewFile.ID execRes := struct { Container struct { From struct { WithMountedDirectory struct { WithExec struct { Stdout string WithExec struct { WithExec struct { Stdout string WithMountedDirectory struct { WithExec struct { Stdout string WithExec struct { Stdout string } } } } } } } } } }{} err = testutil.Query( `query Test($id: DirectoryID!) { container { from(address: "`+alpineImage+`") { withMountedDirectory(path: "/mnt", source: $id) { withExec(args: ["cat", "/mnt/some-file"]) { # original content stdout withExec(args: ["sh", "-c", "echo >> /mnt/some-file; echo -n more-content >> /mnt/some-file"]) { withExec(args: ["cat", "/mnt/some-file"]) { # modified content should propagate stdout withMountedDirectory(path: "/mnt", source: $id) { withExec(args: ["cat", "/mnt/some-file"]) { # should be back to the original content stdout withExec(args: ["cat", "/mnt/some-file"]) { # original content override should propagate stdout } } } } } } } } } }`, &execRes, &testutil.QueryOptions{Variables: map[string]any{ "id": id, }}, dagger.WithLogOutput(os.Stdout)) require.NoError(t, err) require.Equal(t, "some-content", execRes.Container.From.WithMountedDirectory.WithExec.Stdout) require.Equal(t, "some-content\nmore-content", execRes.Container.From.WithMountedDirectory.WithExec.WithExec.WithExec.Stdout) require.Equal(t, "some-content", execRes.Container.From.WithMountedDirectory.WithExec.WithExec.WithExec.WithMountedDirectory.WithExec.Stdout) require.Equal(t, "some-content", execRes.Container.From.WithMountedDirectory.WithExec.WithExec.WithExec.WithMountedDirectory.WithExec.WithExec.Stdout) } func TestContainerWithMountedFile(t *testing.T) { t.Parallel() dirRes := struct { Directory struct { WithNewFile struct { File struct { ID core.FileID } } } }{} err := testutil.Query( `{ directory { withNewFile(path: "some-dir/sub-file", contents: "sub-content") { file(path: "some-dir/sub-file") { id } } } }`, &dirRes, nil) require.NoError(t, err) id := dirRes.Directory.WithNewFile.File.ID execRes := struct { Container struct { From struct { WithMountedFile struct { WithExec struct { Stdout string } } } } }{} err = testutil.Query( `query Test($id: FileID!) { container { from(address: "`+alpineImage+`") { withMountedFile(path: "/mnt/file", source: $id) { withExec(args: ["cat", "/mnt/file"]) { stdout } } } } }`, &execRes, &testutil.QueryOptions{Variables: map[string]any{ "id": id, }}) require.NoError(t, err) require.Equal(t, "sub-content", execRes.Container.From.WithMountedFile.WithExec.Stdout) } func TestContainerWithMountedCache(t *testing.T) { t.Parallel() cacheID := newCache(t) execRes := struct { Container struct { From struct { WithEnvVariable struct { WithMountedCache struct { WithExec struct { Stdout string } } } } } }{} query := `query Test($cache: CacheVolumeID!, $rand: String!) { container { from(address: "` + alpineImage + `") { withEnvVariable(name: "RAND", value: $rand) { withMountedCache(path: "/mnt/cache", cache: $cache) { withExec(args: ["sh", "-c", "echo $RAND >> /mnt/cache/file; cat /mnt/cache/file"]) { stdout } } } } } }` rand1 := identity.NewID() err := testutil.Query(query, &execRes, &testutil.QueryOptions{Variables: map[string]any{ "cache": cacheID, "rand": rand1, }}) require.NoError(t, err) require.Equal(t, rand1+"\n", execRes.Container.From.WithEnvVariable.WithMountedCache.WithExec.Stdout) rand2 := identity.NewID() err = testutil.Query(query, &execRes, &testutil.QueryOptions{Variables: map[string]any{ "cache": cacheID, "rand": rand2, }}) require.NoError(t, err) require.Equal(t, rand1+"\n"+rand2+"\n", execRes.Container.From.WithEnvVariable.WithMountedCache.WithExec.Stdout) } func TestContainerWithMountedCacheFromDirectory(t *testing.T) { t.Parallel() dirRes := struct { Directory struct { WithNewFile struct { Directory struct { ID core.FileID } } } }{} err := testutil.Query( `{ directory { withNewFile(path: "some-dir/sub-file", contents: "initial-content\n") { directory(path: "some-dir") { id } } } }`, &dirRes, nil) require.NoError(t, err) initialID := dirRes.Directory.WithNewFile.Directory.ID cacheID := newCache(t) execRes := struct { Container struct { From struct { WithEnvVariable struct { WithMountedCache struct { WithExec struct { Stdout string } } } } } }{} query := `query Test($cache: CacheVolumeID!, $rand: String!, $init: DirectoryID!) { container { from(address: "` + alpineImage + `") { withEnvVariable(name: "RAND", value: $rand) { withMountedCache(path: "/mnt/cache", cache: $cache, source: $init) { withExec(args: ["sh", "-c", "echo $RAND >> /mnt/cache/sub-file; cat /mnt/cache/sub-file"]) { stdout } } } } } }` rand1 := identity.NewID() err = testutil.Query(query, &execRes, &testutil.QueryOptions{Variables: map[string]any{ "init": initialID, "rand": rand1, "cache": cacheID, }}) require.NoError(t, err) require.Equal(t, "initial-content\n"+rand1+"\n", execRes.Container.From.WithEnvVariable.WithMountedCache.WithExec.Stdout) rand2 := identity.NewID() err = testutil.Query(query, &execRes, &testutil.QueryOptions{Variables: map[string]any{ "init": initialID, "rand": rand2, "cache": cacheID, }}) require.NoError(t, err) require.Equal(t, "initial-content\n"+rand1+"\n"+rand2+"\n", execRes.Container.From.WithEnvVariable.WithMountedCache.WithExec.Stdout) } func TestContainerWithMountedTemp(t *testing.T) { t.Parallel() execRes := struct { Container struct { From struct { WithMountedTemp struct { WithExec struct { Stdout string } } } } }{} err := testutil.Query(`{ container { from(address: "`+alpineImage+`") { withMountedTemp(path: "/mnt/tmp") { withExec(args: ["grep", "/mnt/tmp", "/proc/mounts"]) { stdout } } } } }`, &execRes, nil) require.NoError(t, err) require.Contains(t, execRes.Container.From.WithMountedTemp.WithExec.Stdout, "tmpfs /mnt/tmp tmpfs") } func TestContainerWithDirectory(t *testing.T) { t.Parallel() c, ctx := connect(t) dir := c.Directory(). WithNewFile("some-file", "some-content"). WithNewFile("some-dir/sub-file", "sub-content"). Directory("some-dir") ctr := c.Container(). From(alpineImage). WithWorkdir("/workdir"). WithDirectory("with-dir", dir) contents, err := ctr.WithExec([]string{"cat", "with-dir/sub-file"}). Stdout(ctx) require.NoError(t, err) require.Equal(t, "sub-content", contents) contents, err = ctr.WithExec([]string{"cat", "/workdir/with-dir/sub-file"}). Stdout(ctx) require.NoError(t, err) require.Equal(t, "sub-content", contents) // Test with a mount mount := c.Directory(). WithNewFile("mounted-file", "mounted-content") ctr = c.Container(). From(alpineImage). WithWorkdir("/workdir"). WithMountedDirectory("mnt/mount", mount). WithDirectory("mnt/mount/dst/with-dir", dir) contents, err = ctr.WithExec([]string{"cat", "mnt/mount/mounted-file"}). Stdout(ctx) require.NoError(t, err) require.Equal(t, "mounted-content", contents) contents, err = ctr.WithExec([]string{"cat", "mnt/mount/dst/with-dir/sub-file"}). Stdout(ctx) require.NoError(t, err) require.Equal(t, "sub-content", contents) // Test with a relative mount mnt := c.Directory().WithNewDirectory("/a/b/c") ctr = c.Container(). From(alpineImage). WithMountedDirectory("/mnt", mnt) dir = c.Directory(). WithNewDirectory("/foo"). WithNewFile("/foo/some-file", "some-content") ctr = ctr.WithDirectory("/mnt/a/b/foo", dir) contents, err = ctr.WithExec([]string{"cat", "/mnt/a/b/foo/foo/some-file"}). Stdout(ctx) require.NoError(t, err) require.Equal(t, "some-content", contents) } func TestContainerWithFile(t *testing.T) { t.Parallel() c, ctx := connect(t) file := c.Directory(). WithNewFile("some-file", "some-content"). File("some-file") ctr := c.Container(). From(alpineImage). WithWorkdir("/workdir"). WithFile("target-file", file) contents, err := ctr.WithExec([]string{"cat", "target-file"}). Stdout(ctx) require.NoError(t, err) require.Equal(t, "some-content", contents) contents, err = ctr.WithExec([]string{"cat", "/workdir/target-file"}). Stdout(ctx) require.NoError(t, err) require.Equal(t, "some-content", contents) } func TestContainerWithNewFile(t *testing.T) { t.Parallel() c, ctx := connect(t) ctr := c.Container(). From(alpineImage). WithWorkdir("/workdir"). WithNewFile("some-file", dagger.ContainerWithNewFileOpts{ Contents: "some-content", }) contents, err := ctr.WithExec([]string{"cat", "some-file"}). Stdout(ctx) require.NoError(t, err) require.Equal(t, "some-content", contents) contents, err = ctr.WithExec([]string{"cat", "/workdir/some-file"}). Stdout(ctx) require.NoError(t, err) require.Equal(t, "some-content", contents) } func TestContainerMountsWithoutMount(t *testing.T) { t.Parallel() dirRes := struct { Directory struct { WithNewFile struct { WithNewFile struct { ID string } } } }{} err := testutil.Query( `{ directory { withNewFile(path: "some-file", contents: "some-content") { withNewFile(path: "some-dir/sub-file", contents: "sub-content") { id } } } }`, &dirRes, nil) require.NoError(t, err) id := dirRes.Directory.WithNewFile.WithNewFile.ID execRes := struct { Container struct { From struct { WithDirectory struct { WithMountedTemp struct { Mounts []string WithMountedDirectory struct { Mounts []string WithExec struct { Stdout string WithoutMount struct { Mounts []string WithExec struct { Stdout string } } } } } } } } }{} err = testutil.Query( `query Test($id: DirectoryID!) { container { from(address: "`+alpineImage+`") { withDirectory(path: "/mnt/dir", directory: "") { withMountedTemp(path: "/mnt/tmp") { mounts withMountedDirectory(path: "/mnt/dir", source: $id) { mounts withExec(args: ["ls", "/mnt/dir"]) { stdout withoutMount(path: "/mnt/dir") { mounts withExec(args: ["ls", "/mnt/dir"]) { stdout } } } } } } } } }`, &execRes, &testutil.QueryOptions{Variables: map[string]any{ "id": id, }}) require.NoError(t, err) require.Equal(t, []string{"/mnt/tmp"}, execRes.Container.From.WithDirectory.WithMountedTemp.Mounts) require.Equal(t, []string{"/mnt/tmp", "/mnt/dir"}, execRes.Container.From.WithDirectory.WithMountedTemp.WithMountedDirectory.Mounts) require.Equal(t, "some-dir\nsome-file\n", execRes.Container.From.WithDirectory.WithMountedTemp.WithMountedDirectory.WithExec.Stdout) require.Equal(t, "", execRes.Container.From.WithDirectory.WithMountedTemp.WithMountedDirectory.WithExec.WithoutMount.WithExec.Stdout) require.Equal(t, []string{"/mnt/tmp"}, execRes.Container.From.WithDirectory.WithMountedTemp.WithMountedDirectory.WithExec.WithoutMount.Mounts) } func TestContainerReplacedMounts(t *testing.T) { t.Parallel() c, ctx := connect(t) lower := c.Directory().WithNewFile("some-file", "lower-content") upper := c.Directory().WithNewFile("some-file", "upper-content") ctr := c.Container(). From(alpineImage). WithMountedDirectory("/mnt/dir", lower) t.Run("initial content is lower", func(t *testing.T) { mnts, err := ctr.Mounts(ctx) require.NoError(t, err) require.Equal(t, []string{"/mnt/dir"}, mnts) out, err := ctr.WithExec([]string{"cat", "/mnt/dir/some-file"}).Stdout(ctx) require.NoError(t, err) require.Equal(t, "lower-content", out) }) replaced := ctr.WithMountedDirectory("/mnt/dir", upper) t.Run("mounts of same path are replaced", func(t *testing.T) { mnts, err := replaced.Mounts(ctx) require.NoError(t, err) require.Equal(t, []string{"/mnt/dir"}, mnts) out, err := replaced.WithExec([]string{"cat", "/mnt/dir/some-file"}).Stdout(ctx) require.NoError(t, err) require.Equal(t, "upper-content", out) }) t.Run("removing a replaced mount does not reveal previous mount", func(t *testing.T) { removed := replaced.WithoutMount("/mnt/dir") mnts, err := removed.Mounts(ctx) require.NoError(t, err) require.Empty(t, mnts) }) clobberedDir := c.Directory().WithNewFile("some-file", "clobbered-content") clobbered := replaced.WithMountedDirectory("/mnt", clobberedDir) t.Run("replacing parent of a mount clobbers child", func(t *testing.T) { mnts, err := clobbered.Mounts(ctx) require.NoError(t, err) require.Equal(t, []string{"/mnt"}, mnts) out, err := clobbered.WithExec([]string{"cat", "/mnt/some-file"}).Stdout(ctx) require.NoError(t, err) require.Equal(t, "clobbered-content", out) }) clobberedSubDir := c.Directory().WithNewFile("some-file", "clobbered-sub-content") clobberedSub := clobbered.WithMountedDirectory("/mnt/dir", clobberedSubDir) t.Run("restoring mount under clobbered mount", func(t *testing.T) { mnts, err := clobberedSub.Mounts(ctx) require.NoError(t, err) require.Equal(t, []string{"/mnt", "/mnt/dir"}, mnts) out, err := clobberedSub.WithExec([]string{"cat", "/mnt/dir/some-file"}).Stdout(ctx) require.NoError(t, err) require.Equal(t, "clobbered-sub-content", out) }) } func TestContainerDirectory(t *testing.T) { t.Parallel() dirRes := struct { Directory struct { WithNewFile struct { WithNewFile struct { ID core.DirectoryID } } } }{} err := testutil.Query( `{ directory { withNewFile(path: "some-file", contents: "some-content") { withNewFile(path: "some-dir/sub-file", contents: "sub-content") { id } } } }`, &dirRes, nil) require.NoError(t, err) id := dirRes.Directory.WithNewFile.WithNewFile.ID writeRes := struct { Container struct { From struct { WithMountedDirectory struct { WithMountedDirectory struct { WithExec struct { Directory struct { ID core.DirectoryID } } } } } } }{} err = testutil.Query( `query Test($id: DirectoryID!) { container { from(address: "`+alpineImage+`") { withMountedDirectory(path: "/mnt/dir", source: $id) { withMountedDirectory(path: "/mnt/dir/overlap", source: $id) { withExec(args: ["sh", "-c", "echo hello >> /mnt/dir/overlap/another-file"]) { directory(path: "/mnt/dir/overlap") { id } } } } } } }`, &writeRes, &testutil.QueryOptions{Variables: map[string]any{ "id": id, }}) require.NoError(t, err) writtenID := writeRes.Container.From.WithMountedDirectory.WithMountedDirectory.WithExec.Directory.ID execRes := struct { Container struct { From struct { WithMountedDirectory struct { WithExec struct { Stdout string } } } } }{} err = testutil.Query( `query Test($id: DirectoryID!) { container { from(address: "`+alpineImage+`") { withMountedDirectory(path: "/mnt/dir", source: $id) { withExec(args: ["cat", "/mnt/dir/another-file"]) { stdout } } } } }`, &execRes, &testutil.QueryOptions{Variables: map[string]any{ "id": writtenID, }}) require.NoError(t, err) require.Equal(t, "hello\n", execRes.Container.From.WithMountedDirectory.WithExec.Stdout) } func TestContainerDirectoryErrors(t *testing.T) { t.Parallel() dirRes := struct { Directory struct { WithNewFile struct { WithNewFile struct { ID core.DirectoryID } } } }{} err := testutil.Query( `{ directory { withNewFile(path: "some-file", contents: "some-content") { withNewFile(path: "some-dir/sub-file", contents: "sub-content") { id } } } }`, &dirRes, nil) require.NoError(t, err) id := dirRes.Directory.WithNewFile.WithNewFile.ID err = testutil.Query( `query Test($id: DirectoryID!) { container { from(address: "`+alpineImage+`") { withMountedDirectory(path: "/mnt/dir", source: $id) { directory(path: "/mnt/dir/some-file") { id } } } } }`, nil, &testutil.QueryOptions{Variables: map[string]any{ "id": id, }}) require.Error(t, err) require.Contains(t, err.Error(), "path /mnt/dir/some-file is a file, not a directory") err = testutil.Query( `query Test($id: DirectoryID!) { container { from(address: "`+alpineImage+`") { withMountedDirectory(path: "/mnt/dir", source: $id) { directory(path: "/mnt/dir/bogus") { id } } } } }`, nil, &testutil.QueryOptions{Variables: map[string]any{ "id": id, }}) require.Error(t, err) require.Contains(t, err.Error(), "bogus: no such file or directory") err = testutil.Query( `{ container { from(address: "`+alpineImage+`") { withMountedTemp(path: "/mnt/tmp") { directory(path: "/mnt/tmp/bogus") { id } } } } }`, nil, nil) require.Error(t, err) require.Contains(t, err.Error(), "bogus: cannot retrieve path from tmpfs") cacheID := newCache(t) err = testutil.Query( `query Test($cache: CacheVolumeID!) { container { from(address: "`+alpineImage+`") { withMountedCache(path: "/mnt/cache", cache: $cache) { directory(path: "/mnt/cache/bogus") { id } } } } }`, nil, &testutil.QueryOptions{Variables: map[string]any{ "cache": cacheID, }}) require.Error(t, err) require.Contains(t, err.Error(), "bogus: cannot retrieve path from cache") } func TestContainerDirectorySourcePath(t *testing.T) { t.Parallel() dirRes := struct { Directory struct { WithNewFile struct { Directory struct { ID core.DirectoryID } } } }{} err := testutil.Query( `{ directory { withNewFile(path: "some-dir/sub-dir/sub-file", contents: "sub-content\n") { directory(path: "some-dir") { id } } } }`, &dirRes, nil) require.NoError(t, err) id := dirRes.Directory.WithNewFile.Directory.ID writeRes := struct { Container struct { From struct { WithMountedDirectory struct { WithExec struct { Directory struct { ID core.DirectoryID } } } } } }{} err = testutil.Query( `query Test($id: DirectoryID!) { container { from(address: "`+alpineImage+`") { withMountedDirectory(path: "/mnt/dir", source: $id) { withExec(args: ["sh", "-c", "echo more-content >> /mnt/dir/sub-dir/sub-file"]) { directory(path: "/mnt/dir/sub-dir") { id } } } } } }`, &writeRes, &testutil.QueryOptions{Variables: map[string]any{ "id": id, }}) require.NoError(t, err) writtenID := writeRes.Container.From.WithMountedDirectory.WithExec.Directory.ID execRes := struct { Container struct { From struct { WithMountedDirectory struct { WithExec struct { Stdout string } } } } }{} err = testutil.Query( `query Test($id: DirectoryID!) { container { from(address: "`+alpineImage+`") { withMountedDirectory(path: "/mnt/dir", source: $id) { withExec(args: ["cat", "/mnt/dir/sub-file"]) { stdout } } } } }`, &execRes, &testutil.QueryOptions{Variables: map[string]any{ "id": writtenID, }}) require.NoError(t, err) require.Equal(t, "sub-content\nmore-content\n", execRes.Container.From.WithMountedDirectory.WithExec.Stdout) } func TestContainerFile(t *testing.T) { t.Parallel() id := newDirWithFile(t, "some-file", "some-content-") writeRes := struct { Container struct { From struct { WithMountedDirectory struct { WithMountedDirectory struct { WithExec struct { File struct { ID core.FileID } } } } } } }{} err := testutil.Query( `query Test($id: DirectoryID!) { container { from(address: "`+alpineImage+`") { withMountedDirectory(path: "/mnt/dir", source: $id) { withMountedDirectory(path: "/mnt/dir/overlap", source: $id) { withExec(args: ["sh", "-c", "echo -n appended >> /mnt/dir/overlap/some-file"]) { file(path: "/mnt/dir/overlap/some-file") { id } } } } } } }`, &writeRes, &testutil.QueryOptions{Variables: map[string]any{ "id": id, }}) require.NoError(t, err) writtenID := writeRes.Container.From.WithMountedDirectory.WithMountedDirectory.WithExec.File.ID execRes := struct { Container struct { From struct { WithMountedFile struct { WithExec struct { Stdout string } } } } }{} err = testutil.Query( `query Test($id: FileID!) { container { from(address: "`+alpineImage+`") { withMountedFile(path: "/mnt/file", source: $id) { withExec(args: ["cat", "/mnt/file"]) { stdout } } } } }`, &execRes, &testutil.QueryOptions{Variables: map[string]any{ "id": writtenID, }}) require.NoError(t, err) require.Equal(t, "some-content-appended", execRes.Container.From.WithMountedFile.WithExec.Stdout) } func TestContainerFileErrors(t *testing.T) { t.Parallel() id := newDirWithFile(t, "some-file", "some-content") err := testutil.Query( `query Test($id: DirectoryID!) { container { from(address: "`+alpineImage+`") { withMountedDirectory(path: "/mnt/dir", source: $id) { file(path: "/mnt/dir/bogus") { id } } } } }`, nil, &testutil.QueryOptions{Variables: map[string]any{ "id": id, }}) require.Error(t, err) require.Contains(t, err.Error(), "bogus: no such file or directory") err = testutil.Query( `query Test($id: DirectoryID!) { container { from(address: "`+alpineImage+`") { withMountedDirectory(path: "/mnt/dir", source: $id) { file(path: "/mnt/dir") { id } } } } }`, nil, &testutil.QueryOptions{Variables: map[string]any{ "id": id, }}) require.Error(t, err) require.Contains(t, err.Error(), "path /mnt/dir is a directory, not a file") err = testutil.Query( `{ container { from(address: "`+alpineImage+`") { withMountedTemp(path: "/mnt/tmp") { file(path: "/mnt/tmp/bogus") { id } } } } }`, nil, nil) require.Error(t, err) require.Contains(t, err.Error(), "bogus: cannot retrieve path from tmpfs") cacheID := newCache(t) err = testutil.Query( `query Test($cache: CacheVolumeID!) { container { from(address: "`+alpineImage+`") { withMountedCache(path: "/mnt/cache", cache: $cache) { file(path: "/mnt/cache/bogus") { id } } } } }`, nil, &testutil.QueryOptions{Variables: map[string]any{ "cache": cacheID, }}) require.Error(t, err) require.Contains(t, err.Error(), "bogus: cannot retrieve path from cache") err = testutil.Query( `query Test($secret: SecretID!) { container { from(address: "`+alpineImage+`") { withMountedSecret(path: "/sekret", source: $secret) { file(path: "/sekret") { contents } } } } }`, nil, &testutil.QueryOptions{Secrets: map[string]string{ "secret": "some-secret", }}) require.Error(t, err) require.Contains(t, err.Error(), "sekret: no such file or directory") } func TestContainerFSDirectory(t *testing.T) { t.Parallel() dirRes := struct { Container struct { From struct { Directory struct { ID core.DirectoryID } } } }{} err := testutil.Query( `{ container { from(address: "`+alpineImage+`") { directory(path: "/etc") { id } } } }`, &dirRes, nil) require.NoError(t, err) etcID := dirRes.Container.From.Directory.ID execRes := struct { Container struct { From struct { WithMountedDirectory struct { WithExec struct { Stdout string } } } } }{} err = testutil.Query( `query Test($id: DirectoryID!) { container { from(address: "`+alpineImage+`") { withMountedDirectory(path: "/mnt/etc", source: $id) { withExec(args: ["cat", "/mnt/etc/alpine-release"]) { stdout } } } } }`, &execRes, &testutil.QueryOptions{Variables: map[string]any{ "id": etcID, }}) require.NoError(t, err) require.Equal(t, "3.18.2\n", execRes.Container.From.WithMountedDirectory.WithExec.Stdout) } func TestContainerRelativePaths(t *testing.T) { t.Parallel() dirRes := struct { Directory struct { WithNewFile struct { ID core.DirectoryID } } }{} err := testutil.Query( `{ directory { withNewFile(path: "some-file", contents: "some-content") { id } } }`, &dirRes, nil) require.NoError(t, err) id := dirRes.Directory.WithNewFile.ID writeRes := struct { Container struct { From struct { WithExec struct { WithWorkdir struct { WithWorkdir struct { Workdir string WithMountedDirectory struct { WithMountedTemp struct { WithMountedCache struct { Mounts []string WithExec struct { Directory struct { ID core.DirectoryID } } WithoutMount struct { Mounts []string } } } } } } } } } }{} cacheID := newCache(t) err = testutil.Query( `query Test($id: DirectoryID!, $cache: CacheVolumeID!) { container { from(address: "`+alpineImage+`") { withExec(args: ["mkdir", "-p", "/mnt/sub"]) { withWorkdir(path: "/mnt") { withWorkdir(path: "sub") { workdir withMountedDirectory(path: "dir", source: $id) { withMountedTemp(path: "tmp") { withMountedCache(path: "cache", cache: $cache) { mounts withExec(args: ["touch", "dir/another-file"]) { directory(path: "dir") { id } } withoutMount(path: "cache") { mounts } } } } } } } } } }`, &writeRes, &testutil.QueryOptions{Variables: map[string]any{ "id": id, "cache": cacheID, }}) require.NoError(t, err) require.Equal(t, []string{"/mnt/sub/dir", "/mnt/sub/tmp", "/mnt/sub/cache"}, writeRes.Container.From.WithExec.WithWorkdir.WithWorkdir.WithMountedDirectory.WithMountedTemp.WithMountedCache.Mounts) require.Equal(t, []string{"/mnt/sub/dir", "/mnt/sub/tmp"}, writeRes.Container.From.WithExec.WithWorkdir.WithWorkdir.WithMountedDirectory.WithMountedTemp.WithMountedCache.WithoutMount.Mounts) writtenID := writeRes.Container.From.WithExec.WithWorkdir.WithWorkdir.WithMountedDirectory.WithMountedTemp.WithMountedCache.WithExec.Directory.ID execRes := struct { Container struct { From struct { WithMountedDirectory struct { WithExec struct { Stdout string } } } } }{} err = testutil.Query( `query Test($id: DirectoryID!) { container { from(address: "`+alpineImage+`") { withMountedDirectory(path: "/mnt/dir", source: $id) { withExec(args: ["ls", "/mnt/dir"]) { stdout } } } } }`, &execRes, &testutil.QueryOptions{Variables: map[string]any{ "id": writtenID, }}) require.NoError(t, err) require.Equal(t, "another-file\nsome-file\n", execRes.Container.From.WithMountedDirectory.WithExec.Stdout) } func TestContainerMultiFrom(t *testing.T) { t.Parallel() dirRes := struct { Directory struct { ID core.DirectoryID } }{} err := testutil.Query( `{ directory { id } }`, &dirRes, nil) require.NoError(t, err) id := dirRes.Directory.ID execRes := struct { Container struct { From struct { WithMountedDirectory struct { WithExec struct { From struct { WithExec struct { WithExec struct { Stdout string } } } } } } } }{} err = testutil.Query( `query Test($id: DirectoryID!) { container { from(address: "node:18.10.0-alpine") { withMountedDirectory(path: "/mnt", source: $id) { withExec(args: ["sh", "-c", "node --version >> /mnt/versions"]) { from(address: "golang:1.18.2-alpine") { withExec(args: ["sh", "-c", "go version >> /mnt/versions"]) { withExec(args: ["cat", "/mnt/versions"]) { stdout } } } } } } } }`, &execRes, &testutil.QueryOptions{Variables: map[string]any{ "id": id, }}) require.NoError(t, err) require.Contains(t, execRes.Container.From.WithMountedDirectory.WithExec.From.WithExec.WithExec.Stdout, "v18.10.0\n") require.Contains(t, execRes.Container.From.WithMountedDirectory.WithExec.From.WithExec.WithExec.Stdout, "go version go1.18.2") } func TestContainerPublish(t *testing.T) { c, ctx := connect(t) testRef := registryRef("container-publish") entrypoint := []string{"echo", "im-a-entrypoint"} ctr := c.Container().From(alpineImage). WithDefaultArgs(dagger.ContainerWithDefaultArgsOpts{}). WithEntrypoint(entrypoint) pushedRef, err := ctr.Publish(ctx, testRef) require.NoError(t, err) require.NotEqual(t, testRef, pushedRef) require.Contains(t, pushedRef, "@sha256:") pulledCtr := c.Container().From(pushedRef) contents, err := pulledCtr.File("/etc/alpine-release").Contents(ctx) require.NoError(t, err) require.Equal(t, contents, "3.18.2\n") output, err := pulledCtr.WithExec(nil).Stdout(ctx) require.NoError(t, err) require.Equal(t, "im-a-entrypoint\n", output) } func TestExecFromScratch(t *testing.T) { c, ctx := connect(t) // execute it from scratch, where there is no default platform, make sure it works and can be pushed execBusybox := c.Container(). // /bin/busybox is a static binary WithMountedFile("/busybox", c.Container().From("busybox:musl").File("/bin/busybox")). WithExec([]string{"/busybox"}) _, err := execBusybox.Stdout(ctx) require.NoError(t, err) _, err = execBusybox.Publish(ctx, registryRef("from-scratch")) require.NoError(t, err) } func TestContainerMultipleMounts(t *testing.T) { c, ctx := connect(t) dir := t.TempDir() require.NoError(t, os.WriteFile(filepath.Join(dir, "one"), []byte("1"), 0o600)) require.NoError(t, os.WriteFile(filepath.Join(dir, "two"), []byte("2"), 0o600)) require.NoError(t, os.WriteFile(filepath.Join(dir, "three"), []byte("3"), 0o600)) one := c.Host().Directory(dir).File("one") two := c.Host().Directory(dir).File("two") three := c.Host().Directory(dir).File("three") build := c.Container().From(alpineImage). WithMountedFile("/example/one", one). WithMountedFile("/example/two", two). WithMountedFile("/example/three", three) build = build.WithExec([]string{"ls", "/example/one", "/example/two", "/example/three"}) build = build.WithExec([]string{"cat", "/example/one", "/example/two", "/example/three"}) out, err := build.Stdout(ctx) require.NoError(t, err) require.Equal(t, "123", out) } func TestContainerExport(t *testing.T) { t.Parallel() wd := t.TempDir() dest := t.TempDir() c, ctx := connect(t, dagger.WithWorkdir(wd)) entrypoint := []string{"sh", "-c", "im-a-entrypoint"} ctr := c.Container().From(alpineImage). WithEntrypoint(entrypoint) t.Run("to absolute dir", func(t *testing.T) { for _, useAsTarball := range []bool{true, false} { t.Run(fmt.Sprintf("useAsTarball=%t", useAsTarball), func(t *testing.T) { imagePath := filepath.Join(dest, "image.tar") if useAsTarball { tarFile := ctr.AsTarball() ok, err := tarFile.Export(ctx, imagePath) require.NoError(t, err) require.True(t, ok) } else { ok, err := ctr.Export(ctx, imagePath) require.NoError(t, err) require.True(t, ok) } stat, err := os.Stat(imagePath) require.NoError(t, err) require.NotZero(t, stat.Size()) require.EqualValues(t, 0o600, stat.Mode().Perm()) entries := tarEntries(t, imagePath) require.Contains(t, entries, "oci-layout") require.Contains(t, entries, "index.json") // a single-platform image includes a manifest.json, making it // compatible with docker load require.Contains(t, entries, "manifest.json") dockerManifestBytes := readTarFile(t, imagePath, "manifest.json") // NOTE: this is what buildkit integ tests do, use a one-off struct rather than actual defined type var dockerManifest []struct { Config string } require.NoError(t, json.Unmarshal(dockerManifestBytes, &dockerManifest)) require.Len(t, dockerManifest, 1) configPath := dockerManifest[0].Config configBytes := readTarFile(t, imagePath, configPath) var img ocispecs.Image require.NoError(t, json.Unmarshal(configBytes, &img)) require.Equal(t, entrypoint, img.Config.Entrypoint) }) } }) t.Run("to workdir", func(t *testing.T) { ok, err := ctr.Export(ctx, "./image.tar") require.NoError(t, err) require.True(t, ok) stat, err := os.Stat(filepath.Join(wd, "image.tar")) require.NoError(t, err) require.NotZero(t, stat.Size()) require.EqualValues(t, 0o600, stat.Mode().Perm()) entries := tarEntries(t, filepath.Join(wd, "image.tar")) require.Contains(t, entries, "oci-layout") require.Contains(t, entries, "index.json") require.Contains(t, entries, "manifest.json") }) t.Run("to subdir", func(t *testing.T) { ok, err := ctr.Export(ctx, "./foo/image.tar") require.NoError(t, err) require.True(t, ok) entries := tarEntries(t, filepath.Join(wd, "foo", "image.tar")) require.Contains(t, entries, "oci-layout") require.Contains(t, entries, "index.json") require.Contains(t, entries, "manifest.json") }) t.Run("to outer dir", func(t *testing.T) { ok, err := ctr.Export(ctx, "../") require.Error(t, err) require.False(t, ok) }) } // NOTE: more test coverage of Container.AsTarball are in TestContainerExport and TestContainerMultiPlatformExport func TestContainerAsTarball(t *testing.T) { t.Parallel() c, ctx := connect(t) ctr := c.Container().From(alpineImage) output, err := ctr. WithMountedFile("/foo.tar", ctr.AsTarball()). WithExec([]string{"apk", "add", "file"}). WithExec([]string{"file", "/foo.tar"}). Stdout(ctx) require.NoError(t, err) require.Equal(t, "/foo.tar: POSIX tar archive\n", output) } func TestContainerImport(t *testing.T) { t.Parallel() c, ctx := connect(t) t.Run("OCI", func(t *testing.T) { pf, err := c.DefaultPlatform(ctx) require.NoError(t, err) platform, err := platforms.Parse(string(pf)) require.NoError(t, err) config := map[string]any{ "contents": map[string]any{ "keyring": []string{ "https://packages.wolfi.dev/os/wolfi-signing.rsa.pub", }, "repositories": []string{ "https://packages.wolfi.dev/os", }, "packages": []string{ "wolfi-base", }, }, "cmd": "/bin/sh -l", "environment": map[string]string{ "FOO": "bar", }, "archs": []string{ platform.Architecture, }, } cfgYaml, err := yaml.Marshal(config) require.NoError(t, err) apko := c.Container(). From("cgr.dev/chainguard/apko:latest"). WithNewFile("config.yml", dagger.ContainerWithNewFileOpts{ Contents: string(cfgYaml), }) imageFile := apko. WithExec([]string{ "build", "config.yml", "latest", "output.tar", }). File("output.tar") imported := c.Container().Import(imageFile) out, err := imported.WithExec([]string{"sh", "-c", "echo $FOO"}).Stdout(ctx) require.NoError(t, err) require.Equal(t, "bar\n", out) }) t.Run("Docker", func(t *testing.T) { out, err := c.Container(). Import(c.Container().From(alpineImage).WithEnvVariable("FOO", "bar").AsTarball(dagger.ContainerAsTarballOpts{ MediaTypes: dagger.Dockermediatypes, })). WithExec([]string{"sh", "-c", "echo $FOO"}).Stdout(ctx) require.NoError(t, err) require.Equal(t, "bar\n", out) }) } func TestContainerFromIDPlatform(t *testing.T) { c, ctx := connect(t) var desiredPlatform dagger.Platform = "linux/arm64" id, err := c.Container(dagger.ContainerOpts{ Platform: desiredPlatform, }).From(alpineImage).ID(ctx) require.NoError(t, err) platform, err := c.Container(dagger.ContainerOpts{ ID: id, }).Platform(ctx) require.NoError(t, err) require.Equal(t, desiredPlatform, platform) } func TestContainerMultiPlatformExport(t *testing.T) { for _, useAsTarball := range []bool{true, false} { t.Run(fmt.Sprintf("useAsTarball=%t", useAsTarball), func(t *testing.T) { c, ctx := connect(t) variants := make([]*dagger.Container, 0, len(platformToUname)) for platform, uname := range platformToUname { ctr := c.Container(dagger.ContainerOpts{Platform: platform}). From(alpineImage). WithExec([]string{"uname", "-m"}). WithDefaultArgs(dagger.ContainerWithDefaultArgsOpts{}). WithEntrypoint([]string{"echo", uname}) variants = append(variants, ctr) } dest := filepath.Join(t.TempDir(), "image.tar") if useAsTarball { tarFile := c.Container().AsTarball(dagger.ContainerAsTarballOpts{ PlatformVariants: variants, }) ok, err := tarFile.Export(ctx, dest) require.NoError(t, err) require.True(t, ok) } else { ok, err := c.Container().Export(ctx, dest, dagger.ContainerExportOpts{ PlatformVariants: variants, }) require.NoError(t, err) require.True(t, ok) } entries := tarEntries(t, dest) require.Contains(t, entries, "oci-layout") // multi-platform images don't contain a manifest.json require.NotContains(t, entries, "manifest.json") indexBytes := readTarFile(t, dest, "index.json") var index ocispecs.Index require.NoError(t, json.Unmarshal(indexBytes, &index)) // index is nested (search "nested index" in spec here): // https://github.com/opencontainers/image-spec/blob/main/image-index.md nestedIndexDigest := index.Manifests[0].Digest indexBytes = readTarFile(t, dest, "blobs/sha256/"+nestedIndexDigest.Encoded()) index = ocispecs.Index{} require.NoError(t, json.Unmarshal(indexBytes, &index)) // make sure all the platforms we expected are there exportedPlatforms := make(map[string]struct{}) for _, desc := range index.Manifests { require.NotNil(t, desc.Platform) platformStr := platforms.Format(*desc.Platform) exportedPlatforms[platformStr] = struct{}{} manifestDigest := desc.Digest manifestBytes := readTarFile(t, dest, "blobs/sha256/"+manifestDigest.Encoded()) var manifest ocispecs.Manifest require.NoError(t, json.Unmarshal(manifestBytes, &manifest)) configDigest := manifest.Config.Digest configBytes := readTarFile(t, dest, "blobs/sha256/"+configDigest.Encoded()) var config ocispecs.Image require.NoError(t, json.Unmarshal(configBytes, &config)) require.Equal(t, []string{"echo", platformToUname[dagger.Platform(platformStr)]}, config.Config.Entrypoint) } for platform := range platformToUname { delete(exportedPlatforms, string(platform)) } require.Empty(t, exportedPlatforms) }) } } // Multiplatform publish is also tested in more complicated scenarios in platform_test.go func TestContainerMultiPlatformPublish(t *testing.T) { c, ctx := connect(t) variants := make([]*dagger.Container, 0, len(platformToUname)) for platform, uname := range platformToUname { ctr := c.Container(dagger.ContainerOpts{Platform: platform}). From(alpineImage). WithExec([]string{"uname", "-m"}). WithDefaultArgs(dagger.ContainerWithDefaultArgsOpts{}). WithEntrypoint([]string{"echo", uname}) variants = append(variants, ctr) } testRef := registryRef("container-multiplatform-publish") publishedRef, err := c.Container().Publish(ctx, testRef, dagger.ContainerPublishOpts{ PlatformVariants: variants, }) require.NoError(t, err) for platform, uname := range platformToUname { output, err := c.Container(dagger.ContainerOpts{Platform: platform}). From(publishedRef). WithExec(nil).Stdout(ctx) require.NoError(t, err) require.Equal(t, uname+"\n", output) } } func TestContainerMultiPlatformImport(t *testing.T) { c, ctx := connect(t) variants := make([]*dagger.Container, 0, len(platformToUname)) for platform := range platformToUname { ctr := c.Container(dagger.ContainerOpts{Platform: platform}). From(alpineImage) variants = append(variants, ctr) } tmp := t.TempDir() imagePath := filepath.Join(tmp, "image.tar") ok, err := c.Container().Export(ctx, imagePath, dagger.ContainerExportOpts{ PlatformVariants: variants, }) require.NoError(t, err) require.True(t, ok) for platform, uname := range platformToUname { imported := c.Container(dagger.ContainerOpts{Platform: platform}). Import(c.Host().Directory(tmp).File("image.tar")) out, err := imported.WithExec([]string{"uname", "-m"}).Stdout(ctx) require.NoError(t, err) require.Equal(t, uname+"\n", out) } } func TestContainerWithDirectoryToMount(t *testing.T) { t.Parallel() c, ctx := connect(t) mnt := c.Directory(). WithNewDirectory("/top/sub-dir/sub-file"). Directory("/top") // <-- the important part! ctr := c.Container(). From(alpineImage). WithMountedDirectory("/mnt", mnt) dir := c.Directory(). WithNewFile("/copied-file", "some-content") ctr = ctr.WithDirectory("/mnt/sub-dir/copied-dir", dir) contents, err := ctr.WithExec([]string{"find", "/mnt"}).Stdout(ctx) require.NoError(t, err) require.ElementsMatch(t, []string{ "/mnt", "/mnt/sub-dir", "/mnt/sub-dir/sub-file", "/mnt/sub-dir/copied-dir", "/mnt/sub-dir/copied-dir/copied-file", }, strings.Split(strings.Trim(contents, "\n"), "\n")) } func TestContainerExecError(t *testing.T) { t.Parallel() c, ctx := connect(t) outMsg := "THIS SHOULD GO TO STDOUT" encodedOutMsg := base64.StdEncoding.EncodeToString([]byte(outMsg)) errMsg := "THIS SHOULD GO TO STDERR" encodedErrMsg := base64.StdEncoding.EncodeToString([]byte(errMsg)) t.Run("includes output of failed exec in error", func(t *testing.T) { _, err := c.Container(). From(alpineImage). WithExec([]string{"sh", "-c", fmt.Sprintf( `echo %s | base64 -d >&1; echo %s | base64 -d >&2; exit 1`, encodedOutMsg, encodedErrMsg, )}). Sync(ctx) var exErr *dagger.ExecError require.ErrorAs(t, err, &exErr) require.Equal(t, outMsg, exErr.Stdout) require.Equal(t, errMsg, exErr.Stderr) }) t.Run("includes output of failed exec in error when redirects are enabled", func(t *testing.T) { _, err := c.Container(). From(alpineImage). WithExec( []string{"sh", "-c", fmt.Sprintf( `echo %s | base64 -d >&1; echo %s | base64 -d >&2; exit 1`, encodedOutMsg, encodedErrMsg, )}, dagger.ContainerWithExecOpts{ RedirectStdout: "/out", RedirectStderr: "/err", }, ). Sync(ctx) var exErr *dagger.ExecError require.ErrorAs(t, err, &exErr) require.Equal(t, outMsg, exErr.Stdout) require.Equal(t, errMsg, exErr.Stderr) }) t.Run("truncates output past a maximum size", func(t *testing.T) { // fill a byte buffer with a string that is slightly over the size of the max output // size, then base64 encode it var stdoutBuf bytes.Buffer for i := 0; i < buildkit.MaxExecErrorOutputBytes+50; i++ { stdoutBuf.WriteByte('a') } stdoutStr := stdoutBuf.String() encodedOutMsg := base64.StdEncoding.EncodeToString(stdoutBuf.Bytes()) var stderrBuf bytes.Buffer for i := 0; i < buildkit.MaxExecErrorOutputBytes+50; i++ { stderrBuf.WriteByte('b') } stderrStr := stderrBuf.String() encodedErrMsg := base64.StdEncoding.EncodeToString(stderrBuf.Bytes()) truncMsg := fmt.Sprintf(buildkit.TruncationMessage, 50) _, err := c.Container(). From(alpineImage). WithDirectory("/", c.Directory(). WithNewFile("encout", encodedOutMsg). WithNewFile("encerr", encodedErrMsg), ). WithExec([]string{"sh", "-c", "base64 -d encout >&1; base64 -d encerr >&2; exit 1"}). Sync(ctx) var exErr *dagger.ExecError require.ErrorAs(t, err, &exErr) require.Equal(t, truncMsg+stdoutStr[:buildkit.MaxExecErrorOutputBytes-len(truncMsg)], exErr.Stdout) require.Equal(t, truncMsg+stderrStr[:buildkit.MaxExecErrorOutputBytes-len(truncMsg)], exErr.Stderr) }) } func TestContainerWithRegistryAuth(t *testing.T) { t.Parallel() c, ctx := connect(t) testRef := privateRegistryRef("container-with-registry-auth") container := c.Container().From(alpineImage) // Push without credentials should fail _, err := container.Publish(ctx, testRef) require.Error(t, err) pushedRef, err := container. WithRegistryAuth( privateRegistryHost, "john", c.SetSecret("this-secret", "xFlejaPdjrt25Dvr"), ). Publish(ctx, testRef) require.NoError(t, err) require.NotEqual(t, testRef, pushedRef) require.Contains(t, pushedRef, "@sha256:") } func TestContainerImageRef(t *testing.T) { t.Parallel() t.Run("should test query returning imageRef", func(t *testing.T) { res := struct { Container struct { From struct { ImageRef string } } }{} err := testutil.Query( `{ container { from(address: "`+alpineImage+`") { imageRef } } }`, &res, nil) require.NoError(t, err) require.Contains(t, res.Container.From.ImageRef, "docker.io/library/alpine:3.18.2@sha256:") }) t.Run("should throw error after the container image modification with exec", func(t *testing.T) { res := struct { Container struct { From struct { ImageRef string } } }{} err := testutil.Query( `{ container { from(address:"hello-world") { withExec(args:["/hello"]) { imageRef } } } }`, &res, nil) require.Error(t, err) require.Contains(t, err.Error(), "Image reference can only be retrieved immediately after the 'Container.From' call. Error in fetching imageRef as the container image is changed") }) t.Run("should throw error after the container image modification with exec", func(t *testing.T) { res := struct { Container struct { From struct { ImageRef string } } }{} err := testutil.Query( `{ container { from(address:"hello-world") { withExec(args:["/hello"]) { imageRef } } } }`, &res, nil) require.Error(t, err) require.Contains(t, err.Error(), "Image reference can only be retrieved immediately after the 'Container.From' call. Error in fetching imageRef as the container image is changed") }) t.Run("should throw error after the container image modification with directory", func(t *testing.T) { c, ctx := connect(t) dir := c.Directory(). WithNewFile("some-file", "some-content"). WithNewFile("some-dir/sub-file", "sub-content"). Directory("some-dir") ctr := c.Container(). From(alpineImage). WithWorkdir("/workdir"). WithDirectory("with-dir", dir) _, err := ctr.ImageRef(ctx) require.Error(t, err) require.Contains(t, err.Error(), "Image reference can only be retrieved immediately after the 'Container.From' call. Error in fetching imageRef as the container image is changed") }) } func TestContainerBuildNilContextError(t *testing.T) { t.Parallel() // regression test, this previously caused the engine to panic err := testutil.Query( `{ container { build(context: "") { id } } }`, &map[any]any{}, nil) require.ErrorContains(t, err, "invalid nil input definition to definition op") } func TestContainerInsecureRootCapabilites(t *testing.T) { c, ctx := connect(t) // This isn't exhaustive, but it's the major important ones. Being exhaustive // is trickier since the full list of caps is host dependent based on the kernel version. privilegedCaps := []string{ "cap_sys_admin", "cap_net_admin", "cap_sys_module", "cap_sys_ptrace", "cap_sys_boot", "cap_sys_rawio", "cap_sys_resource", } for _, capSet := range []string{"CapPrm", "CapEff", "CapBnd"} { out, err := c.Container().From(alpineImage). WithExec([]string{"apk", "add", "libcap"}). WithExec([]string{"sh", "-c", "capsh --decode=$(grep " + capSet + " /proc/self/status | awk '{print $2}')"}). Stdout(ctx) require.NoError(t, err) for _, privCap := range privilegedCaps { require.NotContains(t, out, privCap) } } for _, capSet := range []string{"CapPrm", "CapEff", "CapBnd", "CapInh", "CapAmb"} { out, err := c.Container().From(alpineImage). WithExec([]string{"apk", "add", "libcap"}). WithExec([]string{"sh", "-c", "capsh --decode=$(grep " + capSet + " /proc/self/status | awk '{print $2}')"}, dagger.ContainerWithExecOpts{ InsecureRootCapabilities: true, }). Stdout(ctx) require.NoError(t, err) for _, privCap := range privilegedCaps { require.Contains(t, out, privCap) } } } func TestContainerInsecureRootCapabilitesWithService(t *testing.T) { c, ctx := connect(t) // verify the root capabilities setting works by executing dockerd with it and // testing it can startup, create containers and bind mount from its filesystem to // them. dockerd := c.Container().From("docker:23.0.1-dind"). WithMountedCache("/var/lib/docker", c.CacheVolume("docker-lib"), dagger.ContainerWithMountedCacheOpts{ Sharing: dagger.Private, }). WithMountedCache("/tmp", c.CacheVolume("share-tmp")). WithExposedPort(2375). WithExec([]string{ "dockerd", "--host=tcp://0.0.0.0:2375", "--tls=false", }, dagger.ContainerWithExecOpts{ InsecureRootCapabilities: true, }).AsService() dockerHost, err := dockerd.Endpoint(ctx, dagger.ServiceEndpointOpts{ Scheme: "tcp", }) require.NoError(t, err) randID := identity.NewID() out, err := c.Container().From("docker:23.0.1-cli"). WithMountedCache("/tmp", c.CacheVolume("share-tmp")). WithServiceBinding("docker", dockerd). WithEnvVariable("DOCKER_HOST", dockerHost). WithExec([]string{"sh", "-e", "-c", strings.Join([]string{ fmt.Sprintf("echo %s-from-outside > /tmp/from-outside", randID), "docker run --rm -v /tmp:/tmp alpine cat /tmp/from-outside", fmt.Sprintf("docker run --rm -v /tmp:/tmp alpine sh -c 'echo %s-from-inside > /tmp/from-inside'", randID), "cat /tmp/from-inside", }, "\n")}). Stdout(ctx) require.NoError(t, err) require.Equal(t, fmt.Sprintf("%s-from-outside\n%s-from-inside\n", randID, randID), out) } func TestContainerNoExec(t *testing.T) { c, ctx := connect(t) stdout, err := c.Container().From(alpineImage).Stdout(ctx) require.NoError(t, err) require.Equal(t, "", stdout) stderr, err := c.Container().From(alpineImage).Stderr(ctx) require.NoError(t, err) require.Equal(t, "", stderr) _, err = c.Container(). From(alpineImage). WithDefaultArgs(dagger.ContainerWithDefaultArgsOpts{ Args: nil, }). Stdout(ctx) require.Error(t, err) require.Contains(t, err.Error(), "no command has been set") } func TestContainerWithMountedFileOwner(t *testing.T) { c, ctx := connect(t) t.Run("simple file", func(t *testing.T) { tmp := t.TempDir() err := os.WriteFile(filepath.Join(tmp, "message.txt"), []byte("hello world"), 0o600) require.NoError(t, err) file := c.Host().Directory(tmp).File("message.txt") testOwnership(ctx, t, c, func(ctr *dagger.Container, name string, owner string) *dagger.Container { return ctr.WithMountedFile(name, file, dagger.ContainerWithMountedFileOpts{ Owner: owner, }) }) }) t.Run("file from subdirectory", func(t *testing.T) { tmp := t.TempDir() err := os.Mkdir(filepath.Join(tmp, "subdir"), 0o755) require.NoError(t, err) err = os.WriteFile(filepath.Join(tmp, "subdir", "message.txt"), []byte("hello world"), 0o600) require.NoError(t, err) file := c.Host().Directory(tmp).Directory("subdir").File("message.txt") testOwnership(ctx, t, c, func(ctr *dagger.Container, name string, owner string) *dagger.Container { return ctr.WithMountedFile(name, file, dagger.ContainerWithMountedFileOpts{ Owner: owner, }) }) }) } func TestContainerWithMountedDirectoryOwner(t *testing.T) { c, ctx := connect(t) t.Run("simple directory", func(t *testing.T) { tmp := t.TempDir() err := os.WriteFile(filepath.Join(tmp, "message.txt"), []byte("hello world"), 0o600) require.NoError(t, err) dir := c.Host().Directory(tmp) testOwnership(ctx, t, c, func(ctr *dagger.Container, name string, owner string) *dagger.Container { return ctr.WithMountedDirectory(name, dir, dagger.ContainerWithMountedDirectoryOpts{ Owner: owner, }) }) }) t.Run("subdirectory", func(t *testing.T) { tmp := t.TempDir() err := os.Mkdir(filepath.Join(tmp, "subdir"), 0o755) require.NoError(t, err) err = os.WriteFile(filepath.Join(tmp, "subdir", "message.txt"), []byte("hello world"), 0o600) require.NoError(t, err) dir := c.Host().Directory(tmp).Directory("subdir") testOwnership(ctx, t, c, func(ctr *dagger.Container, name string, owner string) *dagger.Container { return ctr.WithMountedDirectory(name, dir, dagger.ContainerWithMountedDirectoryOpts{ Owner: owner, }) }) }) t.Run("permissions", func(t *testing.T) { dir := c.Directory(). WithNewDirectory("perms", dagger.DirectoryWithNewDirectoryOpts{ Permissions: 0o745, }). WithNewFile("perms/foo", "whee", dagger.DirectoryWithNewFileOpts{ Permissions: 0o645, }). Directory("perms") ctr := c.Container().From(alpineImage). WithExec([]string{"adduser", "-D", "inherituser"}). WithExec([]string{"adduser", "-u", "1234", "-D", "auser"}). WithExec([]string{"addgroup", "-g", "4321", "agroup"}). WithUser("inherituser"). WithMountedDirectory("/data", dir, dagger.ContainerWithMountedDirectoryOpts{ Owner: "auser:agroup", }) out, err := ctr.WithExec([]string{"stat", "-c", "%a:%U:%G", "/data"}).Stdout(ctx) require.NoError(t, err) require.Equal(t, "745:auser:agroup\n", out) out, err = ctr.WithExec([]string{"stat", "-c", "%a:%U:%G", "/data/foo"}).Stdout(ctx) require.NoError(t, err) require.Equal(t, "645:auser:agroup\n", out) }) } func TestContainerWithFileOwner(t *testing.T) { c, ctx := connect(t) t.Run("simple file", func(t *testing.T) { tmp := t.TempDir() err := os.WriteFile(filepath.Join(tmp, "message.txt"), []byte("hello world"), 0o600) require.NoError(t, err) file := c.Host().Directory(tmp).File("message.txt") testOwnership(ctx, t, c, func(ctr *dagger.Container, name string, owner string) *dagger.Container { return ctr.WithFile(name, file, dagger.ContainerWithFileOpts{ Owner: owner, }) }) }) t.Run("file from subdirectory", func(t *testing.T) { tmp := t.TempDir() err := os.Mkdir(filepath.Join(tmp, "subdir"), 0o755) require.NoError(t, err) err = os.WriteFile(filepath.Join(tmp, "subdir", "message.txt"), []byte("hello world"), 0o600) require.NoError(t, err) file := c.Host().Directory(tmp).Directory("subdir").File("message.txt") testOwnership(ctx, t, c, func(ctr *dagger.Container, name string, owner string) *dagger.Container { return ctr.WithFile(name, file, dagger.ContainerWithFileOpts{ Owner: owner, }) }) }) } func TestContainerWithDirectoryOwner(t *testing.T) { c, ctx := connect(t) t.Run("simple directory", func(t *testing.T) { tmp := t.TempDir() err := os.WriteFile(filepath.Join(tmp, "message.txt"), []byte("hello world"), 0o600) require.NoError(t, err) dir := c.Host().Directory(tmp) testOwnership(ctx, t, c, func(ctr *dagger.Container, name string, owner string) *dagger.Container { return ctr.WithDirectory(name, dir, dagger.ContainerWithDirectoryOpts{ Owner: owner, }) }) }) t.Run("subdirectory", func(t *testing.T) { tmp := t.TempDir() err := os.Mkdir(filepath.Join(tmp, "subdir"), 0o755) require.NoError(t, err) err = os.WriteFile(filepath.Join(tmp, "subdir", "message.txt"), []byte("hello world"), 0o600) require.NoError(t, err) dir := c.Host().Directory(tmp).Directory("subdir") testOwnership(ctx, t, c, func(ctr *dagger.Container, name string, owner string) *dagger.Container { return ctr.WithDirectory(name, dir, dagger.ContainerWithDirectoryOpts{ Owner: owner, }) }) }) } func TestContainerWithNewFileOwner(t *testing.T) { c, ctx := connect(t) testOwnership(ctx, t, c, func(ctr *dagger.Container, name string, owner string) *dagger.Container { return ctr.WithNewFile(name, dagger.ContainerWithNewFileOpts{ Owner: owner, }) }) } func TestContainerWithMountedCacheOwner(t *testing.T) { c, ctx := connect(t) cache := c.CacheVolume("test") testOwnership(ctx, t, c, func(ctr *dagger.Container, name string, owner string) *dagger.Container { return ctr.WithMountedCache(name, cache, dagger.ContainerWithMountedCacheOpts{ Owner: owner, }) }) t.Run("permissions (empty)", func(t *testing.T) { ctr := c.Container().From(alpineImage). WithExec([]string{"adduser", "-D", "inherituser"}). WithExec([]string{"adduser", "-u", "1234", "-D", "auser"}). WithExec([]string{"addgroup", "-g", "4321", "agroup"}). WithUser("inherituser"). WithMountedCache("/data", cache, dagger.ContainerWithMountedCacheOpts{ Owner: "auser:agroup", }) out, err := ctr.WithExec([]string{"stat", "-c", "%a:%U:%G", "/data"}).Stdout(ctx) require.NoError(t, err) require.Equal(t, "755:auser:agroup\n", out) }) t.Run("permissions (source)", func(t *testing.T) { dir := c.Directory(). WithNewDirectory("perms", dagger.DirectoryWithNewDirectoryOpts{ Permissions: 0o745, }). WithNewFile("perms/foo", "whee", dagger.DirectoryWithNewFileOpts{ Permissions: 0o645, }). Directory("perms") ctr := c.Container().From(alpineImage). WithExec([]string{"adduser", "-D", "inherituser"}). WithExec([]string{"adduser", "-u", "1234", "-D", "auser"}). WithExec([]string{"addgroup", "-g", "4321", "agroup"}). WithUser("inherituser"). WithMountedCache("/data", cache, dagger.ContainerWithMountedCacheOpts{ Source: dir, Owner: "auser:agroup", }) out, err := ctr.WithExec([]string{"stat", "-c", "%a:%U:%G", "/data"}).Stdout(ctx) require.NoError(t, err) require.Equal(t, "745:auser:agroup\n", out) out, err = ctr.WithExec([]string{"stat", "-c", "%a:%U:%G", "/data/foo"}).Stdout(ctx) require.NoError(t, err) require.Equal(t, "645:auser:agroup\n", out) }) } func TestContainerWithMountedSecretOwner(t *testing.T) { c, ctx := connect(t) secret := c.SetSecret("test", "hunter2") testOwnership(ctx, t, c, func(ctr *dagger.Container, name string, owner string) *dagger.Container { return ctr.WithMountedSecret(name, secret, dagger.ContainerWithMountedSecretOpts{ Owner: owner, }) }) } func TestContainerParallelMutation(t *testing.T) { t.Parallel() res := struct { Container struct { A struct { EnvVariable string } B string } }{} err := testutil.Query( `{ container { a: withEnvVariable(name: "FOO", value: "BAR") { envVariable(name: "FOO") } b: envVariable(name: "FOO") } }`, &res, nil) require.NoError(t, err) require.Equal(t, res.Container.A.EnvVariable, "BAR") require.Empty(t, res.Container.B, "BAR") } func TestContainerForceCompression(t *testing.T) { t.Parallel() for _, tc := range []struct { compression dagger.ImageLayerCompression expectedOCIMediaType string }{ { dagger.Gzip, "application/vnd.oci.image.layer.v1.tar+gzip", }, { dagger.Zstd, "application/vnd.oci.image.layer.v1.tar+zstd", }, { dagger.Uncompressed, "application/vnd.oci.image.layer.v1.tar", }, { dagger.Estargz, "application/vnd.oci.image.layer.v1.tar+gzip", }, } { tc := tc t.Run(string(tc.compression), func(t *testing.T) { t.Parallel() c, ctx := connect(t) ref := registryRef("testcontainerpublishforcecompression" + strings.ToLower(string(tc.compression))) _, err := c.Container(). From(alpineImage). Publish(ctx, ref, dagger.ContainerPublishOpts{ ForcedCompression: tc.compression, }) require.NoError(t, err) parsedRef, err := name.ParseReference(ref, name.Insecure) require.NoError(t, err) imgDesc, err := remote.Get(parsedRef, remote.WithTransport(http.DefaultTransport)) require.NoError(t, err) img, err := imgDesc.Image() require.NoError(t, err) layers, err := img.Layers() require.NoError(t, err) for _, layer := range layers { mediaType, err := layer.MediaType() require.NoError(t, err) require.EqualValues(t, tc.expectedOCIMediaType, mediaType) } tarPath := filepath.Join(t.TempDir(), "export.tar") _, err = c.Container(). From(alpineImage). Export(ctx, tarPath, dagger.ContainerExportOpts{ ForcedCompression: tc.compression, }) require.NoError(t, err) // check that docker compatible manifest is present dockerManifestBytes := readTarFile(t, tarPath, "manifest.json") require.NotNil(t, dockerManifestBytes) indexBytes := readTarFile(t, tarPath, "index.json") var index ocispecs.Index require.NoError(t, json.Unmarshal(indexBytes, &index)) manifestDigest := index.Manifests[0].Digest manifestBytes := readTarFile(t, tarPath, "blobs/sha256/"+manifestDigest.Encoded()) var manifest ocispecs.Manifest require.NoError(t, json.Unmarshal(manifestBytes, &manifest)) for _, layer := range manifest.Layers { require.EqualValues(t, tc.expectedOCIMediaType, layer.MediaType) } }) } } func TestContainerMediaTypes(t *testing.T) { t.Parallel() for _, tc := range []struct { mediaTypes dagger.ImageMediaTypes expectedOCIMediaType string }{ { "", // use default "application/vnd.oci.image.layer.v1.tar+gzip", }, { dagger.Ocimediatypes, "application/vnd.oci.image.layer.v1.tar+gzip", }, { dagger.Dockermediatypes, "application/vnd.docker.image.rootfs.diff.tar.gzip", }, } { tc := tc t.Run(string(tc.mediaTypes), func(t *testing.T) { t.Parallel() c, ctx := connect(t) ref := registryRef("testcontainerpublishmediatypes" + strings.ToLower(string(tc.mediaTypes))) _, err := c.Container(). From(alpineImage). Publish(ctx, ref, dagger.ContainerPublishOpts{ MediaTypes: tc.mediaTypes, }) require.NoError(t, err) parsedRef, err := name.ParseReference(ref, name.Insecure) require.NoError(t, err) imgDesc, err := remote.Get(parsedRef, remote.WithTransport(http.DefaultTransport)) require.NoError(t, err) img, err := imgDesc.Image() require.NoError(t, err) layers, err := img.Layers() require.NoError(t, err) for _, layer := range layers { mediaType, err := layer.MediaType() require.NoError(t, err) require.EqualValues(t, tc.expectedOCIMediaType, mediaType) } for _, useAsTarball := range []bool{true, false} { useAsTarball := useAsTarball t.Run(fmt.Sprintf("useAsTarball=%t", useAsTarball), func(t *testing.T) { t.Parallel() tarPath := filepath.Join(t.TempDir(), "export.tar") if useAsTarball { _, err = c.Container(). From(alpineImage). AsTarball(dagger.ContainerAsTarballOpts{ MediaTypes: tc.mediaTypes, }). Export(ctx, tarPath) require.NoError(t, err) } else { _, err = c.Container(). From(alpineImage). Export(ctx, tarPath, dagger.ContainerExportOpts{ MediaTypes: tc.mediaTypes, }) require.NoError(t, err) } // check that docker compatible manifest is present dockerManifestBytes := readTarFile(t, tarPath, "manifest.json") require.NotNil(t, dockerManifestBytes) indexBytes := readTarFile(t, tarPath, "index.json") var index ocispecs.Index require.NoError(t, json.Unmarshal(indexBytes, &index)) manifestDigest := index.Manifests[0].Digest manifestBytes := readTarFile(t, tarPath, "blobs/sha256/"+manifestDigest.Encoded()) var manifest ocispecs.Manifest require.NoError(t, json.Unmarshal(manifestBytes, &manifest)) for _, layer := range manifest.Layers { require.EqualValues(t, tc.expectedOCIMediaType, layer.MediaType) } }) } }) } } func TestContainerBuildMergesWithParent(t *testing.T) { t.Parallel() c, ctx := connect(t) // Create a builder container builderCtr := c.Directory().WithNewFile("Dockerfile", `FROM `+alpineImage+` ENV FOO=BAR LABEL "com.example.test-should-replace"="foo" EXPOSE 8080 `, ) // Create a container with envs variables and labels testCtr := c.Container(). WithEnvVariable("BOOL", "DOG"). WithEnvVariable("FOO", "BAZ"). WithLabel("com.example.test-should-exist", "test"). WithLabel("com.example.test-should-replace", "bar"). WithExposedPort(5000, dagger.ContainerWithExposedPortOpts{ Description: "five thousand", }). Build(builderCtr) envShouldExist, err := testCtr.EnvVariable(ctx, "BOOL") require.NoError(t, err) require.Equal(t, "DOG", envShouldExist) envShouldBeReplaced, err := testCtr.EnvVariable(ctx, "FOO") require.NoError(t, err) require.Equal(t, "BAR", envShouldBeReplaced) labelShouldExist, err := testCtr.Label(ctx, "com.example.test-should-exist") require.NoError(t, err) require.Equal(t, "test", labelShouldExist) labelShouldBeReplaced, err := testCtr.Label(ctx, "com.example.test-should-replace") require.NoError(t, err) require.Equal(t, "foo", labelShouldBeReplaced) // FIXME: Pretty clunky to work with lists of objects from the SDK // so test the exposed ports with a query string for now. cid, err := testCtr.ID(ctx) require.NoError(t, err) res := struct { Container struct { ExposedPorts []core.Port } }{} err = testutil.Query(` query Test($id: ContainerID!) { container(id: $id) { exposedPorts { port protocol description } } }`, &res, &testutil.QueryOptions{ Variables: map[string]interface{}{ "id": cid, }, }, ) require.NoError(t, err) require.Len(t, res.Container.ExposedPorts, 2) // random order since ImageConfig.ExposedPorts is a map for _, p := range res.Container.ExposedPorts { require.Equal(t, core.NetworkProtocolTCP, p.Protocol) switch p.Port { case 8080: require.Nil(t, p.Description) case 5000: require.NotNil(t, p.Description) require.Equal(t, "five thousand", *p.Description) default: t.Fatalf("unexpected port %d", p.Port) } } } func TestContainerFromMergesWithParent(t *testing.T) { t.Parallel() c, ctx := connect(t) // Create a container with envs and pull alpine image on it testCtr := c.Container(). WithEnvVariable("FOO", "BAR"). WithEnvVariable("PATH", "/replace/me"). WithLabel("moby.buildkit.frontend.caps", "replace-me"). WithLabel("com.example.test-should-exist", "exist"). WithExposedPort(5000). From("docker/dockerfile:1.5") envShouldExist, err := testCtr.EnvVariable(ctx, "FOO") require.NoError(t, err) require.Equal(t, "BAR", envShouldExist) envShouldBeReplaced, err := testCtr.EnvVariable(ctx, "PATH") require.NoError(t, err) require.Equal(t, "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin", envShouldBeReplaced) labelShouldExist, err := testCtr.Label(ctx, "com.example.test-should-exist") require.NoError(t, err) require.Equal(t, "exist", labelShouldExist) existingLabelFromImageShouldExist, err := testCtr.Label(ctx, "moby.buildkit.frontend.network.none") require.NoError(t, err) require.Equal(t, "true", existingLabelFromImageShouldExist) labelShouldBeReplaced, err := testCtr.Label(ctx, "moby.buildkit.frontend.caps") require.NoError(t, err) require.Equal(t, "moby.buildkit.frontend.inputs,moby.buildkit.frontend.subrequests,moby.buildkit.frontend.contexts", labelShouldBeReplaced) ports, err := testCtr.ExposedPorts(ctx) require.NoError(t, err) port, err := ports[0].Port(ctx) require.NoError(t, err) require.Equal(t, 5000, port) } func TestContainerImageLoadCompatibility(t *testing.T) { t.Parallel() c, ctx := connect(t) for i, dockerVersion := range []string{"20.10", "23.0", "24.0"} { dockerVersion := dockerVersion port := 2375 + i dockerd := c.Container().From(fmt.Sprintf("docker:%s-dind", dockerVersion)). WithMountedCache("/var/lib/docker", c.CacheVolume(t.Name()+"-"+dockerVersion+"-docker-lib"), dagger.ContainerWithMountedCacheOpts{ Sharing: dagger.Private, }). WithExposedPort(port). WithExec([]string{ "dockerd", "--host=tcp://0.0.0.0:" + strconv.Itoa(port), "--tls=false", }, dagger.ContainerWithExecOpts{ InsecureRootCapabilities: true, }). AsService() dockerHost, err := dockerd.Endpoint(ctx, dagger.ServiceEndpointOpts{ Scheme: "tcp", }) require.NoError(t, err) for _, mediaType := range []dagger.ImageMediaTypes{dagger.Ocimediatypes, dagger.Dockermediatypes} { mediaType := mediaType for _, compression := range []dagger.ImageLayerCompression{dagger.Gzip, dagger.Zstd, dagger.Uncompressed} { compression := compression t.Run(fmt.Sprintf("%s-%s-%s-%s", t.Name(), dockerVersion, mediaType, compression), func(t *testing.T) { t.Parallel() tmpdir := t.TempDir() tmpfile := filepath.Join(tmpdir, fmt.Sprintf("test-%s-%s-%s.tar", dockerVersion, mediaType, compression)) _, err := c.Container().From(alpineImage). // we need a unique image, otherwise docker load skips it after the first tar load WithExec([]string{"sh", "-c", "echo '" + string(compression) + string(mediaType) + "' > /foo"}). Export(ctx, tmpfile, dagger.ContainerExportOpts{ MediaTypes: mediaType, ForcedCompression: compression, }) require.NoError(t, err) randID := identity.NewID() ctr := c.Container().From(fmt.Sprintf("docker:%s-cli", dockerVersion)). WithEnvVariable("CACHEBUST", randID). WithServiceBinding("docker", dockerd). WithEnvVariable("DOCKER_HOST", dockerHost). WithMountedFile(path.Join("/", path.Base(tmpfile)), c.Host().File(tmpfile)). WithExec([]string{"docker", "load", "-i", "/" + path.Base(tmpfile)}) output, err := ctr.Stdout(ctx) if dockerVersion == "20.10" && compression == dagger.Zstd { // zstd support in docker wasn't added until 23, so sanity check that it fails require.Error(t, err) } else { require.NoError(t, err) _, imageID, ok := strings.Cut(output, "sha256:") require.True(t, ok) imageID = strings.TrimSpace(imageID) _, err = ctr.WithExec([]string{"docker", "run", "--rm", imageID, "echo", "hello"}).Sync(ctx) require.NoError(t, err) } // also check that buildkit can load+run it too _, err = c.Container(). Import(c.Host().File(tmpfile)). WithExec([]string{"echo", "hello"}). Sync(ctx) require.NoError(t, err) }) } } } } func TestContainerWithMountedSecretMode(t *testing.T) { t.Parallel() c, ctx := connect(t) t.Cleanup(func() { c.Close() }) secret := c.SetSecret("test", "secret") ctr := c.Container().From(alpineImage).WithMountedSecret("/secret", secret, dagger.ContainerWithMountedSecretOpts{ Mode: 0o666, Owner: "root:root", }) perms, err := ctr.WithExec([]string{"sh", "-c", "stat /secret "}).Stdout(ctx) require.Contains(t, perms, "0666/-rw-rw-rw-") require.NoError(t, err) }
closed
dagger/dagger
https://github.com/dagger/dagger
3,284
Use `withoutEntrypoint`, `withoutWorkdir`, `withoutUser` and `withoutDefaultArgs` to remove
Currently, passing nil or empty arguments to those function reinit the values. It's not that explicit and clear. It will make more API endpoints, but it's gonna be clearer.
https://github.com/dagger/dagger/issues/3284
https://github.com/dagger/dagger/pull/6278
568d802bb892f1e074cf74cfce2a551989418964
cd825bde699a0beb0adb5c2529da5469118a172b
"2022-10-07T15:00:07Z"
go
"2023-12-19T13:11:01Z"
core/schema/container.go
package schema import ( "context" "fmt" "os" "path" "strconv" "strings" "github.com/containerd/containerd/content" specs "github.com/opencontainers/image-spec/specs-go/v1" "github.com/dagger/dagger/core" "github.com/dagger/dagger/core/pipeline" "github.com/dagger/dagger/core/socket" "github.com/moby/buildkit/frontend/dockerfile/shell" "github.com/moby/buildkit/util/leaseutil" ) type containerSchema struct { *APIServer host *core.Host svcs *core.Services ociStore content.Store leaseManager *leaseutil.Manager buildCache *core.CacheMap[uint64, *core.Container] importCache *core.CacheMap[uint64, *specs.Descriptor] } var _ SchemaResolvers = &containerSchema{} func (s *containerSchema) Name() string { return "container" } func (s *containerSchema) Schema() string { return Container } func (s *containerSchema) Resolvers() Resolvers { rs := Resolvers{ "Query": ObjectResolver{ "container": ToResolver(s.container), }, } ResolveIDable[core.Container](rs, "Container", ObjectResolver{ "sync": ToResolver(s.sync), "from": ToResolver(s.from), "build": ToResolver(s.build), "rootfs": ToResolver(s.rootfs), "pipeline": ToResolver(s.pipeline), "withRootfs": ToResolver(s.withRootfs), "file": ToResolver(s.file), "directory": ToResolver(s.directory), "user": ToResolver(s.user), "withUser": ToResolver(s.withUser), "workdir": ToResolver(s.workdir), "withWorkdir": ToResolver(s.withWorkdir), "envVariables": ToResolver(s.envVariables), "envVariable": ToResolver(s.envVariable), "withEnvVariable": ToResolver(s.withEnvVariable), "withSecretVariable": ToResolver(s.withSecretVariable), "withoutEnvVariable": ToResolver(s.withoutEnvVariable), "withLabel": ToResolver(s.withLabel), "label": ToResolver(s.label), "labels": ToResolver(s.labels), "withoutLabel": ToResolver(s.withoutLabel), "entrypoint": ToResolver(s.entrypoint), "withEntrypoint": ToResolver(s.withEntrypoint), "defaultArgs": ToResolver(s.defaultArgs), "withDefaultArgs": ToResolver(s.withDefaultArgs), "mounts": ToResolver(s.mounts), "withMountedDirectory": ToResolver(s.withMountedDirectory), "withMountedFile": ToResolver(s.withMountedFile), "withMountedTemp": ToResolver(s.withMountedTemp), "withMountedCache": ToResolver(s.withMountedCache), "withMountedSecret": ToResolver(s.withMountedSecret), "withUnixSocket": ToResolver(s.withUnixSocket), "withoutUnixSocket": ToResolver(s.withoutUnixSocket), "withoutMount": ToResolver(s.withoutMount), "withFile": ToResolver(s.withFile), "withNewFile": ToResolver(s.withNewFile), "withDirectory": ToResolver(s.withDirectory), "withExec": ToResolver(s.withExec), "stdout": ToResolver(s.stdout), "stderr": ToResolver(s.stderr), "publish": ToResolver(s.publish), "platform": ToResolver(s.platform), "export": ToResolver(s.export), "asTarball": ToResolver(s.asTarball), "import": ToResolver(s.import_), "withRegistryAuth": ToResolver(s.withRegistryAuth), "withoutRegistryAuth": ToResolver(s.withoutRegistryAuth), "imageRef": ToResolver(s.imageRef), "withExposedPort": ToResolver(s.withExposedPort), "withoutExposedPort": ToResolver(s.withoutExposedPort), "exposedPorts": ToResolver(s.exposedPorts), "withServiceBinding": ToResolver(s.withServiceBinding), "withFocus": ToResolver(s.withFocus), "withoutFocus": ToResolver(s.withoutFocus), "shellEndpoint": ToResolver(s.shellEndpoint), "experimentalWithGPU": ToResolver(s.withGPU), "experimentalWithAllGPUs": ToResolver(s.withAllGPUs), }) return rs } type containerArgs struct { ID core.ContainerID Platform *specs.Platform } func (s *containerSchema) container(ctx context.Context, parent *core.Query, args containerArgs) (_ *core.Container, rerr error) { if args.ID != "" { return args.ID.Decode() } platform := s.APIServer.platform if args.Platform != nil { platform = *args.Platform } ctr, err := core.NewContainer(args.ID, parent.PipelinePath(), platform) if err != nil { return nil, err } return ctr, err } func (s *containerSchema) sync(ctx context.Context, parent *core.Container, _ any) (core.ContainerID, error) { _, err := parent.Evaluate(ctx, s.bk, s.svcs) if err != nil { return "", err } return parent.ID() } type containerFromArgs struct { Address string } func (s *containerSchema) from(ctx context.Context, parent *core.Container, args containerFromArgs) (*core.Container, error) { return parent.From(ctx, s.bk, args.Address) } type containerBuildArgs struct { Context core.DirectoryID Dockerfile string BuildArgs []core.BuildArg Target string Secrets []core.SecretID } func (s *containerSchema) build(ctx context.Context, parent *core.Container, args containerBuildArgs) (*core.Container, error) { dir, err := args.Context.Decode() if err != nil { return nil, err } return parent.Build( ctx, dir, args.Dockerfile, args.BuildArgs, args.Target, args.Secrets, s.bk, s.svcs, s.buildCache, ) } type containerWithRootFSArgs struct { Directory core.DirectoryID } func (s *containerSchema) withRootfs(ctx context.Context, parent *core.Container, args containerWithRootFSArgs) (*core.Container, error) { dir, err := args.Directory.Decode() if err != nil { return nil, err } return parent.WithRootFS(ctx, dir) } type containerPipelineArgs struct { Name string Description string Labels []pipeline.Label } func (s *containerSchema) pipeline(ctx context.Context, parent *core.Container, args containerPipelineArgs) (*core.Container, error) { return parent.WithPipeline(ctx, args.Name, args.Description, args.Labels) } func (s *containerSchema) rootfs(ctx context.Context, parent *core.Container, args any) (*core.Directory, error) { return parent.RootFS(ctx) } type containerExecArgs struct { core.ContainerExecOpts } func (s *containerSchema) withExec(ctx context.Context, parent *core.Container, args containerExecArgs) (*core.Container, error) { return parent.WithExec(ctx, s.bk, s.progSockPath, s.APIServer.platform, args.ContainerExecOpts) } func (s *containerSchema) stdout(ctx context.Context, parent *core.Container, _ any) (string, error) { return parent.MetaFileContents(ctx, s.bk, s.svcs, s.progSockPath, "stdout") } func (s *containerSchema) stderr(ctx context.Context, parent *core.Container, _ any) (string, error) { return parent.MetaFileContents(ctx, s.bk, s.svcs, s.progSockPath, "stderr") } type containerGpuArgs struct { core.ContainerGPUOpts } func (s *containerSchema) withGPU(ctx context.Context, parent *core.Container, args containerGpuArgs) (*core.Container, error) { return parent.WithGPU(ctx, args.ContainerGPUOpts) } func (s *containerSchema) withAllGPUs(ctx context.Context, parent *core.Container, args containerGpuArgs) (*core.Container, error) { return parent.WithGPU(ctx, core.ContainerGPUOpts{Devices: []string{"all"}}) } type containerWithEntrypointArgs struct { Args []string } func (s *containerSchema) withEntrypoint(ctx context.Context, parent *core.Container, args containerWithEntrypointArgs) (*core.Container, error) { return parent.UpdateImageConfig(ctx, func(cfg specs.ImageConfig) specs.ImageConfig { cfg.Entrypoint = args.Args return cfg }) } func (s *containerSchema) entrypoint(ctx context.Context, parent *core.Container, args containerWithVariableArgs) ([]string, error) { cfg, err := parent.ImageConfig(ctx) if err != nil { return nil, err } return cfg.Entrypoint, nil } type containerWithDefaultArgs struct { Args *[]string } func (s *containerSchema) withDefaultArgs(ctx context.Context, parent *core.Container, args containerWithDefaultArgs) (*core.Container, error) { return parent.UpdateImageConfig(ctx, func(cfg specs.ImageConfig) specs.ImageConfig { if args.Args == nil { cfg.Cmd = []string{} return cfg } cfg.Cmd = *args.Args return cfg }) } func (s *containerSchema) defaultArgs(ctx context.Context, parent *core.Container, args any) ([]string, error) { cfg, err := parent.ImageConfig(ctx) if err != nil { return nil, err } return cfg.Cmd, nil } type containerWithUserArgs struct { Name string } func (s *containerSchema) withUser(ctx context.Context, parent *core.Container, args containerWithUserArgs) (*core.Container, error) { return parent.UpdateImageConfig(ctx, func(cfg specs.ImageConfig) specs.ImageConfig { cfg.User = args.Name return cfg }) } func (s *containerSchema) user(ctx context.Context, parent *core.Container, args containerWithVariableArgs) (string, error) { cfg, err := parent.ImageConfig(ctx) if err != nil { return "", err } return cfg.User, nil } type containerWithWorkdirArgs struct { Path string } func (s *containerSchema) withWorkdir(ctx context.Context, parent *core.Container, args containerWithWorkdirArgs) (*core.Container, error) { return parent.UpdateImageConfig(ctx, func(cfg specs.ImageConfig) specs.ImageConfig { cfg.WorkingDir = absPath(cfg.WorkingDir, args.Path) return cfg }) } func (s *containerSchema) workdir(ctx context.Context, parent *core.Container, args containerWithVariableArgs) (string, error) { cfg, err := parent.ImageConfig(ctx) if err != nil { return "", err } return cfg.WorkingDir, nil } type containerWithVariableArgs struct { Name string Value string Expand bool } func (s *containerSchema) withEnvVariable(ctx context.Context, parent *core.Container, args containerWithVariableArgs) (*core.Container, error) { return parent.UpdateImageConfig(ctx, func(cfg specs.ImageConfig) specs.ImageConfig { value := args.Value if args.Expand { value = os.Expand(value, func(k string) string { v, _ := core.LookupEnv(cfg.Env, k) return v }) } cfg.Env = core.AddEnv(cfg.Env, args.Name, value) return cfg }) } type containerWithoutVariableArgs struct { Name string } func (s *containerSchema) withoutEnvVariable(ctx context.Context, parent *core.Container, args containerWithoutVariableArgs) (*core.Container, error) { return parent.UpdateImageConfig(ctx, func(cfg specs.ImageConfig) specs.ImageConfig { newEnv := []string{} core.WalkEnv(cfg.Env, func(k, _, env string) { if !shell.EqualEnvKeys(k, args.Name) { newEnv = append(newEnv, env) } }) cfg.Env = newEnv return cfg }) } type EnvVariable struct { Name string `json:"name"` Value string `json:"value"` } func (s *containerSchema) envVariables(ctx context.Context, parent *core.Container, args any) ([]EnvVariable, error) { cfg, err := parent.ImageConfig(ctx) if err != nil { return nil, err } vars := make([]EnvVariable, 0, len(cfg.Env)) core.WalkEnv(cfg.Env, func(k, v, _ string) { vars = append(vars, EnvVariable{Name: k, Value: v}) }) return vars, nil } type containerVariableArgs struct { Name string } func (s *containerSchema) envVariable(ctx context.Context, parent *core.Container, args containerVariableArgs) (*string, error) { cfg, err := parent.ImageConfig(ctx) if err != nil { return nil, err } if val, ok := core.LookupEnv(cfg.Env, args.Name); ok { return &val, nil } return nil, nil } type Label struct { Name string `json:"name"` Value string `json:"value"` } func (s *containerSchema) labels(ctx context.Context, parent *core.Container, args any) ([]Label, error) { cfg, err := parent.ImageConfig(ctx) if err != nil { return nil, err } labels := make([]Label, 0, len(cfg.Labels)) for name, value := range cfg.Labels { label := Label{ Name: name, Value: value, } labels = append(labels, label) } return labels, nil } type containerLabelArgs struct { Name string } func (s *containerSchema) label(ctx context.Context, parent *core.Container, args containerLabelArgs) (*string, error) { cfg, err := parent.ImageConfig(ctx) if err != nil { return nil, err } if val, ok := cfg.Labels[args.Name]; ok { return &val, nil } return nil, nil } type containerWithMountedDirectoryArgs struct { Path string Source core.DirectoryID Owner string } func (s *containerSchema) withMountedDirectory(ctx context.Context, parent *core.Container, args containerWithMountedDirectoryArgs) (*core.Container, error) { dir, err := args.Source.Decode() if err != nil { return nil, err } return parent.WithMountedDirectory(ctx, s.bk, args.Path, dir, args.Owner, false) } type containerPublishArgs struct { Address string PlatformVariants []core.ContainerID ForcedCompression core.ImageLayerCompression MediaTypes core.ImageMediaTypes } func (s *containerSchema) publish(ctx context.Context, parent *core.Container, args containerPublishArgs) (string, error) { return parent.Publish(ctx, s.bk, s.svcs, args.Address, args.PlatformVariants, args.ForcedCompression, args.MediaTypes) } type containerWithMountedFileArgs struct { Path string Source core.FileID Owner string } func (s *containerSchema) withMountedFile(ctx context.Context, parent *core.Container, args containerWithMountedFileArgs) (*core.Container, error) { file, err := args.Source.Decode() if err != nil { return nil, err } return parent.WithMountedFile(ctx, s.bk, args.Path, file, args.Owner, false) } type containerWithMountedCacheArgs struct { Path string Cache core.CacheVolumeID Source core.DirectoryID Concurrency core.CacheSharingMode Owner string } func (s *containerSchema) withMountedCache(ctx context.Context, parent *core.Container, args containerWithMountedCacheArgs) (*core.Container, error) { var dir *core.Directory if args.Source != "" { var err error dir, err = args.Source.Decode() if err != nil { return nil, err } } cache, err := args.Cache.Decode() if err != nil { return nil, err } return parent.WithMountedCache(ctx, s.bk, args.Path, cache, dir, args.Concurrency, args.Owner) } type containerWithMountedTempArgs struct { Path string } func (s *containerSchema) withMountedTemp(ctx context.Context, parent *core.Container, args containerWithMountedTempArgs) (*core.Container, error) { return parent.WithMountedTemp(ctx, args.Path) } type containerWithoutMountArgs struct { Path string } func (s *containerSchema) withoutMount(ctx context.Context, parent *core.Container, args containerWithoutMountArgs) (*core.Container, error) { return parent.WithoutMount(ctx, args.Path) } func (s *containerSchema) mounts(ctx context.Context, parent *core.Container, _ any) ([]string, error) { return parent.MountTargets(ctx) } type containerWithLabelArgs struct { Name string Value string } func (s *containerSchema) withLabel(ctx context.Context, parent *core.Container, args containerWithLabelArgs) (*core.Container, error) { return parent.UpdateImageConfig(ctx, func(cfg specs.ImageConfig) specs.ImageConfig { if cfg.Labels == nil { cfg.Labels = make(map[string]string) } cfg.Labels[args.Name] = args.Value return cfg }) } type containerWithoutLabelArgs struct { Name string } func (s *containerSchema) withoutLabel(ctx context.Context, parent *core.Container, args containerWithoutLabelArgs) (*core.Container, error) { return parent.UpdateImageConfig(ctx, func(cfg specs.ImageConfig) specs.ImageConfig { delete(cfg.Labels, args.Name) return cfg }) } type containerDirectoryArgs struct { Path string } func (s *containerSchema) directory(ctx context.Context, parent *core.Container, args containerDirectoryArgs) (*core.Directory, error) { return parent.Directory(ctx, s.bk, s.svcs, args.Path) } type containerFileArgs struct { Path string } func (s *containerSchema) file(ctx context.Context, parent *core.Container, args containerFileArgs) (*core.File, error) { return parent.File(ctx, s.bk, s.svcs, args.Path) } func absPath(workDir string, containerPath string) string { if path.IsAbs(containerPath) { return containerPath } if workDir == "" { workDir = "/" } return path.Join(workDir, containerPath) } type containerWithSecretVariableArgs struct { Name string Secret core.SecretID } func (s *containerSchema) withSecretVariable(ctx context.Context, parent *core.Container, args containerWithSecretVariableArgs) (*core.Container, error) { secret, err := args.Secret.Decode() if err != nil { return nil, err } return parent.WithSecretVariable(ctx, args.Name, secret) } type containerWithMountedSecretArgs struct { Path string Source core.SecretID Owner string Mode *int } func (s *containerSchema) withMountedSecret(ctx context.Context, parent *core.Container, args containerWithMountedSecretArgs) (*core.Container, error) { secret, err := args.Source.Decode() if err != nil { return nil, err } return parent.WithMountedSecret(ctx, s.bk, args.Path, secret, args.Owner, args.Mode) } type containerWithDirectoryArgs struct { withDirectoryArgs Owner string } func (s *containerSchema) withDirectory(ctx context.Context, parent *core.Container, args containerWithDirectoryArgs) (*core.Container, error) { dir, err := args.Directory.Decode() if err != nil { return nil, err } return parent.WithDirectory(ctx, s.bk, args.Path, dir, args.CopyFilter, args.Owner) } type containerWithFileArgs struct { withFileArgs Owner string } func (s *containerSchema) withFile(ctx context.Context, parent *core.Container, args containerWithFileArgs) (*core.Container, error) { file, err := args.Source.Decode() if err != nil { return nil, err } return parent.WithFile(ctx, s.bk, args.Path, file, args.Permissions, args.Owner) } type containerWithNewFileArgs struct { withNewFileArgs Owner string } func (s *containerSchema) withNewFile(ctx context.Context, parent *core.Container, args containerWithNewFileArgs) (*core.Container, error) { return parent.WithNewFile(ctx, s.bk, args.Path, []byte(args.Contents), args.Permissions, args.Owner) } type containerWithUnixSocketArgs struct { Path string Source socket.ID Owner string } func (s *containerSchema) withUnixSocket(ctx context.Context, parent *core.Container, args containerWithUnixSocketArgs) (*core.Container, error) { socket, err := args.Source.Decode() if err != nil { return nil, err } return parent.WithUnixSocket(ctx, s.bk, args.Path, socket, args.Owner) } type containerWithoutUnixSocketArgs struct { Path string } func (s *containerSchema) withoutUnixSocket(ctx context.Context, parent *core.Container, args containerWithoutUnixSocketArgs) (*core.Container, error) { return parent.WithoutUnixSocket(ctx, args.Path) } func (s *containerSchema) platform(ctx context.Context, parent *core.Container, args any) (specs.Platform, error) { return parent.Platform, nil } type containerExportArgs struct { Path string PlatformVariants []core.ContainerID ForcedCompression core.ImageLayerCompression MediaTypes core.ImageMediaTypes } func (s *containerSchema) export(ctx context.Context, parent *core.Container, args containerExportArgs) (bool, error) { if err := parent.Export(ctx, s.bk, s.svcs, args.Path, args.PlatformVariants, args.ForcedCompression, args.MediaTypes); err != nil { return false, err } return true, nil } type containerAsTarballArgs struct { PlatformVariants []core.ContainerID ForcedCompression core.ImageLayerCompression MediaTypes core.ImageMediaTypes } func (s *containerSchema) asTarball(ctx context.Context, parent *core.Container, args containerAsTarballArgs) (*core.File, error) { return parent.AsTarball(ctx, s.bk, s.APIServer.platform, s.svcs, args.PlatformVariants, args.ForcedCompression, args.MediaTypes) } type containerImportArgs struct { Source core.FileID Tag string } func (s *containerSchema) import_(ctx context.Context, parent *core.Container, args containerImportArgs) (*core.Container, error) { // nolint:revive return parent.Import( ctx, args.Source, args.Tag, s.bk, s.host, s.svcs, s.importCache, s.ociStore, s.leaseManager, ) } type containerWithRegistryAuthArgs struct { Address string `json:"address"` Username string `json:"username"` Secret core.SecretID `json:"secret"` } func (s *containerSchema) withRegistryAuth(ctx context.Context, parents *core.Container, args containerWithRegistryAuthArgs) (*core.Container, error) { secretBytes, err := s.secrets.GetSecret(ctx, args.Secret.String()) if err != nil { return nil, err } if err := s.auth.AddCredential(args.Address, args.Username, string(secretBytes)); err != nil { return nil, err } return parents, nil } type containerWithoutRegistryAuthArgs struct { Address string } func (s *containerSchema) withoutRegistryAuth(_ context.Context, parents *core.Container, args containerWithoutRegistryAuthArgs) (*core.Container, error) { if err := s.auth.RemoveCredential(args.Address); err != nil { return nil, err } return parents, nil } func (s *containerSchema) imageRef(ctx context.Context, parent *core.Container, args containerWithVariableArgs) (string, error) { return parent.ImageRefOrErr(ctx, s.bk) } type containerWithServiceBindingArgs struct { Service core.ServiceID Alias string } func (s *containerSchema) withServiceBinding(ctx context.Context, parent *core.Container, args containerWithServiceBindingArgs) (*core.Container, error) { svc, err := args.Service.Decode() if err != nil { return nil, err } return parent.WithServiceBinding(ctx, s.svcs, svc, args.Alias) } type containerWithExposedPortArgs struct { Protocol core.NetworkProtocol Port int Description *string } func (s *containerSchema) withExposedPort(ctx context.Context, parent *core.Container, args containerWithExposedPortArgs) (*core.Container, error) { return parent.WithExposedPort(core.Port{ Protocol: args.Protocol, Port: args.Port, Description: args.Description, }) } type containerWithoutExposedPortArgs struct { Protocol core.NetworkProtocol Port int } func (s *containerSchema) withoutExposedPort(ctx context.Context, parent *core.Container, args containerWithoutExposedPortArgs) (*core.Container, error) { return parent.WithoutExposedPort(args.Port, args.Protocol) } // NB(vito): we have to use a different type with a regular string Protocol // field so that the enum mapping works. type ExposedPort struct { Port int `json:"port"` Protocol string `json:"protocol"` Description *string `json:"description,omitempty"` } func (s *containerSchema) exposedPorts(ctx context.Context, parent *core.Container, args any) ([]ExposedPort, error) { // get descriptions from `Container.Ports` (not in the OCI spec) ports := make(map[string]ExposedPort, len(parent.Ports)) for _, p := range parent.Ports { ociPort := fmt.Sprintf("%d/%s", p.Port, p.Protocol.Network()) ports[ociPort] = ExposedPort{ Port: p.Port, Protocol: string(p.Protocol), Description: p.Description, } } exposedPorts := []ExposedPort{} for ociPort := range parent.Config.ExposedPorts { p, exists := ports[ociPort] if !exists { // ignore errors when parsing from OCI port, proto, ok := strings.Cut(ociPort, "/") if !ok { continue } portNr, err := strconv.Atoi(port) if err != nil { continue } p = ExposedPort{ Port: portNr, Protocol: strings.ToUpper(proto), } } exposedPorts = append(exposedPorts, p) } return exposedPorts, nil } func (s *containerSchema) withFocus(ctx context.Context, parent *core.Container, args any) (*core.Container, error) { child := parent.Clone() child.Focused = true return child, nil } func (s *containerSchema) withoutFocus(ctx context.Context, parent *core.Container, args any) (*core.Container, error) { child := parent.Clone() child.Focused = false return child, nil } func (s *containerSchema) shellEndpoint(ctx context.Context, parent *core.Container, args any) (string, error) { endpoint, handler, err := parent.ShellEndpoint(s.bk, s.progSockPath, s.services) if err != nil { return "", err } if err := s.MuxEndpoint(ctx, path.Join("/", endpoint), handler); err != nil { return "", err } return "ws://dagger/" + endpoint, nil }
closed
dagger/dagger
https://github.com/dagger/dagger
3,284
Use `withoutEntrypoint`, `withoutWorkdir`, `withoutUser` and `withoutDefaultArgs` to remove
Currently, passing nil or empty arguments to those function reinit the values. It's not that explicit and clear. It will make more API endpoints, but it's gonna be clearer.
https://github.com/dagger/dagger/issues/3284
https://github.com/dagger/dagger/pull/6278
568d802bb892f1e074cf74cfce2a551989418964
cd825bde699a0beb0adb5c2529da5469118a172b
"2022-10-07T15:00:07Z"
go
"2023-12-19T13:11:01Z"
core/schema/container.graphqls
extend type Query { """ Creates a scratch container or loads one by ID. Optional platform argument initializes new containers to execute and publish as that platform. Platform defaults to that of the builder's host. """ container( id: ContainerID @deprecated(reason: "Use `loadContainerFromID` instead.") platform: Platform ): Container! """ Loads a container from an ID. """ loadContainerFromID(id: ContainerID!): Container! } "A unique container identifier. Null designates an empty container (scratch)." scalar ContainerID """ An OCI-compatible container, also known as a docker container. """ type Container { "A unique identifier for this container." id: ContainerID! """ Forces evaluation of the pipeline in the engine. It doesn't run the default command if no exec has been set. """ sync: ContainerID! "The platform this container executes and publishes as." platform: Platform! "Creates a named sub-pipeline" pipeline( "Pipeline name." name: String! "Pipeline description." description: String "Pipeline labels." labels: [PipelineLabel!] ): Container! """ Initializes this container from a pulled base image. """ from( """ Image's address from its registry. Formatted as [host]/[user]/[repo]:[tag] (e.g., "docker.io/dagger/dagger:main"). """ address: String! ): Container! """ Initializes this container from a Dockerfile build. """ build( "Directory context used by the Dockerfile." context: DirectoryID! """ Path to the Dockerfile to use. Default: './Dockerfile'. """ dockerfile: String "Additional build arguments." buildArgs: [BuildArg!] "Target build stage to build." target: String """ Secrets to pass to the build. They will be mounted at /run/secrets/[secret-name] in the build container They can be accessed in the Dockerfile using the "secret" mount type and mount path /run/secrets/[secret-name] e.g. RUN --mount=type=secret,id=my-secret curl url?token=$(cat /run/secrets/my-secret)" """ secrets: [SecretID!] ): Container! "Retrieves this container's root filesystem. Mounts are not included." rootfs: Directory! "Initializes this container from this DirectoryID." withRootfs(directory: DirectoryID!): Container! """ Retrieves a directory at the given path. Mounts are included. """ directory( """ The path of the directory to retrieve (e.g., "./src"). """ path: String! ): Directory! """ Retrieves a file at the given path. Mounts are included. """ file( """ The path of the file to retrieve (e.g., "./README.md"). """ path: String! ): File! "Retrieves the user to be set for all commands." user: String """ Retrieves this container with a different command user. """ withUser( """ The user to set (e.g., "root"). """ name: String! ): Container! "Retrieves the working directory for all commands." workdir: String """ Retrieves this container with a different working directory. """ withWorkdir( """ The path to set as the working directory (e.g., "/app"). """ path: String! ): Container! "Retrieves the list of environment variables passed to commands." envVariables: [EnvVariable!]! """ Retrieves the value of the specified environment variable. """ envVariable( """ The name of the environment variable to retrieve (e.g., "PATH"). """ name: String! ): String """ Retrieves this container plus the given environment variable. """ withEnvVariable( """ The name of the environment variable (e.g., "HOST"). """ name: String! """ The value of the environment variable. (e.g., "localhost"). """ value: String! """ Replace `${VAR}` or $VAR in the value according to the current environment variables defined in the container (e.g., "/opt/bin:$PATH"). """ expand: Boolean ): Container! "Retrieves the list of labels passed to container." labels: [Label!]! """ Retrieves the value of the specified label. """ label(name: String!): String """ Retrieves this container plus the given label. """ withLabel( """ The name of the label (e.g., "org.opencontainers.artifact.created"). """ name: String! """ The value of the label (e.g., "2023-01-01T00:00:00Z"). """ value: String! ): Container! """ Retrieves this container minus the given environment label. """ withoutLabel( """ The name of the label to remove (e.g., "org.opencontainers.artifact.created"). """ name: String! ): Container! """ Retrieves this container plus an env variable containing the given secret. """ withSecretVariable( """ The name of the secret variable (e.g., "API_SECRET"). """ name: String! "The identifier of the secret value." secret: SecretID! ): Container! """ Retrieves this container minus the given environment variable. """ withoutEnvVariable( """ The name of the environment variable (e.g., "HOST"). """ name: String! ): Container! "Retrieves entrypoint to be prepended to the arguments of all commands." entrypoint: [String!] """ Retrieves this container but with a different command entrypoint. """ withEntrypoint( """ Entrypoint to use for future executions (e.g., ["go", "run"]). """ args: [String!]! ): Container! "Retrieves default arguments for future commands." defaultArgs: [String!] """ Configures default arguments for future commands. """ withDefaultArgs( """ Arguments to prepend to future executions (e.g., ["-v", "--no-cache"]). """ args: [String!] ): Container! "Retrieves the list of paths where a directory is mounted." mounts: [String!]! """ Retrieves this container plus a directory mounted at the given path. """ withMountedDirectory( """ Location of the mounted directory (e.g., "/mnt/directory"). """ path: String! "Identifier of the mounted directory." source: DirectoryID! """ A user:group to set for the mounted directory and its contents. The user and group can either be an ID (1000:1000) or a name (foo:bar). If the group is omitted, it defaults to the same as the user. """ owner: String ): Container! """ Retrieves this container plus a file mounted at the given path. """ withMountedFile( """ Location of the mounted file (e.g., "/tmp/file.txt"). """ path: String! "Identifier of the mounted file." source: FileID! """ A user or user:group to set for the mounted file. The user and group can either be an ID (1000:1000) or a name (foo:bar). If the group is omitted, it defaults to the same as the user. """ owner: String ): Container! """ Retrieves this container plus a temporary directory mounted at the given path. """ withMountedTemp( """ Location of the temporary directory (e.g., "/tmp/temp_dir"). """ path: String! ): Container! """ Retrieves this container plus a cache volume mounted at the given path. """ withMountedCache( """ Location of the cache directory (e.g., "/cache/node_modules"). """ path: String! "Identifier of the cache volume to mount." cache: CacheVolumeID! "Identifier of the directory to use as the cache volume's root." source: DirectoryID "Sharing mode of the cache volume." sharing: CacheSharingMode """ A user:group to set for the mounted cache directory. Note that this changes the ownership of the specified mount along with the initial filesystem provided by source (if any). It does not have any effect if/when the cache has already been created. The user and group can either be an ID (1000:1000) or a name (foo:bar). If the group is omitted, it defaults to the same as the user. """ owner: String ): Container! """ Retrieves this container plus a secret mounted into a file at the given path. """ withMountedSecret( """ Location of the secret file (e.g., "/tmp/secret.txt"). """ path: String! "Identifier of the secret to mount." source: SecretID! """ A user:group to set for the mounted secret. The user and group can either be an ID (1000:1000) or a name (foo:bar). If the group is omitted, it defaults to the same as the user. """ owner: String """ Permission given to the mounted secret (e.g., 0600). This option requires an owner to be set to be active. Default: 0400. """ mode: Int ): Container! """ Retrieves this container after unmounting everything at the given path. """ withoutMount( """ Location of the cache directory (e.g., "/cache/node_modules"). """ path: String! ): Container! """ Retrieves this container plus the contents of the given file copied to the given path. """ withFile( """ Location of the copied file (e.g., "/tmp/file.txt"). """ path: String! "Identifier of the file to copy." source: FileID! """ Permission given to the copied file (e.g., 0600). Default: 0644. """ permissions: Int """ A user:group to set for the file. The user and group can either be an ID (1000:1000) or a name (foo:bar). If the group is omitted, it defaults to the same as the user. """ owner: String ): Container! """ Retrieves this container plus a new file written at the given path. """ withNewFile( """ Location of the written file (e.g., "/tmp/file.txt"). """ path: String! """ Content of the file to write (e.g., "Hello world!"). """ contents: String """ Permission given to the written file (e.g., 0600). Default: 0644. """ permissions: Int """ A user:group to set for the file. The user and group can either be an ID (1000:1000) or a name (foo:bar). If the group is omitted, it defaults to the same as the user. """ owner: String ): Container! """ Retrieves this container plus a directory written at the given path. """ withDirectory( """ Location of the written directory (e.g., "/tmp/directory"). """ path: String! "Identifier of the directory to write" directory: DirectoryID! """ Patterns to exclude in the written directory (e.g., ["node_modules/**", ".gitignore", ".git/"]). """ exclude: [String!] """ Patterns to include in the written directory (e.g., ["*.go", "go.mod", "go.sum"]). """ include: [String!] """ A user:group to set for the directory and its contents. The user and group can either be an ID (1000:1000) or a name (foo:bar). If the group is omitted, it defaults to the same as the user. """ owner: String ): Container! """ Retrieves this container plus a socket forwarded to the given Unix socket path. """ withUnixSocket( """ Location of the forwarded Unix socket (e.g., "/tmp/socket"). """ path: String! """ Identifier of the socket to forward. """ source: SocketID! """ A user:group to set for the mounted socket. The user and group can either be an ID (1000:1000) or a name (foo:bar). If the group is omitted, it defaults to the same as the user. """ owner: String ): Container! """ Retrieves this container with a previously added Unix socket removed. """ withoutUnixSocket( """ Location of the socket to remove (e.g., "/tmp/socket"). """ path: String! ): Container! """ Indicate that subsequent operations should be featured more prominently in the UI. """ withFocus: Container! """ Indicate that subsequent operations should not be featured more prominently in the UI. This is the initial state of all containers. """ withoutFocus: Container! """ Retrieves this container after executing the specified command inside it. """ withExec( """ Command to run instead of the container's default command (e.g., ["run", "main.go"]). If empty, the container's default command is used. """ args: [String!]! """ If the container has an entrypoint, ignore it for args rather than using it to wrap them. """ skipEntrypoint: Boolean """ Content to write to the command's standard input before closing (e.g., "Hello world"). """ stdin: String """ Redirect the command's standard output to a file in the container (e.g., "/tmp/stdout"). """ redirectStdout: String """ Redirect the command's standard error to a file in the container (e.g., "/tmp/stderr"). """ redirectStderr: String """ Provides dagger access to the executed command. Do not use this option unless you trust the command being executed. The command being executed WILL BE GRANTED FULL ACCESS TO YOUR HOST FILESYSTEM. """ experimentalPrivilegedNesting: Boolean """ Execute the command with all root capabilities. This is similar to running a command with "sudo" or executing `docker run` with the `--privileged` flag. Containerization does not provide any security guarantees when using this option. It should only be used when absolutely necessary and only with trusted commands. """ insecureRootCapabilities: Boolean ): Container! """ The output stream of the last executed command. Will execute default command if none is set, or error if there's no default. """ stdout: String! """ The error stream of the last executed command. Will execute default command if none is set, or error if there's no default. """ stderr: String! # FIXME: this is the last case of an actual "verb" that cannot cleanly go away. # This may actually be a good candidate for a mutation. To be discussed. """ Publishes this container as a new image to the specified address. Publish returns a fully qualified ref. It can also publish platform variants. """ publish( """ Registry's address to publish the image to. Formatted as [host]/[user]/[repo]:[tag] (e.g. "docker.io/dagger/dagger:main"). """ address: String! """ Identifiers for other platform specific containers. Used for multi-platform image. """ platformVariants: [ContainerID!] """ Force each layer of the published image to use the specified compression algorithm. If this is unset, then if a layer already has a compressed blob in the engine's cache, that will be used (this can result in a mix of compression algorithms for different layers). If this is unset and a layer has no compressed blob in the engine's cache, then it will be compressed using Gzip. """ forcedCompression: ImageLayerCompression """ Use the specified media types for the published image's layers. Defaults to OCI, which is largely compatible with most recent registries, but Docker may be needed for older registries without OCI support. """ mediaTypes: ImageMediaTypes = OCIMediaTypes ): String! """ Writes the container as an OCI tarball to the destination file path on the host for the specified platform variants. Return true on success. It can also publishes platform variants. """ export( """ Host's destination path (e.g., "./tarball"). Path can be relative to the engine's workdir or absolute. """ path: String! """ Identifiers for other platform specific containers. Used for multi-platform image. """ platformVariants: [ContainerID!] """ Force each layer of the exported image to use the specified compression algorithm. If this is unset, then if a layer already has a compressed blob in the engine's cache, that will be used (this can result in a mix of compression algorithms for different layers). If this is unset and a layer has no compressed blob in the engine's cache, then it will be compressed using Gzip. """ forcedCompression: ImageLayerCompression """ Use the specified media types for the exported image's layers. Defaults to OCI, which is largely compatible with most recent container runtimes, but Docker may be needed for older runtimes without OCI support. """ mediaTypes: ImageMediaTypes = OCIMediaTypes ): Boolean! """ Returns a File representing the container serialized to a tarball. """ asTarball( """ Identifiers for other platform specific containers. Used for multi-platform image. """ platformVariants: [ContainerID!] """ Force each layer of the image to use the specified compression algorithm. If this is unset, then if a layer already has a compressed blob in the engine's cache, that will be used (this can result in a mix of compression algorithms for different layers). If this is unset and a layer has no compressed blob in the engine's cache, then it will be compressed using Gzip. """ forcedCompression: ImageLayerCompression """ Use the specified media types for the image's layers. Defaults to OCI, which is largely compatible with most recent container runtimes, but Docker may be needed for older runtimes without OCI support. """ mediaTypes: ImageMediaTypes = OCIMediaTypes ): File! """ Reads the container from an OCI tarball. NOTE: this involves unpacking the tarball to an OCI store on the host at $XDG_CACHE_DIR/dagger/oci. This directory can be removed whenever you like. """ import( """ File to read the container from. """ source: FileID! """ Identifies the tag to import from the archive, if the archive bundles multiple tags. """ tag: String ): Container! "Retrieves this container with a registry authentication for a given address." withRegistryAuth( """ Registry's address to bind the authentication to. Formatted as [host]/[user]/[repo]:[tag] (e.g. docker.io/dagger/dagger:main). """ address: String! """ The username of the registry's account (e.g., "Dagger"). """ username: String! """ The API key, password or token to authenticate to this registry. """ secret: SecretID! ): Container! "Retrieves this container without the registry authentication of a given address." withoutRegistryAuth( """ Registry's address to remove the authentication from. Formatted as [host]/[user]/[repo]:[tag] (e.g. docker.io/dagger/dagger:main). """ address: String! ): Container! "The unique image reference which can only be retrieved immediately after the 'Container.From' call." imageRef: String """ Expose a network port. Exposed ports serve two purposes: - For health checks and introspection, when running services - For setting the EXPOSE OCI field when publishing the container """ withExposedPort( "Port number to expose" port: Int! "Transport layer network protocol" protocol: NetworkProtocol = TCP "Optional port description" description: String ): Container! """ Unexpose a previously exposed port. """ withoutExposedPort( "Port number to unexpose" port: Int! "Port protocol to unexpose" protocol: NetworkProtocol = TCP ): Container! """ Retrieves the list of exposed ports. This includes ports already exposed by the image, even if not explicitly added with dagger. """ exposedPorts: [Port!]! """ Establish a runtime dependency on a service. The service will be started automatically when needed and detached when it is no longer needed, executing the default command if none is set. The service will be reachable from the container via the provided hostname alias. The service dependency will also convey to any files or directories produced by the container. """ withServiceBinding( "A name that can be used to reach the service from the container" alias: String! "Identifier of the service container" service: ServiceID! ): Container! """ Return a websocket endpoint that, if connected to, will start the container with a TTY streamed over the websocket. Primarily intended for internal use with the dagger CLI. """ shellEndpoint: String! """ EXPERIMENTAL API! Subject to change/removal at any time. experimentalWithGPU configures the provided list of devices to be accesible to this container. This currently works for Nvidia devices only. """ experimentalWithGPU(devices: [String!]!): Container! """ EXPERIMENTAL API! Subject to change/removal at any time. experimentalWithAllGPUs configures all available GPUs on the host to be accessible to this container. This currently works for Nvidia devices only. """ experimentalWithAllGPUs: Container! } "A simple key value object that represents an environment variable." type EnvVariable { "The environment variable name." name: String! "The environment variable value." value: String! } "A port exposed by a container." type Port { "The port number." port: Int! "The transport layer network protocol." protocol: NetworkProtocol! "The port description." description: String } "A simple key value object that represents a label." type Label { "The label name." name: String! "The label value." value: String! } """ Key value object that represents a build argument. """ input BuildArg { """ The build argument name. """ name: String! """ The build argument value. """ value: String! } "Transport layer network protocol associated to a port." enum NetworkProtocol { "TCP (Transmission Control Protocol)" TCP "UDP (User Datagram Protocol)" UDP } "Compression algorithm to use for image layers." enum ImageLayerCompression { Gzip Zstd EStarGZ Uncompressed } "Mediatypes to use in published or exported image metadata." enum ImageMediaTypes { OCIMediaTypes DockerMediaTypes }
closed
dagger/dagger
https://github.com/dagger/dagger
3,284
Use `withoutEntrypoint`, `withoutWorkdir`, `withoutUser` and `withoutDefaultArgs` to remove
Currently, passing nil or empty arguments to those function reinit the values. It's not that explicit and clear. It will make more API endpoints, but it's gonna be clearer.
https://github.com/dagger/dagger/issues/3284
https://github.com/dagger/dagger/pull/6278
568d802bb892f1e074cf74cfce2a551989418964
cd825bde699a0beb0adb5c2529da5469118a172b
"2022-10-07T15:00:07Z"
go
"2023-12-19T13:11:01Z"
sdk/elixir/lib/dagger/gen/container.ex
# This file generated by `mix dagger.gen`. Please DO NOT EDIT. defmodule Dagger.Container do @moduledoc "An OCI-compatible container, also known as a docker container." use Dagger.QueryBuilder @type t() :: %__MODULE__{} @derive Dagger.Sync defstruct [:selection, :client] ( @doc "Turn the container into a Service.\n\nBe sure to set any exposed ports before this conversion." @spec as_service(t()) :: Dagger.Service.t() def as_service(%__MODULE__{} = container) do selection = select(container.selection, "asService") %Dagger.Service{selection: selection, client: container.client} end ) ( @doc "Returns a File representing the container serialized to a tarball.\n\n\n\n## Optional Arguments\n\n* `platform_variants` - Identifiers for other platform specific containers.\nUsed for multi-platform image.\n* `forced_compression` - Force each layer of the image to use the specified compression algorithm.\nIf this is unset, then if a layer already has a compressed blob in the engine's\ncache, that will be used (this can result in a mix of compression algorithms for\ndifferent layers). If this is unset and a layer has no compressed blob in the\nengine's cache, then it will be compressed using Gzip.\n* `media_types` - Use the specified media types for the image's layers. Defaults to OCI, which\nis largely compatible with most recent container runtimes, but Docker may be needed\nfor older runtimes without OCI support." @spec as_tarball(t(), keyword()) :: Dagger.File.t() def as_tarball(%__MODULE__{} = container, optional_args \\ []) do selection = select(container.selection, "asTarball") selection = if is_nil(optional_args[:platform_variants]) do selection else ids = optional_args[:platform_variants] |> Enum.map(fn value -> {:ok, id} = Dagger.Container.id(value) id end) arg(selection, "platformVariants", ids) end selection = if is_nil(optional_args[:forced_compression]) do selection else arg(selection, "forcedCompression", optional_args[:forced_compression]) end selection = if is_nil(optional_args[:media_types]) do selection else arg(selection, "mediaTypes", optional_args[:media_types]) end %Dagger.File{selection: selection, client: container.client} end ) ( @doc "Initializes this container from a Dockerfile build.\n\n## Required Arguments\n\n* `context` - Directory context used by the Dockerfile.\n\n## Optional Arguments\n\n* `dockerfile` - Path to the Dockerfile to use.\n\nDefault: './Dockerfile'.\n* `build_args` - Additional build arguments.\n* `target` - Target build stage to build.\n* `secrets` - Secrets to pass to the build.\n\nThey will be mounted at /run/secrets/[secret-name] in the build container\n\nThey can be accessed in the Dockerfile using the \"secret\" mount type\nand mount path /run/secrets/[secret-name]\ne.g. RUN --mount=type=secret,id=my-secret curl url?token=$(cat /run/secrets/my-secret)\"" @spec build(t(), Dagger.Directory.t(), keyword()) :: Dagger.Container.t() def build(%__MODULE__{} = container, context, optional_args \\ []) do selection = select(container.selection, "build") ( {:ok, id} = Dagger.Directory.id(context) selection = arg(selection, "context", id) ) selection = if is_nil(optional_args[:dockerfile]) do selection else arg(selection, "dockerfile", optional_args[:dockerfile]) end selection = if is_nil(optional_args[:build_args]) do selection else arg(selection, "buildArgs", optional_args[:build_args]) end selection = if is_nil(optional_args[:target]) do selection else arg(selection, "target", optional_args[:target]) end selection = if is_nil(optional_args[:secrets]) do selection else ids = optional_args[:secrets] |> Enum.map(fn value -> {:ok, id} = Dagger.Secret.id(value) id end) arg(selection, "secrets", ids) end %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Retrieves default arguments for future commands." @spec default_args(t()) :: {:ok, [Dagger.String.t()] | nil} | {:error, term()} def default_args(%__MODULE__{} = container) do selection = select(container.selection, "defaultArgs") execute(selection, container.client) end ) ( @doc "Retrieves a directory at the given path.\n\nMounts are included.\n\n## Required Arguments\n\n* `path` - The path of the directory to retrieve (e.g., \"./src\")." @spec directory(t(), Dagger.String.t()) :: Dagger.Directory.t() def directory(%__MODULE__{} = container, path) do selection = select(container.selection, "directory") selection = arg(selection, "path", path) %Dagger.Directory{selection: selection, client: container.client} end ) ( @doc "Retrieves entrypoint to be prepended to the arguments of all commands." @spec entrypoint(t()) :: {:ok, [Dagger.String.t()] | nil} | {:error, term()} def entrypoint(%__MODULE__{} = container) do selection = select(container.selection, "entrypoint") execute(selection, container.client) end ) ( @doc "Retrieves the value of the specified environment variable.\n\n## Required Arguments\n\n* `name` - The name of the environment variable to retrieve (e.g., \"PATH\")." @spec env_variable(t(), Dagger.String.t()) :: {:ok, Dagger.String.t() | nil} | {:error, term()} def env_variable(%__MODULE__{} = container, name) do selection = select(container.selection, "envVariable") selection = arg(selection, "name", name) execute(selection, container.client) end ) ( @doc "Retrieves the list of environment variables passed to commands." @spec env_variables(t()) :: {:ok, [Dagger.EnvVariable.t()]} | {:error, term()} def env_variables(%__MODULE__{} = container) do selection = select(container.selection, "envVariables") selection = select(selection, "name value") with {:ok, data} <- execute(selection, container.client) do Nestru.decode_from_list_of_maps(data, Dagger.EnvVariable) end end ) ( @doc "EXPERIMENTAL API! Subject to change/removal at any time.\n\nexperimentalWithAllGPUs configures all available GPUs on the host to be accessible to this container.\nThis currently works for Nvidia devices only." @spec experimental_with_all_gp_us(t()) :: Dagger.Container.t() def experimental_with_all_gp_us(%__MODULE__{} = container) do selection = select(container.selection, "experimentalWithAllGPUs") %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "EXPERIMENTAL API! Subject to change/removal at any time.\n\nexperimentalWithGPU configures the provided list of devices to be accesible to this container.\nThis currently works for Nvidia devices only.\n\n## Required Arguments\n\n* `devices` -" @spec experimental_with_gpu(t(), [Dagger.String.t()]) :: Dagger.Container.t() def experimental_with_gpu(%__MODULE__{} = container, devices) do selection = select(container.selection, "experimentalWithGPU") selection = arg(selection, "devices", devices) %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Writes the container as an OCI tarball to the destination file path on the host for the specified platform variants.\n\nReturn true on success.\nIt can also publishes platform variants.\n\n## Required Arguments\n\n* `path` - Host's destination path (e.g., \"./tarball\").\nPath can be relative to the engine's workdir or absolute.\n\n## Optional Arguments\n\n* `platform_variants` - Identifiers for other platform specific containers.\nUsed for multi-platform image.\n* `forced_compression` - Force each layer of the exported image to use the specified compression algorithm.\nIf this is unset, then if a layer already has a compressed blob in the engine's\ncache, that will be used (this can result in a mix of compression algorithms for\ndifferent layers). If this is unset and a layer has no compressed blob in the\nengine's cache, then it will be compressed using Gzip.\n* `media_types` - Use the specified media types for the exported image's layers. Defaults to OCI, which\nis largely compatible with most recent container runtimes, but Docker may be needed\nfor older runtimes without OCI support." @spec export(t(), Dagger.String.t(), keyword()) :: {:ok, Dagger.Boolean.t()} | {:error, term()} def export(%__MODULE__{} = container, path, optional_args \\ []) do selection = select(container.selection, "export") selection = arg(selection, "path", path) selection = if is_nil(optional_args[:platform_variants]) do selection else ids = optional_args[:platform_variants] |> Enum.map(fn value -> {:ok, id} = Dagger.Container.id(value) id end) arg(selection, "platformVariants", ids) end selection = if is_nil(optional_args[:forced_compression]) do selection else arg(selection, "forcedCompression", optional_args[:forced_compression]) end selection = if is_nil(optional_args[:media_types]) do selection else arg(selection, "mediaTypes", optional_args[:media_types]) end execute(selection, container.client) end ) ( @doc "Retrieves the list of exposed ports.\n\nThis includes ports already exposed by the image, even if not\nexplicitly added with dagger." @spec exposed_ports(t()) :: {:ok, [Dagger.Port.t()]} | {:error, term()} def exposed_ports(%__MODULE__{} = container) do selection = select(container.selection, "exposedPorts") selection = select(selection, "description port protocol") with {:ok, data} <- execute(selection, container.client) do Nestru.decode_from_list_of_maps(data, Dagger.Port) end end ) ( @doc "Retrieves a file at the given path.\n\nMounts are included.\n\n## Required Arguments\n\n* `path` - The path of the file to retrieve (e.g., \"./README.md\")." @spec file(t(), Dagger.String.t()) :: Dagger.File.t() def file(%__MODULE__{} = container, path) do selection = select(container.selection, "file") selection = arg(selection, "path", path) %Dagger.File{selection: selection, client: container.client} end ) ( @doc "Initializes this container from a pulled base image.\n\n## Required Arguments\n\n* `address` - Image's address from its registry.\n\nFormatted as [host]/[user]/[repo]:[tag] (e.g., \"docker.io/dagger/dagger:main\")." @spec from(t(), Dagger.String.t()) :: Dagger.Container.t() def from(%__MODULE__{} = container, address) do selection = select(container.selection, "from") selection = arg(selection, "address", address) %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "A unique identifier for this container." @spec id(t()) :: {:ok, Dagger.ContainerID.t()} | {:error, term()} def id(%__MODULE__{} = container) do selection = select(container.selection, "id") execute(selection, container.client) end ) ( @doc "The unique image reference which can only be retrieved immediately after the 'Container.From' call." @spec image_ref(t()) :: {:ok, Dagger.String.t() | nil} | {:error, term()} def image_ref(%__MODULE__{} = container) do selection = select(container.selection, "imageRef") execute(selection, container.client) end ) ( @doc "Reads the container from an OCI tarball.\n\nNOTE: this involves unpacking the tarball to an OCI store on the host at\n$XDG_CACHE_DIR/dagger/oci. This directory can be removed whenever you like.\n\n## Required Arguments\n\n* `source` - File to read the container from.\n\n## Optional Arguments\n\n* `tag` - Identifies the tag to import from the archive, if the archive bundles\nmultiple tags." @spec import(t(), Dagger.File.t(), keyword()) :: Dagger.Container.t() def import(%__MODULE__{} = container, source, optional_args \\ []) do selection = select(container.selection, "import") ( {:ok, id} = Dagger.File.id(source) selection = arg(selection, "source", id) ) selection = if is_nil(optional_args[:tag]) do selection else arg(selection, "tag", optional_args[:tag]) end %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Retrieves the value of the specified label.\n\n## Required Arguments\n\n* `name` -" @spec label(t(), Dagger.String.t()) :: {:ok, Dagger.String.t() | nil} | {:error, term()} def label(%__MODULE__{} = container, name) do selection = select(container.selection, "label") selection = arg(selection, "name", name) execute(selection, container.client) end ) ( @doc "Retrieves the list of labels passed to container." @spec labels(t()) :: {:ok, [Dagger.Label.t()]} | {:error, term()} def labels(%__MODULE__{} = container) do selection = select(container.selection, "labels") selection = select(selection, "name value") with {:ok, data} <- execute(selection, container.client) do Nestru.decode_from_list_of_maps(data, Dagger.Label) end end ) ( @doc "Retrieves the list of paths where a directory is mounted." @spec mounts(t()) :: {:ok, [Dagger.String.t()]} | {:error, term()} def mounts(%__MODULE__{} = container) do selection = select(container.selection, "mounts") execute(selection, container.client) end ) ( @doc "Creates a named sub-pipeline\n\n## Required Arguments\n\n* `name` - Pipeline name.\n\n## Optional Arguments\n\n* `description` - Pipeline description.\n* `labels` - Pipeline labels." @spec pipeline(t(), Dagger.String.t(), keyword()) :: Dagger.Container.t() def pipeline(%__MODULE__{} = container, name, optional_args \\ []) do selection = select(container.selection, "pipeline") selection = arg(selection, "name", name) selection = if is_nil(optional_args[:description]) do selection else arg(selection, "description", optional_args[:description]) end selection = if is_nil(optional_args[:labels]) do selection else arg(selection, "labels", optional_args[:labels]) end %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "The platform this container executes and publishes as." @spec platform(t()) :: {:ok, Dagger.Platform.t()} | {:error, term()} def platform(%__MODULE__{} = container) do selection = select(container.selection, "platform") execute(selection, container.client) end ) ( @doc "Publishes this container as a new image to the specified address.\n\nPublish returns a fully qualified ref.\nIt can also publish platform variants.\n\n## Required Arguments\n\n* `address` - Registry's address to publish the image to.\n\nFormatted as [host]/[user]/[repo]:[tag] (e.g. \"docker.io/dagger/dagger:main\").\n\n## Optional Arguments\n\n* `platform_variants` - Identifiers for other platform specific containers.\nUsed for multi-platform image.\n* `forced_compression` - Force each layer of the published image to use the specified compression algorithm.\nIf this is unset, then if a layer already has a compressed blob in the engine's\ncache, that will be used (this can result in a mix of compression algorithms for\ndifferent layers). If this is unset and a layer has no compressed blob in the\nengine's cache, then it will be compressed using Gzip.\n* `media_types` - Use the specified media types for the published image's layers. Defaults to OCI, which\nis largely compatible with most recent registries, but Docker may be needed for older\nregistries without OCI support." @spec publish(t(), Dagger.String.t(), keyword()) :: {:ok, Dagger.String.t()} | {:error, term()} def publish(%__MODULE__{} = container, address, optional_args \\ []) do selection = select(container.selection, "publish") selection = arg(selection, "address", address) selection = if is_nil(optional_args[:platform_variants]) do selection else ids = optional_args[:platform_variants] |> Enum.map(fn value -> {:ok, id} = Dagger.Container.id(value) id end) arg(selection, "platformVariants", ids) end selection = if is_nil(optional_args[:forced_compression]) do selection else arg(selection, "forcedCompression", optional_args[:forced_compression]) end selection = if is_nil(optional_args[:media_types]) do selection else arg(selection, "mediaTypes", optional_args[:media_types]) end execute(selection, container.client) end ) ( @doc "Retrieves this container's root filesystem. Mounts are not included." @spec rootfs(t()) :: Dagger.Directory.t() def rootfs(%__MODULE__{} = container) do selection = select(container.selection, "rootfs") %Dagger.Directory{selection: selection, client: container.client} end ) ( @doc "Return a websocket endpoint that, if connected to, will start the container with a TTY streamed\nover the websocket.\n\nPrimarily intended for internal use with the dagger CLI." @spec shell_endpoint(t()) :: {:ok, Dagger.String.t()} | {:error, term()} def shell_endpoint(%__MODULE__{} = container) do selection = select(container.selection, "shellEndpoint") execute(selection, container.client) end ) ( @doc "The error stream of the last executed command.\n\nWill execute default command if none is set, or error if there's no default." @spec stderr(t()) :: {:ok, Dagger.String.t()} | {:error, term()} def stderr(%__MODULE__{} = container) do selection = select(container.selection, "stderr") execute(selection, container.client) end ) ( @doc "The output stream of the last executed command.\n\nWill execute default command if none is set, or error if there's no default." @spec stdout(t()) :: {:ok, Dagger.String.t()} | {:error, term()} def stdout(%__MODULE__{} = container) do selection = select(container.selection, "stdout") execute(selection, container.client) end ) ( @doc "Forces evaluation of the pipeline in the engine.\n\nIt doesn't run the default command if no exec has been set." @spec sync(t()) :: {:ok, Dagger.ContainerID.t()} | {:error, term()} def sync(%__MODULE__{} = container) do selection = select(container.selection, "sync") execute(selection, container.client) end ) ( @doc "Retrieves the user to be set for all commands." @spec user(t()) :: {:ok, Dagger.String.t() | nil} | {:error, term()} def user(%__MODULE__{} = container) do selection = select(container.selection, "user") execute(selection, container.client) end ) ( @doc "Configures default arguments for future commands.\n\n\n\n## Optional Arguments\n\n* `args` - Arguments to prepend to future executions (e.g., [\"-v\", \"--no-cache\"])." @spec with_default_args(t(), keyword()) :: Dagger.Container.t() def with_default_args(%__MODULE__{} = container, optional_args \\ []) do selection = select(container.selection, "withDefaultArgs") selection = if is_nil(optional_args[:args]) do selection else arg(selection, "args", optional_args[:args]) end %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Retrieves this container plus a directory written at the given path.\n\n## Required Arguments\n\n* `path` - Location of the written directory (e.g., \"/tmp/directory\").\n* `directory` - Identifier of the directory to write\n\n## Optional Arguments\n\n* `exclude` - Patterns to exclude in the written directory (e.g., [\"node_modules/**\", \".gitignore\", \".git/\"]).\n* `include` - Patterns to include in the written directory (e.g., [\"*.go\", \"go.mod\", \"go.sum\"]).\n* `owner` - A user:group to set for the directory and its contents.\n\nThe user and group can either be an ID (1000:1000) or a name (foo:bar).\n\nIf the group is omitted, it defaults to the same as the user." @spec with_directory(t(), Dagger.String.t(), Dagger.Directory.t(), keyword()) :: Dagger.Container.t() def with_directory(%__MODULE__{} = container, path, directory, optional_args \\ []) do selection = select(container.selection, "withDirectory") selection = arg(selection, "path", path) ( {:ok, id} = Dagger.Directory.id(directory) selection = arg(selection, "directory", id) ) selection = if is_nil(optional_args[:exclude]) do selection else arg(selection, "exclude", optional_args[:exclude]) end selection = if is_nil(optional_args[:include]) do selection else arg(selection, "include", optional_args[:include]) end selection = if is_nil(optional_args[:owner]) do selection else arg(selection, "owner", optional_args[:owner]) end %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Retrieves this container but with a different command entrypoint.\n\n## Required Arguments\n\n* `args` - Entrypoint to use for future executions (e.g., [\"go\", \"run\"])." @spec with_entrypoint(t(), [Dagger.String.t()]) :: Dagger.Container.t() def with_entrypoint(%__MODULE__{} = container, args) do selection = select(container.selection, "withEntrypoint") selection = arg(selection, "args", args) %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Retrieves this container plus the given environment variable.\n\n## Required Arguments\n\n* `name` - The name of the environment variable (e.g., \"HOST\").\n* `value` - The value of the environment variable. (e.g., \"localhost\").\n\n## Optional Arguments\n\n* `expand` - Replace `${VAR}` or $VAR in the value according to the current environment\nvariables defined in the container (e.g., \"/opt/bin:$PATH\")." @spec with_env_variable(t(), Dagger.String.t(), Dagger.String.t(), keyword()) :: Dagger.Container.t() def with_env_variable(%__MODULE__{} = container, name, value, optional_args \\ []) do selection = select(container.selection, "withEnvVariable") selection = arg(selection, "name", name) selection = arg(selection, "value", value) selection = if is_nil(optional_args[:expand]) do selection else arg(selection, "expand", optional_args[:expand]) end %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Retrieves this container after executing the specified command inside it.\n\n## Required Arguments\n\n* `args` - Command to run instead of the container's default command (e.g., [\"run\", \"main.go\"]).\n\nIf empty, the container's default command is used.\n\n## Optional Arguments\n\n* `skip_entrypoint` - If the container has an entrypoint, ignore it for args rather than using it to wrap them.\n* `stdin` - Content to write to the command's standard input before closing (e.g., \"Hello world\").\n* `redirect_stdout` - Redirect the command's standard output to a file in the container (e.g., \"/tmp/stdout\").\n* `redirect_stderr` - Redirect the command's standard error to a file in the container (e.g., \"/tmp/stderr\").\n* `experimental_privileged_nesting` - Provides dagger access to the executed command.\n\nDo not use this option unless you trust the command being executed.\nThe command being executed WILL BE GRANTED FULL ACCESS TO YOUR HOST FILESYSTEM.\n* `insecure_root_capabilities` - Execute the command with all root capabilities. This is similar to running a command\nwith \"sudo\" or executing `docker run` with the `--privileged` flag. Containerization\ndoes not provide any security guarantees when using this option. It should only be used\nwhen absolutely necessary and only with trusted commands." @spec with_exec(t(), [Dagger.String.t()], keyword()) :: Dagger.Container.t() def with_exec(%__MODULE__{} = container, args, optional_args \\ []) do selection = select(container.selection, "withExec") selection = arg(selection, "args", args) selection = if is_nil(optional_args[:skip_entrypoint]) do selection else arg(selection, "skipEntrypoint", optional_args[:skip_entrypoint]) end selection = if is_nil(optional_args[:stdin]) do selection else arg(selection, "stdin", optional_args[:stdin]) end selection = if is_nil(optional_args[:redirect_stdout]) do selection else arg(selection, "redirectStdout", optional_args[:redirect_stdout]) end selection = if is_nil(optional_args[:redirect_stderr]) do selection else arg(selection, "redirectStderr", optional_args[:redirect_stderr]) end selection = if is_nil(optional_args[:experimental_privileged_nesting]) do selection else arg( selection, "experimentalPrivilegedNesting", optional_args[:experimental_privileged_nesting] ) end selection = if is_nil(optional_args[:insecure_root_capabilities]) do selection else arg(selection, "insecureRootCapabilities", optional_args[:insecure_root_capabilities]) end %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Expose a network port.\n\nExposed ports serve two purposes:\n\n- For health checks and introspection, when running services\n- For setting the EXPOSE OCI field when publishing the container\n\n## Required Arguments\n\n* `port` - Port number to expose\n\n## Optional Arguments\n\n* `protocol` - Transport layer network protocol\n* `description` - Optional port description" @spec with_exposed_port(t(), Dagger.Int.t(), keyword()) :: Dagger.Container.t() def with_exposed_port(%__MODULE__{} = container, port, optional_args \\ []) do selection = select(container.selection, "withExposedPort") selection = arg(selection, "port", port) selection = if is_nil(optional_args[:protocol]) do selection else arg(selection, "protocol", optional_args[:protocol]) end selection = if is_nil(optional_args[:description]) do selection else arg(selection, "description", optional_args[:description]) end %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Retrieves this container plus the contents of the given file copied to the given path.\n\n## Required Arguments\n\n* `path` - Location of the copied file (e.g., \"/tmp/file.txt\").\n* `source` - Identifier of the file to copy.\n\n## Optional Arguments\n\n* `permissions` - Permission given to the copied file (e.g., 0600).\n\nDefault: 0644.\n* `owner` - A user:group to set for the file.\n\nThe user and group can either be an ID (1000:1000) or a name (foo:bar).\n\nIf the group is omitted, it defaults to the same as the user." @spec with_file(t(), Dagger.String.t(), Dagger.File.t(), keyword()) :: Dagger.Container.t() def with_file(%__MODULE__{} = container, path, source, optional_args \\ []) do selection = select(container.selection, "withFile") selection = arg(selection, "path", path) ( {:ok, id} = Dagger.File.id(source) selection = arg(selection, "source", id) ) selection = if is_nil(optional_args[:permissions]) do selection else arg(selection, "permissions", optional_args[:permissions]) end selection = if is_nil(optional_args[:owner]) do selection else arg(selection, "owner", optional_args[:owner]) end %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Indicate that subsequent operations should be featured more prominently in\nthe UI." @spec with_focus(t()) :: Dagger.Container.t() def with_focus(%__MODULE__{} = container) do selection = select(container.selection, "withFocus") %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Retrieves this container plus the given label.\n\n## Required Arguments\n\n* `name` - The name of the label (e.g., \"org.opencontainers.artifact.created\").\n* `value` - The value of the label (e.g., \"2023-01-01T00:00:00Z\")." @spec with_label(t(), Dagger.String.t(), Dagger.String.t()) :: Dagger.Container.t() def with_label(%__MODULE__{} = container, name, value) do selection = select(container.selection, "withLabel") selection = arg(selection, "name", name) selection = arg(selection, "value", value) %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Retrieves this container plus a cache volume mounted at the given path.\n\n## Required Arguments\n\n* `path` - Location of the cache directory (e.g., \"/cache/node_modules\").\n* `cache` - Identifier of the cache volume to mount.\n\n## Optional Arguments\n\n* `source` - Identifier of the directory to use as the cache volume's root.\n* `sharing` - Sharing mode of the cache volume.\n* `owner` - A user:group to set for the mounted cache directory.\n\nNote that this changes the ownership of the specified mount along with the\ninitial filesystem provided by source (if any). It does not have any effect\nif/when the cache has already been created.\n\nThe user and group can either be an ID (1000:1000) or a name (foo:bar).\n\nIf the group is omitted, it defaults to the same as the user." @spec with_mounted_cache(t(), Dagger.String.t(), Dagger.CacheVolume.t(), keyword()) :: Dagger.Container.t() def with_mounted_cache(%__MODULE__{} = container, path, cache, optional_args \\ []) do selection = select(container.selection, "withMountedCache") selection = arg(selection, "path", path) ( {:ok, id} = Dagger.CacheVolume.id(cache) selection = arg(selection, "cache", id) ) selection = if is_nil(optional_args[:source]) do selection else {:ok, id} = Dagger.Directory.id(optional_args[:source]) arg(selection, "source", id) end selection = if is_nil(optional_args[:sharing]) do selection else arg(selection, "sharing", optional_args[:sharing]) end selection = if is_nil(optional_args[:owner]) do selection else arg(selection, "owner", optional_args[:owner]) end %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Retrieves this container plus a directory mounted at the given path.\n\n## Required Arguments\n\n* `path` - Location of the mounted directory (e.g., \"/mnt/directory\").\n* `source` - Identifier of the mounted directory.\n\n## Optional Arguments\n\n* `owner` - A user:group to set for the mounted directory and its contents.\n\nThe user and group can either be an ID (1000:1000) or a name (foo:bar).\n\nIf the group is omitted, it defaults to the same as the user." @spec with_mounted_directory(t(), Dagger.String.t(), Dagger.Directory.t(), keyword()) :: Dagger.Container.t() def with_mounted_directory(%__MODULE__{} = container, path, source, optional_args \\ []) do selection = select(container.selection, "withMountedDirectory") selection = arg(selection, "path", path) ( {:ok, id} = Dagger.Directory.id(source) selection = arg(selection, "source", id) ) selection = if is_nil(optional_args[:owner]) do selection else arg(selection, "owner", optional_args[:owner]) end %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Retrieves this container plus a file mounted at the given path.\n\n## Required Arguments\n\n* `path` - Location of the mounted file (e.g., \"/tmp/file.txt\").\n* `source` - Identifier of the mounted file.\n\n## Optional Arguments\n\n* `owner` - A user or user:group to set for the mounted file.\n\nThe user and group can either be an ID (1000:1000) or a name (foo:bar).\n\nIf the group is omitted, it defaults to the same as the user." @spec with_mounted_file(t(), Dagger.String.t(), Dagger.File.t(), keyword()) :: Dagger.Container.t() def with_mounted_file(%__MODULE__{} = container, path, source, optional_args \\ []) do selection = select(container.selection, "withMountedFile") selection = arg(selection, "path", path) ( {:ok, id} = Dagger.File.id(source) selection = arg(selection, "source", id) ) selection = if is_nil(optional_args[:owner]) do selection else arg(selection, "owner", optional_args[:owner]) end %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Retrieves this container plus a secret mounted into a file at the given path.\n\n## Required Arguments\n\n* `path` - Location of the secret file (e.g., \"/tmp/secret.txt\").\n* `source` - Identifier of the secret to mount.\n\n## Optional Arguments\n\n* `owner` - A user:group to set for the mounted secret.\n\nThe user and group can either be an ID (1000:1000) or a name (foo:bar).\n\nIf the group is omitted, it defaults to the same as the user.\n* `mode` - Permission given to the mounted secret (e.g., 0600).\nThis option requires an owner to be set to be active.\n\nDefault: 0400." @spec with_mounted_secret(t(), Dagger.String.t(), Dagger.Secret.t(), keyword()) :: Dagger.Container.t() def with_mounted_secret(%__MODULE__{} = container, path, source, optional_args \\ []) do selection = select(container.selection, "withMountedSecret") selection = arg(selection, "path", path) ( {:ok, id} = Dagger.Secret.id(source) selection = arg(selection, "source", id) ) selection = if is_nil(optional_args[:owner]) do selection else arg(selection, "owner", optional_args[:owner]) end selection = if is_nil(optional_args[:mode]) do selection else arg(selection, "mode", optional_args[:mode]) end %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Retrieves this container plus a temporary directory mounted at the given path.\n\n## Required Arguments\n\n* `path` - Location of the temporary directory (e.g., \"/tmp/temp_dir\")." @spec with_mounted_temp(t(), Dagger.String.t()) :: Dagger.Container.t() def with_mounted_temp(%__MODULE__{} = container, path) do selection = select(container.selection, "withMountedTemp") selection = arg(selection, "path", path) %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Retrieves this container plus a new file written at the given path.\n\n## Required Arguments\n\n* `path` - Location of the written file (e.g., \"/tmp/file.txt\").\n\n## Optional Arguments\n\n* `contents` - Content of the file to write (e.g., \"Hello world!\").\n* `permissions` - Permission given to the written file (e.g., 0600).\n\nDefault: 0644.\n* `owner` - A user:group to set for the file.\n\nThe user and group can either be an ID (1000:1000) or a name (foo:bar).\n\nIf the group is omitted, it defaults to the same as the user." @spec with_new_file(t(), Dagger.String.t(), keyword()) :: Dagger.Container.t() def with_new_file(%__MODULE__{} = container, path, optional_args \\ []) do selection = select(container.selection, "withNewFile") selection = arg(selection, "path", path) selection = if is_nil(optional_args[:contents]) do selection else arg(selection, "contents", optional_args[:contents]) end selection = if is_nil(optional_args[:permissions]) do selection else arg(selection, "permissions", optional_args[:permissions]) end selection = if is_nil(optional_args[:owner]) do selection else arg(selection, "owner", optional_args[:owner]) end %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Retrieves this container with a registry authentication for a given address.\n\n## Required Arguments\n\n* `address` - Registry's address to bind the authentication to.\nFormatted as [host]/[user]/[repo]:[tag] (e.g. docker.io/dagger/dagger:main).\n* `username` - The username of the registry's account (e.g., \"Dagger\").\n* `secret` - The API key, password or token to authenticate to this registry." @spec with_registry_auth(t(), Dagger.String.t(), Dagger.String.t(), Dagger.Secret.t()) :: Dagger.Container.t() def with_registry_auth(%__MODULE__{} = container, address, username, secret) do selection = select(container.selection, "withRegistryAuth") selection = arg(selection, "address", address) selection = arg(selection, "username", username) ( {:ok, id} = Dagger.Secret.id(secret) selection = arg(selection, "secret", id) ) %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Initializes this container from this DirectoryID.\n\n## Required Arguments\n\n* `directory` -" @spec with_rootfs(t(), Dagger.Directory.t()) :: Dagger.Container.t() def with_rootfs(%__MODULE__{} = container, directory) do selection = select(container.selection, "withRootfs") ( {:ok, id} = Dagger.Directory.id(directory) selection = arg(selection, "directory", id) ) %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Retrieves this container plus an env variable containing the given secret.\n\n## Required Arguments\n\n* `name` - The name of the secret variable (e.g., \"API_SECRET\").\n* `secret` - The identifier of the secret value." @spec with_secret_variable(t(), Dagger.String.t(), Dagger.Secret.t()) :: Dagger.Container.t() def with_secret_variable(%__MODULE__{} = container, name, secret) do selection = select(container.selection, "withSecretVariable") selection = arg(selection, "name", name) ( {:ok, id} = Dagger.Secret.id(secret) selection = arg(selection, "secret", id) ) %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Establish a runtime dependency on a service.\n\nThe service will be started automatically when needed and detached when it is\nno longer needed, executing the default command if none is set.\n\nThe service will be reachable from the container via the provided hostname alias.\n\nThe service dependency will also convey to any files or directories produced by the container.\n\n## Required Arguments\n\n* `alias` - A name that can be used to reach the service from the container\n* `service` - Identifier of the service container" @spec with_service_binding(t(), Dagger.String.t(), Dagger.Service.t()) :: Dagger.Container.t() def with_service_binding(%__MODULE__{} = container, alias, service) do selection = select(container.selection, "withServiceBinding") selection = arg(selection, "alias", alias) ( {:ok, id} = Dagger.Service.id(service) selection = arg(selection, "service", id) ) %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Retrieves this container plus a socket forwarded to the given Unix socket path.\n\n## Required Arguments\n\n* `path` - Location of the forwarded Unix socket (e.g., \"/tmp/socket\").\n* `source` - Identifier of the socket to forward.\n\n## Optional Arguments\n\n* `owner` - A user:group to set for the mounted socket.\n\nThe user and group can either be an ID (1000:1000) or a name (foo:bar).\n\nIf the group is omitted, it defaults to the same as the user." @spec with_unix_socket(t(), Dagger.String.t(), Dagger.Socket.t(), keyword()) :: Dagger.Container.t() def with_unix_socket(%__MODULE__{} = container, path, source, optional_args \\ []) do selection = select(container.selection, "withUnixSocket") selection = arg(selection, "path", path) ( {:ok, id} = Dagger.Socket.id(source) selection = arg(selection, "source", id) ) selection = if is_nil(optional_args[:owner]) do selection else arg(selection, "owner", optional_args[:owner]) end %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Retrieves this container with a different command user.\n\n## Required Arguments\n\n* `name` - The user to set (e.g., \"root\")." @spec with_user(t(), Dagger.String.t()) :: Dagger.Container.t() def with_user(%__MODULE__{} = container, name) do selection = select(container.selection, "withUser") selection = arg(selection, "name", name) %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Retrieves this container with a different working directory.\n\n## Required Arguments\n\n* `path` - The path to set as the working directory (e.g., \"/app\")." @spec with_workdir(t(), Dagger.String.t()) :: Dagger.Container.t() def with_workdir(%__MODULE__{} = container, path) do selection = select(container.selection, "withWorkdir") selection = arg(selection, "path", path) %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Retrieves this container minus the given environment variable.\n\n## Required Arguments\n\n* `name` - The name of the environment variable (e.g., \"HOST\")." @spec without_env_variable(t(), Dagger.String.t()) :: Dagger.Container.t() def without_env_variable(%__MODULE__{} = container, name) do selection = select(container.selection, "withoutEnvVariable") selection = arg(selection, "name", name) %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Unexpose a previously exposed port.\n\n## Required Arguments\n\n* `port` - Port number to unexpose\n\n## Optional Arguments\n\n* `protocol` - Port protocol to unexpose" @spec without_exposed_port(t(), Dagger.Int.t(), keyword()) :: Dagger.Container.t() def without_exposed_port(%__MODULE__{} = container, port, optional_args \\ []) do selection = select(container.selection, "withoutExposedPort") selection = arg(selection, "port", port) selection = if is_nil(optional_args[:protocol]) do selection else arg(selection, "protocol", optional_args[:protocol]) end %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Indicate that subsequent operations should not be featured more prominently\nin the UI.\n\nThis is the initial state of all containers." @spec without_focus(t()) :: Dagger.Container.t() def without_focus(%__MODULE__{} = container) do selection = select(container.selection, "withoutFocus") %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Retrieves this container minus the given environment label.\n\n## Required Arguments\n\n* `name` - The name of the label to remove (e.g., \"org.opencontainers.artifact.created\")." @spec without_label(t(), Dagger.String.t()) :: Dagger.Container.t() def without_label(%__MODULE__{} = container, name) do selection = select(container.selection, "withoutLabel") selection = arg(selection, "name", name) %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Retrieves this container after unmounting everything at the given path.\n\n## Required Arguments\n\n* `path` - Location of the cache directory (e.g., \"/cache/node_modules\")." @spec without_mount(t(), Dagger.String.t()) :: Dagger.Container.t() def without_mount(%__MODULE__{} = container, path) do selection = select(container.selection, "withoutMount") selection = arg(selection, "path", path) %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Retrieves this container without the registry authentication of a given address.\n\n## Required Arguments\n\n* `address` - Registry's address to remove the authentication from.\nFormatted as [host]/[user]/[repo]:[tag] (e.g. docker.io/dagger/dagger:main)." @spec without_registry_auth(t(), Dagger.String.t()) :: Dagger.Container.t() def without_registry_auth(%__MODULE__{} = container, address) do selection = select(container.selection, "withoutRegistryAuth") selection = arg(selection, "address", address) %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Retrieves this container with a previously added Unix socket removed.\n\n## Required Arguments\n\n* `path` - Location of the socket to remove (e.g., \"/tmp/socket\")." @spec without_unix_socket(t(), Dagger.String.t()) :: Dagger.Container.t() def without_unix_socket(%__MODULE__{} = container, path) do selection = select(container.selection, "withoutUnixSocket") selection = arg(selection, "path", path) %Dagger.Container{selection: selection, client: container.client} end ) ( @doc "Retrieves the working directory for all commands." @spec workdir(t()) :: {:ok, Dagger.String.t() | nil} | {:error, term()} def workdir(%__MODULE__{} = container) do selection = select(container.selection, "workdir") execute(selection, container.client) end ) end
closed
dagger/dagger
https://github.com/dagger/dagger
3,284
Use `withoutEntrypoint`, `withoutWorkdir`, `withoutUser` and `withoutDefaultArgs` to remove
Currently, passing nil or empty arguments to those function reinit the values. It's not that explicit and clear. It will make more API endpoints, but it's gonna be clearer.
https://github.com/dagger/dagger/issues/3284
https://github.com/dagger/dagger/pull/6278
568d802bb892f1e074cf74cfce2a551989418964
cd825bde699a0beb0adb5c2529da5469118a172b
"2022-10-07T15:00:07Z"
go
"2023-12-19T13:11:01Z"
sdk/go/dagger.gen.go
// Code generated by dagger. DO NOT EDIT. package dagger import ( "context" "encoding/json" "fmt" "reflect" "github.com/Khan/genqlient/graphql" "dagger.io/dagger/querybuilder" ) // assertNotNil panic if the given value is nil. // This function is used to validate that input with pointer type are not nil. // See https://github.com/dagger/dagger/issues/5696 for more context. func assertNotNil(argName string, value any) { // We use reflect because just comparing value to nil is not working since // the value is wrapped into a type when passed as parameter. // E.g., nil become (*dagger.File)(nil). if reflect.ValueOf(value).IsNil() { panic(fmt.Sprintf("unexpected nil pointer for argument %q", argName)) } } // ptr returns a pointer to the given value. func ptr[T any](v T) *T { return &v } // Optional is a helper type to represent optional values. Any method arguments // that use this wrapper type will be set as optional in the generated API. // // To construct an Optional from within a module, use the Opt helper function. type Optional[T any] struct { value T isSet bool } // Opt is a helper function to construct an Optional with the given value set. func Opt[T any](v T) Optional[T] { return Optional[T]{value: v, isSet: true} } // OptEmpty is a helper function to construct an empty Optional. func OptEmpty[T any]() Optional[T] { return Optional[T]{} } // Get returns the internal value of the optional and a boolean indicating if // the value was set explicitly by the caller. func (o *Optional[T]) Get() (T, bool) { if o == nil { var empty T return empty, false } return o.value, o.isSet } // GetOr returns the internal value of the optional or the given default value // if the value was not explicitly set by the caller. func (o *Optional[T]) GetOr(defaultValue T) T { if o == nil { return defaultValue } if o.isSet { return o.value } return defaultValue } func (o *Optional[T]) MarshalJSON() ([]byte, error) { return json.Marshal(&o.value) } func (o *Optional[T]) UnmarshalJSON(dt []byte) error { o.isSet = true return json.Unmarshal(dt, &o.value) } // A global cache volume identifier. type CacheVolumeID string // A unique container identifier. Null designates an empty container (scratch). type ContainerID string // A content-addressed directory identifier. type DirectoryID string // A file identifier. type FileID string // A reference to a FunctionArg. type FunctionArgID string // A reference to a Function. type FunctionID string // A reference to GeneratedCode. type GeneratedCodeID string // A git reference identifier. type GitRefID string // A git repository identifier. type GitRepositoryID string // An arbitrary JSON-encoded value. type JSON string // A reference to a Module. type ModuleID string // The platform config OS and architecture in a Container. // // The format is [os]/[platform]/[version] (e.g., "darwin/arm64/v7", "windows/amd64", "linux/arm64"). type Platform string // A unique identifier for a secret. type SecretID string // A unique service identifier. type ServiceID string // A content-addressed socket identifier. type SocketID string // A reference to a TypeDef. type TypeDefID string // The absense of a value. // // A Null Void is used as a placeholder for resolvers that do not return anything. type Void string // Key value object that represents a build argument. type BuildArg struct { // The build argument name. Name string `json:"name"` // The build argument value. Value string `json:"value"` } // Key value object that represents a Pipeline label. type PipelineLabel struct { // Label name. Name string `json:"name"` // Label value. Value string `json:"value"` } // Port forwarding rules for tunneling network traffic. type PortForward struct { // Destination port for traffic. Backend int `json:"backend"` // Port to expose to clients. If unspecified, a default will be chosen. Frontend int `json:"frontend"` // Protocol to use for traffic. Protocol NetworkProtocol `json:"protocol,omitempty"` } // A directory whose contents persist across runs. type CacheVolume struct { q *querybuilder.Selection c graphql.Client id *CacheVolumeID } func (r *CacheVolume) ID(ctx context.Context) (CacheVolumeID, error) { if r.id != nil { return *r.id, nil } q := r.q.Select("id") var response CacheVolumeID q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // XXX_GraphQLType is an internal function. It returns the native GraphQL type name func (r *CacheVolume) XXX_GraphQLType() string { return "CacheVolume" } // XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object func (r *CacheVolume) XXX_GraphQLIDType() string { return "CacheVolumeID" } // XXX_GraphQLID is an internal function. It returns the underlying type ID func (r *CacheVolume) XXX_GraphQLID(ctx context.Context) (string, error) { id, err := r.ID(ctx) if err != nil { return "", err } return string(id), nil } func (r *CacheVolume) MarshalJSON() ([]byte, error) { id, err := r.ID(context.Background()) if err != nil { return nil, err } return json.Marshal(id) } // An OCI-compatible container, also known as a docker container. type Container struct { q *querybuilder.Selection c graphql.Client envVariable *string export *bool id *ContainerID imageRef *string label *string platform *Platform publish *string shellEndpoint *string stderr *string stdout *string sync *ContainerID user *string workdir *string } type WithContainerFunc func(r *Container) *Container // With calls the provided function with current Container. // // This is useful for reusability and readability by not breaking the calling chain. func (r *Container) With(f WithContainerFunc) *Container { return f(r) } // Turn the container into a Service. // // Be sure to set any exposed ports before this conversion. func (r *Container) AsService() *Service { q := r.q.Select("asService") return &Service{ q: q, c: r.c, } } // ContainerAsTarballOpts contains options for Container.AsTarball type ContainerAsTarballOpts struct { // Identifiers for other platform specific containers. // Used for multi-platform image. PlatformVariants []*Container // Force each layer of the image to use the specified compression algorithm. // If this is unset, then if a layer already has a compressed blob in the engine's // cache, that will be used (this can result in a mix of compression algorithms for // different layers). If this is unset and a layer has no compressed blob in the // engine's cache, then it will be compressed using Gzip. ForcedCompression ImageLayerCompression // Use the specified media types for the image's layers. Defaults to OCI, which // is largely compatible with most recent container runtimes, but Docker may be needed // for older runtimes without OCI support. MediaTypes ImageMediaTypes } // Returns a File representing the container serialized to a tarball. func (r *Container) AsTarball(opts ...ContainerAsTarballOpts) *File { q := r.q.Select("asTarball") for i := len(opts) - 1; i >= 0; i-- { // `platformVariants` optional argument if !querybuilder.IsZeroValue(opts[i].PlatformVariants) { q = q.Arg("platformVariants", opts[i].PlatformVariants) } // `forcedCompression` optional argument if !querybuilder.IsZeroValue(opts[i].ForcedCompression) { q = q.Arg("forcedCompression", opts[i].ForcedCompression) } // `mediaTypes` optional argument if !querybuilder.IsZeroValue(opts[i].MediaTypes) { q = q.Arg("mediaTypes", opts[i].MediaTypes) } } return &File{ q: q, c: r.c, } } // ContainerBuildOpts contains options for Container.Build type ContainerBuildOpts struct { // Path to the Dockerfile to use. // // Default: './Dockerfile'. Dockerfile string // Additional build arguments. BuildArgs []BuildArg // Target build stage to build. Target string // Secrets to pass to the build. // // They will be mounted at /run/secrets/[secret-name] in the build container // // They can be accessed in the Dockerfile using the "secret" mount type // and mount path /run/secrets/[secret-name] // e.g. RUN --mount=type=secret,id=my-secret curl url?token=$(cat /run/secrets/my-secret)" Secrets []*Secret } // Initializes this container from a Dockerfile build. func (r *Container) Build(context *Directory, opts ...ContainerBuildOpts) *Container { assertNotNil("context", context) q := r.q.Select("build") for i := len(opts) - 1; i >= 0; i-- { // `dockerfile` optional argument if !querybuilder.IsZeroValue(opts[i].Dockerfile) { q = q.Arg("dockerfile", opts[i].Dockerfile) } // `buildArgs` optional argument if !querybuilder.IsZeroValue(opts[i].BuildArgs) { q = q.Arg("buildArgs", opts[i].BuildArgs) } // `target` optional argument if !querybuilder.IsZeroValue(opts[i].Target) { q = q.Arg("target", opts[i].Target) } // `secrets` optional argument if !querybuilder.IsZeroValue(opts[i].Secrets) { q = q.Arg("secrets", opts[i].Secrets) } } q = q.Arg("context", context) return &Container{ q: q, c: r.c, } } // Retrieves default arguments for future commands. func (r *Container) DefaultArgs(ctx context.Context) ([]string, error) { q := r.q.Select("defaultArgs") var response []string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Retrieves a directory at the given path. // // Mounts are included. func (r *Container) Directory(path string) *Directory { q := r.q.Select("directory") q = q.Arg("path", path) return &Directory{ q: q, c: r.c, } } // Retrieves entrypoint to be prepended to the arguments of all commands. func (r *Container) Entrypoint(ctx context.Context) ([]string, error) { q := r.q.Select("entrypoint") var response []string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Retrieves the value of the specified environment variable. func (r *Container) EnvVariable(ctx context.Context, name string) (string, error) { if r.envVariable != nil { return *r.envVariable, nil } q := r.q.Select("envVariable") q = q.Arg("name", name) var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Retrieves the list of environment variables passed to commands. func (r *Container) EnvVariables(ctx context.Context) ([]EnvVariable, error) { q := r.q.Select("envVariables") q = q.Select("name value") type envVariables struct { Name string Value string } convert := func(fields []envVariables) []EnvVariable { out := []EnvVariable{} for i := range fields { val := EnvVariable{name: &fields[i].Name, value: &fields[i].Value} out = append(out, val) } return out } var response []envVariables q = q.Bind(&response) err := q.Execute(ctx, r.c) if err != nil { return nil, err } return convert(response), nil } // EXPERIMENTAL API! Subject to change/removal at any time. // // experimentalWithAllGPUs configures all available GPUs on the host to be accessible to this container. // This currently works for Nvidia devices only. func (r *Container) ExperimentalWithAllGPUs() *Container { q := r.q.Select("experimentalWithAllGPUs") return &Container{ q: q, c: r.c, } } // EXPERIMENTAL API! Subject to change/removal at any time. // // experimentalWithGPU configures the provided list of devices to be accesible to this container. // This currently works for Nvidia devices only. func (r *Container) ExperimentalWithGPU(devices []string) *Container { q := r.q.Select("experimentalWithGPU") q = q.Arg("devices", devices) return &Container{ q: q, c: r.c, } } // ContainerExportOpts contains options for Container.Export type ContainerExportOpts struct { // Identifiers for other platform specific containers. // Used for multi-platform image. PlatformVariants []*Container // Force each layer of the exported image to use the specified compression algorithm. // If this is unset, then if a layer already has a compressed blob in the engine's // cache, that will be used (this can result in a mix of compression algorithms for // different layers). If this is unset and a layer has no compressed blob in the // engine's cache, then it will be compressed using Gzip. ForcedCompression ImageLayerCompression // Use the specified media types for the exported image's layers. Defaults to OCI, which // is largely compatible with most recent container runtimes, but Docker may be needed // for older runtimes without OCI support. MediaTypes ImageMediaTypes } // Writes the container as an OCI tarball to the destination file path on the host for the specified platform variants. // // Return true on success. // It can also publishes platform variants. func (r *Container) Export(ctx context.Context, path string, opts ...ContainerExportOpts) (bool, error) { if r.export != nil { return *r.export, nil } q := r.q.Select("export") for i := len(opts) - 1; i >= 0; i-- { // `platformVariants` optional argument if !querybuilder.IsZeroValue(opts[i].PlatformVariants) { q = q.Arg("platformVariants", opts[i].PlatformVariants) } // `forcedCompression` optional argument if !querybuilder.IsZeroValue(opts[i].ForcedCompression) { q = q.Arg("forcedCompression", opts[i].ForcedCompression) } // `mediaTypes` optional argument if !querybuilder.IsZeroValue(opts[i].MediaTypes) { q = q.Arg("mediaTypes", opts[i].MediaTypes) } } q = q.Arg("path", path) var response bool q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Retrieves the list of exposed ports. // // This includes ports already exposed by the image, even if not // explicitly added with dagger. func (r *Container) ExposedPorts(ctx context.Context) ([]Port, error) { q := r.q.Select("exposedPorts") q = q.Select("description port protocol") type exposedPorts struct { Description string Port int Protocol NetworkProtocol } convert := func(fields []exposedPorts) []Port { out := []Port{} for i := range fields { val := Port{description: &fields[i].Description, port: &fields[i].Port, protocol: &fields[i].Protocol} out = append(out, val) } return out } var response []exposedPorts q = q.Bind(&response) err := q.Execute(ctx, r.c) if err != nil { return nil, err } return convert(response), nil } // Retrieves a file at the given path. // // Mounts are included. func (r *Container) File(path string) *File { q := r.q.Select("file") q = q.Arg("path", path) return &File{ q: q, c: r.c, } } // Initializes this container from a pulled base image. func (r *Container) From(address string) *Container { q := r.q.Select("from") q = q.Arg("address", address) return &Container{ q: q, c: r.c, } } // A unique identifier for this container. func (r *Container) ID(ctx context.Context) (ContainerID, error) { if r.id != nil { return *r.id, nil } q := r.q.Select("id") var response ContainerID q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // XXX_GraphQLType is an internal function. It returns the native GraphQL type name func (r *Container) XXX_GraphQLType() string { return "Container" } // XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object func (r *Container) XXX_GraphQLIDType() string { return "ContainerID" } // XXX_GraphQLID is an internal function. It returns the underlying type ID func (r *Container) XXX_GraphQLID(ctx context.Context) (string, error) { id, err := r.ID(ctx) if err != nil { return "", err } return string(id), nil } func (r *Container) MarshalJSON() ([]byte, error) { id, err := r.ID(context.Background()) if err != nil { return nil, err } return json.Marshal(id) } // The unique image reference which can only be retrieved immediately after the 'Container.From' call. func (r *Container) ImageRef(ctx context.Context) (string, error) { if r.imageRef != nil { return *r.imageRef, nil } q := r.q.Select("imageRef") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // ContainerImportOpts contains options for Container.Import type ContainerImportOpts struct { // Identifies the tag to import from the archive, if the archive bundles // multiple tags. Tag string } // Reads the container from an OCI tarball. // // NOTE: this involves unpacking the tarball to an OCI store on the host at // $XDG_CACHE_DIR/dagger/oci. This directory can be removed whenever you like. func (r *Container) Import(source *File, opts ...ContainerImportOpts) *Container { assertNotNil("source", source) q := r.q.Select("import") for i := len(opts) - 1; i >= 0; i-- { // `tag` optional argument if !querybuilder.IsZeroValue(opts[i].Tag) { q = q.Arg("tag", opts[i].Tag) } } q = q.Arg("source", source) return &Container{ q: q, c: r.c, } } // Retrieves the value of the specified label. func (r *Container) Label(ctx context.Context, name string) (string, error) { if r.label != nil { return *r.label, nil } q := r.q.Select("label") q = q.Arg("name", name) var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Retrieves the list of labels passed to container. func (r *Container) Labels(ctx context.Context) ([]Label, error) { q := r.q.Select("labels") q = q.Select("name value") type labels struct { Name string Value string } convert := func(fields []labels) []Label { out := []Label{} for i := range fields { val := Label{name: &fields[i].Name, value: &fields[i].Value} out = append(out, val) } return out } var response []labels q = q.Bind(&response) err := q.Execute(ctx, r.c) if err != nil { return nil, err } return convert(response), nil } // Retrieves the list of paths where a directory is mounted. func (r *Container) Mounts(ctx context.Context) ([]string, error) { q := r.q.Select("mounts") var response []string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // ContainerPipelineOpts contains options for Container.Pipeline type ContainerPipelineOpts struct { // Pipeline description. Description string // Pipeline labels. Labels []PipelineLabel } // Creates a named sub-pipeline func (r *Container) Pipeline(name string, opts ...ContainerPipelineOpts) *Container { q := r.q.Select("pipeline") for i := len(opts) - 1; i >= 0; i-- { // `description` optional argument if !querybuilder.IsZeroValue(opts[i].Description) { q = q.Arg("description", opts[i].Description) } // `labels` optional argument if !querybuilder.IsZeroValue(opts[i].Labels) { q = q.Arg("labels", opts[i].Labels) } } q = q.Arg("name", name) return &Container{ q: q, c: r.c, } } // The platform this container executes and publishes as. func (r *Container) Platform(ctx context.Context) (Platform, error) { if r.platform != nil { return *r.platform, nil } q := r.q.Select("platform") var response Platform q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // ContainerPublishOpts contains options for Container.Publish type ContainerPublishOpts struct { // Identifiers for other platform specific containers. // Used for multi-platform image. PlatformVariants []*Container // Force each layer of the published image to use the specified compression algorithm. // If this is unset, then if a layer already has a compressed blob in the engine's // cache, that will be used (this can result in a mix of compression algorithms for // different layers). If this is unset and a layer has no compressed blob in the // engine's cache, then it will be compressed using Gzip. ForcedCompression ImageLayerCompression // Use the specified media types for the published image's layers. Defaults to OCI, which // is largely compatible with most recent registries, but Docker may be needed for older // registries without OCI support. MediaTypes ImageMediaTypes } // Publishes this container as a new image to the specified address. // // Publish returns a fully qualified ref. // It can also publish platform variants. func (r *Container) Publish(ctx context.Context, address string, opts ...ContainerPublishOpts) (string, error) { if r.publish != nil { return *r.publish, nil } q := r.q.Select("publish") for i := len(opts) - 1; i >= 0; i-- { // `platformVariants` optional argument if !querybuilder.IsZeroValue(opts[i].PlatformVariants) { q = q.Arg("platformVariants", opts[i].PlatformVariants) } // `forcedCompression` optional argument if !querybuilder.IsZeroValue(opts[i].ForcedCompression) { q = q.Arg("forcedCompression", opts[i].ForcedCompression) } // `mediaTypes` optional argument if !querybuilder.IsZeroValue(opts[i].MediaTypes) { q = q.Arg("mediaTypes", opts[i].MediaTypes) } } q = q.Arg("address", address) var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Retrieves this container's root filesystem. Mounts are not included. func (r *Container) Rootfs() *Directory { q := r.q.Select("rootfs") return &Directory{ q: q, c: r.c, } } // Return a websocket endpoint that, if connected to, will start the container with a TTY streamed // over the websocket. // // Primarily intended for internal use with the dagger CLI. func (r *Container) ShellEndpoint(ctx context.Context) (string, error) { if r.shellEndpoint != nil { return *r.shellEndpoint, nil } q := r.q.Select("shellEndpoint") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The error stream of the last executed command. // // Will execute default command if none is set, or error if there's no default. func (r *Container) Stderr(ctx context.Context) (string, error) { if r.stderr != nil { return *r.stderr, nil } q := r.q.Select("stderr") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The output stream of the last executed command. // // Will execute default command if none is set, or error if there's no default. func (r *Container) Stdout(ctx context.Context) (string, error) { if r.stdout != nil { return *r.stdout, nil } q := r.q.Select("stdout") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Forces evaluation of the pipeline in the engine. // // It doesn't run the default command if no exec has been set. func (r *Container) Sync(ctx context.Context) (*Container, error) { q := r.q.Select("sync") return r, q.Execute(ctx, r.c) } // Retrieves the user to be set for all commands. func (r *Container) User(ctx context.Context) (string, error) { if r.user != nil { return *r.user, nil } q := r.q.Select("user") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // ContainerWithDefaultArgsOpts contains options for Container.WithDefaultArgs type ContainerWithDefaultArgsOpts struct { // Arguments to prepend to future executions (e.g., ["-v", "--no-cache"]). Args []string } // Configures default arguments for future commands. func (r *Container) WithDefaultArgs(opts ...ContainerWithDefaultArgsOpts) *Container { q := r.q.Select("withDefaultArgs") for i := len(opts) - 1; i >= 0; i-- { // `args` optional argument if !querybuilder.IsZeroValue(opts[i].Args) { q = q.Arg("args", opts[i].Args) } } return &Container{ q: q, c: r.c, } } // ContainerWithDirectoryOpts contains options for Container.WithDirectory type ContainerWithDirectoryOpts struct { // Patterns to exclude in the written directory (e.g., ["node_modules/**", ".gitignore", ".git/"]). Exclude []string // Patterns to include in the written directory (e.g., ["*.go", "go.mod", "go.sum"]). Include []string // A user:group to set for the directory and its contents. // // The user and group can either be an ID (1000:1000) or a name (foo:bar). // // If the group is omitted, it defaults to the same as the user. Owner string } // Retrieves this container plus a directory written at the given path. func (r *Container) WithDirectory(path string, directory *Directory, opts ...ContainerWithDirectoryOpts) *Container { assertNotNil("directory", directory) q := r.q.Select("withDirectory") for i := len(opts) - 1; i >= 0; i-- { // `exclude` optional argument if !querybuilder.IsZeroValue(opts[i].Exclude) { q = q.Arg("exclude", opts[i].Exclude) } // `include` optional argument if !querybuilder.IsZeroValue(opts[i].Include) { q = q.Arg("include", opts[i].Include) } // `owner` optional argument if !querybuilder.IsZeroValue(opts[i].Owner) { q = q.Arg("owner", opts[i].Owner) } } q = q.Arg("path", path) q = q.Arg("directory", directory) return &Container{ q: q, c: r.c, } } // Retrieves this container but with a different command entrypoint. func (r *Container) WithEntrypoint(args []string) *Container { q := r.q.Select("withEntrypoint") q = q.Arg("args", args) return &Container{ q: q, c: r.c, } } // ContainerWithEnvVariableOpts contains options for Container.WithEnvVariable type ContainerWithEnvVariableOpts struct { // Replace `${VAR}` or $VAR in the value according to the current environment // variables defined in the container (e.g., "/opt/bin:$PATH"). Expand bool } // Retrieves this container plus the given environment variable. func (r *Container) WithEnvVariable(name string, value string, opts ...ContainerWithEnvVariableOpts) *Container { q := r.q.Select("withEnvVariable") for i := len(opts) - 1; i >= 0; i-- { // `expand` optional argument if !querybuilder.IsZeroValue(opts[i].Expand) { q = q.Arg("expand", opts[i].Expand) } } q = q.Arg("name", name) q = q.Arg("value", value) return &Container{ q: q, c: r.c, } } // ContainerWithExecOpts contains options for Container.WithExec type ContainerWithExecOpts struct { // If the container has an entrypoint, ignore it for args rather than using it to wrap them. SkipEntrypoint bool // Content to write to the command's standard input before closing (e.g., "Hello world"). Stdin string // Redirect the command's standard output to a file in the container (e.g., "/tmp/stdout"). RedirectStdout string // Redirect the command's standard error to a file in the container (e.g., "/tmp/stderr"). RedirectStderr string // Provides dagger access to the executed command. // // Do not use this option unless you trust the command being executed. // The command being executed WILL BE GRANTED FULL ACCESS TO YOUR HOST FILESYSTEM. ExperimentalPrivilegedNesting bool // Execute the command with all root capabilities. This is similar to running a command // with "sudo" or executing `docker run` with the `--privileged` flag. Containerization // does not provide any security guarantees when using this option. It should only be used // when absolutely necessary and only with trusted commands. InsecureRootCapabilities bool } // Retrieves this container after executing the specified command inside it. func (r *Container) WithExec(args []string, opts ...ContainerWithExecOpts) *Container { q := r.q.Select("withExec") for i := len(opts) - 1; i >= 0; i-- { // `skipEntrypoint` optional argument if !querybuilder.IsZeroValue(opts[i].SkipEntrypoint) { q = q.Arg("skipEntrypoint", opts[i].SkipEntrypoint) } // `stdin` optional argument if !querybuilder.IsZeroValue(opts[i].Stdin) { q = q.Arg("stdin", opts[i].Stdin) } // `redirectStdout` optional argument if !querybuilder.IsZeroValue(opts[i].RedirectStdout) { q = q.Arg("redirectStdout", opts[i].RedirectStdout) } // `redirectStderr` optional argument if !querybuilder.IsZeroValue(opts[i].RedirectStderr) { q = q.Arg("redirectStderr", opts[i].RedirectStderr) } // `experimentalPrivilegedNesting` optional argument if !querybuilder.IsZeroValue(opts[i].ExperimentalPrivilegedNesting) { q = q.Arg("experimentalPrivilegedNesting", opts[i].ExperimentalPrivilegedNesting) } // `insecureRootCapabilities` optional argument if !querybuilder.IsZeroValue(opts[i].InsecureRootCapabilities) { q = q.Arg("insecureRootCapabilities", opts[i].InsecureRootCapabilities) } } q = q.Arg("args", args) return &Container{ q: q, c: r.c, } } // ContainerWithExposedPortOpts contains options for Container.WithExposedPort type ContainerWithExposedPortOpts struct { // Transport layer network protocol Protocol NetworkProtocol // Optional port description Description string } // Expose a network port. // // Exposed ports serve two purposes: // // - For health checks and introspection, when running services // - For setting the EXPOSE OCI field when publishing the container func (r *Container) WithExposedPort(port int, opts ...ContainerWithExposedPortOpts) *Container { q := r.q.Select("withExposedPort") for i := len(opts) - 1; i >= 0; i-- { // `protocol` optional argument if !querybuilder.IsZeroValue(opts[i].Protocol) { q = q.Arg("protocol", opts[i].Protocol) } // `description` optional argument if !querybuilder.IsZeroValue(opts[i].Description) { q = q.Arg("description", opts[i].Description) } } q = q.Arg("port", port) return &Container{ q: q, c: r.c, } } // ContainerWithFileOpts contains options for Container.WithFile type ContainerWithFileOpts struct { // Permission given to the copied file (e.g., 0600). // // Default: 0644. Permissions int // A user:group to set for the file. // // The user and group can either be an ID (1000:1000) or a name (foo:bar). // // If the group is omitted, it defaults to the same as the user. Owner string } // Retrieves this container plus the contents of the given file copied to the given path. func (r *Container) WithFile(path string, source *File, opts ...ContainerWithFileOpts) *Container { assertNotNil("source", source) q := r.q.Select("withFile") for i := len(opts) - 1; i >= 0; i-- { // `permissions` optional argument if !querybuilder.IsZeroValue(opts[i].Permissions) { q = q.Arg("permissions", opts[i].Permissions) } // `owner` optional argument if !querybuilder.IsZeroValue(opts[i].Owner) { q = q.Arg("owner", opts[i].Owner) } } q = q.Arg("path", path) q = q.Arg("source", source) return &Container{ q: q, c: r.c, } } // Indicate that subsequent operations should be featured more prominently in // the UI. func (r *Container) WithFocus() *Container { q := r.q.Select("withFocus") return &Container{ q: q, c: r.c, } } // Retrieves this container plus the given label. func (r *Container) WithLabel(name string, value string) *Container { q := r.q.Select("withLabel") q = q.Arg("name", name) q = q.Arg("value", value) return &Container{ q: q, c: r.c, } } // ContainerWithMountedCacheOpts contains options for Container.WithMountedCache type ContainerWithMountedCacheOpts struct { // Identifier of the directory to use as the cache volume's root. Source *Directory // Sharing mode of the cache volume. Sharing CacheSharingMode // A user:group to set for the mounted cache directory. // // Note that this changes the ownership of the specified mount along with the // initial filesystem provided by source (if any). It does not have any effect // if/when the cache has already been created. // // The user and group can either be an ID (1000:1000) or a name (foo:bar). // // If the group is omitted, it defaults to the same as the user. Owner string } // Retrieves this container plus a cache volume mounted at the given path. func (r *Container) WithMountedCache(path string, cache *CacheVolume, opts ...ContainerWithMountedCacheOpts) *Container { assertNotNil("cache", cache) q := r.q.Select("withMountedCache") for i := len(opts) - 1; i >= 0; i-- { // `source` optional argument if !querybuilder.IsZeroValue(opts[i].Source) { q = q.Arg("source", opts[i].Source) } // `sharing` optional argument if !querybuilder.IsZeroValue(opts[i].Sharing) { q = q.Arg("sharing", opts[i].Sharing) } // `owner` optional argument if !querybuilder.IsZeroValue(opts[i].Owner) { q = q.Arg("owner", opts[i].Owner) } } q = q.Arg("path", path) q = q.Arg("cache", cache) return &Container{ q: q, c: r.c, } } // ContainerWithMountedDirectoryOpts contains options for Container.WithMountedDirectory type ContainerWithMountedDirectoryOpts struct { // A user:group to set for the mounted directory and its contents. // // The user and group can either be an ID (1000:1000) or a name (foo:bar). // // If the group is omitted, it defaults to the same as the user. Owner string } // Retrieves this container plus a directory mounted at the given path. func (r *Container) WithMountedDirectory(path string, source *Directory, opts ...ContainerWithMountedDirectoryOpts) *Container { assertNotNil("source", source) q := r.q.Select("withMountedDirectory") for i := len(opts) - 1; i >= 0; i-- { // `owner` optional argument if !querybuilder.IsZeroValue(opts[i].Owner) { q = q.Arg("owner", opts[i].Owner) } } q = q.Arg("path", path) q = q.Arg("source", source) return &Container{ q: q, c: r.c, } } // ContainerWithMountedFileOpts contains options for Container.WithMountedFile type ContainerWithMountedFileOpts struct { // A user or user:group to set for the mounted file. // // The user and group can either be an ID (1000:1000) or a name (foo:bar). // // If the group is omitted, it defaults to the same as the user. Owner string } // Retrieves this container plus a file mounted at the given path. func (r *Container) WithMountedFile(path string, source *File, opts ...ContainerWithMountedFileOpts) *Container { assertNotNil("source", source) q := r.q.Select("withMountedFile") for i := len(opts) - 1; i >= 0; i-- { // `owner` optional argument if !querybuilder.IsZeroValue(opts[i].Owner) { q = q.Arg("owner", opts[i].Owner) } } q = q.Arg("path", path) q = q.Arg("source", source) return &Container{ q: q, c: r.c, } } // ContainerWithMountedSecretOpts contains options for Container.WithMountedSecret type ContainerWithMountedSecretOpts struct { // A user:group to set for the mounted secret. // // The user and group can either be an ID (1000:1000) or a name (foo:bar). // // If the group is omitted, it defaults to the same as the user. Owner string // Permission given to the mounted secret (e.g., 0600). // This option requires an owner to be set to be active. // // Default: 0400. Mode int } // Retrieves this container plus a secret mounted into a file at the given path. func (r *Container) WithMountedSecret(path string, source *Secret, opts ...ContainerWithMountedSecretOpts) *Container { assertNotNil("source", source) q := r.q.Select("withMountedSecret") for i := len(opts) - 1; i >= 0; i-- { // `owner` optional argument if !querybuilder.IsZeroValue(opts[i].Owner) { q = q.Arg("owner", opts[i].Owner) } // `mode` optional argument if !querybuilder.IsZeroValue(opts[i].Mode) { q = q.Arg("mode", opts[i].Mode) } } q = q.Arg("path", path) q = q.Arg("source", source) return &Container{ q: q, c: r.c, } } // Retrieves this container plus a temporary directory mounted at the given path. func (r *Container) WithMountedTemp(path string) *Container { q := r.q.Select("withMountedTemp") q = q.Arg("path", path) return &Container{ q: q, c: r.c, } } // ContainerWithNewFileOpts contains options for Container.WithNewFile type ContainerWithNewFileOpts struct { // Content of the file to write (e.g., "Hello world!"). Contents string // Permission given to the written file (e.g., 0600). // // Default: 0644. Permissions int // A user:group to set for the file. // // The user and group can either be an ID (1000:1000) or a name (foo:bar). // // If the group is omitted, it defaults to the same as the user. Owner string } // Retrieves this container plus a new file written at the given path. func (r *Container) WithNewFile(path string, opts ...ContainerWithNewFileOpts) *Container { q := r.q.Select("withNewFile") for i := len(opts) - 1; i >= 0; i-- { // `contents` optional argument if !querybuilder.IsZeroValue(opts[i].Contents) { q = q.Arg("contents", opts[i].Contents) } // `permissions` optional argument if !querybuilder.IsZeroValue(opts[i].Permissions) { q = q.Arg("permissions", opts[i].Permissions) } // `owner` optional argument if !querybuilder.IsZeroValue(opts[i].Owner) { q = q.Arg("owner", opts[i].Owner) } } q = q.Arg("path", path) return &Container{ q: q, c: r.c, } } // Retrieves this container with a registry authentication for a given address. func (r *Container) WithRegistryAuth(address string, username string, secret *Secret) *Container { assertNotNil("secret", secret) q := r.q.Select("withRegistryAuth") q = q.Arg("address", address) q = q.Arg("username", username) q = q.Arg("secret", secret) return &Container{ q: q, c: r.c, } } // Initializes this container from this DirectoryID. func (r *Container) WithRootfs(directory *Directory) *Container { assertNotNil("directory", directory) q := r.q.Select("withRootfs") q = q.Arg("directory", directory) return &Container{ q: q, c: r.c, } } // Retrieves this container plus an env variable containing the given secret. func (r *Container) WithSecretVariable(name string, secret *Secret) *Container { assertNotNil("secret", secret) q := r.q.Select("withSecretVariable") q = q.Arg("name", name) q = q.Arg("secret", secret) return &Container{ q: q, c: r.c, } } // Establish a runtime dependency on a service. // // The service will be started automatically when needed and detached when it is // no longer needed, executing the default command if none is set. // // The service will be reachable from the container via the provided hostname alias. // // The service dependency will also convey to any files or directories produced by the container. func (r *Container) WithServiceBinding(alias string, service *Service) *Container { assertNotNil("service", service) q := r.q.Select("withServiceBinding") q = q.Arg("alias", alias) q = q.Arg("service", service) return &Container{ q: q, c: r.c, } } // ContainerWithUnixSocketOpts contains options for Container.WithUnixSocket type ContainerWithUnixSocketOpts struct { // A user:group to set for the mounted socket. // // The user and group can either be an ID (1000:1000) or a name (foo:bar). // // If the group is omitted, it defaults to the same as the user. Owner string } // Retrieves this container plus a socket forwarded to the given Unix socket path. func (r *Container) WithUnixSocket(path string, source *Socket, opts ...ContainerWithUnixSocketOpts) *Container { assertNotNil("source", source) q := r.q.Select("withUnixSocket") for i := len(opts) - 1; i >= 0; i-- { // `owner` optional argument if !querybuilder.IsZeroValue(opts[i].Owner) { q = q.Arg("owner", opts[i].Owner) } } q = q.Arg("path", path) q = q.Arg("source", source) return &Container{ q: q, c: r.c, } } // Retrieves this container with a different command user. func (r *Container) WithUser(name string) *Container { q := r.q.Select("withUser") q = q.Arg("name", name) return &Container{ q: q, c: r.c, } } // Retrieves this container with a different working directory. func (r *Container) WithWorkdir(path string) *Container { q := r.q.Select("withWorkdir") q = q.Arg("path", path) return &Container{ q: q, c: r.c, } } // Retrieves this container minus the given environment variable. func (r *Container) WithoutEnvVariable(name string) *Container { q := r.q.Select("withoutEnvVariable") q = q.Arg("name", name) return &Container{ q: q, c: r.c, } } // ContainerWithoutExposedPortOpts contains options for Container.WithoutExposedPort type ContainerWithoutExposedPortOpts struct { // Port protocol to unexpose Protocol NetworkProtocol } // Unexpose a previously exposed port. func (r *Container) WithoutExposedPort(port int, opts ...ContainerWithoutExposedPortOpts) *Container { q := r.q.Select("withoutExposedPort") for i := len(opts) - 1; i >= 0; i-- { // `protocol` optional argument if !querybuilder.IsZeroValue(opts[i].Protocol) { q = q.Arg("protocol", opts[i].Protocol) } } q = q.Arg("port", port) return &Container{ q: q, c: r.c, } } // Indicate that subsequent operations should not be featured more prominently // in the UI. // // This is the initial state of all containers. func (r *Container) WithoutFocus() *Container { q := r.q.Select("withoutFocus") return &Container{ q: q, c: r.c, } } // Retrieves this container minus the given environment label. func (r *Container) WithoutLabel(name string) *Container { q := r.q.Select("withoutLabel") q = q.Arg("name", name) return &Container{ q: q, c: r.c, } } // Retrieves this container after unmounting everything at the given path. func (r *Container) WithoutMount(path string) *Container { q := r.q.Select("withoutMount") q = q.Arg("path", path) return &Container{ q: q, c: r.c, } } // Retrieves this container without the registry authentication of a given address. func (r *Container) WithoutRegistryAuth(address string) *Container { q := r.q.Select("withoutRegistryAuth") q = q.Arg("address", address) return &Container{ q: q, c: r.c, } } // Retrieves this container with a previously added Unix socket removed. func (r *Container) WithoutUnixSocket(path string) *Container { q := r.q.Select("withoutUnixSocket") q = q.Arg("path", path) return &Container{ q: q, c: r.c, } } // Retrieves the working directory for all commands. func (r *Container) Workdir(ctx context.Context) (string, error) { if r.workdir != nil { return *r.workdir, nil } q := r.q.Select("workdir") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // A directory. type Directory struct { q *querybuilder.Selection c graphql.Client export *bool id *DirectoryID sync *DirectoryID } type WithDirectoryFunc func(r *Directory) *Directory // With calls the provided function with current Directory. // // This is useful for reusability and readability by not breaking the calling chain. func (r *Directory) With(f WithDirectoryFunc) *Directory { return f(r) } // DirectoryAsModuleOpts contains options for Directory.AsModule type DirectoryAsModuleOpts struct { // An optional subpath of the directory which contains the module's source // code. // // This is needed when the module code is in a subdirectory but requires // parent directories to be loaded in order to execute. For example, the // module source code may need a go.mod, project.toml, package.json, etc. file // from a parent directory. // // If not set, the module source code is loaded from the root of the // directory. SourceSubpath string } // Load the directory as a Dagger module func (r *Directory) AsModule(opts ...DirectoryAsModuleOpts) *Module { q := r.q.Select("asModule") for i := len(opts) - 1; i >= 0; i-- { // `sourceSubpath` optional argument if !querybuilder.IsZeroValue(opts[i].SourceSubpath) { q = q.Arg("sourceSubpath", opts[i].SourceSubpath) } } return &Module{ q: q, c: r.c, } } // Gets the difference between this directory and an another directory. func (r *Directory) Diff(other *Directory) *Directory { assertNotNil("other", other) q := r.q.Select("diff") q = q.Arg("other", other) return &Directory{ q: q, c: r.c, } } // Retrieves a directory at the given path. func (r *Directory) Directory(path string) *Directory { q := r.q.Select("directory") q = q.Arg("path", path) return &Directory{ q: q, c: r.c, } } // DirectoryDockerBuildOpts contains options for Directory.DockerBuild type DirectoryDockerBuildOpts struct { // Path to the Dockerfile to use (e.g., "frontend.Dockerfile"). // // Defaults: './Dockerfile'. Dockerfile string // The platform to build. Platform Platform // Build arguments to use in the build. BuildArgs []BuildArg // Target build stage to build. Target string // Secrets to pass to the build. // // They will be mounted at /run/secrets/[secret-name]. Secrets []*Secret } // Builds a new Docker container from this directory. func (r *Directory) DockerBuild(opts ...DirectoryDockerBuildOpts) *Container { q := r.q.Select("dockerBuild") for i := len(opts) - 1; i >= 0; i-- { // `dockerfile` optional argument if !querybuilder.IsZeroValue(opts[i].Dockerfile) { q = q.Arg("dockerfile", opts[i].Dockerfile) } // `platform` optional argument if !querybuilder.IsZeroValue(opts[i].Platform) { q = q.Arg("platform", opts[i].Platform) } // `buildArgs` optional argument if !querybuilder.IsZeroValue(opts[i].BuildArgs) { q = q.Arg("buildArgs", opts[i].BuildArgs) } // `target` optional argument if !querybuilder.IsZeroValue(opts[i].Target) { q = q.Arg("target", opts[i].Target) } // `secrets` optional argument if !querybuilder.IsZeroValue(opts[i].Secrets) { q = q.Arg("secrets", opts[i].Secrets) } } return &Container{ q: q, c: r.c, } } // DirectoryEntriesOpts contains options for Directory.Entries type DirectoryEntriesOpts struct { // Location of the directory to look at (e.g., "/src"). Path string } // Returns a list of files and directories at the given path. func (r *Directory) Entries(ctx context.Context, opts ...DirectoryEntriesOpts) ([]string, error) { q := r.q.Select("entries") for i := len(opts) - 1; i >= 0; i-- { // `path` optional argument if !querybuilder.IsZeroValue(opts[i].Path) { q = q.Arg("path", opts[i].Path) } } var response []string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Writes the contents of the directory to a path on the host. func (r *Directory) Export(ctx context.Context, path string) (bool, error) { if r.export != nil { return *r.export, nil } q := r.q.Select("export") q = q.Arg("path", path) var response bool q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Retrieves a file at the given path. func (r *Directory) File(path string) *File { q := r.q.Select("file") q = q.Arg("path", path) return &File{ q: q, c: r.c, } } // Returns a list of files and directories that matche the given pattern. func (r *Directory) Glob(ctx context.Context, pattern string) ([]string, error) { q := r.q.Select("glob") q = q.Arg("pattern", pattern) var response []string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The content-addressed identifier of the directory. func (r *Directory) ID(ctx context.Context) (DirectoryID, error) { if r.id != nil { return *r.id, nil } q := r.q.Select("id") var response DirectoryID q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // XXX_GraphQLType is an internal function. It returns the native GraphQL type name func (r *Directory) XXX_GraphQLType() string { return "Directory" } // XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object func (r *Directory) XXX_GraphQLIDType() string { return "DirectoryID" } // XXX_GraphQLID is an internal function. It returns the underlying type ID func (r *Directory) XXX_GraphQLID(ctx context.Context) (string, error) { id, err := r.ID(ctx) if err != nil { return "", err } return string(id), nil } func (r *Directory) MarshalJSON() ([]byte, error) { id, err := r.ID(context.Background()) if err != nil { return nil, err } return json.Marshal(id) } // DirectoryPipelineOpts contains options for Directory.Pipeline type DirectoryPipelineOpts struct { // Pipeline description. Description string // Pipeline labels. Labels []PipelineLabel } // Creates a named sub-pipeline func (r *Directory) Pipeline(name string, opts ...DirectoryPipelineOpts) *Directory { q := r.q.Select("pipeline") for i := len(opts) - 1; i >= 0; i-- { // `description` optional argument if !querybuilder.IsZeroValue(opts[i].Description) { q = q.Arg("description", opts[i].Description) } // `labels` optional argument if !querybuilder.IsZeroValue(opts[i].Labels) { q = q.Arg("labels", opts[i].Labels) } } q = q.Arg("name", name) return &Directory{ q: q, c: r.c, } } // Force evaluation in the engine. func (r *Directory) Sync(ctx context.Context) (*Directory, error) { q := r.q.Select("sync") return r, q.Execute(ctx, r.c) } // DirectoryWithDirectoryOpts contains options for Directory.WithDirectory type DirectoryWithDirectoryOpts struct { // Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]). Exclude []string // Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]). Include []string } // Retrieves this directory plus a directory written at the given path. func (r *Directory) WithDirectory(path string, directory *Directory, opts ...DirectoryWithDirectoryOpts) *Directory { assertNotNil("directory", directory) q := r.q.Select("withDirectory") for i := len(opts) - 1; i >= 0; i-- { // `exclude` optional argument if !querybuilder.IsZeroValue(opts[i].Exclude) { q = q.Arg("exclude", opts[i].Exclude) } // `include` optional argument if !querybuilder.IsZeroValue(opts[i].Include) { q = q.Arg("include", opts[i].Include) } } q = q.Arg("path", path) q = q.Arg("directory", directory) return &Directory{ q: q, c: r.c, } } // DirectoryWithFileOpts contains options for Directory.WithFile type DirectoryWithFileOpts struct { // Permission given to the copied file (e.g., 0600). // // Default: 0644. Permissions int } // Retrieves this directory plus the contents of the given file copied to the given path. func (r *Directory) WithFile(path string, source *File, opts ...DirectoryWithFileOpts) *Directory { assertNotNil("source", source) q := r.q.Select("withFile") for i := len(opts) - 1; i >= 0; i-- { // `permissions` optional argument if !querybuilder.IsZeroValue(opts[i].Permissions) { q = q.Arg("permissions", opts[i].Permissions) } } q = q.Arg("path", path) q = q.Arg("source", source) return &Directory{ q: q, c: r.c, } } // DirectoryWithNewDirectoryOpts contains options for Directory.WithNewDirectory type DirectoryWithNewDirectoryOpts struct { // Permission granted to the created directory (e.g., 0777). // // Default: 0755. Permissions int } // Retrieves this directory plus a new directory created at the given path. func (r *Directory) WithNewDirectory(path string, opts ...DirectoryWithNewDirectoryOpts) *Directory { q := r.q.Select("withNewDirectory") for i := len(opts) - 1; i >= 0; i-- { // `permissions` optional argument if !querybuilder.IsZeroValue(opts[i].Permissions) { q = q.Arg("permissions", opts[i].Permissions) } } q = q.Arg("path", path) return &Directory{ q: q, c: r.c, } } // DirectoryWithNewFileOpts contains options for Directory.WithNewFile type DirectoryWithNewFileOpts struct { // Permission given to the copied file (e.g., 0600). // // Default: 0644. Permissions int } // Retrieves this directory plus a new file written at the given path. func (r *Directory) WithNewFile(path string, contents string, opts ...DirectoryWithNewFileOpts) *Directory { q := r.q.Select("withNewFile") for i := len(opts) - 1; i >= 0; i-- { // `permissions` optional argument if !querybuilder.IsZeroValue(opts[i].Permissions) { q = q.Arg("permissions", opts[i].Permissions) } } q = q.Arg("path", path) q = q.Arg("contents", contents) return &Directory{ q: q, c: r.c, } } // Retrieves this directory with all file/dir timestamps set to the given time. func (r *Directory) WithTimestamps(timestamp int) *Directory { q := r.q.Select("withTimestamps") q = q.Arg("timestamp", timestamp) return &Directory{ q: q, c: r.c, } } // Retrieves this directory with the directory at the given path removed. func (r *Directory) WithoutDirectory(path string) *Directory { q := r.q.Select("withoutDirectory") q = q.Arg("path", path) return &Directory{ q: q, c: r.c, } } // Retrieves this directory with the file at the given path removed. func (r *Directory) WithoutFile(path string) *Directory { q := r.q.Select("withoutFile") q = q.Arg("path", path) return &Directory{ q: q, c: r.c, } } // A simple key value object that represents an environment variable. type EnvVariable struct { q *querybuilder.Selection c graphql.Client name *string value *string } // The environment variable name. func (r *EnvVariable) Name(ctx context.Context) (string, error) { if r.name != nil { return *r.name, nil } q := r.q.Select("name") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The environment variable value. func (r *EnvVariable) Value(ctx context.Context) (string, error) { if r.value != nil { return *r.value, nil } q := r.q.Select("value") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // A definition of a field on a custom object defined in a Module. // A field on an object has a static value, as opposed to a function on an // object whose value is computed by invoking code (and can accept arguments). type FieldTypeDef struct { q *querybuilder.Selection c graphql.Client description *string name *string } // A doc string for the field, if any func (r *FieldTypeDef) Description(ctx context.Context) (string, error) { if r.description != nil { return *r.description, nil } q := r.q.Select("description") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The name of the field in the object func (r *FieldTypeDef) Name(ctx context.Context) (string, error) { if r.name != nil { return *r.name, nil } q := r.q.Select("name") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The type of the field func (r *FieldTypeDef) TypeDef() *TypeDef { q := r.q.Select("typeDef") return &TypeDef{ q: q, c: r.c, } } // A file. type File struct { q *querybuilder.Selection c graphql.Client contents *string export *bool id *FileID size *int sync *FileID } type WithFileFunc func(r *File) *File // With calls the provided function with current File. // // This is useful for reusability and readability by not breaking the calling chain. func (r *File) With(f WithFileFunc) *File { return f(r) } // Retrieves the contents of the file. func (r *File) Contents(ctx context.Context) (string, error) { if r.contents != nil { return *r.contents, nil } q := r.q.Select("contents") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // FileExportOpts contains options for File.Export type FileExportOpts struct { // If allowParentDirPath is true, the path argument can be a directory path, in which case // the file will be created in that directory. AllowParentDirPath bool } // Writes the file to a file path on the host. func (r *File) Export(ctx context.Context, path string, opts ...FileExportOpts) (bool, error) { if r.export != nil { return *r.export, nil } q := r.q.Select("export") for i := len(opts) - 1; i >= 0; i-- { // `allowParentDirPath` optional argument if !querybuilder.IsZeroValue(opts[i].AllowParentDirPath) { q = q.Arg("allowParentDirPath", opts[i].AllowParentDirPath) } } q = q.Arg("path", path) var response bool q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Retrieves the content-addressed identifier of the file. func (r *File) ID(ctx context.Context) (FileID, error) { if r.id != nil { return *r.id, nil } q := r.q.Select("id") var response FileID q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // XXX_GraphQLType is an internal function. It returns the native GraphQL type name func (r *File) XXX_GraphQLType() string { return "File" } // XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object func (r *File) XXX_GraphQLIDType() string { return "FileID" } // XXX_GraphQLID is an internal function. It returns the underlying type ID func (r *File) XXX_GraphQLID(ctx context.Context) (string, error) { id, err := r.ID(ctx) if err != nil { return "", err } return string(id), nil } func (r *File) MarshalJSON() ([]byte, error) { id, err := r.ID(context.Background()) if err != nil { return nil, err } return json.Marshal(id) } // Gets the size of the file, in bytes. func (r *File) Size(ctx context.Context) (int, error) { if r.size != nil { return *r.size, nil } q := r.q.Select("size") var response int q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Force evaluation in the engine. func (r *File) Sync(ctx context.Context) (*File, error) { q := r.q.Select("sync") return r, q.Execute(ctx, r.c) } // Retrieves this file with its created/modified timestamps set to the given time. func (r *File) WithTimestamps(timestamp int) *File { q := r.q.Select("withTimestamps") q = q.Arg("timestamp", timestamp) return &File{ q: q, c: r.c, } } // Function represents a resolver provided by a Module. // // A function always evaluates against a parent object and is given a set of // named arguments. type Function struct { q *querybuilder.Selection c graphql.Client description *string id *FunctionID name *string } type WithFunctionFunc func(r *Function) *Function // With calls the provided function with current Function. // // This is useful for reusability and readability by not breaking the calling chain. func (r *Function) With(f WithFunctionFunc) *Function { return f(r) } // Arguments accepted by this function, if any func (r *Function) Args(ctx context.Context) ([]FunctionArg, error) { q := r.q.Select("args") q = q.Select("id") type args struct { Id FunctionArgID } convert := func(fields []args) []FunctionArg { out := []FunctionArg{} for i := range fields { val := FunctionArg{id: &fields[i].Id} val.q = querybuilder.Query().Select("loadFunctionArgFromID").Arg("id", fields[i].Id) val.c = r.c out = append(out, val) } return out } var response []args q = q.Bind(&response) err := q.Execute(ctx, r.c) if err != nil { return nil, err } return convert(response), nil } // A doc string for the function, if any func (r *Function) Description(ctx context.Context) (string, error) { if r.description != nil { return *r.description, nil } q := r.q.Select("description") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The ID of the function func (r *Function) ID(ctx context.Context) (FunctionID, error) { if r.id != nil { return *r.id, nil } q := r.q.Select("id") var response FunctionID q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // XXX_GraphQLType is an internal function. It returns the native GraphQL type name func (r *Function) XXX_GraphQLType() string { return "Function" } // XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object func (r *Function) XXX_GraphQLIDType() string { return "FunctionID" } // XXX_GraphQLID is an internal function. It returns the underlying type ID func (r *Function) XXX_GraphQLID(ctx context.Context) (string, error) { id, err := r.ID(ctx) if err != nil { return "", err } return string(id), nil } func (r *Function) MarshalJSON() ([]byte, error) { id, err := r.ID(context.Background()) if err != nil { return nil, err } return json.Marshal(id) } // The name of the function func (r *Function) Name(ctx context.Context) (string, error) { if r.name != nil { return *r.name, nil } q := r.q.Select("name") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The type returned by this function func (r *Function) ReturnType() *TypeDef { q := r.q.Select("returnType") return &TypeDef{ q: q, c: r.c, } } // FunctionWithArgOpts contains options for Function.WithArg type FunctionWithArgOpts struct { // A doc string for the argument, if any Description string // A default value to use for this argument if not explicitly set by the caller, if any DefaultValue JSON } // Returns the function with the provided argument func (r *Function) WithArg(name string, typeDef *TypeDef, opts ...FunctionWithArgOpts) *Function { assertNotNil("typeDef", typeDef) q := r.q.Select("withArg") for i := len(opts) - 1; i >= 0; i-- { // `description` optional argument if !querybuilder.IsZeroValue(opts[i].Description) { q = q.Arg("description", opts[i].Description) } // `defaultValue` optional argument if !querybuilder.IsZeroValue(opts[i].DefaultValue) { q = q.Arg("defaultValue", opts[i].DefaultValue) } } q = q.Arg("name", name) q = q.Arg("typeDef", typeDef) return &Function{ q: q, c: r.c, } } // Returns the function with the doc string func (r *Function) WithDescription(description string) *Function { q := r.q.Select("withDescription") q = q.Arg("description", description) return &Function{ q: q, c: r.c, } } // An argument accepted by a function. // // This is a specification for an argument at function definition time, not an // argument passed at function call time. type FunctionArg struct { q *querybuilder.Selection c graphql.Client defaultValue *JSON description *string id *FunctionArgID name *string } // A default value to use for this argument when not explicitly set by the caller, if any func (r *FunctionArg) DefaultValue(ctx context.Context) (JSON, error) { if r.defaultValue != nil { return *r.defaultValue, nil } q := r.q.Select("defaultValue") var response JSON q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // A doc string for the argument, if any func (r *FunctionArg) Description(ctx context.Context) (string, error) { if r.description != nil { return *r.description, nil } q := r.q.Select("description") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The ID of the argument func (r *FunctionArg) ID(ctx context.Context) (FunctionArgID, error) { if r.id != nil { return *r.id, nil } q := r.q.Select("id") var response FunctionArgID q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // XXX_GraphQLType is an internal function. It returns the native GraphQL type name func (r *FunctionArg) XXX_GraphQLType() string { return "FunctionArg" } // XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object func (r *FunctionArg) XXX_GraphQLIDType() string { return "FunctionArgID" } // XXX_GraphQLID is an internal function. It returns the underlying type ID func (r *FunctionArg) XXX_GraphQLID(ctx context.Context) (string, error) { id, err := r.ID(ctx) if err != nil { return "", err } return string(id), nil } func (r *FunctionArg) MarshalJSON() ([]byte, error) { id, err := r.ID(context.Background()) if err != nil { return nil, err } return json.Marshal(id) } // The name of the argument func (r *FunctionArg) Name(ctx context.Context) (string, error) { if r.name != nil { return *r.name, nil } q := r.q.Select("name") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The type of the argument func (r *FunctionArg) TypeDef() *TypeDef { q := r.q.Select("typeDef") return &TypeDef{ q: q, c: r.c, } } type FunctionCall struct { q *querybuilder.Selection c graphql.Client name *string parent *JSON parentName *string returnValue *Void } // The argument values the function is being invoked with. func (r *FunctionCall) InputArgs(ctx context.Context) ([]FunctionCallArgValue, error) { q := r.q.Select("inputArgs") q = q.Select("name value") type inputArgs struct { Name string Value JSON } convert := func(fields []inputArgs) []FunctionCallArgValue { out := []FunctionCallArgValue{} for i := range fields { val := FunctionCallArgValue{name: &fields[i].Name, value: &fields[i].Value} out = append(out, val) } return out } var response []inputArgs q = q.Bind(&response) err := q.Execute(ctx, r.c) if err != nil { return nil, err } return convert(response), nil } // The name of the function being called. func (r *FunctionCall) Name(ctx context.Context) (string, error) { if r.name != nil { return *r.name, nil } q := r.q.Select("name") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The value of the parent object of the function being called. // If the function is "top-level" to the module, this is always an empty object. func (r *FunctionCall) Parent(ctx context.Context) (JSON, error) { if r.parent != nil { return *r.parent, nil } q := r.q.Select("parent") var response JSON q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The name of the parent object of the function being called. // If the function is "top-level" to the module, this is the name of the module. func (r *FunctionCall) ParentName(ctx context.Context) (string, error) { if r.parentName != nil { return *r.parentName, nil } q := r.q.Select("parentName") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Set the return value of the function call to the provided value. // The value should be a string of the JSON serialization of the return value. func (r *FunctionCall) ReturnValue(ctx context.Context, value JSON) (Void, error) { if r.returnValue != nil { return *r.returnValue, nil } q := r.q.Select("returnValue") q = q.Arg("value", value) var response Void q = q.Bind(&response) return response, q.Execute(ctx, r.c) } type FunctionCallArgValue struct { q *querybuilder.Selection c graphql.Client name *string value *JSON } // The name of the argument. func (r *FunctionCallArgValue) Name(ctx context.Context) (string, error) { if r.name != nil { return *r.name, nil } q := r.q.Select("name") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The value of the argument represented as a string of the JSON serialization. func (r *FunctionCallArgValue) Value(ctx context.Context) (JSON, error) { if r.value != nil { return *r.value, nil } q := r.q.Select("value") var response JSON q = q.Bind(&response) return response, q.Execute(ctx, r.c) } type GeneratedCode struct { q *querybuilder.Selection c graphql.Client id *GeneratedCodeID } type WithGeneratedCodeFunc func(r *GeneratedCode) *GeneratedCode // With calls the provided function with current GeneratedCode. // // This is useful for reusability and readability by not breaking the calling chain. func (r *GeneratedCode) With(f WithGeneratedCodeFunc) *GeneratedCode { return f(r) } // The directory containing the generated code func (r *GeneratedCode) Code() *Directory { q := r.q.Select("code") return &Directory{ q: q, c: r.c, } } func (r *GeneratedCode) ID(ctx context.Context) (GeneratedCodeID, error) { if r.id != nil { return *r.id, nil } q := r.q.Select("id") var response GeneratedCodeID q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // XXX_GraphQLType is an internal function. It returns the native GraphQL type name func (r *GeneratedCode) XXX_GraphQLType() string { return "GeneratedCode" } // XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object func (r *GeneratedCode) XXX_GraphQLIDType() string { return "GeneratedCodeID" } // XXX_GraphQLID is an internal function. It returns the underlying type ID func (r *GeneratedCode) XXX_GraphQLID(ctx context.Context) (string, error) { id, err := r.ID(ctx) if err != nil { return "", err } return string(id), nil } func (r *GeneratedCode) MarshalJSON() ([]byte, error) { id, err := r.ID(context.Background()) if err != nil { return nil, err } return json.Marshal(id) } // List of paths to mark generated in version control (i.e. .gitattributes) func (r *GeneratedCode) VcsGeneratedPaths(ctx context.Context) ([]string, error) { q := r.q.Select("vcsGeneratedPaths") var response []string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // List of paths to ignore in version control (i.e. .gitignore) func (r *GeneratedCode) VcsIgnoredPaths(ctx context.Context) ([]string, error) { q := r.q.Select("vcsIgnoredPaths") var response []string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Set the list of paths to mark generated in version control func (r *GeneratedCode) WithVCSGeneratedPaths(paths []string) *GeneratedCode { q := r.q.Select("withVCSGeneratedPaths") q = q.Arg("paths", paths) return &GeneratedCode{ q: q, c: r.c, } } // Set the list of paths to ignore in version control func (r *GeneratedCode) WithVCSIgnoredPaths(paths []string) *GeneratedCode { q := r.q.Select("withVCSIgnoredPaths") q = q.Arg("paths", paths) return &GeneratedCode{ q: q, c: r.c, } } // A git ref (tag, branch or commit). type GitRef struct { q *querybuilder.Selection c graphql.Client commit *string id *GitRefID } // The resolved commit id at this ref. func (r *GitRef) Commit(ctx context.Context) (string, error) { if r.commit != nil { return *r.commit, nil } q := r.q.Select("commit") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Retrieves the content-addressed identifier of the git ref. func (r *GitRef) ID(ctx context.Context) (GitRefID, error) { if r.id != nil { return *r.id, nil } q := r.q.Select("id") var response GitRefID q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // XXX_GraphQLType is an internal function. It returns the native GraphQL type name func (r *GitRef) XXX_GraphQLType() string { return "GitRef" } // XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object func (r *GitRef) XXX_GraphQLIDType() string { return "GitRefID" } // XXX_GraphQLID is an internal function. It returns the underlying type ID func (r *GitRef) XXX_GraphQLID(ctx context.Context) (string, error) { id, err := r.ID(ctx) if err != nil { return "", err } return string(id), nil } func (r *GitRef) MarshalJSON() ([]byte, error) { id, err := r.ID(context.Background()) if err != nil { return nil, err } return json.Marshal(id) } // GitRefTreeOpts contains options for GitRef.Tree type GitRefTreeOpts struct { SSHKnownHosts string SSHAuthSocket *Socket } // The filesystem tree at this ref. func (r *GitRef) Tree(opts ...GitRefTreeOpts) *Directory { q := r.q.Select("tree") for i := len(opts) - 1; i >= 0; i-- { // `sshKnownHosts` optional argument if !querybuilder.IsZeroValue(opts[i].SSHKnownHosts) { q = q.Arg("sshKnownHosts", opts[i].SSHKnownHosts) } // `sshAuthSocket` optional argument if !querybuilder.IsZeroValue(opts[i].SSHAuthSocket) { q = q.Arg("sshAuthSocket", opts[i].SSHAuthSocket) } } return &Directory{ q: q, c: r.c, } } // A git repository. type GitRepository struct { q *querybuilder.Selection c graphql.Client id *GitRepositoryID } // Returns details on one branch. func (r *GitRepository) Branch(name string) *GitRef { q := r.q.Select("branch") q = q.Arg("name", name) return &GitRef{ q: q, c: r.c, } } // Returns details on one commit. func (r *GitRepository) Commit(id string) *GitRef { q := r.q.Select("commit") q = q.Arg("id", id) return &GitRef{ q: q, c: r.c, } } // Retrieves the content-addressed identifier of the git repository. func (r *GitRepository) ID(ctx context.Context) (GitRepositoryID, error) { if r.id != nil { return *r.id, nil } q := r.q.Select("id") var response GitRepositoryID q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // XXX_GraphQLType is an internal function. It returns the native GraphQL type name func (r *GitRepository) XXX_GraphQLType() string { return "GitRepository" } // XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object func (r *GitRepository) XXX_GraphQLIDType() string { return "GitRepositoryID" } // XXX_GraphQLID is an internal function. It returns the underlying type ID func (r *GitRepository) XXX_GraphQLID(ctx context.Context) (string, error) { id, err := r.ID(ctx) if err != nil { return "", err } return string(id), nil } func (r *GitRepository) MarshalJSON() ([]byte, error) { id, err := r.ID(context.Background()) if err != nil { return nil, err } return json.Marshal(id) } // Returns details on one tag. func (r *GitRepository) Tag(name string) *GitRef { q := r.q.Select("tag") q = q.Arg("name", name) return &GitRef{ q: q, c: r.c, } } // Information about the host execution environment. type Host struct { q *querybuilder.Selection c graphql.Client } // HostDirectoryOpts contains options for Host.Directory type HostDirectoryOpts struct { // Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]). Exclude []string // Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]). Include []string } // Accesses a directory on the host. func (r *Host) Directory(path string, opts ...HostDirectoryOpts) *Directory { q := r.q.Select("directory") for i := len(opts) - 1; i >= 0; i-- { // `exclude` optional argument if !querybuilder.IsZeroValue(opts[i].Exclude) { q = q.Arg("exclude", opts[i].Exclude) } // `include` optional argument if !querybuilder.IsZeroValue(opts[i].Include) { q = q.Arg("include", opts[i].Include) } } q = q.Arg("path", path) return &Directory{ q: q, c: r.c, } } // Accesses a file on the host. func (r *Host) File(path string) *File { q := r.q.Select("file") q = q.Arg("path", path) return &File{ q: q, c: r.c, } } // HostServiceOpts contains options for Host.Service type HostServiceOpts struct { // Upstream host to forward traffic to. Host string } // Creates a service that forwards traffic to a specified address via the host. func (r *Host) Service(ports []PortForward, opts ...HostServiceOpts) *Service { q := r.q.Select("service") for i := len(opts) - 1; i >= 0; i-- { // `host` optional argument if !querybuilder.IsZeroValue(opts[i].Host) { q = q.Arg("host", opts[i].Host) } } q = q.Arg("ports", ports) return &Service{ q: q, c: r.c, } } // Sets a secret given a user-defined name and the file path on the host, and returns the secret. // The file is limited to a size of 512000 bytes. func (r *Host) SetSecretFile(name string, path string) *Secret { q := r.q.Select("setSecretFile") q = q.Arg("name", name) q = q.Arg("path", path) return &Secret{ q: q, c: r.c, } } // HostTunnelOpts contains options for Host.Tunnel type HostTunnelOpts struct { // Map each service port to the same port on the host, as if the service were // running natively. // // Note: enabling may result in port conflicts. Native bool // Configure explicit port forwarding rules for the tunnel. // // If a port's frontend is unspecified or 0, a random port will be chosen by // the host. // // If no ports are given, all of the service's ports are forwarded. If native // is true, each port maps to the same port on the host. If native is false, // each port maps to a random port chosen by the host. // // If ports are given and native is true, the ports are additive. Ports []PortForward } // Creates a tunnel that forwards traffic from the host to a service. func (r *Host) Tunnel(service *Service, opts ...HostTunnelOpts) *Service { assertNotNil("service", service) q := r.q.Select("tunnel") for i := len(opts) - 1; i >= 0; i-- { // `native` optional argument if !querybuilder.IsZeroValue(opts[i].Native) { q = q.Arg("native", opts[i].Native) } // `ports` optional argument if !querybuilder.IsZeroValue(opts[i].Ports) { q = q.Arg("ports", opts[i].Ports) } } q = q.Arg("service", service) return &Service{ q: q, c: r.c, } } // Accesses a Unix socket on the host. func (r *Host) UnixSocket(path string) *Socket { q := r.q.Select("unixSocket") q = q.Arg("path", path) return &Socket{ q: q, c: r.c, } } // A simple key value object that represents a label. type Label struct { q *querybuilder.Selection c graphql.Client name *string value *string } // The label name. func (r *Label) Name(ctx context.Context) (string, error) { if r.name != nil { return *r.name, nil } q := r.q.Select("name") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The label value. func (r *Label) Value(ctx context.Context) (string, error) { if r.value != nil { return *r.value, nil } q := r.q.Select("value") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // A definition of a list type in a Module. type ListTypeDef struct { q *querybuilder.Selection c graphql.Client } // The type of the elements in the list func (r *ListTypeDef) ElementTypeDef() *TypeDef { q := r.q.Select("elementTypeDef") return &TypeDef{ q: q, c: r.c, } } type Module struct { q *querybuilder.Selection c graphql.Client description *string id *ModuleID name *string sdk *string serve *Void sourceDirectorySubPath *string } type WithModuleFunc func(r *Module) *Module // With calls the provided function with current Module. // // This is useful for reusability and readability by not breaking the calling chain. func (r *Module) With(f WithModuleFunc) *Module { return f(r) } // Modules used by this module func (r *Module) Dependencies(ctx context.Context) ([]Module, error) { q := r.q.Select("dependencies") q = q.Select("id") type dependencies struct { Id ModuleID } convert := func(fields []dependencies) []Module { out := []Module{} for i := range fields { val := Module{id: &fields[i].Id} val.q = querybuilder.Query().Select("loadModuleFromID").Arg("id", fields[i].Id) val.c = r.c out = append(out, val) } return out } var response []dependencies q = q.Bind(&response) err := q.Execute(ctx, r.c) if err != nil { return nil, err } return convert(response), nil } // The dependencies as configured by the module func (r *Module) DependencyConfig(ctx context.Context) ([]string, error) { q := r.q.Select("dependencyConfig") var response []string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The doc string of the module, if any func (r *Module) Description(ctx context.Context) (string, error) { if r.description != nil { return *r.description, nil } q := r.q.Select("description") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The code generated by the SDK's runtime func (r *Module) GeneratedCode() *GeneratedCode { q := r.q.Select("generatedCode") return &GeneratedCode{ q: q, c: r.c, } } // The ID of the module func (r *Module) ID(ctx context.Context) (ModuleID, error) { if r.id != nil { return *r.id, nil } q := r.q.Select("id") var response ModuleID q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // XXX_GraphQLType is an internal function. It returns the native GraphQL type name func (r *Module) XXX_GraphQLType() string { return "Module" } // XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object func (r *Module) XXX_GraphQLIDType() string { return "ModuleID" } // XXX_GraphQLID is an internal function. It returns the underlying type ID func (r *Module) XXX_GraphQLID(ctx context.Context) (string, error) { id, err := r.ID(ctx) if err != nil { return "", err } return string(id), nil } func (r *Module) MarshalJSON() ([]byte, error) { id, err := r.ID(context.Background()) if err != nil { return nil, err } return json.Marshal(id) } // The name of the module func (r *Module) Name(ctx context.Context) (string, error) { if r.name != nil { return *r.name, nil } q := r.q.Select("name") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Objects served by this module func (r *Module) Objects(ctx context.Context) ([]TypeDef, error) { q := r.q.Select("objects") q = q.Select("id") type objects struct { Id TypeDefID } convert := func(fields []objects) []TypeDef { out := []TypeDef{} for i := range fields { val := TypeDef{id: &fields[i].Id} val.q = querybuilder.Query().Select("loadTypeDefFromID").Arg("id", fields[i].Id) val.c = r.c out = append(out, val) } return out } var response []objects q = q.Bind(&response) err := q.Execute(ctx, r.c) if err != nil { return nil, err } return convert(response), nil } // The SDK used by this module. Either a name of a builtin SDK or a module ref pointing to the SDK's implementation. func (r *Module) SDK(ctx context.Context) (string, error) { if r.sdk != nil { return *r.sdk, nil } q := r.q.Select("sdk") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Serve a module's API in the current session. // // Note: this can only be called once per session. // In the future, it could return a stream or service to remove the side effect. func (r *Module) Serve(ctx context.Context) (Void, error) { if r.serve != nil { return *r.serve, nil } q := r.q.Select("serve") var response Void q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The directory containing the module's source code func (r *Module) SourceDirectory() *Directory { q := r.q.Select("sourceDirectory") return &Directory{ q: q, c: r.c, } } // The module's subpath within the source directory func (r *Module) SourceDirectorySubPath(ctx context.Context) (string, error) { if r.sourceDirectorySubPath != nil { return *r.sourceDirectorySubPath, nil } q := r.q.Select("sourceDirectorySubPath") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // This module plus the given Object type and associated functions func (r *Module) WithObject(object *TypeDef) *Module { assertNotNil("object", object) q := r.q.Select("withObject") q = q.Arg("object", object) return &Module{ q: q, c: r.c, } } // Static configuration for a module (e.g. parsed contents of dagger.json) type ModuleConfig struct { q *querybuilder.Selection c graphql.Client name *string root *string sdk *string } // Modules that this module depends on. func (r *ModuleConfig) Dependencies(ctx context.Context) ([]string, error) { q := r.q.Select("dependencies") var response []string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Exclude these file globs when loading the module root. func (r *ModuleConfig) Exclude(ctx context.Context) ([]string, error) { q := r.q.Select("exclude") var response []string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Include only these file globs when loading the module root. func (r *ModuleConfig) Include(ctx context.Context) ([]string, error) { q := r.q.Select("include") var response []string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The name of the module. func (r *ModuleConfig) Name(ctx context.Context) (string, error) { if r.name != nil { return *r.name, nil } q := r.q.Select("name") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The root directory of the module's project, which may be above the module source code. func (r *ModuleConfig) Root(ctx context.Context) (string, error) { if r.root != nil { return *r.root, nil } q := r.q.Select("root") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Either the name of a built-in SDK ('go', 'python', etc.) OR a module reference pointing to the SDK's module implementation. func (r *ModuleConfig) SDK(ctx context.Context) (string, error) { if r.sdk != nil { return *r.sdk, nil } q := r.q.Select("sdk") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // A definition of a custom object defined in a Module. type ObjectTypeDef struct { q *querybuilder.Selection c graphql.Client description *string name *string } // The function used to construct new instances of this object, if any func (r *ObjectTypeDef) Constructor() *Function { q := r.q.Select("constructor") return &Function{ q: q, c: r.c, } } // The doc string for the object, if any func (r *ObjectTypeDef) Description(ctx context.Context) (string, error) { if r.description != nil { return *r.description, nil } q := r.q.Select("description") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Static fields defined on this object, if any func (r *ObjectTypeDef) Fields(ctx context.Context) ([]FieldTypeDef, error) { q := r.q.Select("fields") q = q.Select("description name") type fields struct { Description string Name string } convert := func(fields []fields) []FieldTypeDef { out := []FieldTypeDef{} for i := range fields { val := FieldTypeDef{description: &fields[i].Description, name: &fields[i].Name} out = append(out, val) } return out } var response []fields q = q.Bind(&response) err := q.Execute(ctx, r.c) if err != nil { return nil, err } return convert(response), nil } // Functions defined on this object, if any func (r *ObjectTypeDef) Functions(ctx context.Context) ([]Function, error) { q := r.q.Select("functions") q = q.Select("id") type functions struct { Id FunctionID } convert := func(fields []functions) []Function { out := []Function{} for i := range fields { val := Function{id: &fields[i].Id} val.q = querybuilder.Query().Select("loadFunctionFromID").Arg("id", fields[i].Id) val.c = r.c out = append(out, val) } return out } var response []functions q = q.Bind(&response) err := q.Execute(ctx, r.c) if err != nil { return nil, err } return convert(response), nil } // The name of the object func (r *ObjectTypeDef) Name(ctx context.Context) (string, error) { if r.name != nil { return *r.name, nil } q := r.q.Select("name") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // A port exposed by a container. type Port struct { q *querybuilder.Selection c graphql.Client description *string port *int protocol *NetworkProtocol } // The port description. func (r *Port) Description(ctx context.Context) (string, error) { if r.description != nil { return *r.description, nil } q := r.q.Select("description") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The port number. func (r *Port) Port(ctx context.Context) (int, error) { if r.port != nil { return *r.port, nil } q := r.q.Select("port") var response int q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // The transport layer network protocol. func (r *Port) Protocol(ctx context.Context) (NetworkProtocol, error) { if r.protocol != nil { return *r.protocol, nil } q := r.q.Select("protocol") var response NetworkProtocol q = q.Bind(&response) return response, q.Execute(ctx, r.c) } type WithClientFunc func(r *Client) *Client // With calls the provided function with current Client. // // This is useful for reusability and readability by not breaking the calling chain. func (r *Client) With(f WithClientFunc) *Client { return f(r) } // Constructs a cache volume for a given cache key. func (r *Client) CacheVolume(key string) *CacheVolume { q := r.q.Select("cacheVolume") q = q.Arg("key", key) return &CacheVolume{ q: q, c: r.c, } } // Checks if the current Dagger Engine is compatible with an SDK's required version. func (r *Client) CheckVersionCompatibility(ctx context.Context, version string) (bool, error) { q := r.q.Select("checkVersionCompatibility") q = q.Arg("version", version) var response bool q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // ContainerOpts contains options for Client.Container type ContainerOpts struct { ID ContainerID Platform Platform } // Creates a scratch container or loads one by ID. // // Optional platform argument initializes new containers to execute and publish // as that platform. Platform defaults to that of the builder's host. func (r *Client) Container(opts ...ContainerOpts) *Container { q := r.q.Select("container") for i := len(opts) - 1; i >= 0; i-- { // `id` optional argument if !querybuilder.IsZeroValue(opts[i].ID) { q = q.Arg("id", opts[i].ID) } // `platform` optional argument if !querybuilder.IsZeroValue(opts[i].Platform) { q = q.Arg("platform", opts[i].Platform) } } return &Container{ q: q, c: r.c, } } // The FunctionCall context that the SDK caller is currently executing in. // If the caller is not currently executing in a function, this will return // an error. func (r *Client) CurrentFunctionCall() *FunctionCall { q := r.q.Select("currentFunctionCall") return &FunctionCall{ q: q, c: r.c, } } // The module currently being served in the session, if any. func (r *Client) CurrentModule() *Module { q := r.q.Select("currentModule") return &Module{ q: q, c: r.c, } } // The default platform of the builder. func (r *Client) DefaultPlatform(ctx context.Context) (Platform, error) { q := r.q.Select("defaultPlatform") var response Platform q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // DirectoryOpts contains options for Client.Directory type DirectoryOpts struct { ID DirectoryID } // Creates an empty directory or loads one by ID. func (r *Client) Directory(opts ...DirectoryOpts) *Directory { q := r.q.Select("directory") for i := len(opts) - 1; i >= 0; i-- { // `id` optional argument if !querybuilder.IsZeroValue(opts[i].ID) { q = q.Arg("id", opts[i].ID) } } return &Directory{ q: q, c: r.c, } } // Loads a file by ID. // // Deprecated: Use LoadFileFromID instead. func (r *Client) File(id FileID) *File { q := r.q.Select("file") q = q.Arg("id", id) return &File{ q: q, c: r.c, } } // Create a function. func (r *Client) Function(name string, returnType *TypeDef) *Function { assertNotNil("returnType", returnType) q := r.q.Select("function") q = q.Arg("name", name) q = q.Arg("returnType", returnType) return &Function{ q: q, c: r.c, } } // Create a code generation result, given a directory containing the generated // code. func (r *Client) GeneratedCode(code *Directory) *GeneratedCode { assertNotNil("code", code) q := r.q.Select("generatedCode") q = q.Arg("code", code) return &GeneratedCode{ q: q, c: r.c, } } // GitOpts contains options for Client.Git type GitOpts struct { // Set to true to keep .git directory. KeepGitDir bool // Set SSH known hosts SSHKnownHosts string // Set SSH auth socket SSHAuthSocket *Socket // A service which must be started before the repo is fetched. ExperimentalServiceHost *Service } // Queries a git repository. func (r *Client) Git(url string, opts ...GitOpts) *GitRepository { q := r.q.Select("git") for i := len(opts) - 1; i >= 0; i-- { // `keepGitDir` optional argument if !querybuilder.IsZeroValue(opts[i].KeepGitDir) { q = q.Arg("keepGitDir", opts[i].KeepGitDir) } // `sshKnownHosts` optional argument if !querybuilder.IsZeroValue(opts[i].SSHKnownHosts) { q = q.Arg("sshKnownHosts", opts[i].SSHKnownHosts) } // `sshAuthSocket` optional argument if !querybuilder.IsZeroValue(opts[i].SSHAuthSocket) { q = q.Arg("sshAuthSocket", opts[i].SSHAuthSocket) } // `experimentalServiceHost` optional argument if !querybuilder.IsZeroValue(opts[i].ExperimentalServiceHost) { q = q.Arg("experimentalServiceHost", opts[i].ExperimentalServiceHost) } } q = q.Arg("url", url) return &GitRepository{ q: q, c: r.c, } } // Queries the host environment. func (r *Client) Host() *Host { q := r.q.Select("host") return &Host{ q: q, c: r.c, } } // HTTPOpts contains options for Client.HTTP type HTTPOpts struct { // A service which must be started before the URL is fetched. ExperimentalServiceHost *Service } // Returns a file containing an http remote url content. func (r *Client) HTTP(url string, opts ...HTTPOpts) *File { q := r.q.Select("http") for i := len(opts) - 1; i >= 0; i-- { // `experimentalServiceHost` optional argument if !querybuilder.IsZeroValue(opts[i].ExperimentalServiceHost) { q = q.Arg("experimentalServiceHost", opts[i].ExperimentalServiceHost) } } q = q.Arg("url", url) return &File{ q: q, c: r.c, } } // Load a CacheVolume from its ID. func (r *Client) LoadCacheVolumeFromID(id CacheVolumeID) *CacheVolume { q := r.q.Select("loadCacheVolumeFromID") q = q.Arg("id", id) return &CacheVolume{ q: q, c: r.c, } } // Loads a container from an ID. func (r *Client) LoadContainerFromID(id ContainerID) *Container { q := r.q.Select("loadContainerFromID") q = q.Arg("id", id) return &Container{ q: q, c: r.c, } } // Load a Directory from its ID. func (r *Client) LoadDirectoryFromID(id DirectoryID) *Directory { q := r.q.Select("loadDirectoryFromID") q = q.Arg("id", id) return &Directory{ q: q, c: r.c, } } // Load a File from its ID. func (r *Client) LoadFileFromID(id FileID) *File { q := r.q.Select("loadFileFromID") q = q.Arg("id", id) return &File{ q: q, c: r.c, } } // Load a function argument by ID. func (r *Client) LoadFunctionArgFromID(id FunctionArgID) *FunctionArg { q := r.q.Select("loadFunctionArgFromID") q = q.Arg("id", id) return &FunctionArg{ q: q, c: r.c, } } // Load a function by ID. func (r *Client) LoadFunctionFromID(id FunctionID) *Function { q := r.q.Select("loadFunctionFromID") q = q.Arg("id", id) return &Function{ q: q, c: r.c, } } // Load a GeneratedCode by ID. func (r *Client) LoadGeneratedCodeFromID(id GeneratedCodeID) *GeneratedCode { q := r.q.Select("loadGeneratedCodeFromID") q = q.Arg("id", id) return &GeneratedCode{ q: q, c: r.c, } } // Load a git ref from its ID. func (r *Client) LoadGitRefFromID(id GitRefID) *GitRef { q := r.q.Select("loadGitRefFromID") q = q.Arg("id", id) return &GitRef{ q: q, c: r.c, } } // Load a git repository from its ID. func (r *Client) LoadGitRepositoryFromID(id GitRepositoryID) *GitRepository { q := r.q.Select("loadGitRepositoryFromID") q = q.Arg("id", id) return &GitRepository{ q: q, c: r.c, } } // Load a module by ID. func (r *Client) LoadModuleFromID(id ModuleID) *Module { q := r.q.Select("loadModuleFromID") q = q.Arg("id", id) return &Module{ q: q, c: r.c, } } // Load a Secret from its ID. func (r *Client) LoadSecretFromID(id SecretID) *Secret { q := r.q.Select("loadSecretFromID") q = q.Arg("id", id) return &Secret{ q: q, c: r.c, } } // Loads a service from ID. func (r *Client) LoadServiceFromID(id ServiceID) *Service { q := r.q.Select("loadServiceFromID") q = q.Arg("id", id) return &Service{ q: q, c: r.c, } } // Load a Socket from its ID. func (r *Client) LoadSocketFromID(id SocketID) *Socket { q := r.q.Select("loadSocketFromID") q = q.Arg("id", id) return &Socket{ q: q, c: r.c, } } // Load a TypeDef by ID. func (r *Client) LoadTypeDefFromID(id TypeDefID) *TypeDef { q := r.q.Select("loadTypeDefFromID") q = q.Arg("id", id) return &TypeDef{ q: q, c: r.c, } } // Create a new module. func (r *Client) Module() *Module { q := r.q.Select("module") return &Module{ q: q, c: r.c, } } // ModuleConfigOpts contains options for Client.ModuleConfig type ModuleConfigOpts struct { Subpath string } // Load the static configuration for a module from the given source directory and optional subpath. func (r *Client) ModuleConfig(sourceDirectory *Directory, opts ...ModuleConfigOpts) *ModuleConfig { assertNotNil("sourceDirectory", sourceDirectory) q := r.q.Select("moduleConfig") for i := len(opts) - 1; i >= 0; i-- { // `subpath` optional argument if !querybuilder.IsZeroValue(opts[i].Subpath) { q = q.Arg("subpath", opts[i].Subpath) } } q = q.Arg("sourceDirectory", sourceDirectory) return &ModuleConfig{ q: q, c: r.c, } } // PipelineOpts contains options for Client.Pipeline type PipelineOpts struct { // Pipeline description. Description string // Pipeline labels. Labels []PipelineLabel } // Creates a named sub-pipeline. func (r *Client) Pipeline(name string, opts ...PipelineOpts) *Client { q := r.q.Select("pipeline") for i := len(opts) - 1; i >= 0; i-- { // `description` optional argument if !querybuilder.IsZeroValue(opts[i].Description) { q = q.Arg("description", opts[i].Description) } // `labels` optional argument if !querybuilder.IsZeroValue(opts[i].Labels) { q = q.Arg("labels", opts[i].Labels) } } q = q.Arg("name", name) return &Client{ q: q, c: r.c, } } // Loads a secret from its ID. // // Deprecated: Use LoadSecretFromID instead func (r *Client) Secret(id SecretID) *Secret { q := r.q.Select("secret") q = q.Arg("id", id) return &Secret{ q: q, c: r.c, } } // Sets a secret given a user defined name to its plaintext and returns the secret. // The plaintext value is limited to a size of 128000 bytes. func (r *Client) SetSecret(name string, plaintext string) *Secret { q := r.q.Select("setSecret") q = q.Arg("name", name) q = q.Arg("plaintext", plaintext) return &Secret{ q: q, c: r.c, } } // SocketOpts contains options for Client.Socket type SocketOpts struct { ID SocketID } // Loads a socket by its ID. // // Deprecated: Use LoadSocketFromID instead. func (r *Client) Socket(opts ...SocketOpts) *Socket { q := r.q.Select("socket") for i := len(opts) - 1; i >= 0; i-- { // `id` optional argument if !querybuilder.IsZeroValue(opts[i].ID) { q = q.Arg("id", opts[i].ID) } } return &Socket{ q: q, c: r.c, } } // Create a new TypeDef. func (r *Client) TypeDef() *TypeDef { q := r.q.Select("typeDef") return &TypeDef{ q: q, c: r.c, } } // A reference to a secret value, which can be handled more safely than the value itself. type Secret struct { q *querybuilder.Selection c graphql.Client id *SecretID plaintext *string } // The identifier for this secret. func (r *Secret) ID(ctx context.Context) (SecretID, error) { if r.id != nil { return *r.id, nil } q := r.q.Select("id") var response SecretID q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // XXX_GraphQLType is an internal function. It returns the native GraphQL type name func (r *Secret) XXX_GraphQLType() string { return "Secret" } // XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object func (r *Secret) XXX_GraphQLIDType() string { return "SecretID" } // XXX_GraphQLID is an internal function. It returns the underlying type ID func (r *Secret) XXX_GraphQLID(ctx context.Context) (string, error) { id, err := r.ID(ctx) if err != nil { return "", err } return string(id), nil } func (r *Secret) MarshalJSON() ([]byte, error) { id, err := r.ID(context.Background()) if err != nil { return nil, err } return json.Marshal(id) } // The value of this secret. func (r *Secret) Plaintext(ctx context.Context) (string, error) { if r.plaintext != nil { return *r.plaintext, nil } q := r.q.Select("plaintext") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } type Service struct { q *querybuilder.Selection c graphql.Client endpoint *string hostname *string id *ServiceID start *ServiceID stop *ServiceID } // ServiceEndpointOpts contains options for Service.Endpoint type ServiceEndpointOpts struct { // The exposed port number for the endpoint Port int // Return a URL with the given scheme, eg. http for http:// Scheme string } // Retrieves an endpoint that clients can use to reach this container. // // If no port is specified, the first exposed port is used. If none exist an error is returned. // // If a scheme is specified, a URL is returned. Otherwise, a host:port pair is returned. func (r *Service) Endpoint(ctx context.Context, opts ...ServiceEndpointOpts) (string, error) { if r.endpoint != nil { return *r.endpoint, nil } q := r.q.Select("endpoint") for i := len(opts) - 1; i >= 0; i-- { // `port` optional argument if !querybuilder.IsZeroValue(opts[i].Port) { q = q.Arg("port", opts[i].Port) } // `scheme` optional argument if !querybuilder.IsZeroValue(opts[i].Scheme) { q = q.Arg("scheme", opts[i].Scheme) } } var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Retrieves a hostname which can be used by clients to reach this container. func (r *Service) Hostname(ctx context.Context) (string, error) { if r.hostname != nil { return *r.hostname, nil } q := r.q.Select("hostname") var response string q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // A unique identifier for this service. func (r *Service) ID(ctx context.Context) (ServiceID, error) { if r.id != nil { return *r.id, nil } q := r.q.Select("id") var response ServiceID q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // XXX_GraphQLType is an internal function. It returns the native GraphQL type name func (r *Service) XXX_GraphQLType() string { return "Service" } // XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object func (r *Service) XXX_GraphQLIDType() string { return "ServiceID" } // XXX_GraphQLID is an internal function. It returns the underlying type ID func (r *Service) XXX_GraphQLID(ctx context.Context) (string, error) { id, err := r.ID(ctx) if err != nil { return "", err } return string(id), nil } func (r *Service) MarshalJSON() ([]byte, error) { id, err := r.ID(context.Background()) if err != nil { return nil, err } return json.Marshal(id) } // Retrieves the list of ports provided by the service. func (r *Service) Ports(ctx context.Context) ([]Port, error) { q := r.q.Select("ports") q = q.Select("description port protocol") type ports struct { Description string Port int Protocol NetworkProtocol } convert := func(fields []ports) []Port { out := []Port{} for i := range fields { val := Port{description: &fields[i].Description, port: &fields[i].Port, protocol: &fields[i].Protocol} out = append(out, val) } return out } var response []ports q = q.Bind(&response) err := q.Execute(ctx, r.c) if err != nil { return nil, err } return convert(response), nil } // Start the service and wait for its health checks to succeed. // // Services bound to a Container do not need to be manually started. func (r *Service) Start(ctx context.Context) (*Service, error) { q := r.q.Select("start") return r, q.Execute(ctx, r.c) } // Stop the service. func (r *Service) Stop(ctx context.Context) (*Service, error) { q := r.q.Select("stop") return r, q.Execute(ctx, r.c) } type Socket struct { q *querybuilder.Selection c graphql.Client id *SocketID } // The content-addressed identifier of the socket. func (r *Socket) ID(ctx context.Context) (SocketID, error) { if r.id != nil { return *r.id, nil } q := r.q.Select("id") var response SocketID q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // XXX_GraphQLType is an internal function. It returns the native GraphQL type name func (r *Socket) XXX_GraphQLType() string { return "Socket" } // XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object func (r *Socket) XXX_GraphQLIDType() string { return "SocketID" } // XXX_GraphQLID is an internal function. It returns the underlying type ID func (r *Socket) XXX_GraphQLID(ctx context.Context) (string, error) { id, err := r.ID(ctx) if err != nil { return "", err } return string(id), nil } func (r *Socket) MarshalJSON() ([]byte, error) { id, err := r.ID(context.Background()) if err != nil { return nil, err } return json.Marshal(id) } // A definition of a parameter or return type in a Module. type TypeDef struct { q *querybuilder.Selection c graphql.Client id *TypeDefID kind *TypeDefKind optional *bool } type WithTypeDefFunc func(r *TypeDef) *TypeDef // With calls the provided function with current TypeDef. // // This is useful for reusability and readability by not breaking the calling chain. func (r *TypeDef) With(f WithTypeDefFunc) *TypeDef { return f(r) } // If kind is LIST, the list-specific type definition. // If kind is not LIST, this will be null. func (r *TypeDef) AsList() *ListTypeDef { q := r.q.Select("asList") return &ListTypeDef{ q: q, c: r.c, } } // If kind is OBJECT, the object-specific type definition. // If kind is not OBJECT, this will be null. func (r *TypeDef) AsObject() *ObjectTypeDef { q := r.q.Select("asObject") return &ObjectTypeDef{ q: q, c: r.c, } } func (r *TypeDef) ID(ctx context.Context) (TypeDefID, error) { if r.id != nil { return *r.id, nil } q := r.q.Select("id") var response TypeDefID q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // XXX_GraphQLType is an internal function. It returns the native GraphQL type name func (r *TypeDef) XXX_GraphQLType() string { return "TypeDef" } // XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object func (r *TypeDef) XXX_GraphQLIDType() string { return "TypeDefID" } // XXX_GraphQLID is an internal function. It returns the underlying type ID func (r *TypeDef) XXX_GraphQLID(ctx context.Context) (string, error) { id, err := r.ID(ctx) if err != nil { return "", err } return string(id), nil } func (r *TypeDef) MarshalJSON() ([]byte, error) { id, err := r.ID(context.Background()) if err != nil { return nil, err } return json.Marshal(id) } // The kind of type this is (e.g. primitive, list, object) func (r *TypeDef) Kind(ctx context.Context) (TypeDefKind, error) { if r.kind != nil { return *r.kind, nil } q := r.q.Select("kind") var response TypeDefKind q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Whether this type can be set to null. Defaults to false. func (r *TypeDef) Optional(ctx context.Context) (bool, error) { if r.optional != nil { return *r.optional, nil } q := r.q.Select("optional") var response bool q = q.Bind(&response) return response, q.Execute(ctx, r.c) } // Adds a function for constructing a new instance of an Object TypeDef, failing if the type is not an object. func (r *TypeDef) WithConstructor(function *Function) *TypeDef { assertNotNil("function", function) q := r.q.Select("withConstructor") q = q.Arg("function", function) return &TypeDef{ q: q, c: r.c, } } // TypeDefWithFieldOpts contains options for TypeDef.WithField type TypeDefWithFieldOpts struct { // A doc string for the field, if any Description string } // Adds a static field for an Object TypeDef, failing if the type is not an object. func (r *TypeDef) WithField(name string, typeDef *TypeDef, opts ...TypeDefWithFieldOpts) *TypeDef { assertNotNil("typeDef", typeDef) q := r.q.Select("withField") for i := len(opts) - 1; i >= 0; i-- { // `description` optional argument if !querybuilder.IsZeroValue(opts[i].Description) { q = q.Arg("description", opts[i].Description) } } q = q.Arg("name", name) q = q.Arg("typeDef", typeDef) return &TypeDef{ q: q, c: r.c, } } // Adds a function for an Object TypeDef, failing if the type is not an object. func (r *TypeDef) WithFunction(function *Function) *TypeDef { assertNotNil("function", function) q := r.q.Select("withFunction") q = q.Arg("function", function) return &TypeDef{ q: q, c: r.c, } } // Sets the kind of the type. func (r *TypeDef) WithKind(kind TypeDefKind) *TypeDef { q := r.q.Select("withKind") q = q.Arg("kind", kind) return &TypeDef{ q: q, c: r.c, } } // Returns a TypeDef of kind List with the provided type for its elements. func (r *TypeDef) WithListOf(elementType *TypeDef) *TypeDef { assertNotNil("elementType", elementType) q := r.q.Select("withListOf") q = q.Arg("elementType", elementType) return &TypeDef{ q: q, c: r.c, } } // TypeDefWithObjectOpts contains options for TypeDef.WithObject type TypeDefWithObjectOpts struct { Description string } // Returns a TypeDef of kind Object with the provided name. // // Note that an object's fields and functions may be omitted if the intent is // only to refer to an object. This is how functions are able to return their // own object, or any other circular reference. func (r *TypeDef) WithObject(name string, opts ...TypeDefWithObjectOpts) *TypeDef { q := r.q.Select("withObject") for i := len(opts) - 1; i >= 0; i-- { // `description` optional argument if !querybuilder.IsZeroValue(opts[i].Description) { q = q.Arg("description", opts[i].Description) } } q = q.Arg("name", name) return &TypeDef{ q: q, c: r.c, } } // Sets whether this type can be set to null. func (r *TypeDef) WithOptional(optional bool) *TypeDef { q := r.q.Select("withOptional") q = q.Arg("optional", optional) return &TypeDef{ q: q, c: r.c, } } type CacheSharingMode string func (CacheSharingMode) IsEnum() {} const ( // Shares the cache volume amongst many build pipelines, // but will serialize the writes Locked CacheSharingMode = "LOCKED" // Keeps a cache volume for a single build pipeline Private CacheSharingMode = "PRIVATE" // Shares the cache volume amongst many build pipelines Shared CacheSharingMode = "SHARED" ) type ImageLayerCompression string func (ImageLayerCompression) IsEnum() {} const ( Estargz ImageLayerCompression = "EStarGZ" Gzip ImageLayerCompression = "Gzip" Uncompressed ImageLayerCompression = "Uncompressed" Zstd ImageLayerCompression = "Zstd" ) type ImageMediaTypes string func (ImageMediaTypes) IsEnum() {} const ( Dockermediatypes ImageMediaTypes = "DockerMediaTypes" Ocimediatypes ImageMediaTypes = "OCIMediaTypes" ) type NetworkProtocol string func (NetworkProtocol) IsEnum() {} const ( // TCP (Transmission Control Protocol) Tcp NetworkProtocol = "TCP" // UDP (User Datagram Protocol) Udp NetworkProtocol = "UDP" ) type TypeDefKind string func (TypeDefKind) IsEnum() {} const ( // A boolean value Booleankind TypeDefKind = "BooleanKind" // An integer value Integerkind TypeDefKind = "IntegerKind" // A list of values all having the same type. // // Always paired with a ListTypeDef. Listkind TypeDefKind = "ListKind" // A named type defined in the GraphQL schema, with fields and functions. // // Always paired with an ObjectTypeDef. Objectkind TypeDefKind = "ObjectKind" // A string value Stringkind TypeDefKind = "StringKind" // A special kind used to signify that no value is returned. // // This is used for functions that have no return value. The outer TypeDef // specifying this Kind is always Optional, as the Void is never actually // represented. Voidkind TypeDefKind = "VoidKind" )
closed
dagger/dagger
https://github.com/dagger/dagger
3,284
Use `withoutEntrypoint`, `withoutWorkdir`, `withoutUser` and `withoutDefaultArgs` to remove
Currently, passing nil or empty arguments to those function reinit the values. It's not that explicit and clear. It will make more API endpoints, but it's gonna be clearer.
https://github.com/dagger/dagger/issues/3284
https://github.com/dagger/dagger/pull/6278
568d802bb892f1e074cf74cfce2a551989418964
cd825bde699a0beb0adb5c2529da5469118a172b
"2022-10-07T15:00:07Z"
go
"2023-12-19T13:11:01Z"
sdk/nodejs/api/client.gen.ts
/** * This file was auto-generated by `client-gen`. * Do not make direct changes to the file. */ import { Context, defaultContext } from "../context/context.js" import { computeQuery } from "./utils.js" /** * @hidden */ export type QueryTree = { operation: string args?: Record<string, unknown> } /** * @hidden */ export type Metadata = { [key: string]: { is_enum?: boolean } } interface ClientConfig { queryTree?: QueryTree[] ctx?: Context } class BaseClient { protected _queryTree: QueryTree[] protected _ctx: Context /** * @hidden */ constructor({ queryTree, ctx }: ClientConfig = {}) { this._queryTree = queryTree || [] this._ctx = ctx || new Context() } /** * @hidden */ get queryTree() { return this._queryTree } } export type BuildArg = { /** * The build argument name. */ name: string /** * The build argument value. */ value: string } /** * Sharing mode of the cache volume. */ export enum CacheSharingMode { /** * Shares the cache volume amongst many build pipelines, * but will serialize the writes */ Locked = "LOCKED", /** * Keeps a cache volume for a single build pipeline */ Private = "PRIVATE", /** * Shares the cache volume amongst many build pipelines */ Shared = "SHARED", } /** * A global cache volume identifier. */ export type CacheVolumeID = string & { __CacheVolumeID: never } export type ContainerAsTarballOpts = { /** * Identifiers for other platform specific containers. * Used for multi-platform image. */ platformVariants?: Container[] /** * Force each layer of the image to use the specified compression algorithm. * If this is unset, then if a layer already has a compressed blob in the engine's * cache, that will be used (this can result in a mix of compression algorithms for * different layers). If this is unset and a layer has no compressed blob in the * engine's cache, then it will be compressed using Gzip. */ forcedCompression?: ImageLayerCompression /** * Use the specified media types for the image's layers. Defaults to OCI, which * is largely compatible with most recent container runtimes, but Docker may be needed * for older runtimes without OCI support. */ mediaTypes?: ImageMediaTypes } export type ContainerBuildOpts = { /** * Path to the Dockerfile to use. * * Default: './Dockerfile'. */ dockerfile?: string /** * Additional build arguments. */ buildArgs?: BuildArg[] /** * Target build stage to build. */ target?: string /** * Secrets to pass to the build. * * They will be mounted at /run/secrets/[secret-name] in the build container * * They can be accessed in the Dockerfile using the "secret" mount type * and mount path /run/secrets/[secret-name] * e.g. RUN --mount=type=secret,id=my-secret curl url?token=$(cat /run/secrets/my-secret)" */ secrets?: Secret[] } export type ContainerExportOpts = { /** * Identifiers for other platform specific containers. * Used for multi-platform image. */ platformVariants?: Container[] /** * Force each layer of the exported image to use the specified compression algorithm. * If this is unset, then if a layer already has a compressed blob in the engine's * cache, that will be used (this can result in a mix of compression algorithms for * different layers). If this is unset and a layer has no compressed blob in the * engine's cache, then it will be compressed using Gzip. */ forcedCompression?: ImageLayerCompression /** * Use the specified media types for the exported image's layers. Defaults to OCI, which * is largely compatible with most recent container runtimes, but Docker may be needed * for older runtimes without OCI support. */ mediaTypes?: ImageMediaTypes } export type ContainerImportOpts = { /** * Identifies the tag to import from the archive, if the archive bundles * multiple tags. */ tag?: string } export type ContainerPipelineOpts = { /** * Pipeline description. */ description?: string /** * Pipeline labels. */ labels?: PipelineLabel[] } export type ContainerPublishOpts = { /** * Identifiers for other platform specific containers. * Used for multi-platform image. */ platformVariants?: Container[] /** * Force each layer of the published image to use the specified compression algorithm. * If this is unset, then if a layer already has a compressed blob in the engine's * cache, that will be used (this can result in a mix of compression algorithms for * different layers). If this is unset and a layer has no compressed blob in the * engine's cache, then it will be compressed using Gzip. */ forcedCompression?: ImageLayerCompression /** * Use the specified media types for the published image's layers. Defaults to OCI, which * is largely compatible with most recent registries, but Docker may be needed for older * registries without OCI support. */ mediaTypes?: ImageMediaTypes } export type ContainerWithDefaultArgsOpts = { /** * Arguments to prepend to future executions (e.g., ["-v", "--no-cache"]). */ args?: string[] } export type ContainerWithDirectoryOpts = { /** * Patterns to exclude in the written directory (e.g., ["node_modules/**", ".gitignore", ".git/"]). */ exclude?: string[] /** * Patterns to include in the written directory (e.g., ["*.go", "go.mod", "go.sum"]). */ include?: string[] /** * A user:group to set for the directory and its contents. * * The user and group can either be an ID (1000:1000) or a name (foo:bar). * * If the group is omitted, it defaults to the same as the user. */ owner?: string } export type ContainerWithEnvVariableOpts = { /** * Replace `${VAR}` or $VAR in the value according to the current environment * variables defined in the container (e.g., "/opt/bin:$PATH"). */ expand?: boolean } export type ContainerWithExecOpts = { /** * If the container has an entrypoint, ignore it for args rather than using it to wrap them. */ skipEntrypoint?: boolean /** * Content to write to the command's standard input before closing (e.g., "Hello world"). */ stdin?: string /** * Redirect the command's standard output to a file in the container (e.g., "/tmp/stdout"). */ redirectStdout?: string /** * Redirect the command's standard error to a file in the container (e.g., "/tmp/stderr"). */ redirectStderr?: string /** * Provides dagger access to the executed command. * * Do not use this option unless you trust the command being executed. * The command being executed WILL BE GRANTED FULL ACCESS TO YOUR HOST FILESYSTEM. */ experimentalPrivilegedNesting?: boolean /** * Execute the command with all root capabilities. This is similar to running a command * with "sudo" or executing `docker run` with the `--privileged` flag. Containerization * does not provide any security guarantees when using this option. It should only be used * when absolutely necessary and only with trusted commands. */ insecureRootCapabilities?: boolean } export type ContainerWithExposedPortOpts = { /** * Transport layer network protocol */ protocol?: NetworkProtocol /** * Optional port description */ description?: string } export type ContainerWithFileOpts = { /** * Permission given to the copied file (e.g., 0600). * * Default: 0644. */ permissions?: number /** * A user:group to set for the file. * * The user and group can either be an ID (1000:1000) or a name (foo:bar). * * If the group is omitted, it defaults to the same as the user. */ owner?: string } export type ContainerWithMountedCacheOpts = { /** * Identifier of the directory to use as the cache volume's root. */ source?: Directory /** * Sharing mode of the cache volume. */ sharing?: CacheSharingMode /** * A user:group to set for the mounted cache directory. * * Note that this changes the ownership of the specified mount along with the * initial filesystem provided by source (if any). It does not have any effect * if/when the cache has already been created. * * The user and group can either be an ID (1000:1000) or a name (foo:bar). * * If the group is omitted, it defaults to the same as the user. */ owner?: string } export type ContainerWithMountedDirectoryOpts = { /** * A user:group to set for the mounted directory and its contents. * * The user and group can either be an ID (1000:1000) or a name (foo:bar). * * If the group is omitted, it defaults to the same as the user. */ owner?: string } export type ContainerWithMountedFileOpts = { /** * A user or user:group to set for the mounted file. * * The user and group can either be an ID (1000:1000) or a name (foo:bar). * * If the group is omitted, it defaults to the same as the user. */ owner?: string } export type ContainerWithMountedSecretOpts = { /** * A user:group to set for the mounted secret. * * The user and group can either be an ID (1000:1000) or a name (foo:bar). * * If the group is omitted, it defaults to the same as the user. */ owner?: string /** * Permission given to the mounted secret (e.g., 0600). * This option requires an owner to be set to be active. * * Default: 0400. */ mode?: number } export type ContainerWithNewFileOpts = { /** * Content of the file to write (e.g., "Hello world!"). */ contents?: string /** * Permission given to the written file (e.g., 0600). * * Default: 0644. */ permissions?: number /** * A user:group to set for the file. * * The user and group can either be an ID (1000:1000) or a name (foo:bar). * * If the group is omitted, it defaults to the same as the user. */ owner?: string } export type ContainerWithUnixSocketOpts = { /** * A user:group to set for the mounted socket. * * The user and group can either be an ID (1000:1000) or a name (foo:bar). * * If the group is omitted, it defaults to the same as the user. */ owner?: string } export type ContainerWithoutExposedPortOpts = { /** * Port protocol to unexpose */ protocol?: NetworkProtocol } /** * A unique container identifier. Null designates an empty container (scratch). */ export type ContainerID = string & { __ContainerID: never } /** * The `DateTime` scalar type represents a DateTime. The DateTime is serialized as an RFC 3339 quoted string */ export type DateTime = string & { __DateTime: never } export type DirectoryAsModuleOpts = { /** * An optional subpath of the directory which contains the module's source * code. * * This is needed when the module code is in a subdirectory but requires * parent directories to be loaded in order to execute. For example, the * module source code may need a go.mod, project.toml, package.json, etc. file * from a parent directory. * * If not set, the module source code is loaded from the root of the * directory. */ sourceSubpath?: string } export type DirectoryDockerBuildOpts = { /** * Path to the Dockerfile to use (e.g., "frontend.Dockerfile"). * * Defaults: './Dockerfile'. */ dockerfile?: string /** * The platform to build. */ platform?: Platform /** * Build arguments to use in the build. */ buildArgs?: BuildArg[] /** * Target build stage to build. */ target?: string /** * Secrets to pass to the build. * * They will be mounted at /run/secrets/[secret-name]. */ secrets?: Secret[] } export type DirectoryEntriesOpts = { /** * Location of the directory to look at (e.g., "/src"). */ path?: string } export type DirectoryPipelineOpts = { /** * Pipeline description. */ description?: string /** * Pipeline labels. */ labels?: PipelineLabel[] } export type DirectoryWithDirectoryOpts = { /** * Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]). */ exclude?: string[] /** * Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]). */ include?: string[] } export type DirectoryWithFileOpts = { /** * Permission given to the copied file (e.g., 0600). * * Default: 0644. */ permissions?: number } export type DirectoryWithNewDirectoryOpts = { /** * Permission granted to the created directory (e.g., 0777). * * Default: 0755. */ permissions?: number } export type DirectoryWithNewFileOpts = { /** * Permission given to the copied file (e.g., 0600). * * Default: 0644. */ permissions?: number } /** * A content-addressed directory identifier. */ export type DirectoryID = string & { __DirectoryID: never } export type FileExportOpts = { /** * If allowParentDirPath is true, the path argument can be a directory path, in which case * the file will be created in that directory. */ allowParentDirPath?: boolean } /** * A file identifier. */ export type FileID = string & { __FileID: never } export type FunctionWithArgOpts = { /** * A doc string for the argument, if any */ description?: string /** * A default value to use for this argument if not explicitly set by the caller, if any */ defaultValue?: JSON } /** * A reference to a FunctionArg. */ export type FunctionArgID = string & { __FunctionArgID: never } /** * A reference to a Function. */ export type FunctionID = string & { __FunctionID: never } /** * A reference to GeneratedCode. */ export type GeneratedCodeID = string & { __GeneratedCodeID: never } export type GitRefTreeOpts = { sshKnownHosts?: string sshAuthSocket?: Socket } /** * A git reference identifier. */ export type GitRefID = string & { __GitRefID: never } /** * A git repository identifier. */ export type GitRepositoryID = string & { __GitRepositoryID: never } export type HostDirectoryOpts = { /** * Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]). */ exclude?: string[] /** * Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]). */ include?: string[] } export type HostServiceOpts = { /** * Upstream host to forward traffic to. */ host?: string } export type HostTunnelOpts = { /** * Map each service port to the same port on the host, as if the service were * running natively. * * Note: enabling may result in port conflicts. */ native?: boolean /** * Configure explicit port forwarding rules for the tunnel. * * If a port's frontend is unspecified or 0, a random port will be chosen by * the host. * * If no ports are given, all of the service's ports are forwarded. If native * is true, each port maps to the same port on the host. If native is false, * each port maps to a random port chosen by the host. * * If ports are given and native is true, the ports are additive. */ ports?: PortForward[] } /** * The `ID` scalar type represents a unique identifier, often used to refetch an object or as key for a cache. The ID type appears in a JSON response as a String; however, it is not intended to be human-readable. When expected as an input type, any string (such as `"4"`) or integer (such as `4`) input value will be accepted as an ID. */ export type ID = string & { __ID: never } /** * Compression algorithm to use for image layers. */ export enum ImageLayerCompression { Estargz = "EStarGZ", Gzip = "Gzip", Uncompressed = "Uncompressed", Zstd = "Zstd", } /** * Mediatypes to use in published or exported image metadata. */ export enum ImageMediaTypes { Dockermediatypes = "DockerMediaTypes", Ocimediatypes = "OCIMediaTypes", } /** * An arbitrary JSON-encoded value. */ export type JSON = string & { __JSON: never } /** * A reference to a Module. */ export type ModuleID = string & { __ModuleID: never } /** * Transport layer network protocol associated to a port. */ export enum NetworkProtocol { /** * TCP (Transmission Control Protocol) */ Tcp = "TCP", /** * UDP (User Datagram Protocol) */ Udp = "UDP", } export type PipelineLabel = { /** * Label name. */ name: string /** * Label value. */ value: string } /** * The platform config OS and architecture in a Container. * * The format is [os]/[platform]/[version] (e.g., "darwin/arm64/v7", "windows/amd64", "linux/arm64"). */ export type Platform = string & { __Platform: never } export type PortForward = { /** * Destination port for traffic. */ backend: number /** * Port to expose to clients. If unspecified, a default will be chosen. */ frontend?: number /** * Protocol to use for traffic. */ protocol?: NetworkProtocol } export type ClientContainerOpts = { id?: ContainerID platform?: Platform } export type ClientDirectoryOpts = { id?: DirectoryID } export type ClientGitOpts = { /** * Set to true to keep .git directory. */ keepGitDir?: boolean /** * Set SSH known hosts */ sshKnownHosts?: string /** * Set SSH auth socket */ sshAuthSocket?: Socket /** * A service which must be started before the repo is fetched. */ experimentalServiceHost?: Service } export type ClientHttpOpts = { /** * A service which must be started before the URL is fetched. */ experimentalServiceHost?: Service } export type ClientModuleConfigOpts = { subpath?: string } export type ClientPipelineOpts = { /** * Pipeline description. */ description?: string /** * Pipeline labels. */ labels?: PipelineLabel[] } export type ClientSocketOpts = { id?: SocketID } /** * A unique identifier for a secret. */ export type SecretID = string & { __SecretID: never } export type ServiceEndpointOpts = { /** * The exposed port number for the endpoint */ port?: number /** * Return a URL with the given scheme, eg. http for http:// */ scheme?: string } /** * A unique service identifier. */ export type ServiceID = string & { __ServiceID: never } /** * A content-addressed socket identifier. */ export type SocketID = string & { __SocketID: never } export type TypeDefWithFieldOpts = { /** * A doc string for the field, if any */ description?: string } export type TypeDefWithObjectOpts = { description?: string } /** * A reference to a TypeDef. */ export type TypeDefID = string & { __TypeDefID: never } /** * Distinguishes the different kinds of TypeDefs. */ export enum TypeDefKind { /** * A boolean value */ Booleankind = "BooleanKind", /** * An integer value */ Integerkind = "IntegerKind", /** * A list of values all having the same type. * * Always paired with a ListTypeDef. */ Listkind = "ListKind", /** * A named type defined in the GraphQL schema, with fields and functions. * * Always paired with an ObjectTypeDef. */ Objectkind = "ObjectKind", /** * A string value */ Stringkind = "StringKind", /** * A special kind used to signify that no value is returned. * * This is used for functions that have no return value. The outer TypeDef * specifying this Kind is always Optional, as the Void is never actually * represented. */ Voidkind = "VoidKind", } /** * The absense of a value. * * A Null Void is used as a placeholder for resolvers that do not return anything. */ export type Void = string & { __Void: never } export type __TypeEnumValuesOpts = { includeDeprecated?: boolean } export type __TypeFieldsOpts = { includeDeprecated?: boolean } /** * A directory whose contents persist across runs. */ export class CacheVolume extends BaseClient { private readonly _id?: CacheVolumeID = undefined /** * Constructor is used for internal usage only, do not create object from it. */ constructor( parent?: { queryTree?: QueryTree[]; ctx: Context }, _id?: CacheVolumeID ) { super(parent) this._id = _id } id = async (): Promise<CacheVolumeID> => { if (this._id) { return this._id } const response: Awaited<CacheVolumeID> = await computeQuery( [ ...this._queryTree, { operation: "id", }, ], await this._ctx.connection() ) return response } } /** * An OCI-compatible container, also known as a docker container. */ export class Container extends BaseClient { private readonly _id?: ContainerID = undefined private readonly _envVariable?: string = undefined private readonly _export?: boolean = undefined private readonly _imageRef?: string = undefined private readonly _label?: string = undefined private readonly _platform?: Platform = undefined private readonly _publish?: string = undefined private readonly _shellEndpoint?: string = undefined private readonly _stderr?: string = undefined private readonly _stdout?: string = undefined private readonly _sync?: ContainerID = undefined private readonly _user?: string = undefined private readonly _workdir?: string = undefined /** * Constructor is used for internal usage only, do not create object from it. */ constructor( parent?: { queryTree?: QueryTree[]; ctx: Context }, _id?: ContainerID, _envVariable?: string, _export?: boolean, _imageRef?: string, _label?: string, _platform?: Platform, _publish?: string, _shellEndpoint?: string, _stderr?: string, _stdout?: string, _sync?: ContainerID, _user?: string, _workdir?: string ) { super(parent) this._id = _id this._envVariable = _envVariable this._export = _export this._imageRef = _imageRef this._label = _label this._platform = _platform this._publish = _publish this._shellEndpoint = _shellEndpoint this._stderr = _stderr this._stdout = _stdout this._sync = _sync this._user = _user this._workdir = _workdir } /** * A unique identifier for this container. */ id = async (): Promise<ContainerID> => { if (this._id) { return this._id } const response: Awaited<ContainerID> = await computeQuery( [ ...this._queryTree, { operation: "id", }, ], await this._ctx.connection() ) return response } /** * Turn the container into a Service. * * Be sure to set any exposed ports before this conversion. */ asService = (): Service => { return new Service({ queryTree: [ ...this._queryTree, { operation: "asService", }, ], ctx: this._ctx, }) } /** * Returns a File representing the container serialized to a tarball. * @param opts.platformVariants Identifiers for other platform specific containers. * Used for multi-platform image. * @param opts.forcedCompression Force each layer of the image to use the specified compression algorithm. * If this is unset, then if a layer already has a compressed blob in the engine's * cache, that will be used (this can result in a mix of compression algorithms for * different layers). If this is unset and a layer has no compressed blob in the * engine's cache, then it will be compressed using Gzip. * @param opts.mediaTypes Use the specified media types for the image's layers. Defaults to OCI, which * is largely compatible with most recent container runtimes, but Docker may be needed * for older runtimes without OCI support. */ asTarball = (opts?: ContainerAsTarballOpts): File => { const metadata: Metadata = { forcedCompression: { is_enum: true }, mediaTypes: { is_enum: true }, } return new File({ queryTree: [ ...this._queryTree, { operation: "asTarball", args: { ...opts, __metadata: metadata }, }, ], ctx: this._ctx, }) } /** * Initializes this container from a Dockerfile build. * @param context Directory context used by the Dockerfile. * @param opts.dockerfile Path to the Dockerfile to use. * * Default: './Dockerfile'. * @param opts.buildArgs Additional build arguments. * @param opts.target Target build stage to build. * @param opts.secrets Secrets to pass to the build. * * They will be mounted at /run/secrets/[secret-name] in the build container * * They can be accessed in the Dockerfile using the "secret" mount type * and mount path /run/secrets/[secret-name] * e.g. RUN --mount=type=secret,id=my-secret curl url?token=$(cat /run/secrets/my-secret)" */ build = (context: Directory, opts?: ContainerBuildOpts): Container => { return new Container({ queryTree: [ ...this._queryTree, { operation: "build", args: { context, ...opts }, }, ], ctx: this._ctx, }) } /** * Retrieves default arguments for future commands. */ defaultArgs = async (): Promise<string[]> => { const response: Awaited<string[]> = await computeQuery( [ ...this._queryTree, { operation: "defaultArgs", }, ], await this._ctx.connection() ) return response } /** * Retrieves a directory at the given path. * * Mounts are included. * @param path The path of the directory to retrieve (e.g., "./src"). */ directory = (path: string): Directory => { return new Directory({ queryTree: [ ...this._queryTree, { operation: "directory", args: { path }, }, ], ctx: this._ctx, }) } /** * Retrieves entrypoint to be prepended to the arguments of all commands. */ entrypoint = async (): Promise<string[]> => { const response: Awaited<string[]> = await computeQuery( [ ...this._queryTree, { operation: "entrypoint", }, ], await this._ctx.connection() ) return response } /** * Retrieves the value of the specified environment variable. * @param name The name of the environment variable to retrieve (e.g., "PATH"). */ envVariable = async (name: string): Promise<string> => { if (this._envVariable) { return this._envVariable } const response: Awaited<string> = await computeQuery( [ ...this._queryTree, { operation: "envVariable", args: { name }, }, ], await this._ctx.connection() ) return response } /** * Retrieves the list of environment variables passed to commands. */ envVariables = async (): Promise<EnvVariable[]> => { type envVariables = { name: string value: string } const response: Awaited<envVariables[]> = await computeQuery( [ ...this._queryTree, { operation: "envVariables", }, { operation: "name value", }, ], await this._ctx.connection() ) return response.map( (r) => new EnvVariable( { queryTree: this.queryTree, ctx: this._ctx, }, r.name, r.value ) ) } /** * EXPERIMENTAL API! Subject to change/removal at any time. * * experimentalWithAllGPUs configures all available GPUs on the host to be accessible to this container. * This currently works for Nvidia devices only. */ experimentalWithAllGPUs = (): Container => { return new Container({ queryTree: [ ...this._queryTree, { operation: "experimentalWithAllGPUs", }, ], ctx: this._ctx, }) } /** * EXPERIMENTAL API! Subject to change/removal at any time. * * experimentalWithGPU configures the provided list of devices to be accesible to this container. * This currently works for Nvidia devices only. */ experimentalWithGPU = (devices: string[]): Container => { return new Container({ queryTree: [ ...this._queryTree, { operation: "experimentalWithGPU", args: { devices }, }, ], ctx: this._ctx, }) } /** * Writes the container as an OCI tarball to the destination file path on the host for the specified platform variants. * * Return true on success. * It can also publishes platform variants. * @param path Host's destination path (e.g., "./tarball"). * Path can be relative to the engine's workdir or absolute. * @param opts.platformVariants Identifiers for other platform specific containers. * Used for multi-platform image. * @param opts.forcedCompression Force each layer of the exported image to use the specified compression algorithm. * If this is unset, then if a layer already has a compressed blob in the engine's * cache, that will be used (this can result in a mix of compression algorithms for * different layers). If this is unset and a layer has no compressed blob in the * engine's cache, then it will be compressed using Gzip. * @param opts.mediaTypes Use the specified media types for the exported image's layers. Defaults to OCI, which * is largely compatible with most recent container runtimes, but Docker may be needed * for older runtimes without OCI support. */ export = async ( path: string, opts?: ContainerExportOpts ): Promise<boolean> => { if (this._export) { return this._export } const metadata: Metadata = { forcedCompression: { is_enum: true }, mediaTypes: { is_enum: true }, } const response: Awaited<boolean> = await computeQuery( [ ...this._queryTree, { operation: "export", args: { path, ...opts, __metadata: metadata }, }, ], await this._ctx.connection() ) return response } /** * Retrieves the list of exposed ports. * * This includes ports already exposed by the image, even if not * explicitly added with dagger. */ exposedPorts = async (): Promise<Port[]> => { type exposedPorts = { description: string port: number protocol: NetworkProtocol } const response: Awaited<exposedPorts[]> = await computeQuery( [ ...this._queryTree, { operation: "exposedPorts", }, { operation: "description port protocol", }, ], await this._ctx.connection() ) return response.map( (r) => new Port( { queryTree: this.queryTree, ctx: this._ctx, }, r.description, r.port, r.protocol ) ) } /** * Retrieves a file at the given path. * * Mounts are included. * @param path The path of the file to retrieve (e.g., "./README.md"). */ file = (path: string): File => { return new File({ queryTree: [ ...this._queryTree, { operation: "file", args: { path }, }, ], ctx: this._ctx, }) } /** * Initializes this container from a pulled base image. * @param address Image's address from its registry. * * Formatted as [host]/[user]/[repo]:[tag] (e.g., "docker.io/dagger/dagger:main"). */ from = (address: string): Container => { return new Container({ queryTree: [ ...this._queryTree, { operation: "from", args: { address }, }, ], ctx: this._ctx, }) } /** * The unique image reference which can only be retrieved immediately after the 'Container.From' call. */ imageRef = async (): Promise<string> => { if (this._imageRef) { return this._imageRef } const response: Awaited<string> = await computeQuery( [ ...this._queryTree, { operation: "imageRef", }, ], await this._ctx.connection() ) return response } /** * Reads the container from an OCI tarball. * * NOTE: this involves unpacking the tarball to an OCI store on the host at * $XDG_CACHE_DIR/dagger/oci. This directory can be removed whenever you like. * @param source File to read the container from. * @param opts.tag Identifies the tag to import from the archive, if the archive bundles * multiple tags. */ import_ = (source: File, opts?: ContainerImportOpts): Container => { return new Container({ queryTree: [ ...this._queryTree, { operation: "import", args: { source, ...opts }, }, ], ctx: this._ctx, }) } /** * Retrieves the value of the specified label. */ label = async (name: string): Promise<string> => { if (this._label) { return this._label } const response: Awaited<string> = await computeQuery( [ ...this._queryTree, { operation: "label", args: { name }, }, ], await this._ctx.connection() ) return response } /** * Retrieves the list of labels passed to container. */ labels = async (): Promise<Label[]> => { type labels = { name: string value: string } const response: Awaited<labels[]> = await computeQuery( [ ...this._queryTree, { operation: "labels", }, { operation: "name value", }, ], await this._ctx.connection() ) return response.map( (r) => new Label( { queryTree: this.queryTree, ctx: this._ctx, }, r.name, r.value ) ) } /** * Retrieves the list of paths where a directory is mounted. */ mounts = async (): Promise<string[]> => { const response: Awaited<string[]> = await computeQuery( [ ...this._queryTree, { operation: "mounts", }, ], await this._ctx.connection() ) return response } /** * Creates a named sub-pipeline * @param name Pipeline name. * @param opts.description Pipeline description. * @param opts.labels Pipeline labels. */ pipeline = (name: string, opts?: ContainerPipelineOpts): Container => { return new Container({ queryTree: [ ...this._queryTree, { operation: "pipeline", args: { name, ...opts }, }, ], ctx: this._ctx, }) } /** * The platform this container executes and publishes as. */ platform = async (): Promise<Platform> => { if (this._platform) { return this._platform } const response: Awaited<Platform> = await computeQuery( [ ...this._queryTree, { operation: "platform", }, ], await this._ctx.connection() ) return response } /** * Publishes this container as a new image to the specified address. * * Publish returns a fully qualified ref. * It can also publish platform variants. * @param address Registry's address to publish the image to. * * Formatted as [host]/[user]/[repo]:[tag] (e.g. "docker.io/dagger/dagger:main"). * @param opts.platformVariants Identifiers for other platform specific containers. * Used for multi-platform image. * @param opts.forcedCompression Force each layer of the published image to use the specified compression algorithm. * If this is unset, then if a layer already has a compressed blob in the engine's * cache, that will be used (this can result in a mix of compression algorithms for * different layers). If this is unset and a layer has no compressed blob in the * engine's cache, then it will be compressed using Gzip. * @param opts.mediaTypes Use the specified media types for the published image's layers. Defaults to OCI, which * is largely compatible with most recent registries, but Docker may be needed for older * registries without OCI support. */ publish = async ( address: string, opts?: ContainerPublishOpts ): Promise<string> => { if (this._publish) { return this._publish } const metadata: Metadata = { forcedCompression: { is_enum: true }, mediaTypes: { is_enum: true }, } const response: Awaited<string> = await computeQuery( [ ...this._queryTree, { operation: "publish", args: { address, ...opts, __metadata: metadata }, }, ], await this._ctx.connection() ) return response } /** * Retrieves this container's root filesystem. Mounts are not included. */ rootfs = (): Directory => { return new Directory({ queryTree: [ ...this._queryTree, { operation: "rootfs", }, ], ctx: this._ctx, }) } /** * Return a websocket endpoint that, if connected to, will start the container with a TTY streamed * over the websocket. * * Primarily intended for internal use with the dagger CLI. */ shellEndpoint = async (): Promise<string> => { if (this._shellEndpoint) { return this._shellEndpoint } const response: Awaited<string> = await computeQuery( [ ...this._queryTree, { operation: "shellEndpoint", }, ], await this._ctx.connection() ) return response } /** * The error stream of the last executed command. * * Will execute default command if none is set, or error if there's no default. */ stderr = async (): Promise<string> => { if (this._stderr) { return this._stderr } const response: Awaited<string> = await computeQuery( [ ...this._queryTree, { operation: "stderr", }, ], await this._ctx.connection() ) return response } /** * The output stream of the last executed command. * * Will execute default command if none is set, or error if there's no default. */ stdout = async (): Promise<string> => { if (this._stdout) { return this._stdout } const response: Awaited<string> = await computeQuery( [ ...this._queryTree, { operation: "stdout", }, ], await this._ctx.connection() ) return response } /** * Forces evaluation of the pipeline in the engine. * * It doesn't run the default command if no exec has been set. */ sync = async (): Promise<Container> => { await computeQuery( [ ...this._queryTree, { operation: "sync", }, ], await this._ctx.connection() ) return this } /** * Retrieves the user to be set for all commands. */ user = async (): Promise<string> => { if (this._user) { return this._user } const response: Awaited<string> = await computeQuery( [ ...this._queryTree, { operation: "user", }, ], await this._ctx.connection() ) return response } /** * Configures default arguments for future commands. * @param opts.args Arguments to prepend to future executions (e.g., ["-v", "--no-cache"]). */ withDefaultArgs = (opts?: ContainerWithDefaultArgsOpts): Container => { return new Container({ queryTree: [ ...this._queryTree, { operation: "withDefaultArgs", args: { ...opts }, }, ], ctx: this._ctx, }) } /** * Retrieves this container plus a directory written at the given path. * @param path Location of the written directory (e.g., "/tmp/directory"). * @param directory Identifier of the directory to write * @param opts.exclude Patterns to exclude in the written directory (e.g., ["node_modules/**", ".gitignore", ".git/"]). * @param opts.include Patterns to include in the written directory (e.g., ["*.go", "go.mod", "go.sum"]). * @param opts.owner A user:group to set for the directory and its contents. * * The user and group can either be an ID (1000:1000) or a name (foo:bar). * * If the group is omitted, it defaults to the same as the user. */ withDirectory = ( path: string, directory: Directory, opts?: ContainerWithDirectoryOpts ): Container => { return new Container({ queryTree: [ ...this._queryTree, { operation: "withDirectory", args: { path, directory, ...opts }, }, ], ctx: this._ctx, }) } /** * Retrieves this container but with a different command entrypoint. * @param args Entrypoint to use for future executions (e.g., ["go", "run"]). */ withEntrypoint = (args: string[]): Container => { return new Container({ queryTree: [ ...this._queryTree, { operation: "withEntrypoint", args: { args }, }, ], ctx: this._ctx, }) } /** * Retrieves this container plus the given environment variable. * @param name The name of the environment variable (e.g., "HOST"). * @param value The value of the environment variable. (e.g., "localhost"). * @param opts.expand Replace `${VAR}` or $VAR in the value according to the current environment * variables defined in the container (e.g., "/opt/bin:$PATH"). */ withEnvVariable = ( name: string, value: string, opts?: ContainerWithEnvVariableOpts ): Container => { return new Container({ queryTree: [ ...this._queryTree, { operation: "withEnvVariable", args: { name, value, ...opts }, }, ], ctx: this._ctx, }) } /** * Retrieves this container after executing the specified command inside it. * @param args Command to run instead of the container's default command (e.g., ["run", "main.go"]). * * If empty, the container's default command is used. * @param opts.skipEntrypoint If the container has an entrypoint, ignore it for args rather than using it to wrap them. * @param opts.stdin Content to write to the command's standard input before closing (e.g., "Hello world"). * @param opts.redirectStdout Redirect the command's standard output to a file in the container (e.g., "/tmp/stdout"). * @param opts.redirectStderr Redirect the command's standard error to a file in the container (e.g., "/tmp/stderr"). * @param opts.experimentalPrivilegedNesting Provides dagger access to the executed command. * * Do not use this option unless you trust the command being executed. * The command being executed WILL BE GRANTED FULL ACCESS TO YOUR HOST FILESYSTEM. * @param opts.insecureRootCapabilities Execute the command with all root capabilities. This is similar to running a command * with "sudo" or executing `docker run` with the `--privileged` flag. Containerization * does not provide any security guarantees when using this option. It should only be used * when absolutely necessary and only with trusted commands. */ withExec = (args: string[], opts?: ContainerWithExecOpts): Container => { return new Container({ queryTree: [ ...this._queryTree, { operation: "withExec", args: { args, ...opts }, }, ], ctx: this._ctx, }) } /** * Expose a network port. * * Exposed ports serve two purposes: * * - For health checks and introspection, when running services * - For setting the EXPOSE OCI field when publishing the container * @param port Port number to expose * @param opts.protocol Transport layer network protocol * @param opts.description Optional port description */ withExposedPort = ( port: number, opts?: ContainerWithExposedPortOpts ): Container => { const metadata: Metadata = { protocol: { is_enum: true }, } return new Container({ queryTree: [ ...this._queryTree, { operation: "withExposedPort", args: { port, ...opts, __metadata: metadata }, }, ], ctx: this._ctx, }) } /** * Retrieves this container plus the contents of the given file copied to the given path. * @param path Location of the copied file (e.g., "/tmp/file.txt"). * @param source Identifier of the file to copy. * @param opts.permissions Permission given to the copied file (e.g., 0600). * * Default: 0644. * @param opts.owner A user:group to set for the file. * * The user and group can either be an ID (1000:1000) or a name (foo:bar). * * If the group is omitted, it defaults to the same as the user. */ withFile = ( path: string, source: File, opts?: ContainerWithFileOpts ): Container => { return new Container({ queryTree: [ ...this._queryTree, { operation: "withFile", args: { path, source, ...opts }, }, ], ctx: this._ctx, }) } /** * Indicate that subsequent operations should be featured more prominently in * the UI. */ withFocus = (): Container => { return new Container({ queryTree: [ ...this._queryTree, { operation: "withFocus", }, ], ctx: this._ctx, }) } /** * Retrieves this container plus the given label. * @param name The name of the label (e.g., "org.opencontainers.artifact.created"). * @param value The value of the label (e.g., "2023-01-01T00:00:00Z"). */ withLabel = (name: string, value: string): Container => { return new Container({ queryTree: [ ...this._queryTree, { operation: "withLabel", args: { name, value }, }, ], ctx: this._ctx, }) } /** * Retrieves this container plus a cache volume mounted at the given path. * @param path Location of the cache directory (e.g., "/cache/node_modules"). * @param cache Identifier of the cache volume to mount. * @param opts.source Identifier of the directory to use as the cache volume's root. * @param opts.sharing Sharing mode of the cache volume. * @param opts.owner A user:group to set for the mounted cache directory. * * Note that this changes the ownership of the specified mount along with the * initial filesystem provided by source (if any). It does not have any effect * if/when the cache has already been created. * * The user and group can either be an ID (1000:1000) or a name (foo:bar). * * If the group is omitted, it defaults to the same as the user. */ withMountedCache = ( path: string, cache: CacheVolume, opts?: ContainerWithMountedCacheOpts ): Container => { const metadata: Metadata = { sharing: { is_enum: true }, } return new Container({ queryTree: [ ...this._queryTree, { operation: "withMountedCache", args: { path, cache, ...opts, __metadata: metadata }, }, ], ctx: this._ctx, }) } /** * Retrieves this container plus a directory mounted at the given path. * @param path Location of the mounted directory (e.g., "/mnt/directory"). * @param source Identifier of the mounted directory. * @param opts.owner A user:group to set for the mounted directory and its contents. * * The user and group can either be an ID (1000:1000) or a name (foo:bar). * * If the group is omitted, it defaults to the same as the user. */ withMountedDirectory = ( path: string, source: Directory, opts?: ContainerWithMountedDirectoryOpts ): Container => { return new Container({ queryTree: [ ...this._queryTree, { operation: "withMountedDirectory", args: { path, source, ...opts }, }, ], ctx: this._ctx, }) } /** * Retrieves this container plus a file mounted at the given path. * @param path Location of the mounted file (e.g., "/tmp/file.txt"). * @param source Identifier of the mounted file. * @param opts.owner A user or user:group to set for the mounted file. * * The user and group can either be an ID (1000:1000) or a name (foo:bar). * * If the group is omitted, it defaults to the same as the user. */ withMountedFile = ( path: string, source: File, opts?: ContainerWithMountedFileOpts ): Container => { return new Container({ queryTree: [ ...this._queryTree, { operation: "withMountedFile", args: { path, source, ...opts }, }, ], ctx: this._ctx, }) } /** * Retrieves this container plus a secret mounted into a file at the given path. * @param path Location of the secret file (e.g., "/tmp/secret.txt"). * @param source Identifier of the secret to mount. * @param opts.owner A user:group to set for the mounted secret. * * The user and group can either be an ID (1000:1000) or a name (foo:bar). * * If the group is omitted, it defaults to the same as the user. * @param opts.mode Permission given to the mounted secret (e.g., 0600). * This option requires an owner to be set to be active. * * Default: 0400. */ withMountedSecret = ( path: string, source: Secret, opts?: ContainerWithMountedSecretOpts ): Container => { return new Container({ queryTree: [ ...this._queryTree, { operation: "withMountedSecret", args: { path, source, ...opts }, }, ], ctx: this._ctx, }) } /** * Retrieves this container plus a temporary directory mounted at the given path. * @param path Location of the temporary directory (e.g., "/tmp/temp_dir"). */ withMountedTemp = (path: string): Container => { return new Container({ queryTree: [ ...this._queryTree, { operation: "withMountedTemp", args: { path }, }, ], ctx: this._ctx, }) } /** * Retrieves this container plus a new file written at the given path. * @param path Location of the written file (e.g., "/tmp/file.txt"). * @param opts.contents Content of the file to write (e.g., "Hello world!"). * @param opts.permissions Permission given to the written file (e.g., 0600). * * Default: 0644. * @param opts.owner A user:group to set for the file. * * The user and group can either be an ID (1000:1000) or a name (foo:bar). * * If the group is omitted, it defaults to the same as the user. */ withNewFile = (path: string, opts?: ContainerWithNewFileOpts): Container => { return new Container({ queryTree: [ ...this._queryTree, { operation: "withNewFile", args: { path, ...opts }, }, ], ctx: this._ctx, }) } /** * Retrieves this container with a registry authentication for a given address. * @param address Registry's address to bind the authentication to. * Formatted as [host]/[user]/[repo]:[tag] (e.g. docker.io/dagger/dagger:main). * @param username The username of the registry's account (e.g., "Dagger"). * @param secret The API key, password or token to authenticate to this registry. */ withRegistryAuth = ( address: string, username: string, secret: Secret ): Container => { return new Container({ queryTree: [ ...this._queryTree, { operation: "withRegistryAuth", args: { address, username, secret }, }, ], ctx: this._ctx, }) } /** * Initializes this container from this DirectoryID. */ withRootfs = (directory: Directory): Container => { return new Container({ queryTree: [ ...this._queryTree, { operation: "withRootfs", args: { directory }, }, ], ctx: this._ctx, }) } /** * Retrieves this container plus an env variable containing the given secret. * @param name The name of the secret variable (e.g., "API_SECRET"). * @param secret The identifier of the secret value. */ withSecretVariable = (name: string, secret: Secret): Container => { return new Container({ queryTree: [ ...this._queryTree, { operation: "withSecretVariable", args: { name, secret }, }, ], ctx: this._ctx, }) } /** * Establish a runtime dependency on a service. * * The service will be started automatically when needed and detached when it is * no longer needed, executing the default command if none is set. * * The service will be reachable from the container via the provided hostname alias. * * The service dependency will also convey to any files or directories produced by the container. * @param alias A name that can be used to reach the service from the container * @param service Identifier of the service container */ withServiceBinding = (alias: string, service: Service): Container => { return new Container({ queryTree: [ ...this._queryTree, { operation: "withServiceBinding", args: { alias, service }, }, ], ctx: this._ctx, }) } /** * Retrieves this container plus a socket forwarded to the given Unix socket path. * @param path Location of the forwarded Unix socket (e.g., "/tmp/socket"). * @param source Identifier of the socket to forward. * @param opts.owner A user:group to set for the mounted socket. * * The user and group can either be an ID (1000:1000) or a name (foo:bar). * * If the group is omitted, it defaults to the same as the user. */ withUnixSocket = ( path: string, source: Socket, opts?: ContainerWithUnixSocketOpts ): Container => { return new Container({ queryTree: [ ...this._queryTree, { operation: "withUnixSocket", args: { path, source, ...opts }, }, ], ctx: this._ctx, }) } /** * Retrieves this container with a different command user. * @param name The user to set (e.g., "root"). */ withUser = (name: string): Container => { return new Container({ queryTree: [ ...this._queryTree, { operation: "withUser", args: { name }, }, ], ctx: this._ctx, }) } /** * Retrieves this container with a different working directory. * @param path The path to set as the working directory (e.g., "/app"). */ withWorkdir = (path: string): Container => { return new Container({ queryTree: [ ...this._queryTree, { operation: "withWorkdir", args: { path }, }, ], ctx: this._ctx, }) } /** * Retrieves this container minus the given environment variable. * @param name The name of the environment variable (e.g., "HOST"). */ withoutEnvVariable = (name: string): Container => { return new Container({ queryTree: [ ...this._queryTree, { operation: "withoutEnvVariable", args: { name }, }, ], ctx: this._ctx, }) } /** * Unexpose a previously exposed port. * @param port Port number to unexpose * @param opts.protocol Port protocol to unexpose */ withoutExposedPort = ( port: number, opts?: ContainerWithoutExposedPortOpts ): Container => { const metadata: Metadata = { protocol: { is_enum: true }, } return new Container({ queryTree: [ ...this._queryTree, { operation: "withoutExposedPort", args: { port, ...opts, __metadata: metadata }, }, ], ctx: this._ctx, }) } /** * Indicate that subsequent operations should not be featured more prominently * in the UI. * * This is the initial state of all containers. */ withoutFocus = (): Container => { return new Container({ queryTree: [ ...this._queryTree, { operation: "withoutFocus", }, ], ctx: this._ctx, }) } /** * Retrieves this container minus the given environment label. * @param name The name of the label to remove (e.g., "org.opencontainers.artifact.created"). */ withoutLabel = (name: string): Container => { return new Container({ queryTree: [ ...this._queryTree, { operation: "withoutLabel", args: { name }, }, ], ctx: this._ctx, }) } /** * Retrieves this container after unmounting everything at the given path. * @param path Location of the cache directory (e.g., "/cache/node_modules"). */ withoutMount = (path: string): Container => { return new Container({ queryTree: [ ...this._queryTree, { operation: "withoutMount", args: { path }, }, ], ctx: this._ctx, }) } /** * Retrieves this container without the registry authentication of a given address. * @param address Registry's address to remove the authentication from. * Formatted as [host]/[user]/[repo]:[tag] (e.g. docker.io/dagger/dagger:main). */ withoutRegistryAuth = (address: string): Container => { return new Container({ queryTree: [ ...this._queryTree, { operation: "withoutRegistryAuth", args: { address }, }, ], ctx: this._ctx, }) } /** * Retrieves this container with a previously added Unix socket removed. * @param path Location of the socket to remove (e.g., "/tmp/socket"). */ withoutUnixSocket = (path: string): Container => { return new Container({ queryTree: [ ...this._queryTree, { operation: "withoutUnixSocket", args: { path }, }, ], ctx: this._ctx, }) } /** * Retrieves the working directory for all commands. */ workdir = async (): Promise<string> => { if (this._workdir) { return this._workdir } const response: Awaited<string> = await computeQuery( [ ...this._queryTree, { operation: "workdir", }, ], await this._ctx.connection() ) return response } /** * Call the provided function with current Container. * * This is useful for reusability and readability by not breaking the calling chain. */ with = (arg: (param: Container) => Container) => { return arg(this) } } /** * A directory. */ export class Directory extends BaseClient { private readonly _id?: DirectoryID = undefined private readonly _export?: boolean = undefined private readonly _sync?: DirectoryID = undefined /** * Constructor is used for internal usage only, do not create object from it. */ constructor( parent?: { queryTree?: QueryTree[]; ctx: Context }, _id?: DirectoryID, _export?: boolean, _sync?: DirectoryID ) { super(parent) this._id = _id this._export = _export this._sync = _sync } /** * The content-addressed identifier of the directory. */ id = async (): Promise<DirectoryID> => { if (this._id) { return this._id } const response: Awaited<DirectoryID> = await computeQuery( [ ...this._queryTree, { operation: "id", }, ], await this._ctx.connection() ) return response } /** * Load the directory as a Dagger module * @param opts.sourceSubpath An optional subpath of the directory which contains the module's source * code. * * This is needed when the module code is in a subdirectory but requires * parent directories to be loaded in order to execute. For example, the * module source code may need a go.mod, project.toml, package.json, etc. file * from a parent directory. * * If not set, the module source code is loaded from the root of the * directory. */ asModule = (opts?: DirectoryAsModuleOpts): Module_ => { return new Module_({ queryTree: [ ...this._queryTree, { operation: "asModule", args: { ...opts }, }, ], ctx: this._ctx, }) } /** * Gets the difference between this directory and an another directory. * @param other Identifier of the directory to compare. */ diff = (other: Directory): Directory => { return new Directory({ queryTree: [ ...this._queryTree, { operation: "diff", args: { other }, }, ], ctx: this._ctx, }) } /** * Retrieves a directory at the given path. * @param path Location of the directory to retrieve (e.g., "/src"). */ directory = (path: string): Directory => { return new Directory({ queryTree: [ ...this._queryTree, { operation: "directory", args: { path }, }, ], ctx: this._ctx, }) } /** * Builds a new Docker container from this directory. * @param opts.dockerfile Path to the Dockerfile to use (e.g., "frontend.Dockerfile"). * * Defaults: './Dockerfile'. * @param opts.platform The platform to build. * @param opts.buildArgs Build arguments to use in the build. * @param opts.target Target build stage to build. * @param opts.secrets Secrets to pass to the build. * * They will be mounted at /run/secrets/[secret-name]. */ dockerBuild = (opts?: DirectoryDockerBuildOpts): Container => { return new Container({ queryTree: [ ...this._queryTree, { operation: "dockerBuild", args: { ...opts }, }, ], ctx: this._ctx, }) } /** * Returns a list of files and directories at the given path. * @param opts.path Location of the directory to look at (e.g., "/src"). */ entries = async (opts?: DirectoryEntriesOpts): Promise<string[]> => { const response: Awaited<string[]> = await computeQuery( [ ...this._queryTree, { operation: "entries", args: { ...opts }, }, ], await this._ctx.connection() ) return response } /** * Writes the contents of the directory to a path on the host. * @param path Location of the copied directory (e.g., "logs/"). */ export = async (path: string): Promise<boolean> => { if (this._export) { return this._export } const response: Awaited<boolean> = await computeQuery( [ ...this._queryTree, { operation: "export", args: { path }, }, ], await this._ctx.connection() ) return response } /** * Retrieves a file at the given path. * @param path Location of the file to retrieve (e.g., "README.md"). */ file = (path: string): File => { return new File({ queryTree: [ ...this._queryTree, { operation: "file", args: { path }, }, ], ctx: this._ctx, }) } /** * Returns a list of files and directories that matche the given pattern. * @param pattern Pattern to match (e.g., "*.md"). */ glob = async (pattern: string): Promise<string[]> => { const response: Awaited<string[]> = await computeQuery( [ ...this._queryTree, { operation: "glob", args: { pattern }, }, ], await this._ctx.connection() ) return response } /** * Creates a named sub-pipeline * @param name Pipeline name. * @param opts.description Pipeline description. * @param opts.labels Pipeline labels. */ pipeline = (name: string, opts?: DirectoryPipelineOpts): Directory => { return new Directory({ queryTree: [ ...this._queryTree, { operation: "pipeline", args: { name, ...opts }, }, ], ctx: this._ctx, }) } /** * Force evaluation in the engine. */ sync = async (): Promise<Directory> => { await computeQuery( [ ...this._queryTree, { operation: "sync", }, ], await this._ctx.connection() ) return this } /** * Retrieves this directory plus a directory written at the given path. * @param path Location of the written directory (e.g., "/src/"). * @param directory Identifier of the directory to copy. * @param opts.exclude Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]). * @param opts.include Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]). */ withDirectory = ( path: string, directory: Directory, opts?: DirectoryWithDirectoryOpts ): Directory => { return new Directory({ queryTree: [ ...this._queryTree, { operation: "withDirectory", args: { path, directory, ...opts }, }, ], ctx: this._ctx, }) } /** * Retrieves this directory plus the contents of the given file copied to the given path. * @param path Location of the copied file (e.g., "/file.txt"). * @param source Identifier of the file to copy. * @param opts.permissions Permission given to the copied file (e.g., 0600). * * Default: 0644. */ withFile = ( path: string, source: File, opts?: DirectoryWithFileOpts ): Directory => { return new Directory({ queryTree: [ ...this._queryTree, { operation: "withFile", args: { path, source, ...opts }, }, ], ctx: this._ctx, }) } /** * Retrieves this directory plus a new directory created at the given path. * @param path Location of the directory created (e.g., "/logs"). * @param opts.permissions Permission granted to the created directory (e.g., 0777). * * Default: 0755. */ withNewDirectory = ( path: string, opts?: DirectoryWithNewDirectoryOpts ): Directory => { return new Directory({ queryTree: [ ...this._queryTree, { operation: "withNewDirectory", args: { path, ...opts }, }, ], ctx: this._ctx, }) } /** * Retrieves this directory plus a new file written at the given path. * @param path Location of the written file (e.g., "/file.txt"). * @param contents Content of the written file (e.g., "Hello world!"). * @param opts.permissions Permission given to the copied file (e.g., 0600). * * Default: 0644. */ withNewFile = ( path: string, contents: string, opts?: DirectoryWithNewFileOpts ): Directory => { return new Directory({ queryTree: [ ...this._queryTree, { operation: "withNewFile", args: { path, contents, ...opts }, }, ], ctx: this._ctx, }) } /** * Retrieves this directory with all file/dir timestamps set to the given time. * @param timestamp Timestamp to set dir/files in. * * Formatted in seconds following Unix epoch (e.g., 1672531199). */ withTimestamps = (timestamp: number): Directory => { return new Directory({ queryTree: [ ...this._queryTree, { operation: "withTimestamps", args: { timestamp }, }, ], ctx: this._ctx, }) } /** * Retrieves this directory with the directory at the given path removed. * @param path Location of the directory to remove (e.g., ".github/"). */ withoutDirectory = (path: string): Directory => { return new Directory({ queryTree: [ ...this._queryTree, { operation: "withoutDirectory", args: { path }, }, ], ctx: this._ctx, }) } /** * Retrieves this directory with the file at the given path removed. * @param path Location of the file to remove (e.g., "/file.txt"). */ withoutFile = (path: string): Directory => { return new Directory({ queryTree: [ ...this._queryTree, { operation: "withoutFile", args: { path }, }, ], ctx: this._ctx, }) } /** * Call the provided function with current Directory. * * This is useful for reusability and readability by not breaking the calling chain. */ with = (arg: (param: Directory) => Directory) => { return arg(this) } } /** * A simple key value object that represents an environment variable. */ export class EnvVariable extends BaseClient { private readonly _name?: string = undefined private readonly _value?: string = undefined /** * Constructor is used for internal usage only, do not create object from it. */ constructor( parent?: { queryTree?: QueryTree[]; ctx: Context }, _name?: string, _value?: string ) { super(parent) this._name = _name this._value = _value } /** * The environment variable name. */ name = async (): Promise<string> => { if (this._name) { return this._name } const response: Awaited<string> = await computeQuery( [ ...this._queryTree, { operation: "name", }, ], await this._ctx.connection() ) return response } /** * The environment variable value. */ value = async (): Promise<string> => { if (this._value) { return this._value } const response: Awaited<string> = await computeQuery( [ ...this._queryTree, { operation: "value", }, ], await this._ctx.connection() ) return response } } /** * A definition of a field on a custom object defined in a Module. * A field on an object has a static value, as opposed to a function on an * object whose value is computed by invoking code (and can accept arguments). */ export class FieldTypeDef extends BaseClient { private readonly _description?: string = undefined private readonly _name?: string = undefined /** * Constructor is used for internal usage only, do not create object from it. */ constructor( parent?: { queryTree?: QueryTree[]; ctx: Context }, _description?: string, _name?: string ) { super(parent) this._description = _description this._name = _name } /** * A doc string for the field, if any */ description = async (): Promise<string> => { if (this._description) { return this._description } const response: Awaited<string> = await computeQuery( [ ...this._queryTree, { operation: "description", }, ], await this._ctx.connection() ) return response } /** * The name of the field in the object */ name = async (): Promise<string> => { if (this._name) { return this._name } const response: Awaited<string> = await computeQuery( [ ...this._queryTree, { operation: "name", }, ], await this._ctx.connection() ) return response } /** * The type of the field */ typeDef = (): TypeDef => { return new TypeDef({ queryTree: [ ...this._queryTree, { operation: "typeDef", }, ], ctx: this._ctx, }) } } /** * A file. */ export class File extends BaseClient { private readonly _id?: FileID = undefined private readonly _contents?: string = undefined private readonly _export?: boolean = undefined private readonly _size?: number = undefined private readonly _sync?: FileID = undefined /** * Constructor is used for internal usage only, do not create object from it. */ constructor( parent?: { queryTree?: QueryTree[]; ctx: Context }, _id?: FileID, _contents?: string, _export?: boolean, _size?: number, _sync?: FileID ) { super(parent) this._id = _id this._contents = _contents this._export = _export this._size = _size this._sync = _sync } /** * Retrieves the content-addressed identifier of the file. */ id = async (): Promise<FileID> => { if (this._id) { return this._id } const response: Awaited<FileID> = await computeQuery( [ ...this._queryTree, { operation: "id", }, ], await this._ctx.connection() ) return response } /** * Retrieves the contents of the file. */ contents = async (): Promise<string> => { if (this._contents) { return this._contents } const response: Awaited<string> = await computeQuery( [ ...this._queryTree, { operation: "contents", }, ], await this._ctx.connection() ) return response } /** * Writes the file to a file path on the host. * @param path Location of the written directory (e.g., "output.txt"). * @param opts.allowParentDirPath If allowParentDirPath is true, the path argument can be a directory path, in which case * the file will be created in that directory. */ export = async (path: string, opts?: FileExportOpts): Promise<boolean> => { if (this._export) { return this._export } const response: Awaited<boolean> = await computeQuery( [ ...this._queryTree, { operation: "export", args: { path, ...opts }, }, ], await this._ctx.connection() ) return response } /** * Gets the size of the file, in bytes. */ size = async (): Promise<number> => { if (this._size) { return this._size } const response: Awaited<number> = await computeQuery( [ ...this._queryTree, { operation: "size", }, ], await this._ctx.connection() ) return response } /** * Force evaluation in the engine. */ sync = async (): Promise<File> => { await computeQuery( [ ...this._queryTree, { operation: "sync", }, ], await this._ctx.connection() ) return this } /** * Retrieves this file with its created/modified timestamps set to the given time. * @param timestamp Timestamp to set dir/files in. * * Formatted in seconds following Unix epoch (e.g., 1672531199). */ withTimestamps = (timestamp: number): File => { return new File({ queryTree: [ ...this._queryTree, { operation: "withTimestamps", args: { timestamp }, }, ], ctx: this._ctx, }) } /** * Call the provided function with current File. * * This is useful for reusability and readability by not breaking the calling chain. */ with = (arg: (param: File) => File) => { return arg(this) } } /** * Function represents a resolver provided by a Module. * * A function always evaluates against a parent object and is given a set of * named arguments. */ export class Function_ extends BaseClient { private readonly _id?: FunctionID = undefined private readonly _description?: string = undefined private readonly _name?: string = undefined /** * Constructor is used for internal usage only, do not create object from it. */ constructor( parent?: { queryTree?: QueryTree[]; ctx: Context }, _id?: FunctionID, _description?: string, _name?: string ) { super(parent) this._id = _id this._description = _description this._name = _name } /** * The ID of the function */ id = async (): Promise<FunctionID> => { if (this._id) { return this._id } const response: Awaited<FunctionID> = await computeQuery( [ ...this._queryTree, { operation: "id", }, ], await this._ctx.connection() ) return response } /** * Arguments accepted by this function, if any */ args = async (): Promise<FunctionArg[]> => { type args = { id: FunctionArgID } const response: Awaited<args[]> = await computeQuery( [ ...this._queryTree, { operation: "args", }, { operation: "id", }, ], await this._ctx.connection() ) return response.map( (r) => new FunctionArg( { queryTree: this.queryTree, ctx: this._ctx, }, r.id ) ) } /** * A doc string for the function, if any */ description = async (): Promise<string> => { if (this._description) { return this._description } const response: Awaited<string> = await computeQuery( [ ...this._queryTree, { operation: "description", }, ], await this._ctx.connection() ) return response } /** * The name of the function */ name = async (): Promise<string> => { if (this._name) { return this._name } const response: Awaited<string> = await computeQuery( [ ...this._queryTree, { operation: "name", }, ], await this._ctx.connection() ) return response } /** * The type returned by this function */ returnType = (): TypeDef => { return new TypeDef({ queryTree: [ ...this._queryTree, { operation: "returnType", }, ], ctx: this._ctx, }) } /** * Returns the function with the provided argument * @param name The name of the argument * @param typeDef The type of the argument * @param opts.description A doc string for the argument, if any * @param opts.defaultValue A default value to use for this argument if not explicitly set by the caller, if any */ withArg = ( name: string, typeDef: TypeDef, opts?: FunctionWithArgOpts ): Function_ => { return new Function_({ queryTree: [ ...this._queryTree, { operation: "withArg", args: { name, typeDef, ...opts }, }, ], ctx: this._ctx, }) } /** * Returns the function with the doc string */ withDescription = (description: string): Function_ => { return new Function_({ queryTree: [ ...this._queryTree, { operation: "withDescription", args: { description }, }, ], ctx: this._ctx, }) } /** * Call the provided function with current Function. * * This is useful for reusability and readability by not breaking the calling chain. */ with = (arg: (param: Function_) => Function_) => { return arg(this) } } /** * An argument accepted by a function. * * This is a specification for an argument at function definition time, not an * argument passed at function call time. */ export class FunctionArg extends BaseClient { private readonly _id?: FunctionArgID = undefined private readonly _defaultValue?: JSON = undefined private readonly _description?: string = undefined private readonly _name?: string = undefined /** * Constructor is used for internal usage only, do not create object from it. */ constructor( parent?: { queryTree?: QueryTree[]; ctx: Context }, _id?: FunctionArgID, _defaultValue?: JSON, _description?: string, _name?: string ) { super(parent) this._id = _id this._defaultValue = _defaultValue this._description = _description this._name = _name } /** * The ID of the argument */ id = async (): Promise<FunctionArgID> => { if (this._id) { return this._id } const response: Awaited<FunctionArgID> = await computeQuery( [ ...this._queryTree, { operation: "id", }, ], await this._ctx.connection() ) return response } /** * A default value to use for this argument when not explicitly set by the caller, if any */ defaultValue = async (): Promise<JSON> => { if (this._defaultValue) { return this._defaultValue } const response: Awaited<JSON> = await computeQuery( [ ...this._queryTree, { operation: "defaultValue", }, ], await this._ctx.connection() ) return response } /** * A doc string for the argument, if any */ description = async (): Promise<string> => { if (this._description) { return this._description } const response: Awaited<string> = await computeQuery( [ ...this._queryTree, { operation: "description", }, ], await this._ctx.connection() ) return response } /** * The name of the argument */ name = async (): Promise<string> => { if (this._name) { return this._name } const response: Awaited<string> = await computeQuery( [ ...this._queryTree, { operation: "name", }, ], await this._ctx.connection() ) return response } /** * The type of the argument */ typeDef = (): TypeDef => { return new TypeDef({ queryTree: [ ...this._queryTree, { operation: "typeDef", }, ], ctx: this._ctx, }) } } export class FunctionCall extends BaseClient { private readonly _name?: string = undefined private readonly _parent?: JSON = undefined private readonly _parentName?: string = undefined private readonly _returnValue?: Void = undefined /** * Constructor is used for internal usage only, do not create object from it. */ constructor( parent?: { queryTree?: QueryTree[]; ctx: Context }, _name?: string, _parent?: JSON, _parentName?: string, _returnValue?: Void ) { super(parent) this._name = _name this._parent = _parent this._parentName = _parentName this._returnValue = _returnValue } /** * The argument values the function is being invoked with. */ inputArgs = async (): Promise<FunctionCallArgValue[]> => { type inputArgs = { name: string value: JSON } const response: Awaited<inputArgs[]> = await computeQuery( [ ...this._queryTree, { operation: "inputArgs", }, { operation: "name value", }, ], await this._ctx.connection() ) return response.map( (r) => new FunctionCallArgValue( { queryTree: this.queryTree, ctx: this._ctx, }, r.name, r.value ) ) } /** * The name of the function being called. */ name = async (): Promise<string> => { if (this._name) { return this._name } const response: Awaited<string> = await computeQuery( [ ...this._queryTree, { operation: "name", }, ], await this._ctx.connection() ) return response } /** * The value of the parent object of the function being called. * If the function is "top-level" to the module, this is always an empty object. */ parent = async (): Promise<JSON> => { if (this._parent) { return this._parent } const response: Awaited<JSON> = await computeQuery( [ ...this._queryTree, { operation: "parent", }, ], await this._ctx.connection() ) return response } /** * The name of the parent object of the function being called. * If the function is "top-level" to the module, this is the name of the module. */ parentName = async (): Promise<string> => { if (this._parentName) { return this._parentName } const response: Awaited<string> = await computeQuery( [ ...this._queryTree, { operation: "parentName", }, ], await this._ctx.connection() ) return response } /** * Set the return value of the function call to the provided value. * The value should be a string of the JSON serialization of the return value. */ returnValue = async (value: JSON): Promise<Void> => { if (this._returnValue) { return this._returnValue } const response: Awaited<Void> = await computeQuery( [ ...this._queryTree, { operation: "returnValue", args: { value }, }, ], await this._ctx.connection() ) return response } } export class FunctionCallArgValue extends BaseClient { private readonly _name?: string = undefined private readonly _value?: JSON = undefined /** * Constructor is used for internal usage only, do not create object from it. */ constructor( parent?: { queryTree?: QueryTree[]; ctx: Context }, _name?: string, _value?: JSON ) { super(parent) this._name = _name this._value = _value } /** * The name of the argument. */ name = async (): Promise<string> => { if (this._name) { return this._name } const response: Awaited<string> = await computeQuery( [ ...this._queryTree, { operation: "name", }, ], await this._ctx.connection() ) return response } /** * The value of the argument represented as a string of the JSON serialization. */ value = async (): Promise<JSON> => { if (this._value) { return this._value } const response: Awaited<JSON> = await computeQuery( [ ...this._queryTree, { operation: "value", }, ], await this._ctx.connection() ) return response } } export class GeneratedCode extends BaseClient { private readonly _id?: GeneratedCodeID = undefined /** * Constructor is used for internal usage only, do not create object from it. */ constructor( parent?: { queryTree?: QueryTree[]; ctx: Context }, _id?: GeneratedCodeID ) { super(parent) this._id = _id } id = async (): Promise<GeneratedCodeID> => { if (this._id) { return this._id } const response: Awaited<GeneratedCodeID> = await computeQuery( [ ...this._queryTree, { operation: "id", }, ], await this._ctx.connection() ) return response } /** * The directory containing the generated code */ code = (): Directory => { return new Directory({ queryTree: [ ...this._queryTree, { operation: "code", }, ], ctx: this._ctx, }) } /** * List of paths to mark generated in version control (i.e. .gitattributes) */ vcsGeneratedPaths = async (): Promise<string[]> => { const response: Awaited<string[]> = await computeQuery( [ ...this._queryTree, { operation: "vcsGeneratedPaths", }, ], await this._ctx.connection() ) return response } /** * List of paths to ignore in version control (i.e. .gitignore) */ vcsIgnoredPaths = async (): Promise<string[]> => { const response: Awaited<string[]> = await computeQuery( [ ...this._queryTree, { operation: "vcsIgnoredPaths", }, ], await this._ctx.connection() ) return response } /** * Set the list of paths to mark generated in version control */ withVCSGeneratedPaths = (paths: string[]): GeneratedCode => { return new GeneratedCode({ queryTree: [ ...this._queryTree, { operation: "withVCSGeneratedPaths", args: { paths }, }, ], ctx: this._ctx, }) } /** * Set the list of paths to ignore in version control */ withVCSIgnoredPaths = (paths: string[]): GeneratedCode => { return new GeneratedCode({ queryTree: [ ...this._queryTree, { operation: "withVCSIgnoredPaths", args: { paths }, }, ], ctx: this._ctx, }) } /** * Call the provided function with current GeneratedCode. * * This is useful for reusability and readability by not breaking the calling chain. */ with = (arg: (param: GeneratedCode) => GeneratedCode) => { return arg(this) } } /** * A git ref (tag, branch or commit). */ export class GitRef extends BaseClient { private readonly _id?: GitRefID = undefined private readonly _commit?: string = undefined /** * Constructor is used for internal usage only, do not create object from it. */ constructor( parent?: { queryTree?: QueryTree[]; ctx: Context }, _id?: GitRefID, _commit?: string ) { super(parent) this._id = _id this._commit = _commit } /** * Retrieves the content-addressed identifier of the git ref. */ id = async (): Promise<GitRefID> => { if (this._id) { return this._id } const response: Awaited<GitRefID> = await computeQuery( [ ...this._queryTree, { operation: "id", }, ], await this._ctx.connection() ) return response } /** * The resolved commit id at this ref. */ commit = async (): Promise<string> => { if (this._commit) { return this._commit } const response: Awaited<string> = await computeQuery( [ ...this._queryTree, { operation: "commit", }, ], await this._ctx.connection() ) return response } /** * The filesystem tree at this ref. */ tree = (opts?: GitRefTreeOpts): Directory => { return new Directory({ queryTree: [ ...this._queryTree, { operation: "tree", args: { ...opts }, }, ], ctx: this._ctx, }) } } /** * A git repository. */ export class GitRepository extends BaseClient { private readonly _id?: GitRepositoryID = undefined /** * Constructor is used for internal usage only, do not create object from it. */ constructor( parent?: { queryTree?: QueryTree[]; ctx: Context }, _id?: GitRepositoryID ) { super(parent) this._id = _id } /** * Retrieves the content-addressed identifier of the git repository. */ id = async (): Promise<GitRepositoryID> => { if (this._id) { return this._id } const response: Awaited<GitRepositoryID> = await computeQuery( [ ...this._queryTree, { operation: "id", }, ], await this._ctx.connection() ) return response } /** * Returns details on one branch. * @param name Branch's name (e.g., "main"). */ branch = (name: string): GitRef => { return new GitRef({ queryTree: [ ...this._queryTree, { operation: "branch", args: { name }, }, ], ctx: this._ctx, }) } /** * Returns details on one commit. * @param id Identifier of the commit (e.g., "b6315d8f2810962c601af73f86831f6866ea798b"). */ commit = (id: string): GitRef => { return new GitRef({ queryTree: [ ...this._queryTree, { operation: "commit", args: { id }, }, ], ctx: this._ctx, }) } /** * Returns details on one tag. * @param name Tag's name (e.g., "v0.3.9"). */ tag = (name: string): GitRef => { return new GitRef({ queryTree: [ ...this._queryTree, { operation: "tag", args: { name }, }, ], ctx: this._ctx, }) } } /** * Information about the host execution environment. */ export class Host extends BaseClient { /** * Constructor is used for internal usage only, do not create object from it. */ constructor(parent?: { queryTree?: QueryTree[]; ctx: Context }) { super(parent) } /** * Accesses a directory on the host. * @param path Location of the directory to access (e.g., "."). * @param opts.exclude Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]). * @param opts.include Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]). */ directory = (path: string, opts?: HostDirectoryOpts): Directory => { return new Directory({ queryTree: [ ...this._queryTree, { operation: "directory", args: { path, ...opts }, }, ], ctx: this._ctx, }) } /** * Accesses a file on the host. * @param path Location of the file to retrieve (e.g., "README.md"). */ file = (path: string): File => { return new File({ queryTree: [ ...this._queryTree, { operation: "file", args: { path }, }, ], ctx: this._ctx, }) } /** * Creates a service that forwards traffic to a specified address via the host. * @param ports Ports to expose via the service, forwarding through the host network. * * If a port's frontend is unspecified or 0, it defaults to the same as the * backend port. * * An empty set of ports is not valid; an error will be returned. * @param opts.host Upstream host to forward traffic to. */ service = (ports: PortForward[], opts?: HostServiceOpts): Service => { return new Service({ queryTree: [ ...this._queryTree, { operation: "service", args: { ports, ...opts }, }, ], ctx: this._ctx, }) } /** * Sets a secret given a user-defined name and the file path on the host, and returns the secret. * The file is limited to a size of 512000 bytes. * @param name The user defined name for this secret. * @param path Location of the file to set as a secret. */ setSecretFile = (name: string, path: string): Secret => { return new Secret({ queryTree: [ ...this._queryTree, { operation: "setSecretFile", args: { name, path }, }, ], ctx: this._ctx, }) } /** * Creates a tunnel that forwards traffic from the host to a service. * @param service Service to send traffic from the tunnel. * @param opts.native Map each service port to the same port on the host, as if the service were * running natively. * * Note: enabling may result in port conflicts. * @param opts.ports Configure explicit port forwarding rules for the tunnel. * * If a port's frontend is unspecified or 0, a random port will be chosen by * the host. * * If no ports are given, all of the service's ports are forwarded. If native * is true, each port maps to the same port on the host. If native is false, * each port maps to a random port chosen by the host. * * If ports are given and native is true, the ports are additive. */ tunnel = (service: Service, opts?: HostTunnelOpts): Service => { return new Service({ queryTree: [ ...this._queryTree, { operation: "tunnel", args: { service, ...opts }, }, ], ctx: this._ctx, }) } /** * Accesses a Unix socket on the host. * @param path Location of the Unix socket (e.g., "/var/run/docker.sock"). */ unixSocket = (path: string): Socket => { return new Socket({ queryTree: [ ...this._queryTree, { operation: "unixSocket", args: { path }, }, ], ctx: this._ctx, }) } } /** * A simple key value object that represents a label. */ export class Label extends BaseClient { private readonly _name?: string = undefined private readonly _value?: string = undefined /** * Constructor is used for internal usage only, do not create object from it. */ constructor( parent?: { queryTree?: QueryTree[]; ctx: Context }, _name?: string, _value?: string ) { super(parent) this._name = _name this._value = _value } /** * The label name. */ name = async (): Promise<string> => { if (this._name) { return this._name } const response: Awaited<string> = await computeQuery( [ ...this._queryTree, { operation: "name", }, ], await this._ctx.connection() ) return response } /** * The label value. */ value = async (): Promise<string> => { if (this._value) { return this._value } const response: Awaited<string> = await computeQuery( [ ...this._queryTree, { operation: "value", }, ], await this._ctx.connection() ) return response } } /** * A definition of a list type in a Module. */ export class ListTypeDef extends BaseClient { /** * Constructor is used for internal usage only, do not create object from it. */ constructor(parent?: { queryTree?: QueryTree[]; ctx: Context }) { super(parent) } /** * The type of the elements in the list */ elementTypeDef = (): TypeDef => { return new TypeDef({ queryTree: [ ...this._queryTree, { operation: "elementTypeDef", }, ], ctx: this._ctx, }) } } export class Module_ extends BaseClient { private readonly _id?: ModuleID = undefined private readonly _description?: string = undefined private readonly _name?: string = undefined private readonly _sdk?: string = undefined private readonly _serve?: Void = undefined private readonly _sourceDirectorySubPath?: string = undefined /** * Constructor is used for internal usage only, do not create object from it. */ constructor( parent?: { queryTree?: QueryTree[]; ctx: Context }, _id?: ModuleID, _description?: string, _name?: string, _sdk?: string, _serve?: Void, _sourceDirectorySubPath?: string ) { super(parent) this._id = _id this._description = _description this._name = _name this._sdk = _sdk this._serve = _serve this._sourceDirectorySubPath = _sourceDirectorySubPath } /** * The ID of the module */ id = async (): Promise<ModuleID> => { if (this._id) { return this._id } const response: Awaited<ModuleID> = await computeQuery( [ ...this._queryTree, { operation: "id", }, ], await this._ctx.connection() ) return response } /** * Modules used by this module */ dependencies = async (): Promise<Module_[]> => { type dependencies = { id: ModuleID } const response: Awaited<dependencies[]> = await computeQuery( [ ...this._queryTree, { operation: "dependencies", }, { operation: "id", }, ], await this._ctx.connection() ) return response.map( (r) => new Module_( { queryTree: this.queryTree, ctx: this._ctx, }, r.id ) ) } /** * The dependencies as configured by the module */ dependencyConfig = async (): Promise<string[]> => { const response: Awaited<string[]> = await computeQuery( [ ...this._queryTree, { operation: "dependencyConfig", }, ], await this._ctx.connection() ) return response } /** * The doc string of the module, if any */ description = async (): Promise<string> => { if (this._description) { return this._description } const response: Awaited<string> = await computeQuery( [ ...this._queryTree, { operation: "description", }, ], await this._ctx.connection() ) return response } /** * The code generated by the SDK's runtime */ generatedCode = (): GeneratedCode => { return new GeneratedCode({ queryTree: [ ...this._queryTree, { operation: "generatedCode", }, ], ctx: this._ctx, }) } /** * The name of the module */ name = async (): Promise<string> => { if (this._name) { return this._name } const response: Awaited<string> = await computeQuery( [ ...this._queryTree, { operation: "name", }, ], await this._ctx.connection() ) return response } /** * Objects served by this module */ objects = async (): Promise<TypeDef[]> => { type objects = { id: TypeDefID } const response: Awaited<objects[]> = await computeQuery( [ ...this._queryTree, { operation: "objects", }, { operation: "id", }, ], await this._ctx.connection() ) return response.map( (r) => new TypeDef( { queryTree: this.queryTree, ctx: this._ctx, }, r.id ) ) } /** * The SDK used by this module. Either a name of a builtin SDK or a module ref pointing to the SDK's implementation. */ sdk = async (): Promise<string> => { if (this._sdk) { return this._sdk } const response: Awaited<string> = await computeQuery( [ ...this._queryTree, { operation: "sdk", }, ], await this._ctx.connection() ) return response } /** * Serve a module's API in the current session. * Note: this can only be called once per session. * In the future, it could return a stream or service to remove the side effect. */ serve = async (): Promise<Void> => { if (this._serve) { return this._serve } const response: Awaited<Void> = await computeQuery( [ ...this._queryTree, { operation: "serve", }, ], await this._ctx.connection() ) return response } /** * The directory containing the module's source code */ sourceDirectory = (): Directory => { return new Directory({ queryTree: [ ...this._queryTree, { operation: "sourceDirectory", }, ], ctx: this._ctx, }) } /** * The module's subpath within the source directory */ sourceDirectorySubPath = async (): Promise<string> => { if (this._sourceDirectorySubPath) { return this._sourceDirectorySubPath } const response: Awaited<string> = await computeQuery( [ ...this._queryTree, { operation: "sourceDirectorySubPath", }, ], await this._ctx.connection() ) return response } /** * This module plus the given Object type and associated functions */ withObject = (object: TypeDef): Module_ => { return new Module_({ queryTree: [ ...this._queryTree, { operation: "withObject", args: { object }, }, ], ctx: this._ctx, }) } /** * Call the provided function with current Module. * * This is useful for reusability and readability by not breaking the calling chain. */ with = (arg: (param: Module_) => Module_) => { return arg(this) } } /** * Static configuration for a module (e.g. parsed contents of dagger.json) */ export class ModuleConfig extends BaseClient { private readonly _name?: string = undefined private readonly _root?: string = undefined private readonly _sdk?: string = undefined /** * Constructor is used for internal usage only, do not create object from it. */ constructor( parent?: { queryTree?: QueryTree[]; ctx: Context }, _name?: string, _root?: string, _sdk?: string ) { super(parent) this._name = _name this._root = _root this._sdk = _sdk } /** * Modules that this module depends on. */ dependencies = async (): Promise<string[]> => { const response: Awaited<string[]> = await computeQuery( [ ...this._queryTree, { operation: "dependencies", }, ], await this._ctx.connection() ) return response } /** * Exclude these file globs when loading the module root. */ exclude = async (): Promise<string[]> => { const response: Awaited<string[]> = await computeQuery( [ ...this._queryTree, { operation: "exclude", }, ], await this._ctx.connection() ) return response } /** * Include only these file globs when loading the module root. */ include = async (): Promise<string[]> => { const response: Awaited<string[]> = await computeQuery( [ ...this._queryTree, { operation: "include", }, ], await this._ctx.connection() ) return response } /** * The name of the module. */ name = async (): Promise<string> => { if (this._name) { return this._name } const response: Awaited<string> = await computeQuery( [ ...this._queryTree, { operation: "name", }, ], await this._ctx.connection() ) return response } /** * The root directory of the module's project, which may be above the module source code. */ root = async (): Promise<string> => { if (this._root) { return this._root } const response: Awaited<string> = await computeQuery( [ ...this._queryTree, { operation: "root", }, ], await this._ctx.connection() ) return response } /** * Either the name of a built-in SDK ('go', 'python', etc.) OR a module reference pointing to the SDK's module implementation. */ sdk = async (): Promise<string> => { if (this._sdk) { return this._sdk } const response: Awaited<string> = await computeQuery( [ ...this._queryTree, { operation: "sdk", }, ], await this._ctx.connection() ) return response } } /** * A definition of a custom object defined in a Module. */ export class ObjectTypeDef extends BaseClient { private readonly _description?: string = undefined private readonly _name?: string = undefined /** * Constructor is used for internal usage only, do not create object from it. */ constructor( parent?: { queryTree?: QueryTree[]; ctx: Context }, _description?: string, _name?: string ) { super(parent) this._description = _description this._name = _name } /** * The function used to construct new instances of this object, if any */ constructor_ = (): Function_ => { return new Function_({ queryTree: [ ...this._queryTree, { operation: "constructor", }, ], ctx: this._ctx, }) } /** * The doc string for the object, if any */ description = async (): Promise<string> => { if (this._description) { return this._description } const response: Awaited<string> = await computeQuery( [ ...this._queryTree, { operation: "description", }, ], await this._ctx.connection() ) return response } /** * Static fields defined on this object, if any */ fields = async (): Promise<FieldTypeDef[]> => { type fields = { description: string name: string } const response: Awaited<fields[]> = await computeQuery( [ ...this._queryTree, { operation: "fields", }, { operation: "description name", }, ], await this._ctx.connection() ) return response.map( (r) => new FieldTypeDef( { queryTree: this.queryTree, ctx: this._ctx, }, r.description, r.name ) ) } /** * Functions defined on this object, if any */ functions = async (): Promise<Function_[]> => { type functions = { id: FunctionID } const response: Awaited<functions[]> = await computeQuery( [ ...this._queryTree, { operation: "functions", }, { operation: "id", }, ], await this._ctx.connection() ) return response.map( (r) => new Function_( { queryTree: this.queryTree, ctx: this._ctx, }, r.id ) ) } /** * The name of the object */ name = async (): Promise<string> => { if (this._name) { return this._name } const response: Awaited<string> = await computeQuery( [ ...this._queryTree, { operation: "name", }, ], await this._ctx.connection() ) return response } } /** * A port exposed by a container. */ export class Port extends BaseClient { private readonly _description?: string = undefined private readonly _port?: number = undefined private readonly _protocol?: NetworkProtocol = undefined /** * Constructor is used for internal usage only, do not create object from it. */ constructor( parent?: { queryTree?: QueryTree[]; ctx: Context }, _description?: string, _port?: number, _protocol?: NetworkProtocol ) { super(parent) this._description = _description this._port = _port this._protocol = _protocol } /** * The port description. */ description = async (): Promise<string> => { if (this._description) { return this._description } const response: Awaited<string> = await computeQuery( [ ...this._queryTree, { operation: "description", }, ], await this._ctx.connection() ) return response } /** * The port number. */ port = async (): Promise<number> => { if (this._port) { return this._port } const response: Awaited<number> = await computeQuery( [ ...this._queryTree, { operation: "port", }, ], await this._ctx.connection() ) return response } /** * The transport layer network protocol. */ protocol = async (): Promise<NetworkProtocol> => { if (this._protocol) { return this._protocol } const response: Awaited<NetworkProtocol> = await computeQuery( [ ...this._queryTree, { operation: "protocol", }, ], await this._ctx.connection() ) return response } } export class Client extends BaseClient { private readonly _checkVersionCompatibility?: boolean = undefined private readonly _defaultPlatform?: Platform = undefined /** * Constructor is used for internal usage only, do not create object from it. */ constructor( parent?: { queryTree?: QueryTree[]; ctx: Context }, _checkVersionCompatibility?: boolean, _defaultPlatform?: Platform ) { super(parent) this._checkVersionCompatibility = _checkVersionCompatibility this._defaultPlatform = _defaultPlatform } /** * Constructs a cache volume for a given cache key. * @param key A string identifier to target this cache volume (e.g., "modules-cache"). */ cacheVolume = (key: string): CacheVolume => { return new CacheVolume({ queryTree: [ ...this._queryTree, { operation: "cacheVolume", args: { key }, }, ], ctx: this._ctx, }) } /** * Checks if the current Dagger Engine is compatible with an SDK's required version. * @param version The SDK's required version. */ checkVersionCompatibility = async (version: string): Promise<boolean> => { const response: Awaited<boolean> = await computeQuery( [ ...this._queryTree, { operation: "checkVersionCompatibility", args: { version }, }, ], await this._ctx.connection() ) return response } /** * Creates a scratch container or loads one by ID. * * Optional platform argument initializes new containers to execute and publish * as that platform. Platform defaults to that of the builder's host. */ container = (opts?: ClientContainerOpts): Container => { return new Container({ queryTree: [ ...this._queryTree, { operation: "container", args: { ...opts }, }, ], ctx: this._ctx, }) } /** * The FunctionCall context that the SDK caller is currently executing in. * If the caller is not currently executing in a function, this will return * an error. */ currentFunctionCall = (): FunctionCall => { return new FunctionCall({ queryTree: [ ...this._queryTree, { operation: "currentFunctionCall", }, ], ctx: this._ctx, }) } /** * The module currently being served in the session, if any. */ currentModule = (): Module_ => { return new Module_({ queryTree: [ ...this._queryTree, { operation: "currentModule", }, ], ctx: this._ctx, }) } /** * The default platform of the builder. */ defaultPlatform = async (): Promise<Platform> => { const response: Awaited<Platform> = await computeQuery( [ ...this._queryTree, { operation: "defaultPlatform", }, ], await this._ctx.connection() ) return response } /** * Creates an empty directory or loads one by ID. */ directory = (opts?: ClientDirectoryOpts): Directory => { return new Directory({ queryTree: [ ...this._queryTree, { operation: "directory", args: { ...opts }, }, ], ctx: this._ctx, }) } /** * Loads a file by ID. * @deprecated Use loadFileFromID instead. */ file = (id: FileID): File => { return new File({ queryTree: [ ...this._queryTree, { operation: "file", args: { id }, }, ], ctx: this._ctx, }) } /** * Create a function. */ function_ = (name: string, returnType: TypeDef): Function_ => { return new Function_({ queryTree: [ ...this._queryTree, { operation: "function", args: { name, returnType }, }, ], ctx: this._ctx, }) } /** * Create a code generation result, given a directory containing the generated * code. */ generatedCode = (code: Directory): GeneratedCode => { return new GeneratedCode({ queryTree: [ ...this._queryTree, { operation: "generatedCode", args: { code }, }, ], ctx: this._ctx, }) } /** * Queries a git repository. * @param url Url of the git repository. * Can be formatted as `https://{host}/{owner}/{repo}`, `git@{host}:{owner}/{repo}` * Suffix ".git" is optional. * @param opts.keepGitDir Set to true to keep .git directory. * @param opts.sshKnownHosts Set SSH known hosts * @param opts.sshAuthSocket Set SSH auth socket * @param opts.experimentalServiceHost A service which must be started before the repo is fetched. */ git = (url: string, opts?: ClientGitOpts): GitRepository => { return new GitRepository({ queryTree: [ ...this._queryTree, { operation: "git", args: { url, ...opts }, }, ], ctx: this._ctx, }) } /** * Queries the host environment. */ host = (): Host => { return new Host({ queryTree: [ ...this._queryTree, { operation: "host", }, ], ctx: this._ctx, }) } /** * Returns a file containing an http remote url content. * @param url HTTP url to get the content from (e.g., "https://docs.dagger.io"). * @param opts.experimentalServiceHost A service which must be started before the URL is fetched. */ http = (url: string, opts?: ClientHttpOpts): File => { return new File({ queryTree: [ ...this._queryTree, { operation: "http", args: { url, ...opts }, }, ], ctx: this._ctx, }) } /** * Load a CacheVolume from its ID. */ loadCacheVolumeFromID = (id: CacheVolumeID): CacheVolume => { return new CacheVolume({ queryTree: [ ...this._queryTree, { operation: "loadCacheVolumeFromID", args: { id }, }, ], ctx: this._ctx, }) } /** * Loads a container from an ID. */ loadContainerFromID = (id: ContainerID): Container => { return new Container({ queryTree: [ ...this._queryTree, { operation: "loadContainerFromID", args: { id }, }, ], ctx: this._ctx, }) } /** * Load a Directory from its ID. */ loadDirectoryFromID = (id: DirectoryID): Directory => { return new Directory({ queryTree: [ ...this._queryTree, { operation: "loadDirectoryFromID", args: { id }, }, ], ctx: this._ctx, }) } /** * Load a File from its ID. */ loadFileFromID = (id: FileID): File => { return new File({ queryTree: [ ...this._queryTree, { operation: "loadFileFromID", args: { id }, }, ], ctx: this._ctx, }) } /** * Load a function argument by ID. */ loadFunctionArgFromID = (id: FunctionArgID): FunctionArg => { return new FunctionArg({ queryTree: [ ...this._queryTree, { operation: "loadFunctionArgFromID", args: { id }, }, ], ctx: this._ctx, }) } /** * Load a function by ID. */ loadFunctionFromID = (id: FunctionID): Function_ => { return new Function_({ queryTree: [ ...this._queryTree, { operation: "loadFunctionFromID", args: { id }, }, ], ctx: this._ctx, }) } /** * Load a GeneratedCode by ID. */ loadGeneratedCodeFromID = (id: GeneratedCodeID): GeneratedCode => { return new GeneratedCode({ queryTree: [ ...this._queryTree, { operation: "loadGeneratedCodeFromID", args: { id }, }, ], ctx: this._ctx, }) } /** * Load a git ref from its ID. */ loadGitRefFromID = (id: GitRefID): GitRef => { return new GitRef({ queryTree: [ ...this._queryTree, { operation: "loadGitRefFromID", args: { id }, }, ], ctx: this._ctx, }) } /** * Load a git repository from its ID. */ loadGitRepositoryFromID = (id: GitRepositoryID): GitRepository => { return new GitRepository({ queryTree: [ ...this._queryTree, { operation: "loadGitRepositoryFromID", args: { id }, }, ], ctx: this._ctx, }) } /** * Load a module by ID. */ loadModuleFromID = (id: ModuleID): Module_ => { return new Module_({ queryTree: [ ...this._queryTree, { operation: "loadModuleFromID", args: { id }, }, ], ctx: this._ctx, }) } /** * Load a Secret from its ID. */ loadSecretFromID = (id: SecretID): Secret => { return new Secret({ queryTree: [ ...this._queryTree, { operation: "loadSecretFromID", args: { id }, }, ], ctx: this._ctx, }) } /** * Loads a service from ID. */ loadServiceFromID = (id: ServiceID): Service => { return new Service({ queryTree: [ ...this._queryTree, { operation: "loadServiceFromID", args: { id }, }, ], ctx: this._ctx, }) } /** * Load a Socket from its ID. */ loadSocketFromID = (id: SocketID): Socket => { return new Socket({ queryTree: [ ...this._queryTree, { operation: "loadSocketFromID", args: { id }, }, ], ctx: this._ctx, }) } /** * Load a TypeDef by ID. */ loadTypeDefFromID = (id: TypeDefID): TypeDef => { return new TypeDef({ queryTree: [ ...this._queryTree, { operation: "loadTypeDefFromID", args: { id }, }, ], ctx: this._ctx, }) } /** * Create a new module. */ module_ = (): Module_ => { return new Module_({ queryTree: [ ...this._queryTree, { operation: "module", }, ], ctx: this._ctx, }) } /** * Load the static configuration for a module from the given source directory and optional subpath. */ moduleConfig = ( sourceDirectory: Directory, opts?: ClientModuleConfigOpts ): ModuleConfig => { return new ModuleConfig({ queryTree: [ ...this._queryTree, { operation: "moduleConfig", args: { sourceDirectory, ...opts }, }, ], ctx: this._ctx, }) } /** * Creates a named sub-pipeline. * @param name Pipeline name. * @param opts.description Pipeline description. * @param opts.labels Pipeline labels. */ pipeline = (name: string, opts?: ClientPipelineOpts): Client => { return new Client({ queryTree: [ ...this._queryTree, { operation: "pipeline", args: { name, ...opts }, }, ], ctx: this._ctx, }) } /** * Loads a secret from its ID. * @deprecated Use loadSecretFromID instead */ secret = (id: SecretID): Secret => { return new Secret({ queryTree: [ ...this._queryTree, { operation: "secret", args: { id }, }, ], ctx: this._ctx, }) } /** * Sets a secret given a user defined name to its plaintext and returns the secret. * The plaintext value is limited to a size of 128000 bytes. * @param name The user defined name for this secret * @param plaintext The plaintext of the secret */ setSecret = (name: string, plaintext: string): Secret => { return new Secret({ queryTree: [ ...this._queryTree, { operation: "setSecret", args: { name, plaintext }, }, ], ctx: this._ctx, }) } /** * Loads a socket by its ID. * @deprecated Use loadSocketFromID instead. */ socket = (opts?: ClientSocketOpts): Socket => { return new Socket({ queryTree: [ ...this._queryTree, { operation: "socket", args: { ...opts }, }, ], ctx: this._ctx, }) } /** * Create a new TypeDef. */ typeDef = (): TypeDef => { return new TypeDef({ queryTree: [ ...this._queryTree, { operation: "typeDef", }, ], ctx: this._ctx, }) } /** * Call the provided function with current Client. * * This is useful for reusability and readability by not breaking the calling chain. */ with = (arg: (param: Client) => Client) => { return arg(this) } } /** * A reference to a secret value, which can be handled more safely than the value itself. */ export class Secret extends BaseClient { private readonly _id?: SecretID = undefined private readonly _plaintext?: string = undefined /** * Constructor is used for internal usage only, do not create object from it. */ constructor( parent?: { queryTree?: QueryTree[]; ctx: Context }, _id?: SecretID, _plaintext?: string ) { super(parent) this._id = _id this._plaintext = _plaintext } /** * The identifier for this secret. */ id = async (): Promise<SecretID> => { if (this._id) { return this._id } const response: Awaited<SecretID> = await computeQuery( [ ...this._queryTree, { operation: "id", }, ], await this._ctx.connection() ) return response } /** * The value of this secret. */ plaintext = async (): Promise<string> => { if (this._plaintext) { return this._plaintext } const response: Awaited<string> = await computeQuery( [ ...this._queryTree, { operation: "plaintext", }, ], await this._ctx.connection() ) return response } } export class Service extends BaseClient { private readonly _id?: ServiceID = undefined private readonly _endpoint?: string = undefined private readonly _hostname?: string = undefined private readonly _start?: ServiceID = undefined private readonly _stop?: ServiceID = undefined /** * Constructor is used for internal usage only, do not create object from it. */ constructor( parent?: { queryTree?: QueryTree[]; ctx: Context }, _id?: ServiceID, _endpoint?: string, _hostname?: string, _start?: ServiceID, _stop?: ServiceID ) { super(parent) this._id = _id this._endpoint = _endpoint this._hostname = _hostname this._start = _start this._stop = _stop } /** * A unique identifier for this service. */ id = async (): Promise<ServiceID> => { if (this._id) { return this._id } const response: Awaited<ServiceID> = await computeQuery( [ ...this._queryTree, { operation: "id", }, ], await this._ctx.connection() ) return response } /** * Retrieves an endpoint that clients can use to reach this container. * * If no port is specified, the first exposed port is used. If none exist an error is returned. * * If a scheme is specified, a URL is returned. Otherwise, a host:port pair is returned. * @param opts.port The exposed port number for the endpoint * @param opts.scheme Return a URL with the given scheme, eg. http for http:// */ endpoint = async (opts?: ServiceEndpointOpts): Promise<string> => { if (this._endpoint) { return this._endpoint } const response: Awaited<string> = await computeQuery( [ ...this._queryTree, { operation: "endpoint", args: { ...opts }, }, ], await this._ctx.connection() ) return response } /** * Retrieves a hostname which can be used by clients to reach this container. */ hostname = async (): Promise<string> => { if (this._hostname) { return this._hostname } const response: Awaited<string> = await computeQuery( [ ...this._queryTree, { operation: "hostname", }, ], await this._ctx.connection() ) return response } /** * Retrieves the list of ports provided by the service. */ ports = async (): Promise<Port[]> => { type ports = { description: string port: number protocol: NetworkProtocol } const response: Awaited<ports[]> = await computeQuery( [ ...this._queryTree, { operation: "ports", }, { operation: "description port protocol", }, ], await this._ctx.connection() ) return response.map( (r) => new Port( { queryTree: this.queryTree, ctx: this._ctx, }, r.description, r.port, r.protocol ) ) } /** * Start the service and wait for its health checks to succeed. * * Services bound to a Container do not need to be manually started. */ start = async (): Promise<Service> => { await computeQuery( [ ...this._queryTree, { operation: "start", }, ], await this._ctx.connection() ) return this } /** * Stop the service. */ stop = async (): Promise<Service> => { await computeQuery( [ ...this._queryTree, { operation: "stop", }, ], await this._ctx.connection() ) return this } } export class Socket extends BaseClient { private readonly _id?: SocketID = undefined /** * Constructor is used for internal usage only, do not create object from it. */ constructor( parent?: { queryTree?: QueryTree[]; ctx: Context }, _id?: SocketID ) { super(parent) this._id = _id } /** * The content-addressed identifier of the socket. */ id = async (): Promise<SocketID> => { if (this._id) { return this._id } const response: Awaited<SocketID> = await computeQuery( [ ...this._queryTree, { operation: "id", }, ], await this._ctx.connection() ) return response } } /** * A definition of a parameter or return type in a Module. */ export class TypeDef extends BaseClient { private readonly _id?: TypeDefID = undefined private readonly _kind?: TypeDefKind = undefined private readonly _optional?: boolean = undefined /** * Constructor is used for internal usage only, do not create object from it. */ constructor( parent?: { queryTree?: QueryTree[]; ctx: Context }, _id?: TypeDefID, _kind?: TypeDefKind, _optional?: boolean ) { super(parent) this._id = _id this._kind = _kind this._optional = _optional } id = async (): Promise<TypeDefID> => { if (this._id) { return this._id } const response: Awaited<TypeDefID> = await computeQuery( [ ...this._queryTree, { operation: "id", }, ], await this._ctx.connection() ) return response } /** * If kind is LIST, the list-specific type definition. * If kind is not LIST, this will be null. */ asList = (): ListTypeDef => { return new ListTypeDef({ queryTree: [ ...this._queryTree, { operation: "asList", }, ], ctx: this._ctx, }) } /** * If kind is OBJECT, the object-specific type definition. * If kind is not OBJECT, this will be null. */ asObject = (): ObjectTypeDef => { return new ObjectTypeDef({ queryTree: [ ...this._queryTree, { operation: "asObject", }, ], ctx: this._ctx, }) } /** * The kind of type this is (e.g. primitive, list, object) */ kind = async (): Promise<TypeDefKind> => { if (this._kind) { return this._kind } const response: Awaited<TypeDefKind> = await computeQuery( [ ...this._queryTree, { operation: "kind", }, ], await this._ctx.connection() ) return response } /** * Whether this type can be set to null. Defaults to false. */ optional = async (): Promise<boolean> => { if (this._optional) { return this._optional } const response: Awaited<boolean> = await computeQuery( [ ...this._queryTree, { operation: "optional", }, ], await this._ctx.connection() ) return response } /** * Adds a function for constructing a new instance of an Object TypeDef, failing if the type is not an object. */ withConstructor = (function_: Function_): TypeDef => { return new TypeDef({ queryTree: [ ...this._queryTree, { operation: "withConstructor", args: { function: function_, }, }, ], ctx: this._ctx, }) } /** * Adds a static field for an Object TypeDef, failing if the type is not an object. * @param name The name of the field in the object * @param typeDef The type of the field * @param opts.description A doc string for the field, if any */ withField = ( name: string, typeDef: TypeDef, opts?: TypeDefWithFieldOpts ): TypeDef => { return new TypeDef({ queryTree: [ ...this._queryTree, { operation: "withField", args: { name, typeDef, ...opts }, }, ], ctx: this._ctx, }) } /** * Adds a function for an Object TypeDef, failing if the type is not an object. */ withFunction = (function_: Function_): TypeDef => { return new TypeDef({ queryTree: [ ...this._queryTree, { operation: "withFunction", args: { function: function_, }, }, ], ctx: this._ctx, }) } /** * Sets the kind of the type. */ withKind = (kind: TypeDefKind): TypeDef => { const metadata: Metadata = { kind: { is_enum: true }, } return new TypeDef({ queryTree: [ ...this._queryTree, { operation: "withKind", args: { kind, __metadata: metadata }, }, ], ctx: this._ctx, }) } /** * Returns a TypeDef of kind List with the provided type for its elements. */ withListOf = (elementType: TypeDef): TypeDef => { return new TypeDef({ queryTree: [ ...this._queryTree, { operation: "withListOf", args: { elementType }, }, ], ctx: this._ctx, }) } /** * Returns a TypeDef of kind Object with the provided name. * * Note that an object's fields and functions may be omitted if the intent is * only to refer to an object. This is how functions are able to return their * own object, or any other circular reference. */ withObject = (name: string, opts?: TypeDefWithObjectOpts): TypeDef => { return new TypeDef({ queryTree: [ ...this._queryTree, { operation: "withObject", args: { name, ...opts }, }, ], ctx: this._ctx, }) } /** * Sets whether this type can be set to null. */ withOptional = (optional: boolean): TypeDef => { return new TypeDef({ queryTree: [ ...this._queryTree, { operation: "withOptional", args: { optional }, }, ], ctx: this._ctx, }) } /** * Call the provided function with current TypeDef. * * This is useful for reusability and readability by not breaking the calling chain. */ with = (arg: (param: TypeDef) => TypeDef) => { return arg(this) } } export const dag = new Client({ ctx: defaultContext })
closed
dagger/dagger
https://github.com/dagger/dagger
3,284
Use `withoutEntrypoint`, `withoutWorkdir`, `withoutUser` and `withoutDefaultArgs` to remove
Currently, passing nil or empty arguments to those function reinit the values. It's not that explicit and clear. It will make more API endpoints, but it's gonna be clearer.
https://github.com/dagger/dagger/issues/3284
https://github.com/dagger/dagger/pull/6278
568d802bb892f1e074cf74cfce2a551989418964
cd825bde699a0beb0adb5c2529da5469118a172b
"2022-10-07T15:00:07Z"
go
"2023-12-19T13:11:01Z"
sdk/python/src/dagger/client/gen.py
# Code generated by dagger. DO NOT EDIT. import warnings from collections.abc import Callable, Sequence from dataclasses import dataclass from ._core import Arg, Root from ._guards import typecheck from .base import Enum, Input, Scalar, Type class CacheVolumeID(Scalar): """A global cache volume identifier.""" class ContainerID(Scalar): """A unique container identifier. Null designates an empty container (scratch).""" class DirectoryID(Scalar): """A content-addressed directory identifier.""" class FileID(Scalar): """A file identifier.""" class FunctionArgID(Scalar): """A reference to a FunctionArg.""" class FunctionID(Scalar): """A reference to a Function.""" class GeneratedCodeID(Scalar): """A reference to GeneratedCode.""" class GitRefID(Scalar): """A git reference identifier.""" class GitRepositoryID(Scalar): """A git repository identifier.""" class JSON(Scalar): """An arbitrary JSON-encoded value.""" class ModuleID(Scalar): """A reference to a Module.""" class Platform(Scalar): """The platform config OS and architecture in a Container. The format is [os]/[platform]/[version] (e.g., "darwin/arm64/v7", "windows/amd64", "linux/arm64").""" class SecretID(Scalar): """A unique identifier for a secret.""" class ServiceID(Scalar): """A unique service identifier.""" class SocketID(Scalar): """A content-addressed socket identifier.""" class TypeDefID(Scalar): """A reference to a TypeDef.""" class Void(Scalar): """The absense of a value. A Null Void is used as a placeholder for resolvers that do not return anything.""" class CacheSharingMode(Enum): """Sharing mode of the cache volume.""" LOCKED = "LOCKED" """Shares the cache volume amongst many build pipelines, but will serialize the writes """ PRIVATE = "PRIVATE" """Keeps a cache volume for a single build pipeline""" SHARED = "SHARED" """Shares the cache volume amongst many build pipelines""" class ImageLayerCompression(Enum): """Compression algorithm to use for image layers.""" EStarGZ = "EStarGZ" Gzip = "Gzip" Uncompressed = "Uncompressed" Zstd = "Zstd" class ImageMediaTypes(Enum): """Mediatypes to use in published or exported image metadata.""" DockerMediaTypes = "DockerMediaTypes" OCIMediaTypes = "OCIMediaTypes" class NetworkProtocol(Enum): """Transport layer network protocol associated to a port.""" TCP = "TCP" """TCP (Transmission Control Protocol)""" UDP = "UDP" """UDP (User Datagram Protocol)""" class TypeDefKind(Enum): """Distinguishes the different kinds of TypeDefs.""" BooleanKind = "BooleanKind" """A boolean value""" IntegerKind = "IntegerKind" """An integer value""" ListKind = "ListKind" """A list of values all having the same type. Always paired with a ListTypeDef. """ ObjectKind = "ObjectKind" """A named type defined in the GraphQL schema, with fields and functions. Always paired with an ObjectTypeDef. """ StringKind = "StringKind" """A string value""" VoidKind = "VoidKind" """A special kind used to signify that no value is returned. This is used for functions that have no return value. The outer TypeDef specifying this Kind is always Optional, as the Void is never actually represented. """ @dataclass(slots=True) class BuildArg(Input): """Key value object that represents a build argument.""" name: str """The build argument name.""" value: str """The build argument value.""" @dataclass(slots=True) class PipelineLabel(Input): """Key value object that represents a Pipeline label.""" name: str """Label name.""" value: str """Label value.""" @dataclass(slots=True) class PortForward(Input): """Port forwarding rules for tunneling network traffic.""" backend: int """Destination port for traffic.""" frontend: int | None = None """Port to expose to clients. If unspecified, a default will be chosen.""" protocol: NetworkProtocol | None = None """Protocol to use for traffic.""" class CacheVolume(Type): """A directory whose contents persist across runs.""" @typecheck async def id(self) -> CacheVolumeID: """Note ---- This is lazily evaluated, no operation is actually run. Returns ------- CacheVolumeID A global cache volume identifier. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args: list[Arg] = [] _ctx = self._select("id", _args) return await _ctx.execute(CacheVolumeID) class Container(Type): """An OCI-compatible container, also known as a docker container.""" @typecheck def as_service(self) -> "Service": """Turn the container into a Service. Be sure to set any exposed ports before this conversion. """ _args: list[Arg] = [] _ctx = self._select("asService", _args) return Service(_ctx) @typecheck def as_tarball( self, *, platform_variants: Sequence["Container"] | None = None, forced_compression: ImageLayerCompression | None = None, media_types: ImageMediaTypes | None = None, ) -> "File": """Returns a File representing the container serialized to a tarball. Parameters ---------- platform_variants: Identifiers for other platform specific containers. Used for multi-platform image. forced_compression: Force each layer of the image to use the specified compression algorithm. If this is unset, then if a layer already has a compressed blob in the engine's cache, that will be used (this can result in a mix of compression algorithms for different layers). If this is unset and a layer has no compressed blob in the engine's cache, then it will be compressed using Gzip. media_types: Use the specified media types for the image's layers. Defaults to OCI, which is largely compatible with most recent container runtimes, but Docker may be needed for older runtimes without OCI support. """ _args = [ Arg("platformVariants", platform_variants, None), Arg("forcedCompression", forced_compression, None), Arg("mediaTypes", media_types, None), ] _ctx = self._select("asTarball", _args) return File(_ctx) @typecheck def build( self, context: "Directory", *, dockerfile: str | None = None, build_args: Sequence[BuildArg] | None = None, target: str | None = None, secrets: Sequence["Secret"] | None = None, ) -> "Container": """Initializes this container from a Dockerfile build. Parameters ---------- context: Directory context used by the Dockerfile. dockerfile: Path to the Dockerfile to use. Default: './Dockerfile'. build_args: Additional build arguments. target: Target build stage to build. secrets: Secrets to pass to the build. They will be mounted at /run/secrets/[secret-name] in the build container They can be accessed in the Dockerfile using the "secret" mount type and mount path /run/secrets/[secret-name] e.g. RUN --mount=type=secret,id=my-secret curl url?token=$(cat /run/secrets/my-secret)" """ _args = [ Arg("context", context), Arg("dockerfile", dockerfile, None), Arg("buildArgs", build_args, None), Arg("target", target, None), Arg("secrets", secrets, None), ] _ctx = self._select("build", _args) return Container(_ctx) @typecheck async def default_args(self) -> list[str] | None: """Retrieves default arguments for future commands. Returns ------- list[str] | None The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args: list[Arg] = [] _ctx = self._select("defaultArgs", _args) return await _ctx.execute(list[str] | None) @typecheck def directory(self, path: str) -> "Directory": """Retrieves a directory at the given path. Mounts are included. Parameters ---------- path: The path of the directory to retrieve (e.g., "./src"). """ _args = [ Arg("path", path), ] _ctx = self._select("directory", _args) return Directory(_ctx) @typecheck async def entrypoint(self) -> list[str] | None: """Retrieves entrypoint to be prepended to the arguments of all commands. Returns ------- list[str] | None The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args: list[Arg] = [] _ctx = self._select("entrypoint", _args) return await _ctx.execute(list[str] | None) @typecheck async def env_variable(self, name: str) -> str | None: """Retrieves the value of the specified environment variable. Parameters ---------- name: The name of the environment variable to retrieve (e.g., "PATH"). Returns ------- str | None The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args = [ Arg("name", name), ] _ctx = self._select("envVariable", _args) return await _ctx.execute(str | None) @typecheck async def env_variables(self) -> list["EnvVariable"]: """Retrieves the list of environment variables passed to commands.""" _args: list[Arg] = [] _ctx = self._select("envVariables", _args) _ctx = EnvVariable(_ctx)._select_multiple( _name="name", _value="value", ) return await _ctx.execute(list[EnvVariable]) @typecheck def experimental_with_all_gp_us(self) -> "Container": """EXPERIMENTAL API! Subject to change/removal at any time. experimentalWithAllGPUs configures all available GPUs on the host to be accessible to this container. This currently works for Nvidia devices only. """ _args: list[Arg] = [] _ctx = self._select("experimentalWithAllGPUs", _args) return Container(_ctx) @typecheck def experimental_with_gpu(self, devices: Sequence[str]) -> "Container": """EXPERIMENTAL API! Subject to change/removal at any time. experimentalWithGPU configures the provided list of devices to be accesible to this container. This currently works for Nvidia devices only. """ _args = [ Arg("devices", devices), ] _ctx = self._select("experimentalWithGPU", _args) return Container(_ctx) @typecheck async def export( self, path: str, *, platform_variants: Sequence["Container"] | None = None, forced_compression: ImageLayerCompression | None = None, media_types: ImageMediaTypes | None = None, ) -> bool: """Writes the container as an OCI tarball to the destination file path on the host for the specified platform variants. Return true on success. It can also publishes platform variants. Parameters ---------- path: Host's destination path (e.g., "./tarball"). Path can be relative to the engine's workdir or absolute. platform_variants: Identifiers for other platform specific containers. Used for multi-platform image. forced_compression: Force each layer of the exported image to use the specified compression algorithm. If this is unset, then if a layer already has a compressed blob in the engine's cache, that will be used (this can result in a mix of compression algorithms for different layers). If this is unset and a layer has no compressed blob in the engine's cache, then it will be compressed using Gzip. media_types: Use the specified media types for the exported image's layers. Defaults to OCI, which is largely compatible with most recent container runtimes, but Docker may be needed for older runtimes without OCI support. Returns ------- bool The `Boolean` scalar type represents `true` or `false`. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args = [ Arg("path", path), Arg("platformVariants", platform_variants, None), Arg("forcedCompression", forced_compression, None), Arg("mediaTypes", media_types, None), ] _ctx = self._select("export", _args) return await _ctx.execute(bool) @typecheck async def exposed_ports(self) -> list["Port"]: """Retrieves the list of exposed ports. This includes ports already exposed by the image, even if not explicitly added with dagger. """ _args: list[Arg] = [] _ctx = self._select("exposedPorts", _args) _ctx = Port(_ctx)._select_multiple( _description="description", _port="port", _protocol="protocol", ) return await _ctx.execute(list[Port]) @typecheck def file(self, path: str) -> "File": """Retrieves a file at the given path. Mounts are included. Parameters ---------- path: The path of the file to retrieve (e.g., "./README.md"). """ _args = [ Arg("path", path), ] _ctx = self._select("file", _args) return File(_ctx) @typecheck def from_(self, address: str) -> "Container": """Initializes this container from a pulled base image. Parameters ---------- address: Image's address from its registry. Formatted as [host]/[user]/[repo]:[tag] (e.g., "docker.io/dagger/dagger:main"). """ _args = [ Arg("address", address), ] _ctx = self._select("from", _args) return Container(_ctx) @typecheck async def id(self) -> ContainerID: """A unique identifier for this container. Note ---- This is lazily evaluated, no operation is actually run. Returns ------- ContainerID A unique container identifier. Null designates an empty container (scratch). Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args: list[Arg] = [] _ctx = self._select("id", _args) return await _ctx.execute(ContainerID) @typecheck async def image_ref(self) -> str | None: """The unique image reference which can only be retrieved immediately after the 'Container.From' call. Returns ------- str | None The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args: list[Arg] = [] _ctx = self._select("imageRef", _args) return await _ctx.execute(str | None) @typecheck def import_( self, source: "File", *, tag: str | None = None, ) -> "Container": """Reads the container from an OCI tarball. NOTE: this involves unpacking the tarball to an OCI store on the host at $XDG_CACHE_DIR/dagger/oci. This directory can be removed whenever you like. Parameters ---------- source: File to read the container from. tag: Identifies the tag to import from the archive, if the archive bundles multiple tags. """ _args = [ Arg("source", source), Arg("tag", tag, None), ] _ctx = self._select("import", _args) return Container(_ctx) @typecheck async def label(self, name: str) -> str | None: """Retrieves the value of the specified label. Returns ------- str | None The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args = [ Arg("name", name), ] _ctx = self._select("label", _args) return await _ctx.execute(str | None) @typecheck async def labels(self) -> list["Label"]: """Retrieves the list of labels passed to container.""" _args: list[Arg] = [] _ctx = self._select("labels", _args) _ctx = Label(_ctx)._select_multiple( _name="name", _value="value", ) return await _ctx.execute(list[Label]) @typecheck async def mounts(self) -> list[str]: """Retrieves the list of paths where a directory is mounted. Returns ------- list[str] The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args: list[Arg] = [] _ctx = self._select("mounts", _args) return await _ctx.execute(list[str]) @typecheck def pipeline( self, name: str, *, description: str | None = None, labels: Sequence[PipelineLabel] | None = None, ) -> "Container": """Creates a named sub-pipeline Parameters ---------- name: Pipeline name. description: Pipeline description. labels: Pipeline labels. """ _args = [ Arg("name", name), Arg("description", description, None), Arg("labels", labels, None), ] _ctx = self._select("pipeline", _args) return Container(_ctx) @typecheck async def platform(self) -> Platform: """The platform this container executes and publishes as. Returns ------- Platform The platform config OS and architecture in a Container. The format is [os]/[platform]/[version] (e.g., "darwin/arm64/v7", "windows/amd64", "linux/arm64"). Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args: list[Arg] = [] _ctx = self._select("platform", _args) return await _ctx.execute(Platform) @typecheck async def publish( self, address: str, *, platform_variants: Sequence["Container"] | None = None, forced_compression: ImageLayerCompression | None = None, media_types: ImageMediaTypes | None = None, ) -> str: """Publishes this container as a new image to the specified address. Publish returns a fully qualified ref. It can also publish platform variants. Parameters ---------- address: Registry's address to publish the image to. Formatted as [host]/[user]/[repo]:[tag] (e.g. "docker.io/dagger/dagger:main"). platform_variants: Identifiers for other platform specific containers. Used for multi-platform image. forced_compression: Force each layer of the published image to use the specified compression algorithm. If this is unset, then if a layer already has a compressed blob in the engine's cache, that will be used (this can result in a mix of compression algorithms for different layers). If this is unset and a layer has no compressed blob in the engine's cache, then it will be compressed using Gzip. media_types: Use the specified media types for the published image's layers. Defaults to OCI, which is largely compatible with most recent registries, but Docker may be needed for older registries without OCI support. Returns ------- str The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args = [ Arg("address", address), Arg("platformVariants", platform_variants, None), Arg("forcedCompression", forced_compression, None), Arg("mediaTypes", media_types, None), ] _ctx = self._select("publish", _args) return await _ctx.execute(str) @typecheck def rootfs(self) -> "Directory": """Retrieves this container's root filesystem. Mounts are not included.""" _args: list[Arg] = [] _ctx = self._select("rootfs", _args) return Directory(_ctx) @typecheck async def shell_endpoint(self) -> str: """Return a websocket endpoint that, if connected to, will start the container with a TTY streamed over the websocket. Primarily intended for internal use with the dagger CLI. Returns ------- str The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args: list[Arg] = [] _ctx = self._select("shellEndpoint", _args) return await _ctx.execute(str) @typecheck async def stderr(self) -> str: """The error stream of the last executed command. Will execute default command if none is set, or error if there's no default. Returns ------- str The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args: list[Arg] = [] _ctx = self._select("stderr", _args) return await _ctx.execute(str) @typecheck async def stdout(self) -> str: """The output stream of the last executed command. Will execute default command if none is set, or error if there's no default. Returns ------- str The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args: list[Arg] = [] _ctx = self._select("stdout", _args) return await _ctx.execute(str) @typecheck async def sync(self) -> "Container": """Forces evaluation of the pipeline in the engine. It doesn't run the default command if no exec has been set. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args: list[Arg] = [] _ctx = self._select("sync", _args) _id = await _ctx.execute(ContainerID) _ctx = Client.from_context(_ctx)._select( "loadContainerFromID", [Arg("id", _id)] ) return Container(_ctx) def __await__(self): return self.sync().__await__() @typecheck async def user(self) -> str | None: """Retrieves the user to be set for all commands. Returns ------- str | None The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args: list[Arg] = [] _ctx = self._select("user", _args) return await _ctx.execute(str | None) @typecheck def with_default_args( self, *, args: Sequence[str] | None = None, ) -> "Container": """Configures default arguments for future commands. Parameters ---------- args: Arguments to prepend to future executions (e.g., ["-v", "--no- cache"]). """ _args = [ Arg("args", args, None), ] _ctx = self._select("withDefaultArgs", _args) return Container(_ctx) @typecheck def with_directory( self, path: str, directory: "Directory", *, exclude: Sequence[str] | None = None, include: Sequence[str] | None = None, owner: str | None = None, ) -> "Container": """Retrieves this container plus a directory written at the given path. Parameters ---------- path: Location of the written directory (e.g., "/tmp/directory"). directory: Identifier of the directory to write exclude: Patterns to exclude in the written directory (e.g., ["node_modules/**", ".gitignore", ".git/"]). include: Patterns to include in the written directory (e.g., ["*.go", "go.mod", "go.sum"]). owner: A user:group to set for the directory and its contents. The user and group can either be an ID (1000:1000) or a name (foo:bar). If the group is omitted, it defaults to the same as the user. """ _args = [ Arg("path", path), Arg("directory", directory), Arg("exclude", exclude, None), Arg("include", include, None), Arg("owner", owner, None), ] _ctx = self._select("withDirectory", _args) return Container(_ctx) @typecheck def with_entrypoint(self, args: Sequence[str]) -> "Container": """Retrieves this container but with a different command entrypoint. Parameters ---------- args: Entrypoint to use for future executions (e.g., ["go", "run"]). """ _args = [ Arg("args", args), ] _ctx = self._select("withEntrypoint", _args) return Container(_ctx) @typecheck def with_env_variable( self, name: str, value: str, *, expand: bool | None = None, ) -> "Container": """Retrieves this container plus the given environment variable. Parameters ---------- name: The name of the environment variable (e.g., "HOST"). value: The value of the environment variable. (e.g., "localhost"). expand: Replace `${VAR}` or $VAR in the value according to the current environment variables defined in the container (e.g., "/opt/bin:$PATH"). """ _args = [ Arg("name", name), Arg("value", value), Arg("expand", expand, None), ] _ctx = self._select("withEnvVariable", _args) return Container(_ctx) @typecheck def with_exec( self, args: Sequence[str], *, skip_entrypoint: bool | None = None, stdin: str | None = None, redirect_stdout: str | None = None, redirect_stderr: str | None = None, experimental_privileged_nesting: bool | None = None, insecure_root_capabilities: bool | None = None, ) -> "Container": """Retrieves this container after executing the specified command inside it. Parameters ---------- args: Command to run instead of the container's default command (e.g., ["run", "main.go"]). If empty, the container's default command is used. skip_entrypoint: If the container has an entrypoint, ignore it for args rather than using it to wrap them. stdin: Content to write to the command's standard input before closing (e.g., "Hello world"). redirect_stdout: Redirect the command's standard output to a file in the container (e.g., "/tmp/stdout"). redirect_stderr: Redirect the command's standard error to a file in the container (e.g., "/tmp/stderr"). experimental_privileged_nesting: Provides dagger access to the executed command. Do not use this option unless you trust the command being executed. The command being executed WILL BE GRANTED FULL ACCESS TO YOUR HOST FILESYSTEM. insecure_root_capabilities: Execute the command with all root capabilities. This is similar to running a command with "sudo" or executing `docker run` with the `--privileged` flag. Containerization does not provide any security guarantees when using this option. It should only be used when absolutely necessary and only with trusted commands. """ _args = [ Arg("args", args), Arg("skipEntrypoint", skip_entrypoint, None), Arg("stdin", stdin, None), Arg("redirectStdout", redirect_stdout, None), Arg("redirectStderr", redirect_stderr, None), Arg("experimentalPrivilegedNesting", experimental_privileged_nesting, None), Arg("insecureRootCapabilities", insecure_root_capabilities, None), ] _ctx = self._select("withExec", _args) return Container(_ctx) @typecheck def with_exposed_port( self, port: int, *, protocol: NetworkProtocol | None = None, description: str | None = None, ) -> "Container": """Expose a network port. Exposed ports serve two purposes: - For health checks and introspection, when running services - For setting the EXPOSE OCI field when publishing the container Parameters ---------- port: Port number to expose protocol: Transport layer network protocol description: Optional port description """ _args = [ Arg("port", port), Arg("protocol", protocol, None), Arg("description", description, None), ] _ctx = self._select("withExposedPort", _args) return Container(_ctx) @typecheck def with_file( self, path: str, source: "File", *, permissions: int | None = None, owner: str | None = None, ) -> "Container": """Retrieves this container plus the contents of the given file copied to the given path. Parameters ---------- path: Location of the copied file (e.g., "/tmp/file.txt"). source: Identifier of the file to copy. permissions: Permission given to the copied file (e.g., 0600). Default: 0644. owner: A user:group to set for the file. The user and group can either be an ID (1000:1000) or a name (foo:bar). If the group is omitted, it defaults to the same as the user. """ _args = [ Arg("path", path), Arg("source", source), Arg("permissions", permissions, None), Arg("owner", owner, None), ] _ctx = self._select("withFile", _args) return Container(_ctx) @typecheck def with_focus(self) -> "Container": """Indicate that subsequent operations should be featured more prominently in the UI. """ _args: list[Arg] = [] _ctx = self._select("withFocus", _args) return Container(_ctx) @typecheck def with_label(self, name: str, value: str) -> "Container": """Retrieves this container plus the given label. Parameters ---------- name: The name of the label (e.g., "org.opencontainers.artifact.created"). value: The value of the label (e.g., "2023-01-01T00:00:00Z"). """ _args = [ Arg("name", name), Arg("value", value), ] _ctx = self._select("withLabel", _args) return Container(_ctx) @typecheck def with_mounted_cache( self, path: str, cache: CacheVolume, *, source: "Directory | None" = None, sharing: CacheSharingMode | None = None, owner: str | None = None, ) -> "Container": """Retrieves this container plus a cache volume mounted at the given path. Parameters ---------- path: Location of the cache directory (e.g., "/cache/node_modules"). cache: Identifier of the cache volume to mount. source: Identifier of the directory to use as the cache volume's root. sharing: Sharing mode of the cache volume. owner: A user:group to set for the mounted cache directory. Note that this changes the ownership of the specified mount along with the initial filesystem provided by source (if any). It does not have any effect if/when the cache has already been created. The user and group can either be an ID (1000:1000) or a name (foo:bar). If the group is omitted, it defaults to the same as the user. """ _args = [ Arg("path", path), Arg("cache", cache), Arg("source", source, None), Arg("sharing", sharing, None), Arg("owner", owner, None), ] _ctx = self._select("withMountedCache", _args) return Container(_ctx) @typecheck def with_mounted_directory( self, path: str, source: "Directory", *, owner: str | None = None, ) -> "Container": """Retrieves this container plus a directory mounted at the given path. Parameters ---------- path: Location of the mounted directory (e.g., "/mnt/directory"). source: Identifier of the mounted directory. owner: A user:group to set for the mounted directory and its contents. The user and group can either be an ID (1000:1000) or a name (foo:bar). If the group is omitted, it defaults to the same as the user. """ _args = [ Arg("path", path), Arg("source", source), Arg("owner", owner, None), ] _ctx = self._select("withMountedDirectory", _args) return Container(_ctx) @typecheck def with_mounted_file( self, path: str, source: "File", *, owner: str | None = None, ) -> "Container": """Retrieves this container plus a file mounted at the given path. Parameters ---------- path: Location of the mounted file (e.g., "/tmp/file.txt"). source: Identifier of the mounted file. owner: A user or user:group to set for the mounted file. The user and group can either be an ID (1000:1000) or a name (foo:bar). If the group is omitted, it defaults to the same as the user. """ _args = [ Arg("path", path), Arg("source", source), Arg("owner", owner, None), ] _ctx = self._select("withMountedFile", _args) return Container(_ctx) @typecheck def with_mounted_secret( self, path: str, source: "Secret", *, owner: str | None = None, mode: int | None = None, ) -> "Container": """Retrieves this container plus a secret mounted into a file at the given path. Parameters ---------- path: Location of the secret file (e.g., "/tmp/secret.txt"). source: Identifier of the secret to mount. owner: A user:group to set for the mounted secret. The user and group can either be an ID (1000:1000) or a name (foo:bar). If the group is omitted, it defaults to the same as the user. mode: Permission given to the mounted secret (e.g., 0600). This option requires an owner to be set to be active. Default: 0400. """ _args = [ Arg("path", path), Arg("source", source), Arg("owner", owner, None), Arg("mode", mode, None), ] _ctx = self._select("withMountedSecret", _args) return Container(_ctx) @typecheck def with_mounted_temp(self, path: str) -> "Container": """Retrieves this container plus a temporary directory mounted at the given path. Parameters ---------- path: Location of the temporary directory (e.g., "/tmp/temp_dir"). """ _args = [ Arg("path", path), ] _ctx = self._select("withMountedTemp", _args) return Container(_ctx) @typecheck def with_new_file( self, path: str, *, contents: str | None = None, permissions: int | None = None, owner: str | None = None, ) -> "Container": """Retrieves this container plus a new file written at the given path. Parameters ---------- path: Location of the written file (e.g., "/tmp/file.txt"). contents: Content of the file to write (e.g., "Hello world!"). permissions: Permission given to the written file (e.g., 0600). Default: 0644. owner: A user:group to set for the file. The user and group can either be an ID (1000:1000) or a name (foo:bar). If the group is omitted, it defaults to the same as the user. """ _args = [ Arg("path", path), Arg("contents", contents, None), Arg("permissions", permissions, None), Arg("owner", owner, None), ] _ctx = self._select("withNewFile", _args) return Container(_ctx) @typecheck def with_registry_auth( self, address: str, username: str, secret: "Secret", ) -> "Container": """Retrieves this container with a registry authentication for a given address. Parameters ---------- address: Registry's address to bind the authentication to. Formatted as [host]/[user]/[repo]:[tag] (e.g. docker.io/dagger/dagger:main). username: The username of the registry's account (e.g., "Dagger"). secret: The API key, password or token to authenticate to this registry. """ _args = [ Arg("address", address), Arg("username", username), Arg("secret", secret), ] _ctx = self._select("withRegistryAuth", _args) return Container(_ctx) @typecheck def with_rootfs(self, directory: "Directory") -> "Container": """Initializes this container from this DirectoryID.""" _args = [ Arg("directory", directory), ] _ctx = self._select("withRootfs", _args) return Container(_ctx) @typecheck def with_secret_variable(self, name: str, secret: "Secret") -> "Container": """Retrieves this container plus an env variable containing the given secret. Parameters ---------- name: The name of the secret variable (e.g., "API_SECRET"). secret: The identifier of the secret value. """ _args = [ Arg("name", name), Arg("secret", secret), ] _ctx = self._select("withSecretVariable", _args) return Container(_ctx) @typecheck def with_service_binding(self, alias: str, service: "Service") -> "Container": """Establish a runtime dependency on a service. The service will be started automatically when needed and detached when it is no longer needed, executing the default command if none is set. The service will be reachable from the container via the provided hostname alias. The service dependency will also convey to any files or directories produced by the container. Parameters ---------- alias: A name that can be used to reach the service from the container service: Identifier of the service container """ _args = [ Arg("alias", alias), Arg("service", service), ] _ctx = self._select("withServiceBinding", _args) return Container(_ctx) @typecheck def with_unix_socket( self, path: str, source: "Socket", *, owner: str | None = None, ) -> "Container": """Retrieves this container plus a socket forwarded to the given Unix socket path. Parameters ---------- path: Location of the forwarded Unix socket (e.g., "/tmp/socket"). source: Identifier of the socket to forward. owner: A user:group to set for the mounted socket. The user and group can either be an ID (1000:1000) or a name (foo:bar). If the group is omitted, it defaults to the same as the user. """ _args = [ Arg("path", path), Arg("source", source), Arg("owner", owner, None), ] _ctx = self._select("withUnixSocket", _args) return Container(_ctx) @typecheck def with_user(self, name: str) -> "Container": """Retrieves this container with a different command user. Parameters ---------- name: The user to set (e.g., "root"). """ _args = [ Arg("name", name), ] _ctx = self._select("withUser", _args) return Container(_ctx) @typecheck def with_workdir(self, path: str) -> "Container": """Retrieves this container with a different working directory. Parameters ---------- path: The path to set as the working directory (e.g., "/app"). """ _args = [ Arg("path", path), ] _ctx = self._select("withWorkdir", _args) return Container(_ctx) @typecheck def without_env_variable(self, name: str) -> "Container": """Retrieves this container minus the given environment variable. Parameters ---------- name: The name of the environment variable (e.g., "HOST"). """ _args = [ Arg("name", name), ] _ctx = self._select("withoutEnvVariable", _args) return Container(_ctx) @typecheck def without_exposed_port( self, port: int, *, protocol: NetworkProtocol | None = None, ) -> "Container": """Unexpose a previously exposed port. Parameters ---------- port: Port number to unexpose protocol: Port protocol to unexpose """ _args = [ Arg("port", port), Arg("protocol", protocol, None), ] _ctx = self._select("withoutExposedPort", _args) return Container(_ctx) @typecheck def without_focus(self) -> "Container": """Indicate that subsequent operations should not be featured more prominently in the UI. This is the initial state of all containers. """ _args: list[Arg] = [] _ctx = self._select("withoutFocus", _args) return Container(_ctx) @typecheck def without_label(self, name: str) -> "Container": """Retrieves this container minus the given environment label. Parameters ---------- name: The name of the label to remove (e.g., "org.opencontainers.artifact.created"). """ _args = [ Arg("name", name), ] _ctx = self._select("withoutLabel", _args) return Container(_ctx) @typecheck def without_mount(self, path: str) -> "Container": """Retrieves this container after unmounting everything at the given path. Parameters ---------- path: Location of the cache directory (e.g., "/cache/node_modules"). """ _args = [ Arg("path", path), ] _ctx = self._select("withoutMount", _args) return Container(_ctx) @typecheck def without_registry_auth(self, address: str) -> "Container": """Retrieves this container without the registry authentication of a given address. Parameters ---------- address: Registry's address to remove the authentication from. Formatted as [host]/[user]/[repo]:[tag] (e.g. docker.io/dagger/dagger:main). """ _args = [ Arg("address", address), ] _ctx = self._select("withoutRegistryAuth", _args) return Container(_ctx) @typecheck def without_unix_socket(self, path: str) -> "Container": """Retrieves this container with a previously added Unix socket removed. Parameters ---------- path: Location of the socket to remove (e.g., "/tmp/socket"). """ _args = [ Arg("path", path), ] _ctx = self._select("withoutUnixSocket", _args) return Container(_ctx) @typecheck async def workdir(self) -> str | None: """Retrieves the working directory for all commands. Returns ------- str | None The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args: list[Arg] = [] _ctx = self._select("workdir", _args) return await _ctx.execute(str | None) def with_(self, cb: Callable[["Container"], "Container"]) -> "Container": """Call the provided callable with current Container. This is useful for reusability and readability by not breaking the calling chain. """ return cb(self) class Directory(Type): """A directory.""" @typecheck def as_module( self, *, source_subpath: str | None = None, ) -> "Module": """Load the directory as a Dagger module Parameters ---------- source_subpath: An optional subpath of the directory which contains the module's source code. This is needed when the module code is in a subdirectory but requires parent directories to be loaded in order to execute. For example, the module source code may need a go.mod, project.toml, package.json, etc. file from a parent directory. If not set, the module source code is loaded from the root of the directory. """ _args = [ Arg("sourceSubpath", source_subpath, None), ] _ctx = self._select("asModule", _args) return Module(_ctx) @typecheck def diff(self, other: "Directory") -> "Directory": """Gets the difference between this directory and an another directory. Parameters ---------- other: Identifier of the directory to compare. """ _args = [ Arg("other", other), ] _ctx = self._select("diff", _args) return Directory(_ctx) @typecheck def directory(self, path: str) -> "Directory": """Retrieves a directory at the given path. Parameters ---------- path: Location of the directory to retrieve (e.g., "/src"). """ _args = [ Arg("path", path), ] _ctx = self._select("directory", _args) return Directory(_ctx) @typecheck def docker_build( self, *, dockerfile: str | None = None, platform: Platform | None = None, build_args: Sequence[BuildArg] | None = None, target: str | None = None, secrets: Sequence["Secret"] | None = None, ) -> Container: """Builds a new Docker container from this directory. Parameters ---------- dockerfile: Path to the Dockerfile to use (e.g., "frontend.Dockerfile"). Defaults: './Dockerfile'. platform: The platform to build. build_args: Build arguments to use in the build. target: Target build stage to build. secrets: Secrets to pass to the build. They will be mounted at /run/secrets/[secret-name]. """ _args = [ Arg("dockerfile", dockerfile, None), Arg("platform", platform, None), Arg("buildArgs", build_args, None), Arg("target", target, None), Arg("secrets", secrets, None), ] _ctx = self._select("dockerBuild", _args) return Container(_ctx) @typecheck async def entries(self, *, path: str | None = None) -> list[str]: """Returns a list of files and directories at the given path. Parameters ---------- path: Location of the directory to look at (e.g., "/src"). Returns ------- list[str] The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args = [ Arg("path", path, None), ] _ctx = self._select("entries", _args) return await _ctx.execute(list[str]) @typecheck async def export(self, path: str) -> bool: """Writes the contents of the directory to a path on the host. Parameters ---------- path: Location of the copied directory (e.g., "logs/"). Returns ------- bool The `Boolean` scalar type represents `true` or `false`. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args = [ Arg("path", path), ] _ctx = self._select("export", _args) return await _ctx.execute(bool) @typecheck def file(self, path: str) -> "File": """Retrieves a file at the given path. Parameters ---------- path: Location of the file to retrieve (e.g., "README.md"). """ _args = [ Arg("path", path), ] _ctx = self._select("file", _args) return File(_ctx) @typecheck async def glob(self, pattern: str) -> list[str]: """Returns a list of files and directories that matche the given pattern. Parameters ---------- pattern: Pattern to match (e.g., "*.md"). Returns ------- list[str] The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args = [ Arg("pattern", pattern), ] _ctx = self._select("glob", _args) return await _ctx.execute(list[str]) @typecheck async def id(self) -> DirectoryID: """The content-addressed identifier of the directory. Note ---- This is lazily evaluated, no operation is actually run. Returns ------- DirectoryID A content-addressed directory identifier. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args: list[Arg] = [] _ctx = self._select("id", _args) return await _ctx.execute(DirectoryID) @typecheck def pipeline( self, name: str, *, description: str | None = None, labels: Sequence[PipelineLabel] | None = None, ) -> "Directory": """Creates a named sub-pipeline Parameters ---------- name: Pipeline name. description: Pipeline description. labels: Pipeline labels. """ _args = [ Arg("name", name), Arg("description", description, None), Arg("labels", labels, None), ] _ctx = self._select("pipeline", _args) return Directory(_ctx) @typecheck async def sync(self) -> "Directory": """Force evaluation in the engine. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args: list[Arg] = [] _ctx = self._select("sync", _args) _id = await _ctx.execute(DirectoryID) _ctx = Client.from_context(_ctx)._select( "loadDirectoryFromID", [Arg("id", _id)] ) return Directory(_ctx) def __await__(self): return self.sync().__await__() @typecheck def with_directory( self, path: str, directory: "Directory", *, exclude: Sequence[str] | None = None, include: Sequence[str] | None = None, ) -> "Directory": """Retrieves this directory plus a directory written at the given path. Parameters ---------- path: Location of the written directory (e.g., "/src/"). directory: Identifier of the directory to copy. exclude: Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]). include: Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]). """ _args = [ Arg("path", path), Arg("directory", directory), Arg("exclude", exclude, None), Arg("include", include, None), ] _ctx = self._select("withDirectory", _args) return Directory(_ctx) @typecheck def with_file( self, path: str, source: "File", *, permissions: int | None = None, ) -> "Directory": """Retrieves this directory plus the contents of the given file copied to the given path. Parameters ---------- path: Location of the copied file (e.g., "/file.txt"). source: Identifier of the file to copy. permissions: Permission given to the copied file (e.g., 0600). Default: 0644. """ _args = [ Arg("path", path), Arg("source", source), Arg("permissions", permissions, None), ] _ctx = self._select("withFile", _args) return Directory(_ctx) @typecheck def with_new_directory( self, path: str, *, permissions: int | None = None, ) -> "Directory": """Retrieves this directory plus a new directory created at the given path. Parameters ---------- path: Location of the directory created (e.g., "/logs"). permissions: Permission granted to the created directory (e.g., 0777). Default: 0755. """ _args = [ Arg("path", path), Arg("permissions", permissions, None), ] _ctx = self._select("withNewDirectory", _args) return Directory(_ctx) @typecheck def with_new_file( self, path: str, contents: str, *, permissions: int | None = None, ) -> "Directory": """Retrieves this directory plus a new file written at the given path. Parameters ---------- path: Location of the written file (e.g., "/file.txt"). contents: Content of the written file (e.g., "Hello world!"). permissions: Permission given to the copied file (e.g., 0600). Default: 0644. """ _args = [ Arg("path", path), Arg("contents", contents), Arg("permissions", permissions, None), ] _ctx = self._select("withNewFile", _args) return Directory(_ctx) @typecheck def with_timestamps(self, timestamp: int) -> "Directory": """Retrieves this directory with all file/dir timestamps set to the given time. Parameters ---------- timestamp: Timestamp to set dir/files in. Formatted in seconds following Unix epoch (e.g., 1672531199). """ _args = [ Arg("timestamp", timestamp), ] _ctx = self._select("withTimestamps", _args) return Directory(_ctx) @typecheck def without_directory(self, path: str) -> "Directory": """Retrieves this directory with the directory at the given path removed. Parameters ---------- path: Location of the directory to remove (e.g., ".github/"). """ _args = [ Arg("path", path), ] _ctx = self._select("withoutDirectory", _args) return Directory(_ctx) @typecheck def without_file(self, path: str) -> "Directory": """Retrieves this directory with the file at the given path removed. Parameters ---------- path: Location of the file to remove (e.g., "/file.txt"). """ _args = [ Arg("path", path), ] _ctx = self._select("withoutFile", _args) return Directory(_ctx) def with_(self, cb: Callable[["Directory"], "Directory"]) -> "Directory": """Call the provided callable with current Directory. This is useful for reusability and readability by not breaking the calling chain. """ return cb(self) class EnvVariable(Type): """A simple key value object that represents an environment variable.""" __slots__ = ( "_name", "_value", ) _name: str | None _value: str | None @typecheck async def name(self) -> str: """The environment variable name. Returns ------- str The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ if hasattr(self, "_name"): return self._name _args: list[Arg] = [] _ctx = self._select("name", _args) return await _ctx.execute(str) @typecheck async def value(self) -> str: """The environment variable value. Returns ------- str The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ if hasattr(self, "_value"): return self._value _args: list[Arg] = [] _ctx = self._select("value", _args) return await _ctx.execute(str) class FieldTypeDef(Type): """A definition of a field on a custom object defined in a Module. A field on an object has a static value, as opposed to a function on an object whose value is computed by invoking code (and can accept arguments).""" __slots__ = ( "_description", "_name", ) _description: str | None _name: str | None @typecheck async def description(self) -> str | None: """A doc string for the field, if any Returns ------- str | None The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ if hasattr(self, "_description"): return self._description _args: list[Arg] = [] _ctx = self._select("description", _args) return await _ctx.execute(str | None) @typecheck async def name(self) -> str: """The name of the field in the object Returns ------- str The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ if hasattr(self, "_name"): return self._name _args: list[Arg] = [] _ctx = self._select("name", _args) return await _ctx.execute(str) @typecheck def type_def(self) -> "TypeDef": """The type of the field""" _args: list[Arg] = [] _ctx = self._select("typeDef", _args) return TypeDef(_ctx) class File(Type): """A file.""" @typecheck async def contents(self) -> str: """Retrieves the contents of the file. Returns ------- str The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args: list[Arg] = [] _ctx = self._select("contents", _args) return await _ctx.execute(str) @typecheck async def export( self, path: str, *, allow_parent_dir_path: bool | None = None, ) -> bool: """Writes the file to a file path on the host. Parameters ---------- path: Location of the written directory (e.g., "output.txt"). allow_parent_dir_path: If allowParentDirPath is true, the path argument can be a directory path, in which case the file will be created in that directory. Returns ------- bool The `Boolean` scalar type represents `true` or `false`. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args = [ Arg("path", path), Arg("allowParentDirPath", allow_parent_dir_path, None), ] _ctx = self._select("export", _args) return await _ctx.execute(bool) @typecheck async def id(self) -> FileID: """Retrieves the content-addressed identifier of the file. Note ---- This is lazily evaluated, no operation is actually run. Returns ------- FileID A file identifier. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args: list[Arg] = [] _ctx = self._select("id", _args) return await _ctx.execute(FileID) @typecheck async def size(self) -> int: """Gets the size of the file, in bytes. Returns ------- int The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args: list[Arg] = [] _ctx = self._select("size", _args) return await _ctx.execute(int) @typecheck async def sync(self) -> "File": """Force evaluation in the engine. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args: list[Arg] = [] _ctx = self._select("sync", _args) _id = await _ctx.execute(FileID) _ctx = Client.from_context(_ctx)._select("loadFileFromID", [Arg("id", _id)]) return File(_ctx) def __await__(self): return self.sync().__await__() @typecheck def with_timestamps(self, timestamp: int) -> "File": """Retrieves this file with its created/modified timestamps set to the given time. Parameters ---------- timestamp: Timestamp to set dir/files in. Formatted in seconds following Unix epoch (e.g., 1672531199). """ _args = [ Arg("timestamp", timestamp), ] _ctx = self._select("withTimestamps", _args) return File(_ctx) def with_(self, cb: Callable[["File"], "File"]) -> "File": """Call the provided callable with current File. This is useful for reusability and readability by not breaking the calling chain. """ return cb(self) class Function(Type): """Function represents a resolver provided by a Module. A function always evaluates against a parent object and is given a set of named arguments.""" __slots__ = ( "_description", "_name", ) _description: str | None _name: str | None @typecheck async def args(self) -> list["FunctionArg"]: """Arguments accepted by this function, if any""" _args: list[Arg] = [] _ctx = self._select("args", _args) _ctx = FunctionArg(_ctx)._select_multiple( _default_value="defaultValue", _description="description", _name="name", ) return await _ctx.execute(list[FunctionArg]) @typecheck async def description(self) -> str | None: """A doc string for the function, if any Returns ------- str | None The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ if hasattr(self, "_description"): return self._description _args: list[Arg] = [] _ctx = self._select("description", _args) return await _ctx.execute(str | None) @typecheck async def id(self) -> FunctionID: """The ID of the function Note ---- This is lazily evaluated, no operation is actually run. Returns ------- FunctionID A reference to a Function. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args: list[Arg] = [] _ctx = self._select("id", _args) return await _ctx.execute(FunctionID) @typecheck async def name(self) -> str: """The name of the function Returns ------- str The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ if hasattr(self, "_name"): return self._name _args: list[Arg] = [] _ctx = self._select("name", _args) return await _ctx.execute(str) @typecheck def return_type(self) -> "TypeDef": """The type returned by this function""" _args: list[Arg] = [] _ctx = self._select("returnType", _args) return TypeDef(_ctx) @typecheck def with_arg( self, name: str, type_def: "TypeDef", *, description: str | None = None, default_value: JSON | None = None, ) -> "Function": """Returns the function with the provided argument Parameters ---------- name: The name of the argument type_def: The type of the argument description: A doc string for the argument, if any default_value: A default value to use for this argument if not explicitly set by the caller, if any """ _args = [ Arg("name", name), Arg("typeDef", type_def), Arg("description", description, None), Arg("defaultValue", default_value, None), ] _ctx = self._select("withArg", _args) return Function(_ctx) @typecheck def with_description(self, description: str) -> "Function": """Returns the function with the doc string""" _args = [ Arg("description", description), ] _ctx = self._select("withDescription", _args) return Function(_ctx) def with_(self, cb: Callable[["Function"], "Function"]) -> "Function": """Call the provided callable with current Function. This is useful for reusability and readability by not breaking the calling chain. """ return cb(self) class FunctionArg(Type): """An argument accepted by a function. This is a specification for an argument at function definition time, not an argument passed at function call time.""" __slots__ = ( "_default_value", "_description", "_name", ) _default_value: JSON | None _description: str | None _name: str | None @typecheck async def default_value(self) -> JSON | None: """A default value to use for this argument when not explicitly set by the caller, if any Returns ------- JSON | None An arbitrary JSON-encoded value. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ if hasattr(self, "_default_value"): return self._default_value _args: list[Arg] = [] _ctx = self._select("defaultValue", _args) return await _ctx.execute(JSON | None) @typecheck async def description(self) -> str | None: """A doc string for the argument, if any Returns ------- str | None The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ if hasattr(self, "_description"): return self._description _args: list[Arg] = [] _ctx = self._select("description", _args) return await _ctx.execute(str | None) @typecheck async def id(self) -> FunctionArgID: """The ID of the argument Note ---- This is lazily evaluated, no operation is actually run. Returns ------- FunctionArgID A reference to a FunctionArg. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args: list[Arg] = [] _ctx = self._select("id", _args) return await _ctx.execute(FunctionArgID) @typecheck async def name(self) -> str: """The name of the argument Returns ------- str The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ if hasattr(self, "_name"): return self._name _args: list[Arg] = [] _ctx = self._select("name", _args) return await _ctx.execute(str) @typecheck def type_def(self) -> "TypeDef": """The type of the argument""" _args: list[Arg] = [] _ctx = self._select("typeDef", _args) return TypeDef(_ctx) class FunctionCall(Type): @typecheck async def input_args(self) -> list["FunctionCallArgValue"]: """The argument values the function is being invoked with.""" _args: list[Arg] = [] _ctx = self._select("inputArgs", _args) _ctx = FunctionCallArgValue(_ctx)._select_multiple( _name="name", _value="value", ) return await _ctx.execute(list[FunctionCallArgValue]) @typecheck async def name(self) -> str: """The name of the function being called. Returns ------- str The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args: list[Arg] = [] _ctx = self._select("name", _args) return await _ctx.execute(str) @typecheck async def parent(self) -> JSON: """The value of the parent object of the function being called. If the function is "top-level" to the module, this is always an empty object. Returns ------- JSON An arbitrary JSON-encoded value. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args: list[Arg] = [] _ctx = self._select("parent", _args) return await _ctx.execute(JSON) @typecheck async def parent_name(self) -> str: """The name of the parent object of the function being called. If the function is "top-level" to the module, this is the name of the module. Returns ------- str The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args: list[Arg] = [] _ctx = self._select("parentName", _args) return await _ctx.execute(str) @typecheck async def return_value(self, value: JSON) -> Void | None: """Set the return value of the function call to the provided value. The value should be a string of the JSON serialization of the return value. Returns ------- Void | None The absense of a value. A Null Void is used as a placeholder for resolvers that do not return anything. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args = [ Arg("value", value), ] _ctx = self._select("returnValue", _args) return await _ctx.execute(Void | None) class FunctionCallArgValue(Type): __slots__ = ( "_name", "_value", ) _name: str | None _value: JSON | None @typecheck async def name(self) -> str: """The name of the argument. Returns ------- str The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ if hasattr(self, "_name"): return self._name _args: list[Arg] = [] _ctx = self._select("name", _args) return await _ctx.execute(str) @typecheck async def value(self) -> JSON: """The value of the argument represented as a string of the JSON serialization. Returns ------- JSON An arbitrary JSON-encoded value. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ if hasattr(self, "_value"): return self._value _args: list[Arg] = [] _ctx = self._select("value", _args) return await _ctx.execute(JSON) class GeneratedCode(Type): @typecheck def code(self) -> Directory: """The directory containing the generated code""" _args: list[Arg] = [] _ctx = self._select("code", _args) return Directory(_ctx) @typecheck async def id(self) -> GeneratedCodeID: """Note ---- This is lazily evaluated, no operation is actually run. Returns ------- GeneratedCodeID A reference to GeneratedCode. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args: list[Arg] = [] _ctx = self._select("id", _args) return await _ctx.execute(GeneratedCodeID) @typecheck async def vcs_generated_paths(self) -> list[str] | None: """List of paths to mark generated in version control (i.e. .gitattributes) Returns ------- list[str] | None The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args: list[Arg] = [] _ctx = self._select("vcsGeneratedPaths", _args) return await _ctx.execute(list[str] | None) @typecheck async def vcs_ignored_paths(self) -> list[str] | None: """List of paths to ignore in version control (i.e. .gitignore) Returns ------- list[str] | None The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args: list[Arg] = [] _ctx = self._select("vcsIgnoredPaths", _args) return await _ctx.execute(list[str] | None) @typecheck def with_vcs_generated_paths(self, paths: Sequence[str]) -> "GeneratedCode": """Set the list of paths to mark generated in version control""" _args = [ Arg("paths", paths), ] _ctx = self._select("withVCSGeneratedPaths", _args) return GeneratedCode(_ctx) @typecheck def with_vcs_ignored_paths(self, paths: Sequence[str]) -> "GeneratedCode": """Set the list of paths to ignore in version control""" _args = [ Arg("paths", paths), ] _ctx = self._select("withVCSIgnoredPaths", _args) return GeneratedCode(_ctx) def with_( self, cb: Callable[["GeneratedCode"], "GeneratedCode"] ) -> "GeneratedCode": """Call the provided callable with current GeneratedCode. This is useful for reusability and readability by not breaking the calling chain. """ return cb(self) class GitRef(Type): """A git ref (tag, branch or commit).""" @typecheck async def commit(self) -> str: """The resolved commit id at this ref. Returns ------- str The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args: list[Arg] = [] _ctx = self._select("commit", _args) return await _ctx.execute(str) @typecheck async def id(self) -> GitRefID: """Retrieves the content-addressed identifier of the git ref. Note ---- This is lazily evaluated, no operation is actually run. Returns ------- GitRefID A git reference identifier. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args: list[Arg] = [] _ctx = self._select("id", _args) return await _ctx.execute(GitRefID) @typecheck def tree( self, *, ssh_known_hosts: str | None = None, ssh_auth_socket: "Socket | None" = None, ) -> Directory: """The filesystem tree at this ref.""" _args = [ Arg("sshKnownHosts", ssh_known_hosts, None), Arg("sshAuthSocket", ssh_auth_socket, None), ] _ctx = self._select("tree", _args) return Directory(_ctx) class GitRepository(Type): """A git repository.""" @typecheck def branch(self, name: str) -> GitRef: """Returns details on one branch. Parameters ---------- name: Branch's name (e.g., "main"). """ _args = [ Arg("name", name), ] _ctx = self._select("branch", _args) return GitRef(_ctx) @typecheck def commit(self, id: str) -> GitRef: """Returns details on one commit. Parameters ---------- id: Identifier of the commit (e.g., "b6315d8f2810962c601af73f86831f6866ea798b"). """ _args = [ Arg("id", id), ] _ctx = self._select("commit", _args) return GitRef(_ctx) @typecheck async def id(self) -> GitRepositoryID: """Retrieves the content-addressed identifier of the git repository. Note ---- This is lazily evaluated, no operation is actually run. Returns ------- GitRepositoryID A git repository identifier. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args: list[Arg] = [] _ctx = self._select("id", _args) return await _ctx.execute(GitRepositoryID) @typecheck def tag(self, name: str) -> GitRef: """Returns details on one tag. Parameters ---------- name: Tag's name (e.g., "v0.3.9"). """ _args = [ Arg("name", name), ] _ctx = self._select("tag", _args) return GitRef(_ctx) class Host(Type): """Information about the host execution environment.""" @typecheck def directory( self, path: str, *, exclude: Sequence[str] | None = None, include: Sequence[str] | None = None, ) -> Directory: """Accesses a directory on the host. Parameters ---------- path: Location of the directory to access (e.g., "."). exclude: Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]). include: Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]). """ _args = [ Arg("path", path), Arg("exclude", exclude, None), Arg("include", include, None), ] _ctx = self._select("directory", _args) return Directory(_ctx) @typecheck def file(self, path: str) -> File: """Accesses a file on the host. Parameters ---------- path: Location of the file to retrieve (e.g., "README.md"). """ _args = [ Arg("path", path), ] _ctx = self._select("file", _args) return File(_ctx) @typecheck def service( self, ports: Sequence[PortForward], *, host: str | None = "localhost", ) -> "Service": """Creates a service that forwards traffic to a specified address via the host. Parameters ---------- ports: Ports to expose via the service, forwarding through the host network. If a port's frontend is unspecified or 0, it defaults to the same as the backend port. An empty set of ports is not valid; an error will be returned. host: Upstream host to forward traffic to. """ _args = [ Arg("ports", ports), Arg("host", host, "localhost"), ] _ctx = self._select("service", _args) return Service(_ctx) @typecheck def set_secret_file(self, name: str, path: str) -> "Secret": """Sets a secret given a user-defined name and the file path on the host, and returns the secret. The file is limited to a size of 512000 bytes. Parameters ---------- name: The user defined name for this secret. path: Location of the file to set as a secret. """ _args = [ Arg("name", name), Arg("path", path), ] _ctx = self._select("setSecretFile", _args) return Secret(_ctx) @typecheck def tunnel( self, service: "Service", *, native: bool | None = False, ports: Sequence[PortForward] | None = None, ) -> "Service": """Creates a tunnel that forwards traffic from the host to a service. Parameters ---------- service: Service to send traffic from the tunnel. native: Map each service port to the same port on the host, as if the service were running natively. Note: enabling may result in port conflicts. ports: Configure explicit port forwarding rules for the tunnel. If a port's frontend is unspecified or 0, a random port will be chosen by the host. If no ports are given, all of the service's ports are forwarded. If native is true, each port maps to the same port on the host. If native is false, each port maps to a random port chosen by the host. If ports are given and native is true, the ports are additive. """ _args = [ Arg("service", service), Arg("native", native, False), Arg("ports", ports, None), ] _ctx = self._select("tunnel", _args) return Service(_ctx) @typecheck def unix_socket(self, path: str) -> "Socket": """Accesses a Unix socket on the host. Parameters ---------- path: Location of the Unix socket (e.g., "/var/run/docker.sock"). """ _args = [ Arg("path", path), ] _ctx = self._select("unixSocket", _args) return Socket(_ctx) class Label(Type): """A simple key value object that represents a label.""" __slots__ = ( "_name", "_value", ) _name: str | None _value: str | None @typecheck async def name(self) -> str: """The label name. Returns ------- str The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ if hasattr(self, "_name"): return self._name _args: list[Arg] = [] _ctx = self._select("name", _args) return await _ctx.execute(str) @typecheck async def value(self) -> str: """The label value. Returns ------- str The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ if hasattr(self, "_value"): return self._value _args: list[Arg] = [] _ctx = self._select("value", _args) return await _ctx.execute(str) class ListTypeDef(Type): """A definition of a list type in a Module.""" @typecheck def element_type_def(self) -> "TypeDef": """The type of the elements in the list""" _args: list[Arg] = [] _ctx = self._select("elementTypeDef", _args) return TypeDef(_ctx) class Module(Type): __slots__ = ( "_dependency_config", "_description", "_name", "_sdk", "_serve", "_source_directory_sub_path", ) _dependency_config: str | None _description: str | None _name: str | None _sdk: str | None _serve: Void | None _source_directory_sub_path: str | None @typecheck async def dependencies(self) -> list["Module"]: """Modules used by this module""" _args: list[Arg] = [] _ctx = self._select("dependencies", _args) _ctx = Module(_ctx)._select_multiple( _dependency_config="dependencyConfig", _description="description", _name="name", _sdk="sdk", _serve="serve", _source_directory_sub_path="sourceDirectorySubPath", ) return await _ctx.execute(list[Module]) @typecheck async def dependency_config(self) -> list[str]: """The dependencies as configured by the module Returns ------- list[str] The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ if hasattr(self, "_dependency_config"): return self._dependency_config _args: list[Arg] = [] _ctx = self._select("dependencyConfig", _args) return await _ctx.execute(list[str]) @typecheck async def description(self) -> str | None: """The doc string of the module, if any Returns ------- str | None The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ if hasattr(self, "_description"): return self._description _args: list[Arg] = [] _ctx = self._select("description", _args) return await _ctx.execute(str | None) @typecheck def generated_code(self) -> GeneratedCode: """The code generated by the SDK's runtime""" _args: list[Arg] = [] _ctx = self._select("generatedCode", _args) return GeneratedCode(_ctx) @typecheck async def id(self) -> ModuleID: """The ID of the module Note ---- This is lazily evaluated, no operation is actually run. Returns ------- ModuleID A reference to a Module. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args: list[Arg] = [] _ctx = self._select("id", _args) return await _ctx.execute(ModuleID) @typecheck async def name(self) -> str: """The name of the module Returns ------- str The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ if hasattr(self, "_name"): return self._name _args: list[Arg] = [] _ctx = self._select("name", _args) return await _ctx.execute(str) @typecheck async def objects(self) -> list["TypeDef"]: """Objects served by this module""" _args: list[Arg] = [] _ctx = self._select("objects", _args) _ctx = TypeDef(_ctx)._select_multiple( _kind="kind", _optional="optional", ) return await _ctx.execute(list[TypeDef]) @typecheck async def sdk(self) -> str: """The SDK used by this module. Either a name of a builtin SDK or a module ref pointing to the SDK's implementation. Returns ------- str The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ if hasattr(self, "_sdk"): return self._sdk _args: list[Arg] = [] _ctx = self._select("sdk", _args) return await _ctx.execute(str) @typecheck async def serve(self) -> Void | None: """Serve a module's API in the current session. Note: this can only be called once per session. In the future, it could return a stream or service to remove the side effect. Returns ------- Void | None The absense of a value. A Null Void is used as a placeholder for resolvers that do not return anything. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ if hasattr(self, "_serve"): return self._serve _args: list[Arg] = [] _ctx = self._select("serve", _args) return await _ctx.execute(Void | None) @typecheck def source_directory(self) -> Directory: """The directory containing the module's source code""" _args: list[Arg] = [] _ctx = self._select("sourceDirectory", _args) return Directory(_ctx) @typecheck async def source_directory_sub_path(self) -> str: """The module's subpath within the source directory Returns ------- str The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ if hasattr(self, "_source_directory_sub_path"): return self._source_directory_sub_path _args: list[Arg] = [] _ctx = self._select("sourceDirectorySubPath", _args) return await _ctx.execute(str) @typecheck def with_object(self, object: "TypeDef") -> "Module": """This module plus the given Object type and associated functions""" _args = [ Arg("object", object), ] _ctx = self._select("withObject", _args) return Module(_ctx) def with_(self, cb: Callable[["Module"], "Module"]) -> "Module": """Call the provided callable with current Module. This is useful for reusability and readability by not breaking the calling chain. """ return cb(self) class ModuleConfig(Type): """Static configuration for a module (e.g. parsed contents of dagger.json)""" @typecheck async def dependencies(self) -> list[str] | None: """Modules that this module depends on. Returns ------- list[str] | None The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args: list[Arg] = [] _ctx = self._select("dependencies", _args) return await _ctx.execute(list[str] | None) @typecheck async def exclude(self) -> list[str] | None: """Exclude these file globs when loading the module root. Returns ------- list[str] | None The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args: list[Arg] = [] _ctx = self._select("exclude", _args) return await _ctx.execute(list[str] | None) @typecheck async def include(self) -> list[str] | None: """Include only these file globs when loading the module root. Returns ------- list[str] | None The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args: list[Arg] = [] _ctx = self._select("include", _args) return await _ctx.execute(list[str] | None) @typecheck async def name(self) -> str: """The name of the module. Returns ------- str The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args: list[Arg] = [] _ctx = self._select("name", _args) return await _ctx.execute(str) @typecheck async def root(self) -> str | None: """The root directory of the module's project, which may be above the module source code. Returns ------- str | None The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args: list[Arg] = [] _ctx = self._select("root", _args) return await _ctx.execute(str | None) @typecheck async def sdk(self) -> str: """Either the name of a built-in SDK ('go', 'python', etc.) OR a module reference pointing to the SDK's module implementation. Returns ------- str The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args: list[Arg] = [] _ctx = self._select("sdk", _args) return await _ctx.execute(str) class ObjectTypeDef(Type): """A definition of a custom object defined in a Module.""" @typecheck def constructor(self) -> Function: """The function used to construct new instances of this object, if any""" _args: list[Arg] = [] _ctx = self._select("constructor", _args) return Function(_ctx) @typecheck async def description(self) -> str | None: """The doc string for the object, if any Returns ------- str | None The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args: list[Arg] = [] _ctx = self._select("description", _args) return await _ctx.execute(str | None) @typecheck async def fields(self) -> list[FieldTypeDef]: """Static fields defined on this object, if any""" _args: list[Arg] = [] _ctx = self._select("fields", _args) _ctx = FieldTypeDef(_ctx)._select_multiple( _description="description", _name="name", ) return await _ctx.execute(list[FieldTypeDef]) @typecheck async def functions(self) -> list[Function]: """Functions defined on this object, if any""" _args: list[Arg] = [] _ctx = self._select("functions", _args) _ctx = Function(_ctx)._select_multiple( _description="description", _name="name", ) return await _ctx.execute(list[Function]) @typecheck async def name(self) -> str: """The name of the object Returns ------- str The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args: list[Arg] = [] _ctx = self._select("name", _args) return await _ctx.execute(str) class Port(Type): """A port exposed by a container.""" __slots__ = ( "_description", "_port", "_protocol", ) _description: str | None _port: int | None _protocol: NetworkProtocol | None @typecheck async def description(self) -> str | None: """The port description. Returns ------- str | None The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ if hasattr(self, "_description"): return self._description _args: list[Arg] = [] _ctx = self._select("description", _args) return await _ctx.execute(str | None) @typecheck async def port(self) -> int: """The port number. Returns ------- int The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ if hasattr(self, "_port"): return self._port _args: list[Arg] = [] _ctx = self._select("port", _args) return await _ctx.execute(int) @typecheck async def protocol(self) -> NetworkProtocol: """The transport layer network protocol. Returns ------- NetworkProtocol Transport layer network protocol associated to a port. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ if hasattr(self, "_protocol"): return self._protocol _args: list[Arg] = [] _ctx = self._select("protocol", _args) return await _ctx.execute(NetworkProtocol) class Client(Root): @typecheck def cache_volume(self, key: str) -> CacheVolume: """Constructs a cache volume for a given cache key. Parameters ---------- key: A string identifier to target this cache volume (e.g., "modules- cache"). """ _args = [ Arg("key", key), ] _ctx = self._select("cacheVolume", _args) return CacheVolume(_ctx) @typecheck async def check_version_compatibility(self, version: str) -> bool: """Checks if the current Dagger Engine is compatible with an SDK's required version. Parameters ---------- version: The SDK's required version. Returns ------- bool The `Boolean` scalar type represents `true` or `false`. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args = [ Arg("version", version), ] _ctx = self._select("checkVersionCompatibility", _args) return await _ctx.execute(bool) @typecheck def container( self, *, id: ContainerID | None = None, platform: Platform | None = None, ) -> Container: """Creates a scratch container or loads one by ID. Optional platform argument initializes new containers to execute and publish as that platform. Platform defaults to that of the builder's host. """ _args = [ Arg("id", id, None), Arg("platform", platform, None), ] _ctx = self._select("container", _args) return Container(_ctx) @typecheck def current_function_call(self) -> FunctionCall: """The FunctionCall context that the SDK caller is currently executing in. If the caller is not currently executing in a function, this will return an error. """ _args: list[Arg] = [] _ctx = self._select("currentFunctionCall", _args) return FunctionCall(_ctx) @typecheck def current_module(self) -> Module: """The module currently being served in the session, if any.""" _args: list[Arg] = [] _ctx = self._select("currentModule", _args) return Module(_ctx) @typecheck async def default_platform(self) -> Platform: """The default platform of the builder. Returns ------- Platform The platform config OS and architecture in a Container. The format is [os]/[platform]/[version] (e.g., "darwin/arm64/v7", "windows/amd64", "linux/arm64"). Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args: list[Arg] = [] _ctx = self._select("defaultPlatform", _args) return await _ctx.execute(Platform) @typecheck def directory(self, *, id: DirectoryID | None = None) -> Directory: """Creates an empty directory or loads one by ID.""" _args = [ Arg("id", id, None), ] _ctx = self._select("directory", _args) return Directory(_ctx) @typecheck def file(self, id: FileID) -> File: """Loads a file by ID. .. deprecated:: Use :py:meth:`load_file_from_id` instead. """ warnings.warn( 'Method "file" is deprecated: Use "load_file_from_id" instead.', DeprecationWarning, stacklevel=4, ) _args = [ Arg("id", id), ] _ctx = self._select("file", _args) return File(_ctx) @typecheck def function(self, name: str, return_type: "TypeDef") -> Function: """Create a function.""" _args = [ Arg("name", name), Arg("returnType", return_type), ] _ctx = self._select("function", _args) return Function(_ctx) @typecheck def generated_code(self, code: Directory) -> GeneratedCode: """Create a code generation result, given a directory containing the generated code. """ _args = [ Arg("code", code), ] _ctx = self._select("generatedCode", _args) return GeneratedCode(_ctx) @typecheck def git( self, url: str, *, keep_git_dir: bool | None = None, ssh_known_hosts: str | None = None, ssh_auth_socket: "Socket | None" = None, experimental_service_host: "Service | None" = None, ) -> GitRepository: """Queries a git repository. Parameters ---------- url: Url of the git repository. Can be formatted as `https://{host}/{owner}/{repo}`, `git@{host}:{owner}/{repo}` Suffix ".git" is optional. keep_git_dir: Set to true to keep .git directory. ssh_known_hosts: Set SSH known hosts ssh_auth_socket: Set SSH auth socket experimental_service_host: A service which must be started before the repo is fetched. """ _args = [ Arg("url", url), Arg("keepGitDir", keep_git_dir, None), Arg("sshKnownHosts", ssh_known_hosts, None), Arg("sshAuthSocket", ssh_auth_socket, None), Arg("experimentalServiceHost", experimental_service_host, None), ] _ctx = self._select("git", _args) return GitRepository(_ctx) @typecheck def host(self) -> Host: """Queries the host environment.""" _args: list[Arg] = [] _ctx = self._select("host", _args) return Host(_ctx) @typecheck def http( self, url: str, *, experimental_service_host: "Service | None" = None, ) -> File: """Returns a file containing an http remote url content. Parameters ---------- url: HTTP url to get the content from (e.g., "https://docs.dagger.io"). experimental_service_host: A service which must be started before the URL is fetched. """ _args = [ Arg("url", url), Arg("experimentalServiceHost", experimental_service_host, None), ] _ctx = self._select("http", _args) return File(_ctx) @typecheck def load_cache_volume_from_id(self, id: CacheVolumeID) -> CacheVolume: """Load a CacheVolume from its ID.""" _args = [ Arg("id", id), ] _ctx = self._select("loadCacheVolumeFromID", _args) return CacheVolume(_ctx) @typecheck def load_container_from_id(self, id: ContainerID) -> Container: """Loads a container from an ID.""" _args = [ Arg("id", id), ] _ctx = self._select("loadContainerFromID", _args) return Container(_ctx) @typecheck def load_directory_from_id(self, id: DirectoryID) -> Directory: """Load a Directory from its ID.""" _args = [ Arg("id", id), ] _ctx = self._select("loadDirectoryFromID", _args) return Directory(_ctx) @typecheck def load_file_from_id(self, id: FileID) -> File: """Load a File from its ID.""" _args = [ Arg("id", id), ] _ctx = self._select("loadFileFromID", _args) return File(_ctx) @typecheck def load_function_arg_from_id(self, id: FunctionArgID) -> FunctionArg: """Load a function argument by ID.""" _args = [ Arg("id", id), ] _ctx = self._select("loadFunctionArgFromID", _args) return FunctionArg(_ctx) @typecheck def load_function_from_id(self, id: FunctionID) -> Function: """Load a function by ID.""" _args = [ Arg("id", id), ] _ctx = self._select("loadFunctionFromID", _args) return Function(_ctx) @typecheck def load_generated_code_from_id(self, id: GeneratedCodeID) -> GeneratedCode: """Load a GeneratedCode by ID.""" _args = [ Arg("id", id), ] _ctx = self._select("loadGeneratedCodeFromID", _args) return GeneratedCode(_ctx) @typecheck def load_git_ref_from_id(self, id: GitRefID) -> GitRef: """Load a git ref from its ID.""" _args = [ Arg("id", id), ] _ctx = self._select("loadGitRefFromID", _args) return GitRef(_ctx) @typecheck def load_git_repository_from_id(self, id: GitRepositoryID) -> GitRepository: """Load a git repository from its ID.""" _args = [ Arg("id", id), ] _ctx = self._select("loadGitRepositoryFromID", _args) return GitRepository(_ctx) @typecheck def load_module_from_id(self, id: ModuleID) -> Module: """Load a module by ID.""" _args = [ Arg("id", id), ] _ctx = self._select("loadModuleFromID", _args) return Module(_ctx) @typecheck def load_secret_from_id(self, id: SecretID) -> "Secret": """Load a Secret from its ID.""" _args = [ Arg("id", id), ] _ctx = self._select("loadSecretFromID", _args) return Secret(_ctx) @typecheck def load_service_from_id(self, id: ServiceID) -> "Service": """Loads a service from ID.""" _args = [ Arg("id", id), ] _ctx = self._select("loadServiceFromID", _args) return Service(_ctx) @typecheck def load_socket_from_id(self, id: SocketID) -> "Socket": """Load a Socket from its ID.""" _args = [ Arg("id", id), ] _ctx = self._select("loadSocketFromID", _args) return Socket(_ctx) @typecheck def load_type_def_from_id(self, id: TypeDefID) -> "TypeDef": """Load a TypeDef by ID.""" _args = [ Arg("id", id), ] _ctx = self._select("loadTypeDefFromID", _args) return TypeDef(_ctx) @typecheck def module(self) -> Module: """Create a new module.""" _args: list[Arg] = [] _ctx = self._select("module", _args) return Module(_ctx) @typecheck def module_config( self, source_directory: Directory, *, subpath: str | None = None, ) -> ModuleConfig: """Load the static configuration for a module from the given source directory and optional subpath. """ _args = [ Arg("sourceDirectory", source_directory), Arg("subpath", subpath, None), ] _ctx = self._select("moduleConfig", _args) return ModuleConfig(_ctx) @typecheck def pipeline( self, name: str, *, description: str | None = None, labels: Sequence[PipelineLabel] | None = None, ) -> "Client": """Creates a named sub-pipeline. Parameters ---------- name: Pipeline name. description: Pipeline description. labels: Pipeline labels. """ _args = [ Arg("name", name), Arg("description", description, None), Arg("labels", labels, None), ] _ctx = self._select("pipeline", _args) return Client(_ctx) @typecheck def secret(self, id: SecretID) -> "Secret": """Loads a secret from its ID. .. deprecated:: Use :py:meth:`load_secret_from_id` instead """ warnings.warn( 'Method "secret" is deprecated: Use "load_secret_from_id" instead', DeprecationWarning, stacklevel=4, ) _args = [ Arg("id", id), ] _ctx = self._select("secret", _args) return Secret(_ctx) @typecheck def set_secret(self, name: str, plaintext: str) -> "Secret": """Sets a secret given a user defined name to its plaintext and returns the secret. The plaintext value is limited to a size of 128000 bytes. Parameters ---------- name: The user defined name for this secret plaintext: The plaintext of the secret """ _args = [ Arg("name", name), Arg("plaintext", plaintext), ] _ctx = self._select("setSecret", _args) return Secret(_ctx) @typecheck def socket(self, *, id: SocketID | None = None) -> "Socket": """Loads a socket by its ID. .. deprecated:: Use :py:meth:`load_socket_from_id` instead. """ warnings.warn( 'Method "socket" is deprecated: Use "load_socket_from_id" instead.', DeprecationWarning, stacklevel=4, ) _args = [ Arg("id", id, None), ] _ctx = self._select("socket", _args) return Socket(_ctx) @typecheck def type_def(self) -> "TypeDef": """Create a new TypeDef.""" _args: list[Arg] = [] _ctx = self._select("typeDef", _args) return TypeDef(_ctx) def with_(self, cb: Callable[["Client"], "Client"]) -> "Client": """Call the provided callable with current Client. This is useful for reusability and readability by not breaking the calling chain. """ return cb(self) class Secret(Type): """A reference to a secret value, which can be handled more safely than the value itself.""" @typecheck async def id(self) -> SecretID: """The identifier for this secret. Note ---- This is lazily evaluated, no operation is actually run. Returns ------- SecretID A unique identifier for a secret. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args: list[Arg] = [] _ctx = self._select("id", _args) return await _ctx.execute(SecretID) @typecheck async def plaintext(self) -> str: """The value of this secret. Returns ------- str The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args: list[Arg] = [] _ctx = self._select("plaintext", _args) return await _ctx.execute(str) class Service(Type): @typecheck async def endpoint( self, *, port: int | None = None, scheme: str | None = None, ) -> str: """Retrieves an endpoint that clients can use to reach this container. If no port is specified, the first exposed port is used. If none exist an error is returned. If a scheme is specified, a URL is returned. Otherwise, a host:port pair is returned. Parameters ---------- port: The exposed port number for the endpoint scheme: Return a URL with the given scheme, eg. http for http:// Returns ------- str The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args = [ Arg("port", port, None), Arg("scheme", scheme, None), ] _ctx = self._select("endpoint", _args) return await _ctx.execute(str) @typecheck async def hostname(self) -> str: """Retrieves a hostname which can be used by clients to reach this container. Returns ------- str The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args: list[Arg] = [] _ctx = self._select("hostname", _args) return await _ctx.execute(str) @typecheck async def id(self) -> ServiceID: """A unique identifier for this service. Note ---- This is lazily evaluated, no operation is actually run. Returns ------- ServiceID A unique service identifier. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args: list[Arg] = [] _ctx = self._select("id", _args) return await _ctx.execute(ServiceID) @typecheck async def ports(self) -> list[Port]: """Retrieves the list of ports provided by the service.""" _args: list[Arg] = [] _ctx = self._select("ports", _args) _ctx = Port(_ctx)._select_multiple( _description="description", _port="port", _protocol="protocol", ) return await _ctx.execute(list[Port]) @typecheck async def start(self) -> "Service": """Start the service and wait for its health checks to succeed. Services bound to a Container do not need to be manually started. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args: list[Arg] = [] _ctx = self._select("start", _args) _id = await _ctx.execute(ServiceID) _ctx = Client.from_context(_ctx)._select("loadServiceFromID", [Arg("id", _id)]) return Service(_ctx) @typecheck async def stop(self) -> "Service": """Stop the service. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args: list[Arg] = [] _ctx = self._select("stop", _args) _id = await _ctx.execute(ServiceID) _ctx = Client.from_context(_ctx)._select("loadServiceFromID", [Arg("id", _id)]) return Service(_ctx) class Socket(Type): @typecheck async def id(self) -> SocketID: """The content-addressed identifier of the socket. Note ---- This is lazily evaluated, no operation is actually run. Returns ------- SocketID A content-addressed socket identifier. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args: list[Arg] = [] _ctx = self._select("id", _args) return await _ctx.execute(SocketID) class TypeDef(Type): """A definition of a parameter or return type in a Module.""" __slots__ = ( "_kind", "_optional", ) _kind: TypeDefKind | None _optional: bool | None @typecheck def as_list(self) -> ListTypeDef: """If kind is LIST, the list-specific type definition. If kind is not LIST, this will be null. """ _args: list[Arg] = [] _ctx = self._select("asList", _args) return ListTypeDef(_ctx) @typecheck def as_object(self) -> ObjectTypeDef: """If kind is OBJECT, the object-specific type definition. If kind is not OBJECT, this will be null. """ _args: list[Arg] = [] _ctx = self._select("asObject", _args) return ObjectTypeDef(_ctx) @typecheck async def id(self) -> TypeDefID: """Note ---- This is lazily evaluated, no operation is actually run. Returns ------- TypeDefID A reference to a TypeDef. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ _args: list[Arg] = [] _ctx = self._select("id", _args) return await _ctx.execute(TypeDefID) @typecheck async def kind(self) -> TypeDefKind | None: """The kind of type this is (e.g. primitive, list, object) Returns ------- TypeDefKind | None Distinguishes the different kinds of TypeDefs. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ if hasattr(self, "_kind"): return self._kind _args: list[Arg] = [] _ctx = self._select("kind", _args) return await _ctx.execute(TypeDefKind | None) @typecheck async def optional(self) -> bool: """Whether this type can be set to null. Defaults to false. Returns ------- bool The `Boolean` scalar type represents `true` or `false`. Raises ------ ExecuteTimeoutError If the time to execute the query exceeds the configured timeout. QueryError If the API returns an error. """ if hasattr(self, "_optional"): return self._optional _args: list[Arg] = [] _ctx = self._select("optional", _args) return await _ctx.execute(bool) @typecheck def with_constructor(self, function: Function) -> "TypeDef": """Adds a function for constructing a new instance of an Object TypeDef, failing if the type is not an object. """ _args = [ Arg("function", function), ] _ctx = self._select("withConstructor", _args) return TypeDef(_ctx) @typecheck def with_field( self, name: str, type_def: "TypeDef", *, description: str | None = None, ) -> "TypeDef": """Adds a static field for an Object TypeDef, failing if the type is not an object. Parameters ---------- name: The name of the field in the object type_def: The type of the field description: A doc string for the field, if any """ _args = [ Arg("name", name), Arg("typeDef", type_def), Arg("description", description, None), ] _ctx = self._select("withField", _args) return TypeDef(_ctx) @typecheck def with_function(self, function: Function) -> "TypeDef": """Adds a function for an Object TypeDef, failing if the type is not an object. """ _args = [ Arg("function", function), ] _ctx = self._select("withFunction", _args) return TypeDef(_ctx) @typecheck def with_kind(self, kind: TypeDefKind) -> "TypeDef": """Sets the kind of the type.""" _args = [ Arg("kind", kind), ] _ctx = self._select("withKind", _args) return TypeDef(_ctx) @typecheck def with_list_of(self, element_type: "TypeDef") -> "TypeDef": """Returns a TypeDef of kind List with the provided type for its elements. """ _args = [ Arg("elementType", element_type), ] _ctx = self._select("withListOf", _args) return TypeDef(_ctx) @typecheck def with_object( self, name: str, *, description: str | None = None, ) -> "TypeDef": """Returns a TypeDef of kind Object with the provided name. Note that an object's fields and functions may be omitted if the intent is only to refer to an object. This is how functions are able to return their own object, or any other circular reference. """ _args = [ Arg("name", name), Arg("description", description, None), ] _ctx = self._select("withObject", _args) return TypeDef(_ctx) @typecheck def with_optional(self, optional: bool) -> "TypeDef": """Sets whether this type can be set to null.""" _args = [ Arg("optional", optional), ] _ctx = self._select("withOptional", _args) return TypeDef(_ctx) def with_(self, cb: Callable[["TypeDef"], "TypeDef"]) -> "TypeDef": """Call the provided callable with current TypeDef. This is useful for reusability and readability by not breaking the calling chain. """ return cb(self) dag = Client() """The global client instance.""" __all__ = [ "BuildArg", "CacheSharingMode", "CacheVolume", "CacheVolumeID", "Client", "Container", "ContainerID", "Directory", "DirectoryID", "EnvVariable", "FieldTypeDef", "File", "FileID", "Function", "FunctionArg", "FunctionArgID", "FunctionCall", "FunctionCallArgValue", "FunctionID", "GeneratedCode", "GeneratedCodeID", "GitRef", "GitRefID", "GitRepository", "GitRepositoryID", "Host", "ImageLayerCompression", "ImageMediaTypes", "JSON", "Label", "ListTypeDef", "Module", "ModuleConfig", "ModuleID", "NetworkProtocol", "ObjectTypeDef", "PipelineLabel", "Platform", "Port", "PortForward", "Secret", "SecretID", "Service", "ServiceID", "Socket", "SocketID", "TypeDef", "TypeDefID", "TypeDefKind", "Void", "dag", ]
closed
dagger/dagger
https://github.com/dagger/dagger
3,284
Use `withoutEntrypoint`, `withoutWorkdir`, `withoutUser` and `withoutDefaultArgs` to remove
Currently, passing nil or empty arguments to those function reinit the values. It's not that explicit and clear. It will make more API endpoints, but it's gonna be clearer.
https://github.com/dagger/dagger/issues/3284
https://github.com/dagger/dagger/pull/6278
568d802bb892f1e074cf74cfce2a551989418964
cd825bde699a0beb0adb5c2529da5469118a172b
"2022-10-07T15:00:07Z"
go
"2023-12-19T13:11:01Z"
sdk/rust/crates/dagger-sdk/src/gen.rs
use crate::core::graphql_client::DynGraphQLClient; use crate::errors::DaggerError; use crate::querybuilder::Selection; use derive_builder::Builder; use serde::{Deserialize, Serialize}; use std::sync::Arc; use tokio::process::Child; #[derive(Serialize, Deserialize, PartialEq, Debug, Clone)] pub struct CacheVolumeId(pub String); impl Into<CacheVolumeId> for &str { fn into(self) -> CacheVolumeId { CacheVolumeId(self.to_string()) } } impl Into<CacheVolumeId> for String { fn into(self) -> CacheVolumeId { CacheVolumeId(self.clone()) } } impl CacheVolumeId { fn quote(&self) -> String { format!("\"{}\"", self.0.clone()) } } #[derive(Serialize, Deserialize, PartialEq, Debug, Clone)] pub struct ContainerId(pub String); impl Into<ContainerId> for &str { fn into(self) -> ContainerId { ContainerId(self.to_string()) } } impl Into<ContainerId> for String { fn into(self) -> ContainerId { ContainerId(self.clone()) } } impl ContainerId { fn quote(&self) -> String { format!("\"{}\"", self.0.clone()) } } #[derive(Serialize, Deserialize, PartialEq, Debug, Clone)] pub struct DirectoryId(pub String); impl Into<DirectoryId> for &str { fn into(self) -> DirectoryId { DirectoryId(self.to_string()) } } impl Into<DirectoryId> for String { fn into(self) -> DirectoryId { DirectoryId(self.clone()) } } impl DirectoryId { fn quote(&self) -> String { format!("\"{}\"", self.0.clone()) } } #[derive(Serialize, Deserialize, PartialEq, Debug, Clone)] pub struct FileId(pub String); impl Into<FileId> for &str { fn into(self) -> FileId { FileId(self.to_string()) } } impl Into<FileId> for String { fn into(self) -> FileId { FileId(self.clone()) } } impl FileId { fn quote(&self) -> String { format!("\"{}\"", self.0.clone()) } } #[derive(Serialize, Deserialize, PartialEq, Debug, Clone)] pub struct FunctionArgId(pub String); impl Into<FunctionArgId> for &str { fn into(self) -> FunctionArgId { FunctionArgId(self.to_string()) } } impl Into<FunctionArgId> for String { fn into(self) -> FunctionArgId { FunctionArgId(self.clone()) } } impl FunctionArgId { fn quote(&self) -> String { format!("\"{}\"", self.0.clone()) } } #[derive(Serialize, Deserialize, PartialEq, Debug, Clone)] pub struct FunctionId(pub String); impl Into<FunctionId> for &str { fn into(self) -> FunctionId { FunctionId(self.to_string()) } } impl Into<FunctionId> for String { fn into(self) -> FunctionId { FunctionId(self.clone()) } } impl FunctionId { fn quote(&self) -> String { format!("\"{}\"", self.0.clone()) } } #[derive(Serialize, Deserialize, PartialEq, Debug, Clone)] pub struct GeneratedCodeId(pub String); impl Into<GeneratedCodeId> for &str { fn into(self) -> GeneratedCodeId { GeneratedCodeId(self.to_string()) } } impl Into<GeneratedCodeId> for String { fn into(self) -> GeneratedCodeId { GeneratedCodeId(self.clone()) } } impl GeneratedCodeId { fn quote(&self) -> String { format!("\"{}\"", self.0.clone()) } } #[derive(Serialize, Deserialize, PartialEq, Debug, Clone)] pub struct GitRefId(pub String); impl Into<GitRefId> for &str { fn into(self) -> GitRefId { GitRefId(self.to_string()) } } impl Into<GitRefId> for String { fn into(self) -> GitRefId { GitRefId(self.clone()) } } impl GitRefId { fn quote(&self) -> String { format!("\"{}\"", self.0.clone()) } } #[derive(Serialize, Deserialize, PartialEq, Debug, Clone)] pub struct GitRepositoryId(pub String); impl Into<GitRepositoryId> for &str { fn into(self) -> GitRepositoryId { GitRepositoryId(self.to_string()) } } impl Into<GitRepositoryId> for String { fn into(self) -> GitRepositoryId { GitRepositoryId(self.clone()) } } impl GitRepositoryId { fn quote(&self) -> String { format!("\"{}\"", self.0.clone()) } } #[derive(Serialize, Deserialize, PartialEq, Debug, Clone)] pub struct Json(pub String); impl Into<Json> for &str { fn into(self) -> Json { Json(self.to_string()) } } impl Into<Json> for String { fn into(self) -> Json { Json(self.clone()) } } impl Json { fn quote(&self) -> String { format!("\"{}\"", self.0.clone()) } } #[derive(Serialize, Deserialize, PartialEq, Debug, Clone)] pub struct ModuleId(pub String); impl Into<ModuleId> for &str { fn into(self) -> ModuleId { ModuleId(self.to_string()) } } impl Into<ModuleId> for String { fn into(self) -> ModuleId { ModuleId(self.clone()) } } impl ModuleId { fn quote(&self) -> String { format!("\"{}\"", self.0.clone()) } } #[derive(Serialize, Deserialize, PartialEq, Debug, Clone)] pub struct Platform(pub String); impl Into<Platform> for &str { fn into(self) -> Platform { Platform(self.to_string()) } } impl Into<Platform> for String { fn into(self) -> Platform { Platform(self.clone()) } } impl Platform { fn quote(&self) -> String { format!("\"{}\"", self.0.clone()) } } #[derive(Serialize, Deserialize, PartialEq, Debug, Clone)] pub struct SecretId(pub String); impl Into<SecretId> for &str { fn into(self) -> SecretId { SecretId(self.to_string()) } } impl Into<SecretId> for String { fn into(self) -> SecretId { SecretId(self.clone()) } } impl SecretId { fn quote(&self) -> String { format!("\"{}\"", self.0.clone()) } } #[derive(Serialize, Deserialize, PartialEq, Debug, Clone)] pub struct ServiceId(pub String); impl Into<ServiceId> for &str { fn into(self) -> ServiceId { ServiceId(self.to_string()) } } impl Into<ServiceId> for String { fn into(self) -> ServiceId { ServiceId(self.clone()) } } impl ServiceId { fn quote(&self) -> String { format!("\"{}\"", self.0.clone()) } } #[derive(Serialize, Deserialize, PartialEq, Debug, Clone)] pub struct SocketId(pub String); impl Into<SocketId> for &str { fn into(self) -> SocketId { SocketId(self.to_string()) } } impl Into<SocketId> for String { fn into(self) -> SocketId { SocketId(self.clone()) } } impl SocketId { fn quote(&self) -> String { format!("\"{}\"", self.0.clone()) } } #[derive(Serialize, Deserialize, PartialEq, Debug, Clone)] pub struct TypeDefId(pub String); impl Into<TypeDefId> for &str { fn into(self) -> TypeDefId { TypeDefId(self.to_string()) } } impl Into<TypeDefId> for String { fn into(self) -> TypeDefId { TypeDefId(self.clone()) } } impl TypeDefId { fn quote(&self) -> String { format!("\"{}\"", self.0.clone()) } } #[derive(Serialize, Deserialize, PartialEq, Debug, Clone)] pub struct Void(pub String); impl Into<Void> for &str { fn into(self) -> Void { Void(self.to_string()) } } impl Into<Void> for String { fn into(self) -> Void { Void(self.clone()) } } impl Void { fn quote(&self) -> String { format!("\"{}\"", self.0.clone()) } } #[derive(Serialize, Deserialize, Debug, PartialEq, Clone)] pub struct BuildArg { pub name: String, pub value: String, } #[derive(Serialize, Deserialize, Debug, PartialEq, Clone)] pub struct PipelineLabel { pub name: String, pub value: String, } #[derive(Serialize, Deserialize, Debug, PartialEq, Clone)] pub struct PortForward { pub backend: isize, pub frontend: isize, pub protocol: NetworkProtocol, } #[derive(Clone)] pub struct CacheVolume { pub proc: Option<Arc<Child>>, pub selection: Selection, pub graphql_client: DynGraphQLClient, } impl CacheVolume { pub async fn id(&self) -> Result<CacheVolumeId, DaggerError> { let query = self.selection.select("id"); query.execute(self.graphql_client.clone()).await } } #[derive(Clone)] pub struct Container { pub proc: Option<Arc<Child>>, pub selection: Selection, pub graphql_client: DynGraphQLClient, } #[derive(Builder, Debug, PartialEq)] pub struct ContainerAsTarballOpts { /// Force each layer of the image to use the specified compression algorithm. /// If this is unset, then if a layer already has a compressed blob in the engine's /// cache, that will be used (this can result in a mix of compression algorithms for /// different layers). If this is unset and a layer has no compressed blob in the /// engine's cache, then it will be compressed using Gzip. #[builder(setter(into, strip_option), default)] pub forced_compression: Option<ImageLayerCompression>, /// Use the specified media types for the image's layers. Defaults to OCI, which /// is largely compatible with most recent container runtimes, but Docker may be needed /// for older runtimes without OCI support. #[builder(setter(into, strip_option), default)] pub media_types: Option<ImageMediaTypes>, /// Identifiers for other platform specific containers. /// Used for multi-platform image. #[builder(setter(into, strip_option), default)] pub platform_variants: Option<Vec<ContainerId>>, } #[derive(Builder, Debug, PartialEq)] pub struct ContainerBuildOpts<'a> { /// Additional build arguments. #[builder(setter(into, strip_option), default)] pub build_args: Option<Vec<BuildArg>>, /// Path to the Dockerfile to use. /// Default: './Dockerfile'. #[builder(setter(into, strip_option), default)] pub dockerfile: Option<&'a str>, /// Secrets to pass to the build. /// They will be mounted at /run/secrets/[secret-name] in the build container /// They can be accessed in the Dockerfile using the "secret" mount type /// and mount path /run/secrets/[secret-name] /// e.g. RUN --mount=type=secret,id=my-secret curl url?token=$(cat /run/secrets/my-secret)" #[builder(setter(into, strip_option), default)] pub secrets: Option<Vec<SecretId>>, /// Target build stage to build. #[builder(setter(into, strip_option), default)] pub target: Option<&'a str>, } #[derive(Builder, Debug, PartialEq)] pub struct ContainerExportOpts { /// Force each layer of the exported image to use the specified compression algorithm. /// If this is unset, then if a layer already has a compressed blob in the engine's /// cache, that will be used (this can result in a mix of compression algorithms for /// different layers). If this is unset and a layer has no compressed blob in the /// engine's cache, then it will be compressed using Gzip. #[builder(setter(into, strip_option), default)] pub forced_compression: Option<ImageLayerCompression>, /// Use the specified media types for the exported image's layers. Defaults to OCI, which /// is largely compatible with most recent container runtimes, but Docker may be needed /// for older runtimes without OCI support. #[builder(setter(into, strip_option), default)] pub media_types: Option<ImageMediaTypes>, /// Identifiers for other platform specific containers. /// Used for multi-platform image. #[builder(setter(into, strip_option), default)] pub platform_variants: Option<Vec<ContainerId>>, } #[derive(Builder, Debug, PartialEq)] pub struct ContainerImportOpts<'a> { /// Identifies the tag to import from the archive, if the archive bundles /// multiple tags. #[builder(setter(into, strip_option), default)] pub tag: Option<&'a str>, } #[derive(Builder, Debug, PartialEq)] pub struct ContainerPipelineOpts<'a> { /// Pipeline description. #[builder(setter(into, strip_option), default)] pub description: Option<&'a str>, /// Pipeline labels. #[builder(setter(into, strip_option), default)] pub labels: Option<Vec<PipelineLabel>>, } #[derive(Builder, Debug, PartialEq)] pub struct ContainerPublishOpts { /// Force each layer of the published image to use the specified compression algorithm. /// If this is unset, then if a layer already has a compressed blob in the engine's /// cache, that will be used (this can result in a mix of compression algorithms for /// different layers). If this is unset and a layer has no compressed blob in the /// engine's cache, then it will be compressed using Gzip. #[builder(setter(into, strip_option), default)] pub forced_compression: Option<ImageLayerCompression>, /// Use the specified media types for the published image's layers. Defaults to OCI, which /// is largely compatible with most recent registries, but Docker may be needed for older /// registries without OCI support. #[builder(setter(into, strip_option), default)] pub media_types: Option<ImageMediaTypes>, /// Identifiers for other platform specific containers. /// Used for multi-platform image. #[builder(setter(into, strip_option), default)] pub platform_variants: Option<Vec<ContainerId>>, } #[derive(Builder, Debug, PartialEq)] pub struct ContainerWithDefaultArgsOpts<'a> { /// Arguments to prepend to future executions (e.g., ["-v", "--no-cache"]). #[builder(setter(into, strip_option), default)] pub args: Option<Vec<&'a str>>, } #[derive(Builder, Debug, PartialEq)] pub struct ContainerWithDirectoryOpts<'a> { /// Patterns to exclude in the written directory (e.g., ["node_modules/**", ".gitignore", ".git/"]). #[builder(setter(into, strip_option), default)] pub exclude: Option<Vec<&'a str>>, /// Patterns to include in the written directory (e.g., ["*.go", "go.mod", "go.sum"]). #[builder(setter(into, strip_option), default)] pub include: Option<Vec<&'a str>>, /// A user:group to set for the directory and its contents. /// The user and group can either be an ID (1000:1000) or a name (foo:bar). /// If the group is omitted, it defaults to the same as the user. #[builder(setter(into, strip_option), default)] pub owner: Option<&'a str>, } #[derive(Builder, Debug, PartialEq)] pub struct ContainerWithEnvVariableOpts { /// Replace `${VAR}` or $VAR in the value according to the current environment /// variables defined in the container (e.g., "/opt/bin:$PATH"). #[builder(setter(into, strip_option), default)] pub expand: Option<bool>, } #[derive(Builder, Debug, PartialEq)] pub struct ContainerWithExecOpts<'a> { /// Provides dagger access to the executed command. /// Do not use this option unless you trust the command being executed. /// The command being executed WILL BE GRANTED FULL ACCESS TO YOUR HOST FILESYSTEM. #[builder(setter(into, strip_option), default)] pub experimental_privileged_nesting: Option<bool>, /// Execute the command with all root capabilities. This is similar to running a command /// with "sudo" or executing `docker run` with the `--privileged` flag. Containerization /// does not provide any security guarantees when using this option. It should only be used /// when absolutely necessary and only with trusted commands. #[builder(setter(into, strip_option), default)] pub insecure_root_capabilities: Option<bool>, /// Redirect the command's standard error to a file in the container (e.g., "/tmp/stderr"). #[builder(setter(into, strip_option), default)] pub redirect_stderr: Option<&'a str>, /// Redirect the command's standard output to a file in the container (e.g., "/tmp/stdout"). #[builder(setter(into, strip_option), default)] pub redirect_stdout: Option<&'a str>, /// If the container has an entrypoint, ignore it for args rather than using it to wrap them. #[builder(setter(into, strip_option), default)] pub skip_entrypoint: Option<bool>, /// Content to write to the command's standard input before closing (e.g., "Hello world"). #[builder(setter(into, strip_option), default)] pub stdin: Option<&'a str>, } #[derive(Builder, Debug, PartialEq)] pub struct ContainerWithExposedPortOpts<'a> { /// Optional port description #[builder(setter(into, strip_option), default)] pub description: Option<&'a str>, /// Transport layer network protocol #[builder(setter(into, strip_option), default)] pub protocol: Option<NetworkProtocol>, } #[derive(Builder, Debug, PartialEq)] pub struct ContainerWithFileOpts<'a> { /// A user:group to set for the file. /// The user and group can either be an ID (1000:1000) or a name (foo:bar). /// If the group is omitted, it defaults to the same as the user. #[builder(setter(into, strip_option), default)] pub owner: Option<&'a str>, /// Permission given to the copied file (e.g., 0600). /// Default: 0644. #[builder(setter(into, strip_option), default)] pub permissions: Option<isize>, } #[derive(Builder, Debug, PartialEq)] pub struct ContainerWithMountedCacheOpts<'a> { /// A user:group to set for the mounted cache directory. /// Note that this changes the ownership of the specified mount along with the /// initial filesystem provided by source (if any). It does not have any effect /// if/when the cache has already been created. /// The user and group can either be an ID (1000:1000) or a name (foo:bar). /// If the group is omitted, it defaults to the same as the user. #[builder(setter(into, strip_option), default)] pub owner: Option<&'a str>, /// Sharing mode of the cache volume. #[builder(setter(into, strip_option), default)] pub sharing: Option<CacheSharingMode>, /// Identifier of the directory to use as the cache volume's root. #[builder(setter(into, strip_option), default)] pub source: Option<DirectoryId>, } #[derive(Builder, Debug, PartialEq)] pub struct ContainerWithMountedDirectoryOpts<'a> { /// A user:group to set for the mounted directory and its contents. /// The user and group can either be an ID (1000:1000) or a name (foo:bar). /// If the group is omitted, it defaults to the same as the user. #[builder(setter(into, strip_option), default)] pub owner: Option<&'a str>, } #[derive(Builder, Debug, PartialEq)] pub struct ContainerWithMountedFileOpts<'a> { /// A user or user:group to set for the mounted file. /// The user and group can either be an ID (1000:1000) or a name (foo:bar). /// If the group is omitted, it defaults to the same as the user. #[builder(setter(into, strip_option), default)] pub owner: Option<&'a str>, } #[derive(Builder, Debug, PartialEq)] pub struct ContainerWithMountedSecretOpts<'a> { /// Permission given to the mounted secret (e.g., 0600). /// This option requires an owner to be set to be active. /// Default: 0400. #[builder(setter(into, strip_option), default)] pub mode: Option<isize>, /// A user:group to set for the mounted secret. /// The user and group can either be an ID (1000:1000) or a name (foo:bar). /// If the group is omitted, it defaults to the same as the user. #[builder(setter(into, strip_option), default)] pub owner: Option<&'a str>, } #[derive(Builder, Debug, PartialEq)] pub struct ContainerWithNewFileOpts<'a> { /// Content of the file to write (e.g., "Hello world!"). #[builder(setter(into, strip_option), default)] pub contents: Option<&'a str>, /// A user:group to set for the file. /// The user and group can either be an ID (1000:1000) or a name (foo:bar). /// If the group is omitted, it defaults to the same as the user. #[builder(setter(into, strip_option), default)] pub owner: Option<&'a str>, /// Permission given to the written file (e.g., 0600). /// Default: 0644. #[builder(setter(into, strip_option), default)] pub permissions: Option<isize>, } #[derive(Builder, Debug, PartialEq)] pub struct ContainerWithUnixSocketOpts<'a> { /// A user:group to set for the mounted socket. /// The user and group can either be an ID (1000:1000) or a name (foo:bar). /// If the group is omitted, it defaults to the same as the user. #[builder(setter(into, strip_option), default)] pub owner: Option<&'a str>, } #[derive(Builder, Debug, PartialEq)] pub struct ContainerWithoutExposedPortOpts { /// Port protocol to unexpose #[builder(setter(into, strip_option), default)] pub protocol: Option<NetworkProtocol>, } impl Container { /// Turn the container into a Service. /// Be sure to set any exposed ports before this conversion. pub fn as_service(&self) -> Service { let query = self.selection.select("asService"); return Service { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Returns a File representing the container serialized to a tarball. /// /// # Arguments /// /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn as_tarball(&self) -> File { let query = self.selection.select("asTarball"); return File { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Returns a File representing the container serialized to a tarball. /// /// # Arguments /// /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn as_tarball_opts(&self, opts: ContainerAsTarballOpts) -> File { let mut query = self.selection.select("asTarball"); if let Some(platform_variants) = opts.platform_variants { query = query.arg("platformVariants", platform_variants); } if let Some(forced_compression) = opts.forced_compression { query = query.arg_enum("forcedCompression", forced_compression); } if let Some(media_types) = opts.media_types { query = query.arg_enum("mediaTypes", media_types); } return File { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Initializes this container from a Dockerfile build. /// /// # Arguments /// /// * `context` - Directory context used by the Dockerfile. /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn build(&self, context: Directory) -> Container { let mut query = self.selection.select("build"); query = query.arg_lazy( "context", Box::new(move || { let context = context.clone(); Box::pin(async move { context.id().await.unwrap().quote() }) }), ); return Container { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Initializes this container from a Dockerfile build. /// /// # Arguments /// /// * `context` - Directory context used by the Dockerfile. /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn build_opts<'a>(&self, context: Directory, opts: ContainerBuildOpts<'a>) -> Container { let mut query = self.selection.select("build"); query = query.arg_lazy( "context", Box::new(move || { let context = context.clone(); Box::pin(async move { context.id().await.unwrap().quote() }) }), ); if let Some(dockerfile) = opts.dockerfile { query = query.arg("dockerfile", dockerfile); } if let Some(build_args) = opts.build_args { query = query.arg("buildArgs", build_args); } if let Some(target) = opts.target { query = query.arg("target", target); } if let Some(secrets) = opts.secrets { query = query.arg("secrets", secrets); } return Container { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Retrieves default arguments for future commands. pub async fn default_args(&self) -> Result<Vec<String>, DaggerError> { let query = self.selection.select("defaultArgs"); query.execute(self.graphql_client.clone()).await } /// Retrieves a directory at the given path. /// Mounts are included. /// /// # Arguments /// /// * `path` - The path of the directory to retrieve (e.g., "./src"). pub fn directory(&self, path: impl Into<String>) -> Directory { let mut query = self.selection.select("directory"); query = query.arg("path", path.into()); return Directory { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Retrieves entrypoint to be prepended to the arguments of all commands. pub async fn entrypoint(&self) -> Result<Vec<String>, DaggerError> { let query = self.selection.select("entrypoint"); query.execute(self.graphql_client.clone()).await } /// Retrieves the value of the specified environment variable. /// /// # Arguments /// /// * `name` - The name of the environment variable to retrieve (e.g., "PATH"). pub async fn env_variable(&self, name: impl Into<String>) -> Result<String, DaggerError> { let mut query = self.selection.select("envVariable"); query = query.arg("name", name.into()); query.execute(self.graphql_client.clone()).await } /// Retrieves the list of environment variables passed to commands. pub fn env_variables(&self) -> Vec<EnvVariable> { let query = self.selection.select("envVariables"); return vec![EnvVariable { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }]; } /// EXPERIMENTAL API! Subject to change/removal at any time. /// experimentalWithAllGPUs configures all available GPUs on the host to be accessible to this container. /// This currently works for Nvidia devices only. pub fn experimental_with_all_gp_us(&self) -> Container { let query = self.selection.select("experimentalWithAllGPUs"); return Container { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// EXPERIMENTAL API! Subject to change/removal at any time. /// experimentalWithGPU configures the provided list of devices to be accesible to this container. /// This currently works for Nvidia devices only. pub fn experimental_with_gpu(&self, devices: Vec<impl Into<String>>) -> Container { let mut query = self.selection.select("experimentalWithGPU"); query = query.arg( "devices", devices .into_iter() .map(|i| i.into()) .collect::<Vec<String>>(), ); return Container { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Writes the container as an OCI tarball to the destination file path on the host for the specified platform variants. /// Return true on success. /// It can also publishes platform variants. /// /// # Arguments /// /// * `path` - Host's destination path (e.g., "./tarball"). /// Path can be relative to the engine's workdir or absolute. /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub async fn export(&self, path: impl Into<String>) -> Result<bool, DaggerError> { let mut query = self.selection.select("export"); query = query.arg("path", path.into()); query.execute(self.graphql_client.clone()).await } /// Writes the container as an OCI tarball to the destination file path on the host for the specified platform variants. /// Return true on success. /// It can also publishes platform variants. /// /// # Arguments /// /// * `path` - Host's destination path (e.g., "./tarball"). /// Path can be relative to the engine's workdir or absolute. /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub async fn export_opts( &self, path: impl Into<String>, opts: ContainerExportOpts, ) -> Result<bool, DaggerError> { let mut query = self.selection.select("export"); query = query.arg("path", path.into()); if let Some(platform_variants) = opts.platform_variants { query = query.arg("platformVariants", platform_variants); } if let Some(forced_compression) = opts.forced_compression { query = query.arg_enum("forcedCompression", forced_compression); } if let Some(media_types) = opts.media_types { query = query.arg_enum("mediaTypes", media_types); } query.execute(self.graphql_client.clone()).await } /// Retrieves the list of exposed ports. /// This includes ports already exposed by the image, even if not /// explicitly added with dagger. pub fn exposed_ports(&self) -> Vec<Port> { let query = self.selection.select("exposedPorts"); return vec![Port { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }]; } /// Retrieves a file at the given path. /// Mounts are included. /// /// # Arguments /// /// * `path` - The path of the file to retrieve (e.g., "./README.md"). pub fn file(&self, path: impl Into<String>) -> File { let mut query = self.selection.select("file"); query = query.arg("path", path.into()); return File { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Initializes this container from a pulled base image. /// /// # Arguments /// /// * `address` - Image's address from its registry. /// /// Formatted as [host]/[user]/[repo]:[tag] (e.g., "docker.io/dagger/dagger:main"). pub fn from(&self, address: impl Into<String>) -> Container { let mut query = self.selection.select("from"); query = query.arg("address", address.into()); return Container { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// A unique identifier for this container. pub async fn id(&self) -> Result<ContainerId, DaggerError> { let query = self.selection.select("id"); query.execute(self.graphql_client.clone()).await } /// The unique image reference which can only be retrieved immediately after the 'Container.From' call. pub async fn image_ref(&self) -> Result<String, DaggerError> { let query = self.selection.select("imageRef"); query.execute(self.graphql_client.clone()).await } /// Reads the container from an OCI tarball. /// NOTE: this involves unpacking the tarball to an OCI store on the host at /// $XDG_CACHE_DIR/dagger/oci. This directory can be removed whenever you like. /// /// # Arguments /// /// * `source` - File to read the container from. /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn import(&self, source: File) -> Container { let mut query = self.selection.select("import"); query = query.arg_lazy( "source", Box::new(move || { let source = source.clone(); Box::pin(async move { source.id().await.unwrap().quote() }) }), ); return Container { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Reads the container from an OCI tarball. /// NOTE: this involves unpacking the tarball to an OCI store on the host at /// $XDG_CACHE_DIR/dagger/oci. This directory can be removed whenever you like. /// /// # Arguments /// /// * `source` - File to read the container from. /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn import_opts<'a>(&self, source: File, opts: ContainerImportOpts<'a>) -> Container { let mut query = self.selection.select("import"); query = query.arg_lazy( "source", Box::new(move || { let source = source.clone(); Box::pin(async move { source.id().await.unwrap().quote() }) }), ); if let Some(tag) = opts.tag { query = query.arg("tag", tag); } return Container { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Retrieves the value of the specified label. pub async fn label(&self, name: impl Into<String>) -> Result<String, DaggerError> { let mut query = self.selection.select("label"); query = query.arg("name", name.into()); query.execute(self.graphql_client.clone()).await } /// Retrieves the list of labels passed to container. pub fn labels(&self) -> Vec<Label> { let query = self.selection.select("labels"); return vec![Label { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }]; } /// Retrieves the list of paths where a directory is mounted. pub async fn mounts(&self) -> Result<Vec<String>, DaggerError> { let query = self.selection.select("mounts"); query.execute(self.graphql_client.clone()).await } /// Creates a named sub-pipeline /// /// # Arguments /// /// * `name` - Pipeline name. /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn pipeline(&self, name: impl Into<String>) -> Container { let mut query = self.selection.select("pipeline"); query = query.arg("name", name.into()); return Container { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Creates a named sub-pipeline /// /// # Arguments /// /// * `name` - Pipeline name. /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn pipeline_opts<'a>( &self, name: impl Into<String>, opts: ContainerPipelineOpts<'a>, ) -> Container { let mut query = self.selection.select("pipeline"); query = query.arg("name", name.into()); if let Some(description) = opts.description { query = query.arg("description", description); } if let Some(labels) = opts.labels { query = query.arg("labels", labels); } return Container { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// The platform this container executes and publishes as. pub async fn platform(&self) -> Result<Platform, DaggerError> { let query = self.selection.select("platform"); query.execute(self.graphql_client.clone()).await } /// Publishes this container as a new image to the specified address. /// Publish returns a fully qualified ref. /// It can also publish platform variants. /// /// # Arguments /// /// * `address` - Registry's address to publish the image to. /// /// Formatted as [host]/[user]/[repo]:[tag] (e.g. "docker.io/dagger/dagger:main"). /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub async fn publish(&self, address: impl Into<String>) -> Result<String, DaggerError> { let mut query = self.selection.select("publish"); query = query.arg("address", address.into()); query.execute(self.graphql_client.clone()).await } /// Publishes this container as a new image to the specified address. /// Publish returns a fully qualified ref. /// It can also publish platform variants. /// /// # Arguments /// /// * `address` - Registry's address to publish the image to. /// /// Formatted as [host]/[user]/[repo]:[tag] (e.g. "docker.io/dagger/dagger:main"). /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub async fn publish_opts( &self, address: impl Into<String>, opts: ContainerPublishOpts, ) -> Result<String, DaggerError> { let mut query = self.selection.select("publish"); query = query.arg("address", address.into()); if let Some(platform_variants) = opts.platform_variants { query = query.arg("platformVariants", platform_variants); } if let Some(forced_compression) = opts.forced_compression { query = query.arg_enum("forcedCompression", forced_compression); } if let Some(media_types) = opts.media_types { query = query.arg_enum("mediaTypes", media_types); } query.execute(self.graphql_client.clone()).await } /// Retrieves this container's root filesystem. Mounts are not included. pub fn rootfs(&self) -> Directory { let query = self.selection.select("rootfs"); return Directory { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Return a websocket endpoint that, if connected to, will start the container with a TTY streamed /// over the websocket. /// Primarily intended for internal use with the dagger CLI. pub async fn shell_endpoint(&self) -> Result<String, DaggerError> { let query = self.selection.select("shellEndpoint"); query.execute(self.graphql_client.clone()).await } /// The error stream of the last executed command. /// Will execute default command if none is set, or error if there's no default. pub async fn stderr(&self) -> Result<String, DaggerError> { let query = self.selection.select("stderr"); query.execute(self.graphql_client.clone()).await } /// The output stream of the last executed command. /// Will execute default command if none is set, or error if there's no default. pub async fn stdout(&self) -> Result<String, DaggerError> { let query = self.selection.select("stdout"); query.execute(self.graphql_client.clone()).await } /// Forces evaluation of the pipeline in the engine. /// It doesn't run the default command if no exec has been set. pub async fn sync(&self) -> Result<ContainerId, DaggerError> { let query = self.selection.select("sync"); query.execute(self.graphql_client.clone()).await } /// Retrieves the user to be set for all commands. pub async fn user(&self) -> Result<String, DaggerError> { let query = self.selection.select("user"); query.execute(self.graphql_client.clone()).await } /// Configures default arguments for future commands. /// /// # Arguments /// /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn with_default_args(&self) -> Container { let query = self.selection.select("withDefaultArgs"); return Container { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Configures default arguments for future commands. /// /// # Arguments /// /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn with_default_args_opts<'a>(&self, opts: ContainerWithDefaultArgsOpts<'a>) -> Container { let mut query = self.selection.select("withDefaultArgs"); if let Some(args) = opts.args { query = query.arg("args", args); } return Container { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Retrieves this container plus a directory written at the given path. /// /// # Arguments /// /// * `path` - Location of the written directory (e.g., "/tmp/directory"). /// * `directory` - Identifier of the directory to write /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn with_directory(&self, path: impl Into<String>, directory: Directory) -> Container { let mut query = self.selection.select("withDirectory"); query = query.arg("path", path.into()); query = query.arg_lazy( "directory", Box::new(move || { let directory = directory.clone(); Box::pin(async move { directory.id().await.unwrap().quote() }) }), ); return Container { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Retrieves this container plus a directory written at the given path. /// /// # Arguments /// /// * `path` - Location of the written directory (e.g., "/tmp/directory"). /// * `directory` - Identifier of the directory to write /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn with_directory_opts<'a>( &self, path: impl Into<String>, directory: Directory, opts: ContainerWithDirectoryOpts<'a>, ) -> Container { let mut query = self.selection.select("withDirectory"); query = query.arg("path", path.into()); query = query.arg_lazy( "directory", Box::new(move || { let directory = directory.clone(); Box::pin(async move { directory.id().await.unwrap().quote() }) }), ); if let Some(exclude) = opts.exclude { query = query.arg("exclude", exclude); } if let Some(include) = opts.include { query = query.arg("include", include); } if let Some(owner) = opts.owner { query = query.arg("owner", owner); } return Container { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Retrieves this container but with a different command entrypoint. /// /// # Arguments /// /// * `args` - Entrypoint to use for future executions (e.g., ["go", "run"]). pub fn with_entrypoint(&self, args: Vec<impl Into<String>>) -> Container { let mut query = self.selection.select("withEntrypoint"); query = query.arg( "args", args.into_iter().map(|i| i.into()).collect::<Vec<String>>(), ); return Container { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Retrieves this container plus the given environment variable. /// /// # Arguments /// /// * `name` - The name of the environment variable (e.g., "HOST"). /// * `value` - The value of the environment variable. (e.g., "localhost"). /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn with_env_variable( &self, name: impl Into<String>, value: impl Into<String>, ) -> Container { let mut query = self.selection.select("withEnvVariable"); query = query.arg("name", name.into()); query = query.arg("value", value.into()); return Container { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Retrieves this container plus the given environment variable. /// /// # Arguments /// /// * `name` - The name of the environment variable (e.g., "HOST"). /// * `value` - The value of the environment variable. (e.g., "localhost"). /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn with_env_variable_opts( &self, name: impl Into<String>, value: impl Into<String>, opts: ContainerWithEnvVariableOpts, ) -> Container { let mut query = self.selection.select("withEnvVariable"); query = query.arg("name", name.into()); query = query.arg("value", value.into()); if let Some(expand) = opts.expand { query = query.arg("expand", expand); } return Container { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Retrieves this container after executing the specified command inside it. /// /// # Arguments /// /// * `args` - Command to run instead of the container's default command (e.g., ["run", "main.go"]). /// /// If empty, the container's default command is used. /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn with_exec(&self, args: Vec<impl Into<String>>) -> Container { let mut query = self.selection.select("withExec"); query = query.arg( "args", args.into_iter().map(|i| i.into()).collect::<Vec<String>>(), ); return Container { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Retrieves this container after executing the specified command inside it. /// /// # Arguments /// /// * `args` - Command to run instead of the container's default command (e.g., ["run", "main.go"]). /// /// If empty, the container's default command is used. /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn with_exec_opts<'a>( &self, args: Vec<impl Into<String>>, opts: ContainerWithExecOpts<'a>, ) -> Container { let mut query = self.selection.select("withExec"); query = query.arg( "args", args.into_iter().map(|i| i.into()).collect::<Vec<String>>(), ); if let Some(skip_entrypoint) = opts.skip_entrypoint { query = query.arg("skipEntrypoint", skip_entrypoint); } if let Some(stdin) = opts.stdin { query = query.arg("stdin", stdin); } if let Some(redirect_stdout) = opts.redirect_stdout { query = query.arg("redirectStdout", redirect_stdout); } if let Some(redirect_stderr) = opts.redirect_stderr { query = query.arg("redirectStderr", redirect_stderr); } if let Some(experimental_privileged_nesting) = opts.experimental_privileged_nesting { query = query.arg( "experimentalPrivilegedNesting", experimental_privileged_nesting, ); } if let Some(insecure_root_capabilities) = opts.insecure_root_capabilities { query = query.arg("insecureRootCapabilities", insecure_root_capabilities); } return Container { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Expose a network port. /// Exposed ports serve two purposes: /// - For health checks and introspection, when running services /// - For setting the EXPOSE OCI field when publishing the container /// /// # Arguments /// /// * `port` - Port number to expose /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn with_exposed_port(&self, port: isize) -> Container { let mut query = self.selection.select("withExposedPort"); query = query.arg("port", port); return Container { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Expose a network port. /// Exposed ports serve two purposes: /// - For health checks and introspection, when running services /// - For setting the EXPOSE OCI field when publishing the container /// /// # Arguments /// /// * `port` - Port number to expose /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn with_exposed_port_opts<'a>( &self, port: isize, opts: ContainerWithExposedPortOpts<'a>, ) -> Container { let mut query = self.selection.select("withExposedPort"); query = query.arg("port", port); if let Some(protocol) = opts.protocol { query = query.arg_enum("protocol", protocol); } if let Some(description) = opts.description { query = query.arg("description", description); } return Container { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Retrieves this container plus the contents of the given file copied to the given path. /// /// # Arguments /// /// * `path` - Location of the copied file (e.g., "/tmp/file.txt"). /// * `source` - Identifier of the file to copy. /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn with_file(&self, path: impl Into<String>, source: File) -> Container { let mut query = self.selection.select("withFile"); query = query.arg("path", path.into()); query = query.arg_lazy( "source", Box::new(move || { let source = source.clone(); Box::pin(async move { source.id().await.unwrap().quote() }) }), ); return Container { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Retrieves this container plus the contents of the given file copied to the given path. /// /// # Arguments /// /// * `path` - Location of the copied file (e.g., "/tmp/file.txt"). /// * `source` - Identifier of the file to copy. /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn with_file_opts<'a>( &self, path: impl Into<String>, source: File, opts: ContainerWithFileOpts<'a>, ) -> Container { let mut query = self.selection.select("withFile"); query = query.arg("path", path.into()); query = query.arg_lazy( "source", Box::new(move || { let source = source.clone(); Box::pin(async move { source.id().await.unwrap().quote() }) }), ); if let Some(permissions) = opts.permissions { query = query.arg("permissions", permissions); } if let Some(owner) = opts.owner { query = query.arg("owner", owner); } return Container { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Indicate that subsequent operations should be featured more prominently in /// the UI. pub fn with_focus(&self) -> Container { let query = self.selection.select("withFocus"); return Container { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Retrieves this container plus the given label. /// /// # Arguments /// /// * `name` - The name of the label (e.g., "org.opencontainers.artifact.created"). /// * `value` - The value of the label (e.g., "2023-01-01T00:00:00Z"). pub fn with_label(&self, name: impl Into<String>, value: impl Into<String>) -> Container { let mut query = self.selection.select("withLabel"); query = query.arg("name", name.into()); query = query.arg("value", value.into()); return Container { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Retrieves this container plus a cache volume mounted at the given path. /// /// # Arguments /// /// * `path` - Location of the cache directory (e.g., "/cache/node_modules"). /// * `cache` - Identifier of the cache volume to mount. /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn with_mounted_cache(&self, path: impl Into<String>, cache: CacheVolume) -> Container { let mut query = self.selection.select("withMountedCache"); query = query.arg("path", path.into()); query = query.arg_lazy( "cache", Box::new(move || { let cache = cache.clone(); Box::pin(async move { cache.id().await.unwrap().quote() }) }), ); return Container { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Retrieves this container plus a cache volume mounted at the given path. /// /// # Arguments /// /// * `path` - Location of the cache directory (e.g., "/cache/node_modules"). /// * `cache` - Identifier of the cache volume to mount. /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn with_mounted_cache_opts<'a>( &self, path: impl Into<String>, cache: CacheVolume, opts: ContainerWithMountedCacheOpts<'a>, ) -> Container { let mut query = self.selection.select("withMountedCache"); query = query.arg("path", path.into()); query = query.arg_lazy( "cache", Box::new(move || { let cache = cache.clone(); Box::pin(async move { cache.id().await.unwrap().quote() }) }), ); if let Some(source) = opts.source { query = query.arg("source", source); } if let Some(sharing) = opts.sharing { query = query.arg_enum("sharing", sharing); } if let Some(owner) = opts.owner { query = query.arg("owner", owner); } return Container { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Retrieves this container plus a directory mounted at the given path. /// /// # Arguments /// /// * `path` - Location of the mounted directory (e.g., "/mnt/directory"). /// * `source` - Identifier of the mounted directory. /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn with_mounted_directory(&self, path: impl Into<String>, source: Directory) -> Container { let mut query = self.selection.select("withMountedDirectory"); query = query.arg("path", path.into()); query = query.arg_lazy( "source", Box::new(move || { let source = source.clone(); Box::pin(async move { source.id().await.unwrap().quote() }) }), ); return Container { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Retrieves this container plus a directory mounted at the given path. /// /// # Arguments /// /// * `path` - Location of the mounted directory (e.g., "/mnt/directory"). /// * `source` - Identifier of the mounted directory. /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn with_mounted_directory_opts<'a>( &self, path: impl Into<String>, source: Directory, opts: ContainerWithMountedDirectoryOpts<'a>, ) -> Container { let mut query = self.selection.select("withMountedDirectory"); query = query.arg("path", path.into()); query = query.arg_lazy( "source", Box::new(move || { let source = source.clone(); Box::pin(async move { source.id().await.unwrap().quote() }) }), ); if let Some(owner) = opts.owner { query = query.arg("owner", owner); } return Container { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Retrieves this container plus a file mounted at the given path. /// /// # Arguments /// /// * `path` - Location of the mounted file (e.g., "/tmp/file.txt"). /// * `source` - Identifier of the mounted file. /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn with_mounted_file(&self, path: impl Into<String>, source: File) -> Container { let mut query = self.selection.select("withMountedFile"); query = query.arg("path", path.into()); query = query.arg_lazy( "source", Box::new(move || { let source = source.clone(); Box::pin(async move { source.id().await.unwrap().quote() }) }), ); return Container { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Retrieves this container plus a file mounted at the given path. /// /// # Arguments /// /// * `path` - Location of the mounted file (e.g., "/tmp/file.txt"). /// * `source` - Identifier of the mounted file. /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn with_mounted_file_opts<'a>( &self, path: impl Into<String>, source: File, opts: ContainerWithMountedFileOpts<'a>, ) -> Container { let mut query = self.selection.select("withMountedFile"); query = query.arg("path", path.into()); query = query.arg_lazy( "source", Box::new(move || { let source = source.clone(); Box::pin(async move { source.id().await.unwrap().quote() }) }), ); if let Some(owner) = opts.owner { query = query.arg("owner", owner); } return Container { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Retrieves this container plus a secret mounted into a file at the given path. /// /// # Arguments /// /// * `path` - Location of the secret file (e.g., "/tmp/secret.txt"). /// * `source` - Identifier of the secret to mount. /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn with_mounted_secret(&self, path: impl Into<String>, source: Secret) -> Container { let mut query = self.selection.select("withMountedSecret"); query = query.arg("path", path.into()); query = query.arg_lazy( "source", Box::new(move || { let source = source.clone(); Box::pin(async move { source.id().await.unwrap().quote() }) }), ); return Container { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Retrieves this container plus a secret mounted into a file at the given path. /// /// # Arguments /// /// * `path` - Location of the secret file (e.g., "/tmp/secret.txt"). /// * `source` - Identifier of the secret to mount. /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn with_mounted_secret_opts<'a>( &self, path: impl Into<String>, source: Secret, opts: ContainerWithMountedSecretOpts<'a>, ) -> Container { let mut query = self.selection.select("withMountedSecret"); query = query.arg("path", path.into()); query = query.arg_lazy( "source", Box::new(move || { let source = source.clone(); Box::pin(async move { source.id().await.unwrap().quote() }) }), ); if let Some(owner) = opts.owner { query = query.arg("owner", owner); } if let Some(mode) = opts.mode { query = query.arg("mode", mode); } return Container { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Retrieves this container plus a temporary directory mounted at the given path. /// /// # Arguments /// /// * `path` - Location of the temporary directory (e.g., "/tmp/temp_dir"). pub fn with_mounted_temp(&self, path: impl Into<String>) -> Container { let mut query = self.selection.select("withMountedTemp"); query = query.arg("path", path.into()); return Container { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Retrieves this container plus a new file written at the given path. /// /// # Arguments /// /// * `path` - Location of the written file (e.g., "/tmp/file.txt"). /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn with_new_file(&self, path: impl Into<String>) -> Container { let mut query = self.selection.select("withNewFile"); query = query.arg("path", path.into()); return Container { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Retrieves this container plus a new file written at the given path. /// /// # Arguments /// /// * `path` - Location of the written file (e.g., "/tmp/file.txt"). /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn with_new_file_opts<'a>( &self, path: impl Into<String>, opts: ContainerWithNewFileOpts<'a>, ) -> Container { let mut query = self.selection.select("withNewFile"); query = query.arg("path", path.into()); if let Some(contents) = opts.contents { query = query.arg("contents", contents); } if let Some(permissions) = opts.permissions { query = query.arg("permissions", permissions); } if let Some(owner) = opts.owner { query = query.arg("owner", owner); } return Container { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Retrieves this container with a registry authentication for a given address. /// /// # Arguments /// /// * `address` - Registry's address to bind the authentication to. /// Formatted as [host]/[user]/[repo]:[tag] (e.g. docker.io/dagger/dagger:main). /// * `username` - The username of the registry's account (e.g., "Dagger"). /// * `secret` - The API key, password or token to authenticate to this registry. pub fn with_registry_auth( &self, address: impl Into<String>, username: impl Into<String>, secret: Secret, ) -> Container { let mut query = self.selection.select("withRegistryAuth"); query = query.arg("address", address.into()); query = query.arg("username", username.into()); query = query.arg_lazy( "secret", Box::new(move || { let secret = secret.clone(); Box::pin(async move { secret.id().await.unwrap().quote() }) }), ); return Container { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Initializes this container from this DirectoryID. pub fn with_rootfs(&self, directory: Directory) -> Container { let mut query = self.selection.select("withRootfs"); query = query.arg_lazy( "directory", Box::new(move || { let directory = directory.clone(); Box::pin(async move { directory.id().await.unwrap().quote() }) }), ); return Container { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Retrieves this container plus an env variable containing the given secret. /// /// # Arguments /// /// * `name` - The name of the secret variable (e.g., "API_SECRET"). /// * `secret` - The identifier of the secret value. pub fn with_secret_variable(&self, name: impl Into<String>, secret: Secret) -> Container { let mut query = self.selection.select("withSecretVariable"); query = query.arg("name", name.into()); query = query.arg_lazy( "secret", Box::new(move || { let secret = secret.clone(); Box::pin(async move { secret.id().await.unwrap().quote() }) }), ); return Container { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Establish a runtime dependency on a service. /// The service will be started automatically when needed and detached when it is /// no longer needed, executing the default command if none is set. /// The service will be reachable from the container via the provided hostname alias. /// The service dependency will also convey to any files or directories produced by the container. /// /// # Arguments /// /// * `alias` - A name that can be used to reach the service from the container /// * `service` - Identifier of the service container pub fn with_service_binding(&self, alias: impl Into<String>, service: Service) -> Container { let mut query = self.selection.select("withServiceBinding"); query = query.arg("alias", alias.into()); query = query.arg_lazy( "service", Box::new(move || { let service = service.clone(); Box::pin(async move { service.id().await.unwrap().quote() }) }), ); return Container { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Retrieves this container plus a socket forwarded to the given Unix socket path. /// /// # Arguments /// /// * `path` - Location of the forwarded Unix socket (e.g., "/tmp/socket"). /// * `source` - Identifier of the socket to forward. /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn with_unix_socket(&self, path: impl Into<String>, source: Socket) -> Container { let mut query = self.selection.select("withUnixSocket"); query = query.arg("path", path.into()); query = query.arg_lazy( "source", Box::new(move || { let source = source.clone(); Box::pin(async move { source.id().await.unwrap().quote() }) }), ); return Container { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Retrieves this container plus a socket forwarded to the given Unix socket path. /// /// # Arguments /// /// * `path` - Location of the forwarded Unix socket (e.g., "/tmp/socket"). /// * `source` - Identifier of the socket to forward. /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn with_unix_socket_opts<'a>( &self, path: impl Into<String>, source: Socket, opts: ContainerWithUnixSocketOpts<'a>, ) -> Container { let mut query = self.selection.select("withUnixSocket"); query = query.arg("path", path.into()); query = query.arg_lazy( "source", Box::new(move || { let source = source.clone(); Box::pin(async move { source.id().await.unwrap().quote() }) }), ); if let Some(owner) = opts.owner { query = query.arg("owner", owner); } return Container { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Retrieves this container with a different command user. /// /// # Arguments /// /// * `name` - The user to set (e.g., "root"). pub fn with_user(&self, name: impl Into<String>) -> Container { let mut query = self.selection.select("withUser"); query = query.arg("name", name.into()); return Container { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Retrieves this container with a different working directory. /// /// # Arguments /// /// * `path` - The path to set as the working directory (e.g., "/app"). pub fn with_workdir(&self, path: impl Into<String>) -> Container { let mut query = self.selection.select("withWorkdir"); query = query.arg("path", path.into()); return Container { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Retrieves this container minus the given environment variable. /// /// # Arguments /// /// * `name` - The name of the environment variable (e.g., "HOST"). pub fn without_env_variable(&self, name: impl Into<String>) -> Container { let mut query = self.selection.select("withoutEnvVariable"); query = query.arg("name", name.into()); return Container { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Unexpose a previously exposed port. /// /// # Arguments /// /// * `port` - Port number to unexpose /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn without_exposed_port(&self, port: isize) -> Container { let mut query = self.selection.select("withoutExposedPort"); query = query.arg("port", port); return Container { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Unexpose a previously exposed port. /// /// # Arguments /// /// * `port` - Port number to unexpose /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn without_exposed_port_opts( &self, port: isize, opts: ContainerWithoutExposedPortOpts, ) -> Container { let mut query = self.selection.select("withoutExposedPort"); query = query.arg("port", port); if let Some(protocol) = opts.protocol { query = query.arg_enum("protocol", protocol); } return Container { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Indicate that subsequent operations should not be featured more prominently /// in the UI. /// This is the initial state of all containers. pub fn without_focus(&self) -> Container { let query = self.selection.select("withoutFocus"); return Container { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Retrieves this container minus the given environment label. /// /// # Arguments /// /// * `name` - The name of the label to remove (e.g., "org.opencontainers.artifact.created"). pub fn without_label(&self, name: impl Into<String>) -> Container { let mut query = self.selection.select("withoutLabel"); query = query.arg("name", name.into()); return Container { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Retrieves this container after unmounting everything at the given path. /// /// # Arguments /// /// * `path` - Location of the cache directory (e.g., "/cache/node_modules"). pub fn without_mount(&self, path: impl Into<String>) -> Container { let mut query = self.selection.select("withoutMount"); query = query.arg("path", path.into()); return Container { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Retrieves this container without the registry authentication of a given address. /// /// # Arguments /// /// * `address` - Registry's address to remove the authentication from. /// Formatted as [host]/[user]/[repo]:[tag] (e.g. docker.io/dagger/dagger:main). pub fn without_registry_auth(&self, address: impl Into<String>) -> Container { let mut query = self.selection.select("withoutRegistryAuth"); query = query.arg("address", address.into()); return Container { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Retrieves this container with a previously added Unix socket removed. /// /// # Arguments /// /// * `path` - Location of the socket to remove (e.g., "/tmp/socket"). pub fn without_unix_socket(&self, path: impl Into<String>) -> Container { let mut query = self.selection.select("withoutUnixSocket"); query = query.arg("path", path.into()); return Container { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Retrieves the working directory for all commands. pub async fn workdir(&self) -> Result<String, DaggerError> { let query = self.selection.select("workdir"); query.execute(self.graphql_client.clone()).await } } #[derive(Clone)] pub struct Directory { pub proc: Option<Arc<Child>>, pub selection: Selection, pub graphql_client: DynGraphQLClient, } #[derive(Builder, Debug, PartialEq)] pub struct DirectoryAsModuleOpts<'a> { /// An optional subpath of the directory which contains the module's source /// code. /// This is needed when the module code is in a subdirectory but requires /// parent directories to be loaded in order to execute. For example, the /// module source code may need a go.mod, project.toml, package.json, etc. file /// from a parent directory. /// If not set, the module source code is loaded from the root of the /// directory. #[builder(setter(into, strip_option), default)] pub source_subpath: Option<&'a str>, } #[derive(Builder, Debug, PartialEq)] pub struct DirectoryDockerBuildOpts<'a> { /// Build arguments to use in the build. #[builder(setter(into, strip_option), default)] pub build_args: Option<Vec<BuildArg>>, /// Path to the Dockerfile to use (e.g., "frontend.Dockerfile"). /// Defaults: './Dockerfile'. #[builder(setter(into, strip_option), default)] pub dockerfile: Option<&'a str>, /// The platform to build. #[builder(setter(into, strip_option), default)] pub platform: Option<Platform>, /// Secrets to pass to the build. /// They will be mounted at /run/secrets/[secret-name]. #[builder(setter(into, strip_option), default)] pub secrets: Option<Vec<SecretId>>, /// Target build stage to build. #[builder(setter(into, strip_option), default)] pub target: Option<&'a str>, } #[derive(Builder, Debug, PartialEq)] pub struct DirectoryEntriesOpts<'a> { /// Location of the directory to look at (e.g., "/src"). #[builder(setter(into, strip_option), default)] pub path: Option<&'a str>, } #[derive(Builder, Debug, PartialEq)] pub struct DirectoryPipelineOpts<'a> { /// Pipeline description. #[builder(setter(into, strip_option), default)] pub description: Option<&'a str>, /// Pipeline labels. #[builder(setter(into, strip_option), default)] pub labels: Option<Vec<PipelineLabel>>, } #[derive(Builder, Debug, PartialEq)] pub struct DirectoryWithDirectoryOpts<'a> { /// Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]). #[builder(setter(into, strip_option), default)] pub exclude: Option<Vec<&'a str>>, /// Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]). #[builder(setter(into, strip_option), default)] pub include: Option<Vec<&'a str>>, } #[derive(Builder, Debug, PartialEq)] pub struct DirectoryWithFileOpts { /// Permission given to the copied file (e.g., 0600). /// Default: 0644. #[builder(setter(into, strip_option), default)] pub permissions: Option<isize>, } #[derive(Builder, Debug, PartialEq)] pub struct DirectoryWithNewDirectoryOpts { /// Permission granted to the created directory (e.g., 0777). /// Default: 0755. #[builder(setter(into, strip_option), default)] pub permissions: Option<isize>, } #[derive(Builder, Debug, PartialEq)] pub struct DirectoryWithNewFileOpts { /// Permission given to the copied file (e.g., 0600). /// Default: 0644. #[builder(setter(into, strip_option), default)] pub permissions: Option<isize>, } impl Directory { /// Load the directory as a Dagger module /// /// # Arguments /// /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn as_module(&self) -> Module { let query = self.selection.select("asModule"); return Module { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Load the directory as a Dagger module /// /// # Arguments /// /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn as_module_opts<'a>(&self, opts: DirectoryAsModuleOpts<'a>) -> Module { let mut query = self.selection.select("asModule"); if let Some(source_subpath) = opts.source_subpath { query = query.arg("sourceSubpath", source_subpath); } return Module { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Gets the difference between this directory and an another directory. /// /// # Arguments /// /// * `other` - Identifier of the directory to compare. pub fn diff(&self, other: Directory) -> Directory { let mut query = self.selection.select("diff"); query = query.arg_lazy( "other", Box::new(move || { let other = other.clone(); Box::pin(async move { other.id().await.unwrap().quote() }) }), ); return Directory { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Retrieves a directory at the given path. /// /// # Arguments /// /// * `path` - Location of the directory to retrieve (e.g., "/src"). pub fn directory(&self, path: impl Into<String>) -> Directory { let mut query = self.selection.select("directory"); query = query.arg("path", path.into()); return Directory { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Builds a new Docker container from this directory. /// /// # Arguments /// /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn docker_build(&self) -> Container { let query = self.selection.select("dockerBuild"); return Container { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Builds a new Docker container from this directory. /// /// # Arguments /// /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn docker_build_opts<'a>(&self, opts: DirectoryDockerBuildOpts<'a>) -> Container { let mut query = self.selection.select("dockerBuild"); if let Some(dockerfile) = opts.dockerfile { query = query.arg("dockerfile", dockerfile); } if let Some(platform) = opts.platform { query = query.arg("platform", platform); } if let Some(build_args) = opts.build_args { query = query.arg("buildArgs", build_args); } if let Some(target) = opts.target { query = query.arg("target", target); } if let Some(secrets) = opts.secrets { query = query.arg("secrets", secrets); } return Container { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Returns a list of files and directories at the given path. /// /// # Arguments /// /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub async fn entries(&self) -> Result<Vec<String>, DaggerError> { let query = self.selection.select("entries"); query.execute(self.graphql_client.clone()).await } /// Returns a list of files and directories at the given path. /// /// # Arguments /// /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub async fn entries_opts<'a>( &self, opts: DirectoryEntriesOpts<'a>, ) -> Result<Vec<String>, DaggerError> { let mut query = self.selection.select("entries"); if let Some(path) = opts.path { query = query.arg("path", path); } query.execute(self.graphql_client.clone()).await } /// Writes the contents of the directory to a path on the host. /// /// # Arguments /// /// * `path` - Location of the copied directory (e.g., "logs/"). pub async fn export(&self, path: impl Into<String>) -> Result<bool, DaggerError> { let mut query = self.selection.select("export"); query = query.arg("path", path.into()); query.execute(self.graphql_client.clone()).await } /// Retrieves a file at the given path. /// /// # Arguments /// /// * `path` - Location of the file to retrieve (e.g., "README.md"). pub fn file(&self, path: impl Into<String>) -> File { let mut query = self.selection.select("file"); query = query.arg("path", path.into()); return File { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Returns a list of files and directories that matche the given pattern. /// /// # Arguments /// /// * `pattern` - Pattern to match (e.g., "*.md"). pub async fn glob(&self, pattern: impl Into<String>) -> Result<Vec<String>, DaggerError> { let mut query = self.selection.select("glob"); query = query.arg("pattern", pattern.into()); query.execute(self.graphql_client.clone()).await } /// The content-addressed identifier of the directory. pub async fn id(&self) -> Result<DirectoryId, DaggerError> { let query = self.selection.select("id"); query.execute(self.graphql_client.clone()).await } /// Creates a named sub-pipeline /// /// # Arguments /// /// * `name` - Pipeline name. /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn pipeline(&self, name: impl Into<String>) -> Directory { let mut query = self.selection.select("pipeline"); query = query.arg("name", name.into()); return Directory { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Creates a named sub-pipeline /// /// # Arguments /// /// * `name` - Pipeline name. /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn pipeline_opts<'a>( &self, name: impl Into<String>, opts: DirectoryPipelineOpts<'a>, ) -> Directory { let mut query = self.selection.select("pipeline"); query = query.arg("name", name.into()); if let Some(description) = opts.description { query = query.arg("description", description); } if let Some(labels) = opts.labels { query = query.arg("labels", labels); } return Directory { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Force evaluation in the engine. pub async fn sync(&self) -> Result<DirectoryId, DaggerError> { let query = self.selection.select("sync"); query.execute(self.graphql_client.clone()).await } /// Retrieves this directory plus a directory written at the given path. /// /// # Arguments /// /// * `path` - Location of the written directory (e.g., "/src/"). /// * `directory` - Identifier of the directory to copy. /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn with_directory(&self, path: impl Into<String>, directory: Directory) -> Directory { let mut query = self.selection.select("withDirectory"); query = query.arg("path", path.into()); query = query.arg_lazy( "directory", Box::new(move || { let directory = directory.clone(); Box::pin(async move { directory.id().await.unwrap().quote() }) }), ); return Directory { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Retrieves this directory plus a directory written at the given path. /// /// # Arguments /// /// * `path` - Location of the written directory (e.g., "/src/"). /// * `directory` - Identifier of the directory to copy. /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn with_directory_opts<'a>( &self, path: impl Into<String>, directory: Directory, opts: DirectoryWithDirectoryOpts<'a>, ) -> Directory { let mut query = self.selection.select("withDirectory"); query = query.arg("path", path.into()); query = query.arg_lazy( "directory", Box::new(move || { let directory = directory.clone(); Box::pin(async move { directory.id().await.unwrap().quote() }) }), ); if let Some(exclude) = opts.exclude { query = query.arg("exclude", exclude); } if let Some(include) = opts.include { query = query.arg("include", include); } return Directory { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Retrieves this directory plus the contents of the given file copied to the given path. /// /// # Arguments /// /// * `path` - Location of the copied file (e.g., "/file.txt"). /// * `source` - Identifier of the file to copy. /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn with_file(&self, path: impl Into<String>, source: File) -> Directory { let mut query = self.selection.select("withFile"); query = query.arg("path", path.into()); query = query.arg_lazy( "source", Box::new(move || { let source = source.clone(); Box::pin(async move { source.id().await.unwrap().quote() }) }), ); return Directory { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Retrieves this directory plus the contents of the given file copied to the given path. /// /// # Arguments /// /// * `path` - Location of the copied file (e.g., "/file.txt"). /// * `source` - Identifier of the file to copy. /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn with_file_opts( &self, path: impl Into<String>, source: File, opts: DirectoryWithFileOpts, ) -> Directory { let mut query = self.selection.select("withFile"); query = query.arg("path", path.into()); query = query.arg_lazy( "source", Box::new(move || { let source = source.clone(); Box::pin(async move { source.id().await.unwrap().quote() }) }), ); if let Some(permissions) = opts.permissions { query = query.arg("permissions", permissions); } return Directory { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Retrieves this directory plus a new directory created at the given path. /// /// # Arguments /// /// * `path` - Location of the directory created (e.g., "/logs"). /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn with_new_directory(&self, path: impl Into<String>) -> Directory { let mut query = self.selection.select("withNewDirectory"); query = query.arg("path", path.into()); return Directory { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Retrieves this directory plus a new directory created at the given path. /// /// # Arguments /// /// * `path` - Location of the directory created (e.g., "/logs"). /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn with_new_directory_opts( &self, path: impl Into<String>, opts: DirectoryWithNewDirectoryOpts, ) -> Directory { let mut query = self.selection.select("withNewDirectory"); query = query.arg("path", path.into()); if let Some(permissions) = opts.permissions { query = query.arg("permissions", permissions); } return Directory { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Retrieves this directory plus a new file written at the given path. /// /// # Arguments /// /// * `path` - Location of the written file (e.g., "/file.txt"). /// * `contents` - Content of the written file (e.g., "Hello world!"). /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn with_new_file(&self, path: impl Into<String>, contents: impl Into<String>) -> Directory { let mut query = self.selection.select("withNewFile"); query = query.arg("path", path.into()); query = query.arg("contents", contents.into()); return Directory { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Retrieves this directory plus a new file written at the given path. /// /// # Arguments /// /// * `path` - Location of the written file (e.g., "/file.txt"). /// * `contents` - Content of the written file (e.g., "Hello world!"). /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn with_new_file_opts( &self, path: impl Into<String>, contents: impl Into<String>, opts: DirectoryWithNewFileOpts, ) -> Directory { let mut query = self.selection.select("withNewFile"); query = query.arg("path", path.into()); query = query.arg("contents", contents.into()); if let Some(permissions) = opts.permissions { query = query.arg("permissions", permissions); } return Directory { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Retrieves this directory with all file/dir timestamps set to the given time. /// /// # Arguments /// /// * `timestamp` - Timestamp to set dir/files in. /// /// Formatted in seconds following Unix epoch (e.g., 1672531199). pub fn with_timestamps(&self, timestamp: isize) -> Directory { let mut query = self.selection.select("withTimestamps"); query = query.arg("timestamp", timestamp); return Directory { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Retrieves this directory with the directory at the given path removed. /// /// # Arguments /// /// * `path` - Location of the directory to remove (e.g., ".github/"). pub fn without_directory(&self, path: impl Into<String>) -> Directory { let mut query = self.selection.select("withoutDirectory"); query = query.arg("path", path.into()); return Directory { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Retrieves this directory with the file at the given path removed. /// /// # Arguments /// /// * `path` - Location of the file to remove (e.g., "/file.txt"). pub fn without_file(&self, path: impl Into<String>) -> Directory { let mut query = self.selection.select("withoutFile"); query = query.arg("path", path.into()); return Directory { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } } #[derive(Clone)] pub struct EnvVariable { pub proc: Option<Arc<Child>>, pub selection: Selection, pub graphql_client: DynGraphQLClient, } impl EnvVariable { /// The environment variable name. pub async fn name(&self) -> Result<String, DaggerError> { let query = self.selection.select("name"); query.execute(self.graphql_client.clone()).await } /// The environment variable value. pub async fn value(&self) -> Result<String, DaggerError> { let query = self.selection.select("value"); query.execute(self.graphql_client.clone()).await } } #[derive(Clone)] pub struct FieldTypeDef { pub proc: Option<Arc<Child>>, pub selection: Selection, pub graphql_client: DynGraphQLClient, } impl FieldTypeDef { /// A doc string for the field, if any pub async fn description(&self) -> Result<String, DaggerError> { let query = self.selection.select("description"); query.execute(self.graphql_client.clone()).await } /// The name of the field in the object pub async fn name(&self) -> Result<String, DaggerError> { let query = self.selection.select("name"); query.execute(self.graphql_client.clone()).await } /// The type of the field pub fn type_def(&self) -> TypeDef { let query = self.selection.select("typeDef"); return TypeDef { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } } #[derive(Clone)] pub struct File { pub proc: Option<Arc<Child>>, pub selection: Selection, pub graphql_client: DynGraphQLClient, } #[derive(Builder, Debug, PartialEq)] pub struct FileExportOpts { /// If allowParentDirPath is true, the path argument can be a directory path, in which case /// the file will be created in that directory. #[builder(setter(into, strip_option), default)] pub allow_parent_dir_path: Option<bool>, } impl File { /// Retrieves the contents of the file. pub async fn contents(&self) -> Result<String, DaggerError> { let query = self.selection.select("contents"); query.execute(self.graphql_client.clone()).await } /// Writes the file to a file path on the host. /// /// # Arguments /// /// * `path` - Location of the written directory (e.g., "output.txt"). /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub async fn export(&self, path: impl Into<String>) -> Result<bool, DaggerError> { let mut query = self.selection.select("export"); query = query.arg("path", path.into()); query.execute(self.graphql_client.clone()).await } /// Writes the file to a file path on the host. /// /// # Arguments /// /// * `path` - Location of the written directory (e.g., "output.txt"). /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub async fn export_opts( &self, path: impl Into<String>, opts: FileExportOpts, ) -> Result<bool, DaggerError> { let mut query = self.selection.select("export"); query = query.arg("path", path.into()); if let Some(allow_parent_dir_path) = opts.allow_parent_dir_path { query = query.arg("allowParentDirPath", allow_parent_dir_path); } query.execute(self.graphql_client.clone()).await } /// Retrieves the content-addressed identifier of the file. pub async fn id(&self) -> Result<FileId, DaggerError> { let query = self.selection.select("id"); query.execute(self.graphql_client.clone()).await } /// Gets the size of the file, in bytes. pub async fn size(&self) -> Result<isize, DaggerError> { let query = self.selection.select("size"); query.execute(self.graphql_client.clone()).await } /// Force evaluation in the engine. pub async fn sync(&self) -> Result<FileId, DaggerError> { let query = self.selection.select("sync"); query.execute(self.graphql_client.clone()).await } /// Retrieves this file with its created/modified timestamps set to the given time. /// /// # Arguments /// /// * `timestamp` - Timestamp to set dir/files in. /// /// Formatted in seconds following Unix epoch (e.g., 1672531199). pub fn with_timestamps(&self, timestamp: isize) -> File { let mut query = self.selection.select("withTimestamps"); query = query.arg("timestamp", timestamp); return File { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } } #[derive(Clone)] pub struct Function { pub proc: Option<Arc<Child>>, pub selection: Selection, pub graphql_client: DynGraphQLClient, } #[derive(Builder, Debug, PartialEq)] pub struct FunctionWithArgOpts<'a> { /// A default value to use for this argument if not explicitly set by the caller, if any #[builder(setter(into, strip_option), default)] pub default_value: Option<Json>, /// A doc string for the argument, if any #[builder(setter(into, strip_option), default)] pub description: Option<&'a str>, } impl Function { /// Arguments accepted by this function, if any pub fn args(&self) -> Vec<FunctionArg> { let query = self.selection.select("args"); return vec![FunctionArg { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }]; } /// A doc string for the function, if any pub async fn description(&self) -> Result<String, DaggerError> { let query = self.selection.select("description"); query.execute(self.graphql_client.clone()).await } /// The ID of the function pub async fn id(&self) -> Result<FunctionId, DaggerError> { let query = self.selection.select("id"); query.execute(self.graphql_client.clone()).await } /// The name of the function pub async fn name(&self) -> Result<String, DaggerError> { let query = self.selection.select("name"); query.execute(self.graphql_client.clone()).await } /// The type returned by this function pub fn return_type(&self) -> TypeDef { let query = self.selection.select("returnType"); return TypeDef { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Returns the function with the provided argument /// /// # Arguments /// /// * `name` - The name of the argument /// * `type_def` - The type of the argument /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn with_arg(&self, name: impl Into<String>, type_def: TypeDef) -> Function { let mut query = self.selection.select("withArg"); query = query.arg("name", name.into()); query = query.arg_lazy( "typeDef", Box::new(move || { let type_def = type_def.clone(); Box::pin(async move { type_def.id().await.unwrap().quote() }) }), ); return Function { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Returns the function with the provided argument /// /// # Arguments /// /// * `name` - The name of the argument /// * `type_def` - The type of the argument /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn with_arg_opts<'a>( &self, name: impl Into<String>, type_def: TypeDef, opts: FunctionWithArgOpts<'a>, ) -> Function { let mut query = self.selection.select("withArg"); query = query.arg("name", name.into()); query = query.arg_lazy( "typeDef", Box::new(move || { let type_def = type_def.clone(); Box::pin(async move { type_def.id().await.unwrap().quote() }) }), ); if let Some(description) = opts.description { query = query.arg("description", description); } if let Some(default_value) = opts.default_value { query = query.arg("defaultValue", default_value); } return Function { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Returns the function with the doc string pub fn with_description(&self, description: impl Into<String>) -> Function { let mut query = self.selection.select("withDescription"); query = query.arg("description", description.into()); return Function { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } } #[derive(Clone)] pub struct FunctionArg { pub proc: Option<Arc<Child>>, pub selection: Selection, pub graphql_client: DynGraphQLClient, } impl FunctionArg { /// A default value to use for this argument when not explicitly set by the caller, if any pub async fn default_value(&self) -> Result<Json, DaggerError> { let query = self.selection.select("defaultValue"); query.execute(self.graphql_client.clone()).await } /// A doc string for the argument, if any pub async fn description(&self) -> Result<String, DaggerError> { let query = self.selection.select("description"); query.execute(self.graphql_client.clone()).await } /// The ID of the argument pub async fn id(&self) -> Result<FunctionArgId, DaggerError> { let query = self.selection.select("id"); query.execute(self.graphql_client.clone()).await } /// The name of the argument pub async fn name(&self) -> Result<String, DaggerError> { let query = self.selection.select("name"); query.execute(self.graphql_client.clone()).await } /// The type of the argument pub fn type_def(&self) -> TypeDef { let query = self.selection.select("typeDef"); return TypeDef { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } } #[derive(Clone)] pub struct FunctionCall { pub proc: Option<Arc<Child>>, pub selection: Selection, pub graphql_client: DynGraphQLClient, } impl FunctionCall { /// The argument values the function is being invoked with. pub fn input_args(&self) -> Vec<FunctionCallArgValue> { let query = self.selection.select("inputArgs"); return vec![FunctionCallArgValue { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }]; } /// The name of the function being called. pub async fn name(&self) -> Result<String, DaggerError> { let query = self.selection.select("name"); query.execute(self.graphql_client.clone()).await } /// The value of the parent object of the function being called. /// If the function is "top-level" to the module, this is always an empty object. pub async fn parent(&self) -> Result<Json, DaggerError> { let query = self.selection.select("parent"); query.execute(self.graphql_client.clone()).await } /// The name of the parent object of the function being called. /// If the function is "top-level" to the module, this is the name of the module. pub async fn parent_name(&self) -> Result<String, DaggerError> { let query = self.selection.select("parentName"); query.execute(self.graphql_client.clone()).await } /// Set the return value of the function call to the provided value. /// The value should be a string of the JSON serialization of the return value. pub async fn return_value(&self, value: Json) -> Result<Void, DaggerError> { let mut query = self.selection.select("returnValue"); query = query.arg("value", value); query.execute(self.graphql_client.clone()).await } } #[derive(Clone)] pub struct FunctionCallArgValue { pub proc: Option<Arc<Child>>, pub selection: Selection, pub graphql_client: DynGraphQLClient, } impl FunctionCallArgValue { /// The name of the argument. pub async fn name(&self) -> Result<String, DaggerError> { let query = self.selection.select("name"); query.execute(self.graphql_client.clone()).await } /// The value of the argument represented as a string of the JSON serialization. pub async fn value(&self) -> Result<Json, DaggerError> { let query = self.selection.select("value"); query.execute(self.graphql_client.clone()).await } } #[derive(Clone)] pub struct GeneratedCode { pub proc: Option<Arc<Child>>, pub selection: Selection, pub graphql_client: DynGraphQLClient, } impl GeneratedCode { /// The directory containing the generated code pub fn code(&self) -> Directory { let query = self.selection.select("code"); return Directory { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } pub async fn id(&self) -> Result<GeneratedCodeId, DaggerError> { let query = self.selection.select("id"); query.execute(self.graphql_client.clone()).await } /// List of paths to mark generated in version control (i.e. .gitattributes) pub async fn vcs_generated_paths(&self) -> Result<Vec<String>, DaggerError> { let query = self.selection.select("vcsGeneratedPaths"); query.execute(self.graphql_client.clone()).await } /// List of paths to ignore in version control (i.e. .gitignore) pub async fn vcs_ignored_paths(&self) -> Result<Vec<String>, DaggerError> { let query = self.selection.select("vcsIgnoredPaths"); query.execute(self.graphql_client.clone()).await } /// Set the list of paths to mark generated in version control pub fn with_vcs_generated_paths(&self, paths: Vec<impl Into<String>>) -> GeneratedCode { let mut query = self.selection.select("withVCSGeneratedPaths"); query = query.arg( "paths", paths.into_iter().map(|i| i.into()).collect::<Vec<String>>(), ); return GeneratedCode { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Set the list of paths to ignore in version control pub fn with_vcs_ignored_paths(&self, paths: Vec<impl Into<String>>) -> GeneratedCode { let mut query = self.selection.select("withVCSIgnoredPaths"); query = query.arg( "paths", paths.into_iter().map(|i| i.into()).collect::<Vec<String>>(), ); return GeneratedCode { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } } #[derive(Clone)] pub struct GitRef { pub proc: Option<Arc<Child>>, pub selection: Selection, pub graphql_client: DynGraphQLClient, } #[derive(Builder, Debug, PartialEq)] pub struct GitRefTreeOpts<'a> { #[builder(setter(into, strip_option), default)] pub ssh_auth_socket: Option<SocketId>, #[builder(setter(into, strip_option), default)] pub ssh_known_hosts: Option<&'a str>, } impl GitRef { /// The resolved commit id at this ref. pub async fn commit(&self) -> Result<String, DaggerError> { let query = self.selection.select("commit"); query.execute(self.graphql_client.clone()).await } /// Retrieves the content-addressed identifier of the git ref. pub async fn id(&self) -> Result<GitRefId, DaggerError> { let query = self.selection.select("id"); query.execute(self.graphql_client.clone()).await } /// The filesystem tree at this ref. /// /// # Arguments /// /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn tree(&self) -> Directory { let query = self.selection.select("tree"); return Directory { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// The filesystem tree at this ref. /// /// # Arguments /// /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn tree_opts<'a>(&self, opts: GitRefTreeOpts<'a>) -> Directory { let mut query = self.selection.select("tree"); if let Some(ssh_known_hosts) = opts.ssh_known_hosts { query = query.arg("sshKnownHosts", ssh_known_hosts); } if let Some(ssh_auth_socket) = opts.ssh_auth_socket { query = query.arg("sshAuthSocket", ssh_auth_socket); } return Directory { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } } #[derive(Clone)] pub struct GitRepository { pub proc: Option<Arc<Child>>, pub selection: Selection, pub graphql_client: DynGraphQLClient, } impl GitRepository { /// Returns details on one branch. /// /// # Arguments /// /// * `name` - Branch's name (e.g., "main"). pub fn branch(&self, name: impl Into<String>) -> GitRef { let mut query = self.selection.select("branch"); query = query.arg("name", name.into()); return GitRef { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Returns details on one commit. /// /// # Arguments /// /// * `id` - Identifier of the commit (e.g., "b6315d8f2810962c601af73f86831f6866ea798b"). pub fn commit(&self, id: impl Into<String>) -> GitRef { let mut query = self.selection.select("commit"); query = query.arg("id", id.into()); return GitRef { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Retrieves the content-addressed identifier of the git repository. pub async fn id(&self) -> Result<GitRepositoryId, DaggerError> { let query = self.selection.select("id"); query.execute(self.graphql_client.clone()).await } /// Returns details on one tag. /// /// # Arguments /// /// * `name` - Tag's name (e.g., "v0.3.9"). pub fn tag(&self, name: impl Into<String>) -> GitRef { let mut query = self.selection.select("tag"); query = query.arg("name", name.into()); return GitRef { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } } #[derive(Clone)] pub struct Host { pub proc: Option<Arc<Child>>, pub selection: Selection, pub graphql_client: DynGraphQLClient, } #[derive(Builder, Debug, PartialEq)] pub struct HostDirectoryOpts<'a> { /// Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]). #[builder(setter(into, strip_option), default)] pub exclude: Option<Vec<&'a str>>, /// Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]). #[builder(setter(into, strip_option), default)] pub include: Option<Vec<&'a str>>, } #[derive(Builder, Debug, PartialEq)] pub struct HostServiceOpts<'a> { /// Upstream host to forward traffic to. #[builder(setter(into, strip_option), default)] pub host: Option<&'a str>, } #[derive(Builder, Debug, PartialEq)] pub struct HostTunnelOpts { /// Map each service port to the same port on the host, as if the service were /// running natively. /// Note: enabling may result in port conflicts. #[builder(setter(into, strip_option), default)] pub native: Option<bool>, /// Configure explicit port forwarding rules for the tunnel. /// If a port's frontend is unspecified or 0, a random port will be chosen by /// the host. /// If no ports are given, all of the service's ports are forwarded. If native /// is true, each port maps to the same port on the host. If native is false, /// each port maps to a random port chosen by the host. /// If ports are given and native is true, the ports are additive. #[builder(setter(into, strip_option), default)] pub ports: Option<Vec<PortForward>>, } impl Host { /// Accesses a directory on the host. /// /// # Arguments /// /// * `path` - Location of the directory to access (e.g., "."). /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn directory(&self, path: impl Into<String>) -> Directory { let mut query = self.selection.select("directory"); query = query.arg("path", path.into()); return Directory { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Accesses a directory on the host. /// /// # Arguments /// /// * `path` - Location of the directory to access (e.g., "."). /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn directory_opts<'a>( &self, path: impl Into<String>, opts: HostDirectoryOpts<'a>, ) -> Directory { let mut query = self.selection.select("directory"); query = query.arg("path", path.into()); if let Some(exclude) = opts.exclude { query = query.arg("exclude", exclude); } if let Some(include) = opts.include { query = query.arg("include", include); } return Directory { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Accesses a file on the host. /// /// # Arguments /// /// * `path` - Location of the file to retrieve (e.g., "README.md"). pub fn file(&self, path: impl Into<String>) -> File { let mut query = self.selection.select("file"); query = query.arg("path", path.into()); return File { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Creates a service that forwards traffic to a specified address via the host. /// /// # Arguments /// /// * `ports` - Ports to expose via the service, forwarding through the host network. /// /// If a port's frontend is unspecified or 0, it defaults to the same as the /// backend port. /// /// An empty set of ports is not valid; an error will be returned. /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn service(&self, ports: Vec<PortForward>) -> Service { let mut query = self.selection.select("service"); query = query.arg("ports", ports); return Service { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Creates a service that forwards traffic to a specified address via the host. /// /// # Arguments /// /// * `ports` - Ports to expose via the service, forwarding through the host network. /// /// If a port's frontend is unspecified or 0, it defaults to the same as the /// backend port. /// /// An empty set of ports is not valid; an error will be returned. /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn service_opts<'a>(&self, ports: Vec<PortForward>, opts: HostServiceOpts<'a>) -> Service { let mut query = self.selection.select("service"); query = query.arg("ports", ports); if let Some(host) = opts.host { query = query.arg("host", host); } return Service { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Sets a secret given a user-defined name and the file path on the host, and returns the secret. /// The file is limited to a size of 512000 bytes. /// /// # Arguments /// /// * `name` - The user defined name for this secret. /// * `path` - Location of the file to set as a secret. pub fn set_secret_file(&self, name: impl Into<String>, path: impl Into<String>) -> Secret { let mut query = self.selection.select("setSecretFile"); query = query.arg("name", name.into()); query = query.arg("path", path.into()); return Secret { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Creates a tunnel that forwards traffic from the host to a service. /// /// # Arguments /// /// * `service` - Service to send traffic from the tunnel. /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn tunnel(&self, service: Service) -> Service { let mut query = self.selection.select("tunnel"); query = query.arg_lazy( "service", Box::new(move || { let service = service.clone(); Box::pin(async move { service.id().await.unwrap().quote() }) }), ); return Service { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Creates a tunnel that forwards traffic from the host to a service. /// /// # Arguments /// /// * `service` - Service to send traffic from the tunnel. /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn tunnel_opts(&self, service: Service, opts: HostTunnelOpts) -> Service { let mut query = self.selection.select("tunnel"); query = query.arg_lazy( "service", Box::new(move || { let service = service.clone(); Box::pin(async move { service.id().await.unwrap().quote() }) }), ); if let Some(native) = opts.native { query = query.arg("native", native); } if let Some(ports) = opts.ports { query = query.arg("ports", ports); } return Service { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Accesses a Unix socket on the host. /// /// # Arguments /// /// * `path` - Location of the Unix socket (e.g., "/var/run/docker.sock"). pub fn unix_socket(&self, path: impl Into<String>) -> Socket { let mut query = self.selection.select("unixSocket"); query = query.arg("path", path.into()); return Socket { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } } #[derive(Clone)] pub struct Label { pub proc: Option<Arc<Child>>, pub selection: Selection, pub graphql_client: DynGraphQLClient, } impl Label { /// The label name. pub async fn name(&self) -> Result<String, DaggerError> { let query = self.selection.select("name"); query.execute(self.graphql_client.clone()).await } /// The label value. pub async fn value(&self) -> Result<String, DaggerError> { let query = self.selection.select("value"); query.execute(self.graphql_client.clone()).await } } #[derive(Clone)] pub struct ListTypeDef { pub proc: Option<Arc<Child>>, pub selection: Selection, pub graphql_client: DynGraphQLClient, } impl ListTypeDef { /// The type of the elements in the list pub fn element_type_def(&self) -> TypeDef { let query = self.selection.select("elementTypeDef"); return TypeDef { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } } #[derive(Clone)] pub struct Module { pub proc: Option<Arc<Child>>, pub selection: Selection, pub graphql_client: DynGraphQLClient, } impl Module { /// Modules used by this module pub fn dependencies(&self) -> Vec<Module> { let query = self.selection.select("dependencies"); return vec![Module { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }]; } /// The dependencies as configured by the module pub async fn dependency_config(&self) -> Result<Vec<String>, DaggerError> { let query = self.selection.select("dependencyConfig"); query.execute(self.graphql_client.clone()).await } /// The doc string of the module, if any pub async fn description(&self) -> Result<String, DaggerError> { let query = self.selection.select("description"); query.execute(self.graphql_client.clone()).await } /// The code generated by the SDK's runtime pub fn generated_code(&self) -> GeneratedCode { let query = self.selection.select("generatedCode"); return GeneratedCode { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// The ID of the module pub async fn id(&self) -> Result<ModuleId, DaggerError> { let query = self.selection.select("id"); query.execute(self.graphql_client.clone()).await } /// The name of the module pub async fn name(&self) -> Result<String, DaggerError> { let query = self.selection.select("name"); query.execute(self.graphql_client.clone()).await } /// Objects served by this module pub fn objects(&self) -> Vec<TypeDef> { let query = self.selection.select("objects"); return vec![TypeDef { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }]; } /// The SDK used by this module. Either a name of a builtin SDK or a module ref pointing to the SDK's implementation. pub async fn sdk(&self) -> Result<String, DaggerError> { let query = self.selection.select("sdk"); query.execute(self.graphql_client.clone()).await } /// Serve a module's API in the current session. /// Note: this can only be called once per session. /// In the future, it could return a stream or service to remove the side effect. pub async fn serve(&self) -> Result<Void, DaggerError> { let query = self.selection.select("serve"); query.execute(self.graphql_client.clone()).await } /// The directory containing the module's source code pub fn source_directory(&self) -> Directory { let query = self.selection.select("sourceDirectory"); return Directory { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// The module's subpath within the source directory pub async fn source_directory_sub_path(&self) -> Result<String, DaggerError> { let query = self.selection.select("sourceDirectorySubPath"); query.execute(self.graphql_client.clone()).await } /// This module plus the given Object type and associated functions pub fn with_object(&self, object: TypeDef) -> Module { let mut query = self.selection.select("withObject"); query = query.arg_lazy( "object", Box::new(move || { let object = object.clone(); Box::pin(async move { object.id().await.unwrap().quote() }) }), ); return Module { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } } #[derive(Clone)] pub struct ModuleConfig { pub proc: Option<Arc<Child>>, pub selection: Selection, pub graphql_client: DynGraphQLClient, } impl ModuleConfig { /// Modules that this module depends on. pub async fn dependencies(&self) -> Result<Vec<String>, DaggerError> { let query = self.selection.select("dependencies"); query.execute(self.graphql_client.clone()).await } /// Exclude these file globs when loading the module root. pub async fn exclude(&self) -> Result<Vec<String>, DaggerError> { let query = self.selection.select("exclude"); query.execute(self.graphql_client.clone()).await } /// Include only these file globs when loading the module root. pub async fn include(&self) -> Result<Vec<String>, DaggerError> { let query = self.selection.select("include"); query.execute(self.graphql_client.clone()).await } /// The name of the module. pub async fn name(&self) -> Result<String, DaggerError> { let query = self.selection.select("name"); query.execute(self.graphql_client.clone()).await } /// The root directory of the module's project, which may be above the module source code. pub async fn root(&self) -> Result<String, DaggerError> { let query = self.selection.select("root"); query.execute(self.graphql_client.clone()).await } /// Either the name of a built-in SDK ('go', 'python', etc.) OR a module reference pointing to the SDK's module implementation. pub async fn sdk(&self) -> Result<String, DaggerError> { let query = self.selection.select("sdk"); query.execute(self.graphql_client.clone()).await } } #[derive(Clone)] pub struct ObjectTypeDef { pub proc: Option<Arc<Child>>, pub selection: Selection, pub graphql_client: DynGraphQLClient, } impl ObjectTypeDef { /// The function used to construct new instances of this object, if any pub fn constructor(&self) -> Function { let query = self.selection.select("constructor"); return Function { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// The doc string for the object, if any pub async fn description(&self) -> Result<String, DaggerError> { let query = self.selection.select("description"); query.execute(self.graphql_client.clone()).await } /// Static fields defined on this object, if any pub fn fields(&self) -> Vec<FieldTypeDef> { let query = self.selection.select("fields"); return vec![FieldTypeDef { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }]; } /// Functions defined on this object, if any pub fn functions(&self) -> Vec<Function> { let query = self.selection.select("functions"); return vec![Function { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }]; } /// The name of the object pub async fn name(&self) -> Result<String, DaggerError> { let query = self.selection.select("name"); query.execute(self.graphql_client.clone()).await } } #[derive(Clone)] pub struct Port { pub proc: Option<Arc<Child>>, pub selection: Selection, pub graphql_client: DynGraphQLClient, } impl Port { /// The port description. pub async fn description(&self) -> Result<String, DaggerError> { let query = self.selection.select("description"); query.execute(self.graphql_client.clone()).await } /// The port number. pub async fn port(&self) -> Result<isize, DaggerError> { let query = self.selection.select("port"); query.execute(self.graphql_client.clone()).await } /// The transport layer network protocol. pub async fn protocol(&self) -> Result<NetworkProtocol, DaggerError> { let query = self.selection.select("protocol"); query.execute(self.graphql_client.clone()).await } } #[derive(Clone)] pub struct Query { pub proc: Option<Arc<Child>>, pub selection: Selection, pub graphql_client: DynGraphQLClient, } #[derive(Builder, Debug, PartialEq)] pub struct QueryContainerOpts { #[builder(setter(into, strip_option), default)] pub id: Option<ContainerId>, #[builder(setter(into, strip_option), default)] pub platform: Option<Platform>, } #[derive(Builder, Debug, PartialEq)] pub struct QueryDirectoryOpts { #[builder(setter(into, strip_option), default)] pub id: Option<DirectoryId>, } #[derive(Builder, Debug, PartialEq)] pub struct QueryGitOpts<'a> { /// A service which must be started before the repo is fetched. #[builder(setter(into, strip_option), default)] pub experimental_service_host: Option<ServiceId>, /// Set to true to keep .git directory. #[builder(setter(into, strip_option), default)] pub keep_git_dir: Option<bool>, /// Set SSH auth socket #[builder(setter(into, strip_option), default)] pub ssh_auth_socket: Option<SocketId>, /// Set SSH known hosts #[builder(setter(into, strip_option), default)] pub ssh_known_hosts: Option<&'a str>, } #[derive(Builder, Debug, PartialEq)] pub struct QueryHttpOpts { /// A service which must be started before the URL is fetched. #[builder(setter(into, strip_option), default)] pub experimental_service_host: Option<ServiceId>, } #[derive(Builder, Debug, PartialEq)] pub struct QueryModuleConfigOpts<'a> { #[builder(setter(into, strip_option), default)] pub subpath: Option<&'a str>, } #[derive(Builder, Debug, PartialEq)] pub struct QueryPipelineOpts<'a> { /// Pipeline description. #[builder(setter(into, strip_option), default)] pub description: Option<&'a str>, /// Pipeline labels. #[builder(setter(into, strip_option), default)] pub labels: Option<Vec<PipelineLabel>>, } #[derive(Builder, Debug, PartialEq)] pub struct QuerySocketOpts { #[builder(setter(into, strip_option), default)] pub id: Option<SocketId>, } impl Query { /// Constructs a cache volume for a given cache key. /// /// # Arguments /// /// * `key` - A string identifier to target this cache volume (e.g., "modules-cache"). pub fn cache_volume(&self, key: impl Into<String>) -> CacheVolume { let mut query = self.selection.select("cacheVolume"); query = query.arg("key", key.into()); return CacheVolume { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Checks if the current Dagger Engine is compatible with an SDK's required version. /// /// # Arguments /// /// * `version` - The SDK's required version. pub async fn check_version_compatibility( &self, version: impl Into<String>, ) -> Result<bool, DaggerError> { let mut query = self.selection.select("checkVersionCompatibility"); query = query.arg("version", version.into()); query.execute(self.graphql_client.clone()).await } /// Creates a scratch container or loads one by ID. /// Optional platform argument initializes new containers to execute and publish /// as that platform. Platform defaults to that of the builder's host. /// /// # Arguments /// /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn container(&self) -> Container { let query = self.selection.select("container"); return Container { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Creates a scratch container or loads one by ID. /// Optional platform argument initializes new containers to execute and publish /// as that platform. Platform defaults to that of the builder's host. /// /// # Arguments /// /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn container_opts(&self, opts: QueryContainerOpts) -> Container { let mut query = self.selection.select("container"); if let Some(id) = opts.id { query = query.arg("id", id); } if let Some(platform) = opts.platform { query = query.arg("platform", platform); } return Container { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// The FunctionCall context that the SDK caller is currently executing in. /// If the caller is not currently executing in a function, this will return /// an error. pub fn current_function_call(&self) -> FunctionCall { let query = self.selection.select("currentFunctionCall"); return FunctionCall { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// The module currently being served in the session, if any. pub fn current_module(&self) -> Module { let query = self.selection.select("currentModule"); return Module { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// The default platform of the builder. pub async fn default_platform(&self) -> Result<Platform, DaggerError> { let query = self.selection.select("defaultPlatform"); query.execute(self.graphql_client.clone()).await } /// Creates an empty directory or loads one by ID. /// /// # Arguments /// /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn directory(&self) -> Directory { let query = self.selection.select("directory"); return Directory { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Creates an empty directory or loads one by ID. /// /// # Arguments /// /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn directory_opts(&self, opts: QueryDirectoryOpts) -> Directory { let mut query = self.selection.select("directory"); if let Some(id) = opts.id { query = query.arg("id", id); } return Directory { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Loads a file by ID. pub fn file(&self, id: File) -> File { let mut query = self.selection.select("file"); query = query.arg_lazy( "id", Box::new(move || { let id = id.clone(); Box::pin(async move { id.id().await.unwrap().quote() }) }), ); return File { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Create a function. pub fn function(&self, name: impl Into<String>, return_type: TypeDef) -> Function { let mut query = self.selection.select("function"); query = query.arg("name", name.into()); query = query.arg_lazy( "returnType", Box::new(move || { let return_type = return_type.clone(); Box::pin(async move { return_type.id().await.unwrap().quote() }) }), ); return Function { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Create a code generation result, given a directory containing the generated /// code. pub fn generated_code(&self, code: Directory) -> GeneratedCode { let mut query = self.selection.select("generatedCode"); query = query.arg_lazy( "code", Box::new(move || { let code = code.clone(); Box::pin(async move { code.id().await.unwrap().quote() }) }), ); return GeneratedCode { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Queries a git repository. /// /// # Arguments /// /// * `url` - Url of the git repository. /// Can be formatted as `https://{host}/{owner}/{repo}`, `git@{host}:{owner}/{repo}` /// Suffix ".git" is optional. /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn git(&self, url: impl Into<String>) -> GitRepository { let mut query = self.selection.select("git"); query = query.arg("url", url.into()); return GitRepository { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Queries a git repository. /// /// # Arguments /// /// * `url` - Url of the git repository. /// Can be formatted as `https://{host}/{owner}/{repo}`, `git@{host}:{owner}/{repo}` /// Suffix ".git" is optional. /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn git_opts<'a>(&self, url: impl Into<String>, opts: QueryGitOpts<'a>) -> GitRepository { let mut query = self.selection.select("git"); query = query.arg("url", url.into()); if let Some(keep_git_dir) = opts.keep_git_dir { query = query.arg("keepGitDir", keep_git_dir); } if let Some(ssh_known_hosts) = opts.ssh_known_hosts { query = query.arg("sshKnownHosts", ssh_known_hosts); } if let Some(ssh_auth_socket) = opts.ssh_auth_socket { query = query.arg("sshAuthSocket", ssh_auth_socket); } if let Some(experimental_service_host) = opts.experimental_service_host { query = query.arg("experimentalServiceHost", experimental_service_host); } return GitRepository { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Queries the host environment. pub fn host(&self) -> Host { let query = self.selection.select("host"); return Host { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Returns a file containing an http remote url content. /// /// # Arguments /// /// * `url` - HTTP url to get the content from (e.g., "https://docs.dagger.io"). /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn http(&self, url: impl Into<String>) -> File { let mut query = self.selection.select("http"); query = query.arg("url", url.into()); return File { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Returns a file containing an http remote url content. /// /// # Arguments /// /// * `url` - HTTP url to get the content from (e.g., "https://docs.dagger.io"). /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn http_opts(&self, url: impl Into<String>, opts: QueryHttpOpts) -> File { let mut query = self.selection.select("http"); query = query.arg("url", url.into()); if let Some(experimental_service_host) = opts.experimental_service_host { query = query.arg("experimentalServiceHost", experimental_service_host); } return File { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Load a CacheVolume from its ID. pub fn load_cache_volume_from_id(&self, id: CacheVolume) -> CacheVolume { let mut query = self.selection.select("loadCacheVolumeFromID"); query = query.arg_lazy( "id", Box::new(move || { let id = id.clone(); Box::pin(async move { id.id().await.unwrap().quote() }) }), ); return CacheVolume { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Loads a container from an ID. pub fn load_container_from_id(&self, id: Container) -> Container { let mut query = self.selection.select("loadContainerFromID"); query = query.arg_lazy( "id", Box::new(move || { let id = id.clone(); Box::pin(async move { id.id().await.unwrap().quote() }) }), ); return Container { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Load a Directory from its ID. pub fn load_directory_from_id(&self, id: Directory) -> Directory { let mut query = self.selection.select("loadDirectoryFromID"); query = query.arg_lazy( "id", Box::new(move || { let id = id.clone(); Box::pin(async move { id.id().await.unwrap().quote() }) }), ); return Directory { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Load a File from its ID. pub fn load_file_from_id(&self, id: File) -> File { let mut query = self.selection.select("loadFileFromID"); query = query.arg_lazy( "id", Box::new(move || { let id = id.clone(); Box::pin(async move { id.id().await.unwrap().quote() }) }), ); return File { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Load a function argument by ID. pub fn load_function_arg_from_id(&self, id: FunctionArg) -> FunctionArg { let mut query = self.selection.select("loadFunctionArgFromID"); query = query.arg_lazy( "id", Box::new(move || { let id = id.clone(); Box::pin(async move { id.id().await.unwrap().quote() }) }), ); return FunctionArg { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Load a function by ID. pub fn load_function_from_id(&self, id: Function) -> Function { let mut query = self.selection.select("loadFunctionFromID"); query = query.arg_lazy( "id", Box::new(move || { let id = id.clone(); Box::pin(async move { id.id().await.unwrap().quote() }) }), ); return Function { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Load a GeneratedCode by ID. pub fn load_generated_code_from_id(&self, id: GeneratedCode) -> GeneratedCode { let mut query = self.selection.select("loadGeneratedCodeFromID"); query = query.arg_lazy( "id", Box::new(move || { let id = id.clone(); Box::pin(async move { id.id().await.unwrap().quote() }) }), ); return GeneratedCode { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Load a git ref from its ID. pub fn load_git_ref_from_id(&self, id: GitRef) -> GitRef { let mut query = self.selection.select("loadGitRefFromID"); query = query.arg_lazy( "id", Box::new(move || { let id = id.clone(); Box::pin(async move { id.id().await.unwrap().quote() }) }), ); return GitRef { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Load a git repository from its ID. pub fn load_git_repository_from_id(&self, id: GitRepository) -> GitRepository { let mut query = self.selection.select("loadGitRepositoryFromID"); query = query.arg_lazy( "id", Box::new(move || { let id = id.clone(); Box::pin(async move { id.id().await.unwrap().quote() }) }), ); return GitRepository { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Load a module by ID. pub fn load_module_from_id(&self, id: Module) -> Module { let mut query = self.selection.select("loadModuleFromID"); query = query.arg_lazy( "id", Box::new(move || { let id = id.clone(); Box::pin(async move { id.id().await.unwrap().quote() }) }), ); return Module { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Load a Secret from its ID. pub fn load_secret_from_id(&self, id: Secret) -> Secret { let mut query = self.selection.select("loadSecretFromID"); query = query.arg_lazy( "id", Box::new(move || { let id = id.clone(); Box::pin(async move { id.id().await.unwrap().quote() }) }), ); return Secret { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Loads a service from ID. pub fn load_service_from_id(&self, id: Service) -> Service { let mut query = self.selection.select("loadServiceFromID"); query = query.arg_lazy( "id", Box::new(move || { let id = id.clone(); Box::pin(async move { id.id().await.unwrap().quote() }) }), ); return Service { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Load a Socket from its ID. pub fn load_socket_from_id(&self, id: Socket) -> Socket { let mut query = self.selection.select("loadSocketFromID"); query = query.arg_lazy( "id", Box::new(move || { let id = id.clone(); Box::pin(async move { id.id().await.unwrap().quote() }) }), ); return Socket { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Load a TypeDef by ID. pub fn load_type_def_from_id(&self, id: TypeDef) -> TypeDef { let mut query = self.selection.select("loadTypeDefFromID"); query = query.arg_lazy( "id", Box::new(move || { let id = id.clone(); Box::pin(async move { id.id().await.unwrap().quote() }) }), ); return TypeDef { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Create a new module. pub fn module(&self) -> Module { let query = self.selection.select("module"); return Module { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Load the static configuration for a module from the given source directory and optional subpath. /// /// # Arguments /// /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn module_config(&self, source_directory: Directory) -> ModuleConfig { let mut query = self.selection.select("moduleConfig"); query = query.arg_lazy( "sourceDirectory", Box::new(move || { let source_directory = source_directory.clone(); Box::pin(async move { source_directory.id().await.unwrap().quote() }) }), ); return ModuleConfig { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Load the static configuration for a module from the given source directory and optional subpath. /// /// # Arguments /// /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn module_config_opts<'a>( &self, source_directory: Directory, opts: QueryModuleConfigOpts<'a>, ) -> ModuleConfig { let mut query = self.selection.select("moduleConfig"); query = query.arg_lazy( "sourceDirectory", Box::new(move || { let source_directory = source_directory.clone(); Box::pin(async move { source_directory.id().await.unwrap().quote() }) }), ); if let Some(subpath) = opts.subpath { query = query.arg("subpath", subpath); } return ModuleConfig { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Creates a named sub-pipeline. /// /// # Arguments /// /// * `name` - Pipeline name. /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn pipeline(&self, name: impl Into<String>) -> Query { let mut query = self.selection.select("pipeline"); query = query.arg("name", name.into()); return Query { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Creates a named sub-pipeline. /// /// # Arguments /// /// * `name` - Pipeline name. /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn pipeline_opts<'a>(&self, name: impl Into<String>, opts: QueryPipelineOpts<'a>) -> Query { let mut query = self.selection.select("pipeline"); query = query.arg("name", name.into()); if let Some(description) = opts.description { query = query.arg("description", description); } if let Some(labels) = opts.labels { query = query.arg("labels", labels); } return Query { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Loads a secret from its ID. pub fn secret(&self, id: Secret) -> Secret { let mut query = self.selection.select("secret"); query = query.arg_lazy( "id", Box::new(move || { let id = id.clone(); Box::pin(async move { id.id().await.unwrap().quote() }) }), ); return Secret { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Sets a secret given a user defined name to its plaintext and returns the secret. /// The plaintext value is limited to a size of 128000 bytes. /// /// # Arguments /// /// * `name` - The user defined name for this secret /// * `plaintext` - The plaintext of the secret pub fn set_secret(&self, name: impl Into<String>, plaintext: impl Into<String>) -> Secret { let mut query = self.selection.select("setSecret"); query = query.arg("name", name.into()); query = query.arg("plaintext", plaintext.into()); return Secret { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Loads a socket by its ID. /// /// # Arguments /// /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn socket(&self) -> Socket { let query = self.selection.select("socket"); return Socket { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Loads a socket by its ID. /// /// # Arguments /// /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn socket_opts(&self, opts: QuerySocketOpts) -> Socket { let mut query = self.selection.select("socket"); if let Some(id) = opts.id { query = query.arg("id", id); } return Socket { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Create a new TypeDef. pub fn type_def(&self) -> TypeDef { let query = self.selection.select("typeDef"); return TypeDef { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } } #[derive(Clone)] pub struct Secret { pub proc: Option<Arc<Child>>, pub selection: Selection, pub graphql_client: DynGraphQLClient, } impl Secret { /// The identifier for this secret. pub async fn id(&self) -> Result<SecretId, DaggerError> { let query = self.selection.select("id"); query.execute(self.graphql_client.clone()).await } /// The value of this secret. pub async fn plaintext(&self) -> Result<String, DaggerError> { let query = self.selection.select("plaintext"); query.execute(self.graphql_client.clone()).await } } #[derive(Clone)] pub struct Service { pub proc: Option<Arc<Child>>, pub selection: Selection, pub graphql_client: DynGraphQLClient, } #[derive(Builder, Debug, PartialEq)] pub struct ServiceEndpointOpts<'a> { /// The exposed port number for the endpoint #[builder(setter(into, strip_option), default)] pub port: Option<isize>, /// Return a URL with the given scheme, eg. http for http:// #[builder(setter(into, strip_option), default)] pub scheme: Option<&'a str>, } impl Service { /// Retrieves an endpoint that clients can use to reach this container. /// If no port is specified, the first exposed port is used. If none exist an error is returned. /// If a scheme is specified, a URL is returned. Otherwise, a host:port pair is returned. /// /// # Arguments /// /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub async fn endpoint(&self) -> Result<String, DaggerError> { let query = self.selection.select("endpoint"); query.execute(self.graphql_client.clone()).await } /// Retrieves an endpoint that clients can use to reach this container. /// If no port is specified, the first exposed port is used. If none exist an error is returned. /// If a scheme is specified, a URL is returned. Otherwise, a host:port pair is returned. /// /// # Arguments /// /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub async fn endpoint_opts<'a>( &self, opts: ServiceEndpointOpts<'a>, ) -> Result<String, DaggerError> { let mut query = self.selection.select("endpoint"); if let Some(port) = opts.port { query = query.arg("port", port); } if let Some(scheme) = opts.scheme { query = query.arg("scheme", scheme); } query.execute(self.graphql_client.clone()).await } /// Retrieves a hostname which can be used by clients to reach this container. pub async fn hostname(&self) -> Result<String, DaggerError> { let query = self.selection.select("hostname"); query.execute(self.graphql_client.clone()).await } /// A unique identifier for this service. pub async fn id(&self) -> Result<ServiceId, DaggerError> { let query = self.selection.select("id"); query.execute(self.graphql_client.clone()).await } /// Retrieves the list of ports provided by the service. pub fn ports(&self) -> Vec<Port> { let query = self.selection.select("ports"); return vec![Port { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }]; } /// Start the service and wait for its health checks to succeed. /// Services bound to a Container do not need to be manually started. pub async fn start(&self) -> Result<ServiceId, DaggerError> { let query = self.selection.select("start"); query.execute(self.graphql_client.clone()).await } /// Stop the service. pub async fn stop(&self) -> Result<ServiceId, DaggerError> { let query = self.selection.select("stop"); query.execute(self.graphql_client.clone()).await } } #[derive(Clone)] pub struct Socket { pub proc: Option<Arc<Child>>, pub selection: Selection, pub graphql_client: DynGraphQLClient, } impl Socket { /// The content-addressed identifier of the socket. pub async fn id(&self) -> Result<SocketId, DaggerError> { let query = self.selection.select("id"); query.execute(self.graphql_client.clone()).await } } #[derive(Clone)] pub struct TypeDef { pub proc: Option<Arc<Child>>, pub selection: Selection, pub graphql_client: DynGraphQLClient, } #[derive(Builder, Debug, PartialEq)] pub struct TypeDefWithFieldOpts<'a> { /// A doc string for the field, if any #[builder(setter(into, strip_option), default)] pub description: Option<&'a str>, } #[derive(Builder, Debug, PartialEq)] pub struct TypeDefWithObjectOpts<'a> { #[builder(setter(into, strip_option), default)] pub description: Option<&'a str>, } impl TypeDef { /// If kind is LIST, the list-specific type definition. /// If kind is not LIST, this will be null. pub fn as_list(&self) -> ListTypeDef { let query = self.selection.select("asList"); return ListTypeDef { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// If kind is OBJECT, the object-specific type definition. /// If kind is not OBJECT, this will be null. pub fn as_object(&self) -> ObjectTypeDef { let query = self.selection.select("asObject"); return ObjectTypeDef { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } pub async fn id(&self) -> Result<TypeDefId, DaggerError> { let query = self.selection.select("id"); query.execute(self.graphql_client.clone()).await } /// The kind of type this is (e.g. primitive, list, object) pub async fn kind(&self) -> Result<TypeDefKind, DaggerError> { let query = self.selection.select("kind"); query.execute(self.graphql_client.clone()).await } /// Whether this type can be set to null. Defaults to false. pub async fn optional(&self) -> Result<bool, DaggerError> { let query = self.selection.select("optional"); query.execute(self.graphql_client.clone()).await } /// Adds a function for constructing a new instance of an Object TypeDef, failing if the type is not an object. pub fn with_constructor(&self, function: Function) -> TypeDef { let mut query = self.selection.select("withConstructor"); query = query.arg_lazy( "function", Box::new(move || { let function = function.clone(); Box::pin(async move { function.id().await.unwrap().quote() }) }), ); return TypeDef { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Adds a static field for an Object TypeDef, failing if the type is not an object. /// /// # Arguments /// /// * `name` - The name of the field in the object /// * `type_def` - The type of the field /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn with_field(&self, name: impl Into<String>, type_def: TypeDef) -> TypeDef { let mut query = self.selection.select("withField"); query = query.arg("name", name.into()); query = query.arg_lazy( "typeDef", Box::new(move || { let type_def = type_def.clone(); Box::pin(async move { type_def.id().await.unwrap().quote() }) }), ); return TypeDef { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Adds a static field for an Object TypeDef, failing if the type is not an object. /// /// # Arguments /// /// * `name` - The name of the field in the object /// * `type_def` - The type of the field /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn with_field_opts<'a>( &self, name: impl Into<String>, type_def: TypeDef, opts: TypeDefWithFieldOpts<'a>, ) -> TypeDef { let mut query = self.selection.select("withField"); query = query.arg("name", name.into()); query = query.arg_lazy( "typeDef", Box::new(move || { let type_def = type_def.clone(); Box::pin(async move { type_def.id().await.unwrap().quote() }) }), ); if let Some(description) = opts.description { query = query.arg("description", description); } return TypeDef { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Adds a function for an Object TypeDef, failing if the type is not an object. pub fn with_function(&self, function: Function) -> TypeDef { let mut query = self.selection.select("withFunction"); query = query.arg_lazy( "function", Box::new(move || { let function = function.clone(); Box::pin(async move { function.id().await.unwrap().quote() }) }), ); return TypeDef { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Sets the kind of the type. pub fn with_kind(&self, kind: TypeDefKind) -> TypeDef { let mut query = self.selection.select("withKind"); query = query.arg_enum("kind", kind); return TypeDef { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Returns a TypeDef of kind List with the provided type for its elements. pub fn with_list_of(&self, element_type: TypeDef) -> TypeDef { let mut query = self.selection.select("withListOf"); query = query.arg_lazy( "elementType", Box::new(move || { let element_type = element_type.clone(); Box::pin(async move { element_type.id().await.unwrap().quote() }) }), ); return TypeDef { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Returns a TypeDef of kind Object with the provided name. /// Note that an object's fields and functions may be omitted if the intent is /// only to refer to an object. This is how functions are able to return their /// own object, or any other circular reference. /// /// # Arguments /// /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn with_object(&self, name: impl Into<String>) -> TypeDef { let mut query = self.selection.select("withObject"); query = query.arg("name", name.into()); return TypeDef { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Returns a TypeDef of kind Object with the provided name. /// Note that an object's fields and functions may be omitted if the intent is /// only to refer to an object. This is how functions are able to return their /// own object, or any other circular reference. /// /// # Arguments /// /// * `opt` - optional argument, see inner type for documentation, use <func>_opts to use pub fn with_object_opts<'a>( &self, name: impl Into<String>, opts: TypeDefWithObjectOpts<'a>, ) -> TypeDef { let mut query = self.selection.select("withObject"); query = query.arg("name", name.into()); if let Some(description) = opts.description { query = query.arg("description", description); } return TypeDef { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } /// Sets whether this type can be set to null. pub fn with_optional(&self, optional: bool) -> TypeDef { let mut query = self.selection.select("withOptional"); query = query.arg("optional", optional); return TypeDef { proc: self.proc.clone(), selection: query, graphql_client: self.graphql_client.clone(), }; } } #[derive(Serialize, Deserialize, Clone, PartialEq, Debug)] pub enum CacheSharingMode { LOCKED, PRIVATE, SHARED, } #[derive(Serialize, Deserialize, Clone, PartialEq, Debug)] pub enum ImageLayerCompression { EStarGZ, Gzip, Uncompressed, Zstd, } #[derive(Serialize, Deserialize, Clone, PartialEq, Debug)] pub enum ImageMediaTypes { DockerMediaTypes, OCIMediaTypes, } #[derive(Serialize, Deserialize, Clone, PartialEq, Debug)] pub enum NetworkProtocol { TCP, UDP, } #[derive(Serialize, Deserialize, Clone, PartialEq, Debug)] pub enum TypeDefKind { BooleanKind, IntegerKind, ListKind, ObjectKind, StringKind, VoidKind, }
closed
dagger/dagger
https://github.com/dagger/dagger
6,265
Fix flakiness in Python test
Reported by @jedevc in https://github.com/dagger/dagger/pull/6258#issuecomment-1853740495 ``` FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pytest-of-root/pytest-0/cache_home0/dagger/dagger-0.0.0' ``` The automatic provisioning garbage collector probably needs a lock: https://github.com/dagger/dagger/blob/970bcfe512cfc699005c46992f52a8f1d17c2af3/sdk/python/tests/engine/test_download.py#L136-L142 https://github.com/dagger/dagger/blob/970bcfe512cfc699005c46992f52a8f1d17c2af3/sdk/python/src/dagger/_engine/download.py#L170
https://github.com/dagger/dagger/issues/6265
https://github.com/dagger/dagger/pull/6294
cd825bde699a0beb0adb5c2529da5469118a172b
3797b96902edbdf6866ce2b71233576572673189
"2023-12-13T12:31:37Z"
go
"2023-12-19T13:58:16Z"
sdk/python/src/dagger/_engine/download.py
import contextlib import functools import hashlib import io import logging import os import platform import shutil import tarfile import tempfile import typing import zipfile from collections.abc import Iterator from dataclasses import dataclass, field from pathlib import Path, PurePath from typing import IO, ClassVar import anyio import anyio.to_thread import httpx import platformdirs import dagger from ._version import CLI_VERSION from .progress import Progress logger = logging.getLogger(__name__) asyncify = anyio.to_thread.run_sync class Platform(typing.NamedTuple): os: str arch: str def get_platform() -> Platform: normalized_arch = { "x86_64": "amd64", "aarch64": "arm64", } uname = platform.uname() os_name = uname.system.lower() arch = uname.machine.lower() arch = normalized_arch.get(arch, arch) return Platform(os_name, arch) class TempFile(contextlib.AbstractContextManager): """Create a temporary file that only deletes on error.""" def __init__(self, prefix: str, directory: Path): super().__init__() self.prefix = prefix self.dir = directory self.stack = contextlib.ExitStack() def __enter__(self) -> typing.IO[bytes]: with self.stack as stack: self.file = stack.enter_context( tempfile.NamedTemporaryFile( mode="a+b", prefix=self.prefix, dir=self.dir, delete=False, ), ) self.stack = stack.pop_all() return self.file def __exit__(self, exc, *_) -> None: self.stack.close() # delete on error if exc: Path(self.file.name).unlink() class StreamReader(IO[bytes]): """File-like object from an httpx.Response.""" def __init__(self, response: httpx.Response, bufsize: int = tarfile.RECORDSIZE): self.bufsize = bufsize self.stream = response.iter_raw(bufsize) self.hasher = hashlib.sha256() def read(self, size: int): """Read chunk from stream.""" # To satisfy the file-like api we should be able to read an arbitrary # number of bytes from the stream, but the http response returns a # generator with a fixed chunk size. No need to go lower level to change it # since we know `read` will be called with the same size during extraction. assert size == self.bufsize try: chunk = next(self.stream) except StopIteration: return None self.hasher.update(chunk) return chunk def readall(self): """Read everything in stream while discarding chunks.""" while self.read(self.bufsize): ... def getbuffer(self): """Read the entire stream into an in-memory buffer.""" buf = io.BytesIO() shutil.copyfileobj(self, buf, self.bufsize) buf.seek(0) return buf @property def checksum(self) -> str: return self.hasher.hexdigest() @dataclass class Downloader: """Download the dagger CLI binary.""" CLI_BASE_URL: ClassVar[str] = "https://dl.dagger.io" CLI_BIN_PREFIX: ClassVar[str] = "dagger-" version: str = CLI_VERSION platform: Platform = field(default_factory=get_platform, kw_only=True) progress: Progress = field(default_factory=Progress, kw_only=True) def _create_url(self, file_name: str): return httpx.URL( self.CLI_BASE_URL, path=f"/dagger/releases/{self.version}/{file_name}", ) @property def archive_url(self): ext = "zip" if self.platform.os == "windows" else "tar.gz" return self._create_url( f"dagger_v{self.version}_{self.platform.os}_{self.platform.arch}.{ext}" ) @property def archive_name(self): return PurePath(self.archive_url.path).name @property def checksum_url(self): return self._create_url(self.checksum_name) @property def checksum_name(self): return "checksums.txt" @functools.cached_property def cache_dir(self) -> Path: # Use the XDG_CACHE_HOME environment variable in all platforms to follow # https://github.com/adrg/xdg a bit more closely (used in the Go SDK). # See https://github.com/dagger/dagger/issues/3963 env = os.getenv("XDG_CACHE_HOME", "").strip() path = Path(env).expanduser() if env else platformdirs.user_cache_path() cache_dir = path / "dagger" cache_dir.mkdir(mode=0o700, parents=True, exist_ok=True) return cache_dir def __await__(self): return self.get().__await__() async def get(self) -> str: # TODO: Convert download to async. return await asyncify(self.get_sync) def get_sync(self) -> str: """Download CLI to cache and return its path.""" cli_bin_path = self.cache_dir / f"{self.CLI_BIN_PREFIX}{self.version}" if self.platform.os == "windows": cli_bin_path = cli_bin_path.with_suffix(".exe") if not cli_bin_path.exists(): cli_bin_path = self._download(cli_bin_path) # garbage collection of old binaries for file in self.cache_dir.glob(f"{self.CLI_BIN_PREFIX}*"): if file != cli_bin_path: file.unlink() return str(cli_bin_path.absolute()) def _download(self, path: Path) -> Path: logger.debug("Downloading dagger CLI from %s to %s", self.archive_url, path) self.progress.update_sync("Downloading dagger CLI") try: expected_hash = self.expected_checksum() except httpx.HTTPError as e: msg = f"Failed to download checksums from {self.checksum_url}: {e}" raise dagger.DownloadError(msg) from e with TempFile(f"temp-{self.CLI_BIN_PREFIX}", self.cache_dir) as tmp_bin: try: actual_hash = self.extract_cli_archive(tmp_bin) except httpx.HTTPError as e: msg = f"Failed to download archive from {self.archive_url}: {e}" raise dagger.DownloadError(msg) from e if actual_hash != expected_hash: msg = ( f"Downloaded CLI binary checksum ({actual_hash}) " f"does not match expected checksum ({expected_hash})" ) raise dagger.DownloadError(msg) tmp_bin_path = Path(tmp_bin.name) tmp_bin_path.chmod(0o700) return tmp_bin_path.rename(path) def expected_checksum(self) -> str: archive_name = self.archive_name with httpx.stream("GET", self.checksum_url, follow_redirects=True) as r: r.raise_for_status() for line in r.iter_lines(): checksum, filename = line.split() if filename == archive_name: return checksum msg = "Could not find checksum for archive" raise dagger.DownloadError(msg) def extract_cli_archive(self, dest: IO[bytes]) -> str: """ Download the CLI archive and extract the binary into the provided dest. Returns ------- str The sha256 hash of the whole archive as read during download. """ url = self.archive_url with httpx.stream("GET", url, follow_redirects=True) as r: r.raise_for_status() reader = StreamReader(r) extractor = ( self._extract_from_zip if url.path.endswith(".zip") else self._extract_from_tar ) with extractor(reader) as cli_bin: shutil.copyfileobj(cli_bin, dest) return reader.checksum @contextlib.contextmanager def _extract_from_tar(self, reader: StreamReader) -> Iterator[IO[bytes]]: with tarfile.open(mode="|gz", fileobj=reader) as tar: for member in tar: if member.name == "dagger" and (file := tar.extractfile(member)): yield file # ensure the entire body is read into the hash reader.readall() break else: msg = "There is no item named 'dagger' in the archive" raise dagger.DownloadError(msg) @contextlib.contextmanager def _extract_from_zip(self, reader: StreamReader) -> Iterator[IO[bytes]]: # TODO: extract from stream instead of loading archive into memory with zipfile.ZipFile(reader.getbuffer()) as zar: try: with zar.open("dagger.exe") as file: yield file except KeyError as e: msg = "There is no item named 'dagger.exe' in the archive" raise dagger.DownloadError(msg) from e
closed
dagger/dagger
https://github.com/dagger/dagger
6,265
Fix flakiness in Python test
Reported by @jedevc in https://github.com/dagger/dagger/pull/6258#issuecomment-1853740495 ``` FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pytest-of-root/pytest-0/cache_home0/dagger/dagger-0.0.0' ``` The automatic provisioning garbage collector probably needs a lock: https://github.com/dagger/dagger/blob/970bcfe512cfc699005c46992f52a8f1d17c2af3/sdk/python/tests/engine/test_download.py#L136-L142 https://github.com/dagger/dagger/blob/970bcfe512cfc699005c46992f52a8f1d17c2af3/sdk/python/src/dagger/_engine/download.py#L170
https://github.com/dagger/dagger/issues/6265
https://github.com/dagger/dagger/pull/6294
cd825bde699a0beb0adb5c2529da5469118a172b
3797b96902edbdf6866ce2b71233576572673189
"2023-12-13T12:31:37Z"
go
"2023-12-19T13:58:16Z"
sdk/python/tests/engine/test_download.py
import hashlib import os import pathlib import shutil import tarfile import zipfile from collections.abc import Awaitable, Callable from contextlib import AsyncExitStack import anyio import anyio.from_thread import anyio.to_thread import httpx import pytest from aiohttp import web from aiohttp.test_utils import TestServer from anyio.streams.file import FileReadStream import dagger from dagger._engine import download from dagger._managers import asyncify @pytest.mark.anyio() @pytest.fixture(autouse=True) async def _setup( monkeypatch: pytest.MonkeyPatch, mock_cli_server: Callable[[str], Awaitable[str]], ): # ignore DAGGER_SESSION_PORT monkeypatch.delenv("DAGGER_SESSION_PORT", raising=False) # unset _EXPERIMENTAL_DAGGER_CLI_BIN otherwise it won't be downloaded if cli_bin := os.getenv("_EXPERIMENTAL_DAGGER_CLI_BIN"): monkeypatch.delenv("_EXPERIMENTAL_DAGGER_CLI_BIN", raising=False) # if explicitly requested to test against a certain URL, use that archive_url = os.getenv("_INTERNAL_DAGGER_TEST_CLI_URL") checksum_url = os.getenv("_INTERNAL_DAGGER_TEST_CLI_CHECKSUMS_URL") if archive_url and checksum_url: monkeypatch.setattr( download.Downloader, "archive_url", httpx.URL(archive_url), ) monkeypatch.setattr( download.Downloader, "checksum_url", httpx.URL(checksum_url), ) # if _EXPERIMENTAL_DAGGER_CLI_BIN is set, create a temporary http server for it elif cli_bin: base_url = await mock_cli_server(cli_bin) monkeypatch.setattr(download.Downloader, "CLI_BASE_URL", base_url) @pytest.mark.anyio() @pytest.fixture() async def mock_cli_server(tmp_path_factory: pytest.TempPathFactory): async with AsyncExitStack() as stack: async def go(cli_bin: str): downloader = download.Downloader() root_dir = tmp_path_factory.mktemp("resources") cli_path = pathlib.Path(cli_bin) archive_path = root_dir.joinpath(downloader.archive_url.path.lstrip("/")) checksum_path = root_dir.joinpath(downloader.checksum_url.path.lstrip("/")) await asyncify(create_archive, cli_path, archive_path) checksum = hashlib.sha256() async with await FileReadStream.from_path(archive_path) as stream: async for chunk in stream: checksum.update(chunk) await anyio.Path(checksum_path).write_text( f"{checksum.hexdigest()} {downloader.archive_name}" ) app = web.Application() app.add_routes([web.static("/", root_dir, show_index=True)]) server = await stack.enter_async_context(TestServer(app)) return str(server.make_url("/")) yield go def create_archive(cli_path: pathlib.Path, archive_path: pathlib.Path): archive_path.parent.mkdir(parents=True, exist_ok=True) with cli_path.open("rb") as f: # .zip is used in Windows. if archive_path.name.endswith(".zip"): with ( zipfile.ZipFile(archive_path, mode="w") as zar, zar.open("dagger.exe", mode="w") as zf, ): shutil.copyfileobj(f, zf) else: with tarfile.open(archive_path, mode="w:gz") as tar: tarinfo = tar.gettarinfo(arcname="dagger", fileobj=f) tar.addfile(tarinfo, f) @pytest.mark.anyio() @pytest.fixture() async def cache_dir( tmp_path_factory: pytest.TempPathFactory, monkeypatch: pytest.MonkeyPatch, ) -> anyio.Path: """Create a temp cache_dir for testing & set XDG_CACHE_HOME.""" tmp_path = anyio.Path(tmp_path_factory.mktemp("cache_home")) cache_dir = tmp_path / "dagger" await cache_dir.mkdir(parents=True, exist_ok=True) monkeypatch.setenv("XDG_CACHE_HOME", str(cache_dir.parent)) return cache_dir @pytest.mark.anyio() @pytest.mark.slow() @pytest.mark.provision() async def test_download_bin(cache_dir: anyio.Path): # make some garbage for the image provisioner to collect garbage_path = cache_dir / "dagger-0.0.0" await garbage_path.touch() # clean up of existing containers is handled in dagger binary # and is already tested in go, skipping coverage here # run a bunch of provisions concurrently async def connect_once(): async with dagger.Connection(dagger.Config(retry=None)) as client: assert await client.default_platform() async with anyio.create_task_group() as tg: for _ in range(os.cpu_count() or 4): tg.start_soon(connect_once) # assert that there's only one dagger binary in the cache i = 0 async for _ in cache_dir.glob("dagger-*"): assert not i, "cache not garbage collected" i += 1 # assert the garbage was cleaned up assert not await garbage_path.exists()
closed
dagger/dagger
https://github.com/dagger/dagger
6,286
🐞 Zenith: camelCase automagic issues with PythonSDK
### What is the issue? When attempting to run the examples provided in the dagger module's documentation, I encountered two issues that presumably have the same underlying cause regarding the automatic camelCase conversion performed in the Python SDK. ## First issue Take the following example (taken from [here](https://docs.dagger.io/zenith/developer/python/539756/advanced-programming#chain-modules-together)): ```python """A Dagger module for saying hello world!.""" from dagger import field, function, object_type @object_type class HelloWorld: greeting: str = field(default="Hello") name: str = field(default="World") @function def with_greeting(self, greeting: str) -> "HelloWorld": self.greeting = greeting return self @function def with_name(self, name: str) -> "HelloWorld": self.name = name return self @function def message(self) -> str: return f"{self.greeting} {self.name}!" ``` And here is an example query for this module: ```graphql { helloWorld { message withName(name: "Monde") { withGreeting(greeting: "Bonjour") { message } } } } ``` The result is as expected ```plain { "helloWorld": { "message": "Hello, World!", "withName": { "withGreeting": { "message": "Bonjour, Monde!" } } } } ``` Now, if I rename `name` to `my_name`: ```python @object_type class HelloWorld: greeting: str = field(default="Hello") my_name: str = field(default="World") @function def with_greeting(self, greeting: str) -> "HelloWorld": self.greeting = greeting return self @function def with_my_name(self, my_name: str) -> "HelloWorld": self.my_name = my_name return self @function def message(self) -> str: return f"{self.greeting} {self.my_name}!" ``` and use the following query: ```graphql { helloWorld { message withMyName(myName: "Monde") { withGreeting(greeting: "Bonjour") { message } } } } ``` I get this result ```plain { "helloWorld": { "message": "Hello, World!", "withMyName": { "withGreeting": { "message": "Bonjour World!" } } } } ``` ## Second issue Take the following example (taken from [here](https://docs.dagger.io/zenith/developer/python/539756/advanced-programming#write-an-asynchronous-module-constructor-function)): ```python """A Dagger module for searching an input file.""" import dagger from dagger import dag, object_type, field, function @object_type class Grep: src: dagger.File = field() @classmethod async def create(cls, src: dagger.File | None = None): if src is None: src = await dag.http("https://dagger.io") return cls(src=src) @function async def grep(self, pattern: str) -> str: return await ( dag .container() .from_("alpine:latest") .with_mounted_file("/src", self.src) .with_exec(["grep", pattern, "/src"]) .stdout() ) ``` Similarly, if I alter this example by renaming `src` to `my_src`: ```python ... @object_type class Grep: my_src: dagger.File = field() @classmethod async def create(cls, my_src: dagger.File | None = None): if my_src is None: my_src = await dag.http("https://dagger.io") return cls(my_src=my_src) ... ``` I get the following error: ```shell $ dagger call grep --pattern dagger ✘ dagger call grep ERROR [1.92s] ┃ Error: response from query: input:1: grep.grep failed to get function output directory: process "/runtime" did not complete successfully: exit code: 1 ✘ grep(pattern: "dagger") ERROR [0.85s] ✘ exec /runtime ERROR [0.85s] ┃ ╭───────────────────── Traceback (most recent call last) ──────────────────────╮ ┃ │ /runtime:8 in <module> │ ┃ │ │ ┃ │ 5 from dagger.mod.cli import app │ ┃ │ 6 │ ┃ │ 7 if __name__ == "__main__": │ ┃ │ ❱ 8 │ sys.exit(app()) │ ┃ │ 9 │ ┃ │ │ ┃ │ /sdk/src/dagger/mod/cli.py:32 in app │ ┃ │ │ ┃ │ 29 │ ) │ ┃ │ 30 │ try: │ ┃ │ 31 │ │ mod = get_module() │ ┃ │ ❱ 32 │ │ mod() │ ┃ │ 33 │ except FatalError as e: │ ┃ │ 34 │ │ if logger.isEnabledFor(logging.DEBUG): │ ┃ │ 35 │ │ │ logger.exception("Fatal error") │ ┃ │ │ ┃ │ /sdk/src/dagger/mod/_module.py:181 in __call__ │ ┃ │ │ ┃ │ 178 │ def __call__(self) -> None: │ ┃ │ 179 │ │ if self._log_level is not None: │ ┃ │ 180 │ │ │ configure_logging(self._log_level) │ ┃ │ ❱ 181 │ │ anyio.run(self._run) │ ┃ │ 182 │ │ ┃ │ 183 │ async def _run(self): │ ┃ │ 184 │ │ async with await dagger.connect(): │ ┃ │ │ ┃ │ /usr/local/lib/python3.11/site-packages/anyio/_core/_eventloop.py:66 in run │ ┃ │ │ ┃ │ 63 │ │ ┃ │ 64 │ try: │ ┃ │ 65 │ │ backend_options = backend_options or {} │ ┃ │ ❱ 66 │ │ return async_backend.run(func, args, {}, backend_options) │ ┃ │ 67 │ finally: │ ┃ │ 68 │ │ if token: │ ┃ │ 69 │ │ │ sniffio.current_async_library_cvar.reset(token) │ ┃ │ │ ┃ │ /usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py:1960 in │ ┃ │ run │ ┃ │ │ ┃ │ 1957 │ │ debug = options.get("debug", False) │ ┃ │ 1958 │ │ options.get("loop_factory", None) │ ┃ │ 1959 │ │ options.get("use_uvloop", False) │ ┃ │ ❱ 1960 │ │ return native_run(wrapper(), debug=debug) │ ┃ │ 1961 │ │ ┃ │ 1962 │ @classmethod │ ┃ │ 1963 │ def current_token(cls) -> object: │ ┃ │ │ ┃ │ /usr/local/lib/python3.11/asyncio/runners.py:190 in run │ ┃ │ │ ┃ │ 187 │ │ │ "asyncio.run() cannot be called from a running event loop" │ ┃ │ 188 │ │ ┃ │ 189 │ with Runner(debug=debug) as runner: │ ┃ │ ❱ 190 │ │ return runner.run(main) │ ┃ │ 191 │ ┃ │ 192 │ ┃ │ 193 def _cancel_all_tasks(loop): │ ┃ │ │ ┃ │ /usr/local/lib/python3.11/asyncio/runners.py:118 in run │ ┃ │ │ ┃ │ 115 │ │ │ ┃ │ 116 │ │ self._interrupt_count = 0 │ ┃ │ 117 │ │ try: │ ┃ │ ❱ 118 │ │ │ return self._loop.run_until_complete(task) │ ┃ │ 119 │ │ except exceptions.CancelledError: │ ┃ │ 120 │ │ │ if self._interrupt_count > 0: │ ┃ │ 121 │ │ │ │ uncancel = getattr(task, "uncancel", None) │ ┃ │ │ ┃ │ /usr/local/lib/python3.11/asyncio/base_events.py:653 in run_until_complete │ ┃ │ │ ┃ │ 650 │ │ if not future.done(): │ ┃ │ 651 │ │ │ raise RuntimeError('Event loop stopped before Future comp │ ┃ │ 652 │ │ │ ┃ │ ❱ 653 │ │ return future.result() │ ┃ │ 654 │ │ ┃ │ 655 │ def stop(self): │ ┃ │ 656 │ │ """Stop running the event loop. │ ┃ │ │ ┃ │ /usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py:1953 in │ ┃ │ wrapper │ ┃ │ │ ┃ │ 1950 │ │ │ _task_states[task] = TaskState(None, None) │ ┃ │ 1951 │ │ │ │ ┃ │ 1952 │ │ │ try: │ ┃ │ ❱ 1953 │ │ │ │ return await func(*args) │ ┃ │ 1954 │ │ │ finally: │ ┃ │ 1955 │ │ │ │ del _task_states[task] │ ┃ │ 1956 │ ┃ │ │ ┃ │ /sdk/src/dagger/mod/_module.py:185 in _run │ ┃ │ │ ┃ │ 182 │ │ ┃ │ 183 │ async def _run(self): │ ┃ │ 184 │ │ async with await dagger.connect(): │ ┃ │ ❱ 185 │ │ │ await self._serve() │ ┃ │ 186 │ │ ┃ │ 187 │ async def _serve(self): │ ┃ │ 188 │ │ mod_name = await self._mod.name() │ ┃ │ │ ┃ │ /sdk/src/dagger/mod/_module.py:193 in _serve │ ┃ │ │ ┃ │ 190 │ │ resolvers = self.get_resolvers(mod_name) │ ┃ │ 191 │ │ │ ┃ │ 192 │ │ result = ( │ ┃ │ ❱ 193 │ │ │ await self._invoke(resolvers, parent_name) │ ┃ │ 194 │ │ │ if parent_name │ ┃ │ 195 │ │ │ else await self._register(resolvers, to_pascal_case(mod_na │ ┃ │ 196 │ │ ) │ ┃ │ │ ┃ │ /sdk/src/dagger/mod/_module.py:266 in _invoke │ ┃ │ │ ┃ │ 263 │ │ ) │ ┃ │ 264 │ │ │ ┃ │ 265 │ │ resolver = self.get_resolver(resolvers, parent_name, name) │ ┃ │ ❱ 266 │ │ return await self.get_result(resolver, parent_json, inputs) │ ┃ │ 267 │ │ ┃ │ 268 │ async def get_result( │ ┃ │ 269 │ │ self, │ ┃ │ │ ┃ │ /sdk/src/dagger/mod/_module.py:279 in get_result │ ┃ │ │ ┃ │ 276 │ │ │ isinstance(resolver, FunctionResolver) │ ┃ │ 277 │ │ │ and inspect.isclass(resolver.wrapped_func) │ ┃ │ 278 │ │ ): │ ┃ │ ❱ 279 │ │ │ root = await self.get_root(resolver.origin, parent_json) │ ┃ │ 280 │ │ │ ┃ │ 281 │ │ try: │ ┃ │ 282 │ │ │ result = await resolver.get_result(self._converter, root, │ ┃ │ │ ┃ │ /sdk/src/dagger/mod/_module.py:325 in get_root │ ┃ │ │ ┃ │ 322 │ │ if not parent: │ ┃ │ 323 │ │ │ return origin() │ ┃ │ 324 │ │ │ ┃ │ ❱ 325 │ │ return await asyncify(self._converter.structure, parent, origi │ ┃ │ 326 │ │ ┃ │ 327 │ def field( │ ┃ │ 328 │ │ self, │ ┃ │ │ ┃ │ /usr/local/lib/python3.11/site-packages/anyio/to_thread.py:49 in run_sync │ ┃ │ │ ┃ │ 46 │ │ │ stacklevel=2, │ ┃ │ 47 │ │ ) │ ┃ │ 48 │ │ ┃ │ ❱ 49 │ return await get_async_backend().run_sync_in_worker_thread( │ ┃ │ 50 │ │ func, args, abandon_on_cancel=abandon_on_cancel, limiter=limite │ ┃ │ 51 │ ) │ ┃ │ 52 │ ┃ │ │ ┃ │ /usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py:2103 in │ ┃ │ run_sync_in_worker_thread │ ┃ │ │ ┃ │ 2100 │ │ │ │ │ worker_scope = scope._parent_scope │ ┃ │ 2101 │ │ │ │ │ ┃ │ 2102 │ │ │ │ worker.queue.put_nowait((context, func, args, future, │ ┃ │ ❱ 2103 │ │ │ │ return await future │ ┃ │ 2104 │ │ ┃ │ 2105 │ @classmethod │ ┃ │ 2106 │ def check_cancelled(cls) -> None: │ ┃ │ │ ┃ │ /usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py:823 in │ ┃ │ run │ ┃ │ │ ┃ │ 820 │ │ │ │ │ exception: BaseException | None = None │ ┃ │ 821 │ │ │ │ │ threadlocals.current_cancel_scope = cancel_scope │ ┃ │ 822 │ │ │ │ │ try: │ ┃ │ ❱ 823 │ │ │ │ │ │ result = context.run(func, *args) │ ┃ │ 824 │ │ │ │ │ except BaseException as exc: │ ┃ │ 825 │ │ │ │ │ │ exception = exc │ ┃ │ 826 │ │ │ │ │ finally: │ ┃ │ │ ┃ │ /usr/local/lib/python3.11/site-packages/cattrs/converters.py:332 in │ ┃ │ structure │ ┃ │ │ ┃ │ 329 │ │ ┃ │ 330 │ def structure(self, obj: Any, cl: Type[T]) -> T: │ ┃ │ 331 │ │ """Convert unstructured Python data structures to structured │ ┃ │ ❱ 332 │ │ return self._structure_func.dispatch(cl)(obj, cl) │ ┃ │ 333 │ │ ┃ │ 334 │ # Classes to Python primitives. │ ┃ │ 335 │ def unstructure_attrs_asdict(self, obj: Any) -> Dict[str, Any]: │ ┃ │ in structure_Grep:9 │ ┃ ╰──────────────────────────────────────────────────────────────────────────────╯ ┃ ClassValidationError: While structuring Grep (1 sub-exception) • Engine: 9e91eb66912d (version v0.9.4) ⧗ 20.86s ✔ 112 ∅ 16 ✘ 3 ``` ### Dagger version dagger v0.9.4 (registry.dagger.io/engine) darwin/arm64 ### Steps to reproduce _No response_ ### Log output _No response_
https://github.com/dagger/dagger/issues/6286
https://github.com/dagger/dagger/pull/6287
1502402c4c028f15165a14ea8f05260057c8141e
62e02912129760bc86c309e5107dd7eb463ac2bf
"2023-12-16T16:19:10Z"
go
"2023-12-20T11:15:41Z"
cmd/codegen/generator/go/templates/module_funcs.go
package templates import ( "encoding/json" "fmt" "go/types" "maps" "strconv" "strings" . "github.com/dave/jennifer/jen" // nolint:revive,stylecheck "github.com/iancoleman/strcase" ) const errorTypeName = "error" var voidDef = Qual("dag", "TypeDef").Call(). Dot("WithKind").Call(Id("Voidkind")). Dot("WithOptional").Call(Lit(true)) func (ps *parseState) parseGoFunc(receiverTypeName string, fn *types.Func) (*funcTypeSpec, error) { spec := &funcTypeSpec{ name: fn.Name(), } funcDecl, err := ps.declForFunc(fn) if err != nil { return nil, fmt.Errorf("failed to find decl for method %s: %w", fn.Name(), err) } spec.doc = funcDecl.Doc.Text() sig, ok := fn.Type().(*types.Signature) if !ok { return nil, fmt.Errorf("expected method to be a func, got %T", fn.Type()) } spec.goType = sig spec.argSpecs, err = ps.parseParamSpecs(fn) if err != nil { return nil, err } // stash away the method signature so we can remember details on how it's // invoked (e.g. no error return, no ctx arg, error-only return, etc) // TODO: clean up w/ new approach of everything being a TypeSpec? if receiverTypeName != "" { ps.methods[receiverTypeName] = append(ps.methods[receiverTypeName], method{fn: fn, paramSpecs: spec.argSpecs}) } results := sig.Results() switch results.Len() { case 0: // returnSpec stays nil, indicating void return case 1: result := results.At(0).Type() if result.String() == errorTypeName { spec.returnsError = true break } spec.returnSpec, err = ps.parseGoTypeReference(result, nil) if err != nil { return nil, fmt.Errorf("failed to parse return type: %w", err) } case 2: spec.returnsError = true result := results.At(0).Type() spec.returnSpec, err = ps.parseGoTypeReference(result, nil) if err != nil { return nil, fmt.Errorf("failed to parse return type: %w", err) } default: return nil, fmt.Errorf("method %s has too many return values", fn.Name()) } return spec, nil } type funcTypeSpec struct { name string doc string argSpecs []paramSpec returnSpec ParsedType // nil if void return returnsError bool goType *types.Signature } var _ ParsedType = &funcTypeSpec{} func (spec *funcTypeSpec) TypeDefCode() (*Statement, error) { var fnReturnTypeDefCode *Statement if spec.returnSpec == nil { fnReturnTypeDefCode = voidDef } else { var err error fnReturnTypeDefCode, err = spec.returnSpec.TypeDefCode() if err != nil { return nil, fmt.Errorf("failed to generate return type code: %w", err) } } fnTypeDefCode := Qual("dag", "Function").Call(Lit(spec.name), Add(Line(), fnReturnTypeDefCode)) if spec.doc != "" { fnTypeDefCode = dotLine(fnTypeDefCode, "WithDescription").Call(Lit(strings.TrimSpace(spec.doc))) } for i, argSpec := range spec.argSpecs { if i == 0 && argSpec.paramType.String() == contextTypename { // ignore ctx arg continue } argTypeDefCode, err := argSpec.typeSpec.TypeDefCode() if err != nil { return nil, fmt.Errorf("failed to generate arg type code: %w", err) } if argSpec.optional { argTypeDefCode = argTypeDefCode.Dot("WithOptional").Call(Lit(true)) } argOptsCode := []Code{} if argSpec.description != "" { argOptsCode = append(argOptsCode, Id("Description").Op(":").Lit(argSpec.description)) } if argSpec.defaultValue != "" { var jsonEnc string if argSpec.typeSpec.GoType().String() == "string" { enc, err := json.Marshal(argSpec.defaultValue) if err != nil { return nil, fmt.Errorf("failed to marshal default value: %w", err) } jsonEnc = string(enc) } else { jsonEnc = argSpec.defaultValue } argOptsCode = append(argOptsCode, Id("DefaultValue").Op(":").Id("JSON").Call(Lit(jsonEnc))) } // arguments to WithArg (args to arg... ugh, at least the name of the variable is honest?) argTypeDefArgCode := []Code{Lit(argSpec.graphqlName()), argTypeDefCode} if len(argOptsCode) > 0 { argTypeDefArgCode = append(argTypeDefArgCode, Id("FunctionWithArgOpts").Values(argOptsCode...)) } fnTypeDefCode = dotLine(fnTypeDefCode, "WithArg").Call(argTypeDefArgCode...) } return fnTypeDefCode, nil } func (spec *funcTypeSpec) GoType() types.Type { return spec.goType } func (spec *funcTypeSpec) GoSubTypes() []types.Type { var types []types.Type if spec.returnSpec != nil { types = append(types, spec.returnSpec.GoSubTypes()...) } for _, argSpec := range spec.argSpecs { if argSpec.typeSpec == nil { // ignore context continue } types = append(types, argSpec.typeSpec.GoSubTypes()...) } return types } func (ps *parseState) parseParamSpecs(fn *types.Func) ([]paramSpec, error) { sig := fn.Type().(*types.Signature) params := sig.Params() if params.Len() == 0 { return nil, nil } specs := make([]paramSpec, 0, params.Len()) i := 0 if params.At(i).Type().String() == contextTypename { spec, err := ps.parseParamSpecVar(params.At(i), "", "") if err != nil { return nil, err } specs = append(specs, spec) i++ } fnDecl, err := ps.declForFunc(fn) if err != nil { return nil, err } // is the first data param an inline struct? if so, process each field of // the struct as a top-level param if i+1 == params.Len() { param := params.At(i) paramType, ok := asInlineStruct(param.Type()) if ok { stype, ok := asInlineStructAst(fnDecl.Type.Params.List[i].Type) if !ok { return nil, fmt.Errorf("expected struct type for %s", param.Name()) } parent := &paramSpec{ name: params.At(i).Name(), paramType: param.Type(), } paramFields := unpackASTFields(stype.Fields) for f := 0; f < paramType.NumFields(); f++ { spec, err := ps.parseParamSpecVar(paramType.Field(f), paramFields[f].Doc.Text(), paramFields[f].Comment.Text()) if err != nil { return nil, err } spec.parent = parent specs = append(specs, spec) } return specs, nil } } // if other parameter passing schemes fail, just treat each remaining arg // as a top-level param paramFields := unpackASTFields(fnDecl.Type.Params) for ; i < params.Len(); i++ { docComment, lineComment := ps.commentForFuncField(fnDecl, paramFields, i) spec, err := ps.parseParamSpecVar(params.At(i), docComment.Text(), lineComment.Text()) if err != nil { return nil, err } if sig.Variadic() && i == params.Len()-1 { spec.variadic = true } specs = append(specs, spec) } return specs, nil } func (ps *parseState) parseParamSpecVar(field *types.Var, docComment string, lineComment string) (paramSpec, error) { if _, ok := field.Type().(*types.Struct); ok { return paramSpec{}, fmt.Errorf("nested structs are not supported") } paramType := field.Type() baseType := paramType for { ptr, ok := baseType.(*types.Pointer) if !ok { break } baseType = ptr.Elem() } optional := false defaultValue := "" if named, ok := ps.isOptionalWrapper(baseType); ok { typeArgs := named.TypeArgs() if typeArgs.Len() != 1 { return paramSpec{}, fmt.Errorf("optional type must have exactly one type argument") } optional = true baseType = typeArgs.At(0) for { ptr, ok := baseType.(*types.Pointer) if !ok { break } baseType = ptr.Elem() } } docPragmas, docComment := parsePragmaComment(docComment) linePragmas, lineComment := parsePragmaComment(lineComment) comment := strings.TrimSpace(docComment) if comment == "" { comment = strings.TrimSpace(lineComment) } pragmas := make(map[string]string) maps.Copy(pragmas, docPragmas) maps.Copy(pragmas, linePragmas) if v, ok := pragmas["default"]; ok { defaultValue = v } if v, ok := pragmas["optional"]; ok { if v == "" { optional = true } else { optional, _ = strconv.ParseBool(v) } } // ignore ctx arg for parsing type reference var typeSpec ParsedType if paramType.String() != contextTypename { var err error typeSpec, err = ps.parseGoTypeReference(baseType, nil) if err != nil { return paramSpec{}, fmt.Errorf("failed to parse type reference: %w", err) } } name := field.Name() if name == "" { // emulate struct behaviour, where a field with no name gets the type name name = typeSpec.GoType().String() } return paramSpec{ name: name, paramType: paramType, typeSpec: typeSpec, optional: optional, defaultValue: defaultValue, description: comment, }, nil } type paramSpec struct { name string description string optional bool variadic bool defaultValue string // paramType is the full type declared in the function signature, which may // include pointer types, Optional, etc paramType types.Type // typeSpec is the parsed TypeSpec of the argument's "base type", which doesn't // include pointers, Optional, etc typeSpec ParsedType // parent is set if this paramSpec is nested inside a parent inline struct, // and is used to create a declaration of the entire inline struct parent *paramSpec } func (spec *paramSpec) graphqlName() string { return strcase.ToLowerCamel(spec.name) }
closed
dagger/dagger
https://github.com/dagger/dagger
6,286
🐞 Zenith: camelCase automagic issues with PythonSDK
### What is the issue? When attempting to run the examples provided in the dagger module's documentation, I encountered two issues that presumably have the same underlying cause regarding the automatic camelCase conversion performed in the Python SDK. ## First issue Take the following example (taken from [here](https://docs.dagger.io/zenith/developer/python/539756/advanced-programming#chain-modules-together)): ```python """A Dagger module for saying hello world!.""" from dagger import field, function, object_type @object_type class HelloWorld: greeting: str = field(default="Hello") name: str = field(default="World") @function def with_greeting(self, greeting: str) -> "HelloWorld": self.greeting = greeting return self @function def with_name(self, name: str) -> "HelloWorld": self.name = name return self @function def message(self) -> str: return f"{self.greeting} {self.name}!" ``` And here is an example query for this module: ```graphql { helloWorld { message withName(name: "Monde") { withGreeting(greeting: "Bonjour") { message } } } } ``` The result is as expected ```plain { "helloWorld": { "message": "Hello, World!", "withName": { "withGreeting": { "message": "Bonjour, Monde!" } } } } ``` Now, if I rename `name` to `my_name`: ```python @object_type class HelloWorld: greeting: str = field(default="Hello") my_name: str = field(default="World") @function def with_greeting(self, greeting: str) -> "HelloWorld": self.greeting = greeting return self @function def with_my_name(self, my_name: str) -> "HelloWorld": self.my_name = my_name return self @function def message(self) -> str: return f"{self.greeting} {self.my_name}!" ``` and use the following query: ```graphql { helloWorld { message withMyName(myName: "Monde") { withGreeting(greeting: "Bonjour") { message } } } } ``` I get this result ```plain { "helloWorld": { "message": "Hello, World!", "withMyName": { "withGreeting": { "message": "Bonjour World!" } } } } ``` ## Second issue Take the following example (taken from [here](https://docs.dagger.io/zenith/developer/python/539756/advanced-programming#write-an-asynchronous-module-constructor-function)): ```python """A Dagger module for searching an input file.""" import dagger from dagger import dag, object_type, field, function @object_type class Grep: src: dagger.File = field() @classmethod async def create(cls, src: dagger.File | None = None): if src is None: src = await dag.http("https://dagger.io") return cls(src=src) @function async def grep(self, pattern: str) -> str: return await ( dag .container() .from_("alpine:latest") .with_mounted_file("/src", self.src) .with_exec(["grep", pattern, "/src"]) .stdout() ) ``` Similarly, if I alter this example by renaming `src` to `my_src`: ```python ... @object_type class Grep: my_src: dagger.File = field() @classmethod async def create(cls, my_src: dagger.File | None = None): if my_src is None: my_src = await dag.http("https://dagger.io") return cls(my_src=my_src) ... ``` I get the following error: ```shell $ dagger call grep --pattern dagger ✘ dagger call grep ERROR [1.92s] ┃ Error: response from query: input:1: grep.grep failed to get function output directory: process "/runtime" did not complete successfully: exit code: 1 ✘ grep(pattern: "dagger") ERROR [0.85s] ✘ exec /runtime ERROR [0.85s] ┃ ╭───────────────────── Traceback (most recent call last) ──────────────────────╮ ┃ │ /runtime:8 in <module> │ ┃ │ │ ┃ │ 5 from dagger.mod.cli import app │ ┃ │ 6 │ ┃ │ 7 if __name__ == "__main__": │ ┃ │ ❱ 8 │ sys.exit(app()) │ ┃ │ 9 │ ┃ │ │ ┃ │ /sdk/src/dagger/mod/cli.py:32 in app │ ┃ │ │ ┃ │ 29 │ ) │ ┃ │ 30 │ try: │ ┃ │ 31 │ │ mod = get_module() │ ┃ │ ❱ 32 │ │ mod() │ ┃ │ 33 │ except FatalError as e: │ ┃ │ 34 │ │ if logger.isEnabledFor(logging.DEBUG): │ ┃ │ 35 │ │ │ logger.exception("Fatal error") │ ┃ │ │ ┃ │ /sdk/src/dagger/mod/_module.py:181 in __call__ │ ┃ │ │ ┃ │ 178 │ def __call__(self) -> None: │ ┃ │ 179 │ │ if self._log_level is not None: │ ┃ │ 180 │ │ │ configure_logging(self._log_level) │ ┃ │ ❱ 181 │ │ anyio.run(self._run) │ ┃ │ 182 │ │ ┃ │ 183 │ async def _run(self): │ ┃ │ 184 │ │ async with await dagger.connect(): │ ┃ │ │ ┃ │ /usr/local/lib/python3.11/site-packages/anyio/_core/_eventloop.py:66 in run │ ┃ │ │ ┃ │ 63 │ │ ┃ │ 64 │ try: │ ┃ │ 65 │ │ backend_options = backend_options or {} │ ┃ │ ❱ 66 │ │ return async_backend.run(func, args, {}, backend_options) │ ┃ │ 67 │ finally: │ ┃ │ 68 │ │ if token: │ ┃ │ 69 │ │ │ sniffio.current_async_library_cvar.reset(token) │ ┃ │ │ ┃ │ /usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py:1960 in │ ┃ │ run │ ┃ │ │ ┃ │ 1957 │ │ debug = options.get("debug", False) │ ┃ │ 1958 │ │ options.get("loop_factory", None) │ ┃ │ 1959 │ │ options.get("use_uvloop", False) │ ┃ │ ❱ 1960 │ │ return native_run(wrapper(), debug=debug) │ ┃ │ 1961 │ │ ┃ │ 1962 │ @classmethod │ ┃ │ 1963 │ def current_token(cls) -> object: │ ┃ │ │ ┃ │ /usr/local/lib/python3.11/asyncio/runners.py:190 in run │ ┃ │ │ ┃ │ 187 │ │ │ "asyncio.run() cannot be called from a running event loop" │ ┃ │ 188 │ │ ┃ │ 189 │ with Runner(debug=debug) as runner: │ ┃ │ ❱ 190 │ │ return runner.run(main) │ ┃ │ 191 │ ┃ │ 192 │ ┃ │ 193 def _cancel_all_tasks(loop): │ ┃ │ │ ┃ │ /usr/local/lib/python3.11/asyncio/runners.py:118 in run │ ┃ │ │ ┃ │ 115 │ │ │ ┃ │ 116 │ │ self._interrupt_count = 0 │ ┃ │ 117 │ │ try: │ ┃ │ ❱ 118 │ │ │ return self._loop.run_until_complete(task) │ ┃ │ 119 │ │ except exceptions.CancelledError: │ ┃ │ 120 │ │ │ if self._interrupt_count > 0: │ ┃ │ 121 │ │ │ │ uncancel = getattr(task, "uncancel", None) │ ┃ │ │ ┃ │ /usr/local/lib/python3.11/asyncio/base_events.py:653 in run_until_complete │ ┃ │ │ ┃ │ 650 │ │ if not future.done(): │ ┃ │ 651 │ │ │ raise RuntimeError('Event loop stopped before Future comp │ ┃ │ 652 │ │ │ ┃ │ ❱ 653 │ │ return future.result() │ ┃ │ 654 │ │ ┃ │ 655 │ def stop(self): │ ┃ │ 656 │ │ """Stop running the event loop. │ ┃ │ │ ┃ │ /usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py:1953 in │ ┃ │ wrapper │ ┃ │ │ ┃ │ 1950 │ │ │ _task_states[task] = TaskState(None, None) │ ┃ │ 1951 │ │ │ │ ┃ │ 1952 │ │ │ try: │ ┃ │ ❱ 1953 │ │ │ │ return await func(*args) │ ┃ │ 1954 │ │ │ finally: │ ┃ │ 1955 │ │ │ │ del _task_states[task] │ ┃ │ 1956 │ ┃ │ │ ┃ │ /sdk/src/dagger/mod/_module.py:185 in _run │ ┃ │ │ ┃ │ 182 │ │ ┃ │ 183 │ async def _run(self): │ ┃ │ 184 │ │ async with await dagger.connect(): │ ┃ │ ❱ 185 │ │ │ await self._serve() │ ┃ │ 186 │ │ ┃ │ 187 │ async def _serve(self): │ ┃ │ 188 │ │ mod_name = await self._mod.name() │ ┃ │ │ ┃ │ /sdk/src/dagger/mod/_module.py:193 in _serve │ ┃ │ │ ┃ │ 190 │ │ resolvers = self.get_resolvers(mod_name) │ ┃ │ 191 │ │ │ ┃ │ 192 │ │ result = ( │ ┃ │ ❱ 193 │ │ │ await self._invoke(resolvers, parent_name) │ ┃ │ 194 │ │ │ if parent_name │ ┃ │ 195 │ │ │ else await self._register(resolvers, to_pascal_case(mod_na │ ┃ │ 196 │ │ ) │ ┃ │ │ ┃ │ /sdk/src/dagger/mod/_module.py:266 in _invoke │ ┃ │ │ ┃ │ 263 │ │ ) │ ┃ │ 264 │ │ │ ┃ │ 265 │ │ resolver = self.get_resolver(resolvers, parent_name, name) │ ┃ │ ❱ 266 │ │ return await self.get_result(resolver, parent_json, inputs) │ ┃ │ 267 │ │ ┃ │ 268 │ async def get_result( │ ┃ │ 269 │ │ self, │ ┃ │ │ ┃ │ /sdk/src/dagger/mod/_module.py:279 in get_result │ ┃ │ │ ┃ │ 276 │ │ │ isinstance(resolver, FunctionResolver) │ ┃ │ 277 │ │ │ and inspect.isclass(resolver.wrapped_func) │ ┃ │ 278 │ │ ): │ ┃ │ ❱ 279 │ │ │ root = await self.get_root(resolver.origin, parent_json) │ ┃ │ 280 │ │ │ ┃ │ 281 │ │ try: │ ┃ │ 282 │ │ │ result = await resolver.get_result(self._converter, root, │ ┃ │ │ ┃ │ /sdk/src/dagger/mod/_module.py:325 in get_root │ ┃ │ │ ┃ │ 322 │ │ if not parent: │ ┃ │ 323 │ │ │ return origin() │ ┃ │ 324 │ │ │ ┃ │ ❱ 325 │ │ return await asyncify(self._converter.structure, parent, origi │ ┃ │ 326 │ │ ┃ │ 327 │ def field( │ ┃ │ 328 │ │ self, │ ┃ │ │ ┃ │ /usr/local/lib/python3.11/site-packages/anyio/to_thread.py:49 in run_sync │ ┃ │ │ ┃ │ 46 │ │ │ stacklevel=2, │ ┃ │ 47 │ │ ) │ ┃ │ 48 │ │ ┃ │ ❱ 49 │ return await get_async_backend().run_sync_in_worker_thread( │ ┃ │ 50 │ │ func, args, abandon_on_cancel=abandon_on_cancel, limiter=limite │ ┃ │ 51 │ ) │ ┃ │ 52 │ ┃ │ │ ┃ │ /usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py:2103 in │ ┃ │ run_sync_in_worker_thread │ ┃ │ │ ┃ │ 2100 │ │ │ │ │ worker_scope = scope._parent_scope │ ┃ │ 2101 │ │ │ │ │ ┃ │ 2102 │ │ │ │ worker.queue.put_nowait((context, func, args, future, │ ┃ │ ❱ 2103 │ │ │ │ return await future │ ┃ │ 2104 │ │ ┃ │ 2105 │ @classmethod │ ┃ │ 2106 │ def check_cancelled(cls) -> None: │ ┃ │ │ ┃ │ /usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py:823 in │ ┃ │ run │ ┃ │ │ ┃ │ 820 │ │ │ │ │ exception: BaseException | None = None │ ┃ │ 821 │ │ │ │ │ threadlocals.current_cancel_scope = cancel_scope │ ┃ │ 822 │ │ │ │ │ try: │ ┃ │ ❱ 823 │ │ │ │ │ │ result = context.run(func, *args) │ ┃ │ 824 │ │ │ │ │ except BaseException as exc: │ ┃ │ 825 │ │ │ │ │ │ exception = exc │ ┃ │ 826 │ │ │ │ │ finally: │ ┃ │ │ ┃ │ /usr/local/lib/python3.11/site-packages/cattrs/converters.py:332 in │ ┃ │ structure │ ┃ │ │ ┃ │ 329 │ │ ┃ │ 330 │ def structure(self, obj: Any, cl: Type[T]) -> T: │ ┃ │ 331 │ │ """Convert unstructured Python data structures to structured │ ┃ │ ❱ 332 │ │ return self._structure_func.dispatch(cl)(obj, cl) │ ┃ │ 333 │ │ ┃ │ 334 │ # Classes to Python primitives. │ ┃ │ 335 │ def unstructure_attrs_asdict(self, obj: Any) -> Dict[str, Any]: │ ┃ │ in structure_Grep:9 │ ┃ ╰──────────────────────────────────────────────────────────────────────────────╯ ┃ ClassValidationError: While structuring Grep (1 sub-exception) • Engine: 9e91eb66912d (version v0.9.4) ⧗ 20.86s ✔ 112 ∅ 16 ✘ 3 ``` ### Dagger version dagger v0.9.4 (registry.dagger.io/engine) darwin/arm64 ### Steps to reproduce _No response_ ### Log output _No response_
https://github.com/dagger/dagger/issues/6286
https://github.com/dagger/dagger/pull/6287
1502402c4c028f15165a14ea8f05260057c8141e
62e02912129760bc86c309e5107dd7eb463ac2bf
"2023-12-16T16:19:10Z"
go
"2023-12-20T11:15:41Z"
cmd/codegen/generator/go/templates/modules.go
package templates import ( "fmt" "go/ast" "go/token" "go/types" "os" "path/filepath" "regexp" "runtime/debug" "sort" "strings" . "github.com/dave/jennifer/jen" // nolint:revive,stylecheck "github.com/iancoleman/strcase" "golang.org/x/tools/go/packages" ) const ( daggerGenFilename = "dagger.gen.go" contextTypename = "context.Context" constructorFuncName = "New" ) /* moduleMainSrc generates the source code of the main func for Dagger Module code using the Go SDK. The overall idea is that users just need to create a struct with the same name as their Module and then add methods to that struct to implement their Module. Methods on that struct become Functions. They are also free to return custom objects from Functions, which themselves may have methods that become Functions too. However, only the "top-level" Module struct's Functions will be directly invokable. This is essentially just the GraphQL execution model. The implementation works by parsing the user's code and generating a main func that reads function call inputs from the Engine, calls the relevant function and returns the result. The generated code is mostly a giant switch/case on the object+function name, with each case doing json deserialization of the input arguments and calling the actual Go function. */ func (funcs goTemplateFuncs) moduleMainSrc() (string, error) { // HACK: the code in this func can be pretty flaky and tricky to debug - // it's much easier to debug when we actually have stack traces, so we grab // those on a panic defer func() { if r := recover(); r != nil { fmt.Fprintf(os.Stderr, "internal error during module code generation: %v\n", r) debug.PrintStack() panic(r) } }() if funcs.modulePkg == nil { // during bootstrapping, we might not have code yet, since it takes // multiple passes. return `func main() { panic("no code yet") }`, nil } ps := &parseState{ pkg: funcs.modulePkg, fset: funcs.moduleFset, methods: make(map[string][]method), moduleName: funcs.module.Name, } pkgScope := funcs.modulePkg.Types.Scope() objFunctionCases := map[string][]Code{} createMod := Qual("dag", "CurrentModule").Call() objs := []types.Object{} for _, name := range pkgScope.Names() { obj := pkgScope.Lookup(name) if obj == nil { continue } objs = append(objs, obj) } // preserve definition order, so developer can keep more important / // entrypoint types higher up sort.Slice(objs, func(i, j int) bool { return objs[i].Pos() < objs[j].Pos() }) tps := []types.Type{} for _, obj := range objs { // check if this is the constructor func, save it for later if so fn, isFn := obj.(*types.Func) if isFn && fn.Name() == constructorFuncName { ps.constructor = fn continue } tps = append(tps, obj.Type()) } added := map[string]struct{}{} topLevel := true for len(tps) != 0 { var nextTps []types.Type for _, tp := range tps { named, isNamed := tp.(*types.Named) if !isNamed { continue } obj := named.Obj() if obj.Pkg() != funcs.modulePkg.Types { // the type must be created in the target package continue } if !obj.Exported() { // the type must be exported if !topLevel { return "", fmt.Errorf("cannot code-generate unexported type %s", obj.Name()) } continue } strct, isStruct := named.Underlying().(*types.Struct) if !isStruct { // TODO(vito): could possibly support non-struct types, but why bother continue } // avoid adding a struct definition twice (if it's referenced in two function signatures) if _, ok := added[obj.Name()]; ok { continue } objTypeSpec, err := ps.parseGoStruct(strct, named) if err != nil { return "", err } if objTypeSpec == nil { // not including in module schema, skip it continue } if err := ps.fillObjectFunctionCases(named, objFunctionCases); err != nil { // errors indicate an internal problem rather than something w/ user code, so error instead return "", fmt.Errorf("failed to generate function cases for %s: %w", obj.Name(), err) } if topLevel && !ps.isMainModuleObject(obj.Name()) { // don't add a non-main object at the top-level (wait till it comes up as a sub-object) continue } // Add the object to the module objTypeDefCode, err := objTypeSpec.TypeDefCode() if err != nil { return "", fmt.Errorf("failed to generate type def code for %s: %w", obj.Name(), err) } createMod = dotLine(createMod, "WithObject").Call(Add(Line(), objTypeDefCode)) added[obj.Name()] = struct{}{} // If the object has any extra sub-types (e.g. for function return // values), add them to the list of types to process nextTps = append(nextTps, objTypeSpec.GoSubTypes()...) } tps, nextTps = nextTps, nil topLevel = false } // TODO: sort cases and functions based on their definition order return strings.Join([]string{mainSrc, invokeSrc(objFunctionCases, createMod)}, "\n"), nil } func dotLine(a *Statement, id string) *Statement { return a.Op(".").Line().Id(id) } const ( // The static part of the generated code. It calls out to the "invoke" func, which is the mostly // dynamically generated code that actually calls the user's functions. mainSrc = `func main() { ctx := context.Background() fnCall := dag.CurrentFunctionCall() parentName, err := fnCall.ParentName(ctx) if err != nil { fmt.Println(err.Error()) os.Exit(2) } fnName, err := fnCall.Name(ctx) if err != nil { fmt.Println(err.Error()) os.Exit(2) } parentJson, err := fnCall.Parent(ctx) if err != nil { fmt.Println(err.Error()) os.Exit(2) } fnArgs, err := fnCall.InputArgs(ctx) if err != nil { fmt.Println(err.Error()) os.Exit(2) } inputArgs := map[string][]byte{} for _, fnArg := range fnArgs { argName, err := fnArg.Name(ctx) if err != nil { fmt.Println(err.Error()) os.Exit(2) } argValue, err := fnArg.Value(ctx) if err != nil { fmt.Println(err.Error()) os.Exit(2) } inputArgs[argName] = []byte(argValue) } result, err := invoke(ctx, []byte(parentJson), parentName, fnName, inputArgs) if err != nil { fmt.Println(err.Error()) os.Exit(2) } resultBytes, err := json.Marshal(result) if err != nil { fmt.Println(err.Error()) os.Exit(2) } _, err = fnCall.ReturnValue(ctx, JSON(resultBytes)) if err != nil { fmt.Println(err.Error()) os.Exit(2) } } ` parentJSONVar = "parentJSON" parentNameVar = "parentName" fnNameVar = "fnName" inputArgsVar = "inputArgs" invokeFuncName = "invoke" ) // the source code of the invoke func, which is the mostly dynamically generated code that actually calls the user's functions func invokeSrc(objFunctionCases map[string][]Code, createMod Code) string { // each `case` statement for every object name, which makes up the body of the invoke func objCases := []Code{} for objName, functionCases := range objFunctionCases { objCases = append(objCases, Case(Lit(objName)).Block(Switch(Id(fnNameVar)).Block(functionCases...))) } // when the object name is empty, return the module definition objCases = append(objCases, Case(Lit("")).Block( Return(createMod, Nil()), )) // default case (return error) objCases = append(objCases, Default().Block( Return(Nil(), Qual("fmt", "Errorf").Call(Lit("unknown object %s"), Id(parentNameVar))), )) objSwitch := Switch(Id(parentNameVar)).Block(objCases...) // func invoke( invokeFunc := Func().Id(invokeFuncName).Params( // ctx context.Context, Id("ctx").Qual("context", "Context"), // parentJSON []byte, Id(parentJSONVar).Index().Byte(), // parentName string, Id(parentNameVar).String(), // fnName string, Id(fnNameVar).String(), // inputArgs map[string][]byte, Id(inputArgsVar).Map(String()).Index().Byte(), ).Params( // ) (_ any, Id("_").Id("any"), // err error) Id("err").Error(), ).Block(objSwitch) return fmt.Sprintf("%#v", invokeFunc) } // TODO: use jennifer for generating this magical typedef func renderNameOrStruct(t types.Type) string { if ptr, ok := t.(*types.Pointer); ok { return "*" + renderNameOrStruct(ptr.Elem()) } if sl, ok := t.(*types.Slice); ok { return "[]" + renderNameOrStruct(sl.Elem()) } if st, ok := t.(*types.Struct); ok { result := "struct {\n" for i := 0; i < st.NumFields(); i++ { if !st.Field(i).Embedded() { result += st.Field(i).Name() + " " } result += renderNameOrStruct(st.Field(i).Type()) if tag := st.Tag(i); tag != "" { result += " `" + tag + "`" } result += "\n" } result += "}" return result } if named, ok := t.(*types.Named); ok { // Assume local // // TODO: this isn't always true - we likely want to support returning // types from other packages as well. However, this is tricky - how // should we handle returning *time.Time? We should probably convert // this to a graphql type that all langs can convert to their native // representation. base := named.Obj().Name() if typeArgs := named.TypeArgs(); typeArgs.Len() > 0 { base += "[" for i := 0; i < typeArgs.Len(); i++ { if i > 0 { base += ", " } base += renderNameOrStruct(typeArgs.At(i)) } base += "]" } return base } // HACK(vito): this is passed to Id(), which is a bit weird, but works return t.String() } var checkErrStatement = If(Err().Op("!=").Nil()).Block( // fmt.Println(err.Error()) Qual("fmt", "Println").Call(Err().Dot("Error").Call()), // os.Exit(2) Qual("os", "Exit").Call(Lit(2)), ) // fillObjectFunctionCases recursively fills out the `cases` map with entries for object name -> `case` statement blocks // for each function in that object func (ps *parseState) fillObjectFunctionCases(type_ types.Type, cases map[string][]Code) error { var objName string switch x := type_.(type) { case *types.Pointer: return ps.fillObjectFunctionCases(x.Elem(), cases) case *types.Named: objName = x.Obj().Name() default: return nil } if existingCases := cases[objName]; len(existingCases) > 0 { // handles recursive types, e.g. objects with chainable methods that return themselves return nil } hasConstructor := ps.isMainModuleObject(objName) && ps.constructor != nil methods := ps.methods[objName] if len(methods) == 0 && !hasConstructor { return nil } for _, method := range methods { fnName, sig := method.fn.Name(), method.fn.Type().(*types.Signature) if err := ps.fillObjectFunctionCase(objName, fnName, fnName, sig, method.paramSpecs, cases); err != nil { return err } } // main module object constructor case if hasConstructor { sig, ok := ps.constructor.Type().(*types.Signature) if !ok { return fmt.Errorf("expected %s to be a function, got %T", constructorFuncName, ps.constructor.Type()) } paramSpecs, err := ps.parseParamSpecs(ps.constructor) if err != nil { return fmt.Errorf("failed to parse %s function: %w", constructorFuncName, err) } // Validate the constructor returns the main module object (further general validation happens in fillObjectFunctionCase) results := sig.Results() if results.Len() == 0 { return fmt.Errorf("%s must return a value", constructorFuncName) } resultType := results.At(0).Type() if ptrType, ok := resultType.(*types.Pointer); ok { resultType = ptrType.Elem() } namedType, ok := resultType.(*types.Named) if !ok { return fmt.Errorf("%s must return the main module object %q", constructorFuncName, objName) } if namedType.Obj().Name() != objName { return fmt.Errorf("%s must return the main module object %q", constructorFuncName, objName) } if err := ps.fillObjectFunctionCase(objName, ps.constructor.Name(), "", sig, paramSpecs, cases); err != nil { return err } } // default case (return error) cases[objName] = append(cases[objName], Default().Block( Return(Nil(), Qual("fmt", "Errorf").Call(Lit("unknown function %s"), Id(fnNameVar))), )) return nil } func (ps *parseState) fillObjectFunctionCase( objName string, fnName string, caseName string, // separate from fnName to handle constructor where the caseName is empty string sig *types.Signature, paramSpecs []paramSpec, cases map[string][]Code, ) error { statements := []Code{} parentVarName := "parent" statements = append(statements, Var().Id(parentVarName).Id(objName), Err().Op("=").Qual("json", "Unmarshal").Call(Id(parentJSONVar), Op("&").Id(parentVarName)), checkErrStatement, ) var fnCallArgs []Code if sig.Recv() != nil { fnCallArgs = []Code{Op("&").Id(parentVarName)} } vars := map[string]struct{}{} for i, spec := range paramSpecs { if i == 0 && spec.paramType.String() == contextTypename { fnCallArgs = append(fnCallArgs, Id("ctx")) continue } var varName string var varType types.Type var target *Statement if spec.parent == nil { varName = strcase.ToLowerCamel(spec.name) varType = spec.paramType target = Id(varName) } else { // create only one declaration for option structs varName = spec.parent.name varType = spec.parent.paramType target = Id(spec.parent.name).Dot(spec.name) } if _, ok := vars[varName]; !ok { vars[varName] = struct{}{} tp := varType access := Id(varName) tp2, access2 := findOptsAccessPattern(varType, Id(varName)) // only apply the access pattern if this is an inline opts struct wrapper or an Optional type wrapper _, applyAccessPattern := tp2.(*types.Struct) // inline struct case if !applyAccessPattern { // check for Optional _, applyAccessPattern = ps.isOptionalWrapper(tp2) } if applyAccessPattern { tp = tp2 access = access2 } statements = append(statements, Var().Id(varName).Id(renderNameOrStruct(tp))) if spec.variadic { fnCallArgs = append(fnCallArgs, access.Op("...")) } else { fnCallArgs = append(fnCallArgs, access) } } statements = append(statements, If(Id(inputArgsVar).Index(Lit(spec.graphqlName())).Op("!=").Nil()).Block( Err().Op("=").Qual("json", "Unmarshal").Call( Index().Byte().Parens(Id(inputArgsVar).Index(Lit(spec.graphqlName()))), Op("&").Add(target), ), checkErrStatement, )) } results := sig.Results() var callStatement *Statement if sig.Recv() != nil { callStatement = Parens(Op("*").Id(objName)).Dot(fnName).Call(fnCallArgs...) } else { callStatement = Id(fnName).Call(fnCallArgs...) } switch results.Len() { case 2: // assume second value is error if results.At(1).Type().String() != errorTypeName { // sanity check return fmt.Errorf("second return value must be error, have %s", results.At(1).Type().String()) } statements = append(statements, Return(callStatement)) cases[objName] = append(cases[objName], Case(Lit(caseName)).Block(statements...)) if err := ps.fillObjectFunctionCases(results.At(0).Type(), cases); err != nil { return err } return nil case 1: if results.At(0).Type().String() == errorTypeName { // void error return statements = append(statements, Return(Nil(), callStatement)) cases[objName] = append(cases[objName], Case(Lit(caseName)).Block(statements...)) } else { // non-error return statements = append(statements, Return(callStatement, Nil())) cases[objName] = append(cases[objName], Case(Lit(caseName)).Block(statements...)) if err := ps.fillObjectFunctionCases(results.At(0).Type(), cases); err != nil { return err } } return nil case 0: // void return // // NB(vito): it's really weird to have a fully void return (not even // error), but we should still support it for completeness. statements = append(statements, callStatement, Return(Nil(), Nil())) cases[objName] = append(cases[objName], Case(Lit(caseName)).Block(statements...)) return nil default: return fmt.Errorf("unexpected number of results from function %s: %d", fnName, results.Len()) } } type parseState struct { pkg *packages.Package fset *token.FileSet methods map[string][]method moduleName string // If it exists, constructor is the New func that returns the main module object constructor *types.Func } func (ps *parseState) isMainModuleObject(name string) bool { return strcase.ToCamel(ps.moduleName) == strcase.ToCamel(name) } type method struct { fn *types.Func paramSpecs []paramSpec } // astSpecForNamedType returns the *ast* type spec for the given Named type. This is needed // because the types.Named object does not have the comments associated with the type, which // we want to parse. func (ps *parseState) astSpecForNamedType(namedType *types.Named) (*ast.TypeSpec, error) { tokenFile := ps.fset.File(namedType.Obj().Pos()) if tokenFile == nil { return nil, fmt.Errorf("no file for %s", namedType.Obj().Name()) } for _, f := range ps.pkg.Syntax { if ps.fset.File(f.Pos()) != tokenFile { continue } for _, decl := range f.Decls { genDecl, ok := decl.(*ast.GenDecl) if !ok { continue } for _, spec := range genDecl.Specs { typeSpec, ok := spec.(*ast.TypeSpec) if !ok { continue } if typeSpec.Name.Name == namedType.Obj().Name() { if typeSpec.Doc == nil { typeSpec.Doc = genDecl.Doc } return typeSpec, nil } } } } return nil, fmt.Errorf("no decl for %s", namedType.Obj().Name()) } // declForFunc returns the *ast* func decl for the given Func type. This is needed // because the types.Func object does not have the comments associated with the type, which // we want to parse. func (ps *parseState) declForFunc(fnType *types.Func) (*ast.FuncDecl, error) { var recv *types.Named if signature, ok := fnType.Type().(*types.Signature); ok && signature.Recv() != nil { tp := signature.Recv().Type() for { if p, ok := tp.(*types.Pointer); ok { tp = p.Elem() continue } break } recv, _ = tp.(*types.Named) } tokenFile := ps.fset.File(fnType.Pos()) if tokenFile == nil { return nil, fmt.Errorf("no file for %s", fnType.Name()) } for _, f := range ps.pkg.Syntax { if ps.fset.File(f.Pos()) != tokenFile { continue } for _, decl := range f.Decls { fnDecl, ok := decl.(*ast.FuncDecl) if !ok { continue } if fnDecl.Name.Name != fnType.Name() { continue } if recv != nil { if len(fnDecl.Recv.List) != 1 { continue } tp := fnDecl.Recv.List[0].Type for { if star, ok := tp.(*ast.StarExpr); ok { tp = star.X continue } break } ident, ok := tp.(*ast.Ident) if !ok { continue } if ident.Name != recv.Obj().Name() { continue } } return fnDecl, nil } } return nil, fmt.Errorf("no decl for %s", fnType.Name()) } // commentForFuncField returns the *ast* comment group for the given position. This // is needed because function args (despite being fields) don't have comments // associated with them, so this is a neat little hack to get them out. func (ps *parseState) commentForFuncField(fnDecl *ast.FuncDecl, unpackedParams []*ast.Field, i int) (docComment *ast.CommentGroup, lineComment *ast.CommentGroup) { pos := unpackedParams[i].Pos() tokenFile := ps.fset.File(pos) if tokenFile == nil { return nil, nil } line := tokenFile.Line(pos) allowDocComment := true allowLineComment := true if i == 0 { fieldStartLine := tokenFile.Line(fnDecl.Type.Params.Pos()) if fieldStartLine == line || fieldStartLine == line-1 { // the argument is on the same (or next) line as the function // declaration, so there is no doc comment to find allowDocComment = false } } else { prevArgLine := tokenFile.Line(unpackedParams[i-1].Pos()) if prevArgLine == line || prevArgLine == line-1 { // the argument is on the same (or next) line as the previous // argument, so again there is no doc comment to find allowDocComment = false } } if i+1 < len(fnDecl.Type.Params.List) { nextArgLine := tokenFile.Line(unpackedParams[i+1].Pos()) if nextArgLine == line { // the argument is on the same line as the next argument, so there is // no line comment to find allowLineComment = false } } else { fieldEndLine := tokenFile.Line(fnDecl.Type.Params.End()) if fieldEndLine == line { // the argument is on the same line as the end of the field list, so there // is no line comment to find allowLineComment = false } } for _, f := range ps.pkg.Syntax { if ps.fset.File(f.Pos()) != tokenFile { continue } if allowDocComment { // take the last position in the last line, and try and find a // comment that contains it npos := tokenFile.LineStart(tokenFile.Line(pos)) - 1 for _, comment := range f.Comments { if comment.Pos() <= npos && npos <= comment.End() { docComment = comment break } } } if allowLineComment { // take the last position in the current line, and try and find a // comment that contains it npos := tokenFile.LineStart(tokenFile.Line(pos)+1) - 1 for _, comment := range f.Comments { if comment.Pos() <= npos && npos <= comment.End() { lineComment = comment break } } } } return docComment, lineComment } func (ps *parseState) isDaggerGenerated(obj types.Object) bool { tokenFile := ps.fset.File(obj.Pos()) return filepath.Base(tokenFile.Name()) == daggerGenFilename } func (ps *parseState) isOptionalWrapper(typ types.Type) (*types.Named, bool) { named, ok := typ.(*types.Named) if !ok { return nil, false } if named.Obj().Name() == "Optional" && ps.isDaggerGenerated(named.Obj()) { return named, true } return nil, false } // findOptsAccessPattern takes a type and a base statement (the name of a // variable that has the target type) and produces a type that can be used in a // variable declaration, as well as a statement that has the same type as the // target statement. // // This is essentially for helping resolve the pointeriness of types: a type of // **T and a variable p becomes T and &&p. This means we can *always* construct // an Opts object and unmarshal into it without having nil dereferences. func findOptsAccessPattern(t types.Type, access *Statement) (types.Type, *Statement) { switch t := t.(type) { case *types.Pointer: // taking the address of an address isn't allowed - so we use a ptr // helper function t2, val := findOptsAccessPattern(t.Elem(), access) return t2, Id("ptr").Call(val) // case *types.Slice: // t2, val := findOptsAccessPattern(t.Elem(), access) // return t2, Index().Id(renderNameOrStruct(t.Elem())).Values(val) default: return t, access } } var pragmaCommentRegexp = regexp.MustCompile(`\+\s*(\S+?)(?:=(.+))?(?:\n|$)`) // parsePragmaComment parses a dagger "pragma", that is used to define additional metadata about a parameter. func parsePragmaComment(comment string) (data map[string]string, rest string) { data = map[string]string{} lastEnd := 0 for _, v := range pragmaCommentRegexp.FindAllStringSubmatchIndex(comment, -1) { var key, value string if v[2] != -1 { key = comment[v[2]:v[3]] } if v[4] != -1 { value = comment[v[4]:v[5]] } data[key] = value rest += comment[lastEnd:v[0]] lastEnd = v[1] } rest += comment[lastEnd:] return data, rest } func asInlineStruct(t types.Type) (*types.Struct, bool) { switch t := t.(type) { case *types.Pointer: return asInlineStruct(t.Elem()) case *types.Struct: return t, true default: return nil, false } } func asInlineStructAst(t ast.Node) (*ast.StructType, bool) { switch t := t.(type) { case *ast.StarExpr: return asInlineStructAst(t.X) case *ast.StructType: return t, true default: return nil, false } } func unpackASTFields(fields *ast.FieldList) []*ast.Field { var unpacked []*ast.Field for _, field := range fields.List { if len(field.Names) == 0 { unpacked = append(unpacked, field) continue } for i, name := range field.Names { field := *field field.Names = []*ast.Ident{name} if i != 0 { field.Doc = nil field.Comment = nil } unpacked = append(unpacked, &field) } } return unpacked }
closed
dagger/dagger
https://github.com/dagger/dagger
6,286
🐞 Zenith: camelCase automagic issues with PythonSDK
### What is the issue? When attempting to run the examples provided in the dagger module's documentation, I encountered two issues that presumably have the same underlying cause regarding the automatic camelCase conversion performed in the Python SDK. ## First issue Take the following example (taken from [here](https://docs.dagger.io/zenith/developer/python/539756/advanced-programming#chain-modules-together)): ```python """A Dagger module for saying hello world!.""" from dagger import field, function, object_type @object_type class HelloWorld: greeting: str = field(default="Hello") name: str = field(default="World") @function def with_greeting(self, greeting: str) -> "HelloWorld": self.greeting = greeting return self @function def with_name(self, name: str) -> "HelloWorld": self.name = name return self @function def message(self) -> str: return f"{self.greeting} {self.name}!" ``` And here is an example query for this module: ```graphql { helloWorld { message withName(name: "Monde") { withGreeting(greeting: "Bonjour") { message } } } } ``` The result is as expected ```plain { "helloWorld": { "message": "Hello, World!", "withName": { "withGreeting": { "message": "Bonjour, Monde!" } } } } ``` Now, if I rename `name` to `my_name`: ```python @object_type class HelloWorld: greeting: str = field(default="Hello") my_name: str = field(default="World") @function def with_greeting(self, greeting: str) -> "HelloWorld": self.greeting = greeting return self @function def with_my_name(self, my_name: str) -> "HelloWorld": self.my_name = my_name return self @function def message(self) -> str: return f"{self.greeting} {self.my_name}!" ``` and use the following query: ```graphql { helloWorld { message withMyName(myName: "Monde") { withGreeting(greeting: "Bonjour") { message } } } } ``` I get this result ```plain { "helloWorld": { "message": "Hello, World!", "withMyName": { "withGreeting": { "message": "Bonjour World!" } } } } ``` ## Second issue Take the following example (taken from [here](https://docs.dagger.io/zenith/developer/python/539756/advanced-programming#write-an-asynchronous-module-constructor-function)): ```python """A Dagger module for searching an input file.""" import dagger from dagger import dag, object_type, field, function @object_type class Grep: src: dagger.File = field() @classmethod async def create(cls, src: dagger.File | None = None): if src is None: src = await dag.http("https://dagger.io") return cls(src=src) @function async def grep(self, pattern: str) -> str: return await ( dag .container() .from_("alpine:latest") .with_mounted_file("/src", self.src) .with_exec(["grep", pattern, "/src"]) .stdout() ) ``` Similarly, if I alter this example by renaming `src` to `my_src`: ```python ... @object_type class Grep: my_src: dagger.File = field() @classmethod async def create(cls, my_src: dagger.File | None = None): if my_src is None: my_src = await dag.http("https://dagger.io") return cls(my_src=my_src) ... ``` I get the following error: ```shell $ dagger call grep --pattern dagger ✘ dagger call grep ERROR [1.92s] ┃ Error: response from query: input:1: grep.grep failed to get function output directory: process "/runtime" did not complete successfully: exit code: 1 ✘ grep(pattern: "dagger") ERROR [0.85s] ✘ exec /runtime ERROR [0.85s] ┃ ╭───────────────────── Traceback (most recent call last) ──────────────────────╮ ┃ │ /runtime:8 in <module> │ ┃ │ │ ┃ │ 5 from dagger.mod.cli import app │ ┃ │ 6 │ ┃ │ 7 if __name__ == "__main__": │ ┃ │ ❱ 8 │ sys.exit(app()) │ ┃ │ 9 │ ┃ │ │ ┃ │ /sdk/src/dagger/mod/cli.py:32 in app │ ┃ │ │ ┃ │ 29 │ ) │ ┃ │ 30 │ try: │ ┃ │ 31 │ │ mod = get_module() │ ┃ │ ❱ 32 │ │ mod() │ ┃ │ 33 │ except FatalError as e: │ ┃ │ 34 │ │ if logger.isEnabledFor(logging.DEBUG): │ ┃ │ 35 │ │ │ logger.exception("Fatal error") │ ┃ │ │ ┃ │ /sdk/src/dagger/mod/_module.py:181 in __call__ │ ┃ │ │ ┃ │ 178 │ def __call__(self) -> None: │ ┃ │ 179 │ │ if self._log_level is not None: │ ┃ │ 180 │ │ │ configure_logging(self._log_level) │ ┃ │ ❱ 181 │ │ anyio.run(self._run) │ ┃ │ 182 │ │ ┃ │ 183 │ async def _run(self): │ ┃ │ 184 │ │ async with await dagger.connect(): │ ┃ │ │ ┃ │ /usr/local/lib/python3.11/site-packages/anyio/_core/_eventloop.py:66 in run │ ┃ │ │ ┃ │ 63 │ │ ┃ │ 64 │ try: │ ┃ │ 65 │ │ backend_options = backend_options or {} │ ┃ │ ❱ 66 │ │ return async_backend.run(func, args, {}, backend_options) │ ┃ │ 67 │ finally: │ ┃ │ 68 │ │ if token: │ ┃ │ 69 │ │ │ sniffio.current_async_library_cvar.reset(token) │ ┃ │ │ ┃ │ /usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py:1960 in │ ┃ │ run │ ┃ │ │ ┃ │ 1957 │ │ debug = options.get("debug", False) │ ┃ │ 1958 │ │ options.get("loop_factory", None) │ ┃ │ 1959 │ │ options.get("use_uvloop", False) │ ┃ │ ❱ 1960 │ │ return native_run(wrapper(), debug=debug) │ ┃ │ 1961 │ │ ┃ │ 1962 │ @classmethod │ ┃ │ 1963 │ def current_token(cls) -> object: │ ┃ │ │ ┃ │ /usr/local/lib/python3.11/asyncio/runners.py:190 in run │ ┃ │ │ ┃ │ 187 │ │ │ "asyncio.run() cannot be called from a running event loop" │ ┃ │ 188 │ │ ┃ │ 189 │ with Runner(debug=debug) as runner: │ ┃ │ ❱ 190 │ │ return runner.run(main) │ ┃ │ 191 │ ┃ │ 192 │ ┃ │ 193 def _cancel_all_tasks(loop): │ ┃ │ │ ┃ │ /usr/local/lib/python3.11/asyncio/runners.py:118 in run │ ┃ │ │ ┃ │ 115 │ │ │ ┃ │ 116 │ │ self._interrupt_count = 0 │ ┃ │ 117 │ │ try: │ ┃ │ ❱ 118 │ │ │ return self._loop.run_until_complete(task) │ ┃ │ 119 │ │ except exceptions.CancelledError: │ ┃ │ 120 │ │ │ if self._interrupt_count > 0: │ ┃ │ 121 │ │ │ │ uncancel = getattr(task, "uncancel", None) │ ┃ │ │ ┃ │ /usr/local/lib/python3.11/asyncio/base_events.py:653 in run_until_complete │ ┃ │ │ ┃ │ 650 │ │ if not future.done(): │ ┃ │ 651 │ │ │ raise RuntimeError('Event loop stopped before Future comp │ ┃ │ 652 │ │ │ ┃ │ ❱ 653 │ │ return future.result() │ ┃ │ 654 │ │ ┃ │ 655 │ def stop(self): │ ┃ │ 656 │ │ """Stop running the event loop. │ ┃ │ │ ┃ │ /usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py:1953 in │ ┃ │ wrapper │ ┃ │ │ ┃ │ 1950 │ │ │ _task_states[task] = TaskState(None, None) │ ┃ │ 1951 │ │ │ │ ┃ │ 1952 │ │ │ try: │ ┃ │ ❱ 1953 │ │ │ │ return await func(*args) │ ┃ │ 1954 │ │ │ finally: │ ┃ │ 1955 │ │ │ │ del _task_states[task] │ ┃ │ 1956 │ ┃ │ │ ┃ │ /sdk/src/dagger/mod/_module.py:185 in _run │ ┃ │ │ ┃ │ 182 │ │ ┃ │ 183 │ async def _run(self): │ ┃ │ 184 │ │ async with await dagger.connect(): │ ┃ │ ❱ 185 │ │ │ await self._serve() │ ┃ │ 186 │ │ ┃ │ 187 │ async def _serve(self): │ ┃ │ 188 │ │ mod_name = await self._mod.name() │ ┃ │ │ ┃ │ /sdk/src/dagger/mod/_module.py:193 in _serve │ ┃ │ │ ┃ │ 190 │ │ resolvers = self.get_resolvers(mod_name) │ ┃ │ 191 │ │ │ ┃ │ 192 │ │ result = ( │ ┃ │ ❱ 193 │ │ │ await self._invoke(resolvers, parent_name) │ ┃ │ 194 │ │ │ if parent_name │ ┃ │ 195 │ │ │ else await self._register(resolvers, to_pascal_case(mod_na │ ┃ │ 196 │ │ ) │ ┃ │ │ ┃ │ /sdk/src/dagger/mod/_module.py:266 in _invoke │ ┃ │ │ ┃ │ 263 │ │ ) │ ┃ │ 264 │ │ │ ┃ │ 265 │ │ resolver = self.get_resolver(resolvers, parent_name, name) │ ┃ │ ❱ 266 │ │ return await self.get_result(resolver, parent_json, inputs) │ ┃ │ 267 │ │ ┃ │ 268 │ async def get_result( │ ┃ │ 269 │ │ self, │ ┃ │ │ ┃ │ /sdk/src/dagger/mod/_module.py:279 in get_result │ ┃ │ │ ┃ │ 276 │ │ │ isinstance(resolver, FunctionResolver) │ ┃ │ 277 │ │ │ and inspect.isclass(resolver.wrapped_func) │ ┃ │ 278 │ │ ): │ ┃ │ ❱ 279 │ │ │ root = await self.get_root(resolver.origin, parent_json) │ ┃ │ 280 │ │ │ ┃ │ 281 │ │ try: │ ┃ │ 282 │ │ │ result = await resolver.get_result(self._converter, root, │ ┃ │ │ ┃ │ /sdk/src/dagger/mod/_module.py:325 in get_root │ ┃ │ │ ┃ │ 322 │ │ if not parent: │ ┃ │ 323 │ │ │ return origin() │ ┃ │ 324 │ │ │ ┃ │ ❱ 325 │ │ return await asyncify(self._converter.structure, parent, origi │ ┃ │ 326 │ │ ┃ │ 327 │ def field( │ ┃ │ 328 │ │ self, │ ┃ │ │ ┃ │ /usr/local/lib/python3.11/site-packages/anyio/to_thread.py:49 in run_sync │ ┃ │ │ ┃ │ 46 │ │ │ stacklevel=2, │ ┃ │ 47 │ │ ) │ ┃ │ 48 │ │ ┃ │ ❱ 49 │ return await get_async_backend().run_sync_in_worker_thread( │ ┃ │ 50 │ │ func, args, abandon_on_cancel=abandon_on_cancel, limiter=limite │ ┃ │ 51 │ ) │ ┃ │ 52 │ ┃ │ │ ┃ │ /usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py:2103 in │ ┃ │ run_sync_in_worker_thread │ ┃ │ │ ┃ │ 2100 │ │ │ │ │ worker_scope = scope._parent_scope │ ┃ │ 2101 │ │ │ │ │ ┃ │ 2102 │ │ │ │ worker.queue.put_nowait((context, func, args, future, │ ┃ │ ❱ 2103 │ │ │ │ return await future │ ┃ │ 2104 │ │ ┃ │ 2105 │ @classmethod │ ┃ │ 2106 │ def check_cancelled(cls) -> None: │ ┃ │ │ ┃ │ /usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py:823 in │ ┃ │ run │ ┃ │ │ ┃ │ 820 │ │ │ │ │ exception: BaseException | None = None │ ┃ │ 821 │ │ │ │ │ threadlocals.current_cancel_scope = cancel_scope │ ┃ │ 822 │ │ │ │ │ try: │ ┃ │ ❱ 823 │ │ │ │ │ │ result = context.run(func, *args) │ ┃ │ 824 │ │ │ │ │ except BaseException as exc: │ ┃ │ 825 │ │ │ │ │ │ exception = exc │ ┃ │ 826 │ │ │ │ │ finally: │ ┃ │ │ ┃ │ /usr/local/lib/python3.11/site-packages/cattrs/converters.py:332 in │ ┃ │ structure │ ┃ │ │ ┃ │ 329 │ │ ┃ │ 330 │ def structure(self, obj: Any, cl: Type[T]) -> T: │ ┃ │ 331 │ │ """Convert unstructured Python data structures to structured │ ┃ │ ❱ 332 │ │ return self._structure_func.dispatch(cl)(obj, cl) │ ┃ │ 333 │ │ ┃ │ 334 │ # Classes to Python primitives. │ ┃ │ 335 │ def unstructure_attrs_asdict(self, obj: Any) -> Dict[str, Any]: │ ┃ │ in structure_Grep:9 │ ┃ ╰──────────────────────────────────────────────────────────────────────────────╯ ┃ ClassValidationError: While structuring Grep (1 sub-exception) • Engine: 9e91eb66912d (version v0.9.4) ⧗ 20.86s ✔ 112 ∅ 16 ✘ 3 ``` ### Dagger version dagger v0.9.4 (registry.dagger.io/engine) darwin/arm64 ### Steps to reproduce _No response_ ### Log output _No response_
https://github.com/dagger/dagger/issues/6286
https://github.com/dagger/dagger/pull/6287
1502402c4c028f15165a14ea8f05260057c8141e
62e02912129760bc86c309e5107dd7eb463ac2bf
"2023-12-16T16:19:10Z"
go
"2023-12-20T11:15:41Z"
core/integration/module_test.go
package core import ( "context" _ "embed" "encoding/json" "fmt" "go/format" "os" "os/exec" "path/filepath" "strings" "testing" "time" "github.com/iancoleman/strcase" "github.com/moby/buildkit/identity" "github.com/stretchr/testify/require" "github.com/tidwall/gjson" "golang.org/x/sync/errgroup" "dagger.io/dagger" "github.com/dagger/dagger/cmd/codegen/introspection" "github.com/dagger/dagger/core/modules" ) func TestModuleGoInit(t *testing.T) { t.Run("from scratch", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=bare", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{bare{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"bare":{"containerEcho":{"stdout":"hello\n"}}}`, out) }) t.Run("reserved go.mod name", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=go", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{go{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"go":{"containerEcho":{"stdout":"hello\n"}}}`, out) }) t.Run("uses expected Go module name, camel-cases Dagger module name", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=My-Module", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{myModule{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"myModule":{"containerEcho":{"stdout":"hello\n"}}}`, out) generated, err := modGen.File("go.mod").Contents(ctx) require.NoError(t, err) require.Contains(t, generated, "module main") }) t.Run("creates go.mod beneath an existing go.mod if root points beneath it", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/go.mod", dagger.ContainerWithNewFileOpts{ Contents: "module example.com/test\n", }). WithNewFile("/work/foo.go", dagger.ContainerWithNewFileOpts{ Contents: "package foo\n", }). WithWorkdir("/work/ci"). With(daggerExec("mod", "init", "--name=beneathGoMod", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{beneathGoMod{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"beneathGoMod":{"containerEcho":{"stdout":"hello\n"}}}`, out) t.Run("names Go module after Dagger module", func(t *testing.T) { generated, err := modGen.File("go.mod").Contents(ctx) require.NoError(t, err) require.Contains(t, generated, "module main") }) }) t.Run("respects existing go.mod", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithExec([]string{"go", "mod", "init", "example.com/test"}). With(daggerExec("mod", "init", "--name=hasGoMod", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{hasGoMod{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"hasGoMod":{"containerEcho":{"stdout":"hello\n"}}}`, out) t.Run("preserves module name", func(t *testing.T) { generated, err := modGen.File("go.mod").Contents(ctx) require.NoError(t, err) require.Contains(t, generated, "module example.com/test") }) }) t.Run("respects parent go.mod if root points to it", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithExec([]string{"go", "mod", "init", "example.com/test"}). WithNewFile("/work/foo.go", dagger.ContainerWithNewFileOpts{ Contents: "package foo\n", }). WithWorkdir("/work/child"). With(daggerExec("mod", "init", "--name=child", "--sdk=go", "--root=..")). WithNewFile("/work/child/main.go", dagger.ContainerWithNewFileOpts{ Contents: ` package main import "os" type Child struct{} func (m *Child) Root() *Directory { wd, err := os.Getwd() if err != nil { panic(err) } return dag.Host().Directory(wd+"/..") } `, }) generated := modGen. // explicitly sync to see whether it makes a go.mod With(daggerExec("mod", "sync")). Directory(".") logGen(ctx, t, generated) out, err := modGen. With(daggerQuery(`{child{root{entries}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"child":{"root":{"entries":["child","foo.go","go.mod","go.sum"]}}}`, out) childEntries, err := generated.Entries(ctx) require.NoError(t, err) require.NotContains(t, childEntries, "go.mod") t.Run("preserves parent module name", func(t *testing.T) { generated, err := modGen.File("/work/go.mod").Contents(ctx) require.NoError(t, err) require.Contains(t, generated, "module example.com/test") }) }) t.Run("respects existing go.mod even if root points to parent that has go.mod", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithExec([]string{"go", "mod", "init", "example.com/test"}). WithNewFile("/work/foo.go", dagger.ContainerWithNewFileOpts{ Contents: "package foo\n", }). WithWorkdir("/work/child"). WithExec([]string{"go", "mod", "init", "my-mod"}). With(daggerExec("mod", "init", "--name=child", "--sdk=go", "--root=..")). WithNewFile("/work/child/main.go", dagger.ContainerWithNewFileOpts{ Contents: ` package main import "os" type Child struct{} func (m *Child) Root() *Directory { wd, err := os.Getwd() if err != nil { panic(err) } return dag.Host().Directory(wd+"/..") } `, }) generated := modGen. // explicitly sync to see whether it makes a go.mod With(daggerExec("mod", "sync")). Directory(".") logGen(ctx, t, generated) out, err := modGen. With(daggerQuery(`{child{root{entries}}}`)). Stdout(ctx) require.NoError(t, err) // no go.sum require.JSONEq(t, `{"child":{"root":{"entries":["child","foo.go","go.mod"]}}}`, out) childEntries, err := generated.Entries(ctx) require.NoError(t, err) require.Contains(t, childEntries, "go.mod") require.Contains(t, childEntries, "go.sum") }) t.Run("respects existing main.go", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: ` package main type HasMainGo struct {} func (m *HasMainGo) Hello() string { return "Hello, world!" } `, }). With(daggerExec("mod", "init", "--name=hasMainGo", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{hasMainGo{hello}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"hasMainGo":{"hello":"Hello, world!"}}`, out) }) t.Run("respects existing main.go even if it uses types not generated yet", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: ` package main type HasDaggerTypes struct {} func (m *HasDaggerTypes) Hello() *Container { return dag.Container(). From("` + alpineImage + `"). WithExec([]string{"echo", "Hello, world!"}) } `, }). With(daggerExec("mod", "init", "--name=hasDaggerTypes", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{hasDaggerTypes{hello{stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"hasDaggerTypes":{"hello":{"stdout":"Hello, world!\n"}}}`, out) }) t.Run("respects existing package without creating main.go", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/notmain.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type HasNotMainGo struct {} func (m *HasNotMainGo) Hello() string { return "Hello, world!" } `, }). With(daggerExec("mod", "init", "--name=hasNotMainGo", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) out, err := modGen. With(daggerQuery(`{hasNotMainGo{hello}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"hasNotMainGo":{"hello":"Hello, world!"}}`, out) }) } func TestModulePythonInit(t *testing.T) { t.Run("from scratch", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=bare", "--sdk=python")) out, err := modGen. With(daggerQuery(`{bare{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"bare":{"containerEcho":{"stdout":"hello\n"}}}`, out) }) t.Run("with different root", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/child"). With(daggerExec("mod", "init", "--name=bare", "--sdk=python", "--root=..")) out, err := modGen. With(daggerQuery(`{bare{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"bare":{"containerEcho":{"stdout":"hello\n"}}}`, out) }) t.Run("respects existing pyproject.toml", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("pyproject.toml", dagger.ContainerWithNewFileOpts{ Contents: `[project] name = "has-pyproject" version = "0.0.0" `, }). With(daggerExec("mod", "init", "--name=hasPyproject", "--sdk=python")) out, err := modGen. With(daggerQuery(`{hasPyproject{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"hasPyproject":{"containerEcho":{"stdout":"hello\n"}}}`, out) t.Run("preserves module name", func(t *testing.T) { generated, err := modGen.File("pyproject.toml").Contents(ctx) require.NoError(t, err) require.Contains(t, generated, `name = "has-pyproject"`) }) }) t.Run("respects existing main.py", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/src/main/__init__.py", dagger.ContainerWithNewFileOpts{ Contents: "from . import notmain\n", }). WithNewFile("/work/src/main/notmain.py", dagger.ContainerWithNewFileOpts{ Contents: `from dagger import function @function def hello() -> str: return "Hello, world!" `, }). With(daggerExec("mod", "init", "--name=hasMainPy", "--sdk=python")) out, err := modGen. With(daggerQuery(`{hasMainPy{hello}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"hasMainPy":{"hello":"Hello, world!"}}`, out) }) } func TestModuleInitLICENSE(t *testing.T) { t.Run("bootstraps Apache-2.0 LICENSE file if none found", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=licensed-to-ill", "--sdk=go")) content, err := modGen.File("LICENSE").Contents(ctx) require.NoError(t, err) require.Contains(t, content, "Apache License, Version 2.0") }) t.Run("creates LICENSE file in the directory specified by -m", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "-m", "./mymod", "--name=licensed-to-ill", "--sdk=go")) content, err := modGen.File("mymod/LICENSE").Contents(ctx) require.NoError(t, err) require.Contains(t, content, "Apache License, Version 2.0") }) t.Run("does not bootstrap LICENSE file if it exists in the parent dir", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/LICENSE", dagger.ContainerWithNewFileOpts{ Contents: "doesnt matter", }). WithWorkdir("/work/sub"). With(daggerExec("mod", "init", "--name=licensed-to-ill", "--sdk=go")) _, err := modGen.File("LICENSE").Contents(ctx) require.Error(t, err) }) t.Run("bootstraps a LICENSE file when requested, even if it exists in the parent dir", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/LICENSE", dagger.ContainerWithNewFileOpts{ Contents: "doesnt matter", }). WithWorkdir("/work/sub"). With(daggerExec("mod", "init", "--name=licensed-to-ill", "--sdk=go", "--license=MIT")) content, err := modGen.File("LICENSE").Contents(ctx) require.NoError(t, err) require.Contains(t, content, "MIT License") }) } func TestModuleGit(t *testing.T) { t.Parallel() type testCase struct { sdk string gitignores []string } for _, tc := range []testCase{ { sdk: "go", gitignores: []string{ "/dagger.gen.go\n", "/querybuilder/\n", }, }, { sdk: "python", gitignores: []string{ "/sdk\n", }, }, { sdk: "typescript", gitignores: []string{ "/sdk\n", "/node_modules\n", }, }, } { tc := tc t.Run(fmt.Sprintf("module %s git", tc.sdk), func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := goGitBase(t, c). With(daggerExec("mod", "init", "--name=bare", "--sdk="+tc.sdk)) if tc.sdk == "go" { logGen(ctx, t, modGen.Directory(".")) } out, err := modGen. With(daggerQuery(`{bare{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"bare":{"containerEcho":{"stdout":"hello\n"}}}`, out) t.Run("configures .gitignore", func(t *testing.T) { ignore, err := modGen.File(".gitignore").Contents(ctx) require.NoError(t, err) for _, gitignore := range tc.gitignores { require.Contains(t, ignore, gitignore) } }) }) } } func TestModuleGoGitRemovesIgnored(t *testing.T) { t.Parallel() c, ctx := connect(t) committedModGen := goGitBase(t, c). With(daggerExec("mod", "init", "--name=bare", "--sdk=go")). WithExec([]string{"rm", ".gitignore"}). // simulate old path scheme to show we ignore it too to help transition WithExec([]string{"mkdir", "./internal"}). WithExec([]string{"cp", "-a", "./querybuilder", "./internal/querybuilder"}). WithExec([]string{"git", "add", "."}). WithExec([]string{"git", "commit", "-m", "init with generated files"}) changedAfterSync, err := committedModGen. With(daggerExec("mod", "sync")). WithExec([]string{"git", "diff"}). // for debugging WithExec([]string{"git", "status", "--short"}). Stdout(ctx) require.NoError(t, err) t.Logf("changed after sync:\n%s", changedAfterSync) require.Contains(t, changedAfterSync, "D dagger.gen.go\n") require.Contains(t, changedAfterSync, "D querybuilder/marshal.go\n") require.Contains(t, changedAfterSync, "D querybuilder/querybuilder.go\n") require.Contains(t, changedAfterSync, "D internal/querybuilder/marshal.go\n") require.Contains(t, changedAfterSync, "D internal/querybuilder/querybuilder.go\n") } func TestModulePythonGitRemovesIgnored(t *testing.T) { t.Parallel() c, ctx := connect(t) committedModGen := goGitBase(t, c). With(daggerExec("mod", "init", "--name=bare", "--sdk=python")). WithExec([]string{"rm", ".gitignore"}). WithExec([]string{"git", "add", "."}). WithExec([]string{"git", "commit", "-m", "init with generated files"}) changedAfterSync, err := committedModGen. With(daggerExec("mod", "sync")). WithExec([]string{"git", "diff"}). // for debugging WithExec([]string{"git", "status", "--short"}). Stdout(ctx) require.NoError(t, err) t.Logf("changed after sync:\n%s", changedAfterSync) require.Contains(t, changedAfterSync, "D sdk/pyproject.toml\n") require.Contains(t, changedAfterSync, "D sdk/src/dagger/__init__.py\n") } func TestModuleTypescriptGitRemovesIgnored(t *testing.T) { t.Parallel() c, ctx := connect(t) committedModGen := goGitBase(t, c). With(daggerExec("mod", "init", "--name=bare", "--sdk=typescript")). WithExec([]string{"rm", ".gitignore"}). WithExec([]string{"git", "add", "."}). WithExec([]string{"git", "commit", "-m", "init with generated files"}) changedAfterSync, err := committedModGen. With(daggerExec("mod", "sync")). WithExec([]string{"git", "diff"}). // for debugging WithExec([]string{"git", "status", "--short"}). Stdout(ctx) require.NoError(t, err) t.Logf("changed after sync:\n%s", changedAfterSync) require.Contains(t, changedAfterSync, "D sdk/index.ts\n") require.Contains(t, changedAfterSync, "D sdk/entrypoint/entrypoint.ts\n") } //go:embed testdata/modules/go/minimal/main.go var goSignatures string func TestModuleGoSignatures(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: goSignatures, }) logGen(ctx, t, modGen.Directory(".")) t.Run("func Hello() string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{hello}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"hello":"hello"}}`, out) }) t.Run("func Echo(string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echo(msg: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echo":"hello...hello...hello..."}}`, out) }) t.Run("func EchoPointer(*string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoPointer(msg: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoPointer":"hello...hello...hello..."}}`, out) }) t.Run("func EchoPointerPointer(**string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoPointerPointer(msg: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoPointerPointer":"hello...hello...hello..."}}`, out) }) t.Run("func EchoOptional(string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOptional(msg: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptional":"hello...hello...hello..."}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOptional}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptional":"default...default...default..."}}`, out) }) t.Run("func EchoOptionalPointer(string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOptionalPointer(msg: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptionalPointer":"hello...hello...hello..."}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOptionalPointer}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptionalPointer":"default...default...default..."}}`, out) }) t.Run("func EchoOptionalSlice([]string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOptionalSlice(msg: ["hello", "there"])}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptionalSlice":"hello+there...hello+there...hello+there..."}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOptionalSlice}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptionalSlice":"foobar...foobar...foobar..."}}`, out) }) t.Run("func Echoes([]string) []string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoes(msgs: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoes":["hello...hello...hello..."]}}`, out) }) t.Run("func EchoesVariadic(...string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoesVariadic(msgs: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoesVariadic":"hello...hello...hello..."}}`, out) }) t.Run("func HelloContext(context.Context) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{helloContext}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"helloContext":"hello context"}}`, out) }) t.Run("func EchoContext(context.Context, string) string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoContext(msg: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoContext":"ctx.hello...ctx.hello...ctx.hello..."}}`, out) }) t.Run("func HelloStringError() (string, error)", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{helloStringError}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"helloStringError":"hello i worked"}}`, out) }) t.Run("func HelloVoid()", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{helloVoid}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"helloVoid":null}}`, out) }) t.Run("func HelloVoidError() error", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{helloVoidError}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"helloVoidError":null}}`, out) }) t.Run("func EchoOpts(string, string, int) error", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOpts(msg: "hi")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOpts":"hi"}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOpts(msg: "hi", suffix: "!", times: 2)}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOpts":"hi!hi!"}}`, out) }) t.Run("func EchoOptsInline(struct{string, string, int}) error", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOptsInline(msg: "hi")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInline":"hi"}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOptsInline(msg: "hi", suffix: "!", times: 2)}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInline":"hi!hi!"}}`, out) }) t.Run("func EchoOptsInlinePointer(*struct{string, string, int}) error", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOptsInlinePointer(msg: "hi")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInlinePointer":"hi"}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOptsInlinePointer(msg: "hi", suffix: "!", times: 2)}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInlinePointer":"hi!hi!"}}`, out) }) t.Run("func EchoOptsInlineCtx(ctx, struct{string, string, int}) error", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOptsInlineCtx(msg: "hi")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInlineCtx":"hi"}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOptsInlineCtx(msg: "hi", suffix: "!", times: 2)}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInlineCtx":"hi!hi!"}}`, out) }) t.Run("func EchoOptsInlineTags(struct{string, string, int}) error", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOptsInlineTags(msg: "hi")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInlineTags":"hi"}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOptsInlineTags(msg: "hi", suffix: "!", times: 2)}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsInlineTags":"hi!hi!"}}`, out) }) t.Run("func EchoOptsPragmas(string, string, int) error", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOptsPragmas(msg: "hi")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptsPragmas":"hi...hi...hi..."}}`, out) }) } //go:embed testdata/modules/typescript/minimal/index.ts var tsSignatures string func TestModuleTypescriptSignatures(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=typescript")). WithNewFile("src/index.ts", dagger.ContainerWithNewFileOpts{ Contents: tsSignatures, }) t.Run("hello(): string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{hello}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"hello":"hello"}}`, out) }) t.Run("echoes(msgs: string[]): string[]", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoes(msgs: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoes":["hello...hello...hello..."]}}`, out) }) t.Run("echoOptional(msg = 'default'): string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOptional(msg: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptional":"hello...hello...hello..."}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOptional}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptional":"default...default...default..."}}`, out) }) t.Run("echoesVariadic(...msgs: string[]): string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoesVariadic(msgs: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoesVariadic":"hello...hello...hello..."}}`, out) }) t.Run("echo(msg: string): string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echo(msg: "hello")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echo":"hello...hello...hello..."}}`, out) }) t.Run("echoOptionalSlice(msg = ['foobar']): string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOptionalSlice(msg: ["hello", "there"])}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptionalSlice":"hello+there...hello+there...hello+there..."}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOptionalSlice}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOptionalSlice":"foobar...foobar...foobar..."}}`, out) }) t.Run("helloVoid(): void", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{helloVoid}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"helloVoid":null}}`, out) }) t.Run("echoOpts(msg: string, suffix: string = '', times: number = 1): string", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(`{minimal{echoOpts(msg: "hi")}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOpts":"hi"}}`, out) out, err = modGen.With(daggerQuery(`{minimal{echoOpts(msg: "hi", suffix: "!", times: 2)}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"echoOpts":"hi!hi!"}}`, out) }) } func TestModuleGoSignaturesBuiltinTypes(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main import "context" type Minimal struct {} func (m *Minimal) Read(ctx context.Context, dir Directory) (string, error) { return dir.File("foo").Contents(ctx) } func (m *Minimal) ReadPointer(ctx context.Context, dir *Directory) (string, error) { return dir.File("foo").Contents(ctx) } func (m *Minimal) ReadSlice(ctx context.Context, dir []Directory) (string, error) { return dir[0].File("foo").Contents(ctx) } func (m *Minimal) ReadVariadic(ctx context.Context, dir ...Directory) (string, error) { return dir[0].File("foo").Contents(ctx) } func (m *Minimal) ReadOptional(ctx context.Context, dir Optional[Directory]) (string, error) { d, ok := dir.Get() if ok { return d.File("foo").Contents(ctx) } return "", nil } `, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerQuery(`{directory{withNewFile(path: "foo", contents: "bar"){id}}}`)).Stdout(ctx) require.NoError(t, err) dirID := gjson.Get(out, "directory.withNewFile.id").String() t.Run("func Read(ctx, Directory) (string, error)", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(fmt.Sprintf(`{minimal{read(dir: "%s")}}`, dirID))).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"read":"bar"}}`, out) }) t.Run("func ReadPointer(ctx, *Directory) (string, error)", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(fmt.Sprintf(`{minimal{readPointer(dir: "%s")}}`, dirID))).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"readPointer":"bar"}}`, out) }) t.Run("func ReadSlice(ctx, []Directory) (string, error)", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(fmt.Sprintf(`{minimal{readSlice(dir: ["%s"])}}`, dirID))).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"readSlice":"bar"}}`, out) }) t.Run("func ReadVariadic(ctx, ...Directory) (string, error)", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(fmt.Sprintf(`{minimal{readVariadic(dir: ["%s"])}}`, dirID))).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"readVariadic":"bar"}}`, out) }) t.Run("func ReadOptional(ctx, Optional[Directory]) (string, error)", func(t *testing.T) { t.Parallel() out, err := modGen.With(daggerQuery(fmt.Sprintf(`{minimal{readOptional(dir: "%s")}}`, dirID))).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"readOptional":"bar"}}`, out) out, err = modGen.With(daggerQuery(`{minimal{readOptional}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"readOptional":""}}`, out) }) } func TestModuleGoSignaturesUnexported(t *testing.T) { t.Parallel() var logs safeBuffer c, ctx := connect(t, dagger.WithLogOutput(&logs)) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Minimal struct {} type Foo struct {} type bar struct {} func (m *Minimal) Hello(name string) string { return name } func (f *Foo) Hello(name string) string { return name } func (b *bar) Hello(name string) string { return name } `, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(inspectModule).Stdout(ctx) require.NoError(t, err) objs := gjson.Get(out, "host.directory.asModule.objects") require.Equal(t, 1, len(objs.Array())) minimal := objs.Get(`0.asObject`) require.Equal(t, "Minimal", minimal.Get("name").String()) modGen = c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Minimal struct {} type Foo struct {} type bar struct {} func (m *Minimal) Hello(name string) Foo { return Foo{} } func (f *Foo) Hello(name string) string { return name } func (b *bar) Hello(name string) string { return name } `, }) logGen(ctx, t, modGen.Directory(".")) out, err = modGen.With(inspectModule).Stdout(ctx) require.NoError(t, err) objs = gjson.Get(out, "host.directory.asModule.objects") require.Equal(t, 2, len(objs.Array())) minimal = objs.Get(`0.asObject`) require.Equal(t, "Minimal", minimal.Get("name").String()) foo := objs.Get(`1.asObject`) require.Equal(t, "MinimalFoo", foo.Get("name").String()) modGen = c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Minimal struct {} type Foo struct { Bar bar } type bar struct {} func (m *Minimal) Hello(name string) Foo { return Foo{} } func (f *Foo) Hello(name string) string { return name } func (b *bar) Hello(name string) string { return name } `, }) logGen(ctx, t, modGen.Directory(".")) _, err = modGen.With(inspectModule).Stderr(ctx) require.Error(t, err) require.NoError(t, c.Close()) require.Contains(t, logs.String(), "cannot code-generate unexported type bar") } func TestModuleGoSignaturesMixMatch(t *testing.T) { t.Parallel() var logs safeBuffer c, ctx := connect(t, dagger.WithLogOutput(&logs)) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Minimal struct {} func (m *Minimal) Hello(name string, opts struct{}, opts2 struct{}) string { return name } `, }) logGen(ctx, t, modGen.Directory(".")) _, err := modGen.With(daggerQuery(`{minimal{hello}}`)).Stdout(ctx) require.Error(t, err) require.NoError(t, c.Close()) require.Contains(t, logs.String(), "nested structs are not supported") } func TestModuleGoSignaturesNameConflict(t *testing.T) { t.Parallel() var logs safeBuffer c, ctx := connect(t, dagger.WithLogOutput(&logs)) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Minimal struct { Foo Foo Bar Bar Baz Baz } type Foo struct {} type Bar struct {} type Baz struct {} func (m *Foo) Hello(name string) string { return name } func (f *Bar) Hello(name string, name2 string) string { return name + name2 } func (b *Baz) Hello() (string, error) { return "", nil } `, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(inspectModule).Stdout(ctx) require.NoError(t, err) objs := gjson.Get(out, "host.directory.asModule.objects") require.Equal(t, 4, len(objs.Array())) obj := objs.Get(`0.asObject`) require.Equal(t, "Minimal", obj.Get("name").String()) obj = objs.Get(`1.asObject`) require.Equal(t, "MinimalFoo", obj.Get("name").String()) obj = objs.Get(`2.asObject`) require.Equal(t, "MinimalBar", obj.Get("name").String()) obj = objs.Get(`3.asObject`) require.Equal(t, "MinimalBaz", obj.Get("name").String()) } var inspectModule = daggerQuery(` query { host { directory(path: ".") { asModule { objects { asObject { name description functions { name description args { name description defaultValue } } fields { name description } } } } } } } `) func TestModuleGoDocs(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: goSignatures, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(inspectModule).Stdout(ctx) require.NoError(t, err) obj := gjson.Get(out, "host.directory.asModule.objects.0.asObject") require.Equal(t, "Minimal", obj.Get("name").String()) hello := obj.Get(`functions.#(name="hello")`) require.Equal(t, "hello", hello.Get("name").String()) require.Empty(t, hello.Get("description").String()) require.Empty(t, hello.Get("args").Array()) // test the args-based form echoOpts := obj.Get(`functions.#(name="echoOpts")`) require.Equal(t, "echoOpts", echoOpts.Get("name").String()) require.Equal(t, "EchoOpts does some opts things", echoOpts.Get("description").String()) require.Len(t, echoOpts.Get("args").Array(), 3) require.Equal(t, "msg", echoOpts.Get("args.0.name").String()) require.Equal(t, "the message to echo", echoOpts.Get("args.0.description").String()) require.Equal(t, "suffix", echoOpts.Get("args.1.name").String()) require.Equal(t, "String to append to the echoed message", echoOpts.Get("args.1.description").String()) require.Equal(t, "times", echoOpts.Get("args.2.name").String()) require.Equal(t, "Number of times to repeat the message", echoOpts.Get("args.2.description").String()) // test the inline struct form echoOpts = obj.Get(`functions.#(name="echoOptsInline")`) require.Equal(t, "echoOptsInline", echoOpts.Get("name").String()) require.Equal(t, "EchoOptsInline does some opts things", echoOpts.Get("description").String()) require.Len(t, echoOpts.Get("args").Array(), 3) require.Equal(t, "msg", echoOpts.Get("args.0.name").String()) require.Equal(t, "the message to echo", echoOpts.Get("args.0.description").String()) require.Equal(t, "suffix", echoOpts.Get("args.1.name").String()) require.Equal(t, "String to append to the echoed message", echoOpts.Get("args.1.description").String()) require.Equal(t, "times", echoOpts.Get("args.2.name").String()) require.Equal(t, "Number of times to repeat the message", echoOpts.Get("args.2.description").String()) // test the arg-based form (with pragmas) echoOpts = obj.Get(`functions.#(name="echoOptsPragmas")`) require.Equal(t, "echoOptsPragmas", echoOpts.Get("name").String()) require.Len(t, echoOpts.Get("args").Array(), 3) require.Equal(t, "msg", echoOpts.Get("args.0.name").String()) require.Equal(t, "", echoOpts.Get("args.0.defaultValue").String()) require.Equal(t, "suffix", echoOpts.Get("args.1.name").String()) require.Equal(t, "String to append to the echoed message", echoOpts.Get("args.1.description").String()) require.Equal(t, "\"...\"", echoOpts.Get("args.1.defaultValue").String()) require.Equal(t, "times", echoOpts.Get("args.2.name").String()) require.Equal(t, "3", echoOpts.Get("args.2.defaultValue").String()) require.Equal(t, "Number of times to repeat the message", echoOpts.Get("args.2.description").String()) } func TestModuleGoDocsEdgeCases(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main // Minimal is a thing type Minimal struct { // X is this X, Y string // Y is not this // +private Z string } // some docs func (m *Minimal) Hello(foo string, bar string, // hello baz string, qux string, x string, // lol ) string { return foo + bar } func (m *Minimal) HelloMore( // foo here foo, // bar here bar string, ) string { return foo + bar } func (m *Minimal) HelloMoreInline(opts struct{ // foo here foo, bar string }) string { return opts.foo + opts.bar } func (m *Minimal) HelloAgain( // docs for helloagain foo string, bar string, // docs for bar baz string, ) string { return foo + bar } func (m *Minimal) HelloFinal( foo string) string { // woops return foo } `, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(inspectModule).Stdout(ctx) require.NoError(t, err) obj := gjson.Get(out, "host.directory.asModule.objects.0.asObject") require.Equal(t, "Minimal", obj.Get("name").String()) require.Equal(t, "Minimal is a thing", obj.Get("description").String()) hello := obj.Get(`functions.#(name="hello")`) require.Equal(t, "hello", hello.Get("name").String()) require.Len(t, hello.Get("args").Array(), 5) require.Equal(t, "foo", hello.Get("args.0.name").String()) require.Equal(t, "", hello.Get("args.0.description").String()) require.Equal(t, "bar", hello.Get("args.1.name").String()) require.Equal(t, "", hello.Get("args.1.description").String()) require.Equal(t, "baz", hello.Get("args.2.name").String()) require.Equal(t, "hello", hello.Get("args.2.description").String()) require.Equal(t, "qux", hello.Get("args.3.name").String()) require.Equal(t, "", hello.Get("args.3.description").String()) require.Equal(t, "x", hello.Get("args.4.name").String()) require.Equal(t, "lol", hello.Get("args.4.description").String()) hello = obj.Get(`functions.#(name="helloMore")`) require.Equal(t, "helloMore", hello.Get("name").String()) require.Len(t, hello.Get("args").Array(), 2) require.Equal(t, "foo", hello.Get("args.0.name").String()) require.Equal(t, "foo here", hello.Get("args.0.description").String()) require.Equal(t, "bar", hello.Get("args.1.name").String()) require.Equal(t, "bar here", hello.Get("args.1.description").String()) hello = obj.Get(`functions.#(name="helloMoreInline")`) require.Equal(t, "helloMoreInline", hello.Get("name").String()) require.Len(t, hello.Get("args").Array(), 2) require.Equal(t, "foo", hello.Get("args.0.name").String()) require.Equal(t, "foo here", hello.Get("args.0.description").String()) require.Equal(t, "bar", hello.Get("args.1.name").String()) require.Equal(t, "", hello.Get("args.1.description").String()) hello = obj.Get(`functions.#(name="helloAgain")`) require.Equal(t, "helloAgain", hello.Get("name").String()) require.Len(t, hello.Get("args").Array(), 3) require.Equal(t, "foo", hello.Get("args.0.name").String()) require.Equal(t, "", hello.Get("args.0.description").String()) require.Equal(t, "bar", hello.Get("args.1.name").String()) require.Equal(t, "docs for bar", hello.Get("args.1.description").String()) require.Equal(t, "baz", hello.Get("args.2.name").String()) require.Equal(t, "", hello.Get("args.2.description").String()) hello = obj.Get(`functions.#(name="helloFinal")`) require.Equal(t, "helloFinal", hello.Get("name").String()) require.Len(t, hello.Get("args").Array(), 1) require.Equal(t, "foo", hello.Get("args.0.name").String()) require.Equal(t, "", hello.Get("args.0.description").String()) require.Len(t, obj.Get(`fields`).Array(), 2) prop := obj.Get(`fields.#(name="x")`) require.Equal(t, "x", prop.Get("name").String()) require.Equal(t, "X is this", prop.Get("description").String()) prop = obj.Get(`fields.#(name="y")`) require.Equal(t, "y", prop.Get("name").String()) require.Equal(t, "", prop.Get("description").String()) } func TestModuleGoWeirdFields(t *testing.T) { // these are all cases that used to panic due to the disparity in the type spec and the ast t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Z string type Minimal struct { // field with single (normal) name W string // field with multiple names X, Y string // field with no names Z } func New() Minimal { return Minimal{ W: "-", X: "-", Y: "-", Z: Z("-"), } } // struct with no fields type Bar struct{} func (m *Minimal) Say( // field with single (normal) name a string, // field with multiple names b, c string, // field with no names (not included, mixed names not allowed) // string ) string { return a + " " + b + " " + c } func (m *Minimal) Hello( // field with no names string, ) string { return "hello" } func (m *Minimal) SayOpts(opts struct{ // field with single (normal) name A string // field with multiple names B, C string // field with no names (not included because of above) // string }) string { return opts.A + " " + opts.B + " " + opts.C } func (m *Minimal) HelloOpts(opts struct{ // field with no names string }) string { return "hello" } `, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerQuery(`{minimal{w, x, y, z}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal": {"w": "-", "x": "-", "y": "-", "z": "-"}}`, out) for _, name := range []string{"say", "sayOpts"} { out, err := modGen.With(daggerQuery(`{minimal{%s(a: "hello", b: "world", c: "!")}}`, name)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, fmt.Sprintf(`{"minimal": {"%s": "hello world !"}}`, name), out) } for _, name := range []string{"hello", "helloOpts"} { out, err := modGen.With(daggerQuery(`{minimal{%s(string: "")}}`, name)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, fmt.Sprintf(`{"minimal": {"%s": "hello"}}`, name), out) } } func TestModuleGoOptionalMustBeNil(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Minimal struct {} func (m *Minimal) Foo(x *Optional[*string]) string { if v, _ := x.Get(); v != nil { panic("uh oh") } return "" } func (m *Minimal) Bar(opts struct { x *Optional[*string] }) string { if v, _ := opts.x.Get(); v != nil { panic("uh oh") } return "" } func (m *Minimal) Baz( // +optional x *string, ) string { if x != nil { panic("uh oh") } return "" } func (m *Minimal) Qux(opts struct { // +optional x *string }) string { if opts.x != nil { panic("uh oh") } return "" } `, }) logGen(ctx, t, modGen.Directory(".")) for _, name := range []string{"foo", "bar", "baz", "qux"} { out, err := modGen.With(daggerQuery(`{minimal{%s}}`, name)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, fmt.Sprintf(`{"minimal": {"%s": ""}}`, name), out) } } func TestModuleGoFieldMustBeNil(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main import "fmt" type Minimal struct { Src *Directory Name *string } func New() *Minimal { return &Minimal{} } func (m *Minimal) IsEmpty() bool { if m.Name != nil { panic(fmt.Sprintf("name should be nil but is %v", m.Name)) } if m.Src != nil { panic(fmt.Sprintf("src should be nil but is %v", m.Src)) } return true } `, }) out, err := modGen.With(daggerQuery(`{minimal{isEmpty}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal": {"isEmpty": true}}`, out) } func TestModulePrivateField(t *testing.T) { t.Parallel() c, ctx := connect(t) for _, tc := range []struct { sdk string source string }{ { sdk: "go", source: `package main type Minimal struct { Foo string Bar string // +private } func (m *Minimal) Set(foo string, bar string) *Minimal { m.Foo = foo m.Bar = bar return m } func (m *Minimal) Hello() string { return m.Foo + m.Bar } `, }, { sdk: "python", source: `from dagger import field, function, object_type @object_type class Minimal: foo: str = field(default="") bar: str = "" @function def set(self, foo: str, bar: str) -> "Minimal": self.foo = foo self.bar = bar return self @function def hello(self) -> str: return self.foo + self.bar `, }, } { tc := tc t.Run(tc.sdk, func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk="+tc.sdk)). With(sdkSource(tc.sdk, tc.source)) if tc.sdk == "go" { logGen(ctx, t, modGen.Directory(".")) } out, err := modGen.With(inspectModule).Stdout(ctx) require.NoError(t, err) obj := gjson.Get(out, "host.directory.asModule.objects.0.asObject") require.Equal(t, "Minimal", obj.Get("name").String()) require.Len(t, obj.Get(`fields`).Array(), 1) prop := obj.Get(`fields.#(name="foo")`) require.Equal(t, "foo", prop.Get("name").String()) out, err = modGen.With(daggerQuery(`{minimal{set(foo: "abc", bar: "xyz"){hello}}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"set":{"hello": "abcxyz"}}}`, out) out, err = modGen.With(daggerQuery(`{minimal{set(foo: "abc", bar: "xyz"){foo}}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"minimal":{"set":{"foo": "abc"}}}`, out) _, err = modGen.With(daggerQuery(`{minimal{set(foo: "abc", bar: "xyz"){bar}}}`)).Stdout(ctx) require.ErrorContains(t, err, `Cannot query field "bar"`) }) } } // this is no longer allowed, but verify the SDK errors out func TestModuleGoExtendCore(t *testing.T) { t.Parallel() var logs safeBuffer c, ctx := connect(t, dagger.WithLogOutput(&logs)) _, err := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main import "context" func (c *Container) Echo(ctx context.Context, msg string) (string, error) { return c.WithExec([]string{"echo", msg}).Stdout(ctx) } `, }). With(daggerExec("mod", "sync")). Sync(ctx) require.Error(t, err) require.NoError(t, c.Close()) require.Contains(t, logs.String(), "cannot define methods on objects from outside this module") } func TestModuleCustomTypes(t *testing.T) { t.Parallel() c, ctx := connect(t) type testCase struct { sdk string source string } for _, tc := range []testCase{ { sdk: "go", source: `package main import "strings" type Test struct{} func (m *Test) Repeater(msg string, times int) *Repeater { return &Repeater{ Message: msg, Times: times, } } type Repeater struct { Message string Times int } func (t *Repeater) Render() string { return strings.Repeat(t.Message, t.Times) } `, }, { sdk: "python", source: `from dagger import field, function, object_type @object_type class Repeater: message: str = field(default="") times: int = field(default=0) @function def render(self) -> str: return self.message * self.times @function def repeater(msg: str, times: int) -> Repeater: return Repeater(message=msg, times=times) `, }, } { tc := tc t.Run(fmt.Sprintf("custom %s types", tc.sdk), func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk="+tc.sdk)). With(sdkSource(tc.sdk, tc.source)) if tc.sdk == "go" { logGen(ctx, t, modGen.Directory(".")) } out, err := modGen.With(daggerQuery(`{test{repeater(msg:"echo!", times: 3){render}}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"test":{"repeater":{"render":"echo!echo!echo!"}}}`, out) }) } } func TestModuleReturnTypeDetection(t *testing.T) { t.Parallel() c, ctx := connect(t) type testCase struct { sdk string source string } for _, tc := range []testCase{ { sdk: "go", source: `package main type Foo struct {} type X struct { Message string ` + "`json:\"message\"`" + ` } func (m *Foo) MyFunction() X { return X{Message: "foo"} } `, }, { sdk: "python", source: `from dagger import field, function, object_type @object_type class X: message: str = field(default="") @function def my_function() -> X: return X(message="foo") `, }, } { tc := tc t.Run(tc.sdk, func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=foo", "--sdk="+tc.sdk)). With(sdkSource(tc.sdk, tc.source)) if tc.sdk == "go" { logGen(ctx, t, modGen.Directory(".")) } out, err := modGen.With(daggerQuery(`{foo{myFunction{message}}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"foo":{"myFunction":{"message":"foo"}}}`, out) }) } } func TestModuleReturnObject(t *testing.T) { t.Parallel() c, ctx := connect(t) type testCase struct { sdk string source string } for _, tc := range []testCase{ { sdk: "go", source: `package main type Foo struct {} type X struct { Message string ` + "`json:\"message\"`" + ` When string ` + "`json:\"Timestamp\"`" + ` To string ` + "`json:\"recipient\"`" + ` From string } func (m *Foo) MyFunction() X { return X{Message: "foo", When: "now", To: "user", From: "admin"} } `, }, { sdk: "python", source: `from dagger import field, function, object_type @object_type class X: message: str = field(default="") when: str = field(default="", name="Timestamp") to: str = field(default="", name="recipient") from_: str = field(default="", name="from") @object_type class Foo: @function def my_function(self) -> X: return X(message="foo", when="now", to="user", from_="admin") `, }, } { tc := tc t.Run(tc.sdk, func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=foo", "--sdk="+tc.sdk)). With(sdkSource(tc.sdk, tc.source)) if tc.sdk == "go" { logGen(ctx, t, modGen.Directory(".")) } out, err := modGen.With(daggerQuery(`{foo{myFunction{message, recipient, from, timestamp}}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"foo":{"myFunction":{"message":"foo", "recipient":"user", "from":"admin", "timestamp":"now"}}}`, out) }) } } func TestModuleReturnNestedObject(t *testing.T) { t.Parallel() c, ctx := connect(t) type testCase struct { sdk string source string } for _, tc := range []testCase{ { sdk: "go", source: `package main type Playground struct{} type Foo struct { MsgContainer Bar } type Bar struct { Msg string } func (m *Playground) MyFunction() Foo { return Foo{MsgContainer: Bar{Msg: "hello world"}} } `, }, { sdk: "python", source: `from dagger import field, function, object_type @object_type class Bar: msg: str = field() @object_type class Foo: msg_container: Bar = field() @object_type class Playground: @function def my_function(self) -> Foo: return Foo(msg_container=Bar(msg="hello world")) `, }, } { tc := tc t.Run(tc.sdk, func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=playground", "--sdk="+tc.sdk)). With(sdkSource(tc.sdk, tc.source)) if tc.sdk == "go" { logGen(ctx, t, modGen.Directory(".")) } out, err := modGen.With(daggerQuery(`{playground{myFunction{msgContainer{msg}}}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"playground":{"myFunction":{"msgContainer":{"msg": "hello world"}}}}`, out) }) } } func TestModuleReturnCompositeCore(t *testing.T) { t.Parallel() c, ctx := connect(t) type testCase struct { sdk string source string } for _, tc := range []testCase{ { sdk: "go", source: `package main type Playground struct{} func (m *Playground) MySlice() []*Container { return []*Container{dag.Container().From("alpine:latest").WithExec([]string{"echo", "hello world"})} } type Foo struct { Con *Container // verify fields can remain nil w/out error too UnsetFile *File } func (m *Playground) MyStruct() *Foo { return &Foo{Con: dag.Container().From("alpine:latest").WithExec([]string{"echo", "hello world"})} } `, }, { sdk: "python", source: `import dagger from dagger import dag, field, function, object_type @object_type class Foo: con: dagger.Container = field() unset_file: dagger.File | None = field(default=None) @object_type class Playground: @function def my_slice(self) -> list[dagger.Container]: return [dag.container().from_("alpine:latest").with_exec(["echo", "hello world"])] @function def my_struct(self) -> Foo: return Foo(con=dag.container().from_("alpine:latest").with_exec(["echo", "hello world"])) `, }, } { tc := tc t.Run(tc.sdk, func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=playground", "--sdk="+tc.sdk)). With(sdkSource(tc.sdk, tc.source)) if tc.sdk == "go" { logGen(ctx, t, modGen.Directory(".")) } out, err := modGen.With(daggerQuery(`{playground{mySlice{stdout}}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"playground":{"mySlice":[{"stdout":"hello world\n"}]}}`, out) out, err = modGen.With(daggerQuery(`{playground{myStruct{con{stdout}}}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"playground":{"myStruct":{"con":{"stdout":"hello world\n"}}}}`, out) }) } } func TestModuleReturnComplexThing(t *testing.T) { t.Parallel() c, ctx := connect(t) type testCase struct { sdk string source string } for _, tc := range []testCase{ { sdk: "go", source: `package main type Playground struct{} type ScanResult struct { Containers []*Container ` + "`json:\"targets\"`" + ` Report ScanReport } type ScanReport struct { Contents string ` + "`json:\"contents\"`" + ` Authors []string ` + "`json:\"Authors\"`" + ` } func (m *Playground) Scan() ScanResult { return ScanResult{ Containers: []*Container{ dag.Container().From("alpine:latest").WithExec([]string{"echo", "hello world"}), }, Report: ScanReport{ Contents: "hello world", Authors: []string{"foo", "bar"}, }, } } `, }, { sdk: "python", source: `import dagger from dagger import dag, field, function, object_type @object_type class ScanReport: contents: str = field() authors: list[str] = field() @object_type class ScanResult: containers: list[dagger.Container] = field(name="targets") report: ScanReport = field() @object_type class Playground: @function def scan(self) -> ScanResult: return ScanResult( containers=[ dag.container().from_("alpine:latest").with_exec(["echo", "hello world"]), ], report=ScanReport( contents="hello world", authors=["foo", "bar"], ), ) `, }, } { tc := tc t.Run(tc.sdk, func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=playground", "--sdk="+tc.sdk)). With(sdkSource(tc.sdk, tc.source)) if tc.sdk == "go" { logGen(ctx, t, modGen.Directory(".")) } out, err := modGen.With(daggerQuery(`{playground{scan{targets{stdout},report{contents,authors}}}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"playground":{"scan":{"targets":[{"stdout":"hello world\n"}],"report":{"contents":"hello world","authors":["foo","bar"]}}}}`, out) }) } } func TestModulePythonReturnSelf(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=foo", "--sdk=python")). WithNewFile("src/main.py", dagger.ContainerWithNewFileOpts{ Contents: `from typing import Self from dagger import field, function, object_type @object_type class Foo: message: str = field(default="") @function def bar(self) -> Self: self.message = "foobar" return self `, }) out, err := modGen.With(daggerQuery(`{foo{bar{message}}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"foo":{"bar":{"message":"foobar"}}}`, out) } func TestModuleGlobalVarDAG(t *testing.T) { t.Parallel() c, ctx := connect(t) type testCase struct { sdk string source string } for _, tc := range []testCase{ { sdk: "go", source: `package main import "context" type Foo struct {} var someDefault = dag.Container().From("alpine:latest") func (m *Foo) Fn(ctx context.Context) (string, error) { return someDefault.WithExec([]string{"echo", "foo"}).Stdout(ctx) } `, }, { sdk: "python", source: `from dagger import dag, function, object_type SOME_DEFAULT = dag.container().from_("alpine:latest") @object_type class Foo: @function async def fn(self) -> str: return await SOME_DEFAULT.with_exec(["echo", "foo"]).stdout() `, }, } { tc := tc t.Run(tc.sdk, func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=foo", "--sdk="+tc.sdk)). With(sdkSource(tc.sdk, tc.source)) if tc.sdk == "go" { logGen(ctx, t, modGen.Directory(".")) } out, err := modGen.With(daggerQuery(`{foo{fn}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"foo":{"fn":"foo\n"}}`, out) }) } } func TestModuleIDableType(t *testing.T) { t.Parallel() c, ctx := connect(t) type testCase struct { sdk string source string } for _, tc := range []testCase{ { sdk: "go", source: `package main type Foo struct { Data string } func (m *Foo) Set(data string) *Foo { m.Data = data return m } func (m *Foo) Get() string { return m.Data } `, }, { sdk: "python", source: `from typing import Self from dagger import field, function, object_type @object_type class Foo: data: str = "" @function def set(self, data: str) -> Self: self.data = data return self @function def get(self) -> str: return self.data `, }, } { tc := tc t.Run(tc.sdk, func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=foo", "--sdk="+tc.sdk)). With(sdkSource(tc.sdk, tc.source)) if tc.sdk == "go" { logGen(ctx, t, modGen.Directory(".")) } // sanity check out, err := modGen.With(daggerQuery(`{foo{set(data: "abc"){get}}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"foo":{"set":{"get": "abc"}}}`, out) out, err = modGen.With(daggerQuery(`{foo{set(data: "abc"){id}}}`)).Stdout(ctx) require.NoError(t, err) id := gjson.Get(out, "foo.set.id").String() require.Contains(t, id, "moddata:") out, err = modGen.With(daggerQuery(`{loadFooFromID(id: "%s"){get}}`, id)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"loadFooFromID":{"get": "abc"}}`, out) }) } } func TestModuleArgOwnType(t *testing.T) { // Verify use of a module's own object as an argument type. // The server needs to specifically decode the input type from an ID into // the raw JSON, since the module doesn't understand it's own types as IDs t.Parallel() c, ctx := connect(t) type testCase struct { sdk string source string } for _, tc := range []testCase{ { sdk: "go", source: `package main import "strings" type Foo struct{} type Message struct { Content string } func (m *Foo) SayHello(name string) Message { return Message{Content: "hello " + name} } func (m *Foo) Upper(msg Message) Message { msg.Content = strings.ToUpper(msg.Content) return msg } func (m *Foo) Uppers(msg []Message) []Message { for i := range msg { msg[i].Content = strings.ToUpper(msg[i].Content) } return msg }`, }, { sdk: "python", source: `from dagger import field, function, object_type @object_type class Message: content: str = field() @object_type class Foo: @function def say_hello(self, name: str) -> Message: return Message(content=f"hello {name}") @function def upper(self, msg: Message) -> Message: msg.content = msg.content.upper() return msg @function def uppers(self, msg: list[Message]) -> list[Message]: for m in msg: m.content = m.content.upper() return msg `, }, } { tc := tc t.Run(tc.sdk, func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=foo", "--sdk="+tc.sdk)). With(sdkSource(tc.sdk, tc.source)) if tc.sdk == "go" { logGen(ctx, t, modGen.Directory(".")) } out, err := modGen.With(daggerQuery(`{foo{sayHello(name: "world"){id}}}`)).Stdout(ctx) require.NoError(t, err) id := gjson.Get(out, "foo.sayHello.id").String() require.Contains(t, id, "moddata:") out, err = modGen.With(daggerQuery(`{foo{upper(msg:"%s"){content}}}`, id)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"foo":{"upper":{"content": "HELLO WORLD"}}}`, out) out, err = modGen.With(daggerQuery(`{foo{uppers(msg:["%s", "%s"]){content}}}`, id, id)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"foo":{"uppers":[{"content": "HELLO WORLD"}, {"content": "HELLO WORLD"}]}}`, out) }) } } func TestModuleConflictingSameNameDeps(t *testing.T) { // A -> B -> Dint // A -> C -> Dstr // where Dint and Dstr are modules with the same name and same object names but conflicting types t.Parallel() c, ctx := connect(t) ctr := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/dstr"). With(daggerExec("mod", "init", "--name=d", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type D struct{} type Obj struct { Foo string } func (m *D) Fn(foo string) Obj { return Obj{Foo: foo} } `, }) ctr = ctr. WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/dint"). With(daggerExec("mod", "init", "--name=d", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type D struct{} type Obj struct { Foo int } func (m *D) Fn(foo int) Obj { return Obj{Foo: foo} } `, }) ctr = ctr. WithWorkdir("/work/c"). With(daggerExec("mod", "init", "--name=c", "--sdk=go", "--root=..")). With(daggerExec("mod", "install", "../dstr")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main import ( "context" ) type C struct{} func (m *C) Fn(ctx context.Context, foo string) (string, error) { return dag.D().Fn(foo).Foo(ctx) } `, }) ctr = ctr. WithWorkdir("/work/b"). With(daggerExec("mod", "init", "--name=b", "--sdk=go", "--root=..")). With(daggerExec("mod", "install", "../dint")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main import ( "context" ) type B struct{} func (m *B) Fn(ctx context.Context, foo int) (int, error) { return dag.D().Fn(foo).Foo(ctx) } `, }) ctr = ctr. WithWorkdir("/work/a"). With(daggerExec("mod", "init", "--name=a", "--sdk=go", "--root=..")). With(daggerExec("mod", "install", "../b")). With(daggerExec("mod", "install", "../c")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main import ( "context" "strconv" ) type A struct{} func (m *A) Fn(ctx context.Context) (string, error) { fooStr, err := dag.C().Fn(ctx, "foo") if err != nil { return "", err } fooInt, err := dag.B().Fn(ctx, 123) if err != nil { return "", err } return fooStr + strconv.Itoa(fooInt), nil } `, }) out, err := ctr.With(daggerQuery(`{a{fn}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"a":{"fn": "foo123"}}`, out) // verify that no types from (transitive) deps show up types := currentSchema(ctx, t, ctr).Types require.NotNil(t, types.Get("A")) require.Nil(t, types.Get("B")) require.Nil(t, types.Get("C")) require.Nil(t, types.Get("D")) } func TestModuleSelfAPICall(t *testing.T) { t.Parallel() c, ctx := connect(t) out, err := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main import ( "context" "github.com/Khan/genqlient/graphql" ) type Test struct{} func (m *Test) FnA(ctx context.Context) (string, error) { resp := &graphql.Response{} err := dag.c.MakeRequest(ctx, &graphql.Request{ Query: "{test{fnB}}", }, resp) if err != nil { return "", err } return resp.Data.(map[string]any)["test"].(map[string]any)["fnB"].(string), nil } func (m *Test) FnB() string { return "hi from b" } `, }). With(daggerQuery(`{test{fnA}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"test":{"fnA": "hi from b"}}`, out) } func TestModuleGoWithOtherModuleTypes(t *testing.T) { t.Parallel() c, ctx := connect(t) ctr := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/dep"). With(daggerExec("mod", "init", "--name=dep", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Dep struct{} type Obj struct { Foo string } func (m *Dep) Fn() Obj { return Obj{Foo: "foo"} } `, }). WithWorkdir("/work/test"). With(daggerExec("mod", "init", "--name=test", "--sdk=go", "--root=..")). With(daggerExec("mod", "install", "../dep")) t.Run("return as other module object", func(t *testing.T) { t.Parallel() t.Run("direct", func(t *testing.T) { t.Parallel() _, err := ctr. WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Test struct{} func (m *Test) Fn() (*DepObj, error) { return nil, nil } `, }). With(daggerFunctions()). Stdout(ctx) require.Error(t, err) require.ErrorContains(t, err, fmt.Sprintf( "object %q function %q cannot return external type from dependency module %q", "Test", "Fn", "dep", )) }) t.Run("list", func(t *testing.T) { t.Parallel() _, err := ctr. WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Test struct{} func (m *Test) Fn() ([]*DepObj, error) { return nil, nil } `, }). With(daggerFunctions()). Stdout(ctx) require.Error(t, err) require.ErrorContains(t, err, fmt.Sprintf( "object %q function %q cannot return external type from dependency module %q", "Test", "Fn", "dep", )) }) }) t.Run("arg as other module object", func(t *testing.T) { t.Parallel() t.Run("direct", func(t *testing.T) { t.Parallel() _, err := ctr.WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Test struct{} func (m *Test) Fn(obj *DepObj) error { return nil } `, }). With(daggerFunctions()). Stdout(ctx) require.Error(t, err) require.ErrorContains(t, err, fmt.Sprintf( "object %q function %q arg %q cannot reference external type from dependency module %q", "Test", "Fn", "obj", "dep", )) }) t.Run("list", func(t *testing.T) { t.Parallel() _, err := ctr.WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Test struct{} func (m *Test) Fn(obj []*DepObj) error { return nil } `, }). With(daggerFunctions()). Stdout(ctx) require.Error(t, err) require.ErrorContains(t, err, fmt.Sprintf( "object %q function %q arg %q cannot reference external type from dependency module %q", "Test", "Fn", "obj", "dep", )) }) }) t.Run("field as other module object", func(t *testing.T) { t.Parallel() t.Run("direct", func(t *testing.T) { t.Parallel() _, err := ctr. WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Test struct{} type Obj struct { Foo *DepObj } func (m *Test) Fn() (*Obj, error) { return nil, nil } `, }). With(daggerFunctions()). Stdout(ctx) require.Error(t, err) require.ErrorContains(t, err, fmt.Sprintf( "object %q field %q cannot reference external type from dependency module %q", "Obj", "Foo", "dep", )) }) t.Run("list", func(t *testing.T) { t.Parallel() _, err := ctr. WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Test struct{} type Obj struct { Foo []*DepObj } func (m *Test) Fn() (*Obj, error) { return nil, nil } `, }). With(daggerFunctions()). Stdout(ctx) require.Error(t, err) require.ErrorContains(t, err, fmt.Sprintf( "object %q field %q cannot reference external type from dependency module %q", "Obj", "Foo", "dep", )) }) }) } func TestModulePythonWithOtherModuleTypes(t *testing.T) { t.Parallel() c, ctx := connect(t) ctr := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/dep"). With(daggerExec("mod", "init", "--name=dep", "--sdk=python")). WithNewFile("src/main.py", dagger.ContainerWithNewFileOpts{ Contents: `from dagger import field, function, object_type @object_type class Foo: ... @object_type class Obj: foo: str = field() @object_type class Dep: @function def fn(self) -> Obj: return Obj(foo="foo") `, }). WithWorkdir("/work/test"). With(daggerExec("mod", "init", "--name=test", "--sdk=python", "--root=..")). With(daggerExec("mod", "install", "../dep")) t.Run("return as other module object", func(t *testing.T) { t.Parallel() t.Run("direct", func(t *testing.T) { t.Parallel() _, err := ctr. WithNewFile("src/main.py", dagger.ContainerWithNewFileOpts{ Contents: `import dagger @dagger.object_type class Test: @dagger.function def fn(self) -> dagger.DepObj: ... `, }). With(daggerFunctions()). Stdout(ctx) require.Error(t, err) require.ErrorContains(t, err, fmt.Sprintf( "object %q function %q cannot return external type from dependency module %q", "Test", "fn", "dep", )) }) t.Run("list", func(t *testing.T) { t.Parallel() _, err := ctr. WithNewFile("src/main.py", dagger.ContainerWithNewFileOpts{ Contents: `import dagger @dagger.object_type class Test: @dagger.function def fn(self) -> list[dagger.DepObj]: ... `, }). With(daggerFunctions()). Stdout(ctx) require.Error(t, err) require.ErrorContains(t, err, fmt.Sprintf( "object %q function %q cannot return external type from dependency module %q", "Test", "fn", "dep", )) }) }) t.Run("arg as other module object", func(t *testing.T) { t.Parallel() t.Run("direct", func(t *testing.T) { t.Parallel() _, err := ctr.WithNewFile("src/main.py", dagger.ContainerWithNewFileOpts{ Contents: `import dagger @dagger.object_type class Test: @dagger.function def fn(self, obj: dagger.DepObj): ... `, }). With(daggerFunctions()). Stdout(ctx) require.Error(t, err) require.ErrorContains(t, err, fmt.Sprintf( "object %q function %q arg %q cannot reference external type from dependency module %q", "Test", "fn", "obj", "dep", )) }) t.Run("list", func(t *testing.T) { t.Parallel() _, err := ctr.WithNewFile("src/main.py", dagger.ContainerWithNewFileOpts{ Contents: `import dagger @dagger.object_type class Test: @dagger.function def fn(self, obj: list[dagger.DepObj]): ... `, }). With(daggerFunctions()). Stdout(ctx) require.Error(t, err) require.ErrorContains(t, err, fmt.Sprintf( "object %q function %q arg %q cannot reference external type from dependency module %q", "Test", "fn", "obj", "dep", )) }) }) t.Run("field as other module object", func(t *testing.T) { t.Parallel() t.Run("direct", func(t *testing.T) { t.Parallel() _, err := ctr. WithNewFile("src/main.py", dagger.ContainerWithNewFileOpts{ Contents: `import dagger @dagger.object_type class Obj: foo: dagger.DepObj = dagger.field() @dagger.object_type class Test: @dagger.function def fn(self) -> Obj: ... `, }). With(daggerFunctions()). Stdout(ctx) require.Error(t, err) require.ErrorContains(t, err, fmt.Sprintf( "object %q field %q cannot reference external type from dependency module %q", "Obj", "foo", "dep", )) }) t.Run("list", func(t *testing.T) { t.Parallel() _, err := ctr. WithNewFile("src/main.py", dagger.ContainerWithNewFileOpts{ Contents: `import dagger @dagger.object_type class Obj: foo: list[dagger.DepObj] = dagger.field() @dagger.object_type class Test: @dagger.function def fn(self) -> list[Obj]: ... `, }). With(daggerFunctions()). Stdout(ctx) require.Error(t, err) require.ErrorContains(t, err, fmt.Sprintf( "object %q field %q cannot reference external type from dependency module %q", "Obj", "foo", "dep", )) }) }) } var useInner = `package main type Dep struct{} func (m *Dep) Hello() string { return "hello" } ` var useGoOuter = `package main import "context" type Use struct{} func (m *Use) UseHello(ctx context.Context) (string, error) { return dag.Dep().Hello(ctx) } ` var usePythonOuter = `from dagger import dag, function @function def use_hello() -> str: return dag.dep().hello() ` func TestModuleUseLocal(t *testing.T) { t.Parallel() c, ctx := connect(t) type testCase struct { sdk string source string } for _, tc := range []testCase{ { sdk: "go", source: useGoOuter, }, { sdk: "python", source: usePythonOuter, }, } { tc := tc t.Run(fmt.Sprintf("%s uses go", tc.sdk), func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/dep"). With(daggerExec("mod", "init", "--name=dep", "--sdk=go")). With(sdkSource("go", useInner)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=use", "--sdk="+tc.sdk)). With(sdkSource(tc.sdk, tc.source)). With(daggerExec("mod", "install", "./dep")) if tc.sdk == "go" { logGen(ctx, t, modGen.Directory(".")) } out, err := modGen.With(daggerQuery(`{use{useHello}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"use":{"useHello":"hello"}}`, out) // cannot use transitive dependency directly _, err = modGen.With(daggerQuery(`{dep{hello}}`)).Stdout(ctx) require.Error(t, err) require.ErrorContains(t, err, `Cannot query field "dep" on type "Query".`) }) } } func TestModuleCodegenOnDepChange(t *testing.T) { t.Parallel() c, ctx := connect(t) type testCase struct { sdk string source string changed string expected string } for _, tc := range []testCase{ { sdk: "go", source: useGoOuter, expected: "Hellov2", changed: strings.ReplaceAll(useGoOuter, `Hello(ctx)`, `Hellov2(ctx)`), }, { sdk: "python", source: usePythonOuter, expected: "hellov2", changed: strings.ReplaceAll(usePythonOuter, `.hello()`, `.hellov2()`), }, } { tc := tc t.Run(fmt.Sprintf("%s uses go", tc.sdk), func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/dep"). With(daggerExec("mod", "init", "--name=dep", "--sdk=go")). With(sdkSource("go", useInner)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=use", "--sdk="+tc.sdk)). With(sdkSource(tc.sdk, tc.source)). With(daggerExec("mod", "install", "./dep")) if tc.sdk == "go" { logGen(ctx, t, modGen.Directory(".")) } out, err := modGen.With(daggerQuery(`{use{useHello}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"use":{"useHello":"hello"}}`, out) // make back-incompatible change to dep newInner := strings.ReplaceAll(useInner, `Hello()`, `Hellov2()`) modGen = modGen. WithWorkdir("/work/dep"). With(sdkSource("go", newInner)). WithWorkdir("/work"). With(daggerExec("mod", "sync")) codegenContents, err := modGen.File(sdkCodegenFile(t, tc.sdk)).Contents(ctx) require.NoError(t, err) require.Contains(t, codegenContents, tc.expected) modGen = modGen.With(sdkSource(tc.sdk, tc.changed)) out, err = modGen.With(daggerQuery(`{use{useHello}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"use":{"useHello":"hello"}}`, out) }) } } func TestModuleSyncDeps(t *testing.T) { // verify that changes to deps result in a sync to the depender module t.Parallel() c, ctx := connect(t) type testCase struct { sdk string source string } for _, tc := range []testCase{ { sdk: "go", source: useGoOuter, }, { sdk: "python", source: usePythonOuter, }, } { tc := tc t.Run(fmt.Sprintf("%s uses go", tc.sdk), func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/dep"). With(daggerExec("mod", "init", "--name=dep", "--sdk=go")). With(sdkSource("go", useInner)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=use", "--sdk="+tc.sdk)). With(sdkSource(tc.sdk, tc.source)). With(daggerExec("mod", "install", "./dep")) if tc.sdk == "go" { logGen(ctx, t, modGen.Directory(".")) } modGen = modGen.With(daggerQuery(`{use{useHello}}`)) out, err := modGen.Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"use":{"useHello":"hello"}}`, out) newInner := strings.ReplaceAll(useInner, `"hello"`, `"goodbye"`) modGen = modGen. WithWorkdir("/work/dep"). With(sdkSource("go", newInner)). WithWorkdir("/work"). With(daggerExec("mod", "sync")) if tc.sdk == "go" { logGen(ctx, t, modGen.Directory(".")) } out, err = modGen.With(daggerQuery(`{use{useHello}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"use":{"useHello":"goodbye"}}`, out) }) } } func TestModuleUseLocalMulti(t *testing.T) { t.Parallel() c, ctx := connect(t) type testCase struct { sdk string source string } for _, tc := range []testCase{ { sdk: "go", source: `package main import "context" import "fmt" type Use struct {} func (m *Use) Names(ctx context.Context) ([]string, error) { fooName, err := dag.Foo().Name(ctx) if err != nil { return nil, fmt.Errorf("foo.name: %w", err) } barName, err := dag.Bar().Name(ctx) if err != nil { return nil, fmt.Errorf("bar.name: %w", err) } return []string{fooName, barName}, nil } `, }, { sdk: "python", source: `from dagger import dag, function @function async def names() -> list[str]: return [ await dag.foo().name(), await dag.bar().name(), ] `, }, } { tc := tc t.Run(fmt.Sprintf("%s uses go", tc.sdk), func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/foo"). WithNewFile("/work/foo/main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Foo struct {} func (m *Foo) Name() string { return "foo" } `, }). With(daggerExec("mod", "init", "--name=foo", "--sdk=go")). WithWorkdir("/work/bar"). WithNewFile("/work/bar/main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Bar struct {} func (m *Bar) Name() string { return "bar" } `, }). With(daggerExec("mod", "init", "--name=bar", "--sdk=go")). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=use", "--sdk="+tc.sdk)). With(daggerExec("mod", "install", "./foo")). With(daggerExec("mod", "install", "./bar")). With(sdkSource(tc.sdk, tc.source)). WithEnvVariable("BUST", identity.NewID()) // NB(vito): hmm... if tc.sdk == "go" { logGen(ctx, t, modGen.Directory(".")) } out, err := modGen.With(daggerQuery(`{use{names}}`)).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"use":{"names":["foo", "bar"]}}`, out) }) } } func TestModuleConstructor(t *testing.T) { t.Parallel() c, ctx := connect(t) type testCase struct { sdk string source string } t.Run("basic", func(t *testing.T) { t.Parallel() for _, tc := range []testCase{ { sdk: "go", source: `package main import ( "context" ) func New( ctx context.Context, foo string, bar Optional[int], baz []string, dir *Directory, ) *Test { return &Test{ Foo: foo, Bar: bar.GetOr(42), Baz: baz, Dir: dir, } } type Test struct { Foo string Bar int Baz []string Dir *Directory NeverSetDir *Directory } func (m *Test) GimmeFoo() string { return m.Foo } func (m *Test) GimmeBar() int { return m.Bar } func (m *Test) GimmeBaz() []string { return m.Baz } func (m *Test) GimmeDirEnts(ctx context.Context) ([]string, error) { return m.Dir.Entries(ctx) } `, }, { sdk: "python", source: `import dagger from dagger import field, function, object_type @object_type class Test: foo: str = field() dir: dagger.Directory = field() bar: int = field(default=42) baz: list[str] = field(default=list) never_set_dir: dagger.Directory | None = field(default=None) @function def gimme_foo(self) -> str: return self.foo @function def gimme_bar(self) -> int: return self.bar @function def gimme_baz(self) -> list[str]: return self.baz @function async def gimme_dir_ents(self) -> list[str]: return await self.dir.entries() `, }, } { tc := tc t.Run(tc.sdk, func(t *testing.T) { t.Parallel() ctr := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/test"). With(daggerExec("mod", "init", "--name=test", "--sdk="+tc.sdk)). With(sdkSource(tc.sdk, tc.source)) out, err := ctr.With(daggerCall("--foo=abc", "--baz=x,y,z", "--dir=.", "foo")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "abc") out, err = ctr.With(daggerCall("--foo=abc", "--baz=x,y,z", "--dir=.", "gimme-foo")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "abc") out, err = ctr.With(daggerCall("--foo=abc", "--baz=x,y,z", "--dir=.", "bar")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "42") out, err = ctr.With(daggerCall("--foo=abc", "--baz=x,y,z", "--dir=.", "gimme-bar")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "42") out, err = ctr.With(daggerCall("--foo=abc", "--bar=123", "--baz=x,y,z", "--dir=.", "bar")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "123") out, err = ctr.With(daggerCall("--foo=abc", "--bar=123", "--baz=x,y,z", "--dir=.", "gimme-bar")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "123") out, err = ctr.With(daggerCall("--foo=abc", "--bar=123", "--baz=x,y,z", "--dir=.", "baz")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "x\ny\nz") out, err = ctr.With(daggerCall("--foo=abc", "--bar=123", "--baz=x,y,z", "--dir=.", "gimme-baz")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "x\ny\nz") out, err = ctr.With(daggerCall("--foo=abc", "--bar=123", "--baz=x,y,z", "--dir=.", "gimme-dir-ents")).Stdout(ctx) require.NoError(t, err) require.Contains(t, strings.TrimSpace(out), "dagger.json") }) } }) t.Run("fields only", func(t *testing.T) { t.Parallel() for _, tc := range []testCase{ { sdk: "go", source: `package main import ( "context" ) func New(ctx context.Context) (Test, error) { v, err := dag.Container().From("alpine:3.18.4").File("/etc/alpine-release").Contents(ctx) if err != nil { return Test{}, err } return Test{ AlpineVersion: v, }, nil } type Test struct { AlpineVersion string } `, }, { sdk: "python", source: `from dagger import dag, field, function, object_type @object_type class Test: alpine_version: str = field() @classmethod async def create(cls) -> "Test": return cls(alpine_version=await ( dag.container() .from_("alpine:3.18.4") .file("/etc/alpine-release") .contents() )) `, }, } { tc := tc t.Run(tc.sdk, func(t *testing.T) { t.Parallel() ctr := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/test"). With(daggerExec("mod", "init", "--name=test", "--sdk="+tc.sdk)). With(sdkSource(tc.sdk, tc.source)) out, err := ctr.With(daggerCall("alpine-version")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "3.18.4") }) } }) t.Run("return error", func(t *testing.T) { t.Parallel() for _, tc := range []testCase{ { sdk: "go", source: `package main import ( "fmt" ) func New() (*Test, error) { return nil, fmt.Errorf("too bad") } type Test struct { Foo string } `, }, { sdk: "python", source: `from dagger import object_type, field @object_type class Test: foo: str = field() def __init__(self): raise ValueError("too bad") `, }, } { tc := tc t.Run(tc.sdk, func(t *testing.T) { t.Parallel() var logs safeBuffer c, ctx := connect(t, dagger.WithLogOutput(&logs)) ctr := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/test"). With(daggerExec("mod", "init", "--name=test", "--sdk="+tc.sdk)). With(sdkSource(tc.sdk, tc.source)) _, err := ctr.With(daggerCall("foo")).Stdout(ctx) require.Error(t, err) require.Contains(t, logs.String(), "too bad") }) } }) t.Run("python: with default factory", func(t *testing.T) { t.Parallel() content := identity.NewID() ctr := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/test"). With(daggerExec("mod", "init", "--name=test", "--sdk=python")). With(sdkSource("python", fmt.Sprintf(`import dagger from dagger import dag, object_type, field @object_type class Test: foo: dagger.File = field(default=lambda: ( dag.directory() .with_new_file("foo.txt", contents="%s") .file("foo.txt") )) bar: list[str] = field(default=list) `, content), )) out, err := ctr.With(daggerCall("foo")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), content) out, err = ctr.With(daggerCall("--foo=dagger.json", "foo")).Stdout(ctx) require.NoError(t, err) require.Contains(t, out, `"sdk": "python"`) _, err = ctr.With(daggerCall("bar")).Sync(ctx) require.NoError(t, err) }) } func TestModuleWrapping(t *testing.T) { t.Parallel() c, ctx := connect(t) type testCase struct { sdk string source string } for _, tc := range []testCase{ { sdk: "go", source: `package main type Wrapper struct{} func (m *Wrapper) Container() *WrappedContainer { return &WrappedContainer{ dag.Container().From("alpine"), } } type WrappedContainer struct { Unwrap *Container` + "`" + `json:"unwrap"` + "`" + ` } func (c *WrappedContainer) Echo(msg string) *WrappedContainer { return &WrappedContainer{ c.Unwrap.WithExec([]string{"echo", "-n", msg}), } } `, }, { sdk: "python", source: `from typing import Self import dagger from dagger import dag, field, function, object_type @object_type class WrappedContainer: unwrap: dagger.Container = field() @function def echo(self, msg: str) -> Self: return WrappedContainer(unwrap=self.unwrap.with_exec(["echo", "-n", msg])) @object_type class Wrapper: @function def container(self) -> WrappedContainer: return WrappedContainer(unwrap=dag.container().from_("alpine")) `, }, } { tc := tc t.Run(tc.sdk, func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=wrapper", "--sdk="+tc.sdk)). With(sdkSource(tc.sdk, tc.source)) if tc.sdk == "go" { logGen(ctx, t, modGen.Directory(".")) } id := identity.NewID() out, err := modGen.With(daggerQuery( fmt.Sprintf(`{wrapper{container{echo(msg:%q){unwrap{stdout}}}}}`, id), )).Stdout(ctx) require.NoError(t, err) require.JSONEq(t, fmt.Sprintf(`{"wrapper":{"container":{"echo":{"unwrap":{"stdout":%q}}}}}`, id), out) }) } } func TestModuleConfigAPI(t *testing.T) { t.Parallel() c, ctx := connect(t) moduleDir := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/subdir"). With(daggerExec("mod", "init", "--name=test", "--sdk=go", "--root=..")). Directory("/work") cfg := c.ModuleConfig(moduleDir, dagger.ModuleConfigOpts{Subpath: "subdir"}) name, err := cfg.Name(ctx) require.NoError(t, err) require.Equal(t, "test", name) sdk, err := cfg.SDK(ctx) require.NoError(t, err) require.Equal(t, "go", sdk) root, err := cfg.Root(ctx) require.NoError(t, err) require.Equal(t, "..", root) } func TestModuleTypescriptInit(t *testing.T) { t.Run("from scratch", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=bare", "--sdk=typescript")) out, err := modGen. With(daggerQuery(`{bare{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"bare":{"containerEcho":{"stdout":"hello\n"}}}`, out) }) t.Run("with different root", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/child"). With(daggerExec("mod", "init", "--name=bare", "--sdk=typescript", "--root=..")) out, err := modGen. With(daggerQuery(`{bare{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"bare":{"containerEcho":{"stdout":"hello\n"}}}`, out) }) t.Run("camel-cases Dagger module name", func(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=My-Module", "--sdk=go")) out, err := modGen. With(daggerQuery(`{myModule{containerEcho(stringArg:"hello"){stdout}}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"myModule":{"containerEcho":{"stdout":"hello\n"}}}`, out) }) } func TestModuleLotsOfFunctions(t *testing.T) { t.Parallel() const funcCount = 100 t.Run("go sdk", func(t *testing.T) { t.Parallel() c, ctx := connect(t) mainSrc := ` package main type PotatoSack struct {} ` for i := 0; i < funcCount; i++ { mainSrc += fmt.Sprintf(` func (m *PotatoSack) Potato%d() string { return "potato #%d" } `, i, i) } modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: mainSrc, }). With(daggerExec("mod", "init", "--name=potatoSack", "--sdk=go")) logGen(ctx, t, modGen.Directory(".")) var eg errgroup.Group for i := 0; i < funcCount; i++ { i := i // just verify a subset work if i%10 != 0 { continue } eg.Go(func() error { _, err := modGen. With(daggerCall(fmt.Sprintf("potato%d", i))). Sync(ctx) return err }) } require.NoError(t, eg.Wait()) }) t.Run("python sdk", func(t *testing.T) { t.Parallel() c, ctx := connect(t) mainSrc := `from dagger import function ` for i := 0; i < funcCount; i++ { mainSrc += fmt.Sprintf(` @function def potato_%d() -> str: return "potato #%d" `, i, i) } modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithNewFile("./src/main.py", dagger.ContainerWithNewFileOpts{ Contents: mainSrc, }). With(daggerExec("mod", "init", "--name=potatoSack", "--sdk=python")) var eg errgroup.Group for i := 0; i < funcCount; i++ { i := i // just verify a subset work if i%10 != 0 { continue } eg.Go(func() error { _, err := modGen. With(daggerCall(fmt.Sprintf("potato%d", i))). Sync(ctx) return err }) } require.NoError(t, eg.Wait()) }) } func TestModuleLotsOfDeps(t *testing.T) { t.Parallel() c, ctx := connect(t) modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work") modCount := 0 getModMainSrc := func(name string, depNames []string) string { t.Helper() mainSrc := fmt.Sprintf(`package main import "context" type %s struct {} func (m *%s) Fn(ctx context.Context) (string, error) { s := "%s" var depS string _ = depS var err error _ = err `, strcase.ToCamel(name), strcase.ToCamel(name), name) for _, depName := range depNames { mainSrc += fmt.Sprintf(` depS, err = dag.%s().Fn(ctx) if err != nil { return "", err } s += depS `, strcase.ToCamel(depName)) } mainSrc += "return s, nil\n}\n" fmted, err := format.Source([]byte(mainSrc)) require.NoError(t, err) return string(fmted) } // need to construct dagger.json directly in order to avoid excessive // `dagger mod use` calls while constructing the huge DAG of deps getModDaggerConfig := func(name string, depNames []string) string { t.Helper() var depVals []string for _, depName := range depNames { depVals = append(depVals, "../"+depName) } cfg := modules.Config{ Name: name, Root: "..", SDK: "go", Dependencies: depVals, } bs, err := json.Marshal(cfg) require.NoError(t, err) return string(bs) } addModulesWithDeps := func(newMods int, depNames []string) []string { t.Helper() var newModNames []string for i := 0; i < newMods; i++ { name := fmt.Sprintf("mod%d", modCount) modCount++ newModNames = append(newModNames, name) modGen = modGen. WithWorkdir("/work/"+name). WithNewFile("./main.go", dagger.ContainerWithNewFileOpts{ Contents: getModMainSrc(name, depNames), }). WithNewFile("./dagger.json", dagger.ContainerWithNewFileOpts{ Contents: getModDaggerConfig(name, depNames), }) } return newModNames } // Create a base module, then add 6 layers of deps, where each layer has one more module // than the previous layer and each module within the layer has a dep on each module // from the previous layer. Finally add a single module at the top that depends on all // modules from the last layer and call that. // Basically, this creates a quadratically growing DAG of modules and verifies we // handle it efficiently enough to be callable. curDeps := addModulesWithDeps(1, nil) for i := 0; i < 6; i++ { curDeps = addModulesWithDeps(len(curDeps)+1, curDeps) } addModulesWithDeps(1, curDeps) _, err := modGen.With(daggerCall("fn")).Stdout(ctx) require.NoError(t, err) } func TestModuleNamespacing(t *testing.T) { t.Parallel() c, ctx := connect(t) moduleSrcPath, err := filepath.Abs("./testdata/modules/go/namespacing") require.NoError(t, err) ctr := c.Container().From(alpineImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithMountedDirectory("/work", c.Host().Directory(moduleSrcPath)). WithWorkdir("/work") out, err := ctr. With(daggerQuery(`{test{fn(s:"yo")}}`)). Stdout(ctx) require.NoError(t, err) require.JSONEq(t, `{"test":{"fn":["*main.Sub1Obj made 1:yo", "*main.Sub2Obj made 2:yo"]}}`, out) } func TestModuleRoots(t *testing.T) { t.Parallel() c, ctx := connect(t) moduleSrcPath, err := filepath.Abs("./testdata/modules/go/roots") require.NoError(t, err) entries, err := os.ReadDir(moduleSrcPath) require.NoError(t, err) ctr := c.Container().From(alpineImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithMountedDirectory("/work", c.Host().Directory(moduleSrcPath)) for _, entry := range entries { entry := entry t.Run(entry.Name(), func(t *testing.T) { t.Parallel() ctr := ctr.WithWorkdir("/work/" + entry.Name()) out, err := ctr. With(daggerQuery(fmt.Sprintf(`{%s{hello}}`, strcase.ToLowerCamel(entry.Name())))). Stdout(ctx) if strings.HasPrefix(entry.Name(), "good-") { require.NoError(t, err) require.JSONEq(t, fmt.Sprintf(`{"%s":{"hello": "hello"}}`, strcase.ToLowerCamel(entry.Name())), out) } else if strings.HasPrefix(entry.Name(), "bad-") { require.Error(t, err) require.Regexp(t, "is not under( module)? root", err.Error()) } }) } } func TestModuleDaggerCall(t *testing.T) { t.Parallel() c, ctx := connect(t) t.Run("service args", func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main import ( "context" ) type Test struct {} func (m *Test) Fn(ctx context.Context, svc *Service) (string, error) { return dag.Container().From("alpine:3.18").WithExec([]string{"apk", "add", "curl"}). WithServiceBinding("daserver", svc). WithExec([]string{"curl", "http://daserver:8000"}). Stdout(ctx) } `, }) logGen(ctx, t, modGen.Directory(".")) httpServer, _ := httpService(ctx, t, c, "im up") endpoint, err := httpServer.Endpoint(ctx) require.NoError(t, err) out, err := modGen. WithServiceBinding("testserver", httpServer). With(daggerCall("fn", "--svc", "tcp://"+endpoint)).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "im up") }) t.Run("list args", func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("foo.txt", dagger.ContainerWithNewFileOpts{ Contents: "bar", }). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main import ( "context" "strings" ) type Minimal struct {} func (m *Minimal) Hello(msgs []string) string { return strings.Join(msgs, "+") } func (m *Minimal) Reads(ctx context.Context, files []File) (string, error) { var contents []string for _, f := range files { content, err := f.Contents(ctx) if err != nil { return "", err } contents = append(contents, content) } return strings.Join(contents, "+"), nil } `, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerCall("hello", "--msgs", "yo", "--msgs", "my", "--msgs", "friend")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "yo+my+friend") out, err = modGen.With(daggerCall("reads", "--files=foo.txt", "--files=foo.txt")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "bar+bar") }) t.Run("return list objects", func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=minimal", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Minimal struct {} type Foo struct { Bar int ` + "`" + `json:"bar"` + "`" + ` } func (m *Minimal) Fn() []*Foo { var foos []*Foo for i := 0; i < 3; i++ { foos = append(foos, &Foo{Bar: i}) } return foos } `, }) logGen(ctx, t, modGen.Directory(".")) out, err := modGen.With(daggerCall("fn", "bar")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "0\n1\n2") }) t.Run("directory arg inputs", func(t *testing.T) { t.Parallel() t.Run("local dir", func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk=go")). WithNewFile("/dir/subdir/foo.txt", dagger.ContainerWithNewFileOpts{ Contents: "foo", }). WithNewFile("/dir/subdir/bar.txt", dagger.ContainerWithNewFileOpts{ Contents: "bar", }). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Test struct {} func (m *Test) Fn(dir *Directory) *Directory { return dir } `, }) out, err := modGen.With(daggerCall("fn", "--dir", "/dir/subdir")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "bar.txt\nfoo.txt") out, err = modGen.With(daggerCall("fn", "--dir", "file:///dir/subdir")).Stdout(ctx) require.NoError(t, err) require.Equal(t, strings.TrimSpace(out), "bar.txt\nfoo.txt") }) t.Run("git dir", func(t *testing.T) { t.Parallel() modGen := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk=go")). WithNewFile("main.go", dagger.ContainerWithNewFileOpts{ Contents: `package main type Test struct {} func (m *Test) Fn(dir *Directory, subpath Optional[string]) *Directory { return dir.Directory(subpath.GetOr(".")) } `, }) for _, tc := range []struct { baseURL string subpath string }{ { baseURL: "https://github.com/dagger/dagger", }, { baseURL: "https://github.com/dagger/dagger", subpath: ".changes", }, { baseURL: "https://github.com/dagger/dagger.git", }, { baseURL: "https://github.com/dagger/dagger.git", subpath: ".changes", }, } { tc := tc t.Run(fmt.Sprintf("%s:%s", tc.baseURL, tc.subpath), func(t *testing.T) { t.Parallel() url := tc.baseURL + "#v0.9.1" if tc.subpath != "" { url += ":" + tc.subpath } args := []string{"fn", "--dir", url} if tc.subpath == "" { args = append(args, "--subpath", ".changes") } out, err := modGen.With(daggerCall(args...)).Stdout(ctx) require.NoError(t, err) require.Contains(t, out, "v0.9.1.md") require.NotContains(t, out, "v0.9.2.md") }) } }) }) } func TestModuleLoops(t *testing.T) { // verify circular module dependencies result in an error t.Parallel() c, ctx := connect(t) _, err := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work/depA"). With(daggerExec("mod", "init", "--name=depA", "--sdk=go", "--root=..")). WithWorkdir("/work/depB"). With(daggerExec("mod", "init", "--name=depB", "--sdk=go", "--root=..")). With(daggerExec("mod", "install", "../depA")). WithWorkdir("/work/depC"). With(daggerExec("mod", "init", "--name=depC", "--sdk=go", "--root=..")). With(daggerExec("mod", "install", "../depB")). WithWorkdir("/work/depA"). With(daggerExec("mod", "install", "../depC")). Sync(ctx) require.ErrorContains(t, err, "module depA has a circular dependency") } //go:embed testdata/modules/go/id/arg/main.go var badIDArgGoSrc string //go:embed testdata/modules/python/id/arg/main.py var badIDArgPySrc string //go:embed testdata/modules/go/id/field/main.go var badIDFieldGoSrc string //go:embed testdata/modules/go/id/fn/main.go var badIDFnGoSrc string //go:embed testdata/modules/python/id/fn/main.py var badIDFnPySrc string func TestModuleReservedWords(t *testing.T) { // verify disallowed names are rejected t.Parallel() c, ctx := connect(t) t.Run("id", func(t *testing.T) { t.Parallel() t.Run("arg", func(t *testing.T) { t.Parallel() t.Run("go", func(t *testing.T) { t.Parallel() _, err := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk=go")). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: badIDArgGoSrc, }). With(daggerQuery(`{test{fn(id:"no")}}`)). Sync(ctx) require.ErrorContains(t, err, "cannot define argument with reserved name \"id\"") }) t.Run("python", func(t *testing.T) { t.Parallel() _, err := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk=python")). WithNewFile("/work/src/main.py", dagger.ContainerWithNewFileOpts{ Contents: badIDArgPySrc, }). With(daggerQuery(`{test{fn(id:"no")}}`)). Sync(ctx) require.ErrorContains(t, err, "cannot define argument with reserved name \"id\"") }) }) t.Run("field", func(t *testing.T) { t.Parallel() t.Run("go", func(t *testing.T) { t.Parallel() _, err := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk=go")). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: badIDFieldGoSrc, }). With(daggerQuery(`{test{fn{id}}}`)). Sync(ctx) require.ErrorContains(t, err, "cannot define field with reserved name \"id\"") }) }) t.Run("fn", func(t *testing.T) { t.Parallel() t.Run("go", func(t *testing.T) { t.Parallel() _, err := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk=go")). WithNewFile("/work/main.go", dagger.ContainerWithNewFileOpts{ Contents: badIDFnGoSrc, }). With(daggerQuery(`{test{id}}`)). Sync(ctx) require.ErrorContains(t, err, "cannot define function with reserved name \"id\"") }) t.Run("python", func(t *testing.T) { t.Parallel() _, err := c.Container().From(golangImage). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). With(daggerExec("mod", "init", "--name=test", "--sdk=python")). WithNewFile("/work/src/main.py", dagger.ContainerWithNewFileOpts{ Contents: badIDFnPySrc, }). With(daggerQuery(`{test{fn(id:"no")}}`)). Sync(ctx) require.ErrorContains(t, err, "cannot define function with reserved name \"id\"") }) }) }) } func daggerExec(args ...string) dagger.WithContainerFunc { return func(c *dagger.Container) *dagger.Container { return c.WithExec(append([]string{"dagger", "--debug"}, args...), dagger.ContainerWithExecOpts{ ExperimentalPrivilegedNesting: true, }) } } func daggerQuery(query string, args ...any) dagger.WithContainerFunc { query = fmt.Sprintf(query, args...) return func(c *dagger.Container) *dagger.Container { return c.WithExec([]string{"dagger", "--debug", "query"}, dagger.ContainerWithExecOpts{ Stdin: query, ExperimentalPrivilegedNesting: true, }) } } func daggerCall(args ...string) dagger.WithContainerFunc { return func(c *dagger.Container) *dagger.Container { return c.WithExec(append([]string{"dagger", "--debug", "call"}, args...), dagger.ContainerWithExecOpts{ ExperimentalPrivilegedNesting: true, }) } } func daggerFunctions(args ...string) dagger.WithContainerFunc { return func(c *dagger.Container) *dagger.Container { return c.WithExec(append([]string{"dagger", "--debug", "functions"}, args...), dagger.ContainerWithExecOpts{ ExperimentalPrivilegedNesting: true, }) } } // command for a dagger cli call direct on the host func hostDaggerCommand(ctx context.Context, t testing.TB, workdir string, args ...string) *exec.Cmd { t.Helper() cmd := exec.CommandContext(ctx, daggerCliPath(t), args...) cmd.Dir = workdir return cmd } // runs a dagger cli command directly on the host, rather than in an exec func hostDaggerExec(ctx context.Context, t testing.TB, workdir string, args ...string) ([]byte, error) { t.Helper() cmd := hostDaggerCommand(ctx, t, workdir, args...) output, err := cmd.CombinedOutput() if err != nil { err = fmt.Errorf("%s: %w", string(output), err) } return output, err } func sdkSource(sdk, contents string) dagger.WithContainerFunc { return func(c *dagger.Container) *dagger.Container { var sourcePath string switch sdk { case "go": sourcePath = "main.go" case "python": sourcePath = "src/main.py" default: return c } return c.WithNewFile(sourcePath, dagger.ContainerWithNewFileOpts{ Contents: contents, }) } } func sdkCodegenFile(t *testing.T, sdk string) string { t.Helper() switch sdk { case "go": return "dagger.gen.go" case "python": return "sdk/src/dagger/client/gen.py" default: return "" } } func currentSchema(ctx context.Context, t *testing.T, ctr *dagger.Container) *introspection.Schema { t.Helper() out, err := ctr.With(daggerQuery(introspection.Query)).Stdout(ctx) require.NoError(t, err) var schemaResp introspection.Response err = json.Unmarshal([]byte(out), &schemaResp) require.NoError(t, err) return schemaResp.Schema } func goGitBase(t *testing.T, c *dagger.Client) *dagger.Container { t.Helper() return c.Container().From(golangImage). WithExec([]string{"apk", "add", "git"}). WithExec([]string{"git", "config", "--global", "user.email", "dagger@example.com"}). WithExec([]string{"git", "config", "--global", "user.name", "Dagger Tests"}). WithMountedFile(testCLIBinPath, daggerCliFile(t, c)). WithWorkdir("/work"). WithExec([]string{"git", "init"}) } func logGen(ctx context.Context, t *testing.T, modSrc *dagger.Directory) { t.Helper() generated, err := modSrc.File("dagger.gen.go").Contents(ctx) require.NoError(t, err) t.Cleanup(func() { t.Name() fileName := filepath.Join( os.TempDir(), t.Name(), fmt.Sprintf("dagger.gen.%d.go", time.Now().Unix()), ) if err := os.MkdirAll(filepath.Dir(fileName), 0o755); err != nil { t.Logf("failed to create temp dir for generated code: %v", err) return } if err := os.WriteFile(fileName, []byte(generated), 0644); err != nil { t.Logf("failed to write generated code to %s: %v", fileName, err) } else { t.Logf("wrote generated code to %s", fileName) } }) }
closed
dagger/dagger
https://github.com/dagger/dagger
6,286
🐞 Zenith: camelCase automagic issues with PythonSDK
### What is the issue? When attempting to run the examples provided in the dagger module's documentation, I encountered two issues that presumably have the same underlying cause regarding the automatic camelCase conversion performed in the Python SDK. ## First issue Take the following example (taken from [here](https://docs.dagger.io/zenith/developer/python/539756/advanced-programming#chain-modules-together)): ```python """A Dagger module for saying hello world!.""" from dagger import field, function, object_type @object_type class HelloWorld: greeting: str = field(default="Hello") name: str = field(default="World") @function def with_greeting(self, greeting: str) -> "HelloWorld": self.greeting = greeting return self @function def with_name(self, name: str) -> "HelloWorld": self.name = name return self @function def message(self) -> str: return f"{self.greeting} {self.name}!" ``` And here is an example query for this module: ```graphql { helloWorld { message withName(name: "Monde") { withGreeting(greeting: "Bonjour") { message } } } } ``` The result is as expected ```plain { "helloWorld": { "message": "Hello, World!", "withName": { "withGreeting": { "message": "Bonjour, Monde!" } } } } ``` Now, if I rename `name` to `my_name`: ```python @object_type class HelloWorld: greeting: str = field(default="Hello") my_name: str = field(default="World") @function def with_greeting(self, greeting: str) -> "HelloWorld": self.greeting = greeting return self @function def with_my_name(self, my_name: str) -> "HelloWorld": self.my_name = my_name return self @function def message(self) -> str: return f"{self.greeting} {self.my_name}!" ``` and use the following query: ```graphql { helloWorld { message withMyName(myName: "Monde") { withGreeting(greeting: "Bonjour") { message } } } } ``` I get this result ```plain { "helloWorld": { "message": "Hello, World!", "withMyName": { "withGreeting": { "message": "Bonjour World!" } } } } ``` ## Second issue Take the following example (taken from [here](https://docs.dagger.io/zenith/developer/python/539756/advanced-programming#write-an-asynchronous-module-constructor-function)): ```python """A Dagger module for searching an input file.""" import dagger from dagger import dag, object_type, field, function @object_type class Grep: src: dagger.File = field() @classmethod async def create(cls, src: dagger.File | None = None): if src is None: src = await dag.http("https://dagger.io") return cls(src=src) @function async def grep(self, pattern: str) -> str: return await ( dag .container() .from_("alpine:latest") .with_mounted_file("/src", self.src) .with_exec(["grep", pattern, "/src"]) .stdout() ) ``` Similarly, if I alter this example by renaming `src` to `my_src`: ```python ... @object_type class Grep: my_src: dagger.File = field() @classmethod async def create(cls, my_src: dagger.File | None = None): if my_src is None: my_src = await dag.http("https://dagger.io") return cls(my_src=my_src) ... ``` I get the following error: ```shell $ dagger call grep --pattern dagger ✘ dagger call grep ERROR [1.92s] ┃ Error: response from query: input:1: grep.grep failed to get function output directory: process "/runtime" did not complete successfully: exit code: 1 ✘ grep(pattern: "dagger") ERROR [0.85s] ✘ exec /runtime ERROR [0.85s] ┃ ╭───────────────────── Traceback (most recent call last) ──────────────────────╮ ┃ │ /runtime:8 in <module> │ ┃ │ │ ┃ │ 5 from dagger.mod.cli import app │ ┃ │ 6 │ ┃ │ 7 if __name__ == "__main__": │ ┃ │ ❱ 8 │ sys.exit(app()) │ ┃ │ 9 │ ┃ │ │ ┃ │ /sdk/src/dagger/mod/cli.py:32 in app │ ┃ │ │ ┃ │ 29 │ ) │ ┃ │ 30 │ try: │ ┃ │ 31 │ │ mod = get_module() │ ┃ │ ❱ 32 │ │ mod() │ ┃ │ 33 │ except FatalError as e: │ ┃ │ 34 │ │ if logger.isEnabledFor(logging.DEBUG): │ ┃ │ 35 │ │ │ logger.exception("Fatal error") │ ┃ │ │ ┃ │ /sdk/src/dagger/mod/_module.py:181 in __call__ │ ┃ │ │ ┃ │ 178 │ def __call__(self) -> None: │ ┃ │ 179 │ │ if self._log_level is not None: │ ┃ │ 180 │ │ │ configure_logging(self._log_level) │ ┃ │ ❱ 181 │ │ anyio.run(self._run) │ ┃ │ 182 │ │ ┃ │ 183 │ async def _run(self): │ ┃ │ 184 │ │ async with await dagger.connect(): │ ┃ │ │ ┃ │ /usr/local/lib/python3.11/site-packages/anyio/_core/_eventloop.py:66 in run │ ┃ │ │ ┃ │ 63 │ │ ┃ │ 64 │ try: │ ┃ │ 65 │ │ backend_options = backend_options or {} │ ┃ │ ❱ 66 │ │ return async_backend.run(func, args, {}, backend_options) │ ┃ │ 67 │ finally: │ ┃ │ 68 │ │ if token: │ ┃ │ 69 │ │ │ sniffio.current_async_library_cvar.reset(token) │ ┃ │ │ ┃ │ /usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py:1960 in │ ┃ │ run │ ┃ │ │ ┃ │ 1957 │ │ debug = options.get("debug", False) │ ┃ │ 1958 │ │ options.get("loop_factory", None) │ ┃ │ 1959 │ │ options.get("use_uvloop", False) │ ┃ │ ❱ 1960 │ │ return native_run(wrapper(), debug=debug) │ ┃ │ 1961 │ │ ┃ │ 1962 │ @classmethod │ ┃ │ 1963 │ def current_token(cls) -> object: │ ┃ │ │ ┃ │ /usr/local/lib/python3.11/asyncio/runners.py:190 in run │ ┃ │ │ ┃ │ 187 │ │ │ "asyncio.run() cannot be called from a running event loop" │ ┃ │ 188 │ │ ┃ │ 189 │ with Runner(debug=debug) as runner: │ ┃ │ ❱ 190 │ │ return runner.run(main) │ ┃ │ 191 │ ┃ │ 192 │ ┃ │ 193 def _cancel_all_tasks(loop): │ ┃ │ │ ┃ │ /usr/local/lib/python3.11/asyncio/runners.py:118 in run │ ┃ │ │ ┃ │ 115 │ │ │ ┃ │ 116 │ │ self._interrupt_count = 0 │ ┃ │ 117 │ │ try: │ ┃ │ ❱ 118 │ │ │ return self._loop.run_until_complete(task) │ ┃ │ 119 │ │ except exceptions.CancelledError: │ ┃ │ 120 │ │ │ if self._interrupt_count > 0: │ ┃ │ 121 │ │ │ │ uncancel = getattr(task, "uncancel", None) │ ┃ │ │ ┃ │ /usr/local/lib/python3.11/asyncio/base_events.py:653 in run_until_complete │ ┃ │ │ ┃ │ 650 │ │ if not future.done(): │ ┃ │ 651 │ │ │ raise RuntimeError('Event loop stopped before Future comp │ ┃ │ 652 │ │ │ ┃ │ ❱ 653 │ │ return future.result() │ ┃ │ 654 │ │ ┃ │ 655 │ def stop(self): │ ┃ │ 656 │ │ """Stop running the event loop. │ ┃ │ │ ┃ │ /usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py:1953 in │ ┃ │ wrapper │ ┃ │ │ ┃ │ 1950 │ │ │ _task_states[task] = TaskState(None, None) │ ┃ │ 1951 │ │ │ │ ┃ │ 1952 │ │ │ try: │ ┃ │ ❱ 1953 │ │ │ │ return await func(*args) │ ┃ │ 1954 │ │ │ finally: │ ┃ │ 1955 │ │ │ │ del _task_states[task] │ ┃ │ 1956 │ ┃ │ │ ┃ │ /sdk/src/dagger/mod/_module.py:185 in _run │ ┃ │ │ ┃ │ 182 │ │ ┃ │ 183 │ async def _run(self): │ ┃ │ 184 │ │ async with await dagger.connect(): │ ┃ │ ❱ 185 │ │ │ await self._serve() │ ┃ │ 186 │ │ ┃ │ 187 │ async def _serve(self): │ ┃ │ 188 │ │ mod_name = await self._mod.name() │ ┃ │ │ ┃ │ /sdk/src/dagger/mod/_module.py:193 in _serve │ ┃ │ │ ┃ │ 190 │ │ resolvers = self.get_resolvers(mod_name) │ ┃ │ 191 │ │ │ ┃ │ 192 │ │ result = ( │ ┃ │ ❱ 193 │ │ │ await self._invoke(resolvers, parent_name) │ ┃ │ 194 │ │ │ if parent_name │ ┃ │ 195 │ │ │ else await self._register(resolvers, to_pascal_case(mod_na │ ┃ │ 196 │ │ ) │ ┃ │ │ ┃ │ /sdk/src/dagger/mod/_module.py:266 in _invoke │ ┃ │ │ ┃ │ 263 │ │ ) │ ┃ │ 264 │ │ │ ┃ │ 265 │ │ resolver = self.get_resolver(resolvers, parent_name, name) │ ┃ │ ❱ 266 │ │ return await self.get_result(resolver, parent_json, inputs) │ ┃ │ 267 │ │ ┃ │ 268 │ async def get_result( │ ┃ │ 269 │ │ self, │ ┃ │ │ ┃ │ /sdk/src/dagger/mod/_module.py:279 in get_result │ ┃ │ │ ┃ │ 276 │ │ │ isinstance(resolver, FunctionResolver) │ ┃ │ 277 │ │ │ and inspect.isclass(resolver.wrapped_func) │ ┃ │ 278 │ │ ): │ ┃ │ ❱ 279 │ │ │ root = await self.get_root(resolver.origin, parent_json) │ ┃ │ 280 │ │ │ ┃ │ 281 │ │ try: │ ┃ │ 282 │ │ │ result = await resolver.get_result(self._converter, root, │ ┃ │ │ ┃ │ /sdk/src/dagger/mod/_module.py:325 in get_root │ ┃ │ │ ┃ │ 322 │ │ if not parent: │ ┃ │ 323 │ │ │ return origin() │ ┃ │ 324 │ │ │ ┃ │ ❱ 325 │ │ return await asyncify(self._converter.structure, parent, origi │ ┃ │ 326 │ │ ┃ │ 327 │ def field( │ ┃ │ 328 │ │ self, │ ┃ │ │ ┃ │ /usr/local/lib/python3.11/site-packages/anyio/to_thread.py:49 in run_sync │ ┃ │ │ ┃ │ 46 │ │ │ stacklevel=2, │ ┃ │ 47 │ │ ) │ ┃ │ 48 │ │ ┃ │ ❱ 49 │ return await get_async_backend().run_sync_in_worker_thread( │ ┃ │ 50 │ │ func, args, abandon_on_cancel=abandon_on_cancel, limiter=limite │ ┃ │ 51 │ ) │ ┃ │ 52 │ ┃ │ │ ┃ │ /usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py:2103 in │ ┃ │ run_sync_in_worker_thread │ ┃ │ │ ┃ │ 2100 │ │ │ │ │ worker_scope = scope._parent_scope │ ┃ │ 2101 │ │ │ │ │ ┃ │ 2102 │ │ │ │ worker.queue.put_nowait((context, func, args, future, │ ┃ │ ❱ 2103 │ │ │ │ return await future │ ┃ │ 2104 │ │ ┃ │ 2105 │ @classmethod │ ┃ │ 2106 │ def check_cancelled(cls) -> None: │ ┃ │ │ ┃ │ /usr/local/lib/python3.11/site-packages/anyio/_backends/_asyncio.py:823 in │ ┃ │ run │ ┃ │ │ ┃ │ 820 │ │ │ │ │ exception: BaseException | None = None │ ┃ │ 821 │ │ │ │ │ threadlocals.current_cancel_scope = cancel_scope │ ┃ │ 822 │ │ │ │ │ try: │ ┃ │ ❱ 823 │ │ │ │ │ │ result = context.run(func, *args) │ ┃ │ 824 │ │ │ │ │ except BaseException as exc: │ ┃ │ 825 │ │ │ │ │ │ exception = exc │ ┃ │ 826 │ │ │ │ │ finally: │ ┃ │ │ ┃ │ /usr/local/lib/python3.11/site-packages/cattrs/converters.py:332 in │ ┃ │ structure │ ┃ │ │ ┃ │ 329 │ │ ┃ │ 330 │ def structure(self, obj: Any, cl: Type[T]) -> T: │ ┃ │ 331 │ │ """Convert unstructured Python data structures to structured │ ┃ │ ❱ 332 │ │ return self._structure_func.dispatch(cl)(obj, cl) │ ┃ │ 333 │ │ ┃ │ 334 │ # Classes to Python primitives. │ ┃ │ 335 │ def unstructure_attrs_asdict(self, obj: Any) -> Dict[str, Any]: │ ┃ │ in structure_Grep:9 │ ┃ ╰──────────────────────────────────────────────────────────────────────────────╯ ┃ ClassValidationError: While structuring Grep (1 sub-exception) • Engine: 9e91eb66912d (version v0.9.4) ⧗ 20.86s ✔ 112 ∅ 16 ✘ 3 ``` ### Dagger version dagger v0.9.4 (registry.dagger.io/engine) darwin/arm64 ### Steps to reproduce _No response_ ### Log output _No response_
https://github.com/dagger/dagger/issues/6286
https://github.com/dagger/dagger/pull/6287
1502402c4c028f15165a14ea8f05260057c8141e
62e02912129760bc86c309e5107dd7eb463ac2bf
"2023-12-16T16:19:10Z"
go
"2023-12-20T11:15:41Z"
core/schema/usermod.go
package schema import ( "bytes" "context" "fmt" "sync" "github.com/dagger/dagger/core" "github.com/dagger/dagger/core/resourceid" "github.com/dagger/graphql" "github.com/moby/buildkit/util/bklog" "github.com/opencontainers/go-digest" "github.com/vektah/gqlparser/v2/ast" "github.com/vektah/gqlparser/v2/formatter" ) /* A user defined module loaded into this server's DAG. */ type UserMod struct { api *APIServer metadata *core.Module deps *ModDeps sdk SDK dagDigest digest.Digest // should not be read directly, call m.Objects() instead lazilyLoadedObjects []*UserModObject loadObjectsErr error loadObjectsLock sync.Mutex } var _ Mod = (*UserMod)(nil) func newUserMod(api *APIServer, modMeta *core.Module, deps *ModDeps, sdk SDK) (*UserMod, error) { selfDigest, err := modMeta.BaseDigest() if err != nil { return nil, fmt.Errorf("failed to get module digest: %w", err) } dagDigest := digest.FromString(selfDigest.String() + " " + deps.DagDigest().String()) m := &UserMod{ api: api, metadata: modMeta, deps: deps, sdk: sdk, dagDigest: dagDigest, } return m, nil } func (m *UserMod) Name() string { return m.metadata.Name } func (m *UserMod) DagDigest() digest.Digest { return m.dagDigest } func (m *UserMod) Dependencies() []Mod { return m.deps.mods } func (m *UserMod) Codegen(ctx context.Context) (*core.GeneratedCode, error) { return m.sdk.Codegen(ctx, m) } func (m *UserMod) Runtime(ctx context.Context) (*core.Container, error) { return m.sdk.Runtime(ctx, m) } // The objects defined by this module, with namespacing applied func (m *UserMod) Objects(ctx context.Context) (loadedObjects []*UserModObject, rerr error) { m.loadObjectsLock.Lock() defer m.loadObjectsLock.Unlock() if len(m.lazilyLoadedObjects) > 0 { return m.lazilyLoadedObjects, nil } if m.loadObjectsErr != nil { return nil, m.loadObjectsErr } defer func() { m.lazilyLoadedObjects = loadedObjects m.loadObjectsErr = rerr }() runtime, err := m.Runtime(ctx) if err != nil { return nil, fmt.Errorf("failed to get module runtime: %w", err) } // construct a special function with no object or function name, which tells the SDK to return the module's definition // (in terms of objects, fields and functions) getModDefFn, err := newModFunction(ctx, m, nil, runtime, core.NewFunction("", &core.TypeDef{ Kind: core.TypeDefKindObject, AsObject: core.NewObjectTypeDef("Module", ""), })) if err != nil { return nil, fmt.Errorf("failed to create module definition function for module %q: %w", m.Name(), err) } result, err := getModDefFn.Call(ctx, &CallOpts{Cache: true, SkipSelfSchema: true}) if err != nil { return nil, fmt.Errorf("failed to call module %q to get functions: %w", m.Name(), err) } modMeta, ok := result.(*core.Module) if !ok { return nil, fmt.Errorf("expected Module result, got %T", result) } objs := make([]*UserModObject, 0, len(modMeta.Objects)) for _, objTypeDef := range modMeta.Objects { if err := m.validateTypeDef(ctx, objTypeDef); err != nil { return nil, fmt.Errorf("failed to validate type def: %w", err) } if err := m.namespaceTypeDef(ctx, objTypeDef); err != nil { return nil, fmt.Errorf("failed to namespace type def: %w", err) } obj, err := newModObject(ctx, m, objTypeDef) if err != nil { return nil, fmt.Errorf("failed to create object: %w", err) } objs = append(objs, obj) } return objs, nil } func (m *UserMod) ModTypeFor(ctx context.Context, typeDef *core.TypeDef, checkDirectDeps bool) (ModType, bool, error) { switch typeDef.Kind { case core.TypeDefKindString, core.TypeDefKindInteger, core.TypeDefKindBoolean, core.TypeDefKindVoid: return &PrimitiveType{}, true, nil case core.TypeDefKindList: underlyingType, ok, err := m.ModTypeFor(ctx, typeDef.AsList.ElementTypeDef, checkDirectDeps) if err != nil { return nil, false, fmt.Errorf("failed to get underlying type: %w", err) } if !ok { return nil, false, nil } return &ListType{underlying: underlyingType}, true, nil case core.TypeDefKindObject: if checkDirectDeps { // check to see if this is from a *direct* dependency depType, ok, err := m.deps.ModTypeFor(ctx, typeDef) if err != nil { return nil, false, fmt.Errorf("failed to get type from dependency: %w", err) } if ok { return depType, true, nil } } // otherwise it must be from this module objs, err := m.Objects(ctx) if err != nil { return nil, false, err } for _, obj := range objs { if obj.typeDef.AsObject.Name == typeDef.AsObject.Name { return obj, true, nil } } return nil, false, nil default: return nil, false, fmt.Errorf("unexpected type def kind %s", typeDef.Kind) } } func (m *UserMod) MainModuleObject(ctx context.Context) (*UserModObject, error) { objs, err := m.Objects(ctx) if err != nil { return nil, err } for _, obj := range objs { if obj.typeDef.AsObject.Name == gqlObjectName(m.metadata.Name) { return obj, nil } } return nil, fmt.Errorf("failed to find main module object %q", m.metadata.Name) } func (m *UserMod) Schema(ctx context.Context) ([]SchemaResolvers, error) { ctx = bklog.WithLogger(ctx, bklog.G(ctx).WithField("module", m.Name())) bklog.G(ctx).Debug("getting module schema") objs, err := m.Objects(ctx) if err != nil { return nil, err } schemas := make([]SchemaResolvers, 0, len(objs)) for _, obj := range objs { objSchemaDoc, objResolvers, err := obj.Schema(ctx) if err != nil { return nil, err } buf := &bytes.Buffer{} formatter.NewFormatter(buf).FormatSchemaDocument(objSchemaDoc) typeSchemaStr := buf.String() schema := StaticSchema(StaticSchemaParams{ Name: fmt.Sprintf("%s.%s", m.metadata.Name, obj.typeDef.AsObject.Name), Schema: typeSchemaStr, Resolvers: objResolvers, }) schemas = append(schemas, schema) } return schemas, nil } func (m *UserMod) SchemaIntrospectionJSON(ctx context.Context) (string, error) { return m.deps.SchemaIntrospectionJSON(ctx) } // verify the typedef is has no reserved names func (m *UserMod) validateTypeDef(ctx context.Context, typeDef *core.TypeDef) error { switch typeDef.Kind { case core.TypeDefKindList: return m.validateTypeDef(ctx, typeDef.AsList.ElementTypeDef) case core.TypeDefKindObject: obj := typeDef.AsObject // check whether this is a pre-existing object from core or another module modType, ok, err := m.deps.ModTypeFor(ctx, typeDef) if err != nil { return fmt.Errorf("failed to get mod type for type def: %w", err) } if ok { if sourceMod := modType.SourceMod(); sourceMod != nil && sourceMod.DagDigest() != m.DagDigest() { // already validated, skip return nil } } for _, field := range obj.Fields { if gqlFieldName(field.Name) == "id" { return fmt.Errorf("cannot define field with reserved name %q on object %q", field.Name, obj.Name) } if err := m.validateTypeDef(ctx, field.TypeDef); err != nil { return err } } for _, fn := range obj.Functions { if gqlFieldName(fn.Name) == "id" { return fmt.Errorf("cannot define function with reserved name %q on object %q", fn.Name, obj.Name) } if err := m.validateTypeDef(ctx, fn.ReturnType); err != nil { return err } for _, arg := range fn.Args { if gqlArgName(arg.Name) == "id" { return fmt.Errorf("cannot define argument with reserved name %q on function %q", arg.Name, fn.Name) } if err := m.validateTypeDef(ctx, arg.TypeDef); err != nil { return err } } } } return nil } // prefix the given typedef (and any recursively referenced typedefs) with this module's name for any objects func (m *UserMod) namespaceTypeDef(ctx context.Context, typeDef *core.TypeDef) error { switch typeDef.Kind { case core.TypeDefKindList: if err := m.namespaceTypeDef(ctx, typeDef.AsList.ElementTypeDef); err != nil { return err } case core.TypeDefKindObject: obj := typeDef.AsObject // only namespace objects defined in this module _, ok, err := m.deps.ModTypeFor(ctx, typeDef) if err != nil { return fmt.Errorf("failed to get mod type for type def: %w", err) } if !ok { obj.Name = namespaceObject(obj.Name, m.metadata.Name) } for _, field := range obj.Fields { if err := m.namespaceTypeDef(ctx, field.TypeDef); err != nil { return err } } for _, fn := range obj.Functions { if err := m.namespaceTypeDef(ctx, fn.ReturnType); err != nil { return err } for _, arg := range fn.Args { if err := m.namespaceTypeDef(ctx, arg.TypeDef); err != nil { return err } } } } return nil } // UserModObject is an object defined by a user module type UserModObject struct { api *APIServer mod *UserMod // the type def metadata, with namespacing already applied typeDef *core.TypeDef // should not be read directly, call Fields() and Functions() instead lazyLoadedFields []*UserModField lazyLoadedFunctions []*UserModFunction loadErr error loadLock sync.Mutex } var _ ModType = (*UserModObject)(nil) func newModObject(ctx context.Context, mod *UserMod, typeDef *core.TypeDef) (*UserModObject, error) { if typeDef.Kind != core.TypeDefKindObject { return nil, fmt.Errorf("expected object type def, got %s", typeDef.Kind) } obj := &UserModObject{ api: mod.api, mod: mod, typeDef: typeDef, } return obj, nil } func (obj *UserModObject) TypeDef() *core.TypeDef { return obj.typeDef } func (obj *UserModObject) ConvertFromSDKResult(ctx context.Context, value any) (any, error) { if value == nil { return nil, nil } switch value := value.(type) { case string: decodedMap, err := resourceid.DecodeModuleID(value, obj.typeDef.AsObject.Name) if err != nil { return nil, fmt.Errorf("failed to decode module id: %w", err) } return obj.ConvertFromSDKResult(ctx, decodedMap) case map[string]any: for k, v := range value { normalizedName := gqlFieldName(k) field, ok, err := obj.FieldByName(ctx, normalizedName) if err != nil { return nil, fmt.Errorf("failed to get field %q: %w", k, err) } if !ok { continue } delete(value, k) value[normalizedName], err = field.modType.ConvertFromSDKResult(ctx, v) if err != nil { return nil, fmt.Errorf("failed to convert field %q: %w", k, err) } } return value, nil default: return nil, fmt.Errorf("unexpected result value type %T for object %q", value, obj.typeDef.AsObject.Name) } } func (obj *UserModObject) ConvertToSDKInput(ctx context.Context, value any) (any, error) { if value == nil { return nil, nil } // NOTE: user mod objects are currently only passed as inputs to the module they originate from; modules // can't have inputs/outputs from other modules (other than core). These objects are also passed as their // direct json serialization rather than as an ID (so that SDKs can decode them without needing to make // calls to their own API). switch value := value.(type) { case string: return resourceid.DecodeModuleID(value, obj.typeDef.AsObject.Name) case map[string]any: for k, v := range value { normalizedName := gqlFieldName(k) field, ok, err := obj.FieldByName(ctx, normalizedName) if err != nil { return nil, fmt.Errorf("failed to get field %q: %w", k, err) } if !ok { continue } value[field.metadata.Name], err = field.modType.ConvertToSDKInput(ctx, v) if err != nil { return nil, fmt.Errorf("failed to convert field %q: %w", k, err) } } return value, nil default: return nil, fmt.Errorf("unexpected input value type %T for object %q", value, obj.typeDef.AsObject.Name) } } func (obj *UserModObject) SourceMod() Mod { return obj.mod } func (obj *UserModObject) Fields(ctx context.Context) ([]*UserModField, error) { fields, _, err := obj.loadFieldsAndFunctions(ctx) if err != nil { return nil, err } return fields, nil } func (obj *UserModObject) Functions(ctx context.Context) ([]*UserModFunction, error) { _, functions, err := obj.loadFieldsAndFunctions(ctx) if err != nil { return nil, err } return functions, nil } func (obj *UserModObject) loadFieldsAndFunctions(ctx context.Context) ( loadedFields []*UserModField, loadedFunctions []*UserModFunction, rerr error, ) { obj.loadLock.Lock() defer obj.loadLock.Unlock() if len(obj.lazyLoadedFields) > 0 || len(obj.lazyLoadedFunctions) > 0 { return obj.lazyLoadedFields, obj.lazyLoadedFunctions, nil } if obj.loadErr != nil { return nil, nil, obj.loadErr } defer func() { obj.lazyLoadedFields = loadedFields obj.lazyLoadedFunctions = loadedFunctions obj.loadErr = rerr }() runtime, err := obj.mod.Runtime(ctx) if err != nil { return nil, nil, fmt.Errorf("failed to get module runtime: %w", err) } for _, fieldTypeDef := range obj.typeDef.AsObject.Fields { modField, err := newModField(ctx, obj, fieldTypeDef) if err != nil { return nil, nil, fmt.Errorf("failed to create field: %w", err) } loadedFields = append(loadedFields, modField) } for _, fn := range obj.typeDef.AsObject.Functions { modFunction, err := newModFunction(ctx, obj.mod, obj, runtime, fn) if err != nil { return nil, nil, fmt.Errorf("failed to create function: %w", err) } loadedFunctions = append(loadedFunctions, modFunction) } return loadedFields, loadedFunctions, nil } func (obj *UserModObject) FieldByName(ctx context.Context, name string) (*UserModField, bool, error) { fields, _, err := obj.loadFieldsAndFunctions(ctx) if err != nil { return nil, false, err } name = gqlFieldName(name) for _, f := range fields { if gqlFieldName(f.metadata.Name) == name { return f, true, nil } } return nil, false, nil } func (obj *UserModObject) FunctionByName(ctx context.Context, name string) (*UserModFunction, bool, error) { _, functions, err := obj.loadFieldsAndFunctions(ctx) if err != nil { return nil, false, err } name = gqlFieldName(name) for _, fn := range functions { if gqlFieldName(fn.metadata.Name) == name { return fn, true, nil } } return nil, false, nil } func (obj *UserModObject) Schema(ctx context.Context) (*ast.SchemaDocument, Resolvers, error) { ctx = bklog.WithLogger(ctx, bklog.G(ctx).WithField("object", obj.typeDef.AsObject.Name)) bklog.G(ctx).Debug("getting object schema") fields, functions, err := obj.loadFieldsAndFunctions(ctx) if err != nil { return nil, nil, err } typeSchemaDoc := &ast.SchemaDocument{} queryResolver := ObjectResolver{} typeSchemaResolvers := Resolvers{ "Query": queryResolver, } objTypeDef := obj.typeDef.AsObject objName := gqlObjectName(objTypeDef.Name) // get the schema + resolvers for the object as a whole objASTType, err := typeDefToASTType(obj.typeDef, false) if err != nil { return nil, nil, fmt.Errorf("failed to convert object to schema: %w", err) } // check whether this is a pre-existing object from a dependency module modType, ok, err := obj.mod.deps.ModTypeFor(ctx, obj.typeDef) if err != nil { return nil, nil, fmt.Errorf("failed to get mod type for type def: %w", err) } if ok { if sourceMod := modType.SourceMod(); sourceMod != nil && sourceMod.DagDigest() != obj.mod.DagDigest() { // modules can reference types from core/other modules as types, but they // can't attach any new fields or functions to them if len(objTypeDef.Fields) > 0 || len(objTypeDef.Functions) > 0 { return nil, nil, fmt.Errorf("cannot attach new fields or functions to object %q from outside module", objName) } return nil, nil, nil } } astDef := &ast.Definition{ Name: objName, Description: formatGqlDescription(objTypeDef.Description), Kind: ast.Object, } astIDDef := &ast.Definition{ Name: objName + "ID", Description: formatGqlDescription("%s identifier", objName), Kind: ast.Scalar, } astLoadDef := &ast.FieldDefinition{ Name: fmt.Sprintf("load%sFromID", objName), Description: formatGqlDescription("Loads a %s from an ID", objName), Arguments: ast.ArgumentDefinitionList{ &ast.ArgumentDefinition{ Name: "id", Type: ast.NonNullNamedType(objName+"ID", nil), }, }, Type: ast.NonNullNamedType(objName, nil), } newObjResolver := ObjectResolver{} astDef.Fields = append(astDef.Fields, &ast.FieldDefinition{ Name: "id", Description: formatGqlDescription("A unique identifier for a %s", objName), Type: ast.NonNullNamedType(objName+"ID", nil), }) newObjResolver["id"] = func(p graphql.ResolveParams) (any, error) { return resourceid.EncodeModule(objName, p.Source) } for _, field := range fields { fieldDef, resolver, err := field.Schema(ctx) if err != nil { return nil, nil, err } astDef.Fields = append(astDef.Fields, fieldDef) newObjResolver[fieldDef.Name] = resolver } for _, fn := range functions { fieldDef, resolver, err := fn.Schema(ctx) if err != nil { return nil, nil, err } astDef.Fields = append(astDef.Fields, fieldDef) newObjResolver[fieldDef.Name] = resolver } if len(newObjResolver) > 0 { typeSchemaResolvers[objName] = newObjResolver typeSchemaResolvers[objName+"ID"] = stringResolver[string]() queryResolver[fmt.Sprintf("load%sFromID", objName)] = func(p graphql.ResolveParams) (any, error) { return obj.ConvertFromSDKResult(ctx, p.Args["id"]) } } // handle object constructor var constructorFieldDef *ast.FieldDefinition var constructorResolver graphql.FieldResolveFn isMainModuleObject := objName == gqlObjectName(obj.mod.metadata.Name) if isMainModuleObject { constructorFieldDef = &ast.FieldDefinition{ Name: gqlFieldName(objName), Description: formatGqlDescription(objTypeDef.Description), Type: objASTType, } if objTypeDef.Constructor != nil { // use explicit user-defined constructor if provided fnTypeDef := objTypeDef.Constructor if fnTypeDef.ReturnType.Kind != core.TypeDefKindObject { return nil, nil, fmt.Errorf("constructor function for object %s must return that object", objTypeDef.OriginalName) } if fnTypeDef.ReturnType.AsObject.OriginalName != objTypeDef.OriginalName { return nil, nil, fmt.Errorf("constructor function for object %s must return that object", objTypeDef.OriginalName) } runtime, err := obj.mod.Runtime(ctx) if err != nil { return nil, nil, fmt.Errorf("failed to get module runtime: %w", err) } fn, err := newModFunction(ctx, obj.mod, obj, runtime, fnTypeDef) if err != nil { return nil, nil, fmt.Errorf("failed to create function: %w", err) } fieldDef, resolver, err := fn.Schema(ctx) if err != nil { return nil, nil, fmt.Errorf("failed to get schema for constructor function: %w", err) } constructorFieldDef.Arguments = fieldDef.Arguments constructorResolver = resolver } else { // otherwise default to a simple field with no args that returns an initially empty object constructorResolver = PassthroughResolver } typeSchemaDoc.Extensions = append(typeSchemaDoc.Extensions, &ast.Definition{ Name: "Query", Kind: ast.Object, Fields: ast.FieldList{constructorFieldDef}, }) queryResolver[constructorFieldDef.Name] = constructorResolver } if len(astDef.Fields) > 0 || constructorFieldDef != nil { typeSchemaDoc.Definitions = append(typeSchemaDoc.Definitions, astDef, astIDDef) typeSchemaDoc.Extensions = append(typeSchemaDoc.Extensions, &ast.Definition{ Name: "Query", Kind: ast.Object, Fields: ast.FieldList{astLoadDef}, }) } return typeSchemaDoc, typeSchemaResolvers, nil } type UserModField struct { obj *UserModObject metadata *core.FieldTypeDef modType ModType } func newModField(ctx context.Context, obj *UserModObject, metadata *core.FieldTypeDef) (*UserModField, error) { modType, ok, err := obj.mod.ModTypeFor(ctx, metadata.TypeDef, true) if err != nil { return nil, fmt.Errorf("failed to get mod type for field %q: %w", metadata.Name, err) } if !ok { return nil, fmt.Errorf("failed to get mod type for field %q", metadata.Name) } return &UserModField{ obj: obj, metadata: metadata, modType: modType, }, nil } func (f *UserModField) Schema(ctx context.Context) (*ast.FieldDefinition, graphql.FieldResolveFn, error) { typeDef := f.metadata.TypeDef fieldASTType, err := typeDefToASTType(typeDef, false) if err != nil { return nil, nil, err } // Check if this is a type from another (non-core) module, which is currently not allowed sourceMod := f.modType.SourceMod() if sourceMod != nil && sourceMod.Name() != coreModuleName && sourceMod.DagDigest() != f.obj.mod.DagDigest() { return nil, nil, fmt.Errorf("object %q field %q cannot reference external type from dependency module %q", f.obj.typeDef.AsObject.OriginalName, f.metadata.OriginalName, sourceMod.Name(), ) } fieldDef := &ast.FieldDefinition{ Name: f.metadata.Name, Description: formatGqlDescription(f.metadata.Description), Type: fieldASTType, } return fieldDef, func(p graphql.ResolveParams) (any, error) { res, err := graphql.DefaultResolveFn(p) if err != nil { return nil, err } return f.modType.ConvertFromSDKResult(ctx, res) }, nil }
closed
dagger/dagger
https://github.com/dagger/dagger
3,179
finish implementing `Directory` core API
I implemented the first parts of this API in https://github.com/dagger/dagger/pull/3168 but left a few parts unimplemented: https://github.com/dagger/dagger/blob/03ea15e68fcc46f2c51bc829fd0d24e97d88c576/core/directory.go#L209-L228 * `secret` ~~will need #3178 first.~~ can be removed from the schema per comments below * `withoutFile` _might_ be a simple application of `llb.Rm` but I've never used that before. * `withoutDirectory` might be the same assuming `llb.Rm` is just placing a tombstone over a path and doesn't need to be done recursively. * `diff` is probably just `llb.Diff` of two directory states but I'm a little suspicious this might be more complicated with sub-directory paths. 🤔
https://github.com/dagger/dagger/issues/3179
https://github.com/dagger/dagger/pull/6347
b7f85d14478b32a940857d29a4a54a87ac1cf16c
6bf18c7e0568f542567c8d63408cde9331f099c8
"2022-09-29T18:46:35Z"
go
"2024-01-04T10:01:28Z"
sdk/java/pom.xml
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>io.dagger</groupId> <artifactId>dagger-sdk-parent</artifactId> <version>1.0.0-SNAPSHOT</version> <packaging>pom</packaging> <modules> <module>dagger-codegen-maven-plugin</module> <module>dagger-java-sdk</module> <module>dagger-java-samples</module> </modules> <dependencyManagement> <dependencies> <dependency> <groupId>io.dagger</groupId> <artifactId>dagger-java-sdk</artifactId> <version>${project.version}</version> </dependency> <dependency> <groupId>io.smallrye</groupId> <artifactId>smallrye-graphql-client-api</artifactId> <version>${smallrye-graphql.version}</version> </dependency> <dependency> <groupId>io.smallrye</groupId> <artifactId>smallrye-graphql-client-implementation-vertx</artifactId> <version>${smallrye-graphql.version}</version> </dependency> <dependency> <groupId>jakarta.json</groupId> <artifactId>jakarta.json-api</artifactId> <version>${jakarta.json-api.version}</version> </dependency> <dependency> <groupId>jakarta.json.bind</groupId> <artifactId>jakarta.json.bind-api</artifactId> <version>${jakarta.json.bind-api.version}</version> </dependency> <dependency> <groupId>com.jayway.jsonpath</groupId> <artifactId>json-path</artifactId> <version>${json-path.version}</version> </dependency> <dependency> <groupId>org.eclipse</groupId> <artifactId>yasson</artifactId> <version>${yasson.version}</version> </dependency> <dependency> <groupId>com.squareup</groupId> <artifactId>javapoet</artifactId> <version>${javapoet.version}</version> </dependency> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> <version>${commons-lang.version}</version> </dependency> <dependency> <groupId>net.kothar</groupId> <artifactId>xdg-java</artifactId> <version>${xdg-java.version}</version> </dependency> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-compress</artifactId> <version>${commons-compress.version}</version> </dependency> <dependency> <groupId>com.ongres</groupId> <artifactId>fluent-process</artifactId> <version>${fluent-process.version}</version> </dependency> <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-plugin-api</artifactId> <version>${maven-plugin-api.version}</version> </dependency> <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-project</artifactId> <version>${maven-project.version}</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>${slf4j-api.version}</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-simple</artifactId> <version>${slf4j-simple.version}</version> </dependency> <dependency> <groupId>org.apache.maven.plugin-tools</groupId> <artifactId>maven-plugin-annotations</artifactId> <version>${maven-plugin-annotations.version}</version> </dependency> <dependency> <groupId>org.junit</groupId> <artifactId>junit-bom</artifactId> <version>${junit.version}</version> <type>pom</type> <scope>import</scope> </dependency> <dependency> <groupId>uk.org.webcompere</groupId> <artifactId>system-stubs-jupiter</artifactId> <version>${system-stubs-jupiter.version}</version> </dependency> <dependency> <groupId>org.assertj</groupId> <artifactId>assertj-core</artifactId> <version>${assertj-core.version}</version> </dependency> <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-core</artifactId> <version>${mockito-core.version}</version> </dependency> </dependencies> </dependencyManagement> <build> <pluginManagement> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> <version>${maven-resources-plugin.version}</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>${maven-compiler-plugin.version}</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-failsafe-plugin</artifactId> <version>${maven-failsafe-plugin.version}</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <version>${maven-javadoc-plugin.version}</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-source-plugin</artifactId> <version>${maven-source-plugin.version}</version> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>maven-versions-plugin</artifactId> <version>${maven-versions-plugin.version}</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-assembly-plugin</artifactId> <version>${maven-assembly-plugin.version}</version> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>${exec-maven-plugin.version}</version> </plugin> <plugin> <groupId>de.m3y.maven</groupId> <artifactId>inject-maven-plugin</artifactId> <version>${inject-maven-plugin.version}</version> </plugin> <plugin> <groupId>com.spotify.fmt</groupId> <artifactId>fmt-maven-plugin</artifactId> <version>${fmt-maven-plugin.version}</version> </plugin> <plugin> <groupId>io.dagger</groupId> <artifactId>dagger-codegen-maven-plugin</artifactId> <version>${project.version}</version> </plugin> </plugins> </pluginManagement> </build> <profiles> <profile> <id>release</id> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-source-plugin</artifactId> <executions> <execution> <goals> <goal>jar-no-fork</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <executions> <execution> <goals> <goal>jar</goal> </goals> </execution> </executions> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-failsafe-plugin</artifactId> <configuration> <skipITs>true</skipITs> </configuration> </plugin> </plugins> </build> </profile> </profiles> <properties> <maven.compiler.source>17</maven.compiler.source> <maven.compiler.target>17</maven.compiler.target> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <daggerengine.version>devel</daggerengine.version> <assertj-core.version>3.24.2</assertj-core.version> <commons-compress.version>1.24.0</commons-compress.version> <commons-lang.version>3.13.0</commons-lang.version> <exec-maven-plugin.version>3.1.0</exec-maven-plugin.version> <fluent-process.version>1.0.1</fluent-process.version> <fmt-maven-plugin.version>2.21.1</fmt-maven-plugin.version> <inject-maven-plugin.version>1.4</inject-maven-plugin.version> <jakarta.json-api.version>2.1.2</jakarta.json-api.version> <jakarta.json.bind-api.version>3.0.0</jakarta.json.bind-api.version> <javapoet.version>1.13.0</javapoet.version> <json-path.version>2.8.0</json-path.version> <junit.version>5.10.0</junit.version> <maven-assembly-plugin.version>3.6.0</maven-assembly-plugin.version> <maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version> <maven-failsafe-plugin.version>3.0.0</maven-failsafe-plugin.version> <maven-javadoc-plugin.version>3.5.0</maven-javadoc-plugin.version> <maven-plugin-api.version>3.8.8</maven-plugin-api.version> <maven-plugin-annotations.version>3.8.1</maven-plugin-annotations.version> <maven-project.version>2.2.1</maven-project.version> <maven-resources-plugin.version>3.3.1</maven-resources-plugin.version> <maven-source-plugin.version>3.3.0</maven-source-plugin.version> <maven-versions-plugin.version>2.16.0</maven-versions-plugin.version> <mockito-core.version>5.6.0</mockito-core.version> <slf4j-api.version>2.0.0</slf4j-api.version> <slf4j-simple.version>2.0.7</slf4j-simple.version> <smallrye-graphql.version>2.5.1</smallrye-graphql.version> <system-stubs-jupiter.version>2.1.3</system-stubs-jupiter.version> <xdg-java.version>0.1.1</xdg-java.version> <yasson.version>3.0.3</yasson.version> </properties> </project>