generator-razor 14.0.33 → 14.0.35

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
@@ -425,6 +425,50 @@ export default class extends Generator {
425
425
  }
426
426
  }
427
427
 
428
+ /*
429
+ * Restore temporary extensions from generator templates.
430
+ *
431
+ * They are copied here because Yarn and Razor's
432
+ * Initialisation/Extensions may have modified typo3conf/ext.
433
+ */
434
+ const templateVersion = this._getTemplateVersion()
435
+
436
+ const temporaryExtensions = [
437
+ 'razorkickstart',
438
+ 'razorbootstrap'
439
+ ]
440
+
441
+ for (const extension of temporaryExtensions) {
442
+ const source = this.templatePath(
443
+ templateVersion,
444
+ `typo3conf/ext/${extension}`
445
+ )
446
+
447
+ const destination = this.destinationPath(
448
+ `typo3conf/ext/${extension}`
449
+ )
450
+
451
+ await fs.remove(destination)
452
+
453
+ await fs.copy(
454
+ source,
455
+ destination,
456
+ {
457
+ overwrite: true,
458
+ errorOnExist: false,
459
+ dereference: false
460
+ }
461
+ )
462
+
463
+ if (!await fs.pathExists(
464
+ path.join(destination, 'composer.json')
465
+ )) {
466
+ throw new Error(
467
+ `${extension} was not copied from the generator template.`
468
+ )
469
+ }
470
+ }
471
+
428
472
  await this._fixProjectGroup()
429
473
  await this._fixWritableDirectoryPermissions()
430
474
 
@@ -432,99 +476,121 @@ export default class extends Generator {
432
476
  'typo3/sysext/core/bin/typo3'
433
477
  )
434
478
 
435
- const cwd = this.destinationRoot()
436
-
437
- this.log('→ Activating razor bootstrap...')
479
+ /*
480
+ * Razor Kickstart
481
+ *
482
+ * This extension has no external dependencies and only exists
483
+ * to make the TER update command available.
484
+ */
485
+ this.log('→ Activating Razor kickstart...')
438
486
 
