bajo 0.3.9 → 1.0.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 (162) hide show
  1. package/README.md +127 -26
  2. package/bajoI18N/resource/id.json +31 -0
  3. package/boot/class/app.js +69 -0
  4. package/boot/class/bajo-core/helper/attach-method.js +30 -0
  5. package/boot/{boot-order.js → class/bajo-core/helper/boot-order.js} +10 -10
  6. package/boot/class/bajo-core/helper/boot-plugins.js +19 -0
  7. package/boot/class/bajo-core/helper/build-config.js +61 -0
  8. package/boot/class/bajo-core/helper/build-plugins.js +26 -0
  9. package/boot/class/bajo-core/helper/collect-config-handlers.js +21 -0
  10. package/boot/{exit-handler.js → class/bajo-core/helper/exit-handler.js} +10 -16
  11. package/boot/class/bajo-core/helper/run-as-applet.js +26 -0
  12. package/boot/class/bajo-core/method/arrange-array.js +18 -0
  13. package/boot/class/bajo-core/method/break-ns-path-from-file.js +24 -0
  14. package/boot/class/bajo-core/method/break-ns-path.js +29 -0
  15. package/boot/class/bajo-core/method/build-collections.js +46 -0
  16. package/boot/class/bajo-core/method/call-handler.js +29 -0
  17. package/boot/{helper → class/bajo-core/method}/defaults-deep.js +1 -1
  18. package/boot/class/bajo-core/method/each-plugins.js +55 -0
  19. package/boot/class/bajo-core/method/envs.js +7 -0
  20. package/boot/{helper → class/bajo-core/method}/generate-id.js +4 -0
  21. package/boot/{helper → class/bajo-core/method}/get-global-module-dir.js +3 -4
  22. package/boot/class/bajo-core/method/get-method.js +10 -0
  23. package/boot/{helper → class/bajo-core/method}/get-module-dir.js +3 -4
  24. package/boot/{helper → class/bajo-core/method}/get-plugin-data-dir.js +2 -3
  25. package/boot/class/bajo-core/method/get-plugin-file.js +18 -0
  26. package/boot/class/bajo-core/method/get-plugin.js +23 -0
  27. package/boot/{helper → class/bajo-core/method}/import-module.js +4 -10
  28. package/boot/{helper → class/bajo-core/method}/import-pkg.js +9 -3
  29. package/boot/class/bajo-core/method/includes.js +13 -0
  30. package/boot/class/bajo-core/method/is-class.js +7 -0
  31. package/boot/{helper → class/bajo-core/method}/is-log-in-range.js +1 -1
  32. package/boot/{helper → class/bajo-core/method}/is-valid-app.js +2 -2
  33. package/boot/class/bajo-core/method/join.js +15 -0
  34. package/boot/class/bajo-core/method/log-levels.js +9 -0
  35. package/boot/class/bajo-core/method/num-unit.js +9 -0
  36. package/boot/{helper → class/bajo-core/method}/parse-object.js +24 -8
  37. package/boot/class/bajo-core/method/read-config.js +48 -0
  38. package/boot/{helper → class/bajo-core/method}/read-json.js +2 -2
  39. package/boot/class/bajo-core/method/run-hook.js +26 -0
  40. package/boot/{helper → class/bajo-core/method}/save-as-download.js +2 -2
  41. package/boot/class/bajo-core/method/slice-string.js +13 -0
  42. package/boot/class/bajo-core/method/titleize.js +23 -0
  43. package/boot/class/bajo-core.js +30 -0
  44. package/boot/class/bajo-plugin/helper/attach-method.js +14 -0
  45. package/boot/class/bajo-plugin/helper/build-config.js +10 -0
  46. package/boot/class/bajo-plugin/helper/check-clash.js +16 -0
  47. package/boot/class/bajo-plugin/helper/check-dependency.js +37 -0
  48. package/boot/class/bajo-plugin/helper/collect-exit-handlers.js +14 -0
  49. package/boot/class/bajo-plugin/helper/collect-hooks.js +29 -0
  50. package/boot/class/bajo-plugin/helper/run.js +20 -0
  51. package/boot/class/bajo-plugin.js +78 -0
  52. package/boot/class/error.js +59 -0
  53. package/boot/class/log.js +67 -0
  54. package/boot/class/plugin.js +51 -0
  55. package/boot/class/print.js +103 -0
  56. package/boot/index.js +4 -51
  57. package/boot/lib/create-method.js +30 -0
  58. package/boot/{helper → lib}/current-loc.js +1 -1
  59. package/boot/lib/omitted-plugin-keys.js +1 -1
  60. package/boot/lib/parse-args-argv.js +8 -11
  61. package/boot/lib/parse-env.js +7 -6
  62. package/boot/lib/read-all-configs.js +36 -0
  63. package/boot/lib/translate.js +18 -0
  64. package/docs/ecosystem.md +55 -0
  65. package/docs/hook.md +11 -0
  66. package/package.json +55 -56
  67. package/test/{helper-isSet.js → method/isSet.js} +6 -4
  68. package/waibuStatic/virtual.json +7 -0
  69. package/boot/attach-helper.js +0 -40
  70. package/boot/build-config.js +0 -99
  71. package/boot/create-scope.js +0 -36
  72. package/boot/helper/break-ns-path.js +0 -20
  73. package/boot/helper/build-collections.js +0 -44
  74. package/boot/helper/build-name.js +0 -17
  75. package/boot/helper/call-helper-or-handler.js +0 -15
  76. package/boot/helper/dump.js +0 -14
  77. package/boot/helper/each-plugins.js +0 -106
  78. package/boot/helper/envs.js +0 -14
  79. package/boot/helper/error.js +0 -77
  80. package/boot/helper/fatal.js +0 -13
  81. package/boot/helper/get-config.js +0 -19
  82. package/boot/helper/get-helper.js +0 -12
  83. package/boot/helper/get-item-by-name.js +0 -26
  84. package/boot/helper/get-plugin-file.js +0 -16
  85. package/boot/helper/get-plugin-name.js +0 -39
  86. package/boot/helper/get-plugin.js +0 -14
  87. package/boot/helper/join.js +0 -11
  88. package/boot/helper/log-levels.js +0 -19
  89. package/boot/helper/read-config.js +0 -48
  90. package/boot/helper/resolve-tpl-path.js +0 -15
  91. package/boot/helper/run-hook.js +0 -49
  92. package/boot/helper/spinner.js +0 -9
  93. package/boot/helper/start-plugin.js +0 -7
  94. package/boot/helper/titleize.js +0 -14
  95. package/boot/lib/build-helper.js +0 -60
  96. package/boot/lib/logger.js +0 -76
  97. package/boot/lib/print.js +0 -138
  98. package/boot/plugins/attach-helper.js +0 -20
  99. package/boot/plugins/build-config.js +0 -68
  100. package/boot/plugins/check-clash.js +0 -18
  101. package/boot/plugins/check-dependency.js +0 -37
  102. package/boot/plugins/collect-config-handlers.js +0 -22
  103. package/boot/plugins/collect-exit-handlers.js +0 -18
  104. package/boot/plugins/collect-hooks.js +0 -34
  105. package/boot/plugins/extend-config.js +0 -21
  106. package/boot/plugins/index.js +0 -27
  107. package/boot/plugins/run.js +0 -26
  108. package/boot/run-tool.js +0 -41
  109. package/docs/boot_build-config.js.html +0 -75
  110. package/docs/boot_create-scope.js.html +0 -25
  111. package/docs/boot_index.js.html +0 -43
  112. package/docs/data/search.json +0 -1
  113. package/docs/fonts/Inconsolata-Regular.ttf +0 -0
  114. package/docs/fonts/OpenSans-Regular.ttf +0 -0
  115. package/docs/fonts/WorkSans-Bold.ttf +0 -0
  116. package/docs/helper_emit.js.html +0 -18
  117. package/docs/helper_envs.js.html +0 -16
  118. package/docs/helper_error.js.html +0 -25
  119. package/docs/helper_get-bajo.js.html +0 -42
  120. package/docs/helper_index.js.html +0 -39
  121. package/docs/helper_log-levels.js.html +0 -20
  122. package/docs/helper_set-hook.js.html +0 -38
  123. package/docs/helper_walk-bajos.js.html +0 -51
  124. package/docs/index.html +0 -16
  125. package/docs/module-boot.html +0 -3
  126. package/docs/module-boot_buildConfig.html +0 -3
  127. package/docs/module-boot_createScope.html +0 -3
  128. package/docs/module-helper.html +0 -7
  129. package/docs/module-helper_setHook.html +0 -4
  130. package/docs/module-helper_walkBajos.html +0 -6
  131. package/docs/scripts/core.js +0 -655
  132. package/docs/scripts/core.min.js +0 -23
  133. package/docs/scripts/resize.js +0 -90
  134. package/docs/scripts/search.js +0 -265
  135. package/docs/scripts/search.min.js +0 -6
  136. package/docs/scripts/third-party/Apache-License-2.0.txt +0 -202
  137. package/docs/scripts/third-party/fuse.js +0 -9
  138. package/docs/scripts/third-party/hljs-line-num-original.js +0 -369
  139. package/docs/scripts/third-party/hljs-line-num.js +0 -1
  140. package/docs/scripts/third-party/hljs-original.js +0 -5171
  141. package/docs/scripts/third-party/hljs.js +0 -1
  142. package/docs/scripts/third-party/popper.js +0 -5
  143. package/docs/scripts/third-party/tippy.js +0 -1
  144. package/docs/scripts/third-party/tocbot.js +0 -672
  145. package/docs/scripts/third-party/tocbot.min.js +0 -1
  146. package/docs/styles/clean-jsdoc-theme-base.css +0 -975
  147. package/docs/styles/clean-jsdoc-theme-dark.css +0 -407
  148. package/docs/styles/clean-jsdoc-theme-light.css +0 -388
  149. package/docs/styles/clean-jsdoc-theme.min.css +0 -1
  150. package/test/helper-error.js +0 -25
  151. package/test/helper-pathResolve.js +0 -28
  152. /package/boot/{helper → class/bajo-core/method}/get-key-by-value.js +0 -0
  153. /package/boot/{helper → class/bajo-core/method}/is-empty-dir.js +0 -0
  154. /package/boot/{helper → class/bajo-core/method}/is-set.js +0 -0
  155. /package/boot/{helper → class/bajo-core/method}/is-valid-plugin.js +0 -0
  156. /package/boot/{helper → class/bajo-core/method}/paginate.js +0 -0
  157. /package/boot/{helper → class/bajo-core/method}/pascal-case.js +0 -0
  158. /package/boot/{helper → class/bajo-core/method}/pick.js +0 -0
  159. /package/boot/{helper → class/bajo-core/method}/resolve-path.js +0 -0
  160. /package/boot/{helper → class/bajo-core/method}/round.js +0 -0
  161. /package/boot/{helper → class/bajo-core/method}/sec-to-hms.js +0 -0
  162. /package/boot/{helper → class/bajo-core/method}/white-space.js +0 -0
