mirror of
https://gitlab.com/octtspacc/staticoso
synced 2025-06-05 22:09:23 +02:00
Transition to monorepo on a new Dev branch
This commit is contained in:
19
App/Source/node_modules/pug-error/LICENSE
generated
vendored
Normal file
19
App/Source/node_modules/pug-error/LICENSE
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
Copyright (c) 2015 Forbes Lindesay
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
49
App/Source/node_modules/pug-error/index.js
generated
vendored
Normal file
49
App/Source/node_modules/pug-error/index.js
generated
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = makeError;
|
||||
function makeError(code, message, options) {
|
||||
var line = options.line;
|
||||
var column = options.column;
|
||||
var filename = options.filename;
|
||||
var src = options.src;
|
||||
var fullMessage;
|
||||
var location = line + (column ? ':' + column : '');
|
||||
if (src && line >= 1 && line <= src.split('\n').length) {
|
||||
var lines = src.split('\n');
|
||||
var start = Math.max(line - 3, 0);
|
||||
var end = Math.min(lines.length, line + 3);
|
||||
// Error context
|
||||
var context = lines.slice(start, end).map(function(text, i){
|
||||
var curr = i + start + 1;
|
||||
var preamble = (curr == line ? ' > ' : ' ')
|
||||
+ curr
|
||||
+ '| ';
|
||||
var out = preamble + text;
|
||||
if (curr === line && column > 0) {
|
||||
out += '\n';
|
||||
out += Array(preamble.length + column).join('-') + '^';
|
||||
}
|
||||
return out;
|
||||
}).join('\n');
|
||||
fullMessage = (filename || 'Pug') + ':' + location + '\n' + context + '\n\n' + message;
|
||||
} else {
|
||||
fullMessage = (filename || 'Pug') + ':' + location + '\n\n' + message;
|
||||
}
|
||||
var err = new Error(fullMessage);
|
||||
err.code = 'PUG:' + code;
|
||||
err.msg = message;
|
||||
err.line = line;
|
||||
err.column = column;
|
||||
err.filename = filename;
|
||||
err.src = src;
|
||||
err.toJSON = function () {
|
||||
return {
|
||||
code: this.code,
|
||||
msg: this.msg,
|
||||
line: this.line,
|
||||
column: this.column,
|
||||
filename: this.filename
|
||||
};
|
||||
};
|
||||
return err;
|
||||
}
|
18
App/Source/node_modules/pug-error/package.json
generated
vendored
Normal file
18
App/Source/node_modules/pug-error/package.json
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"name": "pug-error",
|
||||
"version": "1.3.3",
|
||||
"description": "Standard error objects for pug",
|
||||
"keywords": [
|
||||
"pug"
|
||||
],
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/pugjs/pug/tree/master/packages/pug-error"
|
||||
},
|
||||
"author": "Forbes Lindesay",
|
||||
"license": "MIT",
|
||||
"gitHead": "1bdf628a70fda7a0d840c52f3abce54b1c6b0130"
|
||||
}
|
Reference in New Issue
Block a user