@vandenberghinc/volt 1.1.26 → 1.1.28
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.
- package/backend/dist/cjs/{blacklist.d.ts → backend/src/blacklist.d.ts} +5 -3
- package/backend/dist/cjs/{blacklist.js → backend/src/blacklist.js} +8 -5
- package/backend/dist/cjs/{cli.js → backend/src/cli.js} +29 -47
- package/backend/dist/cjs/backend/src/database/collection.d.ts +1543 -0
- package/backend/dist/cjs/backend/src/database/collection.js +3042 -0
- package/backend/dist/cjs/backend/src/database/database.d.ts +66 -0
- package/backend/dist/cjs/{database → backend/src/database}/database.js +48 -43
- package/backend/dist/cjs/backend/src/database/filters/filters.d.ts +6 -0
- package/backend/dist/cjs/backend/src/database/filters/filters.js +15 -0
- package/backend/dist/cjs/backend/src/database/filters/strict_filter.d.ts +223 -0
- package/backend/dist/cjs/backend/src/database/filters/strict_filter.js +15 -0
- package/backend/dist/cjs/backend/src/database/filters/strict_filter_test.js +443 -0
- package/backend/dist/cjs/backend/src/database/filters/strict_filter_test_v0.js +15 -0
- package/backend/dist/cjs/backend/src/database/filters/strict_filter_v0.d.ts +50 -0
- package/backend/dist/cjs/backend/src/database/filters/strict_filter_v0.js +15 -0
- package/backend/dist/cjs/backend/src/database/filters/strict_filter_v1.d.ts +76 -0
- package/backend/dist/cjs/backend/src/database/filters/strict_filter_v1.js +15 -0
- package/backend/dist/cjs/backend/src/database/filters/strict_filter_v2.d.ts +75 -0
- package/backend/dist/cjs/backend/src/database/filters/strict_filter_v2.js +15 -0
- package/backend/dist/cjs/backend/src/database/filters/strict_filter_v3.d.ts +219 -0
- package/backend/dist/cjs/backend/src/database/filters/strict_filter_v3.js +15 -0
- package/backend/dist/cjs/backend/src/database/filters/strict_update_filter.d.ts +165 -0
- package/backend/dist/cjs/backend/src/database/filters/strict_update_filter.js +15 -0
- package/backend/dist/cjs/backend/src/database/filters/strict_update_filter_test.d.ts +5 -0
- package/backend/dist/cjs/backend/src/database/filters/strict_update_filter_test.js +355 -0
- package/backend/dist/cjs/backend/src/database/flatten.d.ts +75 -0
- package/backend/dist/cjs/{logger.js → backend/src/database/flatten.js} +18 -7
- package/backend/dist/cjs/backend/src/database/flatten_test.js +175 -0
- package/backend/dist/cjs/backend/src/database/quota/quota.d.ts +461 -0
- package/backend/dist/cjs/backend/src/database/quota/quota.js +1014 -0
- package/backend/dist/cjs/backend/src/database/quota/quota_v1.d.ts +534 -0
- package/backend/dist/cjs/backend/src/database/quota/quota_v1.js +1087 -0
- package/backend/dist/cjs/backend/src/database/quota/safe_int.d.ts +293 -0
- package/backend/dist/cjs/backend/src/database/quota/safe_int.js +573 -0
- package/backend/dist/{esm → cjs/backend/src}/endpoint.d.ts +69 -46
- package/backend/dist/cjs/{endpoint.js → backend/src/endpoint.js} +87 -101
- package/backend/dist/cjs/backend/src/errors/index.d.ts +7 -0
- package/backend/dist/cjs/backend/src/errors/index.js +25 -0
- package/backend/dist/{esm/utils.d.ts → cjs/backend/src/errors/internal_external.d.ts} +14 -22
- package/backend/dist/cjs/backend/src/errors/internal_external.js +85 -0
- package/backend/dist/cjs/backend/src/errors/invalid_usage_error.d.ts +38 -0
- package/backend/dist/cjs/{mutex.js → backend/src/errors/invalid_usage_error.js} +20 -37
- package/backend/dist/cjs/backend/src/errors/system_error.d.ts +230 -0
- package/backend/dist/cjs/backend/src/errors/system_error.js +393 -0
- package/backend/dist/cjs/backend/src/events.d.ts +54 -0
- package/backend/dist/cjs/backend/src/events.js +15 -0
- package/backend/dist/cjs/{frontend.js → backend/src/frontend.js} +1 -1
- package/backend/dist/cjs/{image_endpoint.d.ts → backend/src/image_endpoint.d.ts} +16 -1
- package/backend/dist/cjs/{image_endpoint.js → backend/src/image_endpoint.js} +3 -5
- package/backend/dist/cjs/backend/src/logger.d.ts +5 -0
- package/backend/dist/cjs/backend/src/logger.js +15 -0
- package/backend/dist/cjs/backend/src/meta.d.ts +64 -0
- package/backend/dist/cjs/{meta.js → backend/src/meta.js} +9 -12
- package/backend/dist/cjs/backend/src/payments/paddle.d.ts +326 -0
- package/backend/dist/cjs/{payments → backend/src/payments}/paddle.js +377 -327
- package/backend/dist/cjs/backend/src/plugins/browser.d.ts +1 -0
- package/backend/dist/cjs/backend/src/plugins/browser.js +15 -0
- package/backend/dist/cjs/backend/src/plugins/mail/mail.d.ts +248 -0
- package/backend/dist/cjs/backend/src/plugins/mail/mail.js +379 -0
- package/backend/dist/{esm → cjs/backend/src}/plugins/mail/ui.d.ts +23 -0
- package/backend/dist/cjs/backend/src/plugins/pdf.d.ts +1 -0
- package/backend/dist/cjs/backend/src/rate_limit.d.ts +145 -0
- package/backend/dist/cjs/backend/src/rate_limit.js +549 -0
- package/backend/dist/cjs/{route.d.ts → backend/src/route.d.ts} +3 -10
- package/backend/dist/cjs/{route.js → backend/src/route.js} +23 -21
- package/backend/dist/cjs/backend/src/server.d.ts +485 -0
- package/backend/dist/cjs/{server.js → backend/src/server.js} +688 -873
- package/backend/dist/cjs/backend/src/splash_screen.d.ts +80 -0
- package/backend/dist/cjs/{splash_screen.js → backend/src/splash_screen.js} +24 -3
- package/backend/dist/cjs/backend/src/status.d.ts +74 -0
- package/backend/dist/cjs/{status.js → backend/src/status.js} +64 -64
- package/backend/dist/cjs/backend/src/stream.d.ts +376 -0
- package/backend/dist/cjs/{stream.js → backend/src/stream.js} +299 -276
- package/backend/dist/cjs/backend/src/users.d.ts +807 -0
- package/backend/dist/cjs/backend/src/users.js +1971 -0
- package/backend/dist/cjs/backend/src/utils.d.ts +16 -0
- package/backend/dist/cjs/{utils.js → backend/src/utils.js} +14 -77
- package/backend/dist/{esm → cjs/backend/src}/view.d.ts +33 -11
- package/backend/dist/cjs/backend/src/view.js +508 -0
- package/backend/dist/{esm → cjs/backend/src}/volt.d.ts +10 -1
- package/backend/dist/cjs/{volt.js → backend/src/volt.js} +8 -5
- package/backend/dist/cjs/frontend/src/modules/request.d.ts +70 -0
- package/backend/dist/cjs/frontend/src/modules/request.js +99 -0
- package/backend/dist/esm/{blacklist.d.ts → backend/src/blacklist.d.ts} +5 -3
- package/backend/dist/esm/{blacklist.js → backend/src/blacklist.js} +9 -6
- package/backend/dist/esm/{cli.js → backend/src/cli.js} +43 -60
- package/backend/dist/esm/backend/src/database/collection.d.ts +1543 -0
- package/backend/dist/esm/backend/src/database/collection.js +3510 -0
- package/backend/dist/esm/backend/src/database/database.d.ts +66 -0
- package/backend/dist/esm/{database → backend/src/database}/database.js +62 -103
- package/backend/dist/esm/backend/src/database/document.d.ts +1 -0
- package/backend/dist/esm/backend/src/database/document.js +558 -0
- package/backend/dist/esm/backend/src/database/filters/filters.d.ts +6 -0
- package/backend/dist/esm/backend/src/database/filters/filters.js +1 -0
- package/backend/dist/esm/backend/src/database/filters/strict_filter.d.ts +223 -0
- package/backend/dist/esm/backend/src/database/filters/strict_filter.js +3 -0
- package/backend/dist/esm/backend/src/database/filters/strict_filter_test.d.ts +1 -0
- package/backend/dist/esm/backend/src/database/filters/strict_filter_test.js +505 -0
- package/backend/dist/esm/backend/src/database/filters/strict_filter_test_v0.d.ts +1 -0
- package/backend/dist/esm/backend/src/database/filters/strict_filter_test_v0.js +712 -0
- package/backend/dist/esm/backend/src/database/filters/strict_filter_v0.d.ts +50 -0
- package/backend/dist/esm/backend/src/database/filters/strict_filter_v0.js +5 -0
- package/backend/dist/esm/backend/src/database/filters/strict_filter_v1.d.ts +76 -0
- package/backend/dist/esm/backend/src/database/filters/strict_filter_v1.js +44 -0
- package/backend/dist/esm/backend/src/database/filters/strict_filter_v2.d.ts +75 -0
- package/backend/dist/esm/backend/src/database/filters/strict_filter_v2.js +5 -0
- package/backend/dist/esm/backend/src/database/filters/strict_filter_v3.d.ts +219 -0
- package/backend/dist/esm/backend/src/database/filters/strict_filter_v3.js +1 -0
- package/backend/dist/esm/backend/src/database/filters/strict_update_filter.d.ts +165 -0
- package/backend/dist/esm/backend/src/database/filters/strict_update_filter.js +5 -0
- package/backend/dist/esm/backend/src/database/filters/strict_update_filter_test.d.ts +5 -0
- package/backend/dist/esm/backend/src/database/filters/strict_update_filter_test.js +405 -0
- package/backend/dist/esm/backend/src/database/flatten.d.ts +75 -0
- package/backend/dist/esm/backend/src/database/flatten.js +22 -0
- package/backend/dist/esm/backend/src/database/flatten_test.d.ts +1 -0
- package/backend/dist/esm/backend/src/database/flatten_test.js +174 -0
- package/backend/dist/esm/backend/src/database/quota/quota.d.ts +461 -0
- package/backend/dist/esm/backend/src/database/quota/quota.js +1118 -0
- package/backend/dist/esm/backend/src/database/quota/quota_v1.d.ts +534 -0
- package/backend/dist/esm/backend/src/database/quota/quota_v1.js +1242 -0
- package/backend/dist/esm/backend/src/database/quota/safe_int.d.ts +293 -0
- package/backend/dist/esm/backend/src/database/quota/safe_int.js +602 -0
- package/backend/dist/{cjs → esm/backend/src}/endpoint.d.ts +69 -46
- package/backend/dist/esm/{endpoint.js → backend/src/endpoint.js} +136 -127
- package/backend/dist/esm/backend/src/errors/index.d.ts +7 -0
- package/backend/dist/esm/backend/src/errors/index.js +7 -0
- package/backend/dist/{cjs/utils.d.ts → esm/backend/src/errors/internal_external.d.ts} +14 -22
- package/backend/dist/esm/backend/src/errors/internal_external.js +70 -0
- package/backend/dist/esm/backend/src/errors/invalid_usage_error.d.ts +38 -0
- package/backend/dist/esm/backend/src/errors/invalid_usage_error.js +30 -0
- package/backend/dist/esm/backend/src/errors/system_error.d.ts +230 -0
- package/backend/dist/esm/backend/src/errors/system_error.js +402 -0
- package/backend/dist/esm/backend/src/events.d.ts +54 -0
- package/backend/dist/esm/backend/src/events.js +5 -0
- package/backend/dist/esm/{frontend.js → backend/src/frontend.js} +1 -1
- package/backend/dist/esm/{image_endpoint.d.ts → backend/src/image_endpoint.d.ts} +16 -1
- package/backend/dist/esm/{image_endpoint.js → backend/src/image_endpoint.js} +16 -20
- package/backend/dist/esm/backend/src/logger.d.ts +5 -0
- package/backend/dist/esm/backend/src/logger.js +8 -0
- package/backend/dist/esm/backend/src/meta.d.ts +64 -0
- package/backend/dist/esm/{meta.js → backend/src/meta.js} +15 -54
- package/backend/dist/esm/backend/src/payments/paddle.d.ts +326 -0
- package/backend/dist/esm/{payments → backend/src/payments}/paddle.js +417 -452
- package/backend/dist/esm/backend/src/plugins/browser.d.ts +1 -0
- package/backend/dist/esm/backend/src/plugins/browser.js +170 -0
- package/backend/dist/esm/backend/src/plugins/mail/mail.d.ts +248 -0
- package/backend/dist/esm/backend/src/plugins/mail/mail.js +389 -0
- package/backend/dist/{cjs → esm/backend/src}/plugins/mail/ui.d.ts +23 -0
- package/backend/dist/esm/{plugins → backend/src/plugins}/mail/ui.js +3 -6
- package/backend/dist/esm/backend/src/plugins/pdf.d.ts +1 -0
- package/backend/dist/esm/{plugins → backend/src/plugins}/pdf.js +3 -3
- package/backend/dist/esm/backend/src/rate_limit.d.ts +145 -0
- package/backend/dist/esm/backend/src/rate_limit.js +667 -0
- package/backend/dist/esm/{route.d.ts → backend/src/route.d.ts} +3 -10
- package/backend/dist/esm/{route.js → backend/src/route.js} +26 -21
- package/backend/dist/esm/backend/src/server.d.ts +485 -0
- package/backend/dist/esm/{server.js → backend/src/server.js} +891 -1441
- package/backend/dist/esm/backend/src/splash_screen.d.ts +80 -0
- package/backend/dist/esm/{splash_screen.js → backend/src/splash_screen.js} +42 -55
- package/backend/dist/esm/backend/src/status.d.ts +74 -0
- package/backend/dist/esm/backend/src/status.js +199 -0
- package/backend/dist/esm/backend/src/stream.d.ts +376 -0
- package/backend/dist/esm/{stream.js → backend/src/stream.js} +327 -292
- package/backend/dist/esm/backend/src/users.d.ts +809 -0
- package/backend/dist/esm/backend/src/users.js +2140 -0
- package/backend/dist/esm/backend/src/utils.d.ts +16 -0
- package/backend/dist/esm/{utils.js → backend/src/utils.js} +20 -81
- package/backend/dist/{cjs → esm/backend/src}/view.d.ts +33 -11
- package/backend/dist/esm/{view.js → backend/src/view.js} +266 -86
- package/backend/dist/{cjs → esm/backend/src}/volt.d.ts +10 -1
- package/backend/dist/esm/{volt.js → backend/src/volt.js} +7 -4
- package/backend/dist/esm/frontend/src/modules/request.d.ts +70 -0
- package/backend/dist/esm/frontend/src/modules/request.js +117 -0
- package/frontend/dist/backend/src/database/collection.d.ts +1543 -0
- package/frontend/dist/backend/src/database/collection.js +3510 -0
- package/frontend/dist/backend/src/database/database.d.ts +66 -0
- package/frontend/dist/backend/src/database/database.js +196 -0
- package/frontend/dist/backend/src/database/filters/filters.d.ts +6 -0
- package/frontend/dist/backend/src/database/filters/filters.js +1 -0
- package/frontend/dist/backend/src/database/filters/strict_filter.d.ts +223 -0
- package/frontend/dist/backend/src/database/filters/strict_filter.js +3 -0
- package/frontend/dist/backend/src/database/filters/strict_update_filter.d.ts +165 -0
- package/frontend/dist/backend/src/database/filters/strict_update_filter.js +5 -0
- package/frontend/dist/backend/src/database/flatten.d.ts +75 -0
- package/frontend/dist/backend/src/database/flatten.js +22 -0
- package/frontend/dist/backend/src/endpoint.d.ts +204 -0
- package/frontend/dist/backend/src/endpoint.js +570 -0
- package/frontend/dist/backend/src/errors/index.d.ts +7 -0
- package/frontend/dist/backend/src/errors/index.js +7 -0
- package/frontend/dist/backend/src/errors/internal_external.d.ts +38 -0
- package/frontend/dist/backend/src/errors/internal_external.js +70 -0
- package/frontend/dist/backend/src/errors/invalid_usage_error.d.ts +38 -0
- package/frontend/dist/backend/src/errors/invalid_usage_error.js +30 -0
- package/frontend/dist/backend/src/errors/system_error.d.ts +230 -0
- package/frontend/dist/backend/src/errors/system_error.js +402 -0
- package/frontend/dist/backend/src/events.d.ts +54 -0
- package/frontend/dist/backend/src/events.js +5 -0
- package/frontend/dist/backend/src/frontend.d.ts +11 -0
- package/frontend/dist/backend/src/frontend.js +12 -0
- package/frontend/dist/backend/src/image_endpoint.d.ts +39 -0
- package/frontend/dist/backend/src/image_endpoint.js +202 -0
- package/frontend/dist/backend/src/meta.d.ts +64 -0
- package/frontend/dist/backend/src/meta.js +110 -0
- package/frontend/dist/backend/src/payments/paddle.d.ts +326 -0
- package/frontend/dist/backend/src/payments/paddle.js +2256 -0
- package/frontend/dist/backend/src/plugins/mail/mail.d.ts +248 -0
- package/frontend/dist/backend/src/plugins/mail/mail.js +389 -0
- package/{backend/dist/esm/plugins/mail.d.ts → frontend/dist/backend/src/plugins/mail/ui.d.ts} +23 -0
- package/{backend/dist/esm/plugins/mail.js → frontend/dist/backend/src/plugins/mail/ui.js} +3 -6
- package/frontend/dist/backend/src/rate_limit.d.ts +145 -0
- package/frontend/dist/backend/src/rate_limit.js +673 -0
- package/frontend/dist/backend/src/route.d.ts +35 -0
- package/frontend/dist/backend/src/route.js +212 -0
- package/frontend/dist/backend/src/server.d.ts +485 -0
- package/frontend/dist/backend/src/server.js +2670 -0
- package/frontend/dist/backend/src/splash_screen.d.ts +80 -0
- package/frontend/dist/backend/src/splash_screen.js +135 -0
- package/frontend/dist/backend/src/status.d.ts +74 -0
- package/frontend/dist/backend/src/status.js +199 -0
- package/frontend/dist/backend/src/stream.d.ts +376 -0
- package/frontend/dist/backend/src/stream.js +1007 -0
- package/frontend/dist/backend/src/users.d.ts +807 -0
- package/frontend/dist/backend/src/users.js +2118 -0
- package/frontend/dist/backend/src/utils.d.ts +16 -0
- package/frontend/dist/backend/src/utils.js +241 -0
- package/frontend/dist/backend/src/view.d.ts +162 -0
- package/frontend/dist/backend/src/view.js +720 -0
- package/frontend/dist/frontend/src/elements/base.d.ts +4414 -0
- package/frontend/dist/{elements → frontend/src/elements}/base.js +3624 -260
- package/frontend/dist/frontend/src/elements/module.d.ts +95 -0
- package/frontend/dist/{elements → frontend/src/elements}/module.js +53 -52
- package/frontend/dist/frontend/src/elements/types.d.ts +52 -0
- package/frontend/dist/frontend/src/elements/types.js +5 -0
- package/frontend/dist/frontend/src/modules/attachment.d.ts +126 -0
- package/frontend/dist/frontend/src/modules/attachment.js +306 -0
- package/frontend/dist/frontend/src/modules/auth.d.ts +44 -0
- package/frontend/dist/frontend/src/modules/auth.js +80 -0
- package/frontend/dist/{modules → frontend/src/modules}/color.js +2 -2
- package/frontend/dist/frontend/src/modules/compression.d.ts +39 -0
- package/frontend/dist/frontend/src/modules/compression.js +102 -0
- package/frontend/dist/frontend/src/modules/cookies.d.ts +44 -0
- package/frontend/dist/frontend/src/modules/cookies.js +143 -0
- package/frontend/dist/frontend/src/modules/events.d.ts +31 -0
- package/frontend/dist/frontend/src/modules/events.js +74 -0
- package/frontend/dist/frontend/src/modules/google.d.ts +23 -0
- package/frontend/dist/frontend/src/modules/google.js +52 -0
- package/frontend/dist/frontend/src/modules/meta.d.ts +14 -0
- package/frontend/dist/{modules → frontend/src/modules}/meta.js +9 -7
- package/frontend/dist/{modules → frontend/src/modules}/paddle.d.ts +37 -134
- package/frontend/dist/{modules → frontend/src/modules}/paddle.js +620 -568
- package/frontend/dist/frontend/src/modules/request.d.ts +70 -0
- package/frontend/dist/frontend/src/modules/request.js +117 -0
- package/frontend/dist/frontend/src/modules/settings.d.ts +3 -0
- package/frontend/dist/frontend/src/modules/settings.js +5 -0
- package/frontend/dist/frontend/src/modules/statics.d.ts +21 -0
- package/frontend/dist/{modules → frontend/src/modules}/statics.js +15 -18
- package/frontend/dist/frontend/src/modules/support.d.ts +30 -0
- package/frontend/dist/frontend/src/modules/support.js +53 -0
- package/frontend/dist/{modules → frontend/src/modules}/theme.d.ts +67 -0
- package/frontend/dist/{modules → frontend/src/modules}/theme.js +68 -38
- package/frontend/dist/frontend/src/modules/themes.d.ts +12 -0
- package/frontend/dist/frontend/src/modules/themes.js +22 -0
- package/frontend/dist/frontend/src/modules/user.d.ts +164 -0
- package/frontend/dist/frontend/src/modules/user.js +268 -0
- package/frontend/dist/frontend/src/modules/utils.d.ts +176 -0
- package/frontend/dist/frontend/src/modules/utils.js +569 -0
- package/frontend/dist/frontend/src/types/gradient.d.ts +29 -0
- package/frontend/dist/{types → frontend/src/types}/gradient.js +14 -18
- package/frontend/dist/frontend/src/ui/border_button.d.ts +94 -0
- package/frontend/dist/{ui → frontend/src/ui}/border_button.js +7 -13
- package/frontend/dist/frontend/src/ui/button.d.ts +28 -0
- package/frontend/dist/{ui → frontend/src/ui}/button.js +21 -12
- package/frontend/dist/frontend/src/ui/canvas.d.ts +138 -0
- package/frontend/dist/{ui → frontend/src/ui}/canvas.js +88 -55
- package/frontend/dist/frontend/src/ui/checkbox.d.ts +74 -0
- package/frontend/dist/{ui → frontend/src/ui}/checkbox.js +80 -41
- package/frontend/dist/{ui → frontend/src/ui}/code.d.ts +73 -6
- package/frontend/dist/{ui → frontend/src/ui}/code.js +55 -52
- package/frontend/dist/{ui → frontend/src/ui}/context_menu.d.ts +4 -0
- package/frontend/dist/{ui → frontend/src/ui}/context_menu.js +12 -17
- package/frontend/dist/{ui → frontend/src/ui}/css.d.ts +4 -0
- package/frontend/dist/{ui → frontend/src/ui}/css.js +3 -3
- package/frontend/dist/{ui → frontend/src/ui}/divider.d.ts +4 -0
- package/frontend/dist/{ui → frontend/src/ui}/divider.js +3 -3
- package/frontend/dist/{ui → frontend/src/ui}/dropdown.d.ts +57 -2
- package/frontend/dist/{ui → frontend/src/ui}/dropdown.js +87 -94
- package/frontend/dist/{ui → frontend/src/ui}/for_each.d.ts +4 -0
- package/frontend/dist/{ui → frontend/src/ui}/for_each.js +3 -3
- package/frontend/dist/{ui → frontend/src/ui}/form.d.ts +6 -2
- package/frontend/dist/{ui → frontend/src/ui}/form.js +10 -7
- package/frontend/dist/frontend/src/ui/frame_modes.d.ts +37 -0
- package/frontend/dist/{ui → frontend/src/ui}/frame_modes.js +16 -22
- package/frontend/dist/{ui → frontend/src/ui}/google_map.d.ts +4 -0
- package/frontend/dist/{ui → frontend/src/ui}/google_map.js +4 -4
- package/frontend/dist/{ui → frontend/src/ui}/gradient.d.ts +4 -0
- package/frontend/dist/{ui → frontend/src/ui}/gradient.js +3 -3
- package/frontend/dist/{ui → frontend/src/ui}/image.d.ts +4 -0
- package/frontend/dist/{ui → frontend/src/ui}/image.js +5 -5
- package/frontend/dist/frontend/src/ui/input.d.ts +392 -0
- package/frontend/dist/{ui → frontend/src/ui}/input.js +346 -360
- package/frontend/dist/{ui → frontend/src/ui}/link.d.ts +4 -0
- package/frontend/dist/{ui → frontend/src/ui}/link.js +3 -3
- package/frontend/dist/{ui → frontend/src/ui}/list.d.ts +4 -0
- package/frontend/dist/{ui → frontend/src/ui}/list.js +12 -6
- package/frontend/dist/frontend/src/ui/loader_button.d.ts +80 -0
- package/frontend/dist/{ui → frontend/src/ui}/loader_button.js +35 -47
- package/frontend/dist/frontend/src/ui/loaders.d.ts +57 -0
- package/frontend/dist/{ui → frontend/src/ui}/loaders.js +11 -11
- package/frontend/dist/{ui → frontend/src/ui}/popup.d.ts +11 -6
- package/frontend/dist/{ui → frontend/src/ui}/popup.js +32 -18
- package/frontend/dist/frontend/src/ui/pseudo.d.ts +44 -0
- package/frontend/dist/{ui → frontend/src/ui}/pseudo.js +84 -8
- package/frontend/dist/{ui → frontend/src/ui}/scroller.d.ts +14 -2
- package/frontend/dist/{ui → frontend/src/ui}/scroller.js +37 -43
- package/frontend/dist/{ui → frontend/src/ui}/slider.d.ts +5 -1
- package/frontend/dist/{ui → frontend/src/ui}/slider.js +4 -4
- package/frontend/dist/{ui → frontend/src/ui}/spacer.d.ts +4 -0
- package/frontend/dist/{ui → frontend/src/ui}/spacer.js +3 -3
- package/frontend/dist/{ui → frontend/src/ui}/span.d.ts +4 -0
- package/frontend/dist/{ui → frontend/src/ui}/span.js +3 -3
- package/frontend/dist/{ui → frontend/src/ui}/stack.d.ts +4 -0
- package/frontend/dist/{ui → frontend/src/ui}/stack.js +3 -9
- package/frontend/dist/frontend/src/ui/steps.d.ts +131 -0
- package/frontend/dist/{ui → frontend/src/ui}/steps.js +30 -45
- package/frontend/dist/{ui → frontend/src/ui}/style.d.ts +4 -0
- package/frontend/dist/{ui → frontend/src/ui}/style.js +3 -3
- package/frontend/dist/{ui → frontend/src/ui}/switch.d.ts +5 -1
- package/frontend/dist/{ui → frontend/src/ui}/switch.js +4 -4
- package/frontend/dist/{ui → frontend/src/ui}/table.d.ts +4 -0
- package/frontend/dist/{ui → frontend/src/ui}/table.js +6 -6
- package/frontend/dist/{ui → frontend/src/ui}/tabs.d.ts +45 -3
- package/frontend/dist/{ui → frontend/src/ui}/tabs.js +65 -40
- package/frontend/dist/{ui → frontend/src/ui}/text.d.ts +4 -0
- package/frontend/dist/{ui → frontend/src/ui}/text.js +3 -3
- package/frontend/dist/frontend/src/ui/title.d.ts +91 -0
- package/frontend/dist/frontend/src/ui/title.js +272 -0
- package/frontend/dist/{ui → frontend/src/ui}/view.d.ts +4 -0
- package/frontend/dist/{ui → frontend/src/ui}/view.js +3 -3
- package/frontend/dist/{volt.d.ts → frontend/src/volt.d.ts} +3 -0
- package/frontend/dist/{volt.js → frontend/src/volt.js} +4 -0
- package/frontend/tools/bundle_d_ts.js +71 -0
- package/frontend/tools/convert_to_jsdoc_input.txt +9452 -0
- package/frontend/tools/convert_to_jsdoc_output.txt +7626 -0
- package/frontend/tools/convert_to_jsdoc_tmp.js +345 -0
- package/package.json +11 -12
- package/backend/dist/cjs/database/collection.d.ts +0 -160
- package/backend/dist/cjs/database/collection.js +0 -842
- package/backend/dist/cjs/database/database.d.ts +0 -121
- package/backend/dist/cjs/database/document.d.ts +0 -131
- package/backend/dist/cjs/database/document.js +0 -224
- package/backend/dist/cjs/database.d.ts +0 -502
- package/backend/dist/cjs/database.js +0 -2248
- package/backend/dist/cjs/logger.d.ts +0 -3
- package/backend/dist/cjs/meta.d.ts +0 -50
- package/backend/dist/cjs/mutex.d.ts +0 -24
- package/backend/dist/cjs/payments/paddle.d.ts +0 -160
- package/backend/dist/cjs/plugins/browser.d.ts +0 -36
- package/backend/dist/cjs/plugins/browser.js +0 -198
- package/backend/dist/cjs/plugins/css.d.ts +0 -11
- package/backend/dist/cjs/plugins/css.js +0 -80
- package/backend/dist/cjs/plugins/mail.d.ts +0 -277
- package/backend/dist/cjs/plugins/mail.js +0 -1370
- package/backend/dist/cjs/plugins/ts/compiler.d.ts +0 -139
- package/backend/dist/cjs/plugins/ts/compiler.js +0 -750
- package/backend/dist/cjs/plugins/ts/preprocessing.d.ts +0 -14
- package/backend/dist/cjs/plugins/ts/preprocessing.js +0 -440
- package/backend/dist/cjs/rate_limit.d.ts +0 -63
- package/backend/dist/cjs/rate_limit.js +0 -348
- package/backend/dist/cjs/request.deprc.d.ts +0 -48
- package/backend/dist/cjs/request.deprc.js +0 -572
- package/backend/dist/cjs/response.deprc.d.ts +0 -55
- package/backend/dist/cjs/response.deprc.js +0 -275
- package/backend/dist/cjs/server.d.ts +0 -342
- package/backend/dist/cjs/splash_screen.d.ts +0 -35
- package/backend/dist/cjs/status.d.ts +0 -61
- package/backend/dist/cjs/stream.d.ts +0 -79
- package/backend/dist/cjs/users.d.ts +0 -111
- package/backend/dist/cjs/users.js +0 -1817
- package/backend/dist/cjs/view.js +0 -352
- package/backend/dist/cjs/vinc.dev.d.ts +0 -3
- package/backend/dist/cjs/vinc.dev.js +0 -7
- package/backend/dist/css/adyen.css +0 -92
- package/backend/dist/css/volt.css +0 -70
- package/backend/dist/esm/database/collection.d.ts +0 -160
- package/backend/dist/esm/database/collection.js +0 -1328
- package/backend/dist/esm/database/database.d.ts +0 -121
- package/backend/dist/esm/database/document.d.ts +0 -131
- package/backend/dist/esm/database/document.js +0 -247
- package/backend/dist/esm/database.d.ts +0 -502
- package/backend/dist/esm/database.js +0 -2423
- package/backend/dist/esm/file_watcher.js +0 -329
- package/backend/dist/esm/logger.d.ts +0 -3
- package/backend/dist/esm/logger.js +0 -11
- package/backend/dist/esm/meta.d.ts +0 -50
- package/backend/dist/esm/mutex.d.ts +0 -24
- package/backend/dist/esm/mutex.js +0 -48
- package/backend/dist/esm/payments/paddle.d.ts +0 -160
- package/backend/dist/esm/plugins/browser.d.ts +0 -36
- package/backend/dist/esm/plugins/browser.js +0 -176
- package/backend/dist/esm/plugins/css.d.ts +0 -11
- package/backend/dist/esm/plugins/css.js +0 -90
- package/backend/dist/esm/plugins/ts/compiler.d.ts +0 -139
- package/backend/dist/esm/plugins/ts/compiler.js +0 -1194
- package/backend/dist/esm/plugins/ts/preprocessing.d.ts +0 -14
- package/backend/dist/esm/plugins/ts/preprocessing.js +0 -726
- package/backend/dist/esm/rate_limit.d.ts +0 -63
- package/backend/dist/esm/rate_limit.js +0 -417
- package/backend/dist/esm/request.deprc.d.ts +0 -48
- package/backend/dist/esm/request.deprc.js +0 -572
- package/backend/dist/esm/response.deprc.d.ts +0 -55
- package/backend/dist/esm/response.deprc.js +0 -275
- package/backend/dist/esm/server.d.ts +0 -342
- package/backend/dist/esm/splash_screen.d.ts +0 -35
- package/backend/dist/esm/status.d.ts +0 -61
- package/backend/dist/esm/status.js +0 -197
- package/backend/dist/esm/stream.d.ts +0 -79
- package/backend/dist/esm/users.d.ts +0 -111
- package/backend/dist/esm/users.js +0 -1935
- package/backend/dist/esm/vinc.dev.d.ts +0 -3
- package/backend/dist/esm/vinc.dev.js +0 -7
- package/frontend/dist/elements/base.d.ts +0 -9889
- package/frontend/dist/elements/module.d.ts +0 -30
- package/frontend/dist/modules/array.d.ts +0 -94
- package/frontend/dist/modules/array.js +0 -634
- package/frontend/dist/modules/auth.d.ts +0 -46
- package/frontend/dist/modules/auth.js +0 -139
- package/frontend/dist/modules/colors.d.ts +0 -1
- package/frontend/dist/modules/colors.js +0 -417
- package/frontend/dist/modules/compression.d.ts +0 -6
- package/frontend/dist/modules/compression.js +0 -999
- package/frontend/dist/modules/cookies.d.ts +0 -18
- package/frontend/dist/modules/cookies.js +0 -167
- package/frontend/dist/modules/date.d.ts +0 -142
- package/frontend/dist/modules/date.js +0 -493
- package/frontend/dist/modules/events.d.ts +0 -8
- package/frontend/dist/modules/events.js +0 -91
- package/frontend/dist/modules/google.d.ts +0 -11
- package/frontend/dist/modules/google.js +0 -54
- package/frontend/dist/modules/meta.d.ts +0 -10
- package/frontend/dist/modules/mutex.d.ts +0 -7
- package/frontend/dist/modules/mutex.js +0 -51
- package/frontend/dist/modules/number.d.ts +0 -16
- package/frontend/dist/modules/number.js +0 -23
- package/frontend/dist/modules/object.d.ts +0 -52
- package/frontend/dist/modules/object.js +0 -383
- package/frontend/dist/modules/scheme.d.ts +0 -227
- package/frontend/dist/modules/scheme.js +0 -531
- package/frontend/dist/modules/settings.d.ts +0 -3
- package/frontend/dist/modules/settings.js +0 -4
- package/frontend/dist/modules/statics.d.ts +0 -5
- package/frontend/dist/modules/string.d.ts +0 -124
- package/frontend/dist/modules/string.js +0 -745
- package/frontend/dist/modules/support.d.ts +0 -19
- package/frontend/dist/modules/support.js +0 -103
- package/frontend/dist/modules/themes.d.ts +0 -8
- package/frontend/dist/modules/themes.js +0 -18
- package/frontend/dist/modules/user.d.ts +0 -59
- package/frontend/dist/modules/user.js +0 -280
- package/frontend/dist/modules/utils.d.ts +0 -87
- package/frontend/dist/modules/utils.js +0 -923
- package/frontend/dist/types/gradient.d.ts +0 -12
- package/frontend/dist/ui/border_button.d.ts +0 -152
- package/frontend/dist/ui/button.d.ts +0 -21
- package/frontend/dist/ui/canvas.d.ts +0 -56
- package/frontend/dist/ui/checkbox.d.ts +0 -52
- package/frontend/dist/ui/frame_modes.d.ts +0 -25
- package/frontend/dist/ui/input.d.ts +0 -241
- package/frontend/dist/ui/loader_button.d.ts +0 -93
- package/frontend/dist/ui/loaders.d.ts +0 -57
- package/frontend/dist/ui/pseudo.d.ts +0 -16
- package/frontend/dist/ui/steps.d.ts +0 -59
- package/frontend/dist/ui/title.d.ts +0 -21
- package/frontend/dist/ui/title.js +0 -121
- package/frontend/examples/dashboard/dashboard.ts +0 -776
- /package/backend/dist/cjs/{cli.d.ts → backend/src/cli.d.ts} +0 -0
- /package/backend/dist/cjs/{file_watcher.d.ts → backend/src/database/document.d.ts} +0 -0
- /package/backend/dist/cjs/{file_watcher.js → backend/src/database/document.js} +0 -0
- /package/backend/dist/cjs/{plugins/pdf.d.ts → backend/src/database/filters/strict_filter_test.d.ts} +0 -0
- /package/backend/dist/{esm/file_watcher.d.ts → cjs/backend/src/database/filters/strict_filter_test_v0.d.ts} +0 -0
- /package/backend/dist/{esm/plugins/pdf.d.ts → cjs/backend/src/database/flatten_test.d.ts} +0 -0
- /package/backend/dist/cjs/{frontend.d.ts → backend/src/frontend.d.ts} +0 -0
- /package/backend/dist/cjs/{plugins → backend/src/plugins}/communication.d.ts +0 -0
- /package/backend/dist/cjs/{plugins → backend/src/plugins}/communication.js +0 -0
- /package/backend/dist/cjs/{plugins → backend/src/plugins}/mail/ui.js +0 -0
- /package/backend/dist/cjs/{plugins → backend/src/plugins}/pdf.js +0 -0
- /package/backend/dist/cjs/{plugins → backend/src/plugins}/thread_monitor.d.ts +0 -0
- /package/backend/dist/cjs/{plugins → backend/src/plugins}/thread_monitor.js +0 -0
- /package/backend/dist/cjs/{vinc.d.ts → backend/src/vinc.d.ts} +0 -0
- /package/backend/dist/cjs/{vinc.js → backend/src/vinc.js} +0 -0
- /package/backend/dist/esm/{cli.d.ts → backend/src/cli.d.ts} +0 -0
- /package/backend/dist/esm/{frontend.d.ts → backend/src/frontend.d.ts} +0 -0
- /package/backend/dist/esm/{plugins → backend/src/plugins}/communication.d.ts +0 -0
- /package/backend/dist/esm/{plugins → backend/src/plugins}/communication.js +0 -0
- /package/backend/dist/esm/{plugins → backend/src/plugins}/thread_monitor.d.ts +0 -0
- /package/backend/dist/esm/{plugins → backend/src/plugins}/thread_monitor.js +0 -0
- /package/backend/dist/esm/{vinc.d.ts → backend/src/vinc.d.ts} +0 -0
- /package/backend/dist/esm/{vinc.js → backend/src/vinc.js} +0 -0
- /package/frontend/dist/{elements → frontend/src/elements}/register_element.d.ts +0 -0
- /package/frontend/dist/{elements → frontend/src/elements}/register_element.js +0 -0
- /package/frontend/dist/{modules → frontend/src/modules}/color.d.ts +0 -0
- /package/frontend/dist/{ui → frontend/src/ui}/ui.d.ts +0 -0
- /package/frontend/dist/{ui → frontend/src/ui}/ui.js +0 -0
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
function convertToJSDoc(code) {
|
|
2
|
+
// Helper function to clean and format multi-line text
|
|
3
|
+
const formatMultilineText = (text, indent) => {
|
|
4
|
+
return text
|
|
5
|
+
.split('\n')
|
|
6
|
+
.map(l => l.replace(/^\s*\*\s?/, '').trim())
|
|
7
|
+
.filter(Boolean)
|
|
8
|
+
.join("\n" + indent + ' * ');
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
// Helper: convert old docstring to JSDoc format
|
|
12
|
+
const convertDocstring = (docstring, indent = ' ') => {
|
|
13
|
+
// Support @desc: or @description:
|
|
14
|
+
const titleMatch = docstring.match(/@title:\s*([^\n]*)/i);
|
|
15
|
+
const descMatch = docstring.match(/@(desc|descr|description):\s*([\s\S]+?)(?=@param:|@return:|@funcs:|\*\/)/i);
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
// Support @descr: or @description: inside @param:
|
|
19
|
+
const paramNameMatch = docstring.match(/@param:[\s\S]*?@name:\s*([^\n]*)/i);
|
|
20
|
+
const paramDescrMatch = docstring.match(/@param:[\s\S]*?@(desc|descr|description):\s*:?\s*([\s\S]+?)(?=@return:|@funcs:|\*\/)/i);
|
|
21
|
+
|
|
22
|
+
// Allow optional colon after @description and trim before @funcs or */
|
|
23
|
+
const returnDescMatch = docstring.match(/@return:[\s\S]*?@(desc|descr|description)\s*:?\s*([\s\S]+?)(?=@funcs:|\*\/)/i);
|
|
24
|
+
|
|
25
|
+
const lines = [];
|
|
26
|
+
lines.push(indent + '/**');
|
|
27
|
+
|
|
28
|
+
// Build summary from title + description if present
|
|
29
|
+
const title = titleMatch ? titleMatch[1].trim() : '';
|
|
30
|
+
const desc = descMatch ? formatMultilineText(descMatch[2].trim(), indent) : '';
|
|
31
|
+
if (!desc) {
|
|
32
|
+
throw new Error("No description found for docstring:\n" + fullDocstring);
|
|
33
|
+
}
|
|
34
|
+
lines.push(indent + ' * {' + title + "}");
|
|
35
|
+
lines.push(indent + ' * ' + desc);
|
|
36
|
+
// if (title || desc) {
|
|
37
|
+
// const summary = [title, desc].filter(Boolean).join(' — ');
|
|
38
|
+
// lines.push(indent + ' * ' + summary);
|
|
39
|
+
// }
|
|
40
|
+
|
|
41
|
+
if (paramNameMatch && paramDescrMatch) {
|
|
42
|
+
const cleanParamDescr = formatMultilineText(paramDescrMatch[2].trim(), indent);
|
|
43
|
+
lines.push(indent + ` * @param ${paramNameMatch[1].trim()} ${cleanParamDescr}`);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
if (returnDescMatch) {
|
|
47
|
+
const cleanReturnDesc = formatMultilineText(returnDescMatch[2].trim(), indent);
|
|
48
|
+
lines.push(indent + ` * @returns ${cleanReturnDesc}`);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
lines.push(indent + ' * @docs');
|
|
52
|
+
lines.push(indent + ' */');
|
|
53
|
+
|
|
54
|
+
return lines.join('\n');
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
// Split code into lines for easier processing
|
|
58
|
+
const lines = code.split('\n');
|
|
59
|
+
const result = [];
|
|
60
|
+
let i = 0;
|
|
61
|
+
|
|
62
|
+
while (i < lines.length) {
|
|
63
|
+
const line = lines[i];
|
|
64
|
+
|
|
65
|
+
// Check if this line starts a docstring
|
|
66
|
+
if (line.trim().startsWith('/**') && i + 1 < lines.length) {
|
|
67
|
+
// Find the end of the docstring
|
|
68
|
+
let docEnd = i;
|
|
69
|
+
let docContent = [line];
|
|
70
|
+
|
|
71
|
+
for (let j = i + 1; j < lines.length; j++) {
|
|
72
|
+
docContent.push(lines[j]);
|
|
73
|
+
if (lines[j].trim().endsWith('*/')) {
|
|
74
|
+
docEnd = j;
|
|
75
|
+
break;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const fullDocstring = docContent.join('\n');
|
|
80
|
+
|
|
81
|
+
// Check if it's an old-format docstring
|
|
82
|
+
if (fullDocstring.includes('@docs:')) {
|
|
83
|
+
// This is an old-format docstring that needs conversion
|
|
84
|
+
|
|
85
|
+
// Look ahead to find function signatures
|
|
86
|
+
let searchIdx = docEnd + 1;
|
|
87
|
+
let functionName = null;
|
|
88
|
+
let overloads = [];
|
|
89
|
+
let implementation = null;
|
|
90
|
+
let implLineIdx = -1;
|
|
91
|
+
|
|
92
|
+
while (searchIdx < lines.length) {
|
|
93
|
+
const searchLine = lines[searchIdx].trim();
|
|
94
|
+
|
|
95
|
+
if (searchLine === '') {
|
|
96
|
+
searchIdx++;
|
|
97
|
+
continue;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// Check if this looks like a function signature
|
|
101
|
+
const funcMatch = searchLine.match(/^(\w+)\s*\([^)]*\)[^;{]*([;{])/);
|
|
102
|
+
|
|
103
|
+
if (funcMatch) {
|
|
104
|
+
const funcName = funcMatch[1];
|
|
105
|
+
const isImpl = funcMatch[2] === '{' ||
|
|
106
|
+
(searchIdx + 1 < lines.length && lines[searchIdx + 1].trim().startsWith('{'));
|
|
107
|
+
|
|
108
|
+
if (!functionName) {
|
|
109
|
+
functionName = funcName;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
if (funcName === functionName) {
|
|
113
|
+
if (!isImpl) {
|
|
114
|
+
overloads.push({
|
|
115
|
+
line: searchLine,
|
|
116
|
+
lineIdx: searchIdx
|
|
117
|
+
});
|
|
118
|
+
} else {
|
|
119
|
+
implementation = searchLine;
|
|
120
|
+
implLineIdx = searchIdx;
|
|
121
|
+
break;
|
|
122
|
+
}
|
|
123
|
+
} else {
|
|
124
|
+
// Different function, stop
|
|
125
|
+
break;
|
|
126
|
+
}
|
|
127
|
+
} else {
|
|
128
|
+
// Not a function signature, stop
|
|
129
|
+
break;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
searchIdx++;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
// Get the indent from the implementation line or first overload
|
|
136
|
+
let indent = ' ';
|
|
137
|
+
if (implLineIdx > -1) {
|
|
138
|
+
const leadingSpace = lines[implLineIdx].match(/^(\s*)/);
|
|
139
|
+
if (leadingSpace) {
|
|
140
|
+
indent = leadingSpace[1];
|
|
141
|
+
}
|
|
142
|
+
} else if (overloads.length > 0) {
|
|
143
|
+
const leadingSpace = lines[overloads[0].lineIdx].match(/^(\s*)/);
|
|
144
|
+
if (leadingSpace) {
|
|
145
|
+
indent = leadingSpace[1];
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
// Convert the docstring
|
|
150
|
+
const jsdoc = convertDocstring(fullDocstring, indent);
|
|
151
|
+
|
|
152
|
+
if (implLineIdx > -1 && overloads.length > 0) {
|
|
153
|
+
// We have overloads and implementation - don't add docstring yet
|
|
154
|
+
// Add the overloads without docstring
|
|
155
|
+
for (const overload of overloads) {
|
|
156
|
+
result.push(lines[overload.lineIdx]);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
// Add the JSDoc before implementation
|
|
160
|
+
result.push(jsdoc);
|
|
161
|
+
result.push(lines[implLineIdx]);
|
|
162
|
+
|
|
163
|
+
// Skip past all the lines we've processed
|
|
164
|
+
i = implLineIdx + 1;
|
|
165
|
+
} else {
|
|
166
|
+
// No overloads or no implementation - put JSDoc in place
|
|
167
|
+
result.push(jsdoc);
|
|
168
|
+
|
|
169
|
+
// Add any functions we found
|
|
170
|
+
if (overloads.length > 0) {
|
|
171
|
+
for (const overload of overloads) {
|
|
172
|
+
result.push(lines[overload.lineIdx]);
|
|
173
|
+
}
|
|
174
|
+
i = overloads[overloads.length - 1].lineIdx + 1;
|
|
175
|
+
} else if (implLineIdx > -1) {
|
|
176
|
+
result.push(lines[implLineIdx]);
|
|
177
|
+
i = implLineIdx + 1;
|
|
178
|
+
} else {
|
|
179
|
+
i = docEnd + 1;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
} else {
|
|
183
|
+
// Not an old-format docstring, keep as-is
|
|
184
|
+
for (const docLine of docContent) {
|
|
185
|
+
result.push(docLine);
|
|
186
|
+
}
|
|
187
|
+
i = docEnd + 1;
|
|
188
|
+
}
|
|
189
|
+
} else {
|
|
190
|
+
// Not a docstring line, keep as-is
|
|
191
|
+
result.push(line);
|
|
192
|
+
i++;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
const convertedCode = result.join('\n');
|
|
197
|
+
|
|
198
|
+
// Check for any remaining old-format patterns
|
|
199
|
+
const checkPatterns = [
|
|
200
|
+
/@docs:/g,
|
|
201
|
+
/@title:/g,
|
|
202
|
+
/@param:\s*\n\s*@name:/g,
|
|
203
|
+
/@return:\s*\n\s*@description/g,
|
|
204
|
+
/@funcs:/g
|
|
205
|
+
];
|
|
206
|
+
|
|
207
|
+
let hasRemaining = false;
|
|
208
|
+
checkPatterns.forEach(pattern => {
|
|
209
|
+
if (pattern.test(convertedCode)) {
|
|
210
|
+
hasRemaining = true;
|
|
211
|
+
}
|
|
212
|
+
});
|
|
213
|
+
|
|
214
|
+
if (hasRemaining) {
|
|
215
|
+
console.log('⚠️ Some old-format patterns may remain in the converted code');
|
|
216
|
+
} else {
|
|
217
|
+
console.log('✅ All docstrings successfully converted!');
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
return convertedCode;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
// Example usage
|
|
225
|
+
const test_code = `
|
|
226
|
+
/**
|
|
227
|
+
* @docs:
|
|
228
|
+
* @title: On Suspend
|
|
229
|
+
* @desc: Script to be run when fetching the media data is stopped before it is completely loaded for whatever reason. The equivalent of HTML attribute \`onsuspend\`.
|
|
230
|
+
* @param:
|
|
231
|
+
* @name: callback
|
|
232
|
+
* @descr: The function to be executed when the suspend event occurs. The first parameter of the callback is the \`VElement\` object.
|
|
233
|
+
* @return:
|
|
234
|
+
* @description Returns the \`VElement\` object. Unless parameter \`value\` is \`null\`, then the attribute's value is returned.
|
|
235
|
+
* @funcs: 2
|
|
236
|
+
*/
|
|
237
|
+
on_suspend(): Function | undefined;
|
|
238
|
+
on_suspend(callback: Function): this;
|
|
239
|
+
on_suspend(callback?: Function): this | Function | undefined {
|
|
240
|
+
if (callback == null) { return this.onsuspend ?? undefined; }
|
|
241
|
+
const e = this;
|
|
242
|
+
this.onsuspend = (t) => callback(e, t);
|
|
243
|
+
return this;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* @docs:
|
|
248
|
+
* @title: On Time Update
|
|
249
|
+
* @desc: Script to be run when the playing position has changed (like when the user fast forwards to a different point in the media). The equivalent of HTML attribute \`ontimeupdate\`.
|
|
250
|
+
* @param:
|
|
251
|
+
* @name: callback
|
|
252
|
+
* @descr: The callback function to execute when the time updates. The first parameter of the callback is the \`VElement\` object.
|
|
253
|
+
* @return:
|
|
254
|
+
* @description Returns the \`VElement\` object. Unless parameter \`callback\` is \`null\`, then the attribute's value is returned.
|
|
255
|
+
* @funcs: 2
|
|
256
|
+
*/
|
|
257
|
+
on_time_update(): Function | undefined;
|
|
258
|
+
on_time_update(callback: ElementEvent<this>): this;
|
|
259
|
+
on_time_update(callback?: ElementEvent<this>): this | Function | undefined {
|
|
260
|
+
if (callback == null) { return this.ontimeupdate ?? undefined; }
|
|
261
|
+
const e = this;
|
|
262
|
+
this.ontimeupdate = (t) => callback(e, t);
|
|
263
|
+
return this;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* @docs:
|
|
268
|
+
* @title: On Volume Change
|
|
269
|
+
* @desc: Script to be run each time the volume is changed which includes setting the volume to "mute".
|
|
270
|
+
* The equivalent of HTML attribute \`onvolumechange\`. The first parameter of the callback is the \`VElement\` object.
|
|
271
|
+
* @param:
|
|
272
|
+
* @name: callback
|
|
273
|
+
* @descr: The callback function to execute on volume change.
|
|
274
|
+
* @return:
|
|
275
|
+
* @description Returns the \`VElement\` object for chaining unless parameter \`value\` is \`null\`, then the attribute's value is returned.
|
|
276
|
+
* @funcs: 2
|
|
277
|
+
*/
|
|
278
|
+
on_volume_change(): Function | undefined;
|
|
279
|
+
on_volume_change(callback: ElementEvent<this>): this;
|
|
280
|
+
on_volume_change(callback?: ElementEvent<this>): this | Function | undefined {
|
|
281
|
+
if (callback == null) { return this.onvolumechange ?? undefined; }
|
|
282
|
+
const e = this;
|
|
283
|
+
this.onvolumechange = (t) => callback(e, t);
|
|
284
|
+
return this;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* @docs:
|
|
289
|
+
* @title: On Waiting
|
|
290
|
+
* @desc: Script to be run when the media has paused but is expected to resume (like when the media pauses to buffer more data). The equivalent of HTML attribute \`onwaiting\`.
|
|
291
|
+
* @param:
|
|
292
|
+
* @name: callback
|
|
293
|
+
* @descr: The callback function to execute when the media is waiting.
|
|
294
|
+
* @return:
|
|
295
|
+
* @description Returns the \`VElement\` object unless parameter \`callback\` is \`null\`, then the attribute's value is returned.
|
|
296
|
+
* @funcs: 2
|
|
297
|
+
*/
|
|
298
|
+
on_waiting(): Function | undefined;
|
|
299
|
+
on_waiting(callback: (element: this, time: any) => any): this;
|
|
300
|
+
on_waiting(callback?: (element: this, time: any) => any): this | Function | undefined {
|
|
301
|
+
if (callback == null) { return this.onwaiting ?? undefined; }
|
|
302
|
+
const e = this;
|
|
303
|
+
this.onwaiting = (t) => callback(e, t);
|
|
304
|
+
return this;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
/**
|
|
308
|
+
* @docs:
|
|
309
|
+
* @title: On toggle
|
|
310
|
+
* @desc: Fires when the user opens or closes the \<details> element.
|
|
311
|
+
* The equivalent of HTML attribute \`ontoggle\`.
|
|
312
|
+
* The first parameter of the callback is the \`VElement\` object.
|
|
313
|
+
* @param:
|
|
314
|
+
* @name: value
|
|
315
|
+
* @descr: The value to assign. Leave \`null\` to retrieve the attribute's value.
|
|
316
|
+
* @return:
|
|
317
|
+
* @description Returns the \`VElement\` object. Unless parameter \`value\` is \`null\`, then the attribute's value is returned.
|
|
318
|
+
* @funcs: 2
|
|
319
|
+
*/
|
|
320
|
+
on_toggle() : Function | undefined;
|
|
321
|
+
on_toggle(callback: ElementEvent<this>): this;
|
|
322
|
+
on_toggle(callback?: ElementEvent<this>): this | Function | undefined {
|
|
323
|
+
if (callback == null) { return this.ontoggle ?? undefined; }
|
|
324
|
+
const e = this;
|
|
325
|
+
this.ontoggle = (t) => callback(e, t);
|
|
326
|
+
return this;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
`;
|
|
331
|
+
|
|
332
|
+
// Convert the code
|
|
333
|
+
// const convertedCode = convertToJSDoc(test_code);
|
|
334
|
+
// console.log('\n📄 Converted Code:=======================\n'+convertedCode + "\n=====================");
|
|
335
|
+
|
|
336
|
+
// From file.
|
|
337
|
+
import { fileURLToPath } from 'url';
|
|
338
|
+
import * as path from 'path';
|
|
339
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
340
|
+
const __dirname = path.dirname(__filename);
|
|
341
|
+
import * as vlib from "@vandenberghinc/vlib"
|
|
342
|
+
|
|
343
|
+
const data = new vlib.Path(__dirname + "/convert_to_jsdoc_input.txt").load_sync();
|
|
344
|
+
const converted = convertToJSDoc(data);
|
|
345
|
+
new vlib.Path(__dirname + "/convert_to_jsdoc_output.txt").save_sync(converted);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"author": "Daan van den Bergh",
|
|
3
3
|
"name": "@vandenberghinc/volt",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.28",
|
|
5
5
|
"description": "",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"types": "./backend/dist/esm/volt.d.ts",
|
|
@@ -9,24 +9,22 @@
|
|
|
9
9
|
"module": "./backend/dist/esm/volt.js",
|
|
10
10
|
"exports": {
|
|
11
11
|
".": {
|
|
12
|
-
"require": "./backend/dist/cjs/volt.js",
|
|
13
|
-
"import": "./backend/dist/esm/volt.js"
|
|
12
|
+
"require": "./backend/dist/cjs/backend/src/volt.js",
|
|
13
|
+
"import": "./backend/dist/esm/backend/src/volt.js"
|
|
14
14
|
},
|
|
15
15
|
"./frontend": {
|
|
16
|
-
"import": "./frontend/dist/volt.js"
|
|
16
|
+
"import": "./frontend/dist/frontend/src/volt.js"
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
19
|
"scripts": {
|
|
20
20
|
"link": "vrepo --npm --link --dependencies ../vlib/ts/,../vhighlight/",
|
|
21
21
|
"unlink": "vrepo --npm --unlink",
|
|
22
|
-
"build": "npm run build:backend --silent && npm run
|
|
23
|
-
"build:backend": "tsc -p backend/tsconfig.json
|
|
22
|
+
"build": "npm run build:backend --silent && npm run build:backend:cjs --silent && npm run build:frontend --silent",
|
|
23
|
+
"build:backend": "tsc -p backend/tsconfig.json",
|
|
24
24
|
"build:backend:cjs": "vts --transform-esm --debug 1 --src backend/dist/esm/ --dest backend/dist/cjs/ --override --platform node --target es2023",
|
|
25
25
|
"build:frontend": "tsc -p frontend/tsconfig.json",
|
|
26
26
|
"start": "node start.js",
|
|
27
|
-
"check-circular-dependencies": "npx madge --circular frontend/src/"
|
|
28
|
-
"add-backend-dist-files": "rsync -az --delete ./frontend/src/css/ ./backend/dist/css/",
|
|
29
|
-
"generate-docs": "libris --generate-docs"
|
|
27
|
+
"check-circular-dependencies": "npx madge --circular frontend/src/"
|
|
30
28
|
},
|
|
31
29
|
"publishConfig": {
|
|
32
30
|
"access": "public"
|
|
@@ -36,12 +34,12 @@
|
|
|
36
34
|
"volt-dev": "./backend/dist/esm-dev/cli.js"
|
|
37
35
|
},
|
|
38
36
|
"dependencies": {
|
|
39
|
-
"@vandenberghinc/vhighlight": "^1.3.
|
|
40
|
-
"@vandenberghinc/vlib": "^1.
|
|
37
|
+
"@vandenberghinc/vhighlight": "^1.3.15",
|
|
38
|
+
"@vandenberghinc/vlib": "^1.6.29",
|
|
41
39
|
"@vandenberghinc/volt": "1.1.21",
|
|
42
40
|
"blob-stream": "^0.1.3",
|
|
43
41
|
"esbuild": "^0.25.4",
|
|
44
|
-
"mongodb": "^6.
|
|
42
|
+
"mongodb": "^6.19.0",
|
|
45
43
|
"nodemailer": "^6.10.1",
|
|
46
44
|
"pdfkit": "^0.14.0",
|
|
47
45
|
"playwright": "^1.52.0",
|
|
@@ -49,6 +47,7 @@
|
|
|
49
47
|
},
|
|
50
48
|
"devDependencies": {
|
|
51
49
|
"@types/node": "^22.15.21",
|
|
50
|
+
"@types/nodemailer": "^7.0.1",
|
|
52
51
|
"typescript": "^5.8.3"
|
|
53
52
|
},
|
|
54
53
|
"vrepo_links": {
|
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author Daan van den Bergh
|
|
3
|
-
* @copyright © 2022 - 2025 Daan van den Bergh.
|
|
4
|
-
*/
|
|
5
|
-
import { AggregationCursor, Collection as MongoCollection, Document as MongoDoc } from 'mongodb';
|
|
6
|
-
import { Document } from "./document.js";
|
|
7
|
-
import type { Database } from "./database.js";
|
|
8
|
-
/** Index options. */
|
|
9
|
-
interface BaseOptions {
|
|
10
|
-
options?: Record<string, any>;
|
|
11
|
-
forced?: boolean;
|
|
12
|
-
}
|
|
13
|
-
export type IndexOptions = (BaseOptions & {
|
|
14
|
-
key: string;
|
|
15
|
-
keys?: never;
|
|
16
|
-
}) | (BaseOptions & {
|
|
17
|
-
key?: never;
|
|
18
|
-
keys: string[];
|
|
19
|
-
});
|
|
20
|
-
export type Query = string | Record<string, any>;
|
|
21
|
-
/**
|
|
22
|
-
* A wrapper class for the MongoDB collection.
|
|
23
|
-
*
|
|
24
|
-
* @note Any document type is suported, including primitives, arrays and objects.
|
|
25
|
-
*
|
|
26
|
-
* @example
|
|
27
|
-
* const col1 = server.db.collection("col1");
|
|
28
|
-
* const col2 = server.db.collection({
|
|
29
|
-
* name: "col2",
|
|
30
|
-
* indexes: ["uid", "name"],
|
|
31
|
-
* ttl: 1000 * 60 * 60 * 24, // 1 day
|
|
32
|
-
* });
|
|
33
|
-
*/
|
|
34
|
-
export declare class Collection<Data extends Document.Data = any> {
|
|
35
|
-
static chunk_size: number;
|
|
36
|
-
static constructor_scheme: {
|
|
37
|
-
name: string;
|
|
38
|
-
ttl: {
|
|
39
|
-
type: string;
|
|
40
|
-
default: null;
|
|
41
|
-
};
|
|
42
|
-
indexes: {
|
|
43
|
-
type: string;
|
|
44
|
-
default: never[];
|
|
45
|
-
value_scheme: {
|
|
46
|
-
type: string[];
|
|
47
|
-
scheme: {
|
|
48
|
-
key: {
|
|
49
|
-
type: string;
|
|
50
|
-
required: (data: any) => boolean;
|
|
51
|
-
};
|
|
52
|
-
keys: {
|
|
53
|
-
type: string[];
|
|
54
|
-
required: (data: any) => boolean;
|
|
55
|
-
value_scheme: string;
|
|
56
|
-
postprocess: (keys: any) => any;
|
|
57
|
-
};
|
|
58
|
-
options: {
|
|
59
|
-
type: string;
|
|
60
|
-
required: boolean;
|
|
61
|
-
};
|
|
62
|
-
forced: {
|
|
63
|
-
type: string;
|
|
64
|
-
default: boolean;
|
|
65
|
-
};
|
|
66
|
-
};
|
|
67
|
-
postprocess: (info: any) => any;
|
|
68
|
-
};
|
|
69
|
-
};
|
|
70
|
-
};
|
|
71
|
-
/** Collection name */
|
|
72
|
-
name: string;
|
|
73
|
-
/** Time to live in msec for all documents. */
|
|
74
|
-
ttl?: number;
|
|
75
|
-
ttl_enabled: boolean;
|
|
76
|
-
/** The column. */
|
|
77
|
-
_col?: MongoCollection;
|
|
78
|
-
/**
|
|
79
|
-
* The Database parent class, used to initialize the column on demand.
|
|
80
|
-
* So the user can define collections at root level before the database is initialized. */
|
|
81
|
-
db: Database;
|
|
82
|
-
/** Is initialized. */
|
|
83
|
-
initialized: boolean;
|
|
84
|
-
/** The temporary indexes passed to the constructor for the init method. */
|
|
85
|
-
private _init_indexes?;
|
|
86
|
-
/** Constructor. */
|
|
87
|
-
constructor(opts: {
|
|
88
|
-
name: string;
|
|
89
|
-
col?: MongoCollection;
|
|
90
|
-
ttl?: number;
|
|
91
|
-
indexes?: (string | IndexOptions)[];
|
|
92
|
-
db: Database;
|
|
93
|
-
});
|
|
94
|
-
/** Initialize. */
|
|
95
|
-
init(): Promise<this>;
|
|
96
|
-
assert_init(): asserts this is {
|
|
97
|
-
_col: MongoCollection;
|
|
98
|
-
};
|
|
99
|
-
/** Setup the ttl configuration. */
|
|
100
|
-
_setup_ttl(): Promise<void>;
|
|
101
|
-
private _process_doc;
|
|
102
|
-
private _load_chunked;
|
|
103
|
-
private _save_chunked;
|
|
104
|
-
col(): Promise<NonNullable<MongoCollection>>;
|
|
105
|
-
/** Create a reference. */
|
|
106
|
-
ref<Data extends Document.Data = any>(query: Query, opts?: Omit<ConstructorParameters<typeof Document.Ref<Data>>[1], "col">): Document.Ref<Data>;
|
|
107
|
-
reference<Data extends Document.Data = any>(query: Query, opts?: Omit<ConstructorParameters<typeof Document.Ref<Data>>[1], "col">): Document.Ref<Data>;
|
|
108
|
-
/** Has index. */
|
|
109
|
-
has_index(index: string): Promise<boolean>;
|
|
110
|
-
create_index(opts: string | IndexOptions): Promise<string>;
|
|
111
|
-
find(query: Record<string, any>): Promise<Data | undefined>;
|
|
112
|
-
find_many(query: Record<string, any>): Promise<Data[] | undefined>;
|
|
113
|
-
exists(path: Query): Promise<boolean>;
|
|
114
|
-
load(path: Query, opts?: {
|
|
115
|
-
default?: any;
|
|
116
|
-
chunked?: boolean;
|
|
117
|
-
attributes?: string[];
|
|
118
|
-
projection?: Record<string, any>;
|
|
119
|
-
} | null): Promise<Data | undefined>;
|
|
120
|
-
save(path: Query, content: any, opts?: {
|
|
121
|
-
chunked?: boolean;
|
|
122
|
-
bulk?: boolean;
|
|
123
|
-
set?: boolean;
|
|
124
|
-
} | null): Promise<any>;
|
|
125
|
-
/** Update many. */
|
|
126
|
-
update_many(...args: Parameters<typeof MongoCollection.prototype.updateMany>): Promise<any>;
|
|
127
|
-
list(path: Query, options?: {
|
|
128
|
-
process?: boolean;
|
|
129
|
-
projection?: Record<string, any>;
|
|
130
|
-
}): Promise<Data[]>;
|
|
131
|
-
list_query(query?: Record<string, any>, options?: {
|
|
132
|
-
process?: boolean;
|
|
133
|
-
projection?: Record<string, any>;
|
|
134
|
-
}): Promise<Data[]>;
|
|
135
|
-
list_all(query?: Record<string, any>, options?: {
|
|
136
|
-
process?: boolean;
|
|
137
|
-
projection?: Record<string, any>;
|
|
138
|
-
}): Promise<Data[]>;
|
|
139
|
-
delete(path: Query, opts?: {
|
|
140
|
-
chunked?: boolean;
|
|
141
|
-
bulk?: boolean;
|
|
142
|
-
}): Promise<any>;
|
|
143
|
-
delete_query(query?: Record<string, any>): Promise<void>;
|
|
144
|
-
delete_all(path: Query): Promise<void>;
|
|
145
|
-
delete_many(query: Record<string, any>): Promise<void>;
|
|
146
|
-
delete_collection(): Promise<void>;
|
|
147
|
-
clean<T extends Partial<Data> = Data>(doc: T): T | undefined;
|
|
148
|
-
/** Write bulk operations. */
|
|
149
|
-
bulk_operations(operations?: any[]): Promise<any>;
|
|
150
|
-
/** Aggregate */
|
|
151
|
-
aggregate<T extends Partial<Data> = Data>(pipeline: MongoDoc[], opts: {
|
|
152
|
-
cursor?: false;
|
|
153
|
-
clean?: boolean;
|
|
154
|
-
}): Promise<T[]>;
|
|
155
|
-
aggregate<T extends Partial<Data> = Data>(pipeline: MongoDoc[], opts?: {
|
|
156
|
-
cursor: true;
|
|
157
|
-
clean?: boolean;
|
|
158
|
-
}): Promise<AggregationCursor<T>>;
|
|
159
|
-
}
|
|
160
|
-
export {};
|