@vmz/vmz 0.0.0 → 0.0.2
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/README.md +48 -2
- package/bin/vmz.js +4 -0
- package/dist/application-cmd.d.ts +22 -0
- package/dist/application-cmd.js +348 -0
- package/dist/bundler-adapter.d.ts +64 -0
- package/dist/bundler-adapter.js +111 -0
- package/dist/cli.d.ts +15 -0
- package/dist/cli.js +370 -0
- package/dist/dev-session.d.ts +35 -0
- package/dist/dev-session.js +290 -0
- package/dist/document-build.d.ts +99 -0
- package/dist/document-build.js +274 -0
- package/dist/document-check.d.ts +44 -0
- package/dist/document-check.js +246 -0
- package/dist/document-cmd.d.ts +9 -0
- package/dist/document-cmd.js +147 -0
- package/dist/document-designs.d.ts +9 -0
- package/dist/document-designs.js +126 -0
- package/dist/document-enrich.d.ts +23 -0
- package/dist/document-enrich.js +234 -0
- package/dist/document-evidence.d.ts +49 -0
- package/dist/document-evidence.js +501 -0
- package/dist/document-integrate.d.ts +35 -0
- package/dist/document-integrate.js +89 -0
- package/dist/document-interactive.d.ts +69 -0
- package/dist/document-interactive.js +255 -0
- package/dist/document-locale.d.ts +31 -0
- package/dist/document-locale.js +59 -0
- package/dist/document-markdown.d.ts +13 -0
- package/dist/document-markdown.js +39 -0
- package/dist/document-scan.d.ts +21 -0
- package/dist/document-scan.js +151 -0
- package/dist/document-schema.d.ts +87 -0
- package/dist/document-schema.js +88 -0
- package/dist/explain-cmd.d.ts +5 -0
- package/dist/explain-cmd.js +123 -0
- package/dist/index.d.ts +808 -0
- package/dist/index.js +569 -0
- package/dist/locale-check.d.ts +106 -0
- package/dist/locale-check.js +737 -0
- package/dist/locale-cmd.d.ts +5 -0
- package/dist/locale-cmd.js +443 -0
- package/dist/locale-delivery.d.ts +298 -0
- package/dist/locale-delivery.js +444 -0
- package/dist/locale-router.d.ts +207 -0
- package/dist/locale-router.js +508 -0
- package/dist/locale-runtime.d.ts +406 -0
- package/dist/locale-runtime.js +542 -0
- package/dist/locale-schema.d.ts +9 -0
- package/dist/locale-schema.js +10 -0
- package/dist/locale-tooling.d.ts +118 -0
- package/dist/locale-tooling.js +358 -0
- package/dist/log.d.ts +19 -0
- package/dist/log.js +42 -0
- package/dist/packages.d.ts +27 -0
- package/dist/packages.js +147 -0
- package/dist/plugin-host.d.ts +30 -0
- package/dist/plugin-host.js +370 -0
- package/dist/refactor-cmd.d.ts +8 -0
- package/dist/refactor-cmd.js +156 -0
- package/dist/resolve.d.ts +25 -0
- package/dist/resolve.js +56 -0
- package/dist/test-cmd.d.ts +9 -0
- package/dist/test-cmd.js +343 -0
- package/dist/test-compile.d.ts +2 -0
- package/dist/test-compile.js +3 -0
- package/dist/test-discover.d.ts +2 -0
- package/dist/test-discover.js +3 -0
- package/dist/test-logic.d.ts +2 -0
- package/dist/test-logic.js +3 -0
- package/dist/test-protocol.d.ts +2 -0
- package/dist/test-protocol.js +3 -0
- package/dist/watch-diff.d.ts +17 -0
- package/dist/watch-diff.js +56 -0
- package/package.json +86 -4
|
@@ -0,0 +1,298 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param {Record<string, string[]>} [fallback]
|
|
3
|
+
*/
|
|
4
|
+
export declare function fallbackDigest(fallback?: {}): string;
|
|
5
|
+
/**
|
|
6
|
+
* Hash reachable message variants for one locale.
|
|
7
|
+
* @param {Array<{ messageId: string, variants: Record<string, { template: string }> }>} messages
|
|
8
|
+
* @param {string} localeId
|
|
9
|
+
* @param {string[]} [reachableIds]
|
|
10
|
+
*/
|
|
11
|
+
export declare function messageCatalogHash(messages: any, localeId: any, reachableIds: any): string;
|
|
12
|
+
/**
|
|
13
|
+
* Build LocaleDeliveryResolution for one Host surface.
|
|
14
|
+
* @param {{
|
|
15
|
+
* host: 'web'|'mini'|'native'|'server',
|
|
16
|
+
* applicationId: string,
|
|
17
|
+
* deliveryId: string,
|
|
18
|
+
* planVersion?: string,
|
|
19
|
+
* supportedLocales: string[],
|
|
20
|
+
* defaultLocale: string,
|
|
21
|
+
* fallback?: Record<string, string[]>,
|
|
22
|
+
* routingRealization?: unknown,
|
|
23
|
+
* messages: Array<{ messageId: string, variants: Record<string, { template: string }> }>,
|
|
24
|
+
* reachableMessageIds?: string[],
|
|
25
|
+
* bundledLocales?: string[],
|
|
26
|
+
* allowFullClientBundle?: boolean,
|
|
27
|
+
* }} input
|
|
28
|
+
*/
|
|
29
|
+
export declare function buildLocaleDeliveryResolution(input: any): {
|
|
30
|
+
schema: string;
|
|
31
|
+
status: string;
|
|
32
|
+
host: any;
|
|
33
|
+
applicationId: any;
|
|
34
|
+
deliveryId: any;
|
|
35
|
+
planVersion: any;
|
|
36
|
+
supportedLocales: any[];
|
|
37
|
+
defaultLocale: any;
|
|
38
|
+
fallbackDigest: string;
|
|
39
|
+
routingRealization: any;
|
|
40
|
+
bundledLocales: any[];
|
|
41
|
+
lazyLocaleChunks: any[];
|
|
42
|
+
bundledChunks: {
|
|
43
|
+
schema: string;
|
|
44
|
+
localeId: any;
|
|
45
|
+
host: any;
|
|
46
|
+
messageIds: any;
|
|
47
|
+
hash: any;
|
|
48
|
+
kind: string;
|
|
49
|
+
}[];
|
|
50
|
+
formatterDataVersion: string;
|
|
51
|
+
messageCatalogHashes: {};
|
|
52
|
+
reachableMessageIds: any;
|
|
53
|
+
diagnostics: any[];
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Validate a Native optional locale pack (signed, no JS, bound to app/plan/schema).
|
|
57
|
+
* @param {{
|
|
58
|
+
* pack: {
|
|
59
|
+
* schema?: string,
|
|
60
|
+
* applicationId: string,
|
|
61
|
+
* planVersion: string,
|
|
62
|
+
* localeId: string,
|
|
63
|
+
* signature?: string,
|
|
64
|
+
* catalog?: Record<string, string>,
|
|
65
|
+
* formatterDataVersion?: string,
|
|
66
|
+
* entries?: Array<{ path: string, kind?: string }>,
|
|
67
|
+
* executable?: boolean,
|
|
68
|
+
* },
|
|
69
|
+
* expectedApplicationId: string,
|
|
70
|
+
* expectedPlanVersion: string,
|
|
71
|
+
* }} input
|
|
72
|
+
*/
|
|
73
|
+
export declare function validateNativeLocalePack(input: any): {
|
|
74
|
+
schema: string;
|
|
75
|
+
status: string;
|
|
76
|
+
localeId: any;
|
|
77
|
+
diagnostics: any[];
|
|
78
|
+
pack: {
|
|
79
|
+
schema: string;
|
|
80
|
+
applicationId: any;
|
|
81
|
+
planVersion: any;
|
|
82
|
+
localeId: any;
|
|
83
|
+
signature: any;
|
|
84
|
+
formatterDataVersion: any;
|
|
85
|
+
catalogKeys: string[];
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* Mini cross-subpackage message dependencies must be proven.
|
|
90
|
+
* @param {{
|
|
91
|
+
* packages: Array<{ id: string, messageIds: string[] }>,
|
|
92
|
+
* edges: Array<{ fromPackage: string, toPackage: string, messageId: string }>,
|
|
93
|
+
* }} input
|
|
94
|
+
*/
|
|
95
|
+
export declare function proveMiniPackageMessages(input: any): {
|
|
96
|
+
schema: string;
|
|
97
|
+
status: string;
|
|
98
|
+
proven: any[];
|
|
99
|
+
diagnostics: any[];
|
|
100
|
+
};
|
|
101
|
+
/**
|
|
102
|
+
* Server/client boundary: ErrorCode + params only (no translated strings).
|
|
103
|
+
* @param {any} payload
|
|
104
|
+
*/
|
|
105
|
+
export declare function assertServerErrorEnvelope(payload: any): {
|
|
106
|
+
schema: string;
|
|
107
|
+
status: string;
|
|
108
|
+
diagnostics: any[];
|
|
109
|
+
envelope?: undefined;
|
|
110
|
+
} | {
|
|
111
|
+
schema: string;
|
|
112
|
+
status: string;
|
|
113
|
+
envelope: {
|
|
114
|
+
schema: string;
|
|
115
|
+
code: any;
|
|
116
|
+
params: any;
|
|
117
|
+
};
|
|
118
|
+
diagnostics: any[];
|
|
119
|
+
};
|
|
120
|
+
/**
|
|
121
|
+
* Final-user server formatting (mail/export/push) requires explicit LocaleContext.
|
|
122
|
+
* @param {{ localeContext?: { localeId?: string, timeZone?: string }|null, purpose: string }} input
|
|
123
|
+
*/
|
|
124
|
+
export declare function assertServerFormatContext(input: any): {
|
|
125
|
+
ok: boolean;
|
|
126
|
+
diagnostics: any[];
|
|
127
|
+
};
|
|
128
|
+
/**
|
|
129
|
+
* Same MessageId / catalog hashes must agree across Host projections.
|
|
130
|
+
* @param {Array<ReturnType<typeof buildLocaleDeliveryResolution>>} resolutions
|
|
131
|
+
*/
|
|
132
|
+
export declare function assertHostMessageInvariant(resolutions: any): {
|
|
133
|
+
ok: boolean;
|
|
134
|
+
diagnostics: any[];
|
|
135
|
+
};
|
|
136
|
+
/**
|
|
137
|
+
* Aggregate I4 delivery proof for fixture / CLI.
|
|
138
|
+
* @param {{
|
|
139
|
+
* manifest: {
|
|
140
|
+
* defaultLocale: string,
|
|
141
|
+
* locales: Array<{ id: string }>,
|
|
142
|
+
* fallback?: Record<string, string[]>,
|
|
143
|
+
* routing?: unknown,
|
|
144
|
+
* },
|
|
145
|
+
* messages: Array<{ messageId: string, variants: Record<string, { template: string }> }>,
|
|
146
|
+
* applicationId?: string,
|
|
147
|
+
* planVersion?: string,
|
|
148
|
+
* reachableMessageIds?: string[],
|
|
149
|
+
* }} input
|
|
150
|
+
*/
|
|
151
|
+
export declare function checkLocaleDelivery(input: any): {
|
|
152
|
+
schema: string;
|
|
153
|
+
status: string;
|
|
154
|
+
resolutions: {
|
|
155
|
+
web: {
|
|
156
|
+
schema: string;
|
|
157
|
+
status: string;
|
|
158
|
+
host: any;
|
|
159
|
+
applicationId: any;
|
|
160
|
+
deliveryId: any;
|
|
161
|
+
planVersion: any;
|
|
162
|
+
supportedLocales: any[];
|
|
163
|
+
defaultLocale: any;
|
|
164
|
+
fallbackDigest: string;
|
|
165
|
+
routingRealization: any;
|
|
166
|
+
bundledLocales: any[];
|
|
167
|
+
lazyLocaleChunks: any[];
|
|
168
|
+
bundledChunks: {
|
|
169
|
+
schema: string;
|
|
170
|
+
localeId: any;
|
|
171
|
+
host: any;
|
|
172
|
+
messageIds: any;
|
|
173
|
+
hash: any;
|
|
174
|
+
kind: string;
|
|
175
|
+
}[];
|
|
176
|
+
formatterDataVersion: string;
|
|
177
|
+
messageCatalogHashes: {};
|
|
178
|
+
reachableMessageIds: any;
|
|
179
|
+
diagnostics: any[];
|
|
180
|
+
};
|
|
181
|
+
mini: {
|
|
182
|
+
schema: string;
|
|
183
|
+
status: string;
|
|
184
|
+
host: any;
|
|
185
|
+
applicationId: any;
|
|
186
|
+
deliveryId: any;
|
|
187
|
+
planVersion: any;
|
|
188
|
+
supportedLocales: any[];
|
|
189
|
+
defaultLocale: any;
|
|
190
|
+
fallbackDigest: string;
|
|
191
|
+
routingRealization: any;
|
|
192
|
+
bundledLocales: any[];
|
|
193
|
+
lazyLocaleChunks: any[];
|
|
194
|
+
bundledChunks: {
|
|
195
|
+
schema: string;
|
|
196
|
+
localeId: any;
|
|
197
|
+
host: any;
|
|
198
|
+
messageIds: any;
|
|
199
|
+
hash: any;
|
|
200
|
+
kind: string;
|
|
201
|
+
}[];
|
|
202
|
+
formatterDataVersion: string;
|
|
203
|
+
messageCatalogHashes: {};
|
|
204
|
+
reachableMessageIds: any;
|
|
205
|
+
diagnostics: any[];
|
|
206
|
+
};
|
|
207
|
+
native: {
|
|
208
|
+
schema: string;
|
|
209
|
+
status: string;
|
|
210
|
+
host: any;
|
|
211
|
+
applicationId: any;
|
|
212
|
+
deliveryId: any;
|
|
213
|
+
planVersion: any;
|
|
214
|
+
supportedLocales: any[];
|
|
215
|
+
defaultLocale: any;
|
|
216
|
+
fallbackDigest: string;
|
|
217
|
+
routingRealization: any;
|
|
218
|
+
bundledLocales: any[];
|
|
219
|
+
lazyLocaleChunks: any[];
|
|
220
|
+
bundledChunks: {
|
|
221
|
+
schema: string;
|
|
222
|
+
localeId: any;
|
|
223
|
+
host: any;
|
|
224
|
+
messageIds: any;
|
|
225
|
+
hash: any;
|
|
226
|
+
kind: string;
|
|
227
|
+
}[];
|
|
228
|
+
formatterDataVersion: string;
|
|
229
|
+
messageCatalogHashes: {};
|
|
230
|
+
reachableMessageIds: any;
|
|
231
|
+
diagnostics: any[];
|
|
232
|
+
};
|
|
233
|
+
server: {
|
|
234
|
+
schema: string;
|
|
235
|
+
status: string;
|
|
236
|
+
host: any;
|
|
237
|
+
applicationId: any;
|
|
238
|
+
deliveryId: any;
|
|
239
|
+
planVersion: any;
|
|
240
|
+
supportedLocales: any[];
|
|
241
|
+
defaultLocale: any;
|
|
242
|
+
fallbackDigest: string;
|
|
243
|
+
routingRealization: any;
|
|
244
|
+
bundledLocales: any[];
|
|
245
|
+
lazyLocaleChunks: any[];
|
|
246
|
+
bundledChunks: {
|
|
247
|
+
schema: string;
|
|
248
|
+
localeId: any;
|
|
249
|
+
host: any;
|
|
250
|
+
messageIds: any;
|
|
251
|
+
hash: any;
|
|
252
|
+
kind: string;
|
|
253
|
+
}[];
|
|
254
|
+
formatterDataVersion: string;
|
|
255
|
+
messageCatalogHashes: {};
|
|
256
|
+
reachableMessageIds: any;
|
|
257
|
+
diagnostics: any[];
|
|
258
|
+
};
|
|
259
|
+
};
|
|
260
|
+
nativePackProbe: {
|
|
261
|
+
schema: string;
|
|
262
|
+
status: string;
|
|
263
|
+
localeId: any;
|
|
264
|
+
diagnostics: any[];
|
|
265
|
+
pack: {
|
|
266
|
+
schema: string;
|
|
267
|
+
applicationId: any;
|
|
268
|
+
planVersion: any;
|
|
269
|
+
localeId: any;
|
|
270
|
+
signature: any;
|
|
271
|
+
formatterDataVersion: any;
|
|
272
|
+
catalogKeys: string[];
|
|
273
|
+
};
|
|
274
|
+
};
|
|
275
|
+
miniPackageProof: {
|
|
276
|
+
schema: string;
|
|
277
|
+
status: string;
|
|
278
|
+
proven: any[];
|
|
279
|
+
diagnostics: any[];
|
|
280
|
+
};
|
|
281
|
+
serverErrorEnvelope: {
|
|
282
|
+
schema: string;
|
|
283
|
+
status: string;
|
|
284
|
+
diagnostics: any[];
|
|
285
|
+
envelope?: undefined;
|
|
286
|
+
} | {
|
|
287
|
+
schema: string;
|
|
288
|
+
status: string;
|
|
289
|
+
envelope: {
|
|
290
|
+
schema: string;
|
|
291
|
+
code: any;
|
|
292
|
+
params: any;
|
|
293
|
+
};
|
|
294
|
+
diagnostics: any[];
|
|
295
|
+
};
|
|
296
|
+
formatterDataVersion: string;
|
|
297
|
+
diagnostics: any[];
|
|
298
|
+
};
|