@@ -1,388 +0,0 @@
1
- .light ::selection {
2
- background: #ffce76;
3
- color: #1d1919;
4
- }
5
-
6
- body.light {
7
- background-color: #fff;
8
- color: #111;
9
- }
10
-
11
- .light a,
12
- .light a:active {
13
- color: #007bff;
14
- }
15
-
16
- .light hr {
17
- color: #f7f7f7;
18
- }
19
-
20
- .light h1,
21
- .light h2,
22
- .light h3,
23
- .light h4,
24
- .light h5,
25
- .light h6 {
26
- color: #111;
27
- }
28
-
29
- .light .sidebar {
30
- background-color: #f7f7f7;
31
- color: #222;
32
- }
33
-
34
- .light .sidebar-title {
35
- color: #222;
36
- }
37
-
38
- .light .sidebar-section-title {
39
- color: #222;
40
- }
41
-
42
- .light .sidebar-section-title:hover {
43
- background: #eee;
44
- }
45
-
46
- .light .with-arrow {
47
- fill: #111;
48
- }
49
-
50
- .light .sidebar-section-children-container {
51
- background: #eee;
52
- }
53
-
54
- .light .sidebar-section-children a:hover {
55
- background: #e0e0e0;
56
- }
57
-
58
- .light .sidebar-section-children a {
59
- color: #111;
60
- }
61
-
62
- .light .navbar-container {
63
- background: #fff;
64
- }
65
-
66
- .light .icon-button svg,
67
- .light .navbar-item a {
68
- color: #222;
69
- fill: #222;
70
- }
71
-
72
- .light .tippy-box {
73
- background: #eee;
74
- color: #111;
75
- }
76
-
77
- .light .tippy-arrow {
78
- color: #f1f1f1;
79
- }
80
-
81
- .light .font-size-tooltip .icon-button svg {
82
- fill: #111;
83
- }
84
-
85
- .light .font-size-tooltip .icon-button.disabled svg {
86
- fill: #999;
87
- }
88
-
89
- .light .icon-button:hover {
90
- background: #ddd;
91
- }
92
-
93
- .light .icon-button:active {
94
- background: #ccc;
95
- }
96
-
97
- .light .navbar-item a:active {
98
- color: #333;
99
- background-color: #eee;
100
- }
101
-
102
- .light .navbar-item:hover {
103
- background: #f7f7f7;
104
- }
105
-
106
- .light .footer {
107
- background: #f7f7f7;
108
- color: #111;
109
- }
110
-
111
- .light .footer a {
112
- color: #111;
113
- }
114
-
115
- .light .toc-link {
116
- color: #999;
117
- transition: color 0.3s;
118
- font-size: 0.875rem;
119
- }
120
-
121
- .light .toc-link.is-active-link {
122
- color: #111;
123
- }
124
-
125
- .light .has-anchor .link-anchor {
126
- color: #ddd;
127
- }
128
-
129
- .light .has-anchor .link-anchor:hover {
130
- color: #ccc;
131
- }
132
-
133
- .light .signature-attributes {
134
- color: #aaa;
135
- }
136
-
137
- .light .ancestors {
138
- color: #999;
139
- }
140
-
141
- .light .ancestors a {
142
- color: #999 !important;
143
- }
144
-
145
- .light .important {
146
- color: #ee1313;
147
- }
148
-
149
- .light .type-signature {
150
- color: #00918e;
151
- }
152
-
153
- .light .name,
154
- .light .name a {
155
- color: #293a80;
156
- }
157
-
158
- .light .details {
159
- background: #f9f9f9;
160
- color: #101010;
161
- }
162
-
163
- .light .member-item-container strong,
164
- .light .method-member-container strong {
165
- color: #000;
166
- }
167
-
168
- .light .prettyprint {
169
- background: #f7f7f7;
170
- }
171
-
172
- .light .pre-div {
173
- background: #f7f7f7;
174
- }
175
-
176
- .light .hljs .hljs-ln-numbers {
177
- color: #aaa;
178
- }
179
-
180
- .light .hljs .selected {
181
- background: #ccc;
182
- }
183
-
184
- .light table.hljs-ln td {
185
- background: none;
186
- }
187
-
188
- .light .hljs .selected .hljs-ln-numbers {
189
- color: #444;
190
- }
191
-
192
- .light .pre-top-bar-container {
193
- background-color: #eee;
194
- }
195
-
196
- .light .prettyprint code {
197
- background-color: #f7f7f7;
198
- }
199
-
200
- .light table .name,
201
- .light .params .name,
202
- .light .props .name,
203
- .light .name code {
204
- color: #4d4e53;
205
- }
206
-
207
- .light table td,
208
- .light .params td {
209
- background: #f7f7f7;
210
- }
211
-
212
- .light table thead th,
213
- .light .params thead th,
214
- .light .props thead th {
215
- background-color: #eee;
216
- color: #111;
217
- }
218
-
219
- /* stylelint-disable */
220
- .light table .params thead tr,
221
- .light .params .params thead tr,
222
- .light .props .props thead tr {
223
- background-color: #eee;
224
- color: #111;
225
- }
226
-
227
- .light .disabled {
228
- color: #454545;
229
- }
230
-
231
- .light .code-lang-name {
232
- color: #ff0000;
233
- }
234
-
235
- .light .tooltip {
236
- background: #ffce76;
237
- color: #000;
238
- }
239
-
240
- /* Code */
241
-
242
- .light .hljs-comment,
243
- .light .hljs-quote {
244
- color: #a0a1a7;
245
- }
246
-
247
- .light .hljs-doctag,
248
- .light .hljs-keyword,
249
- .light .hljs-formula {
250
- color: #a626a4;
251
- }
252
-
253
- .light .hljs-section,
254
- .light .hljs-name,
255
- .light .hljs-selector-tag,
256
- .light .hljs-deletion,
257
- .light .hljs-subst {
258
- color: #e45649;
259
- }
260
-
261
- .light .hljs-literal {
262
- color: #0184bb;
263
- }
264
-
265
- .light .hljs-string,
266
- .light .hljs-regexp,
267
- .light .hljs-addition,
268
- .light .hljs-attribute,
269
- .light .hljs-meta .hljs-string {
270
- color: #50a14f;
271
- }
272
-
273
- .light .hljs-attr,
274
- .light .hljs-variable,
275
- .light .hljs-template-variable,
276
- .light .hljs-type,
277
- .light .hljs-selector-class,
278
- .light .hljs-selector-attr,
279
- .light .hljs-selector-pseudo,
280
- .light .hljs-number {
281
- color: #986801;
282
- }
283
-
284
- .light .hljs-symbol,
285
- .light .hljs-bullet,
286
- .light .hljs-link,
287
- .light .hljs-meta,
288
- .light .hljs-selector-id,
289
- .light .hljs-title {
290
- color: #4078f2;
291
- }
292
-
293
- .light .hljs-built_in,
294
- .light .hljs-title.class_,
295
- .light .hljs-class .hljs-title {
296
- color: #c18401;
297
- }
298
-
299
- .light .hljs-emphasis {
300
- font-style: italic;
301
- }
302
-
303
- .light .hljs-strong {
304
- font-weight: bold;
305
- }
306
-
307
- .light .hljs-link {
308
- text-decoration: underline;
309
- }
310
-
311
- /* Code Ends */
312
-
313
- .light blockquote {
314
- background: #eee;
315
- color: #111;
316
- }
317
-
318
- .light code {
319
- background: #ddd;
320
- color: #000;
321
- }
322
-
323
- .light .search-container {
324
- background: rgba(0, 0, 0, 0.1);
325
- }
326
-
327
- .light .search-close-button svg {
328
- fill: #f00;
329
- }
330
-
331
- .light .search-container .wrapper {
332
- background: #eee;
333
- }
334
-
335
- .light .search-result-c {
336
- color: #aaa;
337
- }
338
-
339
- .light .search-box-c svg {
340
- fill: #333;
341
- }
342
-
343
- .light .search-input {
344
- background: #f7f7f7;
345
- color: #111;
346
- }
347
-
348
- .light .search-result-item {
349
- background: #f7f7f7;
350
- }
351
-
352
- .light .search-result-item:hover {
353
- background: #e9e9e9;
354
- }
355
-
356
- .light .search-result-item:active {
357
- background: #f7f7f7;
358
- }
359
-
360
- .light .search-result-item-title {
361
- color: #111;
362
- }
363
-
364
- .light .search-result-item-p {
365
- color: #aaa;
366
- }
367
-
368
- .light .mobile-menu-icon-container .icon-button {
369
- background: #e5e5e5;
370
- }
371
-
372
- .light .mobile-sidebar-container {
373
- background: #fff;
374
- }
375
-
376
- .light .mobile-sidebar-wrapper {
377
- background: #f7f7f7;
378
- }
379
-
380
- /* scroll bar */
381
- .light ::-webkit-scrollbar-track {
382
- background: #ddd;
383
- }
384
-
385
- .light ::-webkit-scrollbar-thumb {
386
- background: #aaa;
387
- outline: 0.06125rem solid #aaa;
388
- }
@@ -1 +0,0 @@
1
- @font-face{font-family:"heading";src:url(../fonts/WorkSans-Bold.ttf)format("truetype");font-display:swap}@font-face{font-family:"body";src:url(../fonts/OpenSans-Regular.ttf)format("truetype");font-display:swap}@font-face{font-family:"code";src:url(../fonts/Inconsolata-Regular.ttf)format("truetype");font-display:swap}:root{--outer-wrapper-max-width:65rem}*{box-sizing:border-box;margin:0;padding:0}html,body{min-height:100%;width:100%;line-height:1.75}body{font-family:"body";overflow-x:hidden;position:relative}b{font-family:heading}h1,h2,h3,h4,h5,h6{font-family:"heading";font-weight:400;line-height:1.75}h1{font-size:3.5rem;margin:0}h2{font-size:2.25rem;margin:2rem 0 0}h3{font-size:1.5rem}h4{font-size:1.25rem}h5{font-size:1rem}h6{font-size:1rem}img{max-width:100%}a{text-decoration:none}a:hover{text-decoration:underline}a img{margin-right:.5rem}p{margin:1rem 0}article ul{list-style:none}article ul li,article ol li{padding:.5rem 0}article ol,article ul{padding-left:3rem}article ol p,article ul p{margin:0}.variation{display:none}.signature-attributes{font-style:italic;font-weight:lighter}.ancestors a{text-decoration:none}.important{font-weight:700}.signature{font-family:"code"}.name{font-family:"code";font-weight:700}blockquote{font-size:.875rem;padding:.0625rem 1.25rem;border-radius:1rem;margin:.5rem 0}.details{border-radius:1rem;margin:1rem 0}.details .details-item-container{display:flex;padding:1rem 2rem}dt{font-family:heading}.details dt{float:left;min-width:11rem}.details ul{margin:0;display:inline-flex;list-style-type:none}.details ul li{display:inline-flex;margin-right:.6125rem;padding:0;word-break:break-word}.details ul li p{margin:0}.details pre.prettyprint{margin:0}.details .object-value{padding-top:0}.description{margin-bottom:2rem}.method-member-container table{margin-top:1rem}.pre-div .hljs-ln{margin:0}.code-caption{font-size:.875rem}.prettyprint{font-size:.875rem;overflow:auto}pre.prettyprint{margin-top:3rem}.prettyprint.source{width:inherit}.prettyprint code{display:block;font-size:1rem;line-height:1.75;padding:0 0 1rem}.prettyprint .compact{padding:0}h4.name{margin-top:.5rem}.params,.props,table{border-collapse:separate;border-spacing:0 .5rem;border-radius:.5rem;font-size:.875rem;margin:0;width:100%}table td:first-child,.params td:first-child,table thead th:first-child,.params thead th:first-child,.props thead th:first-child{border-top-left-radius:1rem;border-bottom-left-radius:1rem}table td:last-child,.params td:last-child,table thead th:last-child,.params thead th:last-child,.props thead th:last-child{border-top-right-radius:1rem;border-bottom-right-radius:1rem}table th,.params th{position:sticky;top:0}.params .name,.props .name,.name code{font-family:"code";font-size:1rem}.params td,.params th,.props td,.props th,th,td{display:table-cell;margin:0;padding:1rem 2rem;text-align:left;vertical-align:top}.params thead tr,.props thead tr{font-weight:700}.params .params thead tr,.props .props thead tr{font-weight:700}.params td.description>p:first-child,.props td.description>p:first-child{margin-top:0;padding-top:0}.params td.description>p:last-child,.props td.description>p:last-child{margin-bottom:0;padding-bottom:0}dl.param-type{margin-bottom:1rem;padding-bottom:1rem}.param-type dt,.param-type dd{display:inline-block}.param-type dd{font-family:"code";font-size:1rem}code{border-radius:.3rem;font-family:"code";font-size:1rem;padding:.1rem .4rem}.mt-20{margin-top:1.5rem}.codepen-form{bottom:0;position:absolute;right:.6125rem}.body-wrapper{display:flex;flex-direction:column;height:100vh;position:relative}.sidebar-container{position:fixed;display:flex;padding:1rem;top:0;bottom:0;left:0;width:25rem;z-index:10}.sidebar{border-radius:1rem;flex:1;padding:1.5rem 0;overflow:hidden;display:flex;flex-direction:column}.sidebar-title{margin:0;padding:0 2rem;text-decoration:none;font-size:1.5rem;font-family:heading}.sidebar-title:hover{text-decoration:none}.sidebar-items-container{margin-top:5rem;overflow:auto;flex:1;position:relative}.sidebar-section-title{padding:.5rem 2rem;font-family:heading;font-size:1.25rem;border-radius:1rem}.with-arrow{align-items:center;cursor:pointer;display:flex}.with-arrow div{flex:1}.with-arrow svg{height:1rem;width:1rem;transition:transform .3s}.with-arrow[data-isopen=true] svg{transform:rotate(180deg)}.sidebar-section-children-container{border-radius:.5rem;overflow:hidden}.sidebar-section-children a{display:block;width:100%;padding:.25rem 2rem}.sidebar-section-children a{text-decoration:none}.with-arrow[data-isopen=false]+.sidebar-section-children-container{height:0;overflow:hidden}.with-arrow[data-isopen=true]+.sidebar-section-children-container{height:auto}.toc-container{position:fixed;top:0;right:4rem;bottom:0;width:16rem;z-index:10}.toc-content{padding-top:10rem;display:flex;flex-direction:column;height:100%}#eed4d2a0bfd64539bb9df78095dec881{margin:2rem 0;flex:1;overflow:auto}.toc-list{padding-left:1rem;list-style:none}.toc-link{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;width:100%}.toc-link.is-active-link{font-family:heading}.has-anchor{position:relative}.link-anchor{padding:0 .5rem}.has-anchor .link-anchor{position:absolute;left:0;top:0;transform:translateX(-100%);text-decoration:none;visibility:hidden}.has-anchor:hover .link-anchor{visibility:visible}.navbar-container{position:fixed;z-index:10;top:0;left:25rem;right:25rem;height:7rem;padding-top:1rem;display:flex;justify-content:center}.navbar{display:flex;padding:1rem 4rem 1rem 2rem;flex:1;max-width:var(--outer-wrapper-max-width)}.navbar-left-items{display:flex;flex:1}.navbar-right-items{display:flex}.icon-button svg{height:1rem;width:1rem}.icon-button{background:0 0;position:relative;display:inline-flex;border:0;padding:.5rem;border-radius:50%;cursor:pointer;transition:background .3s}.navbar-right-item{display:flex;justify-content:center;align-items:center;margin:0 .25rem}.navbar-item{border-radius:.5rem;overflow:hidden}.navbar-item a{display:inline-block;padding:1rem 2rem;text-decoration:none;transition:.3s}.font-size-tooltip{display:flex;align-items:center;margin:0-.5rem}.font-size-tooltip .icon-button.disabled{pointer-events:none}.main-content{position:relative;flex:1;overflow:auto;display:flex;flex-direction:column;align-items:center;padding:7rem 25rem 0}.main-wrapper{width:100%;max-width:var(--outer-wrapper-max-width);padding:0 4rem 1rem}.p-h-n{padding:.4rem 1rem}.footer{width:100%;margin:5rem 0 0 0;border-radius:1rem;font-size:.875rem;display:flex;justify-content:center}.source-page+.footer{margin-top:3rem}.footer .wrapper{flex:1;padding:1rem 2rem;max-width:var(--outer-wrapper-max-width)}pre{position:relative}.hljs table td{background:0 0;padding:0 .6125rem;line-height:1.5;border-radius:0}.hljs .hljs-ln-numbers{width:2rem;white-space:nowrap;padding-left:1.5rem}.hljs-ln-line.hljs-ln-numbers::before{content:attr(data-line-number)}.pre-div{position:relative;border-radius:1rem;overflow:hidden;margin:2rem 0}.pre-top-bar-container{align-items:center;display:flex;justify-content:space-between;left:0;padding:.3125rem 1.5rem;position:absolute;right:0;top:0}.code-copy-icon-container{align-items:center;border-radius:50%;cursor:pointer;display:flex;height:1.875rem;justify-content:center;transition:.3s;width:1.875rem}.code-copy-icon-container>div{margin-top:.25rem;position:relative}.sm-icon{height:1rem;width:1rem}.code-lang-name{font-family:"body";font-size:.75rem}.tooltip{border-radius:.3125rem;opacity:0;padding:.1875rem .5rem;position:absolute;right:2rem;top:.3125rem;transform:scale(0);transition:.3s}.show-tooltip{opacity:1;transform:scale(1)}.allow-overflow{overflow:auto}.bold{font-family:heading}.search-container{position:fixed;top:0;bottom:0;right:0;left:0;justify-content:center;z-index:50;align-items:flex-start}.search-container .wrapper{width:100%;max-width:60rem;padding:4rem 2rem 2rem;border-radius:1rem;margin:3rem 25rem;position:relative}.search-close-button{position:absolute;top:1rem;right:1rem}.search-result-c-text{display:flex;justify-content:center;user-select:none}.search-result-c{min-height:20rem;max-height:40rem;overflow:auto;padding:2rem 0}.search-box-c{width:100%;position:relative;display:flex;align-items:center}.search-box-c svg{height:1.5rem;width:1.5rem;position:absolute;left:1.5rem}.search-input{border:0;border-radius:1rem;width:100%;flex:1;padding:1rem 2rem 1rem 4rem;font-family:body;font-size:1.25rem}.search-result-item{display:block;text-decoration:none;padding:1rem;border-radius:1rem;margin:1rem 0}.search-result-item:hover{text-decoration:none}.search-result-item:active{text-decoration:none}.search-result-item-title{font-family:heading;font-size:1.5rem;margin:0}.search-result-item-p{font-size:.875rem;margin:0}.mobile-menu-icon-container{display:none;position:fixed;bottom:1.5rem;right:2rem;z-index:30}.mobile-menu-icon-container .icon-button svg{height:2rem;width:2rem}.mobile-sidebar-container{position:fixed;top:0;right:0;left:0;bottom:0;padding:1rem;z-index:25;display:none}.mobile-sidebar-container.show{display:block}.mobile-sidebar-wrapper{border-radius:1rem;height:100%;width:100%;display:flex;flex-direction:column;padding-top:2rem}.mobile-nav-links{display:flex;flex-wrap:wrap;padding-top:2rem}.mobile-sidebar-items-c{flex:1;overflow:auto}.mobile-navbar-actions{display:flex;padding:1rem}.rel{position:relative}.icon-button.codepen-button svg{height:1.5rem;width:1.5rem}.table-div{width:100%;overflow:auto}.tag-default{overflow:auto}::-webkit-scrollbar{width:.3125rem;height:.3125rem}::-webkit-scrollbar-thumb,::-webkit-scrollbar-track{border-radius:1rem}@media screen and (max-width:100em){.toc-container{display:none}.main-content{padding:7rem 0 0 25rem}.search-container .wrapper{margin-right:1rem}.navbar-container{right:1rem}}@media screen and (min-width:65em){.mobile-sidebar-container.show{display:none}}@media screen and (max-width:65em){h1{font-size:3rem}h2{font-size:2rem}h3{font-size:1.875}h4,h5,h6{font-size:1rem}.main-wrapper{padding:0 1rem 1rem}.search-result-c{max-height:25rem}.mobile-menu-icon-container{display:block}.sidebar-container{display:none}.search-container .wrapper{margin-left:1rem}.main-content{padding-left:0;padding-top:1rem}.navbar-container{display:none}.source-page+.footer,.footer{margin-top:2rem}.has-anchor:hover .link-anchor{visibility:hidden}}::selection{background:#ffce76;color:#222}body{background-color:#1a1a1a;color:#fff}a,a:active{color:#0bf}hr{color:#222}h1,h2,h3,h4,h5,h6{color:#fff}.sidebar{background-color:#222;color:#999}.sidebar-title{color:#999}.sidebar-section-title{color:#999}.sidebar-section-title:hover{background:#252525}.with-arrow{fill:#999}.sidebar-section-children-container{background:#292929}.sidebar-section-children a:hover{background:#2c2c2c}.sidebar-section-children a{color:#fff}.navbar-container{background:#1a1a1a}.icon-button svg,.navbar-item a{color:#999;fill:#999}.font-size-tooltip .icon-button svg{fill:#fff}.font-size-tooltip .icon-button.disabled{background:#999}.icon-button:hover{background:#333}.icon-button:active{background:#444}.navbar-item a:active{color:#aaa;background-color:#222}.navbar-item:hover{background:#202020}.footer{background:#222;color:#999}.footer a{color:#999}.toc-link{color:#777;transition:color .3s;font-size:.875rem}.toc-link.is-active-link{color:#fff}.has-anchor .link-anchor{color:#555}.has-anchor .link-anchor:hover{color:#888}tt,code,kbd,samp{background:#333}.signature-attributes{color:#aaa}.ancestors{color:#999}.ancestors a{color:#999!important}.important{color:#c51313}.type-signature{color:#00918e}.name,.name a{color:#f7f7f7}.details{background:#222;color:#fff}.prettyprint{background:#222}.member-item-container strong,.method-member-container strong{color:#fff}.pre-top-bar-container{background:#292929}.prettyprint.source,.prettyprint code{background-color:#222;color:#c9d1d9}.pre-div{background-color:#222}.hljs .hljs-ln-numbers{color:#777}.hljs .selected{background:#444}.hljs .selected .hljs-ln-numbers{color:#eee}table .name,.params .name,.props .name,.name code{color:#fff}table td,.params td{background-color:#292929}table thead th,.params thead th,.props thead th{background-color:#222;color:#fff}table .params thead tr,.params .params thead tr,.props .props thead tr{background-color:#222;color:#fff}.disabled{color:#aaa}.code-lang-name{color:#ff8a00}.tooltip{background:#ffce76;color:#222}.hljs-comment{color:#8b949e}.hljs-doctag,.hljs-keyword,.hljs-template-tag,.hljs-variable.language_{color:#ff7b72}.hljs-template-variable,.hljs-type{color:#30ac7c}.hljs-meta,.hljs-string,.hljs-regexp{color:#a5d6ff}.hljs-title.class_,.hljs-title{color:#ffa657}.hljs-title.class_.inherited__,.hljs-title.function_{color:#d2a8ff}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id,.hljs-variable{color:#79c0ff}.hljs-meta .hljs-string,.hljs-regexp,.hljs-string{color:#a5d6ff}.hljs-built_in,.hljs-symbol{color:#ffa657}.hljs-code,.hljs-comment,.hljs-formula{color:#8b949e}.hljs-name,.hljs-quote,.hljs-selector-pseudo,.hljs-selector-tag{color:#7ee787}.hljs-subst{color:#c9d1d9}.hljs-section{color:#1f6feb;font-weight:700}.hljs-bullet{color:#f2cc60}.hljs-emphasis{color:#c9d1d9;font-style:italic}.hljs-strong{color:#c9d1d9;font-weight:700}blockquote{background:#222;color:#fff}.search-container{background:rgba(255,255,255,.1)}.icon-button.search-close-button svg{fill:#a00}.search-container .wrapper{background:#222}.search-result-c{color:#666}.search-box-c{fill:#333}.search-input{background:#333;color:#fff}.search-box-c svg{fill:#fff}.search-result-item{background:#333}.search-result-item:hover{background:#444}.search-result-item:active{background:#555}.search-result-item-title{color:#fff}.search-result-item-p{color:#aaa}.mobile-menu-icon-container .icon-button{background:#333}.mobile-sidebar-container{background:#1a1a1a}.mobile-sidebar-wrapper{background:#222}::-webkit-scrollbar-track{background:#333}::-webkit-scrollbar-thumb{background:#555;outline:.06125rem solid #555}.light ::selection{background:#ffce76;color:#1d1919}body.light{background-color:#fff;color:#111}.light a,.light a:active{color:#007bff}.light hr{color:#f7f7f7}.light h1,.light h2,.light h3,.light h4,.light h5,.light h6{color:#111}.light .sidebar{background-color:#f7f7f7;color:#222}.light .sidebar-title{color:#222}.light .sidebar-section-title{color:#222}.light .sidebar-section-title:hover{background:#eee}.light .with-arrow{fill:#111}.light .sidebar-section-children-container{background:#eee}.light .sidebar-section-children a:hover{background:#e0e0e0}.light .sidebar-section-children a{color:#111}.light .navbar-container{background:#fff}.light .icon-button svg,.light .navbar-item a{color:#222;fill:#222}.light .tippy-box{background:#eee;color:#111}.light .tippy-arrow{color:#f1f1f1}.light .font-size-tooltip .icon-button svg{fill:#111}.light .font-size-tooltip .icon-button.disabled svg{fill:#999}.light .icon-button:hover{background:#ddd}.light .icon-button:active{background:#ccc}.light .navbar-item a:active{color:#333;background-color:#eee}.light .navbar-item:hover{background:#f7f7f7}.light .footer{background:#f7f7f7;color:#111}.light .footer a{color:#111}.light .toc-link{color:#999;transition:color .3s;font-size:.875rem}.light .toc-link.is-active-link{color:#111}.light .has-anchor .link-anchor{color:#ddd}.light .has-anchor .link-anchor:hover{color:#ccc}.light .signature-attributes{color:#aaa}.light .ancestors{color:#999}.light .ancestors a{color:#999!important}.light .important{color:#ee1313}.light .type-signature{color:#00918e}.light .name,.light .name a{color:#293a80}.light .details{background:#f9f9f9;color:#101010}.light .member-item-container strong,.light .method-member-container strong{color:#000}.light .prettyprint{background:#f7f7f7}.light .pre-div{background:#f7f7f7}.light .hljs .hljs-ln-numbers{color:#aaa}.light .hljs .selected{background:#ccc}.light table.hljs-ln td{background:0 0}.light .hljs .selected .hljs-ln-numbers{color:#444}.light .pre-top-bar-container{background-color:#eee}.light .prettyprint code{background-color:#f7f7f7}.light table .name,.light .params .name,.light .props .name,.light .name code{color:#4d4e53}.light table td,.light .params td{background:#f7f7f7}.light table thead th,.light .params thead th,.light .props thead th{background-color:#eee;color:#111}.light table .params thead tr,.light .params .params thead tr,.light .props .props thead tr{background-color:#eee;color:#111}.light .disabled{color:#454545}.light .code-lang-name{color:red}.light .tooltip{background:#ffce76;color:#000}.light .hljs-comment,.light .hljs-quote{color:#a0a1a7}.light .hljs-doctag,.light .hljs-keyword,.light .hljs-formula{color:#a626a4}.light .hljs-section,.light .hljs-name,.light .hljs-selector-tag,.light .hljs-deletion,.light .hljs-subst{color:#e45649}.light .hljs-literal{color:#0184bb}.light .hljs-string,.light .hljs-regexp,.light .hljs-addition,.light .hljs-attribute,.light .hljs-meta .hljs-string{color:#50a14f}.light .hljs-attr,.light .hljs-variable,.light .hljs-template-variable,.light .hljs-type,.light .hljs-selector-class,.light .hljs-selector-attr,.light .hljs-selector-pseudo,.light .hljs-number{color:#986801}.light .hljs-symbol,.light .hljs-bullet,.light .hljs-link,.light .hljs-meta,.light .hljs-selector-id,.light .hljs-title{color:#4078f2}.light .hljs-built_in,.light .hljs-title.class_,.light .hljs-class .hljs-title{color:#c18401}.light .hljs-emphasis{font-style:italic}.light .hljs-strong{font-weight:700}.light .hljs-link{text-decoration:underline}.light blockquote{background:#eee;color:#111}.light code{background:#ddd;color:#000}.light .search-container{background:rgba(0,0,0,.1)}.light .search-close-button svg{fill:red}.light .search-container .wrapper{background:#eee}.light .search-result-c{color:#aaa}.light .search-box-c svg{fill:#333}.light .search-input{background:#f7f7f7;color:#111}.light .search-result-item{background:#f7f7f7}.light .search-result-item:hover{background:#e9e9e9}.light .search-result-item:active{background:#f7f7f7}.light .search-result-item-title{color:#111}.light .search-result-item-p{color:#aaa}.light .mobile-menu-icon-container .icon-button{background:#e5e5e5}.light .mobile-sidebar-container{background:#fff}.light .mobile-sidebar-wrapper{background:#f7f7f7}.light ::-webkit-scrollbar-track{background:#ddd}.light ::-webkit-scrollbar-thumb{background:#aaa;outline:.06125rem solid #aaa}
@@ -1,25 +0,0 @@
1
- const expect = require('chai').expect
2
- const error = require('../helper/error')
3
- const { faker } = require('@faker-js/faker')
4
-
5
- describe('helper.error()', function () {
6
- context('without argument', function () {
7
- it("should return an error with message 'Internal server error'", function () {
8
- expect(error()).to.be.an('error').and.have.own.property('message', 'Internal server error')
9
- })
10
- })
11
- context('with only text argument', function () {
12
- const text = faker.string.alphanumeric({ length: { min: 5, max: 20 } })
13
- it(`should return an error with message '${text}'`, function () {
14
- expect(error(text)).to.be.an('error').and.have.own.property('message', text)
15
- })
16
- })
17
- context('with text argument and payload', function () {
18
- const object = faker.science.chemicalElement()
19
- it(`should return an error with message '${object.name}' and payload '${JSON.stringify(object)}'`, function () {
20
- const err = error(object.name, object)
21
- expect(err).to.be.an('error').and.have.own.property('message', object.name)
22
- expect(err).to.be.an('error').and.to.include(object)
23
- })
24
- })
25
- })
@@ -1,28 +0,0 @@
1
- const expect = require('chai').expect
2
- const resolvePath = require('../helper/path-resolve')
3
-
4
- describe('helper.resolvePath()', function () {
5
- context('without argument', function () {
6
- it('should throw error', function () {
7
- expect(() => resolvePath()).to.throw(TypeError)
8
- })
9
- })
10
-
11
- context('argument is a file', function () {
12
- it('should resolve its absolute file with linux syntax', function () {
13
- const file = 'test/helper-resolvePath.js'
14
- const result = process.cwd().replace(/\\/g, '/') + '/' + file
15
- expect(resolvePath(file)).to.equal(result)
16
- })
17
- })
18
-
19
- context("argument is a file and useSlah is 'false'", function () {
20
- it('should resolve its absolute file with current os syntax', function () {
21
- const file = 'test\\helper-resolvePath.js'
22
- const result = process.cwd() + '\\' + file
23
- expect(resolvePath(file, false)).to.equal(result)
24
- })
25
- })
26
-
27
-
28
- })
File without changes