@lovrabet/lovrabet-cli 2.2.3-beta.2 → 2.2.4-beta.1

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 (182) hide show
  1. package/lib/cli.js +1 -1
  2. package/lib/commands/api-doc/index.js +1 -1
  3. package/lib/commands/app/cache.js +1 -1
  4. package/lib/commands/app/definitions.js +1 -1
  5. package/lib/commands/app/eligibility.js +1 -1
  6. package/lib/commands/app/mock-loader.js +1 -1
  7. package/lib/commands/app/remote-source.js +1 -1
  8. package/lib/commands/app/shared.js +1 -1
  9. package/lib/commands/app-config/get.js +1 -1
  10. package/lib/commands/app-config/index.js +1 -1
  11. package/lib/commands/artifact/index.js +1 -1
  12. package/lib/commands/auth/device.js +1 -1
  13. package/lib/commands/auth/index.js +1 -1
  14. package/lib/commands/auth/prompt.js +1 -1
  15. package/lib/commands/bff/detail.js +1 -1
  16. package/lib/commands/bff/exec.js +1 -1
  17. package/lib/commands/bff/index.js +1 -1
  18. package/lib/commands/cli-skill/index.js +1 -1
  19. package/lib/commands/common/config-policy.js +1 -1
  20. package/lib/commands/common/constraints.js +1 -1
  21. package/lib/commands/common/flags.js +1 -1
  22. package/lib/commands/common/local-file.js +1 -1
  23. package/lib/commands/config/definitions.js +1 -1
  24. package/lib/commands/config/shared.js +1 -1
  25. package/lib/commands/data/index.js +1 -1
  26. package/lib/commands/dataset/detail.js +1 -1
  27. package/lib/commands/dataset/index.js +1 -1
  28. package/lib/commands/dataset/list.js +1 -1
  29. package/lib/commands/dataset/sdk-doc.js +1 -1
  30. package/lib/commands/doctor.js +1 -1
  31. package/lib/commands/file/index.js +1 -1
  32. package/lib/commands/init.js +1 -1
  33. package/lib/commands/kb/index.js +1 -1
  34. package/lib/commands/logs/index.js +1 -1
  35. package/lib/commands/notification/config-list.d.ts +2 -0
  36. package/lib/commands/notification/config-list.js +1 -0
  37. package/lib/commands/notification/index.d.ts +2 -0
  38. package/lib/commands/notification/index.js +1 -0
  39. package/lib/commands/notification/shared.d.ts +13 -0
  40. package/lib/commands/notification/shared.js +1 -0
  41. package/lib/commands/ocr/index.js +1 -1
  42. package/lib/commands/permit/dataset-get.d.ts +2 -0
  43. package/lib/commands/permit/dataset-get.js +1 -0
  44. package/lib/commands/permit/dataset-set.d.ts +2 -0
  45. package/lib/commands/permit/dataset-set.js +1 -0
  46. package/lib/commands/permit/index.d.ts +2 -0
  47. package/lib/commands/permit/index.js +1 -0
  48. package/lib/commands/permit/page-get.d.ts +2 -0
  49. package/lib/commands/permit/page-get.js +1 -0
  50. package/lib/commands/permit/page-set.d.ts +2 -0
  51. package/lib/commands/permit/page-set.js +1 -0
  52. package/lib/commands/permit/role-menus-set.d.ts +2 -0
  53. package/lib/commands/permit/role-menus-set.js +1 -0
  54. package/lib/commands/permit/role-menus.d.ts +2 -0
  55. package/lib/commands/permit/role-menus.js +1 -0
  56. package/lib/commands/permit/shared.d.ts +52 -0
  57. package/lib/commands/permit/shared.js +1 -0
  58. package/lib/commands/personal-bff/index.js +1 -1
  59. package/lib/commands/registry.js +1 -1
  60. package/lib/commands/role/create.d.ts +2 -0
  61. package/lib/commands/role/create.js +1 -0
  62. package/lib/commands/role/delete.d.ts +2 -0
  63. package/lib/commands/role/delete.js +1 -0
  64. package/lib/commands/role/detail.d.ts +2 -0
  65. package/lib/commands/role/detail.js +1 -0
  66. package/lib/commands/role/index.d.ts +2 -0
  67. package/lib/commands/role/index.js +1 -0
  68. package/lib/commands/role/list.d.ts +2 -0
  69. package/lib/commands/role/list.js +1 -0
  70. package/lib/commands/role/shared.d.ts +33 -0
  71. package/lib/commands/role/shared.js +1 -0
  72. package/lib/commands/role/update.d.ts +2 -0
  73. package/lib/commands/role/update.js +1 -0
  74. package/lib/commands/role/user-add.d.ts +2 -0
  75. package/lib/commands/role/user-add.js +1 -0
  76. package/lib/commands/role/user-remove.d.ts +2 -0
  77. package/lib/commands/role/user-remove.js +1 -0
  78. package/lib/commands/schedule/index.js +1 -1
  79. package/lib/commands/schema.js +1 -1
  80. package/lib/commands/service/dynamic.js +1 -1
  81. package/lib/commands/service/function-name-adapter.js +1 -1
  82. package/lib/commands/service/index.js +1 -1
  83. package/lib/commands/service/registry.js +1 -1
  84. package/lib/commands/skill/commands/create.js +1 -1
  85. package/lib/commands/skill/commands/diagram.js +1 -1
  86. package/lib/commands/skill/commands/install.js +1 -1
  87. package/lib/commands/skill/commands/list.js +1 -1
  88. package/lib/commands/skill/commands/push.js +1 -1
  89. package/lib/commands/skill/commands/validate.js +1 -1
  90. package/lib/commands/skill/diagram.js +1 -1
  91. package/lib/commands/skill/flags.js +1 -1
  92. package/lib/commands/skill/index.js +1 -1
  93. package/lib/commands/skill/manifest-helpers.js +1 -1
  94. package/lib/commands/skill/push-execute.js +1 -1
  95. package/lib/commands/skill/push-flow-helpers.js +1 -1
  96. package/lib/commands/skill/push-retarget.js +1 -1
  97. package/lib/commands/skill/scopes.js +1 -1
  98. package/lib/commands/skill/summary.js +1 -1
  99. package/lib/commands/skill/templates.js +1 -1
  100. package/lib/commands/skill/validate.js +1 -1
  101. package/lib/commands/sql/detail.js +1 -1
  102. package/lib/commands/sql/exec.js +1 -1
  103. package/lib/commands/sql/index.js +1 -1
  104. package/lib/commands/update.js +1 -1
  105. package/lib/commands/user-account/bind.js +1 -1
  106. package/lib/commands/user-account/index.js +1 -1
  107. package/lib/commands/workspace/index.js +1 -1
  108. package/lib/config/schema.js +1 -1
  109. package/lib/constant/app.js +1 -1
  110. package/lib/constant/auth-mode.js +1 -1
  111. package/lib/constant/cli.js +1 -1
  112. package/lib/constant/defaults.js +1 -1
  113. package/lib/constant/distribution.js +1 -1
  114. package/lib/constant/domain.js +1 -1
  115. package/lib/constant/env.js +1 -1
  116. package/lib/constant/output.js +1 -1
  117. package/lib/constant/product.js +1 -1
  118. package/lib/constant/risk.js +1 -1
  119. package/lib/constant/url.js +1 -1
  120. package/lib/context.js +1 -1
  121. package/lib/core/api-client.d.ts +161 -0
  122. package/lib/core/api-client.js +1 -1
  123. package/lib/core/db-resolver.js +1 -1
  124. package/lib/core/sdk-client.js +1 -1
  125. package/lib/errors.js +1 -1
  126. package/lib/framework/build-all-flags.js +1 -1
  127. package/lib/framework/dryrun.js +1 -1
  128. package/lib/framework/flags.js +1 -1
  129. package/lib/framework/help.js +1 -1
  130. package/lib/framework/index.js +1 -1
  131. package/lib/framework/output.js +1 -1
  132. package/lib/framework/preparse.js +1 -1
  133. package/lib/framework/rate-limit.js +1 -1
  134. package/lib/framework/raw-flags.js +1 -1
  135. package/lib/framework/response.js +1 -1
  136. package/lib/framework/runner-confirmation.js +1 -1
  137. package/lib/framework/runner-error.js +1 -1
  138. package/lib/framework/runner.js +1 -1
  139. package/lib/framework/schema-export.js +1 -1
  140. package/lib/framework/service-order.js +1 -1
  141. package/lib/framework/types.js +1 -1
  142. package/lib/generated/build-info.d.ts +4 -4
  143. package/lib/generated/build-info.js +1 -1
  144. package/lib/help.js +1 -1
  145. package/lib/postinstall.js +1 -1
  146. package/lib/runtime/confirmation.js +1 -1
  147. package/lib/runtime/event.js +1 -1
  148. package/lib/runtime/index.js +1 -1
  149. package/lib/runtime/queue.js +1 -1
  150. package/lib/runtime/resolve.js +1 -1
  151. package/lib/skills/builtin-skill.js +1 -1
  152. package/lib/skills/npx-skills-add.js +1 -1
  153. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  154. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  155. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  156. package/lib/skills/runtime-skill-sync/install-target.js +1 -1
  157. package/lib/skills/runtime-skill-sync/links.js +1 -1
  158. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  159. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  160. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  161. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  162. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  163. package/lib/skills/runtime-skill-sync/push.js +1 -1
  164. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  165. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  166. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  167. package/lib/skills/runtime-skill-sync.js +1 -1
  168. package/lib/skills/skill-presence.js +1 -1
  169. package/lib/utils/apply-jq-filter.js +1 -1
  170. package/lib/utils/logger.js +1 -1
  171. package/lib/utils/lossless-json.js +1 -1
  172. package/lib/utils/params.js +1 -1
  173. package/lib/utils/platform.js +1 -1
  174. package/lib/utils/update-notice.js +1 -1
  175. package/lib/utils/version.js +1 -1
  176. package/lib/utils/write-cli-side-channel.js +1 -1
  177. package/package.json +1 -1
  178. package/skills/lovrabet/SKILL.md +19 -6
  179. package/skills/lovrabet/guides/role-and-permission-workflow.md +139 -0
  180. package/skills/lovrabet/references/lovrabet-auth.md +1 -5
  181. package/skills/lovrabet/references/lovrabet-notification-config-list.md +81 -0
  182. package/skills/lovrabet.manifest.json +5 -3
