generator-razor 14.0.12 → 14.0.13

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.
Files changed (2) hide show
  1. package/app/index.js +23 -9
  2. package/package.json +1 -1
package/app/index.js CHANGED
@@ -382,9 +382,14 @@ export default class extends Generator {
382
382
  )
383
383
 
384
384
  if (await fs.pathExists(extensionsSource)) {
385
- await this._copyWithInheritedGroup(
385
+ await fs.copy(
386
386
  extensionsSource,
387
- this.destinationPath('typo3conf/ext')
387
+ this.destinationPath('typo3conf/ext'),
388
+ {
389
+ overwrite: true,
390
+ errorOnExist: false,
391
+ dereference: false
392
+ }
388
393
  )
389
394
  }
390
395
  }
@@ -412,7 +417,7 @@ export default class extends Generator {
412
417
  if (sourceStats.isDirectory()) {
413
418
  await fs.ensureDir(destination)
414
419
 
415
- // Set setgid before creating anything inside this directory.
420
+ // Files created afterwards inherit this directory's group.
416
421
  await fs.chmod(destination, 0o2775)
417
422
 
418
423
  const entries = await fs.readdir(
@@ -432,22 +437,31 @@ export default class extends Generator {
432
437
  return
433
438
  }
434
439
 
440
+ await fs.ensureDir(path.dirname(destination))
441
+
435
442
  if (sourceStats.isSymbolicLink()) {
436
443
  const linkTarget = await fs.readlink(source)
437
444
 
438
445
  await fs.remove(destination)
439
- await fs.ensureSymlink(linkTarget, destination)
446
+
447
+ // Preserve the relative link exactly as it exists in the template.
448
+ await fs.symlink(
449
+ linkTarget,
450
+ destination
451
+ )
440
452
 
441
453
  return
442
454
  }
443
455
 
444
- await fs.ensureDir(path.dirname(destination))
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)
445
459
 
446
- // The parent directory already has setgid, so a newly created file
447
- // inherits its group.
448
- await fs.copyFile(source, destination)
460
+ await fs.copyFile(
461
+ source,
462
+ destination
463
+ )
449
464
 
450
- // Preserve the original file permissions without changing ownership.
451
465
  await fs.chmod(
452
466
  destination,
453
467
  sourceStats.mode & 0o777
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "generator-razor",
3
- "version": "14.0.12",
3
+ "version": "14.0.13",
4
4
  "description": "Yeoman generator for razor TYPO3 distribution",
5
5
  "license": "MIT",
6
6
  "main": "app/index.js",