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

pwoli

Package Overview
Dependencies
Maintainers
2
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pwoli - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

1

lib/assets/js/validation.js

@@ -206,3 +206,2 @@ pwoli.validation = (function ($) {

(options.allowName && new RegExp(options.fullPattern).test(value));
//console.log('validation', value, (new RegExp(options.pattern, 'ig')).test(value), options.allowName, (new RegExp(options.fullPattern)).test(value));
}

@@ -209,0 +208,0 @@ }

1

lib/base/Application.d.ts

@@ -108,2 +108,3 @@ import Component from './Component';

static responsify(response: any): any;
static setORMModelClass(modelClass: Object): void;
}

@@ -90,7 +90,5 @@ "use strict";

return __awaiter(this, void 0, void 0, function* () {
//console.log('ares', data);
if (typeof data === 'string')
this.response.data = data;
else if (typeof data === 'function') {
console.log('aresf--------------------->', nativeResponse);
nativeResponse = this.responsify(nativeResponse);

@@ -104,3 +102,2 @@ return data(nativeResponse);

}
//console.log('aresa', this.response);
nativeResponse = this.responsify(nativeResponse);

@@ -121,2 +118,5 @@ nativeResponse.write(this.response.data);

}
static setORMModelClass(modelClass) {
Application.ormModelClass = modelClass;
}
}

@@ -123,0 +123,0 @@ exports.default = Application;

@@ -149,3 +149,2 @@ "use strict";

const lines = [];
//console.log('cssFiles', this.cssFiles);
if (this.cssFiles.length > 0)

@@ -152,0 +151,0 @@ lines.push(this.cssFiles.join('\n'));

@@ -58,3 +58,3 @@ import Model from '../base/Model';

* Html.addCssClass(options, {persistent: 'override'});
* console.log(options['class']); // outputs: {persistent: 'initial'};
* ```

@@ -61,0 +61,0 @@ *

@@ -49,3 +49,3 @@ "use strict";

* Html.addCssClass(options, {persistent: 'override'});
* console.log(options['class']); // outputs: {persistent: 'initial'};
* ```

@@ -329,5 +329,3 @@ *

let value = model[attribute];
//console.log('gav', model)
if (matches[3] !== '') {
console.log('gav3', attribute);
for (const id of matches[3].trim().split(']['))

@@ -334,0 +332,0 @@ if (Array.isArray(value) && value[id] !== undefined)

@@ -10,4 +10,2 @@ "use strict";

extendableModelClass() {
if (Application_1.default.ormModelClass === undefined)
throw new Error("'Application.ormModelClass' should be set.");
return Application_1.default.ormModelClass;

@@ -14,0 +12,0 @@ }

@@ -108,3 +108,2 @@ "use strict";

let errors = {};
//console.log('validate-errors', error.errors);
error.errors.forEach((error) => {

@@ -111,0 +110,0 @@ errors[error.path] = error.message;

@@ -14,6 +14,6 @@ "use strict";

const Application_1 = require("../../pkgtest-lib/base/Application");
const path = require("path");
const sequelize_1 = require("sequelize");
const path = require("path");
Application_1.default.ormModelClass = sequelize_1.Model;
Application_1.default.viewPath = path.join(__dirname, 'views');
Application_1.default.setORMModelClass(sequelize_1.Model);
Application_1.default.setViewPath(path.join(__dirname, 'views'));
const url = require('url');

@@ -79,3 +79,2 @@ const queryString = require("querystring");

if (req.headers['x-requested-with'] === 'XMLHttpRequest' && company.load(post)) {
//console.log('req.body', post);
res.setHeader('Content-Type', 'application/json');

@@ -89,3 +88,2 @@ res.write(JSON.stringify(yield pkgtest_lib_1.ActiveForm.validate(company)));

yield company.save();
//console.log('after-load', company);
// res.writeHead(301,

@@ -112,3 +110,2 @@ // { Location: '/form?success=true' }

dataProvider.query.include = [{ model: pkgtest_models_1.Event, as: 'event' }];
//console.log('company-with-event', await Company.findOne({where: {id:61}, include: [{ model: Event, as: 'event' }]}))
let grid = new MyGridView({

@@ -139,3 +136,2 @@ dataProvider,

//res.write(await Application.view.setLayout('/layout.ejs').render('/grid.ejs', { grid }));
console.log('x-requested-with', req.headers['x-requested-with']);
if (req.headers['x-requested-with'] === 'XMLHttpRequest')

@@ -142,0 +138,0 @@ content = yield Application_1.default.view.render('/grid.ejs', { grid, company: new pkgtest_models_1.Company() }, false);

@@ -151,3 +151,2 @@ "use strict";

let models;
//console.log('sdpbb------------', await dataProvider.getModels())
if (this.preserveKeys)

@@ -166,3 +165,2 @@ models = yield dataProvider.getModels();

else if (this.collectionEnvelope === undefined) {
//console.log('sdp------------', models)
return models;

@@ -169,0 +167,0 @@ }

@@ -119,5 +119,3 @@ "use strict";

regexInverse: (params) => {
//console.log('not-params', params);
params.options = Object.assign({ message: `The value entered is invalid.`, pattern: params.criteria.source, not: true }, params.options);
//console.log('not-params-after', params.options);
return `pwoli.validation.regularExpression(value, messages, ${JSON.stringify(params.options)});`;

@@ -192,7 +190,5 @@ },

clientOptions = this.getClientOptions();
//console.log('af-begin', clientOptions, this.model.activeAttributes());
if (clientOptions !== undefined)
this.form.attributes.push(clientOptions);
}
//console.log('af-begin', this.form.attributes);
const inputId = this.getInputId();

@@ -669,3 +665,2 @@ const attribute = Html_1.default.getAttributeName(this.attribute);

}
//console.log('af-gco', options);
// only get the options that are different from the default ones (set in activeForm.js)

@@ -710,7 +705,5 @@ return Object.assign({ validateOnChange: true, validateOnBlur: true, validateOnType: false, validationDelay: 500, encodeError: true, error: '.help-block', updateAriaInvalid: true }, options);

const params = ormAdapter.getClientValidationParams(criteria);
//console.log('cva', params);
if (Object.keys(params).length > 0)
js += this.clientValidators[validator](params);
}
//console.log('cva-js', js, validator, criteria)
return js;

@@ -717,0 +710,0 @@ }

@@ -229,3 +229,2 @@ "use strict";

attributes = attributes.replace(/\"(function.*?\})\"/g, `$1`).replace(/(\\":?!)|({?!\\")|(\\")/g, '"');
//console.log('af-rcs', attributes);
yield Application_1.default.view.publishAndRegisterFile(path.join(__dirname, '/../assets/css/bootstrap.css'));

@@ -232,0 +231,0 @@ yield Application_1.default.view.publishAndRegisterFile(path.join(__dirname, '/../assets/js/activeForm.js'));

import Model from '../base/Model';
import CollectionView from './CollectionView';
import { Widget } from 'src';
import Widget from '../base/Widget';
/**

@@ -5,0 +5,0 @@ * The ListView widget is used to display data from data

{
"name": "pwoli",
"version": "0.2.0",
"version": "0.2.1",
"description": "",

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

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