@based/schema
Advanced tools
@@ -1,2 +0,2 @@ | ||
| import { ALIAS, BINARY, JSON, BOOLEAN, CARDINALITY, TIMESTAMP, INT16, INT32, INT8, UINT8, UINT16, UINT32, NUMBER, ENUM, ID, MICRO_BUFFER, REFERENCE, REFERENCES, STRING, TEXT, ALIASES, VECTOR, COLVEC, NULL, OBJECT, } from './types.js'; | ||
| import { ALIAS, BINARY, JSON, BOOLEAN, CARDINALITY, TIMESTAMP, INT16, INT32, INT8, UINT8, UINT16, UINT32, NUMBER, ENUM, ID, MICRO_BUFFER, REFERENCE, REFERENCES, STRING, TEXT, ALIASES, VECTOR, COLVEC, NULL, OBJECT, CARDINALITY_RAW, } from './types.js'; | ||
| export const DEFAULT_MAP = { | ||
@@ -28,3 +28,4 @@ [NULL]: 0, | ||
| [COLVEC]: undefined, // maybe not can set a vec with 0 | ||
| [CARDINALITY_RAW]: undefined, | ||
| }; | ||
| //# sourceMappingURL=defaultMap.js.map |
@@ -26,3 +26,4 @@ export declare const NULL = 0; | ||
| export declare const COLVEC = 30; | ||
| export type TypeIndex = typeof NULL | typeof TIMESTAMP | typeof NUMBER | typeof CARDINALITY | typeof INT8 | typeof UINT8 | typeof INT16 | typeof UINT16 | typeof INT32 | typeof UINT32 | typeof BOOLEAN | typeof ENUM | typeof STRING | typeof TEXT | typeof REFERENCE | typeof REFERENCES | typeof MICRO_BUFFER | typeof ALIAS | typeof ALIASES | typeof BINARY | typeof ID | typeof VECTOR | typeof JSON | typeof OBJECT | typeof COLVEC; | ||
| export declare const CARDINALITY_RAW = 31; | ||
| export type TypeIndex = typeof NULL | typeof TIMESTAMP | typeof NUMBER | typeof CARDINALITY | typeof CARDINALITY_RAW | typeof INT8 | typeof UINT8 | typeof INT16 | typeof UINT16 | typeof INT32 | typeof UINT32 | typeof BOOLEAN | typeof ENUM | typeof STRING | typeof TEXT | typeof REFERENCE | typeof REFERENCES | typeof MICRO_BUFFER | typeof ALIAS | typeof ALIASES | typeof BINARY | typeof ID | typeof VECTOR | typeof JSON | typeof OBJECT | typeof COLVEC; | ||
| export declare enum VectorBaseType { | ||
@@ -29,0 +30,0 @@ Int8 = 1, |
@@ -27,2 +27,3 @@ // WARN: The following type codes are used in js and zig but selva has its own typing. | ||
| export const COLVEC = 30; | ||
| export const CARDINALITY_RAW = 31; | ||
| export var VectorBaseType; | ||
@@ -29,0 +30,0 @@ (function (VectorBaseType) { |
@@ -1,2 +0,2 @@ | ||
| import { ALIAS, ALIASES, BINARY, BOOLEAN, CARDINALITY, COLVEC, ENUM, INT16, INT32, INT8, JSON, MICRO_BUFFER, NULL, NUMBER, OBJECT, REFERENCE, REFERENCES, STRING, TEXT, TIMESTAMP, UINT16, UINT32, UINT8, VECTOR, VectorBaseType, } from './typeIndexes.js'; | ||
| import { ALIAS, ALIASES, BINARY, BOOLEAN, CARDINALITY, CARDINALITY_RAW, COLVEC, ENUM, INT16, INT32, INT8, JSON, MICRO_BUFFER, NULL, NUMBER, OBJECT, REFERENCE, REFERENCES, STRING, TEXT, TIMESTAMP, UINT16, UINT32, UINT8, VECTOR, VectorBaseType, } from './typeIndexes.js'; | ||
| export * from './typeIndexes.js'; | ||
@@ -25,2 +25,3 @@ export const TYPE_INDEX_MAP = { | ||
| cardinality: CARDINALITY, | ||
| cardinalityRAW: CARDINALITY_RAW, | ||
| json: JSON, | ||
@@ -69,2 +70,3 @@ object: OBJECT, | ||
| colvec: 0, // separate | ||
| cardinalityRaw: 0, // separate | ||
| }; | ||
@@ -71,0 +73,0 @@ const reverseMap = {}; |
| import { convertToTimestamp } from '@based/utils'; | ||
| import { ALIAS, BINARY, JSON, BOOLEAN, CARDINALITY, TIMESTAMP, INT16, INT32, INT8, UINT8, UINT16, UINT32, NUMBER, ENUM, ID, MICRO_BUFFER, REFERENCE, REFERENCES, STRING, TEXT, ALIASES, VECTOR, COLVEC, NULL, OBJECT, TYPE_INDEX_MAP, } from './types.js'; | ||
| import { ALIAS, BINARY, JSON, BOOLEAN, CARDINALITY, TIMESTAMP, INT16, INT32, INT8, UINT8, UINT16, UINT32, NUMBER, ENUM, ID, MICRO_BUFFER, REFERENCE, REFERENCES, STRING, TEXT, ALIASES, VECTOR, COLVEC, NULL, OBJECT, TYPE_INDEX_MAP, CARDINALITY_RAW, } from './types.js'; | ||
| import { MAX_ID, MIN_ID, } from '../types.js'; | ||
@@ -106,2 +106,8 @@ import v from 'validator'; | ||
| }, | ||
| [CARDINALITY_RAW]: (value) => { | ||
| if (value instanceof Uint8Array) { | ||
| return true; | ||
| } | ||
| return false; | ||
| }, | ||
| [TIMESTAMP]: (value, t) => { | ||
@@ -108,0 +114,0 @@ if (typeof value !== 'number' || |
+1
-1
| { | ||
| "name": "@based/schema", | ||
| "version": "5.1.9", | ||
| "version": "5.1.10", | ||
| "files": [ | ||
@@ -5,0 +5,0 @@ "dist", |
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
234209
0.17%6799
0.16%