remult

Full-stack CRUD, simplified, with SSOT TypeScript entities

MIT License

Downloads
18.3K
Stars
2.7K
Committers
36

Bot releases are visible (Hide)

remult - v0.25.8

Published by noam-honig 7 months ago

  • Fixed issues related to skipLibCheck: false
  • Fixed issues with typing of validators #400

Full Changelog: https://github.com/remult/remult/compare/v0.25.7...v0.25.8

remult - v0.25.7

Published by noam-honig 7 months ago

What's Changed

  • Fixed typing issue with validators and typescript 5.4
  • Added deleteMany and updateMany
  • When insert is called in the front-end with an array of items, a single POST call is made to the server
  • Renamed addParameterAndReturnSqlToken to param. addParameterAndReturnSqlToken will be deprecated in future versions
  • Default number storage in knex, previously was decimal(8,2) now, decimal(18,2)
  • Fixed issue where exception throws in initRequest or getUser caused server to crash, instead of return a bad request error
  • Changed required to allow 0 as a value - so only null, undefined and empty strings are considered invalid for a required field
  • Fixed an issue where backendPrefilter was not applied to id based update, save or delete in the backend
  • fix typo in the docs of uniqueOnBackend deprecation by @Yedidyar in https://github.com/remult/remult/pull/369
  • Remult Admin Nested Actions quickfix by @ermincelikovic in https://github.com/remult/remult/pull/342
  • docs: bun hono monorepo example by @bensos000 in https://github.com/remult/remult/pull/375

New Contributors

Full Changelog: https://github.com/remult/remult/compare/v0.25.6...v0.25.7

remult - v0.25.6

Published by noam-honig 7 months ago

What's Changed

  • Added support for orderByNullsFirst in PostgresDataProvider to change the default postgres behavior where nulls are last
  • Added support for tableName option argument for dbNamesOf that'll add the table name to each field
    Before:
    const orders = await dbNamesOf(Order)
    return `(select count(*) from ${orders} where ${orders}.${orders.id}=1)
    
    Now:
    const orders = await dbNamesOf(Order, { tableNames:true })
    return `(select count(*) from ${orders} where ${orders.id}=1)
    
  • improved dbNamesOf of to use by default the wrapIdentifier of the current data provider if no wrap identifier was provided
  • Added support for using dbNamesOf in an sql expression for that same entity
  • Improved performance of dbNamesOf
  • Added support for Hono web framework
  • Improved support for Mono repo scenario #355
  • Added withRemult to next js page router
  • Fixed custom message to some validators (in etc...)
  • Improved support for union string fields

Full Changelog: https://github.com/remult/remult/compare/v0.25.5...v0.25.6

remult - v0.25.5

Published by noam-honig 8 months ago

What's Changed

  • Added admin option to servers, enabling the /api/admin route with a built in entity explorer
    Admin
  • Fixed multiple issues with GraphQL and relations
  • Improved support for esm/cjs in same process scenario
  • Enabled json storage type for mysql & mysql2 knex adapters
  • Fixed issue in case of missing reflect-metadata
  • Added a recommended way to use remult in sveltekit using api/[...remult]/+server.ts route instead of a hook
  • Added ArrayEntityDataProvider to the external api

New Contributors

Full Changelog: https://github.com/remult/remult/compare/v0.25.4...v0.25.5

remult - v0.25.3

Published by noam-honig 9 months ago

  • Fixed #320, dbReadonly columns are not created in the db

Full Changelog: https://github.com/remult/remult/compare/v0.25.2...v0.25.3

remult - v0.25.2

Published by noam-honig 9 months ago

  • Fix the defaultMessage of validators
  • Added Validators.minLength

Full Changelog: https://github.com/remult/remult/compare/v0.25.1...v0.25.2

remult - v0.25.1

Published by noam-honig 9 months ago

What's Changed

  • Fixed issue where defaultGetLimit caused issues with include queries

Full Changelog: https://github.com/remult/remult/compare/v0.25.0...v0.25.1

remult - v0.25.0

Published by noam-honig 9 months ago

Improvement for validators

  • Added required as a FieldOption
  • Added validation for maxLength in StringFieldOptions
  • Added the following validators to the Validators class:
    • regex
    • email
    • url
    • in
    • notNull
    • enum
    • relationExists,
    • maxLength
  • Added support for return value for validations - true || undefined are valid, string will provide the message. For example:
    @Fields.string({
      validate:(task)=> task.title.length > 5 || "too short"
    })
    
  • Added the valueValidator helper function:
    @Fields.string({
      validate: valueValidator(value => value.length > 5)
    })
    
  • Added helper functions to create validators, createValueValidator, createValueValidatorWithArgs, createValidator & createValidatorWithArgs
  • Changed signature of FieldOptions.validate the receive ValidateFieldEvent object as the second parameter instead of FieldRef
  • Updated Signature of required and unique based on api change
  • Adjusted the unique validator to only run on the backend

New Frontend Data Providers

  • Added Origin Private File System Storage to store entities in the front end
    const db = new JsonDataProvider(new JsonEntityOpfsStorage())
    repo(Task, db)
      .find()
      .then((tasks) => console.table(tasks))
    
  • Added SqlJsDataProvider for use with front end sqlite implementation sql.js
    const db = new SqlDatabase(
      new SqlJsDataProvider(initSqlJs().then((x) => new x.Database())),
    )
    repo(Task, db)
      .find()
      .then((tasks) => console.table(tasks))
    

Other

  • Added clone to EntityRef
  • Fixed issue where findOne didn't work
  • Fixed issue where exception XXX is not a known entity, did you forget to set @Entity() or did you forget to add the '@' before the call to Entity? was thrown in cases where multiple instances of remult were in memory
  • Issue #314 resolved by @itamardavidyan in https://github.com/remult/remult/pull/315

