{"_id":"@aurumjs/vite-plugin","name":"@aurumjs/vite-plugin","dist-tags":{"latest":"0.10.0"},"versions":{"0.10.0":{"name":"@aurumjs/vite-plugin","version":"0.10.0","description":"Vite build policy for Aurum developer tooling metadata","type":"module","main":"./prebuilt/esnext/index.js","types":"./prebuilt/esnext/index.d.ts","exports":{".":{"types":"./prebuilt/esnext/index.d.ts","import":"./prebuilt/esnext/index.js"},"./client":{"types":"./client.d.ts"}},"scripts":{"build":"tsc -p tsconfig.build.json","test":"tsc -p tsconfig.test.json && vitest run --config vitest.config.ts","prepack":"npm run build"},"peerDependencies":{"vite":">=5.0.0"},"devDependencies":{"vite":"^8.0.0","vitest":"^4.0.16"},"license":"MIT","gitHead":"115fc28ffe30a71d85da8da4d0a6ef5aaf64319e","_id":"@aurumjs/vite-plugin@0.10.0","_nodeVersion":"26.5.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-w+BIv2NvkQrtSWdsMyicmoFT0vGwjR2zAbktPqUYOqG+euO4bQjox6FIJnVPOSIwQjQqZqB0BYV1tolV0ZwJ+Q==","shasum":"df04890ecc5d30f057afbde790d759fcbc61ff49","tarball":"https://registry.npmjs.org/@aurumjs/vite-plugin/-/vite-plugin-0.10.0.tgz","fileCount":8,"unpackedSize":11969,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDDk2q/4F3KwFNhrUqtoHivM6vM2vpwKyU5wZyMwP+EVgIgNNdRm1Co7Eg2Z5RW2T/S3lAqi/NBY7wlJC6OYrTk2sA="}]},"_npmUser":{"name":"cyberphoenix90","email":"Joao260690@gmail.com"},"directories":{},"maintainers":[{"name":"cyberphoenix90","email":"Joao260690@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/vite-plugin_0.10.0_1787913316786_0.3782371838074583"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-28T10:35:16.647Z","0.10.0":"2026-08-28T10:35:16.936Z","modified":"2026-08-28T10:35:17.148Z"},"maintainers":[{"name":"cyberphoenix90","email":"Joao260690@gmail.com"}],"description":"Vite build policy for Aurum developer tooling metadata","license":"MIT","readme":"# @aurumjs/vite-plugin\n\nVite build policy for Aurum developer tooling. Development builds retain rich\ndata-flow metadata such as source allocation stacks. Production\nbuilds keep the lightweight graph instrumentation required by the browser\nextension while omitting expensive metadata by default.\n\n## Setup\n\n```ts\n// vite.config.ts\nimport { defineConfig } from 'vite';\nimport { aurumDevtools } from '@aurumjs/vite-plugin';\n\nexport default defineConfig({\n    plugins: [aurumDevtools()]\n});\n```\n\nThe default `auto` policy resolves as follows:\n\n| Vite invocation         | Aurum mode   | Stack capture | Instrumentation |\n| ----------------------- | ------------ | ------------- | --------------- |\n| Development server      | `debug`      | Enabled       | Enabled         |\n| Production build        | `production` | Disabled      | Enabled         |\n| Build with another mode | `debug`      | Enabled       | Enabled         |\n\nInstrumentation is not disabled in production. The extension can still show\nthe live source and subscription graph, but names, creation locations, and\nother debug-only metadata are omitted from Aurum's production protocol.\nSet `instrumentation: false` when the application should compile graph\nregistration out entirely. The extension cannot inspect that build, but stream\nconstruction and subscription changes avoid all registry work.\n\nA production build locks that policy into the runtime. Calls to runtime\nconfiguration cannot promote it back to debug mode or re-enable stack and\nevent-history retention; use an explicit `mode: 'debug'` diagnostic build when\nthose details are needed.\n\n## Explicit policy\n\nThe policy can be overridden for diagnostic builds or particularly sensitive\ndevelopment environments:\n\n```ts\naurumDevtools({\n    mode: 'production',\n    captureStacks: false,\n    instrumentation: false\n});\n```\n\n`mode` accepts `auto`, `debug`, or `production`. `captureStacks` defaults to\ntrue in debug mode and can be disabled there. Production mode always forces it\noff so a lean build cannot accidentally retain call sites.\n`instrumentation` defaults to `true` and is independent of the metadata mode.\n\n## Build constants\n\nThe plugin defines these constants for Aurum's runtime packages:\n\n- `__AURUM_DEVTOOLS_MODE__`: `\"debug\"` or `\"production\"`\n- `__AURUM_DEVTOOLS_CAPTURE_STACKS__`: `true` or `false`\n- `__AURUM_DEVTOOLS_INSTRUMENTATION__`: `true` or `false`\n\nAurum guards reads with `typeof`, so running its unbundled output in Node or\nusing another bundler does not depend on globals provided by this plugin.\n\nApplications can inspect the resolved policy explicitly through a virtual\nmodule. Add `@aurumjs/vite-plugin/client` to the `types` array in the application's\nTypeScript configuration if the virtual import is used.\n\n```ts\nimport config, { captureStacks, instrumentation, mode } from 'virtual:aurum-devtools/config';\n```\n\nThe virtual module is side-effect free. Runtime configuration is selected by\nthe compile-time constants, avoiding bootstrap ordering problems.\n","readmeFilename":"README.md","_rev":"1-ca125820792db9558e0014fb79779ed3"}