@lovrabet/lovrabet-cli 2.0.13 → 2.0.14-beta.10

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 (84) hide show
  1. package/lib/cli.js +1 -1
  2. package/lib/commands/api-doc/index.js +1 -1
  3. package/lib/commands/app/cache.js +1 -1
  4. package/lib/commands/app/definitions.js +1 -1
  5. package/lib/commands/app/eligibility.js +1 -0
  6. package/lib/commands/app/mock-loader.js +1 -1
  7. package/lib/commands/app/remote-source.js +1 -1
  8. package/lib/commands/app/shared.js +1 -1
  9. package/lib/commands/artifact/index.js +1 -1
  10. package/lib/commands/auth/index.js +1 -1
  11. package/lib/commands/auth/prompt.js +1 -1
  12. package/lib/commands/bff/detail.js +1 -1
  13. package/lib/commands/bff/exec.js +1 -1
  14. package/lib/commands/bff/index.js +1 -1
  15. package/lib/commands/common/config-policy.js +1 -1
  16. package/lib/commands/common/constraints.js +1 -1
  17. package/lib/commands/common/flags.js +1 -1
  18. package/lib/commands/config/definitions.js +1 -1
  19. package/lib/commands/config/shared.js +1 -1
  20. package/lib/commands/data/index.js +1 -1
  21. package/lib/commands/dataset/detail.js +1 -1
  22. package/lib/commands/dataset/index.js +1 -1
  23. package/lib/commands/dataset/list.js +1 -1
  24. package/lib/commands/dataset/sdk-doc.js +1 -1
  25. package/lib/commands/doctor.js +1 -1
  26. package/lib/commands/init.js +1 -1
  27. package/lib/commands/kb/index.js +1 -1
  28. package/lib/commands/logs/index.js +1 -1
  29. package/lib/commands/personal-bff/index.js +1 -1
  30. package/lib/commands/registry.js +1 -1
  31. package/lib/commands/schema.js +1 -1
  32. package/lib/commands/service/dynamic.js +1 -0
  33. package/lib/commands/service/index.js +1 -0
  34. package/lib/commands/service/registry.js +1 -0
  35. package/lib/commands/skill/index.js +1 -1
  36. package/lib/commands/skill/templates.js +1 -0
  37. package/lib/commands/skill/validate.js +1 -0
  38. package/lib/commands/sql/detail.js +1 -1
  39. package/lib/commands/sql/exec.js +1 -1
  40. package/lib/commands/sql/index.js +1 -1
  41. package/lib/commands/update.js +1 -1
  42. package/lib/commands/workspace/index.js +1 -0
  43. package/lib/config/schema.js +1 -1
  44. package/lib/constant/app.js +1 -0
  45. package/lib/constant/auth-mode.js +1 -1
  46. package/lib/constant/cli.js +1 -1
  47. package/lib/constant/defaults.js +1 -1
  48. package/lib/constant/distribution.js +1 -1
  49. package/lib/constant/domain.js +1 -1
  50. package/lib/constant/env.js +1 -1
  51. package/lib/constant/output.js +1 -1
  52. package/lib/constant/product.js +1 -1
  53. package/lib/constant/risk.js +1 -1
  54. package/lib/constant/url.js +1 -1
  55. package/lib/context.js +1 -1
  56. package/lib/core/api-client.js +1 -1
  57. package/lib/core/db-resolver.js +1 -1
  58. package/lib/core/sdk-client.js +1 -1
  59. package/lib/errors.js +1 -1
  60. package/lib/framework/build-all-flags.js +1 -1
  61. package/lib/framework/dryrun.js +1 -1
  62. package/lib/framework/flags.js +1 -1
  63. package/lib/framework/help.js +1 -1
  64. package/lib/framework/index.js +1 -1
  65. package/lib/framework/output.js +1 -1
  66. package/lib/framework/preparse.js +1 -1
  67. package/lib/framework/response.js +1 -1
  68. package/lib/framework/runner-confirmation.js +1 -1
  69. package/lib/framework/runner-error.js +1 -1
  70. package/lib/framework/runner.js +1 -1
  71. package/lib/framework/schema-export.js +1 -1
  72. package/lib/framework/types.js +1 -1
  73. package/lib/generated/build-info.js +1 -1
  74. package/lib/help.js +1 -1
  75. package/lib/skills/npx-skills-add.js +1 -1
  76. package/lib/skills/runtime-skill-sync.js +1 -1
  77. package/lib/utils/apply-jq-filter.js +1 -1
  78. package/lib/utils/logger.js +1 -1
  79. package/lib/utils/params.js +1 -1
  80. package/lib/utils/platform.js +1 -1
  81. package/lib/utils/update-notice.js +1 -1
  82. package/lib/utils/version.js +1 -1
  83. package/lib/utils/write-cli-side-channel.js +1 -1
  84. package/package.json +8 -6
