intlayer 8.4.0 → 8.4.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/cjs/cli/script.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"script.cjs","names":[],"sources":["../../../src/cli/script.ts"],"sourcesContent":["#!/usr/bin/env node\nimport { setAPI } from '@intlayer/cli';\n\nsetAPI();\n"],"mappings":";
|
|
1
|
+
{"version":3,"file":"script.cjs","names":[],"sources":["../../../src/cli/script.ts"],"sourcesContent":["#!/usr/bin/env node\nimport { setAPI } from '@intlayer/cli';\n\nsetAPI();\n"],"mappings":";6DAGQ"}
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let c=require(`@intlayer/types/allLocales`),l=require(`@intlayer/types/locales`);l=s(l);let u=require(`@intlayer/config/built`);u=s(u);let d=require(`@intlayer/core/file`),f=require(`@intlayer/core/formatters`),p=require(`@intlayer/core/interpreter`),m=require(`@intlayer/core/localization`),h=require(`@intlayer/core/markdown`),g=require(`@intlayer/core/transpiler`),_=require(`@intlayer/core/utils`);const v=()=>u.default,y=u.default.internationalization.locales,b=u.default.internationalization.requiredLocales,x=u.default.internationalization.defaultLocale;Object.defineProperty(exports,`ALL_LOCALES`,{enumerable:!0,get:function(){return c.ALL_LOCALES}}),Object.defineProperty(exports,`Intl`,{enumerable:!0,get:function(){return f.Intl}}),Object.defineProperty(exports,`Locales`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`compact`,{enumerable:!0,get:function(){return f.compact}}),Object.defineProperty(exports,`cond`,{enumerable:!0,get:function(){return g.cond}}),exports.configuration=u.default,Object.defineProperty(exports,`currency`,{enumerable:!0,get:function(){return f.currency}}),Object.defineProperty(exports,`date`,{enumerable:!0,get:function(){return f.date}}),exports.defaultLocale=x,Object.defineProperty(exports,`enu`,{enumerable:!0,get:function(){return g.enu}}),Object.defineProperty(exports,`file`,{enumerable:!0,get:function(){return d.file}}),Object.defineProperty(exports,`gender`,{enumerable:!0,get:function(){return g.gender}}),Object.defineProperty(exports,`getBrowserLocale`,{enumerable:!0,get:function(){return m.getBrowserLocale}}),Object.defineProperty(exports,`getCanonicalPath`,{enumerable:!0,get:function(){return m.getCanonicalPath}}),exports.getConfiguration=v,Object.defineProperty(exports,`getCookie`,{enumerable:!0,get:function(){return _.getCookie}}),Object.defineProperty(exports,`getDictionary`,{enumerable:!0,get:function(){return p.getDictionary}}),Object.defineProperty(exports,`getEnumeration`,{enumerable:!0,get:function(){return p.getEnumeration}}),Object.defineProperty(exports,`getEnumerationContent`,{enumerable:!0,get:function(){return p.getEnumeration}}),Object.defineProperty(exports,`getHTMLTextDir`,{enumerable:!0,get:function(){return m.getHTMLTextDir}}),Object.defineProperty(exports,`getIntlayer`,{enumerable:!0,get:function(){return p.getIntlayer}}),Object.defineProperty(exports,`getLocale`,{enumerable:!0,get:function(){return m.getLocale}}),Object.defineProperty(exports,`getLocaleFromPath`,{enumerable:!0,get:function(){return m.getLocaleFromPath}}),Object.defineProperty(exports,`getLocaleFromStorage`,{enumerable:!0,get:function(){return _.getLocaleFromStorage}}),Object.defineProperty(exports,`getLocaleLang`,{enumerable:!0,get:function(){return m.getLocaleLang}}),Object.defineProperty(exports,`getLocaleName`,{enumerable:!0,get:function(){return m.getLocaleName}}),Object.defineProperty(exports,`getLocalizedPath`,{enumerable:!0,get:function(){return m.getLocalizedPath}}),Object.defineProperty(exports,`getLocalizedUrl`,{enumerable:!0,get:function(){return m.getLocalizedUrl}}),Object.defineProperty(exports,`getMarkdownMetadata`,{enumerable:!0,get:function(){return h.getMarkdownMetadata}}),Object.defineProperty(exports,`getMultilingualUrls`,{enumerable:!0,get:function(){return m.getMultilingualUrls}}),Object.defineProperty(exports,`getNesting`,{enumerable:!0,get:function(){return p.getNesting}}),Object.defineProperty(exports,`getPathWithoutLocale`,{enumerable:!0,get:function(){return m.getPathWithoutLocale}}),Object.defineProperty(exports,`getPrefix`,{enumerable:!0,get:function(){return m.getPrefix}}),Object.defineProperty(exports,`getRewriteRules`,{enumerable:!0,get:function(){return m.getRewriteRules}}),Object.defineProperty(exports,`getTranslation`,{enumerable:!0,get:function(){return p.getTranslation}}),Object.defineProperty(exports,`getTranslationContent`,{enumerable:!0,get:function(){return p.getTranslation}}),Object.defineProperty(exports,`html`,{enumerable:!0,get:function(){return g.html}}),Object.defineProperty(exports,`insert`,{enumerable:!0,get:function(){return g.insert}}),Object.defineProperty(exports,`localeDetector`,{enumerable:!0,get:function(){return m.localeDetector}}),Object.defineProperty(exports,`localeFlatMap`,{enumerable:!0,get:function(){return m.localeFlatMap}}),Object.defineProperty(exports,`localeMap`,{enumerable:!0,get:function(){return m.localeMap}}),Object.defineProperty(exports,`localeRecord`,{enumerable:!0,get:function(){return m.localeRecord}}),Object.defineProperty(exports,`localeResolver`,{enumerable:!0,get:function(){return m.localeResolver}}),exports.locales=y,Object.defineProperty(exports,`md`,{enumerable:!0,get:function(){return g.md}}),exports.n=s,Object.defineProperty(exports,`nest`,{enumerable:!0,get:function(){return g.nest}}),Object.defineProperty(exports,`number`,{enumerable:!0,get:function(){return f.number}}),Object.defineProperty(exports,`percentage`,{enumerable:!0,get:function(){return f.percentage}}),Object.defineProperty(exports,`relativeTime`,{enumerable:!0,get:function(){return f.relativeTime}}),exports.requiredLocales=b,Object.defineProperty(exports,`setLocaleInStorage`,{enumerable:!0,get:function(){return _.setLocaleInStorage}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return g.t}}),Object.defineProperty(exports,`units`,{enumerable:!0,get:function(){return f.units}}),Object.defineProperty(exports,`validatePrefix`,{enumerable:!0,get:function(){return m.validatePrefix}});
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/cjs/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["configuration"],"sources":["../../src/index.ts"],"sourcesContent":["/** biome-ignore-all lint/suspicious/noEmptyInterface: Intlayer module augmentation registries */\n\nimport type { CustomIntlayerConfig as IntlayerConfig } from '@intlayer/types/config';\nimport type { Dictionary as DictionaryCore } from '@intlayer/types/dictionary';\nimport type { SchemaKeys } from '@intlayer/types/module_augmentation';\n\n/**\n * The dictionary type used to define the structure of a dictionary.\n * It is used to provide type safety and autocompletion when defining a dictionary.\n *\n * @example\n * ```ts\n * import { Dictionary } from 'intlayer';\n *\n * const dictionary: Dictionary = { ... };\n * ```\n */\ntype Dictionary<\n T = undefined,\n SchemaKey extends SchemaKeys | undefined = undefined,\n> = DictionaryCore<T, SchemaKey, true>;\n\n/**\n * The content of a dictionary.\n *\n * @deprecated Use `Dictionary<T>` instead.\n */\ntype DeclarationContent<\n T = undefined,\n SchemaKey extends SchemaKeys | undefined = undefined,\n> = Dictionary<T, SchemaKey>;\n\nexport { ALL_LOCALES, type Locale } from '@intlayer/types/allLocales';\nexport type { ContentNode } from '@intlayer/types/dictionary';\nexport type {\n LocalesValues,\n StrictModeLocaleMap,\n} from '@intlayer/types/module_augmentation';\n\nimport * as Locales from '@intlayer/types/locales';\nexport type { DeclarationContent, Dictionary, IntlayerConfig };\n\n/**\n * Rexport using named import because πof Tsup bug in CJS\n */\n/**\n * The configuration of Intlayer.\n */\nimport configuration from '@intlayer/config/built';\n\n/**\n * Returns the configuration of Intlayer.\n */\nconst getConfiguration = () => configuration;\n\n/**\n * The locales defined in the configuration.\n */\nconst locales = configuration.internationalization.locales;\n\n/**\n * The required locales defined in the configuration.\n */\nconst requiredLocales = configuration.internationalization.requiredLocales;\n\n/**\n * The default locale defined in the configuration.\n */\nconst defaultLocale = configuration.internationalization.defaultLocale;\n\n// Reexport here for CJS compatibility\n// Fix ReferenceError: Cannot access 'xxx' before initialization\nexport {\n configuration,\n getConfiguration,\n locales,\n requiredLocales,\n defaultLocale,\n Locales,\n};\n\nexport { file } from '@intlayer/core/file'; // Include specific export for browser because of node js function that can't be used in browser\nexport {\n compact,\n currency,\n date,\n Intl,\n number,\n percentage,\n relativeTime,\n units,\n} from '@intlayer/core/formatters';\nexport {\n getDictionary,\n getEnumeration,\n /**\n * @deprecated Use `getEnumeration` instead.\n */\n getEnumeration as getEnumerationContent,\n getIntlayer,\n getNesting,\n getTranslation,\n /**\n * @deprecated Use `getTranslation` instead.\n */\n getTranslation as getTranslationContent,\n} from '@intlayer/core/interpreter';\nexport {\n getBrowserLocale,\n getCanonicalPath,\n getHTMLTextDir,\n getLocale,\n getLocaleFromPath,\n getLocaleLang,\n getLocaleName,\n getLocalizedPath,\n getLocalizedUrl,\n getMultilingualUrls,\n getPathWithoutLocale,\n getPrefix,\n getRewriteRules,\n localeDetector,\n localeFlatMap,\n localeMap,\n localeRecord,\n localeResolver,\n validatePrefix,\n} from '@intlayer/core/localization';\nexport { getMarkdownMetadata } from '@intlayer/core/markdown';\nexport {\n cond,\n enu,\n gender,\n html,\n insert,\n md,\n nest,\n t,\n} from '@intlayer/core/transpiler';\nexport {\n getCookie,\n getLocaleFromStorage,\n setLocaleInStorage,\n} from '@intlayer/core/utils';\n\n// --- Registries to be augmented by the generator ---\nexport interface __DictionaryRegistry {} // id -> interfaceof ictionary\nexport interface __DeclaredLocalesRegistry {} // 'fr': 1, 'en': 1, ...\nexport interface __RequiredLocalesRegistry {} // 'en': 1, ...\nexport interface __SchemaRegistry {} // id -> interface of schema\nexport interface __StrictModeRegistry {} // one of: { strict: true } | { inclusive: true } | { loose: true }\nexport interface __EditorRegistry {} // one of: { enabled: true } | { enabled: false }\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["configuration"],"sources":["../../src/index.ts"],"sourcesContent":["/** biome-ignore-all lint/suspicious/noEmptyInterface: Intlayer module augmentation registries */\n\nimport type { CustomIntlayerConfig as IntlayerConfig } from '@intlayer/types/config';\nimport type { Dictionary as DictionaryCore } from '@intlayer/types/dictionary';\nimport type { SchemaKeys } from '@intlayer/types/module_augmentation';\n\n/**\n * The dictionary type used to define the structure of a dictionary.\n * It is used to provide type safety and autocompletion when defining a dictionary.\n *\n * @example\n * ```ts\n * import { Dictionary } from 'intlayer';\n *\n * const dictionary: Dictionary = { ... };\n * ```\n */\ntype Dictionary<\n T = undefined,\n SchemaKey extends SchemaKeys | undefined = undefined,\n> = DictionaryCore<T, SchemaKey, true>;\n\n/**\n * The content of a dictionary.\n *\n * @deprecated Use `Dictionary<T>` instead.\n */\ntype DeclarationContent<\n T = undefined,\n SchemaKey extends SchemaKeys | undefined = undefined,\n> = Dictionary<T, SchemaKey>;\n\nexport { ALL_LOCALES, type Locale } from '@intlayer/types/allLocales';\nexport type { ContentNode } from '@intlayer/types/dictionary';\nexport type {\n LocalesValues,\n StrictModeLocaleMap,\n} from '@intlayer/types/module_augmentation';\n\nimport * as Locales from '@intlayer/types/locales';\nexport type { DeclarationContent, Dictionary, IntlayerConfig };\n\n/**\n * Rexport using named import because πof Tsup bug in CJS\n */\n/**\n * The configuration of Intlayer.\n */\nimport configuration from '@intlayer/config/built';\n\n/**\n * Returns the configuration of Intlayer.\n */\nconst getConfiguration = () => configuration;\n\n/**\n * The locales defined in the configuration.\n */\nconst locales = configuration.internationalization.locales;\n\n/**\n * The required locales defined in the configuration.\n */\nconst requiredLocales = configuration.internationalization.requiredLocales;\n\n/**\n * The default locale defined in the configuration.\n */\nconst defaultLocale = configuration.internationalization.defaultLocale;\n\n// Reexport here for CJS compatibility\n// Fix ReferenceError: Cannot access 'xxx' before initialization\nexport {\n configuration,\n getConfiguration,\n locales,\n requiredLocales,\n defaultLocale,\n Locales,\n};\n\nexport { file } from '@intlayer/core/file'; // Include specific export for browser because of node js function that can't be used in browser\nexport {\n compact,\n currency,\n date,\n Intl,\n number,\n percentage,\n relativeTime,\n units,\n} from '@intlayer/core/formatters';\nexport {\n getDictionary,\n getEnumeration,\n /**\n * @deprecated Use `getEnumeration` instead.\n */\n getEnumeration as getEnumerationContent,\n getIntlayer,\n getNesting,\n getTranslation,\n /**\n * @deprecated Use `getTranslation` instead.\n */\n getTranslation as getTranslationContent,\n} from '@intlayer/core/interpreter';\nexport {\n getBrowserLocale,\n getCanonicalPath,\n getHTMLTextDir,\n getLocale,\n getLocaleFromPath,\n getLocaleLang,\n getLocaleName,\n getLocalizedPath,\n getLocalizedUrl,\n getMultilingualUrls,\n getPathWithoutLocale,\n getPrefix,\n getRewriteRules,\n localeDetector,\n localeFlatMap,\n localeMap,\n localeRecord,\n localeResolver,\n validatePrefix,\n} from '@intlayer/core/localization';\nexport { getMarkdownMetadata } from '@intlayer/core/markdown';\nexport {\n cond,\n enu,\n gender,\n html,\n insert,\n md,\n nest,\n t,\n} from '@intlayer/core/transpiler';\nexport {\n getCookie,\n getLocaleFromStorage,\n setLocaleInStorage,\n} from '@intlayer/core/utils';\n\n// --- Registries to be augmented by the generator ---\nexport interface __DictionaryRegistry {} // id -> interfaceof ictionary\nexport interface __DeclaredLocalesRegistry {} // 'fr': 1, 'en': 1, ...\nexport interface __RequiredLocalesRegistry {} // 'en': 1, ...\nexport interface __SchemaRegistry {} // id -> interface of schema\nexport interface __StrictModeRegistry {} // one of: { strict: true } | { inclusive: true } | { loose: true }\nexport interface __EditorRegistry {} // one of: { enabled: true } | { enabled: false }\n"],"mappings":"m7BAqDA,MAAM,MAAyBA,EAAAA,QAKzB,EAAUA,EAAAA,QAAc,qBAAqB,QAK7C,EAAkBA,EAAAA,QAAc,qBAAqB,gBAKrD,EAAgBA,EAAAA,QAAc,qBAAqB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "intlayer",
|
|
3
|
-
"version": "8.4.
|
|
3
|
+
"version": "8.4.1",
|
|
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": [
|
|
@@ -98,10 +98,10 @@
|
|
|
98
98
|
"typecheck": "tsc --noEmit --project tsconfig.types.json"
|
|
99
99
|
},
|
|
100
100
|
"dependencies": {
|
|
101
|
-
"@intlayer/cli": "8.4.
|
|
102
|
-
"@intlayer/config": "8.4.
|
|
103
|
-
"@intlayer/core": "8.4.
|
|
104
|
-
"@intlayer/types": "8.4.
|
|
101
|
+
"@intlayer/cli": "8.4.1",
|
|
102
|
+
"@intlayer/config": "8.4.1",
|
|
103
|
+
"@intlayer/core": "8.4.1",
|
|
104
|
+
"@intlayer/types": "8.4.1"
|
|
105
105
|
},
|
|
106
106
|
"devDependencies": {
|
|
107
107
|
"@types/node": "25.5.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));exports.__toESM=s;
|