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

@cubicweb/client

Package Overview
Dependencies
Maintainers
3
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cubicweb/client - npm Package Compare versions

Comparing version 1.8.0 to 1.9.0

3

lib/schema/classes/Utils.d.ts
import { EntityRawSchemaArray } from "../raw/Entities";
import { Cardinality, RelationDefinitionRawSchema, RelationDefinitionRawSchemaArray } from "../raw/RelationDefinitions";
import { Schema } from "./Schema";
import { EntitySchema } from "./EntitySchema";
/**

@@ -30,2 +31,4 @@ * Returns the given schema using loose typing.

export type MatchedRelationDefinition<E extends EntityRawSchemaArray, R extends RelationDefinitionRawSchemaArray<EntityRawSchemaArray>, M extends RelationDefinitionMatcher<E>> = R[number] extends infer RDef ? (RDef extends M ? RDef : never) : never;
export declare function hasAttributeWithName(entitySchema: EntitySchema, attributeNameSearched: string): boolean;
export declare function isAttributeRichString(entitySchema: EntitySchema, attributeNameSearched: string): boolean;
//# sourceMappingURL=Utils.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.cardinalityRequired = exports.getLooseSchema = void 0;
exports.isAttributeRichString = exports.hasAttributeWithName = exports.cardinalityRequired = exports.getLooseSchema = void 0;
/**

@@ -25,2 +25,15 @@ * Returns the given schema using loose typing.

exports.cardinalityRequired = cardinalityRequired;
function hasAttributeWithName(entitySchema, attributeNameSearched) {
for (const entityAttribute of entitySchema.attributes) {
if (entityAttribute.type == attributeNameSearched) {
return true;
}
}
return false;
}
exports.hasAttributeWithName = hasAttributeWithName;
function isAttributeRichString(entitySchema, attributeNameSearched) {
return hasAttributeWithName(entitySchema, attributeNameSearched + "_format");
}
exports.isAttributeRichString = isAttributeRichString;
//# sourceMappingURL=Utils.js.map

2

package.json

@@ -5,3 +5,3 @@ {

"author": "Logilab",
"version": "1.8.0",
"version": "1.9.0",
"license": "LGPL-3.0-or-later",

@@ -8,0 +8,0 @@ "main": "lib/index.js",

@@ -206,3 +206,1 @@ # @cubicweb/client

```

@@ -8,2 +8,3 @@ import { EntityRawSchemaArray } from "../raw/Entities";

import { Schema } from "./Schema";
import { EntitySchema } from "./EntitySchema";

@@ -54,1 +55,20 @@ /**

> = R[number] extends infer RDef ? (RDef extends M ? RDef : never) : never;
export function hasAttributeWithName(
entitySchema: EntitySchema,
attributeNameSearched: string
): boolean {
for (const entityAttribute of entitySchema.attributes) {
if (entityAttribute.type == attributeNameSearched) {
return true;
}
}
return false;
}
export function isAttributeRichString(
entitySchema: EntitySchema,
attributeNameSearched: string
): boolean {
return hasAttributeWithName(entitySchema, attributeNameSearched + "_format");
}

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