@quazardous/qdadm 2.4.3 → 2.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,15 +8,15 @@ import {
8
8
  type RouteRecordNormalized,
9
9
  } from 'vue-router'
10
10
  import { getRoutes } from '../module/moduleRegistry'
11
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
12
- type Self = any
11
+ import type { Kernel } from './Kernel'
12
+ // #1196 Phase B — this-typing against the real Kernel shape (was Self = any)
13
+ type Self = Kernel
13
14
 
14
15
  /**
15
16
  * Patch Kernel prototype with routing-related methods.
16
17
  */
17
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
18
- export function applyRoutingMethods(KernelClass: { prototype: any }): void {
19
- const proto = KernelClass.prototype as Self
18
+ export function applyRoutingMethods(KernelClass: { prototype: Kernel }): void {
19
+ const proto = KernelClass.prototype
20
20
 
21
21
  /**
22
22
  * Create Vue Router.
@@ -16,8 +16,9 @@ import ToastListener from '../toast/ToastListener.vue'
16
16
  import { createQdadm } from '../plugin.js'
17
17
  import { createNotificationStore, NOTIFICATION_KEY } from '../notifications/NotificationStore'
18
18
  import { I18N_INJECTION_KEY } from '../i18n/useI18n'
19
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
20
- type Self = any
19
+ import type { Kernel } from './Kernel'
20
+ // #1196 Phase B — this-typing against the real Kernel shape (was Self = any)
21
+ type Self = Kernel
21
22
 
22
23
  /**
23
24
  * Reactive reference to the debug bar component, set by the Kernel
@@ -57,9 +58,8 @@ export function setQdadmDebugBar(component: Component | null): void {
57
58
  /**
58
59
  * Patch Kernel prototype with Vue app creation methods.
59
60
  */
60
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
61
- export function applyVueMethods(KernelClass: { prototype: any }): void {
62
- const proto = KernelClass.prototype as Self
61
+ export function applyVueMethods(KernelClass: { prototype: Kernel }): void {
62
+ const proto = KernelClass.prototype
63
63
 
64
64
  /**
65
65
  * Create layout components map for useLayoutResolver
@@ -8,13 +8,13 @@ import { managerFactory, type ManagerFactoryContext } from '../entity/factory.js
8
8
  import type { EntityManager } from '../entity/EntityManager'
9
9
  import { UsersManager } from '../security/UsersManager'
10
10
  import type { UserEntityOptions } from './KernelContext.types'
11
+ import type { KernelContext } from './KernelContext'
11
12
 
12
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
13
- type Self = any
13
+ // #1196 Phase B — this-typing against the real KernelContext shape (was Self = any)
14
+ type Self = KernelContext
14
15
 
15
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
16
- export function applyEntityMethods(KernelContextClass: { prototype: any }): void {
17
- const proto = KernelContextClass.prototype as Self
16
+ export function applyEntityMethods(KernelContextClass: { prototype: KernelContext }): void {
17
+ const proto = KernelContextClass.prototype
18
18
 
19
19
  /**
20
20
  * Register an entity manager.
@@ -12,13 +12,13 @@ import type {
12
12
  HookHandler,
13
13
  SignalHandler,
14
14
  } from './KernelContext.types'
15
+ import type { KernelContext } from './KernelContext'
15
16
 
16
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
17
- type Self = any
17
+ // #1196 Phase B — this-typing against the real KernelContext shape (was Self = any)
18
+ type Self = KernelContext
18
19
 
19
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
20
- export function applyEventMethods(KernelContextClass: { prototype: any }): void {
21
- const proto = KernelContextClass.prototype as Self
20
+ export function applyEventMethods(KernelContextClass: { prototype: KernelContext }): void {
21
+ const proto = KernelContextClass.prototype
22
22
 
23
23
  proto.on = function (
24
24
  this: Self,
@@ -6,13 +6,13 @@
6
6
  */
7
7
 
8
8
  import type { AliasPattern, MessagesBundle, TranslationProvider } from '../i18n/types'
9
+ import type { KernelContext } from './KernelContext'
9
10
 
10
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
11
- type Self = any
11
+ // #1196 Phase B — this-typing against the real KernelContext shape (was Self = any)
12
+ type Self = KernelContext
12
13
 
13
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
14
- export function applyI18nMethods(KernelContextClass: { prototype: any }): void {
15
- const proto = KernelContextClass.prototype as Self
14
+ export function applyI18nMethods(KernelContextClass: { prototype: KernelContext }): void {
15
+ const proto = KernelContextClass.prototype
16
16
 
17
17
  proto.messages = function (this: Self, locale: string, bundle: MessagesBundle): Self {
18
18
  if (this._kernel.i18nInstance) {
@@ -5,13 +5,13 @@
5
5
  */
6
6
 
7
7
  import type { PermissionMeta, PermissionOptions } from './KernelContext.types'
8
+ import type { KernelContext } from './KernelContext'
8
9
 
9
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
10
- type Self = any
10
+ // #1196 Phase B — this-typing against the real KernelContext shape (was Self = any)
11
+ type Self = KernelContext
11
12
 
12
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
13
- export function applyPermissionMethods(KernelContextClass: { prototype: any }): void {
14
- const proto = KernelContextClass.prototype as Self
13
+ export function applyPermissionMethods(KernelContextClass: { prototype: KernelContext }): void {
14
+ const proto = KernelContextClass.prototype
15
15
 
16
16
  proto.permissions = function (
17
17
  this: Self,
@@ -21,9 +21,10 @@ import type {
21
21
  ParentConfig,
22
22
  RouteOptions,
23
23
  } from './KernelContext.types'
24
+ import type { KernelContext } from './KernelContext'
24
25
 
25
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
26
- type Self = any
26
+ // #1196 Phase B — this-typing against the real KernelContext shape (was Self = any)
27
+ type Self = KernelContext
27
28
 
28
29
  /** Singularize a plural word (simple English rules) */
29
30
  function singularize(plural: string): string {
@@ -128,9 +129,8 @@ function resolveParentParam(opts: {
128
129
  return namespaced
129
130
  }
130
131
 
131
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
132
- export function applyRoutingMethods(KernelContextClass: { prototype: any }): void {
133
- const proto = KernelContextClass.prototype as Self
132
+ export function applyRoutingMethods(KernelContextClass: { prototype: KernelContext }): void {
133
+ const proto = KernelContextClass.prototype
134
134
 
135
135
  proto.routes = function (
136
136
  this: Self,
@@ -20,6 +20,7 @@ import type { DeferredRegistry } from '../deferred/DeferredRegistry.js'
20
20
  import type { SecurityChecker } from '../entity/auth/SecurityChecker'
21
21
  import type { PermissionRegistry } from '../security/PermissionRegistry'
22
22
  import type { I18n } from '../i18n/I18n'
23
+ import type { RouteParamResolverContext } from './KernelContext.routing'
23
24
 
24
25
  // ─────────────────────────────────────────────────────────────────────────────
25
26
  // Internal types — shared across patch modules, not exposed by index.ts
@@ -41,6 +42,10 @@ export interface AuthAdapter {
41
42
  export interface KernelOptions {
42
43
  debug?: boolean
43
44
  authAdapter?: AuthAdapter | null
45
+ /** Parent route param naming policy for child CRUD families (#1201). */
46
+ parentParamMode?: 'auto' | 'always' | 'bare'
47
+ /** Custom parent route param name resolver (#1201) — wins over parentParamMode. */
48
+ routeParamResolver?: (ctx: RouteParamResolverContext) => string | undefined
44
49
  storageResolver?: unknown
45
50
  managerResolver?: unknown
46
51
  managerRegistry?: Record<string, unknown>
@@ -12,13 +12,13 @@
12
12
 
13
13
  import type { Component } from 'vue'
14
14
  import type { BlockConfig, ZoneOptions } from './KernelContext.types'
15
+ import type { KernelContext } from './KernelContext'
15
16
 
16
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
17
- type Self = any
17
+ // #1196 Phase B — this-typing against the real KernelContext shape (was Self = any)
18
+ type Self = KernelContext
18
19
 
19
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
20
- export function applyZoneMethods(KernelContextClass: { prototype: any }): void {
21
- const proto = KernelContextClass.prototype as Self
20
+ export function applyZoneMethods(KernelContextClass: { prototype: KernelContext }): void {
21
+ const proto = KernelContextClass.prototype
22
22
 
23
23
  proto.zone = function (this: Self, name: string, options: ZoneOptions = {}): Self {
24
24
  if (this._kernel.zoneRegistry) {
@@ -73,7 +73,7 @@ interface QueryManagerLike {
73
73
  /**
74
74
  * Minimal interface for Orchestrator (to avoid circular deps)
75
75
  */
76
- interface QueryOrchestratorLike {
76
+ export interface QueryOrchestratorLike {
77
77
  get(name: string): QueryManagerLike | null | undefined
78
78
  }
79
79