@strapi/i18n 5.45.0 → 5.46.0
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.
|
@@ -7,19 +7,19 @@ const sendDidInitializeEvent = async ()=>{
|
|
|
7
7
|
const { isLocalizedContentType } = index.getService('content-types');
|
|
8
8
|
// TODO: V5: This event should be renamed numberOfContentTypes in V5 as the name is already taken to describe the number of content types using i18n.
|
|
9
9
|
const numberOfContentTypes = fp.reduce((sum, contentType)=>isLocalizedContentType(contentType) ? sum + 1 : sum, 0)(strapi.contentTypes);
|
|
10
|
-
|
|
10
|
+
strapi.telemetry.send('didInitializeI18n', {
|
|
11
11
|
groupProperties: {
|
|
12
12
|
numberOfContentTypes
|
|
13
13
|
}
|
|
14
|
-
});
|
|
14
|
+
}).catch(()=>{});
|
|
15
15
|
};
|
|
16
16
|
const sendDidUpdateI18nLocalesEvent = async ()=>{
|
|
17
17
|
const numberOfLocales = await index.getService('locales').count();
|
|
18
|
-
|
|
18
|
+
strapi.telemetry.send('didUpdateI18nLocales', {
|
|
19
19
|
groupProperties: {
|
|
20
20
|
numberOfLocales
|
|
21
21
|
}
|
|
22
|
-
});
|
|
22
|
+
}).catch(()=>{});
|
|
23
23
|
};
|
|
24
24
|
const metrics = ()=>({
|
|
25
25
|
sendDidInitializeEvent,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metrics.js","sources":["../../../server/src/services/metrics.ts"],"sourcesContent":["import { reduce } from 'lodash/fp';\nimport { getService } from '../utils';\n\nconst sendDidInitializeEvent = async () => {\n const { isLocalizedContentType } = getService('content-types');\n\n // TODO: V5: This event should be renamed numberOfContentTypes in V5 as the name is already taken to describe the number of content types using i18n.\n const numberOfContentTypes = reduce(\n (sum, contentType) => (isLocalizedContentType(contentType) ? sum + 1 : sum),\n 0\n )(strapi.contentTypes as any);\n\n
|
|
1
|
+
{"version":3,"file":"metrics.js","sources":["../../../server/src/services/metrics.ts"],"sourcesContent":["import { reduce } from 'lodash/fp';\nimport { getService } from '../utils';\n\nconst sendDidInitializeEvent = async () => {\n const { isLocalizedContentType } = getService('content-types');\n\n // TODO: V5: This event should be renamed numberOfContentTypes in V5 as the name is already taken to describe the number of content types using i18n.\n const numberOfContentTypes = reduce(\n (sum, contentType) => (isLocalizedContentType(contentType) ? sum + 1 : sum),\n 0\n )(strapi.contentTypes as any);\n\n strapi.telemetry\n .send('didInitializeI18n', { groupProperties: { numberOfContentTypes } })\n .catch(() => {});\n};\n\nconst sendDidUpdateI18nLocalesEvent = async () => {\n const numberOfLocales = await getService('locales').count();\n\n strapi.telemetry\n .send('didUpdateI18nLocales', {\n groupProperties: { numberOfLocales },\n })\n .catch(() => {});\n};\n\nconst metrics = () => ({\n sendDidInitializeEvent,\n sendDidUpdateI18nLocalesEvent,\n});\n\ntype MetricsService = typeof metrics;\n\nexport default metrics;\nexport type { MetricsService };\n"],"names":["sendDidInitializeEvent","isLocalizedContentType","getService","numberOfContentTypes","reduce","sum","contentType","strapi","contentTypes","telemetry","send","groupProperties","catch","sendDidUpdateI18nLocalesEvent","numberOfLocales","count","metrics"],"mappings":";;;;;AAGA,MAAMA,sBAAAA,GAAyB,UAAA;AAC7B,IAAA,MAAM,EAAEC,sBAAsB,EAAE,GAAGC,gBAAAA,CAAW,eAAA,CAAA;;AAG9C,IAAA,MAAMC,oBAAAA,GAAuBC,SAAAA,CAC3B,CAACC,GAAAA,EAAKC,WAAAA,GAAiBL,sBAAAA,CAAuBK,WAAAA,CAAAA,GAAeD,GAAAA,GAAM,CAAA,GAAIA,GAAAA,EACvE,CAAA,CAAA,CACAE,MAAAA,CAAOC,YAAY,CAAA;AAErBD,IAAAA,MAAAA,CAAOE,SAAS,CACbC,IAAI,CAAC,mBAAA,EAAqB;QAAEC,eAAAA,EAAiB;AAAER,YAAAA;AAAqB;KAAE,CAAA,CACtES,KAAK,CAAC,IAAA,CAAO,CAAA,CAAA;AAClB,CAAA;AAEA,MAAMC,6BAAAA,GAAgC,UAAA;AACpC,IAAA,MAAMC,eAAAA,GAAkB,MAAMZ,gBAAAA,CAAW,SAAA,CAAA,CAAWa,KAAK,EAAA;AAEzDR,IAAAA,MAAAA,CAAOE,SAAS,CACbC,IAAI,CAAC,sBAAA,EAAwB;QAC5BC,eAAAA,EAAiB;AAAEG,YAAAA;AAAgB;KACrC,CAAA,CACCF,KAAK,CAAC,IAAA,CAAO,CAAA,CAAA;AAClB,CAAA;AAEA,MAAMI,OAAAA,GAAU,KAAO;AACrBhB,QAAAA,sBAAAA;AACAa,QAAAA;KACF;;;;"}
|
|
@@ -5,19 +5,19 @@ const sendDidInitializeEvent = async ()=>{
|
|
|
5
5
|
const { isLocalizedContentType } = getService('content-types');
|
|
6
6
|
// TODO: V5: This event should be renamed numberOfContentTypes in V5 as the name is already taken to describe the number of content types using i18n.
|
|
7
7
|
const numberOfContentTypes = reduce((sum, contentType)=>isLocalizedContentType(contentType) ? sum + 1 : sum, 0)(strapi.contentTypes);
|
|
8
|
-
|
|
8
|
+
strapi.telemetry.send('didInitializeI18n', {
|
|
9
9
|
groupProperties: {
|
|
10
10
|
numberOfContentTypes
|
|
11
11
|
}
|
|
12
|
-
});
|
|
12
|
+
}).catch(()=>{});
|
|
13
13
|
};
|
|
14
14
|
const sendDidUpdateI18nLocalesEvent = async ()=>{
|
|
15
15
|
const numberOfLocales = await getService('locales').count();
|
|
16
|
-
|
|
16
|
+
strapi.telemetry.send('didUpdateI18nLocales', {
|
|
17
17
|
groupProperties: {
|
|
18
18
|
numberOfLocales
|
|
19
19
|
}
|
|
20
|
-
});
|
|
20
|
+
}).catch(()=>{});
|
|
21
21
|
};
|
|
22
22
|
const metrics = ()=>({
|
|
23
23
|
sendDidInitializeEvent,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metrics.mjs","sources":["../../../server/src/services/metrics.ts"],"sourcesContent":["import { reduce } from 'lodash/fp';\nimport { getService } from '../utils';\n\nconst sendDidInitializeEvent = async () => {\n const { isLocalizedContentType } = getService('content-types');\n\n // TODO: V5: This event should be renamed numberOfContentTypes in V5 as the name is already taken to describe the number of content types using i18n.\n const numberOfContentTypes = reduce(\n (sum, contentType) => (isLocalizedContentType(contentType) ? sum + 1 : sum),\n 0\n )(strapi.contentTypes as any);\n\n
|
|
1
|
+
{"version":3,"file":"metrics.mjs","sources":["../../../server/src/services/metrics.ts"],"sourcesContent":["import { reduce } from 'lodash/fp';\nimport { getService } from '../utils';\n\nconst sendDidInitializeEvent = async () => {\n const { isLocalizedContentType } = getService('content-types');\n\n // TODO: V5: This event should be renamed numberOfContentTypes in V5 as the name is already taken to describe the number of content types using i18n.\n const numberOfContentTypes = reduce(\n (sum, contentType) => (isLocalizedContentType(contentType) ? sum + 1 : sum),\n 0\n )(strapi.contentTypes as any);\n\n strapi.telemetry\n .send('didInitializeI18n', { groupProperties: { numberOfContentTypes } })\n .catch(() => {});\n};\n\nconst sendDidUpdateI18nLocalesEvent = async () => {\n const numberOfLocales = await getService('locales').count();\n\n strapi.telemetry\n .send('didUpdateI18nLocales', {\n groupProperties: { numberOfLocales },\n })\n .catch(() => {});\n};\n\nconst metrics = () => ({\n sendDidInitializeEvent,\n sendDidUpdateI18nLocalesEvent,\n});\n\ntype MetricsService = typeof metrics;\n\nexport default metrics;\nexport type { MetricsService };\n"],"names":["sendDidInitializeEvent","isLocalizedContentType","getService","numberOfContentTypes","reduce","sum","contentType","strapi","contentTypes","telemetry","send","groupProperties","catch","sendDidUpdateI18nLocalesEvent","numberOfLocales","count","metrics"],"mappings":";;;AAGA,MAAMA,sBAAAA,GAAyB,UAAA;AAC7B,IAAA,MAAM,EAAEC,sBAAsB,EAAE,GAAGC,UAAAA,CAAW,eAAA,CAAA;;AAG9C,IAAA,MAAMC,oBAAAA,GAAuBC,MAAAA,CAC3B,CAACC,GAAAA,EAAKC,WAAAA,GAAiBL,sBAAAA,CAAuBK,WAAAA,CAAAA,GAAeD,GAAAA,GAAM,CAAA,GAAIA,GAAAA,EACvE,CAAA,CAAA,CACAE,MAAAA,CAAOC,YAAY,CAAA;AAErBD,IAAAA,MAAAA,CAAOE,SAAS,CACbC,IAAI,CAAC,mBAAA,EAAqB;QAAEC,eAAAA,EAAiB;AAAER,YAAAA;AAAqB;KAAE,CAAA,CACtES,KAAK,CAAC,IAAA,CAAO,CAAA,CAAA;AAClB,CAAA;AAEA,MAAMC,6BAAAA,GAAgC,UAAA;AACpC,IAAA,MAAMC,eAAAA,GAAkB,MAAMZ,UAAAA,CAAW,SAAA,CAAA,CAAWa,KAAK,EAAA;AAEzDR,IAAAA,MAAAA,CAAOE,SAAS,CACbC,IAAI,CAAC,sBAAA,EAAwB;QAC5BC,eAAAA,EAAiB;AAAEG,YAAAA;AAAgB;KACrC,CAAA,CACCF,KAAK,CAAC,IAAA,CAAO,CAAA,CAAA;AAClB,CAAA;AAEA,MAAMI,OAAAA,GAAU,KAAO;AACrBhB,QAAAA,sBAAAA;AACAa,QAAAA;KACF;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"metrics.d.ts","sourceRoot":"","sources":["../../../../server/src/services/metrics.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"metrics.d.ts","sourceRoot":"","sources":["../../../../server/src/services/metrics.ts"],"names":[],"mappings":"AA2BA,QAAA,MAAM,OAAO;;;CAGX,CAAC;AAEH,KAAK,cAAc,GAAG,OAAO,OAAO,CAAC;AAErC,eAAe,OAAO,CAAC;AACvB,YAAY,EAAE,cAAc,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@strapi/i18n",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.46.0",
|
|
4
4
|
"description": "Create read and update content in different languages, both from the Admin Panel and from the API",
|
|
5
5
|
"homepage": "https://strapi.io",
|
|
6
6
|
"bugs": {
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"@reduxjs/toolkit": "1.9.7",
|
|
64
64
|
"@strapi/design-system": "2.2.0",
|
|
65
65
|
"@strapi/icons": "2.2.0",
|
|
66
|
-
"@strapi/utils": "5.
|
|
66
|
+
"@strapi/utils": "5.46.0",
|
|
67
67
|
"lodash": "4.18.1",
|
|
68
68
|
"qs": "6.15.0",
|
|
69
69
|
"react-intl": "6.6.2",
|
|
@@ -72,15 +72,15 @@
|
|
|
72
72
|
"zod": "3.25.67"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
|
-
"@strapi/admin": "5.
|
|
76
|
-
"@strapi/admin-test-utils": "5.
|
|
77
|
-
"@strapi/content-manager": "5.
|
|
78
|
-
"@strapi/database": "5.
|
|
79
|
-
"@strapi/types": "5.
|
|
75
|
+
"@strapi/admin": "5.46.0",
|
|
76
|
+
"@strapi/admin-test-utils": "5.46.0",
|
|
77
|
+
"@strapi/content-manager": "5.46.0",
|
|
78
|
+
"@strapi/database": "5.46.0",
|
|
79
|
+
"@strapi/types": "5.46.0",
|
|
80
80
|
"@testing-library/react": "16.3.0",
|
|
81
81
|
"@testing-library/user-event": "14.6.1",
|
|
82
82
|
"koa": "2.16.4",
|
|
83
|
-
"msw": "
|
|
83
|
+
"msw": "2.13.4",
|
|
84
84
|
"react": "18.3.1",
|
|
85
85
|
"react-dom": "18.3.1",
|
|
86
86
|
"react-query": "3.39.3",
|