@univer-cli/api-reference-command 1.0.0-beta.2 → 1.0.0-rc.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(_0x46cd37,_0x2aa5d6){const _0x4c4ca5=_0x3e3a,_0x3f86b9=_0x46cd37();while(!![]){try{const _0xe79d88=parseInt(_0x4c4ca5(0x210))/0x1*(-parseInt(_0x4c4ca5(0x22e))/0x2)+-parseInt(_0x4c4ca5(0x243))/0x3+-parseInt(_0x4c4ca5(0x258))/0x4+parseInt(_0x4c4ca5(0x242))/0x5+parseInt(_0x4c4ca5(0x22c))/0x6+-parseInt(_0x4c4ca5(0x265))/0x7*(-parseInt(_0x4c4ca5(0x223))/0x8)+-parseInt(_0x4c4ca5(0x229))/0x9*(-parseInt(_0x4c4ca5(0x23f))/0xa);if(_0xe79d88===_0x2aa5d6)break;else _0x3f86b9['push'](_0x3f86b9['shift']());}catch(_0x3e17a2){_0x3f86b9['push'](_0x3f86b9['shift']());}}}(_0x3d68,0xcbf1f));function _0x3e3a(_0x492d2b,_0x1e6cee){_0x492d2b=_0x492d2b-0x1f1;const _0x3d6893=_0x3d68();let _0x3e3a7e=_0x3d6893[_0x492d2b];return _0x3e3a7e;}import{API_REFERENCE_UNITS as _0x1432f8}from'@univer-cli/api-reference';import{Command as _0x273d70,Option as _0x29ab34}from'commander';var r=0x48,i=0x5a;function a(_0x48435c){const _0x207766=_0x3e3a;return(_0x48435c[_0x207766(0x23c)](/^(.*?[.。])(\s|$)/u)?.[0x1]??_0x48435c)[_0x207766(0x22d)]();}function _0x3d68(){const _0xbe360=['8467260bjajiA','trim','8mOKdMc','alias','writeOut','```','packageName','own','unknown','relation','exact\x20symbols;\x20shorthand\x20for\x20api\x20show','query','values','\x20=\x20','\x20\x20—\x20','groups','match','status','declare\x20enum\x20','20ZfvATn','unit','//\x20[found]\x20','1501325ZnNRrs','4970373FoXBYt','replaceAll','══\x20','choices','matches','\x20member\x20projection\x20from\x20','<Class>','[symbols...]','one\x20or\x20more\x20terms,\x20searched\x20independently','argument','//\x20','subject','value','//\x20inherited\x20declaration\x20from\x20','requestedType','outputHelp','api.reference.not-found','map','enum','<terms...>','every','813604WCHfWj','readonly\x20','find','\x0adeclare\x20enum\x20','Offline\x20Univer\x20Facade\x20API\x20reference','\x20*/','owner','flatMap','\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.','not-found','totalMatches','summary','\x20supported\x20members','10738xZOkoN','filter','includes','trimStart','\x20has\x20no\x20','term',',\x20or\x20api\x20show\x20<Class>\x20to\x20browse\x20a\x20whole\x20class.','type','Unknown\x20symbol:\x20','\x20══\x0a','declarationKind','target','\x0a\x20\x20List\x20all:\x20api\x20show\x20','documentation','members','found','*\x5c/',',\x0a}','definition','suggestions','class','\x20from\x20','<symbols...>','number','symbols','composed','member','api','//\x20full\x20member\x20docs:\x20api\x20show\x20','slice','inherited','declare\x20class\x20','signature','\x20extends\x20','reference','\x20found,\x200\x20not\x20found','startsWith','tags','\x20\x20/**\x20','show','entries','split','aliases','No\x20API\x20matches\x20\x22','pop','interface\x20','configureOutput','370013OSPuHq','getter','appendix','declaredBy','extends','type\x20','//\x20package:\x20','limit\x20results\x20to\x20one\x20unit\x20while\x20retaining\x20shared\x20APIs',';\x20runtime\x20aliases:\x20','declaration','name','command','kind','readonly','description','.\x20Try\x20a\x20shorter\x20substring','length','join','example','6688wLRQWT','\x20more.\x20Narrow\x20with\x20a\x20longer\x20substring,\x20or\x20api\x20show\x20<symbol>\x20for\x20details.','\x0a\x20\x20Similar\x20','push','/**','optional','5317668Kswram','action','Symbol'];_0x3d68=function(){return _0xbe360;};return _0x3d68();}function o(_0x240d90,_0x3699a6){const _0x5eda90=_0x3e3a;return _0x240d90[_0x5eda90(0x220)]>_0x3699a6?_0x240d90[_0x5eda90(0x1fe)](0x0,_0x3699a6-0x1)+'…':_0x240d90;}function s(_0x53ed6f){const _0x14e4f3=_0x3e3a;let _0x3fd7b0=_0x53ed6f[_0x14e4f3(0x263)]===''?'':_0x14e4f3(0x23a)+a(_0x53ed6f[_0x14e4f3(0x263)]);return'['+_0x53ed6f['kind']+']\x20'+o(_0x53ed6f['signature'],r)+o(_0x3fd7b0,i)+'\x20\x20['+_0x53ed6f[_0x14e4f3(0x232)]+']';}function c(_0x4025ad,_0x43f1b8){const _0x4baed2=_0x3e3a;if(_0x4025ad[_0x4baed2(0x247)][_0x4baed2(0x220)]===0x0){let _0x4d75b8=_0x43f1b8===void 0x0?'':'\x20(filtered\x20by\x20--unit\x20'+_0x43f1b8+')';return _0x4baed2(0x20c)+_0x4025ad[_0x4baed2(0x26a)]+'\x22'+_0x4d75b8+_0x4baed2(0x21f)+(_0x43f1b8===void 0x0?'':',\x20drop\x20--unit')+_0x4baed2(0x26b);}let _0x5120ef=_0x4025ad[_0x4baed2(0x247)][_0x4baed2(0x254)](s),_0x2a2e3d=_0x4025ad[_0x4baed2(0x262)]-_0x4025ad[_0x4baed2(0x247)][_0x4baed2(0x220)];return _0x2a2e3d>0x0&&_0x5120ef[_0x4baed2(0x226)]('…\x20'+_0x2a2e3d+_0x4baed2(0x224)),_0x5120ef['join']('\x0a');}function l(_0x5793b1,_0x44f5d3){const _0x5a0a04=_0x3e3a;return _0x5793b1[_0x5a0a04(0x254)](_0x116f52=>{const _0x4ae94e=_0x5a0a04;let _0x236fb4=c(_0x116f52,_0x44f5d3);return _0x5793b1[_0x4ae94e(0x220)]>0x1?_0x4ae94e(0x245)+_0x116f52[_0x4ae94e(0x26a)]+_0x4ae94e(0x26e)+_0x236fb4:_0x236fb4;})[_0x5a0a04(0x221)]('\x0a\x0a');}function u(_0x223aa8){const _0x446a7a=_0x3e3a;return _0x223aa8[_0x446a7a(0x20a)](/\n\s*\n/u,0x1)[0x0]?.[_0x446a7a(0x22d)]()??'';}function d(_0x293421){const _0x12fdcc=_0x3e3a;return _0x293421['documentation']===void 0x0?{'description':_0x293421[_0x12fdcc(0x263)],'tags':_0x293421['example']===''?[]:[{'name':_0x12fdcc(0x222),'text':_0x293421['example']}]}:_0x293421[_0x12fdcc(0x272)];}function f(_0x5eca85){const _0x447488=_0x3e3a;return _0x5eca85[_0x447488(0x272)]??{'description':_0x5eca85[_0x447488(0x263)],'tags':[]};}function p(_0x8e03ba){const _0x1be797=_0x3e3a;let _0x52ae44=_0x8e03ba['type']===void 0x0?'':'\x20{'+_0x8e03ba[_0x1be797(0x26c)]+'}',_0x10e4e6=_0x8e03ba[_0x1be797(0x24e)]===void 0x0?'':'\x20'+_0x8e03ba[_0x1be797(0x24e)],[_0xae59b3='',..._0xc08f58]=_0x8e03ba['text']===''?[]:_0x8e03ba['text'][_0x1be797(0x20a)]('\x0a');return _0x8e03ba['name']===_0x1be797(0x222)&&_0xae59b3[_0x1be797(0x268)]()[_0x1be797(0x205)](_0x1be797(0x231))?['@'+_0x8e03ba[_0x1be797(0x21a)]+_0x52ae44+_0x10e4e6,_0xae59b3,..._0xc08f58]:['@'+_0x8e03ba[_0x1be797(0x21a)]+_0x52ae44+_0x10e4e6+(_0xae59b3===''?'':'\x20'+_0xae59b3),..._0xc08f58];}function m(_0x2747b0,_0x56a3d9='',_0x492907=!0x1){const _0x4a59f7=_0x3e3a;if(_0x2747b0===void 0x0)return[];let _0x498d68=_0x492907?u(_0x2747b0[_0x4a59f7(0x21e)]):_0x2747b0['description'],_0x537a90=_0x2747b0[_0x4a59f7(0x206)][_0x4a59f7(0x25f)](p),_0x161049=[..._0x498d68[_0x4a59f7(0x20a)]('\x0a'),..._0x492907||_0x537a90[_0x4a59f7(0x220)]===0x0?[]:['',..._0x537a90]];for(;_0x161049['at'](-0x1)==='';)_0x161049[_0x4a59f7(0x20d)]();return _0x161049[_0x4a59f7(0x257)](_0x42d29f=>_0x42d29f==='')?[]:[_0x56a3d9+_0x4a59f7(0x227),..._0x161049[_0x4a59f7(0x254)](_0xa4c182=>_0x56a3d9+'\x20*'+(_0xa4c182===''?'':'\x20'+_0xa4c182)),_0x56a3d9+_0x4a59f7(0x25d)];}function h(_0x43593d){const _0x35ce35=_0x3e3a;return''+((_0x43593d[_0x35ce35(0x21c)]===_0x35ce35(0x211)||_0x43593d[_0x35ce35(0x21d)])&&!_0x43593d[_0x35ce35(0x201)][_0x35ce35(0x205)](_0x35ce35(0x259))?_0x35ce35(0x259):'')+_0x43593d['signature']+';';}function g(_0x3aa7f6){const _0xd476ce=_0x3e3a;let _0x3c6783=_0x3aa7f6[_0xd476ce(0x263)][_0xd476ce(0x22d)]();return[..._0x3c6783===''?[]:[_0xd476ce(0x207)+_0x3c6783[_0xd476ce(0x244)]('*/',_0xd476ce(0x1f1))+_0xd476ce(0x25d)],'\x20\x20'+h(_0x3aa7f6)];}function _(_0x5b3800,_0x2523df,_0x1d5a8f,_0x11b556){const _0x40bd1d=_0x3e3a;let _0x10187c=_0x2523df===_0x40bd1d(0x233)?[]:[_0x40bd1d(0x24d)+(_0x2523df===_0x40bd1d(0x1ff)?_0x40bd1d(0x1ff):_0x40bd1d(0x1fa))+_0x40bd1d(0x248)+_0x5b3800],_0x4d38b0=_0x2523df===_0x40bd1d(0x233)?_0x11b556:_0x2523df===_0x40bd1d(0x1ff)?_0x40bd1d(0x200)+_0x5b3800:_0x40bd1d(0x20e)+_0x5b3800;return[..._0x10187c,_0x4d38b0+'\x20{',..._0x1d5a8f[_0x40bd1d(0x25f)](g),'}'];}function v(_0x529318){const _0xc575ed=_0x3e3a;return typeof _0x529318==_0xc575ed(0x1f8)?String(_0x529318):JSON['stringify'](_0x529318);}function y(_0x8832dc,_0x3f5bbd=!0x1){const _0x3e8eaf=_0x3e3a;let _0xa74ab0=_0x8832dc['documentation']??(_0x8832dc[_0x3e8eaf(0x263)]===void 0x0?void 0x0:{'description':_0x8832dc[_0x3e8eaf(0x263)],'tags':[]}),_0x4c1545=_0x8832dc['type'][_0x3e8eaf(0x205)]('(')&&!_0x8832dc[_0x3e8eaf(0x26c)][_0x3e8eaf(0x267)]('=>')?'':':\x20',_0xfe3b5e=_0x8832dc[_0x3e8eaf(0x219)]??''+_0x8832dc[_0x3e8eaf(0x21a)]+(_0x8832dc[_0x3e8eaf(0x228)]?'?':'')+_0x4c1545+_0x8832dc['type'];return[...m(_0xa74ab0,'\x20\x20',!_0x3f5bbd),'\x20\x20'+_0xfe3b5e+';'];}function b(_0x1875d8,_0x399ab5=!0x1){const _0x4b71b8=_0x3e3a;let _0x35cd68=_0x1875d8[_0x4b71b8(0x20b)]??[],_0xf084d6=[_0x4b71b8(0x216)+_0x1875d8[_0x4b71b8(0x232)]+(_0x35cd68[_0x4b71b8(0x220)]===0x0?'':_0x4b71b8(0x218)+_0x35cd68[_0x4b71b8(0x221)](',\x20')),...m(f(_0x1875d8))];if(_0x1875d8[_0x4b71b8(0x21c)]===_0x4b71b8(0x255))return _0xf084d6[_0x4b71b8(0x226)](_0x4b71b8(0x23e)+(_0x1875d8[_0x4b71b8(0x219)]??_0x1875d8[_0x4b71b8(0x21a)])+'\x20{',...(_0x1875d8[_0x4b71b8(0x238)]??[])[_0x4b71b8(0x254)](_0x1f207f=>'\x20\x20'+_0x1f207f[_0x4b71b8(0x21a)]+'\x20=\x20'+v(_0x1f207f[_0x4b71b8(0x24f)])+','),'}'),_0xf084d6[_0x4b71b8(0x221)]('\x0a');if(_0x1875d8[_0x4b71b8(0x21c)]===_0x4b71b8(0x22f))return _0xf084d6['push'](_0x4b71b8(0x215)+(_0x1875d8[_0x4b71b8(0x219)]??_0x1875d8[_0x4b71b8(0x21a)]+_0x4b71b8(0x239)+(_0x1875d8[_0x4b71b8(0x1f3)]??_0x4b71b8(0x234)))+';'),_0xf084d6[_0x4b71b8(0x221)]('\x0a');let _0x1511f1=_0x1875d8['extends']===void 0x0?'':_0x4b71b8(0x202)+_0x1875d8[_0x4b71b8(0x214)];return _0xf084d6['push'](_0x4b71b8(0x20e)+(_0x1875d8[_0x4b71b8(0x219)]??''+_0x1875d8[_0x4b71b8(0x21a)]+_0x1511f1)+'\x20{',...(_0x1875d8[_0x4b71b8(0x273)]??[])[_0x4b71b8(0x25f)](_0x3f3e4a=>y(_0x3f3e4a,_0x399ab5)),...(_0x1875d8['signatures']??[])[_0x4b71b8(0x254)](_0xdf061d=>'\x20\x20'+_0xdf061d+';'),'}'),_0xf084d6[_0x4b71b8(0x221)]('\x0a');}function x(_0x4d89c3){const _0x42ca6f=_0x3e3a;return _0x4d89c3[_0x42ca6f(0x220)]===0x0?[]:['','//\x20directly\x20referenced\x20types',..._0x4d89c3[_0x42ca6f(0x25f)]((_0x5af852,_0x19ef5c)=>[..._0x19ef5c===0x0?[]:[''],b(_0x5af852)])];}function S(_0x353c3a){const _0x5b995c=_0x3e3a;if(_0x353c3a[_0x5b995c(0x23d)]===_0x5b995c(0x261))return'';if(_0x353c3a['kind']===_0x5b995c(0x1f5)){let _0x4bff2c=_0x353c3a['groups']['reduce']((_0x57870b,_0x216d31)=>_0x57870b+_0x216d31['members']['length'],0x0),_0x2bccca=_0x353c3a[_0x5b995c(0x23b)]['find'](_0x25093b=>_0x25093b[_0x5b995c(0x235)]==='own'),_0x459c10=_0x353c3a['declarationKind']===_0x5b995c(0x1f5)?'declare\x20class\x20'+_0x353c3a['declaration']:_0x5b995c(0x215)+_0x353c3a[_0x5b995c(0x219)],_0x22c8d3=['//\x20package:\x20'+_0x353c3a[_0x5b995c(0x232)]+';\x20'+_0x4bff2c+_0x5b995c(0x264),...m(_0x353c3a[_0x5b995c(0x272)])];_0x353c3a[_0x5b995c(0x26f)]==='alias'?(_0x22c8d3['push'](_0x459c10+';'),_0x2bccca!==void 0x0&&_0x22c8d3[_0x5b995c(0x226)]('',..._(_0x2bccca[_0x5b995c(0x25e)],_0x5b995c(0x233),_0x2bccca[_0x5b995c(0x273)],_0x5b995c(0x20e)+_0x2bccca[_0x5b995c(0x25e)]))):_0x22c8d3[_0x5b995c(0x226)](..._(_0x353c3a[_0x5b995c(0x21a)],'own',_0x2bccca?.['members']??[],_0x459c10));for(let _0x4c0c35 of _0x353c3a[_0x5b995c(0x23b)][_0x5b995c(0x266)](_0x31238d=>_0x31238d['relation']!==_0x5b995c(0x233)))_0x22c8d3['push']('',..._(_0x4c0c35[_0x5b995c(0x25e)],_0x4c0c35[_0x5b995c(0x235)],_0x4c0c35[_0x5b995c(0x273)],_0x459c10));return _0x22c8d3['push']('',_0x5b995c(0x1fd)+_0x353c3a[_0x5b995c(0x21a)]+'.<member>'),_0x22c8d3[_0x5b995c(0x221)]('\x0a');}if(_0x353c3a[_0x5b995c(0x21c)]===_0x5b995c(0x1fb)){let [_0x1b2cfc]=_0x353c3a[_0x5b995c(0x209)];if(_0x1b2cfc===void 0x0)return'';let _0x1fc12c=_0x1b2cfc[_0x5b995c(0x235)]===_0x5b995c(0x233)?[]:[_0x5b995c(0x24d)+_0x1b2cfc[_0x5b995c(0x235)]+_0x5b995c(0x1f6)+_0x1b2cfc['relationOwner']];return['//\x20package:\x20'+_0x1b2cfc[_0x5b995c(0x1fb)][_0x5b995c(0x232)],..._0x1fc12c,'declare\x20class\x20'+_0x353c3a[_0x5b995c(0x270)]+'\x20{',..._0x353c3a['entries'][_0x5b995c(0x25f)](_0x20ad61=>[...m(d(_0x20ad61[_0x5b995c(0x1fb)]),'\x20\x20'),'\x20\x20'+h(_0x20ad61[_0x5b995c(0x1fb)])]),'}',...x([...new Map(_0x353c3a[_0x5b995c(0x209)]['flatMap'](_0x20d556=>_0x20d556[_0x5b995c(0x212)])[_0x5b995c(0x254)](_0x3a20d1=>[_0x3a20d1[_0x5b995c(0x21a)],_0x3a20d1]))['values']()])][_0x5b995c(0x221)]('\x0a');}return _0x353c3a['kind']==='type'?[b(_0x353c3a[_0x5b995c(0x26c)]),..._0x353c3a[_0x5b995c(0x1ff)][_0x5b995c(0x25f)](_0x1b0e04=>['',_0x5b995c(0x250)+_0x1b0e04[_0x5b995c(0x21a)],b(_0x1b0e04)]),...x(_0x353c3a[_0x5b995c(0x212)])][_0x5b995c(0x221)]('\x0a'):_0x5b995c(0x24f)in _0x353c3a[_0x5b995c(0x1fb)]?'//\x20package:\x20'+_0x353c3a['declaredBy']['packageName']+_0x5b995c(0x25b)+_0x353c3a['declaredBy'][_0x5b995c(0x21a)]+'\x20{\x0a\x20\x20'+_0x353c3a[_0x5b995c(0x1fb)][_0x5b995c(0x21a)]+_0x5b995c(0x239)+v(_0x353c3a[_0x5b995c(0x1fb)][_0x5b995c(0x24f)])+_0x5b995c(0x1f2):[_0x5b995c(0x216)+_0x353c3a[_0x5b995c(0x213)][_0x5b995c(0x232)]+(_0x353c3a[_0x5b995c(0x213)][_0x5b995c(0x21a)]===_0x353c3a['requestedType'][_0x5b995c(0x21a)]?'':';\x20inherited\x20from\x20'+_0x353c3a[_0x5b995c(0x213)][_0x5b995c(0x21a)]),_0x5b995c(0x20e)+_0x353c3a[_0x5b995c(0x251)][_0x5b995c(0x21a)]+'\x20{',...y(_0x353c3a[_0x5b995c(0x1fb)],!0x0),'}',...x(_0x353c3a[_0x5b995c(0x212)])]['join']('\x0a');}function C(_0x182134){const _0x4fc4a0=_0x3e3a;let _0x29b55c=_0x182134[_0x4fc4a0(0x1f4)][_0x4fc4a0(0x220)]===0x0?'':_0x4fc4a0(0x225)+(_0x182134[_0x4fc4a0(0x21c)]===_0x4fc4a0(0x1fb)?'methods':_0x4fc4a0(0x1f9))+':\x20'+_0x182134[_0x4fc4a0(0x1f4)][_0x4fc4a0(0x221)](',\x20');return _0x182134[_0x4fc4a0(0x21c)]===_0x4fc4a0(0x1fb)?(_0x182134[_0x4fc4a0(0x25e)]??_0x4fc4a0(0x22b))+_0x4fc4a0(0x269)+(_0x182134[_0x4fc4a0(0x1fb)]??'member')+_0x29b55c+_0x4fc4a0(0x271)+(_0x182134[_0x4fc4a0(0x25e)]??_0x4fc4a0(0x249)):_0x4fc4a0(0x26d)+_0x182134[_0x4fc4a0(0x237)]+_0x29b55c+_0x4fc4a0(0x260);}function w(_0x47c8ce,_0x18aa20){const _0x35556f=_0x3e3a;let _0x51a388=_0x47c8ce[_0x35556f(0x20f)](),_0x4321e3=_0x18aa20[_0x35556f(0x266)](_0x3f62ac=>_0x3f62ac['status']===_0x35556f(0x274)),_0x27eb8f=_0x18aa20[_0x35556f(0x266)](_0x253fbf=>_0x253fbf[_0x35556f(0x23d)]===_0x35556f(0x261)),_0x18ed53=_0x18aa20[_0x35556f(0x220)]>0x1;_0x4321e3[_0x35556f(0x220)]>0x0&&_0x51a388[_0x35556f(0x230)]?.(''+_0x4321e3[_0x35556f(0x254)](_0x400612=>_0x18ed53?_0x35556f(0x241)+_0x400612[_0x35556f(0x237)]+'\x0a'+S(_0x400612):S(_0x400612))[_0x35556f(0x221)]('\x0a\x0a')+(_0x18ed53&&_0x27eb8f[_0x35556f(0x220)]===0x0?'\x0a\x0a//\x20batch:\x20'+_0x4321e3['length']+_0x35556f(0x204):'')+'\x0a'),_0x27eb8f['length']>0x0&&_0x47c8ce['error']([..._0x27eb8f[_0x35556f(0x254)](_0x3d6927=>_0x18ed53?'//\x20[not-found]\x20'+_0x3d6927[_0x35556f(0x237)]+'\x0a'+C(_0x3d6927):C(_0x3d6927)),..._0x18ed53?['//\x20batch:\x20'+_0x4321e3[_0x35556f(0x220)]+'\x20found,\x20'+_0x27eb8f[_0x35556f(0x220)]+'\x20not\x20found']:[]][_0x35556f(0x221)]('\x0a\x0a'),{'code':_0x35556f(0x253),'exitCode':0x1});}function T(_0x10349d){const _0x4bae4e=_0x3e3a;let _0x4c2941=new _0x273d70(_0x4bae4e(0x1fc))[_0x4bae4e(0x21e)](_0x4bae4e(0x25c))[_0x4bae4e(0x24c)](_0x4bae4e(0x24a),_0x4bae4e(0x236))[_0x4bae4e(0x22a)](_0x371bae=>{const _0x6aa961=_0x4bae4e;if(_0x371bae['length']===0x0){_0x4c2941[_0x6aa961(0x252)]();return;}w(_0x4c2941,_0x10349d[_0x6aa961(0x203)][_0x6aa961(0x208)](_0x371bae));});return _0x4c2941['command'](_0x4bae4e(0x25a))[_0x4bae4e(0x21e)]('Find\x20API\x20methods,\x20types,\x20fields,\x20and\x20enums\x20by\x20keyword')[_0x4bae4e(0x24c)](_0x4bae4e(0x256),_0x4bae4e(0x24b))['addOption'](new _0x29ab34('--unit\x20<unit>',_0x4bae4e(0x217))[_0x4bae4e(0x246)](_0x1432f8))['action']((_0x3b6547,_0x3f05a9)=>{const _0x224e90=_0x4bae4e;let _0x1bc634=_0x10349d[_0x224e90(0x203)][_0x224e90(0x25a)]({'terms':_0x3b6547,..._0x3f05a9[_0x224e90(0x240)]===void 0x0?{}:{'unit':_0x3f05a9[_0x224e90(0x240)]}});_0x4c2941[_0x224e90(0x20f)]()['writeOut']?.(l(_0x1bc634,_0x3f05a9['unit'])+'\x0a');}),_0x4c2941[_0x4bae4e(0x21b)](_0x4bae4e(0x208))[_0x4bae4e(0x21e)]('Show\x20exact\x20API\x20classes,\x20members,\x20types,\x20fields,\x20or\x20enum\x20values')[_0x4bae4e(0x24c)](_0x4bae4e(0x1f7),'one\x20or\x20more\x20exact\x20API\x20symbols')['action'](_0x2f42a4=>{const _0x1cc334=_0x4bae4e;w(_0x4c2941,_0x10349d[_0x1cc334(0x203)][_0x1cc334(0x208)](_0x2f42a4));}),_0x4c2941;}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-rc.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-rc.0"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"commander": "^15.0.0"
|