mirror of
https://github.com/screenci/screenci.git
synced 2026-09-19 08:57:46 +08:00
ced553b145
- `screenci start` accepts the new setup code kinds (screenshot, language, ci) and prints a brief for each. The CI brief is provider-agnostic: it stores the key via a command that reads the env file, lists the CI providers found in the repository, points GitHub at `ci-workflow` and the others at the docs templates, and never prints the secret. - A repository holding the project's own `screenci/` island counts as "inside" even when its remote is unknown or differs (forks, mirrors). - New `clone-workspace` outcome: an edit run outside the repository records against the site and uploads its scripts (`SCREENCI_UPLOAD_SOURCES=1` written to the env file) instead of committing in the gitignored clone. - Merge and CI codes pull sources over an existing repository workspace only when ScreenCI holds sources newer than the merged bundle (`sourcesUnmerged` from the exchange), and check the repository URL before writing anything. - `screenci init` no longer writes a GitHub Actions workflow by default: `--github-workflow` opts in, `--no-github-workflow` and its prompt are gone. New `screenci ci-workflow` writes the same file on demand. - `preview`/`export` report the runner kind with run-complete so a CI code completes only on a pipeline run. - Docs: CI setup rewritten around Add to CI with GitLab CI, CircleCI, Buildkite and shell templates; CLI reference, configuration, web-app guide and the skill updated. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
95 lines
2.7 KiB
TypeScript
95 lines
2.7 KiB
TypeScript
import { describe, expect, it } from 'vitest'
|
|
import * as screenci from './index.js'
|
|
import * as initModule from './src/init.js'
|
|
import * as recordingModule from './src/recording.js'
|
|
import * as voicesModule from './src/voices.js'
|
|
|
|
describe('public api surface', () => {
|
|
it('only exports public runtime api from the root entrypoint', () => {
|
|
expect(Object.keys(screenci).sort()).toEqual([
|
|
'ACTION_PARAM_DEFAULTS',
|
|
'DEFAULT_LANGUAGE_LOCALES',
|
|
'MAX_AUDIO_LEVEL',
|
|
'autoZoom',
|
|
'defineConfig',
|
|
'hide',
|
|
'hideNarration',
|
|
'hideRecording',
|
|
'modelTypes',
|
|
// moveNarration, resizeNarration, and setBackground are hidden for
|
|
// release (unfinished features); their exports are commented out in
|
|
// index.ts.
|
|
'overlayRect',
|
|
'redact',
|
|
'resetZoom',
|
|
'resizeRecording',
|
|
'resolveLocaleForLanguage',
|
|
'screenshot',
|
|
'showNarration',
|
|
'showRecording',
|
|
'speed',
|
|
'time',
|
|
'unredactAll',
|
|
'video',
|
|
'voices',
|
|
'zoomTo',
|
|
])
|
|
})
|
|
|
|
it('only exports runtime recording helpers from the recording entrypoint', () => {
|
|
expect(Object.keys(recordingModule).sort()).toEqual([
|
|
'RENDER_OPTIONS_DEFAULTS',
|
|
'isSingleKeyCombo',
|
|
'parseKeyCombo',
|
|
])
|
|
})
|
|
|
|
it('only exports public runtime voice helpers from the voices entrypoint', () => {
|
|
expect(Object.keys(voicesModule).sort()).toEqual([
|
|
'defaultBuiltInVoice',
|
|
'modelTypes',
|
|
'russianBuiltInVoices',
|
|
'supportedLanguages',
|
|
'voices',
|
|
])
|
|
})
|
|
|
|
it('only exports the supported init helpers from the init entrypoint', () => {
|
|
expect(Object.keys(initModule).sort()).toEqual([
|
|
'SOURCE_BUNDLE_MEDIA_EXTENSIONS',
|
|
'detectPackageManagerFromLockfile',
|
|
'detectPackageManagerFromPackageJson',
|
|
'detectPnpmWorkspace',
|
|
'determinePackageManager',
|
|
'findRepositoryRoot',
|
|
'generateConfig',
|
|
'generateExampleScreenshot',
|
|
'generateExampleVideo',
|
|
'generateGithubAction',
|
|
'generateGitignore',
|
|
'generateIslandReadme',
|
|
'generateIslandTsconfig',
|
|
'generatePrettierConfig',
|
|
'generateReactExampleScreenshot',
|
|
'generateRingOverlayHtml',
|
|
'generateRingOverlayTsx',
|
|
'getIslandRunCommand',
|
|
'initToggleOptionsFromCommander',
|
|
'installAgentSkills',
|
|
'installIslandFromPackageJson',
|
|
'installPlaywrightShell',
|
|
'parsePackageManager',
|
|
'parsePnpmVersionSupport',
|
|
'parseYarnVersionSupport',
|
|
'registerInitToggleOptions',
|
|
'resolveBundledLogoPath',
|
|
'runCreateScreenciCli',
|
|
'runInit',
|
|
'scaffoldScreenciIsland',
|
|
'setUpInitSecret',
|
|
'toIslandPackageName',
|
|
'toWorkflowPath',
|
|
])
|
|
})
|
|
})
|