@pikku/cli 0.10.2 → 0.11.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.
- package/.pikku/channel/pikku-channel-types.gen.ts +1 -1
- package/.pikku/channel/pikku-channels-map.gen.d.ts +5 -2
- package/.pikku/channel/pikku-channels-meta.gen.ts +1 -1
- package/.pikku/channel/pikku-channels.gen.ts +1 -1
- package/.pikku/cli/pikku-cli-channel.ts +92 -0
- package/.pikku/cli/pikku-cli-client.gen.ts +56 -0
- package/.pikku/cli/pikku-cli-types.gen.ts +1 -1
- package/.pikku/cli/pikku-cli-wirings-meta.gen.ts +131 -5
- package/.pikku/cli/pikku-cli-wirings.gen.ts +3 -2
- package/.pikku/cli/pikku-cli.gen.ts +41 -0
- package/.pikku/function/pikku-function-types.gen.ts +1 -1
- package/.pikku/function/pikku-functions-meta.gen.ts +240 -131
- package/.pikku/function/pikku-functions-meta.min.gen.ts +59 -34
- package/.pikku/function/pikku-functions.gen.ts +9 -1
- package/.pikku/http/pikku-http-types.gen.ts +1 -1
- package/.pikku/http/pikku-http-wirings-map.gen.d.ts +5 -2
- package/.pikku/http/pikku-http-wirings-meta.gen.ts +1 -1
- package/.pikku/http/pikku-http-wirings.gen.ts +1 -1
- package/.pikku/mcp/pikku-mcp-types.gen.ts +1 -1
- package/.pikku/mcp/pikku-mcp-wirings-meta.gen.ts +1 -1
- package/.pikku/mcp/pikku-mcp-wirings.gen.ts +1 -1
- package/.pikku/pikku-bootstrap.gen.ts +4 -1
- package/.pikku/pikku-services.gen.ts +8 -3
- package/.pikku/pikku-types.gen.ts +1 -1
- package/.pikku/pikku-websocket.gen.ts +1 -1
- package/.pikku/queue/pikku-queue-types.gen.ts +1 -1
- package/.pikku/queue/pikku-queue-workers-wirings-map.gen.d.ts +5 -2
- package/.pikku/queue/pikku-queue-workers-wirings-meta.gen.ts +7 -2
- package/.pikku/queue/pikku-queue-workers-wirings.gen.ts +1 -1
- package/.pikku/rpc/pikku-remote-rpc-workers.gen.ts +27 -0
- package/.pikku/rpc/pikku-rpc-wirings-map.gen.d.ts +13 -3
- package/.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts +25 -10
- package/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.ts +14 -9
- package/.pikku/scheduler/pikku-scheduler-types.gen.ts +1 -1
- package/.pikku/scheduler/pikku-schedulers-wirings-meta.gen.ts +1 -1
- package/.pikku/scheduler/pikku-schedulers-wirings.gen.ts +1 -1
- package/.pikku/schemas/register.gen.ts +17 -5
- package/.pikku/schemas/schemas/PikkuCLIConfig.schema.json +1 -1
- package/.pikku/schemas/schemas/PikkuChannelsOutput.schema.json +1 -1
- package/.pikku/schemas/schemas/PikkuPublicRPCOutput.schema.json +1 -0
- package/.pikku/schemas/schemas/PikkuRemoteRPCOutput.schema.json +1 -0
- package/.pikku/schemas/schemas/PikkuSchemasOutput.schema.json +1 -1
- package/.pikku/schemas/schemas/PikkuWorkflowOutput.schema.json +1 -0
- package/.pikku/workflow/pikku-workflow-map.gen.d.ts +62 -0
- package/.pikku/workflow/pikku-workflow-types.gen.ts +92 -0
- package/.pikku/workflow/pikku-workflow-wirings-meta.gen.ts +5 -0
- package/.pikku/workflow/pikku-workflow-wirings.gen.ts +4 -0
- package/CHANGELOG.md +13 -0
- package/bin/pikku.ts +20 -20
- package/build.sh +1 -1
- package/cli.schema.json +1 -1
- package/dist/.pikku/channel/pikku-channel-types.gen.d.ts +1 -1
- package/dist/.pikku/channel/pikku-channel-types.gen.js +1 -1
- package/dist/.pikku/channel/pikku-channels-meta.gen.js +1 -1
- package/dist/.pikku/channel/pikku-channels.gen.d.ts +1 -1
- package/dist/.pikku/channel/pikku-channels.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli-channel.d.ts +1 -0
- package/dist/.pikku/cli/pikku-cli-channel.js +91 -0
- package/dist/.pikku/cli/pikku-cli-client.gen.d.ts +10 -0
- package/dist/.pikku/cli/pikku-cli-client.gen.js +46 -0
- package/dist/.pikku/cli/pikku-cli-types.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli-types.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.js +131 -5
- package/dist/.pikku/cli/pikku-cli-wirings.gen.d.ts +2 -1
- package/dist/.pikku/cli/pikku-cli-wirings.gen.js +2 -1
- package/dist/.pikku/cli/pikku-cli.gen.d.ts +10 -0
- package/dist/.pikku/cli/pikku-cli.gen.js +38 -0
- package/dist/.pikku/function/pikku-function-types.gen.d.ts +1 -1
- package/dist/.pikku/function/pikku-function-types.gen.js +1 -1
- package/dist/.pikku/function/pikku-functions-meta.gen.js +240 -131
- package/dist/.pikku/function/pikku-functions-meta.min.gen.js +59 -34
- package/dist/.pikku/function/pikku-functions.gen.js +9 -1
- package/dist/.pikku/http/pikku-http-types.gen.d.ts +1 -1
- package/dist/.pikku/http/pikku-http-types.gen.js +1 -1
- package/dist/.pikku/http/pikku-http-wirings-meta.gen.js +1 -1
- package/dist/.pikku/http/pikku-http-wirings.gen.d.ts +1 -1
- package/dist/.pikku/http/pikku-http-wirings.gen.js +1 -1
- package/dist/.pikku/mcp/pikku-mcp-types.gen.d.ts +1 -1
- package/dist/.pikku/mcp/pikku-mcp-types.gen.js +1 -1
- package/dist/.pikku/mcp/pikku-mcp-wirings-meta.gen.js +1 -1
- package/dist/.pikku/mcp/pikku-mcp-wirings.gen.d.ts +1 -1
- package/dist/.pikku/mcp/pikku-mcp-wirings.gen.js +1 -1
- package/dist/.pikku/pikku-bootstrap.gen.d.ts +4 -1
- package/dist/.pikku/pikku-bootstrap.gen.js +4 -1
- package/dist/.pikku/pikku-services.gen.d.ts +10 -4
- package/dist/.pikku/pikku-services.gen.js +8 -2
- package/dist/.pikku/pikku-types.gen.d.ts +1 -1
- package/dist/.pikku/pikku-types.gen.js +1 -1
- package/dist/.pikku/pikku-websocket.gen.d.ts +1 -1
- package/dist/.pikku/pikku-websocket.gen.js +1 -1
- package/dist/.pikku/queue/pikku-queue-types.gen.d.ts +1 -1
- package/dist/.pikku/queue/pikku-queue-types.gen.js +1 -1
- package/dist/.pikku/queue/pikku-queue-workers-wirings-meta.gen.js +7 -2
- package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.d.ts +1 -1
- package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.js +1 -1
- package/dist/.pikku/rpc/pikku-remote-rpc-workers.gen.d.ts +17 -0
- package/dist/.pikku/rpc/pikku-remote-rpc-workers.gen.js +22 -0
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js +14 -9
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.d.ts +1 -1
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js +1 -1
- package/dist/.pikku/scheduler/pikku-schedulers-wirings-meta.gen.js +1 -1
- package/dist/.pikku/scheduler/pikku-schedulers-wirings.gen.d.ts +1 -1
- package/dist/.pikku/scheduler/pikku-schedulers-wirings.gen.js +1 -1
- package/dist/.pikku/schemas/register.gen.js +9 -3
- package/dist/.pikku/schemas/schemas/PikkuCLIConfig.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/PikkuChannelsOutput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/PikkuPublicRPCOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuRemoteInternalRPCInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuRemoteRPCOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuSchemasOutput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/PikkuWorkflowOutput.schema.json +1 -0
- package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +58 -0
- package/dist/.pikku/workflow/pikku-workflow-types.gen.js +28 -0
- package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.d.ts +1 -0
- package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +5 -0
- package/dist/.pikku/workflow/pikku-workflow-wirings.gen.d.ts +4 -0
- package/dist/.pikku/workflow/pikku-workflow-wirings.gen.js +5 -0
- package/dist/bin/pikku.js +18 -20
- package/dist/src/cli.wiring.js +109 -107
- package/dist/src/functions/commands/all.js +20 -0
- package/dist/src/functions/commands/bootstrap.js +1 -0
- package/dist/src/functions/wirings/cli/serialize-channel-cli-client.js +15 -22
- package/dist/src/functions/wirings/queue/pikku-queue.js +9 -1
- package/dist/src/functions/wirings/queue/serialize-queue-map.d.ts +2 -2
- package/dist/src/functions/wirings/queue/serialize-queue-meta.d.ts +2 -2
- package/dist/src/functions/wirings/rpc/pikku-command-public-rpc.d.ts +1 -0
- package/dist/src/functions/wirings/rpc/pikku-command-public-rpc.js +23 -0
- package/dist/src/functions/wirings/rpc/pikku-command-remote-rpc.d.ts +1 -0
- package/dist/src/functions/wirings/rpc/pikku-command-remote-rpc.js +23 -0
- package/dist/src/functions/wirings/rpc/serialize-public-rpc.d.ts +4 -0
- package/dist/src/functions/wirings/rpc/serialize-public-rpc.js +30 -0
- package/dist/src/functions/wirings/rpc/serialize-remote-rpc.d.ts +4 -0
- package/dist/src/functions/wirings/rpc/serialize-remote-rpc.js +30 -0
- package/dist/src/functions/wirings/rpc/serialize-rpc-wrapper.js +2 -2
- package/dist/src/functions/wirings/rpc/serialize-typed-rpc-map.js +27 -3
- package/dist/src/functions/wirings/workflow/pikku-command-workflow-map.d.ts +1 -0
- package/dist/src/functions/wirings/workflow/pikku-command-workflow-map.js +12 -0
- package/dist/src/functions/wirings/workflow/pikku-command-workflow-types.d.ts +1 -0
- package/dist/src/functions/wirings/workflow/pikku-command-workflow-types.js +11 -0
- package/dist/src/functions/wirings/workflow/pikku-command-workflow.d.ts +1 -0
- package/dist/src/functions/wirings/workflow/pikku-command-workflow.js +55 -0
- package/dist/src/functions/wirings/workflow/serialize-workflow-map.d.ts +4 -0
- package/dist/src/functions/wirings/workflow/serialize-workflow-map.js +79 -0
- package/dist/src/functions/wirings/workflow/serialize-workflow-meta.d.ts +2 -0
- package/dist/src/functions/wirings/workflow/serialize-workflow-meta.js +10 -0
- package/dist/src/functions/wirings/workflow/serialize-workflow-types.d.ts +4 -0
- package/dist/src/functions/wirings/workflow/serialize-workflow-types.js +95 -0
- package/dist/src/functions/wirings/workflow/serialize-workflow-workers.d.ts +4 -0
- package/dist/src/functions/wirings/workflow/serialize-workflow-workers.js +60 -0
- package/dist/src/services/cli-logger-forwarder.service.d.ts +3 -0
- package/dist/src/services/cli-logger-forwarder.service.js +9 -2
- package/dist/src/services/cli-logger.service.js +1 -1
- package/dist/src/utils/command-summary.d.ts +1 -0
- package/dist/src/utils/command-summary.js +9 -8
- package/dist/src/utils/pikku-cli-config.js +24 -4
- package/dist/src/utils/schema-generator.js +28 -7
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/cli.wiring.ts +111 -106
- package/src/functions/commands/all.ts +28 -0
- package/src/functions/commands/bootstrap.ts +1 -0
- package/src/functions/wirings/cli/serialize-channel-cli-client.ts +15 -22
- package/src/functions/wirings/queue/pikku-queue.ts +10 -1
- package/src/functions/wirings/queue/serialize-queue-map.ts +3 -3
- package/src/functions/wirings/queue/serialize-queue-meta.ts +2 -2
- package/src/functions/wirings/rpc/pikku-command-public-rpc.ts +32 -0
- package/src/functions/wirings/rpc/pikku-command-remote-rpc.ts +35 -0
- package/src/functions/wirings/rpc/serialize-public-rpc.ts +30 -0
- package/src/functions/wirings/rpc/serialize-remote-rpc.ts +30 -0
- package/src/functions/wirings/rpc/serialize-rpc-wrapper.ts +2 -2
- package/src/functions/wirings/rpc/serialize-typed-rpc-map.ts +26 -3
- package/src/functions/wirings/workflow/pikku-command-workflow-map.ts +24 -0
- package/src/functions/wirings/workflow/pikku-command-workflow-types.ts +22 -0
- package/src/functions/wirings/workflow/pikku-command-workflow.ts +123 -0
- package/src/functions/wirings/workflow/serialize-workflow-map.ts +123 -0
- package/src/functions/wirings/workflow/serialize-workflow-meta.ts +16 -0
- package/src/functions/wirings/workflow/serialize-workflow-types.ts +95 -0
- package/src/functions/wirings/workflow/serialize-workflow-workers.ts +60 -0
- package/src/services/cli-logger-forwarder.service.ts +11 -2
- package/src/services/cli-logger.service.ts +1 -1
- package/src/utils/command-summary.ts +10 -8
- package/src/utils/pikku-cli-config.ts +44 -4
- package/src/utils/schema-generator.ts +25 -7
- package/types/config.d.ts +45 -0
|
@@ -1,9 +1,132 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.
|
|
2
|
+
* This file was generated by @pikku/cli@0.11.1
|
|
3
3
|
*/
|
|
4
4
|
import { pikkuState } from '@pikku/core';
|
|
5
5
|
pikkuState('cli', 'meta', {
|
|
6
|
-
"programs": {
|
|
6
|
+
"programs": {
|
|
7
|
+
"pikku": {
|
|
8
|
+
"program": "pikku",
|
|
9
|
+
"commands": {
|
|
10
|
+
"all": {
|
|
11
|
+
"pikkuFuncName": "all",
|
|
12
|
+
"positionals": [],
|
|
13
|
+
"options": {
|
|
14
|
+
"tags": {
|
|
15
|
+
"description": "Filter functions by tags (comma-separated)",
|
|
16
|
+
"short": "t"
|
|
17
|
+
},
|
|
18
|
+
"types": {
|
|
19
|
+
"description": "Filter functions by types (comma-separated)"
|
|
20
|
+
},
|
|
21
|
+
"directories": {
|
|
22
|
+
"description": "Filter functions by directories (comma-separated)",
|
|
23
|
+
"short": "d"
|
|
24
|
+
},
|
|
25
|
+
"httpMethods": {
|
|
26
|
+
"description": "Filter HTTP routes by methods (comma-separated)"
|
|
27
|
+
},
|
|
28
|
+
"httpRoutes": {
|
|
29
|
+
"description": "Filter HTTP routes by route patterns (comma-separated)"
|
|
30
|
+
},
|
|
31
|
+
"names": {
|
|
32
|
+
"description": "Filter functions by name patterns (supports wildcards)",
|
|
33
|
+
"short": "n"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"description": "Generate all Pikku files (types, schemas, wirings, etc.)",
|
|
37
|
+
"isDefault": true
|
|
38
|
+
},
|
|
39
|
+
"bootstrap": {
|
|
40
|
+
"pikkuFuncName": "bootstrap",
|
|
41
|
+
"positionals": [],
|
|
42
|
+
"options": {},
|
|
43
|
+
"description": "Generate only type files (setup phase only)"
|
|
44
|
+
},
|
|
45
|
+
"watch": {
|
|
46
|
+
"pikkuFuncName": "watch",
|
|
47
|
+
"positionals": [],
|
|
48
|
+
"options": {},
|
|
49
|
+
"description": "Watch for file changes and regenerate automatically"
|
|
50
|
+
},
|
|
51
|
+
"schemas": {
|
|
52
|
+
"pikkuFuncName": "pikkuSchemas",
|
|
53
|
+
"positionals": [],
|
|
54
|
+
"options": {},
|
|
55
|
+
"description": "Generate JSON schemas for function input/output types"
|
|
56
|
+
},
|
|
57
|
+
"fetch": {
|
|
58
|
+
"pikkuFuncName": "pikkuFetch",
|
|
59
|
+
"positionals": [],
|
|
60
|
+
"options": {},
|
|
61
|
+
"description": "Generate type-safe HTTP fetch client"
|
|
62
|
+
},
|
|
63
|
+
"websocket": {
|
|
64
|
+
"pikkuFuncName": "pikkuWebSocketTyped",
|
|
65
|
+
"positionals": [],
|
|
66
|
+
"options": {},
|
|
67
|
+
"description": "Generate type-safe WebSocket client"
|
|
68
|
+
},
|
|
69
|
+
"rpc": {
|
|
70
|
+
"pikkuFuncName": "pikkuRPCClient",
|
|
71
|
+
"positionals": [],
|
|
72
|
+
"options": {},
|
|
73
|
+
"description": "Generate RPC client wrappers"
|
|
74
|
+
},
|
|
75
|
+
"queue-service": {
|
|
76
|
+
"pikkuFuncName": "pikkuQueueService",
|
|
77
|
+
"positionals": [],
|
|
78
|
+
"options": {},
|
|
79
|
+
"description": "Generate queue service wrapper"
|
|
80
|
+
},
|
|
81
|
+
"openapi": {
|
|
82
|
+
"pikkuFuncName": "pikkuOpenAPI",
|
|
83
|
+
"positionals": [],
|
|
84
|
+
"options": {},
|
|
85
|
+
"description": "Generate OpenAPI specification from HTTP routes"
|
|
86
|
+
},
|
|
87
|
+
"nextjs": {
|
|
88
|
+
"pikkuFuncName": "pikkuNext",
|
|
89
|
+
"positionals": [],
|
|
90
|
+
"options": {},
|
|
91
|
+
"description": "Generate Next.js backend and HTTP wrappers"
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"options": {
|
|
95
|
+
"config": {
|
|
96
|
+
"description": "Path to pikku.config.json file",
|
|
97
|
+
"short": "c"
|
|
98
|
+
},
|
|
99
|
+
"logLevel": {
|
|
100
|
+
"description": "Set log level",
|
|
101
|
+
"short": "l",
|
|
102
|
+
"choices": [
|
|
103
|
+
"trace",
|
|
104
|
+
"debug",
|
|
105
|
+
"info",
|
|
106
|
+
"warn",
|
|
107
|
+
"error",
|
|
108
|
+
"critical"
|
|
109
|
+
]
|
|
110
|
+
},
|
|
111
|
+
"userSessionType": {
|
|
112
|
+
"description": "Specify which UserSession type to use (when multiple exist)"
|
|
113
|
+
},
|
|
114
|
+
"singletonServicesFactoryType": {
|
|
115
|
+
"description": "Specify which singleton services factory to use"
|
|
116
|
+
},
|
|
117
|
+
"sessionServicesFactoryType": {
|
|
118
|
+
"description": "Specify which session services factory to use"
|
|
119
|
+
},
|
|
120
|
+
"stateOutput": {
|
|
121
|
+
"description": "Save inspector state to JSON file for reuse"
|
|
122
|
+
},
|
|
123
|
+
"stateInput": {
|
|
124
|
+
"description": "Load inspector state from JSON file (skips inspection)"
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"defaultRenderName": "clientCLIRenderer"
|
|
128
|
+
}
|
|
129
|
+
},
|
|
7
130
|
"renderers": {
|
|
8
131
|
"defaultCLIRenderer": {
|
|
9
132
|
"name": "defaultCLIRenderer",
|
|
@@ -16,10 +139,13 @@ pikkuState('cli', 'meta', {
|
|
|
16
139
|
"schema",
|
|
17
140
|
"jwt",
|
|
18
141
|
"config",
|
|
19
|
-
"variables"
|
|
142
|
+
"variables",
|
|
143
|
+
"workflowService",
|
|
144
|
+
"queueService",
|
|
145
|
+
"schedulerService"
|
|
20
146
|
]
|
|
21
147
|
},
|
|
22
|
-
"filePath": "src/services.ts"
|
|
148
|
+
"filePath": "/home/runner/work/pikku/pikku/packages/cli/src/services.ts"
|
|
23
149
|
},
|
|
24
150
|
"clientCLIRenderer": {
|
|
25
151
|
"name": "clientCLIRenderer",
|
|
@@ -28,7 +154,7 @@ pikkuState('cli', 'meta', {
|
|
|
28
154
|
"optimized": true,
|
|
29
155
|
"services": []
|
|
30
156
|
},
|
|
31
|
-
"filePath": "src/services.ts"
|
|
157
|
+
"filePath": "/home/runner/work/pikku/pikku/packages/cli/src/services.ts"
|
|
32
158
|
}
|
|
33
159
|
}
|
|
34
160
|
});
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was generated by @pikku/cli@0.11.1
|
|
3
|
+
*/
|
|
4
|
+
import '../pikku-bootstrap.gen.js';
|
|
5
|
+
/**
|
|
6
|
+
* Pikku CLI function
|
|
7
|
+
* Handles command line arguments and executes the appropriate function
|
|
8
|
+
*/
|
|
9
|
+
export declare function PikkuCLI(args: string[]): Promise<void>;
|
|
10
|
+
export default PikkuCLI;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was generated by @pikku/cli@0.11.1
|
|
3
|
+
*/
|
|
4
|
+
import { executeCLI, CLIError } from '@pikku/core/cli';
|
|
5
|
+
import { createConfig as createConfig } from '../../src/services.js';
|
|
6
|
+
import { createSingletonServices as createSingletonServices } from '../../src/services.js';
|
|
7
|
+
import { createSessionServices as createSessionServices } from '../../src/services.js';
|
|
8
|
+
import '../pikku-bootstrap.gen.js';
|
|
9
|
+
/**
|
|
10
|
+
* Pikku CLI function
|
|
11
|
+
* Handles command line arguments and executes the appropriate function
|
|
12
|
+
*/
|
|
13
|
+
export async function PikkuCLI(args) {
|
|
14
|
+
try {
|
|
15
|
+
await executeCLI({
|
|
16
|
+
programName: 'pikku',
|
|
17
|
+
args: args || process.argv.slice(2),
|
|
18
|
+
createConfig,
|
|
19
|
+
createSingletonServices,
|
|
20
|
+
createSessionServices,
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
catch (error) {
|
|
24
|
+
if (error instanceof CLIError) {
|
|
25
|
+
process.exit(error.exitCode);
|
|
26
|
+
}
|
|
27
|
+
throw error;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
// Export as default for easy importing
|
|
31
|
+
export default PikkuCLI;
|
|
32
|
+
// For direct execution (if this file is run directly)
|
|
33
|
+
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
34
|
+
PikkuCLI(process.argv.slice(2)).catch(error => {
|
|
35
|
+
console.error('Fatal error:', error.message);
|
|
36
|
+
process.exit(1);
|
|
37
|
+
});
|
|
38
|
+
}
|