@adobe/helix-deploy 12.0.0-pre.2 → 12.0.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 CHANGED
@@ -1,3 +1,15 @@
1
+ # [12.0.0](https://github.com/adobe/helix-deploy/compare/v11.1.15...v12.0.0) (2024-06-28)
2
+
3
+
4
+ ### Features
5
+
6
+ * implement support for dynamic plugins ([9b68801](https://github.com/adobe/helix-deploy/commit/9b6880139db71008e4462060e0f4a90512b2fba5)), closes [#715](https://github.com/adobe/helix-deploy/issues/715)
7
+
8
+
9
+ ### BREAKING CHANGES
10
+
11
+ * the edge bundler, compute@edge and cloudflare deployer were moved to https://github.com/adobe/helix-deploy-plugin-edge and need to be loaded with the --plugin @adobe/helix-deploy-plugin-edge
12
+
1
13
  ## [11.1.15](https://github.com/adobe/helix-deploy/compare/v11.1.14...v11.1.15) (2024-06-22)
2
14
 
3
15
 
package/README.md CHANGED
@@ -56,6 +56,7 @@ Operation Options
56
56
  --update-package Create or update package with params. [boolean] [default: false]
57
57
  -l, --version-link Create symlinks (sequences) after deployment. "major" and "minor" will create respective version links [array]
58
58
  --delete Delete the action from OpenWhisk. Implies no-build [boolean] [default: false]
59
+ --plugin Specify bundler or deploy plugins. [array] [default: []]
59
60
 
60
61
  Build Options
61
62
  --minify Minify the final bundle [boolean] [default: false]
@@ -67,7 +68,8 @@ Build Options
67
68
  -m, --modules Include a node_module as is. [array] [default: []]
68
69
  --adapterFile Specifies the adapter file (the exported module).
69
70
  --esm Produce EcmaScript Module (experimental, disables edge arch) [boolean] [default: false]
70
- --bundler Select bundler backend (webpack, rollup) [string] [default: "webpack"]
71
+ --bundler
72
+ --dist-directory Specifies the dist (output) directory [default: "dist"]
71
73
 
72
74
  Deploy Options
73
75
  --target Select target(s) for test, deploy, update-package actions (wsk,aws,google,auto) [array] [default: ["auto"]]
@@ -102,7 +104,7 @@ General Action Options
102
104
  -p, --params Include the given action param. can be json or env. [array] [default: []]
103
105
  -f, --params-file Include the given action param from a file; can be json or env. [array] [default: []]
104
106
  --updated-by user that updated the action or sequence. [string]
105
- --updated-at unix timestamp when the action or sequence was updated (defaults to the current time). [number] [default: 1693809202744]
107
+ --updated-at unix timestamp when the action or sequence was updated (defaults to the current time). [number] [default: 1719567952628]
106
108
  --web-secure Annotates the action with require-whisk-auth. leave empty to generate random token. [string]
107
109
  -t, --timeout the timeout limit in milliseconds after which the action is terminated [default: 60000]
108
110
  --pkgVersion Version use in the embedded package.json.
@@ -119,6 +121,7 @@ AWS Deployment Options
119
121
  --aws-role the AWS role ARN to execute lambda functions with [string] [default: ""]
120
122
  --aws-cleanup-buckets
121
123
  --aws-cleanup-integrations Cleans up unused integrations [boolean] [default: false]
124
+ --aws-cleanup-versions Cleans up unused versions [boolean] [default: false]
122
125
  --aws-create-routes Create routes for function (usually not needed due to proxy function). [boolean] [default: false]
123
126
  --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]
124
127
  --aws-attach-authorizer Attach specified authorizer to routes during linking. [string]
@@ -129,46 +132,23 @@ AWS Deployment Options
129
132
  --aws-update-secrets Uploads the function specific secrets with the params. defaults to /helix-deploy/{pkg}/{name} [string]
130
133
  --aws-deploy-bucket Name of the deploy S3 bucket to use (default is helix-deploy-bucket-{accountId}) [string] [default: ""]
131
134
  --aws-identity-source Identity source to used when creating the authorizer [array] [default: ["$request.header.Authorization"]]
132
- --aws-log-format The lambda log format. Can be either "JSON" or "Text". [string]
135
+ --aws-log-format The lambda log format. Can be either "JSON" or "Text". [string]
133
136
  --aws-layers List of layers ARNs to attach to the lambda function. [array]
134
- --aws-tracing-mode The lambda tracing mode. Can be either "Active" or "PassThrough". [string]
135
- --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]
136
- --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]
137
+ --aws-tracing-mode The lambda tracing mode. Can be either "Active" or "PassThrough". [string]
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
+ --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]
137
140
 
138
141
  Google Deployment Options
139
142
  --google-project-id the Google Cloud project to deploy to. Optional when the key file is a JSON file [string] [default: ""]
140
143
  --google-key-file full path to the a .json, .pem, or .p12 key downloaded from the Google Developers Console [string] [default: ""]
141
144
  --google-email the Google account email address. Required when using a .pem or .p12 credential file [string] [default: ""]
142
145
 
