@pikku/cli 0.12.71 → 0.12.74

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 (66) hide show
  1. package/dist/.pikku/agent/pikku-agent-types.gen.d.ts +1 -1
  2. package/dist/.pikku/channel/pikku-channel-types.gen.d.ts +1 -1
  3. package/dist/.pikku/channel/pikku-channel-types.gen.js +1 -1
  4. package/dist/.pikku/cli/pikku-cli-channel.js +1 -1
  5. package/dist/.pikku/cli/pikku-cli-client.gen.d.ts +1 -1
  6. package/dist/.pikku/cli/pikku-cli-client.gen.js +1 -1
  7. package/dist/.pikku/cli/pikku-cli-contracts-meta.gen.d.ts +1 -1
  8. package/dist/.pikku/cli/pikku-cli-contracts-meta.gen.js +1 -1
  9. package/dist/.pikku/cli/pikku-cli-types.gen.d.ts +1 -1
  10. package/dist/.pikku/cli/pikku-cli-types.gen.js +1 -1
  11. package/dist/.pikku/cli/pikku-cli-wirings-meta.gen.js +1 -1
  12. package/dist/.pikku/cli/pikku-cli-wirings.gen.d.ts +1 -1
  13. package/dist/.pikku/cli/pikku-cli-wirings.gen.js +1 -1
  14. package/dist/.pikku/cli/pikku-cli.gen.d.ts +1 -1
  15. package/dist/.pikku/cli/pikku-cli.gen.js +1 -1
  16. package/dist/.pikku/console/pikku-node-types.gen.d.ts +1 -1
  17. package/dist/.pikku/function/pikku-function-types.gen.d.ts +1 -1
  18. package/dist/.pikku/function/pikku-function-types.gen.js +1 -1
  19. package/dist/.pikku/function/pikku-functions-meta.gen.js +1 -1
  20. package/dist/.pikku/function/pikku-functions-meta.gen.json +2 -2
  21. package/dist/.pikku/function/pikku-functions.gen.js +1 -1
  22. package/dist/.pikku/http/pikku-http-types.gen.d.ts +1 -1
  23. package/dist/.pikku/http/pikku-http-types.gen.js +1 -1
  24. package/dist/.pikku/http/pikku-http-wirings-meta.gen.js +1 -1
  25. package/dist/.pikku/http/pikku-http-wirings.gen.d.ts +1 -1
  26. package/dist/.pikku/http/pikku-http-wirings.gen.js +1 -1
  27. package/dist/.pikku/mcp/pikku-mcp-types.gen.d.ts +1 -1
  28. package/dist/.pikku/mcp/pikku-mcp-types.gen.js +1 -1
  29. package/dist/.pikku/pikku-bootstrap.gen.d.ts +1 -1
  30. package/dist/.pikku/pikku-bootstrap.gen.js +1 -1
  31. package/dist/.pikku/pikku-meta-service.gen.d.ts +1 -1
  32. package/dist/.pikku/pikku-meta-service.gen.js +1 -1
  33. package/dist/.pikku/pikku-services.gen.d.ts +1 -1
  34. package/dist/.pikku/pikku-types.gen.d.ts +1 -1
  35. package/dist/.pikku/pikku-types.gen.js +1 -1
  36. package/dist/.pikku/queue/pikku-queue-types.gen.d.ts +1 -1
  37. package/dist/.pikku/queue/pikku-queue-types.gen.js +1 -1
  38. package/dist/.pikku/queue/pikku-queue-workers-wirings-meta.gen.js +1 -1
  39. package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.d.ts +1 -1
  40. package/dist/.pikku/queue/pikku-queue-workers-wirings.gen.js +1 -1
  41. package/dist/.pikku/rpc/pikku-rpc-wirings-meta.internal.gen.js +1 -1
  42. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.d.ts +1 -1
  43. package/dist/.pikku/scheduler/pikku-scheduler-types.gen.js +1 -1
  44. package/dist/.pikku/schemas/register.gen.js +1 -1
  45. package/dist/.pikku/secrets/pikku-secret-types.gen.d.ts +1 -1
  46. package/dist/.pikku/secrets/pikku-secret-types.gen.js +1 -1
  47. package/dist/.pikku/secrets/pikku-secrets.gen.d.ts +1 -1
  48. package/dist/.pikku/secrets/pikku-secrets.gen.js +1 -1
  49. package/dist/.pikku/trigger/pikku-trigger-types.gen.d.ts +1 -1
  50. package/dist/.pikku/trigger/pikku-trigger-types.gen.js +1 -1
  51. package/dist/.pikku/variables/pikku-variable-types.gen.d.ts +1 -1
  52. package/dist/.pikku/variables/pikku-variable-types.gen.js +1 -1
  53. package/dist/.pikku/variables/pikku-variables.gen.d.ts +1 -1
  54. package/dist/.pikku/variables/pikku-variables.gen.js +1 -1
  55. package/dist/.pikku/workflow/pikku-workflow-types.gen.d.ts +1 -1
  56. package/dist/.pikku/workflow/pikku-workflow-types.gen.js +1 -1
  57. package/dist/.pikku/workflow/pikku-workflow-wirings-meta.gen.js +1 -1
  58. package/dist/.pikku/workflow/pikku-workflow-wirings.gen.js +1 -1
  59. package/dist/bin/pikku-bin.mjs +2 -2
  60. package/dist/src/functions/commands/bun-coverage-loader.js +7 -4
  61. package/dist/src/functions/commands/dev.js +19 -5
  62. package/dist/src/functions/wirings/auth/pikku-command-auth.js +1 -1
  63. package/dist/src/functions/wirings/auth/serialize-auth-gen.d.ts +1 -16
  64. package/dist/src/functions/wirings/auth/serialize-auth-gen.js +36 -3
  65. package/dist/src/utils/tsc-check.js +24 -6
  66. package/package.json +3 -3
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.71
2
+ * This file was generated by @pikku/cli@0.12.74
3
3
  */
