@commercetools-frontend/cypress 20.10.3 → 20.12.0
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/add-commands/dist/commercetools-frontend-cypress-add-commands.cjs.dev.js +11 -11
- package/add-commands/dist/commercetools-frontend-cypress-add-commands.cjs.prod.js +11 -11
- package/dist/commercetools-frontend-cypress.cjs.dev.js +2 -2
- package/dist/commercetools-frontend-cypress.cjs.prod.js +2 -2
- package/dist/commercetools-frontend-cypress.esm.js +2 -2
- package/dist/declarations/src/version.d.ts +1 -1
- package/package.json +3 -7
- package/task/dist/commercetools-frontend-cypress-task.cjs.dev.js +12 -12
- package/task/dist/commercetools-frontend-cypress-task.cjs.prod.js +12 -12
|
@@ -38,16 +38,16 @@ var buildOidcScope = function buildOidcScope(options) {
|
|
|
38
38
|
if (options.projectKey) {
|
|
39
39
|
var _context, _context2, _options$oAuthScopes$, _options$oAuthScopes, _context4, _options$oAuthScopes$2, _options$oAuthScopes2;
|
|
40
40
|
|
|
41
|
-
claims.push(_concatInstanceProperty__default[
|
|
42
|
-
claims.push.apply(claims, _toConsumableArray(_mapInstanceProperty__default[
|
|
41
|
+
claims.push(_concatInstanceProperty__default["default"](_context = "".concat(constants.OIDC_CLAIMS.PROJECT_KEY, ":")).call(_context, options.projectKey));
|
|
42
|
+
claims.push.apply(claims, _toConsumableArray(_mapInstanceProperty__default["default"](_context2 = (_options$oAuthScopes$ = (_options$oAuthScopes = options.oAuthScopes) === null || _options$oAuthScopes === void 0 ? void 0 : _options$oAuthScopes.view) !== null && _options$oAuthScopes$ !== void 0 ? _options$oAuthScopes$ : []).call(_context2, function (scope) {
|
|
43
43
|
var _context3;
|
|
44
44
|
|
|
45
|
-
return _concatInstanceProperty__default[
|
|
45
|
+
return _concatInstanceProperty__default["default"](_context3 = "".concat(constants.OIDC_CLAIMS.VIEW, ":")).call(_context3, scope);
|
|
46
46
|
})));
|
|
47
|
-
claims.push.apply(claims, _toConsumableArray(_mapInstanceProperty__default[
|
|
47
|
+
claims.push.apply(claims, _toConsumableArray(_mapInstanceProperty__default["default"](_context4 = (_options$oAuthScopes$2 = (_options$oAuthScopes2 = options.oAuthScopes) === null || _options$oAuthScopes2 === void 0 ? void 0 : _options$oAuthScopes2.manage) !== null && _options$oAuthScopes$2 !== void 0 ? _options$oAuthScopes$2 : []).call(_context4, function (scope) {
|
|
48
48
|
var _context5;
|
|
49
49
|
|
|
50
|
-
return _concatInstanceProperty__default[
|
|
50
|
+
return _concatInstanceProperty__default["default"](_context5 = "".concat(constants.OIDC_CLAIMS.MANAGE, ":")).call(_context5, scope);
|
|
51
51
|
})));
|
|
52
52
|
}
|
|
53
53
|
|
|
@@ -56,16 +56,16 @@ var buildOidcScope = function buildOidcScope(options) {
|
|
|
56
56
|
if (teamId) {
|
|
57
57
|
var _context6;
|
|
58
58
|
|
|
59
|
-
claims.push(_concatInstanceProperty__default[
|
|
59
|
+
claims.push(_concatInstanceProperty__default["default"](_context6 = "".concat(constants.OIDC_CLAIMS.TEAM_ID, ":")).call(_context6, teamId));
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
return _concatInstanceProperty__default[
|
|
62
|
+
return _concatInstanceProperty__default["default"](_context7 = [// This is required as per OIDC spec.
|
|
63
63
|
constants.OIDC_CLAIMS.OPEN_ID]).call(_context7, claims).join(' ');
|
|
64
64
|
};
|
|
65
65
|
|
|
66
|
-
function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default[
|
|
66
|
+
function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); if (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; }
|
|
67
67
|
|
|
68
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { var _context3; _forEachInstanceProperty__default[
|
|
68
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { var _context3; _forEachInstanceProperty__default["default"](_context3 = ownKeys(Object(source), true)).call(_context3, function (key) { _defineProperty(target, key, source[key]); }); } else if (_Object$getOwnPropertyDescriptors__default["default"]) { _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)); } else { var _context4; _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; }
|
|
69
69
|
|
|
70
70
|
Cypress.Commands.add('loginByOidc', function (commandOptions) {
|
|
71
71
|
var _commandOptions$proje;
|
|
@@ -120,7 +120,7 @@ Cypress.Commands.add('loginByOidc', function (commandOptions) {
|
|
|
120
120
|
var _context;
|
|
121
121
|
|
|
122
122
|
win.localStorage.setItem(constants.STORAGE_KEYS.ACTIVE_PROJECT_KEY, projectKey);
|
|
123
|
-
win.sessionStorage.setItem(_concatInstanceProperty__default[
|
|
123
|
+
win.sessionStorage.setItem(_concatInstanceProperty__default["default"](_context = "".concat(constants.STORAGE_KEYS.NONCE, "_")).call(_context, sessionNonce), _JSON$stringify__default["default"]({
|
|
124
124
|
applicationId: applicationId,
|
|
125
125
|
query: {}
|
|
126
126
|
}));
|
|
@@ -135,7 +135,7 @@ Cypress.Commands.add('loginByOidc', function (commandOptions) {
|
|
|
135
135
|
if (commandOptions.initialRoute) {
|
|
136
136
|
var _context2;
|
|
137
137
|
|
|
138
|
-
cy.visit(_concatInstanceProperty__default[
|
|
138
|
+
cy.visit(_concatInstanceProperty__default["default"](_context2 = "".concat(Cypress.config('baseUrl'))).call(_context2, commandOptions.initialRoute));
|
|
139
139
|
cy.url().should('include', commandOptions.initialRoute);
|
|
140
140
|
}
|
|
141
141
|
});
|
|
@@ -38,16 +38,16 @@ var buildOidcScope = function buildOidcScope(options) {
|
|
|
38
38
|
if (options.projectKey) {
|
|
39
39
|
var _context, _context2, _options$oAuthScopes$, _options$oAuthScopes, _context4, _options$oAuthScopes$2, _options$oAuthScopes2;
|
|
40
40
|
|
|
41
|
-
claims.push(_concatInstanceProperty__default[
|
|
42
|
-
claims.push.apply(claims, _toConsumableArray(_mapInstanceProperty__default[
|
|
41
|
+
claims.push(_concatInstanceProperty__default["default"](_context = "".concat(constants.OIDC_CLAIMS.PROJECT_KEY, ":")).call(_context, options.projectKey));
|
|
42
|
+
claims.push.apply(claims, _toConsumableArray(_mapInstanceProperty__default["default"](_context2 = (_options$oAuthScopes$ = (_options$oAuthScopes = options.oAuthScopes) === null || _options$oAuthScopes === void 0 ? void 0 : _options$oAuthScopes.view) !== null && _options$oAuthScopes$ !== void 0 ? _options$oAuthScopes$ : []).call(_context2, function (scope) {
|
|
43
43
|
var _context3;
|
|
44
44
|
|
|
45
|
-
return _concatInstanceProperty__default[
|
|
45
|
+
return _concatInstanceProperty__default["default"](_context3 = "".concat(constants.OIDC_CLAIMS.VIEW, ":")).call(_context3, scope);
|
|
46
46
|
})));
|
|
47
|
-
claims.push.apply(claims, _toConsumableArray(_mapInstanceProperty__default[
|
|
47
|
+
claims.push.apply(claims, _toConsumableArray(_mapInstanceProperty__default["default"](_context4 = (_options$oAuthScopes$2 = (_options$oAuthScopes2 = options.oAuthScopes) === null || _options$oAuthScopes2 === void 0 ? void 0 : _options$oAuthScopes2.manage) !== null && _options$oAuthScopes$2 !== void 0 ? _options$oAuthScopes$2 : []).call(_context4, function (scope) {
|
|
48
48
|
var _context5;
|
|
49
49
|
|
|
50
|
-
return _concatInstanceProperty__default[
|
|
50
|
+
return _concatInstanceProperty__default["default"](_context5 = "".concat(constants.OIDC_CLAIMS.MANAGE, ":")).call(_context5, scope);
|
|
51
51
|
})));
|
|
52
52
|
}
|
|
53
53
|
|
|
@@ -56,16 +56,16 @@ var buildOidcScope = function buildOidcScope(options) {
|
|
|
56
56
|
if (teamId) {
|
|
57
57
|
var _context6;
|
|
58
58
|
|
|
59
|
-
claims.push(_concatInstanceProperty__default[
|
|
59
|
+
claims.push(_concatInstanceProperty__default["default"](_context6 = "".concat(constants.OIDC_CLAIMS.TEAM_ID, ":")).call(_context6, teamId));
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
return _concatInstanceProperty__default[
|
|
62
|
+
return _concatInstanceProperty__default["default"](_context7 = [// This is required as per OIDC spec.
|
|
63
63
|
constants.OIDC_CLAIMS.OPEN_ID]).call(_context7, claims).join(' ');
|
|
64
64
|
};
|
|
65
65
|
|
|
66
|
-
function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default[
|
|
66
|
+
function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); if (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; }
|
|
67
67
|
|
|
68
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { var _context3; _forEachInstanceProperty__default[
|
|
68
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { var _context3; _forEachInstanceProperty__default["default"](_context3 = ownKeys(Object(source), true)).call(_context3, function (key) { _defineProperty(target, key, source[key]); }); } else if (_Object$getOwnPropertyDescriptors__default["default"]) { _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)); } else { var _context4; _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; }
|
|
69
69
|
|
|
70
70
|
Cypress.Commands.add('loginByOidc', function (commandOptions) {
|
|
71
71
|
var _commandOptions$proje;
|
|
@@ -120,7 +120,7 @@ Cypress.Commands.add('loginByOidc', function (commandOptions) {
|
|
|
120
120
|
var _context;
|
|
121
121
|
|
|
122
122
|
win.localStorage.setItem(constants.STORAGE_KEYS.ACTIVE_PROJECT_KEY, projectKey);
|
|
123
|
-
win.sessionStorage.setItem(_concatInstanceProperty__default[
|
|
123
|
+
win.sessionStorage.setItem(_concatInstanceProperty__default["default"](_context = "".concat(constants.STORAGE_KEYS.NONCE, "_")).call(_context, sessionNonce), _JSON$stringify__default["default"]({
|
|
124
124
|
applicationId: applicationId,
|
|
125
125
|
query: {}
|
|
126
126
|
}));
|
|
@@ -135,7 +135,7 @@ Cypress.Commands.add('loginByOidc', function (commandOptions) {
|
|
|
135
135
|
if (commandOptions.initialRoute) {
|
|
136
136
|
var _context2;
|
|
137
137
|
|
|
138
|
-
cy.visit(_concatInstanceProperty__default[
|
|
138
|
+
cy.visit(_concatInstanceProperty__default["default"](_context2 = "".concat(Cypress.config('baseUrl'))).call(_context2, commandOptions.initialRoute));
|
|
139
139
|
cy.url().should('include', commandOptions.initialRoute);
|
|
140
140
|
}
|
|
141
141
|
});
|
|
@@ -4,8 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var constants = require('./constants-c43c43f2.cjs.dev.js');
|
|
6
6
|
|
|
7
|
-
// NOTE: This string will be replaced
|
|
8
|
-
var version =
|
|
7
|
+
// NOTE: This string will be replaced on build time with the package version.
|
|
8
|
+
var version = "20.12.0";
|
|
9
9
|
|
|
10
10
|
exports.OIDC_CLAIMS = constants.OIDC_CLAIMS;
|
|
11
11
|
exports.OIDC_RESPONSE_TYPES = constants.OIDC_RESPONSE_TYPES;
|
|
@@ -4,8 +4,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var constants = require('./constants-b05c60de.cjs.prod.js');
|
|
6
6
|
|
|
7
|
-
// NOTE: This string will be replaced
|
|
8
|
-
var version =
|
|
7
|
+
// NOTE: This string will be replaced on build time with the package version.
|
|
8
|
+
var version = "20.12.0";
|
|
9
9
|
|
|
10
10
|
exports.OIDC_CLAIMS = constants.OIDC_CLAIMS;
|
|
11
11
|
exports.OIDC_RESPONSE_TYPES = constants.OIDC_RESPONSE_TYPES;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { a as OIDC_CLAIMS, O as OIDC_RESPONSE_TYPES, S as STORAGE_KEYS } from './constants-d5478c94.esm.js';
|
|
2
2
|
|
|
3
|
-
// NOTE: This string will be replaced
|
|
4
|
-
var version =
|
|
3
|
+
// NOTE: This string will be replaced on build time with the package version.
|
|
4
|
+
var version = "20.12.0";
|
|
5
5
|
|
|
6
6
|
export { version };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "
|
|
1
|
+
declare const _default: "__@APPLICATION_KIT_PACKAGE/VERSION_OF_RELEASE__";
|
|
2
2
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-frontend/cypress",
|
|
3
|
-
"version": "20.
|
|
3
|
+
"version": "20.12.0",
|
|
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": {
|
|
@@ -18,7 +18,6 @@
|
|
|
18
18
|
"testing"
|
|
19
19
|
],
|
|
20
20
|
"license": "MIT",
|
|
21
|
-
"private": false,
|
|
22
21
|
"publishConfig": {
|
|
23
22
|
"access": "public"
|
|
24
23
|
},
|
|
@@ -35,18 +34,15 @@
|
|
|
35
34
|
"LICENSE",
|
|
36
35
|
"README.md"
|
|
37
36
|
],
|
|
38
|
-
"scripts": {
|
|
39
|
-
"prepare": "./../../scripts/version.js replace"
|
|
40
|
-
},
|
|
41
37
|
"dependencies": {
|
|
42
38
|
"@babel/runtime": "7.15.4",
|
|
43
39
|
"@babel/runtime-corejs3": "7.15.4",
|
|
44
|
-
"@commercetools-frontend/application-config": "20.
|
|
40
|
+
"@commercetools-frontend/application-config": "20.12.0",
|
|
45
41
|
"@manypkg/get-packages": "1.1.1",
|
|
46
42
|
"uuid": "8.3.2"
|
|
47
43
|
},
|
|
48
44
|
"devDependencies": {
|
|
49
|
-
"cypress": "8.
|
|
45
|
+
"cypress": "8.7.0"
|
|
50
46
|
},
|
|
51
47
|
"peerDependencies": {
|
|
52
48
|
"cypress": "5.x || 6.x || 7.x || 8.x"
|
|
@@ -36,9 +36,9 @@ var _Object$defineProperty__default = /*#__PURE__*/_interopDefault(_Object$defin
|
|
|
36
36
|
var fs__default = /*#__PURE__*/_interopDefault(fs);
|
|
37
37
|
var path__default = /*#__PURE__*/_interopDefault(path);
|
|
38
38
|
|
|
39
|
-
function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default[
|
|
39
|
+
function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); if (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
40
|
|
|
41
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { var _context5; _forEachInstanceProperty__default[
|
|
41
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { var _context5; _forEachInstanceProperty__default["default"](_context5 = ownKeys(Object(source), true)).call(_context5, function (key) { _defineProperty(target, key, source[key]); }); } else if (_Object$getOwnPropertyDescriptors__default["default"]) { _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)); } else { var _context6; _forEachInstanceProperty__default["default"](_context6 = ownKeys(Object(source))).call(_context6, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } } return target; }
|
|
42
42
|
var cachedAllCustomApplicationConfigs;
|
|
43
43
|
var defaultDotfiles = ['.env', '.env.local'];
|
|
44
44
|
|
|
@@ -46,13 +46,13 @@ var loadEnvironmentVariables = function loadEnvironmentVariables(packageDirPath,
|
|
|
46
46
|
var _options$dotfiles;
|
|
47
47
|
|
|
48
48
|
var dotfiles = (_options$dotfiles = options.dotfiles) !== null && _options$dotfiles !== void 0 ? _options$dotfiles : defaultDotfiles;
|
|
49
|
-
return _reduceInstanceProperty__default[
|
|
50
|
-
var envPath = path__default[
|
|
49
|
+
return _reduceInstanceProperty__default["default"](dotfiles).call(dotfiles, function (mergedEnvs, dotfile) {
|
|
50
|
+
var envPath = path__default["default"].join(packageDirPath, dotfile);
|
|
51
51
|
|
|
52
|
-
if (!fs__default[
|
|
52
|
+
if (!fs__default["default"].existsSync(envPath)) {
|
|
53
53
|
var _context;
|
|
54
54
|
|
|
55
|
-
console.error(_concatInstanceProperty__default[
|
|
55
|
+
console.error(_concatInstanceProperty__default["default"](_context = "Skipping loading of ".concat(dotfile, " from ")).call(_context, packageDirPath));
|
|
56
56
|
return mergedEnvs;
|
|
57
57
|
}
|
|
58
58
|
|
|
@@ -63,7 +63,7 @@ var loadEnvironmentVariables = function loadEnvironmentVariables(packageDirPath,
|
|
|
63
63
|
if (env.error) {
|
|
64
64
|
var _context2;
|
|
65
65
|
|
|
66
|
-
console.error(_concatInstanceProperty__default[
|
|
66
|
+
console.error(_concatInstanceProperty__default["default"](_context2 = "Failed to load ".concat(dotfile, " from ")).call(_context2, packageDirPath));
|
|
67
67
|
return mergedEnvs;
|
|
68
68
|
}
|
|
69
69
|
|
|
@@ -72,10 +72,10 @@ var loadEnvironmentVariables = function loadEnvironmentVariables(packageDirPath,
|
|
|
72
72
|
};
|
|
73
73
|
|
|
74
74
|
var loadAllCustomApplicationConfigs = /*#__PURE__*/function () {
|
|
75
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default[
|
|
75
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(options) {
|
|
76
76
|
var _yield$getPackages, packages;
|
|
77
77
|
|
|
78
|
-
return _regeneratorRuntime__default[
|
|
78
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee$(_context3) {
|
|
79
79
|
while (1) {
|
|
80
80
|
switch (_context3.prev = _context3.next) {
|
|
81
81
|
case 0:
|
|
@@ -93,7 +93,7 @@ var loadAllCustomApplicationConfigs = /*#__PURE__*/function () {
|
|
|
93
93
|
case 4:
|
|
94
94
|
_yield$getPackages = _context3.sent;
|
|
95
95
|
packages = _yield$getPackages.packages;
|
|
96
|
-
cachedAllCustomApplicationConfigs = _reduceInstanceProperty__default[
|
|
96
|
+
cachedAllCustomApplicationConfigs = _reduceInstanceProperty__default["default"](packages).call(packages, function (allConfigs, packageInfo) {
|
|
97
97
|
console.log("Reading Custom Application config for ".concat(packageInfo.packageJson.name));
|
|
98
98
|
var processEnv = loadEnvironmentVariables(packageInfo.dir, options);
|
|
99
99
|
|
|
@@ -131,9 +131,9 @@ var loadAllCustomApplicationConfigs = /*#__PURE__*/function () {
|
|
|
131
131
|
}();
|
|
132
132
|
|
|
133
133
|
var customApplicationConfig = /*#__PURE__*/function () {
|
|
134
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default[
|
|
134
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee2(options) {
|
|
135
135
|
var allCustomApplicationConfigs, customApplicationConfig;
|
|
136
|
-
return _regeneratorRuntime__default[
|
|
136
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee2$(_context4) {
|
|
137
137
|
while (1) {
|
|
138
138
|
switch (_context4.prev = _context4.next) {
|
|
139
139
|
case 0:
|
|
@@ -36,9 +36,9 @@ var _Object$defineProperty__default = /*#__PURE__*/_interopDefault(_Object$defin
|
|
|
36
36
|
var fs__default = /*#__PURE__*/_interopDefault(fs);
|
|
37
37
|
var path__default = /*#__PURE__*/_interopDefault(path);
|
|
38
38
|
|
|
39
|
-
function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default[
|
|
39
|
+
function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default["default"](object); if (_Object$getOwnPropertySymbols__default["default"]) { var symbols = _Object$getOwnPropertySymbols__default["default"](object); if (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
40
|
|
|
41
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { var _context5; _forEachInstanceProperty__default[
|
|
41
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { var _context5; _forEachInstanceProperty__default["default"](_context5 = ownKeys(Object(source), true)).call(_context5, function (key) { _defineProperty(target, key, source[key]); }); } else if (_Object$getOwnPropertyDescriptors__default["default"]) { _Object$defineProperties__default["default"](target, _Object$getOwnPropertyDescriptors__default["default"](source)); } else { var _context6; _forEachInstanceProperty__default["default"](_context6 = ownKeys(Object(source))).call(_context6, function (key) { _Object$defineProperty__default["default"](target, key, _Object$getOwnPropertyDescriptor__default["default"](source, key)); }); } } return target; }
|
|
42
42
|
var cachedAllCustomApplicationConfigs;
|
|
43
43
|
var defaultDotfiles = ['.env', '.env.local'];
|
|
44
44
|
|
|
@@ -46,13 +46,13 @@ var loadEnvironmentVariables = function loadEnvironmentVariables(packageDirPath,
|
|
|
46
46
|
var _options$dotfiles;
|
|
47
47
|
|
|
48
48
|
var dotfiles = (_options$dotfiles = options.dotfiles) !== null && _options$dotfiles !== void 0 ? _options$dotfiles : defaultDotfiles;
|
|
49
|
-
return _reduceInstanceProperty__default[
|
|
50
|
-
var envPath = path__default[
|
|
49
|
+
return _reduceInstanceProperty__default["default"](dotfiles).call(dotfiles, function (mergedEnvs, dotfile) {
|
|
50
|
+
var envPath = path__default["default"].join(packageDirPath, dotfile);
|
|
51
51
|
|
|
52
|
-
if (!fs__default[
|
|
52
|
+
if (!fs__default["default"].existsSync(envPath)) {
|
|
53
53
|
var _context;
|
|
54
54
|
|
|
55
|
-
console.error(_concatInstanceProperty__default[
|
|
55
|
+
console.error(_concatInstanceProperty__default["default"](_context = "Skipping loading of ".concat(dotfile, " from ")).call(_context, packageDirPath));
|
|
56
56
|
return mergedEnvs;
|
|
57
57
|
}
|
|
58
58
|
|
|
@@ -63,7 +63,7 @@ var loadEnvironmentVariables = function loadEnvironmentVariables(packageDirPath,
|
|
|
63
63
|
if (env.error) {
|
|
64
64
|
var _context2;
|
|
65
65
|
|
|
66
|
-
console.error(_concatInstanceProperty__default[
|
|
66
|
+
console.error(_concatInstanceProperty__default["default"](_context2 = "Failed to load ".concat(dotfile, " from ")).call(_context2, packageDirPath));
|
|
67
67
|
return mergedEnvs;
|
|
68
68
|
}
|
|
69
69
|
|
|
@@ -72,10 +72,10 @@ var loadEnvironmentVariables = function loadEnvironmentVariables(packageDirPath,
|
|
|
72
72
|
};
|
|
73
73
|
|
|
74
74
|
var loadAllCustomApplicationConfigs = /*#__PURE__*/function () {
|
|
75
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default[
|
|
75
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee(options) {
|
|
76
76
|
var _yield$getPackages, packages;
|
|
77
77
|
|
|
78
|
-
return _regeneratorRuntime__default[
|
|
78
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee$(_context3) {
|
|
79
79
|
while (1) {
|
|
80
80
|
switch (_context3.prev = _context3.next) {
|
|
81
81
|
case 0:
|
|
@@ -93,7 +93,7 @@ var loadAllCustomApplicationConfigs = /*#__PURE__*/function () {
|
|
|
93
93
|
case 4:
|
|
94
94
|
_yield$getPackages = _context3.sent;
|
|
95
95
|
packages = _yield$getPackages.packages;
|
|
96
|
-
cachedAllCustomApplicationConfigs = _reduceInstanceProperty__default[
|
|
96
|
+
cachedAllCustomApplicationConfigs = _reduceInstanceProperty__default["default"](packages).call(packages, function (allConfigs, packageInfo) {
|
|
97
97
|
console.log("Reading Custom Application config for ".concat(packageInfo.packageJson.name));
|
|
98
98
|
var processEnv = loadEnvironmentVariables(packageInfo.dir, options);
|
|
99
99
|
|
|
@@ -131,9 +131,9 @@ var loadAllCustomApplicationConfigs = /*#__PURE__*/function () {
|
|
|
131
131
|
}();
|
|
132
132
|
|
|
133
133
|
var customApplicationConfig = /*#__PURE__*/function () {
|
|
134
|
-
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default[
|
|
134
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime__default["default"].mark(function _callee2(options) {
|
|
135
135
|
var allCustomApplicationConfigs, customApplicationConfig;
|
|
136
|
-
return _regeneratorRuntime__default[
|
|
136
|
+
return _regeneratorRuntime__default["default"].wrap(function _callee2$(_context4) {
|
|
137
137
|
while (1) {
|
|
138
138
|
switch (_context4.prev = _context4.next) {
|
|
139
139
|
case 0:
|