@pikku/cli 0.10.0 → 0.10.2

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.
Files changed (152) hide show
  1. package/.pikku/channel/pikku-channel-types.gen.ts +4 -3
  2. package/.pikku/channel/pikku-channels-map.gen.d.ts +2 -2
  3. package/.pikku/channel/pikku-channels-meta.gen.ts +1 -1
  4. package/.pikku/channel/pikku-channels.gen.ts +1 -1
  5. package/.pikku/cli/pikku-cli-types.gen.ts +23 -1
  6. package/.pikku/cli/pikku-cli-wirings-meta.gen.ts +4 -115
  7. package/.pikku/cli/pikku-cli-wirings.gen.ts +2 -3
  8. package/.pikku/function/pikku-function-types.gen.ts +1 -1
  9. package/.pikku/function/pikku-functions-meta.gen.ts +156 -138
  10. package/.pikku/function/pikku-functions-meta.min.gen.ts +37 -32
  11. package/.pikku/function/pikku-functions.gen.ts +1 -1
  12. package/.pikku/http/pikku-http-types.gen.ts +1 -1
  13. package/.pikku/http/pikku-http-wirings-map.gen.d.ts +2 -2
  14. package/.pikku/http/pikku-http-wirings-meta.gen.ts +1 -1
  15. package/.pikku/http/pikku-http-wirings.gen.ts +1 -1
  16. package/.pikku/mcp/pikku-mcp-types.gen.ts +1 -1
  17. package/.pikku/mcp/pikku-mcp-wirings-meta.gen.ts +1 -1
  18. package/.pikku/mcp/pikku-mcp-wirings.gen.ts +1 -1
  19. package/.pikku/pikku-bootstrap.gen.ts +1 -1
  20. package/.pikku/pikku-services.gen.ts +16 -12
  21. package/.pikku/pikku-types.gen.ts +1 -1
  22. package/.pikku/pikku-websocket.gen.ts +15 -1
  23. package/.pikku/queue/pikku-queue-types.gen.ts +1 -1
  24. package/.pikku/queue/pikku-queue-workers-wirings-map.gen.d.ts +2 -2
  25. package/.pikku/queue/pikku-queue-workers-wirings-meta.gen.ts +1 -1
  26. package/.pikku/queue/pikku-queue-workers-wirings.gen.ts +1 -1
  27. package/.pikku/rpc/pikku-rpc-wirings-map.gen.d.ts +2 -2
  28. package/.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts +10 -9
  29. package/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.ts +9 -8
  30. package/.pikku/scheduler/pikku-scheduler-types.gen.ts +1 -1
  31. package/.pikku/scheduler/pikku-schedulers-wirings-meta.gen.ts +1 -1
  32. package/.pikku/scheduler/pikku-schedulers-wirings.gen.ts +1 -1
  33. package/.pikku/schemas/register.gen.ts +5 -5
  34. package/.pikku/schemas/schemas/PikkuCLIConfig.schema.json +1 -1
  35. package/.pikku/schemas/schemas/PikkuChannelsOutput.schema.json +1 -1
  36. package/.pikku/schemas/schemas/PikkuSchemasOutput.schema.json +1 -1
  37. package/CHANGELOG.md +58 -0
  38. package/bin/pikku.ts +30 -21
  39. package/cli.schema.json +1 -1
  40. package/dist/.pikku/channel/pikku-channel-types.gen.d.ts +4 -3
  41. package/dist/.pikku/channel/pikku-channel-types.gen.js +1 -1
  42. package/dist/.pikku/channel/pikku-channels-meta.gen.js +1 -1
  43. package/dist/.pikku/channel/pikku-channels.gen.d.ts +1 -1
  44. package/dist/.pikku/channel/pikku-channels.gen.js +1 -1
  45. package/dist/.pikku/cli/pikku-cli-types.gen.d.ts +18 -1
  46. package/dist/.pikku/cli/pikku-cli-types.gen.js +20 -1
  47. package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.js +4 -115
  48. package/dist/.pikku/cli/pikku-cli-wirings.gen.d.ts +1 -2
  49. package/dist/.pikku/cli/pikku-cli-wirings.gen.js +1 -2
  50. package/dist/.pikku/function/pikku-function-types.gen.d.ts +1 -1
  51. package/dist/.pikku/function/pikku-function-types.gen.js +1 -1
  52. package/dist/.pikku/function/pikku-functions-meta.gen.js +156 -138
  53. package/dist/.pikku/function/pikku-functions-meta.min.gen.js +37 -32
  54. package/dist/.pikku/function/pikku-functions.gen.js +1 -1
  55. package/dist/.pikku/http/pikku-http-types.gen.d.ts +1 -1
  56. package/dist/.pikku/http/pikku-http-types.gen.js +1 -1
  57. package/dist/.pikku/http/pikku-http-wirings-meta.gen.js +1 -1
  58. package/dist/.pikku/http/pikku-http-wirings.gen.d.ts +1 -1
  59. package/dist/.pikku/http/pikku-http-wirings.gen.js +1 -1
  60. package/dist/.pikku/mcp/pikku-mcp-types.gen.d.ts +1 -1
  61. package/dist/.pikku/mcp/pikku-mcp-types.gen.js +1 -1
  62. package/dist/.pikku/mcp/pikku-mcp-wirings-meta.gen.js +1 -1
  63. package/dist/.pikku/mcp/pikku-mcp-wirings.gen.d.ts +1 -1
  64. package/dist/.pikku/mcp/pikku-mcp-wirings.gen.js +1 -1
  65. package/dist/.pikku/pikku-bootstrap.gen.d.ts +1 -1
  66. package/dist/.pikku/pikku-bootstrap.gen.js +1 -1
  67. package/dist/.pikku/pikku-services.gen.d.ts +9 -6
  68. package/dist/.pikku/pikku-services.gen.js +8 -2
  69. package/dist/.pikku/pikku-types.gen.d.ts +1 -1
  70. package/dist/.pikku/pikku-types.gen.js +1 -1
  71. package/dist/.pikku/pikku-websocket.gen.d.ts +15 -1
  72. package/dist/.pikku/pikku-websocket.gen.js +15 -1
  73. package/dist/.pikku/queue/pikku-queue-types.gen.d.ts +1 -1
  74. package/dist/.pikku/queue/pikku-queue-types.gen.js +1 -1
  75. package/dist/.pikku/queue/pikku-queue-workers-wirings-meta.gen.js +1 -1
  76. package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.d.ts +1 -1
  77. package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.js +1 -1
  78. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js +9 -8
  79. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.d.ts +1 -1
  80. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js +1 -1
  81. package/dist/.pikku/scheduler/pikku-schedulers-wirings-meta.gen.js +1 -1
  82. package/dist/.pikku/scheduler/pikku-schedulers-wirings.gen.d.ts +1 -1
  83. package/dist/.pikku/scheduler/pikku-schedulers-wirings.gen.js +1 -1
  84. package/dist/.pikku/schemas/register.gen.js +3 -3
  85. package/dist/.pikku/schemas/schemas/PikkuCLIConfig.schema.json +1 -1
  86. package/dist/.pikku/schemas/schemas/PikkuChannelsOutput.schema.json +1 -1
  87. package/dist/.pikku/schemas/schemas/PikkuSchemasOutput.schema.json +1 -1
  88. package/dist/bin/pikku.js +24 -19
  89. package/dist/src/cli.wiring.js +107 -99
  90. package/dist/src/functions/commands/all.js +31 -2
  91. package/dist/src/functions/commands/bootstrap.d.ts +1 -0
  92. package/dist/src/functions/commands/bootstrap.js +23 -0
  93. package/dist/src/functions/runtimes/nextjs/serialize-nextjs-backend-wrapper.js +46 -2
  94. package/dist/src/functions/wirings/channels/serialize-channel-types.js +3 -2
  95. package/dist/src/functions/wirings/channels/serialize-websocket-wrapper.js +14 -0
  96. package/dist/src/functions/wirings/cli/pikku-command-cli-entry.js +4 -4
  97. package/dist/src/functions/wirings/cli/serialize-channel-cli-client.js +24 -4
  98. package/dist/src/functions/wirings/cli/serialize-channel-cli.js +32 -7
  99. package/dist/src/functions/wirings/cli/serialize-cli-types.js +22 -0
  100. package/dist/src/functions/wirings/functions/pikku-command-services.d.ts +1 -1
  101. package/dist/src/functions/wirings/functions/pikku-command-services.js +54 -26
  102. package/dist/src/functions/wirings/functions/schemas.js +2 -2
  103. package/dist/src/functions/wirings/http/pikku-command-openapi.js +1 -1
  104. package/dist/src/functions/wirings/middleware/pikku-command-middleware.js +3 -10
  105. package/dist/src/middleware/log-command-info-and-time.d.ts +1 -1
  106. package/dist/src/middleware/log-command-info-and-time.js +8 -5
  107. package/dist/src/services/cli-logger.service.d.ts +7 -2
  108. package/dist/src/services/cli-logger.service.js +16 -4
  109. package/dist/src/services.js +77 -12
  110. package/dist/src/utils/check-required-types.js +11 -1
  111. package/dist/src/utils/command-summary.d.ts +43 -0
  112. package/dist/src/utils/command-summary.js +73 -0
  113. package/dist/src/utils/file-writer.js +2 -2
  114. package/dist/src/utils/pikku-cli-config.js +28 -0
  115. package/dist/src/utils/schema-generator.d.ts +2 -2
  116. package/dist/src/utils/schema-generator.js +3 -3
  117. package/dist/tsconfig.tsbuildinfo +1 -1
  118. package/package.json +3 -4
  119. package/pikku.config.json +5 -2
  120. package/src/cli.wiring.ts +106 -101
  121. package/src/functions/commands/all.ts +38 -2
  122. package/src/functions/commands/bootstrap.ts +27 -0
  123. package/src/functions/runtimes/nextjs/serialize-nextjs-backend-wrapper.ts +46 -2
  124. package/src/functions/wirings/channels/serialize-channel-types.ts +3 -2
  125. package/src/functions/wirings/channels/serialize-websocket-wrapper.ts +14 -0
  126. package/src/functions/wirings/cli/pikku-command-cli-entry.ts +4 -4
  127. package/src/functions/wirings/cli/serialize-channel-cli-client.ts +24 -4
  128. package/src/functions/wirings/cli/serialize-channel-cli.ts +40 -8
  129. package/src/functions/wirings/cli/serialize-cli-types.ts +22 -0
  130. package/src/functions/wirings/functions/pikku-command-services.ts +57 -28
  131. package/src/functions/wirings/functions/schemas.ts +4 -3
  132. package/src/functions/wirings/http/pikku-command-openapi.ts +2 -1
  133. package/src/functions/wirings/middleware/pikku-command-middleware.ts +11 -22
  134. package/src/middleware/log-command-info-and-time.ts +8 -5
  135. package/src/services/cli-logger.service.ts +20 -5
  136. package/src/services.ts +86 -11
  137. package/src/utils/check-required-types.ts +16 -1
  138. package/src/utils/command-summary.ts +101 -0
  139. package/src/utils/file-writer.ts +2 -2
  140. package/src/utils/pikku-cli-config.ts +28 -0
  141. package/src/utils/schema-generator.ts +5 -4
  142. package/types/application-types.d.ts +5 -1
  143. package/types/config.d.ts +16 -6
  144. package/.pikku/cli/pikku-cli-channel.gen.ts +0 -34
  145. package/.pikku/cli/pikku-cli-client.gen.ts +0 -43
  146. package/.pikku/cli/pikku-cli.gen.ts +0 -41
  147. package/dist/.pikku/cli/pikku-cli-channel.gen.d.ts +0 -1
  148. package/dist/.pikku/cli/pikku-cli-channel.gen.js +0 -33
  149. package/dist/.pikku/cli/pikku-cli-client.gen.d.ts +0 -10
  150. package/dist/.pikku/cli/pikku-cli-client.gen.js +0 -34
  151. package/dist/.pikku/cli/pikku-cli.gen.d.ts +0 -10
  152. package/dist/.pikku/cli/pikku-cli.gen.js +0 -38
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.10.0
2
+ * This file was generated by @pikku/cli@0.10.2
3
3
  */
