@svatah/yam-migrate
v1/v2 to v3 migration and prototype database import
- Source:
packages/migrate· README:packages/migrate/README.md - Install:
npm install @svatah/yam-migrate - Version 0.1.0 · Apache-2.0
Exports
| Export | Kind | Signature | |
|---|---|---|---|
environmentName | function | export function environmentName(key: string): string | user.password → YAM_USER_PASSWORD. |
extractPrototypeProject | function | export function extractPrototypeProject(options: FromPrototypeOptions): FromPrototypeResult | Extract the prototype's database into the inputs a v2 migration takes. |
FromPrototypeOptions | interface | export interface FromPrototypeOptions | |
FromPrototypeResult | interface | export interface FromPrototypeResult | |
hasInteriorPreposition | function | export function hasInteriorPreposition(phrase: string): boolean | A phrase that still has a preposition inside it, which usually means the |
LegacyBlock | interface | export interface LegacyBlock | |
LegacyFlow | interface | export interface LegacyFlow | |
LegacyLocator | interface | export interface LegacyLocator | A locator, as v2 wrote it: xpath://button, link text : Sign In. |
LegacyStep | interface | export interface LegacyStep | |
looksSecret | function | export function looksSecret(key: string): boolean | |
migrate | function | export function migrate(options: MigrateOptions): MigrateResult | |
migrateData | function | export function migrateData(text: string): MigratedData | |
MigratedData | interface | export interface MigratedData | |
MigratedLocator | interface | export interface MigratedLocator | |
MigrateOptions | interface | export interface MigrateOptions | |
MigrateResult | interface | export interface MigrateResult | |
NOT_IMPORTED | variable | NOT_IMPORTED = ["results", "images", "executionHistory", "apihistory", "settings"] | Tables REQ-ADE-9 excludes. Listed, not silently skipped. |
parseLegacyStep | function | export function parseLegacyStep(raw: string, line: number): LegacyStep | One legacy line, taken apart. |
parseLocator | function | export function parseLocator(raw: string): LegacyLocator | xpath://button, link text : Sign In, css selector : #a → by + value. |
parseLocatorFile | function | export function parseLocatorFile(text: string): MigratedLocator[] | Parse a whole .locator / .properties file. |
parseLocatorLine | function | export function parseLocatorLine(line: string): MigratedLocator | undefined | Parse one name = a & b & c line. |
phraseFor | function | export function phraseFor( | A phrase for an element, from the prose beside it or from the locator. |
PrototypeDatabase | interface | export interface PrototypeDatabase | |
readLegacyFlow | function | export function readLegacyFlow(text: string, file: string): LegacyFlow | Read a v1/v2 flow file. |
readPrototypeDatabase | function | export function readPrototypeDatabase(path: string): PrototypeDatabase | Read an electron-db directory. |
renderReviewReport | function | export function renderReviewReport(input: ReportInput): string | |
ReportInput | interface | export interface ReportInput | |
ReviewNote | interface | export interface ReviewNote | The migration review report (REQ-LANG-11: verified by T, R). |
RewriteResult | interface | export interface RewriteResult | |
rewriteStep | function | export function rewriteStep(step: LegacyStep): RewriteResult | Rewrite one step. |
seedBinding | function | export function seedBinding(locator: MigratedLocator, at: string): BindingFile | One migrated locator as a BindingFile (LLD §3.3). |
Table | typealias | export type Table = ReadonlyArray<Record<string, unknown>>; | One electron-db table, as rows. |
valueFor | function | export function valueFor(raw: string): string | A *…* value as a v3 value: a quoted literal or a {…} reference. |
verbFor | function | export function verbFor(action: string | undefined): Verb | undefined | The v3 verb a legacy action means, through the ported vocabulary. |