@automattic/jetpack-connection 0.33.6 → 0.33.8
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 +10 -0
- package/components/use-connection/index.jsx +1 -1
- package/package.json +4 -4
- package/state/actions.jsx +3 -2
- package/state/controls.jsx +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
### This is a list detailing changes for the Jetpack RNA Connection Component releases.
|
|
4
4
|
|
|
5
|
+
## [0.33.8] - 2024-04-11
|
|
6
|
+
### Changed
|
|
7
|
+
- Update dependencies.
|
|
8
|
+
|
|
9
|
+
## [0.33.7] - 2024-04-08
|
|
10
|
+
### Added
|
|
11
|
+
- Add 'from' property to connection call to WP.com. [#36741]
|
|
12
|
+
|
|
5
13
|
## [0.33.6] - 2024-04-08
|
|
6
14
|
### Changed
|
|
7
15
|
- Updated package dependencies. [#36756, #36760, #36761]
|
|
@@ -745,6 +753,8 @@
|
|
|
745
753
|
- `Main` and `ConnectUser` components added.
|
|
746
754
|
- `JetpackRestApiClient` API client added.
|
|
747
755
|
|
|
756
|
+
[0.33.8]: https://github.com/Automattic/jetpack-connection-js/compare/v0.33.7...v0.33.8
|
|
757
|
+
[0.33.7]: https://github.com/Automattic/jetpack-connection-js/compare/v0.33.6...v0.33.7
|
|
748
758
|
[0.33.6]: https://github.com/Automattic/jetpack-connection-js/compare/v0.33.5...v0.33.6
|
|
749
759
|
[0.33.5]: https://github.com/Automattic/jetpack-connection-js/compare/v0.33.4...v0.33.5
|
|
750
760
|
[0.33.4]: https://github.com/Automattic/jetpack-connection-js/compare/v0.33.3...v0.33.4
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automattic/jetpack-connection",
|
|
3
|
-
"version": "0.33.
|
|
3
|
+
"version": "0.33.8",
|
|
4
4
|
"description": "Jetpack Connection Component",
|
|
5
5
|
"homepage": "https://github.com/Automattic/jetpack/tree/HEAD/projects/js-packages/connection/#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"license": "GPL-2.0-or-later",
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@automattic/jetpack-analytics": "^0.1.29",
|
|
18
|
-
"@automattic/jetpack-api": "^0.17.
|
|
19
|
-
"@automattic/jetpack-components": "^0.
|
|
18
|
+
"@automattic/jetpack-api": "^0.17.5",
|
|
19
|
+
"@automattic/jetpack-components": "^0.52.0",
|
|
20
20
|
"@automattic/jetpack-config": "^0.1.24",
|
|
21
21
|
"@wordpress/base-styles": "4.46.0",
|
|
22
22
|
"@wordpress/browserslist-config": "5.38.0",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"prop-types": "^15.7.2"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@automattic/jetpack-base-styles": "^0.6.
|
|
33
|
+
"@automattic/jetpack-base-styles": "^0.6.22",
|
|
34
34
|
"@babel/core": "7.24.0",
|
|
35
35
|
"@babel/preset-react": "7.23.3",
|
|
36
36
|
"@storybook/addon-actions": "8.0.6",
|
package/state/actions.jsx
CHANGED
|
@@ -90,15 +90,16 @@ function* connectUser( { from, redirectFunc, redirectUri } = {} ) {
|
|
|
90
90
|
* @param {object} Object - contains registrationNonce and redirectUri
|
|
91
91
|
* @param {string} Object.registrationNonce - Registration nonce
|
|
92
92
|
* @param {string} Object.redirectUri - URI that user will be redirected
|
|
93
|
+
* @param {string} [Object.from] - Value that represents the origin of the request (optional)
|
|
93
94
|
* @yields {object} Action object that will be yielded
|
|
94
95
|
* @returns {Promise} Resolved or rejected value of registerSite
|
|
95
96
|
*/
|
|
96
|
-
function* registerSite( { registrationNonce, redirectUri } ) {
|
|
97
|
+
function* registerSite( { registrationNonce, redirectUri, from = '' } ) {
|
|
97
98
|
yield clearRegistrationError();
|
|
98
99
|
yield setSiteIsRegistering( true );
|
|
99
100
|
|
|
100
101
|
try {
|
|
101
|
-
const response = yield { type: REGISTER_SITE, registrationNonce, redirectUri };
|
|
102
|
+
const response = yield { type: REGISTER_SITE, registrationNonce, redirectUri, from };
|
|
102
103
|
yield setConnectionStatus( { isRegistered: true } );
|
|
103
104
|
yield setAuthorizationUrl( response.authorizeUrl );
|
|
104
105
|
yield setSiteIsRegistering( false );
|
package/state/controls.jsx
CHANGED
|
@@ -2,8 +2,8 @@ import restApi from '@automattic/jetpack-api';
|
|
|
2
2
|
import { createRegistryControl } from '@wordpress/data';
|
|
3
3
|
import STORE_ID from './store-id';
|
|
4
4
|
|
|
5
|
-
const REGISTER_SITE = ( { registrationNonce, redirectUri } ) =>
|
|
6
|
-
restApi.registerSite( registrationNonce, redirectUri );
|
|
5
|
+
const REGISTER_SITE = ( { registrationNonce, redirectUri, from } ) =>
|
|
6
|
+
restApi.registerSite( registrationNonce, redirectUri, from );
|
|
7
7
|
|
|
8
8
|
const CONNECT_USER = createRegistryControl(
|
|
9
9
|
( { resolveSelect } ) =>
|