@adobe/helix-deploy 9.1.4 → 9.1.6
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/package.json +13 -14
- package/src/deploy/ComputeAtEdgeDeployer.js +13 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [9.1.6](https://github.com/adobe/helix-deploy/compare/v9.1.5...v9.1.6) (2023-07-01)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **deps:** update external fixes ([3dd1182](https://github.com/adobe/helix-deploy/commit/3dd11826d86d40243ab4d6bdc118c1d604050dc9))
|
|
7
|
+
|
|
8
|
+
## [9.1.5](https://github.com/adobe/helix-deploy/compare/v9.1.4...v9.1.5) (2023-06-29)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **deps:** create tgz file for compute package instead of stream ([f27831d](https://github.com/adobe/helix-deploy/commit/f27831d50971a091935f78ce3f8a8f0bcc30ef9c))
|
|
14
|
+
|
|
1
15
|
## [9.1.4](https://github.com/adobe/helix-deploy/compare/v9.1.3...v9.1.4) (2023-06-24)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/helix-deploy",
|
|
3
|
-
"version": "9.1.
|
|
3
|
+
"version": "9.1.6",
|
|
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,12 +38,12 @@
|
|
|
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.
|
|
42
|
-
"@aws-sdk/client-lambda": "3.
|
|
43
|
-
"@aws-sdk/client-s3": "3.
|
|
44
|
-
"@aws-sdk/client-secrets-manager": "3.
|
|
45
|
-
"@aws-sdk/client-ssm": "3.
|
|
46
|
-
"@aws-sdk/client-sts": "3.
|
|
41
|
+
"@aws-sdk/client-apigatewayv2": "3.363.0",
|
|
42
|
+
"@aws-sdk/client-lambda": "3.363.0",
|
|
43
|
+
"@aws-sdk/client-s3": "3.363.0",
|
|
44
|
+
"@aws-sdk/client-secrets-manager": "3.363.0",
|
|
45
|
+
"@aws-sdk/client-ssm": "3.363.0",
|
|
46
|
+
"@aws-sdk/client-sts": "3.363.0",
|
|
47
47
|
"@fastly/js-compute": "2.4.0",
|
|
48
48
|
"@google-cloud/functions": "2.5.0",
|
|
49
49
|
"@google-cloud/secret-manager": "4.2.2",
|
|
@@ -60,13 +60,12 @@
|
|
|
60
60
|
"express": "4.18.2",
|
|
61
61
|
"form-data": "4.0.0",
|
|
62
62
|
"fs-extra": "11.1.1",
|
|
63
|
-
"get-stream": "6.0.1",
|
|
64
63
|
"isomorphic-git": "1.24.2",
|
|
65
64
|
"openwhisk": "3.21.7",
|
|
66
|
-
"rollup": "3.
|
|
65
|
+
"rollup": "3.26.0",
|
|
67
66
|
"semver": "7.5.3",
|
|
68
67
|
"tar": "6.1.15",
|
|
69
|
-
"webpack": "5.88.
|
|
68
|
+
"webpack": "5.88.1",
|
|
70
69
|
"yargs": "17.7.2"
|
|
71
70
|
},
|
|
72
71
|
"devDependencies": {
|
|
@@ -75,15 +74,15 @@
|
|
|
75
74
|
"@adobe/helix-status": "10.0.9",
|
|
76
75
|
"@semantic-release/changelog": "6.0.3",
|
|
77
76
|
"@semantic-release/git": "10.0.1",
|
|
78
|
-
"c8": "
|
|
79
|
-
"eslint": "8.
|
|
77
|
+
"c8": "8.0.0",
|
|
78
|
+
"eslint": "8.44.0",
|
|
80
79
|
"husky": "8.0.3",
|
|
81
|
-
"lint-staged": "13.2.
|
|
80
|
+
"lint-staged": "13.2.3",
|
|
82
81
|
"mocha": "10.2.0",
|
|
83
82
|
"mocha-junit-reporter": "2.2.0",
|
|
84
83
|
"mocha-multi-reporters": "1.5.1",
|
|
85
84
|
"nock": "13.3.1",
|
|
86
|
-
"semantic-release": "21.0.
|
|
85
|
+
"semantic-release": "21.0.6",
|
|
87
86
|
"yauzl": "2.10.0"
|
|
88
87
|
},
|
|
89
88
|
"engines": {
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
* governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
import { fork } from 'child_process';
|
|
13
|
+
import chalk from 'chalk-template';
|
|
13
14
|
import { fileURLToPath } from 'url';
|
|
14
15
|
import path from 'path';
|
|
15
16
|
import fs from 'fs/promises';
|
|
16
17
|
import tar from 'tar';
|
|
17
|
-
import getStream from 'get-stream';
|
|
18
18
|
import Fastly from '@adobe/fastly-native-promises';
|
|
19
19
|
import BaseDeployer from './BaseDeployer.js';
|
|
20
20
|
import ComputeAtEdgeConfig from './ComputeAtEdgeConfig.js';
|
|
@@ -66,7 +66,7 @@ export default class ComputeAtEdgeDeployer extends BaseDeployer {
|
|
|
66
66
|
*/
|
|
67
67
|
async bundle() {
|
|
68
68
|
const bundleDir = path.dirname(this.cfg.edgeBundle);
|
|
69
|
-
this.log.debug(
|
|
69
|
+
this.log.debug(`--: creating fastly.toml in ${bundleDir}`);
|
|
70
70
|
fs.writeFile(path.resolve(bundleDir, 'fastly.toml'), `
|
|
71
71
|
# This file describes a Fastly Compute@Edge package. To learn more visit:
|
|
72
72
|
# https://developer.fastly.com/reference/fastly-toml/
|
|
@@ -97,21 +97,22 @@ service_id = ""
|
|
|
97
97
|
);
|
|
98
98
|
child.on('data', (data) => resolve(data));
|
|
99
99
|
child.on('error', (err) => reject(err));
|
|
100
|
-
child.on('close', (err) => {
|
|
100
|
+
child.on('close', async (err) => {
|
|
101
101
|
if (err) {
|
|
102
102
|
// non-zero status code
|
|
103
103
|
reject(err);
|
|
104
104
|
} else {
|
|
105
|
-
|
|
106
|
-
|
|
105
|
+
const file = path.resolve(bundleDir, 'fastly-bundle.tar.gz');
|
|
106
|
+
this.log.debug(chalk`{green ok:} created WASM bundle of script and interpreter in ${bundleDir}/bin/main.wasm`);
|
|
107
|
+
await tar.c({
|
|
107
108
|
gzip: true,
|
|
108
109
|
// sync: true,
|
|
109
110
|
cwd: bundleDir,
|
|
110
111
|
prefix: 'Test',
|
|
111
|
-
|
|
112
|
+
file,
|
|
112
113
|
}, ['bin/main.wasm', 'fastly.toml']);
|
|
113
|
-
|
|
114
|
-
resolve(
|
|
114
|
+
this.log.debug(chalk`{green ok:} created tar file in ${bundleDir}/fastly-bundle.tar.gz`);
|
|
115
|
+
resolve(fs.readFile(file));
|
|
115
116
|
}
|
|
116
117
|
});
|
|
117
118
|
});
|
|
@@ -119,19 +120,19 @@ service_id = ""
|
|
|
119
120
|
|
|
120
121
|
async deploy() {
|
|
121
122
|
const buf = await this.bundle();
|
|
122
|
-
|
|
123
123
|
this.init();
|
|
124
124
|
|
|
125
125
|
await this._fastly.transact(async (version) => {
|
|
126
|
+
this.log.debug('--: uploading package to fastly');
|
|
126
127
|
await this._fastly.writePackage(version, buf);
|
|
127
128
|
|
|
129
|
+
this.log.debug('--: creating secrets dictionary');
|
|
128
130
|
await this._fastly.writeDictionary(version, 'secrets', {
|
|
129
131
|
name: 'secrets',
|
|
130
132
|
write_only: 'true',
|
|
131
133
|
});
|
|
132
134
|
|
|
133
135
|
const host = this._cfg.fastlyGateway;
|
|
134
|
-
console.log('Host', host);
|
|
135
136
|
const backend = {
|
|
136
137
|
hostname: host,
|
|
137
138
|
ssl_cert_hostname: host,
|
|
@@ -149,12 +150,13 @@ service_id = ""
|
|
|
149
150
|
max_conn: 200,
|
|
150
151
|
use_ssl: true,
|
|
151
152
|
};
|
|
153
|
+
this.log.debug(`--: updating gateway backend: ${host}`);
|
|
152
154
|
await this._fastly.writeBackend(version, 'gateway', backend);
|
|
153
155
|
}, true);
|
|
154
156
|
}
|
|
155
157
|
|
|
156
158
|
async updatePackage() {
|
|
157
|
-
this.log.info(
|
|
159
|
+
this.log.info(`--: updating app (gateway) config for https://${this._cfg.fastlyGateway}/${this.cfg.packageName}/...`);
|
|
158
160
|
|
|
159
161
|
this.init();
|
|
160
162
|
|
|
@@ -168,7 +170,6 @@ service_id = ""
|
|
|
168
170
|
|
|
169
171
|
await this._fastly.bulkUpdateDictItems(undefined, 'secrets', ...functionparams);
|
|
170
172
|
await this._fastly.updateDictItem(undefined, 'secrets', '_token', this.cfg.packageToken);
|
|
171
|
-
console.log('package', `https://${this._cfg.fastlyGateway}/${this.cfg.packageName}/`);
|
|
172
173
|
await this._fastly.updateDictItem(undefined, 'secrets', '_package', `https://${this._cfg.fastlyGateway}/${this.cfg.packageName}/`);
|
|
173
174
|
|
|
174
175
|
this._fastly.discard();
|