@sonenta/react-i18next 2.3.0 → 2.3.1
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/index.cjs +10 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +10 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -238,7 +238,7 @@ function flattenPlurals(tree, locale) {
|
|
|
238
238
|
|
|
239
239
|
// src/transport.ts
|
|
240
240
|
var SDK_LIB = "@sonenta/react-i18next";
|
|
241
|
-
var SDK_VER = true ? "2.3.
|
|
241
|
+
var SDK_VER = true ? "2.3.1" : "0.0.0-dev";
|
|
242
242
|
function defaultTransport(opts) {
|
|
243
243
|
return async (batch) => {
|
|
244
244
|
if (!batch.length) return;
|
|
@@ -775,16 +775,18 @@ var SonentaI18n = class {
|
|
|
775
775
|
* Skipped when disabled; a failure keeps any embedded catalog. */
|
|
776
776
|
/**
|
|
777
777
|
* Best-effort: fetch the per-version published-languages manifest
|
|
778
|
-
* (`{
|
|
779
|
-
* CDN-cached) — the SET of locales
|
|
780
|
-
*
|
|
781
|
-
*
|
|
782
|
-
*
|
|
778
|
+
* (`{apiBase}/cdn/v1/{project}/{version}/latest/languages.json`, public, no
|
|
779
|
+
* auth, CORS-open, CDN-cached `max-age=60` + ETag) — the SET of locales
|
|
780
|
+
* published for the active version (compute-on-serve from cdn_releases,
|
|
781
|
+
* always in sync with what is published). Codes only; enriched from the
|
|
782
|
+
* catalog. A 404/offline keeps any prior manifest (`availableLanguages` then
|
|
783
|
+
* falls back to default + fallback). Same route on prod + dev (backend task
|
|
784
|
+
* 989+; the authed `/v1/projects/{id}/languages` is ALL project languages,
|
|
785
|
+
* not the published set — this manifest is the in-production set).
|
|
783
786
|
*/
|
|
784
787
|
async _loadManifest(fetchImpl, opts = {}) {
|
|
785
788
|
if (this._manifestDisabled) return;
|
|
786
|
-
|
|
787
|
-
const url = `${this._config.cdnBase.replace(/\/+$/, "")}/p/${this._config.projectUuid}/${this._config.version}/latest/languages.json`;
|
|
789
|
+
const url = `${this._config.apiBase.replace(/\/+$/, "")}/cdn/v1/${this._config.projectUuid}/${this._config.version}/latest/languages.json`;
|
|
788
790
|
const init = { method: "GET", credentials: "omit" };
|
|
789
791
|
if (opts.bust) init.cache = "reload";
|
|
790
792
|
try {
|