Skip to content

Commit

Permalink
fix: rename 'node-abstract-repository' refs to monguito
Browse files Browse the repository at this point in the history
  • Loading branch information
Josuto committed Oct 10, 2023
1 parent 8740d60 commit f7bc461
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 19 deletions.
11 changes: 5 additions & 6 deletions examples/nestjs-mongoose-book-manager/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
This is an example of how to use the `node-abstract-repository` library in a NestJS application that uses MongoDB. It
is a dummy book manager that exposes three simple endpoints i.e., create, update, and delete a book, as well as list all
This is an example of how to use `monguito` in a NestJS application that uses MongoDB. It is a dummy book
manager that exposes three simple endpoints i.e., create, update, and delete a book, as well as list all
books. A book may be of type `Book` or any of its subtypes i.e., `PaperBook` and `AudioBook`.

> **Warning**
>
> Some basic knowledge on [NestJS](https://docs.nestjs.com/) is assumed, as well as that you have read the main
> documentation of [node-abstract-repository](../../README.md). The goal of this documentation is not to provide a
> comprehensive guide on the `node-abstract-repository` library usage. Thus, you may want to check
> the [sample application code](./src) as you go reading.
> documentation of [monguito](../../README.md). The goal of this documentation is not to provide a comprehensive
guide on `monguito` usage. Thus, you may want to check the [sample application code](./src) as you go reading.

# Main Contents

Expand Down Expand Up @@ -222,7 +221,7 @@ e.g., [Domain-Driven Design (tactical design)](https://enterprisecraftsmanship.c
I have decided not to do so for simplicity purposes; the book manager presented here is such an extremely
simple CRUD application that introducing services would be over-engineering. I rather implement the minimum amount of
code necessary for the sake of maximising the actual purpose of this documentation: illustrate how to integrate
the `node-abstract-repository` library on a NodeJS-based enterprise application.
`monguito` on a NodeJS-based enterprise application.

Moreover, you would probably not write a `deserialise` function to enable the transformation of JSON request bodies into
domain objects when dealing with `POST` requests. Instead, you would rather use
Expand Down
4 changes: 2 additions & 2 deletions examples/nestjs-mongoose-book-manager/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "nestjs-mongoose-book-manager",
"version": "0.2.0",
"description": "Sample NestJS application that uses the node-abstract-repository library.",
"description": "Sample NestJS application that uses monguito.",
"author": "Josu Martinez",
"private": true,
"license": "MIT",
Expand Down Expand Up @@ -29,7 +29,7 @@
"@nestjs/platform-express": "^9.0.0",
"class-transformer": "^0.5.1",
"mongoose": "^7.5.0",
"node-abstract-repository": "link:../../",
"monguito": "link:../../",
"reflect-metadata": "^0.1.13",
"rxjs": "^7.2.0",
"typescript-optional": "^3.0.0-alpha.3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
IllegalArgumentException,
MongooseRepository,
Repository,
} from 'node-abstract-repository';
} from 'monguito';
import { AudioBook, Book, PaperBook } from './book';
import { AudioBookSchema, BookSchema, PaperBookSchema } from './book.schemas';
import { Injectable } from '@nestjs/common';
Expand Down
2 changes: 1 addition & 1 deletion examples/nestjs-mongoose-book-manager/src/book.schemas.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { BaseSchema, extendSchema } from 'node-abstract-repository';
import { BaseSchema, extendSchema } from 'monguito';

export const BookSchema = extendSchema(
BaseSchema,
Expand Down
2 changes: 1 addition & 1 deletion examples/nestjs-mongoose-book-manager/src/book.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Entity } from 'node-abstract-repository';
import { Entity } from 'monguito';

export class Book implements Entity {
readonly id?: string;
Expand Down
10 changes: 4 additions & 6 deletions examples/nestjs-mongoose-book-manager/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4659,6 +4659,10 @@ mongoose@^7.1.1, mongoose@^7.5.0:
ms "2.1.3"
sift "16.0.1"

"monguito@link:../..":
version "0.0.0"
uid ""

[email protected]:
version "0.9.0"
resolved "https://registry.yarnpkg.com/mpath/-/mpath-0.9.0.tgz#0c122fe107846e31fc58c75b09c35514b3871904"
Expand Down Expand Up @@ -4736,12 +4740,6 @@ node-abort-controller@^3.0.1:
resolved "https://registry.yarnpkg.com/node-abort-controller/-/node-abort-controller-3.1.1.tgz#a94377e964a9a37ac3976d848cb5c765833b8548"
integrity sha512-AGK2yQKIjRuqnc6VkX2Xj5d+QW8xZ87pa1UK6yA6ouUyuxfHuMP6umE5QK7UmTeOAymo+Zx1Fxiuw9rVx8taHQ==

"node-abstract-repository@link:../..":
version "2.7.0"
dependencies:
mongoose "^7.1.1"
typescript-optional "^3.0.0-alpha.3"

[email protected]:
version "1.11.0"
resolved "https://registry.yarnpkg.com/node-emoji/-/node-emoji-1.11.0.tgz#69a0150e6946e2f115e9d7ea4df7971e2628301c"
Expand Down
8 changes: 8 additions & 0 deletions monguito.code-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"folders": [
{
"path": "."
}
],
"settings": {}
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "node-abstract-repository",
"name": "monguito",
"version": "2.8.0",
"description": "Node.js lightweight abstract and polymorphic MongoDB repository implementation.",
"author": {
Expand All @@ -9,7 +9,7 @@
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/josuto/node-abstract-repository.git"
"url": "https://github.com/josuto/monguito.git"
},
"keywords": [
"node",
Expand Down

0 comments on commit f7bc461

Please sign in to comment.