4
4
  import { CoreAIAgent, PikkuAIMiddlewareHooks } from '@pikku/core/ai-agent';
5
5
  import type { PikkuPermission, PikkuMiddleware, Services, PikkuFunctionConfig } from '../function/pikku-function-types.gen.js';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.71
2
+ * This file was generated by @pikku/cli@0.12.74
3
3
  */
4
4
  /**
5
5
  * Channel-specific type definitions for tree-shaking optimization
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.71
2
+ * This file was generated by @pikku/cli@0.12.74
3
3
  */
4
4
  /**
5
5
  * Channel-specific type definitions for tree-shaking optimization
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.71
2
+ * This file was generated by @pikku/cli@0.12.74
3
3
  */
4
4
  /**
5
5
  * WebSocket channel backend for 'pikku' CLI commands
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.71
2
+ * This file was generated by @pikku/cli@0.12.74
3
3
  */
4
4
  import '../pikku-bootstrap.gen.js';
5
5
  /**
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.71
2
+ * This file was generated by @pikku/cli@0.12.74
3
3
  */
4
4
  import { executeCLIViaChannel } from '@pikku/core/cli/channel';
5
5
  import { CorePikkuWebsocket } from '@pikku/websocket';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.71
2
+ * This file was generated by @pikku/cli@0.12.74
3
3
  */
4
4
  import contractsMeta from './pikku-cli-contracts-meta.gen.json';
5
5
  export default contractsMeta;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.71
2
+ * This file was generated by @pikku/cli@0.12.74
3
3
  */
4
4
  import contractsMeta from './pikku-cli-contracts-meta.gen.json' with { type: 'json' };
5
5
  export default contractsMeta;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.71
2
+ * This file was generated by @pikku/cli@0.12.74
3
3
  */
4
4
  /**
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.71
2
+ * This file was generated by @pikku/cli@0.12.74
3
3
  */
4
4
  /**
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.71
2
+ * This file was generated by @pikku/cli@0.12.74
3
3
  */
4
4
  import { pikkuState } from '@pikku/core/internal';
5
5
  import metaData from './pikku-cli-wirings-meta.gen.json' with { type: 'json' };
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.71
2
+ * This file was generated by @pikku/cli@0.12.74
3
3
  */
4
4
  import '../../src/cli.wiring.js';
5
5
  import '../../src/services.js';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.71
2
+ * This file was generated by @pikku/cli@0.12.74
3
3
  */
4
4
  /* The files with an wireCLI function call */
5
5
  import '../../src/cli.wiring.js';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.71
2
+ * This file was generated by @pikku/cli@0.12.74
3
3
  */
4
4
  import '../pikku-bootstrap.gen.js';
5
5
  export declare function PikkuCLI(args: string[]): Promise<void>;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.71
