@pikku/cli 0.12.52 → 0.12.54

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.
Files changed (77) hide show
  1. package/console-app/assets/{index-92DoVRHq.js → index-DYnbceYg.js} +144 -142
  2. package/console-app/index.html +1 -1
  3. package/dist/.pikku/agent/pikku-agent-types.gen.d.ts +1 -1
  4. package/dist/.pikku/channel/pikku-channel-types.gen.d.ts +1 -1
  5. package/dist/.pikku/channel/pikku-channel-types.gen.js +1 -1
  6. package/dist/.pikku/cli/pikku-cli-channel.js +1 -1
  7. package/dist/.pikku/cli/pikku-cli-client.gen.d.ts +1 -1
  8. package/dist/.pikku/cli/pikku-cli-client.gen.js +1 -1
  9. package/dist/.pikku/cli/pikku-cli-contracts-meta.gen.d.ts +1 -1
  10. package/dist/.pikku/cli/pikku-cli-contracts-meta.gen.js +1 -1
  11. package/dist/.pikku/cli/pikku-cli-types.gen.d.ts +1 -1
  12. package/dist/.pikku/cli/pikku-cli-types.gen.js +1 -1
  13. package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.js +1 -1
  14. package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.json +8 -0
  15. package/dist/.pikku/cli/pikku-cli-wirings.gen.d.ts +1 -1
  16. package/dist/.pikku/cli/pikku-cli-wirings.gen.js +1 -1
  17. package/dist/.pikku/cli/pikku-cli.gen.d.ts +1 -1
  18. package/dist/.pikku/cli/pikku-cli.gen.js +1 -1
  19. package/dist/.pikku/console/pikku-node-types.gen.d.ts +1 -1
  20. package/dist/.pikku/function/pikku-function-types.gen.d.ts +1 -1
  21. package/dist/.pikku/function/pikku-function-types.gen.js +1 -1
  22. package/dist/.pikku/function/pikku-functions-meta.gen.js +1 -1
  23. package/dist/.pikku/function/pikku-functions-meta.gen.json +191 -191
  24. package/dist/.pikku/function/pikku-functions.gen.js +1 -1
  25. package/dist/.pikku/http/pikku-http-types.gen.d.ts +1 -1
  26. package/dist/.pikku/http/pikku-http-types.gen.js +1 -1
  27. package/dist/.pikku/http/pikku-http-wirings-meta.gen.js +1 -1
  28. package/dist/.pikku/http/pikku-http-wirings.gen.d.ts +1 -1
  29. package/dist/.pikku/http/pikku-http-wirings.gen.js +1 -1
  30. package/dist/.pikku/mcp/pikku-mcp-types.gen.d.ts +1 -1
  31. package/dist/.pikku/mcp/pikku-mcp-types.gen.js +1 -1
  32. package/dist/.pikku/pikku-bootstrap.gen.d.ts +1 -1
  33. package/dist/.pikku/pikku-bootstrap.gen.js +1 -1
  34. package/dist/.pikku/pikku-meta-service.gen.d.ts +1 -1
  35. package/dist/.pikku/pikku-meta-service.gen.js +1 -1
  36. package/dist/.pikku/pikku-services.gen.d.ts +1 -1
  37. package/dist/.pikku/pikku-types.gen.d.ts +1 -1
  38. package/dist/.pikku/pikku-types.gen.js +1 -1
  39. package/dist/.pikku/queue/pikku-queue-types.gen.d.ts +1 -1
  40. package/dist/.pikku/queue/pikku-queue-types.gen.js +1 -1
  41. package/dist/.pikku/queue/pikku-queue-workers-wirings-meta.gen.js +1 -1
  42. package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.d.ts +1 -1
  43. package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.js +1 -1
  44. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js +1 -1
  45. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.json +3 -3
  46. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.d.ts +1 -1
  47. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js +1 -1
  48. package/dist/.pikku/schemas/register.gen.js +7 -7
  49. package/dist/.pikku/schemas/schemas/DeployApplyInput.schema.json +1 -1
  50. package/dist/.pikku/schemas/schemas/DeployPlanInput.schema.json +1 -1
  51. package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts +1 -1
  52. package/dist/.pikku/secrets/pikku-secret-types.gen.js +1 -1
  53. package/dist/.pikku/secrets/pikku-secrets.gen.d.ts +1 -1
  54. package/dist/.pikku/secrets/pikku-secrets.gen.js +1 -1
  55. package/dist/.pikku/trigger/pikku-trigger-types.gen.d.ts +1 -1
  56. package/dist/.pikku/trigger/pikku-trigger-types.gen.js +1 -1
  57. package/dist/.pikku/variables/pikku-variable-types.gen.d.ts +1 -1
  58. package/dist/.pikku/variables/pikku-variable-types.gen.js +1 -1
  59. package/dist/.pikku/variables/pikku-variables.gen.d.ts +1 -1
  60. package/dist/.pikku/variables/pikku-variables.gen.js +1 -1
  61. package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +1 -1
  62. package/dist/.pikku/workflow/pikku-workflow-types.gen.js +1 -1
  63. package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +1 -1
  64. package/dist/.pikku/workflow/pikku-workflow-wirings.gen.js +1 -1
  65. package/dist/bin/pikku-bin.mjs +2 -2
  66. package/dist/src/cli.wiring.js +8 -0
  67. package/dist/src/functions/commands/deploy-apply.d.ts +6 -1
  68. package/dist/src/functions/commands/deploy-apply.js +6 -4
  69. package/dist/src/functions/commands/deploy-plan.d.ts +3 -0
  70. package/dist/src/functions/commands/deploy-plan.js +3 -1
  71. package/dist/src/functions/commands/dev.js +41 -13
  72. package/dist/src/functions/db/sqlite/sqlite-runtime-bun.js +1 -1
  73. package/dist/src/functions/wirings/rpc/serialize-react-query-hooks.js +3 -3
  74. package/dist/src/scaffold/rpc-remote.gen.js +1 -1
  75. package/package.json +6 -5
  76. package/skills/pikku-n8n-addon-map/SKILL.md +1 -1
  77. package/skills/pikku-n8n-code-translate/SKILL.md +1 -1
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.52
2
+ * This file was generated by @pikku/cli@0.12.54
3
3
  */
