generator-razor 14.0.46 → 14.0.48

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
@@ -102,11 +102,11 @@ export default class extends Generator {
102
102
  message: 'New database name? A new database, username and password will be created.',
103
103
  default: 'newproject',
104
104
  validate: value => {
105
- if (/^[a-zA-Z0-9_]+$/.test(value)) {
105
+ if (/^[a-zA-Z0-9_-]+$/.test(value)) {
106
106
  return true
107
107
  }
108
108
 
109
- return 'Use only letters, numbers and underscores.'
109
+ return 'Use only letters, numbers, underscores and hyphens.'
110
110
  }
111
111
  }, {
112
112
  type: 'input',
@@ -366,7 +366,6 @@ export default class extends Generator {
366
366
  )
367
367
 
368
368
  await this._writeSystemSettings()
369
- await this._writeLocalSettings()
370
369
  await this._createDatabaseAndImportSql()
371
370
  await this._setRazorConfig()
372
371
  }
@@ -1035,55 +1034,6 @@ export default class extends Generator {
1035
1034
  )
1036
1035
  }
1037
1036
 
1038
- async _writeLocalSettings () {
1039
- const localSettingsPath = this.destinationPath(
1040
- 'typo3conf/system/local.php'
1041
- )
1042
-
1043
- if (this.props.Transport !== 'smtp') {
1044
- await fs.remove(localSettingsPath)
1045
- return
1046
- }
1047
-
1048
- let content = await fs.readFile(
1049
- localSettingsPath,
1050
- 'utf8'
1051
- )
1052
-
1053
- let encryptionMarker = '###SMTP_ENCRYPT###'
1054
-
1055
- if (
1056
- this.props.Encrypt === true ||
1057
- this.props.Encrypt === false
1058
- ) {
1059
- encryptionMarker = "'###SMTP_ENCRYPT###'"
1060
- }
1061
-
1062
- const replacements = [
1063
- ['###TRANSPORT###', this.props.Transport],
1064
- [encryptionMarker, this.props.Encrypt],
1065
- ['###SMTP_PASS###', this.props.SmtpPass ?? ''],
1066
- ['###SMTP_SERVER###', this.props.SmtpServer ?? ''],
1067
- ['###SMTP_USER###', this.props.SmtpUser ?? ''],
1068
- ['###SMTP_EMAIL###', this.props.SmtpEmail ?? ''],
1069
- ['###SMTP_NAME###', this.props.SmtpName ?? '']
1070
- ]
1071
-
1072
- for (const [marker, value] of replacements) {
1073
- content = this._substituteMarker(
1074
- content,
1075
- marker,
1076
- value
1077
- )
1078
- }
1079
-
1080
- await fs.writeFile(
1081
- localSettingsPath,
1082
- content,
1083
- 'utf8'
1084
- )
1085
- }
1086
-
1087
1037
  async _createDatabaseAndImportSql () {
1088
1038
  const databaseName = this.props.DbNew.toLowerCase()
1089
1039
 
@@ -1201,7 +1151,13 @@ export default class extends Generator {
1201
1151
  fontawesome: this.props.FontAwesome,
1202
1152
  cols: this.props.Cols,
1203
1153
  htaccess: this.props.Htaccess,
1204
- smtpemail: this.props.SmtpEmail ?? '',
1154
+ smtpTransport: this.props.Transport ?? '',
1155
+ smtpEncrypt: this.props.Encrypt === true ? 1 : 0,
1156
+ smtpServer: this.props.SmtpServer ?? '',
1157
+ smtpUser: this.props.SmtpUser ?? '',
1158
+ smtpPass: this.props.SmtpPass ?? '',
1159
+ smtpEmail: this.props.SmtpEmail ?? '',
1160
+ smtpName: this.props.SmtpName ?? '',
1205
1161
  search: this.props.Search,
1206
1162
  ssl: this.props.SSL
1207
1163
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "generator-razor",
3
- "version": "14.0.46",
3
+ "version": "14.0.48",
4
4
  "description": "Yeoman generator for razor TYPO3 distribution",
5
5
  "license": "MIT",
6
6
  "main": "app/index.js",
@@ -1,9 +0,0 @@
1
- <?php
2
-
3
- $GLOBALS['TYPO3_CONF_VARS']['MAIL']['transport'] = '###TRANSPORT###';
4
- $GLOBALS['TYPO3_CONF_VARS']['MAIL']['transport_smtp_encrypt'] = '###SMTP_ENCRYPT###';
5
- $GLOBALS['TYPO3_CONF_VARS']['MAIL']['transport_smtp_password'] = '###SMTP_PASS###';
6
- $GLOBALS['TYPO3_CONF_VARS']['MAIL']['transport_smtp_server'] = '###SMTP_SERVER###';
7
- $GLOBALS['TYPO3_CONF_VARS']['MAIL']['transport_smtp_username'] = '###SMTP_USER###';
8
- $GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromAddress'] = '###SMTP_EMAIL###';
9
- $GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromName'] = '###SMTP_NAME###';