2
+ * This file was generated by @pikku/cli@0.12.74
3
3
  */
4
4
  import { executeCLI, CLIError } from '@pikku/core/cli';
5
5
  import { createConfig as createConfig } from '../../src/services.js';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.71
2
+ * This file was generated by @pikku/cli@0.12.74
3
3
  */
4
4
  import type { FlattenedRPCMap } from '../rpc/pikku-rpc-wirings-map.internal.gen.js';
5
5
  export type NodeCategory = never;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.71
2
+ * This file was generated by @pikku/cli@0.12.74
3
3
  */
4
4
  /**
5
5
  * Core function, middleware, and permission types for all wirings
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.71
2
+ * This file was generated by @pikku/cli@0.12.74
3
3
  */
4
4
  /**
5
5
  * Core function, middleware, and permission types for all wirings
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.71
2
+ * This file was generated by @pikku/cli@0.12.74
3
3
  */
4
4
  import { pikkuState } from '@pikku/core/internal';
5
5
  import metaData from './pikku-functions-meta.gen.json' with { type: 'json' };
@@ -671,7 +671,7 @@
671
671
  ],
672
672
  "outputs": [],
673
673
  "remote": true,
674
- "implementationHash": "a67f723a404ba236"
674
+ "implementationHash": "c0b7fbab3731d8b6"
675
675
  },
676
676
  "pikkuEmailsInit": {
677
677
  "pikkuFuncId": "pikkuEmailsInit",
@@ -1688,7 +1688,7 @@
1688
1688
  "PikkuAuthInput"
1689
1689
  ],
1690
1690
  "outputs": [],
