Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Project

Hierarchy

  • Project

Index

Constructors

constructor

Accessors

bundleID

  • get bundleID(): string
  • set bundleID(value: string): void
  • Returns string

  • Parameters

    • value: string

    Returns void

compilations

  • get compilations(): object
  • Returns object

configURL

  • get configURL(): string
  • Returns string

dateCompiled

  • get dateCompiled(): Date
  • Returns Date

dateCreated

  • get dateCreated(): Date
  • Returns Date

dateUpdated

  • get dateUpdated(): Date
  • Returns Date

errors

  • get errors(): object
  • Returns object

    • [p: string]: string

id

  • get id(): string
  • Returns string

keys

  • get keys(): object
  • Returns object

name

  • get name(): string
  • set name(value: string): void
  • Returns string

  • Parameters

    • value: string

    Returns void

origin

  • get origin(): object
  • Returns object

    • [p: string]: string

sourceURL

  • get sourceURL(): string
  • Returns string

version

  • get version(): string
  • set version(value: string): void
  • Returns string

  • Parameters

    • value: string

    Returns void

Methods

assignSigningKey

  • assignSigningKey(signingKey: SigningKey): Promise<void>
  • Assigns a singing key to the correspondent platform of the project. Next compilations will try to use the key. If there was another key assigned to the platform the new key overwrites it.

    Parameters

    Returns Promise<void>

    Promise of a successful operation.

compile

  • compile(): Promise<void>
  • Places the project in the compilation queue.

    Returns Promise<void>

    Promise of a successful operation.

compileDevApp

  • compileDevApp(): Promise<void>
  • Places a DevApp of the project in the compilation queue.

    Returns Promise<void>

    Promise of a successful operation.

delete

  • delete(): Promise<void>
  • Deletes the project.

    Returns Promise<void>

    Promise of a successful operation.

getConfigXML

  • getConfigXML(): Promise<XMLSugar>
  • Get a sugar for the XML configuration of the project.

    Returns Promise<XMLSugar>

    Promise of a sugar for the XML configuration of the project.

getIconBlob

  • getIconBlob(platform: Platform): Promise<Blob>
  • Get the icon of the project.

    Parameters

    • platform: Platform

      Platform to get the icon. If not set the default icon will be fetched.

    Returns Promise<Blob>

    Promise of the icon of the project.

getLastUse

  • getLastUse(): Date
  • Get the date of the last usage of the project.

    Returns Date

    Date of the last usage of the project.

getSplashBlob

  • getSplashBlob(platform: Platform): Promise<Blob>
  • Get the splash of the project.

    Parameters

    • platform: Platform

      Platform to get the splash. If not set the default splash will be fetched.

    Returns Promise<Blob>

    Promise of the splash of the project.

isCompiling

  • isCompiling(): boolean
  • Check if there is at least an ongoing compilation.

    Returns boolean

    If there is at least an ongoing compilation.

refresh

  • refresh(): Promise<void>
  • Fetches the project from Cocoon.io.

    Returns Promise<void>

    Promise of a successful operation.

refreshCocoon

  • refreshCocoon(): Promise<void>
  • Uploads the current config.xml extracted from the sugar.

    Returns Promise<void>

    Promise of a successful operation.

refreshUntilCompleted

  • refreshUntilCompleted(callback: function, interval?: number, maxWaitTime?: number): void
  • Fetches the project from Cocoon.io until every compilations is completed.

    Parameters

    • callback: function

      Function that will be called for each attempt to check if the compilations are completed.

        • (completed: boolean, error?: any): void
        • Parameters

          • completed: boolean
          • Optional error: any

          Returns void

    • Default value interval: number = this.DEFAULT_WAIT_TIME

      Interval between fetches.

    • Default value maxWaitTime: number = this.MAX_WAIT_TIME

      Maximum time to wait.

    Returns void

removeSigningKey

  • removeSigningKey(platform: Platform): Promise<void>
  • Removes the signing key assigned to the indicated project platform.

    Parameters

    • platform: Platform

      Platform to remove the signing key from.

    Returns Promise<void>

    Promise of a successful operation.

setIconBlob

  • setIconBlob(icon: File, platform: Platform): Promise<void>
  • Set the icon of the project.

    Parameters

    • icon: File

      Image to use as new icon. Recommended 2048x2048 PNG.

    • platform: Platform

      Platform to set the icon. If not set the default icon will be updated.

    Returns Promise<void>

    Promise of a successful operation.

setSplashBlob

  • setSplashBlob(splash: File, platform: Platform): Promise<void>
  • Set the splash of the project.

    Parameters

    • splash: File

      Image to use as new splash. Recommended 2048x2048 PNG.

    • platform: Platform

      Platform to set the splash. If not set the default splash will be updated.

    Returns Promise<void>

    Promise of a successful operation.

updateConfigXml

  • updateConfigXml(xml: string): Promise<void>
  • Update the config.xml file of the project.

    Parameters

    • xml: string

      New config.xml for the project.

    Returns Promise<void>

    Promise of a successful operation.

updateRepository

  • updateRepository(repo: object): Promise<void>
  • Update the project providing a git repository to clone.

    Parameters

    • repo: object

      Object containing a URL of the git repo and the name of the branch to checkout (defaults to master if not set). It's used to fetch the source code for the project. Can contain a config.xml too.

      • Optional branch?: string
      • url: string

    Returns Promise<void>

    Promise of a successful operation.

updateURL

  • updateURL(url: string): Promise<void>
  • Update the project providing a URL.

    Parameters

    • url: string

      URL to fetch the source code. Can contain a config.xml file too.

    Returns Promise<void>

    Promise of a successful operation.

updateZip

  • updateZip(file: File): Promise<void>
  • Update the project uploading a zip file.

    Parameters

    • file: File

      Zip file containing the source code. Can contain a config.xml file too.

    Returns Promise<void>

    Promise of a successful operation.

Generated using TypeDoc