{"_id":"@bernierllc/nevar-condition-tree","_rev":"5-a6df68b1ffc72f880d3cf029a6d8c67a","name":"@bernierllc/nevar-condition-tree","dist-tags":{"latest":"0.5.0"},"versions":{"0.0.1":{"name":"@bernierllc/nevar-condition-tree","version":"0.0.1","keywords":["oidc","trusted-publishing","setup"],"_id":"@bernierllc/nevar-condition-tree@0.0.1","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"dist":{"shasum":"8056fffcee8c76e850dec58b2666d6b68c82d340","tarball":"https://registry.npmjs.org/@bernierllc/nevar-condition-tree/-/nevar-condition-tree-0.0.1.tgz","fileCount":2,"integrity":"sha512-bqN24PnykF6O6/JH/dgeDY8K3eFrWXPVdqMa4bcZV1y5q4O8Jyej12qg8IRg8ThzM2fG2ZgPH1TkkKeBZOaPMg==","signatures":[{"sig":"MEQCIH3M+3MYzowCn2zpxEFP4+eVwDkfkF4bkjp3nvxzepCUAiA3W4Tcr9nA83NxrspgyE7HaqUdyMJU3XHnQ0dWYfUmNQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":2091},"_npmUser":{"name":"mkbernier","email":"mkbernier@gmail.com"},"_npmVersion":"11.11.0","description":"OIDC trusted publishing setup package for @bernierllc/nevar-condition-tree","directories":{},"_nodeVersion":"25.8.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/nevar-condition-tree_0.0.1_1774655702907_0.6685806405688224","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@bernierllc/nevar-condition-tree","version":"0.1.0","keywords":["nevar","rules-engine","condition-tree","validation","tree-walking"],"author":{"name":"Bernier LLC"},"license":"SEE LICENSE IN LICENSE","_id":"@bernierllc/nevar-condition-tree@0.1.0","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"homepage":"https://github.com/bernierllc/tools#readme","bugs":{"url":"https://github.com/bernierllc/tools/issues"},"dist":{"shasum":"d2211686d063fde8332090ca74ca757827a21c5e","tarball":"https://registry.npmjs.org/@bernierllc/nevar-condition-tree/-/nevar-condition-tree-0.1.0.tgz","fileCount":11,"integrity":"sha512-t38wJ3V+mDrI7KQRHP0AC4uJRG7WhyDLOAOkIkJzka9Q8VNKPHjwJW5M9R/70hNQijhdBXJxxAHeKHOmVByWqQ==","signatures":[{"sig":"MEYCIQClE9zCVDSUQk7HoHSxzFTLaNmMcKTD3usxgHPYqO8zTgIhAOr7/HVLKSnbeztrIEnZq7SOqu2r2mRgO7nPbILaoF9b","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10556},"main":"dist/index.js","_from":"file:bernierllc-nevar-condition-tree-0.1.0.tgz","types":"dist/index.d.ts","engines":{"node":">=16.0.0"},"scripts":{"lint":"eslint src __tests__ --ext .ts","test":"jest","build":"tsc","clean":"rimraf dist","prebuild":"npm run clean","test:run":"jest","test:coverage":"jest --coverage"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:3e6d2c39-32b0-4c51-a3cc-d1810def2b6b"}},"_resolved":"/home/runner/work/tools/tools/packages/core/nevar-condition-tree/bernierllc-nevar-condition-tree-0.1.0.tgz","_integrity":"sha512-t38wJ3V+mDrI7KQRHP0AC4uJRG7WhyDLOAOkIkJzka9Q8VNKPHjwJW5M9R/70hNQijhdBXJxxAHeKHOmVByWqQ==","repository":{"url":"git+https://github.com/bernierllc/tools.git","type":"git","directory":"packages/core/nevar-condition-tree"},"_npmVersion":"11.12.1","description":"Condition tree data structure — validate, walk, serialize, extract fields for the Nevar rules engine","directories":{},"_nodeVersion":"20.20.1","dependencies":{"@bernierllc/nevar-types":"0.1.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.1.0","typescript":"^5.0.0","@types/jest":"^29.5.0","@types/node":"^20.0.0","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nevar-condition-tree_0.1.0_1774888904959_0.8620111848562848","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@bernierllc/nevar-condition-tree","version":"0.2.0","keywords":["nevar","rules-engine","condition-tree","validation","tree-walking"],"author":{"name":"Bernier LLC"},"license":"SEE LICENSE IN LICENSE","_id":"@bernierllc/nevar-condition-tree@0.2.0","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"homepage":"https://github.com/bernierllc/tools#readme","bugs":{"url":"https://github.com/bernierllc/tools/issues"},"dist":{"shasum":"f655dbc483b5e6407810ac27dc5331f36ffb3eac","tarball":"https://registry.npmjs.org/@bernierllc/nevar-condition-tree/-/nevar-condition-tree-0.2.0.tgz","fileCount":11,"integrity":"sha512-hMMNA+CNwYEjyEiwt32ryOo2a4aVQihylROJDeEdlSPaaATT2BCq3iFTtCmSBJ7iKoX8ng3DgNeVMa2JH58f9A==","signatures":[{"sig":"MEYCIQC3onO6sECW/kcQLRVysf6SOX/XTP9HIwDeYdUGvkd5dAIhAIW58nj9Ma7i3NSC6PGRMcJ3ZDY8xJLOZsA3hafNdxdf","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10556},"main":"dist/index.js","_from":"file:bernierllc-nevar-condition-tree-0.2.0.tgz","types":"dist/index.d.ts","engines":{"node":">=16.0.0"},"scripts":{"lint":"eslint src __tests__ --ext .ts","test":"jest","build":"tsc","clean":"rimraf dist","prebuild":"npm run clean","test:run":"jest","test:coverage":"jest --coverage"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:3e6d2c39-32b0-4c51-a3cc-d1810def2b6b"}},"_resolved":"/home/runner/work/tools/tools/packages/core/nevar-condition-tree/bernierllc-nevar-condition-tree-0.2.0.tgz","_integrity":"sha512-hMMNA+CNwYEjyEiwt32ryOo2a4aVQihylROJDeEdlSPaaATT2BCq3iFTtCmSBJ7iKoX8ng3DgNeVMa2JH58f9A==","repository":{"url":"git+https://github.com/bernierllc/tools.git","type":"git","directory":"packages/core/nevar-condition-tree"},"_npmVersion":"11.14.1","description":"Condition tree data structure — validate, walk, serialize, extract fields for the Nevar rules engine","directories":{},"_nodeVersion":"20.20.2","dependencies":{"@bernierllc/nevar-types":"0.2.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.1.0","typescript":"^5.0.0","@types/jest":"^29.5.0","@types/node":"^20.0.0","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nevar-condition-tree_0.2.0_1779133527505_0.13147540985708583","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@bernierllc/nevar-condition-tree","version":"0.4.0","keywords":["nevar","rules-engine","condition-tree","validation","tree-walking"],"author":{"name":"Bernier LLC"},"license":"SEE LICENSE IN LICENSE","_id":"@bernierllc/nevar-condition-tree@0.4.0","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"homepage":"https://github.com/bernierllc/tools#readme","bugs":{"url":"https://github.com/bernierllc/tools/issues"},"dist":{"shasum":"6dcccb44c8a3c1eecb669f550e8ad1dfcd248fe0","tarball":"https://registry.npmjs.org/@bernierllc/nevar-condition-tree/-/nevar-condition-tree-0.4.0.tgz","fileCount":13,"integrity":"sha512-50SSyzCyp/nolXdCpuUSeuqmqIEoAUOHMBRYHVRK9FpJdT2GUvc8RhW5Pp+E+KRDewWTQQRtA6kmvwU0keYpKg==","signatures":[{"sig":"MEQCIGikr9RZGsqCkPX5Ve4GkvqZB7PK2k0So3Ed0mhHFlLrAiAcKfmrvH/ZFbX2nVtlYzCcfx2Kmb/mUzg6IgTHkOHS5w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12379},"main":"dist/index.js","_from":"file:bernierllc-nevar-condition-tree-0.4.0.tgz","types":"dist/index.d.ts","engines":{"node":">=16.0.0"},"scripts":{"lint":"eslint src __tests__ --ext .ts","test":"jest","build":"tsc","clean":"rimraf dist","prebuild":"npm run clean","test:run":"jest","test:coverage":"jest --coverage"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:3e6d2c39-32b0-4c51-a3cc-d1810def2b6b"}},"_resolved":"/home/runner/work/tools/tools/packages/core/nevar-condition-tree/bernierllc-nevar-condition-tree-0.4.0.tgz","_integrity":"sha512-50SSyzCyp/nolXdCpuUSeuqmqIEoAUOHMBRYHVRK9FpJdT2GUvc8RhW5Pp+E+KRDewWTQQRtA6kmvwU0keYpKg==","repository":{"url":"git+https://github.com/bernierllc/tools.git","type":"git","directory":"packages/core/nevar-condition-tree"},"_npmVersion":"11.14.1","description":"Condition tree data structure — validate, walk, serialize, extract fields for the Nevar rules engine","directories":{},"_nodeVersion":"20.20.2","dependencies":{"@bernierllc/nevar-types":"0.3.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.1.0","typescript":"^5.0.0","@types/jest":"^29.5.0","@types/node":"^20.0.0","@typescript-eslint/parser":"^6.0.0","@typescript-eslint/eslint-plugin":"^6.0.0"},"_npmOperationalInternal":{"tmp":"tmp/nevar-condition-tree_0.4.0_1779241257193_0.047311035405180446","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"name":"@bernierllc/nevar-condition-tree","version":"0.5.0","description":"Condition tree data structure — validate, walk, serialize, extract fields for the Nevar rules engine","main":"dist/index.js","types":"dist/index.d.ts","keywords":["nevar","rules-engine","condition-tree","validation","tree-walking"],"author":{"name":"Bernier LLC"},"license":"SEE LICENSE IN LICENSE","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"engines":{"node":">=16.0.0"},"repository":{"type":"git","url":"git+https://github.com/bernierllc/tools.git","directory":"packages/core/nevar-condition-tree"},"dependencies":{"@bernierllc/nevar-types":"0.4.0"},"devDependencies":{"@types/jest":"^29.5.0","@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.1.0","typescript":"^5.0.0"},"scripts":{"build":"tsc","prebuild":"npm run clean","clean":"rimraf dist","test":"jest","test:run":"jest","test:coverage":"jest --coverage","lint":"eslint src __tests__ --ext .ts"},"_id":"@bernierllc/nevar-condition-tree@0.5.0","bugs":{"url":"https://github.com/bernierllc/tools/issues"},"homepage":"https://github.com/bernierllc/tools#readme","_integrity":"sha512-oY5PLmMDLsbsvKhVq6Khim3A4aZJCa8JvJuX953SJ//DUD5xkGDKnoF1Lfer+FEjPfiqc4FMHk+wPyQ8gXQaww==","_resolved":"/home/runner/work/tools/tools/packages/core/nevar-condition-tree/bernierllc-nevar-condition-tree-0.5.0.tgz","_from":"file:bernierllc-nevar-condition-tree-0.5.0.tgz","_nodeVersion":"20.20.2","_npmVersion":"11.14.1","dist":{"integrity":"sha512-oY5PLmMDLsbsvKhVq6Khim3A4aZJCa8JvJuX953SJ//DUD5xkGDKnoF1Lfer+FEjPfiqc4FMHk+wPyQ8gXQaww==","shasum":"07dd3b5c7002ce651ddc59e1a902630a58701555","tarball":"https://registry.npmjs.org/@bernierllc/nevar-condition-tree/-/nevar-condition-tree-0.5.0.tgz","fileCount":13,"unpackedSize":12379,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHa67qKHwySPlNS8sW6ABzSlLbRwGkkiamDXlviL7iWEAiEAvBpyRyiC7cJ51vTIE9KVQhHv+s3ADPTShb33sH9Ef3w="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:3e6d2c39-32b0-4c51-a3cc-d1810def2b6b"}},"directories":{},"maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/nevar-condition-tree_0.5.0_1779250006968_0.005069305787826162"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-27T23:55:02.839Z","modified":"2026-05-20T04:06:47.270Z","0.0.1":"2026-03-27T23:55:03.047Z","0.1.0":"2026-03-30T16:41:45.101Z","0.2.0":"2026-05-18T19:45:27.675Z","0.4.0":"2026-05-20T01:40:57.367Z","0.5.0":"2026-05-20T04:06:47.135Z"},"bugs":{"url":"https://github.com/bernierllc/tools/issues"},"author":{"name":"Bernier LLC"},"license":"SEE LICENSE IN LICENSE","homepage":"https://github.com/bernierllc/tools#readme","keywords":["nevar","rules-engine","condition-tree","validation","tree-walking"],"repository":{"type":"git","url":"git+https://github.com/bernierllc/tools.git","directory":"packages/core/nevar-condition-tree"},"description":"Condition tree data structure — validate, walk, serialize, extract fields for the Nevar rules engine","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"readme":"# @bernierllc/nevar-condition-tree\n\nCondition tree data structure for the Nevar rules engine. Validate, walk, and extract fields from condition trees. No evaluation logic.\n\n## Installation\n\n```bash\nnpm install @bernierllc/nevar-condition-tree\n```\n\n## Usage\n\n```typescript\nimport { validateTree, walkTree, extractFields } from '@bernierllc/nevar-condition-tree';\n\nconst tree = {\n  operator: 'AND' as const,\n  conditions: [\n    { field: 'age', op: 'gte', value: 18 },\n    { field: 'country', op: 'eq', value: 'US' }\n  ]\n};\n\n// Validate\nconst result = validateTree(tree);\n// { valid: true, errors: [] }\n\n// Walk\nwalkTree(tree, (node, depth, parent) => {\n  console.log(`depth=${depth}`, node);\n});\n\n// Extract fields\nconst fields = extractFields(tree);\n// ['age', 'country']\n```\n\n## API\n\n### `validateTree(tree)`\n\nValidates a condition tree structure. Checks for valid operators (AND/OR/NOT), non-empty condition arrays, and correct leaf node shape.\n\n**Returns:** `{ valid: boolean, errors: string[] }`\n\n### `walkTree(tree, visitor)`\n\nDepth-first traversal of a condition tree. Calls the visitor function for every node (both groups and leaf conditions) with the current node, depth, and parent group.\n\n**Parameters:**\n- `tree: ConditionGroup` - The root condition group\n- `visitor: (node, depth, parent?) => void` - Callback invoked for each node\n\n### `extractFields(tree)`\n\nExtracts all unique field paths referenced by leaf conditions in the tree. Useful for determining which context providers need to be invoked before evaluation.\n\n**Returns:** `string[]` - Deduplicated array of field paths\n\n## Integration Documentation\n\n### Logger Integration\nThis package does not integrate with `@bernierllc/logger`. As a core package, logger integration is optional and not included by default. Consumers should handle logging at the service layer.\n\n### NeverHub Integration\nThis package does not integrate with `@bernierllc/neverhub-adapter`. As a core package, NeverHub integration is not applicable. NeverHub registration should be handled by service-layer packages that compose this package.\n\n## License\n\nCopyright (c) 2025 Bernier LLC. All rights reserved.\n","readmeFilename":"README.md"}