@common-stack/server-core 8.2.4-alpha.0 → 8.2.4-alpha.1

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.
@@ -100,6 +100,12 @@ export type FeatureParams<T = any, S = any> = {
100
100
  * Inngest functions that can be registered from different modules
101
101
  */
102
102
  inngestFunctions?: Function | Function[];
103
+ /**
104
+ * Service schemas for proxy service generation.
105
+ * Used by additionalProxyServices in config.json to auto-generate proxy classes.
106
+ * Should be a Record mapping schema names to their Zod schemas (e.g., AllServiceSchemas).
107
+ */
108
+ serviceSchemas?: Record<string, unknown>;
103
109
  };
104
110
  type RegisterExpressMiddlewareFunc = (app: Express, container: Container) => void;
105
111
  declare class Feature<T = any, S = any> {
@@ -169,6 +175,11 @@ declare class Feature<T = any, S = any> {
169
175
  }>;
170
176
  graphqlPlugins?: ApolloServerPlugin<any>[];
171
177
  inngestFunctions: Function[];
178
+ /**
179
+ * Service schemas for proxy service generation.
180
+ * Used by additionalProxyServices in config.json to auto-generate proxy classes.
181
+ */
182
+ serviceSchemas: Record<string, unknown>;
172
183
  private _rules;
173
184
  private services;
174
185
  private container;
@@ -65,6 +65,11 @@ class Feature {
65
65
  migrations;
66
66
  graphqlPlugins;
67
67
  inngestFunctions;
68
+ /**
69
+ * Service schemas for proxy service generation.
70
+ * Used by additionalProxyServices in config.json to auto-generate proxy classes.
71
+ */
72
+ serviceSchemas;
68
73
  _rules;
69
74
  services;
70
75
  container;
@@ -171,6 +176,13 @@ class Feature {
171
176
  });
172
177
  this.graphqlPlugins = combine(args, (args) => args.graphqlPlugins);
173
178
  this.inngestFunctions = combine(args, (arg) => arg.inngestFunctions);
179
+ // Merge all service schemas from all features
180
+ this.serviceSchemas = args.reduce((acc, arg) => {
181
+ if (arg && arg.serviceSchemas) {
182
+ return { ...acc, ...arg.serviceSchemas };
183
+ }
184
+ return acc;
185
+ }, {});
174
186
  }
