/bower_components/yaml.js/dist/yaml.js |
@@ -53,7 +53,7 @@ |
module.exports = Dumper; |
|
|
},{"./Inline":5,"./Utils":9}],2:[function(require,module,exports){ |
},{"./Inline":6,"./Utils":10}],2:[function(require,module,exports){ |
var Escaper, Pattern; |
|
Pattern = require('./Pattern'); |
@@ -111,7 +111,7 @@ |
module.exports = Escaper; |
|
|
},{"./Pattern":7}],3:[function(require,module,exports){ |
},{"./Pattern":8}],3:[function(require,module,exports){ |
var DumpException, |
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, |
hasProp = {}.hasOwnProperty; |
@@ -170,7 +170,36 @@ |
|
|
},{}],5:[function(require,module,exports){ |
var DumpException, Escaper, Inline, ParseException, Pattern, Unescaper, Utils, |
var ParseMore, |
extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, |
hasProp = {}.hasOwnProperty; |
|
ParseMore = (function(superClass) { |
extend(ParseMore, superClass); |
|
function ParseMore(message, parsedLine, snippet) { |
this.message = message; |
this.parsedLine = parsedLine; |
this.snippet = snippet; |
} |
|
ParseMore.prototype.toString = function() { |
if ((this.parsedLine != null) && (this.snippet != null)) { |
return '<ParseMore> ' + this.message + ' (line ' + this.parsedLine + ': \'' + this.snippet + '\')'; |
} else { |
return '<ParseMore> ' + this.message; |
} |
}; |
|
return ParseMore; |
|
})(Error); |
|
module.exports = ParseMore; |
|
|
},{}],6:[function(require,module,exports){ |
var DumpException, Escaper, Inline, ParseException, ParseMore, Pattern, Unescaper, Utils, |
indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; |
|
Pattern = require('./Pattern'); |
@@ -183,6 +212,8 @@ |
|
ParseException = require('./Exception/ParseException'); |
|
ParseMore = require('./Exception/ParseMore'); |
|
DumpException = require('./Exception/DumpException'); |
|
Inline = (function() { |
@@ -391,7 +422,7 @@ |
var i, match, output; |
i = context.i; |
if (!(match = this.PATTERN_QUOTED_SCALAR.exec(scalar.slice(i)))) { |
throw new ParseException('Malformed inline YAML string (' + scalar.slice(i) + ').'); |
throw new ParseMore('Malformed inline YAML string (' + scalar.slice(i) + ').'); |
} |
output = match[0].substr(1, match[0].length - 2); |
if ('"' === scalar.charAt(i)) { |
@@ -443,7 +474,7 @@ |
} |
++i; |
} |
throw new ParseException('Malformed inline YAML string ' + sequence); |
throw new ParseMore('Malformed inline YAML string ' + sequence); |
}; |
|
Inline.parseMapping = function(mapping, context) { |
@@ -511,7 +542,7 @@ |
} |
} |
} |
throw new ParseException('Malformed inline YAML string ' + mapping); |
throw new ParseMore('Malformed inline YAML string ' + mapping); |
}; |
|
Inline.evaluateScalar = function(scalar, context) { |
@@ -654,8 +685,8 @@ |
module.exports = Inline; |
|
|
},{"./Escaper":2,"./Exception/DumpException":3,"./Exception/ParseException":4,"./Pattern":7,"./Unescaper":8,"./Utils":9}],6:[function(require,module,exports){ |
var Inline, ParseException, Parser, Pattern, Utils; |
},{"./Escaper":2,"./Exception/DumpException":3,"./Exception/ParseException":4,"./Exception/ParseMore":5,"./Pattern":8,"./Unescaper":9,"./Utils":10}],7:[function(require,module,exports){ |
var Inline, ParseException, ParseMore, Parser, Pattern, Utils; |
|
Inline = require('./Inline'); |
|
@@ -665,6 +696,8 @@ |
|
ParseException = require('./Exception/ParseException'); |
|
ParseMore = require('./Exception/ParseMore'); |
|
Parser = (function() { |
Parser.prototype.PATTERN_FOLDED_SCALAR_ALL = new Pattern('^(?:(?<type>![^\\|>]*)\\s+)?(?<separator>\\||>)(?<modifiers>\\+|\\-|\\d+|\\+\\d+|\\-\\d+|\\d+\\+|\\d+\\-)?(?<comments> +#.*)?$'); |
|
@@ -684,13 +717,13 @@ |
|
Parser.prototype.PATTERN_TRAILING_LINES = new Pattern('(\n*)$'); |
|
Parser.prototype.PATTERN_YAML_HEADER = new Pattern('^\\%YAML[: ][\\d\\.]+.*\n'); |
Parser.prototype.PATTERN_YAML_HEADER = new Pattern('^\\%YAML[: ][\\d\\.]+.*\n', 'm'); |
|
Parser.prototype.PATTERN_LEADING_COMMENTS = new Pattern('^(\\#.*?\n)+'); |
Parser.prototype.PATTERN_LEADING_COMMENTS = new Pattern('^(\\#.*?\n)+', 'm'); |
|
Parser.prototype.PATTERN_DOCUMENT_MARKER_START = new Pattern('^\\-\\-\\-.*?\n'); |
Parser.prototype.PATTERN_DOCUMENT_MARKER_START = new Pattern('^\\-\\-\\-.*?\n', 'm'); |
|
Parser.prototype.PATTERN_DOCUMENT_MARKER_END = new Pattern('^\\.\\.\\.\\s*$'); |
Parser.prototype.PATTERN_DOCUMENT_MARKER_END = new Pattern('^\\.\\.\\.\\s*$', 'm'); |
|
Parser.prototype.PATTERN_FOLDED_SCALAR_BY_INDENTATION = {}; |
|
@@ -979,18 +1012,16 @@ |
if (indent === newIndent) { |
removeComments = !removeCommentsPattern.test(this.currentLine); |
} |
if (isItUnindentedCollection && !this.isStringUnIndentedCollectionItem(this.currentLine) && indent === newIndent) { |
this.moveToPreviousLine(); |
break; |
if (removeComments && this.isCurrentLineComment()) { |
continue; |
} |
if (this.isCurrentLineBlank()) { |
data.push(this.currentLine.slice(newIndent)); |
continue; |
} |
if (removeComments && this.isCurrentLineComment()) { |
if (indent === newIndent) { |
continue; |
} |
if (isItUnindentedCollection && !this.isStringUnIndentedCollectionItem(this.currentLine) && indent === newIndent) { |
this.moveToPreviousLine(); |
break; |
} |
if (indent >= newIndent) { |
data.push(this.currentLine.slice(newIndent)); |
@@ -1019,7 +1050,7 @@ |
}; |
|
Parser.prototype.parseValue = function(value, exceptionOnInvalidType, objectDecoder) { |
var e, error, error1, foldedIndent, matches, modifiers, pos, ref, ref1, val; |
var e, error, foldedIndent, matches, modifiers, pos, ref, ref1, val; |
if (0 === value.indexOf('*')) { |
pos = value.indexOf('#'); |
if (pos !== -1) { |
@@ -1046,25 +1077,26 @@ |
return val; |
} |
} |
try { |
return Inline.parse(value, exceptionOnInvalidType, objectDecoder); |
} catch (error) { |
e = error; |
if (((ref1 = value.charAt(0)) === '[' || ref1 === '{') && e instanceof ParseException && this.isNextLineIndented()) { |
value += "\n" + this.getNextEmbedBlock(); |
if ((ref1 = value.charAt(0)) === '[' || ref1 === '{' || ref1 === '"' || ref1 === "'") { |
while (true) { |
try { |
return Inline.parse(value, exceptionOnInvalidType, objectDecoder); |
} catch (error1) { |
e = error1; |
e.parsedLine = this.getRealCurrentLineNb() + 1; |
e.snippet = this.currentLine; |
throw e; |
} catch (error) { |
e = error; |
if (e instanceof ParseMore && this.moveToNextLine()) { |
value += "\n" + Utils.trim(this.currentLine, ' '); |
} else { |
e.parsedLine = this.getRealCurrentLineNb() + 1; |
e.snippet = this.currentLine; |
throw e; |
} |
} |
} else { |
e.parsedLine = this.getRealCurrentLineNb() + 1; |
e.snippet = this.currentLine; |
throw e; |
} |
} else { |
if (this.isNextLineIndented()) { |
value += "\n" + this.getNextEmbedBlock(); |
} |
return Inline.parse(value, exceptionOnInvalidType, objectDecoder); |
} |
}; |
|
@@ -1258,7 +1290,7 @@ |
module.exports = Parser; |
|
|
},{"./Exception/ParseException":4,"./Inline":5,"./Pattern":7,"./Utils":9}],7:[function(require,module,exports){ |
},{"./Exception/ParseException":4,"./Exception/ParseMore":5,"./Inline":6,"./Pattern":8,"./Utils":10}],8:[function(require,module,exports){ |
var Pattern; |
|
Pattern = (function() { |
@@ -1366,7 +1398,7 @@ |
count = 0; |
while (this.regex.test(str) && (limit === 0 || count < limit)) { |
this.regex.lastIndex = 0; |
str = str.replace(this.regex, ''); |
str = str.replace(this.regex, replacement); |
count++; |
} |
return [str, count]; |
@@ -1379,7 +1411,7 @@ |
module.exports = Pattern; |
|
|
},{}],8:[function(require,module,exports){ |
},{}],9:[function(require,module,exports){ |
var Pattern, Unescaper, Utils; |
|
Utils = require('./Utils'); |
@@ -1464,8 +1496,9 @@ |
module.exports = Unescaper; |
|
|
},{"./Pattern":7,"./Utils":9}],9:[function(require,module,exports){ |
var Pattern, Utils; |
},{"./Pattern":8,"./Utils":10}],10:[function(require,module,exports){ |
var Pattern, Utils, |
hasProp = {}.hasOwnProperty; |
|
Pattern = require('./Pattern'); |
|
@@ -1493,7 +1526,6 @@ |
if (_char == null) { |
_char = '\\s'; |
} |
return str.trim(); |
regexLeft = this.REGEX_LEFT_TRIM_BY_CHAR[_char]; |
if (regexLeft == null) { |
this.REGEX_LEFT_TRIM_BY_CHAR[_char] = regexLeft = new RegExp('^' + _char + '' + _char + '*'); |
@@ -1534,9 +1566,22 @@ |
}; |
|
Utils.isEmpty = function(value) { |
return !value || value === '' || value === '0' || (value instanceof Array && value.length === 0); |
return !value || value === '' || value === '0' || (value instanceof Array && value.length === 0) || this.isEmptyObject(value); |
}; |
|
Utils.isEmptyObject = function(value) { |
var k; |
return value instanceof Object && ((function() { |
var results; |
results = []; |
for (k in value) { |
if (!hasProp.call(value, k)) continue; |
results.push(k); |
} |
return results; |
})()).length === 0; |
}; |
|
Utils.subStrCount = function(string, subString, start, length) { |
var c, i, j, len, ref, sublen; |
c = 0; |
@@ -1666,7 +1711,7 @@ |
} |
date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction)); |
if (tz_offset) { |
date.setTime(date.getTime() + tz_offset); |
date.setTime(date.getTime() - tz_offset); |
} |
return date; |
}; |
@@ -1750,7 +1795,7 @@ |
module.exports = Utils; |
|
|
},{"./Pattern":7}],10:[function(require,module,exports){ |
},{"./Pattern":8}],11:[function(require,module,exports){ |
var Dumper, Parser, Utils, Yaml; |
|
Parser = require('./Parser'); |
@@ -1822,17 +1867,6 @@ |
return yaml.dump(input, inline, 0, exceptionOnInvalidType, objectEncoder); |
}; |
|
Yaml.register = function() { |
var require_handler; |
require_handler = function(module, filename) { |
return module.exports = YAML.parseFile(filename); |
}; |
if ((typeof require !== "undefined" && require !== null ? require.extensions : void 0) != null) { |
require.extensions['.yml'] = require_handler; |
return require.extensions['.yaml'] = require_handler; |
} |
}; |
|
Yaml.stringify = function(input, inline, indent, exceptionOnInvalidType, objectEncoder) { |
return this.dump(input, inline, indent, exceptionOnInvalidType, objectEncoder); |
}; |
@@ -1856,4 +1890,4 @@ |
module.exports = Yaml; |
|
|
},{"./Dumper":1,"./Parser":6,"./Utils":9}]},{},[10]); |
},{"./Dumper":1,"./Parser":7,"./Utils":10}]},{},[11]); |