generator-razor 14.0.9 → 14.0.10

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 +16 -39
  2. package/package.json +2 -2
package/app/index.js CHANGED
@@ -307,44 +307,7 @@ 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
-
325
- for (const name of storedPromptNames) {
326
- this.config.set(name, this.props[name])
327
- }
328
-
329
- await this.config.save()
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
- }
343
- )
344
-
345
- if (!await argon2.verify(this.passwordHash, this.props.Pass)) {
346
- throw new Error('Generated TYPO3 password hash is invalid.')
347
- }
348
311
  }
349
312
 
350
313
  async writing () {
@@ -738,10 +701,17 @@ export default class extends Generator {
738
701
  encryptionKey
739
702
  )
740
703
 
704
+ const passwordHash = await argon2.hash(
705
+ this.props.Pass,
706
+ {
707
+ type: argon2.argon2i
708
+ }
709
+ )
710
+
741
711
  content = this._substituteMarker(
742
712
  content,
743
713
  '###PASS###',
744
- this.passwordHash
714
+ passwordHash
745
715
  )
746
716
 
747
717
  await fs.writeFile(
@@ -910,10 +880,17 @@ export default class extends Generator {
910
880
  this.props.User
911
881
  )
912
882
 
883
+ const passwordHash = await argon2.hash(
884
+ this.props.Pass,
885
+ {
886
+ type: argon2.argon2i
887
+ }
888
+ )
889
+
913
890
  sql = this._substituteMarker(
914
891
  sql,
915
892
  '###PASS###',
916
- this.passwordHash
893
+ passwordHash
917
894
  )
918
895
 
919
896
  await connection.query(sql)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "generator-razor",
3
- "version": "14.0.9",
3
+ "version": "14.0.10",
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.45.1",
32
+ "argon2": "^0.44.0",
33
33
  "chalk": "^6.0.0",
34
34
  "fs-extra": "^11.4.0",
35
35
  "mysql2": "^3.23.1",