@intlayer/core 9.5.7 → 9.5.9-canary.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 (46) hide show
  1. package/dist/cjs/index.cjs +2 -0
  2. package/dist/cjs/interpreter/getContent/index.cjs +2 -0
  3. package/dist/cjs/interpreter/getContent/plugins.cjs +65 -5
  4. package/dist/cjs/interpreter/getContent/plugins.cjs.map +1 -1
  5. package/dist/cjs/interpreter/index.cjs +2 -0
  6. package/dist/esm/index.mjs +2 -2
  7. package/dist/esm/interpreter/getContent/index.mjs +2 -2
  8. package/dist/esm/interpreter/getContent/plugins.mjs +64 -6
  9. package/dist/esm/interpreter/getContent/plugins.mjs.map +1 -1
  10. package/dist/esm/interpreter/index.mjs +2 -2
  11. package/dist/types/index.d.ts +2 -2
  12. package/dist/types/interpreter/getContent/index.d.ts +2 -2
  13. package/dist/types/interpreter/getContent/plugins.d.ts +25 -1
  14. package/dist/types/interpreter/getContent/plugins.d.ts.map +1 -1
  15. package/dist/types/interpreter/index.d.ts +2 -2
  16. package/package.json +5 -5
  17. package/dist/cjs/dictionaryManipulator/qualifiedDictionary.test-d.cjs +0 -97
  18. package/dist/cjs/dictionaryManipulator/qualifiedDictionary.test-d.cjs.map +0 -1
  19. package/dist/cjs/interpreter/getIntlayer.test-d.cjs +0 -28
  20. package/dist/cjs/interpreter/getIntlayer.test-d.cjs.map +0 -1
  21. package/dist/cjs/localization/getCanonicalPath.test-d.cjs +0 -12
  22. package/dist/cjs/localization/getCanonicalPath.test-d.cjs.map +0 -1
  23. package/dist/cjs/localization/getLocalizedPath.test-d.cjs +0 -99
  24. package/dist/cjs/localization/getLocalizedPath.test-d.cjs.map +0 -1
  25. package/dist/cjs/localization/getLocalizedUrl.test-d.cjs +0 -78
  26. package/dist/cjs/localization/getLocalizedUrl.test-d.cjs.map +0 -1
  27. package/dist/cjs/localization/rewriteUtils.test-d.cjs +0 -43
  28. package/dist/cjs/localization/rewriteUtils.test-d.cjs.map +0 -1
  29. package/dist/esm/dictionaryManipulator/qualifiedDictionary.test-d.mjs +0 -97
  30. package/dist/esm/dictionaryManipulator/qualifiedDictionary.test-d.mjs.map +0 -1
  31. package/dist/esm/interpreter/getIntlayer.test-d.mjs +0 -28
  32. package/dist/esm/interpreter/getIntlayer.test-d.mjs.map +0 -1
  33. package/dist/esm/localization/getCanonicalPath.test-d.mjs +0 -12
  34. package/dist/esm/localization/getCanonicalPath.test-d.mjs.map +0 -1
  35. package/dist/esm/localization/getLocalizedPath.test-d.mjs +0 -99
  36. package/dist/esm/localization/getLocalizedPath.test-d.mjs.map +0 -1
  37. package/dist/esm/localization/getLocalizedUrl.test-d.mjs +0 -78
  38. package/dist/esm/localization/getLocalizedUrl.test-d.mjs.map +0 -1
  39. package/dist/esm/localization/rewriteUtils.test-d.mjs +0 -43
  40. package/dist/esm/localization/rewriteUtils.test-d.mjs.map +0 -1
  41. package/dist/types/dictionaryManipulator/qualifiedDictionary.test-d.d.ts +0 -1
  42. package/dist/types/interpreter/getIntlayer.test-d.d.ts +0 -1
  43. package/dist/types/localization/getCanonicalPath.test-d.d.ts +0 -1
  44. package/dist/types/localization/getLocalizedPath.test-d.d.ts +0 -1
  45. package/dist/types/localization/getLocalizedUrl.test-d.d.ts +0 -1
  46. package/dist/types/localization/rewriteUtils.test-d.d.ts +0 -1
