/
var
/
www
/
greso.tech
/
server
/
nsm
/
node_modules
/
catharsis
/
lib
/
/var/www/greso.tech/server/nsm/node_modules/catharsis/lib
mkdir
upload
Name
Size
Mode
Actions
describe.js
16495
0644
edit
dl
rm
parser.js
262802
0644
edit
dl
rm
schema.js
1476
0644
edit
dl
rm
stringify.js
6656
0644
edit
dl
rm
types.js
654
0644
edit
dl
rm
Edit:
/var/www/greso.tech/server/nsm/node_modules/catharsis/lib/schema.js
(1476B)
const _ = require('lodash'); // JSON schema types const ARRAY = 'array'; const BOOLEAN = 'boolean'; const OBJECT = 'object'; const STRING = 'string'; const BOOLEAN_SCHEMA = { type: BOOLEAN }; const STRING_SCHEMA = { type: STRING }; const TYPES = require('./types'); const TYPE_NAMES = _.values(TYPES); module.exports = { type: OBJECT, additionalProperties: false, properties: { type: { type: STRING, enum: TYPE_NAMES }, // field type key: { '$ref': '#' }, value: { '$ref': '#' }, // function type params: { type: ARRAY, items: { '$ref': '#' } }, 'new': { '$ref': '#' }, 'this': { '$ref': '#' }, result: {'$ref': '#' }, // name expression name: STRING_SCHEMA, // record type fields: { type: ARRAY, items: { '$ref': '#' } }, // type application expression: { '$ref': '#' }, applications: { type: ARRAY, minItems: 1, maxItems: 2, items: { '$ref': '#' } }, // type union elements: { type: ARRAY, minItems: 1, items: { '$ref': '#' } }, optional: BOOLEAN_SCHEMA, nullable: BOOLEAN_SCHEMA, repeatable: BOOLEAN_SCHEMA, reservedWord: BOOLEAN_SCHEMA }, required: ['type'] };
Save
cmd:
run