screenci 0.0.44 → 0.0.46

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 (170) hide show
  1. package/LICENCE +21 -0
  2. package/README.md +77 -195
  3. package/dist/cli.d.ts +22 -1
  4. package/dist/cli.d.ts.map +1 -1
  5. package/dist/cli.js +640 -767
  6. package/dist/cli.js.map +1 -1
  7. package/dist/docs/manifest.d.ts +529 -0
  8. package/dist/docs/manifest.d.ts.map +1 -0
  9. package/dist/docs/manifest.js +243 -0
  10. package/dist/docs/manifest.js.map +1 -0
  11. package/dist/docs/video-sources/assets-and-overlays.video.d.ts +2 -0
  12. package/dist/docs/video-sources/assets-and-overlays.video.d.ts.map +1 -0
  13. package/dist/docs/video-sources/assets-and-overlays.video.js +40 -0
  14. package/dist/docs/video-sources/assets-and-overlays.video.js.map +1 -0
  15. package/dist/docs/video-sources/camera-and-zooming.video.d.ts +2 -0
  16. package/dist/docs/video-sources/camera-and-zooming.video.d.ts.map +1 -0
  17. package/dist/docs/video-sources/camera-and-zooming.video.js +37 -0
  18. package/dist/docs/video-sources/camera-and-zooming.video.js.map +1 -0
  19. package/dist/docs/video-sources/ci-setup.video.d.ts +2 -0
  20. package/dist/docs/video-sources/ci-setup.video.d.ts.map +1 -0
  21. package/dist/docs/video-sources/ci-setup.video.js +37 -0
  22. package/dist/docs/video-sources/ci-setup.video.js.map +1 -0
  23. package/dist/docs/video-sources/cli.video.d.ts +2 -0
  24. package/dist/docs/video-sources/cli.video.d.ts.map +1 -0
  25. package/dist/docs/video-sources/cli.video.js +37 -0
  26. package/dist/docs/video-sources/cli.video.js.map +1 -0
  27. package/dist/docs/video-sources/docs-shared.d.ts +5 -0
  28. package/dist/docs/video-sources/docs-shared.d.ts.map +1 -0
  29. package/dist/docs/video-sources/docs-shared.js +14 -0
  30. package/dist/docs/video-sources/docs-shared.js.map +1 -0
  31. package/dist/docs/video-sources/generating-videos.video.d.ts +2 -0
  32. package/dist/docs/video-sources/generating-videos.video.d.ts.map +1 -0
  33. package/dist/docs/video-sources/generating-videos.video.js +37 -0
  34. package/dist/docs/video-sources/generating-videos.video.js.map +1 -0
  35. package/dist/docs/video-sources/installation.video.d.ts +2 -0
  36. package/dist/docs/video-sources/installation.video.d.ts.map +1 -0
  37. package/dist/docs/video-sources/installation.video.js +24 -0
  38. package/dist/docs/video-sources/installation.video.js.map +1 -0
  39. package/dist/docs/video-sources/narration-and-localization.video.d.ts +2 -0
  40. package/dist/docs/video-sources/narration-and-localization.video.d.ts.map +1 -0
  41. package/dist/docs/video-sources/narration-and-localization.video.js +40 -0
  42. package/dist/docs/video-sources/narration-and-localization.video.js.map +1 -0
  43. package/dist/docs/video-sources/public-urls-and-embeds.video.d.ts +2 -0
  44. package/dist/docs/video-sources/public-urls-and-embeds.video.d.ts.map +1 -0
  45. package/dist/docs/video-sources/public-urls-and-embeds.video.js +37 -0
  46. package/dist/docs/video-sources/public-urls-and-embeds.video.js.map +1 -0
  47. package/dist/docs/video-sources/record-and-publish.video.d.ts +2 -0
  48. package/dist/docs/video-sources/record-and-publish.video.d.ts.map +1 -0
  49. package/dist/docs/video-sources/record-and-publish.video.js +37 -0
  50. package/dist/docs/video-sources/record-and-publish.video.js.map +1 -0
  51. package/dist/docs/video-sources/run-and-debug-videos.video.d.ts +2 -0
  52. package/dist/docs/video-sources/run-and-debug-videos.video.d.ts.map +1 -0
  53. package/dist/docs/video-sources/run-and-debug-videos.video.js +37 -0
  54. package/dist/docs/video-sources/run-and-debug-videos.video.js.map +1 -0
  55. package/dist/docs/video-sources/write-video-scripts.video.d.ts +2 -0
  56. package/dist/docs/video-sources/write-video-scripts.video.d.ts.map +1 -0
  57. package/dist/docs/video-sources/write-video-scripts.video.js +40 -0
  58. package/dist/docs/video-sources/write-video-scripts.video.js.map +1 -0
  59. package/dist/docs/videos.d.ts +94 -0
  60. package/dist/docs/videos.d.ts.map +1 -0
  61. package/dist/docs/videos.js +54 -0
  62. package/dist/docs/videos.js.map +1 -0
  63. package/dist/index.d.ts +4 -10
  64. package/dist/index.d.ts.map +1 -1
  65. package/dist/index.js +1 -6
  66. package/dist/index.js.map +1 -1
  67. package/dist/src/asset.d.ts +10 -9
  68. package/dist/src/asset.d.ts.map +1 -1
  69. package/dist/src/asset.js +7 -13
  70. package/dist/src/asset.js.map +1 -1
  71. package/dist/src/autoZoom.d.ts +3 -33
  72. package/dist/src/autoZoom.d.ts.map +1 -1
  73. package/dist/src/autoZoom.js +46 -51
  74. package/dist/src/autoZoom.js.map +1 -1
  75. package/dist/src/changeFocus.d.ts.map +1 -1
  76. package/dist/src/changeFocus.js +3 -2
  77. package/dist/src/changeFocus.js.map +1 -1
  78. package/dist/src/config.d.ts +5 -7
  79. package/dist/src/config.d.ts.map +1 -1
  80. package/dist/src/config.js +44 -71
  81. package/dist/src/config.js.map +1 -1
  82. package/dist/src/cue.d.ts +13 -26
  83. package/dist/src/cue.d.ts.map +1 -1
  84. package/dist/src/cue.js +61 -97
  85. package/dist/src/cue.js.map +1 -1
  86. package/dist/src/customVoiceRef.d.ts +3 -0
  87. package/dist/src/customVoiceRef.d.ts.map +1 -0
  88. package/dist/src/customVoiceRef.js +7 -0
  89. package/dist/src/customVoiceRef.js.map +1 -0
  90. package/dist/src/defaults.d.ts +5 -5
  91. package/dist/src/defaults.d.ts.map +1 -1
  92. package/dist/src/defaults.js +13 -7
  93. package/dist/src/defaults.js.map +1 -1
  94. package/dist/src/events.d.ts +7 -6
  95. package/dist/src/events.d.ts.map +1 -1
  96. package/dist/src/events.js +17 -0
  97. package/dist/src/events.js.map +1 -1
  98. package/dist/src/fileSystemName.d.ts +2 -0
  99. package/dist/src/fileSystemName.d.ts.map +1 -0
  100. package/dist/src/fileSystemName.js +44 -0
  101. package/dist/src/fileSystemName.js.map +1 -0
  102. package/dist/src/hide.d.ts +1 -1
  103. package/dist/src/hide.d.ts.map +1 -1
  104. package/dist/src/hide.js +12 -15
  105. package/dist/src/hide.js.map +1 -1
  106. package/dist/src/init.d.ts +12 -0
  107. package/dist/src/init.d.ts.map +1 -0
  108. package/dist/src/init.js +674 -0
  109. package/dist/src/init.js.map +1 -0
  110. package/dist/src/instrument.d.ts +1 -0
  111. package/dist/src/instrument.d.ts.map +1 -1
  112. package/dist/src/instrument.js +29 -10
  113. package/dist/src/instrument.js.map +1 -1
  114. package/dist/src/manualZoom.d.ts.map +1 -1
  115. package/dist/src/manualZoom.js +13 -13
  116. package/dist/src/manualZoom.js.map +1 -1
  117. package/dist/src/mouse.d.ts.map +1 -1
  118. package/dist/src/mouse.js +4 -1
  119. package/dist/src/mouse.js.map +1 -1
  120. package/dist/src/recording.d.ts +2 -2
  121. package/dist/src/recording.d.ts.map +1 -1
  122. package/dist/src/runtimeContext.d.ts +81 -0
  123. package/dist/src/runtimeContext.d.ts.map +1 -0
  124. package/dist/src/runtimeContext.js +95 -0
  125. package/dist/src/runtimeContext.js.map +1 -0
  126. package/dist/src/runtimeMode.d.ts +8 -0
  127. package/dist/src/runtimeMode.d.ts.map +1 -0
  128. package/dist/src/runtimeMode.js +22 -0
  129. package/dist/src/runtimeMode.js.map +1 -0
  130. package/dist/src/titleValidation.d.ts +3 -0
  131. package/dist/src/titleValidation.d.ts.map +1 -0
  132. package/dist/src/titleValidation.js +19 -0
  133. package/dist/src/titleValidation.js.map +1 -0
  134. package/dist/src/types.d.ts +42 -15
  135. package/dist/src/types.d.ts.map +1 -1
  136. package/dist/src/types.js.map +1 -1
  137. package/dist/src/video.d.ts +6 -1
  138. package/dist/src/video.d.ts.map +1 -1
  139. package/dist/src/video.js +94 -46
  140. package/dist/src/video.js.map +1 -1
  141. package/dist/src/voices.d.ts +8 -11
  142. package/dist/src/voices.d.ts.map +1 -1
  143. package/dist/src/voices.js +13 -8
  144. package/dist/src/voices.js.map +1 -1
  145. package/dist/src/zoom.d.ts +1 -1
  146. package/dist/src/zoom.d.ts.map +1 -1
  147. package/dist/test-fixtures/record-all-or-nothing.config.d.ts +8 -0
  148. package/dist/test-fixtures/record-all-or-nothing.config.d.ts.map +1 -0
  149. package/dist/test-fixtures/record-all-or-nothing.config.js +7 -0
  150. package/dist/test-fixtures/record-all-or-nothing.config.js.map +1 -0
  151. package/dist/test-fixtures/record-upload-all-or-nothing.config.d.ts +8 -0
  152. package/dist/test-fixtures/record-upload-all-or-nothing.config.d.ts.map +1 -0
  153. package/dist/test-fixtures/record-upload-all-or-nothing.config.js +7 -0
  154. package/dist/test-fixtures/record-upload-all-or-nothing.config.js.map +1 -0
  155. package/dist/test-fixtures/record-upload.config.d.ts +5 -0
  156. package/dist/test-fixtures/record-upload.config.d.ts.map +1 -0
  157. package/dist/test-fixtures/record-upload.config.js +4 -0
  158. package/dist/test-fixtures/record-upload.config.js.map +1 -0
  159. package/dist/tsconfig.tsbuildinfo +1 -1
  160. package/package.json +8 -2
  161. package/skills/screenci/SKILL.md +6 -1
  162. package/skills/screenci/references/init.md +10 -12
  163. package/dist/src/reporter.d.ts +0 -9
  164. package/dist/src/reporter.d.ts.map +0 -1
  165. package/dist/src/reporter.js +0 -50
  166. package/dist/src/reporter.js.map +0 -1
  167. package/dist/src/sanitize.d.ts +0 -5
  168. package/dist/src/sanitize.d.ts.map +0 -1
  169. package/dist/src/sanitize.js +0 -11
  170. 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,88 @@
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
+ npm init screenci@latest
15
+ pnpm create screenci
11
16
  ```
12
17
 
13
- ## Init a new project
18
+ `init` creates a ready-to-run project in the current directory, installs
19
+ dependencies, and installs Chromium by default. When using `npm init`, pass
20
+ extra initializer flags after `--`, for example
21
+ `npm init screenci@latest -- --yes --package-manager pnpm`.
14
22
 
15
- ```bash
16
- npx screenci init "My Project"
17
- cd screenci
18
- npm install
23
+ ```text
24
+ screenci.config.ts
25
+ package.json
26
+ tsconfig.json
27
+ README.md
28
+ .gitignore
29
+ .env
30
+ videos/
31
+ example.video.ts
32
+ .github/workflows/screenci.yaml
19
33
  ```
