generator-razor 13.4.11 → 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 +32 -1
  2. package/package.json +5 -2
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,10 +297,24 @@ 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
 
306
+ const writableDirectories = [
307
+ 'fileadmin',
308
+ 'typo3temp',
309
+ 'typo3conf'
310
+ ]
311
+
312
+ writableDirectories.forEach((directory) => {
313
+ t.chmodDirectoriesRecursive(
314
+ path.join(destination, directory)
315
+ )
316
+ })
317
+
303
318
  t._createDb((response) => {
304
319
  t._processSqlFile(t, response, () => {
305
320
  t._setRazorConfig()
@@ -309,6 +324,22 @@ module.exports = class extends Generator {
309
324
  })
310
325
  }
311
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
+
312
343
  install () {
313
344
  rzr = this.props
314
345
 
package/package.json CHANGED
@@ -1,10 +1,13 @@
1
1
  {
2
2
  "name": "generator-razor",
3
- "version": "13.4.11",
3
+ "version": "13.4.13",
4
4
  "description": "Yeoman generator for razor TYPO3 distribution",
5
5
  "license": "MIT",
6
6
  "main": "app/index.js",
7
- "repository": "rafu1987/generator-razor",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/rafu1987/generator-razor.git"
10
+ },
8
11
  "author": {
9
12
  "name": "Raphael Zschorsch",
10
13
  "email": "rafu1987@gmail.com",