@authup/i18n 1.0.0-beta.49 → 1.0.0-beta.50
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.
- package/dist/error.d.ts +9 -9
- package/dist/index.d.mts +9 -9
- package/package.json +4 -4
package/dist/error.d.ts
CHANGED
|
@@ -7,16 +7,15 @@
|
|
|
7
7
|
* (`TranslatorTranslationNamespace.ERROR`, value `authupError`) — a
|
|
8
8
|
* *sibling* of validup's own `validup` namespace rather than merged into
|
|
9
9
|
* it, so `@ilingo/validup-vue`'s install can't overwrite authup codes
|
|
10
|
-
* (and vice versa). `
|
|
11
|
-
*
|
|
12
|
-
* against this namespace.
|
|
10
|
+
* (and vice versa). `useErrorTranslator()` (in `@authup/client-web-kit`)
|
|
11
|
+
* resolves a server error's `code` + `data` against this namespace.
|
|
13
12
|
*
|
|
14
13
|
* The catalog is keyed by `@authup/errors`' `ErrorCode` values. The
|
|
15
14
|
* `AuthupErrorData` map below is the typed *producer* contract — the
|
|
16
15
|
* structured data each code may carry on the wire — and the
|
|
17
16
|
* `declare module 'validup'` block augments validup's `IssueDataByCode`
|
|
18
17
|
* wherever this package is imported. Today that is the client only
|
|
19
|
-
* (`@authup/client-web-kit` re-exports this module, so `
|
|
18
|
+
* (`@authup/client-web-kit` re-exports this module, so `useErrorTranslator()`
|
|
20
19
|
* and any client-side issue construction get the typed `data`). It does
|
|
21
20
|
* **not** reach server-side producers: `apps/server-core` does not depend
|
|
22
21
|
* on `@authup/i18n`. If typed `defineIssueItem` / `createValidupError`
|
|
@@ -29,11 +28,12 @@
|
|
|
29
28
|
* `{{param}}`), not because the data is unavailable but because ilingo's
|
|
30
29
|
* `template()` leaves an unknown data key in place verbatim — a message
|
|
31
30
|
* like `'The {{entity}} ...'` would render the literal `{{entity}}`
|
|
32
|
-
* whenever a producer omits it.
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
* logging / richer UI
|
|
31
|
+
* whenever a producer omits it. `useErrorTranslator()` passes the whole
|
|
32
|
+
* serialized error body to `get()` as `data`, so a parameterized message
|
|
33
|
+
* would interpolate from it — but since every shipped message is currently
|
|
34
|
+
* param-free, interpolation is a no-op and the data just rides along
|
|
35
|
+
* (ready for logging / richer UI). If a `{{param}}` message is added later,
|
|
36
|
+
* merge per-code defaults before `get()` so a missing param can't leak.
|
|
37
37
|
*/
|
|
38
38
|
/**
|
|
39
39
|
* Interpolation params per parameterized `ErrorCode`. Keys are the
|
package/dist/index.d.mts
CHANGED
|
@@ -411,16 +411,15 @@ declare const CATALOGS: import("ilingo").CatalogNode;
|
|
|
411
411
|
* (`TranslatorTranslationNamespace.ERROR`, value `authupError`) — a
|
|
412
412
|
* *sibling* of validup's own `validup` namespace rather than merged into
|
|
413
413
|
* it, so `@ilingo/validup-vue`'s install can't overwrite authup codes
|
|
414
|
-
* (and vice versa). `
|
|
415
|
-
*
|
|
416
|
-
* against this namespace.
|
|
414
|
+
* (and vice versa). `useErrorTranslator()` (in `@authup/client-web-kit`)
|
|
415
|
+
* resolves a server error's `code` + `data` against this namespace.
|
|
417
416
|
*
|
|
418
417
|
* The catalog is keyed by `@authup/errors`' `ErrorCode` values. The
|
|
419
418
|
* `AuthupErrorData` map below is the typed *producer* contract — the
|
|
420
419
|
* structured data each code may carry on the wire — and the
|
|
421
420
|
* `declare module 'validup'` block augments validup's `IssueDataByCode`
|
|
422
421
|
* wherever this package is imported. Today that is the client only
|
|
423
|
-
* (`@authup/client-web-kit` re-exports this module, so `
|
|
422
|
+
* (`@authup/client-web-kit` re-exports this module, so `useErrorTranslator()`
|
|
424
423
|
* and any client-side issue construction get the typed `data`). It does
|
|
425
424
|
* **not** reach server-side producers: `apps/server-core` does not depend
|
|
426
425
|
* on `@authup/i18n`. If typed `defineIssueItem` / `createValidupError`
|
|
@@ -433,11 +432,12 @@ declare const CATALOGS: import("ilingo").CatalogNode;
|
|
|
433
432
|
* `{{param}}`), not because the data is unavailable but because ilingo's
|
|
434
433
|
* `template()` leaves an unknown data key in place verbatim — a message
|
|
435
434
|
* like `'The {{entity}} ...'` would render the literal `{{entity}}`
|
|
436
|
-
* whenever a producer omits it.
|
|
437
|
-
*
|
|
438
|
-
*
|
|
439
|
-
*
|
|
440
|
-
* logging / richer UI
|
|
435
|
+
* whenever a producer omits it. `useErrorTranslator()` passes the whole
|
|
436
|
+
* serialized error body to `get()` as `data`, so a parameterized message
|
|
437
|
+
* would interpolate from it — but since every shipped message is currently
|
|
438
|
+
* param-free, interpolation is a no-op and the data just rides along
|
|
439
|
+
* (ready for logging / richer UI). If a `{{param}}` message is added later,
|
|
440
|
+
* merge per-code defaults before `get()` so a missing param can't leak.
|
|
441
441
|
*/
|
|
442
442
|
/**
|
|
443
443
|
* Interpolation params per parameterized `ErrorCode`. Keys are the
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@authup/i18n",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.0-beta.
|
|
4
|
+
"version": "1.0.0-beta.50",
|
|
5
5
|
"description": "Framework-agnostic translation catalogs and locale registry.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"exports": {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"test:coverage": "cross-env NODE_ENV=test vitest run --coverage"
|
|
25
25
|
},
|
|
26
26
|
"engines": {
|
|
27
|
-
"node": "^
|
|
27
|
+
"node": "^22.13.0 || ^23.5.0 || >=24.0.0"
|
|
28
28
|
},
|
|
29
29
|
"keywords": [
|
|
30
30
|
"auth",
|
|
@@ -52,12 +52,12 @@
|
|
|
52
52
|
"ilingo": "^6.0.0"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
|
-
"@authup/errors": "^1.0.0-beta.
|
|
55
|
+
"@authup/errors": "^1.0.0-beta.50",
|
|
56
56
|
"validup": "^0.5.1",
|
|
57
57
|
"vitest": "^4.0.14"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
|
-
"@authup/errors": "^1.0.0-beta.
|
|
60
|
+
"@authup/errors": "^1.0.0-beta.50",
|
|
61
61
|
"validup": "^0.5.1"
|
|
62
62
|
},
|
|
63
63
|
"publishConfig": {
|