aboutsummaryrefslogtreecommitdiff
path: root/node_modules/js-yaml/lib/js-yaml/schema
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/js-yaml/lib/js-yaml/schema')
-rw-r--r--node_modules/js-yaml/lib/js-yaml/schema/core.js18
-rw-r--r--node_modules/js-yaml/lib/js-yaml/schema/default_full.js25
-rw-r--r--node_modules/js-yaml/lib/js-yaml/schema/default_safe.js28
-rw-r--r--node_modules/js-yaml/lib/js-yaml/schema/failsafe.js17
-rw-r--r--node_modules/js-yaml/lib/js-yaml/schema/json.js25
5 files changed, 113 insertions, 0 deletions
diff --git a/node_modules/js-yaml/lib/js-yaml/schema/core.js b/node_modules/js-yaml/lib/js-yaml/schema/core.js
new file mode 100644
index 0000000..206daab
--- /dev/null
+++ b/node_modules/js-yaml/lib/js-yaml/schema/core.js
@@ -0,0 +1,18 @@
+// Standard YAML's Core schema.
+// http://www.yaml.org/spec/1.2/spec.html#id2804923
+//
+// NOTE: JS-YAML does not support schema-specific tag resolution restrictions.
+// So, Core schema has no distinctions from JSON schema is JS-YAML.
+
+
+'use strict';
+
+
+var Schema = require('../schema');
+
+
+module.exports = new Schema({
+ include: [
+ require('./json')
+ ]
+});
diff --git a/node_modules/js-yaml/lib/js-yaml/schema/default_full.js b/node_modules/js-yaml/lib/js-yaml/schema/default_full.js
new file mode 100644
index 0000000..a55ef42
--- /dev/null
+++ b/node_modules/js-yaml/lib/js-yaml/schema/default_full.js
@@ -0,0 +1,25 @@
+// JS-YAML's default schema for `load` function.
+// It is not described in the YAML specification.
+//
+// This schema is based on JS-YAML's default safe schema and includes
+// JavaScript-specific types: !!js/undefined, !!js/regexp and !!js/function.
+//
+// Also this schema is used as default base schema at `Schema.create` function.
+
+
+'use strict';
+
+
+var Schema = require('../schema');
+
+
+module.exports = Schema.DEFAULT = new Schema({
+ include: [
+ require('./default_safe')
+ ],
+ explicit: [
+ require('../type/js/undefined'),
+ require('../type/js/regexp'),
+ require('../type/js/function')
+ ]
+});
diff --git a/node_modules/js-yaml/lib/js-yaml/schema/default_safe.js b/node_modules/js-yaml/lib/js-yaml/schema/default_safe.js
new file mode 100644
index 0000000..11d89bb
--- /dev/null
+++ b/node_modules/js-yaml/lib/js-yaml/schema/default_safe.js
@@ -0,0 +1,28 @@
+// JS-YAML's default schema for `safeLoad` function.
+// It is not described in the YAML specification.
+//
+// This schema is based on standard YAML's Core schema and includes most of
+// extra types described at YAML tag repository. (http://yaml.org/type/)
+
+
+'use strict';
+
+
+var Schema = require('../schema');
+
+
+module.exports = new Schema({
+ include: [
+ require('./core')
+ ],
+ implicit: [
+ require('../type/timestamp'),
+ require('../type/merge')
+ ],
+ explicit: [
+ require('../type/binary'),
+ require('../type/omap'),
+ require('../type/pairs'),
+ require('../type/set')
+ ]
+});
diff --git a/node_modules/js-yaml/lib/js-yaml/schema/failsafe.js b/node_modules/js-yaml/lib/js-yaml/schema/failsafe.js
new file mode 100644
index 0000000..b7a33eb
--- /dev/null
+++ b/node_modules/js-yaml/lib/js-yaml/schema/failsafe.js
@@ -0,0 +1,17 @@
+// Standard YAML's Failsafe schema.
+// http://www.yaml.org/spec/1.2/spec.html#id2802346
+
+
+'use strict';
+
+
+var Schema = require('../schema');
+
+
+module.exports = new Schema({
+ explicit: [
+ require('../type/str'),
+ require('../type/seq'),
+ require('../type/map')
+ ]
+});
diff --git a/node_modules/js-yaml/lib/js-yaml/schema/json.js b/node_modules/js-yaml/lib/js-yaml/schema/json.js
new file mode 100644
index 0000000..5be3dbf
--- /dev/null
+++ b/node_modules/js-yaml/lib/js-yaml/schema/json.js
@@ -0,0 +1,25 @@
+// Standard YAML's JSON schema.
+// http://www.yaml.org/spec/1.2/spec.html#id2803231
+//
+// NOTE: JS-YAML does not support schema-specific tag resolution restrictions.
+// So, this schema is not such strict as defined in the YAML specification.
+// It allows numbers in binary notaion, use `Null` and `NULL` as `null`, etc.
+
+
+'use strict';
+
+
+var Schema = require('../schema');
+
+
+module.exports = new Schema({
+ include: [
+ require('./failsafe')
+ ],
+ implicit: [
+ require('../type/null'),
+ require('../type/bool'),
+ require('../type/int'),
+ require('../type/float')
+ ]
+});