@univer-cli/api-reference-command 1.0.0-beta.2 → 1.0.0
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/README.md +40 -2
- package/README.zh-CN.md +36 -2
- package/dist/index.mjs +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -33,8 +33,9 @@ await program.parseAsync();
|
|
|
33
33
|
After building the CLI, query the reference directly:
|
|
34
34
|
|
|
35
35
|
```bash
|
|
36
|
-
my-cli api find
|
|
36
|
+
my-cli api find conditionformat --unit sheet
|
|
37
37
|
my-cli api show FRange FRange.setValues ICellData.v
|
|
38
|
+
my-cli api show ConditionalFormatHighlightRuleBuilder.setRanges
|
|
38
39
|
```
|
|
39
40
|
|
|
40
41
|
## Command list
|
|
@@ -44,7 +45,44 @@ api find <terms...> [--unit <sheet|slide|doc|base|board>]
|
|
|
44
45
|
api show <symbols...>
|
|
45
46
|
```
|
|
46
47
|
|
|
47
|
-
|
|
48
|
+
### Choosing `find` or `show`
|
|
49
|
+
|
|
50
|
+
- When no relevant class or API symbol is known, use `find` with API-name keywords or identifier fragments.
|
|
51
|
+
- When a class is known, use `show <Class>` to list its supported APIs.
|
|
52
|
+
- When an exact class, member, type, field, or enum symbol is known, use `show <symbol>` to inspect it in detail.
|
|
53
|
+
- Chain-only classes reached through public Facade return signatures are valid `show` targets even when the upstream package does not export them as Facade roots.
|
|
54
|
+
|
|
55
|
+
Pass a useful symbol returned by `find` directly to `show`; do not search for the same symbol again.
|
|
56
|
+
|
|
57
|
+
`show` renders a supported public `.d.ts` projection. A class query includes the class JSDoc and,
|
|
58
|
+
when available, a one-line summary JSDoc immediately above each member signature; inherited and
|
|
59
|
+
composed members remain in named source declaration blocks. An exact member query includes its
|
|
60
|
+
complete signature, complete JSDoc, examples, and directly referenced type declarations. Show
|
|
61
|
+
signatures and type declarations are not truncated.
|
|
62
|
+
|
|
63
|
+
### `find` query semantics
|
|
64
|
+
|
|
65
|
+
`find` searches the installed SDK index by API-name keyword or identifier fragment; it does not interpret intent. Search is case-insensitive. Every query argument is searched independently and returns its own matches, so multiple arguments are not combined with AND. Quote multiple words when they should be treated as one keyword query.
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
# One multi-word query
|
|
69
|
+
api find "condition format" --unit sheet
|
|
70
|
+
|
|
71
|
+
# One compact query
|
|
72
|
+
api find conditionformat --unit sheet
|
|
73
|
+
|
|
74
|
+
# Intentional batch lookup: two independent queries and two result sections
|
|
75
|
+
api find setValues getValues --unit sheet
|
|
76
|
+
|
|
77
|
+
# Common mistake: this is not "condition AND format";
|
|
78
|
+
# it runs two broad, independent searches instead.
|
|
79
|
+
api find condition format
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
`find` prints concise human-readable matches; `show` prints precise declaration details. A batch
|
|
83
|
+
`show` labels every result as `// [found]` or `// [not-found]` and prints a batch summary. If any
|
|
84
|
+
symbol is not found, diagnostics are written to stderr and the command exits non-zero. Commander
|
|
85
|
+
also handles invalid arguments and reference execution errors.
|
|
48
86
|
|
|
49
87
|
## Customize with Commander
|
|
50
88
|
|
package/README.zh-CN.md
CHANGED
|
@@ -34,8 +34,9 @@ await program.parseAsync();
|
|
|
34
34
|
构建后可直接查询:
|
|
35
35
|
|
|
36
36
|
```bash
|
|
37
|
-
my-cli api find
|
|
37
|
+
my-cli api find conditionformat --unit sheet
|
|
38
38
|
my-cli api show FRange FRange.setValues ICellData.v
|
|
39
|
+
my-cli api show ConditionalFormatHighlightRuleBuilder.setRanges
|
|
39
40
|
```
|
|
40
41
|
|
|
41
42
|
## 命令一览
|
|
@@ -45,7 +46,40 @@ api find <terms...> [--unit <sheet|slide|doc|base|board>]
|
|
|
45
46
|
api show <symbols...>
|
|
46
47
|
```
|
|
47
48
|
|
|
48
|
-
`find`
|
|
49
|
+
### 选择 `find` 或 `show`
|
|
50
|
+
|
|
51
|
+
- 不知道相关 class 或 API symbol 时,使用 API 名关键词或 identifier fragment 执行 `find`。
|
|
52
|
+
- 已知 class 时,使用 `show <Class>` 列出它支持的 API。
|
|
53
|
+
- 已知准确的 class、member、type、field 或 enum symbol 时,使用 `show <symbol>` 查看详情。
|
|
54
|
+
- 公开 Facade 返回签名可达的链式 class 即使不是上游 package 直接导出的 Facade root,也可以作为 `show` 查询目标。
|
|
55
|
+
|
|
56
|
+
将 `find` 返回的有用 symbol 直接传给 `show`,不要再次搜索同一个 symbol。
|
|
57
|
+
|
|
58
|
+
`show` 输出受支持的公开 `.d.ts` 投影。查询 class 时会显示 class 的完整 JSDoc,并在有内容时于每个 member
|
|
59
|
+
签名的上一行显示单行摘要 JSDoc;继承和组合成员仍放在标明来源的独立声明块中。精确查询 member 时会显示
|
|
60
|
+
完整签名、完整 JSDoc、example 和直接引用的 type declaration。`show` 不截断签名或 type declaration。
|
|
61
|
+
|
|
62
|
+
### `find` query 规则
|
|
63
|
+
|
|
64
|
+
`find` 使用 API 名关键词或 identifier fragment 搜索已安装 SDK 的索引,不会解释意图。搜索不区分大小写;每个 query 参数都独立搜索并分别返回结果,因此多个参数不会按 AND 组合。需要把多个单词作为一个关键词 query 时,必须使用引号。
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
# 一个多单词 query
|
|
68
|
+
api find "condition format" --unit sheet
|
|
69
|
+
|
|
70
|
+
# 一个紧凑 query
|
|
71
|
+
api find conditionformat --unit sheet
|
|
72
|
+
|
|
73
|
+
# 有意进行批量查找:两个独立 query,输出两个结果区块
|
|
74
|
+
api find setValues getValues --unit sheet
|
|
75
|
+
|
|
76
|
+
# 常见错误:这不是“condition AND format”;
|
|
77
|
+
# 实际会执行两个宽泛且相互独立的搜索。
|
|
78
|
+
api find condition format
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
`find` 输出精简的候选项;`show` 输出精确声明详情。批量 `show` 会为每个结果标记 `// [found]` 或
|
|
82
|
+
`// [not-found]`,并输出汇总。只要存在找不到的 symbol,就会向 stderr 写入诊断并以失败退出。参数非法或
|
|
49
83
|
reference 执行异常也由 Commander 处理。
|
|
50
84
|
|
|
51
85
|
## 使用原生 Commander 定制
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x5ab296,_0x152772){const _0x3b5436=_0x559d,_0x4d8227=_0x5ab296();while(!![]){try{const _0x5df670=-parseInt(_0x3b5436(0x1f6))/0x1*(parseInt(_0x3b5436(0x1da))/0x2)+-parseInt(_0x3b5436(0x1b1))/0x3*(-parseInt(_0x3b5436(0x1c4))/0x4)+parseInt(_0x3b5436(0x1ff))/0x5*(parseInt(_0x3b5436(0x1ba))/0x6)+parseInt(_0x3b5436(0x1e4))/0x7+parseInt(_0x3b5436(0x1e6))/0x8+-parseInt(_0x3b5436(0x223))/0x9*(-parseInt(_0x3b5436(0x1bd))/0xa)+-parseInt(_0x3b5436(0x213))/0xb*(parseInt(_0x3b5436(0x215))/0xc);if(_0x5df670===_0x152772)break;else _0x4d8227['push'](_0x4d8227['shift']());}catch(_0x26e060){_0x4d8227['push'](_0x4d8227['shift']());}}}(_0x3d16,0xbfdf7));import{API_REFERENCE_UNITS as _0x30c3a4}from'@univer-cli/api-reference';import{Command as _0x5f4f23,Option as _0x5c242a}from'commander';var r=0x48,i=0x5a,a=0x58,o=0x64,s=0x4c,c=0x50;function l(_0x49555d){const _0x5f2731=_0x559d;return(_0x49555d[_0x5f2731(0x1bb)](/^(.*?[.。])(\s|$)/u)?.[0x1]??_0x49555d)['trim']();}function u(_0x2576b6,_0x5833ba){const _0x5d798a=_0x559d;return _0x2576b6['length']>_0x5833ba?_0x2576b6[_0x5d798a(0x21c)](0x0,_0x5833ba-0x1)+'…':_0x2576b6;}function d(_0x47a5fe){const _0x53e860=_0x559d;let _0x208704=_0x47a5fe['summary']===''?'':_0x53e860(0x1ea)+l(_0x47a5fe[_0x53e860(0x1d0)]);return'['+_0x47a5fe['kind']+']\x20'+u(_0x47a5fe[_0x53e860(0x210)],r)+u(_0x208704,i)+_0x53e860(0x1ca)+_0x47a5fe['packageName']+']';}function f(_0x289ad9,_0x32f1e7){const _0x41f11e=_0x559d;if(_0x289ad9[_0x41f11e(0x20c)][_0x41f11e(0x21a)]===0x0){let _0x309062=_0x32f1e7===void 0x0?'':_0x41f11e(0x1f8)+_0x32f1e7+')';return'No\x20API\x20matches\x20\x22'+_0x289ad9[_0x41f11e(0x1f1)]+'\x22'+_0x309062+_0x41f11e(0x1c9)+(_0x32f1e7===void 0x0?'':_0x41f11e(0x211))+',\x20or\x20api\x20show\x20<Class>\x20to\x20browse\x20a\x20whole\x20class.';}let _0x50ec5f=_0x289ad9['matches'][_0x41f11e(0x1cb)](d),_0x2902ff=_0x289ad9[_0x41f11e(0x1ac)]-_0x289ad9['matches'][_0x41f11e(0x21a)];return _0x2902ff>0x0&&_0x50ec5f['push']('…\x20'+_0x2902ff+_0x41f11e(0x203)),_0x50ec5f[_0x41f11e(0x1d1)]('\x0a');}function p(_0x48d589,_0x3e9608){const _0x4dadd0=_0x559d;return _0x48d589['map'](_0x2b796b=>{const _0x1e01cd=_0x559d;let _0x5c7d68=f(_0x2b796b,_0x3e9608);return _0x48d589[_0x1e01cd(0x21a)]>0x1?'══\x20'+_0x2b796b[_0x1e01cd(0x1f1)]+_0x1e01cd(0x1ce)+_0x5c7d68:_0x5c7d68;})[_0x4dadd0(0x1d1)]('\x0a\x0a');}function m(_0x4b8e24,_0x59add2=a){const _0x3500f3=_0x559d;let _0x2cdc85=(_0x4b8e24[_0x3500f3(0x1b0)]??[])[_0x3500f3(0x1cb)](_0x8d4425=>_0x8d4425['name']+'='+_0x8d4425[_0x3500f3(0x1f4)])[_0x3500f3(0x1d1)]('\x20');return u(_0x4b8e24[_0x3500f3(0x1f2)]+':\x20'+_0x2cdc85,_0x59add2);}function h(_0x1654b0,_0x5502f6=a){const _0x90e7b0=_0x559d;let _0x3a7a2d=(_0x1654b0['members']??[])[_0x90e7b0(0x1cb)](_0x16d225=>''+_0x16d225[_0x90e7b0(0x1f2)]+(_0x16d225[_0x90e7b0(0x1b6)]?'?':'')),_0xdf6f07=_0x1654b0[_0x90e7b0(0x1a4)]===void 0x0?'':_0x90e7b0(0x1a5)+_0x1654b0['extends'];return u(''+_0x1654b0[_0x90e7b0(0x1f2)]+_0xdf6f07+_0x90e7b0(0x1d6)+_0x3a7a2d[_0x90e7b0(0x1d1)](',\x20')+'\x20}',_0x5502f6);}function g(_0x3edce8){const _0x5cc967=_0x559d;return _0x3edce8[_0x5cc967(0x21a)]===0x0?[]:['',_0x5cc967(0x1a7),..._0x3edce8[_0x5cc967(0x1cb)](_0x1beb94=>_0x1beb94[_0x5cc967(0x1f0)]==='enum'?'\x20\x20'+m(_0x1beb94,o):_0x1beb94[_0x5cc967(0x1f0)]===_0x5cc967(0x1dc)?'\x20\x20'+_0x1beb94[_0x5cc967(0x1f2)]+_0x5cc967(0x1e0)+u(_0x1beb94['definition']??'',o):'\x20\x20'+h(_0x1beb94,o)),_0x5cc967(0x219)];}function _(_0x2596a6){const _0x4d9378=_0x559d;let _0x2e3901=_0x2596a6[_0x4d9378(0x1d0)]===''?'':'\x20\x20—\x20'+l(_0x2596a6['summary']);return'['+(''+(_0x2596a6[_0x4d9378(0x1f5)]?'readonly\x20':'')+_0x2596a6[_0x4d9378(0x1f0)])+']\x20'+u(_0x2596a6[_0x4d9378(0x21d)]+'.'+_0x2596a6[_0x4d9378(0x210)],r)+u(_0x2e3901,i);}function v(_0x4d1bfc){const _0x3b2d09=_0x559d;let _0x2a008e=_0x4d1bfc[_0x3b2d09(0x1d0)]===void 0x0?'':_0x3b2d09(0x1ea)+l(_0x4d1bfc[_0x3b2d09(0x1d0)]);return'\x20\x20'+u(''+_0x4d1bfc[_0x3b2d09(0x1f2)]+(_0x4d1bfc[_0x3b2d09(0x1b6)]?'?':'')+':\x20'+_0x4d1bfc[_0x3b2d09(0x201)],s)+u(_0x2a008e,c);}function _0x3d16(){const _0x72b9d0=['kind','term','name','(...).','value','readonly','1548811eJfVeH','\x0a\x20\x20If\x20unsure,\x20api\x20find\x20<keyword>\x20to\x20search\x20by\x20intent,\x20or\x20api\x20show\x20<class\x20alias:\x20range/slide/document/presentation/api>\x20to\x20browse\x20a\x20whole\x20class.','\x20(filtered\x20by\x20--unit\x20','.<member>','getter','writeOut','api.reference.not-found','example','@example','2895ySsFEG','packageName','type','limit\x20results\x20to\x20one\x20unit\x20while\x20retaining\x20shared\x20APIs','\x20more.\x20Narrow\x20with\x20a\x20longer\x20substring,\x20or\x20api\x20show\x20<symbol>\x20for\x20details.','found','relationOwner','--unit\x20<unit>','function-property','filter','\x20is\x20a\x20callable\x20function\x20property;\x20call\x20it\x20as\x20','show','target','matches','Supported\x20via\x20','\x20supported\x20members)','inherited','signature',',\x20drop\x20--unit','\x0a\x20\x20List\x20all:\x20api\x20show\x20','11HTRdpu','enum','17560572oSCbIX','outputHelp',';\x20composed\x20by\x20','\x20\x20(also\x20univerAPI.Enum:\x20','(details:\x20api\x20show\x20<TypeName>)','length','<terms...>','slice','owner','\x20\x20(','details:\x20api\x20show\x20','reference',';\x20inherited\x20by\x20','relation','543573UJBrJe','extends','\x20extends\x20','Offline\x20Univer\x20Facade\x20API\x20reference','Types:','members','unit','entries','\x0a\x20\x20Similar\x20','totalMatches','push','configureOutput','().','values','2085bznGrW','Unknown\x20symbol:\x20','Do\x20not\x20assign\x20to\x20','split','error','optional','composed','symbols','class','4182IrLsnX','match','Show\x20exact\x20API\x20classes,\x20members,\x20types,\x20fields,\x20or\x20enum\x20values','10UqdUVT','composes','\x20is\x20a\x20','command','action','Find\x20API\x20methods,\x20types,\x20fields,\x20and\x20enums\x20by\x20keyword','aliases','5556qgSObP','Composed\x20from\x20','lineage','<symbols...>','choices','.\x20Try\x20a\x20shorter\x20substring','\x20\x20[','map','api','find','\x20══\x0a','reduce','summary','join','<Class>','status','composes\x20','one\x20or\x20more\x20terms,\x20searched\x20independently','\x20{\x20','not-found','one\x20or\x20more\x20exact\x20API\x20symbols','exact\x20symbols;\x20shorthand\x20for\x20api\x20show','2oscsum','appendix','alias','description','argument','declaredBy','\x20=\x20','suggestions','readonly\x20','inherits\x20','5611627DbyGPw','methods','12537016FMAELB','member','[symbols...]','\x20+\x20','\x20\x20—\x20','Access:\x20','\x20has\x20no\x20','enum\x20','getter\x20property','\x20→\x20'];_0x3d16=function(){return _0x72b9d0;};return _0x3d16();}function y(_0xb890b5,_0x37fa51){const _0xe56c27=_0x559d;let _0x439afc=_0xb890b5[_0xe56c27(0x1c3)]??[],_0x2e8f1a=_0x439afc[_0xe56c27(0x21a)]===0x0?'':_0xe56c27(0x218)+_0x439afc[_0xe56c27(0x1d1)](',\x20')+')';if(_0xb890b5[_0xe56c27(0x1f0)]===_0xe56c27(0x214))return[_0xe56c27(0x1ed)+_0xb890b5['name']+_0xe56c27(0x1ca)+_0xb890b5[_0xe56c27(0x200)]+']'+_0x2e8f1a,..._0xb890b5[_0xe56c27(0x1d0)]===''?[]:['',_0xb890b5[_0xe56c27(0x1d0)]],'',...(_0xb890b5[_0xe56c27(0x1b0)]??[])[_0xe56c27(0x1cb)](_0x10be53=>'\x20\x20'+_0x10be53['name']+_0xe56c27(0x1e0)+_0x10be53[_0xe56c27(0x1f4)])][_0xe56c27(0x1d1)]('\x0a');if(_0xb890b5[_0xe56c27(0x1f0)]===_0xe56c27(0x1dc))return['type\x20'+_0xb890b5[_0xe56c27(0x1f2)]+_0xe56c27(0x1e0)+(_0xb890b5['definition']??'')+_0xe56c27(0x1ca)+_0xb890b5['packageName']+']'+_0x2e8f1a,..._0xb890b5['summary']===''?[]:['',_0xb890b5[_0xe56c27(0x1d0)]]][_0xe56c27(0x1d1)]('\x0a');let _0x3c1641=_0xb890b5['extends']===void 0x0?'':_0xe56c27(0x1a5)+_0xb890b5[_0xe56c27(0x1a4)],_0x40012c=['interface\x20'+_0xb890b5[_0xe56c27(0x1f2)]+_0x3c1641+_0xe56c27(0x1ca)+_0xb890b5[_0xe56c27(0x200)]+']'+_0x2e8f1a,..._0xb890b5[_0xe56c27(0x1d0)]===''?[]:['',_0xb890b5['summary']],'',...(_0xb890b5[_0xe56c27(0x1a8)]??[])[_0xe56c27(0x1cb)](v)];for(let _0x39d7b7 of _0x37fa51)_0x40012c['push']('','Inherited\x20from\x20'+_0x39d7b7[_0xe56c27(0x1f2)]+':',...(_0x39d7b7[_0xe56c27(0x1a8)]??[])['map'](v));return _0x40012c[_0xe56c27(0x1d1)]('\x0a');}function _0x559d(_0x52be27,_0x3c3d60){_0x52be27=_0x52be27-0x1a4;const _0x3d16cd=_0x3d16();let _0x559de2=_0x3d16cd[_0x52be27];return _0x559de2;}function b(_0x173ea7){const _0x2b8f62=_0x559d;if(_0x173ea7[_0x2b8f62(0x1f0)]===_0x2b8f62(0x207))return[_0x2b8f62(0x1eb)+_0x173ea7[_0x2b8f62(0x1f2)]+_0x2b8f62(0x209)+_0x173ea7[_0x2b8f62(0x1f2)]+_0x2b8f62(0x1f3)];if(_0x173ea7[_0x2b8f62(0x1f0)]!=='getter'&&_0x173ea7[_0x2b8f62(0x1f0)]!=='property')return[];let _0x370e24=_0x173ea7[_0x2b8f62(0x1f0)]==='getter'?_0x2b8f62(0x1ee):'property',_0x571033=_0x173ea7[_0x2b8f62(0x1f0)]===_0x2b8f62(0x1fa)||_0x173ea7[_0x2b8f62(0x1f5)]?_0x2b8f62(0x1e2):'';return[_0x2b8f62(0x1eb)+_0x173ea7[_0x2b8f62(0x1f2)]+_0x2b8f62(0x1bf)+_0x571033+_0x370e24+';\x20do\x20not\x20call\x20'+_0x173ea7[_0x2b8f62(0x1f2)]+_0x2b8f62(0x1af),..._0x173ea7[_0x2b8f62(0x1f5)]?[_0x2b8f62(0x1b3)+_0x173ea7['name']+'.']:[]];}function x(_0x5ed9dd){const _0x59a825=_0x559d;if(_0x5ed9dd['status']===_0x59a825(0x1d7))return'';if(_0x5ed9dd[_0x59a825(0x1f0)]===_0x59a825(0x1b9)){let _0x2d6d44=_0x5ed9dd['groups'][_0x59a825(0x1cf)]((_0x50f640,_0x2fffe7)=>_0x50f640+_0x2fffe7['members'][_0x59a825(0x21a)],0x0),_0x98b028=[_0x5ed9dd[_0x59a825(0x1f2)]+_0x59a825(0x21e)+_0x2d6d44+_0x59a825(0x20e)];_0x5ed9dd[_0x59a825(0x1c6)][_0x59a825(0x21a)]>0x1&&_0x98b028['push'](_0x59a825(0x1e3)+_0x5ed9dd[_0x59a825(0x1c6)][_0x59a825(0x21c)](0x1)[_0x59a825(0x1d1)](_0x59a825(0x1ef))),_0x5ed9dd['composes'][_0x59a825(0x21a)]>0x0&&_0x98b028[_0x59a825(0x1ad)](_0x59a825(0x1d4)+_0x5ed9dd[_0x59a825(0x1be)][_0x59a825(0x1d1)](_0x59a825(0x1e9)));for(let _0x1e5990 of _0x5ed9dd['groups'])_0x1e5990['relation']===_0x59a825(0x20f)&&_0x98b028[_0x59a825(0x1ad)]('','Inherited\x20from\x20'+_0x1e5990[_0x59a825(0x21d)]+':'),_0x1e5990[_0x59a825(0x222)]==='composed'&&_0x98b028[_0x59a825(0x1ad)]('',_0x59a825(0x1c5)+_0x1e5990[_0x59a825(0x21d)]+':'),_0x98b028[_0x59a825(0x1ad)](..._0x1e5990[_0x59a825(0x1a8)][_0x59a825(0x1cb)](_0x54a9e6=>'\x20\x20'+_(_0x54a9e6)));return _0x98b028[_0x59a825(0x1ad)]('',_0x59a825(0x21f)+_0x5ed9dd[_0x59a825(0x1f2)]+_0x59a825(0x1f9)),_0x98b028[_0x59a825(0x1d1)]('\x0a');}if(_0x5ed9dd['kind']===_0x59a825(0x1e7)){let _0x5eef17=[];for(let [_0x106cde,_0xb8082d]of _0x5ed9dd[_0x59a825(0x1aa)]['entries']()){let _0x1a25d8=_0xb8082d['member'];_0x5eef17[_0x59a825(0x1ad)](_0x1a25d8['owner']+'.'+_0x1a25d8[_0x59a825(0x210)]);let _0xbad315=b(_0x1a25d8);_0xbad315['length']>0x0&&_0x5eef17[_0x59a825(0x1ad)]('',..._0xbad315),_0xb8082d[_0x59a825(0x222)]===_0x59a825(0x20f)&&_0x5eef17[_0x59a825(0x1ad)]('',_0x59a825(0x20d)+_0xb8082d['relationOwner']+_0x59a825(0x221)+_0x5ed9dd[_0x59a825(0x20b)]+'.'),_0xb8082d[_0x59a825(0x222)]===_0x59a825(0x1b7)&&_0x5eef17[_0x59a825(0x1ad)]('',_0x59a825(0x20d)+_0xb8082d[_0x59a825(0x205)]+_0x59a825(0x217)+_0x5ed9dd[_0x59a825(0x20b)]+'.'),_0x1a25d8['summary']!==''&&_0x5eef17[_0x59a825(0x1ad)]('',_0x1a25d8[_0x59a825(0x1d0)]),_0x5eef17[_0x59a825(0x1ad)](...g(_0xb8082d[_0x59a825(0x1db)])),_0x1a25d8[_0x59a825(0x1fd)]!==''&&_0x5eef17[_0x59a825(0x1ad)]('',_0x59a825(0x1fe),_0x1a25d8['example'][_0x59a825(0x1b4)]('\x0a')['map'](_0x4f45bc=>'\x20\x20'+_0x4f45bc)[_0x59a825(0x1d1)]('\x0a')),_0x106cde<_0x5ed9dd[_0x59a825(0x1aa)][_0x59a825(0x21a)]-0x1&&_0x5eef17['push']('','———');}return _0x5eef17[_0x59a825(0x1d1)]('\x0a');}return _0x5ed9dd[_0x59a825(0x1f0)]===_0x59a825(0x201)?[y(_0x5ed9dd[_0x59a825(0x201)],_0x5ed9dd[_0x59a825(0x20f)]),...g(_0x5ed9dd[_0x59a825(0x1db)])][_0x59a825(0x1d1)]('\x0a'):'value'in _0x5ed9dd['member']?_0x5ed9dd['declaredBy'][_0x59a825(0x1f2)]+'.'+_0x5ed9dd[_0x59a825(0x1e7)][_0x59a825(0x1f2)]+_0x59a825(0x1e0)+_0x5ed9dd[_0x59a825(0x1e7)][_0x59a825(0x1f4)]+_0x59a825(0x1ca)+_0x5ed9dd['declaredBy'][_0x59a825(0x200)]+']':[_0x5ed9dd[_0x59a825(0x1df)][_0x59a825(0x1f2)]+'.'+_0x5ed9dd[_0x59a825(0x1e7)][_0x59a825(0x1f2)]+(_0x5ed9dd['member']['optional']?'?':'')+':\x20'+_0x5ed9dd[_0x59a825(0x1e7)][_0x59a825(0x201)]+'\x20\x20['+_0x5ed9dd[_0x59a825(0x1df)][_0x59a825(0x200)]+']',..._0x5ed9dd[_0x59a825(0x1e7)][_0x59a825(0x1d0)]===void 0x0?[]:['',_0x5ed9dd[_0x59a825(0x1e7)][_0x59a825(0x1d0)]],...g(_0x5ed9dd[_0x59a825(0x1db)])][_0x59a825(0x1d1)]('\x0a');}function S(_0x53a094){const _0x50a812=_0x559d;let _0x1fe5ad=_0x53a094[_0x50a812(0x1e1)][_0x50a812(0x21a)]===0x0?'':_0x50a812(0x1ab)+(_0x53a094[_0x50a812(0x1f0)]===_0x50a812(0x1e7)?_0x50a812(0x1e5):_0x50a812(0x1b8))+':\x20'+_0x53a094['suggestions'][_0x50a812(0x1d1)](',\x20');return _0x53a094['kind']===_0x50a812(0x1e7)?(_0x53a094[_0x50a812(0x21d)]??'Symbol')+_0x50a812(0x1ec)+(_0x53a094[_0x50a812(0x1e7)]??_0x50a812(0x1e7))+_0x1fe5ad+_0x50a812(0x212)+(_0x53a094['owner']??_0x50a812(0x1d2)):_0x50a812(0x1b2)+_0x53a094['query']+_0x1fe5ad+_0x50a812(0x1f7);}function C(_0x4f30de,_0x5d401c){const _0x21f096=_0x559d;let _0x5ab96c=_0x4f30de[_0x21f096(0x1ae)](),_0x34f831=_0x5d401c[_0x21f096(0x208)](_0x30c937=>_0x30c937[_0x21f096(0x1d3)]===_0x21f096(0x204));_0x34f831[_0x21f096(0x21a)]>0x0&&_0x5ab96c[_0x21f096(0x1fb)]?.(_0x34f831[_0x21f096(0x1cb)](_0x3ec922=>_0x5d401c[_0x21f096(0x21a)]>0x1?'══\x20'+_0x3ec922['query']+'\x20══\x0a'+x(_0x3ec922):x(_0x3ec922))[_0x21f096(0x1d1)]('\x0a\x0a')+'\x0a');let _0x1f4d8e=_0x5d401c[_0x21f096(0x208)](_0x14469c=>_0x14469c[_0x21f096(0x1d3)]===_0x21f096(0x1d7))[_0x21f096(0x1cb)](S);_0x1f4d8e[_0x21f096(0x21a)]>0x0&&_0x4f30de[_0x21f096(0x1b5)](_0x1f4d8e[_0x21f096(0x1d1)]('\x0a'),{'code':_0x21f096(0x1fc),'exitCode':0x1});}function w(_0x3252a8){const _0x233f63=_0x559d;let _0xa15088=new _0x5f4f23(_0x233f63(0x1cc))[_0x233f63(0x1dd)](_0x233f63(0x1a6))[_0x233f63(0x1de)](_0x233f63(0x1e8),_0x233f63(0x1d9))[_0x233f63(0x1c1)](_0x31b508=>{const _0x2834fe=_0x233f63;if(_0x31b508[_0x2834fe(0x21a)]===0x0){_0xa15088[_0x2834fe(0x216)]();return;}C(_0xa15088,_0x3252a8['reference']['show'](_0x31b508));});return _0xa15088[_0x233f63(0x1c0)]('find')[_0x233f63(0x1dd)](_0x233f63(0x1c2))[_0x233f63(0x1de)](_0x233f63(0x21b),_0x233f63(0x1d5))['addOption'](new _0x5c242a(_0x233f63(0x206),_0x233f63(0x202))[_0x233f63(0x1c8)](_0x30c3a4))[_0x233f63(0x1c1)]((_0x3c44f7,_0x71f6ab)=>{const _0x2ff386=_0x233f63;let _0x4a427d=_0x3252a8['reference'][_0x2ff386(0x1cd)]({'terms':_0x3c44f7,..._0x71f6ab[_0x2ff386(0x1a9)]===void 0x0?{}:{'unit':_0x71f6ab[_0x2ff386(0x1a9)]}});_0xa15088[_0x2ff386(0x1ae)]()[_0x2ff386(0x1fb)]?.(p(_0x4a427d,_0x71f6ab[_0x2ff386(0x1a9)])+'\x0a');}),_0xa15088['command'](_0x233f63(0x20a))[_0x233f63(0x1dd)](_0x233f63(0x1bc))[_0x233f63(0x1de)](_0x233f63(0x1c7),_0x233f63(0x1d8))[_0x233f63(0x1c1)](_0x27e986=>{const _0x55bba5=_0x233f63;C(_0xa15088,_0x3252a8[_0x55bba5(0x220)][_0x55bba5(0x20a)](_0x27e986));}),_0xa15088;}export{w as createApiCommand};
|
|
1
|
+
function _0xe772(){const _0x27083d=['query','signature','packageName','getter','declare\x20class\x20','every','1154643xkRnCi','//\x20inherited\x20declaration\x20from\x20','12YFhtXg','<symbols...>','groups','```','flatMap','members','Symbol','find','29030KoSuCt','choices','\x0a\x0a//\x20batch:\x20','225000GhmONe','target','api','type','owner','unit','//\x20[not-found]\x20','api.reference.not-found','includes','error','declarationKind','command','\x20supported\x20members','1xANoQv','176bTtaUB','<Class>','name','suggestions','//\x20package:\x20','declare\x20enum\x20','one\x20or\x20more\x20terms,\x20searched\x20independently','readonly\x20','status','\x20found,\x20','\x20*/','slice','writeOut','unknown','\x20has\x20no\x20','210230GjyTOW','\x20=\x20','kind','example','45ivvwCv','interface\x20','documentation','values','entries','match','/**','Offline\x20Univer\x20Facade\x20API\x20reference','2188224lVauUZ','//\x20directly\x20referenced\x20types','aliases','term','methods','map','push','8WzEIXd','type\x20','class','\x20not\x20found','declaredBy','member','//\x20full\x20member\x20docs:\x20api\x20show\x20','argument','relation',',\x0a}','found','Show\x20exact\x20API\x20classes,\x20members,\x20types,\x20fields,\x20or\x20enum\x20values','exact\x20symbols;\x20shorthand\x20for\x20api\x20show','\x20from\x20','\x20══\x0a','text','split','[symbols...]','appendix','\x20extends\x20','configureOutput','symbols','limit\x20results\x20to\x20one\x20unit\x20while\x20retaining\x20shared\x20APIs',';\x20inherited\x20from\x20','//\x20','trim','inherited','--unit\x20<unit>','//\x20[found]\x20','reference','stringify',',\x20or\x20api\x20show\x20<Class>\x20to\x20browse\x20a\x20whole\x20class.','subject','number','replaceAll','\x0adeclare\x20enum\x20','filter','\x20\x20—\x20','startsWith','own','matches','══\x20','length','Unknown\x20symbol:\x20','value','No\x20API\x20matches\x20\x22','declaration','tags','938765EHeaia','signatures','join','alias','composed','optional','addOption','not-found','\x20\x20[','\x20\x20/**\x20','action','267231bnyPmZ','description','<terms...>','\x20{\x0a\x20\x20','show','summary'];_0xe772=function(){return _0x27083d;};return _0xe772();}(function(_0xe70b74,_0x1a0bdf){const _0x1c64a4=_0x4900,_0x259dc1=_0xe70b74();while(!![]){try{const _0x25f882=parseInt(_0x1c64a4(0x165))/0x1*(parseInt(_0x1c64a4(0x175))/0x2)+-parseInt(_0x1c64a4(0x1c3))/0x3*(parseInt(_0x1c64a4(0x188))/0x4)+parseInt(_0x1c64a4(0x1b8))/0x5+parseInt(_0x1c64a4(0x14d))/0x6*(parseInt(_0x1c64a4(0x14b))/0x7)+parseInt(_0x1c64a4(0x158))/0x8*(-parseInt(_0x1c64a4(0x179))/0x9)+parseInt(_0x1c64a4(0x155))/0xa*(parseInt(_0x1c64a4(0x166))/0xb)+-parseInt(_0x1c64a4(0x181))/0xc;if(_0x25f882===_0x1a0bdf)break;else _0x259dc1['push'](_0x259dc1['shift']());}catch(_0x552f43){_0x259dc1['push'](_0x259dc1['shift']());}}}(_0xe772,0x29093));import{API_REFERENCE_UNITS as _0x58f488}from'@univer-cli/api-reference';import{Command as _0xc3527c,Option as _0x1f8e00}from'commander';var r=0x48,i=0x5a;function a(_0x3556cb){const _0x1a49d5=_0x4900;return(_0x3556cb[_0x1a49d5(0x17e)](/^(.*?[.。])(\s|$)/u)?.[0x1]??_0x3556cb)['trim']();}function o(_0x403171,_0xa5fd9){const _0x389b77=_0x4900;return _0x403171[_0x389b77(0x1b2)]>_0xa5fd9?_0x403171[_0x389b77(0x171)](0x0,_0xa5fd9-0x1)+'…':_0x403171;}function s(_0x546d64){const _0x4ac026=_0x4900;let _0x17dfca=_0x546d64[_0x4ac026(0x144)]===''?'':_0x4ac026(0x1ad)+a(_0x546d64[_0x4ac026(0x144)]);return'['+_0x546d64[_0x4ac026(0x177)]+']\x20'+o(_0x546d64[_0x4ac026(0x146)],r)+o(_0x17dfca,i)+_0x4ac026(0x1c0)+_0x546d64[_0x4ac026(0x147)]+']';}function c(_0x1a731a,_0xe57aa6){const _0xd2395a=_0x4900;if(_0x1a731a['matches']['length']===0x0){let _0xceaa97=_0xe57aa6===void 0x0?'':'\x20(filtered\x20by\x20--unit\x20'+_0xe57aa6+')';return _0xd2395a(0x1b5)+_0x1a731a[_0xd2395a(0x184)]+'\x22'+_0xceaa97+'.\x20Try\x20a\x20shorter\x20substring'+(_0xe57aa6===void 0x0?'':',\x20drop\x20--unit')+_0xd2395a(0x1a7);}let _0x32c92d=_0x1a731a[_0xd2395a(0x1b0)][_0xd2395a(0x186)](s),_0x13575b=_0x1a731a['totalMatches']-_0x1a731a[_0xd2395a(0x1b0)][_0xd2395a(0x1b2)];return _0x13575b>0x0&&_0x32c92d['push']('…\x20'+_0x13575b+'\x20more.\x20Narrow\x20with\x20a\x20longer\x20substring,\x20or\x20api\x20show\x20<symbol>\x20for\x20details.'),_0x32c92d['join']('\x0a');}function l(_0x5809e4,_0x426763){const _0x234170=_0x4900;return _0x5809e4[_0x234170(0x186)](_0x5335d5=>{const _0x3e735f=_0x234170;let _0xfa7df2=c(_0x5335d5,_0x426763);return _0x5809e4[_0x3e735f(0x1b2)]>0x1?_0x3e735f(0x1b1)+_0x5335d5[_0x3e735f(0x184)]+_0x3e735f(0x196)+_0xfa7df2:_0xfa7df2;})[_0x234170(0x1ba)]('\x0a\x0a');}function u(_0x47a137){const _0x176e7e=_0x4900;return _0x47a137[_0x176e7e(0x198)](/\n\s*\n/u,0x1)[0x0]?.[_0x176e7e(0x1a1)]()??'';}function d(_0x337ab8){const _0x1d1187=_0x4900;return _0x337ab8[_0x1d1187(0x17b)]===void 0x0?{'description':_0x337ab8[_0x1d1187(0x144)],'tags':_0x337ab8[_0x1d1187(0x178)]===''?[]:[{'name':_0x1d1187(0x178),'text':_0x337ab8[_0x1d1187(0x178)]}]}:_0x337ab8[_0x1d1187(0x17b)];}function f(_0x434897){const _0x5d1b2a=_0x4900;return _0x434897[_0x5d1b2a(0x17b)]??{'description':_0x434897[_0x5d1b2a(0x144)],'tags':[]};}function p(_0x39a0b8){const _0x48f8b7=_0x4900;let _0x15237d=_0x39a0b8[_0x48f8b7(0x15b)]===void 0x0?'':'\x20{'+_0x39a0b8[_0x48f8b7(0x15b)]+'}',_0x283f18=_0x39a0b8['subject']===void 0x0?'':'\x20'+_0x39a0b8[_0x48f8b7(0x1a8)],[_0x3632cb='',..._0x545b94]=_0x39a0b8[_0x48f8b7(0x197)]===''?[]:_0x39a0b8[_0x48f8b7(0x197)][_0x48f8b7(0x198)]('\x0a');return _0x39a0b8[_0x48f8b7(0x168)]===_0x48f8b7(0x178)&&_0x3632cb['trimStart']()[_0x48f8b7(0x1ae)](_0x48f8b7(0x150))?['@'+_0x39a0b8['name']+_0x15237d+_0x283f18,_0x3632cb,..._0x545b94]:['@'+_0x39a0b8[_0x48f8b7(0x168)]+_0x15237d+_0x283f18+(_0x3632cb===''?'':'\x20'+_0x3632cb),..._0x545b94];}function _0x4900(_0x31b6f1,_0xaaf2ff){_0x31b6f1=_0x31b6f1-0x143;const _0xe77201=_0xe772();let _0x490018=_0xe77201[_0x31b6f1];return _0x490018;}function m(_0x27bcda,_0x39b357='',_0x559707=!0x1){const _0x1c83ba=_0x4900;if(_0x27bcda===void 0x0)return[];let _0x416cad=_0x559707?u(_0x27bcda['description']):_0x27bcda[_0x1c83ba(0x1c4)],_0x11162d=_0x27bcda[_0x1c83ba(0x1b7)][_0x1c83ba(0x151)](p),_0x3030f3=[..._0x416cad[_0x1c83ba(0x198)]('\x0a'),..._0x559707||_0x11162d['length']===0x0?[]:['',..._0x11162d]];for(;_0x3030f3['at'](-0x1)==='';)_0x3030f3['pop']();return _0x3030f3[_0x1c83ba(0x14a)](_0x3938cd=>_0x3938cd==='')?[]:[_0x39b357+_0x1c83ba(0x17f),..._0x3030f3['map'](_0x3cc37a=>_0x39b357+'\x20*'+(_0x3cc37a===''?'':'\x20'+_0x3cc37a)),_0x39b357+_0x1c83ba(0x170)];}function h(_0x52fa71){const _0x26c1c2=_0x4900;return''+((_0x52fa71[_0x26c1c2(0x177)]===_0x26c1c2(0x148)||_0x52fa71['readonly'])&&!_0x52fa71[_0x26c1c2(0x146)][_0x26c1c2(0x1ae)](_0x26c1c2(0x16d))?_0x26c1c2(0x16d):'')+_0x52fa71['signature']+';';}function g(_0x1ba407){const _0x1c5ede=_0x4900;let _0x4aebc0=_0x1ba407[_0x1c5ede(0x144)][_0x1c5ede(0x1a1)]();return[..._0x4aebc0===''?[]:[_0x1c5ede(0x1c1)+_0x4aebc0[_0x1c5ede(0x1aa)]('*/','*\x5c/')+_0x1c5ede(0x170)],'\x20\x20'+h(_0x1ba407)];}function _(_0x18262b,_0x41f2d9,_0x44dadb,_0x98b7e3){const _0x99848e=_0x4900;let _0x16a223=_0x41f2d9==='own'?[]:['//\x20'+(_0x41f2d9===_0x99848e(0x1a2)?_0x99848e(0x1a2):_0x99848e(0x1bc))+'\x20member\x20projection\x20from\x20'+_0x18262b],_0xe4474=_0x41f2d9==='own'?_0x98b7e3:_0x41f2d9==='inherited'?_0x99848e(0x149)+_0x18262b:_0x99848e(0x17a)+_0x18262b;return[..._0x16a223,_0xe4474+'\x20{',..._0x44dadb[_0x99848e(0x151)](g),'}'];}function v(_0x4ccaad){const _0x32b6f8=_0x4900;return typeof _0x4ccaad==_0x32b6f8(0x1a9)?String(_0x4ccaad):JSON[_0x32b6f8(0x1a6)](_0x4ccaad);}function y(_0x156d99,_0x5f2cfd=!0x1){const _0x4bb52d=_0x4900;let _0x14b2dd=_0x156d99['documentation']??(_0x156d99[_0x4bb52d(0x144)]===void 0x0?void 0x0:{'description':_0x156d99['summary'],'tags':[]}),_0xf87f93=_0x156d99[_0x4bb52d(0x15b)]['startsWith']('(')&&!_0x156d99['type'][_0x4bb52d(0x160)]('=>')?'':':\x20',_0x3ef129=_0x156d99['declaration']??''+_0x156d99[_0x4bb52d(0x168)]+(_0x156d99[_0x4bb52d(0x1bd)]?'?':'')+_0xf87f93+_0x156d99[_0x4bb52d(0x15b)];return[...m(_0x14b2dd,'\x20\x20',!_0x5f2cfd),'\x20\x20'+_0x3ef129+';'];}function b(_0x7a1aa0,_0x2a0031=!0x1){const _0x20f910=_0x4900;let _0x32564f=_0x7a1aa0[_0x20f910(0x183)]??[],_0x26e363=[_0x20f910(0x16a)+_0x7a1aa0[_0x20f910(0x147)]+(_0x32564f[_0x20f910(0x1b2)]===0x0?'':';\x20runtime\x20aliases:\x20'+_0x32564f[_0x20f910(0x1ba)](',\x20')),...m(f(_0x7a1aa0))];if(_0x7a1aa0[_0x20f910(0x177)]==='enum')return _0x26e363[_0x20f910(0x187)](_0x20f910(0x16b)+(_0x7a1aa0['declaration']??_0x7a1aa0['name'])+'\x20{',...(_0x7a1aa0[_0x20f910(0x17c)]??[])[_0x20f910(0x186)](_0x3086c6=>'\x20\x20'+_0x3086c6[_0x20f910(0x168)]+'\x20=\x20'+v(_0x3086c6['value'])+','),'}'),_0x26e363[_0x20f910(0x1ba)]('\x0a');if(_0x7a1aa0['kind']===_0x20f910(0x1bb))return _0x26e363[_0x20f910(0x187)](_0x20f910(0x189)+(_0x7a1aa0[_0x20f910(0x1b6)]??_0x7a1aa0[_0x20f910(0x168)]+_0x20f910(0x176)+(_0x7a1aa0['definition']??_0x20f910(0x173)))+';'),_0x26e363[_0x20f910(0x1ba)]('\x0a');let _0x43a3cb=_0x7a1aa0['extends']===void 0x0?'':_0x20f910(0x19b)+_0x7a1aa0['extends'];return _0x26e363[_0x20f910(0x187)](_0x20f910(0x17a)+(_0x7a1aa0[_0x20f910(0x1b6)]??''+_0x7a1aa0[_0x20f910(0x168)]+_0x43a3cb)+'\x20{',...(_0x7a1aa0[_0x20f910(0x152)]??[])['flatMap'](_0xe005a6=>y(_0xe005a6,_0x2a0031)),...(_0x7a1aa0[_0x20f910(0x1b9)]??[])[_0x20f910(0x186)](_0x3eb8b7=>'\x20\x20'+_0x3eb8b7+';'),'}'),_0x26e363['join']('\x0a');}function x(_0x429ea0){const _0x51c3b5=_0x4900;return _0x429ea0[_0x51c3b5(0x1b2)]===0x0?[]:['',_0x51c3b5(0x182),..._0x429ea0[_0x51c3b5(0x151)]((_0xf574b9,_0x2a3f73)=>[..._0x2a3f73===0x0?[]:[''],b(_0xf574b9)])];}function S(_0x17ccc6){const _0x30abbd=_0x4900;if(_0x17ccc6['status']===_0x30abbd(0x1bf))return'';if(_0x17ccc6['kind']===_0x30abbd(0x18a)){let _0x35989c=_0x17ccc6[_0x30abbd(0x14f)]['reduce']((_0x33d8f9,_0x47e634)=>_0x33d8f9+_0x47e634['members'][_0x30abbd(0x1b2)],0x0),_0xb62525=_0x17ccc6[_0x30abbd(0x14f)][_0x30abbd(0x154)](_0x24c9dc=>_0x24c9dc[_0x30abbd(0x190)]==='own'),_0x15a431=_0x17ccc6[_0x30abbd(0x162)]===_0x30abbd(0x18a)?_0x30abbd(0x149)+_0x17ccc6[_0x30abbd(0x1b6)]:_0x30abbd(0x189)+_0x17ccc6[_0x30abbd(0x1b6)],_0x4bbbb3=[_0x30abbd(0x16a)+_0x17ccc6[_0x30abbd(0x147)]+';\x20'+_0x35989c+_0x30abbd(0x164),...m(_0x17ccc6[_0x30abbd(0x17b)])];_0x17ccc6[_0x30abbd(0x162)]==='alias'?(_0x4bbbb3[_0x30abbd(0x187)](_0x15a431+';'),_0xb62525!==void 0x0&&_0x4bbbb3[_0x30abbd(0x187)]('',..._(_0xb62525['owner'],_0x30abbd(0x1af),_0xb62525[_0x30abbd(0x152)],_0x30abbd(0x17a)+_0xb62525[_0x30abbd(0x15c)]))):_0x4bbbb3[_0x30abbd(0x187)](..._(_0x17ccc6[_0x30abbd(0x168)],'own',_0xb62525?.[_0x30abbd(0x152)]??[],_0x15a431));for(let _0x4abf72 of _0x17ccc6[_0x30abbd(0x14f)]['filter'](_0x43559e=>_0x43559e[_0x30abbd(0x190)]!==_0x30abbd(0x1af)))_0x4bbbb3['push']('',..._(_0x4abf72[_0x30abbd(0x15c)],_0x4abf72[_0x30abbd(0x190)],_0x4abf72[_0x30abbd(0x152)],_0x15a431));return _0x4bbbb3['push']('',_0x30abbd(0x18e)+_0x17ccc6['name']+'.<member>'),_0x4bbbb3[_0x30abbd(0x1ba)]('\x0a');}if(_0x17ccc6[_0x30abbd(0x177)]===_0x30abbd(0x18d)){let [_0x612ed1]=_0x17ccc6[_0x30abbd(0x17d)];if(_0x612ed1===void 0x0)return'';let _0x20785f=_0x612ed1[_0x30abbd(0x190)]==='own'?[]:[_0x30abbd(0x1a0)+_0x612ed1[_0x30abbd(0x190)]+_0x30abbd(0x195)+_0x612ed1['relationOwner']];return[_0x30abbd(0x16a)+_0x612ed1[_0x30abbd(0x18d)][_0x30abbd(0x147)],..._0x20785f,_0x30abbd(0x149)+_0x17ccc6[_0x30abbd(0x159)]+'\x20{',..._0x17ccc6['entries'][_0x30abbd(0x151)](_0x440fe1=>[...m(d(_0x440fe1['member']),'\x20\x20'),'\x20\x20'+h(_0x440fe1['member'])]),'}',...x([...new Map(_0x17ccc6[_0x30abbd(0x17d)][_0x30abbd(0x151)](_0x158efc=>_0x158efc[_0x30abbd(0x19a)])[_0x30abbd(0x186)](_0x159b89=>[_0x159b89['name'],_0x159b89]))['values']()])][_0x30abbd(0x1ba)]('\x0a');}return _0x17ccc6['kind']==='type'?[b(_0x17ccc6[_0x30abbd(0x15b)]),..._0x17ccc6['inherited'][_0x30abbd(0x151)](_0x111c91=>['',_0x30abbd(0x14c)+_0x111c91[_0x30abbd(0x168)],b(_0x111c91)]),...x(_0x17ccc6[_0x30abbd(0x19a)])][_0x30abbd(0x1ba)]('\x0a'):'value'in _0x17ccc6[_0x30abbd(0x18d)]?'//\x20package:\x20'+_0x17ccc6[_0x30abbd(0x18c)][_0x30abbd(0x147)]+_0x30abbd(0x1ab)+_0x17ccc6[_0x30abbd(0x18c)][_0x30abbd(0x168)]+_0x30abbd(0x1c6)+_0x17ccc6[_0x30abbd(0x18d)][_0x30abbd(0x168)]+'\x20=\x20'+v(_0x17ccc6[_0x30abbd(0x18d)][_0x30abbd(0x1b4)])+_0x30abbd(0x191):[_0x30abbd(0x16a)+_0x17ccc6[_0x30abbd(0x18c)][_0x30abbd(0x147)]+(_0x17ccc6[_0x30abbd(0x18c)][_0x30abbd(0x168)]===_0x17ccc6['requestedType']['name']?'':_0x30abbd(0x19f)+_0x17ccc6[_0x30abbd(0x18c)][_0x30abbd(0x168)]),_0x30abbd(0x17a)+_0x17ccc6['requestedType'][_0x30abbd(0x168)]+'\x20{',...y(_0x17ccc6['member'],!0x0),'}',...x(_0x17ccc6[_0x30abbd(0x19a)])]['join']('\x0a');}function C(_0x476f4b){const _0x5a407c=_0x4900;let _0x58fa90=_0x476f4b[_0x5a407c(0x169)][_0x5a407c(0x1b2)]===0x0?'':'\x0a\x20\x20Similar\x20'+(_0x476f4b['kind']==='member'?_0x5a407c(0x185):_0x5a407c(0x19d))+':\x20'+_0x476f4b[_0x5a407c(0x169)]['join'](',\x20');return _0x476f4b[_0x5a407c(0x177)]===_0x5a407c(0x18d)?(_0x476f4b[_0x5a407c(0x15c)]??_0x5a407c(0x153))+_0x5a407c(0x174)+(_0x476f4b[_0x5a407c(0x18d)]??_0x5a407c(0x18d))+_0x58fa90+'\x0a\x20\x20List\x20all:\x20api\x20show\x20'+(_0x476f4b[_0x5a407c(0x15c)]??_0x5a407c(0x167)):_0x5a407c(0x1b3)+_0x476f4b[_0x5a407c(0x145)]+_0x58fa90+'\x0a\x20\x20If\x20unsure,\x20api\x20find\x20<keyword>\x20to\x20search\x20indexed\x20API\x20symbols,\x20or\x20api\x20show\x20<class\x20alias:\x20range/slide/document/presentation/api>\x20to\x20browse\x20a\x20whole\x20class.';}function w(_0x379bc3,_0x1d40f9){const _0x3bfd97=_0x4900;let _0x18bd82=_0x379bc3[_0x3bfd97(0x19c)](),_0x280eea=_0x1d40f9[_0x3bfd97(0x1ac)](_0x22631e=>_0x22631e[_0x3bfd97(0x16e)]===_0x3bfd97(0x192)),_0x1f62b0=_0x1d40f9[_0x3bfd97(0x1ac)](_0x1c406a=>_0x1c406a[_0x3bfd97(0x16e)]===_0x3bfd97(0x1bf)),_0x1c511f=_0x1d40f9['length']>0x1;_0x280eea[_0x3bfd97(0x1b2)]>0x0&&_0x18bd82[_0x3bfd97(0x172)]?.(''+_0x280eea[_0x3bfd97(0x186)](_0x1edef7=>_0x1c511f?_0x3bfd97(0x1a4)+_0x1edef7[_0x3bfd97(0x145)]+'\x0a'+S(_0x1edef7):S(_0x1edef7))[_0x3bfd97(0x1ba)]('\x0a\x0a')+(_0x1c511f&&_0x1f62b0[_0x3bfd97(0x1b2)]===0x0?_0x3bfd97(0x157)+_0x280eea[_0x3bfd97(0x1b2)]+'\x20found,\x200\x20not\x20found':'')+'\x0a'),_0x1f62b0[_0x3bfd97(0x1b2)]>0x0&&_0x379bc3[_0x3bfd97(0x161)]([..._0x1f62b0[_0x3bfd97(0x186)](_0xcf2ac4=>_0x1c511f?_0x3bfd97(0x15e)+_0xcf2ac4[_0x3bfd97(0x145)]+'\x0a'+C(_0xcf2ac4):C(_0xcf2ac4)),..._0x1c511f?['//\x20batch:\x20'+_0x280eea[_0x3bfd97(0x1b2)]+_0x3bfd97(0x16f)+_0x1f62b0[_0x3bfd97(0x1b2)]+_0x3bfd97(0x18b)]:[]][_0x3bfd97(0x1ba)]('\x0a\x0a'),{'code':_0x3bfd97(0x15f),'exitCode':0x1});}function T(_0x457635){const _0x26bfab=_0x4900;let _0x184e26=new _0xc3527c(_0x26bfab(0x15a))[_0x26bfab(0x1c4)](_0x26bfab(0x180))[_0x26bfab(0x18f)](_0x26bfab(0x199),_0x26bfab(0x194))[_0x26bfab(0x1c2)](_0x437113=>{const _0x160824=_0x26bfab;if(_0x437113[_0x160824(0x1b2)]===0x0){_0x184e26['outputHelp']();return;}w(_0x184e26,_0x457635['reference']['show'](_0x437113));});return _0x184e26[_0x26bfab(0x163)](_0x26bfab(0x154))['description']('Find\x20API\x20methods,\x20types,\x20fields,\x20and\x20enums\x20by\x20keyword')[_0x26bfab(0x18f)](_0x26bfab(0x1c5),_0x26bfab(0x16c))[_0x26bfab(0x1be)](new _0x1f8e00(_0x26bfab(0x1a3),_0x26bfab(0x19e))[_0x26bfab(0x156)](_0x58f488))['action']((_0xfad6ea,_0x120661)=>{const _0x5b0ba2=_0x26bfab;let _0xf7da8c=_0x457635[_0x5b0ba2(0x1a5)][_0x5b0ba2(0x154)]({'terms':_0xfad6ea,..._0x120661[_0x5b0ba2(0x15d)]===void 0x0?{}:{'unit':_0x120661[_0x5b0ba2(0x15d)]}});_0x184e26[_0x5b0ba2(0x19c)]()[_0x5b0ba2(0x172)]?.(l(_0xf7da8c,_0x120661[_0x5b0ba2(0x15d)])+'\x0a');}),_0x184e26[_0x26bfab(0x163)](_0x26bfab(0x143))[_0x26bfab(0x1c4)](_0x26bfab(0x193))[_0x26bfab(0x18f)](_0x26bfab(0x14e),'one\x20or\x20more\x20exact\x20API\x20symbols')[_0x26bfab(0x1c2)](_0x50ec58=>{const _0xd5a3fd=_0x26bfab;w(_0x184e26,_0x457635['reference'][_0xd5a3fd(0x143)](_0x50ec58));}),_0x184e26;}export{T as createApiCommand};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univer-cli/api-reference-command",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.0
|
|
4
|
+
"version": "1.0.0",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"README.zh-CN.md"
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@univer-cli/api-reference": "1.0.0
|
|
21
|
+
"@univer-cli/api-reference": "1.0.0"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"commander": "^15.0.0"
|