@pyreon/zero 0.12.1 → 0.12.2

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 (42) hide show
  1. package/lib/index.js +1476 -82
  2. package/lib/index.js.map +1 -1
  3. package/lib/types/adapters/cloudflare.d.ts +26 -0
  4. package/lib/types/adapters/cloudflare.d.ts.map +1 -0
  5. package/lib/types/adapters/index.d.ts +3 -0
  6. package/lib/types/adapters/index.d.ts.map +1 -1
  7. package/lib/types/adapters/netlify.d.ts +21 -0
  8. package/lib/types/adapters/netlify.d.ts.map +1 -0
  9. package/lib/types/adapters/vercel.d.ts +21 -0
  10. package/lib/types/adapters/vercel.d.ts.map +1 -0
  11. package/lib/types/ai.d.ts +182 -0
  12. package/lib/types/ai.d.ts.map +1 -0
  13. package/lib/types/csp.d.ts +107 -0
  14. package/lib/types/csp.d.ts.map +1 -0
  15. package/lib/types/env.d.ts +118 -0
  16. package/lib/types/env.d.ts.map +1 -0
  17. package/lib/types/favicon.d.ts +42 -0
  18. package/lib/types/favicon.d.ts.map +1 -1
  19. package/lib/types/index.d.ts +13 -3
  20. package/lib/types/index.d.ts.map +1 -1
  21. package/lib/types/logger.d.ts +68 -0
  22. package/lib/types/logger.d.ts.map +1 -0
  23. package/lib/types/meta.d.ts +36 -0
  24. package/lib/types/meta.d.ts.map +1 -1
  25. package/lib/types/og-image.d.ts +107 -0
  26. package/lib/types/og-image.d.ts.map +1 -0
  27. package/lib/types/types.d.ts +1 -1
  28. package/lib/types/types.d.ts.map +1 -1
  29. package/package.json +35 -10
  30. package/src/adapters/cloudflare.ts +82 -0
  31. package/src/adapters/index.ts +13 -1
  32. package/src/adapters/netlify.ts +84 -0
  33. package/src/adapters/vercel.ts +84 -0
  34. package/src/ai.ts +623 -0
  35. package/src/csp.ts +207 -0
  36. package/src/env.ts +344 -0
  37. package/src/favicon.ts +221 -80
  38. package/src/index.ts +41 -2
  39. package/src/logger.ts +144 -0
  40. package/src/meta.tsx +84 -2
  41. package/src/og-image.ts +378 -0
  42. package/src/types.ts +1 -1
@@ -0,0 +1,26 @@
1
+ import type { Adapter } from '../types';
2
+ /**
3
+ * Cloudflare Pages adapter — generates output for Cloudflare Pages with Functions.
4
+ *
5
+ * Produces:
6
+ * - Client assets in the output directory root (served as static)
7
+ * - `_worker.js` — Cloudflare Pages Function for SSR
8
+ *
9
+ * Note: Cloudflare Pages Functions have a ~1MB module size limit.
10
+ * For large apps, configure Vite's SSR build to bundle server code:
11
+ * `ssr: { noExternal: true }` in vite.config.ts.
12
+ *
13
+ * Deploy with: `npx wrangler pages deploy ./dist`
14
+ *
15
+ * @example
16
+ * ```ts
17
+ * // zero.config.ts
18
+ * import { defineConfig } from "@pyreon/zero"
19
+ *
20
+ * export default defineConfig({
21
+ * adapter: "cloudflare",
22
+ * })
23
+ * ```
24
+ */
25
+ export declare function cloudflareAdapter(): Adapter;
26
+ //# sourceMappingURL=cloudflare.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cloudflare.d.ts","sourceRoot":"","sources":["../../../src/adapters/cloudflare.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAuB,MAAM,UAAU,CAAA;AAE5D;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,CAwD3C"}
@@ -1,6 +1,9 @@
1
1
  export { bunAdapter } from './bun';
2
+ export { cloudflareAdapter } from './cloudflare';
3
+ export { netlifyAdapter } from './netlify';
2
4
  export { nodeAdapter } from './node';
3
5
  export { staticAdapter } from './static';