4
4
  /**
5
5
  * Queue-specific type definitions for tree-shaking optimization
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.52
2
+ * This file was generated by @pikku/cli@0.12.54
3
3
  */
4
4
  import { pikkuState } from '@pikku/core/internal';
5
5
  import metaData from './pikku-queue-workers-wirings-meta.gen.json' with { type: 'json' };
@@ -1,4 +1,4 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.52
2
+ * This file was generated by @pikku/cli@0.12.54
3
3
  */
4
4
  import '../../src/scaffold/rpc-remote.gen.js';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.52
2
+ * This file was generated by @pikku/cli@0.12.54
3
3
  */
4
4
  /* The files with an addQueueWorkers function call */
5
5
  import '../../src/scaffold/rpc-remote.gen.js';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.52
2
+ * This file was generated by @pikku/cli@0.12.54
3
3
  */
4
4
  import { pikkuState } from '@pikku/core/internal';
5
5
  import metaData from './pikku-rpc-wirings-meta.internal.gen.json' with { type: 'json' };
@@ -113,11 +113,11 @@
113
113
  "pikkuNodeTypes": "pikkuNodeTypes",
114
114
  "pikkuNodesMeta": "pikkuNodesMeta",
115
115
  "pikkuCredentials": "pikkuCredentials",
116
+ "pikkuGateway": "pikkuGateway",
116
117
  "pikkuFunctionTypesSplit": "pikkuFunctionTypesSplit",
117
118
  "pikkuFunctionTypes": "pikkuFunctionTypes",
118
119
  "pikkuFunctions": "pikkuFunctions",
119
120
  "pikkuServices": "pikkuServices",
120
- "pikkuGateway": "pikkuGateway",
121
121
  "pikkuHTTPMap": "pikkuHTTPMap",
122
122
  "pikkuCommandHTTP": "pikkuCommandHTTP",
123
123
  "pikkuHTTPTypes": "pikkuHTTPTypes",
@@ -136,13 +136,13 @@
136
136
  "pikkuQueueMap": "pikkuQueueMap",
137
137
  "pikkuQueue": "pikkuQueue",
138
138
  "pikkuEventsScaffold": "pikkuEventsScaffold",
139
+ "pikkuSchedulerTypes": "pikkuSchedulerTypes",
140
+ "pikkuScheduler": "pikkuScheduler",
139
141
  "pikkuPublicRPC": "pikkuPublicRPC",
