@lovrabet/lovrabet-cli 2.1.3 → 2.1.4-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) 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 -1
  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/cli-skill/index.js +1 -1
  16. package/lib/commands/common/config-policy.js +1 -1
  17. package/lib/commands/common/constraints.js +1 -1
  18. package/lib/commands/common/flags.js +1 -1
  19. package/lib/commands/config/definitions.js +1 -1
  20. package/lib/commands/config/shared.js +1 -1
  21. package/lib/commands/data/index.js +1 -1
  22. package/lib/commands/dataset/detail.js +1 -1
  23. package/lib/commands/dataset/index.js +1 -1
  24. package/lib/commands/dataset/list.js +1 -1
  25. package/lib/commands/dataset/sdk-doc.js +1 -1
  26. package/lib/commands/doctor.js +1 -1
  27. package/lib/commands/init.js +1 -1
  28. package/lib/commands/kb/index.js +1 -1
  29. package/lib/commands/logs/index.js +1 -1
  30. package/lib/commands/personal-bff/index.js +1 -1
  31. package/lib/commands/registry.js +1 -1
  32. package/lib/commands/schema.js +1 -1
  33. package/lib/commands/service/dynamic.js +1 -1
  34. package/lib/commands/service/index.js +1 -1
  35. package/lib/commands/service/registry.js +1 -1
  36. package/lib/commands/skill/commands/create.js +1 -1
  37. package/lib/commands/skill/commands/install.js +1 -1
  38. package/lib/commands/skill/commands/list.js +1 -1
  39. package/lib/commands/skill/commands/push.js +1 -1
  40. package/lib/commands/skill/commands/validate.js +1 -1
  41. package/lib/commands/skill/flags.js +1 -1
  42. package/lib/commands/skill/index.js +1 -1
  43. package/lib/commands/skill/manifest-helpers.js +1 -1
  44. package/lib/commands/skill/scopes.js +1 -1
  45. package/lib/commands/skill/summary.js +1 -1
  46. package/lib/commands/skill/templates.js +1 -1
  47. package/lib/commands/skill/validate.js +1 -1
  48. package/lib/commands/sql/detail.js +1 -1
  49. package/lib/commands/sql/exec.js +1 -1
  50. package/lib/commands/sql/index.js +1 -1
  51. package/lib/commands/update.js +1 -1
  52. package/lib/commands/workspace/index.js +1 -1
  53. package/lib/config/schema.js +1 -1
  54. package/lib/constant/app.js +1 -1
  55. package/lib/constant/auth-mode.js +1 -1
  56. package/lib/constant/cli.js +1 -1
  57. package/lib/constant/defaults.js +1 -1
  58. package/lib/constant/distribution.js +1 -1
  59. package/lib/constant/domain.js +1 -1
  60. package/lib/constant/env.js +1 -1
  61. package/lib/constant/output.js +1 -1
  62. package/lib/constant/product.js +1 -1
  63. package/lib/constant/risk.js +1 -1
  64. package/lib/constant/url.js +1 -1
  65. package/lib/context.js +1 -1
  66. package/lib/core/api-client.js +1 -1
  67. package/lib/core/db-resolver.js +1 -1
  68. package/lib/core/sdk-client.js +1 -1
  69. package/lib/errors.js +1 -1
  70. package/lib/framework/build-all-flags.js +1 -1
  71. package/lib/framework/dryrun.js +1 -1
  72. package/lib/framework/flags.js +1 -1
  73. package/lib/framework/help.js +1 -1
  74. package/lib/framework/index.js +1 -1
  75. package/lib/framework/output.js +1 -1
  76. package/lib/framework/preparse.js +1 -1
  77. package/lib/framework/response.js +1 -1
  78. package/lib/framework/runner-confirmation.js +1 -1
  79. package/lib/framework/runner-error.js +1 -1
  80. package/lib/framework/runner.js +1 -1
  81. package/lib/framework/schema-export.js +1 -1
  82. package/lib/framework/types.js +1 -1
  83. package/lib/generated/build-info.js +1 -1
  84. package/lib/help.js +1 -1
  85. package/lib/skills/npx-skills-add.js +1 -1
  86. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  87. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  88. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  89. package/lib/skills/runtime-skill-sync/links.js +1 -1
  90. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  91. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  92. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  93. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  94. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  95. package/lib/skills/runtime-skill-sync/push.js +1 -1
  96. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  97. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  98. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  99. package/lib/skills/runtime-skill-sync.js +1 -1
  100. package/lib/utils/apply-jq-filter.js +1 -1
  101. package/lib/utils/logger.js +1 -1
  102. package/lib/utils/params.js +1 -1
  103. package/lib/utils/platform.js +1 -1
  104. package/lib/utils/update-notice.js +1 -1
  105. package/lib/utils/version.js +1 -1
  106. package/lib/utils/write-cli-side-channel.js +1 -1
  107. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x1ed6b8,_0xa9fa65){const _0x424b34=a15_0x591d,_0x510371=_0x1ed6b8();while(!![]){try{const _0x24e6ab=parseInt(_0x424b34(0x17c))/0x1*(-parseInt(_0x424b34(0x17d))/0x2)+parseInt(_0x424b34(0x172))/0x3+parseInt(_0x424b34(0x176))/0x4+-parseInt(_0x424b34(0x181))/0x5*(parseInt(_0x424b34(0x175))/0x6)+parseInt(_0x424b34(0x174))/0x7+parseInt(_0x424b34(0x16d))/0x8*(-parseInt(_0x424b34(0x182))/0x9)+parseInt(_0x424b34(0x180))/0xa*(parseInt(_0x424b34(0x177))/0xb);if(_0x24e6ab===_0xa9fa65)break;else _0x510371['push'](_0x510371['shift']());}catch(_0xe0b357){_0x510371['push'](_0x510371['shift']());}}}(a15_0x1f8d,0x2ab5f));import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG}from'../../constant/product.js';export{DEFAULT_APP_PROFILE_NAME,DEFAULT_CONFIG_VALUES}from'../../constant/defaults.js';export{RUNTIME_ENV_VALUES}from'../../constant/env.js';export{OUTPUT_FORMAT_VALUES}from'../../constant/output.js';import{isInProject}from'../../context.js';import{CliErrors}from'../../errors.js';export{buildAppProfileListFields,CONFIG_ENUM_VALUES,IMPORTABLE_RUNTIME_CONFIG_KEYS,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getConfigDefaultValue,getConfigEnumValues,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isLegacyCompatConfigKey,isTopLevelConfigKey}from'../../config/schema.js';export function resolveConfigScope(_0x46f667){const _0x5476a6=a15_0x591d,{explicitGlobal:explicitGlobal=![],explicitProject:explicitProject=![],policy:_0x427cef}=_0x46f667;if(explicitGlobal&&explicitProject)throw CliErrors[_0x5476a6(0x184)](_0x5476a6(0x171),_0x5476a6(0x16e));if(explicitGlobal)return'global';if(explicitProject)return'project';switch(_0x427cef){case _0x5476a6(0x16f):return _0x5476a6(0x17a);case'project-default':return _0x46f667[_0x5476a6(0x170)]??isInProject()?_0x5476a6(0x178):_0x5476a6(0x17a);case _0x5476a6(0x183):if(!(_0x46f667[_0x5476a6(0x170)]??isInProject()))throw CliErrors[_0x5476a6(0x184)](_0x5476a6(0x17f)+PRODUCT_CONFIG[_0x5476a6(0x17e)]+'\x20found).',_0x5476a6(0x17b)+PRODUCT_CONFIG[_0x5476a6(0x17e)]+_0x5476a6(0x173)+CLI_BIN_NAME+_0x5476a6(0x179));return'project';}}function a15_0x591d(_0x2b113c,_0x1781f5){_0x2b113c=_0x2b113c-0x16c;const _0x1f8d5c=a15_0x1f8d();let _0x591d16=_0x1f8d5c[_0x2b113c];return _0x591d16;}export function toScopeFlags(_0x1549b9){const _0x248261=a15_0x591d;return{'global':_0x1549b9===_0x248261(0x17a)};}export function formatScopeLabel(_0xc61048){const _0x3e4626=a15_0x591d;return _0xc61048===_0x3e4626(0x17a)?_0x3e4626(0x16c):'';}function a15_0x1f8d(){const _0x369b22=['477636fdtWRf','506HqvJvh','project','\x20init`\x20first.','global','Add\x20--global\x20to\x20write\x20to\x20~/','3QOUQwv','154382cOuFON','newConfigFileName','Not\x20inside\x20a\x20project\x20(no\x20','57860fGxDdX','20270QwRrsY','627687pvKKOR','project-or-global-explicit','validation','\x20(global)','40XCFcgM','Use\x20only\x20one\x20config\x20scope\x20flag.','global-default','inProject','Flags\x20--global\x20and\x20--project\x20are\x20mutually\x20exclusive.','871119GdehrO',',\x20or\x20run\x20`','2172597fhwxQQ','342YEtcgK'];a15_0x1f8d=function(){return _0x369b22;};return a15_0x1f8d();}
