{"_id":"@bernierllc/nevar-mixin-bridge","_rev":"5-de733ce8ca7c1b2ae05a5eac9c7ff85d","name":"@bernierllc/nevar-mixin-bridge","dist-tags":{"latest":"0.5.0"},"versions":{"0.0.1":{"name":"@bernierllc/nevar-mixin-bridge","version":"0.0.1","keywords":["oidc","trusted-publishing","setup"],"_id":"@bernierllc/nevar-mixin-bridge@0.0.1","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"dist":{"shasum":"afb1220eb4e2605355d477efe71e0c9e73886274","tarball":"https://registry.npmjs.org/@bernierllc/nevar-mixin-bridge/-/nevar-mixin-bridge-0.0.1.tgz","fileCount":2,"integrity":"sha512-TkEu6Xf6MoBXlFOBmqp5SnNIPkD6JeGryppDlhUghOsET8rh1bQG2TTS5/lzpgQb7CwCDRGp7BiBuIlyjHZejg==","signatures":[{"sig":"MEYCIQDZFS8VDz+eNMPApI8cXZiMkxPl7Bs2/c6JZQOpWToDIAIhAMCMG8FWZ5ipxus/XixE3gwASn+dgWm2hja3BG5IKnNz","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":2083},"_npmUser":{"name":"mkbernier","email":"mkbernier@gmail.com"},"_npmVersion":"11.11.0","description":"OIDC trusted publishing setup package for @bernierllc/nevar-mixin-bridge","directories":{},"_nodeVersion":"25.8.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/nevar-mixin-bridge_0.0.1_1774655794238_0.6524386395181712","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@bernierllc/nevar-mixin-bridge","version":"0.1.0","keywords":["nevar","rules-engine","mixin","mixin-bridge","plugin"],"author":{"name":"Bernier LLC"},"license":"SEE LICENSE IN LICENSE","_id":"@bernierllc/nevar-mixin-bridge@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":"9370aa63b4c8ef8f308919f580f5e672510cc189","tarball":"https://registry.npmjs.org/@bernierllc/nevar-mixin-bridge/-/nevar-mixin-bridge-0.1.0.tgz","fileCount":6,"integrity":"sha512-MF9pe2skIzNwkdqmuy5b4bBWW+Kev2wd055wPC2ItbVaw8eTnlASuHZh8P4StLf6skWR3cJK8zCaJn2+V7kwXw==","signatures":[{"sig":"MEUCIF3xW2p/Kh6MFRajH1s0CPV7qOKNqqvC0EOSnSjV+kxEAiEAtnTbW4cMTpsOewMA69DRbbxzsX9K/Fvgkhixmcd3oJQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10678},"main":"dist/index.js","_from":"file:bernierllc-nevar-mixin-bridge-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:8d8f6b3d-79d0-4e7a-b208-e1256f92d3f0"}},"_resolved":"/home/runner/work/tools/tools/packages/core/nevar-mixin-bridge/bernierllc-nevar-mixin-bridge-0.1.0.tgz","_integrity":"sha512-MF9pe2skIzNwkdqmuy5b4bBWW+Kev2wd055wPC2ItbVaw8eTnlASuHZh8P4StLf6skWR3cJK8zCaJn2+V7kwXw==","repository":{"url":"git+https://github.com/bernierllc/tools.git","type":"git","directory":"packages/core/nevar-mixin-bridge"},"_npmVersion":"11.12.1","description":"Utilities for building withX() mixin functions 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-mixin-bridge_0.1.0_1774898372619_0.6963343042805239","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@bernierllc/nevar-mixin-bridge","version":"0.2.0","keywords":["nevar","rules-engine","mixin","mixin-bridge","plugin"],"author":{"name":"Bernier LLC"},"license":"SEE LICENSE IN LICENSE","_id":"@bernierllc/nevar-mixin-bridge@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":"0d3c2cd42d2a42807e07dd59b6912f9b9b801975","tarball":"https://registry.npmjs.org/@bernierllc/nevar-mixin-bridge/-/nevar-mixin-bridge-0.2.0.tgz","fileCount":6,"integrity":"sha512-gQkzVNaaep0tuDtVmw51aYugShYxpr53d5tfANpsP6tqfLekkJCJUxrPpIiXDT/0p85cIju6PJ1/x/ZEnNoVRA==","signatures":[{"sig":"MEUCIDr0/wJK/QxirtP+BJQ1ptlUcfNt83Au/lWMa6zoRbjAAiEAhmwcZfet4wjgh95GE0XCWk5tGWA0P/YHtG72jV8PRJ0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10678},"main":"dist/index.js","_from":"file:bernierllc-nevar-mixin-bridge-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:8d8f6b3d-79d0-4e7a-b208-e1256f92d3f0"}},"_resolved":"/home/runner/work/tools/tools/packages/core/nevar-mixin-bridge/bernierllc-nevar-mixin-bridge-0.2.0.tgz","_integrity":"sha512-gQkzVNaaep0tuDtVmw51aYugShYxpr53d5tfANpsP6tqfLekkJCJUxrPpIiXDT/0p85cIju6PJ1/x/ZEnNoVRA==","repository":{"url":"git+https://github.com/bernierllc/tools.git","type":"git","directory":"packages/core/nevar-mixin-bridge"},"_npmVersion":"11.14.1","description":"Utilities for building withX() mixin functions 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-mixin-bridge_0.2.0_1779133550574_0.964344843298224","host":"s3://npm-registry-packages-npm-production"}},"0.4.0":{"name":"@bernierllc/nevar-mixin-bridge","version":"0.4.0","keywords":["nevar","rules-engine","mixin","mixin-bridge","plugin"],"author":{"name":"Bernier LLC"},"license":"SEE LICENSE IN LICENSE","_id":"@bernierllc/nevar-mixin-bridge@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":"db13c67caa2b38707de9071b257248346d213c88","tarball":"https://registry.npmjs.org/@bernierllc/nevar-mixin-bridge/-/nevar-mixin-bridge-0.4.0.tgz","fileCount":8,"integrity":"sha512-N9oyiXliToYvTHioZnPbPI5Ta97pIU2tsqP1thtqOGLNXrCLN68s8WT+FHg0ag2y8Yg7jQZ9VHFEIt0zvhKIeg==","signatures":[{"sig":"MEUCIGITGtxwsKTJ41VOTKW8kzQ0jo6Pt9V5VC8JPZQqlFQXAiEA/TcgAVW6lafVFv3KEq3J2ZAnPYdEeNNNI0gj1/y4Mlc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12463},"main":"dist/index.js","_from":"file:bernierllc-nevar-mixin-bridge-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:8d8f6b3d-79d0-4e7a-b208-e1256f92d3f0"}},"_resolved":"/home/runner/work/tools/tools/packages/core/nevar-mixin-bridge/bernierllc-nevar-mixin-bridge-0.4.0.tgz","_integrity":"sha512-N9oyiXliToYvTHioZnPbPI5Ta97pIU2tsqP1thtqOGLNXrCLN68s8WT+FHg0ag2y8Yg7jQZ9VHFEIt0zvhKIeg==","repository":{"url":"git+https://github.com/bernierllc/tools.git","type":"git","directory":"packages/core/nevar-mixin-bridge"},"_npmVersion":"11.14.1","description":"Utilities for building withX() mixin functions 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-mixin-bridge_0.4.0_1779241277309_0.7832547855074703","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"name":"@bernierllc/nevar-mixin-bridge","version":"0.5.0","description":"Utilities for building withX() mixin functions for the Nevar rules engine","main":"dist/index.js","types":"dist/index.d.ts","keywords":["nevar","rules-engine","mixin","mixin-bridge","plugin"],"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-mixin-bridge"},"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-mixin-bridge@0.5.0","bugs":{"url":"https://github.com/bernierllc/tools/issues"},"homepage":"https://github.com/bernierllc/tools#readme","_integrity":"sha512-BDATU5R+ISqbE/uVG/BHd0LOxYcXDhZZPo1UhxpvnqfGVfCpfS7pk3Hg4IBj82rMm7JyXeliW0JypEPN5TgQEQ==","_resolved":"/home/runner/work/tools/tools/packages/core/nevar-mixin-bridge/bernierllc-nevar-mixin-bridge-0.5.0.tgz","_from":"file:bernierllc-nevar-mixin-bridge-0.5.0.tgz","_nodeVersion":"20.20.2","_npmVersion":"11.14.1","dist":{"integrity":"sha512-BDATU5R+ISqbE/uVG/BHd0LOxYcXDhZZPo1UhxpvnqfGVfCpfS7pk3Hg4IBj82rMm7JyXeliW0JypEPN5TgQEQ==","shasum":"b51e7ff02efe3d36eb49d6ae2d604ef6058e01b2","tarball":"https://registry.npmjs.org/@bernierllc/nevar-mixin-bridge/-/nevar-mixin-bridge-0.5.0.tgz","fileCount":8,"unpackedSize":12463,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIG2NLEUISIcbXfnJLOuM94/+2N3Zy2SgfO2QzkqUoCC7AiA2mHoTchYGTEAu1tHET71Sn4H1X1LvSyYAGWtncMqHxA=="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:8d8f6b3d-79d0-4e7a-b208-e1256f92d3f0"}},"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-mixin-bridge_0.5.0_1779250028271_0.44429760661816053"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-27T23:56:34.023Z","modified":"2026-05-20T04:07:08.537Z","0.0.1":"2026-03-27T23:56:34.366Z","0.1.0":"2026-03-30T19:19:32.800Z","0.2.0":"2026-05-18T19:45:50.732Z","0.4.0":"2026-05-20T01:41:17.499Z","0.5.0":"2026-05-20T04:07:08.410Z"},"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","mixin","mixin-bridge","plugin"],"repository":{"type":"git","url":"git+https://github.com/bernierllc/tools.git","directory":"packages/core/nevar-mixin-bridge"},"description":"Utilities for building withX() mixin functions for the Nevar rules engine","maintainers":[{"name":"alikhan410","email":"mczeyo@gmail.com"},{"name":"mkbernier","email":"mkbernier@gmail.com"}],"readme":"# @bernierllc/nevar-mixin-bridge\n\nMixin definition utilities for the Nevar rules engine. Allows domain-specific extensions to register triggers, operators, actions, and context providers onto a Nevar instance under a namespace.\n\n## Installation\n\n```bash\nnpm install @bernierllc/nevar-mixin-bridge\n```\n\n## Usage\n\n```typescript\nimport { defineMixin } from '@bernierllc/nevar-mixin-bridge';\nimport type { MixinDefinition } from '@bernierllc/nevar-mixin-bridge';\nimport { z } from 'zod';\n\nconst ecommerceMixin = defineMixin('ecommerce', {\n  triggers: [\n    {\n      key: 'order.placed',\n      payloadSchema: z.object({ orderId: z.string(), total: z.number() }),\n      description: 'Fires when an order is placed',\n      category: 'commerce',\n    },\n  ],\n  operators: [\n    {\n      name: 'currency_gt',\n      definition: {\n        label: 'Currency Greater Than',\n        category: 'commerce',\n        evaluate: (field, target) => Number(field) > Number(target),\n        schema: z.number(),\n        fieldTypes: ['number'],\n      },\n    },\n  ],\n  actions: [\n    {\n      actionType: 'send-receipt',\n      definition: {\n        execute: async (config, context) => {\n          // Send receipt logic\n          return { sent: true };\n        },\n      },\n    },\n  ],\n  contextProviders: [\n    {\n      prefix: 'order',\n      provider: async (payload) => ({\n        total: 99.99,\n        currency: 'USD',\n      }),\n    },\n  ],\n  methods: {\n    getOrderStatus: (orderId: string) => 'shipped',\n  },\n});\n\n// Apply to a Nevar instance\necommerceMixin(nevar);\n\n// Methods are accessible under the namespace\n// nevar.ecommerce.getOrderStatus('order-1')\n```\n\n## API\n\n### `defineMixin(namespace, definition)`\n\nCreates a mixin function that can be applied to a Nevar instance. The returned function registers all triggers, operators, actions, and context providers defined in the mixin, and mounts any methods at `nevar[namespace]`.\n\n**Parameters:**\n- `namespace: string` - The namespace to mount methods under\n- `definition: MixinDefinition` - The mixin definition containing triggers, operators, actions, context providers, and methods\n\n**Returns:** `(nevar: NevarLike) => void` - A function that applies the mixin to a Nevar instance\n\n**Throws:** `NevarValidationError` if the namespace is already registered on the instance.\n\n### Types\n\n- `MixinDefinition` - Complete mixin definition with optional `triggers`, `operators`, `actions`, `contextProviders`, and `methods`\n- `MixinTrigger` - Trigger definition with `key`, `payloadSchema`, optional `description` and `category`\n- `MixinOperator` - Operator definition with `name` and `definition: OperatorDefinition`\n- `MixinAction` - Action definition with `actionType` and `definition: ActionHandlerDefinition`\n- `MixinContextProvider` - Context provider with `prefix` and `provider` function\n- `ActionHandlerDefinition` - Action handler with `execute` function and optional `description`\n- `NevarLike` - Minimal interface for a Nevar instance that supports registration methods\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"}