From dd4f8b3027aa32b5b661212d7b3c3d7369fd9d74 Mon Sep 17 00:00:00 2001 From: Vasil Rangelov Date: Wed, 17 Jul 2024 10:08:40 +0300 Subject: [PATCH] chore(release): v0.4.1 --- CHANGELOG.md | 12 ++++++++++++ ..._utils_errors.NuxtMikroOrmAlreadyInitialized.html | 8 ++++---- ...ime_utils_errors.NuxtMikroOrmForkUnavailable.html | 8 ++++---- ...runtime_utils_errors.NuxtMikroOrmModuleError.html | 8 ++++---- ...time_utils_errors.NuxtMikroOrmNotInitialized.html | 8 ++++---- docs/functions/module.default.html | 2 +- .../runtime_composables_em.useEntityManager.html | 2 +- .../runtime_server_middleware_em.default.html | 2 +- ...server_utils_internal_orm.handleRequestEvent.html | 2 +- .../functions/runtime_server_utils_orm.closeOrm.html | 2 +- docs/functions/runtime_server_utils_orm.initOrm.html | 2 +- .../runtime_server_utils_orm.registerGlobalOrm.html | 2 +- .../runtime_server_utils_orm.useEntityManager.html | 2 +- docs/functions/runtime_server_utils_orm.useOrm.html | 2 +- docs/interfaces/module.ModuleOptions.html | 12 ++++++------ docs/modules/module.html | 2 +- docs/modules/runtime_composables_em.html | 2 +- docs/modules/runtime_server_middleware_em.html | 2 +- docs/modules/runtime_server_utils_internal_orm.html | 2 +- docs/modules/runtime_server_utils_orm.html | 2 +- docs/modules/runtime_utils_errors.html | 2 +- docs/types/module.ForkOptionsFactory.html | 2 +- package.json | 2 +- 23 files changed, 51 insertions(+), 39 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e59abfa..94c6461 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,18 @@ # Changelog +## v0.4.1 + +[compare changes](https://github.com/boenrobot/nuxt-mikro-orm-module/compare/v0.4.0...v0.4.1) + +### 🩹 Fixes + +- **install:** Fixed install breaking due to husky ([0c38b4a](https://github.com/boenrobot/nuxt-mikro-orm-module/commit/0c38b4a)) + +### ❤️ Contributors + +- Vasil Rangelov + ## v0.4.0 [compare changes](https://github.com/boenrobot/nuxt-mikro-orm-module/compare/v0.3.1...v0.4.0) diff --git a/docs/classes/runtime_utils_errors.NuxtMikroOrmAlreadyInitialized.html b/docs/classes/runtime_utils_errors.NuxtMikroOrmAlreadyInitialized.html index aa2f5ea..8e7b149 100644 --- a/docs/classes/runtime_utils_errors.NuxtMikroOrmAlreadyInitialized.html +++ b/docs/classes/runtime_utils_errors.NuxtMikroOrmAlreadyInitialized.html @@ -1,7 +1,7 @@ NuxtMikroOrmAlreadyInitialized | nuxt-mikro-orm-module

Thrown when attempting to initialize a MikroORM instance that is already initialized.

-

Hierarchy (view full)

Constructors

Hierarchy (view full)

Constructors

Properties

Accessors

Constructors

Properties

#instanceName: string

The name of the instance to which the error refers to.

-

Accessors

  • get instanceName(): string
  • The name of the instance to which the error refers to.

    -

    Returns string

\ No newline at end of file +

Constructors

Properties

#instanceName: string

The name of the instance to which the error refers to.

+

Accessors

  • get instanceName(): string
  • The name of the instance to which the error refers to.

    +

    Returns string

\ No newline at end of file diff --git a/docs/classes/runtime_utils_errors.NuxtMikroOrmForkUnavailable.html b/docs/classes/runtime_utils_errors.NuxtMikroOrmForkUnavailable.html index 9d7d5ec..71a6b0b 100644 --- a/docs/classes/runtime_utils_errors.NuxtMikroOrmForkUnavailable.html +++ b/docs/classes/runtime_utils_errors.NuxtMikroOrmForkUnavailable.html @@ -1,8 +1,8 @@ NuxtMikroOrmForkUnavailable | nuxt-mikro-orm-module

