generator-razor 3.1.2 → 3.2.0
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 +31 -20
- package/app/templates/104/typo3conf/LocalConfiguration.php +1 -0
- package/app/templates/115/_.htaccess-dev +679 -0
- package/app/templates/115/_.htaccess-dev-ssl +679 -0
- package/app/templates/115/db.sql +1833 -0
- package/app/templates/115/fileadmin/.htaccess +4 -0
- package/app/templates/115/fileadmin/_temp_/.htaccess +15 -0
- package/app/templates/115/fileadmin/_temp_/index.html +7 -0
- package/app/templates/115/fileadmin/user_upload/.htaccess +33 -0
- package/app/templates/115/fileadmin/user_upload/_temp_/importexport/.htaccess +15 -0
- package/app/templates/115/fileadmin/user_upload/_temp_/importexport/index.html +7 -0
- package/app/templates/115/fileadmin/user_upload/_temp_/index.html +0 -0
- package/app/templates/115/fileadmin/user_upload/index.html +0 -0
- package/app/templates/115/typo3conf/Local.php +9 -0
- package/app/templates/115/typo3conf/LocalConfiguration.php +118 -0
- package/app/templates/115/typo3conf/PackageStates.php +91 -0
- package/app/templates/115/typo3temp/index.html +0 -0
- package/app/templates/115/typo3temp/var/.htaccess +15 -0
- package/app/templates/115/typo3temp/var/log/.htaccess +13 -0
- package/package.json +2 -1
- package/app/templates/95/uploads/.DS_Store +0 -0
package/app/index.js
CHANGED
|
@@ -4,7 +4,7 @@ const chalk = require('chalk')
|
|
|
4
4
|
const yosay = require('yosay')
|
|
5
5
|
const link = require('fs-symlink')
|
|
6
6
|
const mysql = require('mysql')
|
|
7
|
-
const fs = require('fs')
|
|
7
|
+
const fs = require('fs-extra')
|
|
8
8
|
const pathExists = require('path-exists')
|
|
9
9
|
const request = require('request')
|
|
10
10
|
const argon2 = require('argon2')
|
|
@@ -119,16 +119,16 @@ module.exports = class extends Generator {
|
|
|
119
119
|
message: 'SMTP encrypt?',
|
|
120
120
|
default: true,
|
|
121
121
|
choices: [{
|
|
122
|
-
name: 'true (TYPO3 10 - if port 465 or other)',
|
|
122
|
+
name: 'true (TYPO3 >= 10 - if port 465 or other)',
|
|
123
123
|
value: true
|
|
124
124
|
}, {
|
|
125
|
-
name: 'false (TYPO3 10 - if port 587)',
|
|
125
|
+
name: 'false (TYPO3 >= 10 - if port 587)',
|
|
126
126
|
value: false
|
|
127
127
|
}, {
|
|
128
|
-
name: 'ssl (TYPO3 9)',
|
|
128
|
+
name: 'ssl (TYPO3 9.5.x)',
|
|
129
129
|
value: 'ssl'
|
|
130
130
|
}, {
|
|
131
|
-
name: 'tls (TYPO3 9)',
|
|
131
|
+
name: 'tls (TYPO3 9.5.x)',
|
|
132
132
|
value: 'tls'
|
|
133
133
|
}],
|
|
134
134
|
store: true
|
|
@@ -252,25 +252,25 @@ module.exports = class extends Generator {
|
|
|
252
252
|
}, {
|
|
253
253
|
type: 'list',
|
|
254
254
|
name: 'SSL',
|
|
255
|
-
message: 'Activate SSL?',
|
|
255
|
+
message: 'Activate SSL/https for dev?',
|
|
256
256
|
choices: [{
|
|
257
257
|
name: 'Yes',
|
|
258
258
|
value: true
|
|
259
259
|
}, {
|
|
260
260
|
name: 'No',
|
|
261
261
|
value: false
|
|
262
|
-
}]
|
|
262
|
+
}],
|
|
263
|
+
store: true
|
|
263
264
|
}, {
|
|
264
|
-
when: answers => answers.Version.indexOf('9.5') !== -1 || answers.Version.indexOf('10.4') !== -1,
|
|
265
265
|
type: 'list',
|
|
266
266
|
name: 'Cols',
|
|
267
|
-
message: 'Bootstrap
|
|
267
|
+
message: 'Bootstrap columns?',
|
|
268
268
|
choices: [{
|
|
269
|
-
name: '12',
|
|
270
|
-
value: 12
|
|
271
|
-
}, {
|
|
272
269
|
name: '24',
|
|
273
270
|
value: 24
|
|
271
|
+
}, {
|
|
272
|
+
name: '12',
|
|
273
|
+
value: 12
|
|
274
274
|
}],
|
|
275
275
|
store: true
|
|
276
276
|
}]
|
|
@@ -291,6 +291,8 @@ module.exports = class extends Generator {
|
|
|
291
291
|
let version = '104'
|
|
292
292
|
if (rzr.Version.indexOf('9.5') !== -1) {
|
|
293
293
|
version = '95'
|
|
294
|
+
} else if (rzr.Version.indexOf('11.5') !== -1) {
|
|
295
|
+
version = '115'
|
|
294
296
|
}
|
|
295
297
|
|
|
296
298
|
this._createSymlinks(this, path, () => {
|
|
@@ -314,6 +316,8 @@ module.exports = class extends Generator {
|
|
|
314
316
|
let branch = 'razor10'
|
|
315
317
|
if (rzr.Version.indexOf('9.5') !== -1) {
|
|
316
318
|
branch = 'razor9'
|
|
319
|
+
} else if (rzr.Version.indexOf('11.5') !== -1) {
|
|
320
|
+
branch = 'razor11'
|
|
317
321
|
}
|
|
318
322
|
|
|
319
323
|
// yarn settings
|
|
@@ -329,6 +333,11 @@ module.exports = class extends Generator {
|
|
|
329
333
|
// Delete package.json and .yarn-integrity files when finished
|
|
330
334
|
fs.unlink('package.json', () => {})
|
|
331
335
|
fs.unlink('typo3conf/ext/.yarn-integrity', () => {})
|
|
336
|
+
|
|
337
|
+
// Copy razor extensions after install to typo3conf/ext/, starting with TYPO3 >= 11.5.x
|
|
338
|
+
if (rzr.Version.indexOf('11.5') !== -1) {
|
|
339
|
+
fs.copy('typo3conf/ext/razor/Initialisation/Extensions', 'typo3conf/ext')
|
|
340
|
+
}
|
|
332
341
|
}
|
|
333
342
|
|
|
334
343
|
_getSrc (t, url, callback) {
|
|
@@ -340,16 +349,17 @@ module.exports = class extends Generator {
|
|
|
340
349
|
if (!error && response.statusCode === 200) {
|
|
341
350
|
const releases9 = body['9']['releases']
|
|
342
351
|
const releases10 = body['10']['releases']
|
|
352
|
+
const releases11 = body['11']['releases']
|
|
343
353
|
|
|
344
|
-
const releasesObj = t._mergeOptions(releases10, releases9)
|
|
354
|
+
const releasesObj = t._mergeOptions(releases10, releases11, releases9)
|
|
345
355
|
|
|
346
356
|
const keys = Object.keys(releasesObj)
|
|
347
357
|
const len = keys.length
|
|
348
358
|
const arr = []
|
|
349
359
|
|
|
350
|
-
// Filter out only 10.4.x, 9.5.x
|
|
360
|
+
// Filter out only 11.5.x 10.4.x, 9.5.x
|
|
351
361
|
for (let i = 0; i < len; i++) {
|
|
352
|
-
if (keys[i].indexOf('9.5.') !== -1 || keys[i].indexOf('10.4.') !== -1) {
|
|
362
|
+
if (keys[i].indexOf('9.5.') !== -1 || keys[i].indexOf('10.4.') !== -1 || keys[i].indexOf('11.5.') !== -1) {
|
|
353
363
|
arr.push({
|
|
354
364
|
name: keys[i],
|
|
355
365
|
value: keys[i]
|
|
@@ -362,13 +372,14 @@ module.exports = class extends Generator {
|
|
|
362
372
|
})
|
|
363
373
|
}
|
|
364
374
|
|
|
365
|
-
_mergeOptions (obj1, obj2) {
|
|
366
|
-
const
|
|
375
|
+
_mergeOptions (obj1, obj2, obj3) {
|
|
376
|
+
const obj4 = {}
|
|
367
377
|
|
|
368
|
-
for (let attrname in obj1) {
|
|
369
|
-
for (let attrname in obj2) {
|
|
378
|
+
for (let attrname in obj1) { obj4[attrname] = obj1[attrname] }
|
|
379
|
+
for (let attrname in obj2) { obj4[attrname] = obj2[attrname] }
|
|
380
|
+
for (let attrname in obj3) { obj4[attrname] = obj3[attrname] }
|
|
370
381
|
|
|
371
|
-
return
|
|
382
|
+
return obj4
|
|
372
383
|
}
|
|
373
384
|
|
|
374
385
|
_createSymlinks (t, path, callback) {
|