@pikku/cli 0.10.2 → 0.11.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 +1 -1
- package/.pikku/channel/pikku-channels-map.gen.d.ts +4 -1
- package/.pikku/channel/pikku-channels-meta.gen.ts +1 -1
- package/.pikku/channel/pikku-channels.gen.ts +1 -1
- package/.pikku/cli/pikku-cli-types.gen.ts +1 -1
- package/.pikku/cli/pikku-cli-wirings-meta.gen.ts +5 -2
- package/.pikku/cli/pikku-cli-wirings.gen.ts +1 -1
- package/.pikku/function/pikku-function-types.gen.ts +1 -1
- package/.pikku/function/pikku-functions-meta.gen.ts +110 -1
- package/.pikku/function/pikku-functions-meta.min.gen.ts +26 -1
- 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 +4 -1
- 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 +6 -1
- 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 +4 -1
- 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 +12 -2
- package/.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts +17 -2
- package/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.ts +7 -2
- 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 +13 -1
- package/.pikku/schemas/schemas/PikkuCLIConfig.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/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 +8 -0
- 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-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 +5 -2
- package/dist/.pikku/cli/pikku-cli-wirings.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli-wirings.gen.js +1 -1
- 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 +110 -1
- package/dist/.pikku/function/pikku-functions-meta.min.gen.js +26 -1
- 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 +8 -2
- package/dist/.pikku/pikku-services.gen.js +7 -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 +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 +7 -2
- 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 +7 -1
- package/dist/.pikku/schemas/schemas/PikkuCLIConfig.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/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/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.js +1 -1
- 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/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 +1 -1
- 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,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.
|
|
2
|
+
* This file was generated by @pikku/cli@0.11.0
|
|
3
3
|
*/
|
|
4
4
|
/* Import and register functions used by RPCs */
|
|
5
5
|
import { addFunction } from '@pikku/core';
|
|
@@ -28,6 +28,7 @@ import { pikkuQueue } from '../../src/functions/wirings/queue/pikku-queue.js';
|
|
|
28
28
|
import { pikkuQueueMap } from '../../src/functions/wirings/queue/pikku-queue-map.js';
|
|
29
29
|
import { pikkuQueueService } from '../../src/functions/wirings/queue/pikku-command-queue-service.js';
|
|
30
30
|
import { pikkuQueueTypes } from '../../src/functions/wirings/queue/pikku-command-queue-types.js';
|
|
31
|
+
import { pikkuRemoteRPC } from '../../src/functions/wirings/rpc/pikku-command-remote-rpc.js';
|
|
31
32
|
import { pikkuRPC } from '../../src/functions/wirings/rpc/pikku-command-rpc.js';
|
|
32
33
|
import { pikkuRPCClient } from '../../src/functions/wirings/rpc/pikku-command-rpc-client.js';
|
|
33
34
|
import { pikkuRPCExposedMap } from '../../src/functions/wirings/rpc/pikku-command-rpc-map.js';
|
|
@@ -37,6 +38,9 @@ import { pikkuSchedulerTypes } from '../../src/functions/wirings/scheduler/pikku
|
|
|
37
38
|
import { pikkuSchemas } from '../../src/functions/wirings/functions/schemas.js';
|
|
38
39
|
import { pikkuServices } from '../../src/functions/wirings/functions/pikku-command-services.js';
|
|
39
40
|
import { pikkuWebSocketTyped } from '../../src/functions/wirings/channels/pikku-command-websocket-typed.js';
|
|
41
|
+
import { pikkuWorkflow } from '../../src/functions/wirings/workflow/pikku-command-workflow.js';
|
|
42
|
+
import { pikkuWorkflowMap } from '../../src/functions/wirings/workflow/pikku-command-workflow-map.js';
|
|
43
|
+
import { pikkuWorkflowTypes } from '../../src/functions/wirings/workflow/pikku-command-workflow-types.js';
|
|
40
44
|
import { watch } from '../../src/functions/commands/watch.js';
|
|
41
45
|
addFunction('all', all);
|
|
42
46
|
addFunction('pikkuChannels', pikkuChannels);
|
|
@@ -63,6 +67,7 @@ addFunction('pikkuQueue', pikkuQueue);
|
|
|
63
67
|
addFunction('pikkuQueueMap', pikkuQueueMap);
|
|
64
68
|
addFunction('pikkuQueueService', pikkuQueueService);
|
|
65
69
|
addFunction('pikkuQueueTypes', pikkuQueueTypes);
|
|
70
|
+
addFunction('pikkuRemoteRPC', pikkuRemoteRPC);
|
|
66
71
|
addFunction('pikkuRPC', pikkuRPC);
|
|
67
72
|
addFunction('pikkuRPCClient', pikkuRPCClient);
|
|
68
73
|
addFunction('pikkuRPCExposedMap', pikkuRPCExposedMap);
|
|
@@ -72,4 +77,7 @@ addFunction('pikkuSchedulerTypes', pikkuSchedulerTypes);
|
|
|
72
77
|
addFunction('pikkuSchemas', pikkuSchemas);
|
|
73
78
|
addFunction('pikkuServices', pikkuServices);
|
|
74
79
|
addFunction('pikkuWebSocketTyped', pikkuWebSocketTyped);
|
|
80
|
+
addFunction('pikkuWorkflow', pikkuWorkflow);
|
|
81
|
+
addFunction('pikkuWorkflowMap', pikkuWorkflowMap);
|
|
82
|
+
addFunction('pikkuWorkflowTypes', pikkuWorkflowTypes);
|
|
75
83
|
addFunction('watch', watch);
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.
|
|
2
|
+
* This file was generated by @pikku/cli@0.11.0
|
|
3
3
|
*/
|
|
4
4
|
import './cli/pikku-cli-wirings-meta.gen.js';
|
|
5
5
|
import './mcp/pikku-mcp-wirings-meta.gen.js';
|
|
6
6
|
import './channel/pikku-channels-meta.gen.js';
|
|
7
7
|
import './queue/pikku-queue-workers-wirings-meta.gen.js';
|
|
8
|
+
import './workflow/pikku-workflow-wirings-meta.gen.js';
|
|
8
9
|
import './scheduler/pikku-schedulers-wirings-meta.gen.js';
|
|
9
10
|
import './http/pikku-http-wirings-meta.gen.js';
|
|
10
11
|
import './rpc/pikku-rpc-wirings-meta.internal.gen.js';
|
|
@@ -13,6 +14,8 @@ import './function/pikku-functions.gen.js';
|
|
|
13
14
|
import './schemas/register.gen.js';
|
|
14
15
|
import './http/pikku-http-wirings.gen.js';
|
|
15
16
|
import './scheduler/pikku-schedulers-wirings.gen.js';
|
|
17
|
+
import './workflow/pikku-workflow-wirings.gen.js';
|
|
18
|
+
import './rpc/pikku-remote-rpc-workers.gen.js';
|
|
16
19
|
import './queue/pikku-queue-workers-wirings.gen.js';
|
|
17
20
|
import './channel/pikku-channels.gen.js';
|
|
18
21
|
import './mcp/pikku-mcp-wirings.gen.js';
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.
|
|
2
|
+
* This file was generated by @pikku/cli@0.11.0
|
|
3
3
|
*/
|
|
4
4
|
import './cli/pikku-cli-wirings-meta.gen.js';
|
|
5
5
|
import './mcp/pikku-mcp-wirings-meta.gen.js';
|
|
6
6
|
import './channel/pikku-channels-meta.gen.js';
|
|
7
7
|
import './queue/pikku-queue-workers-wirings-meta.gen.js';
|
|
8
|
+
import './workflow/pikku-workflow-wirings-meta.gen.js';
|
|
8
9
|
import './scheduler/pikku-schedulers-wirings-meta.gen.js';
|
|
9
10
|
import './http/pikku-http-wirings-meta.gen.js';
|
|
10
11
|
import './rpc/pikku-rpc-wirings-meta.internal.gen.js';
|
|
@@ -13,6 +14,8 @@ import './function/pikku-functions.gen.js';
|
|
|
13
14
|
import './schemas/register.gen.js';
|
|
14
15
|
import './http/pikku-http-wirings.gen.js';
|
|
15
16
|
import './scheduler/pikku-schedulers-wirings.gen.js';
|
|
17
|
+
import './workflow/pikku-workflow-wirings.gen.js';
|
|
18
|
+
import './rpc/pikku-remote-rpc-workers.gen.js';
|
|
16
19
|
import './queue/pikku-queue-workers-wirings.gen.js';
|
|
17
20
|
import './channel/pikku-channels.gen.js';
|
|
18
21
|
import './mcp/pikku-mcp-wirings.gen.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.
|
|
2
|
+
* This file was generated by @pikku/cli@0.11.0
|
|
3
3
|
*/
|
|
4
4
|
import type { SingletonServices } from '../types/application-types.d.js';
|
|
5
5
|
import type { Services } from '../types/application-types.d.js';
|
|
@@ -8,9 +8,15 @@ export declare const requiredSingletonServices: {
|
|
|
8
8
|
readonly getInspectorState: false;
|
|
9
9
|
readonly jwt: false;
|
|
10
10
|
readonly logger: true;
|
|
11
|
+
readonly queueService: false;
|
|
12
|
+
readonly schedulerService: false;
|
|
11
13
|
readonly schema: true;
|
|
12
14
|
readonly variables: true;
|
|
15
|
+
readonly workflowService: false;
|
|
16
|
+
};
|
|
17
|
+
export declare const requiredSessionServices: {
|
|
18
|
+
readonly workflow: false;
|
|
19
|
+
readonly workflowStep: false;
|
|
13
20
|
};
|
|
14
|
-
export declare const requiredSessionServices: {};
|
|
15
21
|
export type RequiredSingletonServices = Pick<SingletonServices, 'config' | 'logger' | 'schema' | 'variables'> & Partial<Omit<SingletonServices, 'config' | 'logger' | 'schema' | 'variables'>>;
|
|
16
22
|
export type RequiredSessionServices = Partial<Services>;
|
|
@@ -4,8 +4,14 @@ export const requiredSingletonServices = {
|
|
|
4
4
|
'getInspectorState': false,
|
|
5
5
|
'jwt': false,
|
|
6
6
|
'logger': true,
|
|
7
|
+
'queueService': false,
|
|
8
|
+
'schedulerService': false,
|
|
7
9
|
'schema': true,
|
|
8
10
|
'variables': true,
|
|
11
|
+
'workflowService': false,
|
|
9
12
|
};
|
|
10
13
|
// Session services map: true if required, false if available but unused
|
|
11
|
-
export const requiredSessionServices = {
|
|
14
|
+
export const requiredSessionServices = {
|
|
15
|
+
'workflow': false,
|
|
16
|
+
'workflowStep': false,
|
|
17
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.
|
|
2
|
+
* This file was generated by @pikku/cli@0.11.0
|
|
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,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.
|
|
2
|
+
* This file was generated by @pikku/cli@0.11.0
|
|
3
3
|
*/
|
|
4
4
|
import { pikkuState } from '@pikku/core';
|
|
5
|
-
pikkuState('queue', 'meta', {
|
|
5
|
+
pikkuState('queue', 'meta', {
|
|
6
|
+
"pikku-remote-internal-rpc": {
|
|
7
|
+
"pikkuFuncName": "pikkuRemoteInternalRPC",
|
|
8
|
+
"queueName": "pikku-remote-internal-rpc"
|
|
9
|
+
}
|
|
10
|
+
});
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generic remote RPC worker that invokes any internal RPC by name
|
|
3
|
+
* This is used for executing internal RPCs via a queue or HTTP (e.g., scheduled tasks, background jobs, internal services)
|
|
4
|
+
*/
|
|
5
|
+
export declare const pikkuRemoteInternalRPC: import("@pikku/core").CorePikkuFunctionConfig<import("../pikku-types.gen.js").PikkuFunctionSessionless<{
|
|
6
|
+
rpcName: string;
|
|
7
|
+
data?: any;
|
|
8
|
+
}, any, null, null, Omit<import("../../types/application-types.js").Services, "rpc" | "channel" | "mcp"> & {
|
|
9
|
+
rpc: import("./pikku-rpc-wirings-map.internal.gen.js").TypedPikkuRPC;
|
|
10
|
+
} & {
|
|
11
|
+
channel?: import("@pikku/core").PikkuChannel<unknown, any> | undefined;
|
|
12
|
+
} & {
|
|
13
|
+
mcp?: import("@pikku/core").PikkuMCP;
|
|
14
|
+
}>, import("../pikku-types.gen.js").PikkuPermission<{
|
|
15
|
+
rpcName: string;
|
|
16
|
+
data?: any;
|
|
17
|
+
}, import("../../types/application-types.js").Services>, import("../pikku-types.gen.js").PikkuMiddleware<import("../../types/application-types.js").SingletonServices>>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was generated by @pikku/cli@0.11.0
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Auto-generated remote internal RPC queue worker and HTTP endpoint
|
|
6
|
+
* Do not edit manually - regenerate with 'npx pikku'
|
|
7
|
+
*/
|
|
8
|
+
import { pikkuSessionlessFunc, wireQueueWorker } from '../pikku-types.gen.js';
|
|
9
|
+
/**
|
|
10
|
+
* Generic remote RPC worker that invokes any internal RPC by name
|
|
11
|
+
* This is used for executing internal RPCs via a queue or HTTP (e.g., scheduled tasks, background jobs, internal services)
|
|
12
|
+
*/
|
|
13
|
+
export const pikkuRemoteInternalRPC = pikkuSessionlessFunc({
|
|
14
|
+
func: async ({ rpc }, { rpcName, data }) => {
|
|
15
|
+
return await rpc.invoke(rpcName, data);
|
|
16
|
+
},
|
|
17
|
+
internal: true,
|
|
18
|
+
});
|
|
19
|
+
wireQueueWorker({
|
|
20
|
+
queueName: 'pikku-remote-internal-rpc',
|
|
21
|
+
func: pikkuRemoteInternalRPC,
|
|
22
|
+
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.
|
|
2
|
+
* This file was generated by @pikku/cli@0.11.0
|
|
3
3
|
*/
|
|
4
4
|
import { pikkuState } from '@pikku/core';
|
|
5
5
|
pikkuState('rpc', 'meta', {
|
|
@@ -33,10 +33,15 @@ pikkuState('rpc', 'meta', {
|
|
|
33
33
|
"pikkuQueueService": "pikkuQueueService",
|
|
34
34
|
"pikkuQueueTypes": "pikkuQueueTypes",
|
|
35
35
|
"pikkuQueue": "pikkuQueue",
|
|
36
|
+
"pikkuPublicRPC": "pikkuPublicRPC",
|
|
37
|
+
"pikkuRemoteRPC": "pikkuRemoteRPC",
|
|
36
38
|
"pikkuRPCClient": "pikkuRPCClient",
|
|
37
39
|
"pikkuRPCInternalMap": "pikkuRPCInternalMap",
|
|
38
40
|
"pikkuRPCExposedMap": "pikkuRPCExposedMap",
|
|
39
41
|
"pikkuRPC": "pikkuRPC",
|
|
40
42
|
"pikkuSchedulerTypes": "pikkuSchedulerTypes",
|
|
41
|
-
"pikkuScheduler": "pikkuScheduler"
|
|
43
|
+
"pikkuScheduler": "pikkuScheduler",
|
|
44
|
+
"pikkuWorkflowMap": "pikkuWorkflowMap",
|
|
45
|
+
"pikkuWorkflowTypes": "pikkuWorkflowTypes",
|
|
46
|
+
"pikkuWorkflow": "pikkuWorkflow"
|
|
42
47
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.
|
|
2
|
+
* This file was generated by @pikku/cli@0.11.0
|
|
3
3
|
*/
|
|
4
4
|
import { addSchema } from '@pikku/core/schema';
|
|
5
5
|
import * as PikkuChannelsOutput from './schemas/PikkuChannelsOutput.schema.json' with { type: 'json' };
|
|
@@ -20,9 +20,15 @@ import * as PikkuPermissionsOutput from './schemas/PikkuPermissionsOutput.schema
|
|
|
20
20
|
addSchema('PikkuPermissionsOutput', PikkuPermissionsOutput);
|
|
21
21
|
import * as PikkuQueueOutput from './schemas/PikkuQueueOutput.schema.json' with { type: 'json' };
|
|
22
22
|
addSchema('PikkuQueueOutput', PikkuQueueOutput);
|
|
23
|
+
import * as PikkuPublicRPCOutput from './schemas/PikkuPublicRPCOutput.schema.json' with { type: 'json' };
|
|
24
|
+
addSchema('PikkuPublicRPCOutput', PikkuPublicRPCOutput);
|
|
25
|
+
import * as PikkuRemoteRPCOutput from './schemas/PikkuRemoteRPCOutput.schema.json' with { type: 'json' };
|
|
26
|
+
addSchema('PikkuRemoteRPCOutput', PikkuRemoteRPCOutput);
|
|
23
27
|
import * as PikkuRPCOutput from './schemas/PikkuRPCOutput.schema.json' with { type: 'json' };
|
|
24
28
|
addSchema('PikkuRPCOutput', PikkuRPCOutput);
|
|
25
29
|
import * as PikkuSchedulerOutput from './schemas/PikkuSchedulerOutput.schema.json' with { type: 'json' };
|
|
26
30
|
addSchema('PikkuSchedulerOutput', PikkuSchedulerOutput);
|
|
31
|
+
import * as PikkuWorkflowOutput from './schemas/PikkuWorkflowOutput.schema.json' with { type: 'json' };
|
|
32
|
+
addSchema('PikkuWorkflowOutput', PikkuWorkflowOutput);
|
|
27
33
|
import * as PikkuCLIConfig from './schemas/PikkuCLIConfig.schema.json' with { type: 'json' };
|
|
28
34
|
addSchema('PikkuCLIConfig', PikkuCLIConfig);
|
|
@@ -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" } }, "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
|
+
{ "$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" }, "workflowsWiringFile": { "type": "string" }, "workflowsWiringMetaFile": { "type": "string" }, "workflowsWorkersFile": { "type": "string" }, "workflowMapDeclarationFile": { "type": "string" }, "workflowTypesFile": { "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 }, "workflows": { "anyOf": [{ "type": "object", "properties": { "singleQueue": { "type": "boolean", "const": true }, "path": { "type": "string" }, "orchestratorQueue": { "type": "string" }, "workerQueue": { "type": "string" } }, "required": ["singleQueue", "path"], "additionalProperties": false }, { "type": "object", "properties": { "singleQueue": { "type": "boolean", "const": false }, "dir": { "type": "string" }, "orchestratorQueuePrefix": { "type": "string" }, "workerQueuePrefix": { "type": "string" } }, "required": ["singleQueue", "dir"], "additionalProperties": false }] }, "rpc": { "type": "object", "properties": { "remoteRpcWorkersPath": { "type": "string" }, "publicRpcPath": { "type": "string" } }, "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", "workflowMapDeclarationFile", "workflowTypesFile", "workflowsWiringFile", "workflowsWiringMetaFile", "workflowsWorkersFile"], "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 } } }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "$schema": "http://json-schema.org/draft-07/schema#", "type": "boolean", "enum": [false, true], "definitions": {} }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "rpcName": { "type": "string" }, "data": {} }, "required": ["rpcName"], "additionalProperties": false, "definitions": {} }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "$schema": "http://json-schema.org/draft-07/schema#", "type": "boolean", "enum": [false, true], "definitions": {} }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "$schema": "http://json-schema.org/draft-07/schema#", "type": "boolean", "enum": [false, true], "definitions": {} }
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was generated by @pikku/cli@0.11.0
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Workflow-specific type definitions for tree-shaking optimization
|
|
6
|
+
*/
|
|
7
|
+
import { CoreWorkflow, PikkuWorkflowInteraction, WorkflowStepOptions } from '@pikku/core/workflow';
|
|
8
|
+
import { CorePikkuFunctionConfig, CorePikkuFunctionSessionless } from '@pikku/core';
|
|
9
|
+
import type { PikkuPermission, PikkuMiddleware } from '../function/pikku-function-types.gen.js';
|
|
10
|
+
import type { UserSession, SingletonServices } from '../../types/application-types.d.js';
|
|
11
|
+
import type { TypedPikkuRPC, RPCMap } from '../rpc/pikku-rpc-wirings-map.internal.gen.d.js';
|
|
12
|
+
/**
|
|
13
|
+
* Type definition for workflows that orchestrate multi-step processes.
|
|
14
|
+
* Workflows support both inline and remote execution modes with step caching.
|
|
15
|
+
*/
|
|
16
|
+
type WorkflowWiring = CoreWorkflow<CorePikkuFunctionConfig<PikkuFunctionWorkflow<any, any>, PikkuPermission<any>, PikkuMiddleware>>;
|
|
17
|
+
/**
|
|
18
|
+
* Typed workflow interaction with RPC awareness
|
|
19
|
+
* Provides type-safe workflow.do() for RPC steps
|
|
20
|
+
*/
|
|
21
|
+
export interface TypedWorkflow extends PikkuWorkflowInteraction {
|
|
22
|
+
/**
|
|
23
|
+
* Execute a workflow step with RPC invocation (typed based on available RPCs)
|
|
24
|
+
* @template K - RPC name from the RPC map
|
|
25
|
+
*/
|
|
26
|
+
do<K extends keyof RPCMap>(stepName: string, rpcName: K, data: RPCMap[K]['input'], options?: WorkflowStepOptions): Promise<RPCMap[K]['output']>;
|
|
27
|
+
/**
|
|
28
|
+
* Execute a workflow step with inline function
|
|
29
|
+
* @template T - Return type of the inline function
|
|
30
|
+
*/
|
|
31
|
+
do<T>(stepName: string, fn: () => T | Promise<T>, options?: WorkflowStepOptions): Promise<T>;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Workflow function type with typed workflow service
|
|
35
|
+
* Includes the workflow interaction object with typed RPC methods
|
|
36
|
+
*/
|
|
37
|
+
export type PikkuFunctionWorkflow<In = unknown, Out = never> = CorePikkuFunctionSessionless<In, Out, null, SingletonServices & {
|
|
38
|
+
rpc: TypedPikkuRPC;
|
|
39
|
+
workflow: TypedWorkflow;
|
|
40
|
+
}, UserSession>;
|
|
41
|
+
/**
|
|
42
|
+
* Creates a workflow function with typed input and output.
|
|
43
|
+
* Workflow functions have access to the workflow interaction object for step execution.
|
|
44
|
+
*
|
|
45
|
+
* @template In - Input type for the workflow
|
|
46
|
+
* @template Out - Output type for the workflow
|
|
47
|
+
* @param func - Function definition, either direct function or configuration object
|
|
48
|
+
* @returns The normalized configuration object
|
|
49
|
+
*/
|
|
50
|
+
export declare const pikkuWorkflowFunc: <In, Out = unknown>(func: PikkuFunctionWorkflow<In, Out> | CorePikkuFunctionConfig<PikkuFunctionWorkflow<In, Out>, PikkuPermission<In>, PikkuMiddleware>) => CorePikkuFunctionConfig<PikkuFunctionWorkflow<In, Out>, PikkuPermission<In>, PikkuMiddleware>;
|
|
51
|
+
/**
|
|
52
|
+
* Registers a workflow with the Pikku framework.
|
|
53
|
+
* Workflows can run in 'inline' (synchronous) or 'remote' (queue-based) execution modes.
|
|
54
|
+
*
|
|
55
|
+
* @param workflow - Workflow definition with name, execution mode, and handler function
|
|
56
|
+
*/
|
|
57
|
+
export declare const wireWorkflow: (workflow: WorkflowWiring) => void;
|
|
58
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was generated by @pikku/cli@0.11.0
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Workflow-specific type definitions for tree-shaking optimization
|
|
6
|
+
*/
|
|
7
|
+
import { wireWorkflow as wireWorkflowCore } from '@pikku/core/workflow';
|
|
8
|
+
/**
|
|
9
|
+
* Creates a workflow function with typed input and output.
|
|
10
|
+
* Workflow functions have access to the workflow interaction object for step execution.
|
|
11
|
+
*
|
|
12
|
+
* @template In - Input type for the workflow
|
|
13
|
+
* @template Out - Output type for the workflow
|
|
14
|
+
* @param func - Function definition, either direct function or configuration object
|
|
15
|
+
* @returns The normalized configuration object
|
|
16
|
+
*/
|
|
17
|
+
export const pikkuWorkflowFunc = (func) => {
|
|
18
|
+
return typeof func === 'function' ? { func } : func;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Registers a workflow with the Pikku framework.
|
|
22
|
+
* Workflows can run in 'inline' (synchronous) or 'remote' (queue-based) execution modes.
|
|
23
|
+
*
|
|
24
|
+
* @param workflow - Workflow definition with name, execution mode, and handler function
|
|
25
|
+
*/
|
|
26
|
+
export const wireWorkflow = (workflow) => {
|
|
27
|
+
wireWorkflowCore(workflow);
|
|
28
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|