generator-razor 14.0.35 → 14.0.37
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/app/index.js
CHANGED
|
@@ -407,6 +407,9 @@ export default class extends Generator {
|
|
|
407
407
|
this.destinationPath('typo3conf/ext/.yarn-integrity')
|
|
408
408
|
)
|
|
409
409
|
|
|
410
|
+
/*
|
|
411
|
+
* Copy Razor extensions provided by the Razor repository.
|
|
412
|
+
*/
|
|
410
413
|
if (this._usesModernTypo3Structure()) {
|
|
411
414
|
const extensionsSource = this.destinationPath(
|
|
412
415
|
'typo3conf/ext/razor/Initialisation/Extensions'
|
|
@@ -426,10 +429,10 @@ export default class extends Generator {
|
|
|
426
429
|
}
|
|
427
430
|
|
|
428
431
|
/*
|
|
429
|
-
* Restore temporary extensions from generator templates.
|
|
432
|
+
* Restore temporary extensions from the generator templates.
|
|
430
433
|
*
|
|
431
|
-
*
|
|
432
|
-
*
|
|
434
|
+
* Yarn and Razor's Initialisation/Extensions may have modified
|
|
435
|
+
* typo3conf/ext before this point.
|
|
433
436
|
*/
|
|
434
437
|
const templateVersion = this._getTemplateVersion()
|
|
435
438
|
|
|
@@ -477,18 +480,36 @@ export default class extends Generator {
|
|
|
477
480
|
)
|
|
478
481
|
|
|
479
482
|
/*
|
|
480
|
-
*
|
|
483
|
+
* Start TYPO3 with completely fresh caches.
|
|
484
|
+
*/
|
|
485
|
+
this.log('→ Preparing TYPO3 caches...')
|
|
486
|
+
|
|
487
|
+
await fs.remove(
|
|
488
|
+
this.destinationPath('typo3temp/var/cache')
|
|
489
|
+
)
|
|
490
|
+
|
|
491
|
+
await this._runCommand(
|
|
492
|
+
typo3,
|
|
493
|
+
['cache:flush']
|
|
494
|
+
)
|
|
495
|
+
|
|
496
|
+
/*
|
|
497
|
+
* Activate Razor Kickstart.
|
|
481
498
|
*
|
|
482
|
-
* This extension has no external dependencies and
|
|
483
|
-
*
|
|
499
|
+
* This extension has no external dependencies and provides
|
|
500
|
+
* the TER update and Razor installation commands.
|
|
484
501
|
*/
|
|
485
|
-
this.log('→ Activating
|
|
502
|
+
this.log('→ Activating razor kickstart...')
|
|
486
503
|
|
|
487
504
|
await this._runCommand(
|
|
488
505
|
typo3,
|
|
489
506
|
['extension:activate', 'razorkickstart']
|
|
490
507
|
)
|
|
491
508
|
|
|
509
|
+
/*
|
|
510
|
+
* Update the TER extension list before resolving any
|
|
511
|
+
* Razor dependencies.
|
|
512
|
+
*/
|
|
492
513
|
this.log('→ Updating TER extension list...')
|
|
493
514
|
|
|
494
515
|
await this._runCommand(
|
|
@@ -497,29 +518,44 @@ export default class extends Generator {
|
|
|
497
518
|
)
|
|
498
519
|
|
|
499
520
|
/*
|
|
500
|
-
* Razor
|
|
521
|
+
* Install the complete Razor framework through
|
|
522
|
+
* ExtensionManagementService.
|
|
501
523
|
*
|
|
502
|
-
*
|
|
503
|
-
*
|
|
524
|
+
* This resolves and installs Razor's TER dependencies,
|
|
525
|
+
* Razor itself, the Razor extensions and Razor Bootstrap.
|
|
504
526
|
*/
|
|
505
|
-
this.log('→
|
|
527
|
+
this.log('→ Installing razor framework...')
|
|
506
528
|
|
|
507
529
|
await this._runCommand(
|
|
508
530
|
typo3,
|
|
509
|
-
['
|
|
531
|
+
['razorkickstart:install']
|
|
510
532
|
)
|
|
511
533
|
|
|
512
534
|
/*
|
|
513
|
-
*
|
|
535
|
+
* Razor's InstallService should have created razor.sh
|
|
536
|
+
* during dependency installation / activation.
|
|
537
|
+
*/
|
|
538
|
+
const razorScript = this.destinationPath(
|
|
539
|
+
'razor.sh'
|
|
540
|
+
)
|
|
541
|
+
|
|
542
|
+
if (!await fs.pathExists(razorScript)) {
|
|
543
|
+
throw new Error(
|
|
544
|
+
'razor.sh was not created during Razor installation.'
|
|
545
|
+
)
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
/*
|
|
549
|
+
* Remove temporary helper extensions.
|
|
514
550
|
*/
|
|
515
|
-
this.log('→ Removing
|
|
551
|
+
this.log('→ Removing razor bootstrap...')
|
|
516
552
|
|
|
517
553
|
await this._runCommand(
|
|
518
554
|
typo3,
|
|
519
555
|
['extension:deactivate', 'razorbootstrap']
|
|
520
556
|
)
|
|
521
557
|
|
|
522
|
-
this.log('→ Removing
|
|
558
|
+
this.log('→ Removing razor kickstart...')
|
|
523
559
|
|
|
524
560
|
await this._runCommand(
|
|
525
561
|
typo3,
|
|
@@ -535,8 +571,8 @@ export default class extends Generator {
|
|
|
535
571
|
}
|
|
536
572
|
|
|
537
573
|
/*
|
|
538
|
-
* Clear
|
|
539
|
-
*
|
|
574
|
+
* Clear package / DI caches after removing the temporary
|
|
575
|
+
* extensions.
|
|
540
576
|
*/
|
|
541
577
|
this.log('→ Flushing TYPO3 caches...')
|
|
542
578
|
|
|
@@ -549,28 +585,6 @@ export default class extends Generator {
|
|
|
549
585
|
['cache:flush']
|
|
550
586
|
)
|
|
551
587
|
|
|
552
|
-
/*
|
|
553
|
-
* Activate Razor.
|
|
554
|
-
*
|
|
555
|
-
* Razor's InstallService should create razor.sh.
|
|
556
|
-
*/
|
|
557
|
-
this.log('→ Activating Razor...')
|
|
558
|
-
|
|
559
|
-
await this._runCommand(
|
|
560
|
-
typo3,
|
|
561
|
-
['extension:activate', 'razor']
|
|
562
|
-
)
|
|
563
|
-
|
|
564
|
-
const razorScript = this.destinationPath(
|
|
565
|
-
'razor.sh'
|
|
566
|
-
)
|
|
567
|
-
|
|
568
|
-
if (!await fs.pathExists(razorScript)) {
|
|
569
|
-
throw new Error(
|
|
570
|
-
'razor.sh was not created during Razor installation.'
|
|
571
|
-
)
|
|
572
|
-
}
|
|
573
|
-
|
|
574
588
|
/*
|
|
575
589
|
* Hand over to the Razor installer.
|
|
576
590
|
*/
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
declare(strict_types=1);
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
* This file is part of the TYPO3 CMS project.
|
|
7
|
+
*
|
|
8
|
+
* It is free software; you can redistribute it and/or modify it under
|
|
9
|
+
* the terms of the GNU General Public License, either version 2
|
|
10
|
+
* of the License, or any later version.
|
|
11
|
+
*
|
|
12
|
+
* For the full copyright and license information, please read the
|
|
13
|
+
* LICENSE.txt file that was distributed with this source code.
|
|
14
|
+
*
|
|
15
|
+
* The TYPO3 project - inspiring people to share!
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
namespace RZ\Razorkickstart\Command;
|
|
19
|
+
|
|
20
|
+
use Symfony\Component\Console\Attribute\AsCommand;
|
|
21
|
+
use Symfony\Component\Console\Command\Command;
|
|
22
|
+
use Symfony\Component\Console\Input\InputInterface;
|
|
23
|
+
use Symfony\Component\Console\Output\OutputInterface;
|
|
24
|
+
use Symfony\Component\Console\Style\SymfonyStyle;
|
|
25
|
+
use TYPO3\CMS\Extensionmanager\Service\ExtensionManagementService;
|
|
26
|
+
|
|
27
|
+
#[AsCommand(
|
|
28
|
+
name: 'razorkickstart:install',
|
|
29
|
+
description: 'Installs Razor and all required dependencies'
|
|
30
|
+
)]
|
|
31
|
+
final class InstallCommand extends Command
|
|
32
|
+
{
|
|
33
|
+
public function __construct(
|
|
34
|
+
private readonly ExtensionManagementService $extensionManagementService
|
|
35
|
+
) {
|
|
36
|
+
parent::__construct();
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
protected function execute(
|
|
40
|
+
InputInterface $input,
|
|
41
|
+
OutputInterface $output
|
|
42
|
+
): int {
|
|
43
|
+
$io = new SymfonyStyle($input, $output);
|
|
44
|
+
|
|
45
|
+
$io->writeln('Installing razor dependencies...');
|
|
46
|
+
|
|
47
|
+
$extension = $this->extensionManagementService->getExtension(
|
|
48
|
+
'razorbootstrap'
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
$result = $this->extensionManagementService->installExtension(
|
|
52
|
+
$extension
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
if ($result === false) {
|
|
56
|
+
$errors = $this->extensionManagementService
|
|
57
|
+
->getDependencyErrors();
|
|
58
|
+
|
|
59
|
+
$io->error([
|
|
60
|
+
'razor dependencies could not be resolved.',
|
|
61
|
+
print_r($errors, true),
|
|
62
|
+
]);
|
|
63
|
+
|
|
64
|
+
return Command::FAILURE;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
$io->success(
|
|
68
|
+
'razor and all dependencies installed successfully.'
|
|
69
|
+
);
|
|
70
|
+
|
|
71
|
+
return Command::SUCCESS;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -84,12 +84,6 @@ return [
|
|
|
84
84
|
'compression' => true,
|
|
85
85
|
],
|
|
86
86
|
],
|
|
87
|
-
'pagesection' => [
|
|
88
|
-
'backend' => 'TYPO3\\CMS\\Core\\Cache\\Backend\\Typo3DatabaseBackend',
|
|
89
|
-
'options' => [
|
|
90
|
-
'compression' => true,
|
|
91
|
-
],
|
|
92
|
-
],
|
|
93
87
|
'rootline' => [
|
|
94
88
|
'backend' => 'TYPO3\\CMS\\Core\\Cache\\Backend\\Typo3DatabaseBackend',
|
|
95
89
|
'options' => [
|