Skip to content

Commit

Permalink
External Media: Move the external-media to the new @automattic/jetpac…
Browse files Browse the repository at this point in the history
…k-external-media package (#41078)

* External Media: Move OpenverseMedia to @automattic/jetpack-shared-extension-utils

* External Media: Move PexelsMedia to @automattic/jetpack-shared-extension-utils

* External Media: Move GooglePhotosMedia to @automattic/jetpack-shared-extension-utils

* changelog

* Fix textdomain

* Fix dependencies

* Fix the asset of the google-photos-picker-button

* Fix block assets

* Fix test of external-media

* Fix requestExternalAccess

* Fix GooglePhotosMediaIcon

* Introduce @automattic/jetpack-external-media

* Move all of external-media to @automattic/jetpack-shared-extension-utils

* changelog

* Fix dependencies

* Move all of external-media to @automattic/jetpack-external-media

* Fix lint

* Move store/wordpress-com to jetpack-ai-client

* Update projects/packages/external-media/.phan/baseline.php

* Fix types

* Fix apiFetch

* Fix the import of the jetpack-components under ai-client

* changelog

* Fix lint

* Fix block-nudge

* Fix build of @automattic/jetpack-external-media

* Fix tests

* Fix build of external-media

* Update pnpm-lock.yaml

* Fix translation

* Fix storybook

* changelog

* Load external-media assets

* Add external media module

* Add mirror repo

* Fix lint

* Move external-media module to module-extras.php

* Exclude babel.config.js on production

* Move number-control to jetpack-components

* Move libs/connection to jetpack-shared-extension-utils

* Update the comment of the external media module

* Move store/wordpress-com to jetpack-shared-extension-utils

* Use Connection_Initial_State::render_script to get rid of dependency

* Register JetpackExternalMediaData by external media package itself

* Update composer.lock

* Fix lint

* Export components and icons from subpath to resolve deps of the story block

* changelog

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/13151450361

Upstream-Ref: Automattic/jetpack@116f2cf
  • Loading branch information
arthur791004 authored and matticbot committed Feb 5, 2025
1 parent 6f74efd commit 8ac9541
Show file tree
Hide file tree
Showing 23 changed files with 83 additions and 80 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## 0.5.1-alpha - unreleased
## 0.6.0-alpha - unreleased

This is an alpha version! The changes listed here are not final.

### Added
- jetpack-components: Export the getRedirectUrl function with subpath

### Changed
- Code: Use function-style exit() and die() with a default status code of 0.
- Updated package dependencies.
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,6 @@
"automattic/jetpack-autoloader": true,
"automattic/jetpack-composer-plugin": true
},
"autoloader-suffix": "c4802e05bbcf59fd3b6350e8d3e5482c_starter_pluginⓥ0_5_1_alpha"
"autoloader-suffix": "c4802e05bbcf59fd3b6350e8d3e5482c_starter_pluginⓥ0_6_0_alpha"
}
}
2 changes: 1 addition & 1 deletion jetpack-starter-plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Plugin Name: Jetpack Starter Plugin
* Plugin URI: https://wordpress.org/plugins/jetpack-starter-plugin
* Description: plugin--description.
* Version: 0.5.1-alpha
* Version: 0.6.0-alpha
* Author: Automattic
* Author URI: https://jetpack.com/
* License: GPLv2 or later
Expand Down
2 changes: 1 addition & 1 deletion vendor/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@

require_once __DIR__ . '/composer/autoload_real.php';

return ComposerAutoloaderInitc4802e05bbcf59fd3b6350e8d3e5482c_starter_pluginⓥ0_5_1_alpha::getLoader();
return ComposerAutoloaderInitc4802e05bbcf59fd3b6350e8d3e5482c_starter_pluginⓥ0_6_0_alpha::getLoader();
2 changes: 1 addition & 1 deletion vendor/autoload_packages.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @package automattic/jetpack-autoloader
*/

namespace Automattic\Jetpack\Autoloader\jpc4802e05bbcf59fd3b6350e8d3e5482c_starter_pluginⓥ0_5_1_alpha\al5_0_1;
namespace Automattic\Jetpack\Autoloader\jpc4802e05bbcf59fd3b6350e8d3e5482c_starter_pluginⓥ0_6_0_alpha\al5_0_1;

// phpcs:ignore

Expand Down
10 changes: 5 additions & 5 deletions vendor/composer/autoload_real.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// autoload_real.php @generated by Composer

