@mavogel/awscdk-rootmail 0.0.22 → 0.0.23
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 +3 -3
- package/API.md +11 -13
- package/README.md +13 -15
- package/lib/rootmail.js +1 -1
- package/lib/ses-receive.js +1 -1
- package/node_modules/@aws-sdk/util-utf8-browser/dist-cjs/index.js +9 -0
- package/node_modules/@aws-sdk/util-utf8-browser/dist-cjs/pureJs.js +47 -0
- package/node_modules/@aws-sdk/util-utf8-browser/dist-cjs/whatwgEncodingApi.js +11 -0
- package/node_modules/@aws-sdk/util-utf8-browser/dist-es/index.js +4 -0
- package/node_modules/@aws-sdk/util-utf8-browser/dist-es/pureJs.js +42 -0
- package/node_modules/@aws-sdk/util-utf8-browser/dist-es/whatwgEncodingApi.js +6 -0
- package/node_modules/@aws-sdk/util-utf8-browser/dist-types/index.d.ts +2 -0
- package/node_modules/@aws-sdk/util-utf8-browser/dist-types/pureJs.d.ts +17 -0
- package/node_modules/@aws-sdk/util-utf8-browser/dist-types/ts3.4/index.d.ts +2 -0
- package/node_modules/@aws-sdk/util-utf8-browser/dist-types/ts3.4/pureJs.d.ts +2 -0
- package/node_modules/@aws-sdk/util-utf8-browser/dist-types/ts3.4/whatwgEncodingApi.d.ts +2 -0
- package/node_modules/@aws-sdk/util-utf8-browser/dist-types/whatwgEncodingApi.d.ts +2 -0
- package/node_modules/@selderee/plugin-htmlparser2/CHANGELOG.md +33 -0
- package/node_modules/combined-stream/yarn.lock +17 -0
- package/node_modules/encoding-japanese/CHANGELOG.md +64 -0
- package/node_modules/leac/CHANGELOG.md +15 -0
- package/node_modules/parseley/CHANGELOG.md +60 -0
- package/node_modules/peberminta/CHANGELOG.md +46 -0
- package/node_modules/selderee/CHANGELOG.md +35 -0
- package/package.json +1 -1
package/.jsii
CHANGED
|
@@ -3522,7 +3522,7 @@
|
|
|
3522
3522
|
},
|
|
3523
3523
|
"name": "@mavogel/awscdk-rootmail",
|
|
3524
3524
|
"readme": {
|
|
3525
|
-
"markdown": "# awscdk-rootmail\n\nA single rootmail box for all your AWS accounts. The cdk implementation and **adaption** of the [superwerker](https://superwerker.cloud/) rootmail feature. See [here](docs/adrs/rootmail.md) for a detailed Architectural Decision Record ([ADR](https://adr.github.io/))\n\n- [TL;DR](#tldr)\n- [Usage](#usage)\n - [Dependencies](#dependencies)\n - [Deploy](#deploy)\n - [CDK](#cdk)\n - [Cloudformation](#cloudformation)\n- [Solution design: Version 1 - Domain in the same AWS account](#solution-design-version-1---domain-in-the-same-aws-account)\n- [Solution design: Version 2 - external DNS provider](#solution-design-version-2---external-dns-provider)\n- [Uninstall](#uninstall)\n- [Known issues](#known-issues)\n- [Related projects](#related-projects)\n\n## TL;DR\nEach AWS account needs one unique email address (the so-called \"AWS account root user email address\").\n\nAccess to these email addresses must be adequately secured since they provide privileged access to AWS accounts, such as account deletion procedures.\n\nThis is why you only need 1 mailing list for the AWS Management (formerly *root*) account,\nwe recommend the following pattern `aws-roots+<uuid>@mycompany.test`\n\n> [!NOTE]\n> Maximum **64** characters are allowed for the whole address.\n\nAnd as you own the domain `mycompany.test` you can add a subdomain, e.g. `aws`, for which all EMails will then be received with this solution within this particular AWS Management account.\n\n## Usage\n### Dependencies\nAdministrative access to an AWS account and the following tools:\n```sh\nbrew install aws-cli node@18 esbuild\n```\n\n<details>\n <summary>... or a longer listing</summary>\n\n- Access to a development environment. It is recommended to use AWS Cloud9 to avoid having to set up the tools needed to deploy the solution. See [Getting started with AWS Cloud9](https://aws.amazon.com/cloud9/getting-started/).\n- Using Cloud9, all of the following have already been configured for you. If you choose not to use Cloud9, you will need to install the following.\n - AWS CLI. See [Installing, updating and uninstalling the AWS CLI version 2](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html)\n - Set up the AWS CLI with IAM access credentials. See [Configuring the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html)\n - Node.js version 10.13.0 or later\n - AWS CDK version 2.90.0 or later. For installation instructions see [Getting Started with the AWS CDK](https://docs.aws.amazon.com/cdk/latest/guide/getting_started.html#getting_started_install)\n - Docker version 20.10.x or later **OR** [esbuild](https://esbuild.github.io/)\n</details>\n\n### Deploy\nYou can chose via embedding the construct in your cdk-app or use is directly via Cloudformation.\n#### CDK\n1. To start a new project we recommend using [projen](https://projen.io/).\n 1. Create a new projen project\n ```sh\n npx projen new awscdk-app-ts\n ```\n 2. Add `@mavogel/awscdk-rootmail` as a dependency to your project in the `.projenrc.ts` file\n 3. Run `npm run projen` to install it\n2. In you `main.ts` file add the following code\n```ts\nimport {\n App,\n Stack,\n aws_route53 as r53\n} from 'aws-cdk-lib';\nimport { Rootmail } from '@mavogel/awscdk-rootmail';\nimport { Construct } from 'constructs';\n\nexport class MyStack extends Stack {\n constructor(scope: Construct, id: string, props: StackProps = {}) {\n super(scope, id, props);\n\n const domain = 'mycompany.test'\n\n const hostedZone = r53.HostedZone.fromLookup(this, 'rootmail-parent-hosted-zone', {\n domainName: domain,\n });\n\n const rootmail = new Rootmail(this, 'rootmail-stack', {\n // 1. a domain you own, registered via Route53 in the SAME account\n domain: domain;\n // 2. so the subdomain will be aws.mycompany.test and\n // wired / delegated automatically\n autowireDNSParentHostedZoneID: hostedZone.hostedZoneId,\n env: {\n // 3. or any other region SES is available\n region: 'eu-west-1',\n },\n });\n }\n}\n```\n2. run on your commandline\n```sh\nnpm run deploy\n```\n1. No need to do anything, the NS records are **automatically** propagated as the parent Hosted Zone is in the same account!\n2. The `hosted-zone-dkim-propagation-provider.is-complete-handler` Lambda function checks every 10 seconds if the DNS for the subdomain is propagated. Details are in the Cloudwatch log group.\n\n### CDK with your own receiver function\nYou might also want to pass in you own function on what to do when an EMail is received\n\nfile `functions/custom-ses-receive-function.ts` which gets the 2 environment variables populated\n- `EMAIL_BUCKET`\n- `EMAIL_BUCKET_ARN`\n\nas well as `s3:GetObject` on the `RootMail/*` objects in the created Rootmail `S3` bucket.\n\n```ts\nimport { S3 } from '@aws-sdk/client-s3';\nimport { ParsedMail, simpleParser } from 'mailparser';\n// populated by default\nconst emailBucket = process.env.EMAIL_BUCKET;\nconst emailBucketArn = process.env.EMAIL_BUCKET_ARN;\nconst s3 = new S3();\n\n// SESEventRecordsToLambda\n// from https://docs.aws.amazon.com/ses/latest/dg/receiving-email-action-lambda-event.html\nexport const handler = async (event: SESEventRecordsToLambda) => {\n for (const record of event.Records) {\n\n const id = record.ses.mail.messageId;\n const key = `RootMail/${id}`;\n const response = await s3.getObject({ Bucket: emailBucket as string, Key: key });\n\n const msg: ParsedMail = await simpleParser(response.Body as unknown as Buffer);\n\n let title = msg.subject;\n console.log(`Title: ${title} from emailBucketArn: ${emailBucketArn}`);\n // use the content of the email body\n const body = msg.html;\n // add your custom code here ...\n\n // dummy example: list s3 buckets\n const buckets = await s3.listBuckets({});\n if (!buckets.Buckets) {\n console.log('No buckets found');\n return;\n }\n console.log('Buckets:');\n for (const bucket of buckets.Buckets || []) {\n console.log(bucket.Name);\n }\n }\n\n};\n```\nand you create a separate `NodejsFunction` as follows with the additionally needed IAM permissions:\n```ts\nconst customSesReceiveFunction = new NodejsFunction(stackUnderTest, 'custom-ses-receive-function', {\n functionName: PhysicalName.GENERATE_IF_NEEDED,\n entry: path.join(__dirname, 'functions', 'custom-ses-receive-function.ts'),\n runtime: lambda.Runtime.NODEJS_18_X,\n logRetention: 1,\n timeout: Duration.seconds(30),\n});\n\n// Note: any additional permissions you need to add to the function yourself!\ncustomSesReceiveFunction.addToRolePolicy(new iam.PolicyStatement({\n actions: [\n 's3:List*',\n ],\n resources: ['*'],\n}))\n```\nand then pass it into the `Rootmail` Stack\n```ts\nexport class MyStack extends Stack {\n constructor(scope: Construct, id: string, props: StackProps = {}) {\n super(scope, id, props);\n\n const domain = 'mycompany.test'\n const hostedZone = r53.HostedZone.fromLookup(this, 'rootmail-parent-hosted-zone', {\n domainName: domain,\n });\n\n const rootmail = new Rootmail(this, 'rootmail-stack', {\n domain: domain;\n autowireDNSParentHostedZoneID: hostedZone.hostedZoneId,\n env: {\n region: 'eu-west-1',\n },\n customSesReceiveFunction: customSesReceiveFunction, // <- pass it in here\n });\n }\n}\n```\n\n#### Cloudformation\nor use it directly a Cloudformation template `yaml` from the URL [here](https://mvc-test4-bucket-eu-west-1.s3.eu-west-1.amazonaws.com/rootmail/0.0.13-DEVELOPMENT/rootmailStack.template.yaml).\n\n\n<details>\n <summary>... click to expand</summary>\n\nand fill out the parameters\n\n\n</details>\n\n## Solution design: Version 1 - Domain in the same AWS account\n\n\n1. You own a domain, e.g., `mycompany.test`, registered via `Route53` in the **same** AWS account.\n2. The stack creates a `Route53` public Hosted Zone for the subdomain, e.g., `aws.mycompany.test`. It also automatically adds the `TXT` and `CNAME` records for verifying the domain towards SES **and** adds the NS server entries automatically to the main domain `mycompany.test`.\n3. When the subdomain `aws.mycompany.test` is successfully propagated, the stack creates a verified Domain in AWS SES and adds a recipient rule for `root@aws.mycompany.test`. On a successful propagation you will get a mail as follows to the root Email address of the account you are installing the stack 👇\n\n4. Now, any mail going to `root+<any-string>@aws.mycompany.test` will be processed by OpsSanta 🎅🏽 Lambda function and also stored in the rootmail S3 bucket 🪣.\n5. The OpsSanta function verifies the verdicts (DKIM etc.) of the sender, also skips AWS Account welcome EMails, and processes all other EMails. If it is a password reset link EMail it stores the link in the parameter store (and does *not* create an OpsItem for now). For all other mails, which are not skipped an OpsItem is created to have a central location for all items.\n> [!NOTE]\n> You can also connect your Jira to the OpsCenter.\n6. The bucket where all mail to `root@aws.mycompany.test` are stored.\n7. The [SSM parameter store](https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-parameter-store.html) for the password reset links.\n\n8. The OpsItem which is created. It is open and shall be further processed either in the OpsCenter or any other issue tracker.\n\n\n> [!NOTE]\n> SES support alias, so mail to `root+random-string@aws.mycompany.test` will also be catched and forwarded.\n\n## Solution design: Version 2 - external DNS provider\n<details>\n <summary>open for details</summary>\n\n\n\n```ts\nconst rootmail = new Rootmail(this, 'rootmail-stack', {\n // 1. a domain you own, registered via Route53 in the same account\n domain: 'mycompany.test';\n // 2. '' is the default, so you can also remove it\n // autowireDNSParentHostedZoneID: '',\n env: {\n // 3. or any other region SES is available\n region: 'eu-west-1',\n },\n});\n```\n\n1. You own a domain, e.g., `mycompany.test`. It can be at any registrar such as `godaddy`, also `Route53` itself in another AWS account.\n2. The stack creates a `Route53` public Hosted Zone for the subdomain, e.g., `aws.mycompany.test`. It also automatically adds the TXT and CNAME records (for DKIM etc.) for verifying the domain towards SES. **NOTE:** You must now add the NS server entries into the Domain provider which owns the main domain `mycompany.test`.\n3. items 3-7 are the same as in `v1`\n\n\n> [!NOTE]\n> After running `npm run deploy` you need to do the following steps manually:\n\n1. watch out for the hosted zone `aws.mycompany.test` to be created\n By default you have **2 hours** to wire the DNS!\n2. Then create the NS record in your domain `mycompany.test` for the subdomain `aws.mycompany.test`. Here for Route53 in AWS:\n\n3. You can test it yourself via\n```sh\ndig +short NS 8.8.8.8 aws.mycompany.test\n# should return something like\nns-1111.your-dns-provider-10.org.\nns-2222.your-dns-provider-21.co.uk.\nns-33.your-dns-provider-04.com.\nns-444.your-dns-provider-12.net.\n```\nand also by sending an EMail, e.g. from Gmail to `root@aws.mycompany.test`\n\n</details>\n\n## Uninstall\n1. Delete the stack, the custom resources will delete most resources\n2. And by design you need to manually delete the S3 Bucket containing the mails. This is to prevent accidental deletion of the mails. You can find the bucket name in the stack output.\n\n3. Furthermore, the cloudwatch log groups are not deleted, since they might contain valuable information. You can delete them manually.\n\n## Known issues\n- [jsii/2071](https://github.com/aws/jsii/issues/2071): so adding `compilerOptions.\"esModuleInterop\": true,` in `tsconfig.json` is not possible. See aws-cdk usage with[typescript](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/#Usage_with_TypeScript). So we needed to change import from `import AWS from 'aws-sdk';` -> `import * as AWS from 'aws-sdk';` to be able to compile.\n\n## Related projects\n- [aws-account-factory-email](https://github.com/aws-samples/aws-account-factory-email): a similar approach with SES, however you need to manually configure it upfront and also it about delivering root mails for a specific account to a specific mailing list and mainly decouples the real email address from the one of the AWS account. The main difference is that we do not *hide* or decouple the email address, but more make those as unique and unguessable/bruteforable as possible (with `uuids`)."
|
|
3525
|
+
"markdown": "# awscdk-rootmail\n\nA single rootmail box for all your AWS accounts. The cdk implementation and **adaption** of the [superwerker](https://superwerker.cloud/) rootmail feature. See [here](docs/adrs/rootmail.md) for a detailed Architectural Decision Record ([ADR](https://adr.github.io/))\n\n- [TL;DR](#tldr)\n- [Usage](#usage)\n - [Dependencies](#dependencies)\n - [Deploy](#deploy)\n - [CDK](#cdk)\n - [Cloudformation](#cloudformation)\n- [Solution design: Version 1 - Domain in the same AWS account](#solution-design-version-1---domain-in-the-same-aws-account)\n- [Solution design: Version 2 - external DNS provider](#solution-design-version-2---external-dns-provider)\n- [Uninstall](#uninstall)\n- [Known issues](#known-issues)\n- [Related projects](#related-projects)\n\n## TL;DR\nEach AWS account needs one unique email address (the so-called \"AWS account root user email address\").\n\nAccess to these email addresses must be adequately secured since they provide privileged access to AWS accounts, such as account deletion procedures.\n\nThis is why you only need 1 mailing list for the AWS Management (formerly *root*) account,\nwe recommend the following pattern `aws-roots+<uuid>@mycompany.test`\n\n> [!NOTE]\n> Maximum **64** characters are allowed for the whole address.\n\nAnd as you own the domain `mycompany.test` you can add a subdomain, e.g. `aws`, for which all EMails will then be received with this solution within this particular AWS Management account.\n\n## Usage\n### Dependencies\nAdministrative access to an AWS account and the following tools:\n```sh\nbrew install aws-cli node@18 esbuild\n```\n\n<details>\n <summary>... or a longer listing</summary>\n\n- Access to a development environment. It is recommended to use AWS Cloud9 to avoid having to set up the tools needed to deploy the solution. See [Getting started with AWS Cloud9](https://aws.amazon.com/cloud9/getting-started/).\n- Using Cloud9, all of the following have already been configured for you. If you choose not to use Cloud9, you will need to install the following.\n - AWS CLI. See [Installing, updating and uninstalling the AWS CLI version 2](https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2.html)\n - Set up the AWS CLI with IAM access credentials. See [Configuring the AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html)\n - Node.js version 10.13.0 or later\n - AWS CDK version 2.90.0 or later. For installation instructions see [Getting Started with the AWS CDK](https://docs.aws.amazon.com/cdk/latest/guide/getting_started.html#getting_started_install)\n - Docker version 20.10.x or later **OR** [esbuild](https://esbuild.github.io/)\n</details>\n\n### Deploy\nYou can chose via embedding the construct in your cdk-app or use is directly via Cloudformation.\n#### CDK\n1. To start a new project we recommend using [projen](https://projen.io/).\n 1. Create a new projen project\n ```sh\n npx projen new awscdk-app-ts\n ```\n 2. Add `@mavogel/awscdk-rootmail` as a dependency to your project in the `.projenrc.ts` file\n 3. Run `npm run projen` to install it\n2. In you `main.ts` file add the following code\n```ts\nimport { Rootmail } from '@mavogel/awscdk-rootmail';\nimport {\n App,\n Stack,\n StackProps,\n aws_route53 as r53,\n} from 'aws-cdk-lib';\nimport { Construct } from 'constructs';\n\nexport class MyStack extends Stack {\n constructor(scope: Construct, id: string, props: StackProps = {}) {\n super(scope, id, props);\n\n const domain = 'mycompany.com'\n\n const hostedZone = r53.HostedZone.fromLookup(this, 'rootmail-parent-hosted-zone', {\n domainName: domain,\n });\n\n new Rootmail(this, 'rootmail', {\n // 1. a domain you own, registered via Route53 in the SAME account\n domain: domain,\n // 2. so the subdomain will be aws.mycompany.test and\n subdomain: 'aws',\n // 3. wired / delegated automatically to\n wireDNSToHostedZoneID: hostedZone.hostedZoneId,\n });\n }\n}\n```\n2. run on your commandline\n```sh\nnpm run deploy\n```\n1. No need to do anything, the NS records are **automatically** propagated as the parent Hosted Zone is in the same account!\n2. The `hosted-zone-dkim-propagation-provider.is-complete-handler` Lambda function checks every 10 seconds if the DNS for the subdomain is propagated. Details are in the Cloudwatch log group.\n\n### CDK with your own receiver function\nYou might also want to pass in you own function on what to do when an EMail is received\n\nfile `functions/custom-ses-receive-function.ts` which gets the 2 environment variables populated\n- `EMAIL_BUCKET`\n- `EMAIL_BUCKET_ARN`\n\nas well as `s3:GetObject` on the `RootMail/*` objects in the created Rootmail `S3` bucket.\n\n```ts\nimport { S3 } from '@aws-sdk/client-s3';\nimport { ParsedMail, simpleParser } from 'mailparser';\n// populated by default\nconst emailBucket = process.env.EMAIL_BUCKET;\nconst emailBucketArn = process.env.EMAIL_BUCKET_ARN;\nconst s3 = new S3();\n\n// SESEventRecordsToLambda\n// from https://docs.aws.amazon.com/ses/latest/dg/receiving-email-action-lambda-event.html\nexport const handler = async (event: SESEventRecordsToLambda) => {\n for (const record of event.Records) {\n\n const id = record.ses.mail.messageId;\n const key = `RootMail/${id}`;\n const response = await s3.getObject({ Bucket: emailBucket as string, Key: key });\n\n const msg: ParsedMail = await simpleParser(response.Body as unknown as Buffer);\n\n let title = msg.subject;\n console.log(`Title: ${title} from emailBucketArn: ${emailBucketArn}`);\n // use the content of the email body\n const body = msg.html;\n // add your custom code here ...\n\n // dummy example: list s3 buckets\n const buckets = await s3.listBuckets({});\n if (!buckets.Buckets) {\n console.log('No buckets found');\n return;\n }\n console.log('Buckets:');\n for (const bucket of buckets.Buckets || []) {\n console.log(bucket.Name);\n }\n }\n\n};\n```\nand you create a separate `NodejsFunction` as follows with the additionally needed IAM permissions:\n```ts\nconst customSesReceiveFunction = new NodejsFunction(stackUnderTest, 'custom-ses-receive-function', {\n functionName: PhysicalName.GENERATE_IF_NEEDED,\n entry: path.join(__dirname, 'functions', 'custom-ses-receive-function.ts'),\n runtime: lambda.Runtime.NODEJS_18_X,\n logRetention: 1,\n timeout: Duration.seconds(30),\n});\n\n// Note: any additional permissions you need to add to the function yourself!\ncustomSesReceiveFunction.addToRolePolicy(new iam.PolicyStatement({\n actions: [\n 's3:List*',\n ],\n resources: ['*'],\n}))\n```\nand then pass it into the `Rootmail` Stack\n```ts\nexport class MyStack extends Stack {\n constructor(scope: Construct, id: string, props: StackProps = {}) {\n super(scope, id, props);\n\n const domain = 'mycompany.test'\n const hostedZone = r53.HostedZone.fromLookup(this, 'rootmail-parent-hosted-zone', {\n domainName: domain,\n });\n\n const rootmail = new Rootmail(this, 'rootmail-stack', {\n domain: domain;\n autowireDNSParentHostedZoneID: hostedZone.hostedZoneId,\n env: {\n region: 'eu-west-1',\n },\n customSesReceiveFunction: customSesReceiveFunction, // <- pass it in here\n });\n }\n}\n```\n\n#### Cloudformation\nor use it directly a Cloudformation template `yaml` from the URL [here](https://mvc-test4-bucket-eu-west-1.s3.eu-west-1.amazonaws.com/rootmail/0.0.13-DEVELOPMENT/rootmailStack.template.yaml).\n\n\n<details>\n <summary>... click to expand</summary>\n\nand fill out the parameters\n\n\n</details>\n\n## Solution design: Version 1 - Domain in the same AWS account\n\n\n1. You own a domain, e.g., `mycompany.test`, registered via `Route53` in the **same** AWS account.\n2. The stack creates a `Route53` public Hosted Zone for the subdomain, e.g., `aws.mycompany.test`. It also automatically adds the `TXT` and `CNAME` records for verifying the domain towards SES **and** adds the NS server entries automatically to the main domain `mycompany.test`.\n3. When the subdomain `aws.mycompany.test` is successfully propagated, the stack creates a verified Domain in AWS SES and adds a recipient rule for `root@aws.mycompany.test`. On a successful propagation you will get a mail as follows to the root Email address of the account you are installing the stack 👇\n\n4. Now, any mail going to `root+<any-string>@aws.mycompany.test` will be processed by OpsSanta 🎅🏽 Lambda function and also stored in the rootmail S3 bucket 🪣.\n5. The OpsSanta function verifies the verdicts (DKIM etc.) of the sender, also skips AWS Account welcome EMails, and processes all other EMails. If it is a password reset link EMail it stores the link in the parameter store (and does *not* create an OpsItem for now). For all other mails, which are not skipped an OpsItem is created to have a central location for all items.\n> [!NOTE]\n> You can also connect your Jira to the OpsCenter.\n6. The bucket where all mail to `root@aws.mycompany.test` are stored.\n7. The [SSM parameter store](https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-parameter-store.html) for the password reset links.\n\n8. The OpsItem which is created. It is open and shall be further processed either in the OpsCenter or any other issue tracker.\n\n\n> [!NOTE]\n> SES support alias, so mail to `root+random-string@aws.mycompany.test` will also be catched and forwarded.\n\n## Solution design: Version 2 - external DNS provider\n<details>\n <summary>open for details</summary>\n\n\n\n```ts\nconst rootmail = new Rootmail(this, 'rootmail-stack', {\n // 1. a domain you own, registered via Route53 in the same account\n domain: 'mycompany.test';\n // 2. '' is the default, so you can also remove it\n // autowireDNSParentHostedZoneID: '',\n env: {\n // 3. or any other region SES is available\n region: 'eu-west-1',\n },\n});\n```\n\n1. You own a domain, e.g., `mycompany.test`. It can be at any registrar such as `godaddy`, also `Route53` itself in another AWS account.\n2. The stack creates a `Route53` public Hosted Zone for the subdomain, e.g., `aws.mycompany.test`. It also automatically adds the TXT and CNAME records (for DKIM etc.) for verifying the domain towards SES. **NOTE:** You must now add the NS server entries into the Domain provider which owns the main domain `mycompany.test`.\n3. items 3-7 are the same as in `v1`\n\n\n> [!NOTE]\n> After running `npm run deploy` you need to do the following steps manually:\n\n1. watch out for the hosted zone `aws.mycompany.test` to be created\n By default you have **2 hours** to wire the DNS!\n2. Then create the NS record in your domain `mycompany.test` for the subdomain `aws.mycompany.test`. Here for Route53 in AWS:\n\n3. You can test it yourself via\n```sh\ndig +short NS 8.8.8.8 aws.mycompany.test\n# should return something like\nns-1111.your-dns-provider-10.org.\nns-2222.your-dns-provider-21.co.uk.\nns-33.your-dns-provider-04.com.\nns-444.your-dns-provider-12.net.\n```\nand also by sending an EMail, e.g. from Gmail to `root@aws.mycompany.test`\n\n</details>\n\n## Uninstall\n1. Delete the stack, the custom resources will delete most resources\n2. And by design you need to manually delete the S3 Bucket containing the mails. This is to prevent accidental deletion of the mails. You can find the bucket name in the stack output.\n\n3. Furthermore, the cloudwatch log groups are not deleted, since they might contain valuable information. You can delete them manually.\n\n## Known issues\n- [jsii/2071](https://github.com/aws/jsii/issues/2071): so adding `compilerOptions.\"esModuleInterop\": true,` in `tsconfig.json` is not possible. See aws-cdk usage with[typescript](https://docs.aws.amazon.com/AWSJavaScriptSDK/latest/#Usage_with_TypeScript). So we needed to change import from `import AWS from 'aws-sdk';` -> `import * as AWS from 'aws-sdk';` to be able to compile.\n\n## Related projects\n- [aws-account-factory-email](https://github.com/aws-samples/aws-account-factory-email): a similar approach with SES, however you need to manually configure it upfront and also it about delivering root mails for a specific account to a specific mailing list and mainly decouples the real email address from the one of the AWS account. The main difference is that we do not *hide* or decouple the email address, but more make those as unique and unguessable/bruteforable as possible (with `uuids`)."
|
|
3526
3526
|
},
|
|
3527
3527
|
"repository": {
|
|
3528
3528
|
"type": "git",
|
|
@@ -3877,6 +3877,6 @@
|
|
|
3877
3877
|
"symbolId": "src/ses-receive:SESReceiveProps"
|
|
3878
3878
|
}
|
|
3879
3879
|
},
|
|
3880
|
-
"version": "0.0.
|
|
3881
|
-
"fingerprint": "
|
|
3880
|
+
"version": "0.0.23",
|
|
3881
|
+
"fingerprint": "zB4paHQcoowHLi0IP33zb/gt23sZTVAz46HWcoeTRY8="
|
|
3882
3882
|
}
|
package/API.md
CHANGED
|
@@ -58,34 +58,32 @@ You can chose via embedding the construct in your cdk-app or use is directly via
|
|
|
58
58
|
3. Run `npm run projen` to install it
|
|
59
59
|
2. In you `main.ts` file add the following code
|
|
60
60
|
```ts
|
|
61
|
+
import { Rootmail } from '@mavogel/awscdk-rootmail';
|
|
61
62
|
import {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
App,
|
|
64
|
+
Stack,
|
|
65
|
+
StackProps,
|
|
66
|
+
aws_route53 as r53,
|
|
65
67
|
} from 'aws-cdk-lib';
|
|
66
|
-
import { Rootmail } from '@mavogel/awscdk-rootmail';
|
|
67
68
|
import { Construct } from 'constructs';
|
|
68
69
|
|
|
69
70
|
export class MyStack extends Stack {
|
|
70
71
|
constructor(scope: Construct, id: string, props: StackProps = {}) {
|
|
71
72
|
super(scope, id, props);
|
|
72
73
|
|
|
73
|
-
const domain = 'mycompany.
|
|
74
|
+
const domain = 'mycompany.com'
|
|
74
75
|
|
|
75
76
|
const hostedZone = r53.HostedZone.fromLookup(this, 'rootmail-parent-hosted-zone', {
|
|
76
77
|
domainName: domain,
|
|
77
78
|
});
|
|
78
79
|
|
|
79
|
-
|
|
80
|
+
new Rootmail(this, 'rootmail', {
|
|
80
81
|
// 1. a domain you own, registered via Route53 in the SAME account
|
|
81
|
-
domain: domain
|
|
82
|
+
domain: domain,
|
|
82
83
|
// 2. so the subdomain will be aws.mycompany.test and
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
// 3. or any other region SES is available
|
|
87
|
-
region: 'eu-west-1',
|
|
88
|
-
},
|
|
84
|
+
subdomain: 'aws',
|
|
85
|
+
// 3. wired / delegated automatically to
|
|
86
|
+
wireDNSToHostedZoneID: hostedZone.hostedZoneId,
|
|
89
87
|
});
|
|
90
88
|
}
|
|
91
89
|
}
|
package/README.md
CHANGED
|
@@ -58,35 +58,33 @@ You can chose via embedding the construct in your cdk-app or use is directly via
|
|
|
58
58
|
3. Run `npm run projen` to install it
|
|
59
59
|
2. In you `main.ts` file add the following code
|
|
60
60
|
```ts
|
|
61
|
-
import {
|
|
62
|
-
App,
|
|
63
|
-
Stack,
|
|
64
|
-
aws_route53 as r53
|
|
65
|
-
} from 'aws-cdk-lib';
|
|
66
61
|
import { Rootmail } from '@mavogel/awscdk-rootmail';
|
|
62
|
+
import {
|
|
63
|
+
App,
|
|
64
|
+
Stack,
|
|
65
|
+
StackProps,
|
|
66
|
+
aws_route53 as r53,
|
|
67
|
+
} from 'aws-cdk-lib';
|
|
67
68
|
import { Construct } from 'constructs';
|
|
68
69
|
|
|
69
70
|
export class MyStack extends Stack {
|
|
70
71
|
constructor(scope: Construct, id: string, props: StackProps = {}) {
|
|
71
72
|
super(scope, id, props);
|
|
72
73
|
|
|
73
|
-
const domain = 'mycompany.
|
|
74
|
+
const domain = 'mycompany.com'
|
|
74
75
|
|
|
75
76
|
const hostedZone = r53.HostedZone.fromLookup(this, 'rootmail-parent-hosted-zone', {
|
|
76
77
|
domainName: domain,
|
|
77
78
|
});
|
|
78
79
|
|
|
79
|
-
|
|
80
|
+
new Rootmail(this, 'rootmail', {
|
|
80
81
|
// 1. a domain you own, registered via Route53 in the SAME account
|
|
81
|
-
domain: domain
|
|
82
|
+
domain: domain,
|
|
82
83
|
// 2. so the subdomain will be aws.mycompany.test and
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
region: 'eu-west-1',
|
|
88
|
-
},
|
|
89
|
-
});
|
|
84
|
+
subdomain: 'aws',
|
|
85
|
+
// 3. wired / delegated automatically to
|
|
86
|
+
wireDNSToHostedZoneID: hostedZone.hostedZoneId,
|
|
87
|
+
});
|
|
90
88
|
}
|
|
91
89
|
}
|
|
92
90
|
```
|
package/lib/rootmail.js
CHANGED
|
@@ -74,7 +74,7 @@ class Rootmail extends constructs_1.Construct {
|
|
|
74
74
|
}
|
|
75
75
|
exports.Rootmail = Rootmail;
|
|
76
76
|
_a = JSII_RTTI_SYMBOL_1;
|
|
77
|
-
Rootmail[_a] = { fqn: "@mavogel/awscdk-rootmail.Rootmail", version: "0.0.
|
|
77
|
+
Rootmail[_a] = { fqn: "@mavogel/awscdk-rootmail.Rootmail", version: "0.0.23" };
|
|
78
78
|
/**
|
|
79
79
|
* Aspect for setting all removal policies to DESTROY
|
|
80
80
|
*/
|
package/lib/ses-receive.js
CHANGED
|
@@ -124,7 +124,7 @@ class SESReceive extends constructs_1.Construct {
|
|
|
124
124
|
}
|
|
125
125
|
exports.SESReceive = SESReceive;
|
|
126
126
|
_a = JSII_RTTI_SYMBOL_1;
|
|
127
|
-
SESReceive[_a] = { fqn: "@mavogel/awscdk-rootmail.SESReceive", version: "0.0.
|
|
127
|
+
SESReceive[_a] = { fqn: "@mavogel/awscdk-rootmail.SESReceive", version: "0.0.23" };
|
|
128
128
|
/**
|
|
129
129
|
* Aspect for setting all removal policies to DESTROY
|
|
130
130
|
*/
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toUtf8 = exports.fromUtf8 = void 0;
|
|
4
|
+
const pureJs_1 = require("./pureJs");
|
|
5
|
+
const whatwgEncodingApi_1 = require("./whatwgEncodingApi");
|
|
6
|
+
const fromUtf8 = (input) => typeof TextEncoder === "function" ? (0, whatwgEncodingApi_1.fromUtf8)(input) : (0, pureJs_1.fromUtf8)(input);
|
|
7
|
+
exports.fromUtf8 = fromUtf8;
|
|
8
|
+
const toUtf8 = (input) => typeof TextDecoder === "function" ? (0, whatwgEncodingApi_1.toUtf8)(input) : (0, pureJs_1.toUtf8)(input);
|
|
9
|
+
exports.toUtf8 = toUtf8;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toUtf8 = exports.fromUtf8 = void 0;
|
|
4
|
+
const fromUtf8 = (input) => {
|
|
5
|
+
const bytes = [];
|
|
6
|
+
for (let i = 0, len = input.length; i < len; i++) {
|
|
7
|
+
const value = input.charCodeAt(i);
|
|
8
|
+
if (value < 0x80) {
|
|
9
|
+
bytes.push(value);
|
|
10
|
+
}
|
|
11
|
+
else if (value < 0x800) {
|
|
12
|
+
bytes.push((value >> 6) | 0b11000000, (value & 0b111111) | 0b10000000);
|
|
13
|
+
}
|
|
14
|
+
else if (i + 1 < input.length && (value & 0xfc00) === 0xd800 && (input.charCodeAt(i + 1) & 0xfc00) === 0xdc00) {
|
|
15
|
+
const surrogatePair = 0x10000 + ((value & 0b1111111111) << 10) + (input.charCodeAt(++i) & 0b1111111111);
|
|
16
|
+
bytes.push((surrogatePair >> 18) | 0b11110000, ((surrogatePair >> 12) & 0b111111) | 0b10000000, ((surrogatePair >> 6) & 0b111111) | 0b10000000, (surrogatePair & 0b111111) | 0b10000000);
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
bytes.push((value >> 12) | 0b11100000, ((value >> 6) & 0b111111) | 0b10000000, (value & 0b111111) | 0b10000000);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return Uint8Array.from(bytes);
|
|
23
|
+
};
|
|
24
|
+
exports.fromUtf8 = fromUtf8;
|
|
25
|
+
const toUtf8 = (input) => {
|
|
26
|
+
let decoded = "";
|
|
27
|
+
for (let i = 0, len = input.length; i < len; i++) {
|
|
28
|
+
const byte = input[i];
|
|
29
|
+
if (byte < 0x80) {
|
|
30
|
+
decoded += String.fromCharCode(byte);
|
|
31
|
+
}
|
|
32
|
+
else if (0b11000000 <= byte && byte < 0b11100000) {
|
|
33
|
+
const nextByte = input[++i];
|
|
34
|
+
decoded += String.fromCharCode(((byte & 0b11111) << 6) | (nextByte & 0b111111));
|
|
35
|
+
}
|
|
36
|
+
else if (0b11110000 <= byte && byte < 0b101101101) {
|
|
37
|
+
const surrogatePair = [byte, input[++i], input[++i], input[++i]];
|
|
38
|
+
const encoded = "%" + surrogatePair.map((byteValue) => byteValue.toString(16)).join("%");
|
|
39
|
+
decoded += decodeURIComponent(encoded);
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
decoded += String.fromCharCode(((byte & 0b1111) << 12) | ((input[++i] & 0b111111) << 6) | (input[++i] & 0b111111));
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return decoded;
|
|
46
|
+
};
|
|
47
|
+
exports.toUtf8 = toUtf8;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toUtf8 = exports.fromUtf8 = void 0;
|
|
4
|
+
function fromUtf8(input) {
|
|
5
|
+
return new TextEncoder().encode(input);
|
|
6
|
+
}
|
|
7
|
+
exports.fromUtf8 = fromUtf8;
|
|
8
|
+
function toUtf8(input) {
|
|
9
|
+
return new TextDecoder("utf-8").decode(input);
|
|
10
|
+
}
|
|
11
|
+
exports.toUtf8 = toUtf8;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { fromUtf8 as jsFromUtf8, toUtf8 as jsToUtf8 } from "./pureJs";
|
|
2
|
+
import { fromUtf8 as textEncoderFromUtf8, toUtf8 as textEncoderToUtf8 } from "./whatwgEncodingApi";
|
|
3
|
+
export const fromUtf8 = (input) => typeof TextEncoder === "function" ? textEncoderFromUtf8(input) : jsFromUtf8(input);
|
|
4
|
+
export const toUtf8 = (input) => typeof TextDecoder === "function" ? textEncoderToUtf8(input) : jsToUtf8(input);
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export const fromUtf8 = (input) => {
|
|
2
|
+
const bytes = [];
|
|
3
|
+
for (let i = 0, len = input.length; i < len; i++) {
|
|
4
|
+
const value = input.charCodeAt(i);
|
|
5
|
+
if (value < 0x80) {
|
|
6
|
+
bytes.push(value);
|
|
7
|
+
}
|
|
8
|
+
else if (value < 0x800) {
|
|
9
|
+
bytes.push((value >> 6) | 0b11000000, (value & 0b111111) | 0b10000000);
|
|
10
|
+
}
|
|
11
|
+
else if (i + 1 < input.length && (value & 0xfc00) === 0xd800 && (input.charCodeAt(i + 1) & 0xfc00) === 0xdc00) {
|
|
12
|
+
const surrogatePair = 0x10000 + ((value & 0b1111111111) << 10) + (input.charCodeAt(++i) & 0b1111111111);
|
|
13
|
+
bytes.push((surrogatePair >> 18) | 0b11110000, ((surrogatePair >> 12) & 0b111111) | 0b10000000, ((surrogatePair >> 6) & 0b111111) | 0b10000000, (surrogatePair & 0b111111) | 0b10000000);
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
bytes.push((value >> 12) | 0b11100000, ((value >> 6) & 0b111111) | 0b10000000, (value & 0b111111) | 0b10000000);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return Uint8Array.from(bytes);
|
|
20
|
+
};
|
|
21
|
+
export const toUtf8 = (input) => {
|
|
22
|
+
let decoded = "";
|
|
23
|
+
for (let i = 0, len = input.length; i < len; i++) {
|
|
24
|
+
const byte = input[i];
|
|
25
|
+
if (byte < 0x80) {
|
|
26
|
+
decoded += String.fromCharCode(byte);
|
|
27
|
+
}
|
|
28
|
+
else if (0b11000000 <= byte && byte < 0b11100000) {
|
|
29
|
+
const nextByte = input[++i];
|
|
30
|
+
decoded += String.fromCharCode(((byte & 0b11111) << 6) | (nextByte & 0b111111));
|
|
31
|
+
}
|
|
32
|
+
else if (0b11110000 <= byte && byte < 0b101101101) {
|
|
33
|
+
const surrogatePair = [byte, input[++i], input[++i], input[++i]];
|
|
34
|
+
const encoded = "%" + surrogatePair.map((byteValue) => byteValue.toString(16)).join("%");
|
|
35
|
+
decoded += decodeURIComponent(encoded);
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
decoded += String.fromCharCode(((byte & 0b1111) << 12) | ((input[++i] & 0b111111) << 6) | (input[++i] & 0b111111));
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return decoded;
|
|
42
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts a JS string from its native UCS-2/UTF-16 representation into a
|
|
3
|
+
* Uint8Array of the bytes used to represent the equivalent characters in UTF-8.
|
|
4
|
+
*
|
|
5
|
+
* Cribbed from the `goog.crypt.stringToUtf8ByteArray` function in the Google
|
|
6
|
+
* Closure library, though updated to use typed arrays.
|
|
7
|
+
*/
|
|
8
|
+
export declare const fromUtf8: (input: string) => Uint8Array;
|
|
9
|
+
/**
|
|
10
|
+
* Converts a typed array of bytes containing UTF-8 data into a native JS
|
|
11
|
+
* string.
|
|
12
|
+
*
|
|
13
|
+
* Partly cribbed from the `goog.crypt.utf8ByteArrayToString` function in the
|
|
14
|
+
* Google Closure library, though updated to use typed arrays and to better
|
|
15
|
+
* handle astral plane code points.
|
|
16
|
+
*/
|
|
17
|
+
export declare const toUtf8: (input: Uint8Array) => string;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## Version 0.11.0
|
|
4
|
+
|
|
5
|
+
* (`selderee`) Escape sequences in selectors.
|
|
6
|
+
|
|
7
|
+
## Version 0.10.0
|
|
8
|
+
|
|
9
|
+
* Targeting Node.js version 14 and ES2020;
|
|
10
|
+
* Bump dependencies.
|
|
11
|
+
|
|
12
|
+
## Version 0.9.0
|
|
13
|
+
|
|
14
|
+
* Bump dependencies - fix "./core module cannot be found" issue.
|
|
15
|
+
|
|
16
|
+
## Version 0.8.1
|
|
17
|
+
|
|
18
|
+
* Sync with `selderee` package version. Now all dependencies are TypeScript, dual CommonJS/ES module packages;
|
|
19
|
+
* Use `rollup-plugin-cleanup` to condition published files.
|
|
20
|
+
|
|
21
|
+
## Version 0.7.0
|
|
22
|
+
|
|
23
|
+
* Drop Node.js version 10 support. At least 12.22.x is required.
|
|
24
|
+
|
|
25
|
+
## Version 0.6.0
|
|
26
|
+
|
|
27
|
+
* `selderee` 0.6.0 - [changelog](https://github.com/mxxii/selderee/blob/main/packages/selderee/CHANGELOG.md).
|
|
28
|
+
|
|
29
|
+
## Version 0.5.0
|
|
30
|
+
|
|
31
|
+
Initial release.
|
|
32
|
+
|
|
33
|
+
Aiming at Node.js version 10 and up.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
|
2
|
+
# yarn lockfile v1
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
delayed-stream@~1.0.0:
|
|
6
|
+
version "1.0.0"
|
|
7
|
+
resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
|
|
8
|
+
|
|
9
|
+
far@~0.0.7:
|
|
10
|
+
version "0.0.7"
|
|
11
|
+
resolved "https://registry.yarnpkg.com/far/-/far-0.0.7.tgz#01c1fd362bcd26ce9cf161af3938aa34619f79a7"
|
|
12
|
+
dependencies:
|
|
13
|
+
oop "0.0.3"
|
|
14
|
+
|
|
15
|
+
oop@0.0.3:
|
|
16
|
+
version "0.0.3"
|
|
17
|
+
resolved "https://registry.yarnpkg.com/oop/-/oop-0.0.3.tgz#70fa405a5650891a194fdc82ca68dad6dabf4401"
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Change Log
|
|
2
|
+
|
|
3
|
+
## [2.0.0](https://github.com/polygonplanet/encoding.js/compare/1.0.30...2.0.0) (2022-03-29)
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
* Add `Encoding.version` ([bd3d6ef](https://github.com/polygonplanet/encoding.js/commit/bd3d6ef511a17c2d9671453e6c93618dae7ae9db))
|
|
8
|
+
* Add `fallback` option to `Encoding.convert` ([#23](https://github.com/polygonplanet/encoding.js/pull/23)) ([5622bfa](https://github.com/polygonplanet/encoding.js/commit/5622bfa4b2ee3981d664315b743094fcfd4d01a0)) Thanks [@tohutohu](https://github.com/tohutohu)
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
* Fix deprecated Buffer constructor ([b8fda07](https://github.com/polygonplanet/encoding.js/commit/b8fda07f6957f9197210fcda196cb2d6cc28e7a1))
|
|
13
|
+
|
|
14
|
+
### Removed
|
|
15
|
+
|
|
16
|
+
* Drop `bower` support ([981ea39](https://github.com/polygonplanet/encoding.js/commit/981ea3947021faa87e12774e0786c6b13fe09124))
|
|
17
|
+
|
|
18
|
+
## [1.0.30](https://github.com/polygonplanet/encoding.js/compare/1.0.29...1.0.30) (2019-09-12)
|
|
19
|
+
|
|
20
|
+
### Added
|
|
21
|
+
|
|
22
|
+
* Add LICENSE ([0224ebb](https://github.com/polygonplanet/encoding.js/commit/0224ebb620ae4058064f80ec3ec5898181595abe))
|
|
23
|
+
|
|
24
|
+
## [1.0.29](https://github.com/polygonplanet/encoding.js/compare/1.0.28...1.0.29) (2018-05-11)
|
|
25
|
+
|
|
26
|
+
### Fixed
|
|
27
|
+
|
|
28
|
+
* Fix can't find module in using 'require' ([#8](https://github.com/polygonplanet/encoding.js/issues/8)) ([5cf89b8](https://github.com/polygonplanet/encoding.js/commit/5cf89b85758d2466fd52a9690eed27ebaeba1e5e))
|
|
29
|
+
|
|
30
|
+
## [1.0.28](https://github.com/polygonplanet/encoding.js/compare/1.0.26...1.0.28) (2018-02-01)
|
|
31
|
+
|
|
32
|
+
### Changed
|
|
33
|
+
|
|
34
|
+
* Drop `Gruntfile.js` and modularize the code base by `browserify`
|
|
35
|
+
|
|
36
|
+
## [1.0.26](https://github.com/polygonplanet/encoding.js/compare/1.0.25...1.0.26) (2017-08-21)
|
|
37
|
+
|
|
38
|
+
### Fixed
|
|
39
|
+
|
|
40
|
+
* Fix the grammar in README.md ([#4](https://github.com/polygonplanet/encoding.js/pull/4)) Thanks [@iku000888](https://github.com/iku000888)
|
|
41
|
+
|
|
42
|
+
## [1.0.25](https://github.com/polygonplanet/encoding.js/compare/1.0.24...1.0.25) (2016-11-03)
|
|
43
|
+
|
|
44
|
+
### Fixed
|
|
45
|
+
|
|
46
|
+
* Fix argument decision of the detect method ([#3](https://github.com/polygonplanet/encoding.js/pull/3)) Thanks [@spring-raining](https://github.com/spring-raining)
|
|
47
|
+
|
|
48
|
+
## [1.0.24](https://github.com/polygonplanet/encoding.js/compare/1.0.23...1.0.24) (2015-09-22)
|
|
49
|
+
|
|
50
|
+
### Added
|
|
51
|
+
|
|
52
|
+
* Add `base64Encode` and `base64Decode` ([729bb4f](https://github.com/polygonplanet/encoding.js/commit/729bb4fac63dbfbea8dedefe874270ae5d6c2e21))
|
|
53
|
+
|
|
54
|
+
## [1.0.23](https://github.com/polygonplanet/encoding.js/compare/1.0.21...1.0.23) (2015-04-06)
|
|
55
|
+
|
|
56
|
+
### Fixed
|
|
57
|
+
|
|
58
|
+
* Fix internal `isObject()` method for old IE browsers ([#2](https://github.com/polygonplanet/encoding.js/pull/2)) ([32f6c02](https://github.com/polygonplanet/encoding.js/commit/32f6c02e290a36deb158357ddd1ebe34601cb4ea)) Thanks [@dmitrygorbenko](https://github.com/dmitrygorbenko)
|
|
59
|
+
|
|
60
|
+
## [1.0.21](https://github.com/polygonplanet/encoding.js/compare/1.0.20...1.0.21) (2015-02-12)
|
|
61
|
+
|
|
62
|
+
### Added
|
|
63
|
+
|
|
64
|
+
* Add bower.json ([d33bb7c](https://github.com/polygonplanet/encoding.js/commit/d33bb7c225e8e5c53100b6776a8c1d63b7a807e6))
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## Version 0.6.0
|
|
4
|
+
|
|
5
|
+
- Targeting Node.js version 14 and ES2020;
|
|
6
|
+
- Now should be discoverable with [denoify](https://github.com/garronej/denoify).
|
|
7
|
+
|
|
8
|
+
## Version 0.5.1
|
|
9
|
+
|
|
10
|
+
- Documentation updates.
|
|
11
|
+
|
|
12
|
+
## Version 0.5.0
|
|
13
|
+
|
|
14
|
+
- Initial release;
|
|
15
|
+
- Aiming at Node.js version 12 and up.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## Version 0.12.1
|
|
4
|
+
|
|
5
|
+
* Runtime check for input of `parse` and `parse1` to be a string.
|
|
6
|
+
|
|
7
|
+
## Version 0.12.0
|
|
8
|
+
|
|
9
|
+
* Support for escape sequences according to specifications ([#97](https://github.com/mxxii/parseley/issues/97)).
|
|
10
|
+
|
|
11
|
+
Now follows <https://www.w3.org/TR/selectors-3/#lex> for parsing and <https://w3c.github.io/csswg-drafts/cssom/#common-serializing-idioms> for serializing.
|
|
12
|
+
|
|
13
|
+
Possibly breaking changes:
|
|
14
|
+
|
|
15
|
+
* parsed strings (attribute values) retained escape sequences previously, now they are unescaped;
|
|
16
|
+
* strings with `"` character were serialized as single-quoted previously, now all strings serialized as double-quoted, per spec suggestion.
|
|
17
|
+
|
|
18
|
+
## Version 0.11.0
|
|
19
|
+
|
|
20
|
+
* Targeting Node.js version 14 and ES2020;
|
|
21
|
+
* Now should be discoverable with [denoify](https://github.com/garronej/denoify).
|
|
22
|
+
|
|
23
|
+
## Version 0.10.0
|
|
24
|
+
|
|
25
|
+
* Bump dependencies - fix "./core module cannot be found" issue.
|
|
26
|
+
|
|
27
|
+
## Version 0.9.1
|
|
28
|
+
|
|
29
|
+
* Fix namespace parsing;
|
|
30
|
+
* Remove terser, use only `rollup-plugin-cleanup` to condition published files.
|
|
31
|
+
|
|
32
|
+
## Version 0.9.0
|
|
33
|
+
|
|
34
|
+
* Replaced `moo` and `nearley` with my [leac](https://github.com/mxxii/leac) and [peberminta](https://github.com/mxxii/peberminta) packages. Now `parseley` with all dependencies are TypeScript, dual CommonJS/ES module packages;
|
|
35
|
+
* Package is marked as free of side effects and tersed;
|
|
36
|
+
* Deno version is provided, with the help of `denoify`.
|
|
37
|
+
|
|
38
|
+
## Version 0.8.0
|
|
39
|
+
|
|
40
|
+
* Drop Node.js version 10 support. 12.22.x is required;
|
|
41
|
+
* Fix typos in type definitions.
|
|
42
|
+
|
|
43
|
+
## Version 0.7.0
|
|
44
|
+
|
|
45
|
+
* Switched to TypeScript;
|
|
46
|
+
* Added type definitions for AST;
|
|
47
|
+
* Hybrid package (ESM, CommonJS);
|
|
48
|
+
* Renamed `sort()` to `normalize()` in order to better reflect what it does;
|
|
49
|
+
* Replaced `compareArrays()` with `compareSpecificity()` and `compareSelectors()` - more sensible API;
|
|
50
|
+
* Generated [documentation](https://github.com/mxxii/parseley/tree/main/docs).
|
|
51
|
+
|
|
52
|
+
## Version 0.6.0
|
|
53
|
+
|
|
54
|
+
Added `sort()` and `compareArrays()` functions.
|
|
55
|
+
|
|
56
|
+
## Version 0.5.0
|
|
57
|
+
|
|
58
|
+
Initial release.
|
|
59
|
+
|
|
60
|
+
Aiming at Node.js version 10 and up.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## Version 0.9.0
|
|
4
|
+
|
|
5
|
+
- many functions got overloads for `Matcher` type propagation in less common scenarios;
|
|
6
|
+
- `condition` function now accepts Parsers/Matchers with different value types, result value type is the union of the two;
|
|
7
|
+
- added type tests for overloads using [expect-type](https://github.com/mmkal/expect-type).
|
|
8
|
+
|
|
9
|
+
## Version 0.8.0
|
|
10
|
+
|
|
11
|
+
- Targeting Node.js version 14 and ES2020;
|
|
12
|
+
- Now should be discoverable with [denoify](https://github.com/garronej/denoify).
|
|
13
|
+
|
|
14
|
+
## Version 0.7.0
|
|
15
|
+
|
|
16
|
+
- `otherwise` function now has two overloads - `Parser * Matcher -> Matcher` and `Parser * Parser -> Parser`;
|
|
17
|
+
- `otherwise` function now accepts Parsers/Matchers with different value types, result value type is the union of the two;
|
|
18
|
+
- `otherwise` function now has an alias called `eitherOr` which might be more natural for combining parsers.
|
|
19
|
+
|
|
20
|
+
## Version 0.6.0
|
|
21
|
+
|
|
22
|
+
- ensure local imports have file extensions - fix "./core module cannot be found" issue.
|
|
23
|
+
|
|
24
|
+
## Version 0.5.4
|
|
25
|
+
|
|
26
|
+
- remove terser, source-map files;
|
|
27
|
+
- use only `rollup-plugin-cleanup` to condition published files.
|
|
28
|
+
|
|
29
|
+
## Version 0.5.3
|
|
30
|
+
|
|
31
|
+
- source-map files;
|
|
32
|
+
- minor documentation update.
|
|
33
|
+
|
|
34
|
+
## Version 0.5.2
|
|
35
|
+
|
|
36
|
+
- `peek` function keeps Parser/Matcher distinction;
|
|
37
|
+
|
|
38
|
+
## Version 0.5.1
|
|
39
|
+
|
|
40
|
+
- documentation updates;
|
|
41
|
+
- package marked as free of side effects for tree shaking.
|
|
42
|
+
|
|
43
|
+
## Version 0.5.0
|
|
44
|
+
|
|
45
|
+
- Initial release;
|
|
46
|
+
- Aiming at Node.js version 12 and up.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## Version 0.11.0
|
|
4
|
+
|
|
5
|
+
* Bump `parseley` dependency to version 0.12.0 ([changelog](https://github.com/mxxii/parseley/blob/main/CHANGELOG.md)). Escape sequences in selectors.
|
|
6
|
+
|
|
7
|
+
## Version 0.10.0
|
|
8
|
+
|
|
9
|
+
* Targeting Node.js version 14 and ES2020;
|
|
10
|
+
* Bump dependencies.
|
|
11
|
+
|
|
12
|
+
## Version 0.9.0
|
|
13
|
+
|
|
14
|
+
* Bump dependencies - fix "./core module cannot be found" issue.
|
|
15
|
+
|
|
16
|
+
## Version 0.8.1
|
|
17
|
+
|
|
18
|
+
* Bump `parseley` dependency to version 0.9.1 ([changelog](https://github.com/mxxii/parseley/blob/main/CHANGELOG.md)). Now all dependencies are TypeScript, dual CommonJS/ES module packages;
|
|
19
|
+
* Use `rollup-plugin-cleanup` to condition published files;
|
|
20
|
+
* Package is marked as free of side effects.
|
|
21
|
+
|
|
22
|
+
## Version 0.7.0
|
|
23
|
+
|
|
24
|
+
* Drop Node.js version 10 support. At least 12.22.x is required.
|
|
25
|
+
|
|
26
|
+
## Version 0.6.0
|
|
27
|
+
|
|
28
|
+
* Give priority to more common attribute values (Previously the first matching simple selector was taken instead);
|
|
29
|
+
* Repeated simple selectors should not affect the tree balance and should not produce extra tree nodes (But they affect the specificity).
|
|
30
|
+
|
|
31
|
+
## Version 0.5.0
|
|
32
|
+
|
|
33
|
+
Initial release.
|
|
34
|
+
|
|
35
|
+
Aiming at Node.js version 10 and up.
|