4
4
  import './cli/pikku-cli-wirings-meta.gen.js';
5
5
  import './mcp/pikku-mcp-wirings-meta.gen.js';
@@ -1,13 +1,16 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.10.0
2
+ * This file was generated by @pikku/cli@0.10.2
3
3
  */
4
4
  import type { SingletonServices } from '../types/application-types.d.js';
5
5
  import type { Services } from '../types/application-types.d.js';
6
- import type { PikkuInteraction } from '@pikku/core';
7
- export declare const singletonServices: {
6
+ export declare const requiredSingletonServices: {
8
7
  readonly config: true;
9
- readonly getInspectorState: true;
8
+ readonly getInspectorState: false;
9
+ readonly jwt: false;
10
10
  readonly logger: true;
11
+ readonly schema: true;
12
+ readonly variables: true;
11
13
  };
12
- export type RequiredSingletonServices = Pick<SingletonServices, Extract<keyof SingletonServices, 'config' | 'getInspectorState' | 'logger' | 'schema' | 'variables'>> & Partial<Omit<SingletonServices, 'config' | 'getInspectorState' | 'logger' | 'schema' | 'variables'>>;
13
- export type RequiredSessionServices = Omit<Services, keyof SingletonServices | keyof PikkuInteraction>;
14
+ export declare const requiredSessionServices: {};
15
+ export type RequiredSingletonServices = Pick<SingletonServices, 'config' | 'logger' | 'schema' | 'variables'> & Partial<Omit<SingletonServices, 'config' | 'logger' | 'schema' | 'variables'>>;
16
+ export type RequiredSessionServices = Partial<Services>;
@@ -1,5 +1,11 @@
1
- export const singletonServices = {
1
+ // Singleton services map: true if required, false if available but unused
2
+ export const requiredSingletonServices = {
2
3
  'config': true,
3
- 'getInspectorState': true,
4
+ 'getInspectorState': false,
5
+ 'jwt': false,
4
6
  'logger': true,
7
+ 'schema': true,
8
+ 'variables': true,
5
9
  };
10
+ // Session services map: true if required, false if available but unused
11
+ export const requiredSessionServices = {};
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.10.0
2
+ * This file was generated by @pikku/cli@0.10.2
3
3
  */
4
4
  /**
5
5
  * Main type export hub - re-exports all wiring-specific types
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.10.0
2
+ * This file was generated by @pikku/cli@0.10.2
3
3
  */
4
4
  /**
5
5
  * Main type export hub - re-exports all wiring-specific types
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.10.0
2
+ * This file was generated by @pikku/cli@0.10.2
3
3
  */
4
4
  import { CorePikkuWebsocket, CorePikkuRouteHandler } from '@pikku/websocket';
5
5
  import { ChannelDefaultHandlerOf, ChannelWiringHandlerOf, ChannelsMap } from './channel/pikku-channels-map.gen.d.js';
@@ -8,6 +8,20 @@ declare class PikkuWebSocketRoute<Channel extends keyof ChannelsMap, Route exten
8
8
  unsubscribe<Method extends keyof ChannelsMap[Channel]['routes'][Route], Data extends ChannelWiringHandlerOf<Channel, Route, Method>['output']>(method: Method, callback?: (data: Data) => void): void;
9
9
  send<Method extends keyof ChannelsMap[Channel]['routes'][Route], Data extends ChannelWiringHandlerOf<Channel, Route, Method>['input']>(method: Method, data: Data): void;
10
10
  }
11
+ /**
12
+ * Type-safe WebSocket wrapper for Pikku channels.
13
+ *
14
+ * @example
15
+ * // Browser usage
16
+ * const ws = new WebSocket('ws://localhost:3000')
17
+ * const pikkuWS = new PikkuWebSocket<'events'>(ws)
18
+ *
19
+ * @example
20
+ * // Node.js usage
21
+ * import WebSocket from 'ws'
22
+ * const ws = new WebSocket('ws://localhost:3000')
23
+ * const pikkuWS = new PikkuWebSocket<'events'>(ws)
24
+ */
11
25
  export declare class PikkuWebSocket<Channel extends keyof ChannelsMap, EventHubTopics extends Record<string, any> = {}> extends CorePikkuWebsocket {
12
26
  /**
13
27
  * Send a message to a specific route and method.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.10.0
2
+ * This file was generated by @pikku/cli@0.10.2
3
3
  */
4
4
  import { CorePikkuWebsocket, CorePikkuRouteHandler } from '@pikku/websocket';
5
5
  class PikkuWebSocketRoute extends CorePikkuRouteHandler {
@@ -13,6 +13,20 @@ class PikkuWebSocketRoute extends CorePikkuRouteHandler {
13
13
  super.send(method.toString(), data);
14
14
  }
15
15
  }
16
+ /**
17
+ * Type-safe WebSocket wrapper for Pikku channels.
18
+ *
19
+ * @example
20
+ * // Browser usage
21
+ * const ws = new WebSocket('ws://localhost:3000')
22
+ * const pikkuWS = new PikkuWebSocket<'events'>(ws)
23
+ *
24
+ * @example
25
+ * // Node.js usage
26
+ * import WebSocket from 'ws'
27
+ * const ws = new WebSocket('ws://localhost:3000')
28
+ * const pikkuWS = new PikkuWebSocket<'events'>(ws)
29
+ */
16
30
  export class PikkuWebSocket extends CorePikkuWebsocket {
17
31
  /**
18
32
  * Send a message to a specific route and method.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.10.0
2
+ * This file was generated by @pikku/cli@0.10.2
3
3
  */
4
4
  /**
5
5
  * Queue-specific type definitions for tree-shaking optimization
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.10.0
2
+ * This file was generated by @pikku/cli@0.10.2
3
3
  */
4
4
  /**
5
5
  * Queue-specific type definitions for tree-shaking optimization
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.10.0
2
+ * This file was generated by @pikku/cli@0.10.2
3
3
  */
4
4
  import { pikkuState } from '@pikku/core';
5
5
  pikkuState('queue', 'meta', {});
@@ -1,4 +1,4 @@
1
1
  export {};
2
2
  /**
3
- * This file was generated by @pikku/cli@0.10.0
3
+ * This file was generated by @pikku/cli@0.10.2
4
4
  */
@@ -1,5 +1,5 @@
1
1
  export {};
2
2
  /**
3
- * This file was generated by @pikku/cli@0.10.0
3
+ * This file was generated by @pikku/cli@0.10.2
4
4
  */
5
5
  /* The files with an addQueueWorkers function call */
@@ -1,38 +1,39 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.10.0
2
+ * This file was generated by @pikku/cli@0.10.2
3
3
  */
4
4
  import { pikkuState } from '@pikku/core';
5
5
  pikkuState('rpc', 'meta', {
6
- "pikkuSchemas": "pikkuSchemas",
7
- "pikkuFetch": "pikkuFetch",
8
- "pikkuWebSocketTyped": "pikkuWebSocketTyped",
9
- "pikkuRPCClient": "pikkuRPCClient",
10
- "pikkuQueueService": "pikkuQueueService",
11
- "pikkuOpenAPI": "pikkuOpenAPI",
12
- "pikkuNext": "pikkuNext",
13
6
  "all": "all",
7
+ "bootstrap": "bootstrap",
14
8
  "watch": "watch",
9
+ "pikkuNext": "pikkuNext",
15
10
  "pikkuChannels": "pikkuChannels",
16
11
  "pikkuChannelTypes": "pikkuChannelTypes",
17
12
  "pikkuChannelsMap": "pikkuChannelsMap",
13
+ "pikkuWebSocketTyped": "pikkuWebSocketTyped",
18
14
  "pikkuCLIEntry": "pikkuCLIEntry",
19
15
  "pikkuCLITypes": "pikkuCLITypes",
20
16
  "pikkuCLI": "pikkuCLI",
17
+ "pikkuFetch": "pikkuFetch",
21
18
  "pikkuFunctionTypesSplit": "pikkuFunctionTypesSplit",
22
19
  "pikkuFunctionTypes": "pikkuFunctionTypes",
23
20
  "pikkuFunctions": "pikkuFunctions",
24
21
  "pikkuServices": "pikkuServices",
22
+ "pikkuSchemas": "pikkuSchemas",
25
23
  "pikkuHTTPMap": "pikkuHTTPMap",
26
24
  "pikkuHTTP": "pikkuHTTP",
27
25
  "pikkuHTTPTypes": "pikkuHTTPTypes",
26
+ "pikkuOpenAPI": "pikkuOpenAPI",
28
27
  "pikkuMCPJSON": "pikkuMCPJSON",
29
28
  "pikkuMCPTypes": "pikkuMCPTypes",
30
29
  "pikkuMCP": "pikkuMCP",
31
30
  "pikkuMiddleware": "pikkuMiddleware",
32
31
  "pikkuPermissions": "pikkuPermissions",
33
32
  "pikkuQueueMap": "pikkuQueueMap",
33
+ "pikkuQueueService": "pikkuQueueService",
34
34
  "pikkuQueueTypes": "pikkuQueueTypes",
35
35
  "pikkuQueue": "pikkuQueue",
36
+ "pikkuRPCClient": "pikkuRPCClient",
36
37
  "pikkuRPCInternalMap": "pikkuRPCInternalMap",
37
38
  "pikkuRPCExposedMap": "pikkuRPCExposedMap",
38
39
  "pikkuRPC": "pikkuRPC",
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.10.0
2
+ * This file was generated by @pikku/cli@0.10.2
3
3
  */
4
4
  /**
5
5
  * Scheduler-specific type definitions for tree-shaking optimization
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.10.0
2
+ * This file was generated by @pikku/cli@0.10.2
3
3
  */
4
4
  /**
5
5
  * Scheduler-specific type definitions for tree-shaking optimization
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.10.0
2
+ * This file was generated by @pikku/cli@0.10.2
3
3
  */
4
4
  import { pikkuState } from '@pikku/core';
5
5
  pikkuState('scheduler', 'meta', {});
@@ -1,4 +1,4 @@
1
1
  export {};
2
2
  /**
3
- * This file was generated by @pikku/cli@0.10.0
3
+ * This file was generated by @pikku/cli@0.10.2
4
4
  */
@@ -1,5 +1,5 @@
1
1
  export {};
2
2
  /**
3
- * This file was generated by @pikku/cli@0.10.0
3
+ * This file was generated by @pikku/cli@0.10.2
4
4
  */
5
5
  /* The files with an addScheduledTasks function call */
@@ -1,15 +1,15 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.10.0
2
+ * This file was generated by @pikku/cli@0.10.2
3
3
  */
4
4
  import { addSchema } from '@pikku/core/schema';
5
- import * as PikkuSchemasOutput from './schemas/PikkuSchemasOutput.schema.json' with { type: 'json' };
6
- addSchema('PikkuSchemasOutput', PikkuSchemasOutput);
7
5
  import * as PikkuChannelsOutput from './schemas/PikkuChannelsOutput.schema.json' with { type: 'json' };
8
6
  addSchema('PikkuChannelsOutput', PikkuChannelsOutput);
9
7
  import * as PikkuCLIOutput from './schemas/PikkuCLIOutput.schema.json' with { type: 'json' };
10
8
  addSchema('PikkuCLIOutput', PikkuCLIOutput);
11
9
  import * as PikkuFunctionsOutput from './schemas/PikkuFunctionsOutput.schema.json' with { type: 'json' };
12
10
  addSchema('PikkuFunctionsOutput', PikkuFunctionsOutput);
11
+ import * as PikkuSchemasOutput from './schemas/PikkuSchemasOutput.schema.json' with { type: 'json' };
12
+ addSchema('PikkuSchemasOutput', PikkuSchemasOutput);
13
13
  import * as PikkuHTTPOutput from './schemas/PikkuHTTPOutput.schema.json' with { type: 'json' };
14
14
  addSchema('PikkuHTTPOutput', PikkuHTTPOutput);
15
15
  import * as PikkuMCPOutput from './schemas/PikkuMCPOutput.schema.json' with { type: 'json' };
@@ -1 +1 @@
1
- { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "properties": { "outDir": { "type": "string" }, "schemaDirectory": { "type": "string" }, "typesDeclarationFile": { "type": "string" }, "functionsFile": { "type": "string" }, "functionsMetaFile": { "type": "string" }, "functionsMetaMinFile": { "type": "string" }, "functionTypesFile": { "type": "string" }, "httpWiringsFile": { "type": "string" }, "httpWiringMetaFile": { "type": "string" }, "httpMapDeclarationFile": { "type": "string" }, "httpTypesFile": { "type": "string" }, "channelsWiringFile": { "type": "string" }, "channelsWiringMetaFile": { "type": "string" }, "channelsMapDeclarationFile": { "type": "string" }, "channelsTypesFile": { "type": "string" }, "rpcInternalWiringMetaFile": { "type": "string" }, "rpcInternalMapDeclarationFile": { "type": "string" }, "rpcMapDeclarationFile": { "type": "string" }, "schedulersWiringFile": { "type": "string" }, "schedulersWiringMetaFile": { "type": "string" }, "schedulersTypesFile": { "type": "string" }, "queueWorkersWiringFile": { "type": "string" }, "queueWorkersWiringMetaFile": { "type": "string" }, "queueMapDeclarationFile": { "type": "string" }, "queueTypesFile": { "type": "string" }, "mcpWiringsFile": { "type": "string" }, "mcpWiringsMetaFile": { "type": "string" }, "mcpTypesFile": { "type": "string" }, "cliWiringsFile": { "type": "string" }, "cliWiringMetaFile": { "type": "string" }, "cliBootstrapFile": { "type": "string" }, "cliTypesFile": { "type": "string" }, "servicesFile": { "type": "string" }, "middlewareFile": { "type": "string" }, "middlewareGroupsMetaFile": { "type": "string" }, "permissionsFile": { "type": "string" }, "bootstrapFile": { "type": "string" }, "$schema": { "type": "string" }, "extends": { "type": "string" }, "rootDir": { "type": "string" }, "srcDirectories": { "type": "array", "items": { "type": "string" } }, "packageMappings": { "type": "object", "additionalProperties": { "type": "string" } }, "supportsImportAttributes": { "type": "boolean" }, "configFile": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } }, "types": { "type": "array", "items": { "type": "string" } }, "userSessionType": { "type": "string" }, "singletonServicesFactoryType": { "type": "string" }, "sessionServicesFactoryType": { "type": "string" }, "configDir": { "type": "string" }, "tsconfig": { "type": "string" }, "nextBackendFile": { "type": "string" }, "nextHTTPFile": { "type": "string" }, "fetchFile": { "type": "string" }, "websocketFile": { "type": "string" }, "rpcWiringsFile": { "type": "string" }, "queueWiringsFile": { "type": "string" }, "mcpJsonFile": { "type": "string" }, "openAPI": { "type": "object", "properties": { "outputFile": { "type": "string" }, "additionalInfo": { "$ref": "#/definitions/OpenAPISpecInfo" } }, "required": ["outputFile", "additionalInfo"], "additionalProperties": false }, "cli": { "type": "object", "properties": { "entrypoints": { "type": "object", "additionalProperties": { "anyOf": [{ "type": "string" }, { "type": "object", "properties": { "type": { "type": "string", "const": "cli" }, "path": { "type": "string" } }, "required": ["type", "path"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "channel" }, "name": { "type": "string" }, "route": { "type": "string" }, "wirePath": { "type": "string" }, "path": { "type": "string" } }, "required": ["type", "wirePath"], "additionalProperties": false }, { "type": "array", "items": { "anyOf": [{ "type": "string" }, { "type": "object", "properties": { "type": { "type": "string", "const": "cli" }, "path": { "type": "string" } }, "required": ["type", "path"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "channel" }, "name": { "type": "string" }, "route": { "type": "string" }, "wirePath": { "type": "string" }, "path": { "type": "string" } }, "required": ["type", "wirePath"], "additionalProperties": false }] } }] } } }, "additionalProperties": false }, "forceRequiredServices": { "type": "array", "items": { "type": "string" } }, "schemasFromTypes": { "type": "array", "items": { "type": "string" } }, "stateOutput": { "type": "string" }, "stateInput": { "type": "string" }, "filters": { "$ref": "#/definitions/InspectorFilters" } }, "required": ["bootstrapFile", "channelsMapDeclarationFile", "channelsTypesFile", "channelsWiringFile", "channelsWiringMetaFile", "cliBootstrapFile", "cliTypesFile", "cliWiringMetaFile", "cliWiringsFile", "configDir", "filters", "functionTypesFile", "functionsFile", "functionsMetaFile", "functionsMetaMinFile", "httpMapDeclarationFile", "httpTypesFile", "httpWiringMetaFile", "httpWiringsFile", "mcpTypesFile", "mcpWiringsFile", "mcpWiringsMetaFile", "middlewareFile", "middlewareGroupsMetaFile", "outDir", "packageMappings", "permissionsFile", "queueMapDeclarationFile", "queueTypesFile", "queueWorkersWiringFile", "queueWorkersWiringMetaFile", "rootDir", "rpcInternalMapDeclarationFile", "rpcInternalWiringMetaFile", "rpcMapDeclarationFile", "schedulersTypesFile", "schedulersWiringFile", "schedulersWiringMetaFile", "schemaDirectory", "servicesFile", "srcDirectories", "supportsImportAttributes", "tsconfig", "typesDeclarationFile"], "definitions": { "OpenAPISpecInfo": { "type": "object", "properties": { "info": { "type": "object", "properties": { "title": { "type": "string" }, "version": { "type": "string" }, "description": { "type": "string" }, "termsOfService": { "type": "string" }, "contact": { "type": "object", "properties": { "name": { "type": "string" }, "url": { "type": "string" }, "email": { "type": "string" } }, "additionalProperties": false }, "license": { "type": "object", "properties": { "name": { "type": "string" }, "url": { "type": "string" } }, "required": ["name"], "additionalProperties": false } }, "required": ["title", "version", "description"], "additionalProperties": false }, "servers": { "type": "array", "items": { "type": "object", "properties": { "url": { "type": "string" }, "description": { "type": "string" } }, "required": ["url"], "additionalProperties": false } }, "tags": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "description": { "type": "string" } }, "required": ["name"], "additionalProperties": false } }, "externalDocs": { "type": "object", "properties": { "description": { "type": "string" }, "url": { "type": "string" } }, "required": ["url"], "additionalProperties": false }, "securitySchemes": { "type": "object" }, "security": { "type": "array", "items": { "type": "object", "additionalProperties": { "type": "array", "items": {} } } } }, "required": ["info", "servers"], "additionalProperties": false }, "InspectorFilters": { "type": "object", "properties": { "names": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "type": "string" } }, "types": { "type": "array", "items": { "type": "string" } }, "directories": { "type": "array", "items": { "type": "string" } }, "httpRoutes": { "type": "array", "items": { "type": "string" } }, "httpMethods": { "type": "array", "items": { "type": "string" } } }, "additionalProperties": false } } }
1
+ { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "additionalProperties": false, "properties": { "outDir": { "type": "string" }, "schemaDirectory": { "type": "string" }, "typesDeclarationFile": { "type": "string" }, "functionsFile": { "type": "string" }, "functionsMetaFile": { "type": "string" }, "functionsMetaMinFile": { "type": "string" }, "functionTypesFile": { "type": "string" }, "httpWiringsFile": { "type": "string" }, "httpWiringMetaFile": { "type": "string" }, "httpMapDeclarationFile": { "type": "string" }, "httpTypesFile": { "type": "string" }, "channelsWiringFile": { "type": "string" }, "channelsWiringMetaFile": { "type": "string" }, "channelsMapDeclarationFile": { "type": "string" }, "channelsTypesFile": { "type": "string" }, "rpcInternalWiringMetaFile": { "type": "string" }, "rpcInternalMapDeclarationFile": { "type": "string" }, "rpcMapDeclarationFile": { "type": "string" }, "schedulersWiringFile": { "type": "string" }, "schedulersWiringMetaFile": { "type": "string" }, "schedulersTypesFile": { "type": "string" }, "queueWorkersWiringFile": { "type": "string" }, "queueWorkersWiringMetaFile": { "type": "string" }, "queueMapDeclarationFile": { "type": "string" }, "queueTypesFile": { "type": "string" }, "mcpWiringsFile": { "type": "string" }, "mcpWiringsMetaFile": { "type": "string" }, "mcpTypesFile": { "type": "string" }, "cliWiringsFile": { "type": "string" }, "cliWiringMetaFile": { "type": "string" }, "cliBootstrapFile": { "type": "string" }, "cliTypesFile": { "type": "string" }, "servicesFile": { "type": "string" }, "middlewareFile": { "type": "string" }, "middlewareGroupsMetaFile": { "type": "string" }, "permissionsFile": { "type": "string" }, "bootstrapFile": { "type": "string" }, "$schema": { "type": "string" }, "extends": { "type": "string" }, "rootDir": { "type": "string" }, "srcDirectories": { "type": "array", "items": { "type": "string" } }, "ignoreFiles": { "type": "array", "items": { "type": "string" } }, "packageMappings": { "type": "object", "additionalProperties": { "type": "string" } }, "configFile": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } }, "types": { "type": "array", "items": { "type": "string" } }, "userSessionType": { "type": "string" }, "singletonServicesFactoryType": { "type": "string" }, "sessionServicesFactoryType": { "type": "string" }, "configDir": { "type": "string" }, "tsconfig": { "type": "string" }, "nextBackendFile": { "type": "string" }, "nextHTTPFile": { "type": "string" }, "fetchFile": { "type": "string" }, "websocketFile": { "type": "string" }, "rpcWiringsFile": { "type": "string" }, "queueWiringsFile": { "type": "string" }, "mcpJsonFile": { "type": "string" }, "openAPI": { "type": "object", "properties": { "outputFile": { "type": "string" }, "additionalInfo": { "$ref": "#/definitions/OpenAPISpecInfo" } }, "required": ["outputFile", "additionalInfo"], "additionalProperties": false }, "schema": { "type": "object", "properties": { "additionalProperties": { "type": "boolean" }, "supportsImportAttributes": { "type": "boolean" } }, "additionalProperties": false }, "cli": { "type": "object", "properties": { "entrypoints": { "type": "object", "additionalProperties": { "anyOf": [{ "type": "string" }, { "type": "object", "properties": { "type": { "type": "string", "const": "local" }, "path": { "type": "string" } }, "required": ["type", "path"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "channel" }, "name": { "type": "string" }, "route": { "type": "string" }, "wirePath": { "type": "string" }, "path": { "type": "string" } }, "required": ["type", "wirePath"], "additionalProperties": false }, { "type": "array", "items": { "anyOf": [{ "type": "string" }, { "type": "object", "properties": { "type": { "type": "string", "const": "local" }, "path": { "type": "string" } }, "required": ["type", "path"], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "channel" }, "name": { "type": "string" }, "route": { "type": "string" }, "wirePath": { "type": "string" }, "path": { "type": "string" } }, "required": ["type", "wirePath"], "additionalProperties": false }] } }] } } }, "additionalProperties": false }, "forceRequiredServices": { "type": "array", "items": { "type": "string" } }, "schemasFromTypes": { "type": "array", "items": { "type": "string" } }, "stateOutput": { "type": "string" }, "stateInput": { "type": "string" }, "filters": { "$ref": "#/definitions/InspectorFilters" } }, "required": ["bootstrapFile", "channelsMapDeclarationFile", "channelsTypesFile", "channelsWiringFile", "channelsWiringMetaFile", "cliBootstrapFile", "cliTypesFile", "cliWiringMetaFile", "cliWiringsFile", "configDir", "filters", "functionTypesFile", "functionsFile", "functionsMetaFile", "functionsMetaMinFile", "httpMapDeclarationFile", "httpTypesFile", "httpWiringMetaFile", "httpWiringsFile", "mcpTypesFile", "mcpWiringsFile", "mcpWiringsMetaFile", "middlewareFile", "middlewareGroupsMetaFile", "outDir", "packageMappings", "permissionsFile", "queueMapDeclarationFile", "queueTypesFile", "queueWorkersWiringFile", "queueWorkersWiringMetaFile", "rootDir", "rpcInternalMapDeclarationFile", "rpcInternalWiringMetaFile", "rpcMapDeclarationFile", "schedulersTypesFile", "schedulersWiringFile", "schedulersWiringMetaFile", "schemaDirectory", "servicesFile", "srcDirectories", "tsconfig", "typesDeclarationFile"], "definitions": { "OpenAPISpecInfo": { "type": "object", "properties": { "info": { "type": "object", "properties": { "title": { "type": "string" }, "version": { "type": "string" }, "description": { "type": "string" }, "termsOfService": { "type": "string" }, "contact": { "type": "object", "properties": { "name": { "type": "string" }, "url": { "type": "string" }, "email": { "type": "string" } }, "additionalProperties": false }, "license": { "type": "object", "properties": { "name": { "type": "string" }, "url": { "type": "string" } }, "required": ["name"], "additionalProperties": false } }, "required": ["title", "version", "description"], "additionalProperties": false }, "servers": { "type": "array", "items": { "type": "object", "properties": { "url": { "type": "string" }, "description": { "type": "string" } }, "required": ["url"], "additionalProperties": false } }, "tags": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "description": { "type": "string" } }, "required": ["name"], "additionalProperties": false } }, "externalDocs": { "type": "object", "properties": { "description": { "type": "string" }, "url": { "type": "string" } }, "required": ["url"], "additionalProperties": false }, "securitySchemes": { "type": "object" }, "security": { "type": "array", "items": { "type": "object", "additionalProperties": { "type": "array", "items": {} } } } }, "required": ["info", "servers"], "additionalProperties": false }, "InspectorFilters": { "type": "object", "properties": { "names": { "type": "array", "items": { "type": "string" } }, "tags": { "type": "array", "items": { "type": "string" } }, "types": { "type": "array", "items": { "type": "string" } }, "directories": { "type": "array", "items": { "type": "string" } }, "httpRoutes": { "type": "array", "items": { "type": "string" } }, "httpMethods": { "type": "array", "items": { "type": "string" } } }, "additionalProperties": false } } }
@@ -1 +1 @@
1
- { "$schema": "http://json-schema.org/draft-07/schema#", "type": "boolean", "enum": [false, true], "definitions": {} }
1
+ { "$schema": "http://json-schema.org/draft-07/schema#", "type": "boolean", "enum": [false, true], "description": "This provides the structure needed for typescript to be aware of RPCs and their return types", "definitions": {} }
@@ -1 +1 @@
1
- { "$schema": "http://json-schema.org/draft-07/schema#", "type": "boolean", "enum": [false, true], "description": "This provides the structure needed for typescript to be aware of RPCs and their return types", "definitions": {} }
1
+ { "$schema": "http://json-schema.org/draft-07/schema#", "type": "boolean", "enum": [false, true], "definitions": {} }
package/dist/bin/pikku.js CHANGED
@@ -3,25 +3,27 @@ import { Command } from 'commander';
3
3
  import { createConfig, createSingletonServices } from '../src/services.js';
