{"_id":"@bernierllc/template-variable-registry","_rev":"7-3a9054d5a972244a375012fc98709dca","name":"@bernierllc/template-variable-registry","dist-tags":{"latest":"1.5.0"},"versions":{"1.0.1":{"name":"@bernierllc/template-variable-registry","version":"1.0.1","keywords":["template","variables","validation","handlebars","jinja2","email","registry","typescript","bernierllc"],"author":{"name":"Bernier LLC"},"license":"MIT","_id":"@bernierllc/template-variable-registry@1.0.1","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"homepage":"https://github.com/bernier-llc/tools#readme","bugs":{"url":"https://github.com/bernier-llc/tools/issues"},"dist":{"shasum":"e6bba0dd1f2fd23e9278d9e232feae55973ce353","tarball":"https://registry.npmjs.org/@bernierllc/template-variable-registry/-/template-variable-registry-1.0.1.tgz","fileCount":63,"integrity":"sha512-kCicJuUDg2apgxrm+j5qLTgHdaro/AM2oVerq/EiQFj4/vw3w8BjN7Xz6sBe10faQ7rbKF1JIXv1QF6N/pFbKg==","signatures":[{"sig":"MEUCIQDQYjqqr3LShLId0t/z1Ob7Hn13rH4uW4AgudeFn3GLQAIgNM4Li3shwwuWKugEw3+t+oRKTA9DVbbmQOf77bKysso=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":119267},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"1ae066c3622ef3cb9bd6970a47c783beba47de90","scripts":{"dev":"tsc --watch","lint":"eslint src/**/*.ts","test":"jest","build":"tsc","clean":"rimraf dist","test:run":"jest --passWithNoTests","test:watch":"jest --watch","test:coverage":"jest --coverage"},"_npmUser":{"name":"mkbernier","email":"mkbernier@gmail.com"},"repository":{"url":"git+https://github.com/bernier-llc/tools.git","type":"git"},"_npmVersion":"11.4.2","description":"Template variable registration, validation, and extraction system for email templates with Handlebars and Jinja2 support","directories":{},"_nodeVersion":"24.4.1","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","eslint":"^8.0.0","rimraf":"^5.0.0","ts-jest":"^29.4.0","typescript":"^5.0.0","@types/jest":"^29.5.14","@types/node":"^20.0.0","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/template-variable-registry_1.0.1_1760048067815_0.7174781901804734","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@bernierllc/template-variable-registry","version":"1.2.0","keywords":["template","variables","validation","handlebars","jinja2","email","registry","typescript","bernierllc"],"author":{"name":"Bernier LLC"},"license":"MIT","_id":"@bernierllc/template-variable-registry@1.2.0","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"homepage":"https://github.com/bernier-llc/tools#readme","bugs":{"url":"https://github.com/bernier-llc/tools/issues"},"dist":{"shasum":"47ae52f4209c677c99c25de18ca1595dc68d1f15","tarball":"https://registry.npmjs.org/@bernierllc/template-variable-registry/-/template-variable-registry-1.2.0.tgz","fileCount":63,"integrity":"sha512-fAbRXorOG5KogxigMbbsO3hu050QFeuSnKR5U8f+iU4bykZ2uiStVBIUMMxKvaAPjVcPxdtvECPTmDW8cDdfUA==","signatures":[{"sig":"MEYCIQDZFTFi5dul2+ijTxSghlirq9YQdeIqT9HNU5JJDs+tLQIhALcSnuIvgZI6uQAZkpHLTxa1S0o2Q1YeX+4sMVcpQcyN","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":119398},"main":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"af7e74b3715d56d3a193e1bb6743b337c2b0df6d","scripts":{"dev":"tsc --watch","lint":"eslint src/**/*.ts","test":"jest","build":"tsc","clean":"rimraf dist","test:run":"jest --passWithNoTests","test:watch":"jest --watch","test:coverage":"jest --coverage"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:44e4d47e-6987-4bba-8200-663f33b42b4a"}},"repository":{"url":"git+https://github.com/bernier-llc/tools.git","type":"git"},"_npmVersion":"lerna/9.0.3/node@v20.19.6+x64 (linux)","description":"Template variable registration, validation, and extraction system for email templates with Handlebars and Jinja2 support","directories":{},"_nodeVersion":"20.19.6","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","eslint":"^8.0.0","rimraf":"^5.0.0","ts-jest":"^29.4.0","typescript":"^5.0.0","@types/jest":"^29.5.14","@types/node":"^20.0.0","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/template-variable-registry_1.2.0_1767642331495_0.9999817771435424","host":"s3://npm-registry-packages-npm-production"}},"1.2.1":{"name":"@bernierllc/template-variable-registry","version":"1.2.1","keywords":["template","variables","validation","handlebars","jinja2","email","registry","typescript","bernierllc"],"author":{"name":"Bernier LLC"},"license":"MIT","_id":"@bernierllc/template-variable-registry@1.2.1","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"homepage":"https://github.com/bernier-llc/tools#readme","bugs":{"url":"https://github.com/bernier-llc/tools/issues"},"dist":{"shasum":"6ad21e85b58a1ffbe9a1f04d6a5f346c0fa9ea3d","tarball":"https://registry.npmjs.org/@bernierllc/template-variable-registry/-/template-variable-registry-1.2.1.tgz","fileCount":63,"integrity":"sha512-h6xP25hSNOrCyLFTlyHTppl069LhYpFImRrfhEfdG9wSHZla1LVPFvr8MH3jhUuiMeao8RwCaY1GZdf72Z6VlA==","signatures":[{"sig":"MEUCIB3JAOtmf+IWHo9l0STq9loePtPXUDYlWcqhmEiSCeoAAiEA4LVV17Dp3RVbluo/M38HW67IzcuTW0YEpszoMBZ3mAo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":119340},"main":"dist/index.js","_from":"file:bernierllc-template-variable-registry-1.2.1.tgz","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"scripts":{"dev":"tsc --watch","lint":"eslint src/**/*.ts","test":"jest","build":"tsc","clean":"rimraf dist","test:run":"jest --passWithNoTests","test:watch":"jest --watch","test:coverage":"jest --coverage"},"_npmUser":{"name":"mkbernier","email":"mkbernier@gmail.com"},"_resolved":"/Users/mattbernier/projects/tools/packages/core/template-variable-registry/bernierllc-template-variable-registry-1.2.1.tgz","_integrity":"sha512-h6xP25hSNOrCyLFTlyHTppl069LhYpFImRrfhEfdG9wSHZla1LVPFvr8MH3jhUuiMeao8RwCaY1GZdf72Z6VlA==","repository":{"url":"git+https://github.com/bernier-llc/tools.git","type":"git"},"_npmVersion":"11.6.2","description":"Template variable registration, validation, and extraction system for email templates with Handlebars and Jinja2 support","directories":{},"_nodeVersion":"25.2.1","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","eslint":"^8.0.0","rimraf":"^5.0.0","ts-jest":"^29.4.0","typescript":"^5.0.0","@types/jest":"^29.5.14","@types/node":"^20.0.0","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/template-variable-registry_1.2.1_1772569628210_0.32875112822409247","host":"s3://npm-registry-packages-npm-production"}},"1.2.2":{"name":"@bernierllc/template-variable-registry","version":"1.2.2","keywords":["template","variables","validation","handlebars","jinja2","email","registry","typescript","bernierllc"],"author":{"name":"Bernier LLC"},"license":"MIT","_id":"@bernierllc/template-variable-registry@1.2.2","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"homepage":"https://github.com/bernier-llc/tools#readme","bugs":{"url":"https://github.com/bernier-llc/tools/issues"},"dist":{"shasum":"848cdf8203fcdee133b773c4fd359014c2ff09e0","tarball":"https://registry.npmjs.org/@bernierllc/template-variable-registry/-/template-variable-registry-1.2.2.tgz","fileCount":63,"integrity":"sha512-AXtJa+2qRpQ2bkyLm7fswR+iYkKpOqe8ShNv0fSAjHC7NHEMrpJkkhmZ/VdBQfJ35wkG/hfQ6I7IzkKSnIKVEA==","signatures":[{"sig":"MEUCIQDhr3D4QfdwMhfDyRj+b6n0tH+79wpIPBceybRvMqgbqAIgeS2ZyG2ArzcHKXU7D9d5gF7Zvx9gVCyZbr6OcVQMU7w=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":119340},"main":"dist/index.js","_from":"file:bernierllc-template-variable-registry-1.2.2.tgz","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"scripts":{"dev":"tsc --watch","lint":"eslint src/**/*.ts","test":"jest","build":"tsc","clean":"rimraf dist","test:run":"jest --passWithNoTests","test:watch":"jest --watch","test:coverage":"jest --coverage"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:44e4d47e-6987-4bba-8200-663f33b42b4a"}},"_resolved":"/home/runner/work/tools/tools/packages/core/template-variable-registry/bernierllc-template-variable-registry-1.2.2.tgz","_integrity":"sha512-AXtJa+2qRpQ2bkyLm7fswR+iYkKpOqe8ShNv0fSAjHC7NHEMrpJkkhmZ/VdBQfJ35wkG/hfQ6I7IzkKSnIKVEA==","repository":{"url":"git+https://github.com/bernier-llc/tools.git","type":"git"},"_npmVersion":"11.11.0","description":"Template variable registration, validation, and extraction system for email templates with Handlebars and Jinja2 support","directories":{},"_nodeVersion":"20.20.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","eslint":"^8.0.0","rimraf":"^5.0.0","ts-jest":"^29.4.0","typescript":"^5.0.0","@types/jest":"^29.5.14","@types/node":"^20.0.0","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/template-variable-registry_1.2.2_1773161550749_0.02131296733173582","host":"s3://npm-registry-packages-npm-production"}},"1.3.0":{"name":"@bernierllc/template-variable-registry","version":"1.3.0","keywords":["template","variables","validation","handlebars","jinja2","email","registry","typescript","bernierllc"],"author":{"name":"Bernier LLC"},"license":"MIT","_id":"@bernierllc/template-variable-registry@1.3.0","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"homepage":"https://github.com/bernier-llc/tools#readme","bugs":{"url":"https://github.com/bernier-llc/tools/issues"},"dist":{"shasum":"627c092a8f8b875d058f4089ad323adbd340089b","tarball":"https://registry.npmjs.org/@bernierllc/template-variable-registry/-/template-variable-registry-1.3.0.tgz","fileCount":63,"integrity":"sha512-lnXrrNbduD3MxCbnbgo9AiSX8REJxeujz2WGpSg3QSjIXdGqanorf6JCk36pxstJ6xtrbt5gwK1wFlf70GgPEg==","signatures":[{"sig":"MEYCIQCJBAywJfNNvMDywW65+CcyasTzIu+iQhSKMXwekzUEIQIhAMQUQsHSh2LzD49kUsvKgVmr5l3iv6qPrk1b6oWEHSFL","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":119340},"main":"dist/index.js","_from":"file:bernierllc-template-variable-registry-1.3.0.tgz","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"scripts":{"dev":"tsc --watch","lint":"eslint src/**/*.ts","test":"jest","build":"tsc","clean":"rimraf dist","test:run":"jest --passWithNoTests","test:watch":"jest --watch","test:coverage":"jest --coverage"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:44e4d47e-6987-4bba-8200-663f33b42b4a"}},"_resolved":"/home/runner/work/tools/tools/packages/core/template-variable-registry/bernierllc-template-variable-registry-1.3.0.tgz","_integrity":"sha512-lnXrrNbduD3MxCbnbgo9AiSX8REJxeujz2WGpSg3QSjIXdGqanorf6JCk36pxstJ6xtrbt5gwK1wFlf70GgPEg==","repository":{"url":"git+https://github.com/bernier-llc/tools.git","type":"git"},"_npmVersion":"11.14.1","description":"Template variable registration, validation, and extraction system for email templates with Handlebars and Jinja2 support","directories":{},"_nodeVersion":"20.20.2","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","eslint":"^8.0.0","rimraf":"^5.0.0","ts-jest":"^29.4.0","typescript":"^5.0.0","@types/jest":"^29.5.14","@types/node":"^20.0.0","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/template-variable-registry_1.3.0_1779241468011_0.9211977301943084","host":"s3://npm-registry-packages-npm-production"}},"1.4.0":{"name":"@bernierllc/template-variable-registry","version":"1.4.0","keywords":["template","variables","validation","handlebars","jinja2","email","registry","typescript","bernierllc"],"author":{"name":"Bernier LLC"},"license":"MIT","_id":"@bernierllc/template-variable-registry@1.4.0","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"homepage":"https://github.com/bernier-llc/tools#readme","bugs":{"url":"https://github.com/bernier-llc/tools/issues"},"dist":{"shasum":"395eba8bdaf2acc65afc33d5364573a54bcd1acd","tarball":"https://registry.npmjs.org/@bernierllc/template-variable-registry/-/template-variable-registry-1.4.0.tgz","fileCount":67,"integrity":"sha512-2x1HK03a5UUPk1jPxNb6uPGFHsunO+Ifnl0G/a2bFTFgLGAbvo1Xd+23sAHwSO0VELa+q/trjGNmzsxPBfwokA==","signatures":[{"sig":"MEYCIQDD9gKyUxeQsG+5vjauddwiKM9tDUvBZr2zTMjz+3x0qgIhAMiCOy8jeNconBwiMB3ErtkGRQkSj+5c+STZbNkZGoAv","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":122495},"main":"dist/index.js","_from":"file:bernierllc-template-variable-registry-1.4.0.tgz","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"scripts":{"dev":"tsc --watch","lint":"eslint src/**/*.ts","test":"jest","build":"tsc","clean":"rimraf dist","test:run":"jest --passWithNoTests","test:watch":"jest --watch","test:coverage":"jest --coverage"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:44e4d47e-6987-4bba-8200-663f33b42b4a"}},"_resolved":"/home/runner/work/tools/tools/packages/core/template-variable-registry/bernierllc-template-variable-registry-1.4.0.tgz","_integrity":"sha512-2x1HK03a5UUPk1jPxNb6uPGFHsunO+Ifnl0G/a2bFTFgLGAbvo1Xd+23sAHwSO0VELa+q/trjGNmzsxPBfwokA==","repository":{"url":"git+https://github.com/bernier-llc/tools.git","type":"git"},"_npmVersion":"11.14.1","description":"Template variable registration, validation, and extraction system for email templates with Handlebars and Jinja2 support","directories":{},"_nodeVersion":"20.20.2","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.5.0","eslint":"^8.0.0","rimraf":"^5.0.0","ts-jest":"^29.4.0","typescript":"^5.0.0","@types/jest":"^29.5.14","@types/node":"^20.0.0","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/template-variable-registry_1.4.0_1779243341114_0.03860514327957687","host":"s3://npm-registry-packages-npm-production"}},"1.5.0":{"name":"@bernierllc/template-variable-registry","version":"1.5.0","description":"Template variable registration, validation, and extraction system for email templates with Handlebars and Jinja2 support","main":"dist/index.js","types":"dist/index.d.ts","keywords":["template","variables","validation","handlebars","jinja2","email","registry","typescript","bernierllc"],"author":{"name":"Bernier LLC"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/bernier-llc/tools.git"},"devDependencies":{"@types/jest":"^29.5.14","@types/node":"^20.0.0","@typescript-eslint/eslint-plugin":"^6.0.0","@typescript-eslint/parser":"^6.0.0","eslint":"^8.0.0","jest":"^29.5.0","rimraf":"^5.0.0","ts-jest":"^29.4.0","typescript":"^5.0.0"},"engines":{"node":">=18.0.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"scripts":{"build":"tsc","dev":"tsc --watch","test":"jest","test:watch":"jest --watch","test:coverage":"jest --coverage","test:run":"jest --passWithNoTests","lint":"eslint src/**/*.ts","clean":"rimraf dist"},"_id":"@bernierllc/template-variable-registry@1.5.0","bugs":{"url":"https://github.com/bernier-llc/tools/issues"},"homepage":"https://github.com/bernier-llc/tools#readme","_integrity":"sha512-158thXKO5ZtM7lKGjq5qMi0vADj+DqKbbIkGaVmqmTJFP5hrTobb5yJV7K3ryessNJ4nOwsuzQoscSRB73/bkw==","_resolved":"/home/runner/work/tools/tools/packages/core/template-variable-registry/bernierllc-template-variable-registry-1.5.0.tgz","_from":"file:bernierllc-template-variable-registry-1.5.0.tgz","_nodeVersion":"20.20.2","_npmVersion":"11.14.1","dist":{"integrity":"sha512-158thXKO5ZtM7lKGjq5qMi0vADj+DqKbbIkGaVmqmTJFP5hrTobb5yJV7K3ryessNJ4nOwsuzQoscSRB73/bkw==","shasum":"0be751fec9af73cfeab4297e2e8fd2e125029a1a","tarball":"https://registry.npmjs.org/@bernierllc/template-variable-registry/-/template-variable-registry-1.5.0.tgz","fileCount":67,"unpackedSize":122495,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFZqWa7YZ+4NCJThsFerImGKmyjofNPu/9VcKL8taJnUAiBVUiz/fFQQW7ZS2MKdvgeKRIVSKq07/wEDo52QAREebg=="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:44e4d47e-6987-4bba-8200-663f33b42b4a"}},"directories":{},"maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/template-variable-registry_1.5.0_1779250214397_0.5497524276676367"},"_hasShrinkwrap":false}},"time":{"created":"2025-10-09T22:14:27.697Z","modified":"2026-05-20T04:10:14.706Z","1.0.1":"2025-10-09T22:14:28.020Z","1.2.0":"2026-01-05T19:45:31.655Z","1.2.1":"2026-03-03T20:27:08.364Z","1.2.2":"2026-03-10T16:52:30.898Z","1.3.0":"2026-05-20T01:44:28.188Z","1.4.0":"2026-05-20T02:15:41.284Z","1.5.0":"2026-05-20T04:10:14.580Z"},"bugs":{"url":"https://github.com/bernier-llc/tools/issues"},"author":{"name":"Bernier LLC"},"license":"MIT","homepage":"https://github.com/bernier-llc/tools#readme","keywords":["template","variables","validation","handlebars","jinja2","email","registry","typescript","bernierllc"],"repository":{"type":"git","url":"git+https://github.com/bernier-llc/tools.git"},"description":"Template variable registration, validation, and extraction system for email templates with Handlebars and Jinja2 support","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"readme":"# @bernierllc/template-variable-registry\n\nA comprehensive template variable registration, validation, and extraction system for email templates with support for both Handlebars and Jinja2 template engines.\n\n## Installation\n\n```bash\nnpm install @bernierllc/template-variable-registry\n```\n\n## Features\n\n- **Variable Registration**: Define available template variables with type information and validation rules\n- **Context Management**: Organize variables into contexts with inheritance support\n- **Template Validation**: Validate templates against registered variables\n- **Variable Extraction**: Parse templates to extract all variable references\n- **Multi-Engine Support**: Works with both Handlebars and Jinja2 templates\n- **Autocomplete Support**: Generate variable suggestions for UI integration\n- **Syntax Validation**: Detect template syntax errors\n- **Type Safety**: Full TypeScript support with strict typing\n\n## Usage\n\n### Basic Variable Registration\n\n```typescript\nimport { VariableRegistry } from '@bernierllc/template-variable-registry';\n\nconst registry = new VariableRegistry();\n\n// Register a context with variables\nregistry.registerContext('user_welcome', {\n  name: 'user_welcome',\n  description: 'Variables for welcome emails',\n  variables: {\n    user: {\n      type: 'object',\n      required: true,\n      description: 'User information',\n      children: {\n        name: {\n          type: 'string',\n          required: true,\n          description: 'User full name'\n        },\n        email: {\n          type: 'string',\n          required: true,\n          description: 'User email address'\n        },\n        joinDate: {\n          type: 'date',\n          required: false,\n          description: 'Account creation date'\n        }\n      }\n    },\n    company: {\n      type: 'object',\n      required: true,\n      children: {\n        name: { type: 'string', required: true },\n        logoUrl: { type: 'string', required: false }\n      }\n    }\n  }\n});\n```\n\n### Template Validation\n\n```typescript\nconst template = `\n<h1>Welcome {{user.name}}!</h1>\n<p>Thanks for joining {{company.name}}.</p>\n<p>Your account was created on {{user.joinDate}}.</p>\n<p>Visit us at {{company.websiteUrl}}.</p>\n`;\n\nconst validation = registry.validateTemplate('user_welcome', template);\n\nif (!validation.isValid) {\n  console.log('Template errors:');\n  validation.errors.forEach(error => {\n    console.log(`Line ${error.line}: ${error.message}`);\n  });\n  // Output: Line 4: Undefined variable 'company.websiteUrl'\n\n  // Get suggestions for undefined variables\n  validation.undefinedVariables.forEach(undef => {\n    console.log(`Undefined: ${undef.name}`);\n    console.log(`Did you mean: ${undef.suggestions?.join(', ')}`);\n  });\n  // Output: Did you mean: company.logoUrl, company.name\n}\n\n// Check for unused required variables\nif (validation.unusedVariables.length > 0) {\n  console.log('Warning: Required variables not used:');\n  validation.unusedVariables.forEach(path => {\n    console.log(`  - ${path}`);\n  });\n}\n```\n\n### Variable Extraction\n\n```typescript\n// Extract all variables from a template\nconst variables = registry.extractVariables(template);\n\nvariables.forEach(variable => {\n  console.log(`Found: ${variable.path} at line ${variable.line}`);\n  console.log(`  Context: ${variable.context}`);\n  console.log(`  Is conditional: ${variable.isConditional}`);\n  console.log(`  Is loop: ${variable.isLoop}`);\n});\n```\n\n### Autocomplete Suggestions\n\n```typescript\n// Get all top-level variables\nconst allSuggestions = registry.getVariableSuggestions('user_welcome');\n\n// Get suggestions with prefix\nconst userSuggestions = registry.getVariableSuggestions('user_welcome', 'user.');\n\n// Returns:\n// [\n//   { path: 'user.name', type: 'string', description: 'User full name', required: true },\n//   { path: 'user.email', type: 'string', description: 'User email address', required: true },\n//   { path: 'user.joinDate', type: 'date', description: 'Account creation date', required: false }\n// ]\n\n// Get path completions for partial input\nconst completions = registry.getPathCompletions('user_welcome', 'user.');\n```\n\n### Context Inheritance\n\n```typescript\n// Create base context\nregistry.registerContext('base_user', {\n  name: 'base_user',\n  variables: {\n    user: {\n      type: 'object',\n      required: true,\n      children: {\n        name: { type: 'string', required: true },\n        email: { type: 'string', required: true }\n      }\n    }\n  }\n});\n\n// Extend base context\nregistry.registerContext('user_welcome', {\n  name: 'user_welcome',\n  extends: ['base_user'],\n  variables: {\n    welcomeMessage: { type: 'string', required: false },\n    activationUrl: { type: 'string', required: true }\n  }\n});\n\n// user_welcome now has: user.name, user.email, welcomeMessage, activationUrl\n```\n\n### Validation Rules\n\n```typescript\nimport { lengthRule, patternRule, CommonRules } from '@bernierllc/template-variable-registry';\n\nregistry.registerContext('signup', {\n  name: 'signup',\n  variables: {\n    email: {\n      type: 'string',\n      required: true,\n      validation: [\n        CommonRules.email(),\n        lengthRule(5, 255)\n      ]\n    },\n    password: {\n      type: 'string',\n      required: true,\n      validation: [\n        lengthRule(8, undefined, 'Password must be at least 8 characters'),\n        patternRule(/[A-Z]/, 'Must contain uppercase letter')\n      ]\n    },\n    age: {\n      type: 'number',\n      required: true,\n      validation: [\n        CommonRules.positiveNumber()\n      ]\n    }\n  }\n});\n```\n\n### Jinja2 Template Support\n\n```typescript\nconst jinja2Template = `\n<h1>Welcome {{ user.name }}!</h1>\n{% if user.isPremium %}\n  <p>You have premium access!</p>\n{% endif %}\n<ul>\n{% for item in items %}\n  <li>{{ item.name }}</li>\n{% endfor %}\n</ul>\n`;\n\n// Works the same way\nconst validation = registry.validateTemplate('user_welcome', jinja2Template);\nconst variables = registry.extractVariables(jinja2Template);\n```\n\n## API Reference\n\n### VariableRegistry\n\n#### `registerContext(contextName: string, context: VariableContext): void`\nRegister a variable context with the registry.\n\n#### `getContext(contextName: string): VariableContext | null`\nRetrieve a registered context by name.\n\n#### `getAllContexts(): VariableContext[]`\nGet all registered contexts.\n\n#### `validateTemplate(contextName: string, template: string): ValidationResult`\nValidate a template against a registered context.\n\nReturns:\n- `isValid`: boolean - Whether the template is valid\n- `errors`: ValidationError[] - All validation errors\n- `warnings`: ValidationWarning[] - Validation warnings\n- `unusedVariables`: string[] - Required variables not used\n- `undefinedVariables`: UndefinedVariable[] - Variables not in registry\n\n#### `extractVariables(template: string, engine?: TemplateEngine): ExtractedVariable[]`\nExtract all variables from a template. Auto-detects engine if not specified.\n\n#### `getVariableSuggestions(contextName: string, prefix?: string): VariableSuggestion[]`\nGet variable suggestions for autocomplete functionality.\n\n#### `getPathCompletions(contextName: string, partialPath: string): VariableSuggestion[]`\nGet completions for a partial variable path.\n\n#### `hasContext(contextName: string): boolean`\nCheck if a context exists.\n\n#### `deleteContext(contextName: string): boolean`\nRemove a context from the registry.\n\n#### `clearAll(): void`\nClear all registered contexts.\n\n### Type Definitions\n\n#### VariableDefinition\n```typescript\ninterface VariableDefinition {\n  type: 'string' | 'number' | 'boolean' | 'date' | 'array' | 'object';\n  required: boolean;\n  description?: string;\n  defaultValue?: unknown;\n  validation?: ValidationRule[];\n  children?: Record<string, VariableDefinition>;  // For objects\n}\n```\n\n#### VariableContext\n```typescript\ninterface VariableContext {\n  name: string;\n  description?: string;\n  variables: Record<string, VariableDefinition>;\n  extends?: string[];  // Parent context names\n}\n```\n\n#### ValidationResult\n```typescript\ninterface ValidationResult {\n  isValid: boolean;\n  errors: ValidationError[];\n  warnings: ValidationWarning[];\n  unusedVariables: string[];\n  undefinedVariables: UndefinedVariable[];\n}\n```\n\n#### ExtractedVariable\n```typescript\ninterface ExtractedVariable {\n  name: string;\n  path: string;\n  line: number;\n  column: number;\n  context: 'handlebars' | 'jinja2';\n  isConditional: boolean;\n  isLoop: boolean;\n}\n```\n\n## Advanced Features\n\n### Nested Object Paths\n```typescript\n// Supports deep nesting\nvariables: {\n  user: {\n    type: 'object',\n    required: true,\n    children: {\n      profile: {\n        type: 'object',\n        required: false,\n        children: {\n          address: {\n            type: 'object',\n            required: false,\n            children: {\n              street: { type: 'string', required: false },\n              city: { type: 'string', required: false }\n            }\n          }\n        }\n      }\n    }\n  }\n}\n\n// Use in templates: {{user.profile.address.street}}\n```\n\n### Array Access Patterns\n```typescript\nvariables: {\n  items: {\n    type: 'array',\n    required: true\n  }\n}\n\n// Handlebars: {{items[0].name}}\n// Jinja2: {{ items[0].name }}\n```\n\n### Syntax Error Detection\n```typescript\nconst template = '{{#if condition}}test{{/unless}}';  // Mismatched blocks\nconst validation = registry.validateTemplate('context', template);\n\nvalidation.errors.forEach(error => {\n  if (error.type === 'syntax_error') {\n    console.log(`Syntax error at line ${error.line}: ${error.message}`);\n  }\n});\n```\n\n## Integration Status\n\n### Logger Integration\n**Status**: Not applicable - Pure utility package with no runtime logging needs.\n\n**Justification**: This is a pure utility package that performs template variable registration, validation, and extraction. It has no runtime logging requirements as it's designed to be embedded in other packages that handle logging at their level.\n\n### Docs-Suite Integration\n**Status**: Ready - Full TypeDoc documentation exported\n\n**Format**: TypeDoc with complete API documentation, usage examples, and type definitions. All public APIs are fully documented with JSDoc comments.\n\n### NeverHub Integration\n**Status**: Not applicable - Core utility package with no external service dependencies\n\n**Justification**: This is a core package that provides atomic template variable functionality. It has no need for service discovery, event bus communication, or dynamic configuration. NeverHub integration would be appropriate at the service/suite level that orchestrates this package.\n\n## Use Cases\n\nThis package is designed for:\n- **Email template systems** - Validate email templates before sending\n- **Template editors** - Provide autocomplete and validation in UI\n- **Template documentation** - Generate documentation of available variables\n- **Multi-tenant systems** - Different variable contexts per tenant\n- **Template testing** - Ensure templates use valid variables\n\n## Package Type\n\n**Core Package** - Atomic utility with zero external dependencies, designed for reuse across multiple service and suite packages.\n\n## Dependencies\n\nZero runtime dependencies - pure TypeScript implementation.\n\n## Security\n\n### Input Validation\nAll template inputs and variable definitions are thoroughly validated:\n- Template syntax is parsed and validated before processing\n- Variable paths are sanitized to prevent injection attacks\n- Type checking ensures data integrity\n\n### Safe Defaults\n- No external dependencies reduces attack surface\n- No network calls or file system access\n- Pure functions with no side effects\n- All data structures are immutable where possible\n\n### Dependency Security\n- Zero runtime dependencies means zero transitive dependency vulnerabilities\n- Development dependencies are regularly audited with `npm audit`\n- All dependencies pinned to specific versions for reproducibility\n\n## See Also\n\n- [@bernierllc/template-engine](../template-engine) - Template rendering engine\n- [@bernierllc/email-validator](../email-validator) - Email validation utilities\n\n## License\n\nCopyright (c) 2025 Bernier LLC. All rights reserved.\n","readmeFilename":"README.md"}