New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@teleporthq/teleport-uidl-validator

Package Overview
Dependencies
Maintainers
5
Versions
122
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@teleporthq/teleport-uidl-validator - npm Package Compare versions

Comparing version 0.29.0-alpha.0 to 0.30.0-alpha.0

3

dist/cjs/decoders/utils.d.ts
import { Decoder } from '@mojotech/json-type-validation';
import { UIDLStaticValue, ReferenceType, UIDLDynamicReference, UIDLPropDefinition, UIDLStateDefinition, UIDLStateValueDetails, UIDLPageOptions, UIDLComponentOutputOptions, UIDLDependency, UIDLStyleDefinitions, UIDLStyleValue, UIDLAttributeValue, UIDLEventHandlerStatement, UIDLMailLinkNode, UIDLPhoneLinkNode, UIDLRawValue, UIDLElementStyleStates, UIDLStyleStateCondition, UIDLStyleMediaQueryScreenSizeCondition, UIDLStyleConditions, UIDLElementNodeProjectReferencedStyle, VUIDLComponentSEO, VUIDLGlobalAsset, UIDLExternalDependency, UIDLLocalDependency, UIDLPeerDependency, UIDLImportReference, UIDLStyleSetTokenReference, VUIDLStyleSetDefnition, VUIDLElement, VUIDLSlotNode, VUIDLConditionalNode, VUIDLRepeatNode, VUIDLElementNode, VUIDLNode, VUIDLElementNodeInlineReferencedStyle, VUIDLSectionLinkNode, VUIDLLinkNode, VUIDLURLLinkNode, VUIDLStyleSetConditions, VUIDLStyleSetMediaCondition, VUIDLStyleSetStateCondition, VUIDLDesignTokens, UIDLPropCallEvent, UIDLStateModifierEvent, UIDLScriptExternalAsset, UIDLScriptInlineAsset, VUIDLStyleInlineAsset, UIDLStyleExternalAsset, VUIDLFontAsset, UIDLCanonicalAsset, UIDLIconAsset, UIDLAssetBase, VUIDLElementNodeClassReferencedStyle, UIDLCompDynamicReference, UIDLComponentStyleReference, PagePaginationOptions, VCMSItemUIDLElementNode, VCMSListUIDLElementNode, UIDLInitialPathsData, UIDLInitialPropsData, UIDLExpressionValue, UIDLDynamicLinkNode, UIDLENVValue, UIDLPropValue, UIDLResourceItem, VUIDLNavLinkNode, VUIDLDateTimeNode } from '@teleporthq/teleport-types';
import { UIDLStaticValue, ReferenceType, UIDLDynamicReference, UIDLPropDefinition, UIDLStateDefinition, UIDLStateValueDetails, UIDLPageOptions, UIDLComponentOutputOptions, UIDLDependency, UIDLStyleDefinitions, UIDLStyleValue, UIDLAttributeValue, UIDLEventHandlerStatement, UIDLMailLinkNode, UIDLPhoneLinkNode, UIDLRawValue, UIDLElementStyleStates, UIDLStyleStateCondition, UIDLStyleMediaQueryScreenSizeCondition, UIDLStyleConditions, UIDLElementNodeProjectReferencedStyle, VUIDLComponentSEO, VUIDLGlobalAsset, UIDLExternalDependency, UIDLLocalDependency, UIDLPeerDependency, UIDLImportReference, UIDLStyleSetTokenReference, VUIDLStyleSetDefnition, VUIDLElement, VUIDLSlotNode, VUIDLConditionalNode, VUIDLRepeatNode, VUIDLElementNode, VUIDLNode, VUIDLElementNodeInlineReferencedStyle, VUIDLSectionLinkNode, VUIDLLinkNode, VUIDLURLLinkNode, VUIDLStyleSetConditions, VUIDLStyleSetMediaCondition, VUIDLStyleSetStateCondition, VUIDLDesignTokens, UIDLPropCallEvent, UIDLStateModifierEvent, UIDLScriptExternalAsset, UIDLScriptInlineAsset, VUIDLStyleInlineAsset, UIDLStyleExternalAsset, VUIDLFontAsset, UIDLCanonicalAsset, UIDLIconAsset, UIDLAssetBase, VUIDLElementNodeClassReferencedStyle, UIDLCompDynamicReference, UIDLComponentStyleReference, PagePaginationOptions, VCMSItemUIDLElementNode, VCMSListUIDLElementNode, UIDLInitialPathsData, UIDLInitialPropsData, UIDLExpressionValue, UIDLDynamicLinkNode, UIDLENVValue, UIDLPropValue, UIDLResourceItem, VUIDLNavLinkNode, VUIDLDateTimeNode, UIDLStateValue } from '@teleporthq/teleport-types';
export declare const referenceTypeDecoder: Decoder<ReferenceType>;

