generator-razor 14.0.2 → 14.0.4
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 +23 -37
- package/package.json +1 -1
package/app/index.js
CHANGED
|
@@ -83,16 +83,7 @@ export default class extends Generator {
|
|
|
83
83
|
type: 'input',
|
|
84
84
|
name: 'DbPort',
|
|
85
85
|
message: 'Database port?',
|
|
86
|
-
store: true
|
|
87
|
-
validate: value => {
|
|
88
|
-
const port = Number(value)
|
|
89
|
-
|
|
90
|
-
if (Number.isInteger(port) && port >= 1 && port <= 65535) {
|
|
91
|
-
return true
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
return 'Enter a valid TCP port.'
|
|
95
|
-
}
|
|
86
|
+
store: true
|
|
96
87
|
}, {
|
|
97
88
|
type: 'select',
|
|
98
89
|
name: 'DbSocket',
|
|
@@ -397,23 +388,20 @@ export default class extends Generator {
|
|
|
397
388
|
}
|
|
398
389
|
|
|
399
390
|
const orange = chalk.hex('#ff8700').bold
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
this.log(petrol(
|
|
412
|
-
` ${this.props.ProjectName} was generated successfully.\n`
|
|
413
|
-
))
|
|
414
|
-
}
|
|
391
|
+
const petrol = chalk.hex('#006792')
|
|
392
|
+
|
|
393
|
+
this.log(orange(`
|
|
394
|
+
██████╗ ██████╗ ███╗ ██╗███████╗
|
|
395
|
+
██╔══██╗██╔═══██╗████╗ ██║██╔════╝
|
|
396
|
+
██║ ██║██║ ██║██╔██╗ ██║█████╗
|
|
397
|
+
██║ ██║██║ ██║██║╚██╗██║██╔══╝
|
|
398
|
+
██████╔╝╚██████╔╝██║ ╚████║███████╗
|
|
399
|
+
╚═════╝ ╚═════╝ ╚═╝ ╚═══╝╚══════╝
|
|
400
|
+
`))
|
|
415
401
|
|
|
416
|
-
|
|
402
|
+
this.log(petrol(
|
|
403
|
+
` ${this.props.ProjectName} was generated successfully.\n`
|
|
404
|
+
))
|
|
417
405
|
}
|
|
418
406
|
|
|
419
407
|
async _getTypo3Releases () {
|
|
@@ -643,28 +631,26 @@ export default class extends Generator {
|
|
|
643
631
|
}
|
|
644
632
|
|
|
645
633
|
async _createSymlinks (sourcePath) {
|
|
634
|
+
const typo3SrcLink = this.destinationPath('typo3_src')
|
|
635
|
+
|
|
646
636
|
const links = [{
|
|
647
|
-
source:
|
|
648
|
-
|
|
637
|
+
source: path.relative(
|
|
638
|
+
this.destinationRoot(),
|
|
639
|
+
sourcePath
|
|
640
|
+
),
|
|
641
|
+
destination: typo3SrcLink,
|
|
649
642
|
type: 'dir'
|
|
650
643
|
}, {
|
|
651
|
-
source:
|
|
644
|
+
source: 'typo3_src/typo3',
|
|
652
645
|
destination: this.destinationPath('typo3'),
|
|
653
646
|
type: 'dir'
|
|
654
647
|
}, {
|
|
655
|
-
source:
|
|
648
|
+
source: 'typo3_src/index.php',
|
|
656
649
|
destination: this.destinationPath('index.php'),
|
|
657
650
|
type: 'file'
|
|
658
651
|
}]
|
|
659
652
|
|
|
660
653
|
for (const link of links) {
|
|
661
|
-
if (!await fs.pathExists(link.source)) {
|
|
662
|
-
throw new Error(
|
|
663
|
-
'Cannot create symlink because the source does not exist: ' +
|
|
664
|
-
link.source
|
|
665
|
-
)
|
|
666
|
-
}
|
|
667
|
-
|
|
668
654
|
await fs.remove(link.destination)
|
|
669
655
|
|
|
670
656
|
await fs.ensureSymlink(
|