@stancer/stancer 1.0.2 → 1.1.1

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.
Files changed (184) hide show
  1. package/CHANGELOG.md +12 -1
  2. package/dist/api-endpoint/http/fetch-http-client.d.ts.map +1 -1
  3. package/dist/api-endpoint/http/fetch-http-client.js +7 -1
  4. package/dist/api-endpoint/http/fetch-http-client.js.map +1 -1
  5. package/dist/core/common/handler/metadata-handler.d.ts +18 -0
  6. package/dist/core/common/handler/metadata-handler.d.ts.map +1 -0
  7. package/dist/core/common/handler/metadata-handler.js +19 -0
  8. package/dist/core/common/handler/metadata-handler.js.map +1 -0
  9. package/dist/event/model.d.ts +20 -0
  10. package/dist/event/model.d.ts.map +1 -0
  11. package/dist/event/model.js +30 -0
  12. package/dist/event/model.js.map +1 -0
  13. package/dist/index.d.ts +60 -0
  14. package/dist/index.d.ts.map +1 -0
  15. package/dist/index.js +57 -0
  16. package/dist/index.js.map +1 -0
  17. package/dist/payment-intent/api-endpoint.d.ts +16 -1
  18. package/dist/payment-intent/api-endpoint.d.ts.map +1 -1
  19. package/dist/payment-intent/api-endpoint.js +2 -1
  20. package/dist/payment-intent/api-endpoint.js.map +1 -1
  21. package/dist/payment-intent/model.d.ts +3 -2
  22. package/dist/payment-intent/model.d.ts.map +1 -1
  23. package/dist/payment-intent/model.js +6 -0
  24. package/dist/payment-intent/model.js.map +1 -1
  25. package/dist/payment-intent/repository.d.ts +1 -1
  26. package/dist/payment-intent/repository.d.ts.map +1 -1
  27. package/dist/webhook/api-endpoint.d.ts +16 -0
  28. package/dist/webhook/api-endpoint.d.ts.map +1 -0
  29. package/dist/webhook/api-endpoint.js +33 -0
  30. package/dist/webhook/api-endpoint.js.map +1 -0
  31. package/dist/webhook/model.d.ts +35 -0
  32. package/dist/webhook/model.d.ts.map +1 -0
  33. package/dist/webhook/model.js +110 -0
  34. package/dist/webhook/model.js.map +1 -0
  35. package/dist/webhook/repository.d.ts +7 -0
  36. package/dist/webhook/repository.d.ts.map +1 -0
  37. package/dist/webhook/repository.js +10 -0
  38. package/dist/webhook/repository.js.map +1 -0
  39. package/dist/webhook/validator.d.ts +4 -0
  40. package/dist/webhook/validator.d.ts.map +1 -0
  41. package/dist/webhook/validator.js +16 -0
  42. package/dist/webhook/validator.js.map +1 -0
  43. package/package.json +33 -22
  44. package/dist/main.d.ts +0 -2
  45. package/dist/main.d.ts.map +0 -1
  46. package/dist/main.js +0 -2
  47. package/dist/main.js.map +0 -1
  48. package/reports/base.css +0 -362
  49. package/reports/block-navigation.js +0 -75
  50. package/reports/cobertura-coverage.xml +0 -18
  51. package/reports/favicon.png +0 -0
  52. package/reports/index.html +0 -177
  53. package/reports/junit.xml +0 -25
  54. package/reports/prettify.css +0 -101
  55. package/reports/prettify.js +0 -955
  56. package/reports/sort-arrow-sprite.png +0 -0
  57. package/reports/sorter.js +0 -205
  58. package/src/address/api-endpoint.ts +0 -30
  59. package/src/address/model.ts +0 -79
  60. package/src/address/repository.ts +0 -18
  61. package/src/address/validator.ts +0 -34
  62. package/src/api-endpoint/abstract-api-endpoint.ts +0 -310
  63. package/src/api-endpoint/configuration.ts +0 -125
  64. package/src/api-endpoint/http/fetch-http-client.ts +0 -29
  65. package/src/api-endpoint/http/http.ts +0 -75
  66. package/src/api-endpoint/http/index.ts +0 -2
  67. package/src/api-endpoint/version.ts +0 -4
  68. package/src/card/api-endpoint.ts +0 -39
  69. package/src/card/enum/funding.ts +0 -11
  70. package/src/card/enum/nature.ts +0 -7
  71. package/src/card/enum/network.ts +0 -16
  72. package/src/card/model.ts +0 -139
  73. package/src/card/repository.ts +0 -11
  74. package/src/card/validator.ts +0 -79
  75. package/src/core/abstract-model.ts +0 -126
  76. package/src/core/abstract-repository.ts +0 -201
  77. package/src/core/common/branded-type.ts +0 -15
  78. package/src/core/common/handler/date-handler.ts +0 -31
  79. package/src/core/common/handler/enum-handler.ts +0 -18
  80. package/src/core/common/handler/handler.ts +0 -64
  81. package/src/core/common/handler/id-handler.ts +0 -27
  82. package/src/core/common/id-validator.ts +0 -23
  83. package/src/core/common/mutation-tracked-object.ts +0 -49
  84. package/src/core/endpoint-interface.ts +0 -43
  85. package/src/core/error/base-error.ts +0 -1
  86. package/src/core/error/endpoint/api/api-conflict-error.ts +0 -7
  87. package/src/core/error/endpoint/api/api-error.ts +0 -10
  88. package/src/core/error/endpoint/api/api-not-found-error.ts +0 -7
  89. package/src/core/error/endpoint/api/api-unauthorized-error.ts +0 -7
  90. package/src/core/error/endpoint/api/api-unknown-error.ts +0 -7
  91. package/src/core/error/endpoint/api/api-validation-error.ts +0 -13
  92. package/src/core/error/endpoint/api/index.ts +0 -6
  93. package/src/core/error/endpoint/route-inaccessible-error.ts +0 -8
  94. package/src/core/error/unpopulated-error.ts +0 -3
  95. package/src/core/error/unsendable-error.ts +0 -3
  96. package/src/core/error/validation-error.ts +0 -3
  97. package/src/core/validator.ts +0 -129
  98. package/src/customer/api-endpoint.ts +0 -29
  99. package/src/customer/model.ts +0 -113
  100. package/src/customer/repository.ts +0 -14
  101. package/src/customer/validator.ts +0 -26
  102. package/src/payment/api-endpoint.ts +0 -118
  103. package/src/payment/enum/currency.ts +0 -14
  104. package/src/payment/enum/method.ts +0 -2
  105. package/src/payment/enum/status.ts +0 -21
  106. package/src/payment/model.ts +0 -378
  107. package/src/payment/repository.ts +0 -73
  108. package/src/payment/validator.ts +0 -96
  109. package/src/payment-intent/api-endpoint.ts +0 -123
  110. package/src/payment-intent/enum/status.ts +0 -21
  111. package/src/payment-intent/enum/threeds.ts +0 -2
  112. package/src/payment-intent/model.ts +0 -266
  113. package/src/payment-intent/repository.ts +0 -85
  114. package/src/payment-intent/validator.ts +0 -45
  115. package/src/payout/model.ts +0 -8
  116. package/src/refund/api-endpoint.ts +0 -33
  117. package/src/refund/enum/refund-status.ts +0 -11
  118. package/src/refund/model.ts +0 -90
  119. package/src/refund/repository.ts +0 -14
  120. package/src/refund/validator.ts +0 -44
  121. package/src/sepa/api-endpoint.ts +0 -26
  122. package/src/sepa/model.ts +0 -80
  123. package/src/sepa/repository.ts +0 -11
  124. package/src/sepa/validator.ts +0 -56
  125. package/test/fixtures/endpoint.stub.ts +0 -22
  126. package/test/fixtures/list-endpoint.stub.ts +0 -33
  127. package/test/fixtures/list-model.stub.ts +0 -24
  128. package/test/fixtures/model.stub.ts +0 -12
  129. package/test/functional/address.test.ts +0 -126
  130. package/test/functional/card.test.ts +0 -175
  131. package/test/functional/customer.test.ts +0 -174
  132. package/test/functional/payment-intent.test.ts +0 -215
  133. package/test/functional/payment.test.ts +0 -206
  134. package/test/functional/refund.test.ts +0 -112
  135. package/test/functional/sepa.test.ts +0 -136
  136. package/test/integration/stub-integration.test.ts +0 -88
  137. package/test/stub/stub-endpoint.ts +0 -42
  138. package/test/stub/stub-model.ts +0 -82
  139. package/test/stub/stub-repository.ts +0 -11
  140. package/test/test-helper.ts +0 -133
  141. package/test/unit/address/api-endpoint.test.ts +0 -134
  142. package/test/unit/address/fixtures.ts +0 -60
  143. package/test/unit/address/model.test.ts +0 -75
  144. package/test/unit/address/repository.test.ts +0 -148
  145. package/test/unit/address/validator.test.ts +0 -49
  146. package/test/unit/api-endpoint/http/fetch-http-client.test.ts +0 -44
  147. package/test/unit/api-endpoint/http/http.test.ts +0 -152
  148. package/test/unit/card/api-endpoint.test.ts +0 -170
  149. package/test/unit/card/card-helper.ts +0 -116
  150. package/test/unit/card/fixtures.ts +0 -87
  151. package/test/unit/card/model.test.ts +0 -167
  152. package/test/unit/card/repository.test.ts +0 -146
  153. package/test/unit/card/validator.test.ts +0 -96
  154. package/test/unit/core/common/mutation-tracked-object.test.ts +0 -24
  155. package/test/unit/customer/api-endpoint.test.ts +0 -143
  156. package/test/unit/customer/fixtures.ts +0 -73
  157. package/test/unit/customer/model.test.ts +0 -90
  158. package/test/unit/customer/repository.test.ts +0 -148
  159. package/test/unit/customer/validator.test.ts +0 -62
  160. package/test/unit/payment/api-endpoint.test.ts +0 -188
  161. package/test/unit/payment/fixtures.ts +0 -116
  162. package/test/unit/payment/model.test.ts +0 -240
  163. package/test/unit/payment/repository.test.ts +0 -270
  164. package/test/unit/payment/validator.test.ts +0 -137
  165. package/test/unit/payment-intent/api-endpoint.test.ts +0 -142
  166. package/test/unit/payment-intent/fixtures.ts +0 -94
  167. package/test/unit/payment-intent/model.test.ts +0 -157
  168. package/test/unit/payment-intent/repository.test.ts +0 -263
  169. package/test/unit/payment-intent/validator.test.ts +0 -136
  170. package/test/unit/refund/api-endpoint.test.ts +0 -129
  171. package/test/unit/refund/fixtures.ts +0 -58
  172. package/test/unit/refund/model.test.ts +0 -89
  173. package/test/unit/refund/repository.test.ts +0 -157
  174. package/test/unit/refund/validator.test.ts +0 -89
  175. package/test/unit/sepa/api-endpoint.test.ts +0 -170
  176. package/test/unit/sepa/fixture.ts +0 -62
  177. package/test/unit/sepa/model.test.ts +0 -86
  178. package/test/unit/sepa/repository.test.ts +0 -149
  179. package/test/unit/sepa/sepa-helper.ts +0 -71
  180. package/test/unit/sepa/validator.test.ts +0 -58
  181. package/test/unit/stub/stub-endpoint.test.ts +0 -236
  182. package/test/unit/stub/stub-list-endpoint.test.ts +0 -86
  183. package/test/unit/stub/stub-model.test.ts +0 -111
  184. package/test/unit/stub/stub-repository.test.ts +0 -144
