cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vladimir Kotikov (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-8954) Update platform check_reqs script to return structured result to 'requirements' command
Date Fri, 22 May 2015 09:29:17 GMT

    [ https://issues.apache.org/jira/browse/CB-8954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14555882#comment-14555882
] 

Vladimir Kotikov commented on CB-8954:
--------------------------------------

[~timwindsor], the place where this structure is placed - the platform's check_reqs code.
In general, the platform code will return a Promise, resolved with array of {{Requirement}}
objects, which defined as following:

{noformat}
/**
 * Object thar represents one of requirements for current platform.
 * @param {String} id         The unique identifier for this requirement.
 * @param {String} name       The name of requirements. Human-readable field.
 * @param {String} version    The version of requirement installed. In some cases could be
an array of strings
 *                            (for example, check_android_target returns an array of android
targets installed)
 * @param {Boolean} installed Indicates whether the reuirement is installed or not
 */
var Requirement = function (id, name, version, installed) {
    /* The unique identifier for this requirement */
    this.id = id;
    /* The name of requirements. Human-readable field */
    this.name = name;
    /* Indicates whether the reuirement is installed or not */
    this.installed = installed || false;
    this.metadata = {
        /* The version of requirement installed. In some cases could be an array of strings
           (for example, check_android_target returns an array of android targets installed)
*/
        version: version,
        /* Reason of failed check, should be a string with description, why check is failed,
           and, probably, the steps to resolve/install missing requirement */
        reason: undefined
    };
};
{noformat}

> Update platform check_reqs script to return structured result to 'requirements' command
> ---------------------------------------------------------------------------------------
>
>                 Key: CB-8954
>                 URL: https://issues.apache.org/jira/browse/CB-8954
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android, iOS, Windows, WP8
>            Reporter: Vladimir Kotikov
>            Assignee: Vladimir Kotikov
>
> Since {{requirements}} LIB method assumes that underlying platform script will be {{require}}d
instead of spawning child process and capturing output, we need to modify these scripts to
provide method that will be called for getting current requirements status.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message