Skip to content

Commit

Permalink
Merge branch 'master' into serverlesscluster-resource-arn-prop
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] committed Oct 6, 2020
2 parents 20d3899 + 8006459 commit 4a2f96d
Show file tree
Hide file tree
Showing 17 changed files with 44 additions and 36 deletions.
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,18 +82,18 @@
"aws-cdk-lib/semver/**",
"aws-cdk-lib/yaml",
"aws-cdk-lib/yaml/**",
"monocdk-experiment/case",
"monocdk-experiment/case/**",
"monocdk-experiment/fs-extra",
"monocdk-experiment/fs-extra/**",
"monocdk-experiment/jsonschema",
"monocdk-experiment/jsonschema/**",
"monocdk-experiment/minimatch",
"monocdk-experiment/minimatch/**",
"monocdk-experiment/semver",
"monocdk-experiment/semver/**",
"monocdk-experiment/yaml",
"monocdk-experiment/yaml/**"
"monocdk/case",
"monocdk/case/**",
"monocdk/fs-extra",
"monocdk/fs-extra/**",
"monocdk/jsonschema",
"monocdk/jsonschema/**",
"monocdk/minimatch",
"monocdk/minimatch/**",
"monocdk/semver",
"monocdk/semver/**",
"monocdk/yaml",
"monocdk/yaml/**"
]
}
}
8 changes: 7 additions & 1 deletion packages/@aws-cdk/aws-stepfunctions/lib/state-machine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,13 @@ export class StateMachine extends StateMachineBase {
private buildTracingConfiguration(): CfnStateMachine.TracingConfigurationProperty {
this.addToRolePolicy(new iam.PolicyStatement({
// https://docs.aws.amazon.com/xray/latest/devguide/security_iam_id-based-policy-examples.html#xray-permissions-resources
actions: ['xray:PutTraceSegments', 'xray:PutTelemetryRecords'],
// https://docs.aws.amazon.com/step-functions/latest/dg/xray-iam.html
actions: [
'xray:PutTraceSegments',
'xray:PutTelemetryRecords',
'xray:GetSamplingRules',
'xray:GetSamplingTargets',
],
resources: ['*'],
}));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ describe('State Machine', () => {
Action: [
'xray:PutTraceSegments',
'xray:PutTelemetryRecords',
'xray:GetSamplingRules',
'xray:GetSamplingTargets',
],
Effect: 'Allow',
Resource: '*',
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/cfnspec/build-tools/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ node ${scriptdir}/create-missing-libraries.js || {

# update decdk dep list
(cd ${scriptdir}/../../../decdk && node ./deps.js || true)
(cd ${scriptdir}/../../../monocdk-experiment && yarn gen || true)
(cd ${scriptdir}/../../../monocdk && yarn gen || true)

# append old changelog after new and replace as the last step because otherwise we will not be idempotent
_changelog_contents=$(cat CHANGELOG.md.new)
Expand Down
4 changes: 2 additions & 2 deletions packages/@monocdk-experiment/assert/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"cdk-build-tools": "0.0.0",
"constructs": "^3.0.4",
"jest": "^26.4.2",
"monocdk-experiment": "0.0.0",
"monocdk": "0.0.0",
"pkglint": "0.0.0",
"ts-jest": "^26.4.1"
},
Expand All @@ -49,7 +49,7 @@
"peerDependencies": {
"constructs": "^3.0.4",
"jest": "^26.4.2",
"monocdk-experiment": "^0.0.0"
"monocdk": "^0.0.0"
},
"repository": {
"url": "https://github.com/aws/aws-cdk.git",
Expand Down
2 changes: 1 addition & 1 deletion packages/@monocdk-experiment/rewrite-imports/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
---
<!--END STABILITY BANNER-->

Migrate TypeScript `import` statements from modular CDK (i.e. `@aws-cdk/aws-s3`) to mono-cdk (i.e. `monocdk-experiment/aws-s3`);
Migrate TypeScript `import` statements from modular CDK (i.e. `@aws-cdk/aws-s3`) to mono-cdk (i.e. `monocdk/aws-s3`);

Usage:

Expand Down
4 changes: 2 additions & 2 deletions packages/@monocdk-experiment/rewrite-imports/lib/rewrite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ function updatedLocationOf(modulePath: string): string | undefined {
}

if (modulePath === '@aws-cdk/core') {
return 'monocdk-experiment';
return 'monocdk';
}

if (modulePath === '@aws-cdk/assert') {
Expand All @@ -109,5 +109,5 @@ function updatedLocationOf(modulePath: string): string | undefined {
return '@monocdk-experiment/assert/jest';
}

return `monocdk-experiment/${modulePath.substring(9)}`;
return `monocdk/${modulePath.substring(9)}`;
}
2 changes: 1 addition & 1 deletion packages/@monocdk-experiment/rewrite-imports/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@monocdk-experiment/rewrite-imports",
"version": "0.0.0",
"description": "Rewrites typescript 'import' statements from @aws-cdk/xxx to monocdk-experiment",
"description": "Rewrites typescript 'import' statements from @aws-cdk/xxx to monocdk",
"bin": {
"rewrite-imports": "bin/rewrite-imports"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ describe(rewriteImports, () => {

expect(output).toBe(`
// something before
import * as s3 from 'monocdk-experiment/aws-s3';
import * as s3 from 'monocdk/aws-s3';
import * as cfndiff from '@aws-cdk/cloudformation-diff';
import { Construct } from "monocdk-experiment";
import { Construct } from "monocdk";
// something after
console.log('Look! I did something!');`);
Expand All @@ -65,9 +65,9 @@ describe(rewriteImports, () => {

expect(output).toBe(`
// something before
import s3 = require('monocdk-experiment/aws-s3');
import s3 = require('monocdk/aws-s3');
import cfndiff = require('@aws-cdk/cloudformation-diff');
import { Construct } = require("monocdk-experiment");
import { Construct } = require("monocdk");
// something after
console.log('Look! I did something!');`);
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ An __experiment__ to bundle all of the CDK into a single module.
## Usage

### Installation
To try out `monocdk-experiment` replace all references to CDK Construct
To try out `monocdk` replace all references to CDK Construct
Libraries (most `@aws-cdk/*` packages) in your `package.json` file with a single
entrey referring to `monocdk-experiment`.
entrey referring to `monocdk`.

You also need to add a reference to the `constructs` library, according to the
kind of project you are developing:
Expand All @@ -27,7 +27,7 @@ kind of project you are developing:
You can use a classic import to get access to each service namespaces:

```ts
import { core, aws_s3 as s3 } from 'monocdk-experiment';
import { core, aws_s3 as s3 } from 'monocdk';

const app = new core.App();
const stack = new core.Stack(app, 'MonoCDK-Stack');
Expand All @@ -40,8 +40,8 @@ new s3.Bucket(stack, 'TestBucket');
Alternatively, you can use "barrel" imports:

```ts
import { App, Stack } from 'monocdk-experiment';
import { Bucket } from 'monocdk-experiment/aws-s3';
import { App, Stack } from 'monocdk';
import { Bucket } from 'monocdk/aws-s3';

const app = new App();
const stack = new Stack(app, 'MonoCDK-Stack');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "monocdk-experiment",
"name": "monocdk",
"version": "0.0.0",
"description": "An experiment to bundle the entire CDK into a single module",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"repository": {
"type": "git",
"url": "https://github.com/aws/aws-cdk.git",
"directory": "packages/monocdk-experiment"
"directory": "packages/monocdk"
},
"stability": "experimental",
"maturity": "developer-preview",
Expand Down Expand Up @@ -52,7 +52,7 @@
"targets": {
"dotnet": {
"namespace": "Amazon.CDK",
"packageId": "Amazon.CDK.MonoCDK.Experiment",
"packageId": "Amazon.CDK.MonoCDK.",
"iconUrl": "https://raw.githubusercontent.com/aws/aws-cdk/master/logo/default-256-dark.png",
"versionSuffix": "-devpreview",
"signAssembly": true,
Expand All @@ -62,13 +62,13 @@
"package": "software.amazon.awscdk.core",
"maven": {
"groupId": "software.amazon.awscdk",
"artifactId": "monocdk-experiment",
"artifactId": "monocdk",
"versionSuffix": ".DEVPREVIEW"
}
},
"python": {
"distName": "monocdk.experiment",
"module": "monocdk_experiment"
"distName": "monocdk",
"module": "monocdk"
}
},
"projectReferences": false
Expand Down
2 changes: 1 addition & 1 deletion tools/pkglint/lib/rules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ export class JSIIProjectReferences extends ValidationRule {
this.name,
pkg,
'jsii.projectReferences',
pkg.json.name !== 'monocdk-experiment' && pkg.json.name !== 'aws-cdk-lib',
pkg.json.name !== 'monocdk' && pkg.json.name !== 'aws-cdk-lib',
);
}
}
Expand Down

0 comments on commit 4a2f96d

Please sign in to comment.