generator-razor 14.0.9 → 14.0.11
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 +24 -36
- package/package.json +2 -2
package/app/index.js
CHANGED
|
@@ -307,44 +307,18 @@ export default class extends Generator {
|
|
|
307
307
|
store: true
|
|
308
308
|
}]
|
|
309
309
|
|
|
310
|
-
const storedPromptNames = prompts
|
|
311
|
-
.filter(prompt => prompt.store === true)
|
|
312
|
-
.map(prompt => prompt.name)
|
|
313
|
-
|
|
314
|
-
for (const prompt of prompts) {
|
|
315
|
-
if (
|
|
316
|
-
prompt.store === true &&
|
|
317
|
-
this.config.get(prompt.name) !== undefined
|
|
318
|
-
) {
|
|
319
|
-
prompt.default = this.config.get(prompt.name)
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
|
|
323
310
|
this.props = await this.prompt(prompts)
|
|
324
311
|
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
if (
|
|
332
|
-
typeof this.props.Pass !== 'string' ||
|
|
333
|
-
this.props.Pass.length === 0
|
|
334
|
-
) {
|
|
335
|
-
throw new Error('TYPO3 password is empty.')
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
this.passwordHash = await argon2.hash(
|
|
339
|
-
this.props.Pass,
|
|
340
|
-
{
|
|
341
|
-
type: argon2.argon2id
|
|
342
|
-
}
|
|
312
|
+
const promptValues = Object.fromEntries(
|
|
313
|
+
prompts
|
|
314
|
+
.filter(({ store }) => store)
|
|
315
|
+
.filter(({ name }) => this.props[name] !== undefined)
|
|
316
|
+
.map(({ name }) => [name, this.props[name]])
|
|
343
317
|
)
|
|
344
318
|
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
319
|
+
this._globalConfig.set('promptValues', promptValues)
|
|
320
|
+
|
|
321
|
+
await this.fs.commit()
|
|
348
322
|
}
|
|
349
323
|
|
|
350
324
|
async writing () {
|
|
@@ -738,10 +712,17 @@ export default class extends Generator {
|
|
|
738
712
|
encryptionKey
|
|
739
713
|
)
|
|
740
714
|
|
|
715
|
+
const passwordHash = await argon2.hash(
|
|
716
|
+
this.props.Pass,
|
|
717
|
+
{
|
|
718
|
+
type: argon2.argon2i
|
|
719
|
+
}
|
|
720
|
+
)
|
|
721
|
+
|
|
741
722
|
content = this._substituteMarker(
|
|
742
723
|
content,
|
|
743
724
|
'###PASS###',
|
|
744
|
-
|
|
725
|
+
passwordHash
|
|
745
726
|
)
|
|
746
727
|
|
|
747
728
|
await fs.writeFile(
|
|
@@ -910,10 +891,17 @@ export default class extends Generator {
|
|
|
910
891
|
this.props.User
|
|
911
892
|
)
|
|
912
893
|
|
|
894
|
+
const passwordHash = await argon2.hash(
|
|
895
|
+
this.props.Pass,
|
|
896
|
+
{
|
|
897
|
+
type: argon2.argon2i
|
|
898
|
+
}
|
|
899
|
+
)
|
|
900
|
+
|
|
913
901
|
sql = this._substituteMarker(
|
|
914
902
|
sql,
|
|
915
903
|
'###PASS###',
|
|
916
|
-
|
|
904
|
+
passwordHash
|
|
917
905
|
)
|
|
918
906
|
|
|
919
907
|
await connection.query(sql)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "generator-razor",
|
|
3
|
-
"version": "14.0.
|
|
3
|
+
"version": "14.0.11",
|
|
4
4
|
"description": "Yeoman generator for razor TYPO3 distribution",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "app/index.js",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"razor"
|
|
30
30
|
],
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"argon2": "^0.
|
|
32
|
+
"argon2": "^0.44.0",
|
|
33
33
|
"chalk": "^6.0.0",
|
|
34
34
|
"fs-extra": "^11.4.0",
|
|
35
35
|
"mysql2": "^3.23.1",
|