generator-razor 14.0.13 → 14.0.14
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 +32 -47
- package/package.json +1 -1
package/app/index.js
CHANGED
|
@@ -333,9 +333,13 @@ export default class extends Generator {
|
|
|
333
333
|
await this._ensureTypo3Source(sourcePath)
|
|
334
334
|
await this._createSymlinks(sourcePath)
|
|
335
335
|
|
|
336
|
-
await
|
|
336
|
+
await fs.copy(
|
|
337
337
|
this.templatePath(templateVersion),
|
|
338
|
-
this.destinationPath()
|
|
338
|
+
this.destinationPath(),
|
|
339
|
+
{
|
|
340
|
+
overwrite: true,
|
|
341
|
+
errorOnExist: false
|
|
342
|
+
}
|
|
339
343
|
)
|
|
340
344
|
|
|
341
345
|
await this._writeSystemSettings()
|
|
@@ -394,6 +398,8 @@ export default class extends Generator {
|
|
|
394
398
|
}
|
|
395
399
|
}
|
|
396
400
|
|
|
401
|
+
await this._fixProjectGroup()
|
|
402
|
+
|
|
397
403
|
const orange = chalk.hex('#ff8700').bold
|
|
398
404
|
const petrol = chalk.hex('#006792')
|
|
399
405
|
|
|
@@ -411,61 +417,40 @@ export default class extends Generator {
|
|
|
411
417
|
))
|
|
412
418
|
}
|
|
413
419
|
|
|
414
|
-
async
|
|
415
|
-
const
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
await fs.ensureDir(destination)
|
|
420
|
+
async _fixProjectGroup () {
|
|
421
|
+
const destination = this.destinationPath()
|
|
422
|
+
const destinationStats = await fs.stat(destination)
|
|
423
|
+
const targetGid = destinationStats.gid
|
|
419
424
|
|
|
420
|
-
|
|
421
|
-
await fs.
|
|
425
|
+
const processPath = async filePath => {
|
|
426
|
+
const stats = await fs.lstat(filePath)
|
|
422
427
|
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
withFileTypes: true
|
|
427
|
-
}
|
|
428
|
-
)
|
|
429
|
-
|
|
430
|
-
for (const entry of entries) {
|
|
431
|
-
await this._copyWithInheritedGroup(
|
|
432
|
-
path.join(source, entry.name),
|
|
433
|
-
path.join(destination, entry.name)
|
|
434
|
-
)
|
|
428
|
+
if (stats.isSymbolicLink()) {
|
|
429
|
+
await fs.lchown(filePath, stats.uid, targetGid)
|
|
430
|
+
return
|
|
435
431
|
}
|
|
436
432
|
|
|
437
|
-
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
await fs.ensureDir(path.dirname(destination))
|
|
433
|
+
await fs.chown(filePath, stats.uid, targetGid)
|
|
441
434
|
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
await fs.remove(destination)
|
|
435
|
+
if (!stats.isDirectory()) {
|
|
436
|
+
return
|
|
437
|
+
}
|
|
446
438
|
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
destination
|
|
439
|
+
await fs.chmod(
|
|
440
|
+
filePath,
|
|
441
|
+
stats.mode | 0o2070
|
|
451
442
|
)
|
|
452
443
|
|
|
453
|
-
|
|
454
|
-
}
|
|
455
|
-
|
|
456
|
-
// copyFile() would otherwise overwrite an existing inode and retain
|
|
457
|
-
// its previous group. Removing it first forces group inheritance.
|
|
458
|
-
await fs.remove(destination)
|
|
444
|
+
const entries = await fs.readdir(filePath)
|
|
459
445
|
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
446
|
+
for (const entry of entries) {
|
|
447
|
+
await processPath(
|
|
448
|
+
path.join(filePath, entry)
|
|
449
|
+
)
|
|
450
|
+
}
|
|
451
|
+
}
|
|
464
452
|
|
|
465
|
-
await
|
|
466
|
-
destination,
|
|
467
|
-
sourceStats.mode & 0o777
|
|
468
|
-
)
|
|
453
|
+
await processPath(destination)
|
|
469
454
|
}
|
|
470
455
|
|
|
471
456
|
async _getTypo3Releases () {
|