@teleporthq/teleport-uidl-validator
Advanced tools
Comparing version 0.31.0-alpha.0 to 0.32.0-alpha.0
@@ -36,2 +36,12 @@ "use strict"; | ||
items: (0, json_type_validation_1.optional)((0, json_type_validation_1.dict)((0, json_type_validation_1.lazy)(function () { return utils_1.resourceItemDecoder; }))), | ||
cache: (0, json_type_validation_1.withDefault)({ | ||
revalidate: 60, | ||
webhook: null, | ||
}, (0, json_type_validation_1.object)({ | ||
revalidate: (0, json_type_validation_1.optional)((0, json_type_validation_1.number)()), | ||
webhook: (0, json_type_validation_1.optional)((0, json_type_validation_1.object)({ | ||
name: (0, json_type_validation_1.string)(), | ||
dependency: (0, json_type_validation_1.lazy)(function () { return utils_1.dependencyDecoder; }), | ||
})), | ||
})), | ||
}); | ||
@@ -38,0 +48,0 @@ exports.projectUIDLDecoder = (0, json_type_validation_1.object)({ |
@@ -72,2 +72,3 @@ "use strict"; | ||
}), | ||
cache: (0, json_type_validation_1.optional)((0, json_type_validation_1.object)({ revalidate: (0, json_type_validation_1.number)() })), | ||
}); | ||
@@ -74,0 +75,0 @@ exports.initialPathsDecoder = (0, json_type_validation_1.object)({ |
@@ -1,3 +0,3 @@ | ||
import { object, optional, string, dict, array, lazy, } from '@mojotech/json-type-validation'; | ||
import { globalAssetsDecoder, resourceItemDecoder, resourceMapperDecoder } from './utils'; | ||
import { object, optional, string, dict, array, lazy, withDefault, number, } from '@mojotech/json-type-validation'; | ||
import { globalAssetsDecoder, resourceItemDecoder, resourceMapperDecoder, dependencyDecoder, } from './utils'; | ||
import { componentUIDLDecoder, rootComponentUIDLDecoder } from './component-decoder'; | ||
@@ -33,2 +33,12 @@ export var webManifestDecoder = object({ | ||
items: optional(dict(lazy(function () { return resourceItemDecoder; }))), | ||
cache: withDefault({ | ||
revalidate: 60, | ||
webhook: null, | ||
}, object({ | ||
revalidate: optional(number()), | ||
webhook: optional(object({ | ||
name: string(), | ||
dependency: lazy(function () { return dependencyDecoder; }), | ||
})), | ||
})), | ||
}); | ||
@@ -35,0 +45,0 @@ export var projectUIDLDecoder = object({ |
@@ -68,2 +68,3 @@ import { object, string, dict, constant, number, optional, union, boolean, array, lazy, oneOf, intersection, withDefault, anyJson, } from '@mojotech/json-type-validation'; | ||
}), | ||
cache: optional(object({ revalidate: number() })), | ||
}); | ||
@@ -70,0 +71,0 @@ export var initialPathsDecoder = object({ |
{ | ||
"name": "@teleporthq/teleport-uidl-validator", | ||
"version": "0.31.0-alpha.0", | ||
"version": "0.32.0-alpha.0", | ||
"description": "A module that offers validation and parsing for non-standard UIDL structures", | ||
@@ -28,6 +28,6 @@ "author": "teleportHQ", | ||
"@mojotech/json-type-validation": "^3.1.0", | ||
"@teleporthq/teleport-shared": "^0.31.0-alpha.0", | ||
"@teleporthq/teleport-types": "^0.31.0-alpha.0" | ||
"@teleporthq/teleport-shared": "^0.32.0-alpha.0", | ||
"@teleporthq/teleport-types": "^0.32.0-alpha.0" | ||
}, | ||
"gitHead": "a5289f88f2d0cf8aae4b93bf05777c5492dd86b2" | ||
"gitHead": "de47527436cc4f1d00f241718fbdfdb86e616e3b" | ||
} |
@@ -9,2 +9,4 @@ import { | ||
lazy, | ||
withDefault, | ||
number, | ||
} from '@mojotech/json-type-validation' | ||
@@ -17,3 +19,8 @@ import { | ||
} from '@teleporthq/teleport-types' | ||
import { globalAssetsDecoder, resourceItemDecoder, resourceMapperDecoder } from './utils' | ||
import { | ||
globalAssetsDecoder, | ||
resourceItemDecoder, | ||
resourceMapperDecoder, | ||
dependencyDecoder, | ||
} from './utils' | ||
import { componentUIDLDecoder, rootComponentUIDLDecoder } from './component-decoder' | ||
@@ -54,2 +61,17 @@ | ||
items: optional(dict(lazy(() => resourceItemDecoder))), | ||
cache: withDefault( | ||
{ | ||
revalidate: 60, | ||
webhook: null, | ||
}, | ||
object({ | ||
revalidate: optional(number()), | ||
webhook: optional( | ||
object({ | ||
name: string(), | ||
dependency: lazy(() => dependencyDecoder), | ||
}) | ||
), | ||
}) | ||
), | ||
}) | ||
@@ -56,0 +78,0 @@ |
@@ -182,2 +182,3 @@ import { | ||
}), | ||
cache: optional(object({ revalidate: number() })), | ||
}) | ||
@@ -184,0 +185,0 @@ |
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
503768
8135
+ Added@teleporthq/teleport-shared@0.32.10(transitive)
+ Added@teleporthq/teleport-types@0.32.10(transitive)
- Removed@teleporthq/teleport-shared@0.31.3(transitive)
- Removed@teleporthq/teleport-types@0.31.0(transitive)