1691
- "implementationHash": "53fd2b900f3bbc28",
1691
+ "implementationHash": "576e648aba1176ce",
1692
1692
  "middleware": [
1693
1693
  {
1694
1694
  "type": "wire",
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.71
2
+ * This file was generated by @pikku/cli@0.12.74
3
3
  */
4
4
  /* Import and register functions used by RPCs */
5
5
  import { addFunction } from '@pikku/core/function';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.71
2
+ * This file was generated by @pikku/cli@0.12.74
3
3
  */
4
4
  /**
5
5
  * HTTP-specific type definitions for tree-shaking optimization
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.71
2
+ * This file was generated by @pikku/cli@0.12.74
3
3
  */
4
4
  /**
5
5
  * HTTP-specific type definitions for tree-shaking optimization
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.71
2
+ * This file was generated by @pikku/cli@0.12.74
3
3
  */
4
4
  import { pikkuState } from '@pikku/core/internal';
5
5
  import metaData from './pikku-http-wirings-meta.gen.json' with { type: 'json' };
@@ -1,4 +1,4 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.71
2
+ * This file was generated by @pikku/cli@0.12.74
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.71
2
+ * This file was generated by @pikku/cli@0.12.74
3
3
  */
4
4
  /* The files with an wireHTTP 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.71
2
+ * This file was generated by @pikku/cli@0.12.74
3
3
  */
4
4
  /**
5
5
  * MCP-specific type definitions for tree-shaking optimization
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.71
2
+ * This file was generated by @pikku/cli@0.12.74
3
3
  */
4
4
  /**
5
5
  * MCP-specific type definitions for tree-shaking optimization
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.71
2
+ * This file was generated by @pikku/cli@0.12.74
3
3
  */
4
4
  import './rpc/pikku-rpc-wirings-meta.internal.gen.js';
5
5
  import './http/pikku-http-wirings-meta.gen.js';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.71
2
+ * This file was generated by @pikku/cli@0.12.74
3
3
  */
4
4
  import './rpc/pikku-rpc-wirings-meta.internal.gen.js';
5
5
  import './http/pikku-http-wirings-meta.gen.js';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.71
2
+ * This file was generated by @pikku/cli@0.12.74
3
3
  */
4
4
  import { LocalMetaService } from '@pikku/core/services/local-meta';
5
5
  export declare class PikkuMetaService extends LocalMetaService {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.71
2
+ * This file was generated by @pikku/cli@0.12.74
3
3
  */
4
4
  import { LocalMetaService } from '@pikku/core/services/local-meta';
5
5
  export class PikkuMetaService extends LocalMetaService {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.71
2
+ * This file was generated by @pikku/cli@0.12.74
3
3
  */
4
4
  import type { SingletonServices } from '../types/application-types.d.js';
5
5
  import type { Services } from '../types/application-types.d.js';
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.71
2
+ * This file was generated by @pikku/cli@0.12.74
3
3
  */
4
4
  /**
5
5
  * Main type export hub - re-exports all wiring-specific types
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.71
2
+ * This file was generated by @pikku/cli@0.12.74
3
3
  */
4
4
  /**
5
5
  * Main type export hub - re-exports all wiring-specific types
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.71
2
+ * This file was generated by @pikku/cli@0.12.74
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.71
2
+ * This file was generated by @pikku/cli@0.12.74
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.71
2
+ * This file was generated by @pikku/cli@0.12.74
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.71
2
+ * This file was generated by @pikku/cli@0.12.74
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.71
2
+ * This file was generated by @pikku/cli@0.12.74
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.71
2
+ * This file was generated by @pikku/cli@0.12.74
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' };
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.71
2
+ * This file was generated by @pikku/cli@0.12.74
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.71
2
+ * This file was generated by @pikku/cli@0.12.74
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.71
2
+ * This file was generated by @pikku/cli@0.12.74
3
3
  */
4
4
  import { addSchema } from '@pikku/core/schema';
5
5
  import * as BinaryInput from './schemas/BinaryInput.schema.json' with { type: 'json' };
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.71
2
+ * This file was generated by @pikku/cli@0.12.74
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.71
2
+ * This file was generated by @pikku/cli@0.12.74
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.71
2
+ * This file was generated by @pikku/cli@0.12.74
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.71
2
+ * This file was generated by @pikku/cli@0.12.74
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.71
2
+ * This file was generated by @pikku/cli@0.12.74
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.71
2
+ * This file was generated by @pikku/cli@0.12.74
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.71
2
+ * This file was generated by @pikku/cli@0.12.74
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.71
2
+ * This file was generated by @pikku/cli@0.12.74
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.71
2
+ * This file was generated by @pikku/cli@0.12.74
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.71
2
+ * This file was generated by @pikku/cli@0.12.74
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.71
2
+ * This file was generated by @pikku/cli@0.12.74
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.71
2
+ * This file was generated by @pikku/cli@0.12.74
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.71
2
+ * This file was generated by @pikku/cli@0.12.74
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.71
2
+ * This file was generated by @pikku/cli@0.12.74
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.71') {
15
- process.stderr.write(`\n Update available 0.12.71 → ${latest}\n brew upgrade pikku or npm install -g @pikku/cli\n\n`)
14
+ if (latest !== '0.12.74') {
15
+ process.stderr.write(`\n Update available 0.12.74 → ${latest}\n brew upgrade pikku or npm install -g @pikku/cli\n\n`)
16
16
  }
17
17
  } catch {}
18
18
  }
@@ -31,11 +31,14 @@ export async function registerBunCoverageLoader({ rootDir, }) {
31
31
  name: 'pikku-istanbul-coverage',
32
32
  setup(build) {
33
33
  build.onLoad({ filter }, async (args) => {
34
- if (!shouldInstrument(args.path))
35
- return undefined;
34
+ // Bun (≥1.3.14) rejects `return undefined` from onLoad with
35
+ // "onLoad() expects an object returned", so non-instrumented files
36
+ // (.gen/.test/.d, node_modules) pass through as an object instead.
36
37
  const source = await readFile(args.path, 'utf-8');
37
- const contents = instrumenter.instrumentSync(source, args.path);
38
- return { contents, loader: args.path.endsWith('.tsx') ? 'tsx' : 'ts' };
38
+ const loader = args.path.endsWith('.tsx') ? 'tsx' : 'ts';
39
+ if (!shouldInstrument(args.path))
40
+ return { contents: source, loader };
41
+ return { contents: instrumenter.instrumentSync(source, args.path), loader };
39
42
  });
40
43
  },
41
44
  });
@@ -1,7 +1,7 @@
1
1
  import { join, resolve } from 'path';
2
2
  import { pikkuSessionlessFunc } from '#pikku';
3
3
  import chokidar from 'chokidar';
4
- import { pikkuDevReloader } from '@pikku/core/dev';
4
+ import { pikkuDevReloader, reloadGeneratedMeta } from '@pikku/core/dev';
5
5
  import { ConsoleLogger, LocalEmailService, spy, InMemoryQueueService, InMemoryWorkflowService, InMemoryTriggerService, InMemoryAIRunStateService, } from '@pikku/core/services';
6
6
  import { KyselyAIStorageService, KyselyAIRunStateService, KyselyAgentRunService, } from '@pikku/kysely';
7
7
  import { stopSingletonServices } from '@pikku/core';
@@ -252,12 +252,12 @@ export const dev = pikkuSessionlessFunc({
252
252
  process.exit(0);
253
253
  }
254
254
  });
