generator-razor 13.4.12 → 13.4.134
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 +26 -14
- package/package.json +1 -1
package/app/index.js
CHANGED
|
@@ -11,6 +11,7 @@ const argon2 = require('argon2')
|
|
|
11
11
|
const copydir = require('copy-dir')
|
|
12
12
|
const crypto = require('crypto')
|
|
13
13
|
const remote = require('yeoman-remote')
|
|
14
|
+
const path = require('path')
|
|
14
15
|
|
|
15
16
|
let rzr
|
|
16
17
|
|
|
@@ -285,7 +286,7 @@ module.exports = class extends Generator {
|
|
|
285
286
|
writing () {
|
|
286
287
|
const t = this
|
|
287
288
|
rzr = this.props
|
|
288
|
-
const
|
|
289
|
+
const srcPath = rzr.SrcPath + '/typo3_src-' + rzr.Version
|
|
289
290
|
|
|
290
291
|
// Version
|
|
291
292
|
let version = '124'
|
|
@@ -295,28 +296,23 @@ module.exports = class extends Generator {
|
|
|
295
296
|
version = '143'
|
|
296
297
|
}
|
|
297
298
|
|
|
298
|
-
this._createSymlinks(this,
|
|
299
|
-
|
|
299
|
+
this._createSymlinks(this, srcPath, () => {
|
|
300
|
+
const destination = t.destinationPath('./')
|
|
301
|
+
|
|
302
|
+
copydir(t.templatePath(version), destination, () => {
|
|
300
303
|
t._localconf(t)
|
|
301
304
|
t._localSettings(t)
|
|
302
305
|
|
|
303
306
|
const writableDirectories = [
|
|
304
307
|
'fileadmin',
|
|
305
|
-
'fileadmin/user_upload',
|
|
306
|
-
'fileadmin/_processed_',
|
|
307
|
-
'fileadmin/_recycler_',
|
|
308
|
-
'fileadmin/_temp_',
|
|
309
308
|
'typo3temp',
|
|
310
|
-
'typo3conf'
|
|
311
|
-
'typo3conf/ext'
|
|
309
|
+
'typo3conf'
|
|
312
310
|
]
|
|
313
311
|
|
|
314
312
|
writableDirectories.forEach((directory) => {
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
fs.chmodSync(directoryPath, 0o2775)
|
|
319
|
-
}
|
|
313
|
+
t.chmodDirectoriesRecursive(
|
|
314
|
+
path.join(destination, directory)
|
|
315
|
+
)
|
|
320
316
|
})
|
|
321
317
|
|
|
322
318
|
t._createDb((response) => {
|
|
@@ -328,6 +324,22 @@ module.exports = class extends Generator {
|
|
|
328
324
|
})
|
|
329
325
|
}
|
|
330
326
|
|
|
327
|
+
chmodDirectoriesRecursive (directory) {
|
|
328
|
+
if (!fs.existsSync(directory)) {
|
|
329
|
+
return
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
fs.chmodSync(directory, 0o2775)
|
|
333
|
+
|
|
334
|
+
fs.readdirSync(directory, { withFileTypes: true }).forEach((entry) => {
|
|
335
|
+
if (entry.isDirectory()) {
|
|
336
|
+
this.chmodDirectoriesRecursive(
|
|
337
|
+
path.join(directory, entry.name)
|
|
338
|
+
)
|
|
339
|
+
}
|
|
340
|
+
})
|
|
341
|
+
}
|
|
342
|
+
|
|
331
343
|
install () {
|
|
332
344
|
rzr = this.props
|
|
333
345
|
|