@pikku/cli 0.8.3 → 0.9.1
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/CHANGELOG.md +16 -0
- package/bin/pikku-all.ts +47 -33
- package/bin/pikku-fetch.ts +1 -1
- package/bin/pikku-openapi.ts +2 -2
- package/bin/pikku-queue-service.ts +2 -2
- package/bin/pikku-websocket.ts +1 -1
- package/cli.schema.json +30 -30
- package/dist/bin/pikku-all.js +38 -33
- package/dist/bin/pikku-fetch.js +1 -1
- package/dist/bin/pikku-openapi.js +2 -2
- package/dist/bin/pikku-queue-service.js +2 -2
- package/dist/bin/pikku-websocket.js +1 -1
- package/dist/src/inspector-glob.js +2 -2
- package/dist/src/pikku-cli-config.d.ts +17 -17
- package/dist/src/pikku-cli-config.js +31 -31
- package/dist/src/runtimes/nextjs/pikku-command-nextjs.js +3 -3
- package/dist/src/runtimes/nextjs/serialize-nextjs-backend-wrapper.js +29 -29
- package/dist/src/runtimes/nextjs/serialize-nextjs-http-wrapper.js +28 -28
- package/dist/src/schema-generator.d.ts +2 -2
- package/dist/src/schema-generator.js +2 -2
- package/dist/src/serialize-pikku-types.js +67 -67
- package/dist/src/utils.d.ts +5 -1
- package/dist/src/utils.js +17 -6
- package/dist/src/wirings/channels/pikku-channels.js +9 -0
- package/dist/src/wirings/channels/pikku-command-channels.js +9 -0
- package/dist/src/{events → wirings}/channels/serialize-typed-channel-map.js +3 -3
- package/dist/src/{events → wirings}/channels/serialize-websocket-wrapper.js +19 -5
- package/dist/src/{events → wirings}/fetch/index.js +2 -2
- package/dist/src/{events → wirings}/http/openapi-spec-generator.d.ts +2 -2
- package/dist/src/wirings/http/pikku-command-http-map.js +8 -0
- package/dist/src/{events → wirings}/http/pikku-command-http-routes.js +3 -3
- package/dist/src/{events → wirings}/http/pikku-http-routes.js +3 -3
- package/dist/src/wirings/http/serialize-fetch-wrapper.js +67 -0
- package/dist/src/wirings/http/serialize-typed-http-map.d.ts +4 -0
- package/dist/src/{events → wirings}/http/serialize-typed-http-map.js +13 -13
- package/dist/src/{events → wirings}/mcp/pikku-command-mcp.js +3 -3
- package/dist/src/wirings/queue/pikku-command-queue-service.js +15 -0
- package/dist/src/{events → wirings}/queue/pikku-command-queue.js +3 -3
- package/dist/src/{events → wirings}/queue/pikku-queue.js +3 -3
- package/dist/src/wirings/rpc/pikku-command-rpc-client.js +15 -0
- package/dist/src/wirings/rpc/pikku-command-rpc.js +6 -0
- package/dist/src/wirings/rpc/pikku-rpc.js +6 -0
- package/dist/src/wirings/rpc/serialize-rpc-wrapper.js +68 -0
- package/dist/src/{events → wirings}/scheduler/pikku-command-scheduler.js +3 -3
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/inspector-glob.ts +2 -2
- package/src/pikku-cli-config.ts +67 -52
- package/src/runtimes/nextjs/pikku-command-nextjs.ts +3 -3
- package/src/runtimes/nextjs/serialize-nextjs-backend-wrapper.ts +29 -29
- package/src/runtimes/nextjs/serialize-nextjs-http-wrapper.ts +28 -28
- package/src/schema-generator.ts +3 -3
- package/src/serialize-pikku-types.ts +67 -67
- package/src/utils.ts +26 -6
- package/src/{events → wirings}/channels/pikku-channels.ts +5 -4
- package/src/{events → wirings}/channels/pikku-command-channels.ts +5 -4
- package/src/{events → wirings}/channels/serialize-typed-channel-map.ts +3 -3
- package/src/{events → wirings}/channels/serialize-websocket-wrapper.ts +19 -5
- package/src/{events → wirings}/fetch/index.ts +2 -2
- package/src/{events → wirings}/http/openapi-spec-generator.ts +3 -3
- package/src/{events → wirings}/http/pikku-command-http-map.ts +5 -5
- package/src/{events → wirings}/http/pikku-command-http-routes.ts +5 -5
- package/src/{events → wirings}/http/pikku-http-routes.ts +5 -5
- package/src/wirings/http/serialize-fetch-wrapper.ts +67 -0
- package/src/{events → wirings}/http/serialize-typed-http-map.ts +17 -17
- package/src/{events → wirings}/mcp/pikku-command-mcp.ts +5 -5
- package/src/{events → wirings}/queue/pikku-command-queue-service.ts +9 -6
- package/src/{events → wirings}/queue/pikku-command-queue.ts +8 -5
- package/src/{events → wirings}/queue/pikku-queue.ts +8 -5
- package/src/{events → wirings}/rpc/pikku-command-rpc-client.ts +9 -6
- package/src/{events → wirings}/rpc/pikku-command-rpc.ts +2 -2
- package/src/{events → wirings}/rpc/pikku-rpc.ts +2 -2
- package/src/wirings/rpc/serialize-rpc-wrapper.ts +68 -0
- package/src/{events → wirings}/scheduler/pikku-command-scheduler.ts +8 -4
- package/dist/src/events/channels/pikku-channels.js +0 -9
- package/dist/src/events/channels/pikku-command-channels.js +0 -9
- package/dist/src/events/http/pikku-command-http-map.js +0 -8
- package/dist/src/events/http/serialize-fetch-wrapper.js +0 -67
- package/dist/src/events/http/serialize-typed-http-map.d.ts +0 -4
- package/dist/src/events/queue/pikku-command-queue-service.js +0 -12
- package/dist/src/events/rpc/pikku-command-rpc-client.js +0 -12
- package/dist/src/events/rpc/pikku-command-rpc.js +0 -6
- package/dist/src/events/rpc/pikku-rpc.js +0 -6
- package/dist/src/events/rpc/serialize-rpc-wrapper.js +0 -29
- package/src/events/http/serialize-fetch-wrapper.ts +0 -67
- package/src/events/rpc/serialize-rpc-wrapper.ts +0 -29
- /package/dist/src/{events → wirings}/channels/pikku-channels.d.ts +0 -0
- /package/dist/src/{events → wirings}/channels/pikku-command-channels-map.d.ts +0 -0
- /package/dist/src/{events → wirings}/channels/pikku-command-channels-map.js +0 -0
- /package/dist/src/{events → wirings}/channels/pikku-command-channels.d.ts +0 -0
- /package/dist/src/{events → wirings}/channels/pikku-command-websocket-typed.d.ts +0 -0
- /package/dist/src/{events → wirings}/channels/pikku-command-websocket-typed.js +0 -0
- /package/dist/src/{events → wirings}/channels/serialize-typed-channel-map.d.ts +0 -0
- /package/dist/src/{events → wirings}/channels/serialize-websocket-wrapper.d.ts +0 -0
- /package/dist/src/{events → wirings}/fetch/index.d.ts +0 -0
- /package/dist/src/{events → wirings}/functions/pikku-command-function-types.d.ts +0 -0
- /package/dist/src/{events → wirings}/functions/pikku-command-function-types.js +0 -0
- /package/dist/src/{events → wirings}/functions/pikku-command-functions.d.ts +0 -0
- /package/dist/src/{events → wirings}/functions/pikku-command-functions.js +0 -0
- /package/dist/src/{events → wirings}/functions/pikku-command-services.d.ts +0 -0
- /package/dist/src/{events → wirings}/functions/pikku-command-services.js +0 -0
- /package/dist/src/{events → wirings}/functions/pikku-function-types.d.ts +0 -0
- /package/dist/src/{events → wirings}/functions/pikku-function-types.js +0 -0
- /package/dist/src/{events → wirings}/functions/pikku-functions.d.ts +0 -0
- /package/dist/src/{events → wirings}/functions/pikku-functions.js +0 -0
- /package/dist/src/{events → wirings}/http/openapi-spec-generator.js +0 -0
- /package/dist/src/{events → wirings}/http/pikku-command-http-map.d.ts +0 -0
- /package/dist/src/{events → wirings}/http/pikku-command-http-routes.d.ts +0 -0
- /package/dist/src/{events → wirings}/http/pikku-command-openapi.d.ts +0 -0
- /package/dist/src/{events → wirings}/http/pikku-command-openapi.js +0 -0
- /package/dist/src/{events → wirings}/http/pikku-http-routes.d.ts +0 -0
- /package/dist/src/{events → wirings}/http/serialize-fetch-wrapper.d.ts +0 -0
- /package/dist/src/{events → wirings}/mcp/pikku-command-mcp-json.d.ts +0 -0
- /package/dist/src/{events → wirings}/mcp/pikku-command-mcp-json.js +0 -0
- /package/dist/src/{events → wirings}/mcp/pikku-command-mcp.d.ts +0 -0
- /package/dist/src/{events → wirings}/mcp/serialize-mcp-json.d.ts +0 -0
- /package/dist/src/{events → wirings}/mcp/serialize-mcp-json.js +0 -0
- /package/dist/src/{events → wirings}/queue/pikku-command-queue-map.d.ts +0 -0
- /package/dist/src/{events → wirings}/queue/pikku-command-queue-map.js +0 -0
- /package/dist/src/{events → wirings}/queue/pikku-command-queue-service.d.ts +0 -0
- /package/dist/src/{events → wirings}/queue/pikku-command-queue.d.ts +0 -0
- /package/dist/src/{events → wirings}/queue/pikku-queue-map.d.ts +0 -0
- /package/dist/src/{events → wirings}/queue/pikku-queue-map.js +0 -0
- /package/dist/src/{events → wirings}/queue/pikku-queue.d.ts +0 -0
- /package/dist/src/{events → wirings}/queue/serialize-queue-map.d.ts +0 -0
- /package/dist/src/{events → wirings}/queue/serialize-queue-map.js +0 -0
- /package/dist/src/{events → wirings}/queue/serialize-queue-meta.d.ts +0 -0
- /package/dist/src/{events → wirings}/queue/serialize-queue-meta.js +0 -0
- /package/dist/src/{events → wirings}/queue/serialize-queue-wrapper.d.ts +0 -0
- /package/dist/src/{events → wirings}/queue/serialize-queue-wrapper.js +0 -0
- /package/dist/src/{events → wirings}/rpc/pikku-command-rpc-client.d.ts +0 -0
- /package/dist/src/{events → wirings}/rpc/pikku-command-rpc-map.d.ts +0 -0
- /package/dist/src/{events → wirings}/rpc/pikku-command-rpc-map.js +0 -0
- /package/dist/src/{events → wirings}/rpc/pikku-command-rpc.d.ts +0 -0
- /package/dist/src/{events → wirings}/rpc/pikku-rpc.d.ts +0 -0
- /package/dist/src/{events → wirings}/rpc/serialize-rpc-wrapper.d.ts +0 -0
- /package/dist/src/{events → wirings}/rpc/serialize-typed-rpc-map.d.ts +0 -0
- /package/dist/src/{events → wirings}/rpc/serialize-typed-rpc-map.js +0 -0
- /package/dist/src/{events → wirings}/scheduler/pikku-command-scheduler.d.ts +0 -0
- /package/dist/src/{events → wirings}/scheduler/serialize-scheduler-meta.d.ts +0 -0
- /package/dist/src/{events → wirings}/scheduler/serialize-scheduler-meta.js +0 -0
- /package/src/{events → wirings}/channels/pikku-command-channels-map.ts +0 -0
- /package/src/{events → wirings}/channels/pikku-command-websocket-typed.ts +0 -0
- /package/src/{events → wirings}/functions/pikku-command-function-types.ts +0 -0
- /package/src/{events → wirings}/functions/pikku-command-functions.ts +0 -0
- /package/src/{events → wirings}/functions/pikku-command-services.ts +0 -0
- /package/src/{events → wirings}/functions/pikku-function-types.ts +0 -0
- /package/src/{events → wirings}/functions/pikku-functions.ts +0 -0
- /package/src/{events → wirings}/http/pikku-command-openapi.ts +0 -0
- /package/src/{events → wirings}/mcp/pikku-command-mcp-json.ts +0 -0
- /package/src/{events → wirings}/mcp/serialize-mcp-json.ts +0 -0
- /package/src/{events → wirings}/queue/pikku-command-queue-map.ts +0 -0
- /package/src/{events → wirings}/queue/pikku-queue-map.ts +0 -0
- /package/src/{events → wirings}/queue/serialize-queue-map.ts +0 -0
- /package/src/{events → wirings}/queue/serialize-queue-meta.ts +0 -0
- /package/src/{events → wirings}/queue/serialize-queue-wrapper.ts +0 -0
- /package/src/{events → wirings}/rpc/pikku-command-rpc-map.ts +0 -0
- /package/src/{events → wirings}/rpc/serialize-typed-rpc-map.ts +0 -0
- /package/src/{events → wirings}/scheduler/serialize-scheduler-meta.ts +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @pikku/cli
|
|
2
2
|
|
|
3
|
+
## 0.9.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- fdb1593: feat: adding silent option to cli
|
|
8
|
+
- fdb1593: core: bumping everything with a patch to sync up the major release inconsistencies in dependencies
|
|
9
|
+
- Updated dependencies [fdb1593]
|
|
10
|
+
- @pikku/core@0.9.1
|
|
11
|
+
- @pikku/inspector@0.9.1
|
|
12
|
+
|
|
13
|
+
## 0.9.0
|
|
14
|
+
|
|
15
|
+
### Breaking Changes
|
|
16
|
+
|
|
17
|
+
- Normalized all transports to use "wirings" instead of events/routes/transports for consistency across the framework
|
|
18
|
+
|
|
3
19
|
## 0.8.3
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/bin/pikku-all.ts
CHANGED
|
@@ -6,29 +6,29 @@ import {
|
|
|
6
6
|
writeFileInDir,
|
|
7
7
|
} from '../src/utils.js'
|
|
8
8
|
import { getPikkuCLIConfig, PikkuCLIConfig } from '../src/pikku-cli-config.js'
|
|
9
|
-
import { pikkuHTTP } from '../src/
|
|
10
|
-
import { pikkuFunctionTypes } from '../src/
|
|
11
|
-
import { pikkuHTTPMap } from '../src/
|
|
9
|
+
import { pikkuHTTP } from '../src/wirings/http/pikku-command-http-routes.js'
|
|
10
|
+
import { pikkuFunctionTypes } from '../src/wirings/functions/pikku-command-function-types.js'
|
|
11
|
+
import { pikkuHTTPMap } from '../src/wirings/http/pikku-command-http-map.js'
|
|
12
12
|
import { existsSync } from 'fs'
|
|
13
|
-
import { pikkuChannelsMap } from '../src/
|
|
14
|
-
import { pikkuChannels } from '../src/
|
|
13
|
+
import { pikkuChannelsMap } from '../src/wirings/channels/pikku-command-channels-map.js'
|
|
14
|
+
import { pikkuChannels } from '../src/wirings/channels/pikku-command-channels.js'
|
|
15
15
|
import { inspectorGlob } from '../src/inspector-glob.js'
|
|
16
16
|
import chokidar from 'chokidar'
|
|
17
|
-
import { pikkuFunctions } from '../src/
|
|
18
|
-
import { pikkuServices } from '../src/
|
|
19
|
-
import { pikkuRPC } from '../src/
|
|
20
|
-
import { pikkuRPCMap } from '../src/
|
|
21
|
-
import { pikkuQueue } from '../src/
|
|
22
|
-
import { pikkuQueueMap } from '../src/
|
|
23
|
-
import { pikkuFetch } from '../src/
|
|
24
|
-
import { pikkuRPCClient } from '../src/
|
|
25
|
-
import { pikkuWebSocketTyped } from '../src/
|
|
26
|
-
import { pikkuOpenAPI } from '../src/
|
|
27
|
-
import { pikkuMCP } from '../src/
|
|
28
|
-
import { pikkuQueueService } from '../src/
|
|
29
|
-
import { pikkuScheduler } from '../src/
|
|
17
|
+
import { pikkuFunctions } from '../src/wirings/functions/pikku-command-functions.js'
|
|
18
|
+
import { pikkuServices } from '../src/wirings/functions/pikku-command-services.js'
|
|
19
|
+
import { pikkuRPC } from '../src/wirings/rpc/pikku-command-rpc.js'
|
|
20
|
+
import { pikkuRPCMap } from '../src/wirings/rpc/pikku-command-rpc-map.js'
|
|
21
|
+
import { pikkuQueue } from '../src/wirings/queue/pikku-command-queue.js'
|
|
22
|
+
import { pikkuQueueMap } from '../src/wirings/queue/pikku-command-queue-map.js'
|
|
23
|
+
import { pikkuFetch } from '../src/wirings/fetch/index.js'
|
|
24
|
+
import { pikkuRPCClient } from '../src/wirings/rpc/pikku-command-rpc-client.js'
|
|
25
|
+
import { pikkuWebSocketTyped } from '../src/wirings/channels/pikku-command-websocket-typed.js'
|
|
26
|
+
import { pikkuOpenAPI } from '../src/wirings/http/pikku-command-openapi.js'
|
|
27
|
+
import { pikkuMCP } from '../src/wirings/mcp/pikku-command-mcp.js'
|
|
28
|
+
import { pikkuQueueService } from '../src/wirings/queue/pikku-command-queue-service.js'
|
|
29
|
+
import { pikkuScheduler } from '../src/wirings/scheduler/pikku-command-scheduler.js'
|
|
30
30
|
import { pikkuSchemas } from '../src/schemas.js'
|
|
31
|
-
import { pikkuMCPJSON } from '../src/
|
|
31
|
+
import { pikkuMCPJSON } from '../src/wirings/mcp/pikku-command-mcp-json.js'
|
|
32
32
|
import { pikkuNext } from '../src/runtimes/nextjs/pikku-command-nextjs.js'
|
|
33
33
|
|
|
34
34
|
const generateBootstrapFile = async (
|
|
@@ -82,7 +82,7 @@ const runAll = async (
|
|
|
82
82
|
}
|
|
83
83
|
await pikkuFunctionTypes(logger, cliConfig, visitState, options)
|
|
84
84
|
|
|
85
|
-
// This is needed since the
|
|
85
|
+
// This is needed since the wireHTTP function will add the routes to the visitState
|
|
86
86
|
if (!typesDeclarationFileExists) {
|
|
87
87
|
logger.info(`• Type file first created, inspecting again...\x1b[0m`)
|
|
88
88
|
visitState = await inspectorGlob(
|
|
@@ -108,7 +108,7 @@ const runAll = async (
|
|
|
108
108
|
await pikkuRPC(logger, cliConfig, visitState)
|
|
109
109
|
await pikkuRPCMap(logger, cliConfig, visitState)
|
|
110
110
|
await pikkuRPCClient(logger, cliConfig)
|
|
111
|
-
allImports.push(cliConfig.
|
|
111
|
+
allImports.push(cliConfig.rpcWiringMetaFile)
|
|
112
112
|
|
|
113
113
|
const schemas = await pikkuSchemas(logger, cliConfig, visitState)
|
|
114
114
|
if (schemas) {
|
|
@@ -120,7 +120,7 @@ const runAll = async (
|
|
|
120
120
|
logger,
|
|
121
121
|
cliConfig,
|
|
122
122
|
cliConfig.bootstrapFiles.rpc,
|
|
123
|
-
[cliConfig.
|
|
123
|
+
[cliConfig.rpcWiringMetaFile],
|
|
124
124
|
schemas
|
|
125
125
|
)
|
|
126
126
|
|
|
@@ -128,26 +128,29 @@ const runAll = async (
|
|
|
128
128
|
if (http) {
|
|
129
129
|
await pikkuHTTPMap(logger, cliConfig, visitState)
|
|
130
130
|
await pikkuFetch(logger, cliConfig)
|
|
131
|
-
allImports.push(cliConfig.
|
|
131
|
+
allImports.push(cliConfig.httpWiringMetaFile, cliConfig.httpWiringsFile)
|
|
132
132
|
|
|
133
133
|
await generateBootstrapFile(
|
|
134
134
|
logger,
|
|
135
135
|
cliConfig,
|
|
136
136
|
cliConfig.bootstrapFiles.http,
|
|
137
|
-
[cliConfig.
|
|
137
|
+
[cliConfig.httpWiringMetaFile, cliConfig.httpWiringsFile],
|
|
138
138
|
schemas
|
|
139
139
|
)
|
|
140
140
|
}
|
|
141
141
|
|
|
142
142
|
const scheduler = await pikkuScheduler(logger, cliConfig, visitState)
|
|
143
143
|
if (scheduler) {
|
|
144
|
-
allImports.push(
|
|
144
|
+
allImports.push(
|
|
145
|
+
cliConfig.schedulersWiringMetaFile,
|
|
146
|
+
cliConfig.schedulersWiringFile
|
|
147
|
+
)
|
|
145
148
|
|
|
146
149
|
await generateBootstrapFile(
|
|
147
150
|
logger,
|
|
148
151
|
cliConfig,
|
|
149
152
|
cliConfig.bootstrapFiles.scheduler,
|
|
150
|
-
[cliConfig.
|
|
153
|
+
[cliConfig.schedulersWiringMetaFile, cliConfig.schedulersWiringFile],
|
|
151
154
|
schemas
|
|
152
155
|
)
|
|
153
156
|
}
|
|
@@ -156,13 +159,16 @@ const runAll = async (
|
|
|
156
159
|
if (queues) {
|
|
157
160
|
await pikkuQueueMap(logger, cliConfig, visitState)
|
|
158
161
|
await pikkuQueueService(logger, cliConfig)
|
|
159
|
-
allImports.push(
|
|
162
|
+
allImports.push(
|
|
163
|
+
cliConfig.queueWorkersWiringMetaFile,
|
|
164
|
+
cliConfig.queueWorkersWiringFile
|
|
165
|
+
)
|
|
160
166
|
|
|
161
167
|
await generateBootstrapFile(
|
|
162
168
|
logger,
|
|
163
169
|
cliConfig,
|
|
164
170
|
cliConfig.bootstrapFiles.queue,
|
|
165
|
-
[cliConfig.
|
|
171
|
+
[cliConfig.queueWorkersWiringMetaFile, cliConfig.queueWorkersWiringFile],
|
|
166
172
|
schemas
|
|
167
173
|
)
|
|
168
174
|
}
|
|
@@ -171,13 +177,16 @@ const runAll = async (
|
|
|
171
177
|
if (channels) {
|
|
172
178
|
await pikkuChannelsMap(logger, cliConfig, visitState)
|
|
173
179
|
await pikkuWebSocketTyped(logger, cliConfig)
|
|
174
|
-
allImports.push(
|
|
180
|
+
allImports.push(
|
|
181
|
+
cliConfig.channelsWiringMetaFile,
|
|
182
|
+
cliConfig.channelsWiringFile
|
|
183
|
+
)
|
|
175
184
|
|
|
176
185
|
await generateBootstrapFile(
|
|
177
186
|
logger,
|
|
178
187
|
cliConfig,
|
|
179
188
|
cliConfig.bootstrapFiles.channel,
|
|
180
|
-
[cliConfig.
|
|
189
|
+
[cliConfig.channelsWiringMetaFile, cliConfig.channelsWiringFile],
|
|
181
190
|
schemas
|
|
182
191
|
)
|
|
183
192
|
}
|
|
@@ -185,13 +194,13 @@ const runAll = async (
|
|
|
185
194
|
const mcp = await pikkuMCP(logger, cliConfig, visitState)
|
|
186
195
|
if (mcp) {
|
|
187
196
|
await pikkuMCPJSON(logger, cliConfig, visitState)
|
|
188
|
-
allImports.push(cliConfig.
|
|
197
|
+
allImports.push(cliConfig.mcpWiringsMetaFile, cliConfig.mcpWiringsFile)
|
|
189
198
|
|
|
190
199
|
await generateBootstrapFile(
|
|
191
200
|
logger,
|
|
192
201
|
cliConfig,
|
|
193
202
|
cliConfig.bootstrapFiles.mcp,
|
|
194
|
-
[cliConfig.
|
|
203
|
+
[cliConfig.mcpWiringsMetaFile, cliConfig.mcpWiringsFile],
|
|
195
204
|
schemas
|
|
196
205
|
)
|
|
197
206
|
}
|
|
@@ -253,7 +262,11 @@ const watch = (
|
|
|
253
262
|
watcher.on('ready', async () => {
|
|
254
263
|
const handle = async () => {
|
|
255
264
|
try {
|
|
265
|
+
const start = Date.now()
|
|
256
266
|
await runAll(logger, cliConfig, options)
|
|
267
|
+
if (options.silent) {
|
|
268
|
+
logger.timing(`✓ Generated in ${Date.now() - start}ms`)
|
|
269
|
+
}
|
|
257
270
|
} catch (err) {
|
|
258
271
|
console.error(err)
|
|
259
272
|
console.info()
|
|
@@ -282,7 +295,7 @@ const watch = (
|
|
|
282
295
|
}
|
|
283
296
|
|
|
284
297
|
export const action = async (options: PikkuCLIOptions): Promise<void> => {
|
|
285
|
-
const logger = new CLILogger({ logLogo: true })
|
|
298
|
+
const logger = new CLILogger({ logLogo: true, silent: options.silent })
|
|
286
299
|
|
|
287
300
|
const cliConfig = await getPikkuCLIConfig(
|
|
288
301
|
options.config,
|
|
@@ -323,5 +336,6 @@ export const all = (program: Command): void => {
|
|
|
323
336
|
)
|
|
324
337
|
.option('--directories <directories...>', 'Which directories to filter by')
|
|
325
338
|
.option('-w | --watch', 'Whether to watch file changes')
|
|
339
|
+
.option('-s | --silent', 'Silent mode - only show errors')
|
|
326
340
|
.action(action)
|
|
327
341
|
}
|
package/bin/pikku-fetch.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Command } from 'commander'
|
|
2
2
|
import { getPikkuCLIConfig } from '../src/pikku-cli-config.js'
|
|
3
|
-
import { pikkuFetch } from '../src/
|
|
3
|
+
import { pikkuFetch } from '../src/wirings/fetch/index.js'
|
|
4
4
|
import { CLILogger, PikkuCLIOptions } from '../src/utils.js'
|
|
5
5
|
|
|
6
6
|
export const action = async (options: PikkuCLIOptions): Promise<void> => {
|
package/bin/pikku-openapi.ts
CHANGED
|
@@ -2,13 +2,13 @@ import { Command } from 'commander'
|
|
|
2
2
|
import { CLILogger, PikkuCLIOptions } from '../src/utils.js'
|
|
3
3
|
import { getPikkuCLIConfig } from '../src/pikku-cli-config.js'
|
|
4
4
|
import { inspectorGlob } from '../src/inspector-glob.js'
|
|
5
|
-
import { pikkuOpenAPI } from '../src/
|
|
5
|
+
import { pikkuOpenAPI } from '../src/wirings/http/pikku-command-openapi.js'
|
|
6
6
|
|
|
7
7
|
async function action({ config, tags }: PikkuCLIOptions): Promise<void> {
|
|
8
8
|
const logger = new CLILogger({ logLogo: true })
|
|
9
9
|
const cliConfig = await getPikkuCLIConfig(
|
|
10
10
|
config,
|
|
11
|
-
['rootDir', '
|
|
11
|
+
['rootDir', 'httpWiringsFile', 'openAPI', 'schemaDirectory', 'tsconfig'],
|
|
12
12
|
{
|
|
13
13
|
tags: tags || [],
|
|
14
14
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { Command } from 'commander'
|
|
2
2
|
import { getPikkuCLIConfig } from '../src/pikku-cli-config.js'
|
|
3
3
|
import { CLILogger, PikkuCLIOptions } from '../src/utils.js'
|
|
4
|
-
import { pikkuQueueService } from '../src/
|
|
4
|
+
import { pikkuQueueService } from '../src/wirings/queue/pikku-command-queue-service.js'
|
|
5
5
|
|
|
6
6
|
export const action = async (options: PikkuCLIOptions): Promise<void> => {
|
|
7
7
|
const logger = new CLILogger({ logLogo: true })
|
|
8
8
|
|
|
9
9
|
const cliConfig = await getPikkuCLIConfig(
|
|
10
10
|
options.config,
|
|
11
|
-
['rootDir', 'schemaDirectory', 'configDir', '
|
|
11
|
+
['rootDir', 'schemaDirectory', 'configDir', 'queueWiringsFile'],
|
|
12
12
|
{
|
|
13
13
|
tags: options.tags,
|
|
14
14
|
types: options.types,
|
package/bin/pikku-websocket.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Command } from 'commander'
|
|
2
2
|
import { CLILogger, PikkuCLIOptions } from '../src/utils.js'
|
|
3
3
|
import { getPikkuCLIConfig } from '../src/pikku-cli-config.js'
|
|
4
|
-
import { pikkuWebSocketTyped } from '../src/
|
|
4
|
+
import { pikkuWebSocketTyped } from '../src/wirings/channels/pikku-command-websocket-typed.js'
|
|
5
5
|
|
|
6
6
|
export const action = async (options: PikkuCLIOptions): Promise<void> => {
|
|
7
7
|
const logger = new CLILogger({ logLogo: true })
|
package/cli.schema.json
CHANGED
|
@@ -172,13 +172,13 @@
|
|
|
172
172
|
"required": ["http", "scheduler", "channel", "rpc", "queue", "mcp"],
|
|
173
173
|
"type": "object"
|
|
174
174
|
},
|
|
175
|
-
"
|
|
175
|
+
"channelsMapDeclarationFile": {
|
|
176
176
|
"type": "string"
|
|
177
177
|
},
|
|
178
|
-
"
|
|
178
|
+
"channelsWiringFile": {
|
|
179
179
|
"type": "string"
|
|
180
180
|
},
|
|
181
|
-
"
|
|
181
|
+
"channelsWiringMetaFile": {
|
|
182
182
|
"type": "string"
|
|
183
183
|
},
|
|
184
184
|
"configDir": {
|
|
@@ -199,22 +199,22 @@
|
|
|
199
199
|
"functionsMetaFile": {
|
|
200
200
|
"type": "string"
|
|
201
201
|
},
|
|
202
|
-
"
|
|
202
|
+
"httpMapDeclarationFile": {
|
|
203
203
|
"type": "string"
|
|
204
204
|
},
|
|
205
|
-
"
|
|
205
|
+
"httpWiringMetaFile": {
|
|
206
206
|
"type": "string"
|
|
207
207
|
},
|
|
208
|
-
"
|
|
208
|
+
"httpWiringsFile": {
|
|
209
209
|
"type": "string"
|
|
210
210
|
},
|
|
211
|
-
"
|
|
211
|
+
"mcpJsonFile": {
|
|
212
212
|
"type": "string"
|
|
213
213
|
},
|
|
214
|
-
"
|
|
214
|
+
"mcpWiringsFile": {
|
|
215
215
|
"type": "string"
|
|
216
216
|
},
|
|
217
|
-
"
|
|
217
|
+
"mcpWiringsMetaFile": {
|
|
218
218
|
"type": "string"
|
|
219
219
|
},
|
|
220
220
|
"middlewareServices": {
|
|
@@ -251,34 +251,34 @@
|
|
|
251
251
|
},
|
|
252
252
|
"type": "object"
|
|
253
253
|
},
|
|
254
|
-
"
|
|
254
|
+
"queueMapDeclarationFile": {
|
|
255
255
|
"type": "string"
|
|
256
256
|
},
|
|
257
|
-
"
|
|
257
|
+
"queueWiringsFile": {
|
|
258
258
|
"type": "string"
|
|
259
259
|
},
|
|
260
|
-
"
|
|
260
|
+
"queueWorkersWiringFile": {
|
|
261
261
|
"type": "string"
|
|
262
262
|
},
|
|
263
|
-
"
|
|
263
|
+
"queueWorkersWiringMetaFile": {
|
|
264
264
|
"type": "string"
|
|
265
265
|
},
|
|
266
266
|
"rootDir": {
|
|
267
267
|
"type": "string"
|
|
268
268
|
},
|
|
269
|
-
"
|
|
269
|
+
"rpcMapDeclarationFile": {
|
|
270
270
|
"type": "string"
|
|
271
271
|
},
|
|
272
|
-
"
|
|
272
|
+
"rpcWiringMetaFile": {
|
|
273
273
|
"type": "string"
|
|
274
274
|
},
|
|
275
|
-
"
|
|
275
|
+
"rpcWiringsFile": {
|
|
276
276
|
"type": "string"
|
|
277
277
|
},
|
|
278
|
-
"
|
|
278
|
+
"schedulersWiringFile": {
|
|
279
279
|
"type": "string"
|
|
280
280
|
},
|
|
281
|
-
"
|
|
281
|
+
"schedulersWiringMetaFile": {
|
|
282
282
|
"type": "string"
|
|
283
283
|
},
|
|
284
284
|
"schemaDirectory": {
|
|
@@ -309,27 +309,27 @@
|
|
|
309
309
|
"required": [
|
|
310
310
|
"bootstrapFile",
|
|
311
311
|
"bootstrapFiles",
|
|
312
|
-
"channelsFile",
|
|
313
312
|
"channelsMapDeclarationFile",
|
|
314
|
-
"
|
|
313
|
+
"channelsWiringFile",
|
|
314
|
+
"channelsWiringMetaFile",
|
|
315
315
|
"configDir",
|
|
316
316
|
"filters",
|
|
317
317
|
"functionsFile",
|
|
318
318
|
"functionsMetaFile",
|
|
319
|
-
"
|
|
320
|
-
"
|
|
321
|
-
"
|
|
322
|
-
"
|
|
323
|
-
"
|
|
319
|
+
"httpMapDeclarationFile",
|
|
320
|
+
"httpWiringMetaFile",
|
|
321
|
+
"httpWiringsFile",
|
|
322
|
+
"mcpWiringsFile",
|
|
323
|
+
"mcpWiringsMetaFile",
|
|
324
324
|
"packageMappings",
|
|
325
325
|
"queueMapDeclarationFile",
|
|
326
|
-
"
|
|
327
|
-
"
|
|
326
|
+
"queueWorkersWiringFile",
|
|
327
|
+
"queueWorkersWiringMetaFile",
|
|
328
328
|
"rootDir",
|
|
329
329
|
"rpcMapDeclarationFile",
|
|
330
|
-
"
|
|
331
|
-
"
|
|
332
|
-
"
|
|
330
|
+
"rpcWiringMetaFile",
|
|
331
|
+
"schedulersWiringFile",
|
|
332
|
+
"schedulersWiringMetaFile",
|
|
333
333
|
"schemaDirectory",
|
|
334
334
|
"servicesFile",
|
|
335
335
|
"srcDirectories",
|
package/dist/bin/pikku-all.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { CLILogger, getFileImportRelativePath, writeFileInDir, } from '../src/utils.js';
|
|
2
2
|
import { getPikkuCLIConfig } from '../src/pikku-cli-config.js';
|
|
3
|
-
import { pikkuHTTP } from '../src/
|
|
4
|
-
import { pikkuFunctionTypes } from '../src/
|
|
5
|
-
import { pikkuHTTPMap } from '../src/
|
|
3
|
+
import { pikkuHTTP } from '../src/wirings/http/pikku-command-http-routes.js';
|
|
4
|
+
import { pikkuFunctionTypes } from '../src/wirings/functions/pikku-command-function-types.js';
|
|
5
|
+
import { pikkuHTTPMap } from '../src/wirings/http/pikku-command-http-map.js';
|
|
6
6
|
import { existsSync } from 'fs';
|
|
7
|
-
import { pikkuChannelsMap } from '../src/
|
|
8
|
-
import { pikkuChannels } from '../src/
|
|
7
|
+
import { pikkuChannelsMap } from '../src/wirings/channels/pikku-command-channels-map.js';
|
|
8
|
+
import { pikkuChannels } from '../src/wirings/channels/pikku-command-channels.js';
|
|
9
9
|
import { inspectorGlob } from '../src/inspector-glob.js';
|
|
10
10
|
import chokidar from 'chokidar';
|
|
11
|
-
import { pikkuFunctions } from '../src/
|
|
12
|
-
import { pikkuServices } from '../src/
|
|
13
|
-
import { pikkuRPC } from '../src/
|
|
14
|
-
import { pikkuRPCMap } from '../src/
|
|
15
|
-
import { pikkuQueue } from '../src/
|
|
16
|
-
import { pikkuQueueMap } from '../src/
|
|
17
|
-
import { pikkuFetch } from '../src/
|
|
18
|
-
import { pikkuRPCClient } from '../src/
|
|
19
|
-
import { pikkuWebSocketTyped } from '../src/
|
|
20
|
-
import { pikkuOpenAPI } from '../src/
|
|
21
|
-
import { pikkuMCP } from '../src/
|
|
22
|
-
import { pikkuQueueService } from '../src/
|
|
23
|
-
import { pikkuScheduler } from '../src/
|
|
11
|
+
import { pikkuFunctions } from '../src/wirings/functions/pikku-command-functions.js';
|
|
12
|
+
import { pikkuServices } from '../src/wirings/functions/pikku-command-services.js';
|
|
13
|
+
import { pikkuRPC } from '../src/wirings/rpc/pikku-command-rpc.js';
|
|
14
|
+
import { pikkuRPCMap } from '../src/wirings/rpc/pikku-command-rpc-map.js';
|
|
15
|
+
import { pikkuQueue } from '../src/wirings/queue/pikku-command-queue.js';
|
|
16
|
+
import { pikkuQueueMap } from '../src/wirings/queue/pikku-command-queue-map.js';
|
|
17
|
+
import { pikkuFetch } from '../src/wirings/fetch/index.js';
|
|
18
|
+
import { pikkuRPCClient } from '../src/wirings/rpc/pikku-command-rpc-client.js';
|
|
19
|
+
import { pikkuWebSocketTyped } from '../src/wirings/channels/pikku-command-websocket-typed.js';
|
|
20
|
+
import { pikkuOpenAPI } from '../src/wirings/http/pikku-command-openapi.js';
|
|
21
|
+
import { pikkuMCP } from '../src/wirings/mcp/pikku-command-mcp.js';
|
|
22
|
+
import { pikkuQueueService } from '../src/wirings/queue/pikku-command-queue-service.js';
|
|
23
|
+
import { pikkuScheduler } from '../src/wirings/scheduler/pikku-command-scheduler.js';
|
|
24
24
|
import { pikkuSchemas } from '../src/schemas.js';
|
|
25
|
-
import { pikkuMCPJSON } from '../src/
|
|
25
|
+
import { pikkuMCPJSON } from '../src/wirings/mcp/pikku-command-mcp-json.js';
|
|
26
26
|
import { pikkuNext } from '../src/runtimes/nextjs/pikku-command-nextjs.js';
|
|
27
27
|
const generateBootstrapFile = async (logger, cliConfig, bootstrapFile, specificImports, schemas) => {
|
|
28
28
|
// Common imports that every bootstrap file needs
|
|
@@ -46,7 +46,7 @@ const runAll = async (logger, cliConfig, options) => {
|
|
|
46
46
|
typesDeclarationFileExists = false;
|
|
47
47
|
}
|
|
48
48
|
await pikkuFunctionTypes(logger, cliConfig, visitState, options);
|
|
49
|
-
// This is needed since the
|
|
49
|
+
// This is needed since the wireHTTP function will add the routes to the visitState
|
|
50
50
|
if (!typesDeclarationFileExists) {
|
|
51
51
|
logger.info(`• Type file first created, inspecting again...\x1b[0m`);
|
|
52
52
|
visitState = await inspectorGlob(logger, cliConfig.rootDir, cliConfig.srcDirectories, cliConfig.filters);
|
|
@@ -63,44 +63,44 @@ const runAll = async (logger, cliConfig, options) => {
|
|
|
63
63
|
await pikkuRPC(logger, cliConfig, visitState);
|
|
64
64
|
await pikkuRPCMap(logger, cliConfig, visitState);
|
|
65
65
|
await pikkuRPCClient(logger, cliConfig);
|
|
66
|
-
allImports.push(cliConfig.
|
|
66
|
+
allImports.push(cliConfig.rpcWiringMetaFile);
|
|
67
67
|
const schemas = await pikkuSchemas(logger, cliConfig, visitState);
|
|
68
68
|
if (schemas) {
|
|
69
69
|
allImports.push(`${cliConfig.schemaDirectory}/register.gen.ts`);
|
|
70
70
|
}
|
|
71
71
|
// RPC bootstrap is always generated since RPC is always present
|
|
72
|
-
await generateBootstrapFile(logger, cliConfig, cliConfig.bootstrapFiles.rpc, [cliConfig.
|
|
72
|
+
await generateBootstrapFile(logger, cliConfig, cliConfig.bootstrapFiles.rpc, [cliConfig.rpcWiringMetaFile], schemas);
|
|
73
73
|
const http = await pikkuHTTP(logger, cliConfig, visitState);
|
|
74
74
|
if (http) {
|
|
75
75
|
await pikkuHTTPMap(logger, cliConfig, visitState);
|
|
76
76
|
await pikkuFetch(logger, cliConfig);
|
|
77
|
-
allImports.push(cliConfig.
|
|
78
|
-
await generateBootstrapFile(logger, cliConfig, cliConfig.bootstrapFiles.http, [cliConfig.
|
|
77
|
+
allImports.push(cliConfig.httpWiringMetaFile, cliConfig.httpWiringsFile);
|
|
78
|
+
await generateBootstrapFile(logger, cliConfig, cliConfig.bootstrapFiles.http, [cliConfig.httpWiringMetaFile, cliConfig.httpWiringsFile], schemas);
|
|
79
79
|
}
|
|
80
80
|
const scheduler = await pikkuScheduler(logger, cliConfig, visitState);
|
|
81
81
|
if (scheduler) {
|
|
82
|
-
allImports.push(cliConfig.
|
|
83
|
-
await generateBootstrapFile(logger, cliConfig, cliConfig.bootstrapFiles.scheduler, [cliConfig.
|
|
82
|
+
allImports.push(cliConfig.schedulersWiringMetaFile, cliConfig.schedulersWiringFile);
|
|
83
|
+
await generateBootstrapFile(logger, cliConfig, cliConfig.bootstrapFiles.scheduler, [cliConfig.schedulersWiringMetaFile, cliConfig.schedulersWiringFile], schemas);
|
|
84
84
|
}
|
|
85
85
|
const queues = await pikkuQueue(logger, cliConfig, visitState);
|
|
86
86
|
if (queues) {
|
|
87
87
|
await pikkuQueueMap(logger, cliConfig, visitState);
|
|
88
88
|
await pikkuQueueService(logger, cliConfig);
|
|
89
|
-
allImports.push(cliConfig.
|
|
90
|
-
await generateBootstrapFile(logger, cliConfig, cliConfig.bootstrapFiles.queue, [cliConfig.
|
|
89
|
+
allImports.push(cliConfig.queueWorkersWiringMetaFile, cliConfig.queueWorkersWiringFile);
|
|
90
|
+
await generateBootstrapFile(logger, cliConfig, cliConfig.bootstrapFiles.queue, [cliConfig.queueWorkersWiringMetaFile, cliConfig.queueWorkersWiringFile], schemas);
|
|
91
91
|
}
|
|
92
92
|
const channels = await pikkuChannels(logger, cliConfig, visitState);
|
|
93
93
|
if (channels) {
|
|
94
94
|
await pikkuChannelsMap(logger, cliConfig, visitState);
|
|
95
95
|
await pikkuWebSocketTyped(logger, cliConfig);
|
|
96
|
-
allImports.push(cliConfig.
|
|
97
|
-
await generateBootstrapFile(logger, cliConfig, cliConfig.bootstrapFiles.channel, [cliConfig.
|
|
96
|
+
allImports.push(cliConfig.channelsWiringMetaFile, cliConfig.channelsWiringFile);
|
|
97
|
+
await generateBootstrapFile(logger, cliConfig, cliConfig.bootstrapFiles.channel, [cliConfig.channelsWiringMetaFile, cliConfig.channelsWiringFile], schemas);
|
|
98
98
|
}
|
|
99
99
|
const mcp = await pikkuMCP(logger, cliConfig, visitState);
|
|
100
100
|
if (mcp) {
|
|
101
101
|
await pikkuMCPJSON(logger, cliConfig, visitState);
|
|
102
|
-
allImports.push(cliConfig.
|
|
103
|
-
await generateBootstrapFile(logger, cliConfig, cliConfig.bootstrapFiles.mcp, [cliConfig.
|
|
102
|
+
allImports.push(cliConfig.mcpWiringsMetaFile, cliConfig.mcpWiringsFile);
|
|
103
|
+
await generateBootstrapFile(logger, cliConfig, cliConfig.bootstrapFiles.mcp, [cliConfig.mcpWiringsMetaFile, cliConfig.mcpWiringsFile], schemas);
|
|
104
104
|
}
|
|
105
105
|
if (cliConfig.nextBackendFile || cliConfig.nextHTTPFile) {
|
|
106
106
|
await pikkuNext(logger, cliConfig, visitState, options);
|
|
@@ -132,7 +132,11 @@ const watch = (logger, cliConfig, options) => {
|
|
|
132
132
|
watcher.on('ready', async () => {
|
|
133
133
|
const handle = async () => {
|
|
134
134
|
try {
|
|
135
|
+
const start = Date.now();
|
|
135
136
|
await runAll(logger, cliConfig, options);
|
|
137
|
+
if (options.silent) {
|
|
138
|
+
logger.timing(`✓ Generated in ${Date.now() - start}ms`);
|
|
139
|
+
}
|
|
136
140
|
}
|
|
137
141
|
catch (err) {
|
|
138
142
|
console.error(err);
|
|
@@ -156,7 +160,7 @@ const watch = (logger, cliConfig, options) => {
|
|
|
156
160
|
configWatcher.on('change', generatorWatcher);
|
|
157
161
|
};
|
|
158
162
|
export const action = async (options) => {
|
|
159
|
-
const logger = new CLILogger({ logLogo: true });
|
|
163
|
+
const logger = new CLILogger({ logLogo: true, silent: options.silent });
|
|
160
164
|
const cliConfig = await getPikkuCLIConfig(options.config, [], {
|
|
161
165
|
tags: options.tags,
|
|
162
166
|
types: options.types,
|
|
@@ -181,5 +185,6 @@ export const all = (program) => {
|
|
|
181
185
|
.option('--types <types...>', 'Which types to filter by (http, channel, queue, scheduler, rpc, mcp)')
|
|
182
186
|
.option('--directories <directories...>', 'Which directories to filter by')
|
|
183
187
|
.option('-w | --watch', 'Whether to watch file changes')
|
|
188
|
+
.option('-s | --silent', 'Silent mode - only show errors')
|
|
184
189
|
.action(action);
|
|
185
190
|
};
|
package/dist/bin/pikku-fetch.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getPikkuCLIConfig } from '../src/pikku-cli-config.js';
|
|
2
|
-
import { pikkuFetch } from '../src/
|
|
2
|
+
import { pikkuFetch } from '../src/wirings/fetch/index.js';
|
|
3
3
|
import { CLILogger } from '../src/utils.js';
|
|
4
4
|
export const action = async (options) => {
|
|
5
5
|
const logger = new CLILogger({ logLogo: true });
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { CLILogger } from '../src/utils.js';
|
|
2
2
|
import { getPikkuCLIConfig } from '../src/pikku-cli-config.js';
|
|
3
3
|
import { inspectorGlob } from '../src/inspector-glob.js';
|
|
4
|
-
import { pikkuOpenAPI } from '../src/
|
|
4
|
+
import { pikkuOpenAPI } from '../src/wirings/http/pikku-command-openapi.js';
|
|
5
5
|
async function action({ config, tags }) {
|
|
6
6
|
const logger = new CLILogger({ logLogo: true });
|
|
7
|
-
const cliConfig = await getPikkuCLIConfig(config, ['rootDir', '
|
|
7
|
+
const cliConfig = await getPikkuCLIConfig(config, ['rootDir', 'httpWiringsFile', 'openAPI', 'schemaDirectory', 'tsconfig'], {
|
|
8
8
|
tags: tags || [],
|
|
9
9
|
});
|
|
10
10
|
const visitState = await inspectorGlob(logger, cliConfig.rootDir, cliConfig.srcDirectories, cliConfig.filters);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { getPikkuCLIConfig } from '../src/pikku-cli-config.js';
|
|
2
2
|
import { CLILogger } from '../src/utils.js';
|
|
3
|
-
import { pikkuQueueService } from '../src/
|
|
3
|
+
import { pikkuQueueService } from '../src/wirings/queue/pikku-command-queue-service.js';
|
|
4
4
|
export const action = async (options) => {
|
|
5
5
|
const logger = new CLILogger({ logLogo: true });
|
|
6
|
-
const cliConfig = await getPikkuCLIConfig(options.config, ['rootDir', 'schemaDirectory', 'configDir', '
|
|
6
|
+
const cliConfig = await getPikkuCLIConfig(options.config, ['rootDir', 'schemaDirectory', 'configDir', 'queueWiringsFile'], {
|
|
7
7
|
tags: options.tags,
|
|
8
8
|
types: options.types,
|
|
9
9
|
directories: options.directories,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CLILogger } from '../src/utils.js';
|
|
2
2
|
import { getPikkuCLIConfig } from '../src/pikku-cli-config.js';
|
|
3
|
-
import { pikkuWebSocketTyped } from '../src/
|
|
3
|
+
import { pikkuWebSocketTyped } from '../src/wirings/channels/pikku-command-websocket-typed.js';
|
|
4
4
|
export const action = async (options) => {
|
|
5
5
|
const logger = new CLILogger({ logLogo: true });
|
|
6
6
|
const cliConfig = await getPikkuCLIConfig(options.config, ['rootDir', 'schemaDirectory', 'configDir', 'fetchFile'], {
|
|
@@ -5,8 +5,8 @@ import { logCommandInfoAndTime } from './utils.js';
|
|
|
5
5
|
export const inspectorGlob = async (logger, rootDir, srcDirectories, filters) => {
|
|
6
6
|
let result;
|
|
7
7
|
await logCommandInfoAndTime(logger, 'Inspecting codebase', 'Inspected codebase', [false], async () => {
|
|
8
|
-
const
|
|
9
|
-
result = await inspect(logger,
|
|
8
|
+
const wiringFiles = (await Promise.all(srcDirectories.map((dir) => glob(`${path.join(rootDir, dir)}/**/*.ts`)))).flat();
|
|
9
|
+
result = await inspect(logger, wiringFiles, filters);
|
|
10
10
|
});
|
|
11
11
|
return result;
|
|
12
12
|
};
|