4
4
  import { PikkuRPCService } from '@pikku/core/rpc';
5
5
  import { LocalVariablesService } from '@pikku/core/services';
6
- import { existsSync } from 'fs';
7
- import { fileURLToPath } from 'url';
8
- import { dirname, join } from 'path';
9
- const __filename = fileURLToPath(import.meta.url);
10
- const __dirname = dirname(__filename);
6
+ // import { existsSync } from 'fs'
7
+ // import { fileURLToPath } from 'url'
8
+ // import { dirname, join } from 'path'
9
+ // const __filename = fileURLToPath(import.meta.url)
10
+ // const __dirname = dirname(__filename)
11
11
  // Check if Pikku CLI is available
12
- const pikkuCliPath = join(__dirname, '../.pikku/cli/pikku-cli.gen.js');
13
- if (existsSync(pikkuCliPath)) {
14
- try {
15
- // Use the generated Pikku CLI
16
- const { PikkuCLI } = await import('../.pikku/cli/pikku-cli.gen.js');
17
- await PikkuCLI(process.argv.slice(2));
18
- process.exit(0);
19
- }
20
- catch (error) {
21
- // If import fails, fall back to Commander.js
22
- console.warn('Failed to load Pikku CLI, using fallback mode:', error.message);
23
- }
24
- }
12
+ // const pikkuCliPath = join(__dirname, '../.pikku/cli/pikku-cli.gen.js')
13
+ // if (existsSync(pikkuCliPath)) {
14
+ // try {
15
+ // // Use the generated Pikku CLI
16
+ // const { PikkuCLI } = await import('../.pikku/cli/pikku-cli.gen.js')
17
+ // await PikkuCLI(process.argv.slice(2))
18
+ // process.exit(0)
19
+ // } catch (error) {
20
+ // // If import fails, fall back to Commander.js
21
+ // console.warn(
22
+ // 'Failed to load Pikku CLI, using fallback mode:',
23
+ // error.message
24
+ // )
25
+ // }
26
+ // }
25
27
  // Fallback to Commander.js for initial setup
