npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@clairejs/core

v3.8.10

Published

Claire dependency injection foundation and common services.

Downloads

299

Readme

Change Log

3.8.10

  • update id for Identifiable model
  • fix registerModel DAG issue

3.8.8

  • update CachedDataContainer
  • fix DAG order for global store models
  • change returning queries from boolean to string[]
  • allow RecursiveKey in AbstractModel "_" function
  • change model-field separator from '.' to ':'
  • fix getObjectMetadata,
  • auto recognize nested dto
  • remove DataType.POINT

3.7.13

  • fix floating in GeoPoint
  • add RecursiveType to allow query to sub document
  • add RecursiveKeys util type and fix @Index key
  • update IndexType
  • restrict index type
  • add back @Index decorator
  • fix accent map
  • remove @Index decorator from core
  • fix DefaultLogger output
  • change ApiInfo.name to ApiInfo.displayName
  • return DataType.Object if reflect data type not found
  • rename Permission to ApiInfo add back api group name
  • remove access condition types from core, moved to id-sdk

3.6.5

  • add LogHandler interface into AbstractLogger and public the log method
  • allow registering exit handler in ClaireApp
  • fix missing relax: true in query validators
  • fix validateData adding undefined keys
  • fix OrderDirective in queries

3.5.2

  • export as esm module
  • remove webpack, use tsc to compile

3.4.2

  • remove UpdateRecordsResponse, re-use the UpdateManyResponse, and update records dto factories
  • add UpdateRecordsBody & UpdateRecordsResponse

3.4.0

  • add LogContext to provide log context for logger

3.3.28

  • fix protected scope
  • generic the args[] of CachedDataContainer

3.3.26

  • add ApiInfoResponse dto

3.3.25

  • fix registerSingleton instance not inited

3.3.24

  • fix data cointainer set value must update cache value

3.3.23

  • type resolve of GeoPoint
  • fix @Index decorator typing issue

3.3.21

  • add POINT data type and GeoPoint dto class

3.3.20

  • add TFA_REQUIRED to core errors
  • fix type issue with @Inject()

3.3.18

  • add getFieldMetadata function

3.3.17

  • export searchCompare function

3.3.16

  • export getInstance function

3.3.15

  • fix nested error message

3.3.14

  • add registerSingleton method in service provider

3.3.13

  • add some errors with code
  • update error builder to return normal object instead of Error object

3.3.10

  • remove dataType from OmitProps, allow data type to be explicitly scepcified in some case

3.3.9

  • export FieldsQuery

3.3.8

  • add @Index decorator for model and IndexInfo in ModelMetadata

3.3.6

  • add pick function to pick metadata to new class

3.3.5

  • add select/combine function to combine multiple @Data classes
  • split GetManyQueries class into multiple sub classes

3.3.3

  • add CachedDataContainer
  • add SerializedValueProvider

3.3.2

  • fix IdParam
  • Fix Identificable remove @Field decorator
  • AbstractModel has id converted from number to string

3.2.10

  • generalize Identificable class

3.2.9

  • fix missing HttpMethod

3.2.8

  • move setSystemLocale & getSystemLocale from server to core
  • conditional types for GetManyQueries & UpdateManyQueries (nested @HasMany & HasOne fields)

3.2.5

  • registerModel sorts the models array by DAG order

3.2.4

  • add random to order directive

3.2.3

  • add omitData function
  • return default option field in CRUD create many

3.2.1

  • fix enum array element data type
  • move crud dto factory to core
  • add GetManyQueriesClass factory

3.1.36

  • fix validateData validate rangeProps
  • add GetManyResponseBodyClass factory

3.1.34

  • fix validateData replace empty string by undefined
  • fix pickData ignore zero and empty string value

3.1.32

  • fix diffNestedArray to return undefined if array are the same
  • fix diffData to accept partial as new object
  • add diffNestedArray to diff @HasMany field
  • add fillDefault to validateData to control auto fill of default value when validate data

3.1.27

  • add uniqueReducer
  • fix type check for @HasOne and @HasMany

3.1.26

  • add removeAccent function, fix mising accent
  • improve diffData, add pickData function
  • fix deepMerge not handle null correctly
  • diffData recursively

3.1.21

  • move LocaleEntry & LocaleTranslation models to claire server
  • add locale for GetManyQueries
  • add @LocalOf() decorator for multi-lingual processing
  • add LocaleEntry & LocaleTranslation models

3.1.15

  • fix typing
  • add default value in DtoFieldMetadata => fix validateData to replace default value
  • add @HasOne in dto decorator

3.1.10

  • replace Socket message type DISCONNECTION to READY
  • IClientSocket on disconnect with error
  • remove QueryOperator (move back to server package)

3.1.6

  • remove ISocket
  • refactor socket message

3.1.5

  • fix leanData
  • add deepMerge

3.1.3

  • ignore crud to dto
  • DeepPartial for http request/response dto

3.1.2

  • move fk and pk to dto
  • move hasMany and ignoreCrud to Dto

3.1.1

  • add Identifiable class
  • @Data strict is now the default behavior
  • add DeepPartial and DeepPartialClass

3.0.30

  • remove currentUser, move to claire server logic

3.0.29

  • remove uriMapper from claire core (move to claire server)

3.0.28

  • update mimeProps adding oldUri param for uriMapper

