@lovrabet/lovrabet-cli 2.0.12 → 2.0.13-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/lib/cli.js +1 -1
  2. package/lib/commands/app/cache.js +1 -1
  3. package/lib/commands/app/definitions.js +1 -1
  4. package/lib/commands/app/mock-loader.js +1 -1
  5. package/lib/commands/app/remote-source.js +1 -1
  6. package/lib/commands/app/shared.js +1 -1
  7. package/lib/commands/auth/index.js +1 -1
  8. package/lib/commands/auth/prompt.js +1 -1
  9. package/lib/commands/bff/detail.js +1 -1
  10. package/lib/commands/bff/exec.js +1 -1
  11. package/lib/commands/bff/index.js +1 -1
  12. package/lib/commands/common/config-policy.js +1 -1
  13. package/lib/commands/common/constraints.js +1 -1
  14. package/lib/commands/common/flags.js +1 -1
  15. package/lib/commands/config/definitions.js +1 -1
  16. package/lib/commands/config/shared.js +1 -1
  17. package/lib/commands/data/index.js +1 -1
  18. package/lib/commands/dataset/detail.js +1 -1
  19. package/lib/commands/dataset/index.js +1 -1
  20. package/lib/commands/dataset/list.js +1 -1
  21. package/lib/commands/doctor.js +1 -1
  22. package/lib/commands/init.js +1 -1
  23. package/lib/commands/kb/index.js +1 -1
  24. package/lib/commands/logs/index.js +1 -1
  25. package/lib/commands/registry.js +1 -1
  26. package/lib/commands/schema.js +1 -1
  27. package/lib/commands/skill/index.js +1 -1
  28. package/lib/commands/sql/detail.js +1 -1
  29. package/lib/commands/sql/exec.js +1 -1
  30. package/lib/commands/sql/index.js +1 -1
  31. package/lib/commands/update.js +1 -1
  32. package/lib/config/schema.js +1 -1
  33. package/lib/constant/auth-mode.js +1 -1
  34. package/lib/constant/cli.js +1 -1
  35. package/lib/constant/defaults.js +1 -1
  36. package/lib/constant/distribution.js +1 -1
  37. package/lib/constant/domain.js +1 -1
  38. package/lib/constant/env.js +1 -1
  39. package/lib/constant/output.js +1 -1
  40. package/lib/constant/product.js +1 -1
  41. package/lib/constant/risk.js +1 -1
  42. package/lib/constant/url.js +1 -1
  43. package/lib/context.js +1 -1
  44. package/lib/core/api-client.js +1 -1
  45. package/lib/core/db-resolver.js +1 -1
  46. package/lib/core/sdk-client.js +1 -1
  47. package/lib/errors.js +1 -1
  48. package/lib/framework/build-all-flags.js +1 -1
  49. package/lib/framework/dryrun.js +1 -1
  50. package/lib/framework/flags.js +1 -1
  51. package/lib/framework/help.js +1 -1
  52. package/lib/framework/index.js +1 -1
  53. package/lib/framework/output.js +1 -1
  54. package/lib/framework/preparse.js +1 -1
  55. package/lib/framework/response.js +1 -1
  56. package/lib/framework/runner-confirmation.js +1 -1
  57. package/lib/framework/runner-error.js +1 -1
  58. package/lib/framework/runner.js +1 -1
  59. package/lib/framework/schema-export.js +1 -1
  60. package/lib/framework/types.js +1 -1
  61. package/lib/help.js +1 -1
  62. package/lib/skills/npx-skills-add.js +1 -1
  63. package/lib/skills/runtime-skill-sync.js +1 -1
  64. package/lib/utils/apply-jq-filter.js +1 -1
  65. package/lib/utils/logger.js +1 -1
  66. package/lib/utils/params.js +1 -1
  67. package/lib/utils/platform.js +1 -1
  68. package/lib/utils/version.js +1 -1
  69. package/lib/utils/write-cli-side-channel.js +1 -1
  70. package/package.json +1 -1
