@lovrabet/lovrabet-cli 2.0.13-beta.3 → 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 +1 -1
@@ -1 +1 @@
1
- (function(_0x5ee47e,_0x31d663){var _0x3c2ea7=a15_0x14c9,_0x4f1aea=_0x5ee47e();while(!![]){try{var _0x4db805=-parseInt(_0x3c2ea7(0x1fb))/0x1*(-parseInt(_0x3c2ea7(0x1ff))/0x2)+parseInt(_0x3c2ea7(0x1fe))/0x3*(-parseInt(_0x3c2ea7(0x1fa))/0x4)+parseInt(_0x3c2ea7(0x1f3))/0x5+parseInt(_0x3c2ea7(0x1fc))/0x6*(-parseInt(_0x3c2ea7(0x1f7))/0x7)+parseInt(_0x3c2ea7(0x1f6))/0x8*(parseInt(_0x3c2ea7(0x1f9))/0x9)+parseInt(_0x3c2ea7(0x1fd))/0xa*(-parseInt(_0x3c2ea7(0x1f8))/0xb)+parseInt(_0x3c2ea7(0x1f4))/0xc*(-parseInt(_0x3c2ea7(0x1f5))/0xd);if(_0x4db805===_0x31d663)break;else _0x4f1aea['push'](_0x4f1aea['shift']());}catch(_0x42f7ea){_0x4f1aea['push'](_0x4f1aea['shift']());}}}(a15_0x5101,0xbe005));import{CLI_BIN_NAME}from'../../constant/cli.js';function a15_0x5101(){var _0x2abff1=['150140eqGDMC','3JfENKg','179338DujkRY','6954440BXZOoF','266388xEyLeu','637GzUDHe','104goEVzI','1267wROtZF','209RjYxQM','820971pSAhJF','3971432FpUxOK','14SbjqUb','22806aIIIBW'];a15_0x5101=function(){return _0x2abff1;};return a15_0x5101();}function a15_0x14c9(_0x3a9b65,_0x4bf31d){_0x3a9b65=_0x3a9b65-0x1f3;var _0x510199=a15_0x5101();var _0x14c9fc=_0x510199[_0x3a9b65];return _0x14c9fc;}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
+ 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_0x3c02bb=a16_0x580b;(function(_0x498cd6,_0x4045f2){const _0xc9bd5=a16_0x580b,_0x1ad374=_0x498cd6();while(!![]){try{const _0x1e553f=parseInt(_0xc9bd5(0x189))/0x1*(parseInt(_0xc9bd5(0x18c))/0x2)+-parseInt(_0xc9bd5(0x183))/0x3*(parseInt(_0xc9bd5(0x179))/0x4)+-parseInt(_0xc9bd5(0x187))/0x5*(parseInt(_0xc9bd5(0x159))/0x6)+parseInt(_0xc9bd5(0x17a))/0x7*(-parseInt(_0xc9bd5(0x184))/0x8)+parseInt(_0xc9bd5(0x186))/0x9+-parseInt(_0xc9bd5(0x169))/0xa*(-parseInt(_0xc9bd5(0x17b))/0xb)+-parseInt(_0xc9bd5(0x168))/0xc*(parseInt(_0xc9bd5(0x191))/0xd);if(_0x1e553f===_0x4045f2)break;else _0x1ad374['push'](_0x1ad374['shift']());}catch(_0x2047a5){_0x1ad374['push'](_0x1ad374['shift']());}}}(a16_0xd01f,0xbda46));import{executeData}from'../../core/sdk-client.js';import{CODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';function a16_0x580b(_0x462156,_0x38a220){_0x462156=_0x462156-0x158;const _0xd01fd9=a16_0xd01f();let _0x580bdf=_0xd01fd9[_0x462156];return _0x580bdf;}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_0x3c02bb(0x181),'operation':a16_0x3c02bb(0x181),'risk':a16_0x3c02bb(0x17f),'paramsRequired':![],'description':a16_0x3c02bb(0x172),'paramsHint':a16_0x3c02bb(0x185)+a16_0x3c02bb(0x16d),'helpExtra':[a16_0x3c02bb(0x180),a16_0x3c02bb(0x15c),a16_0x3c02bb(0x15f),'\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}}','\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}}',a16_0x3c02bb(0x1a1),a16_0x3c02bb(0x19d),a16_0x3c02bb(0x158),'\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}}',a16_0x3c02bb(0x1a6),'',a16_0x3c02bb(0x16c),a16_0x3c02bb(0x15a),'\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}}]}','',a16_0x3c02bb(0x1a7),a16_0x3c02bb(0x1a2),a16_0x3c02bb(0x195),a16_0x3c02bb(0x15d),a16_0x3c02bb(0x177),'\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','',a16_0x3c02bb(0x171),a16_0x3c02bb(0x170),a16_0x3c02bb(0x190),a16_0x3c02bb(0x17c)][a16_0x3c02bb(0x193)]('\x0a')},{'command':a16_0x3c02bb(0x192),'operation':a16_0x3c02bb(0x192),'risk':a16_0x3c02bb(0x17f),'paramsRequired':!![],'description':a16_0x3c02bb(0x165),'paramsHint':a16_0x3c02bb(0x18a)},{'command':a16_0x3c02bb(0x17d),'operation':'create','risk':a16_0x3c02bb(0x174),'paramsRequired':!![],'description':a16_0x3c02bb(0x16b),'paramsHint':a16_0x3c02bb(0x18f)},{'command':a16_0x3c02bb(0x19f),'operation':a16_0x3c02bb(0x19f),'risk':a16_0x3c02bb(0x174),'paramsRequired':!![],'description':'Create\x20multiple\x20records\x20in\x20one\x20request\x20(SDK\x20batchCreate)','paramsHint':a16_0x3c02bb(0x188)},{'command':'update','operation':a16_0x3c02bb(0x19e),'risk':a16_0x3c02bb(0x174),'paramsRequired':!![],'description':a16_0x3c02bb(0x19a),'paramsHint':'JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20Example:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27'},{'command':a16_0x3c02bb(0x1a8),'operation':a16_0x3c02bb(0x1a8),'risk':'high-risk-write','paramsRequired':!![],'description':a16_0x3c02bb(0x167),'paramsHint':a16_0x3c02bb(0x18a)},{'command':a16_0x3c02bb(0x163),'operation':'aggregate','risk':a16_0x3c02bb(0x17f),'paramsRequired':![],'description':'Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','paramsHint':a16_0x3c02bb(0x161)+a16_0x3c02bb(0x16a),'helpExtra':[a16_0x3c02bb(0x199),a16_0x3c02bb(0x182),a16_0x3c02bb(0x16e),'\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_0x3c02bb(0x160),a16_0x3c02bb(0x178),a16_0x3c02bb(0x18b),'\x20\x20\x20\x20MIN\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Minimum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22price\x22,\x22type\x22:\x22MIN\x22,\x22alias\x22:\x22min_price\x22}','',a16_0x3c02bb(0x194),a16_0x3c02bb(0x1a5),'\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','\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\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\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}}',a16_0x3c02bb(0x1a9),'',a16_0x3c02bb(0x18d),'\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_0x3c02bb(0x162),a16_0x3c02bb(0x164)]['join']('\x0a')}];function makeDataCommand(_0xe7f28b){const _0x145de5=a16_0x3c02bb,_0x6ce54f=_0x145de5(0x19c)+_0xe7f28b['command'],_0x24cf8e={'service':'data','command':_0xe7f28b[_0x145de5(0x176)],'description':_0xe7f28b['description'],'risk':_0xe7f28b[_0x145de5(0x16f)],'helpExtra':_0xe7f28b['helpExtra'],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0xe7f28b[_0x145de5(0x198)]}],'validate':async _0x51df29=>{const _0x507c7c=_0x145de5;_0xe7f28b[_0x507c7c(0x15b)]&&requireAnyOf(_0x51df29,[_0x507c7c(0x1a4)],_0x6ce54f),_0xe7f28b[_0x507c7c(0x175)]===_0x507c7c(0x19f)&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x51df29['str'](_0x507c7c(0x1a4))));},async 'execute'(_0x4a92b1){const _0x2a854a=_0x145de5,_0x5bb473=_0x4a92b1[_0x2a854a(0x15e)](_0x2a854a(0x196)),_0x408c9f=_0xe7f28b['operation']===_0x2a854a(0x19f)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x4a92b1[_0x2a854a(0x15e)]('params'))):parseJsonParams(_0x4a92b1['str']('params'))??{},_0x1ff47d=Date[_0x2a854a(0x1a3)](),_0x218834=await executeData(_0x5bb473,_0xe7f28b['operation'],_0x408c9f),_0x5e3580=Date[_0x2a854a(0x1a3)]()-_0x1ff47d;return{'ok':!![],'data':{'result':_0x218834,'elapsed':_0x5e3580},'message':_0x2a854a(0x19c)+_0xe7f28b[_0x2a854a(0x176)]+'\x20completed\x20in\x20'+_0x5e3580+'ms'};}};return _0xe7f28b[_0x145de5(0x16f)]!=='read'&&(_0x24cf8e[_0x145de5(0x197)]=async _0x2d3fbe=>{const _0x379767=_0x145de5,_0x526be3=_0x2d3fbe[_0x379767(0x15e)]('code'),_0x574e74=_0xe7f28b['operation']===_0x379767(0x19f)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x2d3fbe[_0x379767(0x15e)](_0x379767(0x1a4)))):parseJsonParams(_0x2d3fbe[_0x379767(0x15e)](_0x379767(0x1a4)))??{};return dryRun('POST','/api/{appCode}/'+_0x526be3+'/'+_0xe7f28b['operation'])[_0x379767(0x166)](_0x574e74)[_0x379767(0x1a0)](_0x379767(0x17e)+_0xe7f28b['command']+_0x379767(0x18e)+_0x526be3)[_0x379767(0x173)]();}),_0x24cf8e;}export const dataDefinitions=specs[a16_0x3c02bb(0x19b)](makeDataCommand);function a16_0xd01f(){const _0x8e54d0=['\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','\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}','4JDJDVb','21KWfnbh','646151oQQIHn','\x20\x20\x20\x20Wrong:\x20\x20\x20\x20--page-size\x2010\x20\x20(this\x20is\x20not\x20a\x20valid\x20flag)','create','Preview:\x20data\x20','read','\x20\x20WHERE\x20OPERATORS','filter','\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}','2605695TgYrPr','1083032McQuAD','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20','4246290PwidZz','40nKdHgW','JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','1033GpWWOn','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\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}','1844lyLrBN','\x20\x20EXAMPLES','\x20on\x20dataset\x20','JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','\x20\x20\x20\x20Correct:\x20\x20--params\x20\x27{\x22currentPage\x22:1,\x22pageSize\x22:10}\x27','6868303CrdMwO','getOne','join','\x20\x20PARAMS\x20STRUCTURE','\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]','code','dryRun','paramsHint','\x20\x20AGGREGATE\x20TYPES','Update\x20an\x20existing\x20record','map','data\x20','\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}}','update','batchCreate','description','\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\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)','now','params','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return\x20alongside\x20aggregates,\x20e.g.\x20[\x22status\x22,\x22region\x22]','\x20\x20\x20\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\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','delete','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22total\x22:\x22desc\x22}]','\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]}}','146604sMTiZM','\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}}]}','paramsRequired','\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}}','\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}]','str','\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\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}','JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter','aggregate','\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','Get\x20a\x20single\x20record\x20by\x20ID','body','Delete\x20a\x20record\x20(requires\x20--yes\x20in\x20non-interactive)','12wfcDCg','230DOOHet','Example:\x20\x27{\x22aggregate\x22:[{\x22field\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','Create\x20a\x20new\x20record\x20in\x20a\x20dataset','\x20\x20LOGICAL\x20COMBINATORS','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','\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}','risk','\x20\x20\x20\x20Pagination\x20is\x20controlled\x20via\x20JSON\x20in\x20--params.\x20Do\x20NOT\x20use\x20--page-size\x20as\x20a\x20CLI\x20flag.','\x20\x20PAGINATION','Filter\x20dataset\x20records\x20with\x20query\x20conditions','build','write','operation','command'];a16_0xd01f=function(){return _0x8e54d0;};return a16_0xd01f();}
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_0xe41be4=a17_0x46fb;function a17_0x46fb(_0x21b21a,_0x2091ed){_0x21b21a=_0x21b21a-0x10d;const _0x242c1d=a17_0x242c();let _0x46fb53=_0x242c1d[_0x21b21a];return _0x46fb53;}(function(_0x4ae253,_0x29d6c4){const _0x31cd93=a17_0x46fb,_0x2e0db8=_0x4ae253();while(!![]){try{const _0x312b29=parseInt(_0x31cd93(0x115))/0x1+-parseInt(_0x31cd93(0x142))/0x2+-parseInt(_0x31cd93(0x14c))/0x3+-parseInt(_0x31cd93(0x113))/0x4*(-parseInt(_0x31cd93(0x147))/0x5)+-parseInt(_0x31cd93(0x121))/0x6*(parseInt(_0x31cd93(0x140))/0x7)+parseInt(_0x31cd93(0x137))/0x8*(-parseInt(_0x31cd93(0x118))/0x9)+parseInt(_0x31cd93(0x130))/0xa;if(_0x312b29===_0x29d6c4)break;else _0x2e0db8['push'](_0x2e0db8['shift']());}catch(_0x58fba4){_0x2e0db8['push'](_0x2e0db8['shift']());}}}(a17_0x242c,0xbf44d));import{getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';function normalizeField(_0x27840c){const _0x367125=a17_0x46fb;if(_0x27840c[_0x367125(0x152)])return null;const _0x23d23e=Boolean(_0x27840c[_0x367125(0x13b)]!==undefined||_0x27840c[_0x367125(0x13f)]!==undefined);let _0x4aef59={};if(!_0x23d23e&&typeof _0x27840c[_0x367125(0x14a)]==='string')try{_0x4aef59=JSON[_0x367125(0x13c)](_0x27840c[_0x367125(0x14a)]);}catch{}const _0x210e6f=_0x23d23e?_0x27840c['name']:_0x27840c[_0x367125(0x12a)],_0x57ccd0=_0x23d23e?_0x27840c[_0x367125(0x13b)]:_0x27840c[_0x367125(0x127)],_0x4d5d9d=_0x23d23e?_0x27840c[_0x367125(0x13f)]:_0x27840c[_0x367125(0x14b)]||_0x27840c[_0x367125(0x11f)],_0x26d510=_0x23d23e?_0x27840c[_0x367125(0x126)]===!![]:_0x4aef59[_0x367125(0x126)]===!![],_0xe941a2=_0x23d23e?_0x27840c[_0x367125(0x138)]===!![]:_0x4aef59[_0x367125(0x138)]===!![],_0x2e9bc8=_0x23d23e?_0x27840c['options']??null:_0x4aef59[_0x367125(0x159)]??null,_0x3d3ae0={'name':_0x210e6f,'displayName':_0x57ccd0||_0x210e6f,'type':_0x4d5d9d,'dbType':_0x27840c['dbType'],'pk':_0x26d510,'required':_0xe941a2,'description':_0x27840c[_0x367125(0x156)]||undefined};return Array[_0x367125(0x14f)](_0x2e9bc8)&&_0x2e9bc8[_0x367125(0x112)]>0x0&&(_0x3d3ae0[_0x367125(0x159)]=_0x2e9bc8),_0x3d3ae0;}function parseJsonMaybe(_0x5aac25){const _0x581c09=a17_0x46fb;if(typeof _0x5aac25!==_0x581c09(0x123))return _0x5aac25;try{return JSON[_0x581c09(0x13c)](_0x5aac25);}catch{return _0x5aac25;}}function a17_0x242c(){const _0x2c21ec=['type','2973852ufWNKN','fromField','formatRules','isArray','properties','dbName','deleted','allFieldNames','detail','toField','description','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','updateTimeField','options','modifierNameField','indexes','toDatasetCode','modelCode','entries','length','363948smLEjV','dblinkInfoDTO','1168201YFzUSF','createTimeField','columnCodeListWithDeleted','288KeljgH','path','dbId','afterScriptId','fields','creatorIdField','requestBody','dataType','object','18mZNRvN','requestFields','string','datasetKey','logicField','pkField','name','operations','creatorNameField','code','sourceType','beforeScriptId','responseFields','host','toFieldLabel','20183560wuznGY','toDatasetName','labelField','map','appCode','modifierIdField','str','56936jrpDAO','required','dataset','relations','displayName','parse','validateRules','filter','doType','24654opEUFd','tableName','2892974eDGYGY','allFields','method','dbtableConfig','split','15kmcQoB','trim','responseBody','extend'];a17_0x242c=function(){return _0x2c21ec;};return a17_0x242c();}function normalizeOperationEntry(_0x559d14,_0x709667){const _0x1cf633=a17_0x46fb;if(!_0x709667||typeof _0x709667!==_0x1cf633(0x120))return null;if(!_0x709667[_0x1cf633(0x144)]||!_0x709667[_0x1cf633(0x119)])return null;const _0x34574c={'name':_0x559d14,'method':_0x709667[_0x1cf633(0x144)],'path':_0x709667['path']};if(_0x709667[_0x1cf633(0x12e)])_0x34574c[_0x1cf633(0x12e)]=_0x709667['host'];if(_0x709667[_0x1cf633(0x11e)]!=null)_0x34574c[_0x1cf633(0x11e)]=parseJsonMaybe(_0x709667[_0x1cf633(0x11e)]);if(_0x709667['responseBody']!=null)_0x34574c[_0x1cf633(0x149)]=parseJsonMaybe(_0x709667[_0x1cf633(0x149)]);if(_0x709667['beforeScriptId']!=null)_0x34574c[_0x1cf633(0x12c)]=_0x709667[_0x1cf633(0x12c)];if(_0x709667[_0x1cf633(0x11b)]!=null)_0x34574c[_0x1cf633(0x11b)]=_0x709667[_0x1cf633(0x11b)];if(Array[_0x1cf633(0x14f)](_0x709667[_0x1cf633(0x122)]))_0x34574c[_0x1cf633(0x122)]=_0x709667[_0x1cf633(0x122)];if(Array[_0x1cf633(0x14f)](_0x709667[_0x1cf633(0x12d)]))_0x34574c['responseFields']=_0x709667['responseFields'];return _0x34574c;}function summarizeDbtable(_0x30d81d){const _0x4f5e90=a17_0x46fb,_0x23b7f8={},_0x10d3cd=['dbId',_0x4f5e90(0x151),'tableName','datasetKey',_0x4f5e90(0x126),_0x4f5e90(0x143),_0x4f5e90(0x125),_0x4f5e90(0x116),_0x4f5e90(0x158),_0x4f5e90(0x11d),_0x4f5e90(0x129),_0x4f5e90(0x135),_0x4f5e90(0x10d),_0x4f5e90(0x132),_0x4f5e90(0x114)];for(const _0x2597fd of _0x10d3cd){if(_0x30d81d[_0x2597fd]!==undefined)_0x23b7f8[_0x2597fd]=_0x30d81d[_0x2597fd];}return typeof _0x23b7f8[_0x4f5e90(0x143)]==='string'&&_0x23b7f8[_0x4f5e90(0x143)][_0x4f5e90(0x112)]>0x0&&(_0x23b7f8[_0x4f5e90(0x153)]=_0x23b7f8[_0x4f5e90(0x143)][_0x4f5e90(0x146)](',')[_0x4f5e90(0x133)](_0x12854d=>_0x12854d[_0x4f5e90(0x148)]())[_0x4f5e90(0x13e)](Boolean)),_0x23b7f8;}function normalizeRelatedPages(_0x3a731d){const _0x5c05d5=a17_0x46fb;if(!Array['isArray'](_0x3a731d))return[];return _0x3a731d[_0x5c05d5(0x13e)](_0x5925eb=>_0x5925eb&&typeof _0x5925eb===_0x5c05d5(0x120))[_0x5c05d5(0x133)](_0x3a75ae=>({'id':_0x3a75ae['id'],'type':_0x3a75ae[_0x5c05d5(0x14b)],'code':_0x3a75ae[_0x5c05d5(0x12a)],'title':_0x3a75ae['title'],'deleted':_0x3a75ae['deleted']===!![]}));}function normalizeFallbackFieldName(_0x3065a6,_0x1addf0){const _0x55b8fe=a17_0x46fb,_0x32ebbd=_0x3065a6[_0x55b8fe(0x148)]();if(!_0x32ebbd)return null;return{'name':_0x32ebbd,'displayName':_0x32ebbd,'type':undefined,'dbType':undefined,'pk':_0x32ebbd===_0x1addf0,'required':![],'description':undefined};}async function loadListFieldFallback(_0x4e809f,_0x3bdb40){const _0x5942ea=a17_0x46fb;if(!_0x4e809f||!_0x3bdb40)return[];try{const _0x54a5bb=await listDatasets(_0x4e809f,{'code':_0x3bdb40}),_0xa7451=_0x54a5bb['find'](_0x94bbeb=>_0x94bbeb[_0x5942ea(0x12a)]===_0x3bdb40)??_0x54a5bb[0x0],_0x50894e=_0xa7451?.['dbtableConfig']??{},_0x420373=typeof _0x50894e[_0x5942ea(0x143)]==='string'?_0x50894e[_0x5942ea(0x143)][_0x5942ea(0x146)](','):[];return _0x420373[_0x5942ea(0x133)](_0x3fdb16=>normalizeFallbackFieldName(_0x3fdb16,_0x50894e[_0x5942ea(0x126)]))[_0x5942ea(0x13e)](_0x34087f=>_0x34087f!==null);}catch{return[];}}export const datasetDetail={'service':a17_0xe41be4(0x139),'command':a17_0xe41be4(0x154),'description':a17_0xe41be4(0x157),'risk':'read','flags':[CODE_FLAG],async 'execute'(_0xd4a420){const _0x351b2a=a17_0xe41be4,_0x181758=await getDatasetDetail(_0xd4a420[_0x351b2a(0x136)]('code')),_0x3c2ea4=Array['isArray'](_0x181758['fields'])?_0x181758[_0x351b2a(0x11c)]:Array[_0x351b2a(0x14f)](_0x181758['properties'])?_0x181758[_0x351b2a(0x150)]:[];let _0x2febe8=_0x3c2ea4['map'](_0x502220=>normalizeField(_0x502220))[_0x351b2a(0x13e)](_0x4e52a2=>_0x4e52a2!==null);_0x2febe8[_0x351b2a(0x112)]===0x0&&(_0x2febe8=await loadListFieldFallback(_0xd4a420[_0x351b2a(0x134)],_0xd4a420[_0x351b2a(0x136)](_0x351b2a(0x12a))));const _0xeec909=_0x181758[_0x351b2a(0x128)]??{},_0x63356=[];for(const [_0x1d5014,_0x154daa]of Object[_0x351b2a(0x111)](_0xeec909)){const _0x2225e5=normalizeOperationEntry(_0x1d5014,_0x154daa);if(_0x2225e5)_0x63356['push'](_0x2225e5);}const _0x3b9cc3=_0x181758[_0x351b2a(0x145)]??{},_0x27f901=_0x181758[_0x351b2a(0x139)]??{},_0x262405=_0x3b9cc3[_0x351b2a(0x11a)]!=null?{'id':_0x3b9cc3[_0x351b2a(0x11a)],'name':_0x3b9cc3[_0x351b2a(0x151)]??null}:undefined;let _0x28c2a7;return typeof _0x181758[_0x351b2a(0x14a)]===_0x351b2a(0x123)&&(_0x28c2a7=parseJsonMaybe(_0x181758[_0x351b2a(0x14a)])),{'ok':!![],'data':{'id':_0x181758['modelId']??_0x181758['id'],'name':_0x181758[_0x351b2a(0x127)],'code':_0x181758[_0x351b2a(0x110)]||_0x181758[_0x351b2a(0x12a)],'doVersion':_0x181758['doVersion'],'description':_0x181758[_0x351b2a(0x156)]||_0x27f901['tableComment']||undefined,'source':_0x181758['source']||_0x27f901[_0x351b2a(0x12b)],'table':_0x3b9cc3[_0x351b2a(0x141)]||_0x27f901[_0x351b2a(0x141)],'datasetKey':_0x3b9cc3[_0x351b2a(0x124)],'pk':_0x3b9cc3[_0x351b2a(0x126)],'db':_0x262405,'dbtable':summarizeDbtable(_0x3b9cc3),'fields':_0x2febe8,'operations':_0x63356,'indexes':Array[_0x351b2a(0x14f)](_0x27f901[_0x351b2a(0x10e)])?_0x27f901[_0x351b2a(0x10e)]:[],'relations':Array[_0x351b2a(0x14f)](_0x181758[_0x351b2a(0x13a)])?_0x181758[_0x351b2a(0x13a)][_0x351b2a(0x133)](_0x5b0f12=>({'fromField':_0x5b0f12[_0x351b2a(0x14d)],'toDataset':_0x5b0f12[_0x351b2a(0x131)],'toCode':_0x5b0f12[_0x351b2a(0x10f)],'toTable':_0x5b0f12['toTableName'],'toField':_0x5b0f12[_0x351b2a(0x155)],'labelField':_0x5b0f12[_0x351b2a(0x12f)]||undefined})):[],'relatedPages':normalizeRelatedPages(_0x181758['relatedPageInfoList']),...Array[_0x351b2a(0x14f)](_0x181758[_0x351b2a(0x117)])?{'columnCodeListWithDeleted':_0x181758[_0x351b2a(0x117)]}:{},'formatRules':Array[_0x351b2a(0x14f)](_0x181758[_0x351b2a(0x14e)])?_0x181758[_0x351b2a(0x14e)]:[],'validateRules':Array[_0x351b2a(0x14f)](_0x181758[_0x351b2a(0x13d)])?_0x181758[_0x351b2a(0x13d)]:[],..._0x28c2a7!==undefined?{'extend':_0x28c2a7}:{},'stats':{'fieldCount':_0x2febe8[_0x351b2a(0x112)],'operationCount':_0x63356[_0x351b2a(0x112)]}}};}};
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(_0x4ce8a2,_0x285363){const _0x546bca=a18_0x308a,_0x15325a=_0x4ce8a2();while(!![]){try{const _0x50c6ff=parseInt(_0x546bca(0x193))/0x1*(-parseInt(_0x546bca(0x18f))/0x2)+parseInt(_0x546bca(0x195))/0x3+parseInt(_0x546bca(0x194))/0x4*(-parseInt(_0x546bca(0x191))/0x5)+parseInt(_0x546bca(0x198))/0x6*(parseInt(_0x546bca(0x190))/0x7)+parseInt(_0x546bca(0x192))/0x8*(-parseInt(_0x546bca(0x19a))/0x9)+-parseInt(_0x546bca(0x19b))/0xa*(-parseInt(_0x546bca(0x196))/0xb)+-parseInt(_0x546bca(0x197))/0xc*(-parseInt(_0x546bca(0x199))/0xd);if(_0x50c6ff===_0x285363)break;else _0x15325a['push'](_0x15325a['shift']());}catch(_0x4ceaec){_0x15325a['push'](_0x15325a['shift']());}}}(a18_0x4507,0xb838d));import{datasetList}from'../../commands/dataset/list.js';function a18_0x308a(_0x265c04,_0x41562a){_0x265c04=_0x265c04-0x18f;const _0x450796=a18_0x4507();let _0x308afa=_0x450796[_0x265c04];return _0x308afa;}import{datasetDetail}from'../../commands/dataset/detail.js';export const datasetDefinitions=[datasetList,datasetDetail];function a18_0x4507(){const _0x2feafa=['420nbkSGx','244935FCNUNe','4854048Jrumjb','1jWWakd','76FljkFI','1620762FgVViI','1458831nhrnQT','278268KEllcg','10338tISbei','455IzsWCL','18rExDBQ','110eeIMsn','30484rCnGPP'];a18_0x4507=function(){return _0x2feafa;};return a18_0x4507();}
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
- const a19_0x5eb2d9=a19_0x3359;(function(_0x1ba0af,_0x8f3559){const _0x41d5a9=a19_0x3359,_0x5cbac5=_0x1ba0af();while(!![]){try{const _0x43f708=-parseInt(_0x41d5a9(0x7f))/0x1+-parseInt(_0x41d5a9(0x86))/0x2*(-parseInt(_0x41d5a9(0x6e))/0x3)+-parseInt(_0x41d5a9(0x7c))/0x4+-parseInt(_0x41d5a9(0x7e))/0x5+-parseInt(_0x41d5a9(0x7a))/0x6+parseInt(_0x41d5a9(0x83))/0x7*(parseInt(_0x41d5a9(0x81))/0x8)+parseInt(_0x41d5a9(0x84))/0x9;if(_0x43f708===_0x8f3559)break;else _0x5cbac5['push'](_0x5cbac5['shift']());}catch(_0x511634){_0x5cbac5['push'](_0x5cbac5['shift']());}}}(a19_0x42dd,0xd1248));import{listDatasets}from'../../core/api-client.js';function a19_0x3359(_0x4fb641,_0x5a9a8d){_0x4fb641=_0x4fb641-0x6d;const _0x42dda5=a19_0x42dd();let _0x33598d=_0x42dda5[_0x4fb641];return _0x33598d;}function a19_0x42dd(){const _0x393bf7=['string','5631660xiTzyb','code','134628LNFMFl','list','8497655LaStTb','1339680YSZOFF','str','40aEBgvn','map','1351385gMJUbC','20033694ywWydZ','name','3353770bWgEru','length','3YgLnBU','Filter\x20by\x20dataset\x20name\x20(server-side\x20fuzzy\x20match)','appCode','allFields','source','List\x20datasets\x20in\x20the\x20app\x20(supports\x20server-side\x20name/code\x20filtering)','tableName','read','trim','pkField','dbtableConfig'];a19_0x42dd=function(){return _0x393bf7;};return a19_0x42dd();}import{CODE_FLAG}from'../../commands/common/flags.js';export const datasetList={'service':'dataset','command':a19_0x5eb2d9(0x7d),'description':a19_0x5eb2d9(0x73),'risk':a19_0x5eb2d9(0x75),'flags':[{'name':a19_0x5eb2d9(0x85),'type':a19_0x5eb2d9(0x79),'description':a19_0x5eb2d9(0x6f)},{...CODE_FLAG,'required':![],'description':'Filter\x20by\x20dataset\x20code\x20(server-side\x20exact\x20match)'}],async 'execute'(_0x3f413c){const _0x58ffad=a19_0x5eb2d9,_0xd8d7d7=_0x3f413c[_0x58ffad(0x80)](_0x58ffad(0x85)),_0x37e896=_0x3f413c['str'](_0x58ffad(0x7b)),_0x45cebb=await listDatasets(_0x3f413c[_0x58ffad(0x70)],{..._0xd8d7d7&&{'name':_0xd8d7d7},..._0x37e896&&{'code':_0x37e896}});return{'ok':!![],'data':{'total':_0x45cebb[_0x58ffad(0x6d)],'datasets':_0x45cebb[_0x58ffad(0x82)](_0xcc623e=>{const _0x518019=_0x58ffad,_0xf1a7=_0xcc623e[_0x518019(0x78)]??{};return{'id':_0xcc623e['id'],'code':_0xcc623e[_0x518019(0x7b)],'name':_0xcc623e[_0x518019(0x85)],'source':_0xcc623e[_0x518019(0x72)],'description':_0xcc623e['description'],'table':_0xf1a7[_0x518019(0x74)],'datasetKey':_0xf1a7['datasetKey'],'pk':_0xf1a7[_0x518019(0x77)],'fields':_0xf1a7['allFields']?_0xf1a7[_0x518019(0x71)]['split'](',')[_0x518019(0x82)](_0x58b764=>_0x58b764[_0x518019(0x76)]()):[]};})}};}};
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_0xddeeba=a20_0x495d;(function(_0x49d4fd,_0x4bab6d){const _0x133ced=a20_0x495d,_0x4b57c5=_0x49d4fd();while(!![]){try{const _0x4dbb8d=-parseInt(_0x133ced(0xa4))/0x1*(-parseInt(_0x133ced(0x78))/0x2)+-parseInt(_0x133ced(0x73))/0x3+-parseInt(_0x133ced(0x81))/0x4*(parseInt(_0x133ced(0x70))/0x5)+parseInt(_0x133ced(0xaf))/0x6*(parseInt(_0x133ced(0xa1))/0x7)+parseInt(_0x133ced(0xaa))/0x8+-parseInt(_0x133ced(0x7a))/0x9*(parseInt(_0x133ced(0x91))/0xa)+parseInt(_0x133ced(0xa0))/0xb;if(_0x4dbb8d===_0x4bab6d)break;else _0x4b57c5['push'](_0x4b57c5['shift']());}catch(_0x2d84b4){_0x4b57c5['push'](_0x4b57c5['shift']());}}}(a20_0x4259,0xe1c3d));import a20_0x2b01e7 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{getCliVersion}from'../utils/version.js';function a20_0x495d(_0x3fd9fb,_0x384aa0){_0x3fd9fb=_0x3fd9fb-0x6a;const _0x4259d4=a20_0x4259();let _0x495dad=_0x4259d4[_0x3fd9fb];return _0x495dad;}import{getApiDomain,getRuntimeDomain,getUserDomain}from'../constant/domain.js';import{buildConfigFromFlags,initGlobalEnvironment,getProjectConfigPath,getGlobalConfigPath,inspectCliConfigJsonFile}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{isLegacyCompatConfigKey}from'../config/schema.js';function a20_0x4259(){const _0x50972c=['16211701dzxlSV','21DxnGxv','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','1345SqAtPQ','status','padEnd','\x20\x20Config\x20JSON','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','\x20\x20API\x20Endpoints','1848256vZPyjP','read','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','(no\x20file)','586110iWvUgT','repeat','length','accessKey','\x20\x20Auth','(default)','\x20\x20Merged\x20Config','3641315hGsIdS','\x20doctor','(not\x20set)','4092174xMmosZ','currentApp','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20(legacy/compat\x20only)','env','2690QvNbhl','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','374139wraAzy','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','(missing)','empty','\x20\x20Session\x20check:\x20\x20\x20','gray','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','4KNEzfP','locale','\x20\x20─','Project','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','format','yellow','(default:\x20','log','(set,\x20length=','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','missing','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','message','⚠\x20Empty\x20(treated\x20as\x20{})','190IrbLYE','✓\x20Valid\x20JSON','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','(removed\x20—\x20cookie\x20auth\x20disabled)','(not\x20found)','version','\x20\x20auth\x20(effective):\x20','Global','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','green','(none)','bold','red','pageSize','platform'];a20_0x4259=function(){return _0x50972c;};return a20_0x4259();}async function execute(_0x1e797b){const _0x5f3315=a20_0x495d,_0x5ea4d9=getCliVersion(),_0x443355=buildConfigFromFlags({});await initGlobalEnvironment(_0x443355),console[_0x5f3315(0x89)](),console[_0x5f3315(0x89)](a20_0x2b01e7[_0x5f3315(0x9c)](CLI_BIN_NAME+_0x5f3315(0x71))),console[_0x5f3315(0x89)](a20_0x2b01e7[_0x5f3315(0x7f)]('─'[_0x5f3315(0x6a)](0x32))),console[_0x5f3315(0x89)](_0x5f3315(0x7b)+_0x5ea4d9),console['log']('\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0x5f3315(0x96)]),console[_0x5f3315(0x89)](_0x5f3315(0xa2)+process[_0x5f3315(0x9f)]+'\x20'+process['arch']),console[_0x5f3315(0x89)](),console['log'](a20_0x2b01e7['bold']('\x20\x20Config\x20Files')),console[_0x5f3315(0x89)](a20_0x2b01e7['gray'](_0x5f3315(0x83)[_0x5f3315(0x6a)](0x1e)));const _0x4e5089=getGlobalConfigPath(),_0x41fb87=getProjectConfigPath();console[_0x5f3315(0x89)](_0x5f3315(0x75)+(_0x4e5089||a20_0x2b01e7[_0x5f3315(0x7f)](_0x5f3315(0x95)))),console[_0x5f3315(0x89)](_0x5f3315(0x99)+(_0x41fb87||a20_0x2b01e7[_0x5f3315(0x7f)](_0x5f3315(0x95)))),console[_0x5f3315(0x89)](),console['log'](a20_0x2b01e7['bold'](_0x5f3315(0xa7))),console['log'](a20_0x2b01e7[_0x5f3315(0x7f)](_0x5f3315(0x83)['repeat'](0x1e)));const _0x39b967=(_0x3f7fb0,_0x100161)=>{const _0x5ae444=_0x5f3315;if(!_0x100161){console['log']('\x20\x20'+_0x3f7fb0['padEnd'](0x11)+'\x20'+a20_0x2b01e7[_0x5ae444(0x7f)](_0x5ae444(0xae)));return;}const _0x5925f5=inspectCliConfigJsonFile(_0x100161);if(_0x5925f5[_0x5ae444(0xa5)]==='ok')console[_0x5ae444(0x89)]('\x20\x20'+_0x3f7fb0[_0x5ae444(0xa6)](0x11)+'\x20'+a20_0x2b01e7[_0x5ae444(0x9a)](_0x5ae444(0x92)));else{if(_0x5925f5['status']===_0x5ae444(0x7d))console['log']('\x20\x20'+_0x3f7fb0[_0x5ae444(0xa6)](0x11)+'\x20'+a20_0x2b01e7[_0x5ae444(0x87)](_0x5ae444(0x90)));else _0x5925f5['status']===_0x5ae444(0x8c)?console['log']('\x20\x20'+_0x3f7fb0['padEnd'](0x11)+'\x20'+a20_0x2b01e7['gray'](_0x5ae444(0x7c))):(console[_0x5ae444(0x89)]('\x20\x20'+_0x3f7fb0[_0x5ae444(0xa6)](0x11)+'\x20'+a20_0x2b01e7[_0x5ae444(0x9d)]('✗\x20Invalid\x20JSON')),console[_0x5ae444(0x89)]('\x20\x20'+''[_0x5ae444(0xa6)](0x11)+'\x20'+a20_0x2b01e7[_0x5ae444(0x9d)](_0x5925f5[_0x5ae444(0x8f)])));}};_0x39b967(_0x5f3315(0x98),_0x4e5089),_0x39b967(_0x5f3315(0x84),_0x41fb87),console['log'](),console[_0x5f3315(0x89)](a20_0x2b01e7[_0x5f3315(0x9c)](_0x5f3315(0x6f))),console[_0x5f3315(0x89)](a20_0x2b01e7['gray'](_0x5f3315(0x83)[_0x5f3315(0x6a)](0x1e))),console['log'](_0x5f3315(0xac)+(_0x443355['appCode']||a20_0x2b01e7['red'](_0x5f3315(0x72)))),console[_0x5f3315(0x89)]('\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x443355[_0x5f3315(0x77)]);const _0x342e4d=isLegacyCompatConfigKey(_0x5f3315(0x82))?a20_0x2b01e7[_0x5f3315(0x7f)](_0x443355['locale']+_0x5f3315(0x76)):_0x443355['locale'];return console[_0x5f3315(0x89)](_0x5f3315(0xa3)+_0x342e4d),console['log'](_0x5f3315(0xa8)+(_0x443355['defaultApp']||a20_0x2b01e7[_0x5f3315(0x7f)](_0x5f3315(0x9b)))),console[_0x5f3315(0x89)](_0x5f3315(0x8e)+(_0x443355[_0x5f3315(0x74)]||a20_0x2b01e7['gray'](_0x5f3315(0x9b)))),console[_0x5f3315(0x89)](_0x5f3315(0x80)+(_0x443355['format']||a20_0x2b01e7[_0x5f3315(0x7f)](_0x5f3315(0x88)+DEFAULT_CONFIG_VALUES[_0x5f3315(0x86)]+')'))),console['log'](_0x5f3315(0x85)+(_0x443355[_0x5f3315(0x9e)]??a20_0x2b01e7[_0x5f3315(0x7f)](_0x5f3315(0x6e)))),console[_0x5f3315(0x89)](_0x5f3315(0x79)+_0x443355['riskLevel']),console[_0x5f3315(0x89)](_0x5f3315(0x8d)+_0x443355['verbose']),console[_0x5f3315(0x89)](_0x5f3315(0x97)+AUTH_MODE['ClientAk']),console[_0x5f3315(0x89)](_0x5f3315(0x93)+(_0x443355[_0x5f3315(0x6c)]?a20_0x2b01e7[_0x5f3315(0x9a)](_0x5f3315(0x8a)+_0x443355[_0x5f3315(0x6c)][_0x5f3315(0x6b)]+')'):a20_0x2b01e7['gray']('(none)'))),console[_0x5f3315(0x89)](),console[_0x5f3315(0x89)](a20_0x2b01e7[_0x5f3315(0x9c)](_0x5f3315(0xa9))),console[_0x5f3315(0x89)](a20_0x2b01e7[_0x5f3315(0x7f)](_0x5f3315(0x83)[_0x5f3315(0x6a)](0x1e))),console['log']('\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20'+getApiDomain()),console[_0x5f3315(0x89)](_0x5f3315(0xad)+getUserDomain()),console['log']('\x20\x20runtimeDomain:\x20\x20\x20'+getRuntimeDomain()),console[_0x5f3315(0x89)](),console['log'](a20_0x2b01e7[_0x5f3315(0x9c)](_0x5f3315(0x6d))),console[_0x5f3315(0x89)](a20_0x2b01e7['gray'](_0x5f3315(0x83)[_0x5f3315(0x6a)](0x1e))),console[_0x5f3315(0x89)](_0x5f3315(0x8b)+a20_0x2b01e7[_0x5f3315(0x9a)](AUTH_MODE['ClientAk']+'\x20(accessKey)')),console[_0x5f3315(0x89)](_0x5f3315(0x7e)+a20_0x2b01e7[_0x5f3315(0x7f)](_0x5f3315(0x94))),console[_0x5f3315(0x89)](),{'ok':!![]};}export const doctorDefinition={'service':'doctor','command':'check','description':'Diagnose\x20CLI\x20configuration\x20and\x20environment','risk':a20_0xddeeba(0xab),'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_0x4d18df=a21_0x5578;(function(_0x5ece6d,_0x422246){const _0x3fdbb2=a21_0x5578,_0x7fa5ac=_0x5ece6d();while(!![]){try{const _0x13d625=-parseInt(_0x3fdbb2(0x18c))/0x1*(parseInt(_0x3fdbb2(0x1ad))/0x2)+-parseInt(_0x3fdbb2(0x19f))/0x3+parseInt(_0x3fdbb2(0x18b))/0x4+-parseInt(_0x3fdbb2(0x1a8))/0x5+parseInt(_0x3fdbb2(0x19d))/0x6*(parseInt(_0x3fdbb2(0x1c5))/0x7)+-parseInt(_0x3fdbb2(0x1a4))/0x8+-parseInt(_0x3fdbb2(0x1a6))/0x9*(-parseInt(_0x3fdbb2(0x196))/0xa);if(_0x13d625===_0x422246)break;else _0x7fa5ac['push'](_0x7fa5ac['shift']());}catch(_0x58f933){_0x7fa5ac['push'](_0x7fa5ac['shift']());}}}(a21_0x13d5,0xe8087));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':a21_0x4d18df(0x1bb),'type':a21_0x4d18df(0x1b2),'description':a21_0x4d18df(0x1be)},{'name':'env','type':a21_0x4d18df(0x1b2),'description':'Target\x20environment\x20(default\x20'+DEFAULT_CONFIG_VALUES[a21_0x4d18df(0x1a1)]+')','enum':[...RUNTIME_ENV_VALUES]},{'name':a21_0x4d18df(0x1b3),'type':a21_0x4d18df(0x1a3),'description':a21_0x4d18df(0x1ba)+PRODUCT_CONFIG['newConfigFileName']+a21_0x4d18df(0x1c3),'default':![]},{'name':a21_0x4d18df(0x1c6),'type':'boolean','description':a21_0x4d18df(0x1b6),'default':![]}];export const initImportFlagDefs=[{'name':a21_0x4d18df(0x197),'type':a21_0x4d18df(0x1b2),'description':a21_0x4d18df(0x1a0),'required':!![]},{'name':a21_0x4d18df(0x1bb),'type':a21_0x4d18df(0x1b2),'description':a21_0x4d18df(0x1c7)},{'name':a21_0x4d18df(0x1a1),'type':a21_0x4d18df(0x1b2),'description':a21_0x4d18df(0x1b5),'enum':[...RUNTIME_ENV_VALUES]},{'name':a21_0x4d18df(0x1b3),'type':a21_0x4d18df(0x1a3),'description':'Write\x20to\x20global\x20(~/'+PRODUCT_CONFIG[a21_0x4d18df(0x1a2)]+')\x20instead\x20of\x20project','default':![]},{'name':a21_0x4d18df(0x1c6),'type':'boolean','description':'Skip\x20confirmation\x20when\x20overwriting','default':![]}];function a21_0x13d5(){const _0x69fd86=['Aborted.','[y/N]','flagMissing','\x20app\x20init\x20--appcode\x20<code>\x20[--env\x20daily]\x20[--global]',')\x20instead\x20of\x20project','App\x20code\x20cannot\x20be\x20empty.','11158875xUNUnP','yes','Override\x20imported\x20default\x20appcode','AbortPrompt','race','join','SIGINT','once','cancelled','object','validation','File\x20','App\x20code','log','1699436OrTItt','296AkUxWB','question','utf8','close','apps','Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','\x20\x20default:\x20','\x20\x20config:\x20\x20','\x22.\x20Allowed:\x20','140ipdUBz','file','project','\x0aInitialized\x20','Usage:\x20','toLowerCase','trim','6HLzegv','\x20init\x20—\x20Create\x20','3147009FzwSnD','Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','env','newConfigFileName','boolean','14806904WfKPRd','app','1745586vMOyLC','includes','4409975tWuNAC','apiDir','Failed\x20to\x20parse\x20source\x20file:\x20','):\x20','riskLevel','14kZWzxv','[Y/n]','stdout','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`.','Imported\x20from\x20','string','global','message','Override\x20imported\x20default\x20env','Skip\x20confirmation\x20when\x20overwriting','\x20\x20appcode:\x20','defaultApp','Initialized\x20','Write\x20to\x20global\x20(~/','appcode','User\x20aborted\x20prompt','removeListener','App\x20code\x20for\x20the\x20project'];a21_0x13d5=function(){return _0x69fd86;};return a21_0x13d5();}export async function runInit(_0x23bed1){const _0x3ff337=a21_0x4d18df,_0x55f874=isNonInteractiveMode(_0x23bed1),_0x23403f=_0x23bed1[_0x3ff337(0x1b3)]?_0x3ff337(0x1b3):'project',_0x42d5b4=resolveWriteConfigPath(_0x23403f);try{_0x55f874?await runNonInteractive(_0x23bed1,_0x42d5b4):await runInteractive(_0x23bed1,_0x42d5b4);}catch(_0x400930){if(_0x400930 instanceof AbortPrompt)throw CliErrors[_0x3ff337(0x1cd)]();throw _0x400930;}}function a21_0x5578(_0x468668,_0x402206){_0x468668=_0x468668-0x18b;const _0x13d509=a21_0x13d5();let _0x557854=_0x13d509[_0x468668];return _0x557854;}export async function runInitImport(_0x289631){const _0x1f705b=a21_0x4d18df,_0x2910a0=_0x289631[_0x1f705b(0x1b3)]?'global':_0x1f705b(0x198),_0x1056b5=resolveWriteConfigPath(_0x2910a0);await runFromImport(_0x289631,_0x1056b5);}const RUNTIME_IRRELEVANT_KEYS=new Set([a21_0x4d18df(0x1a9)]);async function runFromImport(_0x321347,_0x34ea3f){const _0xb9ba42=a21_0x4d18df,_0x3f70c3=resolveFilePath(_0x321347[_0xb9ba42(0x197)]);if(!existsSync(_0x3f70c3))throw CliErrors[_0xb9ba42(0x1cf)]('Source\x20file\x20not\x20found:\x20'+_0x3f70c3);const _0x2c1476=readSourceFile(_0x3f70c3),_0x2d6b42=convertToRuntimeConfig(_0x2c1476);_0x321347[_0xb9ba42(0x1bb)]&&(_0x2d6b42['appcode']=String(_0x321347[_0xb9ba42(0x1bb)]));_0x321347[_0xb9ba42(0x1a1)]&&(_0x2d6b42[_0xb9ba42(0x1a1)]=resolveInitEnv(_0x321347));if(!_0x2d6b42['appcode'])throw CliErrors[_0xb9ba42(0x1cf)]('Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.',_0xb9ba42(0x1b0));await writeInitConfig(_0x34ea3f,_0x2d6b42,_0x321347),console[_0xb9ba42(0x1d2)](_0xb9ba42(0x1b1)+_0x3f70c3),console['log'](_0xb9ba42(0x194)+_0x34ea3f),console[_0xb9ba42(0x1d2)](_0xb9ba42(0x1b7)+_0x2d6b42['appcode']);if(_0x2d6b42[_0xb9ba42(0x1b8)])console[_0xb9ba42(0x1d2)](_0xb9ba42(0x193)+_0x2d6b42[_0xb9ba42(0x1b8)]);}function convertToRuntimeConfig(_0x5efa97){const _0x37c799=a21_0x4d18df;if(_0x5efa97[_0x37c799(0x190)]&&typeof _0x5efa97['apps']===_0x37c799(0x1ce))throw CliErrors[_0x37c799(0x1cf)](_0x37c799(0x191),_0x37c799(0x192));const _0xe60aa8={};for(const _0x5a52f1 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x5efa97[_0x5a52f1]!==undefined&&(_0xe60aa8[_0x5a52f1]=_0x5efa97[_0x5a52f1]);}return!_0xe60aa8[_0x37c799(0x1ac)]&&(_0xe60aa8[_0x37c799(0x1ac)]=DEFAULT_CONFIG_VALUES['riskLevel']),_0xe60aa8;}async function runNonInteractive(_0x3ca774,_0x32f343){const _0x15c85a=a21_0x4d18df,_0x10a473=_0x3ca774[_0x15c85a(0x1bb)];if(!_0x10a473)throw CliErrors[_0x15c85a(0x1c1)](_0x15c85a(0x1bb),_0x15c85a(0x19a)+CLI_BIN_NAME+_0x15c85a(0x1c2));const _0x1f3c25=resolveInitEnv(_0x3ca774);await writeInitConfig(_0x32f343,{'appcode':_0x10a473,'env':_0x1f3c25},_0x3ca774),console[_0x15c85a(0x1d2)](_0x15c85a(0x1b9)+_0x32f343),console['log']('\x20\x20appcode:\x20'+_0x10a473),console['log']('\x20\x20env:\x20\x20\x20\x20\x20'+_0x1f3c25);}async function runInteractive(_0x4aa77d,_0x147f38){const _0xc2052=a21_0x4d18df,_0x92d008=loadExisting(_0x147f38),_0x144d75=typeof _0x92d008?.['appcode']==='string'?_0x92d008[_0xc2052(0x1bb)]:'',_0x181ace=resolveInitEnv(_0x4aa77d);console[_0xc2052(0x1d2)](CLI_BIN_NAME+_0xc2052(0x19e)+PRODUCT_CONFIG['newConfigFileName']+'\x0a');if(existsSync(_0x147f38)&&!_0x4aa77d[_0xc2052(0x1c6)]){const _0x3eab81=await promptYesNo(_0xc2052(0x1d0)+_0x147f38+'\x20already\x20exists.\x20Overwrite?',![]);if(!_0x3eab81){console[_0xc2052(0x1d2)](_0xc2052(0x1bf));return;}}const _0x517a6c=typeof _0x4aa77d[_0xc2052(0x1bb)]===_0xc2052(0x1b2)?_0x4aa77d[_0xc2052(0x1bb)][_0xc2052(0x19c)]():'';let _0x1e6468=_0x517a6c;!_0x1e6468&&(_0x1e6468=await promptInput(_0xc2052(0x1d1),_0x144d75));if(!_0x1e6468[_0xc2052(0x19c)]())throw CliErrors[_0xc2052(0x1cf)](_0xc2052(0x1c4));await writeInitConfig(_0x147f38,{'appcode':_0x1e6468[_0xc2052(0x19c)](),'env':_0x181ace},_0x4aa77d),console[_0xc2052(0x1d2)](_0xc2052(0x199)+_0x147f38),console[_0xc2052(0x1d2)](_0xc2052(0x1b7)+_0x1e6468['trim']()),console[_0xc2052(0x1d2)]('\x20\x20env:\x20\x20\x20\x20\x20'+_0x181ace);}async function writeInitConfig(_0x4d3f79,_0x2cacd5,_0x4bfe0e){const _0x3ac005=a21_0x4d18df;let _0x1eba82={};existsSync(_0x4d3f79)&&!_0x4bfe0e['yes']&&(_0x1eba82=readConfigFile(_0x4d3f79));for(const [_0x27fdf0,_0x1ec5d0]of Object['entries'](_0x2cacd5)){_0x1ec5d0!==undefined&&(_0x1eba82[_0x27fdf0]=_0x1ec5d0);}if(_0x1eba82[_0x3ac005(0x1a5)])delete _0x1eba82[_0x3ac005(0x1a5)];writeConfigFile(_0x4d3f79,_0x1eba82);}class AbortPrompt extends Error{constructor(){const _0x2d6c76=a21_0x4d18df;super(_0x2d6c76(0x1bc)),this['name']=_0x2d6c76(0x1c8);}}function createSafeRl(){const _0x4cd4bd=a21_0x4d18df,_0x463a26=createInterface({'input':process['stdin'],'output':process[_0x4cd4bd(0x1af)]});let _0x5db3da;const _0x2f3db0=new Promise((_0x168609,_0x20195f)=>{const _0x3b8cb8=_0x4cd4bd;_0x5db3da=()=>{const _0x5b5994=a21_0x5578;_0x5db3da&&(_0x463a26[_0x5b5994(0x1bd)](_0x5b5994(0x1cb),_0x5db3da),_0x5db3da=undefined);try{_0x463a26['close']();}catch{}_0x20195f(new AbortPrompt());},_0x463a26[_0x3b8cb8(0x1cc)](_0x3b8cb8(0x1cb),_0x5db3da);}),_0x448dd=()=>{const _0x1d3a62=_0x4cd4bd;_0x5db3da&&(_0x463a26[_0x1d3a62(0x1bd)](_0x1d3a62(0x1cb),_0x5db3da),_0x5db3da=undefined);try{_0x463a26[_0x1d3a62(0x18f)]();}catch{}};return{'rl':_0x463a26,'abortPromise':_0x2f3db0,'disposeSuccess':_0x448dd};}async function promptInput(_0x3db49d,_0x32f835){const {rl:_0x5669c1,abortPromise:_0x10bf9d,disposeSuccess:_0x5005a5}=createSafeRl(),_0x4fba54=new Promise(_0x4bf4ee=>{const _0x443b46=a21_0x5578,_0x212304=_0x32f835?'\x20\x20'+_0x3db49d+'\x20('+_0x32f835+_0x443b46(0x1ab):'\x20\x20'+_0x3db49d+':\x20';_0x5669c1[_0x443b46(0x18d)](_0x212304,_0x38fa02=>{_0x5005a5(),_0x4bf4ee(_0x38fa02['trim']()||_0x32f835);});});return Promise['race']([_0x4fba54,_0x10bf9d]);}async function promptYesNo(_0x50597f,_0x3ea4ec){const _0x1b6418=a21_0x4d18df,{rl:_0x39a688,abortPromise:_0x262dbc,disposeSuccess:_0x548d17}=createSafeRl(),_0x461efb=new Promise(_0x1b90fd=>{const _0x4d8c57=a21_0x5578,_0x4e9f21=_0x3ea4ec?_0x4d8c57(0x1ae):_0x4d8c57(0x1c0);_0x39a688[_0x4d8c57(0x18d)]('\x20\x20'+_0x50597f+'\x20'+_0x4e9f21+':\x20',_0x300afc=>{const _0x1666ab=_0x4d8c57;_0x548d17();const _0x5e2747=_0x300afc[_0x1666ab(0x19c)]()[_0x1666ab(0x19b)]();if(_0x5e2747==='y'||_0x5e2747===_0x1666ab(0x1c6))_0x1b90fd(!![]);else{if(_0x5e2747==='n'||_0x5e2747==='no')_0x1b90fd(![]);else _0x1b90fd(_0x3ea4ec);}});});return Promise[_0x1b6418(0x1c9)]([_0x461efb,_0x262dbc]);}function loadExisting(_0xba240e){if(!existsSync(_0xba240e))return null;return readConfigFile(_0xba240e);}function resolveFilePath(_0x5a1cba){return isAbsolute(_0x5a1cba)?_0x5a1cba:resolve(process['cwd'](),_0x5a1cba);}function readSourceFile(_0x56f94d){const _0x5e5ce1=a21_0x4d18df;try{const _0xe5d46b=readFileSync(_0x56f94d,{'encoding':_0x5e5ce1(0x18e)});return JSON['parse'](_0xe5d46b);}catch(_0x1d9da7){throw CliErrors['validation'](_0x5e5ce1(0x1aa)+_0x1d9da7[_0x5e5ce1(0x1b4)]);}}function resolveInitEnv(_0x413449){const _0xeb29f8=a21_0x4d18df,_0xa41189=_0x413449['env'];if(_0xa41189===undefined||_0xa41189==='')return DEFAULT_CONFIG_VALUES['env'];if(!RUNTIME_ENV_VALUES[_0xeb29f8(0x1a7)](_0xa41189))throw CliErrors[_0xeb29f8(0x1cf)]('Invalid\x20env\x20\x22'+_0xa41189+_0xeb29f8(0x195)+RUNTIME_ENV_VALUES[_0xeb29f8(0x1ca)](',\x20'));return _0xa41189;}
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_0x1795a3=a22_0x5430;(function(_0x345c38,_0x219549){const _0x370ad6=a22_0x5430,_0x3604be=_0x345c38();while(!![]){try{const _0xda4397=parseInt(_0x370ad6(0x83))/0x1+-parseInt(_0x370ad6(0x6d))/0x2+parseInt(_0x370ad6(0xa8))/0x3*(-parseInt(_0x370ad6(0x82))/0x4)+-parseInt(_0x370ad6(0x69))/0x5*(parseInt(_0x370ad6(0x7c))/0x6)+-parseInt(_0x370ad6(0x7a))/0x7*(parseInt(_0x370ad6(0xa9))/0x8)+parseInt(_0x370ad6(0xa7))/0x9*(-parseInt(_0x370ad6(0x7e))/0xa)+-parseInt(_0x370ad6(0x9c))/0xb*(-parseInt(_0x370ad6(0x90))/0xc);if(_0xda4397===_0x219549)break;else _0x3604be['push'](_0x3604be['shift']());}catch(_0x12287b){_0x3604be['push'](_0x3604be['shift']());}}}(a22_0x31e8,0x2ea64));function a22_0x5430(_0x220bbf,_0x3021a3){_0x220bbf=_0x220bbf-0x67;const _0x31e8ee=a22_0x31e8();let _0x54300a=_0x31e8ee[_0x220bbf];return _0x54300a;}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_0x1795a3(0x78),'type':'string','required':!![],'description':a22_0x1795a3(0x93)},FILE_FLAG={'name':'file','type':a22_0x1795a3(0x9a),'required':!![],'description':a22_0x1795a3(0x6c)},QUERY_FLAG={'name':a22_0x1795a3(0x72),'type':'string','required':!![],'description':a22_0x1795a3(0xae)},TOPK_FLAG={'name':'topk','type':a22_0x1795a3(0x97),'description':a22_0x1795a3(0x73)};function readKnowledgeFile(_0x3c3a22){const _0x497cec=a22_0x1795a3;if(!_0x3c3a22)throw CliErrors[_0x497cec(0x6a)](_0x497cec(0x92));if(!existsSync(_0x3c3a22))throw CliErrors[_0x497cec(0x6a)](_0x497cec(0x96)+_0x3c3a22);if(!statSync(_0x3c3a22)[_0x497cec(0x67)]())throw CliErrors[_0x497cec(0x6a)](_0x497cec(0x84)+_0x3c3a22);return readFileSync(_0x3c3a22,_0x497cec(0xa5));}function summarizePersonalItem(_0x17aa3e){const _0x462103=a22_0x1795a3;return{'id':_0x17aa3e['id'],'title':_0x17aa3e[_0x462103(0x78)],'version':_0x17aa3e[_0x462103(0x8d)],'ragStatus':_0x17aa3e[_0x462103(0xaa)],'ragErrorMessage':_0x17aa3e[_0x462103(0x6e)],'updateTime':_0x17aa3e[_0x462103(0x87)]};}function detailPersonalItem(_0x57b4d0){const _0x27e0eb=a22_0x1795a3;return{'id':_0x57b4d0['id'],'appCode':_0x57b4d0[_0x27e0eb(0x91)],'scope':_0x57b4d0[_0x27e0eb(0x88)],'userId':_0x57b4d0[_0x27e0eb(0x68)],'title':_0x57b4d0[_0x27e0eb(0x78)],'content':_0x57b4d0[_0x27e0eb(0x89)]??'','version':_0x57b4d0[_0x27e0eb(0x8d)],'ragStatus':_0x57b4d0[_0x27e0eb(0xaa)],'ragErrorMessage':_0x57b4d0[_0x27e0eb(0x6e)],'createTime':_0x57b4d0[_0x27e0eb(0x94)],'updateTime':_0x57b4d0[_0x27e0eb(0x87)]};}function summarizeSearchHit(_0x3224b4){const _0x15b964=a22_0x1795a3;return{'scope':_0x3224b4[_0x15b964(0x88)],'docId':_0x3224b4[_0x15b964(0x80)],'score':_0x3224b4[_0x15b964(0x9d)],'weightedScore':_0x3224b4[_0x15b964(0xa0)],'content':_0x3224b4[_0x15b964(0x89)],'metadata':_0x3224b4['metadata']};}function a22_0x31e8(){const _0x2ffa09=['createTime','write','File\x20not\x20found:\x20','number','Created\x20KB\x20entry\x20','--topk\x20must\x20be\x20a\x20positive\x20number.','string','bool','11NOTsFC','score','search','Search\x20visible\x20company\x20and\x20personal\x20knowledge\x20base\x20content','weightedScore','map','verbose','List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','file','utf8','Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22','39645OThgOd','570891yVlcFr','56nTvDRg','ragStatus','update','read','detail','Search\x20query\x20for\x20visible\x20company\x20and\x20personal\x20knowledge','topk','body','isFile','userId','914495ugAUQC','validation','create','Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file','602658fJlcno','ragErrorMessage','num','build','Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','query','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','trim','flag','/client/knowledge-base/personal/','list','title','isFinite','284662TDKTFD','Update\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','6AUhLTf','length','110cfkETE','/client/knowledge-base/personal/create','docId','POST','8wggJMk','199987VSaEBa','File\x20is\x20not\x20a\x20regular\x20file:\x20','Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20','description','updateTime','scope','content','Personal\x20knowledge-base\x20entry\x20ID','Override\x20the\x20existing\x20entry\x20title','str','version','Search\x20query\x20is\x20required.','Updated\x20KB\x20entry\x20','14268336BZTOHx','appCode','File\x20path\x20is\x20required.','Personal\x20knowledge-base\x20entry\x20title'];a22_0x31e8=function(){return _0x2ffa09;};return a22_0x31e8();}function readTopK(_0x2c3def){const _0x1c2f61=a22_0x1795a3,_0x553764=_0x2c3def[_0x1c2f61(0x75)](_0x1c2f61(0xaf));if(_0x553764===undefined||_0x553764===null||_0x553764==='')return undefined;const _0x52fbae=_0x2c3def[_0x1c2f61(0x6f)](_0x1c2f61(0xaf));if(!Number[_0x1c2f61(0x79)](_0x52fbae)||_0x52fbae<0x1)throw CliErrors[_0x1c2f61(0x6a)](_0x1c2f61(0x99));return _0x52fbae;}const kbList={'service':'kb','command':a22_0x1795a3(0x77),'description':a22_0x1795a3(0xa3),'risk':a22_0x1795a3(0xac),'flags':[VERBOSE_FLAG],async 'execute'(_0x1cacf3){const _0x48ddd1=a22_0x1795a3,_0x40e7ab=await listPersonalKnowledgeBaseItems(_0x1cacf3['appCode']);if(_0x1cacf3[_0x48ddd1(0x9b)](_0x48ddd1(0xa2)))return{'ok':!![],'data':{'total':_0x40e7ab[_0x48ddd1(0x7d)],'items':_0x40e7ab}};return{'ok':!![],'data':{'total':_0x40e7ab[_0x48ddd1(0x7d)],'items':_0x40e7ab[_0x48ddd1(0xa1)](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':a22_0x1795a3(0xad),'description':a22_0x1795a3(0x71),'risk':'read','flags':[{...ID_FLAG,'description':a22_0x1795a3(0x8a)}],async 'execute'(_0x2d43b8){const _0x2ad88d=a22_0x1795a3,_0x1611f4=await getPersonalKnowledgeBaseItem(_0x2d43b8[_0x2ad88d(0x6f)]('id'),_0x2d43b8[_0x2ad88d(0x91)]);return{'ok':!![],'data':detailPersonalItem(_0x1611f4)};}},kbCreate={'service':'kb','command':a22_0x1795a3(0x6b),'description':'Create\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','risk':'write','flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x1b636f){const _0x189648=a22_0x1795a3,_0x358a7d=_0x1b636f[_0x189648(0x8c)]('title'),_0x3ebe34=readKnowledgeFile(_0x1b636f['str'](_0x189648(0xa4))),_0x233691=await createPersonalKnowledgeBaseItem(_0x1b636f[_0x189648(0x91)],{'title':_0x358a7d,'content':_0x3ebe34});return{'ok':!![],'data':summarizePersonalItem(_0x233691),'message':_0x189648(0x98)+_0x233691['id']+'\x20('+_0x233691[_0x189648(0x78)]+')'};},async 'dryRun'(_0x3e6e58){const _0x4f1b59=a22_0x1795a3,_0x4b4856=_0x3e6e58[_0x4f1b59(0x8c)]('title'),_0x20614d=readKnowledgeFile(_0x3e6e58[_0x4f1b59(0x8c)]('file'));return dryRun('POST',_0x4f1b59(0x7f))[_0x4f1b59(0xb0)]({'appCode':_0x3e6e58[_0x4f1b59(0x91)],'title':_0x4b4856,'content':_0x20614d})[_0x4f1b59(0x86)](_0x4f1b59(0xa6)+_0x4b4856+'\x22')[_0x4f1b59(0x70)]();}},kbUpdate={'service':'kb','command':a22_0x1795a3(0xab),'description':a22_0x1795a3(0x7b),'risk':a22_0x1795a3(0x95),'flags':[{...ID_FLAG,'description':'Personal\x20knowledge-base\x20entry\x20ID'},{...TITLE_FLAG,'required':![],'description':a22_0x1795a3(0x8b)},FILE_FLAG],async 'execute'(_0x49d8e3){const _0x331b88=a22_0x1795a3,_0x3a92ff=_0x49d8e3[_0x331b88(0x6f)]('id'),_0x43c6d5=readKnowledgeFile(_0x49d8e3[_0x331b88(0x8c)](_0x331b88(0xa4))),_0x2e4d8e=_0x49d8e3[_0x331b88(0x8c)](_0x331b88(0x78))||(await getPersonalKnowledgeBaseItem(_0x3a92ff,_0x49d8e3[_0x331b88(0x91)]))[_0x331b88(0x78)],_0x89f273=await updatePersonalKnowledgeBaseItem(_0x3a92ff,_0x49d8e3['appCode'],{'title':_0x2e4d8e,'content':_0x43c6d5});return{'ok':!![],'data':summarizePersonalItem(_0x89f273),'message':_0x331b88(0x8f)+_0x89f273['id']+'\x20('+_0x89f273[_0x331b88(0x78)]+')'};},async 'dryRun'(_0x255814){const _0x3306cf=a22_0x1795a3,_0x426bd5=_0x255814[_0x3306cf(0x6f)]('id'),_0x192a16=readKnowledgeFile(_0x255814[_0x3306cf(0x8c)](_0x3306cf(0xa4))),_0x3addf5=_0x255814[_0x3306cf(0x8c)](_0x3306cf(0x78))||(await getPersonalKnowledgeBaseItem(_0x426bd5,_0x255814[_0x3306cf(0x91)]))['title'];return dryRun(_0x3306cf(0x81),_0x3306cf(0x76)+_0x426bd5+'/update')['body']({'appCode':_0x255814[_0x3306cf(0x91)],'title':_0x3addf5,'content':_0x192a16})['description'](_0x3306cf(0x85)+_0x426bd5)['build']();}},kbSearch={'service':'kb','command':a22_0x1795a3(0x9e),'description':a22_0x1795a3(0x9f),'risk':a22_0x1795a3(0xac),'flags':[QUERY_FLAG,TOPK_FLAG],async 'validate'(_0x12662e){const _0x39791c=a22_0x1795a3;if(!_0x12662e[_0x39791c(0x8c)](_0x39791c(0x72))[_0x39791c(0x74)]())throw CliErrors[_0x39791c(0x6a)](_0x39791c(0x8e));readTopK(_0x12662e);},async 'execute'(_0x438b1e){const _0x16a84e=a22_0x1795a3,_0x3695fa=_0x438b1e['str'](_0x16a84e(0x72))[_0x16a84e(0x74)](),_0x3cd3c7=readTopK(_0x438b1e),_0x6616d7=await searchKnowledgeBase(_0x438b1e[_0x16a84e(0x91)],{'query':_0x3695fa,'topK':_0x3cd3c7});return{'ok':!![],'data':{'total':_0x6616d7[_0x16a84e(0x7d)],'hits':_0x6616d7[_0x16a84e(0xa1)](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_0x169329=a23_0x5f0c;(function(_0xae38cb,_0x599c74){const _0x132ead=a23_0x5f0c,_0x2848a7=_0xae38cb();while(!![]){try{const _0x3203c0=parseInt(_0x132ead(0xec))/0x1+parseInt(_0x132ead(0xf2))/0x2+parseInt(_0x132ead(0xf8))/0x3*(-parseInt(_0x132ead(0xea))/0x4)+-parseInt(_0x132ead(0xe3))/0x5*(parseInt(_0x132ead(0x102))/0x6)+-parseInt(_0x132ead(0xef))/0x7*(parseInt(_0x132ead(0xe5))/0x8)+-parseInt(_0x132ead(0xff))/0x9*(-parseInt(_0x132ead(0xee))/0xa)+parseInt(_0x132ead(0xf4))/0xb;if(_0x3203c0===_0x599c74)break;else _0x2848a7['push'](_0x2848a7['shift']());}catch(_0x1b0ea8){_0x2848a7['push'](_0x2848a7['shift']());}}}(a23_0x4684,0x90de7));import{logger}from'../../utils/logger.js';function a23_0x5f0c(_0x5f3c3a,_0x4e130c){_0x5f3c3a=_0x5f3c3a-0xe1;const _0x4684a1=a23_0x4684();let _0x5f0c15=_0x4684a1[_0x5f3c3a];return _0x5f0c15;}import{CLI_DISPLAY_NAME}from'../../constant/cli.js';function printLogs(_0x1b7508){const _0x31feac=a23_0x5f0c;if(_0x1b7508[_0x31feac(0xf0)]===0x0){console['log'](_0x31feac(0xf7));return;}console[_0x31feac(0xfa)]('*\x20'+CLI_DISPLAY_NAME+_0x31feac(0xf9)),_0x1b7508[_0x31feac(0xe8)]((_0x55e1a2,_0x196dfe)=>{const _0x3be7f7=_0x31feac,_0x2ebc10=new Date(_0x55e1a2['timestamp'])[_0x3be7f7(0xfb)](_0x3be7f7(0xfe)),_0xd638eb=_0x55e1a2['level']===_0x3be7f7(0xfd)?'√':_0x55e1a2[_0x3be7f7(0xf5)]===_0x3be7f7(0xf3)?'×':_0x55e1a2['level']==='warn'?'!':'i';console[_0x3be7f7(0xfa)](_0x196dfe+0x1+'.\x20'+_0xd638eb+'\x20['+_0x55e1a2[_0x3be7f7(0xfc)]+']\x20'+_0x55e1a2[_0x3be7f7(0x103)]),console[_0x3be7f7(0xfa)](_0x3be7f7(0x100)+_0x2ebc10),_0x55e1a2[_0x3be7f7(0xf6)]&&console[_0x3be7f7(0xfa)](_0x3be7f7(0xeb)+_0x55e1a2[_0x3be7f7(0xf6)]+'ms'),_0x55e1a2[_0x3be7f7(0xe2)]&&Object['keys'](_0x55e1a2['details'])[_0x3be7f7(0xf0)]>0x0&&console[_0x3be7f7(0xfa)](_0x3be7f7(0xe6)+JSON[_0x3be7f7(0xe1)](_0x55e1a2[_0x3be7f7(0xe2)],null,0x2)),console[_0x3be7f7(0xfa)]('');});}function a23_0x4684(){const _0x4cf49f=['1045832osDhSH','Clear\x20command\x20history\x20logs','4110jQxEGj','7gwofNb','length','View\x20command\x20history\x20logs','118756YgZtqx','error','3176558ejWzhv','level','duration','*\x20No\x20logs\x20found','1770jrnUYE','\x20logs:\x0a','log','toLocaleString','command','success','en-US','12501jJSGaB','\x20\x20\x20Time:\x20','clearLogs','2328tqLbbK','message','clear','*\x20Logs\x20cleared','stringify','details','7460pfXCvf','read','3853264sBhpfj','\x20\x20\x20Details:\x20','readLogs','forEach','write','2108gEBUds','\x20\x20\x20Duration:\x20'];a23_0x4684=function(){return _0x4cf49f;};return a23_0x4684();}export const logsDefinitions=[{'service':'logs','command':'show','description':a23_0x169329(0xf1),'risk':a23_0x169329(0xe4),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x51363f){const _0x354404=a23_0x169329;return printLogs(logger[_0x354404(0xe7)]()),{'ok':!![]};}},{'service':'logs','command':a23_0x169329(0x104),'description':a23_0x169329(0xed),'risk':a23_0x169329(0xe9),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x46a896){const _0x146f3b=a23_0x169329;return logger[_0x146f3b(0x101)](),console[_0x146f3b(0xfa)](_0x146f3b(0x105)),{'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_0x4894b5=a24_0x2006;(function(_0x437491,_0x1e140b){const _0x20b0b7=a24_0x2006,_0x31f9b0=_0x437491();while(!![]){try{const _0x38334a=parseInt(_0x20b0b7(0x14e))/0x1*(parseInt(_0x20b0b7(0x148))/0x2)+parseInt(_0x20b0b7(0x143))/0x3*(-parseInt(_0x20b0b7(0x155))/0x4)+-parseInt(_0x20b0b7(0x153))/0x5*(-parseInt(_0x20b0b7(0x14d))/0x6)+-parseInt(_0x20b0b7(0x140))/0x7+parseInt(_0x20b0b7(0x15d))/0x8*(-parseInt(_0x20b0b7(0x144))/0x9)+-parseInt(_0x20b0b7(0x15b))/0xa+parseInt(_0x20b0b7(0x15a))/0xb;if(_0x38334a===_0x1e140b)break;else _0x31f9b0['push'](_0x31f9b0['shift']());}catch(_0xbb72d1){_0x31f9b0['push'](_0x31f9b0['shift']());}}}(a24_0x5f00,0x6a2e9));import{authDefinitions}from'../commands/auth/index.js';import{logsDefinitions}from'../commands/logs/index.js';import{skillDefinitions}from'../commands/skill/index.js';function a24_0x5f00(){const _0x11f6f6=['get','24pMkNJP','29967rxLTDe','login','Knowledge\x20Base','write','defaultCommand','667495lSYbXF','\x20\x20[write]','4JqsgnJ','App\x20Management','BFF\x20Scripts','map','risk','9934771oLFTaC','528660yWcMWZ','Configuration','3012632YOkpXP','set','has','run','Self\x20Update','Schema','Skills','values','list','2580879IAiHpp','SQL\x20Queries','install','1241589ErtThj','9PbWCta','Diagnostics','service','isSingleCommand','14eHxTsr','description','push','command'];a24_0x5f00=function(){return _0x11f6f6;};return a24_0x5f00();}import{updateDefinition}from'../commands/update.js';import{doctorDefinition}from'../commands/doctor.js';import{schemaDefinition}from'../commands/schema.js';import{appDefinitions}from'../commands/app/definitions.js';import{configDefinitions}from'../commands/config/definitions.js';import{bffDefinitions}from'../commands/bff/index.js';import{sqlDefinitions}from'../commands/sql/index.js';import{datasetDefinitions}from'../commands/dataset/index.js';import{dataDefinitions}from'../commands/data/index.js';import{kbDefinitions}from'../commands/kb/index.js';export const serviceRegistry=[];const serviceByName=new Map();export const definitions=new Map();export const serviceGroups=new Map();function a24_0x2006(_0x154243,_0x378aa5){_0x154243=_0x154243-0x138;const _0x5f000e=a24_0x5f00();let _0x20064f=_0x5f000e[_0x154243];return _0x20064f;}function registerDefinitions(_0x35d2a8){const _0x159c77=a24_0x2006;for(const _0x5ef169 of _0x35d2a8){definitions[_0x159c77(0x138)](_0x5ef169[_0x159c77(0x146)]+':'+_0x5ef169[_0x159c77(0x14b)],_0x5ef169);let _0x3cd993=serviceGroups[_0x159c77(0x14c)](_0x5ef169['service']);!_0x3cd993&&(_0x3cd993=[],serviceGroups[_0x159c77(0x138)](_0x5ef169[_0x159c77(0x146)],_0x3cd993)),_0x3cd993[_0x159c77(0x14a)](_0x5ef169);}}function registerService(_0x5727e3,_0x274859,_0x120ac4){const _0x1212eb=a24_0x2006;registerDefinitions(_0x274859);const _0x5c0d1a=_0x24669e=>_0x24669e==='read'?'':_0x24669e===_0x1212eb(0x151)?_0x1212eb(0x154):'\x20\x20[high-risk-write]',_0xa8ab23={'service':_0x274859[0x0]['service'],'label':_0x5727e3,'commands':_0x274859[_0x1212eb(0x158)](_0x9f6bdb=>({'command':_0x9f6bdb['command'],'description':_0x9f6bdb[_0x1212eb(0x149)],'tag':_0x5c0d1a(_0x9f6bdb[_0x1212eb(0x159)])})),'defaultCommand':_0x120ac4?.[_0x1212eb(0x152)]??(_0x120ac4?.[_0x1212eb(0x147)]?_0x274859[0x0]['command']:undefined),'isSingleCommand':_0x120ac4?.[_0x1212eb(0x147)]};serviceRegistry[_0x1212eb(0x14a)](_0xa8ab23),serviceByName[_0x1212eb(0x138)](_0xa8ab23['service'],_0xa8ab23);}registerService('Authentication',authDefinitions,{'defaultCommand':a24_0x4894b5(0x14f)}),registerService('Datasets',datasetDefinitions),registerService('Instant\x20API',dataDefinitions),registerService(a24_0x4894b5(0x141),sqlDefinitions),registerService(a24_0x4894b5(0x157),bffDefinitions),registerService(a24_0x4894b5(0x150),kbDefinitions),registerService(a24_0x4894b5(0x156),appDefinitions,{'defaultCommand':a24_0x4894b5(0x13f)}),registerService(a24_0x4894b5(0x15c),configDefinitions,{'defaultCommand':a24_0x4894b5(0x13f)}),registerService(a24_0x4894b5(0x13d),skillDefinitions,{'defaultCommand':a24_0x4894b5(0x142)}),registerService(a24_0x4894b5(0x13b),[updateDefinition],{'defaultCommand':a24_0x4894b5(0x13a),'isSingleCommand':!![]}),registerService(a24_0x4894b5(0x145),[doctorDefinition],{'isSingleCommand':!![]}),registerService(a24_0x4894b5(0x13c),[schemaDefinition],{'isSingleCommand':!![]}),registerService('Logs',logsDefinitions,{'defaultCommand':'show'});export function findDefinition(_0x58c634,_0x4d8135){const _0x5ac3a9=a24_0x4894b5;return definitions[_0x5ac3a9(0x14c)](_0x58c634+':'+_0x4d8135);}export function isKnownService(_0x22ef88){const _0x240f18=a24_0x4894b5;return serviceByName[_0x240f18(0x139)](_0x22ef88);}export function getServiceEntry(_0x5979cc){const _0x522ce8=a24_0x4894b5;return serviceByName[_0x522ce8(0x14c)](_0x5979cc);}export function getAllDefinitions(){const _0x5611b0=a24_0x4894b5;return Array['from'](definitions[_0x5611b0(0x13e)]());}
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
- const a25_0x1a7234=a25_0x2be2;function a25_0x2be2(_0x16cf57,_0x1833f1){_0x16cf57=_0x16cf57-0x8a;const _0x5de4dd=a25_0x5de4();let _0x2be240=_0x5de4dd[_0x16cf57];return _0x2be240;}(function(_0x1fd464,_0x2499dc){const _0xa0d24a=a25_0x2be2,_0x4dc667=_0x1fd464();while(!![]){try{const _0x3dc6ac=parseInt(_0xa0d24a(0x93))/0x1+parseInt(_0xa0d24a(0x8e))/0x2+parseInt(_0xa0d24a(0x8a))/0x3+-parseInt(_0xa0d24a(0x94))/0x4*(-parseInt(_0xa0d24a(0x91))/0x5)+parseInt(_0xa0d24a(0x8f))/0x6+parseInt(_0xa0d24a(0x8c))/0x7*(-parseInt(_0xa0d24a(0x90))/0x8)+-parseInt(_0xa0d24a(0x8b))/0x9;if(_0x3dc6ac===_0x2499dc)break;else _0x4dc667['push'](_0x4dc667['shift']());}catch(_0x40f4ef){_0x4dc667['push'](_0x4dc667['shift']());}}}(a25_0x5de4,0x9c58f));import{buildSchemaPayload}from'../framework/schema-export.js';async function execute(_0x489f5e){const _0x144269=await buildSchemaPayload();return{'ok':!![],'data':_0x144269};}function a25_0x5de4(){const _0x2bf2b6=['22466844KZzttl','8505616HsDQkh','Export\x20machine-readable\x20command\x20schema\x20(JSON)','1008582fodVKZ','3461784sodvQS','8jOOJWv','145ycBqZP','read','910771cTiKBu','165956GjQiZh','export','3469788rmysmZ'];a25_0x5de4=function(){return _0x2bf2b6;};return a25_0x5de4();}export const schemaDefinition={'service':'schema','command':a25_0x1a7234(0x95),'description':a25_0x1a7234(0x8d),'risk':a25_0x1a7234(0x92),'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};