@@ -1,75 +0,0 @@
1
- /* eslint-disable */
2
- var jumpToCode = (function init() {
3
- // Classes of code we would like to highlight in the file view
4
- var missingCoverageClasses = ['.cbranch-no', '.cstat-no', '.fstat-no'];
5
-
6
- // Elements to highlight in the file listing view
7
- var fileListingElements = ['td.pct.low'];
8
-
9
- // We don't want to select elements that are direct descendants of another match
10
- var notSelector = ':not(' + missingCoverageClasses.join('):not(') + ') > '; // becomes `:not(a):not(b) > `
11
-
12
- // Selector that finds elements on the page to which we can jump
13
- var selector = fileListingElements.join(', ') + ', ' + notSelector + missingCoverageClasses.join(', ' + notSelector); // becomes `:not(a):not(b) > a, :not(a):not(b) > b`
14
-
15
- // The NodeList of matching elements
16
- var missingCoverageElements = document.querySelectorAll(selector);
17
-
18
- var currentIndex;
19
-
20
- function toggleClass(index) {
21
- missingCoverageElements.item(currentIndex).classList.remove('highlighted');
22
- missingCoverageElements.item(index).classList.add('highlighted');
23
- }
24
-
25
- function makeCurrent(index) {
26
- toggleClass(index);
27
- currentIndex = index;
28
- missingCoverageElements.item(index).scrollIntoView({
29
- behavior: 'smooth',
30
- block: 'center',
31
- inline: 'center',
32
- });
33
- }
34
-
35
- function goToPrevious() {
36
- var nextIndex = 0;
37
- if (typeof currentIndex !== 'number' || currentIndex === 0) {
38
- nextIndex = missingCoverageElements.length - 1;
39
- } else if (missingCoverageElements.length > 1) {
40
- nextIndex = currentIndex - 1;
41
- }
42
-
43
- makeCurrent(nextIndex);
44
- }
45
-
46
- function goToNext() {
47
- var nextIndex = 0;
48
-
49
- if (typeof currentIndex === 'number' && currentIndex < missingCoverageElements.length - 1) {
50
- nextIndex = currentIndex + 1;
51
- }
52
-
53
- makeCurrent(nextIndex);
54
- }
55
-
56
- return function jump(event) {
57
- if (document.getElementById('fileSearch') === document.activeElement && document.activeElement != null) {
58
- // if we're currently focused on the search input, we don't want to navigate
59
- return;
60
- }
61
-
62
- switch (event.which) {
63
- case 78: // n
64
- case 74: // j
65
- goToNext();
66
- break;
67
- case 66: // b
68
- case 75: // k
69
- case 80: // p
70
- goToPrevious();
71
- break;
72
- }
73
- };
74
- })();
75
- window.addEventListener('keydown', jumpToCode);
@@ -1,18 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <coverage
3
- lines-valid="0"
4
- lines-covered="0"
5
- line-rate="NaN"
6
- branches-valid="0"
7
- branches-covered="0"
8
- branch-rate="NaN"
9
- timestamp="1784736253241"
10
- complexity="0"
11
- version="0.1"
12
- >
13
- <sources>
14
- <source>
15
- /Users/jdasilva/Repositories/libraries/lib-ts
16
- </source>
17
- </sources>
18
- </coverage>
Binary file
@@ -1,177 +0,0 @@
1
- <!doctype html>
2
- <html lang="en">
3
- <head>
4
- <title>Code coverage report for All files</title>
5
- <meta charset="utf-8" />
6
- <link
7
- href="prettify.css"
8
- rel="stylesheet"
9
- />
10
- <link
11
- href="base.css"
12
- rel="stylesheet"
13
- />
14
- <link
15
- href="favicon.png"
16
- type="image/x-icon"
17
- rel="shortcut icon"
18
- />
19
- <meta
20
- name="viewport"
21
- content="width=device-width, initial-scale=1"
22
- />
23
- <style type="text/css">
24
- .coverage-summary .sorter {
25
- background-image: url(sort-arrow-sprite.png);
26
- }
27
- </style>
28
- </head>
29
-
30
- <body>
31
- <div class="wrapper">
32
- <div class="pad1">
33
- <h1>All files</h1>
34
- <div class="clearfix">
35
- <div class="fl pad1y space-right2">
36
- <span class="strong">Unknown% </span>
37
- <span class="quiet">Statements</span>
38
- <span class="fraction">0/0</span>
39
- </div>
40
-
41
- <div class="fl pad1y space-right2">
42
- <span class="strong">Unknown% </span>
43
- <span class="quiet">Branches</span>
44
- <span class="fraction">0/0</span>
45
- </div>
46
-
47
- <div class="fl pad1y space-right2">
48
- <span class="strong">Unknown% </span>
49
- <span class="quiet">Functions</span>
50
- <span class="fraction">0/0</span>
51
- </div>
52
-
53
- <div class="fl pad1y space-right2">
54
- <span class="strong">Unknown% </span>
55
- <span class="quiet">Lines</span>
56
- <span class="fraction">0/0</span>
57
- </div>
58
- </div>
59
- <p class="quiet">
60
- Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the
61
- previous block.
62
- </p>
63
- <template id="filterTemplate">
64
- <div class="quiet">
65
- Filter:
66
- <input
67
- id="fileSearch"
68
- type="search"
69
- />
70
- </div>
71
- </template>
72
- </div>
73
- <div class="status-line medium"></div>
74
- <div class="pad1">
75
- <table class="coverage-summary">
76
- <thead>
77
- <tr>
78
- <th
79
- class="file"
80
- data-col="file"
81
- data-fmt="html"
82
- data-html="true"
83
- >
84
- File
85
- </th>
86
- <th
87
- class="pic"
88
- data-col="pic"
89
- data-type="number"
90
- data-fmt="html"
91
- data-html="true"
92
- ></th>
93
- <th
94
- class="pct"
95
- data-col="statements"
96
- data-type="number"
97
- data-fmt="pct"
98
- >
99
- Statements
100
- </th>
101
- <th
102
- class="abs"
103
- data-col="statements_raw"
104
- data-type="number"
105
- data-fmt="html"
106
- ></th>
107
- <th
108
- class="pct"
109
- data-col="branches"
110
- data-type="number"
111
- data-fmt="pct"
112
- >
113
- Branches
114
- </th>
115
- <th
116
- class="abs"
117
- data-col="branches_raw"
118
- data-type="number"
119
- data-fmt="html"
120
- ></th>
121
- <th
122
- class="pct"
123
- data-col="functions"
124
- data-type="number"
125
- data-fmt="pct"
126
- >
127
- Functions
128
- </th>
129
- <th
130
- class="abs"
131
- data-col="functions_raw"
132
- data-type="number"
133
- data-fmt="html"
134
- ></th>
135
- <th
136
- class="pct"
137
- data-col="lines"
138
- data-type="number"
139
- data-fmt="pct"
140
- >
141
- Lines
142
- </th>
143
- <th
144
- class="abs"
145
- data-col="lines_raw"
146
- data-type="number"
147
- data-fmt="html"
148
- ></th>
149
- </tr>
150
- </thead>
151
- <tbody></tbody>
152
- </table>
153
- </div>
154
- <div class="push"></div>
155
- <!-- for sticky footer -->
156
- </div>
157
- <!-- /wrapper -->
158
- <div class="footer quiet pad2 space-top1 center small">
159
- Code coverage generated by
160
- <a
161
- href="https://istanbul.js.org/"
162
- target="_blank"
163
- rel="noopener noreferrer"
164
- >istanbul</a
165
- >
166
- at 2026-07-22T16:04:13.244Z
167
- </div>
168
- <script src="prettify.js"></script>
169
- <script>
170
- window.onload = function () {
171
- prettyPrint();
172
- };
173
- </script>
174
- <script src="sorter.js"></script>
175
- <script src="block-navigation.js"></script>
176
- </body>
177
- </html>
package/reports/junit.xml DELETED
@@ -1,25 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <testsuites
3
- name="vitest tests"
4
- tests="1"
5
- failures="0"
6
- errors="0"
7
- time="0.001987541"
8
- >
9
- <testsuite
10
- name="src/main.test.ts"
11
- timestamp="2026-07-22T16:04:13.239Z"
12
- hostname="MacBook-Pro-de-Joel.local"
13
- tests="1"
14
- failures="0"
15
- errors="0"
16
- skipped="0"
17
- time="0.001987541"
18
- >
19
- <testcase
20
- classname="src/main.test.ts"
21
- name="ok"
22
- time="0.001131917"
23
- />
24
- </testsuite>
25
- </testsuites>
@@ -1,101 +0,0 @@
1
- .pln {
2
- color: #000;
3
- }
4
- @media screen {
5
- .str {
6
- color: #080;
7
- }
8
- .kwd {
9
- color: #008;
10
- }
11
- .com {
12
- color: #800;
13
- }
14
- .typ {
15
- color: #606;
16
- }
17
- .lit {
18
- color: #066;
19
- }
20
- .pun,
21
- .opn,
22
- .clo {
23
- color: #660;
24
- }
25
- .tag {
26
- color: #008;
27
- }
28
- .atn {
29
- color: #606;
30
- }
31
- .atv {
32
- color: #080;
33
- }
34
- .dec,
35
- .var {
36
- color: #606;
37
- }
38
- .fun {
39
- color: red;
40
- }
41
- }
42
- @media print, projection {
43
- .str {
44
- color: #060;
45
- }
46
- .kwd {
47
- color: #006;
48
- font-weight: bold;
49
- }
50
- .com {
51
- color: #600;
52
- font-style: italic;
53
- }
54
- .typ {
55
- color: #404;
56
- font-weight: bold;
57
- }
58
- .lit {
59
- color: #044;
60
- }
61
- .pun,
62
- .opn,
63
- .clo {
64
- color: #440;
65
- }
66
- .tag {
67
- color: #006;
68
- font-weight: bold;
69
- }
70
- .atn {
71
- color: #404;
72
- }
73
- .atv {
74
- color: #060;
75
- }
76
- }
77
- pre.prettyprint {
78
- border: 1px solid #888;
79
- padding: 2px;
80
- }
81
- ol.linenums {
82
- margin-top: 0;
83
- margin-bottom: 0;
84
- }
85
- li.L0,
86
- li.L1,
87
- li.L2,
88
- li.L3,
89
- li.L5,
90
- li.L6,
91
- li.L7,
92
- li.L8 {
93
- list-style-type: none;
94
- }
95
- li.L1,
96
- li.L3,
97
- li.L5,
98
- li.L7,
99
- li.L9 {
100
- background: #eee;
101
- }