439
- this.spawnSync(
487
+ await this._runCommand(
440
488
  typo3,
441
- ['extension:activate', 'razorbootstrap'],
442
- {
443
- cwd,
444
- stdio: 'inherit'
445
- }
489
+ ['extension:activate', 'razorkickstart']
446
490
  )
447
491
 
448
492
  this.log('→ Updating TER extension list...')
449
493
 
450
- this.spawnSync(
494
+ await this._runCommand(
451
495
  typo3,
452
- ['razorbootstrap:ter:update'],
453
- {
454
- cwd,
455
- stdio: 'inherit'
456
- }
496
+ ['razorkickstart:ter:update']
457
497
  )
458
498
 
459
- this.log('→ Removing razor bootstrap...')
499
+ /*
500
+ * Razor Bootstrap
501
+ *
502
+ * Now that the TER extension list is current, TYPO3 can safely
503
+ * resolve and download Razor's dependencies.
504
+ */
505
+ this.log('→ Activating Razor bootstrap...')
460
506
 
461
- this.spawnSync(
507
+ await this._runCommand(
462
508
  typo3,
463
- ['extension:deactivate', 'razorbootstrap'],
464
- {
465
- cwd,
466
- stdio: 'inherit'
467
- }
509
+ ['extension:activate', 'razorbootstrap']
468
510
  )
469
511
 
470
- await fs.remove(
471
- this.destinationPath('typo3conf/ext/razorbootstrap')
512
+ /*
513
+ * Remove temporary extensions.
514
+ */
515
+ this.log('→ Removing Razor bootstrap...')
516
+
517
+ await this._runCommand(
518
+ typo3,
519
+ ['extension:deactivate', 'razorbootstrap']
472
520
  )
473
521
 
522
+ this.log('→ Removing Razor kickstart...')
523
+
524
+ await this._runCommand(
525
+ typo3,
526
+ ['extension:deactivate', 'razorkickstart']
527
+ )
528
+
529
+ for (const extension of temporaryExtensions) {
530
+ await fs.remove(
531
+ this.destinationPath(
532
+ `typo3conf/ext/${extension}`
533
+ )
534
+ )
535
+ }
536
+
537
+ /*
538
+ * Clear stale package / DI caches after removing the
539
+ * temporary extensions.
540
+ */
474
541
  this.log('→ Flushing TYPO3 caches...')
475
542
 
476
543
  await fs.remove(
477
544
  this.destinationPath('typo3temp/var/cache')
478
545
  )
479
546
 
480
- this.spawnSync(
547
+ await this._runCommand(
481
548
  typo3,
482
- ['cache:flush'],
483
- {
484
- cwd,
485
- stdio: 'inherit'
486
- }
549
+ ['cache:flush']
487
550
  )
488
551
 
489
- this.log('→ Activating razor...')
552
+ /*
553
+ * Activate Razor.
554
+ *
555
+ * Razor's InstallService should create razor.sh.
556
+ */
557
+ this.log('→ Activating Razor...')
490
558
 
491
- this.spawnSync(
559
+ await this._runCommand(
492
560
  typo3,
493
- ['extension:activate', 'razor'],
494
- {
495
- cwd,
496
- stdio: 'inherit'
497
- }
561
+ ['extension:activate', 'razor']
498
562
  )
499
563
 
500
- const razorScript = this.destinationPath('razor.sh')
564
+ const razorScript = this.destinationPath(
565
+ 'razor.sh'
566
+ )
501
567
 
502
568
  if (!await fs.pathExists(razorScript)) {
503
569
  throw new Error(
504
- 'razor.sh was not created during razor installation.'
570
+ 'razor.sh was not created during Razor installation.'
505
571
  )
506
572
  }
507
573
 
508
- this.log('→ Starting razor installer...')
574
+ /*
575
+ * Hand over to the Razor installer.
576
+ */
577
+ this.log('→ Starting Razor installer...')
509
578
 
510
- await this.spawnCommand(
579
+ await this._runCommand(
511
580
  'bash',
512
- ['./razor.sh'],
513
- {
514
- cwd: this.destinationRoot()
515
- }
581
+ ['./razor.sh']
516
582
  )
517
583
 
518
584
  const orange = chalk.ansi256(208)
519
585
  const petrol = chalk.ansi256(24)
520
586
 
521
587
  this.log(orange(`
522
- ██████╗ ██████╗ ███╗ ██╗███████╗
523
- ██╔══██╗██╔═══██╗████╗ ██║██╔════╝
524
- ██║ ██║██║ ██║██╔██╗ ██║█████╗
525
- ██║ ██║██║ ██║██║╚██╗██║██╔══╝
526
- ██████╔╝╚██████╔╝██║ ╚████║███████╗
527
- ╚═════╝ ╚═════╝ ╚═╝ ╚═══╝╚══════╝
588
+ ██████╗ ██████╗ ███╗ ██╗███████╗
589
+ ██╔══██╗██╔═══██╗████╗ ██║██╔════╝
590
+ ██║ ██║██║ ██║██╔██╗ ██║█████╗
591
+ ██║ ██║██║ ██║██║╚██╗██║██╔══╝
592
+ ██████╔╝╚██████╔╝██║ ╚████║███████╗
593
+ ╚═════╝ ╚═════╝ ╚═╝ ╚═══╝╚══════╝
528
594
  `))
529
595
 
530
596
  this.log(petrol(
@@ -7,17 +7,19 @@ $EM_CONF[$_EXTKEY] = [
7
7
  'author' => 'Raphael Zschorsch',
8
8
  'author_email' => 'rafu1987@gmail.com',
9
9
  'state' => 'stable',
10
- 'version' => '14.0.0',
10
+ 'version' => '14.3.0',
11
11
  'constraints' => [
12
12
  'depends' => [
13
- 'php' => '8.3.0-8.99.99',
13
+ 'extbase' => '14.3.0-14.99.99',
14
+ 'fluid' => '14.3.0-14.99.99',
14
15
  'typo3' => '14.3.0-14.99.99',
15
- 'razor' => '14.0.0-14.99.99',
16
- 'razorce' => '14.0.0-14.99.99',
17
- 'razornews' => '14.0.0-14.99.99',
18
- 'razormin' => '14.0.0-14.99.99',
19
- 'razorcookieconsent' => '14.0.0-14.99.99',
20
- 'razorsite' => '14.0.0-14.99.99',
16
+ 'php' => '8.2.0-8.5.99',
17
+ 'razor' => '14.3.0-14.99.99',
18
+ 'razorce' => '14.3.0-14.99.99',
19
+ 'razornews' => '14.3.0-14.99.99',
20
+ 'razormin' => '14.3.0-14.99.99',
21
+ 'razorcookieconsent' => '14.3.0-14.99.99',
22
+ 'razorsite' => '14.3.0-14.99.99',
21
23
  ],
22
24
  'conflicts' => [],
23
25
  'suggests' => [],
@@ -15,7 +15,7 @@ declare(strict_types=1);
15
15
  * The TYPO3 project - inspiring people to share!
16
16
  */
17
17
 
18
- namespace RZ\Razorbootstrap\Command;
18
+ namespace RZ\Razorkickstart\Command;
19
19
 
20
20
  use Symfony\Component\Console\Attribute\AsCommand;
21
21
  use Symfony\Component\Console\Command\Command;
@@ -27,7 +27,7 @@ use TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException;
27
27
  use TYPO3\CMS\Extensionmanager\Remote\RemoteRegistry;
28
28
 
29
29
  #[AsCommand(
30
- name: 'razorbootstrap:ter:update',
30
+ name: 'razorkickstart:ter:update',
31
31
  description: 'Updates the TYPO3 Extension Repository extension list'
32
32
  )]
33
33
  #[AsNonSchedulableCommand]
@@ -4,5 +4,5 @@ services:
4
4
  autoconfigure: true
5
5
  public: false
6
6
 
7
- RZ\Razorbootstrap\:
7
+ RZ\Razorkickstart\:
8
8
  resource: '../Classes/*'
@@ -0,0 +1,31 @@
1
+ {
2
+ "name": "rafu1987/razorkickstart",
3
+ "type": "typo3-cms-extension",
4
+ "description": "razor kickstart - razor kickstart",
5
+ "require": {
6
+ "typo3/cms-extbase": "^14.3",
7
+ "typo3/cms-fluid": "^14.3",
8
+ "typo3/cms-core": "^14.3",
9
+ "php": "^8.2 || ^8.5"
10
+ },
11
+ "autoload": {
12
+ "psr-4": {
13
+ "RZ\\Razorkickstart\\": "Classes/"
14
+ }
15
+ },
16
+ "extra": {
17
+ "typo3/cms": {
18
+ "extension-key": "razorkickstart",
19
+ "version": "14.3.0",
20
+ "extra": {
21
+ "typo3/cms": {
22
+ "extension-key": "razor",
23
+ "version": "14.3.0",
24
+ "Package": {
25
+ "providesPackages": {}
26
+ }
27
+ }
28
+ }
29
+ }
30
+ }
31
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "generator-razor",
3
- "version": "14.0.33",
3
+ "version": "14.0.35",
4
4
  "description": "Yeoman generator for razor TYPO3 distribution",
5
5
  "license": "MIT",
6
6
  "main": "app/index.js",
@@ -1 +0,0 @@
1
- <svg viewBox="0 0 150.6 148.7" xmlns="http://www.w3.org/2000/svg"><path d="m118.7 30.4c.2-.3 0-.8-.3-.9-.2-.1-.4-.1-.7 0l-29.6 15.1 2.8 11.1c.5 1.6-.2 3.4-1.8 4.2l-2 1-82.3 41.7c8.9 23 28.5 40.2 52.4 46.1zm-36.5-2.6 32.6-16.6c-35.5-21.8-82-10.8-103.8 24.7-6.3 10.2-10.1 21.7-11 33.7zm11.9 120.7c40.3-10.5 64.5-51.7 54-92-1.6-6.1-4-12.1-7-17.6l-47 109.7z" fill="#f18519"/></svg>