@hestia-earth/schema-validation 37.3.0 → 37.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/esm/validate.js CHANGED
@@ -18,7 +18,7 @@ var __rest = (this && this.__rest) || function (s, e) {
18
18
  }
19
19
  return t;
20
20
  };
21
- import * as Ajv from 'ajv';
21
+ import Ajv from 'ajv';
22
22
  import { isTypeNode } from '@hestia-earth/schema';
23
23
  import { loadSchemas } from '@hestia-earth/json-schema';
24
24
  import { init as initValidators } from './validators';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hestia-earth/schema-validation",
3
- "version": "37.3.0",
3
+ "version": "37.3.1",
4
4
  "description": "HESTIA Schema Validation",
5
5
  "main": "index.js",
6
6
  "typings": "index.d.ts",
package/validate.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import * as Ajv from 'ajv';
1
+ import Ajv from 'ajv';
2
2
  import { SchemaType, JSON as HestiaJson } from '@hestia-earth/schema';
3
3
  import { definitions } from '@hestia-earth/json-schema';
4
4
  /**
package/validate.js CHANGED
@@ -57,9 +57,12 @@ var __rest = (this && this.__rest) || function (s, e) {
57
57
  }
58
58
  return t;
59
59
  };
60
+ var __importDefault = (this && this.__importDefault) || function (mod) {
61
+ return (mod && mod.__esModule) ? mod : { "default": mod };
62
+ };
60
63
  Object.defineProperty(exports, "__esModule", { value: true });
61
64
  exports.validator = exports.initAjv = exports.validateContent = void 0;
62
- var Ajv = require("ajv");
65
+ var ajv_1 = __importDefault(require("ajv"));
63
66
  var schema_1 = require("@hestia-earth/schema");
64
67
  var json_schema_1 = require("@hestia-earth/json-schema");
65
68
  var validators_1 = require("./validators");
@@ -111,7 +114,7 @@ var validateContent = function (ajv, schemas) { return function (content) { retu
111
114
  }); }; };
112
115
  exports.validateContent = validateContent;
113
116
  var initAjv = function () {
114
- var ajv = new Ajv({
117
+ var ajv = new ajv_1.default({
115
118
  schemaId: 'auto',
116
119
  allErrors: true,
117
120
  verbose: true
@@ -10,6 +10,29 @@ var __assign = (this && this.__assign) || function () {
10
10
  };
11
11
  return __assign.apply(this, arguments);
12
12
  };
13
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ var desc = Object.getOwnPropertyDescriptor(m, k);
16
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
17
+ desc = { enumerable: true, get: function() { return m[k]; } };
18
+ }
19
+ Object.defineProperty(o, k2, desc);
20
+ }) : (function(o, m, k, k2) {
21
+ if (k2 === undefined) k2 = k;
22
+ o[k2] = m[k];
23
+ }));
24
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
25
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
26
+ }) : function(o, v) {
27
+ o["default"] = v;
28
+ });
29
+ var __importStar = (this && this.__importStar) || function (mod) {
30
+ if (mod && mod.__esModule) return mod;
31
+ var result = {};
32
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
33
+ __setModuleDefault(result, mod);
34
+ return result;
35
+ };
13
36
  var __read = (this && this.__read) || function (o, n) {
14
37
  var m = typeof Symbol === "function" && o[Symbol.iterator];
15
38
  if (!m) return o;
@@ -28,7 +51,7 @@ var __read = (this && this.__read) || function (o, n) {
28
51
  };
29
52
  Object.defineProperty(exports, "__esModule", { value: true });
30
53
  exports.init = exports.validate = exports.keyword = void 0;
31
- var gjv = require("geojson-validation");
54
+ var gjv = __importStar(require("geojson-validation"));
32
55
  exports.keyword = 'geojson';
33
56
  var invalidCoordinatesError = 'invalid coordinates';
34
57
  var maxLongitude = 180;