Two real bugs: - npx @hanzo/helper broke when the kms bin was added — a package with TWO bins can't be run by 'npx <pkg>' (could not determine executable). Reverted helper to its single 'hanzo' bin; kms stays as 'hanzo kms' AND as its own package. - version.ts was hardcoded '1.0.0' — 'hanzo --version' always lied. Now injected from package.json at build (tsup define __HANZO_VERSION__), one source of truth. - packages/kms: new standalone @hanzo/kms (single 'kms' bin) that re-runs the helper's kms CLI via the new ./kms-cli export. npm i -g @hanzo/kms → 'kms'. - exports: add ./kms-cli so the standalone package imports it cleanly. Published: @hanzo/helper@1.0.5, @hanzo/kms@1.0.5, @luxfi/@zenlm/@zooai/helper@1.0.5.
24 lines
702 B
TypeScript
24 lines
702 B
TypeScript
import { defineConfig } from 'tsup';
|
|
import { readFileSync } from 'node:fs';
|
|
|
|
const { version } = JSON.parse(readFileSync('./package.json', 'utf-8')) as { version: string };
|
|
|
|
export default defineConfig({
|
|
entry: ['src/index.ts', 'src/cli.ts', 'src/kms-cli.ts'],
|
|
format: ['esm'],
|
|
target: 'node22',
|
|
clean: true,
|
|
dts: false,
|
|
sourcemap: true,
|
|
splitting: false,
|
|
bundle: true,
|
|
noExternal: [],
|
|
// Single source of truth for the CLI version: package.json, inlined at build.
|
|
define: { __HANZO_VERSION__: JSON.stringify(version) },
|
|
esbuildOptions(options) {
|
|
options.banner = {
|
|
js: '// @hanzo/helper - Hanzo CLI for API access, cloud services, MCP, and plugins',
|
|
};
|
|
},
|
|
});
|