New Contributors

Full Changelog: https://github.com/remult/remult/compare/v0.24.1...v0.25.0

remult - v0.24.1

Published by noam-honig 10 months ago

  • Improved JsonDataProvider to support promise for load and save, useful in all sorts of cases
  • Fixed issue with ESM on NodeJS - Module '"remult/postgres"' has no exported member 'createPostgresDataProvider'.

Full Changelog: https://github.com/remult/remult/compare/v0.24.0...v0.24.1

remult - v0.24.0

Published by noam-honig 10 months ago

Changed

  • BREAKING CHANGE: PostgresDataProvider: Column & table names are now quoted (e.g., "firstName") to enforce specific casing in PostgreSQL.
    • To revert to the old (version < 0.24) case-insensitive identifiers, set caseInsensitiveIdentifiers: true when using createPostgresDataProvider.

Added

  • ESM support for NodeJS
  • Support for nuxt Fullstack framework
  • Support for the sqlExpression field option in entities using the knex data provider.
  • schema parameter to PostgresDataProvider & createPostgresDataProvider.
  • findOne method in Repository with a unified options parameter for simplicity.
  • withRemultAsync function in remultExpress for contexts outside the normal request lifecycle.
  • withRemult function for obtaining a valid remult context in server scenarios.
  • Inclusion of EntityMetadata in CaptionTransformer.transformCaption method.
  • dbName attribute in EntityMetadata & FieldMetadata.
  • wrapIdentifier optional parameter in dbNamesOf function.
  • dbNames as an optional parameter in the filterToRaw method of SqlDatabase.
  • wrapIdentifier method in SqlDatabase for wrapping identifiers before sending to the database.

Deprecated

  • getDbName method in EntityMetadata & FieldMetadata (to be removed in future versions).

Removed

  • run method from Remult.

Renamed

  • withRemultPromise to withRemultAsync in RemultServer.

Full Changelog: https://github.com/remult/remult/compare/v0.23.5...v0.24.0

remult - v.0.23.6

Published by noam-honig 10 months ago

  • Fixed issue where delete by id on the backend, didn't go through the deleting hook

Full Changelog: https://github.com/remult/remult/compare/v0.23.5...v0.23.6

remult - v.0.23.5

Published by noam-honig 10 months ago

  • Fixed toOne relation filter null for non nullable fields to work
  • Fixed toOne relation filter on $id:0 failed to work
  • Fixed wrongful loading of toMany relation on api with defaultIncluded

Full Changelog: https://github.com/remult/remult/compare/v0.23.4...v0.23.5

remult - v.0.23.4

Published by noam-honig 10 months ago

  • Fixed Live query to also work in init api #306

Full Changelog: https://github.com/remult/remult/compare/v0.23.3...v0.23.4

remult - v0.23.3

Published by noam-honig 10 months ago

What's Changed

  • Added support for notContains filter option

Full Changelog: https://github.com/remult/remult/compare/v0.23.2...v0.23.3

remult - v0.23.2

Published by noam-honig 10 months ago

remult - v0.23.0

Published by noam-honig 10 months ago

What's Changed

  • Added Relations - see Relations

  • Added LifecycleEvent info for saving,saved,deleting,deleted - see Entity Lifecycle Hooks

    • Breaking change - saving in FieldOptions now has a second parameter if EntityLifeCycle hook - and the fieldRef is the 3rd parameter.
  • Saving, Saved, Deleting, Deleted all run only on the backend now

  • include in api now supports expressions that use the current row

    • Breaking change - instead of if(repo.fields.name.includedInApi) you now need if(repo.fields.name.includedInApi(instance))
  • Changed the way an entity id is defined see Entity id's doc
    Example:

    @Entity<OrderDetails>("orderDetails", { id: { orderId: true, productCode: true } })
    
  • added repo function which is A convenient shortcut function to quickly obtain a repository for a specific entity type in Remult.

    await repo(Task).find()
    
  • Added support for (Hapi api server)[https://hapi.dev/]

  • Fixed exception with toRawFilter

  • Fixed json db to support db names

  • Fixed issue with sort result after live query

  • Fix issue with compound id on middleware based servers

  • Added with remult for sveltekit for usage before the remult hook

  • Fixed issue with requireId not respecting in statement #290

  • findId was changed to no longer use cache by default

Full Changelog: https://github.com/remult/remult/compare/v0.22.12...v0.23.0

remult - v0.22.10

Published by noam-honig 11 months ago

What's Changed

  • Fixed issue with repo.validate without specifying fields

Full Changelog: https://github.com/remult/remult/compare/v0.22.9...v0.22.10

remult - v0.22.9

Published by noam-honig about 1 year ago

What's Changed

  • Fixed issue with Entity Backend Method and fields with allow api false #255

New Contributors

Full Changelog: https://github.com/remult/remult/compare/v0.22.8...v0.22.9

remult - v0.22.8

Published by noam-honig about 1 year ago

What's Changed

  • Fixed an issue with rest call that had both and & or
  • Fixed an issue regarding the usage of ManyToOne fields as part of the id

New Contributors

Full Changelog: https://github.com/remult/remult/compare/v0.22.7...v0.22.8

remult - v0.22.7

Published by noam-honig about 1 year ago

  • Fixed max stack reached in case of reference to self
  • Improved graphql one to many relations
  • Fixed live-query issue with complex filters
  • Refactored tests to use vitest, and latest typescript version
  • Fixed issue with postgres schema builder
  • Fixed schema build to support table name with schema name
  • Cleaned up code and removed angular dependency
Package Rankings
Top 2.68% on Npmjs.org
Top 9.59% on Proxy.golang.org
Top 15.27% on Deno.land