140
142
  "pikkuRemoteRPC": "pikkuRemoteRPC",
141
143
  "pikkuRPCInternalMap": "pikkuRPCInternalMap",
142
144
  "pikkuRPCExposedMap": "pikkuRPCExposedMap",
143
145
  "pikkuRPC": "pikkuRPC",
144
- "pikkuSchedulerTypes": "pikkuSchedulerTypes",
145
- "pikkuScheduler": "pikkuScheduler",
146
146
  "pikkuSecrets": "pikkuSecrets",
147
147
  "pikkuTriggerTypes": "pikkuTriggerTypes",
148
148
  "pikkuTrigger": "pikkuTrigger",
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.52
2
+ * This file was generated by @pikku/cli@0.12.54
3
3
  */
4
4
  /**
5
5
  * Scheduler-specific type definitions for tree-shaking optimization
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.52
2
+ * This file was generated by @pikku/cli@0.12.54
3
3
  */
4
4
  /**
5
5
  * Scheduler-specific type definitions for tree-shaking optimization
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.52
2
+ * This file was generated by @pikku/cli@0.12.54
3
3
  */
4
4
  import { addSchema } from '@pikku/core/schema';
5
5
  import * as PikkuSchemasOutput from './schemas/PikkuSchemasOutput.schema.json' with { type: 'json' };
@@ -218,22 +218,18 @@ import * as PikkuFunctionsOutput from './schemas/PikkuFunctionsOutput.schema.jso
218
218
  addSchema('PikkuFunctionsOutput', PikkuFunctionsOutput);
219
219
  import * as PikkuGatewayOutput from './schemas/PikkuGatewayOutput.schema.json' with { type: 'json' };
220
220
  addSchema('PikkuGatewayOutput', PikkuGatewayOutput);
221
+ import * as PikkuMCPOutput from './schemas/PikkuMCPOutput.schema.json' with { type: 'json' };
222
+ addSchema('PikkuMCPOutput', PikkuMCPOutput);
221
223
  import * as PikkuCommandHTTPOutput from './schemas/PikkuCommandHTTPOutput.schema.json' with { type: 'json' };
222
224
  addSchema('PikkuCommandHTTPOutput', PikkuCommandHTTPOutput);
223
225
  import * as PikkuHTTPOutput from './schemas/PikkuHTTPOutput.schema.json' with { type: 'json' };
224
226
  addSchema('PikkuHTTPOutput', PikkuHTTPOutput);
225
- import * as PikkuMCPOutput from './schemas/PikkuMCPOutput.schema.json' with { type: 'json' };
226
- addSchema('PikkuMCPOutput', PikkuMCPOutput);
227
227
  import * as PikkuMiddlewareOutput from './schemas/PikkuMiddlewareOutput.schema.json' with { type: 'json' };
228
228
  addSchema('PikkuMiddlewareOutput', PikkuMiddlewareOutput);
229
229
  import * as PikkuPackageOutput from './schemas/PikkuPackageOutput.schema.json' with { type: 'json' };
230
230
  addSchema('PikkuPackageOutput', PikkuPackageOutput);
231
231
  import * as PikkuPermissionsOutput from './schemas/PikkuPermissionsOutput.schema.json' with { type: 'json' };
232
232
  addSchema('PikkuPermissionsOutput', PikkuPermissionsOutput);
233
- import * as PikkuCommandQueueOutput from './schemas/PikkuCommandQueueOutput.schema.json' with { type: 'json' };
234
- addSchema('PikkuCommandQueueOutput', PikkuCommandQueueOutput);
235
- import * as PikkuQueueOutput from './schemas/PikkuQueueOutput.schema.json' with { type: 'json' };
236
- addSchema('PikkuQueueOutput', PikkuQueueOutput);
237
233
  import * as PikkuEventsScaffoldOutput from './schemas/PikkuEventsScaffoldOutput.schema.json' with { type: 'json' };
238
234
  addSchema('PikkuEventsScaffoldOutput', PikkuEventsScaffoldOutput);
239
235
  import * as PikkuPublicRPCOutput from './schemas/PikkuPublicRPCOutput.schema.json' with { type: 'json' };
