Move to Docusaurs

- install docusaurs
- update content to work with docusaurs
- remove typedoc

mention typegoose/typegoose#273
pull/330/head
hasezoey 3 years ago
parent 302a9a82aa
commit f4f9a1d167
No known key found for this signature in database
GPG Key ID: 9F8C99E834CC54FB
  1. 2
      README.md
  2. 47
      docs/api/decorators/arrayProp.md
  3. 1
      docs/api/decorators/hooks.md
  4. 1
      docs/api/decorators/indexes.md
  5. 22
      docs/api/decorators/mapProp.md
  6. 3
      docs/api/decorators/modelOptions.md
  7. 3
      docs/api/decorators/plugins.md
  8. 3
      docs/api/decorators/prop.md
  9. 5
      docs/api/decorators/queryMethod.md
  10. 3
      docs/api/environment.md
  11. 3
      docs/api/functions/addModelToTypegoose.md
  12. 3
      docs/api/functions/assertions.md
  13. 5
      docs/api/functions/buildSchema.md
  14. 5
      docs/api/functions/deleteModel.md
  15. 5
      docs/api/functions/getClass.md
  16. 5
      docs/api/functions/getClassForDocument.md
  17. 3
      docs/api/functions/getDiscriminatorModelForClass.md
  18. 5
      docs/api/functions/getModelForClass.md
  19. 3
      docs/api/functions/getModelWithString.md
  20. 3
      docs/api/functions/getName.md
  21. 3
      docs/api/functions/setGlobalOptions.md
  22. 3
      docs/api/functions/typeguards/isDocument.md
  23. 3
      docs/api/functions/typeguards/isRefType.md
  24. 7
      docs/api/index.md
  25. 1
      docs/api/types/additional.md
  26. 4
      docs/api/types/documentType.md
  27. 3
      docs/api/types/ref.md
  28. 5
      docs/api/types/returnModelType.md
  29. 5
      docs/api/virtuals.md
  30. 73
      docs/changelog.md
  31. 5
      docs/guides/advanced/changeIDType.md
  32. 1
      docs/guides/advanced/common-plugins.md
  33. 1
      docs/guides/advanced/custom-types.md
  34. 1
      docs/guides/advanced/logger.md
  35. 5
      docs/guides/advanced/models-with-same-name.md
  36. 3
      docs/guides/advanced/objectId.md
  37. 3
      docs/guides/advanced/reference-other-classes.md
  38. 22
      docs/guides/decorators.md
  39. 7
      docs/guides/defaultClasses.md
  40. 1
      docs/guides/deprecation-codes.md
  41. 3
      docs/guides/faq.md
  42. 9
      docs/guides/known-issues.md
  43. 6
      docs/guides/migrate-to-6.md
  44. 2
      docs/guides/migrate-to-7.md
  45. 0
      docs/guides/mongoose-compatibility.csv
  46. 1
      docs/guides/mongoose-compatibility.md
  47. 1
      docs/guides/motivation.md
  48. 10
      docs/guides/quick-start-guide.md
  49. 17
      ghPagesPre.sh
  50. 7
      github-page/.gitignore
  51. 6
      github-page/Gemfile
  52. 251
      github-page/Gemfile.lock
  53. 65
      github-page/_config.yml
  54. 124
      github-page/_data/navigation.yml
  55. 48
      github-page/_docs/decorators/arrayProp.md
  56. 23
      github-page/_docs/decorators/mapProp.md
  57. 21
      github-page/_guides/decorators.md
  58. 1
      github-page/_includes/gitissue
  59. 1
      github-page/_includes/head/custom.html
  60. 38
      github-page/index.md
  61. 21
      github-page/localDeploy.sh
  62. 5
      github-page/travis-.gitignore
  63. 135
      package-lock.json
  64. 1
      package.json
  65. 20
      website/.gitignore
  66. 33
      website/README.md
  67. 3
      website/babel.config.js
  68. 92
      website/docusaurus.config.js
  69. 30
      website/package.json
  70. 14
      website/sidebars.js
  71. 25
      website/src/css/custom.css
  72. 93
      website/src/pages/index.js
  73. 37
      website/src/pages/styles.module.css
  74. 0
      website/static/.nojekyll
  75. 9656
      website/yarn.lock

