Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Making a few more node v0.8 fixes.

  • Loading branch information...
commit a3b7603def9ef175bbef6e240af771d08e85deaa 1 parent 8566d54
André Rodrigues andrerod authored
Showing with 226 additions and 99 deletions.
  1. +6 −2 examples/blobuploader/server.js
  2. +6 −2 examples/blog/blog.js
  3. +6 −1 examples/geophoto/services/pushpinService.js
  4. +8 −4 examples/samples/blobuploaddownloadsample.js
  5. +6 −2 examples/samples/continuationsample.js
  6. +7 −2 examples/samples/leaseblobsample.js
  7. +6 −2 examples/samples/longpolling.js
  8. +6 −2 examples/samples/retrypolicysample.js
  9. +6 −2 examples/samples/sassample.js
  10. +6 −2 examples/samples/sbqueue.js
  11. +7 −2 examples/samples/sbtopic.js
  12. +6 −2 examples/samples/snapshotsample.js
  13. +4 −2 examples/servicemanagement/testaddcertificate.js
  14. +4 −2 examples/servicemanagement/testadddatadiskbyblob.js
  15. +4 −2 examples/servicemanagement/testadddatadiskbyname.js
  16. +4 −2 examples/servicemanagement/testadddatadiskempty.js
  17. +4 −2 examples/servicemanagement/testadddiskinrepos.js
  18. +4 −2 examples/servicemanagement/testaddrole.js
  19. +4 −2 examples/servicemanagement/testcapturerole.js
  20. +4 −2 examples/servicemanagement/testcreatedeployment.js
  21. +4 −2 examples/servicemanagement/testcreatehostedservice.js
  22. +4 −2 examples/servicemanagement/testcreateosimage.js
  23. +4 −2 examples/servicemanagement/testdeletecertificate.js
  24. +4 −2 examples/servicemanagement/testdeletedeployment.js
  25. +4 −2 examples/servicemanagement/testdeletedisk.js
  26. +4 −2 examples/servicemanagement/testdeletehostedservice.js
  27. +4 −2 examples/servicemanagement/testdeleteosimage.js
  28. +4 −2 examples/servicemanagement/testdeleterole.js
  29. +4 −2 examples/servicemanagement/testgetdeployment.js
  30. +4 −2 examples/servicemanagement/testgetdisk.js
  31. +4 −2 examples/servicemanagement/testgethostedservice.js
  32. +4 −2 examples/servicemanagement/testgethostedservicewithproxy.js
  33. +4 −2 examples/servicemanagement/testgetoperationstatus.js
  34. +4 −2 examples/servicemanagement/testgetosimage.js
  35. +4 −2 examples/servicemanagement/testgetrole.js
  36. +4 −2 examples/servicemanagement/testgetstorageaccountkeys.js
  37. +4 −2 examples/servicemanagement/testlistcertificates.js
  38. +4 −2 examples/servicemanagement/testlistdisk.js
  39. +4 −2 examples/servicemanagement/testlisthostedservices.js
  40. +4 −2 examples/servicemanagement/testmodifydatadisk.js
  41. +4 −2 examples/servicemanagement/testmodifyrole.js
  42. +4 −2 examples/servicemanagement/testremovedatadisk.js
  43. +4 −2 examples/servicemanagement/testshutdownrestart.js
  44. +7 −2 examples/tasklist/home.js
  45. +7 −2 examples/tasklist/server.js
  46. +2 −2 lib/cli/commands/log.js
  47. +2 −2 lib/cli/commands/site.js
  48. +8 −4 test/mockserver/mockserver.js
