Skip to content

Commit

Permalink
updating stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
corymhall committed Jan 2, 2025
1 parent 4a8a36b commit 37851dc
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions api-docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ Create and register an AWS CDK stack deployed with Pulumi.

###### Defined in

[stack.ts:337](https://github.com/pulumi/pulumi-cdk/blob/main/src/stack.ts#L337)
[stack.ts:336](https://github.com/pulumi/pulumi-cdk/blob/main/src/stack.ts#L336)

#### Methods

Expand Down Expand Up @@ -182,7 +182,7 @@ A Pulumi Output value.

###### Defined in

[stack.ts:419](https://github.com/pulumi/pulumi-cdk/blob/main/src/stack.ts#L419)
[stack.ts:418](https://github.com/pulumi/pulumi-cdk/blob/main/src/stack.ts#L418)

## Interfaces

Expand Down Expand Up @@ -297,7 +297,7 @@ new App('testapp', (scope: App) => {

| Property | Type | Description | Defined in |
| ------ | ------ | ------ | ------ |
| `props?` | `StackProps` | The CDK Stack props | [stack.ts:298](https://github.com/pulumi/pulumi-cdk/blob/main/src/stack.ts#L298) |
| `props?` | `StackProps` | The CDK Stack props | [stack.ts:297](https://github.com/pulumi/pulumi-cdk/blob/main/src/stack.ts#L297) |

## Type Aliases

Expand Down
6 changes: 1 addition & 5 deletions src/assembly/manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,7 @@ export class AssemblyManifestReader {
let template: CloudFormationTemplate;
const templateFile = path.join(this.directory, assetPath);
try {
const resolvedPath = path.isAbsolute(this.directory)
? path.resolve(this.directory, templateFile)
: templateFile;

template = fs.readJSONSync(resolvedPath);
template = fs.readJSONSync(path.resolve(templateFile));
} catch (e) {
throw new Error(`Failed to read CloudFormation template at path: ${templateFile}: ${e}`);
}
Expand Down
9 changes: 9 additions & 0 deletions tests/cdk-resource.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,15 @@ describe('CDK Construct tests', () => {
});

test('nested stack', async () => {
await testApp((scope: Construct) => {
const nestedStack = new NestedStack(scope, 'Nesty');
const bucket = new s3.Bucket(nestedStack, 'bucket');
});
const nested = resources.find((res) => res.type === 'aws-native:s3:Bucket');
expect(nested).toBeDefined();
});

test('nested stack with relative outdir', async () => {
await testApp(
(scope: Construct) => {
const nestedStack = new NestedStack(scope, 'Nesty');
Expand Down
5 changes: 0 additions & 5 deletions tests/mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,6 @@ export async function testApp(fn: (scope: Construct) => void, options?: AppResou
new TestStack(scope, 'teststack');
},
{
appOptions: {
props: {
outdir: undefined,
},
},
...options,
},
);
Expand Down

0 comments on commit 37851dc

Please sign in to comment.