@@ -1 +1 @@
1
- const a129_0x457552=a129_0x2b36;(function(_0x51c1d7,_0x3a1188){const _0x2f7434=a129_0x2b36,_0x1c5c0a=_0x51c1d7();while(!![]){try{const _0x18efed=-parseInt(_0x2f7434(0x19c))/0x1*(-parseInt(_0x2f7434(0x1af))/0x2)+-parseInt(_0x2f7434(0x1ac))/0x3+-parseInt(_0x2f7434(0x18b))/0x4+parseInt(_0x2f7434(0x1a9))/0x5+-parseInt(_0x2f7434(0x18d))/0x6+parseInt(_0x2f7434(0x1a8))/0x7*(parseInt(_0x2f7434(0x1a2))/0x8)+parseInt(_0x2f7434(0x1ad))/0x9;if(_0x18efed===_0x3a1188)break;else _0x1c5c0a['push'](_0x1c5c0a['shift']());}catch(_0x5075b2){_0x1c5c0a['push'](_0x1c5c0a['shift']());}}}(a129_0x561f,0xdb27d));function a129_0x561f(){const _0x2a2360=['duration','split','winstonLogger','utf8','createLogger','initWinstonLogger','1744644hIEHsX','blue','5610168ZAsCfd','now','Failed:\x20','parse','combine','clearLogs','warn','error','trim','filter','readLogs','clear','join','existsSync','logFilePath','221PzbkxW','Failed\x20to\x20read\x20logs:','mkdirSync','timestamp','Completed:\x20','log','464bKHCHB','format','success','writeFileSync','info','currentRawCommand','181265Bzcqoo','8749775JFqRTH','command','setLogPath','5307894pHPNhr','6358518xBqRVo','red','722ecvwSh','getWinstonInstance','readFileSync','File'];a129_0x561f=function(){return _0x2a2360;};return a129_0x561f();}function a129_0x2b36(_0xe29b1f,_0x3a7580){_0xe29b1f=_0xe29b1f-0x184;const _0x561f0c=a129_0x561f();let _0x2b3678=_0x561f0c[_0xe29b1f];return _0x2b3678;}import a129_0x7254f2 from'winston';import a129_0x2400ae from'node:fs';import a129_0x3abc98 from'node:path';import{PRODUCT_CONFIG}from'../constant/product.js';class Logger{['winstonLogger'];['logFilePath']='';[a129_0x457552(0x1a7)]='';constructor(){}['setRawCommand'](_0x2b60b7){this['currentRawCommand']=_0x2b60b7;}[a129_0x457552(0x1ab)](_0x58c6ba){const _0x1726e1=a129_0x457552;this[_0x1726e1(0x19b)]=a129_0x3abc98[_0x1726e1(0x199)](_0x58c6ba,PRODUCT_CONFIG['logFileName']),this[_0x1726e1(0x187)]&&this[_0x1726e1(0x187)][_0x1726e1(0x198)](),this[_0x1726e1(0x18a)]();}[a129_0x457552(0x18a)](){const _0x392249=a129_0x457552,_0x1ddb77=a129_0x3abc98['dirname'](this[_0x392249(0x19b)]);!a129_0x2400ae[_0x392249(0x19a)](_0x1ddb77)&&a129_0x2400ae[_0x392249(0x19e)](_0x1ddb77,{'recursive':!![]});const _0x26f221=a129_0x7254f2[_0x392249(0x1a3)][_0x392249(0x191)](a129_0x7254f2[_0x392249(0x1a3)]['timestamp'](),a129_0x7254f2[_0x392249(0x1a3)]['errors']({'stack':!![]}),a129_0x7254f2[_0x392249(0x1a3)]['printf'](_0x40a8fa=>{const _0x37632f=_0x392249,_0x343923={'timestamp':_0x40a8fa[_0x37632f(0x19f)]||new Date()['toISOString'](),'level':_0x40a8fa['level']||_0x37632f(0x1a6),'command':_0x40a8fa[_0x37632f(0x1aa)]||'unknown','rawCommand':_0x40a8fa['rawCommand']||this[_0x37632f(0x1a7)]||undefined,'message':_0x40a8fa['message']||'','duration':_0x40a8fa[_0x37632f(0x185)]||undefined,'details':_0x40a8fa['details']||undefined};return JSON['stringify'](_0x343923);}));this[_0x392249(0x187)]=a129_0x7254f2[_0x392249(0x189)]({'level':_0x392249(0x1a6),'format':_0x26f221,'transports':[new a129_0x7254f2['transports'][(_0x392249(0x184))]({'filename':this['logFilePath'],'level':_0x392249(0x1a6)})],'silent':![]}),a129_0x7254f2['addColors']({'success':'green','error':_0x392249(0x1ae),'warn':'yellow','info':_0x392249(0x18c)});}[a129_0x457552(0x1a6)](_0xa5fb57,_0x43a797,_0x462796){const _0x11a63f=a129_0x457552;if(!this['logFilePath']||!this[_0x11a63f(0x187)])return;this['winstonLogger'][_0x11a63f(0x1a6)](_0x43a797,{'command':_0xa5fb57,'details':_0x462796});}['success'](_0x236054,_0x59e1b2,_0x4ba6c8,_0x2e7d90){const _0x1dc50d=a129_0x457552;if(!this[_0x1dc50d(0x19b)]||!this[_0x1dc50d(0x187)])return;this['winstonLogger'][_0x1dc50d(0x1a1)](_0x1dc50d(0x1a6),_0x59e1b2,{'level':_0x1dc50d(0x1a4),'command':_0x236054,'duration':_0x4ba6c8,'details':_0x2e7d90});}[a129_0x457552(0x194)](_0x5b3555,_0x3e9c37,_0x20cbc3){const _0x3194ad=a129_0x457552;if(!this[_0x3194ad(0x19b)]||!this['winstonLogger'])return;this[_0x3194ad(0x187)][_0x3194ad(0x194)](_0x3e9c37,{'command':_0x5b3555,'details':_0x20cbc3});}[a129_0x457552(0x193)](_0x3628cf,_0x1802bf,_0x53c12e){const _0x59ea0e=a129_0x457552;if(!this['logFilePath']||!this[_0x59ea0e(0x187)])return;this['winstonLogger'][_0x59ea0e(0x193)](_0x1802bf,{'command':_0x3628cf,'details':_0x53c12e});}async['logTask'](_0x5af2d7,_0x2866b6,_0x327ea2){const _0x12a694=a129_0x457552,_0x56e2fe=Date[_0x12a694(0x18e)]();this[_0x12a694(0x1a6)](_0x5af2d7,'Starting:\x20'+_0x2866b6);try{const _0x1b9a72=await _0x327ea2(),_0x18819e=Date[_0x12a694(0x18e)]()-_0x56e2fe;return this['success'](_0x5af2d7,_0x12a694(0x1a0)+_0x2866b6,_0x18819e),_0x1b9a72;}catch(_0x344924){const _0x2508fd=Date[_0x12a694(0x18e)]()-_0x56e2fe;this[_0x12a694(0x194)](_0x5af2d7,_0x12a694(0x18f)+_0x2866b6,{'error':_0x344924 instanceof Error?_0x344924['message']:String(_0x344924),'duration':_0x2508fd});throw _0x344924;}}[a129_0x457552(0x197)](){const _0x456768=a129_0x457552;try{if(!a129_0x2400ae['existsSync'](this[_0x456768(0x19b)]))return[];const _0xe760fd=a129_0x2400ae[_0x456768(0x1b1)](this['logFilePath'],_0x456768(0x188));return _0xe760fd[_0x456768(0x186)](/\r?\n/)[_0x456768(0x196)](_0x4856df=>_0x4856df[_0x456768(0x195)]())['map'](_0x11ee16=>JSON[_0x456768(0x190)](_0x11ee16));}catch(_0x59f28b){return console['warn'](_0x456768(0x19d),_0x59f28b),[];}}[a129_0x457552(0x192)](){const _0x193933=a129_0x457552;try{a129_0x2400ae['existsSync'](this[_0x193933(0x19b)])&&a129_0x2400ae[_0x193933(0x1a5)](this[_0x193933(0x19b)],'',_0x193933(0x188));}catch(_0x396832){console['warn']('Failed\x20to\x20clear\x20logs:',_0x396832);}}[a129_0x457552(0x1b0)](){const _0x1f7a6a=a129_0x457552;return this[_0x1f7a6a(0x187)];}}export const logger=new Logger();
1
+ const a149_0x22db59=a149_0x2a94;(function(_0x3386bd,_0x32187b){const _0x388755=a149_0x2a94,_0xf403a=_0x3386bd();while(!![]){try{const _0x24e227=-parseInt(_0x388755(0xac))/0x1+-parseInt(_0x388755(0xc4))/0x2+parseInt(_0x388755(0xad))/0x3+-parseInt(_0x388755(0xbc))/0x4+parseInt(_0x388755(0xaa))/0x5*(parseInt(_0x388755(0xa5))/0x6)+parseInt(_0x388755(0xbb))/0x7*(parseInt(_0x388755(0xa4))/0x8)+parseInt(_0x388755(0xbf))/0x9*(parseInt(_0x388755(0xba))/0xa);if(_0x24e227===_0x32187b)break;else _0xf403a['push'](_0xf403a['shift']());}catch(_0x179a5f){_0xf403a['push'](_0xf403a['shift']());}}}(a149_0x2bf8,0xcb5f9));import a149_0x2a1b49 from'winston';function a149_0x2a94(_0xffae88,_0x5759b9){_0xffae88=_0xffae88-0x9e;const _0x2bf82f=a149_0x2bf8();let _0x2a941f=_0x2bf82f[_0xffae88];return _0x2a941f;}import a149_0x2a2ec2 from'node:fs';import a149_0x16678e from'node:path';import{PRODUCT_CONFIG}from'../constant/product.js';function a149_0x2bf8(){const _0x41bc50=['3542598TSEqPq','initWinstonLogger','transports','rawCommand','log','unknown','setRawCommand','readFileSync','info','getWinstonInstance','trim','Starting:\x20','join','19280840eMmhsD','4403QCqohy','6044140AdShUW','parse','stringify','9LVWSnI','green','currentRawCommand','printf','errors','1637674kCMnrl','logTask','existsSync','timestamp','warn','red','details','logFilePath','writeFileSync','clear','message','level','Completed:\x20','setLogPath','winstonLogger','logFileName','command','filter','now','error','readLogs','utf8','toISOString','Failed:\x20','10232avZOUI','801744LRFnuv','format','yellow','success','mkdirSync','30nHBryO','duration','1552296OnNPSa'];a149_0x2bf8=function(){return _0x41bc50;};return a149_0x2bf8();}class Logger{['winstonLogger'];[a149_0x22db59(0xcb)]='';[a149_0x22db59(0xc1)]='';constructor(){}[a149_0x22db59(0xb3)](_0x3f05d0){const _0x54808f=a149_0x22db59;this[_0x54808f(0xc1)]=_0x3f05d0;}[a149_0x22db59(0xd1)](_0x3087b2){const _0x506c91=a149_0x22db59;this[_0x506c91(0xcb)]=a149_0x16678e[_0x506c91(0xb9)](_0x3087b2,PRODUCT_CONFIG[_0x506c91(0xd3)]),this[_0x506c91(0xd2)]&&this['winstonLogger'][_0x506c91(0xcd)](),this[_0x506c91(0xae)]();}['initWinstonLogger'](){const _0x2581c9=a149_0x22db59,_0x467133=a149_0x16678e['dirname'](this[_0x2581c9(0xcb)]);!a149_0x2a2ec2[_0x2581c9(0xc6)](_0x467133)&&a149_0x2a2ec2[_0x2581c9(0xa9)](_0x467133,{'recursive':!![]});const _0x15aafd=a149_0x2a1b49[_0x2581c9(0xa6)]['combine'](a149_0x2a1b49[_0x2581c9(0xa6)]['timestamp'](),a149_0x2a1b49[_0x2581c9(0xa6)][_0x2581c9(0xc3)]({'stack':!![]}),a149_0x2a1b49[_0x2581c9(0xa6)][_0x2581c9(0xc2)](_0x14d66f=>{const _0x3b4db7=_0x2581c9,_0xc05e61={'timestamp':_0x14d66f[_0x3b4db7(0xc7)]||new Date()[_0x3b4db7(0xa2)](),'level':_0x14d66f[_0x3b4db7(0xcf)]||'info','command':_0x14d66f[_0x3b4db7(0xd4)]||_0x3b4db7(0xb2),'rawCommand':_0x14d66f[_0x3b4db7(0xb0)]||this[_0x3b4db7(0xc1)]||undefined,'message':_0x14d66f[_0x3b4db7(0xce)]||'','duration':_0x14d66f[_0x3b4db7(0xab)]||undefined,'details':_0x14d66f[_0x3b4db7(0xca)]||undefined};return JSON[_0x3b4db7(0xbe)](_0xc05e61);}));this[_0x2581c9(0xd2)]=a149_0x2a1b49['createLogger']({'level':_0x2581c9(0xb5),'format':_0x15aafd,'transports':[new a149_0x2a1b49[(_0x2581c9(0xaf))]['File']({'filename':this[_0x2581c9(0xcb)],'level':_0x2581c9(0xb5)})],'silent':![]}),a149_0x2a1b49['addColors']({'success':_0x2581c9(0xc0),'error':_0x2581c9(0xc9),'warn':_0x2581c9(0xa7),'info':'blue'});}[a149_0x22db59(0xb5)](_0x4f4a02,_0x44ec3d,_0x409a38){const _0xaedcca=a149_0x22db59;if(!this[_0xaedcca(0xcb)]||!this['winstonLogger'])return;this[_0xaedcca(0xd2)][_0xaedcca(0xb5)](_0x44ec3d,{'command':_0x4f4a02,'details':_0x409a38});}['success'](_0x506004,_0x233876,_0x3392f6,_0x5777d9){const _0x3dad7e=a149_0x22db59;if(!this[_0x3dad7e(0xcb)]||!this['winstonLogger'])return;this['winstonLogger'][_0x3dad7e(0xb1)](_0x3dad7e(0xb5),_0x233876,{'level':_0x3dad7e(0xa8),'command':_0x506004,'duration':_0x3392f6,'details':_0x5777d9});}['error'](_0x50adb4,_0x2b935e,_0x236ed5){const _0x1215ca=a149_0x22db59;if(!this[_0x1215ca(0xcb)]||!this[_0x1215ca(0xd2)])return;this[_0x1215ca(0xd2)][_0x1215ca(0x9f)](_0x2b935e,{'command':_0x50adb4,'details':_0x236ed5});}[a149_0x22db59(0xc8)](_0x4a3ff7,_0xd695fb,_0x5377bf){const _0x1dad41=a149_0x22db59;if(!this[_0x1dad41(0xcb)]||!this[_0x1dad41(0xd2)])return;this['winstonLogger'][_0x1dad41(0xc8)](_0xd695fb,{'command':_0x4a3ff7,'details':_0x5377bf});}async[a149_0x22db59(0xc5)](_0x29e354,_0x98c989,_0x5516a5){const _0x3f3e8c=a149_0x22db59,_0xb99dec=Date['now']();this[_0x3f3e8c(0xb5)](_0x29e354,_0x3f3e8c(0xb8)+_0x98c989);try{const _0x5b6b6d=await _0x5516a5(),_0x57dd95=Date[_0x3f3e8c(0x9e)]()-_0xb99dec;return this['success'](_0x29e354,_0x3f3e8c(0xd0)+_0x98c989,_0x57dd95),_0x5b6b6d;}catch(_0x2eb2f2){const _0x2b3f05=Date[_0x3f3e8c(0x9e)]()-_0xb99dec;this[_0x3f3e8c(0x9f)](_0x29e354,_0x3f3e8c(0xa3)+_0x98c989,{'error':_0x2eb2f2 instanceof Error?_0x2eb2f2['message']:String(_0x2eb2f2),'duration':_0x2b3f05});throw _0x2eb2f2;}}[a149_0x22db59(0xa0)](){const _0x13666d=a149_0x22db59;try{if(!a149_0x2a2ec2['existsSync'](this['logFilePath']))return[];const _0x22de7b=a149_0x2a2ec2[_0x13666d(0xb4)](this['logFilePath'],_0x13666d(0xa1));return _0x22de7b['split'](/\r?\n/)[_0x13666d(0xd5)](_0x5a8ceb=>_0x5a8ceb[_0x13666d(0xb7)]())['map'](_0x11121e=>JSON[_0x13666d(0xbd)](_0x11121e));}catch(_0x456707){return console[_0x13666d(0xc8)]('Failed\x20to\x20read\x20logs:',_0x456707),[];}}['clearLogs'](){const _0x1c687c=a149_0x22db59;try{a149_0x2a2ec2['existsSync'](this[_0x1c687c(0xcb)])&&a149_0x2a2ec2[_0x1c687c(0xcc)](this[_0x1c687c(0xcb)],'',_0x1c687c(0xa1));}catch(_0x9749bb){console[_0x1c687c(0xc8)]('Failed\x20to\x20clear\x20logs:',_0x9749bb);}}[a149_0x22db59(0xb6)](){const _0x36fe7f=a149_0x22db59;return this[_0x36fe7f(0xd2)];}}export const logger=new Logger();
@@ -1 +1 @@
1
- const a130_0x261968=a130_0x22dc;function a130_0x22dc(_0x1d4b8d,_0x3266ed){_0x1d4b8d=_0x1d4b8d-0x17a;const _0x10fe90=a130_0x10fe();let _0x22dc47=_0x10fe90[_0x1d4b8d];return _0x22dc47;}(function(_0x303f93,_0xdd544f){const _0x1e63ed=a130_0x22dc,_0xaf2337=_0x303f93();while(!![]){try{const _0x199931=parseInt(_0x1e63ed(0x18f))/0x1*(-parseInt(_0x1e63ed(0x18a))/0x2)+-parseInt(_0x1e63ed(0x18d))/0x3*(-parseInt(_0x1e63ed(0x18e))/0x4)+parseInt(_0x1e63ed(0x189))/0x5*(-parseInt(_0x1e63ed(0x188))/0x6)+-parseInt(_0x1e63ed(0x183))/0x7*(-parseInt(_0x1e63ed(0x17d))/0x8)+parseInt(_0x1e63ed(0x17e))/0x9+parseInt(_0x1e63ed(0x187))/0xa*(parseInt(_0x1e63ed(0x182))/0xb)+-parseInt(_0x1e63ed(0x181))/0xc;if(_0x199931===_0xdd544f)break;else _0xaf2337['push'](_0xaf2337['shift']());}catch(_0x441eed){_0xaf2337['push'](_0xaf2337['shift']());}}}(a130_0x10fe,0x24ded));const JSON_NUMBER_PATTERN=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?/,MAX_SAFE_INTEGER=BigInt(Number[a130_0x261968(0x185)]),MIN_SAFE_INTEGER=BigInt(Number[a130_0x261968(0x17f)]);let restoreResponseJsonParser,responseJsonPrototype,originalResponseJsonDescriptor;function a130_0x10fe(){const _0xd39949=['includes','parse','227547brVtfb','12rmmiEf','5834laRlDK','exec','length','undefined','defineProperty','24kCplmQ','2504403AfCsJD','MIN_SAFE_INTEGER','json','4920660moKYiQ','1302598avDVlh','529473NkXwVx','prototype','MAX_SAFE_INTEGER','slice','10JPVKmQ','6wPhzZs','1421195vbAKKn','2AuqGAb'];a130_0x10fe=function(){return _0xd39949;};return a130_0x10fe();}function isUnsafeIntegerLiteral(_0x1b6914){const _0x1c022f=a130_0x261968;if(_0x1b6914[_0x1c022f(0x18b)]('.')||_0x1b6914[_0x1c022f(0x18b)]('e')||_0x1b6914[_0x1c022f(0x18b)]('E'))return![];const _0x2022ba=BigInt(_0x1b6914);return _0x2022ba>MAX_SAFE_INTEGER||_0x2022ba<MIN_SAFE_INTEGER;}function quoteUnsafeIntegerLiterals(_0x43884a){const _0x4ae850=a130_0x261968;let _0x16a36a='',_0x2cde78=![],_0x44a00d=![];for(let _0x3eb7c8=0x0;_0x3eb7c8<_0x43884a[_0x4ae850(0x17a)];){const _0x488a2f=_0x43884a[_0x3eb7c8];if(_0x2cde78){_0x16a36a+=_0x488a2f,_0x3eb7c8+=0x1;if(_0x44a00d)_0x44a00d=![];else{if(_0x488a2f==='\x5c')_0x44a00d=!![];else _0x488a2f==='\x22'&&(_0x2cde78=![]);}continue;}if(_0x488a2f==='\x22'){_0x2cde78=!![],_0x16a36a+=_0x488a2f,_0x3eb7c8+=0x1;continue;}if(_0x488a2f==='-'||_0x488a2f>='0'&&_0x488a2f<='9'){const _0x133850=JSON_NUMBER_PATTERN[_0x4ae850(0x190)](_0x43884a[_0x4ae850(0x186)](_0x3eb7c8))?.[0x0];if(_0x133850){_0x16a36a+=isUnsafeIntegerLiteral(_0x133850)?'\x22'+_0x133850+'\x22':_0x133850,_0x3eb7c8+=_0x133850[_0x4ae850(0x17a)];continue;}}_0x16a36a+=_0x488a2f,_0x3eb7c8+=0x1;}return _0x16a36a;}export function parseLosslessJson(_0x2ec0f8){const _0x599ab8=a130_0x261968;return JSON[_0x599ab8(0x18c)](quoteUnsafeIntegerLiterals(_0x2ec0f8));}export function installLosslessJsonResponseParser(){const _0x321e4f=a130_0x261968;if(typeof Response===_0x321e4f(0x17b))return()=>{};if(restoreResponseJsonParser)return restoreResponseJsonParser;return responseJsonPrototype=Response[_0x321e4f(0x184)],originalResponseJsonDescriptor=Object['getOwnPropertyDescriptor'](responseJsonPrototype,'json'),Object[_0x321e4f(0x17c)](responseJsonPrototype,_0x321e4f(0x180),{...originalResponseJsonDescriptor??{'configurable':!![],'enumerable':![],'writable':!![]},'value':async function _0x574d46(){return parseLosslessJson(await this['text']());}}),restoreResponseJsonParser=()=>{const _0x56cd00=_0x321e4f;if(!responseJsonPrototype)return;originalResponseJsonDescriptor?Object['defineProperty'](responseJsonPrototype,_0x56cd00(0x180),originalResponseJsonDescriptor):delete responseJsonPrototype['json'],responseJsonPrototype=undefined,originalResponseJsonDescriptor=undefined,restoreResponseJsonParser=undefined;},restoreResponseJsonParser;}export function restoreLosslessJsonResponseParser(){restoreResponseJsonParser?.();}
1
+ const a150_0x24f27a=a150_0x1f14;(function(_0x57835b,_0x5c5fdc){const _0x3559c5=a150_0x1f14,_0x434217=_0x57835b();while(!![]){try{const _0x137386=-parseInt(_0x3559c5(0x84))/0x1+parseInt(_0x3559c5(0x77))/0x2*(parseInt(_0x3559c5(0x7f))/0x3)+-parseInt(_0x3559c5(0x83))/0x4*(-parseInt(_0x3559c5(0x70))/0x5)+parseInt(_0x3559c5(0x73))/0x6*(-parseInt(_0x3559c5(0x7c))/0x7)+parseInt(_0x3559c5(0x7d))/0x8+-parseInt(_0x3559c5(0x7b))/0x9+-parseInt(_0x3559c5(0x82))/0xa*(-parseInt(_0x3559c5(0x80))/0xb);if(_0x137386===_0x5c5fdc)break;else _0x434217['push'](_0x434217['shift']());}catch(_0x519316){_0x434217['push'](_0x434217['shift']());}}}(a150_0x34a2,0x21ddc));const JSON_NUMBER_PATTERN=/^-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?/,MAX_SAFE_INTEGER=BigInt(Number['MAX_SAFE_INTEGER']),MIN_SAFE_INTEGER=BigInt(Number[a150_0x24f27a(0x7e)]);function a150_0x34a2(){const _0x47fbef=['prototype','json','undefined','2eirEfa','length','text','parse','297576JVgewn','154952VjVTVY','695432cnDRsr','MIN_SAFE_INTEGER','15501kMIyBD','2714558Ssfbpi','defineProperty','10nrYrmG','73552mUlyKA','199418yhMgKl','75gSXrAq','exec','includes','66AqLWdf'];a150_0x34a2=function(){return _0x47fbef;};return a150_0x34a2();}let restoreResponseJsonParser,responseJsonPrototype,originalResponseJsonDescriptor;function a150_0x1f14(_0x5cc568,_0x5e9468){_0x5cc568=_0x5cc568-0x70;const _0x34a253=a150_0x34a2();let _0x1f142d=_0x34a253[_0x5cc568];return _0x1f142d;}function isUnsafeIntegerLiteral(_0x2182e7){const _0x12a849=a150_0x24f27a;if(_0x2182e7[_0x12a849(0x72)]('.')||_0x2182e7['includes']('e')||_0x2182e7[_0x12a849(0x72)]('E'))return![];const _0x553e17=BigInt(_0x2182e7);return _0x553e17>MAX_SAFE_INTEGER||_0x553e17<MIN_SAFE_INTEGER;}function quoteUnsafeIntegerLiterals(_0x412370){const _0x15b6dc=a150_0x24f27a;let _0xcf693a='',_0x256c27=![],_0x5415b7=![];for(let _0x4dad82=0x0;_0x4dad82<_0x412370[_0x15b6dc(0x78)];){const _0x34d7e1=_0x412370[_0x4dad82];if(_0x256c27){_0xcf693a+=_0x34d7e1,_0x4dad82+=0x1;if(_0x5415b7)_0x5415b7=![];else{if(_0x34d7e1==='\x5c')_0x5415b7=!![];else _0x34d7e1==='\x22'&&(_0x256c27=![]);}continue;}if(_0x34d7e1==='\x22'){_0x256c27=!![],_0xcf693a+=_0x34d7e1,_0x4dad82+=0x1;continue;}if(_0x34d7e1==='-'||_0x34d7e1>='0'&&_0x34d7e1<='9'){const _0x49c541=JSON_NUMBER_PATTERN[_0x15b6dc(0x71)](_0x412370['slice'](_0x4dad82))?.[0x0];if(_0x49c541){_0xcf693a+=isUnsafeIntegerLiteral(_0x49c541)?'\x22'+_0x49c541+'\x22':_0x49c541,_0x4dad82+=_0x49c541[_0x15b6dc(0x78)];continue;}}_0xcf693a+=_0x34d7e1,_0x4dad82+=0x1;}return _0xcf693a;}export function parseLosslessJson(_0x5b5d54){const _0x3a1ac8=a150_0x24f27a;return JSON[_0x3a1ac8(0x7a)](quoteUnsafeIntegerLiterals(_0x5b5d54));}export function installLosslessJsonResponseParser(){const _0x3d40bd=a150_0x24f27a;if(typeof Response===_0x3d40bd(0x76))return()=>{};if(restoreResponseJsonParser)return restoreResponseJsonParser;return responseJsonPrototype=Response[_0x3d40bd(0x74)],originalResponseJsonDescriptor=Object['getOwnPropertyDescriptor'](responseJsonPrototype,_0x3d40bd(0x75)),Object[_0x3d40bd(0x81)](responseJsonPrototype,'json',{...originalResponseJsonDescriptor??{'configurable':!![],'enumerable':![],'writable':!![]},'value':async function _0x24de6a(){const _0x27f86d=_0x3d40bd;return parseLosslessJson(await this[_0x27f86d(0x79)]());}}),restoreResponseJsonParser=()=>{const _0xc10625=_0x3d40bd;if(!responseJsonPrototype)return;originalResponseJsonDescriptor?Object[_0xc10625(0x81)](responseJsonPrototype,_0xc10625(0x75),originalResponseJsonDescriptor):delete responseJsonPrototype[_0xc10625(0x75)],responseJsonPrototype=undefined,originalResponseJsonDescriptor=undefined,restoreResponseJsonParser=undefined;},restoreResponseJsonParser;}export function restoreLosslessJsonResponseParser(){restoreResponseJsonParser?.();}
@@ -1 +1 @@
1
- (function(_0x35845c,_0x33eb38){const _0xca7004=a131_0x33ca,_0x301453=_0x35845c();while(!![]){try{const _0xaf420f=parseInt(_0xca7004(0x1bd))/0x1+-parseInt(_0xca7004(0x1c8))/0x2*(parseInt(_0xca7004(0x1b2))/0x3)+-parseInt(_0xca7004(0x1b3))/0x4*(parseInt(_0xca7004(0x1cc))/0x5)+parseInt(_0xca7004(0x1cd))/0x6*(-parseInt(_0xca7004(0x1b7))/0x7)+parseInt(_0xca7004(0x1c0))/0x8+parseInt(_0xca7004(0x1c1))/0x9*(parseInt(_0xca7004(0x1cb))/0xa)+-parseInt(_0xca7004(0x1af))/0xb*(-parseInt(_0xca7004(0x1c9))/0xc);if(_0xaf420f===_0x33eb38)break;else _0x301453['push'](_0x301453['shift']());}catch(_0x12aee8){_0x301453['push'](_0x301453['shift']());}}}(a131_0x307c,0xc429f));import{CliErrors}from'../errors.js';import{parseLosslessJson}from'../utils/lossless-json.js';export const MAX_DATA_UPDATE_IDS=0x3e8;export function parseJsonParams(_0x24e47c){const _0xd01b37=a131_0x33ca;if(!_0x24e47c)return undefined;try{return parseLosslessJson(_0x24e47c);}catch{throw CliErrors[_0xd01b37(0x1b6)]('Invalid\x20JSON\x20for\x20--params:\x20'+_0x24e47c);}}function a131_0x307c(){const _0x185f70=['4060048TXITeu','10647pexVLn','data\x20update\x20id\x20array\x20cannot\x20be\x20empty.','id[','isArray','string','data\x20update\x20--params\x20must\x20be\x20a\x20JSON\x20object\x20with\x20id.','Example:\x20--params\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22done\x22}\x27','2gIhRkB','312qHJDsN','\x20records\x20per\x20call;\x20received\x20','7120fTTTNA','65IxyHdC','282TJrKSj','isSafeInteger','data\x20update\x20requires\x20\x22id\x22\x20in\x20--params.','1072555WhIXIP','length','batchCreate\x20--params\x20must\x20be\x20a\x20JSON\x20array\x20or\x20{\x22items\x22:[...]}','2599770nTCblq','475784qGfKEy','data\x20update\x20--params.','items','validation','168973OUDolY','object','Example:\x20--params\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','data\x20update\x20can\x20update\x20at\x20most\x20','map','join','465976kMkbZn','number','Invalid\x20JSON\x20for\x20--params:\x20'];a131_0x307c=function(){return _0x185f70;};return a131_0x307c();}export function parseJsonParamsValue(_0x5c5ed2){const _0x97eed5=a131_0x33ca;if(!_0x5c5ed2)return undefined;try{return parseLosslessJson(_0x5c5ed2);}catch{throw CliErrors['validation'](_0x97eed5(0x1bf)+_0x5c5ed2);}}export function parseBatchCreateItemsFromParams(_0x1720d6){const _0x215db4=a131_0x33ca;if(Array[_0x215db4(0x1c4)](_0x1720d6))return _0x1720d6;if(_0x1720d6!==null&&_0x1720d6!==undefined&&typeof _0x1720d6===_0x215db4(0x1b8)&&Array['isArray'](_0x1720d6['items']))return _0x1720d6[_0x215db4(0x1b5)];throw CliErrors[_0x215db4(0x1b6)](_0x215db4(0x1b1),_0x215db4(0x1b9));}function parseDataUpdateId(_0x11bc50,_0xc847b8){const _0x5be3a1=a131_0x33ca;if(typeof _0x11bc50===_0x5be3a1(0x1be)&&Number[_0x5be3a1(0x1ce)](_0x11bc50)&&_0x11bc50>0x0)return _0x11bc50;if(typeof _0x11bc50===_0x5be3a1(0x1c5)){if(/^[1-9]\d*$/['test'](_0x11bc50))return _0x11bc50;}throw CliErrors[_0x5be3a1(0x1b6)](_0x5be3a1(0x1b4)+_0xc847b8+'\x20must\x20be\x20a\x20positive\x20integer\x20or\x20numeric\x20string.');}function a131_0x33ca(_0x2c3967,_0x71a010){_0x2c3967=_0x2c3967-0x1ae;const _0x307cff=a131_0x307c();let _0x33ca2e=_0x307cff[_0x2c3967];return _0x33ca2e;}export function parseUpdateIdsFromParams(_0x33d8ed){const _0x1e6329=a131_0x33ca;if(_0x33d8ed===null||_0x33d8ed===undefined||typeof _0x33d8ed!==_0x1e6329(0x1b8)||Array['isArray'](_0x33d8ed))throw CliErrors[_0x1e6329(0x1b6)](_0x1e6329(0x1c6),_0x1e6329(0x1c7));const _0x27b9f2=_0x33d8ed['id'];if(_0x27b9f2===undefined||_0x27b9f2===null)throw CliErrors[_0x1e6329(0x1b6)](_0x1e6329(0x1ae),_0x1e6329(0x1c7));const _0x34ede0=Array['isArray'](_0x27b9f2)?_0x27b9f2:[_0x27b9f2];if(_0x34ede0[_0x1e6329(0x1b0)]===0x0)throw CliErrors[_0x1e6329(0x1b6)](_0x1e6329(0x1c2));if(_0x34ede0[_0x1e6329(0x1b0)]>MAX_DATA_UPDATE_IDS)throw CliErrors[_0x1e6329(0x1b6)](_0x1e6329(0x1ba)+MAX_DATA_UPDATE_IDS+_0x1e6329(0x1ca)+_0x34ede0[_0x1e6329(0x1b0)]+'.');return _0x34ede0[_0x1e6329(0x1bb)]((_0x3ec57f,_0x3ffece)=>parseDataUpdateId(_0x3ec57f,Array['isArray'](_0x27b9f2)?_0x1e6329(0x1c3)+_0x3ffece+']':'id'));}export function normalizeUpdateParamsForRuntime(_0x20c5ba,_0x4d09a1){const _0xcd6969=a131_0x33ca;if(Array[_0xcd6969(0x1c4)](_0x20c5ba['id'])&&_0x4d09a1[_0xcd6969(0x1b0)]>0x1)return{..._0x20c5ba,'id':_0x4d09a1[_0xcd6969(0x1bc)](',')};return _0x20c5ba;}
1
+ (function(_0x3cfea1,_0x2d86e0){const _0x5c35a4=a151_0x46f4,_0x592932=_0x3cfea1();while(!![]){try{const _0xcbd620=parseInt(_0x5c35a4(0xce))/0x1*(parseInt(_0x5c35a4(0xd3))/0x2)+-parseInt(_0x5c35a4(0xd7))/0x3*(-parseInt(_0x5c35a4(0xc6))/0x4)+parseInt(_0x5c35a4(0xc2))/0x5+parseInt(_0x5c35a4(0xd0))/0x6+parseInt(_0x5c35a4(0xc5))/0x7*(-parseInt(_0x5c35a4(0xc4))/0x8)+parseInt(_0x5c35a4(0xd2))/0x9*(-parseInt(_0x5c35a4(0xd1))/0xa)+-parseInt(_0x5c35a4(0xcb))/0xb;if(_0xcbd620===_0x2d86e0)break;else _0x592932['push'](_0x592932['shift']());}catch(_0x5a713e){_0x592932['push'](_0x592932['shift']());}}}(a151_0x2f33,0xad591));import{CliErrors}from'../errors.js';import{parseLosslessJson}from'../utils/lossless-json.js';function a151_0x2f33(){const _0x3fff15=['data\x20update\x20--params.','8210328YSYnyO','563430lfBJHm','45GiFLZx','61478eRryQE','Invalid\x20JSON\x20for\x20--params:\x20','isArray','number','308001XhGGwV','test','data\x20update\x20id\x20array\x20cannot\x20be\x20empty.','items','data\x20update\x20--params\x20must\x20be\x20a\x20JSON\x20object\x20with\x20id.','batchCreate\x20--params\x20must\x20be\x20a\x20JSON\x20array\x20or\x20{\x22items\x22:[...]}','data\x20update\x20can\x20update\x20at\x20most\x20','447555eWgLwi','validation','9664KfbtCk','5327XGvaED','44QqsZfK','object','length','Example:\x20--params\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22done\x22}\x27','\x20must\x20be\x20a\x20positive\x20integer\x20or\x20numeric\x20string.','9805103ahVyRA','id[','Example:\x20--params\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','7IHLCkI'];a151_0x2f33=function(){return _0x3fff15;};return a151_0x2f33();}export const MAX_DATA_UPDATE_IDS=0x3e8;function a151_0x46f4(_0x5d33b1,_0x21e827){_0x5d33b1=_0x5d33b1-0xc2;const _0x2f3396=a151_0x2f33();let _0x46f46b=_0x2f3396[_0x5d33b1];return _0x46f46b;}export function parseJsonParams(_0x351292){const _0x191711=a151_0x46f4;if(!_0x351292)return undefined;try{return parseLosslessJson(_0x351292);}catch{throw CliErrors[_0x191711(0xc3)](_0x191711(0xd4)+_0x351292);}}export function parseJsonParamsValue(_0x42838f){const _0xface29=a151_0x46f4;if(!_0x42838f)return undefined;try{return parseLosslessJson(_0x42838f);}catch{throw CliErrors[_0xface29(0xc3)](_0xface29(0xd4)+_0x42838f);}}export function parseBatchCreateItemsFromParams(_0x16523e){const _0x3ce304=a151_0x46f4;if(Array[_0x3ce304(0xd5)](_0x16523e))return _0x16523e;if(_0x16523e!==null&&_0x16523e!==undefined&&typeof _0x16523e===_0x3ce304(0xc7)&&Array['isArray'](_0x16523e[_0x3ce304(0xda)]))return _0x16523e['items'];throw CliErrors[_0x3ce304(0xc3)](_0x3ce304(0xdc),_0x3ce304(0xcd));}function parseDataUpdateId(_0x259c9f,_0x30224a){const _0x3fbfcd=a151_0x46f4;if(typeof _0x259c9f===_0x3fbfcd(0xd6)&&Number['isSafeInteger'](_0x259c9f)&&_0x259c9f>0x0)return _0x259c9f;if(typeof _0x259c9f==='string'){if(/^[1-9]\d*$/[_0x3fbfcd(0xd8)](_0x259c9f))return _0x259c9f;}throw CliErrors[_0x3fbfcd(0xc3)](_0x3fbfcd(0xcf)+_0x30224a+_0x3fbfcd(0xca));}export function parseUpdateIdsFromParams(_0x4dcd5a){const _0x2aafcd=a151_0x46f4;if(_0x4dcd5a===null||_0x4dcd5a===undefined||typeof _0x4dcd5a!=='object'||Array['isArray'](_0x4dcd5a))throw CliErrors[_0x2aafcd(0xc3)](_0x2aafcd(0xdb),_0x2aafcd(0xc9));const _0x2319a5=_0x4dcd5a['id'];if(_0x2319a5===undefined||_0x2319a5===null)throw CliErrors[_0x2aafcd(0xc3)]('data\x20update\x20requires\x20\x22id\x22\x20in\x20--params.','Example:\x20--params\x20\x27{\x22id\x22:[1,2,3],\x22status\x22:\x22done\x22}\x27');const _0x4a7946=Array[_0x2aafcd(0xd5)](_0x2319a5)?_0x2319a5:[_0x2319a5];if(_0x4a7946[_0x2aafcd(0xc8)]===0x0)throw CliErrors[_0x2aafcd(0xc3)](_0x2aafcd(0xd9));if(_0x4a7946[_0x2aafcd(0xc8)]>MAX_DATA_UPDATE_IDS)throw CliErrors[_0x2aafcd(0xc3)](_0x2aafcd(0xdd)+MAX_DATA_UPDATE_IDS+'\x20records\x20per\x20call;\x20received\x20'+_0x4a7946[_0x2aafcd(0xc8)]+'.');return _0x4a7946['map']((_0x592633,_0x56ba04)=>parseDataUpdateId(_0x592633,Array[_0x2aafcd(0xd5)](_0x2319a5)?_0x2aafcd(0xcc)+_0x56ba04+']':'id'));}export function normalizeUpdateParamsForRuntime(_0x395b95,_0x5abc98){const _0x55b090=a151_0x46f4;if(Array[_0x55b090(0xd5)](_0x395b95['id'])&&_0x5abc98[_0x55b090(0xc8)]>0x1)return{..._0x395b95,'id':_0x5abc98['join'](',')};return _0x395b95;}
@@ -1 +1 @@
1
- const a132_0x25bc3d=a132_0x5c2e;function a132_0x5c2e(_0x59c92a,_0x2a626f){_0x59c92a=_0x59c92a-0x6a;const _0x236f3c=a132_0x236f();let _0x5c2e75=_0x236f3c[_0x59c92a];return _0x5c2e75;}function a132_0x236f(){const _0x433c42=['4357832GrWEPy','142422TaREvw','3696760JvSUcV','993606mtqcyj','6818735FWltbF','win32','11qJFfMc','6EdWBOd','platform','35WNwFDT','.cmd','3150595HeWSzz','9nCSLty','2042776sGCAAO'];a132_0x236f=function(){return _0x433c42;};return a132_0x236f();}(function(_0x5ad379,_0x42bef7){const _0x299ae4=a132_0x5c2e,_0x2a9a06=_0x5ad379();while(!![]){try{const _0x245316=-parseInt(_0x299ae4(0x76))/0x1*(-parseInt(_0x299ae4(0x71))/0x2)+parseInt(_0x299ae4(0x77))/0x3*(parseInt(_0x299ae4(0x6f))/0x4)+parseInt(_0x299ae4(0x6b))/0x5*(-parseInt(_0x299ae4(0x73))/0x6)+parseInt(_0x299ae4(0x6d))/0x7+parseInt(_0x299ae4(0x70))/0x8+-parseInt(_0x299ae4(0x6e))/0x9*(parseInt(_0x299ae4(0x72))/0xa)+-parseInt(_0x299ae4(0x74))/0xb;if(_0x245316===_0x42bef7)break;else _0x2a9a06['push'](_0x2a9a06['shift']());}catch(_0x456438){_0x2a9a06['push'](_0x2a9a06['shift']());}}}(a132_0x236f,0x9ee03));export const isWindows=process[a132_0x25bc3d(0x6a)]===a132_0x25bc3d(0x75);export function resolveNpmBin(_0x1172d8){const _0x1bf4ec=a132_0x25bc3d;return isWindows?_0x1172d8+_0x1bf4ec(0x6c):_0x1172d8;}
1
+ const a152_0x36257b=a152_0x1ace;(function(_0x5db5e6,_0x21b445){const _0x4b0ceb=a152_0x1ace,_0x4b11ba=_0x5db5e6();while(!![]){try{const _0x2bbf3c=parseInt(_0x4b0ceb(0x6d))/0x1*(parseInt(_0x4b0ceb(0x75))/0x2)+parseInt(_0x4b0ceb(0x77))/0x3*(-parseInt(_0x4b0ceb(0x74))/0x4)+-parseInt(_0x4b0ceb(0x76))/0x5+parseInt(_0x4b0ceb(0x72))/0x6*(-parseInt(_0x4b0ceb(0x6f))/0x7)+-parseInt(_0x4b0ceb(0x6e))/0x8+-parseInt(_0x4b0ceb(0x71))/0x9+parseInt(_0x4b0ceb(0x70))/0xa;if(_0x2bbf3c===_0x21b445)break;else _0x4b11ba['push'](_0x4b11ba['shift']());}catch(_0x5c4938){_0x4b11ba['push'](_0x4b11ba['shift']());}}}(a152_0x3792,0x86b5a));function a152_0x1ace(_0x4ada19,_0x21b527){_0x4ada19=_0x4ada19-0x6d;const _0x3792cd=a152_0x3792();let _0x1aced7=_0x3792cd[_0x4ada19];return _0x1aced7;}function a152_0x3792(){const _0x321970=['31863770VLrvlh','1999665mXtAYI','18gEIfKU','.cmd','550456mTGsbl','1138exTkgj','3642140yASHuo','12YmCDBm','win32','157KWRgzA','6758080Mubdlk','882259Rlgmwg'];a152_0x3792=function(){return _0x321970;};return a152_0x3792();}export const isWindows=process['platform']===a152_0x36257b(0x78);export function resolveNpmBin(_0x3c763a){const _0x3e8426=a152_0x36257b;return isWindows?_0x3c763a+_0x3e8426(0x73):_0x3c763a;}
@@ -1 +1 @@
1
- (function(_0x293cff,_0x1a2384){const _0x34aebc=a133_0x59c0,_0x152398=_0x293cff();while(!![]){try{const _0x847c8=parseInt(_0x34aebc(0x1f0))/0x1+parseInt(_0x34aebc(0x1e9))/0x2*(parseInt(_0x34aebc(0x1e6))/0x3)+-parseInt(_0x34aebc(0x1ec))/0x4*(-parseInt(_0x34aebc(0x1ee))/0x5)+-parseInt(_0x34aebc(0x1d2))/0x6+parseInt(_0x34aebc(0x1de))/0x7+parseInt(_0x34aebc(0x1d7))/0x8*(parseInt(_0x34aebc(0x1ed))/0x9)+parseInt(_0x34aebc(0x1e0))/0xa*(-parseInt(_0x34aebc(0x1e8))/0xb);if(_0x847c8===_0x1a2384)break;else _0x152398['push'](_0x152398['shift']());}catch(_0x581a51){_0x152398['push'](_0x152398['shift']());}}}(a133_0x7ffc,0x71d00));function a133_0x59c0(_0x5311ab,_0xba5c0b){_0x5311ab=_0x5311ab-0x1ce;const _0x7ffc3=a133_0x7ffc();let _0x59c070=_0x7ffc3[_0x5311ab];return _0x59c070;}import{mkdir,readFile,writeFile}from'node:fs/promises';import{homedir}from'node:os';import{dirname,join}from'node:path';import{LOVRABET_NPM_PACKAGE_NAME,NPM_REGISTRY_BASE_URL}from'../constant/distribution.js';function a133_0x7ffc(){const _0x508027=['yes','5046PhXieK','lastNotifiedAt','145288UmZBEF','522ehhrzW','true','major','4jfDncX','18uIeVlP','44645cwRiqc','prerelease','842828jVljtU','lovrabet-cli','entries',',\x20run:\x20','object','trim','/v/','stringify','3387996ThEApw','checkedAt','/dist-tags','Invalid\x20semver','json','713784nZIhnY','lastNotifiedVersion','\x20available,\x20current\x20','number','now','https://www.npmjs.com/package/','match','5252499auYKvY','timeout','900GCQOiI','latest','string','utf8','.cache'];a133_0x7ffc=function(){return _0x508027;};return a133_0x7ffc();}import{CLI_BIN_NAME}from'../constant/cli.js';import{getCliVersion}from'../utils/version.js';const UPDATE_CHECK_TTL_MS=0xc*0x3c*0x3c*0x3e8,UPDATE_NOTICE_TTL_MS=0x18*0x3c*0x3c*0x3e8;function parseSemver(_0x2ea61e){const _0x54d7df=a133_0x59c0,_0x3a64de=_0x2ea61e[_0x54d7df(0x1cf)]()[_0x54d7df(0x1dd)](/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);if(!_0x3a64de)return null;return{'major':Number(_0x3a64de[0x1]),'minor':Number(_0x3a64de[0x2]),'patch':Number(_0x3a64de[0x3]),'prerelease':_0x3a64de[0x4]};}function compareSemver(_0x58d970,_0x4e626c){const _0x843ec4=a133_0x59c0,_0x2aa545=parseSemver(_0x58d970),_0x457f2f=parseSemver(_0x4e626c);if(!_0x2aa545||!_0x457f2f)throw new Error(_0x843ec4(0x1d5));for(const _0x9ce7c8 of[_0x843ec4(0x1eb),'minor','patch']){if(_0x2aa545[_0x9ce7c8]<_0x457f2f[_0x9ce7c8])return-0x1;if(_0x2aa545[_0x9ce7c8]>_0x457f2f[_0x9ce7c8])return 0x1;}if(!_0x2aa545[_0x843ec4(0x1ef)]&&!_0x457f2f[_0x843ec4(0x1ef)])return 0x0;if(!_0x2aa545[_0x843ec4(0x1ef)])return 0x1;if(!_0x457f2f[_0x843ec4(0x1ef)])return-0x1;if(_0x2aa545['prerelease']===_0x457f2f[_0x843ec4(0x1ef)])return 0x0;return _0x2aa545[_0x843ec4(0x1ef)]<_0x457f2f['prerelease']?-0x1:0x1;}function isUpdateNoticeDisabled(){const _0x8d62a=a133_0x59c0,_0x51204d=process.env.LOVRABET_NO_UPDATE_NOTICE?.[_0x8d62a(0x1cf)]()['toLowerCase']();return _0x51204d==='1'||_0x51204d===_0x8d62a(0x1ea)||_0x51204d===_0x8d62a(0x1e5);}function cacheRoot(){const _0x418b20=a133_0x59c0;return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),_0x418b20(0x1e4));}export function getUpdateNoticeCachePath(){const _0x45b375=a133_0x59c0;return join(cacheRoot(),_0x45b375(0x1f1),'update-check.json');}async function readUpdateNoticeCache(){const _0x4fe55e=a133_0x59c0;try{const _0x12d884=await readFile(getUpdateNoticeCachePath(),_0x4fe55e(0x1e3)),_0x4082a1=JSON['parse'](_0x12d884);if(!_0x4082a1||typeof _0x4082a1!==_0x4fe55e(0x1ce))return{};return _0x4082a1;}catch{return{};}}async function writeUpdateNoticeCache(_0x5c42ee){const _0x2b13d7=a133_0x59c0;try{const _0x36c811=getUpdateNoticeCachePath();await mkdir(dirname(_0x36c811),{'recursive':!![]}),await writeFile(_0x36c811,JSON[_0x2b13d7(0x1d1)](_0x5c42ee,null,0x2)+'\x0a','utf8');}catch{}}function isFreshCheck(_0x103b3d,_0x59314d){const _0x1e63ea=a133_0x59c0;return typeof _0x103b3d['checkedAt']===_0x1e63ea(0x1da)&&_0x59314d-_0x103b3d[_0x1e63ea(0x1d3)]<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x5d2fea,_0x4fef15,_0x441e6a){const _0x1613f3=a133_0x59c0;return _0x5d2fea[_0x1613f3(0x1d8)]===_0x4fef15&&typeof _0x5d2fea[_0x1613f3(0x1e7)]===_0x1613f3(0x1da)&&_0x441e6a-_0x5d2fea['lastNotifiedAt']<UPDATE_NOTICE_TTL_MS;}async function fetchNpmDistTags(_0x12297b=0x5dc){const _0x333603=a133_0x59c0;try{const _0x1f1565=NPM_REGISTRY_BASE_URL+'/-/package/'+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x333603(0x1d4),_0x19d362=await fetch(_0x1f1565,{'signal':AbortSignal[_0x333603(0x1df)](_0x12297b)});if(!_0x19d362['ok'])return null;const _0x56e8f3=await _0x19d362[_0x333603(0x1d6)]();if(!_0x56e8f3||typeof _0x56e8f3!==_0x333603(0x1ce))return null;return Object['fromEntries'](Object[_0x333603(0x1f2)](_0x56e8f3)['filter'](([,_0x124ab3])=>typeof _0x124ab3===_0x333603(0x1e2)&&_0x124ab3[_0x333603(0x1cf)]())['map'](([_0x4a9e1a,_0x9b6c11])=>[_0x4a9e1a,String(_0x9b6c11)[_0x333603(0x1cf)]()]));}catch{return null;}}export function buildNpmVersionUrl(_0xfc6490){const _0x6398c2=a133_0x59c0;return _0x6398c2(0x1dc)+LOVRABET_NPM_PACKAGE_NAME+_0x6398c2(0x1d0)+_0xfc6490;}export async function resolveLatestUpdateNotice(){const _0x4cbb29=a133_0x59c0;if(isUpdateNoticeDisabled())return null;try{const _0x1a4632=Date[_0x4cbb29(0x1db)](),_0x2b038c=getCliVersion(),_0x3d0f56=await readUpdateNoticeCache();let _0x1c3cbc=isFreshCheck(_0x3d0f56,_0x1a4632)?_0x3d0f56[_0x4cbb29(0x1e1)]?.[_0x4cbb29(0x1cf)]():undefined;if(!_0x1c3cbc&&!isFreshCheck(_0x3d0f56,_0x1a4632)){const _0x504f61=await fetchNpmDistTags();_0x1c3cbc=_0x504f61?.[_0x4cbb29(0x1e1)]?.[_0x4cbb29(0x1cf)](),await writeUpdateNoticeCache({..._0x3d0f56,'checkedAt':_0x1a4632,'latest':_0x1c3cbc,'failed':!_0x1c3cbc});}if(!_0x1c3cbc||compareSemver(_0x2b038c,_0x1c3cbc)>=0x0)return null;if(isRecentlyNotified(_0x3d0f56,_0x1c3cbc,_0x1a4632))return null;const _0x4fe427=CLI_BIN_NAME+'\x20update';return await writeUpdateNoticeCache({..._0x3d0f56,'checkedAt':isFreshCheck(_0x3d0f56,_0x1a4632)?_0x3d0f56['checkedAt']:_0x1a4632,'latest':_0x1c3cbc,'failed':![],'lastNotifiedVersion':_0x1c3cbc,'lastNotifiedAt':_0x1a4632}),{'command':_0x4fe427,'current':_0x2b038c,'latest':_0x1c3cbc,'url':buildNpmVersionUrl(_0x1c3cbc),'message':CLI_BIN_NAME+'\x20'+_0x1c3cbc+_0x4cbb29(0x1d9)+_0x2b038c+_0x4cbb29(0x1f3)+_0x4fe427};}catch{return null;}}
1
+ (function(_0x218295,_0x50af71){const _0x44391f=a153_0x1a18,_0x7810d0=_0x218295();while(!![]){try{const _0x1092d1=parseInt(_0x44391f(0xfd))/0x1*(parseInt(_0x44391f(0xf6))/0x2)+-parseInt(_0x44391f(0x112))/0x3+parseInt(_0x44391f(0x101))/0x4+-parseInt(_0x44391f(0xf8))/0x5+parseInt(_0x44391f(0xfa))/0x6+-parseInt(_0x44391f(0x116))/0x7+parseInt(_0x44391f(0x107))/0x8;if(_0x1092d1===_0x50af71)break;else _0x7810d0['push'](_0x7810d0['shift']());}catch(_0x21fd23){_0x7810d0['push'](_0x7810d0['shift']());}}}(a153_0xdbdd,0x6a87a));import{mkdir,readFile,writeFile}from'node:fs/promises';import{homedir}from'node:os';import{dirname,join}from'node:path';import{LOVRABET_NPM_PACKAGE_NAME,NPM_REGISTRY_BASE_URL}from'../constant/distribution.js';function a153_0xdbdd(){const _0x3b51c7=['\x20update','3575844NobQPJ','checkedAt','Invalid\x20semver','103xuOWmn','true','major','yes','1820724VUvJpu','minor','latest',',\x20run:\x20','number','prerelease','6413312eqeXPL','json','trim','object','lastNotifiedAt','/v/','\x20available,\x20current\x20','fromEntries','now','timeout','patch','1034979HCUiDo','filter','/dist-tags','update-check.json','5477150oozCeW','/-/package/','map','string','6866qSXFUl','.cache','3213145VuOgXm'];a153_0xdbdd=function(){return _0x3b51c7;};return a153_0xdbdd();}import{CLI_BIN_NAME}from'../constant/cli.js';import{getCliVersion}from'../utils/version.js';const UPDATE_CHECK_TTL_MS=0xc*0x3c*0x3c*0x3e8,UPDATE_NOTICE_TTL_MS=0x18*0x3c*0x3c*0x3e8;function parseSemver(_0xe7e3e6){const _0x1ac624=a153_0x1a18,_0x309738=_0xe7e3e6[_0x1ac624(0x109)]()['match'](/^(\d+)\.(\d+)\.(\d+)(?:-([0-9A-Za-z.-]+))?$/);if(!_0x309738)return null;return{'major':Number(_0x309738[0x1]),'minor':Number(_0x309738[0x2]),'patch':Number(_0x309738[0x3]),'prerelease':_0x309738[0x4]};}function a153_0x1a18(_0x1ca3c6,_0x5a5590){_0x1ca3c6=_0x1ca3c6-0xf3;const _0xdbdd69=a153_0xdbdd();let _0x1a18a3=_0xdbdd69[_0x1ca3c6];return _0x1a18a3;}function compareSemver(_0x4a47d6,_0x1fc3b2){const _0x23cb92=a153_0x1a18,_0x402dc1=parseSemver(_0x4a47d6),_0x477f85=parseSemver(_0x1fc3b2);if(!_0x402dc1||!_0x477f85)throw new Error(_0x23cb92(0xfc));for(const _0x4a5737 of[_0x23cb92(0xff),_0x23cb92(0x102),_0x23cb92(0x111)]){if(_0x402dc1[_0x4a5737]<_0x477f85[_0x4a5737])return-0x1;if(_0x402dc1[_0x4a5737]>_0x477f85[_0x4a5737])return 0x1;}if(!_0x402dc1['prerelease']&&!_0x477f85[_0x23cb92(0x106)])return 0x0;if(!_0x402dc1[_0x23cb92(0x106)])return 0x1;if(!_0x477f85['prerelease'])return-0x1;if(_0x402dc1[_0x23cb92(0x106)]===_0x477f85['prerelease'])return 0x0;return _0x402dc1[_0x23cb92(0x106)]<_0x477f85['prerelease']?-0x1:0x1;}function isUpdateNoticeDisabled(){const _0x47bb6f=a153_0x1a18,_0x542f12=process.env.LOVRABET_NO_UPDATE_NOTICE?.[_0x47bb6f(0x109)]()['toLowerCase']();return _0x542f12==='1'||_0x542f12===_0x47bb6f(0xfe)||_0x542f12===_0x47bb6f(0x100);}function cacheRoot(){const _0x46495d=a153_0x1a18;return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),_0x46495d(0xf7));}export function getUpdateNoticeCachePath(){const _0x33a594=a153_0x1a18;return join(cacheRoot(),'lovrabet-cli',_0x33a594(0x115));}async function readUpdateNoticeCache(){const _0x14353a=a153_0x1a18;try{const _0x1cf84e=await readFile(getUpdateNoticeCachePath(),'utf8'),_0x2ddab7=JSON['parse'](_0x1cf84e);if(!_0x2ddab7||typeof _0x2ddab7!==_0x14353a(0x10a))return{};return _0x2ddab7;}catch{return{};}}async function writeUpdateNoticeCache(_0x2f420d){try{const _0x19029a=getUpdateNoticeCachePath();await mkdir(dirname(_0x19029a),{'recursive':!![]}),await writeFile(_0x19029a,JSON['stringify'](_0x2f420d,null,0x2)+'\x0a','utf8');}catch{}}function isFreshCheck(_0x243f8d,_0x57409e){const _0x4ac802=a153_0x1a18;return typeof _0x243f8d[_0x4ac802(0xfb)]===_0x4ac802(0x105)&&_0x57409e-_0x243f8d[_0x4ac802(0xfb)]<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x1139e4,_0x10dbc7,_0x4acd85){const _0xb66904=a153_0x1a18;return _0x1139e4['lastNotifiedVersion']===_0x10dbc7&&typeof _0x1139e4[_0xb66904(0x10b)]==='number'&&_0x4acd85-_0x1139e4[_0xb66904(0x10b)]<UPDATE_NOTICE_TTL_MS;}async function fetchNpmDistTags(_0x2639b5=0x5dc){const _0x466bad=a153_0x1a18;try{const _0x3fb6ff=NPM_REGISTRY_BASE_URL+_0x466bad(0xf3)+encodeURIComponent(LOVRABET_NPM_PACKAGE_NAME)+_0x466bad(0x114),_0x3aa0f1=await fetch(_0x3fb6ff,{'signal':AbortSignal[_0x466bad(0x110)](_0x2639b5)});if(!_0x3aa0f1['ok'])return null;const _0x3c59a4=await _0x3aa0f1[_0x466bad(0x108)]();if(!_0x3c59a4||typeof _0x3c59a4!==_0x466bad(0x10a))return null;return Object[_0x466bad(0x10e)](Object['entries'](_0x3c59a4)[_0x466bad(0x113)](([,_0xa3bc23])=>typeof _0xa3bc23===_0x466bad(0xf5)&&_0xa3bc23[_0x466bad(0x109)]())[_0x466bad(0xf4)](([_0x29a117,_0x532a1d])=>[_0x29a117,String(_0x532a1d)[_0x466bad(0x109)]()]));}catch{return null;}}export function buildNpmVersionUrl(_0x224c69){const _0x598451=a153_0x1a18;return'https://www.npmjs.com/package/'+LOVRABET_NPM_PACKAGE_NAME+_0x598451(0x10c)+_0x224c69;}export async function resolveLatestUpdateNotice(){const _0x1f0896=a153_0x1a18;if(isUpdateNoticeDisabled())return null;try{const _0x5e84a0=Date[_0x1f0896(0x10f)](),_0x155556=getCliVersion(),_0x29e8d5=await readUpdateNoticeCache();let _0x11f1e2=isFreshCheck(_0x29e8d5,_0x5e84a0)?_0x29e8d5[_0x1f0896(0x103)]?.[_0x1f0896(0x109)]():undefined;if(!_0x11f1e2&&!isFreshCheck(_0x29e8d5,_0x5e84a0)){const _0x53ea8d=await fetchNpmDistTags();_0x11f1e2=_0x53ea8d?.[_0x1f0896(0x103)]?.[_0x1f0896(0x109)](),await writeUpdateNoticeCache({..._0x29e8d5,'checkedAt':_0x5e84a0,'latest':_0x11f1e2,'failed':!_0x11f1e2});}if(!_0x11f1e2||compareSemver(_0x155556,_0x11f1e2)>=0x0)return null;if(isRecentlyNotified(_0x29e8d5,_0x11f1e2,_0x5e84a0))return null;const _0x509936=CLI_BIN_NAME+_0x1f0896(0xf9);return await writeUpdateNoticeCache({..._0x29e8d5,'checkedAt':isFreshCheck(_0x29e8d5,_0x5e84a0)?_0x29e8d5['checkedAt']:_0x5e84a0,'latest':_0x11f1e2,'failed':![],'lastNotifiedVersion':_0x11f1e2,'lastNotifiedAt':_0x5e84a0}),{'command':_0x509936,'current':_0x155556,'latest':_0x11f1e2,'url':buildNpmVersionUrl(_0x11f1e2),'message':CLI_BIN_NAME+'\x20'+_0x11f1e2+_0x1f0896(0x10d)+_0x155556+_0x1f0896(0x104)+_0x509936};}catch{return null;}}
@@ -1 +1 @@
1
- (function(_0x46cc4f,_0x3c691f){const _0x5c85d2=a134_0x3701,_0x5a63ea=_0x46cc4f();while(!![]){try{const _0x1424e3=parseInt(_0x5c85d2(0x72))/0x1*(-parseInt(_0x5c85d2(0x75))/0x2)+-parseInt(_0x5c85d2(0x6e))/0x3+parseInt(_0x5c85d2(0x71))/0x4+parseInt(_0x5c85d2(0x74))/0x5*(parseInt(_0x5c85d2(0x6b))/0x6)+-parseInt(_0x5c85d2(0x6c))/0x7+-parseInt(_0x5c85d2(0x73))/0x8+parseInt(_0x5c85d2(0x70))/0x9*(parseInt(_0x5c85d2(0x76))/0xa);if(_0x1424e3===_0x3c691f)break;else _0x5a63ea['push'](_0x5a63ea['shift']());}catch(_0x10a322){_0x5a63ea['push'](_0x5a63ea['shift']());}}}(a134_0x1c1d,0xbee47));import{BUILD_TIME,GIT_COMMIT,VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}function a134_0x1c1d(){const _0x30e406=['26559jUlPNA','5820416cpUsAf','71QMEGAL','7851008mFEeFJ','110VkjxqC','26396cXNdLj','9680rKzZYu','52242PaFLTe','5931779Tspzix','slice','2866500lLUXPp','unknown'];a134_0x1c1d=function(){return _0x30e406;};return a134_0x1c1d();}function a134_0x3701(_0x48b5b0,_0x42d35e){_0x48b5b0=_0x48b5b0-0x6b;const _0x1c1d82=a134_0x1c1d();let _0x37010a=_0x1c1d82[_0x48b5b0];return _0x37010a;}export function getCliGitCommit(){const _0x3965e9=a134_0x3701,_0x10a5b0=String(GIT_COMMIT);return _0x10a5b0&&_0x10a5b0!==_0x3965e9(0x6f)?_0x10a5b0:'';}export function getCliVersionDisplay(){const _0x1bc293=a134_0x3701,_0x538b6d=getCliGitCommit(),_0x46d073=BUILD_TIME[_0x1bc293(0x6d)](0x0,0xa);if(!_0x538b6d||!_0x46d073)return VERSION;return VERSION+'\x20('+_0x538b6d+',\x20'+_0x46d073+')';}
1
+ (function(_0x5b393b,_0x3a40c5){const _0x6460d7=a154_0x2f96,_0x4e6abd=_0x5b393b();while(!![]){try{const _0x3af9dd=-parseInt(_0x6460d7(0x193))/0x1*(parseInt(_0x6460d7(0x19b))/0x2)+-parseInt(_0x6460d7(0x196))/0x3*(parseInt(_0x6460d7(0x195))/0x4)+-parseInt(_0x6460d7(0x19a))/0x5+-parseInt(_0x6460d7(0x192))/0x6+-parseInt(_0x6460d7(0x191))/0x7*(parseInt(_0x6460d7(0x19d))/0x8)+-parseInt(_0x6460d7(0x19e))/0x9*(parseInt(_0x6460d7(0x197))/0xa)+parseInt(_0x6460d7(0x194))/0xb*(parseInt(_0x6460d7(0x199))/0xc);if(_0x3af9dd===_0x3a40c5)break;else _0x4e6abd['push'](_0x4e6abd['shift']());}catch(_0x742f7c){_0x4e6abd['push'](_0x4e6abd['shift']());}}}(a154_0x12ad,0xec89b));function a154_0x12ad(){const _0x51e536=['11186hAXYCQ','9143064iIvxeV','6KBoesC','2658546ruwtbV','90884SuxXPe','57gMYYVo','678070xOQaWv','unknown','252cQhMHS','2663445UMMoNd','224474JEpWQl','slice','3712wPDAys','27swXviz'];a154_0x12ad=function(){return _0x51e536;};return a154_0x12ad();}function a154_0x2f96(_0xbca88a,_0xcfe9a4){_0xbca88a=_0xbca88a-0x191;const _0x12ad8e=a154_0x12ad();let _0x2f9691=_0x12ad8e[_0xbca88a];return _0x2f9691;}import{BUILD_TIME,GIT_COMMIT,VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}export function getCliGitCommit(){const _0x43a459=a154_0x2f96,_0x35b819=String(GIT_COMMIT);return _0x35b819&&_0x35b819!==_0x43a459(0x198)?_0x35b819:'';}export function getCliVersionDisplay(){const _0x342aba=a154_0x2f96,_0x3795fe=getCliGitCommit(),_0x4b1f50=BUILD_TIME[_0x342aba(0x19c)](0x0,0xa);if(!_0x3795fe||!_0x4b1f50)return VERSION;return VERSION+'\x20('+_0x3795fe+',\x20'+_0x4b1f50+')';}
@@ -1 +1 @@
1
- (function(_0x25a832,_0x372af5){var _0x2a3014=a135_0x24fc,_0x2e061a=_0x25a832();while(!![]){try{var _0x442823=parseInt(_0x2a3014(0x16d))/0x1+parseInt(_0x2a3014(0x16c))/0x2+parseInt(_0x2a3014(0x174))/0x3*(parseInt(_0x2a3014(0x16b))/0x4)+-parseInt(_0x2a3014(0x170))/0x5+parseInt(_0x2a3014(0x16f))/0x6+-parseInt(_0x2a3014(0x175))/0x7*(-parseInt(_0x2a3014(0x173))/0x8)+-parseInt(_0x2a3014(0x172))/0x9*(parseInt(_0x2a3014(0x171))/0xa);if(_0x442823===_0x372af5)break;else _0x2e061a['push'](_0x2e061a['shift']());}catch(_0x3e9e0e){_0x2e061a['push'](_0x2e061a['shift']());}}}(a135_0x6b24,0x6a236));function a135_0x24fc(_0x4fbe71,_0x1b6b6d){_0x4fbe71=_0x4fbe71-0x16b;var _0x6b24d9=a135_0x6b24();var _0x24fc73=_0x6b24d9[_0x4fbe71];return _0x24fc73;}function a135_0x6b24(){var _0x2a2823=['71100UsXEvx','30883310nqbKvK','9QjPQfb','801552CmroPG','15WHENfw','56hlrRgf','566788FjleWz','1226220DAGFLg','808820BLbFne','write','3631956yIpxUd'];a135_0x6b24=function(){return _0x2a2823;};return a135_0x6b24();}export function writeCliSideChannelLine(_0x274ba0){var _0x5967f8=a135_0x24fc;process['stderr'][_0x5967f8(0x16e)](_0x274ba0+'\x0a');}
1
+ function a155_0x6799(){var _0xf479e4=['20kxNKQm','1440805qzUyNQ','569744UKbPsp','99MCOEyU','stderr','644835VDiDDy','write','3RTzggN','11bRWLGi','3606000zqLurU','1598478cDvVdV','3887540EekwGk','368086vZqqBu'];a155_0x6799=function(){return _0xf479e4;};return a155_0x6799();}function a155_0xfde0(_0x28668d,_0x1e4d00){_0x28668d=_0x28668d-0x167;var _0x6799db=a155_0x6799();var _0xfde07=_0x6799db[_0x28668d];return _0xfde07;}(function(_0x51a81e,_0x2ab1f3){var _0x28dd9c=a155_0xfde0,_0x1b8be6=_0x51a81e();while(!![]){try{var _0x817bcf=parseInt(_0x28dd9c(0x16c))/0x1*(parseInt(_0x28dd9c(0x171))/0x2)+parseInt(_0x28dd9c(0x16a))/0x3*(parseInt(_0x28dd9c(0x172))/0x4)+-parseInt(_0x28dd9c(0x173))/0x5+parseInt(_0x28dd9c(0x16e))/0x6+-parseInt(_0x28dd9c(0x16f))/0x7+-parseInt(_0x28dd9c(0x167))/0x8*(parseInt(_0x28dd9c(0x168))/0x9)+-parseInt(_0x28dd9c(0x170))/0xa*(parseInt(_0x28dd9c(0x16d))/0xb);if(_0x817bcf===_0x2ab1f3)break;else _0x1b8be6['push'](_0x1b8be6['shift']());}catch(_0x18aec1){_0x1b8be6['push'](_0x1b8be6['shift']());}}}(a155_0x6799,0x83a33));export function writeCliSideChannelLine(_0x301730){var _0x4afce3=a155_0xfde0;process[_0x4afce3(0x169)][_0x4afce3(0x16b)](_0x301730+'\x0a');}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lovrabet/lovrabet-cli",
3
- "version": "2.2.3-beta.2",
3
+ "version": "2.2.4-beta.1",
4
4
  "description": "Runtime CLI for Lovrabet apps, datasets, SQL, BFF, skills, and AI agent workflows.",