@ -5,7 +5,7 @@
[![Coverage Status](https://coveralls.io/repos/github/typegoose/typegoose/badge.svg?branch=master#feb282019)](https://coveralls.io/github/typegoose/typegoose?branch=master)
[![npm](https://img.shields.io/npm/dt/@typegoose/typegoose.svg)](https://www.npmjs.com/package/@typegoose/typegoose)
Define Mongoose models using TypeScript classes.
Define Mongoose models using TypeScript classes
## Basic usage

@ -0,0 +1,47 @@
---
id: array-prop
title: 'Array Prop'
---
`@arrayProp(options: object)` is almost the same as `@prop`, here are just the differences listed.
Please note that Mongoose initializes arrayProp arrays with `[]` instead of `null` / `undefined`.
**Note**: Deprecated since 7.1.1, replaced with [`@prop`](api/decorators/prop.md)
**Note**: This decorator will get removed in 8.0
## Options
*All options from [`@prop`](api/decorators/prop.md#options) are valid.*
### items
Accepts Type: `any`
(alias for [`type`](api/decorators/prop.md#type) from `@prop`)
Deprecated since `7.2.0`, use [`@prop`'s `type`](api/decorators/prop.md#type)
(see [`type`](api/decorators/prop.md#type) for Examples)
### innerOptions
`innerOptions` is used to overwrite options to be at the "Type" level
-> Use this only when absolutely necessary and please open a new
issue about it
[see `innerOptions` in prop](api/decorators/prop.md#innerOptions)
### outerOptions
`outerOptions` is used to overwrite options to be at the "Array" level
-> Use this only when absolutely necessary and please open a new
issue about it
[see `outerOptions` in prop](api/decorators/prop.md#outerOptions)
### dim
`dim` is used to set the Dimensions this array should have (for something like an matrix)
-> needs to be higher than 0
[see `dim` in prop](api/decorators/prop.md#dim)

@ -0,0 +1,22 @@
---
id: map-prop
title: "Map Prop"
---
`@mapProp(options: object)` is a decorator which makes it possible to create map schema properties, here are just the differences listed
**Note**: this decorator will get removed in 8.0
**Note**: Deprecated since 7.1.1, replace with [`@prop`](api/decorators/prop.md)
## Options
*All options from [`@prop`](api/decorators/prop.md#options) are valid*
### of
Accepts Type: `any`
(alias for [`type`](api/decorators/prop.md#type) from `@prop`)
Deprecated since `7.2.0`, use [`@prop`'s `type`](api/decorators/prop.md#type)
(see [`type`](api/decorators/prop.md#type) for Examples)

@ -1,7 +1,6 @@
---
id: model-options
title: 'Model Options'
redirect_from:
- /docs/decorators/modeloptions
---
`@modelOptions(options: object)` is used for setting options like schema options, an existing connect and/or an existing Mongoose.

@ -1,4 +1,5 @@
---
id: plugins
title: 'Plugins'
---
@ -6,7 +7,7 @@ title: 'Plugins'
- `mongoosePlugin`: the plugin itself; some plugins might have to be called first
- `options`: the options for the plugin
-> Typegoose has a [default-class for `findOrCreate`]({{ site.baseurl }}{% link _guides/defaultClasses.md %}#findorcreate) with all the types supplied by the plugin
-> Typegoose has a [default-class for `findOrCreate`](guides/defaultClasses.md#findorcreate) with all the types supplied by the plugin
**Note**: plugin-functions that have types and options defined, are automatically inferred, and can be manually overwritten with generic `PluginOptions`.

@ -1,4 +1,5 @@
---
id: prop
title: 'Prop'
---
@ -95,7 +96,7 @@ Accepts Type: `Class | string`
Set which class to use for Reference (this cannot be inferred by the type).
[->look here where `Class` cannot be used]({{ site.baseurl }}{% link _guides/advanced/reference-other-classes.md%}#common-problems)
[->look here where `Class` cannot be used](guides/advanced/reference-other-classes.md#common-problems)
Example:

@ -1,9 +1,6 @@
---
id: query-method
title: 'Query Methods'
redirect_from:
- /docs/decorators/querymethod
- /docs/decorators/querymethods
- /docs/decorators/queryMethods
---
`@queryMethod(func: (this: ReturnModelType<U, QueryHelpers>, ...args: any[]) => mongoose.DocumentQuery)` is a decorator to add [custom query methods](https://thecodebarbarian.com/mongoose-custom-query-methods)

@ -1,4 +1,5 @@
---
id: environment-variables
title: 'Environment Variables'
---
@ -8,7 +9,7 @@ Typegoose allows the use of some environment variables to set global options.
### TG_ALLOW_MIXED
Sets the options [`options.allowMixed`]({{ site.baseurl }}{% link _docs/decorators/modelOptions.md%}#allowmixed) to the given Severity.
Sets the options [`options.allowMixed`](api/decorators/modelOptions.md#allowmixed) to the given Severity.
Accepts:

@ -1,7 +1,6 @@
---
id: add-model-to-typegoose
title: 'Add Model To Typegoose'
redirect_from:
- /docs/functions/addmodeltotypegoose
---
`addModelToTypegoose(model: mongoose.model<any>, class)` is used to get a model with TypeScript type information & to allow `getClassForDocument` to work.

@ -1,7 +1,6 @@
---
id: assertions
title: 'Assertions'
redirect_from:
- /docs/functions/assertions
---
## assertion

@ -1,12 +1,11 @@
---
id: build-schema
title: "Build Schema"
redirect_from:
- /docs/functions/buildschema
---
`buildSchema(class)` gets the schema from a class to modify the schema before making the model.
A compiled model can be re-added with [`addModelToTypegoose`]({{ site.baseurl }}{% link _docs/functions/addModelToTypegoose.md %}).
A compiled model can be re-added with [`addModelToTypegoose`](api/functions/addModelToTypegoose.md).
## Example

@ -1,9 +1,6 @@
---
id: delete-model
title: "Delete Models"
redirect_from:
- /docs/functions/deletemodel
- /docs/functions/deletemodels
- /docs/functions/deleteModels
---
## deleteModel

@ -1,13 +1,12 @@
---
id: get-class
title: 'Get Class'
redirect_from:
- /docs/functions/getclass
---
`getClass(input: any)` gets the class in a variety of ways.
Overloads:
- `getClass(input: mongoose.Document)`: get the class like in [`getClassForDocument`]({{ site.baseurl }}{% link _docs/functions/getClassForDocument.md%})
- `getClass(input: mongoose.Document)`: get the class like in [`getClassForDocument`](api/functions/getClassForDocument.md)
- `getClass(input: mongoose.Schema.Types.Embedded`: get the class for a nested document
- `getClass(input: string)`: get the class by the name directly
- `getClass(input: { typegooseName: string })`: get the class by using some object with the key `typegooseName` of type `string`

@ -1,12 +1,11 @@
---
id: get-class-for-document
title: 'Get Class for Document'
redirect_from:
- /docs/functions/getclassfordocument
---
`getClassForDocument(doc: DocumentType<any>)` gets the Class used in the model creation.
Note: this only works if the class / model was created with Typegoose OR added with [`addModelToTypegoose`]({{ site.baseurl }}{% link _docs/functions/addModelToTypegoose.md%}).
Note: this only works if the class / model was created with Typegoose OR added with [`addModelToTypegoose`](api/functions/addModelToTypegoose.md).
## Example

@ -1,7 +1,6 @@
---
id: get-discriminator-model-for-class
title: 'Get Discriminator Model For Class'
redirect_from:
- /docs/functions/getdiscriminatormodelforclass
---
`getDiscriminatorModelForClass(from: mongoose.model<any>, class, discriminator?: string)` gets a model for a given discriminator.

@ -1,12 +1,11 @@
---
id: get-model-for-class
title: 'Get Model For Class'
redirect_from:
- /docs/functions/getmodelforclass
---
`getModelForClass(class, overwriteOptions)` gets a model for a given class. If no Mongoose Model exists for this class yet, one will be created automatically.
[All options that can be specified with `overwriteOptions`.]({{ site.baseurl }}{% link _docs/decorators/modelOptions.md%}#Options)
[All options that can be specified with `overwriteOptions`.](api/decorators/modelOptions.md#Options)
## Example

@ -1,7 +1,6 @@
---
id: get-model-with-string
title: 'Get Model With String'
redirect_from:
- /docs/functions/getmodelwithstring
---
`getModelWithString(key)` retrieves a model with the given key. If no Mongoose model exists in Typegoose's internal cache, it will return `undefined`.

@ -1,7 +1,6 @@
---
id: get-name
title: 'Get Name For Class'
redirect_from:
- /docs/functions/getname
---
`getName(class)` gets the name of the resulting model (accounts for `customName` & `automaticName`)

@ -1,4 +1,5 @@
---
id: set-global-options
title: 'Set Global Options'
---
@ -22,7 +23,7 @@ Will be merged with every class's `modelOptions`'s `schemaOptions`.
Will be merged with every class's `modelOptions`'s `options`.
[Please look here for more info]({{ site.baseurl }}{% link _docs/decorators/modelOptions.md%}#options-1)
[Please look here for more info](api/decorators/modelOptions.md#options-1)
### globalOptions

@ -1,7 +1,6 @@
---
id: is-document
title: 'Is Document'
redirect_from:
- /docs/functions/typeguards/isdocument
---
## isDocument

@ -1,7 +1,6 @@
---
id: is-ref-type
title: 'Is Ref-Type'
redirect_from:
- /docs/functions/typeguards/isreftype
---
## isRefType

@ -1,11 +1,10 @@
---
id: index-api
title: 'Index of Manual-Documentation'
permalink: '/docs'
toc: false
---
This Documentation is manually written. To view an automatically-generated up-to-date documentation, please go to our [TypeDoc-Generated Documentation]({{ site.baseurl }}/typedoc)
This Documentation is manually written. To view an automatically-generated up-to-date documentation, please go to our [TypeDoc-Generated Documentation](typegoose/typedoc)
When you are searching for guides, look at [the Guides Section]({{ site.baseurl }}{% link _guides/quick-start-guide.md %})
When you are searching for guides, look at [the Guides Section](guides/quick-start-guide.md)
*This Documentation & Guides refer to the current version, for older version please clone the repo & revert to the last commit of a version.*

@ -1,4 +1,5 @@
---
id: additional-types
title: "Additional Types"
---

@ -1,8 +1,6 @@
---
id: document-type
title: 'Document Type'
redirect_from:
- /docs/types/document
- /docs/types/documenttype
---
*previously known as `InstanceType<T>`*

@ -1,10 +1,11 @@
---
id: ref-type
title: 'Ref'
---
The Type `Ref<T>` is the type used for [References](https://mongoosejs.com/docs/populate.html).
There are [typeguards]({{ site.baseurl }}{% link _docs/functions/typeguards/isDocument.md %}) to check if a Reference is populated.
There are [typeguards](api/functions/typeguards/isDocument.md) to check if a Reference is populated.
## Example

@ -1,13 +1,12 @@
---
id: return-model-type
title: 'Return Model Type'
redirect_from:
- /docs/types/returnmodeltype
---
The Type `ReturnModelType<T, QueryHelpers>` is the type used to have type information for a class converted to a Mongoose Model.
- `T` is the logical `AND` of `mongoose.Model<DocumentType<T>>` and `T`
- `QueryHelpers` is for a Query-Helpers interface, [more here]({{ site.baseurl }}{% link _docs/decorators/queryMethod.md%})
- `QueryHelpers` is for a Query-Helpers interface, [more here](api/decorators/queryMethod.md)
**Notes**:
- It has to be always with `typeof Class`, otherwise it will not work

@ -1,4 +1,5 @@
---
id: virtuals
title: 'Virtuals'
---
@ -8,7 +9,7 @@ Mongoose offers developers the option to create [virtual properties](http://mong
that actual database read/write will not occur. These are just 'calculated properties'. A virtual property can have a setter and a getter.
TypeScript also has a similar feature which Typegoose uses for virtual property definitions (using the `prop` decorator).
*Do not confuse this "get & set" with [`@prop`'s get & set]({{ site.baseurl }}{% link _docs/decorators/prop.md %}#get--set)*
*Do not confuse this "get & set" with [`@prop`'s get & set](api/decorators/prop.md#get--set)*
**Know that no decorator can be used for the getter's & setter's!** *(Mongoose doesn't allow setting options for virtuals)*
@ -46,7 +47,7 @@ Resulting Document in MongoDB:
### Difference between @prop's get & set and this get & set
*This shows the difference between [`@prop`'s get & set]({{ site.baseurl }}{% link _docs/decorators/prop.md %}#get--set) and [this one]({{ site.baseurl }}{% link _docs/virtuals.md %}#get--set)*
*This shows the difference between [`@prop`'s get & set](api/decorators/prop.md %}#get--set) and [this one](api/virtuals.md#get--set)*
The difference between `@prop`'s and this one is simple, `@prop`'s get & set are ***actual properties*** that get saved to the database, only with a conversion layer.
The get & set of *getter's & setter's* are absolutely virtual.

@ -1,11 +1,6 @@
---
id: changelog
title: "Changelog"
layout: single
classes: wide
toc: true
redirect_from:
- /CHANGELOG
- /Changelog
---
<!--Sorry but linking to the issue/pr can only be made so in jekyll without more clutter-->
@ -30,17 +25,17 @@ redirect_from:
- `typescript` to 3.9.6
- `TimeStamps`'s (Default Class) properties are not marked as `Readonly` anymore
- All Typeguards now accept `undefined` as the first parameter too (if an type was OR with `undefined`, the function would give an type-error)
- Add option `discriminators` for embedded Discriminators [{% include gitissue repo="typegoose" num=248 %}]
- Add option `discriminators` for embedded Discriminators [[typegoose#248](https://github.com/typegoose/typegoose/issues/248)]
- Set correct Decorator Return type (`ClassDecorator` & `PropertyDecorator`)
- Change warning message for `warnMixed`
- If an SchemaType dosnt extend `SchemaTypeOptions`, the options are now defaulted to the outer-layer
- `innerOptions` and `outerOptions` can now be used for Maps too
- Custom Validators now support `message` being an function
- Automatically convert `mongoose.Types.Buffer` to `mongoose.Schema.Types.Buffer`
- Fix Types when extending default class `Base` with other than `ObjectId` [{% include gitissue repo="typegoose" num=316 %}]
- Fix Types when extending default class `Base` with other than `ObjectId` [[typegoose#316](https://github.com/typegoose/typegoose/issues/316)]
- [IC] `mapOptions` now always errors if the given type dosnt extend `mongoose.SchemaTypeOptions`
- [IC] Moved function `_buildPropMetadata` to its own file (`processProp`) and renamed it to `processProp` [{% include gitissue repo="typegoose" num=286 %}]
- [IC] Moved pre-processing in function `prop` into `processProp` [{% include gitissue repo="typegoose" num=286 %}]
- [IC] Moved function `_buildPropMetadata` to its own file (`processProp`) and renamed it to `processProp` [[typegoose#286](https://github.com/typegoose/typegoose/issues/286)]
- [IC] Moved pre-processing in function `prop` into `processProp` [[typegoose#286](https://github.com/typegoose/typegoose/issues/286)]
- [IC] Removed error `NoMetadataError`
- [IC] Removed check that `Type` needs to be defined in `prop` / `processProp`
@ -54,7 +49,7 @@ redirect_from:
- Add `mongoose.Schema.Types.*` that are suitable for ref to `RefType`
- Runtime-Deprecate `@mapProp`(`TDEP0002`) & `@arrayProp`(`TDEP0001`)
- Runtime-Deprecate `type`-alias options, `items` & `of` & `refType`(`TDEP0003`)
- Handle `mongoose.Types.Array<Ref<>>` for Typeguards (`isDocumentArray` & `isRefTypeArray`) [{% include gitissue repo="typegoose" num=278 %}]
- Handle `mongoose.Types.Array<Ref<>>` for Typeguards (`isDocumentArray` & `isRefTypeArray`) [[typegoose#278](https://github.com/typegoose/typegoose/issues/278)]
## 7.1.3
@ -67,7 +62,7 @@ redirect_from:
- `@prop` options types now work again
- `BasePropOptions.type` is now `unkown` instead of `any`
- All aliases of `BasePropOptions.type` now inherit the types from there
- Fix bug where autopopulate (or any other plugin) wouldnt pick up on virtuals [{% include gitissue repo="typegoose" num=274 %}]
- Fix bug where autopopulate (or any other plugin) wouldnt pick up on virtuals [[typegoose#274](https://github.com/typegoose/typegoose/issues/274)]
- [IC] `refType` is now moved to `prop`
## 7.1.1
@ -85,7 +80,7 @@ redirect_from:
- Add Overloads to `@prop`
- PascalCased decorators now have the TSDoc of the original function
- Default class `Base`'s `__v` & `__t` are now optional (with `?`)
- Fix mentioned bug from {% include gitissue repo="typegoose" num=181 %}, to allow `mongoose.Schema.Types.String` & `mongoose.Schema.Types.Number` as valid enum types
- Fix mentioned bug from [typegoose#181](https://github.com/typegoose/typegoose/issues/181), to allow `mongoose.Schema.Types.String` & `mongoose.Schema.Types.Number` as valid enum types
- Options `of` & `items` are now mapped to `type` and get called when `buildSchema` is called
- [IC] DeDuplicate code in `prop.ts`
@ -96,14 +91,14 @@ redirect_from:
- `@types/mongoose` to 5.7.19
- `tslib` to 2.0.0
- `typescript` to 3.9.2
- Fix duplicate hooks / virtuals / queryMethods / plugins / indices via inheritance [{% include gitissue repo="typegoose" num=218 %}]
- Fix duplicate hooks / virtuals / queryMethods / plugins / indices via inheritance [[typegoose#218](https://github.com/typegoose/typegoose/issues/218)]
- improve TSDoc of some functions
- Fix `queryMethod` reflection
- Set proper function type for `queryMethod`
- Added the ability to define option `ref` with an arrow-function [(`ref: () => type`)]({{ site.baseurl }}{% link _guides/advanced/reference-other-classes.md %}#referencing-other-classes)
- Added the ability to define option `ref` with an arrow-function [(`ref: () => type`)](guides/advanced/reference-other-classes.md#referencing-other-classes)
- All Decorators are now exported PascalCased & camelCased
- Actually export the `@queryMethod` decorator
- The `@queryMethod` decorator now has correct types [{% include gitissue repo="typegoose" num=247 %}]
- The `@queryMethod` decorator now has correct types [[typegoose#247](https://github.com/typegoose/typegoose/issues/247)]
- The functions `addModelToTypegoose`, `getModelForClass`, `buildSchema`, `deleteModelWithClass`, `getDiscriminatorModelForClass` now have the `T` generic removed (it was unnecessary)
- The functions `addModelToTypegoose`, `getModelForClass`, `getDiscriminatorModelForClass` now have an new optional generic `QueryHelpers`
- The Type `ReturnModelType` now has the `T` generic removed (it was unnecessary)
@ -116,6 +111,8 @@ redirect_from:
## 7.0.0
[To Migrate, please look at the migration guide](guides/migrate-to-7.md)
- Update Dependencies
- `mongoose` to 5.9.10
- `@types/mongoose` to 5.7.12
@ -151,7 +148,7 @@ redirect_from:
- `tslib` to 1.11.1
- `loglevel` to 1.6.8
- Remove `useNewEnum` type from `types`
- Add warning when value is an primitive and will result in an `Mixed` (fixes {% include gitissue repo="typegoose" num=152 %})
- Add warning when value is an primitive and will result in an `Mixed` (fixes [typegoose#152](https://github.com/typegoose/typegoose/issues/152))
- Add option `language_override` to `IndexOptions`
- Fix spelling errors in documentation
- [IC] Replace deprecated arrayProp options with proper ones in all tests & test-models
@ -168,7 +165,7 @@ redirect_from:
## 6.3.2
- Indexes: clone array instead of re-using it (fixes {% include gitissue repo="typegoose" num=194 %})
- Indexes: clone array instead of re-using it (fixes [typegoose#194](https://github.com/typegoose/typegoose/issues/194))
## 6.3.1
@ -186,11 +183,11 @@ redirect_from:
## 6.2.2
- Fix use of "rawOptions.type" after deletion (fixes {% include gitissue repo="typegoose" num=178 %})
- Fix use of "rawOptions.type" after deletion (fixes [typegoose#178](https://github.com/typegoose/typegoose/issues/178))
## 6.2.1
- Fix functions `isString` and `isNumber` to check against their `mongoose.Schema.Types.*.name` equivalent (fixes {% include gitissue repo="typegoose" num=149 %})
- Fix functions `isString` and `isNumber` to check against their `mongoose.Schema.Types.*.name` equivalent (fixes [typegoose#149](https://github.com/typegoose/typegoose/issues/149))
## 6.2.0
@ -212,7 +209,7 @@ This Update may break some code (mongoose upgrade, inline `_id` change, `enum` c
## 6.1.8
- backport for:
- fixes {% include gitissue repo="typegoose" num=160 %}
- fixes [typegoose#160](https://github.com/typegoose/typegoose/issues/160)
- [IC] `mapArrayOptions` now uses `mapOptions`
- [IC] adding function `mapOptions`
@ -251,7 +248,7 @@ This Update may break some code (mongoose upgrade, inline `_id` change, `enum` c
## 6.1.1
- `deleteModel` now deletes the model from the connection it is on {% include gitissue repo="typegoose" num=119 %}
- `deleteModel` now deletes the model from the connection it is on [typegoose#119](https://github.com/typegoose/typegoose/issues/119)
- [IC] de-duplicate test code for connecting
## 6.1.0
@ -264,7 +261,7 @@ This Update may break some code (mongoose upgrade, inline `_id` change, `enum` c
- `@prop({ validate })` now accepts `{ validator, message }` as an array
- Add function `deleteModel` & `deleteModelWithClass`
- allow Prop Option "type" to overwrite the inferred type [look here for an example](https://typegoose.github.io/typegoose/docs/decorators/prop/#type)
- integrate "Array Validators & Transform" tests {% include gitissue repo="typegoose" num=29 %}
- integrate "Array Validators & Transform" tests [typegoose#29](https://github.com/typegoose/typegoose/issues/29)
- adding global options, with `setGlobalOptions`
- add modelOption `runSyncIndexes`
- add modelOption `allowMixed`
@ -319,50 +316,50 @@ This Release didnt change anything on the code, it was mostly tests & github-pag
- Add TSDoc for `refType` on PropOptions
- `refPath` now uses the right type (new uses `refType` instead of `itemsType`)
- Fix decorator options (rawOptions) mutating thanks to {% include gitissue repo="typegoose" num=60 %}
- Fix decorator options (rawOptions) mutating thanks to [typegoose#60](https://github.com/typegoose/typegoose/issues/60)
- Pre hook's function's `next` is now not marked as "optional" anymore, which caused `next()` to be `EmptyVoidFn | undefined`
## 6.0.0
[To Migrate, please look at the migration guide]({{ site.baseurl }}{% link _guides/migrate-to-6.md %})
[To Migrate, please look at the migration guide](guides/migrate-to-6.md)
- Project got moved to the new repo (typegoose/typegoose) and new package `@typegoose/typegoose`
- rename `InstanceType<T>` to `DocumentType<T>` [{% include gitissue repo="szokodiakos" num=366 %}]
- rename `InstanceType<T>` to `DocumentType<T>` [[szokodiakos#366](https://github.com/szokodiakos/typegoose/issues/366)]
- adding a migration guide from ~5.9 to 6.0.0
- adding missing "get" and "set" property options [{% include gitissue repo="szokodiakos" num=260 %}]
- adding missing "get" and "set" property options [[szokodiakos#260](https://github.com/szokodiakos/typegoose/issues/260)]
- adding `@modelOptions` and `getModelForClass` and `setModelForClass` will now override it
- `setModelForClass` is now deprecated [{% include gitissue repo="typegoose" num=6 %}, {% include gitissue repo="szokodiakos" num=186 %}]
- `setModelForClass` is now deprecated [[typegoose#6](https://github.com/typegoose/typegoose/issues/6), [szokodiakos#186](https://github.com/szokodiakos/typegoose/issues/186)]
- setting the Typegoose Class to abstract
- deprecating the Typegoose Class because of making the functions outsourced [{% include gitissue repo="szokodiakos" num=356 %}]
- hook methods can now be arrays of methods [{% include gitissue repo="szokodiakos" num=313 %}]
- deprecating the Typegoose Class because of making the functions outsourced [[szokodiakos#356](https://github.com/szokodiakos/typegoose/issues/356)]
- hook methods can now be arrays of methods [[szokodiakos#313](https://github.com/szokodiakos/typegoose/issues/313)]
- completely removed parallel from pre hook
- refactored the types of hooks
- adding support for any value in prop for plugins [{% include gitissue repo="szokodiakos" num=374 %}]
- `schema.loadClass` is now used instead of `@instanceMethod` and `@staticMethod` [{% include gitissue repo="szokodiakos" num=48 %}, {% include gitissue repo="szokodiakos" num=346 %}, {% include gitissue repo="szokodiakos" num=182 %}]
- adding support for any value in prop for plugins [[szokodiakos#374](https://github.com/szokodiakos/typegoose/issues/374)]
- `schema.loadClass` is now used instead of `@instanceMethod` and `@staticMethod` [[szokodiakos#48](https://github.com/szokodiakos/typegoose/issues/48), [szokodiakos#346](https://github.com/szokodiakos/typegoose/issues/346), [szokodiakos#182](https://github.com/szokodiakos/typegoose/issues/182)]
- method decorators are now deprecated
- schema generation got refactored (/reconstructed) multiple times
- adding `count` to VirtualOptions
- Updated Dependencies (^mongoose@5.7.1)
- adding discriminator support [{% include gitissue repo="typegoose" num=11 %}]
- adding discriminator support [[typegoose#11](https://github.com/typegoose/typegoose/issues/11)]
- adding default class for (schemaOptions) timestamps
- adding more docs to README & as tsdoc
- some changes that are probably forgot
- szokodiakos#363 got reverted in favor of mongoose@5.6.9
- fixes Custom Options not passed through to mongoose & plugins when using ref [{% include gitissue repo="szokodiakos" num=379 %}]
- Adding "immutable" prop option [{% include gitissue repo="szokodiakos" num=320 %}]
- adding Types to Ref (to allow not just ObjectID) [{% include gitissue repo="szokodiakos" num=369 %}]
- fixes Custom Options not passed through to mongoose & plugins when using ref [[szokodiakos#379](https://github.com/szokodiakos/typegoose/issues/379)]
- Adding "immutable" prop option [[szokodiakos#320](https://github.com/szokodiakos/typegoose/issues/320)]
- adding Types to Ref (to allow not just ObjectID) [[szokodiakos#369](https://github.com/szokodiakos/typegoose/issues/369)]
- szokodiakos#54 seems to work now in 6.0.0 (added test in 6.0.0-21)
- because of the changes in 6.0.0 #235 got fixed
- Adding "InvalidTypeError" for the case that "undefined" or "null" is used as a type (or something other happenes)
- Change Error text of "InvalidPropError"
- adding some "soft-errors" and traces with "loglevel"
- exposing settings for "loglevel"
- fixes Decorator Execution Order [{% include gitissue repo="typegoose" num=23 %}, {% include gitissue repo="typegoose" num=24 %}]
- fixes Decorator Execution Order [[typegoose#23](https://github.com/typegoose/typegoose/issues/23), [typegoose#24](https://github.com/typegoose/typegoose/issues/24)]
- add support for custom discriminator properties
- add error if using a self-containing class
- add support for using multiple classes with the same name (`automaticName`, `customName`, `collection`)
- [IC] "NoParamConstructor" got renamed into "AnyParamConstructor" it now accepts any arguments
- [IC] Remake data.ts to use Maps [{% include gitissue repo="typegoose" num=3 %}]
- [IC] Remake data.ts to use Maps [[typegoose#3](https://github.com/typegoose/typegoose/issues/3)]
- [IC] adding many tests and bumping coverage
- [IC] moving many Types to types.ts
- [IC] removing unneeded dependencies

@ -1,7 +1,6 @@
---
id: change-id-type
title: 'Change _id Type'
redirect_from:
- /guides/advanced/changeidtype
---
You can easily change the type of the `_id` field:
@ -15,7 +14,7 @@ class SomeChangedID {
Note: when the type is not `ObjectID`, you need to explicitly set the `_id` before saving.
To disable the `_id` field altogether (useful in arrays of subdocuments), add [`@prop({ _id: false })`]({{ site.baseurl }}{% link _docs/decorators/prop.md %}#_id) or [`@modelOptions({ schemaOptions: { _id: false } })`](https://mongoosejs.com/docs/guide.html#_id).
To disable the `_id` field altogether (useful in arrays of subdocuments), add [`@prop({ _id: false })`](api/decorators/prop.md#_id) or [`@modelOptions({ schemaOptions: { _id: false } })`](https://mongoosejs.com/docs/guide.html#_id).
```ts
class WithNoId {

@ -1,4 +1,5 @@
---
id: logger
title: "Typegoose's Logger"
---

@ -1,7 +1,6 @@
---
title: 'Model with same name'
description: >
Models with the same name OR models with a different collection.
id: models-with-same-name
title: 'Models with same name'
---
This Guide shows all the possibilities for a model to use different names.

@ -1,7 +1,6 @@
---
id: using-objectid-type
title: 'Using ObjectId Type'
redirect_from:
- /guides/advanced/objectid
---
Using the type `ObjectId` can be done by defining it as follows:

@ -1,7 +1,6 @@
---
id: reference-other-classes
title: 'Reference other Classes'
description: >
Reference other Classes as a Property of an class
---
## Referencing other Classes

@ -0,0 +1,22 @@
---
id: all-decorators
title: 'All the Decorators'
---
This Guide shows all the decorators that can be used for / in a class.
## All Decorators
- All Property decorators:
- [`@prop`](api/decorators/prop.md) is the most important decorator, because it defines values(\|keys) that are then in the model & document.
- [`@arrayProp`](api/decorators/arrayProp.md) it is the same as `@prop`, just for arrays **[Deprecated]**
- [`@mapProp`](api/decorators/mapProp.md) is for a Map<string, T> **[Deprecated]**
<!--This is just a separator-->
- All Class decorators:
- [`@modelOptions`](api/decorators/modelOptions.md), used for Schema Options, an existing Mongoose and an existing Connection
- [`@index`](api/decorators/indexes.md) is for indexes, that are **NOT** defined in the prop (mainly for compound indexes)
- [`@plugin`](api/decorators/plugins.md) is for adding plugins. Please note that plugins cannot modify the types of prop, we are sorry for this.
- [`@queryMethod`](api/decorators/queryMethod.md) is for adding query Methods.
- [Hooks](api/decorators/hooks.md):
- `@pre` is for Pre-Hooks.
- `@post` is for Post-Hooks.

@ -1,9 +1,6 @@
---
id: default-classes
title: 'Default Classes'
redirect_from:
- /guides/default-classes
- /guides/default_classes
- /guides/defaultclasses
---
This Guide contains all default classes Typegoose provides.
@ -38,7 +35,7 @@ This class provides all the types supplied by the plugin `mongoose-findOrCreate`
-> This class should only be used, if the plugin is used too
[An Example can be seen in common-plugins]({{ site.baseurl }}{% link _guides/advanced/common-plugins.md %}#mongoose-findorcreate)
[An Example can be seen in common-plugins](guides/advanced/common-plugins.md#mongoose-findorcreate)
## Extra information

@ -1,4 +1,5 @@
---
id: deprecation-codes
title: "Deprecation Codes"
---

@ -1,4 +1,5 @@
---
id: faq
title: 'FAQ'
---
@ -31,4 +32,4 @@ A: because I (hasezoey) don't have permissions over the old `typegoose` reposito
A: because Typegoose doesn't modify any Mongoose code, it is still the same as Mongoose's original `new Model()`, you would have to do `new Model({} as Class)` (or sometimes `new Model({} as Partial<Class>)`, because of functions.)
**Note**: since `@types/mongoose@5.7.22` there are typings for `.create`, but are not fully compatible with Typegoose. For more information pleasae read [known-issues]({{ site.baseurl }}{% link _guides/known-issues.md %}#typesmongoose5722-and-higher)
**Note**: since `@types/mongoose@5.7.22` there are typings for `.create`, but are not fully compatible with Typegoose. For more information pleasae read [known-issues](guides/known-issues.md#typesmongoose5722-and-higher)

@ -1,9 +1,6 @@
---
id: known-issues
title: 'Known Issues'
redirect_from:
- /guides/KNOWN-ISSUES
- /guides/knownissues
- /guides/knownIssues
---
## Known Issues
@ -16,7 +13,7 @@ Never run `ts-node --transpile-only` or `tsc --transpile-only`, otherwise someti
### tsconfig-paths
TypeScript provides the option to alias paths (with `tsconfig-paths`), but is somehow incompatible with Typegoose, [more info in here]({% include gitissue repo="szokodiakos" num=392 %})
TypeScript provides the option to alias paths (with `tsconfig-paths`), but is somehow incompatible with Typegoose, [more info in here]([szokodiakos#392](https://github.com/szokodiakos/typegoose/issues/392))
### Self-Containing classes
@ -40,7 +37,7 @@ class SomeClass {
### Class-transformer
Typegoose (/Mongoose) currently doesn't work well with `class-transformer`. When you want to get a POJO, use `model.operation.lean()` OR `doc.toJSON()` - but `classToPlain` (or any other method from CT) will not work and map incorrect properties (More info: {% include gitissue repo="typegoose" num=61 %}, [typegoose#9 (comment)]({% include gitissue repo="typegoose" num=96 %}#issuecomment-549031131), [class-transformer#227](https://github.com/typestack/class-transformer/issues/227))
Typegoose (/Mongoose) currently doesn't work well with `class-transformer`. When you want to get a POJO, use `model.operation.lean()` OR `doc.toJSON()` - but `classToPlain` (or any other method from CT) will not work and map incorrect properties (More info: [typegoose#61](https://github.com/typegoose/typegoose/issues/61), [typegoose#9 (comment)]([typegoose#96](https://github.com/typegoose/typegoose/issues/96)#issuecomment-549031131), [class-transformer#227](https://github.com/typestack/class-transformer/issues/227))
### Babel

@ -1,6 +1,6 @@
---
id: migrate-6
title: 'Migrate to 6.0.0'
classes: wide
---
These are the changes made for 6.0.0 that are breaking or just important to know.
@ -46,9 +46,9 @@ Hooks recieved a change (in 6.0.0-13) for the types to comply with the latest mo
`@staticMethod` & `@instanceMethod` were deprecated in favor of `schema.loadClass()`. These decorators are no longer needed, because the methods are auto-detected.
For [virtuals](https://mongoosejs.com/docs/tutorials/virtuals.html), simply use `get somevalue() { return ''; }` and `set somevalue(val: string) { }` (`@prop` is no longer needed). [[New Documentation]({{ site.baseurl }}{% link _docs/virtuals.md %}#get--set)]
For [virtuals](https://mongoosejs.com/docs/tutorials/virtuals.html), simply use `get somevalue() { return ''; }` and `set somevalue(val: string) { }` (`@prop` is no longer needed). [[New Documentation](api/virtuals.md#get--set)]
For [populating virtuals](https://mongoosejs.com/docs/tutorials/virtuals.html#populate), use `@prop({ localField, foreignField })`. The `overwrite` option is no longer needed. [[New Documentation]({{ site.baseurl }}{% link _docs/virtuals.md %}#virtual-populate)]
For [populating virtuals](https://mongoosejs.com/docs/tutorials/virtuals.html#populate), use `@prop({ localField, foreignField })`. The `overwrite` option is no longer needed. [[New Documentation](api/virtuals.md#virtual-populate)]
Update: `@staticMethod` & `@instanceMethod` were removed in 6.1.0-1

@ -1,6 +1,6 @@
---
id: migrate-7
title: 'Migrate to 7.0.0'
classes: wide
---
These are the changes made for 7.0.0 that are breaking or just important to know

@ -1,4 +1,5 @@
---
id: mongoose-compatibility
title: "Mongoose Compatibility"
---

@ -1,4 +1,5 @@
---
id: motivation
title: 'Motivation'
---

@ -1,9 +1,8 @@
---
id: quick-start-guide
title: 'Quick Start Guide'
---
<sub>Please use [Dark-Reader](https://chrome.google.com/webstore/detail/dark-reader/eimadpbcbfnmbkopoojfekhnkhdbieeh) for a dark version of the site.</sub>
## Quick Overview of Typegoose
Typegoose is a "wrapper" for easily writing Mongoose models with TypeScript.
@ -25,6 +24,7 @@ interface User {
age!: number;
job?: Job;
car?: Car | string;
preferences?: string[];
}
const CarModel = mongoose.model('Car', {
@ -38,7 +38,8 @@ const UserModel = mongoose.model('User', {
title: String;
position: String;
},
car: { type: Schema.Types.ObjectId, ref: 'Car' }
car: { type: Schema.Types.ObjectId, ref: 'Car' },
preferences: [{ type: String }]
});
```
@ -70,6 +71,9 @@ class User {
@prop({ ref: Car })
public car?: Ref<Car>;
@prop({ type: String })
public preferences?: string[];
}
```

@ -3,13 +3,14 @@
shopt -s dotglob nullglob
npm run doc
mkdir github-page/typedoc # redundant but needed in travis
mv doc/* github-page/typedoc/
find . -not -regex "^\.\/doc.*\|^\.\/github-page.*\|^\.\/\.git.*" -delete
mv github-page/* ./
rm .gitignore
mv travis-.gitignore .gitignore # because "typedoc" folder should be ignored on normal pushed, but not by travis
cd website
yarn
yarn build
cd ..
find . -not -regex "^\.\/website.*\|^.\/\.git.*" -delete # delete everything that is not starting with ".git" or "website/build"
mv website/build/* ./
# redundant, just to have it clean
rm -rf github-page
rm -rf website
ls -al

@ -1,7 +0,0 @@
# Please don't forget to modify "travis-.gitignore" too!
_site/
.sass-cache/
.jekyll-metadata/
typedoc/

@ -1,6 +0,0 @@
source "https://rubygems.org"
group :jekyll_plugins do
gem "github-pages"
gem "jekyll-include-cache"
end

@ -1,251 +0,0 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (6.0.3.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
zeitwerk (~> 2.2, >= 2.2.2)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.11.1)
colorator (1.1.0)
commonmarker (0.17.13)
ruby-enum (~> 0.5)
concurrent-ruby (1.1.6)
dnsruby (1.61.3)
addressable (~> 2.5)
em-websocket (0.5.1)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
ethon (0.12.0)
ffi (>= 1.3.0)
eventmachine (1.2.7)
execjs (2.7.0)
faraday (1.0.1)
multipart-post (>= 1.2, < 3)
ffi (1.12.2)
forwardable-extended (2.6.0)
gemoji (3.0.1)
github-pages (206)
github-pages-health-check (= 1.16.1)
jekyll (= 3.8.7)
jekyll-avatar (= 0.7.0)
jekyll-coffeescript (= 1.1.1)
jekyll-commonmark-ghpages (= 0.1.6)
jekyll-default-layout (= 0.1.4)
jekyll-feed (= 0.13.0)
jekyll-gist (= 1.5.0)
jekyll-github-metadata (= 2.13.0)
jekyll-mentions (= 1.5.1)
jekyll-optional-front-matter (= 0.3.2)
jekyll-paginate (= 1.1.0)
jekyll-readme-index (= 0.3.0)
jekyll-redirect-from (= 0.15.0)
jekyll-relative-links (= 0.6.1)
jekyll-remote-theme (= 0.4.1)
jekyll-sass-converter (= 1.5.2)
jekyll-seo-tag (= 2.6.1)
jekyll-sitemap (= 1.4.0)
jekyll-swiss (= 1.0.0)
jekyll-theme-architect (= 0.1.1)
jekyll-theme-cayman (= 0.1.1)
jekyll-theme-dinky (= 0.1.1)
jekyll-theme-hacker (= 0.1.1)
jekyll-theme-leap-day (= 0.1.1)
jekyll-theme-merlot (= 0.1.1)
jekyll-theme-midnight (= 0.1.1)
jekyll-theme-minimal (= 0.1.1)
jekyll-theme-modernist (= 0.1.1)
jekyll-theme-primer (= 0.5.4)
jekyll-theme-slate (= 0.1.1)
jekyll-theme-tactile (= 0.1.1)
jekyll-theme-time-machine (= 0.1.1)
jekyll-titles-from-headings (= 0.5.3)
jemoji (= 0.11.1)
kramdown (= 1.17.0)
liquid (= 4.0.3)
mercenary (~> 0.3)
minima (= 2.5.1)
nokogiri (>= 1.10.4, < 2.0)
rouge (= 3.19.0)
terminal-table (~> 1.4)
github-pages-health-check (1.16.1)
addressable (~> 2.3)
dnsruby (~> 1.60)
octokit (~> 4.0)
public_suffix (~> 3.0)
typhoeus (~> 1.3)
html-pipeline (2.13.0)
activesupport (>= 2)
nokogiri (>= 1.4)
http_parser.rb (0.6.0)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
jekyll (3.8.7)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
i18n (~> 0.7)
jekyll-sass-converter (~> 1.0)
jekyll-watch (~> 2.0)
kramdown (~> 1.14)
liquid (~> 4.0)
mercenary (~> 0.3.3)
pathutil (~> 0.9)
rouge (>= 1.7, < 4)
safe_yaml (~> 1.0)
jekyll-avatar (0.7.0)
jekyll (>= 3.0, < 5.0)
jekyll-coffeescript (1.1.1)
coffee-script (~> 2.2)
coffee-script-source (~> 1.11.1)
jekyll-commonmark (1.3.1)
commonmarker (~> 0.14)
jekyll (>= 3.7, < 5.0)
jekyll-commonmark-ghpages (0.1.6)
commonmarker (~> 0.17.6)
jekyll-commonmark (~> 1.2)
rouge (>= 2.0, < 4.0)
jekyll-default-layout (0.1.4)
jekyll (~> 3.0)
jekyll-feed (0.13.0)
jekyll (>= 3.7, < 5.0)
jekyll-gist (1.5.0)
octokit (~> 4.2)
jekyll-github-metadata (2.13.0)
jekyll (>= 3.4, < 5.0)
octokit (~> 4.0, != 4.4.0)
jekyll-include-cache (0.2.0)
jekyll (>= 3.7, < 5.0)
jekyll-mentions (1.5.1)
html-pipeline (~> 2.3)
jekyll (>= 3.7, < 5.0)
jekyll-optional-front-matter (0.3.2)
jekyll (>= 3.0, < 5.0)
jekyll-paginate (1.1.0)
jekyll-readme-index (0.3.0)
jekyll (>= 3.0, < 5.0)
jekyll-redirect-from (0.15.0)
jekyll (>= 3.3, < 5.0)
jekyll-relative-links (0.6.1)
jekyll (>= 3.3, < 5.0)
jekyll-remote-theme (0.4.1)
addressable (~> 2.0)
jekyll (>= 3.5, < 5.0)
rubyzip (>= 1.3.0)
jekyll-sass-converter (1.5.2)
sass (~> 3.4)
jekyll-seo-tag (2.6.1)
jekyll (>= 3.3, < 5.0)
jekyll-sitemap (1.4.0)
jekyll (>= 3.7, < 5.0)
jekyll-swiss (1.0.0)
jekyll-theme-architect (0.1.1)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-theme-cayman (0.1.1)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-theme-dinky (0.1.1)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-theme-hacker (0.1.1)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-theme-leap-day (0.1.1)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-theme-merlot (0.1.1)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-theme-midnight (0.1.1)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-theme-minimal (0.1.1)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-theme-modernist (0.1.1)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-theme-primer (0.5.4)
jekyll (> 3.5, < 5.0)
jekyll-github-metadata (~> 2.9)
jekyll-seo-tag (~> 2.0)
jekyll-theme-slate (0.1.1)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-theme-tactile (0.1.1)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-theme-time-machine (0.1.1)
jekyll (~> 3.5)
jekyll-seo-tag (~> 2.0)
jekyll-titles-from-headings (0.5.3)
jekyll (>= 3.3, < 5.0)
jekyll-watch (2.2.1)
listen (~> 3.0)
jemoji (0.11.1)
gemoji (~> 3.0)
html-pipeline (~> 2.2)
jekyll (>= 3.0, < 5.0)
kramdown (1.17.0)
liquid (4.0.3)
listen (3.2.1)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.3.6)
mini_portile2 (2.4.0)
minima (2.5.1)
jekyll (>= 3.5, < 5.0)
jekyll-feed (~> 0.9)
jekyll-seo-tag (~> 2.1)
minitest (5.14.1)
multipart-post (2.1.1)
nokogiri (1.10.9)
mini_portile2 (~> 2.4.0)
octokit (4.18.0)
faraday (>= 0.9)
sawyer (~> 0.8.0, >= 0.5.3)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (3.1.1)
rb-fsevent (0.10.4)
rb-inotify (0.10.1)
ffi (~> 1.0)
rouge (3.19.0)
ruby-enum (0.8.0)
i18n
rubyzip (2.3.0)
safe_yaml (1.0.5)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sawyer (0.8.2)
addressable (>= 2.3.5)
faraday (> 0.8, < 2.0)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
thread_safe (0.3.6)
typhoeus (1.4.0)
ethon (>= 0.9.0)
tzinfo (1.2.7)
thread_safe (~> 0.1)
unicode-display_width (1.7.0)
zeitwerk (2.3.0)
PLATFORMS
ruby
DEPENDENCIES
github-pages
jekyll-include-cache
BUNDLED WITH
2.1.4

@ -1,65 +0,0 @@
title: Typegoose
description: > # this means to ignore newlines until a new statement
Documentation for Typegoose
baseurl: '/typegoose'
url: 'https://typegoose.github.io'
remote_theme: mmistakes/minimal-mistakes
locale: 'en-US'
minimal_mistakes_skin: 'default'
markdown: kramdown
search: true
collections:
guides:
permalink: /:collection/:path/ # its ":path" to use the folders in the url
output: true
docs:
permalink: /:collection/:path/ # its ":path" to use the folders in the url
output: true
plugins:
- jekyll-redirect-from
- jekyll-include-cache
sass:
style: compressed
include:
- '*.html' # Needed to include files that start with underscore
defaults:
- scope:
path: '_guides'
type: guides
values:
layout: single
toc: true
sidebar:
nav: 'guides'
- scope:
path: '_docs'
type: docs
values:
layout: single
toc: true
sidebar:
nav: 'docs'
footer:
links:
- label: 'GitHub'
icon: 'fab fa-fw fa-github'
url: https://github.com/typegoose/typegoose/
kramdown:
input: GFM
hard_wrap: false
auto_ids: true
footnote_nr: 1
entity_output: as_char
toc_levels: 1..6
smart_quotes: lsquo,rsquo,ldquo,rdquo
enable_coderay: false
google:
search_engine_id: '015943195979718257496:sxuifq7leav'

@ -1,124 +0,0 @@
main:
- title: 'Guides'
url: /guides/quick-start-guide
- title: 'Documentation'
url: /docs
- title: 'Changelog'
url: /changelog
- title: 'TypeDoc'
url: /typedoc
# Sidebars
## Documentation
docs:
- title: Start
children:
- title: 'Index'
url: /docs
- title: 'Virtuals'
url: /docs/virtuals
- title: 'Environment Variables'
url: /docs/environment
- title: Decorators
children:
- title: 'Prop'
url: /docs/decorators/prop
- title: 'Map Prop'
url: /docs/decorators/mapProp
- title: 'Array Prop'
url: /docs/decorators/arrayProp
- title: 'Model Options'
url: /docs/decorators/modelOptions
- title: 'Hooks'
url: /docs/decorators/hooks
- title: 'Indexes'
url: /docs/decorators/indexes
- title: 'Plugins'
url: /docs/decorators/plugins
- title: 'Query Methods'
url: /docs/decorators/queryMethod
- title: Functions
children:
- title: 'Get Model For Class'
url: /docs/functions/getModelForClass
- title: 'Get Class For Document'
url: /docs/functions/getClassForDocument
- title: 'Get Class'
url: /docs/functions/getClass
- title: 'Build Schema'
url: /docs/functions/buildSchema
- title: 'Get Discriminator Model for Class'
url: /docs/functions/getDiscriminatorModelForClass
- title: 'Add Model To Typegoose'
url: /docs/functions/addModelToTypegoose
- title: 'Delete Models'
url: /docs/functions/deleteModel
- title: 'Set Global Options'
url: /docs/functions/setGlobalOptions
- title: 'Get Model With String'
url: /docs/functions/getModelWithString
- title: 'Get Name For Class'
url: /docs/functions/getName
- title: TypeGuards
children:
- title: 'Is Document'
url: /docs/functions/typeguards/isDocument
- title: 'Is Ref-Type'
url: /docs/functions/typeguards/isRefType
- title: Types
children:
- title: 'Document Type'
url: /docs/types/documentType
- title: 'Return Model Type'
url: /docs/types/returnModelType
- title: 'Ref'
url: /docs/types/ref
- title: 'Additional Types'
url: /docs/types/additional
## Guides
guides:
- title: Getting Started
children:
- title: 'Quick-Start Guide'
url: /guides/quick-start-guide/
- title: 'Migrate to 6.0.0'
url: /guides/migrate-to-6/
- title: 'Migrate to 7.0.0'
url: /guides/migrate-to-7/
- title: 'FAQ'
url: /guides/faq
- title: 'Known Issues'
url: /guides/known-issues
- title: 'Deprecation Codes'
url: /guides/deprecation-codes
- title: Basics
children:
- title: 'All the Decorators'
url: /guides/decorators/
- title: 'Motivation'
url: /guides/motivation/
- title: 'Default Classes'
url: /guides/defaultClasses/
- title: Advanced
children:
- title: 'Custom Types'
url: /guides/advanced/custom-types
- title: 'Model with same name'
url: /guides/advanced/models-with-same-name
- title: "Typegoose's Logger" # this is a double quotation mark, because otherwise it would parse wrong
url: /guides/advanced/logger