Production-ship hardening: runnable examples, clean-install verified, FURS runtime documented#6
Merged
Merged
Conversation
- examples/e-invoice.ts: model → e-SLOG 2.0 (XSD-valid) + UBL, runnable. - examples/furs-offline.ts: FURS ZOI + request-JWS + response-verify, offline (runs under bun; no live call / cert needed). - docs/FURS-RUNTIME.md: the bun-no-outbound-mTLS blocker documented as a clearly-marked opt-in/Node-runtime path (not a silent gap), with a runnable Node snippet + the opt-in live test instructions. - README: link examples + the runtime doc; sharpen the FURS runtime warning. Verified clean install from a fresh consumer repo (bun pm pack → bun add tgz): top-level + ./eslog + ./furs imports all resolve and run, the bundled e-SLOG XSDs load from node_modules, and all transitive deps install. UNLICENSED + GitHub Packages + bunfig.toml confirmed. 44 pass / 1 skip, tsc clean. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hardens fiscalize to production-ship state (engine already merged). Docs/examples only — no library code change. 44 pass / 1 skip, tsc clean.
1. Runnable examples (
examples/)e-invoice.ts— model →createEInvoicee-SLOG 2.0 (XSD-validated on the way out) + UBL + explicitvalidateEslogXml+ clean 400 on bad input.furs-offline.ts— full FURS crypto offline: load cert → ZOI → printable (QR/PDF417) → request-JWS → response-verify → EOR. Runs under bun (no live call / real cert needed). This is the basis the upcoming demo app can build on.Both run green (
bun run examples/…). README snippets corrected to match.2. Clean install from a consumer repo — verified
bun pm pack→ freshbun initrepo →bun addthe tarball → imported and ran as a real consumer:@grunt-it/fiscalize,@grunt-it/fiscalize/eslog,@grunt-it/fiscalize/fursall resolve;node_modules(the key packaging risk — confirmed working when installed);license: UNLICENSED,publishConfig→ GitHub Packages, noprivate: true(publish works),bunfig.tomlpresent (env-var token, house standard).3. FURS runtime blocker — documented, not silent
New
docs/FURS-RUNTIME.md: bun ≤1.3.6 can't present an outbound mTLS client cert, so live FURS (echo/reportInvoice/registerBusinessPremise) must run under Node on a non-proxied network. Includes the opt-in Node snippet + how to run the skipped live integration test + the demo-cert details. README carries a sharpened ⚠ pointer.Forbidden zone respected
Did not touch the Medusa-plugin consumer (jp2jo0ec's territory).
Next: ready to ship to the registry
The engine + this hardening make v0.1.0 publishable. Publishing = the tag-triggered CI (
publish.ymlonv*→ GitHub Packages). I've teed it up but not pushed the tag — release-to-consumers is a confirm-first action; say go and I'll cutv0.1.0(needed so the demo app / medusa plugin canbun add @grunt-it/fiscalizefrom GH Packages rather than a local tarball).🤖 Generated with Claude Code