class ComposerAutoloaderInitc4802e05bbcf59fd3b6350e8d3e5482c_starter_pluginⓥ0_5_1_alpha
class ComposerAutoloaderInitc4802e05bbcf59fd3b6350e8d3e5482c_starter_pluginⓥ0_6_0_alpha
{
private static $loader;

Expand All @@ -24,17 +24,17 @@ public static function getLoader()

require __DIR__ . '/platform_check.php';

spl_autoload_register(array('ComposerAutoloaderInitc4802e05bbcf59fd3b6350e8d3e5482c_starter_pluginⓥ0_5_1_alpha', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInitc4802e05bbcf59fd3b6350e8d3e5482c_starter_pluginⓥ0_6_0_alpha', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInitc4802e05bbcf59fd3b6350e8d3e5482c_starter_pluginⓥ0_5_1_alpha', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInitc4802e05bbcf59fd3b6350e8d3e5482c_starter_pluginⓥ0_6_0_alpha', 'loadClassLoader'));

require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInitc4802e05bbcf59fd3b6350e8d3e5482c_starter_pluginⓥ0_5_1_alpha::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInitc4802e05bbcf59fd3b6350e8d3e5482c_starter_pluginⓥ0_6_0_alpha::getInitializer($loader));

$loader->setClassMapAuthoritative(true);
$loader->register(true);

$filesToLoad = \Composer\Autoload\ComposerStaticInitc4802e05bbcf59fd3b6350e8d3e5482c_starter_pluginⓥ0_5_1_alpha::$files;
$filesToLoad = \Composer\Autoload\ComposerStaticInitc4802e05bbcf59fd3b6350e8d3e5482c_starter_pluginⓥ0_6_0_alpha::$files;
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
Expand Down
8 changes: 4 additions & 4 deletions vendor/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Composer\Autoload;

class ComposerStaticInitc4802e05bbcf59fd3b6350e8d3e5482c_starter_pluginⓥ0_5_1_alpha
class ComposerStaticInitc4802e05bbcf59fd3b6350e8d3e5482c_starter_pluginⓥ0_6_0_alpha
{
public static $files = array (
'3773ef3f09c37da5478d578e32b03a4b' => __DIR__ . '/../..' . '/jetpack_vendor/automattic/jetpack-assets/actions.php',
Expand Down Expand Up @@ -236,9 +236,9 @@ class ComposerStaticInitc4802e05bbcf59fd3b6350e8d3e5482c_starter_pluginⓥ0_5_1_
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInitc4802e05bbcf59fd3b6350e8d3e5482c_starter_pluginⓥ0_5_1_alpha::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitc4802e05bbcf59fd3b6350e8d3e5482c_starter_pluginⓥ0_5_1_alpha::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitc4802e05bbcf59fd3b6350e8d3e5482c_starter_pluginⓥ0_5_1_alpha::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInitc4802e05bbcf59fd3b6350e8d3e5482c_starter_pluginⓥ0_6_0_alpha::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitc4802e05bbcf59fd3b6350e8d3e5482c_starter_pluginⓥ0_6_0_alpha::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitc4802e05bbcf59fd3b6350e8d3e5482c_starter_pluginⓥ0_6_0_alpha::$classMap;

}, null, ClassLoader::class);
}
Expand Down
52 changes: 26 additions & 26 deletions vendor/composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-a8c-mc-stats",
"reference": "10e43b2621cec21e1685cae79e50c4530b16097f"
"reference": "ead689adbdd8b38e81c1b7062d3950d94c0f9c0a"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -63,7 +63,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-admin-ui",
"reference": "6f4eb0554c77dc8389e4580bdca9a7f0930b263e"
"reference": "ca4978aa9e56bfab26dc7b1d25239d59fd88d544"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -125,7 +125,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-assets",
"reference": "317d287a717f4685849bc7add2d3ad6eec1a2d43"
"reference": "a992d948bdffb8692a90e5581e46c505dc9e67bf"
},
"require": {
"automattic/jetpack-constants": "^3.0.1",
Expand Down Expand Up @@ -197,7 +197,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-autoloader",
"reference": "fe7fdcae5b91ffbe96ade2f77d3541230dddca58"
"reference": "b853db919570f3ea01d5fb8eee3ccb01ffa05fc7"
},
"require": {
"composer-plugin-api": "^2.2",
Expand Down Expand Up @@ -268,7 +268,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-boost-core",
"reference": "0de9bb0bcc683b946b10daeadbfa3fceeb63618d"
"reference": "51eb8dd3d5f446fa0a8b6e982038e798b568905f"
},
"require": {
"automattic/jetpack-connection": "^6.4.0-alpha",
Expand Down Expand Up @@ -326,7 +326,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-boost-speed-score",
"reference": "36f5532e37146b6d3ef634f3d2ac503b479adc8b"
"reference": "bd72ba02f1a3c25852312f5c4b2a724d4a1832cd"
},
"require": {
"automattic/jetpack-boost-core": "^0.3.5",
Expand Down Expand Up @@ -393,7 +393,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-composer-plugin",
"reference": "954544561058afe054606623e42822496a408bc0"
"reference": "e10e5f17895b55253065d23c77e39abbcc4be091"
},
"require": {
"composer-plugin-api": "^2.2",
Expand Down Expand Up @@ -456,7 +456,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-config",
"reference": "df3dae9ddb375d4a6c87a783e013dea328737b52"
"reference": "8a97f9c96506eec4d28f7338356f52ab98d67ead"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -531,7 +531,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-connection",
"reference": "56807d17f861e49dbae1a338a9b1135b30c299c3"
"reference": "84204908ada2ef8255a6e4e0751279fda21ce9e3"
},
"require": {
"automattic/jetpack-a8c-mc-stats": "^3.0.0",
Expand Down Expand Up @@ -618,7 +618,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-constants",
"reference": "6d92ee5bb6259e6595900240b3c6e769d75fd495"
"reference": "0340c8acc640b26f74fea0ffb1395f68920c711f"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -675,7 +675,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-device-detection",
"reference": "4be9218f7fdc98fc04c01e52a7df539d12aaf825"
"reference": "aaccb8b43dee9b98242fbc900d74df474bb2181e"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -731,7 +731,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-explat",
"reference": "41ac0afa85ee60c1c8b726e52dbc9b1f10c75a93"
"reference": "4e430b54e257b7a385e43e6269b0455d238f07a1"
},
"require": {
"automattic/jetpack-connection": "^6.4.0-alpha",
Expand Down Expand Up @@ -809,7 +809,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-ip",
"reference": "407799a9a57a4fe494c2680340af355d52834473"
"reference": "f51246727149baf07d56daa09a6a8453df074a5a"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -870,7 +870,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-jitm",
"reference": "a0dc2b0247f47c41fcf975ffd7f303aa399fa53d"
"reference": "83632473e78853065eb3b172ed89111c0bc4b596"
},
"require": {
"automattic/jetpack-a8c-mc-stats": "^3.0.0",
Expand Down Expand Up @@ -948,7 +948,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-licensing",
"reference": "5b5a0a9ab49574afc1a3139d46e24c16eee69904"
"reference": "918fff7fe8c94416c57fb94c4a1c01dddf7f9ecf"
},
"require": {
"automattic/jetpack-connection": "^6.4.0-alpha",
Expand Down Expand Up @@ -1007,7 +1007,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-logo",
"reference": "878d4b4cbb3871de5db121a6f53e0c1255f470be"
"reference": "4cba165f9a28e221b8e0ec79aefb170c6019a849"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -1063,7 +1063,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-my-jetpack",
"reference": "af09d3cb875d367faec2502ecb04d224c195aba6"
"reference": "7754c8944a5a812dd4df71ee0bbf2a73f4395e52"
},
"require": {
"automattic/jetpack-admin-ui": "^0.5.2",
Expand Down Expand Up @@ -1162,7 +1162,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-password-checker",
"reference": "f15cf3342d29635058818c9404eeafa330a3b2fb"
"reference": "5a4dbccc60b57c270c17581b386e6ba08ffe9f98"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -1220,7 +1220,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-plans",
"reference": "11ed7350dfe8d412416c2bb63969d7a085b2c1bd"
"reference": "4fbed4ea63a4a6db51a5a0662eaccbecdf907bc0"
},
"require": {
"automattic/jetpack-connection": "^6.4.0-alpha",
Expand Down Expand Up @@ -1285,7 +1285,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-plugins-installer",
"reference": "1c8d9213c55cce96232223ba812f791c5c67a068"
"reference": "05657014497d5de88039012a073312bb919ec2f2"
},
"require": {
"automattic/jetpack-a8c-mc-stats": "^3.0.0",
Expand Down Expand Up @@ -1344,7 +1344,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-protect-models",
"reference": "72380e875935ba42a0f520bc5f9d793e94e7e5eb"
"reference": "06bf1f00ea5064e4fb238e75a828e1424a92c667"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -1411,7 +1411,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-protect-status",
"reference": "53f767771448b90b408572aec022d8489126e007"
"reference": "94bb5c81833f573fd94a42c0556118cbaffb8278"
},
"require": {
"automattic/jetpack-connection": "^6.4.0-alpha",
Expand Down Expand Up @@ -1483,7 +1483,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-redirect",
"reference": "76f2852e6e597a321744e21ef1c447b9cc3da465"
"reference": "ba870d9b470d2d10f68d302713850114775bbbfe"
},
"require": {
"automattic/jetpack-status": "^5.0.3",
Expand Down Expand Up @@ -1541,7 +1541,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-roles",
"reference": "8b74f96a2d4b75d41a9b74c1e12641b4f202ebd3"
"reference": "2965789ac482d0561d7ebed9aef86ef0c4f7c9aa"
},
"require": {
"php": ">=7.2"
Expand Down Expand Up @@ -1598,7 +1598,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-status",
"reference": "c8efe9e6e84cc4c7ae6454ce3cc7fe1fe3cee807"
"reference": "8e3b0498ada3a425778d3e332f3afe777209f6e8"
},
"require": {
"automattic/jetpack-constants": "^3.0.1",
Expand Down Expand Up @@ -1665,7 +1665,7 @@
"dist": {
"type": "path",
"url": "/tmp/jetpack-build/Automattic/jetpack-sync",
"reference": "92a6a2f3cbb0f531560fc1b292c9ca484c7da9e9"
"reference": "1efcd0384c49b7705e68b93c2c8c633041a24c96"
},
"require": {
"automattic/jetpack-connection": "^6.4.0-alpha",
Expand Down
Loading

0 comments on commit 8ac9541

Please sign in to comment.