@pikku/cli 0.11.0 → 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 +2 -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 +127 -4
- 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 +156 -156
- package/.pikku/function/pikku-functions-meta.min.gen.ts +36 -36
- package/.pikku/function/pikku-functions.gen.ts +1 -1
- package/.pikku/http/pikku-http-types.gen.ts +1 -1
- package/.pikku/http/pikku-http-wirings-map.gen.d.ts +2 -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 +1 -1
- package/.pikku/pikku-services.gen.ts +3 -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 +2 -2
- package/.pikku/queue/pikku-queue-workers-wirings-meta.gen.ts +1 -1
- package/.pikku/queue/pikku-queue-workers-wirings.gen.ts +1 -1
- package/.pikku/rpc/pikku-remote-rpc-workers.gen.ts +1 -1
- package/.pikku/rpc/pikku-rpc-wirings-map.gen.d.ts +2 -2
- package/.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts +9 -9
- package/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.ts +8 -8
- 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 +5 -5
- package/.pikku/schemas/schemas/PikkuChannelsOutput.schema.json +1 -1
- package/.pikku/schemas/schemas/PikkuSchemasOutput.schema.json +1 -1
- package/.pikku/workflow/pikku-workflow-map.gen.d.ts +2 -2
- package/.pikku/workflow/pikku-workflow-types.gen.ts +1 -1
- package/.pikku/workflow/pikku-workflow-wirings-meta.gen.ts +1 -1
- package/.pikku/workflow/pikku-workflow-wirings.gen.ts +1 -1
- package/CHANGELOG.md +6 -1
- package/bin/pikku.ts +20 -20
- package/build.sh +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 +127 -4
- 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 +156 -156
- package/dist/.pikku/function/pikku-functions-meta.min.gen.js +36 -36
- package/dist/.pikku/function/pikku-functions.gen.js +1 -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 +1 -1
- package/dist/.pikku/pikku-bootstrap.gen.js +1 -1
- package/dist/.pikku/pikku-services.gen.d.ts +3 -3
- package/dist/.pikku/pikku-services.gen.js +1 -1
- 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 +1 -1
- 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.js +1 -1
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js +8 -8
- 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 +3 -3
- package/dist/.pikku/schemas/schemas/PikkuChannelsOutput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/PikkuSchemasOutput.schema.json +1 -1
- package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +1 -1
- package/dist/.pikku/workflow/pikku-workflow-types.gen.js +1 -1
- package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +1 -1
- package/dist/.pikku/workflow/pikku-workflow-wirings.gen.d.ts +1 -1
- package/dist/.pikku/workflow/pikku-workflow-wirings.gen.js +1 -1
- package/dist/bin/pikku.js +18 -20
- package/dist/src/cli.wiring.js +109 -107
- package/dist/src/services/cli-logger-forwarder.service.d.ts +3 -0
- package/dist/src/services/cli-logger-forwarder.service.js +8 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/cli.wiring.ts +111 -106
- package/src/services/cli-logger-forwarder.service.ts +10 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.11.
|
|
2
|
+
* This file was generated by @pikku/cli@0.11.1
|
|
3
3
|
*/
|
|
4
4
|
import type { SingletonServices } from '../types/application-types.d.js'
|
|
5
5
|
import type { Services } from '../types/application-types.d.js'
|
|
@@ -7,7 +7,7 @@ import type { Services } from '../types/application-types.d.js'
|
|
|
7
7
|
// Singleton services map: true if required, false if available but unused
|
|
8
8
|
export const requiredSingletonServices = {
|
|
9
9
|
'config': true,
|
|
10
|
-
'getInspectorState':
|
|
10
|
+
'getInspectorState': true,
|
|
11
11
|
'jwt': false,
|
|
12
12
|
'logger': true,
|
|
13
13
|
'queueService': false,
|
|
@@ -24,6 +24,6 @@ export const requiredSessionServices = {
|
|
|
24
24
|
} as const
|
|
25
25
|
|
|
26
26
|
// Type exports
|
|
27
|
-
export type RequiredSingletonServices = Pick<SingletonServices, 'config' | 'logger' | 'schema' | 'variables'> & Partial<Omit<SingletonServices, 'config' | 'logger' | 'schema' | 'variables'>>
|
|
27
|
+
export type RequiredSingletonServices = Pick<SingletonServices, 'config' | 'getInspectorState' | 'logger' | 'schema' | 'variables'> & Partial<Omit<SingletonServices, 'config' | 'getInspectorState' | 'logger' | 'schema' | 'variables'>>
|
|
28
28
|
|
|
29
29
|
export type RequiredSessionServices = Partial<Services>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.11.
|
|
2
|
+
* This file was generated by @pikku/cli@0.11.1
|
|
3
3
|
*/
|
|
4
4
|
import { CorePikkuWebsocket, CorePikkuRouteHandler } from '@pikku/websocket'
|
|
5
5
|
import { ChannelDefaultHandlerOf, ChannelWiringHandlerOf, ChannelsMap } from './channel/pikku-channels-map.gen.d.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.11.
|
|
2
|
+
* This file was generated by @pikku/cli@0.11.1
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
5
|
* This provides the structure needed for typescript to be aware of Queue workers and their input/output types
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
|
|
10
10
|
// Custom types are those that are defined directly within generics
|
|
11
11
|
// or are broken into simpler types
|
|
12
|
+
export type PikkuSchemasOutput = false | true
|
|
12
13
|
export type PikkuChannelsOutput = false | true
|
|
13
14
|
export type PikkuCLIOutput = false | true
|
|
14
15
|
export type PikkuFunctionsOutput = false | true
|
|
15
|
-
export type PikkuSchemasOutput = false | true
|
|
16
16
|
export type PikkuHTTPOutput = false | true
|
|
17
17
|
export type PikkuMCPOutput = false | true
|
|
18
18
|
export type PikkuMiddlewareOutput = false | true
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.11.
|
|
2
|
+
* This file was generated by @pikku/cli@0.11.1
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
5
|
* This provides the structure needed for typescript to be aware of RPCs and their return types
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
|
|
10
10
|
// Custom types are those that are defined directly within generics
|
|
11
11
|
// or are broken into simpler types
|
|
12
|
+
export type PikkuSchemasOutput = false | true
|
|
12
13
|
export type PikkuChannelsOutput = false | true
|
|
13
14
|
export type PikkuCLIOutput = false | true
|
|
14
15
|
export type PikkuFunctionsOutput = false | true
|
|
15
|
-
export type PikkuSchemasOutput = false | true
|
|
16
16
|
export type PikkuHTTPOutput = false | true
|
|
17
17
|
export type PikkuMCPOutput = false | true
|
|
18
18
|
export type PikkuMiddlewareOutput = false | true
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.11.
|
|
2
|
+
* This file was generated by @pikku/cli@0.11.1
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
5
|
* This provides the structure needed for typescript to be aware of RPCs and their return types
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
|
|
10
10
|
// Custom types are those that are defined directly within generics
|
|
11
11
|
// or are broken into simpler types
|
|
12
|
+
export type PikkuSchemasOutput = false | true
|
|
12
13
|
export type PikkuChannelsOutput = false | true
|
|
13
14
|
export type PikkuCLIOutput = false | true
|
|
14
15
|
export type PikkuFunctionsOutput = false | true
|
|
15
|
-
export type PikkuSchemasOutput = false | true
|
|
16
16
|
export type PikkuHTTPOutput = false | true
|
|
17
17
|
export type PikkuMCPOutput = false | true
|
|
18
18
|
export type PikkuMiddlewareOutput = false | true
|
|
@@ -30,39 +30,39 @@ interface RPCHandler<I, O> {
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
export type RPCMap = {
|
|
33
|
+
readonly 'pikkuSchemas': RPCHandler<null, PikkuSchemasOutput>,
|
|
34
|
+
readonly 'pikkuFetch': RPCHandler<null, null>,
|
|
35
|
+
readonly 'pikkuWebSocketTyped': RPCHandler<null, null>,
|
|
36
|
+
readonly 'pikkuRPCClient': RPCHandler<null, null>,
|
|
37
|
+
readonly 'pikkuQueueService': RPCHandler<null, null>,
|
|
38
|
+
readonly 'pikkuOpenAPI': RPCHandler<null, null>,
|
|
39
|
+
readonly 'pikkuNext': RPCHandler<null, null>,
|
|
33
40
|
readonly 'all': RPCHandler<null, null>,
|
|
34
41
|
readonly 'bootstrap': RPCHandler<null, null>,
|
|
35
42
|
readonly 'watch': RPCHandler<null, null>,
|
|
36
|
-
readonly 'pikkuNext': RPCHandler<null, null>,
|
|
37
43
|
readonly 'pikkuChannels': RPCHandler<null, PikkuChannelsOutput>,
|
|
38
44
|
readonly 'pikkuChannelTypes': RPCHandler<null, null>,
|
|
39
45
|
readonly 'pikkuChannelsMap': RPCHandler<null, null>,
|
|
40
|
-
readonly 'pikkuWebSocketTyped': RPCHandler<null, null>,
|
|
41
46
|
readonly 'pikkuCLIEntry': RPCHandler<null, null>,
|
|
42
47
|
readonly 'pikkuCLITypes': RPCHandler<null, null>,
|
|
43
48
|
readonly 'pikkuCLI': RPCHandler<null, PikkuCLIOutput>,
|
|
44
|
-
readonly 'pikkuFetch': RPCHandler<null, null>,
|
|
45
49
|
readonly 'pikkuFunctionTypesSplit': RPCHandler<null, null>,
|
|
46
50
|
readonly 'pikkuFunctionTypes': RPCHandler<null, null>,
|
|
47
51
|
readonly 'pikkuFunctions': RPCHandler<null, PikkuFunctionsOutput>,
|
|
48
52
|
readonly 'pikkuServices': RPCHandler<null, null>,
|
|
49
|
-
readonly 'pikkuSchemas': RPCHandler<null, PikkuSchemasOutput>,
|
|
50
53
|
readonly 'pikkuHTTPMap': RPCHandler<null, null>,
|
|
51
54
|
readonly 'pikkuHTTP': RPCHandler<null, PikkuHTTPOutput>,
|
|
52
55
|
readonly 'pikkuHTTPTypes': RPCHandler<null, null>,
|
|
53
|
-
readonly 'pikkuOpenAPI': RPCHandler<null, null>,
|
|
54
56
|
readonly 'pikkuMCPJSON': RPCHandler<null, null>,
|
|
55
57
|
readonly 'pikkuMCPTypes': RPCHandler<null, null>,
|
|
56
58
|
readonly 'pikkuMCP': RPCHandler<null, PikkuMCPOutput>,
|
|
57
59
|
readonly 'pikkuMiddleware': RPCHandler<null, PikkuMiddlewareOutput>,
|
|
58
60
|
readonly 'pikkuPermissions': RPCHandler<null, PikkuPermissionsOutput>,
|
|
59
61
|
readonly 'pikkuQueueMap': RPCHandler<null, null>,
|
|
60
|
-
readonly 'pikkuQueueService': RPCHandler<null, null>,
|
|
61
62
|
readonly 'pikkuQueueTypes': RPCHandler<null, null>,
|
|
62
63
|
readonly 'pikkuQueue': RPCHandler<null, PikkuQueueOutput>,
|
|
63
64
|
readonly 'pikkuPublicRPC': RPCHandler<null, PikkuPublicRPCOutput>,
|
|
64
65
|
readonly 'pikkuRemoteRPC': RPCHandler<null, PikkuRemoteRPCOutput>,
|
|
65
|
-
readonly 'pikkuRPCClient': RPCHandler<null, null>,
|
|
66
66
|
readonly 'pikkuRPCInternalMap': RPCHandler<null, null>,
|
|
67
67
|
readonly 'pikkuRPCExposedMap': RPCHandler<null, null>,
|
|
68
68
|
readonly 'pikkuRPC': RPCHandler<null, PikkuRPCOutput>,
|
|
@@ -1,41 +1,41 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.11.
|
|
2
|
+
* This file was generated by @pikku/cli@0.11.1
|
|
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",
|
|
6
13
|
"all": "all",
|
|
7
14
|
"bootstrap": "bootstrap",
|
|
8
15
|
"watch": "watch",
|
|
9
|
-
"pikkuNext": "pikkuNext",
|
|
10
16
|
"pikkuChannels": "pikkuChannels",
|
|
11
17
|
"pikkuChannelTypes": "pikkuChannelTypes",
|
|
12
18
|
"pikkuChannelsMap": "pikkuChannelsMap",
|
|
13
|
-
"pikkuWebSocketTyped": "pikkuWebSocketTyped",
|
|
14
19
|
"pikkuCLIEntry": "pikkuCLIEntry",
|
|
15
20
|
"pikkuCLITypes": "pikkuCLITypes",
|
|
16
21
|
"pikkuCLI": "pikkuCLI",
|
|
17
|
-
"pikkuFetch": "pikkuFetch",
|
|
18
22
|
"pikkuFunctionTypesSplit": "pikkuFunctionTypesSplit",
|
|
19
23
|
"pikkuFunctionTypes": "pikkuFunctionTypes",
|
|
20
24
|
"pikkuFunctions": "pikkuFunctions",
|
|
21
25
|
"pikkuServices": "pikkuServices",
|
|
22
|
-
"pikkuSchemas": "pikkuSchemas",
|
|
23
26
|
"pikkuHTTPMap": "pikkuHTTPMap",
|
|
24
27
|
"pikkuHTTP": "pikkuHTTP",
|
|
25
28
|
"pikkuHTTPTypes": "pikkuHTTPTypes",
|
|
26
|
-
"pikkuOpenAPI": "pikkuOpenAPI",
|
|
27
29
|
"pikkuMCPJSON": "pikkuMCPJSON",
|
|
28
30
|
"pikkuMCPTypes": "pikkuMCPTypes",
|
|
29
31
|
"pikkuMCP": "pikkuMCP",
|
|
30
32
|
"pikkuMiddleware": "pikkuMiddleware",
|
|
31
33
|
"pikkuPermissions": "pikkuPermissions",
|
|
32
34
|
"pikkuQueueMap": "pikkuQueueMap",
|
|
33
|
-
"pikkuQueueService": "pikkuQueueService",
|
|
34
35
|
"pikkuQueueTypes": "pikkuQueueTypes",
|
|
35
36
|
"pikkuQueue": "pikkuQueue",
|
|
36
37
|
"pikkuPublicRPC": "pikkuPublicRPC",
|
|
37
38
|
"pikkuRemoteRPC": "pikkuRemoteRPC",
|
|
38
|
-
"pikkuRPCClient": "pikkuRPCClient",
|
|
39
39
|
"pikkuRPCInternalMap": "pikkuRPCInternalMap",
|
|
40
40
|
"pikkuRPCExposedMap": "pikkuRPCExposedMap",
|
|
41
41
|
"pikkuRPC": "pikkuRPC",
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.11.
|
|
2
|
+
* This file was generated by @pikku/cli@0.11.1
|
|
3
3
|
*/
|
|
4
4
|
import { addSchema } from '@pikku/core/schema'
|
|
5
5
|
|
|
6
|
+
import * as PikkuSchemasOutput from './schemas/PikkuSchemasOutput.schema.json' with { type: 'json' }
|
|
7
|
+
addSchema('PikkuSchemasOutput', PikkuSchemasOutput)
|
|
8
|
+
|
|
9
|
+
|
|
6
10
|
import * as PikkuChannelsOutput from './schemas/PikkuChannelsOutput.schema.json' with { type: 'json' }
|
|
7
11
|
addSchema('PikkuChannelsOutput', PikkuChannelsOutput)
|
|
8
12
|
|
|
@@ -15,10 +19,6 @@ import * as PikkuFunctionsOutput from './schemas/PikkuFunctionsOutput.schema.jso
|
|
|
15
19
|
addSchema('PikkuFunctionsOutput', PikkuFunctionsOutput)
|
|
16
20
|
|
|
17
21
|
|
|
18
|
-
import * as PikkuSchemasOutput from './schemas/PikkuSchemasOutput.schema.json' with { type: 'json' }
|
|
19
|
-
addSchema('PikkuSchemasOutput', PikkuSchemasOutput)
|
|
20
|
-
|
|
21
|
-
|
|
22
22
|
import * as PikkuHTTPOutput from './schemas/PikkuHTTPOutput.schema.json' with { type: 'json' }
|
|
23
23
|
addSchema('PikkuHTTPOutput', PikkuHTTPOutput)
|
|
24
24
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"$schema":"http://json-schema.org/draft-07/schema#","type":"boolean","enum":[false,true],"
|
|
1
|
+
{"$schema":"http://json-schema.org/draft-07/schema#","type":"boolean","enum":[false,true],"definitions":{}}
|
|
@@ -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,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.11.
|
|
2
|
+
* This file was generated by @pikku/cli@0.11.1
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
5
|
* This provides the structure needed for TypeScript to be aware of workflows and their input/output types
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
|
|
10
10
|
// Custom types are those that are defined directly within generics
|
|
11
11
|
// or are broken into simpler types
|
|
12
|
+
export type PikkuSchemasOutput = false | true
|
|
12
13
|
export type PikkuChannelsOutput = false | true
|
|
13
14
|
export type PikkuCLIOutput = false | true
|
|
14
15
|
export type PikkuFunctionsOutput = false | true
|
|
15
|
-
export type PikkuSchemasOutput = false | true
|
|
16
16
|
export type PikkuHTTPOutput = false | true
|
|
17
17
|
export type PikkuMCPOutput = false | true
|
|
18
18
|
export type PikkuMiddlewareOutput = false | true
|
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
## 0.11.0
|
|
2
2
|
|
|
3
|
+
## 0.11.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 1d064c5: feat: using pikku cli to drive the pikku cli
|
|
8
|
+
|
|
3
9
|
### Minor Changes
|
|
4
10
|
|
|
5
11
|
- Add workflow code generation (types, maps, workers, metadata)
|
|
6
12
|
- Add public RPC and remote RPC code generation
|
|
7
13
|
|
|
8
|
-
|
|
9
14
|
# @pikku/cli
|
|
10
15
|
|
|
11
16
|
## 0.10.2
|
package/bin/pikku.ts
CHANGED
|
@@ -3,30 +3,30 @@ 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
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
import { existsSync } from 'fs'
|
|
7
|
+
import { fileURLToPath } from 'url'
|
|
8
|
+
import { dirname, join } from 'path'
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
const __filename = fileURLToPath(import.meta.url)
|
|
11
|
+
const __dirname = dirname(__filename)
|
|
12
12
|
|
|
13
13
|
// Check if Pikku CLI is available
|
|
14
|
-
|
|
14
|
+
const pikkuCliPath = join(__dirname, '../.pikku/cli/pikku-cli.gen.js')
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
//
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
//
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
16
|
+
if (existsSync(pikkuCliPath)) {
|
|
17
|
+
try {
|
|
18
|
+
// Use the generated Pikku CLI
|
|
19
|
+
const { PikkuCLI } = await import(pikkuCliPath)
|
|
20
|
+
await PikkuCLI(process.argv.slice(2))
|
|
21
|
+
process.exit(0)
|
|
22
|
+
} catch (error) {
|
|
23
|
+
// If import fails, fall back to Commander.js
|
|
24
|
+
console.warn(
|
|
25
|
+
'Failed to load Pikku CLI, using fallback mode:',
|
|
26
|
+
error.message
|
|
27
|
+
)
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
30
|
|
|
31
31
|
// Fallback to Commander.js for initial setup
|
|
32
32
|
// Import bootstrap if it exists
|
package/build.sh
CHANGED
|
@@ -16,7 +16,7 @@ rm -rf .pikku/cli
|
|
|
16
16
|
# This relies on the published version being backwards compatible enough to generate
|
|
17
17
|
# types that work with the current codebase.
|
|
18
18
|
echo "Generating Pikku types using published @pikku/cli..."
|
|
19
|
-
npx -y @pikku/cli@
|
|
19
|
+
npx -y @pikku/cli@latest
|
|
20
20
|
|
|
21
21
|
# Step 3: Build the TypeScript source to dist
|
|
22
22
|
# Now that we have the generated types (from the published version),
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was generated by @pikku/cli@0.11.1
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* WebSocket channel backend for 'pikku' CLI commands
|
|
6
|
+
*/
|
|
7
|
+
import { wireChannel } from '../channel/pikku-channel-types.gen.js';
|
|
8
|
+
import { pikkuMiddleware } from '../function/pikku-function-types.gen.js';
|
|
9
|
+
import { all } from '../../src/functions/commands/all.js';
|
|
10
|
+
import { bootstrap } from '../../src/functions/commands/bootstrap.js';
|
|
11
|
+
import { watch } from '../../src/functions/commands/watch.js';
|
|
12
|
+
import { pikkuSchemas } from '../../src/functions/wirings/functions/schemas.js';
|
|
13
|
+
import { pikkuFetch } from '../../src/functions/wirings/fetch/index.js';
|
|
14
|
+
import { pikkuWebSocketTyped } from '../../src/functions/wirings/channels/pikku-command-websocket-typed.js';
|
|
15
|
+
import { pikkuRPCClient } from '../../src/functions/wirings/rpc/pikku-command-rpc-client.js';
|
|
16
|
+
import { pikkuQueueService } from '../../src/functions/wirings/queue/pikku-command-queue-service.js';
|
|
17
|
+
import { pikkuOpenAPI } from '../../src/functions/wirings/http/pikku-command-openapi.js';
|
|
18
|
+
import { pikkuNext } from '../../src/functions/runtimes/nextjs/pikku-command-nextjs.js';
|
|
19
|
+
// Middleware to close the channel after CLI command completes
|
|
20
|
+
const cliCloseOnComplete = pikkuMiddleware(async (services, { channel }, next) => {
|
|
21
|
+
const closeChannel = () => {
|
|
22
|
+
setTimeout(async () => {
|
|
23
|
+
try {
|
|
24
|
+
// This gives time for the response to be sent before closing
|
|
25
|
+
await channel?.close();
|
|
26
|
+
}
|
|
27
|
+
catch (err) {
|
|
28
|
+
// Ignore errors on close
|
|
29
|
+
}
|
|
30
|
+
}, 200);
|
|
31
|
+
};
|
|
32
|
+
try {
|
|
33
|
+
const result = await next();
|
|
34
|
+
closeChannel();
|
|
35
|
+
return result;
|
|
36
|
+
}
|
|
37
|
+
catch (error) {
|
|
38
|
+
closeChannel();
|
|
39
|
+
throw error;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
wireChannel({
|
|
43
|
+
name: 'pikku-cli',
|
|
44
|
+
route: '/cli/pikku',
|
|
45
|
+
auth: false,
|
|
46
|
+
onMessageWiring: {
|
|
47
|
+
command: {
|
|
48
|
+
'all': {
|
|
49
|
+
func: all,
|
|
50
|
+
middleware: [cliCloseOnComplete],
|
|
51
|
+
},
|
|
52
|
+
'bootstrap': {
|
|
53
|
+
func: bootstrap,
|
|
54
|
+
middleware: [cliCloseOnComplete],
|
|
55
|
+
},
|
|
56
|
+
'watch': {
|
|
57
|
+
func: watch,
|
|
58
|
+
middleware: [cliCloseOnComplete],
|
|
59
|
+
},
|
|
60
|
+
'schemas': {
|
|
61
|
+
func: pikkuSchemas,
|
|
62
|
+
middleware: [cliCloseOnComplete],
|
|
63
|
+
},
|
|
64
|
+
'fetch': {
|
|
65
|
+
func: pikkuFetch,
|
|
66
|
+
middleware: [cliCloseOnComplete],
|
|
67
|
+
},
|
|
68
|
+
'websocket': {
|
|
69
|
+
func: pikkuWebSocketTyped,
|
|
70
|
+
middleware: [cliCloseOnComplete],
|
|
71
|
+
},
|
|
72
|
+
'rpc': {
|
|
73
|
+
func: pikkuRPCClient,
|
|
74
|
+
middleware: [cliCloseOnComplete],
|
|
75
|
+
},
|
|
76
|
+
'queue-service': {
|
|
77
|
+
func: pikkuQueueService,
|
|
78
|
+
middleware: [cliCloseOnComplete],
|
|
79
|
+
},
|
|
80
|
+
'openapi': {
|
|
81
|
+
func: pikkuOpenAPI,
|
|
82
|
+
middleware: [cliCloseOnComplete],
|
|
83
|
+
},
|
|
84
|
+
'nextjs': {
|
|
85
|
+
func: pikkuNext,
|
|
86
|
+
middleware: [cliCloseOnComplete],
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
tags: ['cli', 'pikku']
|
|
91
|
+
});
|
|
@@ -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 Client (via WebSocket Channel)
|
|
7
|
+
* Executes CLI commands over a WebSocket connection
|
|
8
|
+
*/
|
|
9
|
+
export declare function PikkuCLIClient(ws: WebSocket, args?: string[]): Promise<void>;
|
|
10
|
+
export default PikkuCLIClient;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was generated by @pikku/cli@0.11.1
|
|
3
|
+
*/
|
|
4
|
+
import { executeCLIViaChannel } from '@pikku/core/cli/channel';
|
|
5
|
+
import { CorePikkuWebsocket } from '@pikku/websocket';
|
|
6
|
+
import '../pikku-bootstrap.gen.js';
|
|
7
|
+
import { clientCLIRenderer } from '../../src/services.js';
|
|
8
|
+
/**
|
|
9
|
+
* Pikku CLI Client (via WebSocket Channel)
|
|
10
|
+
* Executes CLI commands over a WebSocket connection
|
|
11
|
+
*/
|
|
12
|
+
export async function PikkuCLIClient(ws, args) {
|
|
13
|
+
// Create Pikku WebSocket wrapper
|
|
14
|
+
const pikkuWS = new CorePikkuWebsocket(ws);
|
|
15
|
+
// Register renderers for CLI commands
|
|
16
|
+
const renderers = {};
|
|
17
|
+
await executeCLIViaChannel({
|
|
18
|
+
programName: 'pikku',
|
|
19
|
+
pikkuWS,
|
|
20
|
+
args,
|
|
21
|
+
renderers,
|
|
22
|
+
defaultRenderer: clientCLIRenderer,
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
// Export as default for easy importing
|
|
26
|
+
export default PikkuCLIClient;
|
|
27
|
+
// For direct execution (if this file is run directly)
|
|
28
|
+
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
29
|
+
const url = process.env.PIKKU_WS_URL || 'ws://localhost:4002/cli/pikku';
|
|
30
|
+
// Create WebSocket instance
|
|
31
|
+
let WebSocketImpl;
|
|
32
|
+
if (typeof WebSocket !== 'undefined') {
|
|
33
|
+
WebSocketImpl = WebSocket;
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
// Node.js environment - dynamically import 'ws'
|
|
37
|
+
const wsModule = await import('ws');
|
|
38
|
+
WebSocketImpl = wsModule.default;
|
|
39
|
+
}
|
|
40
|
+
const ws = new WebSocketImpl(url);
|
|
41
|
+
PikkuCLIClient(ws, process.argv.slice(2)).catch(error => {
|
|
42
|
+
console.error('Fatal channel CLI error:', error);
|
|
43
|
+
// TODO: We get an error code even when it exists cleanly, investigate
|
|
44
|
+
// process.exit(1)
|
|
45
|
+
});
|
|
46
|
+
}
|