Skip to content

Commit 7ab1d92

Browse files
committed
feat: expand settings API (#1192)
* feat: unified config foundation * refactor: separate user-facing settings and move thumbnail code * feat: impl profiles, thumbnail.prefer_smallest_format, remove default_format * feat: implement auto_opened, auto_created, and claim_generator_infos settings * feat: impl auto_opened setting * fix: default all_actions_included in actions assertion to true * fix: all test cases * docs: cleanup comments and document new functions * test: add thumbnail tests * fix: auto actions assertion, lots of tests, crash when empty actions, and optional settings values * fix: optional signer settings and document get_profile_settings_signer * docs: document Builder::add_auto_actions_assertion * test: remove test code in test * feat: add settings to CLI * docs: create an example c2pa.toml settings * fix: cli settings * feat: add config path and env vars for cli settings arg * fix: remove bmp and ico from supported thumbnails * fix: single claim generator info and rename load settings functions * test: remove scoped settings * refactor: remove profiles and document digital source type * feat: allow specifying digital source type for auto actions in settings * refactor: convert usage of json settings to toml * refactor: move global settings functions into public `Settings` struct * refactor: move builder settings into its own module * fix: add ingredient uris to auto actions, only add placed actions if not added already, and use builder claim gen info or settings * feat: add `Settings::from_url` * feat: setup base for remote signers and cawg signers in settings * feat: impl `RemoteSigner` and fix when pulling optional settings * feat: prefer_smallest_format tiff->jpeg * feat: allow specifying infer operating system for claim generator info * refactor: default test signer in `Settings` * fix: source type optional for auto add actions and use ref for test signer to prevent freeze * feat: add `ActionsSettings`, all_actions_included, action_templates, actions * docs: add new fields to c2pa.toml * fix: wip change serde_json::Value in settings to toml::Value (issues with this in TODO comments) * fix: actions/action_templates and add tests, use toml for defining settings instead of setting each field * test: cleanup and add more builder and settings tests * fix: make_thumbnail_from_stream format before stream in parameters * docs: finish documenting some settings structs * fix: private Settings set/get_value * test: add allActionsIncluded by default when signing to test * style: +nightly fmt * fix: feature flag thumbnails and wasm * test: fix hash_alg string * fix: remove cawg_signer, doc cli config path, move signer to top-level settings, fix wasi issue by reset settings before test, resourceref icons * feat: define ActionSettings * fix: remove Settings top-level export for now * test: add remote signer test with mock server * fix: change `builder.signer` setting to just `signer` * fix: test sample toml and fix up fields * test: don't use httpmock on wasm * test: fix wasi test
1 parent 09529b1 commit 7ab1d92

File tree

25 files changed

+2562
-460
lines changed

25 files changed

+2562
-460
lines changed

Cargo.lock

Lines changed: 114 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)