@lovrabet/lovrabet-cli 2.1.9-beta.2 → 2.1.9-beta.4

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 (119) hide show
  1. package/NOTICE +5 -0
  2. package/README.md +156 -0
  3. package/lib/cli.js +1 -1
  4. package/lib/commands/api-doc/index.js +1 -1
  5. package/lib/commands/app/cache.js +1 -1
  6. package/lib/commands/app/definitions.js +1 -1
  7. package/lib/commands/app/eligibility.js +1 -1
  8. package/lib/commands/app/mock-loader.js +1 -1
  9. package/lib/commands/app/remote-source.js +1 -1
  10. package/lib/commands/app/shared.js +1 -1
  11. package/lib/commands/app-config/get.js +1 -1
  12. package/lib/commands/app-config/index.js +1 -1
  13. package/lib/commands/app-config/shared.js +1 -1
  14. package/lib/commands/artifact/index.js +1 -1
  15. package/lib/commands/auth/index.js +1 -1
  16. package/lib/commands/auth/prompt.js +1 -1
  17. package/lib/commands/bff/detail.js +1 -1
  18. package/lib/commands/bff/exec.js +1 -1
  19. package/lib/commands/bff/index.js +1 -1
  20. package/lib/commands/cli-skill/index.js +1 -1
  21. package/lib/commands/common/config-policy.js +1 -1
  22. package/lib/commands/common/constraints.js +1 -1
  23. package/lib/commands/common/flags.js +1 -1
  24. package/lib/commands/common/local-file.js +1 -1
  25. package/lib/commands/config/definitions.js +1 -1
  26. package/lib/commands/config/shared.js +1 -1
  27. package/lib/commands/data/index.js +1 -1
  28. package/lib/commands/dataset/detail.js +1 -1
  29. package/lib/commands/dataset/index.js +1 -1
  30. package/lib/commands/dataset/list.js +1 -1
  31. package/lib/commands/dataset/sdk-doc.js +1 -1
  32. package/lib/commands/doctor.js +1 -1
  33. package/lib/commands/file/index.js +1 -1
  34. package/lib/commands/init.js +1 -1
  35. package/lib/commands/kb/index.js +1 -1
  36. package/lib/commands/logs/index.js +1 -1
  37. package/lib/commands/ocr/index.js +1 -1
  38. package/lib/commands/personal-bff/index.js +1 -1
  39. package/lib/commands/registry.js +1 -1
  40. package/lib/commands/schema.js +1 -1
  41. package/lib/commands/service/dynamic.js +1 -1
  42. package/lib/commands/service/index.js +1 -1
  43. package/lib/commands/service/registry.js +1 -1
  44. package/lib/commands/skill/commands/create.js +1 -1
  45. package/lib/commands/skill/commands/install.js +1 -1
  46. package/lib/commands/skill/commands/list.js +1 -1
  47. package/lib/commands/skill/commands/push.js +1 -1
  48. package/lib/commands/skill/commands/validate.js +1 -1
  49. package/lib/commands/skill/flags.js +1 -1
  50. package/lib/commands/skill/index.js +1 -1
  51. package/lib/commands/skill/manifest-helpers.js +1 -1
  52. package/lib/commands/skill/push-execute.js +1 -1
  53. package/lib/commands/skill/push-flow-helpers.js +1 -1
  54. package/lib/commands/skill/push-retarget.js +1 -1
  55. package/lib/commands/skill/scopes.js +1 -1
  56. package/lib/commands/skill/summary.js +1 -1
  57. package/lib/commands/skill/templates.js +1 -1
  58. package/lib/commands/skill/validate.js +1 -1
  59. package/lib/commands/sql/detail.js +1 -1
  60. package/lib/commands/sql/exec.js +1 -1
  61. package/lib/commands/sql/index.js +1 -1
  62. package/lib/commands/update.js +1 -1
  63. package/lib/commands/workspace/index.js +1 -1
  64. package/lib/config/schema.js +1 -1
  65. package/lib/constant/app.js +1 -1
  66. package/lib/constant/auth-mode.js +1 -1
  67. package/lib/constant/cli.js +1 -1
  68. package/lib/constant/defaults.js +1 -1
  69. package/lib/constant/distribution.js +1 -1
  70. package/lib/constant/domain.js +1 -1
  71. package/lib/constant/env.js +1 -1
  72. package/lib/constant/output.js +1 -1
  73. package/lib/constant/product.js +1 -1
  74. package/lib/constant/risk.js +1 -1
  75. package/lib/constant/url.js +1 -1
  76. package/lib/context.js +1 -1
  77. package/lib/core/api-client.js +1 -1
  78. package/lib/core/db-resolver.js +1 -1
  79. package/lib/core/sdk-client.js +1 -1
  80. package/lib/errors.js +1 -1
  81. package/lib/framework/build-all-flags.js +1 -1
  82. package/lib/framework/dryrun.js +1 -1
  83. package/lib/framework/flags.js +1 -1
  84. package/lib/framework/help.js +1 -1
  85. package/lib/framework/index.js +1 -1
  86. package/lib/framework/output.js +1 -1
  87. package/lib/framework/preparse.js +1 -1
  88. package/lib/framework/response.js +1 -1
  89. package/lib/framework/runner-confirmation.js +1 -1
  90. package/lib/framework/runner-error.js +1 -1
  91. package/lib/framework/runner.js +1 -1
  92. package/lib/framework/schema-export.js +1 -1
  93. package/lib/framework/service-order.js +1 -1
  94. package/lib/framework/types.js +1 -1
  95. package/lib/generated/build-info.js +1 -1
  96. package/lib/help.js +1 -1
  97. package/lib/skills/npx-skills-add.js +1 -1
  98. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  99. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  100. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  101. package/lib/skills/runtime-skill-sync/links.js +1 -1
  102. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  103. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  104. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  105. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  106. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  107. package/lib/skills/runtime-skill-sync/push.js +1 -1
  108. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  109. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  110. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  111. package/lib/skills/runtime-skill-sync.js +1 -1
  112. package/lib/utils/apply-jq-filter.js +1 -1
  113. package/lib/utils/logger.js +1 -1
  114. package/lib/utils/params.js +1 -1
  115. package/lib/utils/platform.js +1 -1
  116. package/lib/utils/update-notice.js +1 -1
  117. package/lib/utils/version.js +1 -1
  118. package/lib/utils/write-cli-side-channel.js +1 -1
  119. package/package.json +18 -2
