@widergy/react-social-auth 2.2.0 → 3.0.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/CHANGELOG.md +20 -0
- package/dist/components/ActiveDirectory/index.js +56 -117
- package/dist/components/ActiveDirectory/utils.js +3 -3
- package/dist/components/Apple/index.js +45 -66
- package/dist/components/Apple/utils.js +13 -34
- package/dist/components/Button/index.js +21 -17
- package/dist/components/ButtonContainer/index.js +15 -26
- package/dist/components/Facebook/index.js +46 -47
- package/dist/components/Google/components/GoogleButton/index.js +21 -23
- package/dist/components/Google/index.js +20 -21
- package/dist/components/Microsoft/index.js +27 -24
- package/dist/components/Microsoft/styles.module.scss +7 -2
- package/dist/components/Twitter/errors.js +38 -84
- package/dist/components/Twitter/index.js +42 -64
- package/dist/components/Twitter/utils.js +42 -83
- package/dist/components/utils.js +1 -1
- package/dist/constants/buttonSizes.js +2 -4
- package/dist/index.js +8 -8
- package/dist/scss/variables/_colors.scss +4 -4
- package/package.json +29 -69
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -17,37 +16,27 @@ var _errors = require("./errors");
|
|
|
17
16
|
var _stylesModule = _interopRequireDefault(require("./styles.module.scss"));
|
|
18
17
|
var _utils = require("./utils");
|
|
19
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
credentials = _ref2$credentials === void 0 ? 'same_origin' : _ref2$credentials,
|
|
42
|
-
_ref2$customHeaders = _ref2.customHeaders,
|
|
43
|
-
customHeaders = _ref2$customHeaders === void 0 ? {} : _ref2$customHeaders,
|
|
44
|
-
_ref2$forceLogin = _ref2.forceLogin,
|
|
45
|
-
forceLogin = _ref2$forceLogin === void 0 ? false : _ref2$forceLogin,
|
|
46
|
-
loginUrl = _ref2.loginUrl,
|
|
47
|
-
requestTokenUrl = _ref2.requestTokenUrl,
|
|
48
|
-
screenName = _ref2.screenName;
|
|
49
|
-
var handleUrlChange = function handleUrlChange(popup) {
|
|
50
|
-
var interval = (0, _function.polling)(function () {
|
|
19
|
+
const Twitter = _ref => {
|
|
20
|
+
let {
|
|
21
|
+
classNames = {},
|
|
22
|
+
config,
|
|
23
|
+
email,
|
|
24
|
+
label,
|
|
25
|
+
size = _buttonSizes.SMALL,
|
|
26
|
+
tooltipContent,
|
|
27
|
+
triggerOnMount
|
|
28
|
+
} = _ref;
|
|
29
|
+
const {
|
|
30
|
+
callback,
|
|
31
|
+
credentials = 'same_origin',
|
|
32
|
+
customHeaders = {},
|
|
33
|
+
forceLogin = false,
|
|
34
|
+
loginUrl,
|
|
35
|
+
requestTokenUrl,
|
|
36
|
+
screenName
|
|
37
|
+
} = config || {};
|
|
38
|
+
const handleUrlChange = popup => {
|
|
39
|
+
const interval = (0, _function.polling)(() => {
|
|
51
40
|
if (!popup || popup.closed || popup.closed === undefined) {
|
|
52
41
|
clearInterval(interval);
|
|
53
42
|
callback(new _errors.PopupClosedByUserError());
|
|
@@ -55,9 +44,9 @@ var Twitter = function Twitter(_ref) {
|
|
|
55
44
|
try {
|
|
56
45
|
if (popup.location.hostname !== '' && !(0, _utils.isTwitterUrl)(popup.location.hostname)) {
|
|
57
46
|
if (popup.location.search) {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
47
|
+
const query = new URLSearchParams(popup.location.search);
|
|
48
|
+
const OAuthToken = query.get('oauth_token');
|
|
49
|
+
const OAuthVerifier = query.get('oauth_verifier');
|
|
61
50
|
(0, _utils.getAuthToken)(callback, credentials, customHeaders, loginUrl, OAuthToken, OAuthVerifier);
|
|
62
51
|
} else {
|
|
63
52
|
callback(new _errors.NoHashOrQueryParamsError());
|
|
@@ -70,28 +59,11 @@ var Twitter = function Twitter(_ref) {
|
|
|
70
59
|
}
|
|
71
60
|
}, 0);
|
|
72
61
|
};
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
case 0:
|
|
79
|
-
_context.next = 2;
|
|
80
|
-
return (0, _utils.getAuthUrl)(callback, credentials, customHeaders, forceLogin, requestTokenUrl, screenName);
|
|
81
|
-
case 2:
|
|
82
|
-
authUrl = _context.sent;
|
|
83
|
-
popup = (0, _utils.openPopup)(authUrl, 400, 600);
|
|
84
|
-
handleUrlChange(popup);
|
|
85
|
-
case 5:
|
|
86
|
-
case "end":
|
|
87
|
-
return _context.stop();
|
|
88
|
-
}
|
|
89
|
-
}, _callee);
|
|
90
|
-
}));
|
|
91
|
-
return function handleClick() {
|
|
92
|
-
return _ref3.apply(this, arguments);
|
|
93
|
-
};
|
|
94
|
-
}();
|
|
62
|
+
const handleClick = async () => {
|
|
63
|
+
const authUrl = await (0, _utils.getAuthUrl)(callback, credentials, customHeaders, forceLogin, requestTokenUrl, screenName);
|
|
64
|
+
const popup = (0, _utils.openPopup)(authUrl, 400, 600);
|
|
65
|
+
handleUrlChange(popup);
|
|
66
|
+
};
|
|
95
67
|
return /*#__PURE__*/_react.default.createElement(_ButtonContainer.default, {
|
|
96
68
|
className: classNames.container,
|
|
97
69
|
size: size,
|
|
@@ -102,8 +74,13 @@ var Twitter = function Twitter(_ref) {
|
|
|
102
74
|
container: "".concat(_stylesModule.default.buttonContainer, " ").concat(classNames.buttonContainer)
|
|
103
75
|
},
|
|
104
76
|
email: email,
|
|
105
|
-
|
|
106
|
-
|
|
77
|
+
emailLabelProps: {
|
|
78
|
+
colorTheme: 'light'
|
|
79
|
+
},
|
|
80
|
+
Icon: _ref2 => {
|
|
81
|
+
let {
|
|
82
|
+
className
|
|
83
|
+
} = _ref2;
|
|
107
84
|
return /*#__PURE__*/_react.default.createElement("img", {
|
|
108
85
|
alt: "Logo de Twitter",
|
|
109
86
|
className: className,
|
|
@@ -111,9 +88,11 @@ var Twitter = function Twitter(_ref) {
|
|
|
111
88
|
});
|
|
112
89
|
},
|
|
113
90
|
label: label,
|
|
114
|
-
mainLabelProps:
|
|
115
|
-
|
|
116
|
-
|
|
91
|
+
mainLabelProps: {
|
|
92
|
+
...(size === _buttonSizes.LARGE ? {
|
|
93
|
+
colorTheme: 'light'
|
|
94
|
+
} : {})
|
|
95
|
+
},
|
|
117
96
|
onClick: handleClick,
|
|
118
97
|
size: size
|
|
119
98
|
}));
|
|
@@ -135,5 +114,4 @@ Twitter.propTypes = {
|
|
|
135
114
|
tooltipContent: _propTypes.string,
|
|
136
115
|
triggerOnMount: _propTypes.bool
|
|
137
116
|
};
|
|
138
|
-
var _default = Twitter;
|
|
139
|
-
exports.default = _default;
|
|
117
|
+
var _default = exports.default = Twitter;
|
|
@@ -5,100 +5,59 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.openPopup = exports.isTwitterUrl = exports.getAuthUrl = exports.getAuthToken = exports.createHeaders = exports.closePopup = void 0;
|
|
7
7
|
var _errors = require("./errors");
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
13
|
-
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
14
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
15
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
16
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
17
|
-
var createHeaders = function createHeaders(customHeaders) {
|
|
18
|
-
var headers = _objectSpread({}, customHeaders);
|
|
8
|
+
const createHeaders = customHeaders => {
|
|
9
|
+
const headers = {
|
|
10
|
+
...customHeaders
|
|
11
|
+
};
|
|
19
12
|
headers['Content-Type'] = 'application/json';
|
|
20
13
|
return headers;
|
|
21
14
|
};
|
|
22
15
|
exports.createHeaders = createHeaders;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
case 10:
|
|
46
|
-
data = null;
|
|
47
|
-
_context.prev = 11;
|
|
48
|
-
_context.next = 14;
|
|
49
|
-
return response.json();
|
|
50
|
-
case 14:
|
|
51
|
-
data = _context.sent;
|
|
52
|
-
_context.next = 20;
|
|
53
|
-
break;
|
|
54
|
-
case 17:
|
|
55
|
-
_context.prev = 17;
|
|
56
|
-
_context.t1 = _context["catch"](11);
|
|
57
|
-
return _context.abrupt("return", callback(new _errors.RequestTokenParseError(_context.t1)));
|
|
58
|
-
case 20:
|
|
59
|
-
authenticationUrl = "https://api.twitter.com/oauth/authenticate?oauth_token=".concat(data.oauth_token, "&force_login=").concat(forceLogin);
|
|
60
|
-
if (screenName) {
|
|
61
|
-
authenticationUrl = "".concat(authenticationUrl, "&screen_name=").concat(screenName);
|
|
62
|
-
}
|
|
63
|
-
return _context.abrupt("return", authenticationUrl);
|
|
64
|
-
case 23:
|
|
65
|
-
case "end":
|
|
66
|
-
return _context.stop();
|
|
67
|
-
}
|
|
68
|
-
}, _callee, null, [[1, 7], [11, 17]]);
|
|
69
|
-
}));
|
|
70
|
-
return function getAuthUrl(_x, _x2, _x3, _x4, _x5, _x6) {
|
|
71
|
-
return _ref.apply(this, arguments);
|
|
72
|
-
};
|
|
73
|
-
}();
|
|
74
|
-
exports.getAuthUrl = getAuthUrl;
|
|
75
|
-
var isTwitterUrl = function isTwitterUrl(url) {
|
|
76
|
-
return url.includes('api.twitter.com');
|
|
16
|
+
const getAuthUrl = async (callback, credentials, customHeaders, forceLogin, requestTokenUrl, screenName) => {
|
|
17
|
+
let response = null;
|
|
18
|
+
try {
|
|
19
|
+
response = await window.fetch(requestTokenUrl, {
|
|
20
|
+
method: 'POST',
|
|
21
|
+
credentials,
|
|
22
|
+
headers: createHeaders(customHeaders)
|
|
23
|
+
});
|
|
24
|
+
} catch (error) {
|
|
25
|
+
return callback(new _errors.RequestTokenError(error));
|
|
26
|
+
}
|
|
27
|
+
let data = null;
|
|
28
|
+
try {
|
|
29
|
+
data = await response.json();
|
|
30
|
+
} catch (error) {
|
|
31
|
+
return callback(new _errors.RequestTokenParseError(error));
|
|
32
|
+
}
|
|
33
|
+
let authenticationUrl = "https://api.twitter.com/oauth/authenticate?oauth_token=".concat(data.oauth_token, "&force_login=").concat(forceLogin);
|
|
34
|
+
if (screenName) {
|
|
35
|
+
authenticationUrl = "".concat(authenticationUrl, "&screen_name=").concat(screenName);
|
|
36
|
+
}
|
|
37
|
+
return authenticationUrl;
|
|
77
38
|
};
|
|
39
|
+
exports.getAuthUrl = getAuthUrl;
|
|
40
|
+
const isTwitterUrl = url => url.includes('api.twitter.com');
|
|
78
41
|
exports.isTwitterUrl = isTwitterUrl;
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
42
|
+
const openPopup = (authUrl, height, width) => {
|
|
43
|
+
const w = width;
|
|
44
|
+
const h = height;
|
|
45
|
+
const left = window.innerWidth / 2 - w / 2;
|
|
46
|
+
const top = window.innerHeight / 2 - h / 2;
|
|
47
|
+
const popup = window.open(authUrl, '', "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=".concat(w, ", height=").concat(h, ", top=").concat(top, ", left=").concat(left));
|
|
85
48
|
return popup;
|
|
86
49
|
};
|
|
87
50
|
exports.openPopup = openPopup;
|
|
88
|
-
|
|
51
|
+
const closePopup = (interval, popup) => {
|
|
89
52
|
clearInterval(interval);
|
|
90
53
|
popup.close();
|
|
91
54
|
};
|
|
92
55
|
exports.closePopup = closePopup;
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
}).catch(function (error) {
|
|
101
|
-
return callback(new _errors.GetAuthTokenFailure(error, loginUrl, OAuthVerifier, OAuthToken));
|
|
102
|
-
});
|
|
103
|
-
};
|
|
56
|
+
const getAuthToken = (callback, credentials, customHeaders, loginUrl, OAuthToken, OAuthVerifier) => window.fetch("".concat(loginUrl, "?oauth_verifier=").concat(OAuthVerifier, "&oauth_token=").concat(OAuthToken), {
|
|
57
|
+
method: 'POST',
|
|
58
|
+
credentials,
|
|
59
|
+
headers: createHeaders(customHeaders)
|
|
60
|
+
}).then(response => {
|
|
61
|
+
callback(response);
|
|
62
|
+
}).catch(error => callback(new _errors.GetAuthTokenFailure(error, loginUrl, OAuthVerifier, OAuthToken)));
|
|
104
63
|
exports.getAuthToken = getAuthToken;
|
package/dist/components/utils.js
CHANGED
|
@@ -4,7 +4,5 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.SMALL = exports.LARGE = void 0;
|
|
7
|
-
|
|
8
|
-
exports.
|
|
9
|
-
var LARGE = 'large';
|
|
10
|
-
exports.LARGE = LARGE;
|
|
7
|
+
const SMALL = exports.SMALL = 'small';
|
|
8
|
+
const LARGE = exports.LARGE = 'large';
|
package/dist/index.js
CHANGED
|
@@ -5,49 +5,49 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
Object.defineProperty(exports, "ActiveDirectory", {
|
|
7
7
|
enumerable: true,
|
|
8
|
-
get: function
|
|
8
|
+
get: function () {
|
|
9
9
|
return _ActiveDirectory.default;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "Apple", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function
|
|
14
|
+
get: function () {
|
|
15
15
|
return _Apple.default;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, "Button", {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: function
|
|
20
|
+
get: function () {
|
|
21
21
|
return _Button.default;
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "ButtonContainer", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function
|
|
26
|
+
get: function () {
|
|
27
27
|
return _ButtonContainer.default;
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
30
|
Object.defineProperty(exports, "Facebook", {
|
|
31
31
|
enumerable: true,
|
|
32
|
-
get: function
|
|
32
|
+
get: function () {
|
|
33
33
|
return _Facebook.default;
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "Google", {
|
|
37
37
|
enumerable: true,
|
|
38
|
-
get: function
|
|
38
|
+
get: function () {
|
|
39
39
|
return _Google.default;
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
42
|
Object.defineProperty(exports, "Microsoft", {
|
|
43
43
|
enumerable: true,
|
|
44
|
-
get: function
|
|
44
|
+
get: function () {
|
|
45
45
|
return _Microsoft.default;
|
|
46
46
|
}
|
|
47
47
|
});
|
|
48
48
|
Object.defineProperty(exports, "Twitter", {
|
|
49
49
|
enumerable: true,
|
|
50
|
-
get: function
|
|
50
|
+
get: function () {
|
|
51
51
|
return _Twitter.default;
|
|
52
52
|
}
|
|
53
53
|
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
$black: #000;
|
|
2
|
-
$facebook-bg: #
|
|
2
|
+
$facebook-bg: #4267B2;
|
|
3
3
|
$large-button-shadow: rgba(9, 30, 66, 0.1);
|
|
4
4
|
$small-button-shadow: rgba(24, 44, 73, 0.1);
|
|
5
5
|
$light-black: #252525;
|
|
6
|
-
$microsoft-bg: #
|
|
6
|
+
$microsoft-bg: #2F2F2F;
|
|
7
7
|
$microsoft-button-shadow: rgba(24, 44, 73, 0.1);
|
|
8
|
-
$twitter-bg: #
|
|
9
|
-
$white: #
|
|
8
|
+
$twitter-bg: #00ACED;
|
|
9
|
+
$white: #FFF;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@widergy/react-social-auth",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "Social Network Authorization (Twitter, Facebook, etc.)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
"dist"
|
|
10
10
|
],
|
|
11
11
|
"scripts": {
|
|
12
|
-
"start": "HTTPS=true react-scripts start",
|
|
13
|
-
"build-example": "react-scripts build",
|
|
12
|
+
"start": "HTTPS=true react-scripts --openssl-legacy-provider start",
|
|
13
|
+
"build-example": "react-scripts --openssl-legacy-provider build",
|
|
14
14
|
"sass-lint": "./node_modules/sass-lint/bin/sass-lint.js -v -q",
|
|
15
15
|
"lint": "./node_modules/eslint/bin/eslint.js src && npm run sass-lint",
|
|
16
16
|
"lint-diff": "git diff --name-only --cached --relative --diff-filter=ACM | grep \\.js$ | xargs ./node_modules/eslint/bin/eslint.js",
|
|
@@ -18,36 +18,36 @@
|
|
|
18
18
|
"eject": "react-scripts eject",
|
|
19
19
|
"prebuild": "rimraf dist",
|
|
20
20
|
"build": "NODE_ENV=production babel src/lib --out-dir dist --copy-files",
|
|
21
|
-
"prepare": "npm run build"
|
|
21
|
+
"prepare": "npm run build && husky install"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@babel/cli": "^7.2.3",
|
|
25
25
|
"@babel/core": "^7.3.4",
|
|
26
26
|
"@babel/plugin-proposal-class-properties": "^7.4.0",
|
|
27
|
+
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
|
|
27
28
|
"@babel/preset-env": "^7.3.4",
|
|
28
29
|
"@babel/preset-react": "^7.0.0",
|
|
29
|
-
"@commitlint/cli": "^
|
|
30
|
-
"@commitlint/config-conventional": "^
|
|
31
|
-
"@semantic-release
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"eslint-config-
|
|
36
|
-
"eslint-
|
|
37
|
-
"eslint-plugin-flowtype": "^2.39.1",
|
|
30
|
+
"@commitlint/cli": "^17.7.1",
|
|
31
|
+
"@commitlint/config-conventional": "^17.7.0",
|
|
32
|
+
"@widergy/semantic-release-package-config": "^1.0.0",
|
|
33
|
+
"babel-preset-react-app": "^10.0.1",
|
|
34
|
+
"cross-env": "^7.0.3",
|
|
35
|
+
"eslint-config-airbnb": "^19.0.4",
|
|
36
|
+
"eslint-config-prettier": "^9.0.0",
|
|
37
|
+
"eslint-plugin-flowtype": "^8.0.3",
|
|
38
38
|
"eslint-plugin-import": "^2.14.0",
|
|
39
39
|
"eslint-plugin-jsx-a11y": "^6.1.1",
|
|
40
|
-
"eslint-plugin-prettier": "^
|
|
40
|
+
"eslint-plugin-prettier": "^5.0.0",
|
|
41
41
|
"eslint-plugin-react": "^7.11.0",
|
|
42
|
-
"gh-pages": "^
|
|
43
|
-
"husky": "^
|
|
44
|
-
"prettier": "^
|
|
45
|
-
"prettier-eslint": "^
|
|
46
|
-
"react": "^
|
|
47
|
-
"react-dom": "^
|
|
42
|
+
"gh-pages": "^6.0.0",
|
|
43
|
+
"husky": "^8.0.0",
|
|
44
|
+
"prettier": "^3.0.3",
|
|
45
|
+
"prettier-eslint": "^15.0.1",
|
|
46
|
+
"react": "^18.2.0",
|
|
47
|
+
"react-dom": "^18.2.0",
|
|
48
48
|
"react-error-overlay": "6.0.9",
|
|
49
|
-
"react-scripts": "
|
|
50
|
-
"rimraf": "^
|
|
49
|
+
"react-scripts": "^4.0.3",
|
|
50
|
+
"rimraf": "^5.0.1",
|
|
51
51
|
"sass-lint": "^1.12.1",
|
|
52
52
|
"semantic-release": "^15.13.31"
|
|
53
53
|
},
|
|
@@ -58,10 +58,10 @@
|
|
|
58
58
|
"not op_mini all"
|
|
59
59
|
],
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@azure/msal-browser": "^
|
|
62
|
-
"@react-oauth/google": "^0.
|
|
63
|
-
"@widergy/energy-ui": "^
|
|
64
|
-
"@widergy/web-utils": "^
|
|
61
|
+
"@azure/msal-browser": "^3.1.0",
|
|
62
|
+
"@react-oauth/google": "^0.11.1",
|
|
63
|
+
"@widergy/energy-ui": "^3.0.0",
|
|
64
|
+
"@widergy/web-utils": "^2.0.0",
|
|
65
65
|
"node-sass": "^8.0.0",
|
|
66
66
|
"prop-types": "^15.8.1",
|
|
67
67
|
"react-facebook-login": "^4.1.1",
|
|
@@ -70,50 +70,10 @@
|
|
|
70
70
|
"url-search-params-polyfill": ">=2.0.1"
|
|
71
71
|
},
|
|
72
72
|
"resolutions": {
|
|
73
|
-
"
|
|
74
|
-
|
|
75
|
-
"husky": {
|
|
76
|
-
"hooks": {
|
|
77
|
-
"pre-commit": "node branch-name-hook",
|
|
78
|
-
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
|
|
79
|
-
}
|
|
73
|
+
"node-sass": "^8.0.0",
|
|
74
|
+
"url-loader": "1.1.2"
|
|
80
75
|
},
|
|
81
76
|
"release": {
|
|
82
|
-
"
|
|
83
|
-
"@semantic-release/commit-analyzer",
|
|
84
|
-
"@semantic-release/release-notes-generator",
|
|
85
|
-
[
|
|
86
|
-
"@semantic-release/changelog",
|
|
87
|
-
{
|
|
88
|
-
"changelogFile": "./CHANGELOG.md"
|
|
89
|
-
}
|
|
90
|
-
],
|
|
91
|
-
"@semantic-release/npm",
|
|
92
|
-
[
|
|
93
|
-
"@semantic-release/git",
|
|
94
|
-
{
|
|
95
|
-
"assets": [
|
|
96
|
-
"./CHANGELOG.md",
|
|
97
|
-
"package.json"
|
|
98
|
-
]
|
|
99
|
-
}
|
|
100
|
-
],
|
|
101
|
-
"@semantic-release/github"
|
|
102
|
-
]
|
|
103
|
-
},
|
|
104
|
-
"commitlint": {
|
|
105
|
-
"extends": [
|
|
106
|
-
"@commitlint/config-conventional"
|
|
107
|
-
],
|
|
108
|
-
"rules": {
|
|
109
|
-
"subject-case": [
|
|
110
|
-
2,
|
|
111
|
-
"never",
|
|
112
|
-
[
|
|
113
|
-
"start-case",
|
|
114
|
-
"pascal-case"
|
|
115
|
-
]
|
|
116
|
-
]
|
|
117
|
-
}
|
|
77
|
+
"extends": "@widergy/semantic-release-package-config"
|
|
118
78
|
}
|
|
119
79
|
}
|