Socket
Socket
Sign inDemoInstall

@strapi/utils

Package Overview
Dependencies
Maintainers
9
Versions
1271
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@strapi/utils - npm Package Compare versions

Comparing version 0.0.0-experimental.2a7cb5ff33df35e8ccde5ef918f9f9a4a3ee9a08 to 0.0.0-experimental.2bad311ac375d1115d085a9cee4fdbe11a455caf

15

dist/provider-factory.d.ts

@@ -12,20 +12,19 @@ import { AsyncSeriesHook, AsyncParallelHook } from './hooks';

type Item = Record<string, unknown>;
export interface Provider {
export interface Provider<T = unknown> {
hooks: ProviderHooksMap;
register(key: string, item: Item): Promise<Provider>;
register(key: string, item: T): Promise<Provider>;
delete(key: string): Promise<Provider>;
get(key: string): Item | undefined;
getWhere(filters?: Record<string, unknown>): Item[];
values(): Item[];
get(key: string): T | undefined;
values(): T[];
keys(): string[];
has(key: string): boolean;
size(): number;
clear(): Promise<Provider>;
clear(): Promise<Provider<T>>;
}
export type ProviderFactory = (options?: Options) => Provider;
export type ProviderFactory<T> = (options?: Options) => Provider<T>;
/**
* A Provider factory
*/
declare const providerFactory: ProviderFactory;
declare const providerFactory: <T = Item>(options?: Options) => Provider<T>;
export default providerFactory;
//# sourceMappingURL=provider-factory.d.ts.map

@@ -10,3 +10,6 @@ import type { Attribute, Model } from './types';

};
export declare const VALID_RELATION_ORDERING_KEYS: {
[key: string]: (value: any) => boolean;
};
export { getRelationalFields, isOneToAny, isManyToAny, isAnyToOne, isAnyToMany };
//# sourceMappingURL=relations.d.ts.map

@@ -54,3 +54,3 @@ import { AnyAttribute, Attribute, ComponentAttribute, DynamicZoneAttribute, Model, RelationalAttribute } from '../types';

remove(key: string): void;
set(key: string, valeu: unknown): void;
set(key: string, value: unknown): void;
recurse: Traverse;

@@ -57,0 +57,0 @@ }

@@ -10,2 +10,5 @@ import type * as Koa from 'koa';

export type Config = Record<string, unknown>;
export interface RelationOrderingOptions {
strict?: boolean;
}
export interface Attribute {

@@ -12,0 +15,0 @@ type: string;

@@ -5,2 +5,3 @@ export declare const throwInvalidKey: ({ key, path }: {

}) => never;
export declare const asyncCurry: <A extends unknown[], R>(fn: (...args: A) => Promise<R>) => ((...args: Partial<A>) => any);
//# sourceMappingURL=utils.d.ts.map

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

/// <reference types="lodash" />
import type { Model, Data } from '../types';

@@ -7,8 +6,21 @@ interface Context {

}
declare const throwPasswords: (ctx: Context) => (entity: Data) => Promise<Data>;
declare const defaultValidateFilters: import("lodash").CurriedFunction2<Context, unknown, Promise<unknown>>;
declare const defaultValidateSort: import("lodash").CurriedFunction2<Context, unknown, Promise<unknown>>;
declare const defaultValidateFields: import("lodash").CurriedFunction2<Context, unknown, Promise<unknown>>;
declare const defaultValidatePopulate: import("lodash").CurriedFunction2<Context, unknown, Promise<unknown>>;
export { throwPasswords, defaultValidateFilters, defaultValidateSort, defaultValidateFields, defaultValidatePopulate, };
export declare const throwPasswords: (ctx: Context) => (entity: Data) => Promise<Data>;
export declare const FILTER_TRAVERSALS: string[];
export declare const validateFilters: (ctx?: Context | undefined, filters?: unknown, include?: string[] | undefined) => any;
export declare const defaultValidateFilters: (ctx?: Context | undefined, filters?: unknown) => any;
export declare const SORT_TRAVERSALS: string[];
export declare const validateSort: (ctx?: Context | undefined, sort?: unknown, include?: string[] | undefined) => any;
export declare const defaultValidateSort: (ctx?: Context | undefined, sort?: unknown) => any;
export declare const FIELDS_TRAVERSALS: string[];
export declare const validateFields: (ctx?: Context | undefined, fields?: unknown, include?: string[] | undefined) => any;
export declare const defaultValidateFields: (ctx?: Context | undefined, fields?: unknown) => any;
export declare const POPULATE_TRAVERSALS: string[];
export declare const validatePopulate: (ctx?: Context | undefined, populate?: unknown, includes?: {
fields?: string[] | undefined;
sort?: string[] | undefined;
filters?: string[] | undefined;
populate?: string[] | undefined;
} | undefined) => any;
export declare const defaultValidatePopulate: (ctx?: Context | undefined, populate?: unknown) => any;
export {};
//# sourceMappingURL=validators.d.ts.map
{
"name": "@strapi/utils",
"version": "0.0.0-experimental.2a7cb5ff33df35e8ccde5ef918f9f9a4a3ee9a08",
"version": "0.0.0-experimental.2bad311ac375d1115d085a9cee4fdbe11a455caf",
"description": "Shared utilities for the Strapi packages",

@@ -63,6 +63,6 @@ "keywords": [

"@types/node": "18.19.24",
"eslint-config-custom": "0.0.0-experimental.2a7cb5ff33df35e8ccde5ef918f9f9a4a3ee9a08",
"eslint-config-custom": "0.0.0-experimental.2bad311ac375d1115d085a9cee4fdbe11a455caf",
"koa": "2.15.2",
"koa-body": "6.0.1",
"tsconfig": "0.0.0-experimental.2a7cb5ff33df35e8ccde5ef918f9f9a4a3ee9a08"
"tsconfig": "0.0.0-experimental.2bad311ac375d1115d085a9cee4fdbe11a455caf"
},

@@ -73,3 +73,3 @@ "engines": {

},
"gitHead": "2a7cb5ff33df35e8ccde5ef918f9f9a4a3ee9a08"
"gitHead": "2bad311ac375d1115d085a9cee4fdbe11a455caf"
}

Sorry, the diff of this file is too big to display

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc