bajo 0.0.1 → 0.2.0

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 (160) hide show
  1. package/.jsdoc.conf.json +38 -0
  2. package/README.md +57 -3
  3. package/bajoBook/book/doc/.metadata.json +28 -0
  4. package/bajoBook/book/doc/How-to-Make-a-Paper-Boat-564x400@2x.jpg +0 -0
  5. package/bajoBook/book/doc/pages/guides/definition.md +7 -0
  6. package/bajoBook/book/doc/pages/guides/intro.md +3 -0
  7. package/bajoBook/book/doc/pages/guides/setup.md +22 -0
  8. package/bajoBook/book/reference/.metadata.json +152 -0
  9. package/bajoBook/book/reference/concept-leadership-business-with-paper-boats.jpg +0 -0
  10. package/bajoBook/book/reference/pages/configuration/configuration-file.md +52 -0
  11. package/bajoBook/book/reference/pages/helper/break-ns-path.md +24 -0
  12. package/bajoBook/book/reference/pages/helper/build-collections.md +19 -0
  13. package/bajoBook/book/reference/pages/helper/call-helper-or-handler.md +35 -0
  14. package/bajoBook/book/reference/pages/helper/current-loc.md +28 -0
  15. package/bajoBook/book/reference/pages/helper/dayjs.md +13 -0
  16. package/bajoBook/book/reference/pages/helper/defaults-deep.md +29 -0
  17. package/bajoBook/book/reference/pages/helper/dump.md +32 -0
  18. package/bajoBook/book/reference/pages/helper/each-plugins.md +24 -0
  19. package/bajoBook/book/reference/pages/helper/envs.md +11 -0
  20. package/bajoBook/book/reference/pages/helper/error.md +29 -0
  21. package/bajoBook/book/reference/pages/helper/fatal.md +18 -0
  22. package/bajoBook/book/reference/pages/helper/freeze.md +13 -0
  23. package/bajoBook/book/reference/pages/helper/generate-id.md +36 -0
  24. package/bajoBook/book/reference/pages/helper/get-config.md +27 -0
  25. package/bajoBook/book/reference/pages/helper/get-global-module-dir.md +13 -0
  26. package/bajoBook/book/reference/pages/helper/get-helper.md +13 -0
  27. package/bajoBook/book/reference/pages/helper/get-item-by-name.md +13 -0
  28. package/bajoBook/book/reference/pages/helper/get-key-by-value.md +13 -0
  29. package/bajoBook/book/reference/pages/helper/get-module-dir.md +13 -0
  30. package/bajoBook/book/reference/pages/helper/get-plugin-data-dir.md +13 -0
  31. package/bajoBook/book/reference/pages/helper/get-plugin-name.md +13 -0
  32. package/bajoBook/book/reference/pages/helper/get-plugin.md +13 -0
  33. package/bajoBook/book/reference/pages/helper/import-module.md +13 -0
  34. package/bajoBook/book/reference/pages/helper/import-pkg.md +13 -0
  35. package/bajoBook/book/reference/pages/helper/is-empty-dir.md +13 -0
  36. package/bajoBook/book/reference/pages/helper/is-log-in-range.md +13 -0
  37. package/bajoBook/book/reference/pages/helper/is-set.md +13 -0
  38. package/bajoBook/book/reference/pages/helper/is-valid-app.md +13 -0
  39. package/bajoBook/book/reference/pages/helper/is-valid-plugin.md +13 -0
  40. package/bajoBook/book/reference/pages/helper/log-levels.md +13 -0
  41. package/bajoBook/book/reference/pages/helper/log.md +13 -0
  42. package/bajoBook/book/reference/pages/helper/paginate.md +13 -0
  43. package/bajoBook/book/reference/pages/helper/pascal-case.md +13 -0
  44. package/bajoBook/book/reference/pages/helper/print.md +13 -0
  45. package/bajoBook/book/reference/pages/helper/read-config.md +13 -0
  46. package/bajoBook/book/reference/pages/helper/read-json.md +13 -0
  47. package/bajoBook/book/reference/pages/helper/resolve-path.md +13 -0
  48. package/bajoBook/book/reference/pages/helper/resolve-tpl-path.md +13 -0
  49. package/bajoBook/book/reference/pages/helper/run-hook.md +13 -0
  50. package/bajoBook/book/reference/pages/helper/save-as-download.md +13 -0
  51. package/bajoBook/book/reference/pages/helper/titleize.md +13 -0
  52. package/bajoBook/book/reference/pages/helper/white-space.md +13 -0
  53. package/boot/attach-helper.js +34 -0
  54. package/boot/boot-order.js +34 -0
  55. package/boot/build-config.js +99 -0
  56. package/boot/create-scope.js +36 -0
  57. package/boot/exit-handler.js +60 -0
  58. package/boot/helper/break-ns-path.js +17 -0
  59. package/boot/helper/build-collections.js +34 -0
  60. package/boot/helper/call-helper-or-handler.js +15 -0
  61. package/boot/helper/current-loc.js +11 -0
  62. package/boot/helper/defaults-deep.js +14 -0
  63. package/boot/helper/dump.js +10 -0
  64. package/boot/helper/each-plugins.js +104 -0
  65. package/boot/helper/envs.js +14 -0
  66. package/boot/helper/error.js +67 -0
  67. package/boot/helper/fatal.js +12 -0
  68. package/boot/helper/generate-id.js +20 -0
  69. package/boot/helper/get-config.js +19 -0
  70. package/boot/helper/get-global-module-dir.js +27 -0
  71. package/boot/helper/get-helper.js +12 -0
  72. package/boot/helper/get-item-by-name.js +26 -0
  73. package/boot/helper/get-key-by-value.js +5 -0
  74. package/boot/helper/get-module-dir.js +22 -0
  75. package/boot/helper/get-plugin-data-dir.js +12 -0
  76. package/boot/helper/get-plugin-name.js +39 -0
  77. package/boot/helper/get-plugin.js +14 -0
  78. package/boot/helper/import-module.js +25 -0
  79. package/boot/helper/import-pkg.js +67 -0
  80. package/boot/helper/is-empty-dir.js +9 -0
  81. package/boot/helper/is-log-in-range.js +10 -0
  82. package/boot/helper/is-set.js +5 -0
  83. package/boot/helper/is-valid-app.js +12 -0
  84. package/boot/helper/is-valid-plugin.js +12 -0
  85. package/boot/helper/log-levels.js +19 -0
  86. package/boot/helper/paginate.js +26 -0
  87. package/boot/helper/pascal-case.js +7 -0
  88. package/boot/helper/print.js +99 -0
  89. package/boot/helper/read-config.js +46 -0
  90. package/boot/helper/read-json.js +10 -0
  91. package/boot/helper/resolve-path.js +15 -0
  92. package/boot/helper/resolve-tpl-path.js +15 -0
  93. package/boot/helper/run-hook.js +46 -0
  94. package/boot/helper/save-as-download.js +17 -0
  95. package/boot/helper/titleize.js +14 -0
  96. package/boot/helper/white-space.js +3 -0
  97. package/boot/index.js +60 -0
  98. package/boot/lib/bora.js +97 -0
  99. package/boot/lib/build-helper.js +57 -0
  100. package/boot/lib/logger.js +75 -0
  101. package/boot/lib/omitted-plugin-keys.js +3 -0
  102. package/boot/lib/parse-args-argv.js +75 -0
  103. package/boot/lib/parse-env.js +36 -0
  104. package/boot/lib/shim.js +14 -0
  105. package/boot/plugins/attach-helper.js +20 -0
  106. package/boot/plugins/build-config.js +82 -0
  107. package/boot/plugins/check-clash.js +18 -0
  108. package/boot/plugins/check-dependency.js +37 -0
  109. package/boot/plugins/collect-config-handlers.js +25 -0
  110. package/boot/plugins/collect-exit-handlers.js +23 -0
  111. package/boot/plugins/collect-hooks.js +34 -0
  112. package/boot/plugins/extend-config.js +21 -0
  113. package/boot/plugins/index.js +28 -0
  114. package/boot/plugins/run.js +31 -0
  115. package/boot/run-tool.js +34 -0
  116. package/docs/boot_build-config.js.html +75 -0
  117. package/docs/boot_create-scope.js.html +25 -0
  118. package/docs/boot_index.js.html +43 -0
  119. package/docs/data/search.json +1 -0
  120. package/docs/fonts/Inconsolata-Regular.ttf +0 -0
  121. package/docs/fonts/OpenSans-Regular.ttf +0 -0
  122. package/docs/fonts/WorkSans-Bold.ttf +0 -0
  123. package/docs/helper_emit.js.html +18 -0
  124. package/docs/helper_envs.js.html +16 -0
  125. package/docs/helper_error.js.html +25 -0
  126. package/docs/helper_get-bajo.js.html +42 -0
  127. package/docs/helper_index.js.html +39 -0
  128. package/docs/helper_log-levels.js.html +20 -0
  129. package/docs/helper_set-hook.js.html +38 -0
  130. package/docs/helper_walk-bajos.js.html +51 -0
  131. package/docs/index.html +16 -0
  132. package/docs/module-boot.html +3 -0
  133. package/docs/module-boot_buildConfig.html +3 -0
  134. package/docs/module-boot_createScope.html +3 -0
  135. package/docs/module-helper.html +7 -0
  136. package/docs/module-helper_setHook.html +4 -0
  137. package/docs/module-helper_walkBajos.html +6 -0
  138. package/docs/scripts/core.js +655 -0
  139. package/docs/scripts/core.min.js +23 -0
  140. package/docs/scripts/resize.js +90 -0
  141. package/docs/scripts/search.js +265 -0
  142. package/docs/scripts/search.min.js +6 -0
  143. package/docs/scripts/third-party/Apache-License-2.0.txt +202 -0
  144. package/docs/scripts/third-party/fuse.js +9 -0
  145. package/docs/scripts/third-party/hljs-line-num-original.js +369 -0
  146. package/docs/scripts/third-party/hljs-line-num.js +1 -0
  147. package/docs/scripts/third-party/hljs-original.js +5171 -0
  148. package/docs/scripts/third-party/hljs.js +1 -0
  149. package/docs/scripts/third-party/popper.js +5 -0
  150. package/docs/scripts/third-party/tippy.js +1 -0
  151. package/docs/scripts/third-party/tocbot.js +672 -0
  152. package/docs/scripts/third-party/tocbot.min.js +1 -0
  153. package/docs/styles/clean-jsdoc-theme-base.css +975 -0
  154. package/docs/styles/clean-jsdoc-theme-dark.css +407 -0
  155. package/docs/styles/clean-jsdoc-theme-light.css +388 -0
  156. package/docs/styles/clean-jsdoc-theme.min.css +1 -0
  157. package/package.json +36 -4
  158. package/test/helper-error.js +25 -0
  159. package/test/helper-isSet.js +41 -0
  160. package/test/helper-pathResolve.js +28 -0
