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

oils

Package Overview
Dependencies
Maintainers
1
Versions
117
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

oils - npm Package Compare versions

Comparing version 0.4.0 to 0.4.1

29

oils-js-core/app.js

@@ -25,2 +25,31 @@ require('./include.js')();

var overrideSwigFs = function() {
var loaderFs = require('swig/lib/loaders/filesystem')();
//override swig's file loader
//so that when looking for template, it may default to default views dir
var _loadSwigFs = loaderFs.load;
loaderFs.load = function(identifier, cb) {
try {
return _loadSwigFs(identifier, cb);
} catch (e) {
var viewsKeyToLookFor = '/views/';
var viewsIndex = identifier.indexOf(viewsKeyToLookFor);
if (e.message.indexOf('ENOENT, no such file or directory') != -1 && viewsIndex != -1) {
var newPathname = global.BASE_DIR + app.constants.VIEWS_DIR + identifier.substr(viewsIndex + (viewsKeyToLookFor.length-1));
if (app.isDebug) {
console.log('resolving new path: %s', newPathname);
}
return _loadSwigFs(newPathname, cb);
} else {
throw e;
}
}
}
swig.setDefaults({loader:loaderFs});
}
overrideSwigFs();
require('./loaders/models')(app);

@@ -27,0 +56,0 @@

2

package.json
{
"name": "oils",
"version": "0.4.0",
"version": "0.4.1",
"description": "Oils js framework built on top of Express.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -43,2 +43,6 @@ oils

Version 0.4.1 ([Download](https://github.com/mannyvergel/oils-js/archive/v0.4.1.zip))
* plugins can now extend from main views template.
* changed swig behavior to retrieve to default views dir.
Version 0.4.0 ([Download](https://github.com/mannyvergel/oils-js/archive/v0.4.0.zip))

@@ -53,15 +57,2 @@ * restructured paths

Version 0.2.7 ([Download](https://github.com/mannyvergel/oils-js/archive/v0.2.7.zip))
* Fix bug regarding ```includeModel``` caching
* Added ```req, res``` parameters in ```beforeRender``` event hook
Version 0.2.5 ([Download](https://github.com/mannyvergel/oils-js/archive/v0.2.5.zip))
* support for event hooks
* ```app.on('beforeRender', ...)```
* ```app.on('initializeServer', ...)```
* bug fixes
Version 0.2.4 ([Download](https://github.com/mannyvergel/oils-js/archive/v0.2.4.zip))
* support for custom routes in controllers
#### Directory Structure

@@ -173,3 +164,3 @@

Check plugin folder's [README.md](https://github.com/mannyvergel/oils-js/tree/master/template/oils/plugins) for more information.
Check plugin folder's [README.md](https://github.com/mannyvergel/oils-js/tree/master/templates/basic/conf/plugins) for more information.

@@ -202,3 +193,3 @@ ### Event Hooks

Authentication is implemented as a plugin: [oils-auth-local](http://github.com/mannyvergel/oils-auth-local). Just place it in your project's plugin folder. i.e. under ```/oils/plugins/oils-auth-local```.
Authentication is implemented as a plugin: [oils-auth-local](http://github.com/mannyvergel/oils-auth-local). Just place it in your project's plugin folder. i.e. under ```/conf/plugins/oils-auth-local```.

@@ -205,0 +196,0 @@

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