@adobe/helix-deploy 12.0.9 → 12.1.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/CHANGELOG.md +14 -0
- package/README.md +1 -0
- package/package.json +11 -11
- package/src/deploy/AWSConfig.js +13 -2
- package/src/deploy/AWSDeployer.js +11 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [12.1.0](https://github.com/adobe/helix-deploy/compare/v12.0.10...v12.1.0) (2024-08-28)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **aws:** support configuring Lambda Handler ([#733](https://github.com/adobe/helix-deploy/issues/733)) ([dfb1be9](https://github.com/adobe/helix-deploy/commit/dfb1be95ee1ed58359c2b49cf32ccdfacb3da036))
|
|
7
|
+
|
|
8
|
+
## [12.0.10](https://github.com/adobe/helix-deploy/compare/v12.0.9...v12.0.10) (2024-08-24)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **deps:** update external fixes ([#732](https://github.com/adobe/helix-deploy/issues/732)) ([83e96fe](https://github.com/adobe/helix-deploy/commit/83e96fea25a5e651c45367dee5b7111847822982))
|
|
14
|
+
|
|
1
15
|
## [12.0.9](https://github.com/adobe/helix-deploy/compare/v12.0.8...v12.0.9) (2024-08-17)
|
|
2
16
|
|
|
3
17
|
|
package/README.md
CHANGED
|
@@ -137,6 +137,7 @@ AWS Deployment Options
|
|
|
137
137
|
--aws-tracing-mode The lambda tracing mode. Can be either "Active" or "PassThrough". [string]
|
|
138
138
|
--aws-extra-permissions A list of additional invoke permissions to add to the lambda function in the form <SourceARN>@<Principal>. Optionally, you can use <SourceARN>@<Principal>:<Alias> if you want to scope the permission to a specific alias. [array]
|
|
139
139
|
--aws-tags A list of additional tags to attach to the lambda function in the form key=value. To remove a tag, use key= (i.e. without a value). [array]
|
|
140
|
+
--aws-handler Set custom lambda Handler. For example, set if an AWS layer provides another function entry point. [string]
|
|
140
141
|
|
|
141
142
|
Google Deployment Options
|
|
142
143
|
--google-project-id the Google Cloud project to deploy to. Optional when the key file is a JSON file [string] [default: ""]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/helix-deploy",
|
|
3
|
-
"version": "12.0
|
|
3
|
+
"version": "12.1.0",
|
|
4
4
|
"description": "Library and Commandline Tools to build and deploy OpenWhisk Actions",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/adobe/helix-deploy#readme",
|
|
@@ -39,13 +39,13 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@adobe/fetch": "4.1.8",
|
|
41
41
|
"@adobe/helix-shared-process-queue": "3.0.4",
|
|
42
|
-
"@aws-sdk/client-apigatewayv2": "3.
|
|
43
|
-
"@aws-sdk/client-lambda": "3.
|
|
44
|
-
"@aws-sdk/client-s3": "3.
|
|
45
|
-
"@aws-sdk/client-secrets-manager": "3.
|
|
46
|
-
"@aws-sdk/client-ssm": "3.
|
|
47
|
-
"@aws-sdk/client-sts": "3.
|
|
48
|
-
"@google-cloud/functions": "3.
|
|
42
|
+
"@aws-sdk/client-apigatewayv2": "3.637.0",
|
|
43
|
+
"@aws-sdk/client-lambda": "3.637.0",
|
|
44
|
+
"@aws-sdk/client-s3": "3.637.0",
|
|
45
|
+
"@aws-sdk/client-secrets-manager": "3.637.0",
|
|
46
|
+
"@aws-sdk/client-ssm": "3.637.0",
|
|
47
|
+
"@aws-sdk/client-sts": "3.637.0",
|
|
48
|
+
"@google-cloud/functions": "3.6.0",
|
|
49
49
|
"@google-cloud/secret-manager": "5.6.0",
|
|
50
50
|
"@google-cloud/storage": "7.12.1",
|
|
51
51
|
"archiver": "7.0.1",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"isomorphic-git": "1.27.1",
|
|
56
56
|
"openwhisk": "3.21.8",
|
|
57
57
|
"semver": "7.6.3",
|
|
58
|
-
"webpack": "5.
|
|
58
|
+
"webpack": "5.94.0",
|
|
59
59
|
"yargs": "17.7.2"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
@@ -66,12 +66,12 @@
|
|
|
66
66
|
"@semantic-release/git": "10.0.1",
|
|
67
67
|
"c8": "10.1.2",
|
|
68
68
|
"eslint": "8.57.0",
|
|
69
|
-
"husky": "9.1.
|
|
69
|
+
"husky": "9.1.5",
|
|
70
70
|
"lint-staged": "15.2.9",
|
|
71
71
|
"mocha": "10.7.3",
|
|
72
72
|
"mocha-junit-reporter": "2.2.1",
|
|
73
73
|
"mocha-multi-reporters": "1.5.1",
|
|
74
|
-
"nock": "13.5.
|
|
74
|
+
"nock": "13.5.5",
|
|
75
75
|
"semantic-release": "24.1.0",
|
|
76
76
|
"yauzl": "3.1.3"
|
|
77
77
|
},
|
package/src/deploy/AWSConfig.js
CHANGED
|
@@ -35,6 +35,7 @@ export default class AWSConfig {
|
|
|
35
35
|
tracingMode: undefined,
|
|
36
36
|
extraPermissions: undefined,
|
|
37
37
|
tags: undefined,
|
|
38
|
+
handler: undefined,
|
|
38
39
|
});
|
|
39
40
|
}
|
|
40
41
|
|
|
@@ -58,7 +59,8 @@ export default class AWSConfig {
|
|
|
58
59
|
.withAWSLayers(argv.awsLayers)
|
|
59
60
|
.withAWSTracingMode(argv.awsTracingMode)
|
|
60
61
|
.withAWSExtraPermissions(argv.awsExtraPermissions)
|
|
61
|
-
.withAWSTags(argv.awsTags)
|
|
62
|
+
.withAWSTags(argv.awsTags)
|
|
63
|
+
.withAWSHandler(argv.awsHandler);
|
|
62
64
|
}
|
|
63
65
|
|
|
64
66
|
withAWSRegion(value) {
|
|
@@ -162,13 +164,18 @@ export default class AWSConfig {
|
|
|
162
164
|
return this;
|
|
163
165
|
}
|
|
164
166
|
|
|
167
|
+
withAWSHandler(value) {
|
|
168
|
+
this.handler = value;
|
|
169
|
+
return this;
|
|
170
|
+
}
|
|
171
|
+
|
|
165
172
|
static yarg(yargs) {
|
|
166
173
|
return yargs
|
|
167
174
|
.group(['aws-region', 'aws-api', 'aws-role', 'aws-cleanup-buckets', 'aws-cleanup-integrations',
|
|
168
175
|
'aws-cleanup-versions', 'aws-create-routes', 'aws-create-authorizer', 'aws-attach-authorizer',
|
|
169
176
|
'aws-lambda-format', 'aws-parameter-manager', 'aws-deploy-template', 'aws-arch', 'aws-update-secrets',
|
|
170
177
|
'aws-deploy-bucket', 'aws-identity-source', 'aws-log-format', 'aws-layers',
|
|
171
|
-
'aws-tracing-mode', 'aws-extra-permissions', 'aws-tags'], 'AWS Deployment Options')
|
|
178
|
+
'aws-tracing-mode', 'aws-extra-permissions', 'aws-tags', 'aws-handler'], 'AWS Deployment Options')
|
|
172
179
|
.option('aws-region', {
|
|
173
180
|
description: 'the AWS region to deploy lambda functions to',
|
|
174
181
|
type: 'string',
|
|
@@ -263,6 +270,10 @@ export default class AWSConfig {
|
|
|
263
270
|
description: 'A list of additional tags to attach to the lambda function in the form key=value. To remove a tag, use key= (i.e. without a value).',
|
|
264
271
|
type: 'array',
|
|
265
272
|
array: true,
|
|
273
|
+
})
|
|
274
|
+
.option('aws-handler', {
|
|
275
|
+
description: 'Set custom lambda Handler. For example, set if an AWS layer provides another function entry point.',
|
|
276
|
+
type: 'string',
|
|
266
277
|
});
|
|
267
278
|
}
|
|
268
279
|
}
|
|
@@ -218,9 +218,8 @@ export default class AWSDeployer extends BaseDeployer {
|
|
|
218
218
|
this.log.info(chalk`{green ok:} deleted deploy package {blueBright s3://${this._bucket}/${this._key}}.`);
|
|
219
219
|
}
|
|
220
220
|
|
|
221
|
-
|
|
221
|
+
get functionConfig() {
|
|
222
222
|
const { cfg, functionName, additionalTags } = this;
|
|
223
|
-
const functionVersion = cfg.version.replace(/\./g, '_');
|
|
224
223
|
|
|
225
224
|
const functionConfig = {
|
|
226
225
|
Code: {
|
|
@@ -247,7 +246,7 @@ export default class AWSDeployer extends BaseDeployer {
|
|
|
247
246
|
Environment: {
|
|
248
247
|
Variables: cfg.params,
|
|
249
248
|
},
|
|
250
|
-
Handler: cfg.esm ? 'esm-adapter/index.handler' : 'index.lambda',
|
|
249
|
+
Handler: this._cfg.handler || (cfg.esm ? 'esm-adapter/index.handler' : 'index.lambda'),
|
|
251
250
|
Architectures: [
|
|
252
251
|
this._cfg.arch,
|
|
253
252
|
],
|
|
@@ -263,6 +262,15 @@ export default class AWSDeployer extends BaseDeployer {
|
|
|
263
262
|
}
|
|
264
263
|
});
|
|
265
264
|
|
|
265
|
+
return functionConfig;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
async createLambda() {
|
|
269
|
+
const {
|
|
270
|
+
cfg, functionName, additionalTags, functionConfig,
|
|
271
|
+
} = this;
|
|
272
|
+
const functionVersion = cfg.version.replace(/\./g, '_');
|
|
273
|
+
|
|
266
274
|
this.log.info(`--: using lambda role "${this._cfg.role}"`);
|
|
267
275
|
|
|
268
276
|
// check if function already exists
|