Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

raz

Package Overview
Dependencies
Maintainers
1
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

raz - npm Package Compare versions

Comparing version 0.0.74 to 0.0.75

38

core/errors/errors.en.js

@@ -10,3 +10,3 @@ const RazorError = require('./RazorError');

endOfFileFoundAfterAtSign(lineNum, posNum) {
var message = `End-of-file was found after the "@" character at line ${lineNum + 1} pos ${posNum + 1}. "@" must be followed by a valid code block. If you want to output an "@", escape it using the sequence: "@@"`;
var message = `End-of-file was found after the "@" character at line ${lineNum} pos ${posNum + 1}. "@" must be followed by a valid code block. If you want to output an "@", escape it using the sequence: "@@"`;
return RazorError.new({ message, info: this.info, line: lineNum, pos: posNum, capture: this.endOfFileFoundAfterAtSign });

@@ -16,3 +16,3 @@ }

unexpectedCharacter(ch, lineNum, posNum, line) {
var message = `Unexpected '${ch}' character at line ${lineNum + 1} pos ${posNum + 1} after '${line}'`;
var message = `Unexpected '${ch}' character at line ${lineNum} pos ${posNum + 1} after '${line}'`;
return RazorError.new({ message, info: this.info, line: lineNum, pos: posNum, capture: this.unexpectedCharacter });

@@ -22,3 +22,3 @@ }

unexpectedAtCharacter(lineNum, posNum) {
var message = `Unexpected '@' character at line ${lineNum + 1} pos ${posNum + 1}. Once inside the body of a code block (@if {}, @{}, etc.) or a section (@section{}) you do not need to use "@" character to switch to code.`;
var message = `Unexpected '@' character at line ${lineNum} pos ${posNum + 1}. Once inside the body of a code block (@if {}, @{}, etc.) or a section (@section{}) you do not need to use "@" character to switch to code.`;
return RazorError.new({ message, info: this.info, line: lineNum, pos: posNum, capture: this.unexpectedAtCharacter });

@@ -28,3 +28,3 @@ }

notValidStartOfCodeBlock(ch, lineNum, posNum) {
var message = `"${ch}" is not valid at the start of a code block at line ${lineNum + 1} pos ${posNum + 1}. Only identifiers, keywords, "(" and "{" are valid.`;
var message = `"${ch}" is not valid at the start of a code block at line ${lineNum} pos ${posNum + 1}. Only identifiers, keywords, "(" and "{" are valid.`;
return RazorError.new({ message, info: this.info, line: lineNum, pos: posNum, capture: this.notValidStartOfCodeBlock });

@@ -39,3 +39,3 @@ }

characterExpected(ch, line, pos) {
var message = `'${ch}' character is expected at line ${line + 1} pos ${pos + 1}.`;
var message = `'${ch}' character is expected at line ${line} pos ${pos + 1}.`;
return RazorError.new({ message, info: this.info, line, pos, capture: this.characterExpected });

@@ -45,3 +45,3 @@ }

characterExpectedAfter(ch, line, pos, after) {
var message = `'${ch}' character is expected after '${after}' at line ${line + 1} pos ${pos + 1}.`;
var message = `'${ch}' character is expected after '${after}' at line ${line} pos ${pos + 1}.`;
return RazorError.new({ message, info: this.info, line, pos, capture: this.characterExpectedAfter });

@@ -51,3 +51,3 @@ }

expressionMissingEnd(expr, ch, line, pos) {
var message = `The explicit expression "${expr}" is missing a closing character "${ch}" at line ${line + 1} pos ${pos + 1}.`;
var message = `The explicit expression "${expr}" is missing a closing character "${ch}" at line ${line} pos ${pos + 1}.`;
return RazorError.new({ message, info: this.info, line, pos, capture: this.expressionMissingEnd });

@@ -62,3 +62,3 @@ }

wordExpected(word, line, pos, len) {
var message = `'${word}' expected at line ${line + 1} pos ${pos + 1}.`;
var message = `'${word}' expected at line ${line} pos ${pos + 1}.`;
return RazorError.new({ message, info: this.info, line, pos, len, capture: this.wordExpected });

@@ -73,3 +73,3 @@ }

missingMatchingStartTag(tag, line, pos) {
var message = `'${tag}' tag at line ${line + 1} pos ${pos + 1} is missing matching start tag.`;
var message = `'${tag}' tag at line ${line} pos ${pos + 1} is missing matching start tag.`;
return RazorError.new({ message, info: this.info, line, pos, len: tag.length, capture: this.missingMatchingStartTag });

@@ -79,3 +79,3 @@ }

missingMatchingEndTag(tag, line, pos) {
var message = `'${tag}' tag at line ${line + 1} pos ${pos + 1} is missing matching end tag.`;
var message = `'${tag}' tag at line ${line} pos ${pos + 1} is missing matching end tag.`;
return RazorError.new({ message, info: this.info, line, pos, len: tag.length, capture: this.missingMatchingEndTag });

@@ -85,3 +85,3 @@ }

