@pikku/cli 0.10.0 → 0.10.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.pikku/channel/pikku-channel-types.gen.ts +4 -3
- package/.pikku/channel/pikku-channels-map.gen.d.ts +2 -2
- package/.pikku/channel/pikku-channels-meta.gen.ts +1 -1
- package/.pikku/channel/pikku-channels.gen.ts +1 -1
- package/.pikku/cli/pikku-cli-types.gen.ts +23 -1
- package/.pikku/cli/pikku-cli-wirings-meta.gen.ts +4 -115
- package/.pikku/cli/pikku-cli-wirings.gen.ts +2 -3
- package/.pikku/function/pikku-function-types.gen.ts +1 -1
- package/.pikku/function/pikku-functions-meta.gen.ts +156 -138
- package/.pikku/function/pikku-functions-meta.min.gen.ts +37 -32
- package/.pikku/function/pikku-functions.gen.ts +1 -1
- package/.pikku/http/pikku-http-types.gen.ts +1 -1
- package/.pikku/http/pikku-http-wirings-map.gen.d.ts +2 -2
- package/.pikku/http/pikku-http-wirings-meta.gen.ts +1 -1
- package/.pikku/http/pikku-http-wirings.gen.ts +1 -1
- package/.pikku/mcp/pikku-mcp-types.gen.ts +1 -1
- package/.pikku/mcp/pikku-mcp-wirings-meta.gen.ts +1 -1
- package/.pikku/mcp/pikku-mcp-wirings.gen.ts +1 -1
- package/.pikku/pikku-bootstrap.gen.ts +1 -1
- package/.pikku/pikku-services.gen.ts +16 -12
- package/.pikku/pikku-types.gen.ts +1 -1
- package/.pikku/pikku-websocket.gen.ts +15 -1
- package/.pikku/queue/pikku-queue-types.gen.ts +1 -1
- package/.pikku/queue/pikku-queue-workers-wirings-map.gen.d.ts +2 -2
- package/.pikku/queue/pikku-queue-workers-wirings-meta.gen.ts +1 -1
- package/.pikku/queue/pikku-queue-workers-wirings.gen.ts +1 -1
- package/.pikku/rpc/pikku-rpc-wirings-map.gen.d.ts +2 -2
- package/.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts +10 -9
- package/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.ts +9 -8
- package/.pikku/scheduler/pikku-scheduler-types.gen.ts +1 -1
- package/.pikku/scheduler/pikku-schedulers-wirings-meta.gen.ts +1 -1
- package/.pikku/scheduler/pikku-schedulers-wirings.gen.ts +1 -1
- package/.pikku/schemas/register.gen.ts +5 -5
- package/.pikku/schemas/schemas/PikkuCLIConfig.schema.json +1 -1
- package/.pikku/schemas/schemas/PikkuChannelsOutput.schema.json +1 -1
- package/.pikku/schemas/schemas/PikkuSchemasOutput.schema.json +1 -1
- package/CHANGELOG.md +58 -0
- package/bin/pikku.ts +30 -21
- package/cli.schema.json +1 -1
- package/dist/.pikku/channel/pikku-channel-types.gen.d.ts +4 -3
- package/dist/.pikku/channel/pikku-channel-types.gen.js +1 -1
- package/dist/.pikku/channel/pikku-channels-meta.gen.js +1 -1
- package/dist/.pikku/channel/pikku-channels.gen.d.ts +1 -1
- package/dist/.pikku/channel/pikku-channels.gen.js +1 -1
- package/dist/.pikku/cli/pikku-cli-types.gen.d.ts +18 -1
- package/dist/.pikku/cli/pikku-cli-types.gen.js +20 -1
- package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.js +4 -115
- package/dist/.pikku/cli/pikku-cli-wirings.gen.d.ts +1 -2
- package/dist/.pikku/cli/pikku-cli-wirings.gen.js +1 -2
- package/dist/.pikku/function/pikku-function-types.gen.d.ts +1 -1
- package/dist/.pikku/function/pikku-function-types.gen.js +1 -1
- package/dist/.pikku/function/pikku-functions-meta.gen.js +156 -138
- package/dist/.pikku/function/pikku-functions-meta.min.gen.js +37 -32
- 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/mcp/pikku-mcp-wirings-meta.gen.js +1 -1
- package/dist/.pikku/mcp/pikku-mcp-wirings.gen.d.ts +1 -1
- package/dist/.pikku/mcp/pikku-mcp-wirings.gen.js +1 -1
- package/dist/.pikku/pikku-bootstrap.gen.d.ts +1 -1
- package/dist/.pikku/pikku-bootstrap.gen.js +1 -1
- package/dist/.pikku/pikku-services.gen.d.ts +9 -6
- package/dist/.pikku/pikku-services.gen.js +8 -2
- package/dist/.pikku/pikku-types.gen.d.ts +1 -1
- package/dist/.pikku/pikku-types.gen.js +1 -1
- package/dist/.pikku/pikku-websocket.gen.d.ts +15 -1
- package/dist/.pikku/pikku-websocket.gen.js +15 -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 +9 -8
- 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/scheduler/pikku-schedulers-wirings-meta.gen.js +1 -1
- package/dist/.pikku/scheduler/pikku-schedulers-wirings.gen.d.ts +1 -1
- package/dist/.pikku/scheduler/pikku-schedulers-wirings.gen.js +1 -1
- package/dist/.pikku/schemas/register.gen.js +3 -3
- package/dist/.pikku/schemas/schemas/PikkuCLIConfig.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/PikkuChannelsOutput.schema.json +1 -1
- package/dist/.pikku/schemas/schemas/PikkuSchemasOutput.schema.json +1 -1
- package/dist/bin/pikku.js +24 -19
- package/dist/src/cli.wiring.js +107 -99
- package/dist/src/functions/commands/all.js +31 -2
- package/dist/src/functions/commands/bootstrap.d.ts +1 -0
- package/dist/src/functions/commands/bootstrap.js +23 -0
- package/dist/src/functions/runtimes/nextjs/serialize-nextjs-backend-wrapper.js +46 -2
- package/dist/src/functions/wirings/channels/serialize-channel-types.js +3 -2
- package/dist/src/functions/wirings/channels/serialize-websocket-wrapper.js +14 -0
- package/dist/src/functions/wirings/cli/pikku-command-cli-entry.js +4 -4
- package/dist/src/functions/wirings/cli/serialize-channel-cli-client.js +24 -4
- package/dist/src/functions/wirings/cli/serialize-channel-cli.js +32 -7
- package/dist/src/functions/wirings/cli/serialize-cli-types.js +22 -0
- package/dist/src/functions/wirings/functions/pikku-command-services.d.ts +1 -1
- package/dist/src/functions/wirings/functions/pikku-command-services.js +54 -26
- package/dist/src/functions/wirings/functions/schemas.js +2 -2
- package/dist/src/functions/wirings/http/pikku-command-openapi.js +1 -1
- package/dist/src/functions/wirings/middleware/pikku-command-middleware.js +3 -10
- package/dist/src/middleware/log-command-info-and-time.d.ts +1 -1
- package/dist/src/middleware/log-command-info-and-time.js +8 -5
- package/dist/src/services/cli-logger.service.d.ts +7 -2
- package/dist/src/services/cli-logger.service.js +16 -4
- package/dist/src/services.js +77 -12
- package/dist/src/utils/check-required-types.js +11 -1
- package/dist/src/utils/command-summary.d.ts +43 -0
- package/dist/src/utils/command-summary.js +73 -0
- package/dist/src/utils/file-writer.js +2 -2
- package/dist/src/utils/pikku-cli-config.js +28 -0
- package/dist/src/utils/schema-generator.d.ts +2 -2
- package/dist/src/utils/schema-generator.js +3 -3
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -4
- package/pikku.config.json +5 -2
- package/src/cli.wiring.ts +106 -101
- package/src/functions/commands/all.ts +38 -2
- package/src/functions/commands/bootstrap.ts +27 -0
- package/src/functions/runtimes/nextjs/serialize-nextjs-backend-wrapper.ts +46 -2
- package/src/functions/wirings/channels/serialize-channel-types.ts +3 -2
- package/src/functions/wirings/channels/serialize-websocket-wrapper.ts +14 -0
- package/src/functions/wirings/cli/pikku-command-cli-entry.ts +4 -4
- package/src/functions/wirings/cli/serialize-channel-cli-client.ts +24 -4
- package/src/functions/wirings/cli/serialize-channel-cli.ts +40 -8
- package/src/functions/wirings/cli/serialize-cli-types.ts +22 -0
- package/src/functions/wirings/functions/pikku-command-services.ts +57 -28
- package/src/functions/wirings/functions/schemas.ts +4 -3
- package/src/functions/wirings/http/pikku-command-openapi.ts +2 -1
- package/src/functions/wirings/middleware/pikku-command-middleware.ts +11 -22
- package/src/middleware/log-command-info-and-time.ts +8 -5
- package/src/services/cli-logger.service.ts +20 -5
- package/src/services.ts +86 -11
- package/src/utils/check-required-types.ts +16 -1
- package/src/utils/command-summary.ts +101 -0
- package/src/utils/file-writer.ts +2 -2
- package/src/utils/pikku-cli-config.ts +28 -0
- package/src/utils/schema-generator.ts +5 -4
- package/types/application-types.d.ts +5 -1
- package/types/config.d.ts +16 -6
- package/.pikku/cli/pikku-cli-channel.gen.ts +0 -34
- package/.pikku/cli/pikku-cli-client.gen.ts +0 -43
- package/.pikku/cli/pikku-cli.gen.ts +0 -41
- package/dist/.pikku/cli/pikku-cli-channel.gen.d.ts +0 -1
- package/dist/.pikku/cli/pikku-cli-channel.gen.js +0 -33
- package/dist/.pikku/cli/pikku-cli-client.gen.d.ts +0 -10
- package/dist/.pikku/cli/pikku-cli-client.gen.js +0 -34
- package/dist/.pikku/cli/pikku-cli.gen.d.ts +0 -10
- package/dist/.pikku/cli/pikku-cli.gen.js +0 -38
|
@@ -11,17 +11,23 @@ const logo = `
|
|
|
11
11
|
const BASE_ERROR_URL = 'https://pikku.dev/errors';
|
|
12
12
|
export class CLILogger {
|
|
13
13
|
silent;
|
|
14
|
-
level = LogLevel.
|
|
14
|
+
level = LogLevel.warn; // default to warn level
|
|
15
15
|
criticalErrors = [];
|
|
16
16
|
constructor({ logLogo, silent = false, }) {
|
|
17
17
|
this.silent = silent;
|
|
18
18
|
if (logLogo && !silent) {
|
|
19
|
-
this.
|
|
19
|
+
this.logLogo();
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
setLevel(level) {
|
|
23
23
|
this.level = level;
|
|
24
24
|
}
|
|
25
|
+
setSilent(silent) {
|
|
26
|
+
this.silent = silent;
|
|
27
|
+
}
|
|
28
|
+
isSilent() {
|
|
29
|
+
return this.silent;
|
|
30
|
+
}
|
|
25
31
|
info(message) {
|
|
26
32
|
if (this.level > LogLevel.info || this.silent)
|
|
27
33
|
return;
|
|
@@ -49,7 +55,13 @@ export class CLILogger {
|
|
|
49
55
|
debug(message) {
|
|
50
56
|
if (this.level > LogLevel.debug || this.silent)
|
|
51
57
|
return;
|
|
52
|
-
|
|
58
|
+
let c = chalk.gray;
|
|
59
|
+
if (typeof message === 'object') {
|
|
60
|
+
if (message.type === 'success') {
|
|
61
|
+
c = chalk.green;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
console.log(c(typeof message === 'string' ? message : message.message));
|
|
53
65
|
}
|
|
54
66
|
critical(code, message) {
|
|
55
67
|
const url = `${BASE_ERROR_URL}/${code.toLowerCase()}`;
|
|
@@ -60,7 +72,7 @@ export class CLILogger {
|
|
|
60
72
|
hasCriticalErrors() {
|
|
61
73
|
return this.criticalErrors.length > 0;
|
|
62
74
|
}
|
|
63
|
-
|
|
75
|
+
logLogo() {
|
|
64
76
|
this.primary(logo);
|
|
65
77
|
// // When running from dist/, __filename is dist/src/services/cli-logger.service.js
|
|
66
78
|
// // So we need to go up 3 levels: dist/src/services -> dist/src -> dist -> package.json
|
package/dist/src/services.js
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { pikkuCLIRender } from '@pikku/core/cli';
|
|
2
|
-
import { LocalVariablesService } from '@pikku/core/services';
|
|
2
|
+
import { LocalVariablesService, LogLevel } from '@pikku/core/services';
|
|
3
3
|
import { CLILogger } from './services/cli-logger.service.js';
|
|
4
4
|
import { getPikkuCLIConfig } from './utils/pikku-cli-config.js';
|
|
5
|
-
import { inspect, serializeInspectorState, deserializeInspectorState, filterInspectorState, } from '@pikku/inspector';
|
|
5
|
+
import { inspect, serializeInspectorState, deserializeInspectorState, filterInspectorState, getInitialInspectorState, } from '@pikku/inspector';
|
|
6
6
|
import { glob } from 'tinyglobby';
|
|
7
7
|
import path from 'path';
|
|
8
8
|
import { CLILoggerForwarder, } from './services/cli-logger-forwarder.service.js';
|
|
9
9
|
import { readFile, writeFile } from 'fs/promises';
|
|
10
|
-
|
|
10
|
+
// Logger instance will be configured with log level from CLI flags in createConfig
|
|
11
|
+
// Logo will be displayed conditionally in createConfig based on --silent flag
|
|
12
|
+
const logger = new CLILogger({ logLogo: false, silent: false });
|
|
11
13
|
/**
|
|
12
14
|
* Parse a comma-separated string or array into an array of trimmed, non-empty strings
|
|
13
15
|
* Returns undefined if the input is empty/undefined or results in an empty array
|
|
@@ -63,7 +65,7 @@ function parseCLIFilters(data) {
|
|
|
63
65
|
/**
|
|
64
66
|
* Default CLI renderer that logs output using the logger
|
|
65
67
|
*/
|
|
66
|
-
export const defaultCLIRenderer = pikkuCLIRender((
|
|
68
|
+
export const defaultCLIRenderer = pikkuCLIRender(({ logger }, data) => {
|
|
67
69
|
if (data) {
|
|
68
70
|
logger[data.level]({ message: data.message, type: data.type });
|
|
69
71
|
}
|
|
@@ -72,14 +74,41 @@ export const defaultCLIRenderer = pikkuCLIRender((_services, data) => {
|
|
|
72
74
|
* Client-safe CLI renderer that outputs to console (no service dependencies)
|
|
73
75
|
* This renderer can be used in CLI-over-channel clients
|
|
74
76
|
*/
|
|
75
|
-
export const clientCLIRenderer = pikkuCLIRender((
|
|
77
|
+
export const clientCLIRenderer = pikkuCLIRender(({ logger }, data) => {
|
|
76
78
|
if (data) {
|
|
77
|
-
|
|
78
|
-
const prefix = data.type ? `[${data.type}] ` : '';
|
|
79
|
-
console.log(`${prefix}${data.message}`);
|
|
79
|
+
logger[data.level]?.({ message: data.message, type: data.type });
|
|
80
80
|
}
|
|
81
81
|
});
|
|
82
82
|
export const createConfig = async (_variablesService, data) => {
|
|
83
|
+
// Determine log level based on CLI flags with precedence:
|
|
84
|
+
// --silent > --loglevel > --verbose > --info > default (warn)
|
|
85
|
+
let logLevel = LogLevel.warn; // default
|
|
86
|
+
let isSilent = false;
|
|
87
|
+
if (data.silent) {
|
|
88
|
+
logLevel = LogLevel.critical;
|
|
89
|
+
isSilent = true;
|
|
90
|
+
}
|
|
91
|
+
else if (data.loglevel) {
|
|
92
|
+
const levelStr = data.loglevel;
|
|
93
|
+
if (LogLevel[levelStr] !== undefined) {
|
|
94
|
+
logLevel = LogLevel[levelStr];
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
logger.warn(`Invalid log level "${levelStr}". Valid levels: trace, debug, info, warn, error, critical. Using default (warn).`);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
else if (data.verbose) {
|
|
101
|
+
logLevel = LogLevel.debug;
|
|
102
|
+
}
|
|
103
|
+
else if (data.info) {
|
|
104
|
+
logLevel = LogLevel.info;
|
|
105
|
+
}
|
|
106
|
+
logger.setLevel(logLevel);
|
|
107
|
+
logger.setSilent(isSilent);
|
|
108
|
+
// Display logo unless in silent mode
|
|
109
|
+
if (!isSilent) {
|
|
110
|
+
logger.logLogo();
|
|
111
|
+
}
|
|
83
112
|
const cliConfig = await getPikkuCLIConfig(logger, data.configFile, [], true);
|
|
84
113
|
// Load inspector state from file if stateInput is provided
|
|
85
114
|
let preloadedInspectorState = undefined;
|
|
@@ -112,13 +141,49 @@ export const createSingletonServices = async (config) => {
|
|
|
112
141
|
const variables = new LocalVariablesService();
|
|
113
142
|
// Store unfiltered state
|
|
114
143
|
let unfilteredState = preloadedInspectorState;
|
|
115
|
-
const getInspectorState = async (refresh = false) => {
|
|
144
|
+
const getInspectorState = async (refresh = false, setupOnly = false, bootstrapMode = false) => {
|
|
145
|
+
// In bootstrap mode, return a minimal "zero state" with core types
|
|
146
|
+
// This allows bootstrap to run immediately without inspecting the codebase
|
|
147
|
+
if (bootstrapMode) {
|
|
148
|
+
const corePackagePath = '@pikku/core';
|
|
149
|
+
const initialState = getInitialInspectorState(rootDir);
|
|
150
|
+
// Populate filesAndMethods with core types from @pikku/core
|
|
151
|
+
initialState.filesAndMethods = {
|
|
152
|
+
userSessionType: {
|
|
153
|
+
file: corePackagePath,
|
|
154
|
+
variable: 'CoreUserSession',
|
|
155
|
+
type: 'CoreUserSession',
|
|
156
|
+
typePath: corePackagePath,
|
|
157
|
+
},
|
|
158
|
+
sessionServicesType: {
|
|
159
|
+
file: corePackagePath,
|
|
160
|
+
variable: 'CoreServices',
|
|
161
|
+
type: 'CoreServices',
|
|
162
|
+
typePath: corePackagePath,
|
|
163
|
+
},
|
|
164
|
+
singletonServicesType: {
|
|
165
|
+
file: corePackagePath,
|
|
166
|
+
variable: 'CoreSingletonServices',
|
|
167
|
+
type: 'CoreSingletonServices',
|
|
168
|
+
typePath: corePackagePath,
|
|
169
|
+
},
|
|
170
|
+
pikkuConfigType: {
|
|
171
|
+
file: corePackagePath,
|
|
172
|
+
variable: 'CoreConfig',
|
|
173
|
+
type: 'CoreConfig',
|
|
174
|
+
typePath: corePackagePath,
|
|
175
|
+
},
|
|
176
|
+
};
|
|
177
|
+
return initialState;
|
|
178
|
+
}
|
|
116
179
|
// Get or refresh the unfiltered state
|
|
117
180
|
if (!unfilteredState || refresh) {
|
|
118
181
|
// Run inspector WITHOUT filters to get full state
|
|
119
|
-
const wiringFiles = (await Promise.all(srcDirectories.map((dir) => glob(`${path.join(rootDir, dir)}/**/*.ts
|
|
120
|
-
|
|
121
|
-
|
|
182
|
+
const wiringFiles = (await Promise.all(srcDirectories.map((dir) => glob(`${path.join(rootDir, dir)}/**/*.ts`, {
|
|
183
|
+
ignore: config.ignoreFiles || [],
|
|
184
|
+
})))).flat();
|
|
185
|
+
unfilteredState = inspect(logger, wiringFiles, {
|
|
186
|
+
setupOnly,
|
|
122
187
|
types: {
|
|
123
188
|
configFileType: config.configFile,
|
|
124
189
|
userSessionType: config.userSessionType,
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
export const checkRequiredTypes = (errors, requires = {}) => {
|
|
2
|
+
// Filter out errors that are about missing Types when we have the corresponding Factory
|
|
3
|
+
// e.g., if we have a CreateConfig factory, we don't need a CoreConfig type
|
|
4
|
+
const errorMessages = Array.from(errors.keys());
|
|
5
|
+
const hasCreateConfigFactory = errorMessages.every((msg) => !msg.includes('No CreateConfig found'));
|
|
2
6
|
// Only throw if there are errors AND we require those types
|
|
3
|
-
const hasRequiredErrors =
|
|
7
|
+
const hasRequiredErrors = errorMessages.some((message) => {
|
|
8
|
+
// Skip CoreConfig type errors if we have a CreateConfig factory
|
|
9
|
+
if (requires.config &&
|
|
10
|
+
message.includes('No CoreConfig found') &&
|
|
11
|
+
hasCreateConfigFactory) {
|
|
12
|
+
return false;
|
|
13
|
+
}
|
|
4
14
|
if (requires.config && message.includes('CoreConfig'))
|
|
5
15
|
return true;
|
|
6
16
|
if (requires.sessionServiceType && message.includes('CoreServices'))
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export interface CommandSummaryStats {
|
|
2
|
+
httpRoutes?: number;
|
|
3
|
+
channels?: number;
|
|
4
|
+
functions?: number;
|
|
5
|
+
scheduledTasks?: number;
|
|
6
|
+
queueWorkers?: number;
|
|
7
|
+
mcpEndpoints?: number;
|
|
8
|
+
cliCommands?: number;
|
|
9
|
+
[key: string]: number | undefined;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Utility class to collect and display command execution summaries
|
|
13
|
+
*/
|
|
14
|
+
export declare class CommandSummary {
|
|
15
|
+
private stats;
|
|
16
|
+
private startTime;
|
|
17
|
+
private commandName;
|
|
18
|
+
constructor(commandName: string);
|
|
19
|
+
/**
|
|
20
|
+
* Increment a stat counter
|
|
21
|
+
*/
|
|
22
|
+
increment(key: keyof CommandSummaryStats, count?: number): void;
|
|
23
|
+
/**
|
|
24
|
+
* Set a stat value directly
|
|
25
|
+
*/
|
|
26
|
+
set(key: keyof CommandSummaryStats, value: number): void;
|
|
27
|
+
/**
|
|
28
|
+
* Get current stats
|
|
29
|
+
*/
|
|
30
|
+
getStats(): CommandSummaryStats;
|
|
31
|
+
/**
|
|
32
|
+
* Get elapsed time in milliseconds
|
|
33
|
+
*/
|
|
34
|
+
getElapsedTime(): number;
|
|
35
|
+
/**
|
|
36
|
+
* Format the summary for display
|
|
37
|
+
*/
|
|
38
|
+
format(): string;
|
|
39
|
+
/**
|
|
40
|
+
* Check if there are any stats to display
|
|
41
|
+
*/
|
|
42
|
+
hasStats(): boolean;
|
|
43
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
/**
|
|
3
|
+
* Utility class to collect and display command execution summaries
|
|
4
|
+
*/
|
|
5
|
+
export class CommandSummary {
|
|
6
|
+
stats = {};
|
|
7
|
+
startTime;
|
|
8
|
+
commandName;
|
|
9
|
+
constructor(commandName) {
|
|
10
|
+
this.commandName = commandName;
|
|
11
|
+
this.startTime = Date.now();
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Increment a stat counter
|
|
15
|
+
*/
|
|
16
|
+
increment(key, count = 1) {
|
|
17
|
+
this.stats[key] = (this.stats[key] || 0) + count;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Set a stat value directly
|
|
21
|
+
*/
|
|
22
|
+
set(key, value) {
|
|
23
|
+
this.stats[key] = value;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Get current stats
|
|
27
|
+
*/
|
|
28
|
+
getStats() {
|
|
29
|
+
return { ...this.stats };
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Get elapsed time in milliseconds
|
|
33
|
+
*/
|
|
34
|
+
getElapsedTime() {
|
|
35
|
+
return Date.now() - this.startTime;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Format the summary for display
|
|
39
|
+
*/
|
|
40
|
+
format() {
|
|
41
|
+
const elapsed = this.getElapsedTime();
|
|
42
|
+
const lines = [];
|
|
43
|
+
// Header with timing
|
|
44
|
+
lines.push(chalk.green(`\npikku ${this.commandName} (completed in ${elapsed}ms)`));
|
|
45
|
+
// Stats
|
|
46
|
+
const statLabels = {
|
|
47
|
+
httpRoutes: 'HTTP routes',
|
|
48
|
+
channels: 'WebSocket channels',
|
|
49
|
+
functions: 'functions',
|
|
50
|
+
scheduledTasks: 'scheduled tasks',
|
|
51
|
+
queueWorkers: 'queue workers',
|
|
52
|
+
mcpEndpoints: 'MCP endpoints',
|
|
53
|
+
cliCommands: 'CLI commands',
|
|
54
|
+
};
|
|
55
|
+
for (const [key, label] of Object.entries(statLabels)) {
|
|
56
|
+
const value = this.stats[key];
|
|
57
|
+
if (value !== undefined && value > 0) {
|
|
58
|
+
lines.push(chalk.gray(` • ${value} ${label}`));
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
// If no stats, show a simple completion message
|
|
62
|
+
if (Object.values(this.stats).every((v) => !v || v === 0)) {
|
|
63
|
+
return chalk.green(`\npikku ${this.commandName} (completed in ${elapsed}ms)\n`);
|
|
64
|
+
}
|
|
65
|
+
return lines.join('\n') + '\n';
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Check if there are any stats to display
|
|
69
|
+
*/
|
|
70
|
+
hasStats() {
|
|
71
|
+
return Object.values(this.stats).some((v) => v && v > 0);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
@@ -35,7 +35,7 @@ export const writeFileInDir = async (logger, path, content, { ignoreModifyCommen
|
|
|
35
35
|
await mkdir(dirname(path), { recursive: true });
|
|
36
36
|
await writeFile(path, content, 'utf-8');
|
|
37
37
|
if (logWrite) {
|
|
38
|
-
logger.
|
|
38
|
+
logger.debug({ message: `✓ File written to ${path}`, type: 'success' });
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
};
|
|
@@ -44,7 +44,7 @@ export const removeFileInDir = async (logger, path, { logRemove = true } = {}) =
|
|
|
44
44
|
if (existsSync(path)) {
|
|
45
45
|
await rm(path, { force: true });
|
|
46
46
|
if (logRemove) {
|
|
47
|
-
logger.
|
|
47
|
+
logger.debug({ message: `✓ File removed at ${path}`, type: 'success' });
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
};
|
|
@@ -38,6 +38,21 @@ const _getPikkuCLIConfig = async (logger, configFile = undefined, requiredFields
|
|
|
38
38
|
...extendedConfig.packageMappings,
|
|
39
39
|
...config.packageMappings,
|
|
40
40
|
},
|
|
41
|
+
ignoreFiles: config.ignoreFiles ??
|
|
42
|
+
extendedConfig.ignoreFiles ?? [
|
|
43
|
+
'**/*.gen.ts',
|
|
44
|
+
'**/*.test.ts',
|
|
45
|
+
'**/*.spec.ts',
|
|
46
|
+
'**/node_modules/**',
|
|
47
|
+
'**/.pikku/**',
|
|
48
|
+
'**/dist/**',
|
|
49
|
+
],
|
|
50
|
+
schema: {
|
|
51
|
+
additionalProperties: false,
|
|
52
|
+
supportsImportAttributes: false,
|
|
53
|
+
...extendedConfig.schema,
|
|
54
|
+
...config.schema,
|
|
55
|
+
},
|
|
41
56
|
};
|
|
42
57
|
}
|
|
43
58
|
else {
|
|
@@ -48,6 +63,19 @@ const _getPikkuCLIConfig = async (logger, configFile = undefined, requiredFields
|
|
|
48
63
|
rootDir: config.rootDir
|
|
49
64
|
? resolve(configDir, config.rootDir)
|
|
50
65
|
: configDir,
|
|
66
|
+
ignoreFiles: config.ignoreFiles ?? [
|
|
67
|
+
'**/*.gen.ts',
|
|
68
|
+
'**/*.test.ts',
|
|
69
|
+
'**/*.spec.ts',
|
|
70
|
+
'**/node_modules/**',
|
|
71
|
+
'**/.pikku/**',
|
|
72
|
+
'**/dist/**',
|
|
73
|
+
],
|
|
74
|
+
schema: {
|
|
75
|
+
additionalProperties: false,
|
|
76
|
+
supportsImportAttributes: false,
|
|
77
|
+
...config.schema,
|
|
78
|
+
},
|
|
51
79
|
};
|
|
52
80
|
}
|
|
53
81
|
// Create transport/event directories
|
|
@@ -2,5 +2,5 @@ import { FunctionsMeta, JSONValue } from '@pikku/core';
|
|
|
2
2
|
import { HTTPWiringsMeta } from '@pikku/core/http';
|
|
3
3
|
import { TypesMap } from '@pikku/inspector';
|
|
4
4
|
import { CLILogger } from '../services/cli-logger.service.js';
|
|
5
|
-
export declare function generateSchemas(logger: CLILogger, tsconfig: string, typesMap: TypesMap, functionMeta: FunctionsMeta, httpWiringsMeta: HTTPWiringsMeta, additionalTypes?: string[]): Promise<Record<string, JSONValue>>;
|
|
6
|
-
export declare function saveSchemas(logger: CLILogger, schemaParentDir: string, schemas: Record<string, JSONValue>, typesMap: TypesMap, functionsMeta: FunctionsMeta,
|
|
5
|
+
export declare function generateSchemas(logger: CLILogger, tsconfig: string, typesMap: TypesMap, functionMeta: FunctionsMeta, httpWiringsMeta: HTTPWiringsMeta, additionalTypes?: string[], additionalProperties?: boolean): Promise<Record<string, JSONValue>>;
|
|
6
|
+
export declare function saveSchemas(logger: CLILogger, schemaParentDir: string, schemas: Record<string, JSONValue>, typesMap: TypesMap, functionsMeta: FunctionsMeta, additionalTypes?: string[], supportsImportAttributes?: boolean): Promise<void>;
|
|
@@ -2,7 +2,7 @@ import { createGenerator, RootlessError } from 'ts-json-schema-generator';
|
|
|
2
2
|
import { writeFileInDir } from './file-writer.js';
|
|
3
3
|
import { mkdir, writeFile } from 'fs/promises';
|
|
4
4
|
import { ErrorCode } from '@pikku/inspector';
|
|
5
|
-
export async function generateSchemas(logger, tsconfig, typesMap, functionMeta, httpWiringsMeta, additionalTypes) {
|
|
5
|
+
export async function generateSchemas(logger, tsconfig, typesMap, functionMeta, httpWiringsMeta, additionalTypes, additionalProperties = false) {
|
|
6
6
|
const schemasSet = new Set(typesMap.customTypes.keys());
|
|
7
7
|
for (const { inputs, outputs } of Object.values(functionMeta)) {
|
|
8
8
|
const types = [...(inputs || []), ...(outputs || [])];
|
|
@@ -42,7 +42,7 @@ export async function generateSchemas(logger, tsconfig, typesMap, functionMeta,
|
|
|
42
42
|
sortProps: true,
|
|
43
43
|
strictTuples: false,
|
|
44
44
|
encodeRefs: false,
|
|
45
|
-
additionalProperties
|
|
45
|
+
additionalProperties,
|
|
46
46
|
});
|
|
47
47
|
const schemas = {};
|
|
48
48
|
schemasSet.forEach((schema) => {
|
|
@@ -60,7 +60,7 @@ export async function generateSchemas(logger, tsconfig, typesMap, functionMeta,
|
|
|
60
60
|
});
|
|
61
61
|
return schemas;
|
|
62
62
|
}
|
|
63
|
-
export async function saveSchemas(logger, schemaParentDir, schemas, typesMap, functionsMeta,
|
|
63
|
+
export async function saveSchemas(logger, schemaParentDir, schemas, typesMap, functionsMeta, additionalTypes, supportsImportAttributes = false) {
|
|
64
64
|
await writeFileInDir(logger, `${schemaParentDir}/register.gen.ts`, 'export const empty = null;');
|
|
65
65
|
const desiredSchemas = new Set([
|
|
66
66
|
...Object.values(functionsMeta)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"root":["../bin/pikku.ts","../src/cli.wiring.ts","../src/services.ts","../src/functions/commands/all.ts","../src/functions/commands/watch.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/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/pikku-command-websocket-typed.ts","../src/functions/wirings/channels/serialize-channel-types.ts","../src/functions/wirings/channels/serialize-typed-channel-map.ts","../src/functions/wirings/channels/serialize-websocket-wrapper.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/fetch/index.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/pikku-function-types.ts","../src/functions/wirings/functions/schemas.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/http/openapi-spec-generator.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-json.ts","../src/functions/wirings/mcp/serialize-mcp-types.ts","../src/functions/wirings/middleware/pikku-command-middleware.ts","../src/functions/wirings/middleware/serialize-middleware-groups-meta.ts","../src/functions/wirings/middleware/serialize-middleware-imports.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-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-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/middleware/log-command-info-and-time.ts","../src/services/cli-logger-forwarder.service.ts","../src/services/cli-logger.service.ts","../src/utils/check-required-types.ts","../src/utils/custom-types-generator.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/schema-generator.ts","../src/utils/serialize-import-map.ts","../.pikku/pikku-bootstrap.gen.ts","../.pikku/pikku-services.gen.ts","../.pikku/pikku-types.gen.ts","../.pikku/pikku-websocket.gen.ts","../.pikku/channel/pikku-channel-types.gen.ts","../.pikku/channel/pikku-channels-map.gen.d.ts","../.pikku/channel/pikku-channels-meta.gen.ts","../.pikku/channel/pikku-channels.gen.ts","../.pikku/cli/pikku-cli-
|
|
1
|
+
{"root":["../bin/pikku.ts","../src/cli.wiring.ts","../src/services.ts","../src/functions/commands/all.ts","../src/functions/commands/bootstrap.ts","../src/functions/commands/watch.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/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/pikku-command-websocket-typed.ts","../src/functions/wirings/channels/serialize-channel-types.ts","../src/functions/wirings/channels/serialize-typed-channel-map.ts","../src/functions/wirings/channels/serialize-websocket-wrapper.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/fetch/index.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/pikku-function-types.ts","../src/functions/wirings/functions/schemas.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/http/openapi-spec-generator.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-json.ts","../src/functions/wirings/mcp/serialize-mcp-types.ts","../src/functions/wirings/middleware/pikku-command-middleware.ts","../src/functions/wirings/middleware/serialize-middleware-groups-meta.ts","../src/functions/wirings/middleware/serialize-middleware-imports.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-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-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/middleware/log-command-info-and-time.ts","../src/services/cli-logger-forwarder.service.ts","../src/services/cli-logger.service.ts","../src/utils/check-required-types.ts","../src/utils/command-summary.ts","../src/utils/custom-types-generator.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/schema-generator.ts","../src/utils/serialize-import-map.ts","../.pikku/pikku-bootstrap.gen.ts","../.pikku/pikku-services.gen.ts","../.pikku/pikku-types.gen.ts","../.pikku/pikku-websocket.gen.ts","../.pikku/channel/pikku-channel-types.gen.ts","../.pikku/channel/pikku-channels-map.gen.d.ts","../.pikku/channel/pikku-channels-meta.gen.ts","../.pikku/channel/pikku-channels.gen.ts","../.pikku/cli/pikku-cli-types.gen.ts","../.pikku/cli/pikku-cli-wirings-meta.gen.ts","../.pikku/cli/pikku-cli-wirings.gen.ts","../.pikku/function/pikku-function-types.gen.ts","../.pikku/function/pikku-functions-meta.gen.ts","../.pikku/function/pikku-functions-meta.min.gen.ts","../.pikku/function/pikku-functions.gen.ts","../.pikku/http/pikku-http-types.gen.ts","../.pikku/http/pikku-http-wirings-map.gen.d.ts","../.pikku/http/pikku-http-wirings-meta.gen.ts","../.pikku/http/pikku-http-wirings.gen.ts","../.pikku/mcp/pikku-mcp-types.gen.ts","../.pikku/mcp/pikku-mcp-wirings-meta.gen.ts","../.pikku/mcp/pikku-mcp-wirings.gen.ts","../.pikku/queue/pikku-queue-types.gen.ts","../.pikku/queue/pikku-queue-workers-wirings-map.gen.d.ts","../.pikku/queue/pikku-queue-workers-wirings-meta.gen.ts","../.pikku/queue/pikku-queue-workers-wirings.gen.ts","../.pikku/rpc/pikku-rpc-wirings-map.gen.d.ts","../.pikku/rpc/pikku-rpc-wirings-map.internal.gen.d.ts","../.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.ts","../.pikku/scheduler/pikku-scheduler-types.gen.ts","../.pikku/scheduler/pikku-schedulers-wirings-meta.gen.ts","../.pikku/scheduler/pikku-schedulers-wirings.gen.ts","../.pikku/schemas/register.gen.ts","../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.10.
|
|
3
|
+
"version": "0.10.2",
|
|
4
4
|
"author": "yasser.fadl@gmail.com",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|
|
@@ -22,11 +22,10 @@
|
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@openapi-contrib/json-schema-to-openapi-schema": "^4.2.0",
|
|
25
|
-
"@pikku/core": "^0.10.
|
|
26
|
-
"@pikku/inspector": "^0.10.
|
|
25
|
+
"@pikku/core": "^0.10.2",
|
|
26
|
+
"@pikku/inspector": "^0.10.2",
|
|
27
27
|
"@types/cookie": "^1.0.0",
|
|
28
28
|
"@types/json-schema": "^7.0.15",
|
|
29
|
-
"@types/uuid": "^11.0.0",
|
|
30
29
|
"chalk": "^5.6.2",
|
|
31
30
|
"chokidar": "^4.0.3",
|
|
32
31
|
"commander": "^14",
|
package/pikku.config.json
CHANGED
|
@@ -6,16 +6,19 @@
|
|
|
6
6
|
"packageMappings": {
|
|
7
7
|
"../inspector/src": "@pikku/inspector"
|
|
8
8
|
},
|
|
9
|
-
"supportsImportAttributes": true,
|
|
10
9
|
"schemasFromTypes": ["PikkuCLIConfig"],
|
|
11
10
|
"websocketFile": ".pikku/pikku-websocket.gen.ts",
|
|
11
|
+
"supportsImportAttributes": true,
|
|
12
|
+
"schema": {
|
|
13
|
+
"supportsImportAttributes": true
|
|
14
|
+
},
|
|
12
15
|
"cli": {
|
|
13
16
|
"entrypoints": {
|
|
14
17
|
"pikku": [
|
|
15
18
|
".pikku/cli/pikku-cli.gen.ts",
|
|
16
19
|
{
|
|
17
20
|
"type": "channel",
|
|
18
|
-
"wirePath": ".pikku/cli/pikku-cli-channel.
|
|
21
|
+
"wirePath": ".pikku/cli/pikku-cli-channel.ts",
|
|
19
22
|
"path": ".pikku/cli/pikku-cli-client.gen.ts",
|
|
20
23
|
"name": "pikku-cli",
|
|
21
24
|
"route": "/cli/pikku"
|