@intlayer/config 2.0.12 → 3.0.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.
Files changed (163) hide show
  1. package/dist/cjs/configFile/buildConfigurationFields.cjs +43 -5
  2. package/dist/cjs/configFile/buildConfigurationFields.cjs.map +1 -1
  3. package/dist/cjs/configFile/getConfiguration.cjs +3 -1
  4. package/dist/cjs/configFile/getConfiguration.cjs.map +1 -1
  5. package/dist/cjs/configFile/loadConfigurationFile.cjs +26 -5
  6. package/dist/cjs/configFile/loadConfigurationFile.cjs.map +1 -1
  7. package/dist/cjs/defaultValues/editor.cjs +8 -5
  8. package/dist/cjs/defaultValues/editor.cjs.map +1 -1
  9. package/dist/cjs/envVariables/detectPlatform.cjs +1 -1
  10. package/dist/cjs/envVariables/detectPlatform.cjs.map +1 -1
  11. package/dist/cjs/envVariables/extractEnvVariable/next.cjs +5 -2
  12. package/dist/cjs/envVariables/extractEnvVariable/next.cjs.map +1 -1
  13. package/dist/cjs/envVariables/extractEnvVariable/react_app.cjs +5 -2
  14. package/dist/cjs/envVariables/extractEnvVariable/react_app.cjs.map +1 -1
  15. package/dist/cjs/envVariables/extractEnvVariable/undefined_platform.cjs +35 -32
  16. package/dist/cjs/envVariables/extractEnvVariable/undefined_platform.cjs.map +1 -1
  17. package/dist/cjs/envVariables/extractEnvVariable/vite.cjs +5 -2
  18. package/dist/cjs/envVariables/extractEnvVariable/vite.cjs.map +1 -1
  19. package/dist/cjs/envVariables/extractEnvVariable/vite_env.d.cjs +16 -0
  20. package/dist/cjs/envVariables/extractEnvVariable/vite_env.d.cjs.map +1 -1
  21. package/dist/cjs/envVariables/getConfiguration.cjs +8 -2
  22. package/dist/cjs/envVariables/getConfiguration.cjs.map +1 -1
  23. package/dist/cjs/envVariables/index.cjs +8 -2
  24. package/dist/cjs/envVariables/index.cjs.map +1 -1
  25. package/dist/cjs/envVariables/loadEnvFile.cjs +41 -0
  26. package/dist/cjs/envVariables/loadEnvFile.cjs.map +1 -0
  27. package/dist/cjs/index.cjs +9 -2
  28. package/dist/cjs/index.cjs.map +1 -1
  29. package/dist/cjs/types/config.cjs.map +1 -1
  30. package/dist/cjs/types/locales.cjs +3 -2
  31. package/dist/cjs/types/locales.cjs.map +1 -1
  32. package/dist/cjs/utils/ESMxCJSRequire.cjs +32 -0
  33. package/dist/cjs/utils/ESMxCJSRequire.cjs.map +1 -0
  34. package/dist/esm/configFile/buildConfigurationFields.mjs +48 -6
  35. package/dist/esm/configFile/buildConfigurationFields.mjs.map +1 -1
  36. package/dist/esm/configFile/getConfiguration.mjs +3 -1
  37. package/dist/esm/configFile/getConfiguration.mjs.map +1 -1
  38. package/dist/esm/configFile/loadConfigurationFile.mjs +16 -4
  39. package/dist/esm/configFile/loadConfigurationFile.mjs.map +1 -1
  40. package/dist/esm/defaultValues/editor.mjs +5 -3
  41. package/dist/esm/defaultValues/editor.mjs.map +1 -1
  42. package/dist/esm/envVariables/detectPlatform.mjs +1 -1
  43. package/dist/esm/envVariables/detectPlatform.mjs.map +1 -1
  44. package/dist/esm/envVariables/extractEnvVariable/next.mjs +5 -2
  45. package/dist/esm/envVariables/extractEnvVariable/next.mjs.map +1 -1
  46. package/dist/esm/envVariables/extractEnvVariable/react_app.mjs +5 -2
  47. package/dist/esm/envVariables/extractEnvVariable/react_app.mjs.map +1 -1
  48. package/dist/esm/envVariables/extractEnvVariable/undefined_platform.mjs +35 -32
  49. package/dist/esm/envVariables/extractEnvVariable/undefined_platform.mjs.map +1 -1
  50. package/dist/esm/envVariables/extractEnvVariable/vite.mjs +5 -2
  51. package/dist/esm/envVariables/extractEnvVariable/vite.mjs.map +1 -1
  52. package/dist/esm/envVariables/extractEnvVariable/vite_env.d.mjs +1 -0
  53. package/dist/esm/envVariables/extractEnvVariable/vite_env.d.mjs.map +1 -1
  54. package/dist/esm/envVariables/getConfiguration.mjs +8 -2
  55. package/dist/esm/envVariables/getConfiguration.mjs.map +1 -1
  56. package/dist/esm/envVariables/index.mjs +5 -1
  57. package/dist/esm/envVariables/index.mjs.map +1 -1
  58. package/dist/esm/envVariables/loadEnvFile.mjs +7 -0
  59. package/dist/esm/envVariables/loadEnvFile.mjs.map +1 -0
  60. package/dist/esm/index.mjs +8 -2
  61. package/dist/esm/index.mjs.map +1 -1
  62. package/dist/esm/types/locales.mjs +3 -2
  63. package/dist/esm/types/locales.mjs.map +1 -1
  64. package/dist/esm/utils/ESMxCJSRequire.mjs +7 -0
  65. package/dist/esm/utils/ESMxCJSRequire.mjs.map +1 -0
  66. package/dist/types/client.d.ts +5 -0
  67. package/dist/types/client.d.ts.map +1 -0
  68. package/dist/types/configFile/buildConfigurationFields.d.ts +7 -0
  69. package/dist/types/configFile/buildConfigurationFields.d.ts.map +1 -0
  70. package/dist/types/configFile/getConfiguration.d.ts +10 -0
  71. package/dist/types/configFile/getConfiguration.d.ts.map +1 -0
  72. package/dist/types/configFile/index.d.ts +3 -0
  73. package/dist/types/configFile/index.d.ts.map +1 -0
  74. package/dist/types/configFile/loadConfigurationFile.d.ts +9 -0
  75. package/dist/types/configFile/loadConfigurationFile.d.ts.map +1 -0
  76. package/dist/{cjs → types}/configFile/searchConfigurationFile.d.ts +3 -3
  77. package/dist/types/configFile/searchConfigurationFile.d.ts.map +1 -0
  78. package/dist/types/defaultValues/editor.d.ts +4 -0
  79. package/dist/types/defaultValues/editor.d.ts.map +1 -0
  80. package/dist/types/defaultValues/internationalization.d.ts +6 -0
  81. package/dist/types/defaultValues/internationalization.d.ts.map +1 -0
  82. package/dist/types/defaultValues/middleware.d.ts +7 -0
  83. package/dist/types/defaultValues/middleware.d.ts.map +1 -0
  84. package/dist/types/defaultValues/server.d.ts +12 -0
  85. package/dist/types/defaultValues/server.d.ts.map +1 -0
  86. package/dist/types/envVariables/detectPlatform.d.ts +7 -0
  87. package/dist/types/envVariables/detectPlatform.d.ts.map +1 -0
  88. package/dist/types/envVariables/extractEnvVariable/index.d.ts +3 -0
  89. package/dist/types/envVariables/extractEnvVariable/index.d.ts.map +1 -0
  90. package/dist/types/envVariables/extractEnvVariable/next.d.ts +3 -0
  91. package/dist/types/envVariables/extractEnvVariable/next.d.ts.map +1 -0
  92. package/dist/types/envVariables/extractEnvVariable/react_app.d.ts +3 -0
  93. package/dist/types/envVariables/extractEnvVariable/react_app.d.ts.map +1 -0
  94. package/dist/types/envVariables/extractEnvVariable/types.d.ts +8 -0
  95. package/dist/types/envVariables/extractEnvVariable/types.d.ts.map +1 -0
  96. package/dist/types/envVariables/extractEnvVariable/undefined_platform.d.ts +3 -0
  97. package/dist/types/envVariables/extractEnvVariable/undefined_platform.d.ts.map +1 -0
  98. package/dist/types/envVariables/extractEnvVariable/vite.d.ts +3 -0
  99. package/dist/types/envVariables/extractEnvVariable/vite.d.ts.map +1 -0
  100. package/dist/types/envVariables/formatEnvVariable.d.ts +6 -0
  101. package/dist/types/envVariables/formatEnvVariable.d.ts.map +1 -0
  102. package/dist/{cjs → types}/envVariables/getConfiguration.d.ts +3 -6
  103. package/dist/types/envVariables/getConfiguration.d.ts.map +1 -0
  104. package/dist/types/envVariables/index.d.ts +5 -0
  105. package/dist/types/envVariables/index.d.ts.map +1 -0
  106. package/dist/types/envVariables/loadEnvFile.d.ts +3 -0
  107. package/dist/types/envVariables/loadEnvFile.d.ts.map +1 -0
  108. package/dist/{cjs → types}/envVariables/utils.d.ts +1 -1
  109. package/dist/types/envVariables/utils.d.ts.map +1 -0
  110. package/dist/types/index.d.ts +7 -0
  111. package/dist/types/index.d.ts.map +1 -0
  112. package/dist/{cjs → types}/types/config.d.ts +58 -24
  113. package/dist/types/types/config.d.ts.map +1 -0
  114. package/dist/{cjs → types}/types/locales.d.ts +9 -7
  115. package/dist/types/types/locales.d.ts.map +1 -0
  116. package/dist/types/utils/ESMxCJSRequire.d.ts +2 -0
  117. package/dist/types/utils/ESMxCJSRequire.d.ts.map +1 -0
  118. package/package.json +32 -17
  119. package/dist/cjs/client.d.ts +0 -3
  120. package/dist/cjs/configFile/buildConfigurationFields.d.ts +0 -10
  121. package/dist/cjs/configFile/getConfiguration.d.ts +0 -13
  122. package/dist/cjs/configFile/index.d.ts +0 -4
  123. package/dist/cjs/configFile/loadConfigurationFile.d.ts +0 -12
  124. package/dist/cjs/defaultValues/editor.d.ts +0 -4
  125. package/dist/cjs/defaultValues/internationalization.d.ts +0 -8
  126. package/dist/cjs/defaultValues/middleware.d.ts +0 -8
  127. package/dist/cjs/defaultValues/server.d.ts +0 -15
  128. package/dist/cjs/envVariables/detectPlatform.d.ts +0 -8
  129. package/dist/cjs/envVariables/extractEnvVariable/index.d.ts +0 -7
  130. package/dist/cjs/envVariables/extractEnvVariable/next.d.ts +0 -7
  131. package/dist/cjs/envVariables/extractEnvVariable/react_app.d.ts +0 -7
  132. package/dist/cjs/envVariables/extractEnvVariable/types.d.ts +0 -11
  133. package/dist/cjs/envVariables/extractEnvVariable/undefined_platform.d.ts +0 -7
  134. package/dist/cjs/envVariables/extractEnvVariable/vite.d.ts +0 -7
  135. package/dist/cjs/envVariables/extractEnvVariable/vite_env.d.d.ts +0 -2
  136. package/dist/cjs/envVariables/formatEnvVariable.d.ts +0 -8
  137. package/dist/cjs/envVariables/index.d.ts +0 -5
  138. package/dist/cjs/index.d.ts +0 -6
  139. package/dist/esm/client.d.mts +0 -3
  140. package/dist/esm/configFile/buildConfigurationFields.d.mts +0 -10
  141. package/dist/esm/configFile/getConfiguration.d.mts +0 -13
  142. package/dist/esm/configFile/index.d.mts +0 -4
  143. package/dist/esm/configFile/loadConfigurationFile.d.mts +0 -12
  144. package/dist/esm/configFile/searchConfigurationFile.d.mts +0 -18
  145. package/dist/esm/defaultValues/editor.d.mts +0 -4
  146. package/dist/esm/defaultValues/internationalization.d.mts +0 -8
  147. package/dist/esm/defaultValues/middleware.d.mts +0 -8
  148. package/dist/esm/defaultValues/server.d.mts +0 -15
  149. package/dist/esm/envVariables/detectPlatform.d.mts +0 -8
  150. package/dist/esm/envVariables/extractEnvVariable/index.d.mts +0 -7
  151. package/dist/esm/envVariables/extractEnvVariable/next.d.mts +0 -7
  152. package/dist/esm/envVariables/extractEnvVariable/react_app.d.mts +0 -7
  153. package/dist/esm/envVariables/extractEnvVariable/types.d.mts +0 -11
  154. package/dist/esm/envVariables/extractEnvVariable/undefined_platform.d.mts +0 -7
  155. package/dist/esm/envVariables/extractEnvVariable/vite.d.mts +0 -7
  156. package/dist/esm/envVariables/extractEnvVariable/vite_env.d.d.mts +0 -2
  157. package/dist/esm/envVariables/formatEnvVariable.d.mts +0 -8
  158. package/dist/esm/envVariables/getConfiguration.d.mts +0 -11
  159. package/dist/esm/envVariables/index.d.mts +0 -5
  160. package/dist/esm/envVariables/utils.d.mts +0 -7
  161. package/dist/esm/index.d.mts +0 -6
  162. package/dist/esm/types/config.d.mts +0 -372
  163. package/dist/esm/types/locales.d.mts +0 -469
