Socket
Socket
Sign inDemoInstall

@ark7/model

Package Overview
Dependencies
7
Maintainers
1
Versions
172
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.0.46 to 2.0.47

32

core/configs.js

@@ -21,4 +21,4 @@ "use strict";

: _.isEmpty(schema) /** a registered type */
? converter_1.converter(constructor, name)
: enums_1.createEnumModelClass(constructor));
? (0, converter_1.converter)(constructor, name)
: (0, enums_1.createEnumModelClass)(constructor));
const configOptions = getArk7ModelConfig(cls);

@@ -73,2 +73,15 @@ const resolver = (_a = options.resolver) !== null && _a !== void 0 ? _a : resolvers_1.DEFAULT_OPTIONS_RESOLVER;

class Ark7ModelMetadata {
static addDiscriminations(parentCls, cls) {
if (!this.discriminationsMap.has(parentCls)) {
this.discriminationsMap.set(parentCls, []);
}
this.discriminationsMap.get(parentCls).push(cls);
if (manager_1.manager.hasMetadata(parentCls)) {
manager_1.manager.getMetadata(parentCls).discriminations.push(cls);
}
}
static getDiscriminations(cls) {
var _a;
return (_a = this.discriminationsMap.get(cls)) !== null && _a !== void 0 ? _a : [];
}
constructor(cls, name) {

@@ -87,15 +100,2 @@ var _a, _b;

}
static addDiscriminations(parentCls, cls) {
if (!this.discriminationsMap.has(parentCls)) {
this.discriminationsMap.set(parentCls, []);
}
this.discriminationsMap.get(parentCls).push(cls);
if (manager_1.manager.hasMetadata(parentCls)) {
manager_1.manager.getMetadata(parentCls).discriminations.push(cls);
}
}
static getDiscriminations(cls) {
var _a;
return (_a = this.discriminationsMap.get(cls)) !== null && _a !== void 0 ? _a : [];
}
get configs() {

@@ -257,3 +257,3 @@ return this._configs;

A7Model.provide = provide;
})(A7Model = exports.A7Model || (exports.A7Model = {}));
})(A7Model || (exports.A7Model = A7Model = {}));
//# sourceMappingURL=configs.js.map

@@ -42,3 +42,3 @@ "use strict";

function Level(level) {
return fields_1.Field(_.isNumber(level) ? { level } : level);
return (0, fields_1.Field)(_.isNumber(level) ? { level } : level);
}

@@ -45,0 +45,0 @@ exports.Level = Level;

@@ -9,3 +9,3 @@ "use strict";

