├── .gitignore
├── .npmignore
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE.MD
├── README.md
├── README.npm.md
├── cover.png
├── lib
├── constants.ts
├── decorator.ts
├── event.ts
├── explorer.ts
├── helpers.ts
├── index.ts
├── interfaces.ts
├── jobListener.ts
├── metadata.ts
├── module.ts
└── runner.ts
├── package-lock.json
├── package.json
└── tsconfig.json
/.gitignore:
--------------------------------------------------------------------------------
1 | # dependencies
2 | /node_modules
3 |
4 | # IDE
5 | /.idea
6 | /.awcache
7 | /.vscode
8 |
9 | # misc
10 | npm-debug.log
11 | .DS_Store
12 |
13 | # tests
14 | /test
15 | /coverage
16 | /.nyc_output
17 |
18 | # dist
19 | dist
--------------------------------------------------------------------------------
/.npmignore:
--------------------------------------------------------------------------------
1 | # source
2 | lib
3 | tests
4 | index.ts
5 | package-lock.json
6 | tslint.json
7 | tsconfig.json
8 | .prettierrc
9 |
10 | # github
11 | cover.png
12 | .github
13 | CONTRIBUTING.md
14 | CODE_OF_CONDUCT.md
15 | README.md
16 |
17 | # misc
18 | .commitlintrc.json
19 | .release-it.json
20 | .eslintignore
21 | .eslintrc.js
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Contributor Covenant Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | In the interest of fostering an open and welcoming environment, we as
6 | contributors and maintainers pledge to making participation in our project and
7 | our community a harassment-free experience for everyone, regardless of age, body
8 | size, disability, ethnicity, sex characteristics, gender identity and expression,
9 | level of experience, education, socio-economic status, nationality, personal
10 | appearance, race, religion, or sexual identity and orientation.
11 |
12 | ## Our Standards
13 |
14 | Examples of behavior that contributes to creating a positive environment
15 | include:
16 |
17 | * Using welcoming and inclusive language
18 | * Being respectful of differing viewpoints and experiences
19 | * Gracefully accepting constructive criticism
20 | * Focusing on what is best for the community
21 | * Showing empathy towards other community members
22 |
23 | Examples of unacceptable behavior by participants include:
24 |
25 | * The use of sexualized language or imagery and unwelcome sexual attention or
26 | advances
27 | * Trolling, insulting/derogatory comments, and personal or political attacks
28 | * Public or private harassment
29 | * Publishing others' private information, such as a physical or electronic
30 | address, without explicit permission
31 | * Other conduct which could reasonably be considered inappropriate in a
32 | professional setting
33 |
34 | ## Our Responsibilities
35 |
36 | Project maintainers are responsible for clarifying the standards of acceptable
37 | behavior and are expected to take appropriate and fair corrective action in
38 | response to any instances of unacceptable behavior.
39 |
40 | Project maintainers have the right and responsibility to remove, edit, or
41 | reject comments, commits, code, wiki edits, issues, and other contributions
42 | that are not aligned to this Code of Conduct, or to ban temporarily or
43 | permanently any contributor for other behaviors that they deem inappropriate,
44 | threatening, offensive, or harmful.
45 |
46 | ## Scope
47 |
48 | This Code of Conduct applies both within project spaces and in public spaces
49 | when an individual is representing the project or its community. Examples of
50 | representing a project or community include using an official project e-mail
51 | address, posting via an official social media account, or acting as an appointed
52 | representative at an online or offline event. Representation of a project may be
53 | further defined and clarified by project maintainers.
54 |
55 | ## Enforcement
56 |
57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be
58 | reported by contacting the project team at vinayaksarawagi25@gmail.com. All
59 | complaints will be reviewed and investigated and will result in a response that
60 | is deemed necessary and appropriate to the circumstances. The project team is
61 | obligated to maintain confidentiality with regard to the reporter of an incident.
62 | Further details of specific enforcement policies may be posted separately.
63 |
64 | Project maintainers who do not follow or enforce the Code of Conduct in good
65 | faith may face temporary or permanent repercussions as determined by other
66 | members of the project's leadership.
67 |
68 | ## Attribution
69 |
70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71 | available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72 |
73 | [homepage]: https://www.contributor-covenant.org
74 |
75 | For answers to common questions about this code of conduct, see
76 | https://www.contributor-covenant.org/faq
77 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing
2 |
3 | When contributing to this repository, please first discuss the change you wish to make via issue,
4 | email, or any other method with the owners of this repository before making a change.
5 |
6 | Please note we have a code of conduct, please follow it in all your interactions with the project.
7 |
8 | ## Pull Request Process
9 |
10 | 1. Ensure any install or build dependencies are removed before the end of the layer when doing a
11 | build.
12 | 2. Update the README.md with details of changes to the interface, this includes new environment
13 | variables, exposed ports, useful file locations and container parameters.
14 | 3. You may merge the Pull Request in once you have the sign-off of two other developers, or if you
15 | do not have permission to do that, you may request the second reviewer to merge it for you.
16 |
17 | ## Code of Conduct
18 |
19 | ### Our Pledge
20 |
21 | In the interest of fostering an open and welcoming environment, we as
22 | contributors and maintainers pledge to making participation in our project and
23 | our community a harassment-free experience for everyone, regardless of age, body
24 | size, disability, ethnicity, gender identity and expression, level of experience,
25 | nationality, personal appearance, race, religion, or sexual identity and
26 | orientation.
27 |
28 | ### Our Standards
29 |
30 | Examples of behavior that contributes to creating a positive environment
31 | include:
32 |
33 | * Using welcoming and inclusive language
34 | * Being respectful of differing viewpoints and experiences
35 | * Gracefully accepting constructive criticism
36 | * Focusing on what is best for the community
37 | * Showing empathy towards other community members
38 |
39 | Examples of unacceptable behavior by participants include:
40 |
41 | * The use of sexualized language or imagery and unwelcome sexual attention or
42 | advances
43 | * Trolling, insulting/derogatory comments, and personal or political attacks
44 | * Public or private harassment
45 | * Publishing others' private information, such as a physical or electronic
46 | address, without explicit permission
47 | * Other conduct which could reasonably be considered inappropriate in a
48 | professional setting
49 |
50 | ### Our Responsibilities
51 |
52 | Project maintainers are responsible for clarifying the standards of acceptable
53 | behavior and are expected to take appropriate and fair corrective action in
54 | response to any instances of unacceptable behavior.
55 |
56 | Project maintainers have the right and responsibility to remove, edit, or
57 | reject comments, commits, code, wiki edits, issues, and other contributions
58 | that are not aligned to this Code of Conduct, or to ban temporarily or
59 | permanently any contributor for other behaviors that they deem inappropriate,
60 | threatening, offensive, or harmful.
61 |
62 | ### Scope
63 |
64 | This Code of Conduct applies both within project spaces and in public spaces
65 | when an individual is representing the project or its community. Examples of
66 | representing a project or community include using an official project e-mail
67 | address, posting via an official social media account, or acting as an appointed
68 | representative at an online or offline event. Representation of a project may be
69 | further defined and clarified by project maintainers.
70 |
71 | ### Enforcement
72 |
73 | Instances of abusive, harassing, or otherwise unacceptable behavior may be
74 | reported by contacting the project team at [INSERT EMAIL ADDRESS]. All
75 | complaints will be reviewed and investigated and will result in a response that
76 | is deemed necessary and appropriate to the circumstances. The project team is
77 | obligated to maintain confidentiality with regard to the reporter of an incident.
78 | Further details of specific enforcement policies may be posted separately.
79 |
80 | Project maintainers who do not follow or enforce the Code of Conduct in good
81 | faith may face temporary or permanent repercussions as determined by other
82 | members of the project's leadership.
83 |
84 | ### Attribution
85 |
86 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
87 | available at [http://contributor-covenant.org/version/1/4][version]
88 |
89 | [homepage]: http://contributor-covenant.org
90 | [version]: http://contributor-covenant.org/version/1/4/
91 |
--------------------------------------------------------------------------------
/LICENSE.MD:
--------------------------------------------------------------------------------
1 | # The MIT License (MIT)
2 |
3 | Copyright © 2020 [SquareBoat](https://squareboat.com)
4 |
5 | > Permission is hereby granted, free of charge, to any person obtaining a copy
6 | > of this software and associated documentation files (the "Software"), to deal
7 | > in the Software without restriction, including without limitation the rights
8 | > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | > copies of the Software, and to permit persons to whom the Software is
10 | > furnished to do so, subject to the following conditions:
11 | >
12 | > The above copyright notice and this permission notice shall be included in
13 | > all copies or substantial portions of the Software.
14 | >
15 | > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | > THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
Integrate event listeners easily inside your nestjs application
6 |
7 | Custom implementation of event listeners. Now, run your decoupled code beautifully without ever bothering of shaking the main code.
8 |
9 | ## Features
10 |
11 | - *__Quick Setup__* - Quickly setup and configure your application
12 |
13 | - *__Loose coupling__* - Run codes in parallel accross modules, so that you never need to tightly couple the code.
14 |
15 | ## Documentation
16 |
17 | To read the complete documentation, [click here](https://squareboat.com/open-source/nest-events/).
18 |
19 | ## Contributing
20 | To know about contributing to this package, read the guidelines [here](./CONTRIBUTING.md)
21 |
22 | ## About Us
23 |
24 | We are a bunch of dreamers, designers, and futurists. We are high on collaboration, low on ego, and take our happy hours seriously. We'd love to hear more about your product. Let's talk and turn your great ideas into something even greater! We have something in store for everyone. [☎️ 📧 Connect with us!](https://squareboat.com/contact)
25 |
26 | ## License
27 |
28 | The MIT License. Please see License File for more information. Copyright © 2020 SquareBoat.
29 |
30 | Made with ❤️ by [Squareboat](https://squareboat.com)
31 |
--------------------------------------------------------------------------------
/README.npm.md:
--------------------------------------------------------------------------------
1 | Integrate event listeners easily inside your nestjs application
2 |
3 | Custom implementation of event listeners. Now, run your decoupled code beautifully without ever bothering of shaking the main code.
4 |
5 | ## Features
6 |
7 | - *__Quick Setup__* - Quickly setup and configure your application
8 |
9 | - *__Loose coupling__* - Run codes in parallel accross modules, so that you never need to tightly couple the code.
10 |
11 | ## Documentation
12 |
13 | To read the complete documentation, [click here](https://opensource.squareboat.com/nest-events/).
14 |
15 | ## Contributing
16 | To know about contributing to this package, read the guidelines [here](./CONTRIBUTING.md)
17 |
18 |
19 | ## About Us
20 |
21 | We are a bunch of dreamers, designers, and futurists. We are high on collaboration, low on ego, and take our happy hours seriously. We'd love to hear more about your product. Let's talk and turn your great ideas into something even greater! We have something in store for everyone. [☎️ 📧 Connect with us!](https://squareboat.com/contact)
22 |
23 | ## License
24 |
25 | The MIT License. Please see License File for more information. Copyright © 2020 SquareBoat.
26 |
27 | Made with ❤️ by [Squareboat](https://squareboat.com)
28 |
--------------------------------------------------------------------------------
/cover.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/squareboat/nest-events/14356200be4deb1754cd9b611e1010238fbf85db/cover.png
--------------------------------------------------------------------------------
/lib/constants.ts:
--------------------------------------------------------------------------------
1 | export class SquareboatNestEventConstants {
2 | static eventEmitterName = "@squareboat/nest-console/event_emitter_name";
3 | static eventName = "@squareboat/nest-console/event_name";
4 | static eventJobName = "@squareboat/nest-console/queued_event_handler_job";
5 | }
6 |
--------------------------------------------------------------------------------
/lib/decorator.ts:
--------------------------------------------------------------------------------
1 | import "reflect-metadata";
2 | import { SquareboatNestEventConstants } from "./constants";
3 | import { GenericClass } from "./interfaces";
4 |
5 | export function Event(name?: string) {
6 | return function (target: GenericClass) {
7 | Reflect.defineMetadata(
8 | SquareboatNestEventConstants.eventEmitterName,
9 | name || target["name"],
10 | target
11 | );
12 | };
13 | }
14 |
15 | export function ListensTo(event: string | GenericClass) {
16 | const eventName = typeof event === "string" ? event : event["name"];
17 | return function (
18 | target: Record,
19 | propertyKey: string,
20 | descriptor: PropertyDescriptor
21 | ) {
22 | Reflect.defineMetadata(
23 | SquareboatNestEventConstants.eventName,
24 | eventName,
25 | target,
26 | propertyKey
27 | );
28 | };
29 | }
30 |
--------------------------------------------------------------------------------
/lib/event.ts:
--------------------------------------------------------------------------------
1 | import "reflect-metadata";
2 | import { SquareboatNestEventConstants } from "./constants";
3 | import { difference, Package } from "./helpers";
4 | import { GenericFunction } from "./interfaces";
5 | import { EventListenerRunner } from "./runner";
6 |
7 | export class EmitsEvent {
8 | private reservedKeyNames = [
9 | "fetchPayload",
10 | "emit",
11 | "reservedKeyNames",
12 | "dispatch",
13 | ];
14 |
15 | /**
16 | * Emit function
17 | * @returns Promise
18 | */
19 | async emit(): Promise {
20 | type ObjectKey = keyof typeof this;
21 |
22 | const eventName = Reflect.getMetadata(
23 | SquareboatNestEventConstants.eventEmitterName,
24 | this.constructor
25 | );
26 |
27 | const shouldBeQueued = this[
28 | "queueOptions" as ObjectKey
29 | ] as unknown as GenericFunction;
30 |
31 | if (!shouldBeQueued) {
32 | const runner = new EventListenerRunner();
33 | await runner.handle(eventName, this.fetchPayload());
34 | return;
35 | }
36 |
37 | const queueConnection = shouldBeQueued();
38 | await this.dispatch(eventName, queueConnection);
39 | }
40 |
41 | fetchPayload(): Record {
42 | type ObjectKey = keyof typeof this;
43 |
44 | const payloadKeys = difference(
45 | Object.getOwnPropertyNames(this),
46 | this.reservedKeyNames
47 | ) as ObjectKey[];
48 |
49 | const payload = {} as { [key: string]: any };
50 | for (const key of payloadKeys) {
51 | payload[key as string] = this[key];
52 | }
53 |
54 | return payload;
55 | }
56 |
57 | /**
58 | * Dispatches the job to queue
59 | * @param eventName
60 | * @param queueConnection
61 | *
62 | * @returns Promise
63 | */
64 | async dispatch(
65 | eventName: string,
66 | queueConnection: Record | Record[]
67 | ): Promise {
68 | const totalJobOptions = Array.isArray(queueConnection)
69 | ? queueConnection
70 | : [queueConnection];
71 |
72 | const queuePkg = Package.load("@squareboat/nest-queue") as Record<
73 | string,
74 | GenericFunction
75 | >;
76 |
77 | const eventData = this.fetchPayload();
78 | for (const option of totalJobOptions) {
79 | await queuePkg.Dispatch({
80 | job: SquareboatNestEventConstants.eventJobName,
81 | data: {
82 | eventName,
83 | eventData,
84 | discriminator: "@squareboat/nest-event/queueable_event",
85 | },
86 | ...(option || {}),
87 | });
88 | }
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/lib/explorer.ts:
--------------------------------------------------------------------------------
1 | import { Injectable } from "@nestjs/common";
2 | import { DiscoveryService, MetadataScanner } from "@nestjs/core";
3 | import { SquareboatNestEventConstants } from "./constants";
4 | import { EventMetadata } from "./metadata";
5 |
6 | @Injectable()
7 | export class EventExplorer {
8 | constructor(
9 | private readonly discovery: DiscoveryService,
10 | private readonly metadataScanner: MetadataScanner
11 | ) {}
12 |
13 | onModuleInit() {
14 | const wrappers = this.discovery.getProviders();
15 | wrappers.forEach((w) => {
16 | const { instance } = w;
17 | if (
18 | !instance ||
19 | typeof instance === "string" ||
20 | !Object.getPrototypeOf(instance)
21 | ) {
22 | return;
23 | }
24 | this.metadataScanner.scanFromPrototype(
25 | instance,
26 | Object.getPrototypeOf(instance),
27 | (key: string) => this.lookupListeners(instance, key)
28 | );
29 | });
30 | }
31 |
32 | lookupListeners(instance: Record, key: string) {
33 | const methodRef = instance[key];
34 | const hasEventMeta = Reflect.hasMetadata(
35 | SquareboatNestEventConstants.eventName,
36 | instance,
37 | key
38 | );
39 | if (!hasEventMeta) return;
40 | const eventName = Reflect.getMetadata(
41 | SquareboatNestEventConstants.eventName,
42 | instance,
43 | key
44 | );
45 | EventMetadata.addListener(eventName, methodRef.bind(instance));
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/lib/helpers.ts:
--------------------------------------------------------------------------------
1 | import { EmitsEvent } from "./event";
2 |
3 | /**
4 | * Check if value is of type object.
5 | *
6 | * @param value
7 | */
8 | export function isObject(value: any): boolean {
9 | if (typeof value === "object" && value !== null) {
10 | return true;
11 | }
12 | return false;
13 | }
14 |
15 | /**
16 | * Check if value is of type array.
17 | * @param value
18 | */
19 | export function isArray(value: any): boolean {
20 | return Array.isArray(value);
21 | }
22 |
23 | /**
24 | * Check if value is empty
25 | *
26 | * @param value
27 | */
28 | export function isEmpty(value: any): boolean {
29 | if (Array.isArray(value) && value.length < 1) return true;
30 | if (isObject(value) && Object.keys(value).length < 1) return true;
31 | if (!value) return true;
32 |
33 | return false;
34 | }
35 |
36 | export async function EmitEvent(event: EmitsEvent): Promise {
37 | await event.emit();
38 | return;
39 | }
40 |
41 | export function difference(arr1: T[], arr2: T[]): T[] {
42 | if (!isArray(arr1) || !isArray(arr2)) return [];
43 | const keyMap = {} as Record;
44 | const difference = [] as T[];
45 | for (const val of arr2) {
46 | keyMap[val as unknown as string] = true;
47 | }
48 |
49 | for (const val of arr1) {
50 | if (!keyMap[val as unknown as string]) {
51 | difference.push(val);
52 | }
53 | }
54 |
55 | return difference;
56 | }
57 |
58 | export class Package {
59 | static load(pkgName: string): any {
60 | try {
61 | return require(pkgName);
62 | } catch (e) {
63 | console.error(
64 | ` ${pkgName} is missing. Please make sure that you have installed and configured the package first`
65 | );
66 | process.exitCode = 1;
67 | process.exit();
68 | }
69 | }
70 | }
71 |
--------------------------------------------------------------------------------
/lib/index.ts:
--------------------------------------------------------------------------------
1 | export * from "./event";
2 | export * from "./decorator";
3 | export * from "./metadata";
4 | export * from "./explorer";
5 | export * from "./helpers";
6 | export * from "./module";
7 |
--------------------------------------------------------------------------------
/lib/interfaces.ts:
--------------------------------------------------------------------------------
1 | export type GenericFunction = (...args: any[]) => any;
2 | export type GenericClass = Record;
3 |
4 | export interface ShouldBeQueued {
5 | queueOptions(): Record;
6 | }
7 |
--------------------------------------------------------------------------------
/lib/jobListener.ts:
--------------------------------------------------------------------------------
1 | import { Injectable } from "@nestjs/common";
2 | import { SquareboatNestEventConstants } from "./constants";
3 | import { EventListenerRunner } from "./runner";
4 |
5 | export const JOB_NAME = "__JOB_NAME__";
6 | export const JOB_OPTIONS = "__JOB_OPTIONS__";
7 |
8 | export function Job(job: string, options?: {}) {
9 | options = options || {};
10 | return function (target: Record, propertyKey: string) {
11 | Reflect.defineMetadata(JOB_NAME, job, target, propertyKey);
12 | Reflect.defineMetadata(JOB_OPTIONS, options, target, propertyKey);
13 | };
14 | }
15 |
16 | @Injectable()
17 | export class EventQueueWorker {
18 | @Job(SquareboatNestEventConstants.eventJobName)
19 | async handle(data: Record): Promise {
20 | const { eventName, eventData } = data;
21 | const runner = new EventListenerRunner();
22 | await runner.handle(eventName, eventData);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/lib/metadata.ts:
--------------------------------------------------------------------------------
1 | import { GenericFunction } from "./interfaces";
2 |
3 | export class EventMetadata {
4 | private static store: Record = { events: {}, listeners: {} };
5 |
6 | static addListener(event: string, target: () => void): void {
7 | const listeners = EventMetadata.store.listeners[event] || [];
8 | listeners.push(target);
9 | EventMetadata.store.listeners[event] = listeners;
10 | }
11 |
12 | static getListeners(event: string): Array {
13 | const listeners = EventMetadata.store.listeners[event];
14 | return listeners || [];
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/lib/module.ts:
--------------------------------------------------------------------------------
1 | import { DynamicModule, Global, Module } from "@nestjs/common";
2 | import { DiscoveryModule } from "@nestjs/core";
3 | import { EventExplorer } from "./explorer";
4 |
5 | @Global()
6 | @Module({
7 | imports: [DiscoveryModule],
8 | providers: [EventExplorer],
9 | })
10 | export class EventModule {
11 | /**
12 | * Register options
13 | * @param options
14 | */
15 | static register(): DynamicModule {
16 | return {
17 | global: true,
18 | module: EventModule,
19 | imports: [DiscoveryModule],
20 | providers: [EventExplorer],
21 | };
22 | }
23 |
24 | /**
25 | * Register Async Options
26 | */
27 | static registerAsync(): DynamicModule {
28 | return {
29 | global: true,
30 | module: EventModule,
31 | imports: [DiscoveryModule],
32 | providers: [EventExplorer],
33 | };
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/lib/runner.ts:
--------------------------------------------------------------------------------
1 | import { isEmpty } from "./helpers";
2 | import { EventMetadata } from "./metadata";
3 |
4 | export class EventListenerRunner {
5 | async handle(eventName: string, eventData: any): Promise {
6 | const promises = [];
7 | const listeners = EventMetadata.getListeners(eventName);
8 | if (isEmpty(listeners)) return;
9 |
10 | for (const listener of listeners) {
11 | promises.push(listener(eventData));
12 | }
13 |
14 | await Promise.all(promises);
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@squareboat/nest-events",
3 | "version": "0.1.1",
4 | "lockfileVersion": 2,
5 | "requires": true,
6 | "packages": {
7 | "": {
8 | "name": "@squareboat/nest-events",
9 | "version": "0.1.1",
10 | "license": "MIT",
11 | "devDependencies": {
12 | "@nestjs/common": "^9.0.3",
13 | "@nestjs/core": "^9.0.3",
14 | "@types/node": "^18.0.5",
15 | "reflect-metadata": "^0.1.13",
16 | "typescript": "^4.7.4"
17 | },
18 | "peerDependencies": {
19 | "@nestjs/core": "^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0",
20 | "reflect-metadata": "^0.1.13"
21 | }
22 | },
23 | "node_modules/@nestjs/common": {
24 | "version": "9.0.3",
25 | "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-9.0.3.tgz",
26 | "integrity": "sha512-QPUdWb6srXmJeRlnavLa0FHFXtgajm/WsyYn/MlHpzqTv7VRfB/zLicwPofdH+CozVvzoZp+c63Khuysg9uasw==",
27 | "dev": true,
28 | "dependencies": {
29 | "iterare": "1.2.1",
30 | "tslib": "2.4.0",
31 | "uuid": "8.3.2"
32 | },
33 | "funding": {
34 | "type": "opencollective",
35 | "url": "https://opencollective.com/nest"
36 | },
37 | "peerDependencies": {
38 | "cache-manager": "*",
39 | "class-transformer": "*",
40 | "class-validator": "*",
41 | "reflect-metadata": "^0.1.12",
42 | "rxjs": "^7.1.0"
43 | },
44 | "peerDependenciesMeta": {
45 | "cache-manager": {
46 | "optional": true
47 | },
48 | "class-transformer": {
49 | "optional": true
50 | },
51 | "class-validator": {
52 | "optional": true
53 | }
54 | }
55 | },
56 | "node_modules/@nestjs/core": {
57 | "version": "9.0.3",
58 | "resolved": "https://registry.npmjs.org/@nestjs/core/-/core-9.0.3.tgz",
59 | "integrity": "sha512-TFXCfcqt1FqN/54hrrfdLZgAroDjqbkJ8mDcFiD4JFuQGIHkgofXXEtjfwPAEfR41RLxB8612Pf0UjI4bag4Vw==",
60 | "dev": true,
61 | "hasInstallScript": true,
62 | "license": "MIT",
63 | "dependencies": {
64 | "@nuxtjs/opencollective": "0.3.2",
65 | "fast-safe-stringify": "2.1.1",
66 | "iterare": "1.2.1",
67 | "object-hash": "3.0.0",
68 | "path-to-regexp": "3.2.0",
69 | "tslib": "2.4.0",
70 | "uuid": "8.3.2"
71 | },
72 | "funding": {
73 | "type": "opencollective",
74 | "url": "https://opencollective.com/nest"
75 | },
76 | "peerDependencies": {
77 | "@nestjs/common": "^9.0.0",
78 | "@nestjs/microservices": "^9.0.0",
79 | "@nestjs/platform-express": "^9.0.0",
80 | "@nestjs/websockets": "^9.0.0",
81 | "reflect-metadata": "^0.1.12",
82 | "rxjs": "^7.1.0"
83 | },
84 | "peerDependenciesMeta": {
85 | "@nestjs/microservices": {
86 | "optional": true
87 | },
88 | "@nestjs/platform-express": {
89 | "optional": true
90 | },
91 | "@nestjs/websockets": {
92 | "optional": true
93 | }
94 | }
95 | },
96 | "node_modules/@nuxtjs/opencollective": {
97 | "version": "0.3.2",
98 | "resolved": "https://registry.npmjs.org/@nuxtjs/opencollective/-/opencollective-0.3.2.tgz",
99 | "integrity": "sha512-um0xL3fO7Mf4fDxcqx9KryrB7zgRM5JSlvGN5AGkP6JLM5XEKyjeAiPbNxdXVXQ16isuAhYpvP88NgL2BGd6aA==",
100 | "dev": true,
101 | "dependencies": {
102 | "chalk": "^4.1.0",
103 | "consola": "^2.15.0",
104 | "node-fetch": "^2.6.1"
105 | },
106 | "bin": {
107 | "opencollective": "bin/opencollective.js"
108 | },
109 | "engines": {
110 | "node": ">=8.0.0",
111 | "npm": ">=5.0.0"
112 | }
113 | },
114 | "node_modules/@types/node": {
115 | "version": "18.0.5",
116 | "resolved": "https://registry.npmjs.org/@types/node/-/node-18.0.5.tgz",
117 | "integrity": "sha512-En7tneq+j0qAiVwysBD79y86MT3ModuoIJbe7JXp+sb5UAjInSShmK3nXXMioBzfF7rXC12hv12d4IyCVwN4dA==",
118 | "dev": true
119 | },
120 | "node_modules/ansi-styles": {
121 | "version": "4.3.0",
122 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
123 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
124 | "dev": true,
125 | "dependencies": {
126 | "color-convert": "^2.0.1"
127 | },
128 | "engines": {
129 | "node": ">=8"
130 | },
131 | "funding": {
132 | "url": "https://github.com/chalk/ansi-styles?sponsor=1"
133 | }
134 | },
135 | "node_modules/chalk": {
136 | "version": "4.1.2",
137 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
138 | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
139 | "dev": true,
140 | "dependencies": {
141 | "ansi-styles": "^4.1.0",
142 | "supports-color": "^7.1.0"
143 | },
144 | "engines": {
145 | "node": ">=10"
146 | },
147 | "funding": {
148 | "url": "https://github.com/chalk/chalk?sponsor=1"
149 | }
150 | },
151 | "node_modules/color-convert": {
152 | "version": "2.0.1",
153 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
154 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
155 | "dev": true,
156 | "dependencies": {
157 | "color-name": "~1.1.4"
158 | },
159 | "engines": {
160 | "node": ">=7.0.0"
161 | }
162 | },
163 | "node_modules/color-name": {
164 | "version": "1.1.4",
165 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
166 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
167 | "dev": true
168 | },
169 | "node_modules/consola": {
170 | "version": "2.15.3",
171 | "resolved": "https://registry.npmjs.org/consola/-/consola-2.15.3.tgz",
172 | "integrity": "sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw==",
173 | "dev": true
174 | },
175 | "node_modules/fast-safe-stringify": {
176 | "version": "2.1.1",
177 | "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz",
178 | "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==",
179 | "dev": true
180 | },
181 | "node_modules/has-flag": {
182 | "version": "4.0.0",
183 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
184 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
185 | "dev": true,
186 | "engines": {
187 | "node": ">=8"
188 | }
189 | },
190 | "node_modules/iterare": {
191 | "version": "1.2.1",
192 | "resolved": "https://registry.npmjs.org/iterare/-/iterare-1.2.1.tgz",
193 | "integrity": "sha512-RKYVTCjAnRthyJes037NX/IiqeidgN1xc3j1RjFfECFp28A1GVwK9nA+i0rJPaHqSZwygLzRnFlzUuHFoWWy+Q==",
194 | "dev": true,
195 | "engines": {
196 | "node": ">=6"
197 | }
198 | },
199 | "node_modules/node-fetch": {
200 | "version": "2.6.7",
201 | "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",
202 | "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",
203 | "dev": true,
204 | "dependencies": {
205 | "whatwg-url": "^5.0.0"
206 | },
207 | "engines": {
208 | "node": "4.x || >=6.0.0"
209 | },
210 | "peerDependencies": {
211 | "encoding": "^0.1.0"
212 | },
213 | "peerDependenciesMeta": {
214 | "encoding": {
215 | "optional": true
216 | }
217 | }
218 | },
219 | "node_modules/object-hash": {
220 | "version": "3.0.0",
221 | "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz",
222 | "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==",
223 | "dev": true,
224 | "engines": {
225 | "node": ">= 6"
226 | }
227 | },
228 | "node_modules/path-to-regexp": {
229 | "version": "3.2.0",
230 | "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-3.2.0.tgz",
231 | "integrity": "sha512-jczvQbCUS7XmS7o+y1aEO9OBVFeZBQ1MDSEqmO7xSoPgOPoowY/SxLpZ6Vh97/8qHZOteiCKb7gkG9gA2ZUxJA==",
232 | "dev": true
233 | },
234 | "node_modules/reflect-metadata": {
235 | "version": "0.1.13",
236 | "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz",
237 | "integrity": "sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg==",
238 | "dev": true
239 | },
240 | "node_modules/rxjs": {
241 | "version": "7.5.6",
242 | "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.6.tgz",
243 | "integrity": "sha512-dnyv2/YsXhnm461G+R/Pe5bWP41Nm6LBXEYWI6eiFP4fiwx6WRI/CD0zbdVAudd9xwLEF2IDcKXLHit0FYjUzw==",
244 | "dev": true,
245 | "peer": true,
246 | "dependencies": {
247 | "tslib": "^2.1.0"
248 | }
249 | },
250 | "node_modules/supports-color": {
251 | "version": "7.2.0",
252 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
253 | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
254 | "dev": true,
255 | "dependencies": {
256 | "has-flag": "^4.0.0"
257 | },
258 | "engines": {
259 | "node": ">=8"
260 | }
261 | },
262 | "node_modules/tr46": {
263 | "version": "0.0.3",
264 | "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
265 | "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==",
266 | "dev": true
267 | },
268 | "node_modules/tslib": {
269 | "version": "2.4.0",
270 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz",
271 | "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==",
272 | "dev": true
273 | },
274 | "node_modules/typescript": {
275 | "version": "4.7.4",
276 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz",
277 | "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==",
278 | "dev": true,
279 | "bin": {
280 | "tsc": "bin/tsc",
281 | "tsserver": "bin/tsserver"
282 | },
283 | "engines": {
284 | "node": ">=4.2.0"
285 | }
286 | },
287 | "node_modules/uuid": {
288 | "version": "8.3.2",
289 | "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
290 | "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
291 | "dev": true,
292 | "bin": {
293 | "uuid": "dist/bin/uuid"
294 | }
295 | },
296 | "node_modules/webidl-conversions": {
297 | "version": "3.0.1",
298 | "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
299 | "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==",
300 | "dev": true
301 | },
302 | "node_modules/whatwg-url": {
303 | "version": "5.0.0",
304 | "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
305 | "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
306 | "dev": true,
307 | "dependencies": {
308 | "tr46": "~0.0.3",
309 | "webidl-conversions": "^3.0.0"
310 | }
311 | }
312 | },
313 | "dependencies": {
314 | "@nestjs/common": {
315 | "version": "9.0.3",
316 | "resolved": "https://registry.npmjs.org/@nestjs/common/-/common-9.0.3.tgz",
317 | "integrity": "sha512-QPUdWb6srXmJeRlnavLa0FHFXtgajm/WsyYn/MlHpzqTv7VRfB/zLicwPofdH+CozVvzoZp+c63Khuysg9uasw==",
318 | "dev": true,
319 | "requires": {
320 | "iterare": "1.2.1",
321 | "tslib": "2.4.0",
322 | "uuid": "8.3.2"
323 | }
324 | },
325 | "@nestjs/core": {
326 | "version": "9.0.3",
327 | "resolved": "https://registry.npmjs.org/@nestjs/core/-/core-9.0.3.tgz",
328 | "integrity": "sha512-TFXCfcqt1FqN/54hrrfdLZgAroDjqbkJ8mDcFiD4JFuQGIHkgofXXEtjfwPAEfR41RLxB8612Pf0UjI4bag4Vw==",
329 | "dev": true,
330 | "requires": {
331 | "@nuxtjs/opencollective": "0.3.2",
332 | "fast-safe-stringify": "2.1.1",
333 | "iterare": "1.2.1",
334 | "object-hash": "3.0.0",
335 | "path-to-regexp": "3.2.0",
336 | "tslib": "2.4.0",
337 | "uuid": "8.3.2"
338 | }
339 | },
340 | "@nuxtjs/opencollective": {
341 | "version": "0.3.2",
342 | "resolved": "https://registry.npmjs.org/@nuxtjs/opencollective/-/opencollective-0.3.2.tgz",
343 | "integrity": "sha512-um0xL3fO7Mf4fDxcqx9KryrB7zgRM5JSlvGN5AGkP6JLM5XEKyjeAiPbNxdXVXQ16isuAhYpvP88NgL2BGd6aA==",
344 | "dev": true,
345 | "requires": {
346 | "chalk": "^4.1.0",
347 | "consola": "^2.15.0",
348 | "node-fetch": "^2.6.1"
349 | }
350 | },
351 | "@types/node": {
352 | "version": "18.0.5",
353 | "resolved": "https://registry.npmjs.org/@types/node/-/node-18.0.5.tgz",
354 | "integrity": "sha512-En7tneq+j0qAiVwysBD79y86MT3ModuoIJbe7JXp+sb5UAjInSShmK3nXXMioBzfF7rXC12hv12d4IyCVwN4dA==",
355 | "dev": true
356 | },
357 | "ansi-styles": {
358 | "version": "4.3.0",
359 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
360 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
361 | "dev": true,
362 | "requires": {
363 | "color-convert": "^2.0.1"
364 | }
365 | },
366 | "chalk": {
367 | "version": "4.1.2",
368 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
369 | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
370 | "dev": true,
371 | "requires": {
372 | "ansi-styles": "^4.1.0",
373 | "supports-color": "^7.1.0"
374 | }
375 | },
376 | "color-convert": {
377 | "version": "2.0.1",
378 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
379 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
380 | "dev": true,
381 | "requires": {
382 | "color-name": "~1.1.4"
383 | }
384 | },
385 | "color-name": {
386 | "version": "1.1.4",
387 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
388 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
389 | "dev": true
390 | },
391 | "consola": {
392 | "version": "2.15.3",
393 | "resolved": "https://registry.npmjs.org/consola/-/consola-2.15.3.tgz",
394 | "integrity": "sha512-9vAdYbHj6x2fLKC4+oPH0kFzY/orMZyG2Aj+kNylHxKGJ/Ed4dpNyAQYwJOdqO4zdM7XpVHmyejQDcQHrnuXbw==",
395 | "dev": true
396 | },
397 | "fast-safe-stringify": {
398 | "version": "2.1.1",
399 | "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz",
400 | "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==",
401 | "dev": true
402 | },
403 | "has-flag": {
404 | "version": "4.0.0",
405 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
406 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
407 | "dev": true
408 | },
409 | "iterare": {
410 | "version": "1.2.1",
411 | "resolved": "https://registry.npmjs.org/iterare/-/iterare-1.2.1.tgz",
412 | "integrity": "sha512-RKYVTCjAnRthyJes037NX/IiqeidgN1xc3j1RjFfECFp28A1GVwK9nA+i0rJPaHqSZwygLzRnFlzUuHFoWWy+Q==",
413 | "dev": true
414 | },
415 | "node-fetch": {
416 | "version": "2.6.7",
417 | "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",
418 | "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",
419 | "dev": true,
420 | "requires": {
421 | "whatwg-url": "^5.0.0"
422 | }
423 | },
424 | "object-hash": {
425 | "version": "3.0.0",
426 | "resolved": "https://registry.npmjs.org/object-hash/-/object-hash-3.0.0.tgz",
427 | "integrity": "sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==",
428 | "dev": true
429 | },
430 | "path-to-regexp": {
431 | "version": "3.2.0",
432 | "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-3.2.0.tgz",
433 | "integrity": "sha512-jczvQbCUS7XmS7o+y1aEO9OBVFeZBQ1MDSEqmO7xSoPgOPoowY/SxLpZ6Vh97/8qHZOteiCKb7gkG9gA2ZUxJA==",
434 | "dev": true
435 | },
436 | "reflect-metadata": {
437 | "version": "0.1.13",
438 | "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz",
439 | "integrity": "sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg==",
440 | "dev": true
441 | },
442 | "rxjs": {
443 | "version": "7.5.6",
444 | "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.5.6.tgz",
445 | "integrity": "sha512-dnyv2/YsXhnm461G+R/Pe5bWP41Nm6LBXEYWI6eiFP4fiwx6WRI/CD0zbdVAudd9xwLEF2IDcKXLHit0FYjUzw==",
446 | "dev": true,
447 | "peer": true,
448 | "requires": {
449 | "tslib": "^2.1.0"
450 | }
451 | },
452 | "supports-color": {
453 | "version": "7.2.0",
454 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz",
455 | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
456 | "dev": true,
457 | "requires": {
458 | "has-flag": "^4.0.0"
459 | }
460 | },
461 | "tr46": {
462 | "version": "0.0.3",
463 | "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
464 | "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==",
465 | "dev": true
466 | },
467 | "tslib": {
468 | "version": "2.4.0",
469 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz",
470 | "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==",
471 | "dev": true
472 | },
473 | "typescript": {
474 | "version": "4.7.4",
475 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.7.4.tgz",
476 | "integrity": "sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==",
477 | "dev": true
478 | },
479 | "uuid": {
480 | "version": "8.3.2",
481 | "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
482 | "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
483 | "dev": true
484 | },
485 | "webidl-conversions": {
486 | "version": "3.0.1",
487 | "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
488 | "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==",
489 | "dev": true
490 | },
491 | "whatwg-url": {
492 | "version": "5.0.0",
493 | "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
494 | "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
495 | "dev": true,
496 | "requires": {
497 | "tr46": "~0.0.3",
498 | "webidl-conversions": "^3.0.0"
499 | }
500 | }
501 | }
502 | }
503 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "@squareboat/nest-events",
3 | "version": "0.1.1",
4 | "description": " The event listener package for your NestJS Applications",
5 | "main": "dist/index.js",
6 | "types": "dist/index.d.ts",
7 | "keywords": [
8 | "nestjs",
9 | "nestjs-events",
10 | "event-listeners"
11 | ],
12 | "repository": {
13 | "type": "git",
14 | "url": "https://github.com/squareboat/nest-events.git"
15 | },
16 | "bugs": {
17 | "url": "https://github.com/squareboat/nest-events/issues"
18 | },
19 | "homepage": "https://github.com/squareboat/nest-events",
20 | "author": "Vinayak Sarawagi ",
21 | "private": false,
22 | "license": "MIT",
23 | "scripts": {
24 | "build": "rm -rf dist && tsc -p tsconfig.json",
25 | "format": "prettier --write \"**/*.ts\"",
26 | "lint": "eslint 'lib/**/*.ts' --fix",
27 | "readme:npm": "mv README.md README.git.md && mv README.npm.md README.md",
28 | "readme:git": "mv README.md README.npm.md && mv README.git.md README.md",
29 | "prepublish:npm": "npm run readme:npm && npm run build",
30 | "publish:npm": "npm publish --access public",
31 | "postpublish:npm": "npm run readme:git",
32 | "prepublish:next": "npm run build",
33 | "publish:next": "npm publish --access public --tag next",
34 | "test:e2e": "jest --config ./tests/jest-e2e.json --runInBand",
35 | "test:e2e:dev": "jest --config ./tests/jest-e2e.json --runInBand --watch"
36 | },
37 | "devDependencies": {
38 | "@nestjs/common": "^9.0.3",
39 | "@nestjs/core": "^9.0.3",
40 | "@types/node": "^18.0.5",
41 | "reflect-metadata": "^0.1.13",
42 | "typescript": "^4.7.4"
43 | },
44 | "peerDependencies": {
45 | "@nestjs/core": "^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0",
46 | "reflect-metadata": "^0.1.13"
47 | }
48 | }
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "module": "commonjs",
4 | "declaration": true,
5 | "strict": true,
6 | "removeComments": true,
7 | "noLib": false,
8 | "emitDecoratorMetadata": true,
9 | "experimentalDecorators": true,
10 | "target": "es6",
11 | "sourceMap": false,
12 | "outDir": "./dist",
13 | "rootDir": "./lib",
14 | "skipLibCheck": true
15 | },
16 | "include": ["lib/**/*"],
17 | "exclude": ["node_modules", "**/*.spec.ts", "tests"]
18 | }
19 |
--------------------------------------------------------------------------------