6
+ export { vercelAdapter } from './vercel';
4
7
  import type { Adapter, ZeroConfig } from '../types';
5
8
  /**
6
9
  * Resolve the adapter from config.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/adapters/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAKnD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAa1D"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/adapters/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAA;AACpC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAA;AAQnD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,UAAU,GAAG,OAAO,CAmB1D"}
@@ -0,0 +1,21 @@
1
+ import type { Adapter } from '../types';
2
+ /**
3
+ * Netlify adapter — generates output for Netlify Functions (v2).
4
+ *
5
+ * Produces:
6
+ * - Client assets in `publish/` directory
7
+ * - `netlify/functions/ssr.mjs` — Netlify Function for SSR
8
+ * - `netlify.toml` — routing configuration
9
+ *
10
+ * @example
11
+ * ```ts
12
+ * // zero.config.ts
13
+ * import { defineConfig } from "@pyreon/zero"
14
+ *
15
+ * export default defineConfig({
16
+ * adapter: "netlify",
17
+ * })
18
+ * ```
19
+ */
20
+ export declare function netlifyAdapter(): Adapter;
21
+ //# sourceMappingURL=netlify.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"netlify.d.ts","sourceRoot":"","sources":["../../../src/adapters/netlify.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAuB,MAAM,UAAU,CAAA;AAE5D;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,cAAc,IAAI,OAAO,CA+DxC"}
@@ -0,0 +1,21 @@
1
+ import type { Adapter } from '../types';
2
+ /**
3
+ * Vercel adapter — generates output for Vercel's Build Output API v3.
4
+ *
5
+ * Produces a `.vercel/output` directory with:
6
+ * - `static/` — client-side assets (JS, CSS, images)
7
+ * - `functions/ssr.func/` — serverless function for SSR
8
+ * - `config.json` — routing configuration
9
+ *
10
+ * @example
11
+ * ```ts
12
+ * // zero.config.ts
13
+ * import { defineConfig } from "@pyreon/zero"
14
+ *
15
+ * export default defineConfig({
16
+ * adapter: "vercel",
17
+ * })
18
+ * ```
19
+ */
20
+ export declare function vercelAdapter(): Adapter;
21
+ //# sourceMappingURL=vercel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vercel.d.ts","sourceRoot":"","sources":["../../../src/adapters/vercel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAuB,MAAM,UAAU,CAAA;AAE5D;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,aAAa,IAAI,OAAO,CA+DvC"}
@@ -0,0 +1,182 @@
1
+ /**
2
+ * AI integration utilities for Zero.
3
+ *
4
+ * - llms.txt auto-generation from routes and API routes
5
+ * - JSON-LD auto-inference from route meta + Meta props
6
+ * - AI plugin manifest (/.well-known/ai-plugin.json) from API routes
7
+ *
8
+ * @example
9
+ * ```ts
10
+ * // vite.config.ts
11
+ * import { aiPlugin } from "@pyreon/zero/ai"
12
+ *
13
+ * export default {
14
+ * plugins: [
15
+ * aiPlugin({
16
+ * name: "My App",
17
+ * origin: "https://example.com",
18
+ * description: "A modern web application",
19
+ * }),
20
+ * ],
21
+ * }
22
+ * ```
23
+ */
24
+ import type { Plugin } from 'vite';
25
+ export interface AiPluginConfig {
26
+ /** App/API name. */
27
+ name: string;
28
+ /** App description for AI agents. */
29
+ description: string;
30
+ /** Base URL. e.g. "https://example.com" */
31
+ origin: string;
32
+ /** Contact email (required by OpenAI plugin spec). */
33
+ contactEmail?: string;
34
+ /** Legal info URL. */
35
+ legalUrl?: string;
36
+ /** Logo URL for the plugin. */
37
+ logoUrl?: string;
38
+ /** Routes directory relative to project root. Default: "src/routes" */
39
+ routesDir?: string;
40
+ /** API routes directory relative to project root. Default: "src/api" */
41
+ apiDir?: string;
42
+ /**
43
+ * API route descriptions — map of pattern to description.
44
+ * Used for llms.txt and ai-plugin.json.
45
+ *
46
+ * @example
47
+ * ```ts
48
+ * apiDescriptions: {
49
+ * "GET /api/posts": "List all blog posts, supports ?page=N&limit=N",
50
+ * "GET /api/posts/:id": "Get a single post by ID",
51
+ * "POST /api/posts": "Create a new post (requires auth)",
52
+ * }
53
+ * ```
54
+ */
55
+ apiDescriptions?: Record<string, string>;
56
+ /**
57
+ * Page descriptions — map of URL path to description.
58
+ * Used for llms.txt. Falls back to route meta.title/description.
59
+ */
60
+ pageDescriptions?: Record<string, string>;
61
+ /**
62
+ * Additional content to append to llms.txt.
63
+ * Useful for authentication instructions, rate limits, etc.
64
+ */
65
+ llmsExtra?: string;
66
+ }
67
+ /**
68
+ * Generate llms.txt content from route files and config.
69
+ *
70
+ * Format follows the llms.txt proposal:
71
+ * ```
72
+ * # {name}
73
+ * > {description}
74
+ *
75
+ * ## Pages
76
+ * - [/about](/about): About page
77
+ *
78
+ * ## API
79
+ * - GET /api/posts: List posts
80
+ * ```
81
+ *
82
+ * @internal Exported for testing.
83
+ */
84
+ export declare function generateLlmsTxt(routeFiles: string[], apiFiles: string[], config: AiPluginConfig): string;
85
+ /**
86
+ * Generate llms-full.txt — expanded version with more detail.
87
+ * Includes all route metadata and API descriptions.
88
+ *
89
+ * @internal Exported for testing.
90
+ */
91
+ export declare function generateLlmsFullTxt(routeFiles: string[], apiFiles: string[], config: AiPluginConfig): string;
92
+ export interface InferJsonLdOptions {
93
+ /** Page URL. */
94
+ url: string;
95
+ /** Page title. */
96
+ title?: string;
97
+ /** Page description. */
98
+ description?: string;
99
+ /** Page image. */
100
+ image?: string;
101
+ /** Site name. */
102
+ siteName?: string;
103
+ /** Page type hint. */
104
+ type?: 'website' | 'article' | 'product' | 'profile';
105
+ /** Article metadata. */
106
+ publishedTime?: string;
107
+ /** Article author. */
108
+ author?: string;
109
+ /** Article tags. */
110
+ tags?: string[];
111
+ /** Breadcrumb path segments. */
112
+ breadcrumbs?: Array<{
113
+ name: string;
114
+ url: string;
115
+ }>;
116
+ }
117
+ /**
118
+ * Auto-infer JSON-LD structured data from page metadata.
119
+ *
120
+ * Returns an array of JSON-LD objects (multiple schemas can apply to one page).
121
+ * For example, an article page gets both `Article` and `BreadcrumbList`.
122
+ *
123
+ * @example
124
+ * ```tsx
125
+ * const schemas = inferJsonLd({
126
+ * url: "https://example.com/blog/my-post",
127
+ * title: "My Post",
128
+ * description: "A great article",
129
+ * type: "article",
130
+ * author: "Vit Bokisch",
131
+ * publishedTime: "2026-03-31",
132
+ * })
133
+ * // → [Article schema, BreadcrumbList schema]
134
+ * ```
135
+ */
136
+ export declare function inferJsonLd(options: InferJsonLdOptions): Record<string, unknown>[];
137
+ /**
138
+ * Generate an OpenAI-compatible AI plugin manifest.
139
+ *
140
+ * Follows the /.well-known/ai-plugin.json spec.
141
+ *
142
+ * @internal Exported for testing.
143
+ */
144
+ export declare function generateAiPluginManifest(config: AiPluginConfig): Record<string, unknown>;
145
+ /**
146
+ * Generate a minimal OpenAPI 3.0 spec from API route descriptions.
147
+ *
148
+ * @internal Exported for testing.
149
+ */
150
+ export declare function generateOpenApiSpec(apiFiles: string[], config: AiPluginConfig): Record<string, unknown>;
151
+ /**
152
+ * AI integration Vite plugin.
153
+ *
154
+ * Generates at build time:
155
+ * - `/llms.txt` — concise site summary for AI agents
156
+ * - `/llms-full.txt` — detailed reference for AI agents
157
+ * - `/.well-known/ai-plugin.json` — OpenAI plugin manifest
158
+ * - `/.well-known/openapi.yaml` — minimal OpenAPI spec from API routes
159
+ *
160
+ * In dev, serves these files via middleware.
161
+ *
162
+ * @example
163
+ * ```ts
164
+ * import { aiPlugin } from "@pyreon/zero/ai"
165
+ *
166
+ * export default {
167
+ * plugins: [
168
+ * aiPlugin({
169
+ * name: "My App",
170
+ * origin: "https://example.com",
171
+ * description: "A modern web application",
172
+ * apiDescriptions: {
173
+ * "GET /api/posts": "List blog posts",
174
+ * "GET /api/posts/:id": "Get post by ID",
175
+ * },
176
+ * }),
177
+ * ],
178
+ * }
179
+ * ```
180
+ */
181
+ export declare function aiPlugin(config: AiPluginConfig): Plugin;
182
+ //# sourceMappingURL=ai.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai.d.ts","sourceRoot":"","sources":["../../src/ai.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAKlC,MAAM,WAAW,cAAc;IAC7B,oBAAoB;IACpB,IAAI,EAAE,MAAM,CAAA;IACZ,qCAAqC;IACrC,WAAW,EAAE,MAAM,CAAA;IACnB,2CAA2C;IAC3C,MAAM,EAAE,MAAM,CAAA;IACd,sDAAsD;IACtD,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,sBAAsB;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,+BAA+B;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,uEAAuE;IACvE,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,wEAAwE;IACxE,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;;;;;;;;;;;OAYG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACxC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACzC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAID;;;;;;;;;;;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AM,EAAE,EAClB,MAAM,EAAE,cAAc,GACrB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CA4CzB;AAID;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,QAAQ,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM,CA0FvD"}
@@ -0,0 +1,107 @@
1
+ /**
2
+ * Content Security Policy middleware.
3
+ *
4
+ * Generates a CSP header from a typed configuration object.
5
+ * Supports all CSP directives, nonces for inline scripts,
6
+ * and report-only mode for testing.
7
+ *
8
+ * @example
9
+ * ```ts
10
+ * import { cspMiddleware } from "@pyreon/zero"
11
+ *
12
+ * const csp = cspMiddleware({
13
+ * directives: {
14
+ * defaultSrc: ["'self'"],
15
+ * scriptSrc: ["'self'", "'nonce'"],
16
+ * styleSrc: ["'self'", "'unsafe-inline'"],
17
+ * imgSrc: ["'self'", "data:", "https:"],
18
+ * connectSrc: ["'self'", "https://api.example.com"],
19
+ * },
20
+ * reportOnly: false,
21
+ * })
22
+ * ```
23
+ */
24
+ import type { Middleware } from '@pyreon/server';
25
+ /**
26
+ * Read the current CSP nonce in a component.
27
+ *
28
+ * SSR: reads from per-request `ctx.locals.cspNonce` via Pyreon's context
29
+ * system — fully isolated between concurrent requests via AsyncLocalStorage.
30
+ * Client/dev: falls back to module-level variable set by middleware.
31
+ *
32
+ * @example
33
+ * ```tsx
34
+ * import { useNonce } from "@pyreon/zero/csp"
35
+ *
36
+ * function InlineScript() {
37
+ * const nonce = useNonce()
38
+ * return <script nonce={nonce}>console.log("safe")</script>
39
+ * }
40
+ * ```
41
+ */
42
+ export declare function useNonce(): string;
43
+ export interface CspDirectives {
44
+ defaultSrc?: string[];
45
+ scriptSrc?: string[];
46
+ styleSrc?: string[];
47
+ imgSrc?: string[];
48
+ fontSrc?: string[];
49
+ connectSrc?: string[];
50
+ mediaSrc?: string[];
51
+ objectSrc?: string[];
52
+ frameSrc?: string[];
53
+ childSrc?: string[];
54
+ workerSrc?: string[];
55
+ frameAncestors?: string[];
56
+ formAction?: string[];
57
+ baseUri?: string[];
58
+ manifestSrc?: string[];
59
+ /** Reporting endpoint URL. */
60
+ reportUri?: string;
61
+ /** Reporting endpoint name (CSP Level 3). */
62
+ reportTo?: string;
63
+ /** Upgrade insecure requests. */
64
+ upgradeInsecureRequests?: boolean;
65
+ /** Block all mixed content. */
66
+ blockAllMixedContent?: boolean;
67
+ }
68
+ export interface CspConfig {
69
+ /** CSP directives. */
70
+ directives: CspDirectives;
71
+ /**
72
+ * Report-only mode — logs violations without blocking.
73
+ * Uses Content-Security-Policy-Report-Only header instead.
74
+ * Default: false
75
+ */
76
+ reportOnly?: boolean;
77
+ }
78
+ /**
79
+ * Build a CSP header string from directives.
80
+ * Exported for testing.
81
+ */
82
+ export declare function buildCspHeader(directives: CspDirectives, nonce?: string): string;
83
+ /**
84
+ * CSP middleware — sets Content-Security-Policy header.
85
+ *
86
+ * When directives contain `"'nonce'"`, a fresh nonce is generated per-request
87
+ * and attached to `ctx.locals.cspNonce` for use in inline script tags.
88
+ *
89
+ * @example
90
+ * ```ts
91
+ * // Apply to all routes
92
+ * export default defineConfig({
93
+ * middleware: [
94
+ * cspMiddleware({
95
+ * directives: {
96
+ * defaultSrc: ["'self'"],
97
+ * scriptSrc: ["'self'", "'nonce'"],
98
+ * styleSrc: ["'self'", "'unsafe-inline'"],
99
+ * imgSrc: ["'self'", "data:", "https:"],
100
+ * },
101
+ * }),
102
+ * ],
103
+ * })
104
+ * ```
105
+ */
106
+ export declare function cspMiddleware(config: CspConfig): Middleware;
107
+ //# sourceMappingURL=csp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"csp.d.ts","sourceRoot":"","sources":["../../src/csp.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,KAAK,EAAE,UAAU,EAAqB,MAAM,gBAAgB,CAAA;AAMnE;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,QAAQ,IAAI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
@@ -0,0 +1,118 @@
1
+ /**
2
+ * Environment variable validation.
3
+ *
4
+ * Infers types from default values — no verbose validator imports needed.
5
+ * Explicit validators (`url()`, `oneOf()`) available for special cases.
6
+ *
7
+ * @example
8
+ * ```ts
9
+ * import { validateEnv, url, oneOf } from "@pyreon/zero/env"
10
+ *
11
+ * const env = validateEnv({
12
+ * PORT: 3000, // number, default 3000
13
+ * DEBUG: false, // boolean, default false
14
+ * HOST: "localhost", // string, default "localhost"
15
+ * DATABASE_URL: url(), // validated URL, required
16
+ * NODE_ENV: oneOf(["development", "production", "test"]),
17
+ * API_KEY: String, // required string, no default
18
+ * MAX_RETRIES: Number, // required number, no default
19
+ * })
20
+ * ```
21
+ */
22
+ export interface EnvValidatorOptions<T = string> {
23
+ /** Whether this variable is required. Default: true */
24
+ required?: boolean;
25
+ /** Default value when not set. Makes the variable optional. */
26
+ default?: T;
27
+ /** Human-readable description for error messages. */
28
+ description?: string;
29
+ }
30
+ export interface EnvValidator<T> {
31
+ __type: 'env-validator';
32
+ parse: (raw: string | undefined, key: string) => T;
33
+ required: boolean;
34
+ defaultValue?: T | undefined;
35
+ }
36
+ /**
37
+ * String validator — accepts any non-empty string.
38
+ */
39
+ export declare function str(options?: EnvValidatorOptions<string>): EnvValidator<string>;
40
+ /**
41
+ * Number validator — parses to a number, rejects NaN.
42
+ */
43
+ export declare function num(options?: EnvValidatorOptions<number>): EnvValidator<number>;
44
+ /**
45
+ * Boolean validator — accepts "true"/"1" as true, "false"/"0" as false.
46
+ */
47
+ export declare function bool(options?: EnvValidatorOptions<boolean>): EnvValidator<boolean>;
48
+ /**
49
+ * URL validator — validates that the value is a valid URL.
50
+ */
51
+ export declare function url(options?: EnvValidatorOptions<string>): EnvValidator<string>;
52
+ /**
53
+ * Enum validator — value must be one of the allowed values.
54
+ */
55
+ export declare function oneOf<T extends string>(values: readonly T[], options?: EnvValidatorOptions<T>): EnvValidator<T>;
56
+ /** Schema entry: plain value, constructor, or explicit validator. */
57
+ type SchemaEntry = string | number | boolean | StringConstructor | NumberConstructor | BooleanConstructor | EnvValidator<any>;
58
+ /** Infer the output type from a schema entry. */
59
+ type InferEntry<T> = T extends EnvValidator<infer V> ? V : T extends StringConstructor ? string : T extends NumberConstructor ? number : T extends BooleanConstructor ? boolean : T extends string ? string : T extends number ? number : T extends boolean ? boolean : never;
60
+ type InferEnvSchema<T> = {
61
+ [K in keyof T]: InferEntry<T[K]>;
62
+ };
63
+ /**
64
+ * Validate environment variables.
65
+ *
66
+ * Schema values can be:
67
+ * - **Default values**: `3000`, `false`, `"localhost"` → type inferred, used as default
68
+ * - **Constructors**: `String`, `Number`, `Boolean` → required, no default
69
+ * - **Validators**: `url()`, `oneOf([...])`, `str()`, `num()`, `bool()` → explicit validation
70
+ * - **Custom**: `schema(raw => z.coerce.number().parse(raw))` — bridge to any schema library
71
+ *
72
+ * @example
73
+ * ```ts
74
+ * import { validateEnv, url, oneOf } from "@pyreon/zero/env"
75
+ *
76
+ * const env = validateEnv({
77
+ * PORT: 3000, // optional, default 3000
78
+ * DATABASE_URL: url(), // required, validated URL
79
+ * NODE_ENV: oneOf(["dev", "prod", "test"]), // required, must be one of
80
+ * API_KEY: String, // required string
81
+ * DEBUG: false, // optional, default false
82
+ * })
83
+ * ```
84
+ */
85
+ export declare function validateEnv<T extends Record<string, SchemaEntry>>(schema: T, source?: Record<string, string | undefined>): InferEnvSchema<T>;
86
+ /**
87
+ * Extract public environment variables (prefixed with `ZERO_PUBLIC_`).
88
+ *
89
+ * @example
90
+ * ```ts
91
+ * const pub = publicEnv()
92
+ * // → { API_URL: "https://...", APP_NAME: "MyApp" }
93
+ *
94
+ * const pub = publicEnv({ API_URL: url(), APP_NAME: "Default" })
95
+ * // → validated against ZERO_PUBLIC_API_URL, ZERO_PUBLIC_APP_NAME
96
+ * ```
97
+ */
98
+ export declare function publicEnv(): Record<string, string>;
99
+ export declare function publicEnv<T extends Record<string, SchemaEntry>>(schema: T): InferEnvSchema<T>;
100
+ /**
101
+ * Create an env validator from a custom parse function.
102
+ * Use this to integrate any schema library (Zod, Valibot, ArkType, etc.).
103
+ *
104
+ * @example
105
+ * ```ts
106
+ * import { z } from "zod"
107
+ * import { validateEnv, schema } from "@pyreon/zero/env"
108
+ *
109
+ * const env = validateEnv({
110
+ * PORT: schema(raw => z.coerce.number().parse(raw)),
111
+ * DATABASE_URL: schema(raw => z.string().url().parse(raw)),
112
+ * HOST: "localhost", // plain defaults still work alongside
113
+ * })
114
+ * ```
115
+ */
116
+ export declare function schema<T>(parse: (raw: string) => T): EnvValidator<T>;
117
+ export {};
118
+ //# sourceMappingURL=env.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../src/env.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,MAAM,WAAW,mBAAmB,CAAC,CAAC,GAAG,MAAM;IAC7C,uDAAuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,+DAA+D;IAC/D,OAAO,CAAC,EAAE,CAAC,CAAA;IACX,qDAAqD;IACrD,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,MAAM,WAAW,YAAY,CAAC,CAAC;IAC7B,MAAM,EAAE,eAAe,CAAA;IACvB,KAAK,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC,CAAA;IAClD,QAAQ,EAAE,OAAO,CAAA;IACjB,YAAY,CAAC,EAAE,CAAC,GAAG,SAAS,CAAA;CAC7B;AAID;;GAEG;AACH,wBAAgB,GAAG,CAAC,OAAO,CAAC,EAAE,mBAAmB,CAAC,MAAM,CAAC,GAAG,YAAY,CAAC,MAAM,CAAC,CAc/E;AAED;;GAEG;AACH,wBAAgB,GAAG,CAAC,OAAO,CAAC,EAAE,mBAAmB,CAAC,MAAM,CAAC,GAAG,YAAY,CAAC,MAAM,CAAC,CAkB/E;AAED;;GAEG;AACH,wBAAgB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C,cAAc,CAAC,CAAC,CAAC,CAqBnB;AAID;;;;;;;;;;;GAWG;AACH,wBAAgB,SAAS,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AACnD,wBAAgB,SAAS,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAA;AAwB9F;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC,CAiBpE"}
@@ -1,4 +1,10 @@
1
1
  import type { Plugin } from 'vite';