@@ -250,5 +246,9 @@ import * as PikkuTriggerOutput from './schemas/PikkuTriggerOutput.schema.json' w
250
246
  addSchema('PikkuTriggerOutput', PikkuTriggerOutput);
251
247
  import * as PikkuWorkflowRoutesOutput from './schemas/PikkuWorkflowRoutesOutput.schema.json' with { type: 'json' };
252
248
  addSchema('PikkuWorkflowRoutesOutput', PikkuWorkflowRoutesOutput);
249
+ import * as PikkuCommandQueueOutput from './schemas/PikkuCommandQueueOutput.schema.json' with { type: 'json' };
250
+ addSchema('PikkuCommandQueueOutput', PikkuCommandQueueOutput);
251
+ import * as PikkuQueueOutput from './schemas/PikkuQueueOutput.schema.json' with { type: 'json' };
252
+ addSchema('PikkuQueueOutput', PikkuQueueOutput);
253
253
  import * as PikkuCLIConfig from './schemas/PikkuCLIConfig.schema.json' with { type: 'json' };
254
254
  addSchema('PikkuCLIConfig', PikkuCLIConfig);
@@ -1 +1 @@
1
- { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "fromPlan": { "type": "boolean" }, "provider": { "type": "string" }, "resultFile": { "type": "string" }, "debugArtifacts": { "type": "boolean" } }, "additionalProperties": false, "definitions": {} }
1
+ { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "fromPlan": { "type": "boolean" }, "provider": { "type": "string" }, "runtime": { "type": "string" }, "resultFile": { "type": "string" }, "debugArtifacts": { "type": "boolean" } }, "additionalProperties": false, "definitions": {} }
@@ -1 +1 @@
1
- { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "resultFile": { "type": "string" }, "provider": { "type": "string" }, "debugArtifacts": { "type": "boolean" } }, "additionalProperties": false, "definitions": {} }
1
+ { "$schema": "http://json-schema.org/draft-07/schema#", "type": "object", "properties": { "resultFile": { "type": "string" }, "provider": { "type": "string" }, "runtime": { "type": "string" }, "debugArtifacts": { "type": "boolean" } }, "additionalProperties": false, "definitions": {} }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.52
2
+ * This file was generated by @pikku/cli@0.12.54
3
3
  */
4
4
  export { wireSecret } from '@pikku/core/secret';
5
5
  export type { CoreSecret, SecretDefinitionMeta, SecretDefinitionsMeta } from '@pikku/core/secret';
@@ -1,4 +1,4 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.52
2
+ * This file was generated by @pikku/cli@0.12.54
3
3
  */
4
4
  export { wireSecret } from '@pikku/core/secret';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.52
2
+ * This file was generated by @pikku/cli@0.12.54
3
3
  */
4
4
  import { TypedSecretService as CoreTypedSecretService } from '@pikku/core/services';
5
5
  import type { SecretService } from '@pikku/core/services';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.52
2
+ * This file was generated by @pikku/cli@0.12.54
3
3
  */
4
4
  import { TypedSecretService as CoreTypedSecretService } from '@pikku/core/services';
5
5
  const CREDENTIALS_META = {};
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.52
2
+ * This file was generated by @pikku/cli@0.12.54
3
3
  */
4
4
  /**
5
5
  * Trigger-specific type definitions for tree-shaking optimization
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.52
2
+ * This file was generated by @pikku/cli@0.12.54
3
3
  */
4
4
  /**
5
5
  * Trigger-specific type definitions for tree-shaking optimization
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.52
2
+ * This file was generated by @pikku/cli@0.12.54
3
3
  */
4
4
  export { wireVariable } from '@pikku/core/variable';
5
5
  export type { CoreVariable, VariableDefinitionMeta, VariableDefinitionsMeta } from '@pikku/core/variable';
@@ -1,4 +1,4 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.52
2
+ * This file was generated by @pikku/cli@0.12.54
3
3
  */
4
4
  export { wireVariable } from '@pikku/core/variable';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.52
2
+ * This file was generated by @pikku/cli@0.12.54
3
3
  */
4
4
  import { TypedVariablesService as CoreTypedVariablesService } from '@pikku/core/services';
5
5
  import type { VariablesService } from '@pikku/core/services';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.52
2
+ * This file was generated by @pikku/cli@0.12.54
3
3
  */