Thrown when trying to access the EntityManager from an island component, while the request's event handler did not fork the entity manager previously.

-

Hierarchy (view full)

Constructors

Hierarchy (view full)

Constructors

Properties

Accessors

Constructors

Properties

#instanceName: string

The name of the instance to which the error refers to.

-

Accessors

  • get instanceName(): string
  • The name of the instance to which the error refers to.

    -

    Returns string

\ No newline at end of file +

Constructors

Properties

#instanceName: string

The name of the instance to which the error refers to.

+

Accessors

  • get instanceName(): string
  • The name of the instance to which the error refers to.

    +

    Returns string

\ No newline at end of file diff --git a/docs/classes/runtime_utils_errors.NuxtMikroOrmModuleError.html b/docs/classes/runtime_utils_errors.NuxtMikroOrmModuleError.html index 7f35588..3a431f6 100644 --- a/docs/classes/runtime_utils_errors.NuxtMikroOrmModuleError.html +++ b/docs/classes/runtime_utils_errors.NuxtMikroOrmModuleError.html @@ -1,7 +1,7 @@ NuxtMikroOrmModuleError | nuxt-mikro-orm-module

Base class for all errors thrown by this module.

-

Hierarchy (view full)

Constructors

Hierarchy (view full)

Constructors

Properties

Accessors

Constructors

Properties

#instanceName: string

The name of the instance to which the error refers to.

-

Accessors

  • get instanceName(): string
  • The name of the instance to which the error refers to.

    -

    Returns string

\ No newline at end of file +

Constructors

Properties

#instanceName: string

The name of the instance to which the error refers to.

+

Accessors

  • get instanceName(): string
  • The name of the instance to which the error refers to.

    +

    Returns string

\ No newline at end of file diff --git a/docs/classes/runtime_utils_errors.NuxtMikroOrmNotInitialized.html b/docs/classes/runtime_utils_errors.NuxtMikroOrmNotInitialized.html index 44567bf..870ce81 100644 --- a/docs/classes/runtime_utils_errors.NuxtMikroOrmNotInitialized.html +++ b/docs/classes/runtime_utils_errors.NuxtMikroOrmNotInitialized.html @@ -1,7 +1,7 @@ NuxtMikroOrmNotInitialized | nuxt-mikro-orm-module

Thrown when trying to access a MikroORM that is not initialized.

-

Hierarchy (view full)

Constructors

Hierarchy (view full)

Constructors

Properties

Accessors

Constructors

Properties

#instanceName: string

The name of the instance to which the error refers to.

-

Accessors

  • get instanceName(): string
  • The name of the instance to which the error refers to.

    -

    Returns string

\ No newline at end of file +

Constructors

Properties

#instanceName: string

The name of the instance to which the error refers to.

+

Accessors

  • get instanceName(): string
  • The name of the instance to which the error refers to.

    +

    Returns string

\ No newline at end of file diff --git a/docs/functions/module.default.html b/docs/functions/module.default.html index 5f81448..58f29ff 100644 --- a/docs/functions/module.default.html +++ b/docs/functions/module.default.html @@ -1 +1 @@ -default | nuxt-mikro-orm-module
  • Parameters

    Returns _ModuleSetupReturn

\ No newline at end of file +default | nuxt-mikro-orm-module
  • Parameters

    Returns _ModuleSetupReturn

\ No newline at end of file diff --git a/docs/functions/runtime_composables_em.useEntityManager.html b/docs/functions/runtime_composables_em.useEntityManager.html index 1400b43..073225c 100644 --- a/docs/functions/runtime_composables_em.useEntityManager.html +++ b/docs/functions/runtime_composables_em.useEntityManager.html @@ -16,4 +16,4 @@

Returns T

