@lovrabet/rabetbase-cli 2.1.12-beta.4 → 2.1.13

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 (200) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/add.js +1 -1
  20. package/lib/commands/app/discover.js +1 -1
  21. package/lib/commands/app/index.js +1 -1
  22. package/lib/commands/app/list.js +1 -1
  23. package/lib/commands/app/remove.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app/use.js +1 -1
  26. package/lib/commands/auth/index.js +1 -1
  27. package/lib/commands/bff/create.js +1 -1
  28. package/lib/commands/bff/delete.js +1 -1
  29. package/lib/commands/bff/detail.js +1 -1
  30. package/lib/commands/bff/index.js +1 -1
  31. package/lib/commands/bff/list.js +1 -1
  32. package/lib/commands/bff/pull.js +1 -1
  33. package/lib/commands/bff/push.js +1 -1
  34. package/lib/commands/bff/status.js +1 -1
  35. package/lib/commands/cli-update.js +1 -1
  36. package/lib/commands/codegen/index.js +1 -1
  37. package/lib/commands/codegen/sdk.js +1 -1
  38. package/lib/commands/codegen/sql.js +1 -1
  39. package/lib/commands/common/app-selector.js +1 -1
  40. package/lib/commands/common/flags.js +1 -1
  41. package/lib/commands/common/validate.js +1 -1
  42. package/lib/commands/config/get.js +1 -1
  43. package/lib/commands/config/index.js +1 -1
  44. package/lib/commands/config/list.js +1 -1
  45. package/lib/commands/config/set.js +1 -1
  46. package/lib/commands/config/shared.js +1 -1
  47. package/lib/commands/data/filter.js +1 -1
  48. package/lib/commands/data/getOne.js +1 -1
  49. package/lib/commands/data/index.js +1 -1
  50. package/lib/commands/data/shared.js +1 -1
  51. package/lib/commands/dataset/capability.js +1 -1
  52. package/lib/commands/dataset/delete.js +1 -1
  53. package/lib/commands/dataset/detail.js +1 -1
  54. package/lib/commands/dataset/field-update.js +1 -1
  55. package/lib/commands/dataset/index.js +1 -1
  56. package/lib/commands/dataset/link-create.js +1 -1
  57. package/lib/commands/dataset/link-delete.js +1 -1
  58. package/lib/commands/dataset/link-shared.js +1 -1
  59. package/lib/commands/dataset/link-update.js +1 -1
  60. package/lib/commands/dataset/links.js +1 -1
  61. package/lib/commands/dataset/list.js +1 -1
  62. package/lib/commands/dataset/operations.js +1 -1
  63. package/lib/commands/db/analyze-cancel.js +1 -1
  64. package/lib/commands/db/analyze-start.js +1 -1
  65. package/lib/commands/db/analyze-status.js +1 -1
  66. package/lib/commands/db/create.js +1 -1
  67. package/lib/commands/db/delete.js +1 -1
  68. package/lib/commands/db/detail.js +1 -1
  69. package/lib/commands/db/diff.js +1 -1
  70. package/lib/commands/db/index.js +1 -1
  71. package/lib/commands/db/list.js +1 -1
  72. package/lib/commands/db/shared.js +1 -1
  73. package/lib/commands/db/tables.js +1 -1
  74. package/lib/commands/db/test.js +1 -1
  75. package/lib/commands/db/update.js +1 -1
  76. package/lib/commands/doctor.js +1 -1
  77. package/lib/commands/init/index.js +1 -1
  78. package/lib/commands/issue/index.js +1 -1
  79. package/lib/commands/issue/nudge.js +1 -1
  80. package/lib/commands/issue/report.js +1 -1
  81. package/lib/commands/issue/shared.js +1 -1
  82. package/lib/commands/logs/index.js +1 -1
  83. package/lib/commands/menu/index.js +1 -1
  84. package/lib/commands/menu/shared/compare-table.js +1 -1
  85. package/lib/commands/menu/shared/index.js +1 -1
  86. package/lib/commands/menu/shared/inquirer.js +1 -1
  87. package/lib/commands/menu/shared/local-pages.js +1 -1
  88. package/lib/commands/menu/shared/logic.js +1 -1
  89. package/lib/commands/menu/shared/service.js +1 -1
  90. package/lib/commands/menu/shared/sync-core.js +1 -1
  91. package/lib/commands/menu/shared/update-core.js +1 -1
  92. package/lib/commands/menu/shared/valid-url.js +1 -1
  93. package/lib/commands/menu/sync.js +1 -1
  94. package/lib/commands/menu/update.js +1 -1
  95. package/lib/commands/page/generate-start.js +1 -1
  96. package/lib/commands/page/generate-status.js +1 -1
  97. package/lib/commands/page/index.js +1 -1
  98. package/lib/commands/page/pull.js +1 -1
  99. package/lib/commands/page/push.js +1 -1
  100. package/lib/commands/page/shared.js +1 -1
  101. package/lib/commands/page/standard-page-status.js +1 -1
  102. package/lib/commands/page/sync.js +1 -1
  103. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  104. package/lib/commands/project/create/format-elapsed.js +1 -1
  105. package/lib/commands/project/create/main.js +1 -1
  106. package/lib/commands/project/create/non-interactive.js +1 -1
  107. package/lib/commands/project/create/project-template-path.js +1 -1
  108. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  109. package/lib/commands/project/create/use-format-code.js +1 -1
  110. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  111. package/lib/commands/project/index.js +1 -1
  112. package/lib/commands/project/init.js +1 -1
  113. package/lib/commands/project/upgrade.js +1 -1
  114. package/lib/commands/registry.js +1 -1
  115. package/lib/commands/run/index.js +1 -1
  116. package/lib/commands/schema.js +1 -1
  117. package/lib/commands/skill/index.js +1 -1
  118. package/lib/commands/sql/create.js +1 -1
  119. package/lib/commands/sql/delete.js +1 -1
  120. package/lib/commands/sql/detail.js +1 -1
  121. package/lib/commands/sql/exec.js +1 -1
  122. package/lib/commands/sql/index.js +1 -1
  123. package/lib/commands/sql/list.js +1 -1
  124. package/lib/commands/sql/pull.js +1 -1
  125. package/lib/commands/sql/push.js +1 -1
  126. package/lib/commands/sql/save.js +1 -1
  127. package/lib/commands/sql/shared.js +1 -1
  128. package/lib/commands/sql/status.js +1 -1
  129. package/lib/commands/sql/validate.js +1 -1
  130. package/lib/config/schema.js +1 -1
  131. package/lib/constant/cdn.js +1 -1
  132. package/lib/constant/cli.js +1 -1
  133. package/lib/constant/defaults.js +1 -1
  134. package/lib/constant/domain.js +1 -1
  135. package/lib/constant/env.js +1 -1
  136. package/lib/constant/output.js +1 -1
  137. package/lib/constant/paths.js +1 -1
  138. package/lib/constant/risk.js +1 -1
  139. package/lib/context.js +1 -1
  140. package/lib/core/alias-resolver.js +1 -1
  141. package/lib/core/api-client.js +1 -1
  142. package/lib/core/bff/config.js +1 -1
  143. package/lib/core/bff/file-system.js +1 -1
  144. package/lib/core/bff/hash.js +1 -1
  145. package/lib/core/bff/lock.js +1 -1
  146. package/lib/core/bff/utils.js +1 -1
  147. package/lib/core/db-resolver.js +1 -1
  148. package/lib/core/page/file-system.js +1 -1
  149. package/lib/core/page/hash.js +1 -1
  150. package/lib/core/page/lock.js +1 -1
  151. package/lib/core/sql-sync/config.js +1 -1
  152. package/lib/core/sql-sync/file-system.js +1 -1
  153. package/lib/core/sql-sync/hash.js +1 -1
  154. package/lib/core/sql-sync/lock.js +1 -1
  155. package/lib/core/sql-sync/utils.js +1 -1
  156. package/lib/core/sql-validator.js +1 -1
  157. package/lib/errors.js +1 -1
  158. package/lib/framework/build-all-flags.js +1 -1
  159. package/lib/framework/flags.js +1 -1
  160. package/lib/framework/help.js +1 -1
  161. package/lib/framework/index.js +1 -1
  162. package/lib/framework/output.js +1 -1
  163. package/lib/framework/response.js +1 -1
  164. package/lib/framework/runner-alias.js +1 -1
  165. package/lib/framework/runner.js +1 -1
  166. package/lib/framework/schema-export.js +1 -1
  167. package/lib/framework/types.js +1 -1
  168. package/lib/generated/build-info.js +1 -1
  169. package/lib/help.js +1 -1
  170. package/lib/skills/main.js +1 -1
  171. package/lib/skills/npx-skills-add.js +1 -1
  172. package/lib/telemetry/cli-command-trace.js +1 -1
  173. package/lib/telemetry/cli-help-trace.js +1 -1
  174. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  175. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  176. package/lib/telemetry/send-cli-trace-log.js +1 -1
  177. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  178. package/lib/utils/ai_config.js +1 -1
  179. package/lib/utils/apply-jq-filter.js +1 -1
  180. package/lib/utils/cdn-config.js +1 -1
  181. package/lib/utils/check-sdk-version.js +1 -1
  182. package/lib/utils/cli-version-check.js +1 -1
  183. package/lib/utils/cli-version-policy.js +1 -1
  184. package/lib/utils/config.js +1 -1
  185. package/lib/utils/copy-directory.js +1 -1
  186. package/lib/utils/entity-with-id.js +1 -1
  187. package/lib/utils/file-utils.js +1 -1
  188. package/lib/utils/guides-cdn.js +1 -1
  189. package/lib/utils/http-client.js +1 -1
  190. package/lib/utils/is-non-interactive.js +1 -1
  191. package/lib/utils/logger.js +1 -1
  192. package/lib/utils/params.js +1 -1
  193. package/lib/utils/platform.js +1 -1
  194. package/lib/utils/rules-cdn.js +1 -1
  195. package/lib/utils/sleep.js +1 -1
  196. package/lib/utils/template-replacer.js +1 -1
  197. package/lib/utils/version.js +1 -1
  198. package/lib/utils/with-active-cookie.js +1 -1
  199. package/lib/utils/write-cli-side-channel.js +1 -1
  200. package/package.json +2 -2
