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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/lib/cli.js +1 -1
  2. package/lib/commands/api-doc/index.js +1 -0
  3. package/lib/commands/app/cache.js +1 -1
  4. package/lib/commands/app/definitions.js +1 -1
  5. package/lib/commands/app/mock-loader.js +1 -1
  6. package/lib/commands/app/remote-source.js +1 -1
  7. package/lib/commands/app/shared.js +1 -1
  8. package/lib/commands/artifact/index.js +1 -0
  9. package/lib/commands/auth/index.js +1 -1
  10. package/lib/commands/auth/prompt.js +1 -1
  11. package/lib/commands/bff/detail.js +1 -1
  12. package/lib/commands/bff/exec.js +1 -1
  13. package/lib/commands/bff/index.js +1 -1
  14. package/lib/commands/common/config-policy.js +1 -1
  15. package/lib/commands/common/constraints.js +1 -1
  16. package/lib/commands/common/flags.js +1 -1
  17. package/lib/commands/config/definitions.js +1 -1
  18. package/lib/commands/config/shared.js +1 -1
  19. package/lib/commands/data/index.js +1 -1
  20. package/lib/commands/dataset/detail.js +1 -1
  21. package/lib/commands/dataset/index.js +1 -1
  22. package/lib/commands/dataset/list.js +1 -1
  23. package/lib/commands/dataset/sdk-doc.js +1 -0
  24. package/lib/commands/doctor.js +1 -1
  25. package/lib/commands/init.js +1 -1
  26. package/lib/commands/kb/index.js +1 -1
  27. package/lib/commands/logs/index.js +1 -1
  28. package/lib/commands/personal-bff/index.js +1 -0
  29. package/lib/commands/registry.js +1 -1
  30. package/lib/commands/schema.js +1 -1
  31. package/lib/commands/skill/index.js +1 -1
  32. package/lib/commands/sql/detail.js +1 -1
  33. package/lib/commands/sql/exec.js +1 -1
  34. package/lib/commands/sql/index.js +1 -1
  35. package/lib/commands/update.js +1 -1
  36. package/lib/config/schema.js +1 -1
  37. package/lib/constant/auth-mode.js +1 -1
  38. package/lib/constant/cli.js +1 -1
  39. package/lib/constant/defaults.js +1 -1
  40. package/lib/constant/distribution.js +1 -1
  41. package/lib/constant/domain.js +1 -1
  42. package/lib/constant/env.js +1 -1
  43. package/lib/constant/output.js +1 -1
  44. package/lib/constant/product.js +1 -1
  45. package/lib/constant/risk.js +1 -1
  46. package/lib/constant/url.js +1 -1
  47. package/lib/context.js +1 -1
  48. package/lib/core/api-client.js +1 -1
  49. package/lib/core/db-resolver.js +1 -1
  50. package/lib/core/sdk-client.js +1 -1
  51. package/lib/errors.js +1 -1
  52. package/lib/framework/build-all-flags.js +1 -1
  53. package/lib/framework/dryrun.js +1 -1
  54. package/lib/framework/flags.js +1 -1
  55. package/lib/framework/help.js +1 -1
  56. package/lib/framework/index.js +1 -1
  57. package/lib/framework/output.js +1 -1
  58. package/lib/framework/preparse.js +1 -1
  59. package/lib/framework/response.js +1 -1
  60. package/lib/framework/runner-confirmation.js +1 -1
  61. package/lib/framework/runner-error.js +1 -1
  62. package/lib/framework/runner.js +1 -1
  63. package/lib/framework/schema-export.js +1 -1
  64. package/lib/framework/types.js +1 -1
  65. package/lib/help.js +1 -1
  66. package/lib/skills/npx-skills-add.js +1 -1
  67. package/lib/skills/runtime-skill-sync.js +1 -1
  68. package/lib/utils/apply-jq-filter.js +1 -1
  69. package/lib/utils/logger.js +1 -1
  70. package/lib/utils/params.js +1 -1
  71. package/lib/utils/platform.js +1 -1
  72. package/lib/utils/version.js +1 -1
  73. package/lib/utils/write-cli-side-channel.js +1 -1
  74. package/package.json +3 -3
