@pikku/cli 0.12.51 → 0.12.52

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 (65) 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 +23 -23
  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/wirings/auth/pikku-command-auth.js +1 -1
  61. package/dist/src/functions/wirings/auth/serialize-auth-gen.d.ts +1 -1
  62. package/dist/src/functions/wirings/auth/serialize-auth-gen.js +15 -8
  63. package/dist/src/scaffold/rpc-remote.gen.js +1 -1
  64. package/package.json +3 -3
  65. package/skills/pikku-better-auth/SKILL.md +7 -2
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.51
2
+ * This file was generated by @pikku/cli@0.12.52
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.51
2
+ * This file was generated by @pikku/cli@0.12.52
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.51
2
+ * This file was generated by @pikku/cli@0.12.52
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.51
2
+ * This file was generated by @pikku/cli@0.12.52
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.51
2
+ * This file was generated by @pikku/cli@0.12.52
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.51
2
+ * This file was generated by @pikku/cli@0.12.52
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.51
2
+ * This file was generated by @pikku/cli@0.12.52
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.51
2
+ * This file was generated by @pikku/cli@0.12.52
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.51
2
+ * This file was generated by @pikku/cli@0.12.52
3
3
  */
4
4
  /**
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.51
2
+ * This file was generated by @pikku/cli@0.12.52
3
3
  */
4
4
  /**
5
5
 
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.51
2
+ * This file was generated by @pikku/cli@0.12.52
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.51
2
+ * This file was generated by @pikku/cli@0.12.52
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.51
2
+ * This file was generated by @pikku/cli@0.12.52
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.51
2
+ * This file was generated by @pikku/cli@0.12.52
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.51
2
+ * This file was generated by @pikku/cli@0.12.52
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.51
2
+ * This file was generated by @pikku/cli@0.12.52
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.51
2
+ * This file was generated by @pikku/cli@0.12.52
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.51
2
+ * This file was generated by @pikku/cli@0.12.52
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.51
2
+ * This file was generated by @pikku/cli@0.12.52
3
3
  */
4
4
  import { pikkuState } from '@pikku/core/internal';
5
5
  import metaData from './pikku-functions-meta.gen.json' with { type: 'json' };
@@ -1882,7 +1882,7 @@
1882
1882
  "outputSchemaName": null,
1883
1883
  "inputs": [],
1884
1884
  "outputs": [],