@@ -1 +1 @@
1
- const a16_0xf79ee9=a16_0x3364;(function(_0xc4f506,_0x153144){const _0x22b4ca=a16_0x3364,_0x21eced=_0xc4f506();while(!![]){try{const _0x3ab459=-parseInt(_0x22b4ca(0x13a))/0x1*(-parseInt(_0x22b4ca(0x13d))/0x2)+parseInt(_0x22b4ca(0x14e))/0x3*(parseInt(_0x22b4ca(0x13e))/0x4)+parseInt(_0x22b4ca(0x158))/0x5*(parseInt(_0x22b4ca(0x135))/0x6)+parseInt(_0x22b4ca(0x155))/0x7*(-parseInt(_0x22b4ca(0x15d))/0x8)+-parseInt(_0x22b4ca(0x177))/0x9*(parseInt(_0x22b4ca(0x132))/0xa)+parseInt(_0x22b4ca(0x170))/0xb*(-parseInt(_0x22b4ca(0x12a))/0xc)+-parseInt(_0x22b4ca(0x163))/0xd*(-parseInt(_0x22b4ca(0x176))/0xe);if(_0x3ab459===_0x153144)break;else _0x21eced['push'](_0x21eced['shift']());}catch(_0xbea91){_0x21eced['push'](_0x21eced['shift']());}}}(a16_0x52b7,0x5d7b8));import{executeData}from'../../core/sdk-client.js';function a16_0x3364(_0x10847f,_0x57a5a9){_0x10847f=_0x10847f-0x121;const _0x52b7cf=a16_0x52b7();let _0x33641a=_0x52b7cf[_0x10847f];return _0x33641a;}function a16_0x52b7(){const _0x4e4635=['1206AvIOnh','\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Average\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg_score\x22}','\x20\x20\x20\x20$and\x20\x20\x20\x20\x20\x20\x20\x20\x20All\x20conditions\x20match\x20\x20\x20{\x22$and\x22:[{\x22age\x22:{\x22$gte\x22:18}},{\x22status\x22:{\x22$eq\x22:\x22active\x22}}]}','description','join','helpExtra','\x20\x20\x20\x20$startWith\x20\x20\x20Starts\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$startWith\x22:\x22Mr.\x22}}','8309evydDm','params','now','2123285VrwmVH','batchCreate','\x20\x20AGGREGATE\x20TYPES','\x20completed\x20in\x20','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)','5096wcHvWc','delete','getOne','\x20\x20\x20\x20$lt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lt\x22:1000}}','high-risk-write','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','13PdTBPG','Create\x20multiple\x20records\x20in\x20one\x20request\x20(SDK\x20batchCreate)','data','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]','\x20\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]','\x20\x20\x20\x20$endWith\x20\x20\x20\x20\x20Ends\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22email\x22:{\x22$endWith\x22:\x22@example.com\x22}}','\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status','JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','\x20\x20\x20\x20$ne\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Not\x20equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22status\x22:{\x22$ne\x22:\x22deleted\x22}}','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22id\x22:\x22desc\x22},{\x22name\x22:\x22asc\x22}]','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','build','\x20\x20PAGINATION','8342543vLkYdi','risk','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return\x20alongside\x20aggregates,\x20e.g.\x20[\x22status\x22,\x22region\x22]','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)','operation','\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20distinct\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22,\x22distinct\x22:true}','15831578SmatCJ','81LUGlSo','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','data\x20','read','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter','Get\x20a\x20single\x20record\x20by\x20ID','command','\x20\x20\x20\x20$in\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Value\x20in\x20set\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22country\x22:{\x22$in\x22:[\x22CN\x22,\x22US\x22]}}','write','12oBpqRK','JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20','filter','\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Rounded\x20average\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg\x22,\x22round\x22:true,\x22precision\x22:2}','create','\x20\x20LOGICAL\x20COMBINATORS','Create\x20a\x20new\x20record\x20in\x20a\x20dataset','\x20\x20\x20\x20$or\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Any\x20condition\x20matches\x20\x20{\x22$or\x22:[{\x22status\x22:{\x22$eq\x22:\x22active\x22}},{\x22status\x22:{\x22$eq\x22:\x22pending\x22}}]}','285370UIqqzy','update','\x20\x20\x20\x20MIN\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Minimum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22price\x22,\x22type\x22:\x22MIN\x22,\x22alias\x22:\x22min_price\x22}','6OXKybh','\x20\x20\x20\x20$eq\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22age\x22:{\x22$eq\x22:18}}','str','\x20\x20\x20\x20$gt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$gt\x22:100}}','Update\x20an\x20existing\x20record','73769AgYHzl','Preview:\x20data\x20','dryRun','6mtwAgv','3756HCnNxt','\x20\x20\x20\x20Pagination\x20is\x20controlled\x20via\x20JSON\x20in\x20--params.\x20Do\x20NOT\x20use\x20--page-size\x20as\x20a\x20CLI\x20flag.','/api/{appCode}/','POST','\x20\x20\x20\x20$lte\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20or\x20equal\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lte\x22:1000}}','\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22field\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','\x20\x20WHERE\x20OPERATORS','body','map','code','\x20\x20\x20\x20$gte\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20or\x20equal\x20\x20{\x22amount\x22:{\x22$gte\x22:100}}','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','paramsRequired','\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20of\x20records\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}','aggregate','\x20\x20\x20\x20$contain\x20\x20\x20\x20\x20Substring\x20match\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$contain\x22:\x22test\x22}}'];a16_0x52b7=function(){return _0x4e4635;};return a16_0x52b7();}import{CODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';import{requireAnyOf}from'../../commands/common/constraints.js';import{parseJsonParams,parseJsonParamsValue,parseBatchCreateItemsFromParams}from'../../utils/params.js';import{dryRun}from'../../framework/dryrun.js';const specs=[{'command':a16_0xf79ee9(0x12c),'operation':a16_0xf79ee9(0x12c),'risk':a16_0xf79ee9(0x124),'paramsRequired':![],'description':'Filter\x20dataset\x20records\x20with\x20query\x20conditions','paramsHint':'JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20'+a16_0xf79ee9(0x162),'helpExtra':[a16_0xf79ee9(0x144),a16_0xf79ee9(0x136),a16_0xf79ee9(0x16b),a16_0xf79ee9(0x138),a16_0xf79ee9(0x148),a16_0xf79ee9(0x160),a16_0xf79ee9(0x142),a16_0xf79ee9(0x128),a16_0xf79ee9(0x14d),a16_0xf79ee9(0x154),a16_0xf79ee9(0x168),'',a16_0xf79ee9(0x12f),a16_0xf79ee9(0x150),a16_0xf79ee9(0x131),'',a16_0xf79ee9(0x122),a16_0xf79ee9(0x15c),a16_0xf79ee9(0x166),a16_0xf79ee9(0x16c),a16_0xf79ee9(0x16d),a16_0xf79ee9(0x121),'',a16_0xf79ee9(0x16f),a16_0xf79ee9(0x13f),'\x20\x20\x20\x20Correct:\x20\x20--params\x20\x27{\x22currentPage\x22:1,\x22pageSize\x22:10}\x27','\x20\x20\x20\x20Wrong:\x20\x20\x20\x20--page-size\x2010\x20\x20(this\x20is\x20not\x20a\x20valid\x20flag)'][a16_0xf79ee9(0x152)]('\x0a')},{'command':a16_0xf79ee9(0x15f),'operation':'getOne','risk':a16_0xf79ee9(0x124),'paramsRequired':!![],'description':a16_0xf79ee9(0x126),'paramsHint':'JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'},{'command':a16_0xf79ee9(0x12e),'operation':a16_0xf79ee9(0x12e),'risk':a16_0xf79ee9(0x129),'paramsRequired':!![],'description':a16_0xf79ee9(0x130),'paramsHint':a16_0xf79ee9(0x16a)},{'command':a16_0xf79ee9(0x159),'operation':a16_0xf79ee9(0x159),'risk':'write','paramsRequired':!![],'description':a16_0xf79ee9(0x164),'paramsHint':'JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27'},{'command':a16_0xf79ee9(0x133),'operation':a16_0xf79ee9(0x133),'risk':a16_0xf79ee9(0x129),'paramsRequired':!![],'description':a16_0xf79ee9(0x139),'paramsHint':'JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20Example:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27'},{'command':a16_0xf79ee9(0x15e),'operation':a16_0xf79ee9(0x15e),'risk':a16_0xf79ee9(0x161),'paramsRequired':!![],'description':'Delete\x20a\x20record\x20(requires\x20--yes\x20in\x20non-interactive)','paramsHint':a16_0xf79ee9(0x149)},{'command':a16_0xf79ee9(0x14c),'operation':a16_0xf79ee9(0x14c),'risk':a16_0xf79ee9(0x124),'paramsRequired':![],'description':'Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','paramsHint':a16_0xf79ee9(0x12b)+'Example:\x20\x27{\x22aggregate\x22:[{\x22field\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','helpExtra':[a16_0xf79ee9(0x15a),'\x20\x20\x20\x20SUM\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Sum\x20of\x20field\x20values\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}',a16_0xf79ee9(0x14b),a16_0xf79ee9(0x175),a16_0xf79ee9(0x14f),a16_0xf79ee9(0x12d),'\x20\x20\x20\x20MAX\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Maximum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22price\x22,\x22type\x22:\x22MAX\x22,\x22alias\x22:\x22max_price\x22}',a16_0xf79ee9(0x134),'','\x20\x20PARAMS\x20STRUCTURE',a16_0xf79ee9(0x172),'\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)',a16_0xf79ee9(0x173),a16_0xf79ee9(0x167),'\x20\x20\x20\x20having\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Post-aggregation\x20filter,\x20e.g.\x20{\x22total\x22:{\x22$gt\x22:1000}}','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22total\x22:\x22desc\x22}]','','\x20\x20EXAMPLES',a16_0xf79ee9(0x169),a16_0xf79ee9(0x143),'',a16_0xf79ee9(0x125),'\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22field\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[\x22region\x22],\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}}}\x27']['join']('\x0a')}];function makeDataCommand(_0x38c01d){const _0x39a0f4=a16_0xf79ee9,_0x5e3cba=_0x39a0f4(0x123)+_0x38c01d['command'],_0x5bede7={'service':_0x39a0f4(0x165),'command':_0x38c01d[_0x39a0f4(0x127)],'description':_0x38c01d['description'],'risk':_0x38c01d['risk'],'helpExtra':_0x38c01d[_0x39a0f4(0x153)],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x38c01d['paramsHint']}],'validate':async _0x1b442e=>{const _0x351aa5=_0x39a0f4;_0x38c01d[_0x351aa5(0x14a)]&&requireAnyOf(_0x1b442e,['params'],_0x5e3cba),_0x38c01d['operation']==='batchCreate'&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x1b442e[_0x351aa5(0x137)](_0x351aa5(0x156))));},async 'execute'(_0x2310f5){const _0x4d721f=_0x39a0f4,_0x4cf7ff=_0x2310f5[_0x4d721f(0x137)](_0x4d721f(0x147)),_0x502efa=_0x38c01d[_0x4d721f(0x174)]===_0x4d721f(0x159)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x2310f5['str']('params'))):parseJsonParams(_0x2310f5[_0x4d721f(0x137)](_0x4d721f(0x156)))??{},_0x317261=Date['now'](),_0x30e5b0=await executeData(_0x4cf7ff,_0x38c01d[_0x4d721f(0x174)],_0x502efa),_0x11d3a3=Date[_0x4d721f(0x157)]()-_0x317261;return{'ok':!![],'data':{'result':_0x30e5b0,'elapsed':_0x11d3a3},'message':_0x4d721f(0x123)+_0x38c01d['command']+_0x4d721f(0x15b)+_0x11d3a3+'ms'};}};return _0x38c01d[_0x39a0f4(0x171)]!==_0x39a0f4(0x124)&&(_0x5bede7[_0x39a0f4(0x13c)]=async _0x40ac68=>{const _0x30aab8=_0x39a0f4,_0x6b6344=_0x40ac68[_0x30aab8(0x137)](_0x30aab8(0x147)),_0x59da78=_0x38c01d[_0x30aab8(0x174)]===_0x30aab8(0x159)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x40ac68[_0x30aab8(0x137)]('params'))):parseJsonParams(_0x40ac68[_0x30aab8(0x137)](_0x30aab8(0x156)))??{};return dryRun(_0x30aab8(0x141),_0x30aab8(0x140)+_0x6b6344+'/'+_0x38c01d['operation'])[_0x30aab8(0x145)](_0x59da78)[_0x30aab8(0x151)](_0x30aab8(0x13b)+_0x38c01d['command']+'\x20on\x20dataset\x20'+_0x6b6344)[_0x30aab8(0x16e)]();}),_0x5bede7;}export const dataDefinitions=specs[a16_0xf79ee9(0x146)](makeDataCommand);
1
+ const a16_0x5a7ae5=a16_0x2fe6;function a16_0x2fe6(_0x1f698c,_0x57ae17){_0x1f698c=_0x1f698c-0x11b;const _0x2e9843=a16_0x2e98();let _0x2fe6f1=_0x2e9843[_0x1f698c];return _0x2fe6f1;}(function(_0x2b55ac,_0x5b5248){const _0x3475f7=a16_0x2fe6,_0x322aee=_0x2b55ac();while(!![]){try{const _0x1acfdd=parseInt(_0x3475f7(0x13f))/0x1+-parseInt(_0x3475f7(0x12b))/0x2*(-parseInt(_0x3475f7(0x15f))/0x3)+parseInt(_0x3475f7(0x12e))/0x4*(-parseInt(_0x3475f7(0x146))/0x5)+-parseInt(_0x3475f7(0x150))/0x6+-parseInt(_0x3475f7(0x15a))/0x7+-parseInt(_0x3475f7(0x123))/0x8+parseInt(_0x3475f7(0x127))/0x9;if(_0x1acfdd===_0x5b5248)break;else _0x322aee['push'](_0x322aee['shift']());}catch(_0x4b106c){_0x322aee['push'](_0x322aee['shift']());}}}(a16_0x2e98,0x416d4));import{executeData}from'../../core/sdk-client.js';import{CODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';import{requireAnyOf}from'../../commands/common/constraints.js';import{parseJsonParams,parseJsonParamsValue,parseBatchCreateItemsFromParams}from'../../utils/params.js';import{dryRun}from'../../framework/dryrun.js';const specs=[{'command':a16_0x5a7ae5(0x154),'operation':a16_0x5a7ae5(0x154),'risk':a16_0x5a7ae5(0x140),'paramsRequired':![],'description':'Filter\x20dataset\x20records\x20with\x20query\x20conditions','paramsHint':a16_0x5a7ae5(0x124)+'Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','helpExtra':[a16_0x5a7ae5(0x11d),a16_0x5a7ae5(0x130),a16_0x5a7ae5(0x13d),a16_0x5a7ae5(0x15b),a16_0x5a7ae5(0x156),a16_0x5a7ae5(0x121),'\x20\x20\x20\x20$lte\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20or\x20equal\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lte\x22:1000}}','\x20\x20\x20\x20$in\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Value\x20in\x20set\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22country\x22:{\x22$in\x22:[\x22CN\x22,\x22US\x22]}}',a16_0x5a7ae5(0x126),a16_0x5a7ae5(0x163),a16_0x5a7ae5(0x11b),'','\x20\x20LOGICAL\x20COMBINATORS',a16_0x5a7ae5(0x12d),a16_0x5a7ae5(0x142),'',a16_0x5a7ae5(0x125),a16_0x5a7ae5(0x133),a16_0x5a7ae5(0x144),'\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22id\x22:\x22desc\x22},{\x22name\x22:\x22asc\x22}]','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','',a16_0x5a7ae5(0x164),a16_0x5a7ae5(0x165),'\x20\x20\x20\x20Correct:\x20\x20--params\x20\x27{\x22currentPage\x22:1,\x22pageSize\x22:10}\x27',a16_0x5a7ae5(0x161)][a16_0x5a7ae5(0x153)]('\x0a')},{'command':a16_0x5a7ae5(0x155),'operation':a16_0x5a7ae5(0x155),'risk':a16_0x5a7ae5(0x140),'paramsRequired':!![],'description':a16_0x5a7ae5(0x14e),'paramsHint':a16_0x5a7ae5(0x128)},{'command':a16_0x5a7ae5(0x14d),'operation':a16_0x5a7ae5(0x14d),'risk':a16_0x5a7ae5(0x13b),'paramsRequired':!![],'description':'Create\x20a\x20new\x20record\x20in\x20a\x20dataset','paramsHint':a16_0x5a7ae5(0x132)},{'command':'batchCreate','operation':'batchCreate','risk':a16_0x5a7ae5(0x13b),'paramsRequired':!![],'description':'Create\x20multiple\x20records\x20in\x20one\x20request\x20(SDK\x20batchCreate)','paramsHint':'JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27'},{'command':a16_0x5a7ae5(0x15d),'operation':a16_0x5a7ae5(0x15d),'risk':a16_0x5a7ae5(0x13b),'paramsRequired':!![],'description':a16_0x5a7ae5(0x151),'paramsHint':a16_0x5a7ae5(0x138)},{'command':a16_0x5a7ae5(0x122),'operation':a16_0x5a7ae5(0x122),'risk':a16_0x5a7ae5(0x137),'paramsRequired':!![],'description':'Delete\x20a\x20record\x20(requires\x20--yes\x20in\x20non-interactive)','paramsHint':a16_0x5a7ae5(0x128)},{'command':a16_0x5a7ae5(0x157),'operation':a16_0x5a7ae5(0x157),'risk':a16_0x5a7ae5(0x140),'paramsRequired':![],'description':'Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','paramsHint':a16_0x5a7ae5(0x14b)+'Example:\x20\x27{\x22aggregate\x22:[{\x22field\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','helpExtra':[a16_0x5a7ae5(0x152),a16_0x5a7ae5(0x13e),'\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20of\x20records\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}','\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20distinct\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22,\x22distinct\x22:true}',a16_0x5a7ae5(0x149),a16_0x5a7ae5(0x14c),'\x20\x20\x20\x20MAX\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Maximum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22price\x22,\x22type\x22:\x22MAX\x22,\x22alias\x22:\x22max_price\x22}','\x20\x20\x20\x20MIN\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Minimum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22price\x22,\x22type\x22:\x22MIN\x22,\x22alias\x22:\x22min_price\x22}','',a16_0x5a7ae5(0x162),'\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return\x20alongside\x20aggregates,\x20e.g.\x20[\x22status\x22,\x22region\x22]','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)',a16_0x5a7ae5(0x12c),a16_0x5a7ae5(0x160),'\x20\x20\x20\x20having\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Post-aggregation\x20filter,\x20e.g.\x20{\x22total\x22:{\x22$gt\x22:1000}}','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22total\x22:\x22desc\x22}]','',a16_0x5a7ae5(0x136),a16_0x5a7ae5(0x143),a16_0x5a7ae5(0x148),'',a16_0x5a7ae5(0x158),a16_0x5a7ae5(0x11e)]['join']('\x0a')}];function makeDataCommand(_0x4425eb){const _0x53e4ec=a16_0x5a7ae5,_0x11a12b=_0x53e4ec(0x134)+_0x4425eb[_0x53e4ec(0x11c)],_0x14dda2={'service':_0x53e4ec(0x147),'command':_0x4425eb[_0x53e4ec(0x11c)],'description':_0x4425eb[_0x53e4ec(0x13c)],'risk':_0x4425eb[_0x53e4ec(0x135)],'helpExtra':_0x4425eb[_0x53e4ec(0x12f)],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x4425eb[_0x53e4ec(0x13a)]}],'validate':async _0x385c8b=>{const _0xcd9530=_0x53e4ec;_0x4425eb['paramsRequired']&&requireAnyOf(_0x385c8b,[_0xcd9530(0x131)],_0x11a12b),_0x4425eb[_0xcd9530(0x14a)]===_0xcd9530(0x145)&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x385c8b['str'](_0xcd9530(0x131))));},async 'execute'(_0x5bfc01){const _0x16858e=_0x53e4ec,_0x25d876=_0x5bfc01['str'](_0x16858e(0x129)),_0x113bf1=_0x4425eb[_0x16858e(0x14a)]==='batchCreate'?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x5bfc01['str'](_0x16858e(0x131)))):parseJsonParams(_0x5bfc01[_0x16858e(0x11f)](_0x16858e(0x131)))??{},_0xbd9267=Date[_0x16858e(0x15c)](),_0x2f80db=await executeData(_0x25d876,_0x4425eb[_0x16858e(0x14a)],_0x113bf1),_0x471ba2=Date[_0x16858e(0x15c)]()-_0xbd9267;return{'ok':!![],'data':{'result':_0x2f80db,'elapsed':_0x471ba2},'message':_0x16858e(0x134)+_0x4425eb[_0x16858e(0x11c)]+_0x16858e(0x12a)+_0x471ba2+'ms'};}};return _0x4425eb[_0x53e4ec(0x135)]!==_0x53e4ec(0x140)&&(_0x14dda2[_0x53e4ec(0x14f)]=async _0x17a868=>{const _0x2c23dd=_0x53e4ec,_0x46abee=_0x17a868[_0x2c23dd(0x11f)](_0x2c23dd(0x129)),_0x334d87=_0x4425eb[_0x2c23dd(0x14a)]===_0x2c23dd(0x145)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x17a868[_0x2c23dd(0x11f)](_0x2c23dd(0x131)))):parseJsonParams(_0x17a868['str']('params'))??{};return dryRun('POST',_0x2c23dd(0x139)+_0x46abee+'/'+_0x4425eb[_0x2c23dd(0x14a)])['body'](_0x334d87)[_0x2c23dd(0x13c)](_0x2c23dd(0x141)+_0x4425eb['command']+_0x2c23dd(0x120)+_0x46abee)[_0x2c23dd(0x15e)]();}),_0x14dda2;}function a16_0x2e98(){const _0xdb5522=['\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Rounded\x20average\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg\x22,\x22round\x22:true,\x22precision\x22:2}','create','Get\x20a\x20single\x20record\x20by\x20ID','dryRun','2061096pHBbmH','Update\x20an\x20existing\x20record','\x20\x20AGGREGATE\x20TYPES','join','filter','getOne','\x20\x20\x20\x20$gte\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20or\x20equal\x20\x20{\x22amount\x22:{\x22$gte\x22:100}}','aggregate','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter','map','2998702VJFMpG','\x20\x20\x20\x20$gt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$gt\x22:100}}','now','update','build','5646AUhCso','\x20\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]','\x20\x20\x20\x20Wrong:\x20\x20\x20\x20--page-size\x2010\x20\x20(this\x20is\x20not\x20a\x20valid\x20flag)','\x20\x20PARAMS\x20STRUCTURE','\x20\x20\x20\x20$startWith\x20\x20\x20Starts\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$startWith\x22:\x22Mr.\x22}}','\x20\x20PAGINATION','\x20\x20\x20\x20Pagination\x20is\x20controlled\x20via\x20JSON\x20in\x20--params.\x20Do\x20NOT\x20use\x20--page-size\x20as\x20a\x20CLI\x20flag.','\x20\x20\x20\x20$endWith\x20\x20\x20\x20\x20Ends\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22email\x22:{\x22$endWith\x22:\x22@example.com\x22}}','command','\x20\x20WHERE\x20OPERATORS','\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22field\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[\x22region\x22],\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}}}\x27','str','\x20on\x20dataset\x20','\x20\x20\x20\x20$lt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lt\x22:1000}}','delete','3768256NexbZl','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','\x20\x20\x20\x20$contain\x20\x20\x20\x20\x20Substring\x20match\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$contain\x22:\x22test\x22}}','14302134TCvSFk','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','code','\x20completed\x20in\x20','94NwGZvg','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)','\x20\x20\x20\x20$and\x20\x20\x20\x20\x20\x20\x20\x20\x20All\x20conditions\x20match\x20\x20\x20{\x22$and\x22:[{\x22age\x22:{\x22$gte\x22:18}},{\x22status\x22:{\x22$eq\x22:\x22active\x22}}]}','4ScLcHt','helpExtra','\x20\x20\x20\x20$eq\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22age\x22:{\x22$eq\x22:18}}','params','JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)','data\x20','risk','\x20\x20EXAMPLES','high-risk-write','JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20Example:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27','/api/{appCode}/','paramsHint','write','description','\x20\x20\x20\x20$ne\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Not\x20equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22status\x22:{\x22$ne\x22:\x22deleted\x22}}','\x20\x20\x20\x20SUM\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Sum\x20of\x20field\x20values\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}','197531RQEzXN','read','Preview:\x20data\x20','\x20\x20\x20\x20$or\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Any\x20condition\x20matches\x20\x20{\x22$or\x22:[{\x22status\x22:{\x22$eq\x22:\x22active\x22}},{\x22status\x22:{\x22$eq\x22:\x22pending\x22}}]}','\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]','batchCreate','1820945fjSeyN','data','\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22field\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','\x20\x20\x20\x20AVG\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Average\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg_score\x22}','operation','JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20'];a16_0x2e98=function(){return _0xdb5522;};return a16_0x2e98();}export const dataDefinitions=specs[a16_0x5a7ae5(0x159)](makeDataCommand);
@@ -1 +1 @@
1
- const a17_0x54a672=a17_0x3b19;(function(_0x1ca689,_0xc9ed8f){const _0x23dc6d=a17_0x3b19,_0x353f52=_0x1ca689();while(!![]){try{const _0x370f6e=-parseInt(_0x23dc6d(0xc4))/0x1*(-parseInt(_0x23dc6d(0xc0))/0x2)+-parseInt(_0x23dc6d(0xa2))/0x3+-parseInt(_0x23dc6d(0xb2))/0x4+-parseInt(_0x23dc6d(0x9e))/0x5+-parseInt(_0x23dc6d(0xb9))/0x6+parseInt(_0x23dc6d(0xd2))/0x7+parseInt(_0x23dc6d(0xce))/0x8;if(_0x370f6e===_0xc9ed8f)break;else _0x353f52['push'](_0x353f52['shift']());}catch(_0x114133){_0x353f52['push'](_0x353f52['shift']());}}}(a17_0x4b11,0x9c01e));function a17_0x4b11(){const _0x32dd2d=['4mqTNLR','labelField','responseBody','object','328443YdHYft','beforeScriptId','requestBody','string','fromField','afterScriptId','fields','method','path','operations','21450136bHkThO','length','dataset','split','2543891OYZmvJ','dataType','dbId','trim','map','entries','datasetKey','allFields','indexes','find','name','deleted','type','formatRules','properties','columnCodeListWithDeleted','5565075NSUaar','options','modelId','tableComment','2062182uofhZO','responseFields','required','dbType','doType','read','extend','logicField','host','filter','tableName','dbName','code','dblinkInfoDTO','creatorIdField','push','4916628xQvmtu','dbtableConfig','sourceType','relations','toField','description','toDatasetName','197964SlJVqc','isArray','relatedPageInfoList','pkField','updateTimeField','displayName','requestFields'];a17_0x4b11=function(){return _0x32dd2d;};return a17_0x4b11();}import{getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';function normalizeField(_0x2f3f0){const _0x209064=a17_0x3b19;if(_0x2f3f0['deleted'])return null;const _0x59ada9=Boolean(_0x2f3f0['displayName']!==undefined||_0x2f3f0[_0x209064(0xa6)]!==undefined);let _0x372b7f={};if(!_0x59ada9&&typeof _0x2f3f0[_0x209064(0xa8)]===_0x209064(0xc7))try{_0x372b7f=JSON['parse'](_0x2f3f0['extend']);}catch{}const _0x4d9f59=_0x59ada9?_0x2f3f0['name']:_0x2f3f0['code'],_0xabebaa=_0x59ada9?_0x2f3f0[_0x209064(0xbe)]:_0x2f3f0[_0x209064(0xdc)],_0x3c1d31=_0x59ada9?_0x2f3f0['doType']:_0x2f3f0[_0x209064(0xde)]||_0x2f3f0[_0x209064(0xd3)],_0xdc4e4e=_0x59ada9?_0x2f3f0[_0x209064(0xbc)]===!![]:_0x372b7f[_0x209064(0xbc)]===!![],_0x20e9f7=_0x59ada9?_0x2f3f0[_0x209064(0xa4)]===!![]:_0x372b7f['required']===!![],_0x4d46f5=_0x59ada9?_0x2f3f0[_0x209064(0x9f)]??null:_0x372b7f[_0x209064(0x9f)]??null,_0x121e5a={'name':_0x4d9f59,'displayName':_0xabebaa||_0x4d9f59,'type':_0x3c1d31,'dbType':_0x2f3f0[_0x209064(0xa5)],'pk':_0xdc4e4e,'required':_0x20e9f7,'description':_0x2f3f0[_0x209064(0xb7)]||undefined};return Array[_0x209064(0xba)](_0x4d46f5)&&_0x4d46f5[_0x209064(0xcf)]>0x0&&(_0x121e5a[_0x209064(0x9f)]=_0x4d46f5),_0x121e5a;}function parseJsonMaybe(_0x4d8b2d){if(typeof _0x4d8b2d!=='string')return _0x4d8b2d;try{return JSON['parse'](_0x4d8b2d);}catch{return _0x4d8b2d;}}function normalizeOperationEntry(_0xf84767,_0x2e97f1){const _0x382c6d=a17_0x3b19;if(!_0x2e97f1||typeof _0x2e97f1!==_0x382c6d(0xc3))return null;if(!_0x2e97f1[_0x382c6d(0xcb)]||!_0x2e97f1[_0x382c6d(0xcc)])return null;const _0x273c44={'name':_0xf84767,'method':_0x2e97f1[_0x382c6d(0xcb)],'path':_0x2e97f1['path']};if(_0x2e97f1['host'])_0x273c44['host']=_0x2e97f1[_0x382c6d(0xaa)];if(_0x2e97f1[_0x382c6d(0xc6)]!=null)_0x273c44['requestBody']=parseJsonMaybe(_0x2e97f1[_0x382c6d(0xc6)]);if(_0x2e97f1['responseBody']!=null)_0x273c44[_0x382c6d(0xc2)]=parseJsonMaybe(_0x2e97f1[_0x382c6d(0xc2)]);if(_0x2e97f1[_0x382c6d(0xc5)]!=null)_0x273c44[_0x382c6d(0xc5)]=_0x2e97f1[_0x382c6d(0xc5)];if(_0x2e97f1[_0x382c6d(0xc9)]!=null)_0x273c44['afterScriptId']=_0x2e97f1[_0x382c6d(0xc9)];if(Array['isArray'](_0x2e97f1['requestFields']))_0x273c44['requestFields']=_0x2e97f1[_0x382c6d(0xbf)];if(Array[_0x382c6d(0xba)](_0x2e97f1[_0x382c6d(0xa3)]))_0x273c44[_0x382c6d(0xa3)]=_0x2e97f1[_0x382c6d(0xa3)];return _0x273c44;}function summarizeDbtable(_0xbcd4fb){const _0x1430a0=a17_0x3b19,_0x4a303a={},_0x4ed73e=[_0x1430a0(0xd4),_0x1430a0(0xad),_0x1430a0(0xac),'datasetKey',_0x1430a0(0xbc),'allFields',_0x1430a0(0xa9),'createTimeField',_0x1430a0(0xbd),_0x1430a0(0xb0),'creatorNameField','modifierIdField','modifierNameField',_0x1430a0(0xc1),_0x1430a0(0xaf)];for(const _0x5ebbf4 of _0x4ed73e){if(_0xbcd4fb[_0x5ebbf4]!==undefined)_0x4a303a[_0x5ebbf4]=_0xbcd4fb[_0x5ebbf4];}return typeof _0x4a303a[_0x1430a0(0xd9)]===_0x1430a0(0xc7)&&_0x4a303a['allFields'][_0x1430a0(0xcf)]>0x0&&(_0x4a303a['allFieldNames']=_0x4a303a['allFields'][_0x1430a0(0xd1)](',')[_0x1430a0(0xd6)](_0x307446=>_0x307446[_0x1430a0(0xd5)]())[_0x1430a0(0xab)](Boolean)),_0x4a303a;}function normalizeRelatedPages(_0x3014d2){const _0x77d700=a17_0x3b19;if(!Array[_0x77d700(0xba)](_0x3014d2))return[];return _0x3014d2[_0x77d700(0xab)](_0xdac853=>_0xdac853&&typeof _0xdac853==='object')[_0x77d700(0xd6)](_0x4eb4a3=>({'id':_0x4eb4a3['id'],'type':_0x4eb4a3['type'],'code':_0x4eb4a3[_0x77d700(0xae)],'title':_0x4eb4a3['title'],'deleted':_0x4eb4a3[_0x77d700(0xdd)]===!![]}));}function normalizeFallbackFieldName(_0x2490b1,_0x352682){const _0x51e439=a17_0x3b19,_0x1a2bc0=_0x2490b1[_0x51e439(0xd5)]();if(!_0x1a2bc0)return null;return{'name':_0x1a2bc0,'displayName':_0x1a2bc0,'type':undefined,'dbType':undefined,'pk':_0x1a2bc0===_0x352682,'required':![],'description':undefined};}async function loadListFieldFallback(_0x5ada36,_0xff12ba){const _0x5902a1=a17_0x3b19;if(!_0x5ada36||!_0xff12ba)return[];try{const _0x2c1f39=await listDatasets(_0x5ada36,{'code':_0xff12ba}),_0x34d247=_0x2c1f39[_0x5902a1(0xdb)](_0x236c9e=>_0x236c9e[_0x5902a1(0xae)]===_0xff12ba)??_0x2c1f39[0x0],_0x52f31b=_0x34d247?.[_0x5902a1(0xb3)]??{},_0x38b5e5=typeof _0x52f31b[_0x5902a1(0xd9)]===_0x5902a1(0xc7)?_0x52f31b['allFields'][_0x5902a1(0xd1)](','):[];return _0x38b5e5['map'](_0x25bee4=>normalizeFallbackFieldName(_0x25bee4,_0x52f31b['pkField']))[_0x5902a1(0xab)](_0x3a8404=>_0x3a8404!==null);}catch{return[];}}function a17_0x3b19(_0x5f3359,_0x413801){_0x5f3359=_0x5f3359-0x9e;const _0x4b1114=a17_0x4b11();let _0x3b199d=_0x4b1114[_0x5f3359];return _0x3b199d;}export const datasetDetail={'service':a17_0x54a672(0xd0),'command':'detail','description':'Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','risk':a17_0x54a672(0xa7),'flags':[CODE_FLAG],async 'execute'(_0x1d3ab0){const _0x2ea2e0=a17_0x54a672,_0x3784ff=await getDatasetDetail(_0x1d3ab0['str'](_0x2ea2e0(0xae))),_0x76b9e1=Array['isArray'](_0x3784ff[_0x2ea2e0(0xca)])?_0x3784ff[_0x2ea2e0(0xca)]:Array[_0x2ea2e0(0xba)](_0x3784ff[_0x2ea2e0(0xe0)])?_0x3784ff['properties']:[];let _0x58eb30=_0x76b9e1[_0x2ea2e0(0xd6)](_0x5e2d63=>normalizeField(_0x5e2d63))['filter'](_0x549914=>_0x549914!==null);_0x58eb30[_0x2ea2e0(0xcf)]===0x0&&(_0x58eb30=await loadListFieldFallback(_0x1d3ab0['appCode'],_0x1d3ab0['str'](_0x2ea2e0(0xae))));const _0x1e8a47=_0x3784ff[_0x2ea2e0(0xcd)]??{},_0x23674b=[];for(const [_0x21fb2e,_0x873f29]of Object[_0x2ea2e0(0xd7)](_0x1e8a47)){const _0x3e349a=normalizeOperationEntry(_0x21fb2e,_0x873f29);if(_0x3e349a)_0x23674b[_0x2ea2e0(0xb1)](_0x3e349a);}const _0x338f78=_0x3784ff[_0x2ea2e0(0xb3)]??{},_0x1ccaa9=_0x3784ff['dataset']??{},_0x156311=_0x338f78[_0x2ea2e0(0xd4)]!=null?{'id':_0x338f78[_0x2ea2e0(0xd4)],'name':_0x338f78['dbName']??null}:undefined;let _0x98f28a;return typeof _0x3784ff[_0x2ea2e0(0xa8)]===_0x2ea2e0(0xc7)&&(_0x98f28a=parseJsonMaybe(_0x3784ff[_0x2ea2e0(0xa8)])),{'ok':!![],'data':{'id':_0x3784ff[_0x2ea2e0(0xa0)]??_0x3784ff['id'],'name':_0x3784ff[_0x2ea2e0(0xdc)],'code':_0x3784ff['modelCode']||_0x3784ff['code'],'doVersion':_0x3784ff['doVersion'],'description':_0x3784ff[_0x2ea2e0(0xb7)]||_0x1ccaa9[_0x2ea2e0(0xa1)]||undefined,'source':_0x3784ff['source']||_0x1ccaa9[_0x2ea2e0(0xb4)],'table':_0x338f78[_0x2ea2e0(0xac)]||_0x1ccaa9['tableName'],'datasetKey':_0x338f78[_0x2ea2e0(0xd8)],'pk':_0x338f78[_0x2ea2e0(0xbc)],'db':_0x156311,'dbtable':summarizeDbtable(_0x338f78),'fields':_0x58eb30,'operations':_0x23674b,'indexes':Array[_0x2ea2e0(0xba)](_0x1ccaa9[_0x2ea2e0(0xda)])?_0x1ccaa9[_0x2ea2e0(0xda)]:[],'relations':Array[_0x2ea2e0(0xba)](_0x3784ff[_0x2ea2e0(0xb5)])?_0x3784ff['relations']['map'](_0x34ef99=>({'fromField':_0x34ef99[_0x2ea2e0(0xc8)],'toDataset':_0x34ef99[_0x2ea2e0(0xb8)],'toCode':_0x34ef99['toDatasetCode'],'toTable':_0x34ef99['toTableName'],'toField':_0x34ef99[_0x2ea2e0(0xb6)],'labelField':_0x34ef99['toFieldLabel']||undefined})):[],'relatedPages':normalizeRelatedPages(_0x3784ff[_0x2ea2e0(0xbb)]),...Array[_0x2ea2e0(0xba)](_0x3784ff[_0x2ea2e0(0xe1)])?{'columnCodeListWithDeleted':_0x3784ff[_0x2ea2e0(0xe1)]}:{},'formatRules':Array['isArray'](_0x3784ff[_0x2ea2e0(0xdf)])?_0x3784ff[_0x2ea2e0(0xdf)]:[],'validateRules':Array[_0x2ea2e0(0xba)](_0x3784ff['validateRules'])?_0x3784ff['validateRules']:[],..._0x98f28a!==undefined?{'extend':_0x98f28a}:{},'stats':{'fieldCount':_0x58eb30[_0x2ea2e0(0xcf)],'operationCount':_0x23674b['length']}}};}};
1
+ const a17_0x303cfc=a17_0x2062;(function(_0x27a5c9,_0x1aa678){const _0x1243d5=a17_0x2062,_0x3f6b30=_0x27a5c9();while(!![]){try{const _0x160e68=-parseInt(_0x1243d5(0x1ec))/0x1+-parseInt(_0x1243d5(0x1be))/0x2*(parseInt(_0x1243d5(0x1d4))/0x3)+parseInt(_0x1243d5(0x1cb))/0x4+parseInt(_0x1243d5(0x1d2))/0x5*(-parseInt(_0x1243d5(0x209))/0x6)+-parseInt(_0x1243d5(0x1c6))/0x7+parseInt(_0x1243d5(0x1e2))/0x8+parseInt(_0x1243d5(0x1f4))/0x9*(parseInt(_0x1243d5(0x1db))/0xa);if(_0x160e68===_0x1aa678)break;else _0x3f6b30['push'](_0x3f6b30['shift']());}catch(_0x1a9f55){_0x3f6b30['push'](_0x3f6b30['shift']());}}}(a17_0x2178,0xe861d));import{getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';function normalizeField(_0x620d02){const _0x2ab7e0=a17_0x2062;if(_0x620d02[_0x2ab7e0(0x1f8)])return null;const _0x484a26=Boolean(_0x620d02[_0x2ab7e0(0x1c4)]!==undefined||_0x620d02[_0x2ab7e0(0x1d7)]!==undefined);let _0x4b9b96={};if(!_0x484a26&&typeof _0x620d02[_0x2ab7e0(0x1d8)]===_0x2ab7e0(0x204))try{_0x4b9b96=JSON[_0x2ab7e0(0x1ca)](_0x620d02[_0x2ab7e0(0x1d8)]);}catch{}const _0x28b44=_0x484a26?_0x620d02[_0x2ab7e0(0x200)]:_0x620d02['code'],_0x582a48=_0x484a26?_0x620d02[_0x2ab7e0(0x1c4)]:_0x620d02[_0x2ab7e0(0x200)],_0x4bfa42=_0x484a26?_0x620d02[_0x2ab7e0(0x1d7)]:_0x620d02[_0x2ab7e0(0x1d5)]||_0x620d02[_0x2ab7e0(0x1d1)],_0x5b18fe=_0x484a26?_0x620d02[_0x2ab7e0(0x202)]===!![]:_0x4b9b96[_0x2ab7e0(0x202)]===!![],_0x2dc042=_0x484a26?_0x620d02[_0x2ab7e0(0x1f1)]===!![]:_0x4b9b96[_0x2ab7e0(0x1f1)]===!![],_0x58064f=_0x484a26?_0x620d02['options']??null:_0x4b9b96[_0x2ab7e0(0x1eb)]??null,_0x745824={'name':_0x28b44,'displayName':_0x582a48||_0x28b44,'type':_0x4bfa42,'dbType':_0x620d02[_0x2ab7e0(0x1f3)],'pk':_0x5b18fe,'required':_0x2dc042,'description':_0x620d02[_0x2ab7e0(0x1fd)]||undefined};return Array[_0x2ab7e0(0x1bf)](_0x58064f)&&_0x58064f[_0x2ab7e0(0x1f6)]>0x0&&(_0x745824[_0x2ab7e0(0x1eb)]=_0x58064f),_0x745824;}function parseJsonMaybe(_0x248fbb){if(typeof _0x248fbb!=='string')return _0x248fbb;try{return JSON['parse'](_0x248fbb);}catch{return _0x248fbb;}}function normalizeOperationEntry(_0x527267,_0x146391){const _0x5d5f55=a17_0x2062;if(!_0x146391||typeof _0x146391!==_0x5d5f55(0x201))return null;if(!_0x146391[_0x5d5f55(0x1c9)]||!_0x146391[_0x5d5f55(0x1c2)])return null;const _0x53f2fe={'name':_0x527267,'method':_0x146391[_0x5d5f55(0x1c9)],'path':_0x146391['path']};if(_0x146391['host'])_0x53f2fe[_0x5d5f55(0x1df)]=_0x146391[_0x5d5f55(0x1df)];if(_0x146391['requestBody']!=null)_0x53f2fe['requestBody']=parseJsonMaybe(_0x146391[_0x5d5f55(0x1fc)]);if(_0x146391['responseBody']!=null)_0x53f2fe['responseBody']=parseJsonMaybe(_0x146391[_0x5d5f55(0x1c8)]);if(_0x146391[_0x5d5f55(0x1c7)]!=null)_0x53f2fe['beforeScriptId']=_0x146391[_0x5d5f55(0x1c7)];if(_0x146391[_0x5d5f55(0x1e6)]!=null)_0x53f2fe[_0x5d5f55(0x1e6)]=_0x146391[_0x5d5f55(0x1e6)];if(Array[_0x5d5f55(0x1bf)](_0x146391[_0x5d5f55(0x20b)]))_0x53f2fe[_0x5d5f55(0x20b)]=_0x146391['requestFields'];if(Array['isArray'](_0x146391[_0x5d5f55(0x1c3)]))_0x53f2fe['responseFields']=_0x146391['responseFields'];return _0x53f2fe;}function summarizeDbtable(_0x2cd3b1){const _0x10c9c3=a17_0x2062,_0x4baad4={},_0x264510=[_0x10c9c3(0x205),_0x10c9c3(0x1e3),_0x10c9c3(0x1c0),_0x10c9c3(0x1f0),'pkField','allFields',_0x10c9c3(0x1e9),_0x10c9c3(0x1dd),'updateTimeField',_0x10c9c3(0x203),_0x10c9c3(0x1c5),_0x10c9c3(0x1ce),'modifierNameField',_0x10c9c3(0x1bd),_0x10c9c3(0x1e4)];for(const _0x569a36 of _0x264510){if(_0x2cd3b1[_0x569a36]!==undefined)_0x4baad4[_0x569a36]=_0x2cd3b1[_0x569a36];}return typeof _0x4baad4[_0x10c9c3(0x1e7)]===_0x10c9c3(0x204)&&_0x4baad4[_0x10c9c3(0x1e7)][_0x10c9c3(0x1f6)]>0x0&&(_0x4baad4['allFieldNames']=_0x4baad4[_0x10c9c3(0x1e7)]['split'](',')['map'](_0x14f9fd=>_0x14f9fd['trim']())['filter'](Boolean)),_0x4baad4;}function normalizeRelatedPages(_0x4f009d){const _0x3ba781=a17_0x2062;if(!Array[_0x3ba781(0x1bf)](_0x4f009d))return[];return _0x4f009d[_0x3ba781(0x1d0)](_0x12ab5b=>_0x12ab5b&&typeof _0x12ab5b===_0x3ba781(0x201))[_0x3ba781(0x208)](_0x3f0e9b=>({'id':_0x3f0e9b['id'],'type':_0x3f0e9b[_0x3ba781(0x1d5)],'code':_0x3f0e9b['code'],'title':_0x3f0e9b[_0x3ba781(0x1ed)],'deleted':_0x3f0e9b[_0x3ba781(0x1f8)]===!![]}));}function normalizeFallbackFieldName(_0x2d2e69,_0x5edec5){const _0x1afb87=_0x2d2e69['trim']();if(!_0x1afb87)return null;return{'name':_0x1afb87,'displayName':_0x1afb87,'type':undefined,'dbType':undefined,'pk':_0x1afb87===_0x5edec5,'required':![],'description':undefined};}function a17_0x2062(_0x3baadd,_0x17d9f2){_0x3baadd=_0x3baadd-0x1bc;const _0x217835=a17_0x2178();let _0x206257=_0x217835[_0x3baadd];return _0x206257;}async function loadListFieldFallback(_0x274cfe,_0x9f532c){const _0x469e5b=a17_0x2062;if(!_0x274cfe||!_0x9f532c)return[];try{const _0xc79c3f=await listDatasets(_0x274cfe,{'code':_0x9f532c}),_0x237a04=_0xc79c3f[_0x469e5b(0x1d6)](_0x17aebe=>_0x17aebe[_0x469e5b(0x1fa)]===_0x9f532c)??_0xc79c3f[0x0],_0x58bf3e=_0x237a04?.[_0x469e5b(0x1bc)]??{},_0x3cc604=typeof _0x58bf3e[_0x469e5b(0x1e7)]===_0x469e5b(0x204)?_0x58bf3e['allFields'][_0x469e5b(0x1f9)](','):[];return _0x3cc604[_0x469e5b(0x208)](_0x1efee3=>normalizeFallbackFieldName(_0x1efee3,_0x58bf3e[_0x469e5b(0x202)]))[_0x469e5b(0x1d0)](_0x819e0a=>_0x819e0a!==null);}catch{return[];}}export const datasetDetail={'service':'dataset','command':a17_0x303cfc(0x1f7),'description':a17_0x303cfc(0x206),'risk':'read','flags':[CODE_FLAG],async 'execute'(_0x14e003){const _0x5529b5=a17_0x303cfc,_0x394d26=await getDatasetDetail(_0x14e003[_0x5529b5(0x1e1)](_0x5529b5(0x1fa))),_0x4a65a4=Array[_0x5529b5(0x1bf)](_0x394d26[_0x5529b5(0x1cc)])?_0x394d26[_0x5529b5(0x1cc)]:Array[_0x5529b5(0x1bf)](_0x394d26[_0x5529b5(0x1c1)])?_0x394d26[_0x5529b5(0x1c1)]:[];let _0x12fb70=_0x4a65a4[_0x5529b5(0x208)](_0x1a717a=>normalizeField(_0x1a717a))['filter'](_0x2ea7da=>_0x2ea7da!==null);_0x12fb70[_0x5529b5(0x1f6)]===0x0&&(_0x12fb70=await loadListFieldFallback(_0x14e003[_0x5529b5(0x1cf)],_0x14e003[_0x5529b5(0x1e1)](_0x5529b5(0x1fa))));const _0x1abf44=_0x394d26[_0x5529b5(0x1f2)]??{},_0x629b3=[];for(const [_0x564986,_0x2c746f]of Object[_0x5529b5(0x1ff)](_0x1abf44)){const _0x35b267=normalizeOperationEntry(_0x564986,_0x2c746f);if(_0x35b267)_0x629b3['push'](_0x35b267);}const _0x65a69a=_0x394d26[_0x5529b5(0x1bc)]??{},_0x610956=_0x394d26[_0x5529b5(0x1e5)]??{},_0x1cdbfa=_0x65a69a['dbId']!=null?{'id':_0x65a69a[_0x5529b5(0x205)],'name':_0x65a69a['dbName']??null}:undefined;let _0x101ed2;return typeof _0x394d26[_0x5529b5(0x1d8)]===_0x5529b5(0x204)&&(_0x101ed2=parseJsonMaybe(_0x394d26[_0x5529b5(0x1d8)])),{'ok':!![],'data':{'id':_0x394d26[_0x5529b5(0x1ea)]??_0x394d26['id'],'name':_0x394d26[_0x5529b5(0x200)],'code':_0x394d26['modelCode']||_0x394d26[_0x5529b5(0x1fa)],'doVersion':_0x394d26[_0x5529b5(0x1fb)],'description':_0x394d26['description']||_0x610956[_0x5529b5(0x1f5)]||undefined,'source':_0x394d26[_0x5529b5(0x1dc)]||_0x610956[_0x5529b5(0x1ef)],'table':_0x65a69a[_0x5529b5(0x1c0)]||_0x610956[_0x5529b5(0x1c0)],'datasetKey':_0x65a69a[_0x5529b5(0x1f0)],'pk':_0x65a69a[_0x5529b5(0x202)],'db':_0x1cdbfa,'dbtable':summarizeDbtable(_0x65a69a),'fields':_0x12fb70,'operations':_0x629b3,'indexes':Array['isArray'](_0x610956[_0x5529b5(0x207)])?_0x610956[_0x5529b5(0x207)]:[],'relations':Array[_0x5529b5(0x1bf)](_0x394d26[_0x5529b5(0x1de)])?_0x394d26[_0x5529b5(0x1de)][_0x5529b5(0x208)](_0x2dc7f8=>({'fromField':_0x2dc7f8[_0x5529b5(0x1fe)],'toDataset':_0x2dc7f8[_0x5529b5(0x1cd)],'toCode':_0x2dc7f8['toDatasetCode'],'toTable':_0x2dc7f8[_0x5529b5(0x1da)],'toField':_0x2dc7f8[_0x5529b5(0x1d3)],'labelField':_0x2dc7f8[_0x5529b5(0x20a)]||undefined})):[],'relatedPages':normalizeRelatedPages(_0x394d26[_0x5529b5(0x1e8)]),...Array[_0x5529b5(0x1bf)](_0x394d26[_0x5529b5(0x1d9)])?{'columnCodeListWithDeleted':_0x394d26[_0x5529b5(0x1d9)]}:{},'formatRules':Array[_0x5529b5(0x1bf)](_0x394d26[_0x5529b5(0x1ee)])?_0x394d26[_0x5529b5(0x1ee)]:[],'validateRules':Array[_0x5529b5(0x1bf)](_0x394d26[_0x5529b5(0x1e0)])?_0x394d26['validateRules']:[],..._0x101ed2!==undefined?{'extend':_0x101ed2}:{},'stats':{'fieldCount':_0x12fb70[_0x5529b5(0x1f6)],'operationCount':_0x629b3['length']}}};}};function a17_0x2178(){const _0xec10c9=['relatedPageInfoList','logicField','modelId','options','825020zFEzjm','title','formatRules','sourceType','datasetKey','required','operations','dbType','27vZJEON','tableComment','length','detail','deleted','split','code','doVersion','requestBody','description','fromField','entries','name','object','pkField','creatorIdField','string','dbId','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','indexes','map','33102mMhaPj','toFieldLabel','requestFields','dbtableConfig','labelField','2866HVoorZ','isArray','tableName','properties','path','responseFields','displayName','creatorNameField','1656795xdGKYD','beforeScriptId','responseBody','method','parse','7481520IgFktg','fields','toDatasetName','modifierIdField','appCode','filter','dataType','890hwAyVu','toField','2505IVrWoz','type','find','doType','extend','columnCodeListWithDeleted','toTableName','6999980rKTKcL','source','createTimeField','relations','host','validateRules','str','1773992NAQOim','dbName','dblinkInfoDTO','dataset','afterScriptId','allFields'];a17_0x2178=function(){return _0xec10c9;};return a17_0x2178();}
@@ -1 +1 @@
1
- (function(_0x3aa9cb,_0x4cbfb6){const _0x4b35d7=a18_0x56aa,_0x446b6c=_0x3aa9cb();while(!![]){try{const _0x43755b=-parseInt(_0x4b35d7(0x1cc))/0x1+-parseInt(_0x4b35d7(0x1c7))/0x2*(parseInt(_0x4b35d7(0x1ce))/0x3)+-parseInt(_0x4b35d7(0x1cb))/0x4+parseInt(_0x4b35d7(0x1ca))/0x5*(-parseInt(_0x4b35d7(0x1c9))/0x6)+-parseInt(_0x4b35d7(0x1c8))/0x7*(parseInt(_0x4b35d7(0x1cd))/0x8)+parseInt(_0x4b35d7(0x1cf))/0x9+parseInt(_0x4b35d7(0x1c6))/0xa;if(_0x43755b===_0x4cbfb6)break;else _0x446b6c['push'](_0x446b6c['shift']());}catch(_0x2d0aac){_0x446b6c['push'](_0x446b6c['shift']());}}}(a18_0x3a0f,0xe69c4));import{datasetList}from'../../commands/dataset/list.js';function a18_0x3a0f(){const _0x111f50=['54312440fKZZca','4tehqHh','14xOfBsm','30eEwUMV','1842910jhqSmO','2103164umNYRw','1829750pZbltI','1187096WLzwKJ','297855ExdQDF','1864179CXhzYL'];a18_0x3a0f=function(){return _0x111f50;};return a18_0x3a0f();}function a18_0x56aa(_0x251316,_0x3c1903){_0x251316=_0x251316-0x1c6;const _0x3a0f40=a18_0x3a0f();let _0x56aa71=_0x3a0f40[_0x251316];return _0x56aa71;}import{datasetDetail}from'../../commands/dataset/detail.js';export const datasetDefinitions=[datasetList,datasetDetail];
1
+ function a18_0x211f(){const _0x25d2bf=['3911215jtLTvt','1684086tqhltX','9180OrWONy','4jRzUFX','5533CsOGaa','2058605JUspSw','45729XJsQIC','232idbJSE','168794cyfzNf','6sPIIMt','236632pZswKf'];a18_0x211f=function(){return _0x25d2bf;};return a18_0x211f();}(function(_0xd1ff22,_0x102ee9){const _0xa2e80f=a18_0xa843,_0x12ffd2=_0xd1ff22();while(!![]){try{const _0x9efabd=parseInt(_0xa2e80f(0x1cb))/0x1+parseInt(_0xa2e80f(0x1c9))/0x2*(parseInt(_0xa2e80f(0x1ca))/0x3)+-parseInt(_0xa2e80f(0x1cf))/0x4*(-parseInt(_0xa2e80f(0x1c6))/0x5)+-parseInt(_0xa2e80f(0x1cd))/0x6+-parseInt(_0xa2e80f(0x1cc))/0x7+-parseInt(_0xa2e80f(0x1c8))/0x8*(parseInt(_0xa2e80f(0x1c7))/0x9)+parseInt(_0xa2e80f(0x1ce))/0xa*(parseInt(_0xa2e80f(0x1c5))/0xb);if(_0x9efabd===_0x102ee9)break;else _0x12ffd2['push'](_0x12ffd2['shift']());}catch(_0x3a8ed4){_0x12ffd2['push'](_0x12ffd2['shift']());}}}(a18_0x211f,0x4751e));import{datasetList}from'../../commands/dataset/list.js';import{datasetDetail}from'../../commands/dataset/detail.js';function a18_0xa843(_0x47dfbe,_0x172d6c){_0x47dfbe=_0x47dfbe-0x1c5;const _0x211f05=a18_0x211f();let _0xa843c3=_0x211f05[_0x47dfbe];return _0xa843c3;}export const datasetDefinitions=[datasetList,datasetDetail];
@@ -1 +1 @@
1
- const a19_0x1bbeae=a19_0x514d;(function(_0x2c4c5c,_0x5992f4){const _0x5bedef=a19_0x514d,_0x20f99d=_0x2c4c5c();while(!![]){try{const _0x5db5de=-parseInt(_0x5bedef(0x191))/0x1+parseInt(_0x5bedef(0x1a5))/0x2+-parseInt(_0x5bedef(0x1a8))/0x3+-parseInt(_0x5bedef(0x198))/0x4*(-parseInt(_0x5bedef(0x1a3))/0x5)+-parseInt(_0x5bedef(0x19a))/0x6*(parseInt(_0x5bedef(0x18d))/0x7)+parseInt(_0x5bedef(0x1a7))/0x8*(-parseInt(_0x5bedef(0x1a6))/0x9)+-parseInt(_0x5bedef(0x197))/0xa*(-parseInt(_0x5bedef(0x199))/0xb);if(_0x5db5de===_0x5992f4)break;else _0x20f99d['push'](_0x20f99d['shift']());}catch(_0x446dda){_0x20f99d['push'](_0x20f99d['shift']());}}}(a19_0x505e,0x319db));import{listDatasets}from'../../core/api-client.js';function a19_0x514d(_0x4fdd7d,_0x2c1896){_0x4fdd7d=_0x4fdd7d-0x18d;const _0x505e46=a19_0x505e();let _0x514d40=_0x505e46[_0x4fdd7d];return _0x514d40;}import{CODE_FLAG}from'../../commands/common/flags.js';function a19_0x505e(){const _0x47e001=['List\x20datasets\x20in\x20the\x20app\x20(supports\x20server-side\x20name/code\x20filtering)','dbtableConfig','split','str','400zxdzDn','2616RDhxmr','74965WlOtOw','336QiUlui','map','datasetKey','trim','Filter\x20by\x20dataset\x20name\x20(server-side\x20fuzzy\x20match)','pkField','dataset','read','string','1745dACuzx','allFields','733880KrvynK','135189wMFTEC','32nnzGOp','1094229VyrNjc','15547DqKiOi','tableName','source','length','115356ftpISg','name'];a19_0x505e=function(){return _0x47e001;};return a19_0x505e();}export const datasetList={'service':a19_0x1bbeae(0x1a0),'command':'list','description':a19_0x1bbeae(0x193),'risk':a19_0x1bbeae(0x1a1),'flags':[{'name':a19_0x1bbeae(0x192),'type':a19_0x1bbeae(0x1a2),'description':a19_0x1bbeae(0x19e)},{...CODE_FLAG,'required':![],'description':'Filter\x20by\x20dataset\x20code\x20(server-side\x20exact\x20match)'}],async 'execute'(_0x48fdd4){const _0x4a5776=a19_0x1bbeae,_0x20804c=_0x48fdd4[_0x4a5776(0x196)](_0x4a5776(0x192)),_0x5876c6=_0x48fdd4[_0x4a5776(0x196)]('code'),_0x4a05b8=await listDatasets(_0x48fdd4['appCode'],{..._0x20804c&&{'name':_0x20804c},..._0x5876c6&&{'code':_0x5876c6}});return{'ok':!![],'data':{'total':_0x4a05b8[_0x4a5776(0x190)],'datasets':_0x4a05b8[_0x4a5776(0x19b)](_0x159b0a=>{const _0x50cf4b=_0x4a5776,_0x43e50e=_0x159b0a[_0x50cf4b(0x194)]??{};return{'id':_0x159b0a['id'],'code':_0x159b0a['code'],'name':_0x159b0a['name'],'source':_0x159b0a[_0x50cf4b(0x18f)],'description':_0x159b0a['description'],'table':_0x43e50e[_0x50cf4b(0x18e)],'datasetKey':_0x43e50e[_0x50cf4b(0x19c)],'pk':_0x43e50e[_0x50cf4b(0x19f)],'fields':_0x43e50e[_0x50cf4b(0x1a4)]?_0x43e50e[_0x50cf4b(0x1a4)][_0x50cf4b(0x195)](',')[_0x50cf4b(0x19b)](_0x20f668=>_0x20f668[_0x50cf4b(0x19d)]()):[]};})}};}};
1
+ const a19_0xdffc67=a19_0x5c1a;(function(_0x5ed43a,_0x35a526){const _0x42dd23=a19_0x5c1a,_0x5da4ce=_0x5ed43a();while(!![]){try{const _0x459d9d=-parseInt(_0x42dd23(0x8f))/0x1*(parseInt(_0x42dd23(0x93))/0x2)+-parseInt(_0x42dd23(0x83))/0x3+-parseInt(_0x42dd23(0x97))/0x4*(parseInt(_0x42dd23(0x7f))/0x5)+parseInt(_0x42dd23(0x7e))/0x6+-parseInt(_0x42dd23(0x8c))/0x7+-parseInt(_0x42dd23(0x96))/0x8+parseInt(_0x42dd23(0x85))/0x9*(parseInt(_0x42dd23(0x8a))/0xa);if(_0x459d9d===_0x35a526)break;else _0x5da4ce['push'](_0x5da4ce['shift']());}catch(_0x17f08d){_0x5da4ce['push'](_0x5da4ce['shift']());}}}(a19_0x55f2,0xd896e));function a19_0x55f2(){const _0x14fe32=['allFields','source','code','3234948UlfpEU','length','777330qDDMdZ','str','trim','map','list','580PxGuiq','Filter\x20by\x20dataset\x20code\x20(server-side\x20exact\x20match)','10173394vFbUps','string','name','937xtiSyT','appCode','description','List\x20datasets\x20in\x20the\x20app\x20(supports\x20server-side\x20name/code\x20filtering)','3506AJqXEN','datasetKey','dbtableConfig','8149968smlLlq','45340SmTKWQ','pkField','6491940CQwoTP','5OJHdMC'];a19_0x55f2=function(){return _0x14fe32;};return a19_0x55f2();}import{listDatasets}from'../../core/api-client.js';function a19_0x5c1a(_0x298d7e,_0x5654c8){_0x298d7e=_0x298d7e-0x7d;const _0x55f276=a19_0x55f2();let _0x5c1ae6=_0x55f276[_0x298d7e];return _0x5c1ae6;}import{CODE_FLAG}from'../../commands/common/flags.js';export const datasetList={'service':'dataset','command':a19_0xdffc67(0x89),'description':a19_0xdffc67(0x92),'risk':'read','flags':[{'name':'name','type':a19_0xdffc67(0x8d),'description':'Filter\x20by\x20dataset\x20name\x20(server-side\x20fuzzy\x20match)'},{...CODE_FLAG,'required':![],'description':a19_0xdffc67(0x8b)}],async 'execute'(_0x37bcfa){const _0x570091=a19_0xdffc67,_0x46eb6e=_0x37bcfa[_0x570091(0x86)](_0x570091(0x8e)),_0x4cff81=_0x37bcfa[_0x570091(0x86)](_0x570091(0x82)),_0x1bf526=await listDatasets(_0x37bcfa[_0x570091(0x90)],{..._0x46eb6e&&{'name':_0x46eb6e},..._0x4cff81&&{'code':_0x4cff81}});return{'ok':!![],'data':{'total':_0x1bf526[_0x570091(0x84)],'datasets':_0x1bf526[_0x570091(0x88)](_0x57e406=>{const _0x1b51e6=_0x570091,_0x2b4dda=_0x57e406[_0x1b51e6(0x95)]??{};return{'id':_0x57e406['id'],'code':_0x57e406[_0x1b51e6(0x82)],'name':_0x57e406['name'],'source':_0x57e406[_0x1b51e6(0x81)],'description':_0x57e406[_0x1b51e6(0x91)],'table':_0x2b4dda['tableName'],'datasetKey':_0x2b4dda[_0x1b51e6(0x94)],'pk':_0x2b4dda[_0x1b51e6(0x7d)],'fields':_0x2b4dda[_0x1b51e6(0x80)]?_0x2b4dda[_0x1b51e6(0x80)]['split'](',')[_0x1b51e6(0x88)](_0x5e88ed=>_0x5e88ed[_0x1b51e6(0x87)]()):[]};})}};}};
@@ -1 +1 @@
1
- const a20_0x489f45=a20_0x1091;(function(_0x56f9dd,_0xdba8f8){const _0x1e9ec4=a20_0x1091,_0x1d74df=_0x56f9dd();while(!![]){try{const _0x1b22c6=parseInt(_0x1e9ec4(0x1c1))/0x1*(-parseInt(_0x1e9ec4(0x1d6))/0x2)+-parseInt(_0x1e9ec4(0x1f9))/0x3*(-parseInt(_0x1e9ec4(0x1ba))/0x4)+parseInt(_0x1e9ec4(0x1cc))/0x5*(-parseInt(_0x1e9ec4(0x1dc))/0x6)+-parseInt(_0x1e9ec4(0x1ca))/0x7+parseInt(_0x1e9ec4(0x1d3))/0x8+parseInt(_0x1e9ec4(0x1ed))/0x9+parseInt(_0x1e9ec4(0x1f8))/0xa;if(_0x1b22c6===_0xdba8f8)break;else _0x1d74df['push'](_0x1d74df['shift']());}catch(_0x28155e){_0x1d74df['push'](_0x1d74df['shift']());}}}(a20_0x31fb,0xa9279));import a20_0x12d434 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';function a20_0x31fb(){const _0x5e989b=['8939320sIGBNX','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','env','202720rfYJqg','locale','riskLevel','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20runtimeDomain:\x20\x20\x20','log','30imONOM','(not\x20set)','(set,\x20length=','appCode','(default)','\x20\x20API\x20Endpoints','\x20(legacy/compat\x20only)','gray','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','(no\x20file)','\x20doctor','repeat','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','green','accessKey','version','Project','281727CeRbaG','bold','currentApp','Diagnose\x20CLI\x20configuration\x20and\x20environment','\x20\x20Config\x20Files','ClientAk','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','format','\x20\x20Config\x20JSON','(none)','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','7193780BPUzUL','3EcuczC','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','\x20\x20auth\x20(effective):\x20','✗\x20Invalid\x20JSON','5504204tSyYtQ','padEnd','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','length','pageSize','\x20\x20Auth','verbose','13ZuCeSS','(removed\x20—\x20cookie\x20auth\x20disabled)','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(not\x20found)','\x20\x20─','\x20\x20Session\x20check:\x20\x20\x20','status','(missing)','empty','6286665naAoVz','platform','335515cEiMuJ','Global','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Merged\x20Config','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','red','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20'];a20_0x31fb=function(){return _0x5e989b;};return a20_0x31fb();}import{buildConfigFromFlags,initGlobalEnvironment,getProjectConfigPath,getGlobalConfigPath,inspectCliConfigJsonFile}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{isLegacyCompatConfigKey}from'../config/schema.js';async function execute(_0x124dfd){const _0x37692a=a20_0x1091,_0x3e86e5=getCliVersion(),_0x58b8ef=buildConfigFromFlags({});await initGlobalEnvironment(_0x58b8ef),console[_0x37692a(0x1db)](),console['log'](a20_0x12d434[_0x37692a(0x1ee)](CLI_BIN_NAME+_0x37692a(0x1e6))),console[_0x37692a(0x1db)](a20_0x12d434[_0x37692a(0x1e3)]('─'[_0x37692a(0x1e7)](0x32))),console[_0x37692a(0x1db)]('\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20'+_0x3e86e5),console['log'](_0x37692a(0x1fb)+process[_0x37692a(0x1eb)]),console[_0x37692a(0x1db)](_0x37692a(0x1d4)+process[_0x37692a(0x1cb)]+'\x20'+process['arch']),console['log'](),console[_0x37692a(0x1db)](a20_0x12d434[_0x37692a(0x1ee)](_0x37692a(0x1f1))),console[_0x37692a(0x1db)](a20_0x12d434[_0x37692a(0x1e3)](_0x37692a(0x1c5)[_0x37692a(0x1e7)](0x1e)));const _0x23306=getGlobalConfigPath(),_0x17b2c6=getProjectConfigPath();console[_0x37692a(0x1db)](_0x37692a(0x1bc)+(_0x23306||a20_0x12d434[_0x37692a(0x1e3)](_0x37692a(0x1c4)))),console[_0x37692a(0x1db)](_0x37692a(0x1fa)+(_0x17b2c6||a20_0x12d434[_0x37692a(0x1e3)](_0x37692a(0x1c4)))),console[_0x37692a(0x1db)](),console[_0x37692a(0x1db)](a20_0x12d434[_0x37692a(0x1ee)](_0x37692a(0x1f5))),console[_0x37692a(0x1db)](a20_0x12d434['gray'](_0x37692a(0x1c5)[_0x37692a(0x1e7)](0x1e)));const _0x25ad31=(_0x2ee077,_0x2e2080)=>{const _0x37d69d=_0x37692a;if(!_0x2e2080){console[_0x37d69d(0x1db)]('\x20\x20'+_0x2ee077[_0x37d69d(0x1bb)](0x11)+'\x20'+a20_0x12d434['gray'](_0x37d69d(0x1e5)));return;}const _0x4acf49=inspectCliConfigJsonFile(_0x2e2080);if(_0x4acf49[_0x37d69d(0x1c7)]==='ok')console[_0x37d69d(0x1db)]('\x20\x20'+_0x2ee077[_0x37d69d(0x1bb)](0x11)+'\x20'+a20_0x12d434[_0x37d69d(0x1e9)]('✓\x20Valid\x20JSON'));else{if(_0x4acf49[_0x37d69d(0x1c7)]===_0x37d69d(0x1c9))console[_0x37d69d(0x1db)]('\x20\x20'+_0x2ee077[_0x37d69d(0x1bb)](0x11)+'\x20'+a20_0x12d434['yellow']('⚠\x20Empty\x20(treated\x20as\x20{})'));else _0x4acf49[_0x37d69d(0x1c7)]==='missing'?console[_0x37d69d(0x1db)]('\x20\x20'+_0x2ee077[_0x37d69d(0x1bb)](0x11)+'\x20'+a20_0x12d434[_0x37d69d(0x1e3)](_0x37d69d(0x1c8))):(console[_0x37d69d(0x1db)]('\x20\x20'+_0x2ee077[_0x37d69d(0x1bb)](0x11)+'\x20'+a20_0x12d434[_0x37d69d(0x1d1)](_0x37d69d(0x1b9))),console[_0x37d69d(0x1db)]('\x20\x20'+''[_0x37d69d(0x1bb)](0x11)+'\x20'+a20_0x12d434[_0x37d69d(0x1d1)](_0x4acf49['message'])));}};_0x25ad31(_0x37692a(0x1cd),_0x23306),_0x25ad31(_0x37692a(0x1ec),_0x17b2c6),console[_0x37692a(0x1db)](),console[_0x37692a(0x1db)](a20_0x12d434[_0x37692a(0x1ee)](_0x37692a(0x1cf))),console[_0x37692a(0x1db)](a20_0x12d434[_0x37692a(0x1e3)](_0x37692a(0x1c5)[_0x37692a(0x1e7)](0x1e))),console[_0x37692a(0x1db)](_0x37692a(0x1f7)+(_0x58b8ef[_0x37692a(0x1df)]||a20_0x12d434['red'](_0x37692a(0x1dd)))),console[_0x37692a(0x1db)]('\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x58b8ef[_0x37692a(0x1d5)]);const _0xb0fb41=isLegacyCompatConfigKey(_0x37692a(0x1d7))?a20_0x12d434[_0x37692a(0x1e3)](_0x58b8ef[_0x37692a(0x1d7)]+_0x37692a(0x1e2)):_0x58b8ef['locale'];return console['log'](_0x37692a(0x1d9)+_0xb0fb41),console[_0x37692a(0x1db)](_0x37692a(0x1fc)+(_0x58b8ef['defaultApp']||a20_0x12d434[_0x37692a(0x1e3)](_0x37692a(0x1f6)))),console['log'](_0x37692a(0x1e4)+(_0x58b8ef[_0x37692a(0x1ef)]||a20_0x12d434[_0x37692a(0x1e3)]('(none)'))),console[_0x37692a(0x1db)](_0x37692a(0x1ce)+(_0x58b8ef[_0x37692a(0x1f4)]||a20_0x12d434['gray']('(default:\x20'+DEFAULT_CONFIG_VALUES[_0x37692a(0x1f4)]+')'))),console['log'](_0x37692a(0x1f3)+(_0x58b8ef[_0x37692a(0x1be)]??a20_0x12d434[_0x37692a(0x1e3)](_0x37692a(0x1e0)))),console['log'](_0x37692a(0x1d0)+_0x58b8ef[_0x37692a(0x1d8)]),console[_0x37692a(0x1db)](_0x37692a(0x1d2)+_0x58b8ef[_0x37692a(0x1c0)]),console['log'](_0x37692a(0x1fd)+AUTH_MODE['ClientAk']),console[_0x37692a(0x1db)]('\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20'+(_0x58b8ef['accessKey']?a20_0x12d434[_0x37692a(0x1e9)](_0x37692a(0x1de)+_0x58b8ef[_0x37692a(0x1ea)][_0x37692a(0x1bd)]+')'):a20_0x12d434['gray'](_0x37692a(0x1f6)))),console[_0x37692a(0x1db)](),console[_0x37692a(0x1db)](a20_0x12d434[_0x37692a(0x1ee)](_0x37692a(0x1e1))),console[_0x37692a(0x1db)](a20_0x12d434[_0x37692a(0x1e3)](_0x37692a(0x1c5)[_0x37692a(0x1e7)](0x1e))),console['log'](_0x37692a(0x1e8)+getApiDomain()),console[_0x37692a(0x1db)]('\x20\x20userDomain:\x20\x20\x20\x20\x20\x20'+getUserDomain()),console[_0x37692a(0x1db)](_0x37692a(0x1da)+getRuntimeDomain()),console[_0x37692a(0x1db)](),console[_0x37692a(0x1db)](a20_0x12d434[_0x37692a(0x1ee)](_0x37692a(0x1bf))),console[_0x37692a(0x1db)](a20_0x12d434[_0x37692a(0x1e3)](_0x37692a(0x1c5)['repeat'](0x1e))),console[_0x37692a(0x1db)](_0x37692a(0x1c3)+a20_0x12d434['green'](AUTH_MODE[_0x37692a(0x1f2)]+'\x20(accessKey)')),console[_0x37692a(0x1db)](_0x37692a(0x1c6)+a20_0x12d434[_0x37692a(0x1e3)](_0x37692a(0x1c2))),console[_0x37692a(0x1db)](),{'ok':!![]};}function a20_0x1091(_0x52cadf,_0x1f86b3){_0x52cadf=_0x52cadf-0x1b9;const _0x31fb76=a20_0x31fb();let _0x109182=_0x31fb76[_0x52cadf];return _0x109182;}export const doctorDefinition={'service':'doctor','command':'check','description':a20_0x489f45(0x1f0),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
1
+ const a20_0x3e18ce=a20_0x44f1;(function(_0x528f52,_0xd4e07a){const _0x27d911=a20_0x44f1,_0x45ba7a=_0x528f52();while(!![]){try{const _0x2e4215=-parseInt(_0x27d911(0xd4))/0x1+parseInt(_0x27d911(0xb9))/0x2*(-parseInt(_0x27d911(0xc0))/0x3)+parseInt(_0x27d911(0xef))/0x4+parseInt(_0x27d911(0xf7))/0x5+parseInt(_0x27d911(0xdb))/0x6*(parseInt(_0x27d911(0xd8))/0x7)+parseInt(_0x27d911(0xc7))/0x8+parseInt(_0x27d911(0xcc))/0x9*(-parseInt(_0x27d911(0xf1))/0xa);if(_0x2e4215===_0xd4e07a)break;else _0x45ba7a['push'](_0x45ba7a['shift']());}catch(_0x163fb2){_0x45ba7a['push'](_0x45ba7a['shift']());}}}(a20_0x5385,0x9d62f));import a20_0xd8dd5a 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';function a20_0x5385(){const _0x1aa1df=['yellow','\x20\x20runtimeDomain:\x20\x20\x20','4239AxqmSI','read','locale','verbose','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','Project','env','format','42990SmqLCe','\x20\x20','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(set,\x20length=','1631jVpEtl','empty','\x20doctor','21342HcFIKi','(not\x20found)','(not\x20set)','repeat','✓\x20Valid\x20JSON','log','message','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','\x20\x20Auth','⚠\x20Empty\x20(treated\x20as\x20{})','Diagnose\x20CLI\x20configuration\x20and\x20environment','\x20(accessKey)','accessKey','✗\x20Invalid\x20JSON','\x20\x20Session\x20check:\x20\x20\x20','\x20\x20Config\x20Files','red','gray','ClientAk','(removed\x20—\x20cookie\x20auth\x20disabled)','4946272hZyPRF','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','52790tvogza','version','platform','\x20\x20Merged\x20Config','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','status','4825865LRhCEn','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','length','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','appCode','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','250854bJlfVr','riskLevel','(none)','pageSize','(missing)','arch','(no\x20file)','3EybueM','padEnd','bold','doctor','green','(default)','check','2151672hTciuE','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20'];a20_0x5385=function(){return _0x1aa1df;};return a20_0x5385();}function a20_0x44f1(_0x10a6a2,_0x1f20da){_0x10a6a2=_0x10a6a2-0xb4;const _0x538500=a20_0x5385();let _0x44f150=_0x538500[_0x10a6a2];return _0x44f150;}import{AUTH_MODE}from'../constant/auth-mode.js';import{isLegacyCompatConfigKey}from'../config/schema.js';async function execute(_0x8c42c8){const _0x24f85a=a20_0x44f1,_0x30b532=getCliVersion(),_0x3a2bf1=buildConfigFromFlags({});await initGlobalEnvironment(_0x3a2bf1),console[_0x24f85a(0xe0)](),console[_0x24f85a(0xe0)](a20_0xd8dd5a['bold'](CLI_BIN_NAME+_0x24f85a(0xda))),console[_0x24f85a(0xe0)](a20_0xd8dd5a[_0x24f85a(0xec)]('─'[_0x24f85a(0xde)](0x32))),console[_0x24f85a(0xe0)](_0x24f85a(0xe2)+_0x30b532),console[_0x24f85a(0xe0)]('\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0x24f85a(0xf2)]),console[_0x24f85a(0xe0)](_0x24f85a(0xb8)+process[_0x24f85a(0xf3)]+'\x20'+process[_0x24f85a(0xbe)]),console[_0x24f85a(0xe0)](),console[_0x24f85a(0xe0)](a20_0xd8dd5a[_0x24f85a(0xc2)](_0x24f85a(0xea))),console[_0x24f85a(0xe0)](a20_0xd8dd5a[_0x24f85a(0xec)]('\x20\x20─'[_0x24f85a(0xde)](0x1e)));const _0x1e689b=getGlobalConfigPath(),_0x482bd6=getProjectConfigPath();console[_0x24f85a(0xe0)]('\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x1e689b||a20_0xd8dd5a['gray'](_0x24f85a(0xdc)))),console['log']('\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x482bd6||a20_0xd8dd5a[_0x24f85a(0xec)](_0x24f85a(0xdc)))),console[_0x24f85a(0xe0)](),console[_0x24f85a(0xe0)](a20_0xd8dd5a['bold']('\x20\x20Config\x20JSON')),console[_0x24f85a(0xe0)](a20_0xd8dd5a['gray'](_0x24f85a(0xd5)['repeat'](0x1e)));const _0x3c2f2a=(_0x310a5e,_0x390a98)=>{const _0x435838=_0x24f85a;if(!_0x390a98){console[_0x435838(0xe0)]('\x20\x20'+_0x310a5e[_0x435838(0xc1)](0x11)+'\x20'+a20_0xd8dd5a[_0x435838(0xec)](_0x435838(0xbf)));return;}const _0x1255e5=inspectCliConfigJsonFile(_0x390a98);if(_0x1255e5[_0x435838(0xf6)]==='ok')console[_0x435838(0xe0)]('\x20\x20'+_0x310a5e[_0x435838(0xc1)](0x11)+'\x20'+a20_0xd8dd5a[_0x435838(0xc4)](_0x435838(0xdf)));else{if(_0x1255e5['status']===_0x435838(0xd9))console[_0x435838(0xe0)]('\x20\x20'+_0x310a5e['padEnd'](0x11)+'\x20'+a20_0xd8dd5a[_0x435838(0xca)](_0x435838(0xe4)));else _0x1255e5[_0x435838(0xf6)]==='missing'?console[_0x435838(0xe0)]('\x20\x20'+_0x310a5e[_0x435838(0xc1)](0x11)+'\x20'+a20_0xd8dd5a['gray'](_0x435838(0xbd))):(console[_0x435838(0xe0)]('\x20\x20'+_0x310a5e[_0x435838(0xc1)](0x11)+'\x20'+a20_0xd8dd5a[_0x435838(0xeb)](_0x435838(0xe8))),console[_0x435838(0xe0)]('\x20\x20'+''[_0x435838(0xc1)](0x11)+'\x20'+a20_0xd8dd5a[_0x435838(0xeb)](_0x1255e5[_0x435838(0xe1)])));}};_0x3c2f2a('Global',_0x1e689b),_0x3c2f2a(_0x24f85a(0xd1),_0x482bd6),console[_0x24f85a(0xe0)](),console[_0x24f85a(0xe0)](a20_0xd8dd5a[_0x24f85a(0xc2)](_0x24f85a(0xf4))),console[_0x24f85a(0xe0)](a20_0xd8dd5a[_0x24f85a(0xec)](_0x24f85a(0xd5)[_0x24f85a(0xde)](0x1e))),console['log'](_0x24f85a(0xf5)+(_0x3a2bf1[_0x24f85a(0xb7)]||a20_0xd8dd5a[_0x24f85a(0xeb)](_0x24f85a(0xdd)))),console[_0x24f85a(0xe0)]('\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x3a2bf1[_0x24f85a(0xd2)]);const _0x12c667=isLegacyCompatConfigKey(_0x24f85a(0xce))?a20_0xd8dd5a[_0x24f85a(0xec)](_0x3a2bf1['locale']+'\x20(legacy/compat\x20only)'):_0x3a2bf1[_0x24f85a(0xce)];return console['log'](_0x24f85a(0xb6)+_0x12c667),console[_0x24f85a(0xe0)](_0x24f85a(0xc9)+(_0x3a2bf1['defaultApp']||a20_0xd8dd5a[_0x24f85a(0xec)](_0x24f85a(0xbb)))),console[_0x24f85a(0xe0)](_0x24f85a(0xc8)+(_0x3a2bf1['currentApp']||a20_0xd8dd5a[_0x24f85a(0xec)]('(none)'))),console[_0x24f85a(0xe0)](_0x24f85a(0xd6)+(_0x3a2bf1['format']||a20_0xd8dd5a['gray']('(default:\x20'+DEFAULT_CONFIG_VALUES[_0x24f85a(0xd3)]+')'))),console[_0x24f85a(0xe0)](_0x24f85a(0xd0)+(_0x3a2bf1[_0x24f85a(0xbc)]??a20_0xd8dd5a[_0x24f85a(0xec)](_0x24f85a(0xc5)))),console[_0x24f85a(0xe0)]('\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20'+_0x3a2bf1[_0x24f85a(0xba)]),console['log']('\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x3a2bf1[_0x24f85a(0xcf)]),console[_0x24f85a(0xe0)]('\x20\x20auth\x20(effective):\x20'+AUTH_MODE[_0x24f85a(0xed)]),console[_0x24f85a(0xe0)]('\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20'+(_0x3a2bf1['accessKey']?a20_0xd8dd5a[_0x24f85a(0xc4)](_0x24f85a(0xd7)+_0x3a2bf1[_0x24f85a(0xe7)][_0x24f85a(0xb5)]+')'):a20_0xd8dd5a[_0x24f85a(0xec)](_0x24f85a(0xbb)))),console[_0x24f85a(0xe0)](),console[_0x24f85a(0xe0)](a20_0xd8dd5a[_0x24f85a(0xc2)]('\x20\x20API\x20Endpoints')),console[_0x24f85a(0xe0)](a20_0xd8dd5a[_0x24f85a(0xec)](_0x24f85a(0xd5)[_0x24f85a(0xde)](0x1e))),console['log']('\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20'+getApiDomain()),console[_0x24f85a(0xe0)](_0x24f85a(0xf0)+getUserDomain()),console['log'](_0x24f85a(0xcb)+getRuntimeDomain()),console[_0x24f85a(0xe0)](),console['log'](a20_0xd8dd5a[_0x24f85a(0xc2)](_0x24f85a(0xe3))),console['log'](a20_0xd8dd5a[_0x24f85a(0xec)]('\x20\x20─'[_0x24f85a(0xde)](0x1e))),console['log'](_0x24f85a(0xb4)+a20_0xd8dd5a[_0x24f85a(0xc4)](AUTH_MODE[_0x24f85a(0xed)]+_0x24f85a(0xe6))),console[_0x24f85a(0xe0)](_0x24f85a(0xe9)+a20_0xd8dd5a[_0x24f85a(0xec)](_0x24f85a(0xee))),console[_0x24f85a(0xe0)](),{'ok':!![]};}export const doctorDefinition={'service':a20_0x3e18ce(0xc3),'command':a20_0x3e18ce(0xc6),'description':a20_0x3e18ce(0xe5),'risk':a20_0x3e18ce(0xcd),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
@@ -1 +1 @@
1
- const a21_0x382402=a21_0x2c3c;(function(_0x4f4350,_0x3f163e){const _0x206355=a21_0x2c3c,_0xe7278a=_0x4f4350();while(!![]){try{const _0x68316a=parseInt(_0x206355(0xc0))/0x1*(-parseInt(_0x206355(0xd4))/0x2)+parseInt(_0x206355(0xc5))/0x3*(parseInt(_0x206355(0xbe))/0x4)+parseInt(_0x206355(0xd1))/0x5*(-parseInt(_0x206355(0xc4))/0x6)+-parseInt(_0x206355(0xc9))/0x7*(parseInt(_0x206355(0xba))/0x8)+parseInt(_0x206355(0xaf))/0x9+-parseInt(_0x206355(0xa5))/0xa*(-parseInt(_0x206355(0xb3))/0xb)+parseInt(_0x206355(0x9f))/0xc*(parseInt(_0x206355(0xde))/0xd);if(_0x68316a===_0x3f163e)break;else _0xe7278a['push'](_0xe7278a['shift']());}catch(_0x4da6d6){_0xe7278a['push'](_0xe7278a['shift']());}}}(a21_0x3de9,0xce206));import{existsSync,readFileSync}from'node:fs';function a21_0x2c3c(_0x2425d9,_0xae0754){_0x2425d9=_0x2425d9-0x98;const _0x3de9a2=a21_0x3de9();let _0x2c3c6a=_0x3de9a2[_0x2425d9];return _0x2c3c6a;}import{resolve,isAbsolute}from'node:path';import{createInterface}from'node:readline';import{CliErrors}from'../errors.js';function a21_0x3de9(){const _0x3e0393=['App\x20code\x20cannot\x20be\x20empty.','boolean','message','\x20\x20appcode:\x20','file','76921NKLSTi','removeListener','[y/N]','Aborted.','close','Imported\x20from\x20','[Y/n]','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`.','User\x20aborted\x20prompt','Initialized\x20','1716VaCoLf','question','apps','cwd','Source\x20file\x20not\x20found:\x20','join','1914490edEALW','):\x20','project','newConfigFileName','object','utf8','Write\x20to\x20global\x20(~/','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','\x20\x20default:\x20','validation','10459737mTrwxM','Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','env','cancelled','77dJkJFr','app','stdin','flagMissing','defaultApp','race','appcode','1549648PqMXHC','parse','\x20app\x20init\x20--appcode\x20<code>\x20[--env\x20daily]\x20[--global]','\x0aInitialized\x20','13372VKjTXS','apiDir','167445JTAKar','\x22.\x20Allowed:\x20','\x20\x20env:\x20\x20\x20\x20\x20','Failed\x20to\x20parse\x20source\x20file:\x20','7650078tauEwU','597zwzFAY','log','once','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','14CkcYCH',')\x20instead\x20of\x20project','\x20already\x20exists.\x20Overwrite?','string','trim','App\x20code','Skip\x20confirmation\x20when\x20overwriting','\x20init\x20—\x20Create\x20','5TLWnZE','global','SIGINT','18Bkctio','\x20\x20config:\x20\x20','entries','includes','yes'];a21_0x3de9=function(){return _0x3e0393;};return a21_0x3de9();}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':'string','description':'App\x20code\x20for\x20the\x20project'},{'name':a21_0x382402(0xb1),'type':a21_0x382402(0xcc),'description':'Target\x20environment\x20(default\x20'+DEFAULT_CONFIG_VALUES[a21_0x382402(0xb1)]+')','enum':[...RUNTIME_ENV_VALUES]},{'name':a21_0x382402(0xd2),'type':a21_0x382402(0xda),'description':a21_0x382402(0xab)+PRODUCT_CONFIG[a21_0x382402(0xa8)]+a21_0x382402(0xca),'default':![]},{'name':a21_0x382402(0xd8),'type':'boolean','description':'Skip\x20confirmation\x20when\x20overwriting','default':![]}];export const initImportFlagDefs=[{'name':'file','type':a21_0x382402(0xcc),'description':a21_0x382402(0xb0),'required':!![]},{'name':a21_0x382402(0xb9),'type':'string','description':'Override\x20imported\x20default\x20appcode'},{'name':a21_0x382402(0xb1),'type':a21_0x382402(0xcc),'description':'Override\x20imported\x20default\x20env','enum':[...RUNTIME_ENV_VALUES]},{'name':a21_0x382402(0xd2),'type':a21_0x382402(0xda),'description':'Write\x20to\x20global\x20(~/'+PRODUCT_CONFIG['newConfigFileName']+')\x20instead\x20of\x20project','default':![]},{'name':a21_0x382402(0xd8),'type':a21_0x382402(0xda),'description':a21_0x382402(0xcf),'default':![]}];export async function runInit(_0x3e15d8){const _0x29ec67=a21_0x382402,_0x1433b1=isNonInteractiveMode(_0x3e15d8),_0x328f61=_0x3e15d8['global']?_0x29ec67(0xd2):_0x29ec67(0xa7),_0x273534=resolveWriteConfigPath(_0x328f61);try{_0x1433b1?await runNonInteractive(_0x3e15d8,_0x273534):await runInteractive(_0x3e15d8,_0x273534);}catch(_0x10abe9){if(_0x10abe9 instanceof AbortPrompt)throw CliErrors[_0x29ec67(0xb2)]();throw _0x10abe9;}}export async function runInitImport(_0x1ba24e){const _0x15a2e5=a21_0x382402,_0x94d38e=_0x1ba24e['global']?_0x15a2e5(0xd2):_0x15a2e5(0xa7),_0x33f4c8=resolveWriteConfigPath(_0x94d38e);await runFromImport(_0x1ba24e,_0x33f4c8);}const RUNTIME_IRRELEVANT_KEYS=new Set([a21_0x382402(0xbf)]);async function runFromImport(_0x52b884,_0x36b701){const _0x4a3571=a21_0x382402,_0x4c96e1=resolveFilePath(_0x52b884[_0x4a3571(0xdd)]);if(!existsSync(_0x4c96e1))throw CliErrors[_0x4a3571(0xae)](_0x4a3571(0xa3)+_0x4c96e1);const _0x2398ac=readSourceFile(_0x4c96e1),_0x452acb=convertToRuntimeConfig(_0x2398ac);_0x52b884[_0x4a3571(0xb9)]&&(_0x452acb[_0x4a3571(0xb9)]=String(_0x52b884['appcode']));_0x52b884[_0x4a3571(0xb1)]&&(_0x452acb[_0x4a3571(0xb1)]=resolveInitEnv(_0x52b884));if(!_0x452acb[_0x4a3571(0xb9)])throw CliErrors[_0x4a3571(0xae)](_0x4a3571(0xc8),_0x4a3571(0x9c));await writeInitConfig(_0x36b701,_0x452acb,_0x52b884),console['log'](_0x4a3571(0x9a)+_0x4c96e1),console['log'](_0x4a3571(0xd5)+_0x36b701),console[_0x4a3571(0xc6)](_0x4a3571(0xdc)+_0x452acb['appcode']);if(_0x452acb['defaultApp'])console[_0x4a3571(0xc6)](_0x4a3571(0xad)+_0x452acb[_0x4a3571(0xb7)]);}function convertToRuntimeConfig(_0x4b1453){const _0x246bba=a21_0x382402;if(_0x4b1453['apps']&&typeof _0x4b1453[_0x246bba(0xa1)]===_0x246bba(0xa9))throw CliErrors[_0x246bba(0xae)]('Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.',_0x246bba(0xac));const _0x1b9c39={};for(const _0x499586 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x4b1453[_0x499586]!==undefined&&(_0x1b9c39[_0x499586]=_0x4b1453[_0x499586]);}return!_0x1b9c39['riskLevel']&&(_0x1b9c39['riskLevel']=DEFAULT_CONFIG_VALUES['riskLevel']),_0x1b9c39;}async function runNonInteractive(_0x2ce22d,_0x136287){const _0xa470d=a21_0x382402,_0x212e9d=_0x2ce22d['appcode'];if(!_0x212e9d)throw CliErrors[_0xa470d(0xb6)](_0xa470d(0xb9),'Usage:\x20'+CLI_BIN_NAME+_0xa470d(0xbc));const _0x391d28=resolveInitEnv(_0x2ce22d);await writeInitConfig(_0x136287,{'appcode':_0x212e9d,'env':_0x391d28},_0x2ce22d),console[_0xa470d(0xc6)](_0xa470d(0x9e)+_0x136287),console[_0xa470d(0xc6)](_0xa470d(0xdc)+_0x212e9d),console[_0xa470d(0xc6)](_0xa470d(0xc2)+_0x391d28);}async function runInteractive(_0x399b9a,_0x5bb8b3){const _0x1238c7=a21_0x382402,_0xc55773=loadExisting(_0x5bb8b3),_0x110fcd=typeof _0xc55773?.[_0x1238c7(0xb9)]===_0x1238c7(0xcc)?_0xc55773[_0x1238c7(0xb9)]:'',_0x2b6549=resolveInitEnv(_0x399b9a);console['log'](CLI_BIN_NAME+_0x1238c7(0xd0)+PRODUCT_CONFIG[_0x1238c7(0xa8)]+'\x0a');if(existsSync(_0x5bb8b3)&&!_0x399b9a[_0x1238c7(0xd8)]){const _0x12c6d3=await promptYesNo('File\x20'+_0x5bb8b3+_0x1238c7(0xcb),![]);if(!_0x12c6d3){console[_0x1238c7(0xc6)](_0x1238c7(0x98));return;}}const _0x153eb4=typeof _0x399b9a['appcode']===_0x1238c7(0xcc)?_0x399b9a[_0x1238c7(0xb9)][_0x1238c7(0xcd)]():'';let _0x11eb3a=_0x153eb4;!_0x11eb3a&&(_0x11eb3a=await promptInput(_0x1238c7(0xce),_0x110fcd));if(!_0x11eb3a[_0x1238c7(0xcd)]())throw CliErrors['validation'](_0x1238c7(0xd9));await writeInitConfig(_0x5bb8b3,{'appcode':_0x11eb3a[_0x1238c7(0xcd)](),'env':_0x2b6549},_0x399b9a),console[_0x1238c7(0xc6)](_0x1238c7(0xbd)+_0x5bb8b3),console[_0x1238c7(0xc6)]('\x20\x20appcode:\x20'+_0x11eb3a[_0x1238c7(0xcd)]()),console['log'](_0x1238c7(0xc2)+_0x2b6549);}async function writeInitConfig(_0x42bf73,_0x46b17b,_0x535294){const _0x37c529=a21_0x382402;let _0x3ae68d={};existsSync(_0x42bf73)&&!_0x535294['yes']&&(_0x3ae68d=readConfigFile(_0x42bf73));for(const [_0x499e83,_0x200344]of Object[_0x37c529(0xd6)](_0x46b17b)){_0x200344!==undefined&&(_0x3ae68d[_0x499e83]=_0x200344);}if(_0x3ae68d[_0x37c529(0xb4)])delete _0x3ae68d['app'];writeConfigFile(_0x42bf73,_0x3ae68d);}class AbortPrompt extends Error{constructor(){const _0x54f968=a21_0x382402;super(_0x54f968(0x9d)),this['name']='AbortPrompt';}}function createSafeRl(){const _0x45136f=a21_0x382402,_0x1e3bbc=createInterface({'input':process[_0x45136f(0xb5)],'output':process['stdout']});let _0xffe34a;const _0x355fb9=new Promise((_0x17f52b,_0x247eee)=>{const _0x4be5a6=_0x45136f;_0xffe34a=()=>{const _0xb668a4=a21_0x2c3c;_0xffe34a&&(_0x1e3bbc['removeListener']('SIGINT',_0xffe34a),_0xffe34a=undefined);try{_0x1e3bbc[_0xb668a4(0x99)]();}catch{}_0x247eee(new AbortPrompt());},_0x1e3bbc[_0x4be5a6(0xc7)](_0x4be5a6(0xd3),_0xffe34a);}),_0x122b8d=()=>{const _0x17cd4d=_0x45136f;_0xffe34a&&(_0x1e3bbc[_0x17cd4d(0xdf)]('SIGINT',_0xffe34a),_0xffe34a=undefined);try{_0x1e3bbc[_0x17cd4d(0x99)]();}catch{}};return{'rl':_0x1e3bbc,'abortPromise':_0x355fb9,'disposeSuccess':_0x122b8d};}async function promptInput(_0x468811,_0x4054d6){const _0x41e7e0=a21_0x382402,{rl:_0x4df96c,abortPromise:_0x287ff8,disposeSuccess:_0x26ce1d}=createSafeRl(),_0x39aef2=new Promise(_0x190868=>{const _0x5241c6=a21_0x2c3c,_0x1c6c5c=_0x4054d6?'\x20\x20'+_0x468811+'\x20('+_0x4054d6+_0x5241c6(0xa6):'\x20\x20'+_0x468811+':\x20';_0x4df96c[_0x5241c6(0xa0)](_0x1c6c5c,_0x94d1ba=>{const _0x283e7a=_0x5241c6;_0x26ce1d(),_0x190868(_0x94d1ba[_0x283e7a(0xcd)]()||_0x4054d6);});});return Promise[_0x41e7e0(0xb8)]([_0x39aef2,_0x287ff8]);}async function promptYesNo(_0x4cb34f,_0xd83184){const {rl:_0x1ceaff,abortPromise:_0x49afca,disposeSuccess:_0xdbbed2}=createSafeRl(),_0x569619=new Promise(_0xc2b826=>{const _0x3509da=a21_0x2c3c,_0x4b66aa=_0xd83184?_0x3509da(0x9b):_0x3509da(0xe0);_0x1ceaff[_0x3509da(0xa0)]('\x20\x20'+_0x4cb34f+'\x20'+_0x4b66aa+':\x20',_0x4fe291=>{const _0x26a56f=_0x3509da;_0xdbbed2();const _0x3e6eaf=_0x4fe291[_0x26a56f(0xcd)]()['toLowerCase']();if(_0x3e6eaf==='y'||_0x3e6eaf===_0x26a56f(0xd8))_0xc2b826(!![]);else{if(_0x3e6eaf==='n'||_0x3e6eaf==='no')_0xc2b826(![]);else _0xc2b826(_0xd83184);}});});return Promise['race']([_0x569619,_0x49afca]);}function loadExisting(_0x4c143a){if(!existsSync(_0x4c143a))return null;return readConfigFile(_0x4c143a);}function resolveFilePath(_0x59dd75){const _0x12bd61=a21_0x382402;return isAbsolute(_0x59dd75)?_0x59dd75:resolve(process[_0x12bd61(0xa2)](),_0x59dd75);}function readSourceFile(_0x498cf7){const _0x2cf673=a21_0x382402;try{const _0x357693=readFileSync(_0x498cf7,{'encoding':_0x2cf673(0xaa)});return JSON[_0x2cf673(0xbb)](_0x357693);}catch(_0x9b6b45){throw CliErrors[_0x2cf673(0xae)](_0x2cf673(0xc3)+_0x9b6b45[_0x2cf673(0xdb)]);}}function resolveInitEnv(_0xf1f657){const _0x4692c9=a21_0x382402,_0x5e41b2=_0xf1f657['env'];if(_0x5e41b2===undefined||_0x5e41b2==='')return DEFAULT_CONFIG_VALUES[_0x4692c9(0xb1)];if(!RUNTIME_ENV_VALUES[_0x4692c9(0xd7)](_0x5e41b2))throw CliErrors[_0x4692c9(0xae)]('Invalid\x20env\x20\x22'+_0x5e41b2+_0x4692c9(0xc1)+RUNTIME_ENV_VALUES[_0x4692c9(0xa4)](',\x20'));return _0x5e41b2;}
1
+ const a21_0x88f0aa=a21_0x487c;(function(_0x4222d1,_0x442700){const _0x2258b0=a21_0x487c,_0x36e644=_0x4222d1();while(!![]){try{const _0x2604d0=-parseInt(_0x2258b0(0x193))/0x1*(parseInt(_0x2258b0(0x16c))/0x2)+-parseInt(_0x2258b0(0x171))/0x3*(-parseInt(_0x2258b0(0x16a))/0x4)+parseInt(_0x2258b0(0x1a8))/0x5*(-parseInt(_0x2258b0(0x1b1))/0x6)+-parseInt(_0x2258b0(0x17e))/0x7*(parseInt(_0x2258b0(0x1b0))/0x8)+-parseInt(_0x2258b0(0x172))/0x9*(-parseInt(_0x2258b0(0x169))/0xa)+-parseInt(_0x2258b0(0x199))/0xb+parseInt(_0x2258b0(0x16d))/0xc;if(_0x2604d0===_0x442700)break;else _0x36e644['push'](_0x36e644['shift']());}catch(_0x301e15){_0x36e644['push'](_0x36e644['shift']());}}}(a21_0x186f,0xe7865));import{existsSync,readFileSync}from'node:fs';import{resolve,isAbsolute}from'node:path';import{createInterface}from'node:readline';function a21_0x487c(_0x3c1ae8,_0x30de11){_0x3c1ae8=_0x3c1ae8-0x165;const _0x186f1f=a21_0x186f();let _0x487cf7=_0x186f1f[_0x3c1ae8];return _0x487cf7;}import{CliErrors}from'../errors.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';import{IMPORTABLE_RUNTIME_CONFIG_KEYS}from'../config/schema.js';import{resolveWriteConfigPath,readConfigFile,writeConfigFile,isNonInteractiveMode}from'../context.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{PRODUCT_CONFIG}from'../constant/product.js';export const initCreateFlagDefs=[{'name':a21_0x88f0aa(0x1ae),'type':a21_0x88f0aa(0x165),'description':a21_0x88f0aa(0x1a7)},{'name':a21_0x88f0aa(0x16b),'type':'string','description':a21_0x88f0aa(0x1a2)+DEFAULT_CONFIG_VALUES[a21_0x88f0aa(0x16b)]+')','enum':[...RUNTIME_ENV_VALUES]},{'name':'global','type':'boolean','description':a21_0x88f0aa(0x179)+PRODUCT_CONFIG[a21_0x88f0aa(0x176)]+a21_0x88f0aa(0x1a1),'default':![]},{'name':a21_0x88f0aa(0x1a6),'type':a21_0x88f0aa(0x177),'description':a21_0x88f0aa(0x196),'default':![]}];function a21_0x186f(){const _0x2d2202=['log','cwd','Invalid\x20env\x20\x22','\x0aInitialized\x20','Usage:\x20','\x22.\x20Allowed:\x20','Imported\x20from\x20','\x20\x20default:\x20','object','Initialized\x20','stdout','\x20\x20env:\x20\x20\x20\x20\x20','\x20\x20appcode:\x20','App\x20code','project','1VIUtvy','):\x20','\x20app\x20init\x20--appcode\x20<code>\x20[--env\x20daily]\x20[--global]','Skip\x20confirmation\x20when\x20overwriting','SIGINT','\x20\x20config:\x20\x20','781781SluDmU','file','Failed\x20to\x20parse\x20source\x20file:\x20','apiDir','entries','apps','validation','\x20already\x20exists.\x20Overwrite?',')\x20instead\x20of\x20project','Target\x20environment\x20(default\x20','includes','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','removeListener','yes','App\x20code\x20for\x20the\x20project','1736905LAWOlk','Aborted.','parse','name','riskLevel','utf8','appcode','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','4221064UEjWKs','18ErCTbm','[Y/n]','string','question','flagMissing','Source\x20file\x20not\x20found:\x20','12716520ccWCZb','28hFarxj','env','3696306OIKyng','47332764oVVimr','\x20init\x20—\x20Create\x20','toLowerCase','Override\x20imported\x20default\x20env','118518ksuJGO','9hIjztz','File\x20','trim','User\x20aborted\x20prompt','newConfigFileName','boolean','message','Write\x20to\x20global\x20(~/','race','once','global','AbortPrompt','21XTrrkC','defaultApp','close','Override\x20imported\x20default\x20appcode','cancelled','Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.'];a21_0x186f=function(){return _0x2d2202;};return a21_0x186f();}export const initImportFlagDefs=[{'name':a21_0x88f0aa(0x19a),'type':a21_0x88f0aa(0x165),'description':'Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','required':!![]},{'name':a21_0x88f0aa(0x1ae),'type':a21_0x88f0aa(0x165),'description':a21_0x88f0aa(0x181)},{'name':a21_0x88f0aa(0x16b),'type':a21_0x88f0aa(0x165),'description':a21_0x88f0aa(0x170),'enum':[...RUNTIME_ENV_VALUES]},{'name':a21_0x88f0aa(0x17c),'type':'boolean','description':'Write\x20to\x20global\x20(~/'+PRODUCT_CONFIG[a21_0x88f0aa(0x176)]+a21_0x88f0aa(0x1a1),'default':![]},{'name':'yes','type':a21_0x88f0aa(0x177),'description':a21_0x88f0aa(0x196),'default':![]}];export async function runInit(_0xd25e20){const _0x36bc09=a21_0x88f0aa,_0x256d3a=isNonInteractiveMode(_0xd25e20),_0x4666ca=_0xd25e20['global']?_0x36bc09(0x17c):_0x36bc09(0x192),_0x35e017=resolveWriteConfigPath(_0x4666ca);try{_0x256d3a?await runNonInteractive(_0xd25e20,_0x35e017):await runInteractive(_0xd25e20,_0x35e017);}catch(_0x498196){if(_0x498196 instanceof AbortPrompt)throw CliErrors[_0x36bc09(0x182)]();throw _0x498196;}}export async function runInitImport(_0x4ed358){const _0x1d97a8=a21_0x88f0aa,_0x4116e1=_0x4ed358['global']?_0x1d97a8(0x17c):_0x1d97a8(0x192),_0x1c5fff=resolveWriteConfigPath(_0x4116e1);await runFromImport(_0x4ed358,_0x1c5fff);}const RUNTIME_IRRELEVANT_KEYS=new Set([a21_0x88f0aa(0x19c)]);async function runFromImport(_0x1b4dbd,_0x404958){const _0x113755=a21_0x88f0aa,_0xe4cfe8=resolveFilePath(_0x1b4dbd['file']);if(!existsSync(_0xe4cfe8))throw CliErrors['validation'](_0x113755(0x168)+_0xe4cfe8);const _0x83cc1e=readSourceFile(_0xe4cfe8),_0x5cd805=convertToRuntimeConfig(_0x83cc1e);_0x1b4dbd['appcode']&&(_0x5cd805[_0x113755(0x1ae)]=String(_0x1b4dbd[_0x113755(0x1ae)]));_0x1b4dbd[_0x113755(0x16b)]&&(_0x5cd805[_0x113755(0x16b)]=resolveInitEnv(_0x1b4dbd));if(!_0x5cd805[_0x113755(0x1ae)])throw CliErrors[_0x113755(0x19f)](_0x113755(0x1a4),'Provide\x20--appcode\x20<code>\x20or\x20use\x20an\x20upgraded\x20.rabetbase.json\x20with\x20top-level\x20appcode.\x20Legacy\x20files\x20must\x20be\x20upgraded\x20first\x20with\x20`rabetbase\x20project\x20upgrade`.');await writeInitConfig(_0x404958,_0x5cd805,_0x1b4dbd),console['log'](_0x113755(0x18a)+_0xe4cfe8),console['log'](_0x113755(0x198)+_0x404958),console['log'](_0x113755(0x190)+_0x5cd805[_0x113755(0x1ae)]);if(_0x5cd805[_0x113755(0x17f)])console[_0x113755(0x184)](_0x113755(0x18b)+_0x5cd805[_0x113755(0x17f)]);}function convertToRuntimeConfig(_0xaa168a){const _0x444edf=a21_0x88f0aa;if(_0xaa168a[_0x444edf(0x19e)]&&typeof _0xaa168a[_0x444edf(0x19e)]===_0x444edf(0x18c))throw CliErrors[_0x444edf(0x19f)](_0x444edf(0x183),_0x444edf(0x1af));const _0x3231db={};for(const _0x19a631 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0xaa168a[_0x19a631]!==undefined&&(_0x3231db[_0x19a631]=_0xaa168a[_0x19a631]);}return!_0x3231db[_0x444edf(0x1ac)]&&(_0x3231db[_0x444edf(0x1ac)]=DEFAULT_CONFIG_VALUES['riskLevel']),_0x3231db;}async function runNonInteractive(_0x3e7416,_0x584f28){const _0x3f0c8d=a21_0x88f0aa,_0x558328=_0x3e7416['appcode'];if(!_0x558328)throw CliErrors[_0x3f0c8d(0x167)](_0x3f0c8d(0x1ae),_0x3f0c8d(0x188)+CLI_BIN_NAME+_0x3f0c8d(0x195));const _0x2e901d=resolveInitEnv(_0x3e7416);await writeInitConfig(_0x584f28,{'appcode':_0x558328,'env':_0x2e901d},_0x3e7416),console[_0x3f0c8d(0x184)](_0x3f0c8d(0x18d)+_0x584f28),console[_0x3f0c8d(0x184)]('\x20\x20appcode:\x20'+_0x558328),console['log']('\x20\x20env:\x20\x20\x20\x20\x20'+_0x2e901d);}async function runInteractive(_0xbe455b,_0x1f905a){const _0x2766a2=a21_0x88f0aa,_0x58bc3a=loadExisting(_0x1f905a),_0x28e996=typeof _0x58bc3a?.[_0x2766a2(0x1ae)]===_0x2766a2(0x165)?_0x58bc3a[_0x2766a2(0x1ae)]:'',_0x9f7a16=resolveInitEnv(_0xbe455b);console[_0x2766a2(0x184)](CLI_BIN_NAME+_0x2766a2(0x16e)+PRODUCT_CONFIG[_0x2766a2(0x176)]+'\x0a');if(existsSync(_0x1f905a)&&!_0xbe455b['yes']){const _0x52c3bf=await promptYesNo(_0x2766a2(0x173)+_0x1f905a+_0x2766a2(0x1a0),![]);if(!_0x52c3bf){console[_0x2766a2(0x184)](_0x2766a2(0x1a9));return;}}const _0x3be523=typeof _0xbe455b[_0x2766a2(0x1ae)]===_0x2766a2(0x165)?_0xbe455b[_0x2766a2(0x1ae)][_0x2766a2(0x174)]():'';let _0x52db89=_0x3be523;!_0x52db89&&(_0x52db89=await promptInput(_0x2766a2(0x191),_0x28e996));if(!_0x52db89['trim']())throw CliErrors[_0x2766a2(0x19f)]('App\x20code\x20cannot\x20be\x20empty.');await writeInitConfig(_0x1f905a,{'appcode':_0x52db89[_0x2766a2(0x174)](),'env':_0x9f7a16},_0xbe455b),console['log'](_0x2766a2(0x187)+_0x1f905a),console[_0x2766a2(0x184)](_0x2766a2(0x190)+_0x52db89[_0x2766a2(0x174)]()),console[_0x2766a2(0x184)](_0x2766a2(0x18f)+_0x9f7a16);}async function writeInitConfig(_0x159478,_0x7d39a,_0x28775f){const _0x5b049c=a21_0x88f0aa;let _0x68e5e={};existsSync(_0x159478)&&!_0x28775f[_0x5b049c(0x1a6)]&&(_0x68e5e=readConfigFile(_0x159478));for(const [_0x439fd3,_0x1de551]of Object[_0x5b049c(0x19d)](_0x7d39a)){_0x1de551!==undefined&&(_0x68e5e[_0x439fd3]=_0x1de551);}if(_0x68e5e['app'])delete _0x68e5e['app'];writeConfigFile(_0x159478,_0x68e5e);}class AbortPrompt extends Error{constructor(){const _0xe426d4=a21_0x88f0aa;super(_0xe426d4(0x175)),this[_0xe426d4(0x1ab)]=_0xe426d4(0x17d);}}function createSafeRl(){const _0xe718d2=a21_0x88f0aa,_0xb2fe25=createInterface({'input':process['stdin'],'output':process[_0xe718d2(0x18e)]});let _0x39c362;const _0x1c14c7=new Promise((_0x5b1397,_0x118c4d)=>{const _0x542718=_0xe718d2;_0x39c362=()=>{const _0x2abd44=a21_0x487c;_0x39c362&&(_0xb2fe25[_0x2abd44(0x1a5)](_0x2abd44(0x197),_0x39c362),_0x39c362=undefined);try{_0xb2fe25[_0x2abd44(0x180)]();}catch{}_0x118c4d(new AbortPrompt());},_0xb2fe25[_0x542718(0x17b)](_0x542718(0x197),_0x39c362);}),_0x5712af=()=>{const _0x152100=_0xe718d2;_0x39c362&&(_0xb2fe25[_0x152100(0x1a5)](_0x152100(0x197),_0x39c362),_0x39c362=undefined);try{_0xb2fe25['close']();}catch{}};return{'rl':_0xb2fe25,'abortPromise':_0x1c14c7,'disposeSuccess':_0x5712af};}async function promptInput(_0x3dde0b,_0x204a2d){const _0x1bf4d4=a21_0x88f0aa,{rl:_0xe4f649,abortPromise:_0x3d1185,disposeSuccess:_0x98c2bd}=createSafeRl(),_0x351034=new Promise(_0x50afbf=>{const _0x549243=a21_0x487c,_0x4f43c8=_0x204a2d?'\x20\x20'+_0x3dde0b+'\x20('+_0x204a2d+_0x549243(0x194):'\x20\x20'+_0x3dde0b+':\x20';_0xe4f649[_0x549243(0x166)](_0x4f43c8,_0x3cb271=>{const _0x32f56c=_0x549243;_0x98c2bd(),_0x50afbf(_0x3cb271[_0x32f56c(0x174)]()||_0x204a2d);});});return Promise[_0x1bf4d4(0x17a)]([_0x351034,_0x3d1185]);}async function promptYesNo(_0x14d84b,_0x461bc3){const _0x57ba00=a21_0x88f0aa,{rl:_0xe88aff,abortPromise:_0x531e7e,disposeSuccess:_0x1ad1bb}=createSafeRl(),_0x575c1e=new Promise(_0x4c6c5d=>{const _0x5bfa0e=a21_0x487c,_0x57e551=_0x461bc3?_0x5bfa0e(0x1b2):'[y/N]';_0xe88aff[_0x5bfa0e(0x166)]('\x20\x20'+_0x14d84b+'\x20'+_0x57e551+':\x20',_0x3db8d9=>{const _0x38297f=_0x5bfa0e;_0x1ad1bb();const _0x6150b4=_0x3db8d9[_0x38297f(0x174)]()[_0x38297f(0x16f)]();if(_0x6150b4==='y'||_0x6150b4===_0x38297f(0x1a6))_0x4c6c5d(!![]);else{if(_0x6150b4==='n'||_0x6150b4==='no')_0x4c6c5d(![]);else _0x4c6c5d(_0x461bc3);}});});return Promise[_0x57ba00(0x17a)]([_0x575c1e,_0x531e7e]);}function loadExisting(_0x261093){if(!existsSync(_0x261093))return null;return readConfigFile(_0x261093);}function resolveFilePath(_0xda675f){const _0x1c8b6f=a21_0x88f0aa;return isAbsolute(_0xda675f)?_0xda675f:resolve(process[_0x1c8b6f(0x185)](),_0xda675f);}function readSourceFile(_0x5bc266){const _0x85737c=a21_0x88f0aa;try{const _0x259b32=readFileSync(_0x5bc266,{'encoding':_0x85737c(0x1ad)});return JSON[_0x85737c(0x1aa)](_0x259b32);}catch(_0x5de215){throw CliErrors['validation'](_0x85737c(0x19b)+_0x5de215[_0x85737c(0x178)]);}}function resolveInitEnv(_0x513412){const _0x5e50bb=a21_0x88f0aa,_0x51114c=_0x513412[_0x5e50bb(0x16b)];if(_0x51114c===undefined||_0x51114c==='')return DEFAULT_CONFIG_VALUES[_0x5e50bb(0x16b)];if(!RUNTIME_ENV_VALUES[_0x5e50bb(0x1a3)](_0x51114c))throw CliErrors[_0x5e50bb(0x19f)](_0x5e50bb(0x186)+_0x51114c+_0x5e50bb(0x189)+RUNTIME_ENV_VALUES['join'](',\x20'));return _0x51114c;}
@@ -1 +1 @@
1
- function a22_0x58af(_0x1adc6d,_0x533a17){_0x1adc6d=_0x1adc6d-0x1cc;const _0x5105e3=a22_0x5105();let _0x58af65=_0x5105e3[_0x1adc6d];return _0x58af65;}const a22_0xd97cf5=a22_0x58af;(function(_0x5144d1,_0x5f2435){const _0x38a860=a22_0x58af,_0x3fcc31=_0x5144d1();while(!![]){try{const _0x5b532c=parseInt(_0x38a860(0x206))/0x1*(-parseInt(_0x38a860(0x204))/0x2)+parseInt(_0x38a860(0x20e))/0x3+-parseInt(_0x38a860(0x1e6))/0x4+-parseInt(_0x38a860(0x1d2))/0x5+parseInt(_0x38a860(0x207))/0x6*(-parseInt(_0x38a860(0x1ee))/0x7)+parseInt(_0x38a860(0x1f3))/0x8*(-parseInt(_0x38a860(0x209))/0x9)+parseInt(_0x38a860(0x1fd))/0xa*(parseInt(_0x38a860(0x202))/0xb);if(_0x5b532c===_0x5f2435)break;else _0x3fcc31['push'](_0x3fcc31['shift']());}catch(_0x39de0c){_0x3fcc31['push'](_0x3fcc31['shift']());}}}(a22_0x5105,0x703bc));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';function a22_0x5105(){const _0x42dc7a=['number','isFinite','userId','topk','3274855QpVAUz','file','Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20','scope','Search\x20visible\x20company\x20and\x20personal\x20knowledge\x20base\x20content','write','Create\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','list','Personal\x20knowledge-base\x20entry\x20ID','docId','weightedScore','Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22','num','--topk\x20must\x20be\x20a\x20positive\x20number.','description','Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file','trim','Updated\x20KB\x20entry\x20','/client/knowledge-base/personal/create','Override\x20the\x20existing\x20entry\x20title','387684EzEvvq','/update','flag','validation','Created\x20KB\x20entry\x20','verbose','File\x20not\x20found:\x20','File\x20path\x20is\x20required.','14GPrDTP','build','body','read','Search\x20query\x20is\x20required.','40GnWLGL','detail','appCode','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','Personal\x20knowledge-base\x20entry\x20title','score','ragErrorMessage','Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','POST','query','3191590XoDAUc','create','ragStatus','map','bool','88Xpjhkv','str','582LJQHYJ','title','177UzTReZ','1598736pUSdOp','File\x20is\x20not\x20a\x20regular\x20file:\x20','1539459BJfCqX','Update\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','content','string','utf8','294006UqIMay','length','version','search'];a22_0x5105=function(){return _0x42dc7a;};return a22_0x5105();}import{dryRun}from'../../framework/dryrun.js';const TITLE_FLAG={'name':a22_0xd97cf5(0x205),'type':a22_0xd97cf5(0x20c),'required':!![],'description':a22_0xd97cf5(0x1f7)},FILE_FLAG={'name':'file','type':a22_0xd97cf5(0x20c),'required':!![],'description':a22_0xd97cf5(0x1e1)},QUERY_FLAG={'name':'query','type':'string','required':!![],'description':'Search\x20query\x20for\x20visible\x20company\x20and\x20personal\x20knowledge'},TOPK_FLAG={'name':'topk','type':a22_0xd97cf5(0x1ce),'description':a22_0xd97cf5(0x1f6)};function readKnowledgeFile(_0x41adc3){const _0x43412b=a22_0xd97cf5;if(!_0x41adc3)throw CliErrors['validation'](_0x43412b(0x1ed));if(!existsSync(_0x41adc3))throw CliErrors[_0x43412b(0x1e9)](_0x43412b(0x1ec)+_0x41adc3);if(!statSync(_0x41adc3)['isFile']())throw CliErrors['validation'](_0x43412b(0x208)+_0x41adc3);return readFileSync(_0x41adc3,_0x43412b(0x20d));}function summarizePersonalItem(_0x1c5849){const _0x2422bb=a22_0xd97cf5;return{'id':_0x1c5849['id'],'title':_0x1c5849['title'],'version':_0x1c5849[_0x2422bb(0x1cc)],'ragStatus':_0x1c5849['ragStatus'],'ragErrorMessage':_0x1c5849['ragErrorMessage'],'updateTime':_0x1c5849['updateTime']};}function detailPersonalItem(_0x4dcf1b){const _0x53957d=a22_0xd97cf5;return{'id':_0x4dcf1b['id'],'appCode':_0x4dcf1b[_0x53957d(0x1f5)],'scope':_0x4dcf1b[_0x53957d(0x1d5)],'userId':_0x4dcf1b[_0x53957d(0x1d0)],'title':_0x4dcf1b['title'],'content':_0x4dcf1b['content']??'','version':_0x4dcf1b['version'],'ragStatus':_0x4dcf1b[_0x53957d(0x1ff)],'ragErrorMessage':_0x4dcf1b[_0x53957d(0x1f9)],'createTime':_0x4dcf1b['createTime'],'updateTime':_0x4dcf1b['updateTime']};}function summarizeSearchHit(_0x28725f){const _0x145094=a22_0xd97cf5;return{'scope':_0x28725f[_0x145094(0x1d5)],'docId':_0x28725f[_0x145094(0x1db)],'score':_0x28725f[_0x145094(0x1f8)],'weightedScore':_0x28725f[_0x145094(0x1dc)],'content':_0x28725f[_0x145094(0x20b)],'metadata':_0x28725f['metadata']};}function readTopK(_0x580ac5){const _0x306875=a22_0xd97cf5,_0x2dc021=_0x580ac5[_0x306875(0x1e8)](_0x306875(0x1d1));if(_0x2dc021===undefined||_0x2dc021===null||_0x2dc021==='')return undefined;const _0xc86811=_0x580ac5['num'](_0x306875(0x1d1));if(!Number[_0x306875(0x1cf)](_0xc86811)||_0xc86811<0x1)throw CliErrors[_0x306875(0x1e9)](_0x306875(0x1df));return _0xc86811;}const kbList={'service':'kb','command':a22_0xd97cf5(0x1d9),'description':'List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','risk':a22_0xd97cf5(0x1f1),'flags':[VERBOSE_FLAG],async 'execute'(_0x1f3331){const _0x777ed7=a22_0xd97cf5,_0x37def2=await listPersonalKnowledgeBaseItems(_0x1f3331['appCode']);if(_0x1f3331[_0x777ed7(0x201)](_0x777ed7(0x1eb)))return{'ok':!![],'data':{'total':_0x37def2['length'],'items':_0x37def2}};return{'ok':!![],'data':{'total':_0x37def2[_0x777ed7(0x20f)],'items':_0x37def2[_0x777ed7(0x200)](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':a22_0xd97cf5(0x1f4),'description':a22_0xd97cf5(0x1fa),'risk':a22_0xd97cf5(0x1f1),'flags':[{...ID_FLAG,'description':'Personal\x20knowledge-base\x20entry\x20ID'}],async 'execute'(_0x38a6dc){const _0x20f247=a22_0xd97cf5,_0x2c8a1d=await getPersonalKnowledgeBaseItem(_0x38a6dc[_0x20f247(0x1de)]('id'),_0x38a6dc[_0x20f247(0x1f5)]);return{'ok':!![],'data':detailPersonalItem(_0x2c8a1d)};}},kbCreate={'service':'kb','command':a22_0xd97cf5(0x1fe),'description':a22_0xd97cf5(0x1d8),'risk':a22_0xd97cf5(0x1d7),'flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x52d574){const _0x40f478=a22_0xd97cf5,_0x23b5d4=_0x52d574[_0x40f478(0x203)](_0x40f478(0x205)),_0x57468d=readKnowledgeFile(_0x52d574[_0x40f478(0x203)](_0x40f478(0x1d3))),_0x303b05=await createPersonalKnowledgeBaseItem(_0x52d574[_0x40f478(0x1f5)],{'title':_0x23b5d4,'content':_0x57468d});return{'ok':!![],'data':summarizePersonalItem(_0x303b05),'message':_0x40f478(0x1ea)+_0x303b05['id']+'\x20('+_0x303b05['title']+')'};},async 'dryRun'(_0x1c8915){const _0xe78d8e=a22_0xd97cf5,_0x23b5cc=_0x1c8915[_0xe78d8e(0x203)](_0xe78d8e(0x205)),_0x397e65=readKnowledgeFile(_0x1c8915[_0xe78d8e(0x203)](_0xe78d8e(0x1d3)));return dryRun(_0xe78d8e(0x1fb),_0xe78d8e(0x1e4))[_0xe78d8e(0x1f0)]({'appCode':_0x1c8915[_0xe78d8e(0x1f5)],'title':_0x23b5cc,'content':_0x397e65})[_0xe78d8e(0x1e0)](_0xe78d8e(0x1dd)+_0x23b5cc+'\x22')[_0xe78d8e(0x1ef)]();}},kbUpdate={'service':'kb','command':'update','description':a22_0xd97cf5(0x20a),'risk':a22_0xd97cf5(0x1d7),'flags':[{...ID_FLAG,'description':a22_0xd97cf5(0x1da)},{...TITLE_FLAG,'required':![],'description':a22_0xd97cf5(0x1e5)},FILE_FLAG],async 'execute'(_0x5f01a9){const _0x5f1f9e=a22_0xd97cf5,_0x1031f2=_0x5f01a9['num']('id'),_0x215474=readKnowledgeFile(_0x5f01a9[_0x5f1f9e(0x203)](_0x5f1f9e(0x1d3))),_0x5ca683=_0x5f01a9[_0x5f1f9e(0x203)](_0x5f1f9e(0x205))||(await getPersonalKnowledgeBaseItem(_0x1031f2,_0x5f01a9[_0x5f1f9e(0x1f5)]))[_0x5f1f9e(0x205)],_0x422c29=await updatePersonalKnowledgeBaseItem(_0x1031f2,_0x5f01a9[_0x5f1f9e(0x1f5)],{'title':_0x5ca683,'content':_0x215474});return{'ok':!![],'data':summarizePersonalItem(_0x422c29),'message':_0x5f1f9e(0x1e3)+_0x422c29['id']+'\x20('+_0x422c29[_0x5f1f9e(0x205)]+')'};},async 'dryRun'(_0x479d17){const _0x3341c4=a22_0xd97cf5,_0x26f907=_0x479d17[_0x3341c4(0x1de)]('id'),_0x44306d=readKnowledgeFile(_0x479d17[_0x3341c4(0x203)](_0x3341c4(0x1d3))),_0x2a1d43=_0x479d17[_0x3341c4(0x203)](_0x3341c4(0x205))||(await getPersonalKnowledgeBaseItem(_0x26f907,_0x479d17[_0x3341c4(0x1f5)]))[_0x3341c4(0x205)];return dryRun('POST','/client/knowledge-base/personal/'+_0x26f907+_0x3341c4(0x1e7))[_0x3341c4(0x1f0)]({'appCode':_0x479d17[_0x3341c4(0x1f5)],'title':_0x2a1d43,'content':_0x44306d})[_0x3341c4(0x1e0)](_0x3341c4(0x1d4)+_0x26f907)[_0x3341c4(0x1ef)]();}},kbSearch={'service':'kb','command':a22_0xd97cf5(0x1cd),'description':a22_0xd97cf5(0x1d6),'risk':'read','flags':[QUERY_FLAG,TOPK_FLAG],async 'validate'(_0x3412f1){const _0x33e29d=a22_0xd97cf5;if(!_0x3412f1['str'](_0x33e29d(0x1fc))[_0x33e29d(0x1e2)]())throw CliErrors[_0x33e29d(0x1e9)](_0x33e29d(0x1f2));readTopK(_0x3412f1);},async 'execute'(_0x260407){const _0x4f14a6=a22_0xd97cf5,_0x162b3b=_0x260407['str'](_0x4f14a6(0x1fc))[_0x4f14a6(0x1e2)](),_0x4978ff=readTopK(_0x260407),_0x373b60=await searchKnowledgeBase(_0x260407[_0x4f14a6(0x1f5)],{'query':_0x162b3b,'topK':_0x4978ff});return{'ok':!![],'data':{'total':_0x373b60[_0x4f14a6(0x20f)],'hits':_0x373b60[_0x4f14a6(0x200)](summarizeSearchHit)}};}};export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];
1
+ const a22_0x407583=a22_0x3c8a;(function(_0x22efbf,_0x4e41dc){const _0x4d798a=a22_0x3c8a,_0x34703f=_0x22efbf();while(!![]){try{const _0x1e85a6=-parseInt(_0x4d798a(0xb9))/0x1+-parseInt(_0x4d798a(0xd1))/0x2*(parseInt(_0x4d798a(0xaa))/0x3)+parseInt(_0x4d798a(0xc7))/0x4+-parseInt(_0x4d798a(0xca))/0x5+parseInt(_0x4d798a(0xbc))/0x6*(parseInt(_0x4d798a(0xa2))/0x7)+-parseInt(_0x4d798a(0xc9))/0x8+parseInt(_0x4d798a(0xb5))/0x9*(parseInt(_0x4d798a(0x9d))/0xa);if(_0x1e85a6===_0x4e41dc)break;else _0x34703f['push'](_0x34703f['shift']());}catch(_0x2fe2d1){_0x34703f['push'](_0x34703f['shift']());}}}(a22_0x3251,0x6feaa));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';function a22_0x3c8a(_0x5307cd,_0x333fd9){_0x5307cd=_0x5307cd-0x96;const _0x3251d7=a22_0x3251();let _0x3c8acc=_0x3251d7[_0x5307cd];return _0x3c8acc;}import{CliErrors}from'../../errors.js';function a22_0x3251(){const _0x45ca6a=['length','2283nwgGaK','/client/knowledge-base/personal/create','str','verbose','Updated\x20KB\x20entry\x20','version','POST','description','create','Search\x20query\x20is\x20required.','Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22','750717uLMavg','detail','ragStatus','Created\x20KB\x20entry\x20','385617nprHIt','query','trim','564bhwaOo','file','metadata','/update','validation','userId','Update\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','map','flag','File\x20path\x20is\x20required.','Search\x20visible\x20company\x20and\x20personal\x20knowledge\x20base\x20content','1317376MIqtfo','content','6193376zmdEez','1199675qSvGmm','Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20','docId','read','number','/client/knowledge-base/personal/','Search\x20query\x20for\x20visible\x20company\x20and\x20personal\x20knowledge','908yrYGSh','string','Override\x20the\x20existing\x20entry\x20title','appCode','update','File\x20not\x20found:\x20','title','utf8','Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','isFinite','updateTime','num','score','220xduDmS','topk','Personal\x20knowledge-base\x20entry\x20ID','isFile','File\x20is\x20not\x20a\x20regular\x20file:\x20','2919JaAYMO','--topk\x20must\x20be\x20a\x20positive\x20number.','bool','list','body','scope','build'];a22_0x3251=function(){return _0x45ca6a;};return a22_0x3251();}import{dryRun}from'../../framework/dryrun.js';const TITLE_FLAG={'name':a22_0x407583(0x96),'type':'string','required':!![],'description':'Personal\x20knowledge-base\x20entry\x20title'},FILE_FLAG={'name':'file','type':a22_0x407583(0xd2),'required':!![],'description':'Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file'},QUERY_FLAG={'name':a22_0x407583(0xba),'type':a22_0x407583(0xd2),'required':!![],'description':a22_0x407583(0xd0)},TOPK_FLAG={'name':a22_0x407583(0x9e),'type':a22_0x407583(0xce),'description':'Maximum\x20number\x20of\x20search\x20hits\x20to\x20return'};function readKnowledgeFile(_0x1353ef){const _0x199d6b=a22_0x407583;if(!_0x1353ef)throw CliErrors['validation'](_0x199d6b(0xc5));if(!existsSync(_0x1353ef))throw CliErrors[_0x199d6b(0xc0)](_0x199d6b(0xd6)+_0x1353ef);if(!statSync(_0x1353ef)[_0x199d6b(0xa0)]())throw CliErrors[_0x199d6b(0xc0)](_0x199d6b(0xa1)+_0x1353ef);return readFileSync(_0x1353ef,_0x199d6b(0x97));}function summarizePersonalItem(_0x1b719e){const _0x5ec2ac=a22_0x407583;return{'id':_0x1b719e['id'],'title':_0x1b719e['title'],'version':_0x1b719e[_0x5ec2ac(0xaf)],'ragStatus':_0x1b719e[_0x5ec2ac(0xb7)],'ragErrorMessage':_0x1b719e['ragErrorMessage'],'updateTime':_0x1b719e[_0x5ec2ac(0x9a)]};}function detailPersonalItem(_0x4e5dc2){const _0x50bf09=a22_0x407583;return{'id':_0x4e5dc2['id'],'appCode':_0x4e5dc2['appCode'],'scope':_0x4e5dc2[_0x50bf09(0xa7)],'userId':_0x4e5dc2[_0x50bf09(0xc1)],'title':_0x4e5dc2['title'],'content':_0x4e5dc2[_0x50bf09(0xc8)]??'','version':_0x4e5dc2[_0x50bf09(0xaf)],'ragStatus':_0x4e5dc2[_0x50bf09(0xb7)],'ragErrorMessage':_0x4e5dc2['ragErrorMessage'],'createTime':_0x4e5dc2['createTime'],'updateTime':_0x4e5dc2[_0x50bf09(0x9a)]};}function summarizeSearchHit(_0x486077){const _0x1a33fe=a22_0x407583;return{'scope':_0x486077[_0x1a33fe(0xa7)],'docId':_0x486077[_0x1a33fe(0xcc)],'score':_0x486077[_0x1a33fe(0x9c)],'weightedScore':_0x486077['weightedScore'],'content':_0x486077[_0x1a33fe(0xc8)],'metadata':_0x486077[_0x1a33fe(0xbe)]};}function readTopK(_0x5d4586){const _0x3a69d3=a22_0x407583,_0x7e1f26=_0x5d4586[_0x3a69d3(0xc4)](_0x3a69d3(0x9e));if(_0x7e1f26===undefined||_0x7e1f26===null||_0x7e1f26==='')return undefined;const _0x2976d5=_0x5d4586[_0x3a69d3(0x9b)](_0x3a69d3(0x9e));if(!Number[_0x3a69d3(0x99)](_0x2976d5)||_0x2976d5<0x1)throw CliErrors['validation'](_0x3a69d3(0xa3));return _0x2976d5;}const kbList={'service':'kb','command':a22_0x407583(0xa5),'description':'List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','risk':a22_0x407583(0xcd),'flags':[VERBOSE_FLAG],async 'execute'(_0x5d9ce5){const _0x305ec1=a22_0x407583,_0x184082=await listPersonalKnowledgeBaseItems(_0x5d9ce5[_0x305ec1(0xd4)]);if(_0x5d9ce5[_0x305ec1(0xa4)](_0x305ec1(0xad)))return{'ok':!![],'data':{'total':_0x184082[_0x305ec1(0xa9)],'items':_0x184082}};return{'ok':!![],'data':{'total':_0x184082[_0x305ec1(0xa9)],'items':_0x184082[_0x305ec1(0xc3)](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':a22_0x407583(0xb6),'description':a22_0x407583(0x98),'risk':a22_0x407583(0xcd),'flags':[{...ID_FLAG,'description':a22_0x407583(0x9f)}],async 'execute'(_0x14c231){const _0x5946a6=a22_0x407583,_0x136500=await getPersonalKnowledgeBaseItem(_0x14c231[_0x5946a6(0x9b)]('id'),_0x14c231[_0x5946a6(0xd4)]);return{'ok':!![],'data':detailPersonalItem(_0x136500)};}},kbCreate={'service':'kb','command':a22_0x407583(0xb2),'description':'Create\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','risk':'write','flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x1b4cd1){const _0x4c08c2=a22_0x407583,_0x28cdd4=_0x1b4cd1['str'](_0x4c08c2(0x96)),_0x1fdf18=readKnowledgeFile(_0x1b4cd1[_0x4c08c2(0xac)]('file')),_0x1bd258=await createPersonalKnowledgeBaseItem(_0x1b4cd1[_0x4c08c2(0xd4)],{'title':_0x28cdd4,'content':_0x1fdf18});return{'ok':!![],'data':summarizePersonalItem(_0x1bd258),'message':_0x4c08c2(0xb8)+_0x1bd258['id']+'\x20('+_0x1bd258[_0x4c08c2(0x96)]+')'};},async 'dryRun'(_0x379814){const _0x1909b7=a22_0x407583,_0x5aabf3=_0x379814[_0x1909b7(0xac)](_0x1909b7(0x96)),_0x113e07=readKnowledgeFile(_0x379814['str'](_0x1909b7(0xbd)));return dryRun('POST',_0x1909b7(0xab))[_0x1909b7(0xa6)]({'appCode':_0x379814['appCode'],'title':_0x5aabf3,'content':_0x113e07})[_0x1909b7(0xb1)](_0x1909b7(0xb4)+_0x5aabf3+'\x22')[_0x1909b7(0xa8)]();}},kbUpdate={'service':'kb','command':a22_0x407583(0xd5),'description':a22_0x407583(0xc2),'risk':'write','flags':[{...ID_FLAG,'description':a22_0x407583(0x9f)},{...TITLE_FLAG,'required':![],'description':a22_0x407583(0xd3)},FILE_FLAG],async 'execute'(_0x118a4c){const _0x3baffe=a22_0x407583,_0x225f5a=_0x118a4c['num']('id'),_0x5bd29b=readKnowledgeFile(_0x118a4c[_0x3baffe(0xac)](_0x3baffe(0xbd))),_0x2ddb02=_0x118a4c[_0x3baffe(0xac)](_0x3baffe(0x96))||(await getPersonalKnowledgeBaseItem(_0x225f5a,_0x118a4c[_0x3baffe(0xd4)]))[_0x3baffe(0x96)],_0x54b638=await updatePersonalKnowledgeBaseItem(_0x225f5a,_0x118a4c[_0x3baffe(0xd4)],{'title':_0x2ddb02,'content':_0x5bd29b});return{'ok':!![],'data':summarizePersonalItem(_0x54b638),'message':_0x3baffe(0xae)+_0x54b638['id']+'\x20('+_0x54b638[_0x3baffe(0x96)]+')'};},async 'dryRun'(_0x2bd6e7){const _0x8d5b59=a22_0x407583,_0xe8ec54=_0x2bd6e7[_0x8d5b59(0x9b)]('id'),_0xbca1aa=readKnowledgeFile(_0x2bd6e7[_0x8d5b59(0xac)](_0x8d5b59(0xbd))),_0x267c72=_0x2bd6e7[_0x8d5b59(0xac)](_0x8d5b59(0x96))||(await getPersonalKnowledgeBaseItem(_0xe8ec54,_0x2bd6e7[_0x8d5b59(0xd4)]))[_0x8d5b59(0x96)];return dryRun(_0x8d5b59(0xb0),_0x8d5b59(0xcf)+_0xe8ec54+_0x8d5b59(0xbf))[_0x8d5b59(0xa6)]({'appCode':_0x2bd6e7[_0x8d5b59(0xd4)],'title':_0x267c72,'content':_0xbca1aa})[_0x8d5b59(0xb1)](_0x8d5b59(0xcb)+_0xe8ec54)[_0x8d5b59(0xa8)]();}},kbSearch={'service':'kb','command':'search','description':a22_0x407583(0xc6),'risk':a22_0x407583(0xcd),'flags':[QUERY_FLAG,TOPK_FLAG],async 'validate'(_0x429690){const _0x312e4e=a22_0x407583;if(!_0x429690[_0x312e4e(0xac)](_0x312e4e(0xba))[_0x312e4e(0xbb)]())throw CliErrors[_0x312e4e(0xc0)](_0x312e4e(0xb3));readTopK(_0x429690);},async 'execute'(_0x90820a){const _0x3ad3ff=a22_0x407583,_0xe76d0f=_0x90820a[_0x3ad3ff(0xac)](_0x3ad3ff(0xba))[_0x3ad3ff(0xbb)](),_0x5be144=readTopK(_0x90820a),_0x3bc567=await searchKnowledgeBase(_0x90820a['appCode'],{'query':_0xe76d0f,'topK':_0x5be144});return{'ok':!![],'data':{'total':_0x3bc567[_0x3ad3ff(0xa9)],'hits':_0x3bc567[_0x3ad3ff(0xc3)](summarizeSearchHit)}};}};export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];
@@ -1 +1 @@
1
- const a23_0x3d034d=a23_0x1e52;(function(_0x1d5b26,_0x2a7b27){const _0x21584e=a23_0x1e52,_0x1e60d1=_0x1d5b26();while(!![]){try{const _0x5cb41b=parseInt(_0x21584e(0x145))/0x1*(-parseInt(_0x21584e(0x14c))/0x2)+-parseInt(_0x21584e(0x157))/0x3*(-parseInt(_0x21584e(0x14f))/0x4)+parseInt(_0x21584e(0x146))/0x5*(-parseInt(_0x21584e(0x15a))/0x6)+parseInt(_0x21584e(0x15d))/0x7+-parseInt(_0x21584e(0x14e))/0x8+parseInt(_0x21584e(0x158))/0x9*(parseInt(_0x21584e(0x151))/0xa)+-parseInt(_0x21584e(0x152))/0xb*(-parseInt(_0x21584e(0x150))/0xc);if(_0x5cb41b===_0x2a7b27)break;else _0x1e60d1['push'](_0x1e60d1['shift']());}catch(_0x119622){_0x1e60d1['push'](_0x1e60d1['shift']());}}}(a23_0x3298,0xdab43));function a23_0x3298(){const _0x33ae92=['67OyLQzn','72470yMmFia','read','stringify','forEach','warn','View\x20command\x20history\x20logs','25192HzWWof','Clear\x20command\x20history\x20logs','7370984GUWQQN','148teJbfj','395220fKsKfB','120DlXyUc','154HWKfxn','error','level','show','details','123366uwgbmI','631926kQlasu','write','408OdKYMk','en-US','command','5750752nWBSSV','*\x20Logs\x20cleared','clear','logs','length','success','readLogs','*\x20No\x20logs\x20found','log','duration','keys'];a23_0x3298=function(){return _0x33ae92;};return a23_0x3298();}function a23_0x1e52(_0x3ac9ad,_0x2be8d6){_0x3ac9ad=_0x3ac9ad-0x144;const _0x32988c=a23_0x3298();let _0x1e52be=_0x32988c[_0x3ac9ad];return _0x1e52be;}import{logger}from'../../utils/logger.js';import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function printLogs(_0x3a860f){const _0x6798e1=a23_0x1e52;if(_0x3a860f[_0x6798e1(0x161)]===0x0){console[_0x6798e1(0x165)](_0x6798e1(0x164));return;}console[_0x6798e1(0x165)]('*\x20'+CLI_DISPLAY_NAME+'\x20logs:\x0a'),_0x3a860f[_0x6798e1(0x149)]((_0x2d8c5c,_0x4dcd88)=>{const _0x38c62c=_0x6798e1,_0x3974a6=new Date(_0x2d8c5c['timestamp'])['toLocaleString'](_0x38c62c(0x15b)),_0x45e2e5=_0x2d8c5c[_0x38c62c(0x154)]===_0x38c62c(0x162)?'√':_0x2d8c5c['level']===_0x38c62c(0x153)?'×':_0x2d8c5c[_0x38c62c(0x154)]===_0x38c62c(0x14a)?'!':'i';console[_0x38c62c(0x165)](_0x4dcd88+0x1+'.\x20'+_0x45e2e5+'\x20['+_0x2d8c5c[_0x38c62c(0x15c)]+']\x20'+_0x2d8c5c['message']),console[_0x38c62c(0x165)]('\x20\x20\x20Time:\x20'+_0x3974a6),_0x2d8c5c[_0x38c62c(0x166)]&&console[_0x38c62c(0x165)]('\x20\x20\x20Duration:\x20'+_0x2d8c5c[_0x38c62c(0x166)]+'ms'),_0x2d8c5c[_0x38c62c(0x156)]&&Object[_0x38c62c(0x144)](_0x2d8c5c[_0x38c62c(0x156)])[_0x38c62c(0x161)]>0x0&&console['log']('\x20\x20\x20Details:\x20'+JSON[_0x38c62c(0x148)](_0x2d8c5c['details'],null,0x2)),console[_0x38c62c(0x165)]('');});}export const logsDefinitions=[{'service':a23_0x3d034d(0x160),'command':a23_0x3d034d(0x155),'description':a23_0x3d034d(0x14b),'risk':a23_0x3d034d(0x147),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x1b0315){const _0x307529=a23_0x3d034d;return printLogs(logger[_0x307529(0x163)]()),{'ok':!![]};}},{'service':a23_0x3d034d(0x160),'command':a23_0x3d034d(0x15f),'description':a23_0x3d034d(0x14d),'risk':a23_0x3d034d(0x159),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x2b3af5){const _0x86a2df=a23_0x3d034d;return logger['clearLogs'](),console[_0x86a2df(0x165)](_0x86a2df(0x15e)),{'ok':!![]};}}];
1
+ function a23_0x54aa(_0x3c6760,_0x10211f){_0x3c6760=_0x3c6760-0x1d0;const _0x19fad2=a23_0x19fa();let _0x54aa30=_0x19fad2[_0x3c6760];return _0x54aa30;}const a23_0x5efc72=a23_0x54aa;function a23_0x19fa(){const _0x5d750c=['toLocaleString','666490DezNiC','11270021enINno','readLogs','23150sTFqNG','success','message','\x20\x20\x20Duration:\x20','2257640VDCdXB','Clear\x20command\x20history\x20logs','write','\x20\x20\x20Details:\x20','forEach','details','2813280QcUtRU','logs','length','error','915iyHxhm','39626622YdBPHj','keys','warn','log','\x20logs:\x0a','\x20\x20\x20Time:\x20','duration','timestamp','level','39156fPQSKA','3BAlpIC','View\x20command\x20history\x20logs'];a23_0x19fa=function(){return _0x5d750c;};return a23_0x19fa();}(function(_0x16c0b2,_0x37b46d){const _0x3144d5=a23_0x54aa,_0x3f9db2=_0x16c0b2();while(!![]){try{const _0x3c3770=-parseInt(_0x3144d5(0x1e0))/0x1+-parseInt(_0x3144d5(0x1dd))/0x2*(-parseInt(_0x3144d5(0x1da))/0x3)+-parseInt(_0x3144d5(0x1ea))/0x4+parseInt(_0x3144d5(0x1ee))/0x5*(-parseInt(_0x3144d5(0x1d9))/0x6)+-parseInt(_0x3144d5(0x1de))/0x7+-parseInt(_0x3144d5(0x1e4))/0x8+parseInt(_0x3144d5(0x1d0))/0x9;if(_0x3c3770===_0x37b46d)break;else _0x3f9db2['push'](_0x3f9db2['shift']());}catch(_0x1342d0){_0x3f9db2['push'](_0x3f9db2['shift']());}}}(a23_0x19fa,0xe1683));import{logger}from'../../utils/logger.js';import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function printLogs(_0x4939fc){const _0x49804e=a23_0x54aa;if(_0x4939fc[_0x49804e(0x1ec)]===0x0){console['log']('*\x20No\x20logs\x20found');return;}console[_0x49804e(0x1d3)]('*\x20'+CLI_DISPLAY_NAME+_0x49804e(0x1d4)),_0x4939fc[_0x49804e(0x1e8)]((_0x57f1d7,_0xb834f4)=>{const _0x551bbe=_0x49804e,_0x272bae=new Date(_0x57f1d7[_0x551bbe(0x1d7)])[_0x551bbe(0x1dc)]('en-US'),_0x554421=_0x57f1d7[_0x551bbe(0x1d8)]===_0x551bbe(0x1e1)?'√':_0x57f1d7[_0x551bbe(0x1d8)]===_0x551bbe(0x1ed)?'×':_0x57f1d7['level']===_0x551bbe(0x1d2)?'!':'i';console[_0x551bbe(0x1d3)](_0xb834f4+0x1+'.\x20'+_0x554421+'\x20['+_0x57f1d7['command']+']\x20'+_0x57f1d7[_0x551bbe(0x1e2)]),console[_0x551bbe(0x1d3)](_0x551bbe(0x1d5)+_0x272bae),_0x57f1d7['duration']&&console['log'](_0x551bbe(0x1e3)+_0x57f1d7[_0x551bbe(0x1d6)]+'ms'),_0x57f1d7[_0x551bbe(0x1e9)]&&Object[_0x551bbe(0x1d1)](_0x57f1d7['details'])['length']>0x0&&console['log'](_0x551bbe(0x1e7)+JSON['stringify'](_0x57f1d7['details'],null,0x2)),console['log']('');});}export const logsDefinitions=[{'service':a23_0x5efc72(0x1eb),'command':'show','description':a23_0x5efc72(0x1db),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x273684){const _0x242e0a=a23_0x5efc72;return printLogs(logger[_0x242e0a(0x1df)]()),{'ok':!![]};}},{'service':'logs','command':'clear','description':a23_0x5efc72(0x1e5),'risk':a23_0x5efc72(0x1e6),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x4f3e98){const _0x57662e=a23_0x5efc72;return logger['clearLogs'](),console[_0x57662e(0x1d3)]('*\x20Logs\x20cleared'),{'ok':!![]};}}];
@@ -1 +1 @@
1
- const a24_0x2f8b5d=a24_0x3d0e;(function(_0x5f3a80,_0x2bcd15){const _0x524ece=a24_0x3d0e,_0x412a1f=_0x5f3a80();while(!![]){try{const _0x516c6e=parseInt(_0x524ece(0x14d))/0x1+parseInt(_0x524ece(0x137))/0x2*(-parseInt(_0x524ece(0x129))/0x3)+-parseInt(_0x524ece(0x144))/0x4*(-parseInt(_0x524ece(0x12c))/0x5)+parseInt(_0x524ece(0x12e))/0x6+parseInt(_0x524ece(0x149))/0x7+-parseInt(_0x524ece(0x12b))/0x8+-parseInt(_0x524ece(0x138))/0x9;if(_0x516c6e===_0x2bcd15)break;else _0x412a1f['push'](_0x412a1f['shift']());}catch(_0x424f1c){_0x412a1f['push'](_0x412a1f['shift']());}}}(a24_0x3e3b,0x5ebe4));import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';function a24_0x3e3b(){const _0x19af2d=['isSingleCommand','30mSxtdo','BFF\x20Scripts','1756240sYofsU','2035EXlXVM','App\x20Management','3792792GhNfCI','service','Logs','Instant\x20API','description','has','get','show','Schema','113426pmgYxi','6505794FuNYsa','write','SQL\x20Queries','map','from','Configuration','push','\x20\x20[high-risk-write]','install','list','set','defaultCommand','228dKqRLf','Authentication','Knowledge\x20Base','Skills','command','4061134jLyhyK','run','\x20\x20[write]','Self\x20Update','662101RvYkSN','login','risk','Datasets'];a24_0x3e3b=function(){return _0x19af2d;};return a24_0x3e3b();}import{skillDefinitions}from'../commands/skill/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{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';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x3848f1){const _0x5e500c=a24_0x3d0e;for(const _0x36b3da of _0x3848f1){definitions[_0x5e500c(0x142)](_0x36b3da[_0x5e500c(0x12f)]+':'+_0x36b3da['command'],_0x36b3da);let _0x13fd56=serviceGroups['get'](_0x36b3da[_0x5e500c(0x12f)]);!_0x13fd56&&(_0x13fd56=[],serviceGroups['set'](_0x36b3da['service'],_0x13fd56)),_0x13fd56[_0x5e500c(0x13e)](_0x36b3da);}}function registerService(_0x502c3a,_0x2f8a32,_0x4e67ac){const _0x3ce260=a24_0x3d0e;registerDefinitions(_0x2f8a32);const _0x32d95b=_0x3955f8=>_0x3955f8==='read'?'':_0x3955f8===_0x3ce260(0x139)?_0x3ce260(0x14b):_0x3ce260(0x13f),_0x27f540={'service':_0x2f8a32[0x0]['service'],'label':_0x502c3a,'commands':_0x2f8a32[_0x3ce260(0x13b)](_0x13080d=>({'command':_0x13080d['command'],'description':_0x13080d[_0x3ce260(0x132)],'tag':_0x32d95b(_0x13080d[_0x3ce260(0x14f)])})),'defaultCommand':_0x4e67ac?.[_0x3ce260(0x143)]??(_0x4e67ac?.[_0x3ce260(0x151)]?_0x2f8a32[0x0][_0x3ce260(0x148)]:undefined),'isSingleCommand':_0x4e67ac?.[_0x3ce260(0x151)]};serviceRegistry[_0x3ce260(0x13e)](_0x27f540),serviceByName[_0x3ce260(0x142)](_0x27f540[_0x3ce260(0x12f)],_0x27f540);}registerService(a24_0x2f8b5d(0x145),authDefinitions,{'defaultCommand':a24_0x2f8b5d(0x14e)}),registerService(a24_0x2f8b5d(0x150),datasetDefinitions),registerService(a24_0x2f8b5d(0x131),dataDefinitions),registerService(a24_0x2f8b5d(0x13a),sqlDefinitions),registerService(a24_0x2f8b5d(0x12a),bffDefinitions),registerService(a24_0x2f8b5d(0x146),kbDefinitions),registerService(a24_0x2f8b5d(0x12d),appDefinitions,{'defaultCommand':'list'}),registerService(a24_0x2f8b5d(0x13d),configDefinitions,{'defaultCommand':a24_0x2f8b5d(0x141)}),registerService(a24_0x2f8b5d(0x147),skillDefinitions,{'defaultCommand':a24_0x2f8b5d(0x140)}),registerService(a24_0x2f8b5d(0x14c),[updateDefinition],{'defaultCommand':a24_0x2f8b5d(0x14a),'isSingleCommand':!![]}),registerService('Diagnostics',[doctorDefinition],{'isSingleCommand':!![]}),registerService(a24_0x2f8b5d(0x136),[schemaDefinition],{'isSingleCommand':!![]}),registerService(a24_0x2f8b5d(0x130),logsDefinitions,{'defaultCommand':a24_0x2f8b5d(0x135)});function a24_0x3d0e(_0x4656c1,_0x2c031e){_0x4656c1=_0x4656c1-0x129;const _0x3e3b62=a24_0x3e3b();let _0x3d0e24=_0x3e3b62[_0x4656c1];return _0x3d0e24;}export function findDefinition(_0x4a22e6,_0x2bf8ba){const _0x3cf877=a24_0x2f8b5d;return definitions[_0x3cf877(0x134)](_0x4a22e6+':'+_0x2bf8ba);}export function isKnownService(_0x90b62a){const _0x441a78=a24_0x2f8b5d;return serviceByName[_0x441a78(0x133)](_0x90b62a);}export function getServiceEntry(_0x4d2877){const _0x29682d=a24_0x2f8b5d;return serviceByName[_0x29682d(0x134)](_0x4d2877);}export function getAllDefinitions(){const _0x18765e=a24_0x2f8b5d;return Array[_0x18765e(0x13c)](definitions['values']());}
1
+ const a24_0x1fe922=a24_0x4bc3;(function(_0x2b7075,_0x4dd18c){const _0x5160ce=a24_0x4bc3,_0x553116=_0x2b7075();while(!![]){try{const _0x41c71e=-parseInt(_0x5160ce(0x98))/0x1+-parseInt(_0x5160ce(0x82))/0x2*(-parseInt(_0x5160ce(0xa8))/0x3)+parseInt(_0x5160ce(0xa3))/0x4*(-parseInt(_0x5160ce(0x87))/0x5)+-parseInt(_0x5160ce(0x84))/0x6+parseInt(_0x5160ce(0xa9))/0x7*(-parseInt(_0x5160ce(0xa7))/0x8)+parseInt(_0x5160ce(0x89))/0x9*(parseInt(_0x5160ce(0x91))/0xa)+parseInt(_0x5160ce(0x92))/0xb*(parseInt(_0x5160ce(0x85))/0xc);if(_0x41c71e===_0x4dd18c)break;else _0x553116['push'](_0x553116['shift']());}catch(_0x46dde2){_0x553116['push'](_0x553116['shift']());}}}(a24_0x1532,0x2846a));import{authDefinitions}from'../commands/auth/index.js';function a24_0x1532(){const _0x2a82ba=['Datasets','service','SQL\x20Queries','command','Configuration','get','Self\x20Update','1270JuOHLQ','28930PIXgRG','Logs','from','values','BFF\x20Scripts','run','279152szUkIK','list','login','Schema','show','map','App\x20Management','set','push','\x20\x20[write]','install','801844FGlZoM','read','Skills','description','8tkpfLI','156594gzrcyr','1555309RclDIK','Knowledge\x20Base','isSingleCommand','\x20\x20[high-risk-write]','2PGtGVe','risk','1612686FQlFLj','4764xuguFH','Instant\x20API','5YICqFP','write','2781qibeZE'];a24_0x1532=function(){return _0x2a82ba;};return a24_0x1532();}import{logsDefinitions}from'../commands/logs/index.js';import{skillDefinitions}from'../commands/skill/index.js';function a24_0x4bc3(_0x370c48,_0x50f769){_0x370c48=_0x370c48-0x81;const _0x1532b2=a24_0x1532();let _0x4bc360=_0x1532b2[_0x370c48];return _0x4bc360;}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{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';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x571829){const _0x1f9a07=a24_0x4bc3;for(const _0x38e7ac of _0x571829){definitions[_0x1f9a07(0x9f)](_0x38e7ac[_0x1f9a07(0x8b)]+':'+_0x38e7ac['command'],_0x38e7ac);let _0x419041=serviceGroups[_0x1f9a07(0x8f)](_0x38e7ac[_0x1f9a07(0x8b)]);!_0x419041&&(_0x419041=[],serviceGroups[_0x1f9a07(0x9f)](_0x38e7ac['service'],_0x419041)),_0x419041[_0x1f9a07(0xa0)](_0x38e7ac);}}function registerService(_0x2b1242,_0x347658,_0x11dfc2){const _0xb39782=a24_0x4bc3;registerDefinitions(_0x347658);const _0x5596cd=_0x1cbd5d=>_0x1cbd5d===_0xb39782(0xa4)?'':_0x1cbd5d===_0xb39782(0x88)?_0xb39782(0xa1):_0xb39782(0x81),_0x2a3fde={'service':_0x347658[0x0][_0xb39782(0x8b)],'label':_0x2b1242,'commands':_0x347658[_0xb39782(0x9d)](_0x394ba8=>({'command':_0x394ba8['command'],'description':_0x394ba8[_0xb39782(0xa6)],'tag':_0x5596cd(_0x394ba8[_0xb39782(0x83)])})),'defaultCommand':_0x11dfc2?.['defaultCommand']??(_0x11dfc2?.[_0xb39782(0xab)]?_0x347658[0x0][_0xb39782(0x8d)]:undefined),'isSingleCommand':_0x11dfc2?.[_0xb39782(0xab)]};serviceRegistry['push'](_0x2a3fde),serviceByName[_0xb39782(0x9f)](_0x2a3fde['service'],_0x2a3fde);}registerService('Authentication',authDefinitions,{'defaultCommand':a24_0x1fe922(0x9a)}),registerService(a24_0x1fe922(0x8a),datasetDefinitions),registerService(a24_0x1fe922(0x86),dataDefinitions),registerService(a24_0x1fe922(0x8c),sqlDefinitions),registerService(a24_0x1fe922(0x96),bffDefinitions),registerService(a24_0x1fe922(0xaa),kbDefinitions),registerService(a24_0x1fe922(0x9e),appDefinitions,{'defaultCommand':a24_0x1fe922(0x99)}),registerService(a24_0x1fe922(0x8e),configDefinitions,{'defaultCommand':a24_0x1fe922(0x99)}),registerService(a24_0x1fe922(0xa5),skillDefinitions,{'defaultCommand':a24_0x1fe922(0xa2)}),registerService(a24_0x1fe922(0x90),[updateDefinition],{'defaultCommand':a24_0x1fe922(0x97),'isSingleCommand':!![]}),registerService('Diagnostics',[doctorDefinition],{'isSingleCommand':!![]}),registerService(a24_0x1fe922(0x9b),[schemaDefinition],{'isSingleCommand':!![]}),registerService(a24_0x1fe922(0x93),logsDefinitions,{'defaultCommand':a24_0x1fe922(0x9c)});export function findDefinition(_0x13e6cd,_0x54ff54){const _0x3734d5=a24_0x1fe922;return definitions[_0x3734d5(0x8f)](_0x13e6cd+':'+_0x54ff54);}export function isKnownService(_0x20fe4e){return serviceByName['has'](_0x20fe4e);}export function getServiceEntry(_0x3c1c5d){return serviceByName['get'](_0x3c1c5d);}export function getAllDefinitions(){const _0x17276c=a24_0x1fe922;return Array[_0x17276c(0x94)](definitions[_0x17276c(0x95)]());}
@@ -1 +1 @@
1
- const a25_0x55db73=a25_0x23a5;(function(_0x1b5679,_0x4443f7){const _0xc7b52a=a25_0x23a5,_0x32518b=_0x1b5679();while(!![]){try{const _0x2f3d64=parseInt(_0xc7b52a(0xb7))/0x1*(-parseInt(_0xc7b52a(0xc0))/0x2)+-parseInt(_0xc7b52a(0xbf))/0x3*(parseInt(_0xc7b52a(0xc2))/0x4)+-parseInt(_0xc7b52a(0xbc))/0x5*(parseInt(_0xc7b52a(0xb8))/0x6)+-parseInt(_0xc7b52a(0xb9))/0x7+parseInt(_0xc7b52a(0xc1))/0x8+parseInt(_0xc7b52a(0xbd))/0x9*(parseInt(_0xc7b52a(0xba))/0xa)+-parseInt(_0xc7b52a(0xbb))/0xb*(-parseInt(_0xc7b52a(0xc3))/0xc);if(_0x2f3d64===_0x4443f7)break;else _0x32518b['push'](_0x32518b['shift']());}catch(_0x24982a){_0x32518b['push'](_0x32518b['shift']());}}}(a25_0x459f,0x4469c));import{buildSchemaPayload}from'../framework/schema-export.js';function a25_0x23a5(_0x2bcad9,_0x203789){_0x2bcad9=_0x2bcad9-0xb7;const _0x459fe3=a25_0x459f();let _0x23a5dd=_0x459fe3[_0x2bcad9];return _0x23a5dd;}function a25_0x459f(){const _0x54c4af=['10356rOHpiQ','read','1967BPrAyv','99420VAxsKI','1072729rruHuf','84830aywWGF','2035rnjIPX','110lASDLt','585DLbZvX','export','26241hZRDDv','322gVJJhK','3718984NmWtzx','28saPoJE'];a25_0x459f=function(){return _0x54c4af;};return a25_0x459f();}async function execute(_0x3a33b1){const _0x1d9e77=await buildSchemaPayload();return{'ok':!![],'data':_0x1d9e77};}export const schemaDefinition={'service':'schema','command':a25_0x55db73(0xbe),'description':'Export\x20machine-readable\x20command\x20schema\x20(JSON)','risk':a25_0x55db73(0xc4),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],'execute':execute};
1
+ const a25_0x4eead7=a25_0x5e0d;function a25_0x21a6(){const _0x6f0a1b=['1080437gIepbZ','537RLKtsa','export','403868oPubWq','39570dWVsDs','7071440sZxfjf','20954655NDWuMY','Export\x20machine-readable\x20command\x20schema\x20(JSON)','schema','4684jJDzKo','3857826LZoWzH','read','654pIFWwq'];a25_0x21a6=function(){return _0x6f0a1b;};return a25_0x21a6();}(function(_0x5e7e7f,_0x4c3446){const _0x12d7c3=a25_0x5e0d,_0x4b6f27=_0x5e7e7f();while(!![]){try{const _0x26506a=parseInt(_0x12d7c3(0x12c))/0x1+-parseInt(_0x12d7c3(0x122))/0x2+parseInt(_0x12d7c3(0x12d))/0x3*(-parseInt(_0x12d7c3(0x128))/0x4)+-parseInt(_0x12d7c3(0x123))/0x5*(parseInt(_0x12d7c3(0x12b))/0x6)+-parseInt(_0x12d7c3(0x129))/0x7+-parseInt(_0x12d7c3(0x124))/0x8+parseInt(_0x12d7c3(0x125))/0x9;if(_0x26506a===_0x4c3446)break;else _0x4b6f27['push'](_0x4b6f27['shift']());}catch(_0x3fcd5f){_0x4b6f27['push'](_0x4b6f27['shift']());}}}(a25_0x21a6,0xaac7b));import{buildSchemaPayload}from'../framework/schema-export.js';function a25_0x5e0d(_0x24f250,_0x1fa5d6){_0x24f250=_0x24f250-0x122;const _0x21a615=a25_0x21a6();let _0x5e0d67=_0x21a615[_0x24f250];return _0x5e0d67;}async function execute(_0x27d020){const _0x54c137=await buildSchemaPayload();return{'ok':!![],'data':_0x54c137};}export const schemaDefinition={'service':a25_0x4eead7(0x127),'command':a25_0x4eead7(0x12e),'description':a25_0x4eead7(0x126),'risk':a25_0x4eead7(0x12a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],'execute':execute};
@@ -1 +1 @@
1
- const a26_0x37f8eb=a26_0x35ba;(function(_0x1b32bd,_0x464efe){const _0x54919f=a26_0x35ba,_0x357c3d=_0x1b32bd();while(!![]){try{const _0x259a63=parseInt(_0x54919f(0xac))/0x1+-parseInt(_0x54919f(0xa5))/0x2+-parseInt(_0x54919f(0x9d))/0x3+-parseInt(_0x54919f(0x7e))/0x4*(parseInt(_0x54919f(0x97))/0x5)+parseInt(_0x54919f(0x96))/0x6+-parseInt(_0x54919f(0xa8))/0x7+parseInt(_0x54919f(0xb4))/0x8;if(_0x259a63===_0x464efe)break;else _0x357c3d['push'](_0x357c3d['shift']());}catch(_0x1a8275){_0x357c3d['push'](_0x357c3d['shift']());}}}(a26_0x5c3f,0xec992));import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'../../constant/cli.js';function a26_0x5c3f(){const _0x34b90d=['unchanged','14369392UpYyyW','skipped','str','739724hCmMyJ','unknown','action','code','Pulled\x20','log','version','envName','npx\x20skills\x20add\x20failed:\x20','\x20skill\x20via\x20npx.','Push\x20a\x20local\x20Skill\x20directory\x20to\x20personal\x20runtime\x20Skill\x20scope','install','push','pull','reduce','string','length','Created\x20personal\x20Skill\x20','accessKey','pipe','nonInteractive','Only\x20pull\x20a\x20specific\x20runtime\x20Skill\x20code','skill-install','created','8191170TjFXao','40UQMMtq','map','input','Skipped\x20npx\x20(','setLogPath','skill','1181889ZSQSrN','find','skillName','write','authRequired','Updated\x20personal\x20Skill\x20','cwd','\x20company\x20Skill(s).','1645250qgUFAO','=1);\x20assuming\x20skill\x20is\x20already\x20present.','Pull\x20personal\x20and\x20company\x20runtime\x20Skills\x20into\x20local\x20agent\x20skill\x20directories','2409001kHyhyU','production','company','appCode','847916bpSXnF','../../core/api-client.js','inherit','dir','../../skills/runtime-skill-sync.js','error','skillCode'];a26_0x5c3f=function(){return _0x34b90d;};return a26_0x5c3f();}import{CliErrors}from'../../errors.js';function a26_0x35ba(_0x3392b5,_0x3d5a0e){_0x3392b5=_0x3392b5-0x7d;const _0x5c3f0d=a26_0x5c3f();let _0x35ba5c=_0x5c3f0d[_0x3392b5];return _0x35ba5c;}import{logger}from'../../utils/logger.js';const CODE_FLAG={'name':a26_0x37f8eb(0x81),'type':a26_0x37f8eb(0x8d),'description':a26_0x37f8eb(0x93)},DIR_FLAG={'name':a26_0x37f8eb(0xaf),'type':a26_0x37f8eb(0x8d),'required':!![],'description':'Local\x20Skill\x20directory\x20containing\x20SKILL.md'};function summarizeRuntimeSkill(_0x378e72){const _0x42b7a5=a26_0x37f8eb;return{'id':_0x378e72['id'],'skillCode':_0x378e72['skillCode'],'skillName':_0x378e72[_0x42b7a5(0x9f)],'scope':_0x378e72['scope'],'version':_0x378e72[_0x42b7a5(0x84)],'readonly':_0x378e72['readonly']};}function filterByCode(_0x26f64a,_0x307f54){const _0x45a5a3=a26_0x37f8eb,_0x3a47df=_0x307f54['trim']();if(!_0x3a47df)return _0x26f64a;return _0x26f64a['filter'](_0x4ade99=>_0x4ade99[_0x45a5a3(0xb2)]===_0x3a47df);}export const skillDefinitions=[{'service':a26_0x37f8eb(0x9c),'command':a26_0x37f8eb(0x89),'description':'Install\x20the\x20published\x20'+CLI_BIN_NAME+'\x20developer\x20skill','risk':a26_0x37f8eb(0xa0),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x5ee161){const _0xa4579=a26_0x37f8eb;logger[_0xa4579(0x9b)](process[_0xa4579(0xa3)]()),logger['info'](_0xa4579(0x94),'Installing\x20published\x20'+CLI_DISPLAY_NAME+_0xa4579(0x87));const {LOVRABET_SKILL_SOURCE:_0x241dce,LOVRABET_SKIP_NPX_SKILLS_ENV:_0x5888b4,runNpxSkillsAddGlobal:_0xb4a1e9}=await import('../../skills/npx-skills-add.js'),_0x3243cf=_0x5ee161[_0xa4579(0x92)]?_0xa4579(0x91):_0xa4579(0xae);console[_0xa4579(0x83)]('Installing\x20official\x20skill\x20via\x20npx\x20(npx\x20skills\x20add\x20'+_0x241dce+'\x20-g\x20-y)...');const _0x396433=_0xb4a1e9(process[_0xa4579(0xa3)](),_0x241dce,{'stdio':_0x3243cf});if(_0x396433[_0xa4579(0xb5)])console[_0xa4579(0x83)](_0xa4579(0x9a)+_0x5888b4+_0xa4579(0xa6));else{if(_0x396433['ok'])console[_0xa4579(0x83)](CLI_BIN_NAME+'\x20skill\x20installed');else throw CliErrors['apiError'](_0xa4579(0x86)+(_0x396433[_0xa4579(0xb1)]||_0xa4579(0x7f)),'Check\x20network\x20connectivity\x20and\x20try\x20again.');}return{'ok':!![]};}},{'service':a26_0x37f8eb(0x9c),'command':a26_0x37f8eb(0x8b),'description':a26_0x37f8eb(0xa7),'risk':a26_0x37f8eb(0xa0),'flags':[CODE_FLAG],async 'execute'(_0x273f95){const _0x195c56=a26_0x37f8eb,{listCompanyRuntimeSkills:_0x589af2,listPersonalRuntimeSkills:_0x3fa2a3}=await import(_0x195c56(0xad)),{linkEffectiveRuntimeSkills:_0x10f94e,materializeRuntimeSkill:_0x232a5d}=await import(_0x195c56(0xb0)),_0x472066=_0x273f95[_0x195c56(0x7d)]('code'),_0x5a74f=_0x273f95[_0x195c56(0x85)]??_0x195c56(0xa9),_0x4663fe=_0x273f95[_0x195c56(0x90)];if(!_0x4663fe)throw CliErrors[_0x195c56(0xa1)]();const _0x5e69d2=filterByCode(await _0x3fa2a3(_0x273f95[_0x195c56(0xab)]),_0x472066),_0x5c0565=filterByCode(await _0x589af2(_0x273f95['appCode']),_0x472066),_0x3fa43f=[..._0x5e69d2[_0x195c56(0x98)](_0x2106f4=>_0x232a5d(_0x2106f4,'personal',{'env':_0x5a74f,'accessKey':_0x4663fe,'appCode':_0x273f95[_0x195c56(0xab)]})),..._0x5c0565[_0x195c56(0x98)](_0x47b9bc=>_0x232a5d(_0x47b9bc,_0x195c56(0xaa),{'env':_0x5a74f,'accessKey':_0x4663fe,'appCode':_0x273f95[_0x195c56(0xab)]}))],_0xf7d386=_0x10f94e(_0x3fa43f,_0x273f95[_0x195c56(0xab)]),_0x454c25=_0xf7d386[_0x195c56(0x8c)]((_0x20326f,_0x418212)=>{const _0x1dd603=_0x195c56;return _0x20326f[_0x418212[_0x1dd603(0x80)]]=(_0x20326f[_0x418212[_0x1dd603(0x80)]]??0x0)+0x1,_0x20326f;},{});return{'ok':!![],'data':{'appCode':_0x273f95[_0x195c56(0xab)],'personal':_0x5e69d2['length'],'company':_0x5c0565['length'],'materialized':_0x3fa43f[_0x195c56(0x8e)],'links':{'total':_0xf7d386[_0x195c56(0x8e)],'created':_0x454c25[_0x195c56(0x95)]??0x0,'updated':_0x454c25['updated']??0x0,'unchanged':_0x454c25[_0x195c56(0xb3)]??0x0,'skipped':0x0,'conflicted':0x0},'skills':{'personal':_0x5e69d2['map'](summarizeRuntimeSkill),'company':_0x5c0565[_0x195c56(0x98)](summarizeRuntimeSkill)}},'message':_0x195c56(0x82)+_0x5e69d2[_0x195c56(0x8e)]+'\x20personal\x20and\x20'+_0x5c0565[_0x195c56(0x8e)]+_0x195c56(0xa4)};}},{'service':'skill','command':a26_0x37f8eb(0x8a),'description':a26_0x37f8eb(0x88),'risk':a26_0x37f8eb(0xa0),'flags':[DIR_FLAG],async 'execute'(_0x2a7207){const _0x5eacfd=a26_0x37f8eb,{createPersonalRuntimeSkill:_0x44dccf,listPersonalRuntimeSkills:_0x55b1ee,updatePersonalRuntimeSkill:_0x1efb03}=await import('../../core/api-client.js'),{readPushDirectory:_0x4eecfa}=await import(_0x5eacfd(0xb0));if(!_0x2a7207[_0x5eacfd(0x90)])throw CliErrors['authRequired']();const _0x19c623=_0x4eecfa(_0x2a7207[_0x5eacfd(0x7d)](_0x5eacfd(0xaf)),_0x2a7207[_0x5eacfd(0xab)]),_0x3b68cb=(await _0x55b1ee(_0x2a7207['appCode']))[_0x5eacfd(0x9e)](_0x4280e7=>_0x4280e7['skillCode']===_0x19c623[_0x5eacfd(0xb2)]),_0x2d05ed=_0x3b68cb?await _0x1efb03(_0x19c623[_0x5eacfd(0xb2)],_0x2a7207[_0x5eacfd(0xab)],_0x19c623[_0x5eacfd(0x99)]):await _0x44dccf(_0x2a7207[_0x5eacfd(0xab)],_0x19c623[_0x5eacfd(0x99)]);return{'ok':!![],'data':summarizeRuntimeSkill(_0x2d05ed),'message':_0x3b68cb?_0x5eacfd(0xa2)+_0x19c623[_0x5eacfd(0xb2)]:_0x5eacfd(0x8f)+_0x19c623[_0x5eacfd(0xb2)]};}}];
1
+ const a26_0x208f3f=a26_0x5103;(function(_0x57391,_0x1dcef1){const _0xbd55b4=a26_0x5103,_0xec083e=_0x57391();while(!![]){try{const _0x9cdeed=parseInt(_0xbd55b4(0x145))/0x1*(parseInt(_0xbd55b4(0x129))/0x2)+-parseInt(_0xbd55b4(0x118))/0x3+parseInt(_0xbd55b4(0x119))/0x4+parseInt(_0xbd55b4(0x11e))/0x5*(-parseInt(_0xbd55b4(0x14b))/0x6)+-parseInt(_0xbd55b4(0x14d))/0x7*(-parseInt(_0xbd55b4(0x11a))/0x8)+parseInt(_0xbd55b4(0x133))/0x9*(-parseInt(_0xbd55b4(0x13c))/0xa)+parseInt(_0xbd55b4(0x12c))/0xb;if(_0x9cdeed===_0x1dcef1)break;else _0xec083e['push'](_0xec083e['shift']());}catch(_0x13d949){_0xec083e['push'](_0xec083e['shift']());}}}(a26_0x48c5,0x46759));import{CLI_BIN_NAME,CLI_DISPLAY_NAME}from'../../constant/cli.js';function a26_0x5103(_0x17a3ab,_0x144969){_0x17a3ab=_0x17a3ab-0x103;const _0x48c5a9=a26_0x48c5();let _0x5103a8=_0x48c5a9[_0x17a3ab];return _0x5103a8;}import{CliErrors}from'../../errors.js';import{logger}from'../../utils/logger.js';const CODE_FLAG={'name':a26_0x208f3f(0x107),'type':a26_0x208f3f(0x117),'description':a26_0x208f3f(0x104)},DIR_FLAG={'name':a26_0x208f3f(0x14e),'type':a26_0x208f3f(0x117),'required':!![],'description':'Local\x20Skill\x20directory\x20containing\x20SKILL.md'};function summarizeRuntimeSkill(_0x4b4ac2){const _0x1fb4bb=a26_0x208f3f;return{'id':_0x4b4ac2['id'],'skillCode':_0x4b4ac2['skillCode'],'skillName':_0x4b4ac2[_0x1fb4bb(0x116)],'scope':_0x4b4ac2['scope'],'version':_0x4b4ac2[_0x1fb4bb(0x150)],'readonly':_0x4b4ac2[_0x1fb4bb(0x11c)]};}function a26_0x48c5(){const _0x18eed4=['validation','24kRYBqF','Pulled\x20','\x20developer\x20skill','2792317QaZbfq','Upgrade\x20the\x20runtime\x20service\x20before\x20pushing\x20multi-file\x20Skill\x20directories.','unchanged','personal','setLogPath','Push\x20a\x20local\x20Skill\x20directory\x20to\x20personal\x20runtime\x20Skill\x20scope','\x20personal\x20and\x20','5787EhZVHY','authRequired','Backend\x20returned\x20a\x20different\x20multi-file\x20Skill\x20manifest\x20after\x20push.','files','log','filter','npx\x20skills\x20add\x20failed:\x20','Pull\x20personal\x20and\x20company\x20runtime\x20Skills\x20into\x20local\x20agent\x20skill\x20directories','unknown','190hzmMHd','inherit','install','\x20company\x20Skill(s).','input','isArray','find','accessKey','write','24086YMfLHQ','updated','apiError','Updated\x20personal\x20Skill\x20','path','../../skills/npx-skills-add.js','2450562iQSADH','skill-install','210yGgdPO','dir','skill','version','\x20-g\x20-y)...','company','Only\x20pull\x20a\x20specific\x20runtime\x20Skill\x20code','skillCode','production','code','Check\x20the\x20runtime\x20service\x20Skill\x20file\x20manifest\x20storage\x20before\x20pulling\x20this\x20Skill.','cwd','pipe','info','reduce','../../core/api-client.js','Created\x20personal\x20Skill\x20','appCode','length','push','Install\x20the\x20published\x20','trim','map','skipped','skillName','string','1426158XvEmEm','2135608wdPIFC','28760JqVaqF','str','readonly','=1);\x20assuming\x20skill\x20is\x20already\x20present.','5zhySFr','Check\x20network\x20connectivity\x20and\x20try\x20again.','Installing\x20published\x20','../../skills/runtime-skill-sync.js','action','\x20skill\x20via\x20npx.','SKILL.md','pull','Installing\x20official\x20skill\x20via\x20npx\x20(npx\x20skills\x20add\x20','Backend\x20did\x20not\x20persist\x20the\x20multi-file\x20Skill\x20manifest.'];a26_0x48c5=function(){return _0x18eed4;};return a26_0x48c5();}function filterByCode(_0x9642ab,_0x1a7255){const _0x4d1f77=a26_0x208f3f,_0x276740=_0x1a7255[_0x4d1f77(0x113)]();if(!_0x276740)return _0x9642ab;return _0x9642ab[_0x4d1f77(0x138)](_0x638ceb=>_0x638ceb[_0x4d1f77(0x105)]===_0x276740);}export const skillDefinitions=[{'service':a26_0x208f3f(0x14f),'command':a26_0x208f3f(0x13e),'description':a26_0x208f3f(0x112)+CLI_BIN_NAME+a26_0x208f3f(0x12b),'risk':a26_0x208f3f(0x144),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x3b72ce){const _0x11f1b8=a26_0x208f3f;logger[_0x11f1b8(0x130)](process[_0x11f1b8(0x109)]()),logger[_0x11f1b8(0x10b)](_0x11f1b8(0x14c),_0x11f1b8(0x120)+CLI_DISPLAY_NAME+_0x11f1b8(0x123));const {LOVRABET_SKILL_SOURCE:_0x3d32aa,LOVRABET_SKIP_NPX_SKILLS_ENV:_0x249db4,runNpxSkillsAddGlobal:_0x2880f2}=await import(_0x11f1b8(0x14a)),_0xb8549=_0x3b72ce['nonInteractive']?_0x11f1b8(0x10a):_0x11f1b8(0x13d);console['log'](_0x11f1b8(0x126)+_0x3d32aa+_0x11f1b8(0x151));const _0x5a5da7=_0x2880f2(process[_0x11f1b8(0x109)](),_0x3d32aa,{'stdio':_0xb8549});if(_0x5a5da7[_0x11f1b8(0x115)])console[_0x11f1b8(0x137)]('Skipped\x20npx\x20('+_0x249db4+_0x11f1b8(0x11d));else{if(_0x5a5da7['ok'])console[_0x11f1b8(0x137)](CLI_BIN_NAME+'\x20skill\x20installed');else throw CliErrors[_0x11f1b8(0x147)](_0x11f1b8(0x139)+(_0x5a5da7['error']||_0x11f1b8(0x13b)),_0x11f1b8(0x11f));}return{'ok':!![]};}},{'service':a26_0x208f3f(0x14f),'command':a26_0x208f3f(0x125),'description':a26_0x208f3f(0x13a),'risk':a26_0x208f3f(0x144),'flags':[CODE_FLAG],async 'execute'(_0x49283c){const _0x5b66b4=a26_0x208f3f,{listCompanyRuntimeSkills:_0x5b3f2f,listPersonalRuntimeSkills:_0x4bb002}=await import(_0x5b66b4(0x10d)),{linkEffectiveRuntimeSkills:_0x44f617,materializeRuntimeSkill:_0x5a94b2}=await import(_0x5b66b4(0x121)),_0x21a7b3=_0x49283c['str']('code'),_0x3b28b9=_0x49283c['envName']??_0x5b66b4(0x106),_0x578119=_0x49283c['accessKey'];if(!_0x578119)throw CliErrors[_0x5b66b4(0x134)]();const _0x37e3f9=filterByCode(await _0x4bb002(_0x49283c[_0x5b66b4(0x10f)]),_0x21a7b3),_0x588774=filterByCode(await _0x5b3f2f(_0x49283c[_0x5b66b4(0x10f)]),_0x21a7b3),_0x339409=[..._0x37e3f9[_0x5b66b4(0x114)](_0x1a6921=>_0x5a94b2(_0x1a6921,_0x5b66b4(0x12f),{'env':_0x3b28b9,'accessKey':_0x578119,'appCode':_0x49283c['appCode']})),..._0x588774[_0x5b66b4(0x114)](_0x21649e=>_0x5a94b2(_0x21649e,_0x5b66b4(0x103),{'env':_0x3b28b9,'accessKey':_0x578119,'appCode':_0x49283c[_0x5b66b4(0x10f)]}))],_0xca2ee4=_0x44f617(_0x339409,_0x49283c['appCode']),_0x308aa8=_0xca2ee4[_0x5b66b4(0x10c)]((_0x379df4,_0x22e7ff)=>{const _0x2753db=_0x5b66b4;return _0x379df4[_0x22e7ff[_0x2753db(0x122)]]=(_0x379df4[_0x22e7ff[_0x2753db(0x122)]]??0x0)+0x1,_0x379df4;},{});return{'ok':!![],'data':{'appCode':_0x49283c[_0x5b66b4(0x10f)],'personal':_0x37e3f9['length'],'company':_0x588774[_0x5b66b4(0x110)],'materialized':_0x339409[_0x5b66b4(0x110)],'links':{'total':_0xca2ee4[_0x5b66b4(0x110)],'created':_0x308aa8['created']??0x0,'updated':_0x308aa8[_0x5b66b4(0x146)]??0x0,'unchanged':_0x308aa8[_0x5b66b4(0x12e)]??0x0,'skipped':0x0,'conflicted':0x0},'skills':{'personal':_0x37e3f9[_0x5b66b4(0x114)](summarizeRuntimeSkill),'company':_0x588774['map'](summarizeRuntimeSkill)}},'message':_0x5b66b4(0x12a)+_0x37e3f9['length']+_0x5b66b4(0x132)+_0x588774[_0x5b66b4(0x110)]+_0x5b66b4(0x13f)};}},{'service':'skill','command':a26_0x208f3f(0x111),'description':a26_0x208f3f(0x131),'risk':'write','flags':[DIR_FLAG],async 'execute'(_0x227b71){const _0xc9f340=a26_0x208f3f,{createPersonalRuntimeSkill:_0x34d259,listPersonalRuntimeSkills:_0x3a87cd,updatePersonalRuntimeSkill:_0x3739d7}=await import(_0xc9f340(0x10d)),{fileTreeHash:_0x465c24,readPushDirectory:_0xa12372,recordPushedRuntimeSkill:_0x5a6161}=await import(_0xc9f340(0x121));if(!_0x227b71[_0xc9f340(0x143)])throw CliErrors[_0xc9f340(0x134)]();const _0x4ff56f=_0xa12372(_0x227b71['str'](_0xc9f340(0x14e)),_0x227b71[_0xc9f340(0x10f)]),_0x983212=(await _0x3a87cd(_0x227b71[_0xc9f340(0x10f)]))[_0xc9f340(0x142)](_0x4cab1f=>_0x4cab1f['skillCode']===_0x4ff56f['skillCode']),_0x1715ce=_0x983212?await _0x3739d7(_0x4ff56f[_0xc9f340(0x105)],_0x227b71[_0xc9f340(0x10f)],_0x4ff56f[_0xc9f340(0x140)]):await _0x34d259(_0x227b71[_0xc9f340(0x10f)],_0x4ff56f[_0xc9f340(0x140)]);return assertMultiFilePushPersisted(_0x4ff56f[_0xc9f340(0x140)][_0xc9f340(0x136)],_0x1715ce,_0x465c24),_0x5a6161(_0x227b71[_0xc9f340(0x11b)](_0xc9f340(0x14e)),_0x1715ce,_0x227b71[_0xc9f340(0x10f)]),{'ok':!![],'data':summarizeRuntimeSkill(_0x1715ce),'message':_0x983212?_0xc9f340(0x148)+_0x4ff56f[_0xc9f340(0x105)]:_0xc9f340(0x10e)+_0x4ff56f[_0xc9f340(0x105)]};}}];function assertMultiFilePushPersisted(_0x380c03,_0x2398af,_0x3a152a){const _0x910fa3=a26_0x208f3f,_0x1ce6a1=Array[_0x910fa3(0x141)](_0x380c03)&&_0x380c03['some'](_0x1eb875=>_0x1eb875[_0x910fa3(0x149)]!=='SKILL.md');if(!_0x1ce6a1)return;if(!Array[_0x910fa3(0x141)](_0x2398af[_0x910fa3(0x136)])||!_0x2398af[_0x910fa3(0x136)]['some'](_0x508420=>_0x508420[_0x910fa3(0x149)]!==_0x910fa3(0x124)))throw CliErrors[_0x910fa3(0x128)](_0x910fa3(0x127),_0x910fa3(0x12d));if(_0x3a152a(_0x380c03)!==_0x3a152a(_0x2398af[_0x910fa3(0x136)]))throw CliErrors[_0x910fa3(0x128)](_0x910fa3(0x135),_0x910fa3(0x108));}
@@ -1 +1 @@
1
- const a27_0x7e526c=a27_0x342f;function a27_0x1dcd(){const _0x17c1cf=['detail','430JpENqc','Get\x20custom\x20SQL\x20query\x20details\x20by\x20sqlCode','54927XzppjD','str','read','965615fhfpdx','5844708xLpVoc','1513152yqCmUN','sqlCode','sqlName','20MabClP','sql','description','10119lzYxMj','dbId','8WtcSpv','3237430xrRQqN','appCode','886920rTGKSM'];a27_0x1dcd=function(){return _0x17c1cf;};return a27_0x1dcd();}(function(_0x3d4bfb,_0x3fbfe3){const _0x6a5859=a27_0x342f,_0x1cd089=_0x3d4bfb();while(!![]){try{const _0x3a07ad=parseInt(_0x6a5859(0xa5))/0x1+parseInt(_0x6a5859(0x9d))/0x2*(-parseInt(_0x6a5859(0xa0))/0x3)+-parseInt(_0x6a5859(0xae))/0x4+-parseInt(_0x6a5859(0xa3))/0x5+parseInt(_0x6a5859(0xad))/0x6+parseInt(_0x6a5859(0xac))/0x7*(parseInt(_0x6a5859(0xa2))/0x8)+parseInt(_0x6a5859(0xa9))/0x9*(-parseInt(_0x6a5859(0xa7))/0xa);if(_0x3a07ad===_0x3fbfe3)break;else _0x1cd089['push'](_0x1cd089['shift']());}catch(_0x18067c){_0x1cd089['push'](_0x1cd089['shift']());}}}(a27_0x1dcd,0xa54ba));function a27_0x342f(_0x5f0749,_0x263ac4){_0x5f0749=_0x5f0749-0x9d;const _0x1dcd1e=a27_0x1dcd();let _0x342f75=_0x1dcd1e[_0x5f0749];return _0x342f75;}import{getSqlQueryInfo}from'../../core/api-client.js';import{getDbName}from'../../core/db-resolver.js';import{SQLCODE_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';export const sqlDetail={'service':a27_0x7e526c(0x9e),'command':a27_0x7e526c(0xa6),'description':a27_0x7e526c(0xa8),'risk':a27_0x7e526c(0xab),'flags':[SQLCODE_FLAG,VERBOSE_FLAG],async 'execute'(_0x1bca78){const _0x55e312=a27_0x7e526c,_0x29450c=await getSqlQueryInfo(_0x1bca78[_0x55e312(0xa4)],_0x1bca78[_0x55e312(0xaa)]('sqlcode')),_0x5682ac=_0x1bca78['bool']('verbose');if(_0x5682ac)return{'ok':!![],'data':_0x29450c};const _0x128bb2=_0x29450c[_0x55e312(0xa1)]?await getDbName(_0x1bca78['appCode'],_0x29450c['dbId']):undefined;return{'ok':!![],'data':{'sqlCode':_0x29450c[_0x55e312(0xaf)],'sqlName':_0x29450c[_0x55e312(0xb0)],'db':_0x128bb2?_0x128bb2+'\x20('+_0x29450c['dbId']+')':_0x29450c[_0x55e312(0xa1)]??'','description':_0x29450c[_0x55e312(0x9f)]??'','sqlContent':_0x29450c['sqlContent']??''}};}};
1
+ const a27_0x58a816=a27_0x3e9e;(function(_0x4c842e,_0x4800d4){const _0x59b54e=a27_0x3e9e,_0x2aa5d5=_0x4c842e();while(!![]){try{const _0x4024bf=parseInt(_0x59b54e(0x16b))/0x1*(-parseInt(_0x59b54e(0x163))/0x2)+-parseInt(_0x59b54e(0x15e))/0x3*(-parseInt(_0x59b54e(0x167))/0x4)+parseInt(_0x59b54e(0x15f))/0x5+parseInt(_0x59b54e(0x161))/0x6+-parseInt(_0x59b54e(0x168))/0x7*(parseInt(_0x59b54e(0x15a))/0x8)+-parseInt(_0x59b54e(0x15b))/0x9+-parseInt(_0x59b54e(0x15d))/0xa*(-parseInt(_0x59b54e(0x162))/0xb);if(_0x4024bf===_0x4800d4)break;else _0x2aa5d5['push'](_0x2aa5d5['shift']());}catch(_0x36d08a){_0x2aa5d5['push'](_0x2aa5d5['shift']());}}}(a27_0x9067,0xea4a7));import{getSqlQueryInfo}from'../../core/api-client.js';import{getDbName}from'../../core/db-resolver.js';function a27_0x9067(){const _0x3e3aad=['sql','4AFoobe','12887EZVgpG','verbose','description','884463gpilIa','Get\x20custom\x20SQL\x20query\x20details\x20by\x20sqlCode','sqlCode','dbId','4112zVXyYq','5678208iyQtWa','bool','36010RcqnUJ','5176299IryQaG','4185050AYDZXG','sqlName','4721046buFOLQ','220ujAPCt','2lRGFSq','read','sqlContent'];a27_0x9067=function(){return _0x3e3aad;};return a27_0x9067();}function a27_0x3e9e(_0xb76f00,_0x102d84){_0xb76f00=_0xb76f00-0x159;const _0x906736=a27_0x9067();let _0x3e9e64=_0x906736[_0xb76f00];return _0x3e9e64;}import{SQLCODE_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';export const sqlDetail={'service':a27_0x58a816(0x166),'command':'detail','description':a27_0x58a816(0x16c),'risk':a27_0x58a816(0x164),'flags':[SQLCODE_FLAG,VERBOSE_FLAG],async 'execute'(_0x138793){const _0x2126ff=a27_0x58a816,_0x200960=await getSqlQueryInfo(_0x138793['appCode'],_0x138793['str']('sqlcode')),_0x35f641=_0x138793[_0x2126ff(0x15c)](_0x2126ff(0x169));if(_0x35f641)return{'ok':!![],'data':_0x200960};const _0x4b7062=_0x200960['dbId']?await getDbName(_0x138793['appCode'],_0x200960['dbId']):undefined;return{'ok':!![],'data':{'sqlCode':_0x200960[_0x2126ff(0x16d)],'sqlName':_0x200960[_0x2126ff(0x160)],'db':_0x4b7062?_0x4b7062+'\x20('+_0x200960['dbId']+')':_0x200960[_0x2126ff(0x159)]??'','description':_0x200960[_0x2126ff(0x16a)]??'','sqlContent':_0x200960[_0x2126ff(0x165)]??''}};}};