@pikku/cli 0.9.9 → 0.9.11

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 CHANGED
@@ -1,5 +1,19 @@
1
1
  # @pikku/cli
2
2
 
3
+ ## 0.9.11
4
+
5
+ ### Patch Changes
6
+
7
+ - 0181433: fix: fixing cli pikku-types for channels (allowing sessionless as well)
8
+
9
+ ## 0.9.10
10
+
11
+ ### Patch Changes
12
+
13
+ - 501c120: fix: rpc internal meta file wasn't being imported
14
+ - Updated dependencies [501c120]
15
+ - @pikku/inspector@0.9.5
16
+
3
17
  ## 0.9.9
4
18
 
5
19
  ### Patch Changes
package/bin/pikku-all.ts CHANGED
@@ -116,6 +116,8 @@ const runAll = async (
116
116
  await pikkuRPCExposedMap(logger, cliConfig, visitState)
117
117
  await pikkuRPCClient(logger, cliConfig)
118
118
 
119
+ allImports.push(cliConfig.rpcInternalWiringMetaFile)
120
+
119
121
  const schemas = await pikkuSchemas(logger, cliConfig, visitState)
120
122
  if (schemas) {
121
123
  allImports.push(`${cliConfig.schemaDirectory}/register.gen.ts`)
@@ -67,6 +67,7 @@ const runAll = async (logger, cliConfig, options) => {
67
67
  await pikkuRPCInternalMap(logger, cliConfig, visitState);
68
68
  await pikkuRPCExposedMap(logger, cliConfig, visitState);
69
69
  await pikkuRPCClient(logger, cliConfig);
70
+ allImports.push(cliConfig.rpcInternalWiringMetaFile);
70
71
  const schemas = await pikkuSchemas(logger, cliConfig, visitState);
71
72
  if (schemas) {
72
73
  allImports.push(`${cliConfig.schemaDirectory}/register.gen.ts`);
@@ -6,7 +6,7 @@ export const serializePikkuTypes = (userSessionTypeImport, userSessionTypeName,
6
6
  * This is used to provide the application types in the typescript project
7
7
  */
8
8
 
9
- import { CorePikkuFunctionConfig, CorePikkuPermission, CorePikkuMiddleware, addHTTPMiddleware, addMiddleware, addPermission, PikkuInteraction } from '@pikku/core'
9
+ import { CorePikkuFunctionConfig, CorePikkuPermission, CorePikkuMiddleware, addHTTPMiddleware, addMiddleware, addPermission } from '@pikku/core'
10
10
  import { CorePikkuFunction, CorePikkuFunctionSessionless } from '@pikku/core/function'
11
11
  import { CoreHTTPFunctionWiring, AssertHTTPWiringParams, wireHTTP as wireHTTPCore } from '@pikku/core/http'
12
12
  import { CoreScheduledTask, wireScheduler as wireSchedulerCore } from '@pikku/core/scheduler'
@@ -86,7 +86,7 @@ type PikkuFunctionSessionless<
86
86
  Out = never,
87
87
  ChannelData = null, // null means optional channel
88
88
  MCPData = null, // null means optional MCP
89
- RequiredServices extends Services = Omit<Services, keyof PikkuInteraction> &
89
+ RequiredServices extends Services = Services &
90
90
  { rpc: TypedPikkuRPC } & (
91
91
  [ChannelData] extends [null]
92
92
  ? { channel?: PikkuChannel<unknown, Out> } // Optional channel
@@ -112,7 +112,7 @@ type PikkuFunction<
112
112
  Out = never,
113
113
  ChannelData = null, // null means optional channel
114
114
  MCPData = null, // null means optional MCP
115
- RequiredServices extends Services = Omit<Services, keyof PikkuInteraction> &
115
+ RequiredServices extends Services = Services &
116
116
  { rpc: TypedPikkuRPC } & (
117
117
  [ChannelData] extends [null]
118
118
  ? { channel?: PikkuChannel<unknown, Out> } // Optional channel
@@ -140,7 +140,8 @@ type HTTPWiring<In, Out, Route extends string> = CoreHTTPFunctionWiring<In, Out,
140
140
  * @template ChannelData - Type of data exchanged through the channel
141
141
  * @template Channel - String literal type for the channel name
142
142
  */
143
- type ChannelWiring<ChannelData, Channel extends string> = CoreChannel<ChannelData, Channel, PikkuFunction<void, unknown> | PikkuFunction<void, unknown, ChannelData>, PikkuFunction<void, void> | PikkuFunction<void, void, ChannelData>, PikkuFunction<any, any> | PikkuFunction<any, any, ChannelData>, PikkuPermission>
143
+ type ChannelWiringFunction<I, O, C = {}> = PikkuFunctionSessionless<I, O, C> | PikkuFunction<I, O, C>
144
+ type ChannelWiring<ChannelData, Channel extends string> = CoreChannel<ChannelData, Channel, ChannelWiringFunction<void, unknown> | ChannelWiringFunction<void, unknown, ChannelData>, ChannelWiringFunction<void, void> | ChannelWiringFunction<void, void, ChannelData>, ChannelWiringFunction<any, any> | ChannelWiringFunction<any, any, ChannelData>, PikkuPermission>
144
145
 
145
146
  /**
146
147
  * Type definition for scheduled tasks that run at specified intervals.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pikku/cli",
3
- "version": "0.9.9",
3
+ "version": "0.9.11",
4
4
  "author": "yasser.fadl@gmail.com",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -23,7 +23,7 @@
23
23
  "dependencies": {
24
24
  "@openapi-contrib/json-schema-to-openapi-schema": "^4.0.2",
25
25
  "@pikku/core": "^0.9.9",
26
- "@pikku/inspector": "^0.9.4",
26
+ "@pikku/inspector": "^0.9.5",
27
27
  "@types/cookie": "^1.0.0",
28
28
  "@types/uuid": "^10.0.0",
29
29
  "chalk": "^5.5.0",
@@ -14,7 +14,7 @@ export const serializePikkuTypes = (
14
14
  * This is used to provide the application types in the typescript project
15
15
  */
16
16
 
17
- import { CorePikkuFunctionConfig, CorePikkuPermission, CorePikkuMiddleware, addHTTPMiddleware, addMiddleware, addPermission, PikkuInteraction } from '@pikku/core'
17
+ import { CorePikkuFunctionConfig, CorePikkuPermission, CorePikkuMiddleware, addHTTPMiddleware, addMiddleware, addPermission } from '@pikku/core'
18
18
  import { CorePikkuFunction, CorePikkuFunctionSessionless } from '@pikku/core/function'
19
19
  import { CoreHTTPFunctionWiring, AssertHTTPWiringParams, wireHTTP as wireHTTPCore } from '@pikku/core/http'
20
20
  import { CoreScheduledTask, wireScheduler as wireSchedulerCore } from '@pikku/core/scheduler'
@@ -94,7 +94,7 @@ type PikkuFunctionSessionless<
94
94
  Out = never,
95
95
  ChannelData = null, // null means optional channel
96
96
  MCPData = null, // null means optional MCP
97
- RequiredServices extends Services = Omit<Services, keyof PikkuInteraction> &
97
+ RequiredServices extends Services = Services &
98
98
  { rpc: TypedPikkuRPC } & (
99
99
  [ChannelData] extends [null]
100
100
  ? { channel?: PikkuChannel<unknown, Out> } // Optional channel
@@ -120,7 +120,7 @@ type PikkuFunction<
120
120
  Out = never,
121
121
  ChannelData = null, // null means optional channel
122
122
  MCPData = null, // null means optional MCP
123
- RequiredServices extends Services = Omit<Services, keyof PikkuInteraction> &
123
+ RequiredServices extends Services = Services &
124
124
  { rpc: TypedPikkuRPC } & (
125
125
  [ChannelData] extends [null]
126
126
  ? { channel?: PikkuChannel<unknown, Out> } // Optional channel
@@ -148,7 +148,8 @@ type HTTPWiring<In, Out, Route extends string> = CoreHTTPFunctionWiring<In, Out,
148
148
  * @template ChannelData - Type of data exchanged through the channel
149
149
  * @template Channel - String literal type for the channel name
150
150
  */
151
- type ChannelWiring<ChannelData, Channel extends string> = CoreChannel<ChannelData, Channel, PikkuFunction<void, unknown> | PikkuFunction<void, unknown, ChannelData>, PikkuFunction<void, void> | PikkuFunction<void, void, ChannelData>, PikkuFunction<any, any> | PikkuFunction<any, any, ChannelData>, PikkuPermission>
151
+ type ChannelWiringFunction<I, O, C = {}> = PikkuFunctionSessionless<I, O, C> | PikkuFunction<I, O, C>
152
+ type ChannelWiring<ChannelData, Channel extends string> = CoreChannel<ChannelData, Channel, ChannelWiringFunction<void, unknown> | ChannelWiringFunction<void, unknown, ChannelData>, ChannelWiringFunction<void, void> | ChannelWiringFunction<void, void, ChannelData>, ChannelWiringFunction<any, any> | ChannelWiringFunction<any, any, ChannelData>, PikkuPermission>
152
153
 
153
154
  /**
154
155
  * Type definition for scheduled tasks that run at specified intervals.