Giter VIP home page Giter VIP logo

nestjs-packages's Introduction

House of Angular NestJS Packages

lerna build

A collection of packages, modules and utilities for NestJS.

Package Description Version Changelog
@house-of-angular/nestjs-streaming Useful providers that allows working with streaming like responses version changelog
@house-of-angular/nestjs-ng-pdf-generator Extension to the @nestjs/ng-universal with pdf-generator api version changelog

Development

Setup

  • $ npm install
  • $ npm run lerna bootstrap

Publish packages

  • npm run lerna version -- --conventional-commits
  • npm run lerna publish from-git

nestjs-packages's People

Contributors

dawidkostka-va avatar dyostiq avatar kgajowy avatar maciejsikorski avatar pwiorek avatar sikora00 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

nestjs-packages's Issues

how to use StreamingType.Partial for video streaming?

hi do you have any example code for video streaming?

return this.responseStreamerFactory(StreamingType.Partial, response).stream({ contentType: 'video/mp4', size: fs.statSync(".compositions/CJ2c23a4d818a4d3bfa20646a48c418643.mp4").size, stream: async () => fs.createReadStream(".compositions/CJ2c23a4d818a4d3bfa20646a48c418643.mp4") });

it works for video playing but unable to fast forward

CQRS: Type-safe class decorator

Hey there, first of all i'd like to say excellent work on the projects in this repo, the typed cqrs package is awesome!

Is your feature request related to a problem? Please describe.
I've ran into a minor DX issue a few times where i update the class annotation to handle a different command e.g. @CommandHandler(Command1) -> @Commandhandler(OtherCommand).
Because the type-safety of the handler class is currently enforced by the IInferredCommandHandler interface, i'd need to remember to update the implements clause as well.

Describe the solution you'd like
It would be nice if the type-safety for the handler came from the decorator, allowing us to omit the need for the interface, and only needing to reference the target command in one place.

Could maybe be achieved like so:

import { CommandHandler as BaseCommandHandler } from "@nestjs-architects/typed-cqrs"

type InferredResultType<CommandType extends Command<unknown>> = CommandType extends Command<infer R> ? R
: never;

interface Handler<T extends Command<unknown>> {
  execute(command: T): Promise<InferredResultType<T>>
}

export const CommandHandler = <C extends Command<unknown>>(command: Constructor<C>) => {
  return (target: Constructor<Handler<C>>) => {
    BaseCommandHandler(command)(target)
  };
};

Allowing the handler to look like so:

@CommandHandler(SomeCommand)
export class MyHandler {
  async execute(command: SomeCommand) {
    //stuff
  }
}

Schematics for DDD like @angular-architects/ddd

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.