screenci 0.0.62 → 0.0.64
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 +34 -15
- package/bin/screenci.js +2 -2
- package/dist/cli.d.ts +46 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +463 -242
- package/dist/cli.js.map +1 -1
- package/dist/docs/manifest.d.ts +132 -70
- package/dist/docs/manifest.d.ts.map +1 -1
- package/dist/docs/manifest.js +46 -24
- package/dist/docs/manifest.js.map +1 -1
- package/dist/docs/videos.d.ts +1 -1
- package/dist/docs/videos.js +1 -1
- package/dist/docs/videos.js.map +1 -1
- package/dist/e2e/instrument.e2e.js +11 -11
- package/dist/e2e/instrument.e2e.js.map +1 -1
- package/dist/index.d.ts +6 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/src/asset.d.ts +27 -0
- package/dist/src/asset.d.ts.map +1 -1
- package/dist/src/asset.js +46 -0
- package/dist/src/asset.js.map +1 -1
- package/dist/src/changeFocus.d.ts.map +1 -1
- package/dist/src/changeFocus.js +3 -3
- package/dist/src/changeFocus.js.map +1 -1
- package/dist/src/cue.d.ts +60 -13
- package/dist/src/cue.d.ts.map +1 -1
- package/dist/src/cue.js +153 -47
- package/dist/src/cue.js.map +1 -1
- package/dist/src/events.d.ts +56 -8
- package/dist/src/events.d.ts.map +1 -1
- package/dist/src/events.js +47 -1
- package/dist/src/events.js.map +1 -1
- package/dist/src/git.d.ts +15 -0
- package/dist/src/git.d.ts.map +1 -0
- package/dist/src/git.js +43 -0
- package/dist/src/git.js.map +1 -0
- package/dist/src/init.d.ts +9 -0
- package/dist/src/init.d.ts.map +1 -1
- package/dist/src/init.js +293 -113
- package/dist/src/init.js.map +1 -1
- package/dist/src/instrument.d.ts.map +1 -1
- package/dist/src/instrument.js +49 -125
- package/dist/src/instrument.js.map +1 -1
- package/dist/src/mouse.d.ts +1 -0
- package/dist/src/mouse.d.ts.map +1 -1
- package/dist/src/mouse.js +9 -3
- package/dist/src/mouse.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 +43 -1
- package/dist/src/recordingData.d.ts.map +1 -1
- package/dist/src/studio.d.ts +36 -0
- package/dist/src/studio.d.ts.map +1 -0
- package/dist/src/studio.js +39 -0
- package/dist/src/studio.js.map +1 -0
- package/dist/src/types.d.ts +141 -125
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js +1 -0
- package/dist/src/types.js.map +1 -1
- package/dist/src/video.d.ts +2 -1
- package/dist/src/video.d.ts.map +1 -1
- package/dist/src/video.js.map +1 -1
- package/dist/src/voices.d.ts +3 -3
- package/dist/src/voices.d.ts.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/skills/screenci/SKILL.md +7 -8
- package/skills/screenci/references/init.md +1 -2
- package/skills/screenci/references/record.md +3 -9
package/README.md
CHANGED
|
@@ -15,23 +15,27 @@ npm init screenci@latest
|
|
|
15
15
|
pnpm create screenci
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
`init` creates a ready-to-run
|
|
19
|
-
dependencies, and installs Chromium by default.
|
|
18
|
+
`init` creates a ready-to-run, self-contained `screenci/` directory ("the
|
|
19
|
+
island") with its own dependencies, and installs Chromium by default. The
|
|
20
|
+
island is deliberately isolated from any surrounding workspace, which makes
|
|
21
|
+
installation reliable inside complex monorepos. When using `npm init`, pass
|
|
20
22
|
extra initializer flags after `--`, for example
|
|
21
23
|
`npm init screenci@latest -- --yes --package-manager pnpm`.
|
|
22
24
|
|
|
23
25
|
```text
|
|
24
|
-
screenci
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
.gitignore
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
.github/workflows/screenci.yaml
|
|
26
|
+
screenci/
|
|
27
|
+
screenci.config.ts
|
|
28
|
+
package.json
|
|
29
|
+
package-lock.json # or pnpm-lock.yaml / yarn.lock
|
|
30
|
+
.gitignore
|
|
31
|
+
videos/
|
|
32
|
+
example.video.ts
|
|
33
|
+
.github/workflows/screenci.yaml # at the repo root, scoped to screenci/
|
|
33
34
|
```
|
|
34
35
|
|
|
36
|
+
`screenci test` and `screenci record` work both from inside `screenci/` and
|
|
37
|
+
from the repository root.
|
|
38
|
+
|
|
35
39
|
Docs:
|
|
36
40
|
|
|
37
41
|
- Getting started: `https://screenci.com/docs`
|
|
@@ -89,13 +93,19 @@ Playwright without starting the final recording and upload path.
|
|
|
89
93
|
## Record the final output
|
|
90
94
|
|
|
91
95
|
```bash
|
|
92
|
-
npx screenci login
|
|
93
96
|
npx screenci record
|
|
94
97
|
```
|
|
95
98
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
+
On the first run without `SCREENCI_SECRET` in an interactive terminal, `record`
|
|
100
|
+
prints a one-time ScreenCI link, waits for you to finish sign-in in the browser,
|
|
101
|
+
saves the secret into the project env file, and then continues. In a
|
|
102
|
+
non-interactive session (no terminal, or `SCREENCI_NONINTERACTIVE=1`) `record`
|
|
103
|
+
does not wait: it prints the sign-in link and exits, so you can open the link,
|
|
104
|
+
sign in, choose a plan, and rerun `record`, which then detects the completed
|
|
105
|
+
session and continues. Set `SCREENCI_SECRET` ahead of time to skip sign-in
|
|
106
|
+
entirely. Pending auth state is cached in `.screenci/link-session.json`, so
|
|
107
|
+
rerunning `record` reuses the same link until it expires or completes. Recorded
|
|
108
|
+
artifacts still live in `.screenci/<video-name>/`.
|
|
99
109
|
|
|
100
110
|
## Configure
|
|
101
111
|
|
|
@@ -123,6 +133,11 @@ export default defineConfig({
|
|
|
123
133
|
ScreenCI manages `testDir`, `testMatch`, and `retries` for you. Most other
|
|
124
134
|
Playwright config still passes through.
|
|
125
135
|
|
|
136
|
+
If you keep local runtime secrets in an env file, point `envFile` at it or use
|
|
137
|
+
the project `.env`. ScreenCI loads that file automatically for CLI commands.
|
|
138
|
+
That is also the right place for BYOK-style secrets such as
|
|
139
|
+
`ELEVENLABS_API_KEY`. ScreenCI does not store raw API keys from your env file.
|
|
140
|
+
|
|
126
141
|
## Authoring helpers
|
|
127
142
|
|
|
128
143
|
| Export | What it does |
|
|
@@ -149,3 +164,7 @@ Playwright config still passes through.
|
|
|
149
164
|
|
|
150
165
|
When `SCREENCI_SECRET` is configured, `screenci record` uploads the output to
|
|
151
166
|
ScreenCI for rendering, narration generation, and hosted delivery.
|
|
167
|
+
|
|
168
|
+
For narration authoring, keep cues short and usually one sentence at a time.
|
|
169
|
+
That makes overlap timing easier to manage and should reduce TTS regeneration
|
|
170
|
+
cost when only one line changes.
|
package/bin/screenci.js
CHANGED
package/dist/cli.d.ts
CHANGED
|
@@ -8,6 +8,20 @@ type PlaywrightListReportSuite = {
|
|
|
8
8
|
}>;
|
|
9
9
|
suites?: PlaywrightListReportSuite[];
|
|
10
10
|
};
|
|
11
|
+
/**
|
|
12
|
+
* Reports whether the current session can complete an interactive browser
|
|
13
|
+
* sign-in. A session is interactive only when both stdin and stdout are
|
|
14
|
+
* attached to a terminal and no signal marks the run as automated. This is the
|
|
15
|
+
* proxy for "a human is present to open the sign-in link" — it does not attempt
|
|
16
|
+
* to identify any particular caller (CI, a piped shell, or an automated tool).
|
|
17
|
+
*
|
|
18
|
+
* Dependency-injected so tests can force a value without a real terminal.
|
|
19
|
+
*/
|
|
20
|
+
export declare function detectInteractiveSession(env?: NodeJS.ProcessEnv, stdout?: {
|
|
21
|
+
isTTY?: boolean;
|
|
22
|
+
}, stdin?: {
|
|
23
|
+
isTTY?: boolean;
|
|
24
|
+
}): boolean;
|
|
11
25
|
export declare function collectPlaywrightListTitles(suites: readonly PlaywrightListReportSuite[]): string[];
|
|
12
26
|
type PreparedUploadAsset = {
|
|
13
27
|
fileHash: string;
|
|
@@ -17,7 +31,32 @@ type PreparedUploadAsset = {
|
|
|
17
31
|
fileBuffer?: Buffer;
|
|
18
32
|
contentType?: string;
|
|
19
33
|
};
|
|
34
|
+
export type StudioAppliedChange = {
|
|
35
|
+
kind?: string;
|
|
36
|
+
label?: string;
|
|
37
|
+
cue?: string;
|
|
38
|
+
language?: string;
|
|
39
|
+
from?: string;
|
|
40
|
+
to?: string;
|
|
41
|
+
};
|
|
42
|
+
export type UploadStudioInfo = {
|
|
43
|
+
held: true;
|
|
44
|
+
} | {
|
|
45
|
+
appliedChanges: StudioAppliedChange[];
|
|
46
|
+
};
|
|
47
|
+
export type StudioUploadNotice = {
|
|
48
|
+
videoName: string;
|
|
49
|
+
videoId: string | null;
|
|
50
|
+
studio: UploadStudioInfo;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* One-line summary of Studio overrides for CLI output, e.g.
|
|
54
|
+
* `recording.size (1 → 0.8), narration "intro" (en)`.
|
|
55
|
+
*/
|
|
56
|
+
export declare function formatStudioChangeSummary(changes: StudioAppliedChange[]): string;
|
|
57
|
+
export declare function formatStudioUrl(appUrl: string, projectId: string, videoId: string): string;
|
|
20
58
|
export declare function attachUploadAbortStdinListener(input: Pick<NodeJS.ReadStream, 'on' | 'off' | 'pause'>, onAbort: (signal: NodeJS.Signals) => void): () => void;
|
|
59
|
+
export declare function collectUploadAssets(data: RecordingData, configDir: string): Promise<PreparedUploadAsset[]>;
|
|
21
60
|
export declare function stripVoicePath(voice: VoiceKey | RecordingCustomVoiceRef): VoiceKey | RecordingCustomVoiceRef;
|
|
22
61
|
export declare function annotateRecordingDataWithAssetHashes(data: RecordingData, assets: PreparedUploadAsset[]): RecordingData;
|
|
23
62
|
export declare function formatUploadStartFailureMessage(videoName: string, status: number, responseText: string, secret: string): string;
|
|
@@ -25,20 +64,26 @@ export declare function formatFailedVideoMessage(videoName: string, message: str
|
|
|
25
64
|
export declare function printUploadStartFailureMessage(videoName: string, status: number, responseText: string, secret: string): void;
|
|
26
65
|
export declare function uploadRecordings(screenciDir: string, projectName: string, apiUrl: string, secret: string, specificEntry?: string, verbose?: boolean): Promise<{
|
|
27
66
|
projectId: string | null;
|
|
67
|
+
recordId: string | null;
|
|
28
68
|
hadFailures: boolean;
|
|
29
69
|
failedVideoNames: string[];
|
|
30
70
|
failedVideoMessages: Array<{
|
|
31
71
|
videoName: string;
|
|
32
72
|
message: string;
|
|
33
73
|
}>;
|
|
74
|
+
studioNotices: StudioUploadNotice[];
|
|
34
75
|
}>;
|
|
35
76
|
export declare function getDevBackendUrl(): string;
|
|
36
77
|
export declare function getDevFrontendUrl(): string;
|
|
78
|
+
export declare function getCliLinkSessionApiUrl(): string;
|
|
37
79
|
export declare function extractConfigStringLiteral(configSource: string, property: 'projectName' | 'envFile'): string | undefined;
|
|
38
80
|
export declare function extractRecordUploadPolicyLiteral(configSource: string): RecordUploadPolicy | undefined;
|
|
39
81
|
export declare function extractMockRecordLiteral(configSource: string): boolean | undefined;
|
|
40
82
|
export declare function getConfigModuleSpecifier(resolvedConfigPath: string): string;
|
|
41
|
-
export declare function ensureScreenciSecret(resolvedConfigPath?: string
|
|
83
|
+
export declare function ensureScreenciSecret(resolvedConfigPath?: string, opts?: {
|
|
84
|
+
interactive?: boolean;
|
|
85
|
+
}): Promise<string | undefined>;
|
|
42
86
|
export declare function main(): Promise<void>;
|
|
87
|
+
export declare function logCliError(error: unknown): void;
|
|
43
88
|
export {};
|
|
44
89
|
//# 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;AAMxB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,KAAK,EAAE,kBAAkB,EAAkB,MAAM,gBAAgB,C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