@bobfrankston/mailx 1.0.465 → 1.0.500
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/.globalize.json5 +25 -0
- package/README.md +17 -420
- package/bin/mailx.js +87 -84
- package/bin/mailx.js.map +1 -1
- package/bin/mailx.ts +87 -84
- package/client/android.html +5 -5
- package/client/app.js +42 -38
- package/client/components/folder-tree.js +7 -5
- package/client/components/message-list.js +485 -448
- package/client/components/message-viewer.js +36 -41
- package/client/index.html +8 -8
- package/client/lib/message-state.js +46 -65
- package/index.js +59 -0
- package/package.json +12 -114
- package/packages/mailx-send/mailsend/{package-lock.json → node_modules/.package-lock.json} +0 -16
- package/packages/mailx-send/mailsend/node_modules/@types/node/LICENSE +21 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/README.md +15 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/assert/strict.d.ts +111 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/assert.d.ts +1078 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/async_hooks.d.ts +603 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/buffer.buffer.d.ts +472 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/buffer.d.ts +1934 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/child_process.d.ts +1476 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/cluster.d.ts +578 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/compatibility/disposable.d.ts +14 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/compatibility/index.d.ts +9 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/compatibility/indexable.d.ts +20 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/compatibility/iterators.d.ts +20 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/console.d.ts +452 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/constants.d.ts +21 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/crypto.d.ts +4545 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/dgram.d.ts +600 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/diagnostics_channel.d.ts +578 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/dns/promises.d.ts +503 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/dns.d.ts +923 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/domain.d.ts +170 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/events.d.ts +976 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/fs/promises.d.ts +1295 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/fs.d.ts +4461 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/globals.d.ts +172 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/globals.typedarray.d.ts +38 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/http.d.ts +2089 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/http2.d.ts +2644 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/https.d.ts +579 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/index.d.ts +97 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/inspector.d.ts +253 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/inspector.generated.d.ts +4052 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/module.d.ts +891 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/net.d.ts +1057 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/os.d.ts +506 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/package.json +145 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/path.d.ts +200 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/perf_hooks.d.ts +968 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/process.d.ts +2084 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/punycode.d.ts +117 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/querystring.d.ts +152 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/readline/promises.d.ts +161 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/readline.d.ts +594 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/repl.d.ts +428 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/sea.d.ts +153 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/sqlite.d.ts +721 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/stream/consumers.d.ts +38 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/stream/promises.d.ts +90 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/stream/web.d.ts +622 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/stream.d.ts +1664 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/string_decoder.d.ts +67 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/test.d.ts +2163 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/timers/promises.d.ts +108 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/timers.d.ts +287 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/tls.d.ts +1319 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/trace_events.d.ts +197 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +468 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +34 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/ts5.6/index.d.ts +97 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/tty.d.ts +208 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/url.d.ts +984 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/util.d.ts +2606 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/v8.d.ts +920 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/vm.d.ts +1000 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/wasi.d.ts +181 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/web-globals/abortcontroller.d.ts +34 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/web-globals/domexception.d.ts +68 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/web-globals/events.d.ts +97 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/web-globals/fetch.d.ts +55 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/web-globals/navigator.d.ts +22 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/web-globals/storage.d.ts +24 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/worker_threads.d.ts +784 -0
- package/packages/mailx-send/mailsend/node_modules/@types/node/zlib.d.ts +747 -0
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/LICENSE +21 -0
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/README.md +15 -0
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/index.d.ts +82 -0
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/addressparser/index.d.ts +31 -0
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/base64/index.d.ts +22 -0
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/dkim/index.d.ts +45 -0
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/dkim/message-parser.d.ts +75 -0
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/dkim/relaxed-body.d.ts +75 -0
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/dkim/sign.d.ts +21 -0
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/fetch/cookies.d.ts +54 -0
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/fetch/index.d.ts +38 -0
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/json-transport/index.d.ts +53 -0
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/mail-composer/index.d.ts +25 -0
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/mailer/index.d.ts +283 -0
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/mailer/mail-message.d.ts +32 -0
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/mime-funcs/index.d.ts +87 -0
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/mime-funcs/mime-types.d.ts +2 -0
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/mime-node/index.d.ts +224 -0
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/mime-node/last-newline.d.ts +9 -0
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/qp/index.d.ts +23 -0
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/sendmail-transport/index.d.ts +53 -0
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/sendmail-transport/le-unix.d.ts +7 -0
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/sendmail-transport/le-windows.d.ts +7 -0
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/ses-transport/index.d.ts +146 -0
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/shared/index.d.ts +58 -0
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/smtp-connection/data-stream.d.ts +11 -0
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/smtp-connection/http-proxy-client.d.ts +16 -0
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/smtp-connection/index.d.ts +270 -0
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/smtp-pool/index.d.ts +93 -0
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/smtp-pool/pool-resource.d.ts +66 -0
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/smtp-transport/index.d.ts +115 -0
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/stream-transport/index.d.ts +59 -0
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/well-known/index.d.ts +6 -0
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/lib/xoauth2/index.d.ts +114 -0
- package/packages/mailx-send/mailsend/node_modules/@types/nodemailer/package.json +38 -0
- package/packages/mailx-send/mailsend/node_modules/nodemailer/.ncurc.js +9 -0
- package/packages/mailx-send/mailsend/node_modules/nodemailer/.prettierignore +8 -0
- package/packages/mailx-send/mailsend/node_modules/nodemailer/.prettierrc +12 -0
- package/packages/mailx-send/mailsend/node_modules/nodemailer/.prettierrc.js +10 -0
- package/packages/mailx-send/mailsend/node_modules/nodemailer/.release-please-config.json +9 -0
- package/packages/mailx-send/mailsend/node_modules/nodemailer/LICENSE +16 -0
- package/packages/mailx-send/mailsend/node_modules/nodemailer/README.md +86 -0
- package/packages/mailx-send/mailsend/node_modules/nodemailer/SECURITY.txt +22 -0
- package/packages/mailx-send/mailsend/node_modules/nodemailer/eslint.config.js +88 -0
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/addressparser/index.js +383 -0
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/base64/index.js +139 -0
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/dkim/index.js +253 -0
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/dkim/message-parser.js +155 -0
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/dkim/relaxed-body.js +154 -0
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/dkim/sign.js +117 -0
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/fetch/cookies.js +281 -0
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/fetch/index.js +280 -0
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/json-transport/index.js +82 -0
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/mail-composer/index.js +629 -0
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/mailer/index.js +441 -0
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/mailer/mail-message.js +316 -0
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/mime-funcs/index.js +625 -0
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/mime-funcs/mime-types.js +2113 -0
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/mime-node/index.js +1316 -0
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/mime-node/last-newline.js +33 -0
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/mime-node/le-unix.js +43 -0
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/mime-node/le-windows.js +52 -0
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/nodemailer.js +157 -0
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/punycode/index.js +460 -0
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/qp/index.js +227 -0
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/sendmail-transport/index.js +210 -0
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/ses-transport/index.js +234 -0
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/shared/index.js +754 -0
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/smtp-connection/data-stream.js +108 -0
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/smtp-connection/http-proxy-client.js +143 -0
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/smtp-connection/index.js +1870 -0
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/smtp-pool/index.js +652 -0
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/smtp-pool/pool-resource.js +259 -0
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/smtp-transport/index.js +421 -0
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/stream-transport/index.js +135 -0
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/well-known/index.js +47 -0
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/well-known/services.json +611 -0
- package/packages/mailx-send/mailsend/node_modules/nodemailer/lib/xoauth2/index.js +427 -0
- package/packages/mailx-send/mailsend/node_modules/nodemailer/package.json +47 -0
- package/packages/mailx-send/mailsend/node_modules/undici-types/LICENSE +21 -0
- package/packages/mailx-send/mailsend/node_modules/undici-types/README.md +6 -0
- package/packages/mailx-send/mailsend/node_modules/undici-types/agent.d.ts +31 -0
- package/packages/mailx-send/mailsend/node_modules/undici-types/api.d.ts +43 -0
- package/packages/mailx-send/mailsend/node_modules/undici-types/balanced-pool.d.ts +29 -0
- package/packages/mailx-send/mailsend/node_modules/undici-types/cache.d.ts +36 -0
- package/packages/mailx-send/mailsend/node_modules/undici-types/client.d.ts +108 -0
- package/packages/mailx-send/mailsend/node_modules/undici-types/connector.d.ts +34 -0
- package/packages/mailx-send/mailsend/node_modules/undici-types/content-type.d.ts +21 -0
- package/packages/mailx-send/mailsend/node_modules/undici-types/cookies.d.ts +28 -0
- package/packages/mailx-send/mailsend/node_modules/undici-types/diagnostics-channel.d.ts +66 -0
- package/packages/mailx-send/mailsend/node_modules/undici-types/dispatcher.d.ts +256 -0
- package/packages/mailx-send/mailsend/node_modules/undici-types/env-http-proxy-agent.d.ts +21 -0
- package/packages/mailx-send/mailsend/node_modules/undici-types/errors.d.ts +149 -0
- package/packages/mailx-send/mailsend/node_modules/undici-types/eventsource.d.ts +61 -0
- package/packages/mailx-send/mailsend/node_modules/undici-types/fetch.d.ts +209 -0
- package/packages/mailx-send/mailsend/node_modules/undici-types/file.d.ts +39 -0
- package/packages/mailx-send/mailsend/node_modules/undici-types/filereader.d.ts +54 -0
- package/packages/mailx-send/mailsend/node_modules/undici-types/formdata.d.ts +108 -0
- package/packages/mailx-send/mailsend/node_modules/undici-types/global-dispatcher.d.ts +9 -0
- package/packages/mailx-send/mailsend/node_modules/undici-types/global-origin.d.ts +7 -0
- package/packages/mailx-send/mailsend/node_modules/undici-types/handlers.d.ts +15 -0
- package/packages/mailx-send/mailsend/node_modules/undici-types/header.d.ts +4 -0
- package/packages/mailx-send/mailsend/node_modules/undici-types/index.d.ts +71 -0
- package/packages/mailx-send/mailsend/node_modules/undici-types/interceptors.d.ts +17 -0
- package/packages/mailx-send/mailsend/node_modules/undici-types/mock-agent.d.ts +50 -0
- package/packages/mailx-send/mailsend/node_modules/undici-types/mock-client.d.ts +25 -0
- package/packages/mailx-send/mailsend/node_modules/undici-types/mock-errors.d.ts +12 -0
- package/packages/mailx-send/mailsend/node_modules/undici-types/mock-interceptor.d.ts +93 -0
- package/packages/mailx-send/mailsend/node_modules/undici-types/mock-pool.d.ts +25 -0
- package/packages/mailx-send/mailsend/node_modules/undici-types/package.json +55 -0
- package/packages/mailx-send/mailsend/node_modules/undici-types/patch.d.ts +33 -0
- package/packages/mailx-send/mailsend/node_modules/undici-types/pool-stats.d.ts +19 -0
- package/packages/mailx-send/mailsend/node_modules/undici-types/pool.d.ts +39 -0
- package/packages/mailx-send/mailsend/node_modules/undici-types/proxy-agent.d.ts +28 -0
- package/packages/mailx-send/mailsend/node_modules/undici-types/readable.d.ts +65 -0
- package/packages/mailx-send/mailsend/node_modules/undici-types/retry-agent.d.ts +8 -0
- package/packages/mailx-send/mailsend/node_modules/undici-types/retry-handler.d.ts +116 -0
- package/packages/mailx-send/mailsend/node_modules/undici-types/util.d.ts +18 -0
- package/packages/mailx-send/mailsend/node_modules/undici-types/webidl.d.ts +228 -0
- package/packages/mailx-send/mailsend/node_modules/undici-types/websocket.d.ts +150 -0
- package/packages/mailx-server/index.js +1 -1
- package/packages/mailx-settings/cloud.js +12 -7
- package/packages/mailx-settings/index.js +22 -1
- package/client/.gitattributes +0 -10
- package/client/app.js.map +0 -1
- package/client/app.ts +0 -3190
- package/client/components/address-book.js.map +0 -1
- package/client/components/address-book.ts +0 -204
- package/client/components/alarms.js.map +0 -1
- package/client/components/alarms.ts +0 -276
- package/client/components/calendar-sidebar.js.map +0 -1
- package/client/components/calendar-sidebar.ts +0 -474
- package/client/components/calendar.js.map +0 -1
- package/client/components/calendar.ts +0 -211
- package/client/components/context-menu.js.map +0 -1
- package/client/components/context-menu.ts +0 -95
- package/client/components/folder-picker.js.map +0 -1
- package/client/components/folder-picker.ts +0 -127
- package/client/components/folder-tree.js.map +0 -1
- package/client/components/folder-tree.ts +0 -1069
- package/client/components/message-list.js.map +0 -1
- package/client/components/message-list.ts +0 -1129
- package/client/components/message-viewer.js.map +0 -1
- package/client/components/message-viewer.ts +0 -1257
- package/client/components/outbox-view.js.map +0 -1
- package/client/components/outbox-view.ts +0 -102
- package/client/components/tasks.js.map +0 -1
- package/client/components/tasks.ts +0 -234
- package/client/compose/compose.js.map +0 -1
- package/client/compose/compose.ts +0 -1231
- package/client/compose/editor.js.map +0 -1
- package/client/compose/editor.ts +0 -599
- package/client/compose/ghost-text.js.map +0 -1
- package/client/compose/ghost-text.ts +0 -140
- package/client/lib/android-bootstrap.js.map +0 -1
- package/client/lib/android-bootstrap.ts +0 -9
- package/client/lib/api-client.js.map +0 -1
- package/client/lib/api-client.ts +0 -439
- package/client/lib/local-service.js.map +0 -1
- package/client/lib/local-service.ts +0 -646
- package/client/lib/local-store.js.map +0 -1
- package/client/lib/local-store.ts +0 -283
- package/client/lib/message-state.js.map +0 -1
- package/client/lib/message-state.ts +0 -160
- package/client/tsconfig.json +0 -19
- package/packages/mailx-api/.gitattributes +0 -10
- package/packages/mailx-api/index.d.ts.map +0 -1
- package/packages/mailx-api/index.js.map +0 -1
- package/packages/mailx-api/index.ts +0 -283
- package/packages/mailx-api/tsconfig.json +0 -9
- package/packages/mailx-compose/.gitattributes +0 -10
- package/packages/mailx-compose/index.d.ts.map +0 -1
- package/packages/mailx-compose/index.js.map +0 -1
- package/packages/mailx-compose/index.ts +0 -85
- package/packages/mailx-compose/tsconfig.json +0 -9
- package/packages/mailx-host/.gitattributes +0 -10
- package/packages/mailx-host/index.d.ts +0 -21
- package/packages/mailx-host/index.d.ts.map +0 -1
- package/packages/mailx-host/index.js +0 -29
- package/packages/mailx-host/index.js.map +0 -1
- package/packages/mailx-host/index.ts +0 -38
- package/packages/mailx-host/package.json +0 -23
- package/packages/mailx-host/tsconfig.json +0 -9
- package/packages/mailx-host/types-shim.d.ts +0 -14
- package/packages/mailx-imap/.gitattributes +0 -10
- package/packages/mailx-imap/index.d.ts +0 -442
- package/packages/mailx-imap/index.d.ts.map +0 -1
- package/packages/mailx-imap/index.js +0 -3684
- package/packages/mailx-imap/index.js.map +0 -1
- package/packages/mailx-imap/index.ts +0 -3652
- package/packages/mailx-imap/package-lock.json +0 -131
- package/packages/mailx-imap/package.json +0 -28
- package/packages/mailx-imap/providers/gmail-api.d.ts +0 -8
- package/packages/mailx-imap/providers/gmail-api.d.ts.map +0 -1
- package/packages/mailx-imap/providers/gmail-api.js +0 -8
- package/packages/mailx-imap/providers/gmail-api.js.map +0 -1
- package/packages/mailx-imap/providers/gmail-api.ts +0 -8
- package/packages/mailx-imap/providers/outlook-api.ts +0 -7
- package/packages/mailx-imap/providers/types.d.ts +0 -9
- package/packages/mailx-imap/providers/types.d.ts.map +0 -1
- package/packages/mailx-imap/providers/types.js +0 -9
- package/packages/mailx-imap/providers/types.js.map +0 -1
- package/packages/mailx-imap/providers/types.ts +0 -9
- package/packages/mailx-imap/tsconfig.json +0 -9
- package/packages/mailx-imap/tsconfig.tsbuildinfo +0 -1
- package/packages/mailx-send/.gitattributes +0 -10
- package/packages/mailx-send/cli-queue.d.ts.map +0 -1
- package/packages/mailx-send/cli-queue.js.map +0 -1
- package/packages/mailx-send/cli-queue.ts +0 -62
- package/packages/mailx-send/cli-send.d.ts.map +0 -1
- package/packages/mailx-send/cli-send.js.map +0 -1
- package/packages/mailx-send/cli-send.ts +0 -83
- package/packages/mailx-send/cli.d.ts.map +0 -1
- package/packages/mailx-send/cli.js.map +0 -1
- package/packages/mailx-send/cli.ts +0 -126
- package/packages/mailx-send/index.d.ts.map +0 -1
- package/packages/mailx-send/index.js.map +0 -1
- package/packages/mailx-send/index.ts +0 -333
- package/packages/mailx-send/mailsend/cli.d.ts.map +0 -1
- package/packages/mailx-send/mailsend/cli.js.map +0 -1
- package/packages/mailx-send/mailsend/cli.ts +0 -81
- package/packages/mailx-send/mailsend/index.d.ts.map +0 -1
- package/packages/mailx-send/mailsend/index.js.map +0 -1
- package/packages/mailx-send/mailsend/index.ts +0 -333
- package/packages/mailx-send/mailsend/tsconfig.json +0 -21
- package/packages/mailx-send/package-lock.json +0 -65
- package/packages/mailx-send/tsconfig.json +0 -21
- package/packages/mailx-server/.gitattributes +0 -10
- package/packages/mailx-server/index.d.ts.map +0 -1
- package/packages/mailx-server/index.js.map +0 -1
- package/packages/mailx-server/index.ts +0 -429
- package/packages/mailx-server/tsconfig.json +0 -9
- package/packages/mailx-settings/.gitattributes +0 -10
- package/packages/mailx-settings/cloud.d.ts.map +0 -1
- package/packages/mailx-settings/cloud.js.map +0 -1
- package/packages/mailx-settings/cloud.ts +0 -388
- package/packages/mailx-settings/index.d.ts.map +0 -1
- package/packages/mailx-settings/index.js.map +0 -1
- package/packages/mailx-settings/index.ts +0 -892
- package/packages/mailx-settings/tsconfig.json +0 -9
- package/packages/mailx-store/.gitattributes +0 -10
- package/packages/mailx-store/db.d.ts.map +0 -1
- package/packages/mailx-store/db.js.map +0 -1
- package/packages/mailx-store/db.ts +0 -2007
- package/packages/mailx-store/file-store.d.ts.map +0 -1
- package/packages/mailx-store/file-store.js.map +0 -1
- package/packages/mailx-store/file-store.ts +0 -82
- package/packages/mailx-store/index.d.ts.map +0 -1
- package/packages/mailx-store/index.js.map +0 -1
- package/packages/mailx-store/index.ts +0 -7
- package/packages/mailx-store/tsconfig.json +0 -9
- package/packages/mailx-types/.gitattributes +0 -10
- package/packages/mailx-types/index.d.ts.map +0 -1
- package/packages/mailx-types/index.js.map +0 -1
- package/packages/mailx-types/index.ts +0 -498
- package/packages/mailx-types/tsconfig.json +0 -9
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export namespace util {
|
|
2
|
+
/**
|
|
3
|
+
* Retrieves a header name and returns its lowercase value.
|
|
4
|
+
* @param value Header name
|
|
5
|
+
*/
|
|
6
|
+
export function headerNameToString(value: string | Buffer): string;
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Receives a header object and returns the parsed value.
|
|
10
|
+
* @param headers Header object
|
|
11
|
+
* @param obj Object to specify a proxy object. Used to assign parsed values.
|
|
12
|
+
* @returns If `obj` is specified, it is equivalent to `obj`.
|
|
13
|
+
*/
|
|
14
|
+
export function parseHeaders(
|
|
15
|
+
headers: (Buffer | string | (Buffer | string)[])[],
|
|
16
|
+
obj?: Record<string, string | string[]>
|
|
17
|
+
): Record<string, string | string[]>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
// These types are not exported, and are only used internally
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Take in an unknown value and return one that is of type T
|
|
5
|
+
*/
|
|
6
|
+
type Converter<T> = (object: unknown) => T
|
|
7
|
+
|
|
8
|
+
type SequenceConverter<T> = (object: unknown, iterable?: IterableIterator<T>) => T[]
|
|
9
|
+
|
|
10
|
+
type RecordConverter<K extends string, V> = (object: unknown) => Record<K, V>
|
|
11
|
+
|
|
12
|
+
interface ConvertToIntOpts {
|
|
13
|
+
clamp?: boolean
|
|
14
|
+
enforceRange?: boolean
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
interface WebidlErrors {
|
|
18
|
+
exception (opts: { header: string, message: string }): TypeError
|
|
19
|
+
/**
|
|
20
|
+
* @description Throw an error when conversion from one type to another has failed
|
|
21
|
+
*/
|
|
22
|
+
conversionFailed (opts: {
|
|
23
|
+
prefix: string
|
|
24
|
+
argument: string
|
|
25
|
+
types: string[]
|
|
26
|
+
}): TypeError
|
|
27
|
+
/**
|
|
28
|
+
* @description Throw an error when an invalid argument is provided
|
|
29
|
+
*/
|
|
30
|
+
invalidArgument (opts: {
|
|
31
|
+
prefix: string
|
|
32
|
+
value: string
|
|
33
|
+
type: string
|
|
34
|
+
}): TypeError
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
interface WebidlUtil {
|
|
38
|
+
/**
|
|
39
|
+
* @see https://tc39.es/ecma262/#sec-ecmascript-data-types-and-values
|
|
40
|
+
*/
|
|
41
|
+
Type (object: unknown):
|
|
42
|
+
| 'Undefined'
|
|
43
|
+
| 'Boolean'
|
|
44
|
+
| 'String'
|
|
45
|
+
| 'Symbol'
|
|
46
|
+
| 'Number'
|
|
47
|
+
| 'BigInt'
|
|
48
|
+
| 'Null'
|
|
49
|
+
| 'Object'
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* @see https://webidl.spec.whatwg.org/#abstract-opdef-converttoint
|
|
53
|
+
*/
|
|
54
|
+
ConvertToInt (
|
|
55
|
+
V: unknown,
|
|
56
|
+
bitLength: number,
|
|
57
|
+
signedness: 'signed' | 'unsigned',
|
|
58
|
+
opts?: ConvertToIntOpts
|
|
59
|
+
): number
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* @see https://webidl.spec.whatwg.org/#abstract-opdef-converttoint
|
|
63
|
+
*/
|
|
64
|
+
IntegerPart (N: number): number
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Stringifies {@param V}
|
|
68
|
+
*/
|
|
69
|
+
Stringify (V: any): string
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Mark a value as uncloneable for Node.js.
|
|
73
|
+
* This is only effective in some newer Node.js versions.
|
|
74
|
+
*/
|
|
75
|
+
markAsUncloneable (V: any): void
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
interface WebidlConverters {
|
|
79
|
+
/**
|
|
80
|
+
* @see https://webidl.spec.whatwg.org/#es-DOMString
|
|
81
|
+
*/
|
|
82
|
+
DOMString (V: unknown, prefix: string, argument: string, opts?: {
|
|
83
|
+
legacyNullToEmptyString: boolean
|
|
84
|
+
}): string
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* @see https://webidl.spec.whatwg.org/#es-ByteString
|
|
88
|
+
*/
|
|
89
|
+
ByteString (V: unknown, prefix: string, argument: string): string
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* @see https://webidl.spec.whatwg.org/#es-USVString
|
|
93
|
+
*/
|
|
94
|
+
USVString (V: unknown): string
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* @see https://webidl.spec.whatwg.org/#es-boolean
|
|
98
|
+
*/
|
|
99
|
+
boolean (V: unknown): boolean
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* @see https://webidl.spec.whatwg.org/#es-any
|
|
103
|
+
*/
|
|
104
|
+
any <Value>(V: Value): Value
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* @see https://webidl.spec.whatwg.org/#es-long-long
|
|
108
|
+
*/
|
|
109
|
+
['long long'] (V: unknown): number
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* @see https://webidl.spec.whatwg.org/#es-unsigned-long-long
|
|
113
|
+
*/
|
|
114
|
+
['unsigned long long'] (V: unknown): number
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* @see https://webidl.spec.whatwg.org/#es-unsigned-long
|
|
118
|
+
*/
|
|
119
|
+
['unsigned long'] (V: unknown): number
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* @see https://webidl.spec.whatwg.org/#es-unsigned-short
|
|
123
|
+
*/
|
|
124
|
+
['unsigned short'] (V: unknown, opts?: ConvertToIntOpts): number
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* @see https://webidl.spec.whatwg.org/#idl-ArrayBuffer
|
|
128
|
+
*/
|
|
129
|
+
ArrayBuffer (V: unknown): ArrayBufferLike
|
|
130
|
+
ArrayBuffer (V: unknown, opts: { allowShared: false }): ArrayBuffer
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* @see https://webidl.spec.whatwg.org/#es-buffer-source-types
|
|
134
|
+
*/
|
|
135
|
+
TypedArray (
|
|
136
|
+
V: unknown,
|
|
137
|
+
TypedArray: NodeJS.TypedArray | ArrayBufferLike
|
|
138
|
+
): NodeJS.TypedArray | ArrayBufferLike
|
|
139
|
+
TypedArray (
|
|
140
|
+
V: unknown,
|
|
141
|
+
TypedArray: NodeJS.TypedArray | ArrayBufferLike,
|
|
142
|
+
opts?: { allowShared: false }
|
|
143
|
+
): NodeJS.TypedArray | ArrayBuffer
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* @see https://webidl.spec.whatwg.org/#es-buffer-source-types
|
|
147
|
+
*/
|
|
148
|
+
DataView (V: unknown, opts?: { allowShared: boolean }): DataView
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* @see https://webidl.spec.whatwg.org/#BufferSource
|
|
152
|
+
*/
|
|
153
|
+
BufferSource (
|
|
154
|
+
V: unknown,
|
|
155
|
+
opts?: { allowShared: boolean }
|
|
156
|
+
): NodeJS.TypedArray | ArrayBufferLike | DataView
|
|
157
|
+
|
|
158
|
+
['sequence<ByteString>']: SequenceConverter<string>
|
|
159
|
+
|
|
160
|
+
['sequence<sequence<ByteString>>']: SequenceConverter<string[]>
|
|
161
|
+
|
|
162
|
+
['record<ByteString, ByteString>']: RecordConverter<string, string>
|
|
163
|
+
|
|
164
|
+
[Key: string]: (...args: any[]) => unknown
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export interface Webidl {
|
|
168
|
+
errors: WebidlErrors
|
|
169
|
+
util: WebidlUtil
|
|
170
|
+
converters: WebidlConverters
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* @description Performs a brand-check on {@param V} to ensure it is a
|
|
174
|
+
* {@param cls} object.
|
|
175
|
+
*/
|
|
176
|
+
brandCheck <Interface>(V: unknown, cls: Interface, opts?: { strict?: boolean }): asserts V is Interface
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* @see https://webidl.spec.whatwg.org/#es-sequence
|
|
180
|
+
* @description Convert a value, V, to a WebIDL sequence type.
|
|
181
|
+
*/
|
|
182
|
+
sequenceConverter <Type>(C: Converter<Type>): SequenceConverter<Type>
|
|
183
|
+
|
|
184
|
+
illegalConstructor (): never
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* @see https://webidl.spec.whatwg.org/#es-to-record
|
|
188
|
+
* @description Convert a value, V, to a WebIDL record type.
|
|
189
|
+
*/
|
|
190
|
+
recordConverter <K extends string, V>(
|
|
191
|
+
keyConverter: Converter<K>,
|
|
192
|
+
valueConverter: Converter<V>
|
|
193
|
+
): RecordConverter<K, V>
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Similar to {@link Webidl.brandCheck} but allows skipping the check if third party
|
|
197
|
+
* interfaces are allowed.
|
|
198
|
+
*/
|
|
199
|
+
interfaceConverter <Interface>(cls: Interface): (
|
|
200
|
+
V: unknown,
|
|
201
|
+
opts?: { strict: boolean }
|
|
202
|
+
) => asserts V is typeof cls
|
|
203
|
+
|
|
204
|
+
// TODO(@KhafraDev): a type could likely be implemented that can infer the return type
|
|
205
|
+
// from the converters given?
|
|
206
|
+
/**
|
|
207
|
+
* Converts a value, V, to a WebIDL dictionary types. Allows limiting which keys are
|
|
208
|
+
* allowed, values allowed, optional and required keys. Auto converts the value to
|
|
209
|
+
* a type given a converter.
|
|
210
|
+
*/
|
|
211
|
+
dictionaryConverter (converters: {
|
|
212
|
+
key: string,
|
|
213
|
+
defaultValue?: () => unknown,
|
|
214
|
+
required?: boolean,
|
|
215
|
+
converter: (...args: unknown[]) => unknown,
|
|
216
|
+
allowedValues?: unknown[]
|
|
217
|
+
}[]): (V: unknown) => Record<string, unknown>
|
|
218
|
+
|
|
219
|
+
/**
|
|
220
|
+
* @see https://webidl.spec.whatwg.org/#idl-nullable-type
|
|
221
|
+
* @description allows a type, V, to be null
|
|
222
|
+
*/
|
|
223
|
+
nullableConverter <T>(
|
|
224
|
+
converter: Converter<T>
|
|
225
|
+
): (V: unknown) => ReturnType<typeof converter> | null
|
|
226
|
+
|
|
227
|
+
argumentLengthCheck (args: { length: number }, min: number, context: string): void
|
|
228
|
+
}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
|
|
3
|
+
import type { Blob } from 'buffer'
|
|
4
|
+
import type { MessagePort } from 'worker_threads'
|
|
5
|
+
import {
|
|
6
|
+
EventInit,
|
|
7
|
+
EventListenerOptions,
|
|
8
|
+
AddEventListenerOptions,
|
|
9
|
+
EventListenerOrEventListenerObject
|
|
10
|
+
} from './patch'
|
|
11
|
+
import Dispatcher from './dispatcher'
|
|
12
|
+
import { HeadersInit } from './fetch'
|
|
13
|
+
|
|
14
|
+
export type BinaryType = 'blob' | 'arraybuffer'
|
|
15
|
+
|
|
16
|
+
interface WebSocketEventMap {
|
|
17
|
+
close: CloseEvent
|
|
18
|
+
error: ErrorEvent
|
|
19
|
+
message: MessageEvent
|
|
20
|
+
open: Event
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
interface WebSocket extends EventTarget {
|
|
24
|
+
binaryType: BinaryType
|
|
25
|
+
|
|
26
|
+
readonly bufferedAmount: number
|
|
27
|
+
readonly extensions: string
|
|
28
|
+
|
|
29
|
+
onclose: ((this: WebSocket, ev: WebSocketEventMap['close']) => any) | null
|
|
30
|
+
onerror: ((this: WebSocket, ev: WebSocketEventMap['error']) => any) | null
|
|
31
|
+
onmessage: ((this: WebSocket, ev: WebSocketEventMap['message']) => any) | null
|
|
32
|
+
onopen: ((this: WebSocket, ev: WebSocketEventMap['open']) => any) | null
|
|
33
|
+
|
|
34
|
+
readonly protocol: string
|
|
35
|
+
readonly readyState: number
|
|
36
|
+
readonly url: string
|
|
37
|
+
|
|
38
|
+
close(code?: number, reason?: string): void
|
|
39
|
+
send(data: string | ArrayBufferLike | Blob | ArrayBufferView): void
|
|
40
|
+
|
|
41
|
+
readonly CLOSED: number
|
|
42
|
+
readonly CLOSING: number
|
|
43
|
+
readonly CONNECTING: number
|
|
44
|
+
readonly OPEN: number
|
|
45
|
+
|
|
46
|
+
addEventListener<K extends keyof WebSocketEventMap>(
|
|
47
|
+
type: K,
|
|
48
|
+
listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any,
|
|
49
|
+
options?: boolean | AddEventListenerOptions
|
|
50
|
+
): void
|
|
51
|
+
addEventListener(
|
|
52
|
+
type: string,
|
|
53
|
+
listener: EventListenerOrEventListenerObject,
|
|
54
|
+
options?: boolean | AddEventListenerOptions
|
|
55
|
+
): void
|
|
56
|
+
removeEventListener<K extends keyof WebSocketEventMap>(
|
|
57
|
+
type: K,
|
|
58
|
+
listener: (this: WebSocket, ev: WebSocketEventMap[K]) => any,
|
|
59
|
+
options?: boolean | EventListenerOptions
|
|
60
|
+
): void
|
|
61
|
+
removeEventListener(
|
|
62
|
+
type: string,
|
|
63
|
+
listener: EventListenerOrEventListenerObject,
|
|
64
|
+
options?: boolean | EventListenerOptions
|
|
65
|
+
): void
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export declare const WebSocket: {
|
|
69
|
+
prototype: WebSocket
|
|
70
|
+
new (url: string | URL, protocols?: string | string[] | WebSocketInit): WebSocket
|
|
71
|
+
readonly CLOSED: number
|
|
72
|
+
readonly CLOSING: number
|
|
73
|
+
readonly CONNECTING: number
|
|
74
|
+
readonly OPEN: number
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
interface CloseEventInit extends EventInit {
|
|
78
|
+
code?: number
|
|
79
|
+
reason?: string
|
|
80
|
+
wasClean?: boolean
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
interface CloseEvent extends Event {
|
|
84
|
+
readonly code: number
|
|
85
|
+
readonly reason: string
|
|
86
|
+
readonly wasClean: boolean
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export declare const CloseEvent: {
|
|
90
|
+
prototype: CloseEvent
|
|
91
|
+
new (type: string, eventInitDict?: CloseEventInit): CloseEvent
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
interface MessageEventInit<T = any> extends EventInit {
|
|
95
|
+
data?: T
|
|
96
|
+
lastEventId?: string
|
|
97
|
+
origin?: string
|
|
98
|
+
ports?: (typeof MessagePort)[]
|
|
99
|
+
source?: typeof MessagePort | null
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
interface MessageEvent<T = any> extends Event {
|
|
103
|
+
readonly data: T
|
|
104
|
+
readonly lastEventId: string
|
|
105
|
+
readonly origin: string
|
|
106
|
+
readonly ports: ReadonlyArray<typeof MessagePort>
|
|
107
|
+
readonly source: typeof MessagePort | null
|
|
108
|
+
initMessageEvent(
|
|
109
|
+
type: string,
|
|
110
|
+
bubbles?: boolean,
|
|
111
|
+
cancelable?: boolean,
|
|
112
|
+
data?: any,
|
|
113
|
+
origin?: string,
|
|
114
|
+
lastEventId?: string,
|
|
115
|
+
source?: typeof MessagePort | null,
|
|
116
|
+
ports?: (typeof MessagePort)[]
|
|
117
|
+
): void;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export declare const MessageEvent: {
|
|
121
|
+
prototype: MessageEvent
|
|
122
|
+
new<T>(type: string, eventInitDict?: MessageEventInit<T>): MessageEvent<T>
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
interface ErrorEventInit extends EventInit {
|
|
126
|
+
message?: string
|
|
127
|
+
filename?: string
|
|
128
|
+
lineno?: number
|
|
129
|
+
colno?: number
|
|
130
|
+
error?: any
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
interface ErrorEvent extends Event {
|
|
134
|
+
readonly message: string
|
|
135
|
+
readonly filename: string
|
|
136
|
+
readonly lineno: number
|
|
137
|
+
readonly colno: number
|
|
138
|
+
readonly error: any
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export declare const ErrorEvent: {
|
|
142
|
+
prototype: ErrorEvent
|
|
143
|
+
new (type: string, eventInitDict?: ErrorEventInit): ErrorEvent
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
interface WebSocketInit {
|
|
147
|
+
protocols?: string | string[],
|
|
148
|
+
dispatcher?: Dispatcher,
|
|
149
|
+
headers?: HeadersInit
|
|
150
|
+
}
|
|
@@ -14,7 +14,7 @@ import { ports } from "@bobfrankston/miscinfo";
|
|
|
14
14
|
import { createServer } from "node:http";
|
|
15
15
|
const PORT = ports.mailx;
|
|
16
16
|
// ── File logging ──
|
|
17
|
-
const logDir = path.join(process.env.USERPROFILE || process.env.HOME || ".", ".
|
|
17
|
+
const logDir = path.join(process.env.USERPROFILE || process.env.HOME || ".", ".rmfmail", "logs");
|
|
18
18
|
fs.mkdirSync(logDir, { recursive: true });
|
|
19
19
|
// Rotate: delete logs older than 7 days
|
|
20
20
|
try {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
import fs from "node:fs";
|
|
20
20
|
import path from "node:path";
|
|
21
21
|
import { authenticateOAuth } from "@bobfrankston/oauthsupport";
|
|
22
|
-
const SETTINGS_DIR = path.join(process.env.USERPROFILE || process.env.HOME || ".", ".
|
|
22
|
+
const SETTINGS_DIR = path.join(process.env.USERPROFILE || process.env.HOME || ".", ".rmfmail");
|
|
23
23
|
// ── Credentials ──
|
|
24
24
|
// Google Drive: reuse iflow's OAuth credentials (same Google Cloud project)
|
|
25
25
|
function findGoogleCredentials() {
|
|
@@ -55,9 +55,11 @@ const GDRIVE_TOKEN_DIR = path.join(SETTINGS_DIR, "tokens", "gdrive");
|
|
|
55
55
|
// bigger privacy ask. Token cache at tokens/gdrive/ will re-auth on scope change.
|
|
56
56
|
const GDRIVE_SCOPES = "https://www.googleapis.com/auth/drive";
|
|
57
57
|
/** Paths to try when no config.path is set (fresh install). Order matters:
|
|
58
|
-
* "
|
|
59
|
-
*
|
|
60
|
-
|
|
58
|
+
* "rmfmail" is the new auto-created default; "home/.mailx" + "mailx" are
|
|
59
|
+
* legacy from the pre-rename era and stay in the list so existing setups
|
|
60
|
+
* keep working without manual reconfig. First one that exists on GDrive
|
|
61
|
+
* wins. (REMOVE legacy entries once nobody is on the old layout.) */
|
|
62
|
+
const GDRIVE_PATH_SEARCH_ORDER = ["rmfmail", "home/.mailx", "mailx"];
|
|
61
63
|
// ── Token helpers ──
|
|
62
64
|
/** Get a GDrive-capable token. Prefers the Gmail token (which now includes
|
|
63
65
|
* drive scope) — avoids a second OAuth consent prompt. Falls back to the
|
|
@@ -103,7 +105,7 @@ async function getGoogleDriveToken() {
|
|
|
103
105
|
// Strategy 2: dedicated GDrive token (legacy path or non-Gmail setups)
|
|
104
106
|
const creds = findGoogleCredentials();
|
|
105
107
|
if (!creds) {
|
|
106
|
-
console.error(" [cloud] No Google credentials found (checked ~/.
|
|
108
|
+
console.error(" [cloud] No Google credentials found (checked ~/.rmfmail/google-credentials.json and iflow package)");
|
|
107
109
|
return null;
|
|
108
110
|
}
|
|
109
111
|
const tokenPath = path.join(GDRIVE_TOKEN_DIR, "token.json");
|
|
@@ -245,8 +247,11 @@ export async function gDriveFindOrCreateFolder() {
|
|
|
245
247
|
}
|
|
246
248
|
console.log(` [cloud] Path '${tryPath}' not found on GDrive`);
|
|
247
249
|
}
|
|
248
|
-
// None found — create the
|
|
249
|
-
|
|
250
|
+
// None found — create the new-install default (first entry).
|
|
251
|
+
// Was previously LAST entry, but legacy paths now sit at the tail
|
|
252
|
+
// for migration discovery; fresh installs should land in the new
|
|
253
|
+
// "rmfmail" folder, not the legacy "mailx".
|
|
254
|
+
const createPath = configuredPath || GDRIVE_PATH_SEARCH_ORDER[0];
|
|
250
255
|
const segments = createPath.split(/[/\\]/).filter(Boolean);
|
|
251
256
|
const created = await walkGDrivePath(token, segments, true);
|
|
252
257
|
if (created)
|
|
@@ -20,7 +20,28 @@ import * as path from "node:path";
|
|
|
20
20
|
import { parse as parseJsonc } from "jsonc-parser";
|
|
21
21
|
import { getCloudProvider, gDriveFindOrCreateFolder } from "./cloud.js";
|
|
22
22
|
// ── Paths ──
|
|
23
|
-
|
|
23
|
+
// REMOVE 2026-05-15 — one-shot migration of legacy ~/.mailx → ~/.rmfmail.
|
|
24
|
+
// Runs at module load before any consumer touches LOCAL_DIR. Idempotent
|
|
25
|
+
// (no-op if newDir already exists or oldDir is missing). The cloud-side
|
|
26
|
+
// rename (the "mailx" folder on Google Drive) is handled separately by
|
|
27
|
+
// the user via the Drive web UI — folderId in config.jsonc still resolves
|
|
28
|
+
// regardless of the display name, so this is cosmetic rather than load-
|
|
29
|
+
// bearing for cloud auth.
|
|
30
|
+
{
|
|
31
|
+
const home = process.env.USERPROFILE || process.env.HOME || ".";
|
|
32
|
+
const oldDir = path.join(home, ".mailx");
|
|
33
|
+
const newDir = path.join(home, ".rmfmail");
|
|
34
|
+
if (!fs.existsSync(newDir) && fs.existsSync(oldDir)) {
|
|
35
|
+
try {
|
|
36
|
+
fs.renameSync(oldDir, newDir);
|
|
37
|
+
console.log("[migrate] ~/.mailx → ~/.rmfmail");
|
|
38
|
+
}
|
|
39
|
+
catch (e) {
|
|
40
|
+
console.error(`[migrate] rename failed: ${e?.message || e}`);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
const LOCAL_DIR = path.join(process.env.USERPROFILE || process.env.HOME || ".", ".rmfmail");
|
|
24
45
|
const LOCAL_CONFIG_PATH = path.join(LOCAL_DIR, "config.jsonc");
|
|
25
46
|
const LEGACY_CONFIG_PATH = path.join(LOCAL_DIR, "config.json");
|
|
26
47
|
const DEFAULT_STORE_PATH = path.join(LOCAL_DIR, "mailxstore");
|