Commit cdce7a1
Dimitar Kerezov
Introduce messages service/code-generation
Makes use of JSON files containing string messages which can later be accessed from within the CLI. A dev command (dev-generate-messages) is introduced for ease of use and autocompletion.
There is a default json message file with is loaded by default however each client may provide their own json file and thus override keys, extend and so on.
Includes a bit of refactoring concerning swagger code generation - extracting/moving common interfaces/implementation classes to common.1 parent 78835ec commit cdce7a1
File tree
6 files changed
+37
-2
lines changed- lib
- test
6 files changed
+37
-2
lines changed- bootstrap.ts+4
- codeGeneration/code-entity.ts+57
- codeGeneration/code-generation.d.ts+46
- codeGeneration/code-printer.ts+53
- commands/generate-messages.ts+38
- declarations.d.ts+39
- errors.ts+4-4
- file-system.ts+6-6
- messages/messages.d.ts+13
- messages/messages.ts+16
- mobile/mobile-core/devices-service.ts+4-5
- options.ts+1
- resources/messages/errorMessages.json+7
- services/message-contract-generator.ts+83
- services/messages-service.ts+88
- test/unit-tests/messages-service.ts+121
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
20 | 23 | | |
21 | 24 | | |
22 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| 26 | + | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
40 | | - | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| |||
0 commit comments