generator-razor 13.4.12 → 13.4.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 +24 -12
  2. 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
 
@@ -296,27 +297,22 @@ module.exports = class extends Generator {
296
297
  }
297
298
 
298
299
  this._createSymlinks(this, path, () => {
299
- copydir(t.templatePath(version), t.destinationPath('./'), () => {
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
- const directoryPath = path.join(destination, directory)
316
-
317
- if (fs.existsSync(directoryPath)) {
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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "generator-razor",
3
- "version": "13.4.12",
3
+ "version": "13.4.13",
4
4
  "description": "Yeoman generator for razor TYPO3 distribution",
5
5
  "license": "MIT",
6
6
  "main": "app/index.js",