@checkly/playwright-reporter 0.0.3
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/LICENSE +201 -0
- package/README.md +282 -0
- package/dist/asset-collector.js +1 -0
- package/dist/clients/checkly-client.js +1 -0
- package/dist/clients/errors.js +1 -0
- package/dist/clients/index.js +1 -0
- package/dist/clients/test-results.js +1 -0
- package/dist/clients/types.js +1 -0
- package/dist/index.js +1 -0
- package/dist/reporter.js +1 -0
- package/dist/types.js +1 -0
- package/dist/zipper.js +1 -0
- package/package.json +55 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
# @checkly/playwright-reporter
|
|
2
|
+
|
|
3
|
+
> Official Playwright reporter for Checkly - Upload test results and assets automatically
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@checkly/playwright-reporter)
|
|
6
|
+
[](https://opensource.org/licenses/Apache-2.0)
|
|
7
|
+
|
|
8
|
+
Seamlessly integrate Playwright test results with Checkly monitoring. Automatically upload test results, screenshots, videos, and traces to gain visibility into your application's health across test runs.
|
|
9
|
+
|
|
10
|
+
## Installation
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm install --save-dev @checkly/playwright-reporter
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
**Requirements:**
|
|
17
|
+
- Node.js >= 18.0.0
|
|
18
|
+
- Playwright >= 1.40.0
|
|
19
|
+
- A Checkly account ([sign up here](https://www.checklyhq.com/signup))
|
|
20
|
+
|
|
21
|
+
## Quick Start
|
|
22
|
+
|
|
23
|
+
### 1. Get Your Checkly Credentials
|
|
24
|
+
|
|
25
|
+
1. Log in to [Checkly](https://app.checklyhq.com)
|
|
26
|
+
2. Go to **Account Settings > API Keys** and create a new API key
|
|
27
|
+
3. Note your Account ID from the URL: `https://app.checklyhq.com/accounts/{account_id}/`
|
|
28
|
+
|
|
29
|
+
### 2. Configure Playwright
|
|
30
|
+
|
|
31
|
+
Add the reporter to your `playwright.config.ts`:
|
|
32
|
+
|
|
33
|
+
```typescript
|
|
34
|
+
import { defineConfig } from '@playwright/test';
|
|
35
|
+
|
|
36
|
+
export default defineConfig({
|
|
37
|
+
reporter: [
|
|
38
|
+
['json', { outputFile: 'test-results/playwright-test-report.json' }],
|
|
39
|
+
['@checkly/playwright-reporter']
|
|
40
|
+
],
|
|
41
|
+
});
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
> **Note**: The JSON reporter must come first to generate the report that this reporter consumes.
|
|
45
|
+
|
|
46
|
+
### 3. Set Environment Variables
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
export CHECKLY_API_KEY=your_api_key_here
|
|
50
|
+
export CHECKLY_ACCOUNT_ID=your_account_id_here
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### 4. Run Your Tests
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
npx playwright test
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
You'll see a direct link to your test results:
|
|
60
|
+
|
|
61
|
+
```
|
|
62
|
+
View test results: https://app.checklyhq.com/test-sessions/abc123
|
|
63
|
+
|
|
64
|
+
Running 47 tests using 5 workers
|
|
65
|
+
47 passed (2.3s)
|
|
66
|
+
|
|
67
|
+
✓ Check the results: https://app.checklyhq.com/test-sessions/abc123
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Configuration
|
|
71
|
+
|
|
72
|
+
### Environment Variables
|
|
73
|
+
|
|
74
|
+
The reporter uses environment variables for configuration:
|
|
75
|
+
|
|
76
|
+
| Variable | Description | Required |
|
|
77
|
+
|----------|-------------|----------|
|
|
78
|
+
| `CHECKLY_API_KEY` | Your Checkly API key | Yes* |
|
|
79
|
+
| `CHECKLY_ACCOUNT_ID` | Your Checkly account ID | Yes* |
|
|
80
|
+
|
|
81
|
+
\* Required for uploading results. Without these, the reporter creates a local ZIP file only.
|
|
82
|
+
|
|
83
|
+
### Configuration Options
|
|
84
|
+
|
|
85
|
+
You can also pass options directly in `playwright.config.ts`:
|
|
86
|
+
|
|
87
|
+
```typescript
|
|
88
|
+
['@checkly/playwright-reporter', {
|
|
89
|
+
apiKey: process.env.CHECKLY_API_KEY, // Not recommended, use env vars
|
|
90
|
+
accountId: process.env.CHECKLY_ACCOUNT_ID, // Not recommended, use env vars
|
|
91
|
+
dryRun: false, // Skip API calls, only create local ZIP
|
|
92
|
+
outputPath: 'checkly-report.zip', // Custom ZIP output path
|
|
93
|
+
jsonReportPath: 'test-results/report.json', // Custom JSON report path
|
|
94
|
+
testResultsDir: 'test-results' // Custom test results directory
|
|
95
|
+
}]
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
| Option | Type | Default | Description |
|
|
99
|
+
|--------|------|---------|-------------|
|
|
100
|
+
| `dryRun` | `boolean` | `false` | Skip all API calls and only create local ZIP file |
|
|
101
|
+
| `apiKey` | `string` | - | Checkly API key (use env var instead) |
|
|
102
|
+
| `accountId` | `string` | - | Checkly account ID (use env var instead) |
|
|
103
|
+
| `outputPath` | `string` | `'checkly-report.zip'` | Path for the generated ZIP file |
|
|
104
|
+
| `jsonReportPath` | `string` | `'test-results/playwright-test-report.json'` | Path to JSON report |
|
|
105
|
+
| `testResultsDir` | `string` | `'test-results'` | Directory containing test results |
|
|
106
|
+
|
|
107
|
+
> **Security Note**: Always use environment variables for credentials. Never commit API keys to version control.
|
|
108
|
+
|
|
109
|
+
## How It Works
|
|
110
|
+
|
|
111
|
+
### Suite-Level Test Sessions
|
|
112
|
+
|
|
113
|
+
This reporter creates **one test session per test run**, not per individual test. The session is named after your project directory:
|
|
114
|
+
|
|
115
|
+
```
|
|
116
|
+
Directory: /Users/john/my-app
|
|
117
|
+
Session: Playwright Test Session: my-app
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
All test results, screenshots, videos, and traces are bundled together in a single session for easy analysis.
|
|
121
|
+
|
|
122
|
+
### Flaky Test Detection
|
|
123
|
+
|
|
124
|
+
The reporter automatically detects flaky tests:
|
|
125
|
+
|
|
126
|
+
- **Flaky Test**: A test that failed initially but passed on retry
|
|
127
|
+
- **Degraded Session**: A session with flaky tests but no complete failures
|
|
128
|
+
- **Failed Session**: A session where at least one test never passed
|
|
129
|
+
|
|
130
|
+
### What Gets Uploaded
|
|
131
|
+
|
|
132
|
+
- ✅ Test results and status (passed/failed/flaky)
|
|
133
|
+
- ✅ Test execution duration
|
|
134
|
+
- ✅ Screenshots (on failure or explicit capture)
|
|
135
|
+
- ✅ Videos (full recordings)
|
|
136
|
+
- ✅ Traces (Playwright traces for debugging)
|
|
137
|
+
- ✅ Complete JSON test report
|
|
138
|
+
|
|
139
|
+
## Usage Examples
|
|
140
|
+
|
|
141
|
+
### Dry Run Mode (No API Calls)
|
|
142
|
+
|
|
143
|
+
Use dry run mode to create ZIP files without making API calls:
|
|
144
|
+
|
|
145
|
+
```typescript
|
|
146
|
+
export default defineConfig({
|
|
147
|
+
reporter: [
|
|
148
|
+
['json', { outputFile: 'test-results/playwright-test-report.json' }],
|
|
149
|
+
['@checkly/playwright-reporter', {
|
|
150
|
+
dryRun: true // Skip all API calls, only create local ZIP
|
|
151
|
+
}]
|
|
152
|
+
],
|
|
153
|
+
});
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Perfect for:
|
|
157
|
+
- Local testing and validation
|
|
158
|
+
- CI/CD pipelines without credentials
|
|
159
|
+
- Debugging ZIP file contents
|
|
160
|
+
|
|
161
|
+
### Local Development (No Upload)
|
|
162
|
+
|
|
163
|
+
Run tests locally without uploading to Checkly:
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
# Simply don't set the environment variables
|
|
167
|
+
npx playwright test
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
The reporter will create a local `checkly-report.zip` file silently.
|
|
171
|
+
|
|
172
|
+
### Conditional Dry Run (CI vs Local)
|
|
173
|
+
|
|
174
|
+
Automatically use dry run in CI, but enable API calls locally:
|
|
175
|
+
|
|
176
|
+
```typescript
|
|
177
|
+
export default defineConfig({
|
|
178
|
+
reporter: [
|
|
179
|
+
['json', { outputFile: 'test-results/playwright-test-report.json' }],
|
|
180
|
+
['@checkly/playwright-reporter', {
|
|
181
|
+
dryRun: !!process.env.CI // Dry run in CI, normal mode locally
|
|
182
|
+
}]
|
|
183
|
+
],
|
|
184
|
+
});
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
This allows you to:
|
|
188
|
+
- Test locally with API credentials when available
|
|
189
|
+
- Run validation in CI without requiring secrets
|
|
190
|
+
- Keep ZIP files in CI for artifact upload
|
|
191
|
+
|
|
192
|
+
### GitHub Actions
|
|
193
|
+
|
|
194
|
+
```yaml
|
|
195
|
+
name: Playwright Tests
|
|
196
|
+
on: [push, pull_request]
|
|
197
|
+
|
|
198
|
+
jobs:
|
|
199
|
+
test:
|
|
200
|
+
runs-on: ubuntu-latest
|
|
201
|
+
steps:
|
|
202
|
+
- uses: actions/checkout@v4
|
|
203
|
+
|
|
204
|
+
- uses: actions/setup-node@v4
|
|
205
|
+
with:
|
|
206
|
+
node-version: 18
|
|
207
|
+
|
|
208
|
+
- name: Install dependencies
|
|
209
|
+
run: npm ci
|
|
210
|
+
|
|
211
|
+
- name: Install Playwright browsers
|
|
212
|
+
run: npx playwright install --with-deps
|
|
213
|
+
|
|
214
|
+
- name: Run Playwright tests
|
|
215
|
+
env:
|
|
216
|
+
CHECKLY_API_KEY: ${{ secrets.CHECKLY_API_KEY }}
|
|
217
|
+
CHECKLY_ACCOUNT_ID: ${{ secrets.CHECKLY_ACCOUNT_ID }}
|
|
218
|
+
run: npx playwright test
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
### Multiple Reporters
|
|
222
|
+
|
|
223
|
+
Combine with other Playwright reporters:
|
|
224
|
+
|
|
225
|
+
```typescript
|
|
226
|
+
export default defineConfig({
|
|
227
|
+
reporter: [
|
|
228
|
+
['json', { outputFile: 'test-results/playwright-test-report.json' }],
|
|
229
|
+
['@checkly/playwright-reporter'],
|
|
230
|
+
['html', { outputFolder: 'playwright-report' }],
|
|
231
|
+
['list']
|
|
232
|
+
],
|
|
233
|
+
});
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
## Documentation
|
|
237
|
+
|
|
238
|
+
- **[Configuration Guide](./docs/CONFIGURATION.md)** - Detailed configuration options
|
|
239
|
+
- **[Usage Examples](./docs/USAGE.md)** - Common patterns and CI/CD integration
|
|
240
|
+
- **[Troubleshooting](./docs/TROUBLESHOOTING.md)** - Solutions to common issues
|
|
241
|
+
|
|
242
|
+
## Contributing
|
|
243
|
+
|
|
244
|
+
We welcome contributions! Please see our contributing guidelines for more details.
|
|
245
|
+
|
|
246
|
+
### Development Setup
|
|
247
|
+
|
|
248
|
+
```bash
|
|
249
|
+
# Install dependencies
|
|
250
|
+
npm install
|
|
251
|
+
|
|
252
|
+
# Run tests
|
|
253
|
+
npm test
|
|
254
|
+
|
|
255
|
+
# Run type checking
|
|
256
|
+
npm run typecheck
|
|
257
|
+
|
|
258
|
+
# Build the project
|
|
259
|
+
npm run build
|
|
260
|
+
|
|
261
|
+
# Run linting
|
|
262
|
+
npm run lint
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
## Support
|
|
266
|
+
|
|
267
|
+
- **📖 Documentation**: [docs/](./docs) folder
|
|
268
|
+
|
|
269
|
+
## License
|
|
270
|
+
|
|
271
|
+
Apache-2.0 - see [LICENSE](LICENSE) file for details
|
|
272
|
+
|
|
273
|
+
## Links
|
|
274
|
+
|
|
275
|
+
- [Checkly Documentation](https://www.checklyhq.com/docs)
|
|
276
|
+
- [Playwright Documentation](https://playwright.dev/docs/test-reporters)
|
|
277
|
+
- [npm Package](https://www.npmjs.com/package/@checkly/playwright-reporter)
|
|
278
|
+
- [GitHub Repository](https://github.com/checkly/checkly-reporter)
|
|
279
|
+
|
|
280
|
+
---
|
|
281
|
+
|
|
282
|
+
Made with ❤️ by [Checkly](https://www.checklyhq.com)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a0_0x2ae888=a0_0x28d8;(function(_0x46ba4d,_0x389dc8){const _0x57ed6b=a0_0x28d8,_0x709a38=_0x46ba4d();while(!![]){try{const _0x246e21=-parseInt(_0x57ed6b(0xd3))/0x1*(parseInt(_0x57ed6b(0xb2))/0x2)+-parseInt(_0x57ed6b(0xc3))/0x3*(parseInt(_0x57ed6b(0xe7))/0x4)+-parseInt(_0x57ed6b(0xc1))/0x5*(-parseInt(_0x57ed6b(0xc5))/0x6)+parseInt(_0x57ed6b(0xbc))/0x7+-parseInt(_0x57ed6b(0xb5))/0x8+-parseInt(_0x57ed6b(0xbf))/0x9+parseInt(_0x57ed6b(0xcc))/0xa;if(_0x246e21===_0x389dc8)break;else _0x709a38['push'](_0x709a38['shift']());}catch(_0x3bc0c3){_0x709a38['push'](_0x709a38['shift']());}}}(a0_0x4b3f,0xea7ad));function a0_0x28d8(_0x3770b0,_0x22ab0e){const _0x4b3fb7=a0_0x4b3f();return a0_0x28d8=function(_0x28d8a5,_0x29d8bb){_0x28d8a5=_0x28d8a5-0xae;let _0x5ac84c=_0x4b3fb7[_0x28d8a5];return _0x5ac84c;},a0_0x28d8(_0x3770b0,_0x22ab0e);}import*as a0_0x18d630 from'fs';import*as a0_0x3366b8 from'path';function a0_0x4b3f(){const _0x37d3e6=['resolve','.jpg','isDirectory','name','29491030GpMLiq','application/zip','image/png','getVideoContentType','join','shouldSkipFile','image/svg+xml','3bTIUYF','.txt','.mov','determineAssetType','text/plain','.avi','.json','.log','attachment','trace','extname','screenshot','.png','.mp4','application/json','image/jpeg','readdirSync','testResultsDir','video','image/gif','712fOhECn','sep','add','includes','split','relative','.htm','video/webm','getImageContentType','isFile','1274164qaqLCG','collectAssets','other','9660104sthldG','createAsset','has','basename','text/html','.jpeg','collectAssetsRecursive','10426199FwfhEB','.webm','application/octet-stream','5905269BzpNHq','toLowerCase','252845RtqQWL','.gif','6078IdDGbQ','.html','78LzbDBU','existsSync','image/bmp'];a0_0x4b3f=function(){return _0x37d3e6;};return a0_0x4b3f();}export class AssetCollector{[a0_0x2ae888(0xe4)];constructor(_0xf9947f){const _0x1cb7bc=a0_0x2ae888;this[_0x1cb7bc(0xe4)]=_0xf9947f;}async[a0_0x2ae888(0xb3)](_0x14e7d0){const _0x3bc7a3=a0_0x2ae888,_0x27385d=[],_0x1a1c62=new Set();if(!a0_0x18d630[_0x3bc7a3(0xc6)](this[_0x3bc7a3(0xe4)]))return _0x27385d;return await this[_0x3bc7a3(0xbb)](this['testResultsDir'],'',_0x27385d,_0x1a1c62),_0x27385d;}async[a0_0x2ae888(0xbb)](_0x4214cd,_0x20bc38,_0x134b78,_0x166d97){const _0x580271=a0_0x2ae888;let _0x28f95c;try{_0x28f95c=a0_0x18d630[_0x580271(0xe3)](_0x4214cd,{'withFileTypes':!![]});}catch{return;}const _0xd29c50=a0_0x3366b8[_0x580271(0xb8)](a0_0x3366b8[_0x580271(0xc8)](this[_0x580271(0xe4)]));for(const _0x28024b of _0x28f95c){const _0x54f0e2=a0_0x3366b8[_0x580271(0xd0)](_0x4214cd,_0x28024b[_0x580271(0xcb)]),_0x2d60ea=a0_0x3366b8[_0x580271(0xec)](this[_0x580271(0xe4)],_0x54f0e2),_0x8f75b7=a0_0x3366b8[_0x580271(0xd0)](_0xd29c50,_0x2d60ea);if(this[_0x580271(0xd1)](_0x28024b[_0x580271(0xcb)]))continue;if(_0x28024b[_0x580271(0xca)]())await this[_0x580271(0xbb)](_0x54f0e2,_0x8f75b7,_0x134b78,_0x166d97);else{if(_0x28024b[_0x580271(0xb1)]()){if(!_0x166d97[_0x580271(0xb7)](_0x54f0e2)){const _0x3be748=this[_0x580271(0xb6)](_0x54f0e2,_0x8f75b7);_0x134b78['push'](_0x3be748),_0x166d97[_0x580271(0xe9)](_0x54f0e2);}}}}}[a0_0x2ae888(0xd1)](_0x3099ce){const _0x4ed598=[/^\./,/\.tmp$/i,/~$/,/\.swp$/i,/\.lock$/i,/^playwright-test-report\.json$/i];return _0x4ed598['some'](_0x1786e4=>_0x1786e4['test'](_0x3099ce));}[a0_0x2ae888(0xb6)](_0x5529fe,_0x1921da){const _0x4faada=a0_0x2ae888,_0x56f1d7=a0_0x3366b8[_0x4faada(0xdd)](_0x5529fe)[_0x4faada(0xc0)](),{type:_0x55b015,contentType:_0x232f04}=this[_0x4faada(0xd6)](_0x56f1d7),_0x14bd36=_0x1921da[_0x4faada(0xeb)](a0_0x3366b8[_0x4faada(0xe8)])[_0x4faada(0xd0)]('/');return{'sourcePath':_0x5529fe,'archivePath':_0x14bd36,'type':_0x55b015,'contentType':_0x232f04};}[a0_0x2ae888(0xd6)](_0x1485ec){const _0x3298f2=a0_0x2ae888;if([_0x3298f2(0xdf),_0x3298f2(0xc9),_0x3298f2(0xba),_0x3298f2(0xc2),'.bmp','.svg'][_0x3298f2(0xea)](_0x1485ec))return{'type':_0x3298f2(0xde),'contentType':this[_0x3298f2(0xb0)](_0x1485ec)};if([_0x3298f2(0xbd),_0x3298f2(0xe0),_0x3298f2(0xd8),_0x3298f2(0xd5)][_0x3298f2(0xea)](_0x1485ec))return{'type':_0x3298f2(0xe5),'contentType':this[_0x3298f2(0xcf)](_0x1485ec)};if(_0x1485ec==='.zip')return{'type':_0x3298f2(0xdc),'contentType':_0x3298f2(0xcd)};if(_0x1485ec===_0x3298f2(0xc4)||_0x1485ec===_0x3298f2(0xae))return{'type':_0x3298f2(0xdb),'contentType':_0x3298f2(0xb9)};if(_0x1485ec===_0x3298f2(0xd9))return{'type':_0x3298f2(0xdb),'contentType':_0x3298f2(0xe1)};if(_0x1485ec===_0x3298f2(0xd4)||_0x1485ec===_0x3298f2(0xda))return{'type':'attachment','contentType':_0x3298f2(0xd7)};return{'type':_0x3298f2(0xb4),'contentType':_0x3298f2(0xbe)};}[a0_0x2ae888(0xb0)](_0x58b575){const _0x18dc0f=a0_0x2ae888,_0x506c81={'.png':_0x18dc0f(0xce),'.jpg':'image/jpeg','.jpeg':_0x18dc0f(0xe2),'.gif':_0x18dc0f(0xe6),'.bmp':_0x18dc0f(0xc7),'.svg':_0x18dc0f(0xd2)};return _0x506c81[_0x58b575]||'image/png';}[a0_0x2ae888(0xcf)](_0x521dda){const _0x4e791f=a0_0x2ae888,_0x50f67a={'.webm':_0x4e791f(0xaf),'.mp4':'video/mp4','.avi':'video/x-msvideo','.mov':'video/quicktime'};return _0x50f67a[_0x521dda]||_0x4e791f(0xaf);}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var a1_0x362a8c=a1_0x36b9;(function(_0x766e07,_0x3491a4){var _0x3295d1=a1_0x36b9,_0x35062a=_0x766e07();while(!![]){try{var _0x4a82a4=-parseInt(_0x3295d1(0x11b))/0x1+parseInt(_0x3295d1(0x116))/0x2*(-parseInt(_0x3295d1(0x11d))/0x3)+parseInt(_0x3295d1(0x10a))/0x4*(-parseInt(_0x3295d1(0x119))/0x5)+parseInt(_0x3295d1(0x106))/0x6+parseInt(_0x3295d1(0x118))/0x7*(parseInt(_0x3295d1(0x108))/0x8)+-parseInt(_0x3295d1(0x105))/0x9+parseInt(_0x3295d1(0x113))/0xa;if(_0x4a82a4===_0x3491a4)break;else _0x35062a['push'](_0x35062a['shift']());}catch(_0x4aab05){_0x35062a['push'](_0x35062a['shift']());}}}(a1_0x352e,0x74c2d));import a1_0x307c78 from'axios';function a1_0x352e(){var _0x10dafc=['User-Agent','accountId','use','12112460mWQXqa','response','getAxiosInstance','122KLCPXU','apiKey','154UHHvoV','40qgmuVs','x-checkly-account','572834FTwghL','Authorization','43779zsmovj','headers','935352jrCRxy','3910848DGDfNk','request','133064evrYDH','api','91896vhXrbK','baseUrl','0.1.0','@checkly/playwright-reporter/','create','interceptors'];a1_0x352e=function(){return _0x10dafc;};return a1_0x352e();}import{handleErrorResponse}from'./errors.js';function getVersion(){var _0x359be0=a1_0x36b9;return _0x359be0(0x10c);}function a1_0x36b9(_0x4d3c1a,_0x3c6906){var _0x352e52=a1_0x352e();return a1_0x36b9=function(_0x36b96f,_0x71f01d){_0x36b96f=_0x36b96f-0x104;var _0x1dda25=_0x352e52[_0x36b96f];return _0x1dda25;},a1_0x36b9(_0x4d3c1a,_0x3c6906);}export function createRequestInterceptor(_0x4d4061,_0x4bbc4f){return _0x52fe02=>{var _0x2eb87f=a1_0x36b9;return _0x52fe02[_0x2eb87f(0x104)]&&(_0x52fe02[_0x2eb87f(0x104)][_0x2eb87f(0x11c)]='Bearer\x20'+_0x4d4061,_0x52fe02['headers'][_0x2eb87f(0x11a)]=_0x4bbc4f,_0x52fe02['headers'][_0x2eb87f(0x110)]=_0x2eb87f(0x10d)+getVersion()),_0x52fe02;};}export function createResponseErrorInterceptor(){return _0x470228=>{handleErrorResponse(_0x470228);};}export default class ChecklyClient{['apiKey'];[a1_0x362a8c(0x10b)];[a1_0x362a8c(0x111)];['api'];constructor(_0x412228){var _0x1262b9=a1_0x362a8c;this[_0x1262b9(0x111)]=_0x412228[_0x1262b9(0x111)],this[_0x1262b9(0x117)]=_0x412228['apiKey'],this['baseUrl']=_0x412228[_0x1262b9(0x10b)],this[_0x1262b9(0x109)]=a1_0x307c78[_0x1262b9(0x10e)]({'baseURL':this[_0x1262b9(0x10b)],'timeout':0x7530}),this[_0x1262b9(0x109)][_0x1262b9(0x10f)][_0x1262b9(0x107)][_0x1262b9(0x112)](createRequestInterceptor(this[_0x1262b9(0x117)],this[_0x1262b9(0x111)])),this['api'][_0x1262b9(0x10f)][_0x1262b9(0x114)][_0x1262b9(0x112)](_0x5d8939=>_0x5d8939,createResponseErrorInterceptor());}[a1_0x362a8c(0x115)](){return this['api'];}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a2_0x51a0(_0xecfb3f,_0x4e3fce){const _0x4dc573=a2_0x4dc5();return a2_0x51a0=function(_0x51a098,_0x33c2da){_0x51a098=_0x51a098-0x18f;let _0x1633ca=_0x4dc573[_0x51a098];return _0x1633ca;},a2_0x51a0(_0xecfb3f,_0x4e3fce);}(function(_0x42d6a7,_0x3f265a){const _0x1ad6c2=a2_0x51a0,_0x31362b=_0x42d6a7();while(!![]){try{const _0x2f046b=-parseInt(_0x1ad6c2(0x19c))/0x1+-parseInt(_0x1ad6c2(0x197))/0x2+parseInt(_0x1ad6c2(0x19e))/0x3*(parseInt(_0x1ad6c2(0x192))/0x4)+parseInt(_0x1ad6c2(0x1a2))/0x5*(parseInt(_0x1ad6c2(0x194))/0x6)+parseInt(_0x1ad6c2(0x19f))/0x7+-parseInt(_0x1ad6c2(0x193))/0x8*(parseInt(_0x1ad6c2(0x199))/0x9)+parseInt(_0x1ad6c2(0x18f))/0xa;if(_0x2f046b===_0x3f265a)break;else _0x31362b['push'](_0x31362b['shift']());}catch(_0x3bddf8){_0x31362b['push'](_0x31362b['shift']());}}}(a2_0x4dc5,0xd8ea9));export class ApiError extends Error{['data'];constructor(_0x1bb63f,_0xbad73b){const _0x59f70a=a2_0x51a0;super(_0x1bb63f[_0x59f70a(0x1a0)],_0xbad73b),this['name']=this[_0x59f70a(0x191)][_0x59f70a(0x1a3)],this['data']=_0x1bb63f;}}export class ValidationError extends ApiError{constructor(_0x39ab6e,_0x19570e){super(_0x39ab6e,_0x19570e);}}export class UnauthorizedError extends ApiError{constructor(_0x5a1292,_0x4f45d0){super(_0x5a1292,_0x4f45d0);}}export class ForbiddenError extends ApiError{constructor(_0x4fa795,_0x3af3f4){super(_0x4fa795,_0x3af3f4);}}export class NotFoundError extends ApiError{constructor(_0x4f83c7,_0x3f4d9f){super(_0x4f83c7,_0x3f4d9f);}}function a2_0x4dc5(){const _0x13359a=['244ybLyYK','2096xHsuxs','12Buaehp','response','Unknown\x20error','3039702YBhNRq','object','43677CMGiij','errorCode','error','1169874pNhaLl','An\x20error\x20occurred','47772jZIyCA','9949499krsogD','message','string','1408540dppOyY','name','Network\x20error','18935630bSnAqk','statusCode','constructor'];a2_0x4dc5=function(){return _0x13359a;};return a2_0x4dc5();}export class RequestTimeoutError extends ApiError{constructor(_0x58830c,_0x34e2de){super(_0x58830c,_0x34e2de);}}export class ConflictError extends ApiError{constructor(_0x565be4,_0x2e04e4){super(_0x565be4,_0x2e04e4);}}export class ServerError extends ApiError{constructor(_0x536db4,_0x49bf48){super(_0x536db4,_0x49bf48);}}export class MiscellaneousError extends ApiError{constructor(_0x2f6daa,_0x390025){super(_0x2f6daa,_0x390025);}}export class MissingResponseError extends Error{constructor(_0x3fa6c1,_0x4142a1){const _0x5887bc=a2_0x51a0;super(_0x3fa6c1,_0x4142a1),this[_0x5887bc(0x1a3)]='MissingResponseError';}}export function parseErrorData(_0x1272a0,_0x2885c2){const _0x4fae44=a2_0x51a0;if(!_0x1272a0)return undefined;if(typeof _0x1272a0==='object'&&_0x1272a0[_0x4fae44(0x190)]&&_0x1272a0[_0x4fae44(0x19b)]&&_0x1272a0[_0x4fae44(0x1a0)])return{'statusCode':_0x1272a0['statusCode'],'error':_0x1272a0[_0x4fae44(0x19b)],'message':_0x1272a0[_0x4fae44(0x1a0)],'errorCode':_0x1272a0[_0x4fae44(0x19a)]};if(typeof _0x1272a0===_0x4fae44(0x198)&&_0x1272a0[_0x4fae44(0x19b)]&&!_0x1272a0[_0x4fae44(0x1a0)])return{'statusCode':_0x2885c2[_0x4fae44(0x190)],'error':_0x1272a0[_0x4fae44(0x19b)],'message':_0x1272a0[_0x4fae44(0x19b)]};if(typeof _0x1272a0===_0x4fae44(0x198)&&_0x1272a0[_0x4fae44(0x19b)]&&_0x1272a0['message'])return{'statusCode':_0x2885c2['statusCode'],'error':_0x1272a0[_0x4fae44(0x19b)],'message':_0x1272a0[_0x4fae44(0x1a0)],'errorCode':_0x1272a0[_0x4fae44(0x19a)]};if(typeof _0x1272a0==='object'&&_0x1272a0[_0x4fae44(0x1a0)])return{'statusCode':_0x2885c2['statusCode'],'error':_0x1272a0[_0x4fae44(0x1a0)],'message':_0x1272a0[_0x4fae44(0x1a0)],'errorCode':_0x1272a0[_0x4fae44(0x19a)]};if(typeof _0x1272a0===_0x4fae44(0x1a1))return{'statusCode':_0x2885c2['statusCode'],'error':_0x1272a0,'message':_0x1272a0};return undefined;}export function handleErrorResponse(_0x153cb8){const _0x6d336=a2_0x51a0;if(!_0x153cb8[_0x6d336(0x195)])throw new MissingResponseError(_0x153cb8[_0x6d336(0x1a0)]||_0x6d336(0x1a4));const {status:_0x584369,data:_0x54d0e5}=_0x153cb8[_0x6d336(0x195)],_0x19bfb8=parseErrorData(_0x54d0e5,{'statusCode':_0x584369});if(!_0x19bfb8)throw new MiscellaneousError({'statusCode':_0x584369,'error':_0x6d336(0x196),'message':_0x153cb8[_0x6d336(0x1a0)]||_0x6d336(0x19d)});switch(_0x584369){case 0x190:throw new ValidationError(_0x19bfb8);case 0x191:throw new UnauthorizedError(_0x19bfb8);case 0x193:throw new ForbiddenError(_0x19bfb8);case 0x194:throw new NotFoundError(_0x19bfb8);case 0x198:throw new RequestTimeoutError(_0x19bfb8);case 0x199:throw new ConflictError(_0x19bfb8);default:if(_0x584369>=0x1f4)throw new ServerError(_0x19bfb8);throw new MiscellaneousError(_0x19bfb8);}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a3_0x50d9(){var _0xfabedc=['1582917bcdZrT','15667092DzwQbB','224810hgbEfX','495484uxBRJX','4GhhDwz','1002444sQTSJh','1MgHzrE','5662375QNTABP','2923989JDQdvk','16GMhZPw'];a3_0x50d9=function(){return _0xfabedc;};return a3_0x50d9();}(function(_0x45d63c,_0x2e1ea9){var _0x4ef644=a3_0x3a4c,_0x3bbbd4=_0x45d63c();while(!![]){try{var _0xecd8da=parseInt(_0x4ef644(0x174))/0x1*(parseInt(_0x4ef644(0x17b))/0x2)+-parseInt(_0x4ef644(0x176))/0x3*(-parseInt(_0x4ef644(0x17c))/0x4)+parseInt(_0x4ef644(0x175))/0x5+-parseInt(_0x4ef644(0x173))/0x6+-parseInt(_0x4ef644(0x178))/0x7*(-parseInt(_0x4ef644(0x177))/0x8)+-parseInt(_0x4ef644(0x179))/0x9+-parseInt(_0x4ef644(0x17a))/0xa;if(_0xecd8da===_0x2e1ea9)break;else _0x3bbbd4['push'](_0x3bbbd4['shift']());}catch(_0x79a918){_0x3bbbd4['push'](_0x3bbbd4['shift']());}}}(a3_0x50d9,0xd60ff));export{default as ChecklyClient}from'./checkly-client.js';export{TestResults}from'./test-results.js';function a3_0x3a4c(_0x644582,_0x448938){var _0x50d9c9=a3_0x50d9();return a3_0x3a4c=function(_0x3a4c1c,_0x315483){_0x3a4c1c=_0x3a4c1c-0x173;var _0x380679=_0x50d9c9[_0x3a4c1c];return _0x380679;},a3_0x3a4c(_0x644582,_0x448938);}export*from'./types.js';export*from'./errors.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a4_0x2480c9=a4_0x57b8;(function(_0x412bd7,_0x4d0c66){const _0x39ef07=a4_0x57b8,_0x14479f=_0x412bd7();while(!![]){try{const _0x2d6926=-parseInt(_0x39ef07(0x8f))/0x1*(parseInt(_0x39ef07(0x84))/0x2)+-parseInt(_0x39ef07(0x8d))/0x3*(-parseInt(_0x39ef07(0x83))/0x4)+-parseInt(_0x39ef07(0x8a))/0x5*(-parseInt(_0x39ef07(0x8e))/0x6)+parseInt(_0x39ef07(0x91))/0x7+parseInt(_0x39ef07(0x86))/0x8*(-parseInt(_0x39ef07(0x85))/0x9)+parseInt(_0x39ef07(0x93))/0xa+-parseInt(_0x39ef07(0x89))/0xb*(-parseInt(_0x39ef07(0x8c))/0xc);if(_0x2d6926===_0x4d0c66)break;else _0x14479f['push'](_0x14479f['shift']());}catch(_0x415759){_0x14479f['push'](_0x14479f['shift']());}}}(a4_0x1a9f,0x58e54));function a4_0x57b8(_0xce2879,_0x5266bf){const _0x1a9faa=a4_0x1a9f();return a4_0x57b8=function(_0x57b877,_0x41a2ef){_0x57b877=_0x57b877-0x83;let _0x913912=_0x1a9faa[_0x57b877];return _0x913912;},a4_0x57b8(_0xce2879,_0x5266bf);}function a4_0x1a9f(){const _0x3843fa=['3fBAVqm','114Nggdji','39199VKmFSS','post','3866758oXUBOh','updateTestResult','1578920SbPnGl','data','330076kCDcIg','14TxbuQn','117gVFzNF','355480FlsuRZ','api','/next/test-sessions/create','11gvKlvj','3655xNKOJK','createTestSession','4913640hHBbRR'];a4_0x1a9f=function(){return _0x3843fa;};return a4_0x1a9f();}export class TestResults{[a4_0x2480c9(0x87)];constructor(_0x1104fe){this['api']=_0x1104fe;}async[a4_0x2480c9(0x8b)](_0x44e615){const _0x18a1f5=a4_0x2480c9,_0x5f49a2=await this['api']['post'](_0x18a1f5(0x88),_0x44e615);return _0x5f49a2[_0x18a1f5(0x94)];}async[a4_0x2480c9(0x92)](_0x1a4048,_0x155833,_0x1c874e){const _0x182157=a4_0x2480c9,_0x21a700=await this['api'][_0x182157(0x90)]('/next/test-sessions/'+_0x1a4048+'/results/'+_0x155833,_0x1c874e);return _0x21a700[_0x182157(0x94)];}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x50c556,_0x4872fb){var _0x1dbd5b=a6_0x4ada,_0x3f6b7e=_0x50c556();while(!![]){try{var _0x3b2139=-parseInt(_0x1dbd5b(0x182))/0x1*(-parseInt(_0x1dbd5b(0x188))/0x2)+parseInt(_0x1dbd5b(0x17f))/0x3*(parseInt(_0x1dbd5b(0x181))/0x4)+-parseInt(_0x1dbd5b(0x187))/0x5*(parseInt(_0x1dbd5b(0x186))/0x6)+-parseInt(_0x1dbd5b(0x185))/0x7+parseInt(_0x1dbd5b(0x183))/0x8+parseInt(_0x1dbd5b(0x180))/0x9+-parseInt(_0x1dbd5b(0x184))/0xa;if(_0x3b2139===_0x4872fb)break;else _0x3f6b7e['push'](_0x3f6b7e['shift']());}catch(_0xc4fd98){_0x3f6b7e['push'](_0x3f6b7e['shift']());}}}(a6_0x1e5e,0x90880));export{ChecklyReporter}from'./reporter.js';function a6_0x4ada(_0x1c1979,_0x55ab10){var _0x1e5e65=a6_0x1e5e();return a6_0x4ada=function(_0x4ada00,_0x247827){_0x4ada00=_0x4ada00-0x17f;var _0x3fad5f=_0x1e5e65[_0x4ada00];return _0x3fad5f;},a6_0x4ada(_0x1c1979,_0x55ab10);}function a6_0x1e5e(){var _0x28fab3=['4422627lESyKz','3343888TAXmyQ','34511ZPMAxE','7701328xoJlvA','9794230ZraWes','4912089uFnXqX','12vuDqfn','818725FBHKeJ','18zBMdch','3UiEYTV'];a6_0x1e5e=function(){return _0x28fab3;};return a6_0x1e5e();}export{AssetCollector}from'./asset-collector.js';export{Zipper}from'./zipper.js';export{ChecklyReporter as default}from'./reporter.js';
|
package/dist/reporter.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a7_0x3c81c2=a7_0x3198;(function(_0x20887,_0x5db581){const _0x20efd1=a7_0x3198,_0x221d97=_0x20887();while(!![]){try{const _0x53f0f9=parseInt(_0x20efd1(0x231))/0x1+-parseInt(_0x20efd1(0x216))/0x2*(parseInt(_0x20efd1(0x232))/0x3)+-parseInt(_0x20efd1(0x24d))/0x4*(-parseInt(_0x20efd1(0x21a))/0x5)+parseInt(_0x20efd1(0x20c))/0x6*(-parseInt(_0x20efd1(0x238))/0x7)+-parseInt(_0x20efd1(0x22f))/0x8*(parseInt(_0x20efd1(0x22d))/0x9)+parseInt(_0x20efd1(0x22a))/0xa*(-parseInt(_0x20efd1(0x21e))/0xb)+parseInt(_0x20efd1(0x1fd))/0xc;if(_0x53f0f9===_0x5db581)break;else _0x221d97['push'](_0x221d97['shift']());}catch(_0x4667f2){_0x221d97['push'](_0x221d97['shift']());}}}(a7_0xb563,0xa0bda));import*as a7_0x1c004a from'fs';import*as a7_0x170a41 from'path';function a7_0xb563(){const _0x54938b=['[Checkly\x20Reporter]\x20Error\x20in\x20onTestEnd:','unlinkSync','2HKYVXz','failed','createZip','FAILED','3805ZmBMMX','environment','GITHUB_SHA','CHECKLY_ENV','11OveDgx','getTime','then','max','status','uploadResults','GITHUB_REF_NAME','assetCollector','retries','env','[Checkly\x20Reporter]\x20ERROR:\x20JSON\x20report\x20not\x20found\x20at:\x20','[Checkly\x20Reporter]\x20Make\x20sure\x20to\x20configure\x20the\x20json\x20reporter\x20before\x20the\x20checkly\x20reporter:','6008680BBjpDx','https://api.checklyhq.com','test-results','1386OYuOIB','\x20\x20\x20\x20[\x27@checkly/playwright-reporter\x27]\x0a','13240znTsfh','\x20\x20reporter:\x20[\x0a','626874wgWoUr','1370064FwRgvi','testResultsDir','log','CHECKLY_API_KEY','\x22,\x20using\x20\x22production\x22','local','7270837mVClnQ','GITHUB_ACTOR','test-results/playwright-test-report.json','toString','dryRun','passed','\x20\x20]','retry','accountId','https://github.com/','playwright-tests','CHECKLY_ACCOUNT_ID','link','zipPath','onEnd','base64','\x0a✓\x20Check\x20the\x20results:\x20','[Checkly\x20Reporter]\x20Failed\x20to\x20upload\x20results:','jsonReportPath','http://127.0.0.1:3000','zipper','2692OlcZGf','entries','onTestEnd','development','collectAssets','testResults','utf-8','testCounts','production','https://api-test.checklyhq.com','warn','toISOString','testSessionId','message','outcome','substring','basename','error','replace','length','22445808EsfbGU','[Checkly\x20Reporter]\x20Warning:\x20Could\x20not\x20delete\x20ZIP\x20file:\x20','testSession','includes','readFileSync','updateTestResult','startTime','[Checkly\x20Reporter]\x20Failed\x20to\x20create\x20test\x20session:','apiKey','parse','[Checkly\x20Reporter]\x20Invalid\x20environment\x20\x22','GITHUB_REPOSITORY','getAxiosInstance','https://api-dev.checklyhq.com','[Checkly\x20Reporter]\x20ERROR\x20creating\x20report:','6XABJTY','\x20\x20\x20\x20[\x27json\x27,\x20{\x20outputFile:\x20\x27test-results/playwright-test-report.json\x27\x20}],\x0a','onError','checkly-report.zip','\x0aView\x20test\x20results:\x20','options','Playwright\x20Test\x20Session:\x20','flaky'];a7_0xb563=function(){return _0x54938b;};return a7_0xb563();}import{AssetCollector}from'./asset-collector.js';import{Zipper}from'./zipper.js';import a7_0xc777d from'./clients/checkly-client.js';import{TestResults}from'./clients/test-results.js';function getApiUrl(_0x1e7558){const _0x319871=a7_0x3198,_0xf4991a={'local':_0x319871(0x24b),'development':_0x319871(0x20a),'staging':_0x319871(0x1f2),'production':_0x319871(0x22b)};return _0xf4991a[_0x1e7558];}function a7_0x3198(_0x24d902,_0x26fcdb){const _0xb563ad=a7_0xb563();return a7_0x3198=function(_0x319852,_0x10fbb6){_0x319852=_0x319852-0x1ef;let _0x16bfb1=_0xb563ad[_0x319852];return _0x16bfb1;},a7_0x3198(_0x24d902,_0x26fcdb);}function getEnvironment(_0x110d2b){const _0xb33f0c=a7_0x3198,_0x2c43b6=_0x110d2b?.[_0xb33f0c(0x21b)],_0x31612b=process['env'][_0xb33f0c(0x21d)],_0x2d4450=_0x2c43b6||_0x31612b||'production',_0x1331cf=[_0xb33f0c(0x237),_0xb33f0c(0x250),'staging',_0xb33f0c(0x1f1)];if(!_0x1331cf[_0xb33f0c(0x200)](_0x2d4450))return console[_0xb33f0c(0x1f3)](_0xb33f0c(0x207)+_0x2d4450+_0xb33f0c(0x236)),_0xb33f0c(0x1f1);return _0x2d4450;}function getDirectoryName(){const _0x22308a=a7_0x3198,_0x1813a9=process['cwd']();let _0x1688fa=a7_0x170a41[_0x22308a(0x1f9)](_0x1813a9);return(!_0x1688fa||_0x1688fa==='/'||_0x1688fa==='.')&&(_0x1688fa=_0x22308a(0x242)),_0x1688fa=_0x1688fa[_0x22308a(0x1fb)](/[<>:"|?*]/g,'-'),_0x1688fa[_0x22308a(0x1fc)]>0xff&&(_0x1688fa=_0x1688fa[_0x22308a(0x1f8)](0x0,0xff)),_0x1688fa;}export class ChecklyReporter{['options'];[a7_0x3c81c2(0x225)];[a7_0x3c81c2(0x24c)];['testResults'];[a7_0x3c81c2(0x1ff)];[a7_0x3c81c2(0x203)];[a7_0x3c81c2(0x1f0)]={'passed':0x0,'failed':0x0,'flaky':0x0};constructor(_0x1e662d={}){const _0x3b9b1f=a7_0x3c81c2,_0x4a4c00=getEnvironment(_0x1e662d),_0x405c56=getApiUrl(_0x4a4c00),_0x1a09e1=process['env'][_0x3b9b1f(0x235)]||_0x1e662d[_0x3b9b1f(0x205)],_0x157d6f=process[_0x3b9b1f(0x227)][_0x3b9b1f(0x243)]||_0x1e662d['accountId'];this['options']={'accountId':_0x157d6f,'apiKey':_0x1a09e1,'outputPath':_0x1e662d['outputPath']??_0x3b9b1f(0x20f),'jsonReportPath':_0x1e662d[_0x3b9b1f(0x24a)]??_0x3b9b1f(0x23a),'testResultsDir':_0x1e662d[_0x3b9b1f(0x233)]??_0x3b9b1f(0x22c),'dryRun':_0x1e662d[_0x3b9b1f(0x23c)]??![]},this['assetCollector']=new AssetCollector(this[_0x3b9b1f(0x211)][_0x3b9b1f(0x233)]),this[_0x3b9b1f(0x24c)]=new Zipper({'outputPath':this[_0x3b9b1f(0x211)]['outputPath']});if(!this[_0x3b9b1f(0x211)][_0x3b9b1f(0x23c)]&&this[_0x3b9b1f(0x211)][_0x3b9b1f(0x205)]&&this[_0x3b9b1f(0x211)][_0x3b9b1f(0x240)]){const _0x10eb6b=new a7_0xc777d({'apiKey':this[_0x3b9b1f(0x211)][_0x3b9b1f(0x205)],'accountId':this['options'][_0x3b9b1f(0x240)],'baseUrl':_0x405c56});this[_0x3b9b1f(0x252)]=new TestResults(_0x10eb6b[_0x3b9b1f(0x209)]());}}['onBegin'](_0x1a2680,_0x3e44c0){const _0x1a9f9c=a7_0x3c81c2;this['startTime']=new Date();if(!this[_0x1a9f9c(0x252)])return;try{const _0x4e6666=getDirectoryName(),_0x32e461=[{'name':_0x4e6666}],_0x2a2f77=process[_0x1a9f9c(0x227)][_0x1a9f9c(0x208)]?_0x1a9f9c(0x241)+process['env'][_0x1a9f9c(0x208)]:undefined,_0x108c94=_0x2a2f77?{'repoUrl':_0x2a2f77,'commitId':process[_0x1a9f9c(0x227)][_0x1a9f9c(0x21c)],'branchName':process['env'][_0x1a9f9c(0x224)],'commitOwner':process['env'][_0x1a9f9c(0x239)],'commitMessage':process['env']['GITHUB_EVENT_NAME']}:undefined;this[_0x1a9f9c(0x252)]['createTestSession']({'name':_0x1a9f9c(0x212)+_0x4e6666,'environment':process[_0x1a9f9c(0x227)]['NODE_ENV']||'test','repoInfo':_0x108c94,'startedAt':this[_0x1a9f9c(0x203)]['getTime'](),'testResults':_0x32e461,'provider':'PW_REPORTER'})[_0x1a9f9c(0x220)](_0x5eef7f=>{const _0x54064c=_0x1a9f9c;this[_0x54064c(0x1ff)]=_0x5eef7f,_0x5eef7f['link']&&console[_0x54064c(0x234)](_0x54064c(0x210)+_0x5eef7f[_0x54064c(0x244)]+'\x0a');})['catch'](_0x3a39db=>{const _0x47dba7=_0x1a9f9c;console[_0x47dba7(0x1fa)](_0x47dba7(0x204),_0x3a39db[_0x47dba7(0x1f6)]);});}catch(_0x56b3bf){console[_0x1a9f9c(0x1fa)]('[Checkly\x20Reporter]\x20Error\x20in\x20onBegin:',_0x56b3bf);}}[a7_0x3c81c2(0x24f)](_0x34a195,_0x1598f4){const _0x5c51b8=a7_0x3c81c2;try{const _0x2749b7=_0x1598f4[_0x5c51b8(0x222)]===_0x5c51b8(0x23d)||_0x1598f4[_0x5c51b8(0x23f)]===_0x34a195[_0x5c51b8(0x226)];if(!_0x2749b7)return;const _0xad7469=_0x34a195[_0x5c51b8(0x1f7)]()===_0x5c51b8(0x213);if(_0xad7469)this[_0x5c51b8(0x1f0)][_0x5c51b8(0x213)]++,this[_0x5c51b8(0x1f0)]['passed']++;else{if(_0x1598f4[_0x5c51b8(0x222)]===_0x5c51b8(0x23d))this['testCounts'][_0x5c51b8(0x23d)]++;else _0x1598f4[_0x5c51b8(0x222)]===_0x5c51b8(0x217)&&this['testCounts'][_0x5c51b8(0x217)]++;}}catch(_0x7de3c3){console['error'](_0x5c51b8(0x214),_0x7de3c3);}}async[a7_0x3c81c2(0x246)](){const _0x1071af=a7_0x3c81c2;try{const _0x525502=this[_0x1071af(0x211)][_0x1071af(0x24a)];if(!a7_0x1c004a['existsSync'](_0x525502)){console[_0x1071af(0x1fa)](_0x1071af(0x228)+_0x525502),console['error'](_0x1071af(0x229)),console[_0x1071af(0x1fa)](_0x1071af(0x230)+_0x1071af(0x20d)+_0x1071af(0x22e)+_0x1071af(0x23e));return;}const _0x33927c=a7_0x1c004a[_0x1071af(0x201)](_0x525502,_0x1071af(0x1ef)),_0x1e9607=JSON[_0x1071af(0x206)](_0x33927c),_0x22574f=await this[_0x1071af(0x225)][_0x1071af(0x251)](_0x1e9607),_0x42d609=await this[_0x1071af(0x24c)][_0x1071af(0x218)](_0x525502,_0x22574f);if(this[_0x1071af(0x252)]&&this['testSession']){await this[_0x1071af(0x223)](_0x1e9607,_0x42d609[_0x1071af(0x245)],_0x42d609[_0x1071af(0x24e)]);if(!this[_0x1071af(0x211)][_0x1071af(0x23c)])try{a7_0x1c004a[_0x1071af(0x215)](_0x42d609[_0x1071af(0x245)]);}catch(_0x5531a3){console[_0x1071af(0x1f3)](_0x1071af(0x1fe)+_0x5531a3);}}this[_0x1071af(0x252)]&&this[_0x1071af(0x1ff)]?.['link']&&console[_0x1071af(0x234)](_0x1071af(0x248)+this[_0x1071af(0x1ff)][_0x1071af(0x244)]+'\x0a');}catch(_0x43ea95){console[_0x1071af(0x1fa)](_0x1071af(0x20b),_0x43ea95);}}async['uploadResults'](_0x36c35c,_0xb64d9f,_0x92279a){const _0x4ef755=a7_0x3c81c2;if(!this[_0x4ef755(0x252)]||!this['testSession'])return;try{const {failed:_0x389f03,flaky:_0x21a2b1}=this[_0x4ef755(0x1f0)],_0x4c54ee=_0x389f03>0x0?_0x4ef755(0x219):'PASSED',_0x4a160f=_0x389f03===0x0&&_0x21a2b1>0x0,_0x21cd2f=new Date(),_0x495abd=this['startTime']?Math[_0x4ef755(0x221)](0x0,_0x21cd2f['getTime']()-this[_0x4ef755(0x203)][_0x4ef755(0x21f)]()):0x0,_0x2b6fe7=a7_0x1c004a[_0x4ef755(0x201)](_0xb64d9f),_0x3c9e1c=_0x2b6fe7[_0x4ef755(0x1fc)],_0x203051=_0x2b6fe7[_0x4ef755(0x23b)](_0x4ef755(0x247));if(this['testSession']['testResults'][_0x4ef755(0x1fc)]>0x0){const _0xe2219f=this[_0x4ef755(0x1ff)][_0x4ef755(0x252)][0x0];await this[_0x4ef755(0x252)][_0x4ef755(0x202)](this[_0x4ef755(0x1ff)][_0x4ef755(0x1f5)],_0xe2219f['testResultId'],{'status':_0x4c54ee,'isDegraded':_0x4a160f,'startedAt':this[_0x4ef755(0x203)]?.[_0x4ef755(0x1f4)](),'stoppedAt':_0x21cd2f[_0x4ef755(0x1f4)](),'responseTime':_0x495abd,'assets':{'assetsZip':_0x203051,'entries':_0x92279a},'metadata':{'usageData':{'s3PostTotalBytes':_0x3c9e1c}}});}}catch(_0x4e78ef){const _0x366716=_0x4e78ef instanceof Error?_0x4e78ef[_0x4ef755(0x1f6)]:String(_0x4e78ef);console[_0x4ef755(0x1fa)](_0x4ef755(0x249),_0x366716);}}[a7_0x3c81c2(0x20e)](_0x34009b){const _0x56579c=a7_0x3c81c2;console[_0x56579c(0x1fa)]('[Checkly\x20Reporter]\x20Global\x20error:',_0x34009b);}}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
package/dist/zipper.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a9_0x12b300=a9_0x52e7;(function(_0x341d5c,_0x884f12){const _0x344eaf=a9_0x52e7,_0x2fbe5d=_0x341d5c();while(!![]){try{const _0x17507c=parseInt(_0x344eaf(0x7f))/0x1+parseInt(_0x344eaf(0x96))/0x2+-parseInt(_0x344eaf(0x93))/0x3*(parseInt(_0x344eaf(0x8e))/0x4)+parseInt(_0x344eaf(0x7c))/0x5*(parseInt(_0x344eaf(0x6b))/0x6)+-parseInt(_0x344eaf(0x64))/0x7*(parseInt(_0x344eaf(0x83))/0x8)+-parseInt(_0x344eaf(0x85))/0x9*(parseInt(_0x344eaf(0x84))/0xa)+parseInt(_0x344eaf(0x91))/0xb*(parseInt(_0x344eaf(0x94))/0xc);if(_0x17507c===_0x884f12)break;else _0x2fbe5d['push'](_0x2fbe5d['shift']());}catch(_0x3eecc7){_0x2fbe5d['push'](_0x2fbe5d['shift']());}}}(a9_0x5bd9,0x31898));import*as a9_0x4850ec from'fs';import*as a9_0x432313 from'path';import*as a9_0x1d11c1 from'os';function a9_0x52e7(_0xa07084,_0xf4cf90){const _0x5bd937=a9_0x5bd9();return a9_0x52e7=function(_0x52e746,_0x13f8d8){_0x52e746=_0x52e746-0x64;let _0x33a2e3=_0x5bd937[_0x52e746];return _0x33a2e3;},a9_0x52e7(_0xa07084,_0xf4cf90);}function a9_0x5bd9(){const _0x52865f=['warn','output/playwright-test-report.json','pipe','existsSync','name','path','96892brZFgs','join','readFileSync','3949nxKyAw','Report\x20file\x20not\x20found:\x20','21ytjOey','10764liFhyt','playwright-test-report-','269684YcIJHb','259qIMzon','transformAttachmentPaths','archivePath','test-results','length','substring','close','96Hfaipt','pointer','contents','_offsets','.json','file','parse','transformJsonReport','attachments','sourcePath','forEach','[Checkly\x20Reporter]\x20Could\x20not\x20normalize\x20attachment\x20path:\x20','error','normalizeAttachmentPath','replace','createWriteStream','now','6610DapwEW','push','csize','363982vcLBoS','string','indexOf','outputPath','59752WjeFkG','1931810ftDYjC','9BtIziF','object','entry'];a9_0x5bd9=function(){return _0x52865f;};return a9_0x5bd9();}import{ZipArchive}from'archiver';export class Zipper{[a9_0x12b300(0x82)];constructor(_0x598a15){const _0x560ac2=a9_0x12b300;this[_0x560ac2(0x82)]=_0x598a15['outputPath'];}async['createZip'](_0x3c9cb9,_0x146765){const _0x40169f=[];return new Promise((_0x5e086a,_0x58607a)=>{const _0x3247e1=a9_0x52e7;try{const _0x310898=a9_0x4850ec[_0x3247e1(0x7a)](this['outputPath']),_0xedd8f7=new ZipArchive({'zlib':{'level':0x0}});_0xedd8f7['on'](_0x3247e1(0x87),_0x4b0432=>{const _0x9609e8=_0x3247e1,_0x2123fb=_0x4b0432[_0x9609e8(0x8c)][_0x9609e8(0x79)](/\\/g,'/'),_0x4ae705=_0x4b0432[_0x9609e8(0x6e)]?.[_0x9609e8(0x6d)]??0x0,_0x483b63=_0x4b0432[_0x9609e8(0x6e)]?.[_0x9609e8(0x6d)]+(_0x4b0432[_0x9609e8(0x7e)]??0x0)-0x1;_0x40169f[_0x9609e8(0x7d)]({'name':_0x2123fb,'start':_0x4ae705,'end':_0x483b63});}),_0x310898['on'](_0x3247e1(0x6a),()=>{const _0x19cf30=_0x3247e1,_0xaba27a=_0xedd8f7[_0x19cf30(0x6c)]();_0x5e086a({'zipPath':this['outputPath'],'size':_0xaba27a,'entryCount':_0x40169f[_0x19cf30(0x68)],'entries':_0x40169f});}),_0xedd8f7['on']('error',_0x46deb9=>{_0x58607a(_0x46deb9);}),_0x310898['on'](_0x3247e1(0x77),_0x21f686=>{_0x58607a(_0x21f686);}),_0xedd8f7[_0x3247e1(0x8a)](_0x310898);if(!a9_0x4850ec['existsSync'](_0x3c9cb9)){_0x58607a(new Error(_0x3247e1(0x92)+_0x3c9cb9));return;}const _0x54bc89=this[_0x3247e1(0x72)](_0x3c9cb9);_0xedd8f7[_0x3247e1(0x70)](_0x54bc89,{'name':_0x3247e1(0x89)});for(const _0x466aca of _0x146765){if(!a9_0x4850ec[_0x3247e1(0x8b)](_0x466aca['sourcePath'])){_0x58607a(new Error('Asset\x20file\x20not\x20found:\x20'+_0x466aca['sourcePath']));return;}_0xedd8f7['file'](_0x466aca[_0x3247e1(0x74)],{'name':_0x466aca[_0x3247e1(0x66)]});}_0xedd8f7['finalize']();}catch(_0x3a324d){_0x58607a(_0x3a324d);}});}[a9_0x12b300(0x72)](_0xa4068c){const _0x469448=a9_0x12b300,_0x32773b=a9_0x4850ec[_0x469448(0x90)](_0xa4068c,'utf-8'),_0x2dffff=JSON[_0x469448(0x71)](_0x32773b);this[_0x469448(0x65)](_0x2dffff);const _0x3cf397=a9_0x432313[_0x469448(0x8f)](a9_0x1d11c1['tmpdir'](),_0x469448(0x95)+Date[_0x469448(0x7b)]()+_0x469448(0x6f));return a9_0x4850ec['writeFileSync'](_0x3cf397,JSON['stringify'](_0x2dffff,null,0x2)),_0x3cf397;}[a9_0x12b300(0x65)](_0x523b8c){const _0x59e970=a9_0x12b300;if(typeof _0x523b8c!==_0x59e970(0x86)||_0x523b8c===null)return;if(Array['isArray'](_0x523b8c)){_0x523b8c[_0x59e970(0x75)](_0x49afa8=>this[_0x59e970(0x65)](_0x49afa8));return;}_0x523b8c['attachments']&&Array['isArray'](_0x523b8c[_0x59e970(0x73)])&&_0x523b8c['attachments'][_0x59e970(0x75)](_0x258774=>{const _0x3b7a59=_0x59e970;_0x258774[_0x3b7a59(0x8d)]&&typeof _0x258774['path']===_0x3b7a59(0x80)&&(_0x258774[_0x3b7a59(0x8d)]=this[_0x3b7a59(0x78)](_0x258774[_0x3b7a59(0x8d)]));}),Object['values'](_0x523b8c)['forEach'](_0x5c7a64=>this[_0x59e970(0x65)](_0x5c7a64));}['normalizeAttachmentPath'](_0x2c2a2d){const _0x583154=a9_0x12b300,_0x2f33b6=_0x2c2a2d[_0x583154(0x81)](_0x583154(0x67));if(_0x2f33b6!==-0x1)return _0x2c2a2d[_0x583154(0x69)](_0x2f33b6)[_0x583154(0x79)](/\\/g,'/');return console[_0x583154(0x88)](_0x583154(0x76)+_0x2c2a2d),_0x2c2a2d;}}
|
package/package.json
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@checkly/playwright-reporter",
|
|
3
|
+
"version": "0.0.3",
|
|
4
|
+
"description": "Playwright reporter that generates ZIP archives containing JSON reports and test assets",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist",
|
|
10
|
+
"README.md"
|
|
11
|
+
],
|
|
12
|
+
"scripts": {
|
|
13
|
+
"build": "tsc && npx --yes javascript-obfuscator raw-dist --output dist",
|
|
14
|
+
"test": "vitest run",
|
|
15
|
+
"test:watch": "vitest watch",
|
|
16
|
+
"test:coverage": "vitest run --coverage",
|
|
17
|
+
"typecheck": "tsc --noEmit",
|
|
18
|
+
"lint": "eslint src tests",
|
|
19
|
+
"lint:fix": "eslint src tests --fix",
|
|
20
|
+
"clean": "rm -rf dist coverage *.zip"
|
|
21
|
+
},
|
|
22
|
+
"keywords": [
|
|
23
|
+
"playwright",
|
|
24
|
+
"reporter",
|
|
25
|
+
"checkly",
|
|
26
|
+
"testing",
|
|
27
|
+
"zip",
|
|
28
|
+
"assets"
|
|
29
|
+
],
|
|
30
|
+
"author": "Checkly",
|
|
31
|
+
"license": "Apache-2.0",
|
|
32
|
+
"engines": {
|
|
33
|
+
"node": ">=18.0.0"
|
|
34
|
+
},
|
|
35
|
+
"peerDependencies": {
|
|
36
|
+
"@playwright/test": ">=1.40.0"
|
|
37
|
+
},
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"archiver": "git+ssh://git@github.com:checkly/node-archiver.git",
|
|
40
|
+
"axios": "^1.12.2"
|
|
41
|
+
},
|
|
42
|
+
"devDependencies": {
|
|
43
|
+
"@playwright/test": "^1.56.0",
|
|
44
|
+
"@types/adm-zip": "^0.5.7",
|
|
45
|
+
"@types/archiver": "^6.0.3",
|
|
46
|
+
"@types/node": "^24.7.2",
|
|
47
|
+
"@typescript-eslint/eslint-plugin": "^8.46.1",
|
|
48
|
+
"@typescript-eslint/parser": "^8.46.1",
|
|
49
|
+
"@vitest/coverage-v8": "^3.2.4",
|
|
50
|
+
"adm-zip": "^0.5.16",
|
|
51
|
+
"eslint": "^9.37.0",
|
|
52
|
+
"typescript": "^5.9.3",
|
|
53
|
+
"vitest": "^3.2.4"
|
|
54
|
+
}
|
|
55
|
+
}
|