proxymail-qa 0.1.0 → 0.1.1
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/README.md +9 -0
- package/dist/index.d.ts +19 -6
- package/dist/index.js +0 -3
- package/package.json +9 -3
package/README.md
CHANGED
|
@@ -19,6 +19,9 @@ const { value: link } = await qa.waitForLink(address, { type: 'reset', timeout:
|
|
|
19
19
|
await qa.deleteAddress(address);
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
+
With `password: true` the result's `password` is typed as a `string` (pass the
|
|
23
|
+
options inline, or `as const`, so TypeScript sees `true`).
|
|
24
|
+
|
|
22
25
|
Waits return the code or link on its own, with the sending service and its
|
|
23
26
|
expiry, never the email's text. They throw `ProxyMailQAError` (status 404) when
|
|
24
27
|
nothing arrives in time.
|
|
@@ -104,6 +107,12 @@ at any time. Retrying won't help until the app can email any address.
|
|
|
104
107
|
Mobile apps (XCUITest, Espresso, Maestro, Flutter, Detox and Appium):
|
|
105
108
|
https://proxymail.qa/docs/mobile
|
|
106
109
|
|
|
110
|
+
## Source
|
|
111
|
+
|
|
112
|
+
https://github.com/aaquib90/proxymail-qa-js. Releases are published to npm from
|
|
113
|
+
GitHub Actions with provenance, so npm shows which commit and workflow built
|
|
114
|
+
each version.
|
|
115
|
+
|
|
107
116
|
## License
|
|
108
117
|
|
|
109
118
|
MIT
|
package/dist/index.d.ts
CHANGED
|
@@ -26,6 +26,15 @@ export interface Address {
|
|
|
26
26
|
export interface CreatedAddress extends Address {
|
|
27
27
|
password?: string;
|
|
28
28
|
}
|
|
29
|
+
export interface CreatedAddressWithPassword extends CreatedAddress {
|
|
30
|
+
password: string;
|
|
31
|
+
}
|
|
32
|
+
export interface SavedPassword {
|
|
33
|
+
address: string;
|
|
34
|
+
label: string;
|
|
35
|
+
saved: boolean;
|
|
36
|
+
password?: string;
|
|
37
|
+
}
|
|
29
38
|
export interface Match {
|
|
30
39
|
address: string;
|
|
31
40
|
type: 'code' | 'link';
|
|
@@ -107,6 +116,9 @@ export declare class ProxyMailQA {
|
|
|
107
116
|
constructor(options?: ClientOptions);
|
|
108
117
|
private request;
|
|
109
118
|
project(): Promise<Record<string, unknown>>;
|
|
119
|
+
createAddress(input: CreateAddressInput & {
|
|
120
|
+
password: true;
|
|
121
|
+
}): Promise<CreatedAddressWithPassword>;
|
|
110
122
|
createAddress(input?: CreateAddressInput): Promise<CreatedAddress>;
|
|
111
123
|
listAddresses(options?: {
|
|
112
124
|
limit?: number;
|
|
@@ -127,14 +139,15 @@ export declare class ProxyMailQA {
|
|
|
127
139
|
}): Promise<Record<string, unknown>[]>;
|
|
128
140
|
checkDelivery(address: string): Promise<DeliveryStatus>;
|
|
129
141
|
variants(address: string): Promise<Variants>;
|
|
142
|
+
setPassword(address: string, options: {
|
|
143
|
+
password: string;
|
|
144
|
+
label?: string;
|
|
145
|
+
}): Promise<SavedPassword>;
|
|
130
146
|
setPassword(address: string, options?: {
|
|
131
|
-
password?:
|
|
147
|
+
password?: undefined;
|
|
132
148
|
label?: string;
|
|
133
|
-
}): Promise<{
|
|
134
|
-
|
|
135
|
-
label: string;
|
|
136
|
-
saved: boolean;
|
|
137
|
-
password?: string;
|
|
149
|
+
}): Promise<SavedPassword & {
|
|
150
|
+
password: string;
|
|
138
151
|
}>;
|
|
139
152
|
savedPassword(address: string, label?: string): Promise<{
|
|
140
153
|
address: string;
|
package/dist/index.js
CHANGED
|
@@ -115,9 +115,6 @@ export class ProxyMailQA {
|
|
|
115
115
|
variants(address) {
|
|
116
116
|
return this.request('GET', `/addresses/${encodeURIComponent(address)}/variants`);
|
|
117
117
|
}
|
|
118
|
-
// Saves the password the test account uses now, after the app under test
|
|
119
|
-
// changed or reset it. Without one, a strong password is generated and
|
|
120
|
-
// returned this once.
|
|
121
118
|
setPassword(address, options = {}) {
|
|
122
119
|
return this.request('PUT', `/addresses/${encodeURIComponent(address)}/password`, { password: options.password, label: options.label });
|
|
123
120
|
}
|
package/package.json
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "proxymail-qa",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Disposable test inboxes for Playwright, Cypress and scripts: create an address, then wait for its verification code or link.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Proxy Mail QA <hello@proxymail.qa> (https://proxymail.qa)",
|
|
7
|
-
"homepage": "https://proxymail.qa/docs/
|
|
7
|
+
"homepage": "https://proxymail.qa/docs/node",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/aaquib90/proxymail-qa-js.git"
|
|
11
|
+
},
|
|
8
12
|
"bugs": {
|
|
13
|
+
"url": "https://github.com/aaquib90/proxymail-qa-js/issues",
|
|
9
14
|
"email": "hello@proxymail.qa"
|
|
10
15
|
},
|
|
11
16
|
"keywords": [
|
|
@@ -39,9 +44,10 @@
|
|
|
39
44
|
"build": "tsc -p tsconfig.build.json",
|
|
40
45
|
"test": "vitest run",
|
|
41
46
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
42
|
-
"prepublishOnly": "
|
|
47
|
+
"prepublishOnly": "npm run build && npm test"
|
|
43
48
|
},
|
|
44
49
|
"devDependencies": {
|
|
50
|
+
"typescript": "^5.6.0",
|
|
45
51
|
"vitest": "^5.0.3"
|
|
46
52
|
}
|
|
47
53
|
}
|