@lark-project/meegle 1.0.22 → 1.0.23
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/CHANGELOG.md +11 -0
- package/README.md +9 -1
- package/README.zh-CN.md +9 -1
- package/bin/meegle-darwin-arm64 +0 -0
- package/bin/meegle-darwin-x64 +0 -0
- package/bin/meegle-linux-arm64 +0 -0
- package/bin/meegle-linux-x64 +0 -0
- package/bin/meegle-win32-arm64.exe +0 -0
- package/bin/meegle-win32-x64.exe +0 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,17 @@ versioned section on each npm release.
|
|
|
8
8
|
|
|
9
9
|
## [Unreleased]
|
|
10
10
|
|
|
11
|
+
## [v1.0.23] - 2026-09-08
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- Numeric `--set` inference, schema-declared scalar numeric parameters from named flags, `--params`, or `--set`, and batch numeric IDs now follow JSON number syntax. Non-JSON spellings such as `+1` and `01` remain strings for `--set`; non-numeric values are rejected before transport where a typed scalar number or integer is required, including batch shared parameters.
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
|
|
19
|
+
- Preserve the exact type and lexical form of JSON numbers across CLI and SDK inputs, MCP/HTTP/local responses, JSON/NDJSON/table output, batch IDs, fixed parameters, and output-to-input reuse. Values beyond JavaScript's safe-integer range or Go's `int64` range, high-precision decimals, and exponent notation no longer pass through `float64`; only explicit local control values such as pagination indexes are range-checked.
|
|
20
|
+
- Report the lexicographically first invalid schema-declared numeric parameter consistently when `--params` or `--set` supplies multiple invalid values, for both single and batch commands.
|
|
21
|
+
|
|
11
22
|
## [v1.0.22] - 2026-08-27
|
|
12
23
|
|
|
13
24
|
### Fixed
|
package/README.md
CHANGED
|
@@ -615,17 +615,25 @@ missing required parameters: --user-key, --work-item-type
|
|
|
615
615
|
|
|
616
616
|
### --set key=value (Generic)
|
|
617
617
|
|
|
618
|
-
`--set` is an alternate syntax for writing **top-level** parameters
|
|
618
|
+
`--set` is an alternate syntax for writing **top-level** parameters. For values whose inferred type matches the command schema, `--set key=value` is equivalent to typing `--key value`. It is useful when scripting with a uniform `key=value` form, or for writing nested top-level params via dot-path. Valid JSON numbers are kept as exact numbers (including large integers, high-precision decimals, and exponent notation), `true` / `false` become booleans, and other values remain strings.
|
|
619
619
|
|
|
620
620
|
```bash
|
|
621
621
|
# These two are equivalent:
|
|
622
622
|
meegle mywork todo --action this_week --page-num 1
|
|
623
623
|
meegle mywork todo --set action=this_week --set page_num=1
|
|
624
624
|
|
|
625
|
+
# Exact JSON number; no float64 or int64 conversion:
|
|
626
|
+
--set work_item_id=9007199254740993
|
|
627
|
+
|
|
628
|
+
# Not a valid JSON number, so it remains the string "01":
|
|
629
|
+
--set external_id=01
|
|
630
|
+
|
|
625
631
|
# Dot-path builds nested maps (rarely used in Meegle, but supported):
|
|
626
632
|
--set extra.flag=true # becomes {"extra":{"flag":true}}
|
|
627
633
|
```
|
|
628
634
|
|
|
635
|
+
Schema-declared scalar numeric parameters use the same exact representation whether supplied through a named flag, `--params`, or `--set`. `number` accepts any valid JSON number; `integer` additionally requires an integral value but is not limited to Go's `int64` range. Non-JSON spellings such as `+1` and `01`, as well as non-numeric JSON values, are rejected before the request is sent when the schema requires a scalar number or integer. Explicit CLI control flags such as pagination indexes remain range-checked where required.
|
|
636
|
+
|
|
629
637
|
`--set` only writes **top-level** parameters. To write a work item's `fields[]`, use `--params '{"fields":[...]}'` (see below).
|
|
630
638
|
|
|
631
639
|
### --params JSON
|
package/README.zh-CN.md
CHANGED
|
@@ -604,17 +604,25 @@ missing required parameters: --user-key, --work-item-type
|
|
|
604
604
|
|
|
605
605
|
### --set key=value(通用)
|
|
606
606
|
|
|
607
|
-
`--set` 是普通 flag
|
|
607
|
+
`--set` 是普通 flag 的**替代写法**,只影响**顶层参数**。当推断出的值类型与命令 schema 一致时,`--set key=value` 等价于 `--key value`。它适合在脚本里使用统一的 key=value 语法,或通过 dot-path 写嵌套顶层对象。合法 JSON 数字会作为精确数字保留(包括大整数、高精度小数和指数形式),`true` / `false` 会转为布尔值,其他值保持字符串。
|
|
608
608
|
|
|
609
609
|
```bash
|
|
610
610
|
# 下面两种等价:
|
|
611
611
|
meegle mywork todo --action this_week --page-num 1
|
|
612
612
|
meegle mywork todo --set action=this_week --set page_num=1
|
|
613
613
|
|
|
614
|
+
# 精确保留的 JSON 数字,不经过 float64 或 int64 转换:
|
|
615
|
+
--set work_item_id=9007199254740993
|
|
616
|
+
|
|
617
|
+
# 不是合法 JSON 数字,因此保持字符串 "01":
|
|
618
|
+
--set external_id=01
|
|
619
|
+
|
|
614
620
|
# dot-path 嵌套(Meegle 很少用到,但支持):
|
|
615
621
|
--set extra.flag=true # 变成 {"extra":{"flag":true}}
|
|
616
622
|
```
|
|
617
623
|
|
|
624
|
+
无论通过具名 flag、`--params` 还是 `--set` 提供,接口 schema 声明的标量数字参数都会使用相同的精确表示:`number` 接受任意合法 JSON 数字;`integer` 还要求值在数学上为整数,但不受 Go `int64` 范围限制。schema 要求标量数字或整数时,`+1`、`01` 等非 JSON 数字写法以及非数字 JSON 值会在请求发出前被拒绝。分页序号等明确的 CLI 控制参数仍会按需要做范围校验。
|
|
625
|
+
|
|
618
626
|
`--set` 只写**顶层参数**,**不会**写到工作项的 `fields[]`。写 `fields[]` 请用 `--params '{"fields":[...]}'`(见下)。
|
|
619
627
|
|
|
620
628
|
### --params JSON
|
package/bin/meegle-darwin-arm64
CHANGED
|
Binary file
|
package/bin/meegle-darwin-x64
CHANGED
|
Binary file
|
package/bin/meegle-linux-arm64
CHANGED
|
Binary file
|
package/bin/meegle-linux-x64
CHANGED
|
Binary file
|
|
Binary file
|
package/bin/meegle-win32-x64.exe
CHANGED
|
Binary file
|