@mavogel/awscdk-rootmail 0.1.24 → 0.1.26
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/.jsii +9 -9
- package/lib/rootmail.js +1 -1
- package/lib/ses-receive.js +1 -1
- package/lib/ses-receive.ops-santa-handler.js +2 -2
- package/node_modules/@aws-sdk/checksums/package.json +3 -3
- package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-cjs/index.js +9 -7
- package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-es/schemas/schemas_0.js +11 -6
- package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-types/commands/DescribeDeliveriesCommand.d.ts +3 -0
- package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-types/commands/DescribeDeliveryDestinationsCommand.d.ts +3 -0
- package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-types/commands/DescribeDeliverySourcesCommand.d.ts +3 -0
- package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-types/commands/PutResourcePolicyCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-types/models/models_0.d.ts +27 -1
- package/node_modules/@aws-sdk/client-cloudwatch-logs/dist-types/ts3.4/models/models_0.d.ts +3 -0
- package/node_modules/@aws-sdk/client-cloudwatch-logs/package.json +4 -4
- package/node_modules/@aws-sdk/client-route-53/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-route-53/package.json +4 -4
- package/node_modules/@aws-sdk/client-s3/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-s3/package.json +7 -7
- package/node_modules/@aws-sdk/client-ses/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-ses/package.json +4 -4
- package/node_modules/@aws-sdk/client-ssm/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-ssm/package.json +4 -4
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +94 -1589
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/index.js +1 -7
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJsonRpcProtocol.js +1 -3
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsRestJsonProtocol.js +1 -3
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/index.d.ts +2 -8
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJson1_0Protocol.d.ts +1 -2
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJson1_1Protocol.d.ts +1 -2
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJsonRpcProtocol.d.ts +2 -3
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsRestJsonProtocol.d.ts +2 -3
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/index.d.ts +10 -10
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJson1_0Protocol.d.ts +1 -2
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJson1_1Protocol.d.ts +1 -2
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJsonRpcProtocol.d.ts +2 -3
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsRestJsonProtocol.d.ts +2 -3
- package/node_modules/@aws-sdk/core/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-env/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-http/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +10 -10
- package/node_modules/@aws-sdk/credential-provider-login/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-node/package.json +8 -8
- package/node_modules/@aws-sdk/credential-provider-process/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +4 -4
- package/node_modules/@aws-sdk/middleware-sdk-s3/package.json +3 -3
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/package.json +3 -3
- package/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +37 -19
- package/node_modules/@aws-sdk/token-providers/dist-es/fromSso.js +37 -19
- package/node_modules/@aws-sdk/token-providers/package.json +4 -4
- package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +1695 -3
- package/node_modules/@smithy/core/dist-es/submodules/protocols/ConfigurableSerdeContext.js +6 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/UnionSerde.js +26 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/common.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/index.js +8 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/json/SmithyRpcV2JsonProtocol.js +102 -0
- package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v1/JsonShapeDeserializer.js +8 -1
- package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v1/JsonShapeSerializer.js +8 -1
- package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.js +13 -2
- package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v2/JsonShapeSerializer2.js +11 -1
- package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/parseJsonBody.js +16 -1
- package/node_modules/@smithy/core/dist-es/submodules/protocols/writeKey.js +3 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/ConfigurableSerdeContext.d.ts +8 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/UnionSerde.d.ts +24 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/common.d.ts +2 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/index.d.ts +9 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/json/JsonSettings.d.ts +13 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/json/SmithyRpcV2JsonProtocol.d.ts +28 -0
- package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/parseJsonBody.d.ts +16 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/writeKey.d.ts +4 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/ConfigurableSerdeContext.d.ts +8 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/UnionSerde.d.ts +24 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/common.d.ts +2 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/index.d.ts +9 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/JsonSettings.d.ts +13 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/SmithyRpcV2JsonProtocol.d.ts +28 -0
- package/node_modules/{@aws-sdk → @smithy}/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonCodec.d.ts +15 -11
- package/node_modules/{@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json → @smithy/core/dist-types/ts3.4/submodules/protocols/json/codec-v1}/JsonSettings.d.ts +7 -4
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonShapeDeserializer.d.ts +14 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonShapeSerializer.d.ts +29 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.d.ts +51 -0
- package/node_modules/{@aws-sdk → @smithy}/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonCodec2.d.ts +13 -9
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.d.ts +30 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonShapeSerializer2.d.ts +60 -0
- package/node_modules/{@aws-sdk → @smithy}/core/dist-types/ts3.4/submodules/protocols/json/detectBufferParsing.d.ts +1 -1
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/jsonReplacer.d.ts +21 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/jsonReviver.d.ts +15 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/needsReviver.d.ts +11 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/parseJsonBody.d.ts +38 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/writeKey.d.ts +4 -0
- package/node_modules/@smithy/core/package.json +2 -1
- package/node_modules/@zone-eu/mailsplit/README.md +43 -54
- package/node_modules/@zone-eu/mailsplit/lib/headers.js +10 -4
- package/node_modules/@zone-eu/mailsplit/lib/message-splitter.js +5 -4
- package/node_modules/@zone-eu/mailsplit/lib/mime-node.d.ts +4 -1
- package/node_modules/@zone-eu/mailsplit/lib/mime-node.js +30 -5
- package/node_modules/@zone-eu/mailsplit/lib/types.d.ts +3 -1
- package/node_modules/@zone-eu/mailsplit/package.json +22 -17
- package/node_modules/libbase64/CHANGELOG.md +20 -0
- package/node_modules/libbase64/README.md +40 -13
- package/node_modules/libbase64/dist/cjs/libbase64.d.ts +80 -0
- package/node_modules/libbase64/dist/cjs/libbase64.js +310 -0
- package/node_modules/libbase64/dist/cjs/package.json +3 -0
- package/node_modules/libbase64/dist/esm/libbase64.d.ts +80 -0
- package/node_modules/libbase64/{lib → dist/esm}/libbase64.js +74 -117
- package/node_modules/libbase64/dist/esm/package.json +3 -0
- package/node_modules/libbase64/package.json +59 -13
- package/node_modules/libmime/CHANGELOG.md +38 -0
- package/node_modules/libmime/README.md +55 -26
- package/node_modules/libmime/SECURITY.md +152 -0
- package/node_modules/libmime/dist/cjs/charset.d.ts +43 -0
- package/node_modules/libmime/dist/cjs/charset.js +135 -0
- package/node_modules/libmime/dist/cjs/charsets.d.ts +2 -0
- package/node_modules/libmime/dist/cjs/charsets.js +213 -0
- package/node_modules/libmime/dist/cjs/get-charset-name.d.ts +1 -0
- package/node_modules/libmime/dist/cjs/get-charset-name.js +224 -0
- package/node_modules/libmime/dist/cjs/libmime.d.ts +218 -0
- package/node_modules/libmime/dist/cjs/libmime.js +1027 -0
- package/node_modules/libmime/dist/cjs/mimetypes.d.ts +7 -0
- package/node_modules/libmime/dist/cjs/mimetypes.js +2072 -0
- package/node_modules/libmime/dist/cjs/package.json +3 -0
- package/node_modules/libmime/dist/cjs/types.d.ts +59 -0
- package/node_modules/libmime/dist/cjs/types.js +4 -0
- package/node_modules/libmime/dist/esm/charset.d.ts +43 -0
- package/node_modules/libmime/dist/esm/charset.js +125 -0
- package/node_modules/libmime/dist/esm/charsets.d.ts +2 -0
- package/node_modules/libmime/{lib → dist/esm}/charsets.js +3 -5
- package/node_modules/libmime/dist/esm/get-charset-name.d.ts +1 -0
- package/node_modules/libmime/{lib → dist/esm}/get-charset-name.js +1 -8
- package/node_modules/libmime/dist/esm/libmime.d.ts +219 -0
- package/node_modules/libmime/{lib → dist/esm}/libmime.js +275 -334
- package/node_modules/libmime/dist/esm/mimetypes.d.ts +7 -0
- package/node_modules/libmime/dist/esm/mimetypes.js +2068 -0
- package/node_modules/libmime/dist/esm/package.json +3 -0
- package/node_modules/libmime/dist/esm/types.d.ts +59 -0
- package/node_modules/libmime/dist/esm/types.js +3 -0
- package/node_modules/libmime/package.json +60 -15
- package/node_modules/libqp/CHANGELOG.md +18 -0
- package/node_modules/libqp/README.md +50 -19
- package/node_modules/libqp/dist/cjs/libqp.d.ts +74 -0
- package/node_modules/libqp/dist/cjs/libqp.js +378 -0
- package/node_modules/libqp/dist/cjs/package.json +3 -0
- package/node_modules/libqp/dist/esm/libqp.d.ts +74 -0
- package/node_modules/libqp/dist/esm/libqp.js +369 -0
- package/node_modules/libqp/dist/esm/package.json +3 -0
- package/node_modules/libqp/lib/libqp.js +4 -383
- package/node_modules/libqp/lib/package.json +3 -0
- package/node_modules/libqp/package.json +62 -6
- package/node_modules/mailparser/CHANGELOG.md +56 -0
- package/node_modules/mailparser/README.md +6 -0
- package/node_modules/mailparser/dist/cjs/index.d.ts +10 -0
- package/node_modules/mailparser/dist/cjs/index.js +12 -0
- package/node_modules/mailparser/dist/cjs/mail-parser.d.ts +98 -0
- package/node_modules/mailparser/dist/cjs/mail-parser.js +1419 -0
- package/node_modules/mailparser/dist/cjs/package.json +3 -0
- package/node_modules/mailparser/dist/cjs/simple-parser.d.ts +17 -0
- package/node_modules/mailparser/dist/cjs/simple-parser.js +133 -0
- package/node_modules/mailparser/dist/cjs/stream-hash.d.ts +24 -0
- package/node_modules/mailparser/dist/cjs/stream-hash.js +33 -0
- package/node_modules/mailparser/dist/cjs/tlds.cjs +8 -0
- package/node_modules/mailparser/dist/cjs/types.d.ts +309 -0
- package/node_modules/mailparser/dist/cjs/types.js +2 -0
- package/node_modules/mailparser/dist/esm/index.d.ts +10 -0
- package/node_modules/mailparser/dist/esm/index.js +4 -0
- package/node_modules/mailparser/dist/esm/mail-parser.d.ts +98 -0
- package/node_modules/mailparser/{lib → dist/esm}/mail-parser.js +302 -368
- package/node_modules/mailparser/dist/esm/package.json +3 -0
- package/node_modules/mailparser/dist/esm/simple-parser.d.ts +17 -0
- package/node_modules/mailparser/{lib → dist/esm}/simple-parser.js +45 -68
- package/node_modules/mailparser/dist/esm/stream-hash.d.ts +24 -0
- package/node_modules/mailparser/{lib → dist/esm}/stream-hash.js +7 -9
- package/node_modules/mailparser/dist/esm/tlds.cjs +8 -0
- package/node_modules/mailparser/dist/esm/types.d.ts +309 -0
- package/node_modules/mailparser/dist/esm/types.js +1 -0
- package/node_modules/mailparser/package.json +88 -17
- package/node_modules/nodemailer/CHANGELOG.md +44 -0
- package/node_modules/nodemailer/dist/cjs/addressparser/index.js +695 -267
- package/node_modules/nodemailer/dist/cjs/mailer/mail-message.js +4 -1
- package/node_modules/nodemailer/dist/cjs/mime-funcs/index.js +8 -2
- package/node_modules/nodemailer/dist/cjs/mime-node/index.js +48 -16
- package/node_modules/nodemailer/dist/cjs/package-info.d.ts +1 -1
- package/node_modules/nodemailer/dist/cjs/package-info.js +1 -1
- package/node_modules/nodemailer/dist/cjs/shared/url.js +22 -5
- package/node_modules/nodemailer/dist/esm/addressparser/index.js +695 -267
- package/node_modules/nodemailer/dist/esm/mailer/mail-message.js +4 -1
- package/node_modules/nodemailer/dist/esm/mime-funcs/index.js +8 -2
- package/node_modules/nodemailer/dist/esm/mime-node/index.js +48 -16
- package/node_modules/nodemailer/dist/esm/package-info.d.ts +1 -1
- package/node_modules/nodemailer/dist/esm/package-info.js +1 -1
- package/node_modules/nodemailer/dist/esm/shared/url.js +22 -5
- package/node_modules/nodemailer/package.json +1 -1
- package/package.json +9 -9
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/codec-v1/JsonSettings.d.ts +0 -7
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonSettings.d.ts +0 -4
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonShapeDeserializer.d.ts +0 -13
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonShapeSerializer.d.ts +0 -18
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.d.ts +0 -27
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.d.ts +0 -15
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonShapeSerializer2.d.ts +0 -39
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/jsonReplacer.d.ts +0 -7
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/jsonReviver.d.ts +0 -7
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/needsReviver.d.ts +0 -2
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/parseJsonBody.d.ts +0 -14
- package/node_modules/libbase64/.eslintrc +0 -11
- package/node_modules/libbase64/.github/FUNDING.yml +0 -4
- package/node_modules/libbase64/.github/VULNERABILITY_REPORT.yml +0 -75
- package/node_modules/libbase64/.github/workflows/release.yaml +0 -39
- package/node_modules/libbase64/.github/workflows/test.yml +0 -21
- package/node_modules/libbase64/.ncurc.js +0 -13
- package/node_modules/libbase64/.prettierrc.js +0 -8
- package/node_modules/libmime/lib/charset.js +0 -131
- package/node_modules/libmime/lib/mimetypes.js +0 -2049
- package/node_modules/libqp/.eslintrc +0 -15
- package/node_modules/libqp/.github/FUNDING.yml +0 -4
- package/node_modules/libqp/.github/VULNERABILITY_REPORT.yml +0 -75
- package/node_modules/libqp/.github/workflows/release.yaml +0 -39
- package/node_modules/libqp/.github/workflows/test.yml +0 -21
- package/node_modules/libqp/.prettierrc.js +0 -8
- package/node_modules/libqp/test/libqp-test.js +0 -366
- package/node_modules/mailparser/.gitattributes +0 -1
- package/node_modules/mailparser/.prettierignore +0 -3
- package/node_modules/mailparser/.prettierrc.js +0 -10
- package/node_modules/mailparser/.release-please-manifest.json +0 -3
- package/node_modules/mailparser/eslint.config.js +0 -33
- package/node_modules/mailparser/index.js +0 -9
- package/node_modules/mailparser/release-please-config.json +0 -10
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/JsonSettings.js +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v1/JsonCodec.js +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v1/JsonSettings.js +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.js +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v2/JsonCodec2.js +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/detectBufferParsing.js +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/jsonReplacer.js +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/jsonReviver.js +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/needsReviver.js +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/codec-v1/JsonCodec.d.ts +0 -0
- /package/node_modules/{@aws-sdk/core/dist-types/submodules/protocols/json → @smithy/core/dist-types/submodules/protocols/json/codec-v1}/JsonSettings.d.ts +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/codec-v1/JsonShapeDeserializer.d.ts +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/codec-v1/JsonShapeSerializer.d.ts +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.d.ts +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/codec-v2/JsonCodec2.d.ts +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.d.ts +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/codec-v2/JsonShapeSerializer2.d.ts +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/detectBufferParsing.d.ts +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/jsonReplacer.d.ts +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/jsonReviver.d.ts +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/needsReviver.d.ts +0 -0
|
@@ -1,385 +1,6 @@
|
|
|
1
|
-
/* eslint no-useless-escape: 0 */
|
|
2
|
-
|
|
3
1
|
'use strict';
|
|
4
2
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Encodes a Buffer into a Quoted-Printable encoded string
|
|
11
|
-
*
|
|
12
|
-
* @param {Buffer} buffer Buffer to convert
|
|
13
|
-
* @returns {String} Quoted-Printable encoded string
|
|
14
|
-
*/
|
|
15
|
-
function encode(buffer) {
|
|
16
|
-
if (typeof buffer === 'string') {
|
|
17
|
-
buffer = Buffer.from(buffer, 'utf-8');
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
return encodeBytes(buffer, true);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Encodes the bytes of a Buffer. The Encoder stream feeds it one chunk at a time, so it has
|
|
25
|
-
* to be told whether the first byte starts an output line, which a plain encode() call always does
|
|
26
|
-
*
|
|
27
|
-
* @param {Buffer} buffer Buffer to convert
|
|
28
|
-
* @param {Boolean} lineStart True if the first byte starts a line
|
|
29
|
-
* @returns {String} Quoted-Printable encoded string
|
|
30
|
-
*/
|
|
31
|
-
function encodeBytes(buffer, lineStart) {
|
|
32
|
-
// usable characters that do not need encoding
|
|
33
|
-
let ranges = [
|
|
34
|
-
// https://tools.ietf.org/html/rfc2045#section-6.7
|
|
35
|
-
[0x09], // <TAB>
|
|
36
|
-
[0x0a], // <LF>
|
|
37
|
-
[0x0d], // <CR>
|
|
38
|
-
[0x20, 0x3c], // <SP>!"#$%&'()*+,-./0123456789:;
|
|
39
|
-
[0x3e, 0x7e] // >?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}
|
|
40
|
-
];
|
|
41
|
-
let result = '';
|
|
42
|
-
let ord;
|
|
43
|
-
|
|
44
|
-
for (let i = 0, len = buffer.length; i < len; i++) {
|
|
45
|
-
ord = buffer[i];
|
|
46
|
-
// if the char is in allowed range, then keep as is, unless it is a ws in the end of a line
|
|
47
|
-
// or a hyphen in the start of a line. A line starting with two hyphens reads as a MIME
|
|
48
|
-
// boundary delimiter, so a decoded body that gets encoded again could inject a part
|
|
49
|
-
if (
|
|
50
|
-
checkRanges(ord, ranges) &&
|
|
51
|
-
!((ord === 0x20 || ord === 0x09) && (i === len - 1 || buffer[i + 1] === 0x0a || buffer[i + 1] === 0x0d)) &&
|
|
52
|
-
!(ord === 0x2d && (i === 0 ? lineStart : buffer[i - 1] === 0x0a))
|
|
53
|
-
) {
|
|
54
|
-
result += String.fromCharCode(ord);
|
|
55
|
-
continue;
|
|
56
|
-
}
|
|
57
|
-
result += '=' + (ord < 0x10 ? '0' : '') + ord.toString(16).toUpperCase();
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
return result;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
/**
|
|
64
|
-
* Decodes a Quoted-Printable encoded string to a Buffer object
|
|
65
|
-
*
|
|
66
|
-
* @param {String|Buffer} str Quoted-Printable encoded string. A Buffer is read byte for byte,
|
|
67
|
-
* so raw 8-bit bytes in the input are copied to the output unchanged
|
|
68
|
-
* @returns {Buffer} Decoded value
|
|
69
|
-
*/
|
|
70
|
-
function decode(str) {
|
|
71
|
-
// 'binary' maps every byte to one char code 0-255. A UTF-8 read would collapse raw
|
|
72
|
-
// multi-byte chars into one byte below and turn raw latin1 bytes into U+FFFD
|
|
73
|
-
str = (Buffer.isBuffer(str) ? str.toString('binary') : (str || '').toString())
|
|
74
|
-
// remove invalid whitespace from the end of lines. The leading group keeps this linear,
|
|
75
|
-
// a plain /[\t ]+$/gm rescans the rest of a whitespace run from every position inside it,
|
|
76
|
-
// which is quadratic. The lookahead lists the line terminators multiline $ matches before
|
|
77
|
-
.replace(/(^|[^ \t])[ \t]+(?=[\n\r\u2028\u2029]|$)/g, '$1')
|
|
78
|
-
// remove soft line breaks
|
|
79
|
-
.replace(/\=(?:\r?\n|$)/g, '');
|
|
80
|
-
|
|
81
|
-
// every =XX escape decodes into one byte, so count them to size the output.
|
|
82
|
-
// Counted with a loop, a match() would build an array with a string for every escape
|
|
83
|
-
let len = str.length;
|
|
84
|
-
let encodedBytesCount = 0;
|
|
85
|
-
for (let i = str.indexOf('='); i >= 0 && i < len - 2; i = str.indexOf('=', i + 1)) {
|
|
86
|
-
if (hexValue(str.charCodeAt(i + 1)) >= 0 && hexValue(str.charCodeAt(i + 2)) >= 0) {
|
|
87
|
-
encodedBytesCount++;
|
|
88
|
-
i += 2;
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
let buffer = Buffer.alloc(len - encodedBytesCount * 2);
|
|
93
|
-
let bufferPos = 0;
|
|
94
|
-
|
|
95
|
-
for (let i = 0; i < len; i++) {
|
|
96
|
-
let code = str.charCodeAt(i);
|
|
97
|
-
if (code === 0x3d /* = */ && i < len - 2) {
|
|
98
|
-
let hi = hexValue(str.charCodeAt(i + 1));
|
|
99
|
-
let lo = hexValue(str.charCodeAt(i + 2));
|
|
100
|
-
if (hi >= 0 && lo >= 0) {
|
|
101
|
-
buffer[bufferPos++] = hi * 16 + lo;
|
|
102
|
-
i += 2;
|
|
103
|
-
continue;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
buffer[bufferPos++] = code;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
return buffer;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
* Helper function to read the value of a hex digit
|
|
114
|
-
*
|
|
115
|
-
* @param {Number} code Char code
|
|
116
|
-
* @returns {Number} 0-15, or -1 if the char is not a hex digit
|
|
117
|
-
*/
|
|
118
|
-
function hexValue(code) {
|
|
119
|
-
if (code >= 0x30 && code <= 0x39) {
|
|
120
|
-
return code - 0x30; // 0-9
|
|
121
|
-
}
|
|
122
|
-
if (code >= 0x41 && code <= 0x46) {
|
|
123
|
-
return code - 0x41 + 10; // A-F
|
|
124
|
-
}
|
|
125
|
-
if (code >= 0x61 && code <= 0x66) {
|
|
126
|
-
return code - 0x61 + 10; // a-f
|
|
127
|
-
}
|
|
128
|
-
return -1;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* Adds soft line breaks to a Quoted-Printable string
|
|
133
|
-
*
|
|
134
|
-
* @param {String} str Quoted-Printable encoded string that might need line wrapping
|
|
135
|
-
* @param {Number} [lineLength=76] Maximum allowed length for a line
|
|
136
|
-
* @returns {String} Soft-wrapped Quoted-Printable encoded string
|
|
137
|
-
*/
|
|
138
|
-
function wrap(str, lineLength) {
|
|
139
|
-
str = (str || '').toString();
|
|
140
|
-
lineLength = lineLength || 76;
|
|
141
|
-
|
|
142
|
-
if (str.length <= lineLength) {
|
|
143
|
-
return str;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
let pos = 0,
|
|
147
|
-
len = str.length,
|
|
148
|
-
match,
|
|
149
|
-
code,
|
|
150
|
-
line,
|
|
151
|
-
maxLength,
|
|
152
|
-
afterSoftBreak = false,
|
|
153
|
-
lineMargin = Math.floor(lineLength / 3),
|
|
154
|
-
result = '';
|
|
155
|
-
|
|
156
|
-
// insert soft linebreaks where needed
|
|
157
|
-
while (pos < len) {
|
|
158
|
-
maxLength = lineLength;
|
|
159
|
-
|
|
160
|
-
if (afterSoftBreak) {
|
|
161
|
-
afterSoftBreak = false;
|
|
162
|
-
// a line started by a soft break must not begin with a hyphen either, see encode().
|
|
163
|
-
// The escape takes the room of three characters off this line
|
|
164
|
-
if (str.charAt(pos) === '-') {
|
|
165
|
-
result += '=2D';
|
|
166
|
-
pos++;
|
|
167
|
-
maxLength -= 3;
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
line = str.substr(pos, maxLength);
|
|
172
|
-
if ((match = line.match(/\r\n/))) {
|
|
173
|
-
line = line.substr(0, match.index + match[0].length);
|
|
174
|
-
result += line;
|
|
175
|
-
pos += line.length;
|
|
176
|
-
continue;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
if (line.substr(-1) === '\n') {
|
|
180
|
-
// nothing to change here
|
|
181
|
-
result += line;
|
|
182
|
-
pos += line.length;
|
|
183
|
-
continue;
|
|
184
|
-
} else if ((match = line.substr(-lineMargin).match(/\n.*?$/))) {
|
|
185
|
-
// truncate to nearest line break
|
|
186
|
-
line = line.substr(0, line.length - (match[0].length - 1));
|
|
187
|
-
result += line;
|
|
188
|
-
pos += line.length;
|
|
189
|
-
continue;
|
|
190
|
-
} else if (line.length > maxLength - lineMargin && (match = line.substr(-lineMargin).match(/[ \t\.,!\?][^ \t\.,!\?]*$/))) {
|
|
191
|
-
// truncate to nearest space
|
|
192
|
-
line = line.substr(0, line.length - (match[0].length - 1));
|
|
193
|
-
} else if (line.match(/\=[\da-f]{0,2}$/i)) {
|
|
194
|
-
// push incomplete encoding sequences to the next line
|
|
195
|
-
if ((match = line.match(/\=[\da-f]{0,1}$/i))) {
|
|
196
|
-
line = line.substr(0, line.length - match[0].length);
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
// ensure that utf-8 sequences are not split
|
|
200
|
-
while (line.length > 3 && line.length < len - pos && !line.match(/^(?:=[\da-f]{2}){1,4}$/i) && (match = line.match(/\=[\da-f]{2}$/gi))) {
|
|
201
|
-
code = parseInt(match[0].substr(1, 2), 16);
|
|
202
|
-
if (code < 128) {
|
|
203
|
-
break;
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
line = line.substr(0, line.length - 3);
|
|
207
|
-
|
|
208
|
-
if (code >= 0xc0) {
|
|
209
|
-
break;
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
if (pos + line.length < len && line.substr(-1) !== '\n') {
|
|
215
|
-
if (line.length === maxLength && line.match(/\=[\da-f]{2}$/i)) {
|
|
216
|
-
line = line.substr(0, line.length - 3);
|
|
217
|
-
} else if (line.length === maxLength) {
|
|
218
|
-
line = line.substr(0, line.length - 1);
|
|
219
|
-
}
|
|
220
|
-
pos += line.length;
|
|
221
|
-
line += '=\r\n';
|
|
222
|
-
afterSoftBreak = true;
|
|
223
|
-
} else {
|
|
224
|
-
pos += line.length;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
result += line;
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
return result;
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
/**
|
|
234
|
-
* Helper function to check if a number is inside provided ranges
|
|
235
|
-
*
|
|
236
|
-
* @param {Number} nr Number to check for
|
|
237
|
-
* @param {Array} ranges An Array of allowed values
|
|
238
|
-
* @returns {Boolean} True if the value was found inside allowed ranges, false otherwise
|
|
239
|
-
*/
|
|
240
|
-
function checkRanges(nr, ranges) {
|
|
241
|
-
for (let i = ranges.length - 1; i >= 0; i--) {
|
|
242
|
-
if (!ranges[i].length) {
|
|
243
|
-
continue;
|
|
244
|
-
}
|
|
245
|
-
if (ranges[i].length === 1 && nr === ranges[i][0]) {
|
|
246
|
-
return true;
|
|
247
|
-
}
|
|
248
|
-
if (ranges[i].length === 2 && nr >= ranges[i][0] && nr <= ranges[i][1]) {
|
|
249
|
-
return true;
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
return false;
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
/**
|
|
256
|
-
* Creates a transform stream for encoding data to Quoted-Printable encoding
|
|
257
|
-
*
|
|
258
|
-
* @constructor
|
|
259
|
-
* @param {Object} options Stream options
|
|
260
|
-
* @param {Number} [options.lineLength=76] Maximum lenght for lines, set to false to disable wrapping
|
|
261
|
-
*/
|
|
262
|
-
class Encoder extends Transform {
|
|
263
|
-
constructor(options) {
|
|
264
|
-
super();
|
|
265
|
-
|
|
266
|
-
// init Transform
|
|
267
|
-
this.options = options || {};
|
|
268
|
-
|
|
269
|
-
if (this.options.lineLength !== false) {
|
|
270
|
-
this.options.lineLength = this.options.lineLength || 76;
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
this._curLine = '';
|
|
274
|
-
// true until a chunk that does not end with a line break has been encoded
|
|
275
|
-
this._lineStart = true;
|
|
276
|
-
|
|
277
|
-
this.inputBytes = 0;
|
|
278
|
-
this.outputBytes = 0;
|
|
279
|
-
|
|
280
|
-
Transform.call(this, this.options);
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
_transform(chunk, encoding, done) {
|
|
284
|
-
let qp;
|
|
285
|
-
|
|
286
|
-
if (encoding !== 'buffer') {
|
|
287
|
-
chunk = Buffer.from(chunk, encoding);
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
if (!chunk || !chunk.length) {
|
|
291
|
-
return done();
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
this.inputBytes += chunk.length;
|
|
295
|
-
|
|
296
|
-
let lineStart = this._lineStart;
|
|
297
|
-
this._lineStart = chunk[chunk.length - 1] === 0x0a;
|
|
298
|
-
|
|
299
|
-
if (this.options.lineLength) {
|
|
300
|
-
qp = this._curLine + encodeBytes(chunk, lineStart);
|
|
301
|
-
qp = wrap(qp, this.options.lineLength);
|
|
302
|
-
qp = qp.replace(/(^|\n)([^\n]*)$/, (match, lineBreak, lastLine) => {
|
|
303
|
-
this._curLine = lastLine;
|
|
304
|
-
return lineBreak;
|
|
305
|
-
});
|
|
306
|
-
|
|
307
|
-
if (qp) {
|
|
308
|
-
this.outputBytes += qp.length;
|
|
309
|
-
this.push(qp);
|
|
310
|
-
}
|
|
311
|
-
} else {
|
|
312
|
-
qp = encodeBytes(chunk, lineStart);
|
|
313
|
-
this.outputBytes += qp.length;
|
|
314
|
-
this.push(qp, 'ascii');
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
done();
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
_flush(done) {
|
|
321
|
-
if (this._curLine) {
|
|
322
|
-
this.outputBytes += this._curLine.length;
|
|
323
|
-
this.push(this._curLine, 'ascii');
|
|
324
|
-
}
|
|
325
|
-
done();
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
/**
|
|
330
|
-
* Creates a transform stream for decoding Quoted-Printable encoded strings
|
|
331
|
-
* The input is not actually processed as a stream but concatted and processed as a single input
|
|
332
|
-
*
|
|
333
|
-
* @constructor
|
|
334
|
-
* @param {Object} options Stream options
|
|
335
|
-
*/
|
|
336
|
-
class Decoder extends Transform {
|
|
337
|
-
constructor(options) {
|
|
338
|
-
options = options || {};
|
|
339
|
-
super(options);
|
|
340
|
-
|
|
341
|
-
// init Transform
|
|
342
|
-
this.options = options;
|
|
343
|
-
this._curLine = '';
|
|
344
|
-
|
|
345
|
-
this.inputBytes = 0;
|
|
346
|
-
this.outputBytes = 0;
|
|
347
|
-
|
|
348
|
-
this.qpChunks = [];
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
_transform(chunk, encoding, done) {
|
|
352
|
-
if (!chunk || !chunk.length) {
|
|
353
|
-
return done();
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
if (typeof chunk === 'string') {
|
|
357
|
-
chunk = Buffer.from(chunk, encoding);
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
// kept as a binary string, so joining the chunks is the only copy made before decoding
|
|
361
|
-
this.qpChunks.push(chunk.toString('binary'));
|
|
362
|
-
this.inputBytes += chunk.length;
|
|
363
|
-
|
|
364
|
-
done();
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
_flush(done) {
|
|
368
|
-
if (this.inputBytes) {
|
|
369
|
-
let buf = decode(this.qpChunks.join(''));
|
|
370
|
-
this.outputBytes += buf.length;
|
|
371
|
-
this.push(buf);
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
done();
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
// expose to the world
|
|
379
|
-
module.exports = {
|
|
380
|
-
encode,
|
|
381
|
-
decode,
|
|
382
|
-
wrap,
|
|
383
|
-
Encoder,
|
|
384
|
-
Decoder
|
|
385
|
-
};
|
|
3
|
+
// The pre-TypeScript entry point. Node resolves `libqp/lib/libqp` through the exports map and
|
|
4
|
+
// never loads this file, but resolvers that look for the path on disk and ignore the exports map
|
|
5
|
+
// (webpack 4, browserify, and @yao/pkg, which warns about the import without it) still find it.
|
|
6
|
+
module.exports = require('../dist/cjs/libqp.js');
|
|
@@ -1,11 +1,55 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "libqp",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"description": "Encode and decode quoted-printable strings according to rfc2045",
|
|
5
|
-
"
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/cjs/libqp.js",
|
|
7
|
+
"types": "./dist/cjs/libqp.d.ts",
|
|
8
|
+
"typesVersions": {
|
|
9
|
+
"*": {
|
|
10
|
+
"lib/*": [
|
|
11
|
+
"dist/cjs/*.d.ts"
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"import": "./dist/esm/libqp.js",
|
|
18
|
+
"require": "./dist/cjs/libqp.js"
|
|
19
|
+
},
|
|
20
|
+
"./lib/libqp.js": {
|
|
21
|
+
"import": "./dist/esm/libqp.js",
|
|
22
|
+
"require": "./dist/cjs/libqp.js"
|
|
23
|
+
},
|
|
24
|
+
"./lib/libqp": {
|
|
25
|
+
"import": "./dist/esm/libqp.js",
|
|
26
|
+
"require": "./dist/cjs/libqp.js"
|
|
27
|
+
},
|
|
28
|
+
"./package.json": "./package.json"
|
|
29
|
+
},
|
|
30
|
+
"files": [
|
|
31
|
+
"dist",
|
|
32
|
+
"lib",
|
|
33
|
+
"CHANGELOG.md",
|
|
34
|
+
"SECURITY.md"
|
|
35
|
+
],
|
|
6
36
|
"scripts": {
|
|
7
|
-
"
|
|
8
|
-
"
|
|
37
|
+
"build": "node scripts/build.js",
|
|
38
|
+
"typecheck": "tsc -p tsconfig.json",
|
|
39
|
+
"pretest": "npm run build",
|
|
40
|
+
"test": "node --import tsx --test $(find test -name '*-test.ts')",
|
|
41
|
+
"pretest:coverage": "npm run build",
|
|
42
|
+
"test:coverage": "c8 node --import tsx --test $(find test -name '*-test.ts')",
|
|
43
|
+
"pretest:bun": "npm run build",
|
|
44
|
+
"test:bun": "bun test --timeout 60000 $(find ./test -name '*-test.ts')",
|
|
45
|
+
"format": "prettier --write \"**/*.{js,cjs,ts,json,md,yml,yaml}\"",
|
|
46
|
+
"format:check": "prettier --check \"**/*.{js,cjs,ts,json,md,yml,yaml}\"",
|
|
47
|
+
"lint": "npm run typecheck && eslint .",
|
|
48
|
+
"lint:fix": "eslint . --fix",
|
|
49
|
+
"prepare": "npm run build",
|
|
50
|
+
"update": "rm -rf node_modules package-lock.json && ncu -u && npm install",
|
|
51
|
+
"test:mutation": "node scripts/mutation-test.js",
|
|
52
|
+
"test:fuzz": "FUZZ_ITERATIONS=${FUZZ_ITERATIONS:-20000} FUZZ_SEED=${FUZZ_SEED:-random} node --import tsx --test test/property-test.ts test/legacy-test.ts"
|
|
9
53
|
},
|
|
10
54
|
"repository": {
|
|
11
55
|
"type": "git",
|
|
@@ -22,7 +66,19 @@
|
|
|
22
66
|
},
|
|
23
67
|
"homepage": "https://github.com/nodemailer/libqp",
|
|
24
68
|
"devDependencies": {
|
|
25
|
-
"
|
|
26
|
-
"
|
|
69
|
+
"@types/node": "20.19.43",
|
|
70
|
+
"c8": "12.0.0",
|
|
71
|
+
"eslint": "10.13.0",
|
|
72
|
+
"eslint-config-prettier": "10.1.8",
|
|
73
|
+
"fast-check": "4.10.2",
|
|
74
|
+
"globals": "17.13.0",
|
|
75
|
+
"libqp-legacy": "npm:libqp@2.1.3",
|
|
76
|
+
"prettier": "3.9.10",
|
|
77
|
+
"tsx": "4.23.15",
|
|
78
|
+
"typescript": "6.0.3",
|
|
79
|
+
"typescript-eslint": "8.71.2"
|
|
80
|
+
},
|
|
81
|
+
"engines": {
|
|
82
|
+
"node": ">=20.0.0"
|
|
27
83
|
}
|
|
28
84
|
}
|
|
@@ -1,5 +1,61 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [3.10.0](https://github.com/nodemailer/mailparser/compare/v3.9.47...v3.10.0) (2026-10-19)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* migrate to TypeScript with ES module and CommonJS builds ([1d9b23c](https://github.com/nodemailer/mailparser/commit/1d9b23c9fb4d760f4036a5416e4178cdfac07a0a))
|
|
9
|
+
|
|
10
|
+
## [3.9.47](https://github.com/nodemailer/mailparser/compare/v3.9.46...v3.9.47) (2026-10-19)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* bump libmime to 5.5.2 ([7df8fed](https://github.com/nodemailer/mailparser/commit/7df8fedfd28efd23f76b5efb3d23d46b43c65ea9))
|
|
16
|
+
|
|
17
|
+
## [3.9.46](https://github.com/nodemailer/mailparser/compare/v3.9.45...v3.9.46) (2026-10-18)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* bump libmime to 5.5.1, @zone-eu/mailsplit to 5.4.26 and nodemailer to 10.1.7 ([7279da5](https://github.com/nodemailer/mailparser/commit/7279da5c906cc7c155bdee16e6f10327d8e054ff))
|
|
23
|
+
|
|
24
|
+
## [3.9.45](https://github.com/nodemailer/mailparser/compare/v3.9.44...v3.9.45) (2026-10-18)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Bug Fixes
|
|
28
|
+
|
|
29
|
+
* bump nodemailer to 10.1.6 ([2815d34](https://github.com/nodemailer/mailparser/commit/2815d34e689c4b78b2e2633ae5e4b97fa7e24ebf))
|
|
30
|
+
|
|
31
|
+
## [3.9.44](https://github.com/nodemailer/mailparser/compare/v3.9.43...v3.9.44) (2026-10-18)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
### Bug Fixes
|
|
35
|
+
|
|
36
|
+
* bump nodemailer to 10.1.5 ([218b801](https://github.com/nodemailer/mailparser/commit/218b8014016eb79969788b92b8981f49c799a05e))
|
|
37
|
+
|
|
38
|
+
## [3.9.43](https://github.com/nodemailer/mailparser/compare/v3.9.42...v3.9.43) (2026-10-18)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
### Bug Fixes
|
|
42
|
+
|
|
43
|
+
* bump nodemailer to 10.1.4 ([3c68409](https://github.com/nodemailer/mailparser/commit/3c68409192cc34299ddc2479a1429ec218c1a4b9))
|
|
44
|
+
|
|
45
|
+
## [3.9.42](https://github.com/nodemailer/mailparser/compare/v3.9.41...v3.9.42) (2026-10-18)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
### Bug Fixes
|
|
49
|
+
|
|
50
|
+
* bump @zone-eu/mailsplit to 5.4.25 ([e4500fb](https://github.com/nodemailer/mailparser/commit/e4500fbd7cc5e0e0b1f070332bf797a5e331e5c7))
|
|
51
|
+
|
|
52
|
+
## [3.9.41](https://github.com/nodemailer/mailparser/compare/v3.9.40...v3.9.41) (2026-10-18)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
### Bug Fixes
|
|
56
|
+
|
|
57
|
+
* bump @zone-eu/mailsplit to 5.4.24 ([eb4b34b](https://github.com/nodemailer/mailparser/commit/eb4b34b04b18de974a3bd61c295d2abca1eb0d69))
|
|
58
|
+
|
|
3
59
|
## [3.9.40](https://github.com/nodemailer/mailparser/compare/v3.9.39...v3.9.40) (2026-10-16)
|
|
4
60
|
|
|
5
61
|
|
|
@@ -21,6 +21,12 @@ next import the `mailparser` object into your script:
|
|
|
21
21
|
const mailparser = require('mailparser');
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
+
or, from an ES module or TypeScript (type declarations are included):
|
|
25
|
+
|
|
26
|
+
```js
|
|
27
|
+
import { simpleParser, MailParser } from 'mailparser';
|
|
28
|
+
```
|
|
29
|
+
|
|
24
30
|
## Usage
|
|
25
31
|
|
|
26
32
|
See [mailparser homepage](https://nodemailer.com/extras/mailparser/) for documentation and terms.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import MailParser from './mail-parser.js';
|
|
2
|
+
import simpleParser from './simple-parser.js';
|
|
3
|
+
export { MailParser, simpleParser };
|
|
4
|
+
export type { SimpleParserCallback } from './simple-parser.js';
|
|
5
|
+
export type * from './types.js';
|
|
6
|
+
declare const _default: {
|
|
7
|
+
MailParser: typeof MailParser;
|
|
8
|
+
simpleParser: typeof simpleParser;
|
|
9
|
+
};
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.simpleParser = exports.MailParser = void 0;
|
|
7
|
+
const mail_parser_js_1 = __importDefault(require("./mail-parser.js"));
|
|
8
|
+
exports.MailParser = mail_parser_js_1.default;
|
|
9
|
+
const simple_parser_js_1 = __importDefault(require("./simple-parser.js"));
|
|
10
|
+
exports.simpleParser = simple_parser_js_1.default;
|
|
11
|
+
exports.default = { MailParser: mail_parser_js_1.default, simpleParser: simple_parser_js_1.default };
|
|
12
|
+
Object.defineProperty(exports, 'default', { value: exports, enumerable: false, writable: true, configurable: true });
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { Transform } from 'node:stream';
|
|
2
|
+
import type { TransformCallback } from 'node:stream';
|
|
3
|
+
import type { AddressObject, AttachmentStream, EmailAddress, HeaderLines, Headers, MailParserOptions, MessageText } from './types.js';
|
|
4
|
+
/**
|
|
5
|
+
* A lower level, streaming e-mail parser. It is a Transform stream: write the raw message in and
|
|
6
|
+
* read the parsed content out. It emits:
|
|
7
|
+
*
|
|
8
|
+
* - a `headers` event with the parsed headers of the message (see {@link Headers}),
|
|
9
|
+
* - a `headerLines` event with the raw header lines,
|
|
10
|
+
* - an {@link AttachmentStream} object for every attachment, whose content stream has to be read
|
|
11
|
+
* and `release()` called before the parser continues,
|
|
12
|
+
* - one {@link MessageText} object with the text content at the end.
|
|
13
|
+
*
|
|
14
|
+
* For one-shot parsing into a single object, use `simpleParser` instead.
|
|
15
|
+
*/
|
|
16
|
+
declare class MailParser extends Transform {
|
|
17
|
+
/** The options the parser was created with. */
|
|
18
|
+
options: MailParserOptions;
|
|
19
|
+
/** The parsed headers of the message, `false` until they have been parsed. */
|
|
20
|
+
headers: Headers | false;
|
|
21
|
+
/** The raw header lines of the message, `false` until they have been parsed. */
|
|
22
|
+
headerLines: HeaderLines | false;
|
|
23
|
+
/** The plain text content, `false` until the message has been parsed or when there is none. */
|
|
24
|
+
text: string | false;
|
|
25
|
+
/** The HTML content, `false` until the message has been parsed or when there is none. */
|
|
26
|
+
html: string | false;
|
|
27
|
+
/** The plain text content as HTML, `false` until the message has been parsed or when there is none. */
|
|
28
|
+
textAsHtml: string | false;
|
|
29
|
+
/** The `Subject` header, set once the headers have been parsed. */
|
|
30
|
+
subject?: string;
|
|
31
|
+
/** The `References` header, set once the headers have been parsed. */
|
|
32
|
+
references?: string | string[];
|
|
33
|
+
/** The `Date` header, set once the headers have been parsed. */
|
|
34
|
+
date?: Date;
|
|
35
|
+
/** The `To` header, set once the headers have been parsed. */
|
|
36
|
+
to?: AddressObject | AddressObject[];
|
|
37
|
+
/** The `From` header, set once the headers have been parsed. */
|
|
38
|
+
from?: AddressObject;
|
|
39
|
+
/** The `Cc` header, set once the headers have been parsed. */
|
|
40
|
+
cc?: AddressObject | AddressObject[];
|
|
41
|
+
/** The `Bcc` header, set once the headers have been parsed. */
|
|
42
|
+
bcc?: AddressObject | AddressObject[];
|
|
43
|
+
/** The `Message-ID` header, set once the headers have been parsed. */
|
|
44
|
+
messageId?: string;
|
|
45
|
+
/** The `In-Reply-To` header, set once the headers have been parsed. */
|
|
46
|
+
inReplyTo?: string;
|
|
47
|
+
/** The `Reply-To` header, set once the headers have been parsed. */
|
|
48
|
+
replyTo?: AddressObject;
|
|
49
|
+
constructor(config?: MailParserOptions);
|
|
50
|
+
_transform(chunk: Buffer, encoding: BufferEncoding, done: TransformCallback): void;
|
|
51
|
+
_flush(done: TransformCallback): void;
|
|
52
|
+
/**
|
|
53
|
+
* Turns a `Priority`, `X-Priority`, `X-MSMail-Priority` or `Importance` header value into
|
|
54
|
+
* `'high'`, `'normal'` or `'low'`.
|
|
55
|
+
*/
|
|
56
|
+
parsePriority(value: string): 'high' | 'normal' | 'low';
|
|
57
|
+
/**
|
|
58
|
+
* Wraps a Message-ID in angle brackets where they are missing. Returns `false` for an empty value.
|
|
59
|
+
*/
|
|
60
|
+
ensureMessageIDFormat(value: string): string | false;
|
|
61
|
+
/**
|
|
62
|
+
* Formats parsed addresses for an HTML context, every value HTML-escaped.
|
|
63
|
+
*/
|
|
64
|
+
getAddressesHTML(value: EmailAddress | EmailAddress[]): string;
|
|
65
|
+
/**
|
|
66
|
+
* Formats parsed addresses as plain text, display names quoted.
|
|
67
|
+
*/
|
|
68
|
+
getAddressesText(value: EmailAddress | EmailAddress[]): string;
|
|
69
|
+
/**
|
|
70
|
+
* Replaces `cid:` links to image attachments in the HTML content. Call it once the parser has
|
|
71
|
+
* ended. `replaceCallback` is called once for every referenced image attachment and answers with
|
|
72
|
+
* the URL to use instead; `done` gets the updated HTML, or `false` when the message has no HTML.
|
|
73
|
+
* The total length of the URLs written is bounded by `maxInlinedImagesSize`.
|
|
74
|
+
*/
|
|
75
|
+
updateImageLinks(replaceCallback: (attachment: AttachmentStream, callback: (err: Error | null | false | undefined, url?: string) => void) => void, done: (err: Error | null, html?: string | false) => void): void;
|
|
76
|
+
/**
|
|
77
|
+
* Converts plain text to HTML the way `textAsHtml` is built: HTML-escaped, paragraphs and line
|
|
78
|
+
* breaks kept, and links turned into anchors unless `skipTextLinks` is set. Returns an empty
|
|
79
|
+
* string when `skipTextToHtml` is set.
|
|
80
|
+
*/
|
|
81
|
+
textToHtml(str: string): string;
|
|
82
|
+
}
|
|
83
|
+
interface MailParser {
|
|
84
|
+
/** Emitted once with the parsed headers of the message. */
|
|
85
|
+
on(event: 'headers', listener: (headers: Headers) => void): this;
|
|
86
|
+
/** Emitted once with the raw header lines of the message. */
|
|
87
|
+
on(event: 'headerLines', listener: (headerLines: HeaderLines) => void): this;
|
|
88
|
+
/** Emitted for every attachment and, at the end, once for the text content. */
|
|
89
|
+
on(event: 'data', listener: (data: AttachmentStream | MessageText) => void): this;
|
|
90
|
+
on(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
91
|
+
once(event: 'headers', listener: (headers: Headers) => void): this;
|
|
92
|
+
once(event: 'headerLines', listener: (headerLines: HeaderLines) => void): this;
|
|
93
|
+
once(event: 'data', listener: (data: AttachmentStream | MessageText) => void): this;
|
|
94
|
+
once(event: string | symbol, listener: (...args: any[]) => void): this;
|
|
95
|
+
/** Returns the next attachment or text content object, or `null` when none is buffered. */
|
|
96
|
+
read(size?: number): AttachmentStream | MessageText | null;
|
|
97
|
+
}
|
|
98
|
+
export default MailParser;
|