function Default(options) {
return fields_1.Field({
return (0, fields_1.Field)({
default: options,

@@ -12,0 +12,0 @@ });

@@ -64,4 +64,4 @@ /**

}
export declare type EditableEvaluate<T, Args extends Array<any> = []> = T | ((this: any, ...a: Args) => T);
export declare type EditableType = 'input' | 'textarea' | 'list-input' | 'select' | 'money' | 'dynamic' | 'unknown' | 'select-toggle' | 'model-reference';
export declare type EditableInputType = 'area' | 'text' | 'date' | 'datetime' | 'currency' | 'percent' | 'number' | 'boolean' | 'email' | 'password' | 'link' | 'duration' | 'phone';
export type EditableEvaluate<T, Args extends Array<any> = []> = T | ((this: any, ...a: Args) => T);
export type EditableType = 'input' | 'textarea' | 'list-input' | 'select' | 'money' | 'dynamic' | 'unknown' | 'select-toggle' | 'model-reference';
export type EditableInputType = 'area' | 'text' | 'date' | 'datetime' | 'currency' | 'percent' | 'number' | 'boolean' | 'email' | 'password' | 'link' | 'duration' | 'phone';

@@ -9,5 +9,5 @@ "use strict";

function Editable(options) {
return fields_1.Field({ editable: options });
return (0, fields_1.Field)({ editable: options });
}
exports.Editable = Editable;
//# sourceMappingURL=editable.js.map

@@ -10,3 +10,3 @@ "use strict";

function Encrypted(options = {}) {
return fields_1.Field(_.defaults(options, {
return (0, fields_1.Field)(_.defaults(options, {
encrypted: true,

@@ -25,3 +25,3 @@ algorithm: EncryptAlgorithm.AEAD_AES_256_CBC_HMAC_SHA_512_DETERMINISTIC,

EncryptAlgorithm["UNINDEXED"] = "Unindexed";
})(EncryptAlgorithm = exports.EncryptAlgorithm || (exports.EncryptAlgorithm = {}));
})(EncryptAlgorithm || (exports.EncryptAlgorithm = EncryptAlgorithm = {}));
//# sourceMappingURL=encrypted.js.map

@@ -11,5 +11,5 @@ "use strict";

function IDType(options) {
return fields_1.Field(options);
return (0, fields_1.Field)(options);
}
exports.IDType = IDType;
//# sourceMappingURL=ids.js.map

@@ -10,5 +10,5 @@ "use strict";

function Important() {
return fields_1.Field({ importance: 100 });
return (0, fields_1.Field)({ importance: 100 });
}
exports.Important = Important;
//# sourceMappingURL=important.js.map
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {

@@ -6,0 +10,0 @@ if (k2 === undefined) k2 = k;

@@ -17,3 +17,3 @@ "use strict";

function Index(options = {}) {
return fields_1.Field(_.extend({
return (0, fields_1.Field)(_.extend({
index: true,

@@ -30,3 +30,3 @@ }, options, options.indexDisabled && !options.index ? { index: false } : {}));

function Unique(options = {}) {
return fields_1.Field(_.extend({
return (0, fields_1.Field)(_.extend({
index: true,

@@ -42,5 +42,5 @@ unique: true,

}
return configs_1.Config({
return (0, configs_1.Config)({
indexes: [o],
resolver: resolvers_1.concatResolver('indexes'),
resolver: (0, resolvers_1.concatResolver)('indexes'),
});

@@ -47,0 +47,0 @@ }

@@ -1,2 +0,2 @@

export declare type MMap<T> = Map<string, T>;
export type MMap<T> = Map<string, T>;
/**

@@ -3,0 +3,0 @@ * Set default value for a field.

@@ -9,3 +9,3 @@ "use strict";

function MMap(type) {
return fields_1.Field({
return (0, fields_1.Field)({
type: Map,

@@ -12,0 +12,0 @@ of: type,

@@ -14,5 +14,5 @@ "use strict";

}
return configs_1.Config({
return (0, configs_1.Config)({
mixinClasses: [cls],
resolver: resolvers_1.reverseConcatResolver('mixinClasses'),
resolver: (0, resolvers_1.reverseConcatResolver)('mixinClasses'),
});

@@ -19,0 +19,0 @@ }

@@ -9,3 +9,3 @@ "use strict";

function NoPersist() {
return fields_1.Field({
return (0, fields_1.Field)({
noPersist: true,

@@ -12,0 +12,0 @@ });

@@ -10,3 +10,3 @@ "use strict";

function Present(options = true) {
return fields_1.Field({
return (0, fields_1.Field)({
present: options,

@@ -13,0 +13,0 @@ });

@@ -6,5 +6,5 @@ "use strict";

function Proto(options) {
return fields_1.Field(options);
return (0, fields_1.Field)(options);
}
exports.Proto = Proto;
//# sourceMappingURL=proto.js.map

@@ -9,3 +9,3 @@ "use strict";

function Readonly(options = true) {
return fields_1.Field({
return (0, fields_1.Field)({
readonly: options,

@@ -19,3 +19,3 @@ });

function Autogen() {
return fields_1.Field({
return (0, fields_1.Field)({
readonly: true,

@@ -22,0 +22,0 @@ autogen: true,

import { ID } from '../model';
export declare type Ref<M> = ID | M;
export type Ref<M> = ID | M;
/**

@@ -4,0 +4,0 @@ * Set a reference field.

@@ -11,3 +11,3 @@ "use strict";

function Reference(options = {}) {
return fields_1.Field(_.defaults({
return (0, fields_1.Field)(_.defaults({
reference: true,

@@ -23,3 +23,3 @@ }, options));

function isModel(x) {
return !model_1.isID(x);
return !(0, model_1.isID)(x);
}

@@ -29,3 +29,3 @@ exports.isModel = isModel;

var _a;
return x == null ? null : model_1.isID(x) ? x : x[(_a = options.idField) !== null && _a !== void 0 ? _a : '_id'];
return x == null ? null : (0, model_1.isID)(x) ? x : x[(_a = options.idField) !== null && _a !== void 0 ? _a : '_id'];
}

@@ -32,0 +32,0 @@ exports.idOf = idOf;

@@ -10,3 +10,3 @@ "use strict";

function Required(options = true) {
return fields_1.Field({
return (0, fields_1.Field)({
required: options,

@@ -20,3 +20,3 @@ });

function Optional(options = true) {
return fields_1.Field({
return (0, fields_1.Field)({
required: !options,

@@ -23,0 +23,0 @@ });

@@ -10,3 +10,3 @@ "use strict";

function Tag(tag) {
return fields_1.Field({
return (0, fields_1.Field)({
tags: _.flatten([tag]),

@@ -13,0 +13,0 @@ });

@@ -9,5 +9,5 @@ "use strict";

function Virtual(options) {
return fields_1.Field(options);
return (0, fields_1.Field)(options);
}
exports.Virtual = Virtual;
//# sourceMappingURL=virtual.js.map

@@ -12,8 +12,8 @@ import 'reflect-metadata';

}
export declare type BaseOptions<T = object> = T & {
export type BaseOptions<T = object> = T & {
discriminatorKey?: string;
resolver?: OptionsResolver<T>;
};
export declare type OptionsResolver<T = object, O extends BaseOptions<T> = BaseOptions<T>> = (baseOptions: O, options: O) => O;
export declare type FieldOptionsResolver<T = object> = OptionsResolver<FieldOptions<T>>;
export type OptionsResolver<T = object, O extends BaseOptions<T> = BaseOptions<T>> = (baseOptions: O, options: O) => O;
export type FieldOptionsResolver<T = object> = OptionsResolver<FieldOptions<T>>;
export interface StrictFieldOption {

@@ -42,4 +42,4 @@ type?: any;

}
export declare type FieldOptions<T = StrictFieldOption> = BaseOptions<T & StrictFieldOption>;
export declare type ConfigOptionsResolver<T = StrictConfigOptions> = OptionsResolver<ConfigOptions<T>>;
export type FieldOptions<T = StrictFieldOption> = BaseOptions<T & StrictFieldOption>;
export type ConfigOptionsResolver<T = StrictConfigOptions> = OptionsResolver<ConfigOptions<T>>;
export interface StrictConfigOptions {

@@ -59,3 +59,3 @@ schema?: runtime.Schema;

}
export declare type ConfigOptions<T = StrictConfigOptions> = BaseOptions<T & StrictConfigOptions>;
export type ConfigOptions<T = StrictConfigOptions> = BaseOptions<T & StrictConfigOptions>;
export interface ModelizeMetadata {

@@ -62,0 +62,0 @@ $parent?: any;

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {

@@ -6,0 +10,0 @@ if (k2 === undefined) k2 = k;

@@ -16,3 +16,3 @@ "use strict";

DefaultDataLevel[DefaultDataLevel["NEVER"] = 1000] = "NEVER";
})(DefaultDataLevel = exports.DefaultDataLevel || (exports.DefaultDataLevel = {}));
})(DefaultDataLevel || (exports.DefaultDataLevel = DefaultDataLevel = {}));
//# sourceMappingURL=levels.js.map

@@ -40,3 +40,3 @@ "use strict";

d('getMetadata(): setConfigs');
metadata.configs = configs_1.getArk7ModelConfig(metadata.modelClass);
metadata.configs = (0, configs_1.getArk7ModelConfig)(metadata.modelClass);
}

@@ -301,4 +301,4 @@ if (metadata.fields == null || (options === null || options === void 0 ? void 0 : options.forceFields)) {

mermaid.getExtractedType = getExtractedType;
})(mermaid = exports.mermaid || (exports.mermaid = {}));
})(mermaid || (exports.mermaid = mermaid = {}));
exports.manager = new Manager();
//# sourceMappingURL=manager.js.map

@@ -19,4 +19,4 @@ import { AsObject } from './types';

}
export declare type Attachment<T = object> = T & {
export type Attachment<T = object> = T & {
__$attach: true;
};

@@ -154,7 +154,7 @@ "use strict";

};
StrictModel = __decorate([
configs_1.A7Model({}, {"name":"StrictModel","props":[{"name":"$attach","optional":true,"modifier":"PUBLIC","type":"method"},{"name":"toJSON","optional":false,"modifier":"PUBLIC","type":"method"},{"name":"toObject","optional":true,"modifier":"PUBLIC","type":"method"}],"fileName":"src/core/model.ts"}),
exports.StrictModel = StrictModel;
exports.StrictModel = StrictModel = __decorate([
(0, configs_1.A7Model)({}, {"name":"StrictModel","props":[{"name":"$attach","optional":true,"modifier":"PUBLIC","type":"method"},{"name":"toJSON","optional":false,"modifier":"PUBLIC","type":"method"},{"name":"toObject","optional":true,"modifier":"PUBLIC","type":"method"}],"fileName":"src/core/model.ts"}),
__metadata("design:paramtypes", [])
], StrictModel);
exports.StrictModel = StrictModel;
let isIDFn = ((x) => _.isString(x));

@@ -171,11 +171,11 @@ function setIsIDFn(fn) {

};
exports.Model = Model;
__decorate([
decorators_1.Basic(),
decorators_1.Proto({ protoAssignedId: 1 }),
(0, decorators_1.Basic)(),
(0, decorators_1.Proto)({ protoAssignedId: 1 }),
__metadata("design:type", Object)
], Model.prototype, "_id", void 0);
Model = __decorate([
configs_1.A7Model({}, {"name":"Model","props":[{"name":"_id","optional":true,"modifier":"PUBLIC","type":{"referenceName":"ID"}}],"fileName":"src/core/model.ts"})
exports.Model = Model = __decorate([
(0, configs_1.A7Model)({}, {"name":"Model","props":[{"name":"_id","optional":true,"modifier":"PUBLIC","type":{"referenceName":"ID"}}],"fileName":"src/core/model.ts"})
], Model);
exports.Model = Model;
//# sourceMappingURL=model.js.map

@@ -1,14 +0,14 @@

export declare type PropertyAnyNames<T> = {
export type PropertyAnyNames<T> = {
[K in keyof T]: IfEquals<T[K], any, K, never>;
}[keyof T];
export declare type FunctionPropertyNames<T> = Diff<{
export type FunctionPropertyNames<T> = Diff<{
[K in keyof T]: T[K] extends Function ? K : never;
}[keyof T], PropertyAnyNames<T>>;
export declare type NonFunctionPropertyNames<T> = {
export type NonFunctionPropertyNames<T> = {
[K in keyof T]: T[K] extends Function ? never : K;
}[keyof T] | PropertyAnyNames<T>;
export declare type PickFunctionProperties<T> = Pick<T, FunctionPropertyNames<T>>;
export declare type OmitFunctionProperties<T> = Omit<T, FunctionPropertyNames<T>>;
export declare type IfEquals<X, Y, A = X, B = never> = (<T>() => T extends X ? 1 : 2) extends <T>() => T extends Y ? 1 : 2 ? A : B;
export declare type ReadonlyPropertyNames<T> = {
export type PickFunctionProperties<T> = T extends Array<any> ? T : Pick<T, FunctionPropertyNames<T>>;
export type OmitFunctionProperties<T> = T extends Array<any> ? T : Omit<T, FunctionPropertyNames<T>>;
export type IfEquals<X, Y, A = X, B = never> = (<T>() => T extends X ? 1 : 2) extends <T>() => T extends Y ? 1 : 2 ? A : B;
export type ReadonlyPropertyNames<T> = {
[P in keyof T]-?: IfEquals<{

@@ -20,3 +20,3 @@ [Q in P]: T[P];

}[keyof T];
export declare type NonReadonlyPropertyNames<T> = {
export type NonReadonlyPropertyNames<T> = {
[P in keyof T]-?: IfEquals<{

@@ -28,21 +28,21 @@ [Q in P]: T[P];

}[keyof T];
export declare type PickReadonlyProperties<T> = Pick<T, ReadonlyPropertyNames<T>>;
export declare type OmitReadonlyProperties<T> = Omit<T, ReadonlyPropertyNames<T>>;
export declare type OneOrMany<T> = T | T[];
export declare type OneOrArray<T> = T | T[];
export declare type Writable<T> = {
export type PickReadonlyProperties<T> = T extends Array<any> ? T : Pick<T, ReadonlyPropertyNames<T>>;
export type OmitReadonlyProperties<T> = T extends Array<any> ? T : Omit<T, ReadonlyPropertyNames<T>>;
export type OneOrMany<T> = T | T[];
export type OneOrArray<T> = T | T[];
export type Writable<T> = {
-readonly [P in keyof T]: T[P];
};
export declare type PartialReadonlyProperties<T> = OmitReadonlyProperties<T> & Writable<Partial<PickReadonlyProperties<T>>>;
export declare type Diff<T, U> = T extends U ? never : T;
export declare type Filter<T, U> = T extends U ? T : never;
export type PartialReadonlyProperties<T> = OmitReadonlyProperties<T> & Writable<Partial<PickReadonlyProperties<T>>>;
export type Diff<T, U> = T extends U ? never : T;
export type Filter<T, U> = T extends U ? T : never;
export interface POJO<V> {
[key: string]: V;
}
declare type _AsObjectPure<T> = T extends Map<infer K, infer V> ? V extends object ? POJO<AsObject<V>> | Map<K, AsObject<V>> | T : POJO<V> | Map<K, V> : T extends object ? AsObject<T> : T;
export declare type _AsObjectDeep<T> = {
type _AsObjectPure<T> = T extends Map<infer K, infer V> ? V extends object ? POJO<AsObject<V>> | Map<K, AsObject<V>> | T : POJO<V> | Map<K, V> : T extends object ? AsObject<T> : T;
export type _AsObjectDeep<T> = {
[P in keyof T]: _AsObjectPure<T[P]>;
};
export declare type AsObject<T> = _AsObjectDeep<PartialReadonlyProperties<OmitFunctionProperties<T>>>;
export declare type WritableKeys<T> = {
export type AsObject<T> = _AsObjectDeep<PartialReadonlyProperties<OmitFunctionProperties<T>>>;
export type WritableKeys<T> = {
[P in keyof T]-?: IfEquals<{

@@ -49,0 +49,0 @@ [Q in P]: T[P];

@@ -26,3 +26,3 @@ import { Ark7ModelMetadata, ModelClass } from '../core';

}
declare type ProtobufItem = ProtobufMessage | ProtobufEnum;
type ProtobufItem = ProtobufMessage | ProtobufEnum;
export declare function isProtobufMessage(item: ProtobufItem): item is ProtobufMessage;

@@ -29,0 +29,0 @@ export declare function isProtobufEnum(item: ProtobufItem): item is ProtobufEnum;

@@ -9,9 +9,7 @@ "use strict";

function isProtobufMessage(item) {
var _a;
return ((_a = item) === null || _a === void 0 ? void 0 : _a.fields) != null;
return (item === null || item === void 0 ? void 0 : item.fields) != null;
}
exports.isProtobufMessage = isProtobufMessage;
function isProtobufEnum(item) {
var _a;
return ((_a = item) === null || _a === void 0 ? void 0 : _a.fields) == null;
return (item === null || item === void 0 ? void 0 : item.fields) == null;
}

@@ -18,0 +16,0 @@ exports.isProtobufEnum = isProtobufEnum;

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {

@@ -6,0 +10,0 @@ if (k2 === undefined) k2 = k;

{
"name": "@ark7/model",
"version": "2.0.46",
"version": "2.0.47",
"description": "Ark7 model used for both backend and frontend",

@@ -13,4 +13,5 @@ "types": "index.d.ts",

"compile:test": "npm run compile:src && tsc --build test/tsconfig.json",
"ts-patch:install": "node_modules/.bin/ts-patch install",
"release": "scripts/release",
"test": "npm run compile:src && NODE_ENV=test node_modules/.bin/mocha --trace-warnings --require ts-node/register \"test/**/*.ts\""
"test": "npm run ts-patch:install && npm run compile:src && NODE_ENV=test node_modules/.bin/mocha --trace-warnings --require ts-node/register \"test/**/*.ts\""
},

@@ -41,3 +42,4 @@ "repository": {

"ts-node": "^9.0.0",
"typescript": "^4.3.5"
"ts-patch": "^3.1.2",
"typescript": "^5.3.3"
},

@@ -44,0 +46,0 @@ "dependencies": {

@@ -14,14 +14,11 @@ "use strict";

function isReferenceType(type) {
var _a;
return ((_a = type) === null || _a === void 0 ? void 0 : _a.referenceName) != null;
return (type === null || type === void 0 ? void 0 : type.referenceName) != null;
}
runtime.isReferenceType = isReferenceType;
function isArrayType(type) {
var _a;
return ((_a = type) === null || _a === void 0 ? void 0 : _a.arrayElementType) != null;
return (type === null || type === void 0 ? void 0 : type.arrayElementType) != null;
}
runtime.isArrayType = isArrayType;
function isParameterizedType(type) {
var _a;
return ((_a = type) === null || _a === void 0 ? void 0 : _a.selfType) != null;
return (type === null || type === void 0 ? void 0 : type.selfType) != null;
}

@@ -45,3 +42,3 @@ runtime.isParameterizedType = isParameterizedType;

runtime.typeName = typeName;
})(runtime = exports.runtime || (exports.runtime = {}));
})(runtime || (exports.runtime = runtime = {}));
//# sourceMappingURL=runtime.js.map

