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

js-mvc-framework

Package Overview
Dependencies
Maintainers
0
Versions
65
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

js-mvc-framework - npm Package Compare versions

Comparing version 1.3.13 to 1.3.14

demonstrament/documents/test/classes/index.js

43

demonstrament/application.config.js

@@ -28,4 +28,4 @@ import { readFile } from 'node:fs/promises'

files: [
'localhost/**/*',
'static/**/*'
'localhost',
'static'
]

@@ -45,9 +45,4 @@ },

clear: {
target: [
'*.{html,css,js,md,map}',
// '!static-cms', '!test',
],
source: [
'**/*template.js'
],
target: ['*.{html,css,js,md,map}'],
source: ['**/[^$template].js'],
},

@@ -82,3 +77,3 @@ documents: {

output: 'index.html',
watch: ['**/*.{ejs,json}', '!**/\$.ejs'],
watch: ['**/*.{ejs,json}', '!**/\$*.ejs'],
}, {

@@ -90,3 +85,3 @@ type: 'struct',

output: '',
watch: ['**/\$*.ejs', '!index.ejs'],
watch: ['**/\$*.ejs'],
}],

@@ -139,3 +134,3 @@ }

output: '',
watch: ['**/\$*.ejs', '!index.ejs'],
watch: ['**/\$*.ejs'],
}],

@@ -156,3 +151,4 @@ }

source: [
'**/template.js'
'**/template.js',
'!**/$template.js'
],

@@ -182,3 +178,3 @@ },

output: 'index.html',
watch: ['**/*.{ejs,json}', '!**/\$.ejs'],
watch: ['**/*.{ejs,json}', '!**/\$*.ejs'],
}, {

@@ -190,3 +186,3 @@ type: 'struct',

output: '',
watch: ['**/\$*.ejs', '!index.ejs'],
watch: ['**/\$*.ejs'],
}],

@@ -207,3 +203,4 @@ }

source: [
'**/template.js'
'**/template.js',
'!**/$template.js'
],

@@ -217,3 +214,7 @@ },

output: 'index.css',
watch: ['**/*.scss'],
watch: [
'**/*.scss', ,
'../classes/**',
'../coutil/**'
],
}],

@@ -224,3 +225,7 @@ scripts: [{

output: 'index.js',
watch: ['**/*.js'],
watch: [
'**/*.js',
'../classes/**',
'../coutil/**'
],
external: ['/dependencies/mvc-framework.js']

@@ -235,3 +240,3 @@ }],

output: 'index.html',
watch: ['**/*.{ejs,json}', '!**/\$.ejs'],
watch: ['**/*.{ejs,json}', '!**/\$*.ejs'],
}, {

@@ -238,0 +243,0 @@ type: 'struct',

@@ -80,3 +80,2 @@ import './coutil/persist/index.js'

files: this.#settings.browserSync.files,
// logLevel: 'silent',
proxy: {

@@ -83,0 +82,0 @@ target: [

@@ -33,3 +33,3 @@ import * as Paths from './paths/index.js'

$route.ignore[$ignorePathIndex] = path.join(
'!'.concat($route.target), $ignorePath.replace(/^\!/, '')
'!'.concat($route.source), $ignorePath.replace(/^\!/, '')
)

@@ -83,3 +83,2 @@ }

}
console.log(this)
}

@@ -119,4 +118,8 @@ #clear() {

})
watcher.on('add', ($path, $stats) => Pilers.RollupPiler($document))
watcher.on('change', ($path, $stats) => Pilers.RollupPiler($document))
watcher.on('add', ($path, $stats) => {
Pilers.RollupPiler($document)
})
watcher.on('change', ($path, $stats) => {
Pilers.RollupPiler($document)
})
this.#_scripts.push(watcher)

@@ -137,4 +140,8 @@ }

})
watcher.on('add', ($path, $stats) => Pilers.SimulePiler($document, $route, $path))
watcher.on('change', ($path, $stats) => Pilers.SimulePiler($document, $route, $path))
watcher.on('add', ($path, $stats) => {
Pilers.SimulePiler($document, $route, $path)
})
watcher.on('change', ($path, $stats) => {
Pilers.SimulePiler($document, $route, $path)
})
this.#_simules.push(watcher)

@@ -155,4 +162,8 @@ }

})
watcher.on('add', ($path, $stats) => Pilers.EJSPiler($document, $route, $path))
watcher.on('change', ($path, $stats) => Pilers.EJSPiler($document, $route, $path))
watcher.on('add', ($path, $stats) => {
Pilers.EJSPiler($document, $route, $path)
})
watcher.on('change', ($path, $stats) => {
Pilers.EJSPiler($document, $route, $path)
})
this.#_structs.push(watcher)

