@proconnect-gouv/proconnect.core 1.1.0 → 1.1.2
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/CHANGELOG.md +12 -0
- package/dist/data/index.cjs +3 -71
- package/dist/data/index.js +3 -71
- package/dist/most-used-free-email-domains-CrvjmNqk.cjs +73 -0
- package/dist/most-used-free-email-domains-Cwn0UpRs.js +71 -0
- package/dist/security/index.cjs +7640 -7635
- package/dist/security/index.d.ts +12 -3
- package/dist/security/index.d.ts.map +1 -1
- package/dist/security/index.js +7637 -7634
- package/dist/services/email/index.cjs +2 -2
- package/dist/services/email/index.js +1 -1
- package/dist/services/suggestion/index.cjs +5 -6
- package/dist/services/suggestion/index.js +2 -3
- package/package.json +1 -6
- package/src/data/diceware-wordlist-fr-alt.ts +7625 -7625
- package/src/security/generate-diceware-phrase.test.ts +25 -0
- package/src/security/generate-diceware-phrase.ts +18 -0
- package/src/security/get-trusted-referrer-path-from-request.test.ts +81 -0
- package/src/security/get-trusted-referrer-path-from-request.ts +24 -0
- package/src/security/index.ts +3 -1
- package/src/security/normalize-diceware-words.test.ts +20 -0
- package/src/security/normalize-diceware-words.ts +8 -0
- package/src/services/email/is-a-free-domain.ts +1 -1
- package/src/services/suggestion/did-you-mean.ts +3 -3
- package/src/security/generate-diceware-password.test.ts +0 -26
- package/src/security/generate-diceware-password.ts +0 -25
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var tldExtract = require('tld-extract');
|
|
4
|
-
var mostUsedFreeEmailDomains = require('#src/data/most-used-free-email-domains');
|
|
5
4
|
var isDisposableEmailDomain = require('is-disposable-email-domain');
|
|
5
|
+
var mostUsedFreeEmailDomains = require('../../most-used-free-email-domains-CrvjmNqk.cjs');
|
|
6
6
|
|
|
7
7
|
function getEmailDomain(email) {
|
|
8
8
|
if (!email) {
|
|
@@ -16,7 +16,7 @@ function getEmailDomain(email) {
|
|
|
16
16
|
|
|
17
17
|
function isAFreeDomain(string) {
|
|
18
18
|
const domain = getEmailDomain(string);
|
|
19
|
-
return isDisposableEmailDomain.isFree(domain) || mostUsedFreeEmailDomains.includes(domain);
|
|
19
|
+
return isDisposableEmailDomain.isFree(domain) || mostUsedFreeEmailDomains.mostUsedFreeEmailDomains.includes(domain);
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
exports.getEmailDomain = getEmailDomain;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { parse_host } from 'tld-extract';
|
|
2
|
-
import mostUsedFreeEmailDomains from '#src/data/most-used-free-email-domains';
|
|
3
2
|
import { isFree } from 'is-disposable-email-domain';
|
|
3
|
+
import { m as mostUsedFreeEmailDomains } from '../../most-used-free-email-domains-Cwn0UpRs.js';
|
|
4
4
|
|
|
5
5
|
function getEmailDomain(email) {
|
|
6
6
|
if (!email) {
|
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var gouvfrDomains = require('#src/data/gouvfr-domains');
|
|
4
|
-
var mostUsedFreeEmailDomains = require('#src/data/most-used-free-email-domains');
|
|
5
|
-
var otherGouvDomains = require('#src/data/other-gouv-domains');
|
|
6
3
|
var emailSpellChecker = require('@zootools/email-spell-checker');
|
|
4
|
+
var data_index = require('../../data/index.cjs');
|
|
5
|
+
var mostUsedFreeEmailDomains = require('../../most-used-free-email-domains-CrvjmNqk.cjs');
|
|
7
6
|
|
|
8
7
|
function getDidYouMeanSuggestion(email) {
|
|
9
8
|
const suggestedEmail = emailSpellChecker.run({
|
|
10
9
|
domains: [
|
|
11
|
-
...gouvfrDomains,
|
|
12
|
-
...otherGouvDomains,
|
|
13
|
-
...mostUsedFreeEmailDomains
|
|
10
|
+
...data_index.gouvfrDomains,
|
|
11
|
+
...data_index.otherGouvDomains,
|
|
12
|
+
...mostUsedFreeEmailDomains.mostUsedFreeEmailDomains
|
|
14
13
|
],
|
|
15
14
|
topLevelDomains: ["fr", "com", "net"],
|
|
16
15
|
email
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import gouvfrDomains from '#src/data/gouvfr-domains';
|
|
2
|
-
import mostUsedFreeEmailDomains from '#src/data/most-used-free-email-domains';
|
|
3
|
-
import otherGouvDomains from '#src/data/other-gouv-domains';
|
|
4
1
|
import { run } from '@zootools/email-spell-checker';
|
|
2
|
+
import { gouvfrDomains, otherGouvDomains } from '../../data/index.js';
|
|
3
|
+
import { m as mostUsedFreeEmailDomains } from '../../most-used-free-email-domains-Cwn0UpRs.js';
|
|
5
4
|
|
|
6
5
|
function getDidYouMeanSuggestion(email) {
|
|
7
6
|
const suggestedEmail = run({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@proconnect-gouv/proconnect.core",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"homepage": "https://github.com/proconnect-gouv/proconnect-identite/tree/main/packages/core#readme",
|
|
5
5
|
"bugs": "https://github.com/proconnect-gouv/proconnect-identite/issues",
|
|
6
6
|
"repository": {
|
|
@@ -11,11 +11,6 @@
|
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"sideEffects": false,
|
|
13
13
|
"type": "module",
|
|
14
|
-
"imports": {
|
|
15
|
-
"#src/data/gouvfr-domains": "./src/data/gouvfr-domains.ts",
|
|
16
|
-
"#src/data/most-used-free-email-domains": "./src/data/most-used-free-email-domains.ts",
|
|
17
|
-
"#src/data/other-gouv-domains": "./src/data/other-gouv-domains.ts"
|
|
18
|
-
},
|
|
19
14
|
"exports": {
|
|
20
15
|
"./security": {
|
|
21
16
|
"require": "./dist/security/index.cjs",
|