@@ -1 +1 @@
1
- (function(_0x14a68a,_0x5f5757){var _0x548820=a15_0x11f2,_0x3a5fe7=_0x14a68a();while(!![]){try{var _0x3e825f=-parseInt(_0x548820(0x140))/0x1*(-parseInt(_0x548820(0x13e))/0x2)+parseInt(_0x548820(0x139))/0x3*(parseInt(_0x548820(0x138))/0x4)+-parseInt(_0x548820(0x141))/0x5*(parseInt(_0x548820(0x13b))/0x6)+-parseInt(_0x548820(0x13a))/0x7+-parseInt(_0x548820(0x142))/0x8*(parseInt(_0x548820(0x13f))/0x9)+parseInt(_0x548820(0x13c))/0xa+parseInt(_0x548820(0x13d))/0xb;if(_0x3e825f===_0x5f5757)break;else _0x3a5fe7['push'](_0x3a5fe7['shift']());}catch(_0x14b4a1){_0x3a5fe7['push'](_0x3a5fe7['shift']());}}}(a15_0x3726,0x1f29d));import{CLI_BIN_NAME}from'../../constant/cli.js';function a15_0x3726(){var _0x2e7e24=['1126244rkNyrk','827778TyYAuM','732490iZVZas','3550052PSQnWI','10994adjlRa','10593uPcGPi','22fJPIMr','5axTfOy','1144onVTKJ','311584WyvkBp','3UGyEbS'];a15_0x3726=function(){return _0x2e7e24;};return a15_0x3726();}export{CLI_BIN_NAME};export{readScopedConfig,writeScopedConfig}from'../../context.js';function a15_0x11f2(_0x12f157,_0x3c3dee){_0x12f157=_0x12f157-0x138;var _0x3726d3=a15_0x3726();var _0x11f227=_0x3726d3[_0x12f157];return _0x11f227;}export{resolveConfigScope as resolveWriteScope,TOP_LEVEL_CONFIG_KEYS as TOP_LEVEL_KEYS,CONFIG_ENUM_VALUES as ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,toScopeFlags}from'../../commands/common/config-policy.js';
1
+ function a17_0x724b(_0x385260,_0x16f1b8){_0x385260=_0x385260-0x13a;var _0x2bf421=a17_0x2bf4();var _0x724b7a=_0x2bf421[_0x385260];return _0x724b7a;}(function(_0x4b700a,_0x306476){var _0x287273=a17_0x724b,_0x464aae=_0x4b700a();while(!![]){try{var _0x4e44d3=-parseInt(_0x287273(0x13d))/0x1*(parseInt(_0x287273(0x13e))/0x2)+-parseInt(_0x287273(0x144))/0x3*(-parseInt(_0x287273(0x143))/0x4)+parseInt(_0x287273(0x145))/0x5*(parseInt(_0x287273(0x140))/0x6)+parseInt(_0x287273(0x13a))/0x7+-parseInt(_0x287273(0x13b))/0x8+parseInt(_0x287273(0x13f))/0x9*(-parseInt(_0x287273(0x142))/0xa)+-parseInt(_0x287273(0x13c))/0xb*(parseInt(_0x287273(0x141))/0xc);if(_0x4e44d3===_0x306476)break;else _0x464aae['push'](_0x464aae['shift']());}catch(_0xf39955){_0x464aae['push'](_0x464aae['shift']());}}}(a17_0x2bf4,0x2ac96));function a17_0x2bf4(){var _0x42d3ea=['11CfIsVf','201rGaGXW','1226znqlTx','8523LxTySt','6QiwSGo','1099992lhOHDi','2890rUwoZG','11620tVbZNM','174isyeOd','1296285XjZkzx','2171729fwvvUL','593424gYiMsO'];a17_0x2bf4=function(){return _0x42d3ea;};return a17_0x2bf4();}import{CLI_BIN_NAME}from'../../constant/cli.js';export{CLI_BIN_NAME};export{readScopedConfig,writeScopedConfig}from'../../context.js';export{resolveConfigScope as resolveWriteScope,TOP_LEVEL_CONFIG_KEYS as TOP_LEVEL_KEYS,CONFIG_ENUM_VALUES as ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,toScopeFlags}from'../../commands/common/config-policy.js';
@@ -1 +1 @@
1
- const a16_0x189ea2=a16_0x453b;(function(_0x26704a,_0x15c5c0){const _0x4c06df=a16_0x453b,_0x4871e6=_0x26704a();while(!![]){try{const _0x108d61=-parseInt(_0x4c06df(0x226))/0x1*(-parseInt(_0x4c06df(0x200))/0x2)+-parseInt(_0x4c06df(0x1ee))/0x3+parseInt(_0x4c06df(0x1f4))/0x4+parseInt(_0x4c06df(0x1ed))/0x5+parseInt(_0x4c06df(0x205))/0x6*(parseInt(_0x4c06df(0x221))/0x7)+-parseInt(_0x4c06df(0x204))/0x8+parseInt(_0x4c06df(0x1fa))/0x9;if(_0x108d61===_0x15c5c0)break;else _0x4871e6['push'](_0x4871e6['shift']());}catch(_0x140cd8){_0x4871e6['push'](_0x4871e6['shift']());}}}(a16_0x598d,0x8b665));function a16_0x453b(_0x2b7223,_0x1e042e){_0x2b7223=_0x2b7223-0x1e1;const _0x598d39=a16_0x598d();let _0x453bac=_0x598d39[_0x2b7223];return _0x453bac;}import{executeData}from'../../core/sdk-client.js';function a16_0x598d(){const _0x3c6c71=['\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}}','5326165jGeSVJ','2656041ciTkuL','\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','Create\x20multiple\x20records\x20in\x20one\x20request\x20(SDK\x20batchCreate)','now','\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]','3020004xxyZft','getOne','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20','JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','\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}','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','1838340rgCOrT','read','high-risk-write','JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20Example:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27','\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}','Example:\x20\x27{\x22aggregate\x22:[{\x22field\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','28kWBLMT','POST','\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\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}','8007608PwpEWy','2572098uKjQwE','Delete\x20a\x20record\x20(requires\x20--yes\x20in\x20non-interactive)','filter','\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}}','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)','\x20\x20\x20\x20Correct:\x20\x20--params\x20\x27{\x22currentPage\x22:1,\x22pageSize\x22:10}\x27','\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}}','operation','\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]}}','\x20\x20PARAMS\x20STRUCTURE','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','\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','aggregate','command','\x20\x20\x20\x20Pagination\x20is\x20controlled\x20via\x20JSON\x20in\x20--params.\x20Do\x20NOT\x20use\x20--page-size\x20as\x20a\x20CLI\x20flag.','\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\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','\x20on\x20dataset\x20','batchCreate','\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}}]}','params','helpExtra','body','write','\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\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}','7xuVHfE','\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\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}','join','\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}}','293aIBBbS','Preview:\x20data\x20','/api/{appCode}/','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter','\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\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','\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}}]}','JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','paramsHint','\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\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}}','data\x20','create','\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}','str','code','update','description'];a16_0x598d=function(){return _0x3c6c71;};return a16_0x598d();}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_0x189ea2(0x207),'operation':a16_0x189ea2(0x207),'risk':'read','paramsRequired':![],'description':'Filter\x20dataset\x20records\x20with\x20query\x20conditions','paramsHint':a16_0x189ea2(0x1f6)+'Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','helpExtra':['\x20\x20WHERE\x20OPERATORS','\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}}',a16_0x189ea2(0x1e3),a16_0x189ea2(0x1e4),a16_0x189ea2(0x20b),a16_0x189ea2(0x1ef),a16_0x189ea2(0x1ec),a16_0x189ea2(0x20d),a16_0x189ea2(0x208),a16_0x189ea2(0x225),a16_0x189ea2(0x21f),'','\x20\x20LOGICAL\x20COMBINATORS',a16_0x189ea2(0x22c),a16_0x189ea2(0x21a),'',a16_0x189ea2(0x1f9),a16_0x189ea2(0x209),a16_0x189ea2(0x202),a16_0x189ea2(0x22a),'\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)',a16_0x189ea2(0x216),'','\x20\x20PAGINATION',a16_0x189ea2(0x214),a16_0x189ea2(0x20a),'\x20\x20\x20\x20Wrong:\x20\x20\x20\x20--page-size\x2010\x20\x20(this\x20is\x20not\x20a\x20valid\x20flag)']['join']('\x0a')},{'command':a16_0x189ea2(0x1f5),'operation':a16_0x189ea2(0x1f5),'risk':'read','paramsRequired':!![],'description':'Get\x20a\x20single\x20record\x20by\x20ID','paramsHint':a16_0x189ea2(0x20f)},{'command':a16_0x189ea2(0x1e6),'operation':'create','risk':'write','paramsRequired':!![],'description':'Create\x20a\x20new\x20record\x20in\x20a\x20dataset','paramsHint':a16_0x189ea2(0x1e1)},{'command':a16_0x189ea2(0x219),'operation':'batchCreate','risk':a16_0x189ea2(0x21e),'paramsRequired':!![],'description':a16_0x189ea2(0x1f1),'paramsHint':a16_0x189ea2(0x1f7)},{'command':a16_0x189ea2(0x1ea),'operation':'update','risk':a16_0x189ea2(0x21e),'paramsRequired':!![],'description':'Update\x20an\x20existing\x20record','paramsHint':a16_0x189ea2(0x1fd)},{'command':'delete','operation':a16_0x189ea2(0x1f0),'risk':a16_0x189ea2(0x1fc),'paramsRequired':!![],'description':a16_0x189ea2(0x206),'paramsHint':a16_0x189ea2(0x20f)},{'command':a16_0x189ea2(0x212),'operation':'aggregate','risk':a16_0x189ea2(0x1fb),'paramsRequired':![],'description':'Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','paramsHint':'JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20'+a16_0x189ea2(0x1ff),'helpExtra':['\x20\x20AGGREGATE\x20TYPES',a16_0x189ea2(0x1e7),a16_0x189ea2(0x220),'\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_0x189ea2(0x223),a16_0x189ea2(0x1f8),a16_0x189ea2(0x1fe),a16_0x189ea2(0x203),'',a16_0x189ea2(0x20e),a16_0x189ea2(0x1f3),a16_0x189ea2(0x217),a16_0x189ea2(0x215),a16_0x189ea2(0x222),'\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}}',a16_0x189ea2(0x210),'',a16_0x189ea2(0x211),'\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status','\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','',a16_0x189ea2(0x229),a16_0x189ea2(0x22b)][a16_0x189ea2(0x224)]('\x0a')}];function makeDataCommand(_0x1b6457){const _0x23e6d5=a16_0x189ea2,_0x3f11e1=_0x23e6d5(0x1e5)+_0x1b6457['command'],_0xc0a14b={'service':'data','command':_0x1b6457[_0x23e6d5(0x213)],'description':_0x1b6457['description'],'risk':_0x1b6457['risk'],'helpExtra':_0x1b6457[_0x23e6d5(0x21c)],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x1b6457[_0x23e6d5(0x1e2)]}],'validate':async _0x100aa1=>{const _0x31d87e=_0x23e6d5;_0x1b6457['paramsRequired']&&requireAnyOf(_0x100aa1,[_0x31d87e(0x21b)],_0x3f11e1),_0x1b6457[_0x31d87e(0x20c)]==='batchCreate'&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x100aa1[_0x31d87e(0x1e8)]('params')));},async 'execute'(_0x75dddd){const _0x9ecfb=_0x23e6d5,_0x13d8fb=_0x75dddd[_0x9ecfb(0x1e8)]('code'),_0x439960=_0x1b6457[_0x9ecfb(0x20c)]===_0x9ecfb(0x219)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x75dddd[_0x9ecfb(0x1e8)](_0x9ecfb(0x21b)))):parseJsonParams(_0x75dddd[_0x9ecfb(0x1e8)](_0x9ecfb(0x21b)))??{},_0x5b9edb=Date[_0x9ecfb(0x1f2)](),_0x508194=await executeData(_0x13d8fb,_0x1b6457[_0x9ecfb(0x20c)],_0x439960),_0x4d36fd=Date[_0x9ecfb(0x1f2)]()-_0x5b9edb;return{'ok':!![],'data':{'result':_0x508194,'elapsed':_0x4d36fd},'message':_0x9ecfb(0x1e5)+_0x1b6457[_0x9ecfb(0x213)]+'\x20completed\x20in\x20'+_0x4d36fd+'ms'};}};return _0x1b6457['risk']!==_0x23e6d5(0x1fb)&&(_0xc0a14b['dryRun']=async _0x1e982b=>{const _0x1f087b=_0x23e6d5,_0x5d0702=_0x1e982b[_0x1f087b(0x1e8)](_0x1f087b(0x1e9)),_0x378bf8=_0x1b6457[_0x1f087b(0x20c)]===_0x1f087b(0x219)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x1e982b[_0x1f087b(0x1e8)](_0x1f087b(0x21b)))):parseJsonParams(_0x1e982b['str']('params'))??{};return dryRun(_0x1f087b(0x201),_0x1f087b(0x228)+_0x5d0702+'/'+_0x1b6457[_0x1f087b(0x20c)])[_0x1f087b(0x21d)](_0x378bf8)[_0x1f087b(0x1eb)](_0x1f087b(0x227)+_0x1b6457['command']+_0x1f087b(0x218)+_0x5d0702)['build']();}),_0xc0a14b;}export const dataDefinitions=specs['map'](makeDataCommand);
1
+ function a18_0x4373(){const _0x5afabc=['1654856jAEFBo','\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}','\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}}','\x20completed\x20in\x20','\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}]','body','now','Create\x20a\x20new\x20record\x20in\x20a\x20dataset','7250988nAUQrd','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','high-risk-write','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20','Create\x20multiple\x20records\x20in\x20one\x20request\x20(SDK\x20batchCreate)','\x20\x20AGGREGATE\x20TYPES','risk','/api/{appCode}/','\x20\x20WHERE\x20OPERATORS','\x20\x20LOGICAL\x20COMBINATORS','aggregate','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)','paramsRequired','Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','\x20\x20EXAMPLES','join','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','\x20\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]','description','\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]','Filter\x20dataset\x20records\x20with\x20query\x20conditions','str','getOne','data\x20','operation','\x20on\x20dataset\x20','1417964JTuqgc','493656IdSrzY','Example:\x20\x27{\x22aggregate\x22:[{\x22field\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','\x20\x20\x20\x20Pagination\x20is\x20controlled\x20via\x20JSON\x20in\x20--params.\x20Do\x20NOT\x20use\x20--page-size\x20as\x20a\x20CLI\x20flag.','command','\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\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\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','write','\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]}}','\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}}','11546808iABtfo','dryRun','\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}','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','4781804UkdNWn','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','\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}}','\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\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}','read','\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status','filter','\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\x20Wrong:\x20\x20\x20\x20--page-size\x2010\x20\x20(this\x20is\x20not\x20a\x20valid\x20flag)','\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','POST','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)','\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}}]}','\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}','params','Get\x20a\x20single\x20record\x20by\x20ID','data','update','create','JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20','\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\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}','helpExtra','map','Update\x20an\x20existing\x20record','delete','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','\x20\x20PAGINATION','paramsHint','\x20\x20\x20\x20Correct:\x20\x20--params\x20\x27{\x22currentPage\x22:1,\x22pageSize\x22:10}\x27','4400940oHAXTL','batchCreate','build','code','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22total\x22:\x22desc\x22}]'];a18_0x4373=function(){return _0x5afabc;};return a18_0x4373();}const a18_0x56b9c1=a18_0x582a;(function(_0x48bbd9,_0xad7a1a){const _0x778d1f=a18_0x582a,_0x41fda9=_0x48bbd9();while(!![]){try{const _0x29bc8c=-parseInt(_0x778d1f(0x131))/0x1+-parseInt(_0x778d1f(0x10d))/0x2+-parseInt(_0x778d1f(0x132))/0x3+parseInt(_0x778d1f(0x140))/0x4+-parseInt(_0x778d1f(0x15f))/0x5+parseInt(_0x778d1f(0x115))/0x6+parseInt(_0x778d1f(0x13c))/0x7;if(_0x29bc8c===_0xad7a1a)break;else _0x41fda9['push'](_0x41fda9['shift']());}catch(_0x248b33){_0x41fda9['push'](_0x41fda9['shift']());}}}(a18_0x4373,0xba5e1));import{executeData}from'../../core/sdk-client.js';import{CODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';function a18_0x582a(_0x22af3c,_0x2c320a){_0x22af3c=_0x22af3c-0x10a;const _0x43731a=a18_0x4373();let _0x582a4b=_0x43731a[_0x22af3c];return _0x582a4b;}import{requireAnyOf}from'../../commands/common/constraints.js';import{parseJsonParams,parseJsonParamsValue,parseBatchCreateItemsFromParams}from'../../utils/params.js';import{dryRun}from'../../framework/dryrun.js';const specs=[{'command':a18_0x56b9c1(0x147),'operation':a18_0x56b9c1(0x147),'risk':a18_0x56b9c1(0x145),'paramsRequired':![],'description':a18_0x56b9c1(0x12b),'paramsHint':a18_0x56b9c1(0x119)+a18_0x56b9c1(0x117),'helpExtra':[a18_0x56b9c1(0x11e),a18_0x56b9c1(0x10f),a18_0x56b9c1(0x137),'\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}}',a18_0x56b9c1(0x142),'\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}}','\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}}',a18_0x56b9c1(0x13a),'\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}}','\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\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}}','',a18_0x56b9c1(0x11f),a18_0x56b9c1(0x14d),a18_0x56b9c1(0x143),'',a18_0x56b9c1(0x116),a18_0x56b9c1(0x14c),a18_0x56b9c1(0x155),a18_0x56b9c1(0x111),a18_0x56b9c1(0x127),a18_0x56b9c1(0x15b),'',a18_0x56b9c1(0x15c),a18_0x56b9c1(0x134),a18_0x56b9c1(0x15e),a18_0x56b9c1(0x149)]['join']('\x0a')},{'command':'getOne','operation':a18_0x56b9c1(0x12d),'risk':a18_0x56b9c1(0x145),'paramsRequired':!![],'description':a18_0x56b9c1(0x150),'paramsHint':a18_0x56b9c1(0x13f)},{'command':a18_0x56b9c1(0x153),'operation':'create','risk':a18_0x56b9c1(0x139),'paramsRequired':!![],'description':a18_0x56b9c1(0x114),'paramsHint':'JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27'},{'command':'batchCreate','operation':'batchCreate','risk':'write','paramsRequired':!![],'description':a18_0x56b9c1(0x11a),'paramsHint':'JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27'},{'command':a18_0x56b9c1(0x152),'operation':a18_0x56b9c1(0x152),'risk':'write','paramsRequired':!![],'description':a18_0x56b9c1(0x159),'paramsHint':'JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20Example:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27'},{'command':'delete','operation':a18_0x56b9c1(0x15a),'risk':a18_0x56b9c1(0x118),'paramsRequired':!![],'description':'Delete\x20a\x20record\x20(requires\x20--yes\x20in\x20non-interactive)','paramsHint':a18_0x56b9c1(0x13f)},{'command':a18_0x56b9c1(0x120),'operation':a18_0x56b9c1(0x120),'risk':a18_0x56b9c1(0x145),'paramsRequired':![],'description':a18_0x56b9c1(0x123),'paramsHint':a18_0x56b9c1(0x154)+a18_0x56b9c1(0x133),'helpExtra':[a18_0x56b9c1(0x11b),a18_0x56b9c1(0x144),a18_0x56b9c1(0x13e),a18_0x56b9c1(0x10e),a18_0x56b9c1(0x148),a18_0x56b9c1(0x156),a18_0x56b9c1(0x136),a18_0x56b9c1(0x14e),'','\x20\x20PARAMS\x20STRUCTURE',a18_0x56b9c1(0x12a),a18_0x56b9c1(0x141),a18_0x56b9c1(0x121),a18_0x56b9c1(0x128),a18_0x56b9c1(0x13b),a18_0x56b9c1(0x10c),'',a18_0x56b9c1(0x124),a18_0x56b9c1(0x146),a18_0x56b9c1(0x14a),'',a18_0x56b9c1(0x126),a18_0x56b9c1(0x138)][a18_0x56b9c1(0x125)]('\x0a')}];function makeDataCommand(_0x503245){const _0x314172=a18_0x56b9c1,_0x35d55b=_0x314172(0x12e)+_0x503245['command'],_0x4f3eb3={'service':_0x314172(0x151),'command':_0x503245[_0x314172(0x135)],'description':_0x503245['description'],'risk':_0x503245['risk'],'helpExtra':_0x503245[_0x314172(0x157)],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x503245[_0x314172(0x15d)]}],'validate':async _0x170d25=>{const _0x3c75ac=_0x314172;_0x503245[_0x3c75ac(0x122)]&&requireAnyOf(_0x170d25,[_0x3c75ac(0x14f)],_0x35d55b),_0x503245[_0x3c75ac(0x12f)]===_0x3c75ac(0x160)&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x170d25['str'](_0x3c75ac(0x14f))));},async 'execute'(_0x338972){const _0x2cc59f=_0x314172,_0x16ae83=_0x338972['str'](_0x2cc59f(0x10b)),_0x18cae5=_0x503245[_0x2cc59f(0x12f)]===_0x2cc59f(0x160)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x338972[_0x2cc59f(0x12c)](_0x2cc59f(0x14f)))):parseJsonParams(_0x338972[_0x2cc59f(0x12c)](_0x2cc59f(0x14f)))??{},_0x650186=Date['now'](),_0x3fdfd6=await executeData(_0x16ae83,_0x503245[_0x2cc59f(0x12f)],_0x18cae5),_0x181240=Date[_0x2cc59f(0x113)]()-_0x650186;return{'ok':!![],'data':{'result':_0x3fdfd6,'elapsed':_0x181240},'message':_0x2cc59f(0x12e)+_0x503245[_0x2cc59f(0x135)]+_0x2cc59f(0x110)+_0x181240+'ms'};}};return _0x503245[_0x314172(0x11c)]!==_0x314172(0x145)&&(_0x4f3eb3[_0x314172(0x13d)]=async _0x22a372=>{const _0x40a541=_0x314172,_0x43b484=_0x22a372[_0x40a541(0x12c)](_0x40a541(0x10b)),_0x1ee55b=_0x503245['operation']===_0x40a541(0x160)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x22a372['str'](_0x40a541(0x14f)))):parseJsonParams(_0x22a372[_0x40a541(0x12c)](_0x40a541(0x14f)))??{};return dryRun(_0x40a541(0x14b),_0x40a541(0x11d)+_0x43b484+'/'+_0x503245[_0x40a541(0x12f)])[_0x40a541(0x112)](_0x1ee55b)[_0x40a541(0x129)]('Preview:\x20data\x20'+_0x503245[_0x40a541(0x135)]+_0x40a541(0x130)+_0x43b484)[_0x40a541(0x10a)]();}),_0x4f3eb3;}export const dataDefinitions=specs[a18_0x56b9c1(0x158)](makeDataCommand);
@@ -1 +1 @@
1
- const a17_0x56c223=a17_0x5b4b;(function(_0x37d5d0,_0xf8e202){const _0x121779=a17_0x5b4b,_0x2fd1ab=_0x37d5d0();while(!![]){try{const _0x5ba697=-parseInt(_0x121779(0x1d5))/0x1+parseInt(_0x121779(0x1bc))/0x2*(parseInt(_0x121779(0x1c7))/0x3)+parseInt(_0x121779(0x1ba))/0x4+parseInt(_0x121779(0x1cc))/0x5*(-parseInt(_0x121779(0x1d2))/0x6)+parseInt(_0x121779(0x1dc))/0x7*(parseInt(_0x121779(0x19b))/0x8)+-parseInt(_0x121779(0x1b5))/0x9*(parseInt(_0x121779(0x195))/0xa)+-parseInt(_0x121779(0x19c))/0xb*(parseInt(_0x121779(0x1c4))/0xc);if(_0x5ba697===_0xf8e202)break;else _0x2fd1ab['push'](_0x2fd1ab['shift']());}catch(_0x22ea8f){_0x2fd1ab['push'](_0x2fd1ab['shift']());}}}(a17_0x2ddc,0x1a47e));function a17_0x5b4b(_0x4075ef,_0x43c1b1){_0x4075ef=_0x4075ef-0x190;const _0x2ddcc4=a17_0x2ddc();let _0x5b4bc1=_0x2ddcc4[_0x4075ef];return _0x5b4bc1;}import{getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';function normalizeField(_0x40a265){const _0x40934b=a17_0x5b4b;if(_0x40a265[_0x40934b(0x1c9)])return null;const _0x32ac7a=Boolean(_0x40a265[_0x40934b(0x191)]!==undefined||_0x40a265[_0x40934b(0x1bd)]!==undefined);let _0x394e20={};if(!_0x32ac7a&&typeof _0x40a265[_0x40934b(0x1d8)]===_0x40934b(0x1d0))try{_0x394e20=JSON['parse'](_0x40a265[_0x40934b(0x1d8)]);}catch{}const _0x1fcc48=_0x32ac7a?_0x40a265[_0x40934b(0x1c3)]:_0x40a265[_0x40934b(0x1a0)],_0x481e81=_0x32ac7a?_0x40a265[_0x40934b(0x191)]:_0x40a265[_0x40934b(0x1c3)],_0x2286f5=_0x32ac7a?_0x40a265['doType']:_0x40a265[_0x40934b(0x1d1)]||_0x40a265[_0x40934b(0x1b1)],_0xdf99ac=_0x32ac7a?_0x40a265[_0x40934b(0x1b7)]===!![]:_0x394e20[_0x40934b(0x1b7)]===!![],_0x184334=_0x32ac7a?_0x40a265[_0x40934b(0x1c2)]===!![]:_0x394e20['required']===!![],_0x32cfd3=_0x32ac7a?_0x40a265[_0x40934b(0x1ab)]??null:_0x394e20[_0x40934b(0x1ab)]??null,_0x13c300={'name':_0x1fcc48,'displayName':_0x481e81||_0x1fcc48,'type':_0x2286f5,'dbType':_0x40a265[_0x40934b(0x192)],'pk':_0xdf99ac,'required':_0x184334,'description':_0x40a265[_0x40934b(0x190)]||undefined};return Array[_0x40934b(0x1a3)](_0x32cfd3)&&_0x32cfd3[_0x40934b(0x1d7)]>0x0&&(_0x13c300['options']=_0x32cfd3),_0x13c300;}function parseJsonMaybe(_0x16c580){const _0x5bbb79=a17_0x5b4b;if(typeof _0x16c580!==_0x5bbb79(0x1d0))return _0x16c580;try{return JSON[_0x5bbb79(0x1c0)](_0x16c580);}catch{return _0x16c580;}}function a17_0x2ddc(){const _0x38b73d=['detail','host','beforeScriptId','dataType','modifierIdField','relations','find','9LFJjCQ','fields','pkField','responseFields','doVersion','760800DYdpdi','updateTimeField','2BvevdM','doType','toTableName','columnCodeListWithDeleted','parse','modelCode','required','name','1740kIucdY','dbtableConfig','formatRules','433326wcRkzn','toFieldLabel','deleted','dataset','relatedPageInfoList','55RnYymu','trim','modifierNameField','indexes','string','type','97758LEVCwh','afterScriptId','dblinkInfoDTO','9315hmbBgR','toDatasetName','length','extend','requestBody','validateRules','datasetKey','620998yBrxmP','properties','description','displayName','dbType','creatorIdField','path','275570UnIIDV','tableName','responseBody','map','split','dbName','8szjnuR','7557gdTtFm','allFields','filter','str','code','dbId','push','isArray','tableComment','read','fromField','object','entries','labelField','appCode','options','title','requestFields'];a17_0x2ddc=function(){return _0x38b73d;};return a17_0x2ddc();}function normalizeOperationEntry(_0x37264d,_0x477984){const _0x258eaa=a17_0x5b4b;if(!_0x477984||typeof _0x477984!=='object')return null;if(!_0x477984['method']||!_0x477984[_0x258eaa(0x194)])return null;const _0x34d319={'name':_0x37264d,'method':_0x477984['method'],'path':_0x477984[_0x258eaa(0x194)]};if(_0x477984[_0x258eaa(0x1af)])_0x34d319[_0x258eaa(0x1af)]=_0x477984[_0x258eaa(0x1af)];if(_0x477984['requestBody']!=null)_0x34d319['requestBody']=parseJsonMaybe(_0x477984[_0x258eaa(0x1d9)]);if(_0x477984[_0x258eaa(0x197)]!=null)_0x34d319[_0x258eaa(0x197)]=parseJsonMaybe(_0x477984[_0x258eaa(0x197)]);if(_0x477984[_0x258eaa(0x1b0)]!=null)_0x34d319['beforeScriptId']=_0x477984[_0x258eaa(0x1b0)];if(_0x477984[_0x258eaa(0x1d3)]!=null)_0x34d319[_0x258eaa(0x1d3)]=_0x477984[_0x258eaa(0x1d3)];if(Array[_0x258eaa(0x1a3)](_0x477984[_0x258eaa(0x1ad)]))_0x34d319['requestFields']=_0x477984[_0x258eaa(0x1ad)];if(Array[_0x258eaa(0x1a3)](_0x477984[_0x258eaa(0x1b8)]))_0x34d319[_0x258eaa(0x1b8)]=_0x477984[_0x258eaa(0x1b8)];return _0x34d319;}function summarizeDbtable(_0x46d207){const _0xa951ef=a17_0x5b4b,_0x2087bc={},_0x388c9c=[_0xa951ef(0x1a1),_0xa951ef(0x19a),_0xa951ef(0x196),_0xa951ef(0x1db),_0xa951ef(0x1b7),_0xa951ef(0x19d),'logicField','createTimeField',_0xa951ef(0x1bb),_0xa951ef(0x193),'creatorNameField',_0xa951ef(0x1b2),_0xa951ef(0x1ce),_0xa951ef(0x1a9),_0xa951ef(0x1d4)];for(const _0x1ba43d of _0x388c9c){if(_0x46d207[_0x1ba43d]!==undefined)_0x2087bc[_0x1ba43d]=_0x46d207[_0x1ba43d];}return typeof _0x2087bc['allFields']===_0xa951ef(0x1d0)&&_0x2087bc[_0xa951ef(0x19d)]['length']>0x0&&(_0x2087bc['allFieldNames']=_0x2087bc[_0xa951ef(0x19d)][_0xa951ef(0x199)](',')['map'](_0x43e6eb=>_0x43e6eb[_0xa951ef(0x1cd)]())[_0xa951ef(0x19e)](Boolean)),_0x2087bc;}function normalizeRelatedPages(_0x3d5dbd){const _0x25c77d=a17_0x5b4b;if(!Array[_0x25c77d(0x1a3)](_0x3d5dbd))return[];return _0x3d5dbd[_0x25c77d(0x19e)](_0x3afb07=>_0x3afb07&&typeof _0x3afb07===_0x25c77d(0x1a7))[_0x25c77d(0x198)](_0xa46bd0=>({'id':_0xa46bd0['id'],'type':_0xa46bd0[_0x25c77d(0x1d1)],'code':_0xa46bd0[_0x25c77d(0x1a0)],'title':_0xa46bd0[_0x25c77d(0x1ac)],'deleted':_0xa46bd0[_0x25c77d(0x1c9)]===!![]}));}function normalizeFallbackFieldName(_0x4554f8,_0x5f0268){const _0x409263=a17_0x5b4b,_0x102229=_0x4554f8[_0x409263(0x1cd)]();if(!_0x102229)return null;return{'name':_0x102229,'displayName':_0x102229,'type':undefined,'dbType':undefined,'pk':_0x102229===_0x5f0268,'required':![],'description':undefined};}async function loadListFieldFallback(_0x5c6423,_0x61104d){const _0x2247be=a17_0x5b4b;if(!_0x5c6423||!_0x61104d)return[];try{const _0x1e4011=await listDatasets(_0x5c6423,{'code':_0x61104d}),_0x237b71=_0x1e4011[_0x2247be(0x1b4)](_0x22750b=>_0x22750b[_0x2247be(0x1a0)]===_0x61104d)??_0x1e4011[0x0],_0x6b8d14=_0x237b71?.[_0x2247be(0x1c5)]??{},_0x3a06b0=typeof _0x6b8d14[_0x2247be(0x19d)]===_0x2247be(0x1d0)?_0x6b8d14[_0x2247be(0x19d)][_0x2247be(0x199)](','):[];return _0x3a06b0[_0x2247be(0x198)](_0x330627=>normalizeFallbackFieldName(_0x330627,_0x6b8d14['pkField']))[_0x2247be(0x19e)](_0x25f435=>_0x25f435!==null);}catch{return[];}}export const datasetDetail={'service':'dataset','command':a17_0x56c223(0x1ae),'description':'Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','risk':a17_0x56c223(0x1a5),'flags':[CODE_FLAG],async 'execute'(_0x3c44ff){const _0x459f43=a17_0x56c223,_0x1b3b0a=await getDatasetDetail(_0x3c44ff[_0x459f43(0x19f)]('code')),_0x3a2aa5=Array[_0x459f43(0x1a3)](_0x1b3b0a[_0x459f43(0x1b6)])?_0x1b3b0a[_0x459f43(0x1b6)]:Array[_0x459f43(0x1a3)](_0x1b3b0a[_0x459f43(0x1dd)])?_0x1b3b0a[_0x459f43(0x1dd)]:[];let _0x39b913=_0x3a2aa5[_0x459f43(0x198)](_0x1bc3e2=>normalizeField(_0x1bc3e2))[_0x459f43(0x19e)](_0x5a936b=>_0x5a936b!==null);_0x39b913[_0x459f43(0x1d7)]===0x0&&(_0x39b913=await loadListFieldFallback(_0x3c44ff[_0x459f43(0x1aa)],_0x3c44ff[_0x459f43(0x19f)](_0x459f43(0x1a0))));const _0x5214ee=_0x1b3b0a['operations']??{},_0x4227f9=[];for(const [_0x425f5e,_0x58f4d1]of Object[_0x459f43(0x1a8)](_0x5214ee)){const _0x49f4b0=normalizeOperationEntry(_0x425f5e,_0x58f4d1);if(_0x49f4b0)_0x4227f9[_0x459f43(0x1a2)](_0x49f4b0);}const _0x144eec=_0x1b3b0a['dbtableConfig']??{},_0x5447d6=_0x1b3b0a[_0x459f43(0x1ca)]??{},_0x34a24b=_0x144eec[_0x459f43(0x1a1)]!=null?{'id':_0x144eec[_0x459f43(0x1a1)],'name':_0x144eec[_0x459f43(0x19a)]??null}:undefined;let _0x168768;return typeof _0x1b3b0a['extend']===_0x459f43(0x1d0)&&(_0x168768=parseJsonMaybe(_0x1b3b0a['extend'])),{'ok':!![],'data':{'id':_0x1b3b0a['modelId']??_0x1b3b0a['id'],'name':_0x1b3b0a[_0x459f43(0x1c3)],'code':_0x1b3b0a[_0x459f43(0x1c1)]||_0x1b3b0a['code'],'doVersion':_0x1b3b0a[_0x459f43(0x1b9)],'description':_0x1b3b0a[_0x459f43(0x190)]||_0x5447d6[_0x459f43(0x1a4)]||undefined,'source':_0x1b3b0a['source']||_0x5447d6['sourceType'],'table':_0x144eec[_0x459f43(0x196)]||_0x5447d6[_0x459f43(0x196)],'datasetKey':_0x144eec['datasetKey'],'pk':_0x144eec[_0x459f43(0x1b7)],'db':_0x34a24b,'dbtable':summarizeDbtable(_0x144eec),'fields':_0x39b913,'operations':_0x4227f9,'indexes':Array[_0x459f43(0x1a3)](_0x5447d6['indexes'])?_0x5447d6[_0x459f43(0x1cf)]:[],'relations':Array[_0x459f43(0x1a3)](_0x1b3b0a[_0x459f43(0x1b3)])?_0x1b3b0a[_0x459f43(0x1b3)]['map'](_0x47bfa3=>({'fromField':_0x47bfa3[_0x459f43(0x1a6)],'toDataset':_0x47bfa3[_0x459f43(0x1d6)],'toCode':_0x47bfa3['toDatasetCode'],'toTable':_0x47bfa3[_0x459f43(0x1be)],'toField':_0x47bfa3['toField'],'labelField':_0x47bfa3[_0x459f43(0x1c8)]||undefined})):[],'relatedPages':normalizeRelatedPages(_0x1b3b0a[_0x459f43(0x1cb)]),...Array[_0x459f43(0x1a3)](_0x1b3b0a[_0x459f43(0x1bf)])?{'columnCodeListWithDeleted':_0x1b3b0a[_0x459f43(0x1bf)]}:{},'formatRules':Array[_0x459f43(0x1a3)](_0x1b3b0a[_0x459f43(0x1c6)])?_0x1b3b0a[_0x459f43(0x1c6)]:[],'validateRules':Array[_0x459f43(0x1a3)](_0x1b3b0a['validateRules'])?_0x1b3b0a[_0x459f43(0x1da)]:[],..._0x168768!==undefined?{'extend':_0x168768}:{},'stats':{'fieldCount':_0x39b913[_0x459f43(0x1d7)],'operationCount':_0x4227f9['length']}}};}};
1
+ const a19_0x408fdd=a19_0x27ad;(function(_0x24cfcb,_0x526a7f){const _0x34fd28=a19_0x27ad,_0x54e036=_0x24cfcb();while(!![]){try{const _0x485974=parseInt(_0x34fd28(0x131))/0x1+parseInt(_0x34fd28(0xfa))/0x2*(-parseInt(_0x34fd28(0x145))/0x3)+parseInt(_0x34fd28(0x103))/0x4*(-parseInt(_0x34fd28(0x11d))/0x5)+parseInt(_0x34fd28(0xfe))/0x6+parseInt(_0x34fd28(0x146))/0x7+parseInt(_0x34fd28(0x10e))/0x8*(-parseInt(_0x34fd28(0x134))/0x9)+-parseInt(_0x34fd28(0x126))/0xa*(-parseInt(_0x34fd28(0x11b))/0xb);if(_0x485974===_0x526a7f)break;else _0x54e036['push'](_0x54e036['shift']());}catch(_0x44c7f1){_0x54e036['push'](_0x54e036['shift']());}}}(a19_0x3ba1,0x71f7d));import{getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';function a19_0x3ba1(){const _0x14d018=['dataType','modifierIdField','indexes','string','doType','modelId','trim','columnCodeListWithDeleted','split','sourceType','toFieldLabel','code','description','method','host','dbtableConfig','2358921TciuhK','4432064uJRyvM','isArray','2CxWCAq','path','parse','entries','92610TfPsCa','pkField','datasetKey','dblinkInfoDTO','dbName','1732LOkyNg','properties','str','validateRules','logicField','formatRules','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','tableComment','beforeScriptId','afterScriptId','relatedPageInfoList','11768VAnTwh','creatorIdField','modifierNameField','fromField','operations','requestFields','required','requestBody','responseBody','deleted','relations','responseFields','allFields','11AajItq','createTimeField','2315jqYLCx','length','toDatasetCode','title','map','displayName','type','toDatasetName','tableName','14769230VKheEe','filter','extend','appCode','allFieldNames','options','dbId','name','dbType','toTableName','find','209218WXmOHU','labelField','toField','5391gviiZN'];a19_0x3ba1=function(){return _0x14d018;};return a19_0x3ba1();}function normalizeField(_0x2231d1){const _0x13eec5=a19_0x27ad;if(_0x2231d1[_0x13eec5(0x117)])return null;const _0x36c33f=Boolean(_0x2231d1[_0x13eec5(0x122)]!==undefined||_0x2231d1[_0x13eec5(0x139)]!==undefined);let _0x40098c={};if(!_0x36c33f&&typeof _0x2231d1[_0x13eec5(0x128)]===_0x13eec5(0x138))try{_0x40098c=JSON[_0x13eec5(0xfc)](_0x2231d1[_0x13eec5(0x128)]);}catch{}const _0x5cd3f0=_0x36c33f?_0x2231d1[_0x13eec5(0x12d)]:_0x2231d1[_0x13eec5(0x140)],_0x2c9241=_0x36c33f?_0x2231d1[_0x13eec5(0x122)]:_0x2231d1[_0x13eec5(0x12d)],_0x25a3b4=_0x36c33f?_0x2231d1[_0x13eec5(0x139)]:_0x2231d1[_0x13eec5(0x123)]||_0x2231d1[_0x13eec5(0x135)],_0x39cfaf=_0x36c33f?_0x2231d1[_0x13eec5(0xff)]===!![]:_0x40098c[_0x13eec5(0xff)]===!![],_0x54415e=_0x36c33f?_0x2231d1[_0x13eec5(0x114)]===!![]:_0x40098c[_0x13eec5(0x114)]===!![],_0x5c9762=_0x36c33f?_0x2231d1[_0x13eec5(0x12b)]??null:_0x40098c[_0x13eec5(0x12b)]??null,_0x2c929c={'name':_0x5cd3f0,'displayName':_0x2c9241||_0x5cd3f0,'type':_0x25a3b4,'dbType':_0x2231d1[_0x13eec5(0x12e)],'pk':_0x39cfaf,'required':_0x54415e,'description':_0x2231d1[_0x13eec5(0x141)]||undefined};return Array[_0x13eec5(0x147)](_0x5c9762)&&_0x5c9762[_0x13eec5(0x11e)]>0x0&&(_0x2c929c[_0x13eec5(0x12b)]=_0x5c9762),_0x2c929c;}function parseJsonMaybe(_0x56130e){const _0x18e92c=a19_0x27ad;if(typeof _0x56130e!=='string')return _0x56130e;try{return JSON[_0x18e92c(0xfc)](_0x56130e);}catch{return _0x56130e;}}function normalizeOperationEntry(_0x7d214f,_0x41b70d){const _0x476a20=a19_0x27ad;if(!_0x41b70d||typeof _0x41b70d!=='object')return null;if(!_0x41b70d[_0x476a20(0x142)]||!_0x41b70d[_0x476a20(0xfb)])return null;const _0x47f80a={'name':_0x7d214f,'method':_0x41b70d['method'],'path':_0x41b70d[_0x476a20(0xfb)]};if(_0x41b70d[_0x476a20(0x143)])_0x47f80a[_0x476a20(0x143)]=_0x41b70d[_0x476a20(0x143)];if(_0x41b70d[_0x476a20(0x115)]!=null)_0x47f80a[_0x476a20(0x115)]=parseJsonMaybe(_0x41b70d[_0x476a20(0x115)]);if(_0x41b70d[_0x476a20(0x116)]!=null)_0x47f80a[_0x476a20(0x116)]=parseJsonMaybe(_0x41b70d[_0x476a20(0x116)]);if(_0x41b70d['beforeScriptId']!=null)_0x47f80a[_0x476a20(0x10b)]=_0x41b70d[_0x476a20(0x10b)];if(_0x41b70d[_0x476a20(0x10c)]!=null)_0x47f80a[_0x476a20(0x10c)]=_0x41b70d[_0x476a20(0x10c)];if(Array['isArray'](_0x41b70d[_0x476a20(0x113)]))_0x47f80a[_0x476a20(0x113)]=_0x41b70d['requestFields'];if(Array[_0x476a20(0x147)](_0x41b70d[_0x476a20(0x119)]))_0x47f80a[_0x476a20(0x119)]=_0x41b70d[_0x476a20(0x119)];return _0x47f80a;}function summarizeDbtable(_0x503239){const _0x147297=a19_0x27ad,_0x2f9cb9={},_0xf7b80d=[_0x147297(0x12c),_0x147297(0x102),'tableName',_0x147297(0x100),_0x147297(0xff),_0x147297(0x11a),_0x147297(0x107),_0x147297(0x11c),'updateTimeField',_0x147297(0x10f),'creatorNameField',_0x147297(0x136),_0x147297(0x110),_0x147297(0x132),_0x147297(0x101)];for(const _0x2dc028 of _0xf7b80d){if(_0x503239[_0x2dc028]!==undefined)_0x2f9cb9[_0x2dc028]=_0x503239[_0x2dc028];}return typeof _0x2f9cb9[_0x147297(0x11a)]==='string'&&_0x2f9cb9['allFields'][_0x147297(0x11e)]>0x0&&(_0x2f9cb9[_0x147297(0x12a)]=_0x2f9cb9[_0x147297(0x11a)][_0x147297(0x13d)](',')[_0x147297(0x121)](_0x5ea287=>_0x5ea287[_0x147297(0x13b)]())[_0x147297(0x127)](Boolean)),_0x2f9cb9;}function a19_0x27ad(_0x501ff0,_0x5e5c6c){_0x501ff0=_0x501ff0-0xfa;const _0x3ba109=a19_0x3ba1();let _0x27adf4=_0x3ba109[_0x501ff0];return _0x27adf4;}function normalizeRelatedPages(_0x430514){const _0x8b4534=a19_0x27ad;if(!Array[_0x8b4534(0x147)](_0x430514))return[];return _0x430514['filter'](_0x158b83=>_0x158b83&&typeof _0x158b83==='object')[_0x8b4534(0x121)](_0x48b6b3=>({'id':_0x48b6b3['id'],'type':_0x48b6b3[_0x8b4534(0x123)],'code':_0x48b6b3[_0x8b4534(0x140)],'title':_0x48b6b3[_0x8b4534(0x120)],'deleted':_0x48b6b3[_0x8b4534(0x117)]===!![]}));}function normalizeFallbackFieldName(_0x92a78,_0x448e40){const _0x104b3d=a19_0x27ad,_0x2f5c43=_0x92a78[_0x104b3d(0x13b)]();if(!_0x2f5c43)return null;return{'name':_0x2f5c43,'displayName':_0x2f5c43,'type':undefined,'dbType':undefined,'pk':_0x2f5c43===_0x448e40,'required':![],'description':undefined};}async function loadListFieldFallback(_0x22e0de,_0x56393c){const _0x59c180=a19_0x27ad;if(!_0x22e0de||!_0x56393c)return[];try{const _0x5c77aa=await listDatasets(_0x22e0de,{'code':_0x56393c}),_0x4e304e=_0x5c77aa[_0x59c180(0x130)](_0x135400=>_0x135400[_0x59c180(0x140)]===_0x56393c)??_0x5c77aa[0x0],_0x573bcc=_0x4e304e?.[_0x59c180(0x144)]??{},_0x4771a6=typeof _0x573bcc[_0x59c180(0x11a)]===_0x59c180(0x138)?_0x573bcc[_0x59c180(0x11a)][_0x59c180(0x13d)](','):[];return _0x4771a6[_0x59c180(0x121)](_0x25ba1e=>normalizeFallbackFieldName(_0x25ba1e,_0x573bcc[_0x59c180(0xff)]))['filter'](_0x7b3a90=>_0x7b3a90!==null);}catch{return[];}}export const datasetDetail={'service':'dataset','command':'detail','description':a19_0x408fdd(0x109),'risk':'read','flags':[CODE_FLAG],async 'execute'(_0x5ad33d){const _0x2917d0=a19_0x408fdd,_0x4dd4ca=await getDatasetDetail(_0x5ad33d[_0x2917d0(0x105)](_0x2917d0(0x140))),_0x172fc6=Array['isArray'](_0x4dd4ca['fields'])?_0x4dd4ca['fields']:Array['isArray'](_0x4dd4ca[_0x2917d0(0x104)])?_0x4dd4ca[_0x2917d0(0x104)]:[];let _0x432e33=_0x172fc6[_0x2917d0(0x121)](_0x2fbd43=>normalizeField(_0x2fbd43))['filter'](_0xa55d8b=>_0xa55d8b!==null);_0x432e33[_0x2917d0(0x11e)]===0x0&&(_0x432e33=await loadListFieldFallback(_0x5ad33d[_0x2917d0(0x129)],_0x5ad33d[_0x2917d0(0x105)](_0x2917d0(0x140))));const _0x91162a=_0x4dd4ca[_0x2917d0(0x112)]??{},_0x594cd7=[];for(const [_0x383eb3,_0x17e881]of Object[_0x2917d0(0xfd)](_0x91162a)){const _0x506411=normalizeOperationEntry(_0x383eb3,_0x17e881);if(_0x506411)_0x594cd7['push'](_0x506411);}const _0x29db29=_0x4dd4ca[_0x2917d0(0x144)]??{},_0x34fb3e=_0x4dd4ca['dataset']??{},_0x8b2940=_0x29db29[_0x2917d0(0x12c)]!=null?{'id':_0x29db29['dbId'],'name':_0x29db29['dbName']??null}:undefined;let _0x2d183b;return typeof _0x4dd4ca['extend']===_0x2917d0(0x138)&&(_0x2d183b=parseJsonMaybe(_0x4dd4ca[_0x2917d0(0x128)])),{'ok':!![],'data':{'id':_0x4dd4ca[_0x2917d0(0x13a)]??_0x4dd4ca['id'],'name':_0x4dd4ca[_0x2917d0(0x12d)],'code':_0x4dd4ca['modelCode']||_0x4dd4ca['code'],'doVersion':_0x4dd4ca['doVersion'],'description':_0x4dd4ca[_0x2917d0(0x141)]||_0x34fb3e[_0x2917d0(0x10a)]||undefined,'source':_0x4dd4ca['source']||_0x34fb3e[_0x2917d0(0x13e)],'table':_0x29db29[_0x2917d0(0x125)]||_0x34fb3e[_0x2917d0(0x125)],'datasetKey':_0x29db29[_0x2917d0(0x100)],'pk':_0x29db29[_0x2917d0(0xff)],'db':_0x8b2940,'dbtable':summarizeDbtable(_0x29db29),'fields':_0x432e33,'operations':_0x594cd7,'indexes':Array['isArray'](_0x34fb3e['indexes'])?_0x34fb3e[_0x2917d0(0x137)]:[],'relations':Array['isArray'](_0x4dd4ca['relations'])?_0x4dd4ca[_0x2917d0(0x118)][_0x2917d0(0x121)](_0x672a8a=>({'fromField':_0x672a8a[_0x2917d0(0x111)],'toDataset':_0x672a8a[_0x2917d0(0x124)],'toCode':_0x672a8a[_0x2917d0(0x11f)],'toTable':_0x672a8a[_0x2917d0(0x12f)],'toField':_0x672a8a[_0x2917d0(0x133)],'labelField':_0x672a8a[_0x2917d0(0x13f)]||undefined})):[],'relatedPages':normalizeRelatedPages(_0x4dd4ca[_0x2917d0(0x10d)]),...Array['isArray'](_0x4dd4ca[_0x2917d0(0x13c)])?{'columnCodeListWithDeleted':_0x4dd4ca[_0x2917d0(0x13c)]}:{},'formatRules':Array[_0x2917d0(0x147)](_0x4dd4ca['formatRules'])?_0x4dd4ca[_0x2917d0(0x108)]:[],'validateRules':Array[_0x2917d0(0x147)](_0x4dd4ca[_0x2917d0(0x106)])?_0x4dd4ca[_0x2917d0(0x106)]:[],..._0x2d183b!==undefined?{'extend':_0x2d183b}:{},'stats':{'fieldCount':_0x432e33[_0x2917d0(0x11e)],'operationCount':_0x594cd7[_0x2917d0(0x11e)]}}};}};
@@ -1 +1 @@
1
- (function(_0x387dfc,_0x5ddeff){const _0xb66a7e=a18_0x3c3c,_0x15ff9b=_0x387dfc();while(!![]){try{const _0x500e90=-parseInt(_0xb66a7e(0xf8))/0x1+-parseInt(_0xb66a7e(0xf2))/0x2*(-parseInt(_0xb66a7e(0xf3))/0x3)+parseInt(_0xb66a7e(0xf5))/0x4*(-parseInt(_0xb66a7e(0xf1))/0x5)+-parseInt(_0xb66a7e(0xfb))/0x6+-parseInt(_0xb66a7e(0xf6))/0x7+-parseInt(_0xb66a7e(0xf7))/0x8*(-parseInt(_0xb66a7e(0xf4))/0x9)+parseInt(_0xb66a7e(0xfa))/0xa*(parseInt(_0xb66a7e(0xf9))/0xb);if(_0x500e90===_0x5ddeff)break;else _0x15ff9b['push'](_0x15ff9b['shift']());}catch(_0x43e3ca){_0x15ff9b['push'](_0x15ff9b['shift']());}}}(a18_0x56d3,0x57402));import{datasetList}from'../../commands/dataset/list.js';function a18_0x56d3(){const _0x54a2aa=['4dfTdFq','181737WAiKMh','35703YEfqSm','4LuHHeN','1275722JXhIgP','568GEQtyN','497241PrGMcC','1969JSUXvU','74540ORwpCV','2931858dhAewM','1057865iOnaMm'];a18_0x56d3=function(){return _0x54a2aa;};return a18_0x56d3();}function a18_0x3c3c(_0xf77a3f,_0x3b4f54){_0xf77a3f=_0xf77a3f-0xf1;const _0x56d3c2=a18_0x56d3();let _0x3c3c5b=_0x56d3c2[_0xf77a3f];return _0x3c3c5b;}import{datasetDetail}from'../../commands/dataset/detail.js';export const datasetDefinitions=[datasetList,datasetDetail];
1
+ function a20_0x4843(){const _0x59e2d3=['8bPJyRM','26504080HGFYrK','640220bGGdPg','436475dCilbU','12532941IkBDgk','6850140zZZSuo','3526019YfpMaE','5dhuant','2239004EUsQAG','6QElRxx'];a20_0x4843=function(){return _0x59e2d3;};return a20_0x4843();}(function(_0x52db96,_0x58256b){const _0x4d8602=a20_0x1df5,_0x3b05c5=_0x52db96();while(!![]){try{const _0x31fa59=-parseInt(_0x4d8602(0xc8))/0x1+-parseInt(_0x4d8602(0xc7))/0x2+parseInt(_0x4d8602(0xce))/0x3*(parseInt(_0x4d8602(0xcd))/0x4)+parseInt(_0x4d8602(0xcc))/0x5*(parseInt(_0x4d8602(0xca))/0x6)+-parseInt(_0x4d8602(0xcb))/0x7*(-parseInt(_0x4d8602(0xc5))/0x8)+parseInt(_0x4d8602(0xc9))/0x9+-parseInt(_0x4d8602(0xc6))/0xa;if(_0x31fa59===_0x58256b)break;else _0x3b05c5['push'](_0x3b05c5['shift']());}catch(_0x411e3d){_0x3b05c5['push'](_0x3b05c5['shift']());}}}(a20_0x4843,0xb7381));function a20_0x1df5(_0x1273c3,_0x2aa0ed){_0x1273c3=_0x1273c3-0xc5;const _0x484311=a20_0x4843();let _0x1df52d=_0x484311[_0x1273c3];return _0x1df52d;}import{datasetList}from'../../commands/dataset/list.js';import{datasetDetail}from'../../commands/dataset/detail.js';import{datasetSdkDoc}from'../../commands/dataset/sdk-doc.js';export const datasetDefinitions=[datasetList,datasetDetail,datasetSdkDoc];
@@ -1 +1 @@
1
- function a19_0x1606(){const _0x48d422=['string','code','31899qPgIOK','376670BgswuM','split','tableName','6CWowny','str','111960IKWqSA','pkField','List\x20datasets\x20in\x20the\x20app\x20(supports\x20server-side\x20name/code\x20filtering)','220lTAOhP','length','882453jHQedn','dbtableConfig','appCode','66515XHChea','Filter\x20by\x20dataset\x20code\x20(server-side\x20exact\x20match)','1388412yHBENA','name','map','374336ISoUmk','list','allFields','Filter\x20by\x20dataset\x20name\x20(server-side\x20fuzzy\x20match)','description'];a19_0x1606=function(){return _0x48d422;};return a19_0x1606();}const a19_0x5e2167=a19_0x2c00;function a19_0x2c00(_0x22a9b1,_0x393d2c){_0x22a9b1=_0x22a9b1-0x1b8;const _0x160638=a19_0x1606();let _0x2c000c=_0x160638[_0x22a9b1];return _0x2c000c;}(function(_0x54566d,_0x21132d){const _0x20c241=a19_0x2c00,_0x2ef465=_0x54566d();while(!![]){try{const _0x38131a=-parseInt(_0x20c241(0x1bc))/0x1+-parseInt(_0x20c241(0x1c1))/0x2+parseInt(_0x20c241(0x1c6))/0x3+-parseInt(_0x20c241(0x1c4))/0x4*(-parseInt(_0x20c241(0x1c9))/0x5)+parseInt(_0x20c241(0x1bf))/0x6*(-parseInt(_0x20c241(0x1bb))/0x7)+-parseInt(_0x20c241(0x1ce))/0x8+-parseInt(_0x20c241(0x1cb))/0x9;if(_0x38131a===_0x21132d)break;else _0x2ef465['push'](_0x2ef465['shift']());}catch(_0x59321c){_0x2ef465['push'](_0x2ef465['shift']());}}}(a19_0x1606,0x5e9dd));import{listDatasets}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';export const datasetList={'service':'dataset','command':a19_0x5e2167(0x1cf),'description':a19_0x5e2167(0x1c3),'risk':'read','flags':[{'name':'name','type':a19_0x5e2167(0x1b9),'description':a19_0x5e2167(0x1d1)},{...CODE_FLAG,'required':![],'description':a19_0x5e2167(0x1ca)}],async 'execute'(_0x505885){const _0x4726c9=a19_0x5e2167,_0x185229=_0x505885[_0x4726c9(0x1c0)](_0x4726c9(0x1cc)),_0x19bca1=_0x505885[_0x4726c9(0x1c0)]('code'),_0x1bfbef=await listDatasets(_0x505885[_0x4726c9(0x1c8)],{..._0x185229&&{'name':_0x185229},..._0x19bca1&&{'code':_0x19bca1}});return{'ok':!![],'data':{'total':_0x1bfbef[_0x4726c9(0x1c5)],'datasets':_0x1bfbef[_0x4726c9(0x1cd)](_0x4e301e=>{const _0x366699=_0x4726c9,_0xc2440d=_0x4e301e[_0x366699(0x1c7)]??{};return{'id':_0x4e301e['id'],'code':_0x4e301e[_0x366699(0x1ba)],'name':_0x4e301e[_0x366699(0x1cc)],'source':_0x4e301e['source'],'description':_0x4e301e[_0x366699(0x1b8)],'table':_0xc2440d[_0x366699(0x1be)],'datasetKey':_0xc2440d['datasetKey'],'pk':_0xc2440d[_0x366699(0x1c2)],'fields':_0xc2440d['allFields']?_0xc2440d[_0x366699(0x1d0)][_0x366699(0x1bd)](',')[_0x366699(0x1cd)](_0x47f1bb=>_0x47f1bb['trim']()):[]};})}};}};
1
+ const a21_0x5a034b=a21_0x46d2;function a21_0x46d2(_0x47f8bf,_0x14a391){_0x47f8bf=_0x47f8bf-0x109;const _0x4ba46f=a21_0x4ba4();let _0x46d284=_0x4ba46f[_0x47f8bf];return _0x46d284;}(function(_0x3d72eb,_0x3903c2){const _0x262ee0=a21_0x46d2,_0x22587e=_0x3d72eb();while(!![]){try{const _0x28cb0f=parseInt(_0x262ee0(0x10d))/0x1*(parseInt(_0x262ee0(0x124))/0x2)+-parseInt(_0x262ee0(0x120))/0x3+parseInt(_0x262ee0(0x11f))/0x4+parseInt(_0x262ee0(0x10f))/0x5*(parseInt(_0x262ee0(0x10b))/0x6)+-parseInt(_0x262ee0(0x110))/0x7*(parseInt(_0x262ee0(0x114))/0x8)+parseInt(_0x262ee0(0x122))/0x9+parseInt(_0x262ee0(0x123))/0xa*(parseInt(_0x262ee0(0x11d))/0xb);if(_0x28cb0f===_0x3903c2)break;else _0x22587e['push'](_0x22587e['shift']());}catch(_0xfc9dd0){_0x22587e['push'](_0x22587e['shift']());}}}(a21_0x4ba4,0x706be));function a21_0x4ba4(){const _0x4cfbcd=['pkField','name','40JwcxhJ','list','code','str','string','appCode','dataset','description','trim','5995BjffaU','Filter\x20by\x20dataset\x20code\x20(server-side\x20exact\x20match)','1569568XzgpBR','1142082nJmJny','split','2506941VKukbQ','13250NCCPMN','2VuLbdC','allFields','source','6StWmdR','tableName','141562WFJXwp','Filter\x20by\x20dataset\x20name\x20(server-side\x20fuzzy\x20match)','1003745nMPVpb','1251887WXkFxy','map'];a21_0x4ba4=function(){return _0x4cfbcd;};return a21_0x4ba4();}import{listDatasets}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';export const datasetList={'service':a21_0x5a034b(0x11a),'command':a21_0x5a034b(0x115),'description':'List\x20datasets\x20in\x20the\x20app\x20(supports\x20server-side\x20name/code\x20filtering)','risk':'read','flags':[{'name':a21_0x5a034b(0x113),'type':a21_0x5a034b(0x118),'description':a21_0x5a034b(0x10e)},{...CODE_FLAG,'required':![],'description':a21_0x5a034b(0x11e)}],async 'execute'(_0x1de4df){const _0x110303=a21_0x5a034b,_0x53391d=_0x1de4df[_0x110303(0x117)]('name'),_0x36b4b2=_0x1de4df[_0x110303(0x117)](_0x110303(0x116)),_0x3173b4=await listDatasets(_0x1de4df[_0x110303(0x119)],{..._0x53391d&&{'name':_0x53391d},..._0x36b4b2&&{'code':_0x36b4b2}});return{'ok':!![],'data':{'total':_0x3173b4['length'],'datasets':_0x3173b4[_0x110303(0x111)](_0x4f96be=>{const _0x4df006=_0x110303,_0xaafd73=_0x4f96be['dbtableConfig']??{};return{'id':_0x4f96be['id'],'code':_0x4f96be[_0x4df006(0x116)],'name':_0x4f96be[_0x4df006(0x113)],'source':_0x4f96be[_0x4df006(0x10a)],'description':_0x4f96be[_0x4df006(0x11b)],'table':_0xaafd73[_0x4df006(0x10c)],'datasetKey':_0xaafd73['datasetKey'],'pk':_0xaafd73[_0x4df006(0x112)],'fields':_0xaafd73['allFields']?_0xaafd73[_0x4df006(0x109)][_0x4df006(0x121)](',')[_0x4df006(0x111)](_0x5d57f2=>_0x5d57f2[_0x4df006(0x11c)]()):[]};})}};}};
@@ -0,0 +1 @@
1
+ const a22_0x31f1de=a22_0x3387;(function(_0x38366c,_0x31b34b){const _0x245384=a22_0x3387,_0x226c16=_0x38366c();while(!![]){try{const _0x36f78c=parseInt(_0x245384(0x1b5))/0x1*(parseInt(_0x245384(0x1b0))/0x2)+-parseInt(_0x245384(0x1be))/0x3*(-parseInt(_0x245384(0x1b2))/0x4)+-parseInt(_0x245384(0x1b7))/0x5+parseInt(_0x245384(0x1bf))/0x6*(parseInt(_0x245384(0x1ba))/0x7)+parseInt(_0x245384(0x1c1))/0x8+parseInt(_0x245384(0x1b6))/0x9+-parseInt(_0x245384(0x1bd))/0xa;if(_0x36f78c===_0x31b34b)break;else _0x226c16['push'](_0x226c16['shift']());}catch(_0x35ccc9){_0x226c16['push'](_0x226c16['shift']());}}}(a22_0xf907,0xdf926));function a22_0x3387(_0x150535,_0x44c254){_0x150535=_0x150535-0x1b0;const _0xf907f9=a22_0xf907();let _0x338748=_0xf907f9[_0x150535];return _0x338748;}import{getDatasetSdkUsageDoc}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';function a22_0xf907(){const _0xfcd8a8=['5368420egAgLO','string','dataset','9807DUefOH','read','Dataset\x20code\x20(32\x20characters).\x20Numeric\x20dataset\x20IDs\x20are\x20not\x20accepted.','18894680ImFqAR','729rIZEpC','498pekSaV','str','13500088RGXOYT','1230402VBaICL','code','11688GmpfpO','sdk-doc','appCode','1kZDepM','6748749pXrllN'];a22_0xf907=function(){return _0xfcd8a8;};return a22_0xf907();}const DEFAULT_MARKDOWN='#\x20Dataset\x20SDK\x20Usage\x20Documentation\x0a\x0a暂无\x20SDK\x20使用文档';export function formatDatasetSdkMarkdown(_0x6b1aaf){const _0x51bb89=a22_0x3387,_0x544312=typeof _0x6b1aaf===_0x51bb89(0x1b8)?_0x6b1aaf['trim']():'';return _0x544312||DEFAULT_MARKDOWN;}export const datasetSdkDoc={'service':a22_0x31f1de(0x1b9),'command':a22_0x31f1de(0x1b3),'description':'Get\x20SDK\x20usage\x20markdown\x20for\x20a\x20dataset\x20code','risk':a22_0x31f1de(0x1bb),'flags':[{...CODE_FLAG,'description':a22_0x31f1de(0x1bc)}],async 'execute'(_0x35c13c){const _0x34b6b1=a22_0x31f1de,_0x56bc91=_0x35c13c[_0x34b6b1(0x1c0)](_0x34b6b1(0x1b1)),_0x4bd8c1=await getDatasetSdkUsageDoc(_0x56bc91,_0x35c13c[_0x34b6b1(0x1b4)]);return{'ok':!![],'data':{'code':_0x56bc91,'appCode':_0x35c13c[_0x34b6b1(0x1b4)],'markdown':formatDatasetSdkMarkdown(_0x4bd8c1)}};}};
@@ -1 +1 @@
1
- const a20_0x23199c=a20_0x48e0;(function(_0xd8364c,_0x280bcb){const _0xad2145=a20_0x48e0,_0x3e20f2=_0xd8364c();while(!![]){try{const _0x1e1d7a=-parseInt(_0xad2145(0x156))/0x1+parseInt(_0xad2145(0x160))/0x2*(parseInt(_0xad2145(0x165))/0x3)+-parseInt(_0xad2145(0x16d))/0x4*(-parseInt(_0xad2145(0x15e))/0x5)+-parseInt(_0xad2145(0x15f))/0x6*(-parseInt(_0xad2145(0x177))/0x7)+-parseInt(_0xad2145(0x150))/0x8*(parseInt(_0xad2145(0x167))/0x9)+parseInt(_0xad2145(0x18b))/0xa*(parseInt(_0xad2145(0x173))/0xb)+-parseInt(_0xad2145(0x163))/0xc*(parseInt(_0xad2145(0x14e))/0xd);if(_0x1e1d7a===_0x280bcb)break;else _0x3e20f2['push'](_0x3e20f2['shift']());}catch(_0x112a9c){_0x3e20f2['push'](_0x3e20f2['shift']());}}}(a20_0x5b02,0x6aec8));import a20_0x55ddb6 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';function a20_0x5b02(){const _0x13cf3a=['empty','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','(default)','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','✓\x20Valid\x20JSON','platform','524589AXKjmu','green','2618056hFMeBL','\x20\x20Config\x20Files','\x20doctor','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','locale','608391ATIdUB','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(missing)','red','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','defaultApp','(not\x20found)','verbose','5ItFRDe','234jvvaNM','1444oDTdDx','(default:\x20','padEnd','36vKXtnL','ClientAk','3048aolQWI','accessKey','18JyRRUe','yellow','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20(accessKey)','\x20\x20Session\x20check:\x20\x20\x20','status','1867076QMtlyh','arch','\x20\x20─','message','bold','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','57189vpbbJn','Global','gray','appCode','106904VEfhno','doctor','repeat','(no\x20file)','\x20\x20Auth','Project','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20runtimeDomain:\x20\x20\x20','(not\x20set)','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','format','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','riskLevel','log','\x20\x20Config\x20JSON','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','pageSize','(none)','env','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','50BObPBR','\x20\x20Merged\x20Config'];a20_0x5b02=function(){return _0x13cf3a;};return a20_0x5b02();}import{getCliVersion}from'../utils/version.js';import{getApiDomain,getRuntimeDomain,getUserDomain}from'../constant/domain.js';import{buildConfigFromFlags,initGlobalEnvironment,getProjectConfigPath,getGlobalConfigPath,inspectCliConfigJsonFile}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{isLegacyCompatConfigKey}from'../config/schema.js';async function execute(_0x157931){const _0x3b0566=a20_0x48e0,_0x49d48a=getCliVersion(),_0x4931ad=buildConfigFromFlags({});await initGlobalEnvironment(_0x4931ad),console[_0x3b0566(0x184)](),console[_0x3b0566(0x184)](a20_0x55ddb6['bold'](CLI_BIN_NAME+_0x3b0566(0x152))),console[_0x3b0566(0x184)](a20_0x55ddb6[_0x3b0566(0x175)]('─'[_0x3b0566(0x179)](0x32))),console[_0x3b0566(0x184)]('\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20'+_0x49d48a),console['log'](_0x3b0566(0x153)+process['version']),console[_0x3b0566(0x184)]('\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0x3b0566(0x14d)]+'\x20'+process[_0x3b0566(0x16e)]),console[_0x3b0566(0x184)](),console['log'](a20_0x55ddb6['bold'](_0x3b0566(0x151))),console[_0x3b0566(0x184)](a20_0x55ddb6[_0x3b0566(0x175)](_0x3b0566(0x16f)[_0x3b0566(0x179)](0x1e)));const _0x520e11=getGlobalConfigPath(),_0x52e3c1=getProjectConfigPath();console['log'](_0x3b0566(0x157)+(_0x520e11||a20_0x55ddb6[_0x3b0566(0x175)]('(not\x20found)'))),console[_0x3b0566(0x184)](_0x3b0566(0x17d)+(_0x52e3c1||a20_0x55ddb6[_0x3b0566(0x175)](_0x3b0566(0x15c)))),console[_0x3b0566(0x184)](),console[_0x3b0566(0x184)](a20_0x55ddb6[_0x3b0566(0x171)](_0x3b0566(0x185))),console[_0x3b0566(0x184)](a20_0x55ddb6['gray'](_0x3b0566(0x16f)[_0x3b0566(0x179)](0x1e)));const _0x10f77f=(_0x51043c,_0x540372)=>{const _0x370011=_0x3b0566;if(!_0x540372){console[_0x370011(0x184)]('\x20\x20'+_0x51043c[_0x370011(0x162)](0x11)+'\x20'+a20_0x55ddb6[_0x370011(0x175)](_0x370011(0x17a)));return;}const _0x4b5c0b=inspectCliConfigJsonFile(_0x540372);if(_0x4b5c0b['status']==='ok')console[_0x370011(0x184)]('\x20\x20'+_0x51043c['padEnd'](0x11)+'\x20'+a20_0x55ddb6['green'](_0x370011(0x191)));else{if(_0x4b5c0b[_0x370011(0x16c)]===_0x370011(0x18d))console[_0x370011(0x184)]('\x20\x20'+_0x51043c['padEnd'](0x11)+'\x20'+a20_0x55ddb6[_0x370011(0x168)]('⚠\x20Empty\x20(treated\x20as\x20{})'));else _0x4b5c0b[_0x370011(0x16c)]==='missing'?console[_0x370011(0x184)]('\x20\x20'+_0x51043c[_0x370011(0x162)](0x11)+'\x20'+a20_0x55ddb6[_0x370011(0x175)](_0x370011(0x158))):(console[_0x370011(0x184)]('\x20\x20'+_0x51043c[_0x370011(0x162)](0x11)+'\x20'+a20_0x55ddb6['red']('✗\x20Invalid\x20JSON')),console['log']('\x20\x20'+''[_0x370011(0x162)](0x11)+'\x20'+a20_0x55ddb6['red'](_0x4b5c0b[_0x370011(0x170)])));}};_0x10f77f(_0x3b0566(0x174),_0x520e11),_0x10f77f(_0x3b0566(0x17c),_0x52e3c1),console['log'](),console[_0x3b0566(0x184)](a20_0x55ddb6[_0x3b0566(0x171)](_0x3b0566(0x18c))),console[_0x3b0566(0x184)](a20_0x55ddb6['gray'](_0x3b0566(0x16f)[_0x3b0566(0x179)](0x1e))),console[_0x3b0566(0x184)](_0x3b0566(0x190)+(_0x4931ad[_0x3b0566(0x176)]||a20_0x55ddb6[_0x3b0566(0x159)](_0x3b0566(0x17f)))),console[_0x3b0566(0x184)](_0x3b0566(0x172)+_0x4931ad[_0x3b0566(0x189)]);const _0x50718c=isLegacyCompatConfigKey(_0x3b0566(0x155))?a20_0x55ddb6[_0x3b0566(0x175)](_0x4931ad[_0x3b0566(0x155)]+'\x20(legacy/compat\x20only)'):_0x4931ad[_0x3b0566(0x155)];return console[_0x3b0566(0x184)](_0x3b0566(0x180)+_0x50718c),console[_0x3b0566(0x184)](_0x3b0566(0x15a)+(_0x4931ad[_0x3b0566(0x15b)]||a20_0x55ddb6[_0x3b0566(0x175)]('(none)'))),console[_0x3b0566(0x184)](_0x3b0566(0x154)+(_0x4931ad['currentApp']||a20_0x55ddb6[_0x3b0566(0x175)]('(none)'))),console[_0x3b0566(0x184)](_0x3b0566(0x18a)+(_0x4931ad[_0x3b0566(0x181)]||a20_0x55ddb6[_0x3b0566(0x175)](_0x3b0566(0x161)+DEFAULT_CONFIG_VALUES['format']+')'))),console[_0x3b0566(0x184)]('\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x4931ad[_0x3b0566(0x187)]??a20_0x55ddb6[_0x3b0566(0x175)](_0x3b0566(0x18f)))),console['log'](_0x3b0566(0x18e)+_0x4931ad[_0x3b0566(0x183)]),console[_0x3b0566(0x184)]('\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x4931ad[_0x3b0566(0x15d)]),console[_0x3b0566(0x184)]('\x20\x20auth\x20(effective):\x20'+AUTH_MODE['ClientAk']),console[_0x3b0566(0x184)]('\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20'+(_0x4931ad['accessKey']?a20_0x55ddb6[_0x3b0566(0x14f)]('(set,\x20length='+_0x4931ad[_0x3b0566(0x166)]['length']+')'):a20_0x55ddb6[_0x3b0566(0x175)](_0x3b0566(0x188)))),console[_0x3b0566(0x184)](),console[_0x3b0566(0x184)](a20_0x55ddb6[_0x3b0566(0x171)]('\x20\x20API\x20Endpoints')),console['log'](a20_0x55ddb6['gray']('\x20\x20─'[_0x3b0566(0x179)](0x1e))),console['log'](_0x3b0566(0x182)+getApiDomain()),console['log'](_0x3b0566(0x186)+getUserDomain()),console[_0x3b0566(0x184)](_0x3b0566(0x17e)+getRuntimeDomain()),console[_0x3b0566(0x184)](),console[_0x3b0566(0x184)](a20_0x55ddb6['bold'](_0x3b0566(0x17b))),console[_0x3b0566(0x184)](a20_0x55ddb6[_0x3b0566(0x175)]('\x20\x20─'[_0x3b0566(0x179)](0x1e))),console[_0x3b0566(0x184)](_0x3b0566(0x169)+a20_0x55ddb6[_0x3b0566(0x14f)](AUTH_MODE[_0x3b0566(0x164)]+_0x3b0566(0x16a))),console[_0x3b0566(0x184)](_0x3b0566(0x16b)+a20_0x55ddb6[_0x3b0566(0x175)]('(removed\x20—\x20cookie\x20auth\x20disabled)')),console[_0x3b0566(0x184)](),{'ok':!![]};}function a20_0x48e0(_0x272a95,_0x9db4ad){_0x272a95=_0x272a95-0x14d;const _0x5b02bb=a20_0x5b02();let _0x48e011=_0x5b02bb[_0x272a95];return _0x48e011;}export const doctorDefinition={'service':a20_0x23199c(0x178),'command':'check','description':'Diagnose\x20CLI\x20configuration\x20and\x20environment','risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
1
+ function a23_0x1d3e(){const _0xbe0a9b=['\x20\x20Auth','✓\x20Valid\x20JSON','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','\x20(accessKey)','riskLevel','version','1313156WlNGap','format','check','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20─','Global','11856190KSNsPb','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','10RbblsP','(no\x20file)','read','pageSize','defaultApp','\x20\x20Config\x20Files','1621020fDmJbO','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','missing','appCode','(none)','accessKey','\x20\x20auth\x20(effective):\x20','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','Project','verbose','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','246462ZpNref','gray','⚠\x20Empty\x20(treated\x20as\x20{})','\x20\x20API\x20Endpoints','log','\x20(legacy/compat\x20only)','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Session\x20check:\x20\x20\x20','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','message','2536844Uzfvxd','yellow','locale','currentApp','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','green','ClientAk','(missing)','\x20\x20Config\x20JSON','platform','padEnd','(set,\x20length=','length','8BVswEW','6359437vOoWaR','repeat','env','9IDzZKl','status','20lWEmkc','(removed\x20—\x20cookie\x20auth\x20disabled)','bold','\x20doctor','red','(not\x20set)','24ZkWgqJ','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','9191017NzHQhh','✗\x20Invalid\x20JSON','(not\x20found)','(default)','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'];a23_0x1d3e=function(){return _0xbe0a9b;};return a23_0x1d3e();}function a23_0x1e92(_0x265afd,_0x1495d0){_0x265afd=_0x265afd-0x11f;const _0x1d3e60=a23_0x1d3e();let _0x1e929e=_0x1d3e60[_0x265afd];return _0x1e929e;}const a23_0xdb10da=a23_0x1e92;(function(_0x1fb747,_0x178891){const _0x13ccd0=a23_0x1e92,_0x4f60fa=_0x1fb747();while(!![]){try{const _0x449f3d=parseInt(_0x13ccd0(0x126))/0x1+parseInt(_0x13ccd0(0x15e))/0x2*(-parseInt(_0x13ccd0(0x13f))/0x3)+parseInt(_0x13ccd0(0x14a))/0x4*(-parseInt(_0x13ccd0(0x12e))/0x5)+parseInt(_0x13ccd0(0x134))/0x6+parseInt(_0x13ccd0(0x159))/0x7*(parseInt(_0x13ccd0(0x158))/0x8)+parseInt(_0x13ccd0(0x15c))/0x9*(-parseInt(_0x13ccd0(0x12c))/0xa)+-parseInt(_0x13ccd0(0x166))/0xb*(-parseInt(_0x13ccd0(0x164))/0xc);if(_0x449f3d===_0x178891)break;else _0x4f60fa['push'](_0x4f60fa['shift']());}catch(_0x12a23a){_0x4f60fa['push'](_0x4f60fa['shift']());}}}(a23_0x1d3e,0xd8a22));import a23_0x360b96 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{getCliVersion}from'../utils/version.js';import{getApiDomain,getRuntimeDomain,getUserDomain}from'../constant/domain.js';import{buildConfigFromFlags,initGlobalEnvironment,getProjectConfigPath,getGlobalConfigPath,inspectCliConfigJsonFile}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{isLegacyCompatConfigKey}from'../config/schema.js';async function execute(_0x2626df){const _0x3afe0d=a23_0x1e92,_0x47b13e=getCliVersion(),_0x1634bd=buildConfigFromFlags({});await initGlobalEnvironment(_0x1634bd),console['log'](),console[_0x3afe0d(0x143)](a23_0x360b96[_0x3afe0d(0x160)](CLI_BIN_NAME+_0x3afe0d(0x161))),console[_0x3afe0d(0x143)](a23_0x360b96[_0x3afe0d(0x140)]('─'[_0x3afe0d(0x15a)](0x32))),console[_0x3afe0d(0x143)](_0x3afe0d(0x122)+_0x47b13e),console['log'](_0x3afe0d(0x145)+process[_0x3afe0d(0x125)]),console[_0x3afe0d(0x143)](_0x3afe0d(0x14f)+process[_0x3afe0d(0x154)]+'\x20'+process['arch']),console['log'](),console[_0x3afe0d(0x143)](a23_0x360b96[_0x3afe0d(0x160)](_0x3afe0d(0x133))),console['log'](a23_0x360b96[_0x3afe0d(0x140)]('\x20\x20─'['repeat'](0x1e)));const _0xf9a186=getGlobalConfigPath(),_0x2d371b=getProjectConfigPath();console[_0x3afe0d(0x143)](_0x3afe0d(0x135)+(_0xf9a186||a23_0x360b96['gray'](_0x3afe0d(0x168)))),console[_0x3afe0d(0x143)]('\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x2d371b||a23_0x360b96[_0x3afe0d(0x140)](_0x3afe0d(0x168)))),console[_0x3afe0d(0x143)](),console[_0x3afe0d(0x143)](a23_0x360b96[_0x3afe0d(0x160)](_0x3afe0d(0x153))),console['log'](a23_0x360b96[_0x3afe0d(0x140)](_0x3afe0d(0x12a)[_0x3afe0d(0x15a)](0x1e)));const _0x480755=(_0x11d0f4,_0x236d47)=>{const _0x2691d4=_0x3afe0d;if(!_0x236d47){console[_0x2691d4(0x143)]('\x20\x20'+_0x11d0f4['padEnd'](0x11)+'\x20'+a23_0x360b96[_0x2691d4(0x140)](_0x2691d4(0x12f)));return;}const _0x192cbe=inspectCliConfigJsonFile(_0x236d47);if(_0x192cbe['status']==='ok')console[_0x2691d4(0x143)]('\x20\x20'+_0x11d0f4['padEnd'](0x11)+'\x20'+a23_0x360b96['green'](_0x2691d4(0x121)));else{if(_0x192cbe[_0x2691d4(0x15d)]==='empty')console['log']('\x20\x20'+_0x11d0f4[_0x2691d4(0x155)](0x11)+'\x20'+a23_0x360b96[_0x2691d4(0x14b)](_0x2691d4(0x141)));else _0x192cbe[_0x2691d4(0x15d)]===_0x2691d4(0x136)?console[_0x2691d4(0x143)]('\x20\x20'+_0x11d0f4['padEnd'](0x11)+'\x20'+a23_0x360b96[_0x2691d4(0x140)](_0x2691d4(0x152))):(console[_0x2691d4(0x143)]('\x20\x20'+_0x11d0f4[_0x2691d4(0x155)](0x11)+'\x20'+a23_0x360b96[_0x2691d4(0x162)](_0x2691d4(0x167))),console['log']('\x20\x20'+''[_0x2691d4(0x155)](0x11)+'\x20'+a23_0x360b96['red'](_0x192cbe[_0x2691d4(0x149)])));}};_0x480755(_0x3afe0d(0x12b),_0xf9a186),_0x480755(_0x3afe0d(0x13c),_0x2d371b),console[_0x3afe0d(0x143)](),console[_0x3afe0d(0x143)](a23_0x360b96[_0x3afe0d(0x160)]('\x20\x20Merged\x20Config')),console[_0x3afe0d(0x143)](a23_0x360b96[_0x3afe0d(0x140)](_0x3afe0d(0x12a)[_0x3afe0d(0x15a)](0x1e))),console[_0x3afe0d(0x143)]('\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x1634bd[_0x3afe0d(0x137)]||a23_0x360b96[_0x3afe0d(0x162)](_0x3afe0d(0x163)))),console[_0x3afe0d(0x143)](_0x3afe0d(0x11f)+_0x1634bd[_0x3afe0d(0x15b)]);const _0x2e45eb=isLegacyCompatConfigKey(_0x3afe0d(0x14c))?a23_0x360b96[_0x3afe0d(0x140)](_0x1634bd[_0x3afe0d(0x14c)]+_0x3afe0d(0x144)):_0x1634bd[_0x3afe0d(0x14c)];return console[_0x3afe0d(0x143)]('\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x2e45eb),console['log'](_0x3afe0d(0x14e)+(_0x1634bd[_0x3afe0d(0x132)]||a23_0x360b96[_0x3afe0d(0x140)]('(none)'))),console[_0x3afe0d(0x143)](_0x3afe0d(0x148)+(_0x1634bd[_0x3afe0d(0x14d)]||a23_0x360b96[_0x3afe0d(0x140)]('(none)'))),console[_0x3afe0d(0x143)](_0x3afe0d(0x165)+(_0x1634bd[_0x3afe0d(0x127)]||a23_0x360b96[_0x3afe0d(0x140)]('(default:\x20'+DEFAULT_CONFIG_VALUES[_0x3afe0d(0x127)]+')'))),console['log'](_0x3afe0d(0x146)+(_0x1634bd[_0x3afe0d(0x131)]??a23_0x360b96['gray'](_0x3afe0d(0x169)))),console['log'](_0x3afe0d(0x13b)+_0x1634bd[_0x3afe0d(0x124)]),console[_0x3afe0d(0x143)](_0x3afe0d(0x13e)+_0x1634bd[_0x3afe0d(0x13d)]),console[_0x3afe0d(0x143)](_0x3afe0d(0x13a)+AUTH_MODE['ClientAk']),console[_0x3afe0d(0x143)](_0x3afe0d(0x12d)+(_0x1634bd[_0x3afe0d(0x139)]?a23_0x360b96[_0x3afe0d(0x150)](_0x3afe0d(0x156)+_0x1634bd[_0x3afe0d(0x139)][_0x3afe0d(0x157)]+')'):a23_0x360b96[_0x3afe0d(0x140)](_0x3afe0d(0x138)))),console['log'](),console[_0x3afe0d(0x143)](a23_0x360b96[_0x3afe0d(0x160)](_0x3afe0d(0x142))),console[_0x3afe0d(0x143)](a23_0x360b96[_0x3afe0d(0x140)]('\x20\x20─'[_0x3afe0d(0x15a)](0x1e))),console['log']('\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20'+getApiDomain()),console['log']('\x20\x20userDomain:\x20\x20\x20\x20\x20\x20'+getUserDomain()),console[_0x3afe0d(0x143)]('\x20\x20runtimeDomain:\x20\x20\x20'+getRuntimeDomain()),console[_0x3afe0d(0x143)](),console[_0x3afe0d(0x143)](a23_0x360b96[_0x3afe0d(0x160)](_0x3afe0d(0x120))),console[_0x3afe0d(0x143)](a23_0x360b96[_0x3afe0d(0x140)](_0x3afe0d(0x12a)[_0x3afe0d(0x15a)](0x1e))),console[_0x3afe0d(0x143)](_0x3afe0d(0x129)+a23_0x360b96[_0x3afe0d(0x150)](AUTH_MODE[_0x3afe0d(0x151)]+_0x3afe0d(0x123))),console[_0x3afe0d(0x143)](_0x3afe0d(0x147)+a23_0x360b96[_0x3afe0d(0x140)](_0x3afe0d(0x15f))),console[_0x3afe0d(0x143)](),{'ok':!![]};}export const doctorDefinition={'service':'doctor','command':a23_0xdb10da(0x128),'description':'Diagnose\x20CLI\x20configuration\x20and\x20environment','risk':a23_0xdb10da(0x130),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
@@ -1 +1 @@
1
- const a21_0x1c812f=a21_0x41db;(function(_0x418028,_0x1dfcf0){const _0xc04075=a21_0x41db,_0x57dd02=_0x418028();while(!![]){try{const _0x15cf98=parseInt(_0xc04075(0x148))/0x1*(-parseInt(_0xc04075(0x145))/0x2)+parseInt(_0xc04075(0x14c))/0x3+parseInt(_0xc04075(0x120))/0x4*(-parseInt(_0xc04075(0x119))/0x5)+parseInt(_0xc04075(0x152))/0x6+parseInt(_0xc04075(0x13e))/0x7+-parseInt(_0xc04075(0x127))/0x8+-parseInt(_0xc04075(0x143))/0x9;if(_0x15cf98===_0x1dfcf0)break;else _0x57dd02['push'](_0x57dd02['shift']());}catch(_0x49bfff){_0x57dd02['push'](_0x57dd02['shift']());}}}(a21_0x4ef8,0xdb694));function a21_0x41db(_0x24cbcc,_0x12f2fd){_0x24cbcc=_0x24cbcc-0x118;const _0x4ef8aa=a21_0x4ef8();let _0x41db0a=_0x4ef8aa[_0x24cbcc];return _0x41db0a;}import{existsSync,readFileSync}from'node:fs';import{resolve,isAbsolute}from'node:path';import{createInterface}from'node:readline';import{CliErrors}from'../errors.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';import{IMPORTABLE_RUNTIME_CONFIG_KEYS}from'../config/schema.js';import{resolveWriteConfigPath,readConfigFile,writeConfigFile,isNonInteractiveMode}from'../context.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{PRODUCT_CONFIG}from'../constant/product.js';export const initCreateFlagDefs=[{'name':'appcode','type':a21_0x1c812f(0x158),'description':a21_0x1c812f(0x12c)},{'name':a21_0x1c812f(0x139),'type':a21_0x1c812f(0x158),'description':a21_0x1c812f(0x12e)+DEFAULT_CONFIG_VALUES[a21_0x1c812f(0x139)]+')','enum':[...RUNTIME_ENV_VALUES]},{'name':a21_0x1c812f(0x136),'type':'boolean','description':a21_0x1c812f(0x128)+PRODUCT_CONFIG['newConfigFileName']+a21_0x1c812f(0x14b),'default':![]},{'name':a21_0x1c812f(0x14e),'type':a21_0x1c812f(0x138),'description':a21_0x1c812f(0x11f),'default':![]}];export const initImportFlagDefs=[{'name':'file','type':a21_0x1c812f(0x158),'description':a21_0x1c812f(0x150),'required':!![]},{'name':a21_0x1c812f(0x13f),'type':a21_0x1c812f(0x158),'description':'Override\x20imported\x20default\x20appcode'},{'name':a21_0x1c812f(0x139),'type':'string','description':a21_0x1c812f(0x157),'enum':[...RUNTIME_ENV_VALUES]},{'name':a21_0x1c812f(0x136),'type':a21_0x1c812f(0x138),'description':a21_0x1c812f(0x128)+PRODUCT_CONFIG['newConfigFileName']+a21_0x1c812f(0x14b),'default':![]},{'name':'yes','type':a21_0x1c812f(0x138),'description':a21_0x1c812f(0x11f),'default':![]}];export async function runInit(_0x512712){const _0x4868b0=a21_0x1c812f,_0x33efb6=isNonInteractiveMode(_0x512712),_0x31d9dc=_0x512712[_0x4868b0(0x136)]?'global':'project',_0xf0f9b=resolveWriteConfigPath(_0x31d9dc);try{_0x33efb6?await runNonInteractive(_0x512712,_0xf0f9b):await runInteractive(_0x512712,_0xf0f9b);}catch(_0x1a96fa){if(_0x1a96fa instanceof AbortPrompt)throw CliErrors[_0x4868b0(0x144)]();throw _0x1a96fa;}}export async function runInitImport(_0x55f18e){const _0x58dac7=a21_0x1c812f,_0x4572d7=_0x55f18e[_0x58dac7(0x136)]?_0x58dac7(0x136):_0x58dac7(0x13a),_0x5f1fce=resolveWriteConfigPath(_0x4572d7);await runFromImport(_0x55f18e,_0x5f1fce);}const RUNTIME_IRRELEVANT_KEYS=new Set(['apiDir']);function a21_0x4ef8(){const _0x5c8295=['Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','):\x20','App\x20code\x20for\x20the\x20project','\x20\x20appcode:\x20','Target\x20environment\x20(default\x20','utf8','close','Imported\x20from\x20','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','[y/N]','stdin','AbortPrompt','global','cwd','boolean','env','project','app','trim','validation','7191961NbZYhe','appcode','message','\x20\x20env:\x20\x20\x20\x20\x20','User\x20aborted\x20prompt','3690522KaODoX','cancelled','324976YskLco','stdout','flagMissing','6dnroKr','toLowerCase','Aborted.',')\x20instead\x20of\x20project','2042856hcIVAX','\x20\x20default:\x20','yes','\x20already\x20exists.\x20Overwrite?','Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','file','9971646ERyxJG','\x20\x20config:\x20\x20','\x20init\x20—\x20Create\x20','join','File\x20','Override\x20imported\x20default\x20env','string','App\x20code\x20cannot\x20be\x20empty.','newConfigFileName','SIGINT','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`.','5QbUGOX','\x22.\x20Allowed:\x20','riskLevel','parse','removeListener','defaultApp','Skip\x20confirmation\x20when\x20overwriting','41696bEUWUg','question','log','race','\x0aInitialized\x20','App\x20code','Usage:\x20','8609584RcfSqe','Write\x20to\x20global\x20(~/','apps'];a21_0x4ef8=function(){return _0x5c8295;};return a21_0x4ef8();}async function runFromImport(_0x353eaf,_0x51b478){const _0x37614f=a21_0x1c812f,_0xccc087=resolveFilePath(_0x353eaf[_0x37614f(0x151)]);if(!existsSync(_0xccc087))throw CliErrors['validation']('Source\x20file\x20not\x20found:\x20'+_0xccc087);const _0x3cc2fe=readSourceFile(_0xccc087),_0x2c3e02=convertToRuntimeConfig(_0x3cc2fe);_0x353eaf[_0x37614f(0x13f)]&&(_0x2c3e02[_0x37614f(0x13f)]=String(_0x353eaf[_0x37614f(0x13f)]));_0x353eaf[_0x37614f(0x139)]&&(_0x2c3e02[_0x37614f(0x139)]=resolveInitEnv(_0x353eaf));if(!_0x2c3e02[_0x37614f(0x13f)])throw CliErrors['validation']('Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.',_0x37614f(0x118));await writeInitConfig(_0x51b478,_0x2c3e02,_0x353eaf),console['log'](_0x37614f(0x131)+_0xccc087),console['log'](_0x37614f(0x153)+_0x51b478),console[_0x37614f(0x122)](_0x37614f(0x12d)+_0x2c3e02['appcode']);if(_0x2c3e02['defaultApp'])console[_0x37614f(0x122)](_0x37614f(0x14d)+_0x2c3e02[_0x37614f(0x11e)]);}function convertToRuntimeConfig(_0x4dde0d){const _0x5a2178=a21_0x1c812f;if(_0x4dde0d['apps']&&typeof _0x4dde0d[_0x5a2178(0x129)]==='object')throw CliErrors['validation'](_0x5a2178(0x12a),_0x5a2178(0x132));const _0x4af926={};for(const _0x37d870 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x4dde0d[_0x37d870]!==undefined&&(_0x4af926[_0x37d870]=_0x4dde0d[_0x37d870]);}return!_0x4af926[_0x5a2178(0x11b)]&&(_0x4af926[_0x5a2178(0x11b)]=DEFAULT_CONFIG_VALUES[_0x5a2178(0x11b)]),_0x4af926;}async function runNonInteractive(_0x21515f,_0x8ca324){const _0x2127be=a21_0x1c812f,_0x18be11=_0x21515f[_0x2127be(0x13f)];if(!_0x18be11)throw CliErrors[_0x2127be(0x147)](_0x2127be(0x13f),_0x2127be(0x126)+CLI_BIN_NAME+'\x20app\x20init\x20--appcode\x20<code>\x20[--env\x20daily]\x20[--global]');const _0x3f3f5f=resolveInitEnv(_0x21515f);await writeInitConfig(_0x8ca324,{'appcode':_0x18be11,'env':_0x3f3f5f},_0x21515f),console[_0x2127be(0x122)]('Initialized\x20'+_0x8ca324),console[_0x2127be(0x122)](_0x2127be(0x12d)+_0x18be11),console[_0x2127be(0x122)](_0x2127be(0x141)+_0x3f3f5f);}async function runInteractive(_0x4ff2cd,_0x19a954){const _0x51ee44=a21_0x1c812f,_0x2c0f0f=loadExisting(_0x19a954),_0x59b7af=typeof _0x2c0f0f?.[_0x51ee44(0x13f)]===_0x51ee44(0x158)?_0x2c0f0f[_0x51ee44(0x13f)]:'',_0x448bb7=resolveInitEnv(_0x4ff2cd);console[_0x51ee44(0x122)](CLI_BIN_NAME+_0x51ee44(0x154)+PRODUCT_CONFIG[_0x51ee44(0x15a)]+'\x0a');if(existsSync(_0x19a954)&&!_0x4ff2cd[_0x51ee44(0x14e)]){const _0x25d06d=await promptYesNo(_0x51ee44(0x156)+_0x19a954+_0x51ee44(0x14f),![]);if(!_0x25d06d){console['log'](_0x51ee44(0x14a));return;}}const _0xea2efe=typeof _0x4ff2cd[_0x51ee44(0x13f)]==='string'?_0x4ff2cd[_0x51ee44(0x13f)][_0x51ee44(0x13c)]():'';let _0x22ad47=_0xea2efe;!_0x22ad47&&(_0x22ad47=await promptInput(_0x51ee44(0x125),_0x59b7af));if(!_0x22ad47[_0x51ee44(0x13c)]())throw CliErrors[_0x51ee44(0x13d)](_0x51ee44(0x159));await writeInitConfig(_0x19a954,{'appcode':_0x22ad47['trim'](),'env':_0x448bb7},_0x4ff2cd),console['log'](_0x51ee44(0x124)+_0x19a954),console['log'](_0x51ee44(0x12d)+_0x22ad47[_0x51ee44(0x13c)]()),console[_0x51ee44(0x122)](_0x51ee44(0x141)+_0x448bb7);}async function writeInitConfig(_0x24d352,_0x1ab374,_0x318364){const _0x4b1e8c=a21_0x1c812f;let _0x48d8d9={};existsSync(_0x24d352)&&!_0x318364[_0x4b1e8c(0x14e)]&&(_0x48d8d9=readConfigFile(_0x24d352));for(const [_0x3bfbbc,_0x1aabae]of Object['entries'](_0x1ab374)){_0x1aabae!==undefined&&(_0x48d8d9[_0x3bfbbc]=_0x1aabae);}if(_0x48d8d9[_0x4b1e8c(0x13b)])delete _0x48d8d9[_0x4b1e8c(0x13b)];writeConfigFile(_0x24d352,_0x48d8d9);}class AbortPrompt extends Error{constructor(){const _0x48c0bf=a21_0x1c812f;super(_0x48c0bf(0x142)),this['name']=_0x48c0bf(0x135);}}function createSafeRl(){const _0x6a8b19=a21_0x1c812f,_0x5f47c7=createInterface({'input':process[_0x6a8b19(0x134)],'output':process[_0x6a8b19(0x146)]});let _0x57d8fa;const _0x2cbc88=new Promise((_0x227c77,_0x4fa4b2)=>{_0x57d8fa=()=>{const _0x341a48=a21_0x41db;_0x57d8fa&&(_0x5f47c7[_0x341a48(0x11d)](_0x341a48(0x15b),_0x57d8fa),_0x57d8fa=undefined);try{_0x5f47c7[_0x341a48(0x130)]();}catch{}_0x4fa4b2(new AbortPrompt());},_0x5f47c7['once']('SIGINT',_0x57d8fa);}),_0x1f3d04=()=>{const _0x31de8c=_0x6a8b19;_0x57d8fa&&(_0x5f47c7[_0x31de8c(0x11d)]('SIGINT',_0x57d8fa),_0x57d8fa=undefined);try{_0x5f47c7['close']();}catch{}};return{'rl':_0x5f47c7,'abortPromise':_0x2cbc88,'disposeSuccess':_0x1f3d04};}async function promptInput(_0x2a6209,_0x2795f8){const {rl:_0x205d8f,abortPromise:_0x441ac2,disposeSuccess:_0x52f781}=createSafeRl(),_0x11fe55=new Promise(_0x31df73=>{const _0x27c65c=a21_0x41db,_0xe18cb4=_0x2795f8?'\x20\x20'+_0x2a6209+'\x20('+_0x2795f8+_0x27c65c(0x12b):'\x20\x20'+_0x2a6209+':\x20';_0x205d8f[_0x27c65c(0x121)](_0xe18cb4,_0x2c932f=>{_0x52f781(),_0x31df73(_0x2c932f['trim']()||_0x2795f8);});});return Promise['race']([_0x11fe55,_0x441ac2]);}async function promptYesNo(_0x42e0d9,_0xfdedcb){const _0x66717a=a21_0x1c812f,{rl:_0xee53f8,abortPromise:_0x190257,disposeSuccess:_0x3aa097}=createSafeRl(),_0x2c1270=new Promise(_0xd1ad31=>{const _0x4b8290=a21_0x41db,_0x732def=_0xfdedcb?'[Y/n]':_0x4b8290(0x133);_0xee53f8[_0x4b8290(0x121)]('\x20\x20'+_0x42e0d9+'\x20'+_0x732def+':\x20',_0x1a5d9f=>{const _0x49930b=_0x4b8290;_0x3aa097();const _0x49af29=_0x1a5d9f['trim']()[_0x49930b(0x149)]();if(_0x49af29==='y'||_0x49af29===_0x49930b(0x14e))_0xd1ad31(!![]);else{if(_0x49af29==='n'||_0x49af29==='no')_0xd1ad31(![]);else _0xd1ad31(_0xfdedcb);}});});return Promise[_0x66717a(0x123)]([_0x2c1270,_0x190257]);}function loadExisting(_0x54d58d){if(!existsSync(_0x54d58d))return null;return readConfigFile(_0x54d58d);}function resolveFilePath(_0x1ef148){const _0x5dfa1e=a21_0x1c812f;return isAbsolute(_0x1ef148)?_0x1ef148:resolve(process[_0x5dfa1e(0x137)](),_0x1ef148);}function readSourceFile(_0x3bd245){const _0x4aace1=a21_0x1c812f;try{const _0x3ec939=readFileSync(_0x3bd245,{'encoding':_0x4aace1(0x12f)});return JSON[_0x4aace1(0x11c)](_0x3ec939);}catch(_0x41552f){throw CliErrors[_0x4aace1(0x13d)]('Failed\x20to\x20parse\x20source\x20file:\x20'+_0x41552f[_0x4aace1(0x140)]);}}function resolveInitEnv(_0x1cf997){const _0x2f6d57=a21_0x1c812f,_0x57e99c=_0x1cf997[_0x2f6d57(0x139)];if(_0x57e99c===undefined||_0x57e99c==='')return DEFAULT_CONFIG_VALUES[_0x2f6d57(0x139)];if(!RUNTIME_ENV_VALUES['includes'](_0x57e99c))throw CliErrors[_0x2f6d57(0x13d)]('Invalid\x20env\x20\x22'+_0x57e99c+_0x2f6d57(0x11a)+RUNTIME_ENV_VALUES[_0x2f6d57(0x155)](',\x20'));return _0x57e99c;}
1
+ function a24_0x5676(_0xcc02a6,_0x1f8856){_0xcc02a6=_0xcc02a6-0x187;const _0x185b82=a24_0x185b();let _0x567603=_0x185b82[_0xcc02a6];return _0x567603;}const a24_0x2bf37c=a24_0x5676;(function(_0x30544f,_0x1e46f2){const _0x512e7d=a24_0x5676,_0x48f5fa=_0x30544f();while(!![]){try{const _0x4a0449=parseInt(_0x512e7d(0x19b))/0x1*(-parseInt(_0x512e7d(0x1af))/0x2)+parseInt(_0x512e7d(0x1c7))/0x3+parseInt(_0x512e7d(0x1cc))/0x4+-parseInt(_0x512e7d(0x1ba))/0x5+parseInt(_0x512e7d(0x189))/0x6+parseInt(_0x512e7d(0x1c6))/0x7*(-parseInt(_0x512e7d(0x18e))/0x8)+-parseInt(_0x512e7d(0x1c4))/0x9*(-parseInt(_0x512e7d(0x190))/0xa);if(_0x4a0449===_0x1e46f2)break;else _0x48f5fa['push'](_0x48f5fa['shift']());}catch(_0x1b3e9b){_0x48f5fa['push'](_0x48f5fa['shift']());}}}(a24_0x185b,0x8da88));import{existsSync,readFileSync}from'node:fs';import{resolve,isAbsolute}from'node:path';import{createInterface}from'node:readline';import{CliErrors}from'../errors.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RUNTIME_ENV_VALUES}from'../constant/env.js';import{IMPORTABLE_RUNTIME_CONFIG_KEYS}from'../config/schema.js';import{resolveWriteConfigPath,readConfigFile,writeConfigFile,isNonInteractiveMode}from'../context.js';function a24_0x185b(){const _0x1daea5=['riskLevel','\x0aInitialized\x20','stdin','Failed\x20to\x20parse\x20source\x20file:\x20','project','appcode','defaultApp','2688222SKNMbU','App\x20code\x20for\x20the\x20project','[y/N]','stdout','\x20\x20default:\x20','72hmyssC','newConfigFileName','10NIZqBv','parse','App\x20code','log','removeListener','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','AbortPrompt','Override\x20imported\x20default\x20env','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`.','Source\x20file\x20not\x20found:\x20','trim','25TcOdAk','Invalid\x20env\x20\x22','Skip\x20confirmation\x20when\x20overwriting','\x20\x20env:\x20\x20\x20\x20\x20','question','[Y/n]','\x20init\x20—\x20Create\x20','join','race','string','\x20app\x20init\x20--appcode\x20<code>\x20[--env\x20daily]\x20[--global]','message','once','object','Target\x20environment\x20(default\x20','Override\x20imported\x20default\x20appcode','utf8','App\x20code\x20cannot\x20be\x20empty.','apps','close','79436ADAUnB','app',')\x20instead\x20of\x20project','includes','validation','\x20already\x20exists.\x20Overwrite?','toLowerCase','global','SIGINT','Usage:\x20','\x20\x20config:\x20\x20','5031040nUTBwB','file','boolean','cwd','Write\x20to\x20global\x20(~/','name','Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','env','cancelled','\x20\x20appcode:\x20','9502938ZDrGUx','User\x20aborted\x20prompt','269591UAkkQI','981714eDocmG','yes','flagMissing','Aborted.','\x22.\x20Allowed:\x20','4379400NhNMpP','apiDir','Imported\x20from\x20','entries'];a24_0x185b=function(){return _0x1daea5;};return a24_0x185b();}import{CLI_BIN_NAME}from'../constant/cli.js';import{PRODUCT_CONFIG}from'../constant/product.js';export const initCreateFlagDefs=[{'name':a24_0x2bf37c(0x187),'type':a24_0x2bf37c(0x1a4),'description':a24_0x2bf37c(0x18a)},{'name':a24_0x2bf37c(0x1c1),'type':a24_0x2bf37c(0x1a4),'description':a24_0x2bf37c(0x1a9)+DEFAULT_CONFIG_VALUES['env']+')','enum':[...RUNTIME_ENV_VALUES]},{'name':a24_0x2bf37c(0x1b6),'type':a24_0x2bf37c(0x1bc),'description':'Write\x20to\x20global\x20(~/'+PRODUCT_CONFIG[a24_0x2bf37c(0x18f)]+a24_0x2bf37c(0x1b1),'default':![]},{'name':'yes','type':a24_0x2bf37c(0x1bc),'description':a24_0x2bf37c(0x19d),'default':![]}];export const initImportFlagDefs=[{'name':a24_0x2bf37c(0x1bb),'type':'string','description':'Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','required':!![]},{'name':a24_0x2bf37c(0x187),'type':a24_0x2bf37c(0x1a4),'description':a24_0x2bf37c(0x1aa)},{'name':a24_0x2bf37c(0x1c1),'type':a24_0x2bf37c(0x1a4),'description':a24_0x2bf37c(0x197),'enum':[...RUNTIME_ENV_VALUES]},{'name':a24_0x2bf37c(0x1b6),'type':a24_0x2bf37c(0x1bc),'description':a24_0x2bf37c(0x1be)+PRODUCT_CONFIG[a24_0x2bf37c(0x18f)]+')\x20instead\x20of\x20project','default':![]},{'name':'yes','type':'boolean','description':a24_0x2bf37c(0x19d),'default':![]}];export async function runInit(_0x165130){const _0x4b4562=a24_0x2bf37c,_0x4814b4=isNonInteractiveMode(_0x165130),_0x23ce00=_0x165130[_0x4b4562(0x1b6)]?_0x4b4562(0x1b6):'project',_0x15e39e=resolveWriteConfigPath(_0x23ce00);try{_0x4814b4?await runNonInteractive(_0x165130,_0x15e39e):await runInteractive(_0x165130,_0x15e39e);}catch(_0x1b099e){if(_0x1b099e instanceof AbortPrompt)throw CliErrors[_0x4b4562(0x1c2)]();throw _0x1b099e;}}export async function runInitImport(_0x3700f7){const _0x51e0ac=a24_0x2bf37c,_0xdcdba8=_0x3700f7['global']?_0x51e0ac(0x1b6):_0x51e0ac(0x1d4),_0x3364c7=resolveWriteConfigPath(_0xdcdba8);await runFromImport(_0x3700f7,_0x3364c7);}const RUNTIME_IRRELEVANT_KEYS=new Set([a24_0x2bf37c(0x1cd)]);async function runFromImport(_0x5d6bf6,_0x4ea285){const _0x24c42d=a24_0x2bf37c,_0x1214e4=resolveFilePath(_0x5d6bf6[_0x24c42d(0x1bb)]);if(!existsSync(_0x1214e4))throw CliErrors[_0x24c42d(0x1b3)](_0x24c42d(0x199)+_0x1214e4);const _0x5371e7=readSourceFile(_0x1214e4),_0x32a05e=convertToRuntimeConfig(_0x5371e7);_0x5d6bf6[_0x24c42d(0x187)]&&(_0x32a05e['appcode']=String(_0x5d6bf6[_0x24c42d(0x187)]));_0x5d6bf6['env']&&(_0x32a05e[_0x24c42d(0x1c1)]=resolveInitEnv(_0x5d6bf6));if(!_0x32a05e[_0x24c42d(0x187)])throw CliErrors['validation'](_0x24c42d(0x195),_0x24c42d(0x198));await writeInitConfig(_0x4ea285,_0x32a05e,_0x5d6bf6),console[_0x24c42d(0x193)](_0x24c42d(0x1ce)+_0x1214e4),console[_0x24c42d(0x193)](_0x24c42d(0x1b9)+_0x4ea285),console[_0x24c42d(0x193)](_0x24c42d(0x1c3)+_0x32a05e['appcode']);if(_0x32a05e['defaultApp'])console[_0x24c42d(0x193)](_0x24c42d(0x18d)+_0x32a05e[_0x24c42d(0x188)]);}function convertToRuntimeConfig(_0x3a0c99){const _0xec7f01=a24_0x2bf37c;if(_0x3a0c99[_0xec7f01(0x1ad)]&&typeof _0x3a0c99[_0xec7f01(0x1ad)]===_0xec7f01(0x1a8))throw CliErrors['validation'](_0xec7f01(0x1c0),'Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.');const _0x524325={};for(const _0x2b4da0 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x3a0c99[_0x2b4da0]!==undefined&&(_0x524325[_0x2b4da0]=_0x3a0c99[_0x2b4da0]);}return!_0x524325[_0xec7f01(0x1d0)]&&(_0x524325[_0xec7f01(0x1d0)]=DEFAULT_CONFIG_VALUES[_0xec7f01(0x1d0)]),_0x524325;}async function runNonInteractive(_0x56ec8a,_0x2e99c5){const _0x58e7e7=a24_0x2bf37c,_0x11764a=_0x56ec8a['appcode'];if(!_0x11764a)throw CliErrors[_0x58e7e7(0x1c9)](_0x58e7e7(0x187),_0x58e7e7(0x1b8)+CLI_BIN_NAME+_0x58e7e7(0x1a5));const _0x70091f=resolveInitEnv(_0x56ec8a);await writeInitConfig(_0x2e99c5,{'appcode':_0x11764a,'env':_0x70091f},_0x56ec8a),console[_0x58e7e7(0x193)]('Initialized\x20'+_0x2e99c5),console['log'](_0x58e7e7(0x1c3)+_0x11764a),console[_0x58e7e7(0x193)](_0x58e7e7(0x19e)+_0x70091f);}async function runInteractive(_0x4704d2,_0x1dfdf6){const _0x406b87=a24_0x2bf37c,_0x35cf1d=loadExisting(_0x1dfdf6),_0x2695d4=typeof _0x35cf1d?.['appcode']===_0x406b87(0x1a4)?_0x35cf1d[_0x406b87(0x187)]:'',_0x2341df=resolveInitEnv(_0x4704d2);console['log'](CLI_BIN_NAME+_0x406b87(0x1a1)+PRODUCT_CONFIG[_0x406b87(0x18f)]+'\x0a');if(existsSync(_0x1dfdf6)&&!_0x4704d2['yes']){const _0x3b315b=await promptYesNo('File\x20'+_0x1dfdf6+_0x406b87(0x1b4),![]);if(!_0x3b315b){console[_0x406b87(0x193)](_0x406b87(0x1ca));return;}}const _0x285d46=typeof _0x4704d2[_0x406b87(0x187)]==='string'?_0x4704d2['appcode'][_0x406b87(0x19a)]():'';let _0x1f000d=_0x285d46;!_0x1f000d&&(_0x1f000d=await promptInput(_0x406b87(0x192),_0x2695d4));if(!_0x1f000d['trim']())throw CliErrors[_0x406b87(0x1b3)](_0x406b87(0x1ac));await writeInitConfig(_0x1dfdf6,{'appcode':_0x1f000d[_0x406b87(0x19a)](),'env':_0x2341df},_0x4704d2),console['log'](_0x406b87(0x1d1)+_0x1dfdf6),console['log'](_0x406b87(0x1c3)+_0x1f000d[_0x406b87(0x19a)]()),console['log'](_0x406b87(0x19e)+_0x2341df);}async function writeInitConfig(_0x6375c6,_0xd191b4,_0x3fead0){const _0x62ac20=a24_0x2bf37c;let _0x13ff84={};existsSync(_0x6375c6)&&!_0x3fead0[_0x62ac20(0x1c8)]&&(_0x13ff84=readConfigFile(_0x6375c6));for(const [_0x4c0993,_0x39ff5a]of Object[_0x62ac20(0x1cf)](_0xd191b4)){_0x39ff5a!==undefined&&(_0x13ff84[_0x4c0993]=_0x39ff5a);}if(_0x13ff84['app'])delete _0x13ff84[_0x62ac20(0x1b0)];writeConfigFile(_0x6375c6,_0x13ff84);}class AbortPrompt extends Error{constructor(){const _0x40863d=a24_0x2bf37c;super(_0x40863d(0x1c5)),this[_0x40863d(0x1bf)]=_0x40863d(0x196);}}function createSafeRl(){const _0x3a3f79=a24_0x2bf37c,_0xe401ef=createInterface({'input':process[_0x3a3f79(0x1d2)],'output':process[_0x3a3f79(0x18c)]});let _0x450d56;const _0x551b91=new Promise((_0x3a84d1,_0x3d6302)=>{const _0x139b8c=_0x3a3f79;_0x450d56=()=>{const _0x1bb621=a24_0x5676;_0x450d56&&(_0xe401ef[_0x1bb621(0x194)](_0x1bb621(0x1b7),_0x450d56),_0x450d56=undefined);try{_0xe401ef[_0x1bb621(0x1ae)]();}catch{}_0x3d6302(new AbortPrompt());},_0xe401ef[_0x139b8c(0x1a7)](_0x139b8c(0x1b7),_0x450d56);}),_0x109f28=()=>{const _0x1ae8d3=_0x3a3f79;_0x450d56&&(_0xe401ef[_0x1ae8d3(0x194)](_0x1ae8d3(0x1b7),_0x450d56),_0x450d56=undefined);try{_0xe401ef['close']();}catch{}};return{'rl':_0xe401ef,'abortPromise':_0x551b91,'disposeSuccess':_0x109f28};}async function promptInput(_0x340030,_0x5d1e59){const _0x513ebc=a24_0x2bf37c,{rl:_0x38ef0a,abortPromise:_0x4dad60,disposeSuccess:_0x5d9fdf}=createSafeRl(),_0x2fb62d=new Promise(_0x277db0=>{const _0xd218f9=a24_0x5676,_0x599846=_0x5d1e59?'\x20\x20'+_0x340030+'\x20('+_0x5d1e59+'):\x20':'\x20\x20'+_0x340030+':\x20';_0x38ef0a[_0xd218f9(0x19f)](_0x599846,_0x43e369=>{const _0x4fab08=_0xd218f9;_0x5d9fdf(),_0x277db0(_0x43e369[_0x4fab08(0x19a)]()||_0x5d1e59);});});return Promise[_0x513ebc(0x1a3)]([_0x2fb62d,_0x4dad60]);}async function promptYesNo(_0x2ce401,_0x4a3403){const _0x5966df=a24_0x2bf37c,{rl:_0x298011,abortPromise:_0xe7decb,disposeSuccess:_0x51c2f0}=createSafeRl(),_0x5e1e90=new Promise(_0x3f979e=>{const _0x445a3f=a24_0x5676,_0x1c7d4b=_0x4a3403?_0x445a3f(0x1a0):_0x445a3f(0x18b);_0x298011[_0x445a3f(0x19f)]('\x20\x20'+_0x2ce401+'\x20'+_0x1c7d4b+':\x20',_0x565e35=>{const _0x278db4=_0x445a3f;_0x51c2f0();const _0x851052=_0x565e35[_0x278db4(0x19a)]()[_0x278db4(0x1b5)]();if(_0x851052==='y'||_0x851052===_0x278db4(0x1c8))_0x3f979e(!![]);else{if(_0x851052==='n'||_0x851052==='no')_0x3f979e(![]);else _0x3f979e(_0x4a3403);}});});return Promise[_0x5966df(0x1a3)]([_0x5e1e90,_0xe7decb]);}function loadExisting(_0x1ba000){if(!existsSync(_0x1ba000))return null;return readConfigFile(_0x1ba000);}function resolveFilePath(_0x343382){const _0x8731d6=a24_0x2bf37c;return isAbsolute(_0x343382)?_0x343382:resolve(process[_0x8731d6(0x1bd)](),_0x343382);}function readSourceFile(_0x26c8f7){const _0x4e5582=a24_0x2bf37c;try{const _0xc0a743=readFileSync(_0x26c8f7,{'encoding':_0x4e5582(0x1ab)});return JSON[_0x4e5582(0x191)](_0xc0a743);}catch(_0x96a3de){throw CliErrors[_0x4e5582(0x1b3)](_0x4e5582(0x1d3)+_0x96a3de[_0x4e5582(0x1a6)]);}}function resolveInitEnv(_0xc7b0b0){const _0x5f5c7b=a24_0x2bf37c,_0xbcc10c=_0xc7b0b0[_0x5f5c7b(0x1c1)];if(_0xbcc10c===undefined||_0xbcc10c==='')return DEFAULT_CONFIG_VALUES[_0x5f5c7b(0x1c1)];if(!RUNTIME_ENV_VALUES[_0x5f5c7b(0x1b2)](_0xbcc10c))throw CliErrors[_0x5f5c7b(0x1b3)](_0x5f5c7b(0x19c)+_0xbcc10c+_0x5f5c7b(0x1cb)+RUNTIME_ENV_VALUES[_0x5f5c7b(0x1a2)](',\x20'));return _0xbcc10c;}
@@ -1 +1 @@
1
- const a22_0x56a8a7=a22_0xf8b3;(function(_0x2342dc,_0x30f817){const _0x3bf6c5=a22_0xf8b3,_0x1e9223=_0x2342dc();while(!![]){try{const _0x5c0bc8=-parseInt(_0x3bf6c5(0xf4))/0x1+-parseInt(_0x3bf6c5(0xea))/0x2+-parseInt(_0x3bf6c5(0xec))/0x3+-parseInt(_0x3bf6c5(0xff))/0x4*(-parseInt(_0x3bf6c5(0xfb))/0x5)+-parseInt(_0x3bf6c5(0x114))/0x6*(parseInt(_0x3bf6c5(0x10a))/0x7)+-parseInt(_0x3bf6c5(0xe7))/0x8+-parseInt(_0x3bf6c5(0x110))/0x9*(-parseInt(_0x3bf6c5(0xf5))/0xa);if(_0x5c0bc8===_0x30f817)break;else _0x1e9223['push'](_0x1e9223['shift']());}catch(_0x4f2040){_0x1e9223['push'](_0x1e9223['shift']());}}}(a22_0xc25c,0x900e9));import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalKnowledgeBaseItem,getPersonalKnowledgeBaseItem,listPersonalKnowledgeBaseItems,searchKnowledgeBase,updatePersonalKnowledgeBaseItem}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const TITLE_FLAG={'name':a22_0x56a8a7(0xe5),'type':'string','required':!![],'description':'Personal\x20knowledge-base\x20entry\x20title'},FILE_FLAG={'name':'file','type':a22_0x56a8a7(0x10d),'required':!![],'description':a22_0x56a8a7(0xf1)},QUERY_FLAG={'name':a22_0x56a8a7(0x10f),'type':'string','required':!![],'description':a22_0x56a8a7(0xf7)},TOPK_FLAG={'name':a22_0x56a8a7(0x11b),'type':a22_0x56a8a7(0x10e),'description':a22_0x56a8a7(0xfe)};function readKnowledgeFile(_0x45dfd4){const _0xe6f16f=a22_0x56a8a7;if(!_0x45dfd4)throw CliErrors['validation']('File\x20path\x20is\x20required.');if(!existsSync(_0x45dfd4))throw CliErrors[_0xe6f16f(0x118)](_0xe6f16f(0x10b)+_0x45dfd4);if(!statSync(_0x45dfd4)['isFile']())throw CliErrors[_0xe6f16f(0x118)](_0xe6f16f(0x11d)+_0x45dfd4);return readFileSync(_0x45dfd4,_0xe6f16f(0x108));}function summarizePersonalItem(_0x2d8aef){const _0x58db28=a22_0x56a8a7;return{'id':_0x2d8aef['id'],'title':_0x2d8aef[_0x58db28(0xe5)],'version':_0x2d8aef[_0x58db28(0xf8)],'ragStatus':_0x2d8aef[_0x58db28(0xfc)],'ragErrorMessage':_0x2d8aef[_0x58db28(0x11e)],'updateTime':_0x2d8aef[_0x58db28(0x113)]};}function detailPersonalItem(_0x4045b4){const _0x51b1a4=a22_0x56a8a7;return{'id':_0x4045b4['id'],'appCode':_0x4045b4[_0x51b1a4(0x104)],'scope':_0x4045b4[_0x51b1a4(0xf3)],'userId':_0x4045b4[_0x51b1a4(0x119)],'title':_0x4045b4['title'],'content':_0x4045b4['content']??'','version':_0x4045b4[_0x51b1a4(0xf8)],'ragStatus':_0x4045b4[_0x51b1a4(0xfc)],'ragErrorMessage':_0x4045b4[_0x51b1a4(0x11e)],'createTime':_0x4045b4[_0x51b1a4(0x112)],'updateTime':_0x4045b4[_0x51b1a4(0x113)]};}function summarizeSearchHit(_0xa1283){const _0xe094aa=a22_0x56a8a7;return{'scope':_0xa1283['scope'],'docId':_0xa1283[_0xe094aa(0x102)],'score':_0xa1283[_0xe094aa(0xe8)],'weightedScore':_0xa1283[_0xe094aa(0x116)],'content':_0xa1283['content'],'metadata':_0xa1283[_0xe094aa(0x100)]};}function a22_0xc25c(){const _0x5f390d=['detail','scope','1058712WMdswN','374860klGDMU','/update','Search\x20query\x20for\x20visible\x20company\x20and\x20personal\x20knowledge','version','length','write','10akUlNk','ragStatus','verbose','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','2248852BVsipG','metadata','Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20','docId','Override\x20the\x20existing\x20entry\x20title','appCode','read','Search\x20query\x20is\x20required.','Create\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','utf8','description','336pGduaW','File\x20not\x20found:\x20','isFinite','string','number','query','585afjaXT','Updated\x20KB\x20entry\x20','createTime','updateTime','60156OdTSLT','--topk\x20must\x20be\x20a\x20positive\x20number.','weightedScore','search','validation','userId','/client/knowledge-base/personal/create','topk','Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','File\x20is\x20not\x20a\x20regular\x20file:\x20','ragErrorMessage','file','Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22','str','Update\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','title','body','2346528vryKDN','score','trim','2085870egiCVU','/client/knowledge-base/personal/','284244tRVrJG','build','num','POST','create','Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file'];a22_0xc25c=function(){return _0x5f390d;};return a22_0xc25c();}function a22_0xf8b3(_0x3e01b2,_0x3e807c){_0x3e01b2=_0x3e01b2-0xe2;const _0xc25cdf=a22_0xc25c();let _0xf8b303=_0xc25cdf[_0x3e01b2];return _0xf8b303;}function readTopK(_0x4dd195){const _0x517490=a22_0x56a8a7,_0x3cae87=_0x4dd195['flag'](_0x517490(0x11b));if(_0x3cae87===undefined||_0x3cae87===null||_0x3cae87==='')return undefined;const _0xe870b0=_0x4dd195[_0x517490(0xee)](_0x517490(0x11b));if(!Number[_0x517490(0x10c)](_0xe870b0)||_0xe870b0<0x1)throw CliErrors[_0x517490(0x118)](_0x517490(0x115));return _0xe870b0;}const kbList={'service':'kb','command':'list','description':'List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','risk':a22_0x56a8a7(0x105),'flags':[VERBOSE_FLAG],async 'execute'(_0x2fb0da){const _0x3229b5=a22_0x56a8a7,_0x9a7835=await listPersonalKnowledgeBaseItems(_0x2fb0da[_0x3229b5(0x104)]);if(_0x2fb0da['bool'](_0x3229b5(0xfd)))return{'ok':!![],'data':{'total':_0x9a7835['length'],'items':_0x9a7835}};return{'ok':!![],'data':{'total':_0x9a7835['length'],'items':_0x9a7835['map'](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':a22_0x56a8a7(0xf2),'description':a22_0x56a8a7(0x11c),'risk':a22_0x56a8a7(0x105),'flags':[{...ID_FLAG,'description':'Personal\x20knowledge-base\x20entry\x20ID'}],async 'execute'(_0x385e05){const _0x4bc067=a22_0x56a8a7,_0x856535=await getPersonalKnowledgeBaseItem(_0x385e05['num']('id'),_0x385e05[_0x4bc067(0x104)]);return{'ok':!![],'data':detailPersonalItem(_0x856535)};}},kbCreate={'service':'kb','command':a22_0x56a8a7(0xf0),'description':a22_0x56a8a7(0x107),'risk':a22_0x56a8a7(0xfa),'flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x4b323e){const _0x2a06be=a22_0x56a8a7,_0x1d3411=_0x4b323e[_0x2a06be(0xe3)](_0x2a06be(0xe5)),_0x50eb2e=readKnowledgeFile(_0x4b323e[_0x2a06be(0xe3)](_0x2a06be(0x11f))),_0x1f5221=await createPersonalKnowledgeBaseItem(_0x4b323e[_0x2a06be(0x104)],{'title':_0x1d3411,'content':_0x50eb2e});return{'ok':!![],'data':summarizePersonalItem(_0x1f5221),'message':'Created\x20KB\x20entry\x20'+_0x1f5221['id']+'\x20('+_0x1f5221[_0x2a06be(0xe5)]+')'};},async 'dryRun'(_0x15c19b){const _0x1df658=a22_0x56a8a7,_0x5b4c3e=_0x15c19b[_0x1df658(0xe3)](_0x1df658(0xe5)),_0x3469b6=readKnowledgeFile(_0x15c19b[_0x1df658(0xe3)](_0x1df658(0x11f)));return dryRun('POST',_0x1df658(0x11a))[_0x1df658(0xe6)]({'appCode':_0x15c19b[_0x1df658(0x104)],'title':_0x5b4c3e,'content':_0x3469b6})['description'](_0x1df658(0xe2)+_0x5b4c3e+'\x22')[_0x1df658(0xed)]();}},kbUpdate={'service':'kb','command':'update','description':a22_0x56a8a7(0xe4),'risk':a22_0x56a8a7(0xfa),'flags':[{...ID_FLAG,'description':'Personal\x20knowledge-base\x20entry\x20ID'},{...TITLE_FLAG,'required':![],'description':a22_0x56a8a7(0x103)},FILE_FLAG],async 'execute'(_0x5e0e6c){const _0x35c4e4=a22_0x56a8a7,_0x48e133=_0x5e0e6c[_0x35c4e4(0xee)]('id'),_0x82e284=readKnowledgeFile(_0x5e0e6c[_0x35c4e4(0xe3)](_0x35c4e4(0x11f))),_0x40faf5=_0x5e0e6c[_0x35c4e4(0xe3)]('title')||(await getPersonalKnowledgeBaseItem(_0x48e133,_0x5e0e6c[_0x35c4e4(0x104)]))[_0x35c4e4(0xe5)],_0x1fa572=await updatePersonalKnowledgeBaseItem(_0x48e133,_0x5e0e6c['appCode'],{'title':_0x40faf5,'content':_0x82e284});return{'ok':!![],'data':summarizePersonalItem(_0x1fa572),'message':_0x35c4e4(0x111)+_0x1fa572['id']+'\x20('+_0x1fa572[_0x35c4e4(0xe5)]+')'};},async 'dryRun'(_0x194301){const _0x21a0de=a22_0x56a8a7,_0x24e7c8=_0x194301[_0x21a0de(0xee)]('id'),_0x33a27e=readKnowledgeFile(_0x194301[_0x21a0de(0xe3)](_0x21a0de(0x11f))),_0x299942=_0x194301[_0x21a0de(0xe3)]('title')||(await getPersonalKnowledgeBaseItem(_0x24e7c8,_0x194301[_0x21a0de(0x104)]))[_0x21a0de(0xe5)];return dryRun(_0x21a0de(0xef),_0x21a0de(0xeb)+_0x24e7c8+_0x21a0de(0xf6))[_0x21a0de(0xe6)]({'appCode':_0x194301[_0x21a0de(0x104)],'title':_0x299942,'content':_0x33a27e})[_0x21a0de(0x109)](_0x21a0de(0x101)+_0x24e7c8)[_0x21a0de(0xed)]();}},kbSearch={'service':'kb','command':a22_0x56a8a7(0x117),'description':'Search\x20visible\x20company\x20and\x20personal\x20knowledge\x20base\x20content','risk':'read','flags':[QUERY_FLAG,TOPK_FLAG],async 'validate'(_0x1cdacd){const _0x3cc2ca=a22_0x56a8a7;if(!_0x1cdacd[_0x3cc2ca(0xe3)](_0x3cc2ca(0x10f))[_0x3cc2ca(0xe9)]())throw CliErrors[_0x3cc2ca(0x118)](_0x3cc2ca(0x106));readTopK(_0x1cdacd);},async 'execute'(_0xc07424){const _0x44f883=a22_0x56a8a7,_0x27b512=_0xc07424[_0x44f883(0xe3)](_0x44f883(0x10f))[_0x44f883(0xe9)](),_0x29a886=readTopK(_0xc07424),_0x735189=await searchKnowledgeBase(_0xc07424[_0x44f883(0x104)],{'query':_0x27b512,'topK':_0x29a886});return{'ok':!![],'data':{'total':_0x735189[_0x44f883(0xf9)],'hits':_0x735189['map'](summarizeSearchHit)}};}};export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];
1
+ const a25_0x344dfc=a25_0x4c56;(function(_0x4f12f7,_0x22203d){const _0x508817=a25_0x4c56,_0x4b7c67=_0x4f12f7();while(!![]){try{const _0x421780=-parseInt(_0x508817(0x15d))/0x1+-parseInt(_0x508817(0x159))/0x2*(-parseInt(_0x508817(0x176))/0x3)+-parseInt(_0x508817(0x153))/0x4+parseInt(_0x508817(0x16a))/0x5*(parseInt(_0x508817(0x143))/0x6)+-parseInt(_0x508817(0x165))/0x7+parseInt(_0x508817(0x161))/0x8*(-parseInt(_0x508817(0x142))/0x9)+-parseInt(_0x508817(0x144))/0xa*(-parseInt(_0x508817(0x15b))/0xb);if(_0x421780===_0x22203d)break;else _0x4b7c67['push'](_0x4b7c67['shift']());}catch(_0x295061){_0x4b7c67['push'](_0x4b7c67['shift']());}}}(a25_0x355c,0x1bff1));import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalKnowledgeBaseItem,getPersonalKnowledgeBaseItem,listPersonalKnowledgeBaseItems,searchKnowledgeBase,updatePersonalKnowledgeBaseItem}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const TITLE_FLAG={'name':a25_0x344dfc(0x152),'type':a25_0x344dfc(0x145),'required':!![],'description':a25_0x344dfc(0x168)},FILE_FLAG={'name':a25_0x344dfc(0x166),'type':a25_0x344dfc(0x145),'required':!![],'description':'Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file'},QUERY_FLAG={'name':a25_0x344dfc(0x147),'type':a25_0x344dfc(0x145),'required':!![],'description':'Search\x20query\x20for\x20visible\x20company\x20and\x20personal\x20knowledge'},TOPK_FLAG={'name':a25_0x344dfc(0x175),'type':a25_0x344dfc(0x151),'description':a25_0x344dfc(0x155)};function readKnowledgeFile(_0x32019c){const _0x3a756c=a25_0x344dfc;if(!_0x32019c)throw CliErrors[_0x3a756c(0x14e)](_0x3a756c(0x177));if(!existsSync(_0x32019c))throw CliErrors[_0x3a756c(0x14e)](_0x3a756c(0x15c)+_0x32019c);if(!statSync(_0x32019c)[_0x3a756c(0x154)]())throw CliErrors['validation'](_0x3a756c(0x17e)+_0x32019c);return readFileSync(_0x32019c,_0x3a756c(0x17a));}function summarizePersonalItem(_0x39eb25){const _0x2f727c=a25_0x344dfc;return{'id':_0x39eb25['id'],'title':_0x39eb25[_0x2f727c(0x152)],'version':_0x39eb25['version'],'ragStatus':_0x39eb25[_0x2f727c(0x162)],'ragErrorMessage':_0x39eb25['ragErrorMessage'],'updateTime':_0x39eb25['updateTime']};}function a25_0x355c(){const _0x2c5e2a=['865086SIzTld','6870OQHVux','string','create','query','--topk\x20must\x20be\x20a\x20positive\x20number.','metadata','search','num','detail','content','validation','Search\x20query\x20is\x20required.','/client/knowledge-base/personal/','number','title','865984rXbfff','isFile','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','updateTime','build','read','2vnlETr','Created\x20KB\x20entry\x20','6809kfKHOC','File\x20not\x20found:\x20','35251afHEYO','map','Search\x20visible\x20company\x20and\x20personal\x20knowledge\x20base\x20content','length','8UFOPtP','ragStatus','write','verbose','1124389bmLXpu','file','Personal\x20knowledge-base\x20entry\x20ID','Personal\x20knowledge-base\x20entry\x20title','update','5AWkoiW','Update\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','version','appCode','scope','body','str','bool','description','POST','List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','topk','150078sDGGUh','File\x20path\x20is\x20required.','/client/knowledge-base/personal/create','Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22','utf8','trim','createTime','docId','File\x20is\x20not\x20a\x20regular\x20file:\x20','list','831717wwjLNQ'];a25_0x355c=function(){return _0x2c5e2a;};return a25_0x355c();}function detailPersonalItem(_0x504657){const _0x32fc90=a25_0x344dfc;return{'id':_0x504657['id'],'appCode':_0x504657[_0x32fc90(0x16d)],'scope':_0x504657[_0x32fc90(0x16e)],'userId':_0x504657['userId'],'title':_0x504657['title'],'content':_0x504657[_0x32fc90(0x14d)]??'','version':_0x504657[_0x32fc90(0x16c)],'ragStatus':_0x504657[_0x32fc90(0x162)],'ragErrorMessage':_0x504657['ragErrorMessage'],'createTime':_0x504657[_0x32fc90(0x17c)],'updateTime':_0x504657[_0x32fc90(0x156)]};}function summarizeSearchHit(_0x27378f){const _0x28a480=a25_0x344dfc;return{'scope':_0x27378f[_0x28a480(0x16e)],'docId':_0x27378f[_0x28a480(0x17d)],'score':_0x27378f['score'],'weightedScore':_0x27378f['weightedScore'],'content':_0x27378f[_0x28a480(0x14d)],'metadata':_0x27378f[_0x28a480(0x149)]};}function readTopK(_0x7b3b7a){const _0xa86f12=a25_0x344dfc,_0x282454=_0x7b3b7a['flag']('topk');if(_0x282454===undefined||_0x282454===null||_0x282454==='')return undefined;const _0x465b1e=_0x7b3b7a['num'](_0xa86f12(0x175));if(!Number['isFinite'](_0x465b1e)||_0x465b1e<0x1)throw CliErrors[_0xa86f12(0x14e)](_0xa86f12(0x148));return _0x465b1e;}const kbList={'service':'kb','command':a25_0x344dfc(0x141),'description':a25_0x344dfc(0x174),'risk':a25_0x344dfc(0x158),'flags':[VERBOSE_FLAG],async 'execute'(_0x1a52a1){const _0x52376e=a25_0x344dfc,_0x34c2a7=await listPersonalKnowledgeBaseItems(_0x1a52a1['appCode']);if(_0x1a52a1[_0x52376e(0x171)](_0x52376e(0x164)))return{'ok':!![],'data':{'total':_0x34c2a7['length'],'items':_0x34c2a7}};return{'ok':!![],'data':{'total':_0x34c2a7['length'],'items':_0x34c2a7[_0x52376e(0x15e)](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':a25_0x344dfc(0x14c),'description':'Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','risk':a25_0x344dfc(0x158),'flags':[{...ID_FLAG,'description':a25_0x344dfc(0x167)}],async 'execute'(_0x221cba){const _0x4a7603=a25_0x344dfc,_0x565a22=await getPersonalKnowledgeBaseItem(_0x221cba[_0x4a7603(0x14b)]('id'),_0x221cba[_0x4a7603(0x16d)]);return{'ok':!![],'data':detailPersonalItem(_0x565a22)};}},kbCreate={'service':'kb','command':a25_0x344dfc(0x146),'description':'Create\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','risk':a25_0x344dfc(0x163),'flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0xb45c1e){const _0x3cde14=a25_0x344dfc,_0x1dd150=_0xb45c1e[_0x3cde14(0x170)]('title'),_0x38b4c7=readKnowledgeFile(_0xb45c1e[_0x3cde14(0x170)](_0x3cde14(0x166))),_0x4f4d18=await createPersonalKnowledgeBaseItem(_0xb45c1e[_0x3cde14(0x16d)],{'title':_0x1dd150,'content':_0x38b4c7});return{'ok':!![],'data':summarizePersonalItem(_0x4f4d18),'message':_0x3cde14(0x15a)+_0x4f4d18['id']+'\x20('+_0x4f4d18[_0x3cde14(0x152)]+')'};},async 'dryRun'(_0x267485){const _0x3a5c95=a25_0x344dfc,_0x2cb63a=_0x267485[_0x3a5c95(0x170)](_0x3a5c95(0x152)),_0x4863b2=readKnowledgeFile(_0x267485['str'](_0x3a5c95(0x166)));return dryRun(_0x3a5c95(0x173),_0x3a5c95(0x178))['body']({'appCode':_0x267485[_0x3a5c95(0x16d)],'title':_0x2cb63a,'content':_0x4863b2})[_0x3a5c95(0x172)](_0x3a5c95(0x179)+_0x2cb63a+'\x22')[_0x3a5c95(0x157)]();}},kbUpdate={'service':'kb','command':a25_0x344dfc(0x169),'description':a25_0x344dfc(0x16b),'risk':a25_0x344dfc(0x163),'flags':[{...ID_FLAG,'description':a25_0x344dfc(0x167)},{...TITLE_FLAG,'required':![],'description':'Override\x20the\x20existing\x20entry\x20title'},FILE_FLAG],async 'execute'(_0x345f58){const _0x113cbb=a25_0x344dfc,_0x79927b=_0x345f58[_0x113cbb(0x14b)]('id'),_0x505797=readKnowledgeFile(_0x345f58[_0x113cbb(0x170)](_0x113cbb(0x166))),_0x4c1acc=_0x345f58['str'](_0x113cbb(0x152))||(await getPersonalKnowledgeBaseItem(_0x79927b,_0x345f58['appCode']))['title'],_0x13e365=await updatePersonalKnowledgeBaseItem(_0x79927b,_0x345f58['appCode'],{'title':_0x4c1acc,'content':_0x505797});return{'ok':!![],'data':summarizePersonalItem(_0x13e365),'message':'Updated\x20KB\x20entry\x20'+_0x13e365['id']+'\x20('+_0x13e365[_0x113cbb(0x152)]+')'};},async 'dryRun'(_0x278bfe){const _0x243ec5=a25_0x344dfc,_0x24bce9=_0x278bfe[_0x243ec5(0x14b)]('id'),_0x8392f3=readKnowledgeFile(_0x278bfe[_0x243ec5(0x170)](_0x243ec5(0x166))),_0x1874e5=_0x278bfe[_0x243ec5(0x170)](_0x243ec5(0x152))||(await getPersonalKnowledgeBaseItem(_0x24bce9,_0x278bfe['appCode']))['title'];return dryRun(_0x243ec5(0x173),_0x243ec5(0x150)+_0x24bce9+'/update')[_0x243ec5(0x16f)]({'appCode':_0x278bfe[_0x243ec5(0x16d)],'title':_0x1874e5,'content':_0x8392f3})[_0x243ec5(0x172)]('Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20'+_0x24bce9)[_0x243ec5(0x157)]();}},kbSearch={'service':'kb','command':a25_0x344dfc(0x14a),'description':a25_0x344dfc(0x15f),'risk':a25_0x344dfc(0x158),'flags':[QUERY_FLAG,TOPK_FLAG],async 'validate'(_0x58cb56){const _0x2f0912=a25_0x344dfc;if(!_0x58cb56[_0x2f0912(0x170)](_0x2f0912(0x147))[_0x2f0912(0x17b)]())throw CliErrors['validation'](_0x2f0912(0x14f));readTopK(_0x58cb56);},async 'execute'(_0x1c32f8){const _0xe12d7f=a25_0x344dfc,_0x351356=_0x1c32f8[_0xe12d7f(0x170)](_0xe12d7f(0x147))[_0xe12d7f(0x17b)](),_0x1ba5a7=readTopK(_0x1c32f8),_0x38ffc2=await searchKnowledgeBase(_0x1c32f8['appCode'],{'query':_0x351356,'topK':_0x1ba5a7});return{'ok':!![],'data':{'total':_0x38ffc2[_0xe12d7f(0x160)],'hits':_0x38ffc2[_0xe12d7f(0x15e)](summarizeSearchHit)}};}};function a25_0x4c56(_0x2c9d5f,_0x154904){_0x2c9d5f=_0x2c9d5f-0x141;const _0x355ca4=a25_0x355c();let _0x4c5650=_0x355ca4[_0x2c9d5f];return _0x4c5650;}export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];
@@ -1 +1 @@
1
- const a23_0x392db7=a23_0x46eb;(function(_0x2c972c,_0x5e41ea){const _0x5839d3=a23_0x46eb,_0x2b9af2=_0x2c972c();while(!![]){try{const _0x498450=-parseInt(_0x5839d3(0x180))/0x1+-parseInt(_0x5839d3(0x17f))/0x2*(-parseInt(_0x5839d3(0x17c))/0x3)+-parseInt(_0x5839d3(0x183))/0x4+parseInt(_0x5839d3(0x185))/0x5*(parseInt(_0x5839d3(0x178))/0x6)+parseInt(_0x5839d3(0x190))/0x7+-parseInt(_0x5839d3(0x175))/0x8*(-parseInt(_0x5839d3(0x192))/0x9)+-parseInt(_0x5839d3(0x18c))/0xa*(parseInt(_0x5839d3(0x17e))/0xb);if(_0x498450===_0x5e41ea)break;else _0x2b9af2['push'](_0x2b9af2['shift']());}catch(_0x147b15){_0x2b9af2['push'](_0x2b9af2['shift']());}}}(a23_0x39f8,0x53b42));function a23_0x39f8(){const _0x4a3e3e=['33wlEGAn','46lNQJTF','359242hMDUnu','show','details','366912tRXjRx','\x20\x20\x20Time:\x20','15FrGSHI','en-US','forEach','warn','length','\x20\x20\x20Details:\x20','readLogs','921110pIATuA','level','clearLogs','command','576562WmFsJl','*\x20No\x20logs\x20found','418023cEvZxW','log','keys','logs','toLocaleString','\x20logs:\x0a','*\x20Logs\x20cleared','40oLIpEr','read','\x20\x20\x20Duration:\x20','251946uOzfap','View\x20command\x20history\x20logs','stringify','success','82119OgiREq','duration'];a23_0x39f8=function(){return _0x4a3e3e;};return a23_0x39f8();}import{logger}from'../../utils/logger.js';function a23_0x46eb(_0x2d503e,_0x401c2d){_0x2d503e=_0x2d503e-0x171;const _0x39f8f1=a23_0x39f8();let _0x46eb52=_0x39f8f1[_0x2d503e];return _0x46eb52;}import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function printLogs(_0xe74929){const _0x53b1bb=a23_0x46eb;if(_0xe74929['length']===0x0){console[_0x53b1bb(0x193)](_0x53b1bb(0x191));return;}console[_0x53b1bb(0x193)]('*\x20'+CLI_DISPLAY_NAME+_0x53b1bb(0x173)),_0xe74929[_0x53b1bb(0x187)]((_0x3cefe1,_0x58b830)=>{const _0x524008=_0x53b1bb,_0x5365ac=new Date(_0x3cefe1['timestamp'])[_0x524008(0x172)](_0x524008(0x186)),_0x37ebb8=_0x3cefe1[_0x524008(0x18d)]===_0x524008(0x17b)?'√':_0x3cefe1[_0x524008(0x18d)]==='error'?'×':_0x3cefe1[_0x524008(0x18d)]===_0x524008(0x188)?'!':'i';console[_0x524008(0x193)](_0x58b830+0x1+'.\x20'+_0x37ebb8+'\x20['+_0x3cefe1[_0x524008(0x18f)]+']\x20'+_0x3cefe1['message']),console[_0x524008(0x193)](_0x524008(0x184)+_0x5365ac),_0x3cefe1['duration']&&console['log'](_0x524008(0x177)+_0x3cefe1[_0x524008(0x17d)]+'ms'),_0x3cefe1[_0x524008(0x182)]&&Object[_0x524008(0x194)](_0x3cefe1[_0x524008(0x182)])[_0x524008(0x189)]>0x0&&console[_0x524008(0x193)](_0x524008(0x18a)+JSON[_0x524008(0x17a)](_0x3cefe1[_0x524008(0x182)],null,0x2)),console[_0x524008(0x193)]('');});}export const logsDefinitions=[{'service':a23_0x392db7(0x171),'command':a23_0x392db7(0x181),'description':a23_0x392db7(0x179),'risk':a23_0x392db7(0x176),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x2fbe79){const _0x50e457=a23_0x392db7;return printLogs(logger[_0x50e457(0x18b)]()),{'ok':!![]};}},{'service':a23_0x392db7(0x171),'command':'clear','description':'Clear\x20command\x20history\x20logs','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x5238d0){const _0x2ae116=a23_0x392db7;return logger[_0x2ae116(0x18e)](),console[_0x2ae116(0x193)](_0x2ae116(0x174)),{'ok':!![]};}}];
1
+ const a26_0x2a6430=a26_0x21d0;(function(_0x21124e,_0x10b6ec){const _0x587b2b=a26_0x21d0,_0xf380a8=_0x21124e();while(!![]){try{const _0x30f95d=-parseInt(_0x587b2b(0x115))/0x1+-parseInt(_0x587b2b(0x110))/0x2+parseInt(_0x587b2b(0x118))/0x3+-parseInt(_0x587b2b(0x10c))/0x4+-parseInt(_0x587b2b(0xfa))/0x5*(parseInt(_0x587b2b(0xf8))/0x6)+-parseInt(_0x587b2b(0x111))/0x7+parseInt(_0x587b2b(0x10a))/0x8;if(_0x30f95d===_0x10b6ec)break;else _0xf380a8['push'](_0xf380a8['shift']());}catch(_0x22b26d){_0xf380a8['push'](_0xf380a8['shift']());}}}(a26_0x9e5f,0x5d2f4));function a26_0x9e5f(){const _0x323e23=['keys','873392HUUKnT','3994060kfiTsn','level','show','toLocaleString','293243lzlyst','en-US','message','471714FbjJfY','error','clear','42NqKJaH','length','184795GMCugq','details','clearLogs','\x20logs:\x0a','View\x20command\x20history\x20logs','read','*\x20Logs\x20cleared','Clear\x20command\x20history\x20logs','log','timestamp','logs','readLogs','\x20\x20\x20Details:\x20','success','write','\x20\x20\x20Time:\x20','14516856khIAWN','warn','123716tAPOCY','command','forEach'];a26_0x9e5f=function(){return _0x323e23;};return a26_0x9e5f();}import{logger}from'../../utils/logger.js';import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function a26_0x21d0(_0xd2a363,_0x4ca686){_0xd2a363=_0xd2a363-0xf6;const _0x9e5f99=a26_0x9e5f();let _0x21d0cf=_0x9e5f99[_0xd2a363];return _0x21d0cf;}function printLogs(_0x3db2df){const _0x2b901d=a26_0x21d0;if(_0x3db2df[_0x2b901d(0xf9)]===0x0){console['log']('*\x20No\x20logs\x20found');return;}console[_0x2b901d(0x102)]('*\x20'+CLI_DISPLAY_NAME+_0x2b901d(0xfd)),_0x3db2df[_0x2b901d(0x10e)]((_0x4d9d25,_0x3c6a14)=>{const _0x181220=_0x2b901d,_0x268b77=new Date(_0x4d9d25[_0x181220(0x103)])[_0x181220(0x114)](_0x181220(0x116)),_0x2188d7=_0x4d9d25[_0x181220(0x112)]===_0x181220(0x107)?'√':_0x4d9d25[_0x181220(0x112)]===_0x181220(0xf6)?'×':_0x4d9d25['level']===_0x181220(0x10b)?'!':'i';console['log'](_0x3c6a14+0x1+'.\x20'+_0x2188d7+'\x20['+_0x4d9d25[_0x181220(0x10d)]+']\x20'+_0x4d9d25[_0x181220(0x117)]),console[_0x181220(0x102)](_0x181220(0x109)+_0x268b77),_0x4d9d25['duration']&&console[_0x181220(0x102)]('\x20\x20\x20Duration:\x20'+_0x4d9d25['duration']+'ms'),_0x4d9d25['details']&&Object[_0x181220(0x10f)](_0x4d9d25[_0x181220(0xfb)])[_0x181220(0xf9)]>0x0&&console[_0x181220(0x102)](_0x181220(0x106)+JSON['stringify'](_0x4d9d25[_0x181220(0xfb)],null,0x2)),console[_0x181220(0x102)]('');});}export const logsDefinitions=[{'service':'logs','command':a26_0x2a6430(0x113),'description':a26_0x2a6430(0xfe),'risk':a26_0x2a6430(0xff),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x414efb){const _0x1bb7ce=a26_0x2a6430;return printLogs(logger[_0x1bb7ce(0x105)]()),{'ok':!![]};}},{'service':a26_0x2a6430(0x104),'command':a26_0x2a6430(0xf7),'description':a26_0x2a6430(0x101),'risk':a26_0x2a6430(0x108),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x27bfd6){const _0x37fcae=a26_0x2a6430;return logger[_0x37fcae(0xfc)](),console['log'](_0x37fcae(0x100)),{'ok':!![]};}}];
@@ -0,0 +1 @@
1
+ function a27_0x5dfb(_0x4e95b5,_0x356002){_0x4e95b5=_0x4e95b5-0x11d;const _0x21c7f4=a27_0x21c7();let _0x5dfb10=_0x21c7f4[_0x4e95b5];return _0x5dfb10;}const a27_0xe72f04=a27_0x5dfb;(function(_0x530938,_0x4969b6){const _0x1a6931=a27_0x5dfb,_0x27d49b=_0x530938();while(!![]){try{const _0x5934e8=-parseInt(_0x1a6931(0x120))/0x1*(-parseInt(_0x1a6931(0x124))/0x2)+-parseInt(_0x1a6931(0x122))/0x3*(-parseInt(_0x1a6931(0x163))/0x4)+parseInt(_0x1a6931(0x157))/0x5+-parseInt(_0x1a6931(0x148))/0x6*(-parseInt(_0x1a6931(0x15f))/0x7)+-parseInt(_0x1a6931(0x130))/0x8*(-parseInt(_0x1a6931(0x11f))/0x9)+parseInt(_0x1a6931(0x151))/0xa*(parseInt(_0x1a6931(0x13c))/0xb)+-parseInt(_0x1a6931(0x123))/0xc;if(_0x5934e8===_0x4969b6)break;else _0x27d49b['push'](_0x27d49b['shift']());}catch(_0x4ca963){_0x27d49b['push'](_0x27d49b['shift']());}}}(a27_0x21c7,0xdaad4));import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalBff,executePersonalBff,getPersonalBff,listPersonalBffs,updatePersonalBff}from'../../core/api-client.js';import{ID_FLAG,PARAMS_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';function a27_0x21c7(){const _0x46b8d8=['File\x20is\x20not\x20a\x20regular\x20file:\x20','9614627XJpCHt','params','read','Personal\x20BFF\x20functionName,\x20for\x20example\x20loadOrders','createTime','body','length','gmtModified','bool','Path\x20to\x20a\x20local\x20UTF-8\x20JavaScript\x20or\x20TypeScript\x20file','JSON\x20object\x20passed\x20to\x20the\x20personal\x20BFF\x20execution','Personal\x20BFF\x20script\x20ID','718176pinrEI','string','exec','Create\x20a\x20personal\x20BFF\x20from\x20a\x20local\x20script\x20file','Show\x20one\x20personal\x20BFF\x20by\x20id','map','List\x20current\x20user\x27s\x20personal\x20BFF\x20scripts\x20for\x20the\x20current\x20app','flag','create','10GJsvvT','isFile','description','write','scriptType','build','7209625MWeqUL','num','config','personal-bff\x20update\x20requires\x20at\x20least\x20one\x20of\x20--name,\x20--description,\x20--file,\x20or\x20--source-session-id.','File\x20not\x20found:\x20','Optional\x20source\x20RuntimeAgent\x20session\x20id','Updated\x20personal\x20BFF\x20','detail','49rOJsaM','personal-bff','trim','scriptContent','8obhPHZ','utf8','/client/runtime-bff/personal/create','test','4406463eJLaOF','1CbMBPs','file','750987ZeuGxk','41251872cTgpTs','378474EovJBT','appCode','verbose','str','POST','name','functionName','Created\x20personal\x20BFF\x20','/client/runtime-bff/personal/','list','Personal\x20BFF\x20description','validation','8xnlulW','update','source-session-id','updateTime','--params\x20must\x20be\x20a\x20JSON\x20object.','Update\x20a\x20personal\x20BFF\x20by\x20id','version','high-risk-write','gmtCreate','Execute\x20a\x20personal\x20BFF\x20by\x20id\x20with\x20optional\x20JSON\x20params','Preview:\x20create\x20personal\x20BFF\x20'];a27_0x21c7=function(){return _0x46b8d8;};return a27_0x21c7();}import{dryRun}from'../../framework/dryrun.js';import{parseJsonParams}from'../../utils/params.js';const FUNCTION_NAME_PATTERN=/^[a-zA-Z_$][a-zA-Z0-9_$]*$/,FILE_FLAG={'name':a27_0xe72f04(0x121),'type':'string','description':a27_0xe72f04(0x145)},FUNCTION_NAME_FLAG={'name':a27_0xe72f04(0x129),'type':a27_0xe72f04(0x149),'required':!![],'description':a27_0xe72f04(0x13f)},DESCRIPTION_FLAG={'name':a27_0xe72f04(0x153),'type':a27_0xe72f04(0x149),'description':a27_0xe72f04(0x12e)},SOURCE_SESSION_FLAG={'name':a27_0xe72f04(0x132),'type':a27_0xe72f04(0x149),'description':a27_0xe72f04(0x15c)};function normalizeFunctionName(_0x59a10b){const _0x36bf52=a27_0xe72f04,_0x16df60=String(_0x59a10b||'')[_0x36bf52(0x161)]();if(!_0x16df60||!FUNCTION_NAME_PATTERN[_0x36bf52(0x11e)](_0x16df60))throw CliErrors[_0x36bf52(0x12f)]('--name\x20must\x20be\x20a\x20valid\x20JavaScript\x20identifier,\x20for\x20example\x20loadOrders.');return _0x16df60;}function readScriptFile(_0x246505){const _0x57e702=a27_0xe72f04;if(!_0x246505)throw CliErrors[_0x57e702(0x12f)]('File\x20path\x20is\x20required.');if(!existsSync(_0x246505))throw CliErrors[_0x57e702(0x12f)](_0x57e702(0x15b)+_0x246505);if(!statSync(_0x246505)[_0x57e702(0x152)]())throw CliErrors[_0x57e702(0x12f)](_0x57e702(0x13b)+_0x246505);const _0x4dff0b=readFileSync(_0x246505,_0x57e702(0x164));if(!_0x4dff0b[_0x57e702(0x161)]())throw CliErrors[_0x57e702(0x12f)]('Personal\x20BFF\x20script\x20file\x20is\x20blank.');return _0x4dff0b;}function optionalTrimmed(_0x257fe1){const _0x328d25=a27_0xe72f04,_0x43ed5a=String(_0x257fe1||'')[_0x328d25(0x161)]();return _0x43ed5a||undefined;}function summarizeBff(_0x43bb7b){const _0x9750c3=a27_0xe72f04;return{'id':_0x43bb7b['id'],'appCode':_0x43bb7b[_0x9750c3(0x125)],'functionName':_0x43bb7b[_0x9750c3(0x12a)],'description':_0x43bb7b[_0x9750c3(0x153)],'scriptType':_0x43bb7b[_0x9750c3(0x155)],'version':_0x43bb7b[_0x9750c3(0x136)],'gmtModified':_0x43bb7b[_0x9750c3(0x143)],'updateTime':_0x43bb7b[_0x9750c3(0x133)]};}function detailBff(_0x2c985b){const _0x62dbc3=a27_0xe72f04;return{'id':_0x2c985b['id'],'appCode':_0x2c985b[_0x62dbc3(0x125)],'functionName':_0x2c985b[_0x62dbc3(0x12a)],'description':_0x2c985b[_0x62dbc3(0x153)],'scriptType':_0x2c985b[_0x62dbc3(0x155)],'scriptContent':_0x2c985b[_0x62dbc3(0x162)]??'','config':_0x2c985b[_0x62dbc3(0x159)],'version':_0x2c985b[_0x62dbc3(0x136)],'createUserId':_0x2c985b['createUserId'],'gmtCreate':_0x2c985b[_0x62dbc3(0x138)],'gmtModified':_0x2c985b[_0x62dbc3(0x143)],'createTime':_0x2c985b[_0x62dbc3(0x140)],'updateTime':_0x2c985b['updateTime']};}function buildCreateInput(_0x10fbdd){const _0x4e5897=a27_0xe72f04;return{'functionName':normalizeFunctionName(_0x10fbdd[_0x4e5897(0x127)](_0x4e5897(0x129))),...optionalTrimmed(_0x10fbdd[_0x4e5897(0x127)]('description'))?{'description':optionalTrimmed(_0x10fbdd['str'](_0x4e5897(0x153)))}:{},'scriptContent':readScriptFile(_0x10fbdd[_0x4e5897(0x127)](_0x4e5897(0x121))),...optionalTrimmed(_0x10fbdd[_0x4e5897(0x127)](_0x4e5897(0x132)))?{'sourceSessionId':optionalTrimmed(_0x10fbdd[_0x4e5897(0x127)]('source-session-id'))}:{}};}function buildUpdateInput(_0x3a66c2){const _0x3f57be=a27_0xe72f04,_0x580ea3={};optionalTrimmed(_0x3a66c2['str']('name'))&&(_0x580ea3[_0x3f57be(0x12a)]=normalizeFunctionName(_0x3a66c2[_0x3f57be(0x127)](_0x3f57be(0x129))));_0x3a66c2[_0x3f57be(0x14f)]('description')!==undefined&&(_0x580ea3[_0x3f57be(0x153)]=_0x3a66c2[_0x3f57be(0x127)](_0x3f57be(0x153)));optionalTrimmed(_0x3a66c2['str']('file'))&&(_0x580ea3['scriptContent']=readScriptFile(_0x3a66c2['str']('file')));_0x3a66c2[_0x3f57be(0x14f)](_0x3f57be(0x132))!==undefined&&(_0x580ea3['sourceSessionId']=_0x3a66c2[_0x3f57be(0x127)]('source-session-id'));if(Object['keys'](_0x580ea3)['length']===0x0)throw CliErrors['validation'](_0x3f57be(0x15a));return _0x580ea3;}function parseExecParams(_0x48261a){const _0x21ca62=a27_0xe72f04,_0x5c723f=parseJsonParams(_0x48261a)??{};if(Array['isArray'](_0x5c723f))throw CliErrors[_0x21ca62(0x12f)](_0x21ca62(0x134));return _0x5c723f;}const personalBffList={'service':a27_0xe72f04(0x160),'command':a27_0xe72f04(0x12d),'description':a27_0xe72f04(0x14e),'risk':a27_0xe72f04(0x13e),'flags':[VERBOSE_FLAG],async 'execute'(_0x38497f){const _0x39634a=a27_0xe72f04,_0x429629=await listPersonalBffs(_0x38497f[_0x39634a(0x125)]);return{'ok':!![],'data':{'total':_0x429629[_0x39634a(0x142)],'items':_0x38497f[_0x39634a(0x144)](_0x39634a(0x126))?_0x429629:_0x429629[_0x39634a(0x14d)](summarizeBff)}};}},personalBffDetail={'service':a27_0xe72f04(0x160),'command':a27_0xe72f04(0x15e),'description':a27_0xe72f04(0x14c),'risk':a27_0xe72f04(0x13e),'flags':[{...ID_FLAG,'description':a27_0xe72f04(0x147)}],async 'execute'(_0x21dcb5){const _0x3c5755=a27_0xe72f04,_0x5abd04=await getPersonalBff(_0x21dcb5[_0x3c5755(0x158)]('id'),_0x21dcb5[_0x3c5755(0x125)]);return{'ok':!![],'data':detailBff(_0x5abd04)};}},personalBffCreate={'service':'personal-bff','command':a27_0xe72f04(0x150),'description':a27_0xe72f04(0x14b),'risk':a27_0xe72f04(0x154),'flags':[FUNCTION_NAME_FLAG,{...FILE_FLAG,'required':!![]},DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x3c266e){const _0x4fadb1=a27_0xe72f04,_0x490bbf=buildCreateInput(_0x3c266e),_0x4d7e39=await createPersonalBff(_0x3c266e[_0x4fadb1(0x125)],_0x490bbf);return{'ok':!![],'data':detailBff(_0x4d7e39),'message':_0x4fadb1(0x12b)+_0x4d7e39['id']+(_0x4d7e39[_0x4fadb1(0x12a)]?'\x20('+_0x4d7e39['functionName']+')':'')};},async 'dryRun'(_0x1aa33e){const _0x127d81=a27_0xe72f04,_0x32e7e5=buildCreateInput(_0x1aa33e);return dryRun(_0x127d81(0x128),_0x127d81(0x11d))[_0x127d81(0x141)]({'appCode':_0x1aa33e['appCode'],..._0x32e7e5})[_0x127d81(0x153)](_0x127d81(0x13a)+_0x32e7e5[_0x127d81(0x12a)])[_0x127d81(0x156)]();}},personalBffUpdate={'service':a27_0xe72f04(0x160),'command':a27_0xe72f04(0x131),'description':a27_0xe72f04(0x135),'risk':'write','flags':[{...ID_FLAG,'description':'Personal\x20BFF\x20script\x20ID'},{...FUNCTION_NAME_FLAG,'required':![]},FILE_FLAG,DESCRIPTION_FLAG,SOURCE_SESSION_FLAG],async 'execute'(_0x3b303d){const _0x434dfb=a27_0xe72f04,_0x40e5f5=_0x3b303d['num']('id'),_0x31f952=buildUpdateInput(_0x3b303d),_0x3b565f=await updatePersonalBff(_0x40e5f5,_0x3b303d['appCode'],_0x31f952);return{'ok':!![],'data':detailBff(_0x3b565f),'message':_0x434dfb(0x15d)+_0x3b565f['id']+(_0x3b565f[_0x434dfb(0x12a)]?'\x20('+_0x3b565f[_0x434dfb(0x12a)]+')':'')};},async 'dryRun'(_0x531630){const _0x3ffa13=a27_0xe72f04,_0x36214e=_0x531630[_0x3ffa13(0x158)]('id'),_0x4a77e5=buildUpdateInput(_0x531630);return dryRun(_0x3ffa13(0x128),_0x3ffa13(0x12c)+_0x36214e+'/update')[_0x3ffa13(0x141)]({'appCode':_0x531630[_0x3ffa13(0x125)],..._0x4a77e5})[_0x3ffa13(0x153)]('Preview:\x20update\x20personal\x20BFF\x20'+_0x36214e)['build']();}},personalBffExec={'service':'personal-bff','command':a27_0xe72f04(0x14a),'description':a27_0xe72f04(0x139),'risk':a27_0xe72f04(0x137),'flags':[{...ID_FLAG,'description':'Personal\x20BFF\x20script\x20ID'},{...PARAMS_FLAG,'description':a27_0xe72f04(0x146)}],async 'validate'(_0x5461dd){const _0x9ed005=a27_0xe72f04;parseExecParams(_0x5461dd[_0x9ed005(0x127)](_0x9ed005(0x13d)));},async 'execute'(_0x363ac5){const _0x13b2e6=a27_0xe72f04,_0x9cf72e=_0x363ac5[_0x13b2e6(0x158)]('id'),_0x247e62=parseExecParams(_0x363ac5[_0x13b2e6(0x127)](_0x13b2e6(0x13d))),_0x14985b=await executePersonalBff(_0x9cf72e,_0x363ac5[_0x13b2e6(0x125)],_0x247e62);return{'ok':!![],'data':{'result':_0x14985b},'message':'Executed\x20personal\x20BFF\x20'+_0x9cf72e};}};export const personalBffDefinitions=[personalBffList,personalBffDetail,personalBffCreate,personalBffUpdate,personalBffExec];
@@ -1 +1 @@
1
- const a24_0x46ef40=a24_0x53b5;(function(_0x583f9d,_0x444cbb){const _0x29a360=a24_0x53b5,_0x583879=_0x583f9d();while(!![]){try{const _0x19aca9=-parseInt(_0x29a360(0xc8))/0x1*(-parseInt(_0x29a360(0xc5))/0x2)+parseInt(_0x29a360(0xa5))/0x3*(parseInt(_0x29a360(0xa4))/0x4)+parseInt(_0x29a360(0xa7))/0x5*(parseInt(_0x29a360(0xab))/0x6)+parseInt(_0x29a360(0xc7))/0x7*(parseInt(_0x29a360(0xba))/0x8)+parseInt(_0x29a360(0xbb))/0x9+-parseInt(_0x29a360(0xc1))/0xa+parseInt(_0x29a360(0xb5))/0xb*(-parseInt(_0x29a360(0xbc))/0xc);if(_0x19aca9===_0x444cbb)break;else _0x583879['push'](_0x583879['shift']());}catch(_0x12c1d3){_0x583879['push'](_0x583879['shift']());}}}(a24_0x1731,0x196ba));import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';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';function a24_0x1731(){const _0x50565c=['1MAdtKe','values','142224PCVesI','12MDQtYH','write','50jMvOuN','push','risk','SQL\x20Queries','24762KJlGaQ','Instant\x20API','set','command','Diagnostics','service','show','defaultCommand','\x20\x20[high-risk-write]','get','11GUASqt','read','App\x20Management','Datasets','login','16ByuXno','35091WEkxmw','3552312vtaLyG','Knowledge\x20Base','Configuration','from','isSingleCommand','141470qACtYy','Skills','has','run','174808WyIEIZ','list','488243armDqN'];a24_0x1731=function(){return _0x50565c;};return a24_0x1731();}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=[];function a24_0x53b5(_0x110b71,_0x441be6){_0x110b71=_0x110b71-0xa3;const _0x173123=a24_0x1731();let _0x53b5b0=_0x173123[_0x110b71];return _0x53b5b0;}const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x2dd06e){const _0x3b4448=a24_0x53b5;for(const _0x5a6c46 of _0x2dd06e){definitions[_0x3b4448(0xad)](_0x5a6c46[_0x3b4448(0xb0)]+':'+_0x5a6c46[_0x3b4448(0xae)],_0x5a6c46);let _0x19d9ce=serviceGroups[_0x3b4448(0xb4)](_0x5a6c46['service']);!_0x19d9ce&&(_0x19d9ce=[],serviceGroups[_0x3b4448(0xad)](_0x5a6c46[_0x3b4448(0xb0)],_0x19d9ce)),_0x19d9ce['push'](_0x5a6c46);}}function registerService(_0x3b95b2,_0x305152,_0x485bec){const _0x2260ac=a24_0x53b5;registerDefinitions(_0x305152);const _0x51d9fc=_0x238a85=>_0x238a85===_0x2260ac(0xb6)?'':_0x238a85===_0x2260ac(0xa6)?'\x20\x20[write]':_0x2260ac(0xb3),_0x31d4f0={'service':_0x305152[0x0][_0x2260ac(0xb0)],'label':_0x3b95b2,'commands':_0x305152['map'](_0x24a208=>({'command':_0x24a208['command'],'description':_0x24a208['description'],'tag':_0x51d9fc(_0x24a208[_0x2260ac(0xa9)])})),'defaultCommand':_0x485bec?.[_0x2260ac(0xb2)]??(_0x485bec?.[_0x2260ac(0xc0)]?_0x305152[0x0][_0x2260ac(0xae)]:undefined),'isSingleCommand':_0x485bec?.[_0x2260ac(0xc0)]};serviceRegistry[_0x2260ac(0xa8)](_0x31d4f0),serviceByName[_0x2260ac(0xad)](_0x31d4f0[_0x2260ac(0xb0)],_0x31d4f0);}registerService('Authentication',authDefinitions,{'defaultCommand':a24_0x46ef40(0xb9)}),registerService(a24_0x46ef40(0xb8),datasetDefinitions),registerService(a24_0x46ef40(0xac),dataDefinitions),registerService(a24_0x46ef40(0xaa),sqlDefinitions),registerService('BFF\x20Scripts',bffDefinitions),registerService(a24_0x46ef40(0xbd),kbDefinitions),registerService(a24_0x46ef40(0xb7),appDefinitions,{'defaultCommand':a24_0x46ef40(0xc6)}),registerService(a24_0x46ef40(0xbe),configDefinitions,{'defaultCommand':a24_0x46ef40(0xc6)}),registerService(a24_0x46ef40(0xc2),skillDefinitions,{'defaultCommand':'install'}),registerService('Self\x20Update',[updateDefinition],{'defaultCommand':a24_0x46ef40(0xc4),'isSingleCommand':!![]}),registerService(a24_0x46ef40(0xaf),[doctorDefinition],{'isSingleCommand':!![]}),registerService('Schema',[schemaDefinition],{'isSingleCommand':!![]}),registerService('Logs',logsDefinitions,{'defaultCommand':a24_0x46ef40(0xb1)});export function findDefinition(_0x15681b,_0x5b140d){const _0x1809fc=a24_0x46ef40;return definitions[_0x1809fc(0xb4)](_0x15681b+':'+_0x5b140d);}export function isKnownService(_0x399dc0){const _0x56b458=a24_0x46ef40;return serviceByName[_0x56b458(0xc3)](_0x399dc0);}export function getServiceEntry(_0x62d7ca){const _0x26e402=a24_0x46ef40;return serviceByName[_0x26e402(0xb4)](_0x62d7ca);}export function getAllDefinitions(){const _0x52296a=a24_0x46ef40;return Array[_0x52296a(0xbf)](definitions[_0x52296a(0xa3)]());}
1
+ const a28_0xc943f9=a28_0x5966;(function(_0x303e29,_0x13c154){const _0x40339c=a28_0x5966,_0x7ab6d1=_0x303e29();while(!![]){try{const _0x44b0be=parseInt(_0x40339c(0x160))/0x1+parseInt(_0x40339c(0x15e))/0x2+-parseInt(_0x40339c(0x169))/0x3*(-parseInt(_0x40339c(0x15c))/0x4)+-parseInt(_0x40339c(0x150))/0x5*(-parseInt(_0x40339c(0x149))/0x6)+parseInt(_0x40339c(0x168))/0x7+parseInt(_0x40339c(0x157))/0x8+-parseInt(_0x40339c(0x161))/0x9*(parseInt(_0x40339c(0x164))/0xa);if(_0x44b0be===_0x13c154)break;else _0x7ab6d1['push'](_0x7ab6d1['shift']());}catch(_0x55d28e){_0x7ab6d1['push'](_0x7ab6d1['shift']());}}}(a28_0xe44a,0x92b4d));import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';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';function a28_0x5966(_0x5ce691,_0x5b354c){_0x5ce691=_0x5ce691-0x145;const _0xe44af2=a28_0xe44a();let _0x5966ca=_0xe44af2[_0x5ce691];return _0x5966ca;}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';import{artifactDefinitions}from'../commands/artifact/index.js';import{personalBffDefinitions}from'../commands/personal-bff/index.js';import{apiDocDefinitions}from'../commands/api-doc/index.js';export const serviceRegistry=[];function a28_0xe44a(){const _0xdeccf2=['push','values','install','command','Logs','map','5BFmxlw','service','\x20\x20[write]','Personal\x20BFF','Diagnostics','Self\x20Update','Skills','1269568CrpAGS','run','list','App\x20Management','Artifacts','4iQYZeU','description','1450510oEQkAg','get','887526PRgpIT','139653PEKjVf','BFF\x20Scripts','API\x20Documentation','2540ZVZHjF','defaultCommand','write','has','8212253bguKhG','3591168FdFwik','isSingleCommand','Authentication','risk','set','Knowledge\x20Base','read','SQL\x20Queries','2403090OPmhwg'];a28_0xe44a=function(){return _0xdeccf2;};return a28_0xe44a();}const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x51cfb6){const _0x1e7af1=a28_0x5966;for(const _0x3f19cf of _0x51cfb6){definitions[_0x1e7af1(0x145)](_0x3f19cf[_0x1e7af1(0x151)]+':'+_0x3f19cf[_0x1e7af1(0x14d)],_0x3f19cf);let _0x21b6aa=serviceGroups[_0x1e7af1(0x15f)](_0x3f19cf[_0x1e7af1(0x151)]);!_0x21b6aa&&(_0x21b6aa=[],serviceGroups['set'](_0x3f19cf[_0x1e7af1(0x151)],_0x21b6aa)),_0x21b6aa['push'](_0x3f19cf);}}function registerService(_0x463084,_0x3021aa,_0xf75dd4){const _0x5ee67d=a28_0x5966;registerDefinitions(_0x3021aa);const _0x4d0efb=_0x5cdcc1=>_0x5cdcc1===_0x5ee67d(0x147)?'':_0x5cdcc1===_0x5ee67d(0x166)?_0x5ee67d(0x152):'\x20\x20[high-risk-write]',_0x5ba1ed={'service':_0x3021aa[0x0][_0x5ee67d(0x151)],'label':_0x463084,'commands':_0x3021aa[_0x5ee67d(0x14f)](_0x3acc97=>({'command':_0x3acc97[_0x5ee67d(0x14d)],'description':_0x3acc97[_0x5ee67d(0x15d)],'tag':_0x4d0efb(_0x3acc97[_0x5ee67d(0x16c)])})),'defaultCommand':_0xf75dd4?.[_0x5ee67d(0x165)]??(_0xf75dd4?.[_0x5ee67d(0x16a)]?_0x3021aa[0x0][_0x5ee67d(0x14d)]:undefined),'isSingleCommand':_0xf75dd4?.[_0x5ee67d(0x16a)]};serviceRegistry[_0x5ee67d(0x14a)](_0x5ba1ed),serviceByName[_0x5ee67d(0x145)](_0x5ba1ed['service'],_0x5ba1ed);}registerService(a28_0xc943f9(0x16b),authDefinitions,{'defaultCommand':'login'}),registerService(a28_0xc943f9(0x163),apiDocDefinitions),registerService('Datasets',datasetDefinitions),registerService('Instant\x20API',dataDefinitions),registerService(a28_0xc943f9(0x148),sqlDefinitions),registerService(a28_0xc943f9(0x162),bffDefinitions),registerService(a28_0xc943f9(0x153),personalBffDefinitions),registerService(a28_0xc943f9(0x15b),artifactDefinitions),registerService(a28_0xc943f9(0x146),kbDefinitions),registerService(a28_0xc943f9(0x15a),appDefinitions,{'defaultCommand':a28_0xc943f9(0x159)}),registerService('Configuration',configDefinitions,{'defaultCommand':a28_0xc943f9(0x159)}),registerService(a28_0xc943f9(0x156),skillDefinitions,{'defaultCommand':a28_0xc943f9(0x14c)}),registerService(a28_0xc943f9(0x155),[updateDefinition],{'defaultCommand':a28_0xc943f9(0x158),'isSingleCommand':!![]}),registerService(a28_0xc943f9(0x154),[doctorDefinition],{'isSingleCommand':!![]}),registerService('Schema',[schemaDefinition],{'isSingleCommand':!![]}),registerService(a28_0xc943f9(0x14e),logsDefinitions,{'defaultCommand':'show'});export function findDefinition(_0x50a56c,_0x23a034){const _0x46ab54=a28_0xc943f9;return definitions[_0x46ab54(0x15f)](_0x50a56c+':'+_0x23a034);}export function isKnownService(_0xd40763){const _0x251c59=a28_0xc943f9;return serviceByName[_0x251c59(0x167)](_0xd40763);}export function getServiceEntry(_0x26eccd){const _0x4b7cda=a28_0xc943f9;return serviceByName[_0x4b7cda(0x15f)](_0x26eccd);}export function getAllDefinitions(){const _0x536366=a28_0xc943f9;return Array['from'](definitions[_0x536366(0x14b)]());}
@@ -1 +1 @@
1
- function a25_0x2855(){const _0x4ca024=['175460tIzQZf','10PUrjLO','50stoNgH','142ugFySg','2806119FipaGd','791WNAZbC','12bxYplr','1211552nMdkNe','9886525ikSmHf','6336hGbjGm','Export\x20machine-readable\x20command\x20schema\x20(JSON)','schema','17061FJAInV','2179PCQwdG','read'];a25_0x2855=function(){return _0x4ca024;};return a25_0x2855();}const a25_0x43f63c=a25_0x1bae;(function(_0x47ecec,_0x4f1568){const _0x20f5f7=a25_0x1bae,_0x3df071=_0x47ecec();while(!![]){try{const _0x5dad36=parseInt(_0x20f5f7(0x16c))/0x1*(-parseInt(_0x20f5f7(0x171))/0x2)+-parseInt(_0x20f5f7(0x16b))/0x3+-parseInt(_0x20f5f7(0x16e))/0x4*(parseInt(_0x20f5f7(0x170))/0x5)+parseInt(_0x20f5f7(0x168))/0x6*(parseInt(_0x20f5f7(0x173))/0x7)+parseInt(_0x20f5f7(0x166))/0x8+parseInt(_0x20f5f7(0x172))/0x9*(-parseInt(_0x20f5f7(0x16f))/0xa)+-parseInt(_0x20f5f7(0x167))/0xb*(-parseInt(_0x20f5f7(0x174))/0xc);if(_0x5dad36===_0x4f1568)break;else _0x3df071['push'](_0x3df071['shift']());}catch(_0x223cfb){_0x3df071['push'](_0x3df071['shift']());}}}(a25_0x2855,0x3f296));import{buildSchemaPayload}from'../framework/schema-export.js';function a25_0x1bae(_0x49f400,_0x30dd80){_0x49f400=_0x49f400-0x166;const _0x2855c7=a25_0x2855();let _0x1baef3=_0x2855c7[_0x49f400];return _0x1baef3;}async function execute(_0x4df692){const _0x1cac01=await buildSchemaPayload();return{'ok':!![],'data':_0x1cac01};}export const schemaDefinition={'service':a25_0x43f63c(0x16a),'command':'export','description':a25_0x43f63c(0x169),'risk':a25_0x43f63c(0x16d),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],'execute':execute};
1
+ function a29_0x2337(_0x706199,_0x2266e9){_0x706199=_0x706199-0x160;const _0xc79cab=a29_0xc79c();let _0x2337c6=_0xc79cab[_0x706199];return _0x2337c6;}const a29_0x1a9516=a29_0x2337;(function(_0x305cda,_0x30388e){const _0x226d79=a29_0x2337,_0x1b0b04=_0x305cda();while(!![]){try{const _0x4cbae7=-parseInt(_0x226d79(0x167))/0x1+parseInt(_0x226d79(0x16b))/0x2+-parseInt(_0x226d79(0x162))/0x3+parseInt(_0x226d79(0x160))/0x4*(-parseInt(_0x226d79(0x164))/0x5)+parseInt(_0x226d79(0x163))/0x6+-parseInt(_0x226d79(0x161))/0x7+-parseInt(_0x226d79(0x165))/0x8*(-parseInt(_0x226d79(0x168))/0x9);if(_0x4cbae7===_0x30388e)break;else _0x1b0b04['push'](_0x1b0b04['shift']());}catch(_0x21c45a){_0x1b0b04['push'](_0x1b0b04['shift']());}}}(a29_0xc79c,0xec1cf));function a29_0xc79c(){const _0xaaac1f=['4538iIXQds','22725rHCVvJ','read','schema','1690130OkPavX','1039364jUlQKg','4604866tZlzUb','2582058Meidxg','8111892GoeKni','5lCcsmC','1752SMDhck','export'];a29_0xc79c=function(){return _0xaaac1f;};return a29_0xc79c();}import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x851595){const _0x1ae359=await buildSchemaPayload();return{'ok':!![],'data':_0x1ae359};}export const schemaDefinition={'service':a29_0x1a9516(0x16a),'command':a29_0x1a9516(0x166),'description':'Export\x20machine-readable\x20command\x20schema\x20(JSON)','risk':a29_0x1a9516(0x169),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],'execute':execute};