-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #72 from getbraincloud/release/3.10
Release/3.10
- Loading branch information
Showing
21 changed files
with
495 additions
and
457 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
pushd ../src | ||
cat `ls *.js` > ../deploy/node/lib/brainCloudClient.concat.js | ||
popd | ||
|
||
pushd ../deploy/node/lib | ||
echo "exports.BrainCloudWrapper = BrainCloudWrapper" >>brainCloudClient.concat.js | ||
echo "exports.BrainCloudClient = BrainCloudClient" >>brainCloudClient.concat.js | ||
popd | ||
|
||
pushd ../deploy/node | ||
npm install | ||
popd | ||
|
||
# Compile to make sure its all fine and ES5 worthy | ||
java -jar ../tools/closure/compiler.jar --js ../deploy/node/lib/brainCloudClient.concat.js --js_output_file ../deploy/node/lib/brainCloudClient.min.js | ||
|
||
pushd ../test | ||
echo "serverUrl=https://internal.braincloudservers.com/dispatcherv2" >ids.txt | ||
echo "appId=20001" >>ids.txt | ||
echo "secret=4e51b45c-030e-4f21-8457-dc53c9a0ed5f" >>ids.txt | ||
echo "version=1.0.0" >>ids.txt | ||
echo "childAppId=20005" >>ids.txt | ||
echo "childSecret=f8cec1cf-2f95-4989-910c-8caf598f83db" >>ids.txt | ||
echo "parentLevelName=Master" >>ids.txt | ||
echo "peerName=peerapp" >>ids.txt | ||
npm install | ||
node test | ||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,35 @@ | ||
window = {"navigator": {"userLanguage":"en"}}; | ||
CryptoJS = {}; | ||
window.FormData = require('form-data'); | ||
FormData = window.FormData; | ||
|
||
var bc = require("./lib/brainCloudClient.concat.js") | ||
if (typeof localStorage === "undefined" || localStorage === null) { | ||
var LocalStorage = require('node-localstorage').LocalStorage; | ||
os = require('os'); | ||
const configDir = os.homedir() + "/.bciot"; | ||
localStorage = new LocalStorage(configDir); | ||
} | ||
window.XMLHttpRequest = require("xmlhttprequest-ssl").XMLHttpRequest; | ||
XMLHttpRequest = window.XMLHttpRequest; | ||
|
||
XMLHttpRequest.UNSENT = 0; | ||
XMLHttpRequest.OPENED = 1; | ||
XMLHttpRequest.HEADERS_RECEIVED = 2; | ||
XMLHttpRequest.LOADING = 3; | ||
XMLHttpRequest.DONE = 4; | ||
|
||
// XMLHttpRequest4Upload = require('./xmlHttpRequest4Upload.js'); | ||
// class XMLHttpRequest4Upload { | ||
// constructor() { | ||
// this.upload = { | ||
// addEventListener : this.addEventListener.bind(this) | ||
// }; | ||
// this.observer = { | ||
// load:null, | ||
// error:null, | ||
// abort:null, | ||
// progress:null | ||
// } | ||
// } | ||
// open ( method, url, async) { | ||
// this.url = url; | ||
// this.method = method; | ||
// this.async = async; | ||
// } | ||
// send ( form ) { | ||
// var request = form.submit(this.url, function(err, res) { | ||
// if (err) { | ||
// this.observer["error"](err); | ||
// } else { | ||
// this.observer["load"](res); | ||
// } | ||
// res.resume(); | ||
// }.bind(this)); | ||
// // console.log(" Request is " + request ); | ||
// } | ||
|
||
// addEventListener (event,callback) { | ||
// this.observer[event] = callback | ||
// } | ||
// } | ||
|
||
CryptoJS.MD5 = require('md5'); | ||
function XMLHttpRequest4Upload() { | ||
this.upload = { | ||
addEventListener : this.addEventListener.bind(this) | ||
}; | ||
this.observer = { | ||
load:null, | ||
error:null, | ||
abort:null, | ||
progress:null | ||
} | ||
} | ||
XMLHttpRequest4Upload.prototype.open = function(method, url, async) { | ||
this.url = url; | ||
this.method = method; | ||
this.async = async; | ||
} | ||
XMLHttpRequest4Upload.prototype.send = function(form) { | ||
form.submit(this.url, function(err, res) { | ||
if (err) { | ||
this.observer["error"](err); | ||
} else { | ||
this.observer["load"](res); | ||
} | ||
res.resume(); | ||
}.bind(this)); | ||
} | ||
XMLHttpRequest4Upload.prototype.addEventListener = function(event,callback) { | ||
this.observer[event] = callback | ||
} | ||
|
||
exports.XMLHttpRequest4Upload = require('./lib/xmlHttpRequest4Upload.js').XMLHttpRequest4Upload; | ||
exports.XMLHttpRequest4Upload = XMLHttpRequest4Upload; | ||
exports.BrainCloudWrapper = bc.BrainCloudWrapper | ||
exports.BrainCloudClient = bc.BrainCloudClient | ||
exports.BrainCloudClient = bc.BrainCloudClient |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Generated lib files are dumped here. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.