express-tsx
Advanced tools
Comparing version 4.1.5 to 4.1.7
{ | ||
"name": "express-tsx", | ||
"version": "4.1.5", | ||
"version": "4.1.7", | ||
"description": "express view engine", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -9,3 +9,2 @@ import ts = require('typescript') | ||
} | ||
import glob = require('glob') | ||
export class Compile { | ||
@@ -149,2 +148,3 @@ server:ts.LanguageService | ||
let path:string = pathname.slice(regx.isLinux.test(pathname)?0:1) | ||
path = sys.resolvePath(path) | ||
let isRequestSourceMap = regx.sourceMap.test(path) | ||
@@ -151,0 +151,0 @@ if( isRequestSourceMap ){ path = path.replace(regx.sourceMap,'') } |
@@ -13,3 +13,3 @@ import requirejs = require('requirejs') | ||
let preload_imports:string[] = [ browserInitPath, requirejsConfigPath, ...imports ] | ||
preload_imports = preload_imports.map(m=>data.express_tsx_basePath+m+`?v=${compiler.getScriptVersion(m)}`) | ||
preload_imports = preload_imports.map(m=>data.express_tsx_basePath+m+`?v=${compiler.getScriptVersion(m)}`).map((m)=>m.replace(/\\/g,'/')) | ||
let [ _browserInitPath, _requirejsConfigPath, ...imports_arr ] = preload_imports | ||
@@ -16,0 +16,0 @@ preload(data,preload_imports) |
@@ -36,6 +36,6 @@ import { Router,Response } from "express"; | ||
} | ||
import { sys } from "typescript"; | ||
import { join } from "path"; | ||
middleware.use((req,res,next)=>{ | ||
if(res.locals.express_tsx_basePath){ return next() } | ||
res.locals.express_tsx_basePath = sys.resolvePath(req.baseUrl+express_tsx_middleware_path) | ||
res.locals.express_tsx_basePath = join(req.baseUrl,express_tsx_middleware_path) | ||
res.locals.express_tsx_compiler = compiler | ||
@@ -42,0 +42,0 @@ res.locals.express_tsx_html = html |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
62028
1676
0
17
1