20
34
 
21
- This scaffolds a ready-to-run project:
35
+ Docs:
22
36
 
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
- ```
37
+ - Getting started: `https://screenci.com/docs`
38
+ - Writing scripts: `https://screenci.com/docs/write-video-scripts`
39
+ - CLI reference: `https://screenci.com/docs/reference/cli`
31
40
 
32
41
  ## Write a video
33
42
 
34
- Video scripts are Playwright test files with a `.video.ts` extension. If you already know Playwright, you already know 90% of this.
43
+ Video scripts are Playwright-style files with a `.video.ts` extension. If you
44
+ already know Playwright locators, navigation, and waiting, you already know
45
+ most of the automation layer.
35
46
 
36
47
  ```ts
37
48
  // videos/onboarding.video.ts
38
- import { video } from 'screenci'
49
+ import { hide, video } from 'screenci'
39
50
 
40
51
  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')
52
+ await hide(async () => {
53
+ await page.goto('https://app.example.com/signup')
54
+ })
55
+
56
+ await page.getByLabel('Email').fill('jane@example.com')
57
+ await page.getByRole('button', { name: 'Create account' }).click()
58
+ await page.getByRole('heading', { name: 'Dashboard' }).waitFor()
45
59
  })
46
60
  ```
47
61
 
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:
62
+ Each `video()` call becomes one output video. The title becomes the filename
63
+ and the remote video identity.
55
64
 
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 |
65
+ Inside `video()`, `page` is a `ScreenCIPage`: a Playwright `Page` with animated
66
+ cursor movement and visible typing layered on top of normal Playwright
67
+ behavior.
64
68
 
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
69
+ ## Run locally
76
70
 
