@memberjunction/templates-base-types 3.4.0 → 4.1.0
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/README.md +89 -188
- package/dist/TemplateEngineBase.js +2 -6
- package/dist/TemplateEngineBase.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -18
- package/dist/index.js.map +1 -1
- package/dist/types.js +1 -5
- package/dist/types.js.map +1 -1
- package/package.json +7 -6
package/README.md
CHANGED
|
@@ -1,15 +1,45 @@
|
|
|
1
1
|
# @memberjunction/templates-base-types
|
|
2
2
|
|
|
3
|
-
Base types and
|
|
3
|
+
Base types and metadata caching engine for MemberJunction's templating system. Provides cached access to template metadata and can be used on both client and server.
|
|
4
|
+
|
|
5
|
+
## Architecture
|
|
6
|
+
|
|
7
|
+
```mermaid
|
|
8
|
+
graph TD
|
|
9
|
+
subgraph "@memberjunction/templates-base-types"
|
|
10
|
+
A[TemplateEngineBase] --> B[Templates Cache]
|
|
11
|
+
A --> C[Template Contents]
|
|
12
|
+
A --> D[Template Params]
|
|
13
|
+
A --> E[Content Types]
|
|
14
|
+
A --> F[Categories]
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
subgraph "Loaded via Dataset"
|
|
18
|
+
G["Template_Metadata<br/>Dataset"]
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
G --> A
|
|
22
|
+
|
|
23
|
+
H["@memberjunction/templates<br/>(Server Engine)"] --> A
|
|
24
|
+
|
|
25
|
+
style A fill:#2d6a9f,stroke:#1a4971,color:#fff
|
|
26
|
+
style B fill:#2d8659,stroke:#1a5c3a,color:#fff
|
|
27
|
+
style C fill:#2d8659,stroke:#1a5c3a,color:#fff
|
|
28
|
+
style D fill:#2d8659,stroke:#1a5c3a,color:#fff
|
|
29
|
+
style E fill:#7c5295,stroke:#563a6b,color:#fff
|
|
30
|
+
style F fill:#7c5295,stroke:#563a6b,color:#fff
|
|
31
|
+
style H fill:#b8762f,stroke:#8a5722,color:#fff
|
|
32
|
+
```
|
|
4
33
|
|
|
5
34
|
## Overview
|
|
6
35
|
|
|
7
|
-
This package
|
|
36
|
+
This package provides the foundational layer for MemberJunction's templating system:
|
|
8
37
|
|
|
9
|
-
- **
|
|
10
|
-
- **
|
|
11
|
-
- **
|
|
12
|
-
- **Template
|
|
38
|
+
- **TemplateEngineBase**: Singleton engine that loads and caches all template metadata via the `Template_Metadata` dataset
|
|
39
|
+
- **TemplateRenderResult**: Standard result type for template rendering operations
|
|
40
|
+
- **Metadata Access**: Cached getters for templates, content types, categories, contents, and params
|
|
41
|
+
- **Template Lookup**: Convenience method for finding templates by name (case-insensitive)
|
|
42
|
+
- **Content Association**: Automatically associates template contents and params with their parent templates after loading
|
|
13
43
|
|
|
14
44
|
## Installation
|
|
15
45
|
|
|
@@ -17,72 +47,50 @@ This package serves as the foundation for the MemberJunction templating system,
|
|
|
17
47
|
npm install @memberjunction/templates-base-types
|
|
18
48
|
```
|
|
19
49
|
|
|
20
|
-
##
|
|
21
|
-
|
|
22
|
-
### TemplateEngineBase
|
|
50
|
+
## Usage
|
|
23
51
|
|
|
24
|
-
|
|
52
|
+
### Initializing the Engine
|
|
25
53
|
|
|
26
54
|
```typescript
|
|
27
55
|
import { TemplateEngineBase } from '@memberjunction/templates-base-types';
|
|
28
56
|
|
|
29
|
-
//
|
|
30
|
-
|
|
57
|
+
// Load template metadata
|
|
58
|
+
await TemplateEngineBase.Instance.Config(false, contextUser);
|
|
31
59
|
|
|
32
|
-
//
|
|
33
|
-
await
|
|
34
|
-
|
|
35
|
-
// Access templates
|
|
36
|
-
const templates = templateEngine.Templates;
|
|
37
|
-
|
|
38
|
-
// Find a specific template by name (case-insensitive)
|
|
39
|
-
const template = templateEngine.FindTemplate('Welcome Email');
|
|
60
|
+
// Force refresh
|
|
61
|
+
await TemplateEngineBase.Instance.Config(true, contextUser);
|
|
40
62
|
```
|
|
41
63
|
|
|
42
|
-
###
|
|
43
|
-
|
|
44
|
-
An enhanced version of the base `TemplateEntity` that includes associated content and parameters as properties, along with utility methods.
|
|
64
|
+
### Accessing Template Metadata
|
|
45
65
|
|
|
46
66
|
```typescript
|
|
47
|
-
|
|
67
|
+
const engine = TemplateEngineBase.Instance;
|
|
48
68
|
|
|
49
|
-
//
|
|
50
|
-
const
|
|
69
|
+
// All templates (with Content and Params pre-associated)
|
|
70
|
+
const templates = engine.Templates;
|
|
51
71
|
|
|
52
|
-
//
|
|
53
|
-
const
|
|
72
|
+
// Find a template by name
|
|
73
|
+
const emailTemplate = engine.FindTemplate('Welcome Email');
|
|
54
74
|
|
|
55
|
-
//
|
|
56
|
-
const
|
|
57
|
-
const
|
|
75
|
+
// Access template contents and params
|
|
76
|
+
const contents = emailTemplate.Content;
|
|
77
|
+
const params = emailTemplate.Params;
|
|
58
78
|
|
|
59
|
-
//
|
|
60
|
-
const
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
// Validate input data against template parameters
|
|
64
|
-
const validationResult = template.ValidateTemplateInput({
|
|
65
|
-
customerName: 'John Doe',
|
|
66
|
-
invoiceNumber: '12345'
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
if (!validationResult.Success) {
|
|
70
|
-
console.error('Validation errors:', validationResult.Errors);
|
|
71
|
-
}
|
|
79
|
+
// Other metadata
|
|
80
|
+
const contentTypes = engine.TemplateContentTypes;
|
|
81
|
+
const categories = engine.TemplateCategories;
|
|
72
82
|
```
|
|
73
83
|
|
|
74
84
|
### TemplateRenderResult
|
|
75
85
|
|
|
76
|
-
A simple class representing the result of a template rendering operation.
|
|
77
|
-
|
|
78
86
|
```typescript
|
|
79
87
|
import { TemplateRenderResult } from '@memberjunction/templates-base-types';
|
|
80
88
|
|
|
81
|
-
//
|
|
89
|
+
// Returned by rendering operations
|
|
82
90
|
const result: TemplateRenderResult = {
|
|
83
91
|
Success: true,
|
|
84
|
-
Output: '<html
|
|
85
|
-
Message: undefined
|
|
92
|
+
Output: '<html>...</html>',
|
|
93
|
+
Message: undefined // Only set on failure
|
|
86
94
|
};
|
|
87
95
|
```
|
|
88
96
|
|
|
@@ -90,156 +98,49 @@ const result: TemplateRenderResult = {
|
|
|
90
98
|
|
|
91
99
|
### TemplateEngineBase
|
|
92
100
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
- `static get Instance(): TemplateEngineBase` - Get the singleton instance
|
|
104
|
-
- `async Config(forceRefresh?: boolean, contextUser?: UserInfo, provider?: IMetadataProvider)` - Load template metadata
|
|
105
|
-
- `FindTemplate(templateName: string): TemplateEntityExtended` - Find a template by name (case-insensitive)
|
|
106
|
-
|
|
107
|
-
### TemplateEntityExtended
|
|
108
|
-
|
|
109
|
-
#### Properties
|
|
110
|
-
|
|
111
|
-
- `Content: TemplateContentEntity[]` - Associated content records
|
|
112
|
-
- `Params: TemplateParamEntity[]` - Associated parameter definitions
|
|
113
|
-
|
|
114
|
-
#### Methods
|
|
115
|
-
|
|
116
|
-
- `GetContentByType(type: string): TemplateContentEntity[]` - Get all content of a specific type
|
|
117
|
-
- `GetHighestPriorityContent(type?: string): TemplateContentEntity` - Get the highest priority content
|
|
118
|
-
- `ValidateTemplateInput(data: any): ValidationResult` - Validate input data against parameter requirements
|
|
101
|
+
| Member | Type | Description |
|
|
102
|
+
|--------|------|-------------|
|
|
103
|
+
| `Instance` | static getter | Singleton instance |
|
|
104
|
+
| `Config()` | method | Load/refresh template metadata |
|
|
105
|
+
| `Templates` | getter | All templates with associated contents and params |
|
|
106
|
+
| `TemplateContentTypes` | getter | Available content types |
|
|
107
|
+
| `TemplateCategories` | getter | Template categories |
|
|
108
|
+
| `TemplateContents` | getter | All template content records |
|
|
109
|
+
| `TemplateParams` | getter | All template parameter definitions |
|
|
110
|
+
| `FindTemplate()` | method | Find template by name (case-insensitive) |
|
|
119
111
|
|
|
120
112
|
### TemplateRenderResult
|
|
121
113
|
|
|
122
|
-
|
|
114
|
+
| Property | Type | Description |
|
|
115
|
+
|----------|------|-------------|
|
|
116
|
+
| `Success` | boolean | Whether rendering succeeded |
|
|
117
|
+
| `Output` | string | The rendered output |
|
|
118
|
+
| `Message` | string (optional) | Error message on failure |
|
|
123
119
|
|
|
124
|
-
|
|
125
|
-
- `Output: string` - The rendered output
|
|
126
|
-
- `Message?: string` - Optional message (typically for errors)
|
|
120
|
+
## Relationship to @memberjunction/templates
|
|
127
121
|
|
|
128
|
-
|
|
122
|
+
This package provides the **metadata caching layer** usable anywhere. The `@memberjunction/templates` package extends it with server-side Nunjucks rendering, custom extensions, and AI prompt integration.
|
|
129
123
|
|
|
130
|
-
|
|
124
|
+
```mermaid
|
|
125
|
+
graph LR
|
|
126
|
+
A["@memberjunction/templates-base-types<br/>(Metadata + Types)"] --> B["@memberjunction/templates<br/>(Server Rendering)"]
|
|
127
|
+
C[Client Code] --> A
|
|
128
|
+
D[Server Code] --> B
|
|
131
129
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
const engine = TemplateEngineBase.Instance;
|
|
137
|
-
|
|
138
|
-
// Load metadata (only needed once)
|
|
139
|
-
await engine.Config();
|
|
140
|
-
|
|
141
|
-
// List all active templates
|
|
142
|
-
const activeTemplates = engine.Templates.filter(t => t.IsActive);
|
|
143
|
-
|
|
144
|
-
// Find templates by category
|
|
145
|
-
const emailTemplates = engine.Templates.filter(t =>
|
|
146
|
-
t.CategoryID === engine.TemplateCategories.find(c => c.Name === 'Email')?.ID
|
|
147
|
-
);
|
|
148
|
-
|
|
149
|
-
console.log(`Found ${activeTemplates.length} active templates`);
|
|
150
|
-
console.log(`Found ${emailTemplates.length} email templates`);
|
|
151
|
-
}
|
|
152
|
-
```
|
|
153
|
-
|
|
154
|
-
### Working with Template Content
|
|
155
|
-
|
|
156
|
-
```typescript
|
|
157
|
-
import { TemplateEngineBase, TemplateEntityExtended } from '@memberjunction/templates-base-types';
|
|
158
|
-
|
|
159
|
-
async function getTemplateContent(templateName: string, contentType: string) {
|
|
160
|
-
const engine = TemplateEngineBase.Instance;
|
|
161
|
-
await engine.Config();
|
|
162
|
-
|
|
163
|
-
const template = engine.FindTemplate(templateName);
|
|
164
|
-
if (!template) {
|
|
165
|
-
throw new Error(`Template "${templateName}" not found`);
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
// Get specific content type
|
|
169
|
-
const content = template.GetHighestPriorityContent(contentType);
|
|
170
|
-
if (!content) {
|
|
171
|
-
throw new Error(`No ${contentType} content found for template "${templateName}"`);
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
return content.TemplateText;
|
|
175
|
-
}
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
### Template Parameter Validation
|
|
179
|
-
|
|
180
|
-
```typescript
|
|
181
|
-
import { TemplateEngineBase } from '@memberjunction/templates-base-types';
|
|
182
|
-
|
|
183
|
-
async function validateTemplateData(templateName: string, inputData: any) {
|
|
184
|
-
const engine = TemplateEngineBase.Instance;
|
|
185
|
-
await engine.Config();
|
|
186
|
-
|
|
187
|
-
const template = engine.FindTemplate(templateName);
|
|
188
|
-
if (!template) {
|
|
189
|
-
throw new Error(`Template "${templateName}" not found`);
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
const validation = template.ValidateTemplateInput(inputData);
|
|
193
|
-
|
|
194
|
-
if (!validation.Success) {
|
|
195
|
-
// Handle validation errors
|
|
196
|
-
validation.Errors.forEach(error => {
|
|
197
|
-
console.error(`Parameter ${error.Source}: ${error.Message}`);
|
|
198
|
-
});
|
|
199
|
-
throw new Error('Template validation failed');
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
// Data is valid, proceed with rendering
|
|
203
|
-
return true;
|
|
204
|
-
}
|
|
130
|
+
style A fill:#2d6a9f,stroke:#1a4971,color:#fff
|
|
131
|
+
style B fill:#2d8659,stroke:#1a5c3a,color:#fff
|
|
132
|
+
style C fill:#b8762f,stroke:#8a5722,color:#fff
|
|
133
|
+
style D fill:#b8762f,stroke:#8a5722,color:#fff
|
|
205
134
|
```
|
|
206
135
|
|
|
207
136
|
## Dependencies
|
|
208
137
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
## Integration with Other MJ Packages
|
|
216
|
-
|
|
217
|
-
This package serves as the foundation for:
|
|
218
|
-
|
|
219
|
-
- **`@memberjunction/templates-engine`** - The full template rendering engine that builds on these base types
|
|
220
|
-
- **Custom template extensions** - Third-party extensions can use these types for compatibility
|
|
221
|
-
|
|
222
|
-
The base types ensure consistent template handling across the entire MemberJunction ecosystem, whether templates are being managed, validated, or rendered.
|
|
223
|
-
|
|
224
|
-
## Build and Development
|
|
225
|
-
|
|
226
|
-
```bash
|
|
227
|
-
# Build the package
|
|
228
|
-
npm run build
|
|
229
|
-
|
|
230
|
-
# Watch for changes during development
|
|
231
|
-
npm run start
|
|
232
|
-
```
|
|
233
|
-
|
|
234
|
-
The package is built using TypeScript and outputs to the `dist` directory. Type definitions are automatically generated during the build process.
|
|
235
|
-
|
|
236
|
-
## Notes
|
|
237
|
-
|
|
238
|
-
- This package intentionally has minimal dependencies to ensure it can be used in various environments
|
|
239
|
-
- The `TemplateEngineBase` uses the singleton pattern to ensure consistent metadata access across an application
|
|
240
|
-
- Template metadata is loaded from the MemberJunction database using the dataset system
|
|
241
|
-
- The `@RegisterClass` decorator on `TemplateEntityExtended` ensures proper integration with the MJ entity system
|
|
138
|
+
| Package | Purpose |
|
|
139
|
+
|---------|---------|
|
|
140
|
+
| `@memberjunction/core` | BaseEngine, UserInfo, IMetadataProvider |
|
|
141
|
+
| `@memberjunction/core-entities` | Template entity types |
|
|
142
|
+
| `@memberjunction/global` | MJGlobal class factory |
|
|
242
143
|
|
|
243
144
|
## License
|
|
244
145
|
|
|
245
|
-
ISC
|
|
146
|
+
ISC
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TemplateEngineBase = void 0;
|
|
4
|
-
const core_1 = require("@memberjunction/core");
|
|
1
|
+
import { BaseEngine } from "@memberjunction/core";
|
|
5
2
|
/**
|
|
6
3
|
* TemplateEngine is used for accessing template metadata/caching it, and rendering templates
|
|
7
4
|
*/
|
|
8
|
-
class TemplateEngineBase extends
|
|
5
|
+
export class TemplateEngineBase extends BaseEngine {
|
|
9
6
|
/**
|
|
10
7
|
* Returns the global instance of the class. This is a singleton class, so there is only one instance of it in the application. Do not directly create new instances of it, always use this method to get the instance.
|
|
11
8
|
*/
|
|
@@ -54,5 +51,4 @@ class TemplateEngineBase extends core_1.BaseEngine {
|
|
|
54
51
|
return this.Templates.find((t) => t.Name.trim().toLowerCase() === templateName.trim().toLowerCase());
|
|
55
52
|
}
|
|
56
53
|
}
|
|
57
|
-
exports.TemplateEngineBase = TemplateEngineBase;
|
|
58
54
|
//# sourceMappingURL=TemplateEngineBase.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TemplateEngineBase.js","sourceRoot":"","sources":["../src/TemplateEngineBase.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TemplateEngineBase.js","sourceRoot":"","sources":["../src/TemplateEngineBase.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAyD,MAAM,sBAAsB,CAAC;AAGzG;;GAEG;AACH,MAAM,OAAO,kBAAmB,SAAQ,UAA8B;IAClE;;OAEG;IACI,MAAM,KAAK,QAAQ;QACvB,OAAO,KAAK,CAAC,WAAW,EAAsB,CAAC;IAClD,CAAC;IAWM,KAAK,CAAC,MAAM,CAAC,YAAsB,EAAE,WAAsB,EAAE,QAA4B;QAC5F,MAAM,CAAC,GAAwC;YAC3C;gBACI,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,mBAAmB;gBAChC,qBAAqB,EAAE,iBAAiB;gBACxC,YAAY,EAAE,WAAW;aAC5B;SACJ,CAAA;QACD,MAAM,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,QAAQ,EAAE,YAAY,EAAE,WAAW,CAAC,CAAC;IAC5D,CAAC;IAES,KAAK,CAAC,iBAAiB,CAAC,WAAsB;QACpD,iFAAiF;QACjF,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;YACzB,CAAC,CAAC,OAAO,GAAG,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,UAAU,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;YACzE,CAAC,CAAC,MAAM,GAAG,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,UAAU,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;QAC1E,CAAC,CAAC,CAAC;IACP,CAAC;IAED,IAAW,SAAS;QAChB,OAAO,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC;IACpC,CAAC;IAED,IAAW,oBAAoB;QAC3B,OAAO,IAAI,CAAC,SAAS,CAAC,oBAAoB,CAAC;IAC/C,CAAC;IACD,IAAW,kBAAkB;QACzB,OAAO,IAAI,CAAC,SAAS,CAAC,kBAAkB,CAAC;IAC7C,CAAC;IACD,IAAW,gBAAgB;QACvB,OAAO,IAAI,CAAC,SAAS,CAAC,gBAAgB,CAAC;IAC3C,CAAC;IACD,IAAW,cAAc;QACrB,OAAO,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC;IACzC,CAAC;IAED;;;;OAIG;IACI,YAAY,CAAC,YAAoB;QACpC,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,KAAK,YAAY,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,CAAA;IACxG,CAAC;CACJ"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './TemplateEngineBase';
|
|
2
|
-
export * from './types';
|
|
1
|
+
export * from './TemplateEngineBase.js';
|
|
2
|
+
export * from './types.js';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,19 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./TemplateEngineBase"), exports);
|
|
18
|
-
__exportStar(require("./types"), exports);
|
|
1
|
+
export * from './TemplateEngineBase.js';
|
|
2
|
+
export * from './types.js';
|
|
19
3
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,SAAS,CAAC"}
|
package/dist/types.js
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TemplateRenderResult = void 0;
|
|
4
1
|
/**
|
|
5
2
|
* Contains the results of a call to render a template
|
|
6
3
|
*/
|
|
7
|
-
class TemplateRenderResult {
|
|
4
|
+
export class TemplateRenderResult {
|
|
8
5
|
}
|
|
9
|
-
exports.TemplateRenderResult = TemplateRenderResult;
|
|
10
6
|
//# sourceMappingURL=types.js.map
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,OAAO,oBAAoB;CAOhC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memberjunction/templates-base-types",
|
|
3
|
-
"
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "4.1.0",
|
|
4
5
|
"description": "MemberJunction Templating Base Types for Client/Server Use",
|
|
5
6
|
"main": "dist/index.js",
|
|
6
7
|
"types": "dist/index.d.ts",
|
|
@@ -9,18 +10,18 @@
|
|
|
9
10
|
],
|
|
10
11
|
"scripts": {
|
|
11
12
|
"start": "ts-node-dev src/index.ts",
|
|
12
|
-
"build": "tsc",
|
|
13
|
+
"build": "tsc && tsc-alias -f",
|
|
13
14
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
14
15
|
},
|
|
15
16
|
"author": "MemberJunction.com",
|
|
16
17
|
"license": "ISC",
|
|
17
18
|
"devDependencies": {
|
|
18
|
-
"typescript": "^5.
|
|
19
|
+
"typescript": "^5.9.3"
|
|
19
20
|
},
|
|
20
21
|
"dependencies": {
|
|
21
|
-
"@memberjunction/core": "
|
|
22
|
-
"@memberjunction/core-entities": "
|
|
23
|
-
"@memberjunction/global": "
|
|
22
|
+
"@memberjunction/core": "4.1.0",
|
|
23
|
+
"@memberjunction/core-entities": "4.1.0",
|
|
24
|
+
"@memberjunction/global": "4.1.0"
|
|
24
25
|
},
|
|
25
26
|
"repository": {
|
|
26
27
|
"type": "git",
|