@aws-cdk/aws-lambda-go-alpha 2.76.0-alpha.0 → 2.78.0-alpha.0

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 CHANGED
@@ -8,7 +8,7 @@
8
8
  "url": "https://aws.amazon.com"
9
9
  },
10
10
  "dependencies": {
11
- "aws-cdk-lib": "2.76.0",
11
+ "aws-cdk-lib": "2.78.0",
12
12
  "constructs": "^10.0.0"
13
13
  },
14
14
  "dependencyClosure": {
@@ -3414,7 +3414,7 @@
3414
3414
  "stability": "experimental"
3415
3415
  },
3416
3416
  "homepage": "https://github.com/aws/aws-cdk",
3417
- "jsiiVersion": "5.0.2 (build fc559a8)",
3417
+ "jsiiVersion": "5.0.7 (build 5782cd5)",
3418
3418
  "keywords": [
3419
3419
  "aws",
3420
3420
  "cdk",
@@ -3962,6 +3962,6 @@
3962
3962
  "symbolId": "lib/types:ICommandHooks"
3963
3963
  }
3964
3964
  },
3965
- "version": "2.76.0-alpha.0",
3965
+ "version": "2.78.0-alpha.0",
3966
3966
  "fingerprint": "**********"
3967
3967
  }
Binary file
package/lib/function.js CHANGED
@@ -68,7 +68,7 @@ class GoFunction extends lambda.Function {
68
68
  }
69
69
  }
70
70
  _a = JSII_RTTI_SYMBOL_1;
71
- GoFunction[_a] = { fqn: "@aws-cdk/aws-lambda-go-alpha.GoFunction", version: "2.76.0-alpha.0" };
71
+ GoFunction[_a] = { fqn: "@aws-cdk/aws-lambda-go-alpha.GoFunction", version: "2.78.0-alpha.0" };
72
72
  /**
73
73
  * The address of the Google Go proxy
74
74
  */
