@inlang/sdk 0.34.8 → 0.34.10
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/adapter/solidAdapter.js +1 -1
- package/dist/adapter/solidAdapter.test.js +60 -23
- package/dist/api.d.ts +16 -8
- package/dist/api.d.ts.map +1 -1
- package/dist/createMessageLintReportsQuery.d.ts +5 -1
- package/dist/createMessageLintReportsQuery.d.ts.map +1 -1
- package/dist/createMessageLintReportsQuery.js +165 -62
- package/dist/createMessagesQuery.d.ts.map +1 -1
- package/dist/createMessagesQuery.js +30 -12
- package/dist/createNewProject.d.ts +0 -5
- package/dist/createNewProject.d.ts.map +1 -1
- package/dist/createNewProject.js +0 -5
- package/dist/lint/message/lintSingleMessage.d.ts.map +1 -1
- package/dist/lint/message/lintSingleMessage.js +3 -1
- package/dist/loadProject.d.ts.map +1 -1
- package/dist/loadProject.js +6 -2
- package/dist/loadProject.test.js +38 -25
- package/dist/persistence/filelock/acquireFileLock.d.ts.map +1 -1
- package/dist/persistence/filelock/acquireFileLock.js +2 -2
- package/dist/persistence/filelock/releaseLock.js +1 -1
- package/dist/reactivity/solid.d.ts +2 -1
- package/dist/reactivity/solid.d.ts.map +1 -1
- package/dist/reactivity/solid.js +3 -2
- package/dist/reactivity/solid.test.js +38 -1
- package/dist/v2/createMessageBundle.d.ts +25 -0
- package/dist/v2/createMessageBundle.d.ts.map +1 -0
- package/dist/v2/createMessageBundle.js +36 -0
- package/dist/v2/createMessageBundle.test.d.ts +2 -0
- package/dist/v2/createMessageBundle.test.d.ts.map +1 -0
- package/dist/v2/createMessageBundle.test.js +92 -0
- package/dist/v2/mocks/plural/bundle.d.ts +3 -0
- package/dist/v2/mocks/plural/bundle.d.ts.map +1 -0
- package/dist/v2/mocks/plural/bundle.js +140 -0
- package/dist/v2/mocks/plural/bundle.test.d.ts +2 -0
- package/dist/v2/mocks/plural/bundle.test.d.ts.map +1 -0
- package/dist/v2/mocks/plural/bundle.test.js +15 -0
- package/package.json +3 -3
- package/src/adapter/solidAdapter.test.ts +78 -33
- package/src/adapter/solidAdapter.ts +1 -1
- package/src/api.ts +15 -8
- package/src/createMessageLintReportsQuery.ts +190 -67
- package/src/createMessagesQuery.ts +33 -12
- package/src/createNewProject.ts +0 -5
- package/src/createNodeishFsWithWatcher.ts +1 -1
- package/src/lint/message/lintSingleMessage.ts +4 -1
- package/src/loadProject.test.ts +45 -24
- package/src/loadProject.ts +7 -2
- package/src/persistence/filelock/acquireFileLock.ts +4 -2
- package/src/persistence/filelock/releaseLock.ts +1 -1
- package/src/reactivity/solid.test.ts +54 -1
- package/src/reactivity/solid.ts +3 -0
- package/src/v2/createMessageBundle.test.ts +95 -0
- package/src/v2/createMessageBundle.ts +43 -0
- package/src/v2/mocks/plural/bundle.test.ts +18 -0
- package/src/v2/mocks/plural/bundle.ts +142 -0
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import type { MessageBundle } from "../../types.js"
|
|
2
|
+
|
|
3
|
+
export const bundle: MessageBundle = {
|
|
4
|
+
id: "mock_bundle_human_id",
|
|
5
|
+
alias: {
|
|
6
|
+
default: "mock_bundle_alias",
|
|
7
|
+
},
|
|
8
|
+
messages: [
|
|
9
|
+
{
|
|
10
|
+
locale: "de",
|
|
11
|
+
declarations: [
|
|
12
|
+
{
|
|
13
|
+
type: "input",
|
|
14
|
+
name: "numProducts",
|
|
15
|
+
value: {
|
|
16
|
+
type: "expression",
|
|
17
|
+
arg: {
|
|
18
|
+
type: "variable",
|
|
19
|
+
name: "numProducts",
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
selectors: [
|
|
25
|
+
{
|
|
26
|
+
type: "expression",
|
|
27
|
+
arg: {
|
|
28
|
+
type: "variable",
|
|
29
|
+
name: "numProducts",
|
|
30
|
+
},
|
|
31
|
+
annotation: {
|
|
32
|
+
type: "function",
|
|
33
|
+
name: "plural",
|
|
34
|
+
options: [],
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
variants: [
|
|
39
|
+
{
|
|
40
|
+
match: ["zero"],
|
|
41
|
+
pattern: [
|
|
42
|
+
{
|
|
43
|
+
type: "text",
|
|
44
|
+
value: "Keine Produkte",
|
|
45
|
+
},
|
|
46
|
+
],
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
match: ["one"],
|
|
50
|
+
pattern: [
|
|
51
|
+
{
|
|
52
|
+
type: "text",
|
|
53
|
+
value: "Ein Produkt",
|
|
54
|
+
},
|
|
55
|
+
],
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
match: ["other"],
|
|
59
|
+
pattern: [
|
|
60
|
+
{
|
|
61
|
+
type: "expression",
|
|
62
|
+
arg: {
|
|
63
|
+
type: "variable",
|
|
64
|
+
name: "numProducts",
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
type: "text",
|
|
69
|
+
value: " Produkte",
|
|
70
|
+
},
|
|
71
|
+
],
|
|
72
|
+
},
|
|
73
|
+
],
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
locale: "en",
|
|
77
|
+
declarations: [
|
|
78
|
+
{
|
|
79
|
+
type: "input",
|
|
80
|
+
name: "numProducts",
|
|
81
|
+
value: {
|
|
82
|
+
type: "expression",
|
|
83
|
+
arg: {
|
|
84
|
+
type: "variable",
|
|
85
|
+
name: "numProducts",
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
],
|
|
90
|
+
selectors: [
|
|
91
|
+
{
|
|
92
|
+
type: "expression",
|
|
93
|
+
arg: {
|
|
94
|
+
type: "variable",
|
|
95
|
+
name: "numProducts",
|
|
96
|
+
},
|
|
97
|
+
annotation: {
|
|
98
|
+
type: "function",
|
|
99
|
+
name: "plural",
|
|
100
|
+
options: [],
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
],
|
|
104
|
+
variants: [
|
|
105
|
+
{
|
|
106
|
+
match: ["zero"],
|
|
107
|
+
pattern: [
|
|
108
|
+
{
|
|
109
|
+
type: "text",
|
|
110
|
+
value: "No Products",
|
|
111
|
+
},
|
|
112
|
+
],
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
match: ["one"],
|
|
116
|
+
pattern: [
|
|
117
|
+
{
|
|
118
|
+
type: "text",
|
|
119
|
+
value: "A product",
|
|
120
|
+
},
|
|
121
|
+
],
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
match: ["other"],
|
|
125
|
+
pattern: [
|
|
126
|
+
{
|
|
127
|
+
type: "expression",
|
|
128
|
+
arg: {
|
|
129
|
+
type: "variable",
|
|
130
|
+
name: "numProducts",
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
type: "text",
|
|
135
|
+
value: " products",
|
|
136
|
+
},
|
|
137
|
+
],
|
|
138
|
+
},
|
|
139
|
+
],
|
|
140
|
+
},
|
|
141
|
+
],
|
|
142
|
+
}
|