Options
All
  • Public
  • Public/Protected
  • All
Menu

MiraVersion checks the CDK version consistency across the Mira packge and the applications using Mira. It is capable of force-patching package.json files and running the NPM install.

Hierarchy

  • MiraVersion

Index

Constructors

constructor

Properties

cdkVersion

cdkVersion: string

Static instance

instance: MiraVersion

Methods

checkApplicationCDKVersion

  • checkApplicationCDKVersion(autoFix?: boolean): void
  • Gets the version of CDK used by an application. If there is a version mismatch, then modifies the package.json file of the application, informs the user and exits.

    Parameters

    • Default value autoFix: boolean = true

    Returns void

checkApplicationDependencyCDKVersion

  • checkApplicationDependencyCDKVersion(pkg: any, pkgDeps: {}, dep: string, autoFix?: boolean): boolean
  • Checks a particular dependency CDK version.

    Parameters

    • pkg: any
    • pkgDeps: {}
      • [key: string]: string
    • dep: string
    • Default value autoFix: boolean = true

    Returns boolean

checkDependency

  • checkDependency(version: string, dep?: undefined | string, otherVersion?: undefined | string, otherDep?: undefined | string): boolean
  • Checks a dependency such that it has no wildcards in use. Optionally checks against an otherVersion.

    Parameters

    • version: string
    • Optional dep: undefined | string
    • Optional otherVersion: undefined | string
    • Optional otherDep: undefined | string

    Returns boolean

checkLocalMiraCDKDependencies

  • checkLocalMiraCDKDependencies(version: string, pkg: any): void
  • Checks the local Mira dependencies when Mira has been installed as part of an app such that all Mira CDK deps should be installed as peer deps and also checks that any leftover CDK deps within Mira (not present in the app) are the same expected version as Mira specifies.

    Parameters

    • version: string
    • pkg: any

    Returns void

checkNodeModuleDependency

  • checkNodeModuleDependency(dep: string, version: string): void
  • Checks that the file within node_modules matches what is expected for the dependency provided and the version. If any of these checks fails, an error is thrown.

    Parameters

    • dep: string
    • version: string

    Returns void

getLocalMiraCDKVersion

  • getLocalMiraCDKVersion(): string | boolean
  • Gets the CDK version within this local version of Mira. If there are any version range operators used, throws an error.

    Returns string | boolean

Legend

  • Constructor
  • Property
  • Method
  • Constructor
  • Property
  • Method
  • Inherited property
  • Inherited method
  • Private property
  • Private method
  • Static property
  • Static method

Generated using TypeDoc