@@ -10,2 +10,3 @@ export declare const dynamicValueDecoder: Decoder<UIDLDynamicReference>;

export declare const dyamicFunctionParam: Decoder<UIDLPropValue>;
export declare const dyamicFunctionStateParam: Decoder<UIDLStateValue>;
export declare const resourceItemDecoder: Decoder<UIDLResourceItem>;

@@ -12,0 +13,0 @@ export declare const initialPropsDecoder: Decoder<UIDLInitialPropsData>;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.phoneLinkNodeDecoder = exports.uidlMailLinkNodeDecoder = exports.navLinkNodeDecoder = exports.sectionLinkNodeDecoder = exports.dynamicLinkDecoder = exports.urlLinkNodeDecoder = exports.stateChangeEventDecoder = exports.propCallEventDecoder = exports.eventHandlerStatementDecoder = exports.styleDefinitionsDecoder = exports.styleValueDecoder = exports.uidlComponentStyleReference = exports.attributeValueDecoder = exports.importReferenceDecoder = exports.dependencyDecoder = exports.localDependencyDecoder = exports.externaldependencyDecoder = exports.peerDependencyDecoder = exports.outputOptionsDecoder = exports.stateValueDetailsDecoder = exports.pageOptionsDecoder = exports.stateDefinitionsDecoder = exports.pageOptionsPaginationDecoder = exports.propDefinitionsDecoder = exports.componentSeoDecoder = exports.iconAssetDecoder = exports.canonicalAssetDecoder = exports.fontAssetDecoder = exports.externalStyleAssetDecoder = exports.inlineStyletAssetDecoder = exports.externalScriptAssetDecoder = exports.inlineScriptAssetDecoder = exports.baseAssetDecoder = exports.globalAssetsDecoder = exports.stateOrPropDefinitionDecoder = exports.styleSetDefinitionDecoder = exports.tokenReferenceDecoder = exports.projectStyleConditionsDecoder = exports.styleSetStateConditionDecoder = exports.styleSetMediaConditionDecoder = exports.initialPathsDecoder = exports.initialPropsDecoder = exports.resourceItemDecoder = exports.dyamicFunctionParam = exports.envValueDecoder = exports.rawValueDecoder = exports.staticValueDecoder = exports.expressionValueDecoder = exports.dynamicValueDecoder = exports.referenceTypeDecoder = void 0;
exports.uidlNodeDecoder = exports.cmsListNodeDecoder = exports.cmsItemNodeDecoder = exports.dateTimeNodeDecoder = exports.elementNodeDecoder = exports.conditionalNodeDecoder = exports.repeatNodeDecoder = exports.slotNodeDecoder = exports.elementDecoder = exports.designTokensDecoder = exports.elementComponentReferencedStyle = exports.classDynamicReferenceDecoder = exports.elementInlineReferencedStyle = exports.elementProjectReferencedStyle = exports.styleConditionsDecoder = exports.elementStyleWithMediaConditionDecoder = exports.elementStyleWithStateConditionDecoder = exports.elementStateDecoder = exports.uidlLinkNodeDecoder = void 0;
exports.uidlMailLinkNodeDecoder = exports.navLinkNodeDecoder = exports.sectionLinkNodeDecoder = exports.dynamicLinkDecoder = exports.urlLinkNodeDecoder = exports.stateChangeEventDecoder = exports.propCallEventDecoder = exports.eventHandlerStatementDecoder = exports.styleDefinitionsDecoder = exports.styleValueDecoder = exports.uidlComponentStyleReference = exports.attributeValueDecoder = exports.importReferenceDecoder = exports.dependencyDecoder = exports.localDependencyDecoder = exports.externaldependencyDecoder = exports.peerDependencyDecoder = exports.outputOptionsDecoder = exports.stateValueDetailsDecoder = exports.pageOptionsDecoder = exports.stateDefinitionsDecoder = exports.pageOptionsPaginationDecoder = exports.propDefinitionsDecoder = exports.componentSeoDecoder = exports.iconAssetDecoder = exports.canonicalAssetDecoder = exports.fontAssetDecoder = exports.externalStyleAssetDecoder = exports.inlineStyletAssetDecoder = exports.externalScriptAssetDecoder = exports.inlineScriptAssetDecoder = exports.baseAssetDecoder = exports.globalAssetsDecoder = exports.stateOrPropDefinitionDecoder = exports.styleSetDefinitionDecoder = exports.tokenReferenceDecoder = exports.projectStyleConditionsDecoder = exports.styleSetStateConditionDecoder = exports.styleSetMediaConditionDecoder = exports.initialPathsDecoder = exports.initialPropsDecoder = exports.resourceItemDecoder = exports.dyamicFunctionStateParam = exports.dyamicFunctionParam = exports.envValueDecoder = exports.rawValueDecoder = exports.staticValueDecoder = exports.expressionValueDecoder = exports.dynamicValueDecoder = exports.referenceTypeDecoder = void 0;
exports.uidlNodeDecoder = exports.cmsListNodeDecoder = exports.cmsItemNodeDecoder = exports.dateTimeNodeDecoder = exports.elementNodeDecoder = exports.conditionalNodeDecoder = exports.repeatNodeDecoder = exports.slotNodeDecoder = exports.elementDecoder = exports.designTokensDecoder = exports.elementComponentReferencedStyle = exports.classDynamicReferenceDecoder = exports.elementInlineReferencedStyle = exports.elementProjectReferencedStyle = exports.styleConditionsDecoder = exports.elementStyleWithMediaConditionDecoder = exports.elementStyleWithStateConditionDecoder = exports.elementStateDecoder = exports.uidlLinkNodeDecoder = exports.phoneLinkNodeDecoder = void 0;
var json_type_validation_1 = require("@mojotech/json-type-validation");

