use Cubist\Util\CommandLine;
use Cubist\Util\Data;
use Cubist\Util\Files\Files;
+use Cubist\Util\Files\IVirtualDirectoryErrorListener;
use Cubist\Util\Files\VirtualDirectory;
use Cubist\Util\Graphics\Color;
use Cubist\Util\Graphics\Image;
use Illuminate\Console\Command;
use SplFileInfo;
-class Compiler extends Base implements CompilerInterface
+class Compiler extends Base implements CompilerInterface, IVirtualDirectoryErrorListener
{
use FluidbookPlayerBranches;
use \Fluidbook\Tools\Compiler\FluidbookCompiler;
$this->dir = $this->getFluidbook()->getFinalPath($theme, $scormVariant);
$this->vdir = new VirtualDirectory($this->dir);
+ $this->vdir->setErrorListener($this);
$this->wdir = $this->getFluidbook()->getAssetDir();
{
FluidbookHealthIssues::addIssue($this->book_id, $type, $data);
}
+
+ public function handleVirtualDirectoryError($message)
+ {
+ $this->addIssue(FluidbookHealthIssues::TYPE_COMPILE_FILES, ['error' => $message]);
+ }
}
const TYPE_QRCODE_NOT_READABLE = 2;
const TYPE_MOBILEFIRST_CONFIG = 3;
const TYPE_TTS_VOICE_INVALID = 4;
+ const TYPE_COMPILE_FILES = 5;
const CRIT_ERROR = 5;
const CRIT_WARNING = 3;
* __('Le chemin ":path" est introuvable')
* __('Le QRcode du lien :uid (page :page) n\'a pas pu être décodé')
* __('Ce fluidbook mobile first a le paramètre "Identifiant du fluidbook Mobile first" défini. Ce paramètre est réservé aux fluidbooks Desktop')
- * __('La voix d\'audiodescription :voice est invalide');
+ * __('La voix d\'audiodescription :voice est invalide')
+ * __('L\'erreur suivante s\'est produite lors de la compilation du fluidbook : :error')
*
*/
return [
'criticality' => self::CRIT_ERROR,
'text' => 'La voix d\'audiodescription :voice est invalide',
],
+ static::TYPE_COMPILE_FILES =>
+ [
+ 'summary' => __('Erreur lors de la compilation'),
+ 'criticality' => self::CRIT_ERROR,
+ 'text' => 'L\'erreur suivante s\'est produite lors de la compilation du fluidbook : :error',
+ ],
];
}
"source": {
"type": "git",
"url": "https://github.com/chillerlan/php-qrcode.git",
- "reference": "33ad99a1bd116fa329993b373224e16e5af43f6d"
+ "reference": "a301af5b7faa7fcd690b29f38b283616a7d93b89"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/chillerlan/php-qrcode/zipball/33ad99a1bd116fa329993b373224e16e5af43f6d",
- "reference": "33ad99a1bd116fa329993b373224e16e5af43f6d",
+ "url": "https://api.github.com/repos/chillerlan/php-qrcode/zipball/a301af5b7faa7fcd690b29f38b283616a7d93b89",
+ "reference": "a301af5b7faa7fcd690b29f38b283616a7d93b89",
"shasum": ""
},
"require": {
"type": "ko_fi"
}
],
- "time": "2023-10-29T19:15:03+00:00"
+ "time": "2023-11-24T15:47:26+00:00"
},
{
"name": "chillerlan/php-settings-container",
"source": {
"type": "git",
"url": "git://git.cubedesigners.com/cubist_cms-back.git",
- "reference": "94b795415ede47f1845285682d11a6f8b4461e84"
+ "reference": "e6206f6514c3d3cc25c6cf7daf04fc886d573c60"
},
"dist": {
"type": "tar",
- "url": "https://composer.cubedesigners.com/dist/cubist/cms-back/cubist-cms-back-dev-backpack5-a79f9a.tar",
- "reference": "94b795415ede47f1845285682d11a6f8b4461e84",
- "shasum": "d2266393869bc7b50a860787e676177da643ae09"
+ "url": "https://composer.cubedesigners.com/dist/cubist/cms-back/cubist-cms-back-dev-backpack5-e94f8d.tar",
+ "reference": "e6206f6514c3d3cc25c6cf7daf04fc886d573c60",
+ "shasum": "c8337ca463d6d03a6b2f2fa203494a0f302f79f9"
},
"require": {
"backpack/backupmanager": "^v3.0.9",
}
],
"description": "Cubist Backpack extension",
- "time": "2023-11-08T15:57:24+00:00"
+ "time": "2023-11-24T11:07:55+00:00"
},
{
"name": "cubist/cms-front",
"source": {
"type": "git",
"url": "git://git.cubedesigners.com/cubist_net.git",
- "reference": "a67603800a93bde7294c450a99a862d2f51b219a"
+ "reference": "4a0e6efad661c32c33e66384c221df230e06a040"
},
"dist": {
"type": "tar",
- "url": "https://composer.cubedesigners.com/dist/cubist/net/cubist-net-dev-master-b429cc.tar",
- "reference": "a67603800a93bde7294c450a99a862d2f51b219a",
- "shasum": "f2a91449c8b133fc14b1130d4b7c1c55482c6bf0"
+ "url": "https://composer.cubedesigners.com/dist/cubist/net/cubist-net-dev-master-41040e.tar",
+ "reference": "4a0e6efad661c32c33e66384c221df230e06a040",
+ "shasum": "970ac53923bcbbac458216870f8b77ac511913f4"
},
"require": {
"cubist/util": "dev-master",
}
],
"description": "net cubist composer package",
- "time": "2023-11-07T11:19:05+00:00"
+ "time": "2023-11-23T16:52:20+00:00"
},
{
"name": "cubist/pdf",
"source": {
"type": "git",
"url": "git://git.cubedesigners.com/cubist_util.git",
- "reference": "6bf2e76444fcf1e4071f927cbcba7ae289f5420e"
+ "reference": "7008756cdf4d2cd69ff309a677730291becd08f6"
},
"dist": {
"type": "tar",
- "url": "https://composer.cubedesigners.com/dist/cubist/util/cubist-util-dev-master-15d837.tar",
- "reference": "6bf2e76444fcf1e4071f927cbcba7ae289f5420e",
- "shasum": "b9d1e26f3942c7428943d69e761243f03169d2cd"
+ "url": "https://composer.cubedesigners.com/dist/cubist/util/cubist-util-dev-master-5589bd.tar",
+ "reference": "7008756cdf4d2cd69ff309a677730291becd08f6",
+ "shasum": "d39cfbb10bba5a5c0e18c244da1eac2abe724337"
},
"require": {
"cubist/net": "dev-master",
}
],
"description": "Utilities class",
- "time": "2023-11-22T12:16:47+00:00"
+ "time": "2023-11-24T17:02:13+00:00"
},
{
"name": "cviebrock/eloquent-sluggable",
"source": {
"type": "git",
"url": "git://git.cubedesigners.com/fluidbook_tools.git",
- "reference": "dd9b5b32ddc1a14afce0aed09a39be2723dc8502"
+ "reference": "9d74b725e456b8912e26e4f630b712929c1ffcce"
},
"dist": {
"type": "tar",
- "url": "https://composer.cubedesigners.com/dist/fluidbook/tools/fluidbook-tools-dev-master-cf70ef.tar",
- "reference": "dd9b5b32ddc1a14afce0aed09a39be2723dc8502",
- "shasum": "1a3c8493f78e9d5bcad767e5cfb7c6877fec005e"
+ "url": "https://composer.cubedesigners.com/dist/fluidbook/tools/fluidbook-tools-dev-master-e6610a.tar",
+ "reference": "9d74b725e456b8912e26e4f630b712929c1ffcce",
+ "shasum": "abb301d693b5224d89704e53160307df206808b9"
},
"require": {
"barryvdh/laravel-debugbar": "*",
}
],
"description": "Fluidbook Tools",
- "time": "2023-11-17T09:43:44+00:00"
+ "time": "2023-11-24T15:36:20+00:00"
},
{
"name": "fruitcake/php-cors",
"ext-zlib": "*"
},
"platform-dev": [],
- "plugin-api-version": "2.6.0"
+ "plugin-api-version": "2.1.0"
}