@adobe/helix-deploy 5.0.1 → 5.0.2
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 +7 -0
- package/CONTRIBUTING.md +6 -0
- package/package.json +4 -4
- package/src/ActionBuilder.js +3 -3
- package/src/BaseConfig.js +1 -1
- package/src/bundler/BaseBundler.js +2 -2
- package/src/bundler/RollupBundler.js +1 -1
- package/src/bundler/WebpackBundler.js +1 -1
- package/src/cli.js +2 -2
- package/src/deploy/AWSDeployer.js +3 -3
- package/src/deploy/BaseDeployer.js +12 -12
- package/src/deploy/GoogleDeployer.js +1 -1
- package/src/deploy/OpenWhiskDeployer.js +8 -8
- package/src/gateway/FastlyGateway.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [5.0.2](https://github.com/adobe/helix-deploy/compare/v5.0.1...v5.0.2) (2021-12-11)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **deps:** update external fixes ([b898a1d](https://github.com/adobe/helix-deploy/commit/b898a1da4e06a20cb616cf524458a98608124e6c))
|
|
7
|
+
|
|
1
8
|
## [5.0.1](https://github.com/adobe/helix-deploy/compare/v5.0.0...v5.0.1) (2021-12-07)
|
|
2
9
|
|
|
3
10
|
|
package/CONTRIBUTING.md
CHANGED
|
@@ -72,3 +72,9 @@ The project's committers will release to the [Adobe organization on npmjs.org](h
|
|
|
72
72
|
Please contact the [Adobe Open Source Advisory Board](https://git.corp.adobe.com/OpenSourceAdvisoryBoard/discuss/issues) to get access to the npmjs organization.
|
|
73
73
|
|
|
74
74
|
The release process is fully automated using `semantic-release`, increasing the version numbers, etc. based on the contents of the commit messages found.
|
|
75
|
+
|
|
76
|
+
# Managing Secrets
|
|
77
|
+
|
|
78
|
+
## Azure
|
|
79
|
+
|
|
80
|
+
The Azure deployment is using an application secret that is expiring on a regular basis. To update the secret, refer to the [Azure Active Directory Documentation on configuring access policies on resources](https://docs.microsoft.com/en-us/azure/active-directory/develop/howto-create-service-principal-portal#option-2-create-a-new-application-secret)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/helix-deploy",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.2",
|
|
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",
|
|
@@ -55,17 +55,17 @@
|
|
|
55
55
|
"@rollup/plugin-json": "4.1.0",
|
|
56
56
|
"@rollup/plugin-node-resolve": "13.0.6",
|
|
57
57
|
"archiver": "5.3.0",
|
|
58
|
-
"chalk": "
|
|
58
|
+
"chalk-template": "0.2.0",
|
|
59
59
|
"constants-browserify": "1.0.0",
|
|
60
60
|
"dotenv": "10.0.0",
|
|
61
61
|
"express": "4.17.1",
|
|
62
62
|
"form-data": "4.0.0",
|
|
63
63
|
"fs-extra": "10.0.0",
|
|
64
64
|
"get-stream": "6.0.1",
|
|
65
|
-
"isomorphic-git": "1.10.
|
|
65
|
+
"isomorphic-git": "1.10.2",
|
|
66
66
|
"openwhisk": "3.21.5",
|
|
67
67
|
"proxyquire": "2.1.3",
|
|
68
|
-
"rollup": "2.
|
|
68
|
+
"rollup": "2.61.1",
|
|
69
69
|
"rollup-plugin-terser": "7.0.2",
|
|
70
70
|
"semver": "7.3.5",
|
|
71
71
|
"tar": "6.1.11",
|
package/src/ActionBuilder.js
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
import path from 'path';
|
|
15
15
|
import fs from 'fs';
|
|
16
16
|
import fse from 'fs-extra';
|
|
17
|
-
import chalk from 'chalk';
|
|
17
|
+
import chalk from 'chalk-template';
|
|
18
18
|
import git from 'isomorphic-git';
|
|
19
19
|
import WebpackBundler from './bundler/WebpackBundler.js';
|
|
20
20
|
import EdgeBundler from './bundler/EdgeBundler.js';
|
|
@@ -310,7 +310,7 @@ export default class ActionBuilder {
|
|
|
310
310
|
// eslint-disable-next-line no-await-in-loop
|
|
311
311
|
await dep[fnName](...args);
|
|
312
312
|
} catch (e) {
|
|
313
|
-
cfg.log.error(
|
|
313
|
+
cfg.log.error(chalk`{red error:} ${dep.name} - ${e.message}`);
|
|
314
314
|
errors.push(e);
|
|
315
315
|
}
|
|
316
316
|
}
|
|
@@ -338,7 +338,7 @@ export default class ActionBuilder {
|
|
|
338
338
|
async updateLinks() {
|
|
339
339
|
const { cfg } = this;
|
|
340
340
|
if (cfg.baseName === cfg.name) {
|
|
341
|
-
cfg.log.warn(
|
|
341
|
+
cfg.log.warn(chalk`{yellow warn:} unable to create version links. unsupported action name format. should be: "name@version"`);
|
|
342
342
|
return false;
|
|
343
343
|
}
|
|
344
344
|
return this.execute('updateLinks', 'updating links on ');
|
package/src/BaseConfig.js
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
import path from 'path';
|
|
13
13
|
import { fileURLToPath } from 'url';
|
|
14
14
|
import fse from 'fs-extra';
|
|
15
|
-
import chalk from 'chalk';
|
|
15
|
+
import chalk from 'chalk-template';
|
|
16
16
|
import archiver from 'archiver';
|
|
17
17
|
import semver from 'semver';
|
|
18
18
|
import { validateBundle } from '../utils.js';
|
|
@@ -65,7 +65,7 @@ export default class BaseBundler {
|
|
|
65
65
|
cfg.log.error(chalk`{red error:}`, result.error);
|
|
66
66
|
throw Error(`Validation failed: ${result.error}`);
|
|
67
67
|
}
|
|
68
|
-
cfg.log.info(chalk`{green ok:} bundle can be loaded and has a {
|
|
68
|
+
cfg.log.info(chalk`{green ok:} bundle can be loaded and has a {grey main()} function.`);
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
async createArchive() {
|
|
@@ -14,7 +14,7 @@ import path from 'path';
|
|
|
14
14
|
import fse from 'fs-extra';
|
|
15
15
|
import { fileURLToPath } from 'url';
|
|
16
16
|
import { rollup } from 'rollup';
|
|
17
|
-
import chalk from 'chalk';
|
|
17
|
+
import chalk from 'chalk-template';
|
|
18
18
|
import { nodeResolve } from '@rollup/plugin-node-resolve';
|
|
19
19
|
import commonjs from '@rollup/plugin-commonjs';
|
|
20
20
|
import alias from '@rollup/plugin-alias';
|
|
@@ -13,7 +13,7 @@ import { fileURLToPath } from 'url';
|
|
|
13
13
|
import path from 'path';
|
|
14
14
|
import fse from 'fs-extra';
|
|
15
15
|
import webpack from 'webpack';
|
|
16
|
-
import chalk from 'chalk';
|
|
16
|
+
import chalk from 'chalk-template';
|
|
17
17
|
import BaseBundler from './BaseBundler.js';
|
|
18
18
|
|
|
19
19
|
// eslint-disable-next-line no-underscore-dangle
|
package/src/cli.js
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
|
|
13
13
|
/* eslint-disable no-console */
|
|
14
14
|
import yargs from 'yargs';
|
|
15
|
-
import chalk from 'chalk';
|
|
15
|
+
import chalk from 'chalk-template';
|
|
16
16
|
import { config as envConfig } from 'dotenv';
|
|
17
17
|
import BaseConfig from './BaseConfig.js';
|
|
18
18
|
import OpenWhiskDeployer from './deploy/OpenWhiskDeployer.js';
|
|
@@ -71,7 +71,7 @@ export default class CLI {
|
|
|
71
71
|
console.log(JSON.stringify(res, null, 2));
|
|
72
72
|
}
|
|
73
73
|
} catch (err) {
|
|
74
|
-
console.log(
|
|
74
|
+
console.log(chalk`{red error:} ${err.message}`);
|
|
75
75
|
process.exitCode = 1;
|
|
76
76
|
}
|
|
77
77
|
}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
/* eslint-disable no-await-in-loop,no-restricted-syntax */
|
|
13
|
-
import chalk from 'chalk';
|
|
13
|
+
import chalk from 'chalk-template';
|
|
14
14
|
import {
|
|
15
15
|
CreateBucketCommand, DeleteBucketCommand, DeleteObjectCommand, DeleteObjectsCommand,
|
|
16
16
|
ListBucketsCommand,
|
|
@@ -409,7 +409,7 @@ export default class AWSDeployer extends BaseDeployer {
|
|
|
409
409
|
// ignore, most likely the permission already exists
|
|
410
410
|
}
|
|
411
411
|
|
|
412
|
-
this.log.info(chalk`{green ok:} function deployed: ${
|
|
412
|
+
this.log.info(chalk`{green ok:} function deployed: {blueBright ${this._functionURL}}`);
|
|
413
413
|
}
|
|
414
414
|
|
|
415
415
|
async test() {
|
|
@@ -517,7 +517,7 @@ export default class AWSDeployer extends BaseDeployer {
|
|
|
517
517
|
});
|
|
518
518
|
const unused = [];
|
|
519
519
|
if (filter) {
|
|
520
|
-
this.log.info(chalk`Integrations / Routes for {
|
|
520
|
+
this.log.info(chalk`Integrations / Routes for {grey ${filter}}`);
|
|
521
521
|
} else {
|
|
522
522
|
this.log.info('Integrations / Routes');
|
|
523
523
|
}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
import path from 'path';
|
|
13
|
-
import chalk from 'chalk';
|
|
13
|
+
import chalk from 'chalk-template';
|
|
14
14
|
import semver from 'semver';
|
|
15
15
|
import { h1, context } from '@adobe/helix-fetch';
|
|
16
16
|
|
|
@@ -99,7 +99,7 @@ export default class BaseDeployer {
|
|
|
99
99
|
while (retry404 >= 0) {
|
|
100
100
|
// eslint-disable-next-line no-param-reassign
|
|
101
101
|
const testUrl = `${url}${this.cfg.testPath || ''}`;
|
|
102
|
-
this.log.info(`--: requesting: ${
|
|
102
|
+
this.log.info(chalk`--: requesting: {blueBright ${testUrl}} ...`);
|
|
103
103
|
// eslint-disable-next-line no-await-in-loop
|
|
104
104
|
const ret = await this.fetch(testUrl, {
|
|
105
105
|
headers,
|
|
@@ -110,21 +110,21 @@ export default class BaseDeployer {
|
|
|
110
110
|
const body = await ret.text();
|
|
111
111
|
const id = idHeader ? ret.headers.get(idHeader) : 'n/a';
|
|
112
112
|
if (ret.ok) {
|
|
113
|
-
this.log.info(`id: ${
|
|
114
|
-
this.log.info(
|
|
115
|
-
this.log.debug(chalk
|
|
113
|
+
this.log.info(chalk`id: {grey ${id}}`);
|
|
114
|
+
this.log.info(chalk`{green ok:} ${ret.status}`);
|
|
115
|
+
this.log.debug(chalk`{grey ${JSON.stringify(ret.headers.plain(), null, 2)}}`);
|
|
116
116
|
this.log.debug('');
|
|
117
|
-
this.log.debug(chalk
|
|
117
|
+
this.log.debug(chalk`{grey ${body}}`);
|
|
118
118
|
return;
|
|
119
119
|
}
|
|
120
120
|
if (ret.status === 302 || ret.status === 301) {
|
|
121
|
-
this.log.info(
|
|
122
|
-
this.log.debug(chalk
|
|
121
|
+
this.log.info(chalk`{green ok:} ${ret.status}`);
|
|
122
|
+
this.log.debug(chalk`{grey Location: ${ret.headers.get('location')}}`);
|
|
123
123
|
return;
|
|
124
124
|
}
|
|
125
|
-
this.log.info(`id: ${
|
|
125
|
+
this.log.info(chalk`id: {grey ${id}}`);
|
|
126
126
|
if ((ret.status === 404 || ret.status === 500) && retry404) {
|
|
127
|
-
this.log.info(
|
|
127
|
+
this.log.info(chalk`{yellow warn:} ${ret.status} (retry)`);
|
|
128
128
|
// eslint-disable-next-line no-param-reassign
|
|
129
129
|
retry404 -= 1;
|
|
130
130
|
// eslint-disable-next-line no-await-in-loop
|
|
@@ -132,7 +132,7 @@ export default class BaseDeployer {
|
|
|
132
132
|
setTimeout(resolve, 1500);
|
|
133
133
|
});
|
|
134
134
|
} else {
|
|
135
|
-
// this.log.info(
|
|
135
|
+
// this.log.info(chalk`{red error:} test failed: ${ret.status} ${body}`);
|
|
136
136
|
throw new Error(`test failed: ${ret.status} ${body}`);
|
|
137
137
|
}
|
|
138
138
|
}
|
|
@@ -164,7 +164,7 @@ export default class BaseDeployer {
|
|
|
164
164
|
if (link === 'major' || link === 'minor') {
|
|
165
165
|
if (!s) {
|
|
166
166
|
// eslint-disable-next-line no-underscore-dangle
|
|
167
|
-
this.log.warn(
|
|
167
|
+
this.log.warn(chalk`{yellow warn:} unable to create version sequences. error while parsing version: ${this.cfg.version}`);
|
|
168
168
|
return;
|
|
169
169
|
}
|
|
170
170
|
if (link === 'major') {
|
|
@@ -14,7 +14,7 @@ import { SecretManagerServiceClient } from '@google-cloud/secret-manager';
|
|
|
14
14
|
import path from 'path';
|
|
15
15
|
import fs from 'fs';
|
|
16
16
|
import semver from 'semver';
|
|
17
|
-
import chalk from 'chalk';
|
|
17
|
+
import chalk from 'chalk-template';
|
|
18
18
|
import BaseDeployer from './BaseDeployer.js';
|
|
19
19
|
import GoogleConfig from './GoogleConfig.js';
|
|
20
20
|
import { filterActions } from '../utils.js';
|
|
@@ -14,7 +14,7 @@ import ow from 'openwhisk';
|
|
|
14
14
|
import os from 'os';
|
|
15
15
|
import fse from 'fs-extra';
|
|
16
16
|
import path from 'path';
|
|
17
|
-
import chalk from 'chalk';
|
|
17
|
+
import chalk from 'chalk-template';
|
|
18
18
|
import dotenv from 'dotenv';
|
|
19
19
|
import BaseDeployer from './BaseDeployer.js';
|
|
20
20
|
import OpenWhiskConfig from './OpenWhiskConfig.js';
|
|
@@ -86,7 +86,7 @@ export default class OpenWhiskDeployer extends BaseDeployer {
|
|
|
86
86
|
|
|
87
87
|
getOpenwhiskClient() {
|
|
88
88
|
if (!this._cfg.apiHost || !this._cfg.auth || !this._cfg.namespace) {
|
|
89
|
-
throw Error(chalk`\nMissing OpenWhisk credentials. Make sure you have a {grey .wskprops} in your home directory.\nYou can also set {grey WSK_NAMESPACE}, {
|
|
89
|
+
throw Error(chalk`\nMissing OpenWhisk credentials. Make sure you have a {grey .wskprops} in your home directory.\nYou can also set {grey WSK_NAMESPACE}, {grey WSK_AUTH} and {grey WSK_API_HOST} environment variables.`);
|
|
90
90
|
}
|
|
91
91
|
return ow({
|
|
92
92
|
apihost: this._cfg.apiHost,
|
|
@@ -115,7 +115,7 @@ export default class OpenWhiskDeployer extends BaseDeployer {
|
|
|
115
115
|
});
|
|
116
116
|
this.log.info(chalk`{green ok:} package created. ${res.namespace}/${res.name}`);
|
|
117
117
|
} else {
|
|
118
|
-
this.log.error(
|
|
118
|
+
this.log.error(chalk`{red error:} ${e.message}`);
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
|
|
@@ -185,7 +185,7 @@ export default class OpenWhiskDeployer extends BaseDeployer {
|
|
|
185
185
|
fn = openwhisk.packages.create.bind(openwhisk.packages);
|
|
186
186
|
verb = 'created';
|
|
187
187
|
} else {
|
|
188
|
-
this.log.error(
|
|
188
|
+
this.log.error(chalk`{red error:} ${e.message}`);
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
191
|
|
|
@@ -201,9 +201,9 @@ export default class OpenWhiskDeployer extends BaseDeployer {
|
|
|
201
201
|
parameters,
|
|
202
202
|
},
|
|
203
203
|
});
|
|
204
|
-
this.log.info(
|
|
204
|
+
this.log.info(chalk`{green ok:} ${verb} package {whiteBright /${result.namespace}/${result.name}}`);
|
|
205
205
|
} catch (e) {
|
|
206
|
-
this.log.error(
|
|
206
|
+
this.log.error(chalk`{red error: failed processing package: } ${e.stack}`);
|
|
207
207
|
throw Error('abort.');
|
|
208
208
|
}
|
|
209
209
|
}
|
|
@@ -268,10 +268,10 @@ export default class OpenWhiskDeployer extends BaseDeployer {
|
|
|
268
268
|
try {
|
|
269
269
|
this.log.debug(`creating sequence: ${options.name} -> ${options.action.exec.components[0]}`);
|
|
270
270
|
const result = await openwhisk.actions.update(options);
|
|
271
|
-
this.log.info(
|
|
271
|
+
this.log.info(chalk`{green ok:} created sequence {whiteBright /${result.namespace}/${result.name}} -> {whiteBright ${fqn}}`);
|
|
272
272
|
} catch (e) {
|
|
273
273
|
hasErrors = true;
|
|
274
|
-
this.log.error(
|
|
274
|
+
this.log.error(chalk`{red error:} failed creating sequence: ${e.message}`);
|
|
275
275
|
}
|
|
276
276
|
}));
|
|
277
277
|
if (hasErrors) {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* governing permissions and limitations under the License.
|
|
11
11
|
*/
|
|
12
12
|
import Fastly from '@adobe/fastly-native-promises';
|
|
13
|
-
import chalk from 'chalk';
|
|
13
|
+
import chalk from 'chalk-template';
|
|
14
14
|
import FastlyConfig from './FastlyConfig.js';
|
|
15
15
|
import BaseDeployer from '../deploy/BaseDeployer.js';
|
|
16
16
|
|