77
71
  ```bash
78
- # Dry-run: opens Playwright UI so you can verify selectors and pacing
72
+ npx screenci test
79
73
  npx screenci test --ui
80
-
81
- # Record: captures the screen and writes .screenci/<name>/recording.mp4
82
- npx screenci record
83
74
  ```
84
75
 
85
- Or via the package scripts scaffolded by `init`:
76
+ Use `test` for the normal authoring loop. It runs the video scripts through
77
+ Playwright without starting the final recording and upload path.
78
+
79
+ ## Record the final output
86
80
 
87
81
  ```bash
88
- npm run test # → npx screenci test
89
- npm run record # → npx screenci record
82
+ npx screenci record
90
83
  ```
91
84
 
92
- Recordings land in `.screenci/<video-name>/recording.mp4` alongside a `data.json` with all the interaction events.
85
+ `record` writes local artifacts into `.screenci/<video-name>/` and uploads them
86
+ when `SCREENCI_SECRET` is configured.
93
87
 
94
88
  ## Configure
95
89
 
@@ -99,159 +93,47 @@ import { defineConfig } from 'screenci'
99
93
 
100
94
  export default defineConfig({
101
95
  projectName: 'my-project',
96
+ envFile: '.env',
102
97
  videoDir: './videos',
103
98
  use: {
104
99
  baseURL: 'https://app.example.com',
105
100
  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
- },
101
+ aspectRatio: '16:9',
102
+ quality: '1080p',
103
+ fps: 60,
183
104
  },
105
+ trace: 'retain-on-failure',
184
106
  },