5
5
  "license": "Apache-2.0",
6
6
  "keywords": [
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  name: lovrabet
3
3
  displayName: Lovrabet 运行态 CLI
4
- version: 2.2.3-beta.2
5
- description: "Lovrabet 运行态 CLI — 面向业务场景的 AI 操作套件,通过 lovrabet 命令管理应用目录、用户级外部账号、Service Tree 业务命令、API 文档发现、数据集查询、Instant API 数据操作、Custom SQL/Backend Function、personal BFF、文件上传、OCR 识别、定时任务、Skill、知识库与运行态 app-config key 状态检查。触发词:云图、lovrabet、lovrabet-cli、user-account bind、provider 外部账号绑定、钉钉 userId 绑定、service tree、业务服务树、api-doc、dataset、data filter、file upload、file query-url、ocr recognize、发票识别、图片识别、附件上传、personal-bff、schedule、定时任务、cron、kb、skill、sql exec、bff exec、app-config、accessKey、compress、jq。"
4
+ version: 2.2.4-beta.1
5
+ description: "Lovrabet 运行态 CLI — 面向业务场景的 AI 操作套件,通过 lovrabet 命令管理应用目录、业务角色与权限、用户级外部账号、Service Tree 业务命令、API 文档发现、数据集查询、Instant API 数据操作、Custom SQL/Backend Function、personal BFF、文件上传、OCR 识别、定时任务、Skill、知识库与运行态 app-config key 状态检查。触发词:云图、lovrabet、lovrabet-cli、业务角色、角色成员、页面权限、菜单权限、数据集权限、user-account bind、provider 外部账号绑定、钉钉 userId 绑定、service tree、业务服务树、api-doc、dataset、data filter、file upload、file query-url、ocr recognize、发票识别、图片识别、附件上传、personal-bff、schedule、定时任务、cron、kb、skill、sql exec、bff exec、app-config、accessKey、compress、jq。"
6
6
  metadata:
7
7
  requires:
8
8
  bins: ["lovrabet"]
@@ -12,7 +12,7 @@ metadata:
12
12
 
13
13
  # Lovrabet 运行态 CLI
14
14
 
15
- 面向业务系统运行态的 AI 操作套件。它把应用目录、数据集、Instant API 数据操作、Custom SQL、Backend Function、文件上传、OCR、定时任务和诊断能力收束成稳定命令,让业务人员、交付实施、业务运维和 AI Agent 可以从客户、订单、库存、工单、发票和附件等真实业务对象出发,完成查询、核对、执行、识别、联调和排障。
15
+ 面向业务系统运行态的 AI 操作套件。它把应用目录、业务角色与权限、数据集、Instant API 数据操作、Custom SQL、Backend Function、文件上传、OCR、定时任务和诊断能力收束成稳定命令,让业务人员、交付实施、业务运维和 AI Agent 可以从客户、订单、库存、工单、发票和附件等真实业务对象出发,完成查询、核对、执行、识别、联调和排障。
16
16
 
17
17
  它不是让团队重新学习一套后台路径,而是把企业系统里的数据、规则、接口和历史经验整理成 AI 可以理解、调用、审计和复用的业务操作入口。
18
18
 
@@ -24,6 +24,7 @@ metadata:
24
24
 
25
25
  - 流程 / 决策:
26
26
  - [应用决议](guides/app-resolution.md)
27
+ - [运行态角色与权限](guides/role-and-permission-workflow.md)
27
28
  - [数据集与数据流程](guides/dataset-and-data-workflow.md)
28
29
  - [Custom SQL 与 Backend Function 流程](guides/sql-and-bff-workflow.md)
29
30
  - [排障](guides/troubleshooting.md)
@@ -40,10 +41,9 @@ npm 包会自动安装同版本 Built-in Skill。若 `lovrabet doctor` 报告缺
40
41
 
41
42
  ## 认证
42
43
 
43
- 当前主路径是 **User Access Key(client-ak)**。优先级:**CLI flags > 环境变量 > 配置文件**。
44
+ 只支持 **User Access Key(client-ak)**。优先级:**CLI flags > 环境变量 > 配置文件**。
44
45
 
45
- 1. **User AK**:`.lovrabet.json` 或 `LOVRABET_ACCESS_KEY` 配 **`accessKey`**(适合 CI);有 `accessKey` 时走 **client-ak**
46
- 2. **Cookie**:历史兼容读取,已不是推荐主路径;新文档与 Agent 指导默认按 AK 流程处理
46
+ `.lovrabet.json` 或 `LOVRABET_ACCESS_KEY` 配置 **`accessKey`**(适合 CI);所有需要认证的运行态命令均使用该身份。
47
47
 
48
48
  详见 [认证参考](references/lovrabet-auth.md)。
49
49
 
@@ -111,6 +111,7 @@ npm 包会自动安装同版本 Built-in Skill。若 `lovrabet doctor` 报告缺
111
111
  - `dataset detail` 核对当前数据集字段、关联和操作信息。
112
112
  - `sql detail` 核对当前应用下的 Custom SQL 名称、数据库和 SQL 内容。它不单独证明业务口径、参数约束或副作用。
113
113
  - `bff detail` 按当前 `appCode + functionName` 解析运行态 Backend Function ENDPOINT,只返回名称、描述、版本和更新时间等元数据,不返回输入输出、函数类型或副作用契约。
114
+ - `notification config-list` 按当前应用和渠道类型查询应用级通知配置,只返回用于选择配置的安全身份字段和 `configCode`;它不返回渠道地址或凭证,也不证明后续通知发送已经获得授权。
114
115
  - 后续新增能力如果通过 schema、manifest、签名元数据或其他已注册入口提供可信契约,按该适配器验证,不强制仿造 `detail` 命令。
115
116
 
116
117
  参数值、执行意图和执行授权可以由用户明确提供;参数结构、输入输出和真实副作用必须来自可信业务 Skill 或平台已确认契约。技术契约无法补齐时保持未知,不自动执行。
@@ -278,6 +279,11 @@ Service Tree 未命中不是失败条件,也不代表业务能力不存在。
278
279
  | **config** | `get` | 读取配置项 | read | 本地 |
279
280
  | **config** | `set` | 写入配置项 | write | 本地 |
280
281
  | **config** | `delete` | 删除配置项 | write | 本地 |
282
+ | **role** | `list` / `detail` | 查询当前应用的业务角色 | read | AK |
283
+ | **role** | `create` / `update` / `delete` | 管理当前应用的自定义业务角色 | high-risk-write | AK |
284
+ | **role** | `user-add` / `user-remove` | 调整业务角色成员 | high-risk-write | AK |
285
+ | **permit** | `page-get` / `role-menus` / `dataset-get` | 查询页面、菜单和数据集权限 | read | AK |
286
+ | **permit** | `page-set` / `role-menus-set` / `dataset-set` | 调整页面、菜单和数据集权限 | high-risk-write | AK |
281
287
  | **service** | `validate` | 校验 Service Tree manifest 或本地 registry | read | 本地 |
282
288
  | **service** | `import` | 导入 Service Tree manifest 或 registry 到 `~/.lovrabet/service.json` | write | 本地 |
283
289
  | **service** | `export` | 从本地 registry 导出 Service Tree manifest | write | 本地 |
@@ -310,6 +316,7 @@ Service Tree 未命中不是失败条件,也不代表业务能力不存在。
310
316
  | **sql** | `exec` | 执行 Custom SQL | read | AK |
311
317
  | **bff** | `detail` | 查看 Backend Function 详情 | read | AK |
312
318
  | **bff** | `exec` | 执行 Backend Function | read | AK |
319
+ | **notification** | `config-list` | 查询当前应用的应用级通知渠道配置和 configCode | read | AK |
313
320
  | **app-config** | `get` | 按 key 获取当前应用的运行态 app-config value | read | AK |
314
321
  | **user-account** | `bind` | 按 provider 绑定当前 AccessKey 所属用户的外部账号 | write | AK |
315
322
  | **personal-bff** | `list` | 查看当前用户 personal BFF | read | AK |
@@ -422,6 +429,7 @@ Service Tree 未命中不是失败条件,也不代表业务能力不存在。
422
429
  | 执行 Custom SQL | `lovrabet sql exec --sqlcode <code> --params '{"key":"value"}'` |
423
430
  | 查看 Backend Function | `lovrabet bff detail --name <functionName>` |
424
431
  | 执行 Backend Function | `lovrabet bff exec --name <functionName> --params '{"key":"value"}'` |
432
+ | 查询应用级通知配置 | `lovrabet notification config-list [--type EMAIL|FEISHU|DINGTALK|WECOM|WEBHOOK]` |
425
433
  | 获取运行态 app-config value | `lovrabet app-config get <key>` |
426
434
  | Agent 使用 app-config value | Agent 调用 `lovrabet app-config get <key>` 获取并在当前任务中消费 |
427
435
  | 查看 personal BFF | `lovrabet personal-bff detail --id <id>` |
@@ -537,6 +545,10 @@ lovrabet data delete --code <datasetCode> --params '{"id":123}' --yes
537
545
 
538
546
  `lovrabet schedule` 用于校验、创建、查询、立即运行和删除当前应用下的 UTC 定时任务。创建前必须核对应用、执行时间、重复规则、标题、完整 prompt 和 channel;创建、立即运行和删除都先执行 `--dry-run`,取得用户明确确认后再执行。详见 [定时任务工作流](references/lovrabet-schedule-workflow.md)。
539
547
 
548
+ ## 应用级通知配置查询
549
+
550
+ `lovrabet notification config-list` 按当前应用和渠道类型查询应用级通知配置,用于获得已存在配置的 `configCode`。`--type` 默认 `EMAIL`;返回结果只用于选择配置,不发送通知,也不修改渠道。多个候选无法唯一判断时,向用户确认,不要默认取第一条。完整参数、安全输出和 `configCode` / `channelCode` 边界见 [应用级通知配置查询](references/lovrabet-notification-config-list.md)。
551
+
540
552
  ## Skill 与知识库边界
541
553
 
542
554
  `lovrabet app-config get <key>` 按当前 appCode 和 key 返回运行态 app-config value。它不支持 `--reveal`,不提供 set/delete/list 管理入口。该返回值可能包含敏感信息,不要把它写入本地配置、缓存、日志、命令参数或业务 Skill 入参。
@@ -698,6 +710,7 @@ personal KB 使用文件型 create/update。更新前先 `kb detail` 查看正
698
710
  | Instant API | [instant-api-workflow.md](references/instant-api-workflow.md) |
699
711
  | Custom SQL 工作流 | [lovrabet-sql-workflow.md](references/lovrabet-sql-workflow.md) |
700
712
  | Backend Function 工作流 | [lovrabet-bff-workflow.md](references/lovrabet-bff-workflow.md) |
713
+ | 应用级通知配置查询 | [lovrabet-notification-config-list.md](references/lovrabet-notification-config-list.md) |
701
714
  | app-config value 查询 | [lovrabet-app-config.md](references/lovrabet-app-config.md) |
702
715
  | 用户级外部账号绑定 | [lovrabet-user-account.md](references/lovrabet-user-account.md) |
703
716
  | 文件上传工作流 | [lovrabet-file-workflow.md](references/lovrabet-file-workflow.md) |
@@ -0,0 +1,139 @@
1
+ # 运行态角色与权限
2
+
3
+ 用于管理业务人员的角色、角色成员,以及页面、菜单和数据集权限。
4
+
5
+ 只在目标应用、角色、人员和资源都能唯一确认时执行写入。推荐顺序是:**先读取,再预览,最后确认写入**。
6
+
7
+ ## 开始前
8
+
9
+ 1. 使用明确的 `--appcode <code>`、`--app <name>` 或已经确认的当前应用。
10
+ 2. 使用 `lovrabet role list` 获取真实角色 ID 和类型。
11
+ 3. 写操作先加 `--dry-run` 检查目标和变更内容。
12
+ 4. 只有用户明确授权后才去掉 `--dry-run` 并加 `--yes`。
13
+
14
+ 角色名称可能重复。命令接受角色名称时,如果不能唯一匹配,应改用角色 ID。
15
+
16
+ ## 角色
17
+
18
+ ### 查询角色
19
+
20
+ ```bash
21
+ lovrabet role list --format compress
22
+ lovrabet role list --type CUSTOM --name 销售 --format compress
23
+ lovrabet role detail --id <roleId> --format compress
24
+ ```
25
+
26
+ `role list` 返回内置角色和自定义角色。`builtin=true` 表示不能通过角色更新或删除命令修改。
27
+
28
+ ### 创建和修改自定义角色
29
+
30
+ ```bash
31
+ lovrabet role create --name <roleName> --remark <remark> --dry-run --format compress
32
+ lovrabet role create --name <roleName> --remark <remark> --yes --format compress
33
+
34
+ lovrabet role update --id <roleId> --name <newName> --dry-run --format compress
35
+ lovrabet role update --id <roleId> --remark <newRemark> --yes --format compress
36
+
37
+ lovrabet role delete --id <roleId> --dry-run --format compress
38
+ lovrabet role delete --id <roleId> --yes --format compress
39
+ ```
40
+
41
+ - 只能创建、更新和删除 CUSTOM 角色。
42
+ - 备注只能设置为非空内容,不能用空字符串清除。
43
+ - 删除可能影响已有成员和权限;必须先确认角色确实不再使用。
44
+
45
+ ## 角色成员
46
+
47
+ ```bash
48
+ lovrabet role user-add --role <roleId|exactName> --user <userId> --expect-user-count <count> --dry-run --format compress
49
+ lovrabet role user-add --role <roleId|exactName> --user <userId> --expect-user-count <count> --yes --format compress
50
+
51
+ lovrabet role user-remove --role <roleId|exactName> --user <userId> --expect-user-count <count> --dry-run --format compress
52
+ lovrabet role user-remove --role <roleId|exactName> --user <userId> --expect-user-count <count> --yes --format compress
53
+ ```
54
+
55
+ - `--user` 使用数字用户 ID;添加时该人员必须已经属于目标应用。
56
+ - `--expect-user-count` 用于防止读取后成员数量已变化,建议每次写入都提供。
57
+ - 重复添加已有成员或移出不存在的成员不会重复写入。
58
+ - OWNER 成员不能用这些命令调整。
59
+ - 如果人员身份不明确,停止写入并要求用户确认数字用户 ID。
60
+
61
+ ## 页面权限
62
+
63
+ 先读取页面权限:
64
+
65
+ ```bash
66
+ lovrabet permit page-get --menu-id <menuId> --format compress
67
+ ```
68
+
69
+ 只设置明确指定的权限槽位,其他槽位保持不变:
70
+
71
+ ```bash
72
+ lovrabet permit page-set --menu-id <menuId> --menu-roles <roleIdsOrNames> --dry-run --format compress
73
+ lovrabet permit page-set --menu-id <menuId> --row-roles SELF --yes --format compress
74
+ ```
75
+
76
+ 可用参数:
77
+
78
+ - `--menu-roles`
79
+ - `--create-roles`
80
+ - `--update-roles`
81
+ - `--delete-roles`
82
+ - `--detail-roles`
83
+ - `--export-roles`
84
+ - `--row-roles`
85
+
86
+ 多个角色用英文逗号分隔。`SELF` 只用于 `--row-roles`。
87
+
88
+ ## 菜单权限
89
+
90
+ 查看一个角色的菜单访问结果:
91
+
92
+ ```bash
93
+ lovrabet permit role-menus --role <roleId|exactName> --format compress
94
+ ```
95
+
96
+ 授权或撤权:
97
+
98
+ ```bash
99
+ lovrabet permit role-menus-set --role <roleId|exactName> --grant --menus <menuIds> --dry-run --format compress
100
+ lovrabet permit role-menus-set --role <roleId|exactName> --revoke --menus <menuIds> --yes --format compress
101
+ ```
102
+
103
+ `--grant` 与 `--revoke` 必须且只能选择一个。多个菜单 ID 用英文逗号分隔。
104
+
105
+ ## 数据集权限
106
+
107
+ 查看一个角色的数据集权限:
108
+
109
+ ```bash
110
+ lovrabet permit dataset-get --role <roleId|exactName> --format compress
111
+ ```
112
+
113
+ 授权或撤权:
114
+
115
+ ```bash
116
+ lovrabet permit dataset-set --role <roleId|exactName> --grant --datasets <datasetCodes> --actions <actions> --dry-run --format compress
117
+ lovrabet permit dataset-set --role <roleId|exactName> --revoke --datasets <datasetCodes> --actions <actions> --yes --format compress
118
+ ```
119
+
120
+ 动作值:
121
+
122
+ - `DATA_CREATE`
123
+ - `DATA_UPDATE`
124
+ - `DATA_DELETE`
125
+ - `DATA_DETAIL`
126
+ - `DATA_EXPORT`
127
+ - `DATA_ROW`
128
+
129
+ 多个数据集或动作使用英文逗号分隔。
130
+
131
+ ## 安全边界
132
+
133
+ - 只有 ADMIN 或 OWNER 可以执行页面、菜单和数据集权限写入。
134
+ - ADMIN 和 OWNER 拥有完整运行权限,不作为页面、菜单或数据集权限调整目标。
135
+ - 权限设置只修改显式选择的页面槽位、菜单或数据集动作。
136
+ - 菜单或数据集权限不能撤销最后一个角色;需要先为另一个角色授权,再执行撤权。
137
+ - dry-run 只预览请求,不代表已经获得授权,也不代表变更已经生效。
138
+ - 写入后重新执行对应读取命令,核对角色、成员或权限结果。
139
+ - 遇到权限不足、目标不存在、成员数量变化或候选不唯一时停止,不更换身份、不猜测目标。
@@ -1,6 +1,6 @@
1
1
  # auth — 认证管理
2
2
 
3
- 当前推荐的认证路径是 **User Access Key(client-ak)**。
3
+ Lovrabet CLI 只使用 User Access Key(client-ak)认证。
4
4
 
5
5
  ## auth login — 保存 accessKey
6
6
 
@@ -126,10 +126,6 @@ CLI flag (--access-key)
126
126
 
127
127
  `auth login` / `auth init` 本身都不会主动把应用目录写进 `.lovrabet.json`。
128
128
 
129
- ## Cookie
130
-
131
- Cookie 仍保留历史兼容读取,但不再是推荐主路径。新的 Agent 指导和用户文档应默认使用 AK 流程。
132
-
133
129
  ## 参考
134
130
 
135
131
  - [SKILL.md](../SKILL.md)
@@ -0,0 +1,81 @@
1
+ # lovrabet notification config-list
2
+
3
+ 只读查询当前应用的应用级通知渠道配置,主要用于获得已存在通知配置的 `configCode`。
4
+
5
+ ## 命令
6
+
7
+ ```bash
8
+ lovrabet notification config-list --format compress
9
+ lovrabet notification config-list --type EMAIL --format compress
10
+ lovrabet notification config-list --type EMAIL --appcode <appCode> --format json
11
+ ```
12
+
13
+ `--type` 默认 `EMAIL`,支持:
14
+
15
+ - `EMAIL`
16
+ - `FEISHU`
17
+ - `DINGTALK`
18
+ - `WECOM`
19
+ - `WEBHOOK`
20
+
21
+ 类型值使用大写。完整参数写法为 `--type EMAIL|FEISHU|DINGTALK|WECOM|WEBHOOK`。
22
+
23
+ ## 安全输出
24
+
25
+ 每个配置项只返回用于识别和选择配置的字段:
26
+
27
+ - `id`
28
+ - `configCode`
29
+ - `configName`
30
+ - `channelType`
31
+ - `description`
32
+ - `createTime`
33
+ - `updateTime`
34
+
35
+ 该命令不会输出 `endpointUrl`、`channelConfig`、SMTP 用户名或密码、token、secret、连接超时和人员身份审计字段。若任一配置缺少可用的 `configCode`、`configName` 或 `channelType`,命令返回错误,不把残缺记录包装成成功结果。
36
+
37
+ 示例输出:
38
+
39
+ ```json
40
+ {
41
+ "ok": true,
42
+ "data": {
43
+ "appCode": "app-xxxxx",
44
+ "channelType": "EMAIL",
45
+ "count": 1,
46
+ "configs": [
47
+ {
48
+ "id": 7,
49
+ "configCode": "ncc_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
50
+ "configName": "官方邮件",
51
+ "channelType": "EMAIL",
52
+ "description": "业务通知邮件",
53
+ "createTime": "2026-07-01T00:00:00Z",
54
+ "updateTime": "2026-07-02T00:00:00Z"
55
+ }
56
+ ]
57
+ },
58
+ "message": "Found 1 EMAIL notification config(s)"
59
+ }
60
+ ```
61
+
62
+ ## 选择与消费边界
63
+
64
+ - `configCode` 是应用级通知渠道配置编码,可供已确认契约的通知型 Backend Function 使用。
65
+ - dataset 级通知通道的 `channelCode` 不能替代应用级 `configCode`。
66
+ - 没有结果时,不要猜测或从其他应用复制配置编码。
67
+ - 多个候选能够根据用户明确给出的配置名称或用途唯一匹配时,使用该项;多个候选仍无法判断时,向用户确认,不要默认取第一条。
68
+ - 查询结果不代表已经授权发送通知。发送前仍须确认目标应用、Backend Function 契约、`configCode`、接收对象、消息摘要和真实外发副作用。
69
+ - 该命令不会发送通知,也不会创建、更新或删除平台配置。
70
+
71
+ ## 失败处理
72
+
73
+ - AccessKey 无效或无权访问目标应用时,先用 `lovrabet auth info` 核对当前身份,再确认应用权限。
74
+ - 应用不明确时,显式传入 `--app` 或 `--appcode`;不要修改本地配置来抬高权限或切换到未经授权的应用。
75
+ - 渠道类型不支持时,使用上面列出的五种大写值之一。
76
+ - 查询失败时保持 `configCode` 未知,不继续执行依赖该编码的通知发送。
77
+
78
+ ## 参考
79
+
80
+ - [Backend Function 工作流](lovrabet-bff-workflow.md)
81
+ - [输出格式与 --jq](lovrabet-output-format-jq.md)
@@ -2,12 +2,13 @@
2
2
  "schemaVersion": 1,
3
3
  "name": "lovrabet",
4
4
  "packageName": "@lovrabet/lovrabet-cli",
5
- "packageVersion": "2.2.3-beta.2",
6
- "skillVersion": "2.2.3-beta.2",
5
+ "packageVersion": "2.2.4-beta.1",
6
+ "skillVersion": "2.2.4-beta.1",
7
7
  "files": [
8
8
  "SKILL.md",
9
9
  "guides/app-resolution.md",
10
10
  "guides/dataset-and-data-workflow.md",
11
+ "guides/role-and-permission-workflow.md",
11
12
  "guides/sql-and-bff-workflow.md",
12
13
  "guides/troubleshooting.md",
13
14
  "references/dataset-discovery-workflow.md",
@@ -22,6 +23,7 @@
22
23
  "references/lovrabet-file-workflow.md",
23
24
  "references/lovrabet-kb-workflow.md",
24
25
  "references/lovrabet-logs.md",
26
+ "references/lovrabet-notification-config-list.md",
25
27
  "references/lovrabet-ocr-workflow.md",
26
28
  "references/lovrabet-output-format-jq.md",
27
29
  "references/lovrabet-personal-bff-workflow.md",
@@ -35,5 +37,5 @@
35
37
  "references/lovrabet-user-account.md",
36
38
  "references/lovrabet-workspace.md"
37
39
  ],
38
- "digest": "d4344453f69430d992a1c9519f4403c5d1d23ccaac5b8d7dba4f0ff696fb9f1b"
40
+ "digest": "b07c87877407779445d49a9849d7dc963a2c715439b2efc9bd0fe4ee7aa0700b"
39
41
  }