@pikku/cli 0.9.16-next.0 → 0.10.0
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 +28 -29
- package/.pikku/channel/pikku-channels-map.gen.d.ts +44 -0
- package/.pikku/channel/pikku-channels-meta.gen.ts +5 -0
- package/.pikku/channel/pikku-channels.gen.ts +4 -0
- package/.pikku/cli/pikku-cli-channel.gen.ts +34 -0
- package/.pikku/cli/pikku-cli-client.gen.ts +43 -0
- package/.pikku/cli/pikku-cli-types.gen.ts +14 -15
- package/.pikku/cli/pikku-cli-wirings-meta.gen.ts +142 -2
- package/.pikku/cli/pikku-cli-wirings.gen.ts +4 -2
- package/.pikku/cli/pikku-cli.gen.ts +41 -0
- package/.pikku/function/pikku-function-types.gen.ts +167 -19
- package/.pikku/function/pikku-functions-meta.gen.ts +220 -192
- package/.pikku/function/pikku-functions-meta.min.gen.ts +61 -56
- package/.pikku/function/pikku-functions.gen.ts +3 -1
- package/.pikku/http/pikku-http-types.gen.ts +28 -3
- package/.pikku/http/pikku-http-wirings-map.gen.d.ts +43 -0
- package/.pikku/http/pikku-http-wirings-meta.gen.ts +13 -0
- package/.pikku/http/pikku-http-wirings.gen.ts +4 -0
- package/.pikku/mcp/pikku-mcp-types.gen.ts +15 -13
- package/.pikku/mcp/pikku-mcp-wirings-meta.gen.ts +7 -0
- package/.pikku/mcp/pikku-mcp-wirings.gen.ts +4 -0
- package/.pikku/mcp/pikku-mcp.gen.json +5 -0
- package/.pikku/pikku-bootstrap.gen.ts +11 -1
- package/.pikku/pikku-services.gen.ts +1 -5
- package/.pikku/pikku-types.gen.ts +1 -2
- package/.pikku/pikku-websocket.gen.ts +76 -0
- package/.pikku/queue/pikku-queue-types.gen.ts +1 -2
- package/.pikku/queue/pikku-queue-workers-wirings-map.gen.d.ts +57 -0
- package/.pikku/queue/pikku-queue-workers-wirings-meta.gen.ts +5 -0
- package/.pikku/queue/pikku-queue-workers-wirings.gen.ts +4 -0
- package/.pikku/rpc/pikku-rpc-wirings-map.gen.d.ts +5 -4
- package/.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts +19 -17
- package/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.ts +15 -14
- package/.pikku/scheduler/pikku-scheduler-types.gen.ts +1 -2
- package/.pikku/scheduler/pikku-schedulers-wirings-meta.gen.ts +5 -0
- package/.pikku/scheduler/pikku-schedulers-wirings.gen.ts +4 -0
- package/.pikku/schemas/register.gen.ts +15 -11
- package/.pikku/schemas/schemas/PikkuCLIConfig.schema.json +1 -1
- package/.pikku/schemas/schemas/PikkuChannelsOutput.schema.json +1 -1
- package/.pikku/schemas/schemas/PikkuPermissionsOutput.schema.json +1 -0
- package/.pikku/schemas/schemas/PikkuSchemasOutput.schema.json +1 -1
- package/CHANGELOG.md +6 -0
- package/bin/pikku.ts +63 -11
- package/build.sh +1 -1
- package/cli.schema.json +1 -1
- package/dist/.pikku/channel/pikku-channel-types.gen.d.ts +11 -20
- package/dist/.pikku/channel/pikku-channel-types.gen.js +9 -11
- package/dist/.pikku/channel/pikku-channels-meta.gen.d.ts +1 -0
- package/dist/.pikku/channel/pikku-channels-meta.gen.js +5 -0
- package/dist/.pikku/channel/pikku-channels.gen.d.ts +4 -0
- package/dist/.pikku/channel/pikku-channels.gen.js +5 -0
- package/dist/.pikku/cli/pikku-cli-channel.gen.d.ts +1 -0
- package/dist/.pikku/cli/pikku-cli-channel.gen.js +33 -0
- package/dist/.pikku/cli/pikku-cli-client.gen.d.ts +10 -0
- package/dist/.pikku/cli/pikku-cli-client.gen.js +34 -0
- package/dist/.pikku/cli/pikku-cli-types.gen.d.ts +9 -12
- package/dist/.pikku/cli/pikku-cli-types.gen.js +5 -4
- package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.js +142 -2
- package/dist/.pikku/cli/pikku-cli-wirings.gen.d.ts +3 -2
- package/dist/.pikku/cli/pikku-cli-wirings.gen.js +4 -3
- 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 +141 -20
- package/dist/.pikku/function/pikku-function-types.gen.js +108 -12
- package/dist/.pikku/function/pikku-functions-meta.gen.js +220 -192
- package/dist/.pikku/function/pikku-functions-meta.min.gen.js +61 -56
- package/dist/.pikku/function/pikku-functions.gen.js +3 -1
- package/dist/.pikku/http/pikku-http-types.gen.d.ts +21 -2
- package/dist/.pikku/http/pikku-http-types.gen.js +24 -3
- package/dist/.pikku/http/pikku-http-wirings-meta.gen.d.ts +1 -0
- package/dist/.pikku/http/pikku-http-wirings-meta.gen.js +13 -0
- package/dist/.pikku/http/pikku-http-wirings.gen.d.ts +4 -0
- package/dist/.pikku/http/pikku-http-wirings.gen.js +5 -0
- package/dist/.pikku/mcp/pikku-mcp-types.gen.d.ts +11 -8
- package/dist/.pikku/mcp/pikku-mcp-types.gen.js +6 -6
- package/dist/.pikku/mcp/pikku-mcp-wirings-meta.gen.d.ts +1 -0
- package/dist/.pikku/mcp/pikku-mcp-wirings-meta.gen.js +7 -0
- package/dist/.pikku/mcp/pikku-mcp-wirings.gen.d.ts +4 -0
- package/dist/.pikku/mcp/pikku-mcp-wirings.gen.js +5 -0
- package/dist/.pikku/pikku-bootstrap.gen.d.ts +11 -1
- package/dist/.pikku/pikku-bootstrap.gen.js +11 -1
- package/dist/.pikku/pikku-services.gen.d.ts +1 -4
- package/dist/.pikku/pikku-services.gen.js +0 -6
- package/dist/.pikku/pikku-types.gen.d.ts +1 -2
- package/dist/.pikku/pikku-types.gen.js +1 -2
- package/dist/.pikku/pikku-websocket.gen.d.ts +31 -0
- package/dist/.pikku/pikku-websocket.gen.js +49 -0
- package/dist/.pikku/queue/pikku-queue-types.gen.d.ts +1 -2
- package/dist/.pikku/queue/pikku-queue-types.gen.js +1 -2
- package/dist/.pikku/queue/pikku-queue-workers-wirings-meta.gen.d.ts +1 -0
- package/dist/.pikku/queue/pikku-queue-workers-wirings-meta.gen.js +5 -0
- package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.d.ts +4 -0
- package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.js +5 -0
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js +15 -14
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.d.ts +1 -2
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js +1 -2
- package/dist/.pikku/scheduler/pikku-schedulers-wirings-meta.gen.d.ts +1 -0
- package/dist/.pikku/scheduler/pikku-schedulers-wirings-meta.gen.js +5 -0
- package/dist/.pikku/scheduler/pikku-schedulers-wirings.gen.d.ts +4 -0
- package/dist/.pikku/scheduler/pikku-schedulers-wirings.gen.js +5 -0
- package/dist/.pikku/schemas/register.gen.js +9 -7
- 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/PikkuPermissionsOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuSchemasOutput.schema.json +1 -1
- package/dist/bin/pikku.d.ts +1 -1
- package/dist/bin/pikku.js +37 -6
- package/dist/src/cli.wiring.js +99 -75
- package/dist/src/functions/commands/all.js +10 -0
- package/dist/src/functions/runtimes/nextjs/pikku-command-nextjs.js +10 -8
- package/dist/src/functions/runtimes/nextjs/serialize-nextjs-backend-wrapper.d.ts +1 -1
- package/dist/src/functions/runtimes/nextjs/serialize-nextjs-backend-wrapper.js +2 -2
- package/dist/src/functions/wirings/channels/pikku-channels.js +0 -5
- package/dist/src/functions/wirings/channels/pikku-command-channel-types.js +0 -2
- package/dist/src/functions/wirings/channels/pikku-command-channels-map.js +0 -5
- package/dist/src/functions/wirings/channels/pikku-command-channels.js +0 -5
- package/dist/src/functions/wirings/channels/pikku-command-websocket-typed.js +6 -3
- package/dist/src/functions/wirings/channels/serialize-channel-types.js +27 -28
- package/dist/src/functions/wirings/channels/serialize-typed-channel-map.js +4 -1
- package/dist/src/functions/wirings/cli/pikku-command-cli-entry.js +31 -8
- package/dist/src/functions/wirings/cli/pikku-command-cli-types.js +0 -2
- package/dist/src/functions/wirings/cli/pikku-command-cli.js +0 -2
- package/dist/src/functions/wirings/cli/serialize-channel-cli-client.d.ts +6 -2
- package/dist/src/functions/wirings/cli/serialize-channel-cli-client.js +88 -11
- package/dist/src/functions/wirings/cli/serialize-channel-cli.d.ts +1 -1
- package/dist/src/functions/wirings/cli/serialize-channel-cli.js +1 -18
- package/dist/src/functions/wirings/cli/serialize-cli-types.js +13 -14
- package/dist/src/functions/wirings/cli/serialize-local-cli-bootstrap.js +19 -14
- package/dist/src/functions/wirings/fetch/index.js +6 -3
- package/dist/src/functions/wirings/functions/pikku-command-function-types-split.js +6 -5
- package/dist/src/functions/wirings/functions/pikku-command-function-types.js +0 -2
- package/dist/src/functions/wirings/functions/pikku-command-functions.js +0 -2
- package/dist/src/functions/wirings/functions/pikku-command-services.d.ts +1 -1
- package/dist/src/functions/wirings/functions/pikku-command-services.js +11 -21
- package/dist/src/functions/wirings/functions/pikku-function-types.js +0 -2
- package/dist/src/functions/wirings/functions/schemas.js +0 -2
- package/dist/src/functions/wirings/functions/serialize-function-types.d.ts +1 -1
- package/dist/src/functions/wirings/functions/serialize-function-types.js +167 -19
- package/dist/src/functions/wirings/functions/serialize-pikku-types-hub.js +0 -1
- package/dist/src/functions/wirings/http/openapi-spec-generator.d.ts +2 -1
- package/dist/src/functions/wirings/http/pikku-command-http-map.js +0 -5
- package/dist/src/functions/wirings/http/pikku-command-http-routes.js +0 -5
- package/dist/src/functions/wirings/http/pikku-command-http-types.js +0 -2
- package/dist/src/functions/wirings/http/pikku-command-openapi.js +7 -4
- package/dist/src/functions/wirings/http/pikku-http-routes.js +0 -5
- package/dist/src/functions/wirings/http/serialize-http-types.js +27 -2
- package/dist/src/functions/wirings/mcp/pikku-command-mcp-json.js +0 -5
- package/dist/src/functions/wirings/mcp/pikku-command-mcp-types.js +0 -2
- package/dist/src/functions/wirings/mcp/pikku-command-mcp.js +0 -5
- package/dist/src/functions/wirings/mcp/serialize-mcp-json.d.ts +1 -1
- package/dist/src/functions/wirings/mcp/serialize-mcp-types.js +14 -12
- package/dist/src/functions/wirings/middleware/pikku-command-middleware.js +0 -2
- package/dist/src/functions/wirings/middleware/serialize-middleware-groups-meta.js +1 -7
- package/dist/src/functions/wirings/permissions/pikku-command-permissions.d.ts +1 -0
- package/dist/src/functions/wirings/permissions/pikku-command-permissions.js +28 -0
- package/dist/src/functions/wirings/permissions/serialize-permissions-imports.d.ts +2 -0
- package/dist/src/functions/wirings/permissions/serialize-permissions-imports.js +43 -0
- package/dist/src/functions/wirings/queue/pikku-command-queue-map.js +0 -5
- package/dist/src/functions/wirings/queue/pikku-command-queue-service.js +6 -3
- package/dist/src/functions/wirings/queue/pikku-command-queue-types.js +0 -2
- package/dist/src/functions/wirings/queue/pikku-command-queue.js +0 -5
- package/dist/src/functions/wirings/queue/pikku-queue-map.js +0 -5
- package/dist/src/functions/wirings/queue/pikku-queue.js +1 -5
- package/dist/src/functions/wirings/queue/serialize-queue-meta.d.ts +1 -1
- package/dist/src/functions/wirings/queue/serialize-queue-types.js +0 -1
- package/dist/src/functions/wirings/rpc/pikku-command-rpc-client.js +5 -3
- package/dist/src/functions/wirings/rpc/pikku-command-rpc-map.js +0 -4
- package/dist/src/functions/wirings/rpc/pikku-command-rpc.js +0 -2
- package/dist/src/functions/wirings/scheduler/pikku-command-scheduler-types.js +0 -2
- package/dist/src/functions/wirings/scheduler/pikku-command-scheduler.js +0 -5
- package/dist/src/functions/wirings/scheduler/serialize-scheduler-types.js +0 -1
- package/dist/src/middleware/log-command-info-and-time.d.ts +2 -8
- package/dist/src/middleware/log-command-info-and-time.js +2 -14
- package/dist/src/services/cli-logger-forwarder.service.d.ts +6 -2
- package/dist/src/services/cli-logger-forwarder.service.js +9 -0
- package/dist/src/services/cli-logger.service.d.ts +4 -0
- package/dist/src/services/cli-logger.service.js +11 -0
- package/dist/src/services.d.ts +5 -0
- package/dist/src/services.js +111 -13
- package/dist/src/utils/custom-types-generator.js +8 -2
- package/dist/src/utils/file-writer.d.ts +4 -1
- package/dist/src/utils/file-writer.js +13 -3
- package/dist/src/utils/get-cli-version.d.ts +5 -0
- package/dist/src/utils/get-cli-version.js +27 -0
- package/dist/src/utils/pikku-cli-config.d.ts +1 -2
- package/dist/src/utils/pikku-cli-config.js +9 -28
- package/dist/src/utils/schema-generator.js +3 -2
- package/dist/src/utils/serialize-import-map.js +0 -3
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +10 -8
- package/pikku.config.json +4 -2
- package/src/cli.wiring.ts +101 -74
- package/src/functions/commands/all.ts +12 -0
- package/src/functions/runtimes/nextjs/pikku-command-nextjs.ts +12 -12
- package/src/functions/runtimes/nextjs/serialize-nextjs-backend-wrapper.ts +2 -2
- package/src/functions/wirings/channels/pikku-channels.ts +0 -5
- package/src/functions/wirings/channels/pikku-command-channel-types.ts +0 -2
- package/src/functions/wirings/channels/pikku-command-channels-map.ts +0 -5
- package/src/functions/wirings/channels/pikku-command-channels.ts +0 -5
- package/src/functions/wirings/channels/pikku-command-websocket-typed.ts +7 -3
- package/src/functions/wirings/channels/serialize-channel-types.ts +27 -28
- package/src/functions/wirings/channels/serialize-typed-channel-map.ts +4 -1
- package/src/functions/wirings/cli/pikku-command-cli-entry.ts +52 -9
- package/src/functions/wirings/cli/pikku-command-cli-types.ts +0 -2
- package/src/functions/wirings/cli/pikku-command-cli.ts +0 -2
- package/src/functions/wirings/cli/serialize-channel-cli-client.ts +111 -12
- package/src/functions/wirings/cli/serialize-channel-cli.ts +2 -23
- package/src/functions/wirings/cli/serialize-cli-types.ts +13 -14
- package/src/functions/wirings/cli/serialize-local-cli-bootstrap.ts +19 -14
- package/src/functions/wirings/fetch/index.ts +7 -3
- package/src/functions/wirings/functions/pikku-command-function-types-split.ts +14 -5
- package/src/functions/wirings/functions/pikku-command-function-types.ts +0 -2
- package/src/functions/wirings/functions/pikku-command-functions.ts +0 -2
- package/src/functions/wirings/functions/pikku-command-services.ts +13 -24
- package/src/functions/wirings/functions/pikku-function-types.ts +0 -2
- package/src/functions/wirings/functions/schemas.ts +0 -2
- package/src/functions/wirings/functions/serialize-function-types.ts +169 -19
- package/src/functions/wirings/functions/serialize-pikku-types-hub.ts +0 -1
- package/src/functions/wirings/http/openapi-spec-generator.ts +2 -1
- package/src/functions/wirings/http/pikku-command-http-map.ts +0 -5
- package/src/functions/wirings/http/pikku-command-http-routes.ts +0 -5
- package/src/functions/wirings/http/pikku-command-http-types.ts +0 -2
- package/src/functions/wirings/http/pikku-command-openapi.ts +9 -4
- package/src/functions/wirings/http/pikku-http-routes.ts +0 -5
- package/src/functions/wirings/http/serialize-http-types.ts +27 -2
- package/src/functions/wirings/mcp/pikku-command-mcp-json.ts +0 -5
- package/src/functions/wirings/mcp/pikku-command-mcp-types.ts +0 -2
- package/src/functions/wirings/mcp/pikku-command-mcp.ts +0 -5
- package/src/functions/wirings/mcp/serialize-mcp-json.ts +1 -1
- package/src/functions/wirings/mcp/serialize-mcp-types.ts +14 -12
- package/src/functions/wirings/middleware/pikku-command-middleware.ts +0 -2
- package/src/functions/wirings/middleware/serialize-middleware-groups-meta.ts +1 -7
- package/src/functions/wirings/permissions/pikku-command-permissions.ts +49 -0
- package/src/functions/wirings/permissions/serialize-permissions-imports.test.ts +274 -0
- package/src/functions/wirings/permissions/serialize-permissions-imports.ts +78 -0
- package/src/functions/wirings/queue/pikku-command-queue-map.ts +0 -5
- package/src/functions/wirings/queue/pikku-command-queue-service.ts +7 -3
- package/src/functions/wirings/queue/pikku-command-queue-types.ts +0 -2
- package/src/functions/wirings/queue/pikku-command-queue.ts +0 -5
- package/src/functions/wirings/queue/pikku-queue-map.ts +0 -5
- package/src/functions/wirings/queue/pikku-queue.ts +3 -6
- package/src/functions/wirings/queue/serialize-queue-meta.ts +1 -1
- package/src/functions/wirings/queue/serialize-queue-types.ts +0 -1
- package/src/functions/wirings/rpc/pikku-command-rpc-client.ts +6 -3
- package/src/functions/wirings/rpc/pikku-command-rpc-map.ts +0 -4
- package/src/functions/wirings/rpc/pikku-command-rpc.ts +0 -2
- package/src/functions/wirings/scheduler/pikku-command-scheduler-types.ts +0 -2
- package/src/functions/wirings/scheduler/pikku-command-scheduler.ts +0 -5
- package/src/functions/wirings/scheduler/serialize-scheduler-types.ts +0 -1
- package/src/middleware/log-command-info-and-time.ts +2 -28
- package/src/services/cli-logger-forwarder.service.ts +15 -2
- package/src/services/cli-logger.service.ts +15 -0
- package/src/services.ts +148 -19
- package/src/utils/custom-types-generator.ts +8 -2
- package/src/utils/file-writer.ts +19 -3
- package/src/utils/get-cli-version.ts +28 -0
- package/src/utils/pikku-cli-config.ts +6 -35
- package/src/utils/schema-generator.ts +7 -3
- package/src/utils/serialize-import-map.ts +0 -4
- package/types/application-types.d.ts +4 -1
- package/types/config.d.ts +15 -3
- package/dist/.pikku/rpc/pikku-bootstrap-rpc.gen.d.ts +0 -6
- package/dist/.pikku/rpc/pikku-bootstrap-rpc.gen.js +0 -6
- package/dist/src/serialize-pikku-types.d.ts +0 -4
- package/dist/src/serialize-pikku-types.js +0 -605
- package/src/serialize-pikku-types.ts +0 -613
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by
|
|
2
|
+
* This file was generated by @pikku/cli@0.10.0
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
|
-
|
|
5
|
+
|
|
6
6
|
* Channel-specific type definitions for tree-shaking optimization
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import { CoreChannel, wireChannel as wireChannelCore } from '@pikku/core/channel'
|
|
10
10
|
import { CorePikkuFunctionConfig } from '@pikku/core'
|
|
11
11
|
import { AssertHTTPWiringParams } from '@pikku/core/http'
|
|
12
|
-
import type {
|
|
12
|
+
import type { PikkuFunctionSessionless, PikkuPermission, PikkuMiddleware } from '../function/pikku-function-types.gen.js'
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* Type definition for WebSocket channels with typed data exchange.
|
|
@@ -18,64 +18,63 @@ import type { PikkuFunction, PikkuFunctionSessionless, PikkuPermission, PikkuMid
|
|
|
18
18
|
* @template ChannelData - Type of data exchanged through the channel
|
|
19
19
|
* @template Channel - String literal type for the channel name
|
|
20
20
|
*/
|
|
21
|
-
type
|
|
22
|
-
|
|
21
|
+
type ChannelWiring<ChannelData, Channel extends string> = CoreChannel<
|
|
22
|
+
ChannelData,
|
|
23
|
+
Channel,
|
|
24
|
+
CorePikkuFunctionConfig<PikkuFunctionSessionless<void, any, ChannelData>, PikkuPermission<void>, PikkuMiddleware>,
|
|
25
|
+
CorePikkuFunctionConfig<PikkuFunctionSessionless<void, void, ChannelData>, PikkuPermission<void>, PikkuMiddleware>,
|
|
26
|
+
CorePikkuFunctionConfig<PikkuFunctionSessionless<any, any, ChannelData>, PikkuPermission<any>, PikkuMiddleware>,
|
|
27
|
+
PikkuPermission,
|
|
28
|
+
PikkuMiddleware
|
|
29
|
+
>
|
|
23
30
|
|
|
24
31
|
/**
|
|
25
32
|
* Creates a function that handles WebSocket channel connections.
|
|
26
33
|
* Called when a client connects to a channel.
|
|
27
34
|
*
|
|
28
35
|
* @template Out - Output type for connection response
|
|
29
|
-
* @template ChannelData - Type of data associated with the channel
|
|
30
36
|
* @param func - Function definition, either direct function or configuration object
|
|
31
|
-
* @returns The
|
|
37
|
+
* @returns The normalized configuration object
|
|
32
38
|
*/
|
|
33
|
-
export const pikkuChannelConnectionFunc = <Out = unknown
|
|
39
|
+
export const pikkuChannelConnectionFunc = <Out = unknown>(
|
|
34
40
|
func:
|
|
35
|
-
| PikkuFunctionSessionless<void, Out,
|
|
36
|
-
|
|
|
37
|
-
func: PikkuFunctionSessionless<void, Out, ChannelData>
|
|
38
|
-
name?: string
|
|
39
|
-
}
|
|
41
|
+
| PikkuFunctionSessionless<void, Out, unknown>
|
|
42
|
+
| CorePikkuFunctionConfig<PikkuFunctionSessionless<void, Out, unknown>, PikkuPermission<void>, PikkuMiddleware>
|
|
40
43
|
) => {
|
|
41
|
-
return typeof func === 'function' ? func : func
|
|
44
|
+
return typeof func === 'function' ? { func } : func
|
|
42
45
|
}
|
|
43
46
|
|
|
44
47
|
/**
|
|
45
48
|
* Creates a function that handles WebSocket channel disconnections.
|
|
46
49
|
* Called when a client disconnects from a channel.
|
|
47
50
|
*
|
|
48
|
-
* @template ChannelData - Type of data associated with the channel
|
|
49
51
|
* @param func - Function definition, either direct function or configuration object
|
|
50
|
-
* @returns The
|
|
52
|
+
* @returns The normalized configuration object
|
|
51
53
|
*/
|
|
52
|
-
export const pikkuChannelDisconnectionFunc =
|
|
54
|
+
export const pikkuChannelDisconnectionFunc = (
|
|
53
55
|
func:
|
|
54
|
-
| PikkuFunctionSessionless<void, void,
|
|
55
|
-
|
|
|
56
|
-
func: PikkuFunction<void, void, ChannelData>
|
|
57
|
-
name?: string
|
|
58
|
-
}
|
|
56
|
+
| PikkuFunctionSessionless<void, void, unknown>
|
|
57
|
+
| CorePikkuFunctionConfig<PikkuFunctionSessionless<void, void, unknown>, PikkuPermission<void>, PikkuMiddleware>
|
|
59
58
|
) => {
|
|
60
|
-
return typeof func === 'function' ? func : func
|
|
59
|
+
return typeof func === 'function' ? { func } : func
|
|
61
60
|
}
|
|
62
61
|
|
|
63
62
|
/**
|
|
64
63
|
* Creates a function that handles WebSocket channel messages.
|
|
65
64
|
* Called when a message is received on a channel.
|
|
65
|
+
* This is the same as pikkuSessionlessFunc but with ChannelData = unknown by default.
|
|
66
66
|
*
|
|
67
67
|
* @template In - Input type for channel messages
|
|
68
68
|
* @template Out - Output type for channel responses
|
|
69
|
-
* @template ChannelData - Type of data associated with the channel
|
|
70
69
|
* @param func - Function definition, either direct function or configuration object
|
|
71
|
-
* @returns The
|
|
70
|
+
* @returns The normalized configuration object
|
|
72
71
|
*/
|
|
73
|
-
export const pikkuChannelFunc = <In
|
|
72
|
+
export const pikkuChannelFunc = <In, Out = unknown>(
|
|
74
73
|
func:
|
|
75
|
-
| PikkuFunctionSessionless<In, Out,
|
|
76
|
-
| CorePikkuFunctionConfig<
|
|
74
|
+
| PikkuFunctionSessionless<In, Out, unknown>
|
|
75
|
+
| CorePikkuFunctionConfig<PikkuFunctionSessionless<In, Out, unknown>, PikkuPermission<In>, PikkuMiddleware>
|
|
77
76
|
) => {
|
|
78
|
-
return typeof func === 'function' ? func : func
|
|
77
|
+
return typeof func === 'function' ? { func } : func
|
|
79
78
|
}
|
|
80
79
|
|
|
81
80
|
/**
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was generated by @pikku/cli@0.10.0
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* This provides the structure needed for TypeScript to be aware of channels
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
// Custom types are those that are defined directly within generics
|
|
11
|
+
// or are broken into simpler types
|
|
12
|
+
export type PikkuSchemasOutput = false | true
|
|
13
|
+
export type PikkuChannelsOutput = false | true
|
|
14
|
+
export type PikkuCLIOutput = false | true
|
|
15
|
+
export type PikkuFunctionsOutput = false | true
|
|
16
|
+
export type PikkuHTTPOutput = false | true
|
|
17
|
+
export type PikkuMCPOutput = false | true
|
|
18
|
+
export type PikkuMiddlewareOutput = false | true
|
|
19
|
+
export type PikkuPermissionsOutput = false | true
|
|
20
|
+
export type PikkuQueueOutput = false | true
|
|
21
|
+
export type PikkuRPCOutput = false | true
|
|
22
|
+
export type PikkuSchedulerOutput = false | true
|
|
23
|
+
|
|
24
|
+
interface ChannelHandler<I, O> {
|
|
25
|
+
input: I;
|
|
26
|
+
output: O;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export type ChannelsMap = {
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export type ChannelDefaultHandlerOf<Channel extends keyof ChannelsMap> =
|
|
33
|
+
ChannelsMap[Channel]['defaultMessage'] extends { input: infer I; output: infer O }
|
|
34
|
+
? ChannelHandler<I, O>
|
|
35
|
+
: never;
|
|
36
|
+
|
|
37
|
+
export type ChannelWiringHandlerOf<
|
|
38
|
+
Channel extends keyof ChannelsMap,
|
|
39
|
+
Route extends keyof ChannelsMap[Channel]['routes'],
|
|
40
|
+
Method extends keyof ChannelsMap[Channel]['routes'][Route],
|
|
41
|
+
> =
|
|
42
|
+
ChannelsMap[Channel]['routes'][Route][Method] extends { input: infer I; output: infer O }
|
|
43
|
+
? ChannelHandler<I, O>
|
|
44
|
+
: never;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was generated by @pikku/cli@0.10.0
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* WebSocket channel backend for 'pikku' CLI commands
|
|
6
|
+
*/
|
|
7
|
+
import { wireChannel } from '../channel/pikku-channel-types.gen.js'
|
|
8
|
+
import { all } from '../../src/functions/commands/all.js'
|
|
9
|
+
import { pikkuSchemas } from '../../src/functions/wirings/functions/schemas.js'
|
|
10
|
+
import { pikkuFetch } from '../../src/functions/wirings/fetch/index.js'
|
|
11
|
+
import { pikkuWebSocketTyped } from '../../src/functions/wirings/channels/pikku-command-websocket-typed.js'
|
|
12
|
+
import { pikkuRPCClient } from '../../src/functions/wirings/rpc/pikku-command-rpc-client.js'
|
|
13
|
+
import { pikkuQueueService } from '../../src/functions/wirings/queue/pikku-command-queue-service.js'
|
|
14
|
+
import { pikkuOpenAPI } from '../../src/functions/wirings/http/pikku-command-openapi.js'
|
|
15
|
+
import { pikkuNext } from '../../src/functions/runtimes/nextjs/pikku-command-nextjs.js'
|
|
16
|
+
|
|
17
|
+
wireChannel({
|
|
18
|
+
name: 'pikku-cli',
|
|
19
|
+
route: '/cli/pikku',
|
|
20
|
+
auth: false,
|
|
21
|
+
onMessageWiring: {
|
|
22
|
+
command: {
|
|
23
|
+
'all': all,
|
|
24
|
+
'schemas': pikkuSchemas,
|
|
25
|
+
'fetch': pikkuFetch,
|
|
26
|
+
'websocket': pikkuWebSocketTyped,
|
|
27
|
+
'rpc': pikkuRPCClient,
|
|
28
|
+
'queue-service': pikkuQueueService,
|
|
29
|
+
'openapi': pikkuOpenAPI,
|
|
30
|
+
'nextjs': pikkuNext
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
tags: ['cli', 'pikku']
|
|
34
|
+
})
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was generated by @pikku/cli@0.10.0
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { executeCLIViaChannel } from '@pikku/core/cli/channel'
|
|
6
|
+
import { CorePikkuWebsocket } from '@pikku/websocket'
|
|
7
|
+
import '../pikku-bootstrap.gen.js'
|
|
8
|
+
import { clientCLIRenderer } from '../../src/services.js'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Pikku CLI Client (via WebSocket Channel)
|
|
12
|
+
* Executes CLI commands over a WebSocket connection
|
|
13
|
+
*/
|
|
14
|
+
export async function PikkuCLIClient(
|
|
15
|
+
url: string,
|
|
16
|
+
args?: string[]
|
|
17
|
+
): Promise<void> {
|
|
18
|
+
// Create WebSocket connection
|
|
19
|
+
const pikkuWS = new CorePikkuWebsocket(url)
|
|
20
|
+
|
|
21
|
+
// Register renderers for CLI commands
|
|
22
|
+
const renderers = {}
|
|
23
|
+
|
|
24
|
+
await executeCLIViaChannel({
|
|
25
|
+
programName: 'pikku',
|
|
26
|
+
pikkuWS,
|
|
27
|
+
args,
|
|
28
|
+
renderers,
|
|
29
|
+
defaultRenderer: clientCLIRenderer,
|
|
30
|
+
})
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// Export as default for easy importing
|
|
34
|
+
export default PikkuCLIClient
|
|
35
|
+
|
|
36
|
+
// For direct execution (if this file is run directly)
|
|
37
|
+
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
38
|
+
const url = process.env.PIKKU_WS_URL || 'ws://localhost:3000/cli/pikku'
|
|
39
|
+
PikkuCLIClient(url, process.argv.slice(2)).catch(error => {
|
|
40
|
+
console.error('Fatal error:', error.message)
|
|
41
|
+
process.exit(1)
|
|
42
|
+
})
|
|
43
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by
|
|
2
|
+
* This file was generated by @pikku/cli@0.10.0
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
|
-
|
|
5
|
+
|
|
6
6
|
* CLI-specific type definitions for tree-shaking optimization
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import { CoreCLI, wireCLI as wireCLICore, CorePikkuCLIRender, CoreCLICommandConfig } from '@pikku/core'
|
|
9
|
+
import { CoreCLI, wireCLI as wireCLICore, CorePikkuCLIRender, CoreCLICommandConfig } from '@pikku/core/cli'
|
|
10
10
|
import type { PikkuFunctionConfig, PikkuMiddleware } from '../function/pikku-function-types.gen.js'
|
|
11
11
|
import type { UserSession } from '../../types/application-types.d.js'
|
|
12
12
|
import type { SingletonServices } from '../../types/application-types.d.js'
|
|
@@ -27,12 +27,7 @@ type PikkuCLIRender<Data, RequiredServices extends SingletonServices = Singleton
|
|
|
27
27
|
* CLI command configuration with project-specific types.
|
|
28
28
|
* Uses CoreCLICommandConfig from @pikku/core with local middleware and render types.
|
|
29
29
|
*/
|
|
30
|
-
type CLICommandConfig<Func extends PikkuFunctionConfig<any, any
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Result type for CLI command configuration
|
|
34
|
-
*/
|
|
35
|
-
type CLICommandResult<Func extends PikkuFunctionConfig<any, any>> = CLICommandConfig<Func>
|
|
30
|
+
type CLICommandConfig<Func extends PikkuFunctionConfig<In, Out>, In = any, Out = any, Params extends string = string> = CoreCLICommandConfig<Func, PikkuMiddleware, PikkuCLIRender<any>, Params>
|
|
36
31
|
|
|
37
32
|
/**
|
|
38
33
|
* Type definition for CLI applications with commands and global options.
|
|
@@ -40,7 +35,7 @@ type CLICommandResult<Func extends PikkuFunctionConfig<any, any>> = CLICommandCo
|
|
|
40
35
|
* @template Commands - Type describing the command structure
|
|
41
36
|
* @template GlobalOptions - Type for global CLI options
|
|
42
37
|
*/
|
|
43
|
-
type CLIWiring<Commands extends Record<string, CoreCLICommandConfig<any, PikkuMiddleware, PikkuCLIRender<any
|
|
38
|
+
type CLIWiring<Commands extends Record<string, CoreCLICommandConfig<any, PikkuMiddleware, PikkuCLIRender<any>, any>>, GlobalOptions> = CoreCLI<Commands, GlobalOptions, PikkuMiddleware, PikkuCLIRender<any>>
|
|
44
39
|
|
|
45
40
|
/**
|
|
46
41
|
* Registers a CLI application with the Pikku framework.
|
|
@@ -50,7 +45,7 @@ type CLIWiring<Commands extends Record<string, CoreCLICommandConfig<any, PikkuMi
|
|
|
50
45
|
* @template GlobalOptions - Type for global CLI options
|
|
51
46
|
* @param cli - CLI definition with program name, commands, and global options
|
|
52
47
|
*/
|
|
53
|
-
export const wireCLI = <Commands extends Record<string, CoreCLICommandConfig<any, PikkuMiddleware, PikkuCLIRender<any
|
|
48
|
+
export const wireCLI = <Commands extends Record<string, CoreCLICommandConfig<any, PikkuMiddleware, PikkuCLIRender<any>, any>>, GlobalOptions>(
|
|
54
49
|
cli: CLIWiring<Commands, GlobalOptions>
|
|
55
50
|
) => {
|
|
56
51
|
wireCLICore(cli as any)
|
|
@@ -60,12 +55,16 @@ export const wireCLI = <Commands extends Record<string, CoreCLICommandConfig<any
|
|
|
60
55
|
* Creates a CLI command definition with automatic option inference from the function's input type.
|
|
61
56
|
* This allows TypeScript to automatically derive CLI options from the function signature.
|
|
62
57
|
*
|
|
63
|
-
* @template
|
|
58
|
+
* @template FuncConfig - The Pikku function config type
|
|
59
|
+
* @template Params - The parameters string literal type
|
|
64
60
|
* @param config - CLI command configuration
|
|
65
61
|
* @returns CLI command configuration with inferred types
|
|
66
62
|
*/
|
|
67
|
-
export const pikkuCLICommand = <
|
|
68
|
-
|
|
69
|
-
|
|
63
|
+
export const pikkuCLICommand = <
|
|
64
|
+
FuncConfig extends PikkuFunctionConfig<any, any>,
|
|
65
|
+
Params extends string
|
|
66
|
+
>(
|
|
67
|
+
config: CLICommandConfig<FuncConfig, any, any, Params>
|
|
68
|
+
): CoreCLICommandConfig<FuncConfig, PikkuMiddleware, PikkuCLIRender<any>, string> => {
|
|
70
69
|
return config as any
|
|
71
70
|
}
|
|
@@ -1,5 +1,145 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by
|
|
2
|
+
* This file was generated by @pikku/cli@0.10.0
|
|
3
3
|
*/
|
|
4
4
|
import { pikkuState } from '@pikku/core'
|
|
5
|
-
pikkuState('cli', 'meta', {
|
|
5
|
+
pikkuState('cli', 'meta', {
|
|
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
|
+
"schemas": {
|
|
40
|
+
"pikkuFuncName": "pikkuSchemas",
|
|
41
|
+
"positionals": [],
|
|
42
|
+
"options": {},
|
|
43
|
+
"description": "Generate JSON schemas for function input/output types"
|
|
44
|
+
},
|
|
45
|
+
"fetch": {
|
|
46
|
+
"pikkuFuncName": "pikkuFetch",
|
|
47
|
+
"positionals": [],
|
|
48
|
+
"options": {},
|
|
49
|
+
"description": "Generate type-safe HTTP fetch client"
|
|
50
|
+
},
|
|
51
|
+
"websocket": {
|
|
52
|
+
"pikkuFuncName": "pikkuWebSocketTyped",
|
|
53
|
+
"positionals": [],
|
|
54
|
+
"options": {},
|
|
55
|
+
"description": "Generate type-safe WebSocket client"
|
|
56
|
+
},
|
|
57
|
+
"rpc": {
|
|
58
|
+
"pikkuFuncName": "pikkuRPCClient",
|
|
59
|
+
"positionals": [],
|
|
60
|
+
"options": {},
|
|
61
|
+
"description": "Generate RPC client wrappers"
|
|
62
|
+
},
|
|
63
|
+
"queue-service": {
|
|
64
|
+
"pikkuFuncName": "pikkuQueueService",
|
|
65
|
+
"positionals": [],
|
|
66
|
+
"options": {},
|
|
67
|
+
"description": "Generate queue service wrapper"
|
|
68
|
+
},
|
|
69
|
+
"openapi": {
|
|
70
|
+
"pikkuFuncName": "pikkuOpenAPI",
|
|
71
|
+
"positionals": [],
|
|
72
|
+
"options": {},
|
|
73
|
+
"description": "Generate OpenAPI specification from HTTP routes"
|
|
74
|
+
},
|
|
75
|
+
"nextjs": {
|
|
76
|
+
"pikkuFuncName": "pikkuNext",
|
|
77
|
+
"positionals": [],
|
|
78
|
+
"options": {},
|
|
79
|
+
"description": "Generate Next.js backend and HTTP wrappers"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"options": {
|
|
83
|
+
"config": {
|
|
84
|
+
"description": "Path to pikku.config.json file",
|
|
85
|
+
"short": "c"
|
|
86
|
+
},
|
|
87
|
+
"logLevel": {
|
|
88
|
+
"description": "Set log level",
|
|
89
|
+
"short": "l",
|
|
90
|
+
"choices": [
|
|
91
|
+
"trace",
|
|
92
|
+
"debug",
|
|
93
|
+
"info",
|
|
94
|
+
"warn",
|
|
95
|
+
"error",
|
|
96
|
+
"critical"
|
|
97
|
+
]
|
|
98
|
+
},
|
|
99
|
+
"userSessionType": {
|
|
100
|
+
"description": "Specify which UserSession type to use (when multiple exist)"
|
|
101
|
+
},
|
|
102
|
+
"singletonServicesFactoryType": {
|
|
103
|
+
"description": "Specify which singleton services factory to use"
|
|
104
|
+
},
|
|
105
|
+
"sessionServicesFactoryType": {
|
|
106
|
+
"description": "Specify which session services factory to use"
|
|
107
|
+
},
|
|
108
|
+
"stateOutput": {
|
|
109
|
+
"description": "Save inspector state to JSON file for reuse"
|
|
110
|
+
},
|
|
111
|
+
"stateInput": {
|
|
112
|
+
"description": "Load inspector state from JSON file (skips inspection)"
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"defaultRenderName": "clientCLIRenderer"
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
"renderers": {
|
|
119
|
+
"defaultCLIRenderer": {
|
|
120
|
+
"name": "defaultCLIRenderer",
|
|
121
|
+
"exportedName": "defaultCLIRenderer",
|
|
122
|
+
"services": {
|
|
123
|
+
"optimized": true,
|
|
124
|
+
"services": [
|
|
125
|
+
"logger",
|
|
126
|
+
"getInspectorState",
|
|
127
|
+
"schema",
|
|
128
|
+
"jwt",
|
|
129
|
+
"config",
|
|
130
|
+
"variables"
|
|
131
|
+
]
|
|
132
|
+
},
|
|
133
|
+
"filePath": "/home/runner/work/pikku/pikku/packages/cli/src/services.ts"
|
|
134
|
+
},
|
|
135
|
+
"clientCLIRenderer": {
|
|
136
|
+
"name": "clientCLIRenderer",
|
|
137
|
+
"exportedName": "clientCLIRenderer",
|
|
138
|
+
"services": {
|
|
139
|
+
"optimized": true,
|
|
140
|
+
"services": []
|
|
141
|
+
},
|
|
142
|
+
"filePath": "/home/runner/work/pikku/pikku/packages/cli/src/services.ts"
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
})
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by
|
|
2
|
+
* This file was generated by @pikku/cli@0.10.0
|
|
3
3
|
*/
|
|
4
|
-
/* The files with an wireCLI function call */
|
|
4
|
+
/* The files with an wireCLI function call */
|
|
5
|
+
import '../../src/services.js'
|
|
6
|
+
import '../../src/cli.wiring.js'
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was generated by @pikku/cli@0.10.0
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { executeCLI, CLIError } from '@pikku/core/cli'
|
|
6
|
+
import { createConfig as createConfig } from '../../src/services.js'
|
|
7
|
+
import { createSingletonServices as createSingletonServices } from '../../src/services.js'
|
|
8
|
+
import { createSessionServices as createSessionServices } from '../../src/services.js'
|
|
9
|
+
import '../pikku-bootstrap.gen.js'
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Pikku CLI function
|
|
13
|
+
* Handles command line arguments and executes the appropriate function
|
|
14
|
+
*/
|
|
15
|
+
export async function PikkuCLI(args: string[]): Promise<void> {
|
|
16
|
+
try {
|
|
17
|
+
await executeCLI({
|
|
18
|
+
programName: 'pikku',
|
|
19
|
+
args: args || process.argv.slice(2),
|
|
20
|
+
createConfig,
|
|
21
|
+
createSingletonServices,
|
|
22
|
+
createSessionServices,
|
|
23
|
+
})
|
|
24
|
+
} catch (error) {
|
|
25
|
+
if (error instanceof CLIError) {
|
|
26
|
+
process.exit(error.exitCode)
|
|
27
|
+
}
|
|
28
|
+
throw error
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Export as default for easy importing
|
|
33
|
+
export default PikkuCLI
|
|
34
|
+
|
|
35
|
+
// For direct execution (if this file is run directly)
|
|
36
|
+
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
37
|
+
PikkuCLI(process.argv.slice(2)).catch(error => {
|
|
38
|
+
console.error('Fatal error:', error.message)
|
|
39
|
+
process.exit(1)
|
|
40
|
+
})
|
|
41
|
+
}
|