generator-razor 13.4.8 → 13.4.10

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.
Files changed (2) hide show
  1. package/app/index.js +7 -65
  2. package/package.json +1 -1
package/app/index.js CHANGED
@@ -297,13 +297,8 @@ module.exports = class extends Generator {
297
297
 
298
298
  this._createSymlinks(this, path, () => {
299
299
  copydir(t.templatePath(version), t.destinationPath('./'), () => {
300
- if (version === '124' || version === '134') {
301
- t._localconf12(t)
302
- t._local12Settings(t)
303
- } else {
304
- t._localconf(t)
305
- t._localSettings(t)
306
- }
300
+ t._localconf12(t)
301
+ t._localSettings(t)
307
302
 
308
303
  t._createDb((response) => {
309
304
  t._processSqlFile(t, response, () => {
@@ -339,8 +334,8 @@ module.exports = class extends Generator {
339
334
  fs.unlink('package.json', () => {})
340
335
  fs.unlink('typo3conf/ext/.yarn-integrity', () => {})
341
336
 
342
- // Copy razor extensions after install to typo3conf/ext/, starting with TYPO3 >= 11.5.x
343
- if (rzr.Version.indexOf('11.5') !== -1 || rzr.Version.indexOf('12.4') !== -1 || rzr.Version.indexOf('13.4') !== -1) {
337
+ // Copy razor extensions after install to typo3conf/ext/, starting with TYPO3 >= 12.4.x
338
+ if (rzr.Version.indexOf('12.4') !== -1 || rzr.Version.indexOf('13.4') !== -1 || rzr.Version.indexOf('14.3') !== -1) {
344
339
  fs.copy('typo3conf/ext/razor/Initialisation/Extensions', 'typo3conf/ext')
345
340
  }
346
341
  }
@@ -352,11 +347,11 @@ module.exports = class extends Generator {
352
347
  json: true
353
348
  }, (error, response, body) => {
354
349
  if (!error && response.statusCode === 200) {
355
- const releases11 = body['11']['releases']
356
350
  const releases12 = body['12']['releases']
357
351
  const releases13 = body['13']['releases']
352
+ const releases14 = body['14']['releases']
358
353
 
359
- const releasesObj = t._mergeOptions(releases13, releases12, releases11)
354
+ const releasesObj = t._mergeOptions(releases14, releases13, releases12)
360
355
 
361
356
  const keys = Object.keys(releasesObj)
362
357
  const len = keys.length
@@ -402,28 +397,6 @@ module.exports = class extends Generator {
402
397
  }
403
398
 
404
399
  _localconf (t) {
405
- fs.readFile('typo3conf/LocalConfiguration.php', 'utf8', (err, content) => {
406
- let newContent = t._substituteMarker(content, '###DBNEW###', rzr.DbNew.toLowerCase(), true)
407
- newContent = t._substituteMarker(newContent, '###HOST###', rzr.DbHostname, true)
408
- newContent = t._substituteMarker(newContent, '###PROJECTNAME###', rzr.ProjectName, true)
409
-
410
- const encryptionKey = crypto.randomBytes((96 + 1) / 2).toString('hex')
411
- newContent = t._substituteMarker(newContent, '###ENCRYPTION_KEY###', encryptionKey, true)
412
-
413
- const hash = argon2.hash(rzr.Pass)
414
- hash.then(function (res) {
415
- newContent = t._substituteMarker(newContent, '###PASS###', res, true)
416
-
417
- t._localconfWrite(newContent)
418
- })
419
-
420
- if (err) {
421
- console.error('error setting LocalConfiguration.php')
422
- }
423
- })
424
- }
425
-
426
- _localconf12 (t) {
427
400
  fs.readFile('typo3conf/system/settings.php', 'utf8', (err, content) => {
428
401
  let newContent = t._substituteMarker(content, '###DBNEW###', rzr.DbNew.toLowerCase(), true)
429
402
  newContent = t._substituteMarker(newContent, '###HOST###', rzr.DbHostname, true)
@@ -436,7 +409,7 @@ module.exports = class extends Generator {
436
409
  hash.then(function (res) {
437
410
  newContent = t._substituteMarker(newContent, '###PASS###', res, true)
438
411
 
439
- t._localconfWrite12(newContent)
412
+ t._localconfWrite(newContent)
440
413
  })
441
414
 
442
415
  if (err) {
@@ -446,41 +419,10 @@ module.exports = class extends Generator {
446
419
  }
447
420
 
448
421
  _localconfWrite (content) {
449
- fs.writeFile('typo3conf/LocalConfiguration.php', content, 'utf8', () => {})
450
- }
451
-
452
- _localconfWrite12 (content) {
453
422
  fs.writeFile('typo3conf/system/settings.php', content, 'utf8', () => {})
454
423
  }
455
424
 
456
425
  _localSettings (t) {
457
- if (rzr.Transport === 'smtp') {
458
- let encryptVariable = '###SMTP_ENCRYPT###'
459
- if (rzr.Encrypt === true || rzr.Encrypt === false) {
460
- encryptVariable = "'###SMTP_ENCRYPT###'"
461
- }
462
-
463
- fs.readFile('typo3conf/Local.php', 'utf8', (err, content) => {
464
- let newContent = t._substituteMarker(content, '###TRANSPORT###', rzr.Transport, true)
465
- newContent = t._substituteMarker(newContent, encryptVariable, rzr.Encrypt, true)
466
- newContent = t._substituteMarker(newContent, '###SMTP_PASS###', rzr.SmtpPass, true)
467
- newContent = t._substituteMarker(newContent, '###SMTP_SERVER###', rzr.SmtpServer, true)
468
- newContent = t._substituteMarker(newContent, '###SMTP_USER###', rzr.SmtpUser, true)
469
- newContent = t._substituteMarker(newContent, '###SMTP_EMAIL###', rzr.SmtpEmail, true)
470
- newContent = t._substituteMarker(newContent, '###SMTP_NAME###', rzr.SmtpName, true)
471
-
472
- fs.writeFile('typo3conf/Local.php', newContent, 'utf8', () => {})
473
-
474
- if (err) {
475
- console.error('error setting local settings')
476
- }
477
- })
478
- } else {
479
- fs.unlink('typo3conf/Local.php', () => {})
480
- }
481
- }
482
-
483
- _local12Settings (t) {
484
426
  if (rzr.Transport === 'smtp') {
485
427
  let encryptVariable = '###SMTP_ENCRYPT###'
486
428
  if (rzr.Encrypt === true || rzr.Encrypt === false) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "generator-razor",
3
- "version": "13.4.8",
3
+ "version": "13.4.10",
4
4
  "description": "Yeoman generator for razor TYPO3 distribution",
5
5
  "license": "MIT",
6
6
  "main": "app/index.js",