@x18n/core 0.0.2 → 0.0.5

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/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@x18n/core",
3
3
  "type": "module",
4
- "version": "0.0.2",
4
+ "version": "0.0.5",
5
5
  "description": "Runtime-neutral engine of x18n: domain model, plugin API and project analysis",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
8
- "homepage": "https://github.com/antfu/x18n#readme",
8
+ "homepage": "https://github.com/x18n-dev/x18n#readme",
9
9
  "repository": {
10
10
  "type": "git",
11
- "url": "git+https://github.com/antfu/x18n.git",
11
+ "url": "git+https://github.com/x18n-dev/x18n.git",
12
12
  "directory": "packages/core"
13
13
  },
14
- "bugs": "https://github.com/antfu/x18n/issues",
14
+ "bugs": "https://github.com/x18n-dev/x18n/issues",
15
15
  "sideEffects": false,
16
16
  "exports": {
17
17
  ".": "./dist/index.mjs",
@@ -0,0 +1,561 @@
1
+ {
2
+ "type": "object",
3
+ "properties": {
4
+ "$schema": {
5
+ "type": "string"
6
+ },
7
+ "root": {
8
+ "type": "string"
9
+ },
10
+ "name": {
11
+ "type": "string"
12
+ },
13
+ "sourceLocale": {
14
+ "type": "string"
15
+ },
16
+ "locales": {
17
+ "type": "array",
18
+ "items": {
19
+ "type": "string"
20
+ }
21
+ },
22
+ "ignoreLocales": {
23
+ "type": "array",
24
+ "items": {
25
+ "type": "string"
26
+ }
27
+ },
28
+ "presets": {
29
+ "anyOf": [
30
+ {
31
+ "const": "auto"
32
+ },
33
+ {
34
+ "type": "array",
35
+ "items": {
36
+ "anyOf": [
37
+ {
38
+ "type": "string"
39
+ },
40
+ {
41
+ "type": "array",
42
+ "items": [
43
+ {
44
+ "type": "string"
45
+ },
46
+ {
47
+ "type": "object"
48
+ }
49
+ ],
50
+ "minItems": 2
51
+ }
52
+ ]
53
+ }
54
+ }
55
+ ]
56
+ },
57
+ "plugins": {
58
+ "type": "array",
59
+ "items": {
60
+ "anyOf": [
61
+ {
62
+ "type": "string"
63
+ },
64
+ {
65
+ "type": "array",
66
+ "items": [
67
+ {
68
+ "type": "string"
69
+ },
70
+ {
71
+ "type": "object"
72
+ }
73
+ ],
74
+ "minItems": 2
75
+ }
76
+ ]
77
+ }
78
+ },
79
+ "resources": {
80
+ "type": "array",
81
+ "items": {
82
+ "type": "object",
83
+ "properties": {
84
+ "pattern": {
85
+ "type": "string"
86
+ },
87
+ "format": {
88
+ "type": "string"
89
+ },
90
+ "namespace": {
91
+ "type": "string"
92
+ },
93
+ "locale": {
94
+ "type": "string"
95
+ },
96
+ "execute": {
97
+ "type": "boolean"
98
+ }
99
+ },
100
+ "required": [
101
+ "pattern"
102
+ ],
103
+ "additionalProperties": false
104
+ }
105
+ },
106
+ "formats": {
107
+ "type": "object",
108
+ "propertyNames": {
109
+ "type": "string"
110
+ },
111
+ "additionalProperties": {
112
+ "type": "string"
113
+ }
114
+ },
115
+ "keyStyle": {
116
+ "enum": [
117
+ "auto",
118
+ "nested",
119
+ "flat"
120
+ ],
121
+ "type": "string"
122
+ },
123
+ "namespace": {
124
+ "type": "object",
125
+ "properties": {
126
+ "separator": {
127
+ "type": "string"
128
+ },
129
+ "default": {
130
+ "type": "string"
131
+ },
132
+ "fromPath": {
133
+ "enum": [
134
+ "dot",
135
+ "slash",
136
+ "camel"
137
+ ],
138
+ "type": "string"
139
+ }
140
+ },
141
+ "required": [],
142
+ "additionalProperties": false
143
+ },
144
+ "usage": {
145
+ "type": "object",
146
+ "properties": {
147
+ "include": {
148
+ "type": "array",
149
+ "items": {
150
+ "type": "string"
151
+ }
152
+ },
153
+ "exclude": {
154
+ "type": "array",
155
+ "items": {
156
+ "type": "string"
157
+ }
158
+ },
159
+ "calls": {
160
+ "type": "array",
161
+ "items": {
162
+ "type": "object",
163
+ "properties": {
164
+ "callee": {
165
+ "anyOf": [
166
+ {
167
+ "type": "string"
168
+ },
169
+ {
170
+ "type": "array",
171
+ "items": {
172
+ "type": "string"
173
+ }
174
+ }
175
+ ]
176
+ },
177
+ "kind": {
178
+ "enum": [
179
+ "call",
180
+ "selector",
181
+ "accessor"
182
+ ],
183
+ "type": "string"
184
+ },
185
+ "key": {
186
+ "anyOf": [
187
+ {
188
+ "type": "number"
189
+ },
190
+ {
191
+ "type": "object",
192
+ "properties": {
193
+ "arg": {
194
+ "type": "number"
195
+ },
196
+ "property": {
197
+ "type": "string"
198
+ }
199
+ },
200
+ "required": [
201
+ "arg"
202
+ ],
203
+ "additionalProperties": false
204
+ }
205
+ ]
206
+ },
207
+ "namespace": {
208
+ "type": "object",
209
+ "properties": {
210
+ "arg": {
211
+ "type": "number"
212
+ },
213
+ "property": {
214
+ "type": "string"
215
+ }
216
+ },
217
+ "required": [
218
+ "arg"
219
+ ],
220
+ "additionalProperties": false
221
+ },
222
+ "keyPrefix": {
223
+ "type": "object",
224
+ "properties": {
225
+ "arg": {
226
+ "type": "number"
227
+ },
228
+ "property": {
229
+ "type": "string"
230
+ }
231
+ },
232
+ "required": [
233
+ "arg"
234
+ ],
235
+ "additionalProperties": false
236
+ },
237
+ "factory": {
238
+ "type": "boolean"
239
+ },
240
+ "returns": {
241
+ "type": "array",
242
+ "items": {
243
+ "type": "string"
244
+ }
245
+ },
246
+ "types": {
247
+ "type": "array",
248
+ "items": {
249
+ "type": "string"
250
+ }
251
+ }
252
+ },
253
+ "required": [
254
+ "callee"
255
+ ],
256
+ "additionalProperties": false
257
+ }
258
+ },
259
+ "regex": {
260
+ "type": "array",
261
+ "items": {
262
+ "type": "object",
263
+ "properties": {
264
+ "extensions": {
265
+ "type": "array",
266
+ "items": {
267
+ "type": "string"
268
+ }
269
+ },
270
+ "patterns": {
271
+ "type": "array",
272
+ "items": {
273
+ "type": "string"
274
+ }
275
+ }
276
+ },
277
+ "required": [
278
+ "extensions",
279
+ "patterns"
280
+ ],
281
+ "additionalProperties": false
282
+ }
283
+ },
284
+ "ignoreCallees": {
285
+ "type": "array",
286
+ "items": {
287
+ "type": "string"
288
+ }
289
+ },
290
+ "keysInUse": {
291
+ "type": "array",
292
+ "items": {
293
+ "type": "string"
294
+ }
295
+ },
296
+ "derivedKeys": {
297
+ "type": "array",
298
+ "items": {
299
+ "type": "string"
300
+ }
301
+ }
302
+ },
303
+ "required": [],
304
+ "additionalProperties": false
305
+ },
306
+ "write": {
307
+ "type": "object",
308
+ "properties": {
309
+ "sort": {
310
+ "anyOf": [
311
+ {
312
+ "const": false
313
+ },
314
+ {
315
+ "enum": [
316
+ "binary",
317
+ "locale"
318
+ ],
319
+ "type": "string"
320
+ }
321
+ ]
322
+ },
323
+ "indent": {
324
+ "anyOf": [
325
+ {
326
+ "type": "number"
327
+ },
328
+ {
329
+ "const": "tab"
330
+ }
331
+ ]
332
+ },
333
+ "keepFilled": {
334
+ "type": "boolean"
335
+ }
336
+ },
337
+ "required": [],
338
+ "additionalProperties": false
339
+ },
340
+ "extract": {
341
+ "type": "object",
342
+ "properties": {
343
+ "autoDetect": {
344
+ "type": "boolean"
345
+ },
346
+ "keygen": {
347
+ "enum": [
348
+ "slug",
349
+ "source",
350
+ "random",
351
+ "empty"
352
+ ],
353
+ "type": "string"
354
+ },
355
+ "keyCase": {
356
+ "enum": [
357
+ "camel",
358
+ "snake",
359
+ "kebab",
360
+ "dot"
361
+ ],
362
+ "type": "string"
363
+ },
364
+ "keyPrefix": {
365
+ "type": "string"
366
+ },
367
+ "keyMaxLength": {
368
+ "type": "number"
369
+ },
370
+ "reuseExisting": {
371
+ "type": "boolean"
372
+ },
373
+ "ignore": {
374
+ "type": "array",
375
+ "items": {
376
+ "type": "string"
377
+ }
378
+ },
379
+ "ignoreByFile": {
380
+ "type": "object",
381
+ "propertyNames": {
382
+ "type": "string"
383
+ },
384
+ "additionalProperties": {
385
+ "type": "array",
386
+ "items": {
387
+ "type": "string"
388
+ }
389
+ }
390
+ },
391
+ "ignoreAttributes": {
392
+ "type": "array",
393
+ "items": {
394
+ "type": "string"
395
+ }
396
+ },
397
+ "ignoreCallees": {
398
+ "type": "array",
399
+ "items": {
400
+ "type": "string"
401
+ }
402
+ },
403
+ "templates": {
404
+ "type": "array",
405
+ "items": {
406
+ "anyOf": [
407
+ {
408
+ "type": "string"
409
+ },
410
+ {
411
+ "type": "object",
412
+ "properties": {
413
+ "template": {
414
+ "type": "string"
415
+ },
416
+ "kinds": {
417
+ "type": "array",
418
+ "items": {
419
+ "type": "string"
420
+ }
421
+ },
422
+ "files": {
423
+ "type": "array",
424
+ "items": {
425
+ "type": "string"
426
+ }
427
+ },
428
+ "imports": {
429
+ "type": "array",
430
+ "items": {
431
+ "type": "string"
432
+ }
433
+ }
434
+ },
435
+ "required": [
436
+ "template"
437
+ ],
438
+ "additionalProperties": false
439
+ }
440
+ ]
441
+ }
442
+ }
443
+ },
444
+ "required": [],
445
+ "additionalProperties": false
446
+ },
447
+ "checks": {
448
+ "type": "object",
449
+ "propertyNames": {
450
+ "type": "string"
451
+ },
452
+ "additionalProperties": {
453
+ "anyOf": [
454
+ {
455
+ "enum": [
456
+ "error",
457
+ "warning",
458
+ "info",
459
+ "hint",
460
+ "off"
461
+ ],
462
+ "type": "string"
463
+ },
464
+ {
465
+ "type": "array",
466
+ "items": [
467
+ {
468
+ "enum": [
469
+ "error",
470
+ "warning",
471
+ "info",
472
+ "hint",
473
+ "off"
474
+ ],
475
+ "type": "string"
476
+ },
477
+ {
478
+ "type": "object"
479
+ }
480
+ ],
481
+ "minItems": 2
482
+ }
483
+ ]
484
+ }
485
+ },
486
+ "strict": {
487
+ "type": "boolean"
488
+ },
489
+ "ignoreKeys": {
490
+ "type": "array",
491
+ "items": {
492
+ "type": "string"
493
+ }
494
+ },
495
+ "glossary": {
496
+ "type": "array",
497
+ "items": {
498
+ "type": "object",
499
+ "properties": {
500
+ "term": {
501
+ "type": "string"
502
+ },
503
+ "translations": {
504
+ "type": "object",
505
+ "propertyNames": {
506
+ "type": "string"
507
+ },
508
+ "additionalProperties": {
509
+ "type": "string"
510
+ }
511
+ },
512
+ "note": {
513
+ "type": "string"
514
+ },
515
+ "doNotTranslate": {
516
+ "type": "boolean"
517
+ }
518
+ },
519
+ "required": [
520
+ "term"
521
+ ],
522
+ "additionalProperties": false
523
+ }
524
+ },
525
+ "history": {
526
+ "anyOf": [
527
+ {
528
+ "type": "boolean"
529
+ },
530
+ {
531
+ "type": "object",
532
+ "propertyNames": {
533
+ "type": "string"
534
+ },
535
+ "additionalProperties": {
536
+ "anyOf": [
537
+ {
538
+ "const": false
539
+ },
540
+ {
541
+ "type": "object",
542
+ "properties": {},
543
+ "required": []
544
+ }
545
+ ]
546
+ }
547
+ }
548
+ ]
549
+ },
550
+ "projects": {
551
+ "type": "array",
552
+ "items": {
553
+ "type": "string"
554
+ }
555
+ }
556
+ },
557
+ "required": [],
558
+ "additionalProperties": false,
559
+ "$schema": "http://json-schema.org/draft-07/schema#",
560
+ "title": "x18n config"
561
+ }