3.0.27

  • add diffData, leanData, stripData functions to data validator

3.0.25

-- add @ElementDto decorator

3.0.24

  • add ISocket interface
  • add DTO as new condition value type

3.0.21

  • fix metadata field clone using array slice, using object clone instead

3.0.20

  • add isPrimitive and description to DtoMetadata
  • change DtoFieldMetadata.objectTypeConstructor -> DtoFieldMetadata.elementDto

3.0.15

  • add allow null in vector props
  • add isSymbol to support array search for setting key

3.0.10

  • timestampt bigint decoration

3.0.9

  • re-introduce Errors & ErrorBuilder

3.0.8

  • add Enum decorator support

3.0.6

  • using getTableName to convert model name to table name and model id
  • static _ method return "key of T" so that IQuery won't complain
  • add static _ method to AbstractModel to extract column name

3.0.3

  • refactor @DTO -> @Data
  • unify interface for @Field & @Column decorator
  • remore ClaireError

2.3.10

  • move QueryOperator interfaces to core

2.3.8

  • add cascade to hasMany
  • fix isIntegral => floating

2.3.7

  • remove @Integral, add @Floating

2.3.6

  • fix default value for model

2.3.5

  • update UpdateManyResponse interface

2.3.4

  • add @HasMany decorator, add currentUser to @FK() decorator

2.3.1

  • add uriMapper/public info in @URI decorator

2.3.0 [Breaking change]

  • @Provider now require baseClass, and no longer need addProvider to be called

2.2.8

  • fix abstract model created at = 0

2.2.7

  • downgrade webpack

2.2.6

  • add @Register for DI injection

2.2.3

  • npm audit

2.2.2

  • allow optional @Inject
  • add resolveOptional to IInjector

2.2.0

  • @Injectable now does not auto register service, but only there to trigger constructor params metadata

2.1.6

  • add timestamp to DefaultLogger

2.1.5

  • add Regex decorator for DTO

2.1.4

  • fix abstract model default value for created at and id
  • auto-detect model default value and apply @Default decorator

2.1.2

  • fix abstract model default value for created at and id

2.1.1

  • add Initable for default logger
  • add IInit in ILogMedium

2.1.0

  • add SocketMethod
  • rename Http to HttpMethod

2.0.9

  • add more errors code
  • export AccessToken interface

2.0.5

  • move constructor dependencies info to metadata to avoid registration when using @Inject decorator

2.0.0

  • BIG CHANGE: upgrade dependency injection and resolve technic
  • WARNING: this change affects the fundamental logic in all of @clairejs/core depedants

1.6.16:

  • update socket messages

1.6.15:

  • fix build script
  • update socket messages
  • fix default logger content serializer

1.6.9:

  • fix some DTO decorators requires AbstractModel

1.6.8:

  • fix SocketAuthenticationDownstreamMessage: authId => authInfo

1.6.7:

  • remove ISocket

1.6.6:

  • add onReconnect and onDisconnect for ISocket

1.6.5:

  • add isOpen(): boolean to ISocket

1.6.4:

  • add @Required(false) ability for @Inject() decorator

1.6.3:

  • adjust ISocket interface

1.6.2:

  • add ISocket

1.6.1:

  • filter initables by environment

1.6.0:

  • revert back to 1.4.23

1.4.23:

  • copy extra keys to validated DTO if not strict

1.4.22:

  • update server modify fn

1.4.20:

  • add mime file size check in dto validator

1.4.16 (Breaking change):

  • move some decorators from Model to Dto

1.4.15:

  • fix validator not validate empty string

1.4.12:

  • add IdParam

1.4.11:

  • add @Relation decorator to dto decorators

1.4.9:

  • add partial to @DTO decorator

1.4.8:

  • move @ServerValue to DtoMetadata

1.4.6:

  • remove isRequired from @PK and @ServerTime decorators to allow DTO extension from Model

1.4.4:

  • reintroduce terser plugin to keep mangled class name

1.4.3:

  • emit source map

1.4.2:

  • fix @Labal decorator
  • export @Label decorator

1.4.0 (Breaking change):

  • introduce DAG to sort initables
  • remove getModels and use public property instead

1.3.9:

  • can provide constructor class to @Inject decorator

1.3.8 (Breaking change):

  • add @Label decorator
  • remove name property of @Field decorator

1.3.7:

  • improve ClaireError

1.3.6:

  • adjust @Timestamp and @ServerTime decorators

1.3.5:

  • add Utils

1.3.4:

  • optional environment and configuration resolver

1.3.3:

  • export @Timestamp decorator

1.3.2:

  • fix typo

1.3.1:

  • refactor ClaireApp and its builder

1.2.7:

  • throw ClaireError in decorators

1.2.6:

  • update tsconfig.json build config

1.2.3:

  • add DtoClass decorator

1.2.2:

  • fix DTO validator

1.2.1:

  • introduce AbstractBootstrap

1.2.0 (Breaking change):

  • update injection, remove some rarely used functions

1.1.2 (Breaking change):

  • update GetManyQueries and UpdateManyQueries signature

1.0.16:

  • fix enum value check

1.0.15:

  • update request response dtos

1.0.14:

  • fix missing export @Searchable decorator

1.0.13:

  • add case and accent sensitive config in @TextField decorator

1.0.10:

  • fix ClaireApp not validate configuration