@atom-forge/rpc 0.3.6 → 0.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/CHANGELOG.md +27 -27
  2. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  ### Fixed
6
6
 
7
- - **Node.js / Bun kompatibilitás fájlfeltöltésnél** — egyes runtime-ok (pl. Node.js/undici) multipart form data esetén nem őrzik meg a blob MIME típusát. Ha `argsBlob.type` üres, a szerver mostantól `application/msgpack`-re esik vissza, ahelyett hogy `ParseError`-t dobna.
7
+ - **Node.js / Bun compatibility for file uploads** — some runtimes (e.g. Node.js/undici) do not preserve the MIME type of a blob when using multipart form data. If `argsBlob.type` is empty, the server now falls back to `application/msgpack` instead of throwing a `ParseError`.
8
8
 
9
9
  ---
10
10
 
@@ -12,12 +12,12 @@
12
12
 
13
13
  ### Added
14
14
 
15
- - **Patron License** — saját licencdokumentum hozzáadva (`LICENSE`).
15
+ - **Patron License** — added own license document (`LICENSE`).
16
16
 
17
17
  ### Changed
18
18
 
19
- - **`package.json` metaadatok** — kulcsszavak, repository URL, szerző és licencmező frissítve.
20
- - **README** — licenc- és közreműködési szekció bővítve.
19
+ - **`package.json` metadata** — keywords, repository URL, author and license fields updated.
20
+ - **README** — license and contribution sections expanded.
21
21
 
22
22
  ---
23
23
 
@@ -25,14 +25,14 @@
25
25
 
26
26
  ### Added
27
27
 
28
- - **Client logger** (`src/client/logger.ts`) — önálló modul a kliens oldali debug naplózáshoz.
29
- - **Cookie segédlet** (`src/util/cookies.ts`) — cookie kezelő utility a szerver kontextushoz.
30
- - **`ServerContext` cookie API** — `ctx.cookies` elérhetővé vált a handler-ekben.
28
+ - **Client logger** (`src/client/logger.ts`) — standalone module for client-side debug logging.
29
+ - **Cookie utility** (`src/util/cookies.ts`) — cookie handler utility for server context.
30
+ - **`ServerContext` cookie API** — `ctx.cookies` is now available in handlers.
31
31
 
32
32
  ### Changed
33
33
 
34
- - **Dokumentáció átstrukturálás** — `README.md` felosztva: `README.en.md`, `README.hu.md`, `README.llm.md` fájlokra.
35
- - **`createClient` logger integráció**a debug logging a dedikált logger modulon keresztül történik.
34
+ - **Documentation restructuring** — `README.md` split into `README.en.md`, `README.hu.md`, `README.llm.md` files.
35
+ - **`createClient` logger integration** — debug logging is now handled via the dedicated logger module.
36
36
 
37
37
  ---
38
38
 
@@ -40,28 +40,28 @@
40
40
 
41
41
  ### Breaking Changes
42
42
 
43
- - **URL formátum megváltozott.** A kliensoldali hívások mostantól pont-szeparátoros, teljes egészében `kebab-case` URL-t generálnak.
44
- - Régi: `/api/users/getProfile`
45
- - Új: `/api/users.get-profile`
46
- - **SvelteKit routing:** a `src/routes/api/[...path]/+server.ts` fájlt ajánlott `[path]`-ra cserélni, hogy a régi formátumú kérések ne kerüljenek részleges feldolgozásra.
43
+ - **URL format changed.** Client-side calls now generate dot-separated, fully `kebab-case` URLs.
44
+ - Old: `/api/users/getProfile`
45
+ - New: `/api/users.get-profile`
46
+ - **SvelteKit routing:** it is recommended to change `src/routes/api/[...path]/+server.ts` to `[path]` to prevent partial processing of old format requests.
47
47
 
48
48
  ### Added
49
49
 
