@jakubmazanec/template 2.0.0-next.7a1e391 → 2.0.0-unstable.6911d99
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.
package/dist/TemplateRender.js
CHANGED
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
* An object type representing the result of a template render.
|
|
3
|
-
*
|
|
4
|
-
* @typeParam A Type of Zod schema used to validate the custom template attributes.
|
|
5
|
-
* @typeParam D Type of Zod schema used to define the type of template data.
|
|
6
|
-
*/ export { };
|
|
1
|
+
export { };
|
|
7
2
|
|
|
8
3
|
//# sourceMappingURL=TemplateRender.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/TemplateRender.ts"],"sourcesContent":["import {type z} from 'zod';\n\nimport {type TemplateAttributes} from './TemplateAttributes.js';\n\n/**\n * An object type representing the result of a template render.\n *\n * @typeParam A Type of Zod schema used to validate the custom template attributes.\n * @typeParam D Type of Zod schema used to define the type of template data.\n */\nexport type TemplateRender<\n A extends z.AnyZodObject | undefined = undefined,\n D extends z.AnyZodObject | undefined = undefined,\n> = {\n /** Rendered template attributes. They created from the `to` and `variables` attributes, and from all of the custom template attributes.\n */\n attributes: A extends undefined\n ? Omit<TemplateAttributes, 'if'>\n : Omit<TemplateAttributes, 'if'> & z.infer<NonNullable<A>>;\n\n /** Data used to render the template. */\n data: D extends undefined ? null : z.infer<NonNullable<D>>;\n\n /** Rendered template content. */\n content: string;\n};\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/TemplateRender.ts"],"sourcesContent":["import {type z} from 'zod';\n\nimport {type TemplateAttributes} from './TemplateAttributes.js';\n\n/**\n * An object type representing the result of a template render.\n *\n * @typeParam A Type of Zod schema used to validate the custom template attributes.\n * @typeParam D Type of Zod schema used to define the type of template data.\n */\nexport type TemplateRender<\n A extends z.AnyZodObject | undefined = undefined,\n D extends z.AnyZodObject | undefined = undefined,\n> = {\n /** Rendered template attributes. They created from the `to` and `variables` attributes, and from all of the custom template attributes.\n */\n attributes: A extends undefined\n ? Omit<TemplateAttributes, 'if'>\n : Omit<TemplateAttributes, 'if'> & z.infer<NonNullable<A>>;\n\n /** Data used to render the template. */\n data: D extends undefined ? null : z.infer<NonNullable<D>>;\n\n /** Rendered template content. */\n content: string;\n};\n"],"names":[],"mappings":"AAAA,WAyBE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/TemplateRenders.ts"],"sourcesContent":["import {type z} from 'zod';\n\nimport {type TemplateRender} from './TemplateRender.js';\n\nexport type TemplateRenders<\n A extends z.AnyZodObject | undefined = undefined,\n D extends z.AnyZodObject | undefined = undefined,\n> = Array<TemplateRender<A, D>>;\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/TemplateRenders.ts"],"sourcesContent":["import {type z} from 'zod';\n\nimport {type TemplateRender} from './TemplateRender.js';\n\nexport type TemplateRenders<\n A extends z.AnyZodObject | undefined = undefined,\n D extends z.AnyZodObject | undefined = undefined,\n> = Array<TemplateRender<A, D>>;\n"],"names":[],"mappings":"AAAA,WAOgC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jakubmazanec/template",
|
|
3
|
-
"version": "2.0.0-
|
|
3
|
+
"version": "2.0.0-unstable.6911d99",
|
|
4
4
|
"description": "TypeScript-first library for working with templates using EJS and Zod.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"typecheck": "tsc --project tsconfig.typecheck.json"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@jakubmazanec/error": "3.0.0-
|
|
29
|
+
"@jakubmazanec/error": "3.0.0-unstable.6911d99",
|
|
30
30
|
"ejs": "^3.1.9",
|
|
31
31
|
"fs-extra": "^11.1.1",
|
|
32
32
|
"gray-matter": "^4.0.3",
|