Skip to content

Commit 1cdf3eb

Browse files
committed
Release v0.12.0
1 parent f7c9a48 commit 1cdf3eb

5 files changed

Lines changed: 27 additions & 7 deletions

File tree

CHANGELOG.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,23 @@
11
# CHANGELOG
22

3+
## v0.12.0 (2025-10-26)
4+
5+
* Add short URL API `hex_api_short_url:create/2`.
6+
* Add OAuth API:
7+
* `hex_api_oauth:device_authorization/3,4`
8+
* `hex_api_oauth:poll_device_token/3`
9+
* `hex_api_oauth:refresh_token/3`
10+
* `hex_api_oauth:revoke_token/3`
11+
* `hex_api_oauth:client_credentials_token/4,5`
12+
* Support 2FA authentication, any API request can now return `{error, otp_required | invalid_totp}`
13+
if 2FA is required. The config option `api_otp` can be used to provide the TOTP code.
14+
* Differentiate between registry verification errors. `{error, unverified}` has been replaced with
15+
`{error, bad_repo_name | bad_signature}`.
16+
* Support nested maps in `extra` package metadata field.
17+
318
## v0.11.0 (2024-12-03)
419

520
* Use secure SSL defaults for OTP 25+.
6-
721
* Start inets and ssl applications.
822

923
## v0.10.3 (2024-06-28)

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ Publish package tarball:
9292

9393
### Two-Factor Authentication
9494

95-
When using OAuth tokens, two-factor authentication may be required. If required, the server will return `{error, otp_required}` and you should retry the request with the TOTP code via the `api_otp` configuration option:
95+
When using OAuth tokens, two-factor authentication may be required. If required, the server will return `{error, otp_required}` and you should retry the request with the TOTP code via the `api_otp` configuration option. If the TOTP code is incorrect, the server will return `{error, invalid_totp}` and you should retry with the correct TOTP code.
9696

9797
```erlang
9898
%% First attempt without OTP
@@ -101,6 +101,10 @@ case hex_api_release:publish(Config, Tarball) of
101101
%% Retry with TOTP code
102102
ConfigWithOTP = Config#{api_otp := <<"123456">>},
103103
hex_api_release:publish(ConfigWithOTP, Tarball);
104+
{error, invalid_totp} ->
105+
%% Retry with correct TOTP code
106+
ConfigWithOTP = Config#{api_otp := <<"123456">>},
107+
hex_api_release:publish(ConfigWithOTP, Tarball);
104108
Result ->
105109
Result
106110
end.
@@ -217,7 +221,7 @@ Add to `rebar.config`:
217221
218222
```erlang
219223
{deps, [
220-
{hex_core, "0.11.0"}
224+
{hex_core, "0.12.0"}
221225
]}
222226
```
223227
@@ -228,7 +232,7 @@ Add to `mix.exs`:
228232
```elixir
229233
defp deps do
230234
[
231-
{:hex_core, "~> 0.11.0"}
235+
{:hex_core, "~> 0.12.0"}
232236
]
233237
end
234238
```

src/hex_core.app.src

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{application, hex_core, [
22
{description, "Reference implementation of Hex specifications"},
3-
{vsn, "0.11.0"},
3+
{vsn, "0.12.0"},
44
{registered, []},
55
{applications, [kernel, stdlib, inets, ssl]},
66
{licenses, ["Apache-2.0"]},
7-
{include_files, ["CHANGELOG.md"]},
7+
{include_paths, ["CHANGELOG.md"]},
88
{links, [
99
{"GitHub", "https://github.com/hexpm/hex_core"},
1010
{"Hex specifications", "https://github.com/hexpm/specifications"}

src/hex_core.hrl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
-define(HEX_CORE_VERSION, "0.11.0").
1+
-define(HEX_CORE_VERSION, "0.12.0").

src/hex_http.erl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
-type headers() :: #{binary() => binary()}.
1414
-export_type([headers/0]).
1515
-type body() :: {ContentType :: binary(), Body :: binary()} | undefined.
16+
-export_type([body/0]).
1617
-type adapter_config() :: map().
18+
-export_type([adapter_config/0]).
1719

1820
-callback request(method(), URI :: binary(), headers(), body(), adapter_config()) ->
1921
{ok, {status(), headers(), binary()}}

0 commit comments

Comments
 (0)