jala_core 0.8.2
jala_core: ^0.8.2 copied to clipboard
Pure-Dart core for Jala: call model, store, redaction, filter grammar, exporters, call/JSON diff, cURL/HAR import, network throttling, and session export/import. Zero Flutter.
0.8.2 — 2026-08-11 #
Added #
-
JalaConfig.locale— BCP-47 language tag selecting the inspector's UI language ('id-ID','en'). Optional, defaults tonull, andnullmeans English, not "follow the device": the platform locale is deliberately never consulted, so upgrading changes nothing for a host that does not set it.Stored as a
Stringrather than aLocalebecauseLocalelives indart:uiandjala_corestays free of Flutter;jala_uiparses it.
0.8.1 — not published separately #
Prepared in the repo, then folded into 0.8.2 before it reached pub.dev. Everything below shipped in 0.8.2; there is no 0.8.1 on pub.dev.
- Lockstep release. No changes in this package; see the
jalaandjala_uichangelogs for the Android input/back fixes and the new file-backed export destination.
0.8.0 — 2026-08-03 #
Fixed #
- Body redaction now covers every captured body shape. New
CapturedBody.captureRedactedrunsJalaRedactor.redactBodyover the text form a capture actually retains — including already-decodedMap/Listbodies, which are encoded to JSON and redacted first. Previously each adapter decided for itself when to redact and only handled bodies that were alreadyString, so the most common shapes in the ecosystem bypassed redaction entirely. Adapters must use this rather thanCapturedBody.capturefor anything off the wire. CapturedBody.captureRedactedtakesknownTruncatedfor callers that already cut a body short upstream, replacing the "pass a cap one byte below the buffer length" trick — which redaction, being free to shrink the text, could silently defeat and report a truncated body as complete.JalaRedactor.defaultJsonSecretValuesalso matches a secret value that runs to the end of the text, so a body captured over the size cap does not leave the visible prefix of a token unmasked.HarExporterbuildsqueryStringfrom the raw query rather thanUri.queryParameters, which collapses repeated keys —?tag=a&tag=bexported as a singletag=b, losing a parameter the app really sent.DartSnippetExportermarks masked header values with a trailing comment instead of emitting them as ordinary string literals, and gained theredactedflagCurlExporteralready had (false drops masked headers).JalaReplayRegistry.replaythrows the newJalaReplayExceptionfor an entry whose request body hit the capture cap. Replay used to resend whatever prefix survived, silently delivering a corrupt payload to a live endpoint.replayModifiedwith an explicit body is unaffected — that is the developer supplying the real content.
Added #
- gRPC model support (Track G, G1):
NetworkCallEntry.rpcKind,grpcStatusCodeandtrailers, populated from matching fields onNetworkRequestEvent/NetworkResponseEvent/NetworkErrorEvent.grpcStatusCodeis separate fromstatusCodebecause a failed RPC rides on an HTTP 200, andJalaFilter'ss:erroraccounts for that — without it every NOT_FOUND would file under "success". Newis:grpcterm; streaming messages reuse the existing subscription payload ring buffer. JalaGrpcStatus— canonical gRPC status codes and names. Lives here, not injala_grpc, becausejala_uirenders the name and adapters never depend on the UI (nor it on them).JalaReplayExceptionandNetworkCallEntry.replayBlockedReason(via theJalaReplayabilityextension).parseQueryParams/JalaQueryParam, moved here fromjala_uiso the detail screen and the HAR exporter share one wire-faithful parser.
0.7.0 #
- Redaction now covers URLs:
JalaRedactor.redactUrimasks the values of sensitive query parameters (defaultRedactedQueryParams— thedefaultFormSecretValuesname list plus presigned-URLsignature/X-Amz-*params), configurable via the newredactedQueryParamsconstructor argument. A token in a URL is as sensitive as one in a header and more exposed, since the full URL appears on the call list, in the detail screen, and in every cURL / HAR / Dart-snippet export. The raw query is rewritten segment by segment, so repeated keys, valueless params (?q&page=1) and existing percent-encoding survive untouched. Empty values (?token=) are left alone. JalaRedactor.stripMaskedQueryParamsremoves masked parameters from a URL, for replayers that must not resend••••••as a credential.
0.6.0 #
- Call diff model:
JalaJsonDiff.diff(structural recursiveDiffNode— added/removed/changed/unchanged) andJalaEntryDiff.of(status, headers case-insensitively, request/response JSON bodies). - Import codecs:
JalaCurlCodec.decode→ImportedRequest(method, URI, headers, body; shell quotes,-H/-d/-X/-u, defaults POST when data present);JalaHarCodec.decode→JalaSessionofimported: trueentries. Failures are typed (JalaImportFormatException/JalaSessionFormatException), never crashes.
0.5.3 #
- Security: expanded default redacted headers (CSRF, session, AWS STS, …).
- Security: default body redaction for common JSON/form secret keys
(
password,access_token,api_key, …); opt out viaincludeDefaultBodyPatterns: false. - Session export:
JalaSessionExportOptions(full / noBodies / headersOnly / stripImages). - Session import: reject pastes larger than 8 MiB
(
JalaSessionCodec.defaultMaxDecodeChars).
0.5.2 #
- Lockstep release; no functional changes.
0.5.1 #
- Pub metadata:
homepage,issue_tracker, and description now mentions throttling + session export/import (docs-only; no API changes).
0.5.0 #
- Network throttling model:
JalaThrottleProfile(latency/jitter/bandwidth/ drop rate) with const presetsslow3g/fast3g/flaky/offline, andJalaThrottleRegistryon the binding (activeProfile, host-pattern glob,watch,shouldDrop/latencyFor/paceFor). Active only while the binding is enabled. - Session share codec:
JalaSessionCodec.encode/decodewith a versioned JSON envelope (jala-sessionmarker, v1). Round-tripsNetworkCallEntry(incl. captured bodies) andWsConnectionEntry+ frames; defensiveJalaSessionFormatExceptionon malformed input. JalaStore.importSession(replace/append) +isViewingImport; imported entries are taggedimported: true.- GraphQL subscription payload ring:
NetworkSubscriptionPayloadEvent,NetworkCallEntry.payloads/payloadCount, capped byJalaConfig.maxSubscriptionPayloads(default 50; wired throughJalaBinding.initialize). - Filter grammar:
is:subscription.
0.4.0 #
- GraphQL metadata on the existing call model:
NetworkCallEntry/NetworkRequestEventgainoperationName/operationType(query/mutation/subscription) — GraphQL calls are stillNetworkCallEntrys, just tagged. - New WebSocket entity:
WsConnectionEntry(id, uri, status, open/close times, close code/reason, frame count) with a per-connectionWsFramering buffer (default 200 frames; direction, binary flag, size, redacted text preview capped at 4 KB). New events:WsConnectEvent,WsOpenEvent,WsFrameEvent,WsCloseEvent,WsErrorEvent. JalaStoregains a parallelwsConnectionscollection (cap 20, oldest-closed evicted first) and awatchWsstream, independent of the existingentries/watch— WebSocket connections are never merged intoNetworkCallEntryat the core layer.- Filter grammar:
op:<name>(operationName glob),is:graphql(operationName != null),is:ws, and a newmatchesWsentry point for matchingWsConnectionEntry(bare text,host:/d:,status:/s:,is:ws).
0.3.0 #
- Mock rule engine:
JalaMockRule, sealedMockAction(MockResponse/MockFailure/MockDelay),JalaMockRegistry, and pluggableJalaMockStore(in-memory default). - URL glob helper
globMatchesfor full-URL pattern matching. NetworkCallEntry.mockRuleId/ request-event field for mocked calls.- Filter grammar:
is:mocked. - Replay API:
JalaReplayer.replayModified+ registry helper for edit-and-resend.
0.2.0 #
- Image body capture:
BodyKind.imageplusCapturedBody.bytes/CapturedBody.captureBytes, gated byJalaConfig.captureImageBodies(default true) andmaxBodyBytes. - Multipart model:
JalaMultipartPartandCapturedBodyMultipartwith the{"@multipart": [...]}JSON convention for structured part metadata. - Progress events:
NetworkProgressEvent(sent/received byte counters) andNetworkCallEntry.progressupdated live by the store. - cURL exporter emits
-Fflags with filename placeholders for multipart bodies (never real file contents); image bodies export as size/mime placeholders.
0.1.1 #
- Add pub.dev topics.
0.1.0 #
- Initial release:
NetworkCallEntry/CapturedBodymodels with a 512 KB per-body cap and safe handling of binary, oversize, and malformed-UTF8 data. JalaEventBus+JalaStorering buffer (default 300 entries) correlating request/response/error/cancel events by call id, evicting oldest completed entries first.JalaRedactor— case-insensitive header redaction (Authorization,Cookie,X-Api-Key, etc. by default) and body pattern redaction, designed to run at capture time so secrets never enter the store.JalaFilterDevTools-style query grammar:method:/m:,status:/s:,host:/d:,path:,type:/t:,larger-than:,slower-than:,is:replay,body:, bare text, and-negation.CurlExporter,DartSnippetExporter, andHarExporter(HAR 1.2, single call or whole session).JalaBindingprocess-wide singleton andJalaReplayRegistryso client integrations (e.g.jala_dio) can wire capture and replay.JalaConfigwithenabled,maxEntries,maxBodyBytes, andredactor.