You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by ra...@apache.org on 2019/03/30 20:31:55 UTC
[cordova-test-platform] branch master updated: Fix broken Api.js
This is an automated email from the ASF dual-hosted git repository.
raphinesse pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cordova-test-platform.git
The following commit(s) were added to refs/heads/master by this push:
new 4d2212c Fix broken Api.js
4d2212c is described below
commit 4d2212c9a46bc142bb91fa3e69e99d041e8c8221
Author: Raphael von der GrĂ¼n <ra...@gmail.com>
AuthorDate: Sat Mar 30 21:31:52 2019 +0100
Fix broken Api.js
The change that tried to silence log messages instead broke most of the API methods.
This change should fix that.
---
src/cordova/Api.js | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/cordova/Api.js b/src/cordova/Api.js
index 8e8274f..da2a97e 100644
--- a/src/cordova/Api.js
+++ b/src/cordova/Api.js
@@ -9,21 +9,21 @@ var shell = require('shelljs');
var path = require('path');
var CordovaLogger = require('cordova-common').CordovaLogger;
-var selfEvents = require('cordova-common').events;
+var events = require('cordova-common').events;
var PLATFORM_NAME = 'testplatform';
function setupEvents(externalEventEmitter) {
if (externalEventEmitter) {
// This will make the platform internal events visible outside
- selfEvents.forwardEventsTo(externalEventEmitter);
+ events.forwardEventsTo(externalEventEmitter);
return externalEventEmitter;
}
// There is no logger if external emitter is not present,
// so attach a console logger
- CordovaLogger.get().subscribe(selfEvents);
- return selfEvents;
+ CordovaLogger.get().subscribe(events);
+ return events;
}
function Api(platform, platformRootDir, events) {
@@ -47,9 +47,9 @@ function Api(platform, platformRootDir, events) {
}
-Api.createPlatform = function (destination, config, options, events) {
+Api.createPlatform = function (destination, config, options, externalEvents) {
- events = setupEvents(events);
+ events = setupEvents(externalEvents);
// create the destination and the standard place for our api to live
// platforms/platformName/cordova/Api.js
@@ -74,7 +74,7 @@ Api.createPlatform = function (destination, config, options, events) {
};
-Api.updatePlatform = function (destination, options, events) {
+Api.updatePlatform = function (destination, options) {
events.emit('log', "test-platform:Api:updatePlatform");
// todo?: create projectInstance and fulfill promise with it.
return Promise.resolve();
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org