
Security News
Lovable’s OJ Rewrites Vite’s Dev Server in Rust as AI Lowers the Cost of Forking Open Source
Lovable’s OJ rewrites Vite’s dev server in Rust, reducing memory use and preview times as AI lowers the cost of open source reimplementation.
@memberjunction/templates-base-types
Advanced tools
MemberJunction Templating Base Types for Client/Server Use
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.
graph TD
subgraph "@memberjunction/templates-base-types"
A[TemplateEngineBase] --> B[Templates Cache]
A --> C[Template Contents]
A --> D[Template Params]
A --> E[Content Types]
A --> F[Categories]
end
subgraph "Loaded via Dataset"
G["Template_Metadata<br/>Dataset"]
end
G --> A
H["@memberjunction/templates<br/>(Server Engine)"] --> A
style A fill:#2d6a9f,stroke:#1a4971,color:#fff
style B fill:#2d8659,stroke:#1a5c3a,color:#fff
style C fill:#2d8659,stroke:#1a5c3a,color:#fff
style D fill:#2d8659,stroke:#1a5c3a,color:#fff
style E fill:#7c5295,stroke:#563a6b,color:#fff
style F fill:#7c5295,stroke:#563a6b,color:#fff
style H fill:#b8762f,stroke:#8a5722,color:#fff
This package provides the foundational layer for MemberJunction's templating system:
Template_Metadata datasetnpm install @memberjunction/templates-base-types
import { TemplateEngineBase } from '@memberjunction/templates-base-types';
// Load template metadata
await TemplateEngineBase.Instance.Config(false, contextUser);
// Force refresh
await TemplateEngineBase.Instance.Config(true, contextUser);
const engine = TemplateEngineBase.Instance;
// All templates (with Content and Params pre-associated)
const templates = engine.Templates;
// Find a template by name
const emailTemplate = engine.FindTemplate('Welcome Email');
// Access template contents and params
const contents = emailTemplate.Content;
const params = emailTemplate.Params;
// Other metadata
const contentTypes = engine.TemplateContentTypes;
const categories = engine.TemplateCategories;
import { TemplateRenderResult } from '@memberjunction/templates-base-types';
// Returned by rendering operations
const result: TemplateRenderResult = {
Success: true,
Output: '<html>...</html>',
Message: undefined // Only set on failure
};
| Member | Type | Description |
|---|---|---|
Instance | static getter | Singleton instance |
Config() | method | Load/refresh template metadata |
Templates | getter | All templates with associated contents and params |
TemplateContentTypes | getter | Available content types |
TemplateCategories | getter | Template categories |
TemplateContents | getter | All template content records |
TemplateParams | getter | All template parameter definitions |
FindTemplate() | method | Find template by name (case-insensitive) |
| Property | Type | Description |
|---|---|---|
Success | boolean | Whether rendering succeeded |
Output | string | The rendered output |
Message | string (optional) | Error message on failure |
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.
graph LR
A["@memberjunction/templates-base-types<br/>(Metadata + Types)"] --> B["@memberjunction/templates<br/>(Server Rendering)"]
C[Client Code] --> A
D[Server Code] --> B
style A fill:#2d6a9f,stroke:#1a4971,color:#fff
style B fill:#2d8659,stroke:#1a5c3a,color:#fff
style C fill:#b8762f,stroke:#8a5722,color:#fff
style D fill:#b8762f,stroke:#8a5722,color:#fff
| Package | Purpose |
|---|---|
@memberjunction/core | BaseEngine, UserInfo, IMetadataProvider |
@memberjunction/core-entities | Template entity types |
@memberjunction/global | MJGlobal class factory |
ISC
FAQs
MemberJunction Templating Base Types for Client/Server Use
The npm package @memberjunction/templates-base-types receives a total of 2,251 weekly downloads. As such, @memberjunction/templates-base-types popularity was classified as popular.
We found that @memberjunction/templates-base-types demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 11 open source maintainers collaborating on the project.

Security News
Lovable’s OJ rewrites Vite’s dev server in Rust, reducing memory use and preview times as AI lowers the cost of open source reimplementation.

Security News
It has been one year since Shai-Hulud made its first appearance on npm.

Research
/Security News
Operators behind PolinRider used a compromised GitHub account to plant malware in four development versions of a Packagist package with 700,000+ downloads.