@lovrabet/lovrabet-cli 2.1.17 → 2.1.18-beta.2

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.
Files changed (252) hide show
  1. package/lib/cli.d.ts +21 -0
  2. package/lib/cli.js +1 -1
  3. package/lib/commands/api-doc/index.d.ts +38 -0
  4. package/lib/commands/api-doc/index.js +1 -1
  5. package/lib/commands/app/cache.d.ts +61 -0
  6. package/lib/commands/app/cache.js +1 -1
  7. package/lib/commands/app/definitions.d.ts +26 -0
  8. package/lib/commands/app/definitions.js +1 -1
  9. package/lib/commands/app/eligibility.d.ts +16 -0
  10. package/lib/commands/app/eligibility.js +1 -1
  11. package/lib/commands/app/mock-loader.d.ts +41 -0
  12. package/lib/commands/app/mock-loader.js +1 -1
  13. package/lib/commands/app/remote-source.d.ts +66 -0
  14. package/lib/commands/app/remote-source.js +1 -1
  15. package/lib/commands/app/shared.d.ts +38 -0
  16. package/lib/commands/app/shared.js +1 -1
  17. package/lib/commands/app-config/get.d.ts +2 -0
  18. package/lib/commands/app-config/get.js +1 -1
  19. package/lib/commands/app-config/index.d.ts +2 -0
  20. package/lib/commands/app-config/index.js +1 -1
  21. package/lib/commands/artifact/index.d.ts +9 -0
  22. package/lib/commands/artifact/index.js +1 -1
  23. package/lib/commands/auth/device.d.ts +31 -0
  24. package/lib/commands/auth/device.js +1 -1
  25. package/lib/commands/auth/index.d.ts +23 -0
  26. package/lib/commands/auth/index.js +1 -1
  27. package/lib/commands/auth/prompt.d.ts +33 -0
  28. package/lib/commands/auth/prompt.js +1 -1
  29. package/lib/commands/bff/detail.d.ts +8 -0
  30. package/lib/commands/bff/detail.js +1 -1
  31. package/lib/commands/bff/exec.d.ts +19 -0
  32. package/lib/commands/bff/exec.js +1 -1
  33. package/lib/commands/bff/index.d.ts +15 -0
  34. package/lib/commands/bff/index.js +1 -1
  35. package/lib/commands/cli-skill/index.d.ts +9 -0
  36. package/lib/commands/cli-skill/index.js +1 -1
  37. package/lib/commands/common/config-policy.d.ts +80 -0
  38. package/lib/commands/common/config-policy.js +1 -1
  39. package/lib/commands/common/constraints.d.ts +67 -0
  40. package/lib/commands/common/constraints.js +1 -1
  41. package/lib/commands/common/flags.d.ts +41 -0
  42. package/lib/commands/common/flags.js +1 -1
  43. package/lib/commands/common/local-file.d.ts +6 -0
  44. package/lib/commands/common/local-file.js +1 -1
  45. package/lib/commands/config/definitions.d.ts +21 -0
  46. package/lib/commands/config/definitions.js +1 -1
  47. package/lib/commands/config/shared.d.ts +17 -0
  48. package/lib/commands/config/shared.js +1 -1
  49. package/lib/commands/data/index.d.ts +27 -0
  50. package/lib/commands/data/index.js +1 -1
  51. package/lib/commands/dataset/detail.d.ts +26 -0
  52. package/lib/commands/dataset/detail.js +1 -1
  53. package/lib/commands/dataset/index.d.ts +10 -0
  54. package/lib/commands/dataset/index.js +1 -1
  55. package/lib/commands/dataset/list.d.ts +18 -0
  56. package/lib/commands/dataset/list.js +1 -1
  57. package/lib/commands/dataset/sdk-doc.d.ts +6 -0
  58. package/lib/commands/dataset/sdk-doc.js +1 -1
  59. package/lib/commands/doctor.d.ts +23 -0
  60. package/lib/commands/doctor.js +1 -1
  61. package/lib/commands/file/index.d.ts +2 -0
  62. package/lib/commands/file/index.js +1 -1
  63. package/lib/commands/init.d.ts +32 -0
  64. package/lib/commands/init.js +1 -1
  65. package/lib/commands/kb/index.d.ts +8 -0
  66. package/lib/commands/kb/index.js +1 -1
  67. package/lib/commands/logs/index.d.ts +20 -0
  68. package/lib/commands/logs/index.js +1 -1
  69. package/lib/commands/ocr/index.d.ts +2 -0
  70. package/lib/commands/ocr/index.js +1 -1
  71. package/lib/commands/personal-bff/index.d.ts +5 -0
  72. package/lib/commands/personal-bff/index.js +1 -1
  73. package/lib/commands/registry.d.ts +56 -0
  74. package/lib/commands/registry.js +1 -1
  75. package/lib/commands/schedule/index.d.ts +2 -0
  76. package/lib/commands/schedule/index.js +1 -0
  77. package/lib/commands/schema.d.ts +18 -0
  78. package/lib/commands/schema.js +1 -1
  79. package/lib/commands/service/dynamic.d.ts +18 -0
  80. package/lib/commands/service/dynamic.js +1 -1
  81. package/lib/commands/service/function-name-adapter.d.ts +13 -0
  82. package/lib/commands/service/function-name-adapter.js +1 -1
  83. package/lib/commands/service/index.d.ts +2 -0
  84. package/lib/commands/service/index.js +1 -1
  85. package/lib/commands/service/registry.d.ts +102 -0
  86. package/lib/commands/service/registry.js +1 -1
  87. package/lib/commands/skill/commands/create.d.ts +2 -0
  88. package/lib/commands/skill/commands/create.js +1 -1
  89. package/lib/commands/skill/commands/install.d.ts +2 -0
  90. package/lib/commands/skill/commands/install.js +1 -1
  91. package/lib/commands/skill/commands/list.d.ts +2 -0
  92. package/lib/commands/skill/commands/list.js +1 -1
  93. package/lib/commands/skill/commands/push.d.ts +2 -0
  94. package/lib/commands/skill/commands/push.js +1 -1
  95. package/lib/commands/skill/commands/validate.d.ts +2 -0
  96. package/lib/commands/skill/commands/validate.js +1 -1
  97. package/lib/commands/skill/flags.d.ts +13 -0
  98. package/lib/commands/skill/flags.js +1 -1
  99. package/lib/commands/skill/index.d.ts +9 -0
  100. package/lib/commands/skill/index.js +1 -1
  101. package/lib/commands/skill/manifest-helpers.d.ts +5 -0
  102. package/lib/commands/skill/manifest-helpers.js +1 -1
  103. package/lib/commands/skill/push-execute.d.ts +49 -0
  104. package/lib/commands/skill/push-execute.js +1 -1
  105. package/lib/commands/skill/push-flow-helpers.d.ts +80 -0
  106. package/lib/commands/skill/push-flow-helpers.js +1 -1
  107. package/lib/commands/skill/push-retarget.d.ts +9 -0
  108. package/lib/commands/skill/push-retarget.js +1 -1
  109. package/lib/commands/skill/scopes.d.ts +13 -0
  110. package/lib/commands/skill/scopes.js +1 -1
  111. package/lib/commands/skill/summary.d.ts +6 -0
  112. package/lib/commands/skill/summary.js +1 -1
  113. package/lib/commands/skill/templates.d.ts +23 -0
  114. package/lib/commands/skill/templates.js +1 -1
  115. package/lib/commands/skill/validate.d.ts +20 -0
  116. package/lib/commands/skill/validate.js +1 -1
  117. package/lib/commands/sql/detail.d.ts +13 -0
  118. package/lib/commands/sql/detail.js +1 -1
  119. package/lib/commands/sql/exec.d.ts +21 -0
  120. package/lib/commands/sql/exec.js +1 -1
  121. package/lib/commands/sql/index.d.ts +9 -0
  122. package/lib/commands/sql/index.js +1 -1
  123. package/lib/commands/update.d.ts +10 -0
  124. package/lib/commands/update.js +1 -1
  125. package/lib/commands/workspace/index.d.ts +10 -0
  126. package/lib/commands/workspace/index.js +1 -1
  127. package/lib/config/schema.d.ts +108 -0
  128. package/lib/config/schema.js +1 -1
  129. package/lib/constant/app.d.ts +13 -0
  130. package/lib/constant/app.js +1 -1
  131. package/lib/constant/auth-mode.d.ts +28 -0
  132. package/lib/constant/auth-mode.js +1 -1
  133. package/lib/constant/cli.d.ts +86 -0
  134. package/lib/constant/cli.js +1 -1
  135. package/lib/constant/defaults.d.ts +45 -0
  136. package/lib/constant/defaults.js +1 -1
  137. package/lib/constant/distribution.d.ts +12 -0
  138. package/lib/constant/distribution.js +1 -1
  139. package/lib/constant/domain.d.ts +57 -0
  140. package/lib/constant/domain.js +1 -1
  141. package/lib/constant/env.d.ts +56 -0
  142. package/lib/constant/env.js +1 -1
  143. package/lib/constant/output.d.ts +13 -0
  144. package/lib/constant/output.js +1 -1
  145. package/lib/constant/product.d.ts +79 -0
  146. package/lib/constant/product.js +1 -1
  147. package/lib/constant/risk.d.ts +14 -0
  148. package/lib/constant/risk.js +1 -1
  149. package/lib/constant/url.d.ts +14 -0
  150. package/lib/constant/url.js +1 -1
  151. package/lib/context.d.ts +287 -0
  152. package/lib/context.js +1 -1
  153. package/lib/core/api-client.d.ts +451 -0
  154. package/lib/core/api-client.js +1 -1
  155. package/lib/core/db-resolver.d.ts +39 -0
  156. package/lib/core/db-resolver.js +1 -1
  157. package/lib/core/sdk-client.d.ts +62 -0
  158. package/lib/core/sdk-client.js +1 -1
  159. package/lib/errors.d.ts +25 -0
  160. package/lib/errors.js +1 -1
  161. package/lib/framework/build-all-flags.d.ts +24 -0
  162. package/lib/framework/build-all-flags.js +1 -1
  163. package/lib/framework/dryrun.d.ts +64 -0
  164. package/lib/framework/dryrun.js +1 -1
  165. package/lib/framework/flags.d.ts +19 -0
  166. package/lib/framework/flags.js +1 -1
  167. package/lib/framework/help.d.ts +21 -0
  168. package/lib/framework/help.js +1 -1
  169. package/lib/framework/index.d.ts +10 -0
  170. package/lib/framework/index.js +1 -1
  171. package/lib/framework/output.d.ts +10 -0
  172. package/lib/framework/output.js +1 -1
  173. package/lib/framework/preparse.d.ts +64 -0
  174. package/lib/framework/preparse.js +1 -1
  175. package/lib/framework/rate-limit.d.ts +10 -0
  176. package/lib/framework/rate-limit.js +1 -1
  177. package/lib/framework/response.d.ts +10 -0
  178. package/lib/framework/response.js +1 -1
  179. package/lib/framework/runner-confirmation.d.ts +46 -0
  180. package/lib/framework/runner-confirmation.js +1 -1
  181. package/lib/framework/runner-error.d.ts +28 -0
  182. package/lib/framework/runner-error.js +1 -1
  183. package/lib/framework/runner.d.ts +102 -0
  184. package/lib/framework/runner.js +1 -1
  185. package/lib/framework/schema-export.d.ts +29 -0
  186. package/lib/framework/schema-export.js +1 -1
  187. package/lib/framework/service-order.d.ts +4 -0
  188. package/lib/framework/service-order.js +1 -1
  189. package/lib/framework/types.d.ts +108 -0
  190. package/lib/framework/types.js +1 -1
  191. package/lib/generated/build-info.d.ts +4 -0
  192. package/lib/generated/build-info.js +1 -1
  193. package/lib/help.d.ts +25 -0
  194. package/lib/help.js +1 -1
  195. package/lib/runtime/event.d.ts +16 -0
  196. package/lib/runtime/event.js +1 -0
  197. package/lib/runtime/index.d.ts +13 -0
  198. package/lib/runtime/index.js +1 -0
  199. package/lib/runtime/queue.d.ts +6 -0
  200. package/lib/runtime/queue.js +1 -0
  201. package/lib/runtime/resolve.d.ts +14 -0
  202. package/lib/runtime/resolve.js +1 -0
  203. package/lib/runtime/types.d.ts +59 -0
  204. package/lib/runtime/types.js +1 -0
  205. package/lib/skills/npx-skills-add.d.ts +42 -0
  206. package/lib/skills/npx-skills-add.js +1 -1
  207. package/lib/skills/runtime-skill-sync/constants.d.ts +4 -0
  208. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  209. package/lib/skills/runtime-skill-sync/fs-utils.d.ts +21 -0
  210. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  211. package/lib/skills/runtime-skill-sync/hashing.d.ts +9 -0
  212. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  213. package/lib/skills/runtime-skill-sync/links.d.ts +18 -0
  214. package/lib/skills/runtime-skill-sync/links.js +1 -1
  215. package/lib/skills/runtime-skill-sync/list-local.d.ts +3 -0
  216. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  217. package/lib/skills/runtime-skill-sync/local-files.d.ts +25 -0
  218. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  219. package/lib/skills/runtime-skill-sync/materialize.d.ts +11 -0
  220. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  221. package/lib/skills/runtime-skill-sync/metadata.d.ts +7 -0
  222. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  223. package/lib/skills/runtime-skill-sync/paths.d.ts +11 -0
  224. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  225. package/lib/skills/runtime-skill-sync/push.d.ts +33 -0
  226. package/lib/skills/runtime-skill-sync/push.js +1 -1
  227. package/lib/skills/runtime-skill-sync/scopes.d.ts +5 -0
  228. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  229. package/lib/skills/runtime-skill-sync/types.d.ts +105 -0
  230. package/lib/skills/runtime-skill-sync/zip-codec.d.ts +9 -0
  231. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  232. package/lib/skills/runtime-skill-sync/zip-package.d.ts +15 -0
  233. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  234. package/lib/skills/runtime-skill-sync.d.ts +15 -0
  235. package/lib/skills/runtime-skill-sync.js +1 -1
  236. package/lib/utils/apply-jq-filter.d.ts +25 -0
  237. package/lib/utils/apply-jq-filter.js +1 -1
  238. package/lib/utils/logger.d.ts +73 -0
  239. package/lib/utils/logger.js +1 -1
  240. package/lib/utils/lossless-json.d.ts +21 -0
  241. package/lib/utils/lossless-json.js +1 -1
  242. package/lib/utils/params.d.ts +65 -0
  243. package/lib/utils/params.js +1 -1
  244. package/lib/utils/platform.d.ts +17 -0
  245. package/lib/utils/platform.js +1 -1
  246. package/lib/utils/update-notice.d.ts +10 -0
  247. package/lib/utils/update-notice.js +1 -1
  248. package/lib/utils/version.d.ts +18 -0
  249. package/lib/utils/version.js +1 -1
  250. package/lib/utils/write-cli-side-channel.d.ts +6 -0
  251. package/lib/utils/write-cli-side-channel.js +1 -1
  252. package/package.json +9 -1
