@kree4js/kx-demo-app
v1.0.0
Published
A tiny kx app published to npm, so 'kx start npm:@kree4js/[email protected]' can be exercised against the real registry
Readme
@kree4js/kx-demo-app
A four-file kx app published to npm, so the remote coordinate path can be exercised against the real registry instead of a stubbed package manager:
kx start npm:@kree4js/[email protected]
kx list
kx delete kx-demo-app --forceWhat it is
| file | why |
|---|---|
| kx.application.json | the declaration kx reads: runtime.lang: js, and one service slot hello |
| main.mjs | the package entry — a slot's impl is a named export of this entry |
| impl/hello.mjs | the service (greet) plus a heartbeat on stdout |
| package.json | the npm form: type: module, exports, no dependencies |
The heartbeat is not decoration: kx captures the app's stdout into
<kx home>/logs/<appId>/stdout.log, and a test that greps that file is asserting that the
code inside the published tarball ran — which "the daemon says ready" does not.
No dependencies on purpose: the app is started by kx's own booter (a local, unpublished build during development), and the published copy must not pull any package that has not been published itself.
Publishing
cd examples/50-npm-demo-app
npm pack --dry-run # what would go out
npm publish --access public # @kree4js is a public scope, like @kree4js/kree4jsA published version cannot be replaced: change version in both package.json and
kx.application.json, publish again, and update the coordinate pinned in
packages/kx-cli/test/e2e/test-npm-remote.js.
