temp-disposable-email 1.11.3 → 1.11.6
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 +58 -0
- package/README.md +10 -0
- package/cypress.config.ts +1 -0
- package/dist/cjs/utils/getVerificationCode.d.ts +1 -1
- package/dist/cjs/utils/getVerificationCode.d.ts.map +1 -1
- package/dist/cjs/utils/getVerificationCode.js +1 -2
- package/dist/cjs/utils/getVerificationCode.js.map +1 -1
- package/dist/esm/utils/getVerificationCode.d.ts +1 -1
- package/dist/esm/utils/getVerificationCode.d.ts.map +1 -1
- package/dist/esm/utils/getVerificationCode.js +1 -2
- package/dist/esm/utils/getVerificationCode.js.map +1 -1
- package/package.json +2 -2
- package/src/utils/getVerificationCode.ts +3 -4
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
## [0.0.1](https://github.com/pirasanthan-jesugeevegan/temp-disposable-email/compare/v1.11.3...v0.0.1) (2024-11-29)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* add changelog generation and release creation steps to CI workflow ([191def0](https://github.com/pirasanthan-jesugeevegan/temp-disposable-email/commit/191def07b8a21d0d081b95eaf061bee5dc460a3f))
|
|
7
|
+
* correct indentation in CI workflow steps ([4f7a8bb](https://github.com/pirasanthan-jesugeevegan/temp-disposable-email/commit/4f7a8bb83745b6b58fabd5aceb645217ceba8664))
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## [1.11.3](https://github.com/pirasanthan-jesugeevegan/temp-disposable-email/compare/v1.11.2...v1.11.3) (2024-11-29)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* add semantic release plugins for changelog, GitHub, and npm support ([50347f2](https://github.com/pirasanthan-jesugeevegan/temp-disposable-email/commit/50347f295747b056d425ff69f8c42167046f3431))
|
|
17
|
+
* remove unused semantic release plugins from configuration ([10ecf70](https://github.com/pirasanthan-jesugeevegan/temp-disposable-email/commit/10ecf7060d2b6841bccdb224b4a878010a100032))
|
|
18
|
+
* update release configuration to include semantic release plugins and add publishConfig for npm registry ([0c9bf12](https://github.com/pirasanthan-jesugeevegan/temp-disposable-email/commit/0c9bf120d683c8fe1e3f4357134d13e1d6405530))
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## [1.11.2](https://github.com/pirasanthan-jesugeevegan/temp-disposable-email/compare/v1.11.1...v1.11.2) (2024-11-29)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* update BASE_URL to use environment variable and clean up console log messages ([f1ae4eb](https://github.com/pirasanthan-jesugeevegan/temp-disposable-email/commit/f1ae4eb88f18b50c38ad9f4dd9a52fa336e18b2c))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
## [1.11.1](https://github.com/pirasanthan-jesugeevegan/temp-disposable-email/compare/v1.11.0...v1.11.1) (2024-11-29)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
### Bug Fixes
|
|
35
|
+
|
|
36
|
+
* consolidate CI workflows into a single configuration and update Node.js version management ([e226240](https://github.com/pirasanthan-jesugeevegan/temp-disposable-email/commit/e22624094e9e78128a7b74b942fa218b64d18485))
|
|
37
|
+
* enhance README.md with improved structure and additional sections ([85742ed](https://github.com/pirasanthan-jesugeevegan/temp-disposable-email/commit/85742ed515fc68cef6151c4ae95f2312186931cf))
|
|
38
|
+
* remove unnecessary console log from fetchMessages function ([39420b9](https://github.com/pirasanthan-jesugeevegan/temp-disposable-email/commit/39420b96c7207c0d711098fdef99fd3fe13aecf7))
|
|
39
|
+
* update Jest configuration to include testMatch and add types for Jest and Node ([6de96dc](https://github.com/pirasanthan-jesugeevegan/temp-disposable-email/commit/6de96dc424d6826bdaa2b31155cc0d8ec22c4a1e))
|
|
40
|
+
* update Node.js version in .nvmrc to 20.x.x ([3a44b1a](https://github.com/pirasanthan-jesugeevegan/temp-disposable-email/commit/3a44b1a8c782dee383a7c01e5c74dbaca57c5015))
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
# [1.11.0](https://github.com/pirasanthan-jesugeevegan/temp-disposable-email/compare/v1.10.1...v1.11.0) (2024-11-29)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
### Bug Fixes
|
|
48
|
+
|
|
49
|
+
* simplify release configuration by removing unnecessary plugins ([aa9beb4](https://github.com/pirasanthan-jesugeevegan/temp-disposable-email/commit/aa9beb4ba94ff33b710cea6924492bc74f28129b))
|
|
50
|
+
* specify Node.js version in release workflow for consistency ([4b82c00](https://github.com/pirasanthan-jesugeevegan/temp-disposable-email/commit/4b82c0040ef5ae3592d7b3ed0e920e50519dd3d7))
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
### Features
|
|
54
|
+
|
|
55
|
+
* update GitHub workflows for improved release process and add Playwright tests ([9e9498b](https://github.com/pirasanthan-jesugeevegan/temp-disposable-email/commit/9e9498b314295d29a5a9ee90de67ae0a5116475c))
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
package/README.md
CHANGED
|
@@ -129,6 +129,16 @@ console.log('Account deleted');
|
|
|
129
129
|
|
|
130
130
|
## Example Workflow
|
|
131
131
|
|
|
132
|
+
### Playwright Example
|
|
133
|
+
|
|
134
|
+
For using temp-disposable-email with Playwright, see the example in the [Playwright folder](https://github.com/pirasanthan-jesugeevegan/temp-disposable-email/tree/master/examples/playwright).
|
|
135
|
+
|
|
136
|
+
### Cypress Example
|
|
137
|
+
|
|
138
|
+
For using temp-disposable-email with Cypress, see the example in the [Cypress folder](https://github.com/pirasanthan-jesugeevegan/temp-disposable-email/tree/master/examples/cypress).
|
|
139
|
+
|
|
140
|
+
### Node Example
|
|
141
|
+
|
|
132
142
|
Here's a complete example of creating an inbox, retrieving a message, and deleting the account:
|
|
133
143
|
|
|
134
144
|
```typescript
|
package/cypress.config.ts
CHANGED
|
@@ -13,5 +13,5 @@
|
|
|
13
13
|
* const verificationCode = await getVerificationCode(emailContent);
|
|
14
14
|
* console.log(verificationCode); // Output: "123456"
|
|
15
15
|
*/
|
|
16
|
-
export declare const getVerificationCode: (text: string) => Promise<string
|
|
16
|
+
export declare const getVerificationCode: (text: string | undefined) => Promise<string>;
|
|
17
17
|
//# sourceMappingURL=getVerificationCode.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getVerificationCode.d.ts","sourceRoot":"","sources":["../../../src/utils/getVerificationCode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,eAAO,MAAM,mBAAmB,SACxB,MAAM,
|
|
1
|
+
{"version":3,"file":"getVerificationCode.d.ts","sourceRoot":"","sources":["../../../src/utils/getVerificationCode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,eAAO,MAAM,mBAAmB,SACxB,MAAM,GAAG,SAAS,KACvB,OAAO,CAAC,MAAM,CAOhB,CAAC"}
|
|
@@ -22,8 +22,7 @@ const getVerificationCode = async (text) => {
|
|
|
22
22
|
if (matches) {
|
|
23
23
|
return matches[0];
|
|
24
24
|
}
|
|
25
|
-
|
|
26
|
-
return null;
|
|
25
|
+
throw new Error('No verification code found in the provided email content.');
|
|
27
26
|
};
|
|
28
27
|
exports.getVerificationCode = getVerificationCode;
|
|
29
28
|
//# sourceMappingURL=getVerificationCode.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getVerificationCode.js","sourceRoot":"","sources":["../../../src/utils/getVerificationCode.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEI,MAAM,mBAAmB,GAAG,KAAK,EACtC,
|
|
1
|
+
{"version":3,"file":"getVerificationCode.js","sourceRoot":"","sources":["../../../src/utils/getVerificationCode.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;;;AAEI,MAAM,mBAAmB,GAAG,KAAK,EACtC,IAAwB,EACP,EAAE;IACnB,OAAO,CAAC,GAAG,CAAC,4DAA4D,CAAC,CAAC;IAC1E,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;IACzC,IAAI,OAAO,EAAE,CAAC;QACZ,OAAO,OAAO,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;IACD,MAAM,IAAI,KAAK,CAAC,2DAA2D,CAAC,CAAC;AAC/E,CAAC,CAAC;AATW,QAAA,mBAAmB,uBAS9B"}
|
|
@@ -13,5 +13,5 @@
|
|
|
13
13
|
* const verificationCode = await getVerificationCode(emailContent);
|
|
14
14
|
* console.log(verificationCode); // Output: "123456"
|
|
15
15
|
*/
|
|
16
|
-
export declare const getVerificationCode: (text: string) => Promise<string
|
|
16
|
+
export declare const getVerificationCode: (text: string | undefined) => Promise<string>;
|
|
17
17
|
//# sourceMappingURL=getVerificationCode.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getVerificationCode.d.ts","sourceRoot":"","sources":["../../../src/utils/getVerificationCode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,eAAO,MAAM,mBAAmB,SACxB,MAAM,
|
|
1
|
+
{"version":3,"file":"getVerificationCode.d.ts","sourceRoot":"","sources":["../../../src/utils/getVerificationCode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,eAAO,MAAM,mBAAmB,SACxB,MAAM,GAAG,SAAS,KACvB,OAAO,CAAC,MAAM,CAOhB,CAAC"}
|
|
@@ -19,7 +19,6 @@ export const getVerificationCode = async (text) => {
|
|
|
19
19
|
if (matches) {
|
|
20
20
|
return matches[0];
|
|
21
21
|
}
|
|
22
|
-
|
|
23
|
-
return null;
|
|
22
|
+
throw new Error('No verification code found in the provided email content.');
|
|
24
23
|
};
|
|
25
24
|
//# sourceMappingURL=getVerificationCode.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getVerificationCode.js","sourceRoot":"","sources":["../../../src/utils/getVerificationCode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG,KAAK,EACtC,
|
|
1
|
+
{"version":3,"file":"getVerificationCode.js","sourceRoot":"","sources":["../../../src/utils/getVerificationCode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG,KAAK,EACtC,IAAwB,EACP,EAAE;IACnB,OAAO,CAAC,GAAG,CAAC,4DAA4D,CAAC,CAAC;IAC1E,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;IACzC,IAAI,OAAO,EAAE,CAAC;QACZ,OAAO,OAAO,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;IACD,MAAM,IAAI,KAAK,CAAC,2DAA2D,CAAC,CAAC;AAC/E,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "temp-disposable-email",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.6",
|
|
4
4
|
"description": "Generating Temporary email address for testing, retrieving email from the temporary email address",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"axios": "^1.7.8",
|
|
43
43
|
"dotenv": "^16.4.5",
|
|
44
|
-
"temp-disposable-email": "^1.
|
|
44
|
+
"temp-disposable-email": "^1.11.5",
|
|
45
45
|
"tslib": "^2.8.1"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
@@ -15,13 +15,12 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
export const getVerificationCode = async (
|
|
18
|
-
text: string
|
|
19
|
-
): Promise<string
|
|
18
|
+
text: string | undefined
|
|
19
|
+
): Promise<string> => {
|
|
20
20
|
console.log('Extracting the verification code from the email content...');
|
|
21
21
|
const matches = text.match(/\b\d{5,}\b/);
|
|
22
22
|
if (matches) {
|
|
23
23
|
return matches[0];
|
|
24
24
|
}
|
|
25
|
-
|
|
26
|
-
return null;
|
|
25
|
+
throw new Error('No verification code found in the provided email content.');
|
|
27
26
|
};
|