New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

crosswalk-app-tools

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

crosswalk-app-tools - npm Package Compare versions

Comparing version 0.4.3 to 0.4.4

android/lib/AndroidDependencies.js

2

android/index.js

@@ -5,2 +5,2 @@ // Copyright © 2014 Intel Corporation. All rights reserved.

module.exports = require('./src/AndroidPlatform');
module.exports = require('./lib/AndroidPlatform');

@@ -9,3 +9,3 @@ // Copyright © 2014 Intel Corporation. All rights reserved.

var AndroidDependencies = require("../src/AndroidDependencies");
var AndroidDependencies = require("../lib/AndroidDependencies");
var Util = require("../../test-util/Util.js");

@@ -18,49 +18,2 @@

pickLatest1: function(test) {
test.expect(1);
var app = Util.createTmpApplication("com.example.foo");
var deps = new AndroidDependencies(app, "stable");
var versions = [
"1.2.3.4",
"5.9.7.8",
"7.6.5.4"
];
var version = deps.pickLatest(versions);
test.equal(version, "7.6.5.4");
Util.deleteTmpApplication(app);
test.done();
},
pickLatest2: function(test) {
test.expect(1);
var app = Util.createTmpApplication("com.example.foo");
// Bad test, suppress error output
app.config.setSilentConsole(true);
var deps = new AndroidDependencies(app, "stable");
var version = deps.pickLatest(null);
test.equal(version, null);
Util.deleteTmpApplication(app);
test.done();
},
pickLatest3: function(test) {
test.expect(1);
var app = Util.createTmpApplication("com.example.foo");
// Bad test, suppress error output
app.config.setSilentConsole(true);
var deps = new AndroidDependencies(app, "stable");
var version = deps.pickLatest([]);
test.equal(version, null);
Util.deleteTmpApplication(app);
test.done();
},
fetchVersions: function(test) {

@@ -67,0 +20,0 @@

@@ -5,3 +5,3 @@ // Copyright © 2014 Intel Corporation. All rights reserved.

var AndroidPlatform = require("../src/AndroidPlatform");
var AndroidPlatform = require("../lib/AndroidPlatform");
var PlatformBase = require("../../src/PlatformBase");

@@ -8,0 +8,0 @@ var Util = require("../../test-util/Util.js");

@@ -8,3 +8,3 @@ // Copyright © 2014 Intel Corporation. All rights reserved.

var AndroidSDK = require("../src/AndroidSDK");
var AndroidSDK = require("../lib/AndroidSDK");
var Util = require("../../test-util/Util.js");

@@ -11,0 +11,0 @@

@@ -5,3 +5,3 @@ // Copyright © 2014 Intel Corporation. All rights reserved.

var AndroidTargets = require("../src/AndroidTargets");
var AndroidTargets = require("../lib/AndroidTargets");

@@ -8,0 +8,0 @@ var _androidTargets = "" +

@@ -10,6 +10,5 @@ // Copyright © 2014 Intel Corporation. All rights reserved.

* @param {PlatformData} platformData Init data passed to the platform
* @param {Object} args Platform-specific args, only if specified and actually given
* @protected
*/
function DemoPlatform(PlatformBase, baseData, args) {
function DemoPlatform(PlatformBase, baseData) {

@@ -28,7 +27,2 @@ // Create base instance.

// Print args
for (var key in args) {
instance.output.write("DemoPlatform " + key + ": " + args[key] + "\n");
}
return instance;

@@ -44,4 +38,9 @@ }

return {
"foo": "Option added by the backend.",
"bar": "Another option added by the backend."
create: { // Extra options for command "create"
foo: "Option added by the backend",
bar: "Another option added by the backend"
},
update: { // Extra options for command "update"
baz: "Another option added by the backend"
}
};

@@ -51,9 +50,6 @@ };

/**
* Generate project template.
* @param {Object} options Extra options for the command
* @param {PlatformBase~platformBaseOperationCb} callback callback function
* @abstract
* Implements {@link PlatformBase.create}
*/
DemoPlatform.prototype.generate =
function(options, callback) {
DemoPlatform.prototype.create =
function(packageId, args, callback) {

@@ -68,9 +64,6 @@ // TODO implement generation of project.

/**
* Update platform project to latest Crosswalk.
* @param {String} version Version to update to, format w.x.y.z
* @param {Object} options Extra options for the command
* @param {PlatformBase~platformBaseOperationCb} callback callback function
* Implements {@link PlatformBase.update}
*/
DemoPlatform.prototype.update =
function(version, options, callback) {
function(versionSpec, args, callback) {

@@ -97,12 +90,6 @@ // TODO implement updating of project to new Crosswalk version.

/**
* Build application package.
* @function build
* @param {String[]} abi Array of ABIs, supported armeabi-v7a, x86.
* @param {Boolean} release Whether to build debug or release package.
* @param {Function} callback see {@link Project~projectOperationCb}.
* @abstract
* @memberOf Project
* Implements {@link PlatformBase.build}
*/
DemoPlatform.prototype.build =
function(abis, release, callback) {
function(configId, args, callback) {

@@ -109,0 +96,0 @@ // TODO implement updating of project to new Crosswalk version.

@@ -17,3 +17,6 @@ module.exports = function(grunt) {

jshint: {
files: ['Gruntfile.js', 'src/**/*.js', 'test/**/*.js'],
files: ['Gruntfile.js',
'src/**/*.js', 'test/*.js', 'test-util/*.js',
'examples/**/*.js',
'android/**/*.js'],
options: {

@@ -20,0 +23,0 @@ /* options here to override JSHint defaults

{
"name": "crosswalk-app-tools",
"version": "0.4.3",
"description": "An APK packager for Crosswalk -- http://crosswalk-project.org",
"version": "0.4.4",
"description": "An APK packager for the Crosswalk Project -- http://crosswalk-project.org",
"author": "Robert Staudinger <robert.staudinger@intel.com>",

@@ -42,3 +42,3 @@ "license": "Apache V2",

"bugs": {
"url": "https://github.com/crosswalk-project/crosswalk-app-tools/issues"
"url": "https://crosswalk-project.org/jira/"
},

@@ -45,0 +45,0 @@ "files": [

@@ -7,10 +7,12 @@ Crosswalk-app-tools

Crosswalk-app-tools is in very early stages of development, and not suitable for use in a production environment. "Releases" and announcements are made available as a technology preview only. No packages are being published at this time, but git tags serve as reference points for release milestones.
Crosswalk-app-tools is in early stages of development, and not suitable for use in a production environment. Preliminary releases and announcements are made available as a technology preview only. No packages are being published at this time, but git tags serve as reference points for release milestones.
### Installation
Crosswalk-app-tools is cross-platform by virtue of being based on Node.js. However at this point most testing is done on Linux, so we expect the least number of hickups there. In any case we have seen reports of successful runs on Apple OS X, and are looking forward to hearing about adventurous individuals giving it a spin on Microsoft Windows as well.
Prerequisites are functional
1. Android SDK
2. Apache Ant
3. Node.js
2. Java JDK and Apache Ant
3. Node.js and NPM

@@ -30,4 +32,2 @@ on the system.

crosswalk-app create <package-id> Create project <package-id>
--crosswalk=<path> Use downloaded Crosswalk
--channel=<name> Release channel: stable|beta|canary

@@ -43,2 +43,11 @@ crosswalk-app build [release|debug] Build project to create packages

crosswalk-app version Display version information
Options for platform 'android'
For command 'create'
--android-crosswalk Channel name (stable/beta/canary)
or version number (w.x.y.z)
Environment Variables
CROSSWALK_APP_TOOLS_CACHE_DIR Keep downloaded files in this dir
```

@@ -45,0 +54,0 @@ #### Example: Create App

@@ -37,4 +37,2 @@ // Copyright © 2014 Intel Corporation. All rights reserved.

" crosswalk-app create <package-id>\t\tCreate project <package-id>\n" +
" --crosswalk=<path>\tUse downloaded Crosswalk\n" +
" --channel=<name>\tRelease channel: stable|beta|canary\n" +
"\n" +

@@ -136,18 +134,2 @@ " crosswalk-app build [release|debug]\t\tBuild project to create packages\n" +

/**
* Get extra options for the create command.
* @returns {Object} Options in name/value form, or null if there are none.
*/
CommandParser.prototype.createGetOptions =
function() {
if (this._createOptions) {
// Validate
var keys = [ "crosswalk", "channel" ];
this._createOptions = this.discardUnknownOptions(this._createOptions, keys);
}
return this._createOptions;
};
/**
* Get version when command is "update".

@@ -214,22 +196,2 @@ * @returns {String} Crosswalk version string when given and valid. Null when not given, false when invalid.

/**
* Filter out unknown options from the options object.
* @param {Object} options Options object holding name/value pairs
* @param {String[]} knownKeys Known options to keep
*/
CommandParser.prototype.discardUnknownOptions =
function(options, knownKeys) {
var own = Object.getOwnPropertyNames(options);
for (var i = 0; i < own.length; i++) {
var prop = own[i];
if (knownKeys.indexOf(prop) < 0) {
// Property not among knownKeys, discard.
delete options[prop];
}
}
return options;
};
/**
* Check whether packageId conforms to the naming scheme.

@@ -236,0 +198,0 @@ * @param {String} packageId Package ID to check

@@ -75,19 +75,7 @@ // Copyright © 2014 Intel Corporation. All rights reserved.

// Collect backend-specific args
var allArgs = Minimist(process.argv.slice(2));
var args = {};
for (var key in platformInfo.args) {
// Strip dash prefix before matching, Minimist strips them also.
var key_ = key.substring("--".length);
if (allArgs[key_]) {
// Also strip platform prefix before collecting the arg.
var argPrefix = platformInfo.platformId + "-";
var argName = key_.substring(argPrefix.length);
args[argName] = allArgs[key_];
}
}
var baseData = {
// See type PlatformData
var platformData = {
application: this,
platformId: platformInfo.platformId
platformId: platformInfo.platformId,
argSpec: platformInfo.argSpec
};

@@ -97,3 +85,3 @@ var platform = null;

try {
platform = new platformInfo.Ctor(PlatformBase, baseData, args);
platform = new platformInfo.Ctor(PlatformBase, platformData);
} catch (e) {

@@ -110,4 +98,27 @@ output.error("The Android SDK could not be found. " +

/**
* Collect arguments
*/
Main.prototype.collectArgs =
function(platformId, allArgs, argsSpec) {
// Collect backend-specific args
var args = {};
for (var key in argsSpec) {
// Strip dash prefix before matching, Minimist strips them also.
var key_ = key.substring("--".length);
if (allArgs && allArgs[key_]) {
// Also strip platform prefix before collecting the arg.
var argPrefix = platformId + "-";
var argName = key_.substring(argPrefix.length);
args[argName] = allArgs[key_];
}
}
return args;
};
/**
* Create skeleton project.
* @param {Object} options Extra options for the command
* @param {String} packageId Package ID
* @param {Object} extraArgs Unparsed extra arguments passed by command-line
* @param {Main~mainOperationCb} callback Callback function

@@ -117,3 +128,3 @@ * @static

Main.prototype.create =
function(options, callback) {
function(packageId, extraArgs, callback) {

@@ -133,4 +144,11 @@ var output = this.output;

project.generate(options, function(errormsg) {
// Collect args for this command
var createArgs = {};
var argSpec = project.argSpec;
if (argSpec && argSpec.create) {
createArgs = this.collectArgs(project.platformId, extraArgs, argSpec.create);
}
project.create(packageId, createArgs, function(errormsg) {
if (errormsg) {

@@ -150,2 +168,3 @@ output.error(errormsg);

* @param {String} version Version to update to, or null for latest stable version
* @param {Object} extraArgs Unparsed extra arguments passed by command-line
* @param {Main~mainOperationCb} callback Callback function

@@ -155,3 +174,3 @@ * @static

Main.prototype.update =
function(version, callback) {
function(version, extraArgs, callback) {

@@ -166,4 +185,11 @@ var output = this.output;

project.update(version, {}, function(errormsg) {
// Collect args for this command
var updateArgs = {};
var argSpec = project.argSpec;
if (argSpec && argSpec.update) {
updateArgs = this.collectArgs(project.platformId, extraArgs, argSpec.update);
}
project.update(version, updateArgs, function(errormsg) {
if (errormsg) {

@@ -182,3 +208,4 @@ output.error(errormsg);

* Build application package.
* @param {String} type Build "debug" or "release" configuration
* @param {String} configId Build "debug" or "release" configuration
* @param {Object} extraArgs Unparsed extra arguments passed by command-line
* @param {Main~mainOperationCb} callback Callback function

@@ -188,3 +215,3 @@ * @static

Main.prototype.build =
function(type, callback) {
function(configId, extraArgs, callback) {

@@ -208,6 +235,11 @@ var output = this.output;

// Collect args for this command
var buildArgs = {};
var argSpec = project.argSpec;
if (argSpec && argSpec.build) {
buildArgs = this.collectArgs(project.platformId, extraArgs, argSpec.build);
}
// Build
var abis = ["armeabi-v7a", "x86"];
var release = type === "release" ? true : false;
project.build(abis, release, function(errormsg) {
project.build(configId, buildArgs, function(errormsg) {

@@ -247,12 +279,15 @@ if (errormsg) {

if (platformInfo.args) {
output.write(" Options for platform '" + platformInfo.platformId + "'\n");
for (var arg in platformInfo.args) {
output.write(" " + arg + " " + platformInfo.args[arg] + "\n");
if (platformInfo.argSpec) {
output.write("Options for platform '" + platformInfo.platformId + "'\n");
for (var cmd in platformInfo.argSpec) {
output.write("\n For command '" + cmd + "'\n");
var cmdArgs = platformInfo.argSpec[cmd];
for (var arg in cmdArgs) {
output.write(" " + arg + " " + cmdArgs[arg] + "\n");
}
}
}
output.write("\n");
output.write(" Environment Variables\n");
output.write(" CROSSWALK_APP_TOOLS_CACHE_DIR\t\tKeep downloaded files in this dir\n");
output.write("Environment Variables\n\n");
output.write(" CROSSWALK_APP_TOOLS_CACHE_DIR\t\tKeep downloaded files in this dir\n");
output.write("\n");

@@ -301,7 +336,6 @@ };

var options = null;
var extraArgs = Minimist(process.argv.slice(2));
switch (cmd) {
case "create":
var packageId = parser.createGetPackageId();
options = parser.createGetOptions();

@@ -311,3 +345,3 @@ // Chain up the constructor.

this.create(options, callback);
this.create(packageId, extraArgs, callback);
break;

@@ -321,3 +355,3 @@

this.update(version, callback);
this.update(version, extraArgs, callback);
break;

@@ -331,3 +365,3 @@

this.build(type, callback);
this.build(type, extraArgs, callback);
break;

@@ -334,0 +368,0 @@

@@ -27,2 +27,3 @@ // Copyright © 2014 Intel Corporation. All rights reserved.

* @property {String} platformId Name for backend (android, ios, ...)
* @property {Object} argSpec Platform-specific command-line argument definitions
* @memberOf PlatformBase

@@ -52,2 +53,4 @@ */

this._argSpec = platformData.argSpec;
var logfilePath = Path.join(this._application.logPath, this._platformId + ".log");

@@ -70,2 +73,14 @@ this._logOutput = new LogfileOutput(logfilePath);

/**
* Platform-specific argument definitions.
* @member {Object} argSpec
* @instance
* @memberOf PlatformBase
*/
Object.defineProperty(PlatformBase.prototype, "argSpec", {
get: function() {
return this._argSpec;
}
});
/**
* Absolute path to directory where the html application is located.

@@ -187,9 +202,10 @@ * @member {String} appPath

* Generate platform project template.
* @param {Object} options Extra options for the command
* @param {String} packageId Package ID
* @param {Object} args Extra options for the command
* @param {PlatformBase~platformBaseOperationCb} callback callback function
*/
PlatformBase.prototype.generate =
function(options, callback) {
PlatformBase.prototype.create =
function(packageId, args, callback) {
throw new Error("PlatformBase.generate() not implemented.");
throw new Error("PlatformBase.create() not implemented.");
};

@@ -199,8 +215,8 @@

* Update platform project to latest Crosswalk.
* @param {String} version Version to update to, format w.x.y.z
* @param {Object} options Extra options for the command
* @param {String} versionSpec Channel name or version to update to, format w.x.y.z
* @param {Object} args Extra options for the command
* @param {PlatformBase~platformBaseOperationCb} callback callback function
*/
PlatformBase.prototype.update =
function(version, options, callback) {
function(versionSpec, args, callback) {

@@ -221,8 +237,9 @@ throw new Error("PlatformBase.update() not implemented.");

* Build application package.
* @param {String[]} abi Array of ABIs, supported armeabi-v7a, x86
* @param {Boolean} release Whether to build debug or release package
* @param {String} release Configuration identifier for the build
* @param {Object} args Extra options for the command
* @param {String} configId Name of configuration to build, typically "debug" or "release"
* @param {PlatformBase~platformBaseOperationCb} callback Callback function.
*/
PlatformBase.prototype.build =
function(abis, release, callback) {
function(configId, args, callback) {

@@ -229,0 +246,0 @@ throw new Error("PlatformBase.build() not implemented.");

@@ -21,2 +21,3 @@ // Copyright © 2014 Intel Corporation. All rights reserved.

* @property {String} platformId Name for backend (android, ios, ...)
* @property {Object} argSpec Platform-specific command-line argument definitions
* @memberOf PlatformsManager

@@ -38,2 +39,3 @@ */

"crosswalk-app-tools-backend-demo",
"crosswalk-app-tools-backend-test",
"../android/index.js"

@@ -62,16 +64,4 @@ ];

var platformArgs = {};
if (Ctor.getArgs) {
var args = Ctor.getArgs();
for (var key in args) {
platformArgs["--" + platformId + "-" + key] = args[key];
}
}
platformInfo = this.buildInfo(Ctor, platformId);
platformInfo = {
Ctor: Ctor,
platformId: platformId,
args: platformArgs
};
// If we get here there backend has been instantiated successfully.

@@ -96,2 +86,37 @@ break;

/**
* Load platform by constructor.
* @param {Function} PlatformImplCtor Constructor for a {@link PlatformBase} subclass
* @param {String} platformId Identifier for platform (android, ios, ...)
* @returns {PlatformInfo}
* @protected
*/
PlatformsManager.prototype.buildInfo =
function(PlatformImplCtor, platformId) {
var platformInfo = null;
// Prefix all platform-specific args with the platform name
var platformArgSpec = {};
if (PlatformImplCtor.getArgs) {
var argSpec = PlatformImplCtor.getArgs();
for (var cmd in argSpec) {
var cmdArgSpec = argSpec[cmd];
var platformCmdArgSpec = {};
for (var key in cmdArgSpec) {
platformCmdArgSpec["--" + platformId + "-" + key] = cmdArgSpec[key];
}
platformArgSpec[cmd] = platformCmdArgSpec;
}
}
platformInfo = {
Ctor: PlatformImplCtor,
platformId: platformId,
argSpec: platformArgSpec
};
return platformInfo;
};
module.exports = PlatformsManager;

@@ -39,2 +39,8 @@ // Copyright © 2014 Intel Corporation. All rights reserved.

// Also ignore symlink "latest"
var latestPrefix = '<img src="/icons/folder.gif" alt="[DIR]"> <a href="latest';
if (line.substring(0, latestPrefix.length) == latestPrefix) {
continue;
}
var dirPrefix = '<img src="/icons/folder.gif" alt="[DIR]"> <a href="';

@@ -51,2 +57,45 @@ if (line.substring(0, dirPrefix.length) == dirPrefix) {

/**
* Pick latest version from array of version strings.
* @param {String[]} versions Array of version strings
* @param {Function} errorCb Synchronous callback delivering error message
* @returns {String} Latest version or null on error.
* @static
*/
IndexParser.pickLatest =
function(versions, errorCb) {
if (!(versions instanceof Array) ||
versions.length === 0) {
errorCb("No available Crosswalk versions found");
return null;
}
var zero = [0, 0, 0, 0];
var latest = zero;
for (var i = 0; i < versions.length; i++) {
// Split up version string.
var v = versions[i].split(".");
if (v.length != 4) {
errorCb("Invalid Crosswalk version '" + versions[i] + "'");
return null;
}
// Check against latest remembered version.
var j = 0;
for (j = 0; j < 4; j++) {
if (v[j] > latest[j]) {
// Tested version is greater than what we have.
latest = v;
break;
}
}
}
// Make sure we found a version, return null otherwise.
return latest != zero ? latest.join(".") : null;
};
module.exports = IndexParser;

@@ -13,4 +13,4 @@ // Copyright © 2014 Intel Corporation. All rights reserved.

TestPlatform.prototype.generate =
function(options, callback) {
TestPlatform.prototype.create =
function(packageId, args, callback) {
// Null means success, error string means failure.

@@ -21,3 +21,3 @@ callback(null);

TestPlatform.prototype.update =
function(callback) {
function(versionSpec, args, callback) {
// Null means success, error string means failure.

@@ -34,3 +34,3 @@ callback(null);

TestPlatform.prototype.build =
function(abis, release, callback) {
function(configId, args, callback) {
// Null means success, error string means failure.

@@ -43,2 +43,14 @@ callback(null);

TestPlatformScope.getArgs = function() {
return {
create: { // Extra options for command "create"
foo: "Create option added by the platform",
bar: "Another create option added by the platform"
},
update: { // Extra options for command "update"
baz: "Update option added by the platform"
}
};
};
module.exports = TestPlatformScope;

@@ -117,27 +117,2 @@ // Copyright © 2014 Intel Corporation. All rights reserved.

createGetOptions: function(test) {
test.expect(5);
var argv1 = ["node", "foo", "create", "com.example.bar",
"--crosswalk=crosswalk-10.39.235.16.zip",
"--foo=bar"];
var cp1 = new CommandParser(_output, argv1);
test.equal(cp1.getCommand(), "create");
var cmd1 = cp1.getCommand();
test.equal(cmd1, argv1[2]);
var pkg1 = cp1.createGetPackageId();
test.equal(pkg1, argv1[3]);
var opts1 = cp1.createGetOptions();
test.equal(opts1.crosswalk, "crosswalk-10.39.235.16.zip");
// Unknown option must be stripped.
test.equal(typeof opts1.foo, "undefined");
test.done();
},
updateGetVersion: function(test) {

@@ -144,0 +119,0 @@

@@ -12,6 +12,4 @@ // Copyright © 2014 Intel Corporation. All rights reserved.

// Let's see progress.
require("../src/Config").getInstance().setSilentConsole(false);
var _packageId = "com.example.foo";
exports.tests = {

@@ -45,4 +43,4 @@

var app = require("../src/Main");
Application.call(app, tmpdir, "com.example.foo");
app.create(null, function(errno) {
Application.call(app, tmpdir, _packageId);
app.create(_packageId, null, function(errno) {

@@ -67,4 +65,4 @@ test.equal(errno, 0);

var app = require("../src/Main");
Application.call(app, tmpdir, "com.example.foo");
app.create(null, function(errno) {
Application.call(app, tmpdir, _packageId);
app.create(_packageId, null, function(errno) {

@@ -74,4 +72,4 @@ if (!errno) {

// Build
ShellJS.pushd("com.example.foo");
app.build("debug", function(errno) {
ShellJS.pushd(_packageId);
app.build("debug", null, function(errno) {

@@ -100,14 +98,14 @@ test.equal(errno, 0);

var app = require("../src/Main");
Application.call(app, tmpdir, "com.example.foo");
Application.call(app, tmpdir, _packageId);
// Create
app.create(null, function(errno) {
app.create(_packageId, null, function(errno) {
if (!errno) {
// Update
ShellJS.pushd("com.example.foo");
app.update("stable", function(errno) {
ShellJS.pushd(_packageId);
app.update("stable", null, function(errno) {
if (!errno) {
// Build
app.build("debug", function(errno) {
app.build("debug", null, function(errno) {

@@ -114,0 +112,0 @@ test.equal(errno, 0);

@@ -11,4 +11,6 @@ // Copyright © 2014 Intel Corporation. All rights reserved.

var LogfileOutput = require("../src/LogfileOutput");
var PlatformBase = require("../src/PlatformBase");
var PlatformsManager = require("../src/PlatformsManager");
var TestPlatformScope = require("../test-util/TestPlatform");
var TestPlatform = require("../test-util/TestPlatform");
var Util = require("../test-util/Util.js");

@@ -23,15 +25,22 @@

test.expect(8);
test.expect(9);
var basePath = Util.createTmpDir();
var application = new Application(basePath, _packageId);
var mgr = new PlatformsManager(application.output);
var platformInfo = mgr.buildInfo(TestPlatform, _platformId);
var platformData = {
application: application,
platformId: _platformId
platformId: _platformId,
argSpec: platformInfo.argSpec
};
var PlatformBase = require("../src/PlatformBase");
var platform = new TestPlatformScope(PlatformBase, platformData);
var platform = new TestPlatform(PlatformBase, platformData);
test.equal(platform.application instanceof Application, true);
var createArgSpec = platform.argSpec.create;
test.equal(typeof createArgSpec["--test-foo"], "string");
test.equal(platform.appPath, Path.join(basePath, _packageId, "app"));

@@ -61,10 +70,9 @@ test.equal(platform.logOutput instanceof LogfileOutput, true);

};
var PlatformBase = require("../src/PlatformBase");
var platform = new TestPlatformScope(PlatformBase, platformData);
var platform = new TestPlatform(PlatformBase, platformData);
platform.generate(null, function(errormsg) {
platform.create(_platformId, null, function(errormsg) {
test.equal(errormsg, null);
});
platform.update(function(errormsg) {
platform.update(null, null, function(errormsg) {
test.equal(errormsg, null);

@@ -77,3 +85,3 @@ });

platform.build(["foo"], false, function(errormsg) {
platform.build("debug", null, function(errormsg) {
test.equal(errormsg, null);

@@ -80,0 +88,0 @@ });

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc