@pikku/cli 0.12.39 → 0.12.41
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/console-app/assets/{index-Dxl3JsMK.js → index-D9Z9rySK.js} +2 -2
- 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 +3 -3
- package/dist/.pikku/channel/pikku-channel-types.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli-channel.d.ts +6 -6
- package/dist/.pikku/cli/pikku-cli-channel.js +16 -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 +47 -0
- 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 +2 -2
- 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-meta.gen.json +229 -178
- 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/rpc/pikku-rpc-wirings-meta.internal.gen.json +5 -2
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.d.ts +1 -1
- package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js +1 -1
- package/dist/.pikku/schemas/register.gen.js +13 -9
- package/dist/.pikku/schemas/schemas/LogoutInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/WhoamiInput.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 +1 -1
- package/dist/.pikku/workflow/pikku-workflow-types.gen.js +1 -1
- package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +1 -1
- package/dist/.pikku/workflow/pikku-workflow-wirings.gen.js +1 -1
- package/dist/bin/pikku-bin.mjs +2 -2
- package/dist/src/cli.wiring.js +45 -0
- package/dist/src/deploy/build-pipeline.d.ts +1 -0
- package/dist/src/deploy/build-pipeline.js +1 -1
- package/dist/src/fabric/fabric-commands.d.ts +63 -63
- package/dist/src/fabric/functions/db-schema.function.d.ts +3 -3
- package/dist/src/fabric/functions/deploy-list.function.d.ts +3 -3
- package/dist/src/fabric/functions/deploy-units.function.d.ts +3 -3
- package/dist/src/fabric/functions/deploy.function.d.ts +6 -6
- package/dist/src/fabric/functions/domains-add.function.d.ts +3 -3
- package/dist/src/fabric/functions/domains-list.function.d.ts +3 -3
- package/dist/src/fabric/functions/domains-remove.function.d.ts +3 -3
- package/dist/src/fabric/functions/errors.function.d.ts +3 -3
- package/dist/src/fabric/functions/init.function.d.ts +3 -3
- package/dist/src/fabric/functions/link.function.d.ts +3 -3
- package/dist/src/fabric/functions/llm-key.function.d.ts +3 -3
- package/dist/src/fabric/functions/login.function.d.ts +3 -3
- package/dist/src/fabric/functions/logs.function.d.ts +3 -3
- package/dist/src/fabric/functions/metrics.function.d.ts +3 -3
- package/dist/src/fabric/functions/rollback.function.d.ts +3 -3
- package/dist/src/fabric/functions/secrets-list.function.d.ts +3 -3
- package/dist/src/fabric/functions/secrets-set.function.d.ts +3 -3
- package/dist/src/fabric/functions/status.function.d.ts +3 -3
- package/dist/src/fabric/functions/trace.function.d.ts +3 -3
- package/dist/src/fabric/functions/validate-core.js +2 -7
- package/dist/src/fabric/functions/validate.function.d.ts +3 -3
- package/dist/src/fabric/functions/validate.function.js +16 -14
- package/dist/src/functions/commands/all.d.ts +1 -1
- package/dist/src/functions/commands/binary.d.ts +3 -3
- package/dist/src/functions/commands/bootstrap.d.ts +1 -1
- package/dist/src/functions/commands/console.d.ts +3 -3
- package/dist/src/functions/commands/db-audit.d.ts +1 -1
- package/dist/src/functions/commands/db-generate.d.ts +1 -1
- package/dist/src/functions/commands/db-generate.js +0 -3
- package/dist/src/functions/commands/db-migrate.d.ts +1 -1
- package/dist/src/functions/commands/db-reset.d.ts +1 -1
- package/dist/src/functions/commands/db-reset.js +11 -7
- package/dist/src/functions/commands/db-seed.d.ts +1 -1
- package/dist/src/functions/commands/db-seed.js +4 -7
- package/dist/src/functions/commands/db-shared.js +2 -4
- package/dist/src/functions/commands/deploy-apply.d.ts +3 -3
- package/dist/src/functions/commands/deploy-apply.js +1 -0
- package/dist/src/functions/commands/deploy-info.d.ts +1 -1
- package/dist/src/functions/commands/deploy-plan.d.ts +3 -3
- package/dist/src/functions/commands/deploy-plan.js +1 -0
- package/dist/src/functions/commands/dev.d.ts +3 -3
- package/dist/src/functions/commands/dev.js +1 -1
- package/dist/src/functions/commands/emails-init.d.ts +1 -1
- package/dist/src/functions/commands/enable.d.ts +5 -5
- package/dist/src/functions/commands/info.d.ts +4 -4
- package/dist/src/functions/commands/login.d.ts +37 -0
- package/dist/src/functions/commands/login.js +85 -0
- package/dist/src/functions/commands/meta.d.ts +31 -31
- package/dist/src/functions/commands/new-addon.d.ts +3 -3
- package/dist/src/functions/commands/new-function.d.ts +3 -3
- package/dist/src/functions/commands/new-middleware.d.ts +3 -3
- package/dist/src/functions/commands/new-permission.d.ts +3 -3
- package/dist/src/functions/commands/new-wiring.d.ts +3 -3
- package/dist/src/functions/commands/pikku-command-bootstrap.d.ts +1 -1
- package/dist/src/functions/commands/pikku-command-summary.d.ts +1 -1
- package/dist/src/functions/commands/skills.d.ts +6 -6
- package/dist/src/functions/commands/tests-coverage.d.ts +3 -3
- package/dist/src/functions/commands/tests-init.d.ts +3 -3
- package/dist/src/functions/commands/versions-check.d.ts +1 -1
- package/dist/src/functions/commands/versions-init.d.ts +3 -3
- package/dist/src/functions/commands/versions-update.d.ts +1 -1
- package/dist/src/functions/commands/watch.d.ts +3 -3
- package/dist/src/functions/commands/workspace-validate.d.ts +3 -3
- package/dist/src/functions/db/local-db.d.ts +9 -5
- package/dist/src/functions/db/local-db.js +275 -107
- package/dist/src/functions/db/postgres/pglite-kysely.d.ts +8 -0
- package/dist/src/functions/db/postgres/pglite-kysely.js +79 -0
- package/dist/src/functions/db/postgres/postgres-introspector.d.ts +1 -0
- package/dist/src/functions/db/postgres/postgres-introspector.js +6 -1
- package/dist/src/functions/db/postgres/postgres-migrator.d.ts +7 -2
- package/dist/src/functions/db/postgres/postgres-migrator.js +6 -1
- package/dist/src/functions/runtimes/fetch/index.d.ts +1 -1
- package/dist/src/functions/runtimes/nextjs/pikku-command-nextjs.d.ts +1 -1
- package/dist/src/functions/runtimes/tanstack-start/pikku-command-tanstack-start.d.ts +1 -1
- package/dist/src/functions/runtimes/websocket/pikku-command-websocket-typed.d.ts +1 -1
- package/dist/src/functions/validate/workspace-validate.js +4 -4
- package/dist/src/functions/wirings/ai-agent/pikku-command-ai-agent-types.d.ts +1 -1
- package/dist/src/functions/wirings/ai-agent/pikku-command-ai-agent.d.ts +1 -1
- package/dist/src/functions/wirings/ai-agent/pikku-command-public-agent.d.ts +1 -1
- package/dist/src/functions/wirings/auth/pikku-command-auth.d.ts +1 -1
- package/dist/src/functions/wirings/channels/pikku-channels.d.ts +1 -1
- package/dist/src/functions/wirings/channels/pikku-command-channel-types.d.ts +1 -1
- package/dist/src/functions/wirings/channels/pikku-command-channels-map.d.ts +1 -1
- package/dist/src/functions/wirings/channels/pikku-command-channels.d.ts +1 -1
- package/dist/src/functions/wirings/cli/pikku-command-cli-entry.d.ts +1 -1
- package/dist/src/functions/wirings/cli/pikku-command-cli-types.d.ts +1 -1
- package/dist/src/functions/wirings/cli/pikku-command-cli.d.ts +1 -1
- package/dist/src/functions/wirings/cli/serialize-channel-cli-client.js +38 -7
- package/dist/src/functions/wirings/console/pikku-command-console-functions.d.ts +1 -1
- package/dist/src/functions/wirings/console/pikku-command-node-types.d.ts +1 -1
- package/dist/src/functions/wirings/console/pikku-command-nodes-meta.d.ts +1 -1
- package/dist/src/functions/wirings/credentials/pikku-command-credentials.d.ts +1 -1
- package/dist/src/functions/wirings/emails/pikku-command-emails.d.ts +1 -1
- package/dist/src/functions/wirings/functions/pikku-command-addon-types.d.ts +1 -1
- package/dist/src/functions/wirings/functions/pikku-command-function-types-split.d.ts +3 -3
- package/dist/src/functions/wirings/functions/pikku-command-function-types.d.ts +3 -3
- package/dist/src/functions/wirings/functions/pikku-command-functions.d.ts +1 -1
- package/dist/src/functions/wirings/functions/pikku-command-services.d.ts +1 -1
- package/dist/src/functions/wirings/functions/schemas.d.ts +1 -1
- package/dist/src/functions/wirings/gateway/pikku-command-gateway.d.ts +1 -1
- package/dist/src/functions/wirings/http/pikku-command-http-map.d.ts +1 -1
- package/dist/src/functions/wirings/http/pikku-command-http-routes.d.ts +1 -1
- package/dist/src/functions/wirings/http/pikku-command-http-types.d.ts +1 -1
- package/dist/src/functions/wirings/http/pikku-command-openapi.d.ts +1 -1
- package/dist/src/functions/wirings/http/pikku-http-routes.d.ts +1 -1
- package/dist/src/functions/wirings/mcp/pikku-command-mcp-json.d.ts +1 -1
- package/dist/src/functions/wirings/mcp/pikku-command-mcp-types.d.ts +1 -1
- package/dist/src/functions/wirings/mcp/pikku-command-mcp.d.ts +1 -1
- package/dist/src/functions/wirings/middleware/pikku-command-middleware.d.ts +1 -1
- package/dist/src/functions/wirings/package/pikku-command-package-types.d.ts +2 -2
- package/dist/src/functions/wirings/package/pikku-command-package.d.ts +1 -1
- package/dist/src/functions/wirings/permissions/pikku-command-permissions.d.ts +1 -1
- package/dist/src/functions/wirings/queue/pikku-command-queue-map.d.ts +1 -1
- package/dist/src/functions/wirings/queue/pikku-command-queue-service.d.ts +1 -1
- package/dist/src/functions/wirings/queue/pikku-command-queue-types.d.ts +1 -1
- package/dist/src/functions/wirings/queue/pikku-command-queue.d.ts +1 -1
- package/dist/src/functions/wirings/queue/pikku-queue-map.d.ts +1 -1
- package/dist/src/functions/wirings/queue/pikku-queue.d.ts +1 -1
- package/dist/src/functions/wirings/realtime/pikku-command-events-scaffold.d.ts +1 -1
- package/dist/src/functions/wirings/realtime/pikku-command-realtime.d.ts +1 -1
- package/dist/src/functions/wirings/rpc/pikku-command-public-rpc.d.ts +1 -1
- package/dist/src/functions/wirings/rpc/pikku-command-react-query.d.ts +1 -1
- package/dist/src/functions/wirings/rpc/pikku-command-remote-rpc.d.ts +1 -1
- package/dist/src/functions/wirings/rpc/pikku-command-rpc-client.d.ts +1 -1
- package/dist/src/functions/wirings/rpc/pikku-command-rpc-map.d.ts +2 -2
- package/dist/src/functions/wirings/rpc/pikku-command-rpc.d.ts +1 -1
- package/dist/src/functions/wirings/scheduler/pikku-command-scheduler-types.d.ts +1 -1
- package/dist/src/functions/wirings/scheduler/pikku-command-scheduler.d.ts +1 -1
- package/dist/src/functions/wirings/secrets/pikku-command-secrets.d.ts +1 -1
- package/dist/src/functions/wirings/triggers/pikku-command-trigger-types.d.ts +3 -3
- package/dist/src/functions/wirings/triggers/pikku-command-trigger.d.ts +1 -1
- package/dist/src/functions/wirings/variables/pikku-command-variables.d.ts +1 -1
- package/dist/src/functions/wirings/workflow/pikku-command-workflow-routes.d.ts +1 -1
- package/dist/src/functions/wirings/workflow/pikku-command-workflow.d.ts +1 -1
- package/dist/src/scaffold/rpc-remote.gen.d.ts +3 -3
- package/dist/src/scaffold/rpc-remote.gen.js +1 -1
- package/dist/src/utils/cli-session.d.ts +40 -0
- package/dist/src/utils/cli-session.js +73 -0
- package/dist/src/utils/device-auth.d.ts +28 -0
- package/dist/src/utils/device-auth.js +111 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -3
- package/skills/pikku-machine-auth/SKILL.md +177 -0
|
@@ -38,7 +38,7 @@ export declare const FabricDeployPlan: import("../../../.pikku/pikku-types.gen.j
|
|
|
38
38
|
branch: string;
|
|
39
39
|
ref: string;
|
|
40
40
|
requestedRef?: string | undefined;
|
|
41
|
-
}, "
|
|
41
|
+
}, "session" | "rpc", import("../../../.pikku/pikku-types.gen.js").PikkuFunctionSessionless<{
|
|
42
42
|
branch?: string | undefined;
|
|
43
43
|
production?: boolean | undefined;
|
|
44
44
|
ref?: string | undefined;
|
|
@@ -49,7 +49,7 @@ export declare const FabricDeployPlan: import("../../../.pikku/pikku-types.gen.j
|
|
|
49
49
|
branch: string;
|
|
50
50
|
ref: string;
|
|
51
51
|
requestedRef?: string | undefined;
|
|
52
|
-
}, "
|
|
52
|
+
}, "session" | "rpc", import("../../../types/application-types.js").Services> | import("../../../.pikku/pikku-types.gen.js").PikkuFunction<{
|
|
53
53
|
branch?: string | undefined;
|
|
54
54
|
production?: boolean | undefined;
|
|
55
55
|
ref?: string | undefined;
|
|
@@ -60,7 +60,7 @@ export declare const FabricDeployPlan: import("../../../.pikku/pikku-types.gen.j
|
|
|
60
60
|
branch: string;
|
|
61
61
|
ref: string;
|
|
62
62
|
requestedRef?: string | undefined;
|
|
63
|
-
}, "
|
|
63
|
+
}, "session" | "rpc", import("../../../types/application-types.js").Services>, undefined, undefined>;
|
|
64
64
|
export declare const FabricDeployApply: import("../../../.pikku/pikku-types.gen.js").PikkuFunctionConfig<{
|
|
65
65
|
branch?: string | undefined;
|
|
66
66
|
production?: boolean | undefined;
|
|
@@ -74,7 +74,7 @@ export declare const FabricDeployApply: import("../../../.pikku/pikku-types.gen.
|
|
|
74
74
|
deploymentId: string;
|
|
75
75
|
stageId: string;
|
|
76
76
|
runId: string;
|
|
77
|
-
}, "
|
|
77
|
+
}, "session" | "rpc", import("../../../.pikku/pikku-types.gen.js").PikkuFunctionSessionless<{
|
|
78
78
|
branch?: string | undefined;
|
|
79
79
|
production?: boolean | undefined;
|
|
80
80
|
ref?: string | undefined;
|
|
@@ -87,7 +87,7 @@ export declare const FabricDeployApply: import("../../../.pikku/pikku-types.gen.
|
|
|
87
87
|
deploymentId: string;
|
|
88
88
|
stageId: string;
|
|
89
89
|
runId: string;
|
|
90
|
-
}, "
|
|
90
|
+
}, "session" | "rpc", import("../../../types/application-types.js").Services> | import("../../../.pikku/pikku-types.gen.js").PikkuFunction<{
|
|
91
91
|
branch?: string | undefined;
|
|
92
92
|
production?: boolean | undefined;
|
|
93
93
|
ref?: string | undefined;
|
|
@@ -100,6 +100,6 @@ export declare const FabricDeployApply: import("../../../.pikku/pikku-types.gen.
|
|
|
100
100
|
deploymentId: string;
|
|
101
101
|
stageId: string;
|
|
102
102
|
runId: string;
|
|
103
|
-
}, "
|
|
103
|
+
}, "session" | "rpc", import("../../../types/application-types.js").Services>, undefined, undefined>;
|
|
104
104
|
export declare const renderDeployPlan: (_s: unknown, { projectId, branch, ref, requestedRef, }: z.infer<typeof FabricDeployPlanOutput>) => void;
|
|
105
105
|
export declare const renderDeployApply: (_s: unknown, { branch, ref, deploymentId }: z.infer<typeof FabricDeployApplyOutput>) => void;
|
|
@@ -18,18 +18,18 @@ export declare const FabricDomainsAdd: import("../../../.pikku/pikku-types.gen.j
|
|
|
18
18
|
}, {
|
|
19
19
|
hostname: string;
|
|
20
20
|
cnameTarget: string;
|
|
21
|
-
}, "
|
|
21
|
+
}, "session" | "rpc", import("../../../.pikku/pikku-types.gen.js").PikkuFunctionSessionless<{
|
|
22
22
|
hostname: string;
|
|
23
23
|
target?: "api" | "app" | undefined;
|
|
24
24
|
apiUrl?: string | undefined;
|
|
25
25
|
}, {
|
|
26
26
|
hostname: string;
|
|
27
27
|
cnameTarget: string;
|
|
28
|
-
}, "
|
|
28
|
+
}, "session" | "rpc", import("../../../types/application-types.js").Services> | import("../../../.pikku/pikku-types.gen.js").PikkuFunction<{
|
|
29
29
|
hostname: string;
|
|
30
30
|
target?: "api" | "app" | undefined;
|
|
31
31
|
apiUrl?: string | undefined;
|
|
32
32
|
}, {
|
|
33
33
|
hostname: string;
|
|
34
34
|
cnameTarget: string;
|
|
35
|
-
}, "
|
|
35
|
+
}, "session" | "rpc", import("../../../types/application-types.js").Services>, undefined, undefined>;
|
|
@@ -9,12 +9,12 @@ export declare const FabricDomainsList: import("../../../.pikku/pikku-types.gen.
|
|
|
9
9
|
apiUrl?: string | undefined;
|
|
10
10
|
}, {
|
|
11
11
|
count: number;
|
|
12
|
-
}, "
|
|
12
|
+
}, "session" | "rpc", import("../../../.pikku/pikku-types.gen.js").PikkuFunctionSessionless<{
|
|
13
13
|
apiUrl?: string | undefined;
|
|
14
14
|
}, {
|
|
15
15
|
count: number;
|
|
16
|
-
}, "
|
|
16
|
+
}, "session" | "rpc", import("../../../types/application-types.js").Services> | import("../../../.pikku/pikku-types.gen.js").PikkuFunction<{
|
|
17
17
|
apiUrl?: string | undefined;
|
|
18
18
|
}, {
|
|
19
19
|
count: number;
|
|
20
|
-
}, "
|
|
20
|
+
}, "session" | "rpc", import("../../../types/application-types.js").Services>, undefined, undefined>;
|
|
@@ -11,14 +11,14 @@ export declare const FabricDomainsRemove: import("../../../.pikku/pikku-types.ge
|
|
|
11
11
|
apiUrl?: string | undefined;
|
|
12
12
|
}, {
|
|
13
13
|
removed: boolean;
|
|
14
|
-
}, "
|
|
14
|
+
}, "session" | "rpc", import("../../../.pikku/pikku-types.gen.js").PikkuFunctionSessionless<{
|
|
15
15
|
hostname: string;
|
|
16
16
|
apiUrl?: string | undefined;
|
|
17
17
|
}, {
|
|
18
18
|
removed: boolean;
|
|
19
|
-
}, "
|
|
19
|
+
}, "session" | "rpc", import("../../../types/application-types.js").Services> | import("../../../.pikku/pikku-types.gen.js").PikkuFunction<{
|
|
20
20
|
hostname: string;
|
|
21
21
|
apiUrl?: string | undefined;
|
|
22
22
|
}, {
|
|
23
23
|
removed: boolean;
|
|
24
|
-
}, "
|
|
24
|
+
}, "session" | "rpc", import("../../../types/application-types.js").Services>, undefined, undefined>;
|
|
@@ -18,19 +18,19 @@ export declare const FabricErrors: import("../../../.pikku/pikku-types.gen.js").
|
|
|
18
18
|
}, {
|
|
19
19
|
branch: string;
|
|
20
20
|
errors: any[];
|
|
21
|
-
}, "
|
|
21
|
+
}, "session" | "rpc", import("../../../.pikku/pikku-types.gen.js").PikkuFunctionSessionless<{
|
|
22
22
|
branch: string;
|
|
23
23
|
function?: string | undefined;
|
|
24
24
|
}, {
|
|
25
25
|
branch: string;
|
|
26
26
|
errors: any[];
|
|
27
|
-
}, "
|
|
27
|
+
}, "session" | "rpc", import("../../../types/application-types.js").Services> | import("../../../.pikku/pikku-types.gen.js").PikkuFunction<{
|
|
28
28
|
branch: string;
|
|
29
29
|
function?: string | undefined;
|
|
30
30
|
}, {
|
|
31
31
|
branch: string;
|
|
32
32
|
errors: any[];
|
|
33
|
-
}, "
|
|
33
|
+
}, "session" | "rpc", import("../../../types/application-types.js").Services>, undefined, undefined>;
|
|
34
34
|
type ErrorRow = {
|
|
35
35
|
timestamp: string;
|
|
36
36
|
functionName: string;
|
|
@@ -28,7 +28,7 @@ export declare const FabricInit: import("../../../.pikku/pikku-types.gen.js").Pi
|
|
|
28
28
|
projectId: string;
|
|
29
29
|
projectSlug: string;
|
|
30
30
|
path: string;
|
|
31
|
-
}, "
|
|
31
|
+
}, "session" | "rpc", import("../../../.pikku/pikku-types.gen.js").PikkuFunctionSessionless<{
|
|
32
32
|
repo: string;
|
|
33
33
|
name?: string | undefined;
|
|
34
34
|
branch?: string | undefined;
|
|
@@ -38,7 +38,7 @@ export declare const FabricInit: import("../../../.pikku/pikku-types.gen.js").Pi
|
|
|
38
38
|
projectId: string;
|
|
39
39
|
projectSlug: string;
|
|
40
40
|
path: string;
|
|
41
|
-
}, "
|
|
41
|
+
}, "session" | "rpc", import("../../../types/application-types.js").Services> | import("../../../.pikku/pikku-types.gen.js").PikkuFunction<{
|
|
42
42
|
repo: string;
|
|
43
43
|
name?: string | undefined;
|
|
44
44
|
branch?: string | undefined;
|
|
@@ -48,4 +48,4 @@ export declare const FabricInit: import("../../../.pikku/pikku-types.gen.js").Pi
|
|
|
48
48
|
projectId: string;
|
|
49
49
|
projectSlug: string;
|
|
50
50
|
path: string;
|
|
51
|
-
}, "
|
|
51
|
+
}, "session" | "rpc", import("../../../types/application-types.js").Services>, undefined, undefined>;
|
|
@@ -13,16 +13,16 @@ export declare const FabricLink: import("../../../.pikku/pikku-types.gen.js").Pi
|
|
|
13
13
|
projectSlug: string;
|
|
14
14
|
deploymentId: string;
|
|
15
15
|
stageId: string;
|
|
16
|
-
}, "
|
|
16
|
+
}, "session" | "rpc", import("../../../.pikku/pikku-types.gen.js").PikkuFunctionSessionless<{
|
|
17
17
|
apiUrl?: string | undefined;
|
|
18
18
|
}, {
|
|
19
19
|
projectSlug: string;
|
|
20
20
|
deploymentId: string;
|
|
21
21
|
stageId: string;
|
|
22
|
-
}, "
|
|
22
|
+
}, "session" | "rpc", import("../../../types/application-types.js").Services> | import("../../../.pikku/pikku-types.gen.js").PikkuFunction<{
|
|
23
23
|
apiUrl?: string | undefined;
|
|
24
24
|
}, {
|
|
25
25
|
projectSlug: string;
|
|
26
26
|
deploymentId: string;
|
|
27
27
|
stageId: string;
|
|
28
|
-
}, "
|
|
28
|
+
}, "session" | "rpc", import("../../../types/application-types.js").Services>, undefined, undefined>;
|
|
@@ -22,7 +22,7 @@ export declare const FabricLLMKey: import("../../../.pikku/pikku-types.gen.js").
|
|
|
22
22
|
proxyUrl: string;
|
|
23
23
|
apiKey: string;
|
|
24
24
|
format: "text" | "json" | "env" | "shell";
|
|
25
|
-
}, "
|
|
25
|
+
}, "session" | "rpc", import("../../../.pikku/pikku-types.gen.js").PikkuFunctionSessionless<{
|
|
26
26
|
shell?: boolean | undefined;
|
|
27
27
|
env?: boolean | undefined;
|
|
28
28
|
json?: boolean | undefined;
|
|
@@ -30,7 +30,7 @@ export declare const FabricLLMKey: import("../../../.pikku/pikku-types.gen.js").
|
|
|
30
30
|
proxyUrl: string;
|
|
31
31
|
apiKey: string;
|
|
32
32
|
format: "text" | "json" | "env" | "shell";
|
|
33
|
-
}, "
|
|
33
|
+
}, "session" | "rpc", import("../../../types/application-types.js").Services> | import("../../../.pikku/pikku-types.gen.js").PikkuFunction<{
|
|
34
34
|
shell?: boolean | undefined;
|
|
35
35
|
env?: boolean | undefined;
|
|
36
36
|
json?: boolean | undefined;
|
|
@@ -38,7 +38,7 @@ export declare const FabricLLMKey: import("../../../.pikku/pikku-types.gen.js").
|
|
|
38
38
|
proxyUrl: string;
|
|
39
39
|
apiKey: string;
|
|
40
40
|
format: "text" | "json" | "env" | "shell";
|
|
41
|
-
}, "
|
|
41
|
+
}, "session" | "rpc", import("../../../types/application-types.js").Services>, undefined, undefined>;
|
|
42
42
|
export declare const renderLLMKey: (_services: unknown, data: {
|
|
43
43
|
proxyUrl: string;
|
|
44
44
|
apiKey: string;
|
|
@@ -23,7 +23,7 @@ export declare const FabricLogin: import("../../../.pikku/pikku-types.gen.js").P
|
|
|
23
23
|
}, {
|
|
24
24
|
ok: boolean;
|
|
25
25
|
apiUrl: string;
|
|
26
|
-
}, "
|
|
26
|
+
}, "session" | "rpc", import("../../../.pikku/pikku-types.gen.js").PikkuFunctionSessionless<{
|
|
27
27
|
apiKey?: string | undefined;
|
|
28
28
|
token?: string | undefined;
|
|
29
29
|
apiUrl?: string | undefined;
|
|
@@ -31,7 +31,7 @@ export declare const FabricLogin: import("../../../.pikku/pikku-types.gen.js").P
|
|
|
31
31
|
}, {
|
|
32
32
|
ok: boolean;
|
|
33
33
|
apiUrl: string;
|
|
34
|
-
}, "
|
|
34
|
+
}, "session" | "rpc", import("../../../types/application-types.js").Services> | import("../../../.pikku/pikku-types.gen.js").PikkuFunction<{
|
|
35
35
|
apiKey?: string | undefined;
|
|
36
36
|
token?: string | undefined;
|
|
37
37
|
apiUrl?: string | undefined;
|
|
@@ -39,4 +39,4 @@ export declare const FabricLogin: import("../../../.pikku/pikku-types.gen.js").P
|
|
|
39
39
|
}, {
|
|
40
40
|
ok: boolean;
|
|
41
41
|
apiUrl: string;
|
|
42
|
-
}, "
|
|
42
|
+
}, "session" | "rpc", import("../../../types/application-types.js").Services>, undefined, undefined>;
|
|
@@ -19,7 +19,7 @@ export declare const FabricLogs: import("../../../.pikku/pikku-types.gen.js").Pi
|
|
|
19
19
|
json?: boolean | undefined;
|
|
20
20
|
}, {
|
|
21
21
|
count: number;
|
|
22
|
-
}, "
|
|
22
|
+
}, "session" | "rpc", import("../../../.pikku/pikku-types.gen.js").PikkuFunctionSessionless<{
|
|
23
23
|
branch?: string | undefined;
|
|
24
24
|
deployment?: string | undefined;
|
|
25
25
|
level?: string | undefined;
|
|
@@ -28,7 +28,7 @@ export declare const FabricLogs: import("../../../.pikku/pikku-types.gen.js").Pi
|
|
|
28
28
|
json?: boolean | undefined;
|
|
29
29
|
}, {
|
|
30
30
|
count: number;
|
|
31
|
-
}, "
|
|
31
|
+
}, "session" | "rpc", import("../../../types/application-types.js").Services> | import("../../../.pikku/pikku-types.gen.js").PikkuFunction<{
|
|
32
32
|
branch?: string | undefined;
|
|
33
33
|
deployment?: string | undefined;
|
|
34
34
|
level?: string | undefined;
|
|
@@ -37,4 +37,4 @@ export declare const FabricLogs: import("../../../.pikku/pikku-types.gen.js").Pi
|
|
|
37
37
|
json?: boolean | undefined;
|
|
38
38
|
}, {
|
|
39
39
|
count: number;
|
|
40
|
-
}, "
|
|
40
|
+
}, "session" | "rpc", import("../../../types/application-types.js").Services>, undefined, undefined>;
|
|
@@ -15,18 +15,18 @@ export declare const FabricMetrics: import("../../../.pikku/pikku-types.gen.js")
|
|
|
15
15
|
json?: boolean | undefined;
|
|
16
16
|
}, {
|
|
17
17
|
count: number;
|
|
18
|
-
}, "
|
|
18
|
+
}, "session" | "rpc", import("../../../.pikku/pikku-types.gen.js").PikkuFunctionSessionless<{
|
|
19
19
|
branch: string;
|
|
20
20
|
hours?: number | undefined;
|
|
21
21
|
function?: string | undefined;
|
|
22
22
|
json?: boolean | undefined;
|
|
23
23
|
}, {
|
|
24
24
|
count: number;
|
|
25
|
-
}, "
|
|
25
|
+
}, "session" | "rpc", import("../../../types/application-types.js").Services> | import("../../../.pikku/pikku-types.gen.js").PikkuFunction<{
|
|
26
26
|
branch: string;
|
|
27
27
|
hours?: number | undefined;
|
|
28
28
|
function?: string | undefined;
|
|
29
29
|
json?: boolean | undefined;
|
|
30
30
|
}, {
|
|
31
31
|
count: number;
|
|
32
|
-
}, "
|
|
32
|
+
}, "session" | "rpc", import("../../../types/application-types.js").Services>, undefined, undefined>;
|
|
@@ -37,7 +37,7 @@ export declare const FabricRollback: import("../../../.pikku/pikku-types.gen.js"
|
|
|
37
37
|
}[];
|
|
38
38
|
deploymentId?: string | undefined;
|
|
39
39
|
rolledBackToDeploymentId?: string | undefined;
|
|
40
|
-
}, "
|
|
40
|
+
}, "session" | "rpc", import("../../../.pikku/pikku-types.gen.js").PikkuFunctionSessionless<{
|
|
41
41
|
branch: string;
|
|
42
42
|
target?: string | undefined;
|
|
43
43
|
list?: boolean | undefined;
|
|
@@ -55,7 +55,7 @@ export declare const FabricRollback: import("../../../.pikku/pikku-types.gen.js"
|
|
|
55
55
|
}[];
|
|
56
56
|
deploymentId?: string | undefined;
|
|
57
57
|
rolledBackToDeploymentId?: string | undefined;
|
|
58
|
-
}, "
|
|
58
|
+
}, "session" | "rpc", import("../../../types/application-types.js").Services> | import("../../../.pikku/pikku-types.gen.js").PikkuFunction<{
|
|
59
59
|
branch: string;
|
|
60
60
|
target?: string | undefined;
|
|
61
61
|
list?: boolean | undefined;
|
|
@@ -73,4 +73,4 @@ export declare const FabricRollback: import("../../../.pikku/pikku-types.gen.js"
|
|
|
73
73
|
}[];
|
|
74
74
|
deploymentId?: string | undefined;
|
|
75
75
|
rolledBackToDeploymentId?: string | undefined;
|
|
76
|
-
}, "
|
|
76
|
+
}, "session" | "rpc", import("../../../types/application-types.js").Services>, undefined, undefined>;
|
|
@@ -11,14 +11,14 @@ export declare const FabricSecretsList: import("../../../.pikku/pikku-types.gen.
|
|
|
11
11
|
json?: boolean | undefined;
|
|
12
12
|
}, {
|
|
13
13
|
names: string[];
|
|
14
|
-
}, "
|
|
14
|
+
}, "session" | "rpc", import("../../../.pikku/pikku-types.gen.js").PikkuFunctionSessionless<{
|
|
15
15
|
branch: string;
|
|
16
16
|
json?: boolean | undefined;
|
|
17
17
|
}, {
|
|
18
18
|
names: string[];
|
|
19
|
-
}, "
|
|
19
|
+
}, "session" | "rpc", import("../../../types/application-types.js").Services> | import("../../../.pikku/pikku-types.gen.js").PikkuFunction<{
|
|
20
20
|
branch: string;
|
|
21
21
|
json?: boolean | undefined;
|
|
22
22
|
}, {
|
|
23
23
|
names: string[];
|
|
24
|
-
}, "
|
|
24
|
+
}, "session" | "rpc", import("../../../types/application-types.js").Services>, undefined, undefined>;
|
|
@@ -15,18 +15,18 @@ export declare const FabricSecretsSet: import("../../../.pikku/pikku-types.gen.j
|
|
|
15
15
|
force?: boolean | undefined;
|
|
16
16
|
}, {
|
|
17
17
|
ok: boolean;
|
|
18
|
-
}, "
|
|
18
|
+
}, "session" | "rpc", import("../../../.pikku/pikku-types.gen.js").PikkuFunctionSessionless<{
|
|
19
19
|
name: string;
|
|
20
20
|
branch: string;
|
|
21
21
|
value?: string | undefined;
|
|
22
22
|
force?: boolean | undefined;
|
|
23
23
|
}, {
|
|
24
24
|
ok: boolean;
|
|
25
|
-
}, "
|
|
25
|
+
}, "session" | "rpc", import("../../../types/application-types.js").Services> | import("../../../.pikku/pikku-types.gen.js").PikkuFunction<{
|
|
26
26
|
name: string;
|
|
27
27
|
branch: string;
|
|
28
28
|
value?: string | undefined;
|
|
29
29
|
force?: boolean | undefined;
|
|
30
30
|
}, {
|
|
31
31
|
ok: boolean;
|
|
32
|
-
}, "
|
|
32
|
+
}, "session" | "rpc", import("../../../types/application-types.js").Services>, undefined, undefined>;
|
|
@@ -7,13 +7,13 @@ export declare const FabricStatusOutput: z.ZodObject<{
|
|
|
7
7
|
export declare const FabricStatus: import("../../../.pikku/pikku-types.gen.js").PikkuFunctionConfig<Record<string, never>, {
|
|
8
8
|
projectId: string;
|
|
9
9
|
status: any;
|
|
10
|
-
}, "
|
|
10
|
+
}, "session" | "rpc", import("../../../.pikku/pikku-types.gen.js").PikkuFunctionSessionless<Record<string, never>, {
|
|
11
11
|
projectId: string;
|
|
12
12
|
status: any;
|
|
13
|
-
}, "
|
|
13
|
+
}, "session" | "rpc", import("../../../types/application-types.js").Services> | import("../../../.pikku/pikku-types.gen.js").PikkuFunction<Record<string, never>, {
|
|
14
14
|
projectId: string;
|
|
15
15
|
status: any;
|
|
16
|
-
}, "
|
|
16
|
+
}, "session" | "rpc", import("../../../types/application-types.js").Services>, undefined, undefined>;
|
|
17
17
|
type StageState = {
|
|
18
18
|
stageBranch: string;
|
|
19
19
|
gitSha?: string | null;
|
|
@@ -13,16 +13,16 @@ export declare const FabricTrace: import("../../../.pikku/pikku-types.gen.js").P
|
|
|
13
13
|
json?: boolean | undefined;
|
|
14
14
|
}, {
|
|
15
15
|
count: number;
|
|
16
|
-
}, "
|
|
16
|
+
}, "session" | "rpc", import("../../../.pikku/pikku-types.gen.js").PikkuFunctionSessionless<{
|
|
17
17
|
branch: string;
|
|
18
18
|
traceId: string;
|
|
19
19
|
json?: boolean | undefined;
|
|
20
20
|
}, {
|
|
21
21
|
count: number;
|
|
22
|
-
}, "
|
|
22
|
+
}, "session" | "rpc", import("../../../types/application-types.js").Services> | import("../../../.pikku/pikku-types.gen.js").PikkuFunction<{
|
|
23
23
|
branch: string;
|
|
24
24
|
traceId: string;
|
|
25
25
|
json?: boolean | undefined;
|
|
26
26
|
}, {
|
|
27
27
|
count: number;
|
|
28
|
-
}, "
|
|
28
|
+
}, "session" | "rpc", import("../../../types/application-types.js").Services>, undefined, undefined>;
|
|
@@ -93,13 +93,8 @@ export async function runFabricValidate(startDir = process.cwd()) {
|
|
|
93
93
|
const rootPkgPath = join(root, 'package.json');
|
|
94
94
|
const rootPkg = await readJsonSafe(rootPkgPath);
|
|
95
95
|
if (rootPkg) {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
...rootPkg.devDependencies,
|
|
99
|
-
};
|
|
100
|
-
if (!allDeps['@pikku/fabric-cli']) {
|
|
101
|
-
info('missing-fabric-cli', '@pikku/fabric-cli not in devDependencies — fabric CLI commands (validate, deploy) will not be available', rootPkgPath, 'Add "@pikku/fabric-cli" to devDependencies: use "file:./vendor/pikku-fabric-cli.tgz" (bundled release) or "portal:/path/to/pikku/packages/fabric-cli" (local dev)');
|
|
102
|
-
}
|
|
96
|
+
// Intentionally only validating presence/shape here; dependency-specific
|
|
97
|
+
// checks live in the main fabric validator.
|
|
103
98
|
}
|
|
104
99
|
const fnDir = join(root, 'packages', 'functions');
|
|
105
100
|
const functionsSdkPkgName = (await readJsonSafe(join(root, 'packages', 'functions-sdk', 'package.json')))?.name;
|
|
@@ -26,7 +26,7 @@ export declare const FabricValidate: import("../../../.pikku/pikku-types.gen.js"
|
|
|
26
26
|
path: string;
|
|
27
27
|
fixHint: string;
|
|
28
28
|
}[];
|
|
29
|
-
}, "
|
|
29
|
+
}, "session" | "rpc", import("../../../.pikku/pikku-types.gen.js").PikkuFunctionSessionless<Record<string, never>, {
|
|
30
30
|
ok: boolean;
|
|
31
31
|
root: string;
|
|
32
32
|
findings: {
|
|
@@ -36,7 +36,7 @@ export declare const FabricValidate: import("../../../.pikku/pikku-types.gen.js"
|
|
|
36
36
|
path: string;
|
|
37
37
|
fixHint: string;
|
|
38
38
|
}[];
|
|
39
|
-
}, "
|
|
39
|
+
}, "session" | "rpc", import("../../../types/application-types.js").Services> | import("../../../.pikku/pikku-types.gen.js").PikkuFunction<Record<string, never>, {
|
|
40
40
|
ok: boolean;
|
|
41
41
|
root: string;
|
|
42
42
|
findings: {
|
|
@@ -46,5 +46,5 @@ export declare const FabricValidate: import("../../../.pikku/pikku-types.gen.js"
|
|
|
46
46
|
path: string;
|
|
47
47
|
fixHint: string;
|
|
48
48
|
}[];
|
|
49
|
-
}, "
|
|
49
|
+
}, "session" | "rpc", import("../../../types/application-types.js").Services>, undefined, undefined>;
|
|
50
50
|
export declare const renderValidate: (_s: unknown, { ok, root, findings }: z.infer<typeof FabricValidateOutput>) => void;
|
|
@@ -84,25 +84,26 @@ export async function runValidate(startDir = process.cwd()) {
|
|
|
84
84
|
const info = (id, message, path, fixHint) => {
|
|
85
85
|
findings.push({ id, severity: 'info', message, path, fixHint });
|
|
86
86
|
};
|
|
87
|
+
const lines = (...parts) => parts.join('\n');
|
|
87
88
|
// ── pikkufabric.config.json ────────────────────────────────────────────
|
|
88
89
|
// Not required to run validate — downgraded to info so any pikku project
|
|
89
90
|
// can be checked for compatibility before it is linked to a fabric account.
|
|
90
91
|
const fabricConfigPath = join(root, 'pikkufabric.config.json');
|
|
91
92
|
const fabricConfig = await readJsonSafe(fabricConfigPath);
|
|
92
93
|
if (!fabricConfig) {
|
|
93
|
-
info('fabric-config-missing', 'pikkufabric.config.json not found — project has not been linked to fabric yet', fabricConfigPath, 'Run `pikku fabric link` to
|
|
94
|
+
info('fabric-config-missing', 'pikkufabric.config.json not found — project has not been linked to fabric yet', fabricConfigPath, lines('Recommended fix:', '1. Run `pikku fabric link` if you already have a Fabric project.', '2. If you only want to scaffold the file, create:', '{', ' "projectId": "__PROJECT_ID__"', '}', '3. Replace `__PROJECT_ID__` later with the real Fabric project id.'));
|
|
94
95
|
}
|
|
95
96
|
else if (!fabricConfig.projectId) {
|
|
96
|
-
info('fabric-config-no-project-id', 'pikkufabric.config.json is missing "projectId"', fabricConfigPath, '
|
|
97
|
+
info('fabric-config-no-project-id', 'pikkufabric.config.json is missing "projectId"', fabricConfigPath, lines('Edit `pikkufabric.config.json` and add:', '{', ' "projectId": "<your-project-id>"', '}', 'If you do not know the id yet, run `pikku fabric link`.'));
|
|
97
98
|
}
|
|
98
99
|
else if (fabricConfig.projectId === '__PROJECT_ID__') {
|
|
99
|
-
info('fabric-config-placeholder-project-id', 'pikkufabric.config.json has a placeholder projectId ("__PROJECT_ID__") — project is not linked', fabricConfigPath, 'Run `pikku fabric link` to replace the
|
|
100
|
+
info('fabric-config-placeholder-project-id', 'pikkufabric.config.json has a placeholder projectId ("__PROJECT_ID__") — project is not linked', fabricConfigPath, lines('The file exists but still contains the placeholder project id.', 'Run `pikku fabric link` to replace it automatically, or edit the file and set:', '"projectId": "<real-project-id>"'));
|
|
100
101
|
}
|
|
101
102
|
// ── root pikku.config.json ─────────────────────────────────────────────
|
|
102
103
|
const pikkuConfigPath = join(root, 'pikku.config.json');
|
|
103
104
|
const pikkuConfig = await readJsonSafe(pikkuConfigPath);
|
|
104
105
|
if (!pikkuConfig) {
|
|
105
|
-
e('pikku-config-missing', 'pikku.config.json not found at project root', pikkuConfigPath, 'Create pikku.config.json
|
|
106
|
+
e('pikku-config-missing', 'pikku.config.json not found at project root', pikkuConfigPath, lines('Create `pikku.config.json` at the repo root.', 'Minimum useful shape:', '{', ' "srcDirectories": ["packages/functions/src"],', ' "outDir": "packages/functions/.pikku",', ' "clientFiles": {', ' "rpcMapDeclarationFile": "packages/functions-sdk/src/pikku/rpc-map.gen.d.ts",', ' "reactQueryFile": "packages/functions-sdk/src/pikku/api.gen.ts"', ' }', '}'));
|
|
106
107
|
}
|
|
107
108
|
else {
|
|
108
109
|
if (!pikkuConfig.srcDirectories) {
|
|
@@ -112,7 +113,7 @@ export async function runValidate(startDir = process.cwd()) {
|
|
|
112
113
|
e('pikku-config-no-out-dir', 'pikku.config.json missing "outDir"', pikkuConfigPath, 'Add "outDir": "packages/functions/.pikku" to pikku.config.json');
|
|
113
114
|
}
|
|
114
115
|
if (!pikkuConfig.clientFiles) {
|
|
115
|
-
info('pikku-config-no-client-files', 'pikku.config.json missing "clientFiles" —
|
|
116
|
+
info('pikku-config-no-client-files', 'pikku.config.json missing "clientFiles" — generated RPC client files and React Query hooks will not be written', pikkuConfigPath, lines('Add a `clientFiles` block to `pikku.config.json`.', 'Recommended values:', '"clientFiles": {', ' "rpcMapDeclarationFile": "packages/functions-sdk/src/pikku/rpc-map.gen.d.ts",', ' "reactQueryFile": "packages/functions-sdk/src/pikku/api.gen.ts"', '}', 'Those files should live in `packages/functions-sdk/src/pikku/` and are generated by Pikku.'));
|
|
116
117
|
}
|
|
117
118
|
}
|
|
118
119
|
const dbEngine = pikkuConfig?.db?.engine ?? 'sqlite';
|
|
@@ -129,9 +130,6 @@ export async function runValidate(startDir = process.cwd()) {
|
|
|
129
130
|
...rootPkg.dependencies,
|
|
130
131
|
...rootPkg.devDependencies,
|
|
131
132
|
};
|
|
132
|
-
if (!allDeps['@pikku/fabric-cli']) {
|
|
133
|
-
info('missing-fabric-cli', '@pikku/fabric-cli not in devDependencies — fabric CLI commands (validate, deploy) will not be available', rootPkgPath, 'Add "@pikku/fabric-cli" to devDependencies: use "file:./vendor/pikku-fabric-cli.tgz" (bundled release) or "portal:/path/to/pikku/packages/fabric-cli" (local dev)');
|
|
134
|
-
}
|
|
135
133
|
if (!allDeps['@pikku/core']) {
|
|
136
134
|
e('missing-core', '@pikku/core not in dependencies', rootPkgPath, 'Add "@pikku/core": "file:./vendor/pikku-core.tgz" to dependencies');
|
|
137
135
|
}
|
|
@@ -248,8 +246,8 @@ export async function runValidate(startDir = process.cwd()) {
|
|
|
248
246
|
e('seed-sql-missing', dbEngine === 'postgres'
|
|
249
247
|
? 'db/postgres-seed.sql not found'
|
|
250
248
|
: 'db/sqlite-seed.sql not found', seedPath, dbEngine === 'postgres'
|
|
251
|
-
? 'Create db/postgres-seed.sql
|
|
252
|
-
: 'Create db/sqlite-seed.sql
|
|
249
|
+
? lines('Create `db/postgres-seed.sql`.', 'Use idempotent INSERT statements suitable for local/dev/test setup.', 'Keep it safe to re-run.')
|
|
250
|
+
: lines('Create `db/sqlite-seed.sql`.', 'Use idempotent `INSERT OR IGNORE` statements for local/dev/test data.', 'Keep it safe to re-run.'));
|
|
253
251
|
}
|
|
254
252
|
// audit table — info if not present (optional feature)
|
|
255
253
|
if (existsSync(migrationsDir)) {
|
|
@@ -258,7 +256,7 @@ export async function runValidate(startDir = process.cwd()) {
|
|
|
258
256
|
const hasAuditTable = (await Promise.all(migFiles.map((f) => readTextSafe(join(migrationsDir, f))))).some((sql) => sql &&
|
|
259
257
|
/CREATE\s+TABLE\s+(?:IF\s+NOT\s+EXISTS\s+)?audit\b/i.test(sql));
|
|
260
258
|
if (!hasAuditTable) {
|
|
261
|
-
info('audit-table-missing', 'No migration creates the audit table — Fabric audit events will be dropped', migrationsDir, 'Add a migration
|
|
259
|
+
info('audit-table-missing', 'No migration creates the audit table — Fabric audit events will be dropped', migrationsDir, lines('Add a new migration in this directory that creates an `audit` table.', 'Use the starter-template audit migration as the reference shape.', 'Expected columns come from `AuditEvent`:', '- eventId', '- type', '- source', '- outcome', '- occurredAt', '- functionId', '- wireType', '- wireId', '- traceId', '- transactionId', '- queryId', '- actor', '- input', '- metadata', 'At minimum, create the table so Fabric audit writes are not silently dropped.'));
|
|
262
260
|
}
|
|
263
261
|
}
|
|
264
262
|
catch {
|
|
@@ -345,12 +343,12 @@ export async function runValidate(startDir = process.cwd()) {
|
|
|
345
343
|
// ── packages/functions/tests/ ─────────────────────────────────────────
|
|
346
344
|
const testsDir = join(fnDir, 'tests');
|
|
347
345
|
if (!existsSync(testsDir)) {
|
|
348
|
-
info('tests-missing', 'packages/functions/tests/ not found — no function test harness', testsDir, 'Run `pikku tests init`
|
|
346
|
+
info('tests-missing', 'packages/functions/tests/ not found — no function test harness', testsDir, lines('Run `pikku tests init` from the repo root.', 'That should scaffold `packages/functions/tests/` with the generated function test harness.', 'Expected contents include feature files, step definitions, and support files.', 'Commit the scaffolded files after generation.'));
|
|
349
347
|
}
|
|
350
348
|
// ── packages/functions-sdk/ ───────────────────────────────────────────
|
|
351
349
|
const sdkDir = join(root, 'packages', 'functions-sdk');
|
|
352
350
|
if (!existsSync(sdkDir)) {
|
|
353
|
-
info('functions-sdk-missing', 'packages/functions-sdk/ not found — generated RPC client and React Query hooks will not be available', sdkDir, 'Create packages/functions-sdk
|
|
351
|
+
info('functions-sdk-missing', 'packages/functions-sdk/ not found — generated RPC client and React Query hooks will not be available', sdkDir, lines('Create a workspace at `packages/functions-sdk/`.', 'Minimum structure:', '- packages/functions-sdk/package.json', '- packages/functions-sdk/src/pikku/', 'Point `pikku.config.json` clientFiles to:', '- packages/functions-sdk/src/pikku/rpc-map.gen.d.ts', '- packages/functions-sdk/src/pikku/api.gen.ts', 'This package is the home for generated client artifacts, not handwritten server code.'));
|
|
354
352
|
}
|
|
355
353
|
const ok = !findings.some((f) => f.severity === 'error');
|
|
356
354
|
return { ok, root, findings };
|
|
@@ -378,9 +376,13 @@ export const renderValidate = (_s, { ok, root, findings }) => {
|
|
|
378
376
|
: f.severity === 'warn'
|
|
379
377
|
? changed('⚠')
|
|
380
378
|
: dim('ℹ');
|
|
379
|
+
const fixLines = f.fixHint.split('\n');
|
|
381
380
|
console.log(`${icon} ${f.message}`);
|
|
382
381
|
console.log(` ${dim('path:')} ${relPath(f.path)}`);
|
|
383
|
-
console.log(` ${dim('fix:')}
|
|
382
|
+
console.log(` ${dim('fix:')}`);
|
|
383
|
+
for (const line of fixLines) {
|
|
384
|
+
console.log(` ${line}`);
|
|
385
|
+
}
|
|
384
386
|
console.log();
|
|
385
387
|
}
|
|
386
388
|
const counts = [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const all: import("#pikku").PikkuFunctionConfig<void, void, "
|
|
1
|
+
export declare const all: import("#pikku").PikkuFunctionConfig<void, void, "session" | "rpc", import("#pikku").PikkuFunctionSessionless<void, void, "session" | "rpc", import("#pikku").Services> | import("#pikku").PikkuFunction<void, void, "session" | "rpc", import("#pikku").Services>, undefined, undefined>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const binary: import("#pikku").PikkuFunctionConfig<{
|
|
2
2
|
compileTarget?: string;
|
|
3
|
-
}, void, "
|
|
3
|
+
}, void, "session" | "rpc", import("#pikku").PikkuFunctionSessionless<{
|
|
4
4
|
compileTarget?: string;
|
|
5
|
-
}, void, "
|
|
5
|
+
}, void, "session" | "rpc", import("#pikku").Services> | import("#pikku").PikkuFunction<{
|
|
6
6
|
compileTarget?: string;
|
|
7
|
-
}, void, "
|
|
7
|
+
}, void, "session" | "rpc", import("#pikku").Services>, undefined, undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const bootstrap: import("#pikku").PikkuFunctionConfig<void, void, "
|
|
1
|
+
export declare const bootstrap: import("#pikku").PikkuFunctionConfig<void, void, "session" | "rpc", import("#pikku").PikkuFunctionSessionless<void, void, "session" | "rpc", import("#pikku").Services> | import("#pikku").PikkuFunction<void, void, "session" | "rpc", import("#pikku").Services>, undefined, undefined>;
|
|
@@ -2,12 +2,12 @@ export declare const consoleCommand: import("#pikku").PikkuFunctionConfig<{
|
|
|
2
2
|
port?: string;
|
|
3
3
|
open?: string;
|
|
4
4
|
hmr?: boolean;
|
|
5
|
-
}, void, "
|
|
5
|
+
}, void, "session" | "rpc", import("#pikku").PikkuFunctionSessionless<{
|
|
6
6
|
port?: string;
|
|
7
7
|
open?: string;
|
|
8
8
|
hmr?: boolean;
|
|
9
|
-
}, void, "
|
|
9
|
+
}, void, "session" | "rpc", import("#pikku").Services> | import("#pikku").PikkuFunction<{
|
|
10
10
|
port?: string;
|
|
11
11
|
open?: string;
|
|
12
12
|
hmr?: boolean;
|
|
13
|
-
}, void, "
|
|
13
|
+
}, void, "session" | "rpc", import("#pikku").Services>, undefined, undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const dbAudit: import("#pikku").PikkuFunctionConfig<{}, void, "
|
|
1
|
+
export declare const dbAudit: import("#pikku").PikkuFunctionConfig<{}, void, "session" | "rpc", import("#pikku").PikkuFunctionSessionless<{}, void, "session" | "rpc", import("#pikku").Services> | import("#pikku").PikkuFunction<{}, void, "session" | "rpc", import("#pikku").Services>, undefined, undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const dbGenerate: import("#pikku").PikkuFunctionConfig<{}, void, "
|
|
1
|
+
export declare const dbGenerate: import("#pikku").PikkuFunctionConfig<{}, void, "session" | "rpc", import("#pikku").PikkuFunctionSessionless<{}, void, "session" | "rpc", import("#pikku").Services> | import("#pikku").PikkuFunction<{}, void, "session" | "rpc", import("#pikku").Services>, undefined, undefined>;
|