@@ -1 +1 @@
1
- (function(_0x5d9c22,_0x60bbec){const _0x530ca5=a26_0x58d6,_0x1a3556=_0x5d9c22();while(!![]){try{const _0x4dca5e=-parseInt(_0x530ca5(0x1a3))/0x1*(-parseInt(_0x530ca5(0x1ad))/0x2)+-parseInt(_0x530ca5(0x1a4))/0x3*(-parseInt(_0x530ca5(0x1a6))/0x4)+parseInt(_0x530ca5(0x1a8))/0x5*(parseInt(_0x530ca5(0x1aa))/0x6)+parseInt(_0x530ca5(0x1ac))/0x7*(parseInt(_0x530ca5(0x1a7))/0x8)+parseInt(_0x530ca5(0x1a5))/0x9+-parseInt(_0x530ca5(0x1ab))/0xa+-parseInt(_0x530ca5(0x1a9))/0xb;if(_0x4dca5e===_0x60bbec)break;else _0x1a3556['push'](_0x1a3556['shift']());}catch(_0x3375a7){_0x1a3556['push'](_0x1a3556['shift']());}}}(a26_0x2cfe,0x59ba9));import{datasetList}from'../../commands/dataset/list.js';import{datasetDetail}from'../../commands/dataset/detail.js';import{datasetSdkDoc}from'../../commands/dataset/sdk-doc.js';function a26_0x2cfe(){const _0x51d6f6=['569560EOdZoM','952tdEpPH','342655BKmFod','10343575NCFiYs','18xNXVmY','2618660AfJJhg','3542WRbLJs','1415564UDQSRb','1qUYacn','9IPNHOU','1520649FHXuYP'];a26_0x2cfe=function(){return _0x51d6f6;};return a26_0x2cfe();}function a26_0x58d6(_0x32adff,_0x1a8904){_0x32adff=_0x32adff-0x1a3;const _0x2cfe68=a26_0x2cfe();let _0x58d698=_0x2cfe68[_0x32adff];return _0x58d698;}export const datasetDefinitions=[datasetList,datasetDetail,datasetSdkDoc];
1
+ (function(_0x5b00d7,_0x33fab3){const _0x4c1447=a26_0x5d42,_0x25b618=_0x5b00d7();while(!![]){try{const _0x3bb285=-parseInt(_0x4c1447(0xce))/0x1+parseInt(_0x4c1447(0xc7))/0x2+-parseInt(_0x4c1447(0xcb))/0x3+parseInt(_0x4c1447(0xcf))/0x4*(parseInt(_0x4c1447(0xc8))/0x5)+parseInt(_0x4c1447(0xca))/0x6*(parseInt(_0x4c1447(0xc9))/0x7)+parseInt(_0x4c1447(0xc6))/0x8*(parseInt(_0x4c1447(0xcc))/0x9)+parseInt(_0x4c1447(0xcd))/0xa;if(_0x3bb285===_0x33fab3)break;else _0x25b618['push'](_0x25b618['shift']());}catch(_0x355217){_0x25b618['push'](_0x25b618['shift']());}}}(a26_0x3225,0x6b88b));import{datasetList}from'../../commands/dataset/list.js';function a26_0x5d42(_0xf8083e,_0x36e26d){_0xf8083e=_0xf8083e-0xc6;const _0x3225bc=a26_0x3225();let _0x5d4239=_0x3225bc[_0xf8083e];return _0x5d4239;}function a26_0x3225(){const _0x278442=['8897DnPRBe','102TFLRPq','1742013FZkUgm','2223909hjXGoF','10411180NlAgLc','493061dFRMwj','68752QeAefK','8sgKzFg','99346UuzONd','45cOPham'];a26_0x3225=function(){return _0x278442;};return a26_0x3225();}import{datasetDetail}from'../../commands/dataset/detail.js';import{datasetSdkDoc}from'../../commands/dataset/sdk-doc.js';export const datasetDefinitions=[datasetList,datasetDetail,datasetSdkDoc];
@@ -1 +1 @@
1
- const a27_0x149958=a27_0x4c38;(function(_0x59e9ed,_0x54acdd){const _0x229790=a27_0x4c38,_0x55b6b5=_0x59e9ed();while(!![]){try{const _0x43441b=parseInt(_0x229790(0x179))/0x1+parseInt(_0x229790(0x17b))/0x2*(-parseInt(_0x229790(0x176))/0x3)+-parseInt(_0x229790(0x17a))/0x4+-parseInt(_0x229790(0x16e))/0x5*(parseInt(_0x229790(0x163))/0x6)+-parseInt(_0x229790(0x17f))/0x7+parseInt(_0x229790(0x16f))/0x8*(-parseInt(_0x229790(0x16c))/0x9)+parseInt(_0x229790(0x169))/0xa*(parseInt(_0x229790(0x173))/0xb);if(_0x43441b===_0x54acdd)break;else _0x55b6b5['push'](_0x55b6b5['shift']());}catch(_0x4b86d6){_0x55b6b5['push'](_0x55b6b5['shift']());}}}(a27_0x46c3,0x54cfc));import{listDatasets}from'../../core/api-client.js';function a27_0x46c3(){const _0x42eb32=['Filter\x20by\x20dataset\x20name\x20(server-side\x20fuzzy\x20match)','source','allFields','2743692AHGPoJ','dbtableConfig','50574QvZPTH','split','read','dataset','code','map','20886730QrLBTh','appCode','tableName','126hYAMza','length','215PnHBSy','170224tGdFgg','List\x20datasets\x20in\x20the\x20app\x20(supports\x20server-side\x20name/code\x20filtering)','str','list','11vhKBQM','Filter\x20by\x20dataset\x20code\x20(server-side\x20exact\x20match)','string','6zmAAkH','datasetKey','name','175771YBtLNE','1706460cLNcbG','438146UbsPhO'];a27_0x46c3=function(){return _0x42eb32;};return a27_0x46c3();}function a27_0x4c38(_0x3117f4,_0x47920c){_0x3117f4=_0x3117f4-0x163;const _0x46c366=a27_0x46c3();let _0x4c387f=_0x46c366[_0x3117f4];return _0x4c387f;}import{CODE_FLAG}from'../../commands/common/flags.js';export const datasetList={'service':a27_0x149958(0x166),'command':a27_0x149958(0x172),'description':a27_0x149958(0x170),'risk':a27_0x149958(0x165),'flags':[{'name':a27_0x149958(0x178),'type':a27_0x149958(0x175),'description':a27_0x149958(0x17c)},{...CODE_FLAG,'required':![],'description':a27_0x149958(0x174)}],async 'execute'(_0x49f805){const _0x84e817=a27_0x149958,_0x43186b=_0x49f805[_0x84e817(0x171)](_0x84e817(0x178)),_0x36050d=_0x49f805['str'](_0x84e817(0x167)),_0x1aadce=await listDatasets(_0x49f805[_0x84e817(0x16a)],{..._0x43186b&&{'name':_0x43186b},..._0x36050d&&{'code':_0x36050d}});return{'ok':!![],'data':{'total':_0x1aadce[_0x84e817(0x16d)],'datasets':_0x1aadce[_0x84e817(0x168)](_0x17e0c5=>{const _0x1b6c1a=_0x84e817,_0x54dcb7=_0x17e0c5[_0x1b6c1a(0x180)]??{};return{'id':_0x17e0c5['id'],'code':_0x17e0c5[_0x1b6c1a(0x167)],'name':_0x17e0c5[_0x1b6c1a(0x178)],'source':_0x17e0c5[_0x1b6c1a(0x17d)],'description':_0x17e0c5['description'],'table':_0x54dcb7[_0x1b6c1a(0x16b)],'datasetKey':_0x54dcb7[_0x1b6c1a(0x177)],'pk':_0x54dcb7['pkField'],'fields':_0x54dcb7[_0x1b6c1a(0x17e)]?_0x54dcb7[_0x1b6c1a(0x17e)][_0x1b6c1a(0x164)](',')[_0x1b6c1a(0x168)](_0x522124=>_0x522124['trim']()):[]};})}};}};
1
+ function a27_0xe814(){const _0x359c0b=['28oApOBG','4hdXEYj','code','2883981SJXDAb','1079718FYfZQa','19217790TxZqCT','read','1014618nEBHBm','allFields','dataset','description','split','datasetKey','Filter\x20by\x20dataset\x20code\x20(server-side\x20exact\x20match)','95070NCRkJi','Filter\x20by\x20dataset\x20name\x20(server-side\x20fuzzy\x20match)','122680sFOTIU','appCode','source','11uYejBk','map','name','793044qHhEbG','2JDlMwd','list','dbtableConfig','length','pkField'];a27_0xe814=function(){return _0x359c0b;};return a27_0xe814();}const a27_0x176b3d=a27_0x5600;(function(_0x51dfc1,_0x29a1e0){const _0x198b1f=a27_0x5600,_0x13eac9=_0x51dfc1();while(!![]){try{const _0x795f11=-parseInt(_0x198b1f(0x131))/0x1+-parseInt(_0x198b1f(0x125))/0x2*(parseInt(_0x198b1f(0x12d))/0x3)+-parseInt(_0x198b1f(0x12b))/0x4*(parseInt(_0x198b1f(0x138))/0x5)+-parseInt(_0x198b1f(0x12e))/0x6*(-parseInt(_0x198b1f(0x12a))/0x7)+-parseInt(_0x198b1f(0x11e))/0x8+-parseInt(_0x198b1f(0x124))/0x9+parseInt(_0x198b1f(0x12f))/0xa*(parseInt(_0x198b1f(0x121))/0xb);if(_0x795f11===_0x29a1e0)break;else _0x13eac9['push'](_0x13eac9['shift']());}catch(_0x229066){_0x13eac9['push'](_0x13eac9['shift']());}}}(a27_0xe814,0x849cd));function a27_0x5600(_0x2226e9,_0x2582c0){_0x2226e9=_0x2226e9-0x11d;const _0xe8149c=a27_0xe814();let _0x560076=_0xe8149c[_0x2226e9];return _0x560076;}import{listDatasets}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';export const datasetList={'service':a27_0x176b3d(0x133),'command':a27_0x176b3d(0x126),'description':'List\x20datasets\x20in\x20the\x20app\x20(supports\x20server-side\x20name/code\x20filtering)','risk':a27_0x176b3d(0x130),'flags':[{'name':'name','type':'string','description':a27_0x176b3d(0x11d)},{...CODE_FLAG,'required':![],'description':a27_0x176b3d(0x137)}],async 'execute'(_0x23ecb7){const _0x5f26f8=a27_0x176b3d,_0x51729e=_0x23ecb7['str'](_0x5f26f8(0x123)),_0x1d304c=_0x23ecb7['str'](_0x5f26f8(0x12c)),_0x51d63c=await listDatasets(_0x23ecb7[_0x5f26f8(0x11f)],{..._0x51729e&&{'name':_0x51729e},..._0x1d304c&&{'code':_0x1d304c}});return{'ok':!![],'data':{'total':_0x51d63c[_0x5f26f8(0x128)],'datasets':_0x51d63c[_0x5f26f8(0x122)](_0x47bd6a=>{const _0x3c696c=_0x5f26f8,_0x342722=_0x47bd6a[_0x3c696c(0x127)]??{};return{'id':_0x47bd6a['id'],'code':_0x47bd6a[_0x3c696c(0x12c)],'name':_0x47bd6a[_0x3c696c(0x123)],'source':_0x47bd6a[_0x3c696c(0x120)],'description':_0x47bd6a[_0x3c696c(0x134)],'table':_0x342722['tableName'],'datasetKey':_0x342722[_0x3c696c(0x136)],'pk':_0x342722[_0x3c696c(0x129)],'fields':_0x342722['allFields']?_0x342722[_0x3c696c(0x132)][_0x3c696c(0x135)](',')[_0x3c696c(0x122)](_0x2cac91=>_0x2cac91['trim']()):[]};})}};}};
@@ -1 +1 @@
1
- function a28_0xf06e(){const _0x387296=['2799zwgXSe','501tRAZul','2182268eqDSRi','appCode','string','Get\x20SDK\x20usage\x20markdown\x20for\x20a\x20dataset\x20code','431004sdnlSB','#\x20Dataset\x20SDK\x20Usage\x20Documentation\x0a\x0a暂无\x20SDK\x20使用文档','136njAkXv','6715290ddbhpu','3132954yjPTfh','2626AsXVLu','dataset','read','Dataset\x20code\x20(32\x20characters).\x20Numeric\x20dataset\x20IDs\x20are\x20not\x20accepted.','1318884xFVtKK','5WUfVbM'];a28_0xf06e=function(){return _0x387296;};return a28_0xf06e();}const a28_0x1c47b4=a28_0x26d4;(function(_0xa9cec,_0x2fc787){const _0x42f56e=a28_0x26d4,_0x242dc8=_0xa9cec();while(!![]){try{const _0x48afd6=parseInt(_0x42f56e(0x18c))/0x1+parseInt(_0x42f56e(0x191))/0x2*(parseInt(_0x42f56e(0x187))/0x3)+parseInt(_0x42f56e(0x188))/0x4*(-parseInt(_0x42f56e(0x185))/0x5)+-parseInt(_0x42f56e(0x190))/0x6+parseInt(_0x42f56e(0x184))/0x7+-parseInt(_0x42f56e(0x18e))/0x8*(parseInt(_0x42f56e(0x186))/0x9)+parseInt(_0x42f56e(0x18f))/0xa;if(_0x48afd6===_0x2fc787)break;else _0x242dc8['push'](_0x242dc8['shift']());}catch(_0x14e13d){_0x242dc8['push'](_0x242dc8['shift']());}}}(a28_0xf06e,0x6abd3));import{getDatasetSdkUsageDoc}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';function a28_0x26d4(_0x31ebe7,_0xe00017){_0x31ebe7=_0x31ebe7-0x183;const _0xf06eb3=a28_0xf06e();let _0x26d4b5=_0xf06eb3[_0x31ebe7];return _0x26d4b5;}const DEFAULT_MARKDOWN=a28_0x1c47b4(0x18d);export function formatDatasetSdkMarkdown(_0x58ad4a){const _0x5346c8=a28_0x1c47b4,_0x31aca1=typeof _0x58ad4a===_0x5346c8(0x18a)?_0x58ad4a['trim']():'';return _0x31aca1||DEFAULT_MARKDOWN;}export const datasetSdkDoc={'service':a28_0x1c47b4(0x192),'command':'sdk-doc','description':a28_0x1c47b4(0x18b),'risk':a28_0x1c47b4(0x193),'flags':[{...CODE_FLAG,'description':a28_0x1c47b4(0x183)}],async 'execute'(_0x3b733f){const _0x262314=a28_0x1c47b4,_0x3b68ec=_0x3b733f['str']('code'),_0xa0bcfd=await getDatasetSdkUsageDoc(_0x3b68ec,_0x3b733f[_0x262314(0x189)]);return{'ok':!![],'data':{'code':_0x3b68ec,'appCode':_0x3b733f[_0x262314(0x189)],'markdown':formatDatasetSdkMarkdown(_0xa0bcfd)}};}};
1
+ const a28_0xfef77f=a28_0x359e;(function(_0x5c767e,_0x534d23){const _0x171f6b=a28_0x359e,_0xb1ef02=_0x5c767e();while(!![]){try{const _0x424a9a=parseInt(_0x171f6b(0x1d8))/0x1+parseInt(_0x171f6b(0x1e0))/0x2*(parseInt(_0x171f6b(0x1da))/0x3)+-parseInt(_0x171f6b(0x1dc))/0x4+-parseInt(_0x171f6b(0x1e6))/0x5*(-parseInt(_0x171f6b(0x1e5))/0x6)+-parseInt(_0x171f6b(0x1db))/0x7*(parseInt(_0x171f6b(0x1d9))/0x8)+-parseInt(_0x171f6b(0x1e2))/0x9+parseInt(_0x171f6b(0x1e3))/0xa*(parseInt(_0x171f6b(0x1df))/0xb);if(_0x424a9a===_0x534d23)break;else _0xb1ef02['push'](_0xb1ef02['shift']());}catch(_0x4ddb7a){_0xb1ef02['push'](_0xb1ef02['shift']());}}}(a28_0x2dd9,0xd1b4e));function a28_0x359e(_0x4f4754,_0x35c905){_0x4f4754=_0x4f4754-0x1d6;const _0x2dd9ac=a28_0x2dd9();let _0x359ec5=_0x2dd9ac[_0x4f4754];return _0x359ec5;}import{getDatasetSdkUsageDoc}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';const DEFAULT_MARKDOWN=a28_0xfef77f(0x1d7);export function formatDatasetSdkMarkdown(_0x2bd760){const _0x996443=a28_0xfef77f,_0x44eb5f=typeof _0x2bd760===_0x996443(0x1e1)?_0x2bd760['trim']():'';return _0x44eb5f||DEFAULT_MARKDOWN;}function a28_0x2dd9(){const _0x433f2f=['14430uQmBiR','appCode','3030vXHbMi','6675UEycBY','Dataset\x20code\x20(32\x20characters).\x20Numeric\x20dataset\x20IDs\x20are\x20not\x20accepted.','sdk-doc','#\x20Dataset\x20SDK\x20Usage\x20Documentation\x0a\x0a暂无\x20SDK\x20使用文档','750074EvxZuB','8lILKVy','291MUTItc','7521486oJVmSJ','5832976MHhxoz','read','code','25927vuuKcX','660QsbnKo','string','13191390mgMeVR'];a28_0x2dd9=function(){return _0x433f2f;};return a28_0x2dd9();}export const datasetSdkDoc={'service':'dataset','command':a28_0xfef77f(0x1d6),'description':'Get\x20SDK\x20usage\x20markdown\x20for\x20a\x20dataset\x20code','risk':a28_0xfef77f(0x1dd),'flags':[{...CODE_FLAG,'description':a28_0xfef77f(0x1e7)}],async 'execute'(_0x365066){const _0x456d3a=a28_0xfef77f,_0x13a314=_0x365066['str'](_0x456d3a(0x1de)),_0x23d0f2=await getDatasetSdkUsageDoc(_0x13a314,_0x365066[_0x456d3a(0x1e4)]);return{'ok':!![],'data':{'code':_0x13a314,'appCode':_0x365066[_0x456d3a(0x1e4)],'markdown':formatDatasetSdkMarkdown(_0x23d0f2)}};}};
@@ -1 +1 @@
1
- const a29_0x1757f6=a29_0x1e70;(function(_0x317034,_0x388c60){const _0x17cb8e=a29_0x1e70,_0x57d307=_0x317034();while(!![]){try{const _0x2ad8ba=parseInt(_0x17cb8e(0x1ab))/0x1+-parseInt(_0x17cb8e(0x174))/0x2+-parseInt(_0x17cb8e(0x1b9))/0x3+-parseInt(_0x17cb8e(0x17a))/0x4+-parseInt(_0x17cb8e(0x16e))/0x5*(-parseInt(_0x17cb8e(0x1bb))/0x6)+-parseInt(_0x17cb8e(0x184))/0x7*(-parseInt(_0x17cb8e(0x1b2))/0x8)+-parseInt(_0x17cb8e(0x1a3))/0x9;if(_0x2ad8ba===_0x388c60)break;else _0x57d307['push'](_0x57d307['shift']());}catch(_0x5a1f45){_0x57d307['push'](_0x57d307['shift']());}}}(a29_0x447a,0x24125));import a29_0x23d053 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';function a29_0x1e70(_0x289527,_0x4c31df){_0x289527=_0x289527-0x16b;const _0x447a3e=a29_0x447a();let _0x1e7011=_0x447a3e[_0x289527];return _0x1e7011;}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(_0x34873d){const _0x5c1d5a=a29_0x1e70,_0x19ae60=getCliVersion(),_0x86e55d=buildConfigFromFlags({});await initGlobalEnvironment(_0x86e55d),console[_0x5c1d5a(0x180)](),console[_0x5c1d5a(0x180)](a29_0x23d053[_0x5c1d5a(0x18d)](CLI_BIN_NAME+_0x5c1d5a(0x178))),console[_0x5c1d5a(0x180)](a29_0x23d053[_0x5c1d5a(0x1b4)]('─'['repeat'](0x32))),console[_0x5c1d5a(0x180)](_0x5c1d5a(0x19b)+_0x19ae60),console['log'](_0x5c1d5a(0x1ac)+process['version']),console[_0x5c1d5a(0x180)]('\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0x5c1d5a(0x189)]+'\x20'+process[_0x5c1d5a(0x18c)]),console[_0x5c1d5a(0x180)](),console[_0x5c1d5a(0x180)](a29_0x23d053[_0x5c1d5a(0x18d)](_0x5c1d5a(0x1aa))),console['log'](a29_0x23d053[_0x5c1d5a(0x1b4)]('\x20\x20─'[_0x5c1d5a(0x17c)](0x1e)));const _0x8683a5=getGlobalConfigPath(),_0x37c60b=getProjectConfigPath();console['log'](_0x5c1d5a(0x173)+(_0x8683a5||a29_0x23d053[_0x5c1d5a(0x1b4)](_0x5c1d5a(0x1a6)))),console[_0x5c1d5a(0x180)](_0x5c1d5a(0x17e)+(_0x37c60b||a29_0x23d053['gray'](_0x5c1d5a(0x1a6)))),console[_0x5c1d5a(0x180)](),console[_0x5c1d5a(0x180)](a29_0x23d053[_0x5c1d5a(0x18d)](_0x5c1d5a(0x1bd))),console[_0x5c1d5a(0x180)](a29_0x23d053['gray'](_0x5c1d5a(0x1b1)['repeat'](0x1e)));const _0x1efc54=(_0x5c1b5c,_0x3d2d56)=>{const _0x78727c=_0x5c1d5a;if(!_0x3d2d56){console[_0x78727c(0x180)]('\x20\x20'+_0x5c1b5c[_0x78727c(0x171)](0x11)+'\x20'+a29_0x23d053[_0x78727c(0x1b4)](_0x78727c(0x188)));return;}const _0x18d9cf=inspectCliConfigJsonFile(_0x3d2d56);if(_0x18d9cf[_0x78727c(0x1ba)]==='ok')console['log']('\x20\x20'+_0x5c1b5c[_0x78727c(0x171)](0x11)+'\x20'+a29_0x23d053[_0x78727c(0x19e)](_0x78727c(0x181)));else{if(_0x18d9cf[_0x78727c(0x1ba)]===_0x78727c(0x19d))console[_0x78727c(0x180)]('\x20\x20'+_0x5c1b5c[_0x78727c(0x171)](0x11)+'\x20'+a29_0x23d053[_0x78727c(0x18e)](_0x78727c(0x176)));else _0x18d9cf[_0x78727c(0x1ba)]===_0x78727c(0x1a2)?console['log']('\x20\x20'+_0x5c1b5c[_0x78727c(0x171)](0x11)+'\x20'+a29_0x23d053[_0x78727c(0x1b4)]('(missing)')):(console[_0x78727c(0x180)]('\x20\x20'+_0x5c1b5c[_0x78727c(0x171)](0x11)+'\x20'+a29_0x23d053[_0x78727c(0x198)](_0x78727c(0x192))),console[_0x78727c(0x180)]('\x20\x20'+''[_0x78727c(0x171)](0x11)+'\x20'+a29_0x23d053[_0x78727c(0x198)](_0x18d9cf[_0x78727c(0x1be)])));}};_0x1efc54(_0x5c1d5a(0x1b3),_0x8683a5),_0x1efc54(_0x5c1d5a(0x179),_0x37c60b),console[_0x5c1d5a(0x180)](),console[_0x5c1d5a(0x180)](a29_0x23d053[_0x5c1d5a(0x18d)](_0x5c1d5a(0x1b0))),console['log'](a29_0x23d053[_0x5c1d5a(0x1b4)](_0x5c1d5a(0x1b1)[_0x5c1d5a(0x17c)](0x1e))),console['log'](_0x5c1d5a(0x16c)+(_0x86e55d[_0x5c1d5a(0x1bc)]||a29_0x23d053[_0x5c1d5a(0x198)]('(not\x20set)'))),console['log'](_0x5c1d5a(0x18b)+_0x86e55d['env']);const _0x2ae2b2=isLegacyCompatConfigKey(_0x5c1d5a(0x172))?a29_0x23d053[_0x5c1d5a(0x1b4)](_0x86e55d[_0x5c1d5a(0x172)]+_0x5c1d5a(0x1a0)):_0x86e55d[_0x5c1d5a(0x172)];console[_0x5c1d5a(0x180)]('\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x2ae2b2),console[_0x5c1d5a(0x180)]('\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20'+(_0x86e55d[_0x5c1d5a(0x175)]||a29_0x23d053['gray'](_0x5c1d5a(0x187)))),console[_0x5c1d5a(0x180)](_0x5c1d5a(0x1b6)+(_0x86e55d[_0x5c1d5a(0x18a)]||a29_0x23d053['gray'](_0x5c1d5a(0x187)))),console['log'](_0x5c1d5a(0x1a8)+(_0x86e55d[_0x5c1d5a(0x183)]||a29_0x23d053[_0x5c1d5a(0x1b4)]('(default:\x20'+DEFAULT_CONFIG_VALUES[_0x5c1d5a(0x183)]+')'))),console[_0x5c1d5a(0x180)]('\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x86e55d[_0x5c1d5a(0x1b5)]??a29_0x23d053['gray'](_0x5c1d5a(0x170)))),console[_0x5c1d5a(0x180)](_0x5c1d5a(0x1af)+_0x86e55d[_0x5c1d5a(0x1ae)]),console['log'](_0x5c1d5a(0x186)+_0x86e55d['verbose']),console[_0x5c1d5a(0x180)](_0x5c1d5a(0x19f)+AUTH_MODE[_0x5c1d5a(0x1ad)]),console[_0x5c1d5a(0x180)](_0x5c1d5a(0x185)+(_0x86e55d['accessKey']?a29_0x23d053[_0x5c1d5a(0x19e)](_0x5c1d5a(0x194)+_0x86e55d['accessKey'][_0x5c1d5a(0x17b)]+')'):a29_0x23d053['gray']('(none)'))),console[_0x5c1d5a(0x180)](),console[_0x5c1d5a(0x180)](a29_0x23d053[_0x5c1d5a(0x18d)](_0x5c1d5a(0x1a4))),console[_0x5c1d5a(0x180)](a29_0x23d053[_0x5c1d5a(0x1b4)](_0x5c1d5a(0x1b1)['repeat'](0x1e))),console[_0x5c1d5a(0x180)]('\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20'+getApiDomain()),console[_0x5c1d5a(0x180)](_0x5c1d5a(0x177)+getUserDomain()),console[_0x5c1d5a(0x180)](_0x5c1d5a(0x19a)+getRuntimeDomain()),console[_0x5c1d5a(0x180)](),console[_0x5c1d5a(0x180)](a29_0x23d053['bold'](_0x5c1d5a(0x197))),console[_0x5c1d5a(0x180)](a29_0x23d053[_0x5c1d5a(0x1b4)]('\x20\x20─'[_0x5c1d5a(0x17c)](0x1e)));const _0x372724=inspectServiceRegistry();console[_0x5c1d5a(0x180)](_0x5c1d5a(0x196)+_0x372724[_0x5c1d5a(0x190)]),console[_0x5c1d5a(0x180)]('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+formatServiceRegistryStatus(_0x372724)),console[_0x5c1d5a(0x180)](_0x5c1d5a(0x1a1)+_0x372724[_0x5c1d5a(0x1b8)]),console[_0x5c1d5a(0x180)](_0x5c1d5a(0x1a5)+_0x372724[_0x5c1d5a(0x191)]);for(const _0xb0c5f7 of _0x372724[_0x5c1d5a(0x1b7)]){console['log']('\x20\x20'+(_0xb0c5f7[_0x5c1d5a(0x195)]+':')[_0x5c1d5a(0x171)](0x11)+'\x20'+(_0xb0c5f7['name']||a29_0x23d053['gray'](_0x5c1d5a(0x199)))+'\x20('+_0xb0c5f7[_0x5c1d5a(0x191)]+'\x20commands)'),console[_0x5c1d5a(0x180)]('\x20\x20'+''[_0x5c1d5a(0x171)](0x11)+_0x5c1d5a(0x16b)+_0xb0c5f7['source'][_0x5c1d5a(0x17f)]);}return console[_0x5c1d5a(0x180)](),console[_0x5c1d5a(0x180)](a29_0x23d053[_0x5c1d5a(0x18d)](_0x5c1d5a(0x182))),console[_0x5c1d5a(0x180)](a29_0x23d053[_0x5c1d5a(0x1b4)](_0x5c1d5a(0x1b1)[_0x5c1d5a(0x17c)](0x1e))),console[_0x5c1d5a(0x180)](_0x5c1d5a(0x19c)+a29_0x23d053[_0x5c1d5a(0x19e)](AUTH_MODE[_0x5c1d5a(0x1ad)]+_0x5c1d5a(0x1bf))),console[_0x5c1d5a(0x180)](_0x5c1d5a(0x16d)+a29_0x23d053[_0x5c1d5a(0x1b4)](_0x5c1d5a(0x18f))),console[_0x5c1d5a(0x180)](),{'ok':!![]};}function a29_0x447a(){const _0x36cdc9=['currentApp','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','arch','bold','yellow','(removed\x20—\x20cookie\x20auth\x20disabled)','registryPath','commandCount','✗\x20Invalid\x20JSON','Diagnose\x20CLI\x20configuration\x20and\x20environment','(set,\x20length=','serviceCode','\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Service\x20Tree','red','(unnamed)','\x20\x20runtimeDomain:\x20\x20\x20','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','empty','green','\x20\x20auth\x20(effective):\x20','\x20(legacy/compat\x20only)','\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20','missing','235629BLwPZJ','\x20\x20API\x20Endpoints','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','(not\x20found)','doctor','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','✓\x20Loaded','\x20\x20Config\x20Files','91090kMAxuG','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','ClientAk','riskLevel','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','\x20\x20Merged\x20Config','\x20\x20─','1140368snvJTi','Global','gray','pageSize','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','services','serviceCount','139122XHfyUM','status','18SmzVhW','appCode','\x20\x20Config\x20JSON','message','\x20(accessKey)','\x20Imported\x20from:\x20','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Session\x20check:\x20\x20\x20','93425ROZwvB','read','(default)','padEnd','locale','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','43438cNMpWm','defaultApp','⚠\x20Empty\x20(treated\x20as\x20{})','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','\x20doctor','Project','190672PaqQOf','length','repeat','check','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','path','log','✓\x20Valid\x20JSON','\x20\x20Auth','format','7ZJqThX','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','(none)','(no\x20file)','platform'];a29_0x447a=function(){return _0x36cdc9;};return a29_0x447a();}function formatServiceRegistryStatus(_0x557be4){const _0x1c4ba7=a29_0x1e70;if(_0x557be4[_0x1c4ba7(0x1ba)]==='ok')return a29_0x23d053[_0x1c4ba7(0x19e)](_0x1c4ba7(0x1a9));if(_0x557be4['status']===_0x1c4ba7(0x1a2))return a29_0x23d053[_0x1c4ba7(0x1b4)](_0x1c4ba7(0x1a6));if(_0x557be4[_0x1c4ba7(0x1ba)]===_0x1c4ba7(0x19d))return a29_0x23d053['yellow']('⚠\x20Empty');return a29_0x23d053[_0x1c4ba7(0x198)]('✗\x20Invalid'+(_0x557be4[_0x1c4ba7(0x1be)]?':\x20'+_0x557be4[_0x1c4ba7(0x1be)]:''));}export const doctorDefinition={'service':a29_0x1757f6(0x1a7),'command':a29_0x1757f6(0x17d),'description':a29_0x1757f6(0x193),'risk':a29_0x1757f6(0x16f),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
1
+ function a29_0x2d79(_0x3253e7,_0x40b303){_0x3253e7=_0x3253e7-0x103;const _0x5e06ee=a29_0x5e06();let _0x2d79a1=_0x5e06ee[_0x3253e7];return _0x2d79a1;}const a29_0x3e6172=a29_0x2d79;(function(_0x362174,_0x2c22d6){const _0x48aafa=a29_0x2d79,_0xb408f8=_0x362174();while(!![]){try{const _0x9e22cb=parseInt(_0x48aafa(0x13a))/0x1*(-parseInt(_0x48aafa(0x141))/0x2)+parseInt(_0x48aafa(0x13e))/0x3+parseInt(_0x48aafa(0x14c))/0x4*(-parseInt(_0x48aafa(0x103))/0x5)+-parseInt(_0x48aafa(0x131))/0x6*(parseInt(_0x48aafa(0x11d))/0x7)+parseInt(_0x48aafa(0x14a))/0x8*(parseInt(_0x48aafa(0x129))/0x9)+parseInt(_0x48aafa(0x108))/0xa*(-parseInt(_0x48aafa(0x133))/0xb)+parseInt(_0x48aafa(0x150))/0xc*(parseInt(_0x48aafa(0x11b))/0xd);if(_0x9e22cb===_0x2c22d6)break;else _0xb408f8['push'](_0xb408f8['shift']());}catch(_0x366b31){_0xb408f8['push'](_0xb408f8['shift']());}}}(a29_0x5e06,0xe5f0e));import a29_0x3bd9fa 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';function a29_0x5e06(){const _0x4e6e26=['\x20(accessKey)','\x20Imported\x20from:\x20','currentApp','message','\x20\x20runtimeDomain:\x20\x20\x20','gray','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Auth','8dgWdtn','\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20','24184zvXbUW','(missing)','commandCount','(not\x20set)','996YCPVgl','\x20\x20Merged\x20Config','verbose','\x20\x20Config\x20JSON','serviceCount','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','5PiXSiH','services','serviceCode','(none)','read','4360QUibwi','yellow','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','riskLevel','bold','\x20\x20─','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','missing','✗\x20Invalid\x20JSON','arch','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','repeat','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','\x20\x20Service\x20Tree','⚠\x20Empty\x20(treated\x20as\x20{})','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','log','\x20\x20Config\x20Files','205894SsEkgC','✓\x20Valid\x20JSON','329UtInEF','\x20doctor','red','source','version','\x20\x20Session\x20check:\x20\x20\x20','env','status','Global','ClientAk','platform','accessKey','14700132qvxxeF','\x20\x20API\x20Endpoints','green','(not\x20found)','appCode','pageSize','path','(default)','116442umonIF','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','22132GdfVXi','(default:\x20','padEnd','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','format','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','461109tCZDPb','doctor','✗\x20Invalid','(set,\x20length=','751356tVDvGT','locale','\x20\x20auth\x20(effective):\x20','2nuwrXR'];a29_0x5e06=function(){return _0x4e6e26;};return a29_0x5e06();}import{inspectServiceRegistry}from'../commands/service/registry.js';async function execute(_0x1a6e15){const _0x118357=a29_0x2d79,_0x5ef4b3=getCliVersion(),_0x440461=buildConfigFromFlags({});await initGlobalEnvironment(_0x440461),console[_0x118357(0x119)](),console[_0x118357(0x119)](a29_0x3bd9fa[_0x118357(0x10c)](CLI_BIN_NAME+_0x118357(0x11e))),console[_0x118357(0x119)](a29_0x3bd9fa[_0x118357(0x147)]('─'[_0x118357(0x113)](0x32))),console[_0x118357(0x119)](_0x118357(0x132)+_0x5ef4b3),console['log']('\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0x118357(0x121)]),console[_0x118357(0x119)](_0x118357(0x136)+process[_0x118357(0x127)]+'\x20'+process[_0x118357(0x111)]),console['log'](),console[_0x118357(0x119)](a29_0x3bd9fa['bold'](_0x118357(0x11a))),console['log'](a29_0x3bd9fa['gray'](_0x118357(0x10d)[_0x118357(0x113)](0x1e)));const _0x2045ca=getGlobalConfigPath(),_0x211b02=getProjectConfigPath();console[_0x118357(0x119)]('\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x2045ca||a29_0x3bd9fa['gray'](_0x118357(0x12c)))),console['log']('\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x211b02||a29_0x3bd9fa[_0x118357(0x147)](_0x118357(0x12c)))),console['log'](),console['log'](a29_0x3bd9fa[_0x118357(0x10c)](_0x118357(0x153))),console['log'](a29_0x3bd9fa[_0x118357(0x147)](_0x118357(0x10d)[_0x118357(0x113)](0x1e)));const _0x5074c2=(_0x4c21ac,_0x224c8a)=>{const _0x584f71=_0x118357;if(!_0x224c8a){console[_0x584f71(0x119)]('\x20\x20'+_0x4c21ac[_0x584f71(0x135)](0x11)+'\x20'+a29_0x3bd9fa[_0x584f71(0x147)]('(no\x20file)'));return;}const _0x5f27ee=inspectCliConfigJsonFile(_0x224c8a);if(_0x5f27ee[_0x584f71(0x124)]==='ok')console['log']('\x20\x20'+_0x4c21ac['padEnd'](0x11)+'\x20'+a29_0x3bd9fa[_0x584f71(0x12b)](_0x584f71(0x11c)));else{if(_0x5f27ee[_0x584f71(0x124)]==='empty')console[_0x584f71(0x119)]('\x20\x20'+_0x4c21ac['padEnd'](0x11)+'\x20'+a29_0x3bd9fa[_0x584f71(0x109)](_0x584f71(0x116)));else _0x5f27ee[_0x584f71(0x124)]===_0x584f71(0x10f)?console[_0x584f71(0x119)]('\x20\x20'+_0x4c21ac[_0x584f71(0x135)](0x11)+'\x20'+a29_0x3bd9fa[_0x584f71(0x147)](_0x584f71(0x14d))):(console[_0x584f71(0x119)]('\x20\x20'+_0x4c21ac[_0x584f71(0x135)](0x11)+'\x20'+a29_0x3bd9fa['red'](_0x584f71(0x110))),console[_0x584f71(0x119)]('\x20\x20'+''[_0x584f71(0x135)](0x11)+'\x20'+a29_0x3bd9fa[_0x584f71(0x11f)](_0x5f27ee[_0x584f71(0x145)])));}};_0x5074c2(_0x118357(0x125),_0x2045ca),_0x5074c2('Project',_0x211b02),console[_0x118357(0x119)](),console['log'](a29_0x3bd9fa[_0x118357(0x10c)](_0x118357(0x151))),console[_0x118357(0x119)](a29_0x3bd9fa[_0x118357(0x147)](_0x118357(0x10d)[_0x118357(0x113)](0x1e))),console[_0x118357(0x119)](_0x118357(0x138)+(_0x440461[_0x118357(0x12d)]||a29_0x3bd9fa[_0x118357(0x11f)](_0x118357(0x14f)))),console[_0x118357(0x119)](_0x118357(0x148)+_0x440461[_0x118357(0x123)]);const _0x155a63=isLegacyCompatConfigKey(_0x118357(0x13f))?a29_0x3bd9fa[_0x118357(0x147)](_0x440461[_0x118357(0x13f)]+'\x20(legacy/compat\x20only)'):_0x440461['locale'];console[_0x118357(0x119)](_0x118357(0x117)+_0x155a63),console[_0x118357(0x119)](_0x118357(0x139)+(_0x440461['defaultApp']||a29_0x3bd9fa['gray'](_0x118357(0x106)))),console[_0x118357(0x119)](_0x118357(0x10e)+(_0x440461[_0x118357(0x144)]||a29_0x3bd9fa[_0x118357(0x147)](_0x118357(0x106)))),console[_0x118357(0x119)]('\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x440461['format']||a29_0x3bd9fa[_0x118357(0x147)](_0x118357(0x134)+DEFAULT_CONFIG_VALUES[_0x118357(0x137)]+')'))),console['log']('\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x440461[_0x118357(0x12e)]??a29_0x3bd9fa[_0x118357(0x147)](_0x118357(0x130)))),console['log']('\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20'+_0x440461[_0x118357(0x10b)]),console[_0x118357(0x119)](_0x118357(0x118)+_0x440461[_0x118357(0x152)]),console[_0x118357(0x119)](_0x118357(0x140)+AUTH_MODE[_0x118357(0x126)]),console[_0x118357(0x119)](_0x118357(0x155)+(_0x440461[_0x118357(0x128)]?a29_0x3bd9fa['green'](_0x118357(0x13d)+_0x440461['accessKey']['length']+')'):a29_0x3bd9fa['gray']('(none)'))),console['log'](),console[_0x118357(0x119)](a29_0x3bd9fa['bold'](_0x118357(0x12a))),console[_0x118357(0x119)](a29_0x3bd9fa['gray']('\x20\x20─'[_0x118357(0x113)](0x1e))),console[_0x118357(0x119)](_0x118357(0x114)+getApiDomain()),console['log']('\x20\x20userDomain:\x20\x20\x20\x20\x20\x20'+getUserDomain()),console['log'](_0x118357(0x146)+getRuntimeDomain()),console[_0x118357(0x119)](),console['log'](a29_0x3bd9fa[_0x118357(0x10c)](_0x118357(0x115))),console[_0x118357(0x119)](a29_0x3bd9fa[_0x118357(0x147)]('\x20\x20─'[_0x118357(0x113)](0x1e)));const _0x55387f=inspectServiceRegistry();console[_0x118357(0x119)]('\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x55387f['registryPath']),console['log']('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+formatServiceRegistryStatus(_0x55387f)),console[_0x118357(0x119)](_0x118357(0x14b)+_0x55387f[_0x118357(0x154)]),console[_0x118357(0x119)](_0x118357(0x10a)+_0x55387f[_0x118357(0x14e)]);for(const _0x3cc73c of _0x55387f[_0x118357(0x104)]){console['log']('\x20\x20'+(_0x3cc73c[_0x118357(0x105)]+':')['padEnd'](0x11)+'\x20'+(_0x3cc73c['name']||a29_0x3bd9fa[_0x118357(0x147)]('(unnamed)'))+'\x20('+_0x3cc73c[_0x118357(0x14e)]+'\x20commands)'),console[_0x118357(0x119)]('\x20\x20'+''[_0x118357(0x135)](0x11)+_0x118357(0x143)+_0x3cc73c[_0x118357(0x120)][_0x118357(0x12f)]);}return console[_0x118357(0x119)](),console['log'](a29_0x3bd9fa['bold'](_0x118357(0x149))),console[_0x118357(0x119)](a29_0x3bd9fa[_0x118357(0x147)](_0x118357(0x10d)['repeat'](0x1e))),console['log'](_0x118357(0x112)+a29_0x3bd9fa['green'](AUTH_MODE['ClientAk']+_0x118357(0x142))),console[_0x118357(0x119)](_0x118357(0x122)+a29_0x3bd9fa[_0x118357(0x147)]('(removed\x20—\x20cookie\x20auth\x20disabled)')),console[_0x118357(0x119)](),{'ok':!![]};}function formatServiceRegistryStatus(_0x29fe3c){const _0x3d2ba6=a29_0x2d79;if(_0x29fe3c[_0x3d2ba6(0x124)]==='ok')return a29_0x3bd9fa[_0x3d2ba6(0x12b)]('✓\x20Loaded');if(_0x29fe3c[_0x3d2ba6(0x124)]===_0x3d2ba6(0x10f))return a29_0x3bd9fa[_0x3d2ba6(0x147)]('(not\x20found)');if(_0x29fe3c[_0x3d2ba6(0x124)]==='empty')return a29_0x3bd9fa[_0x3d2ba6(0x109)]('⚠\x20Empty');return a29_0x3bd9fa[_0x3d2ba6(0x11f)](_0x3d2ba6(0x13c)+(_0x29fe3c[_0x3d2ba6(0x145)]?':\x20'+_0x29fe3c[_0x3d2ba6(0x145)]:''));}export const doctorDefinition={'service':a29_0x3e6172(0x13b),'command':'check','description':'Diagnose\x20CLI\x20configuration\x20and\x20environment','risk':a29_0x3e6172(0x107),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
@@ -1 +1 @@
1
- const a30_0x2b6546=a30_0x3f76;(function(_0x518dfd,_0x84bc84){const _0x5c74fe=a30_0x3f76,_0x639bb9=_0x518dfd();while(!![]){try{const _0x5a88a2=-parseInt(_0x5c74fe(0x12f))/0x1+-parseInt(_0x5c74fe(0x12c))/0x2+parseInt(_0x5c74fe(0x125))/0x3+-parseInt(_0x5c74fe(0x139))/0x4*(parseInt(_0x5c74fe(0x12a))/0x5)+parseInt(_0x5c74fe(0x130))/0x6*(-parseInt(_0x5c74fe(0x143))/0x7)+-parseInt(_0x5c74fe(0x13f))/0x8+parseInt(_0x5c74fe(0x134))/0x9*(parseInt(_0x5c74fe(0x136))/0xa);if(_0x5a88a2===_0x84bc84)break;else _0x639bb9['push'](_0x639bb9['shift']());}catch(_0x13a0b7){_0x639bb9['push'](_0x639bb9['shift']());}}}(a30_0x4bf2,0x54c3f));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';import{queryRuntimeFileUrl,uploadRuntimeFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const FILE_FLAG={'name':'file','type':a30_0x2b6546(0x13e),'required':!![],'description':a30_0x2b6546(0x137)},FILEPATH_FLAG={'name':'filepath','type':a30_0x2b6546(0x13e),'required':!![],'description':a30_0x2b6546(0x138)},DOWNLOAD_FLAG={'name':a30_0x2b6546(0x140),'type':a30_0x2b6546(0x123),'description':a30_0x2b6546(0x122)};function a30_0x3f76(_0x9d7903,_0x4127b5){_0x9d7903=_0x9d7903-0x11d;const _0x4bf229=a30_0x4bf2();let _0x3f76a1=_0x4bf229[_0x9d7903];return _0x3f76a1;}function a30_0x4bf2(){const _0x397f16=['534136rMMxrj','File','body','upload','Preview:\x20upload\x20','string','4458560ARWliC','download','validation','appCode','3473582cbeGyc','bool','POST','description','filePath','path','Return\x20a\x20download\x20URL\x20instead\x20of\x20a\x20preview\x20URL\x20when\x20supported','boolean','filepath','230361KVBOsA','\x20to\x20runtime\x20app\x20','file','query-url','read','10nQkzdv','str','243620TgAjJf','build','Uploaded\x20file:\x20','34597TgFZaI','6kFwEaB','trim','Uploaded\x20file.','Query\x20a\x20temporary\x20URL\x20for\x20an\x20uploaded\x20runtime\x20file','15726897NvFEcg','write','10bqjmIr','Path\x20to\x20the\x20local\x20file\x20to\x20upload','Runtime\x20filePath\x20returned\x20by\x20file\x20upload'];a30_0x4bf2=function(){return _0x397f16;};return a30_0x4bf2();}function requireFilePath(_0x1321e3){const _0x4473d1=a30_0x2b6546,_0x19b324=_0x1321e3[_0x4473d1(0x131)]();if(!_0x19b324)throw CliErrors[_0x4473d1(0x141)]('filePath\x20is\x20required.');return _0x19b324;}const fileUpload={'service':a30_0x2b6546(0x127),'command':a30_0x2b6546(0x13c),'description':'Upload\x20a\x20local\x20file\x20to\x20the\x20current\x20runtime\x20app','risk':a30_0x2b6546(0x135),'flags':[FILE_FLAG],async 'dryRun'(_0x4598ce){const _0x873e44=a30_0x2b6546,_0x3490d5=requireRuntimeUploadFile(_0x4598ce['str'](_0x873e44(0x127)),_0x873e44(0x13a));return dryRun(_0x873e44(0x11e),'/client/uploadFile')[_0x873e44(0x13b)]({'appCode':_0x4598ce['appCode'],'multipart':{'file':_0x3490d5}})[_0x873e44(0x11f)](_0x873e44(0x13d)+_0x3490d5[_0x873e44(0x121)]+_0x873e44(0x126)+_0x4598ce[_0x873e44(0x142)])[_0x873e44(0x12d)]();},async 'execute'(_0x2b160b){const _0x2cf130=a30_0x2b6546,_0x2dae16=requireRuntimeUploadFile(_0x2b160b['str']('file'),_0x2cf130(0x13a)),_0x15248c=await uploadRuntimeFile(_0x2b160b[_0x2cf130(0x142)],_0x2dae16[_0x2cf130(0x121)]);return{'ok':!![],'data':_0x15248c,'message':_0x15248c[_0x2cf130(0x120)]?_0x2cf130(0x12e)+_0x15248c[_0x2cf130(0x120)]:_0x2cf130(0x132)};}},fileQueryUrl={'service':a30_0x2b6546(0x127),'command':a30_0x2b6546(0x128),'description':a30_0x2b6546(0x133),'risk':a30_0x2b6546(0x129),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG],async 'execute'(_0xebbd2d){const _0x362cd7=a30_0x2b6546,_0x4889a9=requireFilePath(_0xebbd2d[_0x362cd7(0x12b)](_0x362cd7(0x124))),_0x2280bc=await queryRuntimeFileUrl(_0x4889a9,{'download':_0xebbd2d[_0x362cd7(0x11d)](_0x362cd7(0x140))});return{'ok':!![],'data':_0x2280bc};}};export const fileDefinitions=[fileUpload,fileQueryUrl];
1
+ const a30_0x2de666=a30_0x20e6;(function(_0x1f4b27,_0x54a7bb){const _0x451005=a30_0x20e6,_0x3f6e5e=_0x1f4b27();while(!![]){try{const _0x4ddf81=-parseInt(_0x451005(0x187))/0x1*(parseInt(_0x451005(0x190))/0x2)+parseInt(_0x451005(0x188))/0x3+parseInt(_0x451005(0x174))/0x4*(-parseInt(_0x451005(0x179))/0x5)+parseInt(_0x451005(0x193))/0x6*(parseInt(_0x451005(0x18f))/0x7)+-parseInt(_0x451005(0x18a))/0x8*(parseInt(_0x451005(0x183))/0x9)+parseInt(_0x451005(0x177))/0xa+parseInt(_0x451005(0x17c))/0xb*(-parseInt(_0x451005(0x195))/0xc);if(_0x4ddf81===_0x54a7bb)break;else _0x3f6e5e['push'](_0x3f6e5e['shift']());}catch(_0x30f632){_0x3f6e5e['push'](_0x3f6e5e['shift']());}}}(a30_0x2eb2,0x751bf));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';import{queryRuntimeFileUrl,uploadRuntimeFile}from'../../core/api-client.js';function a30_0x2eb2(){const _0x2135f0=['9NCoVNp','download','trim','Preview:\x20upload\x20','1PwrTno','1524855MSgcwT','build','158776TcDyLK','validation','query-url','read','write','105moBUVU','1101160NbYcWN','path','upload','236658jXYmbR','string','36ZDPpxf','str','filepath','\x20to\x20runtime\x20app\x20','12BbLsWb','Path\x20to\x20the\x20local\x20file\x20to\x20upload','file','4113150DjpwdJ','File','15585IcVNYT','Uploaded\x20file.','Uploaded\x20file:\x20','1656556ruAFOk','bool','description','appCode','filePath','filePath\x20is\x20required.','Return\x20a\x20download\x20URL\x20instead\x20of\x20a\x20preview\x20URL\x20when\x20supported'];a30_0x2eb2=function(){return _0x2135f0;};return a30_0x2eb2();}import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const FILE_FLAG={'name':a30_0x2de666(0x176),'type':a30_0x2de666(0x194),'required':!![],'description':a30_0x2de666(0x175)},FILEPATH_FLAG={'name':a30_0x2de666(0x172),'type':a30_0x2de666(0x194),'required':!![],'description':'Runtime\x20filePath\x20returned\x20by\x20file\x20upload'},DOWNLOAD_FLAG={'name':a30_0x2de666(0x184),'type':'boolean','description':a30_0x2de666(0x182)};function requireFilePath(_0xc42047){const _0x48b373=a30_0x2de666,_0x32d593=_0xc42047[_0x48b373(0x185)]();if(!_0x32d593)throw CliErrors[_0x48b373(0x18b)](_0x48b373(0x181));return _0x32d593;}const fileUpload={'service':a30_0x2de666(0x176),'command':a30_0x2de666(0x192),'description':'Upload\x20a\x20local\x20file\x20to\x20the\x20current\x20runtime\x20app','risk':a30_0x2de666(0x18e),'flags':[FILE_FLAG],async 'dryRun'(_0x489f8c){const _0x546f5f=a30_0x2de666,_0x221554=requireRuntimeUploadFile(_0x489f8c[_0x546f5f(0x196)](_0x546f5f(0x176)),_0x546f5f(0x178));return dryRun('POST','/client/uploadFile')['body']({'appCode':_0x489f8c[_0x546f5f(0x17f)],'multipart':{'file':_0x221554}})[_0x546f5f(0x17e)](_0x546f5f(0x186)+_0x221554[_0x546f5f(0x191)]+_0x546f5f(0x173)+_0x489f8c[_0x546f5f(0x17f)])[_0x546f5f(0x189)]();},async 'execute'(_0x571c32){const _0x428039=a30_0x2de666,_0x59e94a=requireRuntimeUploadFile(_0x571c32[_0x428039(0x196)](_0x428039(0x176)),_0x428039(0x178)),_0x2b7dbb=await uploadRuntimeFile(_0x571c32[_0x428039(0x17f)],_0x59e94a['path']);return{'ok':!![],'data':_0x2b7dbb,'message':_0x2b7dbb[_0x428039(0x180)]?_0x428039(0x17b)+_0x2b7dbb[_0x428039(0x180)]:_0x428039(0x17a)};}},fileQueryUrl={'service':a30_0x2de666(0x176),'command':a30_0x2de666(0x18c),'description':'Query\x20a\x20temporary\x20URL\x20for\x20an\x20uploaded\x20runtime\x20file','risk':a30_0x2de666(0x18d),'flags':[FILEPATH_FLAG,DOWNLOAD_FLAG],async 'execute'(_0x2f2c49){const _0x1431e6=a30_0x2de666,_0x17f7aa=requireFilePath(_0x2f2c49['str'](_0x1431e6(0x172))),_0x40b000=await queryRuntimeFileUrl(_0x17f7aa,{'download':_0x2f2c49[_0x1431e6(0x17d)](_0x1431e6(0x184))});return{'ok':!![],'data':_0x40b000};}};function a30_0x20e6(_0x4d79aa,_0x15154c){_0x4d79aa=_0x4d79aa-0x172;const _0x2eb22f=a30_0x2eb2();let _0x20e670=_0x2eb22f[_0x4d79aa];return _0x20e670;}export const fileDefinitions=[fileUpload,fileQueryUrl];
@@ -1 +1 @@
1
- const a31_0x2014d5=a31_0x56d6;(function(_0x5009aa,_0x5f0794){const _0x1e5023=a31_0x56d6,_0x4e8209=_0x5009aa();while(!![]){try{const _0x2e1084=-parseInt(_0x1e5023(0x13f))/0x1*(parseInt(_0x1e5023(0x115))/0x2)+-parseInt(_0x1e5023(0x132))/0x3+parseInt(_0x1e5023(0x134))/0x4*(parseInt(_0x1e5023(0x136))/0x5)+-parseInt(_0x1e5023(0x106))/0x6+-parseInt(_0x1e5023(0x125))/0x7*(-parseInt(_0x1e5023(0x10d))/0x8)+-parseInt(_0x1e5023(0x114))/0x9*(parseInt(_0x1e5023(0x127))/0xa)+parseInt(_0x1e5023(0x141))/0xb;if(_0x2e1084===_0x5f0794)break;else _0x4e8209['push'](_0x4e8209['shift']());}catch(_0x445025){_0x4e8209['push'](_0x4e8209['shift']());}}}(a31_0x22a8,0x6d5eb));import{existsSync,readFileSync}from'node:fs';import{resolve,isAbsolute}from'node:path';import{createInterface}from'node:readline';import{CliErrors}from'../errors.js';function a31_0x22a8(){const _0x91d382=['toLowerCase','File\x20','Source\x20file\x20not\x20found:\x20','Override\x20imported\x20default\x20appcode','[y/N]','\x20\x20config:\x20\x20','riskLevel','\x20\x20default:\x20','newConfigFileName','file','Override\x20imported\x20default\x20env','join','Imported\x20from\x20','\x22.\x20Allowed:\x20','397224TStOPy','trim','removeListener','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`.','cwd','yes','\x20app\x20init\x20--appcode\x20<code>\x20[--env\x20daily]\x20[--global]','16WOoUHq','env','once','cancelled','User\x20aborted\x20prompt','):\x20','appcode','2069109QpORFg','526UfRKmn','AbortPrompt','Initialized\x20','apiDir','log','parse','close','string','\x20\x20env:\x20\x20\x20\x20\x20','Invalid\x20env\x20\x22','[Y/n]','object','question','defaultApp','stdout','validation','158921CcwaGU','\x20init\x20—\x20Create\x20','10BCsJrB','race','app','apps','\x0aInitialized\x20','App\x20code\x20for\x20the\x20project','Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','project',')\x20instead\x20of\x20project','Usage:\x20','Skip\x20confirmation\x20when\x20overwriting','1753641Bscevr','SIGINT','24964JnaBHl','entries','490FnfUYL','Failed\x20to\x20parse\x20source\x20file:\x20','Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','message','boolean','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','Aborted.','\x20\x20appcode:\x20','stdin','491uOkwoI','global','8808140WByiEn','name','flagMissing'];a31_0x22a8=function(){return _0x91d382;};return a31_0x22a8();}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';import{PRODUCT_CONFIG}from'../constant/product.js';export const initCreateFlagDefs=[{'name':'appcode','type':a31_0x2014d5(0x11c),'description':a31_0x2014d5(0x12c)},{'name':a31_0x2014d5(0x10e),'type':a31_0x2014d5(0x11c),'description':'Target\x20environment\x20(default\x20'+DEFAULT_CONFIG_VALUES['env']+')','enum':[...RUNTIME_ENV_VALUES]},{'name':a31_0x2014d5(0x140),'type':'boolean','description':'Write\x20to\x20global\x20(~/'+PRODUCT_CONFIG[a31_0x2014d5(0x14c)]+a31_0x2014d5(0x12f),'default':![]},{'name':'yes','type':'boolean','description':a31_0x2014d5(0x131),'default':![]}];export const initImportFlagDefs=[{'name':'file','type':'string','description':a31_0x2014d5(0x138),'required':!![]},{'name':a31_0x2014d5(0x113),'type':a31_0x2014d5(0x11c),'description':a31_0x2014d5(0x147)},{'name':a31_0x2014d5(0x10e),'type':a31_0x2014d5(0x11c),'description':a31_0x2014d5(0x14e),'enum':[...RUNTIME_ENV_VALUES]},{'name':a31_0x2014d5(0x140),'type':'boolean','description':'Write\x20to\x20global\x20(~/'+PRODUCT_CONFIG['newConfigFileName']+')\x20instead\x20of\x20project','default':![]},{'name':a31_0x2014d5(0x10b),'type':a31_0x2014d5(0x13a),'description':a31_0x2014d5(0x131),'default':![]}];export async function runInit(_0x50ffdb){const _0x2beab7=a31_0x2014d5,_0x237513=isNonInteractiveMode(_0x50ffdb),_0x3c5f5c=_0x50ffdb[_0x2beab7(0x140)]?_0x2beab7(0x140):_0x2beab7(0x12e),_0x5c3303=resolveWriteConfigPath(_0x3c5f5c);try{_0x237513?await runNonInteractive(_0x50ffdb,_0x5c3303):await runInteractive(_0x50ffdb,_0x5c3303);}catch(_0x243426){if(_0x243426 instanceof AbortPrompt)throw CliErrors[_0x2beab7(0x110)]();throw _0x243426;}}export async function runInitImport(_0x1031a9){const _0x53487c=a31_0x2014d5,_0x17ecd9=_0x1031a9[_0x53487c(0x140)]?_0x53487c(0x140):_0x53487c(0x12e),_0x394f4e=resolveWriteConfigPath(_0x17ecd9);await runFromImport(_0x1031a9,_0x394f4e);}const RUNTIME_IRRELEVANT_KEYS=new Set([a31_0x2014d5(0x118)]);async function runFromImport(_0x20a80c,_0x1f39cd){const _0x17bf8=a31_0x2014d5,_0x2361ce=resolveFilePath(_0x20a80c[_0x17bf8(0x14d)]);if(!existsSync(_0x2361ce))throw CliErrors[_0x17bf8(0x124)](_0x17bf8(0x146)+_0x2361ce);const _0x178a82=readSourceFile(_0x2361ce),_0x2c9ca2=convertToRuntimeConfig(_0x178a82);_0x20a80c[_0x17bf8(0x113)]&&(_0x2c9ca2[_0x17bf8(0x113)]=String(_0x20a80c['appcode']));_0x20a80c[_0x17bf8(0x10e)]&&(_0x2c9ca2[_0x17bf8(0x10e)]=resolveInitEnv(_0x20a80c));if(!_0x2c9ca2[_0x17bf8(0x113)])throw CliErrors['validation']('Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.',_0x17bf8(0x109));await writeInitConfig(_0x1f39cd,_0x2c9ca2,_0x20a80c),console[_0x17bf8(0x119)](_0x17bf8(0x104)+_0x2361ce),console[_0x17bf8(0x119)](_0x17bf8(0x149)+_0x1f39cd),console['log'](_0x17bf8(0x13d)+_0x2c9ca2[_0x17bf8(0x113)]);if(_0x2c9ca2[_0x17bf8(0x122)])console['log'](_0x17bf8(0x14b)+_0x2c9ca2[_0x17bf8(0x122)]);}function convertToRuntimeConfig(_0x344fe8){const _0x43d633=a31_0x2014d5;if(_0x344fe8[_0x43d633(0x12a)]&&typeof _0x344fe8['apps']===_0x43d633(0x120))throw CliErrors[_0x43d633(0x124)](_0x43d633(0x12d),_0x43d633(0x13b));const _0x3a5da9={};for(const _0xdd9095 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x344fe8[_0xdd9095]!==undefined&&(_0x3a5da9[_0xdd9095]=_0x344fe8[_0xdd9095]);}return!_0x3a5da9[_0x43d633(0x14a)]&&(_0x3a5da9[_0x43d633(0x14a)]=DEFAULT_CONFIG_VALUES[_0x43d633(0x14a)]),_0x3a5da9;}async function runNonInteractive(_0x3c1363,_0x49d808){const _0x5357b9=a31_0x2014d5,_0x1480f3=_0x3c1363['appcode'];if(!_0x1480f3)throw CliErrors[_0x5357b9(0x143)](_0x5357b9(0x113),_0x5357b9(0x130)+CLI_BIN_NAME+_0x5357b9(0x10c));const _0x3acb4c=resolveInitEnv(_0x3c1363);await writeInitConfig(_0x49d808,{'appcode':_0x1480f3,'env':_0x3acb4c},_0x3c1363),console['log'](_0x5357b9(0x117)+_0x49d808),console[_0x5357b9(0x119)](_0x5357b9(0x13d)+_0x1480f3),console['log'](_0x5357b9(0x11d)+_0x3acb4c);}async function runInteractive(_0x21efd8,_0x3a9343){const _0x1c957d=a31_0x2014d5,_0xbd3605=loadExisting(_0x3a9343),_0x3eb9a3=typeof _0xbd3605?.['appcode']==='string'?_0xbd3605[_0x1c957d(0x113)]:'',_0xf10c70=resolveInitEnv(_0x21efd8);console['log'](CLI_BIN_NAME+_0x1c957d(0x126)+PRODUCT_CONFIG[_0x1c957d(0x14c)]+'\x0a');if(existsSync(_0x3a9343)&&!_0x21efd8[_0x1c957d(0x10b)]){const _0x19ade0=await promptYesNo(_0x1c957d(0x145)+_0x3a9343+'\x20already\x20exists.\x20Overwrite?',![]);if(!_0x19ade0){console[_0x1c957d(0x119)](_0x1c957d(0x13c));return;}}const _0x5bf381=typeof _0x21efd8[_0x1c957d(0x113)]==='string'?_0x21efd8[_0x1c957d(0x113)][_0x1c957d(0x107)]():'';let _0x269a15=_0x5bf381;!_0x269a15&&(_0x269a15=await promptInput('App\x20code',_0x3eb9a3));if(!_0x269a15[_0x1c957d(0x107)]())throw CliErrors[_0x1c957d(0x124)]('App\x20code\x20cannot\x20be\x20empty.');await writeInitConfig(_0x3a9343,{'appcode':_0x269a15['trim'](),'env':_0xf10c70},_0x21efd8),console[_0x1c957d(0x119)](_0x1c957d(0x12b)+_0x3a9343),console[_0x1c957d(0x119)](_0x1c957d(0x13d)+_0x269a15[_0x1c957d(0x107)]()),console[_0x1c957d(0x119)](_0x1c957d(0x11d)+_0xf10c70);}async function writeInitConfig(_0x10e7d4,_0x512475,_0x1b4faf){const _0x5d3765=a31_0x2014d5;let _0x5dd7ac={};existsSync(_0x10e7d4)&&!_0x1b4faf['yes']&&(_0x5dd7ac=readConfigFile(_0x10e7d4));for(const [_0x362ee6,_0x142bb3]of Object[_0x5d3765(0x135)](_0x512475)){_0x142bb3!==undefined&&(_0x5dd7ac[_0x362ee6]=_0x142bb3);}if(_0x5dd7ac[_0x5d3765(0x129)])delete _0x5dd7ac[_0x5d3765(0x129)];writeConfigFile(_0x10e7d4,_0x5dd7ac);}class AbortPrompt extends Error{constructor(){const _0x20b2c9=a31_0x2014d5;super(_0x20b2c9(0x111)),this[_0x20b2c9(0x142)]=_0x20b2c9(0x116);}}function createSafeRl(){const _0x384ec4=a31_0x2014d5,_0x28e64d=createInterface({'input':process[_0x384ec4(0x13e)],'output':process[_0x384ec4(0x123)]});let _0x3cc819;const _0x1bc2fa=new Promise((_0x425791,_0x2a0a85)=>{const _0x54d24c=_0x384ec4;_0x3cc819=()=>{const _0x198f13=a31_0x56d6;_0x3cc819&&(_0x28e64d[_0x198f13(0x108)](_0x198f13(0x133),_0x3cc819),_0x3cc819=undefined);try{_0x28e64d[_0x198f13(0x11b)]();}catch{}_0x2a0a85(new AbortPrompt());},_0x28e64d[_0x54d24c(0x10f)](_0x54d24c(0x133),_0x3cc819);}),_0x1c21f7=()=>{const _0x1e48e0=_0x384ec4;_0x3cc819&&(_0x28e64d[_0x1e48e0(0x108)](_0x1e48e0(0x133),_0x3cc819),_0x3cc819=undefined);try{_0x28e64d[_0x1e48e0(0x11b)]();}catch{}};return{'rl':_0x28e64d,'abortPromise':_0x1bc2fa,'disposeSuccess':_0x1c21f7};}async function promptInput(_0xb96c0f,_0x181e3b){const {rl:_0xbdc190,abortPromise:_0x32694e,disposeSuccess:_0x59d59b}=createSafeRl(),_0x4a2324=new Promise(_0x351153=>{const _0x3d1864=a31_0x56d6,_0x194f6b=_0x181e3b?'\x20\x20'+_0xb96c0f+'\x20('+_0x181e3b+_0x3d1864(0x112):'\x20\x20'+_0xb96c0f+':\x20';_0xbdc190[_0x3d1864(0x121)](_0x194f6b,_0x314b3e=>{_0x59d59b(),_0x351153(_0x314b3e['trim']()||_0x181e3b);});});return Promise['race']([_0x4a2324,_0x32694e]);}async function promptYesNo(_0x10e416,_0x5383e1){const _0x446702=a31_0x2014d5,{rl:_0x12884f,abortPromise:_0x527e97,disposeSuccess:_0x127972}=createSafeRl(),_0x4c8dcf=new Promise(_0x31e01c=>{const _0x158984=a31_0x56d6,_0x14dfe0=_0x5383e1?_0x158984(0x11f):_0x158984(0x148);_0x12884f[_0x158984(0x121)]('\x20\x20'+_0x10e416+'\x20'+_0x14dfe0+':\x20',_0x23c72f=>{const _0x3ffeb8=_0x158984;_0x127972();const _0x3b072f=_0x23c72f[_0x3ffeb8(0x107)]()[_0x3ffeb8(0x144)]();if(_0x3b072f==='y'||_0x3b072f===_0x3ffeb8(0x10b))_0x31e01c(!![]);else{if(_0x3b072f==='n'||_0x3b072f==='no')_0x31e01c(![]);else _0x31e01c(_0x5383e1);}});});return Promise[_0x446702(0x128)]([_0x4c8dcf,_0x527e97]);}function loadExisting(_0x3c5cd1){if(!existsSync(_0x3c5cd1))return null;return readConfigFile(_0x3c5cd1);}function a31_0x56d6(_0x2e6549,_0x275fb2){_0x2e6549=_0x2e6549-0x103;const _0x22a887=a31_0x22a8();let _0x56d6df=_0x22a887[_0x2e6549];return _0x56d6df;}function resolveFilePath(_0x8a4ff9){const _0xa61152=a31_0x2014d5;return isAbsolute(_0x8a4ff9)?_0x8a4ff9:resolve(process[_0xa61152(0x10a)](),_0x8a4ff9);}function readSourceFile(_0x101b90){const _0x1c6b36=a31_0x2014d5;try{const _0x3ef04e=readFileSync(_0x101b90,{'encoding':'utf8'});return JSON[_0x1c6b36(0x11a)](_0x3ef04e);}catch(_0x46f433){throw CliErrors[_0x1c6b36(0x124)](_0x1c6b36(0x137)+_0x46f433[_0x1c6b36(0x139)]);}}function resolveInitEnv(_0x17832){const _0x467fda=a31_0x2014d5,_0x4bccba=_0x17832['env'];if(_0x4bccba===undefined||_0x4bccba==='')return DEFAULT_CONFIG_VALUES[_0x467fda(0x10e)];if(!RUNTIME_ENV_VALUES['includes'](_0x4bccba))throw CliErrors[_0x467fda(0x124)](_0x467fda(0x11e)+_0x4bccba+_0x467fda(0x105)+RUNTIME_ENV_VALUES[_0x467fda(0x103)](',\x20'));return _0x4bccba;}
1
+ const a31_0x4055f9=a31_0x378d;(function(_0x13a963,_0x38f081){const _0x5a2338=a31_0x378d,_0x499d95=_0x13a963();while(!![]){try{const _0x5b5f00=parseInt(_0x5a2338(0x16e))/0x1*(parseInt(_0x5a2338(0x15b))/0x2)+-parseInt(_0x5a2338(0x166))/0x3*(-parseInt(_0x5a2338(0x15a))/0x4)+parseInt(_0x5a2338(0x13a))/0x5*(-parseInt(_0x5a2338(0x165))/0x6)+-parseInt(_0x5a2338(0x16b))/0x7*(-parseInt(_0x5a2338(0x162))/0x8)+parseInt(_0x5a2338(0x16a))/0x9*(-parseInt(_0x5a2338(0x145))/0xa)+parseInt(_0x5a2338(0x148))/0xb+-parseInt(_0x5a2338(0x134))/0xc*(parseInt(_0x5a2338(0x12c))/0xd);if(_0x5b5f00===_0x38f081)break;else _0x499d95['push'](_0x499d95['shift']());}catch(_0x4e3e5d){_0x499d95['push'](_0x499d95['shift']());}}}(a31_0x2566,0xc1748));import{existsSync,readFileSync}from'node:fs';function a31_0x2566(){const _0x314d08=['apiDir','Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','Failed\x20to\x20parse\x20source\x20file:\x20','):\x20','riskLevel','project','validation','boolean','\x20\x20default:\x20','File\x20','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','defaultApp','once','join','appcode','newConfigFileName','4280ldUZsW','2laVOyR','file','trim','App\x20code\x20cannot\x20be\x20empty.','Skip\x20confirmation\x20when\x20overwriting','App\x20code','object','736zYUWJW',')\x20instead\x20of\x20project','log','19914iACWAj','201UTaAOX','Target\x20environment\x20(default\x20','\x20\x20config:\x20\x20','Write\x20to\x20global\x20(~/','5310eyhHJN','46802uhmGaL','entries','includes','1569787yreYuy','Override\x20imported\x20default\x20appcode','cwd','close','Invalid\x20env\x20\x22','env','SIGINT','Aborted.','Initialized\x20','string','91tqkpPW','yes','stdout','global','\x0aInitialized\x20','removeListener','question','\x20\x20env:\x20\x20\x20\x20\x20','3355644rifGLx','\x20already\x20exists.\x20Overwrite?','apps','[y/N]','App\x20code\x20for\x20the\x20project','race','595qWPNKO','flagMissing','message','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','parse','\x20\x20appcode:\x20','name','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`.','\x20app\x20init\x20--appcode\x20<code>\x20[--env\x20daily]\x20[--global]','[Y/n]','cancelled','3560SsbITu','Usage:\x20','\x22.\x20Allowed:\x20','12080893ckybhi','app'];a31_0x2566=function(){return _0x314d08;};return a31_0x2566();}import{resolve,isAbsolute}from'node:path';import{createInterface}from'node:readline';import{CliErrors}from'../errors.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';function a31_0x378d(_0x16851a,_0x46b8cb){_0x16851a=_0x16851a-0x128;const _0x2566dd=a31_0x2566();let _0x378dfb=_0x2566dd[_0x16851a];return _0x378dfb;}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';import{PRODUCT_CONFIG}from'../constant/product.js';export const initCreateFlagDefs=[{'name':a31_0x4055f9(0x158),'type':a31_0x4055f9(0x12b),'description':a31_0x4055f9(0x138)},{'name':a31_0x4055f9(0x173),'type':a31_0x4055f9(0x12b),'description':a31_0x4055f9(0x167)+DEFAULT_CONFIG_VALUES[a31_0x4055f9(0x173)]+')','enum':[...RUNTIME_ENV_VALUES]},{'name':a31_0x4055f9(0x12f),'type':a31_0x4055f9(0x151),'description':'Write\x20to\x20global\x20(~/'+PRODUCT_CONFIG[a31_0x4055f9(0x159)]+a31_0x4055f9(0x163),'default':![]},{'name':a31_0x4055f9(0x12d),'type':'boolean','description':a31_0x4055f9(0x15f),'default':![]}];export const initImportFlagDefs=[{'name':'file','type':a31_0x4055f9(0x12b),'description':'Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','required':!![]},{'name':a31_0x4055f9(0x158),'type':'string','description':a31_0x4055f9(0x16f)},{'name':a31_0x4055f9(0x173),'type':a31_0x4055f9(0x12b),'description':'Override\x20imported\x20default\x20env','enum':[...RUNTIME_ENV_VALUES]},{'name':a31_0x4055f9(0x12f),'type':a31_0x4055f9(0x151),'description':a31_0x4055f9(0x169)+PRODUCT_CONFIG[a31_0x4055f9(0x159)]+')\x20instead\x20of\x20project','default':![]},{'name':a31_0x4055f9(0x12d),'type':'boolean','description':'Skip\x20confirmation\x20when\x20overwriting','default':![]}];export async function runInit(_0x34d6ba){const _0x356472=a31_0x4055f9,_0x226ddb=isNonInteractiveMode(_0x34d6ba),_0xab937e=_0x34d6ba[_0x356472(0x12f)]?_0x356472(0x12f):_0x356472(0x14f),_0x197fd8=resolveWriteConfigPath(_0xab937e);try{_0x226ddb?await runNonInteractive(_0x34d6ba,_0x197fd8):await runInteractive(_0x34d6ba,_0x197fd8);}catch(_0x4ef70f){if(_0x4ef70f instanceof AbortPrompt)throw CliErrors[_0x356472(0x144)]();throw _0x4ef70f;}}export async function runInitImport(_0x12995c){const _0x622c60=a31_0x4055f9,_0x1e2798=_0x12995c[_0x622c60(0x12f)]?_0x622c60(0x12f):_0x622c60(0x14f),_0xe089c1=resolveWriteConfigPath(_0x1e2798);await runFromImport(_0x12995c,_0xe089c1);}const RUNTIME_IRRELEVANT_KEYS=new Set([a31_0x4055f9(0x14a)]);async function runFromImport(_0x555e49,_0x4f36b0){const _0x17ac59=a31_0x4055f9,_0x77c513=resolveFilePath(_0x555e49[_0x17ac59(0x15c)]);if(!existsSync(_0x77c513))throw CliErrors[_0x17ac59(0x150)]('Source\x20file\x20not\x20found:\x20'+_0x77c513);const _0x571021=readSourceFile(_0x77c513),_0x496813=convertToRuntimeConfig(_0x571021);_0x555e49['appcode']&&(_0x496813[_0x17ac59(0x158)]=String(_0x555e49[_0x17ac59(0x158)]));_0x555e49['env']&&(_0x496813[_0x17ac59(0x173)]=resolveInitEnv(_0x555e49));if(!_0x496813[_0x17ac59(0x158)])throw CliErrors[_0x17ac59(0x150)](_0x17ac59(0x154),_0x17ac59(0x141));await writeInitConfig(_0x4f36b0,_0x496813,_0x555e49),console[_0x17ac59(0x164)]('Imported\x20from\x20'+_0x77c513),console['log'](_0x17ac59(0x168)+_0x4f36b0),console[_0x17ac59(0x164)]('\x20\x20appcode:\x20'+_0x496813[_0x17ac59(0x158)]);if(_0x496813[_0x17ac59(0x155)])console[_0x17ac59(0x164)](_0x17ac59(0x152)+_0x496813['defaultApp']);}function convertToRuntimeConfig(_0x26ab95){const _0x3948c1=a31_0x4055f9;if(_0x26ab95['apps']&&typeof _0x26ab95[_0x3948c1(0x136)]===_0x3948c1(0x161))throw CliErrors['validation'](_0x3948c1(0x14b),_0x3948c1(0x13d));const _0x5145ce={};for(const _0x90f499 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x26ab95[_0x90f499]!==undefined&&(_0x5145ce[_0x90f499]=_0x26ab95[_0x90f499]);}return!_0x5145ce[_0x3948c1(0x14e)]&&(_0x5145ce['riskLevel']=DEFAULT_CONFIG_VALUES[_0x3948c1(0x14e)]),_0x5145ce;}async function runNonInteractive(_0x449b52,_0x158fff){const _0x532342=a31_0x4055f9,_0xfa0f54=_0x449b52[_0x532342(0x158)];if(!_0xfa0f54)throw CliErrors[_0x532342(0x13b)](_0x532342(0x158),_0x532342(0x146)+CLI_BIN_NAME+_0x532342(0x142));const _0x56ba12=resolveInitEnv(_0x449b52);await writeInitConfig(_0x158fff,{'appcode':_0xfa0f54,'env':_0x56ba12},_0x449b52),console[_0x532342(0x164)](_0x532342(0x12a)+_0x158fff),console[_0x532342(0x164)](_0x532342(0x13f)+_0xfa0f54),console['log'](_0x532342(0x133)+_0x56ba12);}async function runInteractive(_0x47605d,_0x5d7407){const _0x4ab980=a31_0x4055f9,_0x5be7f5=loadExisting(_0x5d7407),_0x371566=typeof _0x5be7f5?.[_0x4ab980(0x158)]===_0x4ab980(0x12b)?_0x5be7f5[_0x4ab980(0x158)]:'',_0x369b38=resolveInitEnv(_0x47605d);console[_0x4ab980(0x164)](CLI_BIN_NAME+'\x20init\x20—\x20Create\x20'+PRODUCT_CONFIG[_0x4ab980(0x159)]+'\x0a');if(existsSync(_0x5d7407)&&!_0x47605d['yes']){const _0x2e5b05=await promptYesNo(_0x4ab980(0x153)+_0x5d7407+_0x4ab980(0x135),![]);if(!_0x2e5b05){console[_0x4ab980(0x164)](_0x4ab980(0x129));return;}}const _0x2f796b=typeof _0x47605d[_0x4ab980(0x158)]===_0x4ab980(0x12b)?_0x47605d[_0x4ab980(0x158)][_0x4ab980(0x15d)]():'';let _0x10c619=_0x2f796b;!_0x10c619&&(_0x10c619=await promptInput(_0x4ab980(0x160),_0x371566));if(!_0x10c619[_0x4ab980(0x15d)]())throw CliErrors[_0x4ab980(0x150)](_0x4ab980(0x15e));await writeInitConfig(_0x5d7407,{'appcode':_0x10c619[_0x4ab980(0x15d)](),'env':_0x369b38},_0x47605d),console['log'](_0x4ab980(0x130)+_0x5d7407),console[_0x4ab980(0x164)](_0x4ab980(0x13f)+_0x10c619[_0x4ab980(0x15d)]()),console[_0x4ab980(0x164)](_0x4ab980(0x133)+_0x369b38);}async function writeInitConfig(_0x3f3ed7,_0x30dfa1,_0x2cd672){const _0x3f07aa=a31_0x4055f9;let _0x169961={};existsSync(_0x3f3ed7)&&!_0x2cd672['yes']&&(_0x169961=readConfigFile(_0x3f3ed7));for(const [_0x1fa99c,_0x5e56b9]of Object[_0x3f07aa(0x16c)](_0x30dfa1)){_0x5e56b9!==undefined&&(_0x169961[_0x1fa99c]=_0x5e56b9);}if(_0x169961[_0x3f07aa(0x149)])delete _0x169961['app'];writeConfigFile(_0x3f3ed7,_0x169961);}class AbortPrompt extends Error{constructor(){const _0x4ed101=a31_0x4055f9;super('User\x20aborted\x20prompt'),this[_0x4ed101(0x140)]='AbortPrompt';}}function createSafeRl(){const _0xb83454=a31_0x4055f9,_0x332e98=createInterface({'input':process['stdin'],'output':process[_0xb83454(0x12e)]});let _0x95dc7e;const _0x5a0073=new Promise((_0x3d3d74,_0x3a8b6a)=>{const _0x5d7475=_0xb83454;_0x95dc7e=()=>{const _0x65cb64=a31_0x378d;_0x95dc7e&&(_0x332e98[_0x65cb64(0x131)]('SIGINT',_0x95dc7e),_0x95dc7e=undefined);try{_0x332e98[_0x65cb64(0x171)]();}catch{}_0x3a8b6a(new AbortPrompt());},_0x332e98[_0x5d7475(0x156)](_0x5d7475(0x128),_0x95dc7e);}),_0x29742f=()=>{const _0x1e15f4=_0xb83454;_0x95dc7e&&(_0x332e98['removeListener'](_0x1e15f4(0x128),_0x95dc7e),_0x95dc7e=undefined);try{_0x332e98[_0x1e15f4(0x171)]();}catch{}};return{'rl':_0x332e98,'abortPromise':_0x5a0073,'disposeSuccess':_0x29742f};}async function promptInput(_0x2d27d6,_0x351b39){const _0x49eaae=a31_0x4055f9,{rl:_0x1356c7,abortPromise:_0x501b7e,disposeSuccess:_0x3072fa}=createSafeRl(),_0x20cec9=new Promise(_0x165025=>{const _0x148a05=a31_0x378d,_0x372c2e=_0x351b39?'\x20\x20'+_0x2d27d6+'\x20('+_0x351b39+_0x148a05(0x14d):'\x20\x20'+_0x2d27d6+':\x20';_0x1356c7[_0x148a05(0x132)](_0x372c2e,_0x5059dd=>{const _0x30fbf5=_0x148a05;_0x3072fa(),_0x165025(_0x5059dd[_0x30fbf5(0x15d)]()||_0x351b39);});});return Promise[_0x49eaae(0x139)]([_0x20cec9,_0x501b7e]);}async function promptYesNo(_0x4fb818,_0x1d6c56){const _0x156af6=a31_0x4055f9,{rl:_0x3f0672,abortPromise:_0x347f04,disposeSuccess:_0x1f6085}=createSafeRl(),_0x585d7a=new Promise(_0x34ba01=>{const _0x397220=a31_0x378d,_0x15b848=_0x1d6c56?_0x397220(0x143):_0x397220(0x137);_0x3f0672[_0x397220(0x132)]('\x20\x20'+_0x4fb818+'\x20'+_0x15b848+':\x20',_0x41bcea=>{const _0x4989fe=_0x397220;_0x1f6085();const _0x2001dd=_0x41bcea[_0x4989fe(0x15d)]()['toLowerCase']();if(_0x2001dd==='y'||_0x2001dd==='yes')_0x34ba01(!![]);else{if(_0x2001dd==='n'||_0x2001dd==='no')_0x34ba01(![]);else _0x34ba01(_0x1d6c56);}});});return Promise[_0x156af6(0x139)]([_0x585d7a,_0x347f04]);}function loadExisting(_0x399cdc){if(!existsSync(_0x399cdc))return null;return readConfigFile(_0x399cdc);}function resolveFilePath(_0x4c390c){const _0x33df17=a31_0x4055f9;return isAbsolute(_0x4c390c)?_0x4c390c:resolve(process[_0x33df17(0x170)](),_0x4c390c);}function readSourceFile(_0x117b93){const _0xcd6be2=a31_0x4055f9;try{const _0x2f20f2=readFileSync(_0x117b93,{'encoding':'utf8'});return JSON[_0xcd6be2(0x13e)](_0x2f20f2);}catch(_0x492e61){throw CliErrors[_0xcd6be2(0x150)](_0xcd6be2(0x14c)+_0x492e61[_0xcd6be2(0x13c)]);}}function resolveInitEnv(_0x5ede7e){const _0x1ba5fe=a31_0x4055f9,_0x1abf9d=_0x5ede7e['env'];if(_0x1abf9d===undefined||_0x1abf9d==='')return DEFAULT_CONFIG_VALUES[_0x1ba5fe(0x173)];if(!RUNTIME_ENV_VALUES[_0x1ba5fe(0x16d)](_0x1abf9d))throw CliErrors['validation'](_0x1ba5fe(0x172)+_0x1abf9d+_0x1ba5fe(0x147)+RUNTIME_ENV_VALUES[_0x1ba5fe(0x157)](',\x20'));return _0x1abf9d;}
@@ -1 +1 @@
1
- const a32_0x564acd=a32_0x316d;(function(_0x402efc,_0x41370e){const _0xa079ad=a32_0x316d,_0x5140d7=_0x402efc();while(!![]){try{const _0x4b8e91=parseInt(_0xa079ad(0x1f1))/0x1+parseInt(_0xa079ad(0x1e2))/0x2*(parseInt(_0xa079ad(0x208))/0x3)+parseInt(_0xa079ad(0x1db))/0x4*(parseInt(_0xa079ad(0x1d1))/0x5)+parseInt(_0xa079ad(0x205))/0x6+parseInt(_0xa079ad(0x1f9))/0x7+-parseInt(_0xa079ad(0x207))/0x8*(-parseInt(_0xa079ad(0x1fd))/0x9)+-parseInt(_0xa079ad(0x1cc))/0xa*(parseInt(_0xa079ad(0x1da))/0xb);if(_0x4b8e91===_0x41370e)break;else _0x5140d7['push'](_0x5140d7['shift']());}catch(_0x254b8c){_0x5140d7['push'](_0x5140d7['shift']());}}}(a32_0x1cd9,0xd8bdd));import{existsSync,readFileSync,statSync}from'node:fs';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_0x564acd(0x1ec),'type':a32_0x564acd(0x1d5),'required':!![],'description':a32_0x564acd(0x206)},FILE_FLAG={'name':a32_0x564acd(0x209),'type':'string','required':!![],'description':a32_0x564acd(0x1cd)},QUERY_FLAG={'name':a32_0x564acd(0x1cf),'type':'string','required':!![],'description':'Search\x20query\x20for\x20visible\x20company\x20and\x20personal\x20knowledge'},TOPK_FLAG={'name':a32_0x564acd(0x1ea),'type':'number','description':a32_0x564acd(0x203)};function readKnowledgeFile(_0x418fba){const _0x45aa90=a32_0x564acd;if(!_0x418fba)throw CliErrors[_0x45aa90(0x1cb)]('File\x20path\x20is\x20required.');if(!existsSync(_0x418fba))throw CliErrors[_0x45aa90(0x1cb)](_0x45aa90(0x1d0)+_0x418fba);if(!statSync(_0x418fba)[_0x45aa90(0x1e8)]())throw CliErrors[_0x45aa90(0x1cb)](_0x45aa90(0x1e0)+_0x418fba);return readFileSync(_0x418fba,_0x45aa90(0x1dc));}function a32_0x316d(_0x2acfd4,_0x90ceaa){_0x2acfd4=_0x2acfd4-0x1ca;const _0x1cd957=a32_0x1cd9();let _0x316d71=_0x1cd957[_0x2acfd4];return _0x316d71;}function summarizePersonalItem(_0x350bc9){const _0x4805f5=a32_0x564acd;return{'id':_0x350bc9['id'],'title':_0x350bc9[_0x4805f5(0x1ec)],'version':_0x350bc9[_0x4805f5(0x1e7)],'ragStatus':_0x350bc9[_0x4805f5(0x1eb)],'ragErrorMessage':_0x350bc9[_0x4805f5(0x1d6)],'updateTime':_0x350bc9['updateTime']};}function detailPersonalItem(_0x339a07){const _0x4dcdcb=a32_0x564acd;return{'id':_0x339a07['id'],'appCode':_0x339a07[_0x4dcdcb(0x1dd)],'scope':_0x339a07[_0x4dcdcb(0x1f8)],'userId':_0x339a07[_0x4dcdcb(0x1f6)],'title':_0x339a07[_0x4dcdcb(0x1ec)],'content':_0x339a07[_0x4dcdcb(0x1d2)]??'','version':_0x339a07[_0x4dcdcb(0x1e7)],'ragStatus':_0x339a07[_0x4dcdcb(0x1eb)],'ragErrorMessage':_0x339a07[_0x4dcdcb(0x1d6)],'createTime':_0x339a07[_0x4dcdcb(0x1df)],'updateTime':_0x339a07[_0x4dcdcb(0x1e1)]};}function a32_0x1cd9(){const _0x1e63ba=['ragErrorMessage','Update\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','Created\x20KB\x20entry\x20','/client/knowledge-base/personal/','3179mIYgDm','1579252AYhZiw','utf8','appCode','build','createTime','File\x20is\x20not\x20a\x20regular\x20file:\x20','updateTime','156HahiYz','trim','score','search','num','version','isFile','Override\x20the\x20existing\x20entry\x20title','topk','ragStatus','title','verbose','body','Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22','length','673946zScouG','metadata','read','str','docId','userId','isFinite','scope','6958959BRBqFj','Search\x20visible\x20company\x20and\x20personal\x20knowledge\x20base\x20content','create','/client/knowledge-base/personal/create','27aQLSRw','Updated\x20KB\x20entry\x20','Personal\x20knowledge-base\x20entry\x20ID','List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','bool','POST','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','list','8840742oREDdn','Personal\x20knowledge-base\x20entry\x20title','4234344DDwaQP','14958DeQixG','file','map','validation','187370uBNMEw','Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file','/update','query','File\x20not\x20found:\x20','15KzUNOF','content','Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','detail','string'];a32_0x1cd9=function(){return _0x1e63ba;};return a32_0x1cd9();}function summarizeSearchHit(_0x388d49){const _0x51f4a2=a32_0x564acd;return{'scope':_0x388d49[_0x51f4a2(0x1f8)],'docId':_0x388d49[_0x51f4a2(0x1f5)],'score':_0x388d49[_0x51f4a2(0x1e4)],'weightedScore':_0x388d49['weightedScore'],'content':_0x388d49[_0x51f4a2(0x1d2)],'metadata':_0x388d49[_0x51f4a2(0x1f2)]};}function readTopK(_0x4e9f81){const _0x32335a=a32_0x564acd,_0x4a1fe1=_0x4e9f81['flag']('topk');if(_0x4a1fe1===undefined||_0x4a1fe1===null||_0x4a1fe1==='')return undefined;const _0x2af16e=_0x4e9f81[_0x32335a(0x1e6)](_0x32335a(0x1ea));if(!Number[_0x32335a(0x1f7)](_0x2af16e)||_0x2af16e<0x1)throw CliErrors[_0x32335a(0x1cb)]('--topk\x20must\x20be\x20a\x20positive\x20number.');return _0x2af16e;}const kbList={'service':'kb','command':a32_0x564acd(0x204),'description':a32_0x564acd(0x200),'risk':a32_0x564acd(0x1f3),'flags':[VERBOSE_FLAG],async 'execute'(_0x251410){const _0x2a143f=a32_0x564acd,_0x5000f8=await listPersonalKnowledgeBaseItems(_0x251410['appCode']);if(_0x251410[_0x2a143f(0x201)](_0x2a143f(0x1ed)))return{'ok':!![],'data':{'total':_0x5000f8[_0x2a143f(0x1f0)],'items':_0x5000f8}};return{'ok':!![],'data':{'total':_0x5000f8['length'],'items':_0x5000f8['map'](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':a32_0x564acd(0x1d4),'description':a32_0x564acd(0x1d3),'risk':a32_0x564acd(0x1f3),'flags':[{...ID_FLAG,'description':'Personal\x20knowledge-base\x20entry\x20ID'}],async 'execute'(_0x26ef0c){const _0x517d25=a32_0x564acd,_0x44a44d=await getPersonalKnowledgeBaseItem(_0x26ef0c['num']('id'),_0x26ef0c[_0x517d25(0x1dd)]);return{'ok':!![],'data':detailPersonalItem(_0x44a44d)};}},kbCreate={'service':'kb','command':a32_0x564acd(0x1fb),'description':'Create\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','risk':'write','flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x3ea688){const _0x13df59=a32_0x564acd,_0x2e0441=_0x3ea688[_0x13df59(0x1f4)](_0x13df59(0x1ec)),_0x193136=readKnowledgeFile(_0x3ea688[_0x13df59(0x1f4)](_0x13df59(0x209))),_0x528a1a=await createPersonalKnowledgeBaseItem(_0x3ea688[_0x13df59(0x1dd)],{'title':_0x2e0441,'content':_0x193136});return{'ok':!![],'data':summarizePersonalItem(_0x528a1a),'message':_0x13df59(0x1d8)+_0x528a1a['id']+'\x20('+_0x528a1a[_0x13df59(0x1ec)]+')'};},async 'dryRun'(_0x545336){const _0x1eec89=a32_0x564acd,_0x2c276a=_0x545336['str'](_0x1eec89(0x1ec)),_0x44e315=readKnowledgeFile(_0x545336[_0x1eec89(0x1f4)](_0x1eec89(0x209)));return dryRun(_0x1eec89(0x202),_0x1eec89(0x1fc))[_0x1eec89(0x1ee)]({'appCode':_0x545336[_0x1eec89(0x1dd)],'title':_0x2c276a,'content':_0x44e315})['description'](_0x1eec89(0x1ef)+_0x2c276a+'\x22')['build']();}},kbUpdate={'service':'kb','command':'update','description':a32_0x564acd(0x1d7),'risk':'write','flags':[{...ID_FLAG,'description':a32_0x564acd(0x1ff)},{...TITLE_FLAG,'required':![],'description':a32_0x564acd(0x1e9)},FILE_FLAG],async 'execute'(_0x2b79ae){const _0x520db8=a32_0x564acd,_0x3d644b=_0x2b79ae['num']('id'),_0x3be158=readKnowledgeFile(_0x2b79ae['str']('file')),_0x2b83cc=_0x2b79ae[_0x520db8(0x1f4)](_0x520db8(0x1ec))||(await getPersonalKnowledgeBaseItem(_0x3d644b,_0x2b79ae[_0x520db8(0x1dd)]))[_0x520db8(0x1ec)],_0x328881=await updatePersonalKnowledgeBaseItem(_0x3d644b,_0x2b79ae[_0x520db8(0x1dd)],{'title':_0x2b83cc,'content':_0x3be158});return{'ok':!![],'data':summarizePersonalItem(_0x328881),'message':_0x520db8(0x1fe)+_0x328881['id']+'\x20('+_0x328881[_0x520db8(0x1ec)]+')'};},async 'dryRun'(_0x25fd2e){const _0x6f7e6d=a32_0x564acd,_0x248cac=_0x25fd2e[_0x6f7e6d(0x1e6)]('id'),_0x336d07=readKnowledgeFile(_0x25fd2e['str']('file')),_0x21aa8f=_0x25fd2e[_0x6f7e6d(0x1f4)](_0x6f7e6d(0x1ec))||(await getPersonalKnowledgeBaseItem(_0x248cac,_0x25fd2e[_0x6f7e6d(0x1dd)]))[_0x6f7e6d(0x1ec)];return dryRun(_0x6f7e6d(0x202),_0x6f7e6d(0x1d9)+_0x248cac+_0x6f7e6d(0x1ce))['body']({'appCode':_0x25fd2e[_0x6f7e6d(0x1dd)],'title':_0x21aa8f,'content':_0x336d07})['description']('Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20'+_0x248cac)[_0x6f7e6d(0x1de)]();}},kbSearch={'service':'kb','command':a32_0x564acd(0x1e5),'description':a32_0x564acd(0x1fa),'risk':a32_0x564acd(0x1f3),'flags':[QUERY_FLAG,TOPK_FLAG],async 'validate'(_0x2c2dff){const _0x1fcc05=a32_0x564acd;if(!_0x2c2dff['str'](_0x1fcc05(0x1cf))[_0x1fcc05(0x1e3)]())throw CliErrors[_0x1fcc05(0x1cb)]('Search\x20query\x20is\x20required.');readTopK(_0x2c2dff);},async 'execute'(_0x284526){const _0x365a44=a32_0x564acd,_0x45ca25=_0x284526[_0x365a44(0x1f4)](_0x365a44(0x1cf))[_0x365a44(0x1e3)](),_0x4bf356=readTopK(_0x284526),_0x54cb1b=await searchKnowledgeBase(_0x284526[_0x365a44(0x1dd)],{'query':_0x45ca25,'topK':_0x4bf356});return{'ok':!![],'data':{'total':_0x54cb1b[_0x365a44(0x1f0)],'hits':_0x54cb1b[_0x365a44(0x1ca)](summarizeSearchHit)}};}};export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];
1
+ const a32_0x25bc59=a32_0xba77;(function(_0x326b3c,_0x354af6){const _0x13bc24=a32_0xba77,_0x295df8=_0x326b3c();while(!![]){try{const _0xa66976=parseInt(_0x13bc24(0x93))/0x1+-parseInt(_0x13bc24(0xa7))/0x2*(parseInt(_0x13bc24(0xc2))/0x3)+-parseInt(_0x13bc24(0xce))/0x4+-parseInt(_0x13bc24(0xc3))/0x5+-parseInt(_0x13bc24(0x98))/0x6*(-parseInt(_0x13bc24(0xc7))/0x7)+-parseInt(_0x13bc24(0xb5))/0x8*(parseInt(_0x13bc24(0xa9))/0x9)+parseInt(_0x13bc24(0xc6))/0xa*(parseInt(_0x13bc24(0x95))/0xb);if(_0xa66976===_0x354af6)break;else _0x295df8['push'](_0x295df8['shift']());}catch(_0x22af46){_0x295df8['push'](_0x295df8['shift']());}}}(a32_0x7048,0xb3c09));import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalKnowledgeBaseItem,getPersonalKnowledgeBaseItem,listPersonalKnowledgeBaseItems,searchKnowledgeBase,updatePersonalKnowledgeBaseItem}from'../../core/api-client.js';function a32_0xba77(_0x49ed04,_0x443a12){_0x49ed04=_0x49ed04-0x91;const _0x70488a=a32_0x7048();let _0xba7709=_0x70488a[_0x49ed04];return _0xba7709;}import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';function a32_0x7048(){const _0x20930b=['title','validation','/update','Search\x20query\x20for\x20visible\x20company\x20and\x20personal\x20knowledge','userId','create','update','body','2016GZhUlh','/client/knowledge-base/personal/','ragStatus','Search\x20visible\x20company\x20and\x20personal\x20knowledge\x20base\x20content','Personal\x20knowledge-base\x20entry\x20ID','query','version','read','weightedScore','Search\x20query\x20is\x20required.','description','Created\x20KB\x20entry\x20','Updated\x20KB\x20entry\x20','3bysCcd','4650560CdMYQP','File\x20is\x20not\x20a\x20regular\x20file:\x20','trim','24710NajQrW','77dzFBpg','length','POST','str','/client/knowledge-base/personal/create','isFinite','write','3879716JOnfeo','topk','ragErrorMessage','metadata','scope','Create\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','list','573909CwQNDX','file','13970JNbXdN','utf8','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','298086gZvRVc','updateTime','build','Update\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','num','number','appCode','List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20','File\x20not\x20found:\x20','map','content','score','verbose','681688oAVemw','string','45765BoZtlO','Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file','detail','createTime'];a32_0x7048=function(){return _0x20930b;};return a32_0x7048();}const TITLE_FLAG={'name':a32_0x25bc59(0xad),'type':'string','required':!![],'description':'Personal\x20knowledge-base\x20entry\x20title'},FILE_FLAG={'name':a32_0x25bc59(0x94),'type':a32_0x25bc59(0xa8),'required':!![],'description':a32_0x25bc59(0xaa)},QUERY_FLAG={'name':a32_0x25bc59(0xba),'type':a32_0x25bc59(0xa8),'required':!![],'description':a32_0x25bc59(0xb0)},TOPK_FLAG={'name':a32_0x25bc59(0xcf),'type':a32_0x25bc59(0x9d),'description':a32_0x25bc59(0x97)};function readKnowledgeFile(_0x5294a9){const _0x4f29c3=a32_0x25bc59;if(!_0x5294a9)throw CliErrors['validation']('File\x20path\x20is\x20required.');if(!existsSync(_0x5294a9))throw CliErrors[_0x4f29c3(0xae)](_0x4f29c3(0xa2)+_0x5294a9);if(!statSync(_0x5294a9)['isFile']())throw CliErrors['validation'](_0x4f29c3(0xc4)+_0x5294a9);return readFileSync(_0x5294a9,_0x4f29c3(0x96));}function summarizePersonalItem(_0x322825){const _0x1b7dac=a32_0x25bc59;return{'id':_0x322825['id'],'title':_0x322825['title'],'version':_0x322825[_0x1b7dac(0xbb)],'ragStatus':_0x322825['ragStatus'],'ragErrorMessage':_0x322825[_0x1b7dac(0xd0)],'updateTime':_0x322825['updateTime']};}function detailPersonalItem(_0x51ca9a){const _0x580996=a32_0x25bc59;return{'id':_0x51ca9a['id'],'appCode':_0x51ca9a[_0x580996(0x9e)],'scope':_0x51ca9a['scope'],'userId':_0x51ca9a[_0x580996(0xb1)],'title':_0x51ca9a[_0x580996(0xad)],'content':_0x51ca9a[_0x580996(0xa4)]??'','version':_0x51ca9a['version'],'ragStatus':_0x51ca9a[_0x580996(0xb7)],'ragErrorMessage':_0x51ca9a[_0x580996(0xd0)],'createTime':_0x51ca9a[_0x580996(0xac)],'updateTime':_0x51ca9a[_0x580996(0x99)]};}function summarizeSearchHit(_0x22c301){const _0x306cdd=a32_0x25bc59;return{'scope':_0x22c301[_0x306cdd(0xd2)],'docId':_0x22c301['docId'],'score':_0x22c301[_0x306cdd(0xa5)],'weightedScore':_0x22c301[_0x306cdd(0xbd)],'content':_0x22c301[_0x306cdd(0xa4)],'metadata':_0x22c301[_0x306cdd(0xd1)]};}function readTopK(_0x298f55){const _0x2a9a9e=a32_0x25bc59,_0x58f9c2=_0x298f55['flag'](_0x2a9a9e(0xcf));if(_0x58f9c2===undefined||_0x58f9c2===null||_0x58f9c2==='')return undefined;const _0x8568ec=_0x298f55[_0x2a9a9e(0x9c)](_0x2a9a9e(0xcf));if(!Number[_0x2a9a9e(0xcc)](_0x8568ec)||_0x8568ec<0x1)throw CliErrors['validation']('--topk\x20must\x20be\x20a\x20positive\x20number.');return _0x8568ec;}const kbList={'service':'kb','command':a32_0x25bc59(0x92),'description':a32_0x25bc59(0x9f),'risk':'read','flags':[VERBOSE_FLAG],async 'execute'(_0x3b1ac4){const _0x138d98=a32_0x25bc59,_0x5b6dc2=await listPersonalKnowledgeBaseItems(_0x3b1ac4['appCode']);if(_0x3b1ac4['bool'](_0x138d98(0xa6)))return{'ok':!![],'data':{'total':_0x5b6dc2['length'],'items':_0x5b6dc2}};return{'ok':!![],'data':{'total':_0x5b6dc2['length'],'items':_0x5b6dc2[_0x138d98(0xa3)](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':a32_0x25bc59(0xab),'description':a32_0x25bc59(0xa0),'risk':'read','flags':[{...ID_FLAG,'description':a32_0x25bc59(0xb9)}],async 'execute'(_0x145127){const _0x532e63=a32_0x25bc59,_0x154e64=await getPersonalKnowledgeBaseItem(_0x145127['num']('id'),_0x145127[_0x532e63(0x9e)]);return{'ok':!![],'data':detailPersonalItem(_0x154e64)};}},kbCreate={'service':'kb','command':a32_0x25bc59(0xb2),'description':a32_0x25bc59(0x91),'risk':a32_0x25bc59(0xcd),'flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x1de8d0){const _0x3c886e=a32_0x25bc59,_0x17184d=_0x1de8d0[_0x3c886e(0xca)](_0x3c886e(0xad)),_0x28d618=readKnowledgeFile(_0x1de8d0[_0x3c886e(0xca)]('file')),_0x1a6808=await createPersonalKnowledgeBaseItem(_0x1de8d0[_0x3c886e(0x9e)],{'title':_0x17184d,'content':_0x28d618});return{'ok':!![],'data':summarizePersonalItem(_0x1a6808),'message':_0x3c886e(0xc0)+_0x1a6808['id']+'\x20('+_0x1a6808[_0x3c886e(0xad)]+')'};},async 'dryRun'(_0x51eb75){const _0x1edfdb=a32_0x25bc59,_0xdefd95=_0x51eb75[_0x1edfdb(0xca)]('title'),_0x227ad=readKnowledgeFile(_0x51eb75[_0x1edfdb(0xca)](_0x1edfdb(0x94)));return dryRun(_0x1edfdb(0xc9),_0x1edfdb(0xcb))[_0x1edfdb(0xb4)]({'appCode':_0x51eb75[_0x1edfdb(0x9e)],'title':_0xdefd95,'content':_0x227ad})['description']('Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22'+_0xdefd95+'\x22')[_0x1edfdb(0x9a)]();}},kbUpdate={'service':'kb','command':a32_0x25bc59(0xb3),'description':a32_0x25bc59(0x9b),'risk':'write','flags':[{...ID_FLAG,'description':a32_0x25bc59(0xb9)},{...TITLE_FLAG,'required':![],'description':'Override\x20the\x20existing\x20entry\x20title'},FILE_FLAG],async 'execute'(_0x1fbff0){const _0x35d91e=a32_0x25bc59,_0x5b8fa7=_0x1fbff0['num']('id'),_0x146225=readKnowledgeFile(_0x1fbff0[_0x35d91e(0xca)](_0x35d91e(0x94))),_0x21c1f4=_0x1fbff0[_0x35d91e(0xca)](_0x35d91e(0xad))||(await getPersonalKnowledgeBaseItem(_0x5b8fa7,_0x1fbff0[_0x35d91e(0x9e)]))[_0x35d91e(0xad)],_0x3a009b=await updatePersonalKnowledgeBaseItem(_0x5b8fa7,_0x1fbff0[_0x35d91e(0x9e)],{'title':_0x21c1f4,'content':_0x146225});return{'ok':!![],'data':summarizePersonalItem(_0x3a009b),'message':_0x35d91e(0xc1)+_0x3a009b['id']+'\x20('+_0x3a009b[_0x35d91e(0xad)]+')'};},async 'dryRun'(_0x278434){const _0x378442=a32_0x25bc59,_0x370f8d=_0x278434[_0x378442(0x9c)]('id'),_0x27d85f=readKnowledgeFile(_0x278434[_0x378442(0xca)](_0x378442(0x94))),_0x4490c5=_0x278434[_0x378442(0xca)](_0x378442(0xad))||(await getPersonalKnowledgeBaseItem(_0x370f8d,_0x278434['appCode']))[_0x378442(0xad)];return dryRun('POST',_0x378442(0xb6)+_0x370f8d+_0x378442(0xaf))[_0x378442(0xb4)]({'appCode':_0x278434[_0x378442(0x9e)],'title':_0x4490c5,'content':_0x27d85f})[_0x378442(0xbf)](_0x378442(0xa1)+_0x370f8d)['build']();}},kbSearch={'service':'kb','command':'search','description':a32_0x25bc59(0xb8),'risk':a32_0x25bc59(0xbc),'flags':[QUERY_FLAG,TOPK_FLAG],async 'validate'(_0x214ff3){const _0x6b148c=a32_0x25bc59;if(!_0x214ff3[_0x6b148c(0xca)](_0x6b148c(0xba))[_0x6b148c(0xc5)]())throw CliErrors[_0x6b148c(0xae)](_0x6b148c(0xbe));readTopK(_0x214ff3);},async 'execute'(_0x23a438){const _0x3c8873=a32_0x25bc59,_0xcad4d=_0x23a438[_0x3c8873(0xca)](_0x3c8873(0xba))[_0x3c8873(0xc5)](),_0x263785=readTopK(_0x23a438),_0x50bb36=await searchKnowledgeBase(_0x23a438['appCode'],{'query':_0xcad4d,'topK':_0x263785});return{'ok':!![],'data':{'total':_0x50bb36[_0x3c8873(0xc8)],'hits':_0x50bb36['map'](summarizeSearchHit)}};}};export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];
@@ -1 +1 @@
1
- const a33_0x470aec=a33_0x2d9f;(function(_0x28b6dc,_0xc0dc5c){const _0x2db959=a33_0x2d9f,_0x228b1d=_0x28b6dc();while(!![]){try{const _0xa2452d=parseInt(_0x2db959(0xce))/0x1*(-parseInt(_0x2db959(0xcd))/0x2)+-parseInt(_0x2db959(0xdd))/0x3*(parseInt(_0x2db959(0xd9))/0x4)+parseInt(_0x2db959(0xd3))/0x5+-parseInt(_0x2db959(0xd1))/0x6+-parseInt(_0x2db959(0xd8))/0x7+parseInt(_0x2db959(0xc6))/0x8+-parseInt(_0x2db959(0xc3))/0x9*(-parseInt(_0x2db959(0xe0))/0xa);if(_0xa2452d===_0xc0dc5c)break;else _0x228b1d['push'](_0x228b1d['shift']());}catch(_0x1b3dbc){_0x228b1d['push'](_0x228b1d['shift']());}}}(a33_0x3eec,0xb778b));import{logger}from'../../utils/logger.js';function a33_0x2d9f(_0x56bde6,_0x286c03){_0x56bde6=_0x56bde6-0xc0;const _0x3eec55=a33_0x3eec();let _0x2d9fed=_0x3eec55[_0x56bde6];return _0x2d9fed;}import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function a33_0x3eec(){const _0x3ffe9e=['stringify','\x20\x20\x20Duration:\x20','218576eAwJDU','clear','level','message','toLocaleString','details','Clear\x20command\x20history\x20logs','2480354bckQBh','1jwxjFd','warn','error','8102328xkfxqv','\x20\x20\x20Time:\x20','5726490lgzpdp','*\x20Logs\x20cleared','logs','write','command','5595982YJKMJV','12VoPoeP','readLogs','clearLogs','success','126864vVguBd','log','View\x20command\x20history\x20logs','10970obQBiK','duration','timestamp','en-US','25398pwVIHp'];a33_0x3eec=function(){return _0x3ffe9e;};return a33_0x3eec();}function printLogs(_0x1f859a){if(_0x1f859a['length']===0x0){console['log']('*\x20No\x20logs\x20found');return;}console['log']('*\x20'+CLI_DISPLAY_NAME+'\x20logs:\x0a'),_0x1f859a['forEach']((_0xd5ea2b,_0x217a1e)=>{const _0x567b3d=a33_0x2d9f,_0x1562d8=new Date(_0xd5ea2b[_0x567b3d(0xc1)])[_0x567b3d(0xca)](_0x567b3d(0xc2)),_0x407def=_0xd5ea2b[_0x567b3d(0xc8)]===_0x567b3d(0xdc)?'√':_0xd5ea2b[_0x567b3d(0xc8)]===_0x567b3d(0xd0)?'×':_0xd5ea2b['level']===_0x567b3d(0xcf)?'!':'i';console['log'](_0x217a1e+0x1+'.\x20'+_0x407def+'\x20['+_0xd5ea2b[_0x567b3d(0xd7)]+']\x20'+_0xd5ea2b[_0x567b3d(0xc9)]),console[_0x567b3d(0xde)](_0x567b3d(0xd2)+_0x1562d8),_0xd5ea2b[_0x567b3d(0xc0)]&&console[_0x567b3d(0xde)](_0x567b3d(0xc5)+_0xd5ea2b[_0x567b3d(0xc0)]+'ms'),_0xd5ea2b[_0x567b3d(0xcb)]&&Object['keys'](_0xd5ea2b[_0x567b3d(0xcb)])['length']>0x0&&console[_0x567b3d(0xde)]('\x20\x20\x20Details:\x20'+JSON[_0x567b3d(0xc4)](_0xd5ea2b[_0x567b3d(0xcb)],null,0x2)),console[_0x567b3d(0xde)]('');});}export const logsDefinitions=[{'service':'logs','command':'show','description':a33_0x470aec(0xdf),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x58d8f3){const _0x488bdc=a33_0x470aec;return printLogs(logger[_0x488bdc(0xda)]()),{'ok':!![]};}},{'service':a33_0x470aec(0xd5),'command':a33_0x470aec(0xc7),'description':a33_0x470aec(0xcc),'risk':a33_0x470aec(0xd6),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x5c8ea0){const _0x4d9771=a33_0x470aec;return logger[_0x4d9771(0xdb)](),console['log'](_0x4d9771(0xd4)),{'ok':!![]};}}];
1
+ const a33_0x2283fc=a33_0x284a;function a33_0x284a(_0x315d8f,_0x126ddf){_0x315d8f=_0x315d8f-0x1e1;const _0x4c25c8=a33_0x4c25();let _0x284ab5=_0x4c25c8[_0x315d8f];return _0x284ab5;}(function(_0x1d3a3e,_0x2c074f){const _0x1899c3=a33_0x284a,_0x34fe08=_0x1d3a3e();while(!![]){try{const _0x4345ab=parseInt(_0x1899c3(0x1ee))/0x1*(-parseInt(_0x1899c3(0x1e1))/0x2)+parseInt(_0x1899c3(0x1f9))/0x3+-parseInt(_0x1899c3(0x1e6))/0x4*(parseInt(_0x1899c3(0x1ea))/0x5)+-parseInt(_0x1899c3(0x1fd))/0x6+-parseInt(_0x1899c3(0x1f4))/0x7+parseInt(_0x1899c3(0x1e9))/0x8*(parseInt(_0x1899c3(0x1f0))/0x9)+parseInt(_0x1899c3(0x1e8))/0xa*(parseInt(_0x1899c3(0x203))/0xb);if(_0x4345ab===_0x2c074f)break;else _0x34fe08['push'](_0x34fe08['shift']());}catch(_0x58a1b0){_0x34fe08['push'](_0x34fe08['shift']());}}}(a33_0x4c25,0xa64f7));function a33_0x4c25(){const _0x3740c9=['\x20\x20\x20Details:\x20','message','logs','write','109748NsXqZS','\x20\x20\x20Duration:\x20','320VwJsyZ','28808NwCHBt','35KnfTPv','clear','*\x20Logs\x20cleared','length','368497dLoFzD','clearLogs','1071zaOfoX','readLogs','en-US','Clear\x20command\x20history\x20logs','8316595OgFwuU','stringify','level','View\x20command\x20history\x20logs','details','1776090lCiepP','keys','success','warn','2655822GZkeru','duration','timestamp','show','toLocaleString','log','636603vzmxyt','\x20logs:\x0a','2uKMBLN'];a33_0x4c25=function(){return _0x3740c9;};return a33_0x4c25();}import{logger}from'../../utils/logger.js';import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function printLogs(_0x5b22fe){const _0x4a8a4a=a33_0x284a;if(_0x5b22fe[_0x4a8a4a(0x1ed)]===0x0){console[_0x4a8a4a(0x202)]('*\x20No\x20logs\x20found');return;}console[_0x4a8a4a(0x202)]('*\x20'+CLI_DISPLAY_NAME+_0x4a8a4a(0x204)),_0x5b22fe['forEach']((_0x5cc8e3,_0x2e9a72)=>{const _0x364831=_0x4a8a4a,_0x33146a=new Date(_0x5cc8e3[_0x364831(0x1ff)])[_0x364831(0x201)](_0x364831(0x1f2)),_0x11bc96=_0x5cc8e3[_0x364831(0x1f6)]===_0x364831(0x1fb)?'√':_0x5cc8e3[_0x364831(0x1f6)]==='error'?'×':_0x5cc8e3[_0x364831(0x1f6)]===_0x364831(0x1fc)?'!':'i';console[_0x364831(0x202)](_0x2e9a72+0x1+'.\x20'+_0x11bc96+'\x20['+_0x5cc8e3['command']+']\x20'+_0x5cc8e3[_0x364831(0x1e3)]),console[_0x364831(0x202)]('\x20\x20\x20Time:\x20'+_0x33146a),_0x5cc8e3['duration']&&console[_0x364831(0x202)](_0x364831(0x1e7)+_0x5cc8e3[_0x364831(0x1fe)]+'ms'),_0x5cc8e3[_0x364831(0x1f8)]&&Object[_0x364831(0x1fa)](_0x5cc8e3['details'])[_0x364831(0x1ed)]>0x0&&console[_0x364831(0x202)](_0x364831(0x1e2)+JSON[_0x364831(0x1f5)](_0x5cc8e3['details'],null,0x2)),console['log']('');});}export const logsDefinitions=[{'service':'logs','command':a33_0x2283fc(0x200),'description':a33_0x2283fc(0x1f7),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x5c6d1a){const _0x4edd16=a33_0x2283fc;return printLogs(logger[_0x4edd16(0x1f1)]()),{'ok':!![]};}},{'service':a33_0x2283fc(0x1e4),'command':a33_0x2283fc(0x1eb),'description':a33_0x2283fc(0x1f3),'risk':a33_0x2283fc(0x1e5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x9f52a9){const _0x180468=a33_0x2283fc;return logger[_0x180468(0x1ef)](),console['log'](_0x180468(0x1ec)),{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a34_0x5cd19b=a34_0x3ca9;(function(_0x5406a9,_0x2371da){const _0x186754=a34_0x3ca9,_0x30c4e6=_0x5406a9();while(!![]){try{const _0x3cee77=parseInt(_0x186754(0xc8))/0x1+-parseInt(_0x186754(0xaa))/0x2+-parseInt(_0x186754(0xc7))/0x3*(-parseInt(_0x186754(0xa5))/0x4)+parseInt(_0x186754(0xc4))/0x5*(parseInt(_0x186754(0x9d))/0x6)+-parseInt(_0x186754(0xbc))/0x7+parseInt(_0x186754(0xc1))/0x8+-parseInt(_0x186754(0xc3))/0x9*(-parseInt(_0x186754(0xa4))/0xa);if(_0x3cee77===_0x2371da)break;else _0x30c4e6['push'](_0x30c4e6['shift']());}catch(_0x3cde45){_0x30c4e6['push'](_0x30c4e6['shift']());}}}(a34_0x5123,0x9c353));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';import{queryRuntimeFileUrl,recognizeRuntimeOcr,uploadRuntimeFile}from'../../core/api-client.js';function a34_0x5123(){const _0x3d8bd9=['string','Invoice','str','imageUrl','trim','appCode','build','/client/uploadFile','idcard','filePath','18UAfMOt','body','validation','join','path','image-file','\x20OCR\x20from\x20URL','89230sbnPwg','4goQlHG','File\x20upload\x20response\x20missing\x20filePath.','Recognize\x20text\x20from\x20a\x20URL\x20or\x20local\x20file\x20using\x20the\x20runtime\x20OCR\x20service','length','scene','1326746dabWJT','/client/queryFileUrl','\x20OCR','Table','image-url','idCard','form','recognize','invoice','fileUrl','Local\x20image\x20or\x20PDF\x20file;\x20current\x20backend\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','apiError','<filePath\x20returned\x20by\x20/client/uploadFile>','filter','description','OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard','<fileUrl\x20returned\x20by\x20/client/queryFileUrl>','File\x20URL\x20response\x20missing\x20fileUrl.','2101344lPVlLL','/client/ocr','write','general','Unsupported\x20OCR\x20scene:\x20','5496016dCtyRn','POST','297KciHqk','585410riZIwF','ocr','Preview:\x20recognize\x20','170283YiATJi','213924urwysB'];a34_0x5123=function(){return _0x3d8bd9;};return a34_0x5123();}import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const SUPPORTED_SCENES=[a34_0x5cd19b(0xb2),'general',a34_0x5cd19b(0xb0),a34_0x5cd19b(0xaf)],SCENE_TO_LEGACY_TYPE={'invoice':a34_0x5cd19b(0xca),'general':'General','form':a34_0x5cd19b(0xad),'idCard':'IdCard'},SCENE_FLAG={'name':a34_0x5cd19b(0xa9),'type':a34_0x5cd19b(0xc9),'required':!![],'enum':[...SUPPORTED_SCENES],'description':a34_0x5cd19b(0xb9)},IMAGE_FILE_FLAG={'name':a34_0x5cd19b(0xa2),'type':a34_0x5cd19b(0xc9),'description':a34_0x5cd19b(0xb4)},IMAGE_URL_FLAG={'name':a34_0x5cd19b(0xae),'type':a34_0x5cd19b(0xc9),'description':'Publicly\x20accessible\x20image\x20or\x20file\x20URL'};function normalizeScene(_0x2feecb){const _0x3ef2ff=a34_0x5cd19b,_0x4e328a=_0x2feecb[_0x3ef2ff(0x97)]()['toLowerCase']();if(_0x4e328a===_0x3ef2ff(0x9b))return _0x3ef2ff(0xaf);if(_0x4e328a==='invoice'||_0x4e328a===_0x3ef2ff(0xbf)||_0x4e328a===_0x3ef2ff(0xb0))return _0x4e328a;throw CliErrors[_0x3ef2ff(0x9f)](_0x3ef2ff(0xc0)+_0x2feecb+'.\x20Supported\x20scenes:\x20'+SUPPORTED_SCENES[_0x3ef2ff(0xa0)](',\x20'));}function selectedInputs(_0x1779d3){const _0x27f857=a34_0x5cd19b,_0x48e67e=_0x1779d3['str'](_0x27f857(0xa2))[_0x27f857(0x97)](),_0x49f162=_0x1779d3[_0x27f857(0xcb)](_0x27f857(0xae))[_0x27f857(0x97)]();return{'imageFile':_0x48e67e,'imageUrl':_0x49f162,'count':[_0x48e67e,_0x49f162][_0x27f857(0xb7)](Boolean)[_0x27f857(0xa8)]};}function validateInputSelection(_0xc12840){const _0x1626c=selectedInputs(_0xc12840);if(_0x1626c['count']!==0x1)throw CliErrors['validation']('Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.');return _0x1626c;}function withScene(_0x336090,_0x37aa19,_0x5ccdce){return{..._0x336090,'scene':_0x37aa19,..._0x5ccdce?{'sourceFile':{'fileName':_0x5ccdce['fileName'],'filePath':_0x5ccdce['filePath']}}:{}};}const ocrRecognize={'service':a34_0x5cd19b(0xc5),'command':a34_0x5cd19b(0xb1),'description':a34_0x5cd19b(0xa7),'risk':a34_0x5cd19b(0xbe),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0x4e7f43){const _0x67513e=a34_0x5cd19b,_0x25e3fb=normalizeScene(_0x4e7f43[_0x67513e(0xcb)](_0x67513e(0xa9))),_0x1fd0d2=SCENE_TO_LEGACY_TYPE[_0x25e3fb],_0x3b1efd=validateInputSelection(_0x4e7f43);if(_0x3b1efd[_0x67513e(0xcc)])return dryRun('POST','/client/ocr')['body']({'appCode':_0x4e7f43['appCode'],'url':_0x3b1efd[_0x67513e(0xcc)],'type':_0x1fd0d2})[_0x67513e(0xb8)](_0x67513e(0xc6)+_0x25e3fb+_0x67513e(0xa3))[_0x67513e(0x99)]();const _0x3addcd=requireRuntimeUploadFile(_0x3b1efd['imageFile'],'image-file');return dryRun(_0x67513e(0xc2),_0x67513e(0x9a))[_0x67513e(0x9e)]({'steps':[{'method':_0x67513e(0xc2),'url':_0x67513e(0x9a),'body':{'appCode':_0x4e7f43['appCode'],'multipart':{'file':_0x3addcd}}},{'method':_0x67513e(0xc2),'url':_0x67513e(0xab),'body':{'filePath':_0x67513e(0xb6),'downloadFlag':![]}},{'method':_0x67513e(0xc2),'url':_0x67513e(0xbd),'body':{'appCode':_0x4e7f43[_0x67513e(0x98)],'url':_0x67513e(0xba),'type':_0x1fd0d2}}]})[_0x67513e(0xb8)]('Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20'+_0x25e3fb+_0x67513e(0xac))[_0x67513e(0x99)]();},async 'execute'(_0x11a555){const _0x49492e=a34_0x5cd19b,_0x1a5353=normalizeScene(_0x11a555[_0x49492e(0xcb)]('scene')),_0x41f37f=SCENE_TO_LEGACY_TYPE[_0x1a5353],_0x36456e=validateInputSelection(_0x11a555);if(_0x36456e[_0x49492e(0xcc)]){const _0x835486=await recognizeRuntimeOcr(_0x11a555[_0x49492e(0x98)],{'url':_0x36456e[_0x49492e(0xcc)],'type':_0x41f37f});return{'ok':!![],'data':withScene(_0x835486,_0x1a5353)};}const _0x44bf05=requireRuntimeUploadFile(_0x36456e['imageFile'],_0x49492e(0xa2)),_0x255aa1=await uploadRuntimeFile(_0x11a555[_0x49492e(0x98)],_0x44bf05[_0x49492e(0xa1)]);if(!_0x255aa1[_0x49492e(0x9c)])throw CliErrors[_0x49492e(0xb5)](_0x49492e(0xa6));const _0x3a7cd3=await queryRuntimeFileUrl(_0x255aa1[_0x49492e(0x9c)],{'download':![]});if(!_0x3a7cd3['fileUrl'])throw CliErrors[_0x49492e(0xb5)](_0x49492e(0xbb));const _0x4657dc=await recognizeRuntimeOcr(_0x11a555['appCode'],{'url':_0x3a7cd3[_0x49492e(0xb3)],'type':_0x41f37f});return{'ok':!![],'data':withScene(_0x4657dc,_0x1a5353,_0x255aa1)};}};function a34_0x3ca9(_0x3d10ab,_0x2c7820){_0x3d10ab=_0x3d10ab-0x97;const _0x512300=a34_0x5123();let _0x3ca9fa=_0x512300[_0x3d10ab];return _0x3ca9fa;}export const ocrDefinitions=[ocrRecognize];
1
+ function a34_0x1e1c(_0x28d006,_0x327957){_0x28d006=_0x28d006-0x15f;const _0x8e24b4=a34_0x8e24();let _0x1e1cac=_0x8e24b4[_0x28d006];return _0x1e1cac;}const a34_0x562b82=a34_0x1e1c;(function(_0x2e048a,_0x230bff){const _0x4c74fc=a34_0x1e1c,_0x204f4a=_0x2e048a();while(!![]){try{const _0x1840f3=parseInt(_0x4c74fc(0x194))/0x1+parseInt(_0x4c74fc(0x15f))/0x2*(parseInt(_0x4c74fc(0x18e))/0x3)+parseInt(_0x4c74fc(0x171))/0x4*(-parseInt(_0x4c74fc(0x175))/0x5)+parseInt(_0x4c74fc(0x179))/0x6+-parseInt(_0x4c74fc(0x16a))/0x7+-parseInt(_0x4c74fc(0x16f))/0x8+parseInt(_0x4c74fc(0x180))/0x9;if(_0x1840f3===_0x230bff)break;else _0x204f4a['push'](_0x204f4a['shift']());}catch(_0x5ada89){_0x204f4a['push'](_0x204f4a['shift']());}}}(a34_0x8e24,0xc6355));import{requireRuntimeUploadFile}from'../../commands/common/local-file.js';import{queryRuntimeFileUrl,recognizeRuntimeOcr,uploadRuntimeFile}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const SUPPORTED_SCENES=[a34_0x562b82(0x163),'general','form',a34_0x562b82(0x17a)],SCENE_TO_LEGACY_TYPE={'invoice':a34_0x562b82(0x17d),'general':'General','form':a34_0x562b82(0x16b),'idCard':a34_0x562b82(0x177)},SCENE_FLAG={'name':a34_0x562b82(0x166),'type':a34_0x562b82(0x167),'required':!![],'enum':[...SUPPORTED_SCENES],'description':'OCR\x20scene:\x20invoice,\x20general,\x20form,\x20or\x20idCard'},IMAGE_FILE_FLAG={'name':a34_0x562b82(0x16d),'type':a34_0x562b82(0x167),'description':a34_0x562b82(0x193)},IMAGE_URL_FLAG={'name':a34_0x562b82(0x16c),'type':'string','description':a34_0x562b82(0x174)};function normalizeScene(_0x3970b9){const _0x11823f=a34_0x562b82,_0x89fb0c=_0x3970b9[_0x11823f(0x185)]()[_0x11823f(0x188)]();if(_0x89fb0c===_0x11823f(0x164))return _0x11823f(0x17a);if(_0x89fb0c==='invoice'||_0x89fb0c==='general'||_0x89fb0c===_0x11823f(0x17b))return _0x89fb0c;throw CliErrors[_0x11823f(0x168)](_0x11823f(0x173)+_0x3970b9+_0x11823f(0x184)+SUPPORTED_SCENES['join'](',\x20'));}function selectedInputs(_0x9bbf7a){const _0xf9c889=a34_0x562b82,_0x4c5c5d=_0x9bbf7a['str'](_0xf9c889(0x16d))[_0xf9c889(0x185)](),_0x487ed6=_0x9bbf7a[_0xf9c889(0x170)]('image-url')[_0xf9c889(0x185)]();return{'imageFile':_0x4c5c5d,'imageUrl':_0x487ed6,'count':[_0x4c5c5d,_0x487ed6][_0xf9c889(0x17c)](Boolean)['length']};}function validateInputSelection(_0x5c2cba){const _0x145152=a34_0x562b82,_0x4bc18e=selectedInputs(_0x5c2cba);if(_0x4bc18e[_0x145152(0x176)]!==0x1)throw CliErrors['validation'](_0x145152(0x191));return _0x4bc18e;}function withScene(_0x5b2be3,_0x5bf6d7,_0x1a0a8f){const _0x2584aa=a34_0x562b82;return{..._0x5b2be3,'scene':_0x5bf6d7,..._0x1a0a8f?{'sourceFile':{'fileName':_0x1a0a8f[_0x2584aa(0x189)],'filePath':_0x1a0a8f[_0x2584aa(0x18d)]}}:{}};}const ocrRecognize={'service':'ocr','command':'recognize','description':a34_0x562b82(0x16e),'risk':a34_0x562b82(0x17e),'flags':[SCENE_FLAG,IMAGE_FILE_FLAG,IMAGE_URL_FLAG],async 'dryRun'(_0xe0f12e){const _0x14f4ce=a34_0x562b82,_0x1e6a77=normalizeScene(_0xe0f12e['str'](_0x14f4ce(0x166))),_0x29b3ad=SCENE_TO_LEGACY_TYPE[_0x1e6a77],_0x3e8807=validateInputSelection(_0xe0f12e);if(_0x3e8807[_0x14f4ce(0x17f)])return dryRun(_0x14f4ce(0x161),'/client/ocr')[_0x14f4ce(0x160)]({'appCode':_0xe0f12e[_0x14f4ce(0x192)],'url':_0x3e8807[_0x14f4ce(0x17f)],'type':_0x29b3ad})[_0x14f4ce(0x181)](_0x14f4ce(0x18f)+_0x1e6a77+_0x14f4ce(0x190))[_0x14f4ce(0x195)]();const _0x5945cd=requireRuntimeUploadFile(_0x3e8807[_0x14f4ce(0x183)],_0x14f4ce(0x16d));return dryRun(_0x14f4ce(0x161),_0x14f4ce(0x18b))[_0x14f4ce(0x160)]({'steps':[{'method':_0x14f4ce(0x161),'url':_0x14f4ce(0x18b),'body':{'appCode':_0xe0f12e['appCode'],'multipart':{'file':_0x5945cd}}},{'method':_0x14f4ce(0x161),'url':'/client/queryFileUrl','body':{'filePath':_0x14f4ce(0x169),'downloadFlag':![]}},{'method':'POST','url':_0x14f4ce(0x172),'body':{'appCode':_0xe0f12e['appCode'],'url':_0x14f4ce(0x165),'type':_0x29b3ad}}]})[_0x14f4ce(0x181)](_0x14f4ce(0x162)+_0x1e6a77+_0x14f4ce(0x18a))[_0x14f4ce(0x195)]();},async 'execute'(_0x53c60e){const _0x44fd7b=a34_0x562b82,_0x5dd2b6=normalizeScene(_0x53c60e['str'](_0x44fd7b(0x166))),_0x522e63=SCENE_TO_LEGACY_TYPE[_0x5dd2b6],_0x3d11f3=validateInputSelection(_0x53c60e);if(_0x3d11f3[_0x44fd7b(0x17f)]){const _0x58150d=await recognizeRuntimeOcr(_0x53c60e['appCode'],{'url':_0x3d11f3[_0x44fd7b(0x17f)],'type':_0x522e63});return{'ok':!![],'data':withScene(_0x58150d,_0x5dd2b6)};}const _0x534d6f=requireRuntimeUploadFile(_0x3d11f3['imageFile'],_0x44fd7b(0x16d)),_0x2aa676=await uploadRuntimeFile(_0x53c60e[_0x44fd7b(0x192)],_0x534d6f[_0x44fd7b(0x178)]);if(!_0x2aa676[_0x44fd7b(0x18d)])throw CliErrors[_0x44fd7b(0x18c)](_0x44fd7b(0x186));const _0x5bfb0b=await queryRuntimeFileUrl(_0x2aa676[_0x44fd7b(0x18d)],{'download':![]});if(!_0x5bfb0b[_0x44fd7b(0x187)])throw CliErrors[_0x44fd7b(0x18c)](_0x44fd7b(0x182));const _0x1f8f99=await recognizeRuntimeOcr(_0x53c60e[_0x44fd7b(0x192)],{'url':_0x5bfb0b[_0x44fd7b(0x187)],'type':_0x522e63});return{'ok':!![],'data':withScene(_0x1f8f99,_0x5dd2b6,_0x2aa676)};}};export const ocrDefinitions=[ocrRecognize];function a34_0x8e24(){const _0xf5dddd=['Table','image-url','image-file','Recognize\x20text\x20from\x20a\x20URL\x20or\x20local\x20file\x20using\x20the\x20runtime\x20OCR\x20service','11190880Ggahgr','str','4LZmnwy','/client/ocr','Unsupported\x20OCR\x20scene:\x20','Publicly\x20accessible\x20image\x20or\x20file\x20URL','1703715GleMzN','count','IdCard','path','772512LRLcQK','idCard','form','filter','Invoice','write','imageUrl','19259748oZKevl','description','File\x20URL\x20response\x20missing\x20fileUrl.','imageFile','.\x20Supported\x20scenes:\x20','trim','File\x20upload\x20response\x20missing\x20filePath.','fileUrl','toLowerCase','fileName','\x20OCR','/client/uploadFile','apiError','filePath','3wbFRVS','Preview:\x20recognize\x20','\x20OCR\x20from\x20URL','Choose\x20exactly\x20one\x20OCR\x20input:\x20--image-file\x20or\x20--image-url.','appCode','Local\x20image\x20or\x20PDF\x20file;\x20current\x20backend\x20uses\x20upload\x20->\x20query-url\x20->\x20OCR','516308EhrHyy','build','1640598uwHEcU','body','POST','Preview:\x20upload\x20local\x20file,\x20query\x20temporary\x20URL,\x20then\x20recognize\x20','invoice','idcard','<fileUrl\x20returned\x20by\x20/client/queryFileUrl>','scene','string','validation','<filePath\x20returned\x20by\x20/client/uploadFile>','7377069RyEMRM'];a34_0x8e24=function(){return _0xf5dddd;};return a34_0x8e24();}
@@ -1 +1 @@
1
- const a35_0xe04603=a35_0x4a6a;(function(_0x30451e,_0xbdb89e){const _0xb4479d=a35_0x4a6a,_0x384785=_0x30451e();while(!![]){try{const _0x3488a3=-parseInt(_0xb4479d(0x114))/0x1+-parseInt(_0xb4479d(0xd8))/0x2+-parseInt(_0xb4479d(0xf9))/0x3+parseInt(_0xb4479d(0x116))/0x4*(-parseInt(_0xb4479d(0xeb))/0x5)+-parseInt(_0xb4479d(0x113))/0x6*(parseInt(_0xb4479d(0xec))/0x7)+parseInt(_0xb4479d(0xf8))/0x8*(-parseInt(_0xb4479d(0x107))/0x9)+parseInt(_0xb4479d(0xe1))/0xa*(parseInt(_0xb4479d(0xed))/0xb);if(_0x3488a3===_0xbdb89e)break;else _0x384785['push'](_0x384785['shift']());}catch(_0x405dd3){_0x384785['push'](_0x384785['shift']());}}}(a35_0x8bc1,0x551e3));import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalBff,executePersonalBff,getPersonalBff,listPersonalBffs,updatePersonalBff}from'../../core/api-client.js';import{ID_FLAG,PARAMS_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';import{parseJsonParams}from'../../utils/params.js';const FUNCTION_NAME_PATTERN=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/,FILE_FLAG={'name':a35_0xe04603(0x110),'type':a35_0xe04603(0xf7),'description':'Path\x20to\x20a\x20local\x20UTF-8\x20JavaScript\x20or\x20TypeScript\x20file'},FUNCTION_NAME_FLAG={'name':a35_0xe04603(0xee),'type':'string','required':!![],'description':a35_0xe04603(0x11a)},DESCRIPTION_FLAG={'name':a35_0xe04603(0xe6),'type':a35_0xe04603(0xf7),'description':a35_0xe04603(0xdc)},SOURCE_SESSION_FLAG={'name':a35_0xe04603(0x10a),'type':'string','description':a35_0xe04603(0xdf)};function normalizeFunctionName(_0x33ed9c){const _0x1ef74a=a35_0xe04603,_0x6b6f20=String(_0x33ed9c||'')[_0x1ef74a(0x111)]();if(!_0x6b6f20||!FUNCTION_NAME_PATTERN[_0x1ef74a(0xf0)](_0x6b6f20))throw CliErrors[_0x1ef74a(0xf2)](_0x1ef74a(0xd9));return _0x6b6f20;}function readScriptFile(_0x18aa27){const _0x436a65=a35_0xe04603;if(!_0x18aa27)throw CliErrors[_0x436a65(0xf2)](_0x436a65(0xf1));if(!existsSync(_0x18aa27))throw CliErrors[_0x436a65(0xf2)](_0x436a65(0xff)+_0x18aa27);if(!statSync(_0x18aa27)[_0x436a65(0x106)]())throw CliErrors['validation']('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x18aa27);const _0x2a0bc1=readFileSync(_0x18aa27,_0x436a65(0xd7));if(!_0x2a0bc1[_0x436a65(0x111)]())throw CliErrors[_0x436a65(0xf2)](_0x436a65(0x119));return _0x2a0bc1;}function a35_0x4a6a(_0x383384,_0x32649c){_0x383384=_0x383384-0xd6;const _0x8bc11d=a35_0x8bc1();let _0x4a6a6d=_0x8bc11d[_0x383384];return _0x4a6a6d;}function optionalTrimmed(_0x10ddc7){const _0x5a5db0=String(_0x10ddc7||'')['trim']();return _0x5a5db0||undefined;}function summarizeBff(_0x4c79e4){const _0x365728=a35_0xe04603;return{'id':_0x4c79e4['id'],'appCode':_0x4c79e4[_0x365728(0x100)],'functionName':_0x4c79e4[_0x365728(0xf4)],'description':_0x4c79e4[_0x365728(0xe6)],'scriptType':_0x4c79e4['scriptType'],'version':_0x4c79e4[_0x365728(0x10c)],'gmtModified':_0x4c79e4['gmtModified'],'updateTime':_0x4c79e4[_0x365728(0x10e)]};}function detailBff(_0x3cd105){const _0x4b6b5a=a35_0xe04603;return{'id':_0x3cd105['id'],'appCode':_0x3cd105[_0x4b6b5a(0x100)],'functionName':_0x3cd105[_0x4b6b5a(0xf4)],'description':_0x3cd105['description'],'scriptType':_0x3cd105[_0x4b6b5a(0xdd)],'scriptContent':_0x3cd105[_0x4b6b5a(0x103)]??'','config':_0x3cd105['config'],'version':_0x3cd105[_0x4b6b5a(0x10c)],'createUserId':_0x3cd105['createUserId'],'gmtCreate':_0x3cd105[_0x4b6b5a(0xe8)],'gmtModified':_0x3cd105[_0x4b6b5a(0x104)],'createTime':_0x3cd105[_0x4b6b5a(0xe4)],'updateTime':_0x3cd105[_0x4b6b5a(0x10e)]};}function buildCreateInput(_0x50af10){const _0x6b09bb=a35_0xe04603;return{'functionName':normalizeFunctionName(_0x50af10['str'](_0x6b09bb(0xee))),...optionalTrimmed(_0x50af10[_0x6b09bb(0xf6)](_0x6b09bb(0xe6)))?{'description':optionalTrimmed(_0x50af10[_0x6b09bb(0xf6)](_0x6b09bb(0xe6)))}:{},'scriptContent':readScriptFile(_0x50af10[_0x6b09bb(0xf6)]('file')),...optionalTrimmed(_0x50af10[_0x6b09bb(0xf6)](_0x6b09bb(0x10a)))?{'sourceSessionId':optionalTrimmed(_0x50af10[_0x6b09bb(0xf6)]('source-session-id'))}:{}};}function buildUpdateInput(_0x3f57ad){const _0x3cb1d8=a35_0xe04603,_0x29bcb4={};optionalTrimmed(_0x3f57ad[_0x3cb1d8(0xf6)](_0x3cb1d8(0xee)))&&(_0x29bcb4['functionName']=normalizeFunctionName(_0x3f57ad[_0x3cb1d8(0xf6)](_0x3cb1d8(0xee))));_0x3f57ad[_0x3cb1d8(0x112)](_0x3cb1d8(0xe6))!==undefined&&(_0x29bcb4[_0x3cb1d8(0xe6)]=_0x3f57ad['str'](_0x3cb1d8(0xe6)));optionalTrimmed(_0x3f57ad[_0x3cb1d8(0xf6)](_0x3cb1d8(0x110)))&&(_0x29bcb4['scriptContent']=readScriptFile(_0x3f57ad[_0x3cb1d8(0xf6)](_0x3cb1d8(0x110))));_0x3f57ad[_0x3cb1d8(0x112)](_0x3cb1d8(0x10a))!==undefined&&(_0x29bcb4[_0x3cb1d8(0xfd)]=_0x3f57ad[_0x3cb1d8(0xf6)]('source-session-id'));if(Object['keys'](_0x29bcb4)[_0x3cb1d8(0x109)]===0x0)throw CliErrors['validation'](_0x3cb1d8(0x10f));return _0x29bcb4;}function a35_0x8bc1(){const _0x24bb92=['write','10ACvbXq','read','bool','createTime','params','description','personal-bff','gmtCreate','isArray','JSON\x20object\x20passed\x20to\x20the\x20personal\x20BFF\x20execution','517785PzFJZz','1191673bhNHto','20542225eenVRr','name','/client/runtime-bff/personal/','test','File\x20path\x20is\x20required.','validation','/update','functionName','Preview:\x20update\x20personal\x20BFF\x20','str','string','40otKjat','1586133jmWMOT','high-risk-write','create','Update\x20a\x20personal\x20BFF\x20by\x20id','sourceSessionId','detail','File\x20not\x20found:\x20','appCode','Created\x20personal\x20BFF\x20','Updated\x20personal\x20BFF\x20','scriptContent','gmtModified','map','isFile','1566QfSyKi','list','length','source-session-id','Show\x20one\x20personal\x20BFF\x20by\x20id','version','update','updateTime','personal-bff\x20update\x20requires\x20at\x20least\x20one\x20of\x20--name,\x20--description,\x20--file,\x20or\x20--source-session-id.','file','trim','flag','6ENXQgw','65185EJTpDG','Executed\x20personal\x20BFF\x20','8XGPMIj','/client/runtime-bff/personal/create','Personal\x20BFF\x20script\x20ID','Personal\x20BFF\x20script\x20file\x20is\x20blank.','Personal\x20BFF\x20functionName,\x20for\x20example\x20loadOrders','num','utf8','1093426epvqdn','--name\x20must\x20be\x20a\x20valid\x20JavaScript\x20identifier,\x20for\x20example\x20loadOrders.','verbose','POST','Personal\x20BFF\x20description','scriptType','--params\x20must\x20be\x20a\x20JSON\x20object.','Optional\x20source\x20RuntimeAgent\x20session\x20id'];a35_0x8bc1=function(){return _0x24bb92;};return a35_0x8bc1();}function parseExecParams(_0x606330){const _0x4d318f=a35_0xe04603,_0x2aabc8=parseJsonParams(_0x606330)??{};if(Array[_0x4d318f(0xe9)](_0x2aabc8))throw CliErrors[_0x4d318f(0xf2)](_0x4d318f(0xde));return _0x2aabc8;}const personalBffList={'service':a35_0xe04603(0xe7),'command':a35_0xe04603(0x108),'description':'List\x20current\x20user\x27s\x20personal\x20BFF\x20scripts\x20for\x20the\x20current\x20app','risk':a35_0xe04603(0xe2),'flags':[VERBOSE_FLAG],async 'execute'(_0x1eba01){const _0x47b89c=a35_0xe04603,_0x426fd8=await listPersonalBffs(_0x1eba01[_0x47b89c(0x100)]);return{'ok':!![],'data':{'total':_0x426fd8[_0x47b89c(0x109)],'items':_0x1eba01[_0x47b89c(0xe3)](_0x47b89c(0xda))?_0x426fd8:_0x426fd8[_0x47b89c(0x105)](summarizeBff)}};}},personalBffDetail={'service':a35_0xe04603(0xe7),'command':a35_0xe04603(0xfe),'description':a35_0xe04603(0x10b),'risk':a35_0xe04603(0xe2),'flags':[{...ID_FLAG,'description':a35_0xe04603(0x118)}],async 'execute'(_0x1d850b){const _0x133231=await getPersonalBff(_0x1d850b['num']('id'),_0x1d850b['appCode']);return{'ok':!![],'data':detailBff(_0x133231)};}},personalBffCreate={'service':'personal-bff','command':a35_0xe04603(0xfb),'description':'Create\x20a\x20personal\x20BFF\x20from\x20a\x20local\x20script\x20file','risk':a35_0xe04603(0xe0),'flags':[FUNCTION_NAME_FLAG,{...FILE_FLAG,'required':!![]},DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x456d16){const _0x4798df=a35_0xe04603,_0xa28e2f=buildCreateInput(_0x456d16),_0x51017a=await createPersonalBff(_0x456d16['appCode'],_0xa28e2f);return{'ok':!![],'data':detailBff(_0x51017a),'message':_0x4798df(0x101)+_0x51017a['id']+(_0x51017a[_0x4798df(0xf4)]?'\x20('+_0x51017a['functionName']+')':'')};},async 'dryRun'(_0x21d104){const _0x21b79e=a35_0xe04603,_0xed80b6=buildCreateInput(_0x21d104);return dryRun(_0x21b79e(0xdb),_0x21b79e(0x117))['body']({'appCode':_0x21d104[_0x21b79e(0x100)],..._0xed80b6})[_0x21b79e(0xe6)]('Preview:\x20create\x20personal\x20BFF\x20'+_0xed80b6[_0x21b79e(0xf4)])['build']();}},personalBffUpdate={'service':a35_0xe04603(0xe7),'command':a35_0xe04603(0x10d),'description':a35_0xe04603(0xfc),'risk':a35_0xe04603(0xe0),'flags':[{...ID_FLAG,'description':a35_0xe04603(0x118)},{...FUNCTION_NAME_FLAG,'required':![]},FILE_FLAG,DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x4b3900){const _0x113893=a35_0xe04603,_0x4eac96=_0x4b3900[_0x113893(0xd6)]('id'),_0x2abd00=buildUpdateInput(_0x4b3900),_0x1f2bd4=await updatePersonalBff(_0x4eac96,_0x4b3900[_0x113893(0x100)],_0x2abd00);return{'ok':!![],'data':detailBff(_0x1f2bd4),'message':_0x113893(0x102)+_0x1f2bd4['id']+(_0x1f2bd4[_0x113893(0xf4)]?'\x20('+_0x1f2bd4['functionName']+')':'')};},async 'dryRun'(_0x3a06a4){const _0x4a1fff=a35_0xe04603,_0x1af589=_0x3a06a4[_0x4a1fff(0xd6)]('id'),_0x5cf5a6=buildUpdateInput(_0x3a06a4);return dryRun(_0x4a1fff(0xdb),_0x4a1fff(0xef)+_0x1af589+_0x4a1fff(0xf3))['body']({'appCode':_0x3a06a4['appCode'],..._0x5cf5a6})[_0x4a1fff(0xe6)](_0x4a1fff(0xf5)+_0x1af589)['build']();}},personalBffExec={'service':a35_0xe04603(0xe7),'command':'exec','description':'Execute\x20a\x20personal\x20BFF\x20by\x20id\x20with\x20optional\x20JSON\x20params','risk':a35_0xe04603(0xfa),'flags':[{...ID_FLAG,'description':'Personal\x20BFF\x20script\x20ID'},{...PARAMS_FLAG,'description':a35_0xe04603(0xea)}],async 'validate'(_0x11852d){const _0x4c9012=a35_0xe04603;parseExecParams(_0x11852d['str'](_0x4c9012(0xe5)));},async 'execute'(_0x3d67b7){const _0x479768=a35_0xe04603,_0x18bde0=_0x3d67b7['num']('id'),_0x43af5f=parseExecParams(_0x3d67b7['str'](_0x479768(0xe5))),_0x4f7dfa=await executePersonalBff(_0x18bde0,_0x3d67b7[_0x479768(0x100)],_0x43af5f);return{'ok':!![],'data':{'result':_0x4f7dfa},'message':_0x479768(0x115)+_0x18bde0};}};export const personalBffDefinitions=[personalBffList,personalBffDetail,personalBffCreate,personalBffUpdate,personalBffExec];
1
+ const a35_0x1ae6f7=a35_0x572d;(function(_0x1a0d1e,_0x12092f){const _0x4a2d39=a35_0x572d,_0x573dce=_0x1a0d1e();while(!![]){try{const _0x213eeb=parseInt(_0x4a2d39(0x157))/0x1*(parseInt(_0x4a2d39(0x130))/0x2)+-parseInt(_0x4a2d39(0x120))/0x3*(-parseInt(_0x4a2d39(0x15d))/0x4)+parseInt(_0x4a2d39(0x11d))/0x5*(-parseInt(_0x4a2d39(0x135))/0x6)+-parseInt(_0x4a2d39(0x15b))/0x7*(parseInt(_0x4a2d39(0x11c))/0x8)+-parseInt(_0x4a2d39(0x154))/0x9+parseInt(_0x4a2d39(0x147))/0xa+-parseInt(_0x4a2d39(0x153))/0xb*(-parseInt(_0x4a2d39(0x14f))/0xc);if(_0x213eeb===_0x12092f)break;else _0x573dce['push'](_0x573dce['shift']());}catch(_0x3a7c65){_0x573dce['push'](_0x573dce['shift']());}}}(a35_0x3ae4,0x75cf2));import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalBff,executePersonalBff,getPersonalBff,listPersonalBffs,updatePersonalBff}from'../../core/api-client.js';import{ID_FLAG,PARAMS_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';import{parseJsonParams}from'../../utils/params.js';const FUNCTION_NAME_PATTERN=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/,FILE_FLAG={'name':a35_0x1ae6f7(0x158),'type':a35_0x1ae6f7(0x121),'description':a35_0x1ae6f7(0x132)},FUNCTION_NAME_FLAG={'name':'name','type':a35_0x1ae6f7(0x121),'required':!![],'description':'Personal\x20BFF\x20functionName,\x20for\x20example\x20loadOrders'},DESCRIPTION_FLAG={'name':a35_0x1ae6f7(0x152),'type':a35_0x1ae6f7(0x121),'description':a35_0x1ae6f7(0x15c)},SOURCE_SESSION_FLAG={'name':'source-session-id','type':'string','description':a35_0x1ae6f7(0x15e)};function a35_0x3ae4(){const _0x2a1b4e=['high-risk-write','verbose','update','params','keys','Execute\x20a\x20personal\x20BFF\x20by\x20id\x20with\x20optional\x20JSON\x20params','Show\x20one\x20personal\x20BFF\x20by\x20id','create','Update\x20a\x20personal\x20BFF\x20by\x20id','exec','Preview:\x20create\x20personal\x20BFF\x20','/client/runtime-bff/personal/','write','config','--name\x20must\x20be\x20a\x20valid\x20JavaScript\x20identifier,\x20for\x20example\x20loadOrders.','8429720WeQRAn','validation','num','appCode','personal-bff','name','test','scriptContent','443604qXPPto','createUserId','updateTime','description','33uuecPa','6651648RxlDXw','body','source-session-id','731447FXFPBw','file','bool','File\x20is\x20not\x20a\x20regular\x20file:\x20','1114680uItJrU','Personal\x20BFF\x20description','435868lhtaLM','Optional\x20source\x20RuntimeAgent\x20session\x20id','isArray','File\x20path\x20is\x20required.','8wWlVrS','18325YIXciW','str','gmtModified','12CfNEMN','string','build','functionName','map','version','Personal\x20BFF\x20script\x20file\x20is\x20blank.','createTime','gmtCreate','--params\x20must\x20be\x20a\x20JSON\x20object.','flag','trim','List\x20current\x20user\x27s\x20personal\x20BFF\x20scripts\x20for\x20the\x20current\x20app','list','Personal\x20BFF\x20script\x20ID','POST','2JlvBib','length','Path\x20to\x20a\x20local\x20UTF-8\x20JavaScript\x20or\x20TypeScript\x20file','read','detail','1212jokrjF','isFile','scriptType'];a35_0x3ae4=function(){return _0x2a1b4e;};return a35_0x3ae4();}function normalizeFunctionName(_0x8efc07){const _0x43e379=a35_0x1ae6f7,_0x434aea=String(_0x8efc07||'')['trim']();if(!_0x434aea||!FUNCTION_NAME_PATTERN[_0x43e379(0x14d)](_0x434aea))throw CliErrors['validation'](_0x43e379(0x146));return _0x434aea;}function readScriptFile(_0xa9de35){const _0x3cb29e=a35_0x1ae6f7;if(!_0xa9de35)throw CliErrors[_0x3cb29e(0x148)](_0x3cb29e(0x11b));if(!existsSync(_0xa9de35))throw CliErrors['validation']('File\x20not\x20found:\x20'+_0xa9de35);if(!statSync(_0xa9de35)[_0x3cb29e(0x136)]())throw CliErrors[_0x3cb29e(0x148)](_0x3cb29e(0x15a)+_0xa9de35);const _0x4394bd=readFileSync(_0xa9de35,'utf8');if(!_0x4394bd[_0x3cb29e(0x12b)]())throw CliErrors[_0x3cb29e(0x148)](_0x3cb29e(0x126));return _0x4394bd;}function optionalTrimmed(_0x2f05bc){const _0x2fff8b=a35_0x1ae6f7,_0x1284eb=String(_0x2f05bc||'')[_0x2fff8b(0x12b)]();return _0x1284eb||undefined;}function summarizeBff(_0x1d4518){const _0x84a336=a35_0x1ae6f7;return{'id':_0x1d4518['id'],'appCode':_0x1d4518[_0x84a336(0x14a)],'functionName':_0x1d4518['functionName'],'description':_0x1d4518['description'],'scriptType':_0x1d4518[_0x84a336(0x137)],'version':_0x1d4518[_0x84a336(0x125)],'gmtModified':_0x1d4518[_0x84a336(0x11f)],'updateTime':_0x1d4518[_0x84a336(0x151)]};}function a35_0x572d(_0x1863a3,_0x2c0562){_0x1863a3=_0x1863a3-0x11b;const _0x3ae4f0=a35_0x3ae4();let _0x572d31=_0x3ae4f0[_0x1863a3];return _0x572d31;}function detailBff(_0x15a68d){const _0x5cf459=a35_0x1ae6f7;return{'id':_0x15a68d['id'],'appCode':_0x15a68d[_0x5cf459(0x14a)],'functionName':_0x15a68d[_0x5cf459(0x123)],'description':_0x15a68d['description'],'scriptType':_0x15a68d[_0x5cf459(0x137)],'scriptContent':_0x15a68d[_0x5cf459(0x14e)]??'','config':_0x15a68d[_0x5cf459(0x145)],'version':_0x15a68d[_0x5cf459(0x125)],'createUserId':_0x15a68d[_0x5cf459(0x150)],'gmtCreate':_0x15a68d[_0x5cf459(0x128)],'gmtModified':_0x15a68d['gmtModified'],'createTime':_0x15a68d[_0x5cf459(0x127)],'updateTime':_0x15a68d[_0x5cf459(0x151)]};}function buildCreateInput(_0x2d29ee){const _0x3f5181=a35_0x1ae6f7;return{'functionName':normalizeFunctionName(_0x2d29ee[_0x3f5181(0x11e)]('name')),...optionalTrimmed(_0x2d29ee['str'](_0x3f5181(0x152)))?{'description':optionalTrimmed(_0x2d29ee[_0x3f5181(0x11e)](_0x3f5181(0x152)))}:{},'scriptContent':readScriptFile(_0x2d29ee['str'](_0x3f5181(0x158))),...optionalTrimmed(_0x2d29ee[_0x3f5181(0x11e)](_0x3f5181(0x156)))?{'sourceSessionId':optionalTrimmed(_0x2d29ee[_0x3f5181(0x11e)](_0x3f5181(0x156)))}:{}};}function buildUpdateInput(_0x4d21dc){const _0x43d65c=a35_0x1ae6f7,_0x186f8f={};optionalTrimmed(_0x4d21dc[_0x43d65c(0x11e)](_0x43d65c(0x14c)))&&(_0x186f8f[_0x43d65c(0x123)]=normalizeFunctionName(_0x4d21dc[_0x43d65c(0x11e)](_0x43d65c(0x14c))));_0x4d21dc['flag'](_0x43d65c(0x152))!==undefined&&(_0x186f8f['description']=_0x4d21dc[_0x43d65c(0x11e)](_0x43d65c(0x152)));optionalTrimmed(_0x4d21dc['str']('file'))&&(_0x186f8f[_0x43d65c(0x14e)]=readScriptFile(_0x4d21dc[_0x43d65c(0x11e)](_0x43d65c(0x158))));_0x4d21dc[_0x43d65c(0x12a)](_0x43d65c(0x156))!==undefined&&(_0x186f8f['sourceSessionId']=_0x4d21dc[_0x43d65c(0x11e)](_0x43d65c(0x156)));if(Object[_0x43d65c(0x13c)](_0x186f8f)['length']===0x0)throw CliErrors[_0x43d65c(0x148)]('personal-bff\x20update\x20requires\x20at\x20least\x20one\x20of\x20--name,\x20--description,\x20--file,\x20or\x20--source-session-id.');return _0x186f8f;}function parseExecParams(_0x1d5806){const _0x474678=a35_0x1ae6f7,_0x2a6a30=parseJsonParams(_0x1d5806)??{};if(Array[_0x474678(0x15f)](_0x2a6a30))throw CliErrors['validation'](_0x474678(0x129));return _0x2a6a30;}const personalBffList={'service':a35_0x1ae6f7(0x14b),'command':a35_0x1ae6f7(0x12d),'description':a35_0x1ae6f7(0x12c),'risk':'read','flags':[VERBOSE_FLAG],async 'execute'(_0x115aed){const _0xbc93e=a35_0x1ae6f7,_0x2dcbba=await listPersonalBffs(_0x115aed['appCode']);return{'ok':!![],'data':{'total':_0x2dcbba[_0xbc93e(0x131)],'items':_0x115aed[_0xbc93e(0x159)](_0xbc93e(0x139))?_0x2dcbba:_0x2dcbba[_0xbc93e(0x124)](summarizeBff)}};}},personalBffDetail={'service':a35_0x1ae6f7(0x14b),'command':a35_0x1ae6f7(0x134),'description':a35_0x1ae6f7(0x13e),'risk':a35_0x1ae6f7(0x133),'flags':[{...ID_FLAG,'description':a35_0x1ae6f7(0x12e)}],async 'execute'(_0x9795a5){const _0x4e6a2f=a35_0x1ae6f7,_0x17b0e7=await getPersonalBff(_0x9795a5[_0x4e6a2f(0x149)]('id'),_0x9795a5[_0x4e6a2f(0x14a)]);return{'ok':!![],'data':detailBff(_0x17b0e7)};}},personalBffCreate={'service':a35_0x1ae6f7(0x14b),'command':a35_0x1ae6f7(0x13f),'description':'Create\x20a\x20personal\x20BFF\x20from\x20a\x20local\x20script\x20file','risk':a35_0x1ae6f7(0x144),'flags':[FUNCTION_NAME_FLAG,{...FILE_FLAG,'required':!![]},DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x104092){const _0x168944=a35_0x1ae6f7,_0x130f21=buildCreateInput(_0x104092),_0xf9d81b=await createPersonalBff(_0x104092[_0x168944(0x14a)],_0x130f21);return{'ok':!![],'data':detailBff(_0xf9d81b),'message':'Created\x20personal\x20BFF\x20'+_0xf9d81b['id']+(_0xf9d81b[_0x168944(0x123)]?'\x20('+_0xf9d81b[_0x168944(0x123)]+')':'')};},async 'dryRun'(_0x175dd1){const _0x542a6c=a35_0x1ae6f7,_0x2df33d=buildCreateInput(_0x175dd1);return dryRun(_0x542a6c(0x12f),'/client/runtime-bff/personal/create')['body']({'appCode':_0x175dd1[_0x542a6c(0x14a)],..._0x2df33d})[_0x542a6c(0x152)](_0x542a6c(0x142)+_0x2df33d[_0x542a6c(0x123)])[_0x542a6c(0x122)]();}},personalBffUpdate={'service':a35_0x1ae6f7(0x14b),'command':a35_0x1ae6f7(0x13a),'description':a35_0x1ae6f7(0x140),'risk':a35_0x1ae6f7(0x144),'flags':[{...ID_FLAG,'description':a35_0x1ae6f7(0x12e)},{...FUNCTION_NAME_FLAG,'required':![]},FILE_FLAG,DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x16d7cc){const _0x142703=a35_0x1ae6f7,_0xe4fda6=_0x16d7cc[_0x142703(0x149)]('id'),_0x5bf826=buildUpdateInput(_0x16d7cc),_0x32b447=await updatePersonalBff(_0xe4fda6,_0x16d7cc[_0x142703(0x14a)],_0x5bf826);return{'ok':!![],'data':detailBff(_0x32b447),'message':'Updated\x20personal\x20BFF\x20'+_0x32b447['id']+(_0x32b447[_0x142703(0x123)]?'\x20('+_0x32b447[_0x142703(0x123)]+')':'')};},async 'dryRun'(_0x160d95){const _0x36bc52=a35_0x1ae6f7,_0x51f659=_0x160d95[_0x36bc52(0x149)]('id'),_0x295962=buildUpdateInput(_0x160d95);return dryRun(_0x36bc52(0x12f),_0x36bc52(0x143)+_0x51f659+'/update')[_0x36bc52(0x155)]({'appCode':_0x160d95[_0x36bc52(0x14a)],..._0x295962})[_0x36bc52(0x152)]('Preview:\x20update\x20personal\x20BFF\x20'+_0x51f659)['build']();}},personalBffExec={'service':a35_0x1ae6f7(0x14b),'command':a35_0x1ae6f7(0x141),'description':a35_0x1ae6f7(0x13d),'risk':a35_0x1ae6f7(0x138),'flags':[{...ID_FLAG,'description':a35_0x1ae6f7(0x12e)},{...PARAMS_FLAG,'description':'JSON\x20object\x20passed\x20to\x20the\x20personal\x20BFF\x20execution'}],async 'validate'(_0x5b2034){const _0x3240a8=a35_0x1ae6f7;parseExecParams(_0x5b2034[_0x3240a8(0x11e)](_0x3240a8(0x13b)));},async 'execute'(_0x1cf894){const _0xb2a64=a35_0x1ae6f7,_0x56f40a=_0x1cf894[_0xb2a64(0x149)]('id'),_0x1a8d73=parseExecParams(_0x1cf894[_0xb2a64(0x11e)]('params')),_0x3a08df=await executePersonalBff(_0x56f40a,_0x1cf894['appCode'],_0x1a8d73);return{'ok':!![],'data':{'result':_0x3a08df},'message':'Executed\x20personal\x20BFF\x20'+_0x56f40a};}};export const personalBffDefinitions=[personalBffList,personalBffDetail,personalBffCreate,personalBffUpdate,personalBffExec];
@@ -1 +1 @@
1
- const a36_0x44e9cb=a36_0x2fed;(function(_0x1422bb,_0x3e8aaf){const _0x292947=a36_0x2fed,_0x40126d=_0x1422bb();while(!![]){try{const _0x1bb27b=parseInt(_0x292947(0x115))/0x1+-parseInt(_0x292947(0x101))/0x2+parseInt(_0x292947(0x105))/0x3+-parseInt(_0x292947(0x109))/0x4*(-parseInt(_0x292947(0x112))/0x5)+-parseInt(_0x292947(0x10a))/0x6*(-parseInt(_0x292947(0x10b))/0x7)+-parseInt(_0x292947(0x11a))/0x8+-parseInt(_0x292947(0x113))/0x9*(-parseInt(_0x292947(0xf9))/0xa);if(_0x1bb27b===_0x3e8aaf)break;else _0x40126d['push'](_0x40126d['shift']());}catch(_0x47d5e3){_0x40126d['push'](_0x40126d['shift']());}}}(a36_0x3280,0x8a1f7));function a36_0x2fed(_0x23787f,_0x596f4f){_0x23787f=_0x23787f-0xf8;const _0x3280a4=a36_0x3280();let _0x2fed5b=_0x3280a4[_0x23787f];return _0x2fed5b;}import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{skillDefinitions}from'../commands/skill/index.js';import{cliSkillDefinitions}from'../commands/cli-skill/index.js';import{serviceDefinitions}from'../commands/service/index.js';import{updateDefinition}from'../commands/update.js';import{doctorDefinition}from'../commands/doctor.js';import{schemaDefinition}from'../commands/schema.js';import{appDefinitions}from'../commands/app/definitions.js';import{workspaceDefinitions}from'../commands/workspace/index.js';function a36_0x3280(){const _0x18bd19=['map','Datasets','4NSVTTv','12vBwytL','887173wpwHGm','Runtime\x20App\x20Config','Workspace','API\x20Documentation','login','has','description','5027530zqRIBt','2067093bPapuM','install','458492cIoFTO','CLI\x20Built-in\x20Skill','values','File','command','8209816HGhcHB','run','BFF\x20Scripts','get','Schema','push','Logs','Knowledge\x20Base','isSingleCommand','from','service','10UbtcnC','risk','Authentication','Instant\x20API','Artifacts','SQL\x20Queries','show','Service\x20Tree','1651738rJxdyT','Skills','Configuration','set','1412082ALgcYa','OCR'];a36_0x3280=function(){return _0x18bd19;};return a36_0x3280();}import{configDefinitions}from'../commands/config/definitions.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{dataDefinitions}from'../commands/data/index.js';import{kbDefinitions}from'../commands/kb/index.js';import{artifactDefinitions}from'../commands/artifact/index.js';import{personalBffDefinitions}from'../commands/personal-bff/index.js';import{apiDocDefinitions}from'../commands/api-doc/index.js';import{appConfigDefinitions}from'../commands/app-config/index.js';import{fileDefinitions}from'../commands/file/index.js';import{ocrDefinitions}from'../commands/ocr/index.js';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x17347a){const _0x3bb4a5=a36_0x2fed;for(const _0x3f140d of _0x17347a){definitions[_0x3bb4a5(0x104)](_0x3f140d['service']+':'+_0x3f140d[_0x3bb4a5(0x119)],_0x3f140d);let _0x33daba=serviceGroups[_0x3bb4a5(0x11d)](_0x3f140d['service']);!_0x33daba&&(_0x33daba=[],serviceGroups[_0x3bb4a5(0x104)](_0x3f140d[_0x3bb4a5(0xf8)],_0x33daba)),_0x33daba[_0x3bb4a5(0x11f)](_0x3f140d);}}function registerService(_0x44632c,_0x1ac9f6,_0x2fb33f){const _0x13a9ed=a36_0x2fed;registerDefinitions(_0x1ac9f6);const _0x26d23c=_0x38f5e5=>_0x38f5e5==='read'?'':_0x38f5e5==='write'?'\x20\x20[write]':'\x20\x20[high-risk-write]',_0xc836a5={'service':_0x1ac9f6[0x0]['service'],'label':_0x44632c,'commands':_0x1ac9f6[_0x13a9ed(0x107)](_0x41b433=>({'command':_0x41b433[_0x13a9ed(0x119)],'description':_0x41b433[_0x13a9ed(0x111)],'tag':_0x26d23c(_0x41b433[_0x13a9ed(0xfa)])})),'defaultCommand':_0x2fb33f?.['defaultCommand']??(_0x2fb33f?.['isSingleCommand']?_0x1ac9f6[0x0][_0x13a9ed(0x119)]:undefined),'isSingleCommand':_0x2fb33f?.[_0x13a9ed(0x122)]};serviceRegistry[_0x13a9ed(0x11f)](_0xc836a5),serviceByName[_0x13a9ed(0x104)](_0xc836a5[_0x13a9ed(0xf8)],_0xc836a5);}registerService(a36_0x44e9cb(0xfb),authDefinitions,{'defaultCommand':a36_0x44e9cb(0x10f)}),registerService('App\x20Management',appDefinitions,{'defaultCommand':'list'}),registerService(a36_0x44e9cb(0x10d),workspaceDefinitions),registerService(a36_0x44e9cb(0x10c),appConfigDefinitions),registerService(a36_0x44e9cb(0x103),configDefinitions,{'defaultCommand':'list'}),registerService(a36_0x44e9cb(0x10e),apiDocDefinitions),registerService(a36_0x44e9cb(0x108),datasetDefinitions),registerService(a36_0x44e9cb(0xfc),dataDefinitions),registerService(a36_0x44e9cb(0xfe),sqlDefinitions),registerService(a36_0x44e9cb(0x11c),bffDefinitions),registerService('Personal\x20BFF',personalBffDefinitions),registerService(a36_0x44e9cb(0xfd),artifactDefinitions),registerService(a36_0x44e9cb(0x118),fileDefinitions),registerService(a36_0x44e9cb(0x106),ocrDefinitions),registerService(a36_0x44e9cb(0x121),kbDefinitions),registerService(a36_0x44e9cb(0x100),serviceDefinitions,{'defaultCommand':'list'}),registerService(a36_0x44e9cb(0x102),skillDefinitions,{'defaultCommand':a36_0x44e9cb(0x114)}),registerService(a36_0x44e9cb(0x116),cliSkillDefinitions,{'defaultCommand':a36_0x44e9cb(0x114)}),registerService('Self\x20Update',[updateDefinition],{'defaultCommand':a36_0x44e9cb(0x11b),'isSingleCommand':!![]}),registerService('Diagnostics',[doctorDefinition],{'isSingleCommand':!![]}),registerService(a36_0x44e9cb(0x11e),[schemaDefinition],{'isSingleCommand':!![]}),registerService(a36_0x44e9cb(0x120),logsDefinitions,{'defaultCommand':a36_0x44e9cb(0xff)});export function findDefinition(_0x2c1722,_0x4597f4){return definitions['get'](_0x2c1722+':'+_0x4597f4);}export function isKnownService(_0x3daf3f){const _0x4cfe8e=a36_0x44e9cb;return serviceByName[_0x4cfe8e(0x110)](_0x3daf3f);}export function getServiceEntry(_0x5d8702){const _0x561419=a36_0x44e9cb;return serviceByName[_0x561419(0x11d)](_0x5d8702);}export function getAllDefinitions(){const _0x364aff=a36_0x44e9cb;return Array[_0x364aff(0x123)](definitions[_0x364aff(0x117)]());}
1
+ const a36_0x5ec5c1=a36_0x2c42;(function(_0x29fb40,_0x125ef1){const _0x23af4e=a36_0x2c42,_0x4f5b32=_0x29fb40();while(!![]){try{const _0x4ccedb=-parseInt(_0x23af4e(0xab))/0x1+-parseInt(_0x23af4e(0xc9))/0x2*(-parseInt(_0x23af4e(0xac))/0x3)+-parseInt(_0x23af4e(0xb7))/0x4*(-parseInt(_0x23af4e(0xa1))/0x5)+-parseInt(_0x23af4e(0xa5))/0x6+parseInt(_0x23af4e(0xa8))/0x7*(-parseInt(_0x23af4e(0xc4))/0x8)+-parseInt(_0x23af4e(0xa0))/0x9+parseInt(_0x23af4e(0xc0))/0xa;if(_0x4ccedb===_0x125ef1)break;else _0x4f5b32['push'](_0x4f5b32['shift']());}catch(_0xed9850){_0x4f5b32['push'](_0x4f5b32['shift']());}}}(a36_0x7655,0xb3847));import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{skillDefinitions}from'../commands/skill/index.js';import{cliSkillDefinitions}from'../commands/cli-skill/index.js';import{serviceDefinitions}from'../commands/service/index.js';import{updateDefinition}from'../commands/update.js';import{doctorDefinition}from'../commands/doctor.js';import{schemaDefinition}from'../commands/schema.js';import{appDefinitions}from'../commands/app/definitions.js';import{workspaceDefinitions}from'../commands/workspace/index.js';import{configDefinitions}from'../commands/config/definitions.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{dataDefinitions}from'../commands/data/index.js';function a36_0x2c42(_0x4779ce,_0x39c9e9){_0x4779ce=_0x4779ce-0xa0;const _0x76559a=a36_0x7655();let _0x2c42d=_0x76559a[_0x4779ce];return _0x2c42d;}import{kbDefinitions}from'../commands/kb/index.js';import{artifactDefinitions}from'../commands/artifact/index.js';import{personalBffDefinitions}from'../commands/personal-bff/index.js';import{apiDocDefinitions}from'../commands/api-doc/index.js';import{appConfigDefinitions}from'../commands/app-config/index.js';import{fileDefinitions}from'../commands/file/index.js';import{ocrDefinitions}from'../commands/ocr/index.js';function a36_0x7655(){const _0x1aa178=['login','\x20\x20[write]','push','Self\x20Update','from','Datasets','188pevCgK','get','Configuration','write','CLI\x20Built-in\x20Skill','Knowledge\x20Base','install','Instant\x20API','set','21431950zFEbio','command','OCR','risk','6352024dhNZov','File','Skills','Service\x20Tree','Workspace','2968oTrbmc','isSingleCommand','9858321pjHdmr','48015hkGvqi','values','API\x20Documentation','Authentication','3479226XfPswb','SQL\x20Queries','Diagnostics','7xojNJE','Runtime\x20App\x20Config','list','246258uQqAjh','1731HMfROI','Logs','App\x20Management','service','BFF\x20Scripts'];a36_0x7655=function(){return _0x1aa178;};return a36_0x7655();}export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x440ac6){const _0xd52530=a36_0x2c42;for(const _0x44cf34 of _0x440ac6){definitions[_0xd52530(0xbf)](_0x44cf34[_0xd52530(0xaf)]+':'+_0x44cf34[_0xd52530(0xc1)],_0x44cf34);let _0xdb39c=serviceGroups['get'](_0x44cf34[_0xd52530(0xaf)]);!_0xdb39c&&(_0xdb39c=[],serviceGroups[_0xd52530(0xbf)](_0x44cf34['service'],_0xdb39c)),_0xdb39c[_0xd52530(0xb3)](_0x44cf34);}}function registerService(_0x3bb80c,_0x5e6ad1,_0x107a74){const _0x4bae34=a36_0x2c42;registerDefinitions(_0x5e6ad1);const _0x3d3275=_0x4066c6=>_0x4066c6==='read'?'':_0x4066c6===_0x4bae34(0xba)?_0x4bae34(0xb2):'\x20\x20[high-risk-write]',_0x53be44={'service':_0x5e6ad1[0x0][_0x4bae34(0xaf)],'label':_0x3bb80c,'commands':_0x5e6ad1['map'](_0x4cc2ce=>({'command':_0x4cc2ce[_0x4bae34(0xc1)],'description':_0x4cc2ce['description'],'tag':_0x3d3275(_0x4cc2ce[_0x4bae34(0xc3)])})),'defaultCommand':_0x107a74?.['defaultCommand']??(_0x107a74?.['isSingleCommand']?_0x5e6ad1[0x0][_0x4bae34(0xc1)]:undefined),'isSingleCommand':_0x107a74?.[_0x4bae34(0xca)]};serviceRegistry[_0x4bae34(0xb3)](_0x53be44),serviceByName['set'](_0x53be44[_0x4bae34(0xaf)],_0x53be44);}registerService(a36_0x5ec5c1(0xa4),authDefinitions,{'defaultCommand':a36_0x5ec5c1(0xb1)}),registerService(a36_0x5ec5c1(0xae),appDefinitions,{'defaultCommand':'list'}),registerService(a36_0x5ec5c1(0xc8),workspaceDefinitions),registerService(a36_0x5ec5c1(0xa9),appConfigDefinitions),registerService(a36_0x5ec5c1(0xb9),configDefinitions,{'defaultCommand':a36_0x5ec5c1(0xaa)}),registerService(a36_0x5ec5c1(0xa3),apiDocDefinitions),registerService(a36_0x5ec5c1(0xb6),datasetDefinitions),registerService(a36_0x5ec5c1(0xbe),dataDefinitions),registerService(a36_0x5ec5c1(0xa6),sqlDefinitions),registerService(a36_0x5ec5c1(0xb0),bffDefinitions),registerService('Personal\x20BFF',personalBffDefinitions),registerService('Artifacts',artifactDefinitions),registerService(a36_0x5ec5c1(0xc5),fileDefinitions),registerService(a36_0x5ec5c1(0xc2),ocrDefinitions),registerService(a36_0x5ec5c1(0xbc),kbDefinitions),registerService(a36_0x5ec5c1(0xc7),serviceDefinitions,{'defaultCommand':'list'}),registerService(a36_0x5ec5c1(0xc6),skillDefinitions,{'defaultCommand':a36_0x5ec5c1(0xbd)}),registerService(a36_0x5ec5c1(0xbb),cliSkillDefinitions,{'defaultCommand':a36_0x5ec5c1(0xbd)}),registerService(a36_0x5ec5c1(0xb4),[updateDefinition],{'defaultCommand':'run','isSingleCommand':!![]}),registerService(a36_0x5ec5c1(0xa7),[doctorDefinition],{'isSingleCommand':!![]}),registerService('Schema',[schemaDefinition],{'isSingleCommand':!![]}),registerService(a36_0x5ec5c1(0xad),logsDefinitions,{'defaultCommand':'show'});export function findDefinition(_0x55021b,_0x5f232e){const _0x3689ef=a36_0x5ec5c1;return definitions[_0x3689ef(0xb8)](_0x55021b+':'+_0x5f232e);}export function isKnownService(_0x29e9c0){return serviceByName['has'](_0x29e9c0);}export function getServiceEntry(_0x47454d){const _0xd583cf=a36_0x5ec5c1;return serviceByName[_0xd583cf(0xb8)](_0x47454d);}export function getAllDefinitions(){const _0x5267cd=a36_0x5ec5c1;return Array[_0x5267cd(0xb5)](definitions[_0x5267cd(0xa2)]());}
@@ -1 +1 @@
1
- const a37_0x2e92a3=a37_0x28f2;(function(_0x325b36,_0x5dbc37){const _0x5d4793=a37_0x28f2,_0x10952d=_0x325b36();while(!![]){try{const _0x233c3f=-parseInt(_0x5d4793(0x82))/0x1*(parseInt(_0x5d4793(0x8a))/0x2)+-parseInt(_0x5d4793(0x8f))/0x3*(-parseInt(_0x5d4793(0x8e))/0x4)+-parseInt(_0x5d4793(0x91))/0x5*(parseInt(_0x5d4793(0x85))/0x6)+parseInt(_0x5d4793(0x90))/0x7+-parseInt(_0x5d4793(0x87))/0x8*(parseInt(_0x5d4793(0x84))/0x9)+-parseInt(_0x5d4793(0x83))/0xa+parseInt(_0x5d4793(0x8d))/0xb*(parseInt(_0x5d4793(0x8c))/0xc);if(_0x233c3f===_0x5dbc37)break;else _0x10952d['push'](_0x10952d['shift']());}catch(_0x2c1e0a){_0x10952d['push'](_0x10952d['shift']());}}}(a37_0x52d8,0xdf34e));function a37_0x28f2(_0x3daf6f,_0x1ab31b){_0x3daf6f=_0x3daf6f-0x82;const _0x52d86b=a37_0x52d8();let _0x28f294=_0x52d86b[_0x3daf6f];return _0x28f294;}import{buildSchemaPayload}from'../framework/schema-export.js';function a37_0x52d8(){const _0x38385c=['2955084txdFMM','export','217596kJkRGE','1606OAljBJ','2836QGfaNA','6186MFcNxz','9322880sAybcR','10yaMLFR','1ucmuuH','16844150OFzInp','247653hkHTgX','3847362aoeWus','schema','24Ezisgh','Export\x20machine-readable\x20command\x20schema\x20(JSON)','read'];a37_0x52d8=function(){return _0x38385c;};return a37_0x52d8();}async function execute(_0x1d7281){const _0x3b987a=await buildSchemaPayload();return{'ok':!![],'data':_0x3b987a};}export const schemaDefinition={'service':a37_0x2e92a3(0x86),'command':a37_0x2e92a3(0x8b),'description':a37_0x2e92a3(0x88),'risk':a37_0x2e92a3(0x89),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],'execute':execute};
1
+ const a37_0x4bbee8=a37_0x3701;function a37_0x6b80(){const _0x382813=['export','77247omxAyK','390WhXMOM','read','Export\x20machine-readable\x20command\x20schema\x20(JSON)','81iUKeHA','658964qlIAjM','3641322XRSEOB','3312fDOWSC','3146270PKynra','37984ZdWrDK','96653eTYljo','7kKtwZN'];a37_0x6b80=function(){return _0x382813;};return a37_0x6b80();}(function(_0x1b2481,_0x1204f8){const _0x1123b6=a37_0x3701,_0x23f490=_0x1b2481();while(!![]){try{const _0x7e760b=parseInt(_0x1123b6(0x1dd))/0x1+parseInt(_0x1123b6(0x1d8))/0x2+-parseInt(_0x1123b6(0x1d7))/0x3*(-parseInt(_0x1123b6(0x1dc))/0x4)+-parseInt(_0x1123b6(0x1db))/0x5+parseInt(_0x1123b6(0x1d9))/0x6+parseInt(_0x1123b6(0x1de))/0x7*(parseInt(_0x1123b6(0x1da))/0x8)+-parseInt(_0x1123b6(0x1e0))/0x9*(parseInt(_0x1123b6(0x1e1))/0xa);if(_0x7e760b===_0x1204f8)break;else _0x23f490['push'](_0x23f490['shift']());}catch(_0x10b645){_0x23f490['push'](_0x23f490['shift']());}}}(a37_0x6b80,0x4f8cd));import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x3003ae){const _0x23a91e=await buildSchemaPayload();return{'ok':!![],'data':_0x23a91e};}function a37_0x3701(_0x43b1ed,_0x4e57df){_0x43b1ed=_0x43b1ed-0x1d6;const _0x6b8080=a37_0x6b80();let _0x370169=_0x6b8080[_0x43b1ed];return _0x370169;}export const schemaDefinition={'service':'schema','command':a37_0x4bbee8(0x1df),'description':a37_0x4bbee8(0x1d6),'risk':a37_0x4bbee8(0x1e2),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],'execute':execute};