@@ -40,2 +40,9 @@ var custom_combinators_1 = require("./custom-combinators");

});
exports.dyamicFunctionStateParam = (0, json_type_validation_1.object)({
type: (0, json_type_validation_1.constant)('dynamic'),
content: (0, json_type_validation_1.object)({
referenceType: (0, json_type_validation_1.constant)('state'),
id: (0, json_type_validation_1.string)(),
}),
});
exports.resourceItemDecoder = (0, json_type_validation_1.object)({

@@ -51,5 +58,5 @@ name: (0, json_type_validation_1.string)(),

mappers: (0, json_type_validation_1.withDefault)([], (0, json_type_validation_1.array)((0, json_type_validation_1.string)())),
params: (0, json_type_validation_1.optional)((0, json_type_validation_1.dict)((0, json_type_validation_1.union)(exports.staticValueDecoder, exports.dyamicFunctionParam))),
params: (0, json_type_validation_1.optional)((0, json_type_validation_1.dict)((0, json_type_validation_1.union)(exports.staticValueDecoder, exports.dyamicFunctionParam, exports.dyamicFunctionStateParam))),
response: (0, json_type_validation_1.optional)((0, json_type_validation_1.object)({
type: (0, json_type_validation_1.withDefault)('json', (0, json_type_validation_1.union)((0, json_type_validation_1.constant)('json'), (0, json_type_validation_1.constant)('headers'), (0, json_type_validation_1.constant)('text'))),
type: (0, json_type_validation_1.withDefault)('json', (0, json_type_validation_1.union)((0, json_type_validation_1.constant)('json'), (0, json_type_validation_1.constant)('headers'), (0, json_type_validation_1.constant)('text'), (0, json_type_validation_1.constant)('none'))),
})),

@@ -441,3 +448,3 @@ });

id: (0, json_type_validation_1.string)(),
params: (0, json_type_validation_1.optional)((0, json_type_validation_1.dict)((0, json_type_validation_1.union)(exports.staticValueDecoder, exports.dyamicFunctionParam, exports.expressionValueDecoder))),
params: (0, json_type_validation_1.optional)((0, json_type_validation_1.dict)((0, json_type_validation_1.union)(exports.staticValueDecoder, exports.dyamicFunctionParam, exports.dyamicFunctionStateParam, exports.expressionValueDecoder))),
})),