8 examples/blobuploader/server.js
View
@@ -13,8 +13,12 @@
* limitations under the License.
*/
-var path = require('path');
-if (path.existsSync('./../../lib/azure.js')) {
+var fs = require('fs');
+if (!fs.existsSync) {
+ fs.existsSync = require('path').existsSync;
+}
+
+if (fs.existsSync('./../../lib/azure.js')) {
azure = require('./../../lib/azure');
} else {
azure = require('azure');
8 examples/blog/blog.js
View
@@ -13,8 +13,12 @@
* limitations under the License.
*/
-var path = require('path');
-if (path.existsSync('./../../lib/azure.js')) {
+var fs = require('fs');
+if (!fs.existsSync) {
+ fs.existsSync = require('path').existsSync;
+}
+
+if (fs.existsSync('./../../lib/azure.js')) {
azure = require('./../../lib/azure');
} else {
azure = require('azure');
7 examples/geophoto/services/pushpinService.js
View
@@ -13,8 +13,13 @@
* limitations under the License.
*/
+var fs = require('fs');
+if (!fs.existsSync) {
+ fs.existsSync = require('path').existsSync;
+}
+
var azure;
-if (path.existsSync('./../../lib/azure.js')) {
+if (fs.existsSync('./../../lib/azure.js')) {
azure = require('./../../lib/azure');
} else {
azure = require('azure');
12 examples/samples/blobuploaddownloadsample.js
View
@@ -21,8 +21,12 @@
* 3. Demonstrate making requests using AccessConditions.
*/
-var path = require('path');
-if (path.existsSync('./../../lib/azure.js')) {
+var fs = require('fs');
+if (!fs.existsSync) {
+ fs.existsSync = require('path').existsSync;
+}
+
+if (fs.existsSync('./../../lib/azure.js')) {
azure = require('./../../lib/azure');
} else {
azure = require('azure');
@@ -72,7 +76,7 @@ function uploadSample() {
function uploadBlobs(sourceDirectoryPath, containerName, callback) {
// Step 0 : validate directory is valid.
- if (!path.existsSync(sourceDirectoryPath)) {
+ if (!fs.existsSync(sourceDirectoryPath)) {
console.log(sourceDirectoryPath + ' is an invalid directory path.');
} else {
listFilesUpload(sourceDirectoryPath, containerName, callback);
@@ -118,7 +122,7 @@ function uploadFilesParallel(files, containerName, callback) {
function downloadBlobs(containerName, destinationDirectoryPath, callback) {
// Step 0. Validate directory
- if (!path.existsSync(destinationDirectoryPath)) {
+ if (!fs.existsSync(destinationDirectoryPath)) {
console.log(destinationDirectoryPath + ' is an invalid directory path.');
} else {
downloadFilesParallel(containerName, destinationDirectoryPath, callback);
8 examples/samples/continuationsample.js
View
@@ -31,8 +31,12 @@
*
*/
-var path = require('path');
-if (path.existsSync('./../../lib/azure.js')) {
+var fs = require('fs');
+if (!fs.existsSync) {
+ fs.existsSync = require('path').existsSync;
+}
+
+if (fs.existsSync('./../../lib/azure.js')) {
azure = require('./../../lib/azure');
} else {
azure = require('azure');
9 examples/samples/leaseblobsample.js
View
@@ -28,8 +28,13 @@
*
*/
-var path = require('path');
-if (path.existsSync('./../../lib/azure.js')) {
+var fs = require('fs');
+if (!fs.existsSync) {
+ fs.existsSync = require('path').existsSync;
+}
+
+var azure;
+if (fs.existsSync('./../../lib/azure.js')) {
azure = require('./../../lib/azure');
} else {
azure = require('azure');
8 examples/samples/longpolling.js
View
@@ -13,8 +13,12 @@
* limitations under the License.
*/
-var path = require('path');
-if (path.existsSync('./../../lib/azure.js')) {
+var fs = require('fs');
+if (!fs.existsSync) {
+ fs.existsSync = require('path').existsSync;
+}
+
+if (fs.existsSync('./../../lib/azure.js')) {
azure = require('./../../lib/azure');
} else {
azure = require('azure');
8 examples/samples/retrypolicysample.js
View
@@ -23,8 +23,12 @@
* sent if users immediately recreate a container after delete it.
*/
-var path = require('path');
-if (path.existsSync('./../../lib/azure.js')) {
+var fs = require('fs');
+if (!fs.existsSync) {
+ fs.existsSync = require('path').existsSync;
+}
+
+if (fs.existsSync('./../../lib/azure.js')) {
azure = require('./../../lib/azure');
} else {
azure = require('azure');
8 examples/samples/sassample.js
View
@@ -35,8 +35,12 @@
* c. Use both shared access signatures to read that blob (Expect a failure from the "Read" permission shared access signature since it has already expired.).
*/
-var path = require('path');
-if (path.existsSync('./../../lib/azure.js')) {
+var fs = require('fs');
+if (!fs.existsSync) {
+ fs.existsSync = require('path').existsSync;
+}
+
+if (fs.existsSync('./../../lib/azure.js')) {
azure = require('./../../lib/azure');
} else {
azure = require('azure');
8 examples/samples/sbqueue.js
View
@@ -13,8 +13,12 @@
* limitations under the License.
*/
-var path = require('path');
-if (path.existsSync('./../../lib/azure.js')) {
+var fs = require('fs');
+if (!fs.existsSync) {
+ fs.existsSync = require('path').existsSync;
+}
+
+if (fs.existsSync('./../../lib/azure.js')) {
azure = require('./../../lib/azure');
} else {
azure = require('azure');
9 examples/samples/sbtopic.js
View
@@ -13,8 +13,13 @@
* limitations under the License.
*/
-var path = require('path');
-if (path.existsSync('./../../lib/azure.js')) {
+var fs = require('fs');
+if (!fs.existsSync) {
+ fs.existsSync = require('path').existsSync;
+}
+
+var azure;
+if (fs.existsSync('./../../lib/azure.js')) {
azure = require('./../../lib/azure');
} else {
azure = require('azure');
8 examples/samples/snapshotsample.js
View
@@ -33,8 +33,12 @@
* 8. List all snapshots for this blob.
*/
-var path = require('path');
-if (path.existsSync('./../../lib/azure.js')) {
+var fs = require('fs');
+if (!fs.existsSync) {
+ fs.existsSync = require('path').existsSync;
+}
+
+if (fs.existsSync('./../../lib/azure.js')) {
azure = require('./../../lib/azure');
} else {
azure = require('azure');
6 examples/servicemanagement/testaddcertificate.js
View
@@ -14,14 +14,16 @@
*/
var fs = require('fs');
-var path = require('path');
var azure = require('../../lib/azure');
var Constants = require('../../lib/util/constants');
var HttpResponseCodes = Constants.HttpConstants.HttpResponseCodes;
var testCommon = require('./testcommon');
+if (!fs.existsSync) {
+ fs.existsSync = require('path').existsSync;
+}
-if (path.existsSync('./testhost.json')) {
+if (fs.existsSync('./testhost.json')) {
inp = JSON.parse(fs.readFileSync('./testhost.json'));
} else {
console.log('The file testhost.json was not found.\n' +
6 examples/servicemanagement/testadddatadiskbyblob.js
View
@@ -14,14 +14,16 @@
*/
var fs = require('fs');
-var path = require('path');
var azure = require('../../lib/azure');
var Constants = require('../../lib/util/constants');
var HttpResponseCodes = Constants.HttpConstants.HttpResponseCodes;
var testCommon = require('./testcommon');
+if (!fs.existsSync) {
+ fs.existsSync = require('path').existsSync;
+}
-if (path.existsSync('./testhost.json')) {
+if (fs.existsSync('./testhost.json')) {
inp = JSON.parse(fs.readFileSync('./testhost.json'));
} else {
console.log('The file testhost.json was not found.\n' +
6 examples/servicemanagement/testadddatadiskbyname.js
View
@@ -14,14 +14,16 @@
*/
var fs = require('fs');
-var path = require('path');
var azure = require('../../lib/azure');
var Constants = require('../../lib/util/constants');
var HttpResponseCodes = Constants.HttpConstants.HttpResponseCodes;
var testCommon = require('./testcommon');
+if (!fs.existsSync) {
+ fs.existsSync = require('path').existsSync;
+}
-if (path.existsSync('./testhost.json')) {
+if (fs.existsSync('./testhost.json')) {
inp = JSON.parse(fs.readFileSync('./testhost.json'));
} else {
console.log('The file testhost.json was not found.\n' +
6 examples/servicemanagement/testadddatadiskempty.js
View
@@ -14,14 +14,16 @@
*/
var fs = require('fs');
-var path = require('path');
var azure = require('../../lib/azure');
var Constants = require('../../lib/util/constants');
var HttpResponseCodes = Constants.HttpConstants.HttpResponseCodes;
var testCommon = require('./testcommon');
+if (!fs.existsSync) {
+ fs.existsSync = require('path').existsSync;
+}
-if (path.existsSync('./testhost.json')) {
+if (fs.existsSync('./testhost.json')) {
inp = JSON.parse(fs.readFileSync('./testhost.json'));
} else {
console.log('The file testhost.json was not found.\n' +
6 examples/servicemanagement/testadddiskinrepos.js
View
@@ -14,14 +14,16 @@
*/
var fs = require('fs');
-var path = require('path');
var azure = require('../../lib/azure');
var Constants = require('../../lib/util/constants');
var HttpResponseCodes = Constants.HttpConstants.HttpResponseCodes;
var testCommon = require('./testcommon');
+if (!fs.existsSync) {
+ fs.existsSync = require('path').existsSync;
+}
-if (path.existsSync('./testhost.json')) {
+if (fs.existsSync('./testhost.json')) {
inp = JSON.parse(fs.readFileSync('./testhost.json'));
} else {
console.log('The file testhost.json was not found.\n' +
6 examples/servicemanagement/testaddrole.js
View
@@ -14,14 +14,16 @@
*/
var fs = require('fs');
-var path = require('path');
var azure = require('../../lib/azure');
var Constants = require('../../lib/util/constants');
var HttpResponseCodes = Constants.HttpConstants.HttpResponseCodes;
var testCommon = require('./testcommon');
+if (!fs.existsSync) {
+ fs.existsSync = require('path').existsSync;
+}
-if (path.existsSync('./testhost.json')) {
+if (fs.existsSync('./testhost.json')) {
inp = JSON.parse(fs.readFileSync('./testhost.json'));
} else {
console.log('The file testhost.json was not found.\n' +
6 examples/servicemanagement/testcapturerole.js
View
@@ -14,14 +14,16 @@
*/
var fs = require('fs');
-var path = require('path');
var azure = require('../../lib/azure');
var Constants = require('../../lib/util/constants');
var HttpResponseCodes = Constants.HttpConstants.HttpResponseCodes;
var testCommon = require('./testcommon');
+if (!fs.existsSync) {
+ fs.existsSync = require('path').existsSync;
+}
-if (path.existsSync('./testhost.json')) {
+if (fs.existsSync('./testhost.json')) {
inp = JSON.parse(fs.readFileSync('./testhost.json'));
} else {
console.log('The file testhost.json was not found.\n' +
6 examples/servicemanagement/testcreatedeployment.js
View
@@ -14,14 +14,16 @@
*/
var fs = require('fs');
-var path = require('path');
var azure = require('../../lib/azure');
var Constants = require('../../lib/util/constants');
var HttpResponseCodes = Constants.HttpConstants.HttpResponseCodes;
var testCommon = require('./testcommon');
+if (!fs.existsSync) {
+ fs.existsSync = require('path').existsSync;
+}
-if (path.existsSync('./testhost.json')) {
+if (fs.existsSync('./testhost.json')) {
inp = JSON.parse(fs.readFileSync('./testhost.json'));
} else {
console.log('The file testhost.json was not found.\n' +
6 examples/servicemanagement/testcreatehostedservice.js
View
@@ -14,14 +14,16 @@
*/
var fs = require('fs');
-var path = require('path');
var azure = require('../../lib/azure');
var Constants = require('../../lib/util/constants');
var HttpResponseCodes = Constants.HttpConstants.HttpResponseCodes;
var testCommon = require('./testcommon');
+if (!fs.existsSync) {
+ fs.existsSync = require('path').existsSync;
+}
-if (path.existsSync('./testhost.json')) {
+if (fs.existsSync('./testhost.json')) {
inp = JSON.parse(fs.readFileSync('./testhost.json'));
} else {
console.log('The file testhost.json was not found.\n' +
6 examples/servicemanagement/testcreateosimage.js
View
@@ -14,14 +14,16 @@
*/
var fs = require('fs');
-var path = require('path');
var azure = require('../../lib/azure');
var Constants = require('../../lib/util/constants');
var HttpResponseCodes = Constants.HttpConstants.HttpResponseCodes;
var testCommon = require('./testcommon');
+if (!fs.existsSync) {
+ fs.existsSync = require('path').existsSync;
+}
-if (path.existsSync('./testhost.json')) {
+if (fs.existsSync('./testhost.json')) {
inp = JSON.parse(fs.readFileSync('./testhost.json'));
} else {
console.log('The file testhost.json was not found.\n' +
6 examples/servicemanagement/testdeletecertificate.js
View
@@ -14,14 +14,16 @@
*/
var fs = require('fs');
-var path = require('path');
var azure = require('../../lib/azure');
var Constants = require('../../lib/util/constants');
var HttpResponseCodes = Constants.HttpConstants.HttpResponseCodes;
var testCommon = require('./testcommon');
+if (!fs.existsSync) {
+ fs.existsSync = require('path').existsSync;
+}
-if (path.existsSync('./testhost.json')) {
+if (fs.existsSync('./testhost.json')) {
inp = JSON.parse(fs.readFileSync('./testhost.json'));
} else {
console.log('The file testhost.json was not found.\n' +
6 examples/servicemanagement/testdeletedeployment.js
View
@@ -14,14 +14,16 @@
*/
var fs = require('fs');
-var path = require('path');
var azure = require('../../lib/azure');
var Constants = require('../../lib/util/constants');
var HttpResponseCodes = Constants.HttpConstants.HttpResponseCodes;
var testCommon = require('./testcommon');
+if (!fs.existsSync) {
+ fs.existsSync = require('path').existsSync;
+}
-if (path.existsSync('./testhost.json')) {
+if (fs.existsSync('./testhost.json')) {
inp = JSON.parse(fs.readFileSync('./testhost.json'));
} else {
console.log('The file testhost.json was not found.\n' +
6 examples/servicemanagement/testdeletedisk.js
View
@@ -14,14 +14,16 @@
*/
var fs = require('fs');
-var path = require('path');
var azure = require('../../lib/azure');
var Constants = require('../../lib/util/constants');
var HttpResponseCodes = Constants.HttpConstants.HttpResponseCodes;
var testCommon = require('./testcommon');
+if (!fs.existsSync) {
+ fs.existsSync = require('path').existsSync;
+}
-if (path.existsSync('./testhost.json')) {
+if (fs.existsSync('./testhost.json')) {
inp = JSON.parse(fs.readFileSync('./testhost.json'));
} else {
console.log('The file testhost.json was not found.\n' +
6 examples/servicemanagement/testdeletehostedservice.js
View
@@ -14,14 +14,16 @@
*/
var fs = require('fs');
-var path = require('path');
var azure = require('../../lib/azure');
var Constants = require('../../lib/util/constants');
var HttpResponseCodes = Constants.HttpConstants.HttpResponseCodes;
var testCommon = require('./testcommon');
+if (!fs.existsSync) {
+ fs.existsSync = require('path').existsSync;
+}
-if (path.existsSync('./testhost.json')) {
+if (s.existsSync('./testhost.json')) {
inp = JSON.parse(fs.readFileSync('./testhost.json'));
} else {
console.log('The file testhost.json was not found.\n' +
6 examples/servicemanagement/testdeleteosimage.js
View
@@ -14,14 +14,16 @@
*/
var fs = require('fs');
-var path = require('path');
var azure = require('../../lib/azure');
var Constants = require('../../lib/util/constants');
var HttpResponseCodes = Constants.HttpConstants.HttpResponseCodes;
var testCommon = require('./testcommon');
+if (!fs.existsSync) {
+ fs.existsSync = require('path').existsSync;
+}
-if (path.existsSync('./testhost.json')) {
+if (fs.existsSync('./testhost.json')) {
inp = JSON.parse(fs.readFileSync('./testhost.json'));
} else {
console.log('The file testhost.json was not found.\n' +
6 examples/servicemanagement/testdeleterole.js
View
@@ -14,14 +14,16 @@
*/
var fs = require('fs');
-var path = require('path');
var azure = require('../../lib/azure');
var Constants = require('../../lib/util/constants');
var HttpResponseCodes = Constants.HttpConstants.HttpResponseCodes;
var testCommon = require('./testcommon');
+if (!fs.existsSync) {
+ fs.existsSync = require('path').existsSync;
+}
-if (path.existsSync('./testhost.json')) {
+if (fs.existsSync('./testhost.json')) {
inp = JSON.parse(fs.readFileSync('./testhost.json'));
} else {
console.log('The file testhost.json was not found.\n' +
6 examples/servicemanagement/testgetdeployment.js
View
@@ -14,12 +14,14 @@
*/
var fs = require('fs');
-var path = require('path');
var azure = require('../../lib/azure');
var testCommon = require('./testcommon');
+if (!fs.existsSync) {
+ fs.existsSync = require('path').existsSync;
+}
-if (path.existsSync('./testhost.json')) {
+if (fs.existsSync('./testhost.json')) {
inp = JSON.parse(fs.readFileSync('./testhost.json'));
} else {
console.log('The file testhost.json was not found.\n' +
6 examples/servicemanagement/testgetdisk.js
View
@@ -14,12 +14,14 @@
*/
var fs = require('fs');
-var path = require('path');
var azure = require('../../lib/azure');
var testCommon = require('./testcommon');
+if (!fs.existsSync) {
+ fs.existsSync = require('path').existsSync;
+}
-if (path.existsSync('./testhost.json')) {
+if (fs.existsSync('./testhost.json')) {
inp = JSON.parse(fs.readFileSync('./testhost.json'));
} else {
console.log('The file testhost.json was not found.\n' +
6 examples/servicemanagement/testgethostedservice.js
View
@@ -14,12 +14,14 @@
*/
var fs = require('fs');
-var path = require('path');
var azure = require('../../lib/azure');
var testCommon = require('./testcommon');
+if (!fs.existsSync) {
+ fs.existsSync = require('path').existsSync;
+}
-if (path.existsSync('./testhost.json')) {
+if (fs.existsSync('./testhost.json')) {
inp = JSON.parse(fs.readFileSync('./testhost.json'));
} else {
console.log('The file testhost.json was not found.\n' +
6 examples/servicemanagement/testgethostedservicewithproxy.js
View
@@ -14,12 +14,14 @@
*/
var fs = require('fs');
-var path = require('path');
var azure = require('../../lib/azure');
var testCommon = require('./testcommon');
+if (!fs.existsSync) {
+ fs.existsSync = require('path').existsSync;
+}
-if (path.existsSync('./testhost.json')) {
+if (fs.existsSync('./testhost.json')) {
inp = JSON.parse(fs.readFileSync('./testhost.json'));
} else {
console.log('The file testhost.json was not found.\n' +
6 examples/servicemanagement/testgetoperationstatus.js
View
@@ -14,12 +14,14 @@
*/
var fs = require('fs');
-var path = require('path');
var azure = require('../../lib/azure');
var testCommon = require('./testcommon');
+if (!fs.existsSync) {
+ fs.existsSync = require('path').existsSync;
+}
-if (path.existsSync('./testhost.json')) {
+if (fs.existsSync('./testhost.json')) {
inp = JSON.parse(fs.readFileSync('./testhost.json'));
} else {
console.log('The file testhost.json was not found.\n' +
6 examples/servicemanagement/testgetosimage.js
View
@@ -14,12 +14,14 @@
*/
var fs = require('fs');
-var path = require('path');
var azure = require('../../lib/azure');
var testCommon = require('./testcommon');
+if (!fs.existsSync) {
+ fs.existsSync = require('path').existsSync;
+}
-if (path.existsSync('./testhost.json')) {
+if (fs.existsSync('./testhost.json')) {
inp = JSON.parse(fs.readFileSync('./testhost.json'));
} else {
console.log('The file testhost.json was not found.\n' +
6 examples/servicemanagement/testgetrole.js
View
@@ -14,12 +14,14 @@
*/
var fs = require('fs');
-var path = require('path');
var azure = require('../../lib/azure');
var testCommon = require('./testcommon');
+if (!fs.existsSync) {
+ fs.existsSync = require('path').existsSync;
+}
-if (path.existsSync('./testhost.json')) {
+if (fs.existsSync('./testhost.json')) {
inp = JSON.parse(fs.readFileSync('./testhost.json'));
} else {
console.log('The file testhost.json was not found.\n' +
6 examples/servicemanagement/testgetstorageaccountkeys.js
View
@@ -14,12 +14,14 @@
*/
var fs = require('fs');
-var path = require('path');
var azure = require('../../lib/azure');
var testCommon = require('./testcommon');
+if (!fs.existsSync) {
+ fs.existsSync = require('path').existsSync;
+}
-if (path.existsSync('./testhost.json')) {
+if (fs.existsSync('./testhost.json')) {
inp = JSON.parse(fs.readFileSync('./testhost.json'));
} else {
console.log('The file testhost.json was not found.\n' +
6 examples/servicemanagement/testlistcertificates.js
View
@@ -14,14 +14,16 @@
*/
var fs = require('fs');
-var path = require('path');
var azure = require('../../lib/azure');
var Constants = require('../../lib/util/constants');
var HttpResponseCodes = Constants.HttpConstants.HttpResponseCodes;
var testCommon = require('./testcommon');
+if (!fs.existsSync) {
+ fs.existsSync = require('path').existsSync;
+}
-if (path.existsSync('./testhost.json')) {
+if (fs.existsSync('./testhost.json')) {
inp = JSON.parse(fs.readFileSync('./testhost.json'));
} else {
console.log('The file testhost.json was not found.\n' +
6 examples/servicemanagement/testlistdisk.js
View
@@ -14,12 +14,14 @@
*/
var fs = require('fs');
-var path = require('path');
var azure = require('../../lib/azure');
var testCommon = require('./testcommon');
+if (!fs.existsSync) {
+ fs.existsSync = require('path').existsSync;
+}
-if (path.existsSync('./testhost.json')) {
+if (fs.existsSync('./testhost.json')) {
inp = JSON.parse(fs.readFileSync('./testhost.json'));
} else {
console.log('The file testhost.json was not found.\n' +
6 examples/servicemanagement/testlisthostedservices.js
View
@@ -14,12 +14,14 @@
*/
var fs = require('fs');
-var path = require('path');
var azure = require('../../lib/azure');
var testCommon = require('./testcommon');
+if (!fs.existsSync) {
+ fs.existsSync = require('path').existsSync;
+}
-if (path.existsSync('./testhost.json')) {
+if (fs.existsSync('./testhost.json')) {
inp = JSON.parse(fs.readFileSync('./testhost.json'));
} else {
console.log('The file testhost.json was not found.\n' +
6 examples/servicemanagement/testmodifydatadisk.js
View
@@ -14,14 +14,16 @@
*/
var fs = require('fs');
-var path = require('path');
var azure = require('../../lib/azure');
var Constants = require('../../lib/util/constants');
var HttpResponseCodes = Constants.HttpConstants.HttpResponseCodes;
var testCommon = require('./testcommon');
+if (!fs.existsSync) {
+ fs.existsSync = require('path').existsSync;
+}
-if (path.existsSync('./testhost.json')) {
+if (fs.existsSync('./testhost.json')) {
inp = JSON.parse(fs.readFileSync('./testhost.json'));
} else {
console.log('The file testhost.json was not found.\n' +
6 examples/servicemanagement/testmodifyrole.js
View
@@ -14,14 +14,16 @@
*/
var fs = require('fs');
-var path = require('path');
var azure = require('../../lib/azure');
var Constants = require('../../lib/util/constants');
var HttpResponseCodes = Constants.HttpConstants.HttpResponseCodes;
var testCommon = require('./testcommon');
+if (!fs.existsSync) {
+ fs.existsSync = require('path').existsSync;
+}
-if (path.existsSync('./testhost.json')) {
+if (fs.existsSync('./testhost.json')) {
inp = JSON.parse(fs.readFileSync('./testhost.json'));
} else {
console.log('The file testhost.json was not found.\n' +
6 examples/servicemanagement/testremovedatadisk.js
View
@@ -14,14 +14,16 @@
*/
var fs = require('fs');
-var path = require('path');
var azure = require('../../lib/azure');
var Constants = require('../../lib/util/constants');
var HttpResponseCodes = Constants.HttpConstants.HttpResponseCodes;
var testCommon = require('./testcommon');
+if (!fs.existsSync) {
+ fs.existsSync = require('path').existsSync;
+}
-if (path.existsSync('./testhost.json')) {
+if (fs.existsSync('./testhost.json')) {
inp = JSON.parse(fs.readFileSync('./testhost.json'));
} else {
console.log('The file testhost.json was not found.\n' +
6 examples/servicemanagement/testshutdownrestart.js
View
@@ -14,14 +14,16 @@
*/
var fs = require('fs');
-var path = require('path');
var azure = require('../../lib/azure');
var Constants = require('../../lib/util/constants');
var HttpResponseCodes = Constants.HttpConstants.HttpResponseCodes;
var testCommon = require('./testcommon');
+if (!fs.existsSync) {
+ fs.existsSync = require('path').existsSync;
+}
-if (path.existsSync('./testhost.json')) {
+if (fs.existsSync('./testhost.json')) {
inp = JSON.parse(fs.readFileSync('./testhost.json'));
} else {
console.log('The file testhost.json was not found.\n' +
9 examples/tasklist/home.js
View
@@ -13,8 +13,13 @@
* limitations under the License.
*/
-var path = require('path');
-if (path.existsSync('./../../lib/azure.js')) {
+var fs = require('fs');
+if (!fs.existsSync) {
+ fs.existsSync = require('path').existsSync;
+}
+
+var azure;
+if (fs.existsSync('./../../lib/azure.js')) {
azure = require('./../../lib/azure');
} else {
azure = require('azure');
9 examples/tasklist/server.js
View
@@ -14,8 +14,13 @@
*/
// Module dependencies.
-var path = require('path');
-if (path.existsSync('./../../lib/azure.js')) {
+var fs = require('fs');
+if (!fs.existsSync) {
+ fs.existsSync = require('path').existsSync;
+}
+
+var azure;
+if (fs.existsSync('./../../lib/azure.js')) {
azure = require('./../../lib/azure');
} else {
azure = require('azure');
4 lib/cli/commands/log.js
View
@@ -1,4 +1,4 @@
-/*** Generated by streamline 0.2.5 - DO NOT EDIT ***/
+/*** Generated by streamline 0.3.6 (callbacks) - DO NOT EDIT ***/
var __rt=require('streamline/lib/callbacks/runtime').runtime(__filename),__func=__rt.__func,__cb=__rt.__cb,__tryCatch=__rt.__tryCatch,__propagate=__rt.__propagate,__trap=__rt.__trap,__future=__rt.__future,__setEF=__rt.__setEF,__g=__rt.__g;
/* 1 */ var common = require("../common");
/* 20 */ var fs = require("fs");
@@ -36,7 +36,7 @@ var __rt=require('streamline/lib/callbacks/runtime').runtime(__filename),__func=
}
;
return (function __$__1(__then) {
-/* 58 */ if (path.existsSync(context.path)) {
+/* 58 */ if (utils.pathExistsSync(context.path)) {
/* 59 */ return site.confirm((("Replace existing " + context.path) + "? (y/n) "), __cb(_, __frame, 14, 13, function ___(__0, __2) {
/* 59 */ var __1 = !__2;
return (function __$__1(__then) {
4 lib/cli/commands/site.js
View
@@ -274,7 +274,7 @@ var __rt=require('streamline/lib/callbacks/runtime').runtime(__filename),__func=
/* 232 */ log.info("Executing `git init`");
/* 233 */ return exec("git init", __cb(_, __frame, 14, 12, function __$initGitOnCurrentDirectory() {
return (function __$initGitOnCurrentDirectory(__then) {
-/* 235 */ if (!path.existsSync(".gitignore")) {
+/* 235 */ if (!utils.pathExistsSync(".gitignore")) {
/* 236 */ log.info("Creating default .gitignore file");
/* 237 */ return fs.writeFile(".gitignore", "node_modules\nazure_error", __cb(_, __frame, 18, 14, __then, true));
}
@@ -300,7 +300,7 @@ var __rt=require('streamline/lib/callbacks/runtime').runtime(__filename),__func=
return __func(_, this, arguments, copyIisNodeWhenServerJsPresent, 0, __frame, function __$copyIisNodeWhenServerJsPresent() {
/* 244 */ log.silly("copyWebConfigWhenServerJsPresent");
return (function __$copyIisNodeWhenServerJsPresent(__then) {
-/* 245 */ if ((!path.existsSync("iisnode.yml") && ((path.existsSync("server.js") || path.existsSync("app.js"))))) {
+/* 245 */ if ((!utils.pathExistsSync("iisnode.yml") && ((utils.pathExistsSync("server.js") || utils.pathExistsSync("app.js"))))) {
/* 246 */ log.info("Creating default iisnode.yml file");
/* 247 */ sourcePath = path.join(__dirname, "../templates/node/iisnode.yml");
/* 248 */ return fs.readFile(sourcePath, __cb(_, __frame, 5, 42, function ___(__0, __1) {
12 test/mockserver/mockserver.js
View
@@ -16,12 +16,16 @@
var http = require('http');
var fs = require('fs');
var url = require('url');
-var path = require('path');
var sessionsRootPath = 'test/recordings';
exports.log = true;
+if (!fs.existsSync) {
+ fs.existsSync = require('path').existsSync;
+}
+
+
function writeLog(msg) {
if (exports.log) {
console.log(msg);
@@ -126,10 +130,10 @@ driverFactory.modes.neutral = function (proxy, session) {
driverFactory.modes.recording = function (proxy, session) {
var sessionPath = sessionsRootPath + '/' + session.name;
- if (!path.existsSync(sessionsRootPath)) {
+ if (!fs.existsSync(sessionsRootPath)) {
fs.mkdirSync(sessionsRootPath, 0755);
}
- if (!path.existsSync(sessionPath)) {
+ if (!fs.existsSync(sessionPath)) {
fs.mkdirSync(sessionPath, 0755);
}
@@ -282,7 +286,7 @@ driverFactory.modes.recording = function (proxy, session) {
driverFactory.modes.playback = function (proxy, session) {
var sessionPath = sessionsRootPath + '/' + session.name;
- if (path.existsSync(sessionPath + '/index.json')) {
+ if (fs.existsSync(sessionPath + '/index.json')) {
var records = JSON.parse(fs.readFileSync(sessionPath + '/index.json'));
var driver = {};
Please sign in to comment.
Something went wrong with that request. Please try again.