175
187
  get rules() {
176
188
  return this._rules.reduce((acc, curr) => merge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AGpF,MAAM,kBAAkB,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,IAAI,KAAI;AACtD,YAAA,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE;AACrB,gBAAA,OAAO,CAAC,GAAG,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC;aAC5B;AACD,YAAA,OAAO,CAAC,GAAG,GAAG,EAAE,IAAI,CAAC,CAAC;SACzB,EAAE,EAAE,CAAC,CAAC;;AAGP,QAAA,OAAO,kBAAkB,CAAC,MAAM,CAAC,CAAC,EAAE,KAAI;;;YAGpC,OAAO,EAAE,IAAI,OAAO,EAAE,KAAK,QAAQ,IAAI,EAAE,CAAC,EAAE,CAAC;AACjD,SAAC,CAAC,CAAC;KACN;AACJ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@common-stack/server-core",
3
- "version": "8.2.4-alpha.0",
3
+ "version": "8.2.4-alpha.1",
4
4
  "description": "common core for higher packages to depend on",
5
5
  "license": "UNLICENSED",
6
6
  "author": "CDMBase LLC",
@@ -34,7 +34,7 @@
34
34
  "publishConfig": {
35
35
  "access": "public"
36
36
  },
37
- "gitHead": "17a7211aace8dd1da78620793fe3a40b05f46bac",
37
+ "gitHead": "d92ef779879bd24543958460641b008446bf092a",
38
38
  "typescript": {
39
39
  "definition": "lib/index.d.ts"
40
40
  }
@@ -1,6 +0,0 @@
1
- /**
2
- * @file integration-proxy-moleculer.test.ts
3
- * @description Integration tests for full proxy → Moleculer → service cycle
4
- * Tests parameter wrapping/unwrapping between proxy and Moleculer handler
5
- */
6
- export {};
@@ -1,5 +0,0 @@
1
- /**
2
- * @file moleculerEventHandler.test.ts
3
- * @description Test suite for Moleculer event handler decorator
4
- */
5
- export {};
@@ -1,5 +0,0 @@
1
- /**
2
- * @file serviceGenerationUtils.test.ts
3
- * @description Test suite for service generation utilities
4
- */
5
- export {};
@@ -1,5 +0,0 @@
1
- /**
2
- * @file typedMoleculerService.test.ts
3
- * @description Test suite for Moleculer service generation
4
- */
5
- export {};
@@ -1,5 +0,0 @@
1
- /**
2
- * @file typedProxyService.test.ts
3
- * @description Test suite for proxy service generation
4
- */
5
- export {};
@@ -1,16 +0,0 @@
1
- /**
2
- * @file moleculer-generation/index.ts
3
- * @description Auto-generation utilities for Moleculer services and proxy services
4
- *
5
- * This module provides utilities for auto-generating:
6
- * - Server-side Moleculer service actions and events
7
- * - Client-side proxy service methods
8
- *
9
- * All utilities ensure consistent naming conventions (camelCase) across
10
- * the entire microservice architecture.
11
- */
12
- export * from './serviceGenerationUtils';
13
- export * from './moleculerEventHandler';
14
- export * from './typedMoleculerService';
15
- export * from './typedProxyService';
16
- export * from './zodToMoleculer';
@@ -1,73 +0,0 @@
1
- /**
2
- * @file moleculer-event-handler.ts
3
- * @description Decorator for marking service methods as Moleculer event handlers
4
- *
5
- * This allows event handlers to be defined directly in the service class
6
- * and automatically registered as Moleculer events.
7
- */
8
- import 'reflect-metadata';
9
- /**
10
- * Moleculer namespace containing event handler utilities
11
- */
12
- export declare namespace Moleculer {
13
- /**
14
- * Metadata key for storing event handler information
15
- */
16
- const EVENT_HANDLER_METADATA_KEY = "moleculer:eventHandler";
17
- /**
18
- * Event handler metadata interface
19
- */
20
- interface EventHandlerMetadata {
21
- eventName: string;
22
- methodName: string;
23
- group?: string;
24
- }
25
- /**
26
- * Decorator for marking a service method as a Moleculer event handler
27
- *
28
- * @param eventName - The event name to listen for
29
- * @param options - Optional event configuration
30
- *
31
- * @example
32
- * ```typescript
33
- * class OrganizationService implements IOrganizationService {
34
- * @Moleculer.EventHandler(UserBroadcasterAction.OnUserCreated)
35
- * async onUserCreated(event: IUserCreationEvent): Promise<void> {
36
- * await this.createDefaultOrganization(event.user);
37
- * }
38
- *
39
- * @Moleculer.EventHandler(OrganizationServiceAction.OnOrganizationCreated, { group: 'org-setup' })
40
- * async onOrganizationCreated(event: IOrganizationCreatedEvent): Promise<void> {
41
- * // Handle organization creation
42
- * }
43
- * }
44
- * ```
45
- */
46
- function EventHandler(eventName: string, options?: {
47
- group?: string;
48
- }): MethodDecorator;
49
- /**
50
- * Get all Moleculer event handlers defined on a service class
51
- *
52
- * @param serviceClassOrInstance - The service class constructor or instance
53
- * @returns Array of event handler metadata
54
- *
55
- * @example
56
- * ```typescript
57
- * const handlers = Moleculer.getEventHandlers(OrganizationService);
58
- * // Returns: [
59
- * // { eventName: 'user.created', methodName: 'onUserCreated' },
60
- * // { eventName: 'org.created', methodName: 'onOrganizationCreated' }
61
- * // ]
62
- * ```
63
- */
64
- function getEventHandlers(serviceClassOrInstance: (new (...args: unknown[]) => unknown) | object): EventHandlerMetadata[];
65
- /**
66
- * Check if a method is marked as a Moleculer event handler
67
- *
68
- * @param serviceClassOrInstance - The service class constructor or instance
69
- * @param methodName - The method name to check
70
- * @returns Event handler metadata if found, undefined otherwise
71
- */
72
- function isEventHandler(serviceClassOrInstance: (new (...args: unknown[]) => unknown) | object, methodName: string): EventHandlerMetadata | undefined;
73
- }
@@ -1,100 +0,0 @@
1
- /**
2
- * @file serviceGenerationUtils.ts
3
- * @description Shared utilities for auto-generating Moleculer services and proxy services.
4
- *
5
- * This module provides common functionality used by both:
6
- * - typedMoleculerService.ts (server-side Moleculer service generation)
7
- * - typedProxyService.ts (client-side proxy service generation)
8
- *
9
- * Centralizing these utilities ensures consistency in action naming conventions
10
- * and method discovery across the entire microservice architecture.
11
- */
12
- /**
13
- * Excluded base service methods that should not be auto-generated as actions
14
- */
15
- export type ExcludedServiceMethods = 'dispose' | 'get' | 'getAll' | 'bulkDelete' | 'delete' | 'count' | 'getByName' | 'getByIds' | 'getAllWithCount' | 'create' | 'update' | 'bulkCreate' | 'insert' | 'broker' | 'logger' | 'topic' | 'callAction';
16
- /**
17
- * Check if a method should be excluded from auto-generation
18
- *
19
- * @param methodName - The method name to check
20
- * @param context - Generation context: 'moleculer' for server-side, 'proxy' for client-side
21
- * @returns true if the method should be excluded
22
- */
23
- export declare function isExcludedMethod(methodName: string, context?: 'moleculer' | 'proxy'): boolean;
24
- /**
25
- * Get all method names from a service instance, traversing the prototype chain.
26
- *
27
- * This function walks up the prototype chain to include inherited methods from
28
- * parent classes, which is essential for services that extend base classes.
29
- *
30
- * @param obj - The service instance to analyze
31
- * @returns Array of method names (includes inherited methods)
32
- *
33
- * @example
34
- * ```typescript
35
- * class BaseService {
36
- * get() {}
37
- * getAll() {}
38
- * }
39
- *
40
- * class UserService extends BaseService {
41
- * createUser() {}
42
- * }
43
- *
44
- * const service = new UserService();
45
- * const methods = getAllMethodNames(service);
46
- * // Returns: ['createUser', 'get', 'getAll', 'constructor']
47
- * ```
48
- */
49
- export declare function getAllMethodNames(obj: unknown): string[];
50
- /**
51
- * Convert method name to action name using camelCase convention.
52
- *
53
- * **IMPORTANT**: We use camelCase (method name as-is) for action names to match
54
- * the Moleculer service action registration pattern. Both server-side Moleculer
55
- * services and client-side proxy services must use the same convention.
56
- *
57
- * @param methodName - The method name (e.g., 'getTags', 'createTag')
58
- * @returns The action name in camelCase (same as method name)
59
- *
60
- * @example
61
- * ```typescript
62
- * getActionName('getTags') // Returns: 'getTags'
63
- * getActionName('createTag') // Returns: 'createTag'
64
- * getActionName('removeTag') // Returns: 'removeTag'
65
- * ```
66
- *
67
- * @deprecated PascalCase conversion (e.g., GetTags, CreateTag) is no longer used.
68
- * Previous behavior caused mismatches between proxy and Moleculer services.
69
- */
70
- export declare function getActionName(methodName: string): string;
71
- /**
72
- * Convert string to PascalCase (first letter uppercase).
73
- *
74
- * **DEPRECATED**: This function is kept for backward compatibility with command enums
75
- * but should NOT be used for action name generation. Use getActionName() instead.
76
- *
77
- * @param str - The string to convert
78
- * @returns String with first letter uppercase
79
- *
80
- * @example
81
- * ```typescript
82
- * toPascalCase('getTags') // Returns: 'GetTags'
83
- * toPascalCase('createTag') // Returns: 'CreateTag'
84
- * ```
85
- */
86
- export declare function toPascalCase(str: string): string;
87
- /**
88
- * Build the full Moleculer action path from topic and action name.
89
- *
90
- * @param topic - The Moleculer service topic (e.g., 'Tag', 'User')
91
- * @param actionName - The action name (e.g., 'getTags', 'createTag')
92
- * @returns Full action path (e.g., 'Tag.getTags', 'User.createUser')
93
- *
94
- * @example
95
- * ```typescript
96
- * buildActionPath('Tag', 'getTags') // Returns: 'Tag.getTags'
97
- * buildActionPath('User', 'createUser') // Returns: 'User.createUser'
98
- * ```
99
- */
100
- export declare function buildActionPath(topic: string, actionName: string): string;
@@ -1,502 +0,0 @@
1
- /**
2
- * @file typed-moleculer-service.ts
3
- * @description Provides type-safe base class for Moleculer services with ENFORCED
4
- * compile-time verification AND automatic action generation from service methods.
5
- */
6
- import type { ServiceSchema } from 'moleculer';
7
- import { type ExcludedServiceMethods } from './serviceGenerationUtils';
8
- /**
9
- * Exclude base service CRUD methods and lifecycle methods
10
- * @deprecated Use ExcludedServiceMethods from serviceGenerationUtils instead
11
- */
12
- type ExcludedMethods = ExcludedServiceMethods;
13
- /**
14
- * Extract all method names from a service interface (excluding base methods)
15
- */
16
- export type ServiceMethods<T> = {
17
- [K in keyof T]: T[K] extends Function ? (K extends ExcludedMethods ? never : K) : never;
18
- }[keyof T];
19
- /**
20
- * Required actions type - forces all service methods to have actions
21
- */
22
- export type RequiredServiceActions<TService> = {
23
- [K in ServiceMethods<TService>]: {
24
- params?: Record<string, unknown>;
25
- handler: (...args: unknown[]) => unknown;
26
- };
27
- };
28
- /**
29
- * Service schema with REQUIRED typed actions - TypeScript will error if any are missing
30
- */
31
- export interface EnforcedServiceSchema<TService> extends Omit<ServiceSchema, 'actions'> {
32
- name: string;
33
- actions: RequiredServiceActions<TService> & Record<string, unknown>;
34
- }
35
- /**
36
- * ADVANCED AUTO-GENERATED configuration with full control
37
- * Params are inferred from TypeScript function signatures with optional fine-grained control
38
- */
39
- export type AutoInferredActionConfig<TService> = {
40
- /**
41
- * Optional: Service topic/name for Moleculer actions
42
- * Automatically extracted from schemas if using generateAllServiceSchemas.js pattern
43
- * This makes service names minification-safe and centralized
44
- *
45
- * @example
46
- * ```typescript
47
- * topic: 'TagService' // Or extracted from TagServiceSchemas.topic
48
- * ```
49
- */
50
- topic?: string;
51
- /**
52
- * Optional: Override param schemas for specific methods
53
- * Use this when you need custom Moleculer validation beyond the default 'object' type
54
- *
55
- * @example
56
- * ```typescript
57
- * paramOverrides: {
58
- * findAccountById: { id: 'string' }, // Override inferred 'object' with 'string'
59
- * getUsers: { where: { type: 'object', optional: true } } // Add optional flag
60
- * }
61
- * ```
62
- */
63
- paramOverrides?: Partial<{
64
- [K in ServiceMethods<TService>]: Record<string, unknown>;
65
- }>;
66
- /**
67
- * Optional: Only include specific methods (whitelist approach)
68
- * If specified, ONLY these methods will be auto-generated
69
- * Takes precedence over exclude
70
- *
71
- * @example
72
- * ```typescript
73
- * include: ['findAccountById', 'createAccount', 'updateAccount']
74
- * ```
75
- */
76
- include?: Array<ServiceMethods<TService>>;
77
- /**
78
- * Optional: Exclude specific methods from auto-generation (blacklist approach)
79
- * Ignored if 'include' is specified
80
- *
81
- * @example
82
- * ```typescript
83
- * exclude: ['deleteAccount', 'internalMethod']
84
- * ```
85
- */
86
- exclude?: Array<ServiceMethods<TService>>;
87
- /**
88
- * Optional: Map action names to different method names
89
- * Use this when your Moleculer action name differs from the service method name
90
- *
91
- * @example
92
- * ```typescript
93
- * actionToMethodMap: {
94
- * 'accounts.find': 'findAccountById',
95
- * 'accounts.create': 'createAccount'
96
- * }
97
- * ```
98
- */
99
- actionToMethodMap?: Record<string, string>;
100
- /**
101
- * Optional: Add custom Moleculer action properties for specific methods
102
- * Allows setting visibility, caching, rate limiting, etc.
103
- *
104
- * @example
105
- * ```typescript
106
- * actionConfig: {
107
- * findAccountById: {
108
- * cache: true,
109
- * visibility: 'public'
110
- * },
111
- * deleteAccount: {
112
- * visibility: 'protected'
113
- * }
114
- * }
115
- * ```
116
- */
117
- actionConfig?: Partial<{
118
- [K in ServiceMethods<TService>]: {
119
- cache?: boolean | object;
120
- visibility?: 'public' | 'protected' | 'private';
121
- [key: string]: unknown;
122
- };
123
- }>;
124
- };
125
- /**
126
- * ADVANCED AUTO-GENERATED: Generate actions with full control over inclusion, exclusion, and overrides.
127
- * Params are inferred from TypeScript function signatures with optional fine-grained control.
128
- *
129
- * @param service - The service instance to wrap
130
- * @param config - Advanced configuration for fine-grained control
131
- * @returns Actions object with handlers for selected service methods
132
- *
133
- * @example
134
- * ```typescript
135
- * // Basic: Auto-generate all methods
136
- * const actions = generateAutoInferredServiceActions<IAccountService>(accountService);
137
- *
138
- * // Advanced: Include only specific methods
139
- * const actions = generateAutoInferredServiceActions<IAccountService>(accountService, {
140
- * include: ['findAccountById', 'createAccount', 'updateAccount']
141
- * });
142
- *
143
- * // Advanced: Exclude specific methods
144
- * const actions = generateAutoInferredServiceActions<IAccountService>(accountService, {
145
- * exclude: ['deleteAccount', 'internalMethod']
146
- * });
147
- *
148
- * // Advanced: Override param schemas for specific methods
149
- * const actions = generateAutoInferredServiceActions<IAccountService>(accountService, {
150
- * paramOverrides: {
151
- * findAccountById: { id: 'string' },
152
- * getUsers: { where: { type: 'object', optional: true } }
153
- * }
154
- * });
155
- *
156
- * // Advanced: Add custom action configuration
157
- * const actions = generateAutoInferredServiceActions<IAccountService>(accountService, {
158
- * actionConfig: {
159
- * findAccountById: { cache: true, visibility: 'public' },
160
- * deleteAccount: { visibility: 'protected' }
161
- * }
162
- * });
163
- *
164
- * // Advanced: Combine multiple options
165
- * const actions = generateAutoInferredServiceActions<IAccountService>(accountService, {
166
- * include: ['findAccountById', 'createAccount'],
167
- * paramOverrides: {
168
- * findAccountById: { id: 'string' }
169
- * },
170
- * actionConfig: {
171
- * findAccountById: { cache: true }
172
- * }
173
- * });
174
- * ```
175
- */
176
- export declare function generateAutoInferredServiceActions<TService>(service: TService, config?: AutoInferredActionConfig<TService>): Record<string, {
177
- params?: Record<string, unknown>;
178
- handler: (ctx: unknown) => unknown;
179
- }>;
180
- /**
181
- * Generate both actions AND events from a service instance
182
- * - Actions: Generated from regular service methods
183
- * - Events: Generated from methods marked with @MoleculerEventHandler decorator
184
- *
185
- * @param service - The service instance to wrap
186
- * @param config - Configuration for actions and events
187
- * @returns Object with both actions and events
188
- *
189
- * @example
190
- * ```typescript
191
- * // Service with decorator
192
- * class OrganizationService {
193
- * // Regular method becomes action
194
- * async createOrganization(org: Org): Promise<Org> { }
195
- *
196
- * // Decorated method becomes event handler
197
- * @MoleculerEventHandler(UserBroadcasterAction.OnUserCreated)
198
- * async onUserCreated(event: UserEvent): Promise<void> { }
199
- * }
200
- *
201
- * // Generate both
202
- * const { actions, events } = generateServiceActionsAndEvents(service);
203
- * ```
204
- */
205
- export declare function generateServiceActionsAndEvents<TService>(service: TService, config?: AutoInferredActionConfig<TService>): {
206
- actions: Record<string, {
207
- params?: Record<string, unknown>;
208
- handler: (ctx: unknown) => unknown;
209
- [key: string]: unknown;
210
- }>;
211
- events: Record<string, {
212
- handler: (ctx: unknown) => Promise<void>;
213
- group?: string;
214
- }>;
215
- };
216
- export interface AutoActionConfig {
217
- /**
218
- * Custom parameter validation schema for specific actions
219
- * Key is the action/method name, value is Moleculer params schema
220
- */
221
- params?: Record<string, Record<string, unknown>>;
222
- /**
223
- * Actions to exclude from auto-generation (use manual handlers instead)
224
- */
225
- exclude?: string[];
226
- /**
227
- * Action name mappings (if action name differs from method name)
228
- * Key is the action name, value is the method name
229
- */
230
- actionToMethodMap?: Record<string, string>;
231
- }
232
- /**
233
- * Type-safe configuration that REQUIRES params for ALL service methods
234
- * TypeScript will show compile error if any method is missing from params
235
- */
236
- export type TypeSafeActionConfig<TService> = {
237
- /**
238
- * REQUIRED: Parameter validation schema for ALL service methods
239
- * TypeScript will error if any method is missing
240
- */
241
- params: {
242
- [K in ServiceMethods<TService>]: Record<string, unknown>;
243
- };
244
- /**
245
- * Optional: Actions to exclude from auto-generation
246
- */
247
- exclude?: string[];
248
- /**
249
- * Optional: Action name mappings
250
- */
251
- actionToMethodMap?: Record<string, string>;
252
- };
253
- /**
254
- * Automatically generate Moleculer actions from a service instance.
255
- *
256
- * This eliminates the need to write repetitive action handlers - just pass your service
257
- * and it will create handlers that forward all calls automatically.
258
- *
259
- * @param service - The service instance to wrap
260
- * @param config - Optional configuration for customizing actions
261
- * @returns Actions object with handlers for all service methods
262
- *
263
- * @example
264
- * ```typescript
265
- * const actions = generateServiceActions(accountService, {
266
- * params: {
267
- * findAccountById: { id: 'string' },
268
- * createAccount: { account: 'object' }
269
- * },
270
- * exclude: ['get', 'getAll'] // Handle these manually
271
- * });
272
- * ```
273
- */
274
- export declare function generateServiceActions<TService extends Record<string, unknown>>(service: TService, config?: AutoActionConfig): Record<string, {
275
- params?: Record<string, unknown>;
276
- handler: (ctx: unknown) => unknown;
277
- }>;
278
- /**
279
- * TYPE-SAFE version: Generate Moleculer actions with COMPILE-TIME verification.
280
- * TypeScript will error if any service method is missing from params.
281
- *
282
- * @param service - The service instance to wrap
283
- * @param config - Type-safe configuration requiring ALL methods to have params
284
- * @returns Actions object with handlers for all service methods
285
- *
286
- * @example
287
- * ```typescript
288
- * const actions = generateTypeSafeServiceActions<IAccountService>(accountService, {
289
- * params: {
290
- * // TypeScript enforces ALL IAccountService methods are here!
291
- * findAccountById: { id: 'string' },
292
- * createAccount: { account: 'object' },
293
- * // ... if you forget any method, TypeScript will error
294
- * }
295
- * });
296
- * ```
297
- */
298
- export declare function generateTypeSafeServiceActions<TService>(service: TService, config: TypeSafeActionConfig<TService>): Record<string, {
299
- params?: Record<string, unknown>;
300
- handler: (ctx: unknown) => unknown;
301
- }>;
302
- /**
303
- * Verify that all service methods have param validation defined.
304
- * Throws an error if any methods are missing params.
305
- *
306
- * Use this in development to ensure you haven't forgotten any param schemas.
307
- *
308
- * @param service - The service instance
309
- * @param config - The config used for generateServiceActions
310
- * @throws Error if any methods are missing param validation
311
- *
312
- * @example
313
- * ```typescript
314
- * const config = { params: { ... }, exclude: [...] };
315
- * verifyAllParamsDefined(accountService, config); // Throws if params missing
316
- * const actions = generateServiceActions(accountService, config);
317
- * ```
318
- */
319
- export declare function verifyAllParamsDefined<TService extends Record<string, unknown>>(service: TService, config?: AutoActionConfig): void;
320
- /**
321
- * Type-safe Moleculer Service base class with ENFORCED action verification.
322
- *
323
- * @deprecated Use generateServiceActionsAndEvents() or generateAutoInferredServiceActions() instead
324
- * This class requires importing Moleculer Service which causes build issues.
325
- *
326
- * Usage with auto-generated actions:
327
- * ```typescript
328
- * export class AccountMoleculerService extends Service {
329
- * constructor(broker: ServiceBroker, { container }: { container: Container }) {
330
- * super(broker);
331
- * const accountService = container.get<IAccountService>(SERVER_TYPES.IAccountService);
332
- *
333
- * // Automatically generate ALL actions from the service!
334
- * const autoActions = generateAutoInferredServiceActions(accountService);
335
- *
336
- * this.parseServiceSchema({
337
- * name: MoleculerServiceName.AccountUser,
338
- * actions: autoActions,
339
- * });
340
- * }
341
- * }
342
- * ```
343
- */
344
- /**
345
- * Placeholder for TypedMoleculerService for backward compatibility
346
- * @deprecated Use generateServiceActionsAndEvents() instead
347
- */
348
- export type TypedMoleculerService<TService> = unknown;
349
- /**
350
- * Helper type for explicit verification - use in const to get better error messages
351
- */
352
- export type VerifyAllActionsImplemented<TService> = {
353
- [K in ServiceMethods<TService>]: true;
354
- };
355
- /**
356
- * Typed action handler with parameter and return type safety
357
- */
358
- export interface TypedActionHandler<TParams = unknown, TReturn = unknown> {
359
- params?: Record<string, unknown>;
360
- handler: (ctx: {
361
- params: TParams;
362
- }) => TReturn | Promise<TReturn>;
363
- }
364
- /**
365
- * Helper to create a typed action handler
366
- */
367
- export declare function createTypedAction<TParams, TReturn>(action: TypedActionHandler<TParams, TReturn>): TypedActionHandler<TParams, TReturn>;
368
- /**
369
- * Service schema type with better action type hints
370
- */
371
- export interface TypedServiceSchema extends ServiceSchema {
372
- actions?: Record<string, TypedActionHandler>;
373
- }
374
- /**
375
- * Extend Moleculer namespace with action generation utilities
376
- */
377
- declare module './moleculerEventHandler' {
378
- namespace Moleculer {
379
- /**
380
- * ADVANCED AUTO-GENERATED configuration with full control
381
- */
382
- type AutoInferredActionConfig<TService> = {
383
- paramOverrides?: Partial<{
384
- [K in ServiceMethods<TService>]: Record<string, unknown>;
385
- }>;
386
- include?: Array<ServiceMethods<TService>>;
387
- exclude?: Array<ServiceMethods<TService>>;
388
- actionToMethodMap?: Record<string, string>;
389
- actionConfig?: Partial<{
390
- [K in ServiceMethods<TService>]: {
391
- cache?: boolean | object;
392
- visibility?: 'public' | 'protected' | 'private';
393
- [key: string]: unknown;
394
- };
395
- }>;
396
- };
397
- /**
398
- * Generate actions with full control over inclusion, exclusion, and overrides.
399
- * Params are inferred from TypeScript function signatures.
400
- */
401
- function generateAutoInferredActions<TService>(service: TService, config?: AutoInferredActionConfig<TService>): Record<string, {
402
- params?: Record<string, unknown>;
403
- handler: (ctx: unknown) => unknown;
404
- }>;
405
- /**
406
- * Generate both actions AND events from a service instance
407
- */
408
- function generateActionsAndEvents<TService>(service: TService, config?: AutoInferredActionConfig<TService>): {
409
- actions: Record<string, {
410
- params?: Record<string, unknown>;
411
- handler: (ctx: unknown) => unknown;
412
- [key: string]: unknown;
413
- }>;
414
- events: Record<string, {
415
- handler: (ctx: unknown) => unknown;
416
- group?: string;
417
- }>;
418
- };
419
- /**
420
- * DEBUG UTILITY: Extract parameter information for all service methods
421
- * Returns detailed information about parameters, schemas, and configurations
422
- */
423
- function debugServiceParams<TService>(service: TService, config?: AutoInferredActionConfig<TService>): Record<string, {
424
- methodName: string;
425
- paramNames: string[];
426
- functionSignature: string;
427
- inferredSchema: Record<string, unknown> | undefined;
428
- overrideSchema: Record<string, unknown> | undefined;
429
- isExcluded: boolean;
430
- isEventHandler: boolean;
431
- }>;
432
- /**
433
- * DEBUG UTILITY: Pretty print service parameter information to console
434
- * Useful for understanding auto-generation and identifying methods needing overrides
435
- */
436
- function printServiceParams<TService>(service: TService, config?: AutoInferredActionConfig<TService>, options?: {
437
- onlyMissingOverrides?: boolean;
438
- onlyIncluded?: boolean;
439
- showExcluded?: boolean;
440
- }): void;
441
- }
442
- }
443
- /**
444
- * DEBUG UTILITY: Dumps parameter information for all service methods
445
- *
446
- * This function extracts and logs parameter names, types, and inferred schemas
447
- * for debugging auto-generation issues. Use during development to understand
448
- * what the auto-generation sees and optimize paramOverrides.
449
- *
450
- * @param service - The service instance to analyze
451
- * @param config - Optional configuration to see what would be generated
452
- * @returns Object with detailed parameter information for each method
453
- *
454
- * @example
455
- * ```typescript
456
- * // In development/debug mode
457
- * const paramInfo = Moleculer.debugServiceParams(accountService);
458
- * console.log(JSON.stringify(paramInfo, null, 2));
459
- *
460
- * // With config to see filtered results
461
- * const paramInfo = Moleculer.debugServiceParams(accountService, {
462
- * exclude: ['dispose', 'createUserToken']
463
- * });
464
- * ```
465
- */
466
- export declare function debugServiceParams<TService>(service: TService, config?: AutoInferredActionConfig<TService>): Record<string, {
467
- methodName: string;
468
- paramNames: string[];
469
- functionSignature: string;
470
- inferredSchema: Record<string, unknown> | undefined;
471
- overrideSchema: Record<string, unknown> | undefined;
472
- isExcluded: boolean;
473
- isEventHandler: boolean;
474
- }>;
475
- /**
476
- * DEBUG UTILITY: Pretty prints service parameter information to console
477
- *
478
- * Formats and logs the output of debugServiceParams() in a readable way.
479
- * Shows which methods need paramOverrides and what types are inferred.
480
- *
481
- * @param service - The service instance to analyze
482
- * @param config - Optional configuration
483
- * @param options - Display options
484
- *
485
- * @example
486
- * ```typescript
487
- * // Print all methods
488
- * Moleculer.printServiceParams(accountService);
489
- *
490
- * // Print only methods without overrides
491
- * Moleculer.printServiceParams(accountService, config, { onlyMissingOverrides: true });
492
- *
493
- * // Print only included methods
494
- * Moleculer.printServiceParams(accountService, config, { onlyIncluded: true });
495
- * ```
496
- */
497
- export declare function printServiceParams<TService>(service: TService, config?: AutoInferredActionConfig<TService>, options?: {
498
- onlyMissingOverrides?: boolean;
499
- onlyIncluded?: boolean;
500
- showExcluded?: boolean;
501
- }): void;
502
- export {};
@@ -1,119 +0,0 @@
1
- /**
2
- * @file typed-proxy-service.ts
3
- * @description Provides utilities for auto-generating proxy service methods
4
- * with type-safe Zod schema validation from service interfaces.
5
- *
6
- * This allows proxy services to be lightweight and automatically stay in sync
7
- * with their corresponding Moleculer services.
8
- */
9
- import type { ServiceBroker } from 'moleculer';
10
- import type { CdmLogger } from '@cdm-logger/core';
11
- import type { z } from 'zod';
12
- import { type ExcludedServiceMethods } from './serviceGenerationUtils';
13
- /**
14
- * Exclude base service CRUD methods and lifecycle methods from auto-generation
15
- * @deprecated Use ExcludedServiceMethods from serviceGenerationUtils instead
16
- */
17
- type ExcludedProxyMethods = ExcludedServiceMethods;
18
- /**
19
- * Extract all method names from a service interface (excluding base methods)
20
- */
21
- export type ProxyServiceMethods<T> = {
22
- [K in keyof T]: T[K] extends Function ? (K extends ExcludedProxyMethods ? never : K) : never;
23
- }[keyof T];
24
- /**
25
- * Configuration for auto-generating proxy service methods
26
- */
27
- export type AutoProxyServiceConfig<TService> = {
28
- /**
29
- * Zod schemas for method parameters
30
- * Maps method names to their Zod schema objects
31
- * May include a 'topic' string property for service name
32
- */
33
- schemas: Partial<{
34
- [K in ProxyServiceMethods<TService>]: z.ZodObject<any>;
35
- }> & {
36
- topic?: string;
37
- };
38
- /**
39
- * Optional: Override the action name for specific methods
40
- * By default, action name is the method name
41
- */
42
- actionNameOverrides?: Partial<{
43
- [K in ProxyServiceMethods<TService>]: string;
44
- }>;
45
- /**
46
- * Optional: Include only specific methods
47
- * If not specified, all non-excluded methods are included
48
- */
49
- include?: Array<ProxyServiceMethods<TService>>;
50
- /**
51
- * Optional: Exclude specific methods
52
- * Takes precedence over include
53
- */
54
- exclude?: Array<ProxyServiceMethods<TService>>;
55
- };
56
- /**
57
- * Auto-generate proxy service methods from service interface and Zod schemas
58
- * Returns the proxy instance cast to the service type for type safety
59
- *
60
- * Automatically extracts the 'topic' property from schemas for service identification.
61
- *
62
- * @example
63
- * ```typescript
64
- * export class TagProxyService {
65
- * protected logger: CdmLogger.ILogger;
66
- * // No need to define topic manually - extracted from schemas automatically
67
- *
68
- * constructor(
69
- * @inject(CommonType.MOLECULER_BROKER) broker: ServiceBroker,
70
- * @inject('Logger') logger: CdmLogger.ILogger,
71
- * ) {
72
- * this.logger = logger.child({ className: 'TagProxyService' });
73
- *
74
- * // 🎉 Auto-generate all proxy methods - topic extracted automatically!
75
- * generateProxyMethods<ITagService>(this, TagServiceSchemas, broker, this.logger);
76
- * }
77
- * }
78
- * ```
79
- */
80
- export declare function generateProxyMethods<TService>(proxyInstance: any, schemasOrConfig: Partial<{
81
- [K in ProxyServiceMethods<TService>]: z.ZodObject<any>;
82
- }> | AutoProxyServiceConfig<TService>, broker: ServiceBroker, logger: CdmLogger.ILogger): asserts proxyInstance is TService;
83
- /**
84
- * Namespace for proxy service utilities
85
- */
86
- export declare namespace ProxyService {
87
- /**
88
- * Generate proxy methods from service interface and Zod schemas
89
- */
90
- const generate: typeof generateProxyMethods;
91
- /**
92
- * Debug utility: List all methods that would be generated
93
- */
94
- function debugProxyMethods<TService>(servicePrototype: any, config: AutoProxyServiceConfig<TService>): {
95
- methodName: string;
96
- hasSchema: boolean;
97
- paramNames: string[];
98
- isIncluded: boolean;
99
- isExcluded: boolean;
100
- }[];
101
- /**
102
- * Print debug information about proxy methods
103
- */
104
- function printProxyMethods<TService>(servicePrototype: any, config: AutoProxyServiceConfig<TService>, options?: {
105
- onlyMissingSchemas?: boolean;
106
- onlyIncluded?: boolean;
107
- }): void;
108
- }
109
- /**
110
- * Helper type to create a fully typed proxy service class
111
- * This ensures the proxy implements all methods from the service interface
112
- */
113
- export type TypedProxyService<TService> = TService & {
114
- broker: ServiceBroker;
115
- logger: CdmLogger.ILogger;
116
- topic: string;
117
- callAction<T, P = unknown>(command: string, params?: P): Promise<T>;
118
- };
119
- export {};
@@ -1,45 +0,0 @@
1
- /**
2
- * Converts Zod schemas to Moleculer parameter validation schemas
3
- *
4
- * This utility bridges the gap between Zod's rich type system and Moleculer's
5
- * validator format, allowing us to use TypeScript-derived Zod schemas for
6
- * runtime parameter validation in Moleculer services.
7
- */
8
- import { z } from 'zod';
9
- /**
10
- * Converts a Zod schema object to Moleculer parameter schema format
11
- *
12
- * @param zodSchema - Zod object schema with parameter definitions
13
- * @returns Moleculer-compatible parameter schema
14
- *
15
- * @example
16
- * ```typescript
17
- * const zodSchema = z.object({
18
- * email: z.string(),
19
- * age: z.number().optional(),
20
- * });
21
- *
22
- * const moleculerParams = zodToMoleculerParams(zodSchema);
23
- * // Returns: { email: 'string', age: { type: 'number', optional: true } }
24
- * ```
25
- */
26
- export declare function zodToMoleculerParams(zodSchema: z.ZodObject<any>): Record<string, any>;
27
- /**
28
- * Batch converts multiple Zod schemas to Moleculer parameter schemas
29
- *
30
- * @param schemas - Object mapping method names to Zod schemas (may include a 'topic' string property)
31
- * @returns Object mapping method names to Moleculer parameter schemas
32
- *
33
- * @example
34
- * ```typescript
35
- * const schemas = {
36
- * topic: 'MyService' as const, // Auto-generated, will be skipped
37
- * findById: z.object({ id: z.string() }),
38
- * update: z.object({ id: z.string(), data: z.object({}) }),
39
- * };
40
- *
41
- * const moleculerSchemas = zodSchemasToMoleculer(schemas);
42
- * // Returns only the Zod schemas, 'topic' property is filtered out
43
- * ```
44
- */
45
- export declare function zodSchemasToMoleculer(schemas: Record<string, z.ZodObject<any> | string>): Record<string, Record<string, any>>;