package/package.json CHANGED
@@ -1,17 +1,9 @@
1
1
  {
2
2
  "name": "@aws-cdk/aws-lambda-go-alpha",
3
- "version": "2.76.0-alpha.0",
3
+ "version": "2.78.0-alpha.0",
4
4
  "description": "The CDK Construct Library for AWS Lambda in Golang",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
7
- "typesVersions": {
8
- "<=3.9": {
9
- "*": [
10
- ".types-compat/ts3.9/*",
11
- ".types-compat/ts3.9/*/index.d.ts"
12
- ]
13
- }
14
- },
15
7
  "jsii": {
16
8
  "outdir": "dist",
17
9
  "targets": {
@@ -85,17 +77,17 @@
85
77
  },
86
78
  "license": "Apache-2.0",
87
79
  "devDependencies": {
88
- "@aws-cdk/cdk-build-tools": "2.76.0-alpha.0",
89
- "@aws-cdk/integ-runner": "2.76.0-alpha.0",
90
- "@aws-cdk/pkglint": "2.76.0-alpha.0",
80
+ "@aws-cdk/cdk-build-tools": "2.78.0-alpha.0",
81
+ "@aws-cdk/integ-runner": "2.78.0-alpha.0",
82
+ "@aws-cdk/pkglint": "2.78.0-alpha.0",
91
83
  "@types/jest": "^29.5.0",
92
- "aws-cdk-lib": "2.76.0",
84
+ "aws-cdk-lib": "2.78.0",
93
85
  "constructs": "^10.0.0"
94
86
  },
95
87
  "dependencies": {},
96
88
  "homepage": "https://github.com/aws/aws-cdk",
97
89
  "peerDependencies": {
98
- "aws-cdk-lib": "2.76.0",
90
+ "aws-cdk-lib": "2.78.0",
99
91
  "constructs": "^10.0.0"
100
92
  },
101
93
  "engines": {
@@ -126,4 +118,4 @@
126
118
  "assert/assert-dependency"
127
119
  ]
128
120
  }
129
- }
121
+ }
@@ -1,88 +0,0 @@
1
- /// <reference types="node" />
2
- import { Architecture, AssetCode, Runtime } from 'aws-cdk-lib/aws-lambda';
3
- import * as cdk from 'aws-cdk-lib';
4
- import { BundlingOptions } from './types';
5
- /**
6
- * Options for bundling
7
- */
8
- export interface BundlingProps extends BundlingOptions {
9
- /**
10
- * Directory containing your go.mod file
11
- *
12
- * This will accept either a directory path containing a `go.mod` file
13
- * or a filepath to your `go.mod` file (i.e. `path/to/go.mod`).
14
- *
15
- * This will be used as the source of the volume mounted in the Docker
16
- * container and will be the directory where it will run `go build` from.
17
- *
18
- * @default - the path is found by walking up parent directories searching for
19
- * a `go.mod` file from the location of `entry`
20
- */
21
- readonly moduleDir: string;
22
- /**
23
- * The path to the folder or file that contains the main application entry point files for the project.
24
- *
25
- * This accepts either a path to a directory or file.
26
- *
27
- * If a directory path is provided then it will assume there is a Go entry file (i.e. `main.go`) and
28
- * will construct the build command using the directory path.
29
- *
30
- * For example, if you provide the entry as:
31
- *
32
- * entry: 'my-lambda-app/cmd/api'
33
- *
34
- * Then the `go build` command would be:
35
- *
36
- * `go build ./cmd/api`
37
- *
38
- * If a path to a file is provided then it will use the filepath in the build command.
39
- *
40
- * For example, if you provide the entry as:
41
- *
42
- * entry: 'my-lambda-app/cmd/api/main.go'
43
- *
44
- * Then the `go build` command would be:
45
- *
46
- * `go build ./cmd/api/main.go`
47
- */
48
- readonly entry: string;
49
- /**
50
- * The runtime of the lambda function
51
- */
52
- readonly runtime: Runtime;
53
- /**
54
- * The system architecture of the lambda function
55
- */
56
- readonly architecture: Architecture;
57
- /**
58
- * Which option to use to copy the source files to the docker container and output files back
59
- * @default - BundlingFileAccess.BIND_MOUNT
60
- */
61
- readonly bundlingFileAccess?: cdk.BundlingFileAccess;
62
- }
63
- /**
64
- * Bundling
65
- */
66
- export declare class Bundling implements cdk.BundlingOptions {
67
- private readonly props;
68
- static bundle(options: BundlingProps): AssetCode;
69
- static clearRunsLocallyCache(): void;
70
- private static runsLocally?;
71
- readonly image: cdk.DockerImage;
72
- readonly command: string[];
73
- readonly environment?: {
74
- [key: string]: string;
75
- };
76
- readonly local?: cdk.ILocalBundling;
77
- readonly entrypoint?: string[];
78
- readonly volumes?: cdk.DockerVolume[];
79
- readonly volumesFrom?: string[];
80
- readonly workingDirectory?: string;
81
- readonly user?: string;
82
- readonly securityOpt?: string;
83
- readonly network?: string;
84
- readonly bundlingFileAccess?: cdk.BundlingFileAccess;
85
- private readonly relativeEntryPath;
86
- constructor(props: BundlingProps);
87
- createBundlingCommand(inputDir: string, outputDir: string, osPlatform?: NodeJS.Platform): string;
88
- }
@@ -1,70 +0,0 @@
1
- import * as lambda from 'aws-cdk-lib/aws-lambda';
2
- import { Construct } from 'constructs';
3
- import { BundlingOptions } from './types';
4
- /**
5
- * Properties for a GolangFunction
6
- */
7
- export interface GoFunctionProps extends lambda.FunctionOptions {
8
- /**
9
- * The path to the folder or file that contains the main application entry point files for the project.
10
- *
11
- * This accepts either a path to a directory or file.
12
- *
13
- * If a directory path is provided then it will assume there is a Go entry file (i.e. `main.go`) and
14
- * will construct the build command using the directory path.
15
- *
16
- * For example, if you provide the entry as:
17
- *
18
- * entry: 'my-lambda-app/cmd/api'
19
- *
20
- * Then the `go build` command would be:
21
- *
22
- * `go build ./cmd/api`
23
- *
24
- * If a path to a file is provided then it will use the filepath in the build command.
25
- *
26
- * For example, if you provide the entry as:
27
- *
28
- * entry: 'my-lambda-app/cmd/api/main.go'
29
- *
30
- * Then the `go build` command would be:
31
- *
32
- * `go build ./cmd/api/main.go`
33
- */
34
- readonly entry: string;
35
- /**
36
- * The runtime environment. Only runtimes of the Golang family and provided family are supported.
37
- *
38
- * @default lambda.Runtime.PROVIDED_AL2
39
- */
40
- readonly runtime?: lambda.Runtime;
41
- /**
42
- * Directory containing your go.mod file
43
- *
44
- * This will accept either a directory path containing a `go.mod` file
45
- * or a filepath to your `go.mod` file (i.e. `path/to/go.mod`).
46
- *
47
- * This will be used as the source of the volume mounted in the Docker
48
- * container and will be the directory where it will run `go build` from.
49
- *
50
- * @default - the path is found by walking up parent directories searching for
51
- * a `go.mod` file from the location of `entry`
52
- */
53
- readonly moduleDir?: string;
54
- /**
55
- * Bundling options
56
- *
57
- * @default - use default bundling options
58
- */
59
- readonly bundling?: BundlingOptions;
60
- }
61
- /**
62
- * A Golang Lambda function
63
- */
64
- export declare class GoFunction extends lambda.Function {
65
- /**
66
- * The address of the Google Go proxy
67
- */
68
- static readonly GOOGLE_GOPROXY = "https://proxy.golang.org";
69
- constructor(scope: Construct, id: string, props: GoFunctionProps);
70
- }
@@ -1,2 +0,0 @@
1
- export * from './function';
2
- export * from './types';
@@ -1,144 +0,0 @@
1
- import { AssetHashType, BundlingFileAccess, DockerImage, DockerRunOptions } from 'aws-cdk-lib';
2
- /**
3
- * Bundling options
4
- */
5
- export interface BundlingOptions extends DockerRunOptions {
6
- /**
7
- * Force bundling in a Docker container even if local bundling is
8
- * possible.
9
- *
10
- * @default - false
11
- */
12
- readonly forcedDockerBundling?: boolean;
13
- /**
14
- * A custom bundling Docker image.
15
- *
16
- * @default - use the Docker image provided by @aws-cdk/aws-lambda-go
17
- */
18
- readonly dockerImage?: DockerImage;
19
- /**
20
- * List of additional flags to use while building.
21
- *
22
- * For example:
23
- * ['ldflags "-s -w"']
24
- *
25
- * @default - none
26
- */
27
- readonly goBuildFlags?: string[];
28
- /**
29
- * Build arguments to pass when building the bundling image.
30
- *
31
- * @default - no build arguments are passed
32
- */
33
- readonly buildArgs?: {
34
- [key: string]: string;
35
- };
36
- /**
37
- * Determines how the asset hash is calculated. Assets will
38
- * get rebuilt and uploaded only if their hash has changed.
39
- *
40
- * If the asset hash is set to `OUTPUT` (default), the hash is calculated
41
- * after bundling. This means that any change in the output will cause
42
- * the asset to be invalidated and uploaded. Bear in mind that the
43
- * go binary that is output can be different depending on the environment
44
- * that it was compiled in. If you want to control when the output is changed
45
- * it is recommended that you use immutable build images such as
46
- * `public.ecr.aws/bitnami/golang:1.16.3-debian-10-r16`.
47
- *
48
- * If the asset hash is set to `SOURCE`, then only changes to the source
49
- * directory will cause the asset to rebuild. If your go project has multiple
50
- * Lambda functions this means that an update to any one function could cause
51
- * all the functions to be rebuilt and uploaded.
52
- *
53
- * @default - AssetHashType.OUTPUT. If `assetHash` is also specified,
54
- * the default is `CUSTOM`.
55
- */
56
- readonly assetHashType?: AssetHashType;
57
- /**
58
- * Specify a custom hash for this asset. If `assetHashType` is set it must
59
- * be set to `AssetHashType.CUSTOM`. For consistency, this custom hash will
60
- * be SHA256 hashed and encoded as hex. The resulting hash will be the asset
61
- * hash.
62
- *
63
- * NOTE: the hash is used in order to identify a specific revision of the asset, and
64
- * used for optimizing and caching deployment activities related to this asset such as
65
- * packaging, uploading to Amazon S3, etc. If you chose to customize the hash, you will
66
- * need to make sure it is updated every time the asset changes, or otherwise it is
67
- * possible that some deployments will not be invalidated.
68
- *
69
- * @default - based on `assetHashType`
70
- */
71
- readonly assetHash?: string;
72
- /**
73
- * Command hooks
74
- *
75
- * @default - do not run additional commands
76
- */
77
- readonly commandHooks?: ICommandHooks;
78
- /**
79
- * Whether or not to enable cgo during go build
80
- *
81
- * This will set the CGO_ENABLED environment variable
82
- *
83
- * @default - false
84
- */
85
- readonly cgoEnabled?: boolean;
86
- /**
87
- * What Go proxies to use to fetch the packages involved in the build
88
- *
89
- * Pass a list of proxy addresses in order, and/or the string `'direct'` to
90
- * attempt direct access.
91
- *
92
- * By default this construct uses no proxies, but a standard Go install would
93
- * use the Google proxy by default. To recreate that behavior, do the following:
94
- *
95
- * ```ts
96
- * new go.GoFunction(this, 'GoFunction', {
97
- * entry: 'app/cmd/api',
98
- * bundling: {
99
- * goProxies: [go.GoFunction.GOOGLE_GOPROXY, 'direct'],
100
- * },
101
- * });
102
- * ```
103
- *
104
- * @default - Direct access
105
- */
106
- readonly goProxies?: string[];
107
- /**
108
- * Which option to use to copy the source files to the docker container and output files back
109
- * @default - BundlingFileAccess.BIND_MOUNT
110
- */
111
- readonly bundlingFileAccess?: BundlingFileAccess;
112
- }
113
- /**
114
- * Command hooks
115
- *
116
- * These commands will run in the environment in which bundling occurs: inside
117
- * the container for Docker bundling or on the host OS for local bundling.
118
- *
119
- * Commands are chained with `&&`.
120
- *
121
- * ```text
122
- * {
123
- * // Run tests prior to bundling
124
- * beforeBundling(inputDir: string, outputDir: string): string[] {
125
- * return [`go test -mod=vendor ./...`];
126
- * }
127
- * // ...
128
- * }
129
- * ```
130
- */
131
- export interface ICommandHooks {
132
- /**
133
- * Returns commands to run before bundling.
134
- *
135
- * Commands are chained with `&&`.
136
- */
137
- beforeBundling(inputDir: string, outputDir: string): string[];
138
- /**
139
- * Returns commands to run after bundling.
140
- *
141
- * Commands are chained with `&&`.
142
- */
143
- afterBundling(inputDir: string, outputDir: string): string[];
144
- }
@@ -1,8 +0,0 @@
1
- /// <reference types="node" />
2
- import { SpawnSyncOptions } from 'child_process';
3
- export declare function getGoBuildVersion(): boolean | undefined;
4
- /**
5
- * Spawn sync with error handling
6
- */
7
- export declare function exec(cmd: string, args: string[], options?: SpawnSyncOptions): import("child_process").SpawnSyncReturns<string | Buffer>;
8
- export declare function findUp(name: string, directory?: string): string | undefined;
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};
@@ -1 +0,0 @@
1
- export {};