@vandenberghinc/volt 1.2.6 → 1.2.7
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/backend/src/blacklist.d.ts +12 -0
- package/backend/dist/cjs/backend/src/blacklist.js +78 -0
- package/backend/dist/cjs/backend/src/cli.d.ts +2 -0
- package/backend/dist/cjs/backend/src/cli.js +198 -0
- package/backend/dist/cjs/backend/src/database/collection.d.ts +1765 -0
- package/backend/dist/cjs/backend/src/database/collection.js +3301 -0
- package/backend/dist/cjs/backend/src/database/database.d.ts +92 -0
- package/backend/dist/cjs/backend/src/database/database.js +170 -0
- package/backend/dist/cjs/backend/src/database/document.d.ts +1 -0
- package/backend/dist/cjs/backend/src/database/document.js +15 -0
- 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.d.ts +1 -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.d.ts +1 -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 +78 -0
- package/backend/dist/cjs/backend/src/database/flatten.js +53 -0
- package/backend/dist/cjs/backend/src/database/flatten_test.d.ts +1 -0
- package/backend/dist/cjs/backend/src/database/flatten_test.js +175 -0
- package/backend/dist/cjs/backend/src/database/quota/quoata_v2.d.ts +533 -0
- package/backend/dist/cjs/backend/src/database/quota/quoata_v2.js +1046 -0
- package/backend/dist/cjs/backend/src/database/quota/quota.d.ts +551 -0
- package/backend/dist/cjs/backend/src/database/quota/quota.js +1108 -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 +412 -0
- package/backend/dist/cjs/backend/src/database/quota/safe_int.js +745 -0
- package/backend/dist/cjs/backend/src/endpoint.d.ts +346 -0
- package/backend/dist/cjs/backend/src/endpoint.js +468 -0
- 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/cjs/backend/src/errors/internal_external.d.ts +52 -0
- package/backend/dist/cjs/backend/src/errors/internal_external.js +95 -0
- package/backend/dist/cjs/backend/src/errors/invalid_usage_error.d.ts +41 -0
- package/backend/dist/cjs/backend/src/errors/invalid_usage_error.js +47 -0
- package/backend/dist/cjs/backend/src/errors/system_error.d.ts +261 -0
- package/backend/dist/cjs/backend/src/errors/system_error.js +436 -0
- package/backend/dist/cjs/backend/src/events.d.ts +97 -0
- package/backend/dist/cjs/backend/src/events.js +15 -0
- package/backend/dist/cjs/backend/src/frontend.d.ts +13 -0
- package/backend/dist/cjs/backend/src/frontend.js +56 -0
- package/backend/dist/cjs/backend/src/image_endpoint.d.ts +44 -0
- package/backend/dist/cjs/backend/src/image_endpoint.js +185 -0
- package/backend/dist/cjs/backend/src/index.d.ts +23 -0
- package/backend/dist/cjs/backend/src/index.js +70 -0
- 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 +112 -0
- package/backend/dist/cjs/backend/src/meta.js +181 -0
- package/backend/dist/cjs/backend/src/payments/paddle.d.ts +329 -0
- package/backend/dist/cjs/backend/src/payments/paddle.js +1996 -0
- package/backend/dist/cjs/backend/src/payments/stripe/checkout.d.ts +113 -0
- package/backend/dist/cjs/backend/src/payments/stripe/checkout.js +295 -0
- package/backend/dist/cjs/backend/src/payments/stripe/customers.d.ts +17 -0
- package/backend/dist/cjs/backend/src/payments/stripe/customers.js +164 -0
- package/backend/dist/cjs/backend/src/payments/stripe/error.d.ts +74 -0
- package/backend/dist/cjs/backend/src/payments/stripe/error.js +64 -0
- package/backend/dist/cjs/backend/src/payments/stripe/events.d.ts +155 -0
- package/backend/dist/cjs/backend/src/payments/stripe/events.js +15 -0
- package/backend/dist/cjs/backend/src/payments/stripe/meters.d.ts +105 -0
- package/backend/dist/cjs/backend/src/payments/stripe/meters.js +230 -0
- package/backend/dist/cjs/backend/src/payments/stripe/payment_methods.d.ts +58 -0
- package/backend/dist/cjs/backend/src/payments/stripe/payment_methods.js +109 -0
- package/backend/dist/cjs/backend/src/payments/stripe/products.d.ts +519 -0
- package/backend/dist/cjs/backend/src/payments/stripe/products.js +650 -0
- package/backend/dist/cjs/backend/src/payments/stripe/stripe.d.ts +215 -0
- package/backend/dist/cjs/backend/src/payments/stripe/stripe.js +468 -0
- package/backend/dist/cjs/backend/src/payments/stripe/subscriptions.d.ts +172 -0
- package/backend/dist/cjs/backend/src/payments/stripe/subscriptions.js +557 -0
- package/backend/dist/cjs/backend/src/payments/stripe/utils.d.ts +63 -0
- package/backend/dist/cjs/backend/src/payments/stripe/utils.js +118 -0
- package/backend/dist/cjs/backend/src/payments/stripe/webhooks.d.ts +105 -0
- package/backend/dist/cjs/backend/src/payments/stripe/webhooks.js +627 -0
- 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/communication.d.ts +70 -0
- package/backend/dist/cjs/backend/src/plugins/communication.js +196 -0
- package/backend/dist/cjs/backend/src/plugins/mail/mail.d.ts +255 -0
- package/backend/dist/cjs/backend/src/plugins/mail/mail.js +381 -0
- package/backend/dist/cjs/backend/src/plugins/mail/ui.d.ts +297 -0
- package/backend/dist/cjs/backend/src/plugins/mail/ui.js +1370 -0
- package/backend/dist/cjs/backend/src/plugins/pdf.d.ts +1 -0
- package/backend/dist/cjs/backend/src/plugins/pdf.js +1456 -0
- package/backend/dist/cjs/backend/src/plugins/thread_monitor.d.ts +18 -0
- package/backend/dist/cjs/backend/src/plugins/thread_monitor.js +116 -0
- package/backend/dist/cjs/backend/src/rate_limit.d.ts +148 -0
- package/backend/dist/cjs/backend/src/rate_limit.js +543 -0
- package/backend/dist/cjs/backend/src/route.d.ts +39 -0
- package/backend/dist/cjs/backend/src/route.js +172 -0
- package/backend/dist/cjs/backend/src/server.d.ts +502 -0
- package/backend/dist/cjs/backend/src/server.js +1710 -0
- package/backend/dist/cjs/backend/src/server.old.d.ts +594 -0
- package/backend/dist/cjs/backend/src/server.old.js +2058 -0
- package/backend/dist/cjs/backend/src/splash_screen.d.ts +93 -0
- package/backend/dist/cjs/backend/src/splash_screen.js +119 -0
- package/backend/dist/cjs/backend/src/status.d.ts +89 -0
- package/backend/dist/cjs/backend/src/status.js +211 -0
- package/backend/dist/cjs/backend/src/stream.d.ts +494 -0
- package/backend/dist/cjs/backend/src/stream.js +1370 -0
- package/backend/dist/cjs/backend/src/users.d.ts +926 -0
- package/backend/dist/cjs/backend/src/users.js +2223 -0
- package/backend/dist/cjs/backend/src/utils.d.ts +22 -0
- package/backend/dist/cjs/backend/src/utils.js +626 -0
- package/backend/dist/cjs/backend/src/view.d.ts +115 -0
- package/backend/dist/cjs/backend/src/view.js +519 -0
- package/backend/dist/cjs/backend/src/vinc.d.ts +6 -0
- package/backend/dist/cjs/backend/src/vinc.js +40 -0
- package/backend/dist/cjs/backend/src/volt.d.ts +24 -0
- package/backend/dist/cjs/backend/src/volt.js +72 -0
- 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/cjs/package.json +1 -0
- package/backend/dist/esm/backend/src/blacklist.d.ts +12 -0
- package/backend/dist/esm/backend/src/blacklist.js +52 -0
- package/backend/dist/esm/backend/src/cli.d.ts +2 -0
- package/backend/dist/esm/backend/src/cli.js +211 -0
- package/backend/dist/esm/backend/src/database/collection.d.ts +1765 -0
- package/backend/dist/esm/backend/src/database/collection.js +3779 -0
- package/backend/dist/esm/backend/src/database/database.d.ts +92 -0
- package/backend/dist/esm/backend/src/database/database.js +214 -0
- 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 +415 -0
- package/backend/dist/esm/backend/src/database/flatten.d.ts +78 -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/quoata_v2.d.ts +533 -0
- package/backend/dist/esm/backend/src/database/quota/quoata_v2.js +1155 -0
- package/backend/dist/esm/backend/src/database/quota/quota.d.ts +551 -0
- package/backend/dist/esm/backend/src/database/quota/quota.js +1219 -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 +412 -0
- package/backend/dist/esm/backend/src/database/quota/safe_int.js +810 -0
- package/backend/dist/esm/backend/src/endpoint.d.ts +346 -0
- package/backend/dist/esm/backend/src/endpoint.js +479 -0
- 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/esm/backend/src/errors/internal_external.d.ts +52 -0
- package/backend/dist/esm/backend/src/errors/internal_external.js +86 -0
- package/backend/dist/esm/backend/src/errors/invalid_usage_error.d.ts +41 -0
- package/backend/dist/esm/backend/src/errors/invalid_usage_error.js +33 -0
- package/backend/dist/esm/backend/src/errors/system_error.d.ts +261 -0
- package/backend/dist/esm/backend/src/errors/system_error.js +444 -0
- package/backend/dist/esm/backend/src/events.d.ts +97 -0
- package/backend/dist/esm/backend/src/events.js +5 -0
- package/backend/dist/esm/backend/src/frontend.d.ts +13 -0
- package/backend/dist/esm/backend/src/frontend.js +23 -0
- package/backend/dist/esm/backend/src/image_endpoint.d.ts +44 -0
- package/backend/dist/esm/backend/src/image_endpoint.js +196 -0
- package/backend/dist/esm/backend/src/index.d.ts +23 -0
- package/backend/dist/esm/backend/src/index.js +26 -0
- 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 +112 -0
- package/backend/dist/esm/backend/src/meta.js +152 -0
- package/backend/dist/esm/backend/src/payments/paddle.d.ts +329 -0
- package/backend/dist/esm/backend/src/payments/paddle.js +2276 -0
- package/backend/dist/esm/backend/src/payments/stripe/checkout.d.ts +113 -0
- package/backend/dist/esm/backend/src/payments/stripe/checkout.js +356 -0
- package/backend/dist/esm/backend/src/payments/stripe/customers.d.ts +17 -0
- package/backend/dist/esm/backend/src/payments/stripe/customers.js +193 -0
- package/backend/dist/esm/backend/src/payments/stripe/error.d.ts +74 -0
- package/backend/dist/esm/backend/src/payments/stripe/error.js +51 -0
- package/backend/dist/esm/backend/src/payments/stripe/events.d.ts +155 -0
- package/backend/dist/esm/backend/src/payments/stripe/events.js +5 -0
- package/backend/dist/esm/backend/src/payments/stripe/meters.d.ts +105 -0
- package/backend/dist/esm/backend/src/payments/stripe/meters.js +318 -0
- package/backend/dist/esm/backend/src/payments/stripe/payment_methods.d.ts +58 -0
- package/backend/dist/esm/backend/src/payments/stripe/payment_methods.js +135 -0
- package/backend/dist/esm/backend/src/payments/stripe/products.d.ts +519 -0
- package/backend/dist/esm/backend/src/payments/stripe/products.js +896 -0
- package/backend/dist/esm/backend/src/payments/stripe/stripe.d.ts +215 -0
- package/backend/dist/esm/backend/src/payments/stripe/stripe.js +464 -0
- package/backend/dist/esm/backend/src/payments/stripe/subscriptions.d.ts +172 -0
- package/backend/dist/esm/backend/src/payments/stripe/subscriptions.js +754 -0
- package/backend/dist/esm/backend/src/payments/stripe/utils.d.ts +63 -0
- package/backend/dist/esm/backend/src/payments/stripe/utils.js +131 -0
- package/backend/dist/esm/backend/src/payments/stripe/webhooks.d.ts +105 -0
- package/backend/dist/esm/backend/src/payments/stripe/webhooks.js +752 -0
- 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/communication.d.ts +70 -0
- package/backend/dist/esm/backend/src/plugins/communication.js +169 -0
- package/backend/dist/esm/backend/src/plugins/mail/mail.d.ts +255 -0
- package/backend/dist/esm/backend/src/plugins/mail/mail.js +396 -0
- package/backend/dist/esm/backend/src/plugins/mail/ui.d.ts +297 -0
- package/backend/dist/esm/backend/src/plugins/mail/ui.js +1400 -0
- package/backend/dist/esm/backend/src/plugins/pdf.d.ts +1 -0
- package/backend/dist/esm/backend/src/plugins/pdf.js +1694 -0
- package/backend/dist/esm/backend/src/plugins/thread_monitor.d.ts +18 -0
- package/backend/dist/esm/backend/src/plugins/thread_monitor.js +120 -0
- package/backend/dist/esm/backend/src/rate_limit.d.ts +148 -0
- package/backend/dist/esm/backend/src/rate_limit.js +667 -0
- package/backend/dist/esm/backend/src/route.d.ts +39 -0
- package/backend/dist/esm/backend/src/route.js +222 -0
- package/backend/dist/esm/backend/src/server.d.ts +502 -0
- package/backend/dist/esm/backend/src/server.js +2031 -0
- package/backend/dist/esm/backend/src/server.old.d.ts +594 -0
- package/backend/dist/esm/backend/src/server.old.js +2630 -0
- package/backend/dist/esm/backend/src/splash_screen.d.ts +93 -0
- package/backend/dist/esm/backend/src/splash_screen.js +156 -0
- package/backend/dist/esm/backend/src/status.d.ts +89 -0
- package/backend/dist/esm/backend/src/status.js +213 -0
- package/backend/dist/esm/backend/src/stream.d.ts +494 -0
- package/backend/dist/esm/backend/src/stream.js +1611 -0
- package/backend/dist/esm/backend/src/users.d.ts +926 -0
- package/backend/dist/esm/backend/src/users.js +2423 -0
- package/backend/dist/esm/backend/src/utils.d.ts +22 -0
- package/backend/dist/esm/backend/src/utils.js +463 -0
- package/backend/dist/esm/backend/src/view.d.ts +115 -0
- package/backend/dist/esm/backend/src/view.js +584 -0
- package/backend/dist/esm/backend/src/vinc.d.ts +6 -0
- package/backend/dist/esm/backend/src/vinc.js +6 -0
- package/backend/dist/esm/backend/src/volt.d.ts +24 -0
- package/backend/dist/esm/backend/src/volt.js +27 -0
- 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 +1765 -0
- package/frontend/dist/backend/src/database/collection.js +3779 -0
- package/frontend/dist/backend/src/database/database.d.ts +92 -0
- package/frontend/dist/backend/src/database/database.js +214 -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 +78 -0
- package/frontend/dist/backend/src/database/flatten.js +22 -0
- package/frontend/dist/backend/src/endpoint.d.ts +346 -0
- package/frontend/dist/backend/src/endpoint.js +479 -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 +52 -0
- package/frontend/dist/backend/src/errors/internal_external.js +86 -0
- package/frontend/dist/backend/src/errors/invalid_usage_error.d.ts +41 -0
- package/frontend/dist/backend/src/errors/invalid_usage_error.js +33 -0
- package/frontend/dist/backend/src/errors/system_error.d.ts +261 -0
- package/frontend/dist/backend/src/errors/system_error.js +444 -0
- package/frontend/dist/backend/src/events.d.ts +97 -0
- package/frontend/dist/backend/src/events.js +5 -0
- package/frontend/dist/backend/src/frontend.d.ts +13 -0
- package/frontend/dist/backend/src/frontend.js +23 -0
- package/frontend/dist/backend/src/image_endpoint.d.ts +44 -0
- package/frontend/dist/backend/src/image_endpoint.js +196 -0
- package/frontend/dist/backend/src/meta.d.ts +112 -0
- package/frontend/dist/backend/src/meta.js +152 -0
- package/frontend/dist/backend/src/payments/paddle.d.ts +329 -0
- package/frontend/dist/backend/src/payments/paddle.js +2276 -0
- package/frontend/dist/backend/src/payments/stripe/checkout.d.ts +113 -0
- package/frontend/dist/backend/src/payments/stripe/checkout.js +356 -0
- package/frontend/dist/backend/src/payments/stripe/customers.d.ts +17 -0
- package/frontend/dist/backend/src/payments/stripe/customers.js +193 -0
- package/frontend/dist/backend/src/payments/stripe/error.d.ts +74 -0
- package/frontend/dist/backend/src/payments/stripe/error.js +51 -0
- package/frontend/dist/backend/src/payments/stripe/events.d.ts +155 -0
- package/frontend/dist/backend/src/payments/stripe/events.js +5 -0
- package/frontend/dist/backend/src/payments/stripe/meters.d.ts +105 -0
- package/frontend/dist/backend/src/payments/stripe/meters.js +318 -0
- package/frontend/dist/backend/src/payments/stripe/payment_methods.d.ts +58 -0
- package/frontend/dist/backend/src/payments/stripe/payment_methods.js +135 -0
- package/frontend/dist/backend/src/payments/stripe/products.d.ts +519 -0
- package/frontend/dist/backend/src/payments/stripe/products.js +896 -0
- package/frontend/dist/backend/src/payments/stripe/stripe.d.ts +215 -0
- package/frontend/dist/backend/src/payments/stripe/stripe.js +464 -0
- package/frontend/dist/backend/src/payments/stripe/subscriptions.d.ts +172 -0
- package/frontend/dist/backend/src/payments/stripe/subscriptions.js +754 -0
- package/frontend/dist/backend/src/payments/stripe/utils.d.ts +63 -0
- package/frontend/dist/backend/src/payments/stripe/utils.js +131 -0
- package/frontend/dist/backend/src/payments/stripe/webhooks.d.ts +105 -0
- package/frontend/dist/backend/src/payments/stripe/webhooks.js +752 -0
- package/frontend/dist/backend/src/plugins/mail/mail.d.ts +255 -0
- package/frontend/dist/backend/src/plugins/mail/mail.js +396 -0
- package/frontend/dist/backend/src/plugins/mail/ui.d.ts +297 -0
- package/frontend/dist/backend/src/plugins/mail/ui.js +1400 -0
- package/frontend/dist/backend/src/rate_limit.d.ts +148 -0
- package/frontend/dist/backend/src/rate_limit.js +667 -0
- package/frontend/dist/backend/src/route.d.ts +39 -0
- package/frontend/dist/backend/src/route.js +222 -0
- package/frontend/dist/backend/src/server.d.ts +502 -0
- package/frontend/dist/backend/src/server.js +2031 -0
- package/frontend/dist/backend/src/splash_screen.d.ts +93 -0
- package/frontend/dist/backend/src/splash_screen.js +156 -0
- package/frontend/dist/backend/src/status.d.ts +89 -0
- package/frontend/dist/backend/src/status.js +213 -0
- package/frontend/dist/backend/src/stream.d.ts +494 -0
- package/frontend/dist/backend/src/stream.js +1611 -0
- package/frontend/dist/backend/src/users.d.ts +926 -0
- package/frontend/dist/backend/src/users.js +2423 -0
- package/frontend/dist/backend/src/utils.d.ts +22 -0
- package/frontend/dist/backend/src/utils.js +463 -0
- package/frontend/dist/backend/src/view.d.ts +115 -0
- package/frontend/dist/backend/src/view.js +584 -0
- package/frontend/dist/frontend/src/css/adyen.css +92 -0
- package/frontend/dist/frontend/src/css/volt.css +75 -0
- package/frontend/dist/frontend/src/elements/base.d.ts +3743 -0
- package/frontend/dist/frontend/src/elements/base.js +12151 -0
- package/frontend/dist/frontend/src/elements/module.d.ts +95 -0
- package/frontend/dist/frontend/src/elements/module.js +216 -0
- package/frontend/dist/frontend/src/elements/register_element.d.ts +3 -0
- package/frontend/dist/frontend/src/elements/register_element.js +22 -0
- package/frontend/dist/frontend/src/elements/resize_query_manager.d.ts +0 -0
- package/frontend/dist/frontend/src/elements/resize_query_manager.js +150 -0
- 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/index.d.ts +21 -0
- package/frontend/dist/frontend/src/index.js +29 -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/frontend/src/modules/color.d.ts +160 -0
- package/frontend/dist/frontend/src/modules/color.js +316 -0
- 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 +79 -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/frontend/src/modules/meta.js +48 -0
- package/frontend/dist/frontend/src/modules/paddle.d.ts +1207 -0
- package/frontend/dist/frontend/src/modules/paddle.js +2594 -0
- 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/frontend/src/modules/statics.js +43 -0
- package/frontend/dist/frontend/src/modules/stripe/cart.d.ts +112 -0
- package/frontend/dist/frontend/src/modules/stripe/cart.js +321 -0
- package/frontend/dist/frontend/src/modules/stripe/checkout.d.ts +7 -0
- package/frontend/dist/frontend/src/modules/stripe/checkout.js +37 -0
- package/frontend/dist/frontend/src/modules/stripe/index.m.d.ts +6 -0
- package/frontend/dist/frontend/src/modules/stripe/index.m.js +6 -0
- package/frontend/dist/frontend/src/modules/stripe/payments.d.ts +58 -0
- package/frontend/dist/frontend/src/modules/stripe/payments.js +92 -0
- package/frontend/dist/frontend/src/modules/support.d.ts +30 -0
- package/frontend/dist/frontend/src/modules/support.js +53 -0
- package/frontend/dist/frontend/src/modules/theme.d.ts +133 -0
- package/frontend/dist/frontend/src/modules/theme.js +406 -0
- 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 +270 -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/frontend/src/types/gradient.js +79 -0
- package/frontend/dist/frontend/src/ui/border_button.d.ts +94 -0
- package/frontend/dist/frontend/src/ui/border_button.js +228 -0
- package/frontend/dist/frontend/src/ui/button.d.ts +241 -0
- package/frontend/dist/frontend/src/ui/button.js +682 -0
- package/frontend/dist/frontend/src/ui/canvas.d.ts +138 -0
- package/frontend/dist/frontend/src/ui/canvas.js +444 -0
- package/frontend/dist/frontend/src/ui/checkbox.d.ts +74 -0
- package/frontend/dist/frontend/src/ui/checkbox.js +321 -0
- package/frontend/dist/frontend/src/ui/code.d.ts +235 -0
- package/frontend/dist/frontend/src/ui/code.js +1007 -0
- package/frontend/dist/frontend/src/ui/context_menu.d.ts +36 -0
- package/frontend/dist/frontend/src/ui/context_menu.js +205 -0
- package/frontend/dist/frontend/src/ui/css.d.ts +16 -0
- package/frontend/dist/frontend/src/ui/css.js +48 -0
- package/frontend/dist/frontend/src/ui/divider.d.ts +15 -0
- package/frontend/dist/frontend/src/ui/divider.js +78 -0
- package/frontend/dist/frontend/src/ui/dropdown.d.ts +176 -0
- package/frontend/dist/frontend/src/ui/dropdown.js +481 -0
- package/frontend/dist/frontend/src/ui/for_each.d.ts +37 -0
- package/frontend/dist/frontend/src/ui/for_each.js +92 -0
- package/frontend/dist/frontend/src/ui/form.d.ts +34 -0
- package/frontend/dist/frontend/src/ui/form.js +233 -0
- package/frontend/dist/frontend/src/ui/frame_modes.d.ts +37 -0
- package/frontend/dist/frontend/src/ui/frame_modes.js +108 -0
- package/frontend/dist/frontend/src/ui/google_map.d.ts +24 -0
- package/frontend/dist/frontend/src/ui/google_map.js +106 -0
- package/frontend/dist/frontend/src/ui/gradient.d.ts +25 -0
- package/frontend/dist/frontend/src/ui/gradient.js +131 -0
- package/frontend/dist/frontend/src/ui/image.d.ts +111 -0
- package/frontend/dist/frontend/src/ui/image.js +576 -0
- package/frontend/dist/frontend/src/ui/input.d.ts +392 -0
- package/frontend/dist/frontend/src/ui/input.js +1201 -0
- package/frontend/dist/frontend/src/ui/link.d.ts +25 -0
- package/frontend/dist/frontend/src/ui/link.js +140 -0
- package/frontend/dist/frontend/src/ui/list.d.ts +37 -0
- package/frontend/dist/frontend/src/ui/list.js +170 -0
- package/frontend/dist/frontend/src/ui/loader_button.d.ts +80 -0
- package/frontend/dist/frontend/src/ui/loader_button.js +193 -0
- package/frontend/dist/frontend/src/ui/loaders.d.ts +57 -0
- package/frontend/dist/frontend/src/ui/loaders.js +157 -0
- package/frontend/dist/frontend/src/ui/popup.d.ts +94 -0
- package/frontend/dist/frontend/src/ui/popup.js +510 -0
- package/frontend/dist/frontend/src/ui/pseudo.d.ts +44 -0
- package/frontend/dist/frontend/src/ui/pseudo.js +154 -0
- package/frontend/dist/frontend/src/ui/scroller.d.ts +105 -0
- package/frontend/dist/frontend/src/ui/scroller.js +1253 -0
- package/frontend/dist/frontend/src/ui/slider.d.ts +45 -0
- package/frontend/dist/frontend/src/ui/slider.js +217 -0
- package/frontend/dist/frontend/src/ui/spacer.d.ts +15 -0
- package/frontend/dist/frontend/src/ui/spacer.js +78 -0
- package/frontend/dist/frontend/src/ui/span.d.ts +15 -0
- package/frontend/dist/frontend/src/ui/span.js +73 -0
- package/frontend/dist/frontend/src/ui/stack.d.ts +66 -0
- package/frontend/dist/frontend/src/ui/stack.js +335 -0
- package/frontend/dist/frontend/src/ui/steps.d.ts +131 -0
- package/frontend/dist/frontend/src/ui/steps.js +308 -0
- package/frontend/dist/frontend/src/ui/style.d.ts +17 -0
- package/frontend/dist/frontend/src/ui/style.js +73 -0
- package/frontend/dist/frontend/src/ui/switch.d.ts +69 -0
- package/frontend/dist/frontend/src/ui/switch.js +357 -0
- package/frontend/dist/frontend/src/ui/table.d.ts +100 -0
- package/frontend/dist/frontend/src/ui/table.js +405 -0
- package/frontend/dist/frontend/src/ui/tabs.d.ts +111 -0
- package/frontend/dist/frontend/src/ui/tabs.js +424 -0
- package/frontend/dist/frontend/src/ui/text.d.ts +15 -0
- package/frontend/dist/frontend/src/ui/text.js +83 -0
- package/frontend/dist/frontend/src/ui/title.d.ts +91 -0
- package/frontend/dist/frontend/src/ui/title.js +272 -0
- package/frontend/dist/frontend/src/ui/ui.d.ts +35 -0
- package/frontend/dist/frontend/src/ui/ui.js +38 -0
- package/frontend/dist/frontend/src/ui/view.d.ts +15 -0
- package/frontend/dist/frontend/src/ui/view.js +88 -0
- package/frontend/dist/frontend/src/volt.d.ts +20 -0
- package/frontend/dist/frontend/src/volt.js +27 -0
- package/package.json +7 -2
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import net from 'net';
|
|
2
|
+
declare module 'net' {
|
|
3
|
+
interface Socket {
|
|
4
|
+
buffer: string;
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Very basic internal communication socket between processes.
|
|
9
|
+
*/
|
|
10
|
+
declare class Base {
|
|
11
|
+
port: number;
|
|
12
|
+
host: string;
|
|
13
|
+
_on_message: ((message: any, socket: net.Socket) => void) | null;
|
|
14
|
+
constructor(port: number, host?: string);
|
|
15
|
+
on_message(callback: (message: any, socket: net.Socket) => void): this;
|
|
16
|
+
/**
|
|
17
|
+
* Processes the buffer to extract complete messages.
|
|
18
|
+
* Handles multiple consecutive messages.
|
|
19
|
+
* @param {net.Socket} socket - The client socket.
|
|
20
|
+
*/
|
|
21
|
+
_process_buffer(socket: net.Socket): void;
|
|
22
|
+
}
|
|
23
|
+
export declare class Server extends Base {
|
|
24
|
+
server: net.Server;
|
|
25
|
+
clients: Set<net.Socket>;
|
|
26
|
+
/**
|
|
27
|
+
* Initializes the JSON Server.
|
|
28
|
+
* @param {number} port - Port number to listen on.
|
|
29
|
+
* @param {string} host - Host address to bind to.
|
|
30
|
+
*/
|
|
31
|
+
constructor(port: number, host?: string);
|
|
32
|
+
/**
|
|
33
|
+
* Sends a JSON message to a specific socket.
|
|
34
|
+
* @param {net.Socket} socket - The socket to send the message to.
|
|
35
|
+
* @param {Object} obj - The JSON object to send.
|
|
36
|
+
*/
|
|
37
|
+
message(socket: net.Socket, obj: Record<string, any>): void;
|
|
38
|
+
/**
|
|
39
|
+
* Broadcasts a JSON message to all connected clients.
|
|
40
|
+
* @param {Object} obj - The JSON object to broadcast.
|
|
41
|
+
*/
|
|
42
|
+
broadcast(obj: Record<string, any>): void;
|
|
43
|
+
/**
|
|
44
|
+
* Closes the server and all client connections.
|
|
45
|
+
*/
|
|
46
|
+
close(): void;
|
|
47
|
+
}
|
|
48
|
+
export declare class Client extends Base {
|
|
49
|
+
socket: net.Socket;
|
|
50
|
+
/**
|
|
51
|
+
* Initializes the JSON Client.
|
|
52
|
+
* @param {number} port - Port number to connect to.
|
|
53
|
+
* @param {string} host - Host address to connect to.
|
|
54
|
+
*/
|
|
55
|
+
constructor(port: number, host?: string);
|
|
56
|
+
/**
|
|
57
|
+
* Sends a JSON message to the server.
|
|
58
|
+
* @param {Object} obj - The JSON object to send.
|
|
59
|
+
*/
|
|
60
|
+
message(obj: Record<string, any>): void;
|
|
61
|
+
/**
|
|
62
|
+
* Closes the client connection.
|
|
63
|
+
*/
|
|
64
|
+
close(): void;
|
|
65
|
+
}
|
|
66
|
+
declare const _default: {
|
|
67
|
+
Server: typeof Server;
|
|
68
|
+
Client: typeof Client;
|
|
69
|
+
};
|
|
70
|
+
export default _default;
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
var __create = Object.create;
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __export = (target, all) => {
|
|
8
|
+
for (var name in all)
|
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from))
|
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
+
}
|
|
17
|
+
return to;
|
|
18
|
+
};
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
+
mod
|
|
26
|
+
));
|
|
27
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
+
var stdin_exports = {};
|
|
29
|
+
__export(stdin_exports, {
|
|
30
|
+
Client: () => Client,
|
|
31
|
+
Server: () => Server,
|
|
32
|
+
default: () => stdin_default
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(stdin_exports);
|
|
35
|
+
var import_net = __toESM(require("net"));
|
|
36
|
+
class Base {
|
|
37
|
+
port;
|
|
38
|
+
host;
|
|
39
|
+
_on_message;
|
|
40
|
+
constructor(port, host = "127.0.0.1") {
|
|
41
|
+
this.port = port;
|
|
42
|
+
this.host = host;
|
|
43
|
+
this._on_message = null;
|
|
44
|
+
}
|
|
45
|
+
// Set on message.
|
|
46
|
+
on_message(callback) {
|
|
47
|
+
this._on_message = callback;
|
|
48
|
+
return this;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Processes the buffer to extract complete messages.
|
|
52
|
+
* Handles multiple consecutive messages.
|
|
53
|
+
* @param {net.Socket} socket - The client socket.
|
|
54
|
+
*/
|
|
55
|
+
_process_buffer(socket) {
|
|
56
|
+
while (socket.buffer.length >= 4) {
|
|
57
|
+
const length_str = socket.buffer.slice(0, 4);
|
|
58
|
+
const message_length = parseInt(length_str, 10);
|
|
59
|
+
if (isNaN(message_length)) {
|
|
60
|
+
console.error("Invalid message length:", length_str);
|
|
61
|
+
socket.destroy();
|
|
62
|
+
break;
|
|
63
|
+
}
|
|
64
|
+
if (socket.buffer.length >= 4 + message_length) {
|
|
65
|
+
const message_str = socket.buffer.slice(4, 4 + message_length);
|
|
66
|
+
socket.buffer = socket.buffer.slice(4 + message_length);
|
|
67
|
+
try {
|
|
68
|
+
const message = JSON.parse(message_str);
|
|
69
|
+
if (this._on_message)
|
|
70
|
+
this._on_message(message, socket);
|
|
71
|
+
} catch (err) {
|
|
72
|
+
console.error("Invalid JSON received:", message_str);
|
|
73
|
+
}
|
|
74
|
+
} else {
|
|
75
|
+
break;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
class Server extends Base {
|
|
81
|
+
server;
|
|
82
|
+
clients;
|
|
83
|
+
/**
|
|
84
|
+
* Initializes the JSON Server.
|
|
85
|
+
* @param {number} port - Port number to listen on.
|
|
86
|
+
* @param {string} host - Host address to bind to.
|
|
87
|
+
*/
|
|
88
|
+
constructor(port, host = "127.0.0.1") {
|
|
89
|
+
super(port, host);
|
|
90
|
+
this.server = import_net.default.createServer();
|
|
91
|
+
this.clients = /* @__PURE__ */ new Set();
|
|
92
|
+
this.server.on("connection", (socket) => {
|
|
93
|
+
console.log("Client connected:", socket.remoteAddress, socket.remotePort);
|
|
94
|
+
this.clients.add(socket);
|
|
95
|
+
socket.setEncoding("utf8");
|
|
96
|
+
socket.buffer = "";
|
|
97
|
+
socket.on("data", (data) => {
|
|
98
|
+
socket.buffer += data;
|
|
99
|
+
this._process_buffer(socket);
|
|
100
|
+
});
|
|
101
|
+
socket.on("close", () => {
|
|
102
|
+
console.log("Client disconnected:", socket.remoteAddress, socket.remotePort);
|
|
103
|
+
this.clients.delete(socket);
|
|
104
|
+
});
|
|
105
|
+
socket.on("error", (err) => {
|
|
106
|
+
console.error("Socket error:", err);
|
|
107
|
+
socket.destroy();
|
|
108
|
+
this.clients.delete(socket);
|
|
109
|
+
});
|
|
110
|
+
});
|
|
111
|
+
this.server.on("error", (err) => {
|
|
112
|
+
console.error("Server error:", err);
|
|
113
|
+
});
|
|
114
|
+
this.server.listen(port, host, () => {
|
|
115
|
+
console.log(`JSON Server listening on ${host}:${port}`);
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Sends a JSON message to a specific socket.
|
|
120
|
+
* @param {net.Socket} socket - The socket to send the message to.
|
|
121
|
+
* @param {Object} obj - The JSON object to send.
|
|
122
|
+
*/
|
|
123
|
+
message(socket, obj) {
|
|
124
|
+
const json = JSON.stringify(obj);
|
|
125
|
+
const length = json.length.toString().padStart(4, "0");
|
|
126
|
+
socket.write(length + json);
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Broadcasts a JSON message to all connected clients.
|
|
130
|
+
* @param {Object} obj - The JSON object to broadcast.
|
|
131
|
+
*/
|
|
132
|
+
broadcast(obj) {
|
|
133
|
+
for (let socket of this.clients) {
|
|
134
|
+
this.message(socket, obj);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Closes the server and all client connections.
|
|
139
|
+
*/
|
|
140
|
+
close() {
|
|
141
|
+
for (let socket of this.clients) {
|
|
142
|
+
socket.destroy();
|
|
143
|
+
}
|
|
144
|
+
this.server.close(() => {
|
|
145
|
+
console.log("JSON Server closed.");
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
class Client extends Base {
|
|
150
|
+
socket;
|
|
151
|
+
/**
|
|
152
|
+
* Initializes the JSON Client.
|
|
153
|
+
* @param {number} port - Port number to connect to.
|
|
154
|
+
* @param {string} host - Host address to connect to.
|
|
155
|
+
*/
|
|
156
|
+
constructor(port, host = "127.0.0.1") {
|
|
157
|
+
super(port, host);
|
|
158
|
+
this.socket = import_net.default.createConnection(port, host, () => {
|
|
159
|
+
console.log(`Connected to JSON Server at ${host}:${port}`);
|
|
160
|
+
});
|
|
161
|
+
this.socket.buffer = "";
|
|
162
|
+
this.socket.setEncoding("utf8");
|
|
163
|
+
this.socket.on("data", (data) => {
|
|
164
|
+
this.socket.buffer += data;
|
|
165
|
+
this._process_buffer(this.socket);
|
|
166
|
+
});
|
|
167
|
+
this.socket.on("close", () => {
|
|
168
|
+
console.log("Disconnected from JSON Server");
|
|
169
|
+
});
|
|
170
|
+
this.socket.on("error", (err) => {
|
|
171
|
+
console.error("Socket error:", err);
|
|
172
|
+
this.socket.destroy();
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Sends a JSON message to the server.
|
|
177
|
+
* @param {Object} obj - The JSON object to send.
|
|
178
|
+
*/
|
|
179
|
+
message(obj) {
|
|
180
|
+
const json = JSON.stringify(obj);
|
|
181
|
+
const length = json.length.toString().padStart(4, "0");
|
|
182
|
+
this.socket.write(length + json);
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Closes the client connection.
|
|
186
|
+
*/
|
|
187
|
+
close() {
|
|
188
|
+
this.socket.end();
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
var stdin_default = { Server, Client };
|
|
192
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
193
|
+
0 && (module.exports = {
|
|
194
|
+
Client,
|
|
195
|
+
Server
|
|
196
|
+
});
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author Daan van den Bergh
|
|
3
|
+
* @copyright © 2022 - 2025 Daan van den Bergh.
|
|
4
|
+
*/
|
|
5
|
+
import * as nodemailer from "nodemailer";
|
|
6
|
+
import * as vlib from "@vandenberghinc/vlib";
|
|
7
|
+
import { Readable } from "stream";
|
|
8
|
+
import { Url } from "url";
|
|
9
|
+
import * as UI from "./ui.js";
|
|
10
|
+
/**
|
|
11
|
+
* The mail class, used to send emails via SMTP.
|
|
12
|
+
*
|
|
13
|
+
* @note This class is initialized under server property `mail` when the server is started with the `smtp` option.
|
|
14
|
+
*
|
|
15
|
+
* @nav Plugins
|
|
16
|
+
* @docs
|
|
17
|
+
*/
|
|
18
|
+
export declare class Mail {
|
|
19
|
+
/** the smpt mailer. */
|
|
20
|
+
private smtp;
|
|
21
|
+
/** the smtp sender address. */
|
|
22
|
+
sender: Mail.Address;
|
|
23
|
+
/** the default mail style. */
|
|
24
|
+
style: Mail.Style;
|
|
25
|
+
/** construct a new server instance. */
|
|
26
|
+
constructor({ smtp, style, }: Mail.Opts);
|
|
27
|
+
/**
|
|
28
|
+
* send one or multiple mails.
|
|
29
|
+
*
|
|
30
|
+
* @note ensure SPF/DKIM are configured when sending attachments.
|
|
31
|
+
* @returns resolves/rejects when the mail has been sent.
|
|
32
|
+
*
|
|
33
|
+
* @param sender optional sender override.
|
|
34
|
+
* @param recipients recipient addresses.
|
|
35
|
+
* @param subject subject line.
|
|
36
|
+
* @param body html string or `UI.MailElement`.
|
|
37
|
+
* @param attachments supported inputs (paths, backend model, REST model, or nodemailer attachment).
|
|
38
|
+
* @param max_attachments limit on number of attachments; -1 disables.
|
|
39
|
+
* @param max_attachment_size max size (bytes) per attachment; -1 disables.
|
|
40
|
+
* @param max_attachments_size max total size (bytes) across attachments; -1 disables.
|
|
41
|
+
*
|
|
42
|
+
* @docs
|
|
43
|
+
*/
|
|
44
|
+
send({ sender, recipients, subject, body, attachments, max_attachments, max_attachment_size, max_attachments_size, allow_untrusted_urls, }: {
|
|
45
|
+
sender?: Mail.Address;
|
|
46
|
+
recipients?: Mail.Address[];
|
|
47
|
+
subject?: string;
|
|
48
|
+
body?: string | UI.MailElement;
|
|
49
|
+
attachments?: Mail.Attachment.Any[];
|
|
50
|
+
} & Mail.Attachment.Limits): Promise<void>;
|
|
51
|
+
/**
|
|
52
|
+
* convert a single generic attachment input into a nodemailer attachment.
|
|
53
|
+
*/
|
|
54
|
+
private build_attachment;
|
|
55
|
+
/** returns true when url starts with http:// or https:// */
|
|
56
|
+
private is_http_url;
|
|
57
|
+
/**
|
|
58
|
+
* normalize and validate a mixed attachment input into nodemailer attachments.
|
|
59
|
+
* @param input mixed list of attachments.
|
|
60
|
+
* @param limits size/count validation limits.
|
|
61
|
+
* @returns normalized nodemailer attachments.
|
|
62
|
+
* @throws {ExternalError} when limits are exceeded.
|
|
63
|
+
*/
|
|
64
|
+
private normalize_and_validate_attachments;
|
|
65
|
+
/**
|
|
66
|
+
* measure the on-wire payload size (approx) of a nodemailer attachment content.
|
|
67
|
+
* note: if `encoding: "base64"` is set, we decode to compute raw byte size.
|
|
68
|
+
*/
|
|
69
|
+
private measure_attachment_bytes;
|
|
70
|
+
/**
|
|
71
|
+
* normalize a base64 or url-safe base64 string to standard base64 (no decoding).
|
|
72
|
+
* trims whitespace and converts url-safe chars.
|
|
73
|
+
*/
|
|
74
|
+
private normalize_base64;
|
|
75
|
+
/**
|
|
76
|
+
* optional content headers for charset/compression hints.
|
|
77
|
+
* email clients usually ignore custom headers; added for traceability.
|
|
78
|
+
*/
|
|
79
|
+
private build_content_headers;
|
|
80
|
+
}
|
|
81
|
+
/** nested types for the mail module. */
|
|
82
|
+
export declare namespace Mail {
|
|
83
|
+
/** a mail address, either a string or an array of [name, email]. */
|
|
84
|
+
type Address = string | [string, string];
|
|
85
|
+
/** options for the smtp mailer. */
|
|
86
|
+
interface Opts {
|
|
87
|
+
/**
|
|
88
|
+
* the smtp nodemailer arguments object.
|
|
89
|
+
* more information can be found at the nodemailer documentation.
|
|
90
|
+
*/
|
|
91
|
+
smtp: {
|
|
92
|
+
/** the smtp sender address; either a string email, e.g. `your@email.com`, or`[name, email]`. */
|
|
93
|
+
sender: Address;
|
|
94
|
+
/** the mail server's host address. */
|
|
95
|
+
host?: string;
|
|
96
|
+
/** the mail server's port. */
|
|
97
|
+
port?: number;
|
|
98
|
+
/** enable secure options. */
|
|
99
|
+
secure?: boolean;
|
|
100
|
+
/** the authentication settings. */
|
|
101
|
+
auth?: {
|
|
102
|
+
/** the email used for authentication. */
|
|
103
|
+
user: string;
|
|
104
|
+
/** the password used for authentication. */
|
|
105
|
+
pass: string;
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* the smtp `nodemailer.createTransport` argument that overrides the other {@link Mail.Opts.smtp} options.
|
|
109
|
+
* use this to supply vendor-specific transport options.
|
|
110
|
+
*/
|
|
111
|
+
override?: nodemailer.TransportOptions;
|
|
112
|
+
};
|
|
113
|
+
/** the default mail style. */
|
|
114
|
+
style?: Style;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* style tokens used to theme automatically generated emails.
|
|
118
|
+
*/
|
|
119
|
+
interface Style {
|
|
120
|
+
/** the font family. */
|
|
121
|
+
font: string;
|
|
122
|
+
/** the title foreground color. */
|
|
123
|
+
title_fg: string;
|
|
124
|
+
/** the subtitle foreground color. */
|
|
125
|
+
subtitle_fg: string;
|
|
126
|
+
/** the body text foreground color. */
|
|
127
|
+
text_fg: string;
|
|
128
|
+
/** the foreground color used for buttons. */
|
|
129
|
+
button_fg: string;
|
|
130
|
+
/** the footer foreground color. */
|
|
131
|
+
footer_fg: string;
|
|
132
|
+
/** page background color. */
|
|
133
|
+
bg: string;
|
|
134
|
+
/** widget background color. */
|
|
135
|
+
widget_bg: string;
|
|
136
|
+
/** widget border color. */
|
|
137
|
+
widget_border: string;
|
|
138
|
+
/** button background color. */
|
|
139
|
+
button_bg: string;
|
|
140
|
+
/** divider color. */
|
|
141
|
+
divider_bg: string;
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* stable backend attachment model.
|
|
145
|
+
* mirrors the frontend Attachment; provide either raw `bytes` or `{ content, encoding }`.
|
|
146
|
+
* encoding is only used when `content` is a string.
|
|
147
|
+
*/
|
|
148
|
+
interface Attachment {
|
|
149
|
+
/** file or directory name. */
|
|
150
|
+
name: string;
|
|
151
|
+
/** path relative to a logical root (optional). */
|
|
152
|
+
path?: string;
|
|
153
|
+
/** mime type of the data. */
|
|
154
|
+
mime_type?: string;
|
|
155
|
+
/** charset used for text decoding (if applicable). */
|
|
156
|
+
charset?: string;
|
|
157
|
+
/** raw bytes buffer. */
|
|
158
|
+
bytes?: Buffer | Uint8Array;
|
|
159
|
+
/** textual payload to be decoded using `encoding`. */
|
|
160
|
+
content?: string;
|
|
161
|
+
/** encoding used to decode `content` into bytes (e.g. base64, hex, utf8, binary, latin1). */
|
|
162
|
+
encoding?: "base64" | "hex" | "utf8" | "utf-8" | "binary" | "latin1";
|
|
163
|
+
/** whether bytes are gzip-compressed (metadata only). */
|
|
164
|
+
compressed?: boolean;
|
|
165
|
+
}
|
|
166
|
+
/** Nested attachment types. */
|
|
167
|
+
namespace Attachment {
|
|
168
|
+
/** The possible encodings. */
|
|
169
|
+
type Encoding = "base64" | "hex" | "utf8" | "utf-8" | "binary" | "latin1";
|
|
170
|
+
const encodings: Set<Encoding>;
|
|
171
|
+
/** Attachment validation limits. */
|
|
172
|
+
interface Limits {
|
|
173
|
+
/** Maximum number of attachments allowed (unset means no limit). */
|
|
174
|
+
max_attachments?: number;
|
|
175
|
+
/** Maximum size in bytes per attachment (unset means no limit). */
|
|
176
|
+
max_attachment_size?: number;
|
|
177
|
+
/** Maximum cumulative size in bytes across all attachments (unset means no limit). */
|
|
178
|
+
max_attachments_size?: number;
|
|
179
|
+
/** Allow loading http/https urls as attachments (default: false). */
|
|
180
|
+
allow_untrusted_urls?: boolean;
|
|
181
|
+
}
|
|
182
|
+
/** Type guard. */
|
|
183
|
+
function is(a: any): a is Attachment;
|
|
184
|
+
/**
|
|
185
|
+
* user-friendly REST attachment payload.
|
|
186
|
+
* choose one of:
|
|
187
|
+
* - `{ content, encoding }` for inline payloads (encoding: base64/hex/utf8/binary/latin1).
|
|
188
|
+
* - `{ url }` for http(s) or data: urls (streamed by nodemailer).
|
|
189
|
+
*/
|
|
190
|
+
interface RestAPI {
|
|
191
|
+
/** file name to display to the recipient. */
|
|
192
|
+
name: string;
|
|
193
|
+
/** relative path inside a bundle/archive (metadata only, optional). */
|
|
194
|
+
path?: string;
|
|
195
|
+
/** mime type of the data. */
|
|
196
|
+
mime_type?: string;
|
|
197
|
+
/** charset used for text decoding (if applicable). */
|
|
198
|
+
charset?: string;
|
|
199
|
+
/** whether the provided bytes are gzip-compressed (metadata only). */
|
|
200
|
+
compressed?: boolean;
|
|
201
|
+
/** textual payload to be decoded using `encoding`. */
|
|
202
|
+
content?: string;
|
|
203
|
+
/** encoding used to decode `content` into bytes. */
|
|
204
|
+
encoding?: "base64" | "hex" | "utf8" | "utf-8" | "binary" | "latin1";
|
|
205
|
+
/** http(s) url or data: url to stream. */
|
|
206
|
+
url?: string;
|
|
207
|
+
}
|
|
208
|
+
namespace RestAPI {
|
|
209
|
+
/** Type guard. */
|
|
210
|
+
function is(a: any): a is RestAPI;
|
|
211
|
+
/** Schema validation. */
|
|
212
|
+
const Schema: vlib.Schema.Opts;
|
|
213
|
+
}
|
|
214
|
+
/** A native nodemailer attachment. */
|
|
215
|
+
interface Native {
|
|
216
|
+
/** String, Buffer or a Stream contents for the attachment */
|
|
217
|
+
content?: string | Buffer | Readable | undefined;
|
|
218
|
+
/** path to a file or an URL (data uris are allowed as well) if you want to stream the file instead of including it (better for larger attachments) */
|
|
219
|
+
path?: string | Url | undefined;
|
|
220
|
+
/** filename to be reported as the name of the attached file, use of unicode is allowed. If you do not want to use a filename, set this value as false, otherwise a filename is generated automatically */
|
|
221
|
+
filename?: string | false | undefined;
|
|
222
|
+
/** optional content id for using inline images in HTML message source. Using cid sets the default contentDisposition to 'inline' and moves the attachment into a multipart/related mime node, so use it only if you actually want to use this attachment as an embedded image */
|
|
223
|
+
cid?: string | undefined;
|
|
224
|
+
/** If set and content is string, then encodes the content to a Buffer using the specified encoding. Example values: base64, hex, binary etc. Useful if you want to use binary attachments in a JSON formatted e-mail object */
|
|
225
|
+
encoding?: string | undefined;
|
|
226
|
+
/** optional content type for the attachment, if not set will be derived from the filename property */
|
|
227
|
+
contentType?: string | undefined;
|
|
228
|
+
/** optional transfer encoding for the attachment, if not set it will be derived from the contentType property. Example values: quoted-printable, base64. If it is unset then base64 encoding is used for the attachment. If it is set to false then previous default applies (base64 for most, 7bit for text). */
|
|
229
|
+
contentTransferEncoding?: "7bit" | "base64" | "quoted-printable" | false | undefined;
|
|
230
|
+
/** optional content disposition type for the attachment, defaults to ‘attachment’ */
|
|
231
|
+
contentDisposition?: "attachment" | "inline" | undefined;
|
|
232
|
+
/** is an object of additional headers */
|
|
233
|
+
headers?: {
|
|
234
|
+
[key: string]: string | string[] | {
|
|
235
|
+
prepared: boolean;
|
|
236
|
+
value: string;
|
|
237
|
+
};
|
|
238
|
+
} | Array<{
|
|
239
|
+
key: string;
|
|
240
|
+
value: string;
|
|
241
|
+
}>;
|
|
242
|
+
/** an optional value that overrides entire node content in the mime message. If used then all other options set for this node are ignored. */
|
|
243
|
+
raw?: string | Buffer | Readable | Native | undefined;
|
|
244
|
+
}
|
|
245
|
+
/** Nested native types. */
|
|
246
|
+
namespace Native {
|
|
247
|
+
/** Simple type guard. */
|
|
248
|
+
function is(a: any): a is Native;
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* Unified attachment input accepted by {@link Mail.send}.
|
|
252
|
+
*/
|
|
253
|
+
type Any = string | vlib.Path | Attachment | RestAPI | Native;
|
|
254
|
+
}
|
|
255
|
+
}
|