@pikku/cli 0.12.19 → 0.12.21
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-DAQHIRK3.js → index-DXLy-_D4.js} +181 -181
- 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 +6 -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 +32 -2
- package/dist/.pikku/cli/pikku-cli-wirings.gen.d.ts +1 -1
- package/dist/.pikku/cli/pikku-cli-wirings.gen.js +1 -1
- package/dist/.pikku/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 +8 -2
- package/dist/.pikku/function/pikku-function-types.gen.js +4 -1
- package/dist/.pikku/function/pikku-functions-meta.gen.js +1 -1
- package/dist/.pikku/function/pikku-functions-meta.gen.json +223 -121
- package/dist/.pikku/function/pikku-functions.gen.js +13 -9
- 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 +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 +15 -9
- 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 -7
- package/dist/.pikku/schemas/schemas/DevInput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuCommandHTTPOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/PikkuCommandQueueOutput.schema.json +1 -0
- package/dist/.pikku/schemas/schemas/WorkflowRunStatus.schema.json +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/meta/allWorkflow.gen.json +623 -154
- 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/src/cli.wiring.js +32 -2
- package/dist/src/deploy/analyzer/manifest.d.ts +10 -0
- package/dist/src/deploy/build-pipeline.d.ts +2 -0
- package/dist/src/deploy/build-pipeline.js +44 -6
- package/dist/src/deploy/bundler/bundler.d.ts +2 -1
- package/dist/src/deploy/bundler/bundler.js +28 -5
- package/dist/src/deploy/bundler/dep-extractor.d.ts +5 -2
- package/dist/src/deploy/bundler/dep-extractor.js +103 -23
- package/dist/src/deploy/bundler/types.d.ts +5 -1
- package/dist/src/deploy/codegen/per-unit-codegen.d.ts +3 -1
- package/dist/src/deploy/codegen/per-unit-codegen.js +3 -1
- package/dist/src/deploy/plan/planner.js +25 -3
- package/dist/src/deploy/plan/provider.d.ts +2 -0
- package/dist/src/functions/commands/deploy-apply.js +6 -4
- package/dist/src/functions/commands/deploy-plan.js +7 -1
- package/dist/src/functions/commands/dev.d.ts +13 -0
- package/dist/src/functions/commands/dev.js +187 -0
- package/dist/src/functions/commands/pikku-command-summary.js +4 -1
- package/dist/src/functions/commands/versions-update.js +9 -3
- package/dist/src/functions/wirings/channels/pikku-command-channels.d.ts +1 -1
- package/dist/src/functions/wirings/channels/pikku-command-channels.js +1 -1
- package/dist/src/functions/wirings/console/pikku-command-console-functions.js +5 -1
- package/dist/src/functions/wirings/functions/serialize-function-types.js +31 -1
- package/dist/src/functions/wirings/http/pikku-command-http-routes.d.ts +1 -1
- package/dist/src/functions/wirings/http/pikku-command-http-routes.js +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-map.js +1 -1
- package/dist/src/functions/wirings/queue/pikku-command-queue.d.ts +1 -1
- package/dist/src/functions/wirings/queue/pikku-command-queue.js +1 -1
- package/dist/src/functions/wirings/rpc/pikku-command-public-rpc.js +5 -1
- package/dist/src/functions/wirings/rpc/pikku-command-remote-rpc.js +5 -1
- package/dist/src/functions/wirings/rpc/serialize-typed-rpc-map.js +16 -2
- package/dist/src/functions/wirings/workflow/serialize-workflow-routes.js +44 -2
- package/dist/src/functions/workflows/all.workflow.js +5 -10
- package/dist/src/scaffold/rpc-remote.gen.js +1 -1
- package/dist/src/scaffold/workflow-routes.gen.js +36 -4
- package/dist/src/services/cli-logger.service.d.ts +22 -2
- package/dist/src/services/cli-logger.service.js +97 -21
- package/dist/src/services.js +8 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +8 -4
- package/dist/.pikku/cli/pikku-cli-client.gen.d.ts +0 -10
- package/dist/.pikku/cli/pikku-cli-client.gen.js +0 -44
- /package/dist/.pikku/schemas/schemas/{PikkuChannelsOutput.schema.json → PikkuCommandChannelsOutput.schema.json} +0 -0
|
@@ -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.21
|
|
3
3
|
*/
|
|
4
4
|
/**
|
|
5
5
|
* Workflow HTTP catch-all routes
|
|
@@ -18,14 +18,14 @@ function assertWorkflowRunService(workflowRunService) {
|
|
|
18
18
|
export const workflowStarter = pikkuSessionlessFunc({
|
|
19
19
|
auth: false,
|
|
20
20
|
func: async (_services, { workflowName, data }, { rpc }) => {
|
|
21
|
-
return await rpc.startWorkflow(workflowName, data ?? {});
|
|
21
|
+
return await rpc.startWorkflow(workflowName, (data ?? {}));
|
|
22
22
|
},
|
|
23
23
|
});
|
|
24
24
|
export const workflowRunner = pikkuSessionlessFunc({
|
|
25
25
|
auth: false,
|
|
26
26
|
func: async ({ workflowService }, { workflowName, data }, { rpc }) => {
|
|
27
27
|
assertWorkflowService(workflowService);
|
|
28
|
-
return await workflowService.runToCompletion(workflowName, data ?? {}, rpc);
|
|
28
|
+
return await workflowService.runToCompletion(workflowName, (data ?? {}), rpc);
|
|
29
29
|
},
|
|
30
30
|
});
|
|
31
31
|
export const workflowStatusChecker = pikkuSessionlessFunc({
|
|
@@ -50,6 +50,7 @@ export const workflowStatusStream = pikkuSessionlessFunc({
|
|
|
50
50
|
return;
|
|
51
51
|
const terminalStatuses = new Set(['completed', 'failed', 'cancelled']);
|
|
52
52
|
let lastHash = '';
|
|
53
|
+
let initSent = false;
|
|
53
54
|
const poll = async () => {
|
|
54
55
|
const run = await workflowRunService.getRun(runId);
|
|
55
56
|
if (!run) {
|
|
@@ -57,6 +58,21 @@ export const workflowStatusStream = pikkuSessionlessFunc({
|
|
|
57
58
|
return false;
|
|
58
59
|
}
|
|
59
60
|
const steps = await workflowRunService.getRunSteps(runId);
|
|
61
|
+
if (!initSent && run.deterministic) {
|
|
62
|
+
const statusByStep = new Map(steps.map((s) => [
|
|
63
|
+
s.stepName,
|
|
64
|
+
s.status,
|
|
65
|
+
]));
|
|
66
|
+
channel.send({
|
|
67
|
+
type: 'init',
|
|
68
|
+
deterministic: true,
|
|
69
|
+
steps: (run.plannedSteps ?? []).map((s) => ({
|
|
70
|
+
stepName: s.stepName,
|
|
71
|
+
status: statusByStep.get(s.stepName) ?? 'pending',
|
|
72
|
+
})),
|
|
73
|
+
});
|
|
74
|
+
initSent = true;
|
|
75
|
+
}
|
|
60
76
|
const hash = JSON.stringify({
|
|
61
77
|
s: run.status,
|
|
62
78
|
steps: steps.map((s) => [s.stepName, s.status]),
|
|
@@ -105,6 +121,7 @@ export const workflowStatusStreamFull = pikkuSessionlessFunc({
|
|
|
105
121
|
return;
|
|
106
122
|
const terminalStatuses = new Set(['completed', 'failed', 'cancelled']);
|
|
107
123
|
let lastHash = '';
|
|
124
|
+
let initSent = false;
|
|
108
125
|
const poll = async () => {
|
|
109
126
|
const run = await workflowRunService.getRun(runId);
|
|
110
127
|
if (!run) {
|
|
@@ -112,6 +129,21 @@ export const workflowStatusStreamFull = pikkuSessionlessFunc({
|
|
|
112
129
|
return false;
|
|
113
130
|
}
|
|
114
131
|
const steps = await workflowRunService.getRunSteps(runId);
|
|
132
|
+
if (!initSent && run.deterministic) {
|
|
133
|
+
const statusByStep = new Map(steps.map((s) => [
|
|
134
|
+
s.stepName,
|
|
135
|
+
s.status,
|
|
136
|
+
]));
|
|
137
|
+
channel.send({
|
|
138
|
+
type: 'init',
|
|
139
|
+
deterministic: true,
|
|
140
|
+
steps: (run.plannedSteps ?? []).map((s) => ({
|
|
141
|
+
stepName: s.stepName,
|
|
142
|
+
status: statusByStep.get(s.stepName) ?? 'pending',
|
|
143
|
+
})),
|
|
144
|
+
});
|
|
145
|
+
initSent = true;
|
|
146
|
+
}
|
|
115
147
|
const hash = JSON.stringify({
|
|
116
148
|
s: run.status,
|
|
117
149
|
o: run.output,
|
|
@@ -155,7 +187,7 @@ export const workflowStatusStreamFull = pikkuSessionlessFunc({
|
|
|
155
187
|
export const graphStarter = pikkuSessionlessFunc({
|
|
156
188
|
auth: false,
|
|
157
189
|
func: async (_services, { workflowName, nodeId, data }, { rpc }) => {
|
|
158
|
-
return await rpc.startWorkflow(workflowName, data ?? {}, { startNode: nodeId });
|
|
190
|
+
return await rpc.startWorkflow(workflowName, (data ?? {}), { startNode: nodeId });
|
|
159
191
|
},
|
|
160
192
|
});
|
|
161
193
|
wireHTTPRoutes({
|
|
@@ -1,26 +1,46 @@
|
|
|
1
1
|
import type { Logger } from '@pikku/core/services';
|
|
2
2
|
import { LogLevel } from '@pikku/core/services';
|
|
3
3
|
import type { ErrorCode } from '@pikku/inspector';
|
|
4
|
+
export type CLIOutputMode = 'text' | 'json';
|
|
4
5
|
export declare class CLILogger implements Logger {
|
|
5
6
|
private silent;
|
|
6
7
|
private level;
|
|
7
8
|
private criticalErrors;
|
|
9
|
+
private outputMode;
|
|
10
|
+
private jsonFlushHookRegistered;
|
|
8
11
|
constructor({ logLogo, silent, }: {
|
|
9
12
|
logLogo: boolean;
|
|
10
13
|
silent?: boolean;
|
|
11
14
|
});
|
|
12
15
|
setLevel(level: LogLevel): void;
|
|
13
16
|
setSilent(silent: boolean): void;
|
|
17
|
+
setOutputMode(mode: CLIOutputMode): void;
|
|
18
|
+
getOutputMode(): CLIOutputMode;
|
|
14
19
|
isSilent(): boolean;
|
|
20
|
+
private normalizeMessage;
|
|
21
|
+
private writeJSONLine;
|
|
22
|
+
private ensureJSONFlushHook;
|
|
23
|
+
flushJSONBuffer(): void;
|
|
24
|
+
private emit;
|
|
15
25
|
info(message: string | {
|
|
16
26
|
message: string;
|
|
17
27
|
type?: string;
|
|
28
|
+
data?: Record<string, unknown>;
|
|
29
|
+
}): void;
|
|
30
|
+
error(message: string | Error | {
|
|
31
|
+
message: string;
|
|
32
|
+
type?: string;
|
|
33
|
+
data?: Record<string, unknown>;
|
|
34
|
+
}): void;
|
|
35
|
+
warn(message: string | {
|
|
36
|
+
message: string;
|
|
37
|
+
type?: string;
|
|
38
|
+
data?: Record<string, unknown>;
|
|
18
39
|
}): void;
|
|
19
|
-
error(message: string): void;
|
|
20
|
-
warn(message: string): void;
|
|
21
40
|
debug(message: string | {
|
|
22
41
|
message: string;
|
|
23
42
|
type?: string;
|
|
43
|
+
data?: Record<string, unknown>;
|
|
24
44
|
}): void;
|
|
25
45
|
critical(code: ErrorCode, message: string): void;
|
|
26
46
|
hasCriticalErrors(): boolean;
|
|
@@ -9,10 +9,13 @@ const logo = `
|
|
|
9
9
|
|_| |_|_| _)_| _)____/
|
|
10
10
|
`;
|
|
11
11
|
const BASE_ERROR_URL = 'https://pikku.dev/docs/pikku-cli/errors';
|
|
12
|
+
const ANSI_ESCAPE_REGEX = /\x1B\[[0-?]*[ -/]*[@-~]/g;
|
|
12
13
|
export class CLILogger {
|
|
13
14
|
silent;
|
|
14
15
|
level = LogLevel.warn; // default to warn level
|
|
15
16
|
criticalErrors = [];
|
|
17
|
+
outputMode = 'text';
|
|
18
|
+
jsonFlushHookRegistered = false;
|
|
16
19
|
constructor({ logLogo, silent = false, }) {
|
|
17
20
|
this.silent = silent;
|
|
18
21
|
if (logLogo && !silent) {
|
|
@@ -25,49 +28,122 @@ export class CLILogger {
|
|
|
25
28
|
setSilent(silent) {
|
|
26
29
|
this.silent = silent;
|
|
27
30
|
}
|
|
31
|
+
setOutputMode(mode) {
|
|
32
|
+
this.outputMode = mode;
|
|
33
|
+
if (mode === 'json') {
|
|
34
|
+
this.ensureJSONFlushHook();
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
getOutputMode() {
|
|
38
|
+
return this.outputMode;
|
|
39
|
+
}
|
|
28
40
|
isSilent() {
|
|
29
41
|
return this.silent;
|
|
30
42
|
}
|
|
43
|
+
normalizeMessage(message) {
|
|
44
|
+
const str = typeof message === 'string'
|
|
45
|
+
? message
|
|
46
|
+
: message instanceof Error
|
|
47
|
+
? (message.stack ?? message.message)
|
|
48
|
+
: typeof message === 'object' && message !== null
|
|
49
|
+
? JSON.stringify(message)
|
|
50
|
+
: String(message);
|
|
51
|
+
if (this.outputMode === 'json') {
|
|
52
|
+
return str.replace(ANSI_ESCAPE_REGEX, '');
|
|
53
|
+
}
|
|
54
|
+
return str;
|
|
55
|
+
}
|
|
56
|
+
writeJSONLine(payload) {
|
|
57
|
+
process.stdout.write(`${JSON.stringify(payload)}\n`);
|
|
58
|
+
}
|
|
59
|
+
ensureJSONFlushHook() {
|
|
60
|
+
if (this.jsonFlushHookRegistered)
|
|
61
|
+
return;
|
|
62
|
+
this.jsonFlushHookRegistered = true;
|
|
63
|
+
process.once('beforeExit', () => this.flushJSONBuffer());
|
|
64
|
+
process.once('exit', () => this.flushJSONBuffer());
|
|
65
|
+
}
|
|
66
|
+
// NDJSON records are written synchronously in `emit` so consumers can
|
|
67
|
+
// stream output; nothing is buffered. Kept as a no-op because the
|
|
68
|
+
// beforeExit/exit hooks installed by `ensureJSONFlushHook` still
|
|
69
|
+
// reference it, and external callers may rely on the signature.
|
|
70
|
+
flushJSONBuffer() { }
|
|
71
|
+
emit(level, message, type, code, data) {
|
|
72
|
+
const normalizedMessage = this.normalizeMessage(message);
|
|
73
|
+
if (this.outputMode === 'json') {
|
|
74
|
+
this.writeJSONLine({
|
|
75
|
+
level,
|
|
76
|
+
message: normalizedMessage,
|
|
77
|
+
...(type ? { type } : {}),
|
|
78
|
+
...(code ? { code } : {}),
|
|
79
|
+
...(code ? { url: `${BASE_ERROR_URL}/${code.toLowerCase()}` } : {}),
|
|
80
|
+
...(data ? { data } : {}),
|
|
81
|
+
timestamp: new Date().toISOString(),
|
|
82
|
+
});
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
if (level === 'error') {
|
|
86
|
+
console.error(chalk.red(normalizedMessage));
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
if (level === 'warn') {
|
|
90
|
+
console.error(chalk.yellow(normalizedMessage));
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
if (level === 'critical') {
|
|
94
|
+
console.error(chalk.red.bold(normalizedMessage));
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
let c = level === 'info' ? chalk.blue : chalk.gray;
|
|
98
|
+
if (type === 'success') {
|
|
99
|
+
c = chalk.green;
|
|
100
|
+
}
|
|
101
|
+
else if (type === 'timing' && level === 'info') {
|
|
102
|
+
c = chalk.gray;
|
|
103
|
+
}
|
|
104
|
+
console.log(c(normalizedMessage));
|
|
105
|
+
}
|
|
31
106
|
info(message) {
|
|
32
107
|
if (this.level > LogLevel.info || this.silent)
|
|
33
108
|
return;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
else if (message.type === 'timing') {
|
|
40
|
-
c = chalk.gray;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
console.log(c(typeof message === 'string' ? message : message.message));
|
|
109
|
+
const msg = typeof message === 'string' ? message : message.message;
|
|
110
|
+
const type = typeof message === 'string' ? undefined : message.type;
|
|
111
|
+
const data = typeof message === 'string' ? undefined : message.data;
|
|
112
|
+
this.emit('info', msg, type, undefined, data);
|
|
44
113
|
}
|
|
45
114
|
error(message) {
|
|
46
115
|
if (this.level > LogLevel.error)
|
|
47
116
|
return;
|
|
48
|
-
|
|
117
|
+
if (message instanceof Error) {
|
|
118
|
+
this.emit('error', message.stack ?? message.message);
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
const msg = typeof message === 'string' ? message : message.message;
|
|
122
|
+
const type = typeof message === 'string' ? undefined : message.type;
|
|
123
|
+
const data = typeof message === 'string' ? undefined : message.data;
|
|
124
|
+
this.emit('error', msg, type, undefined, data);
|
|
49
125
|
}
|
|
50
126
|
warn(message) {
|
|
51
127
|
if (this.level > LogLevel.warn)
|
|
52
128
|
return;
|
|
53
|
-
|
|
129
|
+
const msg = typeof message === 'string' ? message : message.message;
|
|
130
|
+
const type = typeof message === 'string' ? undefined : message.type;
|
|
131
|
+
const data = typeof message === 'string' ? undefined : message.data;
|
|
132
|
+
this.emit('warn', msg, type, undefined, data);
|
|
54
133
|
}
|
|
55
134
|
debug(message) {
|
|
56
135
|
if (this.level > LogLevel.debug || this.silent)
|
|
57
136
|
return;
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
console.log(c(typeof message === 'string' ? message : message.message));
|
|
137
|
+
const msg = typeof message === 'string' ? message : message.message;
|
|
138
|
+
const type = typeof message === 'string' ? undefined : message.type;
|
|
139
|
+
const data = typeof message === 'string' ? undefined : message.data;
|
|
140
|
+
this.emit('debug', msg, type, undefined, data);
|
|
65
141
|
}
|
|
66
142
|
critical(code, message) {
|
|
67
143
|
const url = `${BASE_ERROR_URL}/${code.toLowerCase()}`;
|
|
68
144
|
const formattedMessage = `[${code}] ${message}\n → ${url}`;
|
|
69
145
|
this.criticalErrors.push(formattedMessage);
|
|
70
|
-
|
|
146
|
+
this.emit('critical', formattedMessage, undefined, code);
|
|
71
147
|
}
|
|
72
148
|
hasCriticalErrors() {
|
|
73
149
|
return this.criticalErrors.length > 0;
|
|
@@ -83,7 +159,7 @@ export class CLILogger {
|
|
|
83
159
|
}
|
|
84
160
|
primary(message) {
|
|
85
161
|
if (!this.silent) {
|
|
86
|
-
|
|
162
|
+
this.emit('info', message);
|
|
87
163
|
}
|
|
88
164
|
}
|
|
89
165
|
}
|
package/dist/src/services.js
CHANGED
|
@@ -103,6 +103,13 @@ export const createConfig = async (_variablesService, data) => {
|
|
|
103
103
|
// --silent > --loglevel > --verbose > --info > default (warn)
|
|
104
104
|
let logLevel = LogLevel.warn; // default
|
|
105
105
|
let isSilent = false;
|
|
106
|
+
// --output is constrained to 'text' | 'json' by the CLI parser
|
|
107
|
+
// (choices + default in cli.wiring.ts), so no runtime validation
|
|
108
|
+
// is needed here. --json is kept as an alias that forces 'json'.
|
|
109
|
+
const outputMode = data.json
|
|
110
|
+
? 'json'
|
|
111
|
+
: data.output;
|
|
112
|
+
logger.setOutputMode(outputMode);
|
|
106
113
|
if (data.silent) {
|
|
107
114
|
logLevel = LogLevel.critical;
|
|
108
115
|
isSilent = true;
|
|
@@ -125,7 +132,7 @@ export const createConfig = async (_variablesService, data) => {
|
|
|
125
132
|
logger.setLevel(logLevel);
|
|
126
133
|
logger.setSilent(isSilent);
|
|
127
134
|
// Display logo unless in silent mode
|
|
128
|
-
if (!isSilent) {
|
|
135
|
+
if (!isSilent && outputMode !== 'json') {
|
|
129
136
|
logger.logLogo();
|
|
130
137
|
}
|
|
131
138
|
const cliConfig = await getPikkuCLIConfig(logger, data.configFile, [], true, data.outDir);
|
|
@@ -1 +1 @@
|
|
|
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-react-query.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-react-query-hooks.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/functions/workflows/all.workflow.ts","../src/middleware/log-command-info-and-time.ts","../src/scaffold/rpc-remote.gen.ts","../src/scaffold/workflow-routes.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/agent/pikku-agent-map.gen.d.ts","../.pikku/agent/pikku-agent-types.gen.ts","../.pikku/channel/pikku-channel-types.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/node/pikku-node-types.gen.ts","../.pikku/queue/pikku-queue-types.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/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/dev.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-react-query.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-react-query-hooks.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/functions/workflows/all.workflow.ts","../src/middleware/log-command-info-and-time.ts","../src/scaffold/rpc-remote.gen.ts","../src/scaffold/workflow-routes.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/agent/pikku-agent-map.gen.d.ts","../.pikku/agent/pikku-agent-types.gen.ts","../.pikku/channel/pikku-channel-types.gen.ts","../.pikku/cli/pikku-cli-channel.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/node/pikku-node-types.gen.ts","../.pikku/queue/pikku-queue-types.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/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.21",
|
|
4
4
|
"author": "yasser.fadl@gmail.com",
|
|
5
5
|
"license": "BUSL-1.1",
|
|
6
6
|
"imports": {
|
|
@@ -26,10 +26,12 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@openapi-contrib/json-schema-to-openapi-schema": "^4.3.1",
|
|
29
|
-
"@pikku/core": "^0.12.
|
|
29
|
+
"@pikku/core": "^0.12.19",
|
|
30
30
|
"@pikku/deploy-cloudflare": "^0.12.0",
|
|
31
|
-
"@pikku/inspector": "^0.12.
|
|
31
|
+
"@pikku/inspector": "^0.12.11",
|
|
32
32
|
"@pikku/openapi-parser": "^0.12.10",
|
|
33
|
+
"@pikku/schedule": "^0.12.0",
|
|
34
|
+
"@pikku/ws": "^0.12.2",
|
|
33
35
|
"@types/cookie": "^1.0.0",
|
|
34
36
|
"@types/json-schema": "^7.0.15",
|
|
35
37
|
"chalk": "^5.6.2",
|
|
@@ -42,12 +44,14 @@
|
|
|
42
44
|
"ts-json-schema-generator": "^2.5.0",
|
|
43
45
|
"tsx": "^4.21.0",
|
|
44
46
|
"typescript": "^5.9",
|
|
47
|
+
"ws": "^8.18.0",
|
|
45
48
|
"yaml": "^2.8.2",
|
|
46
49
|
"zod": "^4.3.6",
|
|
47
50
|
"zod-to-ts": "^2.0.0"
|
|
48
51
|
},
|
|
49
52
|
"devDependencies": {
|
|
50
|
-
"@types/node": "^24.11.0"
|
|
53
|
+
"@types/node": "^24.11.0",
|
|
54
|
+
"@types/ws": "^8"
|
|
51
55
|
},
|
|
52
56
|
"files": [
|
|
53
57
|
"dist",
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.12.19
|
|
3
|
-
*/
|
|
4
|
-
import '../pikku-bootstrap.gen.js';
|
|
5
|
-
/**
|
|
6
|
-
* Pikku CLI Client (via WebSocket Channel)
|
|
7
|
-
* Executes CLI commands over a WebSocket connection
|
|
8
|
-
*/
|
|
9
|
-
export declare function PikkuCLIClient(ws: WebSocket, args?: string[]): Promise<void>;
|
|
10
|
-
export default PikkuCLIClient;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This file was generated by @pikku/cli@0.12.19
|
|
3
|
-
*/
|
|
4
|
-
import { executeCLIViaChannel } from '@pikku/core/cli/channel';
|
|
5
|
-
import { CorePikkuWebsocket } from '@pikku/websocket';
|
|
6
|
-
import '../pikku-bootstrap.gen.js';
|
|
7
|
-
/**
|
|
8
|
-
* Pikku CLI Client (via WebSocket Channel)
|
|
9
|
-
* Executes CLI commands over a WebSocket connection
|
|
10
|
-
*/
|
|
11
|
-
export async function PikkuCLIClient(ws, args) {
|
|
12
|
-
// Create Pikku WebSocket wrapper
|
|
13
|
-
const pikkuWS = new CorePikkuWebsocket(ws);
|
|
14
|
-
// Register renderers for CLI commands
|
|
15
|
-
const renderers = {};
|
|
16
|
-
await executeCLIViaChannel({
|
|
17
|
-
programName: 'pikku',
|
|
18
|
-
pikkuWS,
|
|
19
|
-
args,
|
|
20
|
-
renderers,
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
// Export as default for easy importing
|
|
24
|
-
export default PikkuCLIClient;
|
|
25
|
-
// For direct execution (if this file is run directly)
|
|
26
|
-
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
27
|
-
const url = process.env.PIKKU_WS_URL || 'ws://localhost:4002/cli/pikku';
|
|
28
|
-
// Create WebSocket instance
|
|
29
|
-
let WebSocketImpl;
|
|
30
|
-
if (typeof WebSocket !== 'undefined') {
|
|
31
|
-
WebSocketImpl = WebSocket;
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
// Node.js environment - dynamically import 'ws'
|
|
35
|
-
const wsModule = await import('ws');
|
|
36
|
-
WebSocketImpl = wsModule.default;
|
|
37
|
-
}
|
|
38
|
-
const ws = new WebSocketImpl(url);
|
|
39
|
-
PikkuCLIClient(ws, process.argv.slice(2)).catch(error => {
|
|
40
|
-
console.error('Fatal channel CLI error:', error);
|
|
41
|
-
// TODO: We get an error code even when it exists cleanly, investigate
|
|
42
|
-
// process.exit(1)
|
|
43
|
-
});
|
|
44
|
-
}
|
|
File without changes
|