@atom8n/imap 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/build.tsbuildinfo +1 -0
- package/dist/errors.d.ts +12 -0
- package/dist/errors.js +30 -0
- package/dist/errors.js.map +1 -0
- package/dist/helpers/get-message.d.ts +3 -0
- package/dist/helpers/get-message.js +37 -0
- package/dist/helpers/get-message.js.map +1 -0
- package/dist/imap-simple.d.ts +16 -0
- package/dist/imap-simple.js +124 -0
- package/dist/imap-simple.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +84 -0
- package/dist/index.js.map +1 -0
- package/dist/part-data.d.ts +24 -0
- package/dist/part-data.js +109 -0
- package/dist/part-data.js.map +1 -0
- package/dist/types.d.ts +31 -0
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -0
- package/package.json +40 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"fileNames":["../../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es5.d.ts","../../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2015.d.ts","../../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2016.d.ts","../../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2017.d.ts","../../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2018.d.ts","../../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2019.d.ts","../../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2020.d.ts","../../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2021.d.ts","../../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.dom.d.ts","../../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2017.date.d.ts","../../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2019.array.d.ts","../../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2019.object.d.ts","../../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2019.string.d.ts","../../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2020.date.d.ts","../../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2020.string.d.ts","../../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2020.number.d.ts","../../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2021.string.d.ts","../../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.es2022.error.d.ts","../../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.decorators.d.ts","../../../../node_modules/.pnpm/typescript@5.9.2/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../../node_modules/jest-expect-message/types/index.d.ts","../src/errors.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/compatibility/disposable.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/compatibility/indexable.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/compatibility/iterators.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/compatibility/index.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/globals.typedarray.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/buffer.buffer.d.ts","../../../../node_modules/.pnpm/buffer@5.7.1/node_modules/buffer/index.d.ts","../../../../node_modules/.pnpm/undici-types@6.19.8/node_modules/undici-types/header.d.ts","../../../../node_modules/.pnpm/undici-types@6.19.8/node_modules/undici-types/readable.d.ts","../../../../node_modules/.pnpm/undici-types@6.19.8/node_modules/undici-types/file.d.ts","../../../../node_modules/.pnpm/undici-types@6.19.8/node_modules/undici-types/fetch.d.ts","../../../../node_modules/.pnpm/undici-types@6.19.8/node_modules/undici-types/formdata.d.ts","../../../../node_modules/.pnpm/undici-types@6.19.8/node_modules/undici-types/connector.d.ts","../../../../node_modules/.pnpm/undici-types@6.19.8/node_modules/undici-types/client.d.ts","../../../../node_modules/.pnpm/undici-types@6.19.8/node_modules/undici-types/errors.d.ts","../../../../node_modules/.pnpm/undici-types@6.19.8/node_modules/undici-types/dispatcher.d.ts","../../../../node_modules/.pnpm/undici-types@6.19.8/node_modules/undici-types/global-dispatcher.d.ts","../../../../node_modules/.pnpm/undici-types@6.19.8/node_modules/undici-types/global-origin.d.ts","../../../../node_modules/.pnpm/undici-types@6.19.8/node_modules/undici-types/pool-stats.d.ts","../../../../node_modules/.pnpm/undici-types@6.19.8/node_modules/undici-types/pool.d.ts","../../../../node_modules/.pnpm/undici-types@6.19.8/node_modules/undici-types/handlers.d.ts","../../../../node_modules/.pnpm/undici-types@6.19.8/node_modules/undici-types/balanced-pool.d.ts","../../../../node_modules/.pnpm/undici-types@6.19.8/node_modules/undici-types/agent.d.ts","../../../../node_modules/.pnpm/undici-types@6.19.8/node_modules/undici-types/mock-interceptor.d.ts","../../../../node_modules/.pnpm/undici-types@6.19.8/node_modules/undici-types/mock-agent.d.ts","../../../../node_modules/.pnpm/undici-types@6.19.8/node_modules/undici-types/mock-client.d.ts","../../../../node_modules/.pnpm/undici-types@6.19.8/node_modules/undici-types/mock-pool.d.ts","../../../../node_modules/.pnpm/undici-types@6.19.8/node_modules/undici-types/mock-errors.d.ts","../../../../node_modules/.pnpm/undici-types@6.19.8/node_modules/undici-types/proxy-agent.d.ts","../../../../node_modules/.pnpm/undici-types@6.19.8/node_modules/undici-types/env-http-proxy-agent.d.ts","../../../../node_modules/.pnpm/undici-types@6.19.8/node_modules/undici-types/retry-handler.d.ts","../../../../node_modules/.pnpm/undici-types@6.19.8/node_modules/undici-types/retry-agent.d.ts","../../../../node_modules/.pnpm/undici-types@6.19.8/node_modules/undici-types/api.d.ts","../../../../node_modules/.pnpm/undici-types@6.19.8/node_modules/undici-types/interceptors.d.ts","../../../../node_modules/.pnpm/undici-types@6.19.8/node_modules/undici-types/util.d.ts","../../../../node_modules/.pnpm/undici-types@6.19.8/node_modules/undici-types/cookies.d.ts","../../../../node_modules/.pnpm/undici-types@6.19.8/node_modules/undici-types/patch.d.ts","../../../../node_modules/.pnpm/undici-types@6.19.8/node_modules/undici-types/websocket.d.ts","../../../../node_modules/.pnpm/undici-types@6.19.8/node_modules/undici-types/eventsource.d.ts","../../../../node_modules/.pnpm/undici-types@6.19.8/node_modules/undici-types/filereader.d.ts","../../../../node_modules/.pnpm/undici-types@6.19.8/node_modules/undici-types/diagnostics-channel.d.ts","../../../../node_modules/.pnpm/undici-types@6.19.8/node_modules/undici-types/content-type.d.ts","../../../../node_modules/.pnpm/undici-types@6.19.8/node_modules/undici-types/cache.d.ts","../../../../node_modules/.pnpm/undici-types@6.19.8/node_modules/undici-types/index.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/globals.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/assert.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/assert/strict.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/async_hooks.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/buffer.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/child_process.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/cluster.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/console.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/constants.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/crypto.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/dgram.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/diagnostics_channel.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/dns.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/dns/promises.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/domain.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/dom-events.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/events.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/fs.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/fs/promises.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/http.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/http2.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/https.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/inspector.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/module.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/net.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/os.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/path.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/perf_hooks.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/process.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/punycode.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/querystring.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/readline.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/readline/promises.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/repl.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/sea.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/stream.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/stream/promises.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/stream/consumers.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/stream/web.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/string_decoder.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/test.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/timers.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/timers/promises.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/tls.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/trace_events.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/tty.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/url.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/util.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/v8.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/vm.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/wasi.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/worker_threads.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/zlib.d.ts","../../../../node_modules/.pnpm/@types+node@20.17.57/node_modules/@types/node/index.d.ts","../../../../node_modules/.pnpm/@types+imap@0.8.40/node_modules/@types/imap/index.d.ts","../src/types.ts","../src/helpers/get-message.ts","../../../../node_modules/.pnpm/iconv-lite@0.6.3/node_modules/iconv-lite/lib/index.d.ts","../../../../node_modules/.pnpm/@types+quoted-printable@1.0.2/node_modules/@types/quoted-printable/index.d.ts","../../../../node_modules/.pnpm/@types+utf8@3.0.3/node_modules/@types/utf8/index.d.ts","../../../../node_modules/.pnpm/@types+uuencode@0.0.3_patch_hash=083a73709a54db57b092d986b43d27ddda3cb8008f9510e98bc9e6da0e1cbb62/node_modules/@types/uuencode/index.d.ts","../src/part-data.ts","../src/imap-simple.ts","../src/index.ts"],"fileIdsList":[[60,103,115,142,152],[60,100,103],[60,102,103],[103],[60,103,108,137],[60,103,104,109,115,116,123,134,145],[60,103,104,105,115,123],[60,103],[55,56,57,60,103],[60,103,106,146],[60,103,107,108,116,124],[60,103,108,134,142],[60,103,109,111,115,123],[60,102,103,110],[60,103,111,112],[60,103,113,115],[60,102,103,115],[60,103,115,116,117,134,145],[60,103,115,116,117,130,134,137],[60,98,103],[60,103,111,115,118,123,134,145],[60,103,115,116,118,119,123,134,142,145],[60,103,118,120,134,142,145],[58,59,60,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151],[60,103,115,121],[60,103,122,145,150],[60,103,111,115,123,134],[60,103,124],[60,103,125],[60,102,103,126],[60,100,101,102,103,104,105,106,107,108,109,110,111,112,113,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151],[60,103,128],[60,103,129],[60,103,115,130,131],[60,103,130,132,146,148],[60,103,115,134,135,137],[60,103,136,137],[60,103,134,135],[60,103,137],[60,103,138],[60,100,103,134],[60,103,115,140,141],[60,103,140,141],[60,103,108,123,134,142],[60,103,143],[60,103,123,144],[60,103,118,129,145],[60,103,108,146],[60,103,134,147],[60,103,122,148],[60,103,149],[60,103,115,117,126,134,137,145,148,150],[60,103,134,151],[60,103,152],[60,70,74,103,145],[60,70,103,134,145],[60,65,103],[60,67,70,103,142,145],[60,103,123,142],[60,65,103,152],[60,67,70,103,123,145],[60,62,63,66,69,103,115,134,145],[60,70,77,103],[60,62,68,103],[60,70,91,92,103],[60,66,70,103,137,145,152],[60,91,103,152],[60,64,65,103,152],[60,70,103],[60,64,65,66,67,68,69,70,71,72,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,92,93,94,95,96,97,103],[60,70,85,103],[60,70,77,78,103],[60,68,70,78,79,103],[60,69,103],[60,62,65,70,103],[60,70,74,78,79,103],[60,74,103],[60,68,70,73,103,145],[60,62,67,70,77,103],[60,103,134],[60,65,70,91,103,150,152],[60,103,153,154],[60,103,115,153,154,155,160],[54,60,103,153,154,161],[60,103,156,157,158,159],[60,103,153]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"080941d9f9ff9307f7e27a83bcd888b7c8270716c39af943532438932ec1d0b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"406a5a771d97867cba07e7fbd3cd1fb2dd1004558b973733205737e9dd7ed929","affectsGlobalScope":true,"impliedFormat":1},{"version":"61e7f1bd24f78842bb050f00db1f52283488794f1442a98e104089ae0ff7ad04","signature":"3cc448750f6b14e1bb8be179e843b345b1eb7812d4942b7c6f25c3ed9f9b7020"},{"version":"70521b6ab0dcba37539e5303104f29b721bfb2940b2776da4cc818c07e1fefc1","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab41ef1f2cdafb8df48be20cd969d875602483859dc194e9c97c8a576892c052","affectsGlobalScope":true,"impliedFormat":1},{"version":"d153a11543fd884b596587ccd97aebbeed950b26933ee000f94009f1ab142848","affectsGlobalScope":true,"impliedFormat":1},{"version":"21d819c173c0cf7cc3ce57c3276e77fd9a8a01d35a06ad87158781515c9a438a","impliedFormat":1},{"version":"a79e62f1e20467e11a904399b8b18b18c0c6eea6b50c1168bf215356d5bebfaf","affectsGlobalScope":true,"impliedFormat":1},{"version":"49a5a44f2e68241a1d2bd9ec894535797998841c09729e506a7cbfcaa40f2180","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e9c23ba78aabc2e0a27033f18737a6df754067731e69dc5f52823957d60a4b6","impliedFormat":1},{"version":"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","impliedFormat":1},{"version":"24bd580b5743dc56402c440dc7f9a4f5d592ad7a419f25414d37a7bfe11e342b","impliedFormat":1},{"version":"25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","impliedFormat":1},{"version":"c464d66b20788266e5353b48dc4aa6bc0dc4a707276df1e7152ab0c9ae21fad8","impliedFormat":1},{"version":"78d0d27c130d35c60b5e5566c9f1e5be77caf39804636bc1a40133919a949f21","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"1d6e127068ea8e104a912e42fc0a110e2aa5a66a356a917a163e8cf9a65e4a75","impliedFormat":1},{"version":"5ded6427296cdf3b9542de4471d2aa8d3983671d4cac0f4bf9c637208d1ced43","impliedFormat":1},{"version":"6bdc71028db658243775263e93a7db2fd2abfce3ca569c3cca5aee6ed5eb186d","impliedFormat":1},{"version":"cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","impliedFormat":1},{"version":"385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","impliedFormat":1},{"version":"9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","impliedFormat":1},{"version":"0b8a9268adaf4da35e7fa830c8981cfa22adbbe5b3f6f5ab91f6658899e657a7","impliedFormat":1},{"version":"11396ed8a44c02ab9798b7dca436009f866e8dae3c9c25e8c1fbc396880bf1bb","impliedFormat":1},{"version":"ba7bc87d01492633cb5a0e5da8a4a42a1c86270e7b3d2dea5d156828a84e4882","impliedFormat":1},{"version":"4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","impliedFormat":1},{"version":"c21dc52e277bcfc75fac0436ccb75c204f9e1b3fa5e12729670910639f27343e","impliedFormat":1},{"version":"13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","impliedFormat":1},{"version":"9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","impliedFormat":1},{"version":"4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","impliedFormat":1},{"version":"24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","impliedFormat":1},{"version":"ea0148f897b45a76544ae179784c95af1bd6721b8610af9ffa467a518a086a43","impliedFormat":1},{"version":"24c6a117721e606c9984335f71711877293a9651e44f59f3d21c1ea0856f9cc9","impliedFormat":1},{"version":"dd3273ead9fbde62a72949c97dbec2247ea08e0c6952e701a483d74ef92d6a17","impliedFormat":1},{"version":"405822be75ad3e4d162e07439bac80c6bcc6dbae1929e179cf467ec0b9ee4e2e","impliedFormat":1},{"version":"0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","impliedFormat":1},{"version":"4d2b0eb911816f66abe4970898f97a2cfc902bcd743cbfa5017fad79f7ef90d8","impliedFormat":1},{"version":"bd0532fd6556073727d28da0edfd1736417a3f9f394877b6d5ef6ad88fba1d1a","impliedFormat":1},{"version":"89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","impliedFormat":1},{"version":"e53a3c2a9f624d90f24bf4588aacd223e7bec1b9d0d479b68d2f4a9e6011147f","impliedFormat":1},{"version":"24b8685c62562f5d98615c5a0c1d05f297cf5065f15246edfe99e81ec4c0e011","impliedFormat":1},{"version":"93507c745e8f29090efb99399c3f77bec07db17acd75634249dc92f961573387","impliedFormat":1},{"version":"339dc5265ee5ed92e536a93a04c4ebbc2128f45eeec6ed29f379e0085283542c","impliedFormat":1},{"version":"4732aec92b20fb28c5fe9ad99521fb59974289ed1e45aecb282616202184064f","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"bf67d53d168abc1298888693338cb82854bdb2e69ef83f8a0092093c2d562107","impliedFormat":1},{"version":"b8582f8bf95b9b901bf6cf47b9ee3560c7f340be0bd39cb432f21e9e136c36a7","affectsGlobalScope":true,"impliedFormat":1},{"version":"6b042aa5d277ad6963e2837179fd2f8fbb01968ac67115b0833c0244e93d1d50","impliedFormat":1},{"version":"7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","impliedFormat":1},{"version":"8c0bcd6c6b67b4b503c11e91a1fb91522ed585900eab2ab1f61bba7d7caa9d6f","impliedFormat":1},{"version":"9e025aa38cad40827cc30aca974fe33fe2c4652fe8c88f48dadbbbd6300c8b07","affectsGlobalScope":true,"impliedFormat":1},{"version":"f3e58c4c18a031cbb17abec7a4ad0bd5ae9fc70c1f4ba1e7fb921ad87c504aca","impliedFormat":1},{"version":"84c1930e33d1bb12ad01bcbe11d656f9646bd21b2fb2afd96e8e10615a021aef","impliedFormat":1},{"version":"35ec8b6760fd7138bbf5809b84551e31028fb2ba7b6dc91d95d098bf212ca8b4","affectsGlobalScope":true,"impliedFormat":1},{"version":"5524481e56c48ff486f42926778c0a3cce1cc85dc46683b92b1271865bcf015a","impliedFormat":1},{"version":"4b87f767c7bc841511113c876a6b8bf1fd0cb0b718c888ad84478b372ec486b1","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d04e3640dd9eb67f7f1e5bd3d0bf96c784666f7aefc8ac1537af6f2d38d4c29","impliedFormat":1},{"version":"9d19808c8c291a9010a6c788e8532a2da70f811adb431c97520803e0ec649991","impliedFormat":1},{"version":"5a369483ac4cfbdf0331c248deeb36140e6907db5e1daed241546b4a2055f82c","impliedFormat":1},{"version":"e8f5b5cc36615c17d330eaf8eebbc0d6bdd942c25991f96ef122f246f4ff722f","impliedFormat":1},{"version":"f0bd7e6d931657b59605c44112eaf8b980ba7f957a5051ed21cb93d978cf2f45","impliedFormat":1},{"version":"71450bbc2d82821d24ca05699a533e72758964e9852062c53b30f31c36978ab8","affectsGlobalScope":true,"impliedFormat":1},{"version":"0ada07543808f3b967624645a8e1ccd446f8b01ade47842acf1328aec899fed0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4c21aaa8257d7950a5b75a251d9075b6a371208fc948c9c8402f6690ef3b5b55","impliedFormat":1},{"version":"b5895e6353a5d708f55d8685c38a235c3a6d8138e374dee8ceb8ffde5aa8002a","impliedFormat":1},{"version":"5b75ca915164e4a7ad94a60729fe45b8a62e7750ab232d0122f8ccdd768f5314","impliedFormat":1},{"version":"93bd413918fa921c8729cef45302b24d8b6c7855d72d5bf82d3972595ae8dcbf","impliedFormat":1},{"version":"4ff41188773cbf465807dd2f7059c7494cbee5115608efc297383832a1150c43","impliedFormat":1},{"version":"dccdf1677e531e33f8ac961a68bc537418c9a414797c1ea7e91307501cdc3f5e","impliedFormat":1},{"version":"1354ca5c38bd3fd3836a68e0f7c9f91f172582ba30ab15bb8c075891b91502b7","affectsGlobalScope":true,"impliedFormat":1},{"version":"5155da3047ef977944d791a2188ff6e6c225f6975cc1910ab7bb6838ab84cede","impliedFormat":1},{"version":"93f437e1398a4f06a984f441f7fa7a9f0535c04399619b5c22e0b87bdee182cb","impliedFormat":1},{"version":"afbe24ab0d74694372baa632ecb28bb375be53f3be53f9b07ecd7fc994907de5","impliedFormat":1},{"version":"3e5b3163e34f3dc24cba59db4bb90bcc33555cccac06b707501439bdcf3d4df4","affectsGlobalScope":true,"impliedFormat":1},{"version":"6b19db3600a17af69d4f33d08cc7076a7d19fb65bb36e442cac58929ec7c9482","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e043a1bc8fbf2a255bccf9bf27e0f1caf916c3b0518ea34aa72357c0afd42ec","impliedFormat":1},{"version":"b4f70ec656a11d570e1a9edce07d118cd58d9760239e2ece99306ee9dfe61d02","impliedFormat":1},{"version":"3bc2f1e2c95c04048212c569ed38e338873f6a8593930cf5a7ef24ffb38fc3b6","impliedFormat":1},{"version":"8145e07aad6da5f23f2fcd8c8e4c5c13fb26ee986a79d03b0829b8fce152d8b2","impliedFormat":1},{"version":"f9d9d753d430ed050dc1bf2667a1bab711ccbb1c1507183d794cc195a5b085cc","impliedFormat":1},{"version":"9eece5e586312581ccd106d4853e861aaaa1a39f8e3ea672b8c3847eedd12f6e","impliedFormat":1},{"version":"5b6844ad931dcc1d3aca53268f4bd671428421464b1286746027aede398094f2","impliedFormat":1},{"version":"37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","impliedFormat":1},{"version":"125d792ec6c0c0f657d758055c494301cc5fdb327d9d9d5960b3f129aff76093","impliedFormat":1},{"version":"0dbcebe2126d03936c70545e96a6e41007cf065be38a1ce4d32a39fcedefead4","affectsGlobalScope":true,"impliedFormat":1},{"version":"1851a3b4db78664f83901bb9cac9e45e03a37bb5933cc5bf37e10bb7e91ab4eb","impliedFormat":1},{"version":"09d479208911ac3ac6a7c2fe86217fc1abe6c4f04e2d52e4890e500699eeab32","affectsGlobalScope":true,"impliedFormat":1},{"version":"12ed4559eba17cd977aa0db658d25c4047067444b51acfdcbf38470630642b23","affectsGlobalScope":true,"impliedFormat":1},{"version":"f3ffabc95802521e1e4bcba4c88d8615176dc6e09111d920c7a213bdda6e1d65","impliedFormat":1},{"version":"c40b3d3cfbb1227c8935f681c2480a32b560e387dd771d329cdbd1641f2d6da5","impliedFormat":1},{"version":"ae56f65caf3be91108707bd8dfbccc2a57a91feb5daabf7165a06a945545ed26","impliedFormat":1},{"version":"a136d5de521da20f31631a0a96bf712370779d1c05b7015d7019a9b2a0446ca9","impliedFormat":1},{"version":"5b566927cad2ed2139655d55d690ffa87df378b956e7fe1c96024c4d9f75c4cf","affectsGlobalScope":true,"impliedFormat":1},{"version":"c4a3720550d1787c8d6284040853c0781ff1e2cd8d842f2cb44547525ee34c36","affectsGlobalScope":true,"impliedFormat":1},{"version":"d3dffd70e6375b872f0b4e152de4ae682d762c61a24881ecc5eb9f04c5caf76f","impliedFormat":1},{"version":"f008d63ce0077f533e39df44b82d660707b15b0f8e31fbc153a62bb00b99bfe5","impliedFormat":1},{"version":"d91a7d8b5655c42986f1bdfe2105c4408f472831c8f20cf11a8c3345b6b56c8c","impliedFormat":1},{"version":"6bdb3144f8bf020f513651a6ea1cb8a378a612c0791042e0436fd9adf7372a17","affectsGlobalScope":true,"impliedFormat":1},{"version":"e8a979b8af001c9fc2e774e7809d233c8ca955a28756f52ee5dee88ccb0611d2","impliedFormat":1},{"version":"cac793cc47c29e26e4ac3601dcb00b4435ebed26203485790e44f2ad8b6ad847","impliedFormat":1},{"version":"52e0d4a8762141a86861c8175312030724ff444f7ae548c61e7263f774160fc3","impliedFormat":1},{"version":"8057f3eaac330ddcde13e9b2fd26a88cbe6f12bd53234e2b6002811aef53b285","signature":"3461d870f03e8590e51d6ff56be891fafc197d05af3d318df00e9e1f279cb4ce"},{"version":"dd94e97cdbb6241a2b70533341e1da83bfb80d56f70e2aab4b10aeedfc201ccc","signature":"d3470035d665d3be9ac5441942bac95ba52ca1b9f3eab4559fcd6dd616827354"},{"version":"85d3aa95b0086752d2f7784d2bdaeb38f99c3cf6c35bee861702beb68556cb9e","impliedFormat":1},{"version":"9c0ea4ed2c2cd25374c31d9bbbe8aefa5171da25ee6e7d388b6ae9c3481bda3f","impliedFormat":1},{"version":"67dde413b255aee29f821a7a98218f5936539c38526d77dfede51f12f2c3aa52","impliedFormat":1},{"version":"df7cad075a5e421ae12ea4674692b295346744ba1fff73850056c904f321083c","impliedFormat":1},{"version":"c33f1591cccf517fcdca117871d0140adc43892c6663523d390b09203a7a80a1","signature":"389ada30404735d61de19071551243ecffbcea2d0011cb37425999dee904cee0"},{"version":"914b0ab56d5541ff4335ced5b52b8369bd2b28e5036c36aa59e13545334e02d8","signature":"07f952dc5f6cd926150a1417cac2bf1621ca4489bdcb93370d61719b5c2c89ff"},{"version":"5eab5469f62e9656be54d77bffeea8a5ab6bcbbe0cd9288a24e90f138f8eec45","signature":"29b1a73806dda57b039b50f1c30f667c6032b40c220c57d1d7bd8ccc66ade4a0"}],"root":[53,54,154,155,[160,162]],"options":{"composite":true,"declaration":true,"esModuleInterop":true,"module":1,"noImplicitAny":true,"noImplicitReturns":true,"noUnusedLocals":false,"noUnusedParameters":false,"outDir":"./","preserveConstEnums":true,"removeComments":true,"rootDir":"../src","skipLibCheck":true,"sourceMap":true,"strict":true,"strictNullChecks":true,"target":8,"tsBuildInfoFile":"./build.tsbuildinfo","useUnknownInCatchVariables":true},"referencedMap":[[153,1],[100,2],[101,2],[102,3],[60,4],[103,5],[104,6],[105,7],[55,8],[58,9],[56,8],[57,8],[106,10],[107,11],[108,12],[109,13],[110,14],[111,15],[112,15],[114,8],[113,16],[115,17],[116,18],[117,19],[99,20],[59,8],[118,21],[119,22],[120,23],[152,24],[121,25],[122,26],[123,27],[124,28],[125,29],[126,30],[127,31],[128,32],[129,33],[130,34],[131,34],[132,35],[133,8],[134,36],[136,37],[135,38],[137,39],[138,40],[139,41],[140,42],[141,43],[142,44],[143,45],[144,46],[145,47],[146,48],[147,49],[148,50],[149,51],[150,52],[151,53],[157,8],[158,8],[159,54],[61,8],[156,8],[51,8],[52,8],[9,8],[11,8],[10,8],[2,8],[12,8],[13,8],[14,8],[15,8],[16,8],[17,8],[18,8],[19,8],[3,8],[20,8],[21,8],[4,8],[22,8],[26,8],[23,8],[24,8],[25,8],[27,8],[28,8],[29,8],[5,8],[30,8],[31,8],[32,8],[33,8],[6,8],[37,8],[34,8],[35,8],[36,8],[38,8],[7,8],[39,8],[44,8],[45,8],[40,8],[41,8],[42,8],[43,8],[8,8],[49,8],[46,8],[47,8],[48,8],[50,8],[1,8],[77,55],[87,56],[76,55],[97,57],[68,58],[67,59],[96,54],[90,60],[95,61],[70,62],[84,63],[69,64],[93,65],[65,66],[64,54],[94,67],[66,68],[71,69],[72,8],[75,69],[62,8],[98,70],[88,71],[79,72],[80,73],[82,74],[78,75],[81,76],[91,54],[73,77],[74,78],[83,79],[63,80],[86,71],[85,69],[89,8],[92,81],[53,8],[54,8],[155,82],[161,83],[162,84],[160,85],[154,86]],"latestChangedDtsFile":"./index.d.ts","version":"5.9.2"}
|
package/dist/errors.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare abstract class ImapError extends Error {
|
|
2
|
+
}
|
|
3
|
+
export declare class ConnectionTimeoutError extends ImapError {
|
|
4
|
+
readonly timeout?: number | undefined;
|
|
5
|
+
constructor(timeout?: number | undefined);
|
|
6
|
+
}
|
|
7
|
+
export declare class ConnectionClosedError extends ImapError {
|
|
8
|
+
constructor();
|
|
9
|
+
}
|
|
10
|
+
export declare class ConnectionEndedError extends ImapError {
|
|
11
|
+
constructor();
|
|
12
|
+
}
|
package/dist/errors.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ConnectionEndedError = exports.ConnectionClosedError = exports.ConnectionTimeoutError = exports.ImapError = void 0;
|
|
4
|
+
class ImapError extends Error {
|
|
5
|
+
}
|
|
6
|
+
exports.ImapError = ImapError;
|
|
7
|
+
class ConnectionTimeoutError extends ImapError {
|
|
8
|
+
constructor(timeout) {
|
|
9
|
+
let message = 'connection timed out';
|
|
10
|
+
if (timeout) {
|
|
11
|
+
message += `. timeout = ${timeout} ms`;
|
|
12
|
+
}
|
|
13
|
+
super(message);
|
|
14
|
+
this.timeout = timeout;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
exports.ConnectionTimeoutError = ConnectionTimeoutError;
|
|
18
|
+
class ConnectionClosedError extends ImapError {
|
|
19
|
+
constructor() {
|
|
20
|
+
super('Connection closed unexpectedly');
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.ConnectionClosedError = ConnectionClosedError;
|
|
24
|
+
class ConnectionEndedError extends ImapError {
|
|
25
|
+
constructor() {
|
|
26
|
+
super('Connection ended unexpectedly');
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.ConnectionEndedError = ConnectionEndedError;
|
|
30
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":";;;AAAA,MAAsB,SAAU,SAAQ,KAAK;CAAG;AAAhD,8BAAgD;AAGhD,MAAa,sBAAuB,SAAQ,SAAS;IACpD,YAEU,OAAgB;QAEzB,IAAI,OAAO,GAAG,sBAAsB,CAAC;QACrC,IAAI,OAAO,EAAE,CAAC;YACb,OAAO,IAAI,eAAe,OAAO,KAAK,CAAC;QACxC,CAAC;QACD,KAAK,CAAC,OAAO,CAAC,CAAC;QANN,YAAO,GAAP,OAAO,CAAS;IAO1B,CAAC;CACD;AAXD,wDAWC;AAED,MAAa,qBAAsB,SAAQ,SAAS;IACnD;QACC,KAAK,CAAC,gCAAgC,CAAC,CAAC;IACzC,CAAC;CACD;AAJD,sDAIC;AAED,MAAa,oBAAqB,SAAQ,SAAS;IAClD;QACC,KAAK,CAAC,+BAA+B,CAAC,CAAC;IACxC,CAAC;CACD;AAJD,oDAIC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getMessage = getMessage;
|
|
4
|
+
const imap_1 = require("imap");
|
|
5
|
+
async function getMessage(message) {
|
|
6
|
+
return await new Promise((resolve) => {
|
|
7
|
+
let attributes;
|
|
8
|
+
const parts = [];
|
|
9
|
+
const messageOnBody = (stream, info) => {
|
|
10
|
+
let body = '';
|
|
11
|
+
const streamOnData = (chunk) => {
|
|
12
|
+
body += chunk.toString('utf8');
|
|
13
|
+
};
|
|
14
|
+
stream.on('data', streamOnData);
|
|
15
|
+
stream.once('end', () => {
|
|
16
|
+
stream.removeListener('data', streamOnData);
|
|
17
|
+
parts.push({
|
|
18
|
+
which: info.which,
|
|
19
|
+
size: info.size,
|
|
20
|
+
body: /^HEADER/g.test(info.which) ? (0, imap_1.parseHeader)(body) : body,
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
const messageOnAttributes = (attrs) => {
|
|
25
|
+
attributes = attrs;
|
|
26
|
+
};
|
|
27
|
+
const messageOnEnd = () => {
|
|
28
|
+
message.removeListener('body', messageOnBody);
|
|
29
|
+
message.removeListener('attributes', messageOnAttributes);
|
|
30
|
+
resolve({ attributes, parts });
|
|
31
|
+
};
|
|
32
|
+
message.on('body', messageOnBody);
|
|
33
|
+
message.once('attributes', messageOnAttributes);
|
|
34
|
+
message.once('end', messageOnEnd);
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=get-message.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-message.js","sourceRoot":"","sources":["../../src/helpers/get-message.ts"],"names":[],"mappings":";;AAYA,gCAyCC;AArDD,+BAKc;AAOP,KAAK,UAAU,UAAU,CAE/B,OAAoB;IAEpB,OAAO,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QACpC,IAAI,UAAiC,CAAC;QACtC,MAAM,KAAK,GAAsB,EAAE,CAAC;QAEpC,MAAM,aAAa,GAAG,CAAC,MAA6B,EAAE,IAAyB,EAAE,EAAE;YAClF,IAAI,IAAI,GAAW,EAAE,CAAC;YAEtB,MAAM,YAAY,GAAG,CAAC,KAAa,EAAE,EAAE;gBACtC,IAAI,IAAI,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;YAChC,CAAC,CAAC;YAEF,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;YAChC,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE;gBACvB,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;gBAE5C,KAAK,CAAC,IAAI,CAAC;oBACV,KAAK,EAAE,IAAI,CAAC,KAAK;oBACjB,IAAI,EAAE,IAAI,CAAC,IAAI;oBACf,IAAI,EAAE,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAA,kBAAW,EAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI;iBAC5D,CAAC,CAAC;YACJ,CAAC,CAAC,CAAC;QACJ,CAAC,CAAC;QAEF,MAAM,mBAAmB,GAAG,CAAC,KAA4B,EAAE,EAAE;YAC5D,UAAU,GAAG,KAAK,CAAC;QACpB,CAAC,CAAC;QAEF,MAAM,YAAY,GAAG,GAAG,EAAE;YACzB,OAAO,CAAC,cAAc,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;YAC9C,OAAO,CAAC,cAAc,CAAC,YAAY,EAAE,mBAAmB,CAAC,CAAC;YAC1D,OAAO,CAAC,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,CAAC;QAChC,CAAC,CAAC;QAEF,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;QAClC,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,mBAAmB,CAAC,CAAC;QAChD,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC;IACnC,CAAC,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { EventEmitter } from 'events';
|
|
2
|
+
import type Imap from 'imap';
|
|
3
|
+
import { PartData } from './part-data';
|
|
4
|
+
import type { Message, MessagePart, SearchCriteria } from './types';
|
|
5
|
+
export declare class ImapSimple extends EventEmitter {
|
|
6
|
+
private readonly imap;
|
|
7
|
+
private ending;
|
|
8
|
+
constructor(imap: Imap);
|
|
9
|
+
end(): void;
|
|
10
|
+
search(searchCriteria: SearchCriteria[], fetchOptions: Imap.FetchOptions, limit?: number): Promise<Message[]>;
|
|
11
|
+
getPartData(message: Message, part: MessagePart): Promise<PartData>;
|
|
12
|
+
addFlags(uid: number[], flags: string | string[]): Promise<void>;
|
|
13
|
+
getBoxes(): Promise<Imap.MailBoxes>;
|
|
14
|
+
openBox(boxName: string): Promise<Imap.Box>;
|
|
15
|
+
closeBox(autoExpunge?: boolean): Promise<void>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ImapSimple = void 0;
|
|
4
|
+
const events_1 = require("events");
|
|
5
|
+
const get_message_1 = require("./helpers/get-message");
|
|
6
|
+
const part_data_1 = require("./part-data");
|
|
7
|
+
const IMAP_EVENTS = ['alert', 'mail', 'expunge', 'uidvalidity', 'update', 'close', 'end'];
|
|
8
|
+
class ImapSimple extends events_1.EventEmitter {
|
|
9
|
+
constructor(imap) {
|
|
10
|
+
super();
|
|
11
|
+
this.imap = imap;
|
|
12
|
+
this.ending = false;
|
|
13
|
+
IMAP_EVENTS.forEach((event) => {
|
|
14
|
+
this.imap.on(event, this.emit.bind(this, event));
|
|
15
|
+
});
|
|
16
|
+
this.imap.on('error', (e) => {
|
|
17
|
+
if (e && this.ending && e.code?.toUpperCase() === 'ECONNRESET') {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
this.emit('error', e);
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
end() {
|
|
24
|
+
this.ending = true;
|
|
25
|
+
this.imap.once('close', () => {
|
|
26
|
+
this.ending = false;
|
|
27
|
+
});
|
|
28
|
+
this.imap.end();
|
|
29
|
+
}
|
|
30
|
+
async search(searchCriteria, fetchOptions, limit) {
|
|
31
|
+
return await new Promise((resolve, reject) => {
|
|
32
|
+
this.imap.search(searchCriteria, (e, uids) => {
|
|
33
|
+
if (e) {
|
|
34
|
+
reject(e);
|
|
35
|
+
return;
|
|
36
|
+
}
|
|
37
|
+
if (uids.length === 0) {
|
|
38
|
+
resolve([]);
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
let uidsToFetch = uids;
|
|
42
|
+
if (limit && limit > 0 && uids.length > limit) {
|
|
43
|
+
uidsToFetch = uids.slice(0, limit);
|
|
44
|
+
}
|
|
45
|
+
const fetch = this.imap.fetch(uidsToFetch, fetchOptions);
|
|
46
|
+
let messagesRetrieved = 0;
|
|
47
|
+
const messages = [];
|
|
48
|
+
const fetchOnMessage = async (message, seqNo) => {
|
|
49
|
+
const msg = await (0, get_message_1.getMessage)(message);
|
|
50
|
+
msg.seqNo = seqNo;
|
|
51
|
+
messages.push(msg);
|
|
52
|
+
messagesRetrieved++;
|
|
53
|
+
if (messagesRetrieved === uidsToFetch.length) {
|
|
54
|
+
resolve(messages.filter((m) => !!m));
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
const fetchOnError = (error) => {
|
|
58
|
+
fetch.removeListener('message', fetchOnMessage);
|
|
59
|
+
fetch.removeListener('end', fetchOnEnd);
|
|
60
|
+
reject(error);
|
|
61
|
+
};
|
|
62
|
+
const fetchOnEnd = () => {
|
|
63
|
+
fetch.removeListener('message', fetchOnMessage);
|
|
64
|
+
fetch.removeListener('error', fetchOnError);
|
|
65
|
+
};
|
|
66
|
+
fetch.on('message', fetchOnMessage);
|
|
67
|
+
fetch.once('error', fetchOnError);
|
|
68
|
+
fetch.once('end', fetchOnEnd);
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
async getPartData(message, part) {
|
|
73
|
+
return await new Promise((resolve, reject) => {
|
|
74
|
+
const fetch = this.imap.fetch(message.attributes.uid, {
|
|
75
|
+
bodies: [part.partID],
|
|
76
|
+
struct: true,
|
|
77
|
+
});
|
|
78
|
+
const fetchOnMessage = async (msg) => {
|
|
79
|
+
const result = await (0, get_message_1.getMessage)(msg);
|
|
80
|
+
if (result.parts.length !== 1) {
|
|
81
|
+
reject(new Error('Got ' + result.parts.length + ' parts, should get 1'));
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
const data = result.parts[0].body;
|
|
85
|
+
const encoding = part.encoding.toUpperCase();
|
|
86
|
+
resolve(part_data_1.PartData.fromData(data, encoding));
|
|
87
|
+
};
|
|
88
|
+
const fetchOnError = (error) => {
|
|
89
|
+
fetch.removeListener('message', fetchOnMessage);
|
|
90
|
+
fetch.removeListener('end', fetchOnEnd);
|
|
91
|
+
reject(error);
|
|
92
|
+
};
|
|
93
|
+
const fetchOnEnd = () => {
|
|
94
|
+
fetch.removeListener('message', fetchOnMessage);
|
|
95
|
+
fetch.removeListener('error', fetchOnError);
|
|
96
|
+
};
|
|
97
|
+
fetch.once('message', fetchOnMessage);
|
|
98
|
+
fetch.once('error', fetchOnError);
|
|
99
|
+
fetch.once('end', fetchOnEnd);
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
async addFlags(uid, flags) {
|
|
103
|
+
return await new Promise((resolve, reject) => {
|
|
104
|
+
this.imap.addFlags(uid, flags, (e) => (e ? reject(e) : resolve()));
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
async getBoxes() {
|
|
108
|
+
return await new Promise((resolve, reject) => {
|
|
109
|
+
this.imap.getBoxes((e, boxes) => (e ? reject(e) : resolve(boxes)));
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
async openBox(boxName) {
|
|
113
|
+
return await new Promise((resolve, reject) => {
|
|
114
|
+
this.imap.openBox(boxName, (e, result) => (e ? reject(e) : resolve(result)));
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
async closeBox(autoExpunge = true) {
|
|
118
|
+
return await new Promise((resolve, reject) => {
|
|
119
|
+
this.imap.closeBox(autoExpunge, (e) => (e ? reject(e) : resolve()));
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
exports.ImapSimple = ImapSimple;
|
|
124
|
+
//# sourceMappingURL=imap-simple.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"imap-simple.js","sourceRoot":"","sources":["../src/imap-simple.ts"],"names":[],"mappings":";;;AAAA,mCA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AAO,CAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YAC5D,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACpE,CAAC,CAAC,CAAC;IACJ,CAAC;IAGD,KAAK,CAAC,OAAO,CAEZ,OAAe;QAEf,OAAO,MAAM,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YAC5C,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QAC9E,CAAC,CAAC,CAAC;IACJ,CAAC;IAGD,KAAK,CAAC,QAAQ,CAEb,WAAW,GAAG,IAAI;QAElB,OAAO,MAAM,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YAClD,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;QACrE,CAAC,CAAC,CAAC;IACJ,CAAC;CACD;AAhMD,gCAgMC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ImapSimple } from './imap-simple';
|
|
2
|
+
import type { ImapSimpleOptions, MessagePart } from './types';
|
|
3
|
+
export declare function connect(options: ImapSimpleOptions): Promise<ImapSimple>;
|
|
4
|
+
export declare function getParts(struct: any, parts?: MessagePart[]): MessagePart[];
|
|
5
|
+
export * from './imap-simple';
|
|
6
|
+
export * from './errors';
|
|
7
|
+
export type * from './types';
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
17
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
|
+
};
|
|
19
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
+
exports.connect = connect;
|
|
21
|
+
exports.getParts = getParts;
|
|
22
|
+
const imap_1 = __importDefault(require("imap"));
|
|
23
|
+
const errors_1 = require("./errors");
|
|
24
|
+
const imap_simple_1 = require("./imap-simple");
|
|
25
|
+
async function connect(options) {
|
|
26
|
+
const authTimeout = options.imap.authTimeout ?? 2000;
|
|
27
|
+
options.imap.authTimeout = authTimeout;
|
|
28
|
+
const imap = new imap_1.default(options.imap);
|
|
29
|
+
return await new Promise((resolve, reject) => {
|
|
30
|
+
const cleanUp = () => {
|
|
31
|
+
imap.removeListener('ready', imapOnReady);
|
|
32
|
+
imap.removeListener('error', imapOnError);
|
|
33
|
+
imap.removeListener('close', imapOnClose);
|
|
34
|
+
imap.removeListener('end', imapOnEnd);
|
|
35
|
+
};
|
|
36
|
+
const imapOnReady = () => {
|
|
37
|
+
cleanUp();
|
|
38
|
+
resolve(new imap_simple_1.ImapSimple(imap));
|
|
39
|
+
};
|
|
40
|
+
const imapOnError = (e) => {
|
|
41
|
+
if (e.source === 'timeout-auth') {
|
|
42
|
+
e = new errors_1.ConnectionTimeoutError(authTimeout);
|
|
43
|
+
}
|
|
44
|
+
cleanUp();
|
|
45
|
+
reject(e);
|
|
46
|
+
};
|
|
47
|
+
const imapOnEnd = () => {
|
|
48
|
+
cleanUp();
|
|
49
|
+
reject(new errors_1.ConnectionEndedError());
|
|
50
|
+
};
|
|
51
|
+
const imapOnClose = () => {
|
|
52
|
+
cleanUp();
|
|
53
|
+
reject(new errors_1.ConnectionClosedError());
|
|
54
|
+
};
|
|
55
|
+
imap.once('ready', imapOnReady);
|
|
56
|
+
imap.once('error', imapOnError);
|
|
57
|
+
imap.once('close', imapOnClose);
|
|
58
|
+
imap.once('end', imapOnEnd);
|
|
59
|
+
if (options.onMail) {
|
|
60
|
+
imap.on('mail', options.onMail);
|
|
61
|
+
}
|
|
62
|
+
if (options.onExpunge) {
|
|
63
|
+
imap.on('expunge', options.onExpunge);
|
|
64
|
+
}
|
|
65
|
+
if (options.onUpdate) {
|
|
66
|
+
imap.on('update', options.onUpdate);
|
|
67
|
+
}
|
|
68
|
+
imap.connect();
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
function getParts(struct, parts = []) {
|
|
72
|
+
for (let i = 0; i < struct.length; i++) {
|
|
73
|
+
if (Array.isArray(struct[i])) {
|
|
74
|
+
getParts(struct[i], parts);
|
|
75
|
+
}
|
|
76
|
+
else if (struct[i].partID) {
|
|
77
|
+
parts.push(struct[i]);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return parts;
|
|
81
|
+
}
|
|
82
|
+
__exportStar(require("./imap-simple"), exports);
|
|
83
|
+
__exportStar(require("./errors"), exports);
|
|
84
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAWA,0BAyDC;AAYD,4BAeC;AA7FD,gDAAwB;AAExB,qCAA+F;AAC/F,+CAA2C;AAMpC,KAAK,UAAU,OAAO,CAAC,OAA0B;IACvD,MAAM,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC;IACrD,OAAO,CAAC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;IAEvC,MAAM,IAAI,GAAG,IAAI,cAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAEpC,OAAO,MAAM,IAAI,OAAO,CAAa,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACxD,MAAM,OAAO,GAAG,GAAG,EAAE;YACpB,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;YAC1C,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;YAC1C,IAAI,CAAC,cAAc,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;YAC1C,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;QACvC,CAAC,CAAC;QAEF,MAAM,WAAW,GAAG,GAAG,EAAE;YACxB,OAAO,EAAE,CAAC;YACV,OAAO,CAAC,IAAI,wBAAU,CAAC,IAAI,CAAC,CAAC,CAAC;QAC/B,CAAC,CAAC;QAEF,MAAM,WAAW,GAAG,CAAC,CAA8B,EAAE,EAAE;YACtD,IAAI,CAAC,CAAC,MAAM,KAAK,cAAc,EAAE,CAAC;gBACjC,CAAC,GAAG,IAAI,+BAAsB,CAAC,WAAW,CAAC,CAAC;YAC7C,CAAC;YAED,OAAO,EAAE,CAAC;YACV,MAAM,CAAC,CAAC,CAAC,CAAC;QACX,CAAC,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,EAAE,KAAK,CAAC,CAAC;QAC5B,CAAC;aAAM,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;YAC7B,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAgB,CAAC,CAAC;QACtC,CAAC;IACF,CAAC;IACD,OAAO,KAAK,CAAC;AACd,CAAC;AAED,gDAA8B;AAC9B,2CAAyB"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare abstract class PartData {
|
|
2
|
+
readonly buffer: Buffer;
|
|
3
|
+
constructor(buffer: Buffer);
|
|
4
|
+
toString(): string;
|
|
5
|
+
static fromData(data: string, encoding: string, charset?: string): PartData;
|
|
6
|
+
}
|
|
7
|
+
export declare class Base64PartData extends PartData {
|
|
8
|
+
constructor(data: string);
|
|
9
|
+
}
|
|
10
|
+
export declare class QuotedPrintablePartData extends PartData {
|
|
11
|
+
constructor(data: string, charset?: string);
|
|
12
|
+
}
|
|
13
|
+
export declare class SevenBitPartData extends PartData {
|
|
14
|
+
constructor(data: string);
|
|
15
|
+
toString(): string;
|
|
16
|
+
}
|
|
17
|
+
export declare class BinaryPartData extends PartData {
|
|
18
|
+
readonly charset: string;
|
|
19
|
+
constructor(data: string, charset?: string);
|
|
20
|
+
toString(): string;
|
|
21
|
+
}
|
|
22
|
+
export declare class UuencodedPartData extends PartData {
|
|
23
|
+
constructor(data: string);
|
|
24
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.UuencodedPartData = exports.BinaryPartData = exports.SevenBitPartData = exports.QuotedPrintablePartData = exports.Base64PartData = exports.PartData = void 0;
|
|
37
|
+
const iconvlite = __importStar(require("iconv-lite"));
|
|
38
|
+
const qp = __importStar(require("quoted-printable"));
|
|
39
|
+
const utf8 = __importStar(require("utf8"));
|
|
40
|
+
const uuencode = __importStar(require("uuencode"));
|
|
41
|
+
class PartData {
|
|
42
|
+
constructor(buffer) {
|
|
43
|
+
this.buffer = buffer;
|
|
44
|
+
}
|
|
45
|
+
toString() {
|
|
46
|
+
return this.buffer.toString();
|
|
47
|
+
}
|
|
48
|
+
static fromData(data, encoding, charset) {
|
|
49
|
+
if (encoding === 'BASE64') {
|
|
50
|
+
return new Base64PartData(data);
|
|
51
|
+
}
|
|
52
|
+
if (encoding === 'QUOTED-PRINTABLE') {
|
|
53
|
+
return new QuotedPrintablePartData(data, charset);
|
|
54
|
+
}
|
|
55
|
+
if (encoding === '7BIT') {
|
|
56
|
+
return new SevenBitPartData(data);
|
|
57
|
+
}
|
|
58
|
+
if (encoding === '8BIT' || encoding === 'BINARY') {
|
|
59
|
+
return new BinaryPartData(data, charset);
|
|
60
|
+
}
|
|
61
|
+
if (encoding === 'UUENCODE') {
|
|
62
|
+
return new UuencodedPartData(data);
|
|
63
|
+
}
|
|
64
|
+
throw new Error('Unknown encoding ' + encoding);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
exports.PartData = PartData;
|
|
68
|
+
class Base64PartData extends PartData {
|
|
69
|
+
constructor(data) {
|
|
70
|
+
super(Buffer.from(data, 'base64'));
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
exports.Base64PartData = Base64PartData;
|
|
74
|
+
class QuotedPrintablePartData extends PartData {
|
|
75
|
+
constructor(data, charset) {
|
|
76
|
+
const decoded = charset?.toUpperCase() === 'UTF-8' ? utf8.decode(qp.decode(data)) : qp.decode(data);
|
|
77
|
+
super(Buffer.from(decoded));
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
exports.QuotedPrintablePartData = QuotedPrintablePartData;
|
|
81
|
+
class SevenBitPartData extends PartData {
|
|
82
|
+
constructor(data) {
|
|
83
|
+
super(Buffer.from(data));
|
|
84
|
+
}
|
|
85
|
+
toString() {
|
|
86
|
+
return this.buffer.toString('ascii');
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
exports.SevenBitPartData = SevenBitPartData;
|
|
90
|
+
class BinaryPartData extends PartData {
|
|
91
|
+
constructor(data, charset = 'utf-8') {
|
|
92
|
+
super(Buffer.from(data));
|
|
93
|
+
this.charset = charset;
|
|
94
|
+
}
|
|
95
|
+
toString() {
|
|
96
|
+
return iconvlite.decode(this.buffer, this.charset);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
exports.BinaryPartData = BinaryPartData;
|
|
100
|
+
class UuencodedPartData extends PartData {
|
|
101
|
+
constructor(data) {
|
|
102
|
+
const parts = data.split('\n');
|
|
103
|
+
const merged = parts.splice(1, parts.length - 4).join('');
|
|
104
|
+
const decoded = uuencode.decode(merged);
|
|
105
|
+
super(decoded);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
exports.UuencodedPartData = UuencodedPartData;
|
|
109
|
+
//# sourceMappingURL=part-data.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"part-data.js","sourceRoot":"","sources":["../src/part-data.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sDAAwC;AACxC,qDAAuC;AACvC,2CAA6B;AAC7B,mDAAqC;AAErC,MAAsB,QAAQ;IAC7B,YAAqB,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;IAAG,CAAC;IAEvC,QAAQ;QACP,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;IAC/B,CAAC;IAED,MAAM,CAAC,QAAQ,CAAC,IAAY,EAAE,QAAgB,EAAE,OAAgB;QAC/D,IAAI,QAAQ,KAAK,QAAQ,EAAE,CAAC;YAC3B,OAAO,IAAI,cAAc,CAAC,IAAI,CAAC,CAAC;QACjC,CAAC;QAED,IAAI,QAAQ,KAAK,kBAAkB,EAAE,CAAC;YACrC,OAAO,IAAI,uBAAuB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACnD,CAAC;QAED,IAAI,QAAQ,KAAK,MAAM,EAAE,CAAC;YACzB,OAAO,IAAI,gBAAgB,CAAC,IAAI,CAAC,CAAC;QACnC,CAAC;QAED,IAAI,QAAQ,KAAK,MAAM,IAAI,QAAQ,KAAK,QAAQ,EAAE,CAAC;YAClD,OAAO,IAAI,cAAc,CAAC,IAAI,EA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I,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IACpD,CAAC;CACD;AAXD,wCAWC;AAED,MAAa,iBAAkB,SAAQ,QAAQ;IAC9C,YAAY,IAAY;QACvB,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC/B,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAC1D,MAAM,OAAO,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QACxC,KAAK,CAAC,OAAO,CAAC,CAAC;IAChB,CAAC;CACD;AAPD,8CAOC"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { Config, ImapMessageBodyInfo, ImapMessageAttributes } from 'imap';
|
|
2
|
+
export interface ImapSimpleOptions {
|
|
3
|
+
imap: Config;
|
|
4
|
+
onMail?: ((numNewMail: number) => void) | undefined;
|
|
5
|
+
onExpunge?: ((seqNo: number) => void) | undefined;
|
|
6
|
+
onUpdate?: ((seqNo: number, info: {
|
|
7
|
+
num: number | undefined;
|
|
8
|
+
text: unknown;
|
|
9
|
+
}) => void) | undefined;
|
|
10
|
+
}
|
|
11
|
+
export interface MessagePart {
|
|
12
|
+
partID: string;
|
|
13
|
+
encoding: 'BASE64' | 'QUOTED-PRINTABLE' | '7BIT' | '8BIT' | 'BINARY' | 'UUENCODE';
|
|
14
|
+
type: 'TEXT';
|
|
15
|
+
subtype: string;
|
|
16
|
+
params?: {
|
|
17
|
+
charset?: string;
|
|
18
|
+
};
|
|
19
|
+
disposition?: {
|
|
20
|
+
type: string;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export interface MessageBodyPart extends ImapMessageBodyInfo {
|
|
24
|
+
body: string | object;
|
|
25
|
+
}
|
|
26
|
+
export interface Message {
|
|
27
|
+
attributes: ImapMessageAttributes;
|
|
28
|
+
parts: MessageBodyPart[];
|
|
29
|
+
seqNo?: number;
|
|
30
|
+
}
|
|
31
|
+
export type SearchCriteria = string | [string, string];
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|
package/package.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@atom8n/imap",
|
|
3
|
+
"version": "0.16.0",
|
|
4
|
+
"scripts": {
|
|
5
|
+
"clean": "rimraf dist .turbo",
|
|
6
|
+
"dev": "pnpm watch",
|
|
7
|
+
"typecheck": "tsc --noEmit",
|
|
8
|
+
"build": "tsc -p tsconfig.build.json",
|
|
9
|
+
"format": "biome format --write src test",
|
|
10
|
+
"format:check": "biome ci src test",
|
|
11
|
+
"lint": "eslint . --quiet",
|
|
12
|
+
"lint:fix": "eslint . --fix",
|
|
13
|
+
"watch": "tsc -p tsconfig.build.json --watch",
|
|
14
|
+
"test": "vitest run",
|
|
15
|
+
"test:unit": "vitest run",
|
|
16
|
+
"test:dev": "vitest --silent=false"
|
|
17
|
+
},
|
|
18
|
+
"main": "dist/index.js",
|
|
19
|
+
"module": "src/index.ts",
|
|
20
|
+
"types": "dist/index.d.ts",
|
|
21
|
+
"files": [
|
|
22
|
+
"dist/**/*"
|
|
23
|
+
],
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"iconv-lite": "catalog:",
|
|
26
|
+
"imap": "0.8.19",
|
|
27
|
+
"quoted-printable": "1.0.1",
|
|
28
|
+
"utf8": "3.0.0",
|
|
29
|
+
"uuencode": "0.0.4"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"@atom8n/typescript-config": "1.3.0",
|
|
33
|
+
"@atom8n/vitest-config": "1.5.0",
|
|
34
|
+
"@types/imap": "^0.8.40",
|
|
35
|
+
"@types/quoted-printable": "^1.0.2",
|
|
36
|
+
"@types/utf8": "^3.0.3",
|
|
37
|
+
"@types/uuencode": "^0.0.3",
|
|
38
|
+
"vitest-mock-extended": "catalog:"
|
|
39
|
+
}
|
|
40
|
+
}
|