2
+ export interface FaviconLocaleConfig {
3
+ /** Locale-specific source icon (SVG or PNG). */
4
+ source: string;
5
+ /** Optional dark mode variant for this locale. */
6
+ darkSource?: string;
7
+ }
2
8
  export interface FaviconPluginConfig {
3
9
  /** Path to the source icon (SVG or PNG, at least 512x512 for PNG). */
4
10
  source: string;
@@ -16,6 +22,26 @@ export interface FaviconPluginConfig {
16
22
  * to switch between light and dark variants.
17
23
  */
18
24
  darkSource?: string;
25
+ /**
26
+ * Locale-specific icon overrides. Each key is a locale code,
27
+ * value is a source icon (and optional dark variant).
28
+ * Locales not in this map use the base `source`.
29
+ *
30
+ * Generated files are placed under `/{locale}/` prefix:
31
+ * /de/favicon.svg, /de/favicon-32x32.png, etc.
32
+ *
33
+ * @example
34
+ * ```ts
35
+ * faviconPlugin({
36
+ * source: "./icon.svg",
37
+ * locales: {
38
+ * de: { source: "./icon-de.svg" },
39
+ * cs: { source: "./icon-cs.svg" },
40
+ * },
41
+ * })
42
+ * ```
43
+ */
44
+ locales?: Record<string, FaviconLocaleConfig>;
19
45
  }
20
46
  /**
21
47
  * Favicon generation Vite plugin.
@@ -34,6 +60,22 @@ export interface FaviconPluginConfig {
34
60
  * ```
35
61
  */
36
62
  export declare function faviconPlugin(config: FaviconPluginConfig): Plugin;
63
+ /**
64
+ * Get favicon link tags for a specific locale.
65
+ * Returns link objects suitable for `useHead()` or direct HTML injection.
66
+ *
67
+ * @example
68
+ * ```ts
69
+ * const links = faviconLinks("de", { source: "./icon.svg", locales: { de: { source: "./icon-de.svg" } } })
70
+ * // → [{ rel: "icon", type: "image/svg+xml", href: "/de/favicon.svg" }, ...]
71
+ * ```
72
+ */
73
+ export declare function faviconLinks(locale: string | undefined, config: FaviconPluginConfig): Array<{
74
+ rel: string;
75
+ type?: string;
76
+ sizes?: string;
77
+ href: string;
78
+ }>;
37
79
  export interface IcoEntry {
38
80
  buffer: Buffer;
39
81
  size: number;
@@ -1 +1 @@
1
- {"version":3,"file":"favicon.d.ts","sourceRoot":"","sources":["../../src/favicon.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AA0BlC,MAAM,WAAW,mBAAmB;IAClC,sEAAsE;IACtE,MAAM,EAAE,MAAM,CAAA;IACd,uDAAuD;IACvD,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,4DAA4D;IAC5D,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,oEAAoE;IACpE,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAeD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,mBAAmB,GAAG,MAAM,CAgNjE;AAuDD,MAAM,WAAW,QAAQ;IACvB,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;CACb;AAED,qCAAqC;AACrC,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,QAAQ,EAAE,GAAG,UAAU,CAiCjE"}
1
+ {"version":3,"file":"favicon.d.ts","sourceRoot":"","sources":["../../src/favicon.ts"],"names":[],"mappings":"AAG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ath, generateMiddlewareModule, generateRouteModule, parseFileRoutes, scanRouteFiles, } from './fs-router';
8
8
  export { defineConfig, resolveConfig } from "./config";
9
9
  export { createISRHandler } from "./isr";
10
- export { bunAdapter, nodeAdapter, resolveAdapter, staticAdapter, } from "./adapters";
10
+ export { bunAdapter, cloudflareAdapter, netlifyAdapter, nodeAdapter, resolveAdapter, staticAdapter, vercelAdapter, } from "./adapters";
11
11
  export type { ImageProps, ImageSource } from "./image";
12
12
  export { Image } from "./image";
13
13
  export type { LinkProps, LinkRenderProps, UseLinkReturn } from "./link";
@@ -36,11 +36,21 @@ export type { CompressionConfig } from "./compression";
36
36
  export { compressionMiddleware, compressResponse, isCompressible, } from "./compression";
37
37
  export type { Action, ActionContext, ActionHandler } from "./actions";
38
38
  export { createActionMiddleware, defineAction } from "./actions";
39
- export type { FaviconPluginConfig } from "./favicon";
40
- export { faviconPlugin } from "./favicon";
39
+ export type { FaviconLocaleConfig, FaviconPluginConfig } from "./favicon";
40
+ export { faviconLinks, faviconPlugin } from "./favicon";
41
+ export type { OgImageLayer, OgImagePluginConfig, OgImageTemplate, } from "./og-image";
42
+ export { ogImagePath, ogImagePlugin } from "./og-image";
41
43
  export type { MetaProps } from "./meta";
42
44
  export { buildMetaTags, Meta } from "./meta";
43
45
  export type { I18nRoutingConfig, LocaleContext } from "./i18n-routing";
44
46
  export { buildLocalePath, createLocaleContext, detectLocaleFromHeader, extractLocaleFromPath, i18nRouting, setLocale, useLocale, } from "./i18n-routing";
47
+ export type { CspConfig, CspDirectives } from "./csp";
48
+ export { buildCspHeader, cspMiddleware, useNonce } from "./csp";
49
+ export type { LogEntry, LoggerConfig } from "./logger";
50
+ export { loggerMiddleware } from "./logger";
51
+ export type { EnvValidator } from "./env";
52
+ export { bool, num, oneOf, publicEnv, schema, str, url, validateEnv } from "./env";
53
+ export type { AiPluginConfig, InferJsonLdOptions } from "./ai";
54
+ export { aiPlugin, generateAiPluginManifest, generateLlmsFullTxt, generateLlmsTxt, generateOpenApiSpec, inferJsonLd, } from "./ai";
45
55
  export type { Adapter, AdapterBuildOptions, FileRoute, ISRConfig, LoaderContext, RenderMode, RouteMeta, RouteMiddlewareEntry, RouteModule, ZeroConfig, } from "./types";
46
56
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,YAAY,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,YAAY,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAI9C,OAAO,EAAE,UAAU,IAAI,OAAO,EAAE,MAAM,eAAe,CAAC;AAItD,YAAY,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAA;AAC7D,OAAO,EACN,iBAAiB,EACjB,wBAAwB,EACxB,mBAAmB,EACnB,eAAe,EACf,cAAc,GACd,MAAM,aAAa,CAAA;AAIpB,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAIvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAIzC,OAAO,EACN,UAAU,EACV,WAAW,EACX,cAAc,EACd,aAAa,GACb,MAAM,YAAY,CAAC;AAIpB,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,YAAY,EAAE,SAAS,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAClE,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;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