@adobe/helix-deploy 12.2.2 → 12.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 +14 -0
- package/README.md +8 -6
- package/package.json +9 -8
- package/src/cli.js +30 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [12.3.1](https://github.com/adobe/helix-deploy/compare/v12.3.0...v12.3.1) (2024-10-12)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **deps:** update external fixes to v3.670.0 ([#747](https://github.com/adobe/helix-deploy/issues/747)) ([568de98](https://github.com/adobe/helix-deploy/commit/568de98670ab282b1f26227597dfd644ff94f9fd))
|
|
7
|
+
|
|
8
|
+
# [12.3.0](https://github.com/adobe/helix-deploy/compare/v12.2.2...v12.3.0) (2024-10-10)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* change package.json config name to 'hlx' ([#744](https://github.com/adobe/helix-deploy/issues/744)) ([8fe86d6](https://github.com/adobe/helix-deploy/commit/8fe86d649d3971af5fdcdf917b9ea258003b7cec))
|
|
14
|
+
|
|
1
15
|
## [12.2.2](https://github.com/adobe/helix-deploy/compare/v12.2.1...v12.2.2) (2024-10-05)
|
|
2
16
|
|
|
3
17
|
|
package/README.md
CHANGED
|
@@ -218,7 +218,7 @@ hedy -p MY_TOKEN=@token.txt
|
|
|
218
218
|
### Specifying arguments in the `package.json`
|
|
219
219
|
|
|
220
220
|
Instead of passing all the arguments via command line, you can also specify them in the `package.json`
|
|
221
|
-
in the `
|
|
221
|
+
in the `hlx` object. eg:
|
|
222
222
|
|
|
223
223
|
```json
|
|
224
224
|
{
|
|
@@ -227,7 +227,7 @@ in the `wsk` object. eg:
|
|
|
227
227
|
"build": "./node_modules/.bin/hedy -v",
|
|
228
228
|
"deploy": "./node_modules/.bin/hedy -v --deploy --test"
|
|
229
229
|
},
|
|
230
|
-
"
|
|
230
|
+
"hlx": {
|
|
231
231
|
"name": "my-test-action",
|
|
232
232
|
"params-file": [
|
|
233
233
|
"secrets/secrets.env"
|
|
@@ -247,12 +247,14 @@ in the `wsk` object. eg:
|
|
|
247
247
|
}
|
|
248
248
|
```
|
|
249
249
|
|
|
250
|
+
The config name changed to `hlx` in version `12.3`. The previous name `wsk` is still supported, but deprecated. If both are present, `hlx` will be used.
|
|
251
|
+
|
|
250
252
|
### Versioning your action
|
|
251
253
|
|
|
252
254
|
It can be helpful to version the action name, eg with the `@version` notation. So for example
|
|
253
255
|
|
|
254
256
|
```json
|
|
255
|
-
"
|
|
257
|
+
"hlx": {
|
|
256
258
|
"name": "my-action@4.3.1"
|
|
257
259
|
}
|
|
258
260
|
```
|
|
@@ -260,7 +262,7 @@ It can be helpful to version the action name, eg with the `@version` notation. S
|
|
|
260
262
|
In order to automatically use the version of the `package.json` use:
|
|
261
263
|
|
|
262
264
|
```json
|
|
263
|
-
"
|
|
265
|
+
"hlx": {
|
|
264
266
|
"name": "my-action@${version}"
|
|
265
267
|
}
|
|
266
268
|
```
|
|
@@ -275,7 +277,7 @@ In addition to the `${version}` token described above, arguments will be interpo
|
|
|
275
277
|
```json
|
|
276
278
|
{
|
|
277
279
|
...
|
|
278
|
-
"
|
|
280
|
+
"hlx": {
|
|
279
281
|
...
|
|
280
282
|
"docker": "adobe/probot-ow-nodejs8:${env.PROBOT_DOCKER_VERSION}"
|
|
281
283
|
},
|
|
@@ -315,7 +317,7 @@ destination filename. eg:
|
|
|
315
317
|
|
|
316
318
|
```json
|
|
317
319
|
...
|
|
318
|
-
"
|
|
320
|
+
"hlx": {
|
|
319
321
|
...
|
|
320
322
|
"static": [
|
|
321
323
|
"config.json",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/helix-deploy",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.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",
|
|
@@ -39,18 +39,19 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@adobe/fetch": "4.1.9",
|
|
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.
|
|
42
|
+
"@aws-sdk/client-apigatewayv2": "3.670.0",
|
|
43
|
+
"@aws-sdk/client-lambda": "3.670.0",
|
|
44
|
+
"@aws-sdk/client-s3": "3.670.0",
|
|
45
|
+
"@aws-sdk/client-secrets-manager": "3.670.0",
|
|
46
|
+
"@aws-sdk/client-ssm": "3.670.0",
|
|
47
|
+
"@aws-sdk/client-sts": "3.670.0",
|
|
48
48
|
"@google-cloud/functions": "3.6.0",
|
|
49
49
|
"@google-cloud/secret-manager": "5.6.0",
|
|
50
50
|
"@google-cloud/storage": "7.13.0",
|
|
51
51
|
"archiver": "7.0.1",
|
|
52
52
|
"chalk-template": "1.1.0",
|
|
53
53
|
"dotenv": "16.4.5",
|
|
54
|
+
"escalade": "3.2.0",
|
|
54
55
|
"fs-extra": "11.2.0",
|
|
55
56
|
"isomorphic-git": "1.27.1",
|
|
56
57
|
"openwhisk": "3.21.8",
|
|
@@ -59,7 +60,7 @@
|
|
|
59
60
|
"yargs": "17.7.2"
|
|
60
61
|
},
|
|
61
62
|
"devDependencies": {
|
|
62
|
-
"@adobe/eslint-config-helix": "2.0.
|
|
63
|
+
"@adobe/eslint-config-helix": "2.0.8",
|
|
63
64
|
"@adobe/helix-shared-wrap": "2.0.2",
|
|
64
65
|
"@adobe/helix-status": "10.1.3",
|
|
65
66
|
"@semantic-release/changelog": "6.0.3",
|
package/src/cli.js
CHANGED
|
@@ -11,9 +11,11 @@
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
/* eslint-disable no-console */
|
|
14
|
+
import { readFileSync } from 'fs';
|
|
14
15
|
import yargs from 'yargs';
|
|
15
16
|
import chalk from 'chalk-template';
|
|
16
17
|
import { config as envConfig } from 'dotenv';
|
|
18
|
+
import escalade from 'escalade/sync';
|
|
17
19
|
import BaseConfig from './BaseConfig.js';
|
|
18
20
|
import OpenWhiskDeployer from './deploy/OpenWhiskDeployer.js';
|
|
19
21
|
import AWSDeployer from './deploy/AWSDeployer.js';
|
|
@@ -28,6 +30,12 @@ const PLUGINS = [
|
|
|
28
30
|
WebpackBundler,
|
|
29
31
|
];
|
|
30
32
|
|
|
33
|
+
const PKG_CONF = [
|
|
34
|
+
'hlx',
|
|
35
|
+
// original name for backwards compatibility
|
|
36
|
+
'wsk',
|
|
37
|
+
];
|
|
38
|
+
|
|
31
39
|
envConfig();
|
|
32
40
|
|
|
33
41
|
async function loadPlugin(name) {
|
|
@@ -65,10 +73,31 @@ async function loadPlugin(name) {
|
|
|
65
73
|
return plugins;
|
|
66
74
|
}
|
|
67
75
|
|
|
76
|
+
function findPkgJsonConfig() {
|
|
77
|
+
// fallback to original config name 'wsk' in case anything goes wrong
|
|
78
|
+
// for safe backwards compatibility
|
|
79
|
+
let cfg = 'wsk';
|
|
80
|
+
|
|
81
|
+
try {
|
|
82
|
+
// find package.json in parent directories (like yargs does)
|
|
83
|
+
const pkg = escalade(process.cwd(), (_, names) => (names.includes('package.json') ? 'package.json' : undefined));
|
|
84
|
+
|
|
85
|
+
if (pkg) {
|
|
86
|
+
const pkgJson = JSON.parse(readFileSync(pkg, 'utf8'));
|
|
87
|
+
// search for config key in package.json by priority in PKG_CONF array
|
|
88
|
+
cfg = PKG_CONF.find((key) => key in pkgJson) || cfg;
|
|
89
|
+
}
|
|
90
|
+
} catch (e) {
|
|
91
|
+
// ignore
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
return cfg;
|
|
95
|
+
}
|
|
96
|
+
|
|
68
97
|
export default class CLI {
|
|
69
98
|
buildArgs(plugins) {
|
|
70
99
|
this._yargs = yargs()
|
|
71
|
-
.pkgConf(
|
|
100
|
+
.pkgConf(findPkgJsonConfig())
|
|
72
101
|
.env('HLX')
|
|
73
102
|
.middleware((argv) => {
|
|
74
103
|
// convert process.env to flattened object with flat keys
|