The request's associated EntityManager fork.

Throws

NuxtMikroOrmForkUnavailable When trying to use an instance that wasn't forked previously.

-
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/functions/runtime_server_middleware_em.default.html b/docs/functions/runtime_server_middleware_em.default.html index a5cd587..a2e19a3 100644 --- a/docs/functions/runtime_server_middleware_em.default.html +++ b/docs/functions/runtime_server_middleware_em.default.html @@ -1 +1 @@ -default | nuxt-mikro-orm-module
\ No newline at end of file +default | nuxt-mikro-orm-module
\ No newline at end of file diff --git a/docs/functions/runtime_server_utils_internal_orm.handleRequestEvent.html b/docs/functions/runtime_server_utils_internal_orm.handleRequestEvent.html index 11a92a7..70dae17 100644 --- a/docs/functions/runtime_server_utils_internal_orm.handleRequestEvent.html +++ b/docs/functions/runtime_server_utils_internal_orm.handleRequestEvent.html @@ -3,4 +3,4 @@

Parameters

  • event: H3Event<EventHandlerRequest>

    The request event to process.

  • routeOptions: NonNullable<undefined | boolean | {
        api?: boolean;
        islandComponents?: boolean;
        routes?: boolean;
    }>

    The options to determine whether to fork or not

  • name: string = 'default'

    The instance to be forked, if the options match.

    -

Returns void

\ No newline at end of file +

Returns void

\ No newline at end of file diff --git a/docs/functions/runtime_server_utils_orm.closeOrm.html b/docs/functions/runtime_server_utils_orm.closeOrm.html index a7a5105..c24a8e8 100644 --- a/docs/functions/runtime_server_utils_orm.closeOrm.html +++ b/docs/functions/runtime_server_utils_orm.closeOrm.html @@ -5,4 +5,4 @@

Parameters

  • name: string = 'default'

    The name of the instance to be closed.

  • Optional force: boolean

    Whether to force the connection to be closed.

Returns Promise<void>

A promise that resolves once the MikroORM instance is closed, and the name is unregistered.

-
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/functions/runtime_server_utils_orm.initOrm.html b/docs/functions/runtime_server_utils_orm.initOrm.html index 13e45b3..bfcfbf5 100644 --- a/docs/functions/runtime_server_utils_orm.initOrm.html +++ b/docs/functions/runtime_server_utils_orm.initOrm.html @@ -11,4 +11,4 @@ This function is called the first time per request, when useEntityManager is used.

Returns Promise<T>

The initialized MikroORM instance (same as if you had called useOrm with the same name).

Throws

NuxtMikroOrmAlreadyInitialized When trying to initialize an instance that was previously initialized via initOrm or registerGlobalOrm, and still not closed via closeOrm.

-
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/functions/runtime_server_utils_orm.registerGlobalOrm.html b/docs/functions/runtime_server_utils_orm.registerGlobalOrm.html index 489abf5..dd7d5f9 100644 --- a/docs/functions/runtime_server_utils_orm.registerGlobalOrm.html +++ b/docs/functions/runtime_server_utils_orm.registerGlobalOrm.html @@ -18,4 +18,4 @@ the default fork options defined in the runtime config are used. This function is called the first time per request, when useEntityManager is used.

Returns Promise<T>

The initialized MikroORM instance (same as if you had called useOrm with the same name).

-
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/functions/runtime_server_utils_orm.useEntityManager.html b/docs/functions/runtime_server_utils_orm.useEntityManager.html index bef808b..20e5ed1 100644 --- a/docs/functions/runtime_server_utils_orm.useEntityManager.html +++ b/docs/functions/runtime_server_utils_orm.useEntityManager.html @@ -15,4 +15,4 @@

Returns T

The request's associated EntityManager fork.

Throws

NuxtMikroOrmNotInitialized When trying to use an instance that wasn't previously initialized with initOrm or registerGlobalOrm.

