@vmz/vmz 0.1.16 → 0.1.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/application-cmd.d.ts +6 -16
- package/dist/application-cmd.js +34 -180
- package/dist/author-input.d.ts +40 -19
- package/dist/author-input.js +2 -16
- package/dist/build-assemble.d.ts +63 -41
- package/dist/build-assemble.js +42 -43
- package/dist/bundler-adapter.d.ts +46 -48
- package/dist/bundler-adapter.js +4 -43
- package/dist/cdn-policy.d.ts +77 -93
- package/dist/cdn-policy.js +10 -16
- package/dist/cli-localize.d.ts +34 -0
- package/dist/cli-localize.js +58 -0
- package/dist/cli.d.ts +8 -19
- package/dist/cli.js +69 -252
- package/dist/content-addressed-assets.d.ts +24 -10
- package/dist/content-addressed-assets.js +2 -7
- package/dist/delivery-profile.d.ts +54 -27
- package/dist/delivery-profile.js +15 -13
- package/dist/dev-session.d.ts +29 -23
- package/dist/dev-session.js +0 -21
- package/dist/dev-watch-roots.d.ts +34 -25
- package/dist/dev-watch-roots.js +0 -31
- package/dist/document-build.d.ts +22 -97
- package/dist/document-build.js +4 -19
- package/dist/document-check.d.ts +30 -53
- package/dist/document-check.js +14 -29
- package/dist/document-cmd.d.ts +3 -6
- package/dist/document-cmd.js +19 -79
- package/dist/document-designs.d.ts +5 -8
- package/dist/document-designs.js +2 -15
- package/dist/document-enrich.d.ts +52 -24
- package/dist/document-enrich.js +4 -32
- package/dist/document-evidence.d.ts +46 -43
- package/dist/document-evidence.js +6 -47
- package/dist/document-integrate.d.ts +13 -29
- package/dist/document-integrate.js +2 -13
- package/dist/document-interactive.d.ts +45 -67
- package/dist/document-interactive.js +9 -50
- package/dist/document-layout-render.d.ts +7 -16
- package/dist/document-layout-render.js +0 -17
- package/dist/document-locale.d.ts +12 -25
- package/dist/document-locale.js +3 -14
- package/dist/document-markdown.d.ts +9 -5
- package/dist/document-markdown.js +0 -4
- package/dist/document-routing-config.d.ts +7 -14
- package/dist/document-routing-config.js +0 -9
- package/dist/document-scan.d.ts +14 -18
- package/dist/document-scan.js +2 -23
- package/dist/document-schema.d.ts +154 -41
- package/dist/document-schema.js +0 -35
- package/dist/embedded-packaging.d.ts +20 -8
- package/dist/embedded-packaging.js +0 -1
- package/dist/explain-cmd.d.ts +4 -3
- package/dist/explain-cmd.js +16 -65
- package/dist/index.d.ts +70 -143
- package/dist/index.js +16 -136
- package/dist/invocation.d.ts +29 -50
- package/dist/invocation.js +11 -57
- package/dist/locale-check.d.ts +69 -70
- package/dist/locale-check.js +5 -66
- package/dist/locale-cmd.d.ts +2 -5
- package/dist/locale-cmd.js +62 -142
- package/dist/locale-delivery.d.ts +294 -191
- package/dist/locale-delivery.js +8 -94
- package/dist/locale-route-emit.d.ts +23 -9
- package/dist/locale-route-emit.js +0 -7
- package/dist/locale-router.d.ts +189 -162
- package/dist/locale-router.js +13 -122
- package/dist/locale-runtime.d.ts +292 -262
- package/dist/locale-runtime.js +8 -102
- package/dist/locale-schema.js +0 -1
- package/dist/locale-tooling.d.ts +100 -63
- package/dist/locale-tooling.js +7 -45
- package/dist/log.d.ts +22 -15
- package/dist/log.js +24 -21
- package/dist/native-addon.d.ts +10 -9
- package/dist/native-addon.js +1 -10
- package/dist/pack-client-packages.d.ts +5 -1
- package/dist/pack-client-packages.js +0 -6
- package/dist/pack.d.ts +17 -15
- package/dist/pack.js +0 -12
- package/dist/packages.d.ts +10 -23
- package/dist/packages.js +1 -37
- package/dist/plan-cmd.d.ts +6 -0
- package/dist/plan-cmd.js +35 -0
- package/dist/plugin-host.js +0 -1
- package/dist/port.d.ts +2 -10
- package/dist/port.js +2 -11
- package/dist/pretty-json.d.ts +9 -19
- package/dist/pretty-json.js +3 -17
- package/dist/production-observability.d.ts +37 -181
- package/dist/production-observability.js +1 -9
- package/dist/production-test-pack.d.ts +17 -3
- package/dist/production-test-pack.js +0 -2
- package/dist/public-static-assets.d.ts +6 -1
- package/dist/public-static-assets.js +0 -5
- package/dist/refactor-cmd.d.ts +3 -6
- package/dist/refactor-cmd.js +16 -69
- package/dist/release-cmd.d.ts +7 -6
- package/dist/release-cmd.js +17 -59
- package/dist/release-pack.d.ts +7 -3
- package/dist/release-pack.js +0 -6
- package/dist/resolve.d.ts +15 -19
- package/dist/resolve.js +1 -15
- package/dist/server-artifact.d.ts +30 -75
- package/dist/server-artifact.js +0 -10
- package/dist/server-language-backend.d.ts +22 -79
- package/dist/server-language-backend.js +0 -26
- package/dist/site-delivery.d.ts +46 -59
- package/dist/site-delivery.js +3 -8
- package/dist/site-favicon.d.ts +6 -1
- package/dist/site-favicon.js +0 -5
- package/dist/static-emit.d.ts +73 -103
- package/dist/static-emit.js +1 -26
- package/dist/test-cmd.d.ts +3 -5
- package/dist/test-cmd.js +15 -25
- package/dist/test-compile.js +0 -1
- package/dist/test-discover.js +0 -1
- package/dist/test-logic.js +0 -1
- package/dist/test-protocol.js +0 -1
- package/dist/toolchain-dx.d.ts +11 -0
- package/dist/toolchain-dx.js +10 -0
- package/dist/watch-diff.d.ts +4 -13
- package/dist/watch-diff.js +0 -17
- package/dist/wechat-packaging.d.ts +8 -7
- package/dist/wechat-packaging.js +0 -6
- package/locales/en-US/cli.json +105 -0
- package/locales/locales.json +4 -0
- package/package.json +15 -12
- package/dist/resolve-native-cli.d.ts +0 -14
- package/dist/resolve-native-cli.js +0 -84
package/dist/locale-runtime.d.ts
CHANGED
|
@@ -1,140 +1,145 @@
|
|
|
1
|
-
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
* direction?: string,
|
|
22
|
-
* generation?: number,
|
|
23
|
-
* }} opts
|
|
24
|
-
*/
|
|
25
|
-
export declare function buildApplicationContext(opts: any): {
|
|
1
|
+
/** Fixed negotiation priority. Host only supplies candidates. */
|
|
2
|
+
export declare function negotiateLocale(input: {
|
|
3
|
+
supportedLocales: string[];
|
|
4
|
+
defaultLocale: string;
|
|
5
|
+
routeLocale?: string | null;
|
|
6
|
+
userChoice?: string | null;
|
|
7
|
+
preference?: string | null;
|
|
8
|
+
hostCandidates?: string[];
|
|
9
|
+
}): string;
|
|
10
|
+
export interface ApplicationContextOpts {
|
|
11
|
+
applicationId: string;
|
|
12
|
+
deliveryId: string;
|
|
13
|
+
localeId: string;
|
|
14
|
+
timeZone: string;
|
|
15
|
+
calendar?: string;
|
|
16
|
+
numberingSystem?: string;
|
|
17
|
+
direction?: string;
|
|
18
|
+
generation?: number;
|
|
19
|
+
}
|
|
20
|
+
export declare function buildApplicationContext(opts: ApplicationContextOpts): {
|
|
26
21
|
schema: string;
|
|
27
|
-
applicationId:
|
|
28
|
-
deliveryId:
|
|
29
|
-
localeId:
|
|
30
|
-
timeZone:
|
|
31
|
-
calendar:
|
|
32
|
-
numberingSystem:
|
|
33
|
-
direction:
|
|
34
|
-
generation:
|
|
22
|
+
applicationId: string;
|
|
23
|
+
deliveryId: string;
|
|
24
|
+
localeId: string;
|
|
25
|
+
timeZone: string;
|
|
26
|
+
calendar: string;
|
|
27
|
+
numberingSystem: string;
|
|
28
|
+
direction: string;
|
|
29
|
+
generation: number;
|
|
35
30
|
};
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
export declare function buildFormatterContext(app:
|
|
31
|
+
export type ApplicationContext = ReturnType<typeof buildApplicationContext>;
|
|
32
|
+
export interface FormatterContextOpts {
|
|
33
|
+
currency?: string;
|
|
34
|
+
}
|
|
35
|
+
export declare function buildFormatterContext(app: ApplicationContext, opts?: FormatterContextOpts): {
|
|
41
36
|
schema: string;
|
|
42
|
-
localeId:
|
|
43
|
-
timeZone:
|
|
44
|
-
calendar:
|
|
45
|
-
numberingSystem:
|
|
46
|
-
currency:
|
|
37
|
+
localeId: string;
|
|
38
|
+
timeZone: string;
|
|
39
|
+
calendar: string;
|
|
40
|
+
numberingSystem: string;
|
|
41
|
+
currency: string;
|
|
47
42
|
formatterDataVersion: string;
|
|
48
43
|
};
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
44
|
+
export type FormatterContext = ReturnType<typeof buildFormatterContext>;
|
|
45
|
+
/** Stable digest for Resume / SSR↔client parity. */
|
|
46
|
+
export declare function formatterContextDigest(formatter: FormatterContext): string;
|
|
47
|
+
export interface ValidateFormatterContextOpts {
|
|
48
|
+
allowMachineDefault?: boolean;
|
|
49
|
+
}
|
|
50
|
+
export interface LocaleDiagnostic {
|
|
51
|
+
code: string;
|
|
52
|
+
severity: string;
|
|
53
|
+
message: string;
|
|
54
|
+
}
|
|
55
|
+
/** Server must not read machine locale/timezone defaults. */
|
|
56
|
+
export declare function validateFormatterContext(formatter: FormatterContext, opts?: ValidateFormatterContextOpts): {
|
|
60
57
|
ok: boolean;
|
|
61
|
-
diagnostics:
|
|
58
|
+
diagnostics: LocaleDiagnostic[];
|
|
62
59
|
};
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
60
|
+
export interface MessageVariantInput {
|
|
61
|
+
template: string;
|
|
62
|
+
}
|
|
63
|
+
/** Resolve one MessageBinding to a single locale variant (whole-message, no mix). */
|
|
64
|
+
export declare function resolveMessageVariant(input: {
|
|
65
|
+
messageId: string;
|
|
66
|
+
requestedLocale: string;
|
|
67
|
+
variants: Record<string, MessageVariantInput>;
|
|
68
|
+
fallback?: Record<string, string[]>;
|
|
69
|
+
}): {
|
|
73
70
|
schema: string;
|
|
74
|
-
messageId:
|
|
75
|
-
requestedLocale:
|
|
76
|
-
resolvedLocale:
|
|
77
|
-
fallbackPath:
|
|
78
|
-
template:
|
|
71
|
+
messageId: string;
|
|
72
|
+
requestedLocale: string;
|
|
73
|
+
resolvedLocale: string;
|
|
74
|
+
fallbackPath: string[];
|
|
75
|
+
template: string;
|
|
79
76
|
ok: boolean;
|
|
80
77
|
};
|
|
81
78
|
/**
|
|
82
79
|
* Minimal ICU MessageFormat subset for parity proofs (params + plural + #).
|
|
83
|
-
* @param {string} template
|
|
84
|
-
* @param {Record<string, any>} [args]
|
|
85
80
|
*/
|
|
86
|
-
export declare function formatMessageTemplate(template:
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
81
|
+
export declare function formatMessageTemplate(template: string, args?: Record<string, unknown>): string;
|
|
82
|
+
export interface LocaleSessionOpts {
|
|
83
|
+
applicationId: string;
|
|
84
|
+
deliveryId: string;
|
|
85
|
+
supportedLocales: string[];
|
|
86
|
+
defaultLocale: string;
|
|
87
|
+
fallback?: Record<string, string[]>;
|
|
88
|
+
directions?: Record<string, string>;
|
|
89
|
+
messages: Record<string, {
|
|
90
|
+
variants: Record<string, {
|
|
91
|
+
template: string;
|
|
92
|
+
}>;
|
|
93
|
+
}>;
|
|
94
|
+
initialLocaleId: string;
|
|
95
|
+
timeZone: string;
|
|
96
|
+
generation?: number;
|
|
97
|
+
loadedChunks?: Set<string> | string[];
|
|
98
|
+
}
|
|
99
|
+
export interface LocaleTransitionOpts {
|
|
100
|
+
generation?: number;
|
|
101
|
+
loadChunk?: (localeId: string) => boolean | Promise<boolean>;
|
|
102
|
+
timeZone?: string;
|
|
103
|
+
}
|
|
104
|
+
export declare function createLocaleSession(opts: LocaleSessionOpts): {
|
|
103
105
|
negotiateLocale: typeof negotiateLocale;
|
|
104
106
|
snapshot: () => {
|
|
105
107
|
applicationContext: {
|
|
106
108
|
schema: string;
|
|
107
|
-
applicationId:
|
|
108
|
-
deliveryId:
|
|
109
|
-
localeId:
|
|
110
|
-
timeZone:
|
|
111
|
-
calendar:
|
|
112
|
-
numberingSystem:
|
|
113
|
-
direction:
|
|
114
|
-
generation:
|
|
109
|
+
applicationId: string;
|
|
110
|
+
deliveryId: string;
|
|
111
|
+
localeId: string;
|
|
112
|
+
timeZone: string;
|
|
113
|
+
calendar: string;
|
|
114
|
+
numberingSystem: string;
|
|
115
|
+
direction: string;
|
|
116
|
+
generation: number;
|
|
115
117
|
};
|
|
116
118
|
formatterContext: {
|
|
117
119
|
schema: string;
|
|
118
|
-
localeId:
|
|
119
|
-
timeZone:
|
|
120
|
-
calendar:
|
|
121
|
-
numberingSystem:
|
|
122
|
-
currency:
|
|
120
|
+
localeId: string;
|
|
121
|
+
timeZone: string;
|
|
122
|
+
calendar: string;
|
|
123
|
+
numberingSystem: string;
|
|
124
|
+
currency: string;
|
|
123
125
|
formatterDataVersion: string;
|
|
124
126
|
};
|
|
125
127
|
formatterDigest: string;
|
|
126
|
-
loadedChunks:
|
|
127
|
-
generation:
|
|
128
|
+
loadedChunks: string[];
|
|
129
|
+
generation: number;
|
|
128
130
|
};
|
|
129
|
-
renderAll: (argMap?:
|
|
130
|
-
bindings: {
|
|
131
|
-
|
|
131
|
+
renderAll: (argMap?: Record<string, Record<string, unknown>>) => {
|
|
132
|
+
bindings: Record<string, {
|
|
133
|
+
text: string;
|
|
134
|
+
resolvedLocale: string;
|
|
135
|
+
}>;
|
|
136
|
+
resolvedLocales: string[];
|
|
132
137
|
};
|
|
133
|
-
transition: (targetLocaleId:
|
|
138
|
+
transition: (targetLocaleId: string, transitionOpts?: LocaleTransitionOpts) => Promise<{
|
|
134
139
|
schema: string;
|
|
135
140
|
status: string;
|
|
136
|
-
fromLocale:
|
|
137
|
-
toLocale:
|
|
141
|
+
fromLocale: string;
|
|
142
|
+
toLocale: string;
|
|
138
143
|
reason: string;
|
|
139
144
|
diagnostics: {
|
|
140
145
|
code: string;
|
|
@@ -144,174 +149,196 @@ export declare function createLocaleSession(opts: any): {
|
|
|
144
149
|
snapshot: {
|
|
145
150
|
applicationContext: {
|
|
146
151
|
schema: string;
|
|
147
|
-
applicationId:
|
|
148
|
-
deliveryId:
|
|
149
|
-
localeId:
|
|
150
|
-
timeZone:
|
|
151
|
-
calendar:
|
|
152
|
-
numberingSystem:
|
|
153
|
-
direction:
|
|
154
|
-
generation:
|
|
152
|
+
applicationId: string;
|
|
153
|
+
deliveryId: string;
|
|
154
|
+
localeId: string;
|
|
155
|
+
timeZone: string;
|
|
156
|
+
calendar: string;
|
|
157
|
+
numberingSystem: string;
|
|
158
|
+
direction: string;
|
|
159
|
+
generation: number;
|
|
155
160
|
};
|
|
156
161
|
formatterContext: {
|
|
157
162
|
schema: string;
|
|
158
|
-
localeId:
|
|
159
|
-
timeZone:
|
|
160
|
-
calendar:
|
|
161
|
-
numberingSystem:
|
|
162
|
-
currency:
|
|
163
|
+
localeId: string;
|
|
164
|
+
timeZone: string;
|
|
165
|
+
calendar: string;
|
|
166
|
+
numberingSystem: string;
|
|
167
|
+
currency: string;
|
|
163
168
|
formatterDataVersion: string;
|
|
164
169
|
};
|
|
165
170
|
formatterDigest: string;
|
|
166
|
-
loadedChunks:
|
|
167
|
-
generation:
|
|
171
|
+
loadedChunks: string[];
|
|
172
|
+
generation: number;
|
|
168
173
|
};
|
|
169
174
|
rendered?: undefined;
|
|
170
175
|
} | {
|
|
171
176
|
schema: string;
|
|
172
177
|
status: string;
|
|
173
|
-
fromLocale:
|
|
174
|
-
toLocale:
|
|
178
|
+
fromLocale: string;
|
|
179
|
+
toLocale: string;
|
|
175
180
|
reason: string;
|
|
176
|
-
diagnostics:
|
|
181
|
+
diagnostics: LocaleDiagnostic[];
|
|
177
182
|
snapshot: {
|
|
178
183
|
applicationContext: {
|
|
179
184
|
schema: string;
|
|
180
|
-
applicationId:
|
|
181
|
-
deliveryId:
|
|
182
|
-
localeId:
|
|
183
|
-
timeZone:
|
|
184
|
-
calendar:
|
|
185
|
-
numberingSystem:
|
|
186
|
-
direction:
|
|
187
|
-
generation:
|
|
185
|
+
applicationId: string;
|
|
186
|
+
deliveryId: string;
|
|
187
|
+
localeId: string;
|
|
188
|
+
timeZone: string;
|
|
189
|
+
calendar: string;
|
|
190
|
+
numberingSystem: string;
|
|
191
|
+
direction: string;
|
|
192
|
+
generation: number;
|
|
188
193
|
};
|
|
189
194
|
formatterContext: {
|
|
190
195
|
schema: string;
|
|
191
|
-
localeId:
|
|
192
|
-
timeZone:
|
|
193
|
-
calendar:
|
|
194
|
-
numberingSystem:
|
|
195
|
-
currency:
|
|
196
|
+
localeId: string;
|
|
197
|
+
timeZone: string;
|
|
198
|
+
calendar: string;
|
|
199
|
+
numberingSystem: string;
|
|
200
|
+
currency: string;
|
|
196
201
|
formatterDataVersion: string;
|
|
197
202
|
};
|
|
198
203
|
formatterDigest: string;
|
|
199
|
-
loadedChunks:
|
|
200
|
-
generation:
|
|
204
|
+
loadedChunks: string[];
|
|
205
|
+
generation: number;
|
|
201
206
|
};
|
|
202
207
|
rendered: {
|
|
203
|
-
bindings: {
|
|
204
|
-
|
|
208
|
+
bindings: Record<string, {
|
|
209
|
+
text: string;
|
|
210
|
+
resolvedLocale: string;
|
|
211
|
+
}>;
|
|
212
|
+
resolvedLocales: string[];
|
|
205
213
|
};
|
|
206
214
|
}>;
|
|
207
215
|
readonly applicationContext: {
|
|
208
216
|
schema: string;
|
|
209
|
-
applicationId:
|
|
210
|
-
deliveryId:
|
|
211
|
-
localeId:
|
|
212
|
-
timeZone:
|
|
213
|
-
calendar:
|
|
214
|
-
numberingSystem:
|
|
215
|
-
direction:
|
|
216
|
-
generation:
|
|
217
|
+
applicationId: string;
|
|
218
|
+
deliveryId: string;
|
|
219
|
+
localeId: string;
|
|
220
|
+
timeZone: string;
|
|
221
|
+
calendar: string;
|
|
222
|
+
numberingSystem: string;
|
|
223
|
+
direction: string;
|
|
224
|
+
generation: number;
|
|
217
225
|
};
|
|
218
226
|
readonly formatterContext: {
|
|
219
227
|
schema: string;
|
|
220
|
-
localeId:
|
|
221
|
-
timeZone:
|
|
222
|
-
calendar:
|
|
223
|
-
numberingSystem:
|
|
224
|
-
currency:
|
|
228
|
+
localeId: string;
|
|
229
|
+
timeZone: string;
|
|
230
|
+
calendar: string;
|
|
231
|
+
numberingSystem: string;
|
|
232
|
+
currency: string;
|
|
225
233
|
formatterDataVersion: string;
|
|
226
234
|
};
|
|
227
235
|
readonly formatterDigest: string;
|
|
228
236
|
};
|
|
229
|
-
/**
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
+
/** SSR and client must share the same resolved FormatterContext digest and texts. */
|
|
238
|
+
export declare function checkSsrClientParity(input: {
|
|
239
|
+
ssr: {
|
|
240
|
+
localeId: string;
|
|
241
|
+
formatterDigest: string;
|
|
242
|
+
formatterDataVersion?: string;
|
|
243
|
+
texts: Record<string, string>;
|
|
244
|
+
};
|
|
245
|
+
client: {
|
|
246
|
+
localeId: string;
|
|
247
|
+
formatterDigest: string;
|
|
248
|
+
formatterDataVersion?: string;
|
|
249
|
+
texts: Record<string, string>;
|
|
250
|
+
};
|
|
251
|
+
}): {
|
|
237
252
|
schema: string;
|
|
238
253
|
status: string;
|
|
239
254
|
kind: string;
|
|
240
|
-
diagnostics:
|
|
255
|
+
diagnostics: LocaleDiagnostic[];
|
|
241
256
|
};
|
|
242
|
-
/**
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
257
|
+
/** Aggregate runtime proof for a project check report + explicit contexts. */
|
|
258
|
+
export declare function checkLocaleRuntime(input: {
|
|
259
|
+
manifest: {
|
|
260
|
+
defaultLocale: string;
|
|
261
|
+
locales: Array<{
|
|
262
|
+
id: string;
|
|
263
|
+
direction?: string;
|
|
264
|
+
}>;
|
|
265
|
+
fallback?: Record<string, string[]>;
|
|
266
|
+
};
|
|
267
|
+
messages: Array<{
|
|
268
|
+
messageId: string;
|
|
269
|
+
variants: Record<string, {
|
|
270
|
+
template: string;
|
|
271
|
+
}>;
|
|
272
|
+
}>;
|
|
273
|
+
applicationId?: string;
|
|
274
|
+
deliveryId?: string;
|
|
275
|
+
timeZone?: string;
|
|
276
|
+
}): {
|
|
253
277
|
schema: string;
|
|
254
278
|
status: string;
|
|
255
|
-
negotiatedLocale:
|
|
279
|
+
negotiatedLocale: string;
|
|
256
280
|
applicationContext: {
|
|
257
281
|
schema: string;
|
|
258
|
-
applicationId:
|
|
259
|
-
deliveryId:
|
|
260
|
-
localeId:
|
|
261
|
-
timeZone:
|
|
262
|
-
calendar:
|
|
263
|
-
numberingSystem:
|
|
264
|
-
direction:
|
|
265
|
-
generation:
|
|
282
|
+
applicationId: string;
|
|
283
|
+
deliveryId: string;
|
|
284
|
+
localeId: string;
|
|
285
|
+
timeZone: string;
|
|
286
|
+
calendar: string;
|
|
287
|
+
numberingSystem: string;
|
|
288
|
+
direction: string;
|
|
289
|
+
generation: number;
|
|
266
290
|
};
|
|
267
291
|
formatterContext: {
|
|
268
292
|
schema: string;
|
|
269
|
-
localeId:
|
|
270
|
-
timeZone:
|
|
271
|
-
calendar:
|
|
272
|
-
numberingSystem:
|
|
273
|
-
currency:
|
|
293
|
+
localeId: string;
|
|
294
|
+
timeZone: string;
|
|
295
|
+
calendar: string;
|
|
296
|
+
numberingSystem: string;
|
|
297
|
+
currency: string;
|
|
274
298
|
formatterDataVersion: string;
|
|
275
299
|
};
|
|
276
300
|
formatterDigest: string;
|
|
277
301
|
formatterDataVersion: string;
|
|
278
|
-
diagnostics:
|
|
302
|
+
diagnostics: LocaleDiagnostic[];
|
|
279
303
|
session: {
|
|
280
304
|
negotiateLocale: typeof negotiateLocale;
|
|
281
305
|
snapshot: () => {
|
|
282
306
|
applicationContext: {
|
|
283
307
|
schema: string;
|
|
284
|
-
applicationId:
|
|
285
|
-
deliveryId:
|
|
286
|
-
localeId:
|
|
287
|
-
timeZone:
|
|
288
|
-
calendar:
|
|
289
|
-
numberingSystem:
|
|
290
|
-
direction:
|
|
291
|
-
generation:
|
|
308
|
+
applicationId: string;
|
|
309
|
+
deliveryId: string;
|
|
310
|
+
localeId: string;
|
|
311
|
+
timeZone: string;
|
|
312
|
+
calendar: string;
|
|
313
|
+
numberingSystem: string;
|
|
314
|
+
direction: string;
|
|
315
|
+
generation: number;
|
|
292
316
|
};
|
|
293
317
|
formatterContext: {
|
|
294
318
|
schema: string;
|
|
295
|
-
localeId:
|
|
296
|
-
timeZone:
|
|
297
|
-
calendar:
|
|
298
|
-
numberingSystem:
|
|
299
|
-
currency:
|
|
319
|
+
localeId: string;
|
|
320
|
+
timeZone: string;
|
|
321
|
+
calendar: string;
|
|
322
|
+
numberingSystem: string;
|
|
323
|
+
currency: string;
|
|
300
324
|
formatterDataVersion: string;
|
|
301
325
|
};
|
|
302
326
|
formatterDigest: string;
|
|
303
|
-
loadedChunks:
|
|
304
|
-
generation:
|
|
327
|
+
loadedChunks: string[];
|
|
328
|
+
generation: number;
|
|
305
329
|
};
|
|
306
|
-
renderAll: (argMap?:
|
|
307
|
-
bindings: {
|
|
308
|
-
|
|
330
|
+
renderAll: (argMap?: Record<string, Record<string, unknown>>) => {
|
|
331
|
+
bindings: Record<string, {
|
|
332
|
+
text: string;
|
|
333
|
+
resolvedLocale: string;
|
|
334
|
+
}>;
|
|
335
|
+
resolvedLocales: string[];
|
|
309
336
|
};
|
|
310
|
-
transition: (targetLocaleId:
|
|
337
|
+
transition: (targetLocaleId: string, transitionOpts?: LocaleTransitionOpts) => Promise<{
|
|
311
338
|
schema: string;
|
|
312
339
|
status: string;
|
|
313
|
-
fromLocale:
|
|
314
|
-
toLocale:
|
|
340
|
+
fromLocale: string;
|
|
341
|
+
toLocale: string;
|
|
315
342
|
reason: string;
|
|
316
343
|
diagnostics: {
|
|
317
344
|
code: string;
|
|
@@ -321,84 +348,87 @@ export declare function checkLocaleRuntime(input: any): {
|
|
|
321
348
|
snapshot: {
|
|
322
349
|
applicationContext: {
|
|
323
350
|
schema: string;
|
|
324
|
-
applicationId:
|
|
325
|
-
deliveryId:
|
|
326
|
-
localeId:
|
|
327
|
-
timeZone:
|
|
328
|
-
calendar:
|
|
329
|
-
numberingSystem:
|
|
330
|
-
direction:
|
|
331
|
-
generation:
|
|
351
|
+
applicationId: string;
|
|
352
|
+
deliveryId: string;
|
|
353
|
+
localeId: string;
|
|
354
|
+
timeZone: string;
|
|
355
|
+
calendar: string;
|
|
356
|
+
numberingSystem: string;
|
|
357
|
+
direction: string;
|
|
358
|
+
generation: number;
|
|
332
359
|
};
|
|
333
360
|
formatterContext: {
|
|
334
361
|
schema: string;
|
|
335
|
-
localeId:
|
|
336
|
-
timeZone:
|
|
337
|
-
calendar:
|
|
338
|
-
numberingSystem:
|
|
339
|
-
currency:
|
|
362
|
+
localeId: string;
|
|
363
|
+
timeZone: string;
|
|
364
|
+
calendar: string;
|
|
365
|
+
numberingSystem: string;
|
|
366
|
+
currency: string;
|
|
340
367
|
formatterDataVersion: string;
|
|
341
368
|
};
|
|
342
369
|
formatterDigest: string;
|
|
343
|
-
loadedChunks:
|
|
344
|
-
generation:
|
|
370
|
+
loadedChunks: string[];
|
|
371
|
+
generation: number;
|
|
345
372
|
};
|
|
346
373
|
rendered?: undefined;
|
|
347
374
|
} | {
|
|
348
375
|
schema: string;
|
|
349
376
|
status: string;
|
|
350
|
-
fromLocale:
|
|
351
|
-
toLocale:
|
|
377
|
+
fromLocale: string;
|
|
378
|
+
toLocale: string;
|
|
352
379
|
reason: string;
|
|
353
|
-
diagnostics:
|
|
380
|
+
diagnostics: LocaleDiagnostic[];
|
|
354
381
|
snapshot: {
|
|
355
382
|
applicationContext: {
|
|
356
383
|
schema: string;
|
|
357
|
-
applicationId:
|
|
358
|
-
deliveryId:
|
|
359
|
-
localeId:
|
|
360
|
-
timeZone:
|
|
361
|
-
calendar:
|
|
362
|
-
numberingSystem:
|
|
363
|
-
direction:
|
|
364
|
-
generation:
|
|
384
|
+
applicationId: string;
|
|
385
|
+
deliveryId: string;
|
|
386
|
+
localeId: string;
|
|
387
|
+
timeZone: string;
|
|
388
|
+
calendar: string;
|
|
389
|
+
numberingSystem: string;
|
|
390
|
+
direction: string;
|
|
391
|
+
generation: number;
|
|
365
392
|
};
|
|
366
393
|
formatterContext: {
|
|
367
394
|
schema: string;
|
|
368
|
-
localeId:
|
|
369
|
-
timeZone:
|
|
370
|
-
calendar:
|
|
371
|
-
numberingSystem:
|
|
372
|
-
currency:
|
|
395
|
+
localeId: string;
|
|
396
|
+
timeZone: string;
|
|
397
|
+
calendar: string;
|
|
398
|
+
numberingSystem: string;
|
|
399
|
+
currency: string;
|
|
373
400
|
formatterDataVersion: string;
|
|
374
401
|
};
|
|
375
402
|
formatterDigest: string;
|
|
376
|
-
loadedChunks:
|
|
377
|
-
generation:
|
|
403
|
+
loadedChunks: string[];
|
|
404
|
+
generation: number;
|
|
378
405
|
};
|
|
379
406
|
rendered: {
|
|
380
|
-
bindings: {
|
|
381
|
-
|
|
407
|
+
bindings: Record<string, {
|
|
408
|
+
text: string;
|
|
409
|
+
resolvedLocale: string;
|
|
410
|
+
}>;
|
|
411
|
+
resolvedLocales: string[];
|
|
382
412
|
};
|
|
383
413
|
}>;
|
|
384
414
|
readonly applicationContext: {
|
|
385
415
|
schema: string;
|
|
386
|
-
applicationId:
|
|
387
|
-
deliveryId:
|
|
388
|
-
localeId:
|
|
389
|
-
timeZone:
|
|
390
|
-
calendar:
|
|
391
|
-
numberingSystem:
|
|
392
|
-
direction:
|
|
393
|
-
generation:
|
|
416
|
+
applicationId: string;
|
|
417
|
+
deliveryId: string;
|
|
418
|
+
localeId: string;
|
|
419
|
+
timeZone: string;
|
|
420
|
+
calendar: string;
|
|
421
|
+
numberingSystem: string;
|
|
422
|
+
direction: string;
|
|
423
|
+
generation: number;
|
|
394
424
|
};
|
|
395
425
|
readonly formatterContext: {
|
|
396
426
|
schema: string;
|
|
397
|
-
localeId:
|
|
398
|
-
timeZone:
|
|
399
|
-
calendar:
|
|
400
|
-
numberingSystem:
|
|
401
|
-
currency:
|
|
427
|
+
localeId: string;
|
|
428
|
+
timeZone: string;
|
|
429
|
+
calendar: string;
|
|
430
|
+
numberingSystem: string;
|
|
431
|
+
currency: string;
|
|
402
432
|
formatterDataVersion: string;
|
|
403
433
|
};
|
|
404
434
|
readonly formatterDigest: string;
|