@@ -175,2 +175,3 @@ "use strict";

.members;
console.log('members:', members);
return {

@@ -177,0 +178,0 @@ props: Array.from(members.values())

@@ -14,3 +14,3 @@ "use strict";

}
const badInterface = ts.createRegularExpressionLiteral(JSON.stringify({
const badInterface = ts.factory.createRegularExpressionLiteral(JSON.stringify({
name: 'never',

@@ -39,3 +39,3 @@ props: [],

const type = typeChecker.getTypeAtLocation(parent);
const literal = ts.createRegularExpressionLiteral(JSON.stringify(_.extend(runtime_schema_1.buildInterface(type.symbol.escapedName, type, typeChecker), {
const literal = ts.factory.createRegularExpressionLiteral(JSON.stringify(_.extend((0, runtime_schema_1.buildInterface)(type.symbol.escapedName, type, typeChecker), {
fileName,

@@ -45,4 +45,4 @@ })));

const exp = node.expression;
const expression = ts.updateCall(exp, exp.expression, exp.typeArguments, elements);
return ts.updateDecorator(node, expression);
const expression = ts.factory.updateCallExpression(exp, exp.expression, exp.typeArguments, elements);
return ts.factory.updateDecorator(node, expression);
}

@@ -57,7 +57,7 @@ if (!isRuntimeTypeCallExpression(node, typeChecker)) {

const typeNode = node.typeArguments[0];
const name = ts.createStringLiteral(typeNode.getText());
const literal = ts.createRegularExpressionLiteral(JSON.stringify({}));
const name = ts.factory.createStringLiteral(typeNode.getText());
const literal = ts.factory.createRegularExpressionLiteral(JSON.stringify({}));
const elements = [...node.arguments, literal, name];
const args = ts.createNodeArray(elements, node.arguments.hasTrailingComma);
return ts.updateCall(node, node.expression, node.typeArguments, args);
const args = ts.factory.createNodeArray(elements, node.arguments.hasTrailingComma);
return ts.factory.updateCallExpression(node, node.expression, node.typeArguments, args);
}

@@ -68,9 +68,9 @@ else {

const t = typeChecker.getTypeAtLocation(i);
const name = ts.createStringLiteral(t.symbol.escapedName);
const literal = ts.createRegularExpressionLiteral(JSON.stringify(_.extend(runtime_schema_1.buildInterface(t.symbol.escapedName, t, typeChecker), {
const name = ts.factory.createStringLiteral(t.symbol.escapedName);
const literal = ts.factory.createRegularExpressionLiteral(JSON.stringify(_.extend((0, runtime_schema_1.buildInterface)(t.symbol.escapedName, t, typeChecker), {
fileName,
})));
const elements = [...node.arguments, literal, name];
const args = ts.createNodeArray(elements, node.arguments.hasTrailingComma);
return ts.updateCall(node, node.expression, node.typeArguments, args);
const args = ts.factory.createNodeArray(elements, node.arguments.hasTrailingComma);
return ts.factory.updateCallExpression(node, node.expression, node.typeArguments, args);
}

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

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

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

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc