@bemoje/template 1.1.0 → 1.1.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.
@@ -1,23 +0,0 @@
1
- import { TString, Static } from '@sinclair/typebox';
2
- import { TemplateStrategy } from '../interfaces/TemplateStrategy.cjs';
3
-
4
- /**
5
- * Template strategy for handling simple string templates.
6
- *
7
- * Provides pass-through behavior for string templates where the template
8
- * and rendered output are both plain strings. Useful for text-based templates
9
- * that don't require parsing or complex structure.
10
- */
11
- declare class StringTemplateStrategy implements TemplateStrategy<TString> {
12
- readonly templateSchema: TString;
13
- /**
14
- * Returns the template string as-is (pass-through).
15
- */
16
- templateToString(template: Static<TString>): string;
17
- /**
18
- * Returns the populated string as-is (pass-through).
19
- */
20
- render(populated: string): Static<TString>;
21
- }
22
-
23
- export { StringTemplateStrategy };
@@ -1,23 +0,0 @@
1
- import { TString, Static } from '@sinclair/typebox';
2
- import { TemplateStrategy } from '../interfaces/TemplateStrategy.js';
3
-
4
- /**
5
- * Template strategy for handling simple string templates.
6
- *
7
- * Provides pass-through behavior for string templates where the template
8
- * and rendered output are both plain strings. Useful for text-based templates
9
- * that don't require parsing or complex structure.
10
- */
11
- declare class StringTemplateStrategy implements TemplateStrategy<TString> {
12
- readonly templateSchema: TString;
13
- /**
14
- * Returns the template string as-is (pass-through).
15
- */
16
- templateToString(template: Static<TString>): string;
17
- /**
18
- * Returns the populated string as-is (pass-through).
19
- */
20
- render(populated: string): Static<TString>;
21
- }
22
-
23
- export { StringTemplateStrategy };
@@ -1,23 +0,0 @@
1
- import { __name } from '../chunk-SHUYVCID.js';
2
- import { Type } from '@sinclair/typebox';
3
-
4
- class StringTemplateStrategy {
5
- static {
6
- __name(this, "StringTemplateStrategy");
7
- }
8
- templateSchema = Type.String();
9
- /**
10
- * Returns the template string as-is (pass-through).
11
- */
12
- templateToString(template) {
13
- return template;
14
- }
15
- /**
16
- * Returns the populated string as-is (pass-through).
17
- */
18
- render(populated) {
19
- return populated;
20
- }
21
- }
22
-
23
- export { StringTemplateStrategy };
@@ -1,26 +0,0 @@
1
- 'use strict';
2
-
3
- var typebox = require('@sinclair/typebox');
4
-
5
- var __defProp = Object.defineProperty;
6
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
- class TextFileTemplateStrategy {
8
- static {
9
- __name(this, "TextFileTemplateStrategy");
10
- }
11
- templateSchema = typebox.Type.Array(typebox.Type.String());
12
- /**
13
- * Joins string array into newline-separated text.
14
- */
15
- templateToString(template) {
16
- return template.join("\n");
17
- }
18
- /**
19
- * Splits text content into string array by newlines.
20
- */
21
- render(populated) {
22
- return populated.split("\n");
23
- }
24
- }
25
-
26
- exports.TextFileTemplateStrategy = TextFileTemplateStrategy;
@@ -1,23 +0,0 @@
1
- import { TArray, TString, Static } from '@sinclair/typebox';
2
- import { TemplateStrategy } from '../interfaces/TemplateStrategy.cjs';
3
-
4
- /**
5
- * Template strategy for handling multi-line text file templates.
6
- *
7
- * Converts arrays of strings to newline-separated text and parses text files
8
- * back to string arrays by splitting on newlines. Ideal for processing
9
- * configuration files, scripts, or any line-based text content.
10
- */
11
- declare class TextFileTemplateStrategy implements TemplateStrategy<TArray<TString>> {
12
- readonly templateSchema: TArray<TString>;
13
- /**
14
- * Joins string array into newline-separated text.
15
- */
16
- templateToString(template: Static<TArray<TString>>): string;
17
- /**
18
- * Splits text content into string array by newlines.
19
- */
20
- render(populated: string): Static<TArray<TString>>;
21
- }
22
-
23
- export { TextFileTemplateStrategy };
@@ -1,23 +0,0 @@
1
- import { TArray, TString, Static } from '@sinclair/typebox';
2
- import { TemplateStrategy } from '../interfaces/TemplateStrategy.js';
3
-
4
- /**
5
- * Template strategy for handling multi-line text file templates.
6
- *
7
- * Converts arrays of strings to newline-separated text and parses text files
8
- * back to string arrays by splitting on newlines. Ideal for processing
9
- * configuration files, scripts, or any line-based text content.
10
- */
11
- declare class TextFileTemplateStrategy implements TemplateStrategy<TArray<TString>> {
12
- readonly templateSchema: TArray<TString>;
13
- /**
14
- * Joins string array into newline-separated text.
15
- */
16
- templateToString(template: Static<TArray<TString>>): string;
17
- /**
18
- * Splits text content into string array by newlines.
19
- */
20
- render(populated: string): Static<TArray<TString>>;
21
- }
22
-
23
- export { TextFileTemplateStrategy };
@@ -1,23 +0,0 @@
1
- import { __name } from '../chunk-SHUYVCID.js';
2
- import { Type } from '@sinclair/typebox';
3
-
4
- class TextFileTemplateStrategy {
5
- static {
6
- __name(this, "TextFileTemplateStrategy");
7
- }
8
- templateSchema = Type.Array(Type.String());
9
- /**
10
- * Joins string array into newline-separated text.
11
- */
12
- templateToString(template) {
13
- return template.join("\n");
14
- }
15
- /**
16
- * Splits text content into string array by newlines.
17
- */
18
- render(populated) {
19
- return populated.split("\n");
20
- }
21
- }
22
-
23
- export { TextFileTemplateStrategy };