1
+ (function(_0x5385c0,_0x38e82c){const _0x487531=a15_0x4c21,_0x5ebc25=_0x5385c0();while(!![]){try{const _0xbd06db=parseInt(_0x487531(0x1e0))/0x1+parseInt(_0x487531(0x1dd))/0x2*(-parseInt(_0x487531(0x1ee))/0x3)+parseInt(_0x487531(0x1e4))/0x4*(parseInt(_0x487531(0x1f0))/0x5)+parseInt(_0x487531(0x1e7))/0x6+parseInt(_0x487531(0x1df))/0x7+-parseInt(_0x487531(0x1e6))/0x8+-parseInt(_0x487531(0x1eb))/0x9*(parseInt(_0x487531(0x1ed))/0xa);if(_0xbd06db===_0x38e82c)break;else _0x5ebc25['push'](_0x5ebc25['shift']());}catch(_0x2c558e){_0x5ebc25['push'](_0x5ebc25['shift']());}}}(a15_0x3a99,0xa56c3));import{CLI_BIN_NAME}from'../../constant/cli.js';import{PRODUCT_CONFIG}from'../../constant/product.js';export{DEFAULT_APP_PROFILE_NAME,DEFAULT_CONFIG_VALUES}from'../../constant/defaults.js';export{RUNTIME_ENV_VALUES}from'../../constant/env.js';export{OUTPUT_FORMAT_VALUES}from'../../constant/output.js';import{isInProject}from'../../context.js';import{CliErrors}from'../../errors.js';export{buildAppProfileListFields,CONFIG_ENUM_VALUES,IMPORTABLE_RUNTIME_CONFIG_KEYS,TOP_LEVEL_CONFIG_KEYS,getConfigCommandKeyDescription,getConfigDefaultValue,getConfigEnumValues,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isLegacyCompatConfigKey,isTopLevelConfigKey}from'../../config/schema.js';export function resolveConfigScope(_0xe81797){const _0x558989=a15_0x4c21,{explicitGlobal:explicitGlobal=![],explicitProject:explicitProject=![],policy:_0x594e14}=_0xe81797;if(explicitGlobal&&explicitProject)throw CliErrors[_0x558989(0x1da)](_0x558989(0x1dc),_0x558989(0x1e5));if(explicitGlobal)return _0x558989(0x1db);if(explicitProject)return _0x558989(0x1e9);switch(_0x594e14){case'global-default':return _0x558989(0x1db);case _0x558989(0x1e1):return _0xe81797[_0x558989(0x1ea)]??isInProject()?_0x558989(0x1e9):_0x558989(0x1db);case _0x558989(0x1e3):if(!(_0xe81797[_0x558989(0x1ea)]??isInProject()))throw CliErrors['validation'](_0x558989(0x1ec)+PRODUCT_CONFIG['newConfigFileName']+_0x558989(0x1de),'Add\x20--global\x20to\x20write\x20to\x20~/'+PRODUCT_CONFIG['newConfigFileName']+_0x558989(0x1e8)+CLI_BIN_NAME+_0x558989(0x1ef));return'project';}}function a15_0x4c21(_0x5c3564,_0x4862d8){_0x5c3564=_0x5c3564-0x1da;const _0x3a9903=a15_0x3a99();let _0x4c217c=_0x3a9903[_0x5c3564];return _0x4c217c;}export function toScopeFlags(_0x5806d5){const _0x1e1724=a15_0x4c21;return{'global':_0x5806d5===_0x1e1724(0x1db)};}export function formatScopeLabel(_0xd5dcf7){const _0x153ed3=a15_0x4c21;return _0xd5dcf7==='global'?_0x153ed3(0x1e2):'';}function a15_0x3a99(){const _0x1f3f09=['project-default','\x20(global)','project-or-global-explicit','692NNowrc','Use\x20only\x20one\x20config\x20scope\x20flag.','5361072wcYeGp','4746156sjVRJf',',\x20or\x20run\x20`','project','inProject','1701rBsGkZ','Not\x20inside\x20a\x20project\x20(no\x20','32410JbTDuF','459717mqQUna','\x20init`\x20first.','11065WNGnGK','validation','global','Flags\x20--global\x20and\x20--project\x20are\x20mutually\x20exclusive.','2qXtToC','\x20found).','5004447sTbdgN','224697JrPVxd'];a15_0x3a99=function(){return _0x1f3f09;};return a15_0x3a99();}
@@ -1 +1 @@
1
- (function(_0x191381,_0x163545){const _0x17f2ba=a16_0x5d65,_0x4c7d62=_0x191381();while(!![]){try{const _0x3e6a0f=parseInt(_0x17f2ba(0x1a8))/0x1+-parseInt(_0x17f2ba(0x1ad))/0x2*(parseInt(_0x17f2ba(0x19c))/0x3)+parseInt(_0x17f2ba(0x199))/0x4*(parseInt(_0x17f2ba(0x1a5))/0x5)+parseInt(_0x17f2ba(0x1b5))/0x6+parseInt(_0x17f2ba(0x1b0))/0x7+-parseInt(_0x17f2ba(0x1b4))/0x8+parseInt(_0x17f2ba(0x19d))/0x9*(-parseInt(_0x17f2ba(0x1a1))/0xa);if(_0x3e6a0f===_0x163545)break;else _0x4c7d62['push'](_0x4c7d62['shift']());}catch(_0x35fe00){_0x4c7d62['push'](_0x4c7d62['shift']());}}}(a16_0xcbf5,0x94afc));function a16_0xcbf5(){const _0x2b523a=['Exactly\x20one\x20of\x20','4774248YVEqBW','6244068leFfmE','156PQBuuB','test','map','2487wORqNy','364365eSydIY','Use\x20only\x20one\x20of:\x20','Remove\x20all\x20but\x20one.','filter','520hSXTGG','Invalid\x20--','length',',\x20got\x20\x22','126955IXinyj','\x20are\x20mutually\x20exclusive\x20for\x20`','some','1200453vMGvMx','At\x20least\x20one\x20of\x20','Only\x20one\x20of\x20','\x20is\x20required\x20for\x20`','\x20is\x20allowed,\x20found:\x20','2318mxPjDu','Provide\x20one\x20of:\x20','flag','7283164EbGjIX','join','validation'];a16_0xcbf5=function(){return _0x2b523a;};return a16_0xcbf5();}function a16_0x5d65(_0x544d9b,_0x18f1a2){_0x544d9b=_0x544d9b-0x199;const _0xcbf548=a16_0xcbf5();let _0x5d650f=_0xcbf548[_0x544d9b];return _0x5d650f;}import{CliErrors}from'../../errors.js';function isSet(_0x2295f7,_0x4aaf19){const _0x1d34ea=a16_0x5d65,_0x5d001a=_0x2295f7[_0x1d34ea(0x1af)](_0x4aaf19);return _0x5d001a!==undefined&&_0x5d001a!==''&&_0x5d001a!==![]&&_0x5d001a!==0x0;}function fmtNames(_0x44ec07){const _0x4755d3=a16_0x5d65;return _0x44ec07[_0x4755d3(0x19b)](_0x4986c7=>'--'+_0x4986c7)[_0x4755d3(0x1b1)](',\x20');}export function requireOneOf(_0x5c9935,_0x42f2f3,_0x32b96d){const _0x344a97=a16_0x5d65,_0x2911e9=_0x42f2f3[_0x344a97(0x1a0)](_0x2e4fa9=>isSet(_0x5c9935,_0x2e4fa9));if(_0x2911e9['length']!==0x1)throw CliErrors[_0x344a97(0x1b2)](_0x2911e9[_0x344a97(0x1a3)]===0x0?_0x344a97(0x1b3)+fmtNames(_0x42f2f3)+_0x344a97(0x1ab)+_0x32b96d+'`.':_0x344a97(0x1aa)+fmtNames(_0x42f2f3)+_0x344a97(0x1ac)+fmtNames(_0x2911e9)+'.',_0x2911e9['length']===0x0?_0x344a97(0x1ae)+fmtNames(_0x42f2f3):_0x344a97(0x19f));}export function requireAnyOf(_0xbede75,_0x289cb8,_0x5a43af){const _0x4a9a04=a16_0x5d65;if(!_0x289cb8[_0x4a9a04(0x1a7)](_0x34cb5a=>isSet(_0xbede75,_0x34cb5a)))throw CliErrors[_0x4a9a04(0x1b2)](_0x4a9a04(0x1a9)+fmtNames(_0x289cb8)+_0x4a9a04(0x1ab)+_0x5a43af+'`.',_0x4a9a04(0x1ae)+fmtNames(_0x289cb8));}export function mutuallyExclusive(_0x2b94de,_0x6cc87a,_0x5beb8a){const _0x567230=a16_0x5d65,_0x43d599=_0x6cc87a['filter'](_0x6853a2=>isSet(_0x2b94de,_0x6853a2));if(_0x43d599['length']>0x1)throw CliErrors['validation']('Flags\x20'+fmtNames(_0x43d599)+_0x567230(0x1a6)+_0x5beb8a+'`.',_0x567230(0x19e)+fmtNames(_0x6cc87a));}export function validatePattern(_0x43985f,_0x5095ea,_0x5a352c,_0x36da11){const _0xba0c8a=a16_0x5d65,_0x470882=_0x43985f['str'](_0x5095ea);if(_0x470882&&!_0x5a352c[_0xba0c8a(0x19a)](_0x470882))throw CliErrors[_0xba0c8a(0x1b2)](_0xba0c8a(0x1a2)+_0x5095ea+':\x20expected\x20'+_0x36da11+_0xba0c8a(0x1a4)+_0x470882+'\x22.');}
1
+ (function(_0x2c2471,_0x6c7b26){const _0x56d2d8=a16_0x51d2,_0x2f6731=_0x2c2471();while(!![]){try{const _0x46ad2b=parseInt(_0x56d2d8(0x1dc))/0x1*(-parseInt(_0x56d2d8(0x1de))/0x2)+parseInt(_0x56d2d8(0x1e8))/0x3+parseInt(_0x56d2d8(0x1df))/0x4+-parseInt(_0x56d2d8(0x1dd))/0x5*(parseInt(_0x56d2d8(0x1ed))/0x6)+parseInt(_0x56d2d8(0x1e3))/0x7*(parseInt(_0x56d2d8(0x1ef))/0x8)+parseInt(_0x56d2d8(0x1e7))/0x9+parseInt(_0x56d2d8(0x1e1))/0xa;if(_0x46ad2b===_0x6c7b26)break;else _0x2f6731['push'](_0x2f6731['shift']());}catch(_0x556ce0){_0x2f6731['push'](_0x2f6731['shift']());}}}(a16_0x2e99,0xbd89e));import{CliErrors}from'../../errors.js';function a16_0x51d2(_0x43ee92,_0x43fb4a){_0x43ee92=_0x43ee92-0x1dc;const _0x2e99d1=a16_0x2e99();let _0x51d2af=_0x2e99d1[_0x43ee92];return _0x51d2af;}function isSet(_0x16b7b4,_0x5c8602){const _0x3ce108=_0x16b7b4['flag'](_0x5c8602);return _0x3ce108!==undefined&&_0x3ce108!==''&&_0x3ce108!==![]&&_0x3ce108!==0x0;}function a16_0x2e99(){const _0x1971f6=['validation','Use\x20only\x20one\x20of:\x20','66164IOTZwf','2749205XGxrMn','20muscOF','2991976mHSiwP','Flags\x20','1374350mVZsTp','At\x20least\x20one\x20of\x20','556192lqpabU','Provide\x20one\x20of:\x20','str','Exactly\x20one\x20of\x20','4885974snVYhJ','248340yismHM',':\x20expected\x20','\x20is\x20required\x20for\x20`','join','length','6yXdDsj','Remove\x20all\x20but\x20one.','48TxPDGl','filter','\x20are\x20mutually\x20exclusive\x20for\x20`'];a16_0x2e99=function(){return _0x1971f6;};return a16_0x2e99();}function fmtNames(_0x73b434){const _0x476c03=a16_0x51d2;return _0x73b434['map'](_0x51e5d9=>'--'+_0x51e5d9)[_0x476c03(0x1eb)](',\x20');}export function requireOneOf(_0x3b54f9,_0x23b994,_0x224608){const _0x2e32e5=a16_0x51d2,_0x15b486=_0x23b994['filter'](_0x504785=>isSet(_0x3b54f9,_0x504785));if(_0x15b486['length']!==0x1)throw CliErrors[_0x2e32e5(0x1f2)](_0x15b486[_0x2e32e5(0x1ec)]===0x0?_0x2e32e5(0x1e6)+fmtNames(_0x23b994)+_0x2e32e5(0x1ea)+_0x224608+'`.':'Only\x20one\x20of\x20'+fmtNames(_0x23b994)+'\x20is\x20allowed,\x20found:\x20'+fmtNames(_0x15b486)+'.',_0x15b486[_0x2e32e5(0x1ec)]===0x0?'Provide\x20one\x20of:\x20'+fmtNames(_0x23b994):_0x2e32e5(0x1ee));}export function requireAnyOf(_0x361304,_0x563f72,_0x1c4126){const _0x4be8b5=a16_0x51d2;if(!_0x563f72['some'](_0x51aaa4=>isSet(_0x361304,_0x51aaa4)))throw CliErrors[_0x4be8b5(0x1f2)](_0x4be8b5(0x1e2)+fmtNames(_0x563f72)+_0x4be8b5(0x1ea)+_0x1c4126+'`.',_0x4be8b5(0x1e4)+fmtNames(_0x563f72));}export function mutuallyExclusive(_0x209373,_0x1105b4,_0x3768f0){const _0x4cc50f=a16_0x51d2,_0x36dceb=_0x1105b4[_0x4cc50f(0x1f0)](_0x350bd8=>isSet(_0x209373,_0x350bd8));if(_0x36dceb[_0x4cc50f(0x1ec)]>0x1)throw CliErrors[_0x4cc50f(0x1f2)](_0x4cc50f(0x1e0)+fmtNames(_0x36dceb)+_0x4cc50f(0x1f1)+_0x3768f0+'`.',_0x4cc50f(0x1f3)+fmtNames(_0x1105b4));}export function validatePattern(_0x2a0036,_0x2aa052,_0x4c8ee4,_0x439d70){const _0x5b1bcc=a16_0x51d2,_0x51007c=_0x2a0036[_0x5b1bcc(0x1e5)](_0x2aa052);if(_0x51007c&&!_0x4c8ee4['test'](_0x51007c))throw CliErrors[_0x5b1bcc(0x1f2)]('Invalid\x20--'+_0x2aa052+_0x5b1bcc(0x1e9)+_0x439d70+',\x20got\x20\x22'+_0x51007c+'\x22.');}
@@ -1 +1 @@
1
- const a17_0x4ab151=a17_0x2e5c;(function(_0x48c4bc,_0x257938){const _0x4915cb=a17_0x2e5c,_0x27ee71=_0x48c4bc();while(!![]){try{const _0x43ccf6=parseInt(_0x4915cb(0x83))/0x1+-parseInt(_0x4915cb(0x82))/0x2+-parseInt(_0x4915cb(0x84))/0x3+-parseInt(_0x4915cb(0x77))/0x4+-parseInt(_0x4915cb(0x76))/0x5*(-parseInt(_0x4915cb(0x73))/0x6)+parseInt(_0x4915cb(0x72))/0x7*(-parseInt(_0x4915cb(0x7a))/0x8)+parseInt(_0x4915cb(0x87))/0x9*(parseInt(_0x4915cb(0x75))/0xa);if(_0x43ccf6===_0x257938)break;else _0x27ee71['push'](_0x27ee71['shift']());}catch(_0x515b5f){_0x27ee71['push'](_0x27ee71['shift']());}}}(a17_0x4109,0xe6c12));export const CODE_FLAG={'name':a17_0x4ab151(0x7b),'type':a17_0x4ab151(0x86),'required':!![],'description':a17_0x4ab151(0x85),'pattern':{'regex':/^[a-f0-9]{32}$/i,'description':a17_0x4ab151(0x7d)}};function a17_0x4109(){const _0x247df4=['7aLRJyj','1429320EtyEIn','Return\x20full\x20raw\x20response\x20object','350ffsJwd','20VPITWY','3925376Ovqqli','Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)','params','10215096dEPpYL','code','Resource\x20name\x20for\x20lookup','a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588a3a79d4a3540bbb2def2ad0a228a9acd)','sqlcode','verbose','SQL\x20code\x20identifier\x20(format:\x20xxxxxxxx-xxxxxxxx,\x20e.g.\x202305f915-dd48cd4c)','boolean','1395128dVnivr','1842595yqhQdR','934245mfEgrO','Dataset\x20code\x20(32-char\x20hex\x20UUID)','string','364347rshYGH','name'];a17_0x4109=function(){return _0x247df4;};return a17_0x4109();}export const SQLCODE_FLAG={'name':a17_0x4ab151(0x7e),'type':a17_0x4ab151(0x86),'required':!![],'description':a17_0x4ab151(0x80),'pattern':{'regex':/^[a-f0-9]{8}-[a-f0-9]{8}$/i,'description':'SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)'}};export const VERBOSE_FLAG={'name':a17_0x4ab151(0x7f),'type':a17_0x4ab151(0x81),'description':a17_0x4ab151(0x74)};function a17_0x2e5c(_0x35e127,_0x23d498){_0x35e127=_0x35e127-0x71;const _0x410937=a17_0x4109();let _0x2e5cde=_0x410937[_0x35e127];return _0x2e5cde;}export const PARAMS_FLAG={'name':a17_0x4ab151(0x79),'type':'string','description':a17_0x4ab151(0x78)};export const NAME_FLAG={'name':a17_0x4ab151(0x71),'type':a17_0x4ab151(0x86),'description':a17_0x4ab151(0x7c)};export const ID_FLAG={'name':'id','type':'number','required':!![],'description':'Resource\x20ID'};
1
+ const a17_0x5a2fce=a17_0x24da;(function(_0xce65e,_0x56c885){const _0x26f4bb=a17_0x24da,_0x412202=_0xce65e();while(!![]){try{const _0xe33c6f=-parseInt(_0x26f4bb(0xa1))/0x1+-parseInt(_0x26f4bb(0xa6))/0x2*(parseInt(_0x26f4bb(0xa5))/0x3)+-parseInt(_0x26f4bb(0xb5))/0x4*(parseInt(_0x26f4bb(0xae))/0x5)+-parseInt(_0x26f4bb(0xb4))/0x6+-parseInt(_0x26f4bb(0xa2))/0x7*(-parseInt(_0x26f4bb(0xb6))/0x8)+parseInt(_0x26f4bb(0xad))/0x9*(-parseInt(_0x26f4bb(0xa4))/0xa)+-parseInt(_0x26f4bb(0xa7))/0xb*(-parseInt(_0x26f4bb(0xb1))/0xc);if(_0xe33c6f===_0x56c885)break;else _0x412202['push'](_0x412202['shift']());}catch(_0x1172c8){_0x412202['push'](_0x412202['shift']());}}}(a17_0x272e,0xe24ad));export const CODE_FLAG={'name':'code','type':'string','required':!![],'description':'Dataset\x20code\x20(32-char\x20hex\x20UUID)','pattern':{'regex':/^[a-f0-9]{32}$/i,'description':a17_0x5a2fce(0xb3)}};export const SQLCODE_FLAG={'name':a17_0x5a2fce(0xa3),'type':a17_0x5a2fce(0xaf),'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':a17_0x5a2fce(0xb0)}};export const VERBOSE_FLAG={'name':a17_0x5a2fce(0xac),'type':'boolean','description':a17_0x5a2fce(0xb2)};function a17_0x272e(){const _0x3ff6e7=['Resource\x20name\x20for\x20lookup','1371488UGPPAg','70PQzaoO','sqlcode','343670DYYYrn','22380PlHvrW','132GGmyCT','43785027TbZdsp','name','Parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)','Resource\x20ID','number','verbose','279WepHvr','555lcrfFG','string','SQL\x20code\x20in\x20format\x20xxxxxxxx-xxxxxxxx\x20(e.g.\x202305f915-dd48cd4c)','12ZVewwe','Return\x20full\x20raw\x20response\x20object','a\x2032-character\x20lowercase\x20hex\x20string\x20(e.g.\x2099a909313f1fa7153186431e1c551588a3a79d4a3540bbb2def2ad0a228a9acd)','5677464iTwHhQ','6140WjinBH','793832kEuREB'];a17_0x272e=function(){return _0x3ff6e7;};return a17_0x272e();}export const PARAMS_FLAG={'name':'params','type':a17_0x5a2fce(0xaf),'description':a17_0x5a2fce(0xa9)};export const NAME_FLAG={'name':a17_0x5a2fce(0xa8),'type':a17_0x5a2fce(0xaf),'description':a17_0x5a2fce(0xb7)};function a17_0x24da(_0x30d4f3,_0x4c9c35){_0x30d4f3=_0x30d4f3-0xa1;const _0x272ebe=a17_0x272e();let _0x24da20=_0x272ebe[_0x30d4f3];return _0x24da20;}export const ID_FLAG={'name':'id','type':a17_0x5a2fce(0xab),'required':!![],'description':a17_0x5a2fce(0xaa)};
@@ -1 +1 @@
1
- const a18_0x587986=a18_0x519b;(function(_0xbf7613,_0x398a4f){const _0x433870=a18_0x519b,_0x476504=_0xbf7613();while(!![]){try{const _0x4a6151=-parseInt(_0x433870(0x1d2))/0x1*(-parseInt(_0x433870(0x1c0))/0x2)+parseInt(_0x433870(0x1de))/0x3+parseInt(_0x433870(0x1ad))/0x4+parseInt(_0x433870(0x1da))/0x5*(parseInt(_0x433870(0x1a3))/0x6)+parseInt(_0x433870(0x1a6))/0x7+-parseInt(_0x433870(0x1d3))/0x8*(parseInt(_0x433870(0x1b2))/0x9)+-parseInt(_0x433870(0x1db))/0xa;if(_0x4a6151===_0x398a4f)break;else _0x476504['push'](_0x476504['shift']());}catch(_0x1cb450){_0x476504['push'](_0x476504['shift']());}}}(a18_0x58e7,0x1c39d));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':a18_0x587986(0x1d6),'type':a18_0x587986(0x1d4),'description':a18_0x587986(0x1ab),'default':![]};function a18_0x519b(_0x889f7c,_0x131f06){_0x889f7c=_0x889f7c-0x1a1;const _0x58e7d8=a18_0x58e7();let _0x519b01=_0x58e7d8[_0x889f7c];return _0x519b01;}function parseAliasAppcodeSetKey(_0x4490ae){const _0x5ecb53=a18_0x587986,_0x3998bc=_0x4490ae[_0x5ecb53(0x1aa)]('.');if(_0x3998bc[_0x5ecb53(0x1a1)]!==0x3||_0x3998bc[0x0]!==_0x5ecb53(0x1a4)||_0x3998bc[0x2]!==_0x5ecb53(0x1e4))return undefined;const _0x3fe12e=_0x3998bc[0x1]?.[_0x5ecb53(0x1b8)]();return _0x3fe12e?_0x3fe12e:undefined;}function parseAliasDeleteKey(_0x44828b){const _0x4b03dc=a18_0x587986,_0x5eebe7=_0x44828b[_0x4b03dc(0x1aa)]('.');if(_0x5eebe7[_0x4b03dc(0x1a1)]===0x2&&_0x5eebe7[0x0]==='apps'){const _0x524dd5=_0x5eebe7[0x1]?.[_0x4b03dc(0x1b8)]();return _0x524dd5?{'alias':_0x524dd5}:undefined;}if(_0x5eebe7[_0x4b03dc(0x1a1)]===0x3&&_0x5eebe7[0x0]===_0x4b03dc(0x1a4)&&_0x5eebe7[0x2]===_0x4b03dc(0x1e4)){const _0x926733=_0x5eebe7[0x1]?.[_0x4b03dc(0x1b8)]();return _0x926733?{'alias':_0x926733,'field':_0x4b03dc(0x1e4)}:undefined;}return undefined;}function setLocalAppAlias(_0x229eee,_0x384a34,_0x4ae635){const _0x3d0d19=a18_0x587986,_0x1dc236=_0x229eee[_0x3d0d19(0x1a4)]&&typeof _0x229eee[_0x3d0d19(0x1a4)]==='object'&&!Array['isArray'](_0x229eee[_0x3d0d19(0x1a4)])?_0x229eee[_0x3d0d19(0x1a4)]:{},_0x3b36cc=_0x1dc236[_0x384a34]&&typeof _0x1dc236[_0x384a34]===_0x3d0d19(0x1d5)&&!Array['isArray'](_0x1dc236[_0x384a34])?_0x1dc236[_0x384a34]:{};_0x3b36cc[_0x3d0d19(0x1e4)]=_0x4ae635,_0x1dc236[_0x384a34]=_0x3b36cc,_0x229eee[_0x3d0d19(0x1a4)]=_0x1dc236;}function deleteLocalAppAlias(_0x1810b2,_0x3a6db6){const _0x29701b=a18_0x587986;if(!_0x1810b2[_0x29701b(0x1a4)]||typeof _0x1810b2[_0x29701b(0x1a4)]!==_0x29701b(0x1d5)||Array['isArray'](_0x1810b2['apps']))return![];const _0x259806=_0x1810b2[_0x29701b(0x1a4)],_0x5c31d0=_0x259806[_0x3a6db6['alias']];if(!_0x5c31d0||typeof _0x5c31d0!==_0x29701b(0x1d5)||Array[_0x29701b(0x1c6)](_0x5c31d0))return![];if(!_0x3a6db6['field'])return delete _0x259806[_0x3a6db6[_0x29701b(0x1c2)]],!![];if(!(_0x3a6db6[_0x29701b(0x1cf)]in _0x5c31d0))return![];return delete _0x5c31d0[_0x3a6db6['field']],Object[_0x29701b(0x1e2)](_0x5c31d0)[_0x29701b(0x1a1)]===0x0&&delete _0x259806[_0x3a6db6['alias']],!![];}const listDef={'service':a18_0x587986(0x1d9),'command':a18_0x587986(0x1b1),'description':'List\x20current\x20config','risk':a18_0x587986(0x1b5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x41f0fb){const _0x142c59=a18_0x587986,{buildConfigFromFlags:_0x2e9d5b}=await import(_0x142c59(0x1ba)),_0x2369bd=_0x2e9d5b({}),_0x365b39=getProjectConfigPath(),_0x22a6cc=resolveWriteConfigPath('global');if(_0x41f0fb[_0x142c59(0x1ac)]===_0x142c59(0x1b4))return{'ok':!![],'message':_0x142c59(0x1e0)+(JSON[_0x142c59(0x1b7)](_0x2369bd['raw'],null,0x2)+'\x0a\x0a')+_0x142c59(0x1bd)+(_0x142c59(0x1c1)+(_0x365b39??'(none)')+'\x0a')+(_0x142c59(0x1e3)+_0x22a6cc)};return{'ok':!![],'data':{'effective':_0x2369bd[_0x142c59(0x1c7)],'configFiles':{'project':_0x365b39??null,'global':_0x22a6cc}}};}},getDef={'service':a18_0x587986(0x1d9),'command':'get','description':a18_0x587986(0x1be),'risk':a18_0x587986(0x1b5),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':a18_0x587986(0x1bc),'required':!![]}],'flags':[],async 'execute'(_0x1ec5a9){const _0x1f05c2=a18_0x587986,_0x1b401b=_0x1ec5a9['args'][0x0];if(!_0x1b401b)throw CliErrors[_0x1f05c2(0x1d8)](_0x1f05c2(0x1c4),_0x1f05c2(0x1a2)+CLI_BIN_NAME+_0x1f05c2(0x1a9));const {buildConfigFromFlags:_0x15d1ef}=await import(_0x1f05c2(0x1ba)),{raw:_0x10024d}=_0x15d1ef({});if(_0x1b401b[_0x1f05c2(0x1cd)]('.')){const _0x5eaf47=_0x1b401b[_0x1f05c2(0x1aa)]('.');let _0x137e3f=_0x10024d;for(const _0x3095ef of _0x5eaf47){if(_0x137e3f==null||typeof _0x137e3f!==_0x1f05c2(0x1d5))throw CliErrors['validation']('Key\x20not\x20found:\x20'+_0x1b401b);_0x137e3f=_0x137e3f[_0x3095ef];}if(_0x137e3f===undefined)throw CliErrors[_0x1f05c2(0x1d8)]('Key\x20not\x20found:\x20'+_0x1b401b);return console[_0x1f05c2(0x1b9)](typeof _0x137e3f==='object'?JSON[_0x1f05c2(0x1b7)](_0x137e3f,null,0x2):String(_0x137e3f)),{'ok':!![]};}const _0xa9fa27=_0x10024d[_0x1b401b];if(_0xa9fa27===undefined)throw CliErrors[_0x1f05c2(0x1d8)](_0x1f05c2(0x1ae)+_0x1b401b);return console[_0x1f05c2(0x1b9)](typeof _0xa9fa27===_0x1f05c2(0x1d5)?JSON[_0x1f05c2(0x1b7)](_0xa9fa27,null,0x2):String(_0xa9fa27)),{'ok':!![]};}},setDef={'service':a18_0x587986(0x1d9),'command':a18_0x587986(0x1c5),'description':'Set\x20a\x20config\x20value','risk':a18_0x587986(0x1d7),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':getConfigCommandKeyDescription(),'required':!![]},{'name':a18_0x587986(0x1b3),'description':a18_0x587986(0x1cc),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x4899fa){const _0x5e1b85=a18_0x587986,_0x538e66=_0x4899fa[_0x5e1b85(0x1bf)][0x0],_0x4a1320=_0x4899fa[_0x5e1b85(0x1bf)][0x1];if(!_0x538e66||_0x4a1320===undefined)throw CliErrors[_0x5e1b85(0x1d8)](_0x5e1b85(0x1b0),_0x5e1b85(0x1a2)+CLI_BIN_NAME+_0x5e1b85(0x1ce));if(ENUM_KEYS[_0x538e66]&&!ENUM_KEYS[_0x538e66][_0x5e1b85(0x1cd)](_0x4a1320))throw CliErrors[_0x5e1b85(0x1d8)](_0x5e1b85(0x1b6)+_0x538e66+_0x5e1b85(0x1c8)+ENUM_KEYS[_0x538e66][_0x5e1b85(0x1a5)](',\x20'));if(_0x538e66===_0x5e1b85(0x1dd))throw CliErrors[_0x5e1b85(0x1d8)]('\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.');if(_0x538e66===_0x5e1b85(0x1c3)){const _0x693107=Number(_0x4a1320);if(isNaN(_0x693107)||_0x693107<=0x0)throw CliErrors[_0x5e1b85(0x1d8)](_0x5e1b85(0x1e1));}const _0x47252f=resolveWriteScope({'explicitGlobal':_0x4899fa[_0x5e1b85(0x1d0)]('global'),'policy':_0x5e1b85(0x1dc)}),_0x3ed2eb=toScopeFlags(_0x47252f),_0x24d441=readScopedConfig(_0x3ed2eb),_0x4851f8=parseAliasAppcodeSetKey(_0x538e66);if(!_0x4851f8&&!isTopLevelConfigKey(_0x538e66))throw CliErrors['validation'](_0x5e1b85(0x1d1)+_0x538e66+'\x22\x20is\x20not\x20settable.',_0x5e1b85(0x1af)+getTopLevelConfigKeySummary()+';\x20apps.<alias>.appcode');return _0x4851f8?setLocalAppAlias(_0x24d441,_0x4851f8,_0x4a1320):_0x24d441[_0x538e66]=_0x538e66===_0x5e1b85(0x1c3)?Number(_0x4a1320):_0x4a1320,console[_0x5e1b85(0x1b9)]('Set\x20`'+_0x538e66+_0x5e1b85(0x1c9)+_0x4a1320+'\x22'+(_0x47252f===_0x5e1b85(0x1d6)?'\x20(global)':'')),writeScopedConfig(_0x24d441,_0x3ed2eb),{'ok':!![]};}},deleteDef={'service':'config','command':a18_0x587986(0x1cb),'description':a18_0x587986(0x1a8),'risk':a18_0x587986(0x1d7),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a18_0x587986(0x1df),'description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x53d0b2){const _0x24f852=a18_0x587986,_0x413fff=_0x53d0b2[_0x24f852(0x1bf)][0x0];if(!_0x413fff)throw CliErrors[_0x24f852(0x1d8)](_0x24f852(0x1c4),_0x24f852(0x1a2)+CLI_BIN_NAME+'\x20config\x20delete\x20<key>\x20[--global]');const _0x47ab38=resolveWriteScope({'explicitGlobal':_0x53d0b2[_0x24f852(0x1d0)](_0x24f852(0x1d6)),'policy':_0x24f852(0x1dc)}),_0xa0bf0f=toScopeFlags(_0x47ab38),_0x28680a=readScopedConfig(_0xa0bf0f),_0x27266c=parseAliasDeleteKey(_0x413fff);if(_0x27266c){if(!deleteLocalAppAlias(_0x28680a,_0x27266c))throw CliErrors[_0x24f852(0x1d8)](_0x24f852(0x1ae)+_0x413fff);return console['log']('Deleted\x20`'+_0x413fff+'`'+(_0x47ab38===_0x24f852(0x1d6)?_0x24f852(0x1a7):'')),writeScopedConfig(_0x28680a,_0xa0bf0f),{'ok':!![]};}if(_0x28680a[_0x413fff]===undefined)throw CliErrors[_0x24f852(0x1d8)](_0x24f852(0x1ca)+_0x413fff+_0x24f852(0x1bb));return delete _0x28680a[_0x413fff],console['log']('Deleted\x20`'+_0x413fff+'`'+(_0x47ab38==='global'?_0x24f852(0x1a7):'')),writeScopedConfig(_0x28680a,_0xa0bf0f),{'ok':!![]};}};export const configDefinitions=[listDef,getDef,setDef,deleteDef];function a18_0x58e7(){const _0x112ee8=['stringify','trim','log','../../context.js','\x22\x20not\x20found\x20at\x20top\x20level.','Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','Config\x20files:\x0a','Get\x20a\x20config\x20value','args','91346ypEegZ','\x20\x20project:\x20','alias','pageSize','Missing\x20key\x20argument.','set','isArray','raw','\x22.\x20Allowed:\x20','`\x20=\x20\x22','Key\x20\x22','delete','Value\x20to\x20assign','includes','\x20config\x20set\x20<key>\x20<value>\x20[--global]','field','bool','Top-level\x20key\x20\x22','2DSsgfw','800OuISyq','boolean','object','global','write','validation','config','5drPDdg','2969130efSKJo','project-or-global-explicit','riskLevel','371178QKfwnP','key','#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a','pageSize\x20must\x20be\x20a\x20positive\x20number','keys','\x20\x20global:\x20\x20','appcode','length','Usage:\x20','39018eqnuFy','apps','join','1119342XeohjO','\x20(global)','Delete\x20a\x20config\x20value','\x20config\x20get\x20<key>','split','Write\x20to\x20global\x20config','format','603380iatYiB','Key\x20not\x20found:\x20','Settable\x20keys:\x20','Missing\x20key\x20or\x20value.','list','10782wTwBDZ','value','pretty','read','Invalid\x20value\x20for\x20\x22'];a18_0x58e7=function(){return _0x112ee8;};return a18_0x58e7();}
1
+ const a18_0x2b5ddd=a18_0x2fc4;(function(_0x31d91b,_0x4fbe3c){const _0x4e80fc=a18_0x2fc4,_0x22eb20=_0x31d91b();while(!![]){try{const _0x319238=-parseInt(_0x4e80fc(0x1e1))/0x1*(parseInt(_0x4e80fc(0x1e6))/0x2)+-parseInt(_0x4e80fc(0x1e8))/0x3*(parseInt(_0x4e80fc(0x1e7))/0x4)+-parseInt(_0x4e80fc(0x1c9))/0x5*(parseInt(_0x4e80fc(0x1d4))/0x6)+parseInt(_0x4e80fc(0x207))/0x7+parseInt(_0x4e80fc(0x1e2))/0x8+parseInt(_0x4e80fc(0x1f9))/0x9*(parseInt(_0x4e80fc(0x1fd))/0xa)+-parseInt(_0x4e80fc(0x1f1))/0xb;if(_0x319238===_0x4fbe3c)break;else _0x22eb20['push'](_0x22eb20['shift']());}catch(_0x3f5341){_0x22eb20['push'](_0x22eb20['shift']());}}}(a18_0x3884,0xdd2f8));function a18_0x2fc4(_0x1b3320,_0x377c4e){_0x1b3320=_0x1b3320-0x1c6;const _0x388456=a18_0x3884();let _0x2fc416=_0x388456[_0x1b3320];return _0x2fc416;}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':'global','type':'boolean','description':a18_0x2b5ddd(0x1f3),'default':![]};function parseAliasAppcodeSetKey(_0x38789d){const _0xffab5d=a18_0x2b5ddd,_0xc8332a=_0x38789d[_0xffab5d(0x1f8)]('.');if(_0xc8332a['length']!==0x3||_0xc8332a[0x0]!==_0xffab5d(0x1ed)||_0xc8332a[0x2]!==_0xffab5d(0x1c6))return undefined;const _0x13c139=_0xc8332a[0x1]?.['trim']();return _0x13c139?_0x13c139:undefined;}function a18_0x3884(){const _0x3fe28f=['pageSize\x20must\x20be\x20a\x20positive\x20number','write','List\x20current\x20config','Delete\x20a\x20config\x20value','includes','1VUZzmf','14188912DwTgVp','Get\x20a\x20config\x20value','isArray','log','1585074TxlxLz','3148IwZSqk','2637XxsadM','join','global','Config\x20key\x20(supports\x20dot\x20notation\x20for\x20reads\x20only)','pageSize','apps','project-or-global-explicit','Usage:\x20','Invalid\x20value\x20for\x20\x22','9031671kyqNNe','\x22\x20is\x20not\x20settable.','Write\x20to\x20global\x20config','value','field','\x20(global)','config','split','27YyMVNO','keys','bool','format','3199210IEZOJm','alias','\x20config\x20get\x20<key>','../../context.js','riskLevel','get','list','Missing\x20key\x20argument.','\x20\x20global:\x20\x20','\x20config\x20set\x20<key>\x20<value>\x20[--global]','6631072moCjzQ','Top-level\x20key\x20\x22','appcode','raw','\x20\x20project:\x20','4290nbqamV','args','(none)','stringify','read','Set\x20`','Key\x20\x22','validation','Set\x20a\x20config\x20value','object','length','3282kKFyXY','key','Key\x20not\x20found:\x20','set','Deleted\x20`','trim','pretty','Config\x20files:\x0a'];a18_0x3884=function(){return _0x3fe28f;};return a18_0x3884();}function parseAliasDeleteKey(_0x66fb9a){const _0x3a5ec7=a18_0x2b5ddd,_0x59e323=_0x66fb9a['split']('.');if(_0x59e323['length']===0x2&&_0x59e323[0x0]==='apps'){const _0x20a40f=_0x59e323[0x1]?.[_0x3a5ec7(0x1d9)]();return _0x20a40f?{'alias':_0x20a40f}:undefined;}if(_0x59e323[_0x3a5ec7(0x1d3)]===0x3&&_0x59e323[0x0]===_0x3a5ec7(0x1ed)&&_0x59e323[0x2]===_0x3a5ec7(0x1c6)){const _0x45c1ba=_0x59e323[0x1]?.['trim']();return _0x45c1ba?{'alias':_0x45c1ba,'field':_0x3a5ec7(0x1c6)}:undefined;}return undefined;}function setLocalAppAlias(_0xcc136a,_0x40f127,_0x2a6c44){const _0x58ddb7=a18_0x2b5ddd,_0x4b150a=_0xcc136a[_0x58ddb7(0x1ed)]&&typeof _0xcc136a[_0x58ddb7(0x1ed)]===_0x58ddb7(0x1d2)&&!Array[_0x58ddb7(0x1e4)](_0xcc136a[_0x58ddb7(0x1ed)])?_0xcc136a[_0x58ddb7(0x1ed)]:{},_0x4905fb=_0x4b150a[_0x40f127]&&typeof _0x4b150a[_0x40f127]===_0x58ddb7(0x1d2)&&!Array[_0x58ddb7(0x1e4)](_0x4b150a[_0x40f127])?_0x4b150a[_0x40f127]:{};_0x4905fb['appcode']=_0x2a6c44,_0x4b150a[_0x40f127]=_0x4905fb,_0xcc136a[_0x58ddb7(0x1ed)]=_0x4b150a;}function deleteLocalAppAlias(_0x3fcd18,_0x2118ef){const _0x3f5925=a18_0x2b5ddd;if(!_0x3fcd18[_0x3f5925(0x1ed)]||typeof _0x3fcd18[_0x3f5925(0x1ed)]!==_0x3f5925(0x1d2)||Array['isArray'](_0x3fcd18[_0x3f5925(0x1ed)]))return![];const _0x36fa12=_0x3fcd18[_0x3f5925(0x1ed)],_0x2120da=_0x36fa12[_0x2118ef[_0x3f5925(0x1fe)]];if(!_0x2120da||typeof _0x2120da!=='object'||Array[_0x3f5925(0x1e4)](_0x2120da))return![];if(!_0x2118ef['field'])return delete _0x36fa12[_0x2118ef[_0x3f5925(0x1fe)]],!![];if(!(_0x2118ef[_0x3f5925(0x1f5)]in _0x2120da))return![];return delete _0x2120da[_0x2118ef[_0x3f5925(0x1f5)]],Object[_0x3f5925(0x1fa)](_0x2120da)[_0x3f5925(0x1d3)]===0x0&&delete _0x36fa12[_0x2118ef[_0x3f5925(0x1fe)]],!![];}const listDef={'service':a18_0x2b5ddd(0x1f7),'command':a18_0x2b5ddd(0x203),'description':a18_0x2b5ddd(0x1de),'risk':a18_0x2b5ddd(0x1cd),'requiresAuth':![],'requiresAppCode':![],'hasFormat':!![],'flags':[],async 'execute'(_0x29703e){const _0x58734e=a18_0x2b5ddd,{buildConfigFromFlags:_0x141cb2}=await import('../../context.js'),_0x2493aa=_0x141cb2({}),_0x351e3e=getProjectConfigPath(),_0x5b9291=resolveWriteConfigPath('global');if(_0x29703e[_0x58734e(0x1fc)]===_0x58734e(0x1da))return{'ok':!![],'message':'#\x20Effective\x20config\x20(merged\x20global\x20+\x20project)\x0a\x0a'+(JSON[_0x58734e(0x1cc)](_0x2493aa['raw'],null,0x2)+'\x0a\x0a')+_0x58734e(0x1db)+(_0x58734e(0x1c8)+(_0x351e3e??_0x58734e(0x1cb))+'\x0a')+(_0x58734e(0x205)+_0x5b9291)};return{'ok':!![],'data':{'effective':_0x2493aa[_0x58734e(0x1c7)],'configFiles':{'project':_0x351e3e??null,'global':_0x5b9291}}};}},getDef={'service':a18_0x2b5ddd(0x1f7),'command':a18_0x2b5ddd(0x202),'description':a18_0x2b5ddd(0x1e3),'risk':a18_0x2b5ddd(0x1cd),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'key','description':a18_0x2b5ddd(0x1eb),'required':!![]}],'flags':[],async 'execute'(_0x5edd62){const _0x5ae0f1=a18_0x2b5ddd,_0x205ef0=_0x5edd62[_0x5ae0f1(0x1ca)][0x0];if(!_0x205ef0)throw CliErrors[_0x5ae0f1(0x1d0)](_0x5ae0f1(0x204),_0x5ae0f1(0x1ef)+CLI_BIN_NAME+_0x5ae0f1(0x1ff));const {buildConfigFromFlags:_0x518c2b}=await import(_0x5ae0f1(0x200)),{raw:_0x16a67b}=_0x518c2b({});if(_0x205ef0[_0x5ae0f1(0x1e0)]('.')){const _0x4caaaa=_0x205ef0[_0x5ae0f1(0x1f8)]('.');let _0x11b6e1=_0x16a67b;for(const _0x1ebbfd of _0x4caaaa){if(_0x11b6e1==null||typeof _0x11b6e1!==_0x5ae0f1(0x1d2))throw CliErrors[_0x5ae0f1(0x1d0)](_0x5ae0f1(0x1d6)+_0x205ef0);_0x11b6e1=_0x11b6e1[_0x1ebbfd];}if(_0x11b6e1===undefined)throw CliErrors[_0x5ae0f1(0x1d0)]('Key\x20not\x20found:\x20'+_0x205ef0);return console['log'](typeof _0x11b6e1===_0x5ae0f1(0x1d2)?JSON[_0x5ae0f1(0x1cc)](_0x11b6e1,null,0x2):String(_0x11b6e1)),{'ok':!![]};}const _0x5dcbe2=_0x16a67b[_0x205ef0];if(_0x5dcbe2===undefined)throw CliErrors['validation'](_0x5ae0f1(0x1d6)+_0x205ef0);return console['log'](typeof _0x5dcbe2==='object'?JSON[_0x5ae0f1(0x1cc)](_0x5dcbe2,null,0x2):String(_0x5dcbe2)),{'ok':!![]};}},setDef={'service':a18_0x2b5ddd(0x1f7),'command':a18_0x2b5ddd(0x1d7),'description':a18_0x2b5ddd(0x1d1),'risk':a18_0x2b5ddd(0x1dd),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a18_0x2b5ddd(0x1d5),'description':getConfigCommandKeyDescription(),'required':!![]},{'name':a18_0x2b5ddd(0x1f4),'description':'Value\x20to\x20assign','required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x4ee9b8){const _0x32cc69=a18_0x2b5ddd,_0xec481f=_0x4ee9b8['args'][0x0],_0x4a0e29=_0x4ee9b8[_0x32cc69(0x1ca)][0x1];if(!_0xec481f||_0x4a0e29===undefined)throw CliErrors[_0x32cc69(0x1d0)]('Missing\x20key\x20or\x20value.','Usage:\x20'+CLI_BIN_NAME+_0x32cc69(0x206));if(ENUM_KEYS[_0xec481f]&&!ENUM_KEYS[_0xec481f][_0x32cc69(0x1e0)](_0x4a0e29))throw CliErrors[_0x32cc69(0x1d0)](_0x32cc69(0x1f0)+_0xec481f+'\x22.\x20Allowed:\x20'+ENUM_KEYS[_0xec481f][_0x32cc69(0x1e9)](',\x20'));if(_0xec481f===_0x32cc69(0x201))throw CliErrors[_0x32cc69(0x1d0)]('\x22riskLevel\x22\x20cannot\x20be\x20changed\x20via\x20the\x20CLI.');if(_0xec481f===_0x32cc69(0x1ec)){const _0x179a5d=Number(_0x4a0e29);if(isNaN(_0x179a5d)||_0x179a5d<=0x0)throw CliErrors['validation'](_0x32cc69(0x1dc));}const _0x51037c=resolveWriteScope({'explicitGlobal':_0x4ee9b8[_0x32cc69(0x1fb)]('global'),'policy':_0x32cc69(0x1ee)}),_0x5dfd9e=toScopeFlags(_0x51037c),_0xbb8232=readScopedConfig(_0x5dfd9e),_0x1b211f=parseAliasAppcodeSetKey(_0xec481f);if(!_0x1b211f&&!isTopLevelConfigKey(_0xec481f))throw CliErrors['validation'](_0x32cc69(0x208)+_0xec481f+_0x32cc69(0x1f2),'Settable\x20keys:\x20'+getTopLevelConfigKeySummary()+';\x20apps.<alias>.appcode');return _0x1b211f?setLocalAppAlias(_0xbb8232,_0x1b211f,_0x4a0e29):_0xbb8232[_0xec481f]=_0xec481f===_0x32cc69(0x1ec)?Number(_0x4a0e29):_0x4a0e29,console[_0x32cc69(0x1e5)](_0x32cc69(0x1ce)+_0xec481f+'`\x20=\x20\x22'+_0x4a0e29+'\x22'+(_0x51037c===_0x32cc69(0x1ea)?_0x32cc69(0x1f6):'')),writeScopedConfig(_0xbb8232,_0x5dfd9e),{'ok':!![]};}},deleteDef={'service':a18_0x2b5ddd(0x1f7),'command':'delete','description':a18_0x2b5ddd(0x1df),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a18_0x2b5ddd(0x1d5),'description':getConfigCommandKeyDescription(),'required':!![]}],'flags':[GLOBAL_FLAG],async 'execute'(_0x1366df){const _0x161509=a18_0x2b5ddd,_0xa41520=_0x1366df[_0x161509(0x1ca)][0x0];if(!_0xa41520)throw CliErrors[_0x161509(0x1d0)](_0x161509(0x204),_0x161509(0x1ef)+CLI_BIN_NAME+'\x20config\x20delete\x20<key>\x20[--global]');const _0x588419=resolveWriteScope({'explicitGlobal':_0x1366df[_0x161509(0x1fb)](_0x161509(0x1ea)),'policy':_0x161509(0x1ee)}),_0x5845ef=toScopeFlags(_0x588419),_0x52d467=readScopedConfig(_0x5845ef),_0x176566=parseAliasDeleteKey(_0xa41520);if(_0x176566){if(!deleteLocalAppAlias(_0x52d467,_0x176566))throw CliErrors['validation']('Key\x20not\x20found:\x20'+_0xa41520);return console[_0x161509(0x1e5)](_0x161509(0x1d8)+_0xa41520+'`'+(_0x588419===_0x161509(0x1ea)?_0x161509(0x1f6):'')),writeScopedConfig(_0x52d467,_0x5845ef),{'ok':!![]};}if(_0x52d467[_0xa41520]===undefined)throw CliErrors['validation'](_0x161509(0x1cf)+_0xa41520+'\x22\x20not\x20found\x20at\x20top\x20level.');return delete _0x52d467[_0xa41520],console[_0x161509(0x1e5)](_0x161509(0x1d8)+_0xa41520+'`'+(_0x588419===_0x161509(0x1ea)?_0x161509(0x1f6):'')),writeScopedConfig(_0x52d467,_0x5845ef),{'ok':!![]};}};export const configDefinitions=[listDef,getDef,setDef,deleteDef];
@@ -1 +1 @@
1
- (function(_0xf141f0,_0x56ea44){var _0x1f844f=a19_0x40bc,_0x914f0f=_0xf141f0();while(!![]){try{var _0x35ac99=-parseInt(_0x1f844f(0xd6))/0x1*(-parseInt(_0x1f844f(0xd9))/0x2)+parseInt(_0x1f844f(0xd7))/0x3*(parseInt(_0x1f844f(0xd2))/0x4)+-parseInt(_0x1f844f(0xd0))/0x5*(parseInt(_0x1f844f(0xcf))/0x6)+parseInt(_0x1f844f(0xd8))/0x7*(-parseInt(_0x1f844f(0xce))/0x8)+parseInt(_0x1f844f(0xd5))/0x9*(parseInt(_0x1f844f(0xd1))/0xa)+parseInt(_0x1f844f(0xd3))/0xb*(-parseInt(_0x1f844f(0xda))/0xc)+parseInt(_0x1f844f(0xd4))/0xd;if(_0x35ac99===_0x56ea44)break;else _0x914f0f['push'](_0x914f0f['shift']());}catch(_0x2dd424){_0x914f0f['push'](_0x914f0f['shift']());}}}(a19_0x32a0,0x7069a));import{CLI_BIN_NAME}from'../../constant/cli.js';export{CLI_BIN_NAME};function a19_0x32a0(){var _0x1e0295=['130401UdkuXk','25496oiCecw','1647xROUqa','10171fHWHfo','16QBpFIv','12itXGxo','5008ugJShb','839226tiunJy','20FlpBIX','430XWrjca','2524cKDCkY','8770465loRkNx','20194265zwHCMX'];a19_0x32a0=function(){return _0x1e0295;};return a19_0x32a0();}export{readScopedConfig,writeScopedConfig}from'../../context.js';function a19_0x40bc(_0x5bda2c,_0xadecd4){_0x5bda2c=_0x5bda2c-0xce;var _0x32a088=a19_0x32a0();var _0x40bcdb=_0x32a088[_0x5bda2c];return _0x40bcdb;}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(_0x2fd573,_0x30dc1d){var _0x4e35b0=a19_0x445a,_0xa4fcd4=_0x2fd573();while(!![]){try{var _0x20dc3d=-parseInt(_0x4e35b0(0x1c3))/0x1*(parseInt(_0x4e35b0(0x1c7))/0x2)+parseInt(_0x4e35b0(0x1c0))/0x3*(-parseInt(_0x4e35b0(0x1c1))/0x4)+parseInt(_0x4e35b0(0x1c2))/0x5+parseInt(_0x4e35b0(0x1c6))/0x6+parseInt(_0x4e35b0(0x1bf))/0x7*(parseInt(_0x4e35b0(0x1c4))/0x8)+parseInt(_0x4e35b0(0x1c5))/0x9+parseInt(_0x4e35b0(0x1c8))/0xa;if(_0x20dc3d===_0x30dc1d)break;else _0xa4fcd4['push'](_0xa4fcd4['shift']());}catch(_0x4bfcc6){_0xa4fcd4['push'](_0xa4fcd4['shift']());}}}(a19_0x5d7d,0xa788d));import{CLI_BIN_NAME}from'../../constant/cli.js';export{CLI_BIN_NAME};function a19_0x445a(_0x5a6c83,_0x4eb062){_0x5a6c83=_0x5a6c83-0x1bf;var _0x5d7d15=a19_0x5d7d();var _0x445a36=_0x5d7d15[_0x5a6c83];return _0x445a36;}export{readScopedConfig,writeScopedConfig}from'../../context.js';function a19_0x5d7d(){var _0x51a6ce=['341389CiScsl','24232WkRaDa','2246076eaSLQz','3455004IJgmlV','2LtIPjh','2215560vWlfux','385PqnJHX','10599ElzgEs','524AQNrWU','1384420oNGKhV'];a19_0x5d7d=function(){return _0x51a6ce;};return a19_0x5d7d();}export{resolveConfigScope as resolveWriteScope,TOP_LEVEL_CONFIG_KEYS as TOP_LEVEL_KEYS,CONFIG_ENUM_VALUES as ENUM_KEYS,getConfigCommandKeyDescription,getTopLevelConfigKeyList,getTopLevelConfigKeySummary,isTopLevelConfigKey,toScopeFlags}from'../../commands/common/config-policy.js';
@@ -1 +1 @@
1
- const a20_0x2d92a1=a20_0x2beb;(function(_0x1cdd15,_0xd79957){const _0x890183=a20_0x2beb,_0x47a861=_0x1cdd15();while(!![]){try{const _0x312888=parseInt(_0x890183(0x11d))/0x1*(parseInt(_0x890183(0x12a))/0x2)+parseInt(_0x890183(0xe6))/0x3+-parseInt(_0x890183(0x11f))/0x4*(-parseInt(_0x890183(0xf4))/0x5)+parseInt(_0x890183(0x12e))/0x6*(-parseInt(_0x890183(0xe4))/0x7)+-parseInt(_0x890183(0x107))/0x8+parseInt(_0x890183(0xe0))/0x9*(parseInt(_0x890183(0x103))/0xa)+parseInt(_0x890183(0xe8))/0xb;if(_0x312888===_0xd79957)break;else _0x47a861['push'](_0x47a861['shift']());}catch(_0x8d3c80){_0x47a861['push'](_0x47a861['shift']());}}}(a20_0x1266,0x23cba));function a20_0x2beb(_0x4bfb94,_0x478de0){_0x4bfb94=_0x4bfb94-0xda;const _0x1266f1=a20_0x1266();let _0x2bebb8=_0x1266f1[_0x4bfb94];return _0x2bebb8;}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';function a20_0x1266(){const _0x27ffdb=['\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]','operation','risk','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','update','\x20\x20\x20\x20Wrong:\x20\x20\x20\x20--page-size\x2010\x20\x20(this\x20is\x20not\x20a\x20valid\x20flag)','\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$startWith\x20\x20\x20Starts\x20with\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22name\x22:{\x22$startWith\x22:\x22Mr.\x22}}','command','delete','paramsRequired','\x20\x20\x20\x20$and\x20\x20\x20\x20\x20\x20\x20\x20\x20All\x20conditions\x20match\x20\x20\x20{\x22$and\x22:[{\x22age\x22:{\x22$gte\x22:18}},{\x22status\x22:{\x22$eq\x22:\x22active\x22}}]}','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22id\x22:\x22desc\x22},{\x22name\x22:\x22asc\x22}]','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return\x20alongside\x20aggregates,\x20e.g.\x20[\x22status\x22,\x22region\x22]','Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','aggregate','13tKUSXQ','\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}','56964zNWUJQ','\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}','getOne','\x20\x20PARAMS\x20STRUCTURE','\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}','\x20\x20\x20\x20$lte\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20or\x20equal\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lte\x22:1000}}','\x20\x20\x20\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}}]','body','now','\x20\x20EXAMPLES','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','8178ASMEww','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)','\x20on\x20dataset\x20','\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','3882SpAABL','paramsHint','\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}}','batchCreate','\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}','build','dryRun','\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}','\x20\x20\x20\x20Pagination\x20is\x20controlled\x20via\x20JSON\x20in\x20--params.\x20Do\x20NOT\x20use\x20--page-size\x20as\x20a\x20CLI\x20flag.','\x20completed\x20in\x20','\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}}','9HollXc','filter','JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','description','2212clcntu','JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','137946BCxhuQ','POST','3489365JkNeNg','data\x20','data','helpExtra','\x20\x20\x20\x20$or\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Any\x20condition\x20matches\x20\x20{\x22$or\x22:[{\x22status\x22:{\x22$eq\x22:\x22active\x22}},{\x22status\x22:{\x22$eq\x22:\x22pending\x22}}]}','\x20\x20AGGREGATE\x20TYPES','code','\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','\x20\x20PAGINATION','JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20','create','/api/{appCode}/','15oWEhEY','high-risk-write','Update\x20an\x20existing\x20record','Preview:\x20data\x20','Get\x20a\x20single\x20record\x20by\x20ID','Filter\x20dataset\x20records\x20with\x20query\x20conditions','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter','read','Example:\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x20\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','params','write','\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}','\x20\x20WHERE\x20OPERATORS','join','\x20\x20\x20\x20Correct:\x20\x20--params\x20\x27{\x22currentPage\x22:1,\x22pageSize\x22:10}\x27','664770SxZcyh','\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status','\x20\x20\x20\x20$lt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lt\x22:1000}}','\x20\x20LOGICAL\x20COMBINATORS','1395872uYGZTU','str','map','\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}}'];a20_0x1266=function(){return _0x27ffdb;};return a20_0x1266();}const specs=[{'command':a20_0x2d92a1(0xe1),'operation':a20_0x2d92a1(0xe1),'risk':a20_0x2d92a1(0xfb),'paramsRequired':![],'description':a20_0x2d92a1(0xf9),'paramsHint':'JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20'+'Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','helpExtra':[a20_0x2d92a1(0x100),'\x20\x20\x20\x20$eq\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22age\x22:{\x22$eq\x22:18}}','\x20\x20\x20\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}}',a20_0x2d92a1(0xdf),a20_0x2d92a1(0x111),a20_0x2d92a1(0x105),a20_0x2d92a1(0x124),'\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]}}',a20_0x2d92a1(0x10a),a20_0x2d92a1(0x112),a20_0x2d92a1(0x130),'',a20_0x2d92a1(0x106),a20_0x2d92a1(0x116),a20_0x2d92a1(0xec),'','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)',a20_0x2d92a1(0x11a),a20_0x2d92a1(0x10b),a20_0x2d92a1(0x117),a20_0x2d92a1(0x10e),a20_0x2d92a1(0x129),'',a20_0x2d92a1(0xf0),a20_0x2d92a1(0xdd),a20_0x2d92a1(0x102),a20_0x2d92a1(0x110)][a20_0x2d92a1(0x101)]('\x0a')},{'command':a20_0x2d92a1(0x121),'operation':a20_0x2d92a1(0x121),'risk':a20_0x2d92a1(0xfb),'paramsRequired':!![],'description':a20_0x2d92a1(0xf8),'paramsHint':'JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27'},{'command':a20_0x2d92a1(0xf2),'operation':a20_0x2d92a1(0xf2),'risk':a20_0x2d92a1(0xfe),'paramsRequired':!![],'description':'Create\x20a\x20new\x20record\x20in\x20a\x20dataset','paramsHint':a20_0x2d92a1(0xe2)},{'command':a20_0x2d92a1(0x131),'operation':a20_0x2d92a1(0x131),'risk':a20_0x2d92a1(0xfe),'paramsRequired':!![],'description':'Create\x20multiple\x20records\x20in\x20one\x20request\x20(SDK\x20batchCreate)','paramsHint':a20_0x2d92a1(0xe5)},{'command':a20_0x2d92a1(0x10f),'operation':a20_0x2d92a1(0x10f),'risk':a20_0x2d92a1(0xfe),'paramsRequired':!![],'description':a20_0x2d92a1(0xf6),'paramsHint':'JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20Example:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27'},{'command':a20_0x2d92a1(0x114),'operation':a20_0x2d92a1(0x114),'risk':a20_0x2d92a1(0xf5),'paramsRequired':!![],'description':'Delete\x20a\x20record\x20(requires\x20--yes\x20in\x20non-interactive)','paramsHint':a20_0x2d92a1(0x11b)},{'command':a20_0x2d92a1(0x11c),'operation':a20_0x2d92a1(0x11c),'risk':a20_0x2d92a1(0xfb),'paramsRequired':![],'description':a20_0x2d92a1(0x119),'paramsHint':a20_0x2d92a1(0xf1)+a20_0x2d92a1(0xfc),'helpExtra':[a20_0x2d92a1(0xed),a20_0x2d92a1(0x120),a20_0x2d92a1(0x123),a20_0x2d92a1(0xff),'\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}',a20_0x2d92a1(0x132),a20_0x2d92a1(0xdc),a20_0x2d92a1(0x11e),'',a20_0x2d92a1(0x122),a20_0x2d92a1(0x118),'\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)',a20_0x2d92a1(0x12b),'\x20\x20\x20\x20groupBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Grouping\x20fields,\x20e.g.\x20[\x22status\x22,\x22region\x22]',a20_0x2d92a1(0x125),'\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22total\x22:\x22desc\x22}]','',a20_0x2d92a1(0x128),a20_0x2d92a1(0x104),a20_0x2d92a1(0x12d),'',a20_0x2d92a1(0xfa),a20_0x2d92a1(0xef),'','\x20\x20\x20\x20#\x20`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.']['join']('\x0a')}];function makeDataCommand(_0x4f39f3){const _0x5d239=a20_0x2d92a1,_0x72273d=_0x5d239(0xe9)+_0x4f39f3[_0x5d239(0x113)],_0x9d515b={'service':_0x5d239(0xea),'command':_0x4f39f3[_0x5d239(0x113)],'description':_0x4f39f3[_0x5d239(0xe3)],'risk':_0x4f39f3[_0x5d239(0x10d)],'helpExtra':_0x4f39f3[_0x5d239(0xeb)],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x4f39f3[_0x5d239(0x12f)]}],'validate':async _0x406359=>{const _0x482d00=_0x5d239;_0x4f39f3[_0x482d00(0x115)]&&requireAnyOf(_0x406359,['params'],_0x72273d),_0x4f39f3[_0x482d00(0x10c)]===_0x482d00(0x131)&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x406359[_0x482d00(0x108)](_0x482d00(0xfd))));},async 'execute'(_0xd0ff96){const _0x3f9cd7=_0x5d239,_0xa01070=_0xd0ff96[_0x3f9cd7(0x108)]('code'),_0x425c77=_0x4f39f3['operation']==='batchCreate'?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0xd0ff96['str'](_0x3f9cd7(0xfd)))):parseJsonParams(_0xd0ff96[_0x3f9cd7(0x108)](_0x3f9cd7(0xfd)))??{},_0x1f74b7=Date[_0x3f9cd7(0x127)](),_0x37884a=await executeData(_0xa01070,_0x4f39f3[_0x3f9cd7(0x10c)],_0x425c77),_0x56a035=Date[_0x3f9cd7(0x127)]()-_0x1f74b7;return{'ok':!![],'data':{'result':_0x37884a,'elapsed':_0x56a035},'message':'data\x20'+_0x4f39f3[_0x3f9cd7(0x113)]+_0x3f9cd7(0xde)+_0x56a035+'ms'};}};return _0x4f39f3['risk']!==_0x5d239(0xfb)&&(_0x9d515b[_0x5d239(0xdb)]=async _0x390f64=>{const _0x3a7448=_0x5d239,_0x5232c9=_0x390f64[_0x3a7448(0x108)](_0x3a7448(0xee)),_0x131cb7=_0x4f39f3[_0x3a7448(0x10c)]===_0x3a7448(0x131)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x390f64[_0x3a7448(0x108)](_0x3a7448(0xfd)))):parseJsonParams(_0x390f64[_0x3a7448(0x108)]('params'))??{};return dryRun(_0x3a7448(0xe7),_0x3a7448(0xf3)+_0x5232c9+'/'+_0x4f39f3[_0x3a7448(0x10c)])[_0x3a7448(0x126)](_0x131cb7)['description'](_0x3a7448(0xf7)+_0x4f39f3[_0x3a7448(0x113)]+_0x3a7448(0x12c)+_0x5232c9)[_0x3a7448(0xda)]();}),_0x9d515b;}export const dataDefinitions=specs[a20_0x2d92a1(0x109)](makeDataCommand);
1
+ const a20_0x2a4e7d=a20_0x45d5;(function(_0x2bdfc3,_0x6dea7c){const _0x33e924=a20_0x45d5,_0x105732=_0x2bdfc3();while(!![]){try{const _0x8723c7=-parseInt(_0x33e924(0x20a))/0x1+parseInt(_0x33e924(0x220))/0x2+parseInt(_0x33e924(0x235))/0x3+parseInt(_0x33e924(0x21e))/0x4*(parseInt(_0x33e924(0x231))/0x5)+parseInt(_0x33e924(0x1f9))/0x6*(-parseInt(_0x33e924(0x224))/0x7)+parseInt(_0x33e924(0x206))/0x8*(parseInt(_0x33e924(0x22d))/0x9)+-parseInt(_0x33e924(0x228))/0xa;if(_0x8723c7===_0x6dea7c)break;else _0x105732['push'](_0x105732['shift']());}catch(_0x51d6fa){_0x105732['push'](_0x105732['shift']());}}}(a20_0x27b4,0x460a4));function a20_0x27b4(){const _0x507f98=['\x20\x20PAGINATION','params','JSON\x20with\x20record\x20id.\x20Example:\x20\x27{\x22id\x22:123}\x27','24eMVSTV','high-risk-write','\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$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\x20LOGICAL\x20COMBINATORS','JSON\x20with\x20field\x20values.\x20Example:\x20\x27{\x22name\x22:\x22test\x22,\x22amount\x22:100}\x27','str','\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]}}','/api/{appCode}/','\x20\x20EXAMPLES','\x20\x20\x20\x20aggregate\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Aggregation\x20definitions\x20(see\x20AGGREGATE\x20TYPES\x20above)','Preview:\x20data\x20','paramsHint','218664hSoYKz','batchCreate','\x20\x20\x20\x20#\x20Count\x20orders\x20per\x20region\x20with\x20filter','read','249494cWMHId','data\x20','\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}}','Delete\x20a\x20record\x20(requires\x20--yes\x20in\x20non-interactive)','\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','\x20\x20\x20\x20pageSize\x20\x20\x20\x20\x20\x20Number\x20\x20\x20Records\x20per\x20page\x20(default:\x2020)','JSON\x20array\x20of\x20record\x20objects,\x20or\x20{\x22items\x22:[...]}.\x20Example:\x20\x27[{\x22name\x22:\x22a\x22},{\x22name\x22:\x22b\x22}]\x27','Example:\x20\x27{\x22where\x22:{\x22status\x22:{\x22$eq\x22:\x22active\x22}},\x22currentPage\x22:1,\x22pageSize\x22:20}\x27','\x20\x20JSON\x20BODY\x20FIELDS\x20(pass\x20inside\x20--params)','getOne','write','JSON\x20with\x20id\x20+\x20fields\x20to\x20update.\x20Example:\x20\x27{\x22id\x22:123,\x22status\x22:\x22completed\x22}\x27','\x20\x20PARAMS\x20STRUCTURE','\x20\x20WHERE\x20OPERATORS','\x20\x20\x20\x20#\x20`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','operation','description','create','\x20\x20\x20\x20$gt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Greater\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$gt\x22:100}}','\x20\x20\x20\x20select\x20\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Fields\x20to\x20return,\x20e.g.\x20[\x22id\x22,\x22name\x22,\x22status\x22]','1403660KEybho','JSON\x20body\x20for\x20aggregate\x20API.\x20Fields:\x20select,\x20aggregate,\x20where,\x20groupBy,\x20having,\x20orderBy.\x20','147494cyHYIQ','POST','\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}}','command','49763vQXWIj','now','dryRun','\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}','1160760AVQgTr','\x20\x20\x20\x20$lt\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Less\x20than\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22amount\x22:{\x22$lt\x22:1000}}','\x20\x20\x20\x20$eq\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Equals\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22age\x22:{\x22$eq\x22:18}}','\x20\x20\x20\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','\x20\x20\x20\x20currentPage\x20\x20\x20Number\x20\x20\x20Page\x20number\x20(starts\x20from\x201)','9qoPugg','update','\x20\x20\x20\x20orderBy\x20\x20\x20\x20\x20\x20\x20Array\x20\x20\x20\x20Sort\x20order,\x20e.g.\x20[{\x22total\x22:\x22desc\x22}]','data','5VYGaMZ','\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}','map','\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Pre-aggregation\x20filter\x20(same\x20operators\x20as\x20data\x20filter)','686685gCenwA','code','body','build','delete','\x20\x20AGGREGATE\x20TYPES','\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}]','risk','\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\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\x20Wrong:\x20\x20\x20\x20--page-size\x2010\x20\x20(this\x20is\x20not\x20a\x20valid\x20flag)','Example:\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x20\x22amount\x22,\x22type\x22:\x22SUM\x22,\x22alias\x22:\x22total\x22}],\x22groupBy\x22:[\x22status\x22]}\x27','\x20\x20\x20\x20MAX\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Maximum\x20value\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20{\x22column\x22:\x22price\x22,\x22type\x22:\x22MAX\x22,\x22alias\x22:\x22max_price\x22}','join','filter'];a20_0x27b4=function(){return _0x507f98;};return a20_0x27b4();}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':a20_0x2a4e7d(0x1f5),'operation':a20_0x2a4e7d(0x1f5),'risk':'read','paramsRequired':![],'description':'Filter\x20dataset\x20records\x20with\x20query\x20conditions','paramsHint':'JSON\x20body\x20for\x20filter\x20API.\x20Fields:\x20where,\x20select,\x20orderBy,\x20currentPage,\x20pageSize.\x20'+a20_0x2a4e7d(0x211),'helpExtra':[a20_0x2a4e7d(0x217),a20_0x2a4e7d(0x22a),a20_0x2a4e7d(0x1ef),a20_0x2a4e7d(0x21c),a20_0x2a4e7d(0x222),a20_0x2a4e7d(0x229),'\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}}',a20_0x2a4e7d(0x200),'\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}}',a20_0x2a4e7d(0x1fc),a20_0x2a4e7d(0x20c),'',a20_0x2a4e7d(0x1fd),'\x20\x20\x20\x20$and\x20\x20\x20\x20\x20\x20\x20\x20\x20All\x20conditions\x20match\x20\x20\x20{\x22$and\x22:[{\x22age\x22:{\x22$gte\x22:18}},{\x22status\x22:{\x22$eq\x22:\x22active\x22}}]}','\x20\x20\x20\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}}]}','',a20_0x2a4e7d(0x212),'\x20\x20\x20\x20where\x20\x20\x20\x20\x20\x20\x20\x20\x20Object\x20\x20\x20Query\x20conditions\x20(see\x20operators\x20above)',a20_0x2a4e7d(0x21d),a20_0x2a4e7d(0x1ed),a20_0x2a4e7d(0x22c),a20_0x2a4e7d(0x20f),'',a20_0x2a4e7d(0x1f6),'\x20\x20\x20\x20Pagination\x20is\x20controlled\x20via\x20JSON\x20in\x20--params.\x20Do\x20NOT\x20use\x20--page-size\x20as\x20a\x20CLI\x20flag.','\x20\x20\x20\x20Correct:\x20\x20--params\x20\x27{\x22currentPage\x22:1,\x22pageSize\x22:10}\x27',a20_0x2a4e7d(0x1f1)][a20_0x2a4e7d(0x1f4)]('\x0a')},{'command':a20_0x2a4e7d(0x213),'operation':a20_0x2a4e7d(0x213),'risk':'read','paramsRequired':!![],'description':'Get\x20a\x20single\x20record\x20by\x20ID','paramsHint':a20_0x2a4e7d(0x1f8)},{'command':a20_0x2a4e7d(0x21b),'operation':a20_0x2a4e7d(0x21b),'risk':a20_0x2a4e7d(0x214),'paramsRequired':!![],'description':'Create\x20a\x20new\x20record\x20in\x20a\x20dataset','paramsHint':a20_0x2a4e7d(0x1fe)},{'command':a20_0x2a4e7d(0x207),'operation':a20_0x2a4e7d(0x207),'risk':a20_0x2a4e7d(0x214),'paramsRequired':!![],'description':'Create\x20multiple\x20records\x20in\x20one\x20request\x20(SDK\x20batchCreate)','paramsHint':a20_0x2a4e7d(0x210)},{'command':a20_0x2a4e7d(0x22e),'operation':a20_0x2a4e7d(0x22e),'risk':'write','paramsRequired':!![],'description':'Update\x20an\x20existing\x20record','paramsHint':a20_0x2a4e7d(0x215)},{'command':a20_0x2a4e7d(0x1eb),'operation':a20_0x2a4e7d(0x1eb),'risk':a20_0x2a4e7d(0x1fa),'paramsRequired':!![],'description':a20_0x2a4e7d(0x20d),'paramsHint':a20_0x2a4e7d(0x1f8)},{'command':'aggregate','operation':'aggregate','risk':a20_0x2a4e7d(0x209),'paramsRequired':![],'description':'Aggregate\x20dataset\x20records\x20(group\x20by,\x20sum,\x20count,\x20avg,\x20etc.)','paramsHint':a20_0x2a4e7d(0x21f)+a20_0x2a4e7d(0x1f2),'helpExtra':[a20_0x2a4e7d(0x1ec),'\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}',a20_0x2a4e7d(0x227),'\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}','\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}',a20_0x2a4e7d(0x232),a20_0x2a4e7d(0x1f3),'\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}','',a20_0x2a4e7d(0x216),a20_0x2a4e7d(0x1f0),a20_0x2a4e7d(0x203),a20_0x2a4e7d(0x234),a20_0x2a4e7d(0x1fb),'\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}}]',a20_0x2a4e7d(0x22f),'',a20_0x2a4e7d(0x202),'\x20\x20\x20\x20#\x20Sum\x20amount\x20grouped\x20by\x20status',a20_0x2a4e7d(0x22b),'',a20_0x2a4e7d(0x208),a20_0x2a4e7d(0x20e),'',a20_0x2a4e7d(0x218)]['join']('\x0a')}];function a20_0x45d5(_0x3e9366,_0x2f59d9){_0x3e9366=_0x3e9366-0x1e9;const _0x27b4a5=a20_0x27b4();let _0x45d574=_0x27b4a5[_0x3e9366];return _0x45d574;}function makeDataCommand(_0x5bab9b){const _0x5c0c6b=a20_0x2a4e7d,_0x24ca54=_0x5c0c6b(0x20b)+_0x5bab9b['command'],_0x526211={'service':_0x5c0c6b(0x230),'command':_0x5bab9b[_0x5c0c6b(0x223)],'description':_0x5bab9b['description'],'risk':_0x5bab9b['risk'],'helpExtra':_0x5bab9b['helpExtra'],'flags':[CODE_FLAG,{...PARAMS_FLAG,'description':_0x5bab9b[_0x5c0c6b(0x205)]}],'validate':async _0x8a541b=>{const _0x2850e7=_0x5c0c6b;_0x5bab9b['paramsRequired']&&requireAnyOf(_0x8a541b,[_0x2850e7(0x1f7)],_0x24ca54),_0x5bab9b[_0x2850e7(0x219)]===_0x2850e7(0x207)&&parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x8a541b[_0x2850e7(0x1ff)](_0x2850e7(0x1f7))));},async 'execute'(_0x4ec0ae){const _0xc8bbe1=_0x5c0c6b,_0x21dcc8=_0x4ec0ae[_0xc8bbe1(0x1ff)](_0xc8bbe1(0x236)),_0x398733=_0x5bab9b[_0xc8bbe1(0x219)]==='batchCreate'?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x4ec0ae[_0xc8bbe1(0x1ff)](_0xc8bbe1(0x1f7)))):parseJsonParams(_0x4ec0ae[_0xc8bbe1(0x1ff)](_0xc8bbe1(0x1f7)))??{},_0x3fd90b=Date[_0xc8bbe1(0x225)](),_0x3aedc6=await executeData(_0x21dcc8,_0x5bab9b[_0xc8bbe1(0x219)],_0x398733),_0x1ddd3d=Date[_0xc8bbe1(0x225)]()-_0x3fd90b;return{'ok':!![],'data':{'result':_0x3aedc6,'elapsed':_0x1ddd3d},'message':_0xc8bbe1(0x20b)+_0x5bab9b[_0xc8bbe1(0x223)]+'\x20completed\x20in\x20'+_0x1ddd3d+'ms'};}};return _0x5bab9b[_0x5c0c6b(0x1ee)]!==_0x5c0c6b(0x209)&&(_0x526211[_0x5c0c6b(0x226)]=async _0x3cc740=>{const _0x2ac84b=_0x5c0c6b,_0x4aa10a=_0x3cc740[_0x2ac84b(0x1ff)](_0x2ac84b(0x236)),_0x26861c=_0x5bab9b[_0x2ac84b(0x219)]===_0x2ac84b(0x207)?parseBatchCreateItemsFromParams(parseJsonParamsValue(_0x3cc740[_0x2ac84b(0x1ff)]('params'))):parseJsonParams(_0x3cc740[_0x2ac84b(0x1ff)](_0x2ac84b(0x1f7)))??{};return dryRun(_0x2ac84b(0x221),_0x2ac84b(0x201)+_0x4aa10a+'/'+_0x5bab9b[_0x2ac84b(0x219)])[_0x2ac84b(0x1e9)](_0x26861c)[_0x2ac84b(0x21a)](_0x2ac84b(0x204)+_0x5bab9b[_0x2ac84b(0x223)]+'\x20on\x20dataset\x20'+_0x4aa10a)[_0x2ac84b(0x1ea)]();}),_0x526211;}export const dataDefinitions=specs[a20_0x2a4e7d(0x233)](makeDataCommand);
@@ -1 +1 @@
1
- const a21_0xb29362=a21_0x3440;(function(_0x560215,_0x14d369){const _0x2144f0=a21_0x3440,_0x3df8d0=_0x560215();while(!![]){try{const _0x3f1963=parseInt(_0x2144f0(0x1ae))/0x1*(parseInt(_0x2144f0(0x1a1))/0x2)+-parseInt(_0x2144f0(0x19f))/0x3*(-parseInt(_0x2144f0(0x1b1))/0x4)+-parseInt(_0x2144f0(0x19b))/0x5+-parseInt(_0x2144f0(0x1d3))/0x6+-parseInt(_0x2144f0(0x1b8))/0x7*(-parseInt(_0x2144f0(0x1cf))/0x8)+parseInt(_0x2144f0(0x1b5))/0x9*(-parseInt(_0x2144f0(0x1bc))/0xa)+parseInt(_0x2144f0(0x1c1))/0xb;if(_0x3f1963===_0x14d369)break;else _0x3df8d0['push'](_0x3df8d0['shift']());}catch(_0x38751a){_0x3df8d0['push'](_0x3df8d0['shift']());}}}(a21_0x50df,0x5684c));import{getDatasetDetail,listDatasets}from'../../core/api-client.js';function a21_0x50df(){const _0x2afe18=['368700VHbgBb','detail','toFieldLabel','extend','modifierIdField','formatRules','push','code','datasetKey','appCode','requestBody','modifierNameField','dataset','isArray','dbtableConfig','relatedPageInfoList','toDatasetCode','requestFields','toTableName','map','deleted','trim','properties','object','updateTimeField','sourceType','dbType','1767420aJgDEu','dbId','fields','beforeScriptId','33QkoPpr','allFields','2QoSnkG','indexes','str','description','operations','entries','parse','dbName','pkField','afterScriptId','labelField','toDatasetName','required','385142xKkQNC','logicField','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','10784WhhBmK','read','creatorNameField','name','2320830ygKxFa','creatorIdField','displayName','1254281VQxpcM','host','modelCode','path','10NodVWC','responseBody','type','responseFields','allFieldNames','2794220bNybOt','split','options','dblinkInfoDTO','tableName','relations','doVersion','filter','length','tableComment','validateRules','find','columnCodeListWithDeleted','string','16MsWWQo','method','source','doType'];a21_0x50df=function(){return _0x2afe18;};return a21_0x50df();}import{CODE_FLAG}from'../../commands/common/flags.js';function normalizeField(_0x3a3be9){const _0x5db547=a21_0x3440;if(_0x3a3be9[_0x5db547(0x1e7)])return null;const _0x314b83=Boolean(_0x3a3be9[_0x5db547(0x1b7)]!==undefined||_0x3a3be9['doType']!==undefined);let _0x27963a={};if(!_0x314b83&&typeof _0x3a3be9[_0x5db547(0x1d6)]===_0x5db547(0x1ce))try{_0x27963a=JSON[_0x5db547(0x1a7)](_0x3a3be9[_0x5db547(0x1d6)]);}catch{}const _0x7e2fa7=_0x314b83?_0x3a3be9[_0x5db547(0x1b4)]:_0x3a3be9[_0x5db547(0x1da)],_0x28390f=_0x314b83?_0x3a3be9[_0x5db547(0x1b7)]:_0x3a3be9[_0x5db547(0x1b4)],_0x14c274=_0x314b83?_0x3a3be9[_0x5db547(0x1d2)]:_0x3a3be9['type']||_0x3a3be9['dataType'],_0x45feff=_0x314b83?_0x3a3be9[_0x5db547(0x1a9)]===!![]:_0x27963a[_0x5db547(0x1a9)]===!![],_0x2b8f47=_0x314b83?_0x3a3be9[_0x5db547(0x1ad)]===!![]:_0x27963a[_0x5db547(0x1ad)]===!![],_0x386540=_0x314b83?_0x3a3be9['options']??null:_0x27963a[_0x5db547(0x1c3)]??null,_0x5799eb={'name':_0x7e2fa7,'displayName':_0x28390f||_0x7e2fa7,'type':_0x14c274,'dbType':_0x3a3be9[_0x5db547(0x19a)],'pk':_0x45feff,'required':_0x2b8f47,'description':_0x3a3be9[_0x5db547(0x1a4)]||undefined};return Array['isArray'](_0x386540)&&_0x386540['length']>0x0&&(_0x5799eb[_0x5db547(0x1c3)]=_0x386540),_0x5799eb;}function parseJsonMaybe(_0x4865f4){const _0xf303b0=a21_0x3440;if(typeof _0x4865f4!=='string')return _0x4865f4;try{return JSON[_0xf303b0(0x1a7)](_0x4865f4);}catch{return _0x4865f4;}}function normalizeOperationEntry(_0x467920,_0x3d8058){const _0x207006=a21_0x3440;if(!_0x3d8058||typeof _0x3d8058!==_0x207006(0x197))return null;if(!_0x3d8058[_0x207006(0x1d0)]||!_0x3d8058[_0x207006(0x1bb)])return null;const _0x2bfc22={'name':_0x467920,'method':_0x3d8058['method'],'path':_0x3d8058[_0x207006(0x1bb)]};if(_0x3d8058[_0x207006(0x1b9)])_0x2bfc22[_0x207006(0x1b9)]=_0x3d8058[_0x207006(0x1b9)];if(_0x3d8058[_0x207006(0x1dd)]!=null)_0x2bfc22['requestBody']=parseJsonMaybe(_0x3d8058[_0x207006(0x1dd)]);if(_0x3d8058['responseBody']!=null)_0x2bfc22[_0x207006(0x1bd)]=parseJsonMaybe(_0x3d8058[_0x207006(0x1bd)]);if(_0x3d8058[_0x207006(0x19e)]!=null)_0x2bfc22[_0x207006(0x19e)]=_0x3d8058['beforeScriptId'];if(_0x3d8058[_0x207006(0x1aa)]!=null)_0x2bfc22[_0x207006(0x1aa)]=_0x3d8058['afterScriptId'];if(Array['isArray'](_0x3d8058[_0x207006(0x1e4)]))_0x2bfc22['requestFields']=_0x3d8058[_0x207006(0x1e4)];if(Array[_0x207006(0x1e0)](_0x3d8058[_0x207006(0x1bf)]))_0x2bfc22[_0x207006(0x1bf)]=_0x3d8058[_0x207006(0x1bf)];return _0x2bfc22;}function summarizeDbtable(_0xb64490){const _0x2ca7bc=a21_0x3440,_0x458f14={},_0x2e8043=[_0x2ca7bc(0x19c),'dbName',_0x2ca7bc(0x1c5),_0x2ca7bc(0x1db),_0x2ca7bc(0x1a9),_0x2ca7bc(0x1a0),_0x2ca7bc(0x1af),'createTimeField',_0x2ca7bc(0x198),_0x2ca7bc(0x1b6),_0x2ca7bc(0x1b3),_0x2ca7bc(0x1d7),_0x2ca7bc(0x1de),_0x2ca7bc(0x1ab),_0x2ca7bc(0x1c4)];for(const _0x59be15 of _0x2e8043){if(_0xb64490[_0x59be15]!==undefined)_0x458f14[_0x59be15]=_0xb64490[_0x59be15];}return typeof _0x458f14[_0x2ca7bc(0x1a0)]===_0x2ca7bc(0x1ce)&&_0x458f14['allFields'][_0x2ca7bc(0x1c9)]>0x0&&(_0x458f14[_0x2ca7bc(0x1c0)]=_0x458f14['allFields'][_0x2ca7bc(0x1c2)](',')[_0x2ca7bc(0x1e6)](_0x1fdf7f=>_0x1fdf7f['trim']())[_0x2ca7bc(0x1c8)](Boolean)),_0x458f14;}function normalizeRelatedPages(_0x242cc7){const _0x1afadd=a21_0x3440;if(!Array['isArray'](_0x242cc7))return[];return _0x242cc7[_0x1afadd(0x1c8)](_0x1abfb7=>_0x1abfb7&&typeof _0x1abfb7==='object')['map'](_0x44c622=>({'id':_0x44c622['id'],'type':_0x44c622[_0x1afadd(0x1be)],'code':_0x44c622['code'],'title':_0x44c622['title'],'deleted':_0x44c622['deleted']===!![]}));}function a21_0x3440(_0x36f987,_0x5d5f35){_0x36f987=_0x36f987-0x196;const _0x50dfa5=a21_0x50df();let _0x3440c2=_0x50dfa5[_0x36f987];return _0x3440c2;}function normalizeFallbackFieldName(_0x2ae538,_0x88168b){const _0x166c6a=a21_0x3440,_0x304278=_0x2ae538[_0x166c6a(0x1e8)]();if(!_0x304278)return null;return{'name':_0x304278,'displayName':_0x304278,'type':undefined,'dbType':undefined,'pk':_0x304278===_0x88168b,'required':![],'description':undefined};}async function loadListFieldFallback(_0x162165,_0x34c51e){const _0x178833=a21_0x3440;if(!_0x162165||!_0x34c51e)return[];try{const _0x3a1dc2=await listDatasets(_0x162165,{'code':_0x34c51e}),_0x3ff0ae=_0x3a1dc2[_0x178833(0x1cc)](_0x2e70cc=>_0x2e70cc['code']===_0x34c51e)??_0x3a1dc2[0x0],_0x2d82e4=_0x3ff0ae?.[_0x178833(0x1e1)]??{},_0x187a0d=typeof _0x2d82e4['allFields']===_0x178833(0x1ce)?_0x2d82e4[_0x178833(0x1a0)][_0x178833(0x1c2)](','):[];return _0x187a0d[_0x178833(0x1e6)](_0x44b8c6=>normalizeFallbackFieldName(_0x44b8c6,_0x2d82e4[_0x178833(0x1a9)]))[_0x178833(0x1c8)](_0xf6692e=>_0xf6692e!==null);}catch{return[];}}export const datasetDetail={'service':a21_0xb29362(0x1df),'command':a21_0xb29362(0x1d4),'description':a21_0xb29362(0x1b0),'risk':a21_0xb29362(0x1b2),'flags':[CODE_FLAG],async 'execute'(_0x4822ce){const _0xf7c255=a21_0xb29362,_0x38e179=await getDatasetDetail(_0x4822ce[_0xf7c255(0x1a3)](_0xf7c255(0x1da))),_0x2169ff=Array[_0xf7c255(0x1e0)](_0x38e179[_0xf7c255(0x19d)])?_0x38e179[_0xf7c255(0x19d)]:Array['isArray'](_0x38e179[_0xf7c255(0x196)])?_0x38e179[_0xf7c255(0x196)]:[];let _0xca657b=_0x2169ff[_0xf7c255(0x1e6)](_0x1f4313=>normalizeField(_0x1f4313))[_0xf7c255(0x1c8)](_0x165b14=>_0x165b14!==null);_0xca657b['length']===0x0&&(_0xca657b=await loadListFieldFallback(_0x4822ce[_0xf7c255(0x1dc)],_0x4822ce[_0xf7c255(0x1a3)](_0xf7c255(0x1da))));const _0xd506a4=_0x38e179[_0xf7c255(0x1a5)]??{},_0x236637=[];for(const [_0x4d830c,_0xc9c103]of Object[_0xf7c255(0x1a6)](_0xd506a4)){const _0x443250=normalizeOperationEntry(_0x4d830c,_0xc9c103);if(_0x443250)_0x236637[_0xf7c255(0x1d9)](_0x443250);}const _0x861333=_0x38e179[_0xf7c255(0x1e1)]??{},_0x2f589b=_0x38e179[_0xf7c255(0x1df)]??{},_0x38743b=_0x861333[_0xf7c255(0x19c)]!=null?{'id':_0x861333[_0xf7c255(0x19c)],'name':_0x861333[_0xf7c255(0x1a8)]??null}:undefined;let _0x4a11d7;return typeof _0x38e179['extend']===_0xf7c255(0x1ce)&&(_0x4a11d7=parseJsonMaybe(_0x38e179['extend'])),{'ok':!![],'data':{'id':_0x38e179['modelId']??_0x38e179['id'],'name':_0x38e179[_0xf7c255(0x1b4)],'code':_0x38e179[_0xf7c255(0x1ba)]||_0x38e179[_0xf7c255(0x1da)],'doVersion':_0x38e179[_0xf7c255(0x1c7)],'description':_0x38e179[_0xf7c255(0x1a4)]||_0x2f589b[_0xf7c255(0x1ca)]||undefined,'source':_0x38e179[_0xf7c255(0x1d1)]||_0x2f589b[_0xf7c255(0x199)],'table':_0x861333[_0xf7c255(0x1c5)]||_0x2f589b[_0xf7c255(0x1c5)],'datasetKey':_0x861333[_0xf7c255(0x1db)],'pk':_0x861333[_0xf7c255(0x1a9)],'db':_0x38743b,'dbtable':summarizeDbtable(_0x861333),'fields':_0xca657b,'operations':_0x236637,'indexes':Array[_0xf7c255(0x1e0)](_0x2f589b[_0xf7c255(0x1a2)])?_0x2f589b['indexes']:[],'relations':Array[_0xf7c255(0x1e0)](_0x38e179['relations'])?_0x38e179[_0xf7c255(0x1c6)][_0xf7c255(0x1e6)](_0x5aa429=>({'fromField':_0x5aa429['fromField'],'toDataset':_0x5aa429[_0xf7c255(0x1ac)],'toCode':_0x5aa429[_0xf7c255(0x1e3)],'toTable':_0x5aa429[_0xf7c255(0x1e5)],'toField':_0x5aa429['toField'],'labelField':_0x5aa429[_0xf7c255(0x1d5)]||undefined})):[],'relatedPages':normalizeRelatedPages(_0x38e179[_0xf7c255(0x1e2)]),...Array[_0xf7c255(0x1e0)](_0x38e179[_0xf7c255(0x1cd)])?{'columnCodeListWithDeleted':_0x38e179['columnCodeListWithDeleted']}:{},'formatRules':Array[_0xf7c255(0x1e0)](_0x38e179[_0xf7c255(0x1d8)])?_0x38e179[_0xf7c255(0x1d8)]:[],'validateRules':Array['isArray'](_0x38e179[_0xf7c255(0x1cb)])?_0x38e179[_0xf7c255(0x1cb)]:[],..._0x4a11d7!==undefined?{'extend':_0x4a11d7}:{},'stats':{'fieldCount':_0xca657b[_0xf7c255(0x1c9)],'operationCount':_0x236637[_0xf7c255(0x1c9)]}}};}};
1
+ function a21_0x51e1(_0x178e9c,_0x102230){_0x178e9c=_0x178e9c-0x160;const _0x37568f=a21_0x3756();let _0x51e16d=_0x37568f[_0x178e9c];return _0x51e16d;}const a21_0x424c7a=a21_0x51e1;(function(_0x3241f6,_0x49162c){const _0x38de42=a21_0x51e1,_0x4005e2=_0x3241f6();while(!![]){try{const _0x3e3eb6=parseInt(_0x38de42(0x1a9))/0x1+parseInt(_0x38de42(0x16c))/0x2+parseInt(_0x38de42(0x1ab))/0x3+parseInt(_0x38de42(0x160))/0x4*(-parseInt(_0x38de42(0x180))/0x5)+-parseInt(_0x38de42(0x168))/0x6+parseInt(_0x38de42(0x18d))/0x7+-parseInt(_0x38de42(0x164))/0x8;if(_0x3e3eb6===_0x49162c)break;else _0x4005e2['push'](_0x4005e2['shift']());}catch(_0x544243){_0x4005e2['push'](_0x4005e2['shift']());}}}(a21_0x3756,0xa3fe8));import{getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';function normalizeField(_0x5c62b7){const _0x217417=a21_0x51e1;if(_0x5c62b7[_0x217417(0x1a4)])return null;const _0x197bc4=Boolean(_0x5c62b7[_0x217417(0x163)]!==undefined||_0x5c62b7[_0x217417(0x1ac)]!==undefined);let _0x1f2aba={};if(!_0x197bc4&&typeof _0x5c62b7['extend']===_0x217417(0x187))try{_0x1f2aba=JSON['parse'](_0x5c62b7[_0x217417(0x19a)]);}catch{}const _0x6a7075=_0x197bc4?_0x5c62b7[_0x217417(0x17e)]:_0x5c62b7[_0x217417(0x178)],_0x4c221f=_0x197bc4?_0x5c62b7[_0x217417(0x163)]:_0x5c62b7[_0x217417(0x17e)],_0x2623e0=_0x197bc4?_0x5c62b7[_0x217417(0x1ac)]:_0x5c62b7[_0x217417(0x17c)]||_0x5c62b7[_0x217417(0x16d)],_0x3936a9=_0x197bc4?_0x5c62b7[_0x217417(0x18e)]===!![]:_0x1f2aba['pkField']===!![],_0x974664=_0x197bc4?_0x5c62b7['required']===!![]:_0x1f2aba[_0x217417(0x170)]===!![],_0x184e2f=_0x197bc4?_0x5c62b7['options']??null:_0x1f2aba['options']??null,_0x1df7af={'name':_0x6a7075,'displayName':_0x4c221f||_0x6a7075,'type':_0x2623e0,'dbType':_0x5c62b7['dbType'],'pk':_0x3936a9,'required':_0x974664,'description':_0x5c62b7[_0x217417(0x188)]||undefined};return Array[_0x217417(0x193)](_0x184e2f)&&_0x184e2f[_0x217417(0x1a7)]>0x0&&(_0x1df7af['options']=_0x184e2f),_0x1df7af;}function parseJsonMaybe(_0x3cef8c){const _0x2c32e1=a21_0x51e1;if(typeof _0x3cef8c!==_0x2c32e1(0x187))return _0x3cef8c;try{return JSON['parse'](_0x3cef8c);}catch{return _0x3cef8c;}}function normalizeOperationEntry(_0x44e928,_0x54b97a){const _0x3abb17=a21_0x51e1;if(!_0x54b97a||typeof _0x54b97a!=='object')return null;if(!_0x54b97a[_0x3abb17(0x169)]||!_0x54b97a[_0x3abb17(0x199)])return null;const _0x220a47={'name':_0x44e928,'method':_0x54b97a[_0x3abb17(0x169)],'path':_0x54b97a['path']};if(_0x54b97a[_0x3abb17(0x17b)])_0x220a47[_0x3abb17(0x17b)]=_0x54b97a[_0x3abb17(0x17b)];if(_0x54b97a[_0x3abb17(0x19e)]!=null)_0x220a47[_0x3abb17(0x19e)]=parseJsonMaybe(_0x54b97a['requestBody']);if(_0x54b97a[_0x3abb17(0x175)]!=null)_0x220a47[_0x3abb17(0x175)]=parseJsonMaybe(_0x54b97a['responseBody']);if(_0x54b97a[_0x3abb17(0x19f)]!=null)_0x220a47['beforeScriptId']=_0x54b97a[_0x3abb17(0x19f)];if(_0x54b97a['afterScriptId']!=null)_0x220a47[_0x3abb17(0x1a2)]=_0x54b97a['afterScriptId'];if(Array['isArray'](_0x54b97a[_0x3abb17(0x184)]))_0x220a47[_0x3abb17(0x184)]=_0x54b97a[_0x3abb17(0x184)];if(Array[_0x3abb17(0x193)](_0x54b97a[_0x3abb17(0x19d)]))_0x220a47['responseFields']=_0x54b97a[_0x3abb17(0x19d)];return _0x220a47;}function summarizeDbtable(_0x3f7797){const _0xc148a0=a21_0x51e1,_0x45f7e8={},_0x130ea5=[_0xc148a0(0x198),_0xc148a0(0x1a3),_0xc148a0(0x172),_0xc148a0(0x195),_0xc148a0(0x18e),_0xc148a0(0x185),_0xc148a0(0x1a6),_0xc148a0(0x16a),'updateTimeField',_0xc148a0(0x16b),_0xc148a0(0x197),_0xc148a0(0x183),'modifierNameField',_0xc148a0(0x17a),'dblinkInfoDTO'];for(const _0x51e282 of _0x130ea5){if(_0x3f7797[_0x51e282]!==undefined)_0x45f7e8[_0x51e282]=_0x3f7797[_0x51e282];}return typeof _0x45f7e8['allFields']===_0xc148a0(0x187)&&_0x45f7e8[_0xc148a0(0x185)][_0xc148a0(0x1a7)]>0x0&&(_0x45f7e8['allFieldNames']=_0x45f7e8['allFields']['split'](',')[_0xc148a0(0x182)](_0x15db12=>_0x15db12[_0xc148a0(0x17f)]())['filter'](Boolean)),_0x45f7e8;}function normalizeRelatedPages(_0x577eb3){const _0x84f0ce=a21_0x51e1;if(!Array[_0x84f0ce(0x193)](_0x577eb3))return[];return _0x577eb3['filter'](_0x23e2f3=>_0x23e2f3&&typeof _0x23e2f3===_0x84f0ce(0x19b))['map'](_0x33c7d9=>({'id':_0x33c7d9['id'],'type':_0x33c7d9[_0x84f0ce(0x17c)],'code':_0x33c7d9[_0x84f0ce(0x178)],'title':_0x33c7d9[_0x84f0ce(0x162)],'deleted':_0x33c7d9[_0x84f0ce(0x1a4)]===!![]}));}function normalizeFallbackFieldName(_0x198ffa,_0x44c5fd){const _0x517b9b=a21_0x51e1,_0x4a3526=_0x198ffa[_0x517b9b(0x17f)]();if(!_0x4a3526)return null;return{'name':_0x4a3526,'displayName':_0x4a3526,'type':undefined,'dbType':undefined,'pk':_0x4a3526===_0x44c5fd,'required':![],'description':undefined};}function a21_0x3756(){const _0x1719bb=['modifierIdField','requestFields','allFields','Get\x20dataset\x20detail\x20including\x20fields\x20and\x20operations','string','description','sourceType','dataset','toDatasetCode','relations','651882ZbiiBH','pkField','split','toField','modelId','appCode','isArray','fromField','datasetKey','find','creatorNameField','dbId','path','extend','object','indexes','responseFields','requestBody','beforeScriptId','filter','validateRules','afterScriptId','dbName','deleted','read','logicField','length','dbtableConfig','764493UlCXHo','relatedPageInfoList','3051735vvdOyH','doType','entries','4SOlhYS','toDatasetName','title','displayName','2536240jruulo','formatRules','columnCodeListWithDeleted','detail','4587408nYgIpV','method','createTimeField','creatorIdField','343058XOiyaA','dataType','properties','modelCode','required','toTableName','tableName','toFieldLabel','source','responseBody','doVersion','operations','code','fields','labelField','host','type','push','name','trim','1465375wQUOXm','tableComment','map'];a21_0x3756=function(){return _0x1719bb;};return a21_0x3756();}async function loadListFieldFallback(_0x53bc5f,_0x786ad5){const _0x18e50b=a21_0x51e1;if(!_0x53bc5f||!_0x786ad5)return[];try{const _0x5508b4=await listDatasets(_0x53bc5f,{'code':_0x786ad5}),_0x441e3d=_0x5508b4[_0x18e50b(0x196)](_0x5ee1da=>_0x5ee1da[_0x18e50b(0x178)]===_0x786ad5)??_0x5508b4[0x0],_0x56077f=_0x441e3d?.['dbtableConfig']??{},_0x2fcc93=typeof _0x56077f[_0x18e50b(0x185)]===_0x18e50b(0x187)?_0x56077f[_0x18e50b(0x185)][_0x18e50b(0x18f)](','):[];return _0x2fcc93[_0x18e50b(0x182)](_0x423f81=>normalizeFallbackFieldName(_0x423f81,_0x56077f[_0x18e50b(0x18e)]))[_0x18e50b(0x1a0)](_0x29f8a3=>_0x29f8a3!==null);}catch{return[];}}export const datasetDetail={'service':a21_0x424c7a(0x18a),'command':a21_0x424c7a(0x167),'description':a21_0x424c7a(0x186),'risk':a21_0x424c7a(0x1a5),'flags':[CODE_FLAG],async 'execute'(_0x74d126){const _0x24bc86=a21_0x424c7a,_0xb55620=await getDatasetDetail(_0x74d126['str'](_0x24bc86(0x178))),_0x14b1b2=Array['isArray'](_0xb55620[_0x24bc86(0x179)])?_0xb55620[_0x24bc86(0x179)]:Array[_0x24bc86(0x193)](_0xb55620[_0x24bc86(0x16e)])?_0xb55620[_0x24bc86(0x16e)]:[];let _0xd7e8f1=_0x14b1b2[_0x24bc86(0x182)](_0x5a7ce6=>normalizeField(_0x5a7ce6))['filter'](_0x1029aa=>_0x1029aa!==null);_0xd7e8f1[_0x24bc86(0x1a7)]===0x0&&(_0xd7e8f1=await loadListFieldFallback(_0x74d126[_0x24bc86(0x192)],_0x74d126['str']('code')));const _0x5215ab=_0xb55620[_0x24bc86(0x177)]??{},_0x28b7ff=[];for(const [_0x243f84,_0x21e648]of Object[_0x24bc86(0x1ad)](_0x5215ab)){const _0x417669=normalizeOperationEntry(_0x243f84,_0x21e648);if(_0x417669)_0x28b7ff[_0x24bc86(0x17d)](_0x417669);}const _0x1dd66b=_0xb55620[_0x24bc86(0x1a8)]??{},_0x6d8979=_0xb55620[_0x24bc86(0x18a)]??{},_0x113c2d=_0x1dd66b[_0x24bc86(0x198)]!=null?{'id':_0x1dd66b[_0x24bc86(0x198)],'name':_0x1dd66b[_0x24bc86(0x1a3)]??null}:undefined;let _0x2de577;return typeof _0xb55620[_0x24bc86(0x19a)]==='string'&&(_0x2de577=parseJsonMaybe(_0xb55620[_0x24bc86(0x19a)])),{'ok':!![],'data':{'id':_0xb55620[_0x24bc86(0x191)]??_0xb55620['id'],'name':_0xb55620[_0x24bc86(0x17e)],'code':_0xb55620[_0x24bc86(0x16f)]||_0xb55620['code'],'doVersion':_0xb55620[_0x24bc86(0x176)],'description':_0xb55620[_0x24bc86(0x188)]||_0x6d8979[_0x24bc86(0x181)]||undefined,'source':_0xb55620[_0x24bc86(0x174)]||_0x6d8979[_0x24bc86(0x189)],'table':_0x1dd66b[_0x24bc86(0x172)]||_0x6d8979[_0x24bc86(0x172)],'datasetKey':_0x1dd66b[_0x24bc86(0x195)],'pk':_0x1dd66b[_0x24bc86(0x18e)],'db':_0x113c2d,'dbtable':summarizeDbtable(_0x1dd66b),'fields':_0xd7e8f1,'operations':_0x28b7ff,'indexes':Array[_0x24bc86(0x193)](_0x6d8979[_0x24bc86(0x19c)])?_0x6d8979[_0x24bc86(0x19c)]:[],'relations':Array[_0x24bc86(0x193)](_0xb55620[_0x24bc86(0x18c)])?_0xb55620[_0x24bc86(0x18c)][_0x24bc86(0x182)](_0x5e4a8d=>({'fromField':_0x5e4a8d[_0x24bc86(0x194)],'toDataset':_0x5e4a8d[_0x24bc86(0x161)],'toCode':_0x5e4a8d[_0x24bc86(0x18b)],'toTable':_0x5e4a8d[_0x24bc86(0x171)],'toField':_0x5e4a8d[_0x24bc86(0x190)],'labelField':_0x5e4a8d[_0x24bc86(0x173)]||undefined})):[],'relatedPages':normalizeRelatedPages(_0xb55620[_0x24bc86(0x1aa)]),...Array['isArray'](_0xb55620[_0x24bc86(0x166)])?{'columnCodeListWithDeleted':_0xb55620[_0x24bc86(0x166)]}:{},'formatRules':Array[_0x24bc86(0x193)](_0xb55620[_0x24bc86(0x165)])?_0xb55620[_0x24bc86(0x165)]:[],'validateRules':Array[_0x24bc86(0x193)](_0xb55620[_0x24bc86(0x1a1)])?_0xb55620[_0x24bc86(0x1a1)]:[],..._0x2de577!==undefined?{'extend':_0x2de577}:{},'stats':{'fieldCount':_0xd7e8f1['length'],'operationCount':_0x28b7ff[_0x24bc86(0x1a7)]}}};}};
@@ -1 +1 @@
1
- (function(_0x177d9a,_0x8e305b){const _0x5c368c=a22_0x1efa,_0x499438=_0x177d9a();while(!![]){try{const _0x19c5ec=-parseInt(_0x5c368c(0x1db))/0x1+-parseInt(_0x5c368c(0x1d8))/0x2+-parseInt(_0x5c368c(0x1d5))/0x3*(-parseInt(_0x5c368c(0x1d6))/0x4)+-parseInt(_0x5c368c(0x1dc))/0x5*(-parseInt(_0x5c368c(0x1d9))/0x6)+parseInt(_0x5c368c(0x1dd))/0x7*(parseInt(_0x5c368c(0x1d7))/0x8)+parseInt(_0x5c368c(0x1d4))/0x9+-parseInt(_0x5c368c(0x1da))/0xa;if(_0x19c5ec===_0x8e305b)break;else _0x499438['push'](_0x499438['shift']());}catch(_0x157574){_0x499438['push'](_0x499438['shift']());}}}(a22_0x52de,0x2490f));import{datasetList}from'../../commands/dataset/list.js';function a22_0x52de(){const _0x2b2085=['2778300QOHsmB','57404RBMbZf','2440cPIuOb','7pNSjwD','1513188ZbFYjD','36OxoYQs','63144nVzlhO','355800zOIAlC','165900AmVUee','2040jRiPjJ'];a22_0x52de=function(){return _0x2b2085;};return a22_0x52de();}function a22_0x1efa(_0x5236f8,_0x44c927){_0x5236f8=_0x5236f8-0x1d4;const _0x52de91=a22_0x52de();let _0x1efa95=_0x52de91[_0x5236f8];return _0x1efa95;}import{datasetDetail}from'../../commands/dataset/detail.js';import{datasetSdkDoc}from'../../commands/dataset/sdk-doc.js';export const datasetDefinitions=[datasetList,datasetDetail,datasetSdkDoc];
1
+ function a22_0xe48b(){const _0x3ddb11=['1073160GouZnQ','2kUhUYQ','47907bARkxK','1833209LmhKVP','610QiNxhq','846gQaQjS','366995UVTQCa','15685FSbPgc','2878176RmQKPn','1958148eVKWLj'];a22_0xe48b=function(){return _0x3ddb11;};return a22_0xe48b();}(function(_0x35edab,_0x15f836){const _0x10e47b=a22_0x271b,_0x34d05c=_0x35edab();while(!![]){try{const _0x30e418=parseInt(_0x10e47b(0x105))/0x1*(-parseInt(_0x10e47b(0x10a))/0x2)+parseInt(_0x10e47b(0x108))/0x3+parseInt(_0x10e47b(0x109))/0x4+-parseInt(_0x10e47b(0x106))/0x5*(parseInt(_0x10e47b(0x104))/0x6)+parseInt(_0x10e47b(0x102))/0x7+-parseInt(_0x10e47b(0x107))/0x8+-parseInt(_0x10e47b(0x10b))/0x9*(-parseInt(_0x10e47b(0x103))/0xa);if(_0x30e418===_0x15f836)break;else _0x34d05c['push'](_0x34d05c['shift']());}catch(_0x33b9a4){_0x34d05c['push'](_0x34d05c['shift']());}}}(a22_0xe48b,0x52a50));import{datasetList}from'../../commands/dataset/list.js';function a22_0x271b(_0x39ec28,_0x77092b){_0x39ec28=_0x39ec28-0x102;const _0xe48b9f=a22_0xe48b();let _0x271bef=_0xe48b9f[_0x39ec28];return _0x271bef;}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 a23_0x36564e=a23_0x6d8c;(function(_0x43640f,_0x1ff7a7){const _0x1b984a=a23_0x6d8c,_0x4bdd4f=_0x43640f();while(!![]){try{const _0x4d466d=parseInt(_0x1b984a(0xd8))/0x1*(-parseInt(_0x1b984a(0xd5))/0x2)+-parseInt(_0x1b984a(0xc6))/0x3+parseInt(_0x1b984a(0xd1))/0x4+parseInt(_0x1b984a(0xd3))/0x5*(-parseInt(_0x1b984a(0xc5))/0x6)+parseInt(_0x1b984a(0xce))/0x7+parseInt(_0x1b984a(0xc3))/0x8+parseInt(_0x1b984a(0xd4))/0x9;if(_0x4d466d===_0x1ff7a7)break;else _0x4bdd4f['push'](_0x4bdd4f['shift']());}catch(_0x2dbee4){_0x4bdd4f['push'](_0x4bdd4f['shift']());}}}(a23_0x5559,0x39d5a));import{listDatasets}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';export const datasetList={'service':a23_0x36564e(0xcf),'command':a23_0x36564e(0xc1),'description':a23_0x36564e(0xc9),'risk':a23_0x36564e(0xd7),'flags':[{'name':a23_0x36564e(0xd9),'type':a23_0x36564e(0xcb),'description':a23_0x36564e(0xc0)},{...CODE_FLAG,'required':![],'description':a23_0x36564e(0xca)}],async 'execute'(_0x5d6519){const _0x2c0357=a23_0x36564e,_0x4c6bcf=_0x5d6519['str'](_0x2c0357(0xd9)),_0x32194f=_0x5d6519[_0x2c0357(0xd0)]('code'),_0x19b9b1=await listDatasets(_0x5d6519[_0x2c0357(0xda)],{..._0x4c6bcf&&{'name':_0x4c6bcf},..._0x32194f&&{'code':_0x32194f}});return{'ok':!![],'data':{'total':_0x19b9b1['length'],'datasets':_0x19b9b1[_0x2c0357(0xd6)](_0x27b99b=>{const _0x3a07c1=_0x2c0357,_0x1ef745=_0x27b99b[_0x3a07c1(0xd2)]??{};return{'id':_0x27b99b['id'],'code':_0x27b99b[_0x3a07c1(0xc7)],'name':_0x27b99b[_0x3a07c1(0xd9)],'source':_0x27b99b[_0x3a07c1(0xbf)],'description':_0x27b99b[_0x3a07c1(0xcc)],'table':_0x1ef745[_0x3a07c1(0xc2)],'datasetKey':_0x1ef745['datasetKey'],'pk':_0x1ef745[_0x3a07c1(0xcd)],'fields':_0x1ef745['allFields']?_0x1ef745['allFields'][_0x3a07c1(0xc4)](',')[_0x3a07c1(0xd6)](_0x504c4d=>_0x504c4d[_0x3a07c1(0xc8)]()):[]};})}};}};function a23_0x6d8c(_0x45171d,_0x40cdc7){_0x45171d=_0x45171d-0xbf;const _0x55595b=a23_0x5559();let _0x6d8c2a=_0x55595b[_0x45171d];return _0x6d8c2a;}function a23_0x5559(){const _0x33051b=['trim','List\x20datasets\x20in\x20the\x20app\x20(supports\x20server-side\x20name/code\x20filtering)','Filter\x20by\x20dataset\x20code\x20(server-side\x20exact\x20match)','string','description','pkField','566174xpSaGn','dataset','str','1169352Htmbhl','dbtableConfig','68795EDbfZw','5978745BntdaV','2iuGPfg','map','read','469917nhoyLB','name','appCode','source','Filter\x20by\x20dataset\x20name\x20(server-side\x20fuzzy\x20match)','list','tableName','2905288jLIhfq','split','126QfAvKf','1214820ChXqWP','code'];a23_0x5559=function(){return _0x33051b;};return a23_0x5559();}
1
+ function a23_0x4547(){const _0x22420d=['14928471aAanGP','Filter\x20by\x20dataset\x20code\x20(server-side\x20exact\x20match)','2807HPnPRQ','name','6lXMeGp','source','939fSDjZU','appCode','map','description','datasetKey','code','1304926bTBIGd','split','8584zFUHHD','length','Filter\x20by\x20dataset\x20name\x20(server-side\x20fuzzy\x20match)','42547750ldHGPc','str','927695Hogaoy','2027944gKdKLw','list','4618GrXhJV','pkField','List\x20datasets\x20in\x20the\x20app\x20(supports\x20server-side\x20name/code\x20filtering)','string'];a23_0x4547=function(){return _0x22420d;};return a23_0x4547();}function a23_0x14cf(_0x437a41,_0x4d46e5){_0x437a41=_0x437a41-0x114;const _0x4547cc=a23_0x4547();let _0x14cf55=_0x4547cc[_0x437a41];return _0x14cf55;}const a23_0x2b3359=a23_0x14cf;(function(_0x4c7fb0,_0x1e20ad){const _0x1a69a1=a23_0x14cf,_0xd77e2=_0x4c7fb0();while(!![]){try{const _0x5f1139=-parseInt(_0x1a69a1(0x129))/0x1+parseInt(_0x1a69a1(0x119))/0x2*(-parseInt(_0x1a69a1(0x123))/0x3)+parseInt(_0x1a69a1(0x117))/0x4+parseInt(_0x1a69a1(0x116))/0x5*(parseInt(_0x1a69a1(0x121))/0x6)+-parseInt(_0x1a69a1(0x11f))/0x7*(parseInt(_0x1a69a1(0x12b))/0x8)+-parseInt(_0x1a69a1(0x11d))/0x9+parseInt(_0x1a69a1(0x114))/0xa;if(_0x5f1139===_0x1e20ad)break;else _0xd77e2['push'](_0xd77e2['shift']());}catch(_0x140d7){_0xd77e2['push'](_0xd77e2['shift']());}}}(a23_0x4547,0xcacc9));import{listDatasets}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';export const datasetList={'service':'dataset','command':a23_0x2b3359(0x118),'description':a23_0x2b3359(0x11b),'risk':'read','flags':[{'name':a23_0x2b3359(0x120),'type':a23_0x2b3359(0x11c),'description':a23_0x2b3359(0x12d)},{...CODE_FLAG,'required':![],'description':a23_0x2b3359(0x11e)}],async 'execute'(_0x4ecf4b){const _0x4fa0c2=a23_0x2b3359,_0x59f67c=_0x4ecf4b[_0x4fa0c2(0x115)](_0x4fa0c2(0x120)),_0xf3717e=_0x4ecf4b[_0x4fa0c2(0x115)](_0x4fa0c2(0x128)),_0x43ef2e=await listDatasets(_0x4ecf4b[_0x4fa0c2(0x124)],{..._0x59f67c&&{'name':_0x59f67c},..._0xf3717e&&{'code':_0xf3717e}});return{'ok':!![],'data':{'total':_0x43ef2e[_0x4fa0c2(0x12c)],'datasets':_0x43ef2e['map'](_0x5581ca=>{const _0x54be97=_0x4fa0c2,_0x487031=_0x5581ca['dbtableConfig']??{};return{'id':_0x5581ca['id'],'code':_0x5581ca['code'],'name':_0x5581ca[_0x54be97(0x120)],'source':_0x5581ca[_0x54be97(0x122)],'description':_0x5581ca[_0x54be97(0x126)],'table':_0x487031['tableName'],'datasetKey':_0x487031[_0x54be97(0x127)],'pk':_0x487031[_0x54be97(0x11a)],'fields':_0x487031['allFields']?_0x487031['allFields'][_0x54be97(0x12a)](',')[_0x54be97(0x125)](_0x572c7a=>_0x572c7a['trim']()):[]};})}};}};
@@ -1 +1 @@
1
- const a24_0x243fd5=a24_0x5744;(function(_0x4b26dc,_0x24ffc1){const _0x3df1b2=a24_0x5744,_0x475580=_0x4b26dc();while(!![]){try{const _0x590584=parseInt(_0x3df1b2(0x1d3))/0x1+parseInt(_0x3df1b2(0x1ce))/0x2+parseInt(_0x3df1b2(0x1cf))/0x3+-parseInt(_0x3df1b2(0x1d6))/0x4*(parseInt(_0x3df1b2(0x1d9))/0x5)+-parseInt(_0x3df1b2(0x1cd))/0x6+parseInt(_0x3df1b2(0x1ca))/0x7+-parseInt(_0x3df1b2(0x1d0))/0x8;if(_0x590584===_0x24ffc1)break;else _0x475580['push'](_0x475580['shift']());}catch(_0x33ac57){_0x475580['push'](_0x475580['shift']());}}}(a24_0x41b0,0xa19f1));import{getDatasetSdkUsageDoc}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';const DEFAULT_MARKDOWN=a24_0x243fd5(0x1d5);export function formatDatasetSdkMarkdown(_0x1eddee){const _0x50a2c3=a24_0x243fd5,_0xd52783=typeof _0x1eddee===_0x50a2c3(0x1cc)?_0x1eddee[_0x50a2c3(0x1d8)]():'';return _0xd52783||DEFAULT_MARKDOWN;}function a24_0x5744(_0x4e0a2d,_0x5acd90){_0x4e0a2d=_0x4e0a2d-0x1c9;const _0x41b0b8=a24_0x41b0();let _0x574408=_0x41b0b8[_0x4e0a2d];return _0x574408;}function a24_0x41b0(){const _0x2dead2=['code','string','3673560hSGJxY','2632162rKswEx','3541404KBDLhJ','18765064YuqEfb','read','appCode','312424lPKSyG','sdk-doc','#\x20Dataset\x20SDK\x20Usage\x20Documentation\x0a\x0a暂无\x20SDK\x20使用文档','4BNIaVr','Dataset\x20code\x20(32\x20characters).\x20Numeric\x20dataset\x20IDs\x20are\x20not\x20accepted.','trim','667195Qdmynx','dataset','6610520LqUcuL'];a24_0x41b0=function(){return _0x2dead2;};return a24_0x41b0();}export const datasetSdkDoc={'service':a24_0x243fd5(0x1c9),'command':a24_0x243fd5(0x1d4),'description':'Get\x20SDK\x20usage\x20markdown\x20for\x20a\x20dataset\x20code','risk':a24_0x243fd5(0x1d1),'flags':[{...CODE_FLAG,'description':a24_0x243fd5(0x1d7)}],async 'execute'(_0x188501){const _0x123671=a24_0x243fd5,_0x13228f=_0x188501['str'](_0x123671(0x1cb)),_0x54f18a=await getDatasetSdkUsageDoc(_0x13228f,_0x188501[_0x123671(0x1d2)]);return{'ok':!![],'data':{'code':_0x13228f,'appCode':_0x188501[_0x123671(0x1d2)],'markdown':formatDatasetSdkMarkdown(_0x54f18a)}};}};
1
+ const a24_0x332977=a24_0x569d;(function(_0x47cbe0,_0x28cb06){const _0x3d1d44=a24_0x569d,_0x199202=_0x47cbe0();while(!![]){try{const _0x771a48=parseInt(_0x3d1d44(0x1a9))/0x1+parseInt(_0x3d1d44(0x1a1))/0x2+parseInt(_0x3d1d44(0x19a))/0x3*(parseInt(_0x3d1d44(0x1a8))/0x4)+-parseInt(_0x3d1d44(0x1a0))/0x5+-parseInt(_0x3d1d44(0x1ac))/0x6+parseInt(_0x3d1d44(0x19e))/0x7+parseInt(_0x3d1d44(0x1a6))/0x8*(-parseInt(_0x3d1d44(0x1ab))/0x9);if(_0x771a48===_0x28cb06)break;else _0x199202['push'](_0x199202['shift']());}catch(_0x5028f9){_0x199202['push'](_0x199202['shift']());}}}(a24_0x2432,0xd48d3));import{getDatasetSdkUsageDoc}from'../../core/api-client.js';import{CODE_FLAG}from'../../commands/common/flags.js';const DEFAULT_MARKDOWN=a24_0x332977(0x1a4);export function formatDatasetSdkMarkdown(_0x13a09e){const _0x200555=a24_0x332977,_0x552c1e=typeof _0x13a09e===_0x200555(0x19b)?_0x13a09e[_0x200555(0x19c)]():'';return _0x552c1e||DEFAULT_MARKDOWN;}function a24_0x569d(_0x2f9aad,_0x1189ce){_0x2f9aad=_0x2f9aad-0x19a;const _0x243250=a24_0x2432();let _0x569d5b=_0x243250[_0x2f9aad];return _0x569d5b;}export const datasetSdkDoc={'service':a24_0x332977(0x1aa),'command':'sdk-doc','description':a24_0x332977(0x19f),'risk':a24_0x332977(0x1a2),'flags':[{...CODE_FLAG,'description':a24_0x332977(0x1a7)}],async 'execute'(_0x12c74f){const _0x2b846a=a24_0x332977,_0x7da98b=_0x12c74f[_0x2b846a(0x1a5)](_0x2b846a(0x1a3)),_0x3fba16=await getDatasetSdkUsageDoc(_0x7da98b,_0x12c74f[_0x2b846a(0x19d)]);return{'ok':!![],'data':{'code':_0x7da98b,'appCode':_0x12c74f['appCode'],'markdown':formatDatasetSdkMarkdown(_0x3fba16)}};}};function a24_0x2432(){const _0x4709c5=['9BkJhvh','1482636XnjKTE','3vHFBVT','string','trim','appCode','8252209pCAjUG','Get\x20SDK\x20usage\x20markdown\x20for\x20a\x20dataset\x20code','8156315IgZdpt','3265974JqWmWl','read','code','#\x20Dataset\x20SDK\x20Usage\x20Documentation\x0a\x0a暂无\x20SDK\x20使用文档','str','19933272JFxmHU','Dataset\x20code\x20(32\x20characters).\x20Numeric\x20dataset\x20IDs\x20are\x20not\x20accepted.','6077144WqrgVA','909479PAWDnS','dataset'];a24_0x2432=function(){return _0x4709c5;};return a24_0x2432();}
@@ -1 +1 @@
1
- const a25_0xfbaca3=a25_0x33b5;(function(_0x319d5a,_0x2c1f35){const _0x3fec17=a25_0x33b5,_0x4f7b99=_0x319d5a();while(!![]){try{const _0x499562=parseInt(_0x3fec17(0x16c))/0x1*(-parseInt(_0x3fec17(0x1a3))/0x2)+parseInt(_0x3fec17(0x1aa))/0x3+parseInt(_0x3fec17(0x167))/0x4+parseInt(_0x3fec17(0x184))/0x5*(parseInt(_0x3fec17(0x16d))/0x6)+parseInt(_0x3fec17(0x177))/0x7*(parseInt(_0x3fec17(0x17f))/0x8)+-parseInt(_0x3fec17(0x182))/0x9*(-parseInt(_0x3fec17(0x194))/0xa)+-parseInt(_0x3fec17(0x17e))/0xb*(parseInt(_0x3fec17(0x1a4))/0xc);if(_0x499562===_0x2c1f35)break;else _0x4f7b99['push'](_0x4f7b99['shift']());}catch(_0x11c0ee){_0x4f7b99['push'](_0x4f7b99['shift']());}}}(a25_0x422a,0xa71a2));import a25_0x249440 from'chalk';function a25_0x422a(){const _0x252d07=['8GwuVnx','format','\x20\x20auth\x20(effective):\x20','2822085huqLgu','(default:\x20','10YkOGNp','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','platform','log','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','repeat','\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(none)','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20─','defaultApp','arch','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','⚠\x20Empty','\x20\x20Config\x20JSON','accessKey','10iJIdbP','version','green','commandCount','missing','currentApp','\x20(legacy/compat\x20only)','(removed\x20—\x20cookie\x20auth\x20disabled)','\x20\x20API\x20Endpoints','\x20(accessKey)','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','\x20commands)','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','yellow','(no\x20file)','344yGYsCC','12cXyvdz','(set,\x20length=','registryPath','source','(missing)','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','3173832bsVRbp','✓\x20Valid\x20JSON','padEnd','locale','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','length','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','status','⚠\x20Empty\x20(treated\x20as\x20{})','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','\x20doctor','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','(not\x20found)','empty','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','path','Global','\x20\x20Service\x20Tree','doctor','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','✗\x20Invalid\x20JSON','2367572WqiQYn','(unnamed)','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','read','verbose','4915WHRLFC','2684946fPmkpz','check','bold','red','\x20\x20Session\x20check:\x20\x20\x20','ClientAk','Diagnose\x20CLI\x20configuration\x20and\x20environment','\x20\x20Config\x20Files','gray','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','7598297gCBRCJ','serviceCount','riskLevel','message','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','(default)','\x20\x20Merged\x20Config','26554275tzbAaw'];a25_0x422a=function(){return _0x252d07;};return a25_0x422a();}import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{getCliVersion}from'../utils/version.js';function a25_0x33b5(_0x2eb4a8,_0x2bf74f){_0x2eb4a8=_0x2eb4a8-0x152;const _0x422ae0=a25_0x422a();let _0x33b577=_0x422ae0[_0x2eb4a8];return _0x33b577;}import{getApiDomain,getRuntimeDomain,getUserDomain}from'../constant/domain.js';import{buildConfigFromFlags,initGlobalEnvironment,getProjectConfigPath,getGlobalConfigPath,inspectCliConfigJsonFile}from'../context.js';import{AUTH_MODE}from'../constant/auth-mode.js';import{isLegacyCompatConfigKey}from'../config/schema.js';import{inspectServiceRegistry}from'../commands/service/registry.js';async function execute(_0x16c93e){const _0x20f613=a25_0x33b5,_0x2eba0b=getCliVersion(),_0x4faf3f=buildConfigFromFlags({});await initGlobalEnvironment(_0x4faf3f),console[_0x20f613(0x187)](),console[_0x20f613(0x187)](a25_0x249440[_0x20f613(0x16f)](CLI_BIN_NAME+_0x20f613(0x15b))),console['log'](a25_0x249440[_0x20f613(0x175)]('─'[_0x20f613(0x189)](0x32))),console[_0x20f613(0x187)](_0x20f613(0x17b)+_0x2eba0b),console[_0x20f613(0x187)](_0x20f613(0x185)+process[_0x20f613(0x195)]),console[_0x20f613(0x187)](_0x20f613(0x18c)+process[_0x20f613(0x186)]+'\x20'+process[_0x20f613(0x18f)]),console[_0x20f613(0x187)](),console[_0x20f613(0x187)](a25_0x249440[_0x20f613(0x16f)](_0x20f613(0x174))),console[_0x20f613(0x187)](a25_0x249440['gray'](_0x20f613(0x18d)[_0x20f613(0x189)](0x1e)));const _0x2e257f=getGlobalConfigPath(),_0x175c6a=getProjectConfigPath();console[_0x20f613(0x187)](_0x20f613(0x1a9)+(_0x2e257f||a25_0x249440[_0x20f613(0x175)](_0x20f613(0x15d)))),console[_0x20f613(0x187)](_0x20f613(0x169)+(_0x175c6a||a25_0x249440['gray']('(not\x20found)'))),console[_0x20f613(0x187)](),console[_0x20f613(0x187)](a25_0x249440['bold'](_0x20f613(0x192))),console[_0x20f613(0x187)](a25_0x249440['gray'](_0x20f613(0x18d)['repeat'](0x1e)));const _0x1057a0=(_0x2ef105,_0x404661)=>{const _0x475942=_0x20f613;if(!_0x404661){console[_0x475942(0x187)]('\x20\x20'+_0x2ef105[_0x475942(0x152)](0x11)+'\x20'+a25_0x249440[_0x475942(0x175)](_0x475942(0x1a2)));return;}const _0xdad016=inspectCliConfigJsonFile(_0x404661);if(_0xdad016[_0x475942(0x158)]==='ok')console['log']('\x20\x20'+_0x2ef105[_0x475942(0x152)](0x11)+'\x20'+a25_0x249440[_0x475942(0x196)](_0x475942(0x1ab)));else{if(_0xdad016[_0x475942(0x158)]===_0x475942(0x15e))console[_0x475942(0x187)]('\x20\x20'+_0x2ef105['padEnd'](0x11)+'\x20'+a25_0x249440['yellow'](_0x475942(0x159)));else _0xdad016['status']===_0x475942(0x198)?console[_0x475942(0x187)]('\x20\x20'+_0x2ef105[_0x475942(0x152)](0x11)+'\x20'+a25_0x249440[_0x475942(0x175)](_0x475942(0x1a8))):(console[_0x475942(0x187)]('\x20\x20'+_0x2ef105[_0x475942(0x152)](0x11)+'\x20'+a25_0x249440[_0x475942(0x170)](_0x475942(0x166))),console['log']('\x20\x20'+''[_0x475942(0x152)](0x11)+'\x20'+a25_0x249440[_0x475942(0x170)](_0xdad016[_0x475942(0x17a)])));}};_0x1057a0(_0x20f613(0x162),_0x2e257f),_0x1057a0('Project',_0x175c6a),console[_0x20f613(0x187)](),console[_0x20f613(0x187)](a25_0x249440['bold'](_0x20f613(0x17d))),console['log'](a25_0x249440[_0x20f613(0x175)](_0x20f613(0x18d)[_0x20f613(0x189)](0x1e))),console[_0x20f613(0x187)](_0x20f613(0x190)+(_0x4faf3f['appCode']||a25_0x249440['red']('(not\x20set)'))),console['log']('\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x4faf3f['env']);const _0x56011a=isLegacyCompatConfigKey('locale')?a25_0x249440[_0x20f613(0x175)](_0x4faf3f[_0x20f613(0x153)]+_0x20f613(0x19a)):_0x4faf3f[_0x20f613(0x153)];console['log'](_0x20f613(0x165)+_0x56011a),console[_0x20f613(0x187)](_0x20f613(0x154)+(_0x4faf3f[_0x20f613(0x18e)]||a25_0x249440[_0x20f613(0x175)](_0x20f613(0x18b)))),console['log'](_0x20f613(0x160)+(_0x4faf3f[_0x20f613(0x199)]||a25_0x249440[_0x20f613(0x175)](_0x20f613(0x18b)))),console[_0x20f613(0x187)](_0x20f613(0x1a0)+(_0x4faf3f[_0x20f613(0x180)]||a25_0x249440[_0x20f613(0x175)](_0x20f613(0x183)+DEFAULT_CONFIG_VALUES[_0x20f613(0x180)]+')'))),console[_0x20f613(0x187)](_0x20f613(0x19e)+(_0x4faf3f['pageSize']??a25_0x249440['gray'](_0x20f613(0x17c)))),console[_0x20f613(0x187)](_0x20f613(0x15a)+_0x4faf3f[_0x20f613(0x179)]),console[_0x20f613(0x187)](_0x20f613(0x157)+_0x4faf3f[_0x20f613(0x16b)]),console['log'](_0x20f613(0x181)+AUTH_MODE[_0x20f613(0x172)]),console[_0x20f613(0x187)](_0x20f613(0x176)+(_0x4faf3f[_0x20f613(0x193)]?a25_0x249440[_0x20f613(0x196)](_0x20f613(0x1a5)+_0x4faf3f[_0x20f613(0x193)][_0x20f613(0x156)]+')'):a25_0x249440[_0x20f613(0x175)](_0x20f613(0x18b)))),console[_0x20f613(0x187)](),console[_0x20f613(0x187)](a25_0x249440[_0x20f613(0x16f)](_0x20f613(0x19c))),console['log'](a25_0x249440[_0x20f613(0x175)](_0x20f613(0x18d)[_0x20f613(0x189)](0x1e))),console[_0x20f613(0x187)](_0x20f613(0x188)+getApiDomain()),console[_0x20f613(0x187)](_0x20f613(0x15c)+getUserDomain()),console[_0x20f613(0x187)]('\x20\x20runtimeDomain:\x20\x20\x20'+getRuntimeDomain()),console[_0x20f613(0x187)](),console['log'](a25_0x249440[_0x20f613(0x16f)](_0x20f613(0x163))),console[_0x20f613(0x187)](a25_0x249440['gray'](_0x20f613(0x18d)[_0x20f613(0x189)](0x1e)));const _0x3254c3=inspectServiceRegistry();console[_0x20f613(0x187)]('\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x3254c3[_0x20f613(0x1a6)]),console[_0x20f613(0x187)](_0x20f613(0x15f)+formatServiceRegistryStatus(_0x3254c3)),console[_0x20f613(0x187)]('\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x3254c3[_0x20f613(0x178)]),console[_0x20f613(0x187)](_0x20f613(0x155)+_0x3254c3[_0x20f613(0x197)]);for(const _0x15537e of _0x3254c3['services']){console[_0x20f613(0x187)]('\x20\x20'+(_0x15537e['serviceCode']+':')[_0x20f613(0x152)](0x11)+'\x20'+(_0x15537e['name']||a25_0x249440[_0x20f613(0x175)](_0x20f613(0x168)))+'\x20('+_0x15537e[_0x20f613(0x197)]+_0x20f613(0x19f)),console[_0x20f613(0x187)]('\x20\x20'+''[_0x20f613(0x152)](0x11)+'\x20Imported\x20from:\x20'+_0x15537e[_0x20f613(0x1a7)][_0x20f613(0x161)]);}return console[_0x20f613(0x187)](),console[_0x20f613(0x187)](a25_0x249440[_0x20f613(0x16f)]('\x20\x20Auth')),console[_0x20f613(0x187)](a25_0x249440[_0x20f613(0x175)](_0x20f613(0x18d)[_0x20f613(0x189)](0x1e))),console['log'](_0x20f613(0x18a)+a25_0x249440[_0x20f613(0x196)](AUTH_MODE[_0x20f613(0x172)]+_0x20f613(0x19d))),console['log'](_0x20f613(0x171)+a25_0x249440[_0x20f613(0x175)](_0x20f613(0x19b))),console['log'](),{'ok':!![]};}function formatServiceRegistryStatus(_0x39dc75){const _0x2f1598=a25_0x33b5;if(_0x39dc75[_0x2f1598(0x158)]==='ok')return a25_0x249440[_0x2f1598(0x196)]('✓\x20Loaded');if(_0x39dc75['status']===_0x2f1598(0x198))return a25_0x249440[_0x2f1598(0x175)](_0x2f1598(0x15d));if(_0x39dc75[_0x2f1598(0x158)]===_0x2f1598(0x15e))return a25_0x249440[_0x2f1598(0x1a1)](_0x2f1598(0x191));return a25_0x249440[_0x2f1598(0x170)]('✗\x20Invalid'+(_0x39dc75[_0x2f1598(0x17a)]?':\x20'+_0x39dc75[_0x2f1598(0x17a)]:''));}export const doctorDefinition={'service':a25_0xfbaca3(0x164),'command':a25_0xfbaca3(0x16e),'description':a25_0xfbaca3(0x173),'risk':a25_0xfbaca3(0x16a),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
1
+ const a25_0x1badae=a25_0x2335;(function(_0x55918d,_0x3319bb){const _0x2e50ee=a25_0x2335,_0x155630=_0x55918d();while(!![]){try{const _0x256c2c=parseInt(_0x2e50ee(0x145))/0x1*(-parseInt(_0x2e50ee(0x15a))/0x2)+-parseInt(_0x2e50ee(0x14e))/0x3+-parseInt(_0x2e50ee(0x17d))/0x4+parseInt(_0x2e50ee(0x175))/0x5*(parseInt(_0x2e50ee(0x13f))/0x6)+-parseInt(_0x2e50ee(0x165))/0x7+parseInt(_0x2e50ee(0x143))/0x8+-parseInt(_0x2e50ee(0x16e))/0x9*(-parseInt(_0x2e50ee(0x14d))/0xa);if(_0x256c2c===_0x3319bb)break;else _0x155630['push'](_0x155630['shift']());}catch(_0x5a19e0){_0x155630['push'](_0x155630['shift']());}}}(a25_0x1b1a,0xd172a));import a25_0x533fd3 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{getCliVersion}from'../utils/version.js';import{getApiDomain,getRuntimeDomain,getUserDomain}from'../constant/domain.js';function a25_0x2335(_0x4c2c58,_0x40b12c){_0x4c2c58=_0x4c2c58-0x139;const _0x1b1a8a=a25_0x1b1a();let _0x2335bb=_0x1b1a8a[_0x4c2c58];return _0x2335bb;}import{buildConfigFromFlags,initGlobalEnvironment,getProjectConfigPath,getGlobalConfigPath,inspectCliConfigJsonFile}from'../context.js';function a25_0x1b1a(){const _0x221ac7=['\x20\x20Auth','message','name','pageSize','174eXHElg','\x20\x20API\x20Endpoints','gray','\x20(accessKey)','6388664PqhWTx','ClientAk','1MhzRZk','\x20\x20Config\x20Files','Diagnose\x20CLI\x20configuration\x20and\x20environment','source','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20─','✓\x20Loaded','registryPath','26543980ogbDuM','5119581tiwjLL','format','bold','\x20doctor','\x20\x20Services:\x20\x20\x20\x20\x20\x20\x20\x20','verbose','red','env','(not\x20found)','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Global','(none)','252190igNOdO','(set,\x20length=','\x20\x20Commands:\x20\x20\x20\x20\x20\x20\x20\x20','(no\x20file)','yellow','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(default)','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','6994302kPAoOJ','✓\x20Valid\x20JSON','✗\x20Invalid\x20JSON','commandCount','path','empty','⚠\x20Empty\x20(treated\x20as\x20{})','padEnd','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','9trIsjs','✗\x20Invalid','(removed\x20—\x20cookie\x20auth\x20disabled)','currentApp','\x20\x20accessKey:\x20\x20\x20\x20\x20\x20\x20','\x20\x20runtimeDomain:\x20\x20\x20','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','64810TGdmwQ','\x20\x20Registry:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','arch','accessKey','(unnamed)','\x20\x20Config\x20JSON','platform','556692MmuTXl','missing','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','services','log','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','defaultApp','\x20Imported\x20from:\x20','⚠\x20Empty','green','locale','repeat','serviceCode','\x20\x20Merged\x20Config','status'];a25_0x1b1a=function(){return _0x221ac7;};return a25_0x1b1a();}import{AUTH_MODE}from'../constant/auth-mode.js';import{isLegacyCompatConfigKey}from'../config/schema.js';import{inspectServiceRegistry}from'../commands/service/registry.js';async function execute(_0x5c27d7){const _0x13d033=a25_0x2335,_0x160b2e=getCliVersion(),_0x358cb2=buildConfigFromFlags({});await initGlobalEnvironment(_0x358cb2),console[_0x13d033(0x181)](),console[_0x13d033(0x181)](a25_0x533fd3[_0x13d033(0x150)](CLI_BIN_NAME+_0x13d033(0x151))),console[_0x13d033(0x181)](a25_0x533fd3['gray']('─'[_0x13d033(0x188)](0x32))),console[_0x13d033(0x181)](_0x13d033(0x16d)+_0x160b2e),console['log'](_0x13d033(0x174)+process['version']),console[_0x13d033(0x181)]('\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0x13d033(0x17c)]+'\x20'+process[_0x13d033(0x178)]),console[_0x13d033(0x181)](),console[_0x13d033(0x181)](a25_0x533fd3['bold'](_0x13d033(0x146))),console[_0x13d033(0x181)](a25_0x533fd3[_0x13d033(0x141)](_0x13d033(0x14a)[_0x13d033(0x188)](0x1e)));const _0x31b4c7=getGlobalConfigPath(),_0x161c8b=getProjectConfigPath();console[_0x13d033(0x181)](_0x13d033(0x162)+(_0x31b4c7||a25_0x533fd3[_0x13d033(0x141)](_0x13d033(0x156)))),console[_0x13d033(0x181)]('\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x161c8b||a25_0x533fd3['gray'](_0x13d033(0x156)))),console[_0x13d033(0x181)](),console[_0x13d033(0x181)](a25_0x533fd3[_0x13d033(0x150)](_0x13d033(0x17b))),console['log'](a25_0x533fd3[_0x13d033(0x141)](_0x13d033(0x14a)[_0x13d033(0x188)](0x1e)));const _0x21a917=(_0x2a40fb,_0x5e640b)=>{const _0x4a4ad0=_0x13d033;if(!_0x5e640b){console[_0x4a4ad0(0x181)]('\x20\x20'+_0x2a40fb['padEnd'](0x11)+'\x20'+a25_0x533fd3[_0x4a4ad0(0x141)](_0x4a4ad0(0x15d)));return;}const _0x293dac=inspectCliConfigJsonFile(_0x5e640b);if(_0x293dac[_0x4a4ad0(0x13a)]==='ok')console[_0x4a4ad0(0x181)]('\x20\x20'+_0x2a40fb['padEnd'](0x11)+'\x20'+a25_0x533fd3[_0x4a4ad0(0x186)](_0x4a4ad0(0x166)));else{if(_0x293dac[_0x4a4ad0(0x13a)]===_0x4a4ad0(0x16a))console[_0x4a4ad0(0x181)]('\x20\x20'+_0x2a40fb['padEnd'](0x11)+'\x20'+a25_0x533fd3[_0x4a4ad0(0x15e)](_0x4a4ad0(0x16b)));else _0x293dac[_0x4a4ad0(0x13a)]===_0x4a4ad0(0x17e)?console['log']('\x20\x20'+_0x2a40fb[_0x4a4ad0(0x16c)](0x11)+'\x20'+a25_0x533fd3['gray']('(missing)')):(console[_0x4a4ad0(0x181)]('\x20\x20'+_0x2a40fb[_0x4a4ad0(0x16c)](0x11)+'\x20'+a25_0x533fd3['red'](_0x4a4ad0(0x167))),console[_0x4a4ad0(0x181)]('\x20\x20'+''[_0x4a4ad0(0x16c)](0x11)+'\x20'+a25_0x533fd3['red'](_0x293dac[_0x4a4ad0(0x13c)])));}};_0x21a917(_0x13d033(0x158),_0x31b4c7),_0x21a917('Project',_0x161c8b),console[_0x13d033(0x181)](),console['log'](a25_0x533fd3[_0x13d033(0x150)](_0x13d033(0x139))),console[_0x13d033(0x181)](a25_0x533fd3['gray'](_0x13d033(0x14a)['repeat'](0x1e))),console[_0x13d033(0x181)](_0x13d033(0x149)+(_0x358cb2['appCode']||a25_0x533fd3[_0x13d033(0x154)]('(not\x20set)'))),console[_0x13d033(0x181)](_0x13d033(0x15f)+_0x358cb2[_0x13d033(0x155)]);const _0x1d9200=isLegacyCompatConfigKey(_0x13d033(0x187))?a25_0x533fd3[_0x13d033(0x141)](_0x358cb2[_0x13d033(0x187)]+'\x20(legacy/compat\x20only)'):_0x358cb2[_0x13d033(0x187)];console[_0x13d033(0x181)]('\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x1d9200),console[_0x13d033(0x181)](_0x13d033(0x164)+(_0x358cb2[_0x13d033(0x183)]||a25_0x533fd3[_0x13d033(0x141)](_0x13d033(0x159)))),console[_0x13d033(0x181)]('\x20\x20currentApp:\x20\x20\x20\x20\x20\x20'+(_0x358cb2[_0x13d033(0x171)]||a25_0x533fd3[_0x13d033(0x141)](_0x13d033(0x159)))),console['log'](_0x13d033(0x157)+(_0x358cb2[_0x13d033(0x14f)]||a25_0x533fd3[_0x13d033(0x141)]('(default:\x20'+DEFAULT_CONFIG_VALUES['format']+')'))),console['log'](_0x13d033(0x161)+(_0x358cb2[_0x13d033(0x13e)]??a25_0x533fd3[_0x13d033(0x141)](_0x13d033(0x160)))),console[_0x13d033(0x181)]('\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20'+_0x358cb2['riskLevel']),console['log'](_0x13d033(0x163)+_0x358cb2[_0x13d033(0x153)]),console['log']('\x20\x20auth\x20(effective):\x20'+AUTH_MODE[_0x13d033(0x144)]),console[_0x13d033(0x181)](_0x13d033(0x172)+(_0x358cb2[_0x13d033(0x179)]?a25_0x533fd3['green'](_0x13d033(0x15b)+_0x358cb2['accessKey']['length']+')'):a25_0x533fd3[_0x13d033(0x141)]('(none)'))),console[_0x13d033(0x181)](),console['log'](a25_0x533fd3[_0x13d033(0x150)](_0x13d033(0x140))),console['log'](a25_0x533fd3[_0x13d033(0x141)](_0x13d033(0x14a)['repeat'](0x1e))),console[_0x13d033(0x181)](_0x13d033(0x17f)+getApiDomain()),console['log'](_0x13d033(0x182)+getUserDomain()),console[_0x13d033(0x181)](_0x13d033(0x173)+getRuntimeDomain()),console[_0x13d033(0x181)](),console[_0x13d033(0x181)](a25_0x533fd3[_0x13d033(0x150)]('\x20\x20Service\x20Tree')),console['log'](a25_0x533fd3[_0x13d033(0x141)](_0x13d033(0x14a)['repeat'](0x1e)));const _0x8f8121=inspectServiceRegistry();console['log'](_0x13d033(0x176)+_0x8f8121[_0x13d033(0x14c)]),console[_0x13d033(0x181)](_0x13d033(0x177)+formatServiceRegistryStatus(_0x8f8121)),console[_0x13d033(0x181)](_0x13d033(0x152)+_0x8f8121['serviceCount']),console[_0x13d033(0x181)](_0x13d033(0x15c)+_0x8f8121[_0x13d033(0x168)]);for(const _0x358d90 of _0x8f8121[_0x13d033(0x180)]){console[_0x13d033(0x181)]('\x20\x20'+(_0x358d90[_0x13d033(0x189)]+':')['padEnd'](0x11)+'\x20'+(_0x358d90[_0x13d033(0x13d)]||a25_0x533fd3['gray'](_0x13d033(0x17a)))+'\x20('+_0x358d90['commandCount']+'\x20commands)'),console[_0x13d033(0x181)]('\x20\x20'+''['padEnd'](0x11)+_0x13d033(0x184)+_0x358d90[_0x13d033(0x148)][_0x13d033(0x169)]);}return console[_0x13d033(0x181)](),console[_0x13d033(0x181)](a25_0x533fd3[_0x13d033(0x150)](_0x13d033(0x13b))),console[_0x13d033(0x181)](a25_0x533fd3['gray'](_0x13d033(0x14a)[_0x13d033(0x188)](0x1e))),console['log']('\x20\x20Mode:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+a25_0x533fd3[_0x13d033(0x186)](AUTH_MODE['ClientAk']+_0x13d033(0x142))),console['log']('\x20\x20Session\x20check:\x20\x20\x20'+a25_0x533fd3[_0x13d033(0x141)](_0x13d033(0x170))),console[_0x13d033(0x181)](),{'ok':!![]};}function formatServiceRegistryStatus(_0x20dc51){const _0x3298f9=a25_0x2335;if(_0x20dc51[_0x3298f9(0x13a)]==='ok')return a25_0x533fd3[_0x3298f9(0x186)](_0x3298f9(0x14b));if(_0x20dc51['status']===_0x3298f9(0x17e))return a25_0x533fd3['gray']('(not\x20found)');if(_0x20dc51[_0x3298f9(0x13a)]===_0x3298f9(0x16a))return a25_0x533fd3[_0x3298f9(0x15e)](_0x3298f9(0x185));return a25_0x533fd3[_0x3298f9(0x154)](_0x3298f9(0x16f)+(_0x20dc51['message']?':\x20'+_0x20dc51['message']:''));}export const doctorDefinition={'service':'doctor','command':'check','description':a25_0x1badae(0x147),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
@@ -1 +1 @@
1
- const a26_0x1fb3f3=a26_0xb42c;(function(_0x3f096a,_0x5c477f){const _0x5b0931=a26_0xb42c,_0x2bc160=_0x3f096a();while(!![]){try{const _0x1eec97=-parseInt(_0x5b0931(0xb9))/0x1+parseInt(_0x5b0931(0x9d))/0x2*(parseInt(_0x5b0931(0x9f))/0x3)+-parseInt(_0x5b0931(0xae))/0x4+-parseInt(_0x5b0931(0xa9))/0x5*(-parseInt(_0x5b0931(0xa4))/0x6)+-parseInt(_0x5b0931(0xc1))/0x7+-parseInt(_0x5b0931(0x9a))/0x8+parseInt(_0x5b0931(0xaf))/0x9*(parseInt(_0x5b0931(0xbd))/0xa);if(_0x1eec97===_0x5c477f)break;else _0x2bc160['push'](_0x2bc160['shift']());}catch(_0x4c3308){_0x2bc160['push'](_0x2bc160['shift']());}}}(a26_0xe58d,0xaa7e0));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':a26_0x1fb3f3(0x97),'type':a26_0x1fb3f3(0xc3),'description':a26_0x1fb3f3(0xba)},{'name':'env','type':a26_0x1fb3f3(0xc3),'description':a26_0x1fb3f3(0x89)+DEFAULT_CONFIG_VALUES[a26_0x1fb3f3(0xa6)]+')','enum':[...RUNTIME_ENV_VALUES]},{'name':'global','type':a26_0x1fb3f3(0xa7),'description':a26_0x1fb3f3(0x9c)+PRODUCT_CONFIG['newConfigFileName']+a26_0x1fb3f3(0xb7),'default':![]},{'name':'yes','type':'boolean','description':a26_0x1fb3f3(0xbc),'default':![]}];export const initImportFlagDefs=[{'name':a26_0x1fb3f3(0x8e),'type':a26_0x1fb3f3(0xc3),'description':a26_0x1fb3f3(0xa5),'required':!![]},{'name':a26_0x1fb3f3(0x97),'type':a26_0x1fb3f3(0xc3),'description':'Override\x20imported\x20default\x20appcode'},{'name':'env','type':a26_0x1fb3f3(0xc3),'description':a26_0x1fb3f3(0x94),'enum':[...RUNTIME_ENV_VALUES]},{'name':'global','type':'boolean','description':a26_0x1fb3f3(0x9c)+PRODUCT_CONFIG[a26_0x1fb3f3(0xb5)]+a26_0x1fb3f3(0xb7),'default':![]},{'name':'yes','type':a26_0x1fb3f3(0xa7),'description':a26_0x1fb3f3(0xbc),'default':![]}];export async function runInit(_0x5407f0){const _0x36cb06=a26_0x1fb3f3,_0x3741a2=isNonInteractiveMode(_0x5407f0),_0x19f787=_0x5407f0[_0x36cb06(0xc9)]?_0x36cb06(0xc9):'project',_0x4ac596=resolveWriteConfigPath(_0x19f787);try{_0x3741a2?await runNonInteractive(_0x5407f0,_0x4ac596):await runInteractive(_0x5407f0,_0x4ac596);}catch(_0x51bb92){if(_0x51bb92 instanceof AbortPrompt)throw CliErrors[_0x36cb06(0x99)]();throw _0x51bb92;}}export async function runInitImport(_0x2aa4e3){const _0x3e6085=a26_0x1fb3f3,_0x4df273=_0x2aa4e3[_0x3e6085(0xc9)]?'global':'project',_0x4b087a=resolveWriteConfigPath(_0x4df273);await runFromImport(_0x2aa4e3,_0x4b087a);}const RUNTIME_IRRELEVANT_KEYS=new Set([a26_0x1fb3f3(0x8a)]);async function runFromImport(_0x2c43f3,_0xce0304){const _0x400fb2=a26_0x1fb3f3,_0x40be10=resolveFilePath(_0x2c43f3[_0x400fb2(0x8e)]);if(!existsSync(_0x40be10))throw CliErrors['validation'](_0x400fb2(0x9b)+_0x40be10);const _0x15676c=readSourceFile(_0x40be10),_0x31e375=convertToRuntimeConfig(_0x15676c);_0x2c43f3[_0x400fb2(0x97)]&&(_0x31e375[_0x400fb2(0x97)]=String(_0x2c43f3['appcode']));_0x2c43f3[_0x400fb2(0xa6)]&&(_0x31e375[_0x400fb2(0xa6)]=resolveInitEnv(_0x2c43f3));if(!_0x31e375[_0x400fb2(0x97)])throw CliErrors[_0x400fb2(0xc8)]('Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','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(_0xce0304,_0x31e375,_0x2c43f3),console[_0x400fb2(0xac)](_0x400fb2(0xb4)+_0x40be10),console[_0x400fb2(0xac)](_0x400fb2(0x8f)+_0xce0304),console['log'](_0x400fb2(0xc6)+_0x31e375[_0x400fb2(0x97)]);if(_0x31e375[_0x400fb2(0x9e)])console['log'](_0x400fb2(0x90)+_0x31e375[_0x400fb2(0x9e)]);}function convertToRuntimeConfig(_0x5e09d0){const _0x3b0641=a26_0x1fb3f3;if(_0x5e09d0[_0x3b0641(0xc0)]&&typeof _0x5e09d0[_0x3b0641(0xc0)]===_0x3b0641(0xb0))throw CliErrors['validation'](_0x3b0641(0x98),'Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.');const _0x1e626d={};for(const _0x4f1fb5 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0x5e09d0[_0x4f1fb5]!==undefined&&(_0x1e626d[_0x4f1fb5]=_0x5e09d0[_0x4f1fb5]);}return!_0x1e626d[_0x3b0641(0xa0)]&&(_0x1e626d[_0x3b0641(0xa0)]=DEFAULT_CONFIG_VALUES[_0x3b0641(0xa0)]),_0x1e626d;}async function runNonInteractive(_0x12175f,_0x42d9ea){const _0x275ea5=a26_0x1fb3f3,_0x39796b=_0x12175f[_0x275ea5(0x97)];if(!_0x39796b)throw CliErrors['flagMissing']('appcode',_0x275ea5(0x93)+CLI_BIN_NAME+_0x275ea5(0xab));const _0x18bd35=resolveInitEnv(_0x12175f);await writeInitConfig(_0x42d9ea,{'appcode':_0x39796b,'env':_0x18bd35},_0x12175f),console[_0x275ea5(0xac)](_0x275ea5(0xc7)+_0x42d9ea),console[_0x275ea5(0xac)]('\x20\x20appcode:\x20'+_0x39796b),console[_0x275ea5(0xac)](_0x275ea5(0x8b)+_0x18bd35);}async function runInteractive(_0x332b45,_0x2f6274){const _0xccddd2=a26_0x1fb3f3,_0x3e72df=loadExisting(_0x2f6274),_0x2c2573=typeof _0x3e72df?.['appcode']===_0xccddd2(0xc3)?_0x3e72df[_0xccddd2(0x97)]:'',_0x16b551=resolveInitEnv(_0x332b45);console['log'](CLI_BIN_NAME+_0xccddd2(0xa8)+PRODUCT_CONFIG[_0xccddd2(0xb5)]+'\x0a');if(existsSync(_0x2f6274)&&!_0x332b45[_0xccddd2(0xb6)]){const _0x3b7422=await promptYesNo('File\x20'+_0x2f6274+_0xccddd2(0x8d),![]);if(!_0x3b7422){console[_0xccddd2(0xac)](_0xccddd2(0xa1));return;}}const _0x3f2763=typeof _0x332b45[_0xccddd2(0x97)]==='string'?_0x332b45['appcode'][_0xccddd2(0xbf)]():'';let _0x38eaa0=_0x3f2763;!_0x38eaa0&&(_0x38eaa0=await promptInput(_0xccddd2(0xb1),_0x2c2573));if(!_0x38eaa0[_0xccddd2(0xbf)]())throw CliErrors['validation'](_0xccddd2(0xa2));await writeInitConfig(_0x2f6274,{'appcode':_0x38eaa0[_0xccddd2(0xbf)](),'env':_0x16b551},_0x332b45),console[_0xccddd2(0xac)]('\x0aInitialized\x20'+_0x2f6274),console[_0xccddd2(0xac)](_0xccddd2(0xc6)+_0x38eaa0['trim']()),console[_0xccddd2(0xac)](_0xccddd2(0x8b)+_0x16b551);}function a26_0xb42c(_0x5825e0,_0x2eb1dc){_0x5825e0=_0x5825e0-0x89;const _0xe58dd1=a26_0xe58d();let _0xb42c72=_0xe58dd1[_0x5825e0];return _0xb42c72;}async function writeInitConfig(_0xde56dc,_0x33a4b6,_0x234205){const _0x34d307=a26_0x1fb3f3;let _0x2116b6={};existsSync(_0xde56dc)&&!_0x234205['yes']&&(_0x2116b6=readConfigFile(_0xde56dc));for(const [_0xa23d9c,_0x2dfa81]of Object['entries'](_0x33a4b6)){_0x2dfa81!==undefined&&(_0x2116b6[_0xa23d9c]=_0x2dfa81);}if(_0x2116b6[_0x34d307(0xc5)])delete _0x2116b6[_0x34d307(0xc5)];writeConfigFile(_0xde56dc,_0x2116b6);}function a26_0xe58d(){const _0x5cf680=['458gFaKtc','defaultApp','16221beEODZ','riskLevel','Aborted.','App\x20code\x20cannot\x20be\x20empty.','User\x20aborted\x20prompt','30vpjtPV','Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','env','boolean','\x20init\x20—\x20Create\x20','796410Qlvmqx','name','\x20app\x20init\x20--appcode\x20<code>\x20[--env\x20daily]\x20[--global]','log','SIGINT','621228cCMULc','5124051HXwsKV','object','App\x20code','Invalid\x20env\x20\x22','race','Imported\x20from\x20','newConfigFileName','yes',')\x20instead\x20of\x20project','[Y/n]','276015bEnAoJ','App\x20code\x20for\x20the\x20project','close','Skip\x20confirmation\x20when\x20overwriting','20VxnfHM','cwd','trim','apps','6401633IRVjUE','\x22.\x20Allowed:\x20','string','question','app','\x20\x20appcode:\x20','Initialized\x20','validation','global','Target\x20environment\x20(default\x20','apiDir','\x20\x20env:\x20\x20\x20\x20\x20','message','\x20already\x20exists.\x20Overwrite?','file','\x20\x20config:\x20\x20','\x20\x20default:\x20','includes','join','Usage:\x20','Override\x20imported\x20default\x20env','[y/N]','parse','appcode','Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','cancelled','9032912FWfpsT','Source\x20file\x20not\x20found:\x20','Write\x20to\x20global\x20(~/'];a26_0xe58d=function(){return _0x5cf680;};return a26_0xe58d();}class AbortPrompt extends Error{constructor(){const _0x5d4003=a26_0x1fb3f3;super(_0x5d4003(0xa3)),this[_0x5d4003(0xaa)]='AbortPrompt';}}function createSafeRl(){const _0x2e7643=createInterface({'input':process['stdin'],'output':process['stdout']});let _0x54db47;const _0x243ea9=new Promise((_0x52dcc5,_0x35a67c)=>{const _0x2bd5f8=a26_0xb42c;_0x54db47=()=>{const _0x2d73e6=a26_0xb42c;_0x54db47&&(_0x2e7643['removeListener'](_0x2d73e6(0xad),_0x54db47),_0x54db47=undefined);try{_0x2e7643[_0x2d73e6(0xbb)]();}catch{}_0x35a67c(new AbortPrompt());},_0x2e7643['once'](_0x2bd5f8(0xad),_0x54db47);}),_0x7ad385=()=>{const _0x108823=a26_0xb42c;_0x54db47&&(_0x2e7643['removeListener'](_0x108823(0xad),_0x54db47),_0x54db47=undefined);try{_0x2e7643[_0x108823(0xbb)]();}catch{}};return{'rl':_0x2e7643,'abortPromise':_0x243ea9,'disposeSuccess':_0x7ad385};}async function promptInput(_0xfc25a1,_0xa01adb){const _0xa45552=a26_0x1fb3f3,{rl:_0x3ad9dc,abortPromise:_0x36a245,disposeSuccess:_0x5a3c8c}=createSafeRl(),_0x3c6c06=new Promise(_0x412978=>{const _0x332c2c=a26_0xb42c,_0x2b7717=_0xa01adb?'\x20\x20'+_0xfc25a1+'\x20('+_0xa01adb+'):\x20':'\x20\x20'+_0xfc25a1+':\x20';_0x3ad9dc[_0x332c2c(0xc4)](_0x2b7717,_0x32db74=>{const _0x104015=_0x332c2c;_0x5a3c8c(),_0x412978(_0x32db74[_0x104015(0xbf)]()||_0xa01adb);});});return Promise[_0xa45552(0xb3)]([_0x3c6c06,_0x36a245]);}async function promptYesNo(_0x3a3c38,_0x1ae82b){const _0x4577df=a26_0x1fb3f3,{rl:_0x56212e,abortPromise:_0x1dcc45,disposeSuccess:_0x37ce4c}=createSafeRl(),_0x2b6def=new Promise(_0x589354=>{const _0x20098c=a26_0xb42c,_0x49925=_0x1ae82b?_0x20098c(0xb8):_0x20098c(0x95);_0x56212e[_0x20098c(0xc4)]('\x20\x20'+_0x3a3c38+'\x20'+_0x49925+':\x20',_0x1bafb2=>{const _0x36360b=_0x20098c;_0x37ce4c();const _0x3d237c=_0x1bafb2[_0x36360b(0xbf)]()['toLowerCase']();if(_0x3d237c==='y'||_0x3d237c==='yes')_0x589354(!![]);else{if(_0x3d237c==='n'||_0x3d237c==='no')_0x589354(![]);else _0x589354(_0x1ae82b);}});});return Promise[_0x4577df(0xb3)]([_0x2b6def,_0x1dcc45]);}function loadExisting(_0x552486){if(!existsSync(_0x552486))return null;return readConfigFile(_0x552486);}function resolveFilePath(_0x50e344){const _0x3c6651=a26_0x1fb3f3;return isAbsolute(_0x50e344)?_0x50e344:resolve(process[_0x3c6651(0xbe)](),_0x50e344);}function readSourceFile(_0x948ef5){const _0xa8517d=a26_0x1fb3f3;try{const _0x5bb4f9=readFileSync(_0x948ef5,{'encoding':'utf8'});return JSON[_0xa8517d(0x96)](_0x5bb4f9);}catch(_0x1ac595){throw CliErrors[_0xa8517d(0xc8)]('Failed\x20to\x20parse\x20source\x20file:\x20'+_0x1ac595[_0xa8517d(0x8c)]);}}function resolveInitEnv(_0x4e6afe){const _0x58490b=a26_0x1fb3f3,_0x106783=_0x4e6afe[_0x58490b(0xa6)];if(_0x106783===undefined||_0x106783==='')return DEFAULT_CONFIG_VALUES['env'];if(!RUNTIME_ENV_VALUES[_0x58490b(0x91)](_0x106783))throw CliErrors[_0x58490b(0xc8)](_0x58490b(0xb2)+_0x106783+_0x58490b(0xc2)+RUNTIME_ENV_VALUES[_0x58490b(0x92)](',\x20'));return _0x106783;}
1
+ const a26_0x4ab39d=a26_0x58e0;(function(_0x2a4132,_0x3bf57b){const _0x461c75=a26_0x58e0,_0x81a0cb=_0x2a4132();while(!![]){try{const _0x7f266e=parseInt(_0x461c75(0x1a0))/0x1*(-parseInt(_0x461c75(0x1cc))/0x2)+-parseInt(_0x461c75(0x188))/0x3*(parseInt(_0x461c75(0x187))/0x4)+-parseInt(_0x461c75(0x18d))/0x5+-parseInt(_0x461c75(0x1c7))/0x6*(parseInt(_0x461c75(0x1a3))/0x7)+-parseInt(_0x461c75(0x191))/0x8*(parseInt(_0x461c75(0x1ca))/0x9)+-parseInt(_0x461c75(0x190))/0xa+-parseInt(_0x461c75(0x1a6))/0xb*(-parseInt(_0x461c75(0x1ac))/0xc);if(_0x7f266e===_0x3bf57b)break;else _0x81a0cb['push'](_0x81a0cb['shift']());}catch(_0x1bd28b){_0x81a0cb['push'](_0x81a0cb['shift']());}}}(a26_0x3865,0xcea7c));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':a26_0x4ab39d(0x1a8),'type':a26_0x4ab39d(0x1be),'description':a26_0x4ab39d(0x199)},{'name':a26_0x4ab39d(0x18e),'type':a26_0x4ab39d(0x1be),'description':a26_0x4ab39d(0x19d)+DEFAULT_CONFIG_VALUES['env']+')','enum':[...RUNTIME_ENV_VALUES]},{'name':a26_0x4ab39d(0x1b0),'type':a26_0x4ab39d(0x194),'description':a26_0x4ab39d(0x1a2)+PRODUCT_CONFIG[a26_0x4ab39d(0x184)]+a26_0x4ab39d(0x1ba),'default':![]},{'name':a26_0x4ab39d(0x195),'type':a26_0x4ab39d(0x194),'description':'Skip\x20confirmation\x20when\x20overwriting','default':![]}];export const initImportFlagDefs=[{'name':a26_0x4ab39d(0x18c),'type':'string','description':a26_0x4ab39d(0x1c8),'required':!![]},{'name':a26_0x4ab39d(0x1a8),'type':a26_0x4ab39d(0x1be),'description':'Override\x20imported\x20default\x20appcode'},{'name':a26_0x4ab39d(0x18e),'type':'string','description':a26_0x4ab39d(0x189),'enum':[...RUNTIME_ENV_VALUES]},{'name':'global','type':'boolean','description':a26_0x4ab39d(0x1a2)+PRODUCT_CONFIG[a26_0x4ab39d(0x184)]+a26_0x4ab39d(0x1ba),'default':![]},{'name':'yes','type':a26_0x4ab39d(0x194),'description':a26_0x4ab39d(0x1a4),'default':![]}];export async function runInit(_0x3d8c70){const _0x4804eb=a26_0x4ab39d,_0x444dff=isNonInteractiveMode(_0x3d8c70),_0x438fa0=_0x3d8c70['global']?_0x4804eb(0x1b0):_0x4804eb(0x1b9),_0x18bf01=resolveWriteConfigPath(_0x438fa0);try{_0x444dff?await runNonInteractive(_0x3d8c70,_0x18bf01):await runInteractive(_0x3d8c70,_0x18bf01);}catch(_0x2a5d17){if(_0x2a5d17 instanceof AbortPrompt)throw CliErrors[_0x4804eb(0x181)]();throw _0x2a5d17;}}export async function runInitImport(_0x12ed09){const _0x18ea78=a26_0x4ab39d,_0x5a343d=_0x12ed09[_0x18ea78(0x1b0)]?'global':'project',_0x408391=resolveWriteConfigPath(_0x5a343d);await runFromImport(_0x12ed09,_0x408391);}const RUNTIME_IRRELEVANT_KEYS=new Set([a26_0x4ab39d(0x1af)]);async function runFromImport(_0x569530,_0x2fe64c){const _0x36723c=a26_0x4ab39d,_0x38e12a=resolveFilePath(_0x569530['file']);if(!existsSync(_0x38e12a))throw CliErrors[_0x36723c(0x197)](_0x36723c(0x1bf)+_0x38e12a);const _0x2bd3f5=readSourceFile(_0x38e12a),_0x15fbbd=convertToRuntimeConfig(_0x2bd3f5);_0x569530[_0x36723c(0x1a8)]&&(_0x15fbbd[_0x36723c(0x1a8)]=String(_0x569530['appcode']));_0x569530[_0x36723c(0x18e)]&&(_0x15fbbd[_0x36723c(0x18e)]=resolveInitEnv(_0x569530));if(!_0x15fbbd[_0x36723c(0x1a8)])throw CliErrors[_0x36723c(0x197)](_0x36723c(0x1b7),_0x36723c(0x1bb));await writeInitConfig(_0x2fe64c,_0x15fbbd,_0x569530),console['log'](_0x36723c(0x1cb)+_0x38e12a),console[_0x36723c(0x1b1)](_0x36723c(0x192)+_0x2fe64c),console[_0x36723c(0x1b1)]('\x20\x20appcode:\x20'+_0x15fbbd['appcode']);if(_0x15fbbd['defaultApp'])console['log'](_0x36723c(0x1b6)+_0x15fbbd[_0x36723c(0x185)]);}function convertToRuntimeConfig(_0xb687b2){const _0x1df42c=a26_0x4ab39d;if(_0xb687b2[_0x1df42c(0x1ad)]&&typeof _0xb687b2[_0x1df42c(0x1ad)]===_0x1df42c(0x193))throw CliErrors[_0x1df42c(0x197)](_0x1df42c(0x186),_0x1df42c(0x1b8));const _0x532e49={};for(const _0x2f07f6 of IMPORTABLE_RUNTIME_CONFIG_KEYS){_0xb687b2[_0x2f07f6]!==undefined&&(_0x532e49[_0x2f07f6]=_0xb687b2[_0x2f07f6]);}return!_0x532e49[_0x1df42c(0x1aa)]&&(_0x532e49['riskLevel']=DEFAULT_CONFIG_VALUES[_0x1df42c(0x1aa)]),_0x532e49;}async function runNonInteractive(_0x4e9e12,_0x5efe5a){const _0x5c1b95=a26_0x4ab39d,_0x4dcfb3=_0x4e9e12[_0x5c1b95(0x1a8)];if(!_0x4dcfb3)throw CliErrors[_0x5c1b95(0x19b)](_0x5c1b95(0x1a8),_0x5c1b95(0x183)+CLI_BIN_NAME+_0x5c1b95(0x1b5));const _0x4bcf43=resolveInitEnv(_0x4e9e12);await writeInitConfig(_0x5efe5a,{'appcode':_0x4dcfb3,'env':_0x4bcf43},_0x4e9e12),console[_0x5c1b95(0x1b1)](_0x5c1b95(0x1c5)+_0x5efe5a),console[_0x5c1b95(0x1b1)](_0x5c1b95(0x1a1)+_0x4dcfb3),console[_0x5c1b95(0x1b1)]('\x20\x20env:\x20\x20\x20\x20\x20'+_0x4bcf43);}async function runInteractive(_0x40fec3,_0x4aed2d){const _0xf24e66=a26_0x4ab39d,_0x2dfe64=loadExisting(_0x4aed2d),_0x18e5c4=typeof _0x2dfe64?.[_0xf24e66(0x1a8)]===_0xf24e66(0x1be)?_0x2dfe64[_0xf24e66(0x1a8)]:'',_0x15e089=resolveInitEnv(_0x40fec3);console['log'](CLI_BIN_NAME+_0xf24e66(0x1ae)+PRODUCT_CONFIG[_0xf24e66(0x184)]+'\x0a');if(existsSync(_0x4aed2d)&&!_0x40fec3[_0xf24e66(0x195)]){const _0xbf0446=await promptYesNo(_0xf24e66(0x1a5)+_0x4aed2d+_0xf24e66(0x198),![]);if(!_0xbf0446){console[_0xf24e66(0x1b1)](_0xf24e66(0x1c9));return;}}const _0x27da9c=typeof _0x40fec3[_0xf24e66(0x1a8)]==='string'?_0x40fec3[_0xf24e66(0x1a8)][_0xf24e66(0x18a)]():'';let _0x540d98=_0x27da9c;!_0x540d98&&(_0x540d98=await promptInput(_0xf24e66(0x19e),_0x18e5c4));if(!_0x540d98[_0xf24e66(0x18a)]())throw CliErrors['validation'](_0xf24e66(0x1c0));await writeInitConfig(_0x4aed2d,{'appcode':_0x540d98[_0xf24e66(0x18a)](),'env':_0x15e089},_0x40fec3),console[_0xf24e66(0x1b1)](_0xf24e66(0x1c6)+_0x4aed2d),console[_0xf24e66(0x1b1)](_0xf24e66(0x1a1)+_0x540d98[_0xf24e66(0x18a)]()),console['log']('\x20\x20env:\x20\x20\x20\x20\x20'+_0x15e089);}async function writeInitConfig(_0x3db41a,_0x8c3a25,_0x3a5eb4){const _0x4ce7c0=a26_0x4ab39d;let _0x1cd372={};existsSync(_0x3db41a)&&!_0x3a5eb4['yes']&&(_0x1cd372=readConfigFile(_0x3db41a));for(const [_0x14095e,_0x1a89a9]of Object['entries'](_0x8c3a25)){_0x1a89a9!==undefined&&(_0x1cd372[_0x14095e]=_0x1a89a9);}if(_0x1cd372[_0x4ce7c0(0x1c4)])delete _0x1cd372['app'];writeConfigFile(_0x3db41a,_0x1cd372);}class AbortPrompt extends Error{constructor(){const _0x129f1e=a26_0x4ab39d;super(_0x129f1e(0x18f)),this[_0x129f1e(0x196)]=_0x129f1e(0x1b3);}}function createSafeRl(){const _0x534aa6=a26_0x4ab39d,_0x5eae1d=createInterface({'input':process[_0x534aa6(0x1c3)],'output':process['stdout']});let _0x32013c;const _0x17f86f=new Promise((_0x37a002,_0x3987f5)=>{_0x32013c=()=>{const _0x37b22e=a26_0x58e0;_0x32013c&&(_0x5eae1d[_0x37b22e(0x1a7)](_0x37b22e(0x19f),_0x32013c),_0x32013c=undefined);try{_0x5eae1d[_0x37b22e(0x1a9)]();}catch{}_0x3987f5(new AbortPrompt());},_0x5eae1d['once']('SIGINT',_0x32013c);}),_0x3e54dc=()=>{const _0x5919a4=_0x534aa6;_0x32013c&&(_0x5eae1d[_0x5919a4(0x1a7)](_0x5919a4(0x19f),_0x32013c),_0x32013c=undefined);try{_0x5eae1d['close']();}catch{}};return{'rl':_0x5eae1d,'abortPromise':_0x17f86f,'disposeSuccess':_0x3e54dc};}async function promptInput(_0x3b7222,_0x30f4f8){const _0x315485=a26_0x4ab39d,{rl:_0x48f330,abortPromise:_0x77f4a3,disposeSuccess:_0x30aa62}=createSafeRl(),_0x24cdda=new Promise(_0x1bf32f=>{const _0x1b2780=_0x30f4f8?'\x20\x20'+_0x3b7222+'\x20('+_0x30f4f8+'):\x20':'\x20\x20'+_0x3b7222+':\x20';_0x48f330['question'](_0x1b2780,_0x534bd2=>{const _0x45d346=a26_0x58e0;_0x30aa62(),_0x1bf32f(_0x534bd2[_0x45d346(0x18a)]()||_0x30f4f8);});});return Promise[_0x315485(0x1c2)]([_0x24cdda,_0x77f4a3]);}function a26_0x3865(){const _0x18f79d=['Legacy\x20/\x20multi-app\x20.rabetbase.json\x20is\x20no\x20longer\x20supported\x20for\x20import.','8wrvQIN','925341eElSpE','Override\x20imported\x20default\x20env','trim','\x22.\x20Allowed:\x20','file','2920530RlcRQH','env','User\x20aborted\x20prompt','3101310yGjlzQ','20976NsMOUb','\x20\x20config:\x20\x20','object','boolean','yes','name','validation','\x20already\x20exists.\x20Overwrite?','App\x20code\x20for\x20the\x20project','Invalid\x20env\x20\x22','flagMissing','Failed\x20to\x20parse\x20source\x20file:\x20','Target\x20environment\x20(default\x20','App\x20code','SIGINT','92401mFIjhZ','\x20\x20appcode:\x20','Write\x20to\x20global\x20(~/','1396199DRghQS','Skip\x20confirmation\x20when\x20overwriting','File\x20','50701717ovFyHb','removeListener','appcode','close','riskLevel','join','12SwJrsB','apps','\x20init\x20—\x20Create\x20','apiDir','global','log','message','AbortPrompt','utf8','\x20app\x20init\x20--appcode\x20<code>\x20[--env\x20daily]\x20[--global]','\x20\x20default:\x20','Source\x20file\x20does\x20not\x20contain\x20an\x20importable\x20appcode.','Run\x20`rabetbase\x20project\x20upgrade`\x20first,\x20then\x20retry\x20`lovrabet\x20app\x20import`.','project',')\x20instead\x20of\x20project','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`.','includes','cwd','string','Source\x20file\x20not\x20found:\x20','App\x20code\x20cannot\x20be\x20empty.','parse','race','stdin','app','Initialized\x20','\x0aInitialized\x20','6QHpQJz','Import\x20from\x20a\x20.rabetbase.json\x20file\x20path','Aborted.','4824QDgWjr','Imported\x20from\x20','14znZPdm','cancelled','question','Usage:\x20','newConfigFileName','defaultApp'];a26_0x3865=function(){return _0x18f79d;};return a26_0x3865();}async function promptYesNo(_0x117a4a,_0x1f36bd){const _0x27aa56=a26_0x4ab39d,{rl:_0x439bac,abortPromise:_0x30d920,disposeSuccess:_0x27f2f9}=createSafeRl(),_0x297835=new Promise(_0x49897a=>{const _0x20f092=a26_0x58e0,_0x55c14c=_0x1f36bd?'[Y/n]':'[y/N]';_0x439bac[_0x20f092(0x182)]('\x20\x20'+_0x117a4a+'\x20'+_0x55c14c+':\x20',_0x214741=>{const _0x124ada=_0x20f092;_0x27f2f9();const _0xec89a4=_0x214741[_0x124ada(0x18a)]()['toLowerCase']();if(_0xec89a4==='y'||_0xec89a4===_0x124ada(0x195))_0x49897a(!![]);else{if(_0xec89a4==='n'||_0xec89a4==='no')_0x49897a(![]);else _0x49897a(_0x1f36bd);}});});return Promise[_0x27aa56(0x1c2)]([_0x297835,_0x30d920]);}function loadExisting(_0x35e496){if(!existsSync(_0x35e496))return null;return readConfigFile(_0x35e496);}function a26_0x58e0(_0x6f55a9,_0x791282){_0x6f55a9=_0x6f55a9-0x181;const _0x3865c7=a26_0x3865();let _0x58e051=_0x3865c7[_0x6f55a9];return _0x58e051;}function resolveFilePath(_0x11fd96){const _0x50483f=a26_0x4ab39d;return isAbsolute(_0x11fd96)?_0x11fd96:resolve(process[_0x50483f(0x1bd)](),_0x11fd96);}function readSourceFile(_0x2ed2ae){const _0x18cda6=a26_0x4ab39d;try{const _0x5b7964=readFileSync(_0x2ed2ae,{'encoding':_0x18cda6(0x1b4)});return JSON[_0x18cda6(0x1c1)](_0x5b7964);}catch(_0x369101){throw CliErrors['validation'](_0x18cda6(0x19c)+_0x369101[_0x18cda6(0x1b2)]);}}function resolveInitEnv(_0xf74f84){const _0x1fafc1=a26_0x4ab39d,_0x1c938c=_0xf74f84['env'];if(_0x1c938c===undefined||_0x1c938c==='')return DEFAULT_CONFIG_VALUES[_0x1fafc1(0x18e)];if(!RUNTIME_ENV_VALUES[_0x1fafc1(0x1bc)](_0x1c938c))throw CliErrors[_0x1fafc1(0x197)](_0x1fafc1(0x19a)+_0x1c938c+_0x1fafc1(0x18b)+RUNTIME_ENV_VALUES[_0x1fafc1(0x1ab)](',\x20'));return _0x1c938c;}
@@ -1 +1 @@
1
- const a27_0x4684a6=a27_0x4fdd;function a27_0x4fdd(_0x317396,_0x4ef6a5){_0x317396=_0x317396-0x125;const _0x2e8441=a27_0x2e84();let _0x4fdd8e=_0x2e8441[_0x317396];return _0x4fdd8e;}(function(_0x58b11a,_0x281602){const _0x407126=a27_0x4fdd,_0x32a221=_0x58b11a();while(!![]){try{const _0x2bae97=-parseInt(_0x407126(0x134))/0x1*(parseInt(_0x407126(0x149))/0x2)+parseInt(_0x407126(0x148))/0x3+-parseInt(_0x407126(0x143))/0x4+parseInt(_0x407126(0x13b))/0x5+parseInt(_0x407126(0x138))/0x6*(-parseInt(_0x407126(0x157))/0x7)+parseInt(_0x407126(0x156))/0x8+parseInt(_0x407126(0x164))/0x9*(-parseInt(_0x407126(0x12a))/0xa);if(_0x2bae97===_0x281602)break;else _0x32a221['push'](_0x32a221['shift']());}catch(_0x1d47f4){_0x32a221['push'](_0x32a221['shift']());}}}(a27_0x2e84,0xee07c));import{existsSync,readFileSync,statSync}from'node:fs';import{createPersonalKnowledgeBaseItem,getPersonalKnowledgeBaseItem,listPersonalKnowledgeBaseItems,searchKnowledgeBase,updatePersonalKnowledgeBaseItem}from'../../core/api-client.js';import{ID_FLAG,VERBOSE_FLAG}from'../../commands/common/flags.js';function a27_0x2e84(){const _0x7c0f70=['docId','Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','58796hDYLwK','utf8','Updated\x20KB\x20entry\x20','List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','appCode','2398095vpsLeJ','69968RVlVji','updateTime','build','ragErrorMessage','query','isFinite','Search\x20query\x20is\x20required.','--topk\x20must\x20be\x20a\x20positive\x20number.','detail','description','bool','ragStatus','weightedScore','12447648CGRhqQ','147CCYMTm','File\x20path\x20is\x20required.','/update','search','read','Update\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','scope','isFile','num','Create\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','score','body','write','132147bXtxEV','topk','/client/knowledge-base/personal/','Override\x20the\x20existing\x20entry\x20title','number','Created\x20KB\x20entry\x20','Personal\x20knowledge-base\x20entry\x20ID','670guTHJU','validation','userId','POST','File\x20is\x20not\x20a\x20regular\x20file:\x20','file','version','title','/client/knowledge-base/personal/create','create','15uMfVfP','Search\x20query\x20for\x20visible\x20company\x20and\x20personal\x20knowledge','string','Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20','353622LQbtSx','str','Search\x20visible\x20company\x20and\x20personal\x20knowledge\x20base\x20content','6902740FCKZLl','File\x20not\x20found:\x20','content','Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22','length','createTime'];a27_0x2e84=function(){return _0x7c0f70;};return a27_0x2e84();}import{CliErrors}from'../../errors.js';import{dryRun}from'../../framework/dryrun.js';const TITLE_FLAG={'name':a27_0x4684a6(0x131),'type':'string','required':!![],'description':'Personal\x20knowledge-base\x20entry\x20title'},FILE_FLAG={'name':'file','type':a27_0x4684a6(0x136),'required':!![],'description':'Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file'},QUERY_FLAG={'name':a27_0x4684a6(0x14d),'type':a27_0x4684a6(0x136),'required':!![],'description':a27_0x4684a6(0x135)},TOPK_FLAG={'name':a27_0x4684a6(0x165),'type':a27_0x4684a6(0x127),'description':'Maximum\x20number\x20of\x20search\x20hits\x20to\x20return'};function readKnowledgeFile(_0x153d54){const _0xa1f5d7=a27_0x4684a6;if(!_0x153d54)throw CliErrors['validation'](_0xa1f5d7(0x158));if(!existsSync(_0x153d54))throw CliErrors[_0xa1f5d7(0x12b)](_0xa1f5d7(0x13c)+_0x153d54);if(!statSync(_0x153d54)[_0xa1f5d7(0x15e)]())throw CliErrors[_0xa1f5d7(0x12b)](_0xa1f5d7(0x12e)+_0x153d54);return readFileSync(_0x153d54,_0xa1f5d7(0x144));}function summarizePersonalItem(_0xb89790){const _0x1bc568=a27_0x4684a6;return{'id':_0xb89790['id'],'title':_0xb89790[_0x1bc568(0x131)],'version':_0xb89790['version'],'ragStatus':_0xb89790['ragStatus'],'ragErrorMessage':_0xb89790[_0x1bc568(0x14c)],'updateTime':_0xb89790[_0x1bc568(0x14a)]};}function detailPersonalItem(_0x320685){const _0x1bb8f0=a27_0x4684a6;return{'id':_0x320685['id'],'appCode':_0x320685[_0x1bb8f0(0x147)],'scope':_0x320685[_0x1bb8f0(0x15d)],'userId':_0x320685[_0x1bb8f0(0x12c)],'title':_0x320685[_0x1bb8f0(0x131)],'content':_0x320685[_0x1bb8f0(0x13d)]??'','version':_0x320685[_0x1bb8f0(0x130)],'ragStatus':_0x320685[_0x1bb8f0(0x154)],'ragErrorMessage':_0x320685[_0x1bb8f0(0x14c)],'createTime':_0x320685[_0x1bb8f0(0x140)],'updateTime':_0x320685[_0x1bb8f0(0x14a)]};}function summarizeSearchHit(_0x4ab05e){const _0x5bb07b=a27_0x4684a6;return{'scope':_0x4ab05e[_0x5bb07b(0x15d)],'docId':_0x4ab05e[_0x5bb07b(0x141)],'score':_0x4ab05e[_0x5bb07b(0x161)],'weightedScore':_0x4ab05e[_0x5bb07b(0x155)],'content':_0x4ab05e[_0x5bb07b(0x13d)],'metadata':_0x4ab05e['metadata']};}function readTopK(_0x3025eb){const _0x55b23d=a27_0x4684a6,_0x3fa48f=_0x3025eb['flag']('topk');if(_0x3fa48f===undefined||_0x3fa48f===null||_0x3fa48f==='')return undefined;const _0x122fb2=_0x3025eb[_0x55b23d(0x15f)]('topk');if(!Number[_0x55b23d(0x14e)](_0x122fb2)||_0x122fb2<0x1)throw CliErrors[_0x55b23d(0x12b)](_0x55b23d(0x150));return _0x122fb2;}const kbList={'service':'kb','command':'list','description':a27_0x4684a6(0x146),'risk':'read','flags':[VERBOSE_FLAG],async 'execute'(_0x4c60a1){const _0x40e4c3=a27_0x4684a6,_0x4c685b=await listPersonalKnowledgeBaseItems(_0x4c60a1[_0x40e4c3(0x147)]);if(_0x4c60a1[_0x40e4c3(0x153)]('verbose'))return{'ok':!![],'data':{'total':_0x4c685b['length'],'items':_0x4c685b}};return{'ok':!![],'data':{'total':_0x4c685b['length'],'items':_0x4c685b['map'](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':a27_0x4684a6(0x151),'description':a27_0x4684a6(0x142),'risk':'read','flags':[{...ID_FLAG,'description':a27_0x4684a6(0x129)}],async 'execute'(_0x17d5f9){const _0x152c35=a27_0x4684a6,_0x5b14e6=await getPersonalKnowledgeBaseItem(_0x17d5f9[_0x152c35(0x15f)]('id'),_0x17d5f9[_0x152c35(0x147)]);return{'ok':!![],'data':detailPersonalItem(_0x5b14e6)};}},kbCreate={'service':'kb','command':a27_0x4684a6(0x133),'description':a27_0x4684a6(0x160),'risk':'write','flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x3885ff){const _0x4220a9=a27_0x4684a6,_0x2802ef=_0x3885ff[_0x4220a9(0x139)](_0x4220a9(0x131)),_0x12359b=readKnowledgeFile(_0x3885ff[_0x4220a9(0x139)](_0x4220a9(0x12f))),_0x178dd2=await createPersonalKnowledgeBaseItem(_0x3885ff['appCode'],{'title':_0x2802ef,'content':_0x12359b});return{'ok':!![],'data':summarizePersonalItem(_0x178dd2),'message':_0x4220a9(0x128)+_0x178dd2['id']+'\x20('+_0x178dd2[_0x4220a9(0x131)]+')'};},async 'dryRun'(_0x311434){const _0x17c241=a27_0x4684a6,_0x2c0148=_0x311434[_0x17c241(0x139)](_0x17c241(0x131)),_0x436037=readKnowledgeFile(_0x311434['str'](_0x17c241(0x12f)));return dryRun(_0x17c241(0x12d),_0x17c241(0x132))['body']({'appCode':_0x311434[_0x17c241(0x147)],'title':_0x2c0148,'content':_0x436037})[_0x17c241(0x152)](_0x17c241(0x13e)+_0x2c0148+'\x22')['build']();}},kbUpdate={'service':'kb','command':'update','description':a27_0x4684a6(0x15c),'risk':a27_0x4684a6(0x163),'flags':[{...ID_FLAG,'description':'Personal\x20knowledge-base\x20entry\x20ID'},{...TITLE_FLAG,'required':![],'description':a27_0x4684a6(0x126)},FILE_FLAG],async 'execute'(_0x40b119){const _0x51fa5b=a27_0x4684a6,_0x413af0=_0x40b119[_0x51fa5b(0x15f)]('id'),_0x1b527c=readKnowledgeFile(_0x40b119['str']('file')),_0x20c80e=_0x40b119[_0x51fa5b(0x139)]('title')||(await getPersonalKnowledgeBaseItem(_0x413af0,_0x40b119[_0x51fa5b(0x147)]))['title'],_0x4798a6=await updatePersonalKnowledgeBaseItem(_0x413af0,_0x40b119[_0x51fa5b(0x147)],{'title':_0x20c80e,'content':_0x1b527c});return{'ok':!![],'data':summarizePersonalItem(_0x4798a6),'message':_0x51fa5b(0x145)+_0x4798a6['id']+'\x20('+_0x4798a6[_0x51fa5b(0x131)]+')'};},async 'dryRun'(_0x1e526f){const _0x1137fe=a27_0x4684a6,_0x3db93e=_0x1e526f['num']('id'),_0x14592b=readKnowledgeFile(_0x1e526f[_0x1137fe(0x139)]('file')),_0x1a387d=_0x1e526f[_0x1137fe(0x139)](_0x1137fe(0x131))||(await getPersonalKnowledgeBaseItem(_0x3db93e,_0x1e526f['appCode']))[_0x1137fe(0x131)];return dryRun(_0x1137fe(0x12d),_0x1137fe(0x125)+_0x3db93e+_0x1137fe(0x159))[_0x1137fe(0x162)]({'appCode':_0x1e526f[_0x1137fe(0x147)],'title':_0x1a387d,'content':_0x14592b})[_0x1137fe(0x152)](_0x1137fe(0x137)+_0x3db93e)[_0x1137fe(0x14b)]();}},kbSearch={'service':'kb','command':a27_0x4684a6(0x15a),'description':a27_0x4684a6(0x13a),'risk':a27_0x4684a6(0x15b),'flags':[QUERY_FLAG,TOPK_FLAG],async 'validate'(_0x2f6ea8){const _0x5e24dd=a27_0x4684a6;if(!_0x2f6ea8[_0x5e24dd(0x139)](_0x5e24dd(0x14d))['trim']())throw CliErrors[_0x5e24dd(0x12b)](_0x5e24dd(0x14f));readTopK(_0x2f6ea8);},async 'execute'(_0x180fa3){const _0x417af9=a27_0x4684a6,_0xb85611=_0x180fa3[_0x417af9(0x139)]('query')['trim'](),_0x29ce61=readTopK(_0x180fa3),_0x40a3ef=await searchKnowledgeBase(_0x180fa3['appCode'],{'query':_0xb85611,'topK':_0x29ce61});return{'ok':!![],'data':{'total':_0x40a3ef[_0x417af9(0x13f)],'hits':_0x40a3ef['map'](summarizeSearchHit)}};}};export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];
1
+ const a27_0x385399=a27_0x1178;(function(_0x5f3c34,_0x18e95d){const _0x36737e=a27_0x1178,_0x50a6ca=_0x5f3c34();while(!![]){try{const _0x3d4087=-parseInt(_0x36737e(0x84))/0x1*(-parseInt(_0x36737e(0xb3))/0x2)+-parseInt(_0x36737e(0xb0))/0x3+-parseInt(_0x36737e(0xc2))/0x4*(-parseInt(_0x36737e(0xb5))/0x5)+-parseInt(_0x36737e(0x87))/0x6+-parseInt(_0x36737e(0xae))/0x7*(-parseInt(_0x36737e(0xa6))/0x8)+-parseInt(_0x36737e(0xaa))/0x9*(-parseInt(_0x36737e(0xbc))/0xa)+-parseInt(_0x36737e(0x8f))/0xb*(parseInt(_0x36737e(0x96))/0xc);if(_0x3d4087===_0x18e95d)break;else _0x50a6ca['push'](_0x50a6ca['shift']());}catch(_0x5c0234){_0x50a6ca['push'](_0x50a6ca['shift']());}}}(a27_0x69e3,0xd910a));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':a27_0x385399(0xb2),'type':'string','required':!![],'description':a27_0x385399(0xc3)},FILE_FLAG={'name':a27_0x385399(0x8d),'type':'string','required':!![],'description':a27_0x385399(0x8e)},QUERY_FLAG={'name':a27_0x385399(0xc1),'type':a27_0x385399(0xbb),'required':!![],'description':a27_0x385399(0xa0)},TOPK_FLAG={'name':'topk','type':'number','description':a27_0x385399(0x9f)};function a27_0x1178(_0x548b29,_0x43bdb5){_0x548b29=_0x548b29-0x81;const _0x69e349=a27_0x69e3();let _0x117822=_0x69e349[_0x548b29];return _0x117822;}function readKnowledgeFile(_0xc73d20){const _0x29ffe4=a27_0x385399;if(!_0xc73d20)throw CliErrors['validation'](_0x29ffe4(0x94));if(!existsSync(_0xc73d20))throw CliErrors['validation'](_0x29ffe4(0xa3)+_0xc73d20);if(!statSync(_0xc73d20)[_0x29ffe4(0xb7)]())throw CliErrors['validation'](_0x29ffe4(0x99)+_0xc73d20);return readFileSync(_0xc73d20,_0x29ffe4(0x8b));}function summarizePersonalItem(_0x585784){const _0x22356f=a27_0x385399;return{'id':_0x585784['id'],'title':_0x585784['title'],'version':_0x585784[_0x22356f(0x81)],'ragStatus':_0x585784[_0x22356f(0x9e)],'ragErrorMessage':_0x585784[_0x22356f(0x83)],'updateTime':_0x585784[_0x22356f(0x92)]};}function detailPersonalItem(_0x39c99a){const _0x59e6ba=a27_0x385399;return{'id':_0x39c99a['id'],'appCode':_0x39c99a['appCode'],'scope':_0x39c99a['scope'],'userId':_0x39c99a[_0x59e6ba(0x86)],'title':_0x39c99a[_0x59e6ba(0xb2)],'content':_0x39c99a[_0x59e6ba(0xb4)]??'','version':_0x39c99a[_0x59e6ba(0x81)],'ragStatus':_0x39c99a[_0x59e6ba(0x9e)],'ragErrorMessage':_0x39c99a['ragErrorMessage'],'createTime':_0x39c99a[_0x59e6ba(0xa2)],'updateTime':_0x39c99a[_0x59e6ba(0x92)]};}function a27_0x69e3(){const _0x579e6f=['isFinite','File\x20path\x20is\x20required.','write','265332EkMYpU','/client/knowledge-base/personal/create','Update\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','File\x20is\x20not\x20a\x20regular\x20file:\x20','str','update','appCode','metadata','ragStatus','Maximum\x20number\x20of\x20search\x20hits\x20to\x20return','Search\x20query\x20for\x20visible\x20company\x20and\x20personal\x20knowledge','Personal\x20knowledge-base\x20entry\x20ID','createTime','File\x20not\x20found:\x20','build','flag','50888gcSZDJ','/update','search','body','9rDmhWj','Preview:\x20create\x20personal\x20knowledge-base\x20entry\x20\x22','score','Updated\x20KB\x20entry\x20','840BOVIBF','docId','4293516LlPHnY','/client/knowledge-base/personal/','title','2486678xofWro','content','571060OTJGqV','topk','isFile','create','Preview:\x20update\x20personal\x20knowledge-base\x20entry\x20','Show\x20one\x20personal\x20knowledge-base\x20entry\x20by\x20id','string','17273810ZyIuOS','trim','--topk\x20must\x20be\x20a\x20positive\x20number.','validation','list','query','40qmIFeu','Personal\x20knowledge-base\x20entry\x20title','version','num','ragErrorMessage','1TkYHmr','length','userId','7508046RFYctg','Override\x20the\x20existing\x20entry\x20title','read','POST','utf8','map','file','Path\x20to\x20a\x20local\x20UTF-8\x20text\x20or\x20Markdown\x20file','649NuLkeg','scope','description','updateTime'];a27_0x69e3=function(){return _0x579e6f;};return a27_0x69e3();}function summarizeSearchHit(_0x116f24){const _0x11945c=a27_0x385399;return{'scope':_0x116f24[_0x11945c(0x90)],'docId':_0x116f24[_0x11945c(0xaf)],'score':_0x116f24[_0x11945c(0xac)],'weightedScore':_0x116f24['weightedScore'],'content':_0x116f24['content'],'metadata':_0x116f24[_0x11945c(0x9d)]};}function readTopK(_0x23f5e6){const _0x564f05=a27_0x385399,_0x2aa4ff=_0x23f5e6[_0x564f05(0xa5)]('topk');if(_0x2aa4ff===undefined||_0x2aa4ff===null||_0x2aa4ff==='')return undefined;const _0x47895a=_0x23f5e6[_0x564f05(0x82)](_0x564f05(0xb6));if(!Number[_0x564f05(0x93)](_0x47895a)||_0x47895a<0x1)throw CliErrors[_0x564f05(0xbf)](_0x564f05(0xbe));return _0x47895a;}const kbList={'service':'kb','command':a27_0x385399(0xc0),'description':'List\x20personal\x20knowledge-base\x20entries\x20for\x20the\x20current\x20app','risk':'read','flags':[VERBOSE_FLAG],async 'execute'(_0x5e1f80){const _0x531974=a27_0x385399,_0x1740ef=await listPersonalKnowledgeBaseItems(_0x5e1f80[_0x531974(0x9c)]);if(_0x5e1f80['bool']('verbose'))return{'ok':!![],'data':{'total':_0x1740ef[_0x531974(0x85)],'items':_0x1740ef}};return{'ok':!![],'data':{'total':_0x1740ef['length'],'items':_0x1740ef[_0x531974(0x8c)](summarizePersonalItem)}};}},kbDetail={'service':'kb','command':'detail','description':a27_0x385399(0xba),'risk':a27_0x385399(0x89),'flags':[{...ID_FLAG,'description':a27_0x385399(0xa1)}],async 'execute'(_0x4ee21e){const _0x17bc91=a27_0x385399,_0x2c2600=await getPersonalKnowledgeBaseItem(_0x4ee21e['num']('id'),_0x4ee21e[_0x17bc91(0x9c)]);return{'ok':!![],'data':detailPersonalItem(_0x2c2600)};}},kbCreate={'service':'kb','command':a27_0x385399(0xb8),'description':'Create\x20a\x20personal\x20knowledge-base\x20entry\x20from\x20a\x20local\x20file','risk':a27_0x385399(0x95),'flags':[TITLE_FLAG,FILE_FLAG],async 'execute'(_0x50bd72){const _0xc4b411=a27_0x385399,_0x514908=_0x50bd72[_0xc4b411(0x9a)]('title'),_0x4d892b=readKnowledgeFile(_0x50bd72[_0xc4b411(0x9a)]('file')),_0x41891c=await createPersonalKnowledgeBaseItem(_0x50bd72[_0xc4b411(0x9c)],{'title':_0x514908,'content':_0x4d892b});return{'ok':!![],'data':summarizePersonalItem(_0x41891c),'message':'Created\x20KB\x20entry\x20'+_0x41891c['id']+'\x20('+_0x41891c['title']+')'};},async 'dryRun'(_0x544844){const _0x1e1b9d=a27_0x385399,_0x58ae06=_0x544844[_0x1e1b9d(0x9a)](_0x1e1b9d(0xb2)),_0x15b4c7=readKnowledgeFile(_0x544844[_0x1e1b9d(0x9a)](_0x1e1b9d(0x8d)));return dryRun(_0x1e1b9d(0x8a),_0x1e1b9d(0x97))[_0x1e1b9d(0xa9)]({'appCode':_0x544844[_0x1e1b9d(0x9c)],'title':_0x58ae06,'content':_0x15b4c7})[_0x1e1b9d(0x91)](_0x1e1b9d(0xab)+_0x58ae06+'\x22')[_0x1e1b9d(0xa4)]();}},kbUpdate={'service':'kb','command':a27_0x385399(0x9b),'description':a27_0x385399(0x98),'risk':a27_0x385399(0x95),'flags':[{...ID_FLAG,'description':'Personal\x20knowledge-base\x20entry\x20ID'},{...TITLE_FLAG,'required':![],'description':a27_0x385399(0x88)},FILE_FLAG],async 'execute'(_0x2c2b6d){const _0xba7ef2=a27_0x385399,_0x462d2f=_0x2c2b6d[_0xba7ef2(0x82)]('id'),_0x7b3a3=readKnowledgeFile(_0x2c2b6d[_0xba7ef2(0x9a)](_0xba7ef2(0x8d))),_0x1d7523=_0x2c2b6d[_0xba7ef2(0x9a)](_0xba7ef2(0xb2))||(await getPersonalKnowledgeBaseItem(_0x462d2f,_0x2c2b6d[_0xba7ef2(0x9c)]))[_0xba7ef2(0xb2)],_0x1a4d67=await updatePersonalKnowledgeBaseItem(_0x462d2f,_0x2c2b6d['appCode'],{'title':_0x1d7523,'content':_0x7b3a3});return{'ok':!![],'data':summarizePersonalItem(_0x1a4d67),'message':_0xba7ef2(0xad)+_0x1a4d67['id']+'\x20('+_0x1a4d67[_0xba7ef2(0xb2)]+')'};},async 'dryRun'(_0x1fd5da){const _0x1eec5d=a27_0x385399,_0x491550=_0x1fd5da[_0x1eec5d(0x82)]('id'),_0x2d1d53=readKnowledgeFile(_0x1fd5da['str']('file')),_0x15d47f=_0x1fd5da[_0x1eec5d(0x9a)](_0x1eec5d(0xb2))||(await getPersonalKnowledgeBaseItem(_0x491550,_0x1fd5da['appCode']))[_0x1eec5d(0xb2)];return dryRun(_0x1eec5d(0x8a),_0x1eec5d(0xb1)+_0x491550+_0x1eec5d(0xa7))[_0x1eec5d(0xa9)]({'appCode':_0x1fd5da['appCode'],'title':_0x15d47f,'content':_0x2d1d53})['description'](_0x1eec5d(0xb9)+_0x491550)[_0x1eec5d(0xa4)]();}},kbSearch={'service':'kb','command':a27_0x385399(0xa8),'description':'Search\x20visible\x20company\x20and\x20personal\x20knowledge\x20base\x20content','risk':a27_0x385399(0x89),'flags':[QUERY_FLAG,TOPK_FLAG],async 'validate'(_0x2a909e){const _0x2113e3=a27_0x385399;if(!_0x2a909e[_0x2113e3(0x9a)](_0x2113e3(0xc1))[_0x2113e3(0xbd)]())throw CliErrors[_0x2113e3(0xbf)]('Search\x20query\x20is\x20required.');readTopK(_0x2a909e);},async 'execute'(_0x47d418){const _0x355e86=a27_0x385399,_0x52c2fd=_0x47d418[_0x355e86(0x9a)](_0x355e86(0xc1))[_0x355e86(0xbd)](),_0x11df78=readTopK(_0x47d418),_0x4c6c82=await searchKnowledgeBase(_0x47d418[_0x355e86(0x9c)],{'query':_0x52c2fd,'topK':_0x11df78});return{'ok':!![],'data':{'total':_0x4c6c82['length'],'hits':_0x4c6c82[_0x355e86(0x8c)](summarizeSearchHit)}};}};export const kbDefinitions=[kbList,kbDetail,kbCreate,kbUpdate,kbSearch];