@livon/cli 0.27.0-rc.3 → 0.28.0-rc.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 LIVON contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,8 +1,85 @@
1
+ <!-- Generated from website/docs/packages/*.md. Do not edit directly. -->
2
+
1
3
  # @livon/cli
2
4
 
3
- Package docs (GitHub Pages):
4
- - https://live-input-vector-output-node.github.io/livon-ts/docs/packages/cli
5
5
 
6
- License:
7
- - MIT
8
- - Root license text: `../../LIZENZ.md`
6
+ [![npm](https://img.shields.io/npm/v/%40livon%2Fcli)](https://www.npmjs.com/package/@livon/cli)
7
+ [![dependencies](https://img.shields.io/librariesio/release/npm/%40livon%2Fcli?label=dependencies)](https://libraries.io/npm/%40livon%2Fcli)
8
+ [![code quality](https://img.shields.io/github/actions/workflow/status/live-input-vector-output-node/livon-ts/code-quality.yml?branch=main&label=code%20quality)](https://github.com/live-input-vector-output-node/livon-ts/actions/workflows/code-quality.yml)
9
+ [![package size](https://img.shields.io/npm/unpacked-size/%40livon%2Fcli?label=package%20size)](https://www.npmjs.com/package/@livon/cli)
10
+ [![license](https://img.shields.io/github/license/live-input-vector-output-node/livon-ts)](https://github.com/live-input-vector-output-node/livon-ts)
11
+
12
+ ## Purpose
13
+
14
+ CLI for syncing [schema AST](https://livon.tech/docs/schema) from a running server and generating/updating client outputs.
15
+
16
+ ## Best for
17
+
18
+ Use this package when you want generated client APIs to stay in sync during local development and CI.
19
+
20
+ ## Install
21
+
22
+ ```sh
23
+ pnpm add -D @livon/cli
24
+ ```
25
+
26
+ ## Recommended command (sync + app)
27
+
28
+ ```sh
29
+ livon \
30
+ --endpoint ws://127.0.0.1:3002/ws \
31
+ --out src/generated/api.ts \
32
+ --poll 2000 \
33
+ -- pnpm dev
34
+ ```
35
+
36
+ ## Generated output mode
37
+
38
+ `livon` always runs in `rslib` mode after sync.
39
+
40
+ - default output: `esm + cjs + d.ts`
41
+ - use `--esm` or `--cjs` to build only the selected format
42
+ - use `--js` when you only need `esm + cjs` and want to skip declaration files
43
+
44
+ With `--out src/generated/api.ts`, compiled files are written to `src/generated/dist`.
45
+ `livon` also writes `src/generated/package.json` with conditional exports, so `import { api } from './generated'` resolves to the matching build output.
46
+
47
+ ## Linked process lifecycle
48
+
49
+ If the linked command exits, `livon` exits too.
50
+ If `livon` exits, it terminates the linked command.
51
+
52
+ If your linked command starts with flags, use `--` before it:
53
+
54
+ ```sh
55
+ livon --endpoint ws://127.0.0.1:3002/ws --out src/generated/api.ts -- --some-command --flag
56
+ ```
57
+
58
+ ## Parameters
59
+
60
+ - `--endpoint <ws-url>` (`string`): websocket endpoint used to fetch [schema explain data](https://livon.tech/docs/packages/schema) (required unless `--port` is used).
61
+ - `--port <number>` (`number`): overrides endpoint port when endpoint host/path stay unchanged.
62
+ - `--out <file>` (`string`): output file path for generated API module.
63
+ - `--poll <ms>` (`number`): polling interval for repeated sync runs.
64
+ - `--timeout <ms>` (`number`): request timeout per sync call.
65
+ - `--event <name>` (`string`): [schema explain](https://livon.tech/docs/packages/schema) event name (default: `$explain`).
66
+ - `--method <GET|POST>` (`string`): request method for explain fetch.
67
+ - `--header key:value` (`string`, repeatable): additional request header.
68
+ - `--payload <json>` (`string`): raw JSON payload body for explain request.
69
+ - `--esm` (`boolean`): build only ESM output (`dist/index.js`).
70
+ - `--cjs` (`boolean`): build only CJS output (`dist/index.cjs`).
71
+ - `--js` (`boolean`): builds only `esm + cjs` (skips `.d.ts` output).
72
+ - `--no-event` (`boolean`): disables event wrapping behavior for transports expecting plain request mode.
73
+ - `--` (delimiter): separates livon flags from linked command arguments.
74
+
75
+ ## Typical workflow
76
+
77
+ 1. Start server with [`schemaModule(..., { explain: true })`](https://livon.tech/docs/packages/schema).
78
+ 2. Run CLI in watch/poll mode during client development.
79
+ 3. Use generated API module in the client runtime.
80
+
81
+ ## Related pages
82
+
83
+ - [@livon/schema](https://livon.tech/docs/packages/schema)
84
+ - [@livon/client](https://livon.tech/docs/packages/client)
85
+ - [Getting Started](https://livon.tech/docs/core/getting-started)
@@ -2,6 +2,57 @@ Third-Party Notices
2
2
 
3
3
  This package includes third-party software. The following licenses apply:
4
4
 
5
+ ------------------------------------------------------------------------------
6
+ @rslib/core
7
+ ------------------------------------------------------------------------------
8
+ License: MIT
9
+
10
+ Copyright (c) 2024-present Bytedance, Inc. and its affiliates.
11
+
12
+ Permission is hereby granted, free of charge, to any person obtaining a copy
13
+ of this software and associated documentation files (the "Software"), to deal
14
+ in the Software without restriction, including without limitation the rights
15
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
+ copies of the Software, and to permit persons to whom the Software is
17
+ furnished to do so, subject to the following conditions:
18
+
19
+ The above copyright notice and this permission notice shall be included in all
20
+ copies or substantial portions of the Software.
21
+
22
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
+ SOFTWARE.
29
+
30
+ ------------------------------------------------------------------------------
31
+ ws
32
+ ------------------------------------------------------------------------------
33
+ License: MIT
34
+
35
+ Copyright (c) 2011 Einar Otto Stangvik <einaros@gmail.com>
36
+ Copyright (c) 2013 Arnout Kazemier and contributors
37
+ Copyright (c) 2016 Luigi Pinca and contributors
38
+
39
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
40
+ this software and associated documentation files (the "Software"), to deal in
41
+ the Software without restriction, including without limitation the rights to
42
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
43
+ the Software, and to permit persons to whom the Software is furnished to do so,
44
+ subject to the following conditions:
45
+
46
+ The above copyright notice and this permission notice shall be included in all
47
+ copies or substantial portions of the Software.
48
+
49
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
50
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
51
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
52
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
53
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
54
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
55
+
5
56
  ------------------------------------------------------------------------------
6
57
  msgpackr
7
58
  ------------------------------------------------------------------------------