143
- Cloudflare Workers Deployment Options
144
- --cloudflare-account-id the Cloudflare account ID to deploy to [string] [default: ""]
145
- --cloudflare-auth the Cloudflare API token from https://dash.cloudflare.com/profile/api-tokens [string] [default: ""]
146
- --cloudflare-email the Cloudflare email address belonging to the authentication token [string] [default: ""]
147
- --cloudflare-test-domain the *.workers.dev subdomain to use for testing deployed scripts [string] [default: ""]
148
-
149
- Fastly Compute@Edge Options
150
- --compute-service-id the Fastly Service to deploy the action to [string] [default: ""]
151
- --compute-domain
152
- --fastly-auth the Fastly token [string] [default: ""]
153
- --coralogix-token the Coralogix token (to enable logging) [string] [default: ""]
154
- --compute-coralogix-app the Application name [string] [default: "fastly-compute"]
155
-
156
- Fastly Gateway Options
157
- --fastly-service-id the Fastly Service to use as a gateway [string] [default: ""]
158
- --fastly-auth the Fastly token [string] [default: ""]
159
- --checkpath the path to check as part of the Fastly health check [string] [default: ""]
160
- --coralogix-token the Coralogix token (to enable logging) [string] [default: ""]
161
- --coralogix-app the Application name [string] [default: "universal-runtime"]
162
-
163
146
  Options:
164
- --arch Select archs(s) for bundles (node,edge). [array] [default: ["node"]]
165
- --format Action formats [default: {"aws":"/${packageName}/${baseName}/${version}"}]
166
- --property Additional properties that can be used in formats. [default: {}]
167
- --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="]
168
- --google-region the Google Cloud region to deploy in [string] [default: ""]
169
- --compute-test-domain the domain name of the Compute@Edge service (used for testing) [string] [default: ""]
170
- --fastly-gateway the hostname of the Fastly gateway for package params [string] [default: ""]
171
- --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]
147
+ --arch Select archs(s) for bundles (node,edge). [array] [default: ["node"]]
148
+ --format Action formats [default: {"aws":"/${packageName}/${baseName}/${version}"}]
149
+ --property Additional properties that can be used in formats. [default: {}]
150
+ --package-token Protects access to the gateway-stored package parameters with this token. leave empty to generate random token. [string] [default: "2l8JumQIoX+SLQRc2eO2TUh1VO44/qh9KkL7VZO1T9k="]
151
+ --google-region the Google Cloud region to deploy in [string] [default: ""]
172
152
  ```
173
153
 
174
154
  With no arguments,the `hedy` just bundles your code into the respective `action.zip`:
@@ -345,6 +325,16 @@ destination filename. eg:
345
325
  ...
346
326
  ```
347
327
 
328
+ ## Using Plugins
329
+
330
+ Helix deploy supports dynamic plugins that can be specified via the `--plugin` argument. The plugin
331
+ can export a `bundler` and/or `deployer` function. As an example, the following plugin can be used to
332
+ deploy to an edge compute platform: https://github.com/adobe/helix-deploy-plugin-edge
333
+
334
+ ```console
335
+ hedy --plugin @adobe/helix-deploy-plugin-edge --deploy
336
+ ```
337
+
348
338
  ## Using the development server
349
339
 
350
340
  Testing an universal function can be done with the [development server](https://github.com/adobe/helix-universal-devserver).
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@adobe/helix-deploy",
3
- "version": "12.0.0-pre.2",
3
+ "version": "12.0.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",
7
7
  "repository": {
8
8
  "type": "git",
9
- "url": "https://github.com/adobe/helix-deploy.git"
9
+ "url": "git+https://github.com/adobe/helix-deploy.git"
10
10
  },
11
11
  "bugs": {
12
12
  "url": "https://github.com/adobe/helix-deploy/issues"
@@ -26,7 +26,7 @@
26
26
  "integration-ci": "c8 mocha -g Integration",
27
27
  "semantic-release": "semantic-release",
28
28
  "semantic-release-dry": "semantic-release --dry-run --branches $CI_BRANCH",
29
- "prepare": "husky install"
29
+ "prepare": "husky"
30
30
  },
31
31
  "mocha": {
32
32
  "reporter": "mocha-multi-reporters",
package/src/BaseConfig.js CHANGED
@@ -190,6 +190,7 @@ export default class BaseConfig {
190
190
  .withVersion(argv.pkgVersion)
191
191
  .withNodeVersion(argv.nodeVersion)
192
192
  .withEntryFile(argv.entryFile)
193
+ .withDistDir(argv.distDirectory)
193
194
  .withAdapterFile(argv.adapterFile)
194
195
  .withExternals(argv.externals)
195
196
  .withEdgeExternals(argv.edgeExternals)
@@ -450,7 +451,7 @@ export default class BaseConfig {
450
451
  }
451
452
 
452
453
  withDistDir(value) {
453
- this.distDir = value;
454
+ this.distDir = path.resolve(process.cwd(), value);
454
455
  return this;
455
456
  }
456
457
 
@@ -639,7 +640,7 @@ export default class BaseConfig {
639
640
  default: [],
640
641
  })
641
642
 
642
- .group(['minify', 'static', 'entryFile', 'externals', 'edge-externals', 'serverless-externals', 'modules', 'adapterFile', 'esm', 'bundler'], 'Build Options')
643
+ .group(['minify', 'static', 'entryFile', 'externals', 'edge-externals', 'serverless-externals', 'modules', 'adapterFile', 'esm', 'bundler', 'dist-directory'], 'Build Options')
643
644
  .option('minify', {
644
645
  description: 'Minify the final bundle',
645
646
  type: 'boolean',
@@ -662,6 +663,10 @@ export default class BaseConfig {
662
663
  type: 'array',
663
664
  default: [],
664
665
  })
666
+ .option('dist-directory', {
667
+ description: 'Specifies the dist (output) directory',
668
+ default: 'dist',
669
+ })
665
670
  .option('entryFile', {
666
671
  description: 'Specifies the entry file (the universal function).',
667
672
  default: 'src/index.js',
package/params.json DELETED
@@ -1,3 +0,0 @@
1
- {
2
- "Parameters": []
3
- }