screenci 0.0.43 → 0.0.45

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.
Files changed (161) hide show
  1. package/LICENCE +21 -0
  2. package/README.md +74 -195
  3. package/dist/cli.d.ts +20 -1
  4. package/dist/cli.d.ts.map +1 -1
  5. package/dist/cli.js +685 -464
  6. package/dist/cli.js.map +1 -1
  7. package/dist/docs/manifest.d.ts +521 -0
  8. package/dist/docs/manifest.d.ts.map +1 -0
  9. package/dist/docs/manifest.js +237 -0
  10. package/dist/docs/manifest.js.map +1 -0
  11. package/dist/docs/video-sources/camera-and-zooming.video.d.ts +2 -0
  12. package/dist/docs/video-sources/camera-and-zooming.video.d.ts.map +1 -0
  13. package/dist/docs/video-sources/camera-and-zooming.video.js +37 -0
  14. package/dist/docs/video-sources/camera-and-zooming.video.js.map +1 -0
  15. package/dist/docs/video-sources/ci-setup.video.d.ts +2 -0
  16. package/dist/docs/video-sources/ci-setup.video.d.ts.map +1 -0
  17. package/dist/docs/video-sources/ci-setup.video.js +37 -0
  18. package/dist/docs/video-sources/ci-setup.video.js.map +1 -0
  19. package/dist/docs/video-sources/cli.video.d.ts +2 -0
  20. package/dist/docs/video-sources/cli.video.d.ts.map +1 -0
  21. package/dist/docs/video-sources/cli.video.js +37 -0
  22. package/dist/docs/video-sources/cli.video.js.map +1 -0
  23. package/dist/docs/video-sources/docs-shared.d.ts +5 -0
  24. package/dist/docs/video-sources/docs-shared.d.ts.map +1 -0
  25. package/dist/docs/video-sources/docs-shared.js +14 -0
  26. package/dist/docs/video-sources/docs-shared.js.map +1 -0
  27. package/dist/docs/video-sources/generating-videos.video.d.ts +2 -0
  28. package/dist/docs/video-sources/generating-videos.video.d.ts.map +1 -0
  29. package/dist/docs/video-sources/generating-videos.video.js +37 -0
  30. package/dist/docs/video-sources/generating-videos.video.js.map +1 -0
  31. package/dist/docs/video-sources/installation.video.d.ts +2 -0
  32. package/dist/docs/video-sources/installation.video.d.ts.map +1 -0
  33. package/dist/docs/video-sources/installation.video.js +26 -0
  34. package/dist/docs/video-sources/installation.video.js.map +1 -0
  35. package/dist/docs/video-sources/narration-and-localization.video.d.ts +2 -0
  36. package/dist/docs/video-sources/narration-and-localization.video.d.ts.map +1 -0
  37. package/dist/docs/video-sources/narration-and-localization.video.js +40 -0
  38. package/dist/docs/video-sources/narration-and-localization.video.js.map +1 -0
  39. package/dist/docs/video-sources/public-urls-and-embeds.video.d.ts +2 -0
  40. package/dist/docs/video-sources/public-urls-and-embeds.video.d.ts.map +1 -0
  41. package/dist/docs/video-sources/public-urls-and-embeds.video.js +37 -0
  42. package/dist/docs/video-sources/public-urls-and-embeds.video.js.map +1 -0
  43. package/dist/docs/video-sources/record-and-publish.video.d.ts +2 -0
  44. package/dist/docs/video-sources/record-and-publish.video.d.ts.map +1 -0
  45. package/dist/docs/video-sources/record-and-publish.video.js +37 -0
  46. package/dist/docs/video-sources/record-and-publish.video.js.map +1 -0
  47. package/dist/docs/video-sources/run-and-debug-videos.video.d.ts +2 -0
  48. package/dist/docs/video-sources/run-and-debug-videos.video.d.ts.map +1 -0
  49. package/dist/docs/video-sources/run-and-debug-videos.video.js +37 -0
  50. package/dist/docs/video-sources/run-and-debug-videos.video.js.map +1 -0
  51. package/dist/docs/video-sources/write-video-scripts.video.d.ts +2 -0
  52. package/dist/docs/video-sources/write-video-scripts.video.d.ts.map +1 -0
  53. package/dist/docs/video-sources/write-video-scripts.video.js +40 -0
  54. package/dist/docs/video-sources/write-video-scripts.video.js.map +1 -0
  55. package/dist/docs/videos.d.ts +56 -0
  56. package/dist/docs/videos.d.ts.map +1 -0
  57. package/dist/docs/videos.js +37 -0
  58. package/dist/docs/videos.js.map +1 -0
  59. package/dist/index.d.ts +4 -10
  60. package/dist/index.d.ts.map +1 -1
  61. package/dist/index.js +1 -6
  62. package/dist/index.js.map +1 -1
  63. package/dist/src/asset.d.ts.map +1 -1
  64. package/dist/src/asset.js +3 -4
  65. package/dist/src/asset.js.map +1 -1
  66. package/dist/src/autoZoom.d.ts +3 -33
  67. package/dist/src/autoZoom.d.ts.map +1 -1
  68. package/dist/src/autoZoom.js +46 -51
  69. package/dist/src/autoZoom.js.map +1 -1
  70. package/dist/src/changeFocus.d.ts.map +1 -1
  71. package/dist/src/changeFocus.js +5 -5
  72. package/dist/src/changeFocus.js.map +1 -1
  73. package/dist/src/config.d.ts +5 -7
  74. package/dist/src/config.d.ts.map +1 -1
  75. package/dist/src/config.js +41 -71
  76. package/dist/src/config.js.map +1 -1
  77. package/dist/src/cue.d.ts +13 -26
  78. package/dist/src/cue.d.ts.map +1 -1
  79. package/dist/src/cue.js +70 -101
  80. package/dist/src/cue.js.map +1 -1
  81. package/dist/src/customVoiceRef.d.ts +3 -0
  82. package/dist/src/customVoiceRef.d.ts.map +1 -0
  83. package/dist/src/customVoiceRef.js +7 -0
  84. package/dist/src/customVoiceRef.js.map +1 -0
  85. package/dist/src/defaults.d.ts +5 -9
  86. package/dist/src/defaults.d.ts.map +1 -1
  87. package/dist/src/defaults.js +11 -9
  88. package/dist/src/defaults.js.map +1 -1
  89. package/dist/src/events.d.ts +7 -6
  90. package/dist/src/events.d.ts.map +1 -1
  91. package/dist/src/events.js +17 -0
  92. package/dist/src/events.js.map +1 -1
  93. package/dist/src/fileSystemName.d.ts +2 -0
  94. package/dist/src/fileSystemName.d.ts.map +1 -0
  95. package/dist/src/fileSystemName.js +44 -0
  96. package/dist/src/fileSystemName.js.map +1 -0
  97. package/dist/src/hide.d.ts +1 -1
  98. package/dist/src/hide.d.ts.map +1 -1
  99. package/dist/src/hide.js +12 -15
  100. package/dist/src/hide.js.map +1 -1
  101. package/dist/src/instrument.d.ts +1 -0
  102. package/dist/src/instrument.d.ts.map +1 -1
  103. package/dist/src/instrument.js +33 -17
  104. package/dist/src/instrument.js.map +1 -1
  105. package/dist/src/manualZoom.d.ts.map +1 -1
  106. package/dist/src/manualZoom.js +13 -13
  107. package/dist/src/manualZoom.js.map +1 -1
  108. package/dist/src/mouse.d.ts.map +1 -1
  109. package/dist/src/mouse.js +4 -1
  110. package/dist/src/mouse.js.map +1 -1
  111. package/dist/src/recording.d.ts +2 -2
  112. package/dist/src/recording.d.ts.map +1 -1
  113. package/dist/src/runtimeContext.d.ts +81 -0
  114. package/dist/src/runtimeContext.d.ts.map +1 -0
  115. package/dist/src/runtimeContext.js +95 -0
  116. package/dist/src/runtimeContext.js.map +1 -0
  117. package/dist/src/runtimeMode.d.ts +8 -0
  118. package/dist/src/runtimeMode.d.ts.map +1 -0
  119. package/dist/src/runtimeMode.js +22 -0
  120. package/dist/src/runtimeMode.js.map +1 -0
  121. package/dist/src/titleValidation.d.ts +3 -0
  122. package/dist/src/titleValidation.d.ts.map +1 -0
  123. package/dist/src/titleValidation.js +19 -0
  124. package/dist/src/titleValidation.js.map +1 -0
  125. package/dist/src/types.d.ts +27 -15
  126. package/dist/src/types.d.ts.map +1 -1
  127. package/dist/src/types.js.map +1 -1
  128. package/dist/src/video.d.ts +6 -1
  129. package/dist/src/video.d.ts.map +1 -1
  130. package/dist/src/video.js +94 -46
  131. package/dist/src/video.js.map +1 -1
  132. package/dist/src/voices.d.ts +8 -11
  133. package/dist/src/voices.d.ts.map +1 -1
  134. package/dist/src/voices.js +13 -8
  135. package/dist/src/voices.js.map +1 -1
  136. package/dist/src/zoom.d.ts +1 -1
  137. package/dist/src/zoom.d.ts.map +1 -1
  138. package/dist/test-fixtures/record-all-or-nothing.config.d.ts +8 -0
  139. package/dist/test-fixtures/record-all-or-nothing.config.d.ts.map +1 -0
  140. package/dist/test-fixtures/record-all-or-nothing.config.js +7 -0
  141. package/dist/test-fixtures/record-all-or-nothing.config.js.map +1 -0
  142. package/dist/test-fixtures/record-upload-all-or-nothing.config.d.ts +8 -0
  143. package/dist/test-fixtures/record-upload-all-or-nothing.config.d.ts.map +1 -0
  144. package/dist/test-fixtures/record-upload-all-or-nothing.config.js +7 -0
  145. package/dist/test-fixtures/record-upload-all-or-nothing.config.js.map +1 -0
  146. package/dist/test-fixtures/record-upload.config.d.ts +5 -0
  147. package/dist/test-fixtures/record-upload.config.d.ts.map +1 -0
  148. package/dist/test-fixtures/record-upload.config.js +4 -0
  149. package/dist/test-fixtures/record-upload.config.js.map +1 -0
  150. package/dist/tsconfig.tsbuildinfo +1 -1
  151. package/package.json +3 -2
  152. package/skills/screenci/SKILL.md +6 -1
  153. package/skills/screenci/references/init.md +10 -12
  154. package/dist/src/reporter.d.ts +0 -9
  155. package/dist/src/reporter.d.ts.map +0 -1
  156. package/dist/src/reporter.js +0 -50
  157. package/dist/src/reporter.js.map +0 -1
  158. package/dist/src/sanitize.d.ts +0 -5
  159. package/dist/src/sanitize.d.ts.map +0 -1
  160. package/dist/src/sanitize.js +0 -11
  161. package/dist/src/sanitize.js.map +0 -1
