@adobe/helix-deploy 9.3.11 → 9.3.13
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.13](https://github.com/adobe/helix-deploy/compare/v9.3.12...v9.3.13) (2023-10-30)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **deps:** update dependency @adobe/fetch to v4.1.1 ([#612](https://github.com/adobe/helix-deploy/issues/612)) ([7bf12eb](https://github.com/adobe/helix-deploy/commit/7bf12eb6668ae27a4cada9679b23826245753c41))
|
|
7
|
+
|
|
8
|
+
## [9.3.12](https://github.com/adobe/helix-deploy/compare/v9.3.11...v9.3.12) (2023-10-28)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **deps:** update external fixes ([#610](https://github.com/adobe/helix-deploy/issues/610)) ([1612ba6](https://github.com/adobe/helix-deploy/commit/1612ba6818f6514c01e29c4deece90d623b4d5e5))
|
|
14
|
+
|
|
1
15
|
## [9.3.11](https://github.com/adobe/helix-deploy/compare/v9.3.10...v9.3.11) (2023-10-24)
|
|
2
16
|
|
|
3
17
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/helix-deploy",
|
|
3
|
-
"version": "9.3.
|
|
3
|
+
"version": "9.3.13",
|
|
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",
|
|
@@ -37,17 +37,17 @@
|
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@adobe/fastly-native-promises": "3.0.5",
|
|
40
|
-
"@adobe/fetch": "4.1.
|
|
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.
|
|
47
|
-
"@fastly/js-compute": "3.7.
|
|
40
|
+
"@adobe/fetch": "4.1.1",
|
|
41
|
+
"@aws-sdk/client-apigatewayv2": "3.438.0",
|
|
42
|
+
"@aws-sdk/client-lambda": "3.438.0",
|
|
43
|
+
"@aws-sdk/client-s3": "3.438.0",
|
|
44
|
+
"@aws-sdk/client-secrets-manager": "3.438.0",
|
|
45
|
+
"@aws-sdk/client-ssm": "3.438.0",
|
|
46
|
+
"@aws-sdk/client-sts": "3.438.0",
|
|
47
|
+
"@fastly/js-compute": "3.7.2",
|
|
48
48
|
"@google-cloud/functions": "3.0.1",
|
|
49
49
|
"@google-cloud/secret-manager": "5.0.1",
|
|
50
|
-
"@google-cloud/storage": "7.
|
|
50
|
+
"@google-cloud/storage": "7.4.0",
|
|
51
51
|
"@rollup/plugin-alias": "5.0.1",
|
|
52
52
|
"@rollup/plugin-commonjs": "25.0.7",
|
|
53
53
|
"@rollup/plugin-json": "6.0.1",
|
|
@@ -62,14 +62,14 @@
|
|
|
62
62
|
"fs-extra": "11.1.1",
|
|
63
63
|
"isomorphic-git": "1.24.5",
|
|
64
64
|
"openwhisk": "3.21.7",
|
|
65
|
-
"rollup": "4.1.
|
|
65
|
+
"rollup": "4.1.5",
|
|
66
66
|
"semver": "7.5.4",
|
|
67
67
|
"tar": "6.2.0",
|
|
68
68
|
"webpack": "5.89.0",
|
|
69
69
|
"yargs": "17.7.2"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
|
-
"@adobe/eslint-config-helix": "2.0.
|
|
72
|
+
"@adobe/eslint-config-helix": "2.0.4",
|
|
73
73
|
"@adobe/helix-shared-wrap": "2.0.0",
|
|
74
74
|
"@adobe/helix-status": "10.0.10",
|
|
75
75
|
"@semantic-release/changelog": "6.0.3",
|
|
@@ -44,6 +44,7 @@ export default class EdgeBundler extends WebpackBundler {
|
|
|
44
44
|
'aws-sdk',
|
|
45
45
|
'@google-cloud/secret-manager',
|
|
46
46
|
'@google-cloud/storage',
|
|
47
|
+
'fastly:env',
|
|
47
48
|
].reduce((obj, ext) => {
|
|
48
49
|
// this makes webpack to ignore the module and just leave it as normal require.
|
|
49
50
|
// eslint-disable-next-line no-param-reassign
|
|
@@ -72,10 +72,10 @@ export default class ComputeAtEdgeDeployer extends BaseDeployer {
|
|
|
72
72
|
# https://developer.fastly.com/reference/fastly-toml/
|
|
73
73
|
|
|
74
74
|
authors = ["Helix Deploy"]
|
|
75
|
-
description = "
|
|
75
|
+
description = "${this.cfg.packageName} project generated by Helix Deploy"
|
|
76
76
|
language = "javascript"
|
|
77
77
|
manifest_version = 2
|
|
78
|
-
name = "
|
|
78
|
+
name = "${this.cfg.packageName}"
|
|
79
79
|
service_id = ""
|
|
80
80
|
`);
|
|
81
81
|
|
|
@@ -108,7 +108,7 @@ service_id = ""
|
|
|
108
108
|
gzip: true,
|
|
109
109
|
// sync: true,
|
|
110
110
|
cwd: bundleDir,
|
|
111
|
-
prefix:
|
|
111
|
+
prefix: this.cfg.packageName,
|
|
112
112
|
file,
|
|
113
113
|
}, ['bin/main.wasm', 'fastly.toml']);
|
|
114
114
|
this.log.debug(chalk`{green ok:} created tar file in ${bundleDir}/fastly-bundle.tar.gz`);
|
|
@@ -123,7 +123,7 @@ service_id = ""
|
|
|
123
123
|
this.init();
|
|
124
124
|
|
|
125
125
|
await this._fastly.transact(async (version) => {
|
|
126
|
-
this.log.debug('--: uploading package to fastly');
|
|
126
|
+
this.log.debug('--: uploading package to fastly, service version', version);
|
|
127
127
|
await this._fastly.writePackage(version, buf);
|
|
128
128
|
|
|
129
129
|
this.log.debug('--: creating secrets dictionary');
|
|
@@ -12,9 +12,38 @@
|
|
|
12
12
|
/* eslint-env serviceworker */
|
|
13
13
|
/* global Dictionary */
|
|
14
14
|
|
|
15
|
+
export function getEnvInfo(req, env) {
|
|
16
|
+
const serviceVersion = env('FASTLY_SERVICE_VERSION');
|
|
17
|
+
const requestId = env('FASTLY_TRACE_ID');
|
|
18
|
+
const region = env('FASTLY_POP');
|
|
19
|
+
const functionName = env('FASTLY_SERVICE_ID');
|
|
20
|
+
const functionFQN = `${env('FASTLY_CUSTOMER_ID')}-${functionName}-${serviceVersion}`;
|
|
21
|
+
const txId = req.headers.get('x-transaction-id') ?? env('FASTLY_TRACE_ID');
|
|
22
|
+
|
|
23
|
+
console.debug('Env info sv: ', serviceVersion, ' reqId: ', requestId, ' region: ', region, ' functionName: ', functionName, ' functionFQN: ', functionFQN, ' txId: ', txId);
|
|
24
|
+
|
|
25
|
+
return {
|
|
26
|
+
functionFQN,
|
|
27
|
+
functionName,
|
|
28
|
+
region,
|
|
29
|
+
requestId,
|
|
30
|
+
serviceVersion,
|
|
31
|
+
txId,
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
async function getEnvironmentInfo(req) {
|
|
36
|
+
// The fastly:env import will be available in the fastly c@e environment
|
|
37
|
+
/* eslint-disable-next-line import/no-unresolved */
|
|
38
|
+
const mod = await import('fastly:env');
|
|
39
|
+
return getEnvInfo(req, mod.env);
|
|
40
|
+
}
|
|
41
|
+
|
|
15
42
|
async function handler(event) {
|
|
16
43
|
try {
|
|
17
44
|
const { request } = event;
|
|
45
|
+
const env = await getEnvironmentInfo(request);
|
|
46
|
+
|
|
18
47
|
console.log('Fastly Adapter is here');
|
|
19
48
|
let packageParams;
|
|
20
49
|
// eslint-disable-next-line import/no-unresolved,global-require
|
|
@@ -26,20 +55,20 @@ async function handler(event) {
|
|
|
26
55
|
},
|
|
27
56
|
runtime: {
|
|
28
57
|
name: 'compute-at-edge',
|
|
29
|
-
|
|
58
|
+
region: env.region,
|
|
30
59
|
},
|
|
31
60
|
func: {
|
|
32
|
-
name:
|
|
61
|
+
name: env.functionName,
|
|
33
62
|
package: null,
|
|
34
|
-
version:
|
|
35
|
-
fqn:
|
|
63
|
+
version: env.serviceVersion,
|
|
64
|
+
fqn: env.functionFQN,
|
|
36
65
|
app: null,
|
|
37
66
|
},
|
|
38
67
|
invocation: {
|
|
39
68
|
id: null,
|
|
40
69
|
deadline: null,
|
|
41
|
-
transactionId:
|
|
42
|
-
requestId:
|
|
70
|
+
transactionId: env.txId,
|
|
71
|
+
requestId: env.requestId,
|
|
43
72
|
},
|
|
44
73
|
env: new Proxy(new Dictionary('secrets'), {
|
|
45
74
|
get: (target, prop) => {
|
|
@@ -87,7 +116,7 @@ async function handler(event) {
|
|
|
87
116
|
}
|
|
88
117
|
}
|
|
89
118
|
|
|
90
|
-
function fastly() {
|
|
119
|
+
export default function fastly() {
|
|
91
120
|
console.log('checking for fastly environment');
|
|
92
121
|
/* eslint-disable-next-line no-undef */
|
|
93
122
|
if (CacheOverride) {
|
|
@@ -95,5 +124,3 @@ function fastly() {
|
|
|
95
124
|
}
|
|
96
125
|
return false;
|
|
97
126
|
}
|
|
98
|
-
|
|
99
|
-
module.exports = fastly;
|
|
@@ -10,7 +10,9 @@
|
|
|
10
10
|
* governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
/* eslint-env serviceworker */
|
|
13
|
-
|
|
13
|
+
|
|
14
|
+
import fastly from './fastly-adapter.js';
|
|
15
|
+
|
|
14
16
|
const cloudflare = require('./cloudflare-adapter.js');
|
|
15
17
|
|
|
16
18
|
/* eslint-disable no-restricted-globals */
|