diff --git a/plugins/baser-core/src/Command/ComposerCommand.php b/plugins/baser-core/src/Command/ComposerCommand.php
index 65d69f5de6..3bc1239840 100644
--- a/plugins/baser-core/src/Command/ComposerCommand.php
+++ b/plugins/baser-core/src/Command/ComposerCommand.php
@@ -49,6 +49,10 @@ protected function buildOptionParser(\Cake\Console\ConsoleOptionParser $parser):
'help' => __d('baser_core', '実行対象ディレクトリ'),
'default' => ''
]);
+ $parser->addOption('force', [
+ 'help' => __d('baser_core', '指定したバージョンを設定せず composer.json の内容で update する'),
+ 'default' => ''
+ ]);
return $parser;
}
@@ -72,8 +76,15 @@ public function execute(Arguments $args, ConsoleIo $io)
$io->error($message);
$this->abort();
}
+
BcComposer::clearCache();
- $result = BcComposer::require('baser-core', $args->getArgument('version'));
+
+ if($args->getOption('force')) {
+ $result = BcComposer::update();
+ } else {
+ $result = BcComposer::require('baser-core', $args->getArgument('version'));
+ }
+
if($result['code'] === 0) {
$io->out(__d('baser_core', 'Composer によるアップデートが完了しました。'));
} else {
diff --git a/plugins/baser-core/src/Controller/Admin/PluginsController.php b/plugins/baser-core/src/Controller/Admin/PluginsController.php
index 34d72c7154..1d9f3b4e8d 100644
--- a/plugins/baser-core/src/Controller/Admin/PluginsController.php
+++ b/plugins/baser-core/src/Controller/Admin/PluginsController.php
@@ -149,7 +149,7 @@ public function update(PluginsAdminServiceInterface $service, $name = '')
try {
$service->rollbackCore(
$request->getData('currentVersion'),
- $request->getData('php'),
+ $request->getData('php')
);
$this->BcMessage->setError(__d('baser_core', 'コアファイルを元に戻しました。'));
} catch (\Throwable $e) {
@@ -183,6 +183,7 @@ public function get_core_update(PluginsAdminServiceInterface $service)
$service->getCoreUpdate(
$request->getData('targetVersion')?? '',
$request->getData('php')?? 'php',
+ $request->getData('force'),
);
} catch (\Throwable $e) {
$this->BcMessage->setError($e->getMessage());
diff --git a/plugins/baser-core/src/Service/Admin/PluginsAdminService.php b/plugins/baser-core/src/Service/Admin/PluginsAdminService.php
index f07c1ecf0f..abc18ad24d 100644
--- a/plugins/baser-core/src/Service/Admin/PluginsAdminService.php
+++ b/plugins/baser-core/src/Service/Admin/PluginsAdminService.php
@@ -81,7 +81,16 @@ public function getViewVarsForUpdate(EntityInterface $entity): array
$isWritableVendor = is_writable(ROOT . DS . 'vendor');
$isWritableComposerJson = is_writable(ROOT . DS . 'composer.json');
$isWritableComposerLock = is_writable(ROOT . DS . 'composer.lock');
-
+ $requireUpdate = $this->isRequireUpdate(
+ $programVersion,
+ $dbVersion,
+ $availableVersion
+ );
+ if($entity->name === 'BaserCore') {
+ $isUpdatable = ($requireUpdate && $isWritableVendor && $isWritableComposerJson && $isWritableComposerLock);
+ } else {
+ $isUpdatable = $requireUpdate;
+ }
return [
'plugin' => $entity,
'scriptNum' => $scriptNum,
@@ -92,17 +101,13 @@ public function getViewVarsForUpdate(EntityInterface $entity): array
'programVerPoint' => $programVerPoint,
'availableVersion' => $availableVersion,
'log' => $this->getUpdateLog(),
- 'requireUpdate' => $this->isRequireUpdate(
- $programVersion,
- $dbVersion,
- $availableVersion
- ),
'coreDownloaded' => Cache::read('coreDownloaded', '_bc_update_'),
'php' => $this->whichPhp(),
+ 'isCore' => $entity->name === 'BaserCore',
'isWritableVendor' => $isWritableVendor,
'isWritableComposerJson' => $isWritableComposerJson,
'isWritableComposerLock' => $isWritableComposerLock,
- 'isWritablePackage' => ($isWritableVendor && $isWritableComposerJson && $isWritableComposerLock)
+ 'isUpdatable' => $isUpdatable
];
}
diff --git a/plugins/baser-core/src/Service/PluginsService.php b/plugins/baser-core/src/Service/PluginsService.php
index cd183642e3..0be17c002d 100644
--- a/plugins/baser-core/src/Service/PluginsService.php
+++ b/plugins/baser-core/src/Service/PluginsService.php
@@ -146,7 +146,7 @@ public function install($name, bool $permission = true, $connection = 'default')
{
$dbInit = false;
$config = $this->Plugins->getPluginConfig($name);
- if($config) {
+ if ($config) {
$dbInit = $config->db_init;
}
$options = [
@@ -188,7 +188,7 @@ public function update(string $name, string $connection = 'default'): ?bool
unlink(LOGS . 'update.log');
}
- $ids = [];
+ $ids = [];
if ($name === 'BaserCore') {
$pluginNames = array_merge(['BaserCore'], Configure::read('BcApp.corePlugins'));
$ids = $this->detachAll();
@@ -212,16 +212,16 @@ public function update(string $name, string $connection = 'default'): ?bool
$plugin = $pluginCollection->create($pluginName);
$migrate = false;
if (method_exists($plugin, 'migrate')) {
- try {
- $plugin->migrate($options);
- } catch (\Throwable $e) {
- if($ids) $this->attachAllFromIds($ids);
- BcUpdateLog::set(__d('baser_core', 'アップデート処理が途中で失敗しました。'));
- BcUpdateLog::set($e->getMessage());
- BcUtil::clearAllCache();
- BcUpdateLog::save();
- return false;
- }
+ try {
+ $plugin->migrate($options);
+ } catch (\Throwable $e) {
+ if ($ids) $this->attachAllFromIds($ids);
+ BcUpdateLog::set(__d('baser_core', 'アップデート処理が途中で失敗しました。'));
+ BcUpdateLog::set($e->getMessage());
+ BcUtil::clearAllCache();
+ BcUpdateLog::save();
+ return false;
+ }
$migrate = true;
}
$plugins[$pluginName] = [
@@ -231,7 +231,7 @@ public function update(string $name, string $connection = 'default'): ?bool
];
}
- if(!$plugins) {
+ if (!$plugins) {
BcUpdateLog::set(__d('baser_core', '登録済のプラグインが見つかりませんでした。先にインストールを実行してください。'));
BcUpdateLog::save();
return false;
@@ -250,7 +250,7 @@ public function update(string $name, string $connection = 'default'): ?bool
$plugin['instance']->migrations->rollback($options);
}
}
- if($ids) $this->attachAllFromIds($ids);
+ if ($ids) $this->attachAllFromIds($ids);
BcUpdateLog::set(__d('baser_core', 'アップデート処理が途中で失敗しました。'));
BcUpdateLog::set($e->getMessage());
BcUtil::clearAllCache();
@@ -271,7 +271,7 @@ public function update(string $name, string $connection = 'default'): ?bool
$plugin['instance']->migrations->rollback($options);
}
}
- if($ids) $this->attachAllFromIds($ids);
+ if ($ids) $this->attachAllFromIds($ids);
BcUpdateLog::set(__d('baser_core', 'アップデート処理が途中で失敗しました。'));
BcUpdateLog::set($e->getMessage());
BcUtil::clearAllCache();
@@ -283,7 +283,7 @@ public function update(string $name, string $connection = 'default'): ?bool
BcUtil::clearAllCache();
BcUpdateLog::save();
- if($ids) $this->attachAllFromIds($ids);
+ if ($ids) $this->attachAllFromIds($ids);
return true;
}
@@ -317,7 +317,7 @@ public function rollbackCore(string $currentVersion, string $php): void
*/
public function updateCoreFiles()
{
- if(!is_dir(TMP . 'update' . DS . 'vendor')) {
+ if (!is_dir(TMP . 'update' . DS . 'vendor')) {
throw new BcException(__d('baser_core', 'ダウンロードした最新版が見つかりませんでした。'));
}
@@ -329,7 +329,7 @@ public function updateCoreFiles()
(new Folder())->delete(ROOT . DS . 'vendor');
// 最新版に更新
- if(!(new Folder(TMP . 'update' . DS . 'vendor'))->copy(ROOT . DS . 'vendor')) {
+ if (!(new Folder(TMP . 'update' . DS . 'vendor'))->copy(ROOT . DS . 'vendor')) {
$zip->extract(TMP . 'update' . DS . 'vendor.zip', ROOT . DS . 'vendor');
throw new BcException(__d('baser_core', '最新版のファイルをコピーできませんでした。'));
}
@@ -718,7 +718,7 @@ public function add(array $postData)
*/
public function getAvailableCoreVersionInfo()
{
- if(!BcSiteConfig::get('use_update_notice')) return [];
+ if (!BcSiteConfig::get('use_update_notice')) return [];
$coreReleaseInfo = Cache::read('coreReleaseInfo', '_bc_update_');
if (!$coreReleaseInfo) {
@@ -753,11 +753,11 @@ public function getAvailableCoreVersionInfo()
$currentVerPoint = BcUtil::verpoint($currentVersion);
$latestVerPoint = BcUtil::verpoint($latest);
// 現在のパッケージが開発版の場合は無視
- if($currentVerPoint === false) break;
+ if ($currentVerPoint === false) break;
// アップデートバージョンが開発版の場合は無視
- if($latestVerPoint === false) continue;
+ if ($latestVerPoint === false) continue;
// アップデートバージョンが現在のパッケージのバージョンより小さい場合は無視
- if($currentVerPoint > $latestVerPoint) break;
+ if ($currentVerPoint > $latestVerPoint) break;
if ($currentVersion === $version) break;
$versions[] = $version;
@@ -786,7 +786,7 @@ public function getAvailableCoreVersionInfo()
* @noTodo
* @unitTest
*/
- public function getCoreUpdate(string $targetVersion, string $php)
+ public function getCoreUpdate(string $targetVersion, string $php, bool $force = false)
{
if (function_exists('ini_set')) {
ini_set('max_execution_time', 0);
@@ -796,10 +796,10 @@ public function getCoreUpdate(string $targetVersion, string $php)
unlink(LOGS . 'update.log');
}
- if(!is_dir(TMP . 'update')) {
+ if (!is_dir(TMP . 'update')) {
mkdir(TMP . 'update', 0777);
}
- if(!is_dir(TMP . 'update' . DS . 'vendor')) {
+ if (!is_dir(TMP . 'update' . DS . 'vendor')) {
$folder = new Folder(ROOT . DS . 'vendor');
$folder->copy(TMP . 'update' . DS . 'vendor');
}
@@ -808,6 +808,10 @@ public function getCoreUpdate(string $targetVersion, string $php)
// Composer 実行
$command = $php . ' ' . ROOT . DS . 'bin' . DS . 'cake.php composer ' . $targetVersion . ' --php ' . $php . ' --dir ' . TMP . 'update';
+ if ($force) {
+ $command .= ' --force true';
+ }
+
exec($command, $out, $code);
if ($code !== 0) throw new BcException(__d('baser_core', '最新版のダウンロードに失敗しました。ログを確認してください。'));
diff --git a/plugins/baser-core/src/Utility/BcComposer.php b/plugins/baser-core/src/Utility/BcComposer.php
index 4dc6a4f5e7..97af1351ce 100644
--- a/plugins/baser-core/src/Utility/BcComposer.php
+++ b/plugins/baser-core/src/Utility/BcComposer.php
@@ -155,6 +155,17 @@ public static function require(string $package, string $version)
return self::execCommand("require baserproject/{$package}:{$version} --with-all-dependencies --ignore-platform-req=ext-xdebug");
}
+ /**
+ * composer update 実行
+ * @return array
+ * @checked
+ * @noTodo
+ */
+ public static function update()
+ {
+ return self::execCommand('update --with-all-dependencies --ignore-platform-req=ext-xdebug');
+ }
+
/**
* composer install 実行
*
@@ -164,7 +175,7 @@ public static function require(string $package, string $version)
*/
public static function install()
{
- return self::execCommand('install');
+ return self::execCommand('install --with-all-dependencies --ignore-platform-req=ext-xdebug');
}
/**
diff --git a/plugins/bc-admin-third/src/js/admin/plugins/update.js b/plugins/bc-admin-third/src/js/admin/plugins/update.js
index 3460dfb1cc..7fbdef5392 100644
--- a/plugins/bc-admin-third/src/js/admin/plugins/update.js
+++ b/plugins/bc-admin-third/src/js/admin/plugins/update.js
@@ -21,13 +21,19 @@ const updateForm = {
*/
isWritablePackage: false,
+ /**
+ * アップデートできるかどうか
+ */
+ isUpdatable: false,
+
/**
* 起動処理
*/
mounted() {
const script = $("#AdminPluginsUpdateScript");
this.plugin = script.attr('data-plugin');
- this.isWritablePackage = script.attr('data-isWritablePackage');
+ this.isUpdatable = script.attr('data-isUpdatable');
+ if(this.isUpdatable === undefined) this.isUpdatable = false;
this.registerEvents();
this.toggleUpdate();
},
@@ -49,11 +55,11 @@ const updateForm = {
*/
update() {
if (confirm(bcI18n.confirmMessage1)) {
- if(updateForm.plugin !== 'BaserCore') {
+ if (updateForm.plugin !== 'BaserCore') {
$.bcUtil.showLoader();
return true;
}
- $.bcToken.check(function() {
+ $.bcToken.check(function () {
$.bcUtil.showLoader();
$.bcUtil.hideMessage();
axios.post($.bcUtil.apiAdminBaseUrl + 'baser-core/plugins/update_core_files.json', {}, {
@@ -61,23 +67,23 @@ const updateForm = {
'X-CSRF-Token': $.bcToken.key
}
})
- .then(response => {
- let message = response.data.message + bcI18n.updateMessage1;
- $.bcUtil.showNoticeMessage(message);
- $(window).scrollTop(0);
- $.bcUtil.showLoader();
- // フォーム送信
- $("#PluginUpdateForm").submit();
- })
- .catch(error => {
- if (error.response.status === 500) {
- $.bcUtil.showAlertMessage(error.response.data.message);
- } else {
- $.bcUtil.showAlertMessage('予期せぬエラーが発生しました。システム管理者に連絡してください。');
- }
- $.bcUtil.hideLoader();
- $(window).scrollTop(0);
- });
+ .then(response => {
+ let message = response.data.message + bcI18n.updateMessage1;
+ $.bcUtil.showNoticeMessage(message);
+ $(window).scrollTop(0);
+ $.bcUtil.showLoader();
+ // フォーム送信
+ $("#PluginUpdateForm").submit();
+ })
+ .catch(error => {
+ if (error.response.status === 500) {
+ $.bcUtil.showAlertMessage(error.response.data.message);
+ } else {
+ $.bcUtil.showAlertMessage('予期せぬエラーが発生しました。システム管理者に連絡してください。');
+ }
+ $.bcUtil.hideLoader();
+ $(window).scrollTop(0);
+ });
}, {hideLoader: false});
}
return false;
@@ -90,19 +96,31 @@ const updateForm = {
const $btnUpdate = $("#BtnUpdate");
const $btnDownload = $("#BtnDownload");
const $phpNotice = $(".php-notice");
- if(updateForm.plugin !== 'BaserCore') return;
- if($("#php").val()) {
- if($btnUpdate.length) $btnUpdate.removeAttr('disabled');
- if($btnDownload.length) $btnDownload.removeAttr('disabled');
- $phpNotice.hide();
+ const $inputPhp = $("#php");
+
+ if (updateForm.plugin === 'BaserCore') {
+ if ($inputPhp.val() !== ''){
+ if(updateForm.isUpdatable) {
+ $btnUpdate.removeAttr('disabled');
+ }
+ $btnDownload.removeAttr('disabled');
+ } else {
+ $btnUpdate.attr('disabled', 'disabled');
+ $btnDownload.attr('disabled', 'disabled');
+ }
+ if ($inputPhp.val()) {
+ $phpNotice.hide();
+ } else {
+ $phpNotice.show();
+ }
} else {
- if($btnUpdate.length) $btnUpdate.attr('disabled', 'disabled');
- if($btnDownload.length) $btnDownload.attr('disabled', 'disabled');
- $phpNotice.show();
- }
- if(!updateForm.isWritablePackage) {
- if($btnUpdate.length) $btnUpdate.attr('disabled', 'disabled');
- if($btnDownload.length) $btnDownload.attr('disabled', 'disabled');
+ if (updateForm.isUpdatable) {
+ $btnUpdate.removeAttr('disabled');
+ $btnDownload.removeAttr('disabled');
+ } else {
+ $btnUpdate.attr('disabled', 'disabled');
+ $btnDownload.attr('disabled', 'disabled');
+ }
}
}
diff --git a/plugins/bc-admin-third/templates/Admin/Plugins/update.php b/plugins/bc-admin-third/templates/Admin/Plugins/update.php
index db0a538658..63a76aca38 100755
--- a/plugins/bc-admin-third/templates/Admin/Plugins/update.php
+++ b/plugins/bc-admin-third/templates/Admin/Plugins/update.php
@@ -16,20 +16,11 @@
*
* @var BcAdminAppView $this
* @var \Cake\Datasource\EntityInterface $plugin
- * @var int $scriptNum
- * @var array $scriptMessages
- * @var string $dbVersion
- * @var string $programVersion
- * @var string $availableVersion
- * @var int $dbVerPoint
- * @var int $programVerPoint
- * @var string $log
- * @var bool $requireUpdate
- * @var string $php
- * @var bool $isWritablePackage
+ * @var bool $isCore
+ * @var bool $isUpdatable
* @var bool $coreDownloaded
*/
-$this->BcAdmin->setTitle(sprintf(__d('baser_core', '%s|アップデート'), ($plugin->name === 'BaserCore')? __d('baser_core', 'baserCMSコア') : $plugin->title . __d('baser_core', 'プラグイン')));
+$this->BcAdmin->setTitle(__d('baser_core', 'baserCMSコア|アップデート'));
$this->BcBaser->i18nScript([
'confirmMessage1' => __d('baser_core', 'アップデートを実行します。よろしいですか?'),
'updateMessage1' => __d('baser_core', '続いてアップデートを実行します。しばらくお待ちください。'),
@@ -38,193 +29,27 @@
'id' => 'AdminPluginsUpdateScript',
'defer' => true,
'data-plugin' => $plugin->name,
- 'data-isWritablePackage' => $isWritablePackage
+ 'data-isUpdatable' => $isUpdatable
]);
-if ($plugin->name !== 'BaserCore' || $coreDownloaded) {
- $formAction = 'update';
- $h2 = __d('baser_core', 'アップデート実行');
- $description = __d('baser_core', '「アップデート実行」をクリックしてプラグインのアップデートを完了させてください。');
-} else {
- $formAction = 'get_core_update';
- $h2 = __d('baser_core', '最新版をダウンロード');
- $description = __d('baser_core', 'アップデートを実行する前に、最新版をダウンロードしてください。');
-}
?>
-
-
-
-
-
-
- - {1}', $plugin->title, $availableVersion) ?>
-
- - {1}', $plugin->title, $programVersion) ?>
- - {1}', $plugin->title, $dbVersion) ?>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- $scriptMessage): ?>
-
- |
- |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- name === 'BaserCore'): ?>
- BcBaser->getLink(__d('baser_core', 'データベースメンテナンス'), ['controller' => 'Utilities', 'action' => 'maintenance'])
- ) ?>
-
-
-
-
-
- ※
-
-
-
-
-
-
-
-
-
-
- 公式サイトの リリースノート を必ず確認してください。'
- ) ?>
-
-
-
-
+ BcBaser->element('Plugins/update_now_status') ?>
-
-
-
-
-
-
- name === 'BaserCore'): ?>
-
- BcBaser->getLink('baserCMSの制作・開発パートナー', 'https://basercms.net/partners/', ['target' => '_blank'])
- ) ?>
-
-
- BcAdminForm->create($plugin, [
- 'url' => ['action' => $formAction, $this->getRequest()->getParam('pass.0')],
- 'id' => 'PluginUpdateForm'
- ]) ?>
- BcAdminForm->control('update', ['type' => 'hidden', 'value' => true]) ?>
- BcAdminForm->control('currentVersion', ['type' => 'hidden', 'value' => $programVersion]) ?>
- BcAdminForm->control('targetVersion', ['type' => 'hidden', 'value' => $availableVersion]) ?>
-
-
-
- BcAdminForm->control('php', [
- 'type' => 'text',
- 'value' => $php,
- 'size' => 40
- ]) ?>
-
-
-
-
-
-
- BcHtml->link(__d('baser_core', '一覧に戻る'), [
- 'plugin' => 'BaserCore',
- 'controller' => 'Plugins',
- 'action' => 'index',
- ], [
- 'class' => 'bca-btn bca-actions__item',
- 'data-bca-btn-type' => 'back-to-list'
- ]) ?>
-
-
- name !== 'BaserCore' || $coreDownloaded): ?>
- BcAdminForm->submit(__d('baser_core', 'アップデート実行'), [
- 'class' => 'bca-btn bca-actions__item',
- 'data-bca-btn-size' => 'lg',
- 'data-bca-btn-width' => 'lg',
- 'data-bca-btn-type' => 'save',
- 'id' => 'BtnUpdate',
- 'div' => false,
- ]) ?>
-
- BcAdminForm->submit(__d('baser_core', '最新版をダウンロード'), [
- 'class' => 'bca-btn bca-actions__item',
- 'data-bca-btn-size' => 'lg',
- 'data-bca-btn-width' => 'lg',
- 'data-bca-btn-type' => 'save',
- 'id' => 'BtnDownload',
- 'div' => false,
- ]) ?>
-
-
-
- BcAdminForm->end() ?>
+ BcBaser->element('Plugins/update_alert'); ?>
+
+
+
+ BcBaser->element('Plugins/update_core'); ?>
-
- name === 'BaserCore' && $dbVersion !== $programVersion): ?>
-
プログラムのバージョンに合わせて データベースの site_configs テーブルの version フィールドを更新してください。') ?>
-
-
-
-
-
-
- BcHtml->link(__d('baser_core', '一覧に戻る'), [
- 'plugin' => 'BaserCore',
- 'controller' => 'Plugins',
- 'action' => 'index',
- ], [
- 'class' => 'bca-btn bca-actions__item',
- 'data-bca-btn-type' => 'back-to-list'
- ]) ?>
-
-
+ BcBaser->element('Plugins/update_download_core'); ?>
-
+
+ BcBaser->element('Plugins/update_plugin'); ?>
+
-
-
-
-
- BcAdminForm->control('log', [
- 'type' => 'textarea',
- 'value' => $log,
- 'style' => 'width:99%;height:200px;font-size:12px',
- 'readonly' => 'readonly'
- ]); ?>
-
+ BcBaser->element('Plugins/update_log'); ?>
diff --git a/plugins/bc-admin-third/templates/Admin/element/Plugins/update_alert.php b/plugins/bc-admin-third/templates/Admin/element/Plugins/update_alert.php
new file mode 100644
index 0000000000..8a7baee6ad
--- /dev/null
+++ b/plugins/bc-admin-third/templates/Admin/element/Plugins/update_alert.php
@@ -0,0 +1,49 @@
+
+ * Copyright (c) NPO baser foundation
+ *
+ * @copyright Copyright (c) NPO baser foundation
+ * @link https://basercms.net baserCMS Project
+ * @since 5.0.0
+ * @license https://basercms.net/license/index.html MIT License
+ */
+
+/**
+ * プラグインアップデートのアラート
+ *
+ * @var \BaserCore\View\BcAdminAppView $this
+ * @var bool $isUpdatable
+ * @var bool $isCore
+ * @var bool $coreDownloaded
+ */
+?>
+
+
+
+
+
+
+
+
+
+
+
+
+ 公式サイトの リリースノート を必ず確認してください。'
+ ) ?>
+
+
+
+
+
diff --git a/plugins/bc-admin-third/templates/Admin/element/Plugins/update_core.php b/plugins/bc-admin-third/templates/Admin/element/Plugins/update_core.php
new file mode 100644
index 0000000000..fccd413ba6
--- /dev/null
+++ b/plugins/bc-admin-third/templates/Admin/element/Plugins/update_core.php
@@ -0,0 +1,82 @@
+
+ * Copyright (c) NPO baser foundation
+ *
+ * @copyright Copyright (c) NPO baser foundation
+ * @link https://basercms.net baserCMS Project
+ * @since 5.0.0
+ * @license https://basercms.net/license/index.html MIT License
+ */
+
+use BaserCore\View\BcAdminAppView;
+
+/**
+ * プラグインアップデート
+ *
+ * @var BcAdminAppView $this
+ * @var \Cake\Datasource\EntityInterface $plugin
+ * @var string $dbVersion
+ * @var string $programVersion
+ * @var string $availableVersion
+ * @var string $php
+ * @var bool $isUpdatable
+ */
+?>
+
+
+
+
+
+
+
+
+
+
アップデートの前にプログラムのバージョンに合わせて データベースの site_configs テーブルの version フィールドを更新してください。') ?>
+
+
+
+ BcBaser->getLink('baserCMSの制作・開発パートナー', 'https://basercms.net/partners/', ['target' => '_blank'])
+ ) ?>
+
+
+
+
+
+
+ BcAdminForm->create($plugin, [
+ 'id' => 'PluginUpdateForm'
+ ]) ?>
+ BcAdminForm->control('update', ['type' => 'hidden', 'value' => true]) ?>
+ BcAdminForm->control('currentVersion', ['type' => 'hidden', 'value' => $programVersion]) ?>
+ BcAdminForm->control('targetVersion', ['type' => 'hidden', 'value' => $availableVersion]) ?>
+
+
+
+ BcAdminForm->control('php', ['type' => 'text',
+ 'value' => $php,
+ 'size' => 40]) ?>
+
+
+
+
+
+
+ BcHtml->link(__d('baser_core', '一覧に戻る'), ['plugin' => 'BaserCore',
+ 'controller' => 'Plugins',
+ 'action' => 'index',], ['class' => 'bca-btn bca-actions__item',
+ 'data-bca-btn-type' => 'back-to-list']) ?>
+
+
+ BcAdminForm->submit(__d('baser_core', 'アップデート実行'), ['class' => 'bca-btn bca-actions__item',
+ 'data-bca-btn-size' => 'lg',
+ 'data-bca-btn-width' => 'lg',
+ 'data-bca-btn-type' => 'save',
+ 'id' => 'BtnUpdate',
+ 'div' => false,]) ?>
+
+
+ BcAdminForm->end() ?>
+
diff --git a/plugins/bc-admin-third/templates/Admin/element/Plugins/update_download_core.php b/plugins/bc-admin-third/templates/Admin/element/Plugins/update_download_core.php
new file mode 100644
index 0000000000..fa94697af7
--- /dev/null
+++ b/plugins/bc-admin-third/templates/Admin/element/Plugins/update_download_core.php
@@ -0,0 +1,88 @@
+
+ * Copyright (c) NPO baser foundation
+ *
+ * @copyright Copyright (c) NPO baser foundation
+ * @link https://basercms.net baserCMS Project
+ * @since 5.0.0
+ * @license https://basercms.net/license/index.html MIT License
+ */
+
+use BaserCore\View\BcAdminAppView;
+
+/**
+ * プラグインアップデート
+ *
+ * @var BcAdminAppView $this
+ * @var \Cake\Datasource\EntityInterface $plugin
+ * @var string $programVersion
+ * @var string $availableVersion
+ * @var bool $isUpdatable
+ * @var string $php
+ */
+$this->BcAdmin->setTitle(__d('baser_core', 'baserCMSコア|アップデート'));
+?>
+
+
+
+
+
+
+
+ $programVersion): ?>
+
+
+
+ BcAdminForm->create($plugin, [
+ 'url' => ['action' => 'get_core_update'],
+ 'id' => 'PluginUpdateForm'
+ ]) ?>
+ BcAdminForm->control('update', ['type' => 'hidden', 'value' => true]) ?>
+ BcAdminForm->control('currentVersion', ['type' => 'hidden', 'value' => $programVersion]) ?>
+ BcAdminForm->control('targetVersion', ['type' => 'hidden', 'value' => $availableVersion]) ?>
+
+
+
+ BcAdminForm->control('php', [
+ 'type' => 'text',
+ 'value' => $php,
+ 'size' => 40
+ ]) ?>
+
+
+
+
+
+
+ BcAdminForm->control('force', [
+ 'type' => 'checkbox',
+ 'label' => __d('baser_core', '利用可能なバージョンに関わらず、composer.json の内容でダウンロードする')
+ ]) ?>
+
+
+
+
+
+ BcHtml->link(__d('baser_core', '一覧に戻る'), [
+ 'plugin' => 'BaserCore',
+ 'controller' => 'Plugins',
+ 'action' => 'index',
+ ], [
+ 'class' => 'bca-btn bca-actions__item',
+ 'data-bca-btn-type' => 'back-to-list'
+ ]) ?>
+
+
+ BcAdminForm->submit(__d('baser_core', '最新版をダウンロード'), [
+ 'class' => 'bca-btn bca-actions__item',
+ 'data-bca-btn-size' => 'lg',
+ 'data-bca-btn-width' => 'lg',
+ 'data-bca-btn-type' => 'save',
+ 'id' => 'BtnDownload',
+ 'div' => false,
+ ]) ?>
+
+
+ BcAdminForm->end() ?>
+
diff --git a/plugins/bc-admin-third/templates/Admin/element/Plugins/update_log.php b/plugins/bc-admin-third/templates/Admin/element/Plugins/update_log.php
new file mode 100644
index 0000000000..dbcbee48dc
--- /dev/null
+++ b/plugins/bc-admin-third/templates/Admin/element/Plugins/update_log.php
@@ -0,0 +1,31 @@
+
+ * Copyright (c) NPO baser foundation
+ *
+ * @copyright Copyright (c) NPO baser foundation
+ * @link https://basercms.net baserCMS Project
+ * @since 5.0.0
+ * @license https://basercms.net/license/index.html MIT License
+ */
+
+/**
+ * プラグインアップデートのログ
+ *
+ * @var \BaserCore\View\BcAdminAppView $this
+ * @var string $log
+ */
+?>
+
+
+
+
+
+
+ BcAdminForm->control('log', [
+ 'type' => 'textarea',
+ 'value' => $log,
+ 'style' => 'width:99%;height:200px;font-size:12px',
+ 'readonly' => 'readonly'
+ ]); ?>
+
diff --git a/plugins/bc-admin-third/templates/Admin/element/Plugins/update_now_status.php b/plugins/bc-admin-third/templates/Admin/element/Plugins/update_now_status.php
new file mode 100644
index 0000000000..2610e657a1
--- /dev/null
+++ b/plugins/bc-admin-third/templates/Admin/element/Plugins/update_now_status.php
@@ -0,0 +1,72 @@
+
+ * Copyright (c) NPO baser foundation
+ *
+ * @copyright Copyright (c) NPO baser foundation
+ * @link https://basercms.net baserCMS Project
+ * @since 5.0.0
+ * @license https://basercms.net/license/index.html MIT License
+ */
+
+/**
+ * 現在のバージョン状況
+ *
+ * @var \BaserCore\View\BcAdminAppView $this
+ * @var \Cake\Datasource\EntityInterface $plugin
+ * @var int $scriptNum
+ * @var array $scriptMessages
+ * @var string $dbVersion
+ * @var string $programVersion
+ * @var string $availableVersion
+ * @var int $dbVerPoint
+ * @var int $programVerPoint
+ */
+$isNotSupported = ($programVerPoint === false || $dbVerPoint === false);
+$dbMessage = '';
+if ($isNotSupported) {
+ $dbMessage = __d('baser_core', '開発版の場合はアップデートサポート外です。');
+} elseif ($programVersion === $dbVersion) {
+ if (!$availableVersion) {
+ $dbMessage = __d('baser_core', 'データベースのバージョンは最新です。');
+ }
+} else {
+ $dbMessage = __d('baser_core', 'データベースのバージョンが古い状態です。');
+}
+?>
+
+
+
+
+
+
+
+
+
+ - {1}', $plugin->title, $availableVersion) ?>
+
+ - {1}', $plugin->title, $programVersion) ?>
+ - {1}', $plugin->title, $dbVersion) ?>
+
+
+
+
+
+
+
+
+
+
+
+
+ $scriptMessage): ?>
+
+ |
+ |
+
+
+
+
+
+
+
diff --git a/plugins/bc-admin-third/templates/Admin/element/Plugins/update_plugin.php b/plugins/bc-admin-third/templates/Admin/element/Plugins/update_plugin.php
new file mode 100644
index 0000000000..a4a16d77f4
--- /dev/null
+++ b/plugins/bc-admin-third/templates/Admin/element/Plugins/update_plugin.php
@@ -0,0 +1,66 @@
+
+ * Copyright (c) NPO baser foundation
+ *
+ * @copyright Copyright (c) NPO baser foundation
+ * @link https://basercms.net baserCMS Project
+ * @since 5.0.0
+ * @license https://basercms.net/license/index.html MIT License
+ */
+
+/**
+ * プラグインアップデート
+ *
+ * @var \BaserCore\View\BcAdminAppView $this
+ * @var \Cake\Datasource\EntityInterface $plugin
+ * @var string $programVersion
+ * @var string $availableVersion
+ * @var bool $isUpdatable
+ */
+$this->BcAdmin->setTitle(__d('baser_core', '{0}|アップデート', $plugin->title . __d('baser_core', 'プラグイン')));
+?>
+
+
+
+
+
+
+
+
+
+
+
+
+ BcAdminForm->create($plugin, [
+ 'id' => 'PluginUpdateForm'
+ ]) ?>
+ BcAdminForm->control('update', ['type' => 'hidden', 'value' => true]) ?>
+ BcAdminForm->control('currentVersion', ['type' => 'hidden', 'value' => $programVersion]) ?>
+ BcAdminForm->control('targetVersion', ['type' => 'hidden', 'value' => $availableVersion]) ?>
+
+
+
+ BcHtml->link(__d('baser_core', '一覧に戻る'), [
+ 'plugin' => 'BaserCore',
+ 'controller' => 'Plugins',
+ 'action' => 'index',
+ ], [
+ 'class' => 'bca-btn bca-actions__item',
+ 'data-bca-btn-type' => 'back-to-list'
+ ]) ?>
+
+
+ BcAdminForm->submit(__d('baser_core', 'アップデート実行'), [
+ 'class' => 'bca-btn bca-actions__item',
+ 'data-bca-btn-size' => 'lg',
+ 'data-bca-btn-width' => 'lg',
+ 'data-bca-btn-type' => 'save',
+ 'id' => 'BtnUpdate',
+ 'div' => false
+ ]) ?>
+
+
+ BcAdminForm->end() ?>
+
+
diff --git a/plugins/bc-admin-third/webroot/js/admin/plugins/update.bundle.js b/plugins/bc-admin-third/webroot/js/admin/plugins/update.bundle.js
index 0d04a7ac74..c173e0aa30 100644
--- a/plugins/bc-admin-third/webroot/js/admin/plugins/update.bundle.js
+++ b/plugins/bc-admin-third/webroot/js/admin/plugins/update.bundle.js
@@ -1,4 +1,4 @@
-(()=>{"use strict";var e,t={1096:(e,t,r)=>{var i=r(8071),a={plugin:null,isWritablePackage:!1,mounted:function(){var e=$("#AdminPluginsUpdateScript");this.plugin=e.attr("data-plugin"),this.isWritablePackage=e.attr("data-isWritablePackage"),this.registerEvents(),this.toggleUpdate()},registerEvents:function(){$("#BtnUpdate").on("click",this.update),$("#BtnDownload").on("click",$.bcUtil.showLoader),$("#php").on("change",this.toggleUpdate)},update:function(){if(confirm(bcI18n.confirmMessage1)){if("BaserCore"!==a.plugin)return $.bcUtil.showLoader(),!0;$.bcToken.check((function(){$.bcUtil.showLoader(),$.bcUtil.hideMessage(),i.Z.post($.bcUtil.apiAdminBaseUrl+"baser-core/plugins/update_core_files.json",{},{headers:{"X-CSRF-Token":$.bcToken.key}}).then((function(e){var t=e.data.message+bcI18n.updateMessage1;$.bcUtil.showNoticeMessage(t),$(window).scrollTop(0),$.bcUtil.showLoader(),$("#PluginUpdateForm").submit()})).catch((function(e){500===e.response.status?$.bcUtil.showAlertMessage(e.response.data.message):$.bcUtil.showAlertMessage("予期せぬエラーが発生しました。システム管理者に連絡してください。"),$.bcUtil.hideLoader(),$(window).scrollTop(0)}))}),{hideLoader:!1})}return!1},toggleUpdate:function(){var e=$("#BtnUpdate"),t=$("#BtnDownload"),r=$(".php-notice");"BaserCore"===a.plugin&&($("#php").val()?(e.length&&e.removeAttr("disabled"),t.length&&t.removeAttr("disabled"),r.hide()):(e.length&&e.attr("disabled","disabled"),t.length&&t.attr("disabled","disabled"),r.show()),a.isWritablePackage||(e.length&&e.attr("disabled","disabled"),t.length&&t.attr("disabled","disabled")))}};
+(()=>{"use strict";var e,t={1096:(e,t,a)=>{var i=a(8071),r={plugin:null,isWritablePackage:!1,isUpdatable:!1,mounted:function(){var e=$("#AdminPluginsUpdateScript");this.plugin=e.attr("data-plugin"),this.isUpdatable=e.attr("data-isUpdatable"),void 0===this.isUpdatable&&(this.isUpdatable=!1),this.registerEvents(),this.toggleUpdate()},registerEvents:function(){$("#BtnUpdate").on("click",this.update),$("#BtnDownload").on("click",$.bcUtil.showLoader),$("#php").on("change",this.toggleUpdate)},update:function(){if(confirm(bcI18n.confirmMessage1)){if("BaserCore"!==r.plugin)return $.bcUtil.showLoader(),!0;$.bcToken.check((function(){$.bcUtil.showLoader(),$.bcUtil.hideMessage(),i.Z.post($.bcUtil.apiAdminBaseUrl+"baser-core/plugins/update_core_files.json",{},{headers:{"X-CSRF-Token":$.bcToken.key}}).then((function(e){var t=e.data.message+bcI18n.updateMessage1;$.bcUtil.showNoticeMessage(t),$(window).scrollTop(0),$.bcUtil.showLoader(),$("#PluginUpdateForm").submit()})).catch((function(e){500===e.response.status?$.bcUtil.showAlertMessage(e.response.data.message):$.bcUtil.showAlertMessage("予期せぬエラーが発生しました。システム管理者に連絡してください。"),$.bcUtil.hideLoader(),$(window).scrollTop(0)}))}),{hideLoader:!1})}return!1},toggleUpdate:function(){var e=$("#BtnUpdate"),t=$("#BtnDownload"),a=$(".php-notice"),i=$("#php");"BaserCore"===r.plugin?(""!==i.val()?(r.isUpdatable&&e.removeAttr("disabled"),t.removeAttr("disabled")):(e.attr("disabled","disabled"),t.attr("disabled","disabled")),i.val()?a.hide():a.show()):r.isUpdatable?(e.removeAttr("disabled"),t.removeAttr("disabled")):(e.attr("disabled","disabled"),t.attr("disabled","disabled"))}};
/**
* baserCMS : Based Website Development Project
* Copyright (c) NPO baser foundation
@@ -7,5 +7,5 @@
* @link https://basercms.net baserCMS Project
* @since 5.0.0
* @license https://basercms.net/license/index.html MIT License
- */a.mounted()}},r={};function i(e){var a=r[e];if(void 0!==a)return a.exports;var o=r[e]={exports:{}};return t[e].call(o.exports,o,o.exports,i),o.exports}i.m=t,e=[],i.O=(t,r,a,o)=>{if(!r){var n=1/0;for(c=0;c=o)&&Object.keys(i.O).every((e=>i.O[e](r[l])))?r.splice(l--,1):(s=!1,o0&&e[c-1][2]>o;c--)e[c]=e[c-1];e[c]=[r,a,o]},i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.j=1106,(()=>{var e={1106:0};i.O.j=t=>0===e[t];var t=(t,r)=>{var a,o,[n,s,l]=r,d=0;if(n.some((t=>0!==e[t]))){for(a in s)i.o(s,a)&&(i.m[a]=s[a]);if(l)var c=l(i)}for(t&&t(r);di(1096)));a=i.O(a)})();
+ */r.mounted()}},a={};function i(e){var r=a[e];if(void 0!==r)return r.exports;var o=a[e]={exports:{}};return t[e].call(o.exports,o,o.exports,i),o.exports}i.m=t,e=[],i.O=(t,a,r,o)=>{if(!a){var n=1/0;for(c=0;c=o)&&Object.keys(i.O).every((e=>i.O[e](a[d])))?a.splice(d--,1):(s=!1,o0&&e[c-1][2]>o;c--)e[c]=e[c-1];e[c]=[a,r,o]},i.d=(e,t)=>{for(var a in t)i.o(t,a)&&!i.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.j=1106,(()=>{var e={1106:0};i.O.j=t=>0===e[t];var t=(t,a)=>{var r,o,[n,s,d]=a,l=0;if(n.some((t=>0!==e[t]))){for(r in s)i.o(s,r)&&(i.m[r]=s[r]);if(d)var c=d(i)}for(t&&t(a);li(1096)));r=i.O(r)})();
//# sourceMappingURL=update.bundle.js.map
\ No newline at end of file
diff --git a/plugins/bc-admin-third/webroot/js/admin/plugins/update.bundle.js.map b/plugins/bc-admin-third/webroot/js/admin/plugins/update.bundle.js.map
index 1319b137b9..6cd138621f 100644
--- a/plugins/bc-admin-third/webroot/js/admin/plugins/update.bundle.js.map
+++ b/plugins/bc-admin-third/webroot/js/admin/plugins/update.bundle.js.map
@@ -1 +1 @@
-{"version":3,"file":"js/admin/plugins/update.bundle.js","mappings":"uBAAIA,E,gCCWEC,EAAa,CAKfC,OAAQ,KAKRC,mBAAmB,EAKnBC,QAAO,WACH,IAAMC,EAASC,EAAE,6BACjBC,KAAKL,OAASG,EAAOG,KAAK,eAC1BD,KAAKJ,kBAAoBE,EAAOG,KAAK,0BACrCD,KAAKE,iBACLF,KAAKG,cACT,EAKAD,eAAc,WACVH,EAAE,cAAcK,GAAG,QAASJ,KAAKK,QACjCN,EAAE,gBAAgBK,GAAG,QAASL,EAAEO,OAAOC,YACvCR,EAAE,QAAQK,GAAG,SAAUJ,KAAKG,aAChC,EAQAE,OAAM,WACF,GAAIG,QAAQC,OAAOC,iBAAkB,CACjC,GAAyB,cAAtBhB,EAAWC,OAEV,OADAI,EAAEO,OAAOC,cACF,EAEXR,EAAEY,QAAQC,OAAM,WACZb,EAAEO,OAAOC,aACTR,EAAEO,OAAOO,cACTC,EAAAA,EAAMC,KAAKhB,EAAEO,OAAOU,gBA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OAAOiB,UAAUC,eAAe9B,KAAK2B,EAAKC,GCClFnC,EAAoBuB,EAAKnB,IACH,oBAAXkC,QAA0BA,OAAOC,aAC1CpB,OAAOQ,eAAevB,EAASkC,OAAOC,YAAa,CAAEC,MAAO,WAE7DrB,OAAOQ,eAAevB,EAAS,aAAc,CAAEoC,OAAO,GAAO,ECL9DxC,EAAoBkB,EAAI,K,MCKxB,IAAIuB,EAAkB,CACrB,KAAM,GAaPzC,EAAoBS,EAAES,EAAKwB,GAA0C,IAA7BD,EAAgBC,GAGxD,IAAIC,EAAuB,CAACC,EAA4B/D,KACvD,IAGIoB,EAAUyC,GAHT/B,EAAUkC,EAAaC,GAAWjE,EAGhBmC,EAAI,EAC3B,GAAGL,EAASoC,MAAMC,GAAgC,IAAxBP,EAAgBO,KAAa,CACtD,IAAI/C,KAAY4C,EACZ7C,EAAoB0B,EAAEmB,EAAa5C,KACrCD,EAAoBQ,EAAEP,GAAY4C,EAAY5C,IAGhD,GAAG6C,EAAS,IAAIpC,EAASoC,EAAQ9C,EAClC,CAEA,IADG4C,GAA4BA,EAA2B/D,GACrDmC,EAAIL,EAAShB,OAAQqB,IACzB0B,EAAU/B,EAASK,GAChBhB,EAAoB0B,EAAEe,EAAiBC,IAAYD,EAAgBC,IACrED,EAAgBC,GAAS,KAE1BD,EAAgBC,GAAW,EAE5B,OAAO1C,EAAoBS,EAAEC,EAAO,EAGjCuC,EAAqBC,KAAiC,2BAAIA,KAAiC,4BAAK,GACpGD,EAAmBE,QAAQR,EAAqBS,KAAK,KAAM,IAC3DH,EAAmBI,KAAOV,EAAqBS,KAAK,KAAMH,EAAmBI,KAAKD,KAAKH,G,KC7CvF,IAAIK,EAAsBtD,EAAoBS,OAAEN,EAAW,CAAC,MAAO,IAAOH,EAAoB,QAC9FsD,EAAsBtD,EAAoBS,EAAE6C,E","sources":["webpack://bc-admin-third/webpack/runtime/chunk loaded","webpack://bc-admin-third/./src/js/admin/plugins/update.js","webpack://bc-admin-third/webpack/bootstrap","webpack://bc-admin-third/webpack/runtime/define property getters","webpack://bc-admin-third/webpack/runtime/global","webpack://bc-admin-third/webpack/runtime/hasOwnProperty shorthand","webpack://bc-admin-third/webpack/runtime/make namespace object","webpack://bc-admin-third/webpack/runtime/runtimeId","webpack://bc-admin-third/webpack/runtime/jsonp chunk loading","webpack://bc-admin-third/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","/**\n * baserCMS : Based Website Development Project \n * Copyright (c) NPO baser foundation \n *\n * @copyright Copyright (c) NPO baser foundation\n * @link https://basercms.net baserCMS Project\n * @since 5.0.0\n * @license https://basercms.net/license/index.html MIT License\n */\nimport axios from \"axios\";\n\nconst updateForm = {\n\n /**\n * プラグイン名\n */\n plugin: null,\n\n /**\n * vendor / composer に書き込み権限があるか\n */\n isWritablePackage: false,\n\n /**\n * 起動処理\n */\n mounted() {\n const script = $(\"#AdminPluginsUpdateScript\");\n this.plugin = script.attr('data-plugin');\n this.isWritablePackage = script.attr('data-isWritablePackage');\n this.registerEvents();\n this.toggleUpdate();\n },\n\n /**\n * イベント登録\n */\n registerEvents() {\n $(\"#BtnUpdate\").on('click', this.update);\n $(\"#BtnDownload\").on('click', $.bcUtil.showLoader);\n $(\"#php\").on('change', this.toggleUpdate);\n },\n\n /**\n * アップデート実行\n * コアのアップデートの場合、ダウンロードした最新版のファイルを適用してからリクエストを送信する\n * マイグレーションファイルがプログラムに反映されないと実行できないため、別プロセスとして実行する\n * @returns {boolean}\n */\n update() {\n if (confirm(bcI18n.confirmMessage1)) {\n if(updateForm.plugin !== 'BaserCore') {\n $.bcUtil.showLoader();\n return true;\n }\n $.bcToken.check(function() {\n $.bcUtil.showLoader();\n $.bcUtil.hideMessage();\n axios.post($.bcUtil.apiAdminBaseUrl + 'baser-core/plugins/update_core_files.json', {}, {\n headers: {\n 'X-CSRF-Token': $.bcToken.key\n }\n })\n .then(response => {\n let message = response.data.message + bcI18n.updateMessage1;\n $.bcUtil.showNoticeMessage(message);\n $(window).scrollTop(0);\n $.bcUtil.showLoader();\n // フォーム送信\n $(\"#PluginUpdateForm\").submit();\n })\n .catch(error => {\n if (error.response.status === 500) {\n $.bcUtil.showAlertMessage(error.response.data.message);\n } else {\n $.bcUtil.showAlertMessage('予期せぬエラーが発生しました。システム管理者に連絡してください。');\n }\n $.bcUtil.hideLoader();\n $(window).scrollTop(0);\n });\n }, {hideLoader: false});\n }\n return false;\n },\n\n /**\n * アップデートボタン切り替え\n */\n toggleUpdate() {\n const $btnUpdate = $(\"#BtnUpdate\");\n const $btnDownload = $(\"#BtnDownload\");\n const $phpNotice = $(\".php-notice\");\n if(updateForm.plugin !== 'BaserCore') return;\n if($(\"#php\").val()) {\n if($btnUpdate.length) $btnUpdate.removeAttr('disabled');\n if($btnDownload.length) $btnDownload.removeAttr('disabled');\n $phpNotice.hide();\n } else {\n if($btnUpdate.length) $btnUpdate.attr('disabled', 'disabled');\n if($btnDownload.length) $btnDownload.attr('disabled', 'disabled');\n $phpNotice.show();\n }\n if(!updateForm.isWritablePackage) {\n if($btnUpdate.length) $btnUpdate.attr('disabled', 'disabled');\n if($btnDownload.length) $btnDownload.attr('disabled', 'disabled');\n }\n }\n\n};\n\nupdateForm.mounted();\n\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.j = 1106;","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t1106: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkbc_admin_third\"] = self[\"webpackChunkbc_admin_third\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [5000], () => (__webpack_require__(1096)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","updateForm","plugin","isWritablePackage","mounted","script","$","this","attr","registerEvents","toggleUpdate","on","update","bcUtil","showLoader","confirm","bcI18n","confirmMessage1","bcToken","check","hideMessage","axios","post","apiAdminBaseUrl","headers","key","then","response","message","data","updateMessage1","showNoticeMessage","window","scrollTop","submit","error","status","showAlertMessage","hideLoader","$btnUpdate","$btnDownload","$phpNotice","val","length","removeAttr","hide","show","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","module","__webpack_modules__","call","m","O","result","chunkIds","fn","priority","notFulfilled","Infinity","i","fulfilled","j","Object","keys","every","splice","r","d","definition","o","defineProperty","enumerable","get","g","globalThis","Function","e","obj","prop","prototype","hasOwnProperty","Symbol","toStringTag","value","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","id","chunkLoadingGlobal","self","forEach","bind","push","__webpack_exports__"],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"file":"js/admin/plugins/update.bundle.js","mappings":"uBAAIA,E,gCCWEC,EAAa,CAKfC,OAAQ,KAKRC,mBAAmB,EAKnBC,aAAa,EAKbC,QAAO,WACH,IAAMC,EAASC,EAAE,6BACjBC,KAAKN,OAASI,EAAOG,KAAK,eAC1BD,KAAKJ,YAAcE,EAAOG,KAAK,yBACPC,IAArBF,KAAKJ,cAA2BI,KAAKJ,aAAc,GACtDI,KAAKG,iBACLH,KAAKI,cACT,EAKAD,eAAc,WACVJ,EAAE,cAAcM,GAAG,QAASL,KAAKM,QACjCP,EAAE,gBAAgBM,GAAG,QAASN,EAAEQ,OAAOC,YACvCT,EAAE,QAAQM,GAAG,SAAUL,KAAKI,aAChC,EAQAE,OAAM,WACF,GAAIG,QAAQC,OAAOC,iBAAkB,CACjC,GAA0B,cAAtBlB,EAAWC,OAEX,OADAK,EAAEQ,OAAOC,cACF,EAEXT,EAAEa,QAAQC,OAAM,WACZd,EAAEQ,OAAOC,aACTT,EAAEQ,OAAOO,cACTC,EAAAA,EAAMC,KAAKjB,EAAEQ,OAAOU,gBAAkB,4CAA6C,CAAC,EAAG,CACnFC,QAAS,CACL,eAAgBnB,EAAEa,QAAQO,OAG7BC,MAAK,SAAAC,GACF,IAAIC,EAAUD,EAASE,KAAKD,Q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,OAAOQ,eAAexB,EAASmC,OAAOC,YAAa,CAAEC,MAAO,WAE7DrB,OAAOQ,eAAexB,EAAS,aAAc,CAAEqC,OAAO,GAAO,ECL9DxC,EAAoBkB,EAAI,K,MCKxB,IAAIuB,EAAkB,CACrB,KAAM,GAaPzC,EAAoBQ,EAAEU,EAAKwB,GAA0C,IAA7BD,EAAgBC,GAGxD,IAAIC,EAAuB,CAACC,EAA4B/D,KACvD,IAGIoB,EAAUyC,GAHThC,EAAUmC,EAAaC,GAAWjE,EAGhBkC,EAAI,EAC3B,GAAGL,EAASqC,MAAMC,GAAgC,IAAxBP,EAAgBO,KAAa,CACtD,IAAI/C,KAAY4C,EACZ7C,EAAoB0B,EAAEmB,EAAa5C,KACrCD,EAAoBO,EAAEN,GAAY4C,EAAY5C,IAGhD,GAAG6C,EAAS,IAAIrC,EAASqC,EAAQ9C,EAClC,CAEA,IADG4C,GAA4BA,EAA2B/D,GACrDkC,EAAIL,EAASM,OAAQD,IACzB2B,EAAUhC,EAASK,GAChBf,EAAoB0B,EAAEe,EAAiBC,IAAYD,EAAgBC,IACrED,EAAgBC,GAAS,KAE1BD,EAAgBC,GAAW,EAE5B,OAAO1C,EAAoBQ,EAAEC,EAAO,EAGjCwC,EAAqBC,KAAiC,2BAAIA,KAAiC,4BAAK,GACpGD,EAAmBE,QAAQR,EAAqBS,KAAK,KAAM,IAC3DH,EAAmBI,KAAOV,EAAqBS,KAAK,KAAMH,EAAmBI,KAAKD,KAAKH,G,KC7CvF,IAAIK,EAAsBtD,EAAoBQ,OAAEhD,EAAW,CAAC,MAAO,IAAOwC,EAAoB,QAC9FsD,EAAsBtD,EAAoBQ,EAAE8C,E","sources":["webpack://bc-admin-third/webpack/runtime/chunk loaded","webpack://bc-admin-third/./src/js/admin/plugins/update.js","webpack://bc-admin-third/webpack/bootstrap","webpack://bc-admin-third/webpack/runtime/define property getters","webpack://bc-admin-third/webpack/runtime/global","webpack://bc-admin-third/webpack/runtime/hasOwnProperty shorthand","webpack://bc-admin-third/webpack/runtime/make namespace object","webpack://bc-admin-third/webpack/runtime/runtimeId","webpack://bc-admin-third/webpack/runtime/jsonp chunk loading","webpack://bc-admin-third/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","/**\n * baserCMS : Based Website Development Project \n * Copyright (c) NPO baser foundation \n *\n * @copyright Copyright (c) NPO baser foundation\n * @link https://basercms.net baserCMS Project\n * @since 5.0.0\n * @license https://basercms.net/license/index.html MIT License\n */\nimport axios from \"axios\";\n\nconst updateForm = {\n\n /**\n * プラグイン名\n */\n plugin: null,\n\n /**\n * vendor / composer に書き込み権限があるか\n */\n isWritablePackage: false,\n\n /**\n * アップデートできるかどうか\n */\n isUpdatable: false,\n\n /**\n * 起動処理\n */\n mounted() {\n const script = $(\"#AdminPluginsUpdateScript\");\n this.plugin = script.attr('data-plugin');\n this.isUpdatable = script.attr('data-isUpdatable');\n if(this.isUpdatable === undefined) this.isUpdatable = false;\n this.registerEvents();\n this.toggleUpdate();\n },\n\n /**\n * イベント登録\n */\n registerEvents() {\n $(\"#BtnUpdate\").on('click', this.update);\n $(\"#BtnDownload\").on('click', $.bcUtil.showLoader);\n $(\"#php\").on('change', this.toggleUpdate);\n },\n\n /**\n * アップデート実行\n * コアのアップデートの場合、ダウンロードした最新版のファイルを適用してからリクエストを送信する\n * マイグレーションファイルがプログラムに反映されないと実行できないため、別プロセスとして実行する\n * @returns {boolean}\n */\n update() {\n if (confirm(bcI18n.confirmMessage1)) {\n if (updateForm.plugin !== 'BaserCore') {\n $.bcUtil.showLoader();\n return true;\n }\n $.bcToken.check(function () {\n $.bcUtil.showLoader();\n $.bcUtil.hideMessage();\n axios.post($.bcUtil.apiAdminBaseUrl + 'baser-core/plugins/update_core_files.json', {}, {\n headers: {\n 'X-CSRF-Token': $.bcToken.key\n }\n })\n .then(response => {\n let message = response.data.message + bcI18n.updateMessage1;\n $.bcUtil.showNoticeMessage(message);\n $(window).scrollTop(0);\n $.bcUtil.showLoader();\n // フォーム送信\n $(\"#PluginUpdateForm\").submit();\n })\n .catch(error => {\n if (error.response.status === 500) {\n $.bcUtil.showAlertMessage(error.response.data.message);\n } else {\n $.bcUtil.showAlertMessage('予期せぬエラーが発生しました。システム管理者に連絡してください。');\n }\n $.bcUtil.hideLoader();\n $(window).scrollTop(0);\n });\n }, {hideLoader: false});\n }\n return false;\n },\n\n /**\n * アップデートボタン切り替え\n */\n toggleUpdate() {\n const $btnUpdate = $(\"#BtnUpdate\");\n const $btnDownload = $(\"#BtnDownload\");\n const $phpNotice = $(\".php-notice\");\n const $inputPhp = $(\"#php\");\n\n if (updateForm.plugin === 'BaserCore') {\n if ($inputPhp.val() !== ''){\n if(updateForm.isUpdatable) {\n $btnUpdate.removeAttr('disabled');\n }\n $btnDownload.removeAttr('disabled');\n } else {\n $btnUpdate.attr('disabled', 'disabled');\n $btnDownload.attr('disabled', 'disabled');\n }\n if ($inputPhp.val()) {\n $phpNotice.hide();\n } else {\n $phpNotice.show();\n }\n } else {\n if (updateForm.isUpdatable) {\n $btnUpdate.removeAttr('disabled');\n $btnDownload.removeAttr('disabled');\n } else {\n $btnUpdate.attr('disabled', 'disabled');\n $btnDownload.attr('disabled', 'disabled');\n }\n }\n }\n\n};\n\nupdateForm.mounted();\n\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.j = 1106;","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t1106: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkbc_admin_third\"] = self[\"webpackChunkbc_admin_third\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [5000], () => (__webpack_require__(1096)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","updateForm","plugin","isWritablePackage","isUpdatable","mounted","script","$","this","attr","undefined","registerEvents","toggleUpdate","on","update","bcUtil","showLoader","confirm","bcI18n","confirmMessage1","bcToken","check","hideMessage","axios","post","apiAdminBaseUrl","headers","key","then","response","message","data","updateMessage1","showNoticeMessage","window","scrollTop","submit","error","status","showAlertMessage","hideLoader","$btnUpdate","$btnDownload","$phpNotice","$inputPhp","val","removeAttr","hide","show","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","module","__webpack_modules__","call","m","O","result","chunkIds","fn","priority","notFulfilled","Infinity","i","length","fulfilled","j","Object","keys","every","splice","r","d","definition","o","defineProperty","enumerable","get","g","globalThis","Function","e","obj","prop","prototype","hasOwnProperty","Symbol","toStringTag","value","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","id","chunkLoadingGlobal","self","forEach","bind","push","__webpack_exports__"],"sourceRoot":""}
\ No newline at end of file