4
4
  import { TypedVariablesService as CoreTypedVariablesService } from '@pikku/core/services';
5
5
  const VARIABLES_META = {};
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.52
2
+ * This file was generated by @pikku/cli@0.12.54
3
3
  */
4
4
  import { WorkflowCancelledException } from '@pikku/core/workflow';
5
5
  import { template } from '@pikku/core/workflow';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.52
2
+ * This file was generated by @pikku/cli@0.12.54
3
3
  */
4
4
  import { WorkflowCancelledException } from '@pikku/core/workflow';
5
5
  import { template } from '@pikku/core/workflow';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.52
2
+ * This file was generated by @pikku/cli@0.12.54
3
3
  */
4
4
  import { pikkuState } from '@pikku/core/internal';
5
5
  import allWorkflowMeta from './meta/allWorkflow.gen.json' with { type: 'json' };
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.52
2
+ * This file was generated by @pikku/cli@0.12.54
3
3
  */
4
4
  import { addWorkflow } from '@pikku/core/workflow';
5
5
  import './pikku-workflow-wirings-meta.gen.js';
@@ -11,8 +11,8 @@ async function checkForUpdate() {
11
11
  })
12
12
  if (!res.ok) return
13
13
  const { version: latest } = await res.json()
14
- if (latest !== '0.12.52') {
15
- process.stderr.write(`\n Update available 0.12.52 → ${latest}\n brew upgrade pikku or npm install -g @pikku/cli\n\n`)
14
+ if (latest !== '0.12.54') {
15
+ process.stderr.write(`\n Update available 0.12.54 → ${latest}\n brew upgrade pikku or npm install -g @pikku/cli\n\n`)
16
16
  }
17
17
  } catch {}
18
18
  }
@@ -577,6 +577,10 @@ wireCLI({
577
577
  default: 'cloudflare',
578
578
  short: 'p',
579
579
  },
580
+ runtime: {
581
+ description: 'Server runtime for the standalone provider: node (bundle.js) or bun (compiled executable)',
582
+ default: 'node',
583
+ },
580
584
  resultFile: {
581
585
  description: 'Write structured JSON plan result to this file path',
582
586
  },
@@ -591,6 +595,10 @@ wireCLI({
591
595
  default: 'cloudflare',
592
596
  short: 'p',
593
597
  },
598
+ runtime: {
599
+ description: 'Server runtime for the standalone provider: node (bundle.js) or bun (compiled executable)',
600
+ default: 'node',
601
+ },
594
602
  fromPlan: {
595
603
  description: 'Skip build pipeline, deploy from existing plan output',
596
604
  default: false,
@@ -6,20 +6,25 @@ export declare function resolveProvider(config?: {
6
6
  providers: Record<string, string>;
7
7
  defaultProvider?: string;
8
8
  };
9
- }, providerName?: string): Promise<ProviderAdapter>;
9
+ }, providerName?: string, options?: {
10
+ runtime?: string;
11
+ }): Promise<ProviderAdapter>;
10
12
  export declare const deployApply: import("#pikku").PikkuFunctionConfig<{
11
13
  fromPlan?: boolean;
12
14
  provider?: string;
15
+ runtime?: string;
13
16
  resultFile?: string;
14
17
  debugArtifacts?: boolean;
15
18
  }, void, "session" | "rpc", import("#pikku").PikkuFunctionSessionless<{
16
19
  fromPlan?: boolean;
17
20
  provider?: string;
21
+ runtime?: string;
18
22
  resultFile?: string;
19
23
  debugArtifacts?: boolean;
20
24
  }, void, "session" | "rpc", import("#pikku").Services> | import("#pikku").PikkuFunction<{
21
25
  fromPlan?: boolean;
22
26
  provider?: string;
27
+ runtime?: string;
23
28
  resultFile?: string;
24
29
  debugArtifacts?: boolean;
25
30
  }, void, "session" | "rpc", import("#pikku").Services>, undefined, undefined>;
@@ -60,7 +60,7 @@ async function resolveProjectId(projectDir) {
60
60
  }
61
61
  return sanitizeProjectId(basename(projectDir));
62
62
  }
