@adobe/helix-deploy 4.15.1 → 5.0.3
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 +33 -0
- package/CONTRIBUTING.md +6 -0
- package/package.json +25 -28
- package/src/ActionBuilder.js +14 -14
- package/src/BaseConfig.js +6 -8
- package/src/DevelopmentServer.js +11 -7
- package/src/bundler/BaseBundler.js +16 -13
- package/src/bundler/EdgeBundler.js +12 -6
- package/src/bundler/RollupBundler.js +18 -13
- package/src/bundler/WebpackBundler.js +15 -8
- package/src/cli.js +17 -28
- package/src/deploy/AWSConfig.js +1 -3
- package/src/deploy/AWSDeployer.js +69 -66
- package/src/deploy/AzureConfig.js +1 -3
- package/src/deploy/AzureDeployer.js +7 -7
- package/src/deploy/BaseDeployer.js +18 -20
- package/src/deploy/CloudflareConfig.js +1 -3
- package/src/deploy/CloudflareDeployer.js +6 -7
- package/src/deploy/ComputeAtEdgeConfig.js +1 -3
- package/src/deploy/ComputeAtEdgeDeployer.js +13 -10
- package/src/deploy/GoogleConfig.js +1 -3
- package/src/deploy/GoogleDeployer.js +11 -12
- package/src/deploy/OpenWhiskConfig.js +1 -3
- package/src/deploy/OpenWhiskDeployer.js +16 -19
- package/src/gateway/FastlyConfig.js +1 -3
- package/src/gateway/FastlyGateway.js +7 -7
- package/src/index.js +1 -1
- package/src/{config/adobeioruntime-node10.js → package.cjs} +2 -13
- package/src/template/node-index.js +4 -3
- package/src/template/serviceworker-index.js +2 -2
- package/src/utils.js +8 -9
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Copyright
|
|
2
|
+
* Copyright 2021 Adobe. All rights reserved.
|
|
3
3
|
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
4
|
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
5
|
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
@@ -9,15 +9,4 @@
|
|
|
9
9
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
10
|
* governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
|
-
|
|
13
|
-
module.exports = {
|
|
14
|
-
// modules that are provided by the runtime container
|
|
15
|
-
externals: [
|
|
16
|
-
// 'express',
|
|
17
|
-
// 'body-parser',
|
|
18
|
-
// 'cls-hooked',
|
|
19
|
-
// 'request',
|
|
20
|
-
// 'request-promise',
|
|
21
|
-
/^openwhisk(\/.*)?$/,
|
|
22
|
-
],
|
|
23
|
-
};
|
|
12
|
+
module.exports = require('../package.json');
|
|
@@ -9,9 +9,7 @@
|
|
|
9
9
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
10
|
* governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
|
-
|
|
13
|
-
global.__rootdir = __dirname;
|
|
14
|
-
|
|
12
|
+
const { dirname } = require('path');
|
|
15
13
|
const {
|
|
16
14
|
openwhisk,
|
|
17
15
|
aws,
|
|
@@ -19,6 +17,9 @@ const {
|
|
|
19
17
|
azure,
|
|
20
18
|
} = require('@adobe/helix-universal').adapter;
|
|
21
19
|
|
|
20
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
21
|
+
global.__rootdir = dirname(__filename); // __dirname is transformed by webpack, __filename isn't
|
|
22
|
+
|
|
22
23
|
module.exports = Object.assign(azure, {
|
|
23
24
|
main: openwhisk,
|
|
24
25
|
lambda: aws,
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
* governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
/* eslint-env serviceworker */
|
|
13
|
-
const fastly = require('./fastly-adapter');
|
|
14
|
-
const cloudflare = require('./cloudflare-adapter');
|
|
13
|
+
const fastly = require('./fastly-adapter.js');
|
|
14
|
+
const cloudflare = require('./cloudflare-adapter.js');
|
|
15
15
|
|
|
16
16
|
/* eslint-disable no-restricted-globals */
|
|
17
17
|
if (typeof addEventListener === 'function') {
|
package/src/utils.js
CHANGED
|
@@ -9,8 +9,12 @@
|
|
|
9
9
|
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
10
|
* governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
import { fileURLToPath } from 'url';
|
|
13
|
+
import { fork } from 'child_process';
|
|
14
|
+
import path from 'path';
|
|
15
|
+
|
|
16
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
17
|
+
const __dirname = path.resolve(fileURLToPath(import.meta.url), '..');
|
|
14
18
|
|
|
15
19
|
/**
|
|
16
20
|
* @typedef {object} VersionCoordinates
|
|
@@ -54,7 +58,7 @@ const path = require('path');
|
|
|
54
58
|
* @param {VersionSpec} versionspec - which version is current
|
|
55
59
|
* @returns {NamedAction[]} - a list of actions that can safely be deleted
|
|
56
60
|
*/
|
|
57
|
-
function filterActions(fns, now, {
|
|
61
|
+
export function filterActions(fns, now, {
|
|
58
62
|
ciAge, patchAge, minorAge, majorAge, ciNum, patchNum, minorNum, majorNum,
|
|
59
63
|
} = {}, { patchVersion, minorVersion, majorVersion } = {}) {
|
|
60
64
|
// sort by updated date
|
|
@@ -151,7 +155,7 @@ function filterActions(fns, now, {
|
|
|
151
155
|
...cleanmajorbyage, ...cleanmajorbycount];
|
|
152
156
|
}
|
|
153
157
|
|
|
154
|
-
async function validateBundle(bundlePath, invoke = false) {
|
|
158
|
+
export async function validateBundle(bundlePath, invoke = false) {
|
|
155
159
|
try {
|
|
156
160
|
const opts = {
|
|
157
161
|
invoke,
|
|
@@ -175,8 +179,3 @@ async function validateBundle(bundlePath, invoke = false) {
|
|
|
175
179
|
};
|
|
176
180
|
}
|
|
177
181
|
}
|
|
178
|
-
|
|
179
|
-
module.exports = {
|
|
180
|
-
filterActions,
|
|
181
|
-
validateBundle,
|
|
182
|
-
};
|