package/LICENCE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 ScreenCI Ltd
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -2,94 +2,85 @@
2
2
 
3
3
  Your UI changed. Your demo videos didn't. screenci fixes that.
4
4
 
5
- Record product walkthroughs as code. When the UI ships, run `screenci record` and your videos regenerate. No clicky re-recordings, no stale screenshots, no passive-aggressive Slack messages from the docs team.
5
+ Record product walkthroughs as code. When the UI ships, run
6
+ `npx screenci record` and your videos regenerate.
6
7
 
7
- ## Install
8
+ ScreenCI keeps the Playwright mental model, but the output is a maintainable
9
+ product video instead of a test report.
10
+
11
+ ## Install and scaffold
8
12
 
9
13
  ```bash
10
- npm install screenci
14
+ npx screenci@latest init
11
15
  ```
12
16
 
13
- ## Init a new project
17
+ `init` creates a ready-to-run project in the current directory, installs
18
+ dependencies, and installs Chromium by default.
14
19
 
15
- ```bash
16
- npx screenci init "My Project"
17
- cd screenci
18
- npm install
20
+ ```text
21
+ screenci.config.ts
22
+ package.json
23
+ tsconfig.json
24
+ README.md
25
+ .gitignore
26
+ .env
27
+ videos/
28
+ example.video.ts
29
+ .github/workflows/screenci.yaml
19
30
  ```
20
31
 
21
- This scaffolds a ready-to-run project:
32
+ Docs:
22
33
 
23
- ```
24
- screenci/
25
- screenci.config.ts ← video settings
26
- videos/
27
- example.video.ts ← your first video script
28
- package.json
29
- .gitignore
30
- ```
34
+ - Getting started: `https://screenci.com/docs`
35
+ - Writing scripts: `https://screenci.com/docs/write-video-scripts`
36
+ - CLI reference: `https://screenci.com/docs/reference/cli`
31
37
 