26
28
  // Import bootstrap if it exists
27
29
  try {
@@ -56,7 +58,10 @@ const all = (program, name, description) => {
56
58
  .option('-n, --names <names...>', 'Filter functions by name patterns (supports wildcards)')
57
59
  .option('--httpMethods <methods...>', 'Filter HTTP routes by methods (comma-separated)')
58
60
  .option('--httpRoutes <routes...>', 'Filter HTTP routes by route patterns (comma-separated)')
59
- .option('-s, --silent', 'Silent mode - only show errors')
61
+ .option('-s, --silent', 'Silent mode - only show critical errors')
62
+ .option('--info', 'Show info messages and above (info, warn, error, critical)')
63
+ .option('--verbose', 'Show all debug messages (most detailed)')
64
+ .option('--loglevel <level>', 'Set explicit log level (trace, debug, info, warn, error, critical)')
60
65
  .option('--state-output <path>', 'Save inspector state to JSON file for reuse')
61
66
  .option('--state-input <path>', 'Load inspector state from JSON file (skips inspection)')
62
67
  .action((c) => action(name, c));
@@ -1,99 +1,107 @@
1
- import { pikkuSchemas } from './functions/wirings/functions/schemas.js';
2
- import { pikkuFetch } from './functions/wirings/fetch/index.js';
3
- import { pikkuWebSocketTyped } from './functions/wirings/channels/pikku-command-websocket-typed.js';
4
- import { pikkuRPCClient } from './functions/wirings/rpc/pikku-command-rpc-client.js';
5
- import { pikkuQueueService } from './functions/wirings/queue/pikku-command-queue-service.js';
6
- import { pikkuOpenAPI } from './functions/wirings/http/pikku-command-openapi.js';
7
- import { pikkuNext } from './functions/runtimes/nextjs/pikku-command-nextjs.js';
8
- import { pikkuCLICommand, wireCLI } from '../.pikku/cli/pikku-cli-types.gen.js';
9
- import { all } from './functions/commands/all.js';
10
- import { clientCLIRenderer } from './services.js';
11
- wireCLI({
12
- program: 'pikku',
13
- description: 'Pikku CLI - Code generation tool for type-safe backend development',
14
- render: clientCLIRenderer,
15
- options: {
16
- config: {
17
- description: 'Path to pikku.config.json file',
18
- short: 'c',
19
- },
20
- logLevel: {
21
- description: 'Set log level',
22
- default: 'info',
23
- short: 'l',
24
- },
25
- userSessionType: {
26
- description: 'Specify which UserSession type to use (when multiple exist)',
27
- },
28
- singletonServicesFactoryType: {
29
- description: 'Specify which singleton services factory to use',
30
- },
31
- sessionServicesFactoryType: {
32
- description: 'Specify which session services factory to use',
33
- },
34
- stateOutput: {
35
- description: 'Save inspector state to JSON file for reuse',
36
- },
37
- stateInput: {
38
- description: 'Load inspector state from JSON file (skips inspection)',
39
- },
40
- },
41
- commands: {
42
- all: pikkuCLICommand({
43
- func: all,
44
- description: 'Generate all Pikku files (types, schemas, wirings, etc.)',
45
- isDefault: true,
46
- options: {
47
- tags: {
48
- description: 'Filter functions by tags (comma-separated)',
49
- short: 't',
50
- },
51
- types: {
52
- description: 'Filter functions by types (comma-separated)',
53
- },
54
- directories: {
55
- description: 'Filter functions by directories (comma-separated)',
56
- short: 'd',
57
- },
58
- httpMethods: {
59
- description: 'Filter HTTP routes by methods (comma-separated)',
60
- },
61
- httpRoutes: {
62
- description: 'Filter HTTP routes by route patterns (comma-separated)',
63
- },
64
- names: {
65
- description: 'Filter functions by name patterns (supports wildcards)',
66
- short: 'n',
67
- },
68
- },
69
- }),
70
- schemas: pikkuCLICommand({
71
- func: pikkuSchemas,
72
- description: 'Generate JSON schemas for function input/output types',
73
- }),
74
- fetch: pikkuCLICommand({
75
- func: pikkuFetch,
76
- description: 'Generate type-safe HTTP fetch client',
77
- }),
78
- websocket: pikkuCLICommand({
79
- func: pikkuWebSocketTyped,
80
- description: 'Generate type-safe WebSocket client',
81
- }),
82
- rpc: pikkuCLICommand({
83
- func: pikkuRPCClient,
84
- description: 'Generate RPC client wrappers',
85
- }),
86
- 'queue-service': pikkuCLICommand({
87
- func: pikkuQueueService,
88
- description: 'Generate queue service wrapper',
89
- }),
90
- openapi: pikkuCLICommand({
91
- func: pikkuOpenAPI,
92
- description: 'Generate OpenAPI specification from HTTP routes',
93
- }),
94
- nextjs: pikkuCLICommand({
95
- func: pikkuNext,
96
- description: 'Generate Next.js backend and HTTP wrappers',
97
- }),
98
- },
99
- });
1
+ // import { pikkuSchemas } from './functions/wirings/functions/schemas.js'
2
+ // import { pikkuFetch } from './functions/wirings/fetch/index.js'
3
+ // import { pikkuWebSocketTyped } from './functions/wirings/channels/pikku-command-websocket-typed.js'
4
+ // import { pikkuRPCClient } from './functions/wirings/rpc/pikku-command-rpc-client.js'
5
+ // import { pikkuQueueService } from './functions/wirings/queue/pikku-command-queue-service.js'
6
+ // import { pikkuOpenAPI } from './functions/wirings/http/pikku-command-openapi.js'
7
+ // import { pikkuNext } from './functions/runtimes/nextjs/pikku-command-nextjs.js'
8
+ // import { pikkuCLICommand, wireCLI } from '../.pikku/cli/pikku-cli-types.gen.js'
9
+ // import { all } from './functions/commands/all.js'
10
+ // import { bootstrap } from './functions/commands/bootstrap.js'
11
+ // import { clientCLIRenderer } from './services.js'
12
+ export {};
13
+ // wireCLI({
14
+ // program: 'pikku',
15
+ // description:
16
+ // 'Pikku CLI - Code generation tool for type-safe backend development',
17
+ // render: clientCLIRenderer,
18
+ // options: {
19
+ // config: {
20
+ // description: 'Path to pikku.config.json file',
21
+ // short: 'c',
22
+ // },
23
+ // logLevel: {
24
+ // description: 'Set log level',
25
+ // default: 'info' as const,
26
+ // short: 'l',
27
+ // },
28
+ // userSessionType: {
29
+ // description:
30
+ // 'Specify which UserSession type to use (when multiple exist)',
31
+ // },
32
+ // singletonServicesFactoryType: {
33
+ // description: 'Specify which singleton services factory to use',
34
+ // },
35
+ // sessionServicesFactoryType: {
36
+ // description: 'Specify which session services factory to use',
37
+ // },
38
+ // stateOutput: {
39
+ // description: 'Save inspector state to JSON file for reuse',
40
+ // },
41
+ // stateInput: {
42
+ // description: 'Load inspector state from JSON file (skips inspection)',
43
+ // },
44
+ // },
45
+ // commands: {
46
+ // all: pikkuCLICommand({
47
+ // func: all,
48
+ // description: 'Generate all Pikku files (types, schemas, wirings, etc.)',
49
+ // isDefault: true,
50
+ // options: {
51
+ // tags: {
52
+ // description: 'Filter functions by tags (comma-separated)',
53
+ // short: 't',
54
+ // },
55
+ // types: {
56
+ // description: 'Filter functions by types (comma-separated)',
57
+ // },
58
+ // directories: {
59
+ // description: 'Filter functions by directories (comma-separated)',
60
+ // short: 'd',
61
+ // },
62
+ // httpMethods: {
63
+ // description: 'Filter HTTP routes by methods (comma-separated)',
64
+ // },
65
+ // httpRoutes: {
66
+ // description: 'Filter HTTP routes by route patterns (comma-separated)',
67
+ // },
68
+ // names: {
69
+ // description: 'Filter functions by name patterns (supports wildcards)',
70
+ // short: 'n',
71
+ // },
72
+ // },
73
+ // }),
74
+ // bootstrap: pikkuCLICommand({
75
+ // func: bootstrap,
76
+ // description: 'Generate only type files (setup phase only)',
77
+ // }),
78
+ // schemas: pikkuCLICommand({
79
+ // func: pikkuSchemas,
80
+ // description: 'Generate JSON schemas for function input/output types',
81
+ // }),
82
+ // fetch: pikkuCLICommand({
83
+ // func: pikkuFetch,
84
+ // description: 'Generate type-safe HTTP fetch client',
85
+ // }),
86
+ // websocket: pikkuCLICommand({
87
+ // func: pikkuWebSocketTyped,
88
+ // description: 'Generate type-safe WebSocket client',
89
+ // }),
90
+ // rpc: pikkuCLICommand({
91
+ // func: pikkuRPCClient,
92
+ // description: 'Generate RPC client wrappers',
93
+ // }),
94
+ // 'queue-service': pikkuCLICommand({
95
+ // func: pikkuQueueService,
96
+ // description: 'Generate queue service wrapper',
97
+ // }),
98
+ // openapi: pikkuCLICommand({
99
+ // func: pikkuOpenAPI,
100
+ // description: 'Generate OpenAPI specification from HTTP routes',
101
+ // }),
102
+ // nextjs: pikkuCLICommand({
103
+ // func: pikkuNext,
104
+ // description: 'Generate Next.js backend and HTTP wrappers',
105
+ // }),
106
+ // },
107
+ // })