generator-razor 14.0.24 → 14.0.26
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 +97 -0
- package/app/templates/143/typo3conf/ext/razorbootstrap/Classes/Command/UpdateTerCommand.php +51 -0
- package/app/templates/143/typo3conf/ext/razorbootstrap/Configuration/Services.yaml +8 -0
- package/app/templates/143/typo3conf/ext/razorbootstrap/composer.json +24 -0
- package/package.json +1 -1
package/app/index.js
CHANGED
|
@@ -216,6 +216,18 @@ export default class extends Generator {
|
|
|
216
216
|
value: true
|
|
217
217
|
}],
|
|
218
218
|
store: true
|
|
219
|
+
}, {
|
|
220
|
+
type: 'select',
|
|
221
|
+
name: 'SwitchFreeMode',
|
|
222
|
+
message: 'Switch connected mode to free mode?',
|
|
223
|
+
choices: [{
|
|
224
|
+
name: 'No',
|
|
225
|
+
value: false
|
|
226
|
+
}, {
|
|
227
|
+
name: 'Yes',
|
|
228
|
+
value: true
|
|
229
|
+
}],
|
|
230
|
+
store: true
|
|
219
231
|
}, {
|
|
220
232
|
type: 'input',
|
|
221
233
|
name: 'Author',
|
|
@@ -416,6 +428,90 @@ export default class extends Generator {
|
|
|
416
428
|
await this._fixProjectGroup()
|
|
417
429
|
await this._fixWritableDirectoryPermissions()
|
|
418
430
|
|
|
431
|
+
const typo3 = this.destinationPath(
|
|
432
|
+
'typo3/sysext/core/bin/typo3'
|
|
433
|
+
)
|
|
434
|
+
|
|
435
|
+
this.log('→ Activating razor bootstrap...')
|
|
436
|
+
|
|
437
|
+
await this.spawnCommand(
|
|
438
|
+
typo3,
|
|
439
|
+
['extension:activate', 'razorbootstrap'],
|
|
440
|
+
{
|
|
441
|
+
cwd: this.destinationRoot()
|
|
442
|
+
}
|
|
443
|
+
)
|
|
444
|
+
|
|
445
|
+
this.log('→ Updating TER extension list...')
|
|
446
|
+
|
|
447
|
+
await this.spawnCommand(
|
|
448
|
+
typo3,
|
|
449
|
+
['razor-bootstrap:ter:update'],
|
|
450
|
+
{
|
|
451
|
+
cwd: this.destinationRoot()
|
|
452
|
+
}
|
|
453
|
+
)
|
|
454
|
+
|
|
455
|
+
this.log('→ Removing razor bootstrap...')
|
|
456
|
+
|
|
457
|
+
await this.spawnCommand(
|
|
458
|
+
typo3,
|
|
459
|
+
['extension:deactivate', 'razorbootstrap'],
|
|
460
|
+
{
|
|
461
|
+
cwd: this.destinationRoot()
|
|
462
|
+
}
|
|
463
|
+
)
|
|
464
|
+
|
|
465
|
+
/*
|
|
466
|
+
* Remove temporary bootstrap extension and cached DI container
|
|
467
|
+
*/
|
|
468
|
+
|
|
469
|
+
await fs.remove(
|
|
470
|
+
this.destinationPath('typo3conf/ext/razorbootstrap')
|
|
471
|
+
)
|
|
472
|
+
|
|
473
|
+
await fs.remove(
|
|
474
|
+
this.destinationPath('typo3temp/var/cache')
|
|
475
|
+
)
|
|
476
|
+
|
|
477
|
+
this.log('→ Activating razor...')
|
|
478
|
+
|
|
479
|
+
await this.spawnCommand(
|
|
480
|
+
typo3,
|
|
481
|
+
['extension:activate', 'razor'],
|
|
482
|
+
{
|
|
483
|
+
cwd: this.destinationRoot()
|
|
484
|
+
}
|
|
485
|
+
)
|
|
486
|
+
|
|
487
|
+
this.log('→ Flushing TYPO3 caches...')
|
|
488
|
+
|
|
489
|
+
await this.spawnCommand(
|
|
490
|
+
typo3,
|
|
491
|
+
['cache:flush'],
|
|
492
|
+
{
|
|
493
|
+
cwd: this.destinationRoot()
|
|
494
|
+
}
|
|
495
|
+
)
|
|
496
|
+
|
|
497
|
+
const razorScript = this.destinationPath('razor.sh')
|
|
498
|
+
|
|
499
|
+
if (!await fs.pathExists(razorScript)) {
|
|
500
|
+
throw new Error(
|
|
501
|
+
'razor.sh was not created during razor installation.'
|
|
502
|
+
)
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
this.log('→ Starting razor installer...')
|
|
506
|
+
|
|
507
|
+
await this.spawnCommand(
|
|
508
|
+
'bash',
|
|
509
|
+
['./razor.sh'],
|
|
510
|
+
{
|
|
511
|
+
cwd: this.destinationRoot()
|
|
512
|
+
}
|
|
513
|
+
)
|
|
514
|
+
|
|
419
515
|
const orange = chalk.ansi256(208)
|
|
420
516
|
const petrol = chalk.ansi256(24)
|
|
421
517
|
|
|
@@ -969,6 +1065,7 @@ export default class extends Generator {
|
|
|
969
1065
|
adminEmail: this.props.AdminEmail,
|
|
970
1066
|
english: this.props.English,
|
|
971
1067
|
englishDefault: this.props.EnglishDefault,
|
|
1068
|
+
switchFreeMode: this.props.SwitchFreeMode,
|
|
972
1069
|
author: this.props.Author,
|
|
973
1070
|
email: this.props.Email,
|
|
974
1071
|
website: this.props.Website,
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
declare(strict_types=1);
|
|
4
|
+
|
|
5
|
+
namespace RZ\Razorbootstrap\Command;
|
|
6
|
+
|
|
7
|
+
use Symfony\Component\Console\Attribute\AsCommand;
|
|
8
|
+
use Symfony\Component\Console\Command\Command;
|
|
9
|
+
use Symfony\Component\Console\Input\InputInterface;
|
|
10
|
+
use Symfony\Component\Console\Output\OutputInterface;
|
|
11
|
+
use Symfony\Component\Console\Style\SymfonyStyle;
|
|
12
|
+
use TYPO3\CMS\Core\Attribute\AsNonSchedulableCommand;
|
|
13
|
+
use TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException;
|
|
14
|
+
use TYPO3\CMS\Extensionmanager\Remote\RemoteRegistry;
|
|
15
|
+
|
|
16
|
+
#[AsCommand(
|
|
17
|
+
name: 'razorbootstrap:ter:update',
|
|
18
|
+
description: 'Updates the TYPO3 Extension Repository extension list'
|
|
19
|
+
)]
|
|
20
|
+
#[AsNonSchedulableCommand]
|
|
21
|
+
final class UpdateTerCommand extends Command
|
|
22
|
+
{
|
|
23
|
+
public function __construct(
|
|
24
|
+
private readonly RemoteRegistry $remoteRegistry
|
|
25
|
+
) {
|
|
26
|
+
parent::__construct();
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
protected function execute(
|
|
30
|
+
InputInterface $input,
|
|
31
|
+
OutputInterface $output
|
|
32
|
+
): int {
|
|
33
|
+
$io = new SymfonyStyle($input, $output);
|
|
34
|
+
|
|
35
|
+
$io->text('Updating TER extension list...');
|
|
36
|
+
|
|
37
|
+
try {
|
|
38
|
+
foreach ($this->remoteRegistry->getListableRemotes() as $remote) {
|
|
39
|
+
$remote->getAvailablePackages(true);
|
|
40
|
+
}
|
|
41
|
+
} catch (ExtensionManagerException $exception) {
|
|
42
|
+
$io->error($exception->getMessage());
|
|
43
|
+
|
|
44
|
+
return Command::FAILURE;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
$io->success('TER extension list successfully updated.');
|
|
48
|
+
|
|
49
|
+
return Command::SUCCESS;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "rafu1987/razorbootstrap",
|
|
3
|
+
"type": "typo3-cms-extension",
|
|
4
|
+
"description": "Temporary Razor installation bootstrap",
|
|
5
|
+
"license": "GPL-2.0-or-later",
|
|
6
|
+
"require": {
|
|
7
|
+
"typo3/cms-core": "^14.3",
|
|
8
|
+
"typo3/cms-extensionmanager": "^14.3"
|
|
9
|
+
},
|
|
10
|
+
"autoload": {
|
|
11
|
+
"psr-4": {
|
|
12
|
+
"RZ\\Razorbootstrap\\": "Classes/"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"extra": {
|
|
16
|
+
"typo3/cms": {
|
|
17
|
+
"extension-key": "razorbootstrap",
|
|
18
|
+
"version": "14.3.0",
|
|
19
|
+
"Package": {
|
|
20
|
+
"providesPackages": {}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|