Replace "datasette publish --extra-options" with "--setting"
See https://github.com/simonw/datasette-publish-now/issues/9#issuecomment-618155764 - the --extra-options mechanism is in practice just used to set --config options in data that you publish, but that means you end up with pretty messy looking commands:
datasette publish my.db --extra-options="--config default_page_size:50 --config sql_time_limit_ms:3500"
A neater design would be to support --config as an option for datasette publish directly:
datasette publish my.db --config default_page_size:50 --config sql_time_limit_ms:3500
I can show deprecation warnings for --extra-options and remove the option entirely in Datasette 1.0.
This can generate a config.json file that's included the published deployment, thanks to the work in #731 (pull request #739).
Relevant support question on Twitter: https://twitter.com/simonw/status/1312926103627988993
See also #992 which will rename --config to --setting.
I'm going to try this out on datasette-publish-vercel first.
I really like this in datasette-publish-vercel - I'm definitely going to bring this to the other publish implementations as well.
Ah, okay so --extra-options applies to both datasette publish and datasette package? There wren't any examples of it being used with publish in the docs, so this tripped me up for a bit.
datasette package is a mostly unmaintained feature at this point - it has a bit of test coverage but I've not made any improvements to it in a few years, and I don't use it for my own projects.
I'll make this change to package at the same time as I land it for publish though.
Came here to check if this had been flagged already. Was helping a colleague get something on Cloud Run and had to dig to find --extra-options="--setting sql_time_limit_ms 2500".
If I get some time next week, maybe I'll try to tackle it. Would definitely make things easier to be able to do something like this:
datasette publish cloudrun something.db --setting sql_time_limit_ms 2500