@@ -1,5 +1,5 @@
1
1
  /** Can be imported from a shared config */
2
- declare enum Locales {
2
+ export declare enum Locales {
3
3
  /** Afrikaans language */
4
4
  AFRIKAANS = "af",
5
5
  /** Afrikaans language as used in South Africa */
@@ -446,8 +446,10 @@ declare enum Locales {
446
446
  XHOSA_SOUTH_AFRICA = "xh-ZA",
447
447
  /** Chinese language */
448
448
  CHINESE = "zh",
449
- /** Chinese language (Simplified script) */
450
- CHINESE_SIMPLIFIED = "zh-CN",
449
+ /** Chinese language (Simplified) */
450
+ CHINESE_SIMPLIFIED = "zh-Hans",
451
+ /** Chinese language (Simplified, People's Republic of China) */
452
+ CHINESE_SIMPLIFIED_CHINA = "zh-CN",
451
453
  /** Chinese language as used in Hong Kong */
452
454
  CHINESE_HONG_KONG = "zh-HK",
453
455
  /** Chinese language as used in Macau */
@@ -455,7 +457,7 @@ declare enum Locales {
455
457
  /** Chinese language as used in Singapore */
456
458
  CHINESE_SINGAPORE = "zh-SG",
457
459
  /** Chinese language (Traditional script) */
458
- CHINESE_TRADITIONAL = "zh-TW",
460
+ CHINESE_TRADITIONAL = "zh-Hant",
459
461
  /** Zulu language */
460
462
  ZULU = "zu",
461
463
  /** Zulu language as used in South Africa */
@@ -464,6 +466,6 @@ declare enum Locales {
464
466
  /** Utility type to extract the values from an enum */
465
467
  type ValueOf<T> = T[keyof T];
466
468
  /** Define MyType using the ValueOf utility type on Locales */
467
- type LocalesValues = ValueOf<typeof Locales>;
468
-
469
- export { Locales, type LocalesValues };
469
+ export type LocalesValues = ValueOf<typeof Locales>;
470
+ export {};
471
+ //# sourceMappingURL=locales.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../../src/types/locales.ts"],"names":[],"mappings":"AAAA,2CAA2C;AAC3C,oBAAY,OAAO;IACjB,yBAAyB;IACzB,SAAS,OAAO;IAChB,iDAAiD;IACjD,sBAAsB,UAAU;IAChC,sBAAsB;IACtB,MAAM,OAAO;IACb,0DAA0D;IAC1D,2BAA2B,UAAU;IACrC,yCAAyC;IACzC,cAAc,UAAU;IACxB,yCAAyC;IACzC,cAAc,UAAU;IACxB,uCAAuC;IACvC,YAAY,UAAU;IACtB,sCAAsC;IACtC,WAAW,UAAU;IACrB,wCAAwC;IACxC,aAAa,UAAU;IACvB,wCAAwC;IACxC,aAAa,UAAU;IACvB,yCAAyC;IACzC,cAAc,UAAU;IACxB,uCAAuC;IACvC,YAAY,UAAU;IACtB,yCAAyC;IACzC,cAAc,UAAU;IACxB,sCAAsC;IACtC,WAAW,UAAU;IACrB,uCAAuC;IACvC,YAAY,UAAU;IACtB,8CAA8C;IAC9C,mBAAmB,UAAU;IAC7B,uCAAuC;IACvC,YAAY,UAAU;IACtB,yCAAyC;IACzC,cAAc,UAAU;IACxB,uCAAuC;IACvC,YAAY,UAAU;IACtB,oCAAoC;IACpC,WAAW,OAAO;IAClB,0DAA0D;IAC1D,sBAAsB,UAAU;IAChC,0BAA0B;IAC1B,UAAU,OAAO;IACjB,6CAA6C;IAC7C,kBAAkB,UAAU;IAC5B,yBAAyB;IACzB,SAAS,OAAO;IAChB,6CAA6C;IAC7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AC9C,mBAAmB,UAAU;IAC7B,uBAAuB;IACvB,OAAO,OAAO;IACd,yCAAyC;IACzC,cAAc,UAAU;IACxB,qBAAqB;IACrB,KAAK,OAAO;IACZ,uCAAuC;IACvC,YAAY,UAAU;IACtB,sBAAsB;IACtB,KAAK,OAAO;IACZ,yBAAyB;IACzB,SAAS,OAAO;IAChB,4CAA4C;IAC5C,iBAAiB,UAAU;IAC3B,oBAAoB;IACpB,IAAI,OAAO;IACX,4DAA4D;IAC5D,iCAAiC,UAAU;IAC3C,oCAAoC;IACpC,WAAW,OAAO;IAClB,0DAA0D;IAC1D,sBAAsB,UAAU;IAChC,0BAA0B;IAC1B,UAAU,OAAO;IACjB,8CAA8C;IAC9C,mBAAmB,UAAU;IAC7B,qBAAqB;IACrB,KAAK,OAAO;IACZ,6CAA6C;IAC7C,kBAAkB,UAAU;IAC5B,uBAAuB;IACvB,OAAO,OAAO;IACd,oCAAoC;IACpC,kBAAkB,YAAY;IAC9B,gEAAgE;IAChE,wBAAwB,UAAU;IAClC,4CAA4C;IAC5C,iBAAiB,UAAU;IAC3B,wCAAwC;IACxC,aAAa,UAAU;IACvB,4CAA4C;IAC5C,iBAAiB,UAAU;IAC3B,4CAA4C;IAC5C,mBAAmB,YAAY;IAC/B,oBAAoB;IACpB,IAAI,OAAO;IACX,4CAA4C;IAC5C,iBAAiB,UAAU;CAC5B;AAED,sDAAsD;AACtD,KAAK,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC;AAE7B,8DAA8D;AAC9D,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC,OAAO,OAAO,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const ESMxCJSRequire: NodeRequire;
2
+ //# sourceMappingURL=ESMxCJSRequire.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ESMxCJSRequire.d.ts","sourceRoot":"","sources":["../../../src/utils/ESMxCJSRequire.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,cAAc,aAEhB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intlayer/config",
3
- "version": "2.0.12",
3
+ "version": "3.0.0",
4
4
  "private": false,
5
5
  "description": "Shared configuration package for IntLayer - Layer of abstraction between the business logic and the data access layer. Manage internationalization in a simple way, through TypeScript, JavaScript or JSON declaration file.",
6
6
  "keywords": [
@@ -17,32 +17,32 @@
17
17
  ],
18
18
  "homepage": "https://intlayer.org",
19
19
  "bugs": {
20
- "url": "https://github.com/aypineau/intlayer/issues"
20
+ "url": "https://github.com/aymericzip/intlayer/issues"
21
21
  },
22
22
  "repository": {
23
23
  "type": "git",
24
- "url": "git+https://github.com/aypineau/intlayer.git"
24
+ "url": "git+https://github.com/aymericzip/intlayer.git"
25
25
  },
26
26
  "license": "Apache-2.0",
27
27
  "author": {
28
28
  "name": "Aymeric PINEAU",
29
- "url": "https://github.com/aypineau"
29
+ "url": "https://github.com/aymericzip"
30
30
  },
31
31
  "contributors": [
32
32
  {
33
33
  "name": "Aymeric Pineau",
34
34
  "email": "ay.pineau@gmail.com",
35
- "url": "https://github.com/aypineau"
35
+ "url": "https://github.com/aymericzip"
36
36
  }
37
37
  ],
38
38
  "exports": {
39
39
  ".": {
40
- "types": "./dist/esm/index.d.mts",
40
+ "types": "./dist/types/index.d.ts",
41
41
  "require": "./dist/cjs/index.cjs",
42
42
  "import": "./dist/esm/index.mjs"
43
43
  },
44
44
  "./client": {
45
- "types": "./dist/esm/client.d.mts",
45
+ "types": "./dist/types/client.d.ts",
46
46
  "require": "./dist/cjs/client.cjs",
47
47
  "import": "./dist/esm/client.mjs"
48
48
  },
@@ -50,6 +50,7 @@
50
50
  },
51
51
  "main": "dist/cjs/index.cjs",
52
52
  "module": "dist/esm/index.mjs",
53
+ "types": "dist/types/index.d.ts",
53
54
  "typesVersions": {
54
55
  "*": {
55
56
  "package.json": [
@@ -64,32 +65,46 @@
64
65
  "dependencies": {
65
66
  "@swc-node/register": "^1.9.2",
66
67
  "@swc/cli": "^0.3.14",
67
- "@types/node": "^20.14.9",
68
+ "dotenv": "^16.4.5",
68
69
  "esbuild": "^0.20.2",
69
70
  "swc-loader": "^0.2.6",
70
- "intlayer": "^2.0.12"
71
+ "intlayer": "^3.0.0"
71
72
  },
72
73
  "devDependencies": {
74
+ "@types/node": "^20.14.9",
75
+ "@types/react": "^18.3.11",
76
+ "concurrently": "^8.2.2",
77
+ "eslint": "^9.11.1",
78
+ "prettier": "3.3.3",
73
79
  "rimraf": "5.0.5",
74
- "tsup": "^8.1.0",
80
+ "tsc-alias": "^1.8.10",
81
+ "tsup": "^8.3.0",
75
82
  "typescript": "^5.5.2",
76
83
  "@utils/eslint-config": "^1.0.4",
77
- "@utils/ts-config": "^1.0.4"
84
+ "@utils/ts-config": "^1.0.4",
85
+ "@utils/ts-config-types": "^1.0.4",
86
+ "@utils/tsup-config": "^1.0.4"
87
+ },
88
+ "peerDependencies": {
89
+ "react": "^18.3.1"
78
90
  },
79
91
  "engines": {
80
92
  "node": ">=14.18"
81
93
  },
82
94
  "bug": {
83
- "url": "https://github.com/aypineau/intlayer/issues"
95
+ "url": "https://github.com/aymericzip/intlayer/issues"
84
96
  },
85
97
  "scripts": {
86
- "build": "tsup",
98
+ "build": "pnpm build:package & pnpm build:types",
99
+ "build:package": "tsup",
100
+ "build:types": "tsc --project ./tsconfig.types.json && tsc-alias --project ./tsconfig.types.json",
87
101
  "clean": "rimraf ./dist",
88
- "dev": "tsup --watch",
89
- "lint": "eslint . --ext .ts,.tsx,.js,.jsx,.cjs,.mjs",
90
- "lint:fix": "eslint . --ext .ts,.tsx,.js,.jsx,.cjs,.mjs --fix",
102
+ "dev": "concurrently --prefix none \"tsup --watch\" \"tsc --project ./tsconfig.types.json --watch\" \"tsc-alias --project ./tsconfig.types.json --watch\"",
103
+ "lint": "eslint . --cache",
104
+ "lint:fix": "eslint . --cache --fix",
105
+ "prettier": "prettier . --check",
91
106
  "prettier:fix": "prettier --write src/**/*",
92
107
  "test": "",
93
- "typecheck": "tsup--project ./tsconfig.json --noEmit"
108
+ "typecheck": "tsup --project ./tsconfig.json --noEmit"
94
109
  }
95
110
  }
@@ -1,3 +0,0 @@
1
- export { BaseContentConfig, BaseDerivedConfig, CustomIntlayerConfig, IntlayerConfig, PatternsContentConfig, ResultDirDerivedConfig } from './types/config.js';
2
- export { Locales, LocalesValues } from './types/locales.js';
3
- export { getConfiguration } from './envVariables/getConfiguration.js';
@@ -1,10 +0,0 @@
1
- import { CustomIntlayerConfig, IntlayerConfig } from '../types/config.js';
2
- import { GetConfigurationOptions } from './getConfiguration.js';
3
- import '../types/locales.js';
4
-
5
- /**
6
- * Build the configuration fields by merging the default values with the custom configuration
7
- */
8
- declare const buildConfigurationFields: (options: GetConfigurationOptions, customConfiguration?: CustomIntlayerConfig) => IntlayerConfig;
9
-
10
- export { buildConfigurationFields };
@@ -1,13 +0,0 @@
1
- import { IntlayerConfig } from '../types/config.js';
2
- import '../types/locales.js';
3
-
4
- type GetConfigurationOptions = {
5
- baseDir: string;
6
- verbose: boolean;
7
- };
8
- /**
9
- * Get the configuration for the intlayer by reading the configuration file (e.g. intlayer.config.js)
10
- */
11
- declare const getConfiguration: (options?: Partial<GetConfigurationOptions>) => IntlayerConfig;
12
-
13
- export { type GetConfigurationOptions, getConfiguration };
@@ -1,4 +0,0 @@
1
- export { GetConfigurationOptions, getConfiguration } from './getConfiguration.js';
2
- export { searchConfigurationFile } from './searchConfigurationFile.js';
3
- import '../types/config.js';
4
- import '../types/locales.js';
@@ -1,12 +0,0 @@
1
- import { CustomIntlayerConfig } from '../types/config.js';
2
- import '../types/locales.js';
3
-
4
- /**
5
- * Load the configuration file from the given path
6
- * Example of configuration file: intlayer.config.js
7
- *
8
- * Accepts JSON, JS, MJS and TS files as configuration
9
- */
10
- declare const loadConfigurationFile: (configFilePath: string) => CustomIntlayerConfig | undefined;
11
-
12
- export { loadConfigurationFile };
@@ -1,4 +0,0 @@
1
- declare const PORT = 4000;
2
- declare const IS_ENABLED = false;
3
-
4
- export { IS_ENABLED, PORT };
@@ -1,8 +0,0 @@
1
- import { StrictMode } from '../types/config.js';
2
- import { Locales } from '../types/locales.js';
3
-
4
- declare const LOCALES: Locales[];
5
- declare const DEFAULT_LOCALE: Locales;
6
- declare const STRICT_MODE: StrictMode;
7
-
8
- export { DEFAULT_LOCALE, LOCALES, STRICT_MODE };
@@ -1,8 +0,0 @@
1
- declare const HEADER_NAME = "x-intlayer-locale";
2
- declare const COOKIE_NAME = "NEXT_LOCALE";
3
- declare const PREFIX_DEFAULT = false;
4
- declare const BASE_PATH = "";
5
- declare const SERVER_SET_COOKIE = "always";
6
- declare const NO_PREFIX = false;
7
-
8
- export { BASE_PATH, COOKIE_NAME, HEADER_NAME, NO_PREFIX, PREFIX_DEFAULT, SERVER_SET_COOKIE };
@@ -1,15 +0,0 @@
1
- import { DictionaryOutput } from '../types/config.js';
2
- import '../types/locales.js';
3
-
4
- declare const FILE_EXTENSIONS: string[];
5
- declare const EXCLUDED_PATHS: string[];
6
- declare const CONTENT_DIR_NAME = "src";
7
- declare const RESULT_DIR_NAME = ".intlayer";
8
- declare const MODULE_AUGMENTATION_DIR_NAME = "types";
9
- declare const DICTIONARY_OUTPUT: DictionaryOutput[];
10
- declare const DICTIONARIES_DIR_NAME = "dictionary";
11
- declare const I18N_DICTIONARIES_DIR_NAME = "i18n_dictionary";
12
- declare const TYPES_DIR_NAME = "types";
13
- declare const MAIN_DIR_NAME = "main";
14
-
15
- export { CONTENT_DIR_NAME, DICTIONARIES_DIR_NAME, DICTIONARY_OUTPUT, EXCLUDED_PATHS, FILE_EXTENSIONS, I18N_DICTIONARIES_DIR_NAME, MAIN_DIR_NAME, MODULE_AUGMENTATION_DIR_NAME, RESULT_DIR_NAME, TYPES_DIR_NAME };
@@ -1,8 +0,0 @@
1
- type Platform = 'next' | 'vite' | 'react_app' | 'unknown';
2
- declare const getPlatform: () => Platform;
3
- /**
4
- * Get the prefix for the environment variables to be used in the platform
5
- */
6
- declare const getPrefix: (platform: Platform) => string;
7
-
8
- export { type Platform, getPlatform, getPrefix };
@@ -1,7 +0,0 @@
1
- import { IntlayerConfigEnvVariable } from './types.js';
2
- import '../../types/config.js';
3
- import '../../types/locales.js';
4
-
5
- declare const extractEnvVariable: () => IntlayerConfigEnvVariable;
6
-
7
- export { extractEnvVariable };
@@ -1,7 +0,0 @@
1
- import { IntlayerConfigEnvVariable } from './types.js';
2
- import '../../types/config.js';
3
- import '../../types/locales.js';
4
-
5
- declare const extractNextEnvVariable: () => IntlayerConfigEnvVariable;
6
-
7
- export { extractNextEnvVariable };
@@ -1,7 +0,0 @@
1
- import { IntlayerConfigEnvVariable } from './types.js';
2
- import '../../types/config.js';
3
- import '../../types/locales.js';
4
-
5
- declare const extractReactAppEnvVariable: () => IntlayerConfigEnvVariable;
6
-
7
- export { extractReactAppEnvVariable };
@@ -1,11 +0,0 @@
1
- import { IntlayerConfig } from '../../types/config.js';
2
- import '../../types/locales.js';
3
-
4
- type ReplaceValue<T> = {
5
- [K in keyof T]: string | undefined;
6
- };
7
- type IntlayerConfigEnvVariable = {
8
- [K in keyof IntlayerConfig]: ReplaceValue<IntlayerConfig[K]>;
9
- };
10
-
11
- export type { IntlayerConfigEnvVariable, ReplaceValue };
@@ -1,7 +0,0 @@
1
- import { IntlayerConfigEnvVariable } from './types.js';
2
- import '../../types/config.js';
3
- import '../../types/locales.js';
4
-
5
- declare const extractEmptyEnvVariable: () => IntlayerConfigEnvVariable;
6
-
7
- export { extractEmptyEnvVariable };
@@ -1,7 +0,0 @@
1
- import { IntlayerConfigEnvVariable } from './types.js';
2
- import '../../types/config.js';
3
- import '../../types/locales.js';
4
-
5
- declare const extractViteEnvVariable: () => IntlayerConfigEnvVariable;
6
-
7
- export { extractViteEnvVariable };
@@ -1,8 +0,0 @@
1
- import { Platform } from './detectPlatform.js';
2
-
3
- /**
4
- * Format all configuration values as environment variables
5
- */
6
- declare const formatEnvVariable: (platform: Platform) => Record<string, string>;
7
-
8
- export { formatEnvVariable };
@@ -1,5 +0,0 @@
1
- export { getConfiguration } from './getConfiguration.js';
2
- export { formatEnvVariable } from './formatEnvVariable.js';
3
- import '../types/config.js';
4
- import '../types/locales.js';
5
- import './detectPlatform.js';
@@ -1,6 +0,0 @@
1
- export { getConfiguration } from './configFile/getConfiguration.js';
2
- export { BaseContentConfig, BaseDerivedConfig, ContentConfig, CustomIntlayerConfig, InternationalizationConfig, IntlayerConfig, MiddlewareConfig, PatternsContentConfig, ResultDirDerivedConfig, ServerSetCookieRule, StrictMode } from './types/config.js';
3
- export { Locales, LocalesValues } from './types/locales.js';
4
- export { getConfiguration as getClientConfiguration } from './envVariables/getConfiguration.js';
5
- export { formatEnvVariable } from './envVariables/formatEnvVariable.js';
6
- import './envVariables/detectPlatform.js';
@@ -1,3 +0,0 @@
1
- export { BaseContentConfig, BaseDerivedConfig, CustomIntlayerConfig, IntlayerConfig, PatternsContentConfig, ResultDirDerivedConfig } from './types/config.mjs';
2
- export { Locales, LocalesValues } from './types/locales.mjs';
3
- export { getConfiguration } from './envVariables/getConfiguration.mjs';
@@ -1,10 +0,0 @@
1
- import { CustomIntlayerConfig, IntlayerConfig } from '../types/config.mjs';
2
- import { GetConfigurationOptions } from './getConfiguration.mjs';
3
- import '../types/locales.mjs';
4
-
5
- /**
6
- * Build the configuration fields by merging the default values with the custom configuration
7
- */
8
- declare const buildConfigurationFields: (options: GetConfigurationOptions, customConfiguration?: CustomIntlayerConfig) => IntlayerConfig;
9
-
10
- export { buildConfigurationFields };
@@ -1,13 +0,0 @@
1
- import { IntlayerConfig } from '../types/config.mjs';
2
- import '../types/locales.mjs';
3
-
4
- type GetConfigurationOptions = {
5
- baseDir: string;
6
- verbose: boolean;
7
- };
8
- /**
9
- * Get the configuration for the intlayer by reading the configuration file (e.g. intlayer.config.js)
10
- */
11
- declare const getConfiguration: (options?: Partial<GetConfigurationOptions>) => IntlayerConfig;
12
-
13
- export { type GetConfigurationOptions, getConfiguration };
@@ -1,4 +0,0 @@
1
- export { GetConfigurationOptions, getConfiguration } from './getConfiguration.mjs';
2
- export { searchConfigurationFile } from './searchConfigurationFile.mjs';
3
- import '../types/config.mjs';
4
- import '../types/locales.mjs';
@@ -1,12 +0,0 @@
1
- import { CustomIntlayerConfig } from '../types/config.mjs';
2
- import '../types/locales.mjs';
3
-
4
- /**
5
- * Load the configuration file from the given path
6
- * Example of configuration file: intlayer.config.js
7
- *
8
- * Accepts JSON, JS, MJS and TS files as configuration
9
- */
10
- declare const loadConfigurationFile: (configFilePath: string) => CustomIntlayerConfig | undefined;
11
-
12
- export { loadConfigurationFile };
@@ -1,18 +0,0 @@
1
- type SearchConfigurationFileResult = {
2
- configurationFilePath?: string;
3
- numCustomConfiguration: number;
4
- };
5
- /**
6
- * Search for the configuration file in the given path
7
- *
8
- * List of detected configuration files:
9
- * - intlayer.config.ts
10
- * - intlayer.config.js
11
- * - intlayer.config.json
12
- * - intlayer.config.cjs
13
- * - intlayer.config.mjs
14
- * - .intlayerrc
15
- */
16
- declare const searchConfigurationFile: (configFilePath: string) => SearchConfigurationFileResult;
17
-
18
- export { searchConfigurationFile };
@@ -1,4 +0,0 @@
1
- declare const PORT = 4000;
2
- declare const IS_ENABLED = false;
3
-
4
- export { IS_ENABLED, PORT };
@@ -1,8 +0,0 @@
1
- import { StrictMode } from '../types/config.mjs';
2
- import { Locales } from '../types/locales.mjs';
3
-
4
- declare const LOCALES: Locales[];
5
- declare const DEFAULT_LOCALE: Locales;
6
- declare const STRICT_MODE: StrictMode;
7
-
8
- export { DEFAULT_LOCALE, LOCALES, STRICT_MODE };
@@ -1,8 +0,0 @@
1
- declare const HEADER_NAME = "x-intlayer-locale";
2
- declare const COOKIE_NAME = "NEXT_LOCALE";
3
- declare const PREFIX_DEFAULT = false;
4
- declare const BASE_PATH = "";
5
- declare const SERVER_SET_COOKIE = "always";
6
- declare const NO_PREFIX = false;
7
-
8
- export { BASE_PATH, COOKIE_NAME, HEADER_NAME, NO_PREFIX, PREFIX_DEFAULT, SERVER_SET_COOKIE };
@@ -1,15 +0,0 @@
1
- import { DictionaryOutput } from '../types/config.mjs';
2
- import '../types/locales.mjs';
3
-
4
- declare const FILE_EXTENSIONS: string[];
5
- declare const EXCLUDED_PATHS: string[];
6
- declare const CONTENT_DIR_NAME = "src";
7
- declare const RESULT_DIR_NAME = ".intlayer";
8
- declare const MODULE_AUGMENTATION_DIR_NAME = "types";
9
- declare const DICTIONARY_OUTPUT: DictionaryOutput[];
10
- declare const DICTIONARIES_DIR_NAME = "dictionary";
11
- declare const I18N_DICTIONARIES_DIR_NAME = "i18n_dictionary";
12
- declare const TYPES_DIR_NAME = "types";
13
- declare const MAIN_DIR_NAME = "main";
14
-
15
- export { CONTENT_DIR_NAME, DICTIONARIES_DIR_NAME, DICTIONARY_OUTPUT, EXCLUDED_PATHS, FILE_EXTENSIONS, I18N_DICTIONARIES_DIR_NAME, MAIN_DIR_NAME, MODULE_AUGMENTATION_DIR_NAME, RESULT_DIR_NAME, TYPES_DIR_NAME };
@@ -1,8 +0,0 @@
1
- type Platform = 'next' | 'vite' | 'react_app' | 'unknown';
2
- declare const getPlatform: () => Platform;
3
- /**
4
- * Get the prefix for the environment variables to be used in the platform
5
- */
6
- declare const getPrefix: (platform: Platform) => string;
7
-
8
- export { type Platform, getPlatform, getPrefix };
@@ -1,7 +0,0 @@
1
- import { IntlayerConfigEnvVariable } from './types.mjs';
2
- import '../../types/config.mjs';
3
- import '../../types/locales.mjs';
4
-
5
- declare const extractEnvVariable: () => IntlayerConfigEnvVariable;
6
-
7
- export { extractEnvVariable };
@@ -1,7 +0,0 @@
1
- import { IntlayerConfigEnvVariable } from './types.mjs';
2
- import '../../types/config.mjs';
3
- import '../../types/locales.mjs';
4
-
5
- declare const extractNextEnvVariable: () => IntlayerConfigEnvVariable;
6
-
7
- export { extractNextEnvVariable };
@@ -1,7 +0,0 @@
1
- import { IntlayerConfigEnvVariable } from './types.mjs';
2
- import '../../types/config.mjs';
3
- import '../../types/locales.mjs';
4
-
5
- declare const extractReactAppEnvVariable: () => IntlayerConfigEnvVariable;
6
-
7
- export { extractReactAppEnvVariable };
@@ -1,11 +0,0 @@
1
- import { IntlayerConfig } from '../../types/config.mjs';
2
- import '../../types/locales.mjs';
3
-
4
- type ReplaceValue<T> = {
5
- [K in keyof T]: string | undefined;
6
- };
7
- type IntlayerConfigEnvVariable = {
8
- [K in keyof IntlayerConfig]: ReplaceValue<IntlayerConfig[K]>;
9
- };
10
-
11
- export type { IntlayerConfigEnvVariable, ReplaceValue };
@@ -1,7 +0,0 @@
1
- import { IntlayerConfigEnvVariable } from './types.mjs';
2
- import '../../types/config.mjs';
3
- import '../../types/locales.mjs';
4
-
5
- declare const extractEmptyEnvVariable: () => IntlayerConfigEnvVariable;
6
-
7
- export { extractEmptyEnvVariable };
@@ -1,7 +0,0 @@
1
- import { IntlayerConfigEnvVariable } from './types.mjs';
2
- import '../../types/config.mjs';
3
- import '../../types/locales.mjs';
4
-
5
- declare const extractViteEnvVariable: () => IntlayerConfigEnvVariable;
6
-
7
- export { extractViteEnvVariable };
@@ -1,8 +0,0 @@
1
- import { Platform } from './detectPlatform.mjs';
2
-
3
- /**
4
- * Format all configuration values as environment variables
5
- */
6
- declare const formatEnvVariable: (platform: Platform) => Record<string, string>;
7
-
8
- export { formatEnvVariable };
@@ -1,11 +0,0 @@
1
- import { IntlayerConfig } from '../types/config.mjs';
2
- import '../types/locales.mjs';
3
-
4
- /**
5
- * Get all configuration values using environment variables
6
- * Can be used in the client side as the server side
7
- * To use it, be sure to have the environment variables set
8
- */
9
- declare const getConfiguration: () => IntlayerConfig;
10
-
11
- export { getConfiguration };
@@ -1,5 +0,0 @@
1
- export { getConfiguration } from './getConfiguration.mjs';
2
- export { formatEnvVariable } from './formatEnvVariable.mjs';
3
- import '../types/config.mjs';
4
- import '../types/locales.mjs';
5
- import './detectPlatform.mjs';
@@ -1,7 +0,0 @@
1
- declare function getEnvValue(value: unknown, type: 'boolean', verbose?: boolean): boolean | undefined;
2
- declare function getEnvValue(value: unknown, type: 'number', verbose?: boolean): number | undefined;
3
- declare function getEnvValue<T extends string>(value: unknown, type: 'string', verbose?: boolean): T | undefined;
4
- declare function getEnvValue<T>(value: unknown, type: 'object', verbose?: boolean): T | undefined;
5
- declare function getEnvValue<T>(value: unknown, type: 'array', verbose?: boolean): T[] | undefined;
6
-
7
- export { getEnvValue };
@@ -1,6 +0,0 @@
1
- export { getConfiguration } from './configFile/getConfiguration.mjs';
2
- export { BaseContentConfig, BaseDerivedConfig, ContentConfig, CustomIntlayerConfig, InternationalizationConfig, IntlayerConfig, MiddlewareConfig, PatternsContentConfig, ResultDirDerivedConfig, ServerSetCookieRule, StrictMode } from './types/config.mjs';
3
- export { Locales, LocalesValues } from './types/locales.mjs';
4
- export { getConfiguration as getClientConfiguration } from './envVariables/getConfiguration.mjs';
5
- export { formatEnvVariable } from './envVariables/formatEnvVariable.mjs';
6
- import './envVariables/detectPlatform.mjs';