@@ -0,0 +1,388 @@
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
+ }
@@ -0,0 +1 @@
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}
package/package.json CHANGED
@@ -1,11 +1,13 @@
1
1
  {
2
2
  "name": "bajo",
3
- "version": "0.0.1",
3
+ "version": "0.2.0",
4
4
  "description": "A framework to build a giant monstrous app rapidly",
5
- "main": "index.js",
5
+ "main": "boot/index.js",
6
6
  "scripts": {
7
- "test": "echo \"Error: no test specified\" && exit 1"
7
+ "build-doc": "jsdoc -c .jsdoc.conf.json",
8
+ "test": "mocha"
8
9
  },
10
+ "type": "module",
9
11
  "repository": {
10
12
  "type": "git",
11
13
  "url": "git+https://github.com/ardhi/bajo.git"
@@ -21,5 +23,35 @@
21
23
  "bugs": {
22
24
  "url": "https://github.com/ardhi/bajo/issues"
23
25
  },
24
- "homepage": "https://github.com/ardhi/bajo#readme"
26
+ "homepage": "https://github.com/ardhi/bajo#readme",
27
+ "dependencies": {
28
+ "add-filename-increment": "^1.0.0",
29
+ "callsites": "^4.0.0",
30
+ "dayjs": "^1.11.8",
31
+ "deep-freeze-strict": "^1.1.1",
32
+ "delay": "^6.0.0",
33
+ "dotenv": "^16.1.3",
34
+ "dotenv-parse-variables": "^2.0.0",
35
+ "empty-dir": "^3.0.0",
36
+ "fast-glob": "^3.2.12",
37
+ "flat": "^5.0.2",
38
+ "fs-extra": "^11.1.1",
39
+ "global-modules-path": "^3.0.0",
40
+ "lodash-es": "^4.17.21",
41
+ "nanoid": "^4.0.2",
42
+ "node-fetch": "^3.3.1",
43
+ "omit-deep": "^0.3.0",
44
+ "ora": "^6.3.1",
45
+ "outmatch": "^0.7.0",
46
+ "proper-lockfile": "^4.1.2",
47
+ "semver": "^7.5.1",
48
+ "sprintf-js": "^1.1.2",
49
+ "yargs": "^17.7.2"
50
+ },
51
+ "devDependencies": {
52
+ "@faker-js/faker": "^8.0.2",
53
+ "chai": "^4.3.7",
54
+ "clean-jsdoc-theme": "^4.2.7",
55
+ "sinon": "^15.1.2"
56
+ }
25
57
  }
@@ -0,0 +1,25 @@
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
+ })
@@ -0,0 +1,41 @@
1
+ const expect = require('chai').expect
2
+ const { faker } = require('@faker-js/faker')
3
+ const isSet = require('../helper/is-set')
4
+
5
+ describe('helper.isSet()', function () {
6
+ context('without argument', function () {
7
+ it("should return 'false'", function () {
8
+ expect(isSet()).to.equal(false)
9
+ })
10
+ })
11
+ context("with 'null' as argument", function () {
12
+ it("should return 'false'", function () {
13
+ expect(isSet(null)).to.equal(false)
14
+ })
15
+ })
16
+ context("with 'undefined' as argument", function () {
17
+ it("should return 'false'", function () {
18
+ expect(isSet(undefined)).to.equal(false)
19
+ })
20
+ })
21
+ context('with any number as argument', function () {
22
+ it("should return 'true'", function () {
23
+ expect(isSet(faker.number.float())).to.equal(true)
24
+ })
25
+ })
26
+ context('with any string as argument', function () {
27
+ it("should return 'true'", function () {
28
+ expect(isSet(faker.string.alphanumeric())).to.equal(true)
29
+ })
30
+ })
31
+ context('with empty object as argument', function () {
32
+ it("should return 'true'", function () {
33
+ expect(isSet({})).to.equal(true)
34
+ })
35
+ })
36
+ context('with non empty object as argument', function () {
37
+ it("should return 'true'", function () {
38
+ expect(isSet({ a: 1, b: 2 })).to.equal(true)
39
+ })
40
+ })
41
+ })
@@ -0,0 +1,28 @@
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
+ })