107
+ projects: [{ name: 'chromium' }],
185
108
  })
186
109
  ```
187
110
 
188
- ## Hide the boring parts
111
+ ScreenCI manages `testDir`, `testMatch`, and `retries` for you. Most other
112
+ Playwright config still passes through.
189
113
 
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.
114
+ ## Authoring helpers
191
115
 
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.
116
+ | Export | What it does |
117
+ | ----------------- | -------------------------------------------------------- |
118
+ | `defineConfig` | Wraps Playwright config with ScreenCI defaults |
119
+ | `video` | Declares a video recording test |
120
+ | `createNarration` | Creates typed narration controllers |
121
+ | `hide` | Cuts setup or cleanup out of the visible recording |
122
+ | `autoZoom` | Smooth camera follow for an interaction block |
123
+ | `zoomTo` | Manual camera framing for a locator or point |
124
+ | `resetZoom` | Returns from manual framing to the full viewport |
125
+ | `createAssets` | Inserts timed media overlays into the recording timeline |
126
+ | `voices` | Available voice constants such as `voices.Ava` |
127
+ | `languageRegions` | Region constants such as `languageRegions.en.US` |
243
128
 
244
129
  ## Output
245
130
 
246
- ```
131
+ ```text
247
132
  .screenci/
248
133
  <video-name>/
249
- recording.mp4 ← the raw screen capture
250
- data.json ← interaction events + cue metadata
134
+ recording.mp4
135
+ data.json
251
136
  ```