@@ -1,99 +0,0 @@
1
- const require_localization_getLocalizedPath = require('./getLocalizedPath.cjs');
2
- const require_localization_getLocalizedUrl = require('./getLocalizedUrl.cjs');
3
- let vitest = require("vitest");
4
-
5
- //#region src/localization/getLocalizedPath.test-d.ts
6
- /**
7
- * `getLocalizedPath` prefixes the rewritten path, so it reports the very type
8
- * its sibling reports for a relative URL. This package declares neither rewrite
9
- * rules nor a default locale, so the registry leaves both steps as no-ops.
10
- */
11
- (0, vitest.describe)("getLocalizedPath", () => {
12
- (0, vitest.it)("should report the same type as getLocalizedUrl", () => {
13
- (0, vitest.expectTypeOf)(require_localization_getLocalizedPath.getLocalizedPath("/about", "fr")).toEqualTypeOf();
14
- (0, vitest.expectTypeOf)(require_localization_getLocalizedPath.getLocalizedPath("/about", "fr")).toEqualTypeOf(require_localization_getLocalizedUrl.getLocalizedUrl("/about", "fr"));
15
- });
16
- (0, vitest.it)("should keep the literal path when nothing rewrites or prefixes it", () => {
17
- (0, vitest.expectTypeOf)(require_localization_getLocalizedPath.getLocalizedPath("/about", "fr")).toEqualTypeOf();
18
- });
19
- (0, vitest.it)("should drop the origin of an absolute URL", () => {
20
- (0, vitest.expectTypeOf)(require_localization_getLocalizedPath.getLocalizedPath("https://intlayer.org/about", "fr")).toEqualTypeOf();
21
- });
22
- (0, vitest.it)("should widen to string when the path is not a literal", () => {
23
- (0, vitest.expectTypeOf)(require_localization_getLocalizedPath.getLocalizedPath("/about", "fr")).toEqualTypeOf();
24
- });
25
- });
26
- /**
27
- * The resolution itself, exercised against explicit rules — the same shape the
28
- * generated module augmentation feeds it as `__RoutingRegistry['rewrite']`.
29
- */
30
- (0, vitest.describe)("LocalizedPath", () => {
31
- (0, vitest.it)("should rewrite a static path", () => {
32
- (0, vitest.expectTypeOf)().toEqualTypeOf();
33
- });
34
- (0, vitest.it)("should keep a path no rule matches", () => {
35
- (0, vitest.expectTypeOf)().toEqualTypeOf();
36
- });
37
- (0, vitest.it)("should substitute a route parameter", () => {
38
- (0, vitest.expectTypeOf)().toEqualTypeOf();
39
- });
40
- (0, vitest.it)("should substitute several route parameters", () => {
41
- (0, vitest.expectTypeOf)().toEqualTypeOf();
42
- });
43
- (0, vitest.it)("should not match a parameter across a segment boundary", () => {
44
- (0, vitest.expectTypeOf)().toEqualTypeOf();
45
- });
46
- (0, vitest.it)("should keep the path when the locale declares no pattern", () => {
47
- (0, vitest.expectTypeOf)().toEqualTypeOf();
48
- });
49
- (0, vitest.it)("should distribute over a union of locales", () => {
50
- (0, vitest.expectTypeOf)().toEqualTypeOf();
51
- });
52
- (0, vitest.it)("should widen a variadic rule to string, but only for the paths it could match", () => {
53
- (0, vitest.expectTypeOf)().toEqualTypeOf();
54
- (0, vitest.expectTypeOf)().toEqualTypeOf();
55
- });
56
- (0, vitest.it)("should keep every path when the project declares no rule", () => {
57
- (0, vitest.expectTypeOf)().toEqualTypeOf();
58
- });
59
- });
60
- /**
61
- * The return type of `getLocalizedPath`, exercised against an explicit routing
62
- * mode, default locale and locale set — this package declares none of them.
63
- */
64
- (0, vitest.describe)("LocalizedPathname", () => {
65
- (0, vitest.it)("should report the same type as LocalizedUrl for a relative path", () => {
66
- (0, vitest.expectTypeOf)().toEqualTypeOf();
67
- (0, vitest.expectTypeOf)().toEqualTypeOf();
68
- });
69
- (0, vitest.it)("should drop the origin of an absolute URL", () => {
70
- (0, vitest.expectTypeOf)().toEqualTypeOf();
71
- (0, vitest.expectTypeOf)().toEqualTypeOf();
72
- });
73
- (0, vitest.it)("should collapse an origin without a path to the root", () => {
74
- (0, vitest.expectTypeOf)().toEqualTypeOf();
75
- (0, vitest.expectTypeOf)().toEqualTypeOf();
76
- });
77
- (0, vitest.it)("should replace a locale segment carried by an absolute URL", () => {
78
- (0, vitest.expectTypeOf)().toEqualTypeOf();
79
- });
80
- });
81
- /**
82
- * `getLocalizedPath` never emits an origin, so `routing.domains` reaches it only
83
- * through the prefix it suppresses for a locale alone on its domain.
84
- */
85
- (0, vitest.describe)("LocalizedPathname with routing.domains", () => {
86
- (0, vitest.it)("should drop the prefix of a locale alone on its domain", () => {
87
- (0, vitest.expectTypeOf)().toEqualTypeOf();
88
- (0, vitest.expectTypeOf)().toEqualTypeOf();
89
- });
90
- (0, vitest.it)("should keep the prefix of a locale sharing its domain", () => {
91
- (0, vitest.expectTypeOf)().toEqualTypeOf();
92
- });
93
- (0, vitest.it)("should never emit the locale domain as an origin", () => {
94
- (0, vitest.expectTypeOf)().toEqualTypeOf();
95
- });
96
- });
97
-
98
- //#endregion
99
- //# sourceMappingURL=getLocalizedPath.test-d.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getLocalizedPath.test-d.cjs","names":["describe","getLocalizedPath","getLocalizedUrl"],"sources":["../../../src/localization/getLocalizedPath.test-d.ts"],"sourcesContent":["import type {\n LocalizedPath,\n LocalizedPathname,\n LocalizedUrl,\n} from '@intlayer/types/module_augmentation';\nimport { describe, expectTypeOf, it } from 'vitest';\nimport { getLocalizedPath } from './getLocalizedPath';\nimport { getLocalizedUrl } from './getLocalizedUrl';\n\n/**\n * `getLocalizedPath` prefixes the rewritten path, so it reports the very type\n * its sibling reports for a relative URL. This package declares neither rewrite\n * rules nor a default locale, so the registry leaves both steps as no-ops.\n */\ndescribe('getLocalizedPath', () => {\n it('should report the same type as getLocalizedUrl', () => {\n expectTypeOf(getLocalizedPath('/about', 'fr')).toEqualTypeOf<\n LocalizedUrl<'/about', 'fr'>\n >();\n expectTypeOf(getLocalizedPath('/about', 'fr')).toEqualTypeOf(\n getLocalizedUrl('/about', 'fr')\n );\n });\n\n it('should keep the literal path when nothing rewrites or prefixes it', () => {\n expectTypeOf(getLocalizedPath('/about', 'fr')).toEqualTypeOf<'/about'>();\n });\n\n it('should drop the origin of an absolute URL', () => {\n expectTypeOf(\n getLocalizedPath('https://intlayer.org/about', 'fr')\n ).toEqualTypeOf<'/about'>();\n });\n\n it('should widen to string when the path is not a literal', () => {\n const dynamicPath = '/about' as string;\n\n expectTypeOf(getLocalizedPath(dynamicPath, 'fr')).toEqualTypeOf<string>();\n });\n});\n\n/**\n * The resolution itself, exercised against explicit rules — the same shape the\n * generated module augmentation feeds it as `__RoutingRegistry['rewrite']`.\n */\ndescribe('LocalizedPath', () => {\n type Rules = {\n '/about': { en: '/about'; fr: '/a-propos' };\n '/product/:id': { en: '/product/:id'; fr: '/produit/:id' };\n '/shop/:category/:id': { fr: '/boutique/:category/:id' };\n '/docs/:path+': { fr: '/documentation/:path+' };\n };\n\n it('should rewrite a static path', () => {\n expectTypeOf<\n LocalizedPath<'/about', 'fr', Rules>\n >().toEqualTypeOf<'/a-propos'>();\n });\n\n it('should keep a path no rule matches', () => {\n expectTypeOf<\n LocalizedPath<'/contact', 'fr', Rules>\n >().toEqualTypeOf<'/contact'>();\n });\n\n it('should substitute a route parameter', () => {\n expectTypeOf<\n LocalizedPath<'/product/123', 'fr', Rules>\n >().toEqualTypeOf<'/produit/123'>();\n });\n\n it('should substitute several route parameters', () => {\n expectTypeOf<\n LocalizedPath<'/shop/shoes/123', 'fr', Rules>\n >().toEqualTypeOf<'/boutique/shoes/123'>();\n });\n\n it('should not match a parameter across a segment boundary', () => {\n expectTypeOf<\n LocalizedPath<'/product/123/reviews', 'fr', Rules>\n >().toEqualTypeOf<'/product/123/reviews'>();\n });\n\n it('should keep the path when the locale declares no pattern', () => {\n expectTypeOf<\n LocalizedPath<'/shop/shoes/123', 'en', Rules>\n >().toEqualTypeOf<'/shop/shoes/123'>();\n });\n\n it('should distribute over a union of locales', () => {\n expectTypeOf<LocalizedPath<'/about', 'en' | 'fr', Rules>>().toEqualTypeOf<\n '/about' | '/a-propos'\n >();\n });\n\n it('should widen a variadic rule to string, but only for the paths it could match', () => {\n expectTypeOf<\n LocalizedPath<'/docs/getting-started', 'fr', Rules>\n >().toEqualTypeOf<string>();\n expectTypeOf<\n LocalizedPath<'/about', 'fr', Rules>\n >().toEqualTypeOf<'/a-propos'>();\n });\n\n it('should keep every path when the project declares no rule', () => {\n expectTypeOf<LocalizedPath<'/about', 'fr', {}>>().toEqualTypeOf<'/about'>();\n });\n});\n\n/**\n * The return type of `getLocalizedPath`, exercised against an explicit routing\n * mode, default locale and locale set — this package declares none of them.\n */\ndescribe('LocalizedPathname', () => {\n type Locales = 'en' | 'fr' | 'es';\n type Path<P extends string, L extends Locales> = LocalizedPathname<\n P,\n L,\n 'prefix-no-default',\n 'en',\n Locales\n >;\n\n it('should report the same type as LocalizedUrl for a relative path', () => {\n expectTypeOf<Path<'/about', 'es'>>().toEqualTypeOf<\n LocalizedUrl<'/about', 'es', 'prefix-no-default', 'en', Locales>\n >();\n expectTypeOf<Path<'/about', 'es'>>().toEqualTypeOf<'/es/about'>();\n });\n\n it('should drop the origin of an absolute URL', () => {\n expectTypeOf<\n Path<'https://intlayer.org/about', 'es'>\n >().toEqualTypeOf<'/es/about'>();\n expectTypeOf<\n Path<'https://intlayer.org/about', 'en'>\n >().toEqualTypeOf<'/about'>();\n });\n\n it('should collapse an origin without a path to the root', () => {\n expectTypeOf<Path<'https://intlayer.org', 'en'>>().toEqualTypeOf<'/'>();\n expectTypeOf<Path<'https://intlayer.org/', 'es'>>().toEqualTypeOf<'/es'>();\n });\n\n it('should replace a locale segment carried by an absolute URL', () => {\n expectTypeOf<\n Path<'https://intlayer.org/fr/about', 'es'>\n >().toEqualTypeOf<'/es/about'>();\n });\n});\n\n/**\n * `getLocalizedPath` never emits an origin, so `routing.domains` reaches it only\n * through the prefix it suppresses for a locale alone on its domain.\n */\ndescribe('LocalizedPathname with routing.domains', () => {\n type Locales = 'en' | 'fr' | 'zh';\n type Domains = {\n en: { origin: 'https://intlayer.org'; exclusive: false };\n fr: { origin: 'https://intlayer.org'; exclusive: false };\n zh: { origin: 'https://intlayer.cn'; exclusive: true };\n };\n type Path<P extends string, L extends Locales> = LocalizedPathname<\n P,\n L,\n 'prefix-no-default',\n 'en',\n Locales,\n Domains\n >;\n\n it('should drop the prefix of a locale alone on its domain', () => {\n expectTypeOf<Path<'/about', 'zh'>>().toEqualTypeOf<'/about'>();\n expectTypeOf<Path<'/', 'zh'>>().toEqualTypeOf<'/'>();\n });\n\n it('should keep the prefix of a locale sharing its domain', () => {\n expectTypeOf<Path<'/about', 'fr'>>().toEqualTypeOf<'/fr/about'>();\n });\n\n it('should never emit the locale domain as an origin', () => {\n expectTypeOf<\n Path<'https://intlayer.org/about', 'zh'>\n >().toEqualTypeOf<'/about'>();\n });\n});\n"],"mappings":";;;;;;;;;;IAcAA,iBAAS,0BAA0B;CACjC,eAAG,wDAAwD;EACzD,yBAAaC,uDAAiB,UAAU,IAAI,CAAC,CAAC,CAAC,cAE7C;EACF,yBAAaA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AC,CAAC,cAAwB;CAC9B,CAAC;CAED,eAAG,8DAA8D;EAC/D,yBAAiD,CAAC,CAAC,cAAmB;EACtE,yBAAkD,CAAC,CAAC,cAAqB;CAC3E,CAAC;CAED,eAAG,oEAAoE;EACrE,yBAEE,CAAC,CAAC,cAA2B;CACjC,CAAC;AACH,CAAC;;;;;IAMDA,iBAAS,gDAAgD;CAgBvD,eAAG,gEAAgE;EACjE,yBAAmC,CAAC,CAAC,cAAwB;EAC7D,yBAA8B,CAAC,CAAC,cAAmB;CACrD,CAAC;CAED,eAAG,+DAA+D;EAChE,yBAAmC,CAAC,CAAC,cAA2B;CAClE,CAAC;CAED,eAAG,0DAA0D;EAC3D,yBAEE,CAAC,CAAC,cAAwB;CAC9B,CAAC;AACH,CAAC"}
@@ -1,78 +0,0 @@
1
- let vitest = require("vitest");
2
-
3
- //#region src/localization/getLocalizedUrl.test-d.ts
4
- /**
5
- * `LocalizedUrl` mirrors what `getLocalizedUrl` builds at runtime. The routing
6
- * mode, default locale and declared locales are passed explicitly here — this
7
- * package declares none of them, so the registry defaults would collapse every
8
- * locale onto the default one.
9
- */
10
- (0, vitest.describe)("LocalizedUrl", () => {
11
- (0, vitest.it)("should prefix a path with a non-default locale", () => {
12
- (0, vitest.expectTypeOf)().toEqualTypeOf();
13
- });
14
- (0, vitest.it)("should collapse the root to a bare prefix, never a trailing slash", () => {
15
- (0, vitest.expectTypeOf)().toEqualTypeOf();
16
- });
17
- (0, vitest.it)("should leave the default locale unprefixed", () => {
18
- (0, vitest.expectTypeOf)().toEqualTypeOf();
19
- (0, vitest.expectTypeOf)().toEqualTypeOf();
20
- });
21
- (0, vitest.it)("should drop the trailing slash of a non-root path", () => {
22
- (0, vitest.expectTypeOf)().toEqualTypeOf();
23
- });
24
- (0, vitest.it)("should replace an existing locale segment", () => {
25
- (0, vitest.expectTypeOf)().toEqualTypeOf();
26
- (0, vitest.expectTypeOf)().toEqualTypeOf();
27
- });
28
- (0, vitest.it)("should prefix the pathname of an absolute URL, not its origin", () => {
29
- (0, vitest.expectTypeOf)().toEqualTypeOf();
30
- (0, vitest.expectTypeOf)().toEqualTypeOf();
31
- });
32
- (0, vitest.it)("should prefix every locale in prefix-all mode", () => {
33
- (0, vitest.expectTypeOf)().toEqualTypeOf();
34
- (0, vitest.expectTypeOf)().toEqualTypeOf();
35
- });
36
- (0, vitest.it)("should strip the locale in no-prefix mode", () => {
37
- (0, vitest.expectTypeOf)().toEqualTypeOf();
38
- });
39
- });
40
- /**
41
- * Domain routing, exercised against an explicit domain map — the same shape the
42
- * generated module augmentation feeds it as `__RoutingRegistry['domains']`.
43
- *
44
- * `en` and `fr` share `intlayer.org` (prefix routing still applies), while `zh`
45
- * is alone on `intlayer.cn` (the hostname identifies the locale, so no prefix).
46
- */
47
- (0, vitest.describe)("LocalizedUrl with routing.domains", () => {
48
- (0, vitest.it)("should drop the locale prefix of a locale alone on its domain", () => {
49
- (0, vitest.expectTypeOf)().toEqualTypeOf();
50
- });
51
- (0, vitest.it)("should keep the locale prefix of a locale sharing its domain", () => {
52
- (0, vitest.expectTypeOf)().toEqualTypeOf();
53
- (0, vitest.expectTypeOf)().toEqualTypeOf();
54
- });
55
- (0, vitest.it)("should strip an existing locale segment before switching domain", () => {
56
- (0, vitest.expectTypeOf)().toEqualTypeOf();
57
- (0, vitest.expectTypeOf)().toEqualTypeOf();
58
- });
59
- (0, vitest.it)("should keep the root slash of a domain-exclusive locale", () => {
60
- (0, vitest.expectTypeOf)().toEqualTypeOf();
61
- });
62
- (0, vitest.it)("should replace the origin of an absolute URL with the locale domain", () => {
63
- (0, vitest.expectTypeOf)().toEqualTypeOf();
64
- });
65
- (0, vitest.it)("should leave a locale mapped to no domain untouched", () => {
66
- (0, vitest.expectTypeOf)().toEqualTypeOf();
67
- });
68
- (0, vitest.it)("should keep the domain origin in no-prefix mode", () => {
69
- (0, vitest.expectTypeOf)().toEqualTypeOf();
70
- });
71
- (0, vitest.it)("should drop the prefix in prefix-all mode too", () => {
72
- (0, vitest.expectTypeOf)().toEqualTypeOf();
73
- (0, vitest.expectTypeOf)().toEqualTypeOf();
74
- });
75
- });
76
-
77
- //#endregion
78
- //# sourceMappingURL=getLocalizedUrl.test-d.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getLocalizedUrl.test-d.cjs","names":["describe"],"sources":["../../../src/localization/getLocalizedUrl.test-d.ts"],"sourcesContent":["import type { LocalizedUrl } from '@intlayer/types/module_augmentation';\nimport { describe, expectTypeOf, it } from 'vitest';\n\n/**\n * `LocalizedUrl` mirrors what `getLocalizedUrl` builds at runtime. The routing\n * mode, default locale and declared locales are passed explicitly here — this\n * package declares none of them, so the registry defaults would collapse every\n * locale onto the default one.\n */\ndescribe('LocalizedUrl', () => {\n type Locales = 'en' | 'fr' | 'es';\n type Url<Path extends string, L extends Locales> = LocalizedUrl<\n Path,\n L,\n 'prefix-no-default',\n 'en',\n Locales\n >;\n\n it('should prefix a path with a non-default locale', () => {\n expectTypeOf<Url<'/about', 'es'>>().toEqualTypeOf<'/es/about'>();\n });\n\n it('should collapse the root to a bare prefix, never a trailing slash', () => {\n expectTypeOf<Url<'/', 'es'>>().toEqualTypeOf<'/es'>();\n });\n\n it('should leave the default locale unprefixed', () => {\n expectTypeOf<Url<'/about', 'en'>>().toEqualTypeOf<'/about'>();\n expectTypeOf<Url<'/', 'en'>>().toEqualTypeOf<'/'>();\n });\n\n it('should drop the trailing slash of a non-root path', () => {\n expectTypeOf<Url<'/about/', 'fr'>>().toEqualTypeOf<'/fr/about'>();\n });\n\n it('should replace an existing locale segment', () => {\n expectTypeOf<Url<'/en/about', 'fr'>>().toEqualTypeOf<'/fr/about'>();\n expectTypeOf<Url<'/fr', 'es'>>().toEqualTypeOf<'/es'>();\n });\n\n it('should prefix the pathname of an absolute URL, not its origin', () => {\n expectTypeOf<\n Url<'https://example.com/about', 'fr'>\n >().toEqualTypeOf<'https://example.com/fr/about'>();\n expectTypeOf<\n Url<'https://example.com/', 'fr'>\n >().toEqualTypeOf<'https://example.com/fr'>();\n });\n\n it('should prefix every locale in prefix-all mode', () => {\n expectTypeOf<\n LocalizedUrl<'/', 'en', 'prefix-all', 'en', Locales>\n >().toEqualTypeOf<'/en'>();\n expectTypeOf<\n LocalizedUrl<'/about', 'en', 'prefix-all', 'en', Locales>\n >().toEqualTypeOf<'/en/about'>();\n });\n\n it('should strip the locale in no-prefix mode', () => {\n expectTypeOf<\n LocalizedUrl<'/fr/about', 'fr', 'no-prefix', 'en', Locales>\n >().toEqualTypeOf<'/about'>();\n });\n});\n\n/**\n * Domain routing, exercised against an explicit domain map — the same shape the\n * generated module augmentation feeds it as `__RoutingRegistry['domains']`.\n *\n * `en` and `fr` share `intlayer.org` (prefix routing still applies), while `zh`\n * is alone on `intlayer.cn` (the hostname identifies the locale, so no prefix).\n */\ndescribe('LocalizedUrl with routing.domains', () => {\n type Locales = 'en' | 'fr' | 'zh';\n type Domains = {\n en: { origin: 'https://intlayer.org'; exclusive: false };\n fr: { origin: 'https://intlayer.org'; exclusive: false };\n zh: { origin: 'https://intlayer.cn'; exclusive: true };\n };\n type Url<Path extends string, L extends Locales> = LocalizedUrl<\n Path,\n L,\n 'prefix-no-default',\n 'en',\n Locales,\n Domains\n >;\n\n it('should drop the locale prefix of a locale alone on its domain', () => {\n expectTypeOf<Url<'/about', 'zh'>>().toEqualTypeOf<\n 'https://intlayer.cn/about' | '/about'\n >();\n });\n\n it('should keep the locale prefix of a locale sharing its domain', () => {\n expectTypeOf<Url<'/about', 'fr'>>().toEqualTypeOf<\n 'https://intlayer.org/fr/about' | '/fr/about'\n >();\n expectTypeOf<Url<'/about', 'en'>>().toEqualTypeOf<\n 'https://intlayer.org/about' | '/about'\n >();\n });\n\n it('should strip an existing locale segment before switching domain', () => {\n expectTypeOf<Url<'/zh/about', 'zh'>>().toEqualTypeOf<\n 'https://intlayer.cn/about' | '/about'\n >();\n expectTypeOf<Url<'/fr/about', 'zh'>>().toEqualTypeOf<\n 'https://intlayer.cn/about' | '/about'\n >();\n });\n\n it('should keep the root slash of a domain-exclusive locale', () => {\n expectTypeOf<Url<'/', 'zh'>>().toEqualTypeOf<\n 'https://intlayer.cn/' | '/'\n >();\n });\n\n it('should replace the origin of an absolute URL with the locale domain', () => {\n expectTypeOf<Url<'https://intlayer.org/about', 'zh'>>().toEqualTypeOf<\n 'https://intlayer.cn/about' | 'https://intlayer.org/about'\n >();\n });\n\n it('should leave a locale mapped to no domain untouched', () => {\n type PartialDomains = {\n zh: { origin: 'https://intlayer.cn'; exclusive: true };\n };\n\n expectTypeOf<\n LocalizedUrl<\n '/about',\n 'fr',\n 'prefix-no-default',\n 'en',\n Locales,\n PartialDomains\n >\n >().toEqualTypeOf<'/fr/about'>();\n });\n\n it('should keep the domain origin in no-prefix mode', () => {\n expectTypeOf<\n LocalizedUrl<'/about', 'zh', 'no-prefix', 'en', Locales, Domains>\n >().toEqualTypeOf<'https://intlayer.cn/about' | '/about'>();\n });\n\n it('should drop the prefix in prefix-all mode too', () => {\n expectTypeOf<\n LocalizedUrl<'/about', 'zh', 'prefix-all', 'en', Locales, Domains>\n >().toEqualTypeOf<'https://intlayer.cn/about' | '/about'>();\n expectTypeOf<\n LocalizedUrl<'/about', 'fr', 'prefix-all', 'en', Locales, Domains>\n >().toEqualTypeOf<'https://intlayer.org/fr/about' | '/fr/about'>();\n });\n});\n"],"mappings":";;;;;;;;;IASAA,iBAAS,sBAAsB;CAU7B,eAAG,wDAAwD;EACzD,yBAAkC,CAAC,CAAC,cAA2B;CACjE,CAAC;CAED,eAAG,2EAA2E;EAC5E,yBAA6B,CAAC,CAAC,cAAqB;CACtD,CAAC;CAED,eAAG,oDAAoD;EACrD,yBAAkC,CAAC,CAAC,cAAwB;EAC5D,yBAA6B,CAAC,CAAC,cAAmB;CACpD,CAAC;CAED,eAAG,2DAA2D;EAC5D,yBAAmC,CAAC,CAAC,cAA2B;CAClE,CAAC;CAED,eAAG,mDAAmD;EACpD,yBAAqC,CAAC,CAAC,cAA2B;EAClE,yBAA+B,CAAC,CAAC,cAAqB;CACxD,CAAC;CAED,eAAG,uEAAuE;EACxE,yBAEE,CAAC,CAAC,cAA8C;EAClD,yBAEE,CAAC,CAAC,cAAwC;CAC9C,CAAC;CAED,eAAG,uDAAuD;EACxD,yBAEE,CAAC,CAAC,cAAqB;EACzB,yBAEE,CAAC,CAAC,cAA2B;CACjC,CAAC;CAED,eAAG,mDAAmD;EACpD,yBAEE,CAAC,CAAC,cAAwB;CAC9B,CAAC;AACH,CAAC;;;;;;;;IASDA,iBAAS,2CAA2C;CAgBlD,eAAG,uEAAuE;EACxE,yBAAkC,CAAC,CAAC,cAElC;CACJ,CAAC;CAED,eAAG,sEAAsE;EACvE,yBAAkC,CAAC,CAAC,cAElC;EACF,yBAAkC,CAAC,CAAC,cAElC;CACJ,CAAC;CAED,eAAG,yEAAyE;EAC1E,yBAAqC,CAAC,CAAC,cAErC;EACF,yBAAqC,CAAC,CAAC,cAErC;CACJ,CAAC;CAED,eAAG,iEAAiE;EAClE,yBAA6B,CAAC,CAAC,cAE7B;CACJ,CAAC;CAED,eAAG,6EAA6E;EAC9E,yBAAsD,CAAC,CAAC,cAEtD;CACJ,CAAC;CAED,eAAG,6DAA6D;EAK9D,yBASE,CAAC,CAAC,cAA2B;CACjC,CAAC;CAED,eAAG,yDAAyD;EAC1D,yBAEE,CAAC,CAAC,cAAsD;CAC5D,CAAC;CAED,eAAG,uDAAuD;EACxD,yBAEE,CAAC,CAAC,cAAsD;EAC1D,yBAEE,CAAC,CAAC,cAA6D;CACnE,CAAC;AACH,CAAC"}
@@ -1,43 +0,0 @@
1
- const require_localization_rewriteUtils = require('./rewriteUtils.cjs');
2
- let vitest = require("vitest");
3
-
4
- //#region src/localization/rewriteUtils.test-d.ts
5
- /**
6
- * `getInternalPath` is pure string surgery — no rewrite rules involved — so its
7
- * result is fully derivable from the arguments whenever both are literals.
8
- */
9
- (0, vitest.describe)("getInternalPath", () => {
10
- (0, vitest.it)("should prefix a literal path with the locale", () => {
11
- (0, vitest.expectTypeOf)(require_localization_rewriteUtils.getInternalPath("/about", "fr")).toEqualTypeOf();
12
- });
13
- (0, vitest.it)("should collapse the root to a bare prefix, never a trailing slash", () => {
14
- (0, vitest.expectTypeOf)(require_localization_rewriteUtils.getInternalPath("/", "fr")).toEqualTypeOf();
15
- });
16
- (0, vitest.it)("should leave an already-prefixed path untouched", () => {
17
- (0, vitest.expectTypeOf)(require_localization_rewriteUtils.getInternalPath("/fr/about", "fr")).toEqualTypeOf();
18
- (0, vitest.expectTypeOf)(require_localization_rewriteUtils.getInternalPath("/fr", "fr")).toEqualTypeOf();
19
- });
20
- (0, vitest.it)("should add the leading slash a path is missing", () => {
21
- (0, vitest.expectTypeOf)(require_localization_rewriteUtils.getInternalPath("about", "fr")).toEqualTypeOf();
22
- });
23
- (0, vitest.it)("should widen to string when the path is not a literal", () => {
24
- (0, vitest.expectTypeOf)(require_localization_rewriteUtils.getInternalPath("/about", "fr")).toEqualTypeOf();
25
- });
26
- });
27
- /**
28
- * `resolveLocalizedPath` only computes a new path when a rule matched, so the
29
- * `isRewritten: false` branch still carries the exact input it was given.
30
- */
31
- (0, vitest.describe)("resolveLocalizedPath", () => {
32
- (0, vitest.it)("should keep the input literal on the non-rewritten branch", () => {
33
- const result = require_localization_rewriteUtils.resolveLocalizedPath("/about", "fr");
34
- if (!result.isRewritten) (0, vitest.expectTypeOf)(result.path).toEqualTypeOf();
35
- else (0, vitest.expectTypeOf)(result.path).toEqualTypeOf();
36
- });
37
- (0, vitest.it)("should discriminate on isRewritten", () => {
38
- (0, vitest.expectTypeOf)(require_localization_rewriteUtils.resolveLocalizedPath("/about")).toEqualTypeOf();
39
- });
40
- });
41
-
42
- //#endregion
43
- //# sourceMappingURL=rewriteUtils.test-d.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rewriteUtils.test-d.cjs","names":["describe","getInternalPath","resolveLocalizedPath"],"sources":["../../../src/localization/rewriteUtils.test-d.ts"],"sourcesContent":["import { describe, expectTypeOf, it } from 'vitest';\nimport { getInternalPath, resolveLocalizedPath } from './rewriteUtils';\n\n/**\n * `getInternalPath` is pure string surgery — no rewrite rules involved — so its\n * result is fully derivable from the arguments whenever both are literals.\n */\ndescribe('getInternalPath', () => {\n it('should prefix a literal path with the locale', () => {\n expectTypeOf(getInternalPath('/about', 'fr')).toEqualTypeOf<'/fr/about'>();\n });\n\n it('should collapse the root to a bare prefix, never a trailing slash', () => {\n expectTypeOf(getInternalPath('/', 'fr')).toEqualTypeOf<'/fr'>();\n });\n\n it('should leave an already-prefixed path untouched', () => {\n expectTypeOf(\n getInternalPath('/fr/about', 'fr')\n ).toEqualTypeOf<'/fr/about'>();\n expectTypeOf(getInternalPath('/fr', 'fr')).toEqualTypeOf<'/fr'>();\n });\n\n it('should add the leading slash a path is missing', () => {\n expectTypeOf(getInternalPath('about', 'fr')).toEqualTypeOf<'/fr/about'>();\n });\n\n it('should widen to string when the path is not a literal', () => {\n const dynamicPath = '/about' as string;\n\n expectTypeOf(getInternalPath(dynamicPath, 'fr')).toEqualTypeOf<string>();\n });\n});\n\n/**\n * `resolveLocalizedPath` only computes a new path when a rule matched, so the\n * `isRewritten: false` branch still carries the exact input it was given.\n */\ndescribe('resolveLocalizedPath', () => {\n it('should keep the input literal on the non-rewritten branch', () => {\n const result = resolveLocalizedPath('/about', 'fr');\n\n if (!result.isRewritten) {\n expectTypeOf(result.path).toEqualTypeOf<'/about'>();\n } else {\n expectTypeOf(result.path).toEqualTypeOf<string>();\n }\n });\n\n it('should discriminate on isRewritten', () => {\n expectTypeOf(resolveLocalizedPath('/about')).toEqualTypeOf<\n | { path: '/about'; isRewritten: false }\n | { path: string; isRewritten: true }\n >();\n });\n});\n"],"mappings":";;;;;;;;IAOAA,iBAAS,yBAAyB;CAChC,eAAG,sDAAsD;EACvD,yBAAaC,kDAAgB,UAAU,IAAI,CAAC,CAAC,CAAC,cAA2B;CAC3E,CAAC;CAED,eAAG,2EAA2E;EAC5E,yBAAaA,kDAAgB,KAAK,IAAI,CAAC,CAAC,CAAC,cAAqB;CAChE,CAAC;CAED,eAAG,yDAAyD;EAC1D,yBACEA,kDAAgB,aAAa,IAAI,CACnC,CAAC,CAAC,cAA2B;EAC7B,yBAAaA,kDAAgB,OAAO,IAAI,CAAC,CAAC,CAAC,cAAqB;CAClE,CAAC;CAED,eAAG,wDAAwD;EACzD,yBAAaA,kDAAgB,SAAS,IAAI,CAAC,CAAC,CAAC,cAA2B;CAC1E,CAAC;CAED,eAAG,+DAA+D;EAGhE,yBAAaA,kDAAgB,UAAa,IAAI,CAAC,CAAC,CAAC,cAAsB;CACzE,CAAC;AACH,CAAC;;;;;IAMDD,iBAAS,8BAA8B;CACrC,eAAG,mEAAmE;EACpE,MAAM,SAASE,uDAAqB,UAAU,IAAI;EAElD,IAAI,CAAC,OAAO,aACV,yBAAa,OAAO,IAAI,CAAC,CAAC,cAAwB;OAElD,yBAAa,OAAO,IAAI,CAAC,CAAC,cAAsB;CAEpD,CAAC;CAED,eAAG,4CAA4C;EAC7C,yBAAaA,uDAAqB,QAAQ,CAAC,CAAC,CAAC,cAG3C;CACJ,CAAC;AACH,CAAC"}
@@ -1,97 +0,0 @@
1
- import { describe, expectTypeOf, it } from "vitest";
2
-
3
- //#region src/dictionaryManipulator/qualifiedDictionary.test-d.ts
4
- describe("ResolveQualifiedDictionaryContent", () => {
5
- it("should resolve a plain dictionary to its content, ignoring the selector", () => {
6
- expectTypeOf().toEqualTypeOf();
7
- });
8
- describe("variant", () => {
9
- it("should resolve to the default entry when no variant is selected", () => {
10
- expectTypeOf().toEqualTypeOf();
11
- });
12
- it("should resolve a locale-only selector like no selector", () => {
13
- expectTypeOf().toEqualTypeOf();
14
- });
15
- it("should resolve a declared variant to its own entry", () => {
16
- expectTypeOf().toEqualTypeOf();
17
- });
18
- it("should fall back to the default entry for an undeclared variant", () => {
19
- expectTypeOf().toEqualTypeOf();
20
- });
21
- it("should resolve to null when no default entry is declared", () => {
22
- expectTypeOf().toEqualTypeOf();
23
- });
24
- it("should resolve an object variant to its entry", () => {
25
- expectTypeOf().toEqualTypeOf();
26
- });
27
- it("should resolve to null when an object-variant key has no default", () => {
28
- expectTypeOf().toEqualTypeOf();
29
- });
30
- });
31
- describe("item", () => {
32
- it("should resolve to an array of every item when the axis is left open", () => {
33
- expectTypeOf().toEqualTypeOf();
34
- });
35
- it("should narrow to the selected item", () => {
36
- expectTypeOf().toEqualTypeOf();
37
- });
38
- });
39
- describe("composite (variant × item)", () => {
40
- it("should narrow to a single entry when both dimensions are pinned", () => {
41
- expectTypeOf().toEqualTypeOf();
42
- });
43
- it("should fan the item axis out for the selected variant", () => {
44
- expectTypeOf().toEqualTypeOf();
45
- });
46
- it("should fall back to the default variant then fan out its items", () => {
47
- expectTypeOf().toEqualTypeOf();
48
- });
49
- });
50
- });
51
- describe("DictionarySelectorForGroup", () => {
52
- it("should accept a variant this key declares", () => {
53
- expectTypeOf().toExtend();
54
- });
55
- it("should accept a variant declared elsewhere in the project", () => {
56
- expectTypeOf().toExtend();
57
- });
58
- it("should reject a variant no dictionary declares", () => {
59
- expectTypeOf().not.toExtend();
60
- });
61
- it("should reject an object variant on a key that declares none", () => {
62
- expectTypeOf().not.toExtend();
63
- });
64
- describe("object variants", () => {
65
- it("should accept the object the key declares", () => {
66
- expectTypeOf().toExtend();
67
- });
68
- it("should reject the serialized form as a string", () => {
69
- expectTypeOf().not.toExtend();
70
- });
71
- it("should reject a partial or mismatched object", () => {
72
- expectTypeOf().not.toExtend();
73
- expectTypeOf().not.toExtend();
74
- });
75
- });
76
- describe("locale", () => {
77
- it("should accept a declared locale", () => {
78
- expectTypeOf().toExtend();
79
- });
80
- it("should accept a widened `string` locale", () => {
81
- expectTypeOf().toExtend();
82
- });
83
- });
84
- });
85
- describe("DictionarySelectorForGroup — keys without a default entry", () => {
86
- it("should reject a project variant on a key with no default entry", () => {
87
- expectTypeOf().not.toExtend();
88
- expectTypeOf().not.toExtend();
89
- expectTypeOf().not.toExtend();
90
- });
91
- it("should still accept the names such a key declares itself", () => {
92
- expectTypeOf().toExtend();
93
- });
94
- });
95
-
96
- //#endregion
97
- //# sourceMappingURL=qualifiedDictionary.test-d.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"qualifiedDictionary.test-d.mjs","names":[],"sources":["../../../src/dictionaryManipulator/qualifiedDictionary.test-d.ts"],"sourcesContent":["import type {\n DictionarySelectorForGroup,\n ResolveQualifiedDictionaryContent,\n} from '@intlayer/types/dictionary';\nimport { describe, expectTypeOf, it } from 'vitest';\n\n/**\n * Compile-time counterpart of `qualifiedDictionary.test.ts`. The runtime\n * resolver and `ResolveQualifiedDictionaryContent` implement the same rules\n * twice — once in value space, once in type space — so a divergence between\n * them is invisible to the runtime suite. These assertions pin the type side.\n *\n * Groups are written the way `createTypes` emits them (`as const`, hence\n * readonly tuples of qualifier dimensions and literal composite-id keys).\n */\n\ntype LessonGroup = {\n key: 'lesson';\n qualifierTypes: readonly ['variant'];\n content: {\n default: { title: 'Lesson'; teacher: 'Teacher' };\n preschool: { title: 'Lesson'; teacher: 'Pedagogue' };\n };\n};\n\ntype NoDefaultGroup = {\n key: 'promoOnly';\n qualifierTypes: readonly ['variant'];\n content: { promo: { title: 'Promo' } };\n};\n\ntype BannerGroup = {\n key: 'banner';\n qualifierTypes: readonly ['variant', 'item'];\n content: {\n 'default/1': { title: 'D1' };\n 'promo/1': { title: 'P1' };\n 'promo/2': { title: 'P2' };\n };\n};\n\ntype FaqGroup = {\n key: 'faq';\n qualifierTypes: readonly ['item'];\n content: { '1': { question: 'Q1' }; '2': { question: 'Q2' } };\n};\n\ntype ProductGroup = {\n key: 'product';\n qualifierTypes: readonly ['variant'];\n content: { 'id=abc&userId=123': { name: 'ABC' } };\n};\n\ndescribe('ResolveQualifiedDictionaryContent', () => {\n it('should resolve a plain dictionary to its content, ignoring the selector', () => {\n expectTypeOf<\n ResolveQualifiedDictionaryContent<{ key: 'home'; content: { a: 'b' } }>\n >().toEqualTypeOf<{ a: 'b' }>();\n });\n\n describe('variant', () => {\n it('should resolve to the default entry when no variant is selected', () => {\n expectTypeOf<\n ResolveQualifiedDictionaryContent<LessonGroup>\n >().toEqualTypeOf<{ title: 'Lesson'; teacher: 'Teacher' }>();\n });\n\n it('should resolve a locale-only selector like no selector', () => {\n expectTypeOf<\n ResolveQualifiedDictionaryContent<LessonGroup, { locale: 'sv' }>\n >().toEqualTypeOf<{ title: 'Lesson'; teacher: 'Teacher' }>();\n });\n\n it('should resolve a declared variant to its own entry', () => {\n expectTypeOf<\n ResolveQualifiedDictionaryContent<LessonGroup, { variant: 'preschool' }>\n >().toEqualTypeOf<{ title: 'Lesson'; teacher: 'Pedagogue' }>();\n });\n\n it('should fall back to the default entry for an undeclared variant', () => {\n expectTypeOf<\n ResolveQualifiedDictionaryContent<\n LessonGroup,\n { variant: 'upperSecondary' }\n >\n >().toEqualTypeOf<{ title: 'Lesson'; teacher: 'Teacher' }>();\n });\n\n it('should resolve to null when no default entry is declared', () => {\n expectTypeOf<\n ResolveQualifiedDictionaryContent<\n NoDefaultGroup,\n { variant: 'unknown' }\n >\n >().toEqualTypeOf<null>();\n });\n\n it('should resolve an object variant to its entry', () => {\n expectTypeOf<\n ResolveQualifiedDictionaryContent<\n ProductGroup,\n { variant: { id: 'abc'; userId: '123' } }\n >\n >().toEqualTypeOf<{ name: 'ABC' }>();\n });\n\n it('should resolve to null when an object-variant key has no default', () => {\n expectTypeOf<\n ResolveQualifiedDictionaryContent<ProductGroup>\n >().toEqualTypeOf<null>();\n });\n });\n\n describe('item', () => {\n it('should resolve to an array of every item when the axis is left open', () => {\n expectTypeOf<ResolveQualifiedDictionaryContent<FaqGroup>>().toEqualTypeOf<\n ({ question: 'Q1' } | { question: 'Q2' })[]\n >();\n });\n\n it('should narrow to the selected item', () => {\n expectTypeOf<\n ResolveQualifiedDictionaryContent<FaqGroup, { item: 2 }>\n >().toEqualTypeOf<{ question: 'Q2' }>();\n });\n });\n\n describe('composite (variant × item)', () => {\n it('should narrow to a single entry when both dimensions are pinned', () => {\n expectTypeOf<\n ResolveQualifiedDictionaryContent<\n BannerGroup,\n { variant: 'promo'; item: 2 }\n >\n >().toEqualTypeOf<{ title: 'P2' }>();\n });\n\n it('should fan the item axis out for the selected variant', () => {\n expectTypeOf<\n ResolveQualifiedDictionaryContent<BannerGroup, { variant: 'promo' }>\n >().toEqualTypeOf<({ title: 'P1' } | { title: 'P2' })[]>();\n });\n\n it('should fall back to the default variant then fan out its items', () => {\n expectTypeOf<\n ResolveQualifiedDictionaryContent<BannerGroup, { variant: 'unknown' }>\n >().toEqualTypeOf<{ title: 'D1' }[]>();\n });\n });\n});\n\ndescribe('DictionarySelectorForGroup', () => {\n /** Stands in for the project-wide variant vocabulary (`DeclaredVariants`). */\n type ProjectVariants = 'default' | 'preschool' | 'promo';\n\n type LessonSelector = DictionarySelectorForGroup<\n LessonGroup,\n ProjectVariants\n >;\n\n it('should accept a variant this key declares', () => {\n expectTypeOf<{ variant: 'preschool' }>().toExtend<LessonSelector>();\n });\n\n it('should accept a variant declared elsewhere in the project', () => {\n // `LessonGroup` has no `promo` entry — it resolves to `default` at runtime,\n // which is what makes one session-wide variant usable across every key.\n expectTypeOf<{ variant: 'promo' }>().toExtend<LessonSelector>();\n });\n\n it('should reject a variant no dictionary declares', () => {\n expectTypeOf<{ variant: 'promoo' }>().not.toExtend<LessonSelector>();\n });\n\n it('should reject an object variant on a key that declares none', () => {\n expectTypeOf<{ variant: { id: 'abc' } }>().not.toExtend<LessonSelector>();\n });\n\n describe('object variants', () => {\n // `ProductGroup` stores `'id=abc&userId=123'` — the serialized form of\n // `{ id: 'abc', userId: '123' }`.\n type ProductSelector = DictionarySelectorForGroup<\n ProductGroup,\n ProjectVariants\n >;\n\n it('should accept the object the key declares', () => {\n expectTypeOf<{\n variant: { id: 'abc'; userId: '123' };\n }>().toExtend<ProductSelector>();\n });\n\n it('should reject the serialized form as a string', () => {\n // `'id=abc&userId=123'` is a storage encoding, not part of the API.\n expectTypeOf<{\n variant: 'id=abc&userId=123';\n }>().not.toExtend<ProductSelector>();\n });\n\n it('should reject a partial or mismatched object', () => {\n expectTypeOf<{\n variant: { id: 'abc' };\n }>().not.toExtend<ProductSelector>();\n expectTypeOf<{\n variant: { id: 'abc'; userId: 'other' };\n }>().not.toExtend<ProductSelector>();\n });\n });\n\n describe('locale', () => {\n it('should accept a declared locale', () => {\n expectTypeOf<{ locale: 'fr' }>().toExtend<LessonSelector>();\n });\n\n it('should accept a widened `string` locale', () => {\n // A locale usually reaches this API as a router param (`params.locale`)\n // or a stored value, both typed `string`. Rejecting those would force a\n // cast at every call site, so the declared locales are suggestions only.\n expectTypeOf<{ locale: string }>().toExtend<LessonSelector>();\n });\n });\n});\n\ndescribe('DictionarySelectorForGroup — keys without a default entry', () => {\n type ProjectVariants = 'default' | 'preschool' | 'promo';\n\n // Declares only object variants: an undeclared name resolves to `null`, so\n // the project vocabulary must not be accepted here.\n type ProductSelector = DictionarySelectorForGroup<\n ProductGroup,\n ProjectVariants\n >;\n\n // Declares `promo` but no `default` — same reasoning.\n type NoDefaultSelector = DictionarySelectorForGroup<\n NoDefaultGroup,\n ProjectVariants\n >;\n\n it('should reject a project variant on a key with no default entry', () => {\n expectTypeOf<{ variant: 'promo' }>().not.toExtend<ProductSelector>();\n expectTypeOf<{ variant: 'default' }>().not.toExtend<ProductSelector>();\n expectTypeOf<{ variant: 'preschool' }>().not.toExtend<NoDefaultSelector>();\n });\n\n it('should still accept the names such a key declares itself', () => {\n expectTypeOf<{ variant: 'promo' }>().toExtend<NoDefaultSelector>();\n });\n});\n"],"mappings":";;;AAqDA,SAAS,2CAA2C;CAClD,GAAG,iFAAiF;EAClF,aAEE,CAAC,CAAC,cAA0B;CAChC,CAAC;CAED,SAAS,iBAAiB;EACxB,GAAG,yEAAyE;GAC1E,aAEE,CAAC,CAAC,cAAuD;EAC7D,CAAC;EAED,GAAG,gEAAgE;GACjE,aAEE,CAAC,CAAC,cAAuD;EAC7D,CAAC;EAED,GAAG,4DAA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IAAI,SAA0B;EACrC,CAAC;CACH,CAAC;CAED,SAAS,gBAAgB;EACvB,GAAG,yCAAyC;GAC1C,aAA+B,CAAC,CAAC,SAAyB;EAC5D,CAAC;EAED,GAAG,iDAAiD;GAIlD,aAAiC,CAAC,CAAC,SAAyB;EAC9D,CAAC;CACH,CAAC;AACH,CAAC;AAED,SAAS,mEAAmE;CAgB1E,GAAG,wEAAwE;EACzE,aAAmC,CAAC,CAAC,IAAI,SAA0B;EACnE,aAAqC,CAAC,CAAC,IAAI,SAA0B;EACrE,aAAuC,CAAC,CAAC,IAAI,SAA4B;CAC3E,CAAC;CAED,GAAG,kEAAkE;EACnE,aAAmC,CAAC,CAAC,SAA4B;CACnE,CAAC;AACH,CAAC"}
@@ -1,28 +0,0 @@
1
- import { getIntlayer } from "./getIntlayer.mjs";
2
- import { describe, expectTypeOf, it } from "vitest";
3
-
4
- //#region src/interpreter/getIntlayer.test-d.ts
5
- /**
6
- * The second argument of `getIntlayer` is almost always a value the framework
7
- * hands over as a plain `string`: a router param (`params.locale`), a cookie, a
8
- * header. Constraining it to the declared locales made every such call site a
9
- * compile error, so the declared locales are offered as suggestions while any
10
- * string is still accepted.
11
- */
12
- describe("getIntlayer — locale argument", () => {
13
- it("should accept a locale literal", () => {
14
- expectTypeOf(getIntlayer("lesson", "fr")).not.toBeNever();
15
- });
16
- it("should accept a `string | undefined` router param", () => {
17
- expectTypeOf(getIntlayer("lesson", "fr")).not.toBeNever();
18
- });
19
- it("should accept a selector carrying a widened locale", () => {
20
- expectTypeOf(getIntlayer("lesson", {
21
- locale: "fr",
22
- item: 1
23
- })).not.toBeNever();
24
- });
25
- });
26
-
27
- //#endregion
28
- //# sourceMappingURL=getIntlayer.test-d.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getIntlayer.test-d.mjs","names":[],"sources":["../../../src/interpreter/getIntlayer.test-d.ts"],"sourcesContent":["import { describe, expectTypeOf, it } from 'vitest';\nimport { getIntlayer } from './getIntlayer';\n\n/**\n * The second argument of `getIntlayer` is almost always a value the framework\n * hands over as a plain `string`: a router param (`params.locale`), a cookie, a\n * header. Constraining it to the declared locales made every such call site a\n * compile error, so the declared locales are offered as suggestions while any\n * string is still accepted.\n */\ndescribe('getIntlayer — locale argument', () => {\n it('should accept a locale literal', () => {\n expectTypeOf(getIntlayer('lesson', 'fr')).not.toBeNever();\n });\n\n it('should accept a `string | undefined` router param', () => {\n const routerLocale = 'fr' as string | undefined;\n\n expectTypeOf(getIntlayer('lesson', routerLocale)).not.toBeNever();\n });\n\n it('should accept a selector carrying a widened locale', () => {\n const routerLocale = 'fr' as string;\n\n expectTypeOf(\n getIntlayer('lesson', { locale: routerLocale, item: 1 })\n ).not.toBeNever();\n });\n});\n"],"mappings":";;;;;;;;;;;AAUA,SAAS,uCAAuC;CAC9C,GAAG,wCAAwC;EACzC,aAAa,YAAY,UAAU,IAAI,CAAC,CAAC,CAAC,IAAI,UAAU;CAC1D,CAAC;CAED,GAAG,2DAA2D;EAG5D,aAAa,YAAY,UAAU,IAAY,CAAC,CAAC,CAAC,IAAI,UAAU;CAClE,CAAC;CAED,GAAG,4DAA4D;EAG7D,aACE,YAAY,UAAU;GAAE,QAAQ;GAAc,MAAM;EAAE,CAAC,CACzD,CAAC,CAAC,IAAI,UAAU;CAClB,CAAC;AACH,CAAC"}
@@ -1,12 +0,0 @@
1
- import { getCanonicalPath } from "./getCanonicalPath.mjs";
2
- import { describe, expectTypeOf, it } from "vitest";
3
-
4
- //#region src/localization/getCanonicalPath.test-d.ts
5
- describe("getCanonicalPath", () => {
6
- it("should accept an omitted locale (checks every locale)", () => {
7
- expectTypeOf(getCanonicalPath("/a-propos")).toEqualTypeOf();
8
- });
9
- });
10
-
11
- //#endregion
12
- //# sourceMappingURL=getCanonicalPath.test-d.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getCanonicalPath.test-d.mjs","names":[],"sources":["../../../src/localization/getCanonicalPath.test-d.ts"],"sourcesContent":["import { describe, expectTypeOf, it } from 'vitest';\nimport { getCanonicalPath } from './getCanonicalPath';\n\ndescribe('getCanonicalPath', () => {\n it('should accept an omitted locale (checks every locale)', () => {\n expectTypeOf(getCanonicalPath('/a-propos')).toEqualTypeOf<string>();\n });\n});\n"],"mappings":";;;;AAGA,SAAS,0BAA0B;CACjC,GAAG,+DAA+D;EAChE,aAAa,iBAAiB,WAAW,CAAC,CAAC,CAAC,cAAsB;CACpE,CAAC;AACH,CAAC"}
@@ -1,99 +0,0 @@
1
- import { getLocalizedPath } from "./getLocalizedPath.mjs";
2
- import { getLocalizedUrl } from "./getLocalizedUrl.mjs";
3
- import { describe, expectTypeOf, it } from "vitest";
4
-
5
- //#region src/localization/getLocalizedPath.test-d.ts
6
- /**
7
- * `getLocalizedPath` prefixes the rewritten path, so it reports the very type
8
- * its sibling reports for a relative URL. This package declares neither rewrite
9
- * rules nor a default locale, so the registry leaves both steps as no-ops.
10
- */
11
- describe("getLocalizedPath", () => {
12
- it("should report the same type as getLocalizedUrl", () => {
13
- expectTypeOf(getLocalizedPath("/about", "fr")).toEqualTypeOf();
14
- expectTypeOf(getLocalizedPath("/about", "fr")).toEqualTypeOf(getLocalizedUrl("/about", "fr"));
15
- });
16
- it("should keep the literal path when nothing rewrites or prefixes it", () => {
17
- expectTypeOf(getLocalizedPath("/about", "fr")).toEqualTypeOf();
18
- });
19
- it("should drop the origin of an absolute URL", () => {
20
- expectTypeOf(getLocalizedPath("https://intlayer.org/about", "fr")).toEqualTypeOf();
21
- });
22
- it("should widen to string when the path is not a literal", () => {
23
- expectTypeOf(getLocalizedPath("/about", "fr")).toEqualTypeOf();
24
- });
25
- });
26
- /**
27
- * The resolution itself, exercised against explicit rules — the same shape the
28
- * generated module augmentation feeds it as `__RoutingRegistry['rewrite']`.
29
- */
30
- describe("LocalizedPath", () => {
31
- it("should rewrite a static path", () => {
32
- expectTypeOf().toEqualTypeOf();
33
- });
34
- it("should keep a path no rule matches", () => {
35
- expectTypeOf().toEqualTypeOf();
36
- });
37
- it("should substitute a route parameter", () => {
38
- expectTypeOf().toEqualTypeOf();
39
- });
40
- it("should substitute several route parameters", () => {
41
- expectTypeOf().toEqualTypeOf();
42
- });
43
- it("should not match a parameter across a segment boundary", () => {
44
- expectTypeOf().toEqualTypeOf();
45
- });
46
- it("should keep the path when the locale declares no pattern", () => {
47
- expectTypeOf().toEqualTypeOf();
48
- });
49
- it("should distribute over a union of locales", () => {
50
- expectTypeOf().toEqualTypeOf();
51
- });
52
- it("should widen a variadic rule to string, but only for the paths it could match", () => {
53
- expectTypeOf().toEqualTypeOf();
54
- expectTypeOf().toEqualTypeOf();
55
- });
56
- it("should keep every path when the project declares no rule", () => {
57
- expectTypeOf().toEqualTypeOf();
58
- });
59
- });
60
- /**
61
- * The return type of `getLocalizedPath`, exercised against an explicit routing
62
- * mode, default locale and locale set — this package declares none of them.
63
- */
64
- describe("LocalizedPathname", () => {
65
- it("should report the same type as LocalizedUrl for a relative path", () => {
66
- expectTypeOf().toEqualTypeOf();
67
- expectTypeOf().toEqualTypeOf();
68
- });
69
- it("should drop the origin of an absolute URL", () => {
70
- expectTypeOf().toEqualTypeOf();
71
- expectTypeOf().toEqualTypeOf();
72
- });
73
- it("should collapse an origin without a path to the root", () => {
74
- expectTypeOf().toEqualTypeOf();
75
- expectTypeOf().toEqualTypeOf();
76
- });
77
- it("should replace a locale segment carried by an absolute URL", () => {
78
- expectTypeOf().toEqualTypeOf();
79
- });
80
- });
81
- /**
82
- * `getLocalizedPath` never emits an origin, so `routing.domains` reaches it only
83
- * through the prefix it suppresses for a locale alone on its domain.
84
- */
85
- describe("LocalizedPathname with routing.domains", () => {
86
- it("should drop the prefix of a locale alone on its domain", () => {
87
- expectTypeOf().toEqualTypeOf();
88
- expectTypeOf().toEqualTypeOf();
89
- });
90
- it("should keep the prefix of a locale sharing its domain", () => {
91
- expectTypeOf().toEqualTypeOf();
92
- });
93
- it("should never emit the locale domain as an origin", () => {
94
- expectTypeOf().toEqualTypeOf();
95
- });
96
- });
97
-
98
- //#endregion
99
- //# sourceMappingURL=getLocalizedPath.test-d.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getLocalizedPath.test-d.mjs","names":[],"sources":["../../../src/localization/getLocalizedPath.test-d.ts"],"sourcesContent":["import type {\n LocalizedPath,\n LocalizedPathname,\n LocalizedUrl,\n} from '@intlayer/types/module_augmentation';\nimport { describe, expectTypeOf, it } from 'vitest';\nimport { getLocalizedPath } from './getLocalizedPath';\nimport { getLocalizedUrl } from './getLocalizedUrl';\n\n/**\n * `getLocalizedPath` prefixes the rewritten path, so it reports the very type\n * its sibling reports for a relative URL. This package declares neither rewrite\n * rules nor a default locale, so the registry leaves both steps as no-ops.\n */\ndescribe('getLocalizedPath', () => {\n it('should report the same type as getLocalizedUrl', () => {\n expectTypeOf(getLocalizedPath('/about', 'fr')).toEqualTypeOf<\n LocalizedUrl<'/about', 'fr'>\n >();\n expectTypeOf(getLocalizedPath('/about', 'fr')).toEqualTypeOf(\n getLocalizedUrl('/about', 'fr')\n );\n });\n\n it('should keep the literal path when nothing rewrites or prefixes it', () => {\n expectTypeOf(getLocalizedPath('/about', 'fr')).toEqualTypeOf<'/about'>();\n });\n\n it('should drop the origin of an absolute URL', () => {\n expectTypeOf(\n getLocalizedPath('https://intlayer.org/about', 'fr')\n ).toEqualTypeOf<'/about'>();\n });\n\n it('should widen to string when the path is not a literal', () => {\n const dynamicPath = '/about' as string;\n\n expectTypeOf(getLocalizedPath(dynamicPath, 'fr')).toEqualTypeOf<string>();\n });\n});\n\n/**\n * The resolution itself, exercised against explicit rules — the same shape the\n * generated module augmentation feeds it as `__RoutingRegistry['rewrite']`.\n */\ndescribe('LocalizedPath', () => {\n type Rules = {\n '/about': { en: '/about'; fr: '/a-propos' };\n '/product/:id': { en: '/product/:id'; fr: '/produit/:id' };\n '/shop/:category/:id': { fr: '/boutique/:category/:id' };\n '/docs/:path+': { fr: '/documentation/:path+' };\n };\n\n it('should rewrite a static path', () => {\n expectTypeOf<\n LocalizedPath<'/about', 'fr', Rules>\n >().toEqualTypeOf<'/a-propos'>();\n });\n\n it('should keep a path no rule matches', () => {\n expectTypeOf<\n LocalizedPath<'/contact', 'fr', Rules>\n >().toEqualTypeOf<'/contact'>();\n });\n\n it('should substitute a route parameter', () => {\n expectTypeOf<\n LocalizedPath<'/product/123', 'fr', Rules>\n >().toEqualTypeOf<'/produit/123'>();\n });\n\n it('should substitute several route parameters', () => {\n expectTypeOf<\n LocalizedPath<'/shop/shoes/123', 'fr', Rules>\n >().toEqualTypeOf<'/boutique/shoes/123'>();\n });\n\n it('should not match a parameter across a segment boundary', () => {\n expectTypeOf<\n LocalizedPath<'/product/123/reviews', 'fr', Rules>\n >().toEqualTypeOf<'/product/123/reviews'>();\n });\n\n it('should keep the path when the locale declares no pattern', () => {\n expectTypeOf<\n LocalizedPath<'/shop/shoes/123', 'en', Rules>\n >().toEqualTypeOf<'/shop/shoes/123'>();\n });\n\n it('should distribute over a union of locales', () => {\n expectTypeOf<LocalizedPath<'/about', 'en' | 'fr', Rules>>().toEqualTypeOf<\n '/about' | '/a-propos'\n >();\n });\n\n it('should widen a variadic rule to string, but only for the paths it could match', () => {\n expectTypeOf<\n LocalizedPath<'/docs/getting-started', 'fr', Rules>\n >().toEqualTypeOf<string>();\n expectTypeOf<\n LocalizedPath<'/about', 'fr', Rules>\n >().toEqualTypeOf<'/a-propos'>();\n });\n\n it('should keep every path when the project declares no rule', () => {\n expectTypeOf<LocalizedPath<'/about', 'fr', {}>>().toEqualTypeOf<'/about'>();\n });\n});\n\n/**\n * The return type of `getLocalizedPath`, exercised against an explicit routing\n * mode, default locale and locale set — this package declares none of them.\n */\ndescribe('LocalizedPathname', () => {\n type Locales = 'en' | 'fr' | 'es';\n type Path<P extends string, L extends Locales> = LocalizedPathname<\n P,\n L,\n 'prefix-no-default',\n 'en',\n Locales\n >;\n\n it('should report the same type as LocalizedUrl for a relative path', () => {\n expectTypeOf<Path<'/about', 'es'>>().toEqualTypeOf<\n LocalizedUrl<'/about', 'es', 'prefix-no-default', 'en', Locales>\n >();\n expectTypeOf<Path<'/about', 'es'>>().toEqualTypeOf<'/es/about'>();\n });\n\n it('should drop the origin of an absolute URL', () => {\n expectTypeOf<\n Path<'https://intlayer.org/about', 'es'>\n >().toEqualTypeOf<'/es/about'>();\n expectTypeOf<\n Path<'https://intlayer.org/about', 'en'>\n >().toEqualTypeOf<'/about'>();\n });\n\n it('should collapse an origin without a path to the root', () => {\n expectTypeOf<Path<'https://intlayer.org', 'en'>>().toEqualTypeOf<'/'>();\n expectTypeOf<Path<'https://intlayer.org/', 'es'>>().toEqualTypeOf<'/es'>();\n });\n\n it('should replace a locale segment carried by an absolute URL', () => {\n expectTypeOf<\n Path<'https://intlayer.org/fr/about', 'es'>\n >().toEqualTypeOf<'/es/about'>();\n });\n});\n\n/**\n * `getLocalizedPath` never emits an origin, so `routing.domains` reaches it only\n * through the prefix it suppresses for a locale alone on its domain.\n */\ndescribe('LocalizedPathname with routing.domains', () => {\n type Locales = 'en' | 'fr' | 'zh';\n type Domains = {\n en: { origin: 'https://intlayer.org'; exclusive: false };\n fr: { origin: 'https://intlayer.org'; exclusive: false };\n zh: { origin: 'https://intlayer.cn'; exclusive: true };\n };\n type Path<P extends string, L extends Locales> = LocalizedPathname<\n P,\n L,\n 'prefix-no-default',\n 'en',\n Locales,\n Domains\n >;\n\n it('should drop the prefix of a locale alone on its domain', () => {\n expectTypeOf<Path<'/about', 'zh'>>().toEqualTypeOf<'/about'>();\n expectTypeOf<Path<'/', 'zh'>>().toEqualTypeOf<'/'>();\n });\n\n it('should keep the prefix of a locale sharing its domain', () => {\n expectTypeOf<Path<'/about', 'fr'>>().toEqualTypeOf<'/fr/about'>();\n });\n\n it('should never emit the locale domain as an origin', () => {\n expectTypeOf<\n Path<'https://intlayer.org/about', 'zh'>\n >().toEqualTypeOf<'/about'>();\n });\n});\n"],"mappings":";;;;;;;;;;AAcA,SAAS,0BAA0B;CACjC,GAAG,wDAAwD;EACzD,aAAa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