generator-razor 14.0.15 → 14.0.17

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
@@ -21,8 +21,8 @@ export default class extends Generator {
21
21
  }
22
22
 
23
23
  async prompting () {
24
- const orange = chalk.hex('#ff8700').bold
25
- const petrol = chalk.hex('#006792')
24
+ const orange = chalk.ansi256(208)
25
+ const petrol = chalk.ansi256(24)
26
26
 
27
27
  this.log(orange(`
28
28
  ██████╗ █████╗ ███████╗ ██████╗ ██████╗
@@ -399,9 +399,10 @@ export default class extends Generator {
399
399
  }
400
400
 
401
401
  await this._fixProjectGroup()
402
+ await this._fixWritableDirectoryPermissions()
402
403
 
403
- const orange = chalk.hex('#ff8700').bold
404
- const petrol = chalk.hex('#006792')
404
+ const orange = chalk.ansi256(208)
405
+ const petrol = chalk.ansi256(24)
405
406
 
406
407
  this.log(orange(`
407
408
  ██████╗ ██████╗ ███╗ ██╗███████╗
@@ -453,6 +454,40 @@ export default class extends Generator {
453
454
  await processPath(destination)
454
455
  }
455
456
 
457
+ async _fixWritableDirectoryPermissions() {
458
+ const writableDirectories = [
459
+ 'fileadmin',
460
+ 'typo3temp',
461
+ 'typo3conf'
462
+ ]
463
+
464
+ for (const directory of writableDirectories) {
465
+ await this._chmodDirectoriesRecursive(
466
+ this.destinationPath(directory)
467
+ )
468
+ }
469
+ }
470
+
471
+ async _chmodDirectoriesRecursive(directory) {
472
+ if (!await fs.pathExists(directory)) {
473
+ return
474
+ }
475
+
476
+ await fs.chmod(directory, 0o2775)
477
+
478
+ const entries = await fs.readdir(directory, {
479
+ withFileTypes: true
480
+ })
481
+
482
+ for (const entry of entries) {
483
+ if (entry.isDirectory()) {
484
+ await this._chmodDirectoriesRecursive(
485
+ path.join(directory, entry.name)
486
+ )
487
+ }
488
+ }
489
+ }
490
+
456
491
  async _getTypo3Releases () {
457
492
  const url = 'https://get.typo3.org/json'
458
493
 
@@ -748,12 +783,11 @@ export default class extends Generator {
748
783
  encryptionKey
749
784
  )
750
785
 
751
- const passwordHash = await argon2.hash(
752
- this.props.Pass,
753
- {
754
- type: argon2.argon2i
755
- }
756
- )
786
+ const passwordHash = await argon2.hash(this.props.Pass, {
787
+ type: this._getTemplateVersion() === '143'
788
+ ? argon2.argon2id
789
+ : argon2.argon2i
790
+ })
757
791
 
758
792
  content = this._substituteMarker(
759
793
  content,
@@ -887,12 +921,11 @@ export default class extends Generator {
887
921
  this.props.User
888
922
  )
889
923
 
890
- const passwordHash = await argon2.hash(
891
- this.props.Pass,
892
- {
893
- type: argon2.argon2i
894
- }
895
- )
924
+ const passwordHash = await argon2.hash(this.props.Pass, {
925
+ type: this._getTemplateVersion() === '143'
926
+ ? argon2.argon2id
927
+ : argon2.argon2i
928
+ })
896
929
 
897
930
  sql = this._substituteMarker(
898
931
  sql,
@@ -110,8 +110,8 @@ return [
110
110
  'unifiedPageTranslationHandling' => true,
111
111
  'yamlImportsFollowDeclarationOrder' => true,
112
112
  ],
113
- 'fileCreateMask' => 0664,
114
- 'folderCreateMask' => 2775,
113
+ 'fileCreateMask' => '0664',
114
+ 'folderCreateMask' => '2775',
115
115
  'sitename' => '###PROJECTNAME###',
116
116
  'systemMaintainers' => [
117
117
  1,
@@ -110,8 +110,8 @@ return [
110
110
  'unifiedPageTranslationHandling' => true,
111
111
  'yamlImportsFollowDeclarationOrder' => true,
112
112
  ],
113
- 'fileCreateMask' => 0664,
114
- 'folderCreateMask' => 2775,
113
+ 'fileCreateMask' => '0664',
114
+ 'folderCreateMask' => '2775',
115
115
  'sitename' => '###PROJECTNAME###',
116
116
  'systemMaintainers' => [
117
117
  1,
@@ -109,8 +109,8 @@ return [
109
109
  'unifiedPageTranslationHandling' => true,
110
110
  'yamlImportsFollowDeclarationOrder' => true,
111
111
  ],
112
- 'fileCreateMask' => 0664,
113
- 'folderCreateMask' => 2775,
112
+ 'fileCreateMask' => '0664',
113
+ 'folderCreateMask' => '2775',
114
114
  'sitename' => '###PROJECTNAME###',
115
115
  'systemMaintainers' => [
116
116
  1,
@@ -5,7 +5,7 @@ return [
5
5
  'explicitADmode' => 'explicitAllow',
6
6
  'installToolPassword' => '###PASS###',
7
7
  'passwordHashing' => [
8
- 'className' => 'TYPO3\\CMS\\Core\\Crypto\\PasswordHashing\\Argon2iPasswordHash',
8
+ 'className' => 'TYPO3\\CMS\\Core\\Crypto\\PasswordHashing\\Argon2idPasswordHash',
9
9
  'options' => [],
10
10
  ],
11
11
  ],
@@ -44,7 +44,7 @@ return [
44
44
  'debug' => false,
45
45
  'disableNoCacheParameter' => true,
46
46
  'passwordHashing' => [
47
- 'className' => 'TYPO3\\CMS\\Core\\Crypto\\PasswordHashing\\Argon2iPasswordHash',
47
+ 'className' => 'TYPO3\\CMS\\Core\\Crypto\\PasswordHashing\\Argon2idPasswordHash',
48
48
  'options' => [],
49
49
  ],
50
50
  ],
@@ -109,8 +109,8 @@ return [
109
109
  'unifiedPageTranslationHandling' => true,
110
110
  'yamlImportsFollowDeclarationOrder' => true,
111
111
  ],
112
- 'fileCreateMask' => 0664,
113
- 'folderCreateMask' => 2775,
112
+ 'fileCreateMask' => '0664',
113
+ 'folderCreateMask' => '2775',
114
114
  'sitename' => '###PROJECTNAME###',
115
115
  'systemMaintainers' => [
116
116
  1,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "generator-razor",
3
- "version": "14.0.15",
3
+ "version": "14.0.17",
4
4
  "description": "Yeoman generator for razor TYPO3 distribution",
5
5
  "license": "MIT",
6
6
  "main": "app/index.js",