63
- export async function resolveProvider(config, providerName) {
63
+ export async function resolveProvider(config, providerName, options) {
64
64
  const name = providerName ?? config?.deploy?.defaultProvider ?? 'cloudflare';
65
65
  const providers = config?.deploy?.providers ?? {
66
66
  cloudflare: '@pikku/deploy-cloudflare',
@@ -76,10 +76,10 @@ export async function resolveProvider(config, providerName) {
76
76
  try {
77
77
  const mod = await import(packageName);
78
78
  if (typeof mod.createAdapter === 'function') {
79
- return mod.createAdapter();
79
+ return mod.createAdapter(options);
80
80
  }
81
81
  if (typeof mod[adapterExportName] === 'function') {
82
- return new mod[adapterExportName]();
82
+ return new mod[adapterExportName](options);
83
83
  }
84
84
  throw new Error(`Deploy provider '${packageName}' does not export createAdapter() or ${adapterExportName}`);
85
85
  }
@@ -149,7 +149,9 @@ async function runDeploy(provider, providerDir, logger, resultFile) {
149
149
  export const deployApply = pikkuSessionlessFunc({
150
150
  func: async ({ logger, config, getInspectorState }, data) => {
151
151
  const projectDir = config.rootDir;
152
- const provider = await resolveProvider(config, data?.provider);
152
+ const provider = await resolveProvider(config, data?.provider, {
153
+ runtime: data?.runtime,
154
+ });
153
155
  const fromPlan = data?.fromPlan ?? false;
154
156
  const resultFile = data?.resultFile;
155
157
  if (fromPlan) {
@@ -1,13 +1,16 @@
1
1
  export declare const deployPlan: import("#pikku").PikkuFunctionConfig<{
2
2
  resultFile?: string;
3
3
  provider?: string;
4
+ runtime?: string;
4
5
  debugArtifacts?: boolean;
5
6
  }, void, "session" | "rpc", import("#pikku").PikkuFunctionSessionless<{
6
7
  resultFile?: string;
7
8
  provider?: string;
9
+ runtime?: string;
8
10
  debugArtifacts?: boolean;
9
11
  }, void, "session" | "rpc", import("#pikku").Services> | import("#pikku").PikkuFunction<{
10
12
  resultFile?: string;
11
13
  provider?: string;
14
+ runtime?: string;
12
15
  debugArtifacts?: boolean;
13
16
  }, void, "session" | "rpc", import("#pikku").Services>, undefined, undefined>;
@@ -47,7 +47,9 @@ export const deployPlan = pikkuSessionlessFunc({
47
47
  const projectDir = config.rootDir;
48
48
  const inspectorState = await getInspectorState(true);
49
49
  const projectId = await resolveProjectId(projectDir);
50
- const provider = await resolveProvider(config, data?.provider);
50
+ const provider = await resolveProvider(config, data?.provider, {
51
+ runtime: data?.runtime,
52
+ });
51
53
  const result = await runBuildPipeline({
52
54
  projectDir,
53
55
  projectId,
@@ -168,6 +168,20 @@ export const dev = pikkuSessionlessFunc({
168
168
  variables,
169
169
  })
170
170
  : undefined;
171
+ // When the CLI itself runs under bun (e.g. the compiled brew binary), serve
172
+ // over @pikku/bun-server (native Bun.serve WebSockets) instead of the node
173
+ // http server + ws package. The bun runtime is dynamically imported so a
174
+ // node-run CLI never loads it. The same BunEventHubService instance is
175
+ // shared with the singleton services so function-side broadcasts reach the
176
+ // sockets the transport holds.
177
+ const isBun = typeof globalThis.Bun !== 'undefined';
178
+ const bun = isBun
179
+ ? await (async () => {
180
+ const mod = await import('@pikku/bun-server');
181
+ return { mod, eventHub: new mod.BunEventHubService() };
182
+ })()
183
+ : null;
184
+ const eventHub = bun ? bun.eventHub : new LocalEventHubService();
171
185
  const inMemoryServices = {
172
186
  logger: devLogger,
173
187
  ...(aiAgentRunner ? { aiAgentRunner } : {}),
@@ -181,7 +195,7 @@ export const dev = pikkuSessionlessFunc({
181
195
  aiStorage,
182
196
  aiRunState,
183
197
  agentRunService,
184
- eventHub: new LocalEventHubService(),
198
+ eventHub,
185
199
  ...(kysely ? { kysely } : {}),
186
200
  ...(localContent ? { content: localContent } : {}),
187
201
  };
@@ -193,17 +207,29 @@ export const dev = pikkuSessionlessFunc({
193
207
  ...singletonServices,
194
208
  getInspectorState,
195
209
  });
196
- const wss = new WebSocketServer({ noServer: true });
197
- const pikkuServer = new PikkuNodeHTTPServer({
198
- ...userConfig,
199
- hostname,
200
- port: resolvedPort,
201
- content: localContentConfig,
202
- }, logger, {
203
- configureServer: (httpServer) => {
204
- pikkuWebsocketHandler({ server: httpServer, wss, logger });
205
- },
206
- });
210
+ let wss;
211
+ let pikkuServer;
212
+ if (bun) {
213
+ pikkuServer = new bun.mod.PikkuBunServer({
214
+ ...userConfig,
215
+ hostname,
216
+ port: resolvedPort,
217
+ content: localContentConfig,
218
+ }, logger, { eventHub: bun.eventHub });
219
+ }
220
+ else {
221
+ wss = new WebSocketServer({ noServer: true });
222
+ pikkuServer = new PikkuNodeHTTPServer({
223
+ ...userConfig,
224
+ hostname,
225
+ port: resolvedPort,
226
+ content: localContentConfig,
227
+ }, logger, {
228
+ configureServer: (httpServer) => {
229
+ pikkuWebsocketHandler({ server: httpServer, wss: wss, logger });
230
+ },
231
+ });
232
+ }
207
233
  await pikkuServer.init();
208
234
  await schedulerService.start();
209
235
  await pikkuServer.start();
@@ -215,7 +241,9 @@ export const dev = pikkuSessionlessFunc({
215
241
  await stopSingletonServices();
216
242
  await configWatcher?.close();
217
243
  await watcher?.close();
218
- await new Promise((resolve, reject) => wss.close((err) => (err ? reject(err) : resolve())));
244
+ if (wss) {
245
+ await new Promise((resolve, reject) => wss.close((err) => (err ? reject(err) : resolve())));
246
+ }
219
247
  await pikkuServer.stop();
220
248
  }
221
249
  finally {
@@ -10,7 +10,7 @@ class BunSqliteStatement {
10
10
  return this.stmt.all(...parameters);
11
11
  }
12
12
  get(...parameters) {
13
- return this.stmt.get(...parameters) ?? null;
13
+ return (this.stmt.get(...parameters) ?? null);
14
14
  }
15
15
  iterate(...parameters) {
16
16
  return this.stmt.iterate(...parameters);
@@ -92,15 +92,15 @@ type InfiniteOpts<Name extends PaginatedKeys> = Omit<
92
92
 
93
93
  export const usePikkuInfiniteQuery = <Name extends PaginatedKeys>(
94
94
  name: Name,
95
- data: Omit<FlattenedRPCMap[Name]['input'], 'nextCursor'>,
95
+ data: Omit<FlattenedRPCMap[Name]['input'], 'cursor'>,
96
96
  options?: InfiniteOpts<Name>
97
97
  ) => {
98
98
  const rpc = usePikkuRPC<{ invoke: RPCInvoke }>()
99
99
  return useInfiniteQuery({
100
100
  queryKey: [name, data] as const,
101
- queryFn: ({ pageParam }: { pageParam: string | undefined }) => rpc.invoke(name, { ...data, nextCursor: pageParam } as unknown as FlattenedRPCMap[Name]['input']),
101
+ queryFn: ({ pageParam }: { pageParam: string | undefined }) => rpc.invoke(name, { ...data, cursor: pageParam } as unknown as FlattenedRPCMap[Name]['input']),
102
102
  initialPageParam: undefined as string | undefined,
103
- getNextPageParam: (lastPage: FlattenedRPCMap[Name]['output']) => (lastPage as { nextCursor?: string }).nextCursor ?? undefined,
103
+ getNextPageParam: (lastPage: FlattenedRPCMap[Name]['output']) => (lastPage as { nextCursor?: string | null }).nextCursor ?? undefined,
104
104
  ...options,
105
105
  })
106
106
  }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.52
2
+ * This file was generated by @pikku/cli@0.12.54
3
3
  */
4
4
  /**
5
5
  * Auto-generated remote internal RPC queue worker and HTTP endpoint
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pikku/cli",
3
- "version": "0.12.52",
3
+ "version": "0.12.54",
4
4
  "author": "yasser.fadl@gmail.com",
5
5
  "license": "BUSL-1.1",
6
6
  "imports": {
@@ -28,13 +28,14 @@
28
28
  "@electric-sql/pglite": "^0.5.1",
29
29
  "@openapi-contrib/json-schema-to-openapi-schema": "^4.3.1",
30
30
  "@pikku/better-auth": "^0.12.12",
31
- "@pikku/core": "^0.12.37",
32
- "@pikku/deploy-cloudflare": "^0.12.5",
31
+ "@pikku/bun-server": "^0.12.1",
32
+ "@pikku/core": "^0.12.38",
33
+ "@pikku/deploy-cloudflare": "^0.12.6",
33
34
  "@pikku/fetch": "^0.12.5",
34
35
  "@pikku/inspector": "^0.12.26",
35
- "@pikku/kysely": "^0.12.16",
36
+ "@pikku/kysely": "^0.12.17",
36
37
  "@pikku/kysely-node-sqlite": "^0.12.2",
37
- "@pikku/node-http-server": "^0.12.2",
38
+ "@pikku/node-http-server": "^0.12.3",
38
39
  "@pikku/openapi-parser": "^0.12.10",
39
40
  "@pikku/schedule": "^0.12.0",
40
41
  "@pikku/ws": "^0.12.2",
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: pikku-n8n-addon-map
3
- description: 'Use when mapping n8n integration stubs (gmailTool, slackTool, googleSheetsTool, plain gmail/slack action nodes, etc.) emitted by @pikku/n8n-import to real `@pikku/addon-*` functions. Triggered when the user points at a `<workflow>.integrations.json` manifest produced by `pikku-n8n-import`, says ''map the n8n integrations'', ''wire up the gmail/slack stubs'', ''replace these stubs with addon refs'', or opens a stub file generated from an n8n integration node (the stub''s JSDoc says `STUB — generated from n8n node "..." (type "n8n-nodes-base.<service>...")`). For n8n **Code** node stubs use `pikku-n8n-code-translate` instead.'
3
+ description: 'Use when mapping n8n integration stubs (gmailTool, slackTool, googleSheetsTool, plain gmail/slack action nodes, etc.) emitted by @pikku/n8n-import to real `@pikku/addon-*` functions. Triggered when the user points at a `<workflow>.integrations.json` manifest produced by `pikku-n8n-import`, says ''map the n8n integrations'', ''wire up the gmail/slack stubs'', ''replace these stubs with addon refs'', or opens a stub file generated from an n8n integration node (the stub''s JSDoc says `STUB — generated from n8n node "..." (type "n8n-nodes-base.<service>...")`). For n8n **Code** node stubs use `pikku-n8n-code-translate` instead. DO NOT TRIGGER when: the stub is an n8n Code node (use pikku-n8n-code-translate), or no n8n-generated stub/manifest is involved (use pikku-addon for hand-written addon wiring).'
4
4
  metadata:
5
5
  version: 1.0.0
6
6
  ---
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: pikku-n8n-code-translate
3
- description: "Use when translating an n8n Code node body into a real Pikku function body. Triggered when the user opens or points at a stub generated by @pikku/n8n-import (look for `STUB — generated from n8n Code node` in the file's JSDoc), or when the user says 'translate this n8n code', 'port this n8n code node', 'finish the codeStub__... function', etc. The stub file is a `pikkuSessionlessFunc` with a Zod input/output, a JSDoc preserving the original n8n JavaScript verbatim, and a `throw new Error('… — implement me')` body."
3
+ description: "Use when translating an n8n Code node body into a real Pikku function body. Triggered when the user opens or points at a stub generated by @pikku/n8n-import (look for `STUB — generated from n8n Code node` in the file's JSDoc), or when the user says 'translate this n8n code', 'port this n8n code node', 'finish the codeStub__... function', etc. The stub file is a `pikkuSessionlessFunc` with a Zod input/output, a JSDoc preserving the original n8n JavaScript verbatim, and a `throw new Error('… — implement me')` body. DO NOT TRIGGER when: the stub is an n8n integration/service node such as gmailTool or slackTool (use pikku-n8n-addon-map), or the code is not an n8n-generated stub at all."
4
4
  metadata:
5
5
  version: 1.0.0
6
6
  ---