@pikku/cli 0.11.1 → 0.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.pikku/channel/pikku-channel-types.gen.ts +11 -12
- package/.pikku/channel/pikku-channels-map.gen.d.ts +8 -8
- 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 +2 -2
- package/.pikku/cli/pikku-cli-client.gen.ts +1 -3
- package/.pikku/cli/pikku-cli-types.gen.ts +3 -3
- package/.pikku/cli/pikku-cli-wirings-meta.gen.json +146 -0
- package/.pikku/cli/pikku-cli-wirings-meta.gen.ts +4 -157
- package/.pikku/cli/pikku-cli-wirings.gen.ts +3 -3
- package/.pikku/cli/pikku-cli.gen.ts +3 -3
- package/.pikku/function/pikku-function-types.gen.ts +49 -63
- package/.pikku/function/pikku-functions-meta.gen.json +988 -0
- package/.pikku/function/pikku-functions-meta.gen.ts +4 -970
- package/.pikku/function/pikku-functions-meta.min.gen.json +212 -0
- package/.pikku/function/pikku-functions-meta.min.gen.ts +4 -209
- package/.pikku/http/pikku-http-types.gen.ts +2 -2
- package/.pikku/http/pikku-http-wirings-map.gen.d.ts +8 -8
- 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 +13 -13
- package/.pikku/mcp/pikku-mcp-wirings-meta.gen.json +5 -0
- package/.pikku/mcp/pikku-mcp-wirings-meta.gen.ts +6 -4
- package/.pikku/mcp/pikku-mcp-wirings.gen.ts +1 -1
- package/.pikku/pikku-bootstrap.gen.ts +1 -4
- package/.pikku/pikku-services.gen.ts +4 -6
- package/.pikku/pikku-types.gen.ts +1 -1
- package/.pikku/pikku-websocket.gen.ts +1 -1
- package/.pikku/queue/pikku-queue-types.gen.ts +2 -2
- package/.pikku/queue/pikku-queue-workers-wirings-map.gen.d.ts +8 -8
- package/.pikku/queue/pikku-queue-workers-wirings-meta.gen.json +1 -0
- package/.pikku/queue/pikku-queue-workers-wirings-meta.gen.ts +5 -7
- package/.pikku/queue/pikku-queue-workers-wirings.gen.ts +1 -1
- package/.pikku/rpc/pikku-remote-rpc-workers.gen.ts +2 -2
- package/.pikku/rpc/pikku-rpc-wirings-map.gen.d.ts +8 -8
- package/.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts +34 -33
- package/.pikku/scheduler/pikku-scheduler-types.gen.ts +2 -2
- package/.pikku/scheduler/pikku-schedulers-wirings-meta.gen.json +1 -0
- package/.pikku/scheduler/pikku-schedulers-wirings-meta.gen.ts +5 -2
- package/.pikku/scheduler/pikku-schedulers-wirings.gen.ts +1 -1
- package/.pikku/schemas/register.gen.ts +25 -25
- package/.pikku/schemas/schemas/PikkuCLIConfig.schema.json +1 -1
- package/.pikku/services/config.gen.json +99 -0
- package/.pikku/services/getInspectorState.gen.json +10 -0
- package/.pikku/services/jwt.gen.json +13 -0
- package/.pikku/services/logger.gen.json +25 -0
- package/.pikku/services/queueService.gen.json +14 -0
- package/.pikku/services/schedulerService.gen.json +17 -0
- package/.pikku/services/schema.gen.json +14 -0
- package/.pikku/services/variables.gen.json +13 -0
- package/.pikku/services/workflowService.gen.json +31 -0
- package/.pikku/workflow/pikku-workflow-map.gen.d.ts +8 -8
- package/.pikku/workflow/pikku-workflow-types.gen.ts +36 -31
- package/.pikku/workflow/pikku-workflow-wirings-meta.gen.json +1 -0
- package/.pikku/workflow/pikku-workflow-wirings-meta.gen.ts +5 -2
- package/.pikku/workflow/pikku-workflow-wirings.gen.ts +6 -2
- package/CHANGELOG.md +21 -0
- package/bin/pikku.ts +6 -32
- package/build.sh +53 -31
- package/cli.schema.json +1 -1
- package/dist/.pikku/channel/pikku-channel-types.gen.d.ts +6 -7
- 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.js +2 -2
- package/dist/.pikku/cli/pikku-cli-client.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli-client.gen.js +1 -3
- package/dist/.pikku/cli/pikku-cli-types.gen.d.ts +3 -3
- package/dist/.pikku/cli/pikku-cli-types.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.js +3 -157
- package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.json +146 -0
- package/dist/.pikku/cli/pikku-cli-wirings.gen.d.ts +2 -2
- package/dist/.pikku/cli/pikku-cli-wirings.gen.js +2 -2
- package/dist/.pikku/cli/pikku-cli.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli.gen.js +3 -3
- package/dist/.pikku/function/pikku-function-types.gen.d.ts +29 -79
- package/dist/.pikku/function/pikku-function-types.gen.js +19 -15
- package/dist/.pikku/function/pikku-functions-meta.gen.js +3 -969
- package/dist/.pikku/function/pikku-functions-meta.gen.json +988 -0
- package/dist/.pikku/function/pikku-functions-meta.min.gen.js +3 -208
- package/dist/.pikku/function/pikku-functions-meta.min.gen.json +212 -0
- package/dist/.pikku/http/pikku-http-types.gen.d.ts +2 -2
- 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 +13 -13
- package/dist/.pikku/mcp/pikku-mcp-types.gen.js +1 -1
- package/dist/.pikku/mcp/pikku-mcp-wirings-meta.gen.js +5 -4
- package/dist/.pikku/mcp/pikku-mcp-wirings-meta.gen.json +5 -0
- 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 -4
- package/dist/.pikku/pikku-bootstrap.gen.js +1 -4
- package/dist/.pikku/pikku-services.gen.d.ts +3 -6
- package/dist/.pikku/pikku-services.gen.js +2 -5
- 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 +2 -2
- package/dist/.pikku/queue/pikku-queue-types.gen.js +1 -1
- package/dist/.pikku/queue/pikku-queue-workers-wirings-meta.gen.js +3 -7
- package/dist/.pikku/queue/pikku-queue-workers-wirings-meta.gen.json +1 -0
- 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 +6 -9
- package/dist/.pikku/rpc/pikku-remote-rpc-workers.gen.js +2 -2
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.d.ts +2 -2
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js +1 -1
- package/dist/.pikku/scheduler/pikku-schedulers-wirings-meta.gen.js +3 -2
- package/dist/.pikku/scheduler/pikku-schedulers-wirings-meta.gen.json +1 -0
- 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 +15 -15
- package/dist/.pikku/schemas/schemas/PikkuCLIConfig.schema.json +1 -1
- package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +29 -25
- package/dist/.pikku/workflow/pikku-workflow-types.gen.js +22 -8
- package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +3 -2
- package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.json +1 -0
- package/dist/.pikku/workflow/pikku-workflow-wirings.gen.d.ts +6 -2
- package/dist/.pikku/workflow/pikku-workflow-wirings.gen.js +6 -3
- package/dist/bin/pikku.js +5 -26
- package/dist/src/cli.wiring.js +4 -4
- package/dist/src/functions/commands/all.js +82 -42
- package/dist/src/functions/commands/bootstrap.js +22 -10
- package/dist/src/functions/commands/watch.js +6 -3
- package/dist/src/functions/runtimes/nextjs/pikku-command-nextjs.js +12 -7
- 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 +42 -4
- package/dist/src/functions/runtimes/nextjs/serialize-nextjs-http-wrapper.d.ts +1 -1
- package/dist/src/functions/runtimes/nextjs/serialize-nextjs-http-wrapper.js +40 -2
- package/dist/src/functions/wirings/channels/pikku-channels.js +9 -2
- package/dist/src/functions/wirings/channels/serialize-channel-types.js +10 -11
- package/dist/src/functions/wirings/cli/pikku-command-cli-entry.js +4 -4
- package/dist/src/functions/wirings/cli/pikku-command-cli-types.js +1 -1
- package/dist/src/functions/wirings/cli/pikku-command-cli.js +9 -3
- package/dist/src/functions/wirings/cli/serialize-channel-cli.js +1 -1
- package/dist/src/functions/wirings/cli/serialize-cli-types.js +2 -2
- package/dist/src/functions/wirings/cli/serialize-local-cli-bootstrap.d.ts +1 -1
- package/dist/src/functions/wirings/cli/serialize-local-cli-bootstrap.js +4 -4
- package/dist/src/functions/wirings/functions/pikku-command-function-types-split.js +4 -4
- package/dist/src/functions/wirings/functions/pikku-command-functions.js +15 -5
- package/dist/src/functions/wirings/functions/pikku-command-services.d.ts +1 -1
- package/dist/src/functions/wirings/functions/pikku-command-services.js +23 -23
- package/dist/src/functions/wirings/functions/schemas.js +1 -1
- package/dist/src/functions/wirings/functions/serialize-function-types.d.ts +1 -1
- package/dist/src/functions/wirings/functions/serialize-function-types.js +50 -64
- package/dist/src/functions/wirings/http/openapi-spec-generator.js +4 -4
- package/dist/src/functions/wirings/http/pikku-http-routes.js +9 -2
- package/dist/src/functions/wirings/http/serialize-http-types.js +1 -1
- package/dist/src/functions/wirings/mcp/pikku-command-mcp.js +18 -4
- package/dist/src/functions/wirings/mcp/serialize-mcp-types.js +12 -12
- package/dist/src/functions/wirings/middleware/pikku-command-middleware.js +26 -2
- package/dist/src/functions/wirings/middleware/serialize-middleware-groups-meta.d.ts +5 -2
- package/dist/src/functions/wirings/middleware/serialize-middleware-groups-meta.js +5 -13
- package/dist/src/functions/wirings/queue/pikku-command-queue.js +9 -3
- package/dist/src/functions/wirings/queue/pikku-queue.js +9 -3
- package/dist/src/functions/wirings/queue/serialize-queue-meta.d.ts +2 -1
- package/dist/src/functions/wirings/queue/serialize-queue-meta.js +10 -1
- package/dist/src/functions/wirings/queue/serialize-queue-types.js +1 -1
- package/dist/src/functions/wirings/rpc/pikku-command-rpc.js +9 -2
- package/dist/src/functions/wirings/rpc/serialize-public-rpc.js +11 -4
- package/dist/src/functions/wirings/rpc/serialize-remote-rpc.js +1 -1
- package/dist/src/functions/wirings/rpc/serialize-rpc-wrapper.js +3 -3
- package/dist/src/functions/wirings/scheduler/pikku-command-scheduler.js +6 -3
- package/dist/src/functions/wirings/scheduler/serialize-scheduler-meta.d.ts +2 -1
- package/dist/src/functions/wirings/scheduler/serialize-scheduler-meta.js +11 -1
- package/dist/src/functions/wirings/scheduler/serialize-scheduler-types.js +1 -1
- package/dist/src/functions/wirings/services/pikku-command-service-metadata.d.ts +1 -0
- package/dist/src/functions/wirings/services/pikku-command-service-metadata.js +22 -0
- package/dist/src/functions/wirings/workflow/pikku-command-workflow-types.js +3 -1
- package/dist/src/functions/wirings/workflow/pikku-command-workflow.js +12 -8
- package/dist/src/functions/wirings/workflow/serialize-workflow-meta.d.ts +2 -1
- package/dist/src/functions/wirings/workflow/serialize-workflow-meta.js +11 -1
- package/dist/src/functions/wirings/workflow/serialize-workflow-types.d.ts +1 -1
- package/dist/src/functions/wirings/workflow/serialize-workflow-types.js +36 -31
- package/dist/src/functions/wirings/workflow/serialize-workflow-wirings.d.ts +8 -0
- package/dist/src/functions/wirings/workflow/serialize-workflow-wirings.js +30 -0
- package/dist/src/functions/wirings/workflow/serialize-workflow-workers.js +2 -2
- package/dist/src/middleware/log-command-info-and-time.d.ts +2 -2
- package/dist/src/middleware/log-command-info-and-time.js +1 -4
- package/dist/src/services/cli-logger-forwarder.service.js +1 -1
- package/dist/src/services.d.ts +2 -7
- package/dist/src/services.js +14 -12
- package/dist/src/utils/check-required-types.d.ts +2 -2
- package/dist/src/utils/check-required-types.js +2 -3
- package/dist/src/utils/pikku-cli-config.js +35 -2
- package/dist/src/utils/pikku-files-and-methods.d.ts +2 -2
- package/dist/src/utils/pikku-files-and-methods.js +4 -4
- package/dist/src/utils/schema-generator.d.ts +1 -1
- package/dist/src/utils/schema-generator.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -8
- package/src/cli.wiring.ts +4 -4
- package/src/functions/commands/all.ts +94 -45
- package/src/functions/commands/bootstrap.ts +25 -10
- package/src/functions/commands/watch.ts +6 -3
- package/src/functions/runtimes/nextjs/pikku-command-nextjs.ts +26 -5
- package/src/functions/runtimes/nextjs/serialize-nextjs-backend-wrapper.ts +43 -4
- package/src/functions/runtimes/nextjs/serialize-nextjs-http-wrapper.ts +40 -1
- package/src/functions/wirings/channels/pikku-channels.ts +27 -3
- package/src/functions/wirings/channels/serialize-channel-types.ts +10 -11
- package/src/functions/wirings/cli/pikku-command-cli-entry.ts +4 -4
- package/src/functions/wirings/cli/pikku-command-cli-types.ts +1 -1
- package/src/functions/wirings/cli/pikku-command-cli.ts +26 -3
- package/src/functions/wirings/cli/serialize-channel-cli.ts +1 -1
- package/src/functions/wirings/cli/serialize-cli-types.ts +2 -2
- package/src/functions/wirings/cli/serialize-local-cli-bootstrap.ts +5 -5
- package/src/functions/wirings/functions/pikku-command-function-types-split.ts +6 -6
- package/src/functions/wirings/functions/pikku-command-functions.ts +39 -4
- package/src/functions/wirings/functions/pikku-command-services.ts +25 -25
- package/src/functions/wirings/functions/schemas.ts +2 -2
- package/src/functions/wirings/functions/serialize-function-types.ts +51 -65
- package/src/functions/wirings/http/openapi-spec-generator.ts +14 -5
- package/src/functions/wirings/http/pikku-http-routes.ts +28 -2
- package/src/functions/wirings/http/serialize-http-types.ts +1 -1
- package/src/functions/wirings/mcp/pikku-command-mcp.ts +30 -4
- package/src/functions/wirings/mcp/serialize-mcp-types.ts +12 -12
- package/src/functions/wirings/middleware/pikku-command-middleware.ts +35 -2
- package/src/functions/wirings/middleware/serialize-middleware-groups-meta.ts +4 -19
- package/src/functions/wirings/permissions/pikku-command-permissions.ts +2 -2
- package/src/functions/wirings/queue/pikku-command-queue.ts +27 -2
- package/src/functions/wirings/queue/pikku-queue.ts +27 -2
- package/src/functions/wirings/queue/serialize-queue-meta.ts +15 -1
- package/src/functions/wirings/queue/serialize-queue-types.ts +1 -1
- package/src/functions/wirings/rpc/pikku-command-rpc.ts +25 -2
- package/src/functions/wirings/rpc/serialize-public-rpc.ts +11 -4
- package/src/functions/wirings/rpc/serialize-remote-rpc.ts +1 -1
- package/src/functions/wirings/rpc/serialize-rpc-wrapper.ts +3 -3
- package/src/functions/wirings/scheduler/pikku-command-scheduler.ts +30 -4
- package/src/functions/wirings/scheduler/serialize-scheduler-meta.ts +20 -1
- package/src/functions/wirings/scheduler/serialize-scheduler-types.ts +1 -1
- package/src/functions/wirings/services/pikku-command-service-metadata.ts +25 -0
- package/src/functions/wirings/workflow/pikku-command-workflow-types.ts +8 -1
- package/src/functions/wirings/workflow/pikku-command-workflow.ts +36 -8
- package/src/functions/wirings/workflow/serialize-workflow-meta.ts +18 -1
- package/src/functions/wirings/workflow/serialize-workflow-types.ts +39 -31
- package/src/functions/wirings/workflow/serialize-workflow-wirings.ts +47 -0
- package/src/functions/wirings/workflow/serialize-workflow-workers.ts +2 -2
- package/src/middleware/log-command-info-and-time.ts +3 -6
- package/src/services/cli-logger-forwarder.service.ts +1 -1
- package/src/services.ts +15 -15
- package/src/utils/check-required-types.ts +4 -7
- package/src/utils/pikku-cli-config.ts +69 -2
- package/src/utils/pikku-files-and-methods.ts +10 -13
- package/src/utils/schema-generator.ts +2 -2
- package/types/application-types.d.ts +1 -1
- package/types/config.d.ts +12 -1
- package/.pikku/function/pikku-functions.gen.ts +0 -84
- package/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.ts +0 -47
- package/dist/.pikku/function/pikku-functions.gen.d.ts +0 -1
- package/dist/.pikku/function/pikku-functions.gen.js +0 -83
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.d.ts +0 -1
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js +0 -47
- package/dist/.pikku/schemas/schemas/PikkuRemoteInternalRPCInput.schema.json +0 -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.2
|
|
3
3
|
*/
|
|
4
4
|
import { CorePikkuWebsocket, CorePikkuRouteHandler } from '@pikku/websocket';
|
|
5
5
|
import { ChannelDefaultHandlerOf, ChannelWiringHandlerOf, ChannelsMap } from './channel/pikku-channels-map.gen.d.js';
|
|
@@ -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.2
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
5
|
* Queue-specific type definitions for tree-shaking optimization
|
|
@@ -12,7 +12,7 @@ import type { PikkuFunctionConfig } from '../function/pikku-function-types.gen.j
|
|
|
12
12
|
* @template In - Input type for the queue job
|
|
13
13
|
* @template Out - Output type for the queue job
|
|
14
14
|
*/
|
|
15
|
-
type QueueWiring<In, Out> = CoreQueueWorker<PikkuFunctionConfig<In, Out>>;
|
|
15
|
+
type QueueWiring<In, Out> = CoreQueueWorker<PikkuFunctionConfig<In, Out, 'session' | 'rpc'>>;
|
|
16
16
|
/**
|
|
17
17
|
* Registers a queue worker with the Pikku framework.
|
|
18
18
|
* Workers process background jobs from queues.
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.11.
|
|
2
|
+
* This file was generated by @pikku/cli@0.11.2
|
|
3
3
|
*/
|
|
4
4
|
import { pikkuState } from '@pikku/core';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
"pikkuFuncName": "pikkuRemoteInternalRPC",
|
|
8
|
-
"queueName": "pikku-remote-internal-rpc"
|
|
9
|
-
}
|
|
10
|
-
});
|
|
5
|
+
import metaData from './pikku-queue-workers-wirings-meta.gen.json' with { type: 'json' };
|
|
6
|
+
pikkuState('queue', 'meta', metaData);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
@@ -2,16 +2,13 @@
|
|
|
2
2
|
* Generic remote RPC worker that invokes any internal RPC by name
|
|
3
3
|
* This is used for executing internal RPCs via a queue or HTTP (e.g., scheduled tasks, background jobs, internal services)
|
|
4
4
|
*/
|
|
5
|
-
export declare const pikkuRemoteInternalRPC: import("
|
|
5
|
+
export declare const pikkuRemoteInternalRPC: import("../pikku-types.gen.js").PikkuFunctionConfig<{
|
|
6
6
|
rpcName: string;
|
|
7
7
|
data?: any;
|
|
8
|
-
}, any,
|
|
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<{
|
|
8
|
+
}, any, "rpc" | "session", import("../pikku-types.gen.js").PikkuFunctionSessionless<{
|
|
15
9
|
rpcName: string;
|
|
16
10
|
data?: any;
|
|
17
|
-
}, import("../../types/application-types.js").Services
|
|
11
|
+
}, any, "rpc" | "session", import("../../types/application-types.js").Services> | import("../pikku-types.gen.js").PikkuFunction<{
|
|
12
|
+
rpcName: string;
|
|
13
|
+
data?: any;
|
|
14
|
+
}, any, "rpc" | "session", import("../../types/application-types.js").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.2
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
5
|
* Auto-generated remote internal RPC queue worker and HTTP endpoint
|
|
@@ -11,7 +11,7 @@ import { pikkuSessionlessFunc, wireQueueWorker } from '../pikku-types.gen.js';
|
|
|
11
11
|
* This is used for executing internal RPCs via a queue or HTTP (e.g., scheduled tasks, background jobs, internal services)
|
|
12
12
|
*/
|
|
13
13
|
export const pikkuRemoteInternalRPC = pikkuSessionlessFunc({
|
|
14
|
-
func: async (
|
|
14
|
+
func: async (_services, { rpcName, data }, { rpc }) => {
|
|
15
15
|
return await rpc.invoke(rpcName, data);
|
|
16
16
|
},
|
|
17
17
|
internal: 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.2
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
5
|
* Scheduler-specific type definitions for tree-shaking optimization
|
|
@@ -10,7 +10,7 @@ import type { PikkuFunctionConfig, PikkuMiddleware } from '../function/pikku-fun
|
|
|
10
10
|
* Type definition for scheduled tasks that run at specified intervals.
|
|
11
11
|
* These are sessionless functions that execute based on cron expressions.
|
|
12
12
|
*/
|
|
13
|
-
type SchedulerWiring = CoreScheduledTask<PikkuFunctionConfig<void, void>, PikkuMiddleware>;
|
|
13
|
+
type SchedulerWiring = CoreScheduledTask<PikkuFunctionConfig<void, void, 'session' | 'rpc'>, PikkuMiddleware>;
|
|
14
14
|
/**
|
|
15
15
|
* Registers a scheduled task with the Pikku framework.
|
|
16
16
|
* Tasks run based on cron expressions and are sessionless.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.11.
|
|
2
|
+
* This file was generated by @pikku/cli@0.11.2
|
|
3
3
|
*/
|
|
4
4
|
import { pikkuState } from '@pikku/core';
|
|
5
|
-
|
|
5
|
+
import metaData from './pikku-schedulers-wirings-meta.gen.json' with { type: 'json' };
|
|
6
|
+
pikkuState('scheduler', 'meta', metaData);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
@@ -1,34 +1,34 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.11.
|
|
2
|
+
* This file was generated by @pikku/cli@0.11.2
|
|
3
3
|
*/
|
|
4
4
|
import { addSchema } from '@pikku/core/schema';
|
|
5
5
|
import * as PikkuSchemasOutput from './schemas/PikkuSchemasOutput.schema.json' with { type: 'json' };
|
|
6
6
|
addSchema('PikkuSchemasOutput', PikkuSchemasOutput);
|
|
7
|
-
import * as PikkuChannelsOutput from './schemas/PikkuChannelsOutput.schema.json' with { type: 'json' };
|
|
8
|
-
addSchema('PikkuChannelsOutput', PikkuChannelsOutput);
|
|
9
|
-
import * as PikkuCLIOutput from './schemas/PikkuCLIOutput.schema.json' with { type: 'json' };
|
|
10
|
-
addSchema('PikkuCLIOutput', PikkuCLIOutput);
|
|
11
7
|
import * as PikkuFunctionsOutput from './schemas/PikkuFunctionsOutput.schema.json' with { type: 'json' };
|
|
12
8
|
addSchema('PikkuFunctionsOutput', PikkuFunctionsOutput);
|
|
13
|
-
import * as PikkuHTTPOutput from './schemas/PikkuHTTPOutput.schema.json' with { type: 'json' };
|
|
14
|
-
addSchema('PikkuHTTPOutput', PikkuHTTPOutput);
|
|
15
|
-
import * as PikkuMCPOutput from './schemas/PikkuMCPOutput.schema.json' with { type: 'json' };
|
|
16
|
-
addSchema('PikkuMCPOutput', PikkuMCPOutput);
|
|
17
9
|
import * as PikkuMiddlewareOutput from './schemas/PikkuMiddlewareOutput.schema.json' with { type: 'json' };
|
|
18
10
|
addSchema('PikkuMiddlewareOutput', PikkuMiddlewareOutput);
|
|
19
11
|
import * as PikkuPermissionsOutput from './schemas/PikkuPermissionsOutput.schema.json' with { type: 'json' };
|
|
20
12
|
addSchema('PikkuPermissionsOutput', PikkuPermissionsOutput);
|
|
21
|
-
import * as PikkuQueueOutput from './schemas/PikkuQueueOutput.schema.json' with { type: 'json' };
|
|
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);
|
|
27
13
|
import * as PikkuRPCOutput from './schemas/PikkuRPCOutput.schema.json' with { type: 'json' };
|
|
28
14
|
addSchema('PikkuRPCOutput', PikkuRPCOutput);
|
|
15
|
+
import * as PikkuPublicRPCOutput from './schemas/PikkuPublicRPCOutput.schema.json' with { type: 'json' };
|
|
16
|
+
addSchema('PikkuPublicRPCOutput', PikkuPublicRPCOutput);
|
|
17
|
+
import * as PikkuHTTPOutput from './schemas/PikkuHTTPOutput.schema.json' with { type: 'json' };
|
|
18
|
+
addSchema('PikkuHTTPOutput', PikkuHTTPOutput);
|
|
29
19
|
import * as PikkuSchedulerOutput from './schemas/PikkuSchedulerOutput.schema.json' with { type: 'json' };
|
|
30
20
|
addSchema('PikkuSchedulerOutput', PikkuSchedulerOutput);
|
|
31
21
|
import * as PikkuWorkflowOutput from './schemas/PikkuWorkflowOutput.schema.json' with { type: 'json' };
|
|
32
22
|
addSchema('PikkuWorkflowOutput', PikkuWorkflowOutput);
|
|
23
|
+
import * as PikkuRemoteRPCOutput from './schemas/PikkuRemoteRPCOutput.schema.json' with { type: 'json' };
|
|
24
|
+
addSchema('PikkuRemoteRPCOutput', PikkuRemoteRPCOutput);
|
|
25
|
+
import * as PikkuQueueOutput from './schemas/PikkuQueueOutput.schema.json' with { type: 'json' };
|
|
26
|
+
addSchema('PikkuQueueOutput', PikkuQueueOutput);
|
|
27
|
+
import * as PikkuMCPOutput from './schemas/PikkuMCPOutput.schema.json' with { type: 'json' };
|
|
28
|
+
addSchema('PikkuMCPOutput', PikkuMCPOutput);
|
|
29
|
+
import * as PikkuCLIOutput from './schemas/PikkuCLIOutput.schema.json' with { type: 'json' };
|
|
30
|
+
addSchema('PikkuCLIOutput', PikkuCLIOutput);
|
|
31
|
+
import * as PikkuChannelsOutput from './schemas/PikkuChannelsOutput.schema.json' with { type: 'json' };
|
|
32
|
+
addSchema('PikkuChannelsOutput', PikkuChannelsOutput);
|
|
33
33
|
import * as PikkuCLIConfig from './schemas/PikkuCLIConfig.schema.json' with { type: 'json' };
|
|
34
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" }, "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" }, "
|
|
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" }, "functionsMetaJsonFile": { "type": "string" }, "functionsMetaMinFile": { "type": "string" }, "functionsMetaMinJsonFile": { "type": "string" }, "functionTypesFile": { "type": "string" }, "httpWiringsFile": { "type": "string" }, "httpWiringMetaFile": { "type": "string" }, "httpWiringMetaJsonFile": { "type": "string" }, "httpMapDeclarationFile": { "type": "string" }, "httpTypesFile": { "type": "string" }, "channelsWiringFile": { "type": "string" }, "channelsWiringMetaFile": { "type": "string" }, "channelsWiringMetaJsonFile": { "type": "string" }, "channelsMapDeclarationFile": { "type": "string" }, "channelsTypesFile": { "type": "string" }, "rpcInternalWiringMetaFile": { "type": "string" }, "rpcInternalWiringMetaJsonFile": { "type": "string" }, "rpcInternalMapDeclarationFile": { "type": "string" }, "rpcMapDeclarationFile": { "type": "string" }, "schedulersWiringFile": { "type": "string" }, "schedulersWiringMetaFile": { "type": "string" }, "schedulersWiringMetaJsonFile": { "type": "string" }, "schedulersTypesFile": { "type": "string" }, "queueWorkersWiringFile": { "type": "string" }, "queueWorkersWiringMetaFile": { "type": "string" }, "queueWorkersWiringMetaJsonFile": { "type": "string" }, "queueMapDeclarationFile": { "type": "string" }, "queueTypesFile": { "type": "string" }, "workflowsWiringFile": { "type": "string" }, "workflowsWiringMetaFile": { "type": "string" }, "workflowsWiringMetaJsonFile": { "type": "string" }, "workflowsWorkersFile": { "type": "string" }, "workflowMapDeclarationFile": { "type": "string" }, "workflowTypesFile": { "type": "string" }, "mcpWiringsFile": { "type": "string" }, "mcpWiringsMetaFile": { "type": "string" }, "mcpWiringsMetaJsonFile": { "type": "string" }, "mcpTypesFile": { "type": "string" }, "cliWiringsFile": { "type": "string" }, "cliWiringMetaFile": { "type": "string" }, "cliWiringMetaJsonFile": { "type": "string" }, "cliBootstrapFile": { "type": "string" }, "cliTypesFile": { "type": "string" }, "servicesFile": { "type": "string" }, "middlewareFile": { "type": "string" }, "middlewareGroupsMetaFile": { "type": "string" }, "middlewareGroupsMetaJsonFile": { "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" }, "wireServicesFactoryType": { "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", "channelsWiringMetaJsonFile", "cliBootstrapFile", "cliTypesFile", "cliWiringMetaFile", "cliWiringMetaJsonFile", "cliWiringsFile", "configDir", "filters", "functionTypesFile", "functionsFile", "functionsMetaFile", "functionsMetaJsonFile", "functionsMetaMinFile", "functionsMetaMinJsonFile", "httpMapDeclarationFile", "httpTypesFile", "httpWiringMetaFile", "httpWiringMetaJsonFile", "httpWiringsFile", "mcpTypesFile", "mcpWiringsFile", "mcpWiringsMetaFile", "mcpWiringsMetaJsonFile", "middlewareFile", "middlewareGroupsMetaFile", "middlewareGroupsMetaJsonFile", "outDir", "packageMappings", "permissionsFile", "queueMapDeclarationFile", "queueTypesFile", "queueWorkersWiringFile", "queueWorkersWiringMetaFile", "queueWorkersWiringMetaJsonFile", "rootDir", "rpcInternalMapDeclarationFile", "rpcInternalWiringMetaFile", "rpcInternalWiringMetaJsonFile", "rpcMapDeclarationFile", "schedulersTypesFile", "schedulersWiringFile", "schedulersWiringMetaFile", "schedulersWiringMetaJsonFile", "schemaDirectory", "servicesFile", "srcDirectories", "tsconfig", "typesDeclarationFile", "workflowMapDeclarationFile", "workflowTypesFile", "workflowsWiringFile", "workflowsWiringMetaFile", "workflowsWiringMetaJsonFile", "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 } } }
|
|
@@ -1,24 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.11.
|
|
2
|
+
* This file was generated by @pikku/cli@0.11.2
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
5
|
* Workflow-specific type definitions for tree-shaking optimization
|
|
6
6
|
*/
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import type {
|
|
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';
|
|
7
|
+
import { PikkuWorkflowWire, WorkflowStepOptions } from '@pikku/core/workflow';
|
|
8
|
+
import type { PikkuFunctionSessionless, PikkuFunctionConfig } from '../function/pikku-function-types.gen.js';
|
|
9
|
+
import type { RPCMap } from '../rpc/pikku-rpc-wirings-map.internal.gen.d.js';
|
|
12
10
|
/**
|
|
13
|
-
*
|
|
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
|
|
11
|
+
* Typed workflow wire with RPC awareness
|
|
19
12
|
* Provides type-safe workflow.do() for RPC steps
|
|
20
13
|
*/
|
|
21
|
-
export interface TypedWorkflow extends
|
|
14
|
+
export interface TypedWorkflow extends PikkuWorkflowWire {
|
|
22
15
|
/**
|
|
23
16
|
* Execute a workflow step with RPC invocation (typed based on available RPCs)
|
|
24
17
|
* @template K - RPC name from the RPC map
|
|
@@ -32,27 +25,38 @@ export interface TypedWorkflow extends PikkuWorkflowInteraction {
|
|
|
32
25
|
}
|
|
33
26
|
/**
|
|
34
27
|
* Workflow function type with typed workflow service
|
|
35
|
-
* Includes the workflow
|
|
28
|
+
* Includes the workflow wire object with typed RPC methods
|
|
36
29
|
*/
|
|
37
|
-
export type PikkuFunctionWorkflow<In = unknown, Out = never> =
|
|
38
|
-
rpc: TypedPikkuRPC;
|
|
39
|
-
workflow: TypedWorkflow;
|
|
40
|
-
}, UserSession>;
|
|
30
|
+
export type PikkuFunctionWorkflow<In = unknown, Out = never> = PikkuFunctionSessionless<In, Out, 'workflow'>;
|
|
41
31
|
/**
|
|
42
32
|
* Creates a workflow function with typed input and output.
|
|
43
|
-
* Workflow functions have access to the workflow
|
|
33
|
+
* Workflow functions have access to the workflow wire object for step execution.
|
|
34
|
+
*
|
|
35
|
+
* This is the permissive mode - workflows that don't conform to simple DSL will fall back
|
|
36
|
+
* to basic extraction with a warning.
|
|
44
37
|
*
|
|
45
38
|
* @template In - Input type for the workflow
|
|
46
39
|
* @template Out - Output type for the workflow
|
|
47
40
|
* @param func - Function definition, either direct function or configuration object
|
|
48
41
|
* @returns The normalized configuration object
|
|
49
42
|
*/
|
|
50
|
-
export declare const pikkuWorkflowFunc: <In, Out = unknown>(func: PikkuFunctionWorkflow<In, Out> |
|
|
43
|
+
export declare const pikkuWorkflowFunc: <In, Out = unknown>(func: PikkuFunctionWorkflow<In, Out> | PikkuFunctionConfig<In, Out, "workflow", PikkuFunctionWorkflow<In, Out>>) => PikkuFunctionConfig<In, Out, "workflow", PikkuFunctionWorkflow<In, Out>>;
|
|
51
44
|
/**
|
|
52
|
-
*
|
|
53
|
-
*
|
|
45
|
+
* Creates a simple workflow function with typed input and output.
|
|
46
|
+
* Simple workflows must conform to the restricted DSL for static analysis.
|
|
47
|
+
*
|
|
48
|
+
* This is the strict mode - workflows that don't conform to simple DSL will cause
|
|
49
|
+
* a critical error during inspection.
|
|
50
|
+
*
|
|
51
|
+
* Constraints:
|
|
52
|
+
* - Must use only workflow.do() with RPC form (no inline functions)
|
|
53
|
+
* - Only if/else, for..of, and Promise.all(array.map()) control flow allowed
|
|
54
|
+
* - Step names must be unique (except across mutually exclusive branches)
|
|
55
|
+
* - All workflow calls must be awaited
|
|
54
56
|
*
|
|
55
|
-
* @
|
|
57
|
+
* @template In - Input type for the workflow
|
|
58
|
+
* @template Out - Output type for the workflow
|
|
59
|
+
* @param func - Function definition, either direct function or configuration object
|
|
60
|
+
* @returns The normalized configuration object
|
|
56
61
|
*/
|
|
57
|
-
export declare const
|
|
58
|
-
export {};
|
|
62
|
+
export declare const pikkuSimpleWorkflowFunc: <In, Out = unknown>(func: PikkuFunctionWorkflow<In, Out> | PikkuFunctionConfig<In, Out, "workflow", PikkuFunctionWorkflow<In, Out>>) => PikkuFunctionConfig<In, Out, "workflow", PikkuFunctionWorkflow<In, Out>>;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.11.
|
|
2
|
+
* This file was generated by @pikku/cli@0.11.2
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
5
|
* Workflow-specific type definitions for tree-shaking optimization
|
|
6
6
|
*/
|
|
7
|
-
import { wireWorkflow as wireWorkflowCore } from '@pikku/core/workflow';
|
|
8
7
|
/**
|
|
9
8
|
* Creates a workflow function with typed input and output.
|
|
10
|
-
* Workflow functions have access to the workflow
|
|
9
|
+
* Workflow functions have access to the workflow wire object for step execution.
|
|
10
|
+
*
|
|
11
|
+
* This is the permissive mode - workflows that don't conform to simple DSL will fall back
|
|
12
|
+
* to basic extraction with a warning.
|
|
11
13
|
*
|
|
12
14
|
* @template In - Input type for the workflow
|
|
13
15
|
* @template Out - Output type for the workflow
|
|
@@ -18,11 +20,23 @@ export const pikkuWorkflowFunc = (func) => {
|
|
|
18
20
|
return typeof func === 'function' ? { func } : func;
|
|
19
21
|
};
|
|
20
22
|
/**
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
+
* Creates a simple workflow function with typed input and output.
|
|
24
|
+
* Simple workflows must conform to the restricted DSL for static analysis.
|
|
25
|
+
*
|
|
26
|
+
* This is the strict mode - workflows that don't conform to simple DSL will cause
|
|
27
|
+
* a critical error during inspection.
|
|
23
28
|
*
|
|
24
|
-
*
|
|
29
|
+
* Constraints:
|
|
30
|
+
* - Must use only workflow.do() with RPC form (no inline functions)
|
|
31
|
+
* - Only if/else, for..of, and Promise.all(array.map()) control flow allowed
|
|
32
|
+
* - Step names must be unique (except across mutually exclusive branches)
|
|
33
|
+
* - All workflow calls must be awaited
|
|
34
|
+
*
|
|
35
|
+
* @template In - Input type for the workflow
|
|
36
|
+
* @template Out - Output type for the workflow
|
|
37
|
+
* @param func - Function definition, either direct function or configuration object
|
|
38
|
+
* @returns The normalized configuration object
|
|
25
39
|
*/
|
|
26
|
-
export const
|
|
27
|
-
|
|
40
|
+
export const pikkuSimpleWorkflowFunc = (func) => {
|
|
41
|
+
return typeof func === 'function' ? { func } : func;
|
|
28
42
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.11.
|
|
2
|
+
* This file was generated by @pikku/cli@0.11.2
|
|
3
3
|
*/
|
|
4
4
|
import { pikkuState } from '@pikku/core';
|
|
5
|
-
|
|
5
|
+
import metaData from './pikku-workflow-wirings-meta.gen.json' with { type: 'json' };
|
|
6
|
+
pikkuState('workflows', 'meta', metaData);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
export {};
|
|
2
1
|
/**
|
|
3
|
-
* This file was generated by @pikku/cli@0.11.
|
|
2
|
+
* This file was generated by @pikku/cli@0.11.2
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Auto-generated workflow registrations
|
|
6
|
+
* Do not edit manually - regenerate with 'npx pikku'
|
|
4
7
|
*/
|
|
5
|
-
|
|
8
|
+
export {};
|
package/dist/bin/pikku.js
CHANGED
|
@@ -1,28 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { Command } from 'commander';
|
|
3
3
|
import { createConfig, createSingletonServices } from '../src/services.js';
|
|
4
|
-
import { PikkuRPCService } from '@pikku/core/rpc';
|
|
5
4
|
import { LocalVariablesService } from '@pikku/core/services';
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { dirname, join } from 'path';
|
|
9
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
10
|
-
const __dirname = dirname(__filename);
|
|
11
|
-
// Check if Pikku CLI is available
|
|
12
|
-
const pikkuCliPath = join(__dirname, '../.pikku/cli/pikku-cli.gen.js');
|
|
13
|
-
if (existsSync(pikkuCliPath)) {
|
|
14
|
-
try {
|
|
15
|
-
// Use the generated Pikku CLI
|
|
16
|
-
const { PikkuCLI } = await import(pikkuCliPath);
|
|
17
|
-
await PikkuCLI(process.argv.slice(2));
|
|
18
|
-
process.exit(0);
|
|
19
|
-
}
|
|
20
|
-
catch (error) {
|
|
21
|
-
// If import fails, fall back to Commander.js
|
|
22
|
-
console.warn('Failed to load Pikku CLI, using fallback mode:', error.message);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
// Fallback to Commander.js for initial setup
|
|
5
|
+
import { all as allCommand } from '../src/functions/commands/all.js';
|
|
6
|
+
import { watch as watchCommand } from '../src/functions/commands/watch.js';
|
|
26
7
|
// Import bootstrap if it exists
|
|
27
8
|
try {
|
|
28
9
|
await import('../.pikku/pikku-bootstrap.gen.js');
|
|
@@ -33,13 +14,11 @@ catch {
|
|
|
33
14
|
const action = async (command, cliConfig) => {
|
|
34
15
|
const config = await createConfig(new LocalVariablesService(), cliConfig);
|
|
35
16
|
const services = await createSingletonServices(config);
|
|
36
|
-
const rpcWrapper = new PikkuRPCService();
|
|
37
|
-
const { rpc } = await rpcWrapper.injectRPCService(services, {}, false);
|
|
38
17
|
if (command === 'watch') {
|
|
39
|
-
await
|
|
18
|
+
await watchCommand.func(services);
|
|
40
19
|
}
|
|
41
20
|
else {
|
|
42
|
-
await
|
|
21
|
+
await allCommand.func(services);
|
|
43
22
|
}
|
|
44
23
|
};
|
|
45
24
|
const all = (program, name, description) => {
|
|
@@ -48,7 +27,7 @@ const all = (program, name, description) => {
|
|
|
48
27
|
.description(description)
|
|
49
28
|
.option('--pikku-config-type', 'The type of your pikku config object')
|
|
50
29
|
.option('--singleton-services-factory-type', 'The type of your singleton services factory')
|
|
51
|
-
.option('--session-services-factory-type', 'The type of your
|
|
30
|
+
.option('--session-services-factory-type', 'The type of your wire services factory')
|
|
52
31
|
.option('-c, --config <string>', 'The path to pikku cli config file')
|
|
53
32
|
.option('-t, --tags <tags...>', 'Which tags to filter by')
|
|
54
33
|
.option('--types <types...>', 'Which types to filter by (http, channel, queue, scheduler, rpc, mcp)')
|
package/dist/src/cli.wiring.js
CHANGED
|
@@ -9,11 +9,11 @@ import { pikkuCLICommand, wireCLI } from '../.pikku/cli/pikku-cli-types.gen.js';
|
|
|
9
9
|
import { all } from './functions/commands/all.js';
|
|
10
10
|
import { bootstrap } from './functions/commands/bootstrap.js';
|
|
11
11
|
import { watch } from './functions/commands/watch.js';
|
|
12
|
-
import { clientCLIRenderer } from './services.js'
|
|
12
|
+
// import { clientCLIRenderer } from './services.js'
|
|
13
13
|
wireCLI({
|
|
14
14
|
program: 'pikku',
|
|
15
15
|
description: 'Pikku CLI - Code generation tool for type-safe backend development',
|
|
16
|
-
render: clientCLIRenderer,
|
|
16
|
+
// render: clientCLIRenderer,
|
|
17
17
|
options: {
|
|
18
18
|
config: {
|
|
19
19
|
description: 'Path to pikku.config.json file',
|
|
@@ -30,8 +30,8 @@ wireCLI({
|
|
|
30
30
|
singletonServicesFactoryType: {
|
|
31
31
|
description: 'Specify which singleton services factory to use',
|
|
32
32
|
},
|
|
33
|
-
|
|
34
|
-
description: 'Specify which
|
|
33
|
+
wireServicesFactoryType: {
|
|
34
|
+
description: 'Specify which wire services factory to use',
|
|
35
35
|
},
|
|
36
36
|
stateOutput: {
|
|
37
37
|
description: 'Save inspector state to JSON file for reuse',
|