screenci 0.0.10 → 0.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +44 -58
- package/dist/Dockerfile +16 -2
- package/dist/cli.d.ts +21 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +1199 -420
- package/dist/cli.js.map +1 -1
- package/dist/e2e/instrument.e2e.js +12 -0
- package/dist/e2e/instrument.e2e.js.map +1 -1
- package/dist/index.d.ts +7 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/playwright.config.d.ts +1 -1
- package/dist/src/asset.d.ts +27 -67
- package/dist/src/asset.d.ts.map +1 -1
- package/dist/src/asset.js +44 -45
- package/dist/src/asset.js.map +1 -1
- package/dist/src/caption.d.ts +164 -54
- package/dist/src/caption.d.ts.map +1 -1
- package/dist/src/caption.js +304 -131
- package/dist/src/caption.js.map +1 -1
- package/dist/src/events.d.ts +67 -25
- package/dist/src/events.d.ts.map +1 -1
- package/dist/src/events.js +34 -18
- package/dist/src/events.js.map +1 -1
- package/dist/src/instrument.d.ts.map +1 -1
- package/dist/src/instrument.js +142 -35
- package/dist/src/instrument.js.map +1 -1
- package/dist/src/logger.d.ts.map +1 -1
- package/dist/src/logger.js +2 -1
- package/dist/src/logger.js.map +1 -1
- package/dist/src/recording.d.ts +1 -1
- package/dist/src/recording.d.ts.map +1 -1
- package/dist/src/recordingData.d.ts +145 -0
- package/dist/src/recordingData.d.ts.map +1 -0
- package/dist/src/recordingData.js +2 -0
- package/dist/src/recordingData.js.map +1 -0
- package/dist/src/types.d.ts +133 -66
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/video.d.ts.map +1 -1
- package/dist/src/video.js +28 -20
- package/dist/src/video.js.map +1 -1
- package/dist/src/voices.d.ts +344 -41
- package/dist/src/voices.d.ts.map +1 -1
- package/dist/src/voices.js +261 -30
- package/dist/src/voices.js.map +1 -1
- package/dist/test-fixtures/screenci.config.d.ts +5 -0
- package/dist/test-fixtures/screenci.config.d.ts.map +1 -0
- package/dist/test-fixtures/screenci.config.js +4 -0
- package/dist/test-fixtures/screenci.config.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +34 -4
- package/skills/playwright-cli/SKILL.md +348 -0
- package/skills/screenci/SKILL.md +55 -0
- package/skills/screenci/references/init.md +47 -0
- package/skills/screenci/references/record.md +41 -0
- package/dist/reporter.d.ts +0 -9
- package/dist/reporter.d.ts.map +0 -1
- package/dist/reporter.js +0 -49
- package/dist/reporter.js.map +0 -1
- package/dist/src/caption.test-d.d.ts +0 -2
- package/dist/src/caption.test-d.d.ts.map +0 -1
- package/dist/src/caption.test-d.js +0 -50
- package/dist/src/caption.test-d.js.map +0 -1
- package/dist/src/captionHash.d.ts +0 -12
- package/dist/src/captionHash.d.ts.map +0 -1
- package/dist/src/captionHash.js +0 -17
- package/dist/src/captionHash.js.map +0 -1
package/README.md
CHANGED
|
@@ -82,79 +82,65 @@ export default defineConfig({
|
|
|
82
82
|
|
|
83
83
|
screenci enforces `workers: 1`, `retries: 0`, and `fullyParallel: false` — FFmpeg records one screen at a time. Don't fight it.
|
|
84
84
|
|
|
85
|
-
##
|
|
85
|
+
## AI voiceovers
|
|
86
86
|
|
|
87
|
-
`
|
|
87
|
+
`createVoiceOvers()` maps keys to text (or audio files). At render time screenci generates voiceover audio and syncs it to your recording.
|
|
88
88
|
|
|
89
89
|
```ts
|
|
90
|
-
import { video,
|
|
91
|
-
|
|
92
|
-
const
|
|
93
|
-
|
|
94
|
-
|
|
90
|
+
import { video, createVoiceOvers, voices } from 'screenci'
|
|
91
|
+
|
|
92
|
+
const voiceOvers = createVoiceOvers({
|
|
93
|
+
voice: { name: voices.Aria },
|
|
94
|
+
languages: {
|
|
95
|
+
en: {
|
|
96
|
+
captions: {
|
|
97
|
+
intro: 'Welcome to the dashboard.',
|
|
98
|
+
addButton: 'Click here to create a new project.',
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
},
|
|
95
102
|
})
|
|
96
103
|
|
|
97
104
|
video('Dashboard walkthrough', async ({ page }) => {
|
|
98
105
|
await page.goto('/dashboard')
|
|
99
106
|
|
|
100
|
-
await
|
|
107
|
+
await voiceOvers.intro.start()
|
|
101
108
|
// ...anything you do here plays over the voiceover...
|
|
102
|
-
await
|
|
109
|
+
await voiceOvers.intro.end()
|
|
103
110
|
|
|
104
111
|
await page.locator('#new-project').click()
|
|
105
|
-
await
|
|
106
|
-
await
|
|
112
|
+
await voiceOvers.addButton.start()
|
|
113
|
+
await voiceOvers.addButton.end()
|
|
107
114
|
})
|
|
108
115
|
```
|
|
109
116
|
|
|
110
|
-
### With a voice
|
|
111
|
-
|
|
112
|
-
```ts
|
|
113
|
-
import { createCaptions, voices } from 'screenci'
|
|
114
|
-
|
|
115
|
-
const captions = createCaptions(
|
|
116
|
-
{ voice: voices.en.Jude },
|
|
117
|
-
{
|
|
118
|
-
intro: 'Welcome to the dashboard.',
|
|
119
|
-
addButton: 'Click here to create a new project.',
|
|
120
|
-
}
|
|
121
|
-
)
|
|
122
|
-
```
|
|
123
|
-
|
|
124
117
|
### Multi-language (type-safe)
|
|
125
118
|
|
|
126
|
-
TypeScript
|
|
119
|
+
TypeScript enforces that every language has the same keys. Missing a translation is a compile error.
|
|
127
120
|
|
|
128
121
|
```ts
|
|
129
|
-
import {
|
|
130
|
-
|
|
131
|
-
const
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
122
|
+
import { createVoiceOvers, voices } from 'screenci'
|
|
123
|
+
|
|
124
|
+
const voiceOvers = createVoiceOvers({
|
|
125
|
+
voice: { name: voices.Ava },
|
|
126
|
+
languages: {
|
|
127
|
+
en: {
|
|
128
|
+
captions: {
|
|
129
|
+
intro: 'Welcome to the dashboard.',
|
|
130
|
+
addButton: 'Click here to create a new project.',
|
|
131
|
+
},
|
|
137
132
|
},
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
133
|
+
fi: {
|
|
134
|
+
voice: { name: voices.Nora },
|
|
135
|
+
captions: {
|
|
136
|
+
intro: 'Tervetuloa hallintapaneeliin.',
|
|
137
|
+
addButton: 'Klikkaa tästä luodaksesi uuden projektin.',
|
|
138
|
+
},
|
|
144
139
|
},
|
|
145
140
|
},
|
|
146
141
|
})
|
|
147
142
|
```
|
|
148
143
|
|
|
149
|
-
### Sync actions to audio
|
|
150
|
-
|
|
151
|
-
```ts
|
|
152
|
-
// Wait until the voiceover is 60% done, then perform the action
|
|
153
|
-
await captions.intro.waitUntil('60%')
|
|
154
|
-
await page.locator('#cta').click()
|
|
155
|
-
await captions.intro.end()
|
|
156
|
-
```
|
|
157
|
-
|
|
158
144
|
## Hide the boring parts
|
|
159
145
|
|
|
160
146
|
`hide()` cuts a section from the final video. Perfect for logins, page loads, and test setup.
|
|
@@ -200,14 +186,14 @@ video('Profile settings', async ({ page }) => {
|
|
|
200
186
|
|
|
201
187
|
## API
|
|
202
188
|
|
|
203
|
-
| Export
|
|
204
|
-
|
|
|
205
|
-
| `defineConfig`
|
|
206
|
-
| `video`
|
|
207
|
-
| `
|
|
208
|
-
| `hide`
|
|
209
|
-
| `autoZoom`
|
|
210
|
-
| `voices`
|
|
189
|
+
| Export | What it does |
|
|
190
|
+
| ------------------ | ------------------------------------------------------------------ |
|
|
191
|
+
| `defineConfig` | Wraps Playwright config with screenci defaults |
|
|
192
|
+
| `video` | Declares a video recording test |
|
|
193
|
+
| `createVoiceOvers` | Creates typed voiceover controllers with AI-generated audio |
|
|
194
|
+
| `hide` | Cuts a section from the final video |
|
|
195
|
+
| `autoZoom` | Smooth camera pan that follows interactions |
|
|
196
|
+
| `voices` | Available voice constants (`voices.Ava`, `voices.elevenlabs(...)`) |
|
|
211
197
|
|
|
212
198
|
The `page` fixture inside `video()` is a `ScreenCIPage` — a Playwright `Page` with animated cursor support wired in on all locator methods.
|
|
213
199
|
|
|
@@ -223,5 +209,5 @@ The `page` fixture inside `video()` is a `ScreenCIPage` — a Playwright `Page`
|
|
|
223
209
|
Upload to screenci.com for rendering, voiceover generation, and the permanent embed link:
|
|
224
210
|
|
|
225
211
|
```bash
|
|
226
|
-
npm run
|
|
212
|
+
npm run retry
|
|
227
213
|
```
|
package/dist/Dockerfile
CHANGED
|
@@ -1,4 +1,19 @@
|
|
|
1
1
|
# Recording runtime ───────────────────────────────────────────────────────────
|
|
2
|
+
FROM docker.io/library/node:25.2.1-slim AS builder
|
|
3
|
+
|
|
4
|
+
WORKDIR /build
|
|
5
|
+
|
|
6
|
+
COPY package.json package.json
|
|
7
|
+
RUN npm install --include=dev --ignore-scripts
|
|
8
|
+
|
|
9
|
+
COPY tsconfig.json tsconfig.json
|
|
10
|
+
COPY Dockerfile Dockerfile
|
|
11
|
+
COPY index.ts index.ts
|
|
12
|
+
COPY cli.ts cli.ts
|
|
13
|
+
COPY src src
|
|
14
|
+
RUN npm run build
|
|
15
|
+
|
|
16
|
+
# ── Runtime image ─────────────────────────────────────────────────────────────
|
|
2
17
|
FROM docker.io/library/node:25.2.1-slim
|
|
3
18
|
|
|
4
19
|
WORKDIR /app
|
|
@@ -18,8 +33,7 @@ RUN printf '{"private":true,"workspaces":["screenci"]}' > package.json && npm in
|
|
|
18
33
|
RUN npx playwright install chromium --with-deps
|
|
19
34
|
|
|
20
35
|
# ── screenci build output ─────────────────────────────────────────────────────
|
|
21
|
-
|
|
22
|
-
COPY dist ./screenci/dist/
|
|
36
|
+
COPY --from=builder /build/dist ./screenci/dist/
|
|
23
37
|
|
|
24
38
|
# Explicit bin wrapper — no npm bin-linking magic needed.
|
|
25
39
|
RUN printf '#!/bin/sh\nexec node /app/screenci/dist/cli.js "$@"\n' > /app/node_modules/.bin/screenci && \
|
package/dist/cli.d.ts
CHANGED
|
@@ -1,4 +1,24 @@
|
|
|
1
1
|
#!/usr/bin/env -S npx tsx
|
|
2
|
+
import type { RecordingCustomVoiceRef, RecordingData } from './src/events.js';
|
|
3
|
+
import type { VoiceKey } from './src/voices.js';
|
|
4
|
+
type PreparedUploadAsset = {
|
|
5
|
+
fileHash: string;
|
|
6
|
+
path: string;
|
|
7
|
+
size: number;
|
|
8
|
+
name?: string;
|
|
9
|
+
fileBuffer?: Buffer;
|
|
10
|
+
contentType?: string;
|
|
11
|
+
};
|
|
12
|
+
declare const MIN_CONTAINER_RUNTIME_MAJOR_VERSION: {
|
|
13
|
+
readonly podman: 5;
|
|
14
|
+
readonly docker: 28;
|
|
15
|
+
};
|
|
16
|
+
type ContainerRuntimeName = keyof typeof MIN_CONTAINER_RUNTIME_MAJOR_VERSION;
|
|
17
|
+
export declare function stripVoicePath(voice: VoiceKey | RecordingCustomVoiceRef): VoiceKey | RecordingCustomVoiceRef;
|
|
18
|
+
export declare function annotateRecordingDataWithAssetHashes(data: RecordingData, assets: PreparedUploadAsset[]): RecordingData;
|
|
19
|
+
export declare function getDevBackendUrl(): string;
|
|
20
|
+
export declare function getDevFrontendUrl(): string;
|
|
2
21
|
export declare function main(): Promise<void>;
|
|
3
|
-
export declare function detectContainerRuntime(): string;
|
|
22
|
+
export declare function detectContainerRuntime(forcedRuntime?: ContainerRuntimeName): string;
|
|
23
|
+
export {};
|
|
4
24
|
//# 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":";
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../cli.ts"],"names":[],"mappings":";AAwBA,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;AA6FD,QAAA,MAAM,mCAAmC;;;CAG/B,CAAA;AAEV,KAAK,oBAAoB,GAAG,MAAM,OAAO,mCAAmC,CAAA;AAyhB5E,wBAAgB,cAAc,CAC5B,KAAK,EAAE,QAAQ,GAAG,uBAAuB,GACxC,QAAQ,GAAG,uBAAuB,CAKpC;AAED,wBAAgB,oCAAoC,CAClD,IAAI,EAAE,aAAa,EACnB,MAAM,EAAE,mBAAmB,EAAE,GAC5B,aAAa,CAqEf;AAmQD,wBAAgB,gBAAgB,IAAI,MAAM,CAKzC;AAED,wBAAgB,iBAAiB,IAAI,MAAM,CAK1C;AAukBD,wBAAsB,IAAI,kBAgRzB;AAyJD,wBAAgB,sBAAsB,CACpC,aAAa,CAAC,EAAE,oBAAoB,GACnC,MAAM,CAoBR"}
|