@koine/i18n 2.0.0-beta.146 → 2.0.0-beta.148
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/adapter-js/generators/config.d.ts +1 -1
- package/adapter-js/generators/createT.d.ts +1 -1
- package/adapter-js/generators/defaultI18nMetadata.d.ts +1 -1
- package/adapter-js/generators/formatTo.cjs.js +2 -2
- package/adapter-js/generators/formatTo.esm.js +2 -2
- package/adapter-js/generators/formatUrl.d.ts +1 -1
- package/adapter-js/generators/getI18nAlternatesFromDom.d.ts +1 -1
- package/adapter-js/generators/getI18nDictionaries.d.ts +1 -1
- package/adapter-js/generators/getI18nMetadata.d.ts +1 -1
- package/adapter-js/generators/getT.d.ts +1 -1
- package/adapter-js/generators/isLocale.d.ts +1 -1
- package/adapter-js/generators/loadTranslations.d.ts +1 -1
- package/adapter-js/generators/pathnameToRouteId.d.ts +1 -1
- package/adapter-js/generators/setLocale.d.ts +1 -1
- package/adapter-js/generators/tInterpolateParams.d.ts +1 -1
- package/adapter-js/generators/tInterpolateParamsDeep.d.ts +1 -1
- package/adapter-js/generators/tPluralise.d.ts +1 -1
- package/adapter-js/generators/types.cjs.js +1 -1
- package/adapter-js/generators/types.esm.js +1 -1
- package/adapter-js/index.d.ts +49 -49
- package/adapter-next/generators/deprecated_useLocale.d.ts +1 -1
- package/adapter-next/generators/next-redirects.cjs.js +2 -2
- package/adapter-next/generators/next-redirects.d.ts +1 -1
- package/adapter-next/generators/next-redirects.esm.js +2 -2
- package/adapter-next/generators/next-rewrites.cjs.js +1 -1
- package/adapter-next/generators/next-rewrites.d.ts +1 -1
- package/adapter-next/generators/next-rewrites.esm.js +1 -1
- package/adapter-next/generators/router-app/I18nLayout.d.ts +1 -1
- package/adapter-next/generators/router-app/I18nLayoutRoot.d.ts +1 -1
- package/adapter-next/generators/router-app/I18nPage.d.ts +1 -1
- package/adapter-next/generators/router-app/i18nServer.cjs.js +4 -13
- package/adapter-next/generators/router-app/i18nServer.d.ts +1 -1
- package/adapter-next/generators/router-app/i18nServer.esm.js +4 -13
- package/adapter-next/generators/router-pages/I18nApp.d.ts +1 -1
- package/adapter-next/generators/router-pages/I18nDocument.d.ts +1 -1
- package/adapter-next/generators/router-pages/I18nHead.d.ts +1 -1
- package/adapter-next/generators/router-pages/I18nSetter.d.ts +1 -1
- package/adapter-next/generators/router-pages/i18nGet.d.ts +1 -1
- package/adapter-next/generators/useRouteId.d.ts +1 -1
- package/adapter-next/generators/webpack-define.d.ts +1 -1
- package/adapter-next/index.d.ts +110 -110
- package/adapter-next/{redirects.cjs.js → plugin/redirects.cjs.js} +19 -19
- package/adapter-next/{redirects.d.ts → plugin/redirects.d.ts} +2 -2
- package/adapter-next/{redirects.esm.js → plugin/redirects.esm.js} +19 -19
- package/adapter-next/plugin/rewrites.cjs.js +61 -0
- package/adapter-next/{rewrites.d.ts → plugin/rewrites.d.ts} +2 -2
- package/adapter-next/plugin/rewrites.esm.js +58 -0
- package/adapter-next/plugin/utils.cjs.js +76 -0
- package/adapter-next/plugin/utils.d.ts +26 -0
- package/adapter-next/plugin/utils.esm.js +70 -0
- package/adapter-next/plugin/webpackPluginI18n.cjs.js +39 -0
- package/adapter-next/{webpackPluginI18n.d.ts → plugin/webpackPluginI18n.d.ts} +1 -1
- package/adapter-next/plugin/webpackPluginI18n.esm.js +37 -0
- package/adapter-next/plugin/with-async.cjs.js +18 -0
- package/adapter-next/{plugin-async.d.ts → plugin/with-async.d.ts} +4 -1
- package/adapter-next/plugin/with-async.esm.js +16 -0
- package/adapter-next/{plugin-legacy.cjs.js → plugin/with-legacy.cjs.js} +33 -33
- package/adapter-next/{plugin-legacy.d.ts → plugin/with-legacy.d.ts} +2 -2
- package/adapter-next/{plugin-legacy.esm.js → plugin/with-legacy.esm.js} +33 -33
- package/adapter-next/plugin/with-sync.cjs.js +21 -0
- package/adapter-next/{plugin.d.ts → plugin/with-sync.d.ts} +4 -1
- package/adapter-next/plugin/with-sync.esm.js +18 -0
- package/adapter-next-translate/generators/DynamicNamespaces.d.ts +1 -1
- package/adapter-next-translate/generators/I18nProvider.d.ts +1 -1
- package/adapter-next-translate/generators/Trans.d.ts +1 -1
- package/adapter-next-translate/generators/TransText.d.ts +1 -1
- package/adapter-next-translate/generators/getT.d.ts +1 -1
- package/adapter-next-translate/generators/nextTranslateI18n.d.ts +1 -1
- package/adapter-next-translate/generators/useLocale.d.ts +1 -1
- package/adapter-next-translate/generators/useT.d.ts +1 -1
- package/adapter-react/generators/I18nEffects.d.ts +1 -1
- package/adapter-react/generators/I18nHeadTags.d.ts +1 -1
- package/adapter-react/generators/I18nLocaleContext.d.ts +1 -1
- package/adapter-react/generators/I18nMetadata.d.ts +1 -1
- package/adapter-react/generators/I18nRoute.d.ts +1 -1
- package/adapter-react/generators/I18nTranslate.d.ts +1 -1
- package/adapter-react/generators/Trans.d.ts +1 -1
- package/adapter-react/generators/getLocale.d.ts +1 -1
- package/adapter-react/generators/getT.d.ts +1 -1
- package/adapter-react/generators/getTo.d.ts +1 -1
- package/adapter-react/generators/packageJson.d.ts +1 -1
- package/adapter-react/generators/useRouteId.d.ts +1 -1
- package/adapter-react/generators/useTo.d.ts +1 -1
- package/adapter-react/generators/useToSpa.d.ts +1 -1
- package/adapter-react/index.d.ts +83 -83
- package/compiler/api.cjs.js +12 -9
- package/compiler/api.esm.js +12 -9
- package/compiler/code/index.d.ts +1 -1
- package/compiler/code/tsCompile.cjs.js +5 -4
- package/compiler/code/tsCompile.esm.js +5 -4
- package/compiler/code/write.cjs.js +55 -54
- package/compiler/code/write.esm.js +55 -54
- package/compiler/config.cjs.js +1 -0
- package/compiler/config.d.ts +6 -0
- package/compiler/config.esm.js +1 -0
- package/compiler/input/data-direct.cjs.js +11 -10
- package/compiler/input/data-direct.esm.js +11 -10
- package/compiler/input/data-remote.cjs.js +11 -10
- package/compiler/input/data-remote.esm.js +11 -10
- package/compiler/logger.cjs.js +17 -0
- package/compiler/logger.d.ts +1 -0
- package/compiler/logger.esm.js +15 -0
- package/compiler/pluralisation.cjs.js +23 -21
- package/compiler/pluralisation.esm.js +24 -22
- package/compiler/summary/data.cjs.js +16 -14
- package/compiler/summary/data.esm.js +17 -15
- package/compiler/summary/generate.cjs.js +29 -24
- package/compiler/summary/generate.esm.js +30 -25
- package/interpolateTo.cjs.js +2 -2
- package/interpolateTo.esm.js +2 -2
- package/next.cjs.js +6 -6
- package/next.d.ts +3 -3
- package/next.esm.js +3 -3
- package/package.json +6 -3
- package/adapter-next/plugin-async.cjs.js +0 -18
- package/adapter-next/plugin-async.esm.js +0 -16
- package/adapter-next/plugin-shared.cjs.js +0 -68
- package/adapter-next/plugin-shared.d.ts +0 -9
- package/adapter-next/plugin-shared.esm.js +0 -64
- package/adapter-next/plugin.cjs.js +0 -21
- package/adapter-next/plugin.esm.js +0 -18
- package/adapter-next/rewrites.cjs.js +0 -61
- package/adapter-next/rewrites.esm.js +0 -58
- package/adapter-next/transformPathname.cjs.js +0 -7
- package/adapter-next/transformPathname.d.ts +0 -9
- package/adapter-next/transformPathname.esm.js +0 -5
- package/adapter-next/webpackPluginI18n.cjs.js +0 -33
- package/adapter-next/webpackPluginI18n.esm.js +0 -31
|
@@ -38,7 +38,7 @@ const formatTo = ({ defaultLocale: e, hideDefaultLocaleInUrl: t }, o)=>new funct
|
|
|
38
38
|
|
|
39
39
|
if (!(key in params)) {
|
|
40
40
|
console.warn(
|
|
41
|
-
"[@koine/i18n]
|
|
41
|
+
"[@koine/i18n]:formatTo, using '" +
|
|
42
42
|
pathname +
|
|
43
43
|
"' without param '" +
|
|
44
44
|
key +
|
|
@@ -49,7 +49,7 @@ const formatTo = ({ defaultLocale: e, hideDefaultLocaleInUrl: t }, o)=>new funct
|
|
|
49
49
|
|
|
50
50
|
if (!["string", "number"].includes(typeof params[key])) {
|
|
51
51
|
console.warn(
|
|
52
|
-
"[@koine/i18n]
|
|
52
|
+
"[@koine/i18n]:formatTo, using '" +
|
|
53
53
|
pathname +
|
|
54
54
|
"' with unserializable param '" +
|
|
55
55
|
key +
|
|
@@ -34,7 +34,7 @@ const formatTo = ({ defaultLocale: e, hideDefaultLocaleInUrl: t }, o)=>new Funct
|
|
|
34
34
|
|
|
35
35
|
if (!(key in params)) {
|
|
36
36
|
console.warn(
|
|
37
|
-
"[@koine/i18n]
|
|
37
|
+
"[@koine/i18n]:formatTo, using '" +
|
|
38
38
|
pathname +
|
|
39
39
|
"' without param '" +
|
|
40
40
|
key +
|
|
@@ -45,7 +45,7 @@ const formatTo = ({ defaultLocale: e, hideDefaultLocaleInUrl: t }, o)=>new Funct
|
|
|
45
45
|
|
|
46
46
|
if (!["string", "number"].includes(typeof params[key])) {
|
|
47
47
|
console.warn(
|
|
48
|
-
"[@koine/i18n]
|
|
48
|
+
"[@koine/i18n]:formatTo, using '" +
|
|
49
49
|
pathname +
|
|
50
50
|
"' with unserializable param '" +
|
|
51
51
|
key +
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FunctionsCompiler } from "../../compiler/functions";
|
|
2
2
|
export declare const setGlobalLocale: (_options?: never) => FunctionsCompiler;
|
|
3
|
-
declare const _default: (data: import("../../compiler
|
|
3
|
+
declare const _default: (data: import("../../compiler").I18nCompiler.DataCode<"js">) => {
|
|
4
4
|
globals: {
|
|
5
5
|
dir: string;
|
|
6
6
|
name: string;
|
|
@@ -3,7 +3,7 @@ export declare const tInterpolateParams: ({ start, end, }: {
|
|
|
3
3
|
start: string;
|
|
4
4
|
end: string;
|
|
5
5
|
}) => FunctionsCompiler;
|
|
6
|
-
declare const _default: (data: import("../../compiler
|
|
6
|
+
declare const _default: (data: import("../../compiler").I18nCompiler.DataCode<"js">) => {
|
|
7
7
|
tInterpolateParams: {
|
|
8
8
|
dir: string;
|
|
9
9
|
name: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FunctionsCompiler } from "../../compiler/functions";
|
|
2
2
|
export declare const tInterpolateParamsDeep: () => FunctionsCompiler;
|
|
3
|
-
declare const _default: (data: import("../../compiler
|
|
3
|
+
declare const _default: (data: import("../../compiler").I18nCompiler.DataCode<"js">) => {
|
|
4
4
|
tInterpolateParamsDeep: {
|
|
5
5
|
dir: string;
|
|
6
6
|
name: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FunctionsCompiler } from "../../compiler/functions";
|
|
2
2
|
export declare const tPluralise: () => FunctionsCompiler;
|
|
3
|
-
declare const _default: (data: import("../../compiler
|
|
3
|
+
declare const _default: (data: import("../../compiler").I18nCompiler.DataCode<"js">) => {
|
|
4
4
|
tPluralise: {
|
|
5
5
|
dir: string;
|
|
6
6
|
name: string;
|
|
@@ -152,7 +152,7 @@ declare namespace I18n {
|
|
|
152
152
|
content: ()=>`
|
|
153
153
|
import type { Split } from "@koine/utils";
|
|
154
154
|
import type { I18nUtils } from "@koine/i18n";
|
|
155
|
-
import type { RouteIdError } from "./routesError";
|
|
155
|
+
import type { RouteIdError } from "./internal/routesError";
|
|
156
156
|
|
|
157
157
|
export namespace I18n {
|
|
158
158
|
/**
|
|
@@ -148,7 +148,7 @@ declare namespace I18n {
|
|
|
148
148
|
content: ()=>`
|
|
149
149
|
import type { Split } from "@koine/utils";
|
|
150
150
|
import type { I18nUtils } from "@koine/i18n";
|
|
151
|
-
import type { RouteIdError } from "./routesError";
|
|
151
|
+
import type { RouteIdError } from "./internal/routesError";
|
|
152
152
|
|
|
153
153
|
export namespace I18n {
|
|
154
154
|
/**
|
package/adapter-js/index.d.ts
CHANGED
|
@@ -29,183 +29,183 @@ export type Options = {
|
|
|
29
29
|
modularize: boolean;
|
|
30
30
|
};
|
|
31
31
|
export declare const adapterJs: {
|
|
32
|
-
(data: import("../compiler
|
|
33
|
-
generators: import("../compiler
|
|
32
|
+
(data: import("../compiler").I18nCompiler.DataCode<"js">): {
|
|
33
|
+
generators: import("../compiler").I18nCompiler.AdapterGenerator<import("../compiler").I18nCompiler.AdapterName>[];
|
|
34
34
|
transformers: Partial<{
|
|
35
35
|
locales: boolean | ((file: {
|
|
36
36
|
name: string;
|
|
37
37
|
ext: "ts";
|
|
38
38
|
index: true;
|
|
39
39
|
content: () => string;
|
|
40
|
-
}) => import("../compiler
|
|
40
|
+
}) => import("../compiler").I18nCompiler.AdapterFile);
|
|
41
41
|
defaultLocale: boolean | ((file: {
|
|
42
42
|
name: string;
|
|
43
43
|
ext: "ts";
|
|
44
44
|
index: true;
|
|
45
45
|
content: () => string;
|
|
46
|
-
}) => import("../compiler
|
|
46
|
+
}) => import("../compiler").I18nCompiler.AdapterFile);
|
|
47
47
|
config: boolean | ((file: {
|
|
48
48
|
name: string;
|
|
49
49
|
ext: "ts";
|
|
50
50
|
index: true;
|
|
51
51
|
disabled: true;
|
|
52
52
|
content: () => string;
|
|
53
|
-
}) => import("../compiler
|
|
53
|
+
}) => import("../compiler").I18nCompiler.AdapterFile);
|
|
54
54
|
configCjs: boolean | ((file: {
|
|
55
55
|
name: string;
|
|
56
56
|
ext: "js";
|
|
57
57
|
index: false;
|
|
58
58
|
disabled: true;
|
|
59
59
|
content: () => string;
|
|
60
|
-
}) => import("../compiler
|
|
60
|
+
}) => import("../compiler").I18nCompiler.AdapterFile);
|
|
61
61
|
createT: boolean | ((file: {
|
|
62
62
|
dir: string;
|
|
63
63
|
name: string;
|
|
64
64
|
ext: "ts";
|
|
65
65
|
index: false;
|
|
66
66
|
content: () => string;
|
|
67
|
-
}) => import("../compiler
|
|
67
|
+
}) => import("../compiler").I18nCompiler.AdapterFile);
|
|
68
68
|
defaultI18nMetadata: boolean | ((file: {
|
|
69
69
|
dir: string;
|
|
70
70
|
name: string;
|
|
71
71
|
ext: "ts";
|
|
72
72
|
index: false;
|
|
73
73
|
content: () => string;
|
|
74
|
-
}) => import("../compiler
|
|
74
|
+
}) => import("../compiler").I18nCompiler.AdapterFile);
|
|
75
75
|
formatTo: boolean | ((file: {
|
|
76
76
|
dir: string;
|
|
77
77
|
name: string;
|
|
78
78
|
ext: "ts";
|
|
79
79
|
index: false;
|
|
80
80
|
content: () => string;
|
|
81
|
-
}) => import("../compiler
|
|
81
|
+
}) => import("../compiler").I18nCompiler.AdapterFile);
|
|
82
82
|
formatUrl: boolean | ((file: {
|
|
83
83
|
name: string;
|
|
84
84
|
ext: "ts";
|
|
85
85
|
index: true;
|
|
86
86
|
content: () => string;
|
|
87
|
-
}) => import("../compiler
|
|
87
|
+
}) => import("../compiler").I18nCompiler.AdapterFile);
|
|
88
88
|
getI18nDictionaries: boolean | ((file: {
|
|
89
89
|
dir: string;
|
|
90
90
|
name: string;
|
|
91
91
|
ext: "ts";
|
|
92
92
|
index: false;
|
|
93
93
|
content: () => string;
|
|
94
|
-
}) => import("../compiler
|
|
94
|
+
}) => import("../compiler").I18nCompiler.AdapterFile);
|
|
95
95
|
getI18nMetadata: boolean | ((file: {
|
|
96
96
|
dir: string;
|
|
97
97
|
name: string;
|
|
98
98
|
ext: "ts";
|
|
99
99
|
index: false;
|
|
100
100
|
content: () => string;
|
|
101
|
-
}) => import("../compiler
|
|
101
|
+
}) => import("../compiler").I18nCompiler.AdapterFile);
|
|
102
102
|
getT: boolean | ((file: {
|
|
103
103
|
name: string;
|
|
104
104
|
ext: "ts";
|
|
105
105
|
index: true;
|
|
106
106
|
content: () => string;
|
|
107
|
-
}) => import("../compiler
|
|
107
|
+
}) => import("../compiler").I18nCompiler.AdapterFile);
|
|
108
108
|
isLocale: boolean | ((file: {
|
|
109
109
|
name: string;
|
|
110
110
|
ext: "ts";
|
|
111
111
|
index: true;
|
|
112
112
|
content: () => string;
|
|
113
|
-
}) => import("../compiler
|
|
113
|
+
}) => import("../compiler").I18nCompiler.AdapterFile);
|
|
114
114
|
loadTranslations: boolean | ((file: {
|
|
115
115
|
dir: string;
|
|
116
116
|
name: string;
|
|
117
117
|
ext: "ts";
|
|
118
118
|
index: false;
|
|
119
119
|
content: () => string;
|
|
120
|
-
}) => import("../compiler
|
|
120
|
+
}) => import("../compiler").I18nCompiler.AdapterFile);
|
|
121
121
|
pathnameToRouteId: boolean | ((file: {
|
|
122
122
|
name: string;
|
|
123
123
|
ext: "ts";
|
|
124
124
|
index: true;
|
|
125
125
|
content: () => string;
|
|
126
|
-
}) => import("../compiler
|
|
126
|
+
}) => import("../compiler").I18nCompiler.AdapterFile);
|
|
127
127
|
routes: boolean | ((file: {
|
|
128
128
|
dir: string;
|
|
129
129
|
name: string;
|
|
130
130
|
ext: "ts";
|
|
131
131
|
index: false;
|
|
132
132
|
content: () => string;
|
|
133
|
-
}) => import("../compiler
|
|
133
|
+
}) => import("../compiler").I18nCompiler.AdapterFile);
|
|
134
134
|
routesError: boolean | ((file: {
|
|
135
135
|
dir: string;
|
|
136
136
|
name: string;
|
|
137
137
|
ext: "ts";
|
|
138
138
|
index: false;
|
|
139
139
|
content: () => string;
|
|
140
|
-
}) => import("../compiler
|
|
140
|
+
}) => import("../compiler").I18nCompiler.AdapterFile);
|
|
141
141
|
routesSlim: boolean | ((file: {
|
|
142
142
|
dir: string;
|
|
143
143
|
name: string;
|
|
144
144
|
ext: "ts";
|
|
145
145
|
index: false;
|
|
146
146
|
content: () => string;
|
|
147
|
-
}) => import("../compiler
|
|
147
|
+
}) => import("../compiler").I18nCompiler.AdapterFile);
|
|
148
148
|
routesSpa: boolean | ((file: {
|
|
149
149
|
dir: string;
|
|
150
150
|
name: string;
|
|
151
151
|
ext: "ts";
|
|
152
152
|
index: false;
|
|
153
153
|
content: () => string;
|
|
154
|
-
}) => import("../compiler
|
|
154
|
+
}) => import("../compiler").I18nCompiler.AdapterFile);
|
|
155
155
|
globals: boolean | ((file: {
|
|
156
156
|
dir: string;
|
|
157
157
|
name: string;
|
|
158
158
|
ext: "d.ts";
|
|
159
159
|
index: false;
|
|
160
160
|
content: () => string;
|
|
161
|
-
}) => import("../compiler
|
|
161
|
+
}) => import("../compiler").I18nCompiler.AdapterFile);
|
|
162
162
|
setGlobalLocale: boolean | ((file: {
|
|
163
163
|
dir: string;
|
|
164
164
|
name: string;
|
|
165
165
|
ext: "ts";
|
|
166
166
|
index: false;
|
|
167
167
|
content: () => string;
|
|
168
|
-
}) => import("../compiler
|
|
168
|
+
}) => import("../compiler").I18nCompiler.AdapterFile);
|
|
169
169
|
$t: boolean | ((file: {
|
|
170
170
|
name: string;
|
|
171
171
|
ext: "ts";
|
|
172
172
|
index: false;
|
|
173
173
|
content: () => string;
|
|
174
|
-
}) => import("../compiler
|
|
174
|
+
}) => import("../compiler").I18nCompiler.AdapterFile);
|
|
175
175
|
tInterpolateParams: boolean | ((file: {
|
|
176
176
|
dir: string;
|
|
177
177
|
name: string;
|
|
178
178
|
ext: "ts";
|
|
179
179
|
index: false;
|
|
180
180
|
content: () => string;
|
|
181
|
-
}) => import("../compiler
|
|
181
|
+
}) => import("../compiler").I18nCompiler.AdapterFile);
|
|
182
182
|
tInterpolateParamsDeep: boolean | ((file: {
|
|
183
183
|
dir: string;
|
|
184
184
|
name: string;
|
|
185
185
|
ext: "ts";
|
|
186
186
|
index: false;
|
|
187
187
|
content: () => string;
|
|
188
|
-
}) => import("../compiler
|
|
188
|
+
}) => import("../compiler").I18nCompiler.AdapterFile);
|
|
189
189
|
tPluralise: boolean | ((file: {
|
|
190
190
|
dir: string;
|
|
191
191
|
name: string;
|
|
192
192
|
ext: "ts";
|
|
193
193
|
index: false;
|
|
194
194
|
content: () => string;
|
|
195
|
-
}) => import("../compiler
|
|
195
|
+
}) => import("../compiler").I18nCompiler.AdapterFile);
|
|
196
196
|
to: boolean | ((file: {
|
|
197
197
|
name: string;
|
|
198
198
|
ext: "ts";
|
|
199
199
|
index: true;
|
|
200
200
|
content: () => string;
|
|
201
|
-
}) => import("../compiler
|
|
201
|
+
}) => import("../compiler").I18nCompiler.AdapterFile);
|
|
202
202
|
toSpa: boolean | ((file: {
|
|
203
203
|
name: string;
|
|
204
204
|
ext: "ts";
|
|
205
205
|
index: true;
|
|
206
206
|
disabled: boolean;
|
|
207
207
|
content: () => string;
|
|
208
|
-
}) => import("../compiler
|
|
208
|
+
}) => import("../compiler").I18nCompiler.AdapterFile);
|
|
209
209
|
globalTypes: boolean | ((file: {
|
|
210
210
|
dir: string;
|
|
211
211
|
name: string;
|
|
@@ -213,16 +213,16 @@ export declare const adapterJs: {
|
|
|
213
213
|
index: false;
|
|
214
214
|
disabled: true;
|
|
215
215
|
content: () => string;
|
|
216
|
-
}) => import("../compiler
|
|
216
|
+
}) => import("../compiler").I18nCompiler.AdapterFile);
|
|
217
217
|
types: boolean | ((file: {
|
|
218
218
|
name: string;
|
|
219
219
|
ext: "ts";
|
|
220
220
|
index: true;
|
|
221
221
|
content: () => string;
|
|
222
|
-
}) => import("../compiler
|
|
222
|
+
}) => import("../compiler").I18nCompiler.AdapterFile);
|
|
223
223
|
}>;
|
|
224
224
|
};
|
|
225
|
-
getGenerators: (_data: import("../compiler
|
|
225
|
+
getGenerators: (_data: import("../compiler").I18nCompiler.DataCode<"js">) => (((data: import("../compiler").I18nCompiler.DataCode<"js">) => {
|
|
226
226
|
locales: {
|
|
227
227
|
name: string;
|
|
228
228
|
ext: "ts";
|
|
@@ -249,7 +249,7 @@ export declare const adapterJs: {
|
|
|
249
249
|
disabled: true;
|
|
250
250
|
content: () => string;
|
|
251
251
|
};
|
|
252
|
-
}) | ((data: import("../compiler
|
|
252
|
+
}) | ((data: import("../compiler").I18nCompiler.DataCode<"js">) => {
|
|
253
253
|
createT: {
|
|
254
254
|
dir: string;
|
|
255
255
|
name: string;
|
|
@@ -257,7 +257,7 @@ export declare const adapterJs: {
|
|
|
257
257
|
index: false;
|
|
258
258
|
content: () => string;
|
|
259
259
|
};
|
|
260
|
-
}) | ((data: import("../compiler
|
|
260
|
+
}) | ((data: import("../compiler").I18nCompiler.DataCode<"js">) => {
|
|
261
261
|
defaultI18nMetadata: {
|
|
262
262
|
dir: string;
|
|
263
263
|
name: string;
|
|
@@ -265,7 +265,7 @@ export declare const adapterJs: {
|
|
|
265
265
|
index: false;
|
|
266
266
|
content: () => string;
|
|
267
267
|
};
|
|
268
|
-
}) | ((data: import("../compiler
|
|
268
|
+
}) | ((data: import("../compiler").I18nCompiler.DataCode<"js">) => {
|
|
269
269
|
formatTo: {
|
|
270
270
|
dir: string;
|
|
271
271
|
name: string;
|
|
@@ -273,14 +273,14 @@ export declare const adapterJs: {
|
|
|
273
273
|
index: false;
|
|
274
274
|
content: () => string;
|
|
275
275
|
};
|
|
276
|
-
}) | ((data: import("../compiler
|
|
276
|
+
}) | ((data: import("../compiler").I18nCompiler.DataCode<"js">) => {
|
|
277
277
|
formatUrl: {
|
|
278
278
|
name: string;
|
|
279
279
|
ext: "ts";
|
|
280
280
|
index: true;
|
|
281
281
|
content: () => string;
|
|
282
282
|
};
|
|
283
|
-
}) | ((data: import("../compiler
|
|
283
|
+
}) | ((data: import("../compiler").I18nCompiler.DataCode<"js">) => {
|
|
284
284
|
getI18nDictionaries: {
|
|
285
285
|
dir: string;
|
|
286
286
|
name: string;
|
|
@@ -288,7 +288,7 @@ export declare const adapterJs: {
|
|
|
288
288
|
index: false;
|
|
289
289
|
content: () => string;
|
|
290
290
|
};
|
|
291
|
-
}) | ((data: import("../compiler
|
|
291
|
+
}) | ((data: import("../compiler").I18nCompiler.DataCode<"js">) => {
|
|
292
292
|
getI18nMetadata: {
|
|
293
293
|
dir: string;
|
|
294
294
|
name: string;
|
|
@@ -296,21 +296,21 @@ export declare const adapterJs: {
|
|
|
296
296
|
index: false;
|
|
297
297
|
content: () => string;
|
|
298
298
|
};
|
|
299
|
-
}) | ((data: import("../compiler
|
|
299
|
+
}) | ((data: import("../compiler").I18nCompiler.DataCode<"js">) => {
|
|
300
300
|
getT: {
|
|
301
301
|
name: string;
|
|
302
302
|
ext: "ts";
|
|
303
303
|
index: true;
|
|
304
304
|
content: () => string;
|
|
305
305
|
};
|
|
306
|
-
}) | ((data: import("../compiler
|
|
306
|
+
}) | ((data: import("../compiler").I18nCompiler.DataCode<"js">) => {
|
|
307
307
|
isLocale: {
|
|
308
308
|
name: string;
|
|
309
309
|
ext: "ts";
|
|
310
310
|
index: true;
|
|
311
311
|
content: () => string;
|
|
312
312
|
};
|
|
313
|
-
}) | ((data: import("../compiler
|
|
313
|
+
}) | ((data: import("../compiler").I18nCompiler.DataCode<"js">) => {
|
|
314
314
|
loadTranslations: {
|
|
315
315
|
dir: string;
|
|
316
316
|
name: string;
|
|
@@ -318,14 +318,14 @@ export declare const adapterJs: {
|
|
|
318
318
|
index: false;
|
|
319
319
|
content: () => string;
|
|
320
320
|
};
|
|
321
|
-
}) | ((data: import("../compiler
|
|
321
|
+
}) | ((data: import("../compiler").I18nCompiler.DataCode<"js">) => {
|
|
322
322
|
pathnameToRouteId: {
|
|
323
323
|
name: string;
|
|
324
324
|
ext: "ts";
|
|
325
325
|
index: true;
|
|
326
326
|
content: () => string;
|
|
327
327
|
};
|
|
328
|
-
}) | ((data: import("../compiler
|
|
328
|
+
}) | ((data: import("../compiler").I18nCompiler.DataCode<"js">) => {
|
|
329
329
|
routes: {
|
|
330
330
|
dir: string;
|
|
331
331
|
name: string;
|
|
@@ -354,7 +354,7 @@ export declare const adapterJs: {
|
|
|
354
354
|
index: false;
|
|
355
355
|
content: () => string;
|
|
356
356
|
};
|
|
357
|
-
}) | ((data: import("../compiler
|
|
357
|
+
}) | ((data: import("../compiler").I18nCompiler.DataCode<"js">) => {
|
|
358
358
|
globals: {
|
|
359
359
|
dir: string;
|
|
360
360
|
name: string;
|
|
@@ -369,14 +369,14 @@ export declare const adapterJs: {
|
|
|
369
369
|
index: false;
|
|
370
370
|
content: () => string;
|
|
371
371
|
};
|
|
372
|
-
}) | ((data: import("../compiler
|
|
372
|
+
}) | ((data: import("../compiler").I18nCompiler.DataCode<"js">) => {
|
|
373
373
|
$t: {
|
|
374
374
|
name: string;
|
|
375
375
|
ext: "ts";
|
|
376
376
|
index: false;
|
|
377
377
|
content: () => string;
|
|
378
378
|
};
|
|
379
|
-
}) | ((data: import("../compiler
|
|
379
|
+
}) | ((data: import("../compiler").I18nCompiler.DataCode<"js">) => {
|
|
380
380
|
tInterpolateParams: {
|
|
381
381
|
dir: string;
|
|
382
382
|
name: string;
|
|
@@ -384,7 +384,7 @@ export declare const adapterJs: {
|
|
|
384
384
|
index: false;
|
|
385
385
|
content: () => string;
|
|
386
386
|
};
|
|
387
|
-
}) | ((data: import("../compiler
|
|
387
|
+
}) | ((data: import("../compiler").I18nCompiler.DataCode<"js">) => {
|
|
388
388
|
tInterpolateParamsDeep: {
|
|
389
389
|
dir: string;
|
|
390
390
|
name: string;
|
|
@@ -392,7 +392,7 @@ export declare const adapterJs: {
|
|
|
392
392
|
index: false;
|
|
393
393
|
content: () => string;
|
|
394
394
|
};
|
|
395
|
-
}) | ((data: import("../compiler
|
|
395
|
+
}) | ((data: import("../compiler").I18nCompiler.DataCode<"js">) => {
|
|
396
396
|
tPluralise: {
|
|
397
397
|
dir: string;
|
|
398
398
|
name: string;
|
|
@@ -400,7 +400,7 @@ export declare const adapterJs: {
|
|
|
400
400
|
index: false;
|
|
401
401
|
content: () => string;
|
|
402
402
|
};
|
|
403
|
-
}) | ((data: import("../compiler
|
|
403
|
+
}) | ((data: import("../compiler").I18nCompiler.DataCode<"js">) => {
|
|
404
404
|
to: {
|
|
405
405
|
name: string;
|
|
406
406
|
ext: "ts";
|
|
@@ -414,7 +414,7 @@ export declare const adapterJs: {
|
|
|
414
414
|
disabled: boolean;
|
|
415
415
|
content: () => string;
|
|
416
416
|
};
|
|
417
|
-
}) | ((data: import("../compiler
|
|
417
|
+
}) | ((data: import("../compiler").I18nCompiler.DataCode<"js">) => {
|
|
418
418
|
globalTypes: {
|
|
419
419
|
dir: string;
|
|
420
420
|
name: string;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var createAdapter = require('../../compiler/createAdapter.cjs.js');
|
|
4
|
-
var redirects = require('../redirects.cjs.js');
|
|
4
|
+
var redirects = require('../plugin/redirects.cjs.js');
|
|
5
5
|
|
|
6
6
|
var t = createAdapter.createGenerator("next", (r)=>{
|
|
7
|
-
let { config: i, options:
|
|
7
|
+
let { config: i, options: n, routes: d } = r, o = JSON.stringify(redirects.generateRedirects(i, n.routes, d.byId), null, 2);
|
|
8
8
|
return {
|
|
9
9
|
nextRedirects: {
|
|
10
10
|
dir: createAdapter.createGenerator.dirs.internal,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createGenerator } from '../../compiler/createAdapter.esm.js';
|
|
2
|
-
import { generateRedirects } from '../redirects.esm.js';
|
|
2
|
+
import { generateRedirects } from '../plugin/redirects.esm.js';
|
|
3
3
|
|
|
4
4
|
var t = createGenerator("next", (r)=>{
|
|
5
|
-
let { config: i, options:
|
|
5
|
+
let { config: i, options: n, routes: d } = r, o = JSON.stringify(generateRedirects(i, n.routes, d.byId), null, 2);
|
|
6
6
|
return {
|
|
7
7
|
nextRedirects: {
|
|
8
8
|
dir: createGenerator.dirs.internal,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var createAdapter = require('../../compiler/createAdapter.cjs.js');
|
|
4
|
-
var rewrites = require('../rewrites.cjs.js');
|
|
4
|
+
var rewrites = require('../plugin/rewrites.cjs.js');
|
|
5
5
|
|
|
6
6
|
var o = createAdapter.createGenerator("next", (r)=>{
|
|
7
7
|
let { config: i, routes: n, options: o } = r, d = JSON.stringify(rewrites.generateRewrites(i, o.routes, n.byId), null, 2);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createGenerator } from '../../compiler/createAdapter.esm.js';
|
|
2
|
-
import { generateRewrites } from '../rewrites.esm.js';
|
|
2
|
+
import { generateRewrites } from '../plugin/rewrites.esm.js';
|
|
3
3
|
|
|
4
4
|
var o = createGenerator("next", (r)=>{
|
|
5
5
|
let { config: i, routes: n, options: o } = r, d = JSON.stringify(generateRewrites(i, o.routes, n.byId), null, 2);
|