50
- - **`flattenApiDefinition`** — a szerver indulásakor az API definícióból egy lapos `Map<string, { rpcType, handler }>` épül fel. Minden `handler` egy előre összerakott pipeline closure (middleware-ek + Zod-validáció + implementation), így kérésenként csak egy `Map.get()` és egy függvényhívás szükséges.
51
- - **`camelToKebabCase`** utility (`src/util/string.ts`) — megosztott segédfüggvény a kliens és szerver között, akronimákat helyesen kezelő regex-szel (`getUserID` → `get-user-id`).
52
- - **415 Unsupported Media Type** válasz ismeretlen `Content-Type` esetén `command` kéréseknél (korábban szótlanul msgpackr-rel próbálkozott).
50
+ - **`flattenApiDefinition`** — at server startup, a flat `Map<string, { rpcType, handler }>` is built from the API definition. Each `handler` is a pre-assembled pipeline closure (middlewares + Zod validation + implementation), so only a `Map.get()` and a function call are needed per request.
51
+ - **`camelToKebabCase`** utility (`src/util/string.ts`) — shared helper function between client and server, with a regex that correctly handles acronyms (`getUserID` → `get-user-id`).
52
+ - **415 Unsupported Media Type** response for unknown `Content-Type` in `command` requests (previously it silently tried with msgpackr).
53
53
 
54
54
  ### Changed
55
55
 
56
- - **`tango.ts` refaktor** — a `query`/`command`/`get` hármas és a Zod-kezelés duplikációja megszűnt. Két belső helper (`makeDescriptor`, `makeZodMethodSet`) váltja ki a korábbi ~195 soros, triplikált logikát (~76 sorra csökkentve).
57
- - **`endpointMap`** — a korábbi félrevezető `flatMap` név helyett.
58
- - **Kliens debug logging** — `isDebug` konstans (korábban kétszer kiértékelt feltétel); hiba esetén az error a konzolcsoporton belül jelenik meg, a csoport mindig bezárul (korábban pipeline-hiba esetén nyitva maradt).
59
- - **Kliens `middlewareMap` kulcsok** — az új URL-konvencióval konzisztens formátumra frissítve (`.` szeparátor, kebab-case).
56
+ - **`tango.ts` refactor** — duplication of `query`/`command`/`get` triad and Zod handling removed. Two internal helpers (`makeDescriptor`, `makeZodMethodSet`) replace the previous ~195 line triplicated logic (reduced to ~76 lines).
57
+ - **`endpointMap`** — renamed from the misleading `flatMap` name.
58
+ - **Client debug logging** — `isDebug` constant (previously a twice-evaluated condition); in case of error, the error appears inside the console group, and the group always closes (previously it remained open in case of pipeline error).
59
+ - **Client `middlewareMap` keys** — updated to a format consistent with the new URL convention (dot separator, kebab-case).
60
60
 
61
61
  ### Fixed
62
62
 
63
- - **Heterogén File tömb feltöltés** — a feltöltési logika mostantól az összes tömbelemre ellenőrzi, hogy `File`-e (`every()`), nem csak az elsőre.
64
- - **`abortSignal` / `onProgress`** — felesleges ternary operátor eltávolítva a `ClientContext` konstruktorában.
63
+ - **Heterogeneous File array upload** — the upload logic now checks if all array elements are `File` (`every()`), not just the first one.
64
+ - **`abortSignal` / `onProgress`** — unnecessary ternary operator removed in `ClientContext` constructor.
65
65
 
66
66
  ---
67
67
 
@@ -69,13 +69,13 @@
69
69
 
70
70
  ### Changed
71
71
 
72
- - Függőség-frissítések.
73
- - Zod re-export `tz` névvel (`import { tz } from "@atom-forge/rpc"`).
74
- - Kódstílus-egységesítés (tömör importok, tab indentáció) az összes forrásfájlban.
75
- - Pipeline middleware viselkedés finomítva: `undefined`-ot ad vissza, ha nincs illeszkedő middleware.
72
+ - Dependency updates.
73
+ - Zod re-export with `tz` name (`import { tz } from "@atom-forge/rpc"`).
74
+ - Code style unification (concise imports, tab indent) across all source files.
75
+ - Pipeline middleware behavior refined: returns `undefined` if no middleware matches.
76
76
 
77
77
  ---
78
78
 
79
79
  ## [0.1.0] - 2025-xx-xx
80
80
 
81
- Kezdeti implementáció: type-safe RPC keretrendszer middleware támogatással, Zod validációval, fájlfeltöltéssel és progress tracking-gel.
81
+ Initial implementation: type-safe RPC framework with middleware support, Zod validation, file uploads and progress tracking.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atom-forge/rpc",
3
- "version": "0.3.6",
3
+ "version": "0.3.7",
4
4
  "description": "Type-safe RPC framework for TypeScript with Zod validation and middleware support",
5
5
  "keywords": [
6
6
  "rpc",