You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Library: a re-bundled dist/index.js reads the consumer's own registry/vaults.json #59
src/registry.ts and src/version.ts read ../registry/vaults.json and ../package.json relative to their own module file at runtime. That is correct in every layout this repository ships: the repository root, an npm install under node_modules/@temporalabs/treasury/, and the plugin's plugin/ folder. Since #57 it also holds when the npm bin runs through a symlink.
It is not correct when a library consumer re-bundles dist/index.js into their own output. import.meta.url is then the consumer's bundle, so the registry and version are read from beside it. If a registry/vaults.json exists there, it is read silently; otherwise the first registry read throws ENOENT.
The likely fix is to embed the registry (and the version) at build time instead of reading them at runtime. That changes why plugin/ carries its registry/ and package.json copies, so it needs a design pass rather than a patch. Proposed for v0.1.2.
Decision: option B from the design note in #94 (import the two JSON files so they are embedded at build time), targeted at v0.1.3 rather than v0.1.2. The work is tracked in #107.
Activity
Kevin-Chen0 commentedon Oct 5, 2026
Decision: option B from the design note in #94 (import the two JSON files so they are embedded at build time), targeted at v0.1.3 rather than v0.1.2. The work is tracked in #107.
Kevin-Chen0 commentedon Oct 11, 2026
Fixed by #129: a re-bundled library now carries its own registry instead of reading one beside the consumer's bundle.