32
38
  ## Write a video
33
39
 
34
- Video scripts are Playwright test files with a `.video.ts` extension. If you already know Playwright, you already know 90% of this.
40
+ Video scripts are Playwright-style files with a `.video.ts` extension. If you
41
+ already know Playwright locators, navigation, and waiting, you already know
42
+ most of the automation layer.
35
43
 
36
44
  ```ts
37
45
  // videos/onboarding.video.ts
38
- import { video } from 'screenci'
46
+ import { hide, video } from 'screenci'
39
47
 
40
48
  video('Onboarding flow', async ({ page }) => {
41
- await page.goto('https://app.example.com/signup')
42
- await page.fill('input[name="email"]', 'jane@example.com')
43
- await page.click('button[type="submit"]')
44
- await page.waitForURL('**/dashboard')
49
+ await hide(async () => {
50
+ await page.goto('https://app.example.com/signup')
51
+ })
52
+
53
+ await page.getByLabel('Email').fill('jane@example.com')
54
+ await page.getByRole('button', { name: 'Create account' }).click()
55
+ await page.getByRole('heading', { name: 'Dashboard' }).waitFor()
45
56
  })
46
57
  ```
47
58
 
48
- Each `video()` call one `.mp4`. The title becomes the filename.
49
-
50
- > **Full reference:** [Writing Video Tests](http://localhost:4321/reference/video-tests)
51
-
52
- ### `ScreenCIPage` — animated interactions
53
-
54
- Inside `video()`, `page` is a `ScreenCIPage` — a Playwright `Page` with animated cursor and typing. You don't need to change anything; the animations happen automatically:
59
+ Each `video()` call becomes one output video. The title becomes the filename
60
+ and the remote video identity.
55
61
 
56
- | Method | Behaviour |
57
- | --------------- | ----------------------------------------------- |
58
- | `click()` | Bezier-curve cursor move, then click |
59
- | `fill()` | Character-by-character typing |
60
- | `hover()` | Animated cursor move |
61
- | `dragTo()` | Animated move → mouseDown → drag → mouseUp |
62
- | `page.mouse` | Smooth bezier moves instead of instant teleport |
63
- | Everything else | Standard Playwright — unchanged |
62
+ Inside `video()`, `page` is a `ScreenCIPage`: a Playwright `Page` with animated
63
+ cursor movement and visible typing layered on top of normal Playwright
64
+ behavior.
64
65
 
65
- All standard `page` methods (`goto`, `waitForURL`, `waitForLoadState`, `waitForTimeout`, `keyboard`, `screenshot`, `expect`, …) work exactly as documented in [Playwright's API](https://playwright.dev/docs/api/class-page).
66
-
67
- `fill()` already moves to the field, clicks it, and types, so you do not need a separate `click()` first:
68
-
69
- ```ts
70
- const searchBox = page.getByPlaceholder('Search')
71
-
72
- await searchBox.fill('Item 1')
73
- ```
74
-
75
- ## Run it
66
+ ## Run locally
76
67
 
77
68
  ```bash
78
- # Dry-run: opens Playwright UI so you can verify selectors and pacing
69
+ npx screenci test
79
70
  npx screenci test --ui
80
-
81
- # Record: captures the screen and writes .screenci/<name>/recording.mp4
82
- npx screenci record
83
71
  ```
84
72
 
85
- Or via the package scripts scaffolded by `init`:
73
+ Use `test` for the normal authoring loop. It runs the video scripts through
74
+ Playwright without starting the final recording and upload path.
75
+
76
+ ## Record the final output
86
77
 
87
78
  ```bash
88
- npm run test # → npx screenci test
89
- npm run record # → npx screenci record
79
+ npx screenci record
90
80
  ```
91
81
 
92
- Recordings land in `.screenci/<video-name>/recording.mp4` alongside a `data.json` with all the interaction events.
82
+ `record` writes local artifacts into `.screenci/<video-name>/` and uploads them
83
+ when `SCREENCI_SECRET` is configured.
93
84
 
94
85
  ## Configure
95
86
 
@@ -99,159 +90,47 @@ import { defineConfig } from 'screenci'
99
90
 
100
91
  export default defineConfig({
101
92
  projectName: 'my-project',
93
+ envFile: '.env',
102
94
  videoDir: './videos',
103
95
  use: {
104
96
  baseURL: 'https://app.example.com',
105
97
  recordOptions: {
106
- aspectRatio: '16:9', // '16:9' | '9:16' | '1:1' | '4:3' | ...
107
- quality: '1080p', // '720p' | '1080p' | '1440p' | '2160p'
108
- fps: 30, // 24 | 30 | 60
109
- },
110
- },
111
- })
112
- ```
113
-
114
- screenci enforces `workers: 1`, `retries: 0`, and `fullyParallel: false` so each generated video has one deterministic timeline. Don't fight it.
115
-
116
- ## AI narration
117
-
118
- `createNarration()` maps keys to narration text (or audio files). Define it once near the top of the file, then call `await narration.key()` for the common case where the full line should run before moving on. Use `await narration.key.start()` when narration should overlap with the next actions, and `await narration.key.end()` only to close that same active cue later.
119
-
120
- ```ts
121
- import { video, createNarration, voices } from 'screenci'
122
-
123
- const narration = createNarration({
124
- voice: { name: voices.Aria },
125
- languages: {
126
- en: {
127
- cues: {
128
- intro: 'Welcome to the dashboard.',
129
- addButton: 'Click here to create a new project.',
130
- },
131
- },
132
- },
133
- })
134
-
135
- video('Dashboard walkthrough', async ({ page }) => {
136
- await page.goto('/dashboard')
137
-
138
- await narration.intro()
139
- await page.locator('#reports').click()
140
-
141
- await narration.addButton()
142
- await page.locator('#new-project').click()
143
- })
144
- ```
145
-
146
- Use this pattern:
147
-
148
- ```ts
149
- const narration = createNarration({ ... })
150
-
151
- video('Example', async ({ page }) => {
152
- await narration.intro.start() // starts narration now
153
- await page.click('#filters') // runs while intro audio is still playing
154
-
155
- await narration.details.start() // auto-ends intro, then starts details
156
- await narration.details.end() // use this before navigation or the next gated action
157
- await page.click('#confirm')
158
- })
159
- ```
160
-
161
- ### Multi-language (type-safe)
162
-
163
- TypeScript enforces that every language has the same keys. Missing a translation is a compile error.
164
-
165
- ```ts
166
- import { createNarration, voices } from 'screenci'
167
-
168
- const narration = createNarration({
169
- voice: { name: voices.Ava },
170
- languages: {
171
- en: {
172
- cues: {
173
- intro: 'Welcome to the dashboard.',
174
- addButton: 'Click here to create a new project.',
175
- },
176
- },
177
- fi: {
178
- voice: { name: voices.Nora },
179
- cues: {
180
- intro: 'Tervetuloa hallintapaneeliin.',
181
- addButton: 'Klikkaa tästä luodaksesi uuden projektin.',
182
- },
98
+ aspectRatio: '16:9',
99
+ quality: '1080p',
100
+ fps: 60,
183
101
  },
102
+ trace: 'retain-on-failure',
184
103
  },
104
+ projects: [{ name: 'chromium' }],
185
105
  })
186
106
  ```
187
107
 
188
- ## Hide the boring parts
108
+ ScreenCI manages `testDir`, `testMatch`, and `retries` for you. Most other
109
+ Playwright config still passes through.
189
110
 
190
- `hide()` cuts a section from the final video. Use it for logins, especially the initial page load, cookie banner dismissal, and other setup the viewer should not see.
111
+ ## Authoring helpers
191
112
 
192
- ```ts
193
- import { video, hide } from 'screenci'
194
-
195
- video('Dashboard demo', async ({ page }) => {
196
- await hide(async () => {
197
- // viewer never sees this
198
- await page.goto('/login')
199
- await page.fill('input[name="email"]', 'admin@example.com')
200
- await page.fill('input[name="password"]', 'hunter2')
201
- await page.click('button[type="submit"]')
202
- await page.waitForURL('**/dashboard')
203
- })
204
-
205
- // video starts here — dashboard is already open
206
- await page.locator('#reports').click()
207
- })
208
- ```
209
-
210
- ## Zoom the camera
211
-
212
- `autoZoom()` follows interactions with a smooth camera pan. Wrap a form or a page section, not individual clicks.
213
-
214
- ```ts
215
- import { video, autoZoom } from 'screenci'
216
-
217
- video('Profile settings', async ({ page }) => {
218
- await page.goto('/settings/profile')
219
-
220
- await autoZoom(
221
- async () => {
222
- await page.locator('#name').fill('Jane Doe')
223
- await page.locator('#bio').fill('Engineer')
224
- await page.locator('button[type="submit"]').click()
225
- },
226
- { duration: 400, amount: 0.4, easing: 'ease-in-out' }
227
- )
228
- })
229
- ```
230
-
231
- ## API
232
-
233
- | Export | What it does |
234
- | ----------------- | ------------------------------------------------------------------ |
235
- | `defineConfig` | Wraps Playwright config with screenci defaults |
236
- | `video` | Declares a video recording test |
237
- | `createNarration` | Creates typed narration controllers with AI-generated audio |
238
- | `hide` | Cuts a section from the final video |
239
- | `autoZoom` | Smooth camera pan that follows interactions |
240
- | `voices` | Available voice constants (`voices.Ava`, `voices.elevenlabs(...)`) |
241
-
242
- The `page` fixture inside `video()` is a `ScreenCIPage` — a Playwright `Page` with animated cursor support wired in on all locator methods.
113
+ | Export | What it does |
114
+ | ----------------- | -------------------------------------------------------- |
115
+ | `defineConfig` | Wraps Playwright config with ScreenCI defaults |
116
+ | `video` | Declares a video recording test |
117
+ | `createNarration` | Creates typed narration controllers |
118
+ | `hide` | Cuts setup or cleanup out of the visible recording |
119
+ | `autoZoom` | Smooth camera follow for an interaction block |
120
+ | `zoomTo` | Manual camera framing for a locator or point |
121
+ | `resetZoom` | Returns from manual framing to the full viewport |
122
+ | `createAssets` | Inserts timed media overlays into the recording timeline |
123
+ | `voices` | Available voice constants such as `voices.Ava` |
124
+ | `languageRegions` | Region constants such as `languageRegions.en.US` |
243
125
 
244
126
  ## Output
245
127
 
246
- ```
128
+ ```text
247
129
  .screenci/
248
130
  <video-name>/
249
- recording.mp4 ← the raw screen capture
250
- data.json ← interaction events + cue metadata
131
+ recording.mp4
132
+ data.json
251
133
  ```
252
134
 
253
- Upload to screenci.com for rendering, narration generation, and the permanent embed link:
254
-
255
- ```bash
256
- npm run retry
257
- ```
135
+ When `SCREENCI_SECRET` is configured, `screenci record` uploads the output to
136
+ ScreenCI for rendering, narration generation, and hosted delivery.
package/dist/cli.d.ts CHANGED
@@ -1,5 +1,14 @@
1
1
  import type { RecordingCustomVoiceRef, RecordingData } from './src/events.js';
2
2
  import type { VoiceKey } from './src/voices.js';
3
+ import type { RecordUploadPolicy } from './src/types.js';
4
+ type PlaywrightListReportSuite = {
5
+ title?: string;
6
+ specs?: Array<{
7
+ title: string;
8
+ }>;
9
+ suites?: PlaywrightListReportSuite[];
10
+ };
11
+ export declare function collectPlaywrightListTitles(suites: readonly PlaywrightListReportSuite[]): string[];
3
12
  type PreparedUploadAsset = {
4
13
  fileHash: string;
5
14
  path: string;
@@ -13,11 +22,21 @@ export declare function stripVoicePath(voice: VoiceKey | RecordingCustomVoiceRef
13
22
  export declare function annotateRecordingDataWithAssetHashes(data: RecordingData, assets: PreparedUploadAsset[]): RecordingData;
14
23
  export declare function formatUploadStartFailureMessage(videoName: string, status: number, responseText: string, secret: string): string;
15
24
  export declare function printUploadStartFailureMessage(videoName: string, status: number, responseText: string, secret: string): void;
25
+ export declare function uploadRecordings(screenciDir: string, projectName: string, apiUrl: string, secret: string, specificEntry?: string, verbose?: boolean): Promise<{
26
+ projectId: string | null;
27
+ hadFailures: boolean;
28
+ failedVideoNames: string[];
29
+ failedVideoMessages: Array<{
30
+ videoName: string;
31
+ message: string;
32
+ }>;
33
+ }>;
16
34
  export declare function getDevBackendUrl(): string;
17
35
  export declare function getDevFrontendUrl(): string;
18
36
  export declare function extractConfigStringLiteral(configSource: string, property: 'projectName' | 'envFile'): string | undefined;
37
+ export declare function extractRecordUploadPolicyLiteral(configSource: string): RecordUploadPolicy | undefined;
19
38
  export declare function getConfigModuleSpecifier(resolvedConfigPath: string): string;
20
- export declare function ensureScreenciSecret(): Promise<string | undefined>;
39
+ export declare function ensureScreenciSecret(resolvedConfigPath?: string): Promise<string | undefined>;
21
40
  export declare function main(): Promise<void>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