@@ -444,0 +451,0 @@ initialData: (0, json_type_validation_1.optional)((0, json_type_validation_1.lazy)(function () { return exports.dyamicFunctionParam; })),

import { Decoder } from '@mojotech/json-type-validation';
import { UIDLStaticValue, ReferenceType, UIDLDynamicReference, UIDLPropDefinition, UIDLStateDefinition, UIDLStateValueDetails, UIDLPageOptions, UIDLComponentOutputOptions, UIDLDependency, UIDLStyleDefinitions, UIDLStyleValue, UIDLAttributeValue, UIDLEventHandlerStatement, UIDLMailLinkNode, UIDLPhoneLinkNode, UIDLRawValue, UIDLElementStyleStates, UIDLStyleStateCondition, UIDLStyleMediaQueryScreenSizeCondition, UIDLStyleConditions, UIDLElementNodeProjectReferencedStyle, VUIDLComponentSEO, VUIDLGlobalAsset, UIDLExternalDependency, UIDLLocalDependency, UIDLPeerDependency, UIDLImportReference, UIDLStyleSetTokenReference, VUIDLStyleSetDefnition, VUIDLElement, VUIDLSlotNode, VUIDLConditionalNode, VUIDLRepeatNode, VUIDLElementNode, VUIDLNode, VUIDLElementNodeInlineReferencedStyle, VUIDLSectionLinkNode, VUIDLLinkNode, VUIDLURLLinkNode, VUIDLStyleSetConditions, VUIDLStyleSetMediaCondition, VUIDLStyleSetStateCondition, VUIDLDesignTokens, UIDLPropCallEvent, UIDLStateModifierEvent, UIDLScriptExternalAsset, UIDLScriptInlineAsset, VUIDLStyleInlineAsset, UIDLStyleExternalAsset, VUIDLFontAsset, UIDLCanonicalAsset, UIDLIconAsset, UIDLAssetBase, VUIDLElementNodeClassReferencedStyle, UIDLCompDynamicReference, UIDLComponentStyleReference, PagePaginationOptions, VCMSItemUIDLElementNode, VCMSListUIDLElementNode, UIDLInitialPathsData, UIDLInitialPropsData, UIDLExpressionValue, UIDLDynamicLinkNode, UIDLENVValue, UIDLPropValue, UIDLResourceItem, VUIDLNavLinkNode, VUIDLDateTimeNode } from '@teleporthq/teleport-types';
import { UIDLStaticValue, ReferenceType, UIDLDynamicReference, UIDLPropDefinition, UIDLStateDefinition, UIDLStateValueDetails, UIDLPageOptions, UIDLComponentOutputOptions, UIDLDependency, UIDLStyleDefinitions, UIDLStyleValue, UIDLAttributeValue, UIDLEventHandlerStatement, UIDLMailLinkNode, UIDLPhoneLinkNode, UIDLRawValue, UIDLElementStyleStates, UIDLStyleStateCondition, UIDLStyleMediaQueryScreenSizeCondition, UIDLStyleConditions, UIDLElementNodeProjectReferencedStyle, VUIDLComponentSEO, VUIDLGlobalAsset, UIDLExternalDependency, UIDLLocalDependency, UIDLPeerDependency, UIDLImportReference, UIDLStyleSetTokenReference, VUIDLStyleSetDefnition, VUIDLElement, VUIDLSlotNode, VUIDLConditionalNode, VUIDLRepeatNode, VUIDLElementNode, VUIDLNode, VUIDLElementNodeInlineReferencedStyle, VUIDLSectionLinkNode, VUIDLLinkNode, VUIDLURLLinkNode, VUIDLStyleSetConditions, VUIDLStyleSetMediaCondition, VUIDLStyleSetStateCondition, VUIDLDesignTokens, UIDLPropCallEvent, UIDLStateModifierEvent, UIDLScriptExternalAsset, UIDLScriptInlineAsset, VUIDLStyleInlineAsset, UIDLStyleExternalAsset, VUIDLFontAsset, UIDLCanonicalAsset, UIDLIconAsset, UIDLAssetBase, VUIDLElementNodeClassReferencedStyle, UIDLCompDynamicReference, UIDLComponentStyleReference, PagePaginationOptions, VCMSItemUIDLElementNode, VCMSListUIDLElementNode, UIDLInitialPathsData, UIDLInitialPropsData, UIDLExpressionValue, UIDLDynamicLinkNode, UIDLENVValue, UIDLPropValue, UIDLResourceItem, VUIDLNavLinkNode, VUIDLDateTimeNode, UIDLStateValue } from '@teleporthq/teleport-types';
export declare const referenceTypeDecoder: Decoder<ReferenceType>;

