Options
All
  • Public
  • Public/Protected
  • All
Menu

Class for representing a Nest.js Service.

Hierarchy

  • TypescriptService
    • NestService

Index

Constructors

constructor

  • new NestService(context: ExecutionContext, info: Info, schemas: Schema[]): NestService
  • Constructor for the NestJS service.

    Parameters

    • context: ExecutionContext

      Path to the service.yaml.

    • info: Info

      Info of the service.

    • schemas: Schema[]

      List of service schemas.

    Returns NestService

Properties

Protected context

context: ExecutionContext

environmentManager

environmentManager: EnvironmentManager

info

info: Info

schemas

schemas: Schema[]

selectedEnvironmentName

selectedEnvironmentName: string

type

type: string

Static DIRNAME

DIRNAME: string = __dirname

Static NAME

NAME: string = "nestjs"

Accessors

dependencies

  • get dependencies(): Record<string, string>
  • NestJS specific dependencies.

    function

    dependencies

    memberof

    NestService

    Returns Record<string, string>

    Object of package name and version.

devDependencies

  • get devDependencies(): Record<string, string>
  • NestJS specific dev-dependencies.

    function

    devDependencies

    memberof

    NestService

    Returns Record<string, string>

    Object of package name and version.

scripts

  • get scripts(): Record<string, string>
  • Object of the scripts.

    function

    scripts

    memberof

    NestService

    Returns Record<string, string>

    Object of the scripts.

serviceDirectory

  • get serviceDirectory(): string

Methods

addSchema

  • addSchema(schema: Schema): Schema
  • Parameters

    • schema: Schema

    Returns Schema

createESLintConfig

  • createESLintConfig(): void
  • Returns void

createGitIgnore

  • createGitIgnore(): Promise<void>
  • Returns Promise<void>

createIgnoreFiles

  • createIgnoreFiles(): void

createNestCLIJSON

  • createNestCLIJSON(): void

createPackageFile

  • createPackageFile(): void
  • Returns void

createREADME

  • createREADME(): void
  • Returns void

createSourceDirectory

  • createSourceDirectory(): string
  • Returns string

createSourceFiles

  • createSourceFiles(): void
  • Create the initial app.

    This does not call the parent method because nest uses main.ts, rather than index.ts.

    Returns void

createTSConfig

  • createTSConfig(): void
  • Returns void

getSchema

  • getSchema(identifier: string): Schema | null
  • Parameters

    • identifier: string

    Returns Schema | null

installPackages

  • installPackages(): void
  • Returns void

makeESLintConfig

  • makeESLintConfig(): ESLintConfigType
  • Returns ESLintConfigType

makeFileHeader

  • makeFileHeader(fileName: string): string
  • Parameters

    • fileName: string

    Returns string

makeFileHeaderLines

  • makeFileHeaderLines(fileName: string): string[]
  • Parameters

    • fileName: string

    Returns string[]

makeIgnoreComponents

  • makeIgnoreComponents(): string[]
  • Returns string[]

makeMainIndexFileContent

  • makeMainIndexFileContent(): string

makePackageContent

  • makePackageContent(): PackageJSONType
  • Construct a package.json object.

    function

    makePackageContent

    memberof

    Typescript

    Returns PackageJSONType

    Package.json object.

makeREADMELines

  • makeREADMELines(): string[]
  • Returns string[]

makeTSBuildConfig

  • makeTSBuildConfig(): TSConfigType
  • Returns TSConfigType

makeTSConfig

  • makeTSConfig(): TSConfigType
  • Returns TSConfigType

postInit

  • postInit(): void

postVersionBump

  • postVersionBump(): void
  • Returns void

readPackageFile

  • readPackageFile(): PackageJSONType | null
  • Returns PackageJSONType | null

readTemplate

  • readTemplate(scope: string, fileName: string): string
  • Parameters

    • scope: string
    • fileName: string

    Returns string

removeSchema

  • removeSchema(identifier: string): boolean
  • Parameters

    • identifier: string

    Returns boolean

serialize

write

  • write(): boolean
  • Returns boolean

writePackageFile

  • writePackageFile(pkg: PackageJSONType): void
  • Parameters

    • pkg: PackageJSONType

    Returns void

Static deserialize

  • Deserialize an object into a NestService instance.

    function

    deserialize

    static
    memberof

    NestService

    Parameters

    • context: ExecutionContext

      Execution context.

    • data: NestServiceType

      Javascript object of the service.

    Returns NestService

    Service instance.

Static makeInitialData

  • makeInitialData(identifier: string, user: User | null): InitializeServiceDataType
  • Parameters

    • identifier: string
    • user: User | null

    Returns InitializeServiceDataType

Static makeObject

  • makeObject(data: InitializeServiceDataType, user: User | null): NestServiceType
  • Make a NestService object.

    static

    Parameters

    • data: InitializeServiceDataType

      Data for the NestService objectr.

    • user: User | null

      User instance.

    Returns NestServiceType

    NestService object data.

Generated using TypeDoc