{"version":3,"sources":["../src/schemas/index.ts","../src/schemas/settings.ts","../src/schemas/setup.ts","../src/examples/index.ts","../src/examples/step.ts","../src/hints.ts"],"sourcesContent":["import { zodToSchema } from '@walkeros/core/dev';\nimport { SettingsSchema } from './settings';\nimport { SetupSchema } from './setup';\n\nexport { SettingsSchema, type Settings } from './settings';\nexport { SetupSchema, type Setup } from './setup';\n\nexport const settings = zodToSchema(SettingsSchema);\nexport const setup = zodToSchema(SetupSchema);\n","import { z } from '@walkeros/core/dev';\n\nexport const SettingsSchema = z.object({\n  bucket: z.string().min(1).describe('S3 bucket name'),\n  endpoint: z\n    .string()\n    .url()\n    .describe(\n      'S3-compatible endpoint URL (like https://s3.eu-west-1.amazonaws.com)',\n    ),\n  accessKeyId: z.string().min(1).describe('S3 access key ID'),\n  secretAccessKey: z.string().min(1).describe('S3 secret access key'),\n  region: z.string().default('auto').describe('AWS region for SigV4 signing'),\n  prefix: z\n    .string()\n    .optional()\n    .describe('Key prefix prepended to all store keys for scoping'),\n});\n\nexport type Settings = z.infer<typeof SettingsSchema>;\n","import { z } from '@walkeros/core/dev';\n\nexport const SetupSchema = z\n  .object({\n    region: z\n      .string()\n      .default('eu-central-1')\n      .describe(\n        'Region the bucket is created in. Defaults to settings.region when concrete (not \"auto\"), otherwise eu-central-1.',\n      ),\n  })\n  .describe(\n    'Provisioning options for \"walkeros setup store.<id>\". Idempotent: only the bucket is created. Encryption, public-access block, versioning, lifecycle rules, and tags are not applied here (s3mini does not expose those operations); configure them once via the AWS Console or \"aws s3api\".',\n  );\n\nexport type Setup = z.infer<typeof SetupSchema>;\n","import type { Store } from '@walkeros/core';\n\n/** AWS S3 bucket for serving static files byte-exact (file mode) */\nexport const awsAssets: Store.Config = {\n  settings: {\n    bucket: 'my-assets',\n    endpoint: 'https://s3.eu-west-1.amazonaws.com',\n    accessKeyId: '$env.S3_ACCESS_KEY',\n    secretAccessKey: '$env.S3_SECRET_KEY',\n    region: 'eu-west-1',\n    prefix: 'public',\n  },\n  file: true,\n};\n\n/** S3 as a structured key-value store (default mode, stored as JSON) */\nexport const structuredKv: Store.Config = {\n  settings: {\n    bucket: 'my-state',\n    endpoint: 'https://s3.eu-west-1.amazonaws.com',\n    accessKeyId: '$env.S3_ACCESS_KEY',\n    secretAccessKey: '$env.S3_SECRET_KEY',\n    region: 'eu-west-1',\n  },\n};\n\n/** Cloudflare R2 bucket, no egress fees */\nexport const r2Bucket: Store.Config = {\n  settings: {\n    bucket: 'my-bucket',\n    endpoint: 'https://ACCOUNT_ID.r2.cloudflarestorage.com',\n    accessKeyId: '$env.R2_ACCESS_KEY',\n    secretAccessKey: '$env.R2_SECRET_KEY',\n  },\n  file: true,\n};\n\nexport * as step from './step';\n","import type { Flow } from '@walkeros/core';\n\n/** Read an object from an AWS S3 bucket (file mode, byte-exact). */\nexport const readAwsS3: Flow.StepExample = {\n  title: 'Read from S3',\n  description: 'Read object from S3 and receive its raw bytes byte-exact',\n  in: { operation: 'get', key: 'walker.js' },\n  out: [['get', 'walker.js', 'Bytes<(function(){...})()>']],\n};\n\n/** Key is scoped to the configured prefix subdirectory. */\nexport const prefixScoping: Flow.StepExample = {\n  title: 'Prefix scoping',\n  description:\n    'Key \"walker.js\" with prefix \"public/\" resolves to S3 path \"public/walker.js\"',\n  in: {\n    operation: 'get',\n    key: 'walker.js',\n    settings: { bucket: 'my-assets', prefix: 'public' },\n  },\n  out: [['get', 'public/walker.js', 'Bytes<...>']],\n};\n","import type { Hint } from '@walkeros/core';\n\nexport const hints: Hint.Hints = {\n  'file-mode': {\n    text: 'Default mode is structured: values are StoreValue data round-tripped through the shared core codec and stored with Content-Type application/json, good for session state, lookups, and cached responses. Set config.file: true to persist raw bytes byte-exact with the real mime derived from the key (set accepts Uint8Array or string), the mode for serving assets such as walker.js via the file transformer. One store instance is exactly one mode. Do not pair file: true with a cache; the cache wraps structured stores and flow_validate flags the combination.',\n  },\n};\n"],"mappings":";;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;A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