@@ -173,4 +184,8 @@ }

})
watcher.on('add', ($path, $stats) => Pilers.SASSPiler($document))
watcher.on('change', ($path, $stats) => Pilers.SASSPiler($document))
watcher.on('add', ($path, $stats) => {
Pilers.SASSPiler($document)
})
watcher.on('change', ($path, $stats) => {
Pilers.SASSPiler($document)
})
this.#_styles.push(watcher)

@@ -177,0 +192,0 @@ }

{
"title": "MVC Framework Projects",
"styles": [{
"tag": "link",
"attributes": {
"rel": "stylesheet",
"type": "text/css",
"href": "./index.css"
},
"selfClose": true
}],
"scripts": [{
"tag": "script",
"attributes": {
"type": "module",
"src": "./index.js"
}
}]
"title": "MVC Framework Projects",
"styles": [{
"tag": "link",
"attributes": {
"rel": "stylesheet",
"type": "text/css",
"href": "./index.css"
},
"selfClose": true
}],
"scripts": [{
"tag": "script",
"attributes": {
"type": "module",
"src": "./index.js"
}
}]
}
{
"title": "Static CMS",
"styles": [{
"tag": "link",
"attributes": {
"rel": "stylesheet",
"type": "text/css",
"href": "./index.css"
},
"selfClose": true
}],
"scripts": [{
"tag": "script",
"attributes": {
"type": "module",
"src": "./index.js"
}
}]
"title": "Static CMS",
"metas": [{
"tag": "meta",
"attributes": {
"name": "viewport",
"content": "width=device-width, initial-scale=1.0"
}
}],
"styles": [{
"tag": "link",
"attributes": {
"rel": "stylesheet",
"type": "text/css",
"href": "./index.css"
},
"selfClose": true
}],
"scripts": [{
"tag": "script",
"attributes": {
"type": "module",
"src": "./index.js"
}
}]
}
{
"title": "MVC Framework | Test",
"styles": [{
"tag": "link",
"attributes": {
"rel": "stylesheet",
"type": "text/css",
"href": "./index.css"
},
"selfClose": true
}],
"structure": [{
"tag": "index",
"structure": [{
"tag": "header",
"structure": [{
"tag": "h1",
"textContent": "MVC Framework | Test"
}]
}, {
"tag": "navigation",
"structure": [{
"tag": "a",
"attributes": {
"href": "./schema"
},
"textContent": "Schema Test"
}]
}]
}],
"scripts": [{
"tag": "script",
"attributes": {
"type": "module",
"src": "./index.js"
}
}]
"title": "MVC Framework | Test",
"styles": [{
"tag": "link",
"attributes": {
"rel": "stylesheet",
"type": "text/css",
"href": "./index.css"
},
"selfClose": true
}],
"structure": [{
"tag": "index",
"structure": [{
"tag": "header",
"structure": [{
"tag": "h1",
"textContent": "MVC Framework | Test"
}]
}, {
"tag": "navigation",
"structure": [{
"tag": "a",
"attributes": {
"href": "./schema"
},
"textContent": "Schema Test"
}]
}]
}],
"scripts": [{
"tag": "script",
"attributes": {
"type": "module",
"src": "./index.js"
}
}]
}

@@ -1,26 +0,7 @@

import * as Logs from "../coutil/logs/index.js"
import * as Tests from "./tests/index.js"
import Test from "../coutil/test/index.js"
import { Schema, Coutil } from '/dependencies/mvc-framework.js'
const { expandTree } = Coutil
const validation = {}
const tests = {}
iterateTestGroups:
for(const [$testGroupID, $testGroup] of Object.entries(Tests).reverse()) {
console.log(
"\n", "-----",
)
tests[$testGroupID] = {}
iterateTests:
for(const [$testID, $testSettings] of Object.entries($testGroup).reverse()) {
const test = new Test($testSettings).execute()
tests[$testGroupID][$testID] = test
console.log(
"\n", [test.groupID, test.id].join("."),
"\n", ["pass", test.pass].join(" "),
"\n", test.group,
"\n", test.name,
"\n", test
)
}
}
import { TestResults } from "../classes/index.js"
import Tests from "./tests/index.js"
const testResults = new TestResults({
parent: document.querySelector('index'),
model: Tests,
}).render()
{
"title": "MVC Framework | Test | Schema",
"styles": [{
"tag": "link",
"attributes": {
"rel": "stylesheet",
"type": "text/css",
"href": "./index.css"
},
"selfClose": true
}],
"structure": [{
"tag": "index",
"structure": [{
"tag": "header",
"structure": [{
"tag": "h1",
"textContent": "MVC Framework | Test | Schema"
}]
}]
}],
"scripts": [{
"tag": "script",
"attributes": {
"type": "module",
"src": "./index.js"
}
}]
"title": "MVC Framework | Schema",
"metas": [{
"tag": "meta",
"attributes": {
"name": "viewport",
"content": "width=device-width, initial-scale=1.0"
}
}],
"styles": [{
"tag": "link",
"attributes": {
"rel": "stylesheet",
"type": "text/css",
"href": "./index.css"
},
"selfClose": true
}],
"structure": [{
"tag": "index"
}],
"scripts": [{
"tag": "script",
"attributes": {
"type": "module",
"src": "./index.js"
}
}]
}