-
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/functions/runtime_server_utils_orm.useOrm.html b/docs/functions/runtime_server_utils_orm.useOrm.html index 26931ef..f5b3987 100644 --- a/docs/functions/runtime_server_utils_orm.useOrm.html +++ b/docs/functions/runtime_server_utils_orm.useOrm.html @@ -5,4 +5,4 @@

Returns T

The MikroORM instance for the given name.

Throws

NuxtMikroOrmNotInitialized When trying to use an instance that wasn't previously initialized with initOrm or registerGlobalOrm.

-
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/interfaces/module.ModuleOptions.html b/docs/interfaces/module.ModuleOptions.html index c55b76f..0f69e16 100644 --- a/docs/interfaces/module.ModuleOptions.html +++ b/docs/interfaces/module.ModuleOptions.html @@ -2,7 +2,7 @@

Available in nuxt config from the "mikroOrm" key.

Copied to "runtimeConfig.mikroOrm" and "nitro.runtimeConfig.mikroOrm", when those are not defined.

-
interface ModuleOptions {
    autoForking: false | "hook" | "middleware";
    forceClose?: boolean;
    forkOptions?: ForkOptions;
    overrides?: {
        [instanceName: string]: Omit<ModuleOptions, "overrides">;
    };
    routeOptions?: boolean | {
        api?: boolean;
        islandComponents?: boolean;
        routes?: boolean;
    };
}

Properties

interface ModuleOptions {
    autoForking: false | "hook" | "middleware";
    forceClose?: boolean;
    forkOptions?: ForkOptions;
    overrides?: {
        [instanceName: string]: Omit<ModuleOptions, "overrides">;
    };
    routeOptions?: boolean | {
        api?: boolean;
        islandComponents?: boolean;
        routes?: boolean;
    };
}

Properties

autoForking forceClose? forkOptions? overrides? @@ -27,24 +27,24 @@ Note that the middleware is always triggered per request, even with ModuleOptions.routeOptions being set to a boolean.

Setting this option to false disables auto forking altogether.

-
forceClose?: boolean

Default force close option.

+
forceClose?: boolean

Default force close option.

This is used in closeOrm whenever a force option is not explicitly provided. Notably, this includes the close hook registered with registerGlobalOrm.

-
forkOptions?: ForkOptions

Default fork options.

+
forkOptions?: ForkOptions

Default fork options.

This is used in initOrm and registerGlobalOrm when the forkOptionsFactory function is either undefined, or returns undefined.

-
overrides?: {
    [instanceName: string]: Omit<ModuleOptions, "overrides">;
}

Overrides of the default options.

+
overrides?: {
    [instanceName: string]: Omit<ModuleOptions, "overrides">;
}

Overrides of the default options.

If an instance is not in this map, all the default options are used.

If an instance in its map, but misses a given option, the defaults for that option are used.

If an instance is in this map and specifies an option, the values are NOT merged, but instead, the specified value here is used in its entirety.

-

Type declaration

routeOptions?: boolean | {
    api?: boolean;
    islandComponents?: boolean;
    routes?: boolean;
}

Default route options for auto forking.

+

Type declaration

routeOptions?: boolean | {
    api?: boolean;
    islandComponents?: boolean;
    routes?: boolean;
}

Default route options for auto forking.

When using registerGlobalOrm, a "close" hook is always registered. Then, depending on the setting ModuleOptions.autoForking, @@ -63,4 +63,4 @@

Type declaration

  • Optional api?: boolean

    Whether to fork on api requests (URLs beginning with "/api/").

  • Optional islandComponents?: boolean

    Whether to fork on island component requests (URLs beginning with "/__nuxt_island/").

  • Optional routes?: boolean

    Whether to fork on any request other than api or island components.

    -
\ No newline at end of file +
\ No newline at end of file diff --git a/docs/modules/module.html b/docs/modules/module.html index f0033dd..961ca7c 100644 --- a/docs/modules/module.html +++ b/docs/modules/module.html @@ -1,4 +1,4 @@ -module | nuxt-mikro-orm-module

Index

Interfaces

ModuleOptions +module | nuxt-mikro-orm-module