@@ -1 +1 @@
1
- const a25_0x1ae0f1=a25_0x2969;(function(_0x322618,_0x3f2f24){const _0x1acdd2=a25_0x2969,_0x2c2fc2=_0x322618();while(!![]){try{const _0x579ac5=parseInt(_0x1acdd2(0x176))/0x1+-parseInt(_0x1acdd2(0x1a6))/0x2+-parseInt(_0x1acdd2(0x164))/0x3+-parseInt(_0x1acdd2(0x180))/0x4*(-parseInt(_0x1acdd2(0x199))/0x5)+-parseInt(_0x1acdd2(0x16e))/0x6+parseInt(_0x1acdd2(0x19c))/0x7*(-parseInt(_0x1acdd2(0x179))/0x8)+parseInt(_0x1acdd2(0x197))/0x9;if(_0x579ac5===_0x3f2f24)break;else _0x2c2fc2['push'](_0x2c2fc2['shift']());}catch(_0x26b46f){_0x2c2fc2['push'](_0x2c2fc2['shift']());}}}(a25_0x4776,0x5e78a));import{getDatasetDetail,listDatasets}from'../../core/api-client.js';function a25_0x2969(_0x3ea645,_0x2e98a7){_0x3ea645=_0x3ea645-0x161;const _0x477685=a25_0x4776();let _0x2969cd=_0x477685[_0x3ea645];return _0x2969cd;}import{CODE_FLAG}from'../../commands/common/flags.js';function normalizeField(_0x437024){const _0x1be250=a25_0x2969;if(_0x437024[_0x1be250(0x17c)])return null;const _0x17dcb9=Boolean(_0x437024[_0x1be250(0x18c)]!==undefined||_0x437024[_0x1be250(0x1a0)]!==undefined);let _0x426917={};if(!_0x17dcb9&&typeof _0x437024[_0x1be250(0x19e)]==='string')try{_0x426917=JSON['parse'](_0x437024[_0x1be250(0x19e)]);}catch{}const _0x1e80e3=_0x17dcb9?_0x437024[_0x1be250(0x17d)]:_0x437024['code'],_0x2867cf=_0x17dcb9?_0x437024[_0x1be250(0x18c)]:_0x437024['name'],_0x42e098=_0x17dcb9?_0x437024['doType']:_0x437024[_0x1be250(0x182)]||_0x437024[_0x1be250(0x18a)],_0x4638e0=_0x17dcb9?_0x437024[_0x1be250(0x16c)]===!![]:_0x426917[_0x1be250(0x16c)]===!![],_0x3f7c14=_0x17dcb9?_0x437024[_0x1be250(0x194)]===!![]:_0x426917[_0x1be250(0x194)]===!![],_0x569f4d=_0x17dcb9?_0x437024['options']??null:_0x426917[_0x1be250(0x178)]??null,_0x11194c={'name':_0x1e80e3,'displayName':_0x2867cf||_0x1e80e3,'type':_0x42e098,'dbType':_0x437024[_0x1be250(0x168)],'pk':_0x4638e0,'required':_0x3f7c14,'description':_0x437024[_0x1be250(0x17f)]||undefined};return Array['isArray'](_0x569f4d)&&_0x569f4d[_0x1be250(0x16a)]>0x0&&(_0x11194c['options']=_0x569f4d),_0x11194c;}function parseJsonMaybe(_0x4e362d){const _0x2bdc9e=a25_0x2969;if(typeof _0x4e362d!==_0x2bdc9e(0x189))return _0x4e362d;try{return JSON[_0x2bdc9e(0x17a)](_0x4e362d);}catch{return _0x4e362d;}}function a25_0x4776(){const _0x2a8c1f=['dataType','path','displayName','Get\x20dataset\x20detail\x20including\x20fields,\x20relations,\x20and\x20operations','isArray','str','code','sourceType','responseBody','modifierNameField','required','modelCode','updateTimeField','5070231GyOIqt','doVersion','5YBFWSJ','detail','push','308931GbzviD','trim','extend','formatRules','doType','tableComment','tableName','relations','dataset','operations','522104aLqLlh','requestFields','method','beforeScriptId','read','entries','indexes','1906452pIBRtZ','filter','dbId','modelId','dbType','dblinkInfoDTO','length','modifierIdField','pkField','requestBody','2262264lpOrkY','host','find','responseFields','validateRules','split','allFields','map','466855mhhtXF','dbtableConfig','options','24WmnLgh','parse','createTimeField','deleted','name','afterScriptId','description','3050876BlWMNu','object','type','fields','appCode','labelField','properties','dbName','datasetKey','string'];a25_0x4776=function(){return _0x2a8c1f;};return a25_0x4776();}function normalizeOperationEntry(_0x3dcde8,_0x3ce38c){const _0x5a12f2=a25_0x2969;if(!_0x3ce38c||typeof _0x3ce38c!==_0x5a12f2(0x181))return null;if(!_0x3ce38c[_0x5a12f2(0x1a8)]||!_0x3ce38c[_0x5a12f2(0x18b)])return null;const _0x220b25={'name':_0x3dcde8,'method':_0x3ce38c['method'],'path':_0x3ce38c[_0x5a12f2(0x18b)]};if(_0x3ce38c['host'])_0x220b25[_0x5a12f2(0x16f)]=_0x3ce38c[_0x5a12f2(0x16f)];if(_0x3ce38c['requestBody']!=null)_0x220b25[_0x5a12f2(0x16d)]=parseJsonMaybe(_0x3ce38c['requestBody']);if(_0x3ce38c[_0x5a12f2(0x192)]!=null)_0x220b25[_0x5a12f2(0x192)]=parseJsonMaybe(_0x3ce38c['responseBody']);if(_0x3ce38c[_0x5a12f2(0x1a9)]!=null)_0x220b25[_0x5a12f2(0x1a9)]=_0x3ce38c['beforeScriptId'];if(_0x3ce38c[_0x5a12f2(0x17e)]!=null)_0x220b25[_0x5a12f2(0x17e)]=_0x3ce38c[_0x5a12f2(0x17e)];if(Array['isArray'](_0x3ce38c[_0x5a12f2(0x1a7)]))_0x220b25[_0x5a12f2(0x1a7)]=_0x3ce38c[_0x5a12f2(0x1a7)];if(Array[_0x5a12f2(0x18e)](_0x3ce38c['responseFields']))_0x220b25[_0x5a12f2(0x171)]=_0x3ce38c[_0x5a12f2(0x171)];return _0x220b25;}function summarizeDbtable(_0x133510){const _0x42e025=a25_0x2969,_0x5d9190={},_0x4b1a2c=[_0x42e025(0x166),_0x42e025(0x187),_0x42e025(0x1a2),_0x42e025(0x188),_0x42e025(0x16c),_0x42e025(0x174),'logicField',_0x42e025(0x17b),_0x42e025(0x196),'creatorIdField','creatorNameField',_0x42e025(0x16b),_0x42e025(0x193),_0x42e025(0x185),_0x42e025(0x169)];for(const _0x211e34 of _0x4b1a2c){if(_0x133510[_0x211e34]!==undefined)_0x5d9190[_0x211e34]=_0x133510[_0x211e34];}return typeof _0x5d9190[_0x42e025(0x174)]===_0x42e025(0x189)&&_0x5d9190['allFields'][_0x42e025(0x16a)]>0x0&&(_0x5d9190['allFieldNames']=_0x5d9190['allFields'][_0x42e025(0x173)](',')[_0x42e025(0x175)](_0x1c941a=>_0x1c941a[_0x42e025(0x19d)]())[_0x42e025(0x165)](Boolean)),_0x5d9190;}function normalizeRelatedPages(_0x49893f){const _0x465196=a25_0x2969;if(!Array['isArray'](_0x49893f))return[];return _0x49893f[_0x465196(0x165)](_0x1c7992=>_0x1c7992&&typeof _0x1c7992===_0x465196(0x181))[_0x465196(0x175)](_0x42480d=>({'id':_0x42480d['id'],'type':_0x42480d[_0x465196(0x182)],'code':_0x42480d[_0x465196(0x190)],'title':_0x42480d['title'],'deleted':_0x42480d['deleted']===!![]}));}function normalizeFallbackFieldName(_0x47ac78,_0xf9658d){const _0x94e118=a25_0x2969,_0x18e759=_0x47ac78[_0x94e118(0x19d)]();if(!_0x18e759)return null;return{'name':_0x18e759,'displayName':_0x18e759,'type':undefined,'dbType':undefined,'pk':_0x18e759===_0xf9658d,'required':![],'description':undefined};}async function loadListFieldFallback(_0x185cd7,_0x3bbdf7){const _0x3cc861=a25_0x2969;if(!_0x185cd7||!_0x3bbdf7)return[];try{const _0x2838e1=await listDatasets(_0x185cd7,{'code':_0x3bbdf7}),_0x471ee6=_0x2838e1[_0x3cc861(0x170)](_0xadf3bc=>_0xadf3bc[_0x3cc861(0x190)]===_0x3bbdf7)??_0x2838e1[0x0],_0xa10da5=_0x471ee6?.[_0x3cc861(0x177)]??{},_0x3caf75=typeof _0xa10da5[_0x3cc861(0x174)]==='string'?_0xa10da5[_0x3cc861(0x174)]['split'](','):[];return _0x3caf75[_0x3cc861(0x175)](_0x30f33b=>normalizeFallbackFieldName(_0x30f33b,_0xa10da5[_0x3cc861(0x16c)]))[_0x3cc861(0x165)](_0x36b765=>_0x36b765!==null);}catch{return[];}}export const datasetDetail={'service':a25_0x1ae0f1(0x1a4),'command':a25_0x1ae0f1(0x19a),'description':a25_0x1ae0f1(0x18d),'risk':a25_0x1ae0f1(0x161),'flags':[CODE_FLAG],async 'execute'(_0x2cef03){const _0x2cd518=a25_0x1ae0f1,_0x349cb3=await getDatasetDetail(_0x2cef03[_0x2cd518(0x18f)]('code')),_0x559911=Array[_0x2cd518(0x18e)](_0x349cb3['fields'])?_0x349cb3[_0x2cd518(0x183)]:Array[_0x2cd518(0x18e)](_0x349cb3[_0x2cd518(0x186)])?_0x349cb3[_0x2cd518(0x186)]:[];let _0x177798=_0x559911[_0x2cd518(0x175)](_0x1d7901=>normalizeField(_0x1d7901))[_0x2cd518(0x165)](_0x4cae23=>_0x4cae23!==null);_0x177798['length']===0x0&&(_0x177798=await loadListFieldFallback(_0x2cef03[_0x2cd518(0x184)],_0x2cef03[_0x2cd518(0x18f)]('code')));const _0x3ef038=_0x349cb3[_0x2cd518(0x1a5)]??{},_0x2104e3=[];for(const [_0x26e9dc,_0x2d9946]of Object[_0x2cd518(0x162)](_0x3ef038)){const _0x3bb2ee=normalizeOperationEntry(_0x26e9dc,_0x2d9946);if(_0x3bb2ee)_0x2104e3[_0x2cd518(0x19b)](_0x3bb2ee);}const _0x4285c0=_0x349cb3['dbtableConfig']??{},_0x4a2ec3=_0x349cb3[_0x2cd518(0x1a4)]??{},_0x11b8ec=_0x4285c0['dbId']!=null?{'id':_0x4285c0['dbId'],'name':_0x4285c0['dbName']??null}:undefined;let _0x214ae1;return typeof _0x349cb3[_0x2cd518(0x19e)]==='string'&&(_0x214ae1=parseJsonMaybe(_0x349cb3[_0x2cd518(0x19e)])),{'ok':!![],'data':{'id':_0x349cb3[_0x2cd518(0x167)]??_0x349cb3['id'],'name':_0x349cb3[_0x2cd518(0x17d)],'code':_0x349cb3[_0x2cd518(0x195)]||_0x349cb3[_0x2cd518(0x190)],'doVersion':_0x349cb3[_0x2cd518(0x198)],'description':_0x349cb3['description']||_0x4a2ec3[_0x2cd518(0x1a1)]||undefined,'source':_0x349cb3['source']||_0x4a2ec3[_0x2cd518(0x191)],'table':_0x4285c0['tableName']||_0x4a2ec3[_0x2cd518(0x1a2)],'datasetKey':_0x4285c0[_0x2cd518(0x188)],'pk':_0x4285c0[_0x2cd518(0x16c)],'db':_0x11b8ec,'dbtable':summarizeDbtable(_0x4285c0),'fields':_0x177798,'operations':_0x2104e3,'indexes':Array[_0x2cd518(0x18e)](_0x4a2ec3['indexes'])?_0x4a2ec3[_0x2cd518(0x163)]:[],'relations':_0x349cb3[_0x2cd518(0x1a3)]??null,'relatedPages':normalizeRelatedPages(_0x349cb3['relatedPageInfoList']),...Array[_0x2cd518(0x18e)](_0x349cb3['columnCodeListWithDeleted'])?{'columnCodeListWithDeleted':_0x349cb3['columnCodeListWithDeleted']}:{},'formatRules':Array[_0x2cd518(0x18e)](_0x349cb3[_0x2cd518(0x19f)])?_0x349cb3['formatRules']:[],'validateRules':Array['isArray'](_0x349cb3[_0x2cd518(0x172)])?_0x349cb3[_0x2cd518(0x172)]:[],..._0x214ae1!==undefined?{'extend':_0x214ae1}:{},'stats':{'fieldCount':_0x177798[_0x2cd518(0x16a)],'operationCount':_0x2104e3[_0x2cd518(0x16a)]}}};}};
1
+ const a25_0x1f1529=a25_0x129e;(function(_0x3981f8,_0x4638e0){const _0x528b66=a25_0x129e,_0x4a2c21=_0x3981f8();while(!![]){try{const _0x4d507b=parseInt(_0x528b66(0x186))/0x1*(parseInt(_0x528b66(0x17d))/0x2)+parseInt(_0x528b66(0x18b))/0x3*(-parseInt(_0x528b66(0x190))/0x4)+parseInt(_0x528b66(0x191))/0x5*(-parseInt(_0x528b66(0x15e))/0x6)+-parseInt(_0x528b66(0x16c))/0x7+-parseInt(_0x528b66(0x14b))/0x8*(-parseInt(_0x528b66(0x176))/0x9)+-parseInt(_0x528b66(0x171))/0xa*(-parseInt(_0x528b66(0x179))/0xb)+parseInt(_0x528b66(0x189))/0xc*(parseInt(_0x528b66(0x18e))/0xd);if(_0x4d507b===_0x4638e0)break;else _0x4a2c21['push'](_0x4a2c21['shift']());}catch(_0x2fdc9b){_0x4a2c21['push'](_0x4a2c21['shift']());}}}(a25_0xdf2e,0x6210f));import{getDatasetDetail,listDatasets}from'../../core/api-client.js';function a25_0x129e(_0x39990d,_0x3e5e6b){_0x39990d=_0x39990d-0x149;const _0xdf2e50=a25_0xdf2e();let _0x129e75=_0xdf2e50[_0x39990d];return _0x129e75;}import{CODE_FLAG}from'../../commands/common/flags.js';function normalizeField(_0x34de00){const _0x16f76b=a25_0x129e;if(_0x34de00[_0x16f76b(0x150)])return null;const _0x137651=Boolean(_0x34de00['displayName']!==undefined||_0x34de00['doType']!==undefined);let _0x1d1dec={};if(!_0x137651&&typeof _0x34de00[_0x16f76b(0x177)]==='string')try{_0x1d1dec=JSON['parse'](_0x34de00[_0x16f76b(0x177)]);}catch{}const _0x4398da=_0x137651?_0x34de00[_0x16f76b(0x14c)]:_0x34de00['code'],_0x22041f=_0x137651?_0x34de00[_0x16f76b(0x18c)]:_0x34de00[_0x16f76b(0x14c)],_0x5178eb=_0x137651?_0x34de00['doType']:_0x34de00[_0x16f76b(0x188)]||_0x34de00[_0x16f76b(0x154)],_0x3c76c8=_0x137651?_0x34de00[_0x16f76b(0x17f)]===!![]:_0x1d1dec[_0x16f76b(0x17f)]===!![],_0x53babf=_0x137651?_0x34de00[_0x16f76b(0x169)]===!![]:_0x1d1dec['required']===!![],_0xf61336=_0x137651?_0x34de00['options']??null:_0x1d1dec[_0x16f76b(0x173)]??null,_0x4a2491={'name':_0x4398da,'displayName':_0x22041f||_0x4398da,'type':_0x5178eb,'dbType':_0x34de00[_0x16f76b(0x16f)],'pk':_0x3c76c8,'required':_0x53babf,'description':_0x34de00['description']||undefined};return Array[_0x16f76b(0x14a)](_0xf61336)&&_0xf61336[_0x16f76b(0x14d)]>0x0&&(_0x4a2491[_0x16f76b(0x173)]=_0xf61336),_0x4a2491;}function parseJsonMaybe(_0xf528c7){const _0x1d77cb=a25_0x129e;if(typeof _0xf528c7!==_0x1d77cb(0x152))return _0xf528c7;try{return JSON[_0x1d77cb(0x15b)](_0xf528c7);}catch{return _0xf528c7;}}function normalizeOperationEntry(_0x481bf6,_0x569811){const _0x19ba31=a25_0x129e;if(!_0x569811||typeof _0x569811!=='object')return null;if(!_0x569811[_0x19ba31(0x17e)]||!_0x569811['path'])return null;const _0x89ef3b={'name':_0x481bf6,'method':_0x569811[_0x19ba31(0x17e)],'path':_0x569811['path']};if(_0x569811['host'])_0x89ef3b[_0x19ba31(0x172)]=_0x569811[_0x19ba31(0x172)];if(_0x569811[_0x19ba31(0x18d)]!=null)_0x89ef3b[_0x19ba31(0x18d)]=parseJsonMaybe(_0x569811[_0x19ba31(0x18d)]);if(_0x569811[_0x19ba31(0x164)]!=null)_0x89ef3b[_0x19ba31(0x164)]=parseJsonMaybe(_0x569811['responseBody']);if(_0x569811['beforeScriptId']!=null)_0x89ef3b['beforeScriptId']=_0x569811[_0x19ba31(0x14e)];if(_0x569811[_0x19ba31(0x170)]!=null)_0x89ef3b['afterScriptId']=_0x569811['afterScriptId'];if(Array[_0x19ba31(0x14a)](_0x569811[_0x19ba31(0x184)]))_0x89ef3b['requestFields']=_0x569811[_0x19ba31(0x184)];if(Array['isArray'](_0x569811[_0x19ba31(0x160)]))_0x89ef3b['responseFields']=_0x569811[_0x19ba31(0x160)];return _0x89ef3b;}function a25_0xdf2e(){const _0x39f068=['formatRules','fields','56133PLINHt','extend','dbId','11bQmCoW','entries','Get\x20dataset\x20detail\x20including\x20fields,\x20relations,\x20and\x20operations','datasetKey','22StNNuX','method','pkField','source','validateRules','filter','split','requestFields','tableName','51751oAbfDU','allFieldNames','type','10333764eapHMS','doVersion','118299QFEXVN','displayName','requestBody','13LOHlQn','createTimeField','4dCjtaJ','1339165lDpNGJ','dbtableConfig','isArray','168ysdGEG','name','length','beforeScriptId','modelCode','deleted','str','string','tableComment','dataType','detail','logicField','map','indexes','read','relations','parse','operations','trim','12RSCIuX','columnCodeListWithDeleted','responseFields','code','properties','creatorNameField','responseBody','allFields','push','creatorIdField','dbName','required','relatedPageInfoList','appCode','5261326amxTGG','description','labelField','dbType','afterScriptId','1670110YltEbL','host','options'];a25_0xdf2e=function(){return _0x39f068;};return a25_0xdf2e();}function summarizeDbtable(_0x40d0cd){const _0x2da810=a25_0x129e,_0x4ee111={},_0x2adbcc=[_0x2da810(0x178),_0x2da810(0x168),_0x2da810(0x185),_0x2da810(0x17c),_0x2da810(0x17f),_0x2da810(0x165),_0x2da810(0x156),_0x2da810(0x18f),'updateTimeField',_0x2da810(0x167),_0x2da810(0x163),'modifierIdField','modifierNameField',_0x2da810(0x16e),'dblinkInfoDTO'];for(const _0x2d71a9 of _0x2adbcc){if(_0x40d0cd[_0x2d71a9]!==undefined)_0x4ee111[_0x2d71a9]=_0x40d0cd[_0x2d71a9];}return typeof _0x4ee111[_0x2da810(0x165)]===_0x2da810(0x152)&&_0x4ee111[_0x2da810(0x165)][_0x2da810(0x14d)]>0x0&&(_0x4ee111[_0x2da810(0x187)]=_0x4ee111[_0x2da810(0x165)][_0x2da810(0x183)](',')[_0x2da810(0x157)](_0x4f6a4f=>_0x4f6a4f[_0x2da810(0x15d)]())[_0x2da810(0x182)](Boolean)),_0x4ee111;}function normalizeRelatedPages(_0x151889){const _0x390279=a25_0x129e;if(!Array['isArray'](_0x151889))return[];return _0x151889[_0x390279(0x182)](_0x502c35=>_0x502c35&&typeof _0x502c35==='object')[_0x390279(0x157)](_0x104568=>({'id':_0x104568['id'],'type':_0x104568[_0x390279(0x188)],'code':_0x104568[_0x390279(0x161)],'title':_0x104568['title'],'deleted':_0x104568['deleted']===!![]}));}function normalizeFallbackFieldName(_0x402790,_0x30fb42){const _0x478c14=a25_0x129e,_0x25357f=_0x402790[_0x478c14(0x15d)]();if(!_0x25357f)return null;return{'name':_0x25357f,'displayName':_0x25357f,'type':undefined,'dbType':undefined,'pk':_0x25357f===_0x30fb42,'required':![],'description':undefined};}async function loadListFieldFallback(_0x5e8810,_0x470019){const _0xf9aec6=a25_0x129e;if(!_0x5e8810||!_0x470019)return[];try{const _0x186a27=await listDatasets(_0x5e8810,{'code':_0x470019}),_0x9f0b4a=_0x186a27['find'](_0x41960e=>_0x41960e['code']===_0x470019)??_0x186a27[0x0],_0x2de4d3=_0x9f0b4a?.[_0xf9aec6(0x149)]??{},_0x686dd8=typeof _0x2de4d3[_0xf9aec6(0x165)]==='string'?_0x2de4d3['allFields'][_0xf9aec6(0x183)](','):[];return _0x686dd8[_0xf9aec6(0x157)](_0x41082a=>normalizeFallbackFieldName(_0x41082a,_0x2de4d3[_0xf9aec6(0x17f)]))[_0xf9aec6(0x182)](_0x3f7fc5=>_0x3f7fc5!==null);}catch{return[];}}export const datasetDetail={'service':'dataset','command':a25_0x1f1529(0x155),'description':a25_0x1f1529(0x17b),'risk':a25_0x1f1529(0x159),'flags':[CODE_FLAG],async 'execute'(_0x3eb626){const _0x27ca82=a25_0x1f1529,_0x5b4165=await getDatasetDetail(_0x3eb626[_0x27ca82(0x151)]('code')),_0x4a0792=Array[_0x27ca82(0x14a)](_0x5b4165[_0x27ca82(0x175)])?_0x5b4165['fields']:Array[_0x27ca82(0x14a)](_0x5b4165[_0x27ca82(0x162)])?_0x5b4165['properties']:[];let _0x116e43=_0x4a0792[_0x27ca82(0x157)](_0x466c14=>normalizeField(_0x466c14))[_0x27ca82(0x182)](_0xc817fd=>_0xc817fd!==null);_0x116e43[_0x27ca82(0x14d)]===0x0&&(_0x116e43=await loadListFieldFallback(_0x3eb626[_0x27ca82(0x16b)],_0x3eb626[_0x27ca82(0x151)](_0x27ca82(0x161))));const _0x38c7c6=_0x5b4165[_0x27ca82(0x15c)]??{},_0x586bbc=[];for(const [_0x2d6047,_0x5999da]of Object[_0x27ca82(0x17a)](_0x38c7c6)){const _0x22dbf5=normalizeOperationEntry(_0x2d6047,_0x5999da);if(_0x22dbf5)_0x586bbc[_0x27ca82(0x166)](_0x22dbf5);}const _0x4c9c1b=_0x5b4165['dbtableConfig']??{},_0x3fe96e=_0x5b4165['dataset']??{},_0x2c9704=_0x4c9c1b[_0x27ca82(0x178)]!=null?{'id':_0x4c9c1b['dbId'],'name':_0x4c9c1b['dbName']??null}:undefined;let _0x5527c6;return typeof _0x5b4165[_0x27ca82(0x177)]===_0x27ca82(0x152)&&(_0x5527c6=parseJsonMaybe(_0x5b4165[_0x27ca82(0x177)])),{'ok':!![],'data':{'id':_0x5b4165['modelId']??_0x5b4165['id'],'name':_0x5b4165[_0x27ca82(0x14c)],'code':_0x5b4165[_0x27ca82(0x14f)]||_0x5b4165[_0x27ca82(0x161)],'doVersion':_0x5b4165[_0x27ca82(0x18a)],'description':_0x5b4165[_0x27ca82(0x16d)]||_0x3fe96e[_0x27ca82(0x153)]||undefined,'source':_0x5b4165[_0x27ca82(0x180)]||_0x3fe96e['sourceType'],'table':_0x4c9c1b['tableName']||_0x3fe96e[_0x27ca82(0x185)],'datasetKey':_0x4c9c1b[_0x27ca82(0x17c)],'pk':_0x4c9c1b[_0x27ca82(0x17f)],'db':_0x2c9704,'dbtable':summarizeDbtable(_0x4c9c1b),'fields':_0x116e43,'operations':_0x586bbc,'indexes':Array[_0x27ca82(0x14a)](_0x3fe96e[_0x27ca82(0x158)])?_0x3fe96e[_0x27ca82(0x158)]:[],'relations':_0x5b4165[_0x27ca82(0x15a)]??null,'relatedPages':normalizeRelatedPages(_0x5b4165[_0x27ca82(0x16a)]),...Array['isArray'](_0x5b4165[_0x27ca82(0x15f)])?{'columnCodeListWithDeleted':_0x5b4165[_0x27ca82(0x15f)]}:{},'formatRules':Array[_0x27ca82(0x14a)](_0x5b4165[_0x27ca82(0x174)])?_0x5b4165['formatRules']:[],'validateRules':Array['isArray'](_0x5b4165[_0x27ca82(0x181)])?_0x5b4165[_0x27ca82(0x181)]:[],..._0x5527c6!==undefined?{'extend':_0x5527c6}:{},'stats':{'fieldCount':_0x116e43['length'],'operationCount':_0x586bbc[_0x27ca82(0x14d)]}}};}};
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @fileoverview `dataset` command group — exports the declarative definition list.
3
+ *
4
+ * Why this module exists: mirrors the `bff/` and `sql/` patterns. The runtime
5
+ * CLI provides `dataset list` (discover) and `dataset detail` (inspect),
6
+ * but not create/update/delete (those are Studio-only operations in the
7
+ * runtime context).
8
+ */
9
+ import type { CommandDefinition } from "../../framework/types.js";
10
+ export declare const datasetDefinitions: CommandDefinition[];
@@ -1 +1 @@
1
- function a26_0x30c7(){const _0x12fc93=['14737041sxRWIV','5653572HpZeFx','1016550UrXgxi','2040YYvpFp','1986766NPigRG','3834603vCWsCc','6KcqPTp','5739695PBHvJw','8183BjyZSF'];a26_0x30c7=function(){return _0x12fc93;};return a26_0x30c7();}(function(_0x29a039,_0x2670d3){const _0x220c59=a26_0x7cc8,_0x438d12=_0x29a039();while(!![]){try{const _0x280358=parseInt(_0x220c59(0xd7))/0x1+-parseInt(_0x220c59(0xd9))/0x2+-parseInt(_0x220c59(0xda))/0x3+parseInt(_0x220c59(0xd6))/0x4+-parseInt(_0x220c59(0xd3))/0x5*(parseInt(_0x220c59(0xd2))/0x6)+-parseInt(_0x220c59(0xd4))/0x7*(-parseInt(_0x220c59(0xd8))/0x8)+parseInt(_0x220c59(0xd5))/0x9;if(_0x280358===_0x2670d3)break;else _0x438d12['push'](_0x438d12['shift']());}catch(_0x8ede51){_0x438d12['push'](_0x438d12['shift']());}}}(a26_0x30c7,0xe6f2c));function a26_0x7cc8(_0x144d8a,_0x26adaa){_0x144d8a=_0x144d8a-0xd2;const _0x30c7a=a26_0x30c7();let _0x7cc84e=_0x30c7a[_0x144d8a];return _0x7cc84e;}import{datasetList}from'../../commands/dataset/list.js';import{datasetDetail}from'../../commands/dataset/detail.js';import{datasetSdkDoc}from'../../commands/dataset/sdk-doc.js';export const datasetDefinitions=[datasetList,datasetDetail,datasetSdkDoc];
1
+ function a26_0x5734(){const _0x1b650d=['86rQYMqd','755715QoLVQh','773124DhIPpc','5760mPbLCe','328ccuLzH','3091830ZaOoqG','8400nbHUoC','4jheSwU','596608DEEwql','3329285ohWMHs'];a26_0x5734=function(){return _0x1b650d;};return a26_0x5734();}(function(_0xf4ce2e,_0x5c8d84){const _0x191e07=a26_0x256a,_0x2f2dd2=_0xf4ce2e();while(!![]){try{const _0x1530ab=parseInt(_0x191e07(0x64))/0x1*(-parseInt(_0x191e07(0x68))/0x2)+parseInt(_0x191e07(0x65))/0x3+parseInt(_0x191e07(0x6b))/0x4*(-parseInt(_0x191e07(0x6d))/0x5)+-parseInt(_0x191e07(0x66))/0x6+parseInt(_0x191e07(0x69))/0x7+-parseInt(_0x191e07(0x6c))/0x8+-parseInt(_0x191e07(0x67))/0x9*(-parseInt(_0x191e07(0x6a))/0xa);if(_0x1530ab===_0x5c8d84)break;else _0x2f2dd2['push'](_0x2f2dd2['shift']());}catch(_0x1be51e){_0x2f2dd2['push'](_0x2f2dd2['shift']());}}}(a26_0x5734,0x54e9c));import{datasetList}from'../../commands/dataset/list.js';import{datasetDetail}from'../../commands/dataset/detail.js';function a26_0x256a(_0x4d6e7d,_0xb838e3){_0x4d6e7d=_0x4d6e7d-0x64;const _0x57341b=a26_0x5734();let _0x256a6b=_0x57341b[_0x4d6e7d];return _0x256a6b;}import{datasetSdkDoc}from'../../commands/dataset/sdk-doc.js';export const datasetDefinitions=[datasetList,datasetDetail,datasetSdkDoc];
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @fileoverview `dataset list` command — discovers datasets by name or code.
3
+ *
4
+ * Why `--name` and `--code` are both optional: users often search by name
5
+ * when they don't remember the exact code. The API handles both cases server-side,
6
+ * so the CLI just passes the filters through without client-side pre-filtering.
7
+ *
8
+ * Why `CODE_FLAG` is reused (with `required: false`) for the `--code` filter:
9
+ * the same 32-char hex pattern applies to dataset codes. Adding a separate
10
+ * `CODECODE_FLAG` would duplicate the pattern. The `required: false` override
11
+ * is correct because this is an optional filter, not a mandatory lookup key.
12
+ *
13
+ * Why `db.allFields.split(",").map(...)` for the fields array: the API returns
14
+ * `allFields` as a comma-separated string, not a JSON array. We split it here
15
+ * so callers always get a consistent array type regardless of API shape.
16
+ */
17
+ import type { CommandDefinition } from "../../framework/types.js";
18
+ export declare const datasetList: CommandDefinition;
@@ -1 +1 @@
1
- const a27_0x236ff2=a27_0x165d;(function(_0xcb15ae,_0x25e294){const _0x543161=a27_0x165d,_0x436c1c=_0xcb15ae();while(!![]){try{const _0x57c86c=-parseInt(_0x543161(0x184))/0x1+parseInt(_0x543161(0x17b))/0x2+-parseInt(_0x543161(0x182))/0x3+-parseInt(_0x543161(0x183))/0x4+-parseInt(_0x543161(0x185))/0x5*(parseInt(_0x543161(0x172))/0x6)+-parseInt(_0x543161(0x177))/0x7*(parseInt(_0x543161(0x188))/0x8)+parseInt(_0x543161(0x180))/0x9*(parseInt(_0x543161(0x173))/0xa);if(_0x57c86c===_0x25e294)break;else _0x436c1c['push'](_0x436c1c['shift']());}catch(_0x40fcf3){_0x436c1c['push'](_0x436c1c['shift']());}}}(a27_0x3c43,0xb030d));function a27_0x165d(_0x32e0c1,_0x29799a){_0x32e0c1=_0x32e0c1-0x172;const _0x3c43ee=a27_0x3c43();let _0x165de=_0x3c43ee[_0x32e0c1];return _0x165de;}import{listDatasets}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';function a27_0x3c43(){const _0x427cd9=['dataset','allFields','map','str','9bKxdcd','dbtableConfig','2673348bsSngM','2384000HZkELs','1410258pciaMT','13910oisDBu','name','appCode','1296yMvwWr','1926CUQpqI','43497340jZwAvJ','source','code','length','45479UOqhri','read','string','datasetKey','2429706bEVbty'];a27_0x3c43=function(){return _0x427cd9;};return a27_0x3c43();}export const datasetList={'service':a27_0x236ff2(0x17c),'command':'list','description':'List\x20datasets\x20in\x20the\x20app\x20(supports\x20server-side\x20name/code\x20filtering)','risk':a27_0x236ff2(0x178),'flags':[{'name':a27_0x236ff2(0x186),'type':a27_0x236ff2(0x179),'description':'Filter\x20by\x20dataset\x20name\x20(server-side\x20fuzzy\x20match)'},{...CODE_FLAG,'required':![],'description':'Filter\x20by\x20dataset\x20code\x20(server-side\x20exact\x20match)'}],async 'execute'(_0x2bc841){const _0x338db8=a27_0x236ff2,_0x53653d=_0x2bc841[_0x338db8(0x17f)](_0x338db8(0x186)),_0x138d19=_0x2bc841[_0x338db8(0x17f)]('code'),_0x403dde=await listDatasets(_0x2bc841[_0x338db8(0x187)],{..._0x53653d&&{'name':_0x53653d},..._0x138d19&&{'code':_0x138d19}});return{'ok':!![],'data':{'total':_0x403dde[_0x338db8(0x176)],'datasets':_0x403dde[_0x338db8(0x17e)](_0x16294a=>{const _0x1896ad=_0x338db8,_0x59b81c=_0x16294a[_0x1896ad(0x181)]??{};return{'id':_0x16294a['id'],'code':_0x16294a[_0x1896ad(0x175)],'name':_0x16294a[_0x1896ad(0x186)],'source':_0x16294a[_0x1896ad(0x174)],'description':_0x16294a['description'],'table':_0x59b81c['tableName'],'datasetKey':_0x59b81c[_0x1896ad(0x17a)],'pk':_0x59b81c['pkField'],'fields':_0x59b81c[_0x1896ad(0x17d)]?_0x59b81c[_0x1896ad(0x17d)]['split'](',')['map'](_0x343cf9=>_0x343cf9['trim']()):[]};})}};}};
1
+ function a27_0x5ca1(_0x4c144e,_0x52599e){_0x4c144e=_0x4c144e-0x6d;const _0x805cb7=a27_0x805c();let _0x5ca143=_0x805cb7[_0x4c144e];return _0x5ca143;}const a27_0x232138=a27_0x5ca1;(function(_0x3b115a,_0xd9d695){const _0x5dfa4d=a27_0x5ca1,_0x39382a=_0x3b115a();while(!![]){try{const _0x56b62a=parseInt(_0x5dfa4d(0x7b))/0x1*(-parseInt(_0x5dfa4d(0x74))/0x2)+parseInt(_0x5dfa4d(0x86))/0x3+-parseInt(_0x5dfa4d(0x6d))/0x4*(parseInt(_0x5dfa4d(0x89))/0x5)+parseInt(_0x5dfa4d(0x85))/0x6+parseInt(_0x5dfa4d(0x84))/0x7*(-parseInt(_0x5dfa4d(0x6f))/0x8)+parseInt(_0x5dfa4d(0x78))/0x9*(parseInt(_0x5dfa4d(0x79))/0xa)+parseInt(_0x5dfa4d(0x73))/0xb;if(_0x56b62a===_0xd9d695)break;else _0x39382a['push'](_0x39382a['shift']());}catch(_0x53ef13){_0x39382a['push'](_0x39382a['shift']());}}}(a27_0x805c,0xb0af4));import{listDatasets}from'../../core/api-client.js';function a27_0x805c(){const _0x75dad2=['length','24jMFpUw','dataset','read','pkField','3804361yBuJIb','12MnyqGS','allFields','trim','list','18aoHeAM','3107310WbKqyN','code','158854KDOUdC','description','map','string','str','name','Filter\x20by\x20dataset\x20name\x20(server-side\x20fuzzy\x20match)','dbtableConfig','split','611870VgcxsY','8121012rItrmg','2953440CXtsXD','source','Filter\x20by\x20dataset\x20code\x20(server-side\x20exact\x20match)','5UDUxWX','tableName','5464964LZXWhw'];a27_0x805c=function(){return _0x75dad2;};return a27_0x805c();}import{CODE_FLAG}from'../../commands/common/flags.js';export const datasetList={'service':a27_0x232138(0x70),'command':a27_0x232138(0x77),'description':'List\x20datasets\x20in\x20the\x20app\x20(supports\x20server-side\x20name/code\x20filtering)','risk':a27_0x232138(0x71),'flags':[{'name':a27_0x232138(0x80),'type':a27_0x232138(0x7e),'description':a27_0x232138(0x81)},{...CODE_FLAG,'required':![],'description':a27_0x232138(0x88)}],async 'execute'(_0x16a606){const _0x464964=a27_0x232138,_0x327588=_0x16a606['str'](_0x464964(0x80)),_0x28705d=_0x16a606[_0x464964(0x7f)]('code'),_0x299371=await listDatasets(_0x16a606['appCode'],{..._0x327588&&{'name':_0x327588},..._0x28705d&&{'code':_0x28705d}});return{'ok':!![],'data':{'total':_0x299371[_0x464964(0x6e)],'datasets':_0x299371[_0x464964(0x7d)](_0x174ae6=>{const _0x4ad9d6=_0x464964,_0x1d8aa4=_0x174ae6[_0x4ad9d6(0x82)]??{};return{'id':_0x174ae6['id'],'code':_0x174ae6[_0x4ad9d6(0x7a)],'name':_0x174ae6['name'],'source':_0x174ae6[_0x4ad9d6(0x87)],'description':_0x174ae6[_0x4ad9d6(0x7c)],'table':_0x1d8aa4[_0x4ad9d6(0x8a)],'datasetKey':_0x1d8aa4['datasetKey'],'pk':_0x1d8aa4[_0x4ad9d6(0x72)],'fields':_0x1d8aa4[_0x4ad9d6(0x75)]?_0x1d8aa4[_0x4ad9d6(0x75)][_0x4ad9d6(0x83)](',')[_0x4ad9d6(0x7d)](_0x1abeb1=>_0x1abeb1[_0x4ad9d6(0x76)]()):[]};})}};}};
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @fileoverview `dataset sdk-doc` command — fetch dataset SDK usage markdown.
3
+ */
4
+ import type { CommandDefinition } from "../../framework/types.js";
5
+ export declare function formatDatasetSdkMarkdown(markdown: string | undefined): string;
6
+ export declare const datasetSdkDoc: CommandDefinition;
@@ -1 +1 @@
1
- const a28_0x5ad5a3=a28_0x31b9;(function(_0x5201ea,_0x41b9c4){const _0x599abd=a28_0x31b9,_0x17cee8=_0x5201ea();while(!![]){try{const _0x56f301=-parseInt(_0x599abd(0xba))/0x1*(parseInt(_0x599abd(0xb7))/0x2)+-parseInt(_0x599abd(0xa7))/0x3+-parseInt(_0x599abd(0xae))/0x4*(parseInt(_0x599abd(0xa8))/0x5)+parseInt(_0x599abd(0xb5))/0x6*(parseInt(_0x599abd(0xaa))/0x7)+parseInt(_0x599abd(0xb9))/0x8*(parseInt(_0x599abd(0xa9))/0x9)+-parseInt(_0x599abd(0xb2))/0xa*(parseInt(_0x599abd(0xb4))/0xb)+-parseInt(_0x599abd(0xb3))/0xc*(-parseInt(_0x599abd(0xab))/0xd);if(_0x56f301===_0x41b9c4)break;else _0x17cee8['push'](_0x17cee8['shift']());}catch(_0x29e6e9){_0x17cee8['push'](_0x17cee8['shift']());}}}(a28_0x3d44,0x54a1b));import{getDatasetSdkUsageDoc}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';const DEFAULT_MARKDOWN='#\x20Dataset\x20SDK\x20Usage\x20Documentation\x0a\x0a暂无\x20SDK\x20使用文档';export function formatDatasetSdkMarkdown(_0x55d89e){const _0x1a8f9d=a28_0x31b9,_0x347e40=typeof _0x55d89e===_0x1a8f9d(0xa6)?_0x55d89e[_0x1a8f9d(0xb8)]():'';return _0x347e40||DEFAULT_MARKDOWN;}function a28_0x31b9(_0xdb631b,_0x274872){_0xdb631b=_0xdb631b-0xa6;const _0x3d44d5=a28_0x3d44();let _0x31b9bb=_0x3d44d5[_0xdb631b];return _0x31b9bb;}export const datasetSdkDoc={'service':a28_0x5ad5a3(0xb6),'command':a28_0x5ad5a3(0xb1),'description':'Get\x20SDK\x20usage\x20markdown\x20for\x20a\x20dataset\x20code','risk':a28_0x5ad5a3(0xad),'flags':[{...CODE_FLAG,'description':a28_0x5ad5a3(0xaf)}],async 'execute'(_0x148c0b){const _0x2677a9=a28_0x5ad5a3,_0x37a353=_0x148c0b['str'](_0x2677a9(0xb0)),_0x4bff68=await getDatasetSdkUsageDoc(_0x37a353,_0x148c0b[_0x2677a9(0xac)]);return{'ok':!![],'data':{'code':_0x37a353,'appCode':_0x148c0b['appCode'],'markdown':formatDatasetSdkMarkdown(_0x4bff68)}};}};function a28_0x3d44(){const _0x16cc4a=['read','691784oENHlS','Dataset\x20code\x20(32\x20characters).\x20Numeric\x20dataset\x20IDs\x20are\x20not\x20accepted.','code','sdk-doc','620mzPtsd','12pGAtFI','17743vcDylD','111702ESPwFq','dataset','2qlsire','trim','16qsdQYO','549112MHTSfu','string','232011LjpLHn','10NiwXgq','2851623pZQUws','7rMJfGv','9966931dlYysr','appCode'];a28_0x3d44=function(){return _0x16cc4a;};return a28_0x3d44();}
1
+ const a28_0x49fb40=a28_0x1aa4;(function(_0x46b2ba,_0x29d18b){const _0x34098a=a28_0x1aa4,_0x33588d=_0x46b2ba();while(!![]){try{const _0x5efc90=-parseInt(_0x34098a(0x74))/0x1*(-parseInt(_0x34098a(0x78))/0x2)+-parseInt(_0x34098a(0x7f))/0x3*(parseInt(_0x34098a(0x84))/0x4)+parseInt(_0x34098a(0x75))/0x5*(-parseInt(_0x34098a(0x80))/0x6)+parseInt(_0x34098a(0x83))/0x7*(parseInt(_0x34098a(0x7d))/0x8)+parseInt(_0x34098a(0x7a))/0x9*(-parseInt(_0x34098a(0x7c))/0xa)+parseInt(_0x34098a(0x7b))/0xb*(-parseInt(_0x34098a(0x86))/0xc)+-parseInt(_0x34098a(0x76))/0xd*(-parseInt(_0x34098a(0x81))/0xe);if(_0x5efc90===_0x29d18b)break;else _0x33588d['push'](_0x33588d['shift']());}catch(_0x822691){_0x33588d['push'](_0x33588d['shift']());}}}(a28_0x3180,0x4f8a6));function a28_0x3180(){const _0x2c4b90=['20lRYdFX','314327TmTTpY','read','797176lLQucY','string','1635597hzBeXp','5413199LKArnr','10gooBNS','1120EQXeFi','trim','3XXLbYe','435966XnxgPJ','854MhVdHc','appCode','917xegNeX','2406252oyccZT','str','12agEVGG','1RlhBld'];a28_0x3180=function(){return _0x2c4b90;};return a28_0x3180();}import{getDatasetSdkUsageDoc}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';function a28_0x1aa4(_0x320134,_0x565bd7){_0x320134=_0x320134-0x74;const _0x31801c=a28_0x3180();let _0x1aa4fc=_0x31801c[_0x320134];return _0x1aa4fc;}const DEFAULT_MARKDOWN='#\x20Dataset\x20SDK\x20Usage\x20Documentation\x0a\x0a暂无\x20SDK\x20使用文档';export function formatDatasetSdkMarkdown(_0x5437e4){const _0x4cb725=a28_0x1aa4,_0x219fd4=typeof _0x5437e4===_0x4cb725(0x79)?_0x5437e4[_0x4cb725(0x7e)]():'';return _0x219fd4||DEFAULT_MARKDOWN;}export const datasetSdkDoc={'service':'dataset','command':'sdk-doc','description':'Get\x20SDK\x20usage\x20markdown\x20for\x20a\x20dataset\x20code','risk':a28_0x49fb40(0x77),'flags':[{...CODE_FLAG,'description':'Dataset\x20code\x20(32\x20characters).\x20Numeric\x20dataset\x20IDs\x20are\x20not\x20accepted.'}],async 'execute'(_0x442824){const _0x1ea663=a28_0x49fb40,_0x11f988=_0x442824[_0x1ea663(0x85)]('code'),_0x36d22c=await getDatasetSdkUsageDoc(_0x11f988,_0x442824[_0x1ea663(0x82)]);return{'ok':!![],'data':{'code':_0x11f988,'appCode':_0x442824[_0x1ea663(0x82)],'markdown':formatDatasetSdkMarkdown(_0x36d22c)}};}};
@@ -0,0 +1,23 @@
1
+ /**
2
+ * @fileoverview `doctor` command — CLI self-diagnostic tool.
3
+ *
4
+ * Why `hasFormat: false`: the doctor command directly uses `console.log` to
5
+ * emit a human-readable diagnostic report with chalk coloring. It does not
6
+ * use the framework's format pipeline because the output is inherently
7
+ * human-oriented (ASCII art, colored sections). Returning `data` through
8
+ * the pipeline would produce a JSON report with color codes stripped.
9
+ *
10
+ * Design decision: all config layers are checked (global + project) and
11
+ * reported separately. This helps users identify which layer a problem
12
+ * originates from (e.g. a missing project file vs an invalid global file).
13
+ *
14
+ * Why `inspectCliConfigJsonFile` is used for JSON validation: the doctor
15
+ * should surface JSON parse errors from config files, not just say "file not found".
16
+ * This helps users debug corrupt config files quickly.
17
+ *
18
+ * Auth section: shows `ClientAk` mode explicitly and notes that session
19
+ * cookie auth is removed. This is intentional — the runtime CLI only supports
20
+ * AccessKey auth, not the web-session flow.
21
+ */
22
+ import type { CommandDefinition } from "../framework/types.js";
23
+ export declare const doctorDefinition: CommandDefinition;
@@ -1 +1 @@
1
- function a29_0x3128(_0x469ed8,_0x11aef5){_0x469ed8=_0x469ed8-0x12a;const _0x349222=a29_0x3492();let _0x31288a=_0x349222[_0x469ed8];return _0x31288a;}const a29_0x319dea=a29_0x3128;(function(_0x52da8f,_0x8eadd2){const _0xc82967=a29_0x3128,_0x3a6b3b=_0x52da8f();while(!![]){try{const _0x5880e5=parseInt(_0xc82967(0x144))/0x1*(parseInt(_0xc82967(0x166))/0x2)+-parseInt(_0xc82967(0x14c))/0x3*(parseInt(_0xc82967(0x148))/0x4)+-parseInt(_0xc82967(0x164))/0x5+parseInt(_0xc82967(0x172))/0x6+parseInt(_0xc82967(0x173))/0x7*(-parseInt(_0xc82967(0x15f))/0x8)+parseInt(_0xc82967(0x168))/0x9+parseInt(_0xc82967(0x16a))/0xa;if(_0x5880e5===_0x8eadd2)break;else _0x3a6b3b['push'](_0x3a6b3b['shift']());}catch(_0xc0aa12){_0x3a6b3b['push'](_0x3a6b3b['shift']());}}}(a29_0x3492,0x9a2c7));import a29_0x47d0ac from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{getCliVersion}from'../utils/version.js';import{getApiDomain,getRuntimeDomain,getUserDomain}from'../constant/domain.js';import{buildConfigFromFlags,initGlobalEnvironment,getProjectConfigPath,getGlobalConfigPath,inspectCliConfigJsonFile}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';function a29_0x3492(){const _0x41ff88=['\x20\x20auth\x20(effective):\x20','defaultApp','\x20\x20─','(unnamed)','2792400ayFjTl','padEnd','2bObodz','(no\x20file)','6098166igWPmQ','platform','7467350LoZeQX','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','(set,\x20length=','commandCount','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','empty','6003504CSTBJP','1496341WyiNpd','riskLevel','\x20\x20runtimeDomain:\x20\x20\x20','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','repeat','read','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','format','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Auth','path','locale','log','(removed\x20—\x20cookie\x20auth\x20disabled)','(none)','(not\x20found)','serviceCode','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','\x20doctor','\x20commands)','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','✓\x20Valid\x20JSON','(default:\x20','\x20\x20Service\x20Tree','\x20(accessKey)','(missing)','services','currentApp','yellow','pageSize','\x20\x20Merged\x20Config','doctor','version','gray','ClientAk','\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20','env','⚠\x20Empty','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','214421hGyvSd','\x20(legacy/compat\x20only)','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','⚠\x20Empty\x20(treated\x20as\x20{})','32PlmTfz','source','\x20\x20Config\x20Files','(not\x20set)','463341yOXgOL','\x20Imported\x20from:\x20','✗\x20Invalid','\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20','accessKey','length','green','status','(default)','red','✗\x20Invalid\x20JSON','message','Global','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','missing','Diagnose\x20CLI\x20configuration\x20and\x20environment','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','bold','8vKZSJD'];a29_0x3492=function(){return _0x41ff88;};return a29_0x3492();}import{isLegacyCompatConfigKey}from'../config/schema.js';import{inspectServiceRegistry}from'../commands/service/registry.js';async function execute(_0x2daa24){const _0x5b4e20=a29_0x3128,_0x2f2fcb=getCliVersion(),_0x357307=buildConfigFromFlags({});await initGlobalEnvironment(_0x357307),console[_0x5b4e20(0x17f)](),console['log'](a29_0x47d0ac['bold'](CLI_BIN_NAME+_0x5b4e20(0x12e))),console[_0x5b4e20(0x17f)](a29_0x47d0ac[_0x5b4e20(0x13d)]('─'[_0x5b4e20(0x177)](0x32))),console[_0x5b4e20(0x17f)]('\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20'+_0x2f2fcb),console[_0x5b4e20(0x17f)](_0x5b4e20(0x159)+process[_0x5b4e20(0x13c)]),console[_0x5b4e20(0x17f)]('\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0x5b4e20(0x169)]+'\x20'+process['arch']),console[_0x5b4e20(0x17f)](),console[_0x5b4e20(0x17f)](a29_0x47d0ac['bold'](_0x5b4e20(0x14a))),console[_0x5b4e20(0x17f)](a29_0x47d0ac[_0x5b4e20(0x13d)](_0x5b4e20(0x162)['repeat'](0x1e)));const _0xd2d6b1=getGlobalConfigPath(),_0x2b0d53=getProjectConfigPath();console[_0x5b4e20(0x17f)](_0x5b4e20(0x16f)+(_0xd2d6b1||a29_0x47d0ac[_0x5b4e20(0x13d)]('(not\x20found)'))),console[_0x5b4e20(0x17f)](_0x5b4e20(0x15d)+(_0x2b0d53||a29_0x47d0ac[_0x5b4e20(0x13d)]('(not\x20found)'))),console[_0x5b4e20(0x17f)](),console[_0x5b4e20(0x17f)](a29_0x47d0ac[_0x5b4e20(0x15e)]('\x20\x20Config\x20JSON')),console[_0x5b4e20(0x17f)](a29_0x47d0ac[_0x5b4e20(0x13d)](_0x5b4e20(0x162)['repeat'](0x1e)));const _0x2ff28b=(_0x52398f,_0x33ca5b)=>{const _0x25e5d6=_0x5b4e20;if(!_0x33ca5b){console['log']('\x20\x20'+_0x52398f[_0x25e5d6(0x165)](0x11)+'\x20'+a29_0x47d0ac[_0x25e5d6(0x13d)](_0x25e5d6(0x167)));return;}const _0x5d45c1=inspectCliConfigJsonFile(_0x33ca5b);if(_0x5d45c1[_0x25e5d6(0x153)]==='ok')console[_0x25e5d6(0x17f)]('\x20\x20'+_0x52398f[_0x25e5d6(0x165)](0x11)+'\x20'+a29_0x47d0ac[_0x25e5d6(0x152)](_0x25e5d6(0x131)));else{if(_0x5d45c1[_0x25e5d6(0x153)]===_0x25e5d6(0x171))console['log']('\x20\x20'+_0x52398f[_0x25e5d6(0x165)](0x11)+'\x20'+a29_0x47d0ac['yellow'](_0x25e5d6(0x147)));else _0x5d45c1[_0x25e5d6(0x153)]==='missing'?console[_0x25e5d6(0x17f)]('\x20\x20'+_0x52398f['padEnd'](0x11)+'\x20'+a29_0x47d0ac['gray'](_0x25e5d6(0x135))):(console[_0x25e5d6(0x17f)]('\x20\x20'+_0x52398f['padEnd'](0x11)+'\x20'+a29_0x47d0ac[_0x25e5d6(0x155)](_0x25e5d6(0x156))),console[_0x25e5d6(0x17f)]('\x20\x20'+''[_0x25e5d6(0x165)](0x11)+'\x20'+a29_0x47d0ac[_0x25e5d6(0x155)](_0x5d45c1[_0x25e5d6(0x157)])));}};_0x2ff28b(_0x5b4e20(0x158),_0xd2d6b1),_0x2ff28b('Project',_0x2b0d53),console['log'](),console[_0x5b4e20(0x17f)](a29_0x47d0ac[_0x5b4e20(0x15e)](_0x5b4e20(0x13a))),console[_0x5b4e20(0x17f)](a29_0x47d0ac[_0x5b4e20(0x13d)](_0x5b4e20(0x162)[_0x5b4e20(0x177)](0x1e))),console[_0x5b4e20(0x17f)](_0x5b4e20(0x176)+(_0x357307['appCode']||a29_0x47d0ac[_0x5b4e20(0x155)](_0x5b4e20(0x14b)))),console[_0x5b4e20(0x17f)](_0x5b4e20(0x170)+_0x357307[_0x5b4e20(0x140)]);const _0x2a278a=isLegacyCompatConfigKey('locale')?a29_0x47d0ac['gray'](_0x357307[_0x5b4e20(0x17e)]+_0x5b4e20(0x145)):_0x357307[_0x5b4e20(0x17e)];console[_0x5b4e20(0x17f)](_0x5b4e20(0x179)+_0x2a278a),console[_0x5b4e20(0x17f)]('\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20'+(_0x357307[_0x5b4e20(0x161)]||a29_0x47d0ac['gray'](_0x5b4e20(0x12a)))),console['log'](_0x5b4e20(0x15a)+(_0x357307[_0x5b4e20(0x137)]||a29_0x47d0ac[_0x5b4e20(0x13d)]('(none)'))),console[_0x5b4e20(0x17f)](_0x5b4e20(0x130)+(_0x357307[_0x5b4e20(0x17a)]||a29_0x47d0ac[_0x5b4e20(0x13d)](_0x5b4e20(0x132)+DEFAULT_CONFIG_VALUES['format']+')'))),console[_0x5b4e20(0x17f)](_0x5b4e20(0x16c)+(_0x357307[_0x5b4e20(0x139)]??a29_0x47d0ac['gray'](_0x5b4e20(0x154)))),console['log'](_0x5b4e20(0x142)+_0x357307[_0x5b4e20(0x174)]),console[_0x5b4e20(0x17f)]('\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x357307['verbose']),console[_0x5b4e20(0x17f)](_0x5b4e20(0x160)+AUTH_MODE[_0x5b4e20(0x13e)]),console[_0x5b4e20(0x17f)](_0x5b4e20(0x16b)+(_0x357307['accessKey']?a29_0x47d0ac[_0x5b4e20(0x152)](_0x5b4e20(0x16d)+_0x357307[_0x5b4e20(0x150)][_0x5b4e20(0x151)]+')'):a29_0x47d0ac[_0x5b4e20(0x13d)](_0x5b4e20(0x12a)))),console[_0x5b4e20(0x17f)](),console[_0x5b4e20(0x17f)](a29_0x47d0ac[_0x5b4e20(0x15e)]('\x20\x20API\x20Endpoints')),console['log'](a29_0x47d0ac[_0x5b4e20(0x13d)](_0x5b4e20(0x162)[_0x5b4e20(0x177)](0x1e))),console[_0x5b4e20(0x17f)]('\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20'+getApiDomain()),console[_0x5b4e20(0x17f)](_0x5b4e20(0x143)+getUserDomain()),console[_0x5b4e20(0x17f)](_0x5b4e20(0x175)+getRuntimeDomain()),console[_0x5b4e20(0x17f)](),console[_0x5b4e20(0x17f)](a29_0x47d0ac[_0x5b4e20(0x15e)](_0x5b4e20(0x133))),console['log'](a29_0x47d0ac[_0x5b4e20(0x13d)](_0x5b4e20(0x162)[_0x5b4e20(0x177)](0x1e)));const _0x51826b=inspectServiceRegistry();console['log'](_0x5b4e20(0x13f)+_0x51826b['registryPath']),console[_0x5b4e20(0x17f)](_0x5b4e20(0x146)+formatServiceRegistryStatus(_0x51826b)),console['log'](_0x5b4e20(0x14f)+_0x51826b['serviceCount']),console['log'](_0x5b4e20(0x12d)+_0x51826b['commandCount']);for(const _0x321701 of _0x51826b[_0x5b4e20(0x136)]){console['log']('\x20\x20'+(_0x321701[_0x5b4e20(0x12c)]+':')[_0x5b4e20(0x165)](0x11)+'\x20'+(_0x321701['name']||a29_0x47d0ac[_0x5b4e20(0x13d)](_0x5b4e20(0x163)))+'\x20('+_0x321701[_0x5b4e20(0x16e)]+_0x5b4e20(0x12f)),console[_0x5b4e20(0x17f)]('\x20\x20'+''[_0x5b4e20(0x165)](0x11)+_0x5b4e20(0x14d)+_0x321701[_0x5b4e20(0x149)][_0x5b4e20(0x17d)]);}return console[_0x5b4e20(0x17f)](),console['log'](a29_0x47d0ac[_0x5b4e20(0x15e)](_0x5b4e20(0x17c))),console[_0x5b4e20(0x17f)](a29_0x47d0ac[_0x5b4e20(0x13d)](_0x5b4e20(0x162)[_0x5b4e20(0x177)](0x1e))),console[_0x5b4e20(0x17f)](_0x5b4e20(0x17b)+a29_0x47d0ac[_0x5b4e20(0x152)](AUTH_MODE['ClientAk']+_0x5b4e20(0x134))),console[_0x5b4e20(0x17f)]('\x20\x20Session\x20check:\x20\x20\x20'+a29_0x47d0ac['gray'](_0x5b4e20(0x180))),console[_0x5b4e20(0x17f)](),{'ok':!![]};}function formatServiceRegistryStatus(_0x3efd0b){const _0x4fe81a=a29_0x3128;if(_0x3efd0b[_0x4fe81a(0x153)]==='ok')return a29_0x47d0ac['green']('✓\x20Loaded');if(_0x3efd0b[_0x4fe81a(0x153)]===_0x4fe81a(0x15b))return a29_0x47d0ac[_0x4fe81a(0x13d)](_0x4fe81a(0x12b));if(_0x3efd0b['status']===_0x4fe81a(0x171))return a29_0x47d0ac[_0x4fe81a(0x138)](_0x4fe81a(0x141));return a29_0x47d0ac['red'](_0x4fe81a(0x14e)+(_0x3efd0b['message']?':\x20'+_0x3efd0b['message']:''));}export const doctorDefinition={'service':a29_0x319dea(0x13b),'command':'check','description':a29_0x319dea(0x15c),'risk':a29_0x319dea(0x178),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
1
+ const a29_0x107042=a29_0x5c3e;(function(_0x5e6f60,_0x3b232d){const _0x3f956c=a29_0x5c3e,_0x1016e3=_0x5e6f60();while(!![]){try{const _0x2352c7=parseInt(_0x3f956c(0x12d))/0x1*(-parseInt(_0x3f956c(0x11d))/0x2)+-parseInt(_0x3f956c(0x117))/0x3+parseInt(_0x3f956c(0x15b))/0x4+parseInt(_0x3f956c(0x123))/0x5*(parseInt(_0x3f956c(0x14b))/0x6)+-parseInt(_0x3f956c(0x10b))/0x7*(parseInt(_0x3f956c(0x10c))/0x8)+parseInt(_0x3f956c(0x124))/0x9*(parseInt(_0x3f956c(0x151))/0xa)+-parseInt(_0x3f956c(0x158))/0xb*(parseInt(_0x3f956c(0x11c))/0xc);if(_0x2352c7===_0x3b232d)break;else _0x1016e3['push'](_0x1016e3['shift']());}catch(_0x190a8e){_0x1016e3['push'](_0x1016e3['shift']());}}}(a29_0x1b02,0xd6522));import a29_0xdc8098 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{getCliVersion}from'../utils/version.js';import{getApiDomain,getRuntimeDomain,getUserDomain}from'../constant/domain.js';import{buildConfigFromFlags,initGlobalEnvironment,getProjectConfigPath,getGlobalConfigPath,inspectCliConfigJsonFile}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{isLegacyCompatConfigKey}from'../config/schema.js';import{inspectServiceRegistry}from'../commands/service/registry.js';async function execute(_0x4001bf){const _0xa76164=a29_0x5c3e,_0x37dcb2=getCliVersion(),_0x57a4b2=buildConfigFromFlags({});await initGlobalEnvironment(_0x57a4b2),console[_0xa76164(0x141)](),console[_0xa76164(0x141)](a29_0xdc8098['bold'](CLI_BIN_NAME+_0xa76164(0x13a))),console[_0xa76164(0x141)](a29_0xdc8098[_0xa76164(0x13b)]('─'['repeat'](0x32))),console[_0xa76164(0x141)](_0xa76164(0x110)+_0x37dcb2),console[_0xa76164(0x141)]('\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0xa76164(0x113)]),console['log'](_0xa76164(0x149)+process[_0xa76164(0x127)]+'\x20'+process['arch']),console['log'](),console[_0xa76164(0x141)](a29_0xdc8098[_0xa76164(0x132)](_0xa76164(0x142))),console[_0xa76164(0x141)](a29_0xdc8098[_0xa76164(0x13b)](_0xa76164(0x11b)[_0xa76164(0x12e)](0x1e)));const _0xc8155a=getGlobalConfigPath(),_0x22b65b=getProjectConfigPath();console['log'](_0xa76164(0x14a)+(_0xc8155a||a29_0xdc8098[_0xa76164(0x13b)](_0xa76164(0x130)))),console['log'](_0xa76164(0x11f)+(_0x22b65b||a29_0xdc8098[_0xa76164(0x13b)](_0xa76164(0x130)))),console[_0xa76164(0x141)](),console['log'](a29_0xdc8098[_0xa76164(0x132)](_0xa76164(0x161))),console[_0xa76164(0x141)](a29_0xdc8098['gray']('\x20\x20─'[_0xa76164(0x12e)](0x1e)));const _0x5353a5=(_0x34cb71,_0x903433)=>{const _0x2afc0c=_0xa76164;if(!_0x903433){console['log']('\x20\x20'+_0x34cb71['padEnd'](0x11)+'\x20'+a29_0xdc8098[_0x2afc0c(0x13b)](_0x2afc0c(0x150)));return;}const _0x3fd1ce=inspectCliConfigJsonFile(_0x903433);if(_0x3fd1ce[_0x2afc0c(0x143)]==='ok')console[_0x2afc0c(0x141)]('\x20\x20'+_0x34cb71[_0x2afc0c(0x111)](0x11)+'\x20'+a29_0xdc8098[_0x2afc0c(0x145)](_0x2afc0c(0x163)));else{if(_0x3fd1ce[_0x2afc0c(0x143)]==='empty')console['log']('\x20\x20'+_0x34cb71[_0x2afc0c(0x111)](0x11)+'\x20'+a29_0xdc8098[_0x2afc0c(0x12a)](_0x2afc0c(0x152)));else _0x3fd1ce[_0x2afc0c(0x143)]==='missing'?console[_0x2afc0c(0x141)]('\x20\x20'+_0x34cb71[_0x2afc0c(0x111)](0x11)+'\x20'+a29_0xdc8098[_0x2afc0c(0x13b)]('(missing)')):(console[_0x2afc0c(0x141)]('\x20\x20'+_0x34cb71[_0x2afc0c(0x111)](0x11)+'\x20'+a29_0xdc8098[_0x2afc0c(0x13e)]('✗\x20Invalid\x20JSON')),console['log']('\x20\x20'+''[_0x2afc0c(0x111)](0x11)+'\x20'+a29_0xdc8098[_0x2afc0c(0x13e)](_0x3fd1ce['message'])));}};_0x5353a5('Global',_0xc8155a),_0x5353a5(_0xa76164(0x167),_0x22b65b),console[_0xa76164(0x141)](),console['log'](a29_0xdc8098['bold']('\x20\x20Merged\x20Config')),console[_0xa76164(0x141)](a29_0xdc8098[_0xa76164(0x13b)](_0xa76164(0x11b)[_0xa76164(0x12e)](0x1e))),console[_0xa76164(0x141)]('\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x57a4b2[_0xa76164(0x10f)]||a29_0xdc8098['red'](_0xa76164(0x13f)))),console[_0xa76164(0x141)](_0xa76164(0x119)+_0x57a4b2[_0xa76164(0x138)]);const _0x43ef75=isLegacyCompatConfigKey('locale')?a29_0xdc8098[_0xa76164(0x13b)](_0x57a4b2[_0xa76164(0x165)]+_0xa76164(0x14d)):_0x57a4b2[_0xa76164(0x165)];console[_0xa76164(0x141)](_0xa76164(0x120)+_0x43ef75),console[_0xa76164(0x141)](_0xa76164(0x118)+(_0x57a4b2[_0xa76164(0x14c)]||a29_0xdc8098[_0xa76164(0x13b)](_0xa76164(0x14e)))),console[_0xa76164(0x141)](_0xa76164(0x12f)+(_0x57a4b2[_0xa76164(0x154)]||a29_0xdc8098[_0xa76164(0x13b)](_0xa76164(0x14e)))),console[_0xa76164(0x141)](_0xa76164(0x160)+(_0x57a4b2[_0xa76164(0x12c)]||a29_0xdc8098[_0xa76164(0x13b)](_0xa76164(0x13c)+DEFAULT_CONFIG_VALUES[_0xa76164(0x12c)]+')'))),console[_0xa76164(0x141)](_0xa76164(0x11a)+(_0x57a4b2[_0xa76164(0x129)]??a29_0xdc8098[_0xa76164(0x13b)](_0xa76164(0x155)))),console[_0xa76164(0x141)](_0xa76164(0x15e)+_0x57a4b2[_0xa76164(0x156)]),console['log'](_0xa76164(0x166)+_0x57a4b2[_0xa76164(0x116)]),console['log'](_0xa76164(0x15a)+AUTH_MODE[_0xa76164(0x114)]),console[_0xa76164(0x141)](_0xa76164(0x140)+(_0x57a4b2[_0xa76164(0x12b)]?a29_0xdc8098[_0xa76164(0x145)](_0xa76164(0x128)+_0x57a4b2[_0xa76164(0x12b)][_0xa76164(0x15c)]+')'):a29_0xdc8098['gray'](_0xa76164(0x14e)))),console[_0xa76164(0x141)](),console[_0xa76164(0x141)](a29_0xdc8098[_0xa76164(0x132)]('\x20\x20API\x20Endpoints')),console[_0xa76164(0x141)](a29_0xdc8098[_0xa76164(0x13b)](_0xa76164(0x11b)[_0xa76164(0x12e)](0x1e))),console[_0xa76164(0x141)](_0xa76164(0x126)+getApiDomain()),console['log'](_0xa76164(0x137)+getUserDomain()),console['log']('\x20\x20runtimeDomain:\x20\x20\x20'+getRuntimeDomain()),console['log'](),console[_0xa76164(0x141)](a29_0xdc8098['bold'](_0xa76164(0x131))),console[_0xa76164(0x141)](a29_0xdc8098[_0xa76164(0x13b)](_0xa76164(0x11b)['repeat'](0x1e)));const _0x60e1dc=inspectServiceRegistry();console['log'](_0xa76164(0x135)+_0x60e1dc[_0xa76164(0x159)]),console[_0xa76164(0x141)](_0xa76164(0x168)+formatServiceRegistryStatus(_0x60e1dc)),console[_0xa76164(0x141)](_0xa76164(0x148)+_0x60e1dc[_0xa76164(0x157)]),console[_0xa76164(0x141)](_0xa76164(0x136)+_0x60e1dc['commandCount']);for(const _0x3460c5 of _0x60e1dc[_0xa76164(0x10d)]){console[_0xa76164(0x141)]('\x20\x20'+(_0x3460c5[_0xa76164(0x115)]+':')[_0xa76164(0x111)](0x11)+'\x20'+(_0x3460c5[_0xa76164(0x14f)]||a29_0xdc8098[_0xa76164(0x13b)](_0xa76164(0x13d)))+'\x20('+_0x3460c5[_0xa76164(0x10e)]+_0xa76164(0x15f)),console['log']('\x20\x20'+''['padEnd'](0x11)+'\x20Imported\x20from:\x20'+_0x3460c5[_0xa76164(0x122)][_0xa76164(0x144)]);}return console['log'](),console['log'](a29_0xdc8098['bold'](_0xa76164(0x112))),console[_0xa76164(0x141)](a29_0xdc8098[_0xa76164(0x13b)](_0xa76164(0x11b)['repeat'](0x1e))),console[_0xa76164(0x141)](_0xa76164(0x164)+a29_0xdc8098[_0xa76164(0x145)](AUTH_MODE[_0xa76164(0x114)]+_0xa76164(0x133))),console[_0xa76164(0x141)](_0xa76164(0x146)+a29_0xdc8098[_0xa76164(0x13b)]('(removed\x20—\x20cookie\x20auth\x20disabled)')),console[_0xa76164(0x141)](),{'ok':!![]};}function formatServiceRegistryStatus(_0xde5f3f){const _0x1a1d78=a29_0x5c3e;if(_0xde5f3f[_0x1a1d78(0x143)]==='ok')return a29_0xdc8098[_0x1a1d78(0x145)](_0x1a1d78(0x139));if(_0xde5f3f[_0x1a1d78(0x143)]===_0x1a1d78(0x134))return a29_0xdc8098[_0x1a1d78(0x13b)]('(not\x20found)');if(_0xde5f3f[_0x1a1d78(0x143)]===_0x1a1d78(0x153))return a29_0xdc8098[_0x1a1d78(0x12a)](_0x1a1d78(0x162));return a29_0xdc8098['red'](_0x1a1d78(0x169)+(_0xde5f3f[_0x1a1d78(0x15d)]?':\x20'+_0xde5f3f[_0x1a1d78(0x15d)]:''));}function a29_0x5c3e(_0x35854b,_0x4a8927){_0x35854b=_0x35854b-0x10b;const _0x1b0287=a29_0x1b02();let _0x5c3ef8=_0x1b0287[_0x35854b];return _0x5c3ef8;}function a29_0x1b02(){const _0x1f8006=['Project','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','✗\x20Invalid','14GEyJTQ','98152gIAMsa','services','commandCount','appCode','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','padEnd','\x20\x20Auth','version','ClientAk','serviceCode','verbose','1822632CJpIGj','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20─','73284cXTpJo','60020TyupFT','read','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Diagnose\x20CLI\x20configuration\x20and\x20environment','source','203045jfMQWy','6282mMUpjT','check','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','platform','(set,\x20length=','pageSize','yellow','accessKey','format','29iJPvfQ','repeat','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','(not\x20found)','\x20\x20Service\x20Tree','bold','\x20(accessKey)','missing','\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','env','✓\x20Loaded','\x20doctor','gray','(default:\x20','(unnamed)','red','(not\x20set)','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','log','\x20\x20Config\x20Files','status','path','green','\x20\x20Session\x20check:\x20\x20\x20','doctor','\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','174dVEXko','defaultApp','\x20(legacy/compat\x20only)','(none)','name','(no\x20file)','15430LXBhfG','⚠\x20Empty\x20(treated\x20as\x20{})','empty','currentApp','(default)','riskLevel','serviceCount','2552XnhiTv','registryPath','\x20\x20auth\x20(effective):\x20','6169516rnHvfz','length','message','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','\x20commands)','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Config\x20JSON','⚠\x20Empty','✓\x20Valid\x20JSON','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','locale','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20'];a29_0x1b02=function(){return _0x1f8006;};return a29_0x1b02();}export const doctorDefinition={'service':a29_0x107042(0x147),'command':a29_0x107042(0x125),'description':a29_0x107042(0x121),'risk':a29_0x107042(0x11e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
@@ -0,0 +1,2 @@
1
+ import type { CommandDefinition } from "../../framework/types.js";
2
+ export declare const fileDefinitions: CommandDefinition[];
@@ -1 +1 @@
1
- const a30_0x2ddeb3=a30_0x5318;(function(_0x5c6586,_0x41e4cf){const _0x158acc=a30_0x5318,_0x11b77c=_0x5c6586();while(!![]){try{const _0x48a148=-parseInt(_0x158acc(0x99))/0x1*(parseInt(_0x158acc(0xab))/0x2)+parseInt(_0x158acc(0x9c))/0x3*(parseInt(_0x158acc(0xa9))/0x4)+parseInt(_0x158acc(0xb1))/0x5+-parseInt(_0x158acc(0xa7))/0x6*(-parseInt(_0x158acc(0xa5))/0x7)+-parseInt(_0x158acc(0x92))/0x8+parseInt(_0x158acc(0x8f))/0x9*(-parseInt(_0x158acc(0x9f))/0xa)+-parseInt(_0x158acc(0xac))/0xb*(-parseInt(_0x158acc(0x9d))/0xc);if(_0x48a148===_0x41e4cf)break;else _0x11b77c['push'](_0x11b77c['shift']());}catch(_0x1a648e){_0x11b77c['push'](_0x11b77c['shift']());}}}(a30_0x4655,0x6f8aa));function a30_0x5318(_0x22a0cd,_0x5d6ab9){_0x22a0cd=_0x22a0cd-0x8f;const _0x4655b1=a30_0x4655();let _0x531803=_0x4655b1[_0x22a0cd];return _0x531803;}import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';import{queryRuntimeFileUrl,uploadRuntimeFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a30_0x4655(){const _0x501121=['27662BuiMiW','1561318Gfuodh','Uploaded\x20file:\x20','download','string','\x20to\x20runtime\x20app\x20','3774340nXCAjY','build','boolean','Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20OCR,\x20or\x20immediate\x20access','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','long-term','Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','POST','1107BCgpOm','appCode','str','6525104ThwIco','file','Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML','body','filepath','filePath','query-url','66TzGMMB','bool','Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','3WIusLe','96pGXQOi','path','31990pJBDXo','Preview:\x20upload\x20','File','/client/uploadFile','filePath\x20is\x20required.','trim','280rsQVvs','read','43866jKuoZO','write','1584092oxoQgL','validation'];a30_0x4655=function(){return _0x501121;};return a30_0x4655();}import{dryRun}from'../../framework/dryrun.js';const FILE_FLAG={'name':a30_0x2ddeb3(0x93),'type':a30_0x2ddeb3(0xaf),'required':!![],'description':'Path\x20to\x20the\x20local\x20file\x20to\x20upload'},FILEPATH_FLAG={'name':a30_0x2ddeb3(0x96),'type':a30_0x2ddeb3(0xaf),'required':!![],'description':'Runtime\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data'},DOWNLOAD_FLAG={'name':'download','type':a30_0x2ddeb3(0xb3),'description':'Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL'},LONG_TERM_FLAG={'name':a30_0x2ddeb3(0xb6),'type':a30_0x2ddeb3(0xb3),'description':a30_0x2ddeb3(0x94)};function requireFilePath(_0x41e542){const _0x345d60=a30_0x2ddeb3,_0x70fe25=_0x41e542[_0x345d60(0xa4)]();if(!_0x70fe25)throw CliErrors[_0x345d60(0xaa)](_0x345d60(0xa3));return _0x70fe25;}const fileUpload={'service':a30_0x2ddeb3(0x93),'command':'upload','description':a30_0x2ddeb3(0xb7),'risk':a30_0x2ddeb3(0xa8),'flags':[FILE_FLAG],async 'dryRun'(_0x92c85c){const _0x23d96c=a30_0x2ddeb3,_0x270a41=requireRuntimeUploadFile(_0x92c85c[_0x23d96c(0x91)](_0x23d96c(0x93)),_0x23d96c(0xa1));return dryRun(_0x23d96c(0xb8),_0x23d96c(0xa2))[_0x23d96c(0x95)]({'appCode':_0x92c85c[_0x23d96c(0x90)],'multipart':{'file':_0x270a41}})['description'](_0x23d96c(0xa0)+_0x270a41[_0x23d96c(0x9e)]+_0x23d96c(0xb0)+_0x92c85c[_0x23d96c(0x90)])[_0x23d96c(0xb2)]();},async 'execute'(_0x3f80bd){const _0x2e4e56=a30_0x2ddeb3,_0x1397ff=requireRuntimeUploadFile(_0x3f80bd[_0x2e4e56(0x91)](_0x2e4e56(0x93)),_0x2e4e56(0xa1)),_0x186fe8=await uploadRuntimeFile(_0x3f80bd[_0x2e4e56(0x90)],_0x1397ff[_0x2e4e56(0x9e)]);return{'ok':!![],'data':_0x186fe8,'message':_0x186fe8['filePath']?_0x2e4e56(0xad)+_0x186fe8[_0x2e4e56(0x97)]+_0x2e4e56(0xb5):_0x2e4e56(0x9b)};}},fileQueryUrl={'service':a30_0x2ddeb3(0x93),'command':a30_0x2ddeb3(0x98),'description':a30_0x2ddeb3(0xb4),'risk':a30_0x2ddeb3(0xa6),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x3fdc33){const _0x40175c=a30_0x2ddeb3,_0x2bff7c=requireFilePath(_0x3fdc33['str'](_0x40175c(0x96))),_0x26f17b=await queryRuntimeFileUrl(_0x2bff7c,{'download':_0x3fdc33[_0x40175c(0x9a)](_0x40175c(0xae)),'longTerm':_0x3fdc33[_0x40175c(0x9a)](_0x40175c(0xb6))});return{'ok':!![],'data':_0x26f17b};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
1
+ const a30_0x534a6c=a30_0x5b88;(function(_0x17aa4d,_0x50c182){const _0x21b0a6=a30_0x5b88,_0x13512c=_0x17aa4d();while(!![]){try{const _0x26f597=-parseInt(_0x21b0a6(0xdc))/0x1*(-parseInt(_0x21b0a6(0xdf))/0x2)+-parseInt(_0x21b0a6(0xd8))/0x3+parseInt(_0x21b0a6(0xeb))/0x4*(parseInt(_0x21b0a6(0xef))/0x5)+-parseInt(_0x21b0a6(0xde))/0x6+-parseInt(_0x21b0a6(0xd0))/0x7*(parseInt(_0x21b0a6(0xcf))/0x8)+parseInt(_0x21b0a6(0xcb))/0x9*(-parseInt(_0x21b0a6(0xe4))/0xa)+parseInt(_0x21b0a6(0xea))/0xb;if(_0x26f597===_0x50c182)break;else _0x13512c['push'](_0x13512c['shift']());}catch(_0x5dcb0e){_0x13512c['push'](_0x13512c['shift']());}}}(a30_0x3064,0xd2e23));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';import{queryRuntimeFileUrl,uploadRuntimeFile}from'../../core/api-client.js';function a30_0x3064(){const _0xe82ecd=['Return\x20a\x20short-lived\x20download\x20URL\x20instead\x20of\x20a\x20short-lived\x20preview\x20URL','read','description','path','31712395ctCrAQ','4372CIhWWH','str','body','POST','755xpFlYo','boolean','appCode','.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','36mFlBBr','long-term','Query\x20a\x20short-lived\x20URL\x20for\x20preview,\x20download,\x20OCR,\x20or\x20immediate\x20access','write','16wvQTIF','2644838otUNkv','trim','build','filePath','Preview:\x20upload\x20','Path\x20to\x20the\x20local\x20file\x20to\x20upload','file','bool','1988085HhaCvi','upload','filepath','Return\x20a\x203-year\x20URL\x20for\x20URL-only\x20content\x20embedding\x20such\x20as\x20rich\x20text,\x20Markdown,\x20or\x20HTML','943HRFqCf','string','2296056xLzRJN','2036vvZWns','download','File','query-url','Uploaded\x20file.\x20Store\x20filePath\x20for\x20durable\x20references;\x20use\x20file\x20query-url\x20for\x20short-lived\x20access.','3357860lvlwPN','validation'];a30_0x3064=function(){return _0xe82ecd;};return a30_0x3064();}import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const FILE_FLAG={'name':a30_0x534a6c(0xd6),'type':'string','required':!![],'description':a30_0x534a6c(0xd5)},FILEPATH_FLAG={'name':a30_0x534a6c(0xda),'type':a30_0x534a6c(0xdd),'required':!![],'description':'Runtime\x20filePath\x20returned\x20by\x20file\x20upload;\x20store\x20it\x20in\x20file\x20fields\x20and\x20durable\x20data'},DOWNLOAD_FLAG={'name':a30_0x534a6c(0xe0),'type':'boolean','description':a30_0x534a6c(0xe6)},LONG_TERM_FLAG={'name':a30_0x534a6c(0xcc),'type':a30_0x534a6c(0xf0),'description':a30_0x534a6c(0xdb)};function requireFilePath(_0x42c9b6){const _0x510429=a30_0x534a6c,_0x42905a=_0x42c9b6[_0x510429(0xd1)]();if(!_0x42905a)throw CliErrors[_0x510429(0xe5)]('filePath\x20is\x20required.');return _0x42905a;}function a30_0x5b88(_0x316a55,_0x35c8de){_0x316a55=_0x316a55-0xca;const _0x30649b=a30_0x3064();let _0x5b8896=_0x30649b[_0x316a55];return _0x5b8896;}const fileUpload={'service':'file','command':a30_0x534a6c(0xd9),'description':'Upload\x20a\x20local\x20file\x20and\x20return\x20filePath\x20for\x20durable\x20references','risk':a30_0x534a6c(0xce),'flags':[FILE_FLAG],async 'dryRun'(_0x317401){const _0x4463f6=a30_0x534a6c,_0x1923ee=requireRuntimeUploadFile(_0x317401[_0x4463f6(0xec)]('file'),'File');return dryRun(_0x4463f6(0xee),'/client/uploadFile')[_0x4463f6(0xed)]({'appCode':_0x317401[_0x4463f6(0xf1)],'multipart':{'file':_0x1923ee}})[_0x4463f6(0xe8)](_0x4463f6(0xd4)+_0x1923ee[_0x4463f6(0xe9)]+'\x20to\x20runtime\x20app\x20'+_0x317401[_0x4463f6(0xf1)])[_0x4463f6(0xd2)]();},async 'execute'(_0x56bd4c){const _0x22f5da=a30_0x534a6c,_0x5dad04=requireRuntimeUploadFile(_0x56bd4c[_0x22f5da(0xec)](_0x22f5da(0xd6)),_0x22f5da(0xe1)),_0x3b64ee=await uploadRuntimeFile(_0x56bd4c['appCode'],_0x5dad04[_0x22f5da(0xe9)]);return{'ok':!![],'data':_0x3b64ee,'message':_0x3b64ee['filePath']?'Uploaded\x20file:\x20'+_0x3b64ee[_0x22f5da(0xd3)]+_0x22f5da(0xca):_0x22f5da(0xe3)};}},fileQueryUrl={'service':a30_0x534a6c(0xd6),'command':a30_0x534a6c(0xe2),'description':a30_0x534a6c(0xcd),'risk':a30_0x534a6c(0xe7),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG,LONG_TERM_FLAG],async 'execute'(_0x3df0c5){const _0xbed4ba=a30_0x534a6c,_0x3d77f4=requireFilePath(_0x3df0c5[_0xbed4ba(0xec)](_0xbed4ba(0xda))),_0x41c830=await queryRuntimeFileUrl(_0x3d77f4,{'download':_0x3df0c5[_0xbed4ba(0xd7)](_0xbed4ba(0xe0)),'longTerm':_0x3df0c5[_0xbed4ba(0xd7)]('long-term')});return{'ok':!![],'data':_0x41c830};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
@@ -0,0 +1,32 @@
1
+ /**
2
+ * @fileoverview Internal helpers for `app init` / `app import`.
3
+ *
4
+ * Why a dedicated init module: project initialization is the first thing users do
5
+ * and must be rock-solid. The logic handles:
6
+ * - Non-interactive (CI): fully automated with required `--appcode`
7
+ * - Interactive: prompts for missing values with sensible defaults
8
+ * - Import from rabetbase: converts an existing `.rabetbase.json` to `.lovrabet.json`
9
+ *
10
+ * Design decision: `init` NEVER asks about environment. The default is always
11
+ * `production`. If users need `daily`, they pass `--env daily` on the command line.
12
+ * This keeps the interactive flow fast and avoids a confusing first question
13
+ * when most users want `production`.
14
+ *
15
+ * Why `AbortPrompt` is converted to `CliErrors.cancelled()` at the top level:
16
+ * Ctrl+C during any prompt should produce a clean exit with code 0, not a stack trace.
17
+ * By catching `AbortPrompt` at the `runInit` / `runInitImport` boundary, individual
18
+ * prompt functions don't need to know about the CLI's error taxonomy.
19
+ *
20
+ * Why atomic writes via `writeConfigFile`: `init` creates the project config.
21
+ * If the process crashes mid-write, we could leave a corrupt empty file.
22
+ * The atomic write (temp + rename) prevents this.
23
+ */
24
+ import type { FlagDef } from "../framework/types.js";
25
+ /** Flags for `lovrabet app init` (non-import). */
26
+ export declare const initCreateFlagDefs: FlagDef[];
27
+ /** Flags for `lovrabet app import`. */
28
+ export declare const initImportFlagDefs: FlagDef[];
29
+ /** Handles `lovrabet app init` (non-import path). */
30
+ export declare function runInit(flags: Record<string, any>): Promise<void>;
31
+ /** Handles `lovrabet app import`. */
32
+ export declare function runInitImport(flags: Record<string, any>): Promise<void>;
@@ -1 +1 @@
1
- const a31_0x108adc=a31_0x1b5f;(function(_0xb0e554,_0x14d13d){const _0x625e44=a31_0x1b5f,_0x229e10=_0xb0e554();while(!![]){try{const _0xf19a7e=parseInt(_0x625e44(0x99))/0x1*(parseInt(_0x625e44(0x98))/0x2)+parseInt(_0x625e44(0xa5))/0x3+parseInt(_0x625e44(0x82))/0x4*(parseInt(_0x625e44(0x8a))/0x5)+-parseInt(_0x625e44(0xa9))/0x6+parseInt(_0x625e44(0xb9))/0x7*(parseInt(_0x625e44(0x7d))/0x8)+parseInt(_0x625e44(0x7c))/0x9*(parseInt(_0x625e44(0x90))/0xa)+-parseInt(_0x625e44(0x7f))/0xb;if(_0xf19a7e===_0x14d13d)break;else _0x229e10['push'](_0x229e10['shift']());}catch(_0xc41b4e){_0x229e10['push'](_0x229e10['shift']());}}}(a31_0x6a2b,0x54f59));import{existsSync,readFileSync}from'node:fs';import{resolve,isAbsolute}from'node:path';import{createInterface}from'node:readline';import{CliErrors}from'../errors.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';import{IMPORTABLE_RUNTIME_CONFIG_KEYS}from'../config/schema.js';function a31_0x6a2b(){const _0x2953b3=['Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','\x20already\x20exists.\x20Overwrite?','utf8','Usage:\x20','log',')\x20instead\x20of\x20project','parse','\x20\x20default:\x20','Skip\x20confirmation\x20when\x20overwriting','riskLevel','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','\x22.\x20Allowed:\x20','14lozjCH','\x20\x20appcode:\x20','Imported\x20from\x20','trim','apps','Aborted.','boolean','\x0aInitialized\x20','string','1359idOmNn','2181736jmJIDT','validation','12056935IcZJsI','\x20app\x20init\x20--appcode\x20<code>\x20[--env\x20daily]\x20[--global]','\x20\x20config:\x20\x20','4724MBZPvh','removeListener','App\x20code\x20for\x20the\x20project','\x20\x20env:\x20\x20\x20\x20\x20','join','project','app','[y/N]','820nfrlqQ','cancelled','stdin','message','entries','Failed\x20to\x20parse\x20source\x20file:\x20','3810kSIwzn','Target\x20environment\x20(default\x20','Write\x20to\x20global\x20(~/','newConfigFileName','stdout','question','App\x20code','flagMissing','822226QSqIMV','1rgRdCM','global','env','close','Override\x20imported\x20default\x20env','file','Override\x20imported\x20default\x20appcode','name','appcode','race','yes','defaultApp','983202UrFDUT','apiDir','once','SIGINT','548508DLqaaX','Initialized\x20','\x20init\x20—\x20Create\x20','File\x20'];a31_0x6a2b=function(){return _0x2953b3;};return a31_0x6a2b();}import{resolveWriteConfigPath,readConfigFile,writeConfigFile,isNonInteractiveMode}from'../context.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{PRODUCT_CONFIG}from'../constant/product.js';export const initCreateFlagDefs=[{'name':'appcode','type':a31_0x108adc(0x7b),'description':a31_0x108adc(0x84)},{'name':'env','type':a31_0x108adc(0x7b),'description':a31_0x108adc(0x91)+DEFAULT_CONFIG_VALUES['env']+')','enum':[...RUNTIME_ENV_VALUES]},{'name':'global','type':a31_0x108adc(0x79),'description':a31_0x108adc(0x92)+PRODUCT_CONFIG['newConfigFileName']+a31_0x108adc(0xb2),'default':![]},{'name':a31_0x108adc(0xa3),'type':'boolean','description':a31_0x108adc(0xb5),'default':![]}];export const initImportFlagDefs=[{'name':'file','type':'string','description':a31_0x108adc(0xad),'required':!![]},{'name':a31_0x108adc(0xa1),'type':a31_0x108adc(0x7b),'description':a31_0x108adc(0x9f)},{'name':'env','type':a31_0x108adc(0x7b),'description':a31_0x108adc(0x9d),'enum':[...RUNTIME_ENV_VALUES]},{'name':a31_0x108adc(0x9a),'type':a31_0x108adc(0x79),'description':'Write\x20to\x20global\x20(~/'+PRODUCT_CONFIG[a31_0x108adc(0x93)]+')\x20instead\x20of\x20project','default':![]},{'name':a31_0x108adc(0xa3),'type':'boolean','description':a31_0x108adc(0xb5),'default':![]}];export async function runInit(_0x4059cb){const _0x595fa9=a31_0x108adc,_0x5db14f=isNonInteractiveMode(_0x4059cb),_0xed0e4f=_0x4059cb[_0x595fa9(0x9a)]?_0x595fa9(0x9a):_0x595fa9(0x87),_0x282435=resolveWriteConfigPath(_0xed0e4f);try{_0x5db14f?await runNonInteractive(_0x4059cb,_0x282435):await runInteractive(_0x4059cb,_0x282435);}catch(_0x25705d){if(_0x25705d instanceof AbortPrompt)throw CliErrors[_0x595fa9(0x8b)]();throw _0x25705d;}}export async function runInitImport(_0x1a75b3){const _0x550f19=a31_0x108adc,_0x20f1e9=_0x1a75b3[_0x550f19(0x9a)]?_0x550f19(0x9a):_0x550f19(0x87),_0x12bc34=resolveWriteConfigPath(_0x20f1e9);await runFromImport(_0x1a75b3,_0x12bc34);}const RUNTIME_IRRELEVANT_KEYS=new Set([a31_0x108adc(0xa6)]);async function runFromImport(_0xba423,_0x1a8aa2){const _0xd9ada9=a31_0x108adc,_0x123556=resolveFilePath(_0xba423[_0xd9ada9(0x9e)]);if(!existsSync(_0x123556))throw CliErrors[_0xd9ada9(0x7e)]('Source\x20file\x20not\x20found:\x20'+_0x123556);const _0x1c3e2a=readSourceFile(_0x123556),_0x48f513=convertToRuntimeConfig(_0x1c3e2a);_0xba423[_0xd9ada9(0xa1)]&&(_0x48f513['appcode']=String(_0xba423[_0xd9ada9(0xa1)]));_0xba423['env']&&(_0x48f513[_0xd9ada9(0x9b)]=resolveInitEnv(_0xba423));if(!_0x48f513[_0xd9ada9(0xa1)])throw CliErrors[_0xd9ada9(0x7e)]('Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','Provide\x20--appcode\x20<code>\x20or\x20use\x20an\x20upgraded\x20.rabetbase.json\x20with\x20top-level\x20appcode.\x20Legacy\x20files\x20must\x20be\x20upgraded\x20first\x20with\x20`rabetbase\x20project\x20upgrade`.');await writeInitConfig(_0x1a8aa2,_0x48f513,_0xba423),console[_0xd9ada9(0xb1)](_0xd9ada9(0x75)+_0x123556),console['log'](_0xd9ada9(0x81)+_0x1a8aa2),console[_0xd9ada9(0xb1)](_0xd9ada9(0xba)+_0x48f513[_0xd9ada9(0xa1)]);if(_0x48f513['defaultApp'])console['log'](_0xd9ada9(0xb4)+_0x48f513[_0xd9ada9(0xa4)]);}function convertToRuntimeConfig(_0x105916){const _0x22b57b=a31_0x108adc;if(_0x105916['apps']&&typeof _0x105916[_0x22b57b(0x77)]==='object')throw CliErrors[_0x22b57b(0x7e)]('Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.',_0x22b57b(0xb7));const _0x1e2b9f={};for(const _0x382574 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x105916[_0x382574]!==undefined&&(_0x1e2b9f[_0x382574]=_0x105916[_0x382574]);}return!_0x1e2b9f['riskLevel']&&(_0x1e2b9f[_0x22b57b(0xb6)]=DEFAULT_CONFIG_VALUES[_0x22b57b(0xb6)]),_0x1e2b9f;}async function runNonInteractive(_0xe9dfd3,_0x489536){const _0x2f6b01=a31_0x108adc,_0x20a9e2=_0xe9dfd3[_0x2f6b01(0xa1)];if(!_0x20a9e2)throw CliErrors[_0x2f6b01(0x97)](_0x2f6b01(0xa1),_0x2f6b01(0xb0)+CLI_BIN_NAME+_0x2f6b01(0x80));const _0x33f33a=resolveInitEnv(_0xe9dfd3);await writeInitConfig(_0x489536,{'appcode':_0x20a9e2,'env':_0x33f33a},_0xe9dfd3),console[_0x2f6b01(0xb1)](_0x2f6b01(0xaa)+_0x489536),console[_0x2f6b01(0xb1)](_0x2f6b01(0xba)+_0x20a9e2),console['log'](_0x2f6b01(0x85)+_0x33f33a);}async function runInteractive(_0x5a8891,_0x194a19){const _0x1dea01=a31_0x108adc,_0x1def74=loadExisting(_0x194a19),_0x232fff=typeof _0x1def74?.[_0x1dea01(0xa1)]===_0x1dea01(0x7b)?_0x1def74['appcode']:'',_0x4c89a7=resolveInitEnv(_0x5a8891);console[_0x1dea01(0xb1)](CLI_BIN_NAME+_0x1dea01(0xab)+PRODUCT_CONFIG[_0x1dea01(0x93)]+'\x0a');if(existsSync(_0x194a19)&&!_0x5a8891[_0x1dea01(0xa3)]){const _0x321473=await promptYesNo(_0x1dea01(0xac)+_0x194a19+_0x1dea01(0xae),![]);if(!_0x321473){console[_0x1dea01(0xb1)](_0x1dea01(0x78));return;}}const _0x1729e9=typeof _0x5a8891[_0x1dea01(0xa1)]===_0x1dea01(0x7b)?_0x5a8891[_0x1dea01(0xa1)][_0x1dea01(0x76)]():'';let _0x5839d0=_0x1729e9;!_0x5839d0&&(_0x5839d0=await promptInput(_0x1dea01(0x96),_0x232fff));if(!_0x5839d0[_0x1dea01(0x76)]())throw CliErrors[_0x1dea01(0x7e)]('App\x20code\x20cannot\x20be\x20empty.');await writeInitConfig(_0x194a19,{'appcode':_0x5839d0[_0x1dea01(0x76)](),'env':_0x4c89a7},_0x5a8891),console[_0x1dea01(0xb1)](_0x1dea01(0x7a)+_0x194a19),console['log'](_0x1dea01(0xba)+_0x5839d0[_0x1dea01(0x76)]()),console[_0x1dea01(0xb1)](_0x1dea01(0x85)+_0x4c89a7);}async function writeInitConfig(_0x21192c,_0x50b9fd,_0x507d4a){const _0x51d896=a31_0x108adc;let _0x569c19={};existsSync(_0x21192c)&&!_0x507d4a[_0x51d896(0xa3)]&&(_0x569c19=readConfigFile(_0x21192c));for(const [_0x3382c6,_0x2075ea]of Object[_0x51d896(0x8e)](_0x50b9fd)){_0x2075ea!==undefined&&(_0x569c19[_0x3382c6]=_0x2075ea);}if(_0x569c19[_0x51d896(0x88)])delete _0x569c19[_0x51d896(0x88)];writeConfigFile(_0x21192c,_0x569c19);}class AbortPrompt extends Error{constructor(){const _0x5848cb=a31_0x108adc;super('User\x20aborted\x20prompt'),this[_0x5848cb(0xa0)]='AbortPrompt';}}function createSafeRl(){const _0x19f512=a31_0x108adc,_0x3a9ef6=createInterface({'input':process[_0x19f512(0x8c)],'output':process[_0x19f512(0x94)]});let _0x58fcb3;const _0x1942a6=new Promise((_0x14db87,_0x38e030)=>{const _0x405919=_0x19f512;_0x58fcb3=()=>{const _0x290249=a31_0x1b5f;_0x58fcb3&&(_0x3a9ef6[_0x290249(0x83)](_0x290249(0xa8),_0x58fcb3),_0x58fcb3=undefined);try{_0x3a9ef6[_0x290249(0x9c)]();}catch{}_0x38e030(new AbortPrompt());},_0x3a9ef6[_0x405919(0xa7)](_0x405919(0xa8),_0x58fcb3);}),_0x529ca0=()=>{const _0xdca9b0=_0x19f512;_0x58fcb3&&(_0x3a9ef6[_0xdca9b0(0x83)]('SIGINT',_0x58fcb3),_0x58fcb3=undefined);try{_0x3a9ef6[_0xdca9b0(0x9c)]();}catch{}};return{'rl':_0x3a9ef6,'abortPromise':_0x1942a6,'disposeSuccess':_0x529ca0};}async function promptInput(_0x18096b,_0x313304){const _0x2e1cc3=a31_0x108adc,{rl:_0x372626,abortPromise:_0x155696,disposeSuccess:_0x15da1e}=createSafeRl(),_0x548151=new Promise(_0x2bceb6=>{const _0x48ce0a=a31_0x1b5f,_0x2e7087=_0x313304?'\x20\x20'+_0x18096b+'\x20('+_0x313304+'):\x20':'\x20\x20'+_0x18096b+':\x20';_0x372626[_0x48ce0a(0x95)](_0x2e7087,_0x292d91=>{const _0x44dac5=_0x48ce0a;_0x15da1e(),_0x2bceb6(_0x292d91[_0x44dac5(0x76)]()||_0x313304);});});return Promise[_0x2e1cc3(0xa2)]([_0x548151,_0x155696]);}function a31_0x1b5f(_0x329f16,_0x492ef3){_0x329f16=_0x329f16-0x75;const _0x6a2bd=a31_0x6a2b();let _0x1b5f6a=_0x6a2bd[_0x329f16];return _0x1b5f6a;}async function promptYesNo(_0xeb59ad,_0x49c9c7){const _0x47d415=a31_0x108adc,{rl:_0x24c5a8,abortPromise:_0x3b2374,disposeSuccess:_0x1127ff}=createSafeRl(),_0x31fe03=new Promise(_0x599f53=>{const _0x2c702d=a31_0x1b5f,_0xbdea35=_0x49c9c7?'[Y/n]':_0x2c702d(0x89);_0x24c5a8[_0x2c702d(0x95)]('\x20\x20'+_0xeb59ad+'\x20'+_0xbdea35+':\x20',_0x3e379b=>{const _0x409898=_0x2c702d;_0x1127ff();const _0x1c6721=_0x3e379b[_0x409898(0x76)]()['toLowerCase']();if(_0x1c6721==='y'||_0x1c6721===_0x409898(0xa3))_0x599f53(!![]);else{if(_0x1c6721==='n'||_0x1c6721==='no')_0x599f53(![]);else _0x599f53(_0x49c9c7);}});});return Promise[_0x47d415(0xa2)]([_0x31fe03,_0x3b2374]);}function loadExisting(_0x404071){if(!existsSync(_0x404071))return null;return readConfigFile(_0x404071);}function resolveFilePath(_0x1aa3d9){return isAbsolute(_0x1aa3d9)?_0x1aa3d9:resolve(process['cwd'](),_0x1aa3d9);}function readSourceFile(_0x425b6e){const _0x45455c=a31_0x108adc;try{const _0x321ea5=readFileSync(_0x425b6e,{'encoding':_0x45455c(0xaf)});return JSON[_0x45455c(0xb3)](_0x321ea5);}catch(_0x5269f9){throw CliErrors[_0x45455c(0x7e)](_0x45455c(0x8f)+_0x5269f9[_0x45455c(0x8d)]);}}function resolveInitEnv(_0x21580d){const _0x4859e4=a31_0x108adc,_0x1a0b7c=_0x21580d[_0x4859e4(0x9b)];if(_0x1a0b7c===undefined||_0x1a0b7c==='')return DEFAULT_CONFIG_VALUES[_0x4859e4(0x9b)];if(!RUNTIME_ENV_VALUES['includes'](_0x1a0b7c))throw CliErrors[_0x4859e4(0x7e)]('Invalid\x20env\x20\x22'+_0x1a0b7c+_0x4859e4(0xb8)+RUNTIME_ENV_VALUES[_0x4859e4(0x86)](',\x20'));return _0x1a0b7c;}
1
+ const a31_0x15c51d=a31_0x7e3d;(function(_0x1dd319,_0xe20ab6){const _0x32d632=a31_0x7e3d,_0x1e1583=_0x1dd319();while(!![]){try{const _0x12a135=parseInt(_0x32d632(0xfd))/0x1+-parseInt(_0x32d632(0xf7))/0x2*(-parseInt(_0x32d632(0xdc))/0x3)+parseInt(_0x32d632(0x110))/0x4+parseInt(_0x32d632(0xe4))/0x5*(-parseInt(_0x32d632(0xf0))/0x6)+-parseInt(_0x32d632(0xf8))/0x7+parseInt(_0x32d632(0x108))/0x8*(parseInt(_0x32d632(0x119))/0x9)+parseInt(_0x32d632(0x107))/0xa*(-parseInt(_0x32d632(0x11d))/0xb);if(_0x12a135===_0xe20ab6)break;else _0x1e1583['push'](_0x1e1583['shift']());}catch(_0x137545){_0x1e1583['push'](_0x1e1583['shift']());}}}(a31_0x1fa9,0x26daf));import{existsSync,readFileSync}from'node:fs';import{resolve,isAbsolute}from'node:path';import{createInterface}from'node:readline';import{CliErrors}from'../errors.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';import{IMPORTABLE_RUNTIME_CONFIG_KEYS}from'../config/schema.js';import{resolveWriteConfigPath,readConfigFile,writeConfigFile,isNonInteractiveMode}from'../context.js';import{CLI_BIN_NAME}from'../constant/cli.js';function a31_0x1fa9(){const _0x34f2d3=['trim','[Y/n]','validation','yes','Imported\x20from\x20','close','name','556188jDTKWe','\x20\x20appcode:\x20','\x20init\x20—\x20Create\x20','SIGINT','object','Aborted.','\x20\x20config:\x20\x20','21806jmmqve','736428rrxeut','\x20already\x20exists.\x20Overwrite?','boolean','stdout','file','43820arpicG','riskLevel','stdin','Source\x20file\x20not\x20found:\x20','once','Initialized\x20','question','flagMissing','Provide\x20--appcode\x20<code>\x20or\x20use\x20an\x20upgraded\x20.rabetbase.json\x20with\x20top-level\x20appcode.\x20Legacy\x20files\x20must\x20be\x20upgraded\x20first\x20with\x20`rabetbase\x20project\x20upgrade`.','newConfigFileName','2140DRskue','432wROLOL','cancelled','env','\x22.\x20Allowed:\x20','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','utf8','\x0aInitialized\x20','defaultApp','398728piSNvO','project','message','\x20\x20default:\x20','):\x20','Override\x20imported\x20default\x20appcode',')\x20instead\x20of\x20project','removeListener','app','52722WAMPAI','entries','\x20app\x20init\x20--appcode\x20<code>\x20[--env\x20daily]\x20[--global]','Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','19294hDZIpE','race','Failed\x20to\x20parse\x20source\x20file:\x20','Write\x20to\x20global\x20(~/','cwd','Target\x20environment\x20(default\x20','Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','[y/N]','includes','75flYIVe','App\x20code\x20cannot\x20be\x20empty.','parse','App\x20code\x20for\x20the\x20project','File\x20','Skip\x20confirmation\x20when\x20overwriting','join','log','5WWGSgT','string','global','appcode','apps'];a31_0x1fa9=function(){return _0x34f2d3;};return a31_0x1fa9();}import{PRODUCT_CONFIG}from'../constant/product.js';export const initCreateFlagDefs=[{'name':'appcode','type':a31_0x15c51d(0xe5),'description':a31_0x15c51d(0xdf)},{'name':a31_0x15c51d(0x10a),'type':a31_0x15c51d(0xe5),'description':a31_0x15c51d(0x122)+DEFAULT_CONFIG_VALUES['env']+')','enum':[...RUNTIME_ENV_VALUES]},{'name':a31_0x15c51d(0xe6),'type':a31_0x15c51d(0xfa),'description':a31_0x15c51d(0x120)+PRODUCT_CONFIG['newConfigFileName']+')\x20instead\x20of\x20project','default':![]},{'name':a31_0x15c51d(0xec),'type':a31_0x15c51d(0xfa),'description':'Skip\x20confirmation\x20when\x20overwriting','default':![]}];export const initImportFlagDefs=[{'name':a31_0x15c51d(0xfc),'type':a31_0x15c51d(0xe5),'description':a31_0x15c51d(0x11c),'required':!![]},{'name':'appcode','type':a31_0x15c51d(0xe5),'description':a31_0x15c51d(0x115)},{'name':a31_0x15c51d(0x10a),'type':a31_0x15c51d(0xe5),'description':'Override\x20imported\x20default\x20env','enum':[...RUNTIME_ENV_VALUES]},{'name':a31_0x15c51d(0xe6),'type':a31_0x15c51d(0xfa),'description':a31_0x15c51d(0x120)+PRODUCT_CONFIG[a31_0x15c51d(0x106)]+a31_0x15c51d(0x116),'default':![]},{'name':a31_0x15c51d(0xec),'type':'boolean','description':a31_0x15c51d(0xe1),'default':![]}];export async function runInit(_0x482c89){const _0x4f3736=a31_0x15c51d,_0x2d36a2=isNonInteractiveMode(_0x482c89),_0x118192=_0x482c89[_0x4f3736(0xe6)]?'global':_0x4f3736(0x111),_0x79fee4=resolveWriteConfigPath(_0x118192);try{_0x2d36a2?await runNonInteractive(_0x482c89,_0x79fee4):await runInteractive(_0x482c89,_0x79fee4);}catch(_0x2a7d5a){if(_0x2a7d5a instanceof AbortPrompt)throw CliErrors[_0x4f3736(0x109)]();throw _0x2a7d5a;}}export async function runInitImport(_0x3120c0){const _0x2b0cb2=a31_0x15c51d,_0x55ecc1=_0x3120c0[_0x2b0cb2(0xe6)]?_0x2b0cb2(0xe6):'project',_0x2dd616=resolveWriteConfigPath(_0x55ecc1);await runFromImport(_0x3120c0,_0x2dd616);}const RUNTIME_IRRELEVANT_KEYS=new Set(['apiDir']);async function runFromImport(_0x29f9bd,_0xbf17c2){const _0x1328e9=a31_0x15c51d,_0x207159=resolveFilePath(_0x29f9bd['file']);if(!existsSync(_0x207159))throw CliErrors[_0x1328e9(0xeb)](_0x1328e9(0x100)+_0x207159);const _0x194178=readSourceFile(_0x207159),_0x54ab8d=convertToRuntimeConfig(_0x194178);_0x29f9bd[_0x1328e9(0xe7)]&&(_0x54ab8d[_0x1328e9(0xe7)]=String(_0x29f9bd[_0x1328e9(0xe7)]));_0x29f9bd['env']&&(_0x54ab8d[_0x1328e9(0x10a)]=resolveInitEnv(_0x29f9bd));if(!_0x54ab8d[_0x1328e9(0xe7)])throw CliErrors[_0x1328e9(0xeb)]('Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.',_0x1328e9(0x105));await writeInitConfig(_0xbf17c2,_0x54ab8d,_0x29f9bd),console[_0x1328e9(0xe3)](_0x1328e9(0xed)+_0x207159),console['log'](_0x1328e9(0xf6)+_0xbf17c2),console[_0x1328e9(0xe3)](_0x1328e9(0xf1)+_0x54ab8d[_0x1328e9(0xe7)]);if(_0x54ab8d[_0x1328e9(0x10f)])console['log'](_0x1328e9(0x113)+_0x54ab8d[_0x1328e9(0x10f)]);}function convertToRuntimeConfig(_0x583c47){const _0x5cbe20=a31_0x15c51d;if(_0x583c47[_0x5cbe20(0xe8)]&&typeof _0x583c47['apps']===_0x5cbe20(0xf4))throw CliErrors[_0x5cbe20(0xeb)](_0x5cbe20(0xd9),_0x5cbe20(0x10c));const _0x1f2be9={};for(const _0x2b1dfe of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x583c47[_0x2b1dfe]!==undefined&&(_0x1f2be9[_0x2b1dfe]=_0x583c47[_0x2b1dfe]);}return!_0x1f2be9[_0x5cbe20(0xfe)]&&(_0x1f2be9['riskLevel']=DEFAULT_CONFIG_VALUES['riskLevel']),_0x1f2be9;}async function runNonInteractive(_0x58769a,_0x16baea){const _0x2092b2=a31_0x15c51d,_0x35ed08=_0x58769a[_0x2092b2(0xe7)];if(!_0x35ed08)throw CliErrors[_0x2092b2(0x104)](_0x2092b2(0xe7),'Usage:\x20'+CLI_BIN_NAME+_0x2092b2(0x11b));const _0xbc4e73=resolveInitEnv(_0x58769a);await writeInitConfig(_0x16baea,{'appcode':_0x35ed08,'env':_0xbc4e73},_0x58769a),console['log'](_0x2092b2(0x102)+_0x16baea),console[_0x2092b2(0xe3)](_0x2092b2(0xf1)+_0x35ed08),console[_0x2092b2(0xe3)]('\x20\x20env:\x20\x20\x20\x20\x20'+_0xbc4e73);}async function runInteractive(_0x9f4dba,_0x5cbecc){const _0x3f5d71=a31_0x15c51d,_0x594f36=loadExisting(_0x5cbecc),_0x3d71b5=typeof _0x594f36?.['appcode']==='string'?_0x594f36[_0x3f5d71(0xe7)]:'',_0x57d644=resolveInitEnv(_0x9f4dba);console[_0x3f5d71(0xe3)](CLI_BIN_NAME+_0x3f5d71(0xf2)+PRODUCT_CONFIG[_0x3f5d71(0x106)]+'\x0a');if(existsSync(_0x5cbecc)&&!_0x9f4dba[_0x3f5d71(0xec)]){const _0x443ba7=await promptYesNo(_0x3f5d71(0xe0)+_0x5cbecc+_0x3f5d71(0xf9),![]);if(!_0x443ba7){console[_0x3f5d71(0xe3)](_0x3f5d71(0xf5));return;}}const _0x4c08e1=typeof _0x9f4dba[_0x3f5d71(0xe7)]===_0x3f5d71(0xe5)?_0x9f4dba[_0x3f5d71(0xe7)][_0x3f5d71(0xe9)]():'';let _0x52dd12=_0x4c08e1;!_0x52dd12&&(_0x52dd12=await promptInput('App\x20code',_0x3d71b5));if(!_0x52dd12[_0x3f5d71(0xe9)]())throw CliErrors[_0x3f5d71(0xeb)](_0x3f5d71(0xdd));await writeInitConfig(_0x5cbecc,{'appcode':_0x52dd12[_0x3f5d71(0xe9)](),'env':_0x57d644},_0x9f4dba),console['log'](_0x3f5d71(0x10e)+_0x5cbecc),console['log'](_0x3f5d71(0xf1)+_0x52dd12[_0x3f5d71(0xe9)]()),console[_0x3f5d71(0xe3)]('\x20\x20env:\x20\x20\x20\x20\x20'+_0x57d644);}async function writeInitConfig(_0x23fa23,_0x219c7b,_0x7368ba){const _0x3a4331=a31_0x15c51d;let _0x1a5d27={};existsSync(_0x23fa23)&&!_0x7368ba[_0x3a4331(0xec)]&&(_0x1a5d27=readConfigFile(_0x23fa23));for(const [_0x4eaf1f,_0x378b48]of Object[_0x3a4331(0x11a)](_0x219c7b)){_0x378b48!==undefined&&(_0x1a5d27[_0x4eaf1f]=_0x378b48);}if(_0x1a5d27[_0x3a4331(0x118)])delete _0x1a5d27['app'];writeConfigFile(_0x23fa23,_0x1a5d27);}function a31_0x7e3d(_0x5e8637,_0x583328){_0x5e8637=_0x5e8637-0xd9;const _0x1fa928=a31_0x1fa9();let _0x7e3d4e=_0x1fa928[_0x5e8637];return _0x7e3d4e;}class AbortPrompt extends Error{constructor(){const _0x460e79=a31_0x15c51d;super('User\x20aborted\x20prompt'),this[_0x460e79(0xef)]='AbortPrompt';}}function createSafeRl(){const _0x2044fc=a31_0x15c51d,_0x38b319=createInterface({'input':process[_0x2044fc(0xff)],'output':process[_0x2044fc(0xfb)]});let _0x23d4ad;const _0x493276=new Promise((_0x314e0f,_0x23617e)=>{const _0x4e99cc=_0x2044fc;_0x23d4ad=()=>{const _0x187c6c=a31_0x7e3d;_0x23d4ad&&(_0x38b319[_0x187c6c(0x117)](_0x187c6c(0xf3),_0x23d4ad),_0x23d4ad=undefined);try{_0x38b319[_0x187c6c(0xee)]();}catch{}_0x23617e(new AbortPrompt());},_0x38b319[_0x4e99cc(0x101)](_0x4e99cc(0xf3),_0x23d4ad);}),_0x26c4a9=()=>{const _0x39ee83=_0x2044fc;_0x23d4ad&&(_0x38b319['removeListener'](_0x39ee83(0xf3),_0x23d4ad),_0x23d4ad=undefined);try{_0x38b319['close']();}catch{}};return{'rl':_0x38b319,'abortPromise':_0x493276,'disposeSuccess':_0x26c4a9};}async function promptInput(_0x4672b1,_0x499c85){const _0x2089a8=a31_0x15c51d,{rl:_0x45f6ae,abortPromise:_0x1f1c41,disposeSuccess:_0x11f867}=createSafeRl(),_0x28ede5=new Promise(_0xf8a6ca=>{const _0xa52c3e=a31_0x7e3d,_0x47749d=_0x499c85?'\x20\x20'+_0x4672b1+'\x20('+_0x499c85+_0xa52c3e(0x114):'\x20\x20'+_0x4672b1+':\x20';_0x45f6ae[_0xa52c3e(0x103)](_0x47749d,_0xc31b7a=>{_0x11f867(),_0xf8a6ca(_0xc31b7a['trim']()||_0x499c85);});});return Promise[_0x2089a8(0x11e)]([_0x28ede5,_0x1f1c41]);}async function promptYesNo(_0x9be02a,_0x23a9d8){const _0x2cb213=a31_0x15c51d,{rl:_0x5a6ca3,abortPromise:_0x41bdf3,disposeSuccess:_0x35e35e}=createSafeRl(),_0x215372=new Promise(_0x556f00=>{const _0x72ec85=a31_0x7e3d,_0x3ab6be=_0x23a9d8?_0x72ec85(0xea):_0x72ec85(0xda);_0x5a6ca3[_0x72ec85(0x103)]('\x20\x20'+_0x9be02a+'\x20'+_0x3ab6be+':\x20',_0x16582a=>{const _0xf14678=_0x72ec85;_0x35e35e();const _0x143edd=_0x16582a[_0xf14678(0xe9)]()['toLowerCase']();if(_0x143edd==='y'||_0x143edd===_0xf14678(0xec))_0x556f00(!![]);else{if(_0x143edd==='n'||_0x143edd==='no')_0x556f00(![]);else _0x556f00(_0x23a9d8);}});});return Promise[_0x2cb213(0x11e)]([_0x215372,_0x41bdf3]);}function loadExisting(_0x1bdd1f){if(!existsSync(_0x1bdd1f))return null;return readConfigFile(_0x1bdd1f);}function resolveFilePath(_0x1cc43a){const _0x149d63=a31_0x15c51d;return isAbsolute(_0x1cc43a)?_0x1cc43a:resolve(process[_0x149d63(0x121)](),_0x1cc43a);}function readSourceFile(_0x425b0a){const _0x26a9f3=a31_0x15c51d;try{const _0x4c855a=readFileSync(_0x425b0a,{'encoding':_0x26a9f3(0x10d)});return JSON[_0x26a9f3(0xde)](_0x4c855a);}catch(_0xc3402c){throw CliErrors['validation'](_0x26a9f3(0x11f)+_0xc3402c[_0x26a9f3(0x112)]);}}function resolveInitEnv(_0x26223d){const _0x4790ce=a31_0x15c51d,_0x58b3af=_0x26223d[_0x4790ce(0x10a)];if(_0x58b3af===undefined||_0x58b3af==='')return DEFAULT_CONFIG_VALUES[_0x4790ce(0x10a)];if(!RUNTIME_ENV_VALUES[_0x4790ce(0xdb)](_0x58b3af))throw CliErrors['validation']('Invalid\x20env\x20\x22'+_0x58b3af+_0x4790ce(0x10b)+RUNTIME_ENV_VALUES[_0x4790ce(0xe2)](',\x20'));return _0x58b3af;}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @fileoverview `kb` command group — personal knowledge base and visible search.
3
+ *
4
+ * Phase one intentionally exposes file-based create/update and read/search
5
+ * workflows only. Delete exists in the backend but is not registered here.
6
+ */
7
+ import type { CommandDefinition } from "../../framework/types.js";
8
+ export declare const kbDefinitions: CommandDefinition[];
@@ -1 +1 @@
1
- const a32_0x33acb6=a32_0x3514;(function(_0x533102,_0x10a501){const _0x54ac83=a32_0x3514,_0x2f4594=_0x533102();while(!![]){try{const _0x531c07=-parseInt(_0x54ac83(0x118))/0x1+-parseInt(_0x54ac83(0x13d))/0x2*(parseInt(_0x54ac83(0x136))/0x3)+-parseInt(_0x54ac83(0x147))/0x4*(parseInt(_0x54ac83(0x119))/0x5)+parseInt(_0x54ac83(0x123))/0x6*(parseInt(_0x54ac83(0x114))/0x7)+parseInt(_0x54ac83(0x125))/0x8*(-parseInt(_0x54ac83(0x12b))/0x9)+-parseInt(_0x54ac83(0x14b))/0xa*(parseInt(_0x54ac83(0x12d))/0xb)+parseInt(_0x54ac83(0x128))/0xc;if(_0x531c07===_0x10a501)break;else _0x2f4594['push'](_0x2f4594['shift']());}catch(_0x50f196){_0x2f4594['push'](_0x2f4594['shift']());}}}(a32_0x8bf8,0x60397));import{existsSync,readFileSync,statSync}from'node:fs';function a32_0x8bf8(){const _0x27bf2e=['1672428BTQpvy','build','8XiCBuF','score','detail','37477128lkJtTi','createTime','version','6313482SGaSQv','Create\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','1837asymvk','Personal\x20knowledge-base\x20entry\x20ID','trim','validation','userId','Personal\x20knowledge-base\x20entry\x20title','number','string','Updated\x20KB\x20entry\x20','123EpWaUx','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','query','isFile','Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file','update','utf8','12568qNoxdM','updateTime','File\x20is\x20not\x20a\x20regular\x20file:\x20','weightedScore','List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','Update\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','/client/knowledge-base/personal/','scope','length','isFinite','2833296PHqKpJ','write','topk','File\x20not\x20found:\x20','33100wUQfQd','create','ragErrorMessage','appCode','verbose','map','title','Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22','Created\x20KB\x20entry\x20','Search\x20visible\x20company\x20and\x20personal\x20knowledge\x20base\x20content','content','flag','/client/knowledge-base/personal/create','read','7kPaTfS','metadata','Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20','/update','787461zhfQtx','5CXNCpa','Search\x20query\x20is\x20required.','--topk\x20must\x20be\x20a\x20positive\x20number.','str','body','POST','file','docId','num','File\x20path\x20is\x20required.'];a32_0x8bf8=function(){return _0x27bf2e;};return a32_0x8bf8();}import{createPersonalKnowledgeBaseItem,getPersonalKnowledgeBaseItem,listPersonalKnowledgeBaseItems,searchKnowledgeBase,updatePersonalKnowledgeBaseItem}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const TITLE_FLAG={'name':a32_0x33acb6(0x151),'type':a32_0x33acb6(0x134),'required':!![],'description':a32_0x33acb6(0x132)},FILE_FLAG={'name':a32_0x33acb6(0x11f),'type':a32_0x33acb6(0x134),'required':!![],'description':a32_0x33acb6(0x13a)},QUERY_FLAG={'name':a32_0x33acb6(0x138),'type':'string','required':!![],'description':'Search\x20query\x20for\x20visible\x20company\x20and\x20personal\x20knowledge'},TOPK_FLAG={'name':a32_0x33acb6(0x149),'type':a32_0x33acb6(0x133),'description':a32_0x33acb6(0x137)};function readKnowledgeFile(_0x23f41d){const _0x39fd89=a32_0x33acb6;if(!_0x23f41d)throw CliErrors[_0x39fd89(0x130)](_0x39fd89(0x122));if(!existsSync(_0x23f41d))throw CliErrors[_0x39fd89(0x130)](_0x39fd89(0x14a)+_0x23f41d);if(!statSync(_0x23f41d)[_0x39fd89(0x139)]())throw CliErrors[_0x39fd89(0x130)](_0x39fd89(0x13f)+_0x23f41d);return readFileSync(_0x23f41d,_0x39fd89(0x13c));}function summarizePersonalItem(_0xa2197d){const _0x38798c=a32_0x33acb6;return{'id':_0xa2197d['id'],'title':_0xa2197d[_0x38798c(0x151)],'version':_0xa2197d[_0x38798c(0x12a)],'ragStatus':_0xa2197d['ragStatus'],'ragErrorMessage':_0xa2197d[_0x38798c(0x14d)],'updateTime':_0xa2197d[_0x38798c(0x13e)]};}function detailPersonalItem(_0x333d45){const _0x426d87=a32_0x33acb6;return{'id':_0x333d45['id'],'appCode':_0x333d45[_0x426d87(0x14e)],'scope':_0x333d45['scope'],'userId':_0x333d45[_0x426d87(0x131)],'title':_0x333d45[_0x426d87(0x151)],'content':_0x333d45[_0x426d87(0x110)]??'','version':_0x333d45['version'],'ragStatus':_0x333d45['ragStatus'],'ragErrorMessage':_0x333d45[_0x426d87(0x14d)],'createTime':_0x333d45[_0x426d87(0x129)],'updateTime':_0x333d45[_0x426d87(0x13e)]};}function summarizeSearchHit(_0x348201){const _0x19ba0a=a32_0x33acb6;return{'scope':_0x348201[_0x19ba0a(0x144)],'title':_0x348201[_0x19ba0a(0x151)],'docId':_0x348201[_0x19ba0a(0x120)],'score':_0x348201[_0x19ba0a(0x126)],'weightedScore':_0x348201[_0x19ba0a(0x140)],'content':_0x348201['content'],'metadata':_0x348201[_0x19ba0a(0x115)]};}function readTopK(_0x4951da){const _0xb29025=a32_0x33acb6,_0x1c5522=_0x4951da[_0xb29025(0x111)](_0xb29025(0x149));if(_0x1c5522===undefined||_0x1c5522===null||_0x1c5522==='')return undefined;const _0x176b40=_0x4951da[_0xb29025(0x121)](_0xb29025(0x149));if(!Number[_0xb29025(0x146)](_0x176b40)||_0x176b40<0x1)throw CliErrors[_0xb29025(0x130)](_0xb29025(0x11b));return _0x176b40;}function a32_0x3514(_0x4e5e46,_0x231b44){_0x4e5e46=_0x4e5e46-0x110;const _0x8bf866=a32_0x8bf8();let _0x351462=_0x8bf866[_0x4e5e46];return _0x351462;}const kbList={'service':'kb','command':'list','description':a32_0x33acb6(0x141),'risk':a32_0x33acb6(0x113),'flags':[VERBOSE_FLAG],async 'execute'(_0xcb64ae){const _0x2a3aaa=a32_0x33acb6,_0x2b1c8e=await listPersonalKnowledgeBaseItems(_0xcb64ae[_0x2a3aaa(0x14e)]);if(_0xcb64ae['bool'](_0x2a3aaa(0x14f)))return{'ok':!![],'data':{'total':_0x2b1c8e[_0x2a3aaa(0x145)],'items':_0x2b1c8e}};return{'ok':!![],'data':{'total':_0x2b1c8e[_0x2a3aaa(0x145)],'items':_0x2b1c8e[_0x2a3aaa(0x150)](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':a32_0x33acb6(0x127),'description':'Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','risk':'read','flags':[{...ID_FLAG,'description':'Personal\x20knowledge-base\x20entry\x20ID'}],async 'execute'(_0x354e95){const _0x493765=a32_0x33acb6,_0x43191c=await getPersonalKnowledgeBaseItem(_0x354e95['num']('id'),_0x354e95[_0x493765(0x14e)]);return{'ok':!![],'data':detailPersonalItem(_0x43191c)};}},kbCreate={'service':'kb','command':a32_0x33acb6(0x14c),'description':a32_0x33acb6(0x12c),'risk':a32_0x33acb6(0x148),'flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x5e8446){const _0x4492a4=a32_0x33acb6,_0x501db8=_0x5e8446[_0x4492a4(0x11c)](_0x4492a4(0x151)),_0x1bfeca=readKnowledgeFile(_0x5e8446[_0x4492a4(0x11c)](_0x4492a4(0x11f))),_0x34be3e=await createPersonalKnowledgeBaseItem(_0x5e8446['appCode'],{'title':_0x501db8,'content':_0x1bfeca});return{'ok':!![],'data':summarizePersonalItem(_0x34be3e),'message':_0x4492a4(0x153)+_0x34be3e['id']+'\x20('+_0x34be3e[_0x4492a4(0x151)]+')'};},async 'dryRun'(_0x1ac110){const _0x359ab3=a32_0x33acb6,_0x42a971=_0x1ac110['str'](_0x359ab3(0x151)),_0x4d3883=readKnowledgeFile(_0x1ac110['str']('file'));return dryRun(_0x359ab3(0x11e),_0x359ab3(0x112))[_0x359ab3(0x11d)]({'appCode':_0x1ac110[_0x359ab3(0x14e)],'title':_0x42a971,'content':_0x4d3883})['description'](_0x359ab3(0x152)+_0x42a971+'\x22')[_0x359ab3(0x124)]();}},kbUpdate={'service':'kb','command':a32_0x33acb6(0x13b),'description':a32_0x33acb6(0x142),'risk':a32_0x33acb6(0x148),'flags':[{...ID_FLAG,'description':a32_0x33acb6(0x12e)},{...TITLE_FLAG,'required':![],'description':'Override\x20the\x20existing\x20entry\x20title'},FILE_FLAG],async 'execute'(_0x3375f3){const _0x565200=a32_0x33acb6,_0xac56c6=_0x3375f3[_0x565200(0x121)]('id'),_0x47965c=readKnowledgeFile(_0x3375f3['str'](_0x565200(0x11f))),_0x596220=_0x3375f3[_0x565200(0x11c)](_0x565200(0x151))||(await getPersonalKnowledgeBaseItem(_0xac56c6,_0x3375f3[_0x565200(0x14e)]))[_0x565200(0x151)],_0x314bfc=await updatePersonalKnowledgeBaseItem(_0xac56c6,_0x3375f3[_0x565200(0x14e)],{'title':_0x596220,'content':_0x47965c});return{'ok':!![],'data':summarizePersonalItem(_0x314bfc),'message':_0x565200(0x135)+_0x314bfc['id']+'\x20('+_0x314bfc[_0x565200(0x151)]+')'};},async 'dryRun'(_0x576de1){const _0x50513e=a32_0x33acb6,_0x4d4b91=_0x576de1['num']('id'),_0xa37227=readKnowledgeFile(_0x576de1[_0x50513e(0x11c)](_0x50513e(0x11f))),_0x3e8704=_0x576de1['str'](_0x50513e(0x151))||(await getPersonalKnowledgeBaseItem(_0x4d4b91,_0x576de1['appCode']))[_0x50513e(0x151)];return dryRun('POST',_0x50513e(0x143)+_0x4d4b91+_0x50513e(0x117))[_0x50513e(0x11d)]({'appCode':_0x576de1[_0x50513e(0x14e)],'title':_0x3e8704,'content':_0xa37227})['description'](_0x50513e(0x116)+_0x4d4b91)[_0x50513e(0x124)]();}},kbSearch={'service':'kb','command':'search','description':a32_0x33acb6(0x154),'risk':a32_0x33acb6(0x113),'flags':[QUERY_FLAG,TOPK_FLAG],async 'validate'(_0x92238f){const _0x38d8de=a32_0x33acb6;if(!_0x92238f['str'](_0x38d8de(0x138))[_0x38d8de(0x12f)]())throw CliErrors[_0x38d8de(0x130)](_0x38d8de(0x11a));readTopK(_0x92238f);},async 'execute'(_0x1b3697){const _0x4b796b=a32_0x33acb6,_0x4d34fe=_0x1b3697[_0x4b796b(0x11c)](_0x4b796b(0x138))[_0x4b796b(0x12f)](),_0x3ad5ae=readTopK(_0x1b3697),_0x5759b5=await searchKnowledgeBase(_0x1b3697[_0x4b796b(0x14e)],{'query':_0x4d34fe,'topK':_0x3ad5ae});return{'ok':!![],'data':{'total':_0x5759b5['length'],'hits':_0x5759b5[_0x4b796b(0x150)](summarizeSearchHit)}};}};export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];
1
+ const a32_0x53bd02=a32_0x1753;(function(_0x46800a,_0xbc598e){const _0x486cb4=a32_0x1753,_0x1b5fd2=_0x46800a();while(!![]){try{const _0x4cac37=-parseInt(_0x486cb4(0xdf))/0x1+parseInt(_0x486cb4(0xb5))/0x2*(parseInt(_0x486cb4(0xb8))/0x3)+parseInt(_0x486cb4(0xca))/0x4+-parseInt(_0x486cb4(0xc3))/0x5*(parseInt(_0x486cb4(0xd4))/0x6)+-parseInt(_0x486cb4(0xda))/0x7+-parseInt(_0x486cb4(0xae))/0x8+parseInt(_0x486cb4(0xb4))/0x9;if(_0x4cac37===_0xbc598e)break;else _0x1b5fd2['push'](_0x1b5fd2['shift']());}catch(_0x8b82e8){_0x1b5fd2['push'](_0x1b5fd2['shift']());}}}(a32_0x39d4,0x7523a));import{existsSync,readFileSync,statSync}from'node:fs';function a32_0x1753(_0x3d467e,_0x52b024){_0x3d467e=_0x3d467e-0xa8;const _0x39d4b8=a32_0x39d4();let _0x1753d4=_0x39d4b8[_0x3d467e];return _0x1753d4;}import{createPersonalKnowledgeBaseItem,getPersonalKnowledgeBaseItem,listPersonalKnowledgeBaseItems,searchKnowledgeBase,updatePersonalKnowledgeBaseItem}from'../../core/api-client.js';function a32_0x39d4(){const _0x3c18f2=['query','Search\x20query\x20is\x20required.','write','verbose','69895PAHDgR','docId','/client/knowledge-base/personal/create','Search\x20query\x20for\x20visible\x20company\x20and\x20personal\x20knowledge','Override\x20the\x20existing\x20entry\x20title','body','File\x20not\x20found:\x20','784428Tsvsoy','length','file','POST','appCode','content','read','ragErrorMessage','bool','create','84tbDKTO','str','string','update','ragStatus','detail','145824AZmZfs','/update','description','title','scope','263053WWEBCS','Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22','Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file','userId','updateTime','version','Personal\x20knowledge-base\x20entry\x20title','881256GDwToh','map','list','Personal\x20knowledge-base\x20entry\x20ID','topk','createTime','1530621CocVnL','4XWADTr','build','Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20','1055061ZktLid','trim','isFile','search','num','validation','isFinite'];a32_0x39d4=function(){return _0x3c18f2;};return a32_0x39d4();}import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const TITLE_FLAG={'name':a32_0x53bd02(0xdd),'type':a32_0x53bd02(0xd6),'required':!![],'description':a32_0x53bd02(0xad)},FILE_FLAG={'name':a32_0x53bd02(0xcc),'type':'string','required':!![],'description':a32_0x53bd02(0xa9)},QUERY_FLAG={'name':a32_0x53bd02(0xbf),'type':a32_0x53bd02(0xd6),'required':!![],'description':a32_0x53bd02(0xc6)},TOPK_FLAG={'name':a32_0x53bd02(0xb2),'type':'number','description':'Maximum\x20number\x20of\x20search\x20hits\x20to\x20return'};function readKnowledgeFile(_0x1c1128){const _0x15ba86=a32_0x53bd02;if(!_0x1c1128)throw CliErrors[_0x15ba86(0xbd)]('File\x20path\x20is\x20required.');if(!existsSync(_0x1c1128))throw CliErrors[_0x15ba86(0xbd)](_0x15ba86(0xc9)+_0x1c1128);if(!statSync(_0x1c1128)[_0x15ba86(0xba)]())throw CliErrors['validation']('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x1c1128);return readFileSync(_0x1c1128,'utf8');}function summarizePersonalItem(_0x5ac319){const _0xd1306=a32_0x53bd02;return{'id':_0x5ac319['id'],'title':_0x5ac319[_0xd1306(0xdd)],'version':_0x5ac319[_0xd1306(0xac)],'ragStatus':_0x5ac319[_0xd1306(0xd8)],'ragErrorMessage':_0x5ac319[_0xd1306(0xd1)],'updateTime':_0x5ac319[_0xd1306(0xab)]};}function detailPersonalItem(_0x15264f){const _0x236c6e=a32_0x53bd02;return{'id':_0x15264f['id'],'appCode':_0x15264f[_0x236c6e(0xce)],'scope':_0x15264f[_0x236c6e(0xde)],'userId':_0x15264f[_0x236c6e(0xaa)],'title':_0x15264f['title'],'content':_0x15264f[_0x236c6e(0xcf)]??'','version':_0x15264f[_0x236c6e(0xac)],'ragStatus':_0x15264f['ragStatus'],'ragErrorMessage':_0x15264f[_0x236c6e(0xd1)],'createTime':_0x15264f[_0x236c6e(0xb3)],'updateTime':_0x15264f[_0x236c6e(0xab)]};}function summarizeSearchHit(_0x24d2d2){const _0xb38db9=a32_0x53bd02;return{'scope':_0x24d2d2[_0xb38db9(0xde)],'title':_0x24d2d2[_0xb38db9(0xdd)],'docId':_0x24d2d2[_0xb38db9(0xc4)],'score':_0x24d2d2['score'],'weightedScore':_0x24d2d2['weightedScore'],'content':_0x24d2d2[_0xb38db9(0xcf)],'metadata':_0x24d2d2['metadata']};}function readTopK(_0x2e0794){const _0x22f8b7=a32_0x53bd02,_0x16cd9b=_0x2e0794['flag'](_0x22f8b7(0xb2));if(_0x16cd9b===undefined||_0x16cd9b===null||_0x16cd9b==='')return undefined;const _0x5d51b1=_0x2e0794[_0x22f8b7(0xbc)]('topk');if(!Number[_0x22f8b7(0xbe)](_0x5d51b1)||_0x5d51b1<0x1)throw CliErrors[_0x22f8b7(0xbd)]('--topk\x20must\x20be\x20a\x20positive\x20number.');return _0x5d51b1;}const kbList={'service':'kb','command':a32_0x53bd02(0xb0),'description':'List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','risk':a32_0x53bd02(0xd0),'flags':[VERBOSE_FLAG],async 'execute'(_0x32cdb0){const _0x3124e8=a32_0x53bd02,_0x2a2cc9=await listPersonalKnowledgeBaseItems(_0x32cdb0[_0x3124e8(0xce)]);if(_0x32cdb0[_0x3124e8(0xd2)](_0x3124e8(0xc2)))return{'ok':!![],'data':{'total':_0x2a2cc9[_0x3124e8(0xcb)],'items':_0x2a2cc9}};return{'ok':!![],'data':{'total':_0x2a2cc9['length'],'items':_0x2a2cc9[_0x3124e8(0xaf)](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':a32_0x53bd02(0xd9),'description':'Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','risk':'read','flags':[{...ID_FLAG,'description':a32_0x53bd02(0xb1)}],async 'execute'(_0x42c595){const _0x42ffac=a32_0x53bd02,_0x666ac1=await getPersonalKnowledgeBaseItem(_0x42c595[_0x42ffac(0xbc)]('id'),_0x42c595[_0x42ffac(0xce)]);return{'ok':!![],'data':detailPersonalItem(_0x666ac1)};}},kbCreate={'service':'kb','command':a32_0x53bd02(0xd3),'description':'Create\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','risk':a32_0x53bd02(0xc1),'flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x3889e2){const _0x55628d=a32_0x53bd02,_0x1475aa=_0x3889e2[_0x55628d(0xd5)](_0x55628d(0xdd)),_0x4c15cc=readKnowledgeFile(_0x3889e2[_0x55628d(0xd5)]('file')),_0x5cc0a3=await createPersonalKnowledgeBaseItem(_0x3889e2[_0x55628d(0xce)],{'title':_0x1475aa,'content':_0x4c15cc});return{'ok':!![],'data':summarizePersonalItem(_0x5cc0a3),'message':'Created\x20KB\x20entry\x20'+_0x5cc0a3['id']+'\x20('+_0x5cc0a3['title']+')'};},async 'dryRun'(_0x424cea){const _0x54d425=a32_0x53bd02,_0xd4956d=_0x424cea[_0x54d425(0xd5)](_0x54d425(0xdd)),_0x5d0085=readKnowledgeFile(_0x424cea['str'](_0x54d425(0xcc)));return dryRun(_0x54d425(0xcd),_0x54d425(0xc5))[_0x54d425(0xc8)]({'appCode':_0x424cea[_0x54d425(0xce)],'title':_0xd4956d,'content':_0x5d0085})[_0x54d425(0xdc)](_0x54d425(0xa8)+_0xd4956d+'\x22')[_0x54d425(0xb6)]();}},kbUpdate={'service':'kb','command':a32_0x53bd02(0xd7),'description':'Update\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','risk':a32_0x53bd02(0xc1),'flags':[{...ID_FLAG,'description':'Personal\x20knowledge-base\x20entry\x20ID'},{...TITLE_FLAG,'required':![],'description':a32_0x53bd02(0xc7)},FILE_FLAG],async 'execute'(_0x328997){const _0x2233ef=a32_0x53bd02,_0x328d52=_0x328997[_0x2233ef(0xbc)]('id'),_0x23732f=readKnowledgeFile(_0x328997[_0x2233ef(0xd5)]('file')),_0x4fd831=_0x328997[_0x2233ef(0xd5)](_0x2233ef(0xdd))||(await getPersonalKnowledgeBaseItem(_0x328d52,_0x328997['appCode']))['title'],_0x17d4d8=await updatePersonalKnowledgeBaseItem(_0x328d52,_0x328997['appCode'],{'title':_0x4fd831,'content':_0x23732f});return{'ok':!![],'data':summarizePersonalItem(_0x17d4d8),'message':'Updated\x20KB\x20entry\x20'+_0x17d4d8['id']+'\x20('+_0x17d4d8[_0x2233ef(0xdd)]+')'};},async 'dryRun'(_0x46a1ca){const _0x24cafe=a32_0x53bd02,_0x3a2b5d=_0x46a1ca[_0x24cafe(0xbc)]('id'),_0x4a74b4=readKnowledgeFile(_0x46a1ca[_0x24cafe(0xd5)]('file')),_0x400655=_0x46a1ca[_0x24cafe(0xd5)](_0x24cafe(0xdd))||(await getPersonalKnowledgeBaseItem(_0x3a2b5d,_0x46a1ca[_0x24cafe(0xce)]))[_0x24cafe(0xdd)];return dryRun(_0x24cafe(0xcd),'/client/knowledge-base/personal/'+_0x3a2b5d+_0x24cafe(0xdb))[_0x24cafe(0xc8)]({'appCode':_0x46a1ca[_0x24cafe(0xce)],'title':_0x400655,'content':_0x4a74b4})['description'](_0x24cafe(0xb7)+_0x3a2b5d)[_0x24cafe(0xb6)]();}},kbSearch={'service':'kb','command':a32_0x53bd02(0xbb),'description':'Search\x20visible\x20company\x20and\x20personal\x20knowledge\x20base\x20content','risk':a32_0x53bd02(0xd0),'flags':[QUERY_FLAG,TOPK_FLAG],async 'validate'(_0x364b71){const _0x44933b=a32_0x53bd02;if(!_0x364b71[_0x44933b(0xd5)]('query')[_0x44933b(0xb9)]())throw CliErrors[_0x44933b(0xbd)](_0x44933b(0xc0));readTopK(_0x364b71);},async 'execute'(_0x575188){const _0x3a629c=a32_0x53bd02,_0x2391b7=_0x575188[_0x3a629c(0xd5)]('query')['trim'](),_0x5b569d=readTopK(_0x575188),_0x3752f7=await searchKnowledgeBase(_0x575188['appCode'],{'query':_0x2391b7,'topK':_0x5b569d});return{'ok':!![],'data':{'total':_0x3752f7[_0x3a629c(0xcb)],'hits':_0x3752f7[_0x3a629c(0xaf)](summarizeSearchHit)}};}};export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @fileoverview `logs` command definitions — show and clear command history.
3
+ *
4
+ * Why a separate logger module: Lovrabet Runtime CLI uses Winston to write
5
+ * structured JSON logs to `.lovrabet-runtime.log`. The `logs` command provides
6
+ * a human-readable view of this file (formatted output with icons, timestamps)
7
+ * and a way to clear it.
8
+ *
9
+ * Why `printLogs` is a standalone function: it formats the raw log entries
10
+ * into a human-readable report. Keeping it separate from the command definition
11
+ * makes it easier to test the formatting logic independently.
12
+ *
13
+ * Design decision: `logs show` and `logs clear` both use `risk: "read"` and
14
+ * `"write"` respectively. `logs clear` is `"write"` because it modifies the
15
+ * log file on disk. However, it does NOT require `--yes` even in CI because
16
+ * clearing logs is not a data-modifying operation in the Lovrabet sense —
17
+ * it only affects the local diagnostic file.
18
+ */
19
+ import type { CommandDefinition } from "../../framework/types.js";
20
+ export declare const logsDefinitions: CommandDefinition[];
@@ -1 +1 @@
1
- const a33_0x16a77b=a33_0x4aca;(function(_0x1afb6e,_0x4f71f8){const _0x3cc1d9=a33_0x4aca,_0x3bcb31=_0x1afb6e();while(!![]){try{const _0x205a90=-parseInt(_0x3cc1d9(0x1d5))/0x1*(parseInt(_0x3cc1d9(0x1d1))/0x2)+-parseInt(_0x3cc1d9(0x1ce))/0x3+-parseInt(_0x3cc1d9(0x1e4))/0x4+parseInt(_0x3cc1d9(0x1d3))/0x5*(-parseInt(_0x3cc1d9(0x1c7))/0x6)+-parseInt(_0x3cc1d9(0x1cf))/0x7+-parseInt(_0x3cc1d9(0x1cb))/0x8+-parseInt(_0x3cc1d9(0x1cc))/0x9*(-parseInt(_0x3cc1d9(0x1d6))/0xa);if(_0x205a90===_0x4f71f8)break;else _0x3bcb31['push'](_0x3bcb31['shift']());}catch(_0x3a9054){_0x3bcb31['push'](_0x3bcb31['shift']());}}}(a33_0x315e,0xad272));function a33_0x315e(){const _0x362ebf=['337549heCese','3212890MBVzhJ','command','warn','logs','details','read','log','error','duration','en-US','message','length','*\x20No\x20logs\x20found','*\x20Logs\x20cleared','4842180mfybFG','\x20\x20\x20Details:\x20','Clear\x20command\x20history\x20logs','6zRfDRp','readLogs','stringify','clear','542944QTXaBW','117QNtnOS','level','1023336FQQScL','2735474vwxeRt','write','8bjYvbL','success','535100GHiHOc','\x20\x20\x20Time:\x20'];a33_0x315e=function(){return _0x362ebf;};return a33_0x315e();}function a33_0x4aca(_0x1f694d,_0x551864){_0x1f694d=_0x1f694d-0x1c7;const _0x315ed0=a33_0x315e();let _0x4acaa5=_0x315ed0[_0x1f694d];return _0x4acaa5;}import{logger}from'../../utils/logger.js';import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function printLogs(_0x3448a){const _0x1b0502=a33_0x4aca;if(_0x3448a['length']===0x0){console[_0x1b0502(0x1dc)](_0x1b0502(0x1e2));return;}console[_0x1b0502(0x1dc)]('*\x20'+CLI_DISPLAY_NAME+'\x20logs:\x0a'),_0x3448a['forEach']((_0x296847,_0x554d07)=>{const _0x5de5f2=_0x1b0502,_0x4b6034=new Date(_0x296847['timestamp'])['toLocaleString'](_0x5de5f2(0x1df)),_0x3e12c4=_0x296847['level']===_0x5de5f2(0x1d2)?'√':_0x296847[_0x5de5f2(0x1cd)]===_0x5de5f2(0x1dd)?'×':_0x296847['level']===_0x5de5f2(0x1d8)?'!':'i';console[_0x5de5f2(0x1dc)](_0x554d07+0x1+'.\x20'+_0x3e12c4+'\x20['+_0x296847[_0x5de5f2(0x1d7)]+']\x20'+_0x296847[_0x5de5f2(0x1e0)]),console[_0x5de5f2(0x1dc)](_0x5de5f2(0x1d4)+_0x4b6034),_0x296847[_0x5de5f2(0x1de)]&&console[_0x5de5f2(0x1dc)]('\x20\x20\x20Duration:\x20'+_0x296847[_0x5de5f2(0x1de)]+'ms'),_0x296847[_0x5de5f2(0x1da)]&&Object['keys'](_0x296847['details'])[_0x5de5f2(0x1e1)]>0x0&&console[_0x5de5f2(0x1dc)](_0x5de5f2(0x1e5)+JSON[_0x5de5f2(0x1c9)](_0x296847['details'],null,0x2)),console[_0x5de5f2(0x1dc)]('');});}export const logsDefinitions=[{'service':a33_0x16a77b(0x1d9),'command':'show','description':'View\x20command\x20history\x20logs','risk':a33_0x16a77b(0x1db),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x5707da){const _0x280399=a33_0x16a77b;return printLogs(logger[_0x280399(0x1c8)]()),{'ok':!![]};}},{'service':a33_0x16a77b(0x1d9),'command':a33_0x16a77b(0x1ca),'description':a33_0x16a77b(0x1e6),'risk':a33_0x16a77b(0x1d0),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x2ee97f){const _0x4961fc=a33_0x16a77b;return logger['clearLogs'](),console['log'](_0x4961fc(0x1e3)),{'ok':!![]};}}];
1
+ function a33_0x1951(_0x145ae5,_0x388942){_0x145ae5=_0x145ae5-0x1d1;const _0x261be4=a33_0x261b();let _0x195154=_0x261be4[_0x145ae5];return _0x195154;}const a33_0x26e11b=a33_0x1951;function a33_0x261b(){const _0xef3dfa=['logs','\x20\x20\x20Details:\x20','Clear\x20command\x20history\x20logs','length','12033076FkpwIJ','success','show','en-US','23nIkHmi','126ZMKpcz','timestamp','318906mykCSQ','155836OnfJiq','read','forEach','details','\x20\x20\x20Duration:\x20','*\x20No\x20logs\x20found','*\x20Logs\x20cleared','stringify','\x20logs:\x0a','warn','write','16suDgyf','level','clearLogs','896EqwdOV','\x20\x20\x20Time:\x20','clear','7600375nxiyyp','error','readLogs','toLocaleString','duration','keys','1352283eEuMot','View\x20command\x20history\x20logs','message','18176380Hgyeuf','log','114147WnqMIQ','command'];a33_0x261b=function(){return _0xef3dfa;};return a33_0x261b();}(function(_0xa9fef6,_0x23094a){const _0xfc7fe3=a33_0x1951,_0x4001b7=_0xa9fef6();while(!![]){try{const _0xd730af=parseInt(_0xfc7fe3(0x1f2))/0x1*(-parseInt(_0xfc7fe3(0x1f6))/0x2)+-parseInt(_0xfc7fe3(0x1e3))/0x3*(-parseInt(_0xfc7fe3(0x1d7))/0x4)+parseInt(_0xfc7fe3(0x1dd))/0x5+-parseInt(_0xfc7fe3(0x1f5))/0x6*(-parseInt(_0xfc7fe3(0x1f3))/0x7)+-parseInt(_0xfc7fe3(0x1da))/0x8*(-parseInt(_0xfc7fe3(0x1e8))/0x9)+-parseInt(_0xfc7fe3(0x1e6))/0xa+-parseInt(_0xfc7fe3(0x1ee))/0xb;if(_0xd730af===_0x23094a)break;else _0x4001b7['push'](_0x4001b7['shift']());}catch(_0x3ea89c){_0x4001b7['push'](_0x4001b7['shift']());}}}(a33_0x261b,0xf3539));import{logger}from'../../utils/logger.js';import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function printLogs(_0x498cb7){const _0xbb9adc=a33_0x1951;if(_0x498cb7['length']===0x0){console[_0xbb9adc(0x1e7)](_0xbb9adc(0x1d1));return;}console['log']('*\x20'+CLI_DISPLAY_NAME+_0xbb9adc(0x1d4)),_0x498cb7[_0xbb9adc(0x1f8)]((_0x21b363,_0x3d2149)=>{const _0x167326=_0xbb9adc,_0x16d61d=new Date(_0x21b363[_0x167326(0x1f4)])[_0x167326(0x1e0)](_0x167326(0x1f1)),_0x3d9eb7=_0x21b363[_0x167326(0x1d8)]===_0x167326(0x1ef)?'√':_0x21b363[_0x167326(0x1d8)]===_0x167326(0x1de)?'×':_0x21b363[_0x167326(0x1d8)]===_0x167326(0x1d5)?'!':'i';console['log'](_0x3d2149+0x1+'.\x20'+_0x3d9eb7+'\x20['+_0x21b363[_0x167326(0x1e9)]+']\x20'+_0x21b363[_0x167326(0x1e5)]),console['log'](_0x167326(0x1db)+_0x16d61d),_0x21b363['duration']&&console['log'](_0x167326(0x1fa)+_0x21b363[_0x167326(0x1e1)]+'ms'),_0x21b363[_0x167326(0x1f9)]&&Object[_0x167326(0x1e2)](_0x21b363[_0x167326(0x1f9)])[_0x167326(0x1ed)]>0x0&&console[_0x167326(0x1e7)](_0x167326(0x1eb)+JSON[_0x167326(0x1d3)](_0x21b363[_0x167326(0x1f9)],null,0x2)),console[_0x167326(0x1e7)]('');});}export const logsDefinitions=[{'service':a33_0x26e11b(0x1ea),'command':a33_0x26e11b(0x1f0),'description':a33_0x26e11b(0x1e4),'risk':a33_0x26e11b(0x1f7),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x305bec){const _0x104629=a33_0x26e11b;return printLogs(logger[_0x104629(0x1df)]()),{'ok':!![]};}},{'service':a33_0x26e11b(0x1ea),'command':a33_0x26e11b(0x1dc),'description':a33_0x26e11b(0x1ec),'risk':a33_0x26e11b(0x1d6),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x1bea37){const _0x2fec90=a33_0x26e11b;return logger[_0x2fec90(0x1d9)](),console[_0x2fec90(0x1e7)](_0x2fec90(0x1d2)),{'ok':!![]};}}];
@@ -0,0 +1,2 @@
1
+ import type { CommandDefinition } from "../../framework/types.js";
2
+ export declare const ocrDefinitions: CommandDefinition[];