@@ -1 +1 @@
1
- (function(_0x44de36,_0xf54db4){const _0x257b53=a14_0x4c0c,_0x2241ed=_0x44de36();while(!![]){try{const _0x797b79=parseInt(_0x257b53(0xdb))/0x1*(-parseInt(_0x257b53(0xe0))/0x2)+parseInt(_0x257b53(0xe9))/0x3+parseInt(_0x257b53(0xf0))/0x4*(parseInt(_0x257b53(0xdf))/0x5)+parseInt(_0x257b53(0xe5))/0x6*(parseInt(_0x257b53(0xee))/0x7)+parseInt(_0x257b53(0xe2))/0x8+parseInt(_0x257b53(0xeb))/0x9*(parseInt(_0x257b53(0xe4))/0xa)+-parseInt(_0x257b53(0xdc))/0xb*(parseInt(_0x257b53(0xdd))/0xc);if(_0x797b79===_0xf54db4)break;else _0x2241ed['push'](_0x2241ed['shift']());}catch(_0x4b46b4){_0x2241ed['push'](_0x2241ed['shift']());}}}(a14_0x494d,0x25d83));import{CliErrors}from'../../errors.js';function a14_0x494d(){const _0x26cec9=['94682GqROgV','length','12UTEExy','Only\x20one\x20of\x20','At\x20least\x20one\x20of\x20','some','\x20is\x20allowed,\x20found:\x20','str','Provide\x20one\x20of:\x20','Invalid\x20--','121147KnjINx','2354vbIIbG','17880QXcJde','filter','277445SmCdQV','2iQToVu','flag','605472csRnle','\x20are\x20mutually\x20exclusive\x20for\x20`','1880150rWDvdQ','6TntwBH','validation','Remove\x20all\x20but\x20one.','Exactly\x20one\x20of\x20','453978xMJdPY','\x20is\x20required\x20for\x20`','9VuxBdc','test',',\x20got\x20\x22'];a14_0x494d=function(){return _0x26cec9;};return a14_0x494d();}function a14_0x4c0c(_0x4fc739,_0xe9338e){_0x4fc739=_0x4fc739-0xd8;const _0x494dc6=a14_0x494d();let _0x4c0c97=_0x494dc6[_0x4fc739];return _0x4c0c97;}function isSet(_0x1e9eb5,_0x5d2872){const _0x41412c=a14_0x4c0c,_0x1ef1e6=_0x1e9eb5[_0x41412c(0xe1)](_0x5d2872);return _0x1ef1e6!==undefined&&_0x1ef1e6!==''&&_0x1ef1e6!==![]&&_0x1ef1e6!==0x0;}function fmtNames(_0x5182c6){return _0x5182c6['map'](_0x10e294=>'--'+_0x10e294)['join'](',\x20');}export function requireOneOf(_0x24ef5f,_0x172836,_0x9bda89){const _0x3b6484=a14_0x4c0c,_0x2c5e2f=_0x172836['filter'](_0x48010a=>isSet(_0x24ef5f,_0x48010a));if(_0x2c5e2f['length']!==0x1)throw CliErrors[_0x3b6484(0xe6)](_0x2c5e2f[_0x3b6484(0xef)]===0x0?_0x3b6484(0xe8)+fmtNames(_0x172836)+_0x3b6484(0xea)+_0x9bda89+'`.':_0x3b6484(0xf1)+fmtNames(_0x172836)+_0x3b6484(0xf4)+fmtNames(_0x2c5e2f)+'.',_0x2c5e2f[_0x3b6484(0xef)]===0x0?_0x3b6484(0xd9)+fmtNames(_0x172836):_0x3b6484(0xe7));}export function requireAnyOf(_0x4bb619,_0x1cd62a,_0x5782d7){const _0x31a7f1=a14_0x4c0c;if(!_0x1cd62a[_0x31a7f1(0xf3)](_0x2cae9f=>isSet(_0x4bb619,_0x2cae9f)))throw CliErrors['validation'](_0x31a7f1(0xf2)+fmtNames(_0x1cd62a)+_0x31a7f1(0xea)+_0x5782d7+'`.',_0x31a7f1(0xd9)+fmtNames(_0x1cd62a));}export function mutuallyExclusive(_0x350f09,_0x493c13,_0x275146){const _0x3238c2=a14_0x4c0c,_0x32c76e=_0x493c13[_0x3238c2(0xde)](_0x218102=>isSet(_0x350f09,_0x218102));if(_0x32c76e[_0x3238c2(0xef)]>0x1)throw CliErrors[_0x3238c2(0xe6)]('Flags\x20'+fmtNames(_0x32c76e)+_0x3238c2(0xe3)+_0x275146+'`.','Use\x20only\x20one\x20of:\x20'+fmtNames(_0x493c13));}export function validatePattern(_0x10710f,_0x1af6d6,_0x351a4d,_0x413a8c){const _0x1b569d=a14_0x4c0c,_0x559f92=_0x10710f[_0x1b569d(0xd8)](_0x1af6d6);if(_0x559f92&&!_0x351a4d[_0x1b569d(0xec)](_0x559f92))throw CliErrors[_0x1b569d(0xe6)](_0x1b569d(0xda)+_0x1af6d6+':\x20expected\x20'+_0x413a8c+_0x1b569d(0xed)+_0x559f92+'\x22.');}
1
+ (function(_0x5a669e,_0x5893dd){const _0x3d5d6f=a15_0x354b,_0x3a922a=_0x5a669e();while(!![]){try{const _0x284766=parseInt(_0x3d5d6f(0x11c))/0x1+-parseInt(_0x3d5d6f(0x131))/0x2*(-parseInt(_0x3d5d6f(0x120))/0x3)+-parseInt(_0x3d5d6f(0x12b))/0x4*(-parseInt(_0x3d5d6f(0x130))/0x5)+-parseInt(_0x3d5d6f(0x11a))/0x6*(parseInt(_0x3d5d6f(0x119))/0x7)+-parseInt(_0x3d5d6f(0x129))/0x8+parseInt(_0x3d5d6f(0x11b))/0x9*(-parseInt(_0x3d5d6f(0x11d))/0xa)+parseInt(_0x3d5d6f(0x132))/0xb;if(_0x284766===_0x5893dd)break;else _0x3a922a['push'](_0x3a922a['shift']());}catch(_0x46b00b){_0x3a922a['push'](_0x3a922a['shift']());}}}(a15_0x5a34,0x6c543));function a15_0x5a34(){const _0x4ff965=['validation','join','Only\x20one\x20of\x20',',\x20got\x20\x22','\x20is\x20required\x20for\x20`','map','filter','length','4768984qDKXzb',':\x20expected\x20','368WAZDHZ','some','Flags\x20','str','Use\x20only\x20one\x20of:\x20','9125HYZCog','14EhySbQ','13187746sLRJAF','flag','Remove\x20all\x20but\x20one.','2414783QtDDcT','6DFcEXU','1312425SZwMlF','572488JhdANM','40oublUb','Provide\x20one\x20of:\x20','\x20are\x20mutually\x20exclusive\x20for\x20`','12357aUTwqw'];a15_0x5a34=function(){return _0x4ff965;};return a15_0x5a34();}import{CliErrors}from'../../errors.js';function isSet(_0x348334,_0x39ff9c){const _0x4005a7=a15_0x354b,_0x2d4a57=_0x348334[_0x4005a7(0x133)](_0x39ff9c);return _0x2d4a57!==undefined&&_0x2d4a57!==''&&_0x2d4a57!==![]&&_0x2d4a57!==0x0;}function fmtNames(_0x25eea8){const _0x106e0a=a15_0x354b;return _0x25eea8[_0x106e0a(0x126)](_0x25ad90=>'--'+_0x25ad90)[_0x106e0a(0x122)](',\x20');}export function requireOneOf(_0x110101,_0x19a167,_0x59c149){const _0x4bfd46=a15_0x354b,_0x51f1f3=_0x19a167[_0x4bfd46(0x127)](_0x26b4ea=>isSet(_0x110101,_0x26b4ea));if(_0x51f1f3['length']!==0x1)throw CliErrors['validation'](_0x51f1f3[_0x4bfd46(0x128)]===0x0?'Exactly\x20one\x20of\x20'+fmtNames(_0x19a167)+_0x4bfd46(0x125)+_0x59c149+'`.':_0x4bfd46(0x123)+fmtNames(_0x19a167)+'\x20is\x20allowed,\x20found:\x20'+fmtNames(_0x51f1f3)+'.',_0x51f1f3['length']===0x0?_0x4bfd46(0x11e)+fmtNames(_0x19a167):_0x4bfd46(0x134));}export function requireAnyOf(_0x33d5ea,_0x24fadd,_0x30a9d5){const _0xc6f2d2=a15_0x354b;if(!_0x24fadd[_0xc6f2d2(0x12c)](_0x5ec6ed=>isSet(_0x33d5ea,_0x5ec6ed)))throw CliErrors['validation']('At\x20least\x20one\x20of\x20'+fmtNames(_0x24fadd)+_0xc6f2d2(0x125)+_0x30a9d5+'`.',_0xc6f2d2(0x11e)+fmtNames(_0x24fadd));}export function mutuallyExclusive(_0x2ad735,_0x439844,_0x232cae){const _0x396eb9=a15_0x354b,_0x52e80d=_0x439844[_0x396eb9(0x127)](_0x107034=>isSet(_0x2ad735,_0x107034));if(_0x52e80d[_0x396eb9(0x128)]>0x1)throw CliErrors[_0x396eb9(0x121)](_0x396eb9(0x12d)+fmtNames(_0x52e80d)+_0x396eb9(0x11f)+_0x232cae+'`.',_0x396eb9(0x12f)+fmtNames(_0x439844));}function a15_0x354b(_0x5bade2,_0x10f66d){_0x5bade2=_0x5bade2-0x119;const _0x5a34c0=a15_0x5a34();let _0x354b99=_0x5a34c0[_0x5bade2];return _0x354b99;}export function validatePattern(_0x10205d,_0x2063fd,_0x26ede8,_0x2fcc32){const _0x1c8b39=a15_0x354b,_0x29596a=_0x10205d[_0x1c8b39(0x12e)](_0x2063fd);if(_0x29596a&&!_0x26ede8['test'](_0x29596a))throw CliErrors[_0x1c8b39(0x121)]('Invalid\x20--'+_0x2063fd+_0x1c8b39(0x12a)+_0x2fcc32+_0x1c8b39(0x124)+_0x29596a+'\x22.');}
@@ -1 +1 @@
1
- const a15_0x556df1=a15_0x3389;(function(_0x551ac1,_0x23d24e){const _0xfec585=a15_0x3389,_0x5d9240=_0x551ac1();while(!![]){try{const _0x1de8e0=-parseInt(_0xfec585(0x9a))/0x1*(parseInt(_0xfec585(0xa3))/0x2)+-parseInt(_0xfec585(0xa5))/0x3+-parseInt(_0xfec585(0x98))/0x4*(parseInt(_0xfec585(0x9c))/0x5)+parseInt(_0xfec585(0xa8))/0x6*(parseInt(_0xfec585(0x95))/0x7)+-parseInt(_0xfec585(0xa4))/0x8*(-parseInt(_0xfec585(0x9b))/0x9)+parseInt(_0xfec585(0x99))/0xa+-parseInt(_0xfec585(0x94))/0xb*(-parseInt(_0xfec585(0x92))/0xc);if(_0x1de8e0===_0x23d24e)break;else _0x5d9240['push'](_0x5d9240['shift']());}catch(_0x332005){_0x5d9240['push'](_0x5d9240['shift']());}}}(a15_0x2ea3,0x8bd3d));function a15_0x2ea3(){const _0x15deb8=['204ixFhHo','name','421861DgetGJ','14tIERlU','Resource\x20name\x20for\x20lookup','params','1917908sUDAFI','311100TjowRI','4469AcdnVR','9XvpIvz','10foTfhr','a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588a3a79d4a3540bbb2def2ad0a228a9acd)','string','number','Return\x20full\x20raw\x20response\x20object','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','code','2JYZUyp','5638104sCQVOo','651138kREZUN','verbose','Dataset\x20code\x20(32-char\x20hex\x20UUID)','1096086FAUGMG','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)'];a15_0x2ea3=function(){return _0x15deb8;};return a15_0x2ea3();}export const CODE_FLAG={'name':a15_0x556df1(0xa2),'type':'string','required':!![],'description':a15_0x556df1(0xa7),'pattern':{'regex':/^[a-f0-9]{32}$/i,'description':a15_0x556df1(0x9d)}};export const SQLCODE_FLAG={'name':'sqlcode','type':'string','required':!![],'description':a15_0x556df1(0xa9),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a15_0x556df1(0xa1)}};function a15_0x3389(_0x5c8fd9,_0x52981e){_0x5c8fd9=_0x5c8fd9-0x92;const _0x2ea380=a15_0x2ea3();let _0x338967=_0x2ea380[_0x5c8fd9];return _0x338967;}export const VERBOSE_FLAG={'name':a15_0x556df1(0xa6),'type':'boolean','description':a15_0x556df1(0xa0)};export const PARAMS_FLAG={'name':a15_0x556df1(0x97),'type':a15_0x556df1(0x9e),'description':a15_0x556df1(0xaa)};export const NAME_FLAG={'name':a15_0x556df1(0x93),'type':'string','description':a15_0x556df1(0x96)};export const ID_FLAG={'name':'id','type':a15_0x556df1(0x9f),'required':!![],'description':'Resource\x20ID'};
1
+ const a16_0x40f2a0=a16_0x1adc;function a16_0x530c(){const _0x3a885b=['params','710mvJpFw','2574PyEJdw','51610taLWjt','246yUmeiz','code','802770jzwiKP','2351KnYLfR','60gDuANE','531424POVFod','7OCNtvi','1297984yTMzDp','string','580129rzTUbu','Resource\x20name\x20for\x20lookup','sqlcode','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','number','132lEtmBL','Return\x20full\x20raw\x20response\x20object'];a16_0x530c=function(){return _0x3a885b;};return a16_0x530c();}(function(_0x25d81b,_0xd3875){const _0x15c62b=a16_0x1adc,_0x2f5334=_0x25d81b();while(!![]){try{const _0x384272=parseInt(_0x15c62b(0x1a5))/0x1*(-parseInt(_0x15c62b(0x1a2))/0x2)+parseInt(_0x15c62b(0x1a4))/0x3+-parseInt(_0x15c62b(0x195))/0x4+-parseInt(_0x15c62b(0x1a1))/0x5*(parseInt(_0x15c62b(0x1a6))/0x6)+parseInt(_0x15c62b(0x1a8))/0x7*(parseInt(_0x15c62b(0x1a7))/0x8)+parseInt(_0x15c62b(0x1a0))/0x9*(-parseInt(_0x15c62b(0x19f))/0xa)+-parseInt(_0x15c62b(0x197))/0xb*(-parseInt(_0x15c62b(0x19c))/0xc);if(_0x384272===_0xd3875)break;else _0x2f5334['push'](_0x2f5334['shift']());}catch(_0xb23ed0){_0x2f5334['push'](_0x2f5334['shift']());}}}(a16_0x530c,0x2b338));function a16_0x1adc(_0x4f6f5b,_0x2756be){_0x4f6f5b=_0x4f6f5b-0x195;const _0x530cb7=a16_0x530c();let _0x1adc38=_0x530cb7[_0x4f6f5b];return _0x1adc38;}export const CODE_FLAG={'name':a16_0x40f2a0(0x1a3),'type':a16_0x40f2a0(0x196),'required':!![],'description':'Dataset\x20code\x20(32-char\x20hex\x20UUID)','pattern':{'regex':/^[a-f0-9]{32}$/i,'description':'a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588a3a79d4a3540bbb2def2ad0a228a9acd)'}};export const SQLCODE_FLAG={'name':a16_0x40f2a0(0x199),'type':a16_0x40f2a0(0x196),'required':!![],'description':'SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':a16_0x40f2a0(0x19a)}};export const VERBOSE_FLAG={'name':'verbose','type':'boolean','description':a16_0x40f2a0(0x19d)};export const PARAMS_FLAG={'name':a16_0x40f2a0(0x19e),'type':a16_0x40f2a0(0x196),'description':'Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)'};export const NAME_FLAG={'name':'name','type':a16_0x40f2a0(0x196),'description':a16_0x40f2a0(0x198)};export const ID_FLAG={'name':'id','type':a16_0x40f2a0(0x19b),'required':!![],'description':'Resource\x20ID'};
@@ -1 +1 @@
1
- const a16_0x491b58=a16_0x167b;(function(_0x1bca99,_0x119832){const _0x1d1a7f=a16_0x167b,_0x3429d9=_0x1bca99();while(!![]){try{const _0x2105de=-parseInt(_0x1d1a7f(0x18f))/0x1+-parseInt(_0x1d1a7f(0x174))/0x2+-parseInt(_0x1d1a7f(0x166))/0x3+-parseInt(_0x1d1a7f(0x19b))/0x4+-parseInt(_0x1d1a7f(0x170))/0x5*(-parseInt(_0x1d1a7f(0x18b))/0x6)+-parseInt(_0x1d1a7f(0x17c))/0x7+-parseInt(_0x1d1a7f(0x16e))/0x8*(-parseInt(_0x1d1a7f(0x161))/0x9);if(_0x2105de===_0x119832)break;else _0x3429d9['push'](_0x3429d9['shift']());}catch(_0x9a0b1e){_0x3429d9['push'](_0x3429d9['shift']());}}}(a16_0x47a3,0x4cc41));function a16_0x167b(_0x753224,_0x42dd15){_0x753224=_0x753224-0x15e;const _0x47a3bc=a16_0x47a3();let _0x167bd7=_0x47a3bc[_0x753224];return _0x167bd7;}function a16_0x47a3(){const _0x1fafcf=['Config\x20files:\x0a','alias','1576jXxqEh','validation','5qmIpAR','Key\x20\x22','Missing\x20key\x20or\x20value.','get','644506lOrCjC','write','Set\x20`','config','#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a','length','apps','object','1716722fxALib','`\x20=\x20\x22','raw','../../context.js','pageSize\x20must\x20be\x20a\x20positive\x20number','keys','Missing\x20key\x20argument.','Usage:\x20','includes','stringify','\x22\x20is\x20not\x20settable.','global','bool','\x20\x20global:\x20\x20','pageSize','608376AvXCUa','key','isArray','Set\x20a\x20config\x20value','501400TLYTwN','trim','Key\x20not\x20found:\x20','Write\x20to\x20global\x20config','riskLevel','args','\x20(global)','project-or-global-explicit','split','\x20config\x20delete\x20<key>\x20[--global]','Get\x20a\x20config\x20value','appcode','2274404dnrPAw','delete','\x22\x20not\x20found\x20at\x20top\x20level.','\x20config\x20get\x20<key>','Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','85599ipwijt','list','log','Deleted\x20`','format','69390kpBLtZ','join','set','field','read','\x20\x20project:\x20'];a16_0x47a3=function(){return _0x1fafcf;};return a16_0x47a3();}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,readScopedConfig,writeScopedConfig,resolveWriteScope,toScopeFlags}from'../../commands/config/shared.js';import{resolveWriteConfigPath,getProjectConfigPath}from'../../context.js';const GLOBAL_FLAG={'name':a16_0x491b58(0x187),'type':'boolean','description':a16_0x491b58(0x192),'default':![]};function parseAliasAppcodeSetKey(_0x23a4f7){const _0x11ebec=a16_0x491b58,_0xdfc686=_0x23a4f7['split']('.');if(_0xdfc686[_0x11ebec(0x179)]!==0x3||_0xdfc686[0x0]!==_0x11ebec(0x17a)||_0xdfc686[0x2]!=='appcode')return undefined;const _0x117258=_0xdfc686[0x1]?.[_0x11ebec(0x190)]();return _0x117258?_0x117258:undefined;}function parseAliasDeleteKey(_0x354d9f){const _0x152d16=a16_0x491b58,_0x39f726=_0x354d9f['split']('.');if(_0x39f726[_0x152d16(0x179)]===0x2&&_0x39f726[0x0]==='apps'){const _0x136fbf=_0x39f726[0x1]?.['trim']();return _0x136fbf?{'alias':_0x136fbf}:undefined;}if(_0x39f726[_0x152d16(0x179)]===0x3&&_0x39f726[0x0]==='apps'&&_0x39f726[0x2]===_0x152d16(0x19a)){const _0x4479dc=_0x39f726[0x1]?.['trim']();return _0x4479dc?{'alias':_0x4479dc,'field':_0x152d16(0x19a)}:undefined;}return undefined;}function setLocalAppAlias(_0x2b88fd,_0x241344,_0x510564){const _0x5e9ace=a16_0x491b58,_0x22e1dd=_0x2b88fd[_0x5e9ace(0x17a)]&&typeof _0x2b88fd[_0x5e9ace(0x17a)]===_0x5e9ace(0x17b)&&!Array[_0x5e9ace(0x18d)](_0x2b88fd['apps'])?_0x2b88fd[_0x5e9ace(0x17a)]:{},_0x13ad21=_0x22e1dd[_0x241344]&&typeof _0x22e1dd[_0x241344]==='object'&&!Array[_0x5e9ace(0x18d)](_0x22e1dd[_0x241344])?_0x22e1dd[_0x241344]:{};_0x13ad21[_0x5e9ace(0x19a)]=_0x510564,_0x22e1dd[_0x241344]=_0x13ad21,_0x2b88fd[_0x5e9ace(0x17a)]=_0x22e1dd;}function deleteLocalAppAlias(_0x53cdc1,_0x5d4f4f){const _0x4c2e08=a16_0x491b58;if(!_0x53cdc1[_0x4c2e08(0x17a)]||typeof _0x53cdc1[_0x4c2e08(0x17a)]!==_0x4c2e08(0x17b)||Array[_0x4c2e08(0x18d)](_0x53cdc1[_0x4c2e08(0x17a)]))return![];const _0x394e69=_0x53cdc1[_0x4c2e08(0x17a)],_0x2441e6=_0x394e69[_0x5d4f4f[_0x4c2e08(0x16d)]];if(!_0x2441e6||typeof _0x2441e6!==_0x4c2e08(0x17b)||Array[_0x4c2e08(0x18d)](_0x2441e6))return![];if(!_0x5d4f4f[_0x4c2e08(0x169)])return delete _0x394e69[_0x5d4f4f[_0x4c2e08(0x16d)]],!![];if(!(_0x5d4f4f[_0x4c2e08(0x169)]in _0x2441e6))return![];return delete _0x2441e6[_0x5d4f4f[_0x4c2e08(0x169)]],Object[_0x4c2e08(0x181)](_0x2441e6)[_0x4c2e08(0x179)]===0x0&&delete _0x394e69[_0x5d4f4f[_0x4c2e08(0x16d)]],!![];}const listDef={'service':'config','command':a16_0x491b58(0x162),'description':'List\x20current\x20config','risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x244ba5){const _0x158029=a16_0x491b58,{buildConfigFromFlags:_0x574372}=await import(_0x158029(0x17f)),_0x436960=_0x574372({}),_0xf24bd7=getProjectConfigPath(),_0x5c6b68=resolveWriteConfigPath(_0x158029(0x187));if(_0x244ba5[_0x158029(0x165)]==='pretty')return{'ok':!![],'message':_0x158029(0x178)+(JSON[_0x158029(0x185)](_0x436960['raw'],null,0x2)+'\x0a\x0a')+_0x158029(0x16c)+(_0x158029(0x16b)+(_0xf24bd7??'(none)')+'\x0a')+(_0x158029(0x189)+_0x5c6b68)};return{'ok':!![],'data':{'effective':_0x436960[_0x158029(0x17e)],'configFiles':{'project':_0xf24bd7??null,'global':_0x5c6b68}}};}},getDef={'service':a16_0x491b58(0x177),'command':a16_0x491b58(0x173),'description':a16_0x491b58(0x199),'risk':a16_0x491b58(0x16a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a16_0x491b58(0x18c),'description':a16_0x491b58(0x160),'required':!![]}],'flags':[],async 'execute'(_0x1a7266){const _0x173e03=a16_0x491b58,_0xf380bc=_0x1a7266['args'][0x0];if(!_0xf380bc)throw CliErrors[_0x173e03(0x16f)](_0x173e03(0x182),_0x173e03(0x183)+CLI_BIN_NAME+_0x173e03(0x15f));const {buildConfigFromFlags:_0x18ae92}=await import('../../context.js'),{raw:_0x60a1ac}=_0x18ae92({});if(_0xf380bc['includes']('.')){const _0x501116=_0xf380bc[_0x173e03(0x197)]('.');let _0x1b02ac=_0x60a1ac;for(const _0xe86382 of _0x501116){if(_0x1b02ac==null||typeof _0x1b02ac!=='object')throw CliErrors[_0x173e03(0x16f)](_0x173e03(0x191)+_0xf380bc);_0x1b02ac=_0x1b02ac[_0xe86382];}if(_0x1b02ac===undefined)throw CliErrors['validation'](_0x173e03(0x191)+_0xf380bc);return console['log'](typeof _0x1b02ac===_0x173e03(0x17b)?JSON[_0x173e03(0x185)](_0x1b02ac,null,0x2):String(_0x1b02ac)),{'ok':!![]};}const _0x2d2927=_0x60a1ac[_0xf380bc];if(_0x2d2927===undefined)throw CliErrors[_0x173e03(0x16f)](_0x173e03(0x191)+_0xf380bc);return console[_0x173e03(0x163)](typeof _0x2d2927===_0x173e03(0x17b)?JSON[_0x173e03(0x185)](_0x2d2927,null,0x2):String(_0x2d2927)),{'ok':!![]};}},setDef={'service':a16_0x491b58(0x177),'command':a16_0x491b58(0x168),'description':a16_0x491b58(0x18e),'risk':a16_0x491b58(0x175),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a16_0x491b58(0x18c),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':'value','description':'Value\x20to\x20assign','required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x157f87){const _0x1584e3=a16_0x491b58,_0x1d51f7=_0x157f87[_0x1584e3(0x194)][0x0],_0x1370d4=_0x157f87[_0x1584e3(0x194)][0x1];if(!_0x1d51f7||_0x1370d4===undefined)throw CliErrors['validation'](_0x1584e3(0x172),_0x1584e3(0x183)+CLI_BIN_NAME+'\x20config\x20set\x20<key>\x20<value>\x20[--global]');if(ENUM_KEYS[_0x1d51f7]&&!ENUM_KEYS[_0x1d51f7][_0x1584e3(0x184)](_0x1370d4))throw CliErrors[_0x1584e3(0x16f)]('Invalid\x20value\x20for\x20\x22'+_0x1d51f7+'\x22.\x20Allowed:\x20'+ENUM_KEYS[_0x1d51f7][_0x1584e3(0x167)](',\x20'));if(_0x1d51f7===_0x1584e3(0x193))throw CliErrors['validation']('\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.');if(_0x1d51f7===_0x1584e3(0x18a)){const _0x3d87dd=Number(_0x1370d4);if(isNaN(_0x3d87dd)||_0x3d87dd<=0x0)throw CliErrors['validation'](_0x1584e3(0x180));}const _0x37ee4b=resolveWriteScope({'explicitGlobal':_0x157f87[_0x1584e3(0x188)](_0x1584e3(0x187)),'policy':_0x1584e3(0x196)}),_0x2fd2e7=toScopeFlags(_0x37ee4b),_0x194f85=readScopedConfig(_0x2fd2e7),_0x32e8ff=parseAliasAppcodeSetKey(_0x1d51f7);if(!_0x32e8ff&&!isTopLevelConfigKey(_0x1d51f7))throw CliErrors[_0x1584e3(0x16f)]('Top-level\x20key\x20\x22'+_0x1d51f7+_0x1584e3(0x186),'Settable\x20keys:\x20'+getTopLevelConfigKeySummary()+';\x20apps.<alias>.appcode');return _0x32e8ff?setLocalAppAlias(_0x194f85,_0x32e8ff,_0x1370d4):_0x194f85[_0x1d51f7]=_0x1d51f7===_0x1584e3(0x18a)?Number(_0x1370d4):_0x1370d4,console[_0x1584e3(0x163)](_0x1584e3(0x176)+_0x1d51f7+_0x1584e3(0x17d)+_0x1370d4+'\x22'+(_0x37ee4b==='global'?_0x1584e3(0x195):'')),writeScopedConfig(_0x194f85,_0x2fd2e7),{'ok':!![]};}},deleteDef={'service':a16_0x491b58(0x177),'command':a16_0x491b58(0x19c),'description':'Delete\x20a\x20config\x20value','risk':a16_0x491b58(0x175),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x5c0f2c){const _0x2425bf=a16_0x491b58,_0x3d8d1b=_0x5c0f2c['args'][0x0];if(!_0x3d8d1b)throw CliErrors['validation']('Missing\x20key\x20argument.',_0x2425bf(0x183)+CLI_BIN_NAME+_0x2425bf(0x198));const _0x2296ba=resolveWriteScope({'explicitGlobal':_0x5c0f2c[_0x2425bf(0x188)](_0x2425bf(0x187)),'policy':_0x2425bf(0x196)}),_0x56bc24=toScopeFlags(_0x2296ba),_0x425afa=readScopedConfig(_0x56bc24),_0x1bc9be=parseAliasDeleteKey(_0x3d8d1b);if(_0x1bc9be){if(!deleteLocalAppAlias(_0x425afa,_0x1bc9be))throw CliErrors[_0x2425bf(0x16f)]('Key\x20not\x20found:\x20'+_0x3d8d1b);return console[_0x2425bf(0x163)](_0x2425bf(0x164)+_0x3d8d1b+'`'+(_0x2296ba==='global'?_0x2425bf(0x195):'')),writeScopedConfig(_0x425afa,_0x56bc24),{'ok':!![]};}if(_0x425afa[_0x3d8d1b]===undefined)throw CliErrors['validation'](_0x2425bf(0x171)+_0x3d8d1b+_0x2425bf(0x15e));return delete _0x425afa[_0x3d8d1b],console['log'](_0x2425bf(0x164)+_0x3d8d1b+'`'+(_0x2296ba===_0x2425bf(0x187)?_0x2425bf(0x195):'')),writeScopedConfig(_0x425afa,_0x56bc24),{'ok':!![]};}};export const configDefinitions=[listDef,getDef,setDef,deleteDef];
1
+ const a17_0x1b0115=a17_0x5caf;function a17_0x1da7(){const _0x1f6092=['isArray','\x22\x20is\x20not\x20settable.','Invalid\x20value\x20for\x20\x22','keys','Config\x20files:\x0a','Usage:\x20','../../context.js','raw','Key\x20\x22','Value\x20to\x20assign','650079awwLUQ','899326zfcKKl','pretty','\x22.\x20Allowed:\x20','config','trim','global','appcode','pageSize\x20must\x20be\x20a\x20positive\x20number','Set\x20a\x20config\x20value','\x22\x20not\x20found\x20at\x20top\x20level.','read','#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a','Top-level\x20key\x20\x22','alias','2421234JmxDxX','\x20\x20global:\x20\x20','delete','5269128XwvbHH','\x20config\x20get\x20<key>','log','project-or-global-explicit','apps','Settable\x20keys:\x20','Write\x20to\x20global\x20config','10jXzxus','\x20config\x20delete\x20<key>\x20[--global]','7445081uVgAXs','includes','validation','length','107896MTnBQj','value','List\x20current\x20config','riskLevel',';\x20apps.<alias>.appcode','pageSize','write','stringify','get','bool','\x20(global)','\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.','Key\x20not\x20found:\x20','key','boolean','Deleted\x20`','Get\x20a\x20config\x20value','split','2804118VCXbNG','args','Delete\x20a\x20config\x20value','Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','field','object','765pYCEZj'];a17_0x1da7=function(){return _0x1f6092;};return a17_0x1da7();}(function(_0x3b1e3f,_0xab29b8){const _0x3e8b39=a17_0x5caf,_0x1a31c3=_0x3b1e3f();while(!![]){try{const _0x5185ec=parseInt(_0x3e8b39(0x193))/0x1+-parseInt(_0x3e8b39(0x194))/0x2+parseInt(_0x3e8b39(0x1a2))/0x3+-parseInt(_0x3e8b39(0x163))/0x4+-parseInt(_0x3e8b39(0x16a))/0x5*(parseInt(_0x3e8b39(0x182))/0x6)+parseInt(_0x3e8b39(0x16c))/0x7+parseInt(_0x3e8b39(0x170))/0x8*(parseInt(_0x3e8b39(0x188))/0x9);if(_0x5185ec===_0xab29b8)break;else _0x1a31c3['push'](_0x1a31c3['shift']());}catch(_0x244a89){_0x1a31c3['push'](_0x1a31c3['shift']());}}}(a17_0x1da7,0xebb6c));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME,ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeySummary,isTopLevelConfigKey,readScopedConfig,writeScopedConfig,resolveWriteScope,toScopeFlags}from'../../commands/config/shared.js';import{resolveWriteConfigPath,getProjectConfigPath}from'../../context.js';const GLOBAL_FLAG={'name':a17_0x1b0115(0x199),'type':a17_0x1b0115(0x17e),'description':a17_0x1b0115(0x169),'default':![]};function parseAliasAppcodeSetKey(_0x3717a5){const _0x214fcc=a17_0x1b0115,_0x3f95cd=_0x3717a5[_0x214fcc(0x181)]('.');if(_0x3f95cd[_0x214fcc(0x16f)]!==0x3||_0x3f95cd[0x0]!==_0x214fcc(0x167)||_0x3f95cd[0x2]!==_0x214fcc(0x19a))return undefined;const _0x5a7459=_0x3f95cd[0x1]?.[_0x214fcc(0x198)]();return _0x5a7459?_0x5a7459:undefined;}function a17_0x5caf(_0x93049d,_0x3e20c0){_0x93049d=_0x93049d-0x162;const _0x1da711=a17_0x1da7();let _0x5caf85=_0x1da711[_0x93049d];return _0x5caf85;}function parseAliasDeleteKey(_0x4bc835){const _0x463b15=a17_0x1b0115,_0x4bd6f7=_0x4bc835[_0x463b15(0x181)]('.');if(_0x4bd6f7[_0x463b15(0x16f)]===0x2&&_0x4bd6f7[0x0]===_0x463b15(0x167)){const _0x4309a7=_0x4bd6f7[0x1]?.[_0x463b15(0x198)]();return _0x4309a7?{'alias':_0x4309a7}:undefined;}if(_0x4bd6f7[_0x463b15(0x16f)]===0x3&&_0x4bd6f7[0x0]===_0x463b15(0x167)&&_0x4bd6f7[0x2]===_0x463b15(0x19a)){const _0x4dced4=_0x4bd6f7[0x1]?.['trim']();return _0x4dced4?{'alias':_0x4dced4,'field':'appcode'}:undefined;}return undefined;}function setLocalAppAlias(_0x59b37f,_0x410d1a,_0x1cb411){const _0x5320d6=a17_0x1b0115,_0x546ab6=_0x59b37f[_0x5320d6(0x167)]&&typeof _0x59b37f[_0x5320d6(0x167)]===_0x5320d6(0x187)&&!Array['isArray'](_0x59b37f[_0x5320d6(0x167)])?_0x59b37f[_0x5320d6(0x167)]:{},_0x1d8db3=_0x546ab6[_0x410d1a]&&typeof _0x546ab6[_0x410d1a]===_0x5320d6(0x187)&&!Array[_0x5320d6(0x189)](_0x546ab6[_0x410d1a])?_0x546ab6[_0x410d1a]:{};_0x1d8db3[_0x5320d6(0x19a)]=_0x1cb411,_0x546ab6[_0x410d1a]=_0x1d8db3,_0x59b37f['apps']=_0x546ab6;}function deleteLocalAppAlias(_0x3d8bda,_0x348770){const _0x1a7672=a17_0x1b0115;if(!_0x3d8bda[_0x1a7672(0x167)]||typeof _0x3d8bda[_0x1a7672(0x167)]!=='object'||Array[_0x1a7672(0x189)](_0x3d8bda[_0x1a7672(0x167)]))return![];const _0xa7cdf=_0x3d8bda['apps'],_0x387cc2=_0xa7cdf[_0x348770[_0x1a7672(0x1a1)]];if(!_0x387cc2||typeof _0x387cc2!==_0x1a7672(0x187)||Array[_0x1a7672(0x189)](_0x387cc2))return![];if(!_0x348770[_0x1a7672(0x186)])return delete _0xa7cdf[_0x348770[_0x1a7672(0x1a1)]],!![];if(!(_0x348770[_0x1a7672(0x186)]in _0x387cc2))return![];return delete _0x387cc2[_0x348770[_0x1a7672(0x186)]],Object[_0x1a7672(0x18c)](_0x387cc2)[_0x1a7672(0x16f)]===0x0&&delete _0xa7cdf[_0x348770[_0x1a7672(0x1a1)]],!![];}const listDef={'service':'config','command':'list','description':a17_0x1b0115(0x172),'risk':a17_0x1b0115(0x19e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x2e8433){const _0x4b30a2=a17_0x1b0115,{buildConfigFromFlags:_0x475824}=await import(_0x4b30a2(0x18f)),_0x1c34a5=_0x475824({}),_0x2a227c=getProjectConfigPath(),_0x2a858d=resolveWriteConfigPath(_0x4b30a2(0x199));if(_0x2e8433['format']===_0x4b30a2(0x195))return{'ok':!![],'message':_0x4b30a2(0x19f)+(JSON['stringify'](_0x1c34a5[_0x4b30a2(0x190)],null,0x2)+'\x0a\x0a')+_0x4b30a2(0x18d)+('\x20\x20project:\x20'+(_0x2a227c??'(none)')+'\x0a')+(_0x4b30a2(0x1a3)+_0x2a858d)};return{'ok':!![],'data':{'effective':_0x1c34a5[_0x4b30a2(0x190)],'configFiles':{'project':_0x2a227c??null,'global':_0x2a858d}}};}},getDef={'service':'config','command':a17_0x1b0115(0x178),'description':a17_0x1b0115(0x180),'risk':a17_0x1b0115(0x19e),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':a17_0x1b0115(0x185),'required':!![]}],'flags':[],async 'execute'(_0xff19a2){const _0x55f2e4=a17_0x1b0115,_0x139499=_0xff19a2[_0x55f2e4(0x183)][0x0];if(!_0x139499)throw CliErrors['validation']('Missing\x20key\x20argument.',_0x55f2e4(0x18e)+CLI_BIN_NAME+_0x55f2e4(0x164));const {buildConfigFromFlags:_0x4f5321}=await import(_0x55f2e4(0x18f)),{raw:_0x14eed6}=_0x4f5321({});if(_0x139499['includes']('.')){const _0x55a64d=_0x139499[_0x55f2e4(0x181)]('.');let _0x51f903=_0x14eed6;for(const _0x175bd0 of _0x55a64d){if(_0x51f903==null||typeof _0x51f903!==_0x55f2e4(0x187))throw CliErrors[_0x55f2e4(0x16e)](_0x55f2e4(0x17c)+_0x139499);_0x51f903=_0x51f903[_0x175bd0];}if(_0x51f903===undefined)throw CliErrors[_0x55f2e4(0x16e)](_0x55f2e4(0x17c)+_0x139499);return console[_0x55f2e4(0x165)](typeof _0x51f903===_0x55f2e4(0x187)?JSON[_0x55f2e4(0x177)](_0x51f903,null,0x2):String(_0x51f903)),{'ok':!![]};}const _0xa6fce1=_0x14eed6[_0x139499];if(_0xa6fce1===undefined)throw CliErrors['validation'](_0x55f2e4(0x17c)+_0x139499);return console[_0x55f2e4(0x165)](typeof _0xa6fce1==='object'?JSON['stringify'](_0xa6fce1,null,0x2):String(_0xa6fce1)),{'ok':!![]};}},setDef={'service':a17_0x1b0115(0x197),'command':'set','description':a17_0x1b0115(0x19c),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a17_0x1b0115(0x17d),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a17_0x1b0115(0x171),'description':a17_0x1b0115(0x192),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x20b954){const _0x8c52e3=a17_0x1b0115,_0x328fad=_0x20b954['args'][0x0],_0x4e7f27=_0x20b954[_0x8c52e3(0x183)][0x1];if(!_0x328fad||_0x4e7f27===undefined)throw CliErrors[_0x8c52e3(0x16e)]('Missing\x20key\x20or\x20value.',_0x8c52e3(0x18e)+CLI_BIN_NAME+'\x20config\x20set\x20<key>\x20<value>\x20[--global]');if(ENUM_KEYS[_0x328fad]&&!ENUM_KEYS[_0x328fad][_0x8c52e3(0x16d)](_0x4e7f27))throw CliErrors[_0x8c52e3(0x16e)](_0x8c52e3(0x18b)+_0x328fad+_0x8c52e3(0x196)+ENUM_KEYS[_0x328fad]['join'](',\x20'));if(_0x328fad===_0x8c52e3(0x173))throw CliErrors[_0x8c52e3(0x16e)](_0x8c52e3(0x17b));if(_0x328fad===_0x8c52e3(0x175)){const _0xf78a5=Number(_0x4e7f27);if(isNaN(_0xf78a5)||_0xf78a5<=0x0)throw CliErrors[_0x8c52e3(0x16e)](_0x8c52e3(0x19b));}const _0x3ab2ac=resolveWriteScope({'explicitGlobal':_0x20b954['bool'](_0x8c52e3(0x199)),'policy':_0x8c52e3(0x166)}),_0x4e00cb=toScopeFlags(_0x3ab2ac),_0x228067=readScopedConfig(_0x4e00cb),_0x7637b6=parseAliasAppcodeSetKey(_0x328fad);if(!_0x7637b6&&!isTopLevelConfigKey(_0x328fad))throw CliErrors[_0x8c52e3(0x16e)](_0x8c52e3(0x1a0)+_0x328fad+_0x8c52e3(0x18a),_0x8c52e3(0x168)+getTopLevelConfigKeySummary()+_0x8c52e3(0x174));return _0x7637b6?setLocalAppAlias(_0x228067,_0x7637b6,_0x4e7f27):_0x228067[_0x328fad]=_0x328fad===_0x8c52e3(0x175)?Number(_0x4e7f27):_0x4e7f27,console['log']('Set\x20`'+_0x328fad+'`\x20=\x20\x22'+_0x4e7f27+'\x22'+(_0x3ab2ac===_0x8c52e3(0x199)?_0x8c52e3(0x17a):'')),writeScopedConfig(_0x228067,_0x4e00cb),{'ok':!![]};}},deleteDef={'service':'config','command':a17_0x1b0115(0x162),'description':a17_0x1b0115(0x184),'risk':a17_0x1b0115(0x176),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a17_0x1b0115(0x17d),'description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x463518){const _0x112109=a17_0x1b0115,_0x7a3dc8=_0x463518[_0x112109(0x183)][0x0];if(!_0x7a3dc8)throw CliErrors[_0x112109(0x16e)]('Missing\x20key\x20argument.',_0x112109(0x18e)+CLI_BIN_NAME+_0x112109(0x16b));const _0x7bc839=resolveWriteScope({'explicitGlobal':_0x463518[_0x112109(0x179)]('global'),'policy':_0x112109(0x166)}),_0x371508=toScopeFlags(_0x7bc839),_0x1d8038=readScopedConfig(_0x371508),_0x33d106=parseAliasDeleteKey(_0x7a3dc8);if(_0x33d106){if(!deleteLocalAppAlias(_0x1d8038,_0x33d106))throw CliErrors[_0x112109(0x16e)]('Key\x20not\x20found:\x20'+_0x7a3dc8);return console[_0x112109(0x165)]('Deleted\x20`'+_0x7a3dc8+'`'+(_0x7bc839===_0x112109(0x199)?_0x112109(0x17a):'')),writeScopedConfig(_0x1d8038,_0x371508),{'ok':!![]};}if(_0x1d8038[_0x7a3dc8]===undefined)throw CliErrors[_0x112109(0x16e)](_0x112109(0x191)+_0x7a3dc8+_0x112109(0x19d));return delete _0x1d8038[_0x7a3dc8],console[_0x112109(0x165)](_0x112109(0x17f)+_0x7a3dc8+'`'+(_0x7bc839===_0x112109(0x199)?_0x112109(0x17a):'')),writeScopedConfig(_0x1d8038,_0x371508),{'ok':!![]};}};export const configDefinitions=[listDef,getDef,setDef,deleteDef];
@@ -1 +1 @@
1
- (function(_0x2b5062,_0x4fa94a){var _0x47fd3f=a17_0x26b3,_0x3d727c=_0x2b5062();while(!![]){try{var _0x139f88=-parseInt(_0x47fd3f(0x1a3))/0x1*(parseInt(_0x47fd3f(0x1a7))/0x2)+parseInt(_0x47fd3f(0x1a5))/0x3*(-parseInt(_0x47fd3f(0x1a8))/0x4)+-parseInt(_0x47fd3f(0x1a9))/0x5+-parseInt(_0x47fd3f(0x1a0))/0x6+-parseInt(_0x47fd3f(0x1a2))/0x7+parseInt(_0x47fd3f(0x1a4))/0x8*(parseInt(_0x47fd3f(0x1a1))/0x9)+parseInt(_0x47fd3f(0x19f))/0xa*(parseInt(_0x47fd3f(0x1a6))/0xb);if(_0x139f88===_0x4fa94a)break;else _0x3d727c['push'](_0x3d727c['shift']());}catch(_0x2fce3a){_0x3d727c['push'](_0x3d727c['shift']());}}}(a17_0xc527,0x7655e));import{CLI_BIN_NAME}from'../../constant/cli.js';function a17_0x26b3(_0x4628b3,_0x491b05){_0x4628b3=_0x4628b3-0x19f;var _0xc5273d=a17_0xc527();var _0x26b390=_0xc5273d[_0x4628b3];return _0x26b390;}export{CLI_BIN_NAME};export{readScopedConfig,writeScopedConfig}from'../../context.js';function a17_0xc527(){var _0x215137=['5934952lIFfOh','44001HxYIjV','18786977ZLEHcp','182548vjyBXX','12laluwN','2710970eKrdbt','10jxaEKj','2001426vrSdxM','9uWkTQP','2844730tJXJfG','7YcRBQo'];a17_0xc527=function(){return _0x215137;};return a17_0xc527();}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(_0x86730a,_0x1ed96e){var _0x2ac0f6=a18_0x3b7a,_0x490a2f=_0x86730a();while(!![]){try{var _0x513e2a=-parseInt(_0x2ac0f6(0x127))/0x1*(-parseInt(_0x2ac0f6(0x125))/0x2)+-parseInt(_0x2ac0f6(0x124))/0x3+parseInt(_0x2ac0f6(0x12c))/0x4+parseInt(_0x2ac0f6(0x12b))/0x5+parseInt(_0x2ac0f6(0x12a))/0x6*(parseInt(_0x2ac0f6(0x126))/0x7)+parseInt(_0x2ac0f6(0x128))/0x8+-parseInt(_0x2ac0f6(0x129))/0x9;if(_0x513e2a===_0x1ed96e)break;else _0x490a2f['push'](_0x490a2f['shift']());}catch(_0x118e14){_0x490a2f['push'](_0x490a2f['shift']());}}}(a18_0x1539,0xa25f2));import{CLI_BIN_NAME}from'../../constant/cli.js';function a18_0x3b7a(_0x5dec91,_0x2489fe){_0x5dec91=_0x5dec91-0x124;var _0x15395d=a18_0x1539();var _0x3b7aa4=_0x15395d[_0x5dec91];return _0x3b7aa4;}export{CLI_BIN_NAME};export{readScopedConfig,writeScopedConfig}from'../../context.js';function a18_0x1539(){var _0x4a9baa=['4183655ewoWoX','1023032SokPuG','2328726cfWJsW','46WxiLMW','1961267IyKaro','45923etJnAL','6749384papSyQ','19002933wXtPJe','12loHahA'];a18_0x1539=function(){return _0x4a9baa;};return a18_0x1539();}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
- function a18_0x84fe(_0x2c0f53,_0x18ecc7){_0x2c0f53=_0x2c0f53-0x179;const _0x268342=a18_0x2683();let _0x84fee0=_0x268342[_0x2c0f53];return _0x84fee0;}const a18_0x2db958=a18_0x84fe;(function(_0x293acc,_0x1a5aea){const _0x4784f6=a18_0x84fe,_0x240410=_0x293acc();while(!![]){try{const _0x3e6efd=-parseInt(_0x4784f6(0x1a7))/0x1*(-parseInt(_0x4784f6(0x1c2))/0x2)+-parseInt(_0x4784f6(0x199))/0x3*(-parseInt(_0x4784f6(0x198))/0x4)+-parseInt(_0x4784f6(0x1ad))/0x5+parseInt(_0x4784f6(0x18e))/0x6*(parseInt(_0x4784f6(0x1cb))/0x7)+parseInt(_0x4784f6(0x17a))/0x8+-parseInt(_0x4784f6(0x19b))/0x9+parseInt(_0x4784f6(0x191))/0xa*(-parseInt(_0x4784f6(0x185))/0xb);if(_0x3e6efd===_0x1a5aea)break;else _0x240410['push'](_0x240410['shift']());}catch(_0x57cf3e){_0x240410['push'](_0x240410['shift']());}}}(a18_0x2683,0xd278e));import{executeData}from'../../core/sdk-client.js';import{CODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';import{requireAnyOf}from'../../commands/common/constraints.js';import{parseJsonParams,parseJsonParamsValue,parseBatchCreateItemsFromParams}from'../../utils/params.js';import{dryRun}from'../../framework/dryrun.js';const specs=[{'command':a18_0x2db958(0x18b),'operation':a18_0x2db958(0x18b),'risk':a18_0x2db958(0x17b),'paramsRequired':![],'description':a18_0x2db958(0x1a3),'paramsHint':'JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20'+a18_0x2db958(0x17e),'helpExtra':[a18_0x2db958(0x1bc),a18_0x2db958(0x1af),a18_0x2db958(0x1cc),a18_0x2db958(0x193),a18_0x2db958(0x1a0),a18_0x2db958(0x1a1),a18_0x2db958(0x1c3),a18_0x2db958(0x1a5),a18_0x2db958(0x1ba),'\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}}',a18_0x2db958(0x19a),'',a18_0x2db958(0x182),a18_0x2db958(0x1b1),'\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}}]}','',a18_0x2db958(0x1b6),a18_0x2db958(0x19e),a18_0x2db958(0x1c1),a18_0x2db958(0x1aa),a18_0x2db958(0x1bf),'\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','',a18_0x2db958(0x1ac),a18_0x2db958(0x1bd),'\x20\x20\x20\x20Correct:\x20\x20--params\x20\x27{\x22currentPage\x22:1,\x22pageSize\x22:10}\x27',a18_0x2db958(0x1b3)][a18_0x2db958(0x196)]('\x0a')},{'command':a18_0x2db958(0x1ce),'operation':a18_0x2db958(0x1ce),'risk':a18_0x2db958(0x17b),'paramsRequired':!![],'description':a18_0x2db958(0x1be),'paramsHint':'JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'},{'command':a18_0x2db958(0x1ca),'operation':a18_0x2db958(0x1ca),'risk':'write','paramsRequired':!![],'description':a18_0x2db958(0x195),'paramsHint':a18_0x2db958(0x187)},{'command':a18_0x2db958(0x1a2),'operation':a18_0x2db958(0x1a2),'risk':'write','paramsRequired':!![],'description':'Create\x20multiple\x20records\x20in\x20one\x20request\x20(SDK\x20batchCreate)','paramsHint':'JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27'},{'command':a18_0x2db958(0x17f),'operation':'update','risk':a18_0x2db958(0x1c5),'paramsRequired':!![],'description':a18_0x2db958(0x18a),'paramsHint':a18_0x2db958(0x19d)},{'command':a18_0x2db958(0x183),'operation':'delete','risk':'high-risk-write','paramsRequired':!![],'description':a18_0x2db958(0x190),'paramsHint':a18_0x2db958(0x1c6)},{'command':'aggregate','operation':a18_0x2db958(0x1cd),'risk':a18_0x2db958(0x17b),'paramsRequired':![],'description':a18_0x2db958(0x1b4),'paramsHint':a18_0x2db958(0x1bb)+'Example:\x20\x27{\x22aggregate\x22:[{\x22field\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','helpExtra':[a18_0x2db958(0x19f),'\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}',a18_0x2db958(0x181),a18_0x2db958(0x1c7),a18_0x2db958(0x186),a18_0x2db958(0x1c8),a18_0x2db958(0x179),'\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}','',a18_0x2db958(0x1c4),a18_0x2db958(0x192),'\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)',a18_0x2db958(0x188),a18_0x2db958(0x1b9),a18_0x2db958(0x1b8),a18_0x2db958(0x1a4),'','\x20\x20EXAMPLES',a18_0x2db958(0x1ae),a18_0x2db958(0x180),'',a18_0x2db958(0x189),a18_0x2db958(0x1a6)][a18_0x2db958(0x196)]('\x0a')}];function makeDataCommand(_0x5a7695){const _0x9b55bf=a18_0x2db958,_0x3cd155=_0x9b55bf(0x1c9)+_0x5a7695['command'],_0x55f3f2={'service':_0x9b55bf(0x18f),'command':_0x5a7695['command'],'description':_0x5a7695[_0x9b55bf(0x1c0)],'risk':_0x5a7695[_0x9b55bf(0x18d)],'helpExtra':_0x5a7695[_0x9b55bf(0x1a8)],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x5a7695[_0x9b55bf(0x1ab)]}],'validate':async _0x541755=>{const _0x128050=_0x9b55bf;_0x5a7695[_0x128050(0x17c)]&&requireAnyOf(_0x541755,[_0x128050(0x1a9)],_0x3cd155),_0x5a7695['operation']==='batchCreate'&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x541755[_0x128050(0x1b7)](_0x128050(0x1a9))));},async 'execute'(_0x2f63dc){const _0x383560=_0x9b55bf,_0x4949f1=_0x2f63dc['str'](_0x383560(0x1b5)),_0x114832=_0x5a7695[_0x383560(0x194)]===_0x383560(0x1a2)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x2f63dc[_0x383560(0x1b7)]('params'))):parseJsonParams(_0x2f63dc['str']('params'))??{},_0x16165c=Date[_0x383560(0x19c)](),_0x41851e=await executeData(_0x4949f1,_0x5a7695[_0x383560(0x194)],_0x114832),_0x56a8ed=Date[_0x383560(0x19c)]()-_0x16165c;return{'ok':!![],'data':{'result':_0x41851e,'elapsed':_0x56a8ed},'message':_0x383560(0x1c9)+_0x5a7695[_0x383560(0x17d)]+'\x20completed\x20in\x20'+_0x56a8ed+'ms'};}};return _0x5a7695['risk']!=='read'&&(_0x55f3f2[_0x9b55bf(0x184)]=async _0x3fb643=>{const _0x1a8676=_0x9b55bf,_0x3560f9=_0x3fb643['str'](_0x1a8676(0x1b5)),_0x3b0dc3=_0x5a7695['operation']==='batchCreate'?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x3fb643[_0x1a8676(0x1b7)](_0x1a8676(0x1a9)))):parseJsonParams(_0x3fb643[_0x1a8676(0x1b7)](_0x1a8676(0x1a9)))??{};return dryRun(_0x1a8676(0x18c),_0x1a8676(0x1b0)+_0x3560f9+'/'+_0x5a7695[_0x1a8676(0x194)])['body'](_0x3b0dc3)['description']('Preview:\x20data\x20'+_0x5a7695[_0x1a8676(0x17d)]+_0x1a8676(0x197)+_0x3560f9)[_0x1a8676(0x1b2)]();}),_0x55f3f2;}function a18_0x2683(){const _0x20bc9b=['data','Delete\x20a\x20record\x20(requires\x20--yes\x20in\x20non-interactive)','17084810BXVGIT','\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$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}}','operation','Create\x20a\x20new\x20record\x20in\x20a\x20dataset','join','\x20on\x20dataset\x20','1868592bSwuah','3EpQkjA','\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}}','634140AkvOWd','now','JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20Example:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)','\x20\x20AGGREGATE\x20TYPES','\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$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}}','batchCreate','Filter\x20dataset\x20records\x20with\x20query\x20conditions','\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]}}','\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','1662Zboalw','helpExtra','params','\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}]','paramsHint','\x20\x20PAGINATION','1435495QOvCax','\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status','\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}}','/api/{appCode}/','\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}}]}','build','\x20\x20\x20\x20Wrong:\x20\x20\x20\x20--page-size\x2010\x20\x20(this\x20is\x20not\x20a\x20valid\x20flag)','Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','code','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','str','\x20\x20\x20\x20having\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Post-aggregation\x20filter,\x20e.g.\x20{\x22total\x22:{\x22$gt\x22:1000}}','\x20\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]','\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}}','JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20','\x20\x20WHERE\x20OPERATORS','\x20\x20\x20\x20Pagination\x20is\x20controlled\x20via\x20JSON\x20in\x20--params.\x20Do\x20NOT\x20use\x20--page-size\x20as\x20a\x20CLI\x20flag.','Get\x20a\x20single\x20record\x20by\x20ID','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','description','\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]','1906NkLzQE','\x20\x20\x20\x20$lte\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20or\x20equal\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lte\x22:1000}}','\x20\x20PARAMS\x20STRUCTURE','write','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','\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\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}','data\x20','create','2999528uqNCvM','\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}}','aggregate','getOne','\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}','6972520fZiiag','read','paramsRequired','command','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','update','\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22field\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20of\x20records\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22field\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}','\x20\x20LOGICAL\x20COMBINATORS','delete','dryRun','22ssJxTW','\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\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter','Update\x20an\x20existing\x20record','filter','POST','risk','24JKhyok'];a18_0x2683=function(){return _0x20bc9b;};return a18_0x2683();}export const dataDefinitions=specs['map'](makeDataCommand);
1
+ function a19_0x5943(){const _0xe30dee=['Preview:\x20data\x20','build','\x20\x20EXAMPLES','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','\x20\x20\x20\x20Correct:\x20\x20--params\x20\x27{\x22currentPage\x22:1,\x22pageSize\x22:10}\x27','\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}}','batchCreate','\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','now','\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$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}}','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{\x22column\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg_score\x22}','\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}}','448018HQzzGa','\x20\x20PARAMS\x20STRUCTURE','235972tAttdk','\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}}]}','dryRun','\x20on\x20dataset\x20','\x20\x20\x20\x20SUM\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Sum\x20of\x20column\x20values\x20\x20\x20\x20\x20{\x22column\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\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{\x22column\x22:\x22price\x22,\x22type\x22:\x22MIN\x22,\x22alias\x22:\x22min_price\x22}','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','4149150dvdXXV','2758680hKXePx','2620108wNQTSN','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','9200eSoAGy','Create\x20multiple\x20records\x20in\x20one\x20request\x20(SDK\x20batchCreate)','str','delete','JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20Example:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27','body','JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','join','\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{\x22column\x22:\x22price\x22,\x22type\x22:\x22MAX\x22,\x22alias\x22:\x22max_price\x22}','description','update','Filter\x20dataset\x20records\x20with\x20query\x20conditions','\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status','\x20\x20\x20\x20Wrong:\x20\x20\x20\x20--page-size\x2010\x20\x20(this\x20is\x20not\x20a\x20valid\x20flag)','\x20\x20LOGICAL\x20COMBINATORS','\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\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','Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','5504031EWuzBX','params','\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]','JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20','code','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)','create','\x20\x20WHERE\x20OPERATORS','\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\x20AGGREGATE\x20TYPES','data\x20','\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20distinct\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22,\x22distinct\x22:true}','JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','command','5aIyKHk','high-risk-write','\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\x20Pagination\x20is\x20controlled\x20via\x20JSON\x20in\x20--params.\x20Do\x20NOT\x20use\x20--page-size\x20as\x20a\x20CLI\x20flag.','\x20\x20\x20\x20$endWith\x20\x20\x20\x20\x20Ends\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22email\x22:{\x22$endWith\x22:\x22@example.com\x22}}','risk','5887qTYYqG','data','\x20\x20\x20\x20COUNT\x20\x20\x20\x20\x20\x20\x20\x20Count\x20of\x20records\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}','write','\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{\x22column\x22:\x22score\x22,\x22type\x22:\x22AVG\x22,\x22alias\x22:\x22avg\x22,\x22round\x22:true,\x22precision\x22:2}','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter','/api/{appCode}/','operation','Example:\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x20\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20','\x20\x20\x20\x20having\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Post-aggregation\x20filters,\x20e.g.\x20[{\x22columnName\x22:\x22total\x22,\x22condition\x22:{\x22$gt\x22:1000}}]','getOne','read','\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]}}','\x20completed\x20in\x20','Update\x20an\x20existing\x20record','Create\x20a\x20new\x20record\x20in\x20a\x20dataset'];a19_0x5943=function(){return _0xe30dee;};return a19_0x5943();}const a19_0x11b3a5=a19_0x5439;(function(_0x311b12,_0x578170){const _0x33f190=a19_0x5439,_0x4b0aea=_0x311b12();while(!![]){try{const _0x5e44f3=parseInt(_0x33f190(0x1cc))/0x1+parseInt(_0x33f190(0x1ca))/0x2+-parseInt(_0x33f190(0x1d5))/0x3+parseInt(_0x33f190(0x1d6))/0x4+parseInt(_0x33f190(0x1f7))/0x5*(parseInt(_0x33f190(0x1d4))/0x6)+-parseInt(_0x33f190(0x1ab))/0x7*(parseInt(_0x33f190(0x1d8))/0x8)+parseInt(_0x33f190(0x1e9))/0x9;if(_0x5e44f3===_0x578170)break;else _0x4b0aea['push'](_0x4b0aea['shift']());}catch(_0x578859){_0x4b0aea['push'](_0x4b0aea['shift']());}}}(a19_0x5943,0x81bb6));import{executeData}from'../../core/sdk-client.js';import{CODE_FLAG,PARAMS_FLAG}from'../../commands/common/flags.js';function a19_0x5439(_0x2a1463,_0x1c7c7a){_0x2a1463=_0x2a1463-0x1ab;const _0x5943df=a19_0x5943();let _0x54396c=_0x5943df[_0x2a1463];return _0x54396c;}import{requireAnyOf}from'../../commands/common/constraints.js';import{parseJsonParams,parseJsonParamsValue,parseBatchCreateItemsFromParams}from'../../utils/params.js';import{dryRun}from'../../framework/dryrun.js';const specs=[{'command':a19_0x11b3a5(0x1c7),'operation':a19_0x11b3a5(0x1c7),'risk':'read','paramsRequired':![],'description':a19_0x11b3a5(0x1e3),'paramsHint':a19_0x11b3a5(0x1b4)+a19_0x11b3a5(0x1d2),'helpExtra':[a19_0x11b3a5(0x1f0),'\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}}',a19_0x11b3a5(0x1f9),'\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}}',a19_0x11b3a5(0x1c9),a19_0x11b3a5(0x1c6),a19_0x11b3a5(0x1c1),a19_0x11b3a5(0x1b8),a19_0x11b3a5(0x1f1),a19_0x11b3a5(0x1c5),a19_0x11b3a5(0x1fb),'',a19_0x11b3a5(0x1e6),'\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}}]}',a19_0x11b3a5(0x1cd),'','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)',a19_0x11b3a5(0x1eb),'\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}]',a19_0x11b3a5(0x1d3),'\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','','\x20\x20PAGINATION',a19_0x11b3a5(0x1fa),a19_0x11b3a5(0x1c0),a19_0x11b3a5(0x1e5)][a19_0x11b3a5(0x1df)]('\x0a')},{'command':a19_0x11b3a5(0x1b6),'operation':a19_0x11b3a5(0x1b6),'risk':'read','paramsRequired':!![],'description':'Get\x20a\x20single\x20record\x20by\x20ID','paramsHint':'JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'},{'command':a19_0x11b3a5(0x1ef),'operation':a19_0x11b3a5(0x1ef),'risk':a19_0x11b3a5(0x1ae),'paramsRequired':!![],'description':a19_0x11b3a5(0x1bb),'paramsHint':a19_0x11b3a5(0x1f5)},{'command':a19_0x11b3a5(0x1c2),'operation':a19_0x11b3a5(0x1c2),'risk':'write','paramsRequired':!![],'description':a19_0x11b3a5(0x1d9),'paramsHint':a19_0x11b3a5(0x1de)},{'command':a19_0x11b3a5(0x1e2),'operation':'update','risk':a19_0x11b3a5(0x1ae),'paramsRequired':!![],'description':a19_0x11b3a5(0x1ba),'paramsHint':a19_0x11b3a5(0x1dc)},{'command':a19_0x11b3a5(0x1db),'operation':'delete','risk':a19_0x11b3a5(0x1f8),'paramsRequired':!![],'description':'Delete\x20a\x20record\x20(requires\x20--yes\x20in\x20non-interactive)','paramsHint':a19_0x11b3a5(0x1bf)},{'command':'aggregate','operation':'aggregate','risk':a19_0x11b3a5(0x1b7),'paramsRequired':![],'description':a19_0x11b3a5(0x1e8),'paramsHint':a19_0x11b3a5(0x1ec)+a19_0x11b3a5(0x1b3),'helpExtra':[a19_0x11b3a5(0x1f2),a19_0x11b3a5(0x1d0),a19_0x11b3a5(0x1ad),a19_0x11b3a5(0x1f4),a19_0x11b3a5(0x1c8),a19_0x11b3a5(0x1af),a19_0x11b3a5(0x1e0),a19_0x11b3a5(0x1d1),'',a19_0x11b3a5(0x1cb),'\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]',a19_0x11b3a5(0x1d7),a19_0x11b3a5(0x1ee),'\x20\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]',a19_0x11b3a5(0x1b5),'\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22total\x22:\x22desc\x22}]','',a19_0x11b3a5(0x1be),a19_0x11b3a5(0x1e4),a19_0x11b3a5(0x1c3),'',a19_0x11b3a5(0x1b0),a19_0x11b3a5(0x1e7),'','\x20\x20\x20\x20#\x20`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.'][a19_0x11b3a5(0x1df)]('\x0a')}];function makeDataCommand(_0x582b9f){const _0x1fc9aa=a19_0x11b3a5,_0x1ea818=_0x1fc9aa(0x1f3)+_0x582b9f['command'],_0x5b4e4e={'service':_0x1fc9aa(0x1ac),'command':_0x582b9f[_0x1fc9aa(0x1f6)],'description':_0x582b9f[_0x1fc9aa(0x1e1)],'risk':_0x582b9f[_0x1fc9aa(0x1fc)],'helpExtra':_0x582b9f['helpExtra'],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x582b9f['paramsHint']}],'validate':async _0x506670=>{const _0x53e05c=_0x1fc9aa;_0x582b9f['paramsRequired']&&requireAnyOf(_0x506670,['params'],_0x1ea818),_0x582b9f[_0x53e05c(0x1b2)]===_0x53e05c(0x1c2)&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x506670['str']('params')));},async 'execute'(_0x2908d5){const _0x930f=_0x1fc9aa,_0x17db29=_0x2908d5['str']('code'),_0xf6ffbc=_0x582b9f['operation']===_0x930f(0x1c2)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x2908d5[_0x930f(0x1da)]('params'))):parseJsonParams(_0x2908d5['str'](_0x930f(0x1ea)))??{},_0x43760d=Date[_0x930f(0x1c4)](),_0x42d464=await executeData(_0x17db29,_0x582b9f['operation'],_0xf6ffbc),_0x30be61=Date[_0x930f(0x1c4)]()-_0x43760d;return{'ok':!![],'data':{'result':_0x42d464,'elapsed':_0x30be61},'message':'data\x20'+_0x582b9f[_0x930f(0x1f6)]+_0x930f(0x1b9)+_0x30be61+'ms'};}};return _0x582b9f['risk']!==_0x1fc9aa(0x1b7)&&(_0x5b4e4e[_0x1fc9aa(0x1ce)]=async _0x45d906=>{const _0x1204f9=_0x1fc9aa,_0x567cda=_0x45d906[_0x1204f9(0x1da)](_0x1204f9(0x1ed)),_0xbe8f6c=_0x582b9f[_0x1204f9(0x1b2)]===_0x1204f9(0x1c2)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x45d906[_0x1204f9(0x1da)](_0x1204f9(0x1ea)))):parseJsonParams(_0x45d906[_0x1204f9(0x1da)](_0x1204f9(0x1ea)))??{};return dryRun('POST',_0x1204f9(0x1b1)+_0x567cda+'/'+_0x582b9f[_0x1204f9(0x1b2)])[_0x1204f9(0x1dd)](_0xbe8f6c)[_0x1204f9(0x1e1)](_0x1204f9(0x1bc)+_0x582b9f[_0x1204f9(0x1f6)]+_0x1204f9(0x1cf)+_0x567cda)[_0x1204f9(0x1bd)]();}),_0x5b4e4e;}export const dataDefinitions=specs['map'](makeDataCommand);
@@ -1 +1 @@
1
- const a19_0xa6ed2e=a19_0x1b27;(function(_0x37a23c,_0x20c9b4){const _0x252837=a19_0x1b27,_0x3a0abc=_0x37a23c();while(!![]){try{const _0x38deaf=-parseInt(_0x252837(0x160))/0x1+parseInt(_0x252837(0x16b))/0x2+-parseInt(_0x252837(0x148))/0x3+-parseInt(_0x252837(0x16a))/0x4+-parseInt(_0x252837(0x135))/0x5*(-parseInt(_0x252837(0x13c))/0x6)+parseInt(_0x252837(0x163))/0x7*(-parseInt(_0x252837(0x150))/0x8)+parseInt(_0x252837(0x170))/0x9;if(_0x38deaf===_0x20c9b4)break;else _0x3a0abc['push'](_0x3a0abc['shift']());}catch(_0x21a600){_0x3a0abc['push'](_0x3a0abc['shift']());}}}(a19_0x502e,0x7cd31));function a19_0x1b27(_0x366197,_0x2b0696){_0x366197=_0x366197-0x12c;const _0x502e96=a19_0x502e();let _0x1b27c2=_0x502e96[_0x366197];return _0x1b27c2;}import{getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';function normalizeField(_0x3a4579){const _0x49330a=a19_0x1b27;if(_0x3a4579['deleted'])return null;const _0x5ee3f9=Boolean(_0x3a4579[_0x49330a(0x15a)]!==undefined||_0x3a4579[_0x49330a(0x156)]!==undefined);let _0x2b8bbe={};if(!_0x5ee3f9&&typeof _0x3a4579['extend']==='string')try{_0x2b8bbe=JSON['parse'](_0x3a4579['extend']);}catch{}const _0x1dae95=_0x5ee3f9?_0x3a4579[_0x49330a(0x136)]:_0x3a4579[_0x49330a(0x15e)],_0xb4e1b=_0x5ee3f9?_0x3a4579['displayName']:_0x3a4579[_0x49330a(0x136)],_0x1b9b24=_0x5ee3f9?_0x3a4579[_0x49330a(0x156)]:_0x3a4579[_0x49330a(0x158)]||_0x3a4579[_0x49330a(0x159)],_0x33b8b4=_0x5ee3f9?_0x3a4579[_0x49330a(0x12e)]===!![]:_0x2b8bbe[_0x49330a(0x12e)]===!![],_0x4a2819=_0x5ee3f9?_0x3a4579[_0x49330a(0x13f)]===!![]:_0x2b8bbe[_0x49330a(0x13f)]===!![],_0x33a18b=_0x5ee3f9?_0x3a4579[_0x49330a(0x139)]??null:_0x2b8bbe['options']??null,_0x17fcf0={'name':_0x1dae95,'displayName':_0xb4e1b||_0x1dae95,'type':_0x1b9b24,'dbType':_0x3a4579['dbType'],'pk':_0x33b8b4,'required':_0x4a2819,'description':_0x3a4579[_0x49330a(0x15f)]||undefined};return Array['isArray'](_0x33a18b)&&_0x33a18b['length']>0x0&&(_0x17fcf0[_0x49330a(0x139)]=_0x33a18b),_0x17fcf0;}function parseJsonMaybe(_0x1eb517){const _0xb6bde4=a19_0x1b27;if(typeof _0x1eb517!==_0xb6bde4(0x133))return _0x1eb517;try{return JSON[_0xb6bde4(0x145)](_0x1eb517);}catch{return _0x1eb517;}}function normalizeOperationEntry(_0x340b21,_0x582b74){const _0x2896ed=a19_0x1b27;if(!_0x582b74||typeof _0x582b74!==_0x2896ed(0x14e))return null;if(!_0x582b74[_0x2896ed(0x12d)]||!_0x582b74[_0x2896ed(0x146)])return null;const _0x728fe3={'name':_0x340b21,'method':_0x582b74[_0x2896ed(0x12d)],'path':_0x582b74[_0x2896ed(0x146)]};if(_0x582b74[_0x2896ed(0x140)])_0x728fe3[_0x2896ed(0x140)]=_0x582b74[_0x2896ed(0x140)];if(_0x582b74[_0x2896ed(0x14f)]!=null)_0x728fe3[_0x2896ed(0x14f)]=parseJsonMaybe(_0x582b74[_0x2896ed(0x14f)]);if(_0x582b74['responseBody']!=null)_0x728fe3[_0x2896ed(0x14b)]=parseJsonMaybe(_0x582b74[_0x2896ed(0x14b)]);if(_0x582b74[_0x2896ed(0x165)]!=null)_0x728fe3[_0x2896ed(0x165)]=_0x582b74[_0x2896ed(0x165)];if(_0x582b74[_0x2896ed(0x15d)]!=null)_0x728fe3[_0x2896ed(0x15d)]=_0x582b74[_0x2896ed(0x15d)];if(Array[_0x2896ed(0x137)](_0x582b74[_0x2896ed(0x16c)]))_0x728fe3[_0x2896ed(0x16c)]=_0x582b74[_0x2896ed(0x16c)];if(Array['isArray'](_0x582b74[_0x2896ed(0x166)]))_0x728fe3[_0x2896ed(0x166)]=_0x582b74[_0x2896ed(0x166)];return _0x728fe3;}function summarizeDbtable(_0x458d2f){const _0x59037b=a19_0x1b27,_0x1b2b94={},_0x924410=[_0x59037b(0x174),_0x59037b(0x173),_0x59037b(0x13b),'datasetKey','pkField','allFields','logicField',_0x59037b(0x16d),_0x59037b(0x141),_0x59037b(0x14a),_0x59037b(0x134),_0x59037b(0x161),'modifierNameField','labelField',_0x59037b(0x14c)];for(const _0x498930 of _0x924410){if(_0x458d2f[_0x498930]!==undefined)_0x1b2b94[_0x498930]=_0x458d2f[_0x498930];}return typeof _0x1b2b94[_0x59037b(0x171)]===_0x59037b(0x133)&&_0x1b2b94[_0x59037b(0x171)][_0x59037b(0x162)]>0x0&&(_0x1b2b94['allFieldNames']=_0x1b2b94[_0x59037b(0x171)]['split'](',')['map'](_0x4a7135=>_0x4a7135[_0x59037b(0x14d)]())['filter'](Boolean)),_0x1b2b94;}function normalizeRelatedPages(_0x33f24c){const _0x2ff8c7=a19_0x1b27;if(!Array[_0x2ff8c7(0x137)](_0x33f24c))return[];return _0x33f24c[_0x2ff8c7(0x142)](_0x193206=>_0x193206&&typeof _0x193206===_0x2ff8c7(0x14e))[_0x2ff8c7(0x16e)](_0x51e912=>({'id':_0x51e912['id'],'type':_0x51e912[_0x2ff8c7(0x158)],'code':_0x51e912['code'],'title':_0x51e912['title'],'deleted':_0x51e912['deleted']===!![]}));}function normalizeFallbackFieldName(_0x1e3dd7,_0x4b9758){const _0x16bc08=a19_0x1b27,_0x10ac50=_0x1e3dd7[_0x16bc08(0x14d)]();if(!_0x10ac50)return null;return{'name':_0x10ac50,'displayName':_0x10ac50,'type':undefined,'dbType':undefined,'pk':_0x10ac50===_0x4b9758,'required':![],'description':undefined};}async function loadListFieldFallback(_0x17104e,_0x4fc499){const _0x222a7d=a19_0x1b27;if(!_0x17104e||!_0x4fc499)return[];try{const _0x360384=await listDatasets(_0x17104e,{'code':_0x4fc499}),_0x318579=_0x360384[_0x222a7d(0x152)](_0x10d31b=>_0x10d31b[_0x222a7d(0x15e)]===_0x4fc499)??_0x360384[0x0],_0x5d846c=_0x318579?.['dbtableConfig']??{},_0x41dbc5=typeof _0x5d846c['allFields']===_0x222a7d(0x133)?_0x5d846c[_0x222a7d(0x171)][_0x222a7d(0x15c)](','):[];return _0x41dbc5[_0x222a7d(0x16e)](_0x4a0fda=>normalizeFallbackFieldName(_0x4a0fda,_0x5d846c[_0x222a7d(0x12e)]))[_0x222a7d(0x142)](_0x3c3055=>_0x3c3055!==null);}catch{return[];}}function a19_0x502e(){const _0x491ae1=['read','split','afterScriptId','code','description','630456hPZqLJ','modifierIdField','length','231091xCSRxu','str','beforeScriptId','responseFields','relations','formatRules','toDatasetCode','629308uJdSAi','1543710UOgAJB','requestFields','createTimeField','map','sourceType','4490874OrQIhH','allFields','validateRules','dbName','dbId','modelId','method','pkField','datasetKey','doVersion','columnCodeListWithDeleted','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','string','creatorNameField','400515BLTTca','name','isArray','toField','options','operations','tableName','66TIcjqA','indexes','fromField','required','host','updateTimeField','filter','entries','properties','parse','path','tableComment','2459691QtmVLH','dbtableConfig','creatorIdField','responseBody','dblinkInfoDTO','trim','object','requestBody','8nloWbV','extend','find','fields','dataset','toFieldLabel','doType','appCode','type','dataType','displayName'];a19_0x502e=function(){return _0x491ae1;};return a19_0x502e();}export const datasetDetail={'service':a19_0xa6ed2e(0x154),'command':'detail','description':a19_0xa6ed2e(0x132),'risk':a19_0xa6ed2e(0x15b),'flags':[CODE_FLAG],async 'execute'(_0x1b7196){const _0x2fb543=a19_0xa6ed2e,_0x1bf3c9=await getDatasetDetail(_0x1b7196['str'](_0x2fb543(0x15e))),_0x255149=Array[_0x2fb543(0x137)](_0x1bf3c9[_0x2fb543(0x153)])?_0x1bf3c9[_0x2fb543(0x153)]:Array[_0x2fb543(0x137)](_0x1bf3c9[_0x2fb543(0x144)])?_0x1bf3c9[_0x2fb543(0x144)]:[];let _0x5cf4c8=_0x255149['map'](_0x2d56dc=>normalizeField(_0x2d56dc))[_0x2fb543(0x142)](_0x4bd79f=>_0x4bd79f!==null);_0x5cf4c8[_0x2fb543(0x162)]===0x0&&(_0x5cf4c8=await loadListFieldFallback(_0x1b7196[_0x2fb543(0x157)],_0x1b7196[_0x2fb543(0x164)](_0x2fb543(0x15e))));const _0x5e9955=_0x1bf3c9[_0x2fb543(0x13a)]??{},_0x2e6b06=[];for(const [_0xdb8dd1,_0x3022b7]of Object[_0x2fb543(0x143)](_0x5e9955)){const _0x5f2945=normalizeOperationEntry(_0xdb8dd1,_0x3022b7);if(_0x5f2945)_0x2e6b06['push'](_0x5f2945);}const _0x4d146a=_0x1bf3c9[_0x2fb543(0x149)]??{},_0x232c22=_0x1bf3c9[_0x2fb543(0x154)]??{},_0x2cc63f=_0x4d146a[_0x2fb543(0x174)]!=null?{'id':_0x4d146a[_0x2fb543(0x174)],'name':_0x4d146a[_0x2fb543(0x173)]??null}:undefined;let _0x4a0368;return typeof _0x1bf3c9[_0x2fb543(0x151)]===_0x2fb543(0x133)&&(_0x4a0368=parseJsonMaybe(_0x1bf3c9[_0x2fb543(0x151)])),{'ok':!![],'data':{'id':_0x1bf3c9[_0x2fb543(0x12c)]??_0x1bf3c9['id'],'name':_0x1bf3c9[_0x2fb543(0x136)],'code':_0x1bf3c9['modelCode']||_0x1bf3c9[_0x2fb543(0x15e)],'doVersion':_0x1bf3c9[_0x2fb543(0x130)],'description':_0x1bf3c9['description']||_0x232c22[_0x2fb543(0x147)]||undefined,'source':_0x1bf3c9['source']||_0x232c22[_0x2fb543(0x16f)],'table':_0x4d146a[_0x2fb543(0x13b)]||_0x232c22[_0x2fb543(0x13b)],'datasetKey':_0x4d146a[_0x2fb543(0x12f)],'pk':_0x4d146a[_0x2fb543(0x12e)],'db':_0x2cc63f,'dbtable':summarizeDbtable(_0x4d146a),'fields':_0x5cf4c8,'operations':_0x2e6b06,'indexes':Array[_0x2fb543(0x137)](_0x232c22[_0x2fb543(0x13d)])?_0x232c22[_0x2fb543(0x13d)]:[],'relations':Array[_0x2fb543(0x137)](_0x1bf3c9[_0x2fb543(0x167)])?_0x1bf3c9['relations']['map'](_0x4e9ee1=>({'fromField':_0x4e9ee1[_0x2fb543(0x13e)],'toDataset':_0x4e9ee1['toDatasetName'],'toCode':_0x4e9ee1[_0x2fb543(0x169)],'toTable':_0x4e9ee1['toTableName'],'toField':_0x4e9ee1[_0x2fb543(0x138)],'labelField':_0x4e9ee1[_0x2fb543(0x155)]||undefined})):[],'relatedPages':normalizeRelatedPages(_0x1bf3c9['relatedPageInfoList']),...Array[_0x2fb543(0x137)](_0x1bf3c9['columnCodeListWithDeleted'])?{'columnCodeListWithDeleted':_0x1bf3c9[_0x2fb543(0x131)]}:{},'formatRules':Array[_0x2fb543(0x137)](_0x1bf3c9[_0x2fb543(0x168)])?_0x1bf3c9['formatRules']:[],'validateRules':Array[_0x2fb543(0x137)](_0x1bf3c9[_0x2fb543(0x172)])?_0x1bf3c9[_0x2fb543(0x172)]:[],..._0x4a0368!==undefined?{'extend':_0x4a0368}:{},'stats':{'fieldCount':_0x5cf4c8[_0x2fb543(0x162)],'operationCount':_0x2e6b06['length']}}};}};
1
+ const a20_0x114c70=a20_0x5c74;(function(_0x109fc1,_0x529b23){const _0x13c133=a20_0x5c74,_0xb4eee3=_0x109fc1();while(!![]){try{const _0x4df5ac=-parseInt(_0x13c133(0x190))/0x1*(parseInt(_0x13c133(0x159))/0x2)+-parseInt(_0x13c133(0x14b))/0x3*(parseInt(_0x13c133(0x156))/0x4)+parseInt(_0x13c133(0x14c))/0x5*(parseInt(_0x13c133(0x152))/0x6)+parseInt(_0x13c133(0x14f))/0x7*(-parseInt(_0x13c133(0x188))/0x8)+-parseInt(_0x13c133(0x17e))/0x9*(parseInt(_0x13c133(0x155))/0xa)+parseInt(_0x13c133(0x162))/0xb*(parseInt(_0x13c133(0x15e))/0xc)+parseInt(_0x13c133(0x14d))/0xd*(parseInt(_0x13c133(0x185))/0xe);if(_0x4df5ac===_0x529b23)break;else _0xb4eee3['push'](_0xb4eee3['shift']());}catch(_0xad569c){_0xb4eee3['push'](_0xb4eee3['shift']());}}}(a20_0x1a68,0xd10e5));function a20_0x1a68(){const _0x59c45a=['13lVFtUr','dbName','733579iDoWfi','tableComment','dbtableConfig','76578MZjomA','modifierIdField','filter','13963310KnIOQx','28IrykPU','path','allFields','986zTHLKh','toTableName','toFieldLabel','relations','deleted','12SQtaCB','requestBody','dataset','object','10292777uGNlQY','modelCode','sourceType','columnCodeListWithDeleted','labelField','read','pkField','required','entries','updateTimeField','name','trim','extend','dblinkInfoDTO','type','str','toDatasetName','displayName','createTimeField','modelId','method','responseBody','options','length','appCode','modifierNameField','push','doType','9GHYnOp','host','allFieldNames','parse','datasetKey','afterScriptId','string','36968078JsnTvH','fields','dataType','72GfqiZS','toDatasetCode','dbId','logicField','beforeScriptId','requestFields','responseFields','split','2423emlDPr','code','dbType','validateRules','map','indexes','tableName','creatorNameField','toField','creatorIdField','description','properties','fromField','isArray','323913cBUbGR','615JZGleB'];a20_0x1a68=function(){return _0x59c45a;};return a20_0x1a68();}import{getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';function normalizeField(_0x2df457){const _0x3b4699=a20_0x5c74;if(_0x2df457[_0x3b4699(0x15d)])return null;const _0xd53f04=Boolean(_0x2df457['displayName']!==undefined||_0x2df457[_0x3b4699(0x17d)]!==undefined);let _0x509c60={};if(!_0xd53f04&&typeof _0x2df457[_0x3b4699(0x16e)]==='string')try{_0x509c60=JSON[_0x3b4699(0x181)](_0x2df457[_0x3b4699(0x16e)]);}catch{}const _0x11501b=_0xd53f04?_0x2df457[_0x3b4699(0x16c)]:_0x2df457['code'],_0x147e1e=_0xd53f04?_0x2df457[_0x3b4699(0x173)]:_0x2df457['name'],_0x2c342f=_0xd53f04?_0x2df457[_0x3b4699(0x17d)]:_0x2df457[_0x3b4699(0x170)]||_0x2df457[_0x3b4699(0x187)],_0x2192f9=_0xd53f04?_0x2df457['pkField']===!![]:_0x509c60[_0x3b4699(0x168)]===!![],_0x592c58=_0xd53f04?_0x2df457['required']===!![]:_0x509c60[_0x3b4699(0x169)]===!![],_0x13f3de=_0xd53f04?_0x2df457[_0x3b4699(0x178)]??null:_0x509c60['options']??null,_0x436d40={'name':_0x11501b,'displayName':_0x147e1e||_0x11501b,'type':_0x2c342f,'dbType':_0x2df457[_0x3b4699(0x13f)],'pk':_0x2192f9,'required':_0x592c58,'description':_0x2df457[_0x3b4699(0x147)]||undefined};return Array['isArray'](_0x13f3de)&&_0x13f3de['length']>0x0&&(_0x436d40[_0x3b4699(0x178)]=_0x13f3de),_0x436d40;}function parseJsonMaybe(_0x352458){const _0x1e89d6=a20_0x5c74;if(typeof _0x352458!==_0x1e89d6(0x184))return _0x352458;try{return JSON[_0x1e89d6(0x181)](_0x352458);}catch{return _0x352458;}}function normalizeOperationEntry(_0xf51a34,_0x17bdd1){const _0x3ebaaa=a20_0x5c74;if(!_0x17bdd1||typeof _0x17bdd1!==_0x3ebaaa(0x161))return null;if(!_0x17bdd1[_0x3ebaaa(0x176)]||!_0x17bdd1[_0x3ebaaa(0x157)])return null;const _0x189532={'name':_0xf51a34,'method':_0x17bdd1[_0x3ebaaa(0x176)],'path':_0x17bdd1[_0x3ebaaa(0x157)]};if(_0x17bdd1[_0x3ebaaa(0x17f)])_0x189532[_0x3ebaaa(0x17f)]=_0x17bdd1['host'];if(_0x17bdd1['requestBody']!=null)_0x189532['requestBody']=parseJsonMaybe(_0x17bdd1[_0x3ebaaa(0x15f)]);if(_0x17bdd1[_0x3ebaaa(0x177)]!=null)_0x189532[_0x3ebaaa(0x177)]=parseJsonMaybe(_0x17bdd1['responseBody']);if(_0x17bdd1[_0x3ebaaa(0x18c)]!=null)_0x189532[_0x3ebaaa(0x18c)]=_0x17bdd1[_0x3ebaaa(0x18c)];if(_0x17bdd1[_0x3ebaaa(0x183)]!=null)_0x189532['afterScriptId']=_0x17bdd1['afterScriptId'];if(Array[_0x3ebaaa(0x14a)](_0x17bdd1[_0x3ebaaa(0x18d)]))_0x189532[_0x3ebaaa(0x18d)]=_0x17bdd1['requestFields'];if(Array[_0x3ebaaa(0x14a)](_0x17bdd1['responseFields']))_0x189532['responseFields']=_0x17bdd1[_0x3ebaaa(0x18e)];return _0x189532;}function summarizeDbtable(_0x58382c){const _0x2940ed=a20_0x5c74,_0x7d715f={},_0x2a37dc=[_0x2940ed(0x18a),_0x2940ed(0x14e),_0x2940ed(0x143),_0x2940ed(0x182),_0x2940ed(0x168),_0x2940ed(0x158),_0x2940ed(0x18b),_0x2940ed(0x174),_0x2940ed(0x16b),_0x2940ed(0x146),_0x2940ed(0x144),_0x2940ed(0x153),_0x2940ed(0x17b),_0x2940ed(0x166),_0x2940ed(0x16f)];for(const _0x16b074 of _0x2a37dc){if(_0x58382c[_0x16b074]!==undefined)_0x7d715f[_0x16b074]=_0x58382c[_0x16b074];}return typeof _0x7d715f['allFields']===_0x2940ed(0x184)&&_0x7d715f[_0x2940ed(0x158)][_0x2940ed(0x179)]>0x0&&(_0x7d715f[_0x2940ed(0x180)]=_0x7d715f[_0x2940ed(0x158)][_0x2940ed(0x18f)](',')[_0x2940ed(0x141)](_0x422f01=>_0x422f01[_0x2940ed(0x16d)]())[_0x2940ed(0x154)](Boolean)),_0x7d715f;}function normalizeRelatedPages(_0x2b3efc){const _0x253e91=a20_0x5c74;if(!Array['isArray'](_0x2b3efc))return[];return _0x2b3efc[_0x253e91(0x154)](_0x410a91=>_0x410a91&&typeof _0x410a91==='object')[_0x253e91(0x141)](_0x5230c9=>({'id':_0x5230c9['id'],'type':_0x5230c9[_0x253e91(0x170)],'code':_0x5230c9[_0x253e91(0x13e)],'title':_0x5230c9['title'],'deleted':_0x5230c9[_0x253e91(0x15d)]===!![]}));}function normalizeFallbackFieldName(_0xe065d8,_0x2549d2){const _0x263d19=a20_0x5c74,_0x5a11ab=_0xe065d8[_0x263d19(0x16d)]();if(!_0x5a11ab)return null;return{'name':_0x5a11ab,'displayName':_0x5a11ab,'type':undefined,'dbType':undefined,'pk':_0x5a11ab===_0x2549d2,'required':![],'description':undefined};}async function loadListFieldFallback(_0x57a631,_0x35be46){const _0x25f822=a20_0x5c74;if(!_0x57a631||!_0x35be46)return[];try{const _0x5ac407=await listDatasets(_0x57a631,{'code':_0x35be46}),_0x2f0233=_0x5ac407['find'](_0x492706=>_0x492706[_0x25f822(0x13e)]===_0x35be46)??_0x5ac407[0x0],_0x312e8d=_0x2f0233?.[_0x25f822(0x151)]??{},_0x38b971=typeof _0x312e8d['allFields']==='string'?_0x312e8d[_0x25f822(0x158)]['split'](','):[];return _0x38b971[_0x25f822(0x141)](_0x566c4f=>normalizeFallbackFieldName(_0x566c4f,_0x312e8d[_0x25f822(0x168)]))[_0x25f822(0x154)](_0x365ceb=>_0x365ceb!==null);}catch{return[];}}function a20_0x5c74(_0x1cdc60,_0x1927cd){_0x1cdc60=_0x1cdc60-0x13e;const _0x1a6829=a20_0x1a68();let _0x5c7475=_0x1a6829[_0x1cdc60];return _0x5c7475;}export const datasetDetail={'service':a20_0x114c70(0x160),'command':'detail','description':'Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','risk':a20_0x114c70(0x167),'flags':[CODE_FLAG],async 'execute'(_0x323351){const _0x2e2546=a20_0x114c70,_0x3211b0=await getDatasetDetail(_0x323351['str'](_0x2e2546(0x13e))),_0xaa40ba=Array['isArray'](_0x3211b0[_0x2e2546(0x186)])?_0x3211b0[_0x2e2546(0x186)]:Array['isArray'](_0x3211b0[_0x2e2546(0x148)])?_0x3211b0[_0x2e2546(0x148)]:[];let _0x486e28=_0xaa40ba['map'](_0x23e7c3=>normalizeField(_0x23e7c3))[_0x2e2546(0x154)](_0x32f757=>_0x32f757!==null);_0x486e28['length']===0x0&&(_0x486e28=await loadListFieldFallback(_0x323351[_0x2e2546(0x17a)],_0x323351[_0x2e2546(0x171)](_0x2e2546(0x13e))));const _0x32c5b0=_0x3211b0['operations']??{},_0x164475=[];for(const [_0x4abfaa,_0x57aa36]of Object[_0x2e2546(0x16a)](_0x32c5b0)){const _0x3e8763=normalizeOperationEntry(_0x4abfaa,_0x57aa36);if(_0x3e8763)_0x164475[_0x2e2546(0x17c)](_0x3e8763);}const _0x38d4c5=_0x3211b0['dbtableConfig']??{},_0x333e60=_0x3211b0[_0x2e2546(0x160)]??{},_0x5d9ed5=_0x38d4c5[_0x2e2546(0x18a)]!=null?{'id':_0x38d4c5[_0x2e2546(0x18a)],'name':_0x38d4c5['dbName']??null}:undefined;let _0x18191b;return typeof _0x3211b0[_0x2e2546(0x16e)]===_0x2e2546(0x184)&&(_0x18191b=parseJsonMaybe(_0x3211b0[_0x2e2546(0x16e)])),{'ok':!![],'data':{'id':_0x3211b0[_0x2e2546(0x175)]??_0x3211b0['id'],'name':_0x3211b0[_0x2e2546(0x16c)],'code':_0x3211b0[_0x2e2546(0x163)]||_0x3211b0[_0x2e2546(0x13e)],'doVersion':_0x3211b0['doVersion'],'description':_0x3211b0[_0x2e2546(0x147)]||_0x333e60[_0x2e2546(0x150)]||undefined,'source':_0x3211b0['source']||_0x333e60[_0x2e2546(0x164)],'table':_0x38d4c5['tableName']||_0x333e60[_0x2e2546(0x143)],'datasetKey':_0x38d4c5[_0x2e2546(0x182)],'pk':_0x38d4c5[_0x2e2546(0x168)],'db':_0x5d9ed5,'dbtable':summarizeDbtable(_0x38d4c5),'fields':_0x486e28,'operations':_0x164475,'indexes':Array[_0x2e2546(0x14a)](_0x333e60[_0x2e2546(0x142)])?_0x333e60[_0x2e2546(0x142)]:[],'relations':Array[_0x2e2546(0x14a)](_0x3211b0[_0x2e2546(0x15c)])?_0x3211b0[_0x2e2546(0x15c)][_0x2e2546(0x141)](_0x59fb63=>({'fromField':_0x59fb63[_0x2e2546(0x149)],'toDataset':_0x59fb63[_0x2e2546(0x172)],'toCode':_0x59fb63[_0x2e2546(0x189)],'toTable':_0x59fb63[_0x2e2546(0x15a)],'toField':_0x59fb63[_0x2e2546(0x145)],'labelField':_0x59fb63[_0x2e2546(0x15b)]||undefined})):[],'relatedPages':normalizeRelatedPages(_0x3211b0['relatedPageInfoList']),...Array[_0x2e2546(0x14a)](_0x3211b0[_0x2e2546(0x165)])?{'columnCodeListWithDeleted':_0x3211b0[_0x2e2546(0x165)]}:{},'formatRules':Array['isArray'](_0x3211b0['formatRules'])?_0x3211b0['formatRules']:[],'validateRules':Array[_0x2e2546(0x14a)](_0x3211b0[_0x2e2546(0x140)])?_0x3211b0[_0x2e2546(0x140)]:[],..._0x18191b!==undefined?{'extend':_0x18191b}:{},'stats':{'fieldCount':_0x486e28[_0x2e2546(0x179)],'operationCount':_0x164475[_0x2e2546(0x179)]}}};}};
@@ -1 +1 @@
1
- (function(_0x2e711e,_0x40507c){const _0x52cad2=a20_0x22dd,_0x144b18=_0x2e711e();while(!![]){try{const _0x4dc016=-parseInt(_0x52cad2(0xd0))/0x1+-parseInt(_0x52cad2(0xca))/0x2*(parseInt(_0x52cad2(0xcb))/0x3)+parseInt(_0x52cad2(0xcc))/0x4+-parseInt(_0x52cad2(0xd4))/0x5*(-parseInt(_0x52cad2(0xcf))/0x6)+-parseInt(_0x52cad2(0xd2))/0x7+-parseInt(_0x52cad2(0xd1))/0x8*(-parseInt(_0x52cad2(0xd3))/0x9)+-parseInt(_0x52cad2(0xcd))/0xa*(-parseInt(_0x52cad2(0xce))/0xb);if(_0x4dc016===_0x40507c)break;else _0x144b18['push'](_0x144b18['shift']());}catch(_0x3b936e){_0x144b18['push'](_0x144b18['shift']());}}}(a20_0xc530,0x9af0d));import{datasetList}from'../../commands/dataset/list.js';import{datasetDetail}from'../../commands/dataset/detail.js';function a20_0xc530(){const _0x5abf7c=['14853GUvzZR','330044TdWMxI','10hWvnYq','8682509eRYXsR','18CRWSmn','1054871XspUZM','8SNRNbA','3602347IZzvFA','10089927aHcpGG','607795DMUNmx','62fBwQLe'];a20_0xc530=function(){return _0x5abf7c;};return a20_0xc530();}import{datasetSdkDoc}from'../../commands/dataset/sdk-doc.js';function a20_0x22dd(_0x1afefb,_0x4d2211){_0x1afefb=_0x1afefb-0xca;const _0xc5309c=a20_0xc530();let _0x22dd1f=_0xc5309c[_0x1afefb];return _0x22dd1f;}export const datasetDefinitions=[datasetList,datasetDetail,datasetSdkDoc];
1
+ (function(_0x5c3673,_0x2a4fb5){const _0x22b654=a21_0x2bd0,_0x54e8e1=_0x5c3673();while(!![]){try{const _0x2a7c14=-parseInt(_0x22b654(0x1a8))/0x1+parseInt(_0x22b654(0x1aa))/0x2*(-parseInt(_0x22b654(0x1a6))/0x3)+parseInt(_0x22b654(0x1a1))/0x4*(-parseInt(_0x22b654(0x1a9))/0x5)+-parseInt(_0x22b654(0x1a5))/0x6*(parseInt(_0x22b654(0x1a2))/0x7)+parseInt(_0x22b654(0x1ab))/0x8*(parseInt(_0x22b654(0x1a3))/0x9)+-parseInt(_0x22b654(0x1ac))/0xa+-parseInt(_0x22b654(0x1a4))/0xb*(-parseInt(_0x22b654(0x1a7))/0xc);if(_0x2a7c14===_0x2a4fb5)break;else _0x54e8e1['push'](_0x54e8e1['shift']());}catch(_0x226e42){_0x54e8e1['push'](_0x54e8e1['shift']());}}}(a21_0x10ef,0xb1075));function a21_0x10ef(){const _0xb6ef0e=['568221IvBPMe','44586480cTlzzP','1416654kvHXwo','1185qnZqhY','4KKIOCH','296fCKKJC','2735540ZBaHjT','8852CfnGsp','7kWtrZA','9981zpmjXQ','11hRTSSv','2627766hQvbHe'];a21_0x10ef=function(){return _0xb6ef0e;};return a21_0x10ef();}import{datasetList}from'../../commands/dataset/list.js';function a21_0x2bd0(_0x263bcd,_0x167968){_0x263bcd=_0x263bcd-0x1a1;const _0x10efa2=a21_0x10ef();let _0x2bd032=_0x10efa2[_0x263bcd];return _0x2bd032;}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 a21_0x170f95=a21_0x3f7b;(function(_0x33cdef,_0x327b8b){const _0x56e1e4=a21_0x3f7b,_0x1af2a2=_0x33cdef();while(!![]){try{const _0x47fe75=-parseInt(_0x56e1e4(0x1a0))/0x1+-parseInt(_0x56e1e4(0x1b1))/0x2*(-parseInt(_0x56e1e4(0x1af))/0x3)+-parseInt(_0x56e1e4(0x197))/0x4*(parseInt(_0x56e1e4(0x1b4))/0x5)+-parseInt(_0x56e1e4(0x19a))/0x6+parseInt(_0x56e1e4(0x1a4))/0x7+-parseInt(_0x56e1e4(0x1ad))/0x8+parseInt(_0x56e1e4(0x1aa))/0x9*(parseInt(_0x56e1e4(0x1a2))/0xa);if(_0x47fe75===_0x327b8b)break;else _0x1af2a2['push'](_0x1af2a2['shift']());}catch(_0x1914f4){_0x1af2a2['push'](_0x1af2a2['shift']());}}}(a21_0x4e47,0x5fca9));function a21_0x4e47(){const _0x4035ef=['string','read','5942792MeqJWK','split','3FAGlBd','tableName','1250614udJlYx','appCode','length','1375sloSET','2420HuKRcl','source','List\x20datasets\x20in\x20the\x20app\x20(supports\x20server-side\x20name/code\x20filtering)','2609748VwSgeZ','pkField','code','map','Filter\x20by\x20dataset\x20name\x20(server-side\x20fuzzy\x20match)','name','385625HCowmE','list','450zcdLDk','str','1679762nbwkef','allFields','Filter\x20by\x20dataset\x20code\x20(server-side\x20exact\x20match)','dbtableConfig','trim','description','251379RVwcDY'];a21_0x4e47=function(){return _0x4035ef;};return a21_0x4e47();}import{listDatasets}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';function a21_0x3f7b(_0x335d38,_0x447f95){_0x335d38=_0x335d38-0x197;const _0x4e4777=a21_0x4e47();let _0x3f7b66=_0x4e4777[_0x335d38];return _0x3f7b66;}export const datasetList={'service':'dataset','command':a21_0x170f95(0x1a1),'description':a21_0x170f95(0x199),'risk':a21_0x170f95(0x1ac),'flags':[{'name':a21_0x170f95(0x19f),'type':a21_0x170f95(0x1ab),'description':a21_0x170f95(0x19e)},{...CODE_FLAG,'required':![],'description':a21_0x170f95(0x1a6)}],async 'execute'(_0x582837){const _0x548940=a21_0x170f95,_0x264282=_0x582837['str'](_0x548940(0x19f)),_0x4e58cf=_0x582837[_0x548940(0x1a3)](_0x548940(0x19c)),_0xbef91a=await listDatasets(_0x582837[_0x548940(0x1b2)],{..._0x264282&&{'name':_0x264282},..._0x4e58cf&&{'code':_0x4e58cf}});return{'ok':!![],'data':{'total':_0xbef91a[_0x548940(0x1b3)],'datasets':_0xbef91a[_0x548940(0x19d)](_0x2315a0=>{const _0x471684=_0x548940,_0x308b25=_0x2315a0[_0x471684(0x1a7)]??{};return{'id':_0x2315a0['id'],'code':_0x2315a0[_0x471684(0x19c)],'name':_0x2315a0[_0x471684(0x19f)],'source':_0x2315a0[_0x471684(0x198)],'description':_0x2315a0[_0x471684(0x1a9)],'table':_0x308b25[_0x471684(0x1b0)],'datasetKey':_0x308b25['datasetKey'],'pk':_0x308b25[_0x471684(0x19b)],'fields':_0x308b25[_0x471684(0x1a5)]?_0x308b25[_0x471684(0x1a5)][_0x471684(0x1ae)](',')[_0x471684(0x19d)](_0x6892a4=>_0x6892a4[_0x471684(0x1a8)]()):[]};})}};}};
1
+ const a22_0x1c9ac1=a22_0x4795;function a22_0x4795(_0x485be2,_0x3c66b4){_0x485be2=_0x485be2-0x11d;const _0x49496f=a22_0x4949();let _0x479572=_0x49496f[_0x485be2];return _0x479572;}(function(_0x206d40,_0x5e1f03){const _0x56037d=a22_0x4795,_0x518c19=_0x206d40();while(!![]){try{const _0xfc6a82=parseInt(_0x56037d(0x135))/0x1+parseInt(_0x56037d(0x12b))/0x2+parseInt(_0x56037d(0x134))/0x3+-parseInt(_0x56037d(0x12f))/0x4+-parseInt(_0x56037d(0x12c))/0x5+-parseInt(_0x56037d(0x12a))/0x6*(-parseInt(_0x56037d(0x125))/0x7)+-parseInt(_0x56037d(0x127))/0x8*(parseInt(_0x56037d(0x122))/0x9);if(_0xfc6a82===_0x5e1f03)break;else _0x518c19['push'](_0x518c19['shift']());}catch(_0x1531c7){_0x518c19['push'](_0x518c19['shift']());}}}(a22_0x4949,0xe5abe));import{listDatasets}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';export const datasetList={'service':a22_0x1c9ac1(0x128),'command':'list','description':'List\x20datasets\x20in\x20the\x20app\x20(supports\x20server-side\x20name/code\x20filtering)','risk':a22_0x1c9ac1(0x121),'flags':[{'name':a22_0x1c9ac1(0x12e),'type':a22_0x1c9ac1(0x120),'description':'Filter\x20by\x20dataset\x20name\x20(server-side\x20fuzzy\x20match)'},{...CODE_FLAG,'required':![],'description':a22_0x1c9ac1(0x11f)}],async 'execute'(_0x5ba17e){const _0x55047f=a22_0x1c9ac1,_0x2e908b=_0x5ba17e[_0x55047f(0x11e)](_0x55047f(0x12e)),_0x595732=_0x5ba17e[_0x55047f(0x11e)]('code'),_0xb0f043=await listDatasets(_0x5ba17e['appCode'],{..._0x2e908b&&{'name':_0x2e908b},..._0x595732&&{'code':_0x595732}});return{'ok':!![],'data':{'total':_0xb0f043[_0x55047f(0x124)],'datasets':_0xb0f043[_0x55047f(0x12d)](_0xb241d1=>{const _0x1287be=_0x55047f,_0xef28a0=_0xb241d1[_0x1287be(0x123)]??{};return{'id':_0xb241d1['id'],'code':_0xb241d1['code'],'name':_0xb241d1[_0x1287be(0x12e)],'source':_0xb241d1['source'],'description':_0xb241d1[_0x1287be(0x133)],'table':_0xef28a0[_0x1287be(0x132)],'datasetKey':_0xef28a0[_0x1287be(0x130)],'pk':_0xef28a0[_0x1287be(0x126)],'fields':_0xef28a0[_0x1287be(0x129)]?_0xef28a0['allFields'][_0x1287be(0x11d)](',')[_0x1287be(0x12d)](_0x4420d0=>_0x4420d0[_0x1287be(0x131)]()):[]};})}};}};function a22_0x4949(){const _0x50897f=['read','9AwoQAY','dbtableConfig','length','588wdZCrD','pkField','12029584pZurRQ','dataset','allFields','133344TnVgKg','1082996RnIHVl','757470OUDaVS','map','name','6056140FRBPtp','datasetKey','trim','tableName','description','343530hcEBVS','1587137jKExIQ','split','str','Filter\x20by\x20dataset\x20code\x20(server-side\x20exact\x20match)','string'];a22_0x4949=function(){return _0x50897f;};return a22_0x4949();}
@@ -1 +1 @@
1
- function a22_0x563d(){const _0x3d91ff=['string','1327808MFOcYv','Dataset\x20code\x20(32\x20characters).\x20Numeric\x20dataset\x20IDs\x20are\x20not\x20accepted.','read','29829555NSnjZt','11212390IFWMQI','1172159pRaQbY','appCode','20tmDIfp','7399512TSvNpE','55806ZKCgxJ','dataset','sdk-doc','code','trim','1330404KMzQrb','Get\x20SDK\x20usage\x20markdown\x20for\x20a\x20dataset\x20code','2mzqzIT','#\x20Dataset\x20SDK\x20Usage\x20Documentation\x0a\x0a暂无\x20SDK\x20使用文档'];a22_0x563d=function(){return _0x3d91ff;};return a22_0x563d();}const a22_0x325332=a22_0x1bfd;(function(_0x21331e,_0x2a3280){const _0x4dcee7=a22_0x1bfd,_0x29c60e=_0x21331e();while(!![]){try{const _0x47b682=parseInt(_0x4dcee7(0x185))/0x1*(-parseInt(_0x4dcee7(0x190))/0x2)+-parseInt(_0x4dcee7(0x189))/0x3+parseInt(_0x4dcee7(0x193))/0x4+parseInt(_0x4dcee7(0x187))/0x5*(-parseInt(_0x4dcee7(0x18e))/0x6)+-parseInt(_0x4dcee7(0x184))/0x7+parseInt(_0x4dcee7(0x188))/0x8+parseInt(_0x4dcee7(0x183))/0x9;if(_0x47b682===_0x2a3280)break;else _0x29c60e['push'](_0x29c60e['shift']());}catch(_0x5ae76e){_0x29c60e['push'](_0x29c60e['shift']());}}}(a22_0x563d,0xd9bab));import{getDatasetSdkUsageDoc}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';function a22_0x1bfd(_0x1ff516,_0x13dcc3){_0x1ff516=_0x1ff516-0x183;const _0x563d8b=a22_0x563d();let _0x1bfdb4=_0x563d8b[_0x1ff516];return _0x1bfdb4;}const DEFAULT_MARKDOWN=a22_0x325332(0x191);export function formatDatasetSdkMarkdown(_0x102440){const _0x441e01=a22_0x325332,_0x422764=typeof _0x102440===_0x441e01(0x192)?_0x102440[_0x441e01(0x18d)]():'';return _0x422764||DEFAULT_MARKDOWN;}export const datasetSdkDoc={'service':a22_0x325332(0x18a),'command':a22_0x325332(0x18b),'description':a22_0x325332(0x18f),'risk':a22_0x325332(0x195),'flags':[{...CODE_FLAG,'description':a22_0x325332(0x194)}],async 'execute'(_0x1697af){const _0x42a083=a22_0x325332,_0x1bf799=_0x1697af['str'](_0x42a083(0x18c)),_0xc6033c=await getDatasetSdkUsageDoc(_0x1bf799,_0x1697af[_0x42a083(0x186)]);return{'ok':!![],'data':{'code':_0x1bf799,'appCode':_0x1697af[_0x42a083(0x186)],'markdown':formatDatasetSdkMarkdown(_0xc6033c)}};}};
1
+ function a23_0x58c6(){const _0x22a653=['string','code','dataset','trim','5502084QQauko','3422889PPuwWV','2384204TzlTTh','read','326488kEtMeV','Dataset\x20code\x20(32\x20characters).\x20Numeric\x20dataset\x20IDs\x20are\x20not\x20accepted.','sdk-doc','64478ZDLGpk','appCode','#\x20Dataset\x20SDK\x20Usage\x20Documentation\x0a\x0a暂无\x20SDK\x20使用文档','34908EnwnCV','140QIQzVY','72bUmOKL','Get\x20SDK\x20usage\x20markdown\x20for\x20a\x20dataset\x20code','3596395GVtwva'];a23_0x58c6=function(){return _0x22a653;};return a23_0x58c6();}const a23_0x46482e=a23_0x3101;function a23_0x3101(_0xe2546f,_0x2012c9){_0xe2546f=_0xe2546f-0x16a;const _0x58c6f9=a23_0x58c6();let _0x31017b=_0x58c6f9[_0xe2546f];return _0x31017b;}(function(_0x392506,_0x15cfa4){const _0x4a94fd=a23_0x3101,_0x8800a=_0x392506();while(!![]){try{const _0x350b53=-parseInt(_0x4a94fd(0x178))/0x1+-parseInt(_0x4a94fd(0x17b))/0x2*(-parseInt(_0x4a94fd(0x16a))/0x3)+-parseInt(_0x4a94fd(0x173))/0x4+parseInt(_0x4a94fd(0x16c))/0x5+-parseInt(_0x4a94fd(0x171))/0x6+parseInt(_0x4a94fd(0x17c))/0x7*(parseInt(_0x4a94fd(0x175))/0x8)+parseInt(_0x4a94fd(0x172))/0x9;if(_0x350b53===_0x15cfa4)break;else _0x8800a['push'](_0x8800a['shift']());}catch(_0x39b665){_0x8800a['push'](_0x8800a['shift']());}}}(a23_0x58c6,0xb8db5));import{getDatasetSdkUsageDoc}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';const DEFAULT_MARKDOWN=a23_0x46482e(0x17a);export function formatDatasetSdkMarkdown(_0x122628){const _0x2ebc63=a23_0x46482e,_0x37af22=typeof _0x122628===_0x2ebc63(0x16d)?_0x122628[_0x2ebc63(0x170)]():'';return _0x37af22||DEFAULT_MARKDOWN;}export const datasetSdkDoc={'service':a23_0x46482e(0x16f),'command':a23_0x46482e(0x177),'description':a23_0x46482e(0x16b),'risk':a23_0x46482e(0x174),'flags':[{...CODE_FLAG,'description':a23_0x46482e(0x176)}],async 'execute'(_0x5e74fb){const _0x288d1c=a23_0x46482e,_0x37497e=_0x5e74fb['str'](_0x288d1c(0x16e)),_0x546604=await getDatasetSdkUsageDoc(_0x37497e,_0x5e74fb[_0x288d1c(0x179)]);return{'ok':!![],'data':{'code':_0x37497e,'appCode':_0x5e74fb[_0x288d1c(0x179)],'markdown':formatDatasetSdkMarkdown(_0x546604)}};}};
@@ -1 +1 @@
1
- const a23_0x5c471d=a23_0x4e9e;(function(_0x41e415,_0x1b2c22){const _0x10be3b=a23_0x4e9e,_0x5dc6ed=_0x41e415();while(!![]){try{const _0x2ddb9f=parseInt(_0x10be3b(0x11c))/0x1*(parseInt(_0x10be3b(0xef))/0x2)+-parseInt(_0x10be3b(0x113))/0x3+-parseInt(_0x10be3b(0xdd))/0x4+parseInt(_0x10be3b(0xde))/0x5+parseInt(_0x10be3b(0x106))/0x6*(parseInt(_0x10be3b(0x100))/0x7)+-parseInt(_0x10be3b(0xf4))/0x8*(-parseInt(_0x10be3b(0xea))/0x9)+-parseInt(_0x10be3b(0xe8))/0xa;if(_0x2ddb9f===_0x1b2c22)break;else _0x5dc6ed['push'](_0x5dc6ed['shift']());}catch(_0x50096f){_0x5dc6ed['push'](_0x5dc6ed['shift']());}}}(a23_0x3567,0x414bd));import a23_0x33679f 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 a23_0x4e9e(_0x9ba071,_0x35283d){_0x9ba071=_0x9ba071-0xdd;const _0x3567f1=a23_0x3567();let _0x4e9ef2=_0x3567f1[_0x9ba071];return _0x4e9ef2;}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(_0x4f2599){const _0x3ef7b8=a23_0x4e9e,_0x17b61d=getCliVersion(),_0x47f486=buildConfigFromFlags({});await initGlobalEnvironment(_0x47f486),console['log'](),console['log'](a23_0x33679f[_0x3ef7b8(0xe6)](CLI_BIN_NAME+_0x3ef7b8(0x108))),console['log'](a23_0x33679f[_0x3ef7b8(0x117)]('─'[_0x3ef7b8(0x10a)](0x32))),console[_0x3ef7b8(0xfe)](_0x3ef7b8(0x11e)+_0x17b61d),console['log'](_0x3ef7b8(0xf3)+process[_0x3ef7b8(0xdf)]),console[_0x3ef7b8(0xfe)](_0x3ef7b8(0x119)+process['platform']+'\x20'+process[_0x3ef7b8(0x112)]),console[_0x3ef7b8(0xfe)](),console[_0x3ef7b8(0xfe)](a23_0x33679f[_0x3ef7b8(0xe6)]('\x20\x20Config\x20Files')),console[_0x3ef7b8(0xfe)](a23_0x33679f[_0x3ef7b8(0x117)](_0x3ef7b8(0x10e)[_0x3ef7b8(0x10a)](0x1e)));const _0x2df0f7=getGlobalConfigPath(),_0x42c2e2=getProjectConfigPath();console[_0x3ef7b8(0xfe)](_0x3ef7b8(0xff)+(_0x2df0f7||a23_0x33679f[_0x3ef7b8(0x117)]('(not\x20found)'))),console[_0x3ef7b8(0xfe)](_0x3ef7b8(0x10d)+(_0x42c2e2||a23_0x33679f['gray'](_0x3ef7b8(0xe2)))),console[_0x3ef7b8(0xfe)](),console[_0x3ef7b8(0xfe)](a23_0x33679f[_0x3ef7b8(0xe6)](_0x3ef7b8(0x116))),console[_0x3ef7b8(0xfe)](a23_0x33679f[_0x3ef7b8(0x117)](_0x3ef7b8(0x10e)['repeat'](0x1e)));const _0x7afb7a=(_0x12d3e2,_0xfbdbaf)=>{const _0x4986a6=_0x3ef7b8;if(!_0xfbdbaf){console[_0x4986a6(0xfe)]('\x20\x20'+_0x12d3e2[_0x4986a6(0x111)](0x11)+'\x20'+a23_0x33679f[_0x4986a6(0x117)]('(no\x20file)'));return;}const _0x31af25=inspectCliConfigJsonFile(_0xfbdbaf);if(_0x31af25[_0x4986a6(0x105)]==='ok')console[_0x4986a6(0xfe)]('\x20\x20'+_0x12d3e2[_0x4986a6(0x111)](0x11)+'\x20'+a23_0x33679f['green'](_0x4986a6(0xe7)));else{if(_0x31af25[_0x4986a6(0x105)]==='empty')console['log']('\x20\x20'+_0x12d3e2['padEnd'](0x11)+'\x20'+a23_0x33679f['yellow'](_0x4986a6(0xfb)));else _0x31af25[_0x4986a6(0x105)]===_0x4986a6(0xf5)?console[_0x4986a6(0xfe)]('\x20\x20'+_0x12d3e2[_0x4986a6(0x111)](0x11)+'\x20'+a23_0x33679f[_0x4986a6(0x117)](_0x4986a6(0x118))):(console['log']('\x20\x20'+_0x12d3e2[_0x4986a6(0x111)](0x11)+'\x20'+a23_0x33679f[_0x4986a6(0x107)]('✗\x20Invalid\x20JSON')),console[_0x4986a6(0xfe)]('\x20\x20'+''['padEnd'](0x11)+'\x20'+a23_0x33679f[_0x4986a6(0x107)](_0x31af25[_0x4986a6(0x102)])));}};_0x7afb7a(_0x3ef7b8(0x10b),_0x2df0f7),_0x7afb7a('Project',_0x42c2e2),console['log'](),console[_0x3ef7b8(0xfe)](a23_0x33679f[_0x3ef7b8(0xe6)](_0x3ef7b8(0xf0))),console[_0x3ef7b8(0xfe)](a23_0x33679f[_0x3ef7b8(0x117)](_0x3ef7b8(0x10e)[_0x3ef7b8(0x10a)](0x1e))),console[_0x3ef7b8(0xfe)]('\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x47f486[_0x3ef7b8(0x101)]||a23_0x33679f['red'](_0x3ef7b8(0xf2)))),console['log']('\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x47f486[_0x3ef7b8(0xf8)]);const _0x5c0885=isLegacyCompatConfigKey(_0x3ef7b8(0x104))?a23_0x33679f['gray'](_0x47f486['locale']+_0x3ef7b8(0xe4)):_0x47f486['locale'];return console[_0x3ef7b8(0xfe)](_0x3ef7b8(0xfc)+_0x5c0885),console[_0x3ef7b8(0xfe)](_0x3ef7b8(0x110)+(_0x47f486[_0x3ef7b8(0xe1)]||a23_0x33679f['gray'](_0x3ef7b8(0xe3)))),console['log'](_0x3ef7b8(0xe9)+(_0x47f486['currentApp']||a23_0x33679f[_0x3ef7b8(0x117)](_0x3ef7b8(0xe3)))),console[_0x3ef7b8(0xfe)]('\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x47f486[_0x3ef7b8(0x103)]||a23_0x33679f[_0x3ef7b8(0x117)]('(default:\x20'+DEFAULT_CONFIG_VALUES[_0x3ef7b8(0x103)]+')'))),console[_0x3ef7b8(0xfe)](_0x3ef7b8(0xe0)+(_0x47f486[_0x3ef7b8(0xeb)]??a23_0x33679f['gray'](_0x3ef7b8(0xfd)))),console[_0x3ef7b8(0xfe)](_0x3ef7b8(0x114)+_0x47f486['riskLevel']),console[_0x3ef7b8(0xfe)]('\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x47f486[_0x3ef7b8(0xf9)]),console[_0x3ef7b8(0xfe)](_0x3ef7b8(0x11a)+AUTH_MODE['ClientAk']),console[_0x3ef7b8(0xfe)](_0x3ef7b8(0xee)+(_0x47f486[_0x3ef7b8(0x11b)]?a23_0x33679f[_0x3ef7b8(0x10f)](_0x3ef7b8(0x115)+_0x47f486[_0x3ef7b8(0x11b)][_0x3ef7b8(0xec)]+')'):a23_0x33679f['gray'](_0x3ef7b8(0xe3)))),console['log'](),console[_0x3ef7b8(0xfe)](a23_0x33679f['bold']('\x20\x20API\x20Endpoints')),console[_0x3ef7b8(0xfe)](a23_0x33679f[_0x3ef7b8(0x117)](_0x3ef7b8(0x10e)[_0x3ef7b8(0x10a)](0x1e))),console[_0x3ef7b8(0xfe)](_0x3ef7b8(0xf6)+getApiDomain()),console[_0x3ef7b8(0xfe)]('\x20\x20userDomain:\x20\x20\x20\x20\x20\x20'+getUserDomain()),console[_0x3ef7b8(0xfe)]('\x20\x20runtimeDomain:\x20\x20\x20'+getRuntimeDomain()),console[_0x3ef7b8(0xfe)](),console[_0x3ef7b8(0xfe)](a23_0x33679f[_0x3ef7b8(0xe6)](_0x3ef7b8(0xfa))),console['log'](a23_0x33679f[_0x3ef7b8(0x117)]('\x20\x20─'['repeat'](0x1e))),console[_0x3ef7b8(0xfe)](_0x3ef7b8(0xf7)+a23_0x33679f[_0x3ef7b8(0x10f)](AUTH_MODE[_0x3ef7b8(0x109)]+_0x3ef7b8(0xe5))),console['log'](_0x3ef7b8(0xed)+a23_0x33679f[_0x3ef7b8(0x117)](_0x3ef7b8(0x11d))),console['log'](),{'ok':!![]};}function a23_0x3567(){const _0x5b4f0e=['\x20\x20Merged\x20Config','doctor','(not\x20set)','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','99120tYLKLH','missing','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','env','verbose','\x20\x20Auth','⚠\x20Empty\x20(treated\x20as\x20{})','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(default)','log','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','2774261YhfKwa','appCode','message','format','locale','status','6PROMcL','red','\x20doctor','ClientAk','repeat','Global','check','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20','green','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','padEnd','arch','738699zcInyn','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','(set,\x20length=','\x20\x20Config\x20JSON','gray','(missing)','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20auth\x20(effective):\x20','accessKey','2mIquXV','(removed\x20—\x20cookie\x20auth\x20disabled)','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','1956328zFJEPX','1337310xTuxuU','version','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','defaultApp','(not\x20found)','(none)','\x20(legacy/compat\x20only)','\x20(accessKey)','bold','✓\x20Valid\x20JSON','6386350vCWNaI','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','369CovUvb','pageSize','length','\x20\x20Session\x20check:\x20\x20\x20','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','469628pHjUTH'];a23_0x3567=function(){return _0x5b4f0e;};return a23_0x3567();}export const doctorDefinition={'service':a23_0x5c471d(0xf1),'command':a23_0x5c471d(0x10c),'description':'Diagnose\x20CLI\x20configuration\x20and\x20environment','risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
1
+ const a24_0x4e49b3=a24_0x5bcb;(function(_0x5da712,_0x15153e){const _0x231738=a24_0x5bcb,_0x1cba09=_0x5da712();while(!![]){try{const _0x26ac7c=-parseInt(_0x231738(0x187))/0x1+parseInt(_0x231738(0x18b))/0x2*(-parseInt(_0x231738(0x1b6))/0x3)+parseInt(_0x231738(0x182))/0x4*(-parseInt(_0x231738(0x1a1))/0x5)+-parseInt(_0x231738(0x178))/0x6*(-parseInt(_0x231738(0x189))/0x7)+parseInt(_0x231738(0x191))/0x8+parseInt(_0x231738(0x1c6))/0x9+-parseInt(_0x231738(0x197))/0xa;if(_0x26ac7c===_0x15153e)break;else _0x1cba09['push'](_0x1cba09['shift']());}catch(_0x2a3b98){_0x1cba09['push'](_0x1cba09['shift']());}}}(a24_0x3094,0xb20a1));import a24_0x1bc9c1 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';function a24_0x5bcb(_0x2f0187,_0x412837){_0x2f0187=_0x2f0187-0x172;const _0x30940c=a24_0x3094();let _0x5bcbdf=_0x30940c[_0x2f0187];return _0x5bcbdf;}import{isLegacyCompatConfigKey}from'../config/schema.js';import{inspectServiceRegistry}from'../commands/service/registry.js';async function execute(_0x1fbbc3){const _0xe3fb8c=a24_0x5bcb,_0x129544=getCliVersion(),_0x3ccab4=buildConfigFromFlags({});await initGlobalEnvironment(_0x3ccab4),console['log'](),console[_0xe3fb8c(0x19d)](a24_0x1bc9c1[_0xe3fb8c(0x1b2)](CLI_BIN_NAME+_0xe3fb8c(0x1bc))),console[_0xe3fb8c(0x19d)](a24_0x1bc9c1[_0xe3fb8c(0x1af)]('─'['repeat'](0x32))),console['log'](_0xe3fb8c(0x1b9)+_0x129544),console[_0xe3fb8c(0x19d)](_0xe3fb8c(0x1ad)+process[_0xe3fb8c(0x180)]),console['log']('\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0xe3fb8c(0x194)]+'\x20'+process[_0xe3fb8c(0x19c)]),console['log'](),console[_0xe3fb8c(0x19d)](a24_0x1bc9c1[_0xe3fb8c(0x1b2)](_0xe3fb8c(0x1c7))),console[_0xe3fb8c(0x19d)](a24_0x1bc9c1[_0xe3fb8c(0x1af)](_0xe3fb8c(0x192)['repeat'](0x1e)));const _0x3ebb2d=getGlobalConfigPath(),_0x174cff=getProjectConfigPath();console[_0xe3fb8c(0x19d)](_0xe3fb8c(0x1a5)+(_0x3ebb2d||a24_0x1bc9c1['gray'](_0xe3fb8c(0x1b7)))),console[_0xe3fb8c(0x19d)](_0xe3fb8c(0x1b8)+(_0x174cff||a24_0x1bc9c1['gray'](_0xe3fb8c(0x1b7)))),console[_0xe3fb8c(0x19d)](),console[_0xe3fb8c(0x19d)](a24_0x1bc9c1[_0xe3fb8c(0x1b2)](_0xe3fb8c(0x193))),console[_0xe3fb8c(0x19d)](a24_0x1bc9c1[_0xe3fb8c(0x1af)](_0xe3fb8c(0x192)['repeat'](0x1e)));const _0x52adf2=(_0x1edc2c,_0x318caf)=>{const _0x5aaad4=_0xe3fb8c;if(!_0x318caf){console['log']('\x20\x20'+_0x1edc2c[_0x5aaad4(0x1a7)](0x11)+'\x20'+a24_0x1bc9c1[_0x5aaad4(0x1af)](_0x5aaad4(0x1ae)));return;}const _0x5aab41=inspectCliConfigJsonFile(_0x318caf);if(_0x5aab41[_0x5aaad4(0x1c8)]==='ok')console[_0x5aaad4(0x19d)]('\x20\x20'+_0x1edc2c['padEnd'](0x11)+'\x20'+a24_0x1bc9c1[_0x5aaad4(0x17d)]('✓\x20Valid\x20JSON'));else{if(_0x5aab41[_0x5aaad4(0x1c8)]===_0x5aaad4(0x1be))console['log']('\x20\x20'+_0x1edc2c[_0x5aaad4(0x1a7)](0x11)+'\x20'+a24_0x1bc9c1[_0x5aaad4(0x18f)](_0x5aaad4(0x1ac)));else _0x5aab41['status']===_0x5aaad4(0x1a8)?console['log']('\x20\x20'+_0x1edc2c[_0x5aaad4(0x1a7)](0x11)+'\x20'+a24_0x1bc9c1[_0x5aaad4(0x1af)]('(missing)')):(console[_0x5aaad4(0x19d)]('\x20\x20'+_0x1edc2c[_0x5aaad4(0x1a7)](0x11)+'\x20'+a24_0x1bc9c1['red'](_0x5aaad4(0x196))),console['log']('\x20\x20'+''[_0x5aaad4(0x1a7)](0x11)+'\x20'+a24_0x1bc9c1['red'](_0x5aab41['message'])));}};_0x52adf2(_0xe3fb8c(0x1bb),_0x3ebb2d),_0x52adf2(_0xe3fb8c(0x1b5),_0x174cff),console['log'](),console['log'](a24_0x1bc9c1[_0xe3fb8c(0x1b2)](_0xe3fb8c(0x176))),console[_0xe3fb8c(0x19d)](a24_0x1bc9c1[_0xe3fb8c(0x1af)](_0xe3fb8c(0x192)[_0xe3fb8c(0x1ab)](0x1e))),console[_0xe3fb8c(0x19d)](_0xe3fb8c(0x17f)+(_0x3ccab4[_0xe3fb8c(0x1aa)]||a24_0x1bc9c1[_0xe3fb8c(0x185)](_0xe3fb8c(0x184)))),console[_0xe3fb8c(0x19d)](_0xe3fb8c(0x175)+_0x3ccab4[_0xe3fb8c(0x183)]);const _0x3ffa18=isLegacyCompatConfigKey(_0xe3fb8c(0x1a4))?a24_0x1bc9c1[_0xe3fb8c(0x1af)](_0x3ccab4['locale']+_0xe3fb8c(0x181)):_0x3ccab4['locale'];console['log']('\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x3ffa18),console['log']('\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20'+(_0x3ccab4[_0xe3fb8c(0x195)]||a24_0x1bc9c1[_0xe3fb8c(0x1af)](_0xe3fb8c(0x177)))),console[_0xe3fb8c(0x19d)](_0xe3fb8c(0x19b)+(_0x3ccab4[_0xe3fb8c(0x1a3)]||a24_0x1bc9c1[_0xe3fb8c(0x1af)](_0xe3fb8c(0x177)))),console[_0xe3fb8c(0x19d)]('\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x3ccab4['format']||a24_0x1bc9c1['gray'](_0xe3fb8c(0x1bf)+DEFAULT_CONFIG_VALUES['format']+')'))),console[_0xe3fb8c(0x19d)](_0xe3fb8c(0x188)+(_0x3ccab4[_0xe3fb8c(0x198)]??a24_0x1bc9c1[_0xe3fb8c(0x1af)](_0xe3fb8c(0x17e)))),console[_0xe3fb8c(0x19d)](_0xe3fb8c(0x179)+_0x3ccab4[_0xe3fb8c(0x18d)]),console[_0xe3fb8c(0x19d)]('\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x3ccab4['verbose']),console[_0xe3fb8c(0x19d)](_0xe3fb8c(0x17b)+AUTH_MODE['ClientAk']),console[_0xe3fb8c(0x19d)]('\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20'+(_0x3ccab4[_0xe3fb8c(0x1a6)]?a24_0x1bc9c1[_0xe3fb8c(0x17d)](_0xe3fb8c(0x1b3)+_0x3ccab4[_0xe3fb8c(0x1a6)][_0xe3fb8c(0x172)]+')'):a24_0x1bc9c1[_0xe3fb8c(0x1af)](_0xe3fb8c(0x177)))),console['log'](),console[_0xe3fb8c(0x19d)](a24_0x1bc9c1[_0xe3fb8c(0x1b2)](_0xe3fb8c(0x1c2))),console['log'](a24_0x1bc9c1[_0xe3fb8c(0x1af)](_0xe3fb8c(0x192)[_0xe3fb8c(0x1ab)](0x1e))),console['log']('\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20'+getApiDomain()),console[_0xe3fb8c(0x19d)](_0xe3fb8c(0x1ba)+getUserDomain()),console['log'](_0xe3fb8c(0x19a)+getRuntimeDomain()),console[_0xe3fb8c(0x19d)](),console[_0xe3fb8c(0x19d)](a24_0x1bc9c1[_0xe3fb8c(0x1b2)](_0xe3fb8c(0x18e))),console[_0xe3fb8c(0x19d)](a24_0x1bc9c1['gray'](_0xe3fb8c(0x192)[_0xe3fb8c(0x1ab)](0x1e)));const _0x4628c6=inspectServiceRegistry();console[_0xe3fb8c(0x19d)](_0xe3fb8c(0x199)+_0x4628c6[_0xe3fb8c(0x19f)]),console[_0xe3fb8c(0x19d)](_0xe3fb8c(0x18c)+formatServiceRegistryStatus(_0x4628c6)),console[_0xe3fb8c(0x19d)](_0xe3fb8c(0x1c0)+_0x4628c6['serviceCount']),console[_0xe3fb8c(0x19d)]('\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x4628c6[_0xe3fb8c(0x1bd)]);for(const _0x546a20 of _0x4628c6[_0xe3fb8c(0x1c5)]){console[_0xe3fb8c(0x19d)]('\x20\x20'+(_0x546a20['serviceCode']+':')[_0xe3fb8c(0x1a7)](0x11)+'\x20'+(_0x546a20['name']||a24_0x1bc9c1['gray'](_0xe3fb8c(0x173)))+'\x20('+_0x546a20[_0xe3fb8c(0x1bd)]+_0xe3fb8c(0x17c)),console[_0xe3fb8c(0x19d)]('\x20\x20'+''['padEnd'](0x11)+_0xe3fb8c(0x186)+_0x546a20[_0xe3fb8c(0x19e)][_0xe3fb8c(0x1a2)]);}return console[_0xe3fb8c(0x19d)](),console[_0xe3fb8c(0x19d)](a24_0x1bc9c1['bold'](_0xe3fb8c(0x174))),console[_0xe3fb8c(0x19d)](a24_0x1bc9c1[_0xe3fb8c(0x1af)](_0xe3fb8c(0x192)[_0xe3fb8c(0x1ab)](0x1e))),console[_0xe3fb8c(0x19d)]('\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+a24_0x1bc9c1[_0xe3fb8c(0x17d)](AUTH_MODE[_0xe3fb8c(0x1c3)]+_0xe3fb8c(0x1a0))),console['log'](_0xe3fb8c(0x1b4)+a24_0x1bc9c1[_0xe3fb8c(0x1af)](_0xe3fb8c(0x1c1))),console[_0xe3fb8c(0x19d)](),{'ok':!![]};}function formatServiceRegistryStatus(_0x1fc733){const _0x1d5444=a24_0x5bcb;if(_0x1fc733[_0x1d5444(0x1c8)]==='ok')return a24_0x1bc9c1['green'](_0x1d5444(0x190));if(_0x1fc733[_0x1d5444(0x1c8)]===_0x1d5444(0x1a8))return a24_0x1bc9c1['gray']('(not\x20found)');if(_0x1fc733['status']===_0x1d5444(0x1be))return a24_0x1bc9c1[_0x1d5444(0x18f)]('⚠\x20Empty');return a24_0x1bc9c1['red'](_0x1d5444(0x1a9)+(_0x1fc733[_0x1d5444(0x18a)]?':\x20'+_0x1fc733[_0x1d5444(0x18a)]:''));}function a24_0x3094(){const _0x3f3621=['bold','(set,\x20length=','\x20\x20Session\x20check:\x20\x20\x20','Project','275991tJCmhi','(not\x20found)','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','Global','\x20doctor','commandCount','empty','(default:\x20','\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20','(removed\x20—\x20cookie\x20auth\x20disabled)','\x20\x20API\x20Endpoints','ClientAk','doctor','services','9684567RAHiez','\x20\x20Config\x20Files','status','length','(unnamed)','\x20\x20Auth','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Merged\x20Config','(none)','1538118sPJWBT','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','read','\x20\x20auth\x20(effective):\x20','\x20commands)','green','(default)','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','version','\x20(legacy/compat\x20only)','299496ULVjWl','env','(not\x20set)','red','\x20Imported\x20from:\x20','1453694xOfmco','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','35FifPdj','message','8FeJasL','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','riskLevel','\x20\x20Service\x20Tree','yellow','✓\x20Loaded','6340552wUVvyi','\x20\x20','\x20\x20Config\x20JSON','platform','defaultApp','✗\x20Invalid\x20JSON','753480xbEpfg','pageSize','\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20runtimeDomain:\x20\x20\x20','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','arch','log','source','registryPath','\x20(accessKey)','35wmEMzs','path','currentApp','locale','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','accessKey','padEnd','missing','✗\x20Invalid','appCode','repeat','⚠\x20Empty\x20(treated\x20as\x20{})','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(no\x20file)','gray','check','Diagnose\x20CLI\x20configuration\x20and\x20environment'];a24_0x3094=function(){return _0x3f3621;};return a24_0x3094();}export const doctorDefinition={'service':a24_0x4e49b3(0x1c4),'command':a24_0x4e49b3(0x1b0),'description':a24_0x4e49b3(0x1b1),'risk':a24_0x4e49b3(0x17a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
@@ -1 +1 @@
1
- const a24_0x18b4ca=a24_0x20b4;(function(_0x18c848,_0x580daf){const _0x217c7e=a24_0x20b4,_0x104f95=_0x18c848();while(!![]){try{const _0x4b42a8=-parseInt(_0x217c7e(0xd7))/0x1+-parseInt(_0x217c7e(0xa0))/0x2*(-parseInt(_0x217c7e(0xbe))/0x3)+parseInt(_0x217c7e(0xcc))/0x4+parseInt(_0x217c7e(0xab))/0x5+parseInt(_0x217c7e(0xda))/0x6+parseInt(_0x217c7e(0xa9))/0x7+-parseInt(_0x217c7e(0xdc))/0x8;if(_0x4b42a8===_0x580daf)break;else _0x104f95['push'](_0x104f95['shift']());}catch(_0x1162eb){_0x104f95['push'](_0x104f95['shift']());}}}(a24_0x3b5c,0xe6059));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':a24_0x18b4ca(0xaf),'type':a24_0x18b4ca(0xb1),'description':'App\x20code\x20for\x20the\x20project'},{'name':a24_0x18b4ca(0xac),'type':a24_0x18b4ca(0xb1),'description':'Target\x20environment\x20(default\x20'+DEFAULT_CONFIG_VALUES[a24_0x18b4ca(0xac)]+')','enum':[...RUNTIME_ENV_VALUES]},{'name':a24_0x18b4ca(0xc1),'type':a24_0x18b4ca(0xbf),'description':a24_0x18b4ca(0xb2)+PRODUCT_CONFIG[a24_0x18b4ca(0xde)]+')\x20instead\x20of\x20project','default':![]},{'name':a24_0x18b4ca(0xc3),'type':'boolean','description':'Skip\x20confirmation\x20when\x20overwriting','default':![]}];export const initImportFlagDefs=[{'name':a24_0x18b4ca(0xc6),'type':'string','description':a24_0x18b4ca(0xd1),'required':!![]},{'name':'appcode','type':a24_0x18b4ca(0xb1),'description':a24_0x18b4ca(0xb3)},{'name':a24_0x18b4ca(0xac),'type':a24_0x18b4ca(0xb1),'description':'Override\x20imported\x20default\x20env','enum':[...RUNTIME_ENV_VALUES]},{'name':a24_0x18b4ca(0xc1),'type':a24_0x18b4ca(0xbf),'description':'Write\x20to\x20global\x20(~/'+PRODUCT_CONFIG[a24_0x18b4ca(0xde)]+a24_0x18b4ca(0xa4),'default':![]},{'name':a24_0x18b4ca(0xc3),'type':a24_0x18b4ca(0xbf),'description':a24_0x18b4ca(0xb7),'default':![]}];export async function runInit(_0x2a21b5){const _0x113032=a24_0x18b4ca,_0x46be61=isNonInteractiveMode(_0x2a21b5),_0x454459=_0x2a21b5[_0x113032(0xc1)]?_0x113032(0xc1):_0x113032(0xb9),_0x58427f=resolveWriteConfigPath(_0x454459);try{_0x46be61?await runNonInteractive(_0x2a21b5,_0x58427f):await runInteractive(_0x2a21b5,_0x58427f);}catch(_0x4c2a3e){if(_0x4c2a3e instanceof AbortPrompt)throw CliErrors['cancelled']();throw _0x4c2a3e;}}export async function runInitImport(_0x2fef1b){const _0x8eff76=a24_0x18b4ca,_0x322611=_0x2fef1b['global']?_0x8eff76(0xc1):'project',_0x2e6e87=resolveWriteConfigPath(_0x322611);await runFromImport(_0x2fef1b,_0x2e6e87);}const RUNTIME_IRRELEVANT_KEYS=new Set(['apiDir']);async function runFromImport(_0x405f79,_0x480207){const _0x5180d9=a24_0x18b4ca,_0x4739d4=resolveFilePath(_0x405f79[_0x5180d9(0xc6)]);if(!existsSync(_0x4739d4))throw CliErrors[_0x5180d9(0xbd)](_0x5180d9(0xa3)+_0x4739d4);const _0x1873cf=readSourceFile(_0x4739d4),_0x597345=convertToRuntimeConfig(_0x1873cf);_0x405f79[_0x5180d9(0xaf)]&&(_0x597345[_0x5180d9(0xaf)]=String(_0x405f79[_0x5180d9(0xaf)]));_0x405f79[_0x5180d9(0xac)]&&(_0x597345[_0x5180d9(0xac)]=resolveInitEnv(_0x405f79));if(!_0x597345[_0x5180d9(0xaf)])throw CliErrors[_0x5180d9(0xbd)](_0x5180d9(0xcf),_0x5180d9(0xd6));await writeInitConfig(_0x480207,_0x597345,_0x405f79),console[_0x5180d9(0xae)](_0x5180d9(0xd5)+_0x4739d4),console[_0x5180d9(0xae)]('\x20\x20config:\x20\x20'+_0x480207),console['log'](_0x5180d9(0xad)+_0x597345[_0x5180d9(0xaf)]);if(_0x597345[_0x5180d9(0xb4)])console[_0x5180d9(0xae)](_0x5180d9(0xba)+_0x597345[_0x5180d9(0xb4)]);}function convertToRuntimeConfig(_0x496c2a){const _0x28ed6f=a24_0x18b4ca;if(_0x496c2a[_0x28ed6f(0xd3)]&&typeof _0x496c2a[_0x28ed6f(0xd3)]==='object')throw CliErrors[_0x28ed6f(0xbd)](_0x28ed6f(0xdb),'Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.');const _0x160c5e={};for(const _0x914184 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x496c2a[_0x914184]!==undefined&&(_0x160c5e[_0x914184]=_0x496c2a[_0x914184]);}return!_0x160c5e['riskLevel']&&(_0x160c5e['riskLevel']=DEFAULT_CONFIG_VALUES['riskLevel']),_0x160c5e;}async function runNonInteractive(_0x43a5fd,_0x129946){const _0x3876cb=a24_0x18b4ca,_0x420db0=_0x43a5fd[_0x3876cb(0xaf)];if(!_0x420db0)throw CliErrors[_0x3876cb(0xbc)](_0x3876cb(0xaf),_0x3876cb(0xbb)+CLI_BIN_NAME+_0x3876cb(0xca));const _0x4437c9=resolveInitEnv(_0x43a5fd);await writeInitConfig(_0x129946,{'appcode':_0x420db0,'env':_0x4437c9},_0x43a5fd),console[_0x3876cb(0xae)](_0x3876cb(0xcb)+_0x129946),console['log'](_0x3876cb(0xad)+_0x420db0),console[_0x3876cb(0xae)](_0x3876cb(0xa7)+_0x4437c9);}async function runInteractive(_0x45e569,_0x3b2182){const _0x55f0d3=a24_0x18b4ca,_0x20cb14=loadExisting(_0x3b2182),_0xa48eba=typeof _0x20cb14?.[_0x55f0d3(0xaf)]==='string'?_0x20cb14[_0x55f0d3(0xaf)]:'',_0x4d8157=resolveInitEnv(_0x45e569);console[_0x55f0d3(0xae)](CLI_BIN_NAME+_0x55f0d3(0xc7)+PRODUCT_CONFIG[_0x55f0d3(0xde)]+'\x0a');if(existsSync(_0x3b2182)&&!_0x45e569[_0x55f0d3(0xc3)]){const _0x907da9=await promptYesNo(_0x55f0d3(0xb5)+_0x3b2182+_0x55f0d3(0xc9),![]);if(!_0x907da9){console[_0x55f0d3(0xae)](_0x55f0d3(0x9f));return;}}const _0x58a2a6=typeof _0x45e569[_0x55f0d3(0xaf)]===_0x55f0d3(0xb1)?_0x45e569['appcode'][_0x55f0d3(0xc5)]():'';let _0x1db2a6=_0x58a2a6;!_0x1db2a6&&(_0x1db2a6=await promptInput(_0x55f0d3(0xc0),_0xa48eba));if(!_0x1db2a6[_0x55f0d3(0xc5)]())throw CliErrors[_0x55f0d3(0xbd)](_0x55f0d3(0xc4));await writeInitConfig(_0x3b2182,{'appcode':_0x1db2a6[_0x55f0d3(0xc5)](),'env':_0x4d8157},_0x45e569),console['log']('\x0aInitialized\x20'+_0x3b2182),console['log'](_0x55f0d3(0xad)+_0x1db2a6[_0x55f0d3(0xc5)]()),console[_0x55f0d3(0xae)]('\x20\x20env:\x20\x20\x20\x20\x20'+_0x4d8157);}async function writeInitConfig(_0x4a2bf0,_0x4a1e38,_0x3645e2){const _0x391338=a24_0x18b4ca;let _0x2311ec={};existsSync(_0x4a2bf0)&&!_0x3645e2[_0x391338(0xc3)]&&(_0x2311ec=readConfigFile(_0x4a2bf0));for(const [_0x151447,_0x2f8c42]of Object[_0x391338(0xa2)](_0x4a1e38)){_0x2f8c42!==undefined&&(_0x2311ec[_0x151447]=_0x2f8c42);}if(_0x2311ec['app'])delete _0x2311ec[_0x391338(0xa5)];writeConfigFile(_0x4a2bf0,_0x2311ec);}class AbortPrompt extends Error{constructor(){const _0x27fc52=a24_0x18b4ca;super('User\x20aborted\x20prompt'),this[_0x27fc52(0xb8)]=_0x27fc52(0xdf);}}function createSafeRl(){const _0x3378b1=a24_0x18b4ca,_0x911ee5=createInterface({'input':process['stdin'],'output':process[_0x3378b1(0xd8)]});let _0x24743b;const _0x21f649=new Promise((_0x35388c,_0x3d7f2c)=>{const _0xaa9027=_0x3378b1;_0x24743b=()=>{const _0x556fee=a24_0x20b4;_0x24743b&&(_0x911ee5[_0x556fee(0xb6)](_0x556fee(0xd0),_0x24743b),_0x24743b=undefined);try{_0x911ee5[_0x556fee(0xb0)]();}catch{}_0x3d7f2c(new AbortPrompt());},_0x911ee5[_0xaa9027(0xc8)](_0xaa9027(0xd0),_0x24743b);}),_0x307d2b=()=>{const _0x58444a=_0x3378b1;_0x24743b&&(_0x911ee5[_0x58444a(0xb6)](_0x58444a(0xd0),_0x24743b),_0x24743b=undefined);try{_0x911ee5[_0x58444a(0xb0)]();}catch{}};return{'rl':_0x911ee5,'abortPromise':_0x21f649,'disposeSuccess':_0x307d2b};}async function promptInput(_0x40d98c,_0x224219){const _0x3ab488=a24_0x18b4ca,{rl:_0x3a2809,abortPromise:_0x47e8e8,disposeSuccess:_0x5bfa9c}=createSafeRl(),_0x18ae13=new Promise(_0x551661=>{const _0x3e2e67=a24_0x20b4,_0x3ccf2a=_0x224219?'\x20\x20'+_0x40d98c+'\x20('+_0x224219+'):\x20':'\x20\x20'+_0x40d98c+':\x20';_0x3a2809[_0x3e2e67(0xdd)](_0x3ccf2a,_0x47975a=>{const _0x338fc5=_0x3e2e67;_0x5bfa9c(),_0x551661(_0x47975a[_0x338fc5(0xc5)]()||_0x224219);});});return Promise[_0x3ab488(0xc2)]([_0x18ae13,_0x47e8e8]);}function a24_0x3b5c(){const _0x46d87d=['apps','Invalid\x20env\x20\x22','Imported\x20from\x20','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`.','998449ARqwJu','stdout','utf8','9303048gCWeAJ','Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','34145744kGIkhI','question','newConfigFileName','AbortPrompt','Aborted.','2XFqfID','toLowerCase','entries','Source\x20file\x20not\x20found:\x20',')\x20instead\x20of\x20project','app','[y/N]','\x20\x20env:\x20\x20\x20\x20\x20','includes','10431064iBVCov','parse','6514075ReJMjl','env','\x20\x20appcode:\x20','log','appcode','close','string','Write\x20to\x20global\x20(~/','Override\x20imported\x20default\x20appcode','defaultApp','File\x20','removeListener','Skip\x20confirmation\x20when\x20overwriting','name','project','\x20\x20default:\x20','Usage:\x20','flagMissing','validation','2273073ieiCWE','boolean','App\x20code','global','race','yes','App\x20code\x20cannot\x20be\x20empty.','trim','file','\x20init\x20—\x20Create\x20','once','\x20already\x20exists.\x20Overwrite?','\x20app\x20init\x20--appcode\x20<code>\x20[--env\x20daily]\x20[--global]','Initialized\x20','4430680fbqjaH','message','Failed\x20to\x20parse\x20source\x20file:\x20','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','SIGINT','Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','\x22.\x20Allowed:\x20'];a24_0x3b5c=function(){return _0x46d87d;};return a24_0x3b5c();}async function promptYesNo(_0x22e7d3,_0xa88ac3){const _0x9df08a=a24_0x18b4ca,{rl:_0x2b4f2d,abortPromise:_0x116eb4,disposeSuccess:_0x2fb46c}=createSafeRl(),_0x327888=new Promise(_0x2854be=>{const _0x375e6e=a24_0x20b4,_0xf0dff1=_0xa88ac3?'[Y/n]':_0x375e6e(0xa6);_0x2b4f2d['question']('\x20\x20'+_0x22e7d3+'\x20'+_0xf0dff1+':\x20',_0x23aef9=>{const _0x1b96ba=_0x375e6e;_0x2fb46c();const _0x3afbae=_0x23aef9[_0x1b96ba(0xc5)]()[_0x1b96ba(0xa1)]();if(_0x3afbae==='y'||_0x3afbae===_0x1b96ba(0xc3))_0x2854be(!![]);else{if(_0x3afbae==='n'||_0x3afbae==='no')_0x2854be(![]);else _0x2854be(_0xa88ac3);}});});return Promise[_0x9df08a(0xc2)]([_0x327888,_0x116eb4]);}function loadExisting(_0x5b8567){if(!existsSync(_0x5b8567))return null;return readConfigFile(_0x5b8567);}function resolveFilePath(_0x5a2573){return isAbsolute(_0x5a2573)?_0x5a2573:resolve(process['cwd'](),_0x5a2573);}function a24_0x20b4(_0x4c07db,_0x125c32){_0x4c07db=_0x4c07db-0x9f;const _0x3b5c74=a24_0x3b5c();let _0x20b420=_0x3b5c74[_0x4c07db];return _0x20b420;}function readSourceFile(_0x3d1c5a){const _0x270e20=a24_0x18b4ca;try{const _0x1df1c6=readFileSync(_0x3d1c5a,{'encoding':_0x270e20(0xd9)});return JSON[_0x270e20(0xaa)](_0x1df1c6);}catch(_0xd5fe86){throw CliErrors[_0x270e20(0xbd)](_0x270e20(0xce)+_0xd5fe86[_0x270e20(0xcd)]);}}function resolveInitEnv(_0x21e546){const _0x18a3c3=a24_0x18b4ca,_0x6be098=_0x21e546[_0x18a3c3(0xac)];if(_0x6be098===undefined||_0x6be098==='')return DEFAULT_CONFIG_VALUES[_0x18a3c3(0xac)];if(!RUNTIME_ENV_VALUES[_0x18a3c3(0xa8)](_0x6be098))throw CliErrors[_0x18a3c3(0xbd)](_0x18a3c3(0xd4)+_0x6be098+_0x18a3c3(0xd2)+RUNTIME_ENV_VALUES['join'](',\x20'));return _0x6be098;}
1
+ const a25_0x148058=a25_0x249c;(function(_0x31c422,_0x54d15f){const _0x48bfd2=a25_0x249c,_0x29c26d=_0x31c422();while(!![]){try{const _0x56c657=-parseInt(_0x48bfd2(0x167))/0x1*(-parseInt(_0x48bfd2(0x196))/0x2)+-parseInt(_0x48bfd2(0x16c))/0x3+parseInt(_0x48bfd2(0x192))/0x4*(parseInt(_0x48bfd2(0x155))/0x5)+parseInt(_0x48bfd2(0x187))/0x6+parseInt(_0x48bfd2(0x191))/0x7*(parseInt(_0x48bfd2(0x16e))/0x8)+parseInt(_0x48bfd2(0x16d))/0x9*(-parseInt(_0x48bfd2(0x188))/0xa)+-parseInt(_0x48bfd2(0x175))/0xb;if(_0x56c657===_0x54d15f)break;else _0x29c26d['push'](_0x29c26d['shift']());}catch(_0x536d3e){_0x29c26d['push'](_0x29c26d['shift']());}}}(a25_0x9f7e,0xdfd40));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';function a25_0x9f7e(){const _0x3d50d8=['Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','stdout','17557562LdLzBJ','entries',')\x20instead\x20of\x20project','App\x20code','\x0aInitialized\x20','Aborted.','[y/N]','message','parse','question','validation','Initialized\x20','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','\x20already\x20exists.\x20Overwrite?','trim','global','\x20\x20default:\x20','log','5637192bTlzMI','1020650WlMywv','name','stdin','project','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','close','flagMissing','\x20\x20env:\x20\x20\x20\x20\x20','object','7NMJohu','7277104DTHAEs','yes','\x20app\x20init\x20--appcode\x20<code>\x20[--env\x20daily]\x20[--global]','):\x20','880tPEbbU','Override\x20imported\x20default\x20appcode','newConfigFileName','\x20\x20appcode:\x20','apps','riskLevel','5uLDORR','toLowerCase','includes','apiDir','Skip\x20confirmation\x20when\x20overwriting','env','appcode','race','Override\x20imported\x20default\x20env','Usage:\x20','AbortPrompt','Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','Source\x20file\x20not\x20found:\x20','\x22.\x20Allowed:\x20','SIGINT','User\x20aborted\x20prompt','Failed\x20to\x20parse\x20source\x20file:\x20','Write\x20to\x20global\x20(~/','2047HbLWGF','defaultApp','string','utf8','boolean','3123261WqhbMC','45VkuXBa','3238928wrdnmd','Invalid\x20env\x20\x22','app','removeListener','cwd'];a25_0x9f7e=function(){return _0x3d50d8;};return a25_0x9f7e();}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':a25_0x148058(0x15b),'type':a25_0x148058(0x169),'description':'App\x20code\x20for\x20the\x20project'},{'name':a25_0x148058(0x15a),'type':a25_0x148058(0x169),'description':'Target\x20environment\x20(default\x20'+DEFAULT_CONFIG_VALUES[a25_0x148058(0x15a)]+')','enum':[...RUNTIME_ENV_VALUES]},{'name':a25_0x148058(0x184),'type':a25_0x148058(0x16b),'description':a25_0x148058(0x166)+PRODUCT_CONFIG[a25_0x148058(0x198)]+')\x20instead\x20of\x20project','default':![]},{'name':'yes','type':'boolean','description':a25_0x148058(0x159),'default':![]}];export const initImportFlagDefs=[{'name':'file','type':a25_0x148058(0x169),'description':a25_0x148058(0x160),'required':!![]},{'name':a25_0x148058(0x15b),'type':a25_0x148058(0x169),'description':a25_0x148058(0x197)},{'name':a25_0x148058(0x15a),'type':'string','description':a25_0x148058(0x15d),'enum':[...RUNTIME_ENV_VALUES]},{'name':a25_0x148058(0x184),'type':a25_0x148058(0x16b),'description':a25_0x148058(0x166)+PRODUCT_CONFIG[a25_0x148058(0x198)]+a25_0x148058(0x177),'default':![]},{'name':a25_0x148058(0x193),'type':a25_0x148058(0x16b),'description':a25_0x148058(0x159),'default':![]}];export async function runInit(_0x335c45){const _0x338458=a25_0x148058,_0x3e0f6f=isNonInteractiveMode(_0x335c45),_0x55f57=_0x335c45[_0x338458(0x184)]?_0x338458(0x184):_0x338458(0x18b),_0x556de1=resolveWriteConfigPath(_0x55f57);try{_0x3e0f6f?await runNonInteractive(_0x335c45,_0x556de1):await runInteractive(_0x335c45,_0x556de1);}catch(_0x56d4ee){if(_0x56d4ee instanceof AbortPrompt)throw CliErrors['cancelled']();throw _0x56d4ee;}}export async function runInitImport(_0x29221d){const _0x3ddc64=a25_0x148058,_0x1bda01=_0x29221d['global']?_0x3ddc64(0x184):'project',_0x31887d=resolveWriteConfigPath(_0x1bda01);await runFromImport(_0x29221d,_0x31887d);}const RUNTIME_IRRELEVANT_KEYS=new Set([a25_0x148058(0x158)]);async function runFromImport(_0x466efd,_0x88aff){const _0xd9ced4=a25_0x148058,_0x4fe1c5=resolveFilePath(_0x466efd['file']);if(!existsSync(_0x4fe1c5))throw CliErrors[_0xd9ced4(0x17f)](_0xd9ced4(0x161)+_0x4fe1c5);const _0x2aec7e=readSourceFile(_0x4fe1c5),_0x2a0bc6=convertToRuntimeConfig(_0x2aec7e);_0x466efd[_0xd9ced4(0x15b)]&&(_0x2a0bc6['appcode']=String(_0x466efd[_0xd9ced4(0x15b)]));_0x466efd[_0xd9ced4(0x15a)]&&(_0x2a0bc6['env']=resolveInitEnv(_0x466efd));if(!_0x2a0bc6['appcode'])throw CliErrors[_0xd9ced4(0x17f)](_0xd9ced4(0x18c),'Provide\x20--appcode\x20<code>\x20or\x20use\x20an\x20upgraded\x20.rabetbase.json\x20with\x20top-level\x20appcode.\x20Legacy\x20files\x20must\x20be\x20upgraded\x20first\x20with\x20`rabetbase\x20project\x20upgrade`.');await writeInitConfig(_0x88aff,_0x2a0bc6,_0x466efd),console[_0xd9ced4(0x186)]('Imported\x20from\x20'+_0x4fe1c5),console[_0xd9ced4(0x186)]('\x20\x20config:\x20\x20'+_0x88aff),console['log'](_0xd9ced4(0x199)+_0x2a0bc6[_0xd9ced4(0x15b)]);if(_0x2a0bc6[_0xd9ced4(0x168)])console[_0xd9ced4(0x186)](_0xd9ced4(0x185)+_0x2a0bc6[_0xd9ced4(0x168)]);}function convertToRuntimeConfig(_0x1fe77e){const _0x4f4100=a25_0x148058;if(_0x1fe77e[_0x4f4100(0x19a)]&&typeof _0x1fe77e[_0x4f4100(0x19a)]===_0x4f4100(0x190))throw CliErrors[_0x4f4100(0x17f)](_0x4f4100(0x173),_0x4f4100(0x181));const _0x546329={};for(const _0x28b3b4 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x1fe77e[_0x28b3b4]!==undefined&&(_0x546329[_0x28b3b4]=_0x1fe77e[_0x28b3b4]);}return!_0x546329[_0x4f4100(0x19b)]&&(_0x546329['riskLevel']=DEFAULT_CONFIG_VALUES['riskLevel']),_0x546329;}async function runNonInteractive(_0x4aa9e3,_0x1c7a8c){const _0x28f961=a25_0x148058,_0x336014=_0x4aa9e3[_0x28f961(0x15b)];if(!_0x336014)throw CliErrors[_0x28f961(0x18e)](_0x28f961(0x15b),_0x28f961(0x15e)+CLI_BIN_NAME+_0x28f961(0x194));const _0x3edf85=resolveInitEnv(_0x4aa9e3);await writeInitConfig(_0x1c7a8c,{'appcode':_0x336014,'env':_0x3edf85},_0x4aa9e3),console['log'](_0x28f961(0x180)+_0x1c7a8c),console[_0x28f961(0x186)](_0x28f961(0x199)+_0x336014),console[_0x28f961(0x186)](_0x28f961(0x18f)+_0x3edf85);}async function runInteractive(_0x2c24d5,_0x41039b){const _0xa7aadc=a25_0x148058,_0xd7b152=loadExisting(_0x41039b),_0x493955=typeof _0xd7b152?.[_0xa7aadc(0x15b)]===_0xa7aadc(0x169)?_0xd7b152[_0xa7aadc(0x15b)]:'',_0x1967ad=resolveInitEnv(_0x2c24d5);console[_0xa7aadc(0x186)](CLI_BIN_NAME+'\x20init\x20—\x20Create\x20'+PRODUCT_CONFIG[_0xa7aadc(0x198)]+'\x0a');if(existsSync(_0x41039b)&&!_0x2c24d5[_0xa7aadc(0x193)]){const _0x311e71=await promptYesNo('File\x20'+_0x41039b+_0xa7aadc(0x182),![]);if(!_0x311e71){console[_0xa7aadc(0x186)](_0xa7aadc(0x17a));return;}}const _0x588e0c=typeof _0x2c24d5[_0xa7aadc(0x15b)]===_0xa7aadc(0x169)?_0x2c24d5[_0xa7aadc(0x15b)][_0xa7aadc(0x183)]():'';let _0x561adf=_0x588e0c;!_0x561adf&&(_0x561adf=await promptInput(_0xa7aadc(0x178),_0x493955));if(!_0x561adf[_0xa7aadc(0x183)]())throw CliErrors[_0xa7aadc(0x17f)]('App\x20code\x20cannot\x20be\x20empty.');await writeInitConfig(_0x41039b,{'appcode':_0x561adf['trim'](),'env':_0x1967ad},_0x2c24d5),console[_0xa7aadc(0x186)](_0xa7aadc(0x179)+_0x41039b),console[_0xa7aadc(0x186)]('\x20\x20appcode:\x20'+_0x561adf['trim']()),console[_0xa7aadc(0x186)](_0xa7aadc(0x18f)+_0x1967ad);}async function writeInitConfig(_0x3f54e3,_0x45ba2e,_0x44fe05){const _0x54e65a=a25_0x148058;let _0x5577a3={};existsSync(_0x3f54e3)&&!_0x44fe05[_0x54e65a(0x193)]&&(_0x5577a3=readConfigFile(_0x3f54e3));for(const [_0x9aaa32,_0x1d7810]of Object[_0x54e65a(0x176)](_0x45ba2e)){_0x1d7810!==undefined&&(_0x5577a3[_0x9aaa32]=_0x1d7810);}if(_0x5577a3[_0x54e65a(0x170)])delete _0x5577a3[_0x54e65a(0x170)];writeConfigFile(_0x3f54e3,_0x5577a3);}class AbortPrompt extends Error{constructor(){const _0x4ccecb=a25_0x148058;super(_0x4ccecb(0x164)),this[_0x4ccecb(0x189)]=_0x4ccecb(0x15f);}}function a25_0x249c(_0x516216,_0x187595){_0x516216=_0x516216-0x155;const _0x9f7eae=a25_0x9f7e();let _0x249ccf=_0x9f7eae[_0x516216];return _0x249ccf;}function createSafeRl(){const _0x14d381=a25_0x148058,_0x762444=createInterface({'input':process[_0x14d381(0x18a)],'output':process[_0x14d381(0x174)]});let _0x148753;const _0x2660a1=new Promise((_0x5ef964,_0xc9fb02)=>{const _0x1bf8cd=_0x14d381;_0x148753=()=>{const _0x32fab9=a25_0x249c;_0x148753&&(_0x762444[_0x32fab9(0x171)](_0x32fab9(0x163),_0x148753),_0x148753=undefined);try{_0x762444[_0x32fab9(0x18d)]();}catch{}_0xc9fb02(new AbortPrompt());},_0x762444['once'](_0x1bf8cd(0x163),_0x148753);}),_0x3fd090=()=>{const _0x251ebd=_0x14d381;_0x148753&&(_0x762444[_0x251ebd(0x171)](_0x251ebd(0x163),_0x148753),_0x148753=undefined);try{_0x762444[_0x251ebd(0x18d)]();}catch{}};return{'rl':_0x762444,'abortPromise':_0x2660a1,'disposeSuccess':_0x3fd090};}async function promptInput(_0x3fa7dd,_0x4780f3){const {rl:_0x7cb1b0,abortPromise:_0x58f296,disposeSuccess:_0x5eef6e}=createSafeRl(),_0x40d7a1=new Promise(_0x5a7c22=>{const _0x125ccb=a25_0x249c,_0x3cc2c4=_0x4780f3?'\x20\x20'+_0x3fa7dd+'\x20('+_0x4780f3+_0x125ccb(0x195):'\x20\x20'+_0x3fa7dd+':\x20';_0x7cb1b0[_0x125ccb(0x17e)](_0x3cc2c4,_0x9c58ac=>{const _0xeb152b=_0x125ccb;_0x5eef6e(),_0x5a7c22(_0x9c58ac[_0xeb152b(0x183)]()||_0x4780f3);});});return Promise['race']([_0x40d7a1,_0x58f296]);}async function promptYesNo(_0x150010,_0x187fb0){const _0x369aa5=a25_0x148058,{rl:_0x122e6d,abortPromise:_0x22d9b8,disposeSuccess:_0x3491a0}=createSafeRl(),_0x4fbc2e=new Promise(_0x4c234a=>{const _0x47a272=a25_0x249c,_0x17990c=_0x187fb0?'[Y/n]':_0x47a272(0x17b);_0x122e6d['question']('\x20\x20'+_0x150010+'\x20'+_0x17990c+':\x20',_0x2d2e6d=>{const _0x57fc97=_0x47a272;_0x3491a0();const _0x14190a=_0x2d2e6d[_0x57fc97(0x183)]()[_0x57fc97(0x156)]();if(_0x14190a==='y'||_0x14190a===_0x57fc97(0x193))_0x4c234a(!![]);else{if(_0x14190a==='n'||_0x14190a==='no')_0x4c234a(![]);else _0x4c234a(_0x187fb0);}});});return Promise[_0x369aa5(0x15c)]([_0x4fbc2e,_0x22d9b8]);}function loadExisting(_0x4ad949){if(!existsSync(_0x4ad949))return null;return readConfigFile(_0x4ad949);}function resolveFilePath(_0x1c8f9f){const _0x5acc04=a25_0x148058;return isAbsolute(_0x1c8f9f)?_0x1c8f9f:resolve(process[_0x5acc04(0x172)](),_0x1c8f9f);}function readSourceFile(_0x4b1446){const _0x1c4abd=a25_0x148058;try{const _0x2300e4=readFileSync(_0x4b1446,{'encoding':_0x1c4abd(0x16a)});return JSON[_0x1c4abd(0x17d)](_0x2300e4);}catch(_0x491781){throw CliErrors['validation'](_0x1c4abd(0x165)+_0x491781[_0x1c4abd(0x17c)]);}}function resolveInitEnv(_0x4250d1){const _0x153765=a25_0x148058,_0x20d81b=_0x4250d1[_0x153765(0x15a)];if(_0x20d81b===undefined||_0x20d81b==='')return DEFAULT_CONFIG_VALUES[_0x153765(0x15a)];if(!RUNTIME_ENV_VALUES[_0x153765(0x157)](_0x20d81b))throw CliErrors['validation'](_0x153765(0x16f)+_0x20d81b+_0x153765(0x162)+RUNTIME_ENV_VALUES['join'](',\x20'));return _0x20d81b;}
@@ -1 +1 @@
1
- const a25_0x5a53eb=a25_0x5507;(function(_0x223ac7,_0x5d38f5){const _0x5cc438=a25_0x5507,_0x5304c3=_0x223ac7();while(!![]){try{const _0x133274=-parseInt(_0x5cc438(0x113))/0x1+parseInt(_0x5cc438(0xf1))/0x2*(-parseInt(_0x5cc438(0x11d))/0x3)+parseInt(_0x5cc438(0xf0))/0x4*(-parseInt(_0x5cc438(0xfa))/0x5)+parseInt(_0x5cc438(0xee))/0x6+parseInt(_0x5cc438(0x110))/0x7+-parseInt(_0x5cc438(0x102))/0x8+-parseInt(_0x5cc438(0x118))/0x9*(-parseInt(_0x5cc438(0xe8))/0xa);if(_0x133274===_0x5d38f5)break;else _0x5304c3['push'](_0x5304c3['shift']());}catch(_0xf79ce2){_0x5304c3['push'](_0x5304c3['shift']());}}}(a25_0x31cc,0x6c932));import{existsSync,readFileSync,statSync}from'node:fs';function a25_0x5507(_0x5da177,_0x7bdfea){_0x5da177=_0x5da177-0xe5;const _0x31ccc0=a25_0x31cc();let _0x550730=_0x31ccc0[_0x5da177];return _0x550730;}import{createPersonalKnowledgeBaseItem,getPersonalKnowledgeBaseItem,listPersonalKnowledgeBaseItems,searchKnowledgeBase,updatePersonalKnowledgeBaseItem}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';function a25_0x31cc(){const _0x36828c=['docId','/client/knowledge-base/personal/','write','string','read','5913648xJnxfU','Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20','Create\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','title','--topk\x20must\x20be\x20a\x20positive\x20number.','File\x20path\x20is\x20required.','isFinite','appCode','Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file','Personal\x20knowledge-base\x20entry\x20ID','query','list','File\x20not\x20found:\x20','verbose','4931941HLTnrM','Search\x20visible\x20company\x20and\x20personal\x20knowledge\x20base\x20content','userId','32047QwlyQK','topk','str','Updated\x20KB\x20entry\x20','create','70542VTRwNI','ragStatus','Search\x20query\x20for\x20visible\x20company\x20and\x20personal\x20knowledge','body','scope','9zIwNUl','Update\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','validation','Personal\x20knowledge-base\x20entry\x20title','weightedScore','metadata','ragErrorMessage','version','detail','content','1340lYQGbg','update','Created\x20KB\x20entry\x20','map','POST','number','2230968mwNVcZ','utf8','859756YWKoAI','463846CKuWjB','bool','file','length','/update','num','score','build','description','5zKhLqs','Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22','Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id'];a25_0x31cc=function(){return _0x36828c;};return a25_0x31cc();}import{dryRun}from'../../framework/dryrun.js';const TITLE_FLAG={'name':a25_0x5a53eb(0x105),'type':a25_0x5a53eb(0x100),'required':!![],'description':a25_0x5a53eb(0x120)},FILE_FLAG={'name':'file','type':'string','required':!![],'description':a25_0x5a53eb(0x10a)},QUERY_FLAG={'name':a25_0x5a53eb(0x10c),'type':a25_0x5a53eb(0x100),'required':!![],'description':a25_0x5a53eb(0x11a)},TOPK_FLAG={'name':a25_0x5a53eb(0x114),'type':a25_0x5a53eb(0xed),'description':'Maximum\x20number\x20of\x20search\x20hits\x20to\x20return'};function readKnowledgeFile(_0x39ddec){const _0x5e7296=a25_0x5a53eb;if(!_0x39ddec)throw CliErrors['validation'](_0x5e7296(0x107));if(!existsSync(_0x39ddec))throw CliErrors[_0x5e7296(0x11f)](_0x5e7296(0x10e)+_0x39ddec);if(!statSync(_0x39ddec)['isFile']())throw CliErrors[_0x5e7296(0x11f)]('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x39ddec);return readFileSync(_0x39ddec,_0x5e7296(0xef));}function summarizePersonalItem(_0x16f058){const _0x341cbd=a25_0x5a53eb;return{'id':_0x16f058['id'],'title':_0x16f058[_0x341cbd(0x105)],'version':_0x16f058[_0x341cbd(0xe5)],'ragStatus':_0x16f058[_0x341cbd(0x119)],'ragErrorMessage':_0x16f058['ragErrorMessage'],'updateTime':_0x16f058['updateTime']};}function detailPersonalItem(_0x1478bc){const _0x3c345d=a25_0x5a53eb;return{'id':_0x1478bc['id'],'appCode':_0x1478bc[_0x3c345d(0x109)],'scope':_0x1478bc[_0x3c345d(0x11c)],'userId':_0x1478bc[_0x3c345d(0x112)],'title':_0x1478bc[_0x3c345d(0x105)],'content':_0x1478bc[_0x3c345d(0xe7)]??'','version':_0x1478bc[_0x3c345d(0xe5)],'ragStatus':_0x1478bc['ragStatus'],'ragErrorMessage':_0x1478bc[_0x3c345d(0x123)],'createTime':_0x1478bc['createTime'],'updateTime':_0x1478bc['updateTime']};}function summarizeSearchHit(_0x434eb6){const _0x15b893=a25_0x5a53eb;return{'scope':_0x434eb6[_0x15b893(0x11c)],'docId':_0x434eb6[_0x15b893(0xfd)],'score':_0x434eb6[_0x15b893(0xf7)],'weightedScore':_0x434eb6[_0x15b893(0x121)],'content':_0x434eb6['content'],'metadata':_0x434eb6[_0x15b893(0x122)]};}function readTopK(_0x32b932){const _0x39c176=a25_0x5a53eb,_0x2da464=_0x32b932['flag']('topk');if(_0x2da464===undefined||_0x2da464===null||_0x2da464==='')return undefined;const _0x334eae=_0x32b932[_0x39c176(0xf6)]('topk');if(!Number[_0x39c176(0x108)](_0x334eae)||_0x334eae<0x1)throw CliErrors['validation'](_0x39c176(0x106));return _0x334eae;}const kbList={'service':'kb','command':a25_0x5a53eb(0x10d),'description':'List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','risk':a25_0x5a53eb(0x101),'flags':[VERBOSE_FLAG],async 'execute'(_0x4a3d72){const _0x221c79=a25_0x5a53eb,_0x3d59aa=await listPersonalKnowledgeBaseItems(_0x4a3d72[_0x221c79(0x109)]);if(_0x4a3d72[_0x221c79(0xf2)](_0x221c79(0x10f)))return{'ok':!![],'data':{'total':_0x3d59aa['length'],'items':_0x3d59aa}};return{'ok':!![],'data':{'total':_0x3d59aa[_0x221c79(0xf4)],'items':_0x3d59aa['map'](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':a25_0x5a53eb(0xe6),'description':a25_0x5a53eb(0xfc),'risk':a25_0x5a53eb(0x101),'flags':[{...ID_FLAG,'description':a25_0x5a53eb(0x10b)}],async 'execute'(_0x1325db){const _0x55a9d6=a25_0x5a53eb,_0x219bbc=await getPersonalKnowledgeBaseItem(_0x1325db['num']('id'),_0x1325db[_0x55a9d6(0x109)]);return{'ok':!![],'data':detailPersonalItem(_0x219bbc)};}},kbCreate={'service':'kb','command':a25_0x5a53eb(0x117),'description':a25_0x5a53eb(0x104),'risk':a25_0x5a53eb(0xff),'flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0xb6f99c){const _0x5a520e=a25_0x5a53eb,_0x3e751b=_0xb6f99c[_0x5a520e(0x115)]('title'),_0x2254d7=readKnowledgeFile(_0xb6f99c['str']('file')),_0x411a0d=await createPersonalKnowledgeBaseItem(_0xb6f99c[_0x5a520e(0x109)],{'title':_0x3e751b,'content':_0x2254d7});return{'ok':!![],'data':summarizePersonalItem(_0x411a0d),'message':_0x5a520e(0xea)+_0x411a0d['id']+'\x20('+_0x411a0d[_0x5a520e(0x105)]+')'};},async 'dryRun'(_0x46ce9b){const _0x2c307f=a25_0x5a53eb,_0x469ea7=_0x46ce9b[_0x2c307f(0x115)](_0x2c307f(0x105)),_0x59789a=readKnowledgeFile(_0x46ce9b[_0x2c307f(0x115)](_0x2c307f(0xf3)));return dryRun('POST','/client/knowledge-base/personal/create')[_0x2c307f(0x11b)]({'appCode':_0x46ce9b[_0x2c307f(0x109)],'title':_0x469ea7,'content':_0x59789a})[_0x2c307f(0xf9)](_0x2c307f(0xfb)+_0x469ea7+'\x22')['build']();}},kbUpdate={'service':'kb','command':a25_0x5a53eb(0xe9),'description':a25_0x5a53eb(0x11e),'risk':a25_0x5a53eb(0xff),'flags':[{...ID_FLAG,'description':a25_0x5a53eb(0x10b)},{...TITLE_FLAG,'required':![],'description':'Override\x20the\x20existing\x20entry\x20title'},FILE_FLAG],async 'execute'(_0x2fdfde){const _0x301160=a25_0x5a53eb,_0x19d53c=_0x2fdfde[_0x301160(0xf6)]('id'),_0x14ad9a=readKnowledgeFile(_0x2fdfde['str'](_0x301160(0xf3))),_0x5a3fe1=_0x2fdfde['str'](_0x301160(0x105))||(await getPersonalKnowledgeBaseItem(_0x19d53c,_0x2fdfde[_0x301160(0x109)]))[_0x301160(0x105)],_0x220291=await updatePersonalKnowledgeBaseItem(_0x19d53c,_0x2fdfde['appCode'],{'title':_0x5a3fe1,'content':_0x14ad9a});return{'ok':!![],'data':summarizePersonalItem(_0x220291),'message':_0x301160(0x116)+_0x220291['id']+'\x20('+_0x220291[_0x301160(0x105)]+')'};},async 'dryRun'(_0x48ceef){const _0x11a5c0=a25_0x5a53eb,_0x30b0dd=_0x48ceef[_0x11a5c0(0xf6)]('id'),_0xd42acf=readKnowledgeFile(_0x48ceef['str'](_0x11a5c0(0xf3))),_0x2a198b=_0x48ceef['str'](_0x11a5c0(0x105))||(await getPersonalKnowledgeBaseItem(_0x30b0dd,_0x48ceef[_0x11a5c0(0x109)]))[_0x11a5c0(0x105)];return dryRun(_0x11a5c0(0xec),_0x11a5c0(0xfe)+_0x30b0dd+_0x11a5c0(0xf5))[_0x11a5c0(0x11b)]({'appCode':_0x48ceef[_0x11a5c0(0x109)],'title':_0x2a198b,'content':_0xd42acf})[_0x11a5c0(0xf9)](_0x11a5c0(0x103)+_0x30b0dd)[_0x11a5c0(0xf8)]();}},kbSearch={'service':'kb','command':'search','description':a25_0x5a53eb(0x111),'risk':a25_0x5a53eb(0x101),'flags':[QUERY_FLAG,TOPK_FLAG],async 'validate'(_0x365251){const _0x36e3c3=a25_0x5a53eb;if(!_0x365251[_0x36e3c3(0x115)](_0x36e3c3(0x10c))['trim']())throw CliErrors['validation']('Search\x20query\x20is\x20required.');readTopK(_0x365251);},async 'execute'(_0x2ca8d7){const _0x35b8e9=a25_0x5a53eb,_0x3fc417=_0x2ca8d7[_0x35b8e9(0x115)](_0x35b8e9(0x10c))['trim'](),_0x36307c=readTopK(_0x2ca8d7),_0x547003=await searchKnowledgeBase(_0x2ca8d7[_0x35b8e9(0x109)],{'query':_0x3fc417,'topK':_0x36307c});return{'ok':!![],'data':{'total':_0x547003[_0x35b8e9(0xf4)],'hits':_0x547003[_0x35b8e9(0xeb)](summarizeSearchHit)}};}};export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];
1
+ const a26_0x2a248c=a26_0x1f22;(function(_0x408936,_0x5bfe17){const _0xc6c890=a26_0x1f22,_0x389e4e=_0x408936();while(!![]){try{const _0xcee79=parseInt(_0xc6c890(0x1db))/0x1*(parseInt(_0xc6c890(0x1c7))/0x2)+-parseInt(_0xc6c890(0x1a9))/0x3*(parseInt(_0xc6c890(0x1d0))/0x4)+parseInt(_0xc6c890(0x1a5))/0x5+parseInt(_0xc6c890(0x19a))/0x6+parseInt(_0xc6c890(0x1cd))/0x7*(-parseInt(_0xc6c890(0x1b3))/0x8)+parseInt(_0xc6c890(0x1bd))/0x9*(-parseInt(_0xc6c890(0x1dc))/0xa)+-parseInt(_0xc6c890(0x1b1))/0xb*(-parseInt(_0xc6c890(0x1d7))/0xc);if(_0xcee79===_0x5bfe17)break;else _0x389e4e['push'](_0x389e4e['shift']());}catch(_0x27ac25){_0x389e4e['push'](_0x389e4e['shift']());}}}(a26_0x39f4,0x5e093));function a26_0x1f22(_0x50ef0e,_0x4db6d9){_0x50ef0e=_0x50ef0e-0x199;const _0x39f481=a26_0x39f4();let _0x1f2225=_0x39f481[_0x50ef0e];return _0x1f2225;}function a26_0x39f4(){const _0xc36936=['Update\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','createTime','11RTznRe','search','456776TMlNPo','bool','content','score','Create\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file','metadata','POST','map','userId','76635qBVqyb','updateTime','/client/knowledge-base/personal/','verbose','title','File\x20not\x20found:\x20','ragErrorMessage','Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20','query','body','1686FLWzMR','list','Search\x20query\x20for\x20visible\x20company\x20and\x20personal\x20knowledge','--topk\x20must\x20be\x20a\x20positive\x20number.','build','write','14WfyfVi','update','description','136ccJfGm','detail','Created\x20KB\x20entry\x20','/client/knowledge-base/personal/create','Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22','num','isFile','10754916cUPmfr','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','flag','docId','335KgKWvu','690xTYfpk','version','file','string','23904sAqxSx','validation','Override\x20the\x20existing\x20entry\x20title','length','create','utf8','str','scope','read','weightedScore','trim','1316370YYKpZX','Search\x20query\x20is\x20required.','Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','Updated\x20KB\x20entry\x20','31677fTTqvH','Personal\x20knowledge-base\x20entry\x20ID','ragStatus','Search\x20visible\x20company\x20and\x20personal\x20knowledge\x20base\x20content','topk','appCode'];a26_0x39f4=function(){return _0xc36936;};return a26_0x39f4();}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':a26_0x2a248c(0x1c1),'type':a26_0x2a248c(0x199),'required':!![],'description':'Personal\x20knowledge-base\x20entry\x20title'},FILE_FLAG={'name':a26_0x2a248c(0x1de),'type':'string','required':!![],'description':a26_0x2a248c(0x1b8)},QUERY_FLAG={'name':'query','type':a26_0x2a248c(0x199),'required':!![],'description':a26_0x2a248c(0x1c9)},TOPK_FLAG={'name':a26_0x2a248c(0x1ad),'type':'number','description':a26_0x2a248c(0x1d8)};function readKnowledgeFile(_0x581993){const _0x427e75=a26_0x2a248c;if(!_0x581993)throw CliErrors[_0x427e75(0x19b)]('File\x20path\x20is\x20required.');if(!existsSync(_0x581993))throw CliErrors[_0x427e75(0x19b)](_0x427e75(0x1c2)+_0x581993);if(!statSync(_0x581993)[_0x427e75(0x1d6)]())throw CliErrors[_0x427e75(0x19b)]('File\x20is\x20not\x20a\x20regular\x20file:\x20'+_0x581993);return readFileSync(_0x581993,_0x427e75(0x19f));}function summarizePersonalItem(_0x1c89a2){const _0x275443=a26_0x2a248c;return{'id':_0x1c89a2['id'],'title':_0x1c89a2[_0x275443(0x1c1)],'version':_0x1c89a2[_0x275443(0x1dd)],'ragStatus':_0x1c89a2[_0x275443(0x1ab)],'ragErrorMessage':_0x1c89a2[_0x275443(0x1c3)],'updateTime':_0x1c89a2['updateTime']};}function detailPersonalItem(_0xaa2943){const _0x112e9d=a26_0x2a248c;return{'id':_0xaa2943['id'],'appCode':_0xaa2943[_0x112e9d(0x1ae)],'scope':_0xaa2943[_0x112e9d(0x1a1)],'userId':_0xaa2943[_0x112e9d(0x1bc)],'title':_0xaa2943[_0x112e9d(0x1c1)],'content':_0xaa2943[_0x112e9d(0x1b5)]??'','version':_0xaa2943[_0x112e9d(0x1dd)],'ragStatus':_0xaa2943[_0x112e9d(0x1ab)],'ragErrorMessage':_0xaa2943[_0x112e9d(0x1c3)],'createTime':_0xaa2943[_0x112e9d(0x1b0)],'updateTime':_0xaa2943[_0x112e9d(0x1be)]};}function summarizeSearchHit(_0x2438cb){const _0x512264=a26_0x2a248c;return{'scope':_0x2438cb[_0x512264(0x1a1)],'docId':_0x2438cb[_0x512264(0x1da)],'score':_0x2438cb[_0x512264(0x1b6)],'weightedScore':_0x2438cb[_0x512264(0x1a3)],'content':_0x2438cb[_0x512264(0x1b5)],'metadata':_0x2438cb[_0x512264(0x1b9)]};}function readTopK(_0x53f89a){const _0x16386a=a26_0x2a248c,_0x2121a6=_0x53f89a[_0x16386a(0x1d9)](_0x16386a(0x1ad));if(_0x2121a6===undefined||_0x2121a6===null||_0x2121a6==='')return undefined;const _0x482b0d=_0x53f89a[_0x16386a(0x1d5)](_0x16386a(0x1ad));if(!Number['isFinite'](_0x482b0d)||_0x482b0d<0x1)throw CliErrors[_0x16386a(0x19b)](_0x16386a(0x1ca));return _0x482b0d;}const kbList={'service':'kb','command':a26_0x2a248c(0x1c8),'description':'List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','risk':'read','flags':[VERBOSE_FLAG],async 'execute'(_0x29c63b){const _0x16f479=a26_0x2a248c,_0x45c405=await listPersonalKnowledgeBaseItems(_0x29c63b[_0x16f479(0x1ae)]);if(_0x29c63b[_0x16f479(0x1b4)](_0x16f479(0x1c0)))return{'ok':!![],'data':{'total':_0x45c405[_0x16f479(0x19d)],'items':_0x45c405}};return{'ok':!![],'data':{'total':_0x45c405[_0x16f479(0x19d)],'items':_0x45c405[_0x16f479(0x1bb)](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':a26_0x2a248c(0x1d1),'description':a26_0x2a248c(0x1a7),'risk':a26_0x2a248c(0x1a2),'flags':[{...ID_FLAG,'description':a26_0x2a248c(0x1aa)}],async 'execute'(_0x40296a){const _0x3738f9=a26_0x2a248c,_0x3fb520=await getPersonalKnowledgeBaseItem(_0x40296a['num']('id'),_0x40296a[_0x3738f9(0x1ae)]);return{'ok':!![],'data':detailPersonalItem(_0x3fb520)};}},kbCreate={'service':'kb','command':a26_0x2a248c(0x19e),'description':a26_0x2a248c(0x1b7),'risk':a26_0x2a248c(0x1cc),'flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x363aae){const _0x5d8660=a26_0x2a248c,_0x1695e6=_0x363aae[_0x5d8660(0x1a0)](_0x5d8660(0x1c1)),_0x5dce10=readKnowledgeFile(_0x363aae['str']('file')),_0x281e78=await createPersonalKnowledgeBaseItem(_0x363aae['appCode'],{'title':_0x1695e6,'content':_0x5dce10});return{'ok':!![],'data':summarizePersonalItem(_0x281e78),'message':_0x5d8660(0x1d2)+_0x281e78['id']+'\x20('+_0x281e78[_0x5d8660(0x1c1)]+')'};},async 'dryRun'(_0x460c4f){const _0x25f33c=a26_0x2a248c,_0x40f616=_0x460c4f[_0x25f33c(0x1a0)](_0x25f33c(0x1c1)),_0x2955c5=readKnowledgeFile(_0x460c4f['str'](_0x25f33c(0x1de)));return dryRun(_0x25f33c(0x1ba),_0x25f33c(0x1d3))[_0x25f33c(0x1c6)]({'appCode':_0x460c4f[_0x25f33c(0x1ae)],'title':_0x40f616,'content':_0x2955c5})[_0x25f33c(0x1cf)](_0x25f33c(0x1d4)+_0x40f616+'\x22')['build']();}},kbUpdate={'service':'kb','command':a26_0x2a248c(0x1ce),'description':a26_0x2a248c(0x1af),'risk':a26_0x2a248c(0x1cc),'flags':[{...ID_FLAG,'description':'Personal\x20knowledge-base\x20entry\x20ID'},{...TITLE_FLAG,'required':![],'description':a26_0x2a248c(0x19c)},FILE_FLAG],async 'execute'(_0x1b63ba){const _0x1cbf03=a26_0x2a248c,_0x433ee1=_0x1b63ba[_0x1cbf03(0x1d5)]('id'),_0x424f89=readKnowledgeFile(_0x1b63ba[_0x1cbf03(0x1a0)]('file')),_0x13e57b=_0x1b63ba[_0x1cbf03(0x1a0)]('title')||(await getPersonalKnowledgeBaseItem(_0x433ee1,_0x1b63ba[_0x1cbf03(0x1ae)]))[_0x1cbf03(0x1c1)],_0x4ced40=await updatePersonalKnowledgeBaseItem(_0x433ee1,_0x1b63ba[_0x1cbf03(0x1ae)],{'title':_0x13e57b,'content':_0x424f89});return{'ok':!![],'data':summarizePersonalItem(_0x4ced40),'message':_0x1cbf03(0x1a8)+_0x4ced40['id']+'\x20('+_0x4ced40[_0x1cbf03(0x1c1)]+')'};},async 'dryRun'(_0x248c75){const _0x2ece32=a26_0x2a248c,_0x32d3e2=_0x248c75['num']('id'),_0x2a241f=readKnowledgeFile(_0x248c75[_0x2ece32(0x1a0)](_0x2ece32(0x1de))),_0x404c25=_0x248c75[_0x2ece32(0x1a0)]('title')||(await getPersonalKnowledgeBaseItem(_0x32d3e2,_0x248c75['appCode']))['title'];return dryRun(_0x2ece32(0x1ba),_0x2ece32(0x1bf)+_0x32d3e2+'/update')[_0x2ece32(0x1c6)]({'appCode':_0x248c75[_0x2ece32(0x1ae)],'title':_0x404c25,'content':_0x2a241f})[_0x2ece32(0x1cf)](_0x2ece32(0x1c4)+_0x32d3e2)[_0x2ece32(0x1cb)]();}},kbSearch={'service':'kb','command':a26_0x2a248c(0x1b2),'description':a26_0x2a248c(0x1ac),'risk':a26_0x2a248c(0x1a2),'flags':[QUERY_FLAG,TOPK_FLAG],async 'validate'(_0x3303fc){const _0x23623e=a26_0x2a248c;if(!_0x3303fc[_0x23623e(0x1a0)]('query')[_0x23623e(0x1a4)]())throw CliErrors['validation'](_0x23623e(0x1a6));readTopK(_0x3303fc);},async 'execute'(_0x2a954b){const _0x3aa6a7=a26_0x2a248c,_0x59d9bc=_0x2a954b['str'](_0x3aa6a7(0x1c5))['trim'](),_0x57cc34=readTopK(_0x2a954b),_0x23cff0=await searchKnowledgeBase(_0x2a954b['appCode'],{'query':_0x59d9bc,'topK':_0x57cc34});return{'ok':!![],'data':{'total':_0x23cff0[_0x3aa6a7(0x19d)],'hits':_0x23cff0[_0x3aa6a7(0x1bb)](summarizeSearchHit)}};}};export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];