Index

Interfaces

Type Aliases

Functions

\ No newline at end of file diff --git a/docs/modules/runtime_composables_em.html b/docs/modules/runtime_composables_em.html index 949dc6f..ad36014 100644 --- a/docs/modules/runtime_composables_em.html +++ b/docs/modules/runtime_composables_em.html @@ -1,2 +1,2 @@ -runtime/composables/em | nuxt-mikro-orm-module

Module runtime/composables/em

Index

Functions

useEntityManager +runtime/composables/em | nuxt-mikro-orm-module
\ No newline at end of file diff --git a/docs/modules/runtime_server_middleware_em.html b/docs/modules/runtime_server_middleware_em.html index 9e0fdd1..28de718 100644 --- a/docs/modules/runtime_server_middleware_em.html +++ b/docs/modules/runtime_server_middleware_em.html @@ -1,2 +1,2 @@ -runtime/server/middleware/em | nuxt-mikro-orm-module

Module runtime/server/middleware/em

Index

Functions

default +runtime/server/middleware/em | nuxt-mikro-orm-module

Module runtime/server/middleware/em

Index

Functions

\ No newline at end of file diff --git a/docs/modules/runtime_server_utils_internal_orm.html b/docs/modules/runtime_server_utils_internal_orm.html index 39a1de4..4092b28 100644 --- a/docs/modules/runtime_server_utils_internal_orm.html +++ b/docs/modules/runtime_server_utils_internal_orm.html @@ -1,2 +1,2 @@ -runtime/server/utils/internal/orm | nuxt-mikro-orm-module

Module runtime/server/utils/internal/orm

Index

Functions

handleRequestEvent +runtime/server/utils/internal/orm | nuxt-mikro-orm-module
\ No newline at end of file diff --git a/docs/modules/runtime_server_utils_orm.html b/docs/modules/runtime_server_utils_orm.html index 8f744e9..468f4f6 100644 --- a/docs/modules/runtime_server_utils_orm.html +++ b/docs/modules/runtime_server_utils_orm.html @@ -1,4 +1,4 @@ -runtime/server/utils/orm | nuxt-mikro-orm-module

Module runtime/server/utils/orm

Index

Functions

closeOrm +runtime/server/utils/orm | nuxt-mikro-orm-module

Module runtime/server/utils/orm

Index

Functions

closeOrm initOrm registerGlobalOrm useEntityManager diff --git a/docs/modules/runtime_utils_errors.html b/docs/modules/runtime_utils_errors.html index fbcf223..1fdee3e 100644 --- a/docs/modules/runtime_utils_errors.html +++ b/docs/modules/runtime_utils_errors.html @@ -1,4 +1,4 @@ -runtime/utils/errors | nuxt-mikro-orm-module

Index

Classes

NuxtMikroOrmAlreadyInitialized +runtime/utils/errors | nuxt-mikro-orm-module

Index

Classes

NuxtMikroOrmAlreadyInitialized NuxtMikroOrmForkUnavailable NuxtMikroOrmModuleError NuxtMikroOrmNotInitialized diff --git a/docs/types/module.ForkOptionsFactory.html b/docs/types/module.ForkOptionsFactory.html index f02ad48..4b7f585 100644 --- a/docs/types/module.ForkOptionsFactory.html +++ b/docs/types/module.ForkOptionsFactory.html @@ -2,4 +2,4 @@

Type declaration

    • (event, name): ForkOptions | undefined
    • Parameters

      • event: H3Event<EventHandlerRequest>

        The request even for which a fork is about to be creted.

      • name: string

        The name of the instance being forked.

      Returns ForkOptions | undefined

Returns

The fork options that will be used in the new fork.

-
\ No newline at end of file +
\ No newline at end of file diff --git a/package.json b/package.json index 621c530..df19232 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nuxt-mikro-orm-module", - "version": "0.4.0", + "version": "0.4.1", "description": "Nuxt MikroORM module", "license": "LGPL-2.1-only", "type": "module",