invalidExpressionChar(ch, line, pos, afterText) {
var message = `Invalid "${ch}" symbol in expression at line ${line + 1} pos ${pos + 1}` + (afterText ? ` after "${afterText}".` : ".");
var message = `Invalid "${ch}" symbol in expression at line ${line} pos ${pos + 1}` + (afterText ? ` after "${afterText}".` : ".");
return RazorError.new({ message, info: this.info, line, pos, capture: this.invalidExpressionChar });

@@ -101,3 +101,3 @@ }

whiteSpaceExpectedAfter(keyword, line, pos) {
var message = `A whitespace expected after the "${keyword}" keyword at line ${line + 1} pos ${pos + 1}.`;
var message = `A whitespace expected after the "${keyword}" keyword at line ${line} pos ${pos + 1}.`;
return RazorError.new({ message, info: this.info, line, pos, capture: this.whiteSpaceExpectedAfter }); // cannot be tested.

@@ -107,3 +107,3 @@ }

tagNameExpected(line, pos) {
var message = `Tag name expected at line ${line + 1} pos ${pos + 1}.`;
var message = `Tag name expected at line ${line} pos ${pos + 1}.`;
return RazorError.new({ message, info: this.info, line, pos, capture: this.tagNameExpected });

@@ -113,3 +113,3 @@ }

sectionNameExpectedAfter(keyword, line, pos) {
var message = `A section name expected after the "${keyword}" keyword at line ${line + 1} pos ${pos + 1}.`;
var message = `A section name expected after the "${keyword}" keyword at line ${line} pos ${pos + 1}.`;
return RazorError.new({ message, info: this.info, line, pos, capture: this.sectionNameExpectedAfter });

@@ -119,3 +119,3 @@ }

sectionNameCannotStartWith(ch, line, pos) {
var message = `A section name cannot start with '${ch}' at line ${line + 1} pos ${pos + 1}.`;
var message = `A section name cannot start with '${ch}' at line ${line} pos ${pos + 1}.`;
return RazorError.new({ message, info: this.info, line, pos, capture: this.sectionNameCannotStartWith });

@@ -125,3 +125,3 @@ }

sectionNameCannotInclude(ch, line, pos) {
var message = `A section name cannot include '${ch}' character at line ${line + 1} pos ${pos + 1}.`;
var message = `A section name cannot include '${ch}' character at line ${line} pos ${pos + 1}.`;
return RazorError.new({ message, info: this.info, line, pos, capture: this.sectionNameCannotInclude });

@@ -131,3 +131,3 @@ }

unexpectedLiteralFollowingTheSection(ch, line, pos) {
var message = `Unexpected literal '${ch}' following the 'section' directive at line ${line + 1} pos ${pos + 1}. Expected '{'.`;
var message = `Unexpected literal '${ch}' following the 'section' directive at line ${line} pos ${pos + 1}. Expected '{'.`;
return RazorError.new({ message, info: this.info, line, pos, capture: this.unexpectedLiteralFollowingTheSection });

@@ -137,3 +137,3 @@ }

sectionIsAlreadyDefined(sectionName, line, pos, viewFilePath) {
var message = `Section '${sectionName}' at line ${line + 1} pos ${pos + 1} has been already defined in the file '${viewFilePath}'. You cannot assign the same name to different sections in the same file.`;
var message = `Section '${sectionName}' at line ${line} pos ${pos + 1} has been already defined in the file '${viewFilePath}'. You cannot assign the same name to different sections in the same file.`;
return RazorError.new({ message, info: this.info, line, pos, len: sectionName.length, capture: this.sectionIsAlreadyDefined });

@@ -148,3 +148,3 @@ }

sectionsCannotBeNested(line, pos) {
var message = `Section blocks cannot be nested at line ${line + 1} pos ${pos + 1}.`;
var message = `Section blocks cannot be nested at line ${line} pos ${pos + 1}.`;
return RazorError.new({ message, info: this.info, line, pos, capture: this.sectionsCannotBeNested });

@@ -151,0 +151,0 @@ }

@@ -193,3 +193,3 @@ const htmlEncode = require('js-htmlencode');

lines = data.jshtml.split('\n');
html = "<ol start='1'>";
html = "<ol start='0'>";

@@ -196,0 +196,0 @@ for (let i = 0; i < lines.length; i++) {

{
"name": "raz",
"description": "Razor-like Template Engine for NodeJS Express library based on ASP.NET MVC Razor syntax. Template your views by mixing HTML markup with JavaScript server-side code!",
"version": "0.0.74",
"version": "0.0.75",
"author": {

@@ -6,0 +6,0 @@ "name": "Sergey Fisun",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc