@pikku/cli 0.12.15 → 0.12.16
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/cli.schema.json +1 -1
- package/console-app/assets/index-CzMWJFqj.js +700 -0
- package/console-app/index.html +1 -1
- package/dist/.pikku/agent/pikku-agent-types.gen.d.ts +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/cli/pikku-cli-channel.js +16 -1
- package/dist/.pikku/cli/pikku-cli-client.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli-client.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 +1 -1
- package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.json +68 -5
- 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/cli/pikku-cli.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli.gen.js +1 -1
- package/dist/.pikku/console/pikku-node-types.gen.d.ts +1 -1
- package/dist/.pikku/function/pikku-function-types.gen.d.ts +16 -19
- package/dist/.pikku/function/pikku-function-types.gen.js +15 -19
- package/dist/.pikku/function/pikku-functions-meta.gen.js +1 -1
- package/dist/.pikku/function/pikku-functions-meta.gen.json +190 -107
- package/dist/.pikku/function/pikku-functions.gen.js +6 -2
- 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-meta.gen.json +18 -1
- package/dist/.pikku/http/pikku-http-wirings.gen.d.ts +2 -2
- package/dist/.pikku/http/pikku-http-wirings.gen.js +3 -3
- 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/pikku-bootstrap.gen.d.ts +3 -10
- package/dist/.pikku/pikku-bootstrap.gen.js +1 -18
- package/dist/.pikku/pikku-meta-service.gen.d.ts +7 -0
- package/dist/.pikku/pikku-meta-service.gen.js +9 -0
- package/dist/.pikku/pikku-services.gen.d.ts +2 -1
- package/dist/.pikku/pikku-services.gen.js +1 -0
- package/dist/.pikku/pikku-types.gen.d.ts +1 -1
- package/dist/.pikku/pikku-types.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/rpc/pikku-rpc-wirings-meta.internal.gen.js +1 -1
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.json +5 -1
- 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/schemas/register.gen.js +15 -7
- package/dist/.pikku/schemas/schemas/DeployApplyInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/DeployPlanInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuCLIConfig.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/PikkuNewAddonInput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/PikkuWorkflowRoutesOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/RemoteRPCHandlerInput.schema.json +1 -0
- package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts +1 -1
- package/dist/.pikku/secrets/pikku-secret-types.gen.js +1 -1
- package/dist/.pikku/secrets/pikku-secrets.gen.d.ts +1 -1
- package/dist/.pikku/secrets/pikku-secrets.gen.js +1 -1
- package/dist/.pikku/trigger/pikku-trigger-types.gen.d.ts +1 -1
- package/dist/.pikku/trigger/pikku-trigger-types.gen.js +1 -1
- package/dist/.pikku/variables/pikku-variable-types.gen.d.ts +1 -1
- package/dist/.pikku/variables/pikku-variable-types.gen.js +1 -1
- package/dist/.pikku/variables/pikku-variables.gen.d.ts +1 -1
- package/dist/.pikku/variables/pikku-variables.gen.js +1 -1
- package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +3 -24
- package/dist/.pikku/workflow/pikku-workflow-types.gen.js +1 -14
- package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +1 -1
- package/dist/.pikku/workflow/pikku-workflow-wirings.gen.d.ts +1 -1
- package/dist/.pikku/workflow/pikku-workflow-wirings.gen.js +1 -1
- package/dist/src/cli.wiring.js +63 -4
- package/dist/src/deploy/analyzer/analyzer.d.ts +16 -0
- package/dist/src/deploy/analyzer/analyzer.js +557 -0
- package/dist/src/deploy/analyzer/index.d.ts +3 -0
- package/dist/src/deploy/analyzer/index.js +1 -0
- package/dist/src/deploy/analyzer/manifest.d.ts +112 -0
- package/dist/src/deploy/analyzer/manifest.js +8 -0
- package/dist/src/deploy/build-pipeline.d.ts +39 -0
- package/dist/src/deploy/build-pipeline.js +209 -0
- package/dist/src/deploy/bundler/bundler.d.ts +30 -0
- package/dist/src/deploy/bundler/bundler.js +196 -0
- package/dist/src/deploy/bundler/dep-extractor.d.ts +35 -0
- package/dist/src/deploy/bundler/dep-extractor.js +213 -0
- package/dist/src/deploy/bundler/index.d.ts +3 -0
- package/dist/src/deploy/bundler/index.js +2 -0
- package/dist/src/deploy/bundler/types.d.ts +21 -0
- package/dist/src/deploy/bundler/types.js +5 -0
- package/dist/src/deploy/codegen/index.d.ts +2 -0
- package/dist/src/deploy/codegen/index.js +1 -0
- package/dist/src/deploy/codegen/per-unit-codegen.d.ts +44 -0
- package/dist/src/deploy/codegen/per-unit-codegen.js +216 -0
- package/dist/src/deploy/plan/executor.d.ts +9 -0
- package/dist/src/deploy/plan/executor.js +49 -0
- package/dist/src/deploy/plan/formatter.d.ts +4 -0
- package/dist/src/deploy/plan/formatter.js +114 -0
- package/dist/src/deploy/plan/index.d.ts +5 -0
- package/dist/src/deploy/plan/index.js +3 -0
- package/dist/src/deploy/plan/planner.d.ts +4 -0
- package/dist/src/deploy/plan/planner.js +220 -0
- package/dist/src/deploy/plan/provider.d.ts +30 -0
- package/dist/src/deploy/plan/provider.js +1 -0
- package/dist/src/deploy/plan/types.d.ts +29 -0
- package/dist/src/deploy/plan/types.js +1 -0
- package/dist/src/deploy/provider-adapter.d.ts +111 -0
- package/dist/src/deploy/provider-adapter.js +10 -0
- package/dist/src/functions/commands/all.js +6 -2
- package/dist/src/functions/commands/deploy-apply.d.ts +22 -0
- package/dist/src/functions/commands/deploy-apply.js +206 -0
- package/dist/src/functions/commands/deploy-info.d.ts +1 -0
- package/dist/src/functions/commands/deploy-info.js +122 -0
- package/dist/src/functions/commands/deploy-plan.d.ts +10 -0
- package/dist/src/functions/commands/deploy-plan.js +96 -0
- package/dist/src/functions/commands/enable.js +1 -1
- package/dist/src/functions/commands/new-addon.d.ts +3 -0
- package/dist/src/functions/commands/new-addon.js +68 -2
- package/dist/src/functions/commands/pikku-command-bootstrap.js +30 -20
- package/dist/src/functions/runtimes/nextjs/pikku-command-nextjs.js +7 -3
- package/dist/src/functions/wirings/ai-agent/pikku-command-ai-agent.js +7 -5
- package/dist/src/functions/wirings/channels/pikku-channels.js +3 -0
- package/dist/src/functions/wirings/channels/pikku-command-channels.js +3 -0
- package/dist/src/functions/wirings/cli/pikku-command-cli.js +3 -0
- package/dist/src/functions/wirings/cli/serialize-channel-cli.js +2 -2
- package/dist/src/functions/wirings/console/serialize-console-functions.js +2 -2
- package/dist/src/functions/wirings/functions/pikku-command-services.d.ts +1 -1
- package/dist/src/functions/wirings/functions/pikku-command-services.js +9 -2
- package/dist/src/functions/wirings/functions/serialize-function-imports.js +5 -3
- package/dist/src/functions/wirings/functions/serialize-function-types.js +17 -19
- package/dist/src/functions/wirings/http/pikku-command-http-routes.js +3 -0
- package/dist/src/functions/wirings/http/pikku-http-routes.js +3 -0
- package/dist/src/functions/wirings/mcp/pikku-command-mcp.js +6 -0
- package/dist/src/functions/wirings/package/pikku-command-package.js +1 -1
- package/dist/src/functions/wirings/package/serialize-package.d.ts +1 -1
- package/dist/src/functions/wirings/package/serialize-package.js +5 -2
- package/dist/src/functions/wirings/queue/pikku-command-queue.js +4 -0
- package/dist/src/functions/wirings/queue/pikku-queue.js +4 -0
- package/dist/src/functions/wirings/queue/serialize-queue-map.js +4 -1
- package/dist/src/functions/wirings/rpc/pikku-command-rpc.js +10 -3
- package/dist/src/functions/wirings/rpc/serialize-public-rpc.js +5 -27
- package/dist/src/functions/wirings/rpc/serialize-remote-rpc.js +11 -14
- package/dist/src/functions/wirings/rpc/serialize-rpc-wrapper.js +28 -3
- package/dist/src/functions/wirings/rpc/serialize-typed-rpc-map.js +15 -5
- package/dist/src/functions/wirings/scheduler/pikku-command-scheduler.js +4 -0
- package/dist/src/functions/wirings/workflow/pikku-command-workflow-routes.d.ts +1 -0
- package/dist/src/functions/wirings/workflow/pikku-command-workflow-routes.js +21 -0
- package/dist/src/functions/wirings/workflow/pikku-command-workflow.js +10 -9
- package/dist/src/functions/wirings/workflow/serialize-workflow-map.d.ts +6 -1
- package/dist/src/functions/wirings/workflow/serialize-workflow-map.js +42 -5
- package/dist/src/functions/wirings/workflow/serialize-workflow-registration.d.ts +1 -1
- package/dist/src/functions/wirings/workflow/serialize-workflow-registration.js +3 -2
- package/dist/src/functions/wirings/workflow/serialize-workflow-routes.d.ts +4 -0
- package/dist/src/functions/wirings/workflow/serialize-workflow-routes.js +139 -0
- package/dist/src/functions/wirings/workflow/serialize-workflow-types.js +4 -51
- package/dist/src/scaffold/rpc-remote.gen.d.ts +10 -0
- package/dist/src/scaffold/rpc-remote.gen.js +22 -0
- package/dist/src/services.js +12 -7
- package/dist/src/utils/pikku-cli-config.d.ts +1 -1
- package/dist/src/utils/pikku-cli-config.js +30 -28
- package/dist/src/utils/strip-verbose-meta.js +2 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +8 -4
- package/console-app/assets/index-robZPL3O.js +0 -672
- package/dist/src/functions/wirings/workflow/serialize-workflow-workers.d.ts +0 -4
- package/dist/src/functions/wirings/workflow/serialize-workflow-workers.js +0 -47
|
@@ -6,4 +6,9 @@ import { type TypesMap } from '@pikku/inspector';
|
|
|
6
6
|
import type { SerializedWorkflowGraphs } from '@pikku/inspector/workflow-graph';
|
|
7
7
|
import type { FunctionsMeta } from '@pikku/core';
|
|
8
8
|
import type { Logger } from '@pikku/core/services';
|
|
9
|
-
|
|
9
|
+
type WireAddonDeclarations = Map<string, {
|
|
10
|
+
package: string;
|
|
11
|
+
rpcEndpoint?: string;
|
|
12
|
+
}>;
|
|
13
|
+
export declare const serializeWorkflowMap: (logger: Logger, relativeToPath: string, packageMappings: Record<string, string>, typesMap: TypesMap, functionsMeta: FunctionsMeta, workflowsMeta: WorkflowsMeta, graphMeta: SerializedWorkflowGraphs, wireAddonDeclarations?: WireAddonDeclarations) => string;
|
|
14
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { serializeImportMap } from '../../../utils/serialize-import-map.js';
|
|
2
2
|
import { generateCustomTypes } from '@pikku/inspector';
|
|
3
3
|
import { parseVersionedId } from '@pikku/core';
|
|
4
|
-
export const serializeWorkflowMap = (logger, relativeToPath, packageMappings, typesMap, functionsMeta, workflowsMeta, graphMeta) => {
|
|
4
|
+
export const serializeWorkflowMap = (logger, relativeToPath, packageMappings, typesMap, functionsMeta, workflowsMeta, graphMeta, wireAddonDeclarations) => {
|
|
5
5
|
const requiredTypes = new Set();
|
|
6
6
|
const serializedWorkflows = generateWorkflows(workflowsMeta, functionsMeta, typesMap, requiredTypes);
|
|
7
7
|
const serializedGraphs = generateGraphs(graphMeta, functionsMeta, typesMap, requiredTypes);
|
|
@@ -16,12 +16,15 @@ export const serializeWorkflowMap = (logger, relativeToPath, packageMappings, ty
|
|
|
16
16
|
.split('\n')
|
|
17
17
|
.filter((line) => !line.startsWith('import '))
|
|
18
18
|
.join('\n');
|
|
19
|
+
const addonImports = generateAddonWorkflowImports(wireAddonDeclarations);
|
|
20
|
+
const mergedWorkflowMap = generateMergedWorkflowMap(wireAddonDeclarations);
|
|
19
21
|
return `/**
|
|
20
22
|
* Workflow type map with input/output types for each workflow
|
|
21
23
|
*/
|
|
22
24
|
|
|
23
25
|
${serializedImportMap}
|
|
24
26
|
${serializedCustomTypesDeclarationsOnly}
|
|
27
|
+
${addonImports}
|
|
25
28
|
|
|
26
29
|
interface WorkflowHandler<I, O> {
|
|
27
30
|
input: I;
|
|
@@ -35,15 +38,16 @@ interface GraphNodeHandler<I> {
|
|
|
35
38
|
${serializedWorkflows}
|
|
36
39
|
|
|
37
40
|
${serializedGraphs}
|
|
41
|
+
${mergedWorkflowMap}
|
|
38
42
|
|
|
39
|
-
export type WorkflowClient<Name extends keyof
|
|
40
|
-
start: (input:
|
|
41
|
-
getRun: <output extends keyof
|
|
43
|
+
export type WorkflowClient<Name extends keyof FlattenedWorkflowMap> = {
|
|
44
|
+
start: (input: FlattenedWorkflowMap[Name]['input']) => Promise<{ runId: string }>;
|
|
45
|
+
getRun: <output extends keyof FlattenedWorkflowMap[Name]>(runId: string) => Promise<FlattenedWorkflowMap[Name][output]>;
|
|
42
46
|
cancelRun: (runId: string) => Promise<boolean>;
|
|
43
47
|
}
|
|
44
48
|
|
|
45
49
|
export type TypedWorkflowClients = {
|
|
46
|
-
[Name in keyof
|
|
50
|
+
[Name in keyof FlattenedWorkflowMap]: WorkflowClient<Name>;
|
|
47
51
|
}
|
|
48
52
|
`;
|
|
49
53
|
};
|
|
@@ -126,3 +130,36 @@ function generateGraphs(graphMeta, functionsMeta, typesMap, requiredTypes) {
|
|
|
126
130
|
graphsStr += '};';
|
|
127
131
|
return graphsStr;
|
|
128
132
|
}
|
|
133
|
+
function toPascalCase(str) {
|
|
134
|
+
return str
|
|
135
|
+
.split(/[-_]/)
|
|
136
|
+
.map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())
|
|
137
|
+
.join('');
|
|
138
|
+
}
|
|
139
|
+
function generateAddonWorkflowImports(wireAddonDeclarations) {
|
|
140
|
+
if (!wireAddonDeclarations || wireAddonDeclarations.size === 0) {
|
|
141
|
+
return '';
|
|
142
|
+
}
|
|
143
|
+
let imports = '\n// Addon package Workflow maps\n';
|
|
144
|
+
for (const [namespace, decl] of wireAddonDeclarations.entries()) {
|
|
145
|
+
imports += `import type { WorkflowMap as ${toPascalCase(namespace)}WorkflowMap } from '${decl.package}/.pikku/workflow/pikku-workflow-map.gen.d.js'\n`;
|
|
146
|
+
}
|
|
147
|
+
return imports;
|
|
148
|
+
}
|
|
149
|
+
function generateMergedWorkflowMap(wireAddonDeclarations) {
|
|
150
|
+
if (!wireAddonDeclarations || wireAddonDeclarations.size === 0) {
|
|
151
|
+
return `
|
|
152
|
+
export type FlattenedWorkflowMap = WorkflowMap
|
|
153
|
+
`;
|
|
154
|
+
}
|
|
155
|
+
return `
|
|
156
|
+
type PrefixWorkflowKeys<T, Prefix extends string> = unknown extends T ? {} : {
|
|
157
|
+
[K in keyof T as \`\${Prefix}:\${string & K}\`]: T[K]
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export type FlattenedWorkflowMap =
|
|
161
|
+
WorkflowMap${Array.from(wireAddonDeclarations.keys())
|
|
162
|
+
.map((namespace) => ` & PrefixWorkflowKeys<${toPascalCase(namespace)}WorkflowMap, '${namespace}'>`)
|
|
163
|
+
.join('')}
|
|
164
|
+
`;
|
|
165
|
+
}
|
|
@@ -4,4 +4,4 @@ export declare const serializeWorkflowRegistration: (outputPath: string, metaImp
|
|
|
4
4
|
}>, _graphFiles: Map<string, {
|
|
5
5
|
path: string;
|
|
6
6
|
exportedName: string;
|
|
7
|
-
}>, packageMappings: Record<string, string>,
|
|
7
|
+
}>, packageMappings: Record<string, string>, packageName?: string) => string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getFileImportRelativePath } from '../../../utils/file-import-path.js';
|
|
2
|
-
export const serializeWorkflowRegistration = (outputPath, metaImportPath, workflowNames, workflowFiles, _graphFiles, packageMappings,
|
|
2
|
+
export const serializeWorkflowRegistration = (outputPath, metaImportPath, workflowNames, workflowFiles, _graphFiles, packageMappings, packageName) => {
|
|
3
3
|
const lines = [];
|
|
4
4
|
const hasWorkflows = workflowNames.length > 0;
|
|
5
5
|
const hasDslWorkflows = workflowFiles.size > 0;
|
|
@@ -15,8 +15,9 @@ export const serializeWorkflowRegistration = (outputPath, metaImportPath, workfl
|
|
|
15
15
|
lines.push(`import { ${exportedName} } from '${importPath}'`);
|
|
16
16
|
}
|
|
17
17
|
lines.push('');
|
|
18
|
+
const packageArg = packageName ? `, '${packageName}'` : '';
|
|
18
19
|
for (const [pikkuFuncId, { exportedName }] of sortedWorkflows) {
|
|
19
|
-
lines.push(`addWorkflow('${pikkuFuncId}', ${exportedName})`);
|
|
20
|
+
lines.push(`addWorkflow('${pikkuFuncId}', ${exportedName}${packageArg})`);
|
|
20
21
|
}
|
|
21
22
|
if (hasWorkflows) {
|
|
22
23
|
lines.push('');
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generate catch-all HTTP routes for workflow operations
|
|
3
|
+
*/
|
|
4
|
+
export const serializeWorkflowRoutes = (pathToPikkuTypes, requireAuth = true) => {
|
|
5
|
+
const authFlag = requireAuth ? 'true' : 'false';
|
|
6
|
+
return `/**
|
|
7
|
+
* Workflow HTTP catch-all routes
|
|
8
|
+
* Do not edit manually - regenerate with 'npx pikku'
|
|
9
|
+
*/
|
|
10
|
+
import { pikkuSessionlessFunc, wireHTTPRoutes } from '${pathToPikkuTypes}'
|
|
11
|
+
import { MissingServiceError } from '@pikku/core/errors'
|
|
12
|
+
import type { WorkflowRunStatus } from '@pikku/core/workflow'
|
|
13
|
+
|
|
14
|
+
function assertWorkflowService(workflowService: unknown): asserts workflowService {
|
|
15
|
+
if (!workflowService) throw new MissingServiceError('workflowService is required')
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export const workflowStarter = pikkuSessionlessFunc<
|
|
19
|
+
{ workflowName: string; data?: unknown },
|
|
20
|
+
{ runId: string }
|
|
21
|
+
>({
|
|
22
|
+
auth: ${authFlag},
|
|
23
|
+
func: async (_services, { workflowName, data }, { rpc }) => {
|
|
24
|
+
return await rpc.startWorkflow(workflowName as any, data ?? {})
|
|
25
|
+
},
|
|
26
|
+
})
|
|
27
|
+
|
|
28
|
+
export const workflowRunner = pikkuSessionlessFunc<
|
|
29
|
+
{ workflowName: string; data?: unknown },
|
|
30
|
+
unknown
|
|
31
|
+
>({
|
|
32
|
+
auth: ${authFlag},
|
|
33
|
+
func: async ({ workflowService }, { workflowName, data }, { rpc }) => {
|
|
34
|
+
assertWorkflowService(workflowService)
|
|
35
|
+
return await workflowService.runToCompletion(workflowName, data ?? {}, rpc)
|
|
36
|
+
},
|
|
37
|
+
})
|
|
38
|
+
|
|
39
|
+
export const workflowStatusChecker = pikkuSessionlessFunc<
|
|
40
|
+
{ workflowName: string; runId: string },
|
|
41
|
+
WorkflowRunStatus
|
|
42
|
+
>({
|
|
43
|
+
auth: ${authFlag},
|
|
44
|
+
func: async ({ workflowService }, { runId }) => {
|
|
45
|
+
assertWorkflowService(workflowService)
|
|
46
|
+
const status = await workflowService.getRunStatus(runId)
|
|
47
|
+
if (!status) throw new Error(\`Run not found: \${runId}\`)
|
|
48
|
+
return status
|
|
49
|
+
},
|
|
50
|
+
})
|
|
51
|
+
|
|
52
|
+
export const workflowStatusStream = pikkuSessionlessFunc<
|
|
53
|
+
{ workflowName: string; runId: string },
|
|
54
|
+
WorkflowRunStatus
|
|
55
|
+
>({
|
|
56
|
+
auth: ${authFlag},
|
|
57
|
+
func: async ({ workflowService }, { runId }, { channel }) => {
|
|
58
|
+
assertWorkflowService(workflowService)
|
|
59
|
+
const terminalStatuses = new Set(['completed', 'failed', 'cancelled'])
|
|
60
|
+
const pollIntervalMs = 1000
|
|
61
|
+
const maxWaitMs = 300_000
|
|
62
|
+
|
|
63
|
+
const startTime = Date.now()
|
|
64
|
+
let lastStatusJson = ''
|
|
65
|
+
|
|
66
|
+
while (Date.now() - startTime < maxWaitMs) {
|
|
67
|
+
const status = await workflowService.getRunStatus(runId)
|
|
68
|
+
if (!status) throw new Error(\`Run not found: \${runId}\`)
|
|
69
|
+
|
|
70
|
+
const statusJson = JSON.stringify(status)
|
|
71
|
+
if (statusJson !== lastStatusJson) {
|
|
72
|
+
lastStatusJson = statusJson
|
|
73
|
+
if (channel) {
|
|
74
|
+
channel.send(status)
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if (terminalStatuses.has(status.status)) {
|
|
79
|
+
if (channel) {
|
|
80
|
+
channel.close()
|
|
81
|
+
}
|
|
82
|
+
return status
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
await new Promise((r) => setTimeout(r, pollIntervalMs))
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
// Timeout — return last known status
|
|
89
|
+
const finalStatus = await workflowService.getRunStatus(runId)
|
|
90
|
+
if (channel) {
|
|
91
|
+
channel.close()
|
|
92
|
+
}
|
|
93
|
+
return finalStatus as WorkflowRunStatus
|
|
94
|
+
},
|
|
95
|
+
})
|
|
96
|
+
|
|
97
|
+
export const graphStarter = pikkuSessionlessFunc<
|
|
98
|
+
{ workflowName: string; nodeId: string; data?: unknown },
|
|
99
|
+
{ runId: string }
|
|
100
|
+
>({
|
|
101
|
+
auth: ${authFlag},
|
|
102
|
+
func: async (_services, { workflowName, nodeId, data }, { rpc }) => {
|
|
103
|
+
return await rpc.startWorkflow(workflowName as any, data ?? {}, { startNode: nodeId })
|
|
104
|
+
},
|
|
105
|
+
})
|
|
106
|
+
|
|
107
|
+
wireHTTPRoutes({
|
|
108
|
+
auth: ${authFlag},
|
|
109
|
+
routes: {
|
|
110
|
+
workflowStart: {
|
|
111
|
+
route: '/workflow/:workflowName/start',
|
|
112
|
+
method: 'post',
|
|
113
|
+
func: workflowStarter,
|
|
114
|
+
},
|
|
115
|
+
workflowRun: {
|
|
116
|
+
route: '/workflow/:workflowName/run',
|
|
117
|
+
method: 'post',
|
|
118
|
+
func: workflowRunner,
|
|
119
|
+
},
|
|
120
|
+
workflowStatus: {
|
|
121
|
+
route: '/workflow/:workflowName/status/:runId',
|
|
122
|
+
method: 'get',
|
|
123
|
+
func: workflowStatusChecker,
|
|
124
|
+
},
|
|
125
|
+
workflowStatusStream: {
|
|
126
|
+
route: '/workflow/:workflowName/status/:runId/stream',
|
|
127
|
+
method: 'get',
|
|
128
|
+
sse: true,
|
|
129
|
+
func: workflowStatusStream,
|
|
130
|
+
},
|
|
131
|
+
graphStart: {
|
|
132
|
+
route: '/workflow/:workflowName/graph/:nodeId',
|
|
133
|
+
method: 'post',
|
|
134
|
+
func: graphStarter,
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
})
|
|
138
|
+
`;
|
|
139
|
+
};
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
export const serializeWorkflowTypes = (functionTypesImportPath, rpcMapImportPath, workflowMapImportPath) => {
|
|
2
2
|
return `import { WorkflowCancelledException } from '@pikku/core/workflow'
|
|
3
|
-
import {
|
|
4
|
-
workflow as coreWorkflow,
|
|
5
|
-
workflowStart as coreWorkflowStart,
|
|
6
|
-
workflowStatus as coreWorkflowStatus,
|
|
7
|
-
graphStart as coreGraphStart,
|
|
8
|
-
} from '@pikku/core/workflow'
|
|
9
3
|
import { template } from '@pikku/core/workflow'
|
|
10
4
|
import {
|
|
11
5
|
pikkuWorkflowGraph as corePikkuWorkflowGraph,
|
|
@@ -17,7 +11,7 @@ import type { PikkuWorkflowWire, WorkflowStepOptions } from '@pikku/core/workflo
|
|
|
17
11
|
export { WorkflowCancelledException }
|
|
18
12
|
import type { PikkuFunctionSessionless, PikkuFunctionConfig } from '${functionTypesImportPath}'
|
|
19
13
|
import type { FlattenedRPCMap } from '${rpcMapImportPath}'
|
|
20
|
-
import type {
|
|
14
|
+
import type { FlattenedWorkflowMap } from '${workflowMapImportPath}'
|
|
21
15
|
|
|
22
16
|
export { template }
|
|
23
17
|
|
|
@@ -29,12 +23,12 @@ export interface TypedWorkflow extends PikkuWorkflowWire {
|
|
|
29
23
|
options?: WorkflowStepOptions
|
|
30
24
|
): Promise<FlattenedRPCMap[K]['output']>
|
|
31
25
|
|
|
32
|
-
do<K extends keyof
|
|
26
|
+
do<K extends keyof FlattenedWorkflowMap>(
|
|
33
27
|
stepName: string,
|
|
34
28
|
workflowName: K,
|
|
35
|
-
data:
|
|
29
|
+
data: FlattenedWorkflowMap[K]['input'],
|
|
36
30
|
options?: WorkflowStepOptions
|
|
37
|
-
): Promise<
|
|
31
|
+
): Promise<FlattenedWorkflowMap[K]['output']>
|
|
38
32
|
|
|
39
33
|
do<T>(
|
|
40
34
|
stepName: string,
|
|
@@ -169,46 +163,5 @@ export function pikkuWorkflowGraph<
|
|
|
169
163
|
return corePikkuWorkflowGraph(config as any)
|
|
170
164
|
}
|
|
171
165
|
|
|
172
|
-
export const workflow = <Name extends keyof WorkflowMap>(
|
|
173
|
-
workflowName: Name,
|
|
174
|
-
options?: { pollIntervalMs?: number }
|
|
175
|
-
) => {
|
|
176
|
-
return coreWorkflow<WorkflowMap>(workflowName as string & keyof WorkflowMap, options) as PikkuFunctionConfig<
|
|
177
|
-
WorkflowMap[Name]['input'],
|
|
178
|
-
WorkflowMap[Name]['output'],
|
|
179
|
-
'session' | 'rpc'
|
|
180
|
-
>
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
export const workflowStart = <Name extends keyof WorkflowMap>(
|
|
184
|
-
workflowName: Name
|
|
185
|
-
) => {
|
|
186
|
-
return coreWorkflowStart<WorkflowMap>(workflowName as string & keyof WorkflowMap) as PikkuFunctionConfig<
|
|
187
|
-
WorkflowMap[Name]['input'],
|
|
188
|
-
{ runId: string },
|
|
189
|
-
'session' | 'rpc'
|
|
190
|
-
>
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
export const workflowStatus = <Name extends keyof WorkflowMap>(
|
|
194
|
-
_workflowName: Name
|
|
195
|
-
) => {
|
|
196
|
-
return coreWorkflowStatus<WorkflowMap>(_workflowName as string & keyof WorkflowMap) as PikkuFunctionConfig<
|
|
197
|
-
{ runId: string },
|
|
198
|
-
{ id: string; status: 'running' | 'completed' | 'failed' | 'cancelled'; output?: WorkflowMap[Name]['output']; error?: { message?: string } },
|
|
199
|
-
'session' | 'rpc'
|
|
200
|
-
>
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
export const graphStart = <Name extends keyof GraphsMap, Node extends string & keyof GraphsMap[Name]>(
|
|
204
|
-
graphName: Name,
|
|
205
|
-
startNode: Node
|
|
206
|
-
) => {
|
|
207
|
-
return coreGraphStart<GraphsMap>(graphName as string & keyof GraphsMap, startNode as string) as PikkuFunctionConfig<
|
|
208
|
-
GraphsMap[Name][Node] extends { input: infer I } ? I : never,
|
|
209
|
-
{ runId: string },
|
|
210
|
-
'session' | 'rpc'
|
|
211
|
-
>
|
|
212
|
-
}
|
|
213
166
|
`;
|
|
214
167
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const remoteRPCHandler: import("../../.pikku/pikku-types.gen.js").PikkuFunctionConfig<{
|
|
2
|
+
rpcName: string;
|
|
3
|
+
data?: unknown;
|
|
4
|
+
}, unknown, "session" | "rpc", import("../../.pikku/pikku-types.gen.js").PikkuFunctionSessionless<{
|
|
5
|
+
rpcName: string;
|
|
6
|
+
data?: unknown;
|
|
7
|
+
}, unknown, "session" | "rpc", import("../../types/application-types.js").Services> | import("../../.pikku/pikku-types.gen.js").PikkuFunction<{
|
|
8
|
+
rpcName: string;
|
|
9
|
+
data?: unknown;
|
|
10
|
+
}, unknown, "session" | "rpc", import("../../types/application-types.js").Services>, undefined, undefined>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.16
|
|
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, wireHTTP } from '../../.pikku/pikku-types.gen.js';
|
|
9
|
+
import { pikkuRemoteAuthMiddleware } from '@pikku/core/middleware';
|
|
10
|
+
export const remoteRPCHandler = pikkuSessionlessFunc({
|
|
11
|
+
func: async (_services, { rpcName, data }, { rpc }) => {
|
|
12
|
+
return await rpc.invoke(rpcName, data);
|
|
13
|
+
},
|
|
14
|
+
remote: true,
|
|
15
|
+
});
|
|
16
|
+
wireHTTP({
|
|
17
|
+
route: '/remote/rpc/:rpcName',
|
|
18
|
+
method: 'post',
|
|
19
|
+
auth: false,
|
|
20
|
+
middleware: [pikkuRemoteAuthMiddleware],
|
|
21
|
+
func: remoteRPCHandler,
|
|
22
|
+
});
|
package/dist/src/services.js
CHANGED
|
@@ -128,7 +128,7 @@ export const createConfig = async (_variablesService, data) => {
|
|
|
128
128
|
if (!isSilent) {
|
|
129
129
|
logger.logLogo();
|
|
130
130
|
}
|
|
131
|
-
const cliConfig = await getPikkuCLIConfig(logger, data.configFile, [], true);
|
|
131
|
+
const cliConfig = await getPikkuCLIConfig(logger, data.configFile, [], true, data.outDir);
|
|
132
132
|
// Load inspector state from file if stateInput is provided
|
|
133
133
|
let preloadedInspectorState = undefined;
|
|
134
134
|
if (data.stateInput) {
|
|
@@ -144,9 +144,13 @@ export const createConfig = async (_variablesService, data) => {
|
|
|
144
144
|
throw error;
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
|
+
// Destructure outDir from data so the resolved path from cliConfig is
|
|
148
|
+
// preserved (getPikkuCLIConfig already resolves relative --outDir to
|
|
149
|
+
// an absolute path and recomputes all derived *File/*Dir paths).
|
|
150
|
+
const { outDir: _rawOutDir, ...dataWithoutOutDir } = data;
|
|
147
151
|
return {
|
|
148
152
|
...cliConfig,
|
|
149
|
-
...
|
|
153
|
+
...dataWithoutOutDir,
|
|
150
154
|
tags: cliConfig.tags,
|
|
151
155
|
filters: parseCLIFilters(data),
|
|
152
156
|
preloadedInspectorState,
|
|
@@ -196,8 +200,10 @@ export const createSingletonServices = async (config) => {
|
|
|
196
200
|
};
|
|
197
201
|
return initialState;
|
|
198
202
|
}
|
|
199
|
-
// Get or refresh the unfiltered state
|
|
200
|
-
|
|
203
|
+
// Get or refresh the unfiltered state.
|
|
204
|
+
// When a preloaded state was provided via --stateInput, skip re-inspection
|
|
205
|
+
// because the preloaded state is already the complete unfiltered state.
|
|
206
|
+
if (!unfilteredState || (refresh && !preloadedInspectorState)) {
|
|
201
207
|
// Run inspector WITHOUT filters to get full state
|
|
202
208
|
const wiringFiles = (await Promise.all(srcDirectories.map((dir) => glob(`${path.join(rootDir, dir)}/**/*.ts`, {
|
|
203
209
|
ignore: config.ignoreFiles || [],
|
|
@@ -205,9 +211,8 @@ export const createSingletonServices = async (config) => {
|
|
|
205
211
|
})))).flat();
|
|
206
212
|
const scaffoldFiles = [
|
|
207
213
|
config.consoleFunctionsFile,
|
|
208
|
-
config.
|
|
209
|
-
config.
|
|
210
|
-
config.workflowWorkersFile,
|
|
214
|
+
config.remoteRpcWorkersFile,
|
|
215
|
+
config.workflowRoutesFile,
|
|
211
216
|
];
|
|
212
217
|
for (const file of scaffoldFiles) {
|
|
213
218
|
if (file && !wiringFiles.includes(file) && existsSync(file)) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { PikkuCLIConfig } from '../../types/config.js';
|
|
2
2
|
import type { CLILogger } from '../services/cli-logger.service.js';
|
|
3
|
-
export declare const getPikkuCLIConfig: (logger: CLILogger, configFile: string | undefined, requiredFields: Array<keyof PikkuCLIConfig>, exitProcess?: boolean) => Promise<PikkuCLIConfig>;
|
|
3
|
+
export declare const getPikkuCLIConfig: (logger: CLILogger, configFile: string | undefined, requiredFields: Array<keyof PikkuCLIConfig>, exitProcess?: boolean, outDirOverride?: string) => Promise<PikkuCLIConfig>;
|
|
4
4
|
export declare const validateCLIConfig: (cliConfig: PikkuCLIConfig, required: Array<keyof PikkuCLIConfig>) => void;
|
|
@@ -9,11 +9,11 @@ const CLIENT_FILE_KEYS = [
|
|
|
9
9
|
'nextBackendFile',
|
|
10
10
|
'nextHTTPFile',
|
|
11
11
|
];
|
|
12
|
-
export const getPikkuCLIConfig = async (logger, configFile = undefined, requiredFields, exitProcess = false) => {
|
|
13
|
-
const config = await _getPikkuCLIConfig(logger, configFile, requiredFields, exitProcess);
|
|
12
|
+
export const getPikkuCLIConfig = async (logger, configFile = undefined, requiredFields, exitProcess = false, outDirOverride) => {
|
|
13
|
+
const config = await _getPikkuCLIConfig(logger, configFile, requiredFields, exitProcess, outDirOverride);
|
|
14
14
|
return config;
|
|
15
15
|
};
|
|
16
|
-
const _getPikkuCLIConfig = async (logger, configFile = undefined, requiredFields, exitProcess = false) => {
|
|
16
|
+
const _getPikkuCLIConfig = async (logger, configFile = undefined, requiredFields, exitProcess = false, outDirOverride) => {
|
|
17
17
|
if (!configFile) {
|
|
18
18
|
let execDirectory = process.cwd();
|
|
19
19
|
const files = await readdir(execDirectory);
|
|
@@ -74,6 +74,12 @@ const _getPikkuCLIConfig = async (logger, configFile = undefined, requiredFields
|
|
|
74
74
|
},
|
|
75
75
|
};
|
|
76
76
|
}
|
|
77
|
+
// Override outDir if provided via CLI flag (must happen before derived paths)
|
|
78
|
+
if (outDirOverride) {
|
|
79
|
+
result.outDir = isAbsolute(outDirOverride)
|
|
80
|
+
? outDirOverride
|
|
81
|
+
: resolve(result.rootDir, outDirOverride);
|
|
82
|
+
}
|
|
77
83
|
// Create transport/event directories
|
|
78
84
|
const functionDir = join(result.outDir, 'function');
|
|
79
85
|
const httpDir = join(result.outDir, 'http');
|
|
@@ -155,31 +161,25 @@ const _getPikkuCLIConfig = async (logger, configFile = undefined, requiredFields
|
|
|
155
161
|
if (!result.rpcMapDeclarationFile) {
|
|
156
162
|
result.rpcMapDeclarationFile = join(rpcDir, 'pikku-rpc-wirings-map.gen.d.ts');
|
|
157
163
|
}
|
|
158
|
-
//
|
|
164
|
+
// Scaffold directory for auto-generated wiring files
|
|
165
|
+
const scaffoldDir = result.scaffold?.pikkuDir ?? 'src/scaffold';
|
|
166
|
+
const resolvedScaffoldDir = isAbsolute(scaffoldDir)
|
|
167
|
+
? scaffoldDir
|
|
168
|
+
: join(result.rootDir, scaffoldDir);
|
|
159
169
|
if (!result.remoteRpcWorkersFile) {
|
|
160
|
-
result.remoteRpcWorkersFile = join(
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
result.
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
}
|
|
174
|
-
if (result.scaffold.agent && !result.publicAgentFile) {
|
|
175
|
-
result.publicAgentFile = join(resolvedPikkuDir, 'agent.wiring.gen.ts');
|
|
176
|
-
}
|
|
177
|
-
if (result.scaffold.console && !result.consoleFunctionsFile) {
|
|
178
|
-
result.consoleFunctionsFile = join(resolvedPikkuDir, 'console.gen.ts');
|
|
179
|
-
}
|
|
180
|
-
if (result.scaffold.workflow && !result.workflowWorkersFile) {
|
|
181
|
-
result.workflowWorkersFile = join(resolvedPikkuDir, 'workflows.gen.ts');
|
|
182
|
-
}
|
|
170
|
+
result.remoteRpcWorkersFile = join(resolvedScaffoldDir, 'rpc-remote.gen.ts');
|
|
171
|
+
}
|
|
172
|
+
if (!result.workflowRoutesFile) {
|
|
173
|
+
result.workflowRoutesFile = join(resolvedScaffoldDir, 'workflow-routes.gen.ts');
|
|
174
|
+
}
|
|
175
|
+
if (result.scaffold?.rpc && !result.publicRpcFile) {
|
|
176
|
+
result.publicRpcFile = join(resolvedScaffoldDir, 'rpc-public.gen.ts');
|
|
177
|
+
}
|
|
178
|
+
if (result.scaffold?.agent && !result.publicAgentFile) {
|
|
179
|
+
result.publicAgentFile = join(resolvedScaffoldDir, 'agent.gen.ts');
|
|
180
|
+
}
|
|
181
|
+
if (result.scaffold?.console && !result.consoleFunctionsFile) {
|
|
182
|
+
result.consoleFunctionsFile = join(resolvedScaffoldDir, 'console.gen.ts');
|
|
183
183
|
}
|
|
184
184
|
const triggerDir = join(result.outDir, 'trigger');
|
|
185
185
|
if (!result.triggersTypesFile) {
|
|
@@ -362,7 +362,9 @@ const _getPikkuCLIConfig = async (logger, configFile = undefined, requiredFields
|
|
|
362
362
|
if (!result.variablesMetaJsonFile) {
|
|
363
363
|
result.variablesMetaJsonFile = join(variablesDir, 'pikku-variables-meta.gen.json');
|
|
364
364
|
}
|
|
365
|
-
result.globalHTTPPrefix = result.globalHTTPPrefix
|
|
365
|
+
result.globalHTTPPrefix = result.globalHTTPPrefix
|
|
366
|
+
? result.globalHTTPPrefix.replace(/\/+$/, '')
|
|
367
|
+
: '';
|
|
366
368
|
if (requiredFields.length > 0) {
|
|
367
369
|
validateCLIConfig(result, requiredFields);
|
|
368
370
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["../bin/pikku.ts","../src/cli.wiring.ts","../src/services.ts","../src/functions/commands/all.ts","../src/functions/commands/bootstrap.ts","../src/functions/commands/console.ts","../src/functions/commands/enable.ts","../src/functions/commands/info.ts","../src/functions/commands/new-addon.ts","../src/functions/commands/new-function.ts","../src/functions/commands/new-middleware.ts","../src/functions/commands/new-permission.ts","../src/functions/commands/new-wiring.ts","../src/functions/commands/pikku-command-bootstrap.ts","../src/functions/commands/pikku-command-summary.ts","../src/functions/commands/versions-check.ts","../src/functions/commands/versions-init.ts","../src/functions/commands/versions-update.ts","../src/functions/commands/watch.ts","../src/functions/runtimes/fetch/index.ts","../src/functions/runtimes/nextjs/pikku-command-nextjs.ts","../src/functions/runtimes/nextjs/serialize-nextjs-backend-wrapper.ts","../src/functions/runtimes/nextjs/serialize-nextjs-http-wrapper.ts","../src/functions/runtimes/websocket/pikku-command-websocket-typed.ts","../src/functions/runtimes/websocket/serialize-websocket-wrapper.ts","../src/functions/wirings/ai-agent/pikku-command-ai-agent-types.ts","../src/functions/wirings/ai-agent/pikku-command-ai-agent.ts","../src/functions/wirings/ai-agent/pikku-command-public-agent.ts","../src/functions/wirings/ai-agent/serialize-agent-map.ts","../src/functions/wirings/ai-agent/serialize-ai-agent-types.ts","../src/functions/wirings/ai-agent/serialize-public-agent.ts","../src/functions/wirings/channels/pikku-channels.ts","../src/functions/wirings/channels/pikku-command-channel-types.ts","../src/functions/wirings/channels/pikku-command-channels-map.ts","../src/functions/wirings/channels/pikku-command-channels.ts","../src/functions/wirings/channels/serialize-channel-types.ts","../src/functions/wirings/channels/serialize-typed-channel-map.ts","../src/functions/wirings/cli/pikku-command-cli-entry.ts","../src/functions/wirings/cli/pikku-command-cli-types.ts","../src/functions/wirings/cli/pikku-command-cli.ts","../src/functions/wirings/cli/serialize-channel-cli-client.ts","../src/functions/wirings/cli/serialize-channel-cli.ts","../src/functions/wirings/cli/serialize-cli-types.ts","../src/functions/wirings/cli/serialize-local-cli-bootstrap.ts","../src/functions/wirings/console/pikku-command-console-functions.ts","../src/functions/wirings/console/pikku-command-node-types.ts","../src/functions/wirings/console/pikku-command-nodes-meta.ts","../src/functions/wirings/console/serialize-console-functions.ts","../src/functions/wirings/console/serialize-node-types.ts","../src/functions/wirings/credentials/pikku-command-credentials.ts","../src/functions/wirings/credentials/serialize-credentials-types.ts","../src/functions/wirings/functions/pikku-command-addon-types.ts","../src/functions/wirings/functions/pikku-command-function-types-split.ts","../src/functions/wirings/functions/pikku-command-function-types.ts","../src/functions/wirings/functions/pikku-command-functions.ts","../src/functions/wirings/functions/pikku-command-services.ts","../src/functions/wirings/functions/schemas.ts","../src/functions/wirings/functions/serialize-addon-types.ts","../src/functions/wirings/functions/serialize-function-imports.ts","../src/functions/wirings/functions/serialize-function-types.ts","../src/functions/wirings/functions/serialize-pikku-types-hub.ts","../src/functions/wirings/gateway/pikku-command-gateway.ts","../src/functions/wirings/http/pikku-command-http-map.ts","../src/functions/wirings/http/pikku-command-http-routes.ts","../src/functions/wirings/http/pikku-command-http-types.ts","../src/functions/wirings/http/pikku-command-openapi.ts","../src/functions/wirings/http/pikku-http-routes.ts","../src/functions/wirings/http/serialize-fetch-wrapper.ts","../src/functions/wirings/http/serialize-http-types.ts","../src/functions/wirings/http/serialize-typed-http-map.ts","../src/functions/wirings/mcp/pikku-command-mcp-json.ts","../src/functions/wirings/mcp/pikku-command-mcp-types.ts","../src/functions/wirings/mcp/pikku-command-mcp.ts","../src/functions/wirings/mcp/serialize-mcp-types.ts","../src/functions/wirings/middleware/pikku-command-middleware.ts","../src/functions/wirings/middleware/serialize-middleware-imports.ts","../src/functions/wirings/package/pikku-command-package-types.ts","../src/functions/wirings/package/pikku-command-package.ts","../src/functions/wirings/package/serialize-package-types.ts","../src/functions/wirings/package/serialize-package.ts","../src/functions/wirings/permissions/pikku-command-permissions.ts","../src/functions/wirings/permissions/serialize-permissions-imports.ts","../src/functions/wirings/queue/pikku-command-queue-map.ts","../src/functions/wirings/queue/pikku-command-queue-service.ts","../src/functions/wirings/queue/pikku-command-queue-types.ts","../src/functions/wirings/queue/pikku-command-queue.ts","../src/functions/wirings/queue/pikku-queue-map.ts","../src/functions/wirings/queue/pikku-queue.ts","../src/functions/wirings/queue/serialize-queue-map.ts","../src/functions/wirings/queue/serialize-queue-meta.ts","../src/functions/wirings/queue/serialize-queue-types.ts","../src/functions/wirings/queue/serialize-queue-wrapper.ts","../src/functions/wirings/rpc/pikku-command-public-rpc.ts","../src/functions/wirings/rpc/pikku-command-remote-rpc.ts","../src/functions/wirings/rpc/pikku-command-rpc-client.ts","../src/functions/wirings/rpc/pikku-command-rpc-map.ts","../src/functions/wirings/rpc/pikku-command-rpc.ts","../src/functions/wirings/rpc/serialize-public-rpc.ts","../src/functions/wirings/rpc/serialize-remote-rpc.ts","../src/functions/wirings/rpc/serialize-rpc-wrapper.ts","../src/functions/wirings/rpc/serialize-typed-rpc-map.ts","../src/functions/wirings/scheduler/pikku-command-scheduler-types.ts","../src/functions/wirings/scheduler/pikku-command-scheduler.ts","../src/functions/wirings/scheduler/serialize-scheduler-meta.ts","../src/functions/wirings/scheduler/serialize-scheduler-types.ts","../src/functions/wirings/secrets/pikku-command-secrets.ts","../src/functions/wirings/secrets/serialize-secrets-types.ts","../src/functions/wirings/triggers/pikku-command-trigger-types.ts","../src/functions/wirings/triggers/pikku-command-trigger.ts","../src/functions/wirings/triggers/serialize-trigger-meta.ts","../src/functions/wirings/triggers/serialize-trigger-types.ts","../src/functions/wirings/variables/pikku-command-variables.ts","../src/functions/wirings/variables/serialize-variables-types.ts","../src/functions/wirings/workflow/pikku-command-workflow.ts","../src/functions/wirings/workflow/serialize-workflow-map.ts","../src/functions/wirings/workflow/serialize-workflow-meta.ts","../src/functions/wirings/workflow/serialize-workflow-registration.ts","../src/functions/wirings/workflow/serialize-workflow-types.ts","../src/functions/wirings/workflow/serialize-workflow-workers.ts","../src/middleware/log-command-info-and-time.ts","../src/services/cli-logger-forwarder.service.ts","../src/services/cli-logger.service.ts","../src/utils/check-required-types.ts","../src/utils/command-summary.ts","../src/utils/contract-versions.ts","../src/utils/file-import-path.ts","../src/utils/file-imports-serializer.ts","../src/utils/file-writer.ts","../src/utils/generate-bootstrap-file.ts","../src/utils/get-cli-version.ts","../src/utils/pikku-cli-config.ts","../src/utils/pikku-files-and-methods.ts","../src/utils/serialize-import-map.ts","../src/utils/serialize-meta-ts.ts","../src/utils/serialize-schemas.ts","../src/utils/strip-verbose-meta.ts","../.pikku/pikku-bootstrap.gen.ts","../.pikku/pikku-services.gen.ts","../.pikku/pikku-types.gen.ts","../.pikku/pikku-websocket.gen.ts","../.pikku/agent/pikku-agent-map.gen.d.ts","../.pikku/agent/pikku-agent-types.gen.ts","../.pikku/agent/pikku-agent-wirings-meta.gen.ts","../.pikku/agent/pikku-agent-wirings.gen.ts","../.pikku/channel/pikku-channel-types.gen.ts","../.pikku/channel/pikku-channels-map.gen.d.ts","../.pikku/channel/pikku-channels-meta.gen.ts","../.pikku/channel/pikku-channels.gen.ts","../.pikku/cli/pikku-cli-channel.ts","../.pikku/cli/pikku-cli-client.gen.ts","../.pikku/cli/pikku-cli-types.gen.ts","../.pikku/cli/pikku-cli-wirings-meta.gen.ts","../.pikku/cli/pikku-cli-wirings.gen.ts","../.pikku/cli/pikku-cli.gen.ts","../.pikku/console/pikku-node-types.gen.ts","../.pikku/function/pikku-function-types.gen.ts","../.pikku/function/pikku-functions-meta.gen.ts","../.pikku/function/pikku-functions.gen.ts","../.pikku/http/pikku-http-types.gen.ts","../.pikku/http/pikku-http-wirings-map.gen.d.ts","../.pikku/http/pikku-http-wirings-meta.gen.ts","../.pikku/http/pikku-http-wirings.gen.ts","../.pikku/mcp/pikku-mcp-types.gen.ts","../.pikku/mcp/pikku-mcp-wirings-meta.gen.ts","../.pikku/mcp/pikku-mcp-wirings.gen.ts","../.pikku/node/pikku-node-types.gen.ts","../.pikku/queue/pikku-queue-types.gen.ts","../.pikku/queue/pikku-queue-workers-wirings-map.gen.d.ts","../.pikku/queue/pikku-queue-workers-wirings-meta.gen.ts","../.pikku/queue/pikku-queue-workers-wirings.gen.ts","../.pikku/rpc/pikku-remote-rpc-workers.gen.ts","../.pikku/rpc/pikku-rpc-wirings-map.gen.d.ts","../.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts","../.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.ts","../.pikku/scheduler/pikku-scheduler-types.gen.ts","../.pikku/scheduler/pikku-schedulers-wirings-meta.gen.ts","../.pikku/scheduler/pikku-schedulers-wirings.gen.ts","../.pikku/schemas/register.gen.ts","../.pikku/secrets/pikku-secret-types.gen.ts","../.pikku/secrets/pikku-secrets.gen.ts","../.pikku/trigger/pikku-trigger-types.gen.ts","../.pikku/variables/pikku-variable-types.gen.ts","../.pikku/variables/pikku-variables.gen.ts","../.pikku/workflow/pikku-workflow-map.gen.d.ts","../.pikku/workflow/pikku-workflow-types.gen.ts","../.pikku/workflow/pikku-workflow-wirings-meta.gen.ts","../.pikku/workflow/pikku-workflow-wirings.gen.ts","../types/application-types.d.ts","../types/config.d.ts"],"version":"5.9.3"}
|
|
1
|
+
{"root":["../bin/pikku.ts","../src/cli.wiring.ts","../src/services.ts","../src/deploy/build-pipeline.ts","../src/deploy/provider-adapter.ts","../src/deploy/analyzer/analyzer.ts","../src/deploy/analyzer/index.ts","../src/deploy/analyzer/manifest.ts","../src/deploy/bundler/bundler.ts","../src/deploy/bundler/dep-extractor.ts","../src/deploy/bundler/index.ts","../src/deploy/bundler/types.ts","../src/deploy/codegen/index.ts","../src/deploy/codegen/per-unit-codegen.ts","../src/deploy/plan/executor.ts","../src/deploy/plan/formatter.ts","../src/deploy/plan/index.ts","../src/deploy/plan/planner.ts","../src/deploy/plan/provider.ts","../src/deploy/plan/types.ts","../src/functions/commands/all.ts","../src/functions/commands/bootstrap.ts","../src/functions/commands/console.ts","../src/functions/commands/deploy-apply.ts","../src/functions/commands/deploy-info.ts","../src/functions/commands/deploy-plan.ts","../src/functions/commands/enable.ts","../src/functions/commands/info.ts","../src/functions/commands/new-addon.ts","../src/functions/commands/new-function.ts","../src/functions/commands/new-middleware.ts","../src/functions/commands/new-permission.ts","../src/functions/commands/new-wiring.ts","../src/functions/commands/pikku-command-bootstrap.ts","../src/functions/commands/pikku-command-summary.ts","../src/functions/commands/versions-check.ts","../src/functions/commands/versions-init.ts","../src/functions/commands/versions-update.ts","../src/functions/commands/watch.ts","../src/functions/runtimes/fetch/index.ts","../src/functions/runtimes/nextjs/pikku-command-nextjs.ts","../src/functions/runtimes/nextjs/serialize-nextjs-backend-wrapper.ts","../src/functions/runtimes/nextjs/serialize-nextjs-http-wrapper.ts","../src/functions/runtimes/websocket/pikku-command-websocket-typed.ts","../src/functions/runtimes/websocket/serialize-websocket-wrapper.ts","../src/functions/wirings/ai-agent/pikku-command-ai-agent-types.ts","../src/functions/wirings/ai-agent/pikku-command-ai-agent.ts","../src/functions/wirings/ai-agent/pikku-command-public-agent.ts","../src/functions/wirings/ai-agent/serialize-agent-map.ts","../src/functions/wirings/ai-agent/serialize-ai-agent-types.ts","../src/functions/wirings/ai-agent/serialize-public-agent.ts","../src/functions/wirings/channels/pikku-channels.ts","../src/functions/wirings/channels/pikku-command-channel-types.ts","../src/functions/wirings/channels/pikku-command-channels-map.ts","../src/functions/wirings/channels/pikku-command-channels.ts","../src/functions/wirings/channels/serialize-channel-types.ts","../src/functions/wirings/channels/serialize-typed-channel-map.ts","../src/functions/wirings/cli/pikku-command-cli-entry.ts","../src/functions/wirings/cli/pikku-command-cli-types.ts","../src/functions/wirings/cli/pikku-command-cli.ts","../src/functions/wirings/cli/serialize-channel-cli-client.ts","../src/functions/wirings/cli/serialize-channel-cli.ts","../src/functions/wirings/cli/serialize-cli-types.ts","../src/functions/wirings/cli/serialize-local-cli-bootstrap.ts","../src/functions/wirings/console/pikku-command-console-functions.ts","../src/functions/wirings/console/pikku-command-node-types.ts","../src/functions/wirings/console/pikku-command-nodes-meta.ts","../src/functions/wirings/console/serialize-console-functions.ts","../src/functions/wirings/console/serialize-node-types.ts","../src/functions/wirings/credentials/pikku-command-credentials.ts","../src/functions/wirings/credentials/serialize-credentials-types.ts","../src/functions/wirings/functions/pikku-command-addon-types.ts","../src/functions/wirings/functions/pikku-command-function-types-split.ts","../src/functions/wirings/functions/pikku-command-function-types.ts","../src/functions/wirings/functions/pikku-command-functions.ts","../src/functions/wirings/functions/pikku-command-services.ts","../src/functions/wirings/functions/schemas.ts","../src/functions/wirings/functions/serialize-addon-types.ts","../src/functions/wirings/functions/serialize-function-imports.ts","../src/functions/wirings/functions/serialize-function-types.ts","../src/functions/wirings/functions/serialize-pikku-types-hub.ts","../src/functions/wirings/gateway/pikku-command-gateway.ts","../src/functions/wirings/http/pikku-command-http-map.ts","../src/functions/wirings/http/pikku-command-http-routes.ts","../src/functions/wirings/http/pikku-command-http-types.ts","../src/functions/wirings/http/pikku-command-openapi.ts","../src/functions/wirings/http/pikku-http-routes.ts","../src/functions/wirings/http/serialize-fetch-wrapper.ts","../src/functions/wirings/http/serialize-http-types.ts","../src/functions/wirings/http/serialize-typed-http-map.ts","../src/functions/wirings/mcp/pikku-command-mcp-json.ts","../src/functions/wirings/mcp/pikku-command-mcp-types.ts","../src/functions/wirings/mcp/pikku-command-mcp.ts","../src/functions/wirings/mcp/serialize-mcp-types.ts","../src/functions/wirings/middleware/pikku-command-middleware.ts","../src/functions/wirings/middleware/serialize-middleware-imports.ts","../src/functions/wirings/package/pikku-command-package-types.ts","../src/functions/wirings/package/pikku-command-package.ts","../src/functions/wirings/package/serialize-package-types.ts","../src/functions/wirings/package/serialize-package.ts","../src/functions/wirings/permissions/pikku-command-permissions.ts","../src/functions/wirings/permissions/serialize-permissions-imports.ts","../src/functions/wirings/queue/pikku-command-queue-map.ts","../src/functions/wirings/queue/pikku-command-queue-service.ts","../src/functions/wirings/queue/pikku-command-queue-types.ts","../src/functions/wirings/queue/pikku-command-queue.ts","../src/functions/wirings/queue/pikku-queue-map.ts","../src/functions/wirings/queue/pikku-queue.ts","../src/functions/wirings/queue/serialize-queue-map.ts","../src/functions/wirings/queue/serialize-queue-meta.ts","../src/functions/wirings/queue/serialize-queue-types.ts","../src/functions/wirings/queue/serialize-queue-wrapper.ts","../src/functions/wirings/rpc/pikku-command-public-rpc.ts","../src/functions/wirings/rpc/pikku-command-remote-rpc.ts","../src/functions/wirings/rpc/pikku-command-rpc-client.ts","../src/functions/wirings/rpc/pikku-command-rpc-map.ts","../src/functions/wirings/rpc/pikku-command-rpc.ts","../src/functions/wirings/rpc/serialize-public-rpc.ts","../src/functions/wirings/rpc/serialize-remote-rpc.ts","../src/functions/wirings/rpc/serialize-rpc-wrapper.ts","../src/functions/wirings/rpc/serialize-typed-rpc-map.ts","../src/functions/wirings/scheduler/pikku-command-scheduler-types.ts","../src/functions/wirings/scheduler/pikku-command-scheduler.ts","../src/functions/wirings/scheduler/serialize-scheduler-meta.ts","../src/functions/wirings/scheduler/serialize-scheduler-types.ts","../src/functions/wirings/secrets/pikku-command-secrets.ts","../src/functions/wirings/secrets/serialize-secrets-types.ts","../src/functions/wirings/triggers/pikku-command-trigger-types.ts","../src/functions/wirings/triggers/pikku-command-trigger.ts","../src/functions/wirings/triggers/serialize-trigger-meta.ts","../src/functions/wirings/triggers/serialize-trigger-types.ts","../src/functions/wirings/variables/pikku-command-variables.ts","../src/functions/wirings/variables/serialize-variables-types.ts","../src/functions/wirings/workflow/pikku-command-workflow-routes.ts","../src/functions/wirings/workflow/pikku-command-workflow.ts","../src/functions/wirings/workflow/serialize-workflow-map.ts","../src/functions/wirings/workflow/serialize-workflow-meta.ts","../src/functions/wirings/workflow/serialize-workflow-registration.ts","../src/functions/wirings/workflow/serialize-workflow-routes.ts","../src/functions/wirings/workflow/serialize-workflow-types.ts","../src/middleware/log-command-info-and-time.ts","../src/scaffold/rpc-remote.gen.ts","../src/services/cli-logger-forwarder.service.ts","../src/services/cli-logger.service.ts","../src/utils/check-required-types.ts","../src/utils/command-summary.ts","../src/utils/contract-versions.ts","../src/utils/file-import-path.ts","../src/utils/file-imports-serializer.ts","../src/utils/file-writer.ts","../src/utils/generate-bootstrap-file.ts","../src/utils/get-cli-version.ts","../src/utils/pikku-cli-config.ts","../src/utils/pikku-files-and-methods.ts","../src/utils/serialize-import-map.ts","../src/utils/serialize-meta-ts.ts","../src/utils/serialize-schemas.ts","../src/utils/strip-verbose-meta.ts","../.pikku/pikku-bootstrap.gen.ts","../.pikku/pikku-meta-service.gen.ts","../.pikku/pikku-services.gen.ts","../.pikku/pikku-types.gen.ts","../.pikku/pikku-websocket.gen.ts","../.pikku/agent/pikku-agent-map.gen.d.ts","../.pikku/agent/pikku-agent-types.gen.ts","../.pikku/agent/pikku-agent-wirings-meta.gen.ts","../.pikku/agent/pikku-agent-wirings.gen.ts","../.pikku/channel/pikku-channel-types.gen.ts","../.pikku/channel/pikku-channels-map.gen.d.ts","../.pikku/channel/pikku-channels-meta.gen.ts","../.pikku/channel/pikku-channels.gen.ts","../.pikku/cli/pikku-cli-channel.ts","../.pikku/cli/pikku-cli-client.gen.ts","../.pikku/cli/pikku-cli-types.gen.ts","../.pikku/cli/pikku-cli-wirings-meta.gen.ts","../.pikku/cli/pikku-cli-wirings.gen.ts","../.pikku/cli/pikku-cli.gen.ts","../.pikku/console/pikku-node-types.gen.ts","../.pikku/function/pikku-function-types.gen.ts","../.pikku/function/pikku-functions-meta.gen.ts","../.pikku/function/pikku-functions.gen.ts","../.pikku/http/pikku-http-types.gen.ts","../.pikku/http/pikku-http-wirings-map.gen.d.ts","../.pikku/http/pikku-http-wirings-meta.gen.ts","../.pikku/http/pikku-http-wirings.gen.ts","../.pikku/mcp/pikku-mcp-types.gen.ts","../.pikku/mcp/pikku-mcp-wirings-meta.gen.ts","../.pikku/mcp/pikku-mcp-wirings.gen.ts","../.pikku/node/pikku-node-types.gen.ts","../.pikku/queue/pikku-queue-types.gen.ts","../.pikku/queue/pikku-queue-workers-wirings-map.gen.d.ts","../.pikku/queue/pikku-queue-workers-wirings-meta.gen.ts","../.pikku/queue/pikku-queue-workers-wirings.gen.ts","../.pikku/rpc/pikku-remote-rpc-workers.gen.ts","../.pikku/rpc/pikku-rpc-wirings-map.gen.d.ts","../.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts","../.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.ts","../.pikku/scheduler/pikku-scheduler-types.gen.ts","../.pikku/scheduler/pikku-schedulers-wirings-meta.gen.ts","../.pikku/scheduler/pikku-schedulers-wirings.gen.ts","../.pikku/schemas/register.gen.ts","../.pikku/secrets/pikku-secret-types.gen.ts","../.pikku/secrets/pikku-secrets.gen.ts","../.pikku/trigger/pikku-trigger-types.gen.ts","../.pikku/variables/pikku-variable-types.gen.ts","../.pikku/variables/pikku-variables.gen.ts","../.pikku/workflow/pikku-workflow-map.gen.d.ts","../.pikku/workflow/pikku-workflow-types.gen.ts","../.pikku/workflow/pikku-workflow-wirings-meta.gen.ts","../.pikku/workflow/pikku-workflow-wirings.gen.ts","../types/application-types.d.ts","../types/config.d.ts"],"version":"5.9.3"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pikku/cli",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.16",
|
|
4
4
|
"author": "yasser.fadl@gmail.com",
|
|
5
5
|
"license": "BUSL-1.1",
|
|
6
6
|
"imports": {
|
|
@@ -26,13 +26,17 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@openapi-contrib/json-schema-to-openapi-schema": "^4.3.1",
|
|
29
|
-
"@pikku/core": "^0.12.
|
|
30
|
-
"@pikku/
|
|
31
|
-
"@pikku/
|
|
29
|
+
"@pikku/core": "^0.12.15",
|
|
30
|
+
"@pikku/deploy-azure": "workspace:*",
|
|
31
|
+
"@pikku/deploy-cloudflare": "workspace:*",
|
|
32
|
+
"@pikku/deploy-serverless": "workspace:*",
|
|
33
|
+
"@pikku/inspector": "^0.12.8",
|
|
34
|
+
"@pikku/openapi-parser": "^0.12.10",
|
|
32
35
|
"@types/cookie": "^1.0.0",
|
|
33
36
|
"@types/json-schema": "^7.0.15",
|
|
34
37
|
"chalk": "^5.6.2",
|
|
35
38
|
"chokidar": "^4.0.3",
|
|
39
|
+
"esbuild": "~0.27.0",
|
|
36
40
|
"open": "^10.2.0",
|
|
37
41
|
"openapi-types": "^12.1.3",
|
|
38
42
|
"path-to-regexp": "^8.3.0",
|