252
137
 
253
- Upload to screenci.com for rendering, narration generation, and the permanent embed link:
254
-
255
- ```bash
256
- npm run retry
257
- ```
138
+ When `SCREENCI_SECRET` is configured, `screenci record` uploads the output to
139
+ 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;
@@ -12,12 +21,24 @@ export declare function attachUploadAbortStdinListener(input: Pick<NodeJS.ReadSt
12
21
  export declare function stripVoicePath(voice: VoiceKey | RecordingCustomVoiceRef): 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;
24
+ export declare function formatFailedVideoMessage(videoName: string, message: string): string;
15
25
  export declare function printUploadStartFailureMessage(videoName: string, status: number, responseText: string, secret: string): void;
26
+ export declare function uploadRecordings(screenciDir: string, projectName: string, apiUrl: string, secret: string, specificEntry?: string, verbose?: boolean): Promise<{
27
+ projectId: string | null;
28
+ hadFailures: boolean;
29
+ failedVideoNames: string[];
30
+ failedVideoMessages: Array<{
31
+ videoName: string;
32
+ message: string;
33
+ }>;
34
+ }>;
16
35
  export declare function getDevBackendUrl(): string;
17
36
  export declare function getDevFrontendUrl(): string;
18
37
  export declare function extractConfigStringLiteral(configSource: string, property: 'projectName' | 'envFile'): string | undefined;
38
+ export declare function extractRecordUploadPolicyLiteral(configSource: string): RecordUploadPolicy | undefined;
39
+ export declare function extractMockRecordLiteral(configSource: string): boolean | undefined;
19
40
  export declare function getConfigModuleSpecifier(resolvedConfigPath: string): string;
20
- export declare function ensureScreenciSecret(): Promise<string | undefined>;
41
+ export declare function ensureScreenciSecret(resolvedConfigPath?: string): Promise<string | undefined>;
21
42
  export declare function main(): Promise<void>;
22
43
  export {};
23
44
  //# sourceMappingURL=cli.d.ts.map
package/dist/cli.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../cli.ts"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EACV,uBAAuB,EACvB,aAAa,EAEd,MAAM,iBAAiB,CAAA;AACxB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AA4D/C,KAAK,mBAAmB,GAAG;IACzB,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAiBD,wBAAgB,8BAA8B,CAC5C,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,IAAI,GAAG,KAAK,GAAG,OAAO,CAAC,EACtD,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,O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