@adobe/helix-deploy 9.2.4 → 9.3.1

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 CHANGED
@@ -1,3 +1,17 @@
1
+ ## [9.3.1](https://github.com/adobe/helix-deploy/compare/v9.3.0...v9.3.1) (2023-09-09)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **deps:** update external fixes ([b70339a](https://github.com/adobe/helix-deploy/commit/b70339a78e8bee7c7b4abb387bfe056f4843d37d))
7
+
8
+ # [9.3.0](https://github.com/adobe/helix-deploy/compare/v9.2.4...v9.3.0) (2023-09-07)
9
+
10
+
11
+ ### Features
12
+
13
+ * improve error message for invalid deploy bundle ([#576](https://github.com/adobe/helix-deploy/issues/576)) ([5d192a6](https://github.com/adobe/helix-deploy/commit/5d192a6a298962b1f7f8123c8bcd2a38fb2f68b9))
14
+
1
15
  ## [9.2.4](https://github.com/adobe/helix-deploy/compare/v9.2.3...v9.2.4) (2023-09-02)
2
16
 
3
17
 
package/README.md CHANGED
@@ -44,189 +44,127 @@ you can also use npx: `npx hedy` or install it globally `npm install -g helix-de
44
44
  ```console
45
45
  $ hedy --help
46
46
  General Options
47
- -v, --verbose [boolean] [default: false]
48
- --directory Project directory [string] [default: "."]
49
- --version Show version number [boolean]
47
+ -v, --verbose [boolean] [default: false]
48
+ --directory Project directory [string] [default: "."]
49
+ --version Show version number [boolean]
50
50
 
51
51
  Operation Options
52
- --help Show help [boolean]
53
- --build Build the deployment package [boolean] [default: true]
54
- --deploy Automatically deploy to specified targets
55
- [boolean] [default: false]
56
- --test Invoke action after deployment. Can be relative url or "
57
- true" [string]
58
- --test-bundle Invoke bundle after build. Can be relative url or "true"
59
- . Defaults to the same as --test [string]
60
- --update-package Create or update package with params.
61
- [boolean] [default: false]
62
- -l, --version-link Create symlinks (sequences) after deployment. "major" an
63
- d "minor" will create respective version links [array]
64
- --delete Delete the action from OpenWhisk. Implies no-build
65
- [boolean] [default: false]
52
+ --help Show help [boolean]
53
+ --build Build the deployment package [boolean] [default: true]
54
+ --deploy Automatically deploy to specified targets [boolean] [default: false]
55
+ --test Invoke action after deployment. Can be relative url or "true" [string]
56
+ --test-bundle Invoke bundle after build. Can be relative url or "true". Defaults to the same as --test [string]
57
+ --update-package Create or update package with params. [boolean] [default: false]
58
+ -l, --version-link Create symlinks (sequences) after deployment. "major" and "minor" will create respective version links [array]
59
+ --delete Delete the action from OpenWhisk. Implies no-build [boolean] [default: false]
66
60
 
67
61
  Build Options
68
- --minify Minify the final bundle [boolean] [default: false]
69
- -s, --static Includes a static file into the archive
70
- [array] [default: []]
71
- --entryFile Specifies the entry file (the universal function).
72
- [default: "src/index.js"]
73
- --externals Defines the externals for the bundler.[array] [default: []]
74
- -m, --modules Include a node_module as is. [array] [default: []]
75
- --adapterFile Specifies the adapter file (the exported module).
76
- --esm Produce EcmaScript Module (experimental, disables edge arch
77
- ) [boolean] [default: false]
78
- --bundler Select bundler backend (webpack, rollup)
79
- [string] [default: "webpack"]
62
+ --minify Minify the final bundle [boolean] [default: false]
63
+ -s, --static Includes a static file into the archive [array] [default: []]
64
+ --entryFile Specifies the entry file (the universal function). [default: "src/index.js"]
65
+ --externals Defines the externals for the bundler (these dependencies will not be bundled). [array] [default: []]
66
+ --edge-externals Defines the externals for the edge bundler (these dependencies will not be bundled for Cloudflare or Fastly). [array] [default: []]
67
+ --serverless-externals Defines the externals for the serverless bundler (these dependencies will not be bundled for AWS Lambda or Google Cloud Functions). [array] [default: []]
68
+ -m, --modules Include a node_module as is. [array] [default: []]
69
+ --adapterFile Specifies the adapter file (the exported module).
70
+ --esm Produce EcmaScript Module (experimental, disables edge arch) [boolean] [default: false]
71
+ --bundler Select bundler backend (webpack, rollup) [string] [default: "webpack"]
80
72
 
81
73
  Deploy Options
82
- --target Select target(s) for test, deploy, update-package act
83
- ions (wsk,aws,google,auto)[array] [default: ["auto"]]
84
- --hints, --no-hints Show additional hints for deployment
85
- [boolean] [default: true]
74
+ --target Select target(s) for test, deploy, update-package actions (wsk,aws,google,auto) [array] [default: ["auto"]]
75
+ --hints, --no-hints Show additional hints for deployment [boolean] [default: true]
86
76
 
87
77
  Test Options
88
- --target Select target(s) for test, deploy, update-package actions
89
- (wsk,aws,google,auto) [array] [default: ["auto"]]
90
- --test-params Invoke openwhisk action after deployment with the given pa
91
- rams. [array] [default: []]
92
- --test-url Test url to use after deployment, in case --test is not an
93
- url. [string]
94
- --test-headers Test headers to send in test requests.
95
- [array] [default: []]
78
+ --target Select target(s) for test, deploy, update-package actions (wsk,aws,google,auto) [array] [default: ["auto"]]
79
+ --test-params Invoke openwhisk action after deployment with the given params. [array] [default: []]
80
+ --test-url Test url to use after deployment, in case --test is not an url. [string]
81
+ --test-headers Test headers to send in test requests. [array] [default: []]
96
82
 
97
83
  Link Options
98
- --target Select target(s) for test, deploy, update-package actions (
99
- wsk,aws,google,auto) [array] [default: ["auto"]]
100
- --linkPackage Package name for version links [string]
84
+ --target Select target(s) for test, deploy, update-package actions (wsk,aws,google,auto) [array] [default: ["auto"]]
85
+ --linkPackage Package name for version links [string]
101
86
 
102
87
  Update Package Options
103
- --package.params OpenWhisk package params. [array] [default: []]
104
- --package.params-file OpenWhisk package params file.[array] [default: []]
88
+ --package.params OpenWhisk package params. [array] [default: []]
89
+ --package.params-file OpenWhisk package params file. [array] [default: []]
105
90
 
106
- Cleanup Old Deployments: automatically delete redundant versions older than spe
107
- cified.
91
+ Cleanup Old Deployments: automatically delete redundant versions older than specified.
108
92
  Use a pattern like 7d or 1m to specify time frames.
109
93
  Use a simple number like --cleanup-ci=5 to retain the last five CI builds
110
94
  --cleanup-ci Automatically delete redundant CI versions
111
- --cleanup-patch Automatically delete redundant patch versions. At least o
112
- ne patch version for each minor version will be kept.
113
- --cleanup-minor Automatically delete redundant minor versions. At least o
114
- ne minor version for each major version will be kept.
95
+ --cleanup-patch Automatically delete redundant patch versions. At least one patch version for each minor version will be kept.
96
+ --cleanup-minor Automatically delete redundant minor versions. At least one minor version for each major version will be kept.
115
97
  --cleanup-major Automatically delete redundant major versions.
116
98
 
117
99
  General Action Options
118
100
  --name Action name. Can be prefixed with package.
119
- --package.name Action package name. [string]
120
- --node-version Specifies the node.js version to use in the serverless run
121
- time [default: "14"]
122
- -p, --params Include the given action param. can be json or env.
123
- [array] [default: []]
124
- -f, --params-file Include the given action param from a file; can be json or
125
- env. [array] [default: []]
126
- --updated-by user that updated the action or sequence. [string]
127
- --updated-at unix timestamp when the action or sequence was updated (de
128
- faults to the current time).
129
- [number] [default: 1642491741896]
130
- --web-secure Annotates the action with require-whisk-auth. leave empty
131
- to generate random token. [string]
132
- -t, --timeout the timeout limit in milliseconds after which the action i
133
- s terminated [default: 60000]
101
+ --package.name Action package name. [string]
102
+ --node-version Specifies the node.js version to use in the serverless runtime [default: "18"]
103
+ -p, --params Include the given action param. can be json or env. [array] [default: []]
104
+ -f, --params-file Include the given action param from a file; can be json or env. [array] [default: []]
105
+ --updated-by user that updated the action or sequence. [string]
106
+ --updated-at unix timestamp when the action or sequence was updated (defaults to the current time). [number] [default: 1693809202744]
107
+ --web-secure Annotates the action with require-whisk-auth. leave empty to generate random token. [string]
108
+ -t, --timeout the timeout limit in milliseconds after which the action is terminated [default: 60000]
134
109
  --pkgVersion Version use in the embedded package.json.
135
110
  --memory the maximum memory LIMIT in MB for the action
136
- --concurrency the maximum intra-container concurrent activation LIMIT fo
137
- r the action
111
+ --concurrency the maximum intra-container concurrent activation LIMIT for the action
138
112
 
139
113
  OpenWhisk Action Options
140
- --namespace OpenWhisk namespace. Needs to match the namespace provid
141
- ed with the openwhisk credentials.
142
- --package.shared OpenWhisk package scope. [boolean] [default: false]
114
+ --namespace OpenWhisk namespace. Needs to match the namespace provided with the openwhisk credentials.
115
+ --package.shared OpenWhisk package scope. [boolean] [default: false]
143
116
 
144
117
  AWS Deployment Options
145
- --aws-region the AWS region to deploy lambda functions to
146
- [string] [default: ""]
147
- --aws-api the AWS API Gateway name. (id, "auto" or "crea
148
- te") [string] [default: "auto"]
149
- --aws-role the AWS role ARN to execute lambda functions w
150
- ith [string] [default: ""]
151
- --aws-cleanup-buckets Cleans up stray temporary S3 buckets
152
- [boolean] [default: false]
153
- --aws-cleanup-integrations Cleans up unused integrations
154
- [boolean] [default: false]
155
- --aws-create-routes Create routes for function (usually not needed
156
- due to proxy function).
157
- [boolean] [default: false]
118
+ --aws-region the AWS region to deploy lambda functions to [string] [default: ""]
119
+ --aws-api the AWS API Gateway name. (id, "auto" or "create") [string] [default: "auto"]
120
+ --aws-role the AWS role ARN to execute lambda functions with [string] [default: ""]
121
+ --aws-cleanup-buckets
122
+ --aws-cleanup-integrations Cleans up unused integrations [boolean] [default: false]
123
+ --aws-create-routes Create routes for function (usually not needed due to proxy function). [boolean] [default: false]
124
+ --aws-create-authorizer Creates API Gateway authorizer using lambda authorization with this function and the specified name. The string can contain placeholders (note that all dots ('.') are replaced with underscores. Example: "helix-authorizer_${version}". [string]
125
+ --aws-attach-authorizer Attach specified authorizer to routes during linking. [string]
126
+ --aws-lambda-format Format to use to create lambda functions (note that all dots ('.') will be replaced with underscores. [string] [default: "${packageName}--${baseName}"]
127
+ --aws-parameter-manager Manager to use for storing package params. (either "secret" for Secrets Manager or "system" for System Manager) [array] [default: ["secret"]]
128
+ --aws-deploy-template
129
+ --aws-arch deployment architecture. either 'x86_64' or 'arm64' [string] [default: "x86_64"]
130
+ --aws-update-secrets Uploads the function specific secrets with the params. defaults to /helix-deploy/{pkg}/{name} [string]
131
+ --aws-deploy-bucket Name of the deploy S3 bucket to use (default is helix-deploy-bucket-{accountId}) [string] [default: ""]
132
+ --aws-identity-source Identity source to used when creating the authorizer [array] [default: ["$request.header.Authorization"]]
158
133
 
159
134
  Google Deployment Options
160
- --google-project-id the Google Cloud project to deploy to. Optional when
161
- the key file is a JSON file [string] [default: ""]
162
- --google-key-file full path to the a .json, .pem, or .p12 key downloade
163
- d from the Google Developers Console
164
- [string] [default: ""]
165
- --google-email the Google account email address. Required when usin
166
- g a .pem or .p12 credential file
167
- [string] [default: ""]
135
+ --google-project-id the Google Cloud project to deploy to. Optional when the key file is a JSON file [string] [default: ""]
136
+ --google-key-file full path to the a .json, .pem, or .p12 key downloaded from the Google Developers Console [string] [default: ""]
137
+ --google-email the Google account email address. Required when using a .pem or .p12 credential file [string] [default: ""]
168
138
 
169
139
  Cloudflare Workers Deployment Options
170
- --cloudflare-account-id the Cloudflare account ID to deploy to
171
- [string] [default: ""]
172
- --cloudflare-auth the Cloudflare API token from https://dash.cloud
173
- flare.com/profile/api-tokens
174
- [string] [default: ""]
175
- --cloudflare-email the Cloudflare email address belonging to the au
176
- thentication token [string] [default: ""]
177
- --cloudflare-test-domain the *.workers.dev subdomain to use for testing d
178
- eployed scripts [string] [default: ""]
140
+ --cloudflare-account-id the Cloudflare account ID to deploy to [string] [default: ""]
141
+ --cloudflare-auth the Cloudflare API token from https://dash.cloudflare.com/profile/api-tokens [string] [default: ""]
142
+ --cloudflare-email the Cloudflare email address belonging to the authentication token [string] [default: ""]
143
+ --cloudflare-test-domain the *.workers.dev subdomain to use for testing deployed scripts [string] [default: ""]
179
144
 
180
145
  Fastly Compute@Edge Options
181
- --compute-service-id the Fastly Service to deploy the action to
182
- [string] [default: ""]
146
+ --compute-service-id the Fastly Service to deploy the action to [string] [default: ""]
183
147
  --compute-domain
184
- --fastly-auth the Fastly token [string] [default: ""]
185
- --coralogix-token the Coralogix token (to enable logging)
186
- [string] [default: ""]
187
- --compute-coralogix-app the Application name
188
- [string] [default: "fastly-compute"]
148
+ --fastly-auth the Fastly token [string] [default: ""]
149
+ --coralogix-token the Coralogix token (to enable logging) [string] [default: ""]
150
+ --compute-coralogix-app the Application name [string] [default: "fastly-compute"]
189
151
 
190
152
  Fastly Gateway Options
191
- --fastly-service-id the Fastly Service to use as a gateway
192
- [string] [default: ""]
193
- --fastly-auth the Fastly token [string] [default: ""]
194
- --checkpath the path to check as part of the Fastly health check
195
- [string] [default: ""]
196
- --coralogix-token the Coralogix token (to enable logging)
197
- [string] [default: ""]
198
- --coralogix-app the Application name
199
- [string] [default: "universal-runtime"]
153
+ --fastly-service-id the Fastly Service to use as a gateway [string] [default: ""]
154
+ --fastly-auth the Fastly token [string] [default: ""]
155
+ --checkpath the path to check as part of the Fastly health check [string] [default: ""]
156
+ --coralogix-token the Coralogix token (to enable logging) [string] [default: ""]
157
+ --coralogix-app the Application name [string] [default: "universal-runtime"]
200
158
 
201
159
  Options:
202
- --arch Select archs(s) for bundles (node,edge).
203
- [array] [default: ["node"]]
204
- --format Action formats
205
- [default: {"aws":"/${packageName}/${baseName}/${version}"}]
206
- --property Additional properties that can be used in formats
207
- . [default: {}]
208
- --package-token Protects access to the gateway-stored package par
209
- ameters with this token. leave empty to generate
210
- random token.
211
- [string] [default: "gXhVnUf6kIqZ64Xr0E4nTnlGBrKOrybQA7Ifx1S/2CA="]
212
- --aws-parameter-manager Manager to use for storing package params. (eithe
213
- r "secret" for Secrets Manager or "system" for Sy
214
- stem Manager)
215
- [array] [default: ["secret","system"]]
216
- --aws-lambda-format Format to use to create lambda functions (note th
217
- at all dots ('.') will be replaced with underscor
218
- es.
219
- [string] [default: "${packageName}--${baseName}"]
220
- --google-region the Google Cloud region to deploy in
221
- [string] [default: ""]
222
- --compute-test-domain the domain name of the Compute@Edge service (used
223
- for testing) [string] [default: ""]
224
- --fastly-gateway the hostname of the Fastly gateway for package pa
225
- rams [string] [default: ""]
226
- --checkinterval the interval in milliseconds that each Fastly POP
227
- should perform a health check. Set to 0 to disab
228
- le health checks entirely.
229
- [number] [default: 6000000]
160
+ --arch Select archs(s) for bundles (node,edge). [array] [default: ["node"]]
161
+ --format Action formats [default: {"aws":"/${packageName}/${baseName}/${version}"}]
162
+ --property Additional properties that can be used in formats. [default: {}]
163
+ --package-token Protects access to the gateway-stored package parameters with this token. leave empty to generate random token. [string] [default: "hUX/5Jke1K+YAgZJiUw370/NZ/UsCuFyJHKHKEp73OM="]
164
+ --google-region the Google Cloud region to deploy in [string] [default: ""]
165
+ --compute-test-domain the domain name of the Compute@Edge service (used for testing) [string] [default: ""]
166
+ --fastly-gateway the hostname of the Fastly gateway for package params [string] [default: ""]
167
+ --checkinterval the interval in milliseconds that each Fastly POP should perform a health check. Set to 0 to disable health checks entirely. [number] [default: 6000000]
230
168
  ```
231
169
 
232
170
  With no arguments,the `hedy` just bundles your code into the respective `action.zip`:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/helix-deploy",
3
- "version": "9.2.4",
3
+ "version": "9.3.1",
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",
@@ -38,22 +38,22 @@
38
38
  "dependencies": {
39
39
  "@adobe/fastly-native-promises": "3.0.4",
40
40
  "@adobe/fetch": "4.0.13",
41
- "@aws-sdk/client-apigatewayv2": "3.405.0",
42
- "@aws-sdk/client-lambda": "3.405.0",
43
- "@aws-sdk/client-s3": "3.405.0",
44
- "@aws-sdk/client-secrets-manager": "3.405.0",
45
- "@aws-sdk/client-ssm": "3.405.0",
46
- "@aws-sdk/client-sts": "3.405.0",
47
- "@fastly/js-compute": "3.3.2",
48
- "@google-cloud/functions": "3.0.0",
49
- "@google-cloud/secret-manager": "5.0.0",
50
- "@google-cloud/storage": "7.0.1",
41
+ "@aws-sdk/client-apigatewayv2": "3.409.0",
42
+ "@aws-sdk/client-lambda": "3.409.0",
43
+ "@aws-sdk/client-s3": "3.409.0",
44
+ "@aws-sdk/client-secrets-manager": "3.409.0",
45
+ "@aws-sdk/client-ssm": "3.409.0",
46
+ "@aws-sdk/client-sts": "3.409.0",
47
+ "@fastly/js-compute": "3.3.4",
48
+ "@google-cloud/functions": "3.0.1",
49
+ "@google-cloud/secret-manager": "5.0.1",
50
+ "@google-cloud/storage": "7.1.0",
51
51
  "@rollup/plugin-alias": "5.0.0",
52
52
  "@rollup/plugin-commonjs": "25.0.4",
53
53
  "@rollup/plugin-json": "6.0.0",
54
54
  "@rollup/plugin-node-resolve": "15.2.1",
55
55
  "@rollup/plugin-terser": "0.4.3",
56
- "archiver": "6.0.0",
56
+ "archiver": "6.0.1",
57
57
  "chalk-template": "1.1.0",
58
58
  "constants-browserify": "1.0.0",
59
59
  "dotenv": "16.3.1",
@@ -62,9 +62,9 @@
62
62
  "fs-extra": "11.1.1",
63
63
  "isomorphic-git": "1.24.5",
64
64
  "openwhisk": "3.21.7",
65
- "rollup": "3.28.1",
65
+ "rollup": "3.29.0",
66
66
  "semver": "7.5.4",
67
- "tar": "6.1.15",
67
+ "tar": "6.2.0",
68
68
  "webpack": "5.88.2",
69
69
  "yargs": "17.7.2"
70
70
  },
@@ -75,7 +75,7 @@
75
75
  "@semantic-release/changelog": "6.0.3",
76
76
  "@semantic-release/git": "10.0.1",
77
77
  "c8": "8.0.1",
78
- "eslint": "8.48.0",
78
+ "eslint": "8.49.0",
79
79
  "husky": "8.0.3",
80
80
  "lint-staged": "14.0.1",
81
81
  "mocha": "10.2.0",
@@ -121,7 +121,8 @@ export default class AWSConfig {
121
121
  return yargs
122
122
  .group(['aws-region', 'aws-api', 'aws-role', 'aws-cleanup-buckets', 'aws-cleanup-integrations',
123
123
  'aws-create-routes', 'aws-create-authorizer', 'aws-attach-authorizer', 'aws-lambda-format',
124
- 'aws-parameter-manager', 'aws-deploy-template', 'aws-arch', 'aws-update-secrets'], 'AWS Deployment Options')
124
+ 'aws-parameter-manager', 'aws-deploy-template', 'aws-arch', 'aws-update-secrets',
125
+ 'aws-deploy-bucket', 'aws-identity-source'], 'AWS Deployment Options')
125
126
  .option('aws-region', {
126
127
  description: 'the AWS region to deploy lambda functions to',
127
128
  type: 'string',
@@ -184,9 +184,14 @@ export default class AWSDeployer extends BaseDeployer {
184
184
  Body: await fse.readFile(cfg.zipFile),
185
185
  };
186
186
 
187
- this.log.info(`--: uploading ${relZip} to S3 bucket ${this._bucket} ...`);
188
- await this._s3.send(new PutObjectCommand(uploadParams));
189
- this.log.info(chalk`{green ok:} uploaded deploy package {blueBright s3://${this._bucket}/${this._key}}`);
187
+ this.log.info(chalk`--: uploading ${relZip} to S3 bucket {blueBright s3://${this._bucket}}...`);
188
+ try {
189
+ await this._s3.send(new PutObjectCommand(uploadParams));
190
+ this.log.info(chalk`{green ok:} uploaded deploy package {blueBright s3://${this._bucket}/${this._key}}`);
191
+ } catch (e) {
192
+ this.log.error(chalk`{red error:} failed to update package to {blueBright s3://${this._bucket}/${this._key}}: ${e.message}`);
193
+ throw new Error('upload failed');
194
+ }
190
195
  }
191
196
 
192
197
  async deleteZIP() {