@@ -10,2 +10,3 @@ export declare const dynamicValueDecoder: Decoder<UIDLDynamicReference>;

export declare const dyamicFunctionParam: Decoder<UIDLPropValue>;
export declare const dyamicFunctionStateParam: Decoder<UIDLStateValue>;
export declare const resourceItemDecoder: Decoder<UIDLResourceItem>;

@@ -12,0 +13,0 @@ export declare const initialPropsDecoder: Decoder<UIDLInitialPropsData>;

@@ -36,2 +36,9 @@ import { object, string, dict, constant, number, optional, union, boolean, array, lazy, oneOf, intersection, withDefault, anyJson, } from '@mojotech/json-type-validation';

});
export var dyamicFunctionStateParam = object({
type: constant('dynamic'),
content: object({
referenceType: constant('state'),
id: string(),
}),
});
export var resourceItemDecoder = object({

@@ -47,5 +54,5 @@ name: string(),

mappers: withDefault([], array(string())),
params: optional(dict(union(staticValueDecoder, dyamicFunctionParam))),
params: optional(dict(union(staticValueDecoder, dyamicFunctionParam, dyamicFunctionStateParam))),
response: optional(object({
type: withDefault('json', union(constant('json'), constant('headers'), constant('text'))),
type: withDefault('json', union(constant('json'), constant('headers'), constant('text'), constant('none'))),
})),

@@ -437,3 +444,3 @@ });

id: string(),
params: optional(dict(union(staticValueDecoder, dyamicFunctionParam, expressionValueDecoder))),
params: optional(dict(union(staticValueDecoder, dyamicFunctionParam, dyamicFunctionStateParam, expressionValueDecoder))),
})),

@@ -440,0 +447,0 @@ initialData: optional(lazy(function () { return dyamicFunctionParam; })),

{
"name": "@teleporthq/teleport-uidl-validator",
"version": "0.29.0-alpha.0",
"version": "0.30.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.29.0-alpha.0",
"@teleporthq/teleport-types": "^0.29.0-alpha.0"
"@teleporthq/teleport-shared": "^0.30.0-alpha.0",
"@teleporthq/teleport-types": "^0.30.0-alpha.0"
},
"gitHead": "2f323d56f7f8fb7823f9a77d154f9873ec08b38d"
"gitHead": "08229f97ff3d89df98312d4b340206a108d9f901"
}

@@ -87,2 +87,3 @@ import {

VUIDLDateTimeNode,
UIDLStateValue,
} from '@teleporthq/teleport-types'

@@ -140,2 +141,10 @@ import { CustomCombinators } from './custom-combinators'

export const dyamicFunctionStateParam: Decoder<UIDLStateValue> = object({
type: constant('dynamic'),
content: object({
referenceType: constant('state'),
id: string(),
}),
})
export const resourceItemDecoder: Decoder<UIDLResourceItem> = object({

@@ -151,6 +160,9 @@ name: string(),

mappers: withDefault([], array(string())),
params: optional(dict(union(staticValueDecoder, dyamicFunctionParam))),
params: optional(dict(union(staticValueDecoder, dyamicFunctionParam, dyamicFunctionStateParam))),
response: optional(
object({
type: withDefault('json', union(constant('json'), constant('headers'), constant('text'))),
type: withDefault(
'json',
union(constant('json'), constant('headers'), constant('text'), constant('none'))
),
})

@@ -741,3 +753,10 @@ ),

params: optional(
dict(union(staticValueDecoder, dyamicFunctionParam, expressionValueDecoder))
dict(
union(
staticValueDecoder,
dyamicFunctionParam,
dyamicFunctionStateParam,
expressionValueDecoder
)
)
),

@@ -744,0 +763,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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc