Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
webratz committed Jan 26, 2023
1 parent 6590681 commit 4ecaf47
Show file tree
Hide file tree
Showing 10 changed files with 8 additions and 18 deletions.
1 change: 0 additions & 1 deletion packages/@aws-cdk/aws-lambda-go/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,6 @@ By default the input and output of Docker based bundling is handled via bind mou
In situtations where this does not work, like Docker-in-Docker setups or when using a remote Docker socket, you can configure an alternative, but slower, variant that also works in these situations.

```ts
import { BundlingFileAccess } from '@aws-cdk/core';
new go.GoFunction(this, 'GoFunction', {
entry: 'app/cmd/api',
bundling: {
Expand Down
3 changes: 1 addition & 2 deletions packages/@aws-cdk/aws-lambda-go/lib/bundling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import * as os from 'os';
import * as path from 'path';
import { Architecture, AssetCode, Code, Runtime } from '@aws-cdk/aws-lambda';
import * as cdk from '@aws-cdk/core';
import { BundlingFileAccess } from '@aws-cdk/core';
import { BundlingOptions } from './types';
import { exec, findUp, getGoBuildVersion } from './util';

Expand Down Expand Up @@ -66,7 +65,7 @@ export interface BundlingProps extends BundlingOptions {
* Which option to use to copy the source files to the docker container and output files back
* @default - BundlingFileAccess.BIND_MOUNT
*/
readonly bundlingFileAccess?: BundlingFileAccess;
readonly bundlingFileAccess?: cdk.BundlingFileAccess;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-lambda-go/rosetta/default.ts-fixture
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Fixture with packages imported, but nothing else
import { Construct } from 'constructs';
import { DockerImage, Stack } from '@aws-cdk/core';
import { DockerImage, Stack, BundlingFileAccess } from '@aws-cdk/core';
import * as go from '@aws-cdk/aws-lambda-go';

class Fixture extends Stack {
Expand Down
1 change: 0 additions & 1 deletion packages/@aws-cdk/aws-lambda-nodejs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,6 @@ By default the input and output of Docker based bundling is handled via bind mou
In situtations where this does not work, like Docker-in-Docker setups or when using a remote Docker socket, you can configure an alternative, but slower, variant that also works in these situations.

```ts
import { BundlingFileAccess } from '@aws-cdk/core';
new nodejs.NodejsFunction(this, 'my-handler', {
bundling: {
bundlingFileAccess: BundlingFileAccess.VOLUME_COPY,
Expand Down
4 changes: 1 addition & 3 deletions packages/@aws-cdk/aws-lambda-nodejs/lib/bundling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { PackageInstallation } from './package-installation';
import { LockFile, PackageManager } from './package-manager';
import { BundlingOptions, OutputFormat, SourceMapMode } from './types';
import { exec, extractDependencies, findUp, getTsconfigCompilerOptions } from './util';
import { BundlingFileAccess } from '@aws-cdk/core';

const ESBUILD_MAJOR_VERSION = '0';

Expand Down Expand Up @@ -48,8 +47,7 @@ export interface BundlingProps extends BundlingOptions {
* Which option to use to copy the source files to the docker container and output files back
* @default - BundlingFileAccess.BIND_MOUNT
*/
readonly bundlingFileAccess?: BundlingFileAccess;

readonly bundlingFileAccess?: cdk.BundlingFileAccess;
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Fixture with packages imported, but nothing else
import { Construct } from 'constructs';
import { DockerImage, Stack } from '@aws-cdk/core';
import { DockerImage, Stack, BundlingFileAccess } from '@aws-cdk/core';
import * as nodejs from '@aws-cdk/aws-lambda-nodejs';

class Fixture extends Stack {
Expand Down
7 changes: 3 additions & 4 deletions packages/@aws-cdk/aws-lambda-python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,15 +258,14 @@ container for Docker bundling or on the host OS for local bundling.
By default the input and output of Docker based bundling is handled via bind mounts.
In situtations where this does not work, like Docker-in-Docker setups or when using a remote Docker socket, you can configure an alternative, but slower, variant that also works in these situations.

```ts
import { BundlingFileAccess } from '@aws-cdk/core';
const entry = '/path/to/function';
```ts
const entry = '/path/to/function';

new python.PythonFunction(this, 'function', {
entry,
runtime: Runtime.PYTHON_3_8,
bundling: {
bundlingFileAccess: BundlingFileAccess.VOLUME_COPY,
},
},
});
```
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Fixture with packages imported, but nothing else
import { Construct } from 'constructs';
import { DockerImage, Stack } from '@aws-cdk/core';
import { DockerImage, Stack, BundlingFileAccess } from '@aws-cdk/core';
import { Runtime } from '@aws-cdk/aws-lambda';
import * as python from '@aws-cdk/aws-lambda-python';

Expand Down
3 changes: 0 additions & 3 deletions packages/@aws-cdk/core/test/private/asset-staging.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { AssetBundlingBindMount, AssetBundlingVolumeCopy } from '../../lib/priva
describe('bundling', () => {
afterEach(() => {
sinon.restore();

});

test('AssetBundlingVolumeCopy bundles with volume copy ', () => {
Expand Down Expand Up @@ -109,7 +108,5 @@ describe('bundling', () => {
'-v',
'alpine',
]), { stdio: ['ignore', process.stderr, 'inherit'] })).toEqual(true);

});

});
1 change: 0 additions & 1 deletion packages/@aws-cdk/core/test/staging.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// import * as child_process from 'child_process';
import * as os from 'os';
import * as path from 'path';
import { testDeprecated } from '@aws-cdk/cdk-build-tools';
Expand Down

0 comments on commit 4ecaf47

Please sign in to comment.