@adobe/helix-deploy 6.2.3 → 6.2.7
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 +28 -0
- package/package.json +12 -12
- package/src/DevelopmentServer.js +36 -15
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,31 @@
|
|
|
1
|
+
## [6.2.7](https://github.com/adobe/helix-deploy/compare/v6.2.6...v6.2.7) (2022-02-05)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **deps:** update external fixes ([6c9defc](https://github.com/adobe/helix-deploy/commit/6c9defcb50fd1420574369df9099fd399f5e7e23))
|
|
7
|
+
|
|
8
|
+
## [6.2.6](https://github.com/adobe/helix-deploy/compare/v6.2.5...v6.2.6) (2022-02-04)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **deps:** update adobe fixes ([a6e8234](https://github.com/adobe/helix-deploy/commit/a6e8234df6e565bc108ff91436127d4464dbf12f))
|
|
14
|
+
|
|
15
|
+
## [6.2.5](https://github.com/adobe/helix-deploy/compare/v6.2.4...v6.2.5) (2022-02-04)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Bug Fixes
|
|
19
|
+
|
|
20
|
+
* fix more dev-server params ([#370](https://github.com/adobe/helix-deploy/issues/370)) ([300a457](https://github.com/adobe/helix-deploy/commit/300a4579e492da496f5ec2d66eb6bcf5d691438a))
|
|
21
|
+
|
|
22
|
+
## [6.2.4](https://github.com/adobe/helix-deploy/compare/v6.2.3...v6.2.4) (2022-02-04)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* fix development server dev params ([#368](https://github.com/adobe/helix-deploy/issues/368)) ([2e91e18](https://github.com/adobe/helix-deploy/commit/2e91e18d24222f936f978410857f1f1a675bc0da))
|
|
28
|
+
|
|
1
29
|
## [6.2.3](https://github.com/adobe/helix-deploy/compare/v6.2.2...v6.2.3) (2022-02-04)
|
|
2
30
|
|
|
3
31
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/helix-deploy",
|
|
3
|
-
"version": "6.2.
|
|
3
|
+
"version": "6.2.7",
|
|
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,13 +38,13 @@
|
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"@adobe/fastly-native-promises": "2.0.0",
|
|
41
|
-
"@adobe/helix-fetch": "3.0.
|
|
41
|
+
"@adobe/helix-fetch": "3.0.3",
|
|
42
42
|
"@aws-sdk/client-apigatewayv2": "3.49.0",
|
|
43
43
|
"@aws-sdk/client-lambda": "3.49.0",
|
|
44
44
|
"@aws-sdk/client-s3": "3.49.0",
|
|
45
45
|
"@aws-sdk/client-secrets-manager": "3.49.0",
|
|
46
46
|
"@aws-sdk/client-ssm": "3.49.0",
|
|
47
|
-
"@fastly/js-compute": "0.2.
|
|
47
|
+
"@fastly/js-compute": "0.2.2",
|
|
48
48
|
"@google-cloud/functions": "1.2.0",
|
|
49
49
|
"@google-cloud/secret-manager": "3.10.1",
|
|
50
50
|
"@google-cloud/storage": "5.18.1",
|
|
@@ -55,26 +55,26 @@
|
|
|
55
55
|
"archiver": "5.3.0",
|
|
56
56
|
"chalk-template": "0.3.1",
|
|
57
57
|
"constants-browserify": "1.0.0",
|
|
58
|
-
"dotenv": "15.0.
|
|
58
|
+
"dotenv": "15.0.1",
|
|
59
59
|
"express": "4.17.2",
|
|
60
60
|
"form-data": "4.0.0",
|
|
61
61
|
"fs-extra": "10.0.0",
|
|
62
62
|
"get-stream": "6.0.1",
|
|
63
|
-
"isomorphic-git": "1.11.
|
|
63
|
+
"isomorphic-git": "1.11.2",
|
|
64
64
|
"openwhisk": "3.21.6",
|
|
65
65
|
"proxyquire": "2.1.3",
|
|
66
|
-
"rollup": "2.
|
|
66
|
+
"rollup": "2.67.0",
|
|
67
67
|
"rollup-plugin-terser": "7.0.2",
|
|
68
68
|
"semver": "7.3.5",
|
|
69
69
|
"tar": "6.1.11",
|
|
70
|
-
"webpack": "5.
|
|
70
|
+
"webpack": "5.68.0",
|
|
71
71
|
"yargs": "17.3.1"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@adobe/eslint-config-helix": "1.3.2",
|
|
75
75
|
"@adobe/helix-shared-wrap": "1.0.1",
|
|
76
|
-
"@adobe/helix-status": "9.2.
|
|
77
|
-
"@adobe/helix-universal-logger": "2.0.
|
|
76
|
+
"@adobe/helix-status": "9.2.6",
|
|
77
|
+
"@adobe/helix-universal-logger": "2.0.2",
|
|
78
78
|
"@semantic-release/changelog": "6.0.1",
|
|
79
79
|
"@semantic-release/git": "10.0.1",
|
|
80
80
|
"c8": "7.11.0",
|
|
@@ -85,13 +85,13 @@
|
|
|
85
85
|
"eslint-plugin-header": "3.1.1",
|
|
86
86
|
"eslint-plugin-import": "2.25.4",
|
|
87
87
|
"husky": "7.0.4",
|
|
88
|
-
"lint-staged": "12.3.
|
|
88
|
+
"lint-staged": "12.3.3",
|
|
89
89
|
"mocha": "9.2.0",
|
|
90
90
|
"mocha-junit-reporter": "2.0.2",
|
|
91
91
|
"mocha-multi-reporters": "1.5.1",
|
|
92
|
-
"nock": "13.2.
|
|
92
|
+
"nock": "13.2.4",
|
|
93
93
|
"semantic-release": "19.0.2",
|
|
94
|
-
"sinon": "13.0.
|
|
94
|
+
"sinon": "13.0.1",
|
|
95
95
|
"yauzl": "2.10.0"
|
|
96
96
|
},
|
|
97
97
|
"engines": {
|
package/src/DevelopmentServer.js
CHANGED
|
@@ -87,6 +87,11 @@ export default class DevelopmentServer {
|
|
|
87
87
|
return this;
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
+
withDirectory(value) {
|
|
91
|
+
this._cwd = value;
|
|
92
|
+
return this;
|
|
93
|
+
}
|
|
94
|
+
|
|
90
95
|
get port() {
|
|
91
96
|
return this._port;
|
|
92
97
|
}
|
|
@@ -102,23 +107,33 @@ export default class DevelopmentServer {
|
|
|
102
107
|
// load the action params params
|
|
103
108
|
let pkgJson = {};
|
|
104
109
|
try {
|
|
105
|
-
pkgJson = await fse.readJson(path.resolve('package.json'));
|
|
110
|
+
pkgJson = await fse.readJson(path.resolve(this._cwd, 'package.json'));
|
|
106
111
|
} catch (e) {
|
|
107
112
|
// ignore
|
|
108
113
|
}
|
|
109
114
|
const config = new BaseConfig();
|
|
110
|
-
if (pkgJson.wsk
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
115
|
+
if (pkgJson.wsk) {
|
|
116
|
+
const withParamsFile = async (file) => {
|
|
117
|
+
if (!file) {
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
// eslint-disable-next-line no-param-reassign
|
|
121
|
+
const files = (Array.isArray(file) ? file : [file]).map((f) => path.resolve(this._cwd, f));
|
|
122
|
+
await Promise.all(files.map(async (f) => {
|
|
123
|
+
if (await fse.exists(f)) {
|
|
124
|
+
config.withParamsFile(f);
|
|
125
|
+
}
|
|
126
|
+
}));
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
await withParamsFile(pkgJson.wsk?.package?.['params-file']);
|
|
130
|
+
config.withParams(pkgJson.wsk?.package?.params);
|
|
131
|
+
await withParamsFile(pkgJson.wsk?.['params-file']);
|
|
132
|
+
config.withParams(pkgJson.wsk?.params);
|
|
133
|
+
await withParamsFile(pkgJson.wsk?.dev?.['params-file']);
|
|
134
|
+
config.withParams(pkgJson.wsk?.dev?.params);
|
|
121
135
|
}
|
|
136
|
+
|
|
122
137
|
const builder = new ActionBuilder().withConfig(config);
|
|
123
138
|
await builder.validate();
|
|
124
139
|
|
|
@@ -129,8 +144,7 @@ export default class DevelopmentServer {
|
|
|
129
144
|
'./main.js': {
|
|
130
145
|
main: this._main,
|
|
131
146
|
},
|
|
132
|
-
|
|
133
|
-
});
|
|
147
|
+
}).raw;
|
|
134
148
|
this.params = config.params;
|
|
135
149
|
return this;
|
|
136
150
|
}
|
|
@@ -140,6 +154,11 @@ export default class DevelopmentServer {
|
|
|
140
154
|
* @returns {Promise<void>}
|
|
141
155
|
*/
|
|
142
156
|
async start() {
|
|
157
|
+
Object.entries(this.params).forEach(([key, value]) => {
|
|
158
|
+
if (!(key in process.env)) {
|
|
159
|
+
process.env[key] = value;
|
|
160
|
+
}
|
|
161
|
+
});
|
|
143
162
|
this.app = express();
|
|
144
163
|
await new Promise((resolve, reject) => {
|
|
145
164
|
try {
|
|
@@ -154,7 +173,9 @@ export default class DevelopmentServer {
|
|
|
154
173
|
}
|
|
155
174
|
});
|
|
156
175
|
this.app.use(rawBody());
|
|
157
|
-
|
|
176
|
+
if (this._xfh) {
|
|
177
|
+
this.app.use(addRequestHeader('x-forwarded-host', this._xfh.replace('{port}', this._port)));
|
|
178
|
+
}
|
|
158
179
|
this.app.all('*', this._handler);
|
|
159
180
|
}
|
|
160
181
|
|