]> _ Git - fluidbook-toolbox.git/commitdiff
wait #6515
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 24 Nov 2023 17:39:38 +0000 (18:39 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 24 Nov 2023 17:39:38 +0000 (18:39 +0100)
app/Fluidbook/Compiler/Compiler.php
app/Models/FluidbookHealthIssues.php
composer.lock

index cce81297250aeee823978a10bdd4a0b4792d00ab..ad6a186eb316047a88602799f5e78bd9faf4e6a7 100644 (file)
@@ -22,6 +22,7 @@ use Cubist\Util\ArrayUtil;
 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;
@@ -36,7 +37,7 @@ use Fluidbook\Tools\SVG\SVGTools;
 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;
@@ -322,6 +323,7 @@ class Compiler extends Base implements CompilerInterface
 
         $this->dir = $this->getFluidbook()->getFinalPath($theme, $scormVariant);
         $this->vdir = new VirtualDirectory($this->dir);
+        $this->vdir->setErrorListener($this);
 
         $this->wdir = $this->getFluidbook()->getAssetDir();
 
@@ -2516,6 +2518,11 @@ class Compiler extends Base implements CompilerInterface
     {
         FluidbookHealthIssues::addIssue($this->book_id, $type, $data);
     }
+
+    public function handleVirtualDirectoryError($message)
+    {
+        $this->addIssue(FluidbookHealthIssues::TYPE_COMPILE_FILES, ['error' => $message]);
+    }
 }
 
 
index 36ee0f02b9ba805fc50ddd4555caedf09c853e82..e3a5988181dbdaf8b00168a4dfc542341199366b 100644 (file)
@@ -15,6 +15,7 @@ class FluidbookHealthIssues extends ToolboxModel
     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;
@@ -66,7 +67,8 @@ class FluidbookHealthIssues extends ToolboxModel
          * __('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 [
@@ -99,6 +101,12 @@ class FluidbookHealthIssues extends ToolboxModel
                     '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',
+                ],
         ];
     }
 
index 06d44ff433f66f782b37755b76102406c7e18c4b..626168c8f28384ac673f03d008c6db763fb34b35 100644 (file)
             "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"
 }