@@ -6,8 +6,14 @@ import testA from './testA.js'

import testE from './testE.js'
export {
testA,
testB,
testC,
testD,
testE,
export default {
id: "groupA",
name: "Validate Property: Literals",
type: 'test-group',
collectName: 'tests',
collect: new Map([
['testA', testA],
['testB', testB],
['testC', testC],
['testD', testD],
['testE', testE],
]),
}

@@ -5,6 +5,8 @@ import { Schema, Coutil } from '/dependencies/mvc-framework.js'

id: "testA",
groupID: "groupA",
group: "Validate Property: Literals",
name: "Property Value Type: Boolean",
descript: `When schema property type is boolean validate only content property values that are booleans.`,
name: "Type: Boolean",
type: "test-result",
collectName: 'detail',
collect: new Map([
[0, `When schema property type is boolean validate only content property values that are booleans.`],
]),
method: function() {

@@ -11,0 +13,0 @@ const schema = new Schema({

@@ -5,6 +5,8 @@ import { Schema, Coutil } from '/dependencies/mvc-framework.js'

id: "testB",
groupID: "groupA",
group: "Validate Property: Literals",
name: "Property Value Type: Number - Range Validator",
descript: `When schema property type is number validate only content property values that are numbers.`,
name: "Type: Number - Range Validator",
type: "test-result",
collectName: 'detail',
collect: new Map([
[0, `When schema property type is number validate only content property values that are numbers.`],
]),
method: function() {

@@ -11,0 +13,0 @@ const schema = new Schema({

@@ -5,9 +5,9 @@ import { Schema, Coutil } from '/dependencies/mvc-framework.js'

id: "testC",
groupID: "groupA",
group: "Validate Property: Literals",
name: "Property Value Type: String - Length Validator",
descript: `
- When schema property type is string validate only content property values that are strings.
- When schema property minimum and/or maximum length (minLength, maxLength) defined validate only content property values with length inside range.
`.trim(),
name: "Type: String: Length Validator",
type: "test-result",
collectName: 'detail',
collect: new Map([
[0, ` - When schema property type is string validate only content property values that are strings. `],
[1, ` - When schema property minimum and/or maximum length (minLength, maxLength) defined validate only content property values with length inside range.`],
]),
method: function() {

@@ -14,0 +14,0 @@ const schema = new Schema({

@@ -5,6 +5,8 @@ import { Schema, Coutil } from '/dependencies/mvc-framework.js'

id: "testD",
groupID: "groupA",
group: "Validate Property: Literals",
name: "Property Value Type: Enum Validator",
descript: `When schema property enum defined validate any boolean, number, or string content property value against array of enumerated values.`,
name: "Type: Enum Validator",
type: "test-result",
collectName: 'detail',
collect: new Map([
[0, `When schema property enum defined validate any boolean, number, or string content property value against array of enumerated values.`],
]),
method: function() {

@@ -11,0 +13,0 @@ const schemaA = new Schema({

@@ -5,6 +5,8 @@ import { Schema, Coutil } from '/dependencies/mvc-framework.js'

id: "testE",
groupID: "groupA",
group: "Validate Property: Literals",
name: "Property Value Type: Undefined",
descript: `When schema property type is undefined validate content property values that are numbers, strings, booleans.`,
name: "Type: Undefined",
type: 'test-result',
collectName: 'detail',
collect: new Map([
[0, `When schema property type is undefined validate content property values that are numbers, strings, booleans.`,]
]),
method: function() {

@@ -11,0 +13,0 @@ const schema = new Schema({

import testA from './testA.js'
import testB from './testB.js'
// import testC from './testC.js'
export {
testA,
testB,
// testC,
export default {
id: "groupB",
name: "Validation: Monodimensional Properties",
type: 'test-group',
collectName: 'tests',
collect: new Map([
['testA', testA],
['testB', testB],
]),
}
import { Schema, Coutil } from '/dependencies/mvc-framework.js'
const { expandTree } = Coutil
export default {
id: "testA",
groupID: "groupB",
group: "Validation: Monodimensional Properties",
name: "Validation Type: Object",
descript: `When validation type is "object" all properties must pass validation to assign values.`,
id: 'testA',
name: 'Validation Type: Object',
type: 'test-result',
collectName: 'detail',
collect: new Map([
[0, `When validation type is 'object' all properties must pass validation to assign values.`],
]),
method: function() {

@@ -17,10 +19,10 @@ const schema = new Schema({

}, {
validationType: "object"
validationType: 'object'
})
const contentA = {
propertyA: "11111",
propertyA: '11111',
propertyB: false,
propertyC: 33333,
propertyD: null,
propertyE: "55555",
propertyE: '55555',
} // true

@@ -30,3 +32,3 @@ const contentB = {

propertyB: false,
propertyC: "33333",
propertyC: '33333',
propertyD: null,

@@ -36,12 +38,12 @@ propertyE: 55555,

const contentC = {
propertyA: "11111",
propertyB: "false",
propertyA: '11111',
propertyB: 'false',
propertyC: 33333,
propertyD: "null",
propertyE: "55555"
propertyD: 'null',
propertyE: '55555'
} // false
const contentD = {
propertyA: false,
propertyB: "true",
propertyC: "33333",
propertyB: 'true',
propertyC: '33333',
propertyD: 44444,

@@ -51,6 +53,6 @@ propertyE: undefined,

const contentE = {
propertyA: "111111",
propertyB: "true",
propertyC: "33333",
propertyD: "44444",
propertyA: '111111',
propertyB: 'true',
propertyC: '33333',
propertyD: '44444',
propertyE: undefined,

@@ -57,0 +59,0 @@ } // false

@@ -5,6 +5,8 @@ import { Schema, Coutil } from '/dependencies/mvc-framework.js'

id: "testB",
groupID: "groupB",
group: "Validation: Monodimensional Properties",
name: "Validation Type: Primitive",
descript: `When validation type is "primitive" only valid properties values assigned.`,
type: 'test-result',
collectName: 'detail',
collect: new Map([
[0, `When validation type is "primitive" only valid properties values assigned.`],
]),
method: function() {

@@ -11,0 +13,0 @@ const schema = new Schema({

@@ -1,3 +0,3 @@

import * as groupA from './groupA/index.js'
import * as groupB from './groupB/index.js'
import groupA from './groupA/index.js'
import groupB from './groupB/index.js'

@@ -20,5 +20,11 @@ /*

export {
groupA,
groupB
export default {
id: "schema",
name: "MVC Framework | Schema",
type: 'test-results',
collectName: 'test-groups',
collect: new Map([
['groupA', groupA],
['groupB', groupB],
])
}

@@ -7,2 +7,4 @@ import Core from '../Core/index.js'

#_parent
#_element
#_children = []
#_template

@@ -18,2 +20,24 @@ #_querySelectors = {}

get parent() { return this.settings.parent }
get element() {
if(this.#_element !== undefined) { return this.#_element }
this.#_element = document.createElement('element')
return this.#_element
}
set element($documentFragment) {
this.disableEvents()
this.disableQuerySelectors()
this.children = $documentFragment.childNodes
this.#_querySelectors = undefined
this.element.replaceChildren(...this.children)
this.enableQuerySelectors()
this.enableEvents()
this.parent.append(...this.children)
}
get children() { return this.#_children }
set children($children) {
const children = this.#_children
children.forEach(($child) => $child.parent.removeChild($child))
children.length = 0
children.push(...$children)
}
get template() {

@@ -78,15 +102,6 @@ if(this.#_template !== undefined) return this.#_template

render($model, $template = 'default') {
this.disableEvents()
this.disableQuerySelectors()
const preelement = this.element
this.template.innerHTML = this.settings.templates[$template]($model)
this.element = this.template.content.childNodes
if(preelement?.length) {
for(const $preelement of preelement) { $preelement.remove() }
}
this.parent.append(...this.element)
this.enableQuerySelectors()
this.enableEvents()
this.element = this.template.content
return this
}
}
{
"name": "js-mvc-framework",
"author": "Thomas Patrick Welborn",
"version": "1.3.13",
"version": "1.3.14",
"type": "module",

@@ -6,0 +6,0 @@ "scripts": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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