Skip to content
This repository has been archived by the owner on Apr 3, 2019. It is now read-only.

Commit

Permalink
Built fxa-js-client from commit a3a2d11 on branch master
Browse files Browse the repository at this point in the history
  • Loading branch information
zaach committed Mar 24, 2014
1 parent 77d2102 commit 0c32e85
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 27 deletions.
47 changes: 22 additions & 25 deletions fxa-client.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@
//result to a property on the global.
root.FxAccountClient = factory();
}
}(this, function () {/**
* @license almond 0.2.9 Copyright (c) 2011-2014, The Dojo Foundation All Rights Reserved.
}(this, function () {
/**
* almond 0.2.6 Copyright (c) 2011-2012, The Dojo Foundation All Rights Reserved.
* Available via the MIT or new BSD license.
* see: http://github.com/jrburke/almond for details
*/
Expand All @@ -29,8 +30,7 @@ var requirejs, require, define;
config = {},
defining = {},
hasOwn = Object.prototype.hasOwnProperty,
aps = [].slice,
jsSuffixRegExp = /\.js$/;
aps = [].slice;

function hasProp(obj, prop) {
return hasOwn.call(obj, prop);
Expand All @@ -45,7 +45,7 @@ var requirejs, require, define;
* @returns {String} normalized name
*/
function normalize(name, baseName) {
var nameParts, nameSegment, mapValue, foundMap, lastIndex,
var nameParts, nameSegment, mapValue, foundMap,
foundI, foundStarMap, starI, i, j, part,
baseParts = baseName && baseName.split("/"),
map = config.map,
Expand All @@ -63,15 +63,8 @@ var requirejs, require, define;
//"one/two/three.js", but we want the directory, "one/two" for
//this normalization.
baseParts = baseParts.slice(0, baseParts.length - 1);
name = name.split('/');
lastIndex = name.length - 1;

// Node .js allowance:
if (config.nodeIdCompat && jsSuffixRegExp.test(name[lastIndex])) {
name[lastIndex] = name[lastIndex].replace(jsSuffixRegExp, '');
}

name = baseParts.concat(name);
name = baseParts.concat(name.split("/"));

//start trimDots
for (i = 0; i < name.length; i += 1) {
Expand Down Expand Up @@ -280,14 +273,14 @@ var requirejs, require, define;
main = function (name, deps, callback, relName) {
var cjsModule, depName, ret, map, i,
args = [],
callbackType = typeof callback,
usingExports;

//Use name if no relName
relName = relName || name;

//Call the callback to define the module, if necessary.
if (callbackType === 'undefined' || callbackType === 'function') {
if (typeof callback === 'function') {

//Pull out the defined dependencies and pass the ordered
//values to the callback.
//Default to [require, exports, module] if no deps
Expand Down Expand Up @@ -318,7 +311,7 @@ var requirejs, require, define;
}
}

ret = callback ? callback.apply(defined[name], args) : undefined;
ret = callback.apply(defined[name], args);

if (name) {
//If setting exports via "module" is in play,
Expand Down Expand Up @@ -353,13 +346,6 @@ var requirejs, require, define;
} else if (!deps.splice) {
//deps is a config object, not an array.
config = deps;
if (config.deps) {
req(config.deps, config.callback);
}
if (!callback) {
return;
}

if (callback.splice) {
//callback is an array, which means it is a dependency list.
//Adjust args if there are dependencies
Expand Down Expand Up @@ -404,7 +390,11 @@ var requirejs, require, define;
* the config return value is used.
*/
req.config = function (cfg) {
return req(cfg);
config = cfg;
if (config.deps) {
req(config.deps, config.callback);
}
return req;
};

/**
Expand Down Expand Up @@ -1801,6 +1791,9 @@ define('client/FxAccountClient',['./lib/request', 'sjcl', 'p', './lib/credential
function (Request, sjcl, P, credentials, hawkCredentials, ERRORS) {


var VERSION = 'v1';
var uriVersionRegExp = new RegExp('/' + VERSION + '$');

/**
* @class FxAccountClient
* @constructor
Expand All @@ -1815,10 +1808,15 @@ define('client/FxAccountClient',['./lib/request', 'sjcl', 'p', './lib/credential
if (typeof config === 'undefined') {
config = {};
}
if (!uriVersionRegExp.test(uri)) {
uri = uri + '/' + VERSION;
}

this.request = new Request(uri, config.xhr, { localtimeOffsetMsec: config.localtimeOffsetMsec });
}

FxAccountClient.VERSION = VERSION;

/**
* @method #
* @param {String} email Email input
Expand Down Expand Up @@ -2391,7 +2389,6 @@ define('client/FxAccountClient',['./lib/request', 'sjcl', 'p', './lib/credential
});



//The modules for your project will be inlined above
//this snippet. Ask almond to synchronously require the
//module value for 'main' here and return it as the
Expand Down
Loading

0 comments on commit 0c32e85

Please # to comment.