@pikku/cli 0.12.79 → 0.12.81
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/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 +1 -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-contracts-meta.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli-contracts-meta.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.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 +4 -4
- package/dist/.pikku/function/pikku-function-types.gen.js +1 -1
- package/dist/.pikku/function/pikku-functions-meta.gen.js +1 -1
- package/dist/.pikku/function/pikku-functions.gen.js +1 -1
- package/dist/.pikku/http/pikku-http-types.gen.d.ts +1 -1
- package/dist/.pikku/http/pikku-http-types.gen.js +1 -1
- package/dist/.pikku/http/pikku-http-wirings-meta.gen.js +1 -1
- package/dist/.pikku/http/pikku-http-wirings.gen.d.ts +1 -1
- package/dist/.pikku/http/pikku-http-wirings.gen.js +1 -1
- package/dist/.pikku/mcp/pikku-mcp-types.gen.d.ts +1 -1
- package/dist/.pikku/mcp/pikku-mcp-types.gen.js +1 -1
- package/dist/.pikku/pikku-bootstrap.gen.d.ts +1 -1
- package/dist/.pikku/pikku-bootstrap.gen.js +1 -1
- package/dist/.pikku/pikku-meta-service.gen.d.ts +1 -1
- package/dist/.pikku/pikku-meta-service.gen.js +1 -1
- package/dist/.pikku/pikku-services.gen.d.ts +1 -1
- 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/queue/pikku-queue-workers-wirings-meta.gen.js +1 -1
- package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.d.ts +1 -1
- package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.js +1 -1
- package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js +1 -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 +1 -1
- 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 +10 -5
- package/dist/.pikku/workflow/pikku-workflow-types.gen.js +1 -1
- package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +1 -1
- package/dist/.pikku/workflow/pikku-workflow-wirings.gen.js +1 -1
- package/dist/bin/pikku-bin.mjs +2 -2
- package/dist/src/functions/commands/new-addon.js +2 -0
- package/dist/src/functions/wirings/functions/serialize-function-types.js +3 -3
- package/dist/src/functions/wirings/workflow/serialize-workflow-types.js +24 -7
- package/dist/src/utils/precise-coverage-map.js +3 -1
- package/package.json +5 -5
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.12.
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.81
|
|
3
3
|
*/
|
|
4
4
|
import { CoreAIAgent, PikkuAIMiddlewareHooks } from '@pikku/core/ai-agent';
|
|
5
5
|
import type { PikkuPermission, PikkuMiddleware, Services, PikkuFunctionConfig } from '../function/pikku-function-types.gen.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.12.
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.81
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
5
|
* Core function, middleware, and permission types for all wirings
|
|
@@ -16,7 +16,7 @@ import type { Services } from '../../types/application-types.d.js';
|
|
|
16
16
|
import type { Config } from '../../types/application-types.d.js';
|
|
17
17
|
import type { TypedPikkuRPC, FlattenedRPCMap } from '../rpc/pikku-rpc-wirings-map.internal.gen.d.js';
|
|
18
18
|
import type { RequiredSingletonServices, RequiredWireServices } from '../pikku-services.gen.js';
|
|
19
|
-
import type { TypedWorkflow } from '../workflow/pikku-workflow-types.gen.js';
|
|
19
|
+
import type { TypedWorkflow, TypedScenario } from '../workflow/pikku-workflow-types.gen.js';
|
|
20
20
|
export type { SingletonServices as SingletonServices };
|
|
21
21
|
export type { Services as Services };
|
|
22
22
|
export type Session = UserSession;
|
|
@@ -215,7 +215,7 @@ export declare const pikkuApprovalDescription: <In = unknown, RequiredServices e
|
|
|
215
215
|
* @template Out - The output type that the function returns
|
|
216
216
|
* @template RequiredServices - Services required by this function
|
|
217
217
|
*/
|
|
218
|
-
export type PikkuFunctionSessionless<In = unknown, Out = never, RequiredWires extends keyof PikkuWire = never, RequiredServices extends Services = Services> = CorePikkuFunctionSessionless<In, Out, RequiredServices, Session, PickRequired<PikkuWire<In, Out, false, Session, TypedPikkuRPC, null, any, TypedWorkflow>, RequiredWires>>;
|
|
218
|
+
export type PikkuFunctionSessionless<In = unknown, Out = never, RequiredWires extends keyof PikkuWire = never, RequiredServices extends Services = Services> = CorePikkuFunctionSessionless<In, Out, RequiredServices, Session, PickRequired<PikkuWire<In, Out, false, Session, TypedPikkuRPC, null, any, TypedWorkflow, unknown, TypedScenario>, RequiredWires>>;
|
|
219
219
|
/**
|
|
220
220
|
* A session-aware API function that requires user authentication.
|
|
221
221
|
* Use this for protected endpoints that need access to user session data.
|
|
@@ -224,7 +224,7 @@ export type PikkuFunctionSessionless<In = unknown, Out = never, RequiredWires ex
|
|
|
224
224
|
* @template Out - The output type that the function returns
|
|
225
225
|
* @template RequiredServices - Services required by this function
|
|
226
226
|
*/
|
|
227
|
-
export type PikkuFunction<In = unknown, Out = never, RequiredWires extends keyof PikkuWire = 'session', RequiredServices extends Services = Services> = CorePikkuFunction<In, Out, RequiredServices, Session, PickRequired<PikkuWire<In, Out, true, Session, TypedPikkuRPC, null, any, TypedWorkflow>, RequiredWires>>;
|
|
227
|
+
export type PikkuFunction<In = unknown, Out = never, RequiredWires extends keyof PikkuWire = 'session', RequiredServices extends Services = Services> = CorePikkuFunction<In, Out, RequiredServices, Session, PickRequired<PikkuWire<In, Out, true, Session, TypedPikkuRPC, null, any, TypedWorkflow, unknown, TypedScenario>, RequiredWires>>;
|
|
228
228
|
/**
|
|
229
229
|
* Helper type to infer the output type from a Standard Schema
|
|
230
230
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.12.
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.81
|
|
3
3
|
*/
|
|
4
4
|
export { wireVariable } from '@pikku/core/variable';
|
|
5
5
|
export type { CoreVariable, VariableDefinitionMeta, VariableDefinitionsMeta } from '@pikku/core/variable';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.12.
|
|
2
|
+
* This file was generated by @pikku/cli@0.12.81
|
|
3
3
|
*/
|
|
4
4
|
import { WorkflowCancelledException } from '@pikku/core/workflow';
|
|
5
5
|
import { template } from '@pikku/core/workflow';
|
|
6
6
|
import { type PikkuWorkflowGraphConfig, type PikkuWorkflowGraphResult } from '@pikku/core/workflow';
|
|
7
|
-
import type { PikkuWorkflowWire, WorkflowStepOptions } from '@pikku/core/workflow';
|
|
7
|
+
import type { PikkuWorkflowWire, PikkuScenarioWire, WorkflowStepOptions } from '@pikku/core/workflow';
|
|
8
8
|
export { WorkflowCancelledException };
|
|
9
9
|
import type { PikkuFunctionSessionless, PikkuFunctionConfig } from '../function/pikku-function-types.gen.js';
|
|
10
10
|
import type { FlattenedRPCMap } from '../rpc/pikku-rpc-wirings-map.internal.gen.d.js';
|
|
@@ -16,11 +16,13 @@ export interface TypedWorkflow extends PikkuWorkflowWire {
|
|
|
16
16
|
do<K extends keyof FlattenedWorkflowMap>(stepName: string, workflowName: K, data: FlattenedWorkflowMap[K]['input'], options?: WorkflowStepOptions): Promise<FlattenedWorkflowMap[K]['output']>;
|
|
17
17
|
do<T>(stepName: string, fn: () => T | Promise<T>, options?: WorkflowStepOptions): Promise<T>;
|
|
18
18
|
}
|
|
19
|
+
export type TypedScenario = TypedWorkflow & Omit<PikkuScenarioWire, keyof PikkuWorkflowWire>;
|
|
19
20
|
import type { StandardSchemaV1 } from '@standard-schema/spec';
|
|
20
21
|
import type { InferSchemaOutput, PikkuPermission, PikkuMiddleware, NodeConfig, PikkuApprovalDescription } from '../function/pikku-function-types.gen.js';
|
|
21
22
|
import { PikkuError } from '@pikku/core/errors';
|
|
22
23
|
import type { CorePermissionGroup } from '@pikku/core';
|
|
23
24
|
export type PikkuFunctionWorkflow<In = unknown, Out = never> = PikkuFunctionSessionless<In, Out, 'workflow'>;
|
|
25
|
+
export type PikkuFunctionScenario<In = unknown, Out = never> = PikkuFunctionSessionless<In, Out, 'scenario' | 'actors'>;
|
|
24
26
|
export type PikkuWorkflowConfigWithSchema<InputSchema extends StandardSchemaV1 | undefined = undefined, OutputSchema extends StandardSchemaV1 | undefined = undefined> = {
|
|
25
27
|
title?: string;
|
|
26
28
|
description?: string;
|
|
@@ -48,14 +50,17 @@ export declare function pikkuWorkflowFunc<InputSchema extends StandardSchemaV1 |
|
|
|
48
50
|
export declare function pikkuWorkflowFunc<In, Out = unknown>(func: PikkuFunctionWorkflow<In, Out> | PikkuFunctionConfig<In, Out, 'workflow', PikkuFunctionWorkflow<In, Out>>): PikkuFunctionConfig<In, Out, 'workflow'>;
|
|
49
51
|
export declare function pikkuWorkflowComplexFunc<InputSchema extends StandardSchemaV1 | undefined = undefined, OutputSchema extends StandardSchemaV1 | undefined = undefined>(config: PikkuWorkflowConfigWithSchema<InputSchema, OutputSchema>): PikkuFunctionConfig<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, 'workflow', PikkuFunctionWorkflow<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown>, InputSchema, OutputSchema>;
|
|
50
52
|
export declare function pikkuWorkflowComplexFunc<In, Out = unknown>(func: PikkuFunctionWorkflow<In, Out> | PikkuFunctionConfig<In, Out, 'workflow', PikkuFunctionWorkflow<In, Out>>): PikkuFunctionConfig<In, Out, 'workflow'>;
|
|
53
|
+
export type PikkuScenarioConfigWithSchema<InputSchema extends StandardSchemaV1 | undefined = undefined, OutputSchema extends StandardSchemaV1 | undefined = undefined> = Omit<PikkuWorkflowConfigWithSchema<InputSchema, OutputSchema>, 'func'> & {
|
|
54
|
+
func: PikkuFunctionScenario<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown>;
|
|
55
|
+
};
|
|
51
56
|
/**
|
|
52
57
|
* A scenario: a complex workflow that drives the app the way users do.
|
|
53
|
-
* Steps run as actors over the REAL transport — `
|
|
58
|
+
* Steps run as actors over the REAL transport — `scenario.do(step, rpc,
|
|
54
59
|
* data, { actor: actors.yasser })` — so flows double as e2e tests and
|
|
55
60
|
* staged/production health checks (no state reset; scope what you create).
|
|
56
61
|
*/
|
|
57
|
-
export declare function pikkuScenario<InputSchema extends StandardSchemaV1 | undefined = undefined, OutputSchema extends StandardSchemaV1 | undefined = undefined>(config:
|
|
58
|
-
export declare function pikkuScenario<In, Out = unknown>(func:
|
|
62
|
+
export declare function pikkuScenario<InputSchema extends StandardSchemaV1 | undefined = undefined, OutputSchema extends StandardSchemaV1 | undefined = undefined>(config: PikkuScenarioConfigWithSchema<InputSchema, OutputSchema>): PikkuFunctionConfig<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, 'scenario' | 'actors', PikkuFunctionScenario<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown>, InputSchema, OutputSchema>;
|
|
63
|
+
export declare function pikkuScenario<In, Out = unknown>(func: PikkuFunctionScenario<In, Out> | PikkuFunctionConfig<In, Out, 'scenario' | 'actors', PikkuFunctionScenario<In, Out>>): PikkuFunctionConfig<In, Out, 'scenario' | 'actors'>;
|
|
59
64
|
type TypedRef<T> = {
|
|
60
65
|
$ref: string;
|
|
61
66
|
path?: string;
|
package/dist/bin/pikku-bin.mjs
CHANGED
|
@@ -11,8 +11,8 @@ async function checkForUpdate() {
|
|
|
11
11
|
})
|
|
12
12
|
if (!res.ok) return
|
|
13
13
|
const { version: latest } = await res.json()
|
|
14
|
-
if (latest !== '0.12.
|
|
15
|
-
process.stderr.write(`\n Update available 0.12.
|
|
14
|
+
if (latest !== '0.12.81') {
|
|
15
|
+
process.stderr.write(`\n Update available 0.12.81 → ${latest}\n brew upgrade pikku or npm install -g @pikku/cli\n\n`)
|
|
16
16
|
}
|
|
17
17
|
} catch {}
|
|
18
18
|
}
|
|
@@ -7,7 +7,7 @@ export const serializeFunctionTypes = (userSessionTypeImport, userSessionTypeNam
|
|
|
7
7
|
? nodeCategories.map((c) => `'${c}'`).join(' | ')
|
|
8
8
|
: 'string';
|
|
9
9
|
const workflowImport = workflowTypesImport ||
|
|
10
|
-
`import type { TypedWorkflow } from '../workflow/pikku-workflow-types.gen.js'`;
|
|
10
|
+
`import type { TypedWorkflow, TypedScenario } from '../workflow/pikku-workflow-types.gen.js'`;
|
|
11
11
|
return `/**
|
|
12
12
|
* Core function, middleware, and permission types for all wirings
|
|
13
13
|
*/
|
|
@@ -285,7 +285,7 @@ export type PikkuFunctionSessionless<
|
|
|
285
285
|
Out,
|
|
286
286
|
RequiredServices,
|
|
287
287
|
Session,
|
|
288
|
-
PickRequired<PikkuWire<In, Out, false, Session, TypedPikkuRPC, null, any, TypedWorkflow>, RequiredWires>
|
|
288
|
+
PickRequired<PikkuWire<In, Out, false, Session, TypedPikkuRPC, null, any, TypedWorkflow, unknown, TypedScenario>, RequiredWires>
|
|
289
289
|
>
|
|
290
290
|
|
|
291
291
|
/**
|
|
@@ -306,7 +306,7 @@ export type PikkuFunction<
|
|
|
306
306
|
Out,
|
|
307
307
|
RequiredServices,
|
|
308
308
|
Session,
|
|
309
|
-
PickRequired<PikkuWire<In, Out, true, Session, TypedPikkuRPC, null, any, TypedWorkflow>, RequiredWires>
|
|
309
|
+
PickRequired<PikkuWire<In, Out, true, Session, TypedPikkuRPC, null, any, TypedWorkflow, unknown, TypedScenario>, RequiredWires>
|
|
310
310
|
>
|
|
311
311
|
|
|
312
312
|
/**
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
type PikkuWorkflowGraphConfig,
|
|
7
7
|
type PikkuWorkflowGraphResult,
|
|
8
8
|
} from '@pikku/core/workflow'
|
|
9
|
-
import type { PikkuWorkflowWire, WorkflowStepOptions } from '@pikku/core/workflow'
|
|
9
|
+
import type { PikkuWorkflowWire, PikkuScenarioWire, WorkflowStepOptions } from '@pikku/core/workflow'
|
|
10
10
|
|
|
11
11
|
export { WorkflowCancelledException }
|
|
12
12
|
import type { PikkuFunctionSessionless, PikkuFunctionConfig } from '${functionTypesImportPath}'
|
|
@@ -38,6 +38,8 @@ export interface TypedWorkflow extends PikkuWorkflowWire {
|
|
|
38
38
|
): Promise<T>
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
+
export type TypedScenario = TypedWorkflow & Omit<PikkuScenarioWire, keyof PikkuWorkflowWire>
|
|
42
|
+
|
|
41
43
|
import type { StandardSchemaV1 } from '@standard-schema/spec'
|
|
42
44
|
import type { InferSchemaOutput, PikkuPermission, PikkuMiddleware, NodeConfig, PikkuApprovalDescription } from '${functionTypesImportPath}'
|
|
43
45
|
import { PikkuError } from '@pikku/core/errors'
|
|
@@ -48,6 +50,11 @@ export type PikkuFunctionWorkflow<
|
|
|
48
50
|
Out = never
|
|
49
51
|
> = PikkuFunctionSessionless<In, Out, 'workflow'>
|
|
50
52
|
|
|
53
|
+
export type PikkuFunctionScenario<
|
|
54
|
+
In = unknown,
|
|
55
|
+
Out = never
|
|
56
|
+
> = PikkuFunctionSessionless<In, Out, 'scenario' | 'actors'>
|
|
57
|
+
|
|
51
58
|
export type PikkuWorkflowConfigWithSchema<
|
|
52
59
|
InputSchema extends StandardSchemaV1 | undefined = undefined,
|
|
53
60
|
OutputSchema extends StandardSchemaV1 | undefined = undefined
|
|
@@ -108,9 +115,19 @@ export function pikkuWorkflowComplexFunc(func: any) {
|
|
|
108
115
|
return typeof func === 'function' ? { func } : func
|
|
109
116
|
}
|
|
110
117
|
|
|
118
|
+
export type PikkuScenarioConfigWithSchema<
|
|
119
|
+
InputSchema extends StandardSchemaV1 | undefined = undefined,
|
|
120
|
+
OutputSchema extends StandardSchemaV1 | undefined = undefined
|
|
121
|
+
> = Omit<PikkuWorkflowConfigWithSchema<InputSchema, OutputSchema>, 'func'> & {
|
|
122
|
+
func: PikkuFunctionScenario<
|
|
123
|
+
InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown,
|
|
124
|
+
OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown
|
|
125
|
+
>
|
|
126
|
+
}
|
|
127
|
+
|
|
111
128
|
/**
|
|
112
129
|
* A scenario: a complex workflow that drives the app the way users do.
|
|
113
|
-
* Steps run as actors over the REAL transport — \`
|
|
130
|
+
* Steps run as actors over the REAL transport — \`scenario.do(step, rpc,
|
|
114
131
|
* data, { actor: actors.yasser })\` — so flows double as e2e tests and
|
|
115
132
|
* staged/production health checks (no state reset; scope what you create).
|
|
116
133
|
*/
|
|
@@ -118,13 +135,13 @@ export function pikkuScenario<
|
|
|
118
135
|
InputSchema extends StandardSchemaV1 | undefined = undefined,
|
|
119
136
|
OutputSchema extends StandardSchemaV1 | undefined = undefined
|
|
120
137
|
>(
|
|
121
|
-
config:
|
|
122
|
-
): PikkuFunctionConfig<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, '
|
|
138
|
+
config: PikkuScenarioConfigWithSchema<InputSchema, OutputSchema>
|
|
139
|
+
): PikkuFunctionConfig<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown, 'scenario' | 'actors', PikkuFunctionScenario<InputSchema extends StandardSchemaV1 ? InferSchemaOutput<InputSchema> : unknown, OutputSchema extends StandardSchemaV1 ? InferSchemaOutput<OutputSchema> : unknown>, InputSchema, OutputSchema>
|
|
123
140
|
export function pikkuScenario<In, Out = unknown>(
|
|
124
141
|
func:
|
|
125
|
-
|
|
|
126
|
-
| PikkuFunctionConfig<In, Out, '
|
|
127
|
-
): PikkuFunctionConfig<In, Out, '
|
|
142
|
+
| PikkuFunctionScenario<In, Out>
|
|
143
|
+
| PikkuFunctionConfig<In, Out, 'scenario' | 'actors', PikkuFunctionScenario<In, Out>>
|
|
144
|
+
): PikkuFunctionConfig<In, Out, 'scenario' | 'actors'>
|
|
128
145
|
export function pikkuScenario(func: any) {
|
|
129
146
|
return typeof func === 'function' ? { func } : func
|
|
130
147
|
}
|
|
@@ -118,7 +118,9 @@ export async function mapPreciseCoverage(scripts, getScriptSource, functionsMeta
|
|
|
118
118
|
}
|
|
119
119
|
export function mapLineHitsToReport(lineHits, functionsMeta) {
|
|
120
120
|
const functions = Object.values(functionsMeta)
|
|
121
|
-
.filter((m) => m.sourceFile &&
|
|
121
|
+
.filter((m) => m.sourceFile &&
|
|
122
|
+
!m.sourceFile.endsWith('.gen.ts') &&
|
|
123
|
+
m.funcWrapper !== 'pikkuScenario')
|
|
122
124
|
.map((m) => {
|
|
123
125
|
const hits = lineHits.get(m.bodySourceFile ?? m.sourceFile);
|
|
124
126
|
const covered = [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pikku/cli",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.81",
|
|
4
4
|
"author": "yasser.fadl@gmail.com",
|
|
5
5
|
"license": "BUSL-1.1",
|
|
6
6
|
"imports": {
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
"@pikku/bun-server": "^0.12.4",
|
|
33
33
|
"@pikku/deploy-cloudflare": "^0.12.8",
|
|
34
34
|
"@pikku/fetch": "^0.12.7",
|
|
35
|
-
"@pikku/inspector": "^0.12.
|
|
35
|
+
"@pikku/inspector": "^0.12.42",
|
|
36
36
|
"@pikku/kysely": "^0.13.0",
|
|
37
37
|
"@pikku/kysely-node-sqlite": "^0.12.3",
|
|
38
38
|
"@pikku/node-http-server": "^0.12.6",
|
|
39
|
-
"@pikku/openapi-parser": "^0.12.
|
|
39
|
+
"@pikku/openapi-parser": "^0.12.15",
|
|
40
40
|
"@pikku/schedule": "^0.12.4",
|
|
41
41
|
"@pikku/ws": "^0.12.4",
|
|
42
42
|
"@types/cookie": "^1.0.0",
|
|
@@ -59,10 +59,10 @@
|
|
|
59
59
|
"zod-to-ts": "^2.1.0"
|
|
60
60
|
},
|
|
61
61
|
"peerDependencies": {
|
|
62
|
-
"@pikku/core": "^0.12.
|
|
62
|
+
"@pikku/core": "^0.12.62"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
|
-
"@pikku/core": "^0.12.
|
|
65
|
+
"@pikku/core": "^0.12.62",
|
|
66
66
|
"@types/istanbul-lib-instrument": "^1.7.7",
|
|
67
67
|
"@types/node": "^24.11.0",
|
|
68
68
|
"@types/pg": "^8.11.0",
|