mobile-cli-lib
Advanced tools
Comparing version 0.21.1 to 0.22.0
@@ -20,3 +20,4 @@ "use strict"; | ||
this.ADDITIONAL_FILES_DIRECTORY = ".ab"; | ||
this.REFERENCES_FILE_NAME = ".abreferences.d.ts"; | ||
this.REFERENCES_FILE_NAME = "abreferences.d.ts"; | ||
this.OLD_REFERENCES_FILE_NAME = ".abreferences.d.ts"; | ||
this.ANDROID_PLATFORM_NAME = "Android"; | ||
@@ -23,0 +24,0 @@ this.IOS_PLATFORM_NAME = "iOS"; |
@@ -28,24 +28,2 @@ "use strict"; | ||
} | ||
Object.defineProperty(NpmService.prototype, "npmBinary", { | ||
get: function () { | ||
if (!this._npmBinary) { | ||
try { | ||
require(NpmService.NPM_MODULE_NAME); | ||
var npmMainJsFile = require.resolve(NpmService.NPM_MODULE_NAME); | ||
var pathToNpmBinary = path.join(npmMainJsFile.substring(0, npmMainJsFile.lastIndexOf(constants.NODE_MODULES_DIR_NAME) + constants.NODE_MODULES_DIR_NAME.length), ".bin", this.npmExecutableName); | ||
if (!this.$fs.exists(pathToNpmBinary).wait()) { | ||
throw new Error("The npm binary is not in " + pathToNpmBinary + " as expected."); | ||
} | ||
this._npmBinary = pathToNpmBinary; | ||
} | ||
catch (err) { | ||
this.$logger.trace("Error while trying to get the npm binary: " + err); | ||
this._npmBinary = this.npmExecutableName; | ||
} | ||
} | ||
return this._npmBinary; | ||
}, | ||
enumerable: true, | ||
configurable: true | ||
}); | ||
Object.defineProperty(NpmService.prototype, "npmExecutableName", { | ||
@@ -263,2 +241,3 @@ get: function () { | ||
_this.$fs.writeFile(pathToReferenceFile, lines.join(os.EOL), "utf8").wait(); | ||
_this.removeOldAbReferencesFile(projectDir).wait(); | ||
} | ||
@@ -271,2 +250,11 @@ else { | ||
}; | ||
NpmService.prototype.removeOldAbReferencesFile = function (projectDir) { | ||
var _this = this; | ||
return (function () { | ||
var pathToOldReferencesFile = path.join(projectDir, _this.$projectConstants.OLD_REFERENCES_FILE_NAME); | ||
if (_this.$fs.exists(pathToOldReferencesFile).wait()) { | ||
_this.$fs.deleteFile(pathToOldReferencesFile).wait(); | ||
} | ||
}).future()(); | ||
}; | ||
NpmService.prototype.isFromTypesRepo = function (dependency) { | ||
@@ -305,3 +293,3 @@ return !!dependency.match(/^@types\//); | ||
NpmService.prototype.executeNpmCommandCore = function (projectDir, npmArguments) { | ||
return this.$childProcess.spawnFromEvent(this.npmExecutableName, npmArguments, "close", { cwd: projectDir }); | ||
return this.$childProcess.spawnFromEvent(this.npmExecutableName, npmArguments, "close", { cwd: projectDir, stdio: "inherit" }); | ||
}; | ||
@@ -331,3 +319,2 @@ NpmService.prototype.getNpmProxySettings = function () { | ||
}; | ||
NpmService.NPM_MODULE_NAME = "npm"; | ||
NpmService.TYPES_DIRECTORY = "@types/"; | ||
@@ -334,0 +321,0 @@ NpmService.TNS_CORE_MODULES_DEFINITION_FILE_NAME = "" + constants.TNS_CORE_MODULES + constants.FileExtensions.TYPESCRIPT_DEFINITION_FILE; |
@@ -589,3 +589,5 @@ "use strict"; | ||
while (data) { | ||
var output = ref.readCString(data, 0); | ||
var messageWithoutNullCharacters = data.toString().replace("\0", ""); | ||
var bufferWithoutNullCharacters = new Buffer(messageWithoutNullCharacters); | ||
var output = ref.readCString(bufferWithoutNullCharacters, 0); | ||
process.send(output); | ||
@@ -592,0 +594,0 @@ data = this.read(WinSocket.BYTES_TO_READ); |
@@ -17,3 +17,3 @@ "use strict"; | ||
}; | ||
IOSLogFilter.INFO_FILTER_REGEX = /^.*?(AppBuilder|Cordova|NativeScript).*?(<Notice>:.*?(CONSOLE LOG|JS ERROR).*?|<Warning>:.*?|<Error>:.*?)$/im; | ||
IOSLogFilter.INFO_FILTER_REGEX = /^.*?(AppBuilder|Cordova|NativeScript).*?(<Notice>:.*?|<Warning>:.*?|<Error>:.*?)$/im; | ||
return IOSLogFilter; | ||
@@ -20,0 +20,0 @@ }()); |
{ | ||
"name": "mobile-cli-lib", | ||
"preferGlobal": false, | ||
"version": "0.21.1", | ||
"version": "0.22.0", | ||
"author": "Telerik <support@telerik.com>", | ||
@@ -52,3 +52,2 @@ "description": "common lib used by different CLI", | ||
"node-uuid": "1.4.1", | ||
"npm": "3.10.5", | ||
"open": "0.0.4", | ||
@@ -97,3 +96,3 @@ "osenv": "0.1.0", | ||
}, | ||
"buildVersion": "302" | ||
"buildVersion": "314" | ||
} |
@@ -10,5 +10,5 @@ mobile-cli-lib | ||
Latest version: 0.21.1 | ||
Latest version: 0.22.0 | ||
Release date: 2016, November 11 | ||
Release date: 2016, December 15 | ||
@@ -15,0 +15,0 @@ ### System Requirements |
@@ -146,5 +146,5 @@ "use strict"; | ||
var _this = this; | ||
return function (device, localToDevicePaths) { | ||
return function (deviceAppData, device, localToDevicePaths) { | ||
var platformLiveSyncService = _this.resolveDeviceLiveSyncService(data.platform, device); | ||
return platformLiveSyncService.removeFiles(data.appIdentifier, localToDevicePaths); | ||
return platformLiveSyncService.removeFiles(deviceAppData.appIdentifier, localToDevicePaths); | ||
}; | ||
@@ -190,3 +190,3 @@ }; | ||
if (deviceFilesAction) { | ||
deviceFilesAction(device, localToDevicePaths).wait(); | ||
deviceFilesAction(deviceAppData, device, localToDevicePaths).wait(); | ||
} | ||
@@ -193,0 +193,0 @@ else { |
@@ -49,3 +49,3 @@ "use strict"; | ||
input: 'Dec 29 08:49:06 Dragons-iPhone Cordova370[13309] <Notice>: Multi-tasking -> Device: YES, App: YES', | ||
output: null, | ||
output: '<Notice>: Multi-tasking -> Device: YES, App: YES', | ||
pid13309Output: 'Dec 29 08:49:06 Dragons-iPhone Cordova370[13309] <Notice>: Multi-tasking -> Device: YES, App: YES' | ||
@@ -52,0 +52,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
45
47
9907342
21959
- Removednpm@3.10.5
- Removednpm@3.10.5(transitive)