temp-disposable-email 1.16.1 → 2.0.0

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.
@@ -0,0 +1,27 @@
1
+ import { generateEmail, getRecentEmail, getVerificationCode, GeneratedEmail, MessageContent, GetEmailOptions } from './index';
2
+ /**
3
+ * Email helper fixtures for Playwright tests.
4
+ * Provides easy access to email generation and retrieval functions.
5
+ */
6
+ export interface EmailFixtures {
7
+ emailHelper: {
8
+ generateEmail: typeof generateEmail;
9
+ getRecentEmail: typeof getRecentEmail;
10
+ getVerificationCode: typeof getVerificationCode;
11
+ };
12
+ }
13
+ /**
14
+ * Extended Playwright test with email helper fixtures.
15
+ *
16
+ * @example
17
+ * import { test, expect } from 'temp-disposable-email/playwright';
18
+ *
19
+ * test('sign up flow', async ({ page, emailHelper }) => {
20
+ * const { emailAddress } = await emailHelper.generateEmail();
21
+ * // ... your test code
22
+ * });
23
+ */
24
+ export declare const test: import("@playwright/test").TestType<import("@playwright/test").PlaywrightTestArgs & import("@playwright/test").PlaywrightTestOptions & EmailFixtures, import("@playwright/test").PlaywrightWorkerArgs & import("@playwright/test").PlaywrightWorkerOptions>;
25
+ export { expect } from '@playwright/test';
26
+ export type { GeneratedEmail, MessageContent, GetEmailOptions };
27
+ //# sourceMappingURL=playwright.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"playwright.d.ts","sourceRoot":"","sources":["../../src/playwright.ts"],"names":[],"mappings":"AACA,OAAO,EACL,aAAa,EACb,cAAc,EACd,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,eAAe,EAChB,MAAM,SAAS,CAAC;AAEjB;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE;QACX,aAAa,EAAE,OAAO,aAAa,CAAC;QACpC,cAAc,EAAE,OAAO,cAAc,CAAC;QACtC,mBAAmB,EAAE,OAAO,mBAAmB,CAAC;KACjD,CAAC;CACH;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,IAAI,6PASf,CAAC;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAG1C,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { test as base } from '@playwright/test';
2
+ import { generateEmail, getRecentEmail, getVerificationCode, } from './index';
3
+ /**
4
+ * Extended Playwright test with email helper fixtures.
5
+ *
6
+ * @example
7
+ * import { test, expect } from 'temp-disposable-email/playwright';
8
+ *
9
+ * test('sign up flow', async ({ page, emailHelper }) => {
10
+ * const { emailAddress } = await emailHelper.generateEmail();
11
+ * // ... your test code
12
+ * });
13
+ */
14
+ export const test = base.extend({
15
+ // eslint-disable-next-line no-empty-pattern
16
+ emailHelper: async ({}, use) => {
17
+ await use({
18
+ generateEmail,
19
+ getRecentEmail,
20
+ getVerificationCode,
21
+ });
22
+ },
23
+ });
24
+ export { expect } from '@playwright/test';
25
+ //# sourceMappingURL=playwright.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"playwright.js","sourceRoot":"","sources":["../../src/playwright.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EACL,aAAa,EACb,cAAc,EACd,mBAAmB,GAIpB,MAAM,SAAS,CAAC;AAcjB;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAgB;IAC7C,4CAA4C;IAC5C,WAAW,EAAE,KAAK,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE;QAC7B,MAAM,GAAG,CAAC;YACR,aAAa;YACb,cAAc;YACd,mBAAmB;SACpB,CAAC,CAAC;IACL,CAAC;CACF,CAAC,CAAC;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC"}
package/package.json CHANGED
@@ -1,16 +1,23 @@
1
1
  {
2
2
  "name": "temp-disposable-email",
3
- "version": "1.16.1",
3
+ "version": "2.0.0",
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": {
7
7
  ".": {
8
+ "types": "./dist/esm/index.d.ts",
8
9
  "require": "./dist/cjs/index.js",
9
10
  "import": "./dist/esm/index.js"
10
11
  },
11
12
  "./cypress": {
13
+ "types": "./dist/esm/cypress.d.ts",
12
14
  "require": "./dist/cjs/cypress.js",
13
15
  "import": "./dist/esm/cypress.js"
16
+ },
17
+ "./playwright": {
18
+ "types": "./dist/esm/playwright.d.ts",
19
+ "require": "./dist/cjs/playwright.js",
20
+ "import": "./dist/esm/playwright.js"
14
21
  }
15
22
  },
16
23
  "types": "dist/esm/index.d.ts",
@@ -20,6 +27,8 @@
20
27
  "test:cypress": "cypress run",
21
28
  "test:playwright": "playwright test",
22
29
  "lint": "eslint src --fix",
30
+ "format": "prettier --write \"src/**/*.ts\" \"examples/**/*.ts\"",
31
+ "format:check": "prettier --check \"src/**/*.ts\" \"examples/**/*.ts\"",
23
32
  "prepare": "npm run build"
24
33
  },
25
34
  "repository": {
@@ -50,8 +59,12 @@
50
59
  "@types/cypress": "^1.1.6",
51
60
  "@types/jest": "^29.5.14",
52
61
  "@types/node": "^22.10.0",
62
+ "@typescript-eslint/eslint-plugin": "^8.0.0",
63
+ "@typescript-eslint/parser": "^8.0.0",
53
64
  "axios-mock-adapter": "^2.1.0",
65
+ "eslint": "^8.57.0",
54
66
  "jest": "^29.7.0",
67
+ "prettier": "^3.3.0",
55
68
  "ts-jest": "^29.2.5",
56
69
  "typescript": "^5.7.2"
57
70
  },