@commercetools-frontend/cypress 20.12.4 → 21.0.0-rc.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/README.md +1 -39
- package/add-commands/dist/commercetools-frontend-cypress-add-commands.cjs.dev.js +2 -2
- package/add-commands/dist/commercetools-frontend-cypress-add-commands.cjs.prod.js +2 -2
- package/add-commands/dist/commercetools-frontend-cypress-add-commands.esm.js +2 -2
- package/add-commands/index.d.ts +1 -1
- package/dist/commercetools-frontend-cypress.cjs.dev.js +1 -1
- package/dist/commercetools-frontend-cypress.cjs.prod.js +1 -1
- package/dist/commercetools-frontend-cypress.esm.js +1 -1
- package/package.json +8 -8
- package/task/dist/commercetools-frontend-cypress-task.cjs.dev.js +28 -33
- package/task/dist/commercetools-frontend-cypress-task.cjs.prod.js +28 -33
- package/task/dist/commercetools-frontend-cypress-task.esm.js +26 -30
package/README.md
CHANGED
|
@@ -4,42 +4,4 @@
|
|
|
4
4
|
<a href="https://www.npmjs.com/package/@commercetools-frontend/cypress"><img src="https://badgen.net/npm/v/@commercetools-frontend/cypress" alt="Latest release (latest dist-tag)" /></a> <a href="https://www.npmjs.com/package/@commercetools-frontend/cypress"><img src="https://badgen.net/npm/v/@commercetools-frontend/cypress/next" alt="Latest release (next dist-tag)" /></a> <a href="https://bundlephobia.com/result?p=@commercetools-frontend/cypress"><img src="https://badgen.net/bundlephobia/minzip/@commercetools-frontend/cypress" alt="Minified + GZipped size" /></a> <a href="https://github.com/commercetools/merchant-center-application-kit/blob/main/LICENSE"><img src="https://badgen.net/github/license/commercetools/merchant-center-application-kit" alt="GitHub license" /></a>
|
|
5
5
|
</p>
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
## Install
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
$ npm install --save @commercetools-frontend/cypress
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Usage
|
|
16
|
-
|
|
17
|
-
This package extends Cypress' `cy` command.
|
|
18
|
-
|
|
19
|
-
Add this line to your project's `cypress/plugins/index.js`:
|
|
20
|
-
|
|
21
|
-
```javascript
|
|
22
|
-
const customApplications = require('@commercetools-frontend/cypress/task');
|
|
23
|
-
|
|
24
|
-
module.exports = (on, config) => {
|
|
25
|
-
on('task', {
|
|
26
|
-
...customApplications,
|
|
27
|
-
});
|
|
28
|
-
};
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
Add this line to your project's `cypress/support/commands.js`:
|
|
32
|
-
|
|
33
|
-
```javascript
|
|
34
|
-
import '@commercetools-frontend/cypress/add-commands';
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
### Commands
|
|
38
|
-
|
|
39
|
-
- `cy.loginByOidc({ entryPointUriPath })`
|
|
40
|
-
|
|
41
|
-
This command perform the user login using the OIDC workflow to retrieve the session token.<br/>
|
|
42
|
-
The command also requires to load the `custom-application-config.json` (automatically done via the Cypress task) and therefore it may need to load environment variables in case the application config uses environment placeholders.<br/>
|
|
43
|
-
By default, the `.env` and `.env.local` files are attempted to be loaded from the application folder. You can pass a `dotfiles` option to pass a list of names/paths relative to the application folder in case the files in the project have a different name/location.
|
|
44
|
-
|
|
45
|
-
> The command also requires the following environment variables to be available: `PROJECT_KEY`, `LOGIN_USER`, `LOGIN_PASSWORD`.
|
|
7
|
+
Check out the [documentation](https://docs.commercetools.com/custom-applications/api-reference/commercetools-frontend-cypress) for more information.
|
|
@@ -28,9 +28,9 @@ var _Object$defineProperty__default = /*#__PURE__*/_interopDefault(_Object$defin
|
|
|
28
28
|
var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
|
|
29
29
|
var _JSON$stringify__default = /*#__PURE__*/_interopDefault(_JSON$stringify);
|
|
30
30
|
|
|
31
|
-
function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object);
|
|
31
|
+
function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
32
32
|
|
|
33
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
33
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context3, _context4; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys(Object(source), !0)).call(_context3, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys(Object(source))).call(_context4, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
34
34
|
|
|
35
35
|
Cypress.Commands.add('loginByOidc', function (commandOptions) {
|
|
36
36
|
var _commandOptions$proje;
|
|
@@ -28,9 +28,9 @@ var _Object$defineProperty__default = /*#__PURE__*/_interopDefault(_Object$defin
|
|
|
28
28
|
var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
|
|
29
29
|
var _JSON$stringify__default = /*#__PURE__*/_interopDefault(_JSON$stringify);
|
|
30
30
|
|
|
31
|
-
function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object);
|
|
31
|
+
function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
32
32
|
|
|
33
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
33
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context3, _context4; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys(Object(source), !0)).call(_context3, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys(Object(source))).call(_context4, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
34
34
|
|
|
35
35
|
Cypress.Commands.add('loginByOidc', function (commandOptions) {
|
|
36
36
|
var _commandOptions$proje;
|
|
@@ -13,9 +13,9 @@ import { v4 } from 'uuid';
|
|
|
13
13
|
import { S as STORAGE_KEYS, O as OIDC_RESPONSE_TYPES } from '../../dist/constants-0e882d21.esm.js';
|
|
14
14
|
import { buildOidcScope } from '@commercetools-frontend/application-shell/ssr';
|
|
15
15
|
|
|
16
|
-
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object);
|
|
16
|
+
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
17
17
|
|
|
18
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
18
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context3, _context4; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context3 = ownKeys(Object(source), !0)).call(_context3, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context4 = ownKeys(Object(source))).call(_context4, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
19
19
|
|
|
20
20
|
Cypress.Commands.add('loginByOidc', function (commandOptions) {
|
|
21
21
|
var _commandOptions$proje;
|
package/add-commands/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ declare namespace Cypress {
|
|
|
3
3
|
/**
|
|
4
4
|
* Log into the Custom Application using the OIDC workflow.
|
|
5
5
|
* @example
|
|
6
|
-
* cy.loginByOidc({ entryPointUriPath: '
|
|
6
|
+
* cy.loginByOidc({ entryPointUriPath: 'template-starter' })
|
|
7
7
|
*/
|
|
8
8
|
loginByOidc(
|
|
9
9
|
// https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-9.html#import-types
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var constants = require('./constants-42a0ebf5.cjs.dev.js');
|
|
6
6
|
|
|
7
7
|
// NOTE: This string will be replaced on build time with the package version.
|
|
8
|
-
var version = "
|
|
8
|
+
var version = "21.0.0-rc.3";
|
|
9
9
|
|
|
10
10
|
exports.OIDC_RESPONSE_TYPES = constants.OIDC_RESPONSE_TYPES;
|
|
11
11
|
exports.STORAGE_KEYS = constants.STORAGE_KEYS;
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var constants = require('./constants-4d9d4b7b.cjs.prod.js');
|
|
6
6
|
|
|
7
7
|
// NOTE: This string will be replaced on build time with the package version.
|
|
8
|
-
var version = "
|
|
8
|
+
var version = "21.0.0-rc.3";
|
|
9
9
|
|
|
10
10
|
exports.OIDC_RESPONSE_TYPES = constants.OIDC_RESPONSE_TYPES;
|
|
11
11
|
exports.STORAGE_KEYS = constants.STORAGE_KEYS;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-frontend/cypress",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "21.0.0-rc.3",
|
|
4
4
|
"description": "Cypress commands and utilities for Custom Applications",
|
|
5
5
|
"bugs": "https://github.com/commercetools/merchant-center-application-kit/issues",
|
|
6
6
|
"repository": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"url": "https://github.com/commercetools/merchant-center-application-kit.git",
|
|
9
9
|
"directory": "packages/cypress"
|
|
10
10
|
},
|
|
11
|
-
"homepage": "https://docs.commercetools.com/custom-applications",
|
|
11
|
+
"homepage": "https://docs.commercetools.com/custom-applications/api-reference/commercetools-frontend-cypress",
|
|
12
12
|
"keywords": [
|
|
13
13
|
"javascript",
|
|
14
14
|
"frontend",
|
|
@@ -35,17 +35,17 @@
|
|
|
35
35
|
"README.md"
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@babel/runtime": "7.16.
|
|
39
|
-
"@babel/runtime-corejs3": "7.16.
|
|
40
|
-
"@commercetools-frontend/application-config": "
|
|
41
|
-
"@commercetools-frontend/application-shell": "
|
|
38
|
+
"@babel/runtime": "^7.16.7",
|
|
39
|
+
"@babel/runtime-corejs3": "^7.16.8",
|
|
40
|
+
"@commercetools-frontend/application-config": "21.0.0-rc.1",
|
|
41
|
+
"@commercetools-frontend/application-shell": "21.0.0-rc.3",
|
|
42
42
|
"@manypkg/get-packages": "1.1.3",
|
|
43
43
|
"uuid": "8.3.2"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"cypress": "
|
|
46
|
+
"cypress": "9.3.1"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"cypress": "5.x || 6.x || 7.x || 8.x"
|
|
49
|
+
"cypress": "5.x || 6.x || 7.x || 8.x || 9.x"
|
|
50
50
|
}
|
|
51
51
|
}
|
|
@@ -2,11 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var _asyncToGenerator = require('@babel/runtime-corejs3/helpers/asyncToGenerator');
|
|
6
|
-
var _defineProperty = require('@babel/runtime-corejs3/helpers/defineProperty');
|
|
7
|
-
var _regeneratorRuntime = require('@babel/runtime-corejs3/regenerator');
|
|
8
|
-
var _reduceInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/reduce');
|
|
9
|
-
var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
|
|
10
5
|
var _Object$keys = require('@babel/runtime-corejs3/core-js-stable/object/keys');
|
|
11
6
|
var _Object$getOwnPropertySymbols = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
|
|
12
7
|
var _filterInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/filter');
|
|
@@ -15,6 +10,10 @@ var _forEachInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/in
|
|
|
15
10
|
var _Object$getOwnPropertyDescriptors = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors');
|
|
16
11
|
var _Object$defineProperties = require('@babel/runtime-corejs3/core-js-stable/object/define-properties');
|
|
17
12
|
var _Object$defineProperty = require('@babel/runtime-corejs3/core-js-stable/object/define-property');
|
|
13
|
+
var _asyncToGenerator = require('@babel/runtime-corejs3/helpers/asyncToGenerator');
|
|
14
|
+
var _defineProperty = require('@babel/runtime-corejs3/helpers/defineProperty');
|
|
15
|
+
var _regeneratorRuntime = require('@babel/runtime-corejs3/regenerator');
|
|
16
|
+
var _reduceInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/reduce');
|
|
18
17
|
var fs = require('fs');
|
|
19
18
|
var path = require('path');
|
|
20
19
|
var getPackages = require('@manypkg/get-packages');
|
|
@@ -22,9 +21,6 @@ var applicationConfig = require('@commercetools-frontend/application-config');
|
|
|
22
21
|
|
|
23
22
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
24
23
|
|
|
25
|
-
var _regeneratorRuntime__default = /*#__PURE__*/_interopDefault(_regeneratorRuntime);
|
|
26
|
-
var _reduceInstanceProperty__default = /*#__PURE__*/_interopDefault(_reduceInstanceProperty);
|
|
27
|
-
var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
|
|
28
24
|
var _Object$keys__default = /*#__PURE__*/_interopDefault(_Object$keys);
|
|
29
25
|
var _Object$getOwnPropertySymbols__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertySymbols);
|
|
30
26
|
var _filterInstanceProperty__default = /*#__PURE__*/_interopDefault(_filterInstanceProperty);
|
|
@@ -33,12 +29,14 @@ var _forEachInstanceProperty__default = /*#__PURE__*/_interopDefault(_forEachIns
|
|
|
33
29
|
var _Object$getOwnPropertyDescriptors__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertyDescriptors);
|
|
34
30
|
var _Object$defineProperties__default = /*#__PURE__*/_interopDefault(_Object$defineProperties);
|
|
35
31
|
var _Object$defineProperty__default = /*#__PURE__*/_interopDefault(_Object$defineProperty);
|
|
32
|
+
var _regeneratorRuntime__default = /*#__PURE__*/_interopDefault(_regeneratorRuntime);
|
|
33
|
+
var _reduceInstanceProperty__default = /*#__PURE__*/_interopDefault(_reduceInstanceProperty);
|
|
36
34
|
var fs__default = /*#__PURE__*/_interopDefault(fs);
|
|
37
35
|
var path__default = /*#__PURE__*/_interopDefault(path);
|
|
38
36
|
|
|
39
|
-
function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object);
|
|
37
|
+
function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
40
38
|
|
|
41
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
39
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context3, _context4; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys(Object(source), !0)).call(_context3, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys(Object(source))).call(_context4, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
42
40
|
var cachedAllCustomApplicationConfigs;
|
|
43
41
|
var defaultDotfiles = ['.env', '.env.local'];
|
|
44
42
|
|
|
@@ -50,9 +48,6 @@ var loadEnvironmentVariables = function loadEnvironmentVariables(packageDirPath,
|
|
|
50
48
|
var envPath = path__default["default"].join(packageDirPath, dotfile);
|
|
51
49
|
|
|
52
50
|
if (!fs__default["default"].existsSync(envPath)) {
|
|
53
|
-
var _context;
|
|
54
|
-
|
|
55
|
-
console.error(_concatInstanceProperty__default["default"](_context = "Skipping loading of ".concat(dotfile, " from ")).call(_context, packageDirPath));
|
|
56
51
|
return mergedEnvs;
|
|
57
52
|
}
|
|
58
53
|
|
|
@@ -61,12 +56,11 @@ var loadEnvironmentVariables = function loadEnvironmentVariables(packageDirPath,
|
|
|
61
56
|
});
|
|
62
57
|
|
|
63
58
|
if (env.error) {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
console.error(_concatInstanceProperty__default["default"](_context2 = "Failed to load ".concat(dotfile, " from ")).call(_context2, packageDirPath));
|
|
59
|
+
console.error("Failed to load environment variables from ".concat(envPath));
|
|
67
60
|
return mergedEnvs;
|
|
68
61
|
}
|
|
69
62
|
|
|
63
|
+
console.log("Loading environment variables from ".concat(envPath));
|
|
70
64
|
return _objectSpread(_objectSpread({}, mergedEnvs), env.parsed); // Merge it with the environment variables defined in the current process.
|
|
71
65
|
}, process.env);
|
|
72
66
|
};
|
|
@@ -75,26 +69,25 @@ var loadAllCustomApplicationConfigs = /*#__PURE__*/function () {
|
|
|
75
69
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(options) {
|
|
76
70
|
var _yield$getPackages, packages;
|
|
77
71
|
|
|
78
|
-
return _regeneratorRuntime__default["default"].wrap(function _callee$(
|
|
72
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
|
|
79
73
|
while (1) {
|
|
80
|
-
switch (
|
|
74
|
+
switch (_context.prev = _context.next) {
|
|
81
75
|
case 0:
|
|
82
76
|
if (!cachedAllCustomApplicationConfigs) {
|
|
83
|
-
|
|
77
|
+
_context.next = 2;
|
|
84
78
|
break;
|
|
85
79
|
}
|
|
86
80
|
|
|
87
|
-
return
|
|
81
|
+
return _context.abrupt("return", cachedAllCustomApplicationConfigs);
|
|
88
82
|
|
|
89
83
|
case 2:
|
|
90
|
-
|
|
84
|
+
_context.next = 4;
|
|
91
85
|
return getPackages.getPackages(process.cwd());
|
|
92
86
|
|
|
93
87
|
case 4:
|
|
94
|
-
_yield$getPackages =
|
|
88
|
+
_yield$getPackages = _context.sent;
|
|
95
89
|
packages = _yield$getPackages.packages;
|
|
96
90
|
cachedAllCustomApplicationConfigs = _reduceInstanceProperty__default["default"](packages).call(packages, function (allConfigs, packageInfo) {
|
|
97
|
-
console.log("Reading Custom Application config for ".concat(packageInfo.packageJson.name));
|
|
98
91
|
var processEnv = loadEnvironmentVariables(packageInfo.dir, options);
|
|
99
92
|
|
|
100
93
|
try {
|
|
@@ -103,6 +96,7 @@ var loadAllCustomApplicationConfigs = /*#__PURE__*/function () {
|
|
|
103
96
|
processEnv: processEnv,
|
|
104
97
|
applicationPath: packageInfo.dir
|
|
105
98
|
});
|
|
99
|
+
console.log("Found Custom Application config for ".concat(packageInfo.packageJson.name));
|
|
106
100
|
return _objectSpread(_objectSpread({}, allConfigs), {}, _defineProperty({}, processedConfig.env.entryPointUriPath, processedConfig.env));
|
|
107
101
|
} catch (error) {
|
|
108
102
|
// Ignore packages that do not have a valid config file, either because
|
|
@@ -115,11 +109,11 @@ var loadAllCustomApplicationConfigs = /*#__PURE__*/function () {
|
|
|
115
109
|
throw error;
|
|
116
110
|
}
|
|
117
111
|
}, {});
|
|
118
|
-
return
|
|
112
|
+
return _context.abrupt("return", cachedAllCustomApplicationConfigs);
|
|
119
113
|
|
|
120
114
|
case 8:
|
|
121
115
|
case "end":
|
|
122
|
-
return
|
|
116
|
+
return _context.stop();
|
|
123
117
|
}
|
|
124
118
|
}
|
|
125
119
|
}, _callee);
|
|
@@ -133,30 +127,31 @@ var loadAllCustomApplicationConfigs = /*#__PURE__*/function () {
|
|
|
133
127
|
var customApplicationConfig = /*#__PURE__*/function () {
|
|
134
128
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee2(options) {
|
|
135
129
|
var allCustomApplicationConfigs, customApplicationConfig;
|
|
136
|
-
return _regeneratorRuntime__default["default"].wrap(function _callee2$(
|
|
130
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee2$(_context2) {
|
|
137
131
|
while (1) {
|
|
138
|
-
switch (
|
|
132
|
+
switch (_context2.prev = _context2.next) {
|
|
139
133
|
case 0:
|
|
140
|
-
|
|
134
|
+
_context2.next = 2;
|
|
141
135
|
return loadAllCustomApplicationConfigs(options);
|
|
142
136
|
|
|
143
137
|
case 2:
|
|
144
|
-
allCustomApplicationConfigs =
|
|
138
|
+
allCustomApplicationConfigs = _context2.sent;
|
|
145
139
|
customApplicationConfig = allCustomApplicationConfigs[options.entryPointUriPath];
|
|
146
140
|
|
|
147
141
|
if (customApplicationConfig) {
|
|
148
|
-
|
|
142
|
+
_context2.next = 6;
|
|
149
143
|
break;
|
|
150
144
|
}
|
|
151
145
|
|
|
152
146
|
throw new Error("Could not find Custom Application config for entry point \"".concat(options.entryPointUriPath, "\""));
|
|
153
147
|
|
|
154
148
|
case 6:
|
|
155
|
-
|
|
149
|
+
console.log("Using Custom Application config for \"".concat(options.entryPointUriPath, "\""));
|
|
150
|
+
return _context2.abrupt("return", customApplicationConfig);
|
|
156
151
|
|
|
157
|
-
case
|
|
152
|
+
case 8:
|
|
158
153
|
case "end":
|
|
159
|
-
return
|
|
154
|
+
return _context2.stop();
|
|
160
155
|
}
|
|
161
156
|
}
|
|
162
157
|
}, _callee2);
|
|
@@ -2,11 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var _asyncToGenerator = require('@babel/runtime-corejs3/helpers/asyncToGenerator');
|
|
6
|
-
var _defineProperty = require('@babel/runtime-corejs3/helpers/defineProperty');
|
|
7
|
-
var _regeneratorRuntime = require('@babel/runtime-corejs3/regenerator');
|
|
8
|
-
var _reduceInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/reduce');
|
|
9
|
-
var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
|
|
10
5
|
var _Object$keys = require('@babel/runtime-corejs3/core-js-stable/object/keys');
|
|
11
6
|
var _Object$getOwnPropertySymbols = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
|
|
12
7
|
var _filterInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/filter');
|
|
@@ -15,6 +10,10 @@ var _forEachInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/in
|
|
|
15
10
|
var _Object$getOwnPropertyDescriptors = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors');
|
|
16
11
|
var _Object$defineProperties = require('@babel/runtime-corejs3/core-js-stable/object/define-properties');
|
|
17
12
|
var _Object$defineProperty = require('@babel/runtime-corejs3/core-js-stable/object/define-property');
|
|
13
|
+
var _asyncToGenerator = require('@babel/runtime-corejs3/helpers/asyncToGenerator');
|
|
14
|
+
var _defineProperty = require('@babel/runtime-corejs3/helpers/defineProperty');
|
|
15
|
+
var _regeneratorRuntime = require('@babel/runtime-corejs3/regenerator');
|
|
16
|
+
var _reduceInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/reduce');
|
|
18
17
|
var fs = require('fs');
|
|
19
18
|
var path = require('path');
|
|
20
19
|
var getPackages = require('@manypkg/get-packages');
|
|
@@ -22,9 +21,6 @@ var applicationConfig = require('@commercetools-frontend/application-config');
|
|
|
22
21
|
|
|
23
22
|
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
24
23
|
|
|
25
|
-
var _regeneratorRuntime__default = /*#__PURE__*/_interopDefault(_regeneratorRuntime);
|
|
26
|
-
var _reduceInstanceProperty__default = /*#__PURE__*/_interopDefault(_reduceInstanceProperty);
|
|
27
|
-
var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
|
|
28
24
|
var _Object$keys__default = /*#__PURE__*/_interopDefault(_Object$keys);
|
|
29
25
|
var _Object$getOwnPropertySymbols__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertySymbols);
|
|
30
26
|
var _filterInstanceProperty__default = /*#__PURE__*/_interopDefault(_filterInstanceProperty);
|
|
@@ -33,12 +29,14 @@ var _forEachInstanceProperty__default = /*#__PURE__*/_interopDefault(_forEachIns
|
|
|
33
29
|
var _Object$getOwnPropertyDescriptors__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertyDescriptors);
|
|
34
30
|
var _Object$defineProperties__default = /*#__PURE__*/_interopDefault(_Object$defineProperties);
|
|
35
31
|
var _Object$defineProperty__default = /*#__PURE__*/_interopDefault(_Object$defineProperty);
|
|
32
|
+
var _regeneratorRuntime__default = /*#__PURE__*/_interopDefault(_regeneratorRuntime);
|
|
33
|
+
var _reduceInstanceProperty__default = /*#__PURE__*/_interopDefault(_reduceInstanceProperty);
|
|
36
34
|
var fs__default = /*#__PURE__*/_interopDefault(fs);
|
|
37
35
|
var path__default = /*#__PURE__*/_interopDefault(path);
|
|
38
36
|
|
|
39
|
-
function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object);
|
|
37
|
+
function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); enumerableOnly && (symbols = _filterInstanceProperty__default["default"](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default["default"](object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
40
38
|
|
|
41
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
39
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context3, _context4; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys(Object(source), !0)).call(_context3, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys(Object(source))).call(_context4, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } return target; }
|
|
42
40
|
var cachedAllCustomApplicationConfigs;
|
|
43
41
|
var defaultDotfiles = ['.env', '.env.local'];
|
|
44
42
|
|
|
@@ -50,9 +48,6 @@ var loadEnvironmentVariables = function loadEnvironmentVariables(packageDirPath,
|
|
|
50
48
|
var envPath = path__default["default"].join(packageDirPath, dotfile);
|
|
51
49
|
|
|
52
50
|
if (!fs__default["default"].existsSync(envPath)) {
|
|
53
|
-
var _context;
|
|
54
|
-
|
|
55
|
-
console.error(_concatInstanceProperty__default["default"](_context = "Skipping loading of ".concat(dotfile, " from ")).call(_context, packageDirPath));
|
|
56
51
|
return mergedEnvs;
|
|
57
52
|
}
|
|
58
53
|
|
|
@@ -61,12 +56,11 @@ var loadEnvironmentVariables = function loadEnvironmentVariables(packageDirPath,
|
|
|
61
56
|
});
|
|
62
57
|
|
|
63
58
|
if (env.error) {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
console.error(_concatInstanceProperty__default["default"](_context2 = "Failed to load ".concat(dotfile, " from ")).call(_context2, packageDirPath));
|
|
59
|
+
console.error("Failed to load environment variables from ".concat(envPath));
|
|
67
60
|
return mergedEnvs;
|
|
68
61
|
}
|
|
69
62
|
|
|
63
|
+
console.log("Loading environment variables from ".concat(envPath));
|
|
70
64
|
return _objectSpread(_objectSpread({}, mergedEnvs), env.parsed); // Merge it with the environment variables defined in the current process.
|
|
71
65
|
}, process.env);
|
|
72
66
|
};
|
|
@@ -75,26 +69,25 @@ var loadAllCustomApplicationConfigs = /*#__PURE__*/function () {
|
|
|
75
69
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(options) {
|
|
76
70
|
var _yield$getPackages, packages;
|
|
77
71
|
|
|
78
|
-
return _regeneratorRuntime__default["default"].wrap(function _callee$(
|
|
72
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee$(_context) {
|
|
79
73
|
while (1) {
|
|
80
|
-
switch (
|
|
74
|
+
switch (_context.prev = _context.next) {
|
|
81
75
|
case 0:
|
|
82
76
|
if (!cachedAllCustomApplicationConfigs) {
|
|
83
|
-
|
|
77
|
+
_context.next = 2;
|
|
84
78
|
break;
|
|
85
79
|
}
|
|
86
80
|
|
|
87
|
-
return
|
|
81
|
+
return _context.abrupt("return", cachedAllCustomApplicationConfigs);
|
|
88
82
|
|
|
89
83
|
case 2:
|
|
90
|
-
|
|
84
|
+
_context.next = 4;
|
|
91
85
|
return getPackages.getPackages(process.cwd());
|
|
92
86
|
|
|
93
87
|
case 4:
|
|
94
|
-
_yield$getPackages =
|
|
88
|
+
_yield$getPackages = _context.sent;
|
|
95
89
|
packages = _yield$getPackages.packages;
|
|
96
90
|
cachedAllCustomApplicationConfigs = _reduceInstanceProperty__default["default"](packages).call(packages, function (allConfigs, packageInfo) {
|
|
97
|
-
console.log("Reading Custom Application config for ".concat(packageInfo.packageJson.name));
|
|
98
91
|
var processEnv = loadEnvironmentVariables(packageInfo.dir, options);
|
|
99
92
|
|
|
100
93
|
try {
|
|
@@ -103,6 +96,7 @@ var loadAllCustomApplicationConfigs = /*#__PURE__*/function () {
|
|
|
103
96
|
processEnv: processEnv,
|
|
104
97
|
applicationPath: packageInfo.dir
|
|
105
98
|
});
|
|
99
|
+
console.log("Found Custom Application config for ".concat(packageInfo.packageJson.name));
|
|
106
100
|
return _objectSpread(_objectSpread({}, allConfigs), {}, _defineProperty({}, processedConfig.env.entryPointUriPath, processedConfig.env));
|
|
107
101
|
} catch (error) {
|
|
108
102
|
// Ignore packages that do not have a valid config file, either because
|
|
@@ -115,11 +109,11 @@ var loadAllCustomApplicationConfigs = /*#__PURE__*/function () {
|
|
|
115
109
|
throw error;
|
|
116
110
|
}
|
|
117
111
|
}, {});
|
|
118
|
-
return
|
|
112
|
+
return _context.abrupt("return", cachedAllCustomApplicationConfigs);
|
|
119
113
|
|
|
120
114
|
case 8:
|
|
121
115
|
case "end":
|
|
122
|
-
return
|
|
116
|
+
return _context.stop();
|
|
123
117
|
}
|
|
124
118
|
}
|
|
125
119
|
}, _callee);
|
|
@@ -133,30 +127,31 @@ var loadAllCustomApplicationConfigs = /*#__PURE__*/function () {
|
|
|
133
127
|
var customApplicationConfig = /*#__PURE__*/function () {
|
|
134
128
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee2(options) {
|
|
135
129
|
var allCustomApplicationConfigs, customApplicationConfig;
|
|
136
|
-
return _regeneratorRuntime__default["default"].wrap(function _callee2$(
|
|
130
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee2$(_context2) {
|
|
137
131
|
while (1) {
|
|
138
|
-
switch (
|
|
132
|
+
switch (_context2.prev = _context2.next) {
|
|
139
133
|
case 0:
|
|
140
|
-
|
|
134
|
+
_context2.next = 2;
|
|
141
135
|
return loadAllCustomApplicationConfigs(options);
|
|
142
136
|
|
|
143
137
|
case 2:
|
|
144
|
-
allCustomApplicationConfigs =
|
|
138
|
+
allCustomApplicationConfigs = _context2.sent;
|
|
145
139
|
customApplicationConfig = allCustomApplicationConfigs[options.entryPointUriPath];
|
|
146
140
|
|
|
147
141
|
if (customApplicationConfig) {
|
|
148
|
-
|
|
142
|
+
_context2.next = 6;
|
|
149
143
|
break;
|
|
150
144
|
}
|
|
151
145
|
|
|
152
146
|
throw new Error("Could not find Custom Application config for entry point \"".concat(options.entryPointUriPath, "\""));
|
|
153
147
|
|
|
154
148
|
case 6:
|
|
155
|
-
|
|
149
|
+
console.log("Using Custom Application config for \"".concat(options.entryPointUriPath, "\""));
|
|
150
|
+
return _context2.abrupt("return", customApplicationConfig);
|
|
156
151
|
|
|
157
|
-
case
|
|
152
|
+
case 8:
|
|
158
153
|
case "end":
|
|
159
|
-
return
|
|
154
|
+
return _context2.stop();
|
|
160
155
|
}
|
|
161
156
|
}
|
|
162
157
|
}, _callee2);
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
import _asyncToGenerator from '@babel/runtime-corejs3/helpers/esm/asyncToGenerator';
|
|
2
|
-
import _defineProperty from '@babel/runtime-corejs3/helpers/esm/defineProperty';
|
|
3
|
-
import _regeneratorRuntime from '@babel/runtime-corejs3/regenerator';
|
|
4
|
-
import _reduceInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/reduce';
|
|
5
|
-
import _concatInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/concat';
|
|
6
1
|
import _Object$keys from '@babel/runtime-corejs3/core-js-stable/object/keys';
|
|
7
2
|
import _Object$getOwnPropertySymbols from '@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols';
|
|
8
3
|
import _filterInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/filter';
|
|
@@ -11,14 +6,18 @@ import _forEachInstanceProperty from '@babel/runtime-corejs3/core-js-stable/inst
|
|
|
11
6
|
import _Object$getOwnPropertyDescriptors from '@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors';
|
|
12
7
|
import _Object$defineProperties from '@babel/runtime-corejs3/core-js-stable/object/define-properties';
|
|
13
8
|
import _Object$defineProperty from '@babel/runtime-corejs3/core-js-stable/object/define-property';
|
|
9
|
+
import _asyncToGenerator from '@babel/runtime-corejs3/helpers/esm/asyncToGenerator';
|
|
10
|
+
import _defineProperty from '@babel/runtime-corejs3/helpers/esm/defineProperty';
|
|
11
|
+
import _regeneratorRuntime from '@babel/runtime-corejs3/regenerator';
|
|
12
|
+
import _reduceInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/reduce';
|
|
14
13
|
import fs from 'fs';
|
|
15
14
|
import path from 'path';
|
|
16
15
|
import { getPackages } from '@manypkg/get-packages';
|
|
17
16
|
import { processConfig, MissingOrInvalidConfigError } from '@commercetools-frontend/application-config';
|
|
18
17
|
|
|
19
|
-
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object);
|
|
18
|
+
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
20
19
|
|
|
21
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
20
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context3, _context4; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context3 = ownKeys(Object(source), !0)).call(_context3, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context4 = ownKeys(Object(source))).call(_context4, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
22
21
|
var cachedAllCustomApplicationConfigs;
|
|
23
22
|
var defaultDotfiles = ['.env', '.env.local'];
|
|
24
23
|
|
|
@@ -30,9 +29,6 @@ var loadEnvironmentVariables = function loadEnvironmentVariables(packageDirPath,
|
|
|
30
29
|
var envPath = path.join(packageDirPath, dotfile);
|
|
31
30
|
|
|
32
31
|
if (!fs.existsSync(envPath)) {
|
|
33
|
-
var _context;
|
|
34
|
-
|
|
35
|
-
console.error(_concatInstanceProperty(_context = "Skipping loading of ".concat(dotfile, " from ")).call(_context, packageDirPath));
|
|
36
32
|
return mergedEnvs;
|
|
37
33
|
}
|
|
38
34
|
|
|
@@ -41,12 +37,11 @@ var loadEnvironmentVariables = function loadEnvironmentVariables(packageDirPath,
|
|
|
41
37
|
});
|
|
42
38
|
|
|
43
39
|
if (env.error) {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
console.error(_concatInstanceProperty(_context2 = "Failed to load ".concat(dotfile, " from ")).call(_context2, packageDirPath));
|
|
40
|
+
console.error("Failed to load environment variables from ".concat(envPath));
|
|
47
41
|
return mergedEnvs;
|
|
48
42
|
}
|
|
49
43
|
|
|
44
|
+
console.log("Loading environment variables from ".concat(envPath));
|
|
50
45
|
return _objectSpread(_objectSpread({}, mergedEnvs), env.parsed); // Merge it with the environment variables defined in the current process.
|
|
51
46
|
}, process.env);
|
|
52
47
|
};
|
|
@@ -55,26 +50,25 @@ var loadAllCustomApplicationConfigs = /*#__PURE__*/function () {
|
|
|
55
50
|
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(options) {
|
|
56
51
|
var _yield$getPackages, packages;
|
|
57
52
|
|
|
58
|
-
return _regeneratorRuntime.wrap(function _callee$(
|
|
53
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
59
54
|
while (1) {
|
|
60
|
-
switch (
|
|
55
|
+
switch (_context.prev = _context.next) {
|
|
61
56
|
case 0:
|
|
62
57
|
if (!cachedAllCustomApplicationConfigs) {
|
|
63
|
-
|
|
58
|
+
_context.next = 2;
|
|
64
59
|
break;
|
|
65
60
|
}
|
|
66
61
|
|
|
67
|
-
return
|
|
62
|
+
return _context.abrupt("return", cachedAllCustomApplicationConfigs);
|
|
68
63
|
|
|
69
64
|
case 2:
|
|
70
|
-
|
|
65
|
+
_context.next = 4;
|
|
71
66
|
return getPackages(process.cwd());
|
|
72
67
|
|
|
73
68
|
case 4:
|
|
74
|
-
_yield$getPackages =
|
|
69
|
+
_yield$getPackages = _context.sent;
|
|
75
70
|
packages = _yield$getPackages.packages;
|
|
76
71
|
cachedAllCustomApplicationConfigs = _reduceInstanceProperty(packages).call(packages, function (allConfigs, packageInfo) {
|
|
77
|
-
console.log("Reading Custom Application config for ".concat(packageInfo.packageJson.name));
|
|
78
72
|
var processEnv = loadEnvironmentVariables(packageInfo.dir, options);
|
|
79
73
|
|
|
80
74
|
try {
|
|
@@ -83,6 +77,7 @@ var loadAllCustomApplicationConfigs = /*#__PURE__*/function () {
|
|
|
83
77
|
processEnv: processEnv,
|
|
84
78
|
applicationPath: packageInfo.dir
|
|
85
79
|
});
|
|
80
|
+
console.log("Found Custom Application config for ".concat(packageInfo.packageJson.name));
|
|
86
81
|
return _objectSpread(_objectSpread({}, allConfigs), {}, _defineProperty({}, processedConfig.env.entryPointUriPath, processedConfig.env));
|
|
87
82
|
} catch (error) {
|
|
88
83
|
// Ignore packages that do not have a valid config file, either because
|
|
@@ -95,11 +90,11 @@ var loadAllCustomApplicationConfigs = /*#__PURE__*/function () {
|
|
|
95
90
|
throw error;
|
|
96
91
|
}
|
|
97
92
|
}, {});
|
|
98
|
-
return
|
|
93
|
+
return _context.abrupt("return", cachedAllCustomApplicationConfigs);
|
|
99
94
|
|
|
100
95
|
case 8:
|
|
101
96
|
case "end":
|
|
102
|
-
return
|
|
97
|
+
return _context.stop();
|
|
103
98
|
}
|
|
104
99
|
}
|
|
105
100
|
}, _callee);
|
|
@@ -113,30 +108,31 @@ var loadAllCustomApplicationConfigs = /*#__PURE__*/function () {
|
|
|
113
108
|
var customApplicationConfig = /*#__PURE__*/function () {
|
|
114
109
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(options) {
|
|
115
110
|
var allCustomApplicationConfigs, customApplicationConfig;
|
|
116
|
-
return _regeneratorRuntime.wrap(function _callee2$(
|
|
111
|
+
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
117
112
|
while (1) {
|
|
118
|
-
switch (
|
|
113
|
+
switch (_context2.prev = _context2.next) {
|
|
119
114
|
case 0:
|
|
120
|
-
|
|
115
|
+
_context2.next = 2;
|
|
121
116
|
return loadAllCustomApplicationConfigs(options);
|
|
122
117
|
|
|
123
118
|
case 2:
|
|
124
|
-
allCustomApplicationConfigs =
|
|
119
|
+
allCustomApplicationConfigs = _context2.sent;
|
|
125
120
|
customApplicationConfig = allCustomApplicationConfigs[options.entryPointUriPath];
|
|
126
121
|
|
|
127
122
|
if (customApplicationConfig) {
|
|
128
|
-
|
|
123
|
+
_context2.next = 6;
|
|
129
124
|
break;
|
|
130
125
|
}
|
|
131
126
|
|
|
132
127
|
throw new Error("Could not find Custom Application config for entry point \"".concat(options.entryPointUriPath, "\""));
|
|
133
128
|
|
|
134
129
|
case 6:
|
|
135
|
-
|
|
130
|
+
console.log("Using Custom Application config for \"".concat(options.entryPointUriPath, "\""));
|
|
131
|
+
return _context2.abrupt("return", customApplicationConfig);
|
|
136
132
|
|
|
137
|
-
case
|
|
133
|
+
case 8:
|
|
138
134
|
case "end":
|
|
139
|
-
return
|
|
135
|
+
return _context2.stop();
|
|
140
136
|
}
|
|
141
137
|
}
|
|
142
138
|
}, _callee2);
|