Commit 3923cb9
Feature add custom http headers (#764)
* feat: adding nvmrc file
* feat: stronger typing with headers
* feat: adding custom http types
* test: snapshots fixing
* test: many tests failing due to indentation
* chore: remove log
* test: update test script
* fix: http headers append
* fix: further header parsing if string
* feat: allow headers and method to be sent in from CLI
* chore: cleanup prettier
* fix: cli help log for http headers
* fix: formatting
* chore: fix spacing
* test: all unit tests passing
* test: adding tests for isValidHTTPMethod
* fix: isValidHTTPMethod and parsed header to use object.entries
* chore: updating comments for index.ts
* chore: cleaning up error messages
* refactor: parseHTTPHeaders to ensure typeof object and not falsy
* feat: allow multiple headers or json headers
* feat: updating documentation for the CLI
* chore: remove nvmrc
* test: adding more utility type tests
* test: adding intersection type generation
* test: adding parse schema utility tests in load
* test: adding isFile() tests
* test: resolveSchema fully tested
* test: adding more tests to parse headers
* test: cleanup tests
* test: cleanup tests for resolveSchema, due to windows CI process throwing error
* fix: update generic for parseHttpHeader
* fix: add default primitive val
* chore: adding types
* Remove some unit tests; add CLI test for new flags
Co-authored-by: Eric Zorn <zornwebdev@gmail.com>1 parent 56cc872 commit 3923cb9
File tree
15 files changed
+807
-658
lines changed- bin
- src
- tests
- __snapshots__
- bin
- remote-schema
- __snapshots__
- utils
15 files changed
+807
-658
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
110 | 113 | | |
111 | 114 | | |
112 | 115 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
18 | 21 | | |
19 | 22 | | |
20 | 23 | | |
| |||
31 | 34 | | |
32 | 35 | | |
33 | 36 | | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
34 | 51 | | |
35 | 52 | | |
36 | 53 | | |
| |||
69 | 86 | | |
70 | 87 | | |
71 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
72 | 105 | | |
73 | 106 | | |
74 | 107 | | |
| |||
79 | 112 | | |
80 | 113 | | |
81 | 114 | | |
| 115 | + | |
| 116 | + | |
82 | 117 | | |
83 | 118 | | |
84 | 119 | | |
85 | 120 | | |
86 | | - | |
87 | | - | |
| 121 | + | |
| 122 | + | |
88 | 123 | | |
89 | 124 | | |
90 | | - | |
| 125 | + | |
91 | 126 | | |
92 | 127 | | |
93 | | - | |
| 128 | + | |
94 | 129 | | |
95 | 130 | | |
96 | 131 | | |
97 | | - | |
| 132 | + | |
98 | 133 | | |
99 | 134 | | |
100 | 135 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
| 54 | + | |
53 | 55 | | |
| 56 | + | |
54 | 57 | | |
55 | 58 | | |
56 | 59 | | |
| |||
66 | 69 | | |
67 | 70 | | |
68 | 71 | | |
69 | | - | |
| 72 | + | |
70 | 73 | | |
71 | 74 | | |
72 | 75 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
21 | 34 | | |
22 | | - | |
| 35 | + | |
23 | 36 | | |
24 | 37 | | |
25 | 38 | | |
| |||
40 | 53 | | |
41 | 54 | | |
42 | 55 | | |
| 56 | + | |
43 | 57 | | |
44 | 58 | | |
45 | 59 | | |
46 | 60 | | |
| 61 | + | |
| 62 | + | |
47 | 63 | | |
| 64 | + | |
48 | 65 | | |
49 | 66 | | |
50 | 67 | | |
| |||
53 | 70 | | |
54 | 71 | | |
55 | 72 | | |
56 | | - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
57 | 81 | | |
58 | 82 | | |
59 | 83 | | |
| |||
108 | 132 | | |
109 | 133 | | |
110 | 134 | | |
| 135 | + | |
| 136 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| 47 | + | |
46 | 48 | | |
47 | 49 | | |
48 | 50 | | |
49 | 51 | | |
50 | 52 | | |
| 53 | + | |
51 | 54 | | |
52 | 55 | | |
53 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
54 | 88 | | |
55 | 89 | | |
56 | 90 | | |
| 91 | + | |
| 92 | + | |
57 | 93 | | |
58 | 94 | | |
59 | 95 | | |
| |||
65 | 101 | | |
66 | 102 | | |
67 | 103 | | |
68 | | - | |
| 104 | + | |
69 | 105 | | |
70 | 106 | | |
71 | 107 | | |
| |||
88 | 124 | | |
89 | 125 | | |
90 | 126 | | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
98 | 141 | | |
99 | 142 | | |
100 | 143 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
| |||
134 | 136 | | |
135 | 137 | | |
136 | 138 | | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
137 | 154 | | |
138 | 155 | | |
139 | 156 | | |
| |||
0 commit comments