-
v2.2.0 Stable
released this
2026-10-17 08:22:48 +02:00 | 1 commits to main since this releaseFixes
i18n/en.jsonandi18n/de.jsonlacked theschemafield that
daw_i18n/v1requires in every resource file. Both files now carry
"schema": "daw_i18n/v1". daw-lua-net itself never read the field, so
its behaviour is unchanged; consumers that validate the header of a
resource file (for example when merging the i18n sources of several
libraries) rejected the files before.
Internal
- No code and no API change. The 30 resources and the
source_hash
values ini18n/de.jsonare unchanged. - Tested with daw-lua-common 2.1.1 and 2.2.0: 67 tests, Lua 5.1 and 5.4.
Requires daw-lua-common >= 2.1.0.
Downloads
-
Source code (ZIP)
0 downloads
-
Source code (TAR.GZ)
0 downloads
-
v2.1.2 Stable
released this
2026-09-21 08:04:15 +02:00 | 5 commits to main since this releaseFixes
- The local error helpers (
fail_missing()ininit.lua,fail()in
ip_utils.luaandhttp_client.lua) now fall back to the
daw-error-facility-unavailablesentinel ifdaw_error.new()
returns neither an object nor an error, instead of returningnil.
Not reachable with the currentdaw.common.error; this hardens the
modules against a broken or replaced error facility.
See DAW/daw-lua-net#14.
Internal
- The context of the three sentinel resources in
i18n/en.jsonnow
covers the no-result case (text unchanged);source_hashin
i18n/de.jsonrecomputed. - Test suite: 66 -> 67 tests.
Requires daw-lua-common >= 2.1.0.
Downloads
-
Source code (ZIP)
0 downloads
-
Source code (TAR.GZ)
0 downloads
- The local error helpers (
-
v2.1.1 Stable
released this
2026-09-20 20:11:10 +02:00 | 9 commits to main since this releaseNew
daw_i18n/v1language resources:i18n/en.json(canonical) and
i18n/de.json, 30 resources in total. Every error construction site
now carries its ownresource_id(init.lua3,ip_utils.lua15,
http_client.lua12). Error codes are unchanged.
Changed
- Bootstrap case: if
daw.common.erroritself is unreachable, all
modules now return the reserveddaw_error/v1sentinel
(id = "daw-error-facility-unavailable", withresource_id) instead
of a plain"[ERROR] ..."string. This removes the one documented
exception to the error contract. http_client: a connection failure now has the message
request failed; the raw LuaSocket error text moved to
err.data.detail. The code (connection_failed) and themethod/
urldata fields are unchanged.- Stub messages: the facade stub in
init.luanow reads
<name> submodule not available(the load error is in
err.data.detail); the dependency stub inhttp_clientreads
http_client unavailable: required dependency <name> is missingand
carrieserr.data.dependency.
Fixes
http_client: the dependency stub (missingsocket.http,ltn12or
daw.common.json) returned the error object as its first value
instead ofnil, err, so a caller checkingif not resulttreated
the error as a result. It now returnsnil, daw_error/v1.
See DAW/daw-lua-net#12.
Internal
http_client.lua:request()now builds itsdaw_error/v1where
each failure is detected;get/post/putjust return
request(...).Makefile: removed the obsoleteinstall/uninstalltargets. The
module is shipped as a git submodule inlib/daw/net/
(DAW/daw-lua-net#13).README.md: Contributing section aligned with the GitHub Issues
policy (DAW/daw-lua-net#11); the error-contract section describes the
sentinel.- Test suite: 64 -> 66 tests.
Migration
Only code that inspects error text or the bootstrap string needs
changes: a check for the old plain"[ERROR] ..."fallback string,
message:find(...)on the raw LuaSocket text (now
err.data.detail), or matching the old stub messages. Code that only
checksif err thenorerr.codeis unaffected.Requires daw-lua-common >= 2.1.0.
resource_idis set on errors built
throughdaw.common.erroronly with a daw-lua-common release that
supportsopts.resource_id; with 2.1.0 the field is accepted and
ignored (the sentinel objects carry it directly).See DAW/daw-lua-net#10.
Downloads
-
Source code (ZIP)
0 downloads
-
Source code (TAR.GZ)
0 downloads
-
v2.1.0 Stable
released this
2026-08-10 13:19:40 +02:00 | 20 commits to main since this releaseBreaking changes
- All public failures across
http_clientandip_utilsnow return
nil, <daw_error/v1 object>instead ofnil, <string>. The return
contract itself (result, nil | nil, err) is unchanged -- only what
erris. SeeMIGRATION-DAW-LUA-NET-2.1.mdfor the full code table
and cause-chain examples. init.lua's facade stub (missing submodule case) likewise now
returnsnil, daw_error/v1instead of a string.
Fixes
- Module registration (
_G.daw_registerguard) corrected from
type(_G.daw_register) == "function"to the simple truthy check
if _G.daw_register then ..., matching the lived pattern already
used acrossdaw-lua-common(accepted decision, see
DAW/daw-docs#18). ip_utils.ip_matches_cidr(): the exact-match path (no/in
cidr) previously skipped IPv4 validation entirely and crashed with
a raw Lua error on a non-stringcidr(e.g.nil). Bothipand
cidrare now validated the same way regardless of which path is
taken.ip_utils.is_ip_allowed()/get_client_ip(): a non-table
allowed_ips/trusted_proxies(e.g. a bare string) previously
reached#/ipairs()directly and could crash or silently
misbehave. Both now returnnil, daw_error/v1for a non-table,
non-nil value.http_client:opts.headerswas previously used directly without a
type check; a non-table value (e.g. a string) could crash inside
pairs()/header lookup. Now validated up front in bothrequest()
andget_raw().http_client.post/put: ajson.encode()failure was previously
flattened into plain text ("encode failed: " .. tostring(err)),
discarding the structureddaw_error/v1fromjson.encode(). It is
now preserved ascauseon the resultingencode_failederror,
consistent with howip_utilsalready chains errors.
Internal
http_client.lua: internalrequest()helper now returns a
machine-readable reason keyword alongside its plain-text error, so
the publicget/post/putfunctions can build precise
daw_error/v1codes (invalid_opts,encode_failed,
connection_failed) without parsing error text.ip_utils.lua: nine distinct error codes across
ip_matches_cidr/is_ip_allowed/get_client_ip; public-to-public
error propagation now usescauseembedding instead of string
concatenation.init.lua: facade rebuilt around thedaw_error/v1-aware
fail()/module_stub()pattern shared withdaw.common/init.lua.test/dev-module-map.lua: addeddaw.common.error,
daw.common.error.util,daw.common.uuid-- required by the new
error contract, previously missing from this repo's dev module map.- New
test/test_init.luacovering the root facade (submodule
aggregation, object identity, stub fallback on a missing submodule),
mirroringdaw-lua-common'stest_init.lua. - Test suite: 42 -> 64 tests.
Migration
Only code that inspects error text (string matching/parsing on
err) needs changes -- code that only checksif err thenis
unaffected.MIGRATION-DAW-LUA-NET-2.1.mdwalks through the full
error-code reference and cause-chain examples.Requires daw-lua-common >= 2.1.0 (for
daw.common.error).Downloads
-
Source code (ZIP)
0 downloads
-
Source code (TAR.GZ)
0 downloads
- All public failures across
-
v2.0.0 Stable
released this
2026-07-25 20:24:51 +02:00 | 25 commits to main since this releaseBreaking changes
http.get/post/put(url, [body], opts)-- headers parameter replaced by
anoptstable:{ timeout = <seconds>, headers = <table, optional> }.
timeoutis required, no default.http.get/post/put/get_rawnow return{ body, status, headers }, nil
on success ornil, erron failure, replacing the previous
body, status, errpositional return.ip_utils.ip_matches_cidrandip_utils.is_ip_allowednow return
nil, errfor malformed CIDRs, out-of-range masks, or non-IPv4 input,
instead of treating them as an ordinaryfalse.is_ip_allowedfails
closed on the first malformed entry inallowed_ips.ip_utils.get_client_ip(request, trusted_proxies)-- new required
request.remote_addrfield (the real TCP peer address). Forwarding
headers (x-forwarded-for,x-real-ip) are only honored when
trusted_proxiesis given andremote_addrmatches it; the previous
hardcoded127.0.0.1fallback is gone. IPv4 only.
Fixes
json.decode/json.encodeare no longer relied upon to throw --
aligned with the daw-lua-common 2.0.0 contract.socket.http/ltn12requires are now wrapped inpcall.- Case-insensitive header handling in
http_client(no more duplicate
Content-Type/Content-Lengthwhen the caller already supplied a
differently-cased variant).
Internal
init.luarebuilt around themodule_stub()/load_submodule()
facade pattern shared withdaw.common/init.lua.- All public functions consistently return
result, nil | nil, err,
includingtrue, nil/false, nilfor predicate functions. - Test suite: 20 -> 42 tests.
Migration
Callers of
http_clientandip_utilsneed code changes -- see
DAW/steurjan#144 for a worked example. A dedicated migration guide is
planned; until then, DAW/daw-lua-net#6 documents the full change set.Requires daw-lua-common >= 2.0.0.
Downloads
-
Source code (ZIP)
1 download
-
Source code (TAR.GZ)
1 download