intlayer 5.0.1 → 5.0.3
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/cjs/cli.cjs.map +1 -1
- package/dist/cjs/index.cjs +19 -26
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/cli.mjs.map +1 -1
- package/dist/esm/index.mjs +3 -10
- package/dist/esm/index.mjs.map +1 -1
- package/dist/types/index.d.ts +4 -12
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +10 -10
package/dist/cjs/cli.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/cli.ts"],"sourcesContent":["#!/usr/bin/env node\n\
|
|
1
|
+
{"version":3,"sources":["../../src/cli.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { setAPI } from '@intlayer/cli';\n\n// Log the compiler options\nsetAPI();\n"],"mappings":";;AAEA,iBAAuB;AAAA,IAGvB,mBAAO;","names":[]}
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -19,35 +19,29 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
19
19
|
var index_exports = {};
|
|
20
20
|
__export(index_exports, {
|
|
21
21
|
Locales: () => import_client.Locales,
|
|
22
|
-
cond: () =>
|
|
23
|
-
enu: () =>
|
|
24
|
-
getConfiguration: () =>
|
|
25
|
-
getDictionary: () =>
|
|
26
|
-
getEnumeration: () =>
|
|
27
|
-
getHTMLTextDir: () =>
|
|
28
|
-
getIntlayer: () =>
|
|
29
|
-
getIntlayerAsync: () =>
|
|
30
|
-
getLocaleLang: () =>
|
|
31
|
-
getLocaleName: () =>
|
|
32
|
-
getLocalizedUrl: () =>
|
|
33
|
-
getMultilingualUrls: () =>
|
|
34
|
-
getNesting: () =>
|
|
35
|
-
getPathWithoutLocale: () =>
|
|
36
|
-
getTranslation: () =>
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
t: () => t
|
|
22
|
+
cond: () => import_core.cond,
|
|
23
|
+
enu: () => import_core.enu,
|
|
24
|
+
getConfiguration: () => import_client.getConfiguration,
|
|
25
|
+
getDictionary: () => import_core.getDictionary,
|
|
26
|
+
getEnumeration: () => import_core.getEnumeration,
|
|
27
|
+
getHTMLTextDir: () => import_core.getHTMLTextDir,
|
|
28
|
+
getIntlayer: () => import_core.getIntlayer,
|
|
29
|
+
getIntlayerAsync: () => import_core.getIntlayerAsync,
|
|
30
|
+
getLocaleLang: () => import_core.getLocaleLang,
|
|
31
|
+
getLocaleName: () => import_core.getLocaleName,
|
|
32
|
+
getLocalizedUrl: () => import_core.getLocalizedUrl,
|
|
33
|
+
getMultilingualUrls: () => import_core.getMultilingualUrls,
|
|
34
|
+
getNesting: () => import_core.getNesting,
|
|
35
|
+
getPathWithoutLocale: () => import_core.getPathWithoutLocale,
|
|
36
|
+
getTranslation: () => import_core.getTranslation,
|
|
37
|
+
localeList: () => import_core.localeList,
|
|
38
|
+
md: () => import_core.md,
|
|
39
|
+
nest: () => import_core.nest,
|
|
40
|
+
t: () => import_core.t
|
|
42
41
|
});
|
|
43
42
|
module.exports = __toCommonJS(index_exports);
|
|
44
43
|
var import_client = require("@intlayer/config/client");
|
|
45
44
|
var import_core = require("@intlayer/core");
|
|
46
|
-
var import_client2 = require("@intlayer/config/client");
|
|
47
|
-
var import_core2 = require("@intlayer/core");
|
|
48
|
-
const t = import_core.t;
|
|
49
|
-
const getTranslationContent = import_core.getTranslation;
|
|
50
|
-
const nest = import_core.nest;
|
|
51
45
|
// Annotate the CommonJS export names for ESM import in node:
|
|
52
46
|
0 && (module.exports = {
|
|
53
47
|
Locales,
|
|
@@ -66,7 +60,6 @@ const nest = import_core.nest;
|
|
|
66
60
|
getNesting,
|
|
67
61
|
getPathWithoutLocale,
|
|
68
62
|
getTranslation,
|
|
69
|
-
getTranslationContent,
|
|
70
63
|
localeList,
|
|
71
64
|
md,
|
|
72
65
|
nest,
|
package/dist/cjs/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["import type { Dictionary as DictionaryCore } from '@intlayer/core';\n\ntype Dictionary<T = undefined> = DictionaryCore<T, true>;\n/**\n * @deprecated Use `Dictionary<T>` instead.\n */\ntype DeclarationContent<T = undefined> = Dictionary<T>;\n\nexport type { Dictionary, DeclarationContent };\n\nexport {\n Locales,\n type CustomIntlayerConfig as IntlayerConfig,\n type LocalesValues,\n getConfiguration,\n} from '@intlayer/config/client';\nexport {\n type LanguageContent,\n type ContentNode,\n getLocaleName,\n enu,\n cond,\n md,\n t,\n nest,\n getEnumeration,\n getDictionary,\n getIntlayer,\n getIntlayerAsync,\n getTranslation,\n getNesting,\n getLocaleLang,\n getHTMLTextDir,\n getPathWithoutLocale,\n getMultilingualUrls,\n getLocalizedUrl,\n localeList,\n} from '@intlayer/core';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUA,oBAKO;AACP,kBAqBO;","names":[]}
|
package/dist/esm/cli.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/cli.ts"],"sourcesContent":["#!/usr/bin/env node\n\
|
|
1
|
+
{"version":3,"sources":["../../src/cli.ts"],"sourcesContent":["#!/usr/bin/env node\n\nimport { setAPI } from '@intlayer/cli';\n\n// Log the compiler options\nsetAPI();\n"],"mappings":";AAEA,SAAS,cAAc;AAGvB,OAAO;","names":[]}
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,13 +1,5 @@
|
|
|
1
|
-
import { Locales } from "@intlayer/config/client";
|
|
2
|
-
import {
|
|
3
|
-
getTranslation as getTranslationCore,
|
|
4
|
-
nest as nestCore,
|
|
5
|
-
t as tCore
|
|
6
|
-
} from "@intlayer/core";
|
|
7
|
-
const t = tCore;
|
|
8
|
-
const getTranslationContent = getTranslationCore;
|
|
9
|
-
const nest = nestCore;
|
|
10
1
|
import {
|
|
2
|
+
Locales,
|
|
11
3
|
getConfiguration
|
|
12
4
|
} from "@intlayer/config/client";
|
|
13
5
|
import {
|
|
@@ -15,6 +7,8 @@ import {
|
|
|
15
7
|
enu,
|
|
16
8
|
cond,
|
|
17
9
|
md,
|
|
10
|
+
t,
|
|
11
|
+
nest,
|
|
18
12
|
getEnumeration,
|
|
19
13
|
getDictionary,
|
|
20
14
|
getIntlayer,
|
|
@@ -45,7 +39,6 @@ export {
|
|
|
45
39
|
getNesting,
|
|
46
40
|
getPathWithoutLocale,
|
|
47
41
|
getTranslation,
|
|
48
|
-
getTranslationContent,
|
|
49
42
|
localeList,
|
|
50
43
|
md,
|
|
51
44
|
nest,
|
package/dist/esm/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["import type { Dictionary as DictionaryCore } from '@intlayer/core';\n\ntype Dictionary<T = undefined> = DictionaryCore<T, true>;\n/**\n * @deprecated Use `Dictionary<T>` instead.\n */\ntype DeclarationContent<T = undefined> = Dictionary<T>;\n\nexport type { Dictionary, DeclarationContent };\n\nexport {\n Locales,\n type CustomIntlayerConfig as IntlayerConfig,\n type LocalesValues,\n getConfiguration,\n} from '@intlayer/config/client';\nexport {\n type LanguageContent,\n type ContentNode,\n getLocaleName,\n enu,\n cond,\n md,\n t,\n nest,\n getEnumeration,\n getDictionary,\n getIntlayer,\n getIntlayerAsync,\n getTranslation,\n getNesting,\n getLocaleLang,\n getHTMLTextDir,\n getPathWithoutLocale,\n getMultilingualUrls,\n getLocalizedUrl,\n localeList,\n} from '@intlayer/core';\n"],"mappings":"AAUA;AAAA,EACE;AAAA,EAGA;AAAA,OACK;AACP;AAAA,EAGE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;","names":[]}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,18 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { type TranslationContent, type NestedContent, type DictionaryKeys, type TranslationContentState, type Dictionary as DictionaryCore, type ValidDotPathsFor } from '@intlayer/core';
|
|
3
|
-
interface IConfigLocales<Content> {
|
|
4
|
-
}
|
|
5
|
-
type ConfigLocales = keyof IConfigLocales<unknown>;
|
|
6
|
-
type CustomizableLanguageContent<Content = string> = ConfigLocales extends never ? TranslationContentState<Content> : IConfigLocales<Content>;
|
|
7
|
-
declare const t: <Content = string>(content: CustomizableLanguageContent<Content>) => TranslationContent<Content>;
|
|
8
|
-
declare const getTranslationContent: <Content = string>(languageContent: CustomizableLanguageContent<Content>, locale: Locales) => Content;
|
|
9
|
-
declare const nest: <K extends DictionaryKeys>(dictionaryKey: K, path?: ValidDotPathsFor<K>) => NestedContent<K>;
|
|
1
|
+
import type { Dictionary as DictionaryCore } from '@intlayer/core';
|
|
10
2
|
type Dictionary<T = undefined> = DictionaryCore<T, true>;
|
|
11
3
|
/**
|
|
12
4
|
* @deprecated Use `Dictionary<T>` instead.
|
|
13
5
|
*/
|
|
14
6
|
type DeclarationContent<T = undefined> = Dictionary<T>;
|
|
15
|
-
export {
|
|
16
|
-
export { type CustomIntlayerConfig as IntlayerConfig, type LocalesValues, getConfiguration, } from '@intlayer/config/client';
|
|
17
|
-
export { type LanguageContent, type ContentNode, getLocaleName, enu, cond, md, getEnumeration, getDictionary, getIntlayer, getIntlayerAsync, getTranslation, getNesting, getLocaleLang, getHTMLTextDir, getPathWithoutLocale, getMultilingualUrls, getLocalizedUrl, localeList, } from '@intlayer/core';
|
|
7
|
+
export type { Dictionary, DeclarationContent };
|
|
8
|
+
export { Locales, type CustomIntlayerConfig as IntlayerConfig, type LocalesValues, getConfiguration, } from '@intlayer/config/client';
|
|
9
|
+
export { type LanguageContent, type ContentNode, getLocaleName, enu, cond, md, t, nest, getEnumeration, getDictionary, getIntlayer, getIntlayerAsync, getTranslation, getNesting, getLocaleLang, getHTMLTextDir, getPathWithoutLocale, getMultilingualUrls, getLocalizedUrl, localeList, } from '@intlayer/core';
|
|
18
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEnE,KAAK,UAAU,CAAC,CAAC,GAAG,SAAS,IAAI,cAAc,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;AACzD;;GAEG;AACH,KAAK,kBAAkB,CAAC,CAAC,GAAG,SAAS,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC;AAEvD,YAAY,EAAE,UAAU,EAAE,kBAAkB,EAAE,CAAC;AAE/C,OAAO,EACL,OAAO,EACP,KAAK,oBAAoB,IAAI,cAAc,EAC3C,KAAK,aAAa,EAClB,gBAAgB,GACjB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,aAAa,EACb,GAAG,EACH,IAAI,EACJ,EAAE,EACF,CAAC,EACD,IAAI,EACJ,cAAc,EACd,aAAa,EACb,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,UAAU,EACV,aAAa,EACb,cAAc,EACd,oBAAoB,EACpB,mBAAmB,EACnB,eAAe,EACf,UAAU,GACX,MAAM,gBAAgB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "intlayer",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Manage internationalization i18n in a simple way, through TypeScript, declaration file, declare your multilingual content every where in your code.",
|
|
6
6
|
"keywords": [
|
|
@@ -58,9 +58,9 @@
|
|
|
58
58
|
"./package.json"
|
|
59
59
|
],
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@intlayer/cli": "5.0.
|
|
62
|
-
"@intlayer/config": "5.0.
|
|
63
|
-
"@intlayer/core": "^5.0.
|
|
61
|
+
"@intlayer/cli": "5.0.3",
|
|
62
|
+
"@intlayer/config": "5.0.3",
|
|
63
|
+
"@intlayer/core": "^5.0.3"
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
66
|
"@changesets/changelog-github": "0.5.0",
|
|
@@ -74,15 +74,15 @@
|
|
|
74
74
|
"tsc-alias": "^1.8.10",
|
|
75
75
|
"tsup": "^8.3.5",
|
|
76
76
|
"typescript": "^5.7.3",
|
|
77
|
-
"@utils/
|
|
77
|
+
"@utils/ts-config-types": "1.0.4",
|
|
78
78
|
"@utils/tsup-config": "1.0.4",
|
|
79
|
-
"@utils/
|
|
80
|
-
"@utils/ts-config
|
|
79
|
+
"@utils/eslint-config": "1.0.4",
|
|
80
|
+
"@utils/ts-config": "1.0.4"
|
|
81
81
|
},
|
|
82
82
|
"peerDependencies": {
|
|
83
|
-
"@intlayer/cli": "5.0.
|
|
84
|
-
"@intlayer/
|
|
85
|
-
"@intlayer/
|
|
83
|
+
"@intlayer/cli": "5.0.3",
|
|
84
|
+
"@intlayer/core": "^5.0.3",
|
|
85
|
+
"@intlayer/config": "5.0.3"
|
|
86
86
|
},
|
|
87
87
|
"engines": {
|
|
88
88
|
"node": ">=14.18"
|