@pithy-sh/i18n 0.7.2 → 0.7.4

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.
@@ -1 +1 @@
1
- {"version":3,"file":"capability.d.ts","sourceRoot":"","sources":["../src/capability.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,UAAU,EAAoB,MAAM,0CAA0C,CAAC;AAC7F,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAKtF,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAKnE;;;;;;GAMG;AACH,MAAM,WAAW,cAAe,SAAQ,UAAU;IAChD,sGAAsG;IACtG,UAAU,EAAE,UAAU,CAAC;IACvB,qGAAqG;IACrG,gBAAgB,EAAE,cAAc,CAAC;IACjC,wEAAwE;IACxE,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,cAAc,GAAG,SAAS,CAAC,EAAE,CAAC;CACpE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,IAAI,CAAC,MAAM,GAAE,eAAoB,GAAG,cAAc,CA0EjE;AAED,uGAAuG;AACvG,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,UAAU,GAAG,UAAU,IAAI,cAAc,CAErF"}
1
+ {"version":3,"file":"capability.d.ts","sourceRoot":"","sources":["../src/capability.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,UAAU,EAAoB,MAAM,0CAA0C,CAAC;AAC7F,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAKtF,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAKnE;;;;;;GAMG;AACH,MAAM,WAAW,cAAe,SAAQ,UAAU;IAChD,sGAAsG;IACtG,UAAU,EAAE,UAAU,CAAC;IACvB,qGAAqG;IACrG,gBAAgB,EAAE,cAAc,CAAC;IACjC,wEAAwE;IACxE,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,cAAc,GAAG,SAAS,CAAC,EAAE,CAAC;CACpE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAgB,IAAI,CAAC,MAAM,GAAE,eAAoB,GAAG,cAAc,CA6EjE;AAED,uGAAuG;AACvG,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,UAAU,GAAG,UAAU,IAAI,cAAc,CAErF"}
@@ -4,7 +4,7 @@ import { KIT_CATALOGS } from "./catalogs/kit.js";
4
4
  import { I18nConfig } from "./config/config.js";
5
5
  import { i18nMiddleware } from "./http/middleware.js";
6
6
  import { i18nSettings } from "./settings/coverage.js";
7
- import { PACKAGE_VERSION } from "./version.generated.js";
7
+ import { PACKAGE_NAME, PACKAGE_VERSION } from "./version.generated.js";
8
8
  import { defineCapability } from "@pithy-sh/core/src/capability/capability";
9
9
  import { composeMessages } from "@pithy-sh/core/src/i18n/registry";
10
10
  import { DEFAULT_LOCALE } from "@pithy-sh/core/src/i18n/translator";
@@ -54,6 +54,7 @@ function i18n(config = {}) {
54
54
  const capability = defineCapability({
55
55
  name: "i18n",
56
56
  version: PACKAGE_VERSION,
57
+ package: PACKAGE_NAME,
57
58
  config: I18nConfig,
58
59
  /**
59
60
  * Merge every composed capability's English once, at assembly.
@@ -1 +1 @@
1
- {"version":3,"file":"screens.d.ts","sourceRoot":"","sources":["../../../src/catalogs/es/screens.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEtE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,SAAS,EAAE,cA2IvB,CAAC"}
1
+ {"version":3,"file":"screens.d.ts","sourceRoot":"","sources":["../../../src/catalogs/es/screens.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEtE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,SAAS,EAAE,cA8IvB,CAAC"}
@@ -31,8 +31,8 @@ const esScreens = {
31
31
  "auth/sign_in.provider.label": "Continuar con {provider}",
32
32
  "auth/sign_in.provider_unconfigured": "{provider} no está configurado aquí. Usa el enlace.",
33
33
  "auth/sign_in.provider_silent": "{provider} no respondió. Usa el enlace.",
34
- "auth/sign_in.refused.title": "No hay ninguna cuenta para este {provider}.",
35
- "auth/sign_in.refused.primary": "{provider} nos da una sola dirección: la principal de tu cuenta. Esa no coincide con ninguna de aquí.",
34
+ "auth/sign_in.refused.title": "{provider} no te ha dejado entrar.",
35
+ "auth/sign_in.refused.primary": "{provider} nos da una sola dirección: la principal de tu cuenta. Con esa no has entrado aquí.",
36
36
  "auth/sign_in.refused.secondary": "Una dirección secundaria no sirve. Al entrar nunca miramos más allá de la principal, y es a propósito.",
37
37
  "auth/sign_in.refused.remedy": "Entra con tu correo y luego conecta {provider} desde tu perfil. A partir de ahí funciona sea cual sea tu principal.",
38
38
  "auth/sign_in.divider": "o",
@@ -3,5 +3,5 @@
3
3
  /** This package's npm name — the join key against a release feed. */
4
4
  export declare const PACKAGE_NAME = "@pithy-sh/i18n";
5
5
  /** This package's version, stamped from its own package.json at generation time. */
6
- export declare const PACKAGE_VERSION = "0.7.2";
6
+ export declare const PACKAGE_VERSION = "0.7.4";
7
7
  //# sourceMappingURL=version.generated.d.ts.map
@@ -4,6 +4,6 @@
4
4
  /** This package's npm name — the join key against a release feed. */
5
5
  const PACKAGE_NAME = "@pithy-sh/i18n";
6
6
  /** This package's version, stamped from its own package.json at generation time. */
7
- const PACKAGE_VERSION = "0.7.2";
7
+ const PACKAGE_VERSION = "0.7.4";
8
8
  //#endregion
9
9
  export { PACKAGE_NAME, PACKAGE_VERSION };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pithy-sh/i18n",
3
- "version": "0.7.2",
3
+ "version": "0.7.4",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -35,7 +35,7 @@
35
35
  "reset": "bun run clean && rm -rf node_modules"
36
36
  },
37
37
  "peerDependencies": {
38
- "@pithy-sh/core": "^0.7.2",
38
+ "@pithy-sh/core": "^0.7.4",
39
39
  "hono": "^4.13.2",
40
40
  "react": "^19.0.0",
41
41
  "zod": "^4.4.0"
package/src/capability.ts CHANGED
@@ -10,7 +10,7 @@ import type { I18nClientProjection } from "./client/projection";
10
10
  import { I18nConfig, type I18nConfigInput } from "./config/config";
11
11
  import { i18nMiddleware } from "./http/middleware";
12
12
  import { i18nSettings } from "./settings/coverage";
13
- import { PACKAGE_VERSION } from "./version.generated";
13
+ import { PACKAGE_NAME, PACKAGE_VERSION } from "./version.generated";
14
14
 
15
15
  /**
16
16
  * The i18n capability, with its resolved config and the catalogs it composed attached for inspection.
@@ -81,9 +81,12 @@ export function i18n(config: I18nConfigInput = {}): I18nCapability {
81
81
 
82
82
  const capability = defineCapability({
83
83
  name: "i18n",
84
- // The package version this capability ships at, stamped by `scripts/stampVersions.ts` — a Worker
85
- // cannot read its own package.json. Reported per capability by the control-plane manifest.
84
+ // The package this capability ships in and the version it ships at, both stamped by
85
+ // `scripts/stampVersions.ts` — a Worker cannot read its own package.json. Reported per capability by
86
+ // the control-plane manifest, and reported together: a release feed is keyed by package name, so the
87
+ // version alone leaves a client guessing the key (#626).
86
88
  version: PACKAGE_VERSION,
89
+ package: PACKAGE_NAME,
87
90
  config: I18nConfig,
88
91
  /**
89
92
  * Merge every composed capability's English once, at assembly.
@@ -36,9 +36,12 @@ export const esScreens: MessageCatalog = {
36
36
  "auth/sign_in.provider.label": "Continuar con {provider}",
37
37
  "auth/sign_in.provider_unconfigured": "{provider} no está configurado aquí. Usa el enlace.",
38
38
  "auth/sign_in.provider_silent": "{provider} no respondió. Usa el enlace.",
39
- "auth/sign_in.refused.title": "No hay ninguna cuenta para este {provider}.",
39
+ // Ni una palabra sobre si la cuenta existe (#625). El servidor manda un solo código para "tienes
40
+ // cuenta y este proveedor no está conectado a ella" y para "no tienes ninguna", así que una frase que
41
+ // eligiera una de las dos devolvería, escrita, el oráculo que el Worker acaba de cerrar en la cabecera.
42
+ "auth/sign_in.refused.title": "{provider} no te ha dejado entrar.",
40
43
  "auth/sign_in.refused.primary":
41
- "{provider} nos da una sola dirección: la principal de tu cuenta. Esa no coincide con ninguna de aquí.",
44
+ "{provider} nos da una sola dirección: la principal de tu cuenta. Con esa no has entrado aquí.",
42
45
  "auth/sign_in.refused.secondary":
43
46
  "Una dirección secundaria no sirve. Al entrar nunca miramos más allá de la principal, y es a propósito.",
44
47
  "auth/sign_in.refused.remedy":
@@ -13,4 +13,4 @@
13
13
  export const PACKAGE_NAME = "@pithy-sh/i18n";
14
14
 
15
15
  /** This package's version, stamped from its own package.json at generation time. */
16
- export const PACKAGE_VERSION = "0.7.2";
16
+ export const PACKAGE_VERSION = "0.7.4";