generator-razor 14.0.3 → 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 +10 -21
- 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',
|
|
@@ -640,28 +631,26 @@ export default class extends Generator {
|
|
|
640
631
|
}
|
|
641
632
|
|
|
642
633
|
async _createSymlinks (sourcePath) {
|
|
634
|
+
const typo3SrcLink = this.destinationPath('typo3_src')
|
|
635
|
+
|
|
643
636
|
const links = [{
|
|
644
|
-
source:
|
|
645
|
-
|
|
637
|
+
source: path.relative(
|
|
638
|
+
this.destinationRoot(),
|
|
639
|
+
sourcePath
|
|
640
|
+
),
|
|
641
|
+
destination: typo3SrcLink,
|
|
646
642
|
type: 'dir'
|
|
647
643
|
}, {
|
|
648
|
-
source:
|
|
644
|
+
source: 'typo3_src/typo3',
|
|
649
645
|
destination: this.destinationPath('typo3'),
|
|
650
646
|
type: 'dir'
|
|
651
647
|
}, {
|
|
652
|
-
source:
|
|
648
|
+
source: 'typo3_src/index.php',
|
|
653
649
|
destination: this.destinationPath('index.php'),
|
|
654
650
|
type: 'file'
|
|
655
651
|
}]
|
|
656
652
|
|
|
657
653
|
for (const link of links) {
|
|
658
|
-
if (!await fs.pathExists(link.source)) {
|
|
659
|
-
throw new Error(
|
|
660
|
-
'Cannot create symlink because the source does not exist: ' +
|
|
661
|
-
link.source
|
|
662
|
-
)
|
|
663
|
-
}
|
|
664
|
-
|
|
665
654
|
await fs.remove(link.destination)
|
|
666
655
|
|
|
667
656
|
await fs.ensureSymlink(
|