@@ -1 +1 @@
1
- const a132_0x184f52=a132_0x4770;(function(_0x579265,_0x18090a){const _0x5e9d60=a132_0x4770,_0x21734a=_0x579265();while(!![]){try{const _0x19713d=-parseInt(_0x5e9d60(0x1e2))/0x1+parseInt(_0x5e9d60(0x244))/0x2*(parseInt(_0x5e9d60(0x248))/0x3)+parseInt(_0x5e9d60(0x247))/0x4*(-parseInt(_0x5e9d60(0x1fa))/0x5)+parseInt(_0x5e9d60(0x225))/0x6*(-parseInt(_0x5e9d60(0x1f2))/0x7)+parseInt(_0x5e9d60(0x1f3))/0x8*(-parseInt(_0x5e9d60(0x1e1))/0x9)+parseInt(_0x5e9d60(0x223))/0xa+parseInt(_0x5e9d60(0x21c))/0xb*(parseInt(_0x5e9d60(0x243))/0xc);if(_0x19713d===_0x18090a)break;else _0x21734a['push'](_0x21734a['shift']());}catch(_0x398036){_0x21734a['push'](_0x21734a['shift']());}}}(a132_0x11a8,0x8f510));export const CLI_BIN_NAME=a132_0x184f52(0x245);function a132_0x4770(_0x622dfb,_0x494257){_0x622dfb=_0x622dfb-0x1e1;const _0x11a85e=a132_0x11a8();let _0x477067=_0x11a85e[_0x622dfb];return _0x477067;}export const CLI_DISPLAY_NAME=a132_0x184f52(0x20d);function a132_0x11a8(){const _0x1b9285=['27BrZjZK','771164xHxvfE','Schemas','Type\x20filter','title','Page\x20number','project','name','Apply\x20to\x20all','sqlname','<expr>','env','Confirm\x20destructive\x20action','db-id','Config\x20key','DB\x20ID','force','28InrjzN','2331456hLpLVB','code','Output\x20path','keyword','Config\x20value','Function\x20node','Description','11230XhzgXi','description-file','@lovrabet/rabetbase-cli','page','type','fromEntries','clear','appcode','non-interactive','watch','confirm','Skip\x20import\x20generation','Description\x20file','Name','dry-run','SQL\x20string','Record\x20ID','Expected\x20affected\x20count','dryRun','Rabetbase\x20CLI','Use\x20project\x20config\x20scope','SQL\x20name','expectedCount','Title','key','Force\x20overwrite','help','Page\x20size','Target\x20path','JSON\x20params','boolean','schemas','Force\x20non-interactive\x20mode\x20(CI)','operationType','2101JZrlfT','format','Output\x20format','Preview\x20operation\x20without\x20executing','Clear','yes','skipImports','11264750imMXmf','<name>','894324EeMMWy','Keyword\x20filter','Alias\x20for\x20--non-interactive','datasetcode','enableBffSave','value','app','output','descriptionFile','dbId','Use\x20remote','sqlcode','enable-bff-save','Dataset\x20code','functionNode','remote','Operation\x20type','target','description','SQL\x20code','string','<code>','sql','dbid','pagesize','all','global','operation','file','verbose','86568AWCJww','2MicNja','rabetbase','Show\x20help','768zpXCuy','2266749PEaAFF','expected-count','json\x20|\x20pretty\x20|\x20compress'];a132_0x11a8=function(){return _0x1b9285;};return a132_0x11a8();}export const NPM_PACKAGE_NAME=a132_0x184f52(0x1fc);export const GLOBAL_FLAGS=[{'name':'appcode','meowKey':a132_0x184f52(0x201),'type':a132_0x184f52(0x239),'description':'Override\x20appcode','hint':a132_0x184f52(0x23a)},{'name':a132_0x184f52(0x22b),'meowKey':a132_0x184f52(0x22b),'type':'string','description':'Select\x20app\x20profile\x20by\x20name','hint':a132_0x184f52(0x224)},{'name':a132_0x184f52(0x1ec),'meowKey':a132_0x184f52(0x1ec),'type':a132_0x184f52(0x239),'description':'Environment','hint':'production\x20|\x20daily'},{'name':'format','meowKey':a132_0x184f52(0x21d),'type':a132_0x184f52(0x239),'description':a132_0x184f52(0x21e),'hint':a132_0x184f52(0x24a)},{'name':'jq','meowKey':'jq','type':a132_0x184f52(0x239),'description':'Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','hint':a132_0x184f52(0x1eb)},{'name':a132_0x184f52(0x208),'meowKey':a132_0x184f52(0x20c),'type':a132_0x184f52(0x218),'description':a132_0x184f52(0x21f)},{'name':a132_0x184f52(0x221),'meowKey':a132_0x184f52(0x221),'type':a132_0x184f52(0x218),'description':'Skip\x20confirmation\x20for\x20high-risk\x20writes'},{'name':a132_0x184f52(0x202),'meowKey':'nonInteractive','type':'boolean','description':a132_0x184f52(0x21a)},{'name':a132_0x184f52(0x23f),'meowKey':a132_0x184f52(0x23f),'type':'boolean','description':'Use\x20global\x20config\x20scope'},{'name':a132_0x184f52(0x1e7),'meowKey':'project','type':a132_0x184f52(0x218),'description':a132_0x184f52(0x20e)},{'name':'ci','meowKey':'ci','type':a132_0x184f52(0x218),'description':a132_0x184f52(0x227),'hidden':!![]},{'name':a132_0x184f52(0x214),'meowKey':a132_0x184f52(0x214),'type':a132_0x184f52(0x218),'description':a132_0x184f52(0x246)},{'name':a132_0x184f52(0x1e8),'meowKey':a132_0x184f52(0x1e8),'type':a132_0x184f52(0x239),'description':a132_0x184f52(0x207),'hidden':!![]},{'name':'title','meowKey':a132_0x184f52(0x1e5),'type':'string','description':a132_0x184f52(0x211),'hidden':!![]},{'name':a132_0x184f52(0x200),'meowKey':a132_0x184f52(0x200),'type':a132_0x184f52(0x218),'description':a132_0x184f52(0x220),'hidden':!![]},{'name':'watch','meowKey':a132_0x184f52(0x203),'type':'boolean','description':'Watch\x20mode','hidden':!![]},{'name':a132_0x184f52(0x22c),'meowKey':a132_0x184f52(0x22c),'type':'string','description':a132_0x184f52(0x1f5),'hidden':!![]},{'name':'params','meowKey':'params','type':a132_0x184f52(0x239),'description':a132_0x184f52(0x217),'hidden':!![]},{'name':a132_0x184f52(0x228),'meowKey':'datasetcode','type':'string','description':a132_0x184f52(0x232),'hidden':!![]},{'name':'all','meowKey':a132_0x184f52(0x23e),'type':'boolean','description':a132_0x184f52(0x1e9),'hidden':!![]},{'name':a132_0x184f52(0x231),'meowKey':a132_0x184f52(0x229),'type':'boolean','description':'Enable\x20BFF\x20save','hidden':!![]},{'name':'id','meowKey':'id','type':'string','description':a132_0x184f52(0x20a),'hidden':!![]},{'name':a132_0x184f52(0x1fe),'meowKey':a132_0x184f52(0x1fe),'type':a132_0x184f52(0x239),'description':a132_0x184f52(0x1e4),'hidden':!![]},{'name':a132_0x184f52(0x241),'meowKey':a132_0x184f52(0x241),'type':a132_0x184f52(0x239),'description':'File\x20path','hidden':!![]},{'name':a132_0x184f52(0x230),'meowKey':a132_0x184f52(0x230),'type':a132_0x184f52(0x239),'description':a132_0x184f52(0x238),'hidden':!![]},{'name':'sql-name','meowKey':'sqlName','type':a132_0x184f52(0x239),'description':a132_0x184f52(0x20f),'hidden':!![]},{'name':'sqlname','meowKey':a132_0x184f52(0x1ea),'type':a132_0x184f52(0x239),'description':a132_0x184f52(0x20f),'hidden':!![]},{'name':a132_0x184f52(0x1ee),'meowKey':a132_0x184f52(0x22e),'type':a132_0x184f52(0x239),'description':a132_0x184f52(0x1f0),'hidden':!![]},{'name':'dbid','meowKey':a132_0x184f52(0x23c),'type':'string','description':a132_0x184f52(0x1f0),'hidden':!![]},{'name':a132_0x184f52(0x237),'meowKey':a132_0x184f52(0x237),'type':'string','description':a132_0x184f52(0x1f9),'hidden':!![]},{'name':a132_0x184f52(0x1fb),'meowKey':a132_0x184f52(0x22d),'type':a132_0x184f52(0x239),'description':a132_0x184f52(0x206),'hidden':!![]},{'name':a132_0x184f52(0x1fd),'meowKey':'page','type':a132_0x184f52(0x239),'description':a132_0x184f52(0x1e6),'hidden':!![]},{'name':a132_0x184f52(0x23d),'meowKey':'pagesize','type':a132_0x184f52(0x239),'description':a132_0x184f52(0x215),'hidden':!![]},{'name':a132_0x184f52(0x1f6),'meowKey':a132_0x184f52(0x1f6),'type':a132_0x184f52(0x239),'description':a132_0x184f52(0x226),'hidden':!![]},{'name':a132_0x184f52(0x1f4),'meowKey':a132_0x184f52(0x1f4),'type':'string','description':'Code\x20filter','hidden':!![]},{'name':a132_0x184f52(0x23b),'meowKey':'sql','type':a132_0x184f52(0x239),'description':a132_0x184f52(0x209),'hidden':!![]},{'name':a132_0x184f52(0x219),'meowKey':'schemas','type':'string','description':a132_0x184f52(0x1e3),'hidden':!![]},{'name':a132_0x184f52(0x240),'meowKey':'operation','type':a132_0x184f52(0x239),'description':a132_0x184f52(0x235),'hidden':!![]},{'name':a132_0x184f52(0x236),'meowKey':a132_0x184f52(0x236),'type':a132_0x184f52(0x239),'description':a132_0x184f52(0x216),'hidden':!![]},{'name':'skip-imports','meowKey':a132_0x184f52(0x222),'type':a132_0x184f52(0x218),'description':a132_0x184f52(0x205),'hidden':!![]},{'name':a132_0x184f52(0x212),'meowKey':a132_0x184f52(0x212),'type':a132_0x184f52(0x239),'description':a132_0x184f52(0x1ef),'hidden':!![]},{'name':'value','meowKey':a132_0x184f52(0x22a),'type':a132_0x184f52(0x239),'description':a132_0x184f52(0x1f7),'hidden':!![]},{'name':'force','meowKey':a132_0x184f52(0x1f1),'type':a132_0x184f52(0x218),'description':a132_0x184f52(0x213),'hidden':!![]},{'name':a132_0x184f52(0x204),'meowKey':a132_0x184f52(0x204),'type':a132_0x184f52(0x218),'description':a132_0x184f52(0x1ed),'hidden':!![]},{'name':a132_0x184f52(0x234),'meowKey':'remote','type':a132_0x184f52(0x218),'description':a132_0x184f52(0x22f),'hidden':!![]},{'name':'verbose','meowKey':a132_0x184f52(0x242),'type':'boolean','description':'Verbose\x20output','hidden':!![]},{'name':a132_0x184f52(0x249),'meowKey':a132_0x184f52(0x210),'type':a132_0x184f52(0x239),'description':a132_0x184f52(0x20b),'hidden':!![]},{'name':'operation-type','meowKey':a132_0x184f52(0x21b),'type':a132_0x184f52(0x239),'description':a132_0x184f52(0x235),'hidden':!![]},{'name':'function-node','meowKey':a132_0x184f52(0x233),'type':a132_0x184f52(0x239),'description':a132_0x184f52(0x1f8),'hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set([a132_0x184f52(0x201),a132_0x184f52(0x22b),a132_0x184f52(0x1ec),'format','jq',a132_0x184f52(0x208),a132_0x184f52(0x221),a132_0x184f52(0x202),'ci']);export function buildMeowFlags(){const _0x1c5817=a132_0x184f52;return Object[_0x1c5817(0x1ff)](GLOBAL_FLAGS['map'](_0x214d30=>[_0x214d30['meowKey'],{'type':_0x214d30[_0x1c5817(0x1fe)]}]));}
1
+ const a132_0x1065d8=a132_0x5de2;(function(_0x52f3f0,_0x5cd566){const _0x219923=a132_0x5de2,_0x130b48=_0x52f3f0();while(!![]){try{const _0x4f60fb=parseInt(_0x219923(0xb8))/0x1+-parseInt(_0x219923(0xd2))/0x2*(-parseInt(_0x219923(0xae))/0x3)+parseInt(_0x219923(0xbc))/0x4+-parseInt(_0x219923(0x96))/0x5*(parseInt(_0x219923(0x98))/0x6)+parseInt(_0x219923(0xcd))/0x7+parseInt(_0x219923(0xc3))/0x8*(-parseInt(_0x219923(0xcc))/0x9)+-parseInt(_0x219923(0xc6))/0xa;if(_0x4f60fb===_0x5cd566)break;else _0x130b48['push'](_0x130b48['shift']());}catch(_0x24dcf5){_0x130b48['push'](_0x130b48['shift']());}}}(a132_0xb6ed,0xed8bd));function a132_0x5de2(_0x1770d8,_0x597c80){_0x1770d8=_0x1770d8-0x77;const _0xb6ed5c=a132_0xb6ed();let _0x5de2f6=_0xb6ed5c[_0x1770d8];return _0x5de2f6;}export const CLI_BIN_NAME=a132_0x1065d8(0xcb);export const CLI_DISPLAY_NAME=a132_0x1065d8(0xce);export const NPM_PACKAGE_NAME=a132_0x1065d8(0x7d);export const GLOBAL_FLAGS=[{'name':a132_0x1065d8(0x9f),'meowKey':a132_0x1065d8(0x9f),'type':a132_0x1065d8(0xe0),'description':a132_0x1065d8(0xd4),'hint':a132_0x1065d8(0x94)},{'name':a132_0x1065d8(0x95),'meowKey':'app','type':a132_0x1065d8(0xe0),'description':a132_0x1065d8(0x8e),'hint':a132_0x1065d8(0xc9)},{'name':a132_0x1065d8(0xdf),'meowKey':a132_0x1065d8(0xdf),'type':'string','description':a132_0x1065d8(0xd8),'hint':a132_0x1065d8(0xa1)},{'name':a132_0x1065d8(0xbd),'meowKey':'format','type':a132_0x1065d8(0xe0),'description':a132_0x1065d8(0xb7),'hint':a132_0x1065d8(0x97)},{'name':'jq','meowKey':'jq','type':a132_0x1065d8(0xe0),'description':'Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','hint':a132_0x1065d8(0xb4)},{'name':'dry-run','meowKey':a132_0x1065d8(0xd7),'type':a132_0x1065d8(0xaf),'description':a132_0x1065d8(0x79)},{'name':'yes','meowKey':a132_0x1065d8(0xda),'type':a132_0x1065d8(0xaf),'description':'Skip\x20confirmation\x20for\x20high-risk\x20writes'},{'name':a132_0x1065d8(0xb0),'meowKey':a132_0x1065d8(0xa7),'type':a132_0x1065d8(0xaf),'description':a132_0x1065d8(0x9a)},{'name':'global','meowKey':'global','type':a132_0x1065d8(0xaf),'description':a132_0x1065d8(0x90)},{'name':a132_0x1065d8(0x8d),'meowKey':'project','type':a132_0x1065d8(0xaf),'description':a132_0x1065d8(0xa2)},{'name':'ci','meowKey':'ci','type':a132_0x1065d8(0xaf),'description':a132_0x1065d8(0xbb),'hidden':!![]},{'name':a132_0x1065d8(0xb1),'meowKey':'help','type':a132_0x1065d8(0xaf),'description':a132_0x1065d8(0xa8)},{'name':a132_0x1065d8(0xba),'meowKey':a132_0x1065d8(0xba),'type':a132_0x1065d8(0xe0),'description':a132_0x1065d8(0x89),'hidden':!![]},{'name':a132_0x1065d8(0xb9),'meowKey':'title','type':a132_0x1065d8(0xe0),'description':'Title','hidden':!![]},{'name':a132_0x1065d8(0x7e),'meowKey':a132_0x1065d8(0x7e),'type':a132_0x1065d8(0xaf),'description':a132_0x1065d8(0xc7),'hidden':!![]},{'name':'watch','meowKey':a132_0x1065d8(0xb3),'type':'boolean','description':a132_0x1065d8(0x99),'hidden':!![]},{'name':'output','meowKey':'output','type':'string','description':'Output\x20path','hidden':!![]},{'name':a132_0x1065d8(0xad),'meowKey':a132_0x1065d8(0xad),'type':a132_0x1065d8(0xe0),'description':a132_0x1065d8(0x86),'hidden':!![]},{'name':a132_0x1065d8(0xd6),'meowKey':'datasetcode','type':a132_0x1065d8(0xe0),'description':'Dataset\x20code','hidden':!![]},{'name':a132_0x1065d8(0xd0),'meowKey':a132_0x1065d8(0xd0),'type':a132_0x1065d8(0xaf),'description':a132_0x1065d8(0x7c),'hidden':!![]},{'name':a132_0x1065d8(0x7b),'meowKey':a132_0x1065d8(0x87),'type':a132_0x1065d8(0xaf),'description':a132_0x1065d8(0x8f),'hidden':!![]},{'name':'id','meowKey':'id','type':a132_0x1065d8(0xe0),'description':a132_0x1065d8(0x7a),'hidden':!![]},{'name':a132_0x1065d8(0xb2),'meowKey':'type','type':a132_0x1065d8(0xe0),'description':a132_0x1065d8(0x78),'hidden':!![]},{'name':'file','meowKey':a132_0x1065d8(0xdc),'type':a132_0x1065d8(0xe0),'description':a132_0x1065d8(0xe1),'hidden':!![]},{'name':a132_0x1065d8(0xa5),'meowKey':'sqlcode','type':a132_0x1065d8(0xe0),'description':a132_0x1065d8(0x82),'hidden':!![]},{'name':'sql-name','meowKey':a132_0x1065d8(0xc4),'type':a132_0x1065d8(0xe0),'description':a132_0x1065d8(0xc5),'hidden':!![]},{'name':a132_0x1065d8(0xdd),'meowKey':a132_0x1065d8(0xdd),'type':a132_0x1065d8(0xe0),'description':a132_0x1065d8(0xc5),'hidden':!![]},{'name':a132_0x1065d8(0xbf),'meowKey':a132_0x1065d8(0x85),'type':a132_0x1065d8(0xe0),'description':a132_0x1065d8(0xd1),'hidden':!![]},{'name':a132_0x1065d8(0xb6),'meowKey':'dbid','type':a132_0x1065d8(0xe0),'description':a132_0x1065d8(0xd1),'hidden':!![]},{'name':a132_0x1065d8(0x9d),'meowKey':a132_0x1065d8(0x9d),'type':a132_0x1065d8(0xe0),'description':a132_0x1065d8(0xd9),'hidden':!![]},{'name':a132_0x1065d8(0x92),'meowKey':a132_0x1065d8(0xab),'type':a132_0x1065d8(0xe0),'description':a132_0x1065d8(0x9c),'hidden':!![]},{'name':a132_0x1065d8(0x88),'meowKey':a132_0x1065d8(0x88),'type':a132_0x1065d8(0xe0),'description':a132_0x1065d8(0xde),'hidden':!![]},{'name':a132_0x1065d8(0x8a),'meowKey':'pagesize','type':a132_0x1065d8(0xe0),'description':a132_0x1065d8(0xc2),'hidden':!![]},{'name':a132_0x1065d8(0xd3),'meowKey':'keyword','type':a132_0x1065d8(0xe0),'description':a132_0x1065d8(0x84),'hidden':!![]},{'name':a132_0x1065d8(0xc8),'meowKey':a132_0x1065d8(0xc8),'type':'string','description':a132_0x1065d8(0xa9),'hidden':!![]},{'name':a132_0x1065d8(0x81),'meowKey':'sql','type':a132_0x1065d8(0xe0),'description':a132_0x1065d8(0xca),'hidden':!![]},{'name':a132_0x1065d8(0xbe),'meowKey':a132_0x1065d8(0xbe),'type':'string','description':a132_0x1065d8(0xcf),'hidden':!![]},{'name':'operation','meowKey':'operation','type':a132_0x1065d8(0xe0),'description':a132_0x1065d8(0x91),'hidden':!![]},{'name':a132_0x1065d8(0xd5),'meowKey':a132_0x1065d8(0xd5),'type':a132_0x1065d8(0xe0),'description':a132_0x1065d8(0x9e),'hidden':!![]},{'name':a132_0x1065d8(0xc0),'meowKey':a132_0x1065d8(0x8b),'type':a132_0x1065d8(0xaf),'description':'Skip\x20import\x20generation','hidden':!![]},{'name':a132_0x1065d8(0xac),'meowKey':a132_0x1065d8(0xac),'type':'string','description':'Config\x20key','hidden':!![]},{'name':'value','meowKey':a132_0x1065d8(0xaa),'type':a132_0x1065d8(0xe0),'description':'Config\x20value','hidden':!![]},{'name':'force','meowKey':'force','type':a132_0x1065d8(0xaf),'description':'Force\x20overwrite','hidden':!![]},{'name':a132_0x1065d8(0xa0),'meowKey':'confirm','type':a132_0x1065d8(0xaf),'description':a132_0x1065d8(0x77),'hidden':!![]},{'name':'remote','meowKey':'remote','type':a132_0x1065d8(0xaf),'description':a132_0x1065d8(0xdb),'hidden':!![]},{'name':'verbose','meowKey':a132_0x1065d8(0xa6),'type':'boolean','description':a132_0x1065d8(0x93),'hidden':!![]},{'name':a132_0x1065d8(0x83),'meowKey':a132_0x1065d8(0x8c),'type':a132_0x1065d8(0xe0),'description':a132_0x1065d8(0xc1),'hidden':!![]},{'name':a132_0x1065d8(0xa4),'meowKey':'operationType','type':a132_0x1065d8(0xe0),'description':'Operation\x20type','hidden':!![]},{'name':a132_0x1065d8(0x9b),'meowKey':'functionNode','type':'string','description':a132_0x1065d8(0xa3),'hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set([a132_0x1065d8(0x9f),a132_0x1065d8(0x95),a132_0x1065d8(0xdf),'format','jq',a132_0x1065d8(0x7f),'yes',a132_0x1065d8(0xb0),'ci']);function a132_0xb6ed(){const _0x56924f=['4712144XookSv','format','schemas','db-id','skip-imports','Expected\x20affected\x20count','Page\x20size','64SaSMUB','sqlName','SQL\x20name','1297650hzbqCe','Clear','code','<name>','SQL\x20string','rabetbase','226224MNEdOF','4505760gWfvbw','Rabetbase\x20CLI','Schemas','all','DB\x20ID','1397704mBaXXx','keyword','Override\x20appcode','target','datasetcode','dryRun','Environment','Description','yes','Use\x20remote','file','sqlname','Page\x20number','env','string','File\x20path','Confirm\x20destructive\x20action','Type\x20filter','Preview\x20operation\x20without\x20executing','Record\x20ID','enable-bff-save','Apply\x20to\x20all','@lovrabet/rabetbase-cli','clear','dry-run','fromEntries','sql','SQL\x20code','expected-count','Keyword\x20filter','dbId','JSON\x20params','enableBffSave','page','Name','pagesize','skipImports','expectedCount','project','Select\x20app\x20profile\x20by\x20name','Enable\x20BFF\x20save','Use\x20global\x20config\x20scope','Operation\x20type','description-file','Verbose\x20output','<code>','app','230415beQBiv','json\x20|\x20pretty\x20|\x20compress','222mGOSKB','Watch\x20mode','Force\x20non-interactive\x20mode\x20(CI)','function-node','Description\x20file','description','Target\x20path','appcode','confirm','production\x20|\x20daily','Use\x20project\x20config\x20scope','Function\x20node','operation-type','sqlcode','verbose','nonInteractive','Show\x20help','Code\x20filter','value','descriptionFile','key','params','3THUfya','boolean','non-interactive','help','type','watch','<expr>','meowKey','dbid','Output\x20format','488345CrvBbH','title','name','Alias\x20for\x20--non-interactive'];a132_0xb6ed=function(){return _0x56924f;};return a132_0xb6ed();}export function buildMeowFlags(){const _0x38d526=a132_0x1065d8;return Object[_0x38d526(0x80)](GLOBAL_FLAGS['map'](_0xc247ec=>[_0xc247ec[_0x38d526(0xb5)],{'type':_0xc247ec[_0x38d526(0xb2)]}]));}
@@ -1 +1 @@
1
- const a133_0x39e318=a133_0x1c02;function a133_0x1c02(_0x1b2aab,_0x42a2ac){_0x1b2aab=_0x1b2aab-0x11a;const _0x30b639=a133_0x30b6();let _0x1c02d6=_0x30b639[_0x1b2aab];return _0x1c02d6;}function a133_0x30b6(){const _0x5eae2c=['4495554NrqTlf','9259416rDfgKW','en-US','52376ukzEtD','138FTyAla','production','751497TVzxLc','5zzIDrl','31170cTpgKQ','high-risk-write','4qckysx','8229UQIrcZ','7577vtmRha','4961ZQpySS','287HWbHlI','compress','21144SgjpXY'];a133_0x30b6=function(){return _0x5eae2c;};return a133_0x30b6();}(function(_0x393e95,_0x3c0afa){const _0x450981=a133_0x1c02,_0x5f39e5=_0x393e95();while(!![]){try{const _0xe4af38=parseInt(_0x450981(0x122))/0x1*(-parseInt(_0x450981(0x11a))/0x2)+parseInt(_0x450981(0x11c))/0x3*(-parseInt(_0x450981(0x120))/0x4)+-parseInt(_0x450981(0x11d))/0x5*(-parseInt(_0x450981(0x128))/0x6)+parseInt(_0x450981(0x124))/0x7*(parseInt(_0x450981(0x12a))/0x8)+-parseInt(_0x450981(0x127))/0x9+-parseInt(_0x450981(0x11e))/0xa*(-parseInt(_0x450981(0x123))/0xb)+-parseInt(_0x450981(0x126))/0xc*(parseInt(_0x450981(0x121))/0xd);if(_0xe4af38===_0x3c0afa)break;else _0x5f39e5['push'](_0x5f39e5['shift']());}catch(_0x10634b){_0x5f39e5['push'](_0x5f39e5['shift']());}}}(a133_0x30b6,0xca752));import{DEFAULT_API_DIR}from'../constant/paths.js';export const DEFAULT_CONFIG_VALUES={'env':a133_0x39e318(0x11b),'format':a133_0x39e318(0x125),'locale':a133_0x39e318(0x129),'riskLevel':a133_0x39e318(0x11f),'apiDir':DEFAULT_API_DIR};export const DEFAULT_COMMAND_OUTPUT_FORMAT=a133_0x39e318(0x125);
1
+ const a133_0x59f216=a133_0x3147;function a133_0x3612(){const _0x3ae69a=['23ytSNrd','2641200lEVsuO','40436AIrVRa','26646RzZxwv','production','418PMJbUh','6939373eijFTQ','high-risk-write','compress','1095608qDFZUj','en-US','524060JYtwvg','1615XMwZTy','567670SIIrWa','9owEefr'];a133_0x3612=function(){return _0x3ae69a;};return a133_0x3612();}(function(_0x30a01d,_0x2b3cf3){const _0x504b86=a133_0x3147,_0x4fe417=_0x30a01d();while(!![]){try{const _0x47abe5=parseInt(_0x504b86(0x13a))/0x1*(parseInt(_0x504b86(0x13c))/0x2)+parseInt(_0x504b86(0x13b))/0x3+-parseInt(_0x504b86(0x136))/0x4+parseInt(_0x504b86(0x137))/0x5*(-parseInt(_0x504b86(0x13d))/0x6)+-parseInt(_0x504b86(0x140))/0x7+parseInt(_0x504b86(0x143))/0x8*(-parseInt(_0x504b86(0x139))/0x9)+-parseInt(_0x504b86(0x138))/0xa*(-parseInt(_0x504b86(0x13f))/0xb);if(_0x47abe5===_0x2b3cf3)break;else _0x4fe417['push'](_0x4fe417['shift']());}catch(_0x46d92e){_0x4fe417['push'](_0x4fe417['shift']());}}}(a133_0x3612,0xc576c));import{DEFAULT_API_DIR}from'../constant/paths.js';export const DEFAULT_CONFIG_VALUES={'env':a133_0x59f216(0x13e),'format':a133_0x59f216(0x142),'locale':a133_0x59f216(0x144),'riskLevel':a133_0x59f216(0x141),'apiDir':DEFAULT_API_DIR};function a133_0x3147(_0x2d54d2,_0x4e6fa5){_0x2d54d2=_0x2d54d2-0x136;const _0x361229=a133_0x3612();let _0x314770=_0x361229[_0x2d54d2];return _0x314770;}export const DEFAULT_COMMAND_OUTPUT_FORMAT=a133_0x59f216(0x142);
@@ -1 +1 @@
1
- const a134_0x1dd1f5=a134_0x1cbb;(function(_0x2f7fe6,_0x504c52){const _0x338784=a134_0x1cbb,_0x13e1fc=_0x2f7fe6();while(!![]){try{const _0x2880db=-parseInt(_0x338784(0x16e))/0x1+parseInt(_0x338784(0x176))/0x2*(parseInt(_0x338784(0x174))/0x3)+parseInt(_0x338784(0x171))/0x4*(parseInt(_0x338784(0x16c))/0x5)+-parseInt(_0x338784(0x169))/0x6*(-parseInt(_0x338784(0x175))/0x7)+parseInt(_0x338784(0x167))/0x8*(-parseInt(_0x338784(0x178))/0x9)+parseInt(_0x338784(0x179))/0xa+-parseInt(_0x338784(0x16d))/0xb*(-parseInt(_0x338784(0x16b))/0xc);if(_0x2880db===_0x504c52)break;else _0x13e1fc['push'](_0x13e1fc['shift']());}catch(_0x270552){_0x13e1fc['push'](_0x13e1fc['shift']());}}}(a134_0x20da,0x7269d));import{getEnv,isProduction}from'../constant/env.js';function a134_0x20da(){const _0x2cd718=['12lHzZnx','2504410QNwxin','3800203HVUhbY','844403khgAul','https://user-daily.lovrabet.com','apiDomain','4YorlZB','runtimeDomain','https://daily-runtime.lovrabet.com','3TTaLnV','1818733kohQrq','171426xeZlgA','https://user.lovrabet.com','18HdEPwK','3601850YPZvQD','956128MSoWDj','userDomain','6WxAjxq','https://daily-api.lovrabet.com'];a134_0x20da=function(){return _0x2cd718;};return a134_0x20da();}let customApiDomain,customUserDomain,customRuntimeDomain;export function initDomains(_0x2fba83){const _0x133ce5=a134_0x1cbb;customApiDomain=_0x2fba83?.[_0x133ce5(0x170)],customUserDomain=_0x2fba83?.[_0x133ce5(0x168)],customRuntimeDomain=_0x2fba83?.[_0x133ce5(0x172)];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?a134_0x1dd1f5(0x177):a134_0x1dd1f5(0x16f));function a134_0x1cbb(_0x2d20df,_0x46a6ae){_0x2d20df=_0x2d20df-0x167;const _0x20da4b=a134_0x20da();let _0x1cbb52=_0x20da4b[_0x2d20df];return _0x1cbb52;}export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?'https://api.lovrabet.com':a134_0x1dd1f5(0x16a));export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?'https://runtime.lovrabet.com':a134_0x1dd1f5(0x173));
1
+ const a134_0x216c56=a134_0x24ee;(function(_0x2e59a1,_0x31dabf){const _0x384771=a134_0x24ee,_0x50cefd=_0x2e59a1();while(!![]){try{const _0x4c2288=parseInt(_0x384771(0xf0))/0x1*(-parseInt(_0x384771(0xea))/0x2)+parseInt(_0x384771(0xe1))/0x3*(-parseInt(_0x384771(0xe0))/0x4)+parseInt(_0x384771(0xec))/0x5*(-parseInt(_0x384771(0xe2))/0x6)+parseInt(_0x384771(0xe4))/0x7*(parseInt(_0x384771(0xed))/0x8)+parseInt(_0x384771(0xe8))/0x9+-parseInt(_0x384771(0xde))/0xa*(parseInt(_0x384771(0xe9))/0xb)+parseInt(_0x384771(0xe3))/0xc*(parseInt(_0x384771(0xef))/0xd);if(_0x4c2288===_0x31dabf)break;else _0x50cefd['push'](_0x50cefd['shift']());}catch(_0x38cc07){_0x50cefd['push'](_0x50cefd['shift']());}}}(a134_0x27c6,0x8ddab));import{getEnv,isProduction}from'../constant/env.js';let customApiDomain,customUserDomain,customRuntimeDomain;export function initDomains(_0x340d18){const _0x3ad6f8=a134_0x24ee;customApiDomain=_0x340d18?.[_0x3ad6f8(0xdf)],customUserDomain=_0x340d18?.[_0x3ad6f8(0xe5)],customRuntimeDomain=_0x340d18?.[_0x3ad6f8(0xe7)];}function a134_0x24ee(_0x2c30a8,_0x5d64f7){_0x2c30a8=_0x2c30a8-0xde;const _0x27c6c0=a134_0x27c6();let _0x24eedf=_0x27c6c0[_0x2c30a8];return _0x24eedf;}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?a134_0x216c56(0xee):a134_0x216c56(0xe6));function a134_0x27c6(){const _0x566857=['1045hexNWE','2fpBino','https://runtime.lovrabet.com','10xCXdqs','5902384lKXngc','https://user.lovrabet.com','5053399qOZoWM','897406MaNaSF','100460sJPAuI','apiDomain','4YgRofX','929415EcUiOc','2604450vUtXkK','60DDbzFC','7ZGJENm','userDomain','https://user-daily.lovrabet.com','runtimeDomain','8364177cZxSRv'];a134_0x27c6=function(){return _0x566857;};return a134_0x27c6();}export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?'https://api.lovrabet.com':'https://daily-api.lovrabet.com');export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?a134_0x216c56(0xeb):'https://daily-runtime.lovrabet.com');
@@ -1 +1 @@
1
- const a135_0x149ccd=a135_0x36e2;(function(_0xd052b5,_0x41e12d){const _0x5a3f6b=a135_0x36e2,_0x2628f7=_0xd052b5();while(!![]){try{const _0x596f3c=-parseInt(_0x5a3f6b(0x157))/0x1+parseInt(_0x5a3f6b(0x152))/0x2*(parseInt(_0x5a3f6b(0x15b))/0x3)+-parseInt(_0x5a3f6b(0x159))/0x4+-parseInt(_0x5a3f6b(0x156))/0x5+parseInt(_0x5a3f6b(0x154))/0x6+-parseInt(_0x5a3f6b(0x15c))/0x7+parseInt(_0x5a3f6b(0x15a))/0x8;if(_0x596f3c===_0x41e12d)break;else _0x2628f7['push'](_0x2628f7['shift']());}catch(_0x23cfea){_0x2628f7['push'](_0x2628f7['shift']());}}}(a135_0x3ed7,0x5650f));export const RABETBASE_ENV_VALUES=[a135_0x149ccd(0x15d),a135_0x149ccd(0x155)];function a135_0x3ed7(){const _0x5620eb=['daily','2474250HMtsuf','255136IMtBxN','development','1975864ifusoR','5620936stJqsC','15ZLYpBV','1629922jDjbLd','production','dev','264626DZpHrw','online','2797002WVoeFS'];a135_0x3ed7=function(){return _0x5620eb;};return a135_0x3ed7();}export function normalizeEnv(_0x58c42b){const _0xcf6011=a135_0x149ccd;return _0x58c42b===_0xcf6011(0x153)?_0xcf6011(0x15d):_0x58c42b;}function a135_0x36e2(_0x1d7a1b,_0x267d4a){_0x1d7a1b=_0x1d7a1b-0x152;const _0x3ed756=a135_0x3ed7();let _0x36e26a=_0x3ed756[_0x1d7a1b];return _0x36e26a;}export function isProduction(_0x16ac87){const _0x28c832=a135_0x149ccd;return normalizeEnv(_0x16ac87)===_0x28c832(0x15d);}export function isDaily(_0x3b4277){return normalizeEnv(_0x3b4277)==='daily';}export function isDev(_0x5b7886){const _0x486af4=a135_0x149ccd,_0x2c2e1b=normalizeEnv(_0x5b7886);return _0x2c2e1b===_0x486af4(0x158)||_0x2c2e1b===_0x486af4(0x15e);}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||'production');export function getEnv(){return env;}export function initEnv(_0x5dcb9c){env=normalizeEnv(_0x5dcb9c);}
1
+ const a135_0x3ddada=a135_0x1699;(function(_0x258b5a,_0x267541){const _0x5ca943=a135_0x1699,_0x1c8eb4=_0x258b5a();while(!![]){try{const _0x10f125=-parseInt(_0x5ca943(0x11f))/0x1*(-parseInt(_0x5ca943(0x126))/0x2)+-parseInt(_0x5ca943(0x11c))/0x3+-parseInt(_0x5ca943(0x121))/0x4+parseInt(_0x5ca943(0x124))/0x5+parseInt(_0x5ca943(0x11d))/0x6+parseInt(_0x5ca943(0x125))/0x7+-parseInt(_0x5ca943(0x11e))/0x8;if(_0x10f125===_0x267541)break;else _0x1c8eb4['push'](_0x1c8eb4['shift']());}catch(_0x59da12){_0x1c8eb4['push'](_0x1c8eb4['shift']());}}}(a135_0x53d2,0xbbc96));export const RABETBASE_ENV_VALUES=['production',a135_0x3ddada(0x122)];export function normalizeEnv(_0x1ebda5){const _0x23df3c=a135_0x3ddada;return _0x1ebda5==='online'?_0x23df3c(0x120):_0x1ebda5;}export function isProduction(_0x28124d){const _0xe67884=a135_0x3ddada;return normalizeEnv(_0x28124d)===_0xe67884(0x120);}export function isDaily(_0x479778){return normalizeEnv(_0x479778)==='daily';}export function isDev(_0x4e162a){const _0x3ebe5c=a135_0x3ddada,_0x5c7948=normalizeEnv(_0x4e162a);return _0x5c7948==='development'||_0x5c7948===_0x3ebe5c(0x123);}function a135_0x1699(_0x4ae642,_0x1753e9){_0x4ae642=_0x4ae642-0x11c;const _0x53d272=a135_0x53d2();let _0x16993a=_0x53d272[_0x4ae642];return _0x16993a;}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||a135_0x3ddada(0x120));export function getEnv(){return env;}function a135_0x53d2(){const _0x1af671=['4253355LfbpxJ','4378746wTpyDz','3705344UlIwaQ','2841DaFZUl','production','2231704aFobHO','daily','dev','5489185RLDDaG','375746TMgYyH','934gQyhnw'];a135_0x53d2=function(){return _0x1af671;};return a135_0x53d2();}export function initEnv(_0x39198b){env=normalizeEnv(_0x39198b);}
@@ -1 +1 @@
1
- const a136_0x411b52=a136_0x9c2b;function a136_0x4069(){const _0x20931a=['1923512dDvtOU','91imliJf','9aASmNK','89176CVCSAU','pretty','42oeDLrE','3HTQOIK','50855lzuLxW','11nreGko','1808716qfQaAZ','compress','1447932PqirLj','json','3111580iGEHSb','8NKqREr','311667XhaJmZ'];a136_0x4069=function(){return _0x20931a;};return a136_0x4069();}function a136_0x9c2b(_0x49abd1,_0x29a03b){_0x49abd1=_0x49abd1-0xee;const _0x40690a=a136_0x4069();let _0x9c2b42=_0x40690a[_0x49abd1];return _0x9c2b42;}(function(_0x5d49a2,_0x583764){const _0x30d028=a136_0x9c2b,_0x513826=_0x5d49a2();while(!![]){try{const _0xe81a8=parseInt(_0x30d028(0xfa))/0x1*(-parseInt(_0x30d028(0xf7))/0x2)+parseInt(_0x30d028(0xf3))/0x3*(parseInt(_0x30d028(0xf2))/0x4)+parseInt(_0x30d028(0xfb))/0x5*(parseInt(_0x30d028(0xf9))/0x6)+-parseInt(_0x30d028(0xfd))/0x7+parseInt(_0x30d028(0xf4))/0x8*(-parseInt(_0x30d028(0xf6))/0x9)+-parseInt(_0x30d028(0xf1))/0xa*(parseInt(_0x30d028(0xfc))/0xb)+-parseInt(_0x30d028(0xef))/0xc*(-parseInt(_0x30d028(0xf5))/0xd);if(_0xe81a8===_0x583764)break;else _0x513826['push'](_0x513826['shift']());}catch(_0x3b676b){_0x513826['push'](_0x513826['shift']());}}}(a136_0x4069,0x2be8d));export const RABETBASE_OUTPUT_FORMAT_VALUES=[a136_0x411b52(0xf0),a136_0x411b52(0xf8),a136_0x411b52(0xee)];
1
+ function a136_0x3ffc(_0xe681cd,_0x1682c8){_0xe681cd=_0xe681cd-0x14a;const _0x2d310a=a136_0x2d31();let _0x3ffcc1=_0x2d310a[_0xe681cd];return _0x3ffcc1;}const a136_0xf51f6=a136_0x3ffc;(function(_0x24cb68,_0x3f9f89){const _0x27a986=a136_0x3ffc,_0x4cd57=_0x24cb68();while(!![]){try{const _0x193e94=-parseInt(_0x27a986(0x14f))/0x1+parseInt(_0x27a986(0x151))/0x2+parseInt(_0x27a986(0x14d))/0x3+parseInt(_0x27a986(0x14c))/0x4*(-parseInt(_0x27a986(0x152))/0x5)+parseInt(_0x27a986(0x150))/0x6+-parseInt(_0x27a986(0x14b))/0x7+parseInt(_0x27a986(0x14a))/0x8;if(_0x193e94===_0x3f9f89)break;else _0x4cd57['push'](_0x4cd57['shift']());}catch(_0xfbe0fd){_0x4cd57['push'](_0x4cd57['shift']());}}}(a136_0x2d31,0x73899));export const RABETBASE_OUTPUT_FORMAT_VALUES=[a136_0xf51f6(0x14e),'pretty','compress'];function a136_0x2d31(){const _0x3115f0=['1536460wHofxG','3082120BawogX','6154184rBBtii','4813417kmSEqO','4rVMJtN','145467Iphbhp','json','21002Inpnxw','1273836Yzbxho'];a136_0x2d31=function(){return _0x3115f0;};return a136_0x2d31();}
@@ -1 +1 @@
1
- const a137_0x47640d=a137_0x53e0;(function(_0x569ffe,_0x326847){const _0x35c235=a137_0x53e0,_0x387256=_0x569ffe();while(!![]){try{const _0x2cbd8d=-parseInt(_0x35c235(0xd3))/0x1+parseInt(_0x35c235(0xcc))/0x2+-parseInt(_0x35c235(0xcf))/0x3*(-parseInt(_0x35c235(0xd4))/0x4)+-parseInt(_0x35c235(0xcd))/0x5*(-parseInt(_0x35c235(0xcb))/0x6)+-parseInt(_0x35c235(0xd2))/0x7+-parseInt(_0x35c235(0xd1))/0x8+parseInt(_0x35c235(0xd0))/0x9;if(_0x2cbd8d===_0x326847)break;else _0x387256['push'](_0x387256['shift']());}catch(_0xdbd9ed){_0x387256['push'](_0x387256['shift']());}}}(a137_0x3666,0xd9448));function a137_0x53e0(_0x155e34,_0x54321a){_0x155e34=_0x155e34-0xcb;const _0x366680=a137_0x3666();let _0x53e027=_0x366680[_0x155e34];return _0x53e027;}function a137_0x3666(){const _0x76b90e=['8723200dpIKRb','3151974MeIWtK','450606pCydRW','2619092xVZZXn','16566YyDGJW','2912856uznhqY','1315HEbCRU','./src/api','3BcRorS','394848oWjoaU'];a137_0x3666=function(){return _0x76b90e;};return a137_0x3666();}export const DEFAULT_API_DIR=a137_0x47640d(0xce);
1
+ const a137_0x3334d4=a137_0x24cd;function a137_0x24cd(_0x381188,_0x514b59){_0x381188=_0x381188-0x15c;const _0xc84029=a137_0xc840();let _0x24cd7e=_0xc84029[_0x381188];return _0x24cd7e;}(function(_0x51b917,_0x50cb6e){const _0xcb767c=a137_0x24cd,_0xc6da00=_0x51b917();while(!![]){try{const _0x1cd3a0=parseInt(_0xcb767c(0x15d))/0x1+parseInt(_0xcb767c(0x162))/0x2+-parseInt(_0xcb767c(0x165))/0x3+parseInt(_0xcb767c(0x166))/0x4*(parseInt(_0xcb767c(0x160))/0x5)+-parseInt(_0xcb767c(0x15f))/0x6+parseInt(_0xcb767c(0x163))/0x7*(-parseInt(_0xcb767c(0x15c))/0x8)+-parseInt(_0xcb767c(0x161))/0x9*(parseInt(_0xcb767c(0x164))/0xa);if(_0x1cd3a0===_0x50cb6e)break;else _0xc6da00['push'](_0xc6da00['shift']());}catch(_0x249f6e){_0xc6da00['push'](_0xc6da00['shift']());}}}(a137_0xc840,0x919f2));function a137_0xc840(){const _0x58cdc6=['7042590zggaVF','6065empiAp','9qJlVql','2240002ANsdPz','39158FOLTtj','5359030hpGUol','370488kTtRnI','3260yNTjEh','608PlTNmZ','746178rWVshU','./src/api'];a137_0xc840=function(){return _0x58cdc6;};return a137_0xc840();}export const DEFAULT_API_DIR=a137_0x3334d4(0x15e);
@@ -1 +1 @@
1
- function a138_0x56b9(){const _0x518a21=['36880ILURiJ','2436328qHrfIu','7EMmgfn','4994766skGydd','1017ZBCYbR','4kgqQQB','1194303jBDQOU','869950dFCihw','write','226549JovXGX','1388BahuWP','read','high-risk-write','903RYPSIX'];a138_0x56b9=function(){return _0x518a21;};return a138_0x56b9();}const a138_0x3ab065=a138_0x2a1d;function a138_0x2a1d(_0x341c16,_0x47847f){_0x341c16=_0x341c16-0x125;const _0x56b9f2=a138_0x56b9();let _0x2a1d0c=_0x56b9f2[_0x341c16];return _0x2a1d0c;}(function(_0x215ac6,_0x45c88c){const _0x4a00fc=a138_0x2a1d,_0x576c0e=_0x215ac6();while(!![]){try{const _0xaa5d6c=parseInt(_0x4a00fc(0x12e))/0x1*(-parseInt(_0x4a00fc(0x12a))/0x2)+-parseInt(_0x4a00fc(0x132))/0x3*(-parseInt(_0x4a00fc(0x12f))/0x4)+parseInt(_0x4a00fc(0x12c))/0x5+parseInt(_0x4a00fc(0x128))/0x6+-parseInt(_0x4a00fc(0x127))/0x7*(-parseInt(_0x4a00fc(0x126))/0x8)+-parseInt(_0x4a00fc(0x129))/0x9*(parseInt(_0x4a00fc(0x125))/0xa)+-parseInt(_0x4a00fc(0x12b))/0xb;if(_0xaa5d6c===_0x45c88c)break;else _0x576c0e['push'](_0x576c0e['shift']());}catch(_0x40f0ff){_0x576c0e['push'](_0x576c0e['shift']());}}}(a138_0x56b9,0x6ab20));export const RISK_LEVEL_VALUES=[a138_0x3ab065(0x130),a138_0x3ab065(0x12d),a138_0x3ab065(0x131)];
1
+ function a138_0x76a9(){const _0x447ee0=['296680PbXCZx','20BlUBxh','162694SmPmnT','1306840eIzeDg','58902NKVBBN','72NZKPAc','high-risk-write','8331675auDKIp','1209776NhzJMM','5MQOFzZ','210uXusIR','write','216717vGpgAu'];a138_0x76a9=function(){return _0x447ee0;};return a138_0x76a9();}const a138_0x50c459=a138_0x55e9;(function(_0x3265b4,_0xfe4f5c){const _0x25debd=a138_0x55e9,_0x4ae017=_0x3265b4();while(!![]){try{const _0xa67c6b=-parseInt(_0x25debd(0x10e))/0x1*(parseInt(_0x25debd(0x114))/0x2)+-parseInt(_0x25debd(0x111))/0x3+parseInt(_0x25debd(0x10d))/0x4*(parseInt(_0x25debd(0x113))/0x5)+-parseInt(_0x25debd(0x116))/0x6*(-parseInt(_0x25debd(0x10f))/0x7)+-parseInt(_0x25debd(0x112))/0x8*(-parseInt(_0x25debd(0x117))/0x9)+parseInt(_0x25debd(0x115))/0xa+-parseInt(_0x25debd(0x10c))/0xb;if(_0xa67c6b===_0xfe4f5c)break;else _0x4ae017['push'](_0x4ae017['shift']());}catch(_0x283cbe){_0x4ae017['push'](_0x4ae017['shift']());}}}(a138_0x76a9,0xa9bd3));function a138_0x55e9(_0x104989,_0x54255d){_0x104989=_0x104989-0x10c;const _0x76a9ce=a138_0x76a9();let _0x55e95d=_0x76a9ce[_0x104989];return _0x55e95d;}export const RISK_LEVEL_VALUES=['read',a138_0x50c459(0x110),a138_0x50c459(0x118)];
package/lib/context.js CHANGED
@@ -1 +1 @@
1
- const a139_0x1112df=a139_0x994f;(function(_0x1c3b12,_0x4a0ef7){const _0x3ac127=a139_0x994f,_0xa9944f=_0x1c3b12();while(!![]){try{const _0x2a2032=parseInt(_0x3ac127(0x1b9))/0x1+parseInt(_0x3ac127(0x199))/0x2*(parseInt(_0x3ac127(0x19a))/0x3)+parseInt(_0x3ac127(0x190))/0x4*(-parseInt(_0x3ac127(0x19d))/0x5)+-parseInt(_0x3ac127(0x1aa))/0x6*(-parseInt(_0x3ac127(0x19e))/0x7)+parseInt(_0x3ac127(0x16e))/0x8*(parseInt(_0x3ac127(0x1a9))/0x9)+-parseInt(_0x3ac127(0x18f))/0xa*(parseInt(_0x3ac127(0x187))/0xb)+-parseInt(_0x3ac127(0x1a1))/0xc*(parseInt(_0x3ac127(0x1b0))/0xd);if(_0x2a2032===_0x4a0ef7)break;else _0xa9944f['push'](_0xa9944f['shift']());}catch(_0x104509){_0xa9944f['push'](_0xa9944f['shift']());}}}(a139_0x1d7b,0x79d91));import{readFileSync,writeFileSync,existsSync,mkdirSync,renameSync,unlinkSync}from'node:fs';import{resolve,dirname,parse}from'node:path';import{homedir}from'node:os';import{logger}from'./utils/logger.js';import{getIsSessionValid}from'./auth/is-session-valid.js';import{CliErrors}from'./errors.js';import{CLI_BIN_NAME}from'./constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'./constant/defaults.js';import{normalizeEnv,isDaily}from'./constant/env.js';import{normalizeLegacyOutputFormat}from'./framework/types.js';function env(_0x12bd7f){return process.env[`RABETBASE_${_0x12bd7f}`]||process.env[`LOVRABET_${_0x12bd7f}`]||undefined;}function a139_0x994f(_0x3fc414,_0x51b7ad){_0x3fc414=_0x3fc414-0x16a;const _0x1d7b25=a139_0x1d7b();let _0x994f7b=_0x1d7b25[_0x3fc414];return _0x994f7b;}export const NEW_CONFIG_NAME=a139_0x1112df(0x186);export const CONFIG_NAMES=['.rabetbase.json',a139_0x1112df(0x16b),a139_0x1112df(0x1a8)];export const LEGACY_CONFIG_NAMES=CONFIG_NAMES['filter'](_0x41913c=>_0x41913c!==NEW_CONFIG_NAME);export function resolveConfigPath(_0x4d612a){for(const _0x516dd3 of CONFIG_NAMES){const _0x16b926=resolve(_0x4d612a,_0x516dd3);if(existsSync(_0x16b926))return _0x16b926;}return undefined;}export function findProjectRootDirectory(_0x3982d6=process['cwd']()){let _0x45a443=resolve(_0x3982d6);const {root:_0x4e1bf1}=parse(_0x45a443),_0x220cf9=homedir();while(!![]){if(resolveConfigPath(_0x45a443)){if(_0x45a443===_0x220cf9)break;return _0x45a443;}if(_0x45a443===_0x4e1bf1||_0x45a443===_0x220cf9)break;const _0x551805=dirname(_0x45a443);if(_0x551805===_0x45a443)break;_0x45a443=_0x551805;}return resolve(_0x3982d6);}export async function createContext(_0x14b6a4){const _0xde751b=a139_0x1112df,_0x18b8c4=readRawConfig(),_0x270a40=buildConfig(_0x18b8c4,_0x14b6a4),{initEnv:_0x2ae376}=await import(_0xde751b(0x193));if(_0x270a40[_0xde751b(0x16f)])_0x2ae376(_0x270a40['env']);else _0x14b6a4[_0xde751b(0x16f)]&&typeof _0x14b6a4['env']===_0xde751b(0x16a)&&_0x2ae376(_0x14b6a4[_0xde751b(0x16f)]);const {initDomains:_0x557fc4,getUserDomain:_0x47a412,getApiDomain:_0x2e08e4}=await import(_0xde751b(0x1ba));_0x557fc4({'apiDomain':_0x18b8c4[_0xde751b(0x17f)]||undefined,'userDomain':_0x18b8c4[_0xde751b(0x1a2)]||undefined,'runtimeDomain':_0x18b8c4['runtimeDomain']||undefined});const _0x4ab8b1={'apiDomain':_0x2e08e4(),'userDomain':_0x47a412()},_0x98f2e2=await buildAuth(_0x270a40);logger[_0xde751b(0x198)](process['cwd']());const _0x241f62=(CLI_BIN_NAME+'\x20'+process[_0xde751b(0x19b)][_0xde751b(0x1a6)](0x2)['join']('\x20'))[_0xde751b(0x1a5)]();logger[_0xde751b(0x177)](_0x241f62);const {isNonInteractive:_0x3edbc0}=await import('./utils/is-non-interactive.js'),_0x49fbf5=_0x3edbc0(_0x14b6a4);return{'config':_0x270a40,'auth':_0x98f2e2,'logger':logger,'env':_0x4ab8b1,'nonInteractive':_0x49fbf5};}function a139_0x1d7b(){const _0x4dda05=['message','13395vdSLVv','6424523QWQuci','project','template_base_url','308196jAalRi','userDomain','warn','ENV','trim','slice','error','.lovrabetrc','9189xZSNNf','6YkBRyi','read','stringify','parse','ACCESS_KEY','get','91dUCXEg','https://g.lovrabet.com/dist/lovrabet-skill','riskLevel','cwd','RISK_LEVEL','accessKey','daily','apps','appcode','445585YHEBuP','./constant/domain.js','COOKIE','\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20','.tmp','MAX_RISK','pageSize','find','string','.lovrabet.json','keys','true','736LIscqH','env','locale','format','APP','status','utf8','empty','APPCODE','setRawCommand','entries','Global','cookie','map','VERBOSE','api.ts','set','apiDomain','app','silent','apiDir','inherit','config','Project','.rabetbase.json','720731lTQbTZ','length','filter','data','projectConfig','defaultApp','write','merged','70LNmwID','556ntSafQ','globalConfig','PAGE_SIZE','./constant/env.js','authRequired','\x0a\x20\x20','object','replace','setLogPath','16ssLVOK','19722QRsyCr','argv'];a139_0x1d7b=function(){return _0x4dda05;};return a139_0x1d7b();}export function buildConfigFromFlags(_0x76bf35){return buildConfig(readRawConfig(),_0x76bf35);}export function getProjectConfigPath(){const _0x5f58f9=a139_0x1112df;return resolveConfigPath(process[_0x5f58f9(0x1b3)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0x1a08f2){const _0x2bdbf7=a139_0x1112df;if(!existsSync(_0x1a08f2))return{'status':'missing'};try{const _0x44cd8c=readFileSync(_0x1a08f2,{'encoding':_0x2bdbf7(0x174)});if(!_0x44cd8c?.[_0x2bdbf7(0x1a5)]())return{'status':_0x2bdbf7(0x175)};const _0x18e278=JSON[_0x2bdbf7(0x1ad)](_0x44cd8c);return{'status':'ok','data':_0x18e278};}catch(_0x53380c){return{'status':_0x2bdbf7(0x1a7),'message':_0x53380c instanceof Error?_0x53380c[_0x2bdbf7(0x19c)]:String(_0x53380c)};}}function parseCliConfigJsonFile(_0xc361ff,_0xe7ce45,_0x2316d8){const _0x132b49=a139_0x1112df,_0xfd46f2=inspectCliConfigJsonFile(_0xc361ff);if(_0xfd46f2[_0x132b49(0x173)]==='missing'||_0xfd46f2[_0x132b49(0x173)]===_0x132b49(0x175))return{};if(_0xfd46f2[_0x132b49(0x173)]==='ok')return _0xfd46f2[_0x132b49(0x18a)];return _0xe7ce45===_0x132b49(0x1a3)&&_0x2316d8&&console[_0x132b49(0x1a7)](CLI_BIN_NAME+':\x20'+_0x2316d8+_0x132b49(0x1bc)+_0xc361ff+_0x132b49(0x195)+_0xfd46f2[_0x132b49(0x19c)]),{};}const normalizedWriteCache=new Map();function normalizeLegacyConfigShape(_0x48391f){const _0x289556=a139_0x1112df;if(!_0x48391f||typeof _0x48391f!==_0x289556(0x196))return{'config':{},'migrated':![]};const _0x5c0953={..._0x48391f},_0x1dee05=_0x5c0953[_0x289556(0x1b7)]&&typeof _0x5c0953['apps']===_0x289556(0x196)?{..._0x5c0953[_0x289556(0x1b7)]}:{},_0x30b19b=Object[_0x289556(0x16c)](_0x1dee05)[_0x289556(0x188)],_0x5f0769=_0x5c0953[_0x289556(0x1b8)]||_0x5c0953[_0x289556(0x180)];let _0x4968fb=![];if(_0x5f0769&&_0x30b19b===0x0){const _0x1f9998=typeof _0x5c0953[_0x289556(0x18c)]==='string'&&_0x5c0953[_0x289556(0x18c)][_0x289556(0x1a5)]()?_0x5c0953[_0x289556(0x18c)]:String(_0x5f0769)[_0x289556(0x1a5)]();_0x1dee05[_0x1f9998]={'appcode':String(_0x5f0769)['trim'](),..._0x5c0953[_0x289556(0x16f)]!=null?{'env':_0x5c0953[_0x289556(0x16f)]}:{},..._0x5c0953[_0x289556(0x182)]!=null?{'apiDir':_0x5c0953[_0x289556(0x182)]}:{},..._0x5c0953['cookie']!=null?{'cookie':_0x5c0953[_0x289556(0x17a)]}:{},..._0x5c0953[_0x289556(0x1b5)]!=null?{'accessKey':_0x5c0953[_0x289556(0x1b5)]}:{},..._0x5c0953[_0x289556(0x171)]!=null?{'format':_0x5c0953[_0x289556(0x171)]}:{},..._0x5c0953[_0x289556(0x1bf)]!=null?{'pageSize':_0x5c0953[_0x289556(0x1bf)]}:{},..._0x5c0953[_0x289556(0x1b2)]!=null?{'riskLevel':_0x5c0953[_0x289556(0x1b2)]}:{},..._0x5c0953[_0x289556(0x170)]!=null?{'locale':_0x5c0953[_0x289556(0x170)]}:{}},_0x5c0953[_0x289556(0x1b7)]=_0x1dee05;if(!_0x5c0953[_0x289556(0x18c)])_0x5c0953['defaultApp']=_0x1f9998;_0x4968fb=!![];}return(_0x289556(0x1b8)in _0x5c0953||_0x289556(0x180)in _0x5c0953)&&(delete _0x5c0953['appcode'],delete _0x5c0953[_0x289556(0x180)],_0x4968fb=!![]),{'config':_0x5c0953,'migrated':_0x4968fb};}function writeNormalizedConfigIfNeeded(_0x3b978d,_0x296237){const _0xb6529d=a139_0x1112df,_0x5a0e2c=JSON[_0xb6529d(0x1ac)](_0x296237,null,0x2)+'\x0a';if(normalizedWriteCache[_0xb6529d(0x1af)](_0x3b978d)===_0x5a0e2c)return;writeConfigFile(_0x3b978d,_0x296237),normalizedWriteCache[_0xb6529d(0x17e)](_0x3b978d,_0x5a0e2c);}function parseAndNormalizeConfig(_0x1bcea7,_0x382424,_0x10fd75){const _0x79ef75=a139_0x1112df,_0x26790a=parseCliConfigJsonFile(_0x1bcea7,_0x382424,_0x10fd75),_0x27b0af=normalizeLegacyConfigShape(_0x26790a);if(_0x27b0af['migrated'])try{writeNormalizedConfigIfNeeded(_0x1bcea7,_0x27b0af[_0x79ef75(0x184)]);}catch{}return _0x27b0af[_0x79ef75(0x184)];}export function loadRawConfigLayers(_0x8bff47){const _0x1ce0d6=a139_0x1112df;let _0x45ef6b={},_0x5d8a7b={};const _0x32f89d=resolveConfigPath(homedir());_0x32f89d&&(_0x45ef6b=parseAndNormalizeConfig(_0x32f89d,'warn',_0x1ce0d6(0x179)));const _0x15e032=_0x8bff47??findProjectRootDirectory(),_0x11767e=resolveConfigPath(_0x15e032);return _0x11767e&&(_0x5d8a7b=parseAndNormalizeConfig(_0x11767e,'warn',_0x1ce0d6(0x185))),{'globalPath':_0x32f89d,'projectPath':_0x11767e,'globalConfig':_0x45ef6b,'projectConfig':_0x5d8a7b};}const INHERIT_WHITELIST=['cookie',a139_0x1112df(0x1b5),a139_0x1112df(0x170),a139_0x1112df(0x171),a139_0x1112df(0x1b2),a139_0x1112df(0x1bf)];function mergeRawConfigLayers(_0x2cd3ef){const _0x4efb30=a139_0x1112df,{globalConfig:_0x9a1966,projectConfig:_0x304274}=_0x2cd3ef,_0x364e68=Object[_0x4efb30(0x16c)](_0x304274)[_0x4efb30(0x188)]>0x0;if(!_0x364e68)return mergeGlobalOnly(_0x9a1966);if(_0x304274[_0x4efb30(0x183)]===!![])return mergeFullInherit(_0x9a1966,_0x304274);if(_0x304274[_0x4efb30(0x183)]===![])return mergeIsolated(_0x304274);return mergeProjectFirst(_0x9a1966,_0x304274);}function mergeGlobalOnly(_0x1cee83){const _0x3997a6=a139_0x1112df,_0x49327a={..._0x1cee83},_0x3a60f1=_0x1cee83['apps']&&typeof _0x1cee83[_0x3997a6(0x1b7)]===_0x3997a6(0x196)?_0x1cee83[_0x3997a6(0x1b7)]:{};Object[_0x3997a6(0x16c)](_0x3a60f1)[_0x3997a6(0x188)]>0x0&&(_0x49327a[_0x3997a6(0x1b7)]=_0x3a60f1);if(_0x1cee83[_0x3997a6(0x18c)])_0x49327a[_0x3997a6(0x18c)]=_0x1cee83[_0x3997a6(0x18c)];else{const _0x261993=Object[_0x3997a6(0x16c)](_0x3a60f1);if(_0x261993['length']>0x0)_0x49327a[_0x3997a6(0x18c)]=_0x261993[0x0];}return _0x49327a;}function mergeIsolated(_0x3b76f5){const _0x499b2b=a139_0x1112df,_0x50d849={..._0x3b76f5};delete _0x50d849[_0x499b2b(0x183)];const _0x1ec91a=_0x3b76f5[_0x499b2b(0x1b7)]&&typeof _0x3b76f5['apps']==='object'?_0x3b76f5[_0x499b2b(0x1b7)]:{};Object[_0x499b2b(0x16c)](_0x1ec91a)['length']>0x0?_0x50d849['apps']=_0x1ec91a:delete _0x50d849[_0x499b2b(0x1b7)];if('defaultApp'in _0x3b76f5)_0x50d849['defaultApp']=_0x3b76f5[_0x499b2b(0x18c)];else Object[_0x499b2b(0x16c)](_0x1ec91a)[_0x499b2b(0x188)]>0x0?_0x50d849[_0x499b2b(0x18c)]=Object['keys'](_0x1ec91a)[0x0]:delete _0x50d849['defaultApp'];return _0x50d849;}function mergeProjectFirst(_0x2ade73,_0x316497){const _0x2002dd=a139_0x1112df,_0x1a077f={..._0x316497};delete _0x1a077f[_0x2002dd(0x183)];for(const _0x5d9433 of INHERIT_WHITELIST){!(_0x5d9433 in _0x1a077f)&&_0x5d9433 in _0x2ade73&&(_0x1a077f[_0x5d9433]=_0x2ade73[_0x5d9433]);}const _0x5ba919=_0x316497[_0x2002dd(0x1b7)]&&typeof _0x316497[_0x2002dd(0x1b7)]===_0x2002dd(0x196)?_0x316497[_0x2002dd(0x1b7)]:{};Object[_0x2002dd(0x16c)](_0x5ba919)[_0x2002dd(0x188)]>0x0?_0x1a077f[_0x2002dd(0x1b7)]=_0x5ba919:delete _0x1a077f[_0x2002dd(0x1b7)];if(_0x2002dd(0x18c)in _0x316497)_0x1a077f[_0x2002dd(0x18c)]=_0x316497[_0x2002dd(0x18c)];else Object[_0x2002dd(0x16c)](_0x5ba919)[_0x2002dd(0x188)]>0x0?_0x1a077f[_0x2002dd(0x18c)]=Object[_0x2002dd(0x16c)](_0x5ba919)[0x0]:delete _0x1a077f[_0x2002dd(0x18c)];return _0x1a077f;}function mergeFullInherit(_0x5caa6f,_0x5f4a08){const _0x1a2a06=a139_0x1112df,_0x340efb=_0x5caa6f['apps']&&typeof _0x5caa6f[_0x1a2a06(0x1b7)]===_0x1a2a06(0x196)?_0x5caa6f[_0x1a2a06(0x1b7)]:{},_0x31fd64=_0x5f4a08[_0x1a2a06(0x1b7)]&&typeof _0x5f4a08['apps']===_0x1a2a06(0x196)?_0x5f4a08['apps']:{},_0x2ffa33={..._0x340efb,..._0x31fd64},_0xc39c2d={..._0x5caa6f,..._0x5f4a08};delete _0xc39c2d[_0x1a2a06(0x183)];Object[_0x1a2a06(0x16c)](_0x2ffa33)[_0x1a2a06(0x188)]>0x0&&(_0xc39c2d[_0x1a2a06(0x1b7)]=_0x2ffa33);if(_0x1a2a06(0x18c)in _0x5f4a08)_0xc39c2d[_0x1a2a06(0x18c)]=_0x5f4a08[_0x1a2a06(0x18c)];else{if(Object[_0x1a2a06(0x16c)](_0x31fd64)[_0x1a2a06(0x188)]>0x0)_0xc39c2d[_0x1a2a06(0x18c)]=Object['keys'](_0x31fd64)[0x0];else{if(_0x5caa6f['defaultApp'])_0xc39c2d[_0x1a2a06(0x18c)]=_0x5caa6f[_0x1a2a06(0x18c)];else{const _0x17fecb=Object[_0x1a2a06(0x16c)](_0x340efb);if(_0x17fecb[_0x1a2a06(0x188)]>0x0)_0xc39c2d[_0x1a2a06(0x18c)]=_0x17fecb[0x0];}}}return _0xc39c2d;}export function readRawConfigWithLayers(_0xd682d){const _0x29d870=loadRawConfigLayers(_0xd682d);return{'config':mergeRawConfigLayers(_0x29d870),'layers':_0x29d870};}export function readRawConfig(_0x397623){return mergeRawConfigLayers(loadRawConfigLayers(_0x397623));}export function getConfigAppCode(_0x1f9701){const _0x212924=a139_0x1112df,_0x16e039=readRawConfig(_0x1f9701);if(_0x16e039[_0x212924(0x1b7)]&&typeof _0x16e039[_0x212924(0x1b7)]===_0x212924(0x196)){const _0x2bdb28=_0x16e039[_0x212924(0x18c)];if(_0x2bdb28&&_0x16e039[_0x212924(0x1b7)][_0x2bdb28]?.[_0x212924(0x1b8)])return String(_0x16e039[_0x212924(0x1b7)][_0x2bdb28][_0x212924(0x1b8)])[_0x212924(0x1a5)]();const _0x2ae071=Object['values'](_0x16e039[_0x212924(0x1b7)])[0x0];if(_0x2ae071?.[_0x212924(0x1b8)])return String(_0x2ae071[_0x212924(0x1b8)])['trim']();}const _0xb6220a=_0x16e039['appcode']||_0x16e039['app'];if(typeof _0xb6220a!==_0x212924(0x16a)||_0xb6220a['trim']()==='')return undefined;return _0xb6220a[_0x212924(0x1a5)]();}export function getMultiAppConfigs(_0x4934f2=a139_0x1112df(0x19f),_0x47dd8e){const _0x1d3e07=a139_0x1112df,_0x540e1c=loadRawConfigLayers(_0x47dd8e);let _0x73d26c,_0x2ffe88;if(_0x4934f2===_0x1d3e07(0x18e)){const _0x288d3d=_0x540e1c[_0x1d3e07(0x191)][_0x1d3e07(0x1b7)]&&typeof _0x540e1c[_0x1d3e07(0x191)][_0x1d3e07(0x1b7)]===_0x1d3e07(0x196)?_0x540e1c['globalConfig']['apps']:{},_0xa8a13b=_0x540e1c[_0x1d3e07(0x18b)][_0x1d3e07(0x1b7)]&&typeof _0x540e1c['projectConfig'][_0x1d3e07(0x1b7)]===_0x1d3e07(0x196)?_0x540e1c['projectConfig'][_0x1d3e07(0x1b7)]:{};_0x73d26c={..._0x288d3d,..._0xa8a13b};const _0x1aec4d=readRawConfig(_0x47dd8e);_0x2ffe88=_0x1aec4d['defaultApp'];}else _0x73d26c=_0x540e1c[_0x1d3e07(0x18b)][_0x1d3e07(0x1b7)],_0x2ffe88=_0x540e1c[_0x1d3e07(0x18b)]['defaultApp'];if(!_0x73d26c||typeof _0x73d26c!=='object'||Object[_0x1d3e07(0x16c)](_0x73d26c)[_0x1d3e07(0x188)]===0x0)return null;return Object[_0x1d3e07(0x178)](_0x73d26c)[_0x1d3e07(0x17b)](([_0x40b97b,_0x300f26])=>({'name':_0x40b97b,'appcode':_0x300f26?.[_0x1d3e07(0x1b8)]||'','isDefault':_0x40b97b===_0x2ffe88,'env':_0x300f26?.[_0x1d3e07(0x16f)],'apiDir':_0x300f26?.[_0x1d3e07(0x182)],'cookie':_0x300f26?.[_0x1d3e07(0x17a)]||undefined}))[_0x1d3e07(0x189)](_0x10a2b1=>_0x10a2b1['appcode']);}export function getTemplateBaseUrl(_0x4fef89){const _0x4bbb1b=a139_0x1112df,_0x417b4c=readRawConfig(_0x4fef89);if(_0x417b4c[_0x4bbb1b(0x1a0)]&&typeof _0x417b4c[_0x4bbb1b(0x1a0)]===_0x4bbb1b(0x16a))return _0x417b4c[_0x4bbb1b(0x1a0)][_0x4bbb1b(0x197)](/\/$/,'');return _0x4bbb1b(0x1b1);}export function readConfigFile(_0x13d664){const _0x163955=a139_0x1112df;return parseAndNormalizeConfig(_0x13d664,_0x163955(0x181));}export function writeConfigFile(_0x4cedf3,_0xa1a665){const _0x372b1b=a139_0x1112df,_0x27fb49=dirname(_0x4cedf3);!existsSync(_0x27fb49)&&mkdirSync(_0x27fb49,{'recursive':!![]});const _0x139efb=_0x4cedf3+_0x372b1b(0x1bd);try{writeFileSync(_0x139efb,JSON[_0x372b1b(0x1ac)](_0xa1a665,null,0x2)+'\x0a',{'encoding':_0x372b1b(0x174),'mode':0x180}),renameSync(_0x139efb,_0x4cedf3);}catch(_0x5aa51d){try{unlinkSync(_0x139efb);}catch{}throw _0x5aa51d;}}export function resolveWriteConfigPath(_0x1413e3){const _0x57740f=a139_0x1112df,_0x1fa039=_0x1413e3===_0x57740f(0x19f)?process[_0x57740f(0x1b3)]():homedir(),_0x54bce7=resolveConfigPath(_0x1fa039);return _0x54bce7??resolve(_0x1fa039,NEW_CONFIG_NAME);}function buildConfig(_0x5ebcb6,_0x3266d8){const _0x275349=a139_0x1112df,_0xccc50f={};if(_0x5ebcb6[_0x275349(0x1b7)]&&typeof _0x5ebcb6[_0x275349(0x1b7)]==='object')for(const [_0x2e2112,_0x451842]of Object[_0x275349(0x178)](_0x5ebcb6[_0x275349(0x1b7)])){_0x451842&&typeof _0x451842===_0x275349(0x196)&&_0x451842[_0x275349(0x1b8)]&&(_0xccc50f[_0x2e2112]=_0x451842);}const _0x7e53ec=_0x5ebcb6['defaultApp']||undefined,_0x4216d9=Object[_0x275349(0x16c)](_0xccc50f)[_0x275349(0x188)]>0x0,_0x3a9826=_0x3266d8[_0x275349(0x180)]||env(_0x275349(0x172))||undefined,_0x1bca86=_0x3a9826||_0x7e53ec||undefined,_0x26cf45=_0x3266d8['appcode']||env(_0x275349(0x176))||undefined,_0x292975=_0x26cf45?Object[_0x275349(0x178)](_0xccc50f)[_0x275349(0x1c0)](([,_0x13df83])=>_0x13df83?.[_0x275349(0x1b8)]===_0x26cf45):undefined,_0x4029cd=_0x292975?.[0x0],_0x37cbd5=_0x292975?.[0x1];let _0xa19dd8=_0x26cf45?_0x4029cd:_0x1bca86,_0x1abe9d=_0xa19dd8&&_0xccc50f[_0xa19dd8]?_0xccc50f[_0xa19dd8]:undefined;_0x26cf45&&_0x37cbd5&&(_0x1abe9d=_0x37cbd5);const _0x2a1485=_0x26cf45?_0x37cbd5??_0x1abe9d:_0x1abe9d,_0x524d81=_0x3a9826||(_0x26cf45?_0x4029cd:undefined),_0x308f4d=_0x26cf45||_0x2a1485?.['appcode']||undefined,_0x185275=_0x3266d8[_0x275349(0x16f)]||env(_0x275349(0x1a4))||_0x2a1485?.[_0x275349(0x16f)]||_0x5ebcb6['env']||DEFAULT_CONFIG_VALUES[_0x275349(0x16f)],_0xc8c69c=_0x2a1485?.[_0x275349(0x170)]||_0x5ebcb6[_0x275349(0x170)]||DEFAULT_CONFIG_VALUES[_0x275349(0x170)],_0xf9895a=env(_0x275349(0x1bb))||_0x2a1485?.[_0x275349(0x17a)]||_0x5ebcb6[_0x275349(0x17a)]||undefined,_0x375ce7=env(_0x275349(0x1ae))||_0x2a1485?.[_0x275349(0x1b5)]||_0x5ebcb6[_0x275349(0x1b5)]||undefined,_0x3fc0df=_0x3266d8[_0x275349(0x171)]||env('FORMAT')||_0x2a1485?.[_0x275349(0x171)]||_0x5ebcb6[_0x275349(0x171)],_0x2c3ed5=normalizeLegacyOutputFormat(_0x3fc0df),_0x2c71c0=env(_0x275349(0x192))||_0x2a1485?.[_0x275349(0x1bf)]||_0x5ebcb6[_0x275349(0x1bf)],_0x252f17=_0x2c71c0?Number(_0x2c71c0)||undefined:undefined,_0x2f84a4=env(_0x275349(0x1b4))||env(_0x275349(0x1be))||_0x2a1485?.[_0x275349(0x1b2)]||_0x5ebcb6['riskLevel']||_0x5ebcb6['maxRisk'],_0x144128=_0x2f84a4===_0x275349(0x1ab)||_0x2f84a4===_0x275349(0x18d)?_0x2f84a4:DEFAULT_CONFIG_VALUES['riskLevel'],_0x442dd2=env(_0x275349(0x17c)),_0x4f9421=_0x442dd2==='1'||_0x442dd2===_0x275349(0x16d),_0x3c8fde=_0x2a1485?.['apiDir']||_0x5ebcb6[_0x275349(0x182)]||DEFAULT_CONFIG_VALUES[_0x275349(0x182)],_0xe7c250=isDaily(normalizeEnv(String(_0x185275)))?_0x275349(0x1b6):'production';return{'appCode':typeof _0x308f4d==='string'&&_0x308f4d[_0x275349(0x1a5)]()?_0x308f4d[_0x275349(0x1a5)]():undefined,'env':_0xe7c250,'locale':_0xc8c69c,'cookie':_0xf9895a,'accessKey':_0x375ce7,'format':_0x2c3ed5,'pageSize':_0x252f17,'riskLevel':_0x144128,'verbose':_0x4f9421,'apiDir':_0x3c8fde,'apps':_0xccc50f,'defaultApp':_0x7e53ec,'currentApp':_0x4216d9?_0xa19dd8:undefined,'explicitAppName':_0x524d81,'raw':_0x5ebcb6};}async function buildAuth(_0x289ab4){const {getCookie:_0x14915f}=await import('./auth/get-cookie.js'),_0x7b841c=_0x289ab4['cookie']||_0x14915f(),_0x4fb93a=_0x7b841c?await getIsSessionValid():![];return{'cookie':_0x7b841c,'isLoggedIn':_0x4fb93a,async 'getOrLogin'(){const _0x3efb61=a139_0x994f;if(_0x7b841c&&_0x4fb93a)return _0x7b841c;throw CliErrors[_0x3efb61(0x194)]();}};}export function resolveApiFilePath(_0x37b590,_0x1c062a){const _0x35c81a=a139_0x1112df,_0x3c04ef=resolve(process[_0x35c81a(0x1b3)](),_0x37b590),_0x5a55d0=resolve(_0x3c04ef,_0x35c81a(0x17d));if(!_0x1c062a)return _0x5a55d0;const _0x59c973=readRawConfig(),_0x2d3a26=_0x59c973[_0x35c81a(0x1b7)]&&typeof _0x59c973[_0x35c81a(0x1b7)]==='object'?_0x59c973['apps']:{},_0xfb5113=Object[_0x35c81a(0x178)](_0x2d3a26)['find'](([,_0x6e0291])=>_0x6e0291?.[_0x35c81a(0x1b8)]===_0x1c062a);if(!_0xfb5113)return _0x5a55d0;const [_0x11fbe4,_0x3107e4]=_0xfb5113,_0x1062ea=typeof _0x59c973[_0x35c81a(0x18c)]===_0x35c81a(0x16a)?_0x59c973[_0x35c81a(0x18c)]:undefined;if(_0x3107e4?.['apiDir'])return _0x5a55d0;if(_0x1062ea&&_0x11fbe4!==_0x1062ea)return resolve(_0x3c04ef,_0x11fbe4+'-api.ts');return _0x5a55d0;}
1
+ const a139_0x3962f6=a139_0x56e0;(function(_0x534867,_0x1066e8){const _0x37b74f=a139_0x56e0,_0x410906=_0x534867();while(!![]){try{const _0x22c69b=-parseInt(_0x37b74f(0x1a3))/0x1+-parseInt(_0x37b74f(0x19e))/0x2*(-parseInt(_0x37b74f(0x1a9))/0x3)+parseInt(_0x37b74f(0x1bd))/0x4*(-parseInt(_0x37b74f(0x18d))/0x5)+-parseInt(_0x37b74f(0x18a))/0x6*(-parseInt(_0x37b74f(0x1b0))/0x7)+-parseInt(_0x37b74f(0x1b4))/0x8*(parseInt(_0x37b74f(0x1b3))/0x9)+-parseInt(_0x37b74f(0x18c))/0xa*(parseInt(_0x37b74f(0x1af))/0xb)+parseInt(_0x37b74f(0x18b))/0xc*(parseInt(_0x37b74f(0x1c0))/0xd);if(_0x22c69b===_0x1066e8)break;else _0x410906['push'](_0x410906['shift']());}catch(_0x49aa33){_0x410906['push'](_0x410906['shift']());}}}(a139_0x364e,0x89895));import{readFileSync,writeFileSync,existsSync,mkdirSync,renameSync,unlinkSync}from'node:fs';import{resolve,dirname,parse}from'node:path';import{homedir}from'node:os';import{logger}from'./utils/logger.js';import{getIsSessionValid}from'./auth/is-session-valid.js';import{CliErrors}from'./errors.js';import{CLI_BIN_NAME}from'./constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'./constant/defaults.js';import{normalizeEnv,isDaily}from'./constant/env.js';function a139_0x56e0(_0x1b0a6b,_0x121adf){_0x1b0a6b=_0x1b0a6b-0x176;const _0x364ede=a139_0x364e();let _0x56e05e=_0x364ede[_0x1b0a6b];return _0x56e05e;}import{normalizeLegacyOutputFormat}from'./framework/types.js';function env(_0x547c1d){return process.env[`RABETBASE_${_0x547c1d}`]||process.env[`LOVRABET_${_0x547c1d}`]||undefined;}export const NEW_CONFIG_NAME='.rabetbase.json';export const CONFIG_NAMES=['.rabetbase.json',a139_0x3962f6(0x184),a139_0x3962f6(0x17a)];export const LEGACY_CONFIG_NAMES=CONFIG_NAMES['filter'](_0x12f34c=>_0x12f34c!==NEW_CONFIG_NAME);export function resolveConfigPath(_0x334ed3){for(const _0x485334 of CONFIG_NAMES){const _0x3a050b=resolve(_0x334ed3,_0x485334);if(existsSync(_0x3a050b))return _0x3a050b;}return undefined;}export function findProjectRootDirectory(_0x2d21a9=process[a139_0x3962f6(0x17f)]()){let _0x4eccd3=resolve(_0x2d21a9);const {root:_0x456f8b}=parse(_0x4eccd3),_0x5f5c97=homedir();while(!![]){if(resolveConfigPath(_0x4eccd3)){if(_0x4eccd3===_0x5f5c97)break;return _0x4eccd3;}if(_0x4eccd3===_0x456f8b||_0x4eccd3===_0x5f5c97)break;const _0x29c559=dirname(_0x4eccd3);if(_0x29c559===_0x4eccd3)break;_0x4eccd3=_0x29c559;}return resolve(_0x2d21a9);}export async function createContext(_0xac1e16){const _0xe200cd=a139_0x3962f6,_0xed31a9=readRawConfig(),_0x397a3c=buildConfig(_0xed31a9,_0xac1e16),{initEnv:_0x18360f}=await import(_0xe200cd(0x1b6));if(_0x397a3c[_0xe200cd(0x1a1)])_0x18360f(_0x397a3c[_0xe200cd(0x1a1)]);else _0xac1e16['env']&&typeof _0xac1e16[_0xe200cd(0x1a1)]===_0xe200cd(0x177)&&_0x18360f(_0xac1e16[_0xe200cd(0x1a1)]);const {initDomains:_0x4a56ea,getUserDomain:_0x3086f3,getApiDomain:_0x8782d3}=await import(_0xe200cd(0x178));_0x4a56ea({'apiDomain':_0xed31a9[_0xe200cd(0x198)]||undefined,'userDomain':_0xed31a9['userDomain']||undefined,'runtimeDomain':_0xed31a9[_0xe200cd(0x188)]||undefined});const _0x5a8a5e={'apiDomain':_0x8782d3(),'userDomain':_0x3086f3()},_0x4d2a61=await buildAuth(_0x397a3c);logger[_0xe200cd(0x1bc)](process[_0xe200cd(0x17f)]());const _0x17607a=(CLI_BIN_NAME+'\x20'+process[_0xe200cd(0x183)][_0xe200cd(0x195)](0x2)['join']('\x20'))[_0xe200cd(0x19b)]();logger['setRawCommand'](_0x17607a);const {isNonInteractive:_0x4d49d7}=await import('./utils/is-non-interactive.js'),_0x45d293=_0x4d49d7(_0xac1e16);return{'config':_0x397a3c,'auth':_0x4d2a61,'logger':logger,'env':_0x5a8a5e,'nonInteractive':_0x45d293};}export function buildConfigFromFlags(_0x570ab1){return buildConfig(readRawConfig(),_0x570ab1);}export function getProjectConfigPath(){const _0x3c2853=a139_0x3962f6;return resolveConfigPath(process[_0x3c2853(0x17f)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0x31cbf1){const _0x1a959b=a139_0x3962f6;if(!existsSync(_0x31cbf1))return{'status':_0x1a959b(0x180)};try{const _0x3391c5=readFileSync(_0x31cbf1,{'encoding':'utf8'});if(!_0x3391c5?.[_0x1a959b(0x19b)]())return{'status':_0x1a959b(0x1ae)};const _0x369fe2=JSON[_0x1a959b(0x182)](_0x3391c5);return{'status':'ok','data':_0x369fe2};}catch(_0x53f152){return{'status':_0x1a959b(0x19c),'message':_0x53f152 instanceof Error?_0x53f152[_0x1a959b(0x1aa)]:String(_0x53f152)};}}function parseCliConfigJsonFile(_0x1ed29d,_0x677439,_0x5958c5){const _0x551c9c=a139_0x3962f6,_0x2be480=inspectCliConfigJsonFile(_0x1ed29d);if(_0x2be480[_0x551c9c(0x192)]===_0x551c9c(0x180)||_0x2be480['status']===_0x551c9c(0x1ae))return{};if(_0x2be480[_0x551c9c(0x192)]==='ok')return _0x2be480['data'];return _0x677439===_0x551c9c(0x1a4)&&_0x5958c5&&console[_0x551c9c(0x19c)](CLI_BIN_NAME+':\x20'+_0x5958c5+_0x551c9c(0x185)+_0x1ed29d+_0x551c9c(0x18e)+_0x2be480[_0x551c9c(0x1aa)]),{};}const normalizedWriteCache=new Map();function normalizeLegacyConfigShape(_0x48656b){const _0x2f1b8a=a139_0x3962f6;if(!_0x48656b||typeof _0x48656b!==_0x2f1b8a(0x1a6))return{'config':{},'migrated':![]};const _0x9c8ab3={..._0x48656b},_0x1becb=_0x9c8ab3[_0x2f1b8a(0x193)]&&typeof _0x9c8ab3['apps']===_0x2f1b8a(0x1a6)?{..._0x9c8ab3[_0x2f1b8a(0x193)]}:{},_0x1eb7ff=Object[_0x2f1b8a(0x1ad)](_0x1becb)[_0x2f1b8a(0x1c2)],_0xf0d752=_0x9c8ab3['appcode']||_0x9c8ab3['app'];let _0x382f7e=![];if(_0xf0d752&&_0x1eb7ff===0x0){const _0x19530c=typeof _0x9c8ab3[_0x2f1b8a(0x1b5)]===_0x2f1b8a(0x177)&&_0x9c8ab3['defaultApp'][_0x2f1b8a(0x19b)]()?_0x9c8ab3[_0x2f1b8a(0x1b5)]:String(_0xf0d752)['trim']();_0x1becb[_0x19530c]={'appcode':String(_0xf0d752)[_0x2f1b8a(0x19b)](),..._0x9c8ab3[_0x2f1b8a(0x1a1)]!=null?{'env':_0x9c8ab3[_0x2f1b8a(0x1a1)]}:{},..._0x9c8ab3[_0x2f1b8a(0x194)]!=null?{'apiDir':_0x9c8ab3[_0x2f1b8a(0x194)]}:{},..._0x9c8ab3[_0x2f1b8a(0x1b1)]!=null?{'cookie':_0x9c8ab3[_0x2f1b8a(0x1b1)]}:{},..._0x9c8ab3['accessKey']!=null?{'accessKey':_0x9c8ab3[_0x2f1b8a(0x17c)]}:{},..._0x9c8ab3['format']!=null?{'format':_0x9c8ab3[_0x2f1b8a(0x187)]}:{},..._0x9c8ab3[_0x2f1b8a(0x1c7)]!=null?{'pageSize':_0x9c8ab3[_0x2f1b8a(0x1c7)]}:{},..._0x9c8ab3[_0x2f1b8a(0x19f)]!=null?{'riskLevel':_0x9c8ab3[_0x2f1b8a(0x19f)]}:{},..._0x9c8ab3['locale']!=null?{'locale':_0x9c8ab3[_0x2f1b8a(0x1ba)]}:{}},_0x9c8ab3['apps']=_0x1becb;if(!_0x9c8ab3[_0x2f1b8a(0x1b5)])_0x9c8ab3[_0x2f1b8a(0x1b5)]=_0x19530c;_0x382f7e=!![];}return(_0x2f1b8a(0x1c4)in _0x9c8ab3||_0x2f1b8a(0x189)in _0x9c8ab3)&&(delete _0x9c8ab3['appcode'],delete _0x9c8ab3['app'],_0x382f7e=!![]),{'config':_0x9c8ab3,'migrated':_0x382f7e};}function writeNormalizedConfigIfNeeded(_0x21135f,_0xccc3ab){const _0x4901c0=a139_0x3962f6,_0x4f790b=JSON['stringify'](_0xccc3ab,null,0x2)+'\x0a';if(normalizedWriteCache[_0x4901c0(0x1c1)](_0x21135f)===_0x4f790b)return;writeConfigFile(_0x21135f,_0xccc3ab),normalizedWriteCache[_0x4901c0(0x196)](_0x21135f,_0x4f790b);}function parseAndNormalizeConfig(_0x13dba1,_0x48edfd,_0x12ac94){const _0x2c304b=a139_0x3962f6,_0x22e503=parseCliConfigJsonFile(_0x13dba1,_0x48edfd,_0x12ac94),_0x461f8a=normalizeLegacyConfigShape(_0x22e503);if(_0x461f8a[_0x2c304b(0x1b7)])try{writeNormalizedConfigIfNeeded(_0x13dba1,_0x461f8a[_0x2c304b(0x1c3)]);}catch{}return _0x461f8a['config'];}export function loadRawConfigLayers(_0x19e718){const _0x56c72c=a139_0x3962f6;let _0x16f749={},_0x1d9a74={};const _0x8a5b20=resolveConfigPath(homedir());_0x8a5b20&&(_0x16f749=parseAndNormalizeConfig(_0x8a5b20,_0x56c72c(0x1a4),_0x56c72c(0x191)));const _0x358344=_0x19e718??findProjectRootDirectory(),_0x595812=resolveConfigPath(_0x358344);return _0x595812&&(_0x1d9a74=parseAndNormalizeConfig(_0x595812,_0x56c72c(0x1a4),_0x56c72c(0x1be))),{'globalPath':_0x8a5b20,'projectPath':_0x595812,'globalConfig':_0x16f749,'projectConfig':_0x1d9a74};}const INHERIT_WHITELIST=[a139_0x3962f6(0x1b1),'accessKey',a139_0x3962f6(0x1ba),a139_0x3962f6(0x187),a139_0x3962f6(0x19f),a139_0x3962f6(0x1c7)];function mergeRawConfigLayers(_0x41df00){const _0x5bc914=a139_0x3962f6,{globalConfig:_0x27f9be,projectConfig:_0x4cda6c}=_0x41df00,_0x3acb4e=Object['keys'](_0x4cda6c)[_0x5bc914(0x1c2)]>0x0;if(!_0x3acb4e)return mergeGlobalOnly(_0x27f9be);if(_0x4cda6c[_0x5bc914(0x1b8)]===!![])return mergeFullInherit(_0x27f9be,_0x4cda6c);if(_0x4cda6c[_0x5bc914(0x1b8)]===![])return mergeIsolated(_0x4cda6c);return mergeProjectFirst(_0x27f9be,_0x4cda6c);}function mergeGlobalOnly(_0x20b982){const _0x6b997f=a139_0x3962f6,_0x26bdd2={..._0x20b982},_0x18fc1f=_0x20b982['apps']&&typeof _0x20b982[_0x6b997f(0x193)]==='object'?_0x20b982[_0x6b997f(0x193)]:{};Object[_0x6b997f(0x1ad)](_0x18fc1f)[_0x6b997f(0x1c2)]>0x0&&(_0x26bdd2['apps']=_0x18fc1f);if(_0x20b982[_0x6b997f(0x1b5)])_0x26bdd2[_0x6b997f(0x1b5)]=_0x20b982[_0x6b997f(0x1b5)];else{const _0x1dd728=Object[_0x6b997f(0x1ad)](_0x18fc1f);if(_0x1dd728[_0x6b997f(0x1c2)]>0x0)_0x26bdd2[_0x6b997f(0x1b5)]=_0x1dd728[0x0];}return _0x26bdd2;}function a139_0x364e(){const _0x30b6e2=['missing','RISK_LEVEL','parse','argv','.lovrabet.json','\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20','ENV','format','runtimeDomain','app','1074XJQTOw','48BsWOTO','6280iuyxqs','20JBLKvI','\x0a\x20\x20','template_base_url','FORMAT','Global','status','apps','apiDir','slice','set','project','apiDomain','replace','.tmp','trim','error','true','4jHyZMY','riskLevel','APP','env','entries','404012IWTtGv','warn','read','object','daily','write','9672NygDau','message','globalConfig','stringify','keys','empty','14729kdECPD','39683fjzTTj','cookie','PAGE_SIZE','54APtkaG','1238616rSMrVS','defaultApp','./constant/env.js','migrated','inherit','./auth/get-cookie.js','locale','projectConfig','setLogPath','192932AtnpiP','Project','find','6204081IKJSvi','get','length','config','appcode','MAX_RISK','values','pageSize','map','authRequired','string','./constant/domain.js','APPCODE','.lovrabetrc','https://g.lovrabet.com/dist/lovrabet-skill','accessKey','filter','VERBOSE','cwd'];a139_0x364e=function(){return _0x30b6e2;};return a139_0x364e();}function mergeIsolated(_0x29322c){const _0x3919ee=a139_0x3962f6,_0x5cb758={..._0x29322c};delete _0x5cb758[_0x3919ee(0x1b8)];const _0x2e9fd0=_0x29322c['apps']&&typeof _0x29322c[_0x3919ee(0x193)]===_0x3919ee(0x1a6)?_0x29322c[_0x3919ee(0x193)]:{};Object[_0x3919ee(0x1ad)](_0x2e9fd0)[_0x3919ee(0x1c2)]>0x0?_0x5cb758[_0x3919ee(0x193)]=_0x2e9fd0:delete _0x5cb758[_0x3919ee(0x193)];if(_0x3919ee(0x1b5)in _0x29322c)_0x5cb758['defaultApp']=_0x29322c[_0x3919ee(0x1b5)];else Object[_0x3919ee(0x1ad)](_0x2e9fd0)['length']>0x0?_0x5cb758['defaultApp']=Object[_0x3919ee(0x1ad)](_0x2e9fd0)[0x0]:delete _0x5cb758['defaultApp'];return _0x5cb758;}function mergeProjectFirst(_0x599638,_0x4ce240){const _0x522191=a139_0x3962f6,_0x5596e1={..._0x4ce240};delete _0x5596e1[_0x522191(0x1b8)];for(const _0x2336a5 of INHERIT_WHITELIST){!(_0x2336a5 in _0x5596e1)&&_0x2336a5 in _0x599638&&(_0x5596e1[_0x2336a5]=_0x599638[_0x2336a5]);}const _0x2ca05d=_0x4ce240['apps']&&typeof _0x4ce240[_0x522191(0x193)]===_0x522191(0x1a6)?_0x4ce240[_0x522191(0x193)]:{};Object['keys'](_0x2ca05d)[_0x522191(0x1c2)]>0x0?_0x5596e1[_0x522191(0x193)]=_0x2ca05d:delete _0x5596e1[_0x522191(0x193)];if(_0x522191(0x1b5)in _0x4ce240)_0x5596e1[_0x522191(0x1b5)]=_0x4ce240[_0x522191(0x1b5)];else Object[_0x522191(0x1ad)](_0x2ca05d)[_0x522191(0x1c2)]>0x0?_0x5596e1[_0x522191(0x1b5)]=Object['keys'](_0x2ca05d)[0x0]:delete _0x5596e1[_0x522191(0x1b5)];return _0x5596e1;}function mergeFullInherit(_0x5ba523,_0x286278){const _0x4d023c=a139_0x3962f6,_0x466cae=_0x5ba523[_0x4d023c(0x193)]&&typeof _0x5ba523[_0x4d023c(0x193)]==='object'?_0x5ba523[_0x4d023c(0x193)]:{},_0x500f7f=_0x286278[_0x4d023c(0x193)]&&typeof _0x286278[_0x4d023c(0x193)]===_0x4d023c(0x1a6)?_0x286278[_0x4d023c(0x193)]:{},_0x492255={..._0x466cae,..._0x500f7f},_0x3c6efc={..._0x5ba523,..._0x286278};delete _0x3c6efc['inherit'];Object[_0x4d023c(0x1ad)](_0x492255)[_0x4d023c(0x1c2)]>0x0&&(_0x3c6efc[_0x4d023c(0x193)]=_0x492255);if(_0x4d023c(0x1b5)in _0x286278)_0x3c6efc[_0x4d023c(0x1b5)]=_0x286278[_0x4d023c(0x1b5)];else{if(Object[_0x4d023c(0x1ad)](_0x500f7f)['length']>0x0)_0x3c6efc[_0x4d023c(0x1b5)]=Object[_0x4d023c(0x1ad)](_0x500f7f)[0x0];else{if(_0x5ba523[_0x4d023c(0x1b5)])_0x3c6efc['defaultApp']=_0x5ba523['defaultApp'];else{const _0x354818=Object['keys'](_0x466cae);if(_0x354818[_0x4d023c(0x1c2)]>0x0)_0x3c6efc[_0x4d023c(0x1b5)]=_0x354818[0x0];}}}return _0x3c6efc;}export function readRawConfigWithLayers(_0xec1ae1){const _0x52ead1=loadRawConfigLayers(_0xec1ae1);return{'config':mergeRawConfigLayers(_0x52ead1),'layers':_0x52ead1};}export function readRawConfig(_0x12165e){return mergeRawConfigLayers(loadRawConfigLayers(_0x12165e));}export function getConfigAppCode(_0x4e737c){const _0x131dff=a139_0x3962f6,_0x1270b8=readRawConfig(_0x4e737c);if(_0x1270b8[_0x131dff(0x193)]&&typeof _0x1270b8[_0x131dff(0x193)]===_0x131dff(0x1a6)){const _0x1f8fdf=_0x1270b8['defaultApp'];if(_0x1f8fdf&&_0x1270b8[_0x131dff(0x193)][_0x1f8fdf]?.[_0x131dff(0x1c4)])return String(_0x1270b8[_0x131dff(0x193)][_0x1f8fdf][_0x131dff(0x1c4)])[_0x131dff(0x19b)]();const _0x1a5d43=Object[_0x131dff(0x1c6)](_0x1270b8['apps'])[0x0];if(_0x1a5d43?.['appcode'])return String(_0x1a5d43[_0x131dff(0x1c4)])['trim']();}const _0x2c7dff=_0x1270b8['appcode']||_0x1270b8[_0x131dff(0x189)];if(typeof _0x2c7dff!==_0x131dff(0x177)||_0x2c7dff['trim']()==='')return undefined;return _0x2c7dff[_0x131dff(0x19b)]();}export function getMultiAppConfigs(_0x47ea5c=a139_0x3962f6(0x197),_0x4f1fb3){const _0xdcbe54=a139_0x3962f6,_0x577097=loadRawConfigLayers(_0x4f1fb3);let _0xff4e1a,_0x51a951;if(_0x47ea5c==='merged'){const _0x54f87a=_0x577097[_0xdcbe54(0x1ab)][_0xdcbe54(0x193)]&&typeof _0x577097[_0xdcbe54(0x1ab)][_0xdcbe54(0x193)]===_0xdcbe54(0x1a6)?_0x577097[_0xdcbe54(0x1ab)][_0xdcbe54(0x193)]:{},_0x2cd578=_0x577097[_0xdcbe54(0x1bb)][_0xdcbe54(0x193)]&&typeof _0x577097[_0xdcbe54(0x1bb)]['apps']==='object'?_0x577097[_0xdcbe54(0x1bb)][_0xdcbe54(0x193)]:{};_0xff4e1a={..._0x54f87a,..._0x2cd578};const _0x179a62=readRawConfig(_0x4f1fb3);_0x51a951=_0x179a62[_0xdcbe54(0x1b5)];}else _0xff4e1a=_0x577097['projectConfig'][_0xdcbe54(0x193)],_0x51a951=_0x577097[_0xdcbe54(0x1bb)]['defaultApp'];if(!_0xff4e1a||typeof _0xff4e1a!=='object'||Object['keys'](_0xff4e1a)[_0xdcbe54(0x1c2)]===0x0)return null;return Object[_0xdcbe54(0x1a2)](_0xff4e1a)[_0xdcbe54(0x1c8)](([_0x976ea9,_0xf08cb2])=>({'name':_0x976ea9,'appcode':_0xf08cb2?.[_0xdcbe54(0x1c4)]||'','isDefault':_0x976ea9===_0x51a951,'env':_0xf08cb2?.['env'],'apiDir':_0xf08cb2?.[_0xdcbe54(0x194)],'cookie':_0xf08cb2?.[_0xdcbe54(0x1b1)]||undefined}))[_0xdcbe54(0x17d)](_0xa999ab=>_0xa999ab[_0xdcbe54(0x1c4)]);}export function getTemplateBaseUrl(_0x8f09f4){const _0xddbf05=a139_0x3962f6,_0x28cc0f=readRawConfig(_0x8f09f4);if(_0x28cc0f[_0xddbf05(0x18f)]&&typeof _0x28cc0f['template_base_url']===_0xddbf05(0x177))return _0x28cc0f[_0xddbf05(0x18f)][_0xddbf05(0x199)](/\/$/,'');return _0xddbf05(0x17b);}export function readConfigFile(_0x14f906){return parseAndNormalizeConfig(_0x14f906,'silent');}export function writeConfigFile(_0x5713df,_0x841536){const _0x42e7f1=a139_0x3962f6,_0x10d397=dirname(_0x5713df);!existsSync(_0x10d397)&&mkdirSync(_0x10d397,{'recursive':!![]});const _0x1f06ab=_0x5713df+_0x42e7f1(0x19a);try{writeFileSync(_0x1f06ab,JSON[_0x42e7f1(0x1ac)](_0x841536,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180}),renameSync(_0x1f06ab,_0x5713df);}catch(_0x3fed8d){try{unlinkSync(_0x1f06ab);}catch{}throw _0x3fed8d;}}export function resolveWriteConfigPath(_0x251350){const _0x2f6289=a139_0x3962f6,_0x40bc42=_0x251350===_0x2f6289(0x197)?process[_0x2f6289(0x17f)]():homedir(),_0x488f01=resolveConfigPath(_0x40bc42);return _0x488f01??resolve(_0x40bc42,NEW_CONFIG_NAME);}function buildConfig(_0xb294d,_0x23fdab){const _0x2cb807=a139_0x3962f6,_0x23393d={};if(_0xb294d[_0x2cb807(0x193)]&&typeof _0xb294d[_0x2cb807(0x193)]===_0x2cb807(0x1a6))for(const [_0x453b2d,_0x172838]of Object['entries'](_0xb294d[_0x2cb807(0x193)])){_0x172838&&typeof _0x172838===_0x2cb807(0x1a6)&&_0x172838['appcode']&&(_0x23393d[_0x453b2d]=_0x172838);}const _0x223aca=_0xb294d[_0x2cb807(0x1b5)]||undefined,_0x5ae10d=Object['keys'](_0x23393d)[_0x2cb807(0x1c2)]>0x0,_0x3f7cc9=_0x23fdab[_0x2cb807(0x189)]||env(_0x2cb807(0x1a0))||undefined,_0x3001ed=_0x3f7cc9||_0x223aca||undefined,_0x8aa2e3=_0x23fdab['appcode']||env(_0x2cb807(0x179))||undefined,_0x4dd66d=_0x8aa2e3?Object[_0x2cb807(0x1a2)](_0x23393d)[_0x2cb807(0x1bf)](([,_0xb3d021])=>_0xb3d021?.['appcode']===_0x8aa2e3):undefined,_0x4a8187=_0x4dd66d?.[0x0],_0x235b22=_0x4dd66d?.[0x1];let _0x2c5e53=_0x8aa2e3?_0x4a8187:_0x3001ed,_0x26f5d1=_0x2c5e53&&_0x23393d[_0x2c5e53]?_0x23393d[_0x2c5e53]:undefined;_0x8aa2e3&&_0x235b22&&(_0x26f5d1=_0x235b22);const _0x5b30b1=_0x8aa2e3?_0x235b22??_0x26f5d1:_0x26f5d1,_0x1f71a9=_0x3f7cc9||(_0x8aa2e3?_0x4a8187:undefined),_0x14c70f=_0x8aa2e3||_0x5b30b1?.[_0x2cb807(0x1c4)]||undefined,_0x3e4258=_0x23fdab[_0x2cb807(0x1a1)]||env(_0x2cb807(0x186))||_0x5b30b1?.[_0x2cb807(0x1a1)]||_0xb294d[_0x2cb807(0x1a1)]||DEFAULT_CONFIG_VALUES[_0x2cb807(0x1a1)],_0x47ba09=_0x5b30b1?.['locale']||_0xb294d['locale']||DEFAULT_CONFIG_VALUES[_0x2cb807(0x1ba)],_0x1d8705=env('COOKIE')||_0x5b30b1?.[_0x2cb807(0x1b1)]||_0xb294d['cookie']||undefined,_0x587ccc=env('ACCESS_KEY')||_0x5b30b1?.['accessKey']||_0xb294d[_0x2cb807(0x17c)]||undefined,_0x84e285=_0x23fdab[_0x2cb807(0x187)]||env(_0x2cb807(0x190))||_0x5b30b1?.[_0x2cb807(0x187)]||_0xb294d[_0x2cb807(0x187)],_0x567b69=normalizeLegacyOutputFormat(_0x84e285),_0x1a7e1d=env(_0x2cb807(0x1b2))||_0x5b30b1?.[_0x2cb807(0x1c7)]||_0xb294d[_0x2cb807(0x1c7)],_0x538226=_0x1a7e1d?Number(_0x1a7e1d)||undefined:undefined,_0x31147e=env(_0x2cb807(0x181))||env(_0x2cb807(0x1c5))||_0x5b30b1?.['riskLevel']||_0xb294d[_0x2cb807(0x19f)]||_0xb294d['maxRisk'],_0x516e08=_0x31147e===_0x2cb807(0x1a5)||_0x31147e===_0x2cb807(0x1a8)?_0x31147e:DEFAULT_CONFIG_VALUES[_0x2cb807(0x19f)],_0x3f3c67=env(_0x2cb807(0x17e)),_0x3fdb80=_0x3f3c67==='1'||_0x3f3c67===_0x2cb807(0x19d),_0x2cb477=_0x5b30b1?.[_0x2cb807(0x194)]||_0xb294d[_0x2cb807(0x194)]||DEFAULT_CONFIG_VALUES[_0x2cb807(0x194)],_0x17b0cd=isDaily(normalizeEnv(String(_0x3e4258)))?_0x2cb807(0x1a7):'production';return{'appCode':typeof _0x14c70f===_0x2cb807(0x177)&&_0x14c70f[_0x2cb807(0x19b)]()?_0x14c70f['trim']():undefined,'env':_0x17b0cd,'locale':_0x47ba09,'cookie':_0x1d8705,'accessKey':_0x587ccc,'format':_0x567b69,'pageSize':_0x538226,'riskLevel':_0x516e08,'verbose':_0x3fdb80,'apiDir':_0x2cb477,'apps':_0x23393d,'defaultApp':_0x223aca,'currentApp':_0x5ae10d?_0x2c5e53:undefined,'explicitAppName':_0x1f71a9,'raw':_0xb294d};}async function buildAuth(_0x532b08){const _0xd6c226=a139_0x3962f6,{getCookie:_0x4e7633}=await import(_0xd6c226(0x1b9)),_0x3e97d3=_0x532b08[_0xd6c226(0x1b1)]||_0x4e7633(),_0xbd12ab=_0x3e97d3?await getIsSessionValid():![];return{'cookie':_0x3e97d3,'isLoggedIn':_0xbd12ab,async 'getOrLogin'(){const _0x49cfd4=_0xd6c226;if(_0x3e97d3&&_0xbd12ab)return _0x3e97d3;throw CliErrors[_0x49cfd4(0x176)]();}};}export function resolveApiFilePath(_0x520855,_0x58b641){const _0x392b7d=a139_0x3962f6,_0x2e0cf9=resolve(process[_0x392b7d(0x17f)](),_0x520855),_0xc91ec9=resolve(_0x2e0cf9,'api.ts');if(!_0x58b641)return _0xc91ec9;const _0xa42a8=readRawConfig(),_0x34a0e3=_0xa42a8[_0x392b7d(0x193)]&&typeof _0xa42a8['apps']===_0x392b7d(0x1a6)?_0xa42a8[_0x392b7d(0x193)]:{},_0x4ecad4=Object['entries'](_0x34a0e3)[_0x392b7d(0x1bf)](([,_0x370159])=>_0x370159?.[_0x392b7d(0x1c4)]===_0x58b641);if(!_0x4ecad4)return _0xc91ec9;const [_0x49082d,_0x40cdb7]=_0x4ecad4,_0x214e7b=typeof _0xa42a8[_0x392b7d(0x1b5)]===_0x392b7d(0x177)?_0xa42a8[_0x392b7d(0x1b5)]:undefined;if(_0x40cdb7?.[_0x392b7d(0x194)])return _0xc91ec9;if(_0x214e7b&&_0x49082d!==_0x214e7b)return resolve(_0x2e0cf9,_0x49082d+'-api.ts');return _0xc91ec9;}
@@ -1 +1 @@
1
- (function(_0x58022a,_0xfdf74e){const _0x5e885f=a140_0x58c3,_0x3ff65b=_0x58022a();while(!![]){try{const _0x521e08=parseInt(_0x5e885f(0x1c5))/0x1*(parseInt(_0x5e885f(0x1c3))/0x2)+parseInt(_0x5e885f(0x1ba))/0x3*(-parseInt(_0x5e885f(0x1be))/0x4)+parseInt(_0x5e885f(0x1c7))/0x5*(-parseInt(_0x5e885f(0x1b6))/0x6)+-parseInt(_0x5e885f(0x1c1))/0x7+-parseInt(_0x5e885f(0x1b2))/0x8+parseInt(_0x5e885f(0x1b3))/0x9*(parseInt(_0x5e885f(0x1b5))/0xa)+parseInt(_0x5e885f(0x1c4))/0xb*(parseInt(_0x5e885f(0x1bd))/0xc);if(_0x521e08===_0xfdf74e)break;else _0x3ff65b['push'](_0x3ff65b['shift']());}catch(_0x4459f8){_0x3ff65b['push'](_0x3ff65b['shift']());}}}(a140_0x3d69,0xa893c));import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';const cache=new Map();function a140_0x58c3(_0x247657,_0x540087){_0x247657=_0x247657-0x1b2;const _0x3d6966=a140_0x3d69();let _0x58c3fb=_0x3d6966[_0x247657];return _0x58c3fb;}function parseApiFile(_0x4ccfe9){const _0x66dd4b=a140_0x58c3,_0x5cba02=[],_0x4f797a=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x371e81;while((_0x371e81=_0x4f797a[_0x66dd4b(0x1b9)](_0x4ccfe9))!==null){_0x5cba02[_0x66dd4b(0x1b7)]({'datasetCode':_0x371e81[0x1],'tableName':_0x371e81[0x2],'name':_0x371e81[0x3],'alias':_0x371e81[0x4]});}return _0x5cba02;}export function loadAliasMap(_0x1086f5,_0x5e5d1b,_0x4571e4){const _0x372583=a140_0x58c3,_0x63f4bd=_0x4571e4??resolve(process[_0x372583(0x1c0)](),_0x1086f5,_0x372583(0x1b8));if(cache[_0x372583(0x1b4)](_0x63f4bd))return cache[_0x372583(0x1c6)](_0x63f4bd);if(!existsSync(_0x63f4bd))return cache[_0x372583(0x1c2)](_0x63f4bd,[]),[];try{const _0x533966=readFileSync(_0x63f4bd,'utf-8'),_0x1ebb25=parseApiFile(_0x533966);return cache['set'](_0x63f4bd,_0x1ebb25),_0x1ebb25;}catch{return cache[_0x372583(0x1c2)](_0x63f4bd,[]),[];}}export function resolveAlias(_0x5a2254,_0x47752e,_0x387f33,_0x56e793){const _0x34c1c4=a140_0x58c3;if(!_0x47752e)return undefined;const _0x4c868b=loadAliasMap(_0x5a2254,_0x387f33,_0x56e793),_0x2304a3=_0x4c868b[_0x34c1c4(0x1bb)](_0x262fe7=>_0x262fe7[_0x34c1c4(0x1bf)]===_0x47752e);return _0x2304a3?.[_0x34c1c4(0x1bc)];}export function listAliases(_0x11f297,_0x3521a9,_0xe858e4){return loadAliasMap(_0x11f297,_0x3521a9,_0xe858e4);}function a140_0x3d69(){const _0x1be07e=['545688HlbOwm','alias','cwd','1086155ihrIHZ','set','152gIgSBZ','17788485FTSJCd','409nELZyw','get','5234140wFdzQf','3504000rSVjfP','1170boabom','has','73470mGfxBI','6oniiZO','push','api.ts','exec','6iGujnn','find','datasetCode','12imGBsj'];a140_0x3d69=function(){return _0x1be07e;};return a140_0x3d69();}
1
+ (function(_0x386d34,_0x143b9a){const _0x4e792c=a140_0x2e3f,_0xe93aa9=_0x386d34();while(!![]){try{const _0x9eb54d=-parseInt(_0x4e792c(0x144))/0x1*(-parseInt(_0x4e792c(0x14b))/0x2)+-parseInt(_0x4e792c(0x13f))/0x3*(-parseInt(_0x4e792c(0x148))/0x4)+parseInt(_0x4e792c(0x150))/0x5+parseInt(_0x4e792c(0x13e))/0x6*(parseInt(_0x4e792c(0x146))/0x7)+parseInt(_0x4e792c(0x14d))/0x8+parseInt(_0x4e792c(0x14e))/0x9+parseInt(_0x4e792c(0x14c))/0xa*(-parseInt(_0x4e792c(0x147))/0xb);if(_0x9eb54d===_0x143b9a)break;else _0xe93aa9['push'](_0xe93aa9['shift']());}catch(_0xe8e799){_0xe93aa9['push'](_0xe93aa9['shift']());}}}(a140_0x17d2,0x5470d));import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';const cache=new Map();function parseApiFile(_0x874fe5){const _0x1b5723=a140_0x2e3f,_0x543b87=[],_0x5003b0=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x2445ed;while((_0x2445ed=_0x5003b0[_0x1b5723(0x14a)](_0x874fe5))!==null){_0x543b87[_0x1b5723(0x142)]({'datasetCode':_0x2445ed[0x1],'tableName':_0x2445ed[0x2],'name':_0x2445ed[0x3],'alias':_0x2445ed[0x4]});}return _0x543b87;}export function loadAliasMap(_0x457082,_0xe1b8a9,_0x37800b){const _0x29b86b=a140_0x2e3f,_0x524662=_0x37800b??resolve(process[_0x29b86b(0x141)](),_0x457082,_0x29b86b(0x14f));if(cache['has'](_0x524662))return cache[_0x29b86b(0x149)](_0x524662);if(!existsSync(_0x524662))return cache[_0x29b86b(0x140)](_0x524662,[]),[];try{const _0x22a131=readFileSync(_0x524662,_0x29b86b(0x145)),_0x224b08=parseApiFile(_0x22a131);return cache[_0x29b86b(0x140)](_0x524662,_0x224b08),_0x224b08;}catch{return cache[_0x29b86b(0x140)](_0x524662,[]),[];}}export function resolveAlias(_0x162867,_0x39b265,_0x1b6aea,_0x16c813){const _0x126b06=a140_0x2e3f;if(!_0x39b265)return undefined;const _0x27f03b=loadAliasMap(_0x162867,_0x1b6aea,_0x16c813),_0x2d0505=_0x27f03b[_0x126b06(0x13d)](_0x3c14f2=>_0x3c14f2[_0x126b06(0x143)]===_0x39b265);return _0x2d0505?.['datasetCode'];}function a140_0x2e3f(_0x36e7c1,_0x2e2f2d){_0x36e7c1=_0x36e7c1-0x13d;const _0x17d28a=a140_0x17d2();let _0x2e3f88=_0x17d28a[_0x36e7c1];return _0x2e3f88;}function a140_0x17d2(){const _0x4941c0=['api.ts','1075260DZekfQ','find','3282qTAUhE','3LzctkC','set','cwd','push','alias','4409xGFCxm','utf-8','1351TVNfcG','27841kuwOlv','858920WQDdaQ','get','exec','136BTFUqL','4300VRjxmA','1115792lXocpa','4136040apIvjQ'];a140_0x17d2=function(){return _0x4941c0;};return a140_0x17d2();}export function listAliases(_0x3de422,_0x36755a,_0x48ec11){return loadAliasMap(_0x3de422,_0x36755a,_0x48ec11);}
@@ -1 +1 @@
1
- (function(_0x3f36be,_0x1f256b){const _0x538698=a141_0x102f,_0x11f6b7=_0x3f36be();while(!![]){try{const _0x10bad9=parseInt(_0x538698(0x11b))/0x1+-parseInt(_0x538698(0x18d))/0x2+-parseInt(_0x538698(0x176))/0x3+parseInt(_0x538698(0x12e))/0x4+parseInt(_0x538698(0x14e))/0x5+-parseInt(_0x538698(0x142))/0x6*(-parseInt(_0x538698(0x120))/0x7)+-parseInt(_0x538698(0x179))/0x8*(-parseInt(_0x538698(0x165))/0x9);if(_0x10bad9===_0x1f256b)break;else _0x11f6b7['push'](_0x11f6b7['shift']());}catch(_0x5705c2){_0x11f6b7['push'](_0x11f6b7['shift']());}}}(a141_0xd1eb,0x4acf9));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain,getRuntimeDomain}from'../constant/domain.js';import{CliError,CliErrors}from'../errors.js';import{extractList,extractPaging}from'../framework/response.js';import{normalizeEntityWithIdResponse}from'../utils/entity-with-id.js';let _activeCookie;export function setActiveCookie(_0x202abc){_activeCookie=_0x202abc||undefined;}export function clearActiveCookie(){_activeCookie=undefined;}const DEFAULT_REQUEST_TIMEOUT_MS=0x7530;function createFetchFailureError(_0x2be4ff,_0x521c35){const _0x436dd3=a141_0x102f,_0x28e28f=_0x521c35 instanceof Error?_0x521c35['message']:String(_0x521c35);return CliErrors[_0x436dd3(0x15f)]('Request\x20failed:\x20'+_0x2be4ff+(_0x28e28f?'\x20('+_0x28e28f+')':''),_0x436dd3(0x15e));}async function apiRequest(_0x59e42b,_0x57489f={}){const _0x4e5de0=a141_0x102f,{method:method='GET',body:_0x38bbc5,headers:headers={},timeout:timeout=DEFAULT_REQUEST_TIMEOUT_MS,useRuntime:useRuntime=![]}=_0x57489f,_0x587a18=useRuntime?getRuntimeDomain():getApiDomain(),_0x506e09=_activeCookie||getCookie(),_0x3576ac=''+_0x587a18+_0x59e42b,_0x441b05=new AbortController(),_0x408d10=setTimeout(()=>_0x441b05[_0x4e5de0(0x115)](),timeout);try{const _0x2960bd=await fetch(_0x3576ac,{'method':method,'headers':{'Content-Type':'application/json','Cookie':_0x506e09,'X-Invoke-Source':_0x4e5de0(0x18f),...headers},'body':_0x38bbc5?JSON[_0x4e5de0(0x13d)](_0x38bbc5):undefined,'signal':_0x441b05[_0x4e5de0(0x137)]});let _0x1fd45f;try{_0x1fd45f=await _0x2960bd[_0x4e5de0(0xfa)]();}catch{throw CliErrors['apiError'](_0x4e5de0(0x170)+_0x2960bd[_0x4e5de0(0x158)]+')',_0x2960bd[_0x4e5de0(0x158)]>=0x190?_0x4e5de0(0x188):undefined);}if(!_0x2960bd['ok']||_0x1fd45f[_0x4e5de0(0x14a)]===![])throw CliErrors['apiError'](_0x1fd45f[_0x4e5de0(0x182)]||_0x1fd45f[_0x4e5de0(0x134)]||_0x4e5de0(0xfd)+_0x2960bd['status'],_0x1fd45f[_0x4e5de0(0x16d)]?_0x4e5de0(0x17d)+_0x1fd45f[_0x4e5de0(0x16d)]:undefined);return _0x1fd45f;}catch(_0x12ad00){if(_0x12ad00 instanceof CliError)throw _0x12ad00;if(_0x12ad00 instanceof Error&&_0x12ad00['name']===_0x4e5de0(0x104))throw CliErrors[_0x4e5de0(0x15f)](_0x4e5de0(0x12a)+_0x3576ac);throw createFetchFailureError(_0x3576ac,_0x12ad00);}finally{clearTimeout(_0x408d10);}}function isAuthFailure(_0x44908c){const _0x39411d=a141_0x102f,_0x31e1e0=_0x44908c[_0x39411d(0x182)]||_0x44908c[_0x39411d(0x134)]||_0x44908c[_0x39411d(0x157)]?.['message']||_0x44908c['errorMessage']||_0x44908c[_0x39411d(0x12d)]||'';return _0x44908c['errorCode']===_0x39411d(0x184)||_0x44908c['code']===0x191||_0x44908c[_0x39411d(0x183)]===_0x39411d(0xff)||_0x31e1e0[_0x39411d(0x11f)](_0x39411d(0xff))||_0x31e1e0['includes']('Unauthorized')||_0x31e1e0[_0x39411d(0x11f)]('登录')||_0x31e1e0['includes']('认证');}export async function platformFetch(_0x2092f0,_0xb4567e){const _0x591e6b=a141_0x102f;let _0x4b2bec;try{_0x4b2bec=await fetch(_0x2092f0,{'method':_0xb4567e['method']??'GET','headers':{'Content-Type':_0x591e6b(0x15b),'Cookie':_0xb4567e[_0x591e6b(0x155)],'X-Invoke-Source':_0x591e6b(0x18f)},..._0xb4567e['body']&&{'body':JSON[_0x591e6b(0x13d)](_0xb4567e[_0x591e6b(0x17c)])}});}catch(_0x1d786f){throw createFetchFailureError(_0x2092f0,_0x1d786f);}if(!_0x4b2bec['ok']){if(_0x4b2bec[_0x591e6b(0x158)]===0x191)throw CliErrors[_0x591e6b(0x11c)]();throw CliErrors[_0x591e6b(0x15f)](_0xb4567e['label']+'\x20failed,\x20HTTP\x20'+_0x4b2bec[_0x591e6b(0x158)]);}const _0x37c9fc=await _0x4b2bec[_0x591e6b(0xfa)]();if(_0x37c9fc[_0x591e6b(0x14a)]===![]){if(isAuthFailure(_0x37c9fc))throw CliErrors['authRequired']();throw CliErrors[_0x591e6b(0x15f)](_0x37c9fc[_0x591e6b(0x182)]||_0x37c9fc[_0x591e6b(0x134)]||_0xb4567e[_0x591e6b(0x14d)]+'\x20failed');}return _0x37c9fc[_0x591e6b(0x157)];}export async function listBffScripts(_0x412ba6,_0x32c502,_0x15cd64){const _0x5ab0d4=a141_0x102f;let _0x8201f5=_0x5ab0d4(0x178)+_0x412ba6;if(_0x32c502)_0x8201f5+=_0x5ab0d4(0x133)+_0x32c502;const _0x238153=await apiRequest(_0x8201f5);let _0x5e1877=extractList(_0x238153[_0x5ab0d4(0x157)]);if(_0x15cd64?.['scriptName']){const _0x516234=_0x15cd64[_0x5ab0d4(0x11e)][_0x5ab0d4(0x123)]();_0x5e1877=_0x5e1877[_0x5ab0d4(0x12b)](_0x4b7ab6=>_0x4b7ab6[_0x5ab0d4(0xf7)]?.[_0x5ab0d4(0x123)]()[_0x5ab0d4(0x11f)](_0x516234)||_0x4b7ab6[_0x5ab0d4(0x12c)]?.['toLowerCase']()[_0x5ab0d4(0x11f)](_0x516234));}return _0x5e1877;}export async function getBffScriptInfo(_0x5bc724){const _0x466308=a141_0x102f,_0x2bfdee=await apiRequest(_0x466308(0x156)+_0x5bc724);if(!_0x2bfdee['data'])throw CliErrors['validation']('BFF\x20script\x20not\x20found:\x20id='+_0x5bc724);return _0x2bfdee['data'];}export async function saveBffScript(_0x50da54){const _0x498d34=a141_0x102f,_0x3a17dc=await apiRequest(_0x498d34(0x180),{'method':'POST','body':_0x50da54}),{id:_0x4e55f1,entity:_0x1c5dd2}=normalizeEntityWithIdResponse(_0x3a17dc[_0x498d34(0x157)]);if(_0x4e55f1!==undefined){const _0x3f97b9=typeof _0x1c5dd2[_0x498d34(0xf7)]===_0x498d34(0x119)||typeof _0x1c5dd2['scriptType']===_0x498d34(0x119)?_0x1c5dd2:undefined;return{'id':_0x4e55f1,'script':_0x3f97b9};}throw CliErrors[_0x498d34(0x15f)](_0x498d34(0xf8));}export async function deleteBffScript(_0x2be4c9){const _0x6f9f22=a141_0x102f;await apiRequest(_0x6f9f22(0x167),{'method':_0x6f9f22(0x160),'body':{'id':_0x2be4c9}});}export async function getBffScriptStatistics(_0x4a90fe){const _0x1d06af=a141_0x102f,_0x31501c=await apiRequest(_0x1d06af(0x18b)+_0x4a90fe);return extractList(_0x31501c[_0x1d06af(0x157)]);}export async function clearBffScriptCache(){const _0x5caeb1=a141_0x102f,_0x2897cd=await apiRequest('/api/management/script/cache/clear',{'method':'POST','useRuntime':!![]});return typeof _0x2897cd[_0x5caeb1(0x157)]==='string'?_0x2897cd[_0x5caeb1(0x157)]:'';}export async function listBffDatasetOperations(_0x5de0fa,_0x47bd3b){const _0x16639c=a141_0x102f,_0x4aad7b=await apiRequest(_0x16639c(0x13e),{'method':_0x16639c(0x160),'body':{'appCode':_0x5de0fa,'datasetId':_0x47bd3b}});return _0x4aad7b[_0x16639c(0x157)];}export async function listSqlQueries(_0x407bb1,_0x1fff94){const _0x423057=a141_0x102f,_0x3ffb90=await apiRequest(_0x423057(0x13a),{'method':'POST','body':{'appCode':_0x407bb1,'currentPage':_0x1fff94?.[_0x423057(0x128)]??0x1,'pageSize':_0x1fff94?.[_0x423057(0x152)]??0x32,'sqlCode':_0x1fff94?.['sqlCode'],'sqlName':_0x1fff94?.['sqlName']}});return _0x3ffb90[_0x423057(0x157)];}export async function getSqlQueryInfo(_0x6437cb,_0x470baa){const _0x49ec0a=a141_0x102f,_0x16d78e=await listSqlQueries(_0x6437cb,{'sqlCode':_0x470baa}),_0x5cdcc3=_0x16d78e[_0x49ec0a(0x171)]?.[0x0];if(!_0x5cdcc3)throw CliErrors[_0x49ec0a(0x13f)](_0x49ec0a(0x121)+_0x470baa);return _0x5cdcc3;}export async function getSqlQueryDetail(_0x4d761d){const _0x4e80d2=a141_0x102f,_0xf2ac54=await apiRequest(_0x4e80d2(0x144)+(_0x4e80d2(0x16f)+encodeURIComponent(_0x4d761d)));if(!_0xf2ac54['data'])throw CliErrors['validation'](_0x4e80d2(0x121)+_0x4d761d);return _0xf2ac54[_0x4e80d2(0x157)];}export async function getSqlQueryDetailById(_0x3b298d){const _0x2d248c=a141_0x102f,_0x2ee8c5=await apiRequest(_0x2d248c(0x122)+_0x3b298d);if(!_0x2ee8c5[_0x2d248c(0x157)])throw CliErrors[_0x2d248c(0x13f)](_0x2d248c(0x118)+_0x3b298d);return _0x2ee8c5[_0x2d248c(0x157)];}export async function createSqlQuery(_0x1a0a0d){const _0x12687a=a141_0x102f,_0x5a7796=await apiRequest(_0x12687a(0x175),{'method':_0x12687a(0x160),'body':_0x1a0a0d}),{id:_0x5c10f9,entity:_0x1b49c5}=normalizeEntityWithIdResponse(_0x5a7796[_0x12687a(0x157)]);if(!(_0x12687a(0x130)in _0x1b49c5)&&_0x5c10f9)return getSqlQueryDetailById(_0x5c10f9);return normalizeSqlQueryEntity(_0x1b49c5);}export async function updateSqlQuery(_0x533190){const _0x33705f=a141_0x102f,_0x5dfcb6=await apiRequest(_0x33705f(0x116),{'method':_0x33705f(0x160),'body':_0x533190}),{id:_0x15fa06,entity:_0x72de39}=normalizeEntityWithIdResponse(_0x5dfcb6[_0x33705f(0x157)]);if(!(_0x33705f(0x130)in _0x72de39)){if(_0x533190[_0x33705f(0x130)])return getSqlQueryDetail(_0x533190[_0x33705f(0x130)]);if(_0x15fa06)return getSqlQueryDetailById(_0x15fa06);}return normalizeSqlQueryEntity(_0x72de39);}export async function deleteSqlQuery(_0xa94f68){const _0xed9fec=a141_0x102f;await apiRequest(_0xed9fec(0xfc),{'method':_0xed9fec(0x160),'body':_0xa94f68});}export async function saveSqlQuery(_0x517efd){const _0x45d20b=a141_0x102f,_0x44a225=await apiRequest(_0x45d20b(0x109),{'method':_0x45d20b(0x160),'body':_0x517efd});return _0x44a225[_0x45d20b(0x157)];}function normalizeSqlQueryEntity(_0x1cbf10){const _0x3c2d16=a141_0x102f;return{..._0x1cbf10,'id':Number(_0x1cbf10['id']),'dbId':_0x1cbf10[_0x3c2d16(0x186)]==null?undefined:Number(_0x1cbf10['dbId']),'version':_0x1cbf10[_0x3c2d16(0x169)]==null?undefined:Number(_0x1cbf10[_0x3c2d16(0x169)])};}export async function executeSql(_0x39c7bb,_0x2eefeb,_0x211896){const _0x121a2f=a141_0x102f,_0x12730b=await apiRequest(_0x121a2f(0xf9),{'method':_0x121a2f(0x160),'body':{'appCode':_0x39c7bb,'sqlCode':_0x2eefeb,..._0x211896&&{'params':_0x211896}},'useRuntime':!![]});return _0x12730b[_0x121a2f(0x157)];}export async function executeDatasetDataOperation(_0x16744e,_0x26d263,_0x4562ea,_0x2896d9={}){const _0x1f47ac=a141_0x102f;try{const _0x34620f=await apiRequest(_0x1f47ac(0x173)+_0x16744e+'/'+_0x26d263+'/'+_0x4562ea,{'method':_0x1f47ac(0x160),'body':_0x2896d9,'useRuntime':!![]});return _0x34620f[_0x1f47ac(0x157)];}catch(_0x12540f){if(_0x4562ea===_0x1f47ac(0x17f)&&_0x12540f instanceof CliError&&_0x12540f[_0x1f47ac(0x183)]==='api_error'&&_0x2896d9['id']!==undefined&&_0x2896d9['id']!==null&&_0x2896d9['id']!==''){const _0x2850ed=await apiRequest(_0x1f47ac(0x173)+_0x16744e+'/'+_0x26d263+'/filter',{'method':_0x1f47ac(0x160),'body':{'where':{'id':{'$eq':_0x2896d9['id']}},'currentPage':0x1,'pageSize':0x1},'useRuntime':!![]}),_0x1a7028=Array[_0x1f47ac(0x108)](_0x2850ed[_0x1f47ac(0x157)]?.[_0x1f47ac(0x171)])?_0x2850ed[_0x1f47ac(0x157)][_0x1f47ac(0x171)]:[];return _0x1a7028[0x0]??null;}throw _0x12540f;}}export async function listDatasets(_0x56b541,_0x3a619e){const _0x593a34=a141_0x102f,_0x235c6f={'appCode':_0x56b541,'deleted':![]};if(_0x3a619e?.[_0x593a34(0x183)])_0x235c6f[_0x593a34(0x183)]=_0x3a619e[_0x593a34(0x183)];if(_0x3a619e?.[_0x593a34(0x174)])_0x235c6f['name']=_0x3a619e['name'];const _0x110f5b=await apiRequest(_0x593a34(0x106),{'method':_0x593a34(0x160),'body':_0x235c6f});return extractList(_0x110f5b[_0x593a34(0x157)]);}export async function deleteDataset(_0x2c4e1f,_0xaefb90){const _0x4d38d9=a141_0x102f;await apiRequest(_0x4d38d9(0x132),{'method':_0x4d38d9(0x160),'body':{'appCode':_0x2c4e1f,'datasetId':_0xaefb90}});}export async function searchDatasets(_0x223bb4,_0x206865){const _0x5370d1=a141_0x102f,_0x433d04=await listDatasets(_0x223bb4,{'name':_0x206865}),_0xe2d561=_0x206865['toLowerCase'](),_0x264d02=new Set(_0x433d04[_0x5370d1(0x10d)](_0x3801cb=>_0x3801cb['id'])),_0x220bd9=_0x433d04[_0x5370d1(0x12b)](_0x31b5eb=>_0x31b5eb[_0x5370d1(0x135)]?.[_0x5370d1(0x147)]?.[_0x5370d1(0x123)]()['includes'](_0xe2d561)||_0x31b5eb['description']?.[_0x5370d1(0x123)]()[_0x5370d1(0x11f)](_0xe2d561)),_0xedb9b6=await listDatasets(_0x223bb4,{'code':_0x206865});for(const _0x38b33d of _0xedb9b6){!_0x264d02[_0x5370d1(0x101)](_0x38b33d['id'])&&(_0x433d04['push'](_0x38b33d),_0x264d02['add'](_0x38b33d['id']));}return _0x433d04;}export function normalizeDatasetOperations(_0xe271e2){const _0x2a2489=a141_0x102f;if(Array['isArray'](_0xe271e2))return _0xe271e2[_0x2a2489(0x12b)](_0x5397e9=>_0x5397e9!=null&&typeof _0x5397e9===_0x2a2489(0xf4));if(_0xe271e2&&typeof _0xe271e2===_0x2a2489(0xf4))return Object['entries'](_0xe271e2)['filter'](([,_0x588c54])=>_0x588c54!=null&&typeof _0x588c54===_0x2a2489(0xf4))[_0x2a2489(0x10d)](([_0x4fbc8c,_0xaf13a8])=>({..._0xaf13a8,'name':_0xaf13a8[_0x2a2489(0x174)]??_0xaf13a8[_0x2a2489(0x15c)]??_0x4fbc8c}));return[];}export async function getDatasetDetail(_0x37c16e){const _0x4a0888=a141_0x102f,_0x5984f2=/^\d+$/[_0x4a0888(0x124)](_0x37c16e)?'id':_0x4a0888(0x183),_0x179141=await apiRequest(_0x4a0888(0x13c)+_0x5984f2+'='+_0x37c16e);return _0x179141[_0x4a0888(0x157)];}export async function updateDrivenData(_0x9e6c22){const _0x125206=a141_0x102f,_0x4fe9c8=await apiRequest(_0x125206(0x148),{'method':_0x125206(0x160),'body':_0x9e6c22});return _0x4fe9c8['data'];}export async function getDatasetOperations(_0x5477aa){const _0x3d6d12=a141_0x102f,_0x3cdc2a=await getDatasetDetail(_0x5477aa),_0xbeca1d=normalizeDatasetOperations(_0x3cdc2a[_0x3d6d12(0x16b)])[_0x3d6d12(0x10d)](_0x13c727=>({'name':_0x13c727[_0x3d6d12(0x174)]||_0x13c727[_0x3d6d12(0x15c)],'displayName':_0x13c727['displayName']||_0x13c727[_0x3d6d12(0x174)],'type':_0x13c727[_0x3d6d12(0x185)],'method':_0x13c727[_0x3d6d12(0x143)],'path':_0x13c727[_0x3d6d12(0x14b)],'enabled':_0x13c727[_0x3d6d12(0x103)]??!![],'requestFields':_0x13c727[_0x3d6d12(0x15d)],'responseFields':_0x13c727['responseFields']}));return{'dataset':{'id':_0x3cdc2a['id']??_0x3cdc2a['modelId'],'name':_0x3cdc2a['name'],'code':_0x3cdc2a[_0x3d6d12(0x183)]||_0x3cdc2a[_0x3d6d12(0x166)],'tableName':_0x3cdc2a[_0x3d6d12(0x147)]||_0x3cdc2a['dbtableConfig']?.[_0x3d6d12(0x147)]},'operations':_0xbeca1d};}export async function getOperationDetail(_0x2ebec8,_0x386099,_0x468b2a){const _0x1c05b9=a141_0x102f;let _0x595412=_0x386099;if(!/^\d+$/['test'](_0x386099)){const _0x30337e=await listDatasets(_0x2ebec8,{'code':_0x386099}),_0x55fd91=_0x30337e[_0x1c05b9(0xf2)](_0x1c5be4=>_0x1c5be4['code']===_0x386099||String(_0x1c5be4['id'])===_0x386099);if(!_0x55fd91)throw CliErrors[_0x1c05b9(0x13f)](_0x1c05b9(0x18e)+_0x386099);_0x595412=String(_0x55fd91['id']);}const _0x4ebb60=await getDatasetDetail(_0x595412),_0x35604e=normalizeDatasetOperations(_0x4ebb60[_0x1c05b9(0x16b)])[_0x1c05b9(0xf2)](_0x5ee848=>(_0x5ee848['name']||_0x5ee848[_0x1c05b9(0x15c)])===_0x468b2a);if(!_0x35604e)throw CliErrors['validation'](_0x1c05b9(0x18c)+_0x468b2a+_0x1c05b9(0x107)+_0x386099);return{'dataset':{'id':_0x4ebb60['id']??_0x4ebb60[_0x1c05b9(0xf3)],'name':_0x4ebb60[_0x1c05b9(0x174)],'code':_0x4ebb60[_0x1c05b9(0x183)]||_0x4ebb60[_0x1c05b9(0x166)],'tableName':_0x4ebb60[_0x1c05b9(0x147)]||_0x4ebb60['dbtableConfig']?.[_0x1c05b9(0x147)]},'operation':_0x35604e};}export async function startGenerateStandardPages(_0x3b2562,_0x39938e,_0x591710){const _0x311cde=a141_0x102f,_0x23a54d=await apiRequest('/smartapi/lovrabet/dataset/'+_0x39938e+_0x311cde(0x129),{'method':_0x311cde(0x160),'body':{'appCode':_0x3b2562,..._0x591710?.[_0x311cde(0x11a)]?{'clientOperationId':_0x591710[_0x311cde(0x11a)]}:{}},'timeout':DEFAULT_REQUEST_TIMEOUT_MS});return _0x23a54d['data'];}export async function getGenerateStandardPagesStatus(_0x1b8271,_0xa05440,_0x10f131){const _0x2b4ec3=a141_0x102f,_0x81bc64=new URLSearchParams({'appCode':_0x1b8271});_0x10f131[_0x2b4ec3(0x126)]&&_0x81bc64[_0x2b4ec3(0x10b)](_0x2b4ec3(0x126),_0x10f131['operationId']);_0x10f131[_0x2b4ec3(0x11a)]&&_0x81bc64[_0x2b4ec3(0x10b)](_0x2b4ec3(0x11a),_0x10f131['clientOperationId']);const _0x2120fd=await apiRequest(_0x2b4ec3(0x10e)+_0xa05440+_0x2b4ec3(0x154)+_0x81bc64[_0x2b4ec3(0x187)]());return _0x2120fd[_0x2b4ec3(0x157)];}export async function getStandardPageStatus(_0x24f826,_0x174ac5){const _0x2736fb=a141_0x102f,_0xa6257b=await apiRequest(_0x2736fb(0x10e)+_0x174ac5+_0x2736fb(0xf0)+encodeURIComponent(_0x24f826));return _0xa6257b[_0x2736fb(0x157)];}export async function tryGetStandardPageStatus(_0x120153,_0x1deb0a){const _0x2b5eb2=a141_0x102f;try{return await getStandardPageStatus(_0x120153,_0x1deb0a);}catch(_0x2719ce){if(_0x2719ce instanceof CliError&&_0x2719ce[_0x2b5eb2(0x183)]===_0x2b5eb2(0x139)&&/404|not found|non-json response/i['test'](_0x2719ce[_0x2b5eb2(0x134)]))return null;throw _0x2719ce;}}export async function syncStandardPages(_0x2d2c38,_0x3acb7d){const _0xcff8bc=a141_0x102f,_0x44db52=await apiRequest('/smartapi/lovrabet/dataset/'+_0x3acb7d+_0xcff8bc(0x151),{'method':_0xcff8bc(0x160),'body':{'appCode':_0x2d2c38}});return _0x44db52['data'];}export async function getPageDetail(_0x341a70){const _0xca0e0c=a141_0x102f,_0x19da39=await apiRequest(_0xca0e0c(0xfe)+_0x341a70);if(!_0x19da39[_0xca0e0c(0x157)])throw CliErrors[_0xca0e0c(0x13f)](_0xca0e0c(0x14c)+_0x341a70);return _0x19da39[_0xca0e0c(0x157)];}export async function updatePage(_0x73d5a8,_0x1347b6,_0x54f19b,_0x24dbb2){const _0x2a4274=a141_0x102f,_0x3b2e92=await apiRequest(_0x2a4274(0x105),{'method':_0x2a4274(0x160),'body':{'appCode':_0x73d5a8,'pageId':_0x1347b6,'code':_0x54f19b,'datasetIds':_0x24dbb2}});return _0x3b2e92[_0x2a4274(0x157)];}export function generateSdkCode(_0x12fa08,_0x3decc4,_0x4b2a69){const _0x3f8a62=a141_0x102f,_0xb611a7=_0x4b2a69?.[_0x3f8a62(0x10c)]??!![],_0x4fd7fb=_0x3f8a62(0x18a)+_0x12fa08['code']?.[_0x3f8a62(0x159)](/-/g,'_'),_0x5c6633=_0x3decc4[_0x3f8a62(0x174)]||_0x3decc4['operationName']||_0x3f8a62(0x12b),_0x22fa9b=[];_0xb611a7&&_0x22fa9b[_0x3f8a62(0x110)](_0x3f8a62(0x164),'',_0x3f8a62(0x16a),'');_0x22fa9b[_0x3f8a62(0x110)](_0x3f8a62(0x14f)+_0x12fa08[_0x3f8a62(0x174)]+'\x20('+(_0x12fa08[_0x3f8a62(0x147)]||'table')+')');if(_0x5c6633===_0x3f8a62(0x12b))_0x22fa9b[_0x3f8a62(0x110)](_0x3f8a62(0x102)+_0x4fd7fb+_0x3f8a62(0x17b),'\x20\x20where:\x20{},','\x20\x20pageSize:\x2020,','\x20\x20currentPage:\x201,',_0x3f8a62(0x125));else{if(_0x5c6633===_0x3f8a62(0x17f))_0x22fa9b['push']('const\x20result\x20=\x20await\x20client.models.'+_0x4fd7fb+_0x3f8a62(0x138));else{if(_0x5c6633===_0x3f8a62(0x10a))_0x22fa9b['push'](_0x3f8a62(0x102)+_0x4fd7fb+_0x3f8a62(0x16e));else{if(_0x5c6633==='update')_0x22fa9b['push'](_0x3f8a62(0x102)+_0x4fd7fb+_0x3f8a62(0xf1));else _0x5c6633===_0x3f8a62(0x15a)||_0x5c6633===_0x3f8a62(0x145)?_0x22fa9b['push'](_0x3f8a62(0x102)+_0x4fd7fb+_0x3f8a62(0x117)):_0x22fa9b[_0x3f8a62(0x110)](_0x3f8a62(0x102)+_0x4fd7fb+'.'+_0x5c6633+_0x3f8a62(0x161));}}}return _0x22fa9b[_0x3f8a62(0x127)]('\x0a');}export function generateSqlCodeTemplate(_0x4d6516,_0x257323){const _0x4bfcf4=a141_0x102f,_0x24c1c6=_0x257323?.[_0x4bfcf4(0xf6)]??_0x4bfcf4(0x140),_0x2bf5cf=_0x257323?.[_0x4bfcf4(0x10c)]??!![],_0x547dc5=[];return _0x547dc5[_0x4bfcf4(0x110)](_0x4bfcf4(0x146)+_0x4d6516[_0x4bfcf4(0xf5)]+'\x20('+_0x4d6516['sqlCode']+')'),_0x24c1c6===_0x4bfcf4(0x140)?(_0x2bf5cf&&_0x547dc5['push'](_0x4bfcf4(0x164),'',_0x4bfcf4(0x16a),''),_0x547dc5[_0x4bfcf4(0x110)]('const\x20data\x20=\x20await\x20client.sql.execute({',_0x4bfcf4(0x163)+_0x4d6516[_0x4bfcf4(0x130)]+'\x27,','\x20\x20params:\x20{\x20/*\x20parameter\x20values\x20*/\x20},','});',_0x4bfcf4(0x177),'const\x20results\x20=\x20data.execResult\x20||\x20[];')):_0x547dc5[_0x4bfcf4(0x110)](_0x4bfcf4(0x112),_0x4bfcf4(0x136),_0x4bfcf4(0xfb),'\x20\x20\x20\x20sqlCode:\x20\x27'+_0x4d6516[_0x4bfcf4(0x130)]+'\x27,','\x20\x20\x20\x20params:\x20{\x20/*\x20parameter\x20values\x20*/\x20},',_0x4bfcf4(0x131),_0x4bfcf4(0x11d),'}'),_0x547dc5[_0x4bfcf4(0x127)]('\x0a');}export async function getErConfig(_0x25da5a,_0x427651){const _0xccf5c6=a141_0x102f,_0x5afbe0=await apiRequest(_0xccf5c6(0x153),{'method':_0xccf5c6(0x160),'body':{'appCode':_0x25da5a,'dblinkId':_0x427651}});return _0x5afbe0[_0xccf5c6(0x157)];}function a141_0x102f(_0x42cf41,_0x22280f){_0x42cf41=_0x42cf41-0xf0;const _0xd1eb2a=a141_0xd1eb();let _0x102f04=_0xd1eb2a[_0x42cf41];return _0x102f04;}export async function createErRelation(_0x38d7a3){const _0x421ab2=await apiRequest('/smartapi/question/er-config/erCreate',{'method':'POST','body':_0x38d7a3});return _0x421ab2['data'];}function a141_0xd1eb(){const _0x2b2984=['string','clientOperationId','133018HjNbts','authRequired','\x20\x20return\x20rows;','scriptName','includes','2294173SaANHr','SQL\x20query\x20not\x20found:\x20','/smartapi/custom/getUserCustomSql?id=','toLowerCase','test','});','operationId','join','currentPage','/generate-standard-pages/start','Request\x20timeout:\x20','filter','description','error','1222320BWeHSY','/smartapi/dblink/getTableDiffV2ByPage','sqlCode','\x20\x20});','/smartapi/dataset/delete-dataset','&type=','message','dbtableConfig','export\x20default\x20async\x20function\x20handler(params,\x20context)\x20{','signal','.getOne(id);','api_error','/smartapi/custom/queryUserCustomSqlList','Use\x20the\x20platform\x20console\x20to\x20see\x20all.','/smartapi/dataset/get-driven-data?','stringify','/smartapi/dataset/get-dataset-operation','validation','sdk','entries','6TylPES','method','/smartapi/custom/getUserCustomSql','remove','//\x20SQL:\x20','tableName','/smartapi/dataset/update-driven-data','/smartapi/db-analysis/jobs/cancel','success','path','Page\x20not\x20found:\x20','label','1023130WNAPIT','//\x20','/smartapi/dblink/delete','/sync-to-pages','pageSize','/smartapi/question/er-config','/generate-standard-pages/status?','cookie','/api/management/library/scripts/info?id=','data','status','replace','delete','application/json','operationName','requestFields','Check\x20network\x20connectivity\x20and\x20try\x20again.','apiError','POST','(/*\x20params\x20*/);','planId','\x20\x20sqlCode:\x20\x27','import\x20{\x20LovrabetClient\x20}\x20from\x20\x27@lovrabet/sdk\x27;','117ZMszPu','modelCode','/api/management/library/scripts/delete','length','version','const\x20client\x20=\x20new\x20LovrabetClient({\x20appCode:\x20\x27<YOUR_APP_CODE>\x27\x20});','operations','/smartapi/dblink/getOne','errorCode','.create({\x20/*\x20fields\x20*/\x20});','?sqlCode=','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','tableData','/smartapi/dblink/create','/api/','name','/smartapi/custom/saveUserCustomSql','1093170DutQJm','if\x20(!data.execSuccess)\x20throw\x20new\x20Error(\x27SQL\x20execution\x20failed\x27);','/api/management/library/scripts/list?appCode=','29928HxiyrY','\x20of\x20','.filter({','body','API\x20error\x20code:\x20','/smartapi/db-analysis/start','getOne','/api/management/library/scripts/save','tableList','errorMsg','code','UNAUTHORIZED','type','dbId','toString','Check\x20your\x20auth\x20cookie\x20and\x20try\x20again.','totalCount','dataset_','/api/management/library/scripts/statistics?appCode=','Operation\x20\x22','697562SwSmPw','Dataset\x20not\x20found:\x20','cli:rabetbase','/standard-page-status?appCode=','.update(id,\x20{\x20/*\x20fields\x20*/\x20});','find','modelId','object','sqlName','target','functionName','BFF\x20save\x20returned\x20no\x20valid\x20id','/api/custom/executeSql','json','\x20\x20const\x20rows\x20=\x20await\x20context.client.sql.execute({','/smartapi/custom/deleteUserCustomSql','API\x20error:\x20','/smartapi/lovrabet/detail?pageId=','401','/smartapi/app/getList','has','const\x20result\x20=\x20await\x20client.models.','enabled','AbortError','/smartapi/lovrabet/update-page','/smartapi/dataset/get-dataset-list','\x22\x20not\x20found\x20in\x20dataset\x20','isArray','/api/node-toolbox/sql/save','create','set','includeImports','map','/smartapi/lovrabet/dataset/','/smartapi/dblink/getList','push','Warning:\x20showing\x20first\x20','//\x20BFF\x20context:\x20context.client.sql.execute\x20returns\x20rows\x20directly','warn','/smartapi/dblink/getAllTableList','abort','/smartapi/custom/updateUserCustomSql','.remove(id);','SQL\x20query\x20not\x20found:\x20id='];a141_0xd1eb=function(){return _0x2b2984;};return a141_0xd1eb();}export async function updateErRelation(_0x3f952c){const _0x10cee8=a141_0x102f,_0x2acf5f=await apiRequest('/smartapi/question/er-config/update-single',{'method':'POST','body':_0x3f952c});return _0x2acf5f[_0x10cee8(0x157)];}export async function deleteErRelation(_0x47b0b8){const _0x5ebe73=a141_0x102f,_0x5c3121=await apiRequest('/smartapi/question/er-config/erDelete',{'method':_0x5ebe73(0x160),'body':_0x47b0b8});return _0x5c3121[_0x5ebe73(0x157)];}function buildQuery(_0x35b117){const _0x36f290=a141_0x102f,_0x15fb50=new URLSearchParams();for(const [_0x4271da,_0x212a85]of Object[_0x36f290(0x141)](_0x35b117)){if(_0x212a85===undefined||_0x212a85==='')continue;_0x15fb50[_0x36f290(0x10b)](_0x4271da,String(_0x212a85));}const _0x2fa8d1=_0x15fb50[_0x36f290(0x187)]();return _0x2fa8d1?'?'+_0x2fa8d1:'';}export async function listDbLinks(_0x4d2d43,_0x1a6e14){const _0x4b875b=a141_0x102f,_0x174a63=await apiRequest(_0x4b875b(0x10f),{'method':_0x4b875b(0x160),'body':{'appCode':_0x4d2d43,'currentPage':_0x1a6e14?.[_0x4b875b(0x128)]??0x1,'pageSize':_0x1a6e14?.[_0x4b875b(0x152)]??0x64}});return{'items':extractList(_0x174a63[_0x4b875b(0x157)]),'paging':extractPaging(_0x174a63[_0x4b875b(0x157)])};}export async function getDbLinkInfo(_0x35f887){const _0x532840=a141_0x102f,_0x17f208=await apiRequest(_0x532840(0x16c)+buildQuery({'id':_0x35f887}));return _0x17f208['data'];}export async function createDbLink(_0x45e845){const _0x11afc6=a141_0x102f,_0x54b4a8=await apiRequest(_0x11afc6(0x172),{'method':_0x11afc6(0x160),'body':_0x45e845});return _0x54b4a8[_0x11afc6(0x157)];}export async function updateDbLink(_0x3b2a93){const _0x53494a=a141_0x102f,_0x522b2f=await apiRequest('/smartapi/dblink/update',{'method':_0x53494a(0x160),'body':_0x3b2a93});return _0x522b2f[_0x53494a(0x157)];}export async function deleteDbLink(_0x23772e){const _0xb6888d=a141_0x102f;await apiRequest(_0xb6888d(0x150),{'method':_0xb6888d(0x160),'body':{'id':_0x23772e}});}export async function testDbLinkConnect(_0x39905e){const _0x198291=await apiRequest('/smartapi/dblink/testConnect'+buildQuery({'id':_0x39905e}));return _0x198291['data'];}export async function startDbAnalysis(_0x2e0c5d,_0x15d1d8){const _0x1aa28c=a141_0x102f,_0x4b45c0=await apiRequest(_0x1aa28c(0x17e),{'method':_0x1aa28c(0x160),'body':{'dbLinkId':_0x2e0c5d,..._0x15d1d8&&_0x15d1d8[_0x1aa28c(0x168)]>0x0?{'tableNames':_0x15d1d8}:{}}}),_0x414ef2=_0x4b45c0[_0x1aa28c(0x157)];if(typeof _0x414ef2===_0x1aa28c(0x119))return _0x414ef2;if(_0x414ef2&&typeof _0x414ef2===_0x1aa28c(0xf4)&&typeof _0x414ef2[_0x1aa28c(0x162)]==='string')return _0x414ef2[_0x1aa28c(0x162)];return _0x414ef2!=null?String(_0x414ef2):'';}export async function cancelDbAnalysis(_0x284920){const _0x307cab=a141_0x102f;await apiRequest(_0x307cab(0x149)+buildQuery({'planId':_0x284920}),{'method':_0x307cab(0x160)});}export async function getDbAnalysisStatus(_0x4641f4){const _0x150cbe=await apiRequest('/smartapi/db-analysis/status/'+encodeURIComponent(_0x4641f4));return _0x150cbe['data'];}export async function getDbAllTableList(_0x134f68,_0x4f5738){const _0x69af70=a141_0x102f,_0x1485b1=await apiRequest(_0x69af70(0x114)+buildQuery({'appCode':_0x134f68,'dbLinkId':_0x4f5738})),_0x417c9c=_0x1485b1['data'];if(Array['isArray'](_0x417c9c))return _0x417c9c;return extractList(_0x417c9c);}export async function getDbTableDiff(_0x409e11,_0x23e4c7,_0x4b7e3c){const _0xf1d958=a141_0x102f,_0x3ec656=await apiRequest(_0xf1d958(0x12f)+buildQuery({'appCode':_0x409e11,'dbLinkId':_0x23e4c7,'pageIndex':_0x4b7e3c?.['pageIndex']??0x1,'pageSize':_0x4b7e3c?.[_0xf1d958(0x152)]??0x14,'tableName':_0x4b7e3c?.['tableName']})),_0x1d4e7a=_0x3ec656[_0xf1d958(0x157)];return{'totalCount':_0x1d4e7a?.['totalCount']??0x0,'tableList':Array[_0xf1d958(0x108)](_0x1d4e7a?.[_0xf1d958(0x181)])?_0x1d4e7a[_0xf1d958(0x181)]:[]};}const REMOTE_APP_PAGE_SIZE=0xc8;export async function listRemoteApps(){const _0x58addb=a141_0x102f,_0x3471ce=await apiRequest(_0x58addb(0x100),{'method':_0x58addb(0x160),'body':{'currentPage':0x1,'pageSize':REMOTE_APP_PAGE_SIZE}}),_0xa7285a=extractList(_0x3471ce[_0x58addb(0x157)]),_0x5bef6d=extractPaging(_0x3471ce[_0x58addb(0x157)]);return _0x5bef6d&&_0x5bef6d['totalCount']>REMOTE_APP_PAGE_SIZE&&console[_0x58addb(0x113)](_0x58addb(0x111)+REMOTE_APP_PAGE_SIZE+_0x58addb(0x17a)+_0x5bef6d[_0x58addb(0x189)]+'\x20apps.\x20'+_0x58addb(0x13b)),_0xa7285a;}
1
+ (function(_0x4879ae,_0x1f736c){const _0x3e43e3=a141_0x5d71,_0x3b6638=_0x4879ae();while(!![]){try{const _0x578c9a=parseInt(_0x3e43e3(0x188))/0x1+parseInt(_0x3e43e3(0x1f0))/0x2*(parseInt(_0x3e43e3(0x1f4))/0x3)+-parseInt(_0x3e43e3(0x202))/0x4*(parseInt(_0x3e43e3(0x1bd))/0x5)+parseInt(_0x3e43e3(0x1ca))/0x6*(parseInt(_0x3e43e3(0x1b3))/0x7)+parseInt(_0x3e43e3(0x1d8))/0x8*(-parseInt(_0x3e43e3(0x19d))/0x9)+parseInt(_0x3e43e3(0x1e1))/0xa+-parseInt(_0x3e43e3(0x1e9))/0xb;if(_0x578c9a===_0x1f736c)break;else _0x3b6638['push'](_0x3b6638['shift']());}catch(_0x1fda2c){_0x3b6638['push'](_0x3b6638['shift']());}}}(a141_0x1b11,0x6e49b));import{getCookie}from'../auth/get-cookie.js';import{getApiDomain,getRuntimeDomain}from'../constant/domain.js';import{CliError,CliErrors}from'../errors.js';import{extractList,extractPaging}from'../framework/response.js';import{normalizeEntityWithIdResponse}from'../utils/entity-with-id.js';let _activeCookie;export function setActiveCookie(_0x44c817){_activeCookie=_0x44c817||undefined;}export function clearActiveCookie(){_activeCookie=undefined;}const DEFAULT_REQUEST_TIMEOUT_MS=0x7530;function createFetchFailureError(_0x1804ea,_0xf404c1){const _0x19a847=a141_0x5d71,_0x34eeb4=_0xf404c1 instanceof Error?_0xf404c1[_0x19a847(0x21a)]:String(_0xf404c1);return CliErrors[_0x19a847(0x1f7)](_0x19a847(0x1d7)+_0x1804ea+(_0x34eeb4?'\x20('+_0x34eeb4+')':''),_0x19a847(0x183));}async function apiRequest(_0x2d1805,_0xd72c75={}){const _0x342233=a141_0x5d71,{method:method=_0x342233(0x1e0),body:_0x16b39f,headers:headers={},timeout:timeout=DEFAULT_REQUEST_TIMEOUT_MS,useRuntime:useRuntime=![]}=_0xd72c75,_0x48d819=useRuntime?getRuntimeDomain():getApiDomain(),_0x3504e3=_activeCookie||getCookie(),_0x35d99a=''+_0x48d819+_0x2d1805,_0xe7be50=new AbortController(),_0x3026ee=setTimeout(()=>_0xe7be50[_0x342233(0x1e4)](),timeout);try{const _0x53b892=await fetch(_0x35d99a,{'method':method,'headers':{'Content-Type':_0x342233(0x18d),'Cookie':_0x3504e3,'X-Invoke-Source':'cli:rabetbase',...headers},'body':_0x16b39f?JSON[_0x342233(0x197)](_0x16b39f):undefined,'signal':_0xe7be50['signal']});let _0x4198a7;try{_0x4198a7=await _0x53b892['json']();}catch{throw CliErrors[_0x342233(0x1f7)]('API\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x53b892[_0x342233(0x18f)]+')',_0x53b892[_0x342233(0x18f)]>=0x190?'Check\x20your\x20auth\x20cookie\x20and\x20try\x20again.':undefined);}if(!_0x53b892['ok']||_0x4198a7[_0x342233(0x1a0)]===![])throw CliErrors['apiError'](_0x4198a7[_0x342233(0x19c)]||_0x4198a7[_0x342233(0x21a)]||'API\x20error:\x20'+_0x53b892['status'],_0x4198a7[_0x342233(0x21b)]?_0x342233(0x194)+_0x4198a7[_0x342233(0x21b)]:undefined);return _0x4198a7;}catch(_0x4efcdf){if(_0x4efcdf instanceof CliError)throw _0x4efcdf;if(_0x4efcdf instanceof Error&&_0x4efcdf[_0x342233(0x1a7)]===_0x342233(0x1b5))throw CliErrors[_0x342233(0x1f7)](_0x342233(0x181)+_0x35d99a);throw createFetchFailureError(_0x35d99a,_0x4efcdf);}finally{clearTimeout(_0x3026ee);}}function isAuthFailure(_0x1a3c3a){const _0x4ebb5d=a141_0x5d71,_0x42cf5d=_0x1a3c3a[_0x4ebb5d(0x19c)]||_0x1a3c3a['message']||_0x1a3c3a[_0x4ebb5d(0x1cd)]?.[_0x4ebb5d(0x21a)]||_0x1a3c3a['errorMessage']||_0x1a3c3a[_0x4ebb5d(0x1c1)]||'';return _0x1a3c3a[_0x4ebb5d(0x21b)]===_0x4ebb5d(0x207)||_0x1a3c3a['code']===0x191||_0x1a3c3a['code']===_0x4ebb5d(0x1b9)||_0x42cf5d[_0x4ebb5d(0x20a)]('401')||_0x42cf5d[_0x4ebb5d(0x20a)](_0x4ebb5d(0x1ef))||_0x42cf5d[_0x4ebb5d(0x20a)]('登录')||_0x42cf5d[_0x4ebb5d(0x20a)]('认证');}export async function platformFetch(_0x5d54aa,_0x51f0ff){const _0x18f904=a141_0x5d71;let _0xc8457b;try{_0xc8457b=await fetch(_0x5d54aa,{'method':_0x51f0ff[_0x18f904(0x1dc)]??'GET','headers':{'Content-Type':_0x18f904(0x18d),'Cookie':_0x51f0ff[_0x18f904(0x1dd)],'X-Invoke-Source':_0x18f904(0x18e)},..._0x51f0ff[_0x18f904(0x1a1)]&&{'body':JSON[_0x18f904(0x197)](_0x51f0ff[_0x18f904(0x1a1)])}});}catch(_0x471db7){throw createFetchFailureError(_0x5d54aa,_0x471db7);}if(!_0xc8457b['ok']){if(_0xc8457b['status']===0x191)throw CliErrors[_0x18f904(0x195)]();throw CliErrors[_0x18f904(0x1f7)](_0x51f0ff[_0x18f904(0x199)]+_0x18f904(0x206)+_0xc8457b[_0x18f904(0x18f)]);}const _0x1614eb=await _0xc8457b[_0x18f904(0x1f3)]();if(_0x1614eb[_0x18f904(0x1a0)]===![]){if(isAuthFailure(_0x1614eb))throw CliErrors[_0x18f904(0x195)]();throw CliErrors[_0x18f904(0x1f7)](_0x1614eb[_0x18f904(0x19c)]||_0x1614eb[_0x18f904(0x21a)]||_0x51f0ff[_0x18f904(0x199)]+_0x18f904(0x1bc));}return _0x1614eb[_0x18f904(0x1cd)];}export async function listBffScripts(_0x2328ff,_0x2e5dcb,_0xefc57e){const _0x1c020c=a141_0x5d71;let _0x1535c7=_0x1c020c(0x1df)+_0x2328ff;if(_0x2e5dcb)_0x1535c7+='&type='+_0x2e5dcb;const _0x4c3b9c=await apiRequest(_0x1535c7);let _0x58c61b=extractList(_0x4c3b9c[_0x1c020c(0x1cd)]);if(_0xefc57e?.['scriptName']){const _0x504e31=_0xefc57e['scriptName'][_0x1c020c(0x19a)]();_0x58c61b=_0x58c61b[_0x1c020c(0x1a4)](_0x237d37=>_0x237d37[_0x1c020c(0x187)]?.['toLowerCase']()[_0x1c020c(0x20a)](_0x504e31)||_0x237d37[_0x1c020c(0x1d0)]?.[_0x1c020c(0x19a)]()['includes'](_0x504e31));}return _0x58c61b;}export async function getBffScriptInfo(_0x365af9){const _0x573358=a141_0x5d71,_0x491c8e=await apiRequest(_0x573358(0x1c0)+_0x365af9);if(!_0x491c8e['data'])throw CliErrors[_0x573358(0x1fb)]('BFF\x20script\x20not\x20found:\x20id='+_0x365af9);return _0x491c8e[_0x573358(0x1cd)];}export async function saveBffScript(_0x51c5d4){const _0x161692=a141_0x5d71,_0x702343=await apiRequest(_0x161692(0x21d),{'method':'POST','body':_0x51c5d4}),{id:_0x23a6b8,entity:_0x3213cf}=normalizeEntityWithIdResponse(_0x702343[_0x161692(0x1cd)]);if(_0x23a6b8!==undefined){const _0x1928c3=typeof _0x3213cf[_0x161692(0x187)]===_0x161692(0x1c8)||typeof _0x3213cf['scriptType']===_0x161692(0x1c8)?_0x3213cf:undefined;return{'id':_0x23a6b8,'script':_0x1928c3};}throw CliErrors[_0x161692(0x1f7)](_0x161692(0x1ac));}export async function deleteBffScript(_0x2015da){await apiRequest('/api/management/library/scripts/delete',{'method':'POST','body':{'id':_0x2015da}});}export async function getBffScriptStatistics(_0x3778dc){const _0x53b8a2=a141_0x5d71,_0x43b140=await apiRequest(_0x53b8a2(0x1d3)+_0x3778dc);return extractList(_0x43b140[_0x53b8a2(0x1cd)]);}export async function clearBffScriptCache(){const _0x4bc35d=a141_0x5d71,_0x318ddd=await apiRequest(_0x4bc35d(0x1a9),{'method':'POST','useRuntime':!![]});return typeof _0x318ddd[_0x4bc35d(0x1cd)]===_0x4bc35d(0x1c8)?_0x318ddd[_0x4bc35d(0x1cd)]:'';}export async function listBffDatasetOperations(_0x153aae,_0x3969ab){const _0x4161c5=a141_0x5d71,_0x19ad60=await apiRequest('/smartapi/dataset/get-dataset-operation',{'method':_0x4161c5(0x19e),'body':{'appCode':_0x153aae,'datasetId':_0x3969ab}});return _0x19ad60['data'];}export async function listSqlQueries(_0x236ce,_0x3ced8b){const _0x1b3c29=a141_0x5d71,_0x10a7df=await apiRequest(_0x1b3c29(0x211),{'method':_0x1b3c29(0x19e),'body':{'appCode':_0x236ce,'currentPage':_0x3ced8b?.[_0x1b3c29(0x1ad)]??0x1,'pageSize':_0x3ced8b?.[_0x1b3c29(0x1e7)]??0x32,'sqlCode':_0x3ced8b?.[_0x1b3c29(0x1da)],'sqlName':_0x3ced8b?.[_0x1b3c29(0x1b0)]}});return _0x10a7df[_0x1b3c29(0x1cd)];}export async function getSqlQueryInfo(_0x133880,_0x1e4a09){const _0x52afb0=a141_0x5d71,_0x2f5941=await listSqlQueries(_0x133880,{'sqlCode':_0x1e4a09}),_0x2df4d4=_0x2f5941[_0x52afb0(0x1be)]?.[0x0];if(!_0x2df4d4)throw CliErrors['validation']('SQL\x20query\x20not\x20found:\x20'+_0x1e4a09);return _0x2df4d4;}export async function getSqlQueryDetail(_0x4c3f20){const _0x2b5dd0=a141_0x5d71,_0x2b7ad8=await apiRequest('/smartapi/custom/getUserCustomSql'+(_0x2b5dd0(0x1c3)+encodeURIComponent(_0x4c3f20)));if(!_0x2b7ad8[_0x2b5dd0(0x1cd)])throw CliErrors['validation'](_0x2b5dd0(0x1a8)+_0x4c3f20);return _0x2b7ad8[_0x2b5dd0(0x1cd)];}export async function getSqlQueryDetailById(_0x15fdb9){const _0x228cca=a141_0x5d71,_0x55342a=await apiRequest(_0x228cca(0x20d)+_0x15fdb9);if(!_0x55342a['data'])throw CliErrors['validation'](_0x228cca(0x203)+_0x15fdb9);return _0x55342a[_0x228cca(0x1cd)];}function a141_0x5d71(_0x36c48a,_0x135e09){_0x36c48a=_0x36c48a-0x181;const _0x1b11c7=a141_0x1b11();let _0x5d7177=_0x1b11c7[_0x36c48a];return _0x5d7177;}export async function createSqlQuery(_0x4aa1cd){const _0x31f528=a141_0x5d71,_0x28e0b6=await apiRequest(_0x31f528(0x1ed),{'method':'POST','body':_0x4aa1cd}),{id:_0x1a8ec9,entity:_0x23ba58}=normalizeEntityWithIdResponse(_0x28e0b6[_0x31f528(0x1cd)]);if(!(_0x31f528(0x1da)in _0x23ba58)&&_0x1a8ec9)return getSqlQueryDetailById(_0x1a8ec9);return normalizeSqlQueryEntity(_0x23ba58);}export async function updateSqlQuery(_0x57690d){const _0x24f953=a141_0x5d71,_0x5125aa=await apiRequest('/smartapi/custom/updateUserCustomSql',{'method':_0x24f953(0x19e),'body':_0x57690d}),{id:_0x2bbc86,entity:_0x496b95}=normalizeEntityWithIdResponse(_0x5125aa[_0x24f953(0x1cd)]);if(!(_0x24f953(0x1da)in _0x496b95)){if(_0x57690d['sqlCode'])return getSqlQueryDetail(_0x57690d[_0x24f953(0x1da)]);if(_0x2bbc86)return getSqlQueryDetailById(_0x2bbc86);}return normalizeSqlQueryEntity(_0x496b95);}export async function deleteSqlQuery(_0x1af9f9){const _0x33878c=a141_0x5d71;await apiRequest(_0x33878c(0x1b8),{'method':_0x33878c(0x19e),'body':_0x1af9f9});}export async function saveSqlQuery(_0x12be18){const _0x181ee7=a141_0x5d71,_0x435d64=await apiRequest('/api/node-toolbox/sql/save',{'method':_0x181ee7(0x19e),'body':_0x12be18});return _0x435d64[_0x181ee7(0x1cd)];}function normalizeSqlQueryEntity(_0x3807a2){const _0x499110=a141_0x5d71;return{..._0x3807a2,'id':Number(_0x3807a2['id']),'dbId':_0x3807a2[_0x499110(0x1ae)]==null?undefined:Number(_0x3807a2[_0x499110(0x1ae)]),'version':_0x3807a2[_0x499110(0x186)]==null?undefined:Number(_0x3807a2[_0x499110(0x186)])};}export async function executeSql(_0x4498c2,_0x4680e8,_0x22e913){const _0x77f7c4=a141_0x5d71,_0x3ff36c=await apiRequest(_0x77f7c4(0x1fd),{'method':_0x77f7c4(0x19e),'body':{'appCode':_0x4498c2,'sqlCode':_0x4680e8,..._0x22e913&&{'params':_0x22e913}},'useRuntime':!![]});return _0x3ff36c[_0x77f7c4(0x1cd)];}export async function executeDatasetDataOperation(_0xf4795a,_0x520d2e,_0x2f0be3,_0x17f92f={}){const _0x136c63=a141_0x5d71;try{const _0x92023b=await apiRequest(_0x136c63(0x19f)+_0xf4795a+'/'+_0x520d2e+'/'+_0x2f0be3,{'method':'POST','body':_0x17f92f,'useRuntime':!![]});return _0x92023b[_0x136c63(0x1cd)];}catch(_0x47d991){if(_0x2f0be3===_0x136c63(0x219)&&_0x47d991 instanceof CliError&&_0x47d991[_0x136c63(0x1d4)]===_0x136c63(0x20c)&&_0x17f92f['id']!==undefined&&_0x17f92f['id']!==null&&_0x17f92f['id']!==''){const _0x5df674=await apiRequest('/api/'+_0xf4795a+'/'+_0x520d2e+_0x136c63(0x190),{'method':_0x136c63(0x19e),'body':{'where':{'id':{'$eq':_0x17f92f['id']}},'currentPage':0x1,'pageSize':0x1},'useRuntime':!![]}),_0x3e84a4=Array[_0x136c63(0x193)](_0x5df674[_0x136c63(0x1cd)]?.[_0x136c63(0x1be)])?_0x5df674[_0x136c63(0x1cd)]['tableData']:[];return _0x3e84a4[0x0]??null;}throw _0x47d991;}}export async function listDatasets(_0x5a5323,_0x374ceb){const _0x45ed56=a141_0x5d71,_0x4252dd={'appCode':_0x5a5323,'deleted':![]};if(_0x374ceb?.[_0x45ed56(0x1d4)])_0x4252dd[_0x45ed56(0x1d4)]=_0x374ceb[_0x45ed56(0x1d4)];if(_0x374ceb?.[_0x45ed56(0x1a7)])_0x4252dd[_0x45ed56(0x1a7)]=_0x374ceb[_0x45ed56(0x1a7)];const _0x315e3e=await apiRequest(_0x45ed56(0x1f9),{'method':_0x45ed56(0x19e),'body':_0x4252dd});return extractList(_0x315e3e[_0x45ed56(0x1cd)]);}export async function deleteDataset(_0x2f8d9d,_0x47a565){const _0x2cfd39=a141_0x5d71;await apiRequest(_0x2cfd39(0x1b7),{'method':_0x2cfd39(0x19e),'body':{'appCode':_0x2f8d9d,'datasetId':_0x47a565}});}export async function searchDatasets(_0x2b20e3,_0x249d8b){const _0x11c706=a141_0x5d71,_0x278ce4=await listDatasets(_0x2b20e3,{'name':_0x249d8b}),_0x15e317=_0x249d8b[_0x11c706(0x19a)](),_0x4b73f5=new Set(_0x278ce4[_0x11c706(0x1b4)](_0xb0fa62=>_0xb0fa62['id'])),_0x432329=_0x278ce4[_0x11c706(0x1a4)](_0x4724ea=>_0x4724ea['dbtableConfig']?.[_0x11c706(0x208)]?.[_0x11c706(0x19a)]()[_0x11c706(0x20a)](_0x15e317)||_0x4724ea[_0x11c706(0x1d0)]?.['toLowerCase']()[_0x11c706(0x20a)](_0x15e317)),_0x23ee78=await listDatasets(_0x2b20e3,{'code':_0x249d8b});for(const _0x18e8a9 of _0x23ee78){!_0x4b73f5[_0x11c706(0x1de)](_0x18e8a9['id'])&&(_0x278ce4['push'](_0x18e8a9),_0x4b73f5[_0x11c706(0x1aa)](_0x18e8a9['id']));}return _0x278ce4;}export function normalizeDatasetOperations(_0x51d651){const _0x303a2c=a141_0x5d71;if(Array['isArray'](_0x51d651))return _0x51d651[_0x303a2c(0x1a4)](_0x50615e=>_0x50615e!=null&&typeof _0x50615e===_0x303a2c(0x210));if(_0x51d651&&typeof _0x51d651===_0x303a2c(0x210))return Object['entries'](_0x51d651)[_0x303a2c(0x1a4)](([,_0x4c3116])=>_0x4c3116!=null&&typeof _0x4c3116===_0x303a2c(0x210))[_0x303a2c(0x1b4)](([_0x125185,_0x5f1ab2])=>({..._0x5f1ab2,'name':_0x5f1ab2[_0x303a2c(0x1a7)]??_0x5f1ab2[_0x303a2c(0x1bf)]??_0x125185}));return[];}export async function getDatasetDetail(_0x15ba3c){const _0x25d4c2=a141_0x5d71,_0x5506fa=/^\d+$/[_0x25d4c2(0x1b1)](_0x15ba3c)?'id':_0x25d4c2(0x1d4),_0x8c0b0f=await apiRequest(_0x25d4c2(0x1ce)+_0x5506fa+'='+_0x15ba3c);return _0x8c0b0f[_0x25d4c2(0x1cd)];}export async function updateDrivenData(_0x4c9e47){const _0x143509=a141_0x5d71,_0x1cfa11=await apiRequest(_0x143509(0x209),{'method':_0x143509(0x19e),'body':_0x4c9e47});return _0x1cfa11[_0x143509(0x1cd)];}export async function getDatasetOperations(_0x2f5494){const _0x3c8894=a141_0x5d71,_0x460e3f=await getDatasetDetail(_0x2f5494),_0x3ef45a=normalizeDatasetOperations(_0x460e3f['operations'])[_0x3c8894(0x1b4)](_0x33ac29=>({'name':_0x33ac29[_0x3c8894(0x1a7)]||_0x33ac29['operationName'],'displayName':_0x33ac29[_0x3c8894(0x1db)]||_0x33ac29[_0x3c8894(0x1a7)],'type':_0x33ac29[_0x3c8894(0x1bb)],'method':_0x33ac29[_0x3c8894(0x1dc)],'path':_0x33ac29['path'],'enabled':_0x33ac29[_0x3c8894(0x212)]??!![],'requestFields':_0x33ac29[_0x3c8894(0x1f2)],'responseFields':_0x33ac29[_0x3c8894(0x1f5)]}));return{'dataset':{'id':_0x460e3f['id']??_0x460e3f[_0x3c8894(0x185)],'name':_0x460e3f['name'],'code':_0x460e3f['code']||_0x460e3f[_0x3c8894(0x1a3)],'tableName':_0x460e3f['tableName']||_0x460e3f[_0x3c8894(0x1f8)]?.[_0x3c8894(0x208)]},'operations':_0x3ef45a};}export async function getOperationDetail(_0x5e0b06,_0x59807e,_0x4b7fc2){const _0x1953b7=a141_0x5d71;let _0x371f44=_0x59807e;if(!/^\d+$/['test'](_0x59807e)){const _0x368cae=await listDatasets(_0x5e0b06,{'code':_0x59807e}),_0x116fba=_0x368cae[_0x1953b7(0x19b)](_0x35d31a=>_0x35d31a['code']===_0x59807e||String(_0x35d31a['id'])===_0x59807e);if(!_0x116fba)throw CliErrors['validation'](_0x1953b7(0x189)+_0x59807e);_0x371f44=String(_0x116fba['id']);}const _0x98cca8=await getDatasetDetail(_0x371f44),_0x56f2b9=normalizeDatasetOperations(_0x98cca8['operations'])[_0x1953b7(0x19b)](_0x3de9f9=>(_0x3de9f9[_0x1953b7(0x1a7)]||_0x3de9f9[_0x1953b7(0x1bf)])===_0x4b7fc2);if(!_0x56f2b9)throw CliErrors['validation'](_0x1953b7(0x1e3)+_0x4b7fc2+_0x1953b7(0x216)+_0x59807e);return{'dataset':{'id':_0x98cca8['id']??_0x98cca8[_0x1953b7(0x185)],'name':_0x98cca8[_0x1953b7(0x1a7)],'code':_0x98cca8[_0x1953b7(0x1d4)]||_0x98cca8['modelCode'],'tableName':_0x98cca8[_0x1953b7(0x208)]||_0x98cca8[_0x1953b7(0x1f8)]?.[_0x1953b7(0x208)]},'operation':_0x56f2b9};}export async function startGenerateStandardPages(_0x4064db,_0x432a4f,_0x53c714){const _0x4642d4=a141_0x5d71,_0x534bea=await apiRequest(_0x4642d4(0x18b)+_0x432a4f+_0x4642d4(0x204),{'method':_0x4642d4(0x19e),'body':{'appCode':_0x4064db,..._0x53c714?.['clientOperationId']?{'clientOperationId':_0x53c714[_0x4642d4(0x1ee)]}:{}},'timeout':DEFAULT_REQUEST_TIMEOUT_MS});return _0x534bea[_0x4642d4(0x1cd)];}export async function getGenerateStandardPagesStatus(_0x43a375,_0x2189dc,_0x309926){const _0x435063=a141_0x5d71,_0x28970c=new URLSearchParams({'appCode':_0x43a375});_0x309926[_0x435063(0x1c6)]&&_0x28970c[_0x435063(0x1eb)]('operationId',_0x309926[_0x435063(0x1c6)]);_0x309926[_0x435063(0x1ee)]&&_0x28970c[_0x435063(0x1eb)](_0x435063(0x1ee),_0x309926['clientOperationId']);const _0x48773f=await apiRequest(_0x435063(0x18b)+_0x2189dc+_0x435063(0x201)+_0x28970c[_0x435063(0x1d6)]());return _0x48773f['data'];}export async function getStandardPageStatus(_0x2c1ec1,_0x15abcd){const _0x403ad7=a141_0x5d71,_0x5f1b4c=await apiRequest(_0x403ad7(0x18b)+_0x15abcd+'/standard-page-status?appCode='+encodeURIComponent(_0x2c1ec1));return _0x5f1b4c[_0x403ad7(0x1cd)];}export async function tryGetStandardPageStatus(_0x381d70,_0x2c6bca){const _0x36b7a0=a141_0x5d71;try{return await getStandardPageStatus(_0x381d70,_0x2c6bca);}catch(_0x2e1e19){if(_0x2e1e19 instanceof CliError&&_0x2e1e19[_0x36b7a0(0x1d4)]===_0x36b7a0(0x20c)&&/404|not found|non-json response/i[_0x36b7a0(0x1b1)](_0x2e1e19[_0x36b7a0(0x21a)]))return null;throw _0x2e1e19;}}export async function syncStandardPages(_0x433915,_0x1ba60e){const _0x2f1bbf=a141_0x5d71,_0x2c9f8d=await apiRequest('/smartapi/lovrabet/dataset/'+_0x1ba60e+_0x2f1bbf(0x1b2),{'method':_0x2f1bbf(0x19e),'body':{'appCode':_0x433915}});return _0x2c9f8d['data'];}function a141_0x1b11(){const _0x42b2b4=['responseFields','/smartapi/dblink/testConnect','apiError','dbtableConfig','/smartapi/dataset/get-dataset-list','totalCount','validation','/smartapi/question/er-config/update-single','/api/custom/executeSql','join','length','tableList','/generate-standard-pages/status?','239416HXCmHE','SQL\x20query\x20not\x20found:\x20id=','/generate-standard-pages/start','/smartapi/dblink/getTableDiffV2ByPage','\x20failed,\x20HTTP\x20','UNAUTHORIZED','tableName','/smartapi/dataset/update-driven-data','includes','.update(id,\x20{\x20/*\x20fields\x20*/\x20});','api_error','/smartapi/custom/getUserCustomSql?id=','target','includeImports','object','/smartapi/custom/queryUserCustomSqlList','enabled','//\x20','/smartapi/dblink/getList','/smartapi/dblink/update','\x22\x20not\x20found\x20in\x20dataset\x20','\x20\x20params:\x20{\x20/*\x20parameter\x20values\x20*/\x20},','const\x20result\x20=\x20await\x20client.models.','getOne','message','errorCode','.filter({','/api/management/library/scripts/save','Request\x20timeout:\x20','\x20of\x20','Check\x20network\x20connectivity\x20and\x20try\x20again.','Use\x20the\x20platform\x20console\x20to\x20see\x20all.','modelId','version','functionName','472493xVmNpU','Dataset\x20not\x20found:\x20','\x20\x20\x20\x20sqlCode:\x20\x27','/smartapi/lovrabet/dataset/','\x20\x20});','application/json','cli:rabetbase','status','/filter','Warning:\x20showing\x20first\x20','update','isArray','API\x20error\x20code:\x20','authRequired','/smartapi/db-analysis/status/','stringify','/smartapi/question/er-config/erDelete','label','toLowerCase','find','errorMsg','7616178uqCTlJ','POST','/api/','success','body','\x20apps.\x20','modelCode','filter','warn','.remove(id);','name','SQL\x20query\x20not\x20found:\x20','/api/management/script/cache/clear','add','const\x20client\x20=\x20new\x20LovrabetClient({\x20appCode:\x20\x27<YOUR_APP_CODE>\x27\x20});','BFF\x20save\x20returned\x20no\x20valid\x20id','currentPage','dbId','entries','sqlName','test','/sync-to-pages','924rYELZz','map','AbortError','/smartapi/lovrabet/detail?pageId=','/smartapi/dataset/delete-dataset','/smartapi/custom/deleteUserCustomSql','401','/smartapi/db-analysis/start','type','\x20failed','15soiscp','tableData','operationName','/api/management/library/scripts/info?id=','error','remove','?sqlCode=','/smartapi/dblink/delete','/smartapi/db-analysis/jobs/cancel','operationId','sdk','string','replace','20802IBWnOu','dataset_','});','data','/smartapi/dataset/get-driven-data?','\x20\x20currentPage:\x201,','description','\x20\x20const\x20rows\x20=\x20await\x20context.client.sql.execute({','Page\x20not\x20found:\x20','/api/management/library/scripts/statistics?appCode=','code','planId','toString','Request\x20failed:\x20','8rbIHov','const\x20data\x20=\x20await\x20client.sql.execute({','sqlCode','displayName','method','cookie','has','/api/management/library/scripts/list?appCode=','GET','7388220AoAkZP','push','Operation\x20\x22','abort','/smartapi/app/getList','/smartapi/question/er-config','pageSize','/smartapi/dblink/create','7113359NvhZqE','//\x20BFF\x20context:\x20context.client.sql.execute\x20returns\x20rows\x20directly','set','import\x20{\x20LovrabetClient\x20}\x20from\x20\x27@lovrabet/sdk\x27;','/smartapi/custom/saveUserCustomSql','clientOperationId','Unauthorized','1154Pvjexr','const\x20results\x20=\x20data.execResult\x20||\x20[];','requestFields','json','2367dsKzdN'];a141_0x1b11=function(){return _0x42b2b4;};return a141_0x1b11();}export async function getPageDetail(_0x41dbdd){const _0x23cc2b=a141_0x5d71,_0x3193a2=await apiRequest(_0x23cc2b(0x1b6)+_0x41dbdd);if(!_0x3193a2[_0x23cc2b(0x1cd)])throw CliErrors[_0x23cc2b(0x1fb)](_0x23cc2b(0x1d2)+_0x41dbdd);return _0x3193a2[_0x23cc2b(0x1cd)];}export async function updatePage(_0x5bf1ce,_0x206f69,_0x2317b9,_0x1967bc){const _0x51e61=a141_0x5d71,_0x3589bc=await apiRequest('/smartapi/lovrabet/update-page',{'method':_0x51e61(0x19e),'body':{'appCode':_0x5bf1ce,'pageId':_0x206f69,'code':_0x2317b9,'datasetIds':_0x1967bc}});return _0x3589bc['data'];}export function generateSdkCode(_0x58ea9a,_0x211348,_0x192cd9){const _0x1ee56f=a141_0x5d71,_0x50fee5=_0x192cd9?.[_0x1ee56f(0x20f)]??!![],_0x567425=_0x1ee56f(0x1cb)+_0x58ea9a['code']?.[_0x1ee56f(0x1c9)](/-/g,'_'),_0x1cb7d2=_0x211348[_0x1ee56f(0x1a7)]||_0x211348[_0x1ee56f(0x1bf)]||_0x1ee56f(0x1a4),_0x317b63=[];_0x50fee5&&_0x317b63[_0x1ee56f(0x1e2)](_0x1ee56f(0x1ec),'',_0x1ee56f(0x1ab),'');_0x317b63['push'](_0x1ee56f(0x213)+_0x58ea9a[_0x1ee56f(0x1a7)]+'\x20('+(_0x58ea9a['tableName']||'table')+')');if(_0x1cb7d2===_0x1ee56f(0x1a4))_0x317b63[_0x1ee56f(0x1e2)](_0x1ee56f(0x218)+_0x567425+_0x1ee56f(0x21c),'\x20\x20where:\x20{},','\x20\x20pageSize:\x2020,',_0x1ee56f(0x1cf),_0x1ee56f(0x1cc));else{if(_0x1cb7d2===_0x1ee56f(0x219))_0x317b63[_0x1ee56f(0x1e2)](_0x1ee56f(0x218)+_0x567425+'.getOne(id);');else{if(_0x1cb7d2==='create')_0x317b63['push'](_0x1ee56f(0x218)+_0x567425+'.create({\x20/*\x20fields\x20*/\x20});');else{if(_0x1cb7d2===_0x1ee56f(0x192))_0x317b63[_0x1ee56f(0x1e2)](_0x1ee56f(0x218)+_0x567425+_0x1ee56f(0x20b));else _0x1cb7d2==='delete'||_0x1cb7d2===_0x1ee56f(0x1c2)?_0x317b63['push'](_0x1ee56f(0x218)+_0x567425+_0x1ee56f(0x1a6)):_0x317b63[_0x1ee56f(0x1e2)](_0x1ee56f(0x218)+_0x567425+'.'+_0x1cb7d2+'(/*\x20params\x20*/);');}}}return _0x317b63[_0x1ee56f(0x1fe)]('\x0a');}export function generateSqlCodeTemplate(_0x44ef06,_0x12e4be){const _0x3908c6=a141_0x5d71,_0x57ee9d=_0x12e4be?.[_0x3908c6(0x20e)]??_0x3908c6(0x1c7),_0x57a485=_0x12e4be?.[_0x3908c6(0x20f)]??!![],_0x5435ce=[];return _0x5435ce['push']('//\x20SQL:\x20'+_0x44ef06[_0x3908c6(0x1b0)]+'\x20('+_0x44ef06[_0x3908c6(0x1da)]+')'),_0x57ee9d===_0x3908c6(0x1c7)?(_0x57a485&&_0x5435ce['push'](_0x3908c6(0x1ec),'',_0x3908c6(0x1ab),''),_0x5435ce['push'](_0x3908c6(0x1d9),'\x20\x20sqlCode:\x20\x27'+_0x44ef06[_0x3908c6(0x1da)]+'\x27,',_0x3908c6(0x217),_0x3908c6(0x1cc),'if\x20(!data.execSuccess)\x20throw\x20new\x20Error(\x27SQL\x20execution\x20failed\x27);',_0x3908c6(0x1f1))):_0x5435ce[_0x3908c6(0x1e2)](_0x3908c6(0x1ea),'export\x20default\x20async\x20function\x20handler(params,\x20context)\x20{',_0x3908c6(0x1d1),_0x3908c6(0x18a)+_0x44ef06[_0x3908c6(0x1da)]+'\x27,','\x20\x20\x20\x20params:\x20{\x20/*\x20parameter\x20values\x20*/\x20},',_0x3908c6(0x18c),'\x20\x20return\x20rows;','}'),_0x5435ce[_0x3908c6(0x1fe)]('\x0a');}export async function getErConfig(_0x377ddd,_0x4bc88f){const _0x51436c=a141_0x5d71,_0x2085cf=await apiRequest(_0x51436c(0x1e6),{'method':'POST','body':{'appCode':_0x377ddd,'dblinkId':_0x4bc88f}});return _0x2085cf[_0x51436c(0x1cd)];}export async function createErRelation(_0x4baf43){const _0x23d287=a141_0x5d71,_0xfc226=await apiRequest('/smartapi/question/er-config/erCreate',{'method':_0x23d287(0x19e),'body':_0x4baf43});return _0xfc226['data'];}export async function updateErRelation(_0x1fdb54){const _0x577f33=a141_0x5d71,_0xfe48ac=await apiRequest(_0x577f33(0x1fc),{'method':_0x577f33(0x19e),'body':_0x1fdb54});return _0xfe48ac['data'];}export async function deleteErRelation(_0x289c6b){const _0x22eb90=a141_0x5d71,_0x26ef26=await apiRequest(_0x22eb90(0x198),{'method':_0x22eb90(0x19e),'body':_0x289c6b});return _0x26ef26[_0x22eb90(0x1cd)];}function buildQuery(_0x346aa5){const _0x2c97af=a141_0x5d71,_0x19e668=new URLSearchParams();for(const [_0x29d445,_0x39ab74]of Object[_0x2c97af(0x1af)](_0x346aa5)){if(_0x39ab74===undefined||_0x39ab74==='')continue;_0x19e668['set'](_0x29d445,String(_0x39ab74));}const _0x122127=_0x19e668[_0x2c97af(0x1d6)]();return _0x122127?'?'+_0x122127:'';}export async function listDbLinks(_0x5c2a4a,_0x4d7de8){const _0x5286a3=a141_0x5d71,_0xcfb33b=await apiRequest(_0x5286a3(0x214),{'method':_0x5286a3(0x19e),'body':{'appCode':_0x5c2a4a,'currentPage':_0x4d7de8?.[_0x5286a3(0x1ad)]??0x1,'pageSize':_0x4d7de8?.[_0x5286a3(0x1e7)]??0x64}});return{'items':extractList(_0xcfb33b[_0x5286a3(0x1cd)]),'paging':extractPaging(_0xcfb33b[_0x5286a3(0x1cd)])};}export async function getDbLinkInfo(_0xa0fa67){const _0xbfb374=a141_0x5d71,_0x48e9b6=await apiRequest('/smartapi/dblink/getOne'+buildQuery({'id':_0xa0fa67}));return _0x48e9b6[_0xbfb374(0x1cd)];}export async function createDbLink(_0x1f01c7){const _0x26d72c=a141_0x5d71,_0xa89152=await apiRequest(_0x26d72c(0x1e8),{'method':_0x26d72c(0x19e),'body':_0x1f01c7});return _0xa89152[_0x26d72c(0x1cd)];}export async function updateDbLink(_0xe20679){const _0x54e311=a141_0x5d71,_0x3f243f=await apiRequest(_0x54e311(0x215),{'method':_0x54e311(0x19e),'body':_0xe20679});return _0x3f243f[_0x54e311(0x1cd)];}export async function deleteDbLink(_0x3ea05d){const _0x62c598=a141_0x5d71;await apiRequest(_0x62c598(0x1c4),{'method':_0x62c598(0x19e),'body':{'id':_0x3ea05d}});}export async function testDbLinkConnect(_0xe2a04){const _0x5b2196=a141_0x5d71,_0x37c101=await apiRequest(_0x5b2196(0x1f6)+buildQuery({'id':_0xe2a04}));return _0x37c101['data'];}export async function startDbAnalysis(_0x4fd58b,_0x26c704){const _0x343300=a141_0x5d71,_0x10f822=await apiRequest(_0x343300(0x1ba),{'method':_0x343300(0x19e),'body':{'dbLinkId':_0x4fd58b,..._0x26c704&&_0x26c704[_0x343300(0x1ff)]>0x0?{'tableNames':_0x26c704}:{}}}),_0x16b871=_0x10f822[_0x343300(0x1cd)];if(typeof _0x16b871===_0x343300(0x1c8))return _0x16b871;if(_0x16b871&&typeof _0x16b871===_0x343300(0x210)&&typeof _0x16b871[_0x343300(0x1d5)]===_0x343300(0x1c8))return _0x16b871[_0x343300(0x1d5)];return _0x16b871!=null?String(_0x16b871):'';}export async function cancelDbAnalysis(_0x31a9c5){const _0x5b6c4d=a141_0x5d71;await apiRequest(_0x5b6c4d(0x1c5)+buildQuery({'planId':_0x31a9c5}),{'method':_0x5b6c4d(0x19e)});}export async function getDbAnalysisStatus(_0x2b0bfb){const _0x27fab6=a141_0x5d71,_0x4af76e=await apiRequest(_0x27fab6(0x196)+encodeURIComponent(_0x2b0bfb));return _0x4af76e[_0x27fab6(0x1cd)];}export async function getDbAllTableList(_0x591878,_0x209106){const _0x2d7b1c=a141_0x5d71,_0x2ed3fe=await apiRequest('/smartapi/dblink/getAllTableList'+buildQuery({'appCode':_0x591878,'dbLinkId':_0x209106})),_0x53e7a8=_0x2ed3fe[_0x2d7b1c(0x1cd)];if(Array[_0x2d7b1c(0x193)](_0x53e7a8))return _0x53e7a8;return extractList(_0x53e7a8);}export async function getDbTableDiff(_0x59f9eb,_0x47af94,_0x32d163){const _0xb32f02=a141_0x5d71,_0x1d6514=await apiRequest(_0xb32f02(0x205)+buildQuery({'appCode':_0x59f9eb,'dbLinkId':_0x47af94,'pageIndex':_0x32d163?.['pageIndex']??0x1,'pageSize':_0x32d163?.[_0xb32f02(0x1e7)]??0x14,'tableName':_0x32d163?.[_0xb32f02(0x208)]})),_0x541b36=_0x1d6514[_0xb32f02(0x1cd)];return{'totalCount':_0x541b36?.['totalCount']??0x0,'tableList':Array[_0xb32f02(0x193)](_0x541b36?.['tableList'])?_0x541b36[_0xb32f02(0x200)]:[]};}const REMOTE_APP_PAGE_SIZE=0xc8;export async function listRemoteApps(){const _0x570be4=a141_0x5d71,_0x38707d=await apiRequest(_0x570be4(0x1e5),{'method':_0x570be4(0x19e),'body':{'currentPage':0x1,'pageSize':REMOTE_APP_PAGE_SIZE}}),_0x1286ec=extractList(_0x38707d['data']),_0xeccefd=extractPaging(_0x38707d[_0x570be4(0x1cd)]);return _0xeccefd&&_0xeccefd[_0x570be4(0x1fa)]>REMOTE_APP_PAGE_SIZE&&console[_0x570be4(0x1a5)](_0x570be4(0x191)+REMOTE_APP_PAGE_SIZE+_0x570be4(0x182)+_0xeccefd[_0x570be4(0x1fa)]+_0x570be4(0x1a2)+_0x570be4(0x184)),_0x1286ec;}
@@ -1 +1 @@
1
- const a142_0x2bd372=a142_0x1fb9;(function(_0x30e4c0,_0x5627b9){const _0x48bc4d=a142_0x1fb9,_0x1cf348=_0x30e4c0();while(!![]){try{const _0x52122e=-parseInt(_0x48bc4d(0xa1))/0x1*(-parseInt(_0x48bc4d(0xa9))/0x2)+-parseInt(_0x48bc4d(0xaa))/0x3+parseInt(_0x48bc4d(0xa2))/0x4*(parseInt(_0x48bc4d(0xab))/0x5)+-parseInt(_0x48bc4d(0xa0))/0x6*(parseInt(_0x48bc4d(0xa3))/0x7)+-parseInt(_0x48bc4d(0xad))/0x8*(-parseInt(_0x48bc4d(0xa7))/0x9)+-parseInt(_0x48bc4d(0xa4))/0xa*(-parseInt(_0x48bc4d(0xa8))/0xb)+-parseInt(_0x48bc4d(0xae))/0xc;if(_0x52122e===_0x5627b9)break;else _0x1cf348['push'](_0x1cf348['shift']());}catch(_0x8fcfc8){_0x1cf348['push'](_0x1cf348['shift']());}}}(a142_0x4fe0,0x8efa0));function a142_0x1fb9(_0x5c3214,_0x4c7647){_0x5c3214=_0x5c3214-0xa0;const _0x4fe08f=a142_0x4fe0();let _0x1fb9e8=_0x4fe08f[_0x5c3214];return _0x1fb9e8;}import{resolve}from'node:path';import{findProjectRootDirectory}from'../../context.js';const DOT_DIR=a142_0x2bd372(0xac),LOCK_FILE_NAME=a142_0x2bd372(0xa5),TRASH_DIR_NAME=a142_0x2bd372(0xa6);export function loadBffProjectConfig(_0x4fb649,_0x3a6114){const _0xeebd88=resolve(_0x3a6114??findProjectRootDirectory()),_0x22a8b9=DOT_DIR+'/bff',_0x384ca9=_0x22a8b9+'/'+_0x4fb649;return{'projectRoot':_0xeebd88,'appCode':_0x4fb649,'scriptsBaseDir':DOT_DIR,'scriptsWorkspaceRoot':_0x22a8b9,'scriptsRoot':_0x384ca9,'scriptsRootDir':resolve(_0xeebd88,DOT_DIR,'bff',_0x4fb649),'lockFilePath':resolve(_0xeebd88,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0xeebd88,DOT_DIR,TRASH_DIR_NAME)};}function a142_0x4fe0(){const _0x2e0d49=['2880585FSQUyS','4456800wGGoxl','.rabetbase','48weqSyS','23075184LuDADQ','36lAQBmi','3319KiDqUm','4QIByDZ','255381LQZXgD','40VjRBDv','bff.lock.json','bff-trash','1570527ykzLXN','1625107cxvoqd','698WVgMxf'];a142_0x4fe0=function(){return _0x2e0d49;};return a142_0x4fe0();}
1
+ const a142_0x477110=a142_0x4626;(function(_0x2d2dd6,_0x25bd97){const _0x28cfd8=a142_0x4626,_0x28a1ae=_0x2d2dd6();while(!![]){try{const _0x9f298c=parseInt(_0x28cfd8(0x199))/0x1+-parseInt(_0x28cfd8(0x1a1))/0x2+-parseInt(_0x28cfd8(0x19c))/0x3+-parseInt(_0x28cfd8(0x19a))/0x4+-parseInt(_0x28cfd8(0x1a5))/0x5*(-parseInt(_0x28cfd8(0x19b))/0x6)+-parseInt(_0x28cfd8(0x1a4))/0x7+parseInt(_0x28cfd8(0x1a3))/0x8*(parseInt(_0x28cfd8(0x19f))/0x9);if(_0x9f298c===_0x25bd97)break;else _0x28a1ae['push'](_0x28a1ae['shift']());}catch(_0x4a945a){_0x28a1ae['push'](_0x28a1ae['shift']());}}}(a142_0x1906,0x39f60));import{resolve}from'node:path';import{findProjectRootDirectory}from'../../context.js';function a142_0x4626(_0x56119b,_0x2806d1){_0x56119b=_0x56119b-0x199;const _0x190656=a142_0x1906();let _0x46265a=_0x190656[_0x56119b];return _0x46265a;}function a142_0x1906(){const _0x5c677d=['334770xypYXb','1841368UOuEXt','11922BDpdZm','1164294hpJaaE','bff','.rabetbase','117awkKJd','/bff','841558odEwOd','bff-trash','484104LjaVDC','266301PONwzP','1065aqSalH','bff.lock.json'];a142_0x1906=function(){return _0x5c677d;};return a142_0x1906();}const DOT_DIR=a142_0x477110(0x19e),LOCK_FILE_NAME=a142_0x477110(0x1a6),TRASH_DIR_NAME=a142_0x477110(0x1a2);export function loadBffProjectConfig(_0x231f82,_0x54b018){const _0x4b2431=a142_0x477110,_0x4f9260=resolve(_0x54b018??findProjectRootDirectory()),_0x4daa1e=DOT_DIR+_0x4b2431(0x1a0),_0x3cab34=_0x4daa1e+'/'+_0x231f82;return{'projectRoot':_0x4f9260,'appCode':_0x231f82,'scriptsBaseDir':DOT_DIR,'scriptsWorkspaceRoot':_0x4daa1e,'scriptsRoot':_0x3cab34,'scriptsRootDir':resolve(_0x4f9260,DOT_DIR,_0x4b2431(0x19d),_0x231f82),'lockFilePath':resolve(_0x4f9260,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x4f9260,DOT_DIR,TRASH_DIR_NAME)};}
@@ -1 +1 @@
1
- function a143_0x1e65(_0x24a9aa,_0x5546ba){_0x24a9aa=_0x24a9aa-0x95;const _0x210fa8=a143_0x210f();let _0x1e65ac=_0x210fa8[_0x24a9aa];return _0x1e65ac;}const a143_0x545416=a143_0x1e65;(function(_0x55c724,_0x48bfeb){const _0x2499e6=a143_0x1e65,_0x5a3759=_0x55c724();while(!![]){try{const _0x5a749b=parseInt(_0x2499e6(0xa4))/0x1+parseInt(_0x2499e6(0x9f))/0x2+parseInt(_0x2499e6(0xb2))/0x3*(parseInt(_0x2499e6(0xa9))/0x4)+parseInt(_0x2499e6(0x9b))/0x5*(parseInt(_0x2499e6(0xa1))/0x6)+parseInt(_0x2499e6(0xaf))/0x7*(-parseInt(_0x2499e6(0xb6))/0x8)+parseInt(_0x2499e6(0xb4))/0x9+parseInt(_0x2499e6(0xb9))/0xa*(-parseInt(_0x2499e6(0x9e))/0xb);if(_0x5a749b===_0x48bfeb)break;else _0x5a3759['push'](_0x5a3759['shift']());}catch(_0x45f598){_0x5a3759['push'](_0x5a3759['shift']());}}}(a143_0x210f,0xaf110));import{access,mkdir,readdir,stat}from'node:fs/promises';import{constants}from'node:fs';import{dirname,join}from'node:path';import{findHookLocationByRemoteId,snakeToCamel}from'../../core/bff/utils.js';export const SUPPORTED_BFF_TYPES=[a143_0x545416(0xab),'ENDPOINT',a143_0x545416(0xa7)];export function normalizeBffType(_0x57d3a6){const _0x4431eb=a143_0x545416;if(!_0x57d3a6)return undefined;const _0x149c16=_0x57d3a6[_0x4431eb(0xa3)]()[_0x4431eb(0xa8)]();return SUPPORTED_BFF_TYPES[_0x4431eb(0x9c)](_0x149c16)?_0x149c16:undefined;}async function scanJsFilesRecursively(_0xf6c89f,_0x3250b8){const _0x5700d3=a143_0x545416,_0x59deb7=[];try{const _0x52e080=await readdir(_0xf6c89f,{'withFileTypes':!![]});for(const _0x3c2243 of _0x52e080){const _0x50f5d3=join(_0xf6c89f,_0x3c2243[_0x5700d3(0x99)]);if(_0x3c2243[_0x5700d3(0xaa)]())_0x59deb7[_0x5700d3(0xa0)](...await scanJsFilesRecursively(_0x50f5d3,_0x3250b8+'/'+_0x3c2243[_0x5700d3(0x99)]));else _0x3c2243['isFile']()&&_0x3c2243[_0x5700d3(0x99)][_0x5700d3(0xb7)](_0x5700d3(0xbc))&&_0x59deb7[_0x5700d3(0xa0)]({'lockKey':_0x3250b8+'/'+_0x3c2243['name'][_0x5700d3(0x98)](/\.js$/,''),'filePath':_0x50f5d3});}}catch(_0x53c731){if(_0x53c731[_0x5700d3(0xb8)]!==_0x5700d3(0xba))throw _0x53c731;}return _0x59deb7;}async function scanFlatFunctions(_0x8d1458,_0x1259fc){const _0x14c42c=a143_0x545416,_0x1e7799=join(_0x8d1458['scriptsRootDir'],_0x1259fc),_0x225b1=await scanJsFilesRecursively(_0x1e7799,_0x1259fc);return _0x225b1[_0x14c42c(0xb0)](({lockKey:_0x3172ee,filePath:_0x13010f})=>({'type':_0x1259fc,'name':_0x3172ee[_0x14c42c(0xad)]('/')['at'](-0x1)??'','filePath':_0x13010f,'lockKey':_0x3172ee}));}async function scanHookFunctions(_0x3b1c27){const _0x4efd04=a143_0x545416,_0x33ecc5=join(_0x3b1c27[_0x4efd04(0xa2)],_0x4efd04(0xa7)),_0x3dcea2=[];try{const _0x1715d3=await readdir(_0x33ecc5,{'withFileTypes':!![]});for(const _0x46c235 of _0x1715d3){if(!_0x46c235['isDirectory']())continue;const _0xde10f5=_0x46c235[_0x4efd04(0x99)],_0x187250=join(_0x33ecc5,_0xde10f5),_0x358563=await readdir(_0x187250,{'withFileTypes':!![]});for(const _0x4b6226 of _0x358563){if(!_0x4b6226[_0x4efd04(0xaa)]())continue;const _0x3de6f1=_0x4b6226['name'],_0x4f5f74=join(_0x187250,_0x3de6f1),_0x17dc0d=await readdir(_0x4f5f74,{'withFileTypes':!![]});for(const _0x50a07a of _0x17dc0d){if(!_0x50a07a[_0x4efd04(0xaa)]())continue;const _0x3d0908=_0x50a07a['name'],_0x167cd4=join(_0x4f5f74,_0x3d0908),_0x8072c6=await readdir(_0x167cd4,{'withFileTypes':!![]});for(const _0x7075ee of _0x8072c6){if(!_0x7075ee['isFile']()||!_0x7075ee[_0x4efd04(0x99)][_0x4efd04(0xb7)](_0x4efd04(0xbc)))continue;const _0x1a7c30=_0x7075ee[_0x4efd04(0x99)]['replace'](/\.js$/,'');_0x3dcea2[_0x4efd04(0xa0)]({'type':'HOOK','name':_0x1a7c30,'filePath':join(_0x167cd4,_0x7075ee[_0x4efd04(0x99)]),'lockKey':_0x4efd04(0xa5)+_0xde10f5+'/'+_0x3de6f1+'/'+_0x3d0908+'/'+_0x1a7c30,'alias':_0xde10f5,'operationType':_0x3de6f1,'functionNode':_0x3d0908});}}}}}catch(_0x4fbf0e){if(_0x4fbf0e[_0x4efd04(0xb8)]!==_0x4efd04(0xba))throw _0x4fbf0e;}return _0x3dcea2;}export async function scanLocalBffFunctions(_0x47a9b7,_0x39ab9b){const _0x1808b8=a143_0x545416;if(_0x39ab9b===_0x1808b8(0xab)||_0x39ab9b===_0x1808b8(0x96))return scanFlatFunctions(_0x47a9b7,_0x39ab9b);if(_0x39ab9b===_0x1808b8(0xa7))return scanHookFunctions(_0x47a9b7);const [_0x3ae2fd,_0x4e9121,_0x450be2]=await Promise['all']([scanFlatFunctions(_0x47a9b7,_0x1808b8(0xab)),scanFlatFunctions(_0x47a9b7,_0x1808b8(0x96)),scanHookFunctions(_0x47a9b7)]);return[..._0x3ae2fd,..._0x4e9121,..._0x450be2];}export function resolveLocalFilePathFromLockKey(_0x1148a9,_0x44bd63){const _0x2ea8cd=a143_0x545416;return join(_0x1148a9[_0x2ea8cd(0xa2)],..._0x44bd63[_0x2ea8cd(0xad)]('/'))+_0x2ea8cd(0xbc);}export function createHookLocationMap(_0x2e600f){const _0x1816ef=a143_0x545416,_0x45c450=new Map();for(const _0x21c42b of _0x2e600f){_0x21c42b['beforeScriptId']&&_0x45c450[_0x1816ef(0xbb)](_0x21c42b['beforeScriptId'],{'datasetCode':_0x21c42b[_0x1816ef(0x95)],'operationType':snakeToCamel(_0x21c42b[_0x1816ef(0x9a)]),'functionNode':_0x1816ef(0xb1)}),_0x21c42b[_0x1816ef(0xb3)]&&_0x45c450['set'](_0x21c42b['afterScriptId'],{'datasetCode':_0x21c42b[_0x1816ef(0x95)],'operationType':snakeToCamel(_0x21c42b[_0x1816ef(0x9a)]),'functionNode':_0x1816ef(0xa6)});}return _0x45c450;}export function resolveRemoteScriptTarget(_0x4059d6,_0x313e6e,_0x1e1e4c,_0x546a6e,_0x2a9699){const _0x14b5be=a143_0x545416,_0x55703e=normalizeBffType(_0x313e6e['scriptType']);if(!_0x55703e||!_0x313e6e[_0x14b5be(0x9d)])return null;if(_0x55703e==='HOOK'){const _0x426d6a=(_0x313e6e['id']?_0x1e1e4c[_0x14b5be(0xac)](_0x313e6e['id']):undefined)??findHookLocationByRemoteId(_0x546a6e,_0x313e6e['id']);if(!_0x426d6a)return null;const _0x132151=_0x426d6a[_0x14b5be(0x97)]||_0x2a9699[_0x14b5be(0xac)](_0x426d6a[_0x14b5be(0x95)]),_0x4b96d8=_0x132151??_0x426d6a['datasetCode'],_0x3faff4={..._0x426d6a,'alias':_0x132151},_0x42614='HOOK/'+_0x4b96d8+'/'+_0x3faff4['operationType']+'/'+_0x3faff4[_0x14b5be(0xb5)]+'/'+_0x313e6e[_0x14b5be(0x9d)];return{'lockKey':_0x42614,'filePath':resolveLocalFilePathFromLockKey(_0x4059d6,_0x42614),'type':'HOOK','hookLocation':_0x3faff4};}const _0x1f02f6=_0x55703e+'/'+_0x313e6e[_0x14b5be(0x9d)];return{'lockKey':_0x1f02f6,'filePath':resolveLocalFilePathFromLockKey(_0x4059d6,_0x1f02f6),'type':_0x55703e};}function a143_0x210f(){const _0x2651eb=['includes','functionName','11jbNsUb','686364stuEzE','push','3552162eROzda','scriptsRootDir','trim','265405fTTGYm','HOOK/','after','HOOK','toUpperCase','18024qBNRpN','isDirectory','COMMON','get','split','F_OK','366233jMzJBv','map','before','309ldqEpT','afterScriptId','10170054EGRUaD','functionNode','96FQQHwY','endsWith','code','14498380TbsXVJ','ENOENT','set','.js','datasetCode','ENDPOINT','alias','replace','name','operationType','5kklVEL'];a143_0x210f=function(){return _0x2651eb;};return a143_0x210f();}export async function ensureParentDirectory(_0x51578a){await mkdir(dirname(_0x51578a),{'recursive':!![]});}export async function fileExists(_0x4d3c2c){const _0x506843=a143_0x545416;try{return await access(_0x4d3c2c,constants[_0x506843(0xae)]),!![];}catch{return![];}}export async function directoryExists(_0x5f2939){const _0x5c86fa=a143_0x545416;try{const _0x2975c7=await stat(_0x5f2939);return _0x2975c7[_0x5c86fa(0xaa)]();}catch{return![];}}
1
+ const a143_0x7be83c=a143_0x3e1e;(function(_0x1c3ed2,_0x1b4663){const _0x41c11d=a143_0x3e1e,_0x35b152=_0x1c3ed2();while(!![]){try{const _0x3e13c7=-parseInt(_0x41c11d(0xe9))/0x1*(parseInt(_0x41c11d(0xda))/0x2)+parseInt(_0x41c11d(0xf2))/0x3*(-parseInt(_0x41c11d(0xd8))/0x4)+-parseInt(_0x41c11d(0xd2))/0x5*(-parseInt(_0x41c11d(0xd0))/0x6)+-parseInt(_0x41c11d(0xdd))/0x7+parseInt(_0x41c11d(0xd1))/0x8*(-parseInt(_0x41c11d(0xde))/0x9)+-parseInt(_0x41c11d(0xd7))/0xa+-parseInt(_0x41c11d(0xe8))/0xb*(-parseInt(_0x41c11d(0xdf))/0xc);if(_0x3e13c7===_0x1b4663)break;else _0x35b152['push'](_0x35b152['shift']());}catch(_0x134ed4){_0x35b152['push'](_0x35b152['shift']());}}}(a143_0x494d,0x6550b));import{access,mkdir,readdir,stat}from'node:fs/promises';import{constants}from'node:fs';function a143_0x494d(){const _0x423cbf=['set','407qKDnwv','1gZCGwP','datasetCode','functionNode','afterScriptId','scriptsRootDir','push','ENOENT','operationType','beforeScriptId','215427fmfGhv','code','scriptType','after','F_OK','HOOK/','ENDPOINT','252HyiCjA','95096OZkRFO','62530qOaqPU','alias','map','name','functionName','2829290MvdBMm','20ufelkK','endsWith','1121378YptPJE','.js','HOOK','1286488sDdvFI','153jSTiSj','479436lBkRGa','isDirectory','before','replace','COMMON','isFile','all','trim'];a143_0x494d=function(){return _0x423cbf;};return a143_0x494d();}import{dirname,join}from'node:path';import{findHookLocationByRemoteId,snakeToCamel}from'../../core/bff/utils.js';export const SUPPORTED_BFF_TYPES=['COMMON',a143_0x7be83c(0xf8),a143_0x7be83c(0xdc)];export function normalizeBffType(_0x37fbed){const _0x97dcf5=a143_0x7be83c;if(!_0x37fbed)return undefined;const _0x37ef93=_0x37fbed[_0x97dcf5(0xe6)]()['toUpperCase']();return SUPPORTED_BFF_TYPES['includes'](_0x37ef93)?_0x37ef93:undefined;}async function scanJsFilesRecursively(_0x18a7f2,_0x908511){const _0x45c2bb=a143_0x7be83c,_0x572d79=[];try{const _0x4fb6b5=await readdir(_0x18a7f2,{'withFileTypes':!![]});for(const _0x44bd85 of _0x4fb6b5){const _0x1a1888=join(_0x18a7f2,_0x44bd85[_0x45c2bb(0xd5)]);if(_0x44bd85[_0x45c2bb(0xe0)]())_0x572d79[_0x45c2bb(0xee)](...await scanJsFilesRecursively(_0x1a1888,_0x908511+'/'+_0x44bd85['name']));else _0x44bd85[_0x45c2bb(0xe4)]()&&_0x44bd85[_0x45c2bb(0xd5)][_0x45c2bb(0xd9)](_0x45c2bb(0xdb))&&_0x572d79[_0x45c2bb(0xee)]({'lockKey':_0x908511+'/'+_0x44bd85['name']['replace'](/\.js$/,''),'filePath':_0x1a1888});}}catch(_0x45b515){if(_0x45b515[_0x45c2bb(0xf3)]!==_0x45c2bb(0xef))throw _0x45b515;}return _0x572d79;}async function scanFlatFunctions(_0x3730fd,_0x56a2fd){const _0x164e23=a143_0x7be83c,_0x47db4e=join(_0x3730fd['scriptsRootDir'],_0x56a2fd),_0x3f19f3=await scanJsFilesRecursively(_0x47db4e,_0x56a2fd);return _0x3f19f3[_0x164e23(0xd4)](({lockKey:_0x15485d,filePath:_0x13cab8})=>({'type':_0x56a2fd,'name':_0x15485d['split']('/')['at'](-0x1)??'','filePath':_0x13cab8,'lockKey':_0x15485d}));}async function scanHookFunctions(_0x3f212e){const _0x5126d2=a143_0x7be83c,_0x4084a2=join(_0x3f212e[_0x5126d2(0xed)],'HOOK'),_0x57caba=[];try{const _0x165e2e=await readdir(_0x4084a2,{'withFileTypes':!![]});for(const _0x2f631e of _0x165e2e){if(!_0x2f631e[_0x5126d2(0xe0)]())continue;const _0x28de98=_0x2f631e[_0x5126d2(0xd5)],_0x425cb9=join(_0x4084a2,_0x28de98),_0x23e3e8=await readdir(_0x425cb9,{'withFileTypes':!![]});for(const _0x4d35c9 of _0x23e3e8){if(!_0x4d35c9[_0x5126d2(0xe0)]())continue;const _0x1382ad=_0x4d35c9[_0x5126d2(0xd5)],_0x37aa47=join(_0x425cb9,_0x1382ad),_0x10afaf=await readdir(_0x37aa47,{'withFileTypes':!![]});for(const _0x51b18a of _0x10afaf){if(!_0x51b18a['isDirectory']())continue;const _0x4f301c=_0x51b18a[_0x5126d2(0xd5)],_0x59e811=join(_0x37aa47,_0x4f301c),_0x2d7294=await readdir(_0x59e811,{'withFileTypes':!![]});for(const _0x461be1 of _0x2d7294){if(!_0x461be1['isFile']()||!_0x461be1[_0x5126d2(0xd5)][_0x5126d2(0xd9)](_0x5126d2(0xdb)))continue;const _0xb3cd68=_0x461be1['name'][_0x5126d2(0xe2)](/\.js$/,'');_0x57caba[_0x5126d2(0xee)]({'type':_0x5126d2(0xdc),'name':_0xb3cd68,'filePath':join(_0x59e811,_0x461be1[_0x5126d2(0xd5)]),'lockKey':_0x5126d2(0xf7)+_0x28de98+'/'+_0x1382ad+'/'+_0x4f301c+'/'+_0xb3cd68,'alias':_0x28de98,'operationType':_0x1382ad,'functionNode':_0x4f301c});}}}}}catch(_0x510fc1){if(_0x510fc1['code']!==_0x5126d2(0xef))throw _0x510fc1;}return _0x57caba;}export async function scanLocalBffFunctions(_0x4f7bdd,_0x3d3807){const _0x3422f6=a143_0x7be83c;if(_0x3d3807===_0x3422f6(0xe3)||_0x3d3807===_0x3422f6(0xf8))return scanFlatFunctions(_0x4f7bdd,_0x3d3807);if(_0x3d3807===_0x3422f6(0xdc))return scanHookFunctions(_0x4f7bdd);const [_0x1d69fd,_0x2c345a,_0x30852e]=await Promise[_0x3422f6(0xe5)]([scanFlatFunctions(_0x4f7bdd,'COMMON'),scanFlatFunctions(_0x4f7bdd,'ENDPOINT'),scanHookFunctions(_0x4f7bdd)]);return[..._0x1d69fd,..._0x2c345a,..._0x30852e];}export function resolveLocalFilePathFromLockKey(_0xa4fa48,_0x56e1a5){const _0x563a76=a143_0x7be83c;return join(_0xa4fa48['scriptsRootDir'],..._0x56e1a5['split']('/'))+_0x563a76(0xdb);}export function createHookLocationMap(_0x46b05d){const _0x7edb7b=a143_0x7be83c,_0x39a71e=new Map();for(const _0x2e70f3 of _0x46b05d){_0x2e70f3[_0x7edb7b(0xf1)]&&_0x39a71e[_0x7edb7b(0xe7)](_0x2e70f3[_0x7edb7b(0xf1)],{'datasetCode':_0x2e70f3[_0x7edb7b(0xea)],'operationType':snakeToCamel(_0x2e70f3[_0x7edb7b(0xf0)]),'functionNode':_0x7edb7b(0xe1)}),_0x2e70f3[_0x7edb7b(0xec)]&&_0x39a71e[_0x7edb7b(0xe7)](_0x2e70f3[_0x7edb7b(0xec)],{'datasetCode':_0x2e70f3[_0x7edb7b(0xea)],'operationType':snakeToCamel(_0x2e70f3['operationType']),'functionNode':_0x7edb7b(0xf5)});}return _0x39a71e;}export function resolveRemoteScriptTarget(_0x54d5e6,_0x488f15,_0xacea5,_0x41a703,_0x443324){const _0x112067=a143_0x7be83c,_0x1874cd=normalizeBffType(_0x488f15[_0x112067(0xf4)]);if(!_0x1874cd||!_0x488f15[_0x112067(0xd6)])return null;if(_0x1874cd===_0x112067(0xdc)){const _0x1c4d52=(_0x488f15['id']?_0xacea5['get'](_0x488f15['id']):undefined)??findHookLocationByRemoteId(_0x41a703,_0x488f15['id']);if(!_0x1c4d52)return null;const _0x493ba6=_0x1c4d52[_0x112067(0xd3)]||_0x443324['get'](_0x1c4d52['datasetCode']),_0x4e4a3d=_0x493ba6??_0x1c4d52[_0x112067(0xea)],_0x5de1bc={..._0x1c4d52,'alias':_0x493ba6},_0x5f3e69=_0x112067(0xf7)+_0x4e4a3d+'/'+_0x5de1bc[_0x112067(0xf0)]+'/'+_0x5de1bc[_0x112067(0xeb)]+'/'+_0x488f15['functionName'];return{'lockKey':_0x5f3e69,'filePath':resolveLocalFilePathFromLockKey(_0x54d5e6,_0x5f3e69),'type':'HOOK','hookLocation':_0x5de1bc};}const _0x4dbbc6=_0x1874cd+'/'+_0x488f15[_0x112067(0xd6)];return{'lockKey':_0x4dbbc6,'filePath':resolveLocalFilePathFromLockKey(_0x54d5e6,_0x4dbbc6),'type':_0x1874cd};}export async function ensureParentDirectory(_0x3c172d){await mkdir(dirname(_0x3c172d),{'recursive':!![]});}export async function fileExists(_0x278d15){const _0x26ef26=a143_0x7be83c;try{return await access(_0x278d15,constants[_0x26ef26(0xf6)]),!![];}catch{return![];}}function a143_0x3e1e(_0x115e10,_0x159f4e){_0x115e10=_0x115e10-0xd0;const _0x494dc2=a143_0x494d();let _0x3e1e0e=_0x494dc2[_0x115e10];return _0x3e1e0e;}export async function directoryExists(_0x2ba5f4){const _0x2a0c89=a143_0x7be83c;try{const _0x562696=await stat(_0x2ba5f4);return _0x562696[_0x2a0c89(0xe0)]();}catch{return![];}}
@@ -1 +1 @@
1
- (function(_0x229ad0,_0x479bd5){const _0x23a5a0=a144_0x15f7,_0x2987b0=_0x229ad0();while(!![]){try{const _0x2c14a6=parseInt(_0x23a5a0(0x151))/0x1+parseInt(_0x23a5a0(0x14f))/0x2+-parseInt(_0x23a5a0(0x155))/0x3*(parseInt(_0x23a5a0(0x14d))/0x4)+-parseInt(_0x23a5a0(0x159))/0x5+-parseInt(_0x23a5a0(0x150))/0x6+-parseInt(_0x23a5a0(0x15a))/0x7*(-parseInt(_0x23a5a0(0x14e))/0x8)+parseInt(_0x23a5a0(0x158))/0x9;if(_0x2c14a6===_0x479bd5)break;else _0x2987b0['push'](_0x2987b0['shift']());}catch(_0x4e16ec){_0x2987b0['push'](_0x2987b0['shift']());}}}(a144_0x9222,0x7f5bc));function a144_0x15f7(_0xb9455f,_0x2d7866){_0xb9455f=_0xb9455f-0x14d;const _0x92227e=a144_0x9222();let _0x15f720=_0x92227e[_0xb9455f];return _0x15f720;}import{readFile}from'node:fs/promises';import a144_0x4906c2 from'node:crypto';function a144_0x9222(){const _0x1f465d=['220262LYdtTJ','3739472NPJfwL','40CidoAU','398692QxnpsA','5036778ELTBie','366798EukvFc','hex','update','digest','3yReAaP','createHash','utf8','20864070utifZg','3728565iBjIwD'];a144_0x9222=function(){return _0x1f465d;};return a144_0x9222();}export function computeContentHash(_0x138925){const _0x590570=a144_0x15f7;return a144_0x4906c2[_0x590570(0x156)]('md5')[_0x590570(0x153)](_0x138925)[_0x590570(0x154)](_0x590570(0x152));}export async function computeFileHash(_0x20952d){const _0x153102=a144_0x15f7,_0x38842b=await readFile(_0x20952d,_0x153102(0x157));return computeContentHash(_0x38842b);}
1
+ (function(_0x2bfe88,_0x20f43d){const _0x45b137=a144_0x384d,_0x911b0c=_0x2bfe88();while(!![]){try{const _0xb92bf5=-parseInt(_0x45b137(0xe5))/0x1+parseInt(_0x45b137(0xeb))/0x2*(parseInt(_0x45b137(0xe8))/0x3)+-parseInt(_0x45b137(0xe7))/0x4*(-parseInt(_0x45b137(0xe9))/0x5)+-parseInt(_0x45b137(0xe6))/0x6+parseInt(_0x45b137(0xec))/0x7+-parseInt(_0x45b137(0xee))/0x8*(-parseInt(_0x45b137(0xef))/0x9)+-parseInt(_0x45b137(0xea))/0xa*(parseInt(_0x45b137(0xf0))/0xb);if(_0xb92bf5===_0x20f43d)break;else _0x911b0c['push'](_0x911b0c['shift']());}catch(_0x209e2b){_0x911b0c['push'](_0x911b0c['shift']());}}}(a144_0x4795,0x3ca79));import{readFile}from'node:fs/promises';import a144_0x2d95f0 from'node:crypto';export function computeContentHash(_0x586cad){const _0x24f75e=a144_0x384d;return a144_0x2d95f0['createHash']('md5')[_0x24f75e(0xed)](_0x586cad)[_0x24f75e(0xe2)](_0x24f75e(0xe3));}function a144_0x384d(_0x8ff149,_0x5c3bf1){_0x8ff149=_0x8ff149-0xe2;const _0x4795f4=a144_0x4795();let _0x384d2f=_0x4795f4[_0x8ff149];return _0x384d2f;}export async function computeFileHash(_0x169c08){const _0x4dc089=a144_0x384d,_0x33be25=await readFile(_0x169c08,_0x4dc089(0xe4));return computeContentHash(_0x33be25);}function a144_0x4795(){const _0x23c2b0=['hex','utf8','189821kkvHXf','1953072hzksaD','124764hSgVXr','5709QuRrEj','30frwPjn','50jVPeAV','502IKTeTT','1472072FFPdTH','update','392024eJONDo','72hJqGDj','1107359nOUchP','digest'];a144_0x4795=function(){return _0x23c2b0;};return a144_0x4795();}
@@ -1 +1 @@
1
- (function(_0x758bb1,_0x5d7b7d){const _0x4f27e0=a145_0x241f,_0x20b817=_0x758bb1();while(!![]){try{const _0x64ee03=parseInt(_0x4f27e0(0x169))/0x1+parseInt(_0x4f27e0(0x16a))/0x2*(-parseInt(_0x4f27e0(0x15d))/0x3)+parseInt(_0x4f27e0(0x162))/0x4*(parseInt(_0x4f27e0(0x161))/0x5)+parseInt(_0x4f27e0(0x157))/0x6*(parseInt(_0x4f27e0(0x160))/0x7)+parseInt(_0x4f27e0(0x154))/0x8+parseInt(_0x4f27e0(0x165))/0x9*(-parseInt(_0x4f27e0(0x15e))/0xa)+-parseInt(_0x4f27e0(0x15f))/0xb;if(_0x64ee03===_0x5d7b7d)break;else _0x20b817['push'](_0x20b817['shift']());}catch(_0x58d1c7){_0x20b817['push'](_0x20b817['shift']());}}}(a145_0x15b5,0x82b3f));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';function a145_0x15b5(){const _0x2f6768=['280RorTpC','5vGAyZV','1183708iQBRlr','Check\x20.rabetbase/bff.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.','object','333SfuaEq','parse','functions','ENOENT','200871ftNbdY','86XQPrwv','\x22\x20vs\x20lock\x20\x22','7752056nmceOT','apps','lastSync','47514oTNDsE','\x22.\x20','scriptsRoot','Failed\x20to\x20read\x20BFF\x20lock\x20file:\x20','current\x20\x22','code','49548efjHkc','6730WRqyso','5633287TWfrzW'];a145_0x15b5=function(){return _0x2f6768;};return a145_0x15b5();}function a145_0x241f(_0xefe5e1,_0x3d9eaf){_0xefe5e1=_0xefe5e1-0x153;const _0x15b5da=a145_0x15b5();let _0x241f1d=_0x15b5da[_0xefe5e1];return _0x241f1d;}export function createEmptyBffLock(){return{'apps':{}};}export function ensureLockScope(_0x6dd9cf,_0x82d501,_0x378502,_0x5de286){const _0xbf24a2=a145_0x241f,_0x105d71={'apps':_0x6dd9cf[_0xbf24a2(0x155)]&&typeof _0x6dd9cf[_0xbf24a2(0x155)]===_0xbf24a2(0x164)?_0x6dd9cf[_0xbf24a2(0x155)]:{}};let _0x2d8567=_0x105d71[_0xbf24a2(0x155)][_0x82d501];if(!_0x2d8567)return _0x2d8567={'scriptsRoot':_0x378502,'lastSync':'','functions':{}},_0x105d71[_0xbf24a2(0x155)][_0x82d501]=_0x2d8567,{'lockData':_0x105d71,'appLock':_0x2d8567};if(!_0x2d8567['scriptsRoot'])_0x2d8567[_0xbf24a2(0x159)]=_0x378502;else{if(_0x2d8567['scriptsRoot']!==_0x378502)throw new Error(_0x5de286+':\x20scriptsRoot\x20mismatch\x20—\x20'+(_0xbf24a2(0x15b)+_0x378502+_0xbf24a2(0x153)+_0x2d8567[_0xbf24a2(0x159)]+_0xbf24a2(0x158))+_0xbf24a2(0x163));}return!_0x2d8567['functions']&&(_0x2d8567[_0xbf24a2(0x167)]={}),!_0x2d8567[_0xbf24a2(0x156)]&&(_0x2d8567[_0xbf24a2(0x156)]=''),{'lockData':_0x105d71,'appLock':_0x2d8567};}export async function readBffLockFile(_0x33973f){const _0x45c121=a145_0x241f;try{const _0x57c5ba=await readFile(_0x33973f,'utf8'),_0x5b0988=JSON[_0x45c121(0x166)](_0x57c5ba);return{'apps':_0x5b0988[_0x45c121(0x155)]&&typeof _0x5b0988[_0x45c121(0x155)]===_0x45c121(0x164)?_0x5b0988[_0x45c121(0x155)]:{}};}catch(_0x1f8be8){if(_0x1f8be8[_0x45c121(0x15c)]===_0x45c121(0x168))return null;throw new Error(_0x45c121(0x15a)+String(_0x1f8be8));}}export async function writeBffLockFile(_0x141f4f,_0x415b9e){await mkdir(dirname(_0x141f4f),{'recursive':!![]}),await writeFile(_0x141f4f,JSON['stringify'](_0x415b9e,null,0x2),'utf8');}
1
+ function a145_0x5b80(){const _0x530a2d=['7XvOAHa','\x22\x20vs\x20lock\x20\x22','\x22.\x20','8EQVBHP','object','Check\x20.rabetbase/bff.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.','apps','scriptsRoot','663460Mfcsdd','1476603VuolPR','Failed\x20to\x20read\x20BFF\x20lock\x20file:\x20','lastSync','parse','954265xpXEoD','functions','utf8',':\x20scriptsRoot\x20mismatch\x20—\x20','810102dlwDHn','820348dlhnhD','12071727pSYgLp','330678NNhPup'];a145_0x5b80=function(){return _0x530a2d;};return a145_0x5b80();}(function(_0x2854e1,_0x5aae16){const _0x4aeaa0=a145_0x29f5,_0x4472e0=_0x2854e1();while(!![]){try{const _0x252f36=parseInt(_0x4aeaa0(0x15a))/0x1+parseInt(_0x4aeaa0(0x15e))/0x2+parseInt(_0x4aeaa0(0x156))/0x3+-parseInt(_0x4aeaa0(0x15f))/0x4+parseInt(_0x4aeaa0(0x155))/0x5+parseInt(_0x4aeaa0(0x161))/0x6*(parseInt(_0x4aeaa0(0x162))/0x7)+-parseInt(_0x4aeaa0(0x165))/0x8*(parseInt(_0x4aeaa0(0x160))/0x9);if(_0x252f36===_0x5aae16)break;else _0x4472e0['push'](_0x4472e0['shift']());}catch(_0x383bb8){_0x4472e0['push'](_0x4472e0['shift']());}}}(a145_0x5b80,0x78584));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptyBffLock(){return{'apps':{}};}export function ensureLockScope(_0x23dc5d,_0x599fb1,_0x3f4c01,_0xe21706){const _0x1ad107=a145_0x29f5,_0x3e7710={'apps':_0x23dc5d[_0x1ad107(0x153)]&&typeof _0x23dc5d[_0x1ad107(0x153)]===_0x1ad107(0x166)?_0x23dc5d[_0x1ad107(0x153)]:{}};let _0x5a0ecc=_0x3e7710[_0x1ad107(0x153)][_0x599fb1];if(!_0x5a0ecc)return _0x5a0ecc={'scriptsRoot':_0x3f4c01,'lastSync':'','functions':{}},_0x3e7710[_0x1ad107(0x153)][_0x599fb1]=_0x5a0ecc,{'lockData':_0x3e7710,'appLock':_0x5a0ecc};if(!_0x5a0ecc['scriptsRoot'])_0x5a0ecc[_0x1ad107(0x154)]=_0x3f4c01;else{if(_0x5a0ecc[_0x1ad107(0x154)]!==_0x3f4c01)throw new Error(_0xe21706+_0x1ad107(0x15d)+('current\x20\x22'+_0x3f4c01+_0x1ad107(0x163)+_0x5a0ecc['scriptsRoot']+_0x1ad107(0x164))+_0x1ad107(0x152));}return!_0x5a0ecc[_0x1ad107(0x15b)]&&(_0x5a0ecc[_0x1ad107(0x15b)]={}),!_0x5a0ecc['lastSync']&&(_0x5a0ecc[_0x1ad107(0x158)]=''),{'lockData':_0x3e7710,'appLock':_0x5a0ecc};}export async function readBffLockFile(_0x57aa09){const _0x5c2705=a145_0x29f5;try{const _0x1b02af=await readFile(_0x57aa09,_0x5c2705(0x15c)),_0x157c59=JSON[_0x5c2705(0x159)](_0x1b02af);return{'apps':_0x157c59[_0x5c2705(0x153)]&&typeof _0x157c59['apps']===_0x5c2705(0x166)?_0x157c59[_0x5c2705(0x153)]:{}};}catch(_0x2f381b){if(_0x2f381b['code']==='ENOENT')return null;throw new Error(_0x5c2705(0x157)+String(_0x2f381b));}}function a145_0x29f5(_0x169024,_0x35edb5){_0x169024=_0x169024-0x152;const _0x5b8023=a145_0x5b80();let _0x29f5c6=_0x5b8023[_0x169024];return _0x29f5c6;}export async function writeBffLockFile(_0x4baf10,_0x43cb43){const _0x185f40=a145_0x29f5;await mkdir(dirname(_0x4baf10),{'recursive':!![]}),await writeFile(_0x4baf10,JSON['stringify'](_0x43cb43,null,0x2),_0x185f40(0x15c));}