255
- if (enableHmr) {
256
- await pikkuDevReloader({
255
+ const devReloader = enableHmr
256
+ ? await pikkuDevReloader({
257
257
  srcDirectories: watchDirectories,
258
258
  logger,
259
- });
260
- }
259
+ })
260
+ : undefined;
261
261
  if (enableWatch) {
262
262
  const genIgnore = /\.gen\.tsx?$/;
263
263
  configWatcher = chokidar.watch(watchDirectories, {
@@ -278,6 +278,20 @@ export const dev = pikkuSessionlessFunc({
278
278
  invalidateInspectorState();
279
279
  await runAllWithCommandState();
280
280
  workflowService.wireQueueWorkers();
281
+ // Pull the regenerated meta + JSON schemas into the running
282
+ // process so new/changed functions are callable without a
283
+ // restart (the hot-reloader registers their implementations).
284
+ await reloadGeneratedMeta({
285
+ pikkuDir,
286
+ logger,
287
+ schemaService: resolvedServices.schema,
288
+ });
289
+ // Re-import recently changed files now that the fresh meta is
290
+ // in state: wire* calls skip routes whose meta doesn't exist,
291
+ // so a NEW route in a changed wiring file only registers on
292
+ // this post-codegen pass (the reloader's instant pass ran too
293
+ // early to see it).
294
+ await devReloader?.reimportPending();
281
295
  logger.info({
282
296
  message: `✓ Generated in ${Date.now() - start}ms`,
283
297
  type: 'timing',
@@ -30,7 +30,7 @@ export const pikkuAuth = pikkuSessionlessFunc({
30
30
  // has no OAuth providers — still generates its /auth/* wiring.
31
31
  if (!state.auth.definition)
32
32
  return;
33
- const { wiring, secrets, middleware } = serializeAuthGen(state.auth.definition, state.auth.providers, authFile, typesDeclarationFile, packageMappings ?? {}, state.auth.hasUserSessionMiddleware ?? false);
33
+ const { wiring, secrets, middleware } = serializeAuthGen(state.auth.definition, state.auth.providers, authFile, typesDeclarationFile, packageMappings ?? {}, state.auth.hasUserSessionMiddleware ?? false, Boolean(config.scaffold?.console));
34
34
  // The secrets file sits alongside authFile so re-inspection rediscovers it.
35
35
  // It is kept separate from the wiring file because the CLI forbids Zod
36
36
  // schemas and HTTP wiring (wireHTTPRoutes) in the same file (PKU490).
@@ -18,19 +18,4 @@ export interface AuthGenOutput {
18
18
  * `session.cookieCache` is enabled (stateless path); undefined otherwise. */
19
19
  middleware?: string;
20
20
  }
21
- /**
22
- * Generates the `auth.gen.ts` (HTTP wiring) and `auth-secrets.gen.ts` (schemas +
23
- * secret/variable wiring) files from a `pikkuBetterAuth((services) => betterAuth(...))`
24
- * export.
25
- *
26
- * The wiring file side-effect imports the user's auth file (so `pikkuBetterAuth`
27
- * registers its factory), builds ONE shared sessionless handler that reads the
28
- * resolved `services.auth` and delegates to better-auth's fetch handler, wires a
29
- * catch-all `${basePath}{/*splat}` route per method to it, and registers the
30
- * better-auth session-bridge middleware globally. Provider/plugin metadata for
31
- * the console is emitted separately as `auth-meta.gen.json` (see
32
- * serializeAuthMeta). Because this is normal, statically inspectable HTTP
33
- * wiring, the routes flow through inspection into the deploy manifest (one
34
- * worker for all auth routes).
35
- */
36
- export declare const serializeAuthGen: (definition: AuthDefinition, providers: string[], authFile: string, typesDeclarationFile: string, packageMappings: Record<string, string>, hasUserSessionMiddleware?: boolean) => AuthGenOutput;
21
+ export declare const serializeAuthGen: (definition: AuthDefinition, providers: string[], authFile: string, typesDeclarationFile: string, packageMappings: Record<string, string>, hasUserSessionMiddleware?: boolean, includeConsoleToken?: boolean) => AuthGenOutput;
@@ -33,7 +33,22 @@ function variableSchemaName(name, field) {
33
33
  * wiring, the routes flow through inspection into the deploy manifest (one
34
34
  * worker for all auth routes).
35
35
  */
36
- export const serializeAuthGen = (definition, providers, authFile, typesDeclarationFile, packageMappings, hasUserSessionMiddleware = false) => {
36
+ // External consoles (served from another origin) cannot carry the session
37
+ // cookie, so they authenticate with 'Authorization: Bearer <PIKKU_CONSOLE_TOKEN>'.
38
+ // The expected token resolves through the secrets service per request and the
39
+ // middleware is a no-op while the secret is unset. Emitted into the same
40
+ // addHTTPMiddleware('*') call as the session middleware: the inspector keys
41
+ // route-middleware groups by pattern, so a second '*' registration from another
42
+ // file would silently displace this one in deployed units.
43
+ const consoleTokenMiddlewareLines = () => [
44
+ ` authBearer({`,
45
+ ` token: {`,
46
+ ` secretId: 'PIKKU_CONSOLE_TOKEN',`,
47
+ ` userSession: { userId: 'pikku-console-token' },`,
48
+ ` },`,
49
+ ` }),`,
50
+ ];
51
+ export const serializeAuthGen = (definition, providers, authFile, typesDeclarationFile, packageMappings, hasUserSessionMiddleware = false, includeConsoleToken = false) => {
37
52
  const known = providers.filter((p) => p in PROVIDER_REGISTRY);
38
53
  const basePath = definition.basePath;
39
54
  // Side-effect import of the user's auth file so `pikkuBetterAuth` runs and
@@ -132,6 +147,9 @@ export const serializeAuthGen = (definition, providers, authFile, typesDeclarati
132
147
  emitStatefulSession
133
148
  ? `import { createAuthHandler, betterAuthSession } from '@pikku/better-auth'`
134
149
  : `import { createAuthHandler } from '@pikku/better-auth'`,
150
+ ...(emitStatefulSession && includeConsoleToken
151
+ ? [`import { authBearer } from '@pikku/core/middleware'`]
152
+ : []),
135
153
  `import '${configImportPath}'`,
136
154
  '',
137
155
  // createAuthHandler is called once at module load; the exported handler is a
@@ -148,7 +166,12 @@ export const serializeAuthGen = (definition, providers, authFile, typesDeclarati
148
166
  if (emitStatefulSession) {
149
167
  // Stateful: betterAuthSession calls services.auth(), so it stays here with
150
168
  // the auth.wiring import.
151
- wiring.push(`addHTTPMiddleware('*', [betterAuthSession()])`, '');
169
+ if (includeConsoleToken) {
170
+ wiring.push(`addHTTPMiddleware('*', [`, ` betterAuthSession(),`, ...consoleTokenMiddlewareLines(), `])`, '');
171
+ }
172
+ else {
173
+ wiring.push(`addHTTPMiddleware('*', [betterAuthSession()])`, '');
174
+ }
152
175
  }
153
176
  wiring.push(`wireHTTPRoutes({`, ` routes: {`);
154
177
  // One catch-all route per method. `{/*splat}` matches both the bare basePath
@@ -172,8 +195,18 @@ export const serializeAuthGen = (definition, providers, authFile, typesDeclarati
172
195
  '',
173
196
  `import { addHTTPMiddleware } from '${pikkuTypesImportPath}'`,
174
197
  `import { betterAuthStatelessSession } from '@pikku/better-auth'`,
198
+ ...(includeConsoleToken
199
+ ? [`import { authBearer } from '@pikku/core/middleware'`]
200
+ : []),
175
201
  '',
176
- `addHTTPMiddleware('*', [betterAuthStatelessSession()])`,
202
+ ...(includeConsoleToken
203
+ ? [
204
+ `addHTTPMiddleware('*', [`,
205
+ ` betterAuthStatelessSession(),`,
206
+ ...consoleTokenMiddlewareLines(),
207
+ `])`,
208
+ ]
209
+ : [`addHTTPMiddleware('*', [betterAuthStatelessSession()])`]),
177
210
  '',
178
211
  ];
179
212
  output.middleware = middleware.join('\n');
@@ -1,6 +1,20 @@
1
1
  import ts from 'typescript';
2
- import { dirname, isAbsolute, relative } from 'node:path';
2
+ import { dirname, isAbsolute, join, relative } from 'node:path';
3
+ import { createRequire } from 'node:module';
3
4
  import { PikkuError } from '@pikku/core';
5
+ // Type-check with the PROJECT's own TypeScript when it has one — the CLI's
6
+ // bundled compiler can be a different major (e.g. TS 6 vs a project on TS 5)
7
+ // and produce diagnostics the project's real `tsc` never would (seen as
8
+ // phantom TS2591 "Cannot find name 'process'" on a tsconfig that is clean
9
+ // under the project's compiler). Falls back to the CLI's typescript.
10
+ const loadProjectTs = (rootDir) => {
11
+ try {
12
+ return createRequire(join(rootDir, 'noop.cjs'))('typescript');
13
+ }
14
+ catch {
15
+ return ts;
16
+ }
17
+ };
4
18
  // A type-check failure is expected (the --tsc gate did its job) — throw a
5
19
  // PikkuError so the runner logs the message alone, not a stack trace.
6
20
  export class PikkuTypecheckFailedError extends PikkuError {
@@ -108,12 +122,13 @@ export const renderTscFull = (diagnostics, rootDir, formatHost) => {
108
122
  * so the caller can pick the compact (`--tsc-summary`) or full (`--tsc`) render.
109
123
  */
110
124
  export const runProjectTypecheck = (tsconfigPath, rootDir) => {
125
+ const tsImpl = loadProjectTs(rootDir);
111
126
  const formatHost = {
112
127
  getCanonicalFileName: (f) => f,
113
128
  getCurrentDirectory: () => rootDir,
114
- getNewLine: () => ts.sys.newLine,
129
+ getNewLine: () => tsImpl.sys.newLine,
115
130
  };
116
- const configFile = ts.readConfigFile(tsconfigPath, ts.sys.readFile);
131
+ const configFile = tsImpl.readConfigFile(tsconfigPath, tsImpl.sys.readFile);
117
132
  if (configFile.error) {
118
133
  const diagnostics = [configFile.error];
119
134
  return {
@@ -122,8 +137,8 @@ export const runProjectTypecheck = (tsconfigPath, rootDir) => {
122
137
  formatHost,
123
138
  };
124
139
  }
125
- const parsed = ts.parseJsonConfigFileContent(configFile.config, ts.sys, dirname(tsconfigPath));
126
- const program = ts.createProgram({
140
+ const parsed = tsImpl.parseJsonConfigFileContent(configFile.config, tsImpl.sys, dirname(tsconfigPath));
141
+ const program = tsImpl.createProgram({
127
142
  rootNames: parsed.fileNames,
128
143
  options: {
129
144
  ...parsed.options,
@@ -132,7 +147,10 @@ export const runProjectTypecheck = (tsconfigPath, rootDir) => {
132
147
  tsBuildInfoFile: undefined,
133
148
  },
134
149
  });
135
- const diagnostics = [...parsed.errors, ...ts.getPreEmitDiagnostics(program)];
150
+ const diagnostics = [
151
+ ...parsed.errors,
152
+ ...tsImpl.getPreEmitDiagnostics(program),
153
+ ];
136
154
  return {
137
155
  result: collectTscDiagnostics(diagnostics, rootDir),
138
156
  diagnostics,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pikku/cli",
3
- "version": "0.12.71",
3
+ "version": "0.12.74",
4
4
  "author": "yasser.fadl@gmail.com",
5
5
  "license": "BUSL-1.1",
6
6
  "imports": {
@@ -59,10 +59,10 @@
59
59
  "zod-to-ts": "^2.1.0"
60
60
  },
61
61
  "peerDependencies": {
62
- "@pikku/core": "^0.12.54"
62
+ "@pikku/core": "^0.12.57"
63
63
  },
64
64
  "devDependencies": {
65
- "@pikku/core": "^0.12.54",
65
+ "@pikku/core": "^0.12.57",
66
66
  "@types/istanbul-lib-instrument": "^1.7.7",
67
67
  "@types/node": "^24.11.0",
68
68
  "@types/pg": "^8.11.0",