1885
- "implementationHash": "1f7044dc9aa598b8",
1885
+ "implementationHash": "87f0e80b39a33995",
1886
1886
  "middleware": [
1887
1887
  {
1888
1888
  "type": "wire",
@@ -2772,28 +2772,6 @@
2772
2772
  "inputHash": "835d9763",
2773
2773
  "outputHash": "b9430fb9"
2774
2774
  },
2775
- "pikkuSecrets": {
2776
- "pikkuFuncId": "pikkuSecrets",
2777
- "functionType": "user",
2778
- "funcWrapper": "pikkuSessionlessFunc",
2779
- "sessionless": true,
2780
- "name": "pikkuSecrets",
2781
- "inputSchemaName": null,
2782
- "outputSchemaName": null,
2783
- "inputs": [],
2784
- "outputs": [],
2785
- "implementationHash": "0c90e1e1b970f27c",
2786
- "middleware": [
2787
- {
2788
- "type": "wire",
2789
- "name": "logCommandInfoAndTime",
2790
- "inline": false
2791
- }
2792
- ],
2793
- "contractHash": "79cd70de0e09d5bc",
2794
- "inputHash": "838055cb",
2795
- "outputHash": "c749587a"
2796
- },
2797
2775
  "pikkuSchedulerTypes": {
2798
2776
  "pikkuFuncId": "pikkuSchedulerTypes",
2799
2777
  "functionType": "user",
@@ -2840,6 +2818,28 @@
2840
2818
  "inputHash": "dda1c6aa",
2841
2819
  "outputHash": "1f0f0345"
2842
2820
  },
2821
+ "pikkuSecrets": {
2822
+ "pikkuFuncId": "pikkuSecrets",
2823
+ "functionType": "user",
2824
+ "funcWrapper": "pikkuSessionlessFunc",
2825
+ "sessionless": true,
2826
+ "name": "pikkuSecrets",
2827
+ "inputSchemaName": null,
2828
+ "outputSchemaName": null,
2829
+ "inputs": [],
2830
+ "outputs": [],
2831
+ "implementationHash": "0c90e1e1b970f27c",
2832
+ "middleware": [
2833
+ {
2834
+ "type": "wire",
2835
+ "name": "logCommandInfoAndTime",
2836
+ "inline": false
2837
+ }
2838
+ ],
2839
+ "contractHash": "79cd70de0e09d5bc",
2840
+ "inputHash": "838055cb",
2841
+ "outputHash": "c749587a"
2842
+ },
2843
2843
  "pikkuTriggerTypes": {
2844
2844
  "pikkuFuncId": "pikkuTriggerTypes",
2845
2845
  "functionType": "user",
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.51
2
+ * This file was generated by @pikku/cli@0.12.52
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.51
2
+ * This file was generated by @pikku/cli@0.12.52
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.51
2
+ * This file was generated by @pikku/cli@0.12.52
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.51
2
+ * This file was generated by @pikku/cli@0.12.52
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.51
2
+ * This file was generated by @pikku/cli@0.12.52
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.51
2
+ * This file was generated by @pikku/cli@0.12.52
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.51
2
+ * This file was generated by @pikku/cli@0.12.52
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.51
2
+ * This file was generated by @pikku/cli@0.12.52
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.51
2
+ * This file was generated by @pikku/cli@0.12.52
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.51
2
+ * This file was generated by @pikku/cli@0.12.52
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.51
2
+ * This file was generated by @pikku/cli@0.12.52
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.51
2
+ * This file was generated by @pikku/cli@0.12.52
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.51
2
+ * This file was generated by @pikku/cli@0.12.52
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.51
2
+ * This file was generated by @pikku/cli@0.12.52
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.51
2
+ * This file was generated by @pikku/cli@0.12.52
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.51
2
+ * This file was generated by @pikku/cli@0.12.52
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.51
2
+ * This file was generated by @pikku/cli@0.12.52
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.51
2
+ * This file was generated by @pikku/cli@0.12.52
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.51
2
+ * This file was generated by @pikku/cli@0.12.52
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.51
2
+ * This file was generated by @pikku/cli@0.12.52
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.51
2
+ * This file was generated by @pikku/cli@0.12.52
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.51
2
+ * This file was generated by @pikku/cli@0.12.52
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.51
2
+ * This file was generated by @pikku/cli@0.12.52
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.51
2
+ * This file was generated by @pikku/cli@0.12.52
3
3
  */
4
4
  import { addSchema } from '@pikku/core/schema';
5
5
  import * as PikkuSchemasOutput from './schemas/PikkuSchemasOutput.schema.json' with { type: 'json' };
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.51
2
+ * This file was generated by @pikku/cli@0.12.52
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.51
2
+ * This file was generated by @pikku/cli@0.12.52
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.51
2
+ * This file was generated by @pikku/cli@0.12.52
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.51
2
+ * This file was generated by @pikku/cli@0.12.52
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.51
2
+ * This file was generated by @pikku/cli@0.12.52
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.51
2
+ * This file was generated by @pikku/cli@0.12.52
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.51
2
+ * This file was generated by @pikku/cli@0.12.52
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.51
2
+ * This file was generated by @pikku/cli@0.12.52
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.51
2
+ * This file was generated by @pikku/cli@0.12.52
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.51
2
+ * This file was generated by @pikku/cli@0.12.52
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.51
2
+ * This file was generated by @pikku/cli@0.12.52
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.51
2
+ * This file was generated by @pikku/cli@0.12.52
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.51
2
+ * This file was generated by @pikku/cli@0.12.52
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.51
2
+ * This file was generated by @pikku/cli@0.12.52
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.51') {
15
- process.stderr.write(`\n Update available 0.12.51 → ${latest}\n brew upgrade pikku or npm install -g @pikku/cli\n\n`)
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`)
16
16
  }
17
17
  } catch {}
18
18
  }
@@ -18,7 +18,7 @@ export const pikkuAuth = pikkuSessionlessFunc({
18
18
  // has no OAuth providers — still generates its /auth/* wiring.
19
19
  if (!state.auth.definition)
20
20
  return;
21
- const { wiring, secrets, middleware } = serializeAuthGen(state.auth.definition, state.auth.providers, authFile, typesDeclarationFile, packageMappings ?? {});
21
+ const { wiring, secrets, middleware } = serializeAuthGen(state.auth.definition, state.auth.providers, authFile, typesDeclarationFile, packageMappings ?? {}, state.auth.hasUserSessionMiddleware ?? false);
22
22
  // The secrets file sits alongside authFile so re-inspection rediscovers it.
23
23
  // It is kept separate from the wiring file because the CLI forbids Zod
24
24
  // schemas and HTTP wiring (wireHTTPRoutes) in the same file (PKU490).
@@ -33,4 +33,4 @@ export interface AuthGenOutput {
33
33
  * wiring, the routes flow through inspection into the deploy manifest (one
34
34
  * worker for all auth routes).
35
35
  */
36
- export declare const serializeAuthGen: (definition: AuthDefinition, providers: string[], authFile: string, typesDeclarationFile: string, packageMappings: Record<string, string>) => AuthGenOutput;
36
+ export declare const serializeAuthGen: (definition: AuthDefinition, providers: string[], authFile: string, typesDeclarationFile: string, packageMappings: Record<string, string>, hasUserSessionMiddleware?: boolean) => AuthGenOutput;
@@ -33,7 +33,7 @@ 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) => {
36
+ export const serializeAuthGen = (definition, providers, authFile, typesDeclarationFile, packageMappings, hasUserSessionMiddleware = false) => {
37
37
  const known = providers.filter((p) => p in PROVIDER_REGISTRY);
38
38
  const basePath = definition.basePath;
39
39
  // Side-effect import of the user's auth file so `pikkuBetterAuth` runs and
@@ -116,15 +116,22 @@ export const serializeAuthGen = (definition, providers, authFile, typesDeclarati
116
116
  // file's auth.wiring import (the full better-auth server) isn't dragged into
117
117
  // every unit — only the auth unit bundles it.
118
118
  const stateless = definition.cookieCache;
119
+ // Emit the generated global betterAuthSession() only when it's the stateful
120
+ // path AND the user hasn't registered their own global betterAuthSession(...).
121
+ // A user registration means they want to customize it (mapSession/impersonation/
122
+ // apiKey); the generated default-map one would run first and pre-empt theirs via
123
+ // the `if (session) next()` short-circuit, so we step aside. Mirrors the
124
+ // stateless skip (state.auth.userStatelessSession, pikkujs/pikku#754).
125
+ const emitStatefulSession = !stateless && !hasUserSessionMiddleware;
119
126
  const wiring = [
120
127
  '// AUTO-GENERATED by pikku CLI — do not edit',
121
128
  '',
122
- stateless
123
- ? `import { pikkuSessionlessFunc, wireHTTPRoutes } from '${pikkuTypesImportPath}'`
124
- : `import { pikkuSessionlessFunc, wireHTTPRoutes, addHTTPMiddleware } from '${pikkuTypesImportPath}'`,
125
- stateless
126
- ? `import { createAuthHandler } from '@pikku/better-auth'`
127
- : `import { createAuthHandler, betterAuthSession } from '@pikku/better-auth'`,
129
+ emitStatefulSession
130
+ ? `import { pikkuSessionlessFunc, wireHTTPRoutes, addHTTPMiddleware } from '${pikkuTypesImportPath}'`
131
+ : `import { pikkuSessionlessFunc, wireHTTPRoutes } from '${pikkuTypesImportPath}'`,
132
+ emitStatefulSession
133
+ ? `import { createAuthHandler, betterAuthSession } from '@pikku/better-auth'`
134
+ : `import { createAuthHandler } from '@pikku/better-auth'`,
128
135
  `import '${configImportPath}'`,
129
136
  '',
130
137
  // createAuthHandler is called once at module load; the exported handler is a
@@ -138,7 +145,7 @@ export const serializeAuthGen = (definition, providers, authFile, typesDeclarati
138
145
  `})`,
139
146
  '',
140
147
  ];
141
- if (!stateless) {
148
+ if (emitStatefulSession) {
142
149
  // Stateful: betterAuthSession calls services.auth(), so it stays here with
143
150
  // the auth.wiring import.
144
151
  wiring.push(`addHTTPMiddleware('*', [betterAuthSession()])`, '');
@@ -1,5 +1,5 @@
1
1
  /**
2
- * This file was generated by @pikku/cli@0.12.51
2
+ * This file was generated by @pikku/cli@0.12.52
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.51",
3
+ "version": "0.12.52",
4
4
  "author": "yasser.fadl@gmail.com",
5
5
  "license": "BUSL-1.1",
6
6
  "imports": {
@@ -27,11 +27,11 @@
27
27
  "dependencies": {
28
28
  "@electric-sql/pglite": "^0.5.1",
29
29
  "@openapi-contrib/json-schema-to-openapi-schema": "^4.3.1",
30
- "@pikku/better-auth": "^0.12.11",
30
+ "@pikku/better-auth": "^0.12.12",
31
31
  "@pikku/core": "^0.12.37",
32
32
  "@pikku/deploy-cloudflare": "^0.12.5",
33
33
  "@pikku/fetch": "^0.12.5",
34
- "@pikku/inspector": "^0.12.25",
34
+ "@pikku/inspector": "^0.12.26",
35
35
  "@pikku/kysely": "^0.12.16",
36
36
  "@pikku/kysely-node-sqlite": "^0.12.2",
37
37
  "@pikku/node-http-server": "^0.12.2",
@@ -101,9 +101,14 @@ Enabling `session: { cookieCache: { enabled: true } }` makes the CLI split out a
101
101
 
102
102
  **Tradeoff:** server-side session revocation isn't seen until the cookie cache expires (sign-out is still immediate — it deletes the cookie).
103
103
 
104
- **Do NOT also hand-write a global `addHTTPMiddleware('*', [betterAuthSession()])`** — that re-drags the stateful server into every unit and defeats the split (validate flags it as `better-auth-stateful-session-global`). The generated middleware is enough.
104
+ **Don't add a redundant default `addHTTPMiddleware('*', [betterAuthSession()])`** — with cookieCache on, that re-drags the stateful server into every unit and defeats the split (validate flags it as `better-auth-stateful-session-global`). If you don't need to customize the session, the generated middleware is enough.
105
105
 
106
- **Custom session fields (`role`, `locale`, …):** the generated stateless middleware uses the default map (`{ userId }` only). To use a custom map, register your own `betterAuthStatelessSession({ mapSession })` **globally** `addHTTPMiddleware('*', [...])` or `addGlobalMiddleware([...])`. The CLI detects a global user registration and skips generating its own (pikkujs/pikku#754), so you keep cookieCache's lean bundles *and* your custom fields. A route-scoped registration (`addHTTPMiddleware('/some/path', [...])`) does not count — the generated global middleware is still emitted.
106
+ **Customizing the session bridge (`mapSession`, `impersonation`, `apiKey`, …):** you do NOT chain a second middleware on top of the generated one register your OWN global session middleware and the CLI steps aside (it stops generating its default). This works on both paths and is detected the same way:
107
+
108
+ - **Stateless (cookieCache on):** register `betterAuthStatelessSession({ mapSession })` **globally** — `addHTTPMiddleware('*', [...])` or `addGlobalMiddleware([...])`. The CLI sees the global registration and skips emitting `auth-middleware.gen.ts` (pikkujs/pikku#754), so you keep cookieCache's lean bundles *and* your custom fields.
109
+ - **Stateful (cookieCache off):** register `betterAuthSession({ mapSession, impersonation })` **globally**. The CLI detects it (`hasUserSessionMiddleware`) and omits its own `addHTTPMiddleware('*', [betterAuthSession()])` from `auth.gen.ts` — so there's exactly one session bridge in the chain, yours.
110
+
111
+ In both cases a **route-scoped** registration (`addHTTPMiddleware('/some/path', [...])`) does NOT count — only a global one suppresses the generated default. The generated middleware in a `.gen.ts` file is also ignored by the detector, so regeneration never self-suppresses.
107
112
 
108
113
  ### 2. Production database adapter
109
114