Join our webinar on Wednesday, June 26, at 1pm EDTHow Chia Mitigates Risk in the Crypto Industry.Register
Socket
Socket
Sign inDemoInstall

ultimate.mvc

Package Overview
Dependencies
215
Maintainers
1
Versions
63
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.1.5 to 1.1.6

81

lib/pjs.js

@@ -37,3 +37,3 @@ import fs from 'fs';

if(!('data' in tag))throw new Error("View object must have data property");
if(!('type' in tag.details))throw new Error("Type is not defined");
if(!('type' in tag.details))throw new Error("type is not defined");

@@ -107,29 +107,22 @@ tag.data=await new Promise((resolve,reject)=>{

return new Promise(async (__resolve,__reject)=>{
var result=babel.transform(data,
{
presets:['@babel/preset-react']
}).code;
result=result.replace(/[/][*]#__PURE__[*][/]React.createElement/g,'createElement');
result=result.replace(/[/][*]#__PURE__[*][/]React.createClass/g,'createClass');
result=result.replace(/React.Component/g,'Component');
result=result.replace(/React.Fragment/g,'null');
result=result.replace(/React.Children/g,'body');
result=result.replace(/React.PropTypes/g,'PropTypes');
//console.log('PJS::',result);
(async function(){
//this class function access from bind
this.render=renderRaw.bind(this);
this.end=endView.bind(this);
this.bindView=bindViewFuns.bind(this);
this.createElement=createElementFuns.bind(this);
this.includePage=include.bind(this); //includePage function
this.isError=isError.bind(this);
this.importModule=importHelper.bind(this);
var api_runner=new AsyncFunction(accessThisVariables(this)+`
try{
var inst=Object.assign(local,{
__resolve:__resolve,
__reject:__reject,
});
inst.render=renderRaw.bind(inst);
inst.end=endView.bind(inst);
inst.bindView=bindViewFuns.bind(inst);
inst.createElement=createElementFuns.bind(inst);
inst.includePage=include.bind(inst); //includePage function
inst.isError=isError.bind(inst);
inst.importModule=importHelper.bind(inst);
var result=babel.transform(`(async ()=>{
`+accessThisVariables(inst)+`
try{
${result}
${data}
}catch(err){

@@ -139,9 +132,33 @@ if(isError(err))__reject(err);

}
`);
api_runner.call(this);
}).call(this);`,
{
presets:[
[
'@babel/preset-react',
{
pragma: "createElement", //React.createElement
pragmaFrag: "null", // default is React.Fragment (only in classic runtime)
development:false, //'__manifest' in local && 'debug' in local.__manifest && local.__manifest.debug,
pure:false,
}
]
],
//plugins: ["@babel/plugin-syntax-jsx"],
}).code;
//https://babeljs.io/docs/en/babel-preset-react
}).call(Object.assign(local,{
__resolve:__resolve,
__reject:__reject,
}));
// console.log(result);
// result=result.replace(/[/][*]#__PURE__[*][/]React./g,'');
// result=result.replace(/React.Children/g,'body');
// result=result.replace(/React./g,'');
var api_runner=new AsyncFunction(result);
api_runner.call(inst);
}
catch(err){
__reject(err);
}
});

@@ -148,0 +165,0 @@ }

@@ -5,3 +5,3 @@ {

"author": "Pallob Gain",
"version": "1.1.5",
"version": "1.1.6",
"debug":true,

@@ -8,0 +8,0 @@ "orginal_path":false,

{
"name": "ultimate.mvc",
"version": "1.1.5",
"version": "1.1.6",
"description": "It is node js MVC for creating interactive chromium based cross-platform desktop-app and web-app",

@@ -52,5 +52,5 @@ "main": "./lib/index.js",

"devDependencies": {
"@babel/plugin-syntax-jsx": "^7.16.7",
"@babel/plugin-syntax-jsx": "^7.18.6",
"mysql2": "^3.1.0"
}
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc