generator-razor 3.1.3 → 3.2.1
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 +28 -18
- 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
|
|
@@ -262,16 +262,15 @@ module.exports = class extends Generator {
|
|
|
262
262
|
}],
|
|
263
263
|
store: true
|
|
264
264
|
}, {
|
|
265
|
-
when: answers => answers.Version.indexOf('9.5') !== -1 || answers.Version.indexOf('10.4') !== -1,
|
|
266
265
|
type: 'list',
|
|
267
266
|
name: 'Cols',
|
|
268
|
-
message: 'Bootstrap
|
|
267
|
+
message: 'Bootstrap columns?',
|
|
269
268
|
choices: [{
|
|
270
|
-
name: '12',
|
|
271
|
-
value: 12
|
|
272
|
-
}, {
|
|
273
269
|
name: '24',
|
|
274
270
|
value: 24
|
|
271
|
+
}, {
|
|
272
|
+
name: '12',
|
|
273
|
+
value: 12
|
|
275
274
|
}],
|
|
276
275
|
store: true
|
|
277
276
|
}]
|
|
@@ -292,6 +291,8 @@ module.exports = class extends Generator {
|
|
|
292
291
|
let version = '104'
|
|
293
292
|
if (rzr.Version.indexOf('9.5') !== -1) {
|
|
294
293
|
version = '95'
|
|
294
|
+
} else if (rzr.Version.indexOf('11.5') !== -1) {
|
|
295
|
+
version = '115'
|
|
295
296
|
}
|
|
296
297
|
|
|
297
298
|
this._createSymlinks(this, path, () => {
|
|
@@ -315,6 +316,8 @@ module.exports = class extends Generator {
|
|
|
315
316
|
let branch = 'razor10'
|
|
316
317
|
if (rzr.Version.indexOf('9.5') !== -1) {
|
|
317
318
|
branch = 'razor9'
|
|
319
|
+
} else if (rzr.Version.indexOf('11.5') !== -1) {
|
|
320
|
+
branch = 'razor11'
|
|
318
321
|
}
|
|
319
322
|
|
|
320
323
|
// yarn settings
|
|
@@ -330,6 +333,11 @@ module.exports = class extends Generator {
|
|
|
330
333
|
// Delete package.json and .yarn-integrity files when finished
|
|
331
334
|
fs.unlink('package.json', () => {})
|
|
332
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
|
+
}
|
|
333
341
|
}
|
|
334
342
|
|
|
335
343
|
_getSrc (t, url, callback) {
|
|
@@ -341,16 +349,17 @@ module.exports = class extends Generator {
|
|
|
341
349
|
if (!error && response.statusCode === 200) {
|
|
342
350
|
const releases9 = body['9']['releases']
|
|
343
351
|
const releases10 = body['10']['releases']
|
|
352
|
+
const releases11 = body['11']['releases']
|
|
344
353
|
|
|
345
|
-
const releasesObj = t._mergeOptions(releases10, releases9)
|
|
354
|
+
const releasesObj = t._mergeOptions(releases11, releases10, releases9)
|
|
346
355
|
|
|
347
356
|
const keys = Object.keys(releasesObj)
|
|
348
357
|
const len = keys.length
|
|
349
358
|
const arr = []
|
|
350
359
|
|
|
351
|
-
// Filter out only 10.4.x, 9.5.x
|
|
360
|
+
// Filter out only 11.5.x 10.4.x, 9.5.x
|
|
352
361
|
for (let i = 0; i < len; i++) {
|
|
353
|
-
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) {
|
|
354
363
|
arr.push({
|
|
355
364
|
name: keys[i],
|
|
356
365
|
value: keys[i]
|
|
@@ -363,13 +372,14 @@ module.exports = class extends Generator {
|
|
|
363
372
|
})
|
|
364
373
|
}
|
|
365
374
|
|
|
366
|
-
_mergeOptions (obj1, obj2) {
|
|
367
|
-
const
|
|
375
|
+
_mergeOptions (obj1, obj2, obj3) {
|
|
376
|
+
const obj4 = {}
|
|
368
377
|
|
|
369
|
-
for (let attrname in obj1) {
|
|
370
|
-
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] }
|
|
371
381
|
|
|
372
|
-
return
|
|
382
|
+
return obj4
|
|
373
383
|
}
|
|
374
384
|
|
|
375
385
|
_createSymlinks (t, path, callback) {
|