@magidoc/plugin-starter-variables
Advanced tools
Comparing version 0.13.4 to 0.14.0
@@ -9,2 +9,3 @@ export declare type Page = { | ||
SITE_ROOT: import("./variable").Variable<string>; | ||
SITE_META: import("./variable").Variable<Record<string, string | undefined>>; | ||
QUERY_GENERATION_FACTORIES: import("./variable").Variable<Record<string, string | number | boolean | Record<string, unknown> | null | undefined>>; | ||
@@ -11,0 +12,0 @@ PAGES: import("./variable").Variable<(Page | undefined)[]>; |
@@ -10,2 +10,3 @@ import { stringConverter } from './converters/string.js'; | ||
SITE_ROOT: createVariable('SITE_ROOT', stringConverter()), | ||
SITE_META: createVariable('SITE_META', recordConverter((zod) => zod.string())), | ||
QUERY_GENERATION_FACTORIES: createVariable('QUERY_GENERATION_FACTORIES', recordConverter((zod) => zod.union([ | ||
@@ -12,0 +13,0 @@ zod.string(), |
@@ -5,3 +5,3 @@ { | ||
"private": false, | ||
"version": "0.13.4", | ||
"version": "0.14.0", | ||
"type": "module", | ||
@@ -8,0 +8,0 @@ "license": "MIT", |
@@ -14,2 +14,6 @@ import type { ZodType } from 'zod' | ||
SITE_ROOT: createVariable<string>('SITE_ROOT', stringConverter()), | ||
SITE_META: createVariable<Record<string, string | undefined>>( | ||
'SITE_META', | ||
recordConverter((zod) => zod.string()), | ||
), | ||
QUERY_GENERATION_FACTORIES: createVariable< | ||
@@ -16,0 +20,0 @@ Record< |
@@ -18,2 +18,3 @@ import type { ZodType } from 'zod' | ||
'SITE_ROOT', | ||
'SITE_META', | ||
'QUERY_GENERATION_FACTORIES', | ||
@@ -48,2 +49,10 @@ 'PAGES', | ||
test('site meta', () => { | ||
testRecordVariable( | ||
variables.templates.SITE_META, | ||
'VITE_SITE_META', | ||
z.record(z.string().optional()).optional(), | ||
) | ||
}) | ||
test('query generation factories', () => { | ||
@@ -50,0 +59,0 @@ testRecordVariable( |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
29433
687