@lovrabet/rabetbase-cli 2.1.12-beta.2 → 2.1.12

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_0x523ea3=a132_0x38b1;function a132_0x22e5(){const _0x58ab0b=['Apply\x20to\x20all','file','Function\x20node','nonInteractive','7714189Nlraxv','project','schemas','operation-type','non-interactive','keyword','Use\x20global\x20config\x20scope','Expected\x20affected\x20count','page','format','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','Config\x20key','Override\x20appcode','20828797LShlrV','db-id','skipImports','Config\x20value','10GhNWte','app','dry-run','Keyword\x20filter','Force\x20overwrite','3296172kMnnKc','SQL\x20name','output','map','SQL\x20code','Page\x20number','Output\x20format','42417LXgdTs','meowKey','Dataset\x20code','Force\x20non-interactive\x20mode\x20(CI)','verbose','Enable\x20BFF\x20save','help','Code\x20filter','sqlName','remote','sql','pagesize','enable-bff-save','expectedCount','3099368WAMwwL','yes','Rabetbase\x20CLI','Clear','title','datasetcode','function-node','boolean','Skip\x20confirmation\x20for\x20high-risk\x20writes','force','description-file','params','all','Description\x20file','5wcFejX','Name','clear','sqlname','Use\x20project\x20config\x20scope','2gFeNCu','target','716185OKQYvw','enableBffSave','Environment','appcode','string','json\x20|\x20pretty\x20|\x20compress','Use\x20remote','rabetbase','Operation\x20type','watch','sqlcode','<code>','key','operation','env','4990890kJdzrQ','sql-name','<expr>','expected-count','type','<name>','1880oLfajv','Watch\x20mode','name','confirm','Preview\x20operation\x20without\x20executing','DB\x20ID','Record\x20ID','operationType','Select\x20app\x20profile\x20by\x20name','global','code','descriptionFile','Alias\x20for\x20--non-interactive','dbid','description','Description'];a132_0x22e5=function(){return _0x58ab0b;};return a132_0x22e5();}(function(_0x2cf58a,_0x5b6f59){const _0x31d1f6=a132_0x38b1,_0x3ca348=_0x2cf58a();while(!![]){try{const _0x2e6ac7=-parseInt(_0x31d1f6(0x1e9))/0x1*(parseInt(_0x31d1f6(0x1e7))/0x2)+-parseInt(_0x31d1f6(0x228))/0x3+-parseInt(_0x31d1f6(0x23d))/0x4+-parseInt(_0x31d1f6(0x1e2))/0x5*(parseInt(_0x31d1f6(0x1f8))/0x6)+parseInt(_0x31d1f6(0x212))/0x7+-parseInt(_0x31d1f6(0x1fe))/0x8*(-parseInt(_0x31d1f6(0x22f))/0x9)+-parseInt(_0x31d1f6(0x223))/0xa*(-parseInt(_0x31d1f6(0x21f))/0xb);if(_0x2e6ac7===_0x5b6f59)break;else _0x3ca348['push'](_0x3ca348['shift']());}catch(_0x5e54e9){_0x3ca348['push'](_0x3ca348['shift']());}}}(a132_0x22e5,0xa6647));export const CLI_BIN_NAME=a132_0x523ea3(0x1f0);export const CLI_DISPLAY_NAME=a132_0x523ea3(0x23f);export const NPM_PACKAGE_NAME='@lovrabet/rabetbase-cli';export const GLOBAL_FLAGS=[{'name':a132_0x523ea3(0x1ec),'meowKey':'appcode','type':a132_0x523ea3(0x1ed),'description':a132_0x523ea3(0x21e),'hint':a132_0x523ea3(0x1f4)},{'name':a132_0x523ea3(0x224),'meowKey':a132_0x523ea3(0x224),'type':a132_0x523ea3(0x1ed),'description':a132_0x523ea3(0x206),'hint':a132_0x523ea3(0x1fd)},{'name':a132_0x523ea3(0x1f7),'meowKey':'env','type':a132_0x523ea3(0x1ed),'description':a132_0x523ea3(0x1eb),'hint':'production\x20|\x20daily'},{'name':a132_0x523ea3(0x21b),'meowKey':a132_0x523ea3(0x21b),'type':a132_0x523ea3(0x1ed),'description':a132_0x523ea3(0x22e),'hint':a132_0x523ea3(0x1ee)},{'name':'jq','meowKey':'jq','type':a132_0x523ea3(0x1ed),'description':a132_0x523ea3(0x21c),'hint':a132_0x523ea3(0x1fa)},{'name':a132_0x523ea3(0x225),'meowKey':'dryRun','type':a132_0x523ea3(0x1db),'description':a132_0x523ea3(0x202)},{'name':a132_0x523ea3(0x23e),'meowKey':a132_0x523ea3(0x23e),'type':a132_0x523ea3(0x1db),'description':a132_0x523ea3(0x1dc)},{'name':a132_0x523ea3(0x216),'meowKey':a132_0x523ea3(0x211),'type':'boolean','description':a132_0x523ea3(0x232)},{'name':'global','meowKey':a132_0x523ea3(0x207),'type':a132_0x523ea3(0x1db),'description':a132_0x523ea3(0x218)},{'name':a132_0x523ea3(0x213),'meowKey':a132_0x523ea3(0x213),'type':a132_0x523ea3(0x1db),'description':a132_0x523ea3(0x1e6)},{'name':'ci','meowKey':'ci','type':a132_0x523ea3(0x1db),'description':a132_0x523ea3(0x20a),'hidden':!![]},{'name':a132_0x523ea3(0x235),'meowKey':a132_0x523ea3(0x235),'type':a132_0x523ea3(0x1db),'description':'Show\x20help'},{'name':a132_0x523ea3(0x200),'meowKey':a132_0x523ea3(0x200),'type':a132_0x523ea3(0x1ed),'description':a132_0x523ea3(0x1e3),'hidden':!![]},{'name':a132_0x523ea3(0x241),'meowKey':a132_0x523ea3(0x241),'type':'string','description':'Title','hidden':!![]},{'name':a132_0x523ea3(0x1e4),'meowKey':a132_0x523ea3(0x1e4),'type':a132_0x523ea3(0x1db),'description':a132_0x523ea3(0x240),'hidden':!![]},{'name':a132_0x523ea3(0x1f2),'meowKey':a132_0x523ea3(0x1f2),'type':'boolean','description':a132_0x523ea3(0x1ff),'hidden':!![]},{'name':a132_0x523ea3(0x22a),'meowKey':a132_0x523ea3(0x22a),'type':a132_0x523ea3(0x1ed),'description':'Output\x20path','hidden':!![]},{'name':a132_0x523ea3(0x1df),'meowKey':'params','type':a132_0x523ea3(0x1ed),'description':'JSON\x20params','hidden':!![]},{'name':a132_0x523ea3(0x242),'meowKey':a132_0x523ea3(0x242),'type':a132_0x523ea3(0x1ed),'description':a132_0x523ea3(0x231),'hidden':!![]},{'name':'all','meowKey':a132_0x523ea3(0x1e0),'type':a132_0x523ea3(0x1db),'description':a132_0x523ea3(0x20e),'hidden':!![]},{'name':a132_0x523ea3(0x23b),'meowKey':a132_0x523ea3(0x1ea),'type':a132_0x523ea3(0x1db),'description':a132_0x523ea3(0x234),'hidden':!![]},{'name':'id','meowKey':'id','type':a132_0x523ea3(0x1ed),'description':a132_0x523ea3(0x204),'hidden':!![]},{'name':a132_0x523ea3(0x1fc),'meowKey':a132_0x523ea3(0x1fc),'type':a132_0x523ea3(0x1ed),'description':'Type\x20filter','hidden':!![]},{'name':'file','meowKey':a132_0x523ea3(0x20f),'type':a132_0x523ea3(0x1ed),'description':'File\x20path','hidden':!![]},{'name':a132_0x523ea3(0x1f3),'meowKey':'sqlcode','type':'string','description':a132_0x523ea3(0x22c),'hidden':!![]},{'name':a132_0x523ea3(0x1f9),'meowKey':a132_0x523ea3(0x237),'type':a132_0x523ea3(0x1ed),'description':a132_0x523ea3(0x229),'hidden':!![]},{'name':a132_0x523ea3(0x1e5),'meowKey':a132_0x523ea3(0x1e5),'type':a132_0x523ea3(0x1ed),'description':a132_0x523ea3(0x229),'hidden':!![]},{'name':a132_0x523ea3(0x220),'meowKey':'dbId','type':a132_0x523ea3(0x1ed),'description':a132_0x523ea3(0x203),'hidden':!![]},{'name':a132_0x523ea3(0x20b),'meowKey':a132_0x523ea3(0x20b),'type':'string','description':'DB\x20ID','hidden':!![]},{'name':a132_0x523ea3(0x20c),'meowKey':'description','type':a132_0x523ea3(0x1ed),'description':a132_0x523ea3(0x20d),'hidden':!![]},{'name':a132_0x523ea3(0x1de),'meowKey':a132_0x523ea3(0x209),'type':'string','description':a132_0x523ea3(0x1e1),'hidden':!![]},{'name':a132_0x523ea3(0x21a),'meowKey':a132_0x523ea3(0x21a),'type':'string','description':a132_0x523ea3(0x22d),'hidden':!![]},{'name':a132_0x523ea3(0x23a),'meowKey':'pagesize','type':a132_0x523ea3(0x1ed),'description':'Page\x20size','hidden':!![]},{'name':a132_0x523ea3(0x217),'meowKey':a132_0x523ea3(0x217),'type':a132_0x523ea3(0x1ed),'description':a132_0x523ea3(0x226),'hidden':!![]},{'name':'code','meowKey':a132_0x523ea3(0x208),'type':a132_0x523ea3(0x1ed),'description':a132_0x523ea3(0x236),'hidden':!![]},{'name':a132_0x523ea3(0x239),'meowKey':a132_0x523ea3(0x239),'type':a132_0x523ea3(0x1ed),'description':'SQL\x20string','hidden':!![]},{'name':a132_0x523ea3(0x214),'meowKey':a132_0x523ea3(0x214),'type':'string','description':'Schemas','hidden':!![]},{'name':'operation','meowKey':a132_0x523ea3(0x1f6),'type':a132_0x523ea3(0x1ed),'description':a132_0x523ea3(0x1f1),'hidden':!![]},{'name':a132_0x523ea3(0x1e8),'meowKey':a132_0x523ea3(0x1e8),'type':'string','description':'Target\x20path','hidden':!![]},{'name':'skip-imports','meowKey':a132_0x523ea3(0x221),'type':a132_0x523ea3(0x1db),'description':'Skip\x20import\x20generation','hidden':!![]},{'name':a132_0x523ea3(0x1f5),'meowKey':a132_0x523ea3(0x1f5),'type':a132_0x523ea3(0x1ed),'description':a132_0x523ea3(0x21d),'hidden':!![]},{'name':'value','meowKey':'value','type':a132_0x523ea3(0x1ed),'description':a132_0x523ea3(0x222),'hidden':!![]},{'name':'force','meowKey':a132_0x523ea3(0x1dd),'type':a132_0x523ea3(0x1db),'description':a132_0x523ea3(0x227),'hidden':!![]},{'name':a132_0x523ea3(0x201),'meowKey':a132_0x523ea3(0x201),'type':a132_0x523ea3(0x1db),'description':'Confirm\x20destructive\x20action','hidden':!![]},{'name':a132_0x523ea3(0x238),'meowKey':a132_0x523ea3(0x238),'type':'boolean','description':a132_0x523ea3(0x1ef),'hidden':!![]},{'name':a132_0x523ea3(0x233),'meowKey':a132_0x523ea3(0x233),'type':a132_0x523ea3(0x1db),'description':'Verbose\x20output','hidden':!![]},{'name':a132_0x523ea3(0x1fb),'meowKey':a132_0x523ea3(0x23c),'type':a132_0x523ea3(0x1ed),'description':a132_0x523ea3(0x219),'hidden':!![]},{'name':a132_0x523ea3(0x215),'meowKey':a132_0x523ea3(0x205),'type':a132_0x523ea3(0x1ed),'description':a132_0x523ea3(0x1f1),'hidden':!![]},{'name':a132_0x523ea3(0x1da),'meowKey':'functionNode','type':a132_0x523ea3(0x1ed),'description':a132_0x523ea3(0x210),'hidden':!![]}];function a132_0x38b1(_0x454624,_0x4372bd){_0x454624=_0x454624-0x1da;const _0x22e5bb=a132_0x22e5();let _0x38b140=_0x22e5bb[_0x454624];return _0x38b140;}export const PIPELINE_FLAG_NAMES=new Set([a132_0x523ea3(0x1ec),'app','env',a132_0x523ea3(0x21b),'jq',a132_0x523ea3(0x225),a132_0x523ea3(0x23e),a132_0x523ea3(0x216),'ci']);export function buildMeowFlags(){const _0x2dd75f=a132_0x523ea3;return Object['fromEntries'](GLOBAL_FLAGS[_0x2dd75f(0x22b)](_0x2910a5=>[_0x2910a5[_0x2dd75f(0x230)],{'type':_0x2910a5[_0x2dd75f(0x1fc)]}]));}
1
+ const a132_0x1b5bfe=a132_0x32d1;(function(_0x322b26,_0xd48c0c){const _0x143359=a132_0x32d1,_0x431f1e=_0x322b26();while(!![]){try{const _0x574be8=parseInt(_0x143359(0x119))/0x1*(-parseInt(_0x143359(0x105))/0x2)+parseInt(_0x143359(0xe7))/0x3*(parseInt(_0x143359(0x10d))/0x4)+parseInt(_0x143359(0xdb))/0x5*(-parseInt(_0x143359(0xe2))/0x6)+parseInt(_0x143359(0xcf))/0x7*(parseInt(_0x143359(0xea))/0x8)+-parseInt(_0x143359(0xce))/0x9+parseInt(_0x143359(0xc0))/0xa+parseInt(_0x143359(0xd4))/0xb;if(_0x574be8===_0xd48c0c)break;else _0x431f1e['push'](_0x431f1e['shift']());}catch(_0x22365b){_0x431f1e['push'](_0x431f1e['shift']());}}}(a132_0x5b6f,0x71dd4));export const CLI_BIN_NAME=a132_0x1b5bfe(0xfd);export const CLI_DISPLAY_NAME=a132_0x1b5bfe(0xec);function a132_0x32d1(_0x1b275b,_0x1662f8){_0x1b275b=_0x1b275b-0xb1;const _0x5b6f35=a132_0x5b6f();let _0x32d1c8=_0x5b6f35[_0x1b275b];return _0x32d1c8;}function a132_0x5b6f(){const _0xdee378=['Verbose\x20output','dbid','db-id','function-node','title','<expr>','Output\x20path','Enable\x20BFF\x20save','page','7161579jruIei','1538831ejMqEz','Description','<code>','Watch\x20mode','verbose','2543794XJawus','enableBffSave','boolean','json\x20|\x20pretty\x20|\x20compress','force','clear','dbId','815170pRrqNn','skipImports','File\x20path','target','<name>','SQL\x20name','Keyword\x20filter','24RNFkmt','all','descriptionFile','sqlName','string','266967jmstgf','SQL\x20code','appcode','32mUaXOB','sqlcode','Rabetbase\x20CLI','pagesize','format','Config\x20key','sql','Record\x20ID','value','Function\x20node','name','dry-run','Skip\x20import\x20generation','fromEntries','nonInteractive','file','Alias\x20for\x20--non-interactive','datasetcode','Target\x20path','rabetbase','Name','Clear','enable-bff-save','sqlname','meowKey','@lovrabet/rabetbase-cli','operation','22198sjLEWv','sql-name','non-interactive','confirm','Dataset\x20code','Force\x20overwrite','Expected\x20affected\x20count','functionNode','32LKEeLB','type','schemas','env','JSON\x20params','Use\x20project\x20config\x20scope','description-file','output','Select\x20app\x20profile\x20by\x20name','Schemas','Description\x20file','Type\x20filter','53qbVpov','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','Preview\x20operation\x20without\x20executing','global','Config\x20value','map','Override\x20appcode','expected-count','Code\x20filter','key','project','Operation\x20type','code','Title','Skip\x20confirmation\x20for\x20high-risk\x20writes','app','Apply\x20to\x20all','params','keyword','Confirm\x20destructive\x20action','yes','skip-imports','watch','6800040ZClUdD','dryRun','Show\x20help','expectedCount','Page\x20size'];a132_0x5b6f=function(){return _0xdee378;};return a132_0x5b6f();}export const NPM_PACKAGE_NAME=a132_0x1b5bfe(0x103);export const GLOBAL_FLAGS=[{'name':'appcode','meowKey':a132_0x1b5bfe(0xe9),'type':a132_0x1b5bfe(0xe6),'description':a132_0x1b5bfe(0x11f),'hint':a132_0x1b5bfe(0xd1)},{'name':a132_0x1b5bfe(0xb8),'meowKey':a132_0x1b5bfe(0xb8),'type':a132_0x1b5bfe(0xe6),'description':a132_0x1b5bfe(0x115),'hint':a132_0x1b5bfe(0xdf)},{'name':a132_0x1b5bfe(0x110),'meowKey':a132_0x1b5bfe(0x110),'type':a132_0x1b5bfe(0xe6),'description':'Environment','hint':'production\x20|\x20daily'},{'name':'format','meowKey':a132_0x1b5bfe(0xee),'type':a132_0x1b5bfe(0xe6),'description':'Output\x20format','hint':a132_0x1b5bfe(0xd7)},{'name':'jq','meowKey':'jq','type':a132_0x1b5bfe(0xe6),'description':a132_0x1b5bfe(0x11a),'hint':a132_0x1b5bfe(0xca)},{'name':a132_0x1b5bfe(0xf5),'meowKey':a132_0x1b5bfe(0xc1),'type':a132_0x1b5bfe(0xd6),'description':a132_0x1b5bfe(0x11b)},{'name':a132_0x1b5bfe(0xbd),'meowKey':a132_0x1b5bfe(0xbd),'type':a132_0x1b5bfe(0xd6),'description':a132_0x1b5bfe(0xb7)},{'name':'non-interactive','meowKey':a132_0x1b5bfe(0xf8),'type':'boolean','description':'Force\x20non-interactive\x20mode\x20(CI)'},{'name':'global','meowKey':a132_0x1b5bfe(0x11c),'type':a132_0x1b5bfe(0xd6),'description':'Use\x20global\x20config\x20scope'},{'name':a132_0x1b5bfe(0xb3),'meowKey':a132_0x1b5bfe(0xb3),'type':a132_0x1b5bfe(0xd6),'description':a132_0x1b5bfe(0x112)},{'name':'ci','meowKey':'ci','type':a132_0x1b5bfe(0xd6),'description':a132_0x1b5bfe(0xfa),'hidden':!![]},{'name':'help','meowKey':'help','type':'boolean','description':a132_0x1b5bfe(0xc2)},{'name':a132_0x1b5bfe(0xf4),'meowKey':a132_0x1b5bfe(0xf4),'type':a132_0x1b5bfe(0xe6),'description':a132_0x1b5bfe(0xfe),'hidden':!![]},{'name':a132_0x1b5bfe(0xc9),'meowKey':a132_0x1b5bfe(0xc9),'type':'string','description':a132_0x1b5bfe(0xb6),'hidden':!![]},{'name':a132_0x1b5bfe(0xd9),'meowKey':a132_0x1b5bfe(0xd9),'type':a132_0x1b5bfe(0xd6),'description':a132_0x1b5bfe(0xff),'hidden':!![]},{'name':a132_0x1b5bfe(0xbf),'meowKey':a132_0x1b5bfe(0xbf),'type':a132_0x1b5bfe(0xd6),'description':a132_0x1b5bfe(0xd2),'hidden':!![]},{'name':a132_0x1b5bfe(0x114),'meowKey':a132_0x1b5bfe(0x114),'type':'string','description':a132_0x1b5bfe(0xcb),'hidden':!![]},{'name':a132_0x1b5bfe(0xba),'meowKey':'params','type':a132_0x1b5bfe(0xe6),'description':a132_0x1b5bfe(0x111),'hidden':!![]},{'name':'datasetcode','meowKey':a132_0x1b5bfe(0xfb),'type':'string','description':a132_0x1b5bfe(0x109),'hidden':!![]},{'name':a132_0x1b5bfe(0xe3),'meowKey':a132_0x1b5bfe(0xe3),'type':a132_0x1b5bfe(0xd6),'description':a132_0x1b5bfe(0xb9),'hidden':!![]},{'name':a132_0x1b5bfe(0x100),'meowKey':a132_0x1b5bfe(0xd5),'type':a132_0x1b5bfe(0xd6),'description':a132_0x1b5bfe(0xcc),'hidden':!![]},{'name':'id','meowKey':'id','type':a132_0x1b5bfe(0xe6),'description':a132_0x1b5bfe(0xf1),'hidden':!![]},{'name':a132_0x1b5bfe(0x10e),'meowKey':a132_0x1b5bfe(0x10e),'type':'string','description':a132_0x1b5bfe(0x118),'hidden':!![]},{'name':a132_0x1b5bfe(0xf9),'meowKey':a132_0x1b5bfe(0xf9),'type':a132_0x1b5bfe(0xe6),'description':a132_0x1b5bfe(0xdd),'hidden':!![]},{'name':a132_0x1b5bfe(0xeb),'meowKey':a132_0x1b5bfe(0xeb),'type':'string','description':a132_0x1b5bfe(0xe8),'hidden':!![]},{'name':a132_0x1b5bfe(0x106),'meowKey':a132_0x1b5bfe(0xe5),'type':a132_0x1b5bfe(0xe6),'description':a132_0x1b5bfe(0xe0),'hidden':!![]},{'name':a132_0x1b5bfe(0x101),'meowKey':a132_0x1b5bfe(0x101),'type':a132_0x1b5bfe(0xe6),'description':a132_0x1b5bfe(0xe0),'hidden':!![]},{'name':a132_0x1b5bfe(0xc7),'meowKey':a132_0x1b5bfe(0xda),'type':'string','description':'DB\x20ID','hidden':!![]},{'name':a132_0x1b5bfe(0xc6),'meowKey':a132_0x1b5bfe(0xc6),'type':a132_0x1b5bfe(0xe6),'description':'DB\x20ID','hidden':!![]},{'name':'description','meowKey':'description','type':a132_0x1b5bfe(0xe6),'description':a132_0x1b5bfe(0xd0),'hidden':!![]},{'name':a132_0x1b5bfe(0x113),'meowKey':a132_0x1b5bfe(0xe4),'type':a132_0x1b5bfe(0xe6),'description':a132_0x1b5bfe(0x117),'hidden':!![]},{'name':a132_0x1b5bfe(0xcd),'meowKey':a132_0x1b5bfe(0xcd),'type':a132_0x1b5bfe(0xe6),'description':'Page\x20number','hidden':!![]},{'name':a132_0x1b5bfe(0xed),'meowKey':a132_0x1b5bfe(0xed),'type':a132_0x1b5bfe(0xe6),'description':a132_0x1b5bfe(0xc4),'hidden':!![]},{'name':a132_0x1b5bfe(0xbb),'meowKey':a132_0x1b5bfe(0xbb),'type':a132_0x1b5bfe(0xe6),'description':a132_0x1b5bfe(0xe1),'hidden':!![]},{'name':'code','meowKey':a132_0x1b5bfe(0xb5),'type':a132_0x1b5bfe(0xe6),'description':a132_0x1b5bfe(0xb1),'hidden':!![]},{'name':a132_0x1b5bfe(0xf0),'meowKey':a132_0x1b5bfe(0xf0),'type':a132_0x1b5bfe(0xe6),'description':'SQL\x20string','hidden':!![]},{'name':'schemas','meowKey':a132_0x1b5bfe(0x10f),'type':a132_0x1b5bfe(0xe6),'description':a132_0x1b5bfe(0x116),'hidden':!![]},{'name':'operation','meowKey':a132_0x1b5bfe(0x104),'type':'string','description':'Operation\x20type','hidden':!![]},{'name':a132_0x1b5bfe(0xde),'meowKey':a132_0x1b5bfe(0xde),'type':'string','description':a132_0x1b5bfe(0xfc),'hidden':!![]},{'name':a132_0x1b5bfe(0xbe),'meowKey':a132_0x1b5bfe(0xdc),'type':a132_0x1b5bfe(0xd6),'description':a132_0x1b5bfe(0xf6),'hidden':!![]},{'name':a132_0x1b5bfe(0xb2),'meowKey':'key','type':'string','description':a132_0x1b5bfe(0xef),'hidden':!![]},{'name':'value','meowKey':a132_0x1b5bfe(0xf2),'type':'string','description':a132_0x1b5bfe(0x11d),'hidden':!![]},{'name':a132_0x1b5bfe(0xd8),'meowKey':a132_0x1b5bfe(0xd8),'type':a132_0x1b5bfe(0xd6),'description':a132_0x1b5bfe(0x10a),'hidden':!![]},{'name':'confirm','meowKey':a132_0x1b5bfe(0x108),'type':a132_0x1b5bfe(0xd6),'description':a132_0x1b5bfe(0xbc),'hidden':!![]},{'name':'remote','meowKey':'remote','type':a132_0x1b5bfe(0xd6),'description':'Use\x20remote','hidden':!![]},{'name':a132_0x1b5bfe(0xd3),'meowKey':a132_0x1b5bfe(0xd3),'type':a132_0x1b5bfe(0xd6),'description':a132_0x1b5bfe(0xc5),'hidden':!![]},{'name':a132_0x1b5bfe(0x120),'meowKey':a132_0x1b5bfe(0xc3),'type':a132_0x1b5bfe(0xe6),'description':a132_0x1b5bfe(0x10b),'hidden':!![]},{'name':'operation-type','meowKey':'operationType','type':a132_0x1b5bfe(0xe6),'description':a132_0x1b5bfe(0xb4),'hidden':!![]},{'name':a132_0x1b5bfe(0xc8),'meowKey':a132_0x1b5bfe(0x10c),'type':a132_0x1b5bfe(0xe6),'description':a132_0x1b5bfe(0xf3),'hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set([a132_0x1b5bfe(0xe9),a132_0x1b5bfe(0xb8),a132_0x1b5bfe(0x110),a132_0x1b5bfe(0xee),'jq',a132_0x1b5bfe(0xf5),a132_0x1b5bfe(0xbd),a132_0x1b5bfe(0x107),'ci']);export function buildMeowFlags(){const _0x525cd5=a132_0x1b5bfe;return Object[_0x525cd5(0xf7)](GLOBAL_FLAGS[_0x525cd5(0x11e)](_0x2ba488=>[_0x2ba488[_0x525cd5(0x102)],{'type':_0x2ba488[_0x525cd5(0x10e)]}]));}
@@ -1 +1 @@
1
- const a133_0xc4e1c6=a133_0x5bab;(function(_0x45b8b6,_0x1b6eba){const _0x584fcf=a133_0x5bab,_0x11be61=_0x45b8b6();while(!![]){try{const _0x107aa8=parseInt(_0x584fcf(0x1d3))/0x1+parseInt(_0x584fcf(0x1d6))/0x2+parseInt(_0x584fcf(0x1cd))/0x3*(-parseInt(_0x584fcf(0x1cf))/0x4)+-parseInt(_0x584fcf(0x1d1))/0x5*(parseInt(_0x584fcf(0x1cc))/0x6)+-parseInt(_0x584fcf(0x1d2))/0x7+parseInt(_0x584fcf(0x1ce))/0x8*(-parseInt(_0x584fcf(0x1cb))/0x9)+parseInt(_0x584fcf(0x1d4))/0xa*(parseInt(_0x584fcf(0x1d0))/0xb);if(_0x107aa8===_0x1b6eba)break;else _0x11be61['push'](_0x11be61['shift']());}catch(_0x19a3ec){_0x11be61['push'](_0x11be61['shift']());}}}(a133_0x5343,0x7d84a));import{DEFAULT_API_DIR}from'../constant/paths.js';function a133_0x5343(){const _0x483eae=['10PvWqOj','compress','1160252ZVjUdu','en-US','production','405639lfJvfl','1422FGSrSz','6rBKsQF','24FoFYSp','1222436Qztene','10382317hIfTLd','6135dpFdMD','4605608rsKaaZ','685323sDDtRf'];a133_0x5343=function(){return _0x483eae;};return a133_0x5343();}export const DEFAULT_CONFIG_VALUES={'env':a133_0xc4e1c6(0x1ca),'format':a133_0xc4e1c6(0x1d5),'locale':a133_0xc4e1c6(0x1d7),'riskLevel':'high-risk-write','apiDir':DEFAULT_API_DIR};function a133_0x5bab(_0x40b5c1,_0x4e504c){_0x40b5c1=_0x40b5c1-0x1ca;const _0x53434a=a133_0x5343();let _0x5baba8=_0x53434a[_0x40b5c1];return _0x5baba8;}export const DEFAULT_COMMAND_OUTPUT_FORMAT=a133_0xc4e1c6(0x1d5);
1
+ const a133_0x49a93a=a133_0x2408;function a133_0x2408(_0x16c0d3,_0x406242){_0x16c0d3=_0x16c0d3-0xd7;const _0x4a03b6=a133_0x4a03();let _0x240819=_0x4a03b6[_0x16c0d3];return _0x240819;}(function(_0x7d2d8c,_0x4f11c8){const _0x51bd68=a133_0x2408,_0x96368d=_0x7d2d8c();while(!![]){try{const _0x5e2850=parseInt(_0x51bd68(0xe0))/0x1*(-parseInt(_0x51bd68(0xd9))/0x2)+-parseInt(_0x51bd68(0xdb))/0x3+-parseInt(_0x51bd68(0xd8))/0x4*(parseInt(_0x51bd68(0xd7))/0x5)+-parseInt(_0x51bd68(0xe1))/0x6+parseInt(_0x51bd68(0xdf))/0x7+parseInt(_0x51bd68(0xdd))/0x8+parseInt(_0x51bd68(0xda))/0x9;if(_0x5e2850===_0x4f11c8)break;else _0x96368d['push'](_0x96368d['shift']());}catch(_0x185cb9){_0x96368d['push'](_0x96368d['shift']());}}}(a133_0x4a03,0xaebfc));import{DEFAULT_API_DIR}from'../constant/paths.js';export const DEFAULT_CONFIG_VALUES={'env':'production','format':'compress','locale':a133_0x49a93a(0xdc),'riskLevel':'high-risk-write','apiDir':DEFAULT_API_DIR};export const DEFAULT_COMMAND_OUTPUT_FORMAT=a133_0x49a93a(0xde);function a133_0x4a03(){const _0x30f191=['4649407LpTjZH','209527vvlOAg','5765874jJwGHE','6902130MVnvCK','4pwNdQu','2PlaZga','29173932pFwyeK','2911890anXbHM','en-US','2652680DegxwK','compress'];a133_0x4a03=function(){return _0x30f191;};return a133_0x4a03();}
@@ -1 +1 @@
1
- const a134_0x3be0df=a134_0x51c8;(function(_0x22c45d,_0x35642d){const _0x24f875=a134_0x51c8,_0x2bdc61=_0x22c45d();while(!![]){try{const _0x1651a5=parseInt(_0x24f875(0x15f))/0x1+parseInt(_0x24f875(0x163))/0x2+-parseInt(_0x24f875(0x159))/0x3*(-parseInt(_0x24f875(0x160))/0x4)+parseInt(_0x24f875(0x164))/0x5*(-parseInt(_0x24f875(0x162))/0x6)+parseInt(_0x24f875(0x15a))/0x7*(-parseInt(_0x24f875(0x161))/0x8)+parseInt(_0x24f875(0x165))/0x9+-parseInt(_0x24f875(0x166))/0xa*(parseInt(_0x24f875(0x169))/0xb);if(_0x1651a5===_0x35642d)break;else _0x2bdc61['push'](_0x2bdc61['shift']());}catch(_0x307829){_0x2bdc61['push'](_0x2bdc61['shift']());}}}(a134_0x4acd,0x5bf32));function a134_0x4acd(){const _0x28cd41=['5405121tOMEQc','7112770aNRGEU','apiDomain','https://api.lovrabet.com','11oIeZWJ','3qwLgbJ','616YVGejo','runtimeDomain','https://user.lovrabet.com','https://daily-api.lovrabet.com','https://user-daily.lovrabet.com','593238SLZpFH','2842296DgjNwh','12832LyVBkY','48uKyFRW','25380LdWZar','430010PVWvWq'];a134_0x4acd=function(){return _0x28cd41;};return a134_0x4acd();}import{getEnv,isProduction}from'../constant/env.js';let customApiDomain,customUserDomain,customRuntimeDomain;export function initDomains(_0x33738d){const _0x23c824=a134_0x51c8;customApiDomain=_0x33738d?.[_0x23c824(0x167)],customUserDomain=_0x33738d?.['userDomain'],customRuntimeDomain=_0x33738d?.[_0x23c824(0x15b)];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?a134_0x3be0df(0x15c):a134_0x3be0df(0x15e));export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?a134_0x3be0df(0x168):a134_0x3be0df(0x15d));function a134_0x51c8(_0x2e7dfa,_0x17e394){_0x2e7dfa=_0x2e7dfa-0x159;const _0x4acdca=a134_0x4acd();let _0x51c8f6=_0x4acdca[_0x2e7dfa];return _0x51c8f6;}export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?'https://runtime.lovrabet.com':'https://daily-runtime.lovrabet.com');
1
+ function a134_0x3e9c(_0x23a7d2,_0x133ac9){_0x23a7d2=_0x23a7d2-0xd4;const _0x733f3b=a134_0x733f();let _0x3e9cd7=_0x733f3b[_0x23a7d2];return _0x3e9cd7;}const a134_0x41f1da=a134_0x3e9c;(function(_0x6034ae,_0x19dcbc){const _0x4e0854=a134_0x3e9c,_0x69dcfb=_0x6034ae();while(!![]){try{const _0x5e46da=-parseInt(_0x4e0854(0xe6))/0x1+-parseInt(_0x4e0854(0xdd))/0x2*(parseInt(_0x4e0854(0xd8))/0x3)+parseInt(_0x4e0854(0xd5))/0x4+parseInt(_0x4e0854(0xd9))/0x5*(-parseInt(_0x4e0854(0xd6))/0x6)+-parseInt(_0x4e0854(0xe2))/0x7*(-parseInt(_0x4e0854(0xe7))/0x8)+parseInt(_0x4e0854(0xdb))/0x9*(-parseInt(_0x4e0854(0xe5))/0xa)+parseInt(_0x4e0854(0xdc))/0xb*(parseInt(_0x4e0854(0xd4))/0xc);if(_0x5e46da===_0x19dcbc)break;else _0x69dcfb['push'](_0x69dcfb['shift']());}catch(_0x197322){_0x69dcfb['push'](_0x69dcfb['shift']());}}}(a134_0x733f,0xb80b9));import{getEnv,isProduction}from'../constant/env.js';let customApiDomain,customUserDomain,customRuntimeDomain;export function initDomains(_0x1375cd){const _0x2f3bae=a134_0x3e9c;customApiDomain=_0x1375cd?.[_0x2f3bae(0xda)],customUserDomain=_0x1375cd?.[_0x2f3bae(0xd7)],customRuntimeDomain=_0x1375cd?.[_0x2f3bae(0xe0)];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?a134_0x41f1da(0xdf):'https://user-daily.lovrabet.com');export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?a134_0x41f1da(0xe3):a134_0x41f1da(0xe4));export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?a134_0x41f1da(0xe1):a134_0x41f1da(0xde));function a134_0x733f(){const _0x1c5f60=['152ueNYMv','12DueuFx','5340356XvFVlN','838098karKgU','userDomain','380091iIqQCh','45tnLClw','apiDomain','18ErSdoQ','37437433XkIJHO','22miTimT','https://daily-runtime.lovrabet.com','https://user.lovrabet.com','runtimeDomain','https://runtime.lovrabet.com','211897jYWCHt','https://api.lovrabet.com','https://daily-api.lovrabet.com','4142840EAOBFW','1080410dhxudl'];a134_0x733f=function(){return _0x1c5f60;};return a134_0x733f();}
@@ -1 +1 @@
1
- const a135_0x1eabf3=a135_0x2869;(function(_0x17f2f5,_0x861a44){const _0x1176df=a135_0x2869,_0x470d0c=_0x17f2f5();while(!![]){try{const _0x50dcbe=-parseInt(_0x1176df(0x160))/0x1+parseInt(_0x1176df(0x15e))/0x2+parseInt(_0x1176df(0x15c))/0x3+parseInt(_0x1176df(0x158))/0x4+parseInt(_0x1176df(0x159))/0x5+-parseInt(_0x1176df(0x161))/0x6+-parseInt(_0x1176df(0x157))/0x7*(parseInt(_0x1176df(0x15d))/0x8);if(_0x50dcbe===_0x861a44)break;else _0x470d0c['push'](_0x470d0c['shift']());}catch(_0x2d0b32){_0x470d0c['push'](_0x470d0c['shift']());}}}(a135_0x36dc,0xc313d));export const RABETBASE_ENV_VALUES=['production',a135_0x1eabf3(0x15a)];export function normalizeEnv(_0x18c8f8){const _0x2f1835=a135_0x1eabf3;return _0x18c8f8==='online'?_0x2f1835(0x15b):_0x18c8f8;}export function isProduction(_0x1d82eb){const _0xf3e56a=a135_0x1eabf3;return normalizeEnv(_0x1d82eb)===_0xf3e56a(0x15b);}export function isDaily(_0x137bba){const _0x248b22=a135_0x1eabf3;return normalizeEnv(_0x137bba)===_0x248b22(0x15a);}function a135_0x2869(_0xea599c,_0x3a08f2){_0xea599c=_0xea599c-0x157;const _0x36dc12=a135_0x36dc();let _0x2869d1=_0x36dc12[_0xea599c];return _0x2869d1;}export function isDev(_0x365e2a){const _0x5ea987=a135_0x1eabf3,_0x4f54fa=normalizeEnv(_0x365e2a);return _0x4f54fa===_0x5ea987(0x15f)||_0x4f54fa==='dev';}function a135_0x36dc(){const _0x3af5ef=['daily','production','3821430dhHSfi','1456opkwek','330204pbGiow','development','1188255aqmsJl','8884962QSiNBE','7154iLAYIg','4720208zlvUpc','5175795ZucOIo'];a135_0x36dc=function(){return _0x3af5ef;};return a135_0x36dc();}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||a135_0x1eabf3(0x15b));export function getEnv(){return env;}export function initEnv(_0xf05fe8){env=normalizeEnv(_0xf05fe8);}
1
+ const a135_0x46baa9=a135_0x7fff;(function(_0x250fc4,_0x5cfa3d){const _0x358a4c=a135_0x7fff,_0x29c6bb=_0x250fc4();while(!![]){try{const _0x17f29f=parseInt(_0x358a4c(0x1b2))/0x1*(parseInt(_0x358a4c(0x1b9))/0x2)+-parseInt(_0x358a4c(0x1b5))/0x3+parseInt(_0x358a4c(0x1ae))/0x4+-parseInt(_0x358a4c(0x1b3))/0x5*(parseInt(_0x358a4c(0x1ad))/0x6)+-parseInt(_0x358a4c(0x1ba))/0x7*(parseInt(_0x358a4c(0x1bb))/0x8)+parseInt(_0x358a4c(0x1b8))/0x9+parseInt(_0x358a4c(0x1af))/0xa*(parseInt(_0x358a4c(0x1b6))/0xb);if(_0x17f29f===_0x5cfa3d)break;else _0x29c6bb['push'](_0x29c6bb['shift']());}catch(_0x451422){_0x29c6bb['push'](_0x29c6bb['shift']());}}}(a135_0x5f25,0x6145f));export const RABETBASE_ENV_VALUES=[a135_0x46baa9(0x1ac),a135_0x46baa9(0x1b7)];export function normalizeEnv(_0x47e962){const _0x2ac712=a135_0x46baa9;return _0x47e962===_0x2ac712(0x1b4)?'production':_0x47e962;}export function isProduction(_0x4a9b10){return normalizeEnv(_0x4a9b10)==='production';}export function isDaily(_0x26f426){return normalizeEnv(_0x26f426)==='daily';}export function isDev(_0x11b152){const _0x49078a=a135_0x46baa9,_0x3be6e0=normalizeEnv(_0x11b152);return _0x3be6e0===_0x49078a(0x1b0)||_0x3be6e0===_0x49078a(0x1b1);}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||a135_0x46baa9(0x1ac));function a135_0x5f25(){const _0x394601=['online','1783251GMdvSe','11IbsVbe','daily','1183446ZBXIjC','142094apsTjR','2059757wEdImI','8zgRpVn','production','48qkVmma','1452008mfIwMm','7706330IRZcmb','development','dev','6BsNldo','252695VHwKfh'];a135_0x5f25=function(){return _0x394601;};return a135_0x5f25();}function a135_0x7fff(_0x1eeb49,_0x4f3f2e){_0x1eeb49=_0x1eeb49-0x1ac;const _0x5f25a5=a135_0x5f25();let _0x7fffe5=_0x5f25a5[_0x1eeb49];return _0x7fffe5;}export function getEnv(){return env;}export function initEnv(_0x1e9f47){env=normalizeEnv(_0x1e9f47);}
@@ -1 +1 @@
1
- const a136_0x1f11cc=a136_0x39e7;(function(_0x2e09af,_0x2a3eb3){const _0x51e7cc=a136_0x39e7,_0x33939b=_0x2e09af();while(!![]){try{const _0x489d65=-parseInt(_0x51e7cc(0xe1))/0x1*(-parseInt(_0x51e7cc(0xde))/0x2)+parseInt(_0x51e7cc(0xe4))/0x3*(-parseInt(_0x51e7cc(0xe2))/0x4)+parseInt(_0x51e7cc(0xe5))/0x5*(parseInt(_0x51e7cc(0xe3))/0x6)+-parseInt(_0x51e7cc(0xda))/0x7+-parseInt(_0x51e7cc(0xdf))/0x8*(-parseInt(_0x51e7cc(0xd9))/0x9)+parseInt(_0x51e7cc(0xe0))/0xa+-parseInt(_0x51e7cc(0xdb))/0xb;if(_0x489d65===_0x2a3eb3)break;else _0x33939b['push'](_0x33939b['shift']());}catch(_0x51dcb7){_0x33939b['push'](_0x33939b['shift']());}}}(a136_0x2aa6,0x47a93));export const RABETBASE_OUTPUT_FORMAT_VALUES=['json',a136_0x1f11cc(0xdd),a136_0x1f11cc(0xdc)];function a136_0x39e7(_0x2b94d4,_0x1daf42){_0x2b94d4=_0x2b94d4-0xd9;const _0x2aa656=a136_0x2aa6();let _0x39e74d=_0x2aa656[_0x2b94d4];return _0x39e74d;}function a136_0x2aa6(){const _0x884655=['1080FFHzKP','63qphcmV','2674763OkkhOM','2119997vIylnF','compress','pretty','20334TQqNRl','634864Tdgehq','3941320nWKEmi','1zJXuWc','539816rQzmHh','8706wWQZER','9ANpNfH'];a136_0x2aa6=function(){return _0x884655;};return a136_0x2aa6();}
1
+ const a136_0x367aca=a136_0x5d57;function a136_0x5d57(_0x4d6deb,_0x3c4b41){_0x4d6deb=_0x4d6deb-0x1a0;const _0x329988=a136_0x3299();let _0x5d57fd=_0x329988[_0x4d6deb];return _0x5d57fd;}(function(_0x4adcda,_0x562ea2){const _0x26379e=a136_0x5d57,_0x3d45bd=_0x4adcda();while(!![]){try{const _0x3c672f=parseInt(_0x26379e(0x1a4))/0x1*(parseInt(_0x26379e(0x1ac))/0x2)+-parseInt(_0x26379e(0x1a1))/0x3*(parseInt(_0x26379e(0x1aa))/0x4)+parseInt(_0x26379e(0x1a6))/0x5+-parseInt(_0x26379e(0x1a8))/0x6*(-parseInt(_0x26379e(0x1ab))/0x7)+-parseInt(_0x26379e(0x1a7))/0x8+-parseInt(_0x26379e(0x1a5))/0x9*(parseInt(_0x26379e(0x1a0))/0xa)+parseInt(_0x26379e(0x1a2))/0xb;if(_0x3c672f===_0x562ea2)break;else _0x3d45bd['push'](_0x3d45bd['shift']());}catch(_0x3fe38f){_0x3d45bd['push'](_0x3d45bd['shift']());}}}(a136_0x3299,0xb3ed5));export const RABETBASE_OUTPUT_FORMAT_VALUES=[a136_0x367aca(0x1a3),a136_0x367aca(0x1a9),'compress'];function a136_0x3299(){const _0x3d226b=['8IHJOOX','559454GFBzAt','4UKhUcn','10XSWuRz','997431qRJdqd','22545754wrKvPB','json','96340FcHBFF','2555217kWVMAm','1734625ZDnfNH','10423848GqKwem','30UxfeDj','pretty'];a136_0x3299=function(){return _0x3d226b;};return a136_0x3299();}
@@ -1 +1 @@
1
- const a137_0x6ff6f9=a137_0x4c37;(function(_0x2f3b62,_0x72ff19){const _0x3119b8=a137_0x4c37,_0x1bc299=_0x2f3b62();while(!![]){try{const _0x148e63=parseInt(_0x3119b8(0x7a))/0x1+-parseInt(_0x3119b8(0x77))/0x2+parseInt(_0x3119b8(0x7b))/0x3*(parseInt(_0x3119b8(0x7c))/0x4)+-parseInt(_0x3119b8(0x75))/0x5+parseInt(_0x3119b8(0x73))/0x6+-parseInt(_0x3119b8(0x78))/0x7*(-parseInt(_0x3119b8(0x74))/0x8)+-parseInt(_0x3119b8(0x76))/0x9;if(_0x148e63===_0x72ff19)break;else _0x1bc299['push'](_0x1bc299['shift']());}catch(_0x2068c7){_0x1bc299['push'](_0x1bc299['shift']());}}}(a137_0x2b3f,0x842fc));function a137_0x2b3f(){const _0x488180=['688454NhifEx','48gcMhGl','238060QciYwd','1417206BqBJhb','2121168YjiBAq','4470090QsyzZu','10569870hfCoKj','124898UXKhdf','21CSepxH','./src/api'];a137_0x2b3f=function(){return _0x488180;};return a137_0x2b3f();}function a137_0x4c37(_0x4b6dca,_0x2de1f3){_0x4b6dca=_0x4b6dca-0x73;const _0x2b3fcb=a137_0x2b3f();let _0x4c370f=_0x2b3fcb[_0x4b6dca];return _0x4c370f;}export const DEFAULT_API_DIR=a137_0x6ff6f9(0x79);
1
+ function a137_0x1689(_0x4bf524,_0x3f873a){_0x4bf524=_0x4bf524-0x1c6;const _0x169f28=a137_0x169f();let _0x168903=_0x169f28[_0x4bf524];return _0x168903;}const a137_0xa51f2a=a137_0x1689;(function(_0x37340b,_0x27d080){const _0x278a8f=a137_0x1689,_0x1f17ea=_0x37340b();while(!![]){try{const _0x4e12e2=parseInt(_0x278a8f(0x1c6))/0x1*(-parseInt(_0x278a8f(0x1d1))/0x2)+-parseInt(_0x278a8f(0x1cd))/0x3+parseInt(_0x278a8f(0x1cc))/0x4*(-parseInt(_0x278a8f(0x1c9))/0x5)+-parseInt(_0x278a8f(0x1d0))/0x6*(parseInt(_0x278a8f(0x1c7))/0x7)+-parseInt(_0x278a8f(0x1c8))/0x8+parseInt(_0x278a8f(0x1cf))/0x9+parseInt(_0x278a8f(0x1ca))/0xa*(parseInt(_0x278a8f(0x1ce))/0xb);if(_0x4e12e2===_0x27d080)break;else _0x1f17ea['push'](_0x1f17ea['shift']());}catch(_0x1df519){_0x1f17ea['push'](_0x1f17ea['shift']());}}}(a137_0x169f,0x3a913));export const DEFAULT_API_DIR=a137_0xa51f2a(0x1cb);function a137_0x169f(){const _0x2c879d=['2386265UzREJX','20420xGQOCP','./src/api','4kXGFVY','1313553rkZBQp','8668LobQDM','3693699bKEEhA','8934COMnta','22924lKHNyH','18NhUUIH','1645fOKgfC','2466248pMiIYc'];a137_0x169f=function(){return _0x2c879d;};return a137_0x169f();}
@@ -1 +1 @@
1
- const a138_0x1c1c44=a138_0x480d;(function(_0x4d7cc2,_0x119d1c){const _0x1b3537=a138_0x480d,_0x41ac20=_0x4d7cc2();while(!![]){try{const _0x3731c8=parseInt(_0x1b3537(0x192))/0x1*(parseInt(_0x1b3537(0x19c))/0x2)+-parseInt(_0x1b3537(0x1a1))/0x3*(parseInt(_0x1b3537(0x1a0))/0x4)+parseInt(_0x1b3537(0x197))/0x5*(-parseInt(_0x1b3537(0x196))/0x6)+parseInt(_0x1b3537(0x195))/0x7*(parseInt(_0x1b3537(0x19b))/0x8)+parseInt(_0x1b3537(0x19a))/0x9*(parseInt(_0x1b3537(0x19e))/0xa)+-parseInt(_0x1b3537(0x19d))/0xb*(-parseInt(_0x1b3537(0x19f))/0xc)+-parseInt(_0x1b3537(0x198))/0xd*(parseInt(_0x1b3537(0x194))/0xe);if(_0x3731c8===_0x119d1c)break;else _0x41ac20['push'](_0x41ac20['shift']());}catch(_0x599b45){_0x41ac20['push'](_0x41ac20['shift']());}}}(a138_0x1c30,0xea131));export const RISK_LEVEL_VALUES=['read',a138_0x1c1c44(0x193),a138_0x1c1c44(0x199)];function a138_0x480d(_0x12bf63,_0x3c96ba){_0x12bf63=_0x12bf63-0x192;const _0x1c30b7=a138_0x1c30();let _0x480d35=_0x1c30b7[_0x12bf63];return _0x480d35;}function a138_0x1c30(){const _0x1dd308=['17320982UhGnHc','7mQPnCe','338946sWHRcB','55vldsOi','39FawAfB','high-risk-write','72gpPUMW','12981952rwCIfw','2OHdHnD','39556ISbpew','2210120eKGsfL','1572JxAjNM','1328FmpFyq','3297GPrsjN','1794761SNPZea','write'];a138_0x1c30=function(){return _0x1dd308;};return a138_0x1c30();}
1
+ const a138_0x4757e6=a138_0x3553;function a138_0x3553(_0x1472cd,_0x279e95){_0x1472cd=_0x1472cd-0x147;const _0x9b7b34=a138_0x9b7b();let _0x35530a=_0x9b7b34[_0x1472cd];return _0x35530a;}(function(_0x4fccd4,_0x4b5aa8){const _0x24d697=a138_0x3553,_0x37aac8=_0x4fccd4();while(!![]){try{const _0x57d95a=parseInt(_0x24d697(0x147))/0x1*(parseInt(_0x24d697(0x14b))/0x2)+parseInt(_0x24d697(0x14e))/0x3*(-parseInt(_0x24d697(0x151))/0x4)+parseInt(_0x24d697(0x148))/0x5*(parseInt(_0x24d697(0x149))/0x6)+-parseInt(_0x24d697(0x14f))/0x7*(-parseInt(_0x24d697(0x14c))/0x8)+parseInt(_0x24d697(0x153))/0x9+-parseInt(_0x24d697(0x152))/0xa+-parseInt(_0x24d697(0x14a))/0xb;if(_0x57d95a===_0x4b5aa8)break;else _0x37aac8['push'](_0x37aac8['shift']());}catch(_0x54a6a0){_0x37aac8['push'](_0x37aac8['shift']());}}}(a138_0x9b7b,0xa14db));function a138_0x9b7b(){const _0x146158=['write','304044YQmxZl','6372140VygVzz','5741730kFYllW','3710lQdpuS','4993285NhuHOB','6dyUaun','22544995TbifRp','592pTehig','1134544avCYtc','read','15olRfug','49nYgwSw'];a138_0x9b7b=function(){return _0x146158;};return a138_0x9b7b();}export const RISK_LEVEL_VALUES=[a138_0x4757e6(0x14d),a138_0x4757e6(0x150),'high-risk-write'];
package/lib/context.js CHANGED
@@ -1 +1 @@
1
- const a139_0x21c6b8=a139_0x2a3b;(function(_0x41976a,_0x15f378){const _0x53ed87=a139_0x2a3b,_0xdb60ba=_0x41976a();while(!![]){try{const _0x4d8a10=-parseInt(_0x53ed87(0x223))/0x1+-parseInt(_0x53ed87(0x206))/0x2*(parseInt(_0x53ed87(0x210))/0x3)+-parseInt(_0x53ed87(0x22c))/0x4+parseInt(_0x53ed87(0x221))/0x5+-parseInt(_0x53ed87(0x238))/0x6+parseInt(_0x53ed87(0x23c))/0x7*(parseInt(_0x53ed87(0x209))/0x8)+parseInt(_0x53ed87(0x1f6))/0x9;if(_0x4d8a10===_0x15f378)break;else _0xdb60ba['push'](_0xdb60ba['shift']());}catch(_0x3fe636){_0xdb60ba['push'](_0xdb60ba['shift']());}}}(a139_0x1677,0x47a7c));function a139_0x2a3b(_0x532a81,_0x46e5de){_0x532a81=_0x532a81-0x1ef;const _0x1677f7=a139_0x1677();let _0x2a3baf=_0x1677f7[_0x532a81];return _0x2a3baf;}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(_0x42bea4){return process.env[`RABETBASE_${_0x42bea4}`]||process.env[`LOVRABET_${_0x42bea4}`]||undefined;}export const NEW_CONFIG_NAME=a139_0x21c6b8(0x1f9);export const CONFIG_NAMES=[a139_0x21c6b8(0x1f9),a139_0x21c6b8(0x217),a139_0x21c6b8(0x204)];export const LEGACY_CONFIG_NAMES=CONFIG_NAMES['filter'](_0x2ba3be=>_0x2ba3be!==NEW_CONFIG_NAME);export function resolveConfigPath(_0x14c8d3){for(const _0x405f26 of CONFIG_NAMES){const _0x50375e=resolve(_0x14c8d3,_0x405f26);if(existsSync(_0x50375e))return _0x50375e;}return undefined;}export function findProjectRootDirectory(_0x393357=process[a139_0x21c6b8(0x200)]()){let _0x22c786=resolve(_0x393357);const {root:_0x4dba18}=parse(_0x22c786),_0x1d610b=homedir();while(!![]){if(resolveConfigPath(_0x22c786)){if(_0x22c786===_0x1d610b)break;return _0x22c786;}if(_0x22c786===_0x4dba18||_0x22c786===_0x1d610b)break;const _0x3335a5=dirname(_0x22c786);if(_0x3335a5===_0x22c786)break;_0x22c786=_0x3335a5;}return resolve(_0x393357);}export async function createContext(_0x2ac366){const _0x5c9723=a139_0x21c6b8,_0x142f5d=readRawConfig(),_0x2cbe92=buildConfig(_0x142f5d,_0x2ac366),{initEnv:_0x577787}=await import(_0x5c9723(0x237));if(_0x2cbe92[_0x5c9723(0x207)])_0x577787(_0x2cbe92[_0x5c9723(0x207)]);else _0x2ac366[_0x5c9723(0x207)]&&typeof _0x2ac366['env']==='string'&&_0x577787(_0x2ac366[_0x5c9723(0x207)]);const {initDomains:_0x45f77b,getUserDomain:_0x1407e4,getApiDomain:_0x56ea4a}=await import('./constant/domain.js');_0x45f77b({'apiDomain':_0x142f5d[_0x5c9723(0x23d)]||undefined,'userDomain':_0x142f5d[_0x5c9723(0x22b)]||undefined,'runtimeDomain':_0x142f5d['runtimeDomain']||undefined});const _0x14c15c={'apiDomain':_0x56ea4a(),'userDomain':_0x1407e4()},_0x2ced33=await buildAuth(_0x2cbe92);logger[_0x5c9723(0x1fb)](process['cwd']());const _0x3d84e6=(CLI_BIN_NAME+'\x20'+process[_0x5c9723(0x224)][_0x5c9723(0x20f)](0x2)[_0x5c9723(0x222)]('\x20'))[_0x5c9723(0x1f1)]();logger[_0x5c9723(0x241)](_0x3d84e6);const {isNonInteractive:_0x17ad0c}=await import(_0x5c9723(0x21a)),_0x18d47f=_0x17ad0c(_0x2ac366);return{'config':_0x2cbe92,'auth':_0x2ced33,'logger':logger,'env':_0x14c15c,'nonInteractive':_0x18d47f};}export function buildConfigFromFlags(_0x5cb323){return buildConfig(readRawConfig(),_0x5cb323);}export function getProjectConfigPath(){return resolveConfigPath(process['cwd']());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0x177491){const _0x4c5ab9=a139_0x21c6b8;if(!existsSync(_0x177491))return{'status':_0x4c5ab9(0x230)};try{const _0x51911a=readFileSync(_0x177491,{'encoding':_0x4c5ab9(0x23e)});if(!_0x51911a?.[_0x4c5ab9(0x1f1)]())return{'status':'empty'};const _0x2d8147=JSON[_0x4c5ab9(0x22f)](_0x51911a);return{'status':'ok','data':_0x2d8147};}catch(_0x487c0){return{'status':'error','message':_0x487c0 instanceof Error?_0x487c0[_0x4c5ab9(0x203)]:String(_0x487c0)};}}function parseCliConfigJsonFile(_0xeeaab6,_0x499fda,_0x56017f){const _0x4ae55d=a139_0x21c6b8,_0x46e658=inspectCliConfigJsonFile(_0xeeaab6);if(_0x46e658[_0x4ae55d(0x21c)]==='missing'||_0x46e658[_0x4ae55d(0x21c)]===_0x4ae55d(0x1ff))return{};if(_0x46e658[_0x4ae55d(0x21c)]==='ok')return _0x46e658['data'];return _0x499fda==='warn'&&_0x56017f&&console[_0x4ae55d(0x20e)](CLI_BIN_NAME+':\x20'+_0x56017f+_0x4ae55d(0x1fa)+_0xeeaab6+_0x4ae55d(0x22d)+_0x46e658[_0x4ae55d(0x203)]),{};}const normalizedWriteCache=new Map();function normalizeLegacyConfigShape(_0x1e3809){const _0x5ab3a2=a139_0x21c6b8;if(!_0x1e3809||typeof _0x1e3809!==_0x5ab3a2(0x229))return{'config':{},'migrated':![]};const _0x260475={..._0x1e3809},_0x53df12=_0x260475['apps']&&typeof _0x260475['apps']===_0x5ab3a2(0x229)?{..._0x260475[_0x5ab3a2(0x218)]}:{},_0x42e3eb=Object[_0x5ab3a2(0x1fd)](_0x53df12)[_0x5ab3a2(0x211)],_0x3e91b3=_0x260475['appcode']||_0x260475['app'];let _0x8850f2=![];if(_0x3e91b3&&_0x42e3eb===0x0){const _0x3119fe=typeof _0x260475[_0x5ab3a2(0x21b)]===_0x5ab3a2(0x1f2)&&_0x260475[_0x5ab3a2(0x21b)]['trim']()?_0x260475[_0x5ab3a2(0x21b)]:String(_0x3e91b3)[_0x5ab3a2(0x1f1)]();_0x53df12[_0x3119fe]={'appcode':String(_0x3e91b3)[_0x5ab3a2(0x1f1)](),..._0x260475[_0x5ab3a2(0x207)]!=null?{'env':_0x260475[_0x5ab3a2(0x207)]}:{},..._0x260475['apiDir']!=null?{'apiDir':_0x260475['apiDir']}:{},..._0x260475[_0x5ab3a2(0x227)]!=null?{'cookie':_0x260475[_0x5ab3a2(0x227)]}:{},..._0x260475[_0x5ab3a2(0x22a)]!=null?{'accessKey':_0x260475[_0x5ab3a2(0x22a)]}:{},..._0x260475[_0x5ab3a2(0x201)]!=null?{'format':_0x260475[_0x5ab3a2(0x201)]}:{},..._0x260475[_0x5ab3a2(0x212)]!=null?{'pageSize':_0x260475[_0x5ab3a2(0x212)]}:{},..._0x260475[_0x5ab3a2(0x234)]!=null?{'riskLevel':_0x260475[_0x5ab3a2(0x234)]}:{},..._0x260475[_0x5ab3a2(0x240)]!=null?{'locale':_0x260475[_0x5ab3a2(0x240)]}:{}},_0x260475[_0x5ab3a2(0x218)]=_0x53df12;if(!_0x260475[_0x5ab3a2(0x21b)])_0x260475[_0x5ab3a2(0x21b)]=_0x3119fe;_0x8850f2=!![];}return(_0x5ab3a2(0x239)in _0x260475||_0x5ab3a2(0x215)in _0x260475)&&(delete _0x260475['appcode'],delete _0x260475['app'],_0x8850f2=!![]),{'config':_0x260475,'migrated':_0x8850f2};}function writeNormalizedConfigIfNeeded(_0x142035,_0x2b15ea){const _0xfc5c8e=a139_0x21c6b8,_0x2e277b=JSON[_0xfc5c8e(0x208)](_0x2b15ea,null,0x2)+'\x0a';if(normalizedWriteCache[_0xfc5c8e(0x23f)](_0x142035)===_0x2e277b)return;writeConfigFile(_0x142035,_0x2b15ea),normalizedWriteCache[_0xfc5c8e(0x219)](_0x142035,_0x2e277b);}function parseAndNormalizeConfig(_0xe3f2db,_0x37babf,_0x364696){const _0x520c08=a139_0x21c6b8,_0x21c6cf=parseCliConfigJsonFile(_0xe3f2db,_0x37babf,_0x364696),_0x592da3=normalizeLegacyConfigShape(_0x21c6cf);if(_0x592da3[_0x520c08(0x233)])try{writeNormalizedConfigIfNeeded(_0xe3f2db,_0x592da3['config']);}catch{}return _0x592da3[_0x520c08(0x20b)];}export function loadRawConfigLayers(_0x1ee6a4){const _0x5b08cc=a139_0x21c6b8;let _0x56b6da={},_0x327144={};const _0x2060af=resolveConfigPath(homedir());_0x2060af&&(_0x56b6da=parseAndNormalizeConfig(_0x2060af,_0x5b08cc(0x225),'Global'));const _0x218574=_0x1ee6a4??findProjectRootDirectory(),_0x199f7e=resolveConfigPath(_0x218574);return _0x199f7e&&(_0x327144=parseAndNormalizeConfig(_0x199f7e,_0x5b08cc(0x225),'Project')),{'globalPath':_0x2060af,'projectPath':_0x199f7e,'globalConfig':_0x56b6da,'projectConfig':_0x327144};}function mergeRawConfigLayers(_0x16d212){const _0x285070=a139_0x21c6b8,{globalConfig:_0x1e8778,projectConfig:_0x23cd16}=_0x16d212;if(_0x23cd16['inherit']===![]){const _0x3349c7={..._0x23cd16};delete _0x3349c7[_0x285070(0x213)];const _0x2f5391=_0x23cd16[_0x285070(0x218)]&&typeof _0x23cd16['apps']==='object'?_0x23cd16[_0x285070(0x218)]:{};Object[_0x285070(0x1fd)](_0x2f5391)[_0x285070(0x211)]>0x0?_0x3349c7[_0x285070(0x218)]=_0x2f5391:delete _0x3349c7[_0x285070(0x218)];if(_0x285070(0x21b)in _0x23cd16)_0x3349c7[_0x285070(0x21b)]=_0x23cd16['defaultApp'];else Object[_0x285070(0x1fd)](_0x2f5391)[_0x285070(0x211)]>0x0&&(_0x3349c7[_0x285070(0x21b)]=Object[_0x285070(0x1fd)](_0x2f5391)[0x0]);return _0x3349c7;}const _0x3e0cb5=_0x1e8778[_0x285070(0x218)]&&typeof _0x1e8778[_0x285070(0x218)]==='object'?_0x1e8778[_0x285070(0x218)]:{},_0x57ef3c=_0x23cd16['apps']&&typeof _0x23cd16['apps']===_0x285070(0x229)?_0x23cd16[_0x285070(0x218)]:{},_0x2acbe4={..._0x3e0cb5,..._0x57ef3c},_0xa5e0e2={..._0x1e8778,..._0x23cd16};Object[_0x285070(0x1fd)](_0x2acbe4)[_0x285070(0x211)]>0x0&&(_0xa5e0e2[_0x285070(0x218)]=_0x2acbe4);if(_0x285070(0x21b)in _0x23cd16)_0xa5e0e2[_0x285070(0x21b)]=_0x23cd16[_0x285070(0x21b)];else{if(_0x57ef3c&&Object[_0x285070(0x1fd)](_0x57ef3c)[_0x285070(0x211)]>0x0)_0xa5e0e2['defaultApp']=Object[_0x285070(0x1fd)](_0x57ef3c)[0x0];else{if(_0x1e8778[_0x285070(0x21b)])_0xa5e0e2[_0x285070(0x21b)]=_0x1e8778[_0x285070(0x21b)];else{const _0x46aa79=Object[_0x285070(0x1fd)](_0x3e0cb5);_0x46aa79[_0x285070(0x211)]>0x0&&(_0xa5e0e2[_0x285070(0x21b)]=_0x46aa79[0x0]);}}}return _0xa5e0e2;}export function readRawConfigWithLayers(_0x38fc70){const _0x3fa34f=loadRawConfigLayers(_0x38fc70);return{'config':mergeRawConfigLayers(_0x3fa34f),'layers':_0x3fa34f};}export function readRawConfig(_0x281ed5){return mergeRawConfigLayers(loadRawConfigLayers(_0x281ed5));}export function getConfigAppCode(_0x2756a4){const _0x5da0d2=a139_0x21c6b8,_0x390431=readRawConfig(_0x2756a4);if(_0x390431[_0x5da0d2(0x218)]&&typeof _0x390431[_0x5da0d2(0x218)]===_0x5da0d2(0x229)){const _0xf33f64=_0x390431[_0x5da0d2(0x21b)];if(_0xf33f64&&_0x390431[_0x5da0d2(0x218)][_0xf33f64]?.[_0x5da0d2(0x239)])return String(_0x390431[_0x5da0d2(0x218)][_0xf33f64][_0x5da0d2(0x239)])[_0x5da0d2(0x1f1)]();const _0x4544f5=Object['values'](_0x390431[_0x5da0d2(0x218)])[0x0];if(_0x4544f5?.['appcode'])return String(_0x4544f5[_0x5da0d2(0x239)])[_0x5da0d2(0x1f1)]();}const _0x31d8c4=_0x390431[_0x5da0d2(0x239)]||_0x390431['app'];if(typeof _0x31d8c4!==_0x5da0d2(0x1f2)||_0x31d8c4[_0x5da0d2(0x1f1)]()==='')return undefined;return _0x31d8c4[_0x5da0d2(0x1f1)]();}export function getMultiAppConfigs(_0x33c147=a139_0x21c6b8(0x1f3),_0x2ddcef){const _0x6fb76f=a139_0x21c6b8,_0x56af25=_0x33c147===_0x6fb76f(0x1fc)?readRawConfig(_0x2ddcef):loadRawConfigLayers(_0x2ddcef)[_0x6fb76f(0x1f4)],_0x526ae4=_0x56af25[_0x6fb76f(0x218)];if(!_0x526ae4||typeof _0x526ae4!==_0x6fb76f(0x229)||Object[_0x6fb76f(0x1fd)](_0x526ae4)[_0x6fb76f(0x211)]===0x0)return null;const _0x32d4f2=_0x56af25[_0x6fb76f(0x21b)];return Object[_0x6fb76f(0x235)](_0x526ae4)[_0x6fb76f(0x202)](([_0x3c40c3,_0x99a8d0])=>({'name':_0x3c40c3,'appcode':_0x99a8d0?.[_0x6fb76f(0x239)]||'','isDefault':_0x3c40c3===_0x32d4f2,'env':_0x99a8d0?.[_0x6fb76f(0x207)],'apiDir':_0x99a8d0?.[_0x6fb76f(0x232)],'cookie':_0x99a8d0?.[_0x6fb76f(0x227)]||undefined}))['filter'](_0x1903b2=>_0x1903b2[_0x6fb76f(0x239)]);}export function getTemplateBaseUrl(_0x3e4f99){const _0x3181d6=a139_0x21c6b8,_0x2c606c=readRawConfig(_0x3e4f99);if(_0x2c606c[_0x3181d6(0x20a)]&&typeof _0x2c606c[_0x3181d6(0x20a)]==='string')return _0x2c606c['template_base_url'][_0x3181d6(0x1f8)](/\/$/,'');return'https://g.lovrabet.com/dist/lovrabet-skill';}export function readConfigFile(_0x2a5a6b){const _0x5507f3=a139_0x21c6b8;return parseAndNormalizeConfig(_0x2a5a6b,_0x5507f3(0x21d));}export function writeConfigFile(_0x2b665b,_0x28d8b7){const _0xc43396=a139_0x21c6b8,_0x5d6f2f=dirname(_0x2b665b);!existsSync(_0x5d6f2f)&&mkdirSync(_0x5d6f2f,{'recursive':!![]});const _0x98f74e=_0x2b665b+'.tmp';try{writeFileSync(_0x98f74e,JSON[_0xc43396(0x208)](_0x28d8b7,null,0x2)+'\x0a',{'encoding':_0xc43396(0x23e),'mode':0x180}),renameSync(_0x98f74e,_0x2b665b);}catch(_0x9fac4a){try{unlinkSync(_0x98f74e);}catch{}throw _0x9fac4a;}}export function resolveWriteConfigPath(_0x46e181){const _0x1f3969=a139_0x21c6b8,_0x39f598=_0x46e181===_0x1f3969(0x1f3)?process[_0x1f3969(0x200)]():homedir(),_0x580fa5=resolveConfigPath(_0x39f598);return _0x580fa5??resolve(_0x39f598,NEW_CONFIG_NAME);}function buildConfig(_0x8d8d0f,_0x1942f0){const _0x7d214d=a139_0x21c6b8,_0x495a9a={};if(_0x8d8d0f[_0x7d214d(0x218)]&&typeof _0x8d8d0f[_0x7d214d(0x218)]==='object')for(const [_0x399bed,_0x5ddcf9]of Object[_0x7d214d(0x235)](_0x8d8d0f[_0x7d214d(0x218)])){_0x5ddcf9&&typeof _0x5ddcf9===_0x7d214d(0x229)&&_0x5ddcf9[_0x7d214d(0x239)]&&(_0x495a9a[_0x399bed]=_0x5ddcf9);}const _0x332f33=_0x8d8d0f[_0x7d214d(0x21b)]||undefined,_0x175f18=Object['keys'](_0x495a9a)['length']>0x0,_0x4f0478=_0x1942f0[_0x7d214d(0x215)]||env(_0x7d214d(0x220))||undefined,_0x1d2ca5=_0x4f0478||_0x332f33||undefined,_0x303b4b=_0x1942f0[_0x7d214d(0x239)]||env(_0x7d214d(0x231))||undefined,_0x25a547=_0x303b4b?Object[_0x7d214d(0x235)](_0x495a9a)[_0x7d214d(0x236)](([,_0x34ae6e])=>_0x34ae6e?.[_0x7d214d(0x239)]===_0x303b4b):undefined,_0x5a44b8=_0x25a547?.[0x0],_0x447841=_0x25a547?.[0x1];let _0x4b5e0b=_0x303b4b?_0x5a44b8:_0x1d2ca5,_0xeaa0b9=_0x4b5e0b&&_0x495a9a[_0x4b5e0b]?_0x495a9a[_0x4b5e0b]:undefined;_0x303b4b&&_0x447841&&(_0xeaa0b9=_0x447841);const _0x35550f=_0x303b4b?_0x447841??_0xeaa0b9:_0xeaa0b9,_0x1d596f=_0x4f0478||(_0x303b4b?_0x5a44b8:undefined),_0x2b2510=_0x303b4b||_0x35550f?.[_0x7d214d(0x239)]||undefined,_0x2c7c6f=_0x1942f0[_0x7d214d(0x207)]||env(_0x7d214d(0x228))||_0x35550f?.['env']||_0x8d8d0f[_0x7d214d(0x207)]||DEFAULT_CONFIG_VALUES[_0x7d214d(0x207)],_0x585575=_0x35550f?.[_0x7d214d(0x240)]||_0x8d8d0f['locale']||DEFAULT_CONFIG_VALUES['locale'],_0x42974d=env(_0x7d214d(0x23a))||_0x35550f?.['cookie']||_0x8d8d0f['cookie']||undefined,_0x1ce77b=env(_0x7d214d(0x23b))||_0x35550f?.[_0x7d214d(0x22a)]||_0x8d8d0f[_0x7d214d(0x22a)]||undefined,_0x2a46eb=_0x1942f0[_0x7d214d(0x201)]||env(_0x7d214d(0x216))||_0x35550f?.['format']||_0x8d8d0f[_0x7d214d(0x201)],_0x373be1=normalizeLegacyOutputFormat(_0x2a46eb),_0x49318a=env(_0x7d214d(0x226))||_0x35550f?.[_0x7d214d(0x212)]||_0x8d8d0f[_0x7d214d(0x212)],_0xdf9ed4=_0x49318a?Number(_0x49318a)||undefined:undefined,_0x28ec8d=env(_0x7d214d(0x20c))||env(_0x7d214d(0x205))||_0x35550f?.[_0x7d214d(0x234)]||_0x8d8d0f[_0x7d214d(0x234)]||_0x8d8d0f[_0x7d214d(0x21e)],_0x35edf1=_0x28ec8d===_0x7d214d(0x21f)||_0x28ec8d===_0x7d214d(0x1fe)?_0x28ec8d:DEFAULT_CONFIG_VALUES[_0x7d214d(0x234)],_0x4e1ea5=env('VERBOSE'),_0x5f402e=_0x4e1ea5==='1'||_0x4e1ea5===_0x7d214d(0x1f7),_0x1d7cee=_0x35550f?.[_0x7d214d(0x232)]||_0x8d8d0f[_0x7d214d(0x232)]||DEFAULT_CONFIG_VALUES['apiDir'],_0x550d15=isDaily(normalizeEnv(String(_0x2c7c6f)))?_0x7d214d(0x22e):_0x7d214d(0x214);return{'appCode':typeof _0x2b2510===_0x7d214d(0x1f2)&&_0x2b2510[_0x7d214d(0x1f1)]()?_0x2b2510['trim']():undefined,'env':_0x550d15,'locale':_0x585575,'cookie':_0x42974d,'accessKey':_0x1ce77b,'format':_0x373be1,'pageSize':_0xdf9ed4,'riskLevel':_0x35edf1,'verbose':_0x5f402e,'apiDir':_0x1d7cee,'apps':_0x495a9a,'defaultApp':_0x332f33,'currentApp':_0x175f18?_0x4b5e0b:undefined,'explicitAppName':_0x1d596f,'raw':_0x8d8d0f};}async function buildAuth(_0x15d3d8){const _0xa79073=a139_0x21c6b8,{getCookie:_0x277cbf}=await import(_0xa79073(0x1f0)),_0x5a69ea=_0x15d3d8[_0xa79073(0x227)]||_0x277cbf(),_0x989f99=_0x5a69ea?await getIsSessionValid():![];return{'cookie':_0x5a69ea,'isLoggedIn':_0x989f99,async 'getOrLogin'(){const _0x28d82f=_0xa79073;if(_0x5a69ea&&_0x989f99)return _0x5a69ea;throw CliErrors[_0x28d82f(0x1f5)]();}};}function a139_0x1677(){const _0x557a60=['\x0a\x20\x20','daily','parse','missing','APPCODE','apiDir','migrated','riskLevel','entries','find','./constant/env.js','2569644UhFCbW','appcode','COOKIE','ACCESS_KEY','389613rZQalm','apiDomain','utf8','get','locale','setRawCommand','api.ts','./auth/get-cookie.js','trim','string','project','projectConfig','authRequired','8651601nYJuBK','true','replace','.rabetbase.json','\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20','setLogPath','merged','keys','write','empty','cwd','format','map','message','.lovrabetrc','MAX_RISK','82944TtJQtl','env','stringify','72skJHjr','template_base_url','config','RISK_LEVEL','-api.ts','error','slice','36pjiGCM','length','pageSize','inherit','production','app','FORMAT','.lovrabet.json','apps','set','./utils/is-non-interactive.js','defaultApp','status','silent','maxRisk','read','APP','731105dDJJxo','join','198669KNeeJm','argv','warn','PAGE_SIZE','cookie','ENV','object','accessKey','userDomain','761336DtfHrV'];a139_0x1677=function(){return _0x557a60;};return a139_0x1677();}export function resolveApiFilePath(_0x48187d,_0x5d49dc){const _0x1a522a=a139_0x21c6b8,_0x2aefde=resolve(process[_0x1a522a(0x200)](),_0x48187d),_0x23defe=resolve(_0x2aefde,_0x1a522a(0x1ef));if(!_0x5d49dc)return _0x23defe;const _0x33679f=readRawConfig(),_0x50b6dc=_0x33679f[_0x1a522a(0x218)]&&typeof _0x33679f[_0x1a522a(0x218)]==='object'?_0x33679f[_0x1a522a(0x218)]:{},_0x2f43b5=Object['entries'](_0x50b6dc)[_0x1a522a(0x236)](([,_0x156e12])=>_0x156e12?.[_0x1a522a(0x239)]===_0x5d49dc);if(!_0x2f43b5)return _0x23defe;const [_0x24c7b6,_0x3fab6d]=_0x2f43b5,_0x1dd3c9=typeof _0x33679f[_0x1a522a(0x21b)]===_0x1a522a(0x1f2)?_0x33679f[_0x1a522a(0x21b)]:undefined;if(_0x3fab6d?.[_0x1a522a(0x232)])return _0x23defe;if(_0x1dd3c9&&_0x24c7b6!==_0x1dd3c9)return resolve(_0x2aefde,_0x24c7b6+_0x1a522a(0x20d));return _0x23defe;}
1
+ const a139_0x92659e=a139_0x2371;(function(_0x99c8ba,_0x1194a3){const _0xbffe6a=a139_0x2371,_0x332385=_0x99c8ba();while(!![]){try{const _0x1bf490=-parseInt(_0xbffe6a(0x15f))/0x1*(parseInt(_0xbffe6a(0x178))/0x2)+-parseInt(_0xbffe6a(0x15d))/0x3*(parseInt(_0xbffe6a(0x15e))/0x4)+parseInt(_0xbffe6a(0x144))/0x5+parseInt(_0xbffe6a(0x154))/0x6+-parseInt(_0xbffe6a(0x159))/0x7*(-parseInt(_0xbffe6a(0x15a))/0x8)+parseInt(_0xbffe6a(0x152))/0x9+parseInt(_0xbffe6a(0x13e))/0xa;if(_0x1bf490===_0x1194a3)break;else _0x332385['push'](_0x332385['shift']());}catch(_0x453042){_0x332385['push'](_0x332385['shift']());}}}(a139_0x285c,0xf317c));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';function a139_0x2371(_0x18f624,_0x5e128d){_0x18f624=_0x18f624-0x12a;const _0x285cd7=a139_0x285c();let _0x23713e=_0x285cd7[_0x18f624];return _0x23713e;}import{DEFAULT_CONFIG_VALUES}from'./constant/defaults.js';import{normalizeEnv,isDaily}from'./constant/env.js';function a139_0x285c(){const _0x3f6826=['15NJyWPv','set','Global','authRequired','riskLevel','object','empty','silent','./auth/get-cookie.js','trim','entries','merged','warn','join','cookie','maxRisk','filter','https://g.lovrabet.com/dist/lovrabet-skill','inherit','.lovrabetrc','FORMAT','ENV','project','format','apps','252842tEQUaS','userDomain','pageSize','cwd','PAGE_SIZE','get','api.ts','status','apiDomain','length','./constant/env.js','daily','utf8','stringify','message','env','globalConfig','runtimeDomain','string','-api.ts','missing','Project','find','true','argv','COOKIE','16467900rQczGi','apiDir','locale','.rabetbase.json','template_base_url','read','4109670EBjuNL','error','APP','appcode','.tmp','app','config','replace','defaultApp','./utils/is-non-interactive.js','values','setRawCommand','map','MAX_RISK','13744638EjTzEk','RISK_LEVEL','3224964UNRCcA','ACCESS_KEY','APPCODE','data','projectConfig','21NAvuHq','896224oEmgUt','accessKey','keys','3bCBBRF','7909844NizgpT'];a139_0x285c=function(){return _0x3f6826;};return a139_0x285c();}import{normalizeLegacyOutputFormat}from'./framework/types.js';function env(_0x5d3ef6){return process.env[`RABETBASE_${_0x5d3ef6}`]||process.env[`LOVRABET_${_0x5d3ef6}`]||undefined;}export const NEW_CONFIG_NAME=a139_0x92659e(0x141);export const CONFIG_NAMES=['.rabetbase.json','.lovrabet.json',a139_0x92659e(0x172)];export const LEGACY_CONFIG_NAMES=CONFIG_NAMES['filter'](_0x56ada0=>_0x56ada0!==NEW_CONFIG_NAME);export function resolveConfigPath(_0x8aa1b9){for(const _0x34a12b of CONFIG_NAMES){const _0x9784df=resolve(_0x8aa1b9,_0x34a12b);if(existsSync(_0x9784df))return _0x9784df;}return undefined;}export function findProjectRootDirectory(_0x2e6b82=process['cwd']()){let _0x92b14a=resolve(_0x2e6b82);const {root:_0x35b2d2}=parse(_0x92b14a),_0x5e46e9=homedir();while(!![]){if(resolveConfigPath(_0x92b14a)){if(_0x92b14a===_0x5e46e9)break;return _0x92b14a;}if(_0x92b14a===_0x35b2d2||_0x92b14a===_0x5e46e9)break;const _0x4859d4=dirname(_0x92b14a);if(_0x4859d4===_0x92b14a)break;_0x92b14a=_0x4859d4;}return resolve(_0x2e6b82);}export async function createContext(_0x1f2f49){const _0x35eeb3=a139_0x92659e,_0x8e626c=readRawConfig(),_0x4110e8=buildConfig(_0x8e626c,_0x1f2f49),{initEnv:_0x21cd51}=await import(_0x35eeb3(0x12e));if(_0x4110e8[_0x35eeb3(0x133)])_0x21cd51(_0x4110e8[_0x35eeb3(0x133)]);else _0x1f2f49[_0x35eeb3(0x133)]&&typeof _0x1f2f49[_0x35eeb3(0x133)]==='string'&&_0x21cd51(_0x1f2f49['env']);const {initDomains:_0x3ec522,getUserDomain:_0x450fe0,getApiDomain:_0x232964}=await import('./constant/domain.js');_0x3ec522({'apiDomain':_0x8e626c[_0x35eeb3(0x12c)]||undefined,'userDomain':_0x8e626c[_0x35eeb3(0x179)]||undefined,'runtimeDomain':_0x8e626c[_0x35eeb3(0x135)]||undefined});const _0x3308fe={'apiDomain':_0x232964(),'userDomain':_0x450fe0()},_0x3f2379=await buildAuth(_0x4110e8);logger['setLogPath'](process['cwd']());const _0xefda7e=(CLI_BIN_NAME+'\x20'+process[_0x35eeb3(0x13c)]['slice'](0x2)[_0x35eeb3(0x16c)]('\x20'))[_0x35eeb3(0x168)]();logger[_0x35eeb3(0x14f)](_0xefda7e);const {isNonInteractive:_0x29e9f5}=await import(_0x35eeb3(0x14d)),_0x43f50b=_0x29e9f5(_0x1f2f49);return{'config':_0x4110e8,'auth':_0x3f2379,'logger':logger,'env':_0x3308fe,'nonInteractive':_0x43f50b};}export function buildConfigFromFlags(_0x300b4c){return buildConfig(readRawConfig(),_0x300b4c);}export function getProjectConfigPath(){const _0x2e54e2=a139_0x92659e;return resolveConfigPath(process[_0x2e54e2(0x17b)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0x369e75){const _0x10b29f=a139_0x92659e;if(!existsSync(_0x369e75))return{'status':_0x10b29f(0x138)};try{const _0x194cfc=readFileSync(_0x369e75,{'encoding':'utf8'});if(!_0x194cfc?.[_0x10b29f(0x168)]())return{'status':_0x10b29f(0x165)};const _0x5ede14=JSON['parse'](_0x194cfc);return{'status':'ok','data':_0x5ede14};}catch(_0xafafaf){return{'status':_0x10b29f(0x145),'message':_0xafafaf instanceof Error?_0xafafaf[_0x10b29f(0x132)]:String(_0xafafaf)};}}function parseCliConfigJsonFile(_0x2396fc,_0x4025af,_0x332f15){const _0x1b7a16=a139_0x92659e,_0x3aca55=inspectCliConfigJsonFile(_0x2396fc);if(_0x3aca55['status']===_0x1b7a16(0x138)||_0x3aca55['status']===_0x1b7a16(0x165))return{};if(_0x3aca55[_0x1b7a16(0x12b)]==='ok')return _0x3aca55[_0x1b7a16(0x157)];return _0x4025af==='warn'&&_0x332f15&&console[_0x1b7a16(0x145)](CLI_BIN_NAME+':\x20'+_0x332f15+'\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20'+_0x2396fc+'\x0a\x20\x20'+_0x3aca55[_0x1b7a16(0x132)]),{};}const normalizedWriteCache=new Map();function normalizeLegacyConfigShape(_0x58a002){const _0x59e2c7=a139_0x92659e;if(!_0x58a002||typeof _0x58a002!=='object')return{'config':{},'migrated':![]};const _0x5d545e={..._0x58a002},_0x15120c=_0x5d545e[_0x59e2c7(0x177)]&&typeof _0x5d545e[_0x59e2c7(0x177)]==='object'?{..._0x5d545e[_0x59e2c7(0x177)]}:{},_0x61139=Object[_0x59e2c7(0x15c)](_0x15120c)[_0x59e2c7(0x12d)],_0x142004=_0x5d545e['appcode']||_0x5d545e[_0x59e2c7(0x149)];let _0xd191a4=![];if(_0x142004&&_0x61139===0x0){const _0x15c46c=typeof _0x5d545e['defaultApp']===_0x59e2c7(0x136)&&_0x5d545e[_0x59e2c7(0x14c)][_0x59e2c7(0x168)]()?_0x5d545e[_0x59e2c7(0x14c)]:String(_0x142004)[_0x59e2c7(0x168)]();_0x15120c[_0x15c46c]={'appcode':String(_0x142004)['trim'](),..._0x5d545e[_0x59e2c7(0x133)]!=null?{'env':_0x5d545e['env']}:{},..._0x5d545e[_0x59e2c7(0x13f)]!=null?{'apiDir':_0x5d545e[_0x59e2c7(0x13f)]}:{},..._0x5d545e[_0x59e2c7(0x16d)]!=null?{'cookie':_0x5d545e[_0x59e2c7(0x16d)]}:{},..._0x5d545e['accessKey']!=null?{'accessKey':_0x5d545e[_0x59e2c7(0x15b)]}:{},..._0x5d545e[_0x59e2c7(0x176)]!=null?{'format':_0x5d545e[_0x59e2c7(0x176)]}:{},..._0x5d545e[_0x59e2c7(0x17a)]!=null?{'pageSize':_0x5d545e[_0x59e2c7(0x17a)]}:{},..._0x5d545e[_0x59e2c7(0x163)]!=null?{'riskLevel':_0x5d545e['riskLevel']}:{},..._0x5d545e[_0x59e2c7(0x140)]!=null?{'locale':_0x5d545e[_0x59e2c7(0x140)]}:{}},_0x5d545e[_0x59e2c7(0x177)]=_0x15120c;if(!_0x5d545e[_0x59e2c7(0x14c)])_0x5d545e['defaultApp']=_0x15c46c;_0xd191a4=!![];}return(_0x59e2c7(0x147)in _0x5d545e||_0x59e2c7(0x149)in _0x5d545e)&&(delete _0x5d545e[_0x59e2c7(0x147)],delete _0x5d545e[_0x59e2c7(0x149)],_0xd191a4=!![]),{'config':_0x5d545e,'migrated':_0xd191a4};}function writeNormalizedConfigIfNeeded(_0x4e7b09,_0x186d6c){const _0x57cdb5=a139_0x92659e,_0x45571d=JSON[_0x57cdb5(0x131)](_0x186d6c,null,0x2)+'\x0a';if(normalizedWriteCache[_0x57cdb5(0x17d)](_0x4e7b09)===_0x45571d)return;writeConfigFile(_0x4e7b09,_0x186d6c),normalizedWriteCache[_0x57cdb5(0x160)](_0x4e7b09,_0x45571d);}function parseAndNormalizeConfig(_0xf3ffda,_0x1c63b1,_0x26d233){const _0x3fda57=a139_0x92659e,_0x180840=parseCliConfigJsonFile(_0xf3ffda,_0x1c63b1,_0x26d233),_0x4f815f=normalizeLegacyConfigShape(_0x180840);if(_0x4f815f['migrated'])try{writeNormalizedConfigIfNeeded(_0xf3ffda,_0x4f815f[_0x3fda57(0x14a)]);}catch{}return _0x4f815f[_0x3fda57(0x14a)];}export function loadRawConfigLayers(_0x2fa106){const _0x460223=a139_0x92659e;let _0x568459={},_0x522b79={};const _0x2e6897=resolveConfigPath(homedir());_0x2e6897&&(_0x568459=parseAndNormalizeConfig(_0x2e6897,'warn',_0x460223(0x161)));const _0x34752b=_0x2fa106??findProjectRootDirectory(),_0x38bbe1=resolveConfigPath(_0x34752b);return _0x38bbe1&&(_0x522b79=parseAndNormalizeConfig(_0x38bbe1,_0x460223(0x16b),_0x460223(0x139))),{'globalPath':_0x2e6897,'projectPath':_0x38bbe1,'globalConfig':_0x568459,'projectConfig':_0x522b79};}const INHERIT_WHITELIST=[a139_0x92659e(0x16d),a139_0x92659e(0x15b),a139_0x92659e(0x140),a139_0x92659e(0x176),a139_0x92659e(0x163),'pageSize'];function mergeRawConfigLayers(_0x478986){const _0x22bdbe=a139_0x92659e,{globalConfig:_0x295825,projectConfig:_0x481fa8}=_0x478986,_0x26fa94=Object[_0x22bdbe(0x15c)](_0x481fa8)[_0x22bdbe(0x12d)]>0x0;if(!_0x26fa94)return mergeGlobalOnly(_0x295825);if(_0x481fa8[_0x22bdbe(0x171)]===!![])return mergeFullInherit(_0x295825,_0x481fa8);if(_0x481fa8[_0x22bdbe(0x171)]===![])return mergeIsolated(_0x481fa8);return mergeProjectFirst(_0x295825,_0x481fa8);}function mergeGlobalOnly(_0x3be234){const _0x1ced24=a139_0x92659e,_0x2f0ccf={..._0x3be234},_0x2d744d=_0x3be234[_0x1ced24(0x177)]&&typeof _0x3be234[_0x1ced24(0x177)]===_0x1ced24(0x164)?_0x3be234[_0x1ced24(0x177)]:{};Object[_0x1ced24(0x15c)](_0x2d744d)['length']>0x0&&(_0x2f0ccf[_0x1ced24(0x177)]=_0x2d744d);if(_0x3be234['defaultApp'])_0x2f0ccf['defaultApp']=_0x3be234['defaultApp'];else{const _0x48ff2f=Object[_0x1ced24(0x15c)](_0x2d744d);if(_0x48ff2f[_0x1ced24(0x12d)]>0x0)_0x2f0ccf[_0x1ced24(0x14c)]=_0x48ff2f[0x0];}return _0x2f0ccf;}function mergeIsolated(_0x5538c4){const _0x370166=a139_0x92659e,_0x1211d6={..._0x5538c4};delete _0x1211d6['inherit'];const _0x4a70db=_0x5538c4[_0x370166(0x177)]&&typeof _0x5538c4['apps']===_0x370166(0x164)?_0x5538c4[_0x370166(0x177)]:{};Object[_0x370166(0x15c)](_0x4a70db)[_0x370166(0x12d)]>0x0?_0x1211d6[_0x370166(0x177)]=_0x4a70db:delete _0x1211d6[_0x370166(0x177)];if(_0x370166(0x14c)in _0x5538c4)_0x1211d6['defaultApp']=_0x5538c4[_0x370166(0x14c)];else Object[_0x370166(0x15c)](_0x4a70db)[_0x370166(0x12d)]>0x0?_0x1211d6[_0x370166(0x14c)]=Object[_0x370166(0x15c)](_0x4a70db)[0x0]:delete _0x1211d6[_0x370166(0x14c)];return _0x1211d6;}function mergeProjectFirst(_0x50c145,_0x3eef39){const _0x530fd6=a139_0x92659e,_0x41933b={..._0x3eef39};delete _0x41933b['inherit'];for(const _0x398338 of INHERIT_WHITELIST){!(_0x398338 in _0x41933b)&&_0x398338 in _0x50c145&&(_0x41933b[_0x398338]=_0x50c145[_0x398338]);}const _0xedd28=_0x3eef39[_0x530fd6(0x177)]&&typeof _0x3eef39[_0x530fd6(0x177)]===_0x530fd6(0x164)?_0x3eef39[_0x530fd6(0x177)]:{};Object[_0x530fd6(0x15c)](_0xedd28)['length']>0x0?_0x41933b['apps']=_0xedd28:delete _0x41933b[_0x530fd6(0x177)];if(_0x530fd6(0x14c)in _0x3eef39)_0x41933b['defaultApp']=_0x3eef39['defaultApp'];else Object[_0x530fd6(0x15c)](_0xedd28)['length']>0x0?_0x41933b['defaultApp']=Object[_0x530fd6(0x15c)](_0xedd28)[0x0]:delete _0x41933b['defaultApp'];return _0x41933b;}function mergeFullInherit(_0x4dfcc3,_0x3b1a9a){const _0xf71a8a=a139_0x92659e,_0x2c042b=_0x4dfcc3[_0xf71a8a(0x177)]&&typeof _0x4dfcc3[_0xf71a8a(0x177)]==='object'?_0x4dfcc3['apps']:{},_0x5db8e8=_0x3b1a9a[_0xf71a8a(0x177)]&&typeof _0x3b1a9a['apps']===_0xf71a8a(0x164)?_0x3b1a9a[_0xf71a8a(0x177)]:{},_0x5856e9={..._0x2c042b,..._0x5db8e8},_0x47ebf1={..._0x4dfcc3,..._0x3b1a9a};delete _0x47ebf1[_0xf71a8a(0x171)];Object[_0xf71a8a(0x15c)](_0x5856e9)[_0xf71a8a(0x12d)]>0x0&&(_0x47ebf1[_0xf71a8a(0x177)]=_0x5856e9);if(_0xf71a8a(0x14c)in _0x3b1a9a)_0x47ebf1[_0xf71a8a(0x14c)]=_0x3b1a9a['defaultApp'];else{if(Object[_0xf71a8a(0x15c)](_0x5db8e8)['length']>0x0)_0x47ebf1['defaultApp']=Object[_0xf71a8a(0x15c)](_0x5db8e8)[0x0];else{if(_0x4dfcc3[_0xf71a8a(0x14c)])_0x47ebf1[_0xf71a8a(0x14c)]=_0x4dfcc3[_0xf71a8a(0x14c)];else{const _0x2c90e2=Object[_0xf71a8a(0x15c)](_0x2c042b);if(_0x2c90e2[_0xf71a8a(0x12d)]>0x0)_0x47ebf1['defaultApp']=_0x2c90e2[0x0];}}}return _0x47ebf1;}export function readRawConfigWithLayers(_0x5e1d7e){const _0x4f5ed1=loadRawConfigLayers(_0x5e1d7e);return{'config':mergeRawConfigLayers(_0x4f5ed1),'layers':_0x4f5ed1};}export function readRawConfig(_0x570254){return mergeRawConfigLayers(loadRawConfigLayers(_0x570254));}export function getConfigAppCode(_0x52b09e){const _0x2f9549=a139_0x92659e,_0x432268=readRawConfig(_0x52b09e);if(_0x432268['apps']&&typeof _0x432268[_0x2f9549(0x177)]==='object'){const _0x394b5a=_0x432268[_0x2f9549(0x14c)];if(_0x394b5a&&_0x432268[_0x2f9549(0x177)][_0x394b5a]?.[_0x2f9549(0x147)])return String(_0x432268[_0x2f9549(0x177)][_0x394b5a][_0x2f9549(0x147)])[_0x2f9549(0x168)]();const _0x5afc6f=Object[_0x2f9549(0x14e)](_0x432268[_0x2f9549(0x177)])[0x0];if(_0x5afc6f?.['appcode'])return String(_0x5afc6f[_0x2f9549(0x147)])[_0x2f9549(0x168)]();}const _0x369572=_0x432268[_0x2f9549(0x147)]||_0x432268['app'];if(typeof _0x369572!==_0x2f9549(0x136)||_0x369572['trim']()==='')return undefined;return _0x369572[_0x2f9549(0x168)]();}export function getMultiAppConfigs(_0x37c9da=a139_0x92659e(0x175),_0x3dad58){const _0x367758=a139_0x92659e,_0x334981=loadRawConfigLayers(_0x3dad58);let _0x2c5733,_0x38dadc;if(_0x37c9da===_0x367758(0x16a)){const _0x5bd783=_0x334981[_0x367758(0x134)]['apps']&&typeof _0x334981[_0x367758(0x134)][_0x367758(0x177)]===_0x367758(0x164)?_0x334981[_0x367758(0x134)][_0x367758(0x177)]:{},_0x11b129=_0x334981[_0x367758(0x158)][_0x367758(0x177)]&&typeof _0x334981[_0x367758(0x158)][_0x367758(0x177)]===_0x367758(0x164)?_0x334981['projectConfig'][_0x367758(0x177)]:{};_0x2c5733={..._0x5bd783,..._0x11b129};const _0xe85942=readRawConfig(_0x3dad58);_0x38dadc=_0xe85942[_0x367758(0x14c)];}else _0x2c5733=_0x334981['projectConfig'][_0x367758(0x177)],_0x38dadc=_0x334981[_0x367758(0x158)][_0x367758(0x14c)];if(!_0x2c5733||typeof _0x2c5733!=='object'||Object[_0x367758(0x15c)](_0x2c5733)[_0x367758(0x12d)]===0x0)return null;return Object[_0x367758(0x169)](_0x2c5733)[_0x367758(0x150)](([_0x3b9593,_0x505225])=>({'name':_0x3b9593,'appcode':_0x505225?.[_0x367758(0x147)]||'','isDefault':_0x3b9593===_0x38dadc,'env':_0x505225?.[_0x367758(0x133)],'apiDir':_0x505225?.['apiDir'],'cookie':_0x505225?.[_0x367758(0x16d)]||undefined}))[_0x367758(0x16f)](_0x5ab0d2=>_0x5ab0d2['appcode']);}export function getTemplateBaseUrl(_0x189791){const _0x1dd4a1=a139_0x92659e,_0x7f6ca5=readRawConfig(_0x189791);if(_0x7f6ca5[_0x1dd4a1(0x142)]&&typeof _0x7f6ca5[_0x1dd4a1(0x142)]===_0x1dd4a1(0x136))return _0x7f6ca5[_0x1dd4a1(0x142)][_0x1dd4a1(0x14b)](/\/$/,'');return _0x1dd4a1(0x170);}export function readConfigFile(_0x5c798b){const _0xf50499=a139_0x92659e;return parseAndNormalizeConfig(_0x5c798b,_0xf50499(0x166));}export function writeConfigFile(_0x184423,_0x236a9){const _0x4fd946=a139_0x92659e,_0x1d99f2=dirname(_0x184423);!existsSync(_0x1d99f2)&&mkdirSync(_0x1d99f2,{'recursive':!![]});const _0x5a5cbc=_0x184423+_0x4fd946(0x148);try{writeFileSync(_0x5a5cbc,JSON[_0x4fd946(0x131)](_0x236a9,null,0x2)+'\x0a',{'encoding':_0x4fd946(0x130),'mode':0x180}),renameSync(_0x5a5cbc,_0x184423);}catch(_0x1cdfa7){try{unlinkSync(_0x5a5cbc);}catch{}throw _0x1cdfa7;}}export function resolveWriteConfigPath(_0x48faef){const _0x58d454=a139_0x92659e,_0x10460e=_0x48faef===_0x58d454(0x175)?process['cwd']():homedir(),_0x90d367=resolveConfigPath(_0x10460e);return _0x90d367??resolve(_0x10460e,NEW_CONFIG_NAME);}function buildConfig(_0x2fe78a,_0x3e2026){const _0x16e8a5=a139_0x92659e,_0x19e4a3={};if(_0x2fe78a['apps']&&typeof _0x2fe78a['apps']==='object')for(const [_0x2325cf,_0x170d07]of Object[_0x16e8a5(0x169)](_0x2fe78a[_0x16e8a5(0x177)])){_0x170d07&&typeof _0x170d07===_0x16e8a5(0x164)&&_0x170d07[_0x16e8a5(0x147)]&&(_0x19e4a3[_0x2325cf]=_0x170d07);}const _0x4060d6=_0x2fe78a[_0x16e8a5(0x14c)]||undefined,_0x1a00b2=Object['keys'](_0x19e4a3)[_0x16e8a5(0x12d)]>0x0,_0x2d56da=_0x3e2026[_0x16e8a5(0x149)]||env(_0x16e8a5(0x146))||undefined,_0x64b92c=_0x2d56da||_0x4060d6||undefined,_0x3819c0=_0x3e2026[_0x16e8a5(0x147)]||env(_0x16e8a5(0x156))||undefined,_0x592941=_0x3819c0?Object[_0x16e8a5(0x169)](_0x19e4a3)[_0x16e8a5(0x13a)](([,_0x113019])=>_0x113019?.[_0x16e8a5(0x147)]===_0x3819c0):undefined,_0x56cd19=_0x592941?.[0x0],_0x293d10=_0x592941?.[0x1];let _0x1bbcf0=_0x3819c0?_0x56cd19:_0x64b92c,_0x26c30d=_0x1bbcf0&&_0x19e4a3[_0x1bbcf0]?_0x19e4a3[_0x1bbcf0]:undefined;_0x3819c0&&_0x293d10&&(_0x26c30d=_0x293d10);const _0xb77a37=_0x3819c0?_0x293d10??_0x26c30d:_0x26c30d,_0x41d22f=_0x2d56da||(_0x3819c0?_0x56cd19:undefined),_0x36bdda=_0x3819c0||_0xb77a37?.[_0x16e8a5(0x147)]||undefined,_0x18caac=_0x3e2026['env']||env(_0x16e8a5(0x174))||_0xb77a37?.[_0x16e8a5(0x133)]||_0x2fe78a[_0x16e8a5(0x133)]||DEFAULT_CONFIG_VALUES[_0x16e8a5(0x133)],_0x15d27c=_0xb77a37?.[_0x16e8a5(0x140)]||_0x2fe78a[_0x16e8a5(0x140)]||DEFAULT_CONFIG_VALUES[_0x16e8a5(0x140)],_0x5d6c51=env(_0x16e8a5(0x13d))||_0xb77a37?.['cookie']||_0x2fe78a[_0x16e8a5(0x16d)]||undefined,_0x3a93e0=env(_0x16e8a5(0x155))||_0xb77a37?.['accessKey']||_0x2fe78a['accessKey']||undefined,_0x306799=_0x3e2026[_0x16e8a5(0x176)]||env(_0x16e8a5(0x173))||_0xb77a37?.[_0x16e8a5(0x176)]||_0x2fe78a[_0x16e8a5(0x176)],_0x2f7581=normalizeLegacyOutputFormat(_0x306799),_0x2ae659=env(_0x16e8a5(0x17c))||_0xb77a37?.[_0x16e8a5(0x17a)]||_0x2fe78a[_0x16e8a5(0x17a)],_0xeff77f=_0x2ae659?Number(_0x2ae659)||undefined:undefined,_0x13b8f5=env(_0x16e8a5(0x153))||env(_0x16e8a5(0x151))||_0xb77a37?.['riskLevel']||_0x2fe78a[_0x16e8a5(0x163)]||_0x2fe78a[_0x16e8a5(0x16e)],_0x42ef4e=_0x13b8f5===_0x16e8a5(0x143)||_0x13b8f5==='write'?_0x13b8f5:DEFAULT_CONFIG_VALUES[_0x16e8a5(0x163)],_0xf0874c=env('VERBOSE'),_0x243f8e=_0xf0874c==='1'||_0xf0874c===_0x16e8a5(0x13b),_0x5a7fc6=_0xb77a37?.['apiDir']||_0x2fe78a['apiDir']||DEFAULT_CONFIG_VALUES['apiDir'],_0x376c39=isDaily(normalizeEnv(String(_0x18caac)))?_0x16e8a5(0x12f):'production';return{'appCode':typeof _0x36bdda===_0x16e8a5(0x136)&&_0x36bdda[_0x16e8a5(0x168)]()?_0x36bdda[_0x16e8a5(0x168)]():undefined,'env':_0x376c39,'locale':_0x15d27c,'cookie':_0x5d6c51,'accessKey':_0x3a93e0,'format':_0x2f7581,'pageSize':_0xeff77f,'riskLevel':_0x42ef4e,'verbose':_0x243f8e,'apiDir':_0x5a7fc6,'apps':_0x19e4a3,'defaultApp':_0x4060d6,'currentApp':_0x1a00b2?_0x1bbcf0:undefined,'explicitAppName':_0x41d22f,'raw':_0x2fe78a};}async function buildAuth(_0x12f01e){const _0x319acf=a139_0x92659e,{getCookie:_0x1d82f7}=await import(_0x319acf(0x167)),_0x1578a6=_0x12f01e['cookie']||_0x1d82f7(),_0x39f3fd=_0x1578a6?await getIsSessionValid():![];return{'cookie':_0x1578a6,'isLoggedIn':_0x39f3fd,async 'getOrLogin'(){const _0x761871=_0x319acf;if(_0x1578a6&&_0x39f3fd)return _0x1578a6;throw CliErrors[_0x761871(0x162)]();}};}export function resolveApiFilePath(_0x4432c6,_0x5c6013){const _0x531d43=a139_0x92659e,_0x283f06=resolve(process[_0x531d43(0x17b)](),_0x4432c6),_0x4729da=resolve(_0x283f06,_0x531d43(0x12a));if(!_0x5c6013)return _0x4729da;const _0x4692ce=readRawConfig(),_0x19778a=_0x4692ce[_0x531d43(0x177)]&&typeof _0x4692ce[_0x531d43(0x177)]===_0x531d43(0x164)?_0x4692ce[_0x531d43(0x177)]:{},_0x44a01e=Object[_0x531d43(0x169)](_0x19778a)[_0x531d43(0x13a)](([,_0x29e154])=>_0x29e154?.['appcode']===_0x5c6013);if(!_0x44a01e)return _0x4729da;const [_0x82d7d7,_0x5164e1]=_0x44a01e,_0x5c6f82=typeof _0x4692ce[_0x531d43(0x14c)]===_0x531d43(0x136)?_0x4692ce[_0x531d43(0x14c)]:undefined;if(_0x5164e1?.[_0x531d43(0x13f)])return _0x4729da;if(_0x5c6f82&&_0x82d7d7!==_0x5c6f82)return resolve(_0x283f06,_0x82d7d7+_0x531d43(0x137));return _0x4729da;}
@@ -1 +1 @@
1
- (function(_0x1e14e5,_0x455caa){const _0x5eb174=a140_0x3c7f,_0x474268=_0x1e14e5();while(!![]){try{const _0x2d3f69=parseInt(_0x5eb174(0x1aa))/0x1+-parseInt(_0x5eb174(0x199))/0x2*(parseInt(_0x5eb174(0x1a5))/0x3)+-parseInt(_0x5eb174(0x19a))/0x4*(-parseInt(_0x5eb174(0x1a3))/0x5)+-parseInt(_0x5eb174(0x1a8))/0x6*(parseInt(_0x5eb174(0x1a4))/0x7)+parseInt(_0x5eb174(0x19d))/0x8*(parseInt(_0x5eb174(0x1a7))/0x9)+parseInt(_0x5eb174(0x196))/0xa*(parseInt(_0x5eb174(0x1ab))/0xb)+parseInt(_0x5eb174(0x198))/0xc*(parseInt(_0x5eb174(0x19f))/0xd);if(_0x2d3f69===_0x455caa)break;else _0x474268['push'](_0x474268['shift']());}catch(_0x10d092){_0x474268['push'](_0x474268['shift']());}}}(a140_0x55de,0xe7f48));import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';const cache=new Map();function a140_0x3c7f(_0x164d3c,_0x53fe5f){_0x164d3c=_0x164d3c-0x195;const _0x55de6f=a140_0x55de();let _0x3c7f79=_0x55de6f[_0x164d3c];return _0x3c7f79;}function parseApiFile(_0x4b84b7){const _0x215e12=a140_0x3c7f,_0x51dd1c=[],_0x537dba=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x2cb9b8;while((_0x2cb9b8=_0x537dba[_0x215e12(0x195)](_0x4b84b7))!==null){_0x51dd1c[_0x215e12(0x1a9)]({'datasetCode':_0x2cb9b8[0x1],'tableName':_0x2cb9b8[0x2],'name':_0x2cb9b8[0x3],'alias':_0x2cb9b8[0x4]});}return _0x51dd1c;}export function loadAliasMap(_0x2dbb56,_0x7c8252,_0x5f1b58){const _0x4d0929=a140_0x3c7f,_0x578315=_0x5f1b58??resolve(process[_0x4d0929(0x1a0)](),_0x2dbb56,_0x4d0929(0x19b));if(cache[_0x4d0929(0x19c)](_0x578315))return cache[_0x4d0929(0x19e)](_0x578315);if(!existsSync(_0x578315))return cache[_0x4d0929(0x197)](_0x578315,[]),[];try{const _0x4c97be=readFileSync(_0x578315,_0x4d0929(0x1a6)),_0x2ff4a9=parseApiFile(_0x4c97be);return cache[_0x4d0929(0x197)](_0x578315,_0x2ff4a9),_0x2ff4a9;}catch{return cache['set'](_0x578315,[]),[];}}function a140_0x55de(){const _0x1273bd=['253264iSrdKl','13268882lScoXF','exec','10DnVNGK','set','12tbmKoc','1125030zAbLzN','69260YFaKjK','api.ts','has','8MxNifE','get','5306405HhxbUN','cwd','datasetCode','find','35fizLAU','105eTCSHY','6rWZsnC','utf-8','3695733nCATFy','129774WafLLd','push'];a140_0x55de=function(){return _0x1273bd;};return a140_0x55de();}export function resolveAlias(_0x43cbe2,_0x3b7656,_0x538abb,_0x5b9393){const _0x4c40a5=a140_0x3c7f;if(!_0x3b7656)return undefined;const _0x23e002=loadAliasMap(_0x43cbe2,_0x538abb,_0x5b9393),_0x3a49ac=_0x23e002[_0x4c40a5(0x1a2)](_0x53eb02=>_0x53eb02['alias']===_0x3b7656);return _0x3a49ac?.[_0x4c40a5(0x1a1)];}export function listAliases(_0x27d65c,_0x120c5c,_0x24caa4){return loadAliasMap(_0x27d65c,_0x120c5c,_0x24caa4);}
1
+ (function(_0x34e785,_0x1db4fa){const _0xae45fc=a140_0x3dd4,_0x4f09e0=_0x34e785();while(!![]){try{const _0x25add5=parseInt(_0xae45fc(0xe5))/0x1+parseInt(_0xae45fc(0xee))/0x2*(parseInt(_0xae45fc(0xea))/0x3)+-parseInt(_0xae45fc(0xec))/0x4*(-parseInt(_0xae45fc(0xef))/0x5)+-parseInt(_0xae45fc(0xe9))/0x6*(-parseInt(_0xae45fc(0xe3))/0x7)+-parseInt(_0xae45fc(0xf2))/0x8*(-parseInt(_0xae45fc(0xf3))/0x9)+-parseInt(_0xae45fc(0xf5))/0xa*(-parseInt(_0xae45fc(0xf0))/0xb)+-parseInt(_0xae45fc(0xed))/0xc;if(_0x25add5===_0x1db4fa)break;else _0x4f09e0['push'](_0x4f09e0['shift']());}catch(_0x360e6e){_0x4f09e0['push'](_0x4f09e0['shift']());}}}(a140_0x4cc6,0x3350d));import{readFileSync,existsSync}from'node:fs';function a140_0x4cc6(){const _0x4988c1=['has','12760KxvHqF','18tfPvVl','exec','10daCNQL','api.ts','utf-8','push','37317yftvzk','find','264596fbavSm','alias','set','get','132tmiSsx','36219DqzQNd','cwd','4YWMAPU','4551660nlxDiO','2sfjmmN','850180OcMUNS','245487HVATYc'];a140_0x4cc6=function(){return _0x4988c1;};return a140_0x4cc6();}import{resolve}from'node:path';function a140_0x3dd4(_0x24ac63,_0xd216b7){_0x24ac63=_0x24ac63-0xe1;const _0x4cc6c4=a140_0x4cc6();let _0x3dd44f=_0x4cc6c4[_0x24ac63];return _0x3dd44f;}const cache=new Map();function parseApiFile(_0x581e86){const _0x2ccfec=a140_0x3dd4,_0x444999=[],_0xaf5ae6=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x5e67ae;while((_0x5e67ae=_0xaf5ae6[_0x2ccfec(0xf4)](_0x581e86))!==null){_0x444999[_0x2ccfec(0xe2)]({'datasetCode':_0x5e67ae[0x1],'tableName':_0x5e67ae[0x2],'name':_0x5e67ae[0x3],'alias':_0x5e67ae[0x4]});}return _0x444999;}export function loadAliasMap(_0x1a2562,_0xedb886,_0x55ef27){const _0x21e0dc=a140_0x3dd4,_0x5af131=_0x55ef27??resolve(process[_0x21e0dc(0xeb)](),_0x1a2562,_0x21e0dc(0xf6));if(cache[_0x21e0dc(0xf1)](_0x5af131))return cache[_0x21e0dc(0xe8)](_0x5af131);if(!existsSync(_0x5af131))return cache[_0x21e0dc(0xe7)](_0x5af131,[]),[];try{const _0x25ee03=readFileSync(_0x5af131,_0x21e0dc(0xe1)),_0x319638=parseApiFile(_0x25ee03);return cache[_0x21e0dc(0xe7)](_0x5af131,_0x319638),_0x319638;}catch{return cache[_0x21e0dc(0xe7)](_0x5af131,[]),[];}}export function resolveAlias(_0x2f7d89,_0x1616a2,_0x44a821,_0x5f3bd0){const _0x1d9f54=a140_0x3dd4;if(!_0x1616a2)return undefined;const _0x5acbe3=loadAliasMap(_0x2f7d89,_0x44a821,_0x5f3bd0),_0x26754b=_0x5acbe3[_0x1d9f54(0xe4)](_0x2c9d97=>_0x2c9d97[_0x1d9f54(0xe6)]===_0x1616a2);return _0x26754b?.['datasetCode'];}export function listAliases(_0x312c88,_0x41fa05,_0x37c51f){return loadAliasMap(_0x312c88,_0x41fa05,_0x37c51f);}
@@ -1 +1 @@
1
- (function(_0x1b308d,_0x57bb8d){const _0x3ce507=a141_0x4248,_0x1e1db3=_0x1b308d();while(!![]){try{const _0x1a0ca4=-parseInt(_0x3ce507(0x15f))/0x1+-parseInt(_0x3ce507(0x15d))/0x2+-parseInt(_0x3ce507(0xce))/0x3+parseInt(_0x3ce507(0x16a))/0x4+parseInt(_0x3ce507(0x134))/0x5+parseInt(_0x3ce507(0xda))/0x6+parseInt(_0x3ce507(0xe0))/0x7*(-parseInt(_0x3ce507(0x108))/0x8);if(_0x1a0ca4===_0x57bb8d)break;else _0x1e1db3['push'](_0x1e1db3['shift']());}catch(_0x2b0e48){_0x1e1db3['push'](_0x1e1db3['shift']());}}}(a141_0x5b03,0x672dd));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(_0x3f8f7c){_activeCookie=_0x3f8f7c||undefined;}export function clearActiveCookie(){_activeCookie=undefined;}const DEFAULT_REQUEST_TIMEOUT_MS=0x7530;function createFetchFailureError(_0x4ceaa4,_0x3baf2a){const _0x475c26=a141_0x4248,_0x4e1c37=_0x3baf2a instanceof Error?_0x3baf2a[_0x475c26(0x14e)]:String(_0x3baf2a);return CliErrors[_0x475c26(0x13d)](_0x475c26(0x142)+_0x4ceaa4+(_0x4e1c37?'\x20('+_0x4e1c37+')':''),_0x475c26(0x11d));}async function apiRequest(_0x123c01,_0x1f4c88={}){const _0x40c268=a141_0x4248,{method:method=_0x40c268(0xe4),body:_0x553d0a,headers:headers={},timeout:timeout=DEFAULT_REQUEST_TIMEOUT_MS,useRuntime:useRuntime=![]}=_0x1f4c88,_0x4a6038=useRuntime?getRuntimeDomain():getApiDomain(),_0x106350=_activeCookie||getCookie(),_0x34b878=''+_0x4a6038+_0x123c01,_0x26d6ee=new AbortController(),_0x365fd8=setTimeout(()=>_0x26d6ee[_0x40c268(0x154)](),timeout);try{const _0x56b505=await fetch(_0x34b878,{'method':method,'headers':{'Content-Type':_0x40c268(0x165),'Cookie':_0x106350,'X-Invoke-Source':_0x40c268(0x14d),...headers},'body':_0x553d0a?JSON[_0x40c268(0xc9)](_0x553d0a):undefined,'signal':_0x26d6ee[_0x40c268(0x136)]});let _0x5dcbb6;try{_0x5dcbb6=await _0x56b505['json']();}catch{throw CliErrors[_0x40c268(0x13d)]('API\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x56b505[_0x40c268(0xe3)]+')',_0x56b505[_0x40c268(0xe3)]>=0x190?_0x40c268(0x109):undefined);}if(!_0x56b505['ok']||_0x5dcbb6[_0x40c268(0x115)]===![])throw CliErrors[_0x40c268(0x13d)](_0x5dcbb6[_0x40c268(0xd6)]||_0x5dcbb6['message']||_0x40c268(0x169)+_0x56b505[_0x40c268(0xe3)],_0x5dcbb6['errorCode']?_0x40c268(0xfe)+_0x5dcbb6[_0x40c268(0xdc)]:undefined);return _0x5dcbb6;}catch(_0x5ca4fb){if(_0x5ca4fb instanceof CliError)throw _0x5ca4fb;if(_0x5ca4fb instanceof Error&&_0x5ca4fb[_0x40c268(0xe9)]===_0x40c268(0x13b))throw CliErrors[_0x40c268(0x13d)](_0x40c268(0x167)+_0x34b878);throw createFetchFailureError(_0x34b878,_0x5ca4fb);}finally{clearTimeout(_0x365fd8);}}function isAuthFailure(_0x2f0694){const _0xfd9364=a141_0x4248,_0x514fba=_0x2f0694[_0xfd9364(0xd6)]||_0x2f0694[_0xfd9364(0x14e)]||_0x2f0694[_0xfd9364(0x164)]?.[_0xfd9364(0x14e)]||_0x2f0694[_0xfd9364(0xef)]||_0x2f0694[_0xfd9364(0x137)]||'';return _0x2f0694['errorCode']===_0xfd9364(0xed)||_0x2f0694[_0xfd9364(0x113)]===0x191||_0x2f0694[_0xfd9364(0x113)]==='401'||_0x514fba[_0xfd9364(0xec)](_0xfd9364(0xf0))||_0x514fba['includes'](_0xfd9364(0x105))||_0x514fba[_0xfd9364(0xec)]('登录')||_0x514fba[_0xfd9364(0xec)]('认证');}function a141_0x4248(_0x568495,_0x4a9b39){_0x568495=_0x568495-0xc9;const _0x5b0304=a141_0x5b03();let _0x424872=_0x5b0304[_0x568495];return _0x424872;}export async function platformFetch(_0x3b0458,_0x13a01e){const _0x3869a5=a141_0x4248;let _0x866ada;try{_0x866ada=await fetch(_0x3b0458,{'method':_0x13a01e[_0x3869a5(0x149)]??_0x3869a5(0xe4),'headers':{'Content-Type':_0x3869a5(0x165),'Cookie':_0x13a01e[_0x3869a5(0x139)],'X-Invoke-Source':_0x3869a5(0x14d)},..._0x13a01e[_0x3869a5(0x162)]&&{'body':JSON['stringify'](_0x13a01e['body'])}});}catch(_0x3a3913){throw createFetchFailureError(_0x3b0458,_0x3a3913);}if(!_0x866ada['ok']){if(_0x866ada[_0x3869a5(0xe3)]===0x191)throw CliErrors[_0x3869a5(0xdf)]();throw CliErrors['apiError'](_0x13a01e[_0x3869a5(0xf8)]+_0x3869a5(0x11f)+_0x866ada['status']);}const _0x2a456e=await _0x866ada[_0x3869a5(0x13e)]();if(_0x2a456e[_0x3869a5(0x115)]===![]){if(isAuthFailure(_0x2a456e))throw CliErrors[_0x3869a5(0xdf)]();throw CliErrors[_0x3869a5(0x13d)](_0x2a456e[_0x3869a5(0xd6)]||_0x2a456e[_0x3869a5(0x14e)]||_0x13a01e[_0x3869a5(0xf8)]+_0x3869a5(0xf7));}return _0x2a456e[_0x3869a5(0x164)];}export async function listBffScripts(_0x3caaec,_0x57b739,_0x3d0252){const _0x296e51=a141_0x4248;let _0x3997a0=_0x296e51(0x140)+_0x3caaec;if(_0x57b739)_0x3997a0+='&type='+_0x57b739;const _0x242d0f=await apiRequest(_0x3997a0);let _0x31895e=extractList(_0x242d0f[_0x296e51(0x164)]);if(_0x3d0252?.['scriptName']){const _0x193c9e=_0x3d0252[_0x296e51(0x153)]['toLowerCase']();_0x31895e=_0x31895e[_0x296e51(0xe1)](_0x4035ce=>_0x4035ce[_0x296e51(0x14f)]?.[_0x296e51(0x135)]()[_0x296e51(0xec)](_0x193c9e)||_0x4035ce[_0x296e51(0x125)]?.[_0x296e51(0x135)]()[_0x296e51(0xec)](_0x193c9e));}return _0x31895e;}export async function getBffScriptInfo(_0x472898){const _0x387d8e=a141_0x4248,_0x28b96e=await apiRequest(_0x387d8e(0x15c)+_0x472898);if(!_0x28b96e[_0x387d8e(0x164)])throw CliErrors[_0x387d8e(0x10d)](_0x387d8e(0x15a)+_0x472898);return _0x28b96e[_0x387d8e(0x164)];}export async function saveBffScript(_0x1b66fb){const _0x4bb0af=a141_0x4248,_0xa71790=await apiRequest('/api/management/library/scripts/save',{'method':'POST','body':_0x1b66fb}),{id:_0x4a7c15,entity:_0x55c9ea}=normalizeEntityWithIdResponse(_0xa71790['data']);if(_0x4a7c15!==undefined){const _0x268001=typeof _0x55c9ea[_0x4bb0af(0x14f)]===_0x4bb0af(0x146)||typeof _0x55c9ea[_0x4bb0af(0xfa)]==='string'?_0x55c9ea:undefined;return{'id':_0x4a7c15,'script':_0x268001};}throw CliErrors[_0x4bb0af(0x13d)](_0x4bb0af(0xf9));}export async function deleteBffScript(_0x31ed2f){const _0x49a563=a141_0x4248;await apiRequest('/api/management/library/scripts/delete',{'method':_0x49a563(0xca),'body':{'id':_0x31ed2f}});}export async function getBffScriptStatistics(_0x15cb50){const _0x1a0035=a141_0x4248,_0x553869=await apiRequest(_0x1a0035(0x117)+_0x15cb50);return extractList(_0x553869[_0x1a0035(0x164)]);}export async function clearBffScriptCache(){const _0x27d67b=a141_0x4248,_0x14f0fb=await apiRequest(_0x27d67b(0x107),{'method':_0x27d67b(0xca),'useRuntime':!![]});return typeof _0x14f0fb[_0x27d67b(0x164)]===_0x27d67b(0x146)?_0x14f0fb[_0x27d67b(0x164)]:'';}export async function listBffDatasetOperations(_0x26c854,_0x4e88a2){const _0x4f3675=a141_0x4248,_0x515e03=await apiRequest(_0x4f3675(0x13c),{'method':'POST','body':{'appCode':_0x26c854,'datasetId':_0x4e88a2}});return _0x515e03[_0x4f3675(0x164)];}export async function listSqlQueries(_0x4add4c,_0x16547b){const _0x3c8d77=a141_0x4248,_0x5f3f37=await apiRequest(_0x3c8d77(0xde),{'method':_0x3c8d77(0xca),'body':{'appCode':_0x4add4c,'currentPage':_0x16547b?.['currentPage']??0x1,'pageSize':_0x16547b?.[_0x3c8d77(0x101)]??0x32,'sqlCode':_0x16547b?.[_0x3c8d77(0x10a)],'sqlName':_0x16547b?.['sqlName']}});return _0x5f3f37['data'];}export async function getSqlQueryInfo(_0x565671,_0xcbf2ce){const _0x1b4071=a141_0x4248,_0x4a0dd3=await listSqlQueries(_0x565671,{'sqlCode':_0xcbf2ce}),_0x4cca00=_0x4a0dd3[_0x1b4071(0xee)]?.[0x0];if(!_0x4cca00)throw CliErrors[_0x1b4071(0x10d)](_0x1b4071(0xd9)+_0xcbf2ce);return _0x4cca00;}export async function getSqlQueryDetail(_0x4af52a){const _0x201dc2=a141_0x4248,_0x10235e=await apiRequest(_0x201dc2(0x110)+(_0x201dc2(0x14c)+encodeURIComponent(_0x4af52a)));if(!_0x10235e[_0x201dc2(0x164)])throw CliErrors[_0x201dc2(0x10d)](_0x201dc2(0xd9)+_0x4af52a);return _0x10235e[_0x201dc2(0x164)];}export async function getSqlQueryDetailById(_0x4ab3e3){const _0x152ebb=a141_0x4248,_0x4a7d9d=await apiRequest(_0x152ebb(0x111)+_0x4ab3e3);if(!_0x4a7d9d['data'])throw CliErrors[_0x152ebb(0x10d)](_0x152ebb(0x10e)+_0x4ab3e3);return _0x4a7d9d['data'];}export async function createSqlQuery(_0x28f9dd){const _0x42cdcc=a141_0x4248,_0x56f900=await apiRequest(_0x42cdcc(0x131),{'method':_0x42cdcc(0xca),'body':_0x28f9dd}),{id:_0x4d6ff2,entity:_0x276aaf}=normalizeEntityWithIdResponse(_0x56f900[_0x42cdcc(0x164)]);if(!(_0x42cdcc(0x10a)in _0x276aaf)&&_0x4d6ff2)return getSqlQueryDetailById(_0x4d6ff2);return normalizeSqlQueryEntity(_0x276aaf);}export async function updateSqlQuery(_0x265885){const _0x2d6168=a141_0x4248,_0x320dd9=await apiRequest(_0x2d6168(0xdb),{'method':_0x2d6168(0xca),'body':_0x265885}),{id:_0x3f2a79,entity:_0x331584}=normalizeEntityWithIdResponse(_0x320dd9[_0x2d6168(0x164)]);if(!(_0x2d6168(0x10a)in _0x331584)){if(_0x265885[_0x2d6168(0x10a)])return getSqlQueryDetail(_0x265885[_0x2d6168(0x10a)]);if(_0x3f2a79)return getSqlQueryDetailById(_0x3f2a79);}return normalizeSqlQueryEntity(_0x331584);}export async function deleteSqlQuery(_0x651a03){const _0x12d8c8=a141_0x4248;await apiRequest(_0x12d8c8(0x122),{'method':_0x12d8c8(0xca),'body':_0x651a03});}export async function saveSqlQuery(_0x17a791){const _0x1dedcd=await apiRequest('/api/node-toolbox/sql/save',{'method':'POST','body':_0x17a791});return _0x1dedcd['data'];}function normalizeSqlQueryEntity(_0x3b2442){const _0x4c477d=a141_0x4248;return{..._0x3b2442,'id':Number(_0x3b2442['id']),'dbId':_0x3b2442[_0x4c477d(0x11a)]==null?undefined:Number(_0x3b2442[_0x4c477d(0x11a)]),'version':_0x3b2442[_0x4c477d(0x10f)]==null?undefined:Number(_0x3b2442[_0x4c477d(0x10f)])};}export async function executeSql(_0x3d2bcb,_0xf91d89,_0x1cb0ca){const _0x4b5d32=a141_0x4248,_0x3f3072=await apiRequest(_0x4b5d32(0xeb),{'method':_0x4b5d32(0xca),'body':{'appCode':_0x3d2bcb,'sqlCode':_0xf91d89,..._0x1cb0ca&&{'params':_0x1cb0ca}},'useRuntime':!![]});return _0x3f3072[_0x4b5d32(0x164)];}export async function executeDatasetDataOperation(_0x2523a8,_0x2f74ef,_0x4e4d38,_0x2f6614={}){const _0x550841=a141_0x4248;try{const _0x1d390e=await apiRequest(_0x550841(0x102)+_0x2523a8+'/'+_0x2f74ef+'/'+_0x4e4d38,{'method':_0x550841(0xca),'body':_0x2f6614,'useRuntime':!![]});return _0x1d390e['data'];}catch(_0x1dea03){if(_0x4e4d38===_0x550841(0x12f)&&_0x1dea03 instanceof CliError&&_0x1dea03[_0x550841(0x113)]===_0x550841(0xfc)&&_0x2f6614['id']!==undefined&&_0x2f6614['id']!==null&&_0x2f6614['id']!==''){const _0x32e7e2=await apiRequest(_0x550841(0x102)+_0x2523a8+'/'+_0x2f74ef+_0x550841(0x12a),{'method':'POST','body':{'where':{'id':{'$eq':_0x2f6614['id']}},'currentPage':0x1,'pageSize':0x1},'useRuntime':!![]}),_0xab7b81=Array[_0x550841(0x156)](_0x32e7e2[_0x550841(0x164)]?.[_0x550841(0xee)])?_0x32e7e2[_0x550841(0x164)][_0x550841(0xee)]:[];return _0xab7b81[0x0]??null;}throw _0x1dea03;}}export async function listDatasets(_0x297a57,_0x53cd67){const _0x35f8af=a141_0x4248,_0x35f4dc={'appCode':_0x297a57,'deleted':![]};if(_0x53cd67?.[_0x35f8af(0x113)])_0x35f4dc['code']=_0x53cd67[_0x35f8af(0x113)];if(_0x53cd67?.[_0x35f8af(0xe9)])_0x35f4dc[_0x35f8af(0xe9)]=_0x53cd67['name'];const _0x432198=await apiRequest(_0x35f8af(0xf2),{'method':_0x35f8af(0xca),'body':_0x35f4dc});return extractList(_0x432198[_0x35f8af(0x164)]);}export async function deleteDataset(_0x15fabd,_0x45d6ed){const _0x344f8c=a141_0x4248;await apiRequest(_0x344f8c(0x14a),{'method':_0x344f8c(0xca),'body':{'appCode':_0x15fabd,'datasetId':_0x45d6ed}});}export async function searchDatasets(_0x8d4f4d,_0x1ddf9d){const _0x579ad2=a141_0x4248,_0x499069=await listDatasets(_0x8d4f4d,{'name':_0x1ddf9d}),_0x587176=_0x1ddf9d[_0x579ad2(0x135)](),_0x2418b9=new Set(_0x499069[_0x579ad2(0x159)](_0x399b90=>_0x399b90['id'])),_0x1ff799=_0x499069[_0x579ad2(0xe1)](_0xe94c7b=>_0xe94c7b['dbtableConfig']?.[_0x579ad2(0xf3)]?.['toLowerCase']()[_0x579ad2(0xec)](_0x587176)||_0xe94c7b[_0x579ad2(0x125)]?.['toLowerCase']()[_0x579ad2(0xec)](_0x587176)),_0x9d454a=await listDatasets(_0x8d4f4d,{'code':_0x1ddf9d});for(const _0x5314ca of _0x9d454a){!_0x2418b9['has'](_0x5314ca['id'])&&(_0x499069['push'](_0x5314ca),_0x2418b9[_0x579ad2(0x14b)](_0x5314ca['id']));}return _0x499069;}export function normalizeDatasetOperations(_0x2334cc){const _0xc7fc23=a141_0x4248;if(Array['isArray'](_0x2334cc))return _0x2334cc['filter'](_0x107d92=>_0x107d92!=null&&typeof _0x107d92===_0xc7fc23(0x144));if(_0x2334cc&&typeof _0x2334cc===_0xc7fc23(0x144))return Object[_0xc7fc23(0x166)](_0x2334cc)[_0xc7fc23(0xe1)](([,_0x51fce0])=>_0x51fce0!=null&&typeof _0x51fce0===_0xc7fc23(0x144))['map'](([_0x5bcec5,_0x175e0e])=>({..._0x175e0e,'name':_0x175e0e['name']??_0x175e0e[_0xc7fc23(0xf1)]??_0x5bcec5}));return[];}export async function getDatasetDetail(_0xe84dea){const _0x5d061f=a141_0x4248,_0x36910b=/^\d+$/[_0x5d061f(0x16c)](_0xe84dea)?'id':_0x5d061f(0x113),_0x1e5187=await apiRequest(_0x5d061f(0x124)+_0x36910b+'='+_0xe84dea);return _0x1e5187[_0x5d061f(0x164)];}export async function updateDrivenData(_0x511a15){const _0x7e3471=a141_0x4248,_0x1e5165=await apiRequest('/smartapi/dataset/update-driven-data',{'method':'POST','body':_0x511a15});return _0x1e5165[_0x7e3471(0x164)];}export async function getDatasetOperations(_0x4054a4){const _0x2b6059=a141_0x4248,_0x207fd7=await getDatasetDetail(_0x4054a4),_0x3ceecc=normalizeDatasetOperations(_0x207fd7[_0x2b6059(0x114)])[_0x2b6059(0x159)](_0x4a04e3=>({'name':_0x4a04e3[_0x2b6059(0xe9)]||_0x4a04e3[_0x2b6059(0xf1)],'displayName':_0x4a04e3[_0x2b6059(0x145)]||_0x4a04e3[_0x2b6059(0xe9)],'type':_0x4a04e3[_0x2b6059(0x128)],'method':_0x4a04e3[_0x2b6059(0x149)],'path':_0x4a04e3[_0x2b6059(0x123)],'enabled':_0x4a04e3[_0x2b6059(0xd0)]??!![],'requestFields':_0x4a04e3[_0x2b6059(0x12b)],'responseFields':_0x4a04e3['responseFields']}));return{'dataset':{'id':_0x207fd7['id']??_0x207fd7[_0x2b6059(0x11e)],'name':_0x207fd7[_0x2b6059(0xe9)],'code':_0x207fd7[_0x2b6059(0x113)]||_0x207fd7['modelCode'],'tableName':_0x207fd7[_0x2b6059(0xf3)]||_0x207fd7[_0x2b6059(0x141)]?.[_0x2b6059(0xf3)]},'operations':_0x3ceecc};}export async function getOperationDetail(_0x5c9f01,_0x193ed1,_0xc13e71){const _0x1670e3=a141_0x4248;let _0x291695=_0x193ed1;if(!/^\d+$/[_0x1670e3(0x16c)](_0x193ed1)){const _0x3735c5=await listDatasets(_0x5c9f01,{'code':_0x193ed1}),_0x139b67=_0x3735c5['find'](_0x5d7ec2=>_0x5d7ec2[_0x1670e3(0x113)]===_0x193ed1||String(_0x5d7ec2['id'])===_0x193ed1);if(!_0x139b67)throw CliErrors[_0x1670e3(0x10d)]('Dataset\x20not\x20found:\x20'+_0x193ed1);_0x291695=String(_0x139b67['id']);}const _0x6221c6=await getDatasetDetail(_0x291695),_0x337eb7=normalizeDatasetOperations(_0x6221c6[_0x1670e3(0x114)])['find'](_0x271d68=>(_0x271d68[_0x1670e3(0xe9)]||_0x271d68[_0x1670e3(0xf1)])===_0xc13e71);if(!_0x337eb7)throw CliErrors['validation'](_0x1670e3(0x157)+_0xc13e71+_0x1670e3(0x138)+_0x193ed1);return{'dataset':{'id':_0x6221c6['id']??_0x6221c6[_0x1670e3(0x11e)],'name':_0x6221c6[_0x1670e3(0xe9)],'code':_0x6221c6[_0x1670e3(0x113)]||_0x6221c6[_0x1670e3(0x12c)],'tableName':_0x6221c6[_0x1670e3(0xf3)]||_0x6221c6[_0x1670e3(0x141)]?.['tableName']},'operation':_0x337eb7};}export async function startGenerateStandardPages(_0x19e0fc,_0x1574c4,_0x21ee89){const _0x24b09c=a141_0x4248,_0x332630=await apiRequest('/smartapi/lovrabet/dataset/'+_0x1574c4+'/generate-standard-pages/start',{'method':_0x24b09c(0xca),'body':{'appCode':_0x19e0fc,..._0x21ee89?.[_0x24b09c(0x132)]?{'clientOperationId':_0x21ee89['clientOperationId']}:{}},'timeout':DEFAULT_REQUEST_TIMEOUT_MS});return _0x332630['data'];}export async function getGenerateStandardPagesStatus(_0x1982d2,_0x16a3b0,_0x219007){const _0x5006b1=a141_0x4248,_0x30166f=new URLSearchParams({'appCode':_0x1982d2});_0x219007[_0x5006b1(0xea)]&&_0x30166f['set'](_0x5006b1(0xea),_0x219007[_0x5006b1(0xea)]);_0x219007[_0x5006b1(0x132)]&&_0x30166f[_0x5006b1(0xd7)]('clientOperationId',_0x219007[_0x5006b1(0x132)]);const _0x48adc5=await apiRequest(_0x5006b1(0x116)+_0x16a3b0+_0x5006b1(0x119)+_0x30166f['toString']());return _0x48adc5[_0x5006b1(0x164)];}function a141_0x5b03(){const _0x9db68c=['/smartapi/question/er-config/erCreate','sqlName','stringify','POST','\x20\x20where:\x20{},','/smartapi/lovrabet/detail?pageId=','/smartapi/db-analysis/status/','1647954JSPBVk','/smartapi/dblink/getList','enabled','currentPage','(/*\x20params\x20*/);','if\x20(!data.execSuccess)\x20throw\x20new\x20Error(\x27SQL\x20execution\x20failed\x27);','Warning:\x20showing\x20first\x20','\x20\x20params:\x20{\x20/*\x20parameter\x20values\x20*/\x20},','errorMsg','set','.remove(id);','SQL\x20query\x20not\x20found:\x20','4060296icgloW','/smartapi/custom/updateUserCustomSql','errorCode','/smartapi/dblink/update','/smartapi/custom/queryUserCustomSqlList','authRequired','77Ypgufc','filter','\x20\x20sqlCode:\x20\x27','status','GET','push','/smartapi/question/er-config/update-single','\x20of\x20','\x20\x20});','name','operationId','/api/custom/executeSql','includes','UNAUTHORIZED','tableData','errorMessage','401','operationName','/smartapi/dataset/get-dataset-list','tableName','toString','warn','/sync-to-pages','\x20failed','label','BFF\x20save\x20returned\x20no\x20valid\x20id','scriptType','.create({\x20/*\x20fields\x20*/\x20});','api_error','dataset_','API\x20error\x20code:\x20','export\x20default\x20async\x20function\x20handler(params,\x20context)\x20{','const\x20client\x20=\x20new\x20LovrabetClient({\x20appCode:\x20\x27<YOUR_APP_CODE>\x27\x20});','pageSize','/api/','\x20\x20currentPage:\x201,','/smartapi/lovrabet/update-page','Unauthorized','//\x20SQL:\x20','/api/management/script/cache/clear','66944GdcoRJ','Check\x20your\x20auth\x20cookie\x20and\x20try\x20again.','sqlCode','target','\x20\x20const\x20rows\x20=\x20await\x20context.client.sql.execute({','validation','SQL\x20query\x20not\x20found:\x20id=','version','/smartapi/custom/getUserCustomSql','/smartapi/custom/getUserCustomSql?id=','length','code','operations','success','/smartapi/lovrabet/dataset/','/api/management/library/scripts/statistics?appCode=','\x20\x20pageSize:\x2020,','/generate-standard-pages/status?','dbId','const\x20result\x20=\x20await\x20client.models.','//\x20BFF\x20context:\x20context.client.sql.execute\x20returns\x20rows\x20directly','Check\x20network\x20connectivity\x20and\x20try\x20again.','modelId','\x20failed,\x20HTTP\x20','});','/smartapi/question/er-config/erDelete','/smartapi/custom/deleteUserCustomSql','path','/smartapi/dataset/get-driven-data?','description','tableList','table','type','delete','/filter','requestFields','modelCode','sdk','/smartapi/dblink/delete','getOne','join','/smartapi/custom/saveUserCustomSql','clientOperationId','\x20\x20\x20\x20sqlCode:\x20\x27','1235235SJpLSA','toLowerCase','signal','error','\x22\x20not\x20found\x20in\x20dataset\x20','cookie','/smartapi/db-analysis/jobs/cancel','AbortError','/smartapi/dataset/get-dataset-operation','apiError','json','replace','/api/management/library/scripts/list?appCode=','dbtableConfig','Request\x20failed:\x20','totalCount','object','displayName','string','\x20\x20\x20\x20params:\x20{\x20/*\x20parameter\x20values\x20*/\x20},','//\x20','method','/smartapi/dataset/delete-dataset','add','?sqlCode=','cli:rabetbase','message','functionName','/smartapi/question/er-config','/smartapi/dblink/getAllTableList','import\x20{\x20LovrabetClient\x20}\x20from\x20\x27@lovrabet/sdk\x27;','scriptName','abort','Use\x20the\x20platform\x20console\x20to\x20see\x20all.','isArray','Operation\x20\x22','/smartapi/dblink/create','map','BFF\x20script\x20not\x20found:\x20id=','Page\x20not\x20found:\x20','/api/management/library/scripts/info?id=','1046962VryJJg','remove','32831IXqcUB','includeImports','/smartapi/db-analysis/start','body','.update(id,\x20{\x20/*\x20fields\x20*/\x20});','data','application/json','entries','Request\x20timeout:\x20','update','API\x20error:\x20','2786144jibkxv','/smartapi/app/getList','test'];a141_0x5b03=function(){return _0x9db68c;};return a141_0x5b03();}export async function getStandardPageStatus(_0x871812,_0xb78318){const _0x2365d6=a141_0x4248,_0x573932=await apiRequest(_0x2365d6(0x116)+_0xb78318+'/standard-page-status?appCode='+encodeURIComponent(_0x871812));return _0x573932[_0x2365d6(0x164)];}export async function tryGetStandardPageStatus(_0x439ca0,_0x5eb818){const _0x9b613d=a141_0x4248;try{return await getStandardPageStatus(_0x439ca0,_0x5eb818);}catch(_0x520637){if(_0x520637 instanceof CliError&&_0x520637[_0x9b613d(0x113)]===_0x9b613d(0xfc)&&/404|not found|non-json response/i[_0x9b613d(0x16c)](_0x520637[_0x9b613d(0x14e)]))return null;throw _0x520637;}}export async function syncStandardPages(_0x583078,_0x13f9b7){const _0x1a6adc=a141_0x4248,_0x51cd9d=await apiRequest(_0x1a6adc(0x116)+_0x13f9b7+_0x1a6adc(0xf6),{'method':'POST','body':{'appCode':_0x583078}});return _0x51cd9d[_0x1a6adc(0x164)];}export async function getPageDetail(_0x555ff5){const _0x42e449=a141_0x4248,_0x593e85=await apiRequest(_0x42e449(0xcc)+_0x555ff5);if(!_0x593e85[_0x42e449(0x164)])throw CliErrors[_0x42e449(0x10d)](_0x42e449(0x15b)+_0x555ff5);return _0x593e85['data'];}export async function updatePage(_0x161f91,_0x4d22d1,_0x393d7b,_0x3d9257){const _0xc93d8f=a141_0x4248,_0x6e3544=await apiRequest(_0xc93d8f(0x104),{'method':_0xc93d8f(0xca),'body':{'appCode':_0x161f91,'pageId':_0x4d22d1,'code':_0x393d7b,'datasetIds':_0x3d9257}});return _0x6e3544[_0xc93d8f(0x164)];}export function generateSdkCode(_0x379fa0,_0x2b7a3e,_0x2be69a){const _0x2d8bda=a141_0x4248,_0x783b05=_0x2be69a?.[_0x2d8bda(0x160)]??!![],_0xc0aed=_0x2d8bda(0xfd)+_0x379fa0['code']?.[_0x2d8bda(0x13f)](/-/g,'_'),_0x5edefb=_0x2b7a3e[_0x2d8bda(0xe9)]||_0x2b7a3e[_0x2d8bda(0xf1)]||_0x2d8bda(0xe1),_0x524b93=[];_0x783b05&&_0x524b93[_0x2d8bda(0xe5)](_0x2d8bda(0x152),'',_0x2d8bda(0x100),'');_0x524b93[_0x2d8bda(0xe5)](_0x2d8bda(0x148)+_0x379fa0[_0x2d8bda(0xe9)]+'\x20('+(_0x379fa0[_0x2d8bda(0xf3)]||_0x2d8bda(0x127))+')');if(_0x5edefb==='filter')_0x524b93[_0x2d8bda(0xe5)]('const\x20result\x20=\x20await\x20client.models.'+_0xc0aed+'.filter({',_0x2d8bda(0xcb),_0x2d8bda(0x118),_0x2d8bda(0x103),_0x2d8bda(0x120));else{if(_0x5edefb===_0x2d8bda(0x12f))_0x524b93[_0x2d8bda(0xe5)](_0x2d8bda(0x11b)+_0xc0aed+'.getOne(id);');else{if(_0x5edefb==='create')_0x524b93[_0x2d8bda(0xe5)](_0x2d8bda(0x11b)+_0xc0aed+_0x2d8bda(0xfb));else{if(_0x5edefb===_0x2d8bda(0x168))_0x524b93[_0x2d8bda(0xe5)](_0x2d8bda(0x11b)+_0xc0aed+_0x2d8bda(0x163));else _0x5edefb===_0x2d8bda(0x129)||_0x5edefb===_0x2d8bda(0x15e)?_0x524b93[_0x2d8bda(0xe5)](_0x2d8bda(0x11b)+_0xc0aed+_0x2d8bda(0xd8)):_0x524b93['push'](_0x2d8bda(0x11b)+_0xc0aed+'.'+_0x5edefb+_0x2d8bda(0xd2));}}}return _0x524b93[_0x2d8bda(0x130)]('\x0a');}export function generateSqlCodeTemplate(_0x4e3239,_0x4232cf){const _0x4da76a=a141_0x4248,_0xb1c488=_0x4232cf?.[_0x4da76a(0x10b)]??_0x4da76a(0x12d),_0x5aded5=_0x4232cf?.[_0x4da76a(0x160)]??!![],_0x39179e=[];return _0x39179e[_0x4da76a(0xe5)](_0x4da76a(0x106)+_0x4e3239[_0x4da76a(0x16e)]+'\x20('+_0x4e3239[_0x4da76a(0x10a)]+')'),_0xb1c488===_0x4da76a(0x12d)?(_0x5aded5&&_0x39179e[_0x4da76a(0xe5)](_0x4da76a(0x152),'',_0x4da76a(0x100),''),_0x39179e[_0x4da76a(0xe5)]('const\x20data\x20=\x20await\x20client.sql.execute({',_0x4da76a(0xe2)+_0x4e3239[_0x4da76a(0x10a)]+'\x27,',_0x4da76a(0xd5),_0x4da76a(0x120),_0x4da76a(0xd3),'const\x20results\x20=\x20data.execResult\x20||\x20[];')):_0x39179e['push'](_0x4da76a(0x11c),_0x4da76a(0xff),_0x4da76a(0x10c),_0x4da76a(0x133)+_0x4e3239[_0x4da76a(0x10a)]+'\x27,',_0x4da76a(0x147),_0x4da76a(0xe8),'\x20\x20return\x20rows;','}'),_0x39179e[_0x4da76a(0x130)]('\x0a');}export async function getErConfig(_0x3665ec,_0x5cad30){const _0x374fde=a141_0x4248,_0x569fb7=await apiRequest(_0x374fde(0x150),{'method':_0x374fde(0xca),'body':{'appCode':_0x3665ec,'dblinkId':_0x5cad30}});return _0x569fb7[_0x374fde(0x164)];}export async function createErRelation(_0x41612a){const _0x1c33d4=a141_0x4248,_0xf1991d=await apiRequest(_0x1c33d4(0x16d),{'method':'POST','body':_0x41612a});return _0xf1991d[_0x1c33d4(0x164)];}export async function updateErRelation(_0x3e1fb8){const _0x57d08b=a141_0x4248,_0x5be3ad=await apiRequest(_0x57d08b(0xe6),{'method':_0x57d08b(0xca),'body':_0x3e1fb8});return _0x5be3ad[_0x57d08b(0x164)];}export async function deleteErRelation(_0x3756f2){const _0x25a4e0=a141_0x4248,_0x4c2218=await apiRequest(_0x25a4e0(0x121),{'method':_0x25a4e0(0xca),'body':_0x3756f2});return _0x4c2218[_0x25a4e0(0x164)];}function buildQuery(_0x2508c2){const _0x2d326f=a141_0x4248,_0x4c3e15=new URLSearchParams();for(const [_0x3fc0d3,_0x20130b]of Object[_0x2d326f(0x166)](_0x2508c2)){if(_0x20130b===undefined||_0x20130b==='')continue;_0x4c3e15[_0x2d326f(0xd7)](_0x3fc0d3,String(_0x20130b));}const _0x5c2d42=_0x4c3e15[_0x2d326f(0xf4)]();return _0x5c2d42?'?'+_0x5c2d42:'';}export async function listDbLinks(_0x4e6acc,_0x88b12f){const _0x1c7d08=a141_0x4248,_0x4391c7=await apiRequest(_0x1c7d08(0xcf),{'method':_0x1c7d08(0xca),'body':{'appCode':_0x4e6acc,'currentPage':_0x88b12f?.[_0x1c7d08(0xd1)]??0x1,'pageSize':_0x88b12f?.['pageSize']??0x64}});return{'items':extractList(_0x4391c7[_0x1c7d08(0x164)]),'paging':extractPaging(_0x4391c7[_0x1c7d08(0x164)])};}export async function getDbLinkInfo(_0x28a49a){const _0x426fa3=a141_0x4248,_0x44e27b=await apiRequest('/smartapi/dblink/getOne'+buildQuery({'id':_0x28a49a}));return _0x44e27b[_0x426fa3(0x164)];}export async function createDbLink(_0x9221cf){const _0x5c028e=a141_0x4248,_0x44eba0=await apiRequest(_0x5c028e(0x158),{'method':_0x5c028e(0xca),'body':_0x9221cf});return _0x44eba0['data'];}export async function updateDbLink(_0x2d1df6){const _0x1533ba=a141_0x4248,_0x36ce93=await apiRequest(_0x1533ba(0xdd),{'method':_0x1533ba(0xca),'body':_0x2d1df6});return _0x36ce93[_0x1533ba(0x164)];}export async function deleteDbLink(_0x5eddac){const _0x5a70ce=a141_0x4248;await apiRequest(_0x5a70ce(0x12e),{'method':_0x5a70ce(0xca),'body':{'id':_0x5eddac}});}export async function testDbLinkConnect(_0x190bc8){const _0x2eba4a=a141_0x4248,_0x2e4469=await apiRequest('/smartapi/dblink/testConnect'+buildQuery({'id':_0x190bc8}));return _0x2e4469[_0x2eba4a(0x164)];}export async function startDbAnalysis(_0x245b35,_0x1a1454){const _0x4d4995=a141_0x4248,_0x3e81ac=await apiRequest(_0x4d4995(0x161),{'method':'POST','body':{'dbLinkId':_0x245b35,..._0x1a1454&&_0x1a1454[_0x4d4995(0x112)]>0x0?{'tableNames':_0x1a1454}:{}}}),_0x536664=_0x3e81ac[_0x4d4995(0x164)];if(typeof _0x536664==='string')return _0x536664;if(_0x536664&&typeof _0x536664===_0x4d4995(0x144)&&typeof _0x536664['planId']===_0x4d4995(0x146))return _0x536664['planId'];return _0x536664!=null?String(_0x536664):'';}export async function cancelDbAnalysis(_0x4e647d){const _0x36e4ea=a141_0x4248;await apiRequest(_0x36e4ea(0x13a)+buildQuery({'planId':_0x4e647d}),{'method':_0x36e4ea(0xca)});}export async function getDbAnalysisStatus(_0x295fcc){const _0x49a6b5=a141_0x4248,_0x45e8a6=await apiRequest(_0x49a6b5(0xcd)+encodeURIComponent(_0x295fcc));return _0x45e8a6[_0x49a6b5(0x164)];}export async function getDbAllTableList(_0x57b8b4,_0x4ee1db){const _0x466eec=a141_0x4248,_0x11a1d3=await apiRequest(_0x466eec(0x151)+buildQuery({'appCode':_0x57b8b4,'dbLinkId':_0x4ee1db})),_0x42f21c=_0x11a1d3[_0x466eec(0x164)];if(Array[_0x466eec(0x156)](_0x42f21c))return _0x42f21c;return extractList(_0x42f21c);}export async function getDbTableDiff(_0x4b3094,_0x3c8b17,_0x37f84e){const _0x4abc03=a141_0x4248,_0xa26012=await apiRequest('/smartapi/dblink/getTableDiffV2ByPage'+buildQuery({'appCode':_0x4b3094,'dbLinkId':_0x3c8b17,'pageIndex':_0x37f84e?.['pageIndex']??0x1,'pageSize':_0x37f84e?.[_0x4abc03(0x101)]??0x14,'tableName':_0x37f84e?.[_0x4abc03(0xf3)]})),_0x1d4c70=_0xa26012[_0x4abc03(0x164)];return{'totalCount':_0x1d4c70?.[_0x4abc03(0x143)]??0x0,'tableList':Array[_0x4abc03(0x156)](_0x1d4c70?.['tableList'])?_0x1d4c70[_0x4abc03(0x126)]:[]};}const REMOTE_APP_PAGE_SIZE=0xc8;export async function listRemoteApps(){const _0x14a124=a141_0x4248,_0x17931a=await apiRequest(_0x14a124(0x16b),{'method':_0x14a124(0xca),'body':{'currentPage':0x1,'pageSize':REMOTE_APP_PAGE_SIZE}}),_0x4db993=extractList(_0x17931a[_0x14a124(0x164)]),_0x165103=extractPaging(_0x17931a[_0x14a124(0x164)]);return _0x165103&&_0x165103['totalCount']>REMOTE_APP_PAGE_SIZE&&console[_0x14a124(0xf5)](_0x14a124(0xd4)+REMOTE_APP_PAGE_SIZE+_0x14a124(0xe7)+_0x165103['totalCount']+'\x20apps.\x20'+_0x14a124(0x155)),_0x4db993;}
1
+ (function(_0x6034d2,_0x2d8096){const _0xce08a4=a141_0x47e4,_0xe89bf9=_0x6034d2();while(!![]){try{const _0x3103c1=-parseInt(_0xce08a4(0x1bb))/0x1+-parseInt(_0xce08a4(0x162))/0x2*(-parseInt(_0xce08a4(0x158))/0x3)+-parseInt(_0xce08a4(0x154))/0x4+-parseInt(_0xce08a4(0x192))/0x5+parseInt(_0xce08a4(0x191))/0x6*(parseInt(_0xce08a4(0x1aa))/0x7)+parseInt(_0xce08a4(0x139))/0x8+parseInt(_0xce08a4(0x1bd))/0x9;if(_0x3103c1===_0x2d8096)break;else _0xe89bf9['push'](_0xe89bf9['shift']());}catch(_0x507f90){_0xe89bf9['push'](_0xe89bf9['shift']());}}}(a141_0x43dc,0x70a1c));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(_0x5aa80c){_activeCookie=_0x5aa80c||undefined;}function a141_0x43dc(){const _0x355c0c=['code','SQL\x20query\x20not\x20found:\x20','authRequired','/api/management/library/scripts/list?appCode=','operationId','target','\x20failed,\x20HTTP\x20','6ucMGfe','4444520RXOSIZ','//\x20SQL:\x20','join','/smartapi/dblink/getAllTableList','cookie','/smartapi/custom/getUserCustomSql','/smartapi/question/er-config/erCreate','.create({\x20/*\x20fields\x20*/\x20});','scriptName','/api/','map','api_error','success','/smartapi/db-analysis/start','dataset_','/sync-to-pages','getOne','Use\x20the\x20platform\x20console\x20to\x20see\x20all.','\x20\x20currentPage:\x201,','&type=','.update(id,\x20{\x20/*\x20fields\x20*/\x20});','apiError','method','abort','3910081AmURWX','tableData','BFF\x20save\x20returned\x20no\x20valid\x20id','/api/custom/executeSql','path','/smartapi/question/er-config/erDelete','/smartapi/dataset/get-dataset-operation','find','/smartapi/custom/saveUserCustomSql','isArray','message','/api/node-toolbox/sql/save','\x20\x20\x20\x20sqlCode:\x20\x27','clientOperationId','json','errorCode','UNAUTHORIZED','660534zTCbGk','table','8195652WNiMtK','body','/smartapi/dataset/get-driven-data?','object','/api/management/library/scripts/delete','scriptType','validation','.filter({','dbId','.remove(id);','set','version','data','Warning:\x20showing\x20first\x20','currentPage','/generate-standard-pages/status?','\x20\x20where:\x20{},','Request\x20failed:\x20','if\x20(!data.execSuccess)\x20throw\x20new\x20Error(\x27SQL\x20execution\x20failed\x27);','\x20\x20sqlCode:\x20\x27','entries','});','const\x20data\x20=\x20await\x20client.sql.execute({','API\x20error\x20code:\x20','create','modelId','error','Check\x20network\x20connectivity\x20and\x20try\x20again.','4886880XhIaXC','/api/management/script/cache/clear','sqlName','update','/smartapi/dblink/getOne','push','toString','/smartapi/dblink/testConnect','AbortError','includes','import\x20{\x20LovrabetClient\x20}\x20from\x20\x27@lovrabet/sdk\x27;','tableList','/smartapi/custom/queryUserCustomSqlList','Page\x20not\x20found:\x20','label','401','//\x20','stringify','\x22\x20not\x20found\x20in\x20dataset\x20','/smartapi/question/er-config','enabled','name','const\x20client\x20=\x20new\x20LovrabetClient({\x20appCode:\x20\x27<YOUR_APP_CODE>\x27\x20});','cli:rabetbase','/api/management/library/scripts/info?id=','/smartapi/db-analysis/status/','/filter','576580WHBHCf','\x20\x20});','/smartapi/question/er-config/update-single','\x20\x20pageSize:\x2020,','3tcSddS','\x20apps.\x20','signal','operations','/smartapi/dataset/get-dataset-list','\x20failed','GET','/smartapi/lovrabet/update-page','dbtableConfig','status','149704SzwJWf','const\x20results\x20=\x20data.execResult\x20||\x20[];','Unauthorized','const\x20result\x20=\x20await\x20client.models.','POST','tableName','toLowerCase','type','/api/management/library/scripts/statistics?appCode=','totalCount','/smartapi/dataset/delete-dataset','responseFields','operationName','/smartapi/dblink/getTableDiffV2ByPage','planId','BFF\x20script\x20not\x20found:\x20id=','delete','/smartapi/lovrabet/dataset/','/smartapi/custom/getUserCustomSql?id=','SQL\x20query\x20not\x20found:\x20id=','length','string','/smartapi/db-analysis/jobs/cancel','\x20\x20params:\x20{\x20/*\x20parameter\x20values\x20*/\x20},','sdk','test','(/*\x20params\x20*/);','/smartapi/dblink/update','/smartapi/lovrabet/detail?pageId=','/smartapi/dblink/delete','Dataset\x20not\x20found:\x20','\x20\x20return\x20rows;','replace','pageSize','includeImports','/standard-page-status?appCode=','Check\x20your\x20auth\x20cookie\x20and\x20try\x20again.','/smartapi/custom/updateUserCustomSql','filter','sqlCode'];a141_0x43dc=function(){return _0x355c0c;};return a141_0x43dc();}export function clearActiveCookie(){_activeCookie=undefined;}const DEFAULT_REQUEST_TIMEOUT_MS=0x7530;function createFetchFailureError(_0x564e6a,_0x306459){const _0x45a89f=a141_0x47e4,_0x32d4f4=_0x306459 instanceof Error?_0x306459[_0x45a89f(0x1b4)]:String(_0x306459);return CliErrors['apiError'](_0x45a89f(0x12e)+_0x564e6a+(_0x32d4f4?'\x20('+_0x32d4f4+')':''),_0x45a89f(0x138));}async function apiRequest(_0x232ef3,_0x261580={}){const _0x1725e5=a141_0x47e4,{method:method=_0x1725e5(0x15e),body:_0x38a2d4,headers:headers={},timeout:timeout=DEFAULT_REQUEST_TIMEOUT_MS,useRuntime:useRuntime=![]}=_0x261580,_0x118818=useRuntime?getRuntimeDomain():getApiDomain(),_0x29f7c4=_activeCookie||getCookie(),_0x20570c=''+_0x118818+_0x232ef3,_0x602d7d=new AbortController(),_0x1280b8=setTimeout(()=>_0x602d7d[_0x1725e5(0x1a9)](),timeout);try{const _0x5a3c88=await fetch(_0x20570c,{'method':method,'headers':{'Content-Type':'application/json','Cookie':_0x29f7c4,'X-Invoke-Source':_0x1725e5(0x150),...headers},'body':_0x38a2d4?JSON[_0x1725e5(0x14a)](_0x38a2d4):undefined,'signal':_0x602d7d[_0x1725e5(0x15a)]});let _0x2fe48f;try{_0x2fe48f=await _0x5a3c88[_0x1725e5(0x1b8)]();}catch{throw CliErrors[_0x1725e5(0x1a7)]('API\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x5a3c88[_0x1725e5(0x161)]+')',_0x5a3c88['status']>=0x190?_0x1725e5(0x186):undefined);}if(!_0x5a3c88['ok']||_0x2fe48f[_0x1725e5(0x19e)]===![])throw CliErrors[_0x1725e5(0x1a7)](_0x2fe48f['errorMsg']||_0x2fe48f['message']||'API\x20error:\x20'+_0x5a3c88['status'],_0x2fe48f[_0x1725e5(0x1b9)]?_0x1725e5(0x134)+_0x2fe48f['errorCode']:undefined);return _0x2fe48f;}catch(_0x2f3cbd){if(_0x2f3cbd instanceof CliError)throw _0x2f3cbd;if(_0x2f3cbd instanceof Error&&_0x2f3cbd['name']===_0x1725e5(0x141))throw CliErrors[_0x1725e5(0x1a7)]('Request\x20timeout:\x20'+_0x20570c);throw createFetchFailureError(_0x20570c,_0x2f3cbd);}finally{clearTimeout(_0x1280b8);}}function isAuthFailure(_0xa85b96){const _0x16cb76=a141_0x47e4,_0x2c9d35=_0xa85b96['errorMsg']||_0xa85b96[_0x16cb76(0x1b4)]||_0xa85b96['data']?.[_0x16cb76(0x1b4)]||_0xa85b96['errorMessage']||_0xa85b96[_0x16cb76(0x137)]||'';return _0xa85b96[_0x16cb76(0x1b9)]===_0x16cb76(0x1ba)||_0xa85b96['code']===0x191||_0xa85b96[_0x16cb76(0x18a)]==='401'||_0x2c9d35[_0x16cb76(0x142)](_0x16cb76(0x148))||_0x2c9d35[_0x16cb76(0x142)](_0x16cb76(0x164))||_0x2c9d35[_0x16cb76(0x142)]('登录')||_0x2c9d35[_0x16cb76(0x142)]('认证');}export async function platformFetch(_0x4b9ced,_0x4bed09){const _0x3d9d71=a141_0x47e4;let _0x441f0d;try{_0x441f0d=await fetch(_0x4b9ced,{'method':_0x4bed09[_0x3d9d71(0x1a8)]??_0x3d9d71(0x15e),'headers':{'Content-Type':'application/json','Cookie':_0x4bed09[_0x3d9d71(0x196)],'X-Invoke-Source':'cli:rabetbase'},..._0x4bed09[_0x3d9d71(0x1be)]&&{'body':JSON[_0x3d9d71(0x14a)](_0x4bed09[_0x3d9d71(0x1be)])}});}catch(_0x1104ad){throw createFetchFailureError(_0x4b9ced,_0x1104ad);}if(!_0x441f0d['ok']){if(_0x441f0d[_0x3d9d71(0x161)]===0x191)throw CliErrors[_0x3d9d71(0x18c)]();throw CliErrors['apiError'](_0x4bed09[_0x3d9d71(0x147)]+_0x3d9d71(0x190)+_0x441f0d[_0x3d9d71(0x161)]);}const _0x48a71e=await _0x441f0d['json']();if(_0x48a71e['success']===![]){if(isAuthFailure(_0x48a71e))throw CliErrors[_0x3d9d71(0x18c)]();throw CliErrors[_0x3d9d71(0x1a7)](_0x48a71e['errorMsg']||_0x48a71e[_0x3d9d71(0x1b4)]||_0x4bed09[_0x3d9d71(0x147)]+_0x3d9d71(0x15d));}return _0x48a71e[_0x3d9d71(0x129)];}export async function listBffScripts(_0x3621ef,_0x71cf82,_0x19bd75){const _0x625d18=a141_0x47e4;let _0x479ab2=_0x625d18(0x18d)+_0x3621ef;if(_0x71cf82)_0x479ab2+=_0x625d18(0x1a5)+_0x71cf82;const _0x57185d=await apiRequest(_0x479ab2);let _0x5bdf19=extractList(_0x57185d['data']);if(_0x19bd75?.[_0x625d18(0x19a)]){const _0x2e3dff=_0x19bd75['scriptName'][_0x625d18(0x168)]();_0x5bdf19=_0x5bdf19['filter'](_0x1d933b=>_0x1d933b['functionName']?.['toLowerCase']()['includes'](_0x2e3dff)||_0x1d933b['description']?.[_0x625d18(0x168)]()[_0x625d18(0x142)](_0x2e3dff));}return _0x5bdf19;}function a141_0x47e4(_0x37fb65,_0x1c704b){_0x37fb65=_0x37fb65-0x127;const _0x43dc81=a141_0x43dc();let _0x47e405=_0x43dc81[_0x37fb65];return _0x47e405;}export async function getBffScriptInfo(_0x30ec92){const _0x410b5d=a141_0x47e4,_0x4a3eee=await apiRequest(_0x410b5d(0x151)+_0x30ec92);if(!_0x4a3eee[_0x410b5d(0x129)])throw CliErrors['validation'](_0x410b5d(0x171)+_0x30ec92);return _0x4a3eee['data'];}export async function saveBffScript(_0x3c7a3f){const _0x114b5d=a141_0x47e4,_0x3b3380=await apiRequest('/api/management/library/scripts/save',{'method':_0x114b5d(0x166),'body':_0x3c7a3f}),{id:_0x1cd9e7,entity:_0xba99d7}=normalizeEntityWithIdResponse(_0x3b3380[_0x114b5d(0x129)]);if(_0x1cd9e7!==undefined){const _0x237bb8=typeof _0xba99d7['functionName']===_0x114b5d(0x177)||typeof _0xba99d7[_0x114b5d(0x1c2)]==='string'?_0xba99d7:undefined;return{'id':_0x1cd9e7,'script':_0x237bb8};}throw CliErrors[_0x114b5d(0x1a7)](_0x114b5d(0x1ac));}export async function deleteBffScript(_0x1d7fab){const _0x273ad4=a141_0x47e4;await apiRequest(_0x273ad4(0x1c1),{'method':_0x273ad4(0x166),'body':{'id':_0x1d7fab}});}export async function getBffScriptStatistics(_0x346863){const _0x4e36b8=a141_0x47e4,_0x4276d5=await apiRequest(_0x4e36b8(0x16a)+_0x346863);return extractList(_0x4276d5[_0x4e36b8(0x129)]);}export async function clearBffScriptCache(){const _0x47c3ec=a141_0x47e4,_0x17641d=await apiRequest(_0x47c3ec(0x13a),{'method':_0x47c3ec(0x166),'useRuntime':!![]});return typeof _0x17641d['data']===_0x47c3ec(0x177)?_0x17641d[_0x47c3ec(0x129)]:'';}export async function listBffDatasetOperations(_0x1481fc,_0xa737e3){const _0x16a860=a141_0x47e4,_0x21fb95=await apiRequest(_0x16a860(0x1b0),{'method':_0x16a860(0x166),'body':{'appCode':_0x1481fc,'datasetId':_0xa737e3}});return _0x21fb95['data'];}export async function listSqlQueries(_0xc7a822,_0x2c7120){const _0x3ae764=a141_0x47e4,_0x406289=await apiRequest(_0x3ae764(0x145),{'method':_0x3ae764(0x166),'body':{'appCode':_0xc7a822,'currentPage':_0x2c7120?.[_0x3ae764(0x12b)]??0x1,'pageSize':_0x2c7120?.['pageSize']??0x32,'sqlCode':_0x2c7120?.['sqlCode'],'sqlName':_0x2c7120?.['sqlName']}});return _0x406289[_0x3ae764(0x129)];}export async function getSqlQueryInfo(_0x4fbb5c,_0x1f7ba9){const _0x4aca1c=a141_0x47e4,_0x47200c=await listSqlQueries(_0x4fbb5c,{'sqlCode':_0x1f7ba9}),_0x3596aa=_0x47200c[_0x4aca1c(0x1ab)]?.[0x0];if(!_0x3596aa)throw CliErrors[_0x4aca1c(0x1c3)](_0x4aca1c(0x18b)+_0x1f7ba9);return _0x3596aa;}export async function getSqlQueryDetail(_0x58ea64){const _0x4934b4=a141_0x47e4,_0x43ffec=await apiRequest(_0x4934b4(0x197)+('?sqlCode='+encodeURIComponent(_0x58ea64)));if(!_0x43ffec[_0x4934b4(0x129)])throw CliErrors[_0x4934b4(0x1c3)](_0x4934b4(0x18b)+_0x58ea64);return _0x43ffec['data'];}export async function getSqlQueryDetailById(_0x4d46c2){const _0x1d4cff=a141_0x47e4,_0xe2d561=await apiRequest(_0x1d4cff(0x174)+_0x4d46c2);if(!_0xe2d561['data'])throw CliErrors['validation'](_0x1d4cff(0x175)+_0x4d46c2);return _0xe2d561[_0x1d4cff(0x129)];}export async function createSqlQuery(_0xd14faa){const _0x58394b=a141_0x47e4,_0x3aab9f=await apiRequest(_0x58394b(0x1b2),{'method':_0x58394b(0x166),'body':_0xd14faa}),{id:_0x1b34c2,entity:_0x20b35f}=normalizeEntityWithIdResponse(_0x3aab9f['data']);if(!(_0x58394b(0x189)in _0x20b35f)&&_0x1b34c2)return getSqlQueryDetailById(_0x1b34c2);return normalizeSqlQueryEntity(_0x20b35f);}export async function updateSqlQuery(_0x8b483a){const _0x4fb50f=a141_0x47e4,_0x160f50=await apiRequest(_0x4fb50f(0x187),{'method':'POST','body':_0x8b483a}),{id:_0xcacba,entity:_0x3527de}=normalizeEntityWithIdResponse(_0x160f50[_0x4fb50f(0x129)]);if(!(_0x4fb50f(0x189)in _0x3527de)){if(_0x8b483a[_0x4fb50f(0x189)])return getSqlQueryDetail(_0x8b483a[_0x4fb50f(0x189)]);if(_0xcacba)return getSqlQueryDetailById(_0xcacba);}return normalizeSqlQueryEntity(_0x3527de);}export async function deleteSqlQuery(_0x217a79){const _0x319b46=a141_0x47e4;await apiRequest('/smartapi/custom/deleteUserCustomSql',{'method':_0x319b46(0x166),'body':_0x217a79});}export async function saveSqlQuery(_0x22b731){const _0x42dcb=a141_0x47e4,_0x42b012=await apiRequest(_0x42dcb(0x1b5),{'method':_0x42dcb(0x166),'body':_0x22b731});return _0x42b012[_0x42dcb(0x129)];}function normalizeSqlQueryEntity(_0x1e55ac){const _0x1a3cdf=a141_0x47e4;return{..._0x1e55ac,'id':Number(_0x1e55ac['id']),'dbId':_0x1e55ac[_0x1a3cdf(0x1c5)]==null?undefined:Number(_0x1e55ac[_0x1a3cdf(0x1c5)]),'version':_0x1e55ac[_0x1a3cdf(0x128)]==null?undefined:Number(_0x1e55ac[_0x1a3cdf(0x128)])};}export async function executeSql(_0x59cafe,_0x107c92,_0x1876a8){const _0x525eb3=a141_0x47e4,_0x7d045=await apiRequest(_0x525eb3(0x1ad),{'method':'POST','body':{'appCode':_0x59cafe,'sqlCode':_0x107c92,..._0x1876a8&&{'params':_0x1876a8}},'useRuntime':!![]});return _0x7d045[_0x525eb3(0x129)];}export async function executeDatasetDataOperation(_0x28611d,_0x393761,_0x2a3677,_0x4bc721={}){const _0xb3d16f=a141_0x47e4;try{const _0x3ce07b=await apiRequest('/api/'+_0x28611d+'/'+_0x393761+'/'+_0x2a3677,{'method':'POST','body':_0x4bc721,'useRuntime':!![]});return _0x3ce07b['data'];}catch(_0xd322cf){if(_0x2a3677===_0xb3d16f(0x1a2)&&_0xd322cf instanceof CliError&&_0xd322cf[_0xb3d16f(0x18a)]===_0xb3d16f(0x19d)&&_0x4bc721['id']!==undefined&&_0x4bc721['id']!==null&&_0x4bc721['id']!==''){const _0x184a80=await apiRequest(_0xb3d16f(0x19b)+_0x28611d+'/'+_0x393761+_0xb3d16f(0x153),{'method':_0xb3d16f(0x166),'body':{'where':{'id':{'$eq':_0x4bc721['id']}},'currentPage':0x1,'pageSize':0x1},'useRuntime':!![]}),_0x506c51=Array[_0xb3d16f(0x1b3)](_0x184a80[_0xb3d16f(0x129)]?.[_0xb3d16f(0x1ab)])?_0x184a80[_0xb3d16f(0x129)]['tableData']:[];return _0x506c51[0x0]??null;}throw _0xd322cf;}}export async function listDatasets(_0x56a095,_0x19aa89){const _0x2e10b7=a141_0x47e4,_0x30dce7={'appCode':_0x56a095,'deleted':![]};if(_0x19aa89?.[_0x2e10b7(0x18a)])_0x30dce7[_0x2e10b7(0x18a)]=_0x19aa89[_0x2e10b7(0x18a)];if(_0x19aa89?.[_0x2e10b7(0x14e)])_0x30dce7[_0x2e10b7(0x14e)]=_0x19aa89[_0x2e10b7(0x14e)];const _0x16810b=await apiRequest(_0x2e10b7(0x15c),{'method':'POST','body':_0x30dce7});return extractList(_0x16810b[_0x2e10b7(0x129)]);}export async function deleteDataset(_0x33ee6c,_0x46e6f6){const _0x1e0f34=a141_0x47e4;await apiRequest(_0x1e0f34(0x16c),{'method':'POST','body':{'appCode':_0x33ee6c,'datasetId':_0x46e6f6}});}export async function searchDatasets(_0x59a4f8,_0x15eb3e){const _0x1ba310=a141_0x47e4,_0x30dd32=await listDatasets(_0x59a4f8,{'name':_0x15eb3e}),_0x93f9c0=_0x15eb3e[_0x1ba310(0x168)](),_0x36f627=new Set(_0x30dd32[_0x1ba310(0x19c)](_0x498626=>_0x498626['id'])),_0x117c9f=_0x30dd32['filter'](_0x5a9c43=>_0x5a9c43['dbtableConfig']?.[_0x1ba310(0x167)]?.['toLowerCase']()['includes'](_0x93f9c0)||_0x5a9c43['description']?.['toLowerCase']()[_0x1ba310(0x142)](_0x93f9c0)),_0x3e5cc0=await listDatasets(_0x59a4f8,{'code':_0x15eb3e});for(const _0x109ca4 of _0x3e5cc0){!_0x36f627['has'](_0x109ca4['id'])&&(_0x30dd32['push'](_0x109ca4),_0x36f627['add'](_0x109ca4['id']));}return _0x30dd32;}export function normalizeDatasetOperations(_0x33258b){const _0x543c15=a141_0x47e4;if(Array[_0x543c15(0x1b3)](_0x33258b))return _0x33258b[_0x543c15(0x188)](_0x1222e0=>_0x1222e0!=null&&typeof _0x1222e0===_0x543c15(0x1c0));if(_0x33258b&&typeof _0x33258b===_0x543c15(0x1c0))return Object[_0x543c15(0x131)](_0x33258b)['filter'](([,_0x4f3598])=>_0x4f3598!=null&&typeof _0x4f3598===_0x543c15(0x1c0))[_0x543c15(0x19c)](([_0x2b00b6,_0x3bb56a])=>({..._0x3bb56a,'name':_0x3bb56a['name']??_0x3bb56a[_0x543c15(0x16e)]??_0x2b00b6}));return[];}export async function getDatasetDetail(_0x2831fb){const _0x311266=a141_0x47e4,_0x52b416=/^\d+$/[_0x311266(0x17b)](_0x2831fb)?'id':_0x311266(0x18a),_0x5f1553=await apiRequest(_0x311266(0x1bf)+_0x52b416+'='+_0x2831fb);return _0x5f1553[_0x311266(0x129)];}export async function updateDrivenData(_0x5a6214){const _0x5f3222=a141_0x47e4,_0x3cfbe4=await apiRequest('/smartapi/dataset/update-driven-data',{'method':_0x5f3222(0x166),'body':_0x5a6214});return _0x3cfbe4[_0x5f3222(0x129)];}export async function getDatasetOperations(_0xfae09e){const _0x28cbd5=a141_0x47e4,_0x225790=await getDatasetDetail(_0xfae09e),_0x1f0175=normalizeDatasetOperations(_0x225790[_0x28cbd5(0x15b)])[_0x28cbd5(0x19c)](_0x10248b=>({'name':_0x10248b[_0x28cbd5(0x14e)]||_0x10248b['operationName'],'displayName':_0x10248b['displayName']||_0x10248b[_0x28cbd5(0x14e)],'type':_0x10248b[_0x28cbd5(0x169)],'method':_0x10248b[_0x28cbd5(0x1a8)],'path':_0x10248b[_0x28cbd5(0x1ae)],'enabled':_0x10248b[_0x28cbd5(0x14d)]??!![],'requestFields':_0x10248b['requestFields'],'responseFields':_0x10248b[_0x28cbd5(0x16d)]}));return{'dataset':{'id':_0x225790['id']??_0x225790[_0x28cbd5(0x136)],'name':_0x225790['name'],'code':_0x225790['code']||_0x225790['modelCode'],'tableName':_0x225790['tableName']||_0x225790[_0x28cbd5(0x160)]?.['tableName']},'operations':_0x1f0175};}export async function getOperationDetail(_0x58bc8d,_0x57a319,_0x5dfc44){const _0x26b3d8=a141_0x47e4;let _0x16fffc=_0x57a319;if(!/^\d+$/[_0x26b3d8(0x17b)](_0x57a319)){const _0x180b10=await listDatasets(_0x58bc8d,{'code':_0x57a319}),_0x2e4f45=_0x180b10[_0x26b3d8(0x1b1)](_0xfab69=>_0xfab69[_0x26b3d8(0x18a)]===_0x57a319||String(_0xfab69['id'])===_0x57a319);if(!_0x2e4f45)throw CliErrors[_0x26b3d8(0x1c3)](_0x26b3d8(0x180)+_0x57a319);_0x16fffc=String(_0x2e4f45['id']);}const _0x11b079=await getDatasetDetail(_0x16fffc),_0x2c5a8b=normalizeDatasetOperations(_0x11b079[_0x26b3d8(0x15b)])['find'](_0x5de911=>(_0x5de911[_0x26b3d8(0x14e)]||_0x5de911['operationName'])===_0x5dfc44);if(!_0x2c5a8b)throw CliErrors[_0x26b3d8(0x1c3)]('Operation\x20\x22'+_0x5dfc44+_0x26b3d8(0x14b)+_0x57a319);return{'dataset':{'id':_0x11b079['id']??_0x11b079[_0x26b3d8(0x136)],'name':_0x11b079[_0x26b3d8(0x14e)],'code':_0x11b079[_0x26b3d8(0x18a)]||_0x11b079['modelCode'],'tableName':_0x11b079['tableName']||_0x11b079[_0x26b3d8(0x160)]?.['tableName']},'operation':_0x2c5a8b};}export async function startGenerateStandardPages(_0x3e5a10,_0xfe1d4,_0x2a3da0){const _0x136229=a141_0x47e4,_0x50e426=await apiRequest('/smartapi/lovrabet/dataset/'+_0xfe1d4+'/generate-standard-pages/start',{'method':_0x136229(0x166),'body':{'appCode':_0x3e5a10,..._0x2a3da0?.[_0x136229(0x1b7)]?{'clientOperationId':_0x2a3da0['clientOperationId']}:{}},'timeout':DEFAULT_REQUEST_TIMEOUT_MS});return _0x50e426[_0x136229(0x129)];}export async function getGenerateStandardPagesStatus(_0x226d29,_0x4deae8,_0x1e6c19){const _0x181d24=a141_0x47e4,_0x5c5a82=new URLSearchParams({'appCode':_0x226d29});_0x1e6c19[_0x181d24(0x18e)]&&_0x5c5a82['set'](_0x181d24(0x18e),_0x1e6c19[_0x181d24(0x18e)]);_0x1e6c19['clientOperationId']&&_0x5c5a82[_0x181d24(0x127)](_0x181d24(0x1b7),_0x1e6c19[_0x181d24(0x1b7)]);const _0x1e42c3=await apiRequest(_0x181d24(0x173)+_0x4deae8+_0x181d24(0x12c)+_0x5c5a82['toString']());return _0x1e42c3['data'];}export async function getStandardPageStatus(_0x3f0f48,_0x572e48){const _0x345504=a141_0x47e4,_0x133c7d=await apiRequest('/smartapi/lovrabet/dataset/'+_0x572e48+_0x345504(0x185)+encodeURIComponent(_0x3f0f48));return _0x133c7d['data'];}export async function tryGetStandardPageStatus(_0x4e103d,_0x7c4222){const _0x4e6bb2=a141_0x47e4;try{return await getStandardPageStatus(_0x4e103d,_0x7c4222);}catch(_0x55ef52){if(_0x55ef52 instanceof CliError&&_0x55ef52[_0x4e6bb2(0x18a)]==='api_error'&&/404|not found|non-json response/i['test'](_0x55ef52[_0x4e6bb2(0x1b4)]))return null;throw _0x55ef52;}}export async function syncStandardPages(_0x4d1cef,_0x536a94){const _0x3bb38d=a141_0x47e4,_0x579ee5=await apiRequest(_0x3bb38d(0x173)+_0x536a94+_0x3bb38d(0x1a1),{'method':_0x3bb38d(0x166),'body':{'appCode':_0x4d1cef}});return _0x579ee5['data'];}export async function getPageDetail(_0x515c68){const _0x13a7db=a141_0x47e4,_0x55e26d=await apiRequest(_0x13a7db(0x17e)+_0x515c68);if(!_0x55e26d['data'])throw CliErrors['validation'](_0x13a7db(0x146)+_0x515c68);return _0x55e26d['data'];}export async function updatePage(_0x30f4e7,_0x39c48e,_0x34a8df,_0x379d67){const _0x3235b7=a141_0x47e4,_0x26389c=await apiRequest(_0x3235b7(0x15f),{'method':'POST','body':{'appCode':_0x30f4e7,'pageId':_0x39c48e,'code':_0x34a8df,'datasetIds':_0x379d67}});return _0x26389c[_0x3235b7(0x129)];}export function generateSdkCode(_0x584fb8,_0x22a5d1,_0x738632){const _0x202ecc=a141_0x47e4,_0x1acd5b=_0x738632?.['includeImports']??!![],_0x28aad2=_0x202ecc(0x1a0)+_0x584fb8[_0x202ecc(0x18a)]?.[_0x202ecc(0x182)](/-/g,'_'),_0x4ec53d=_0x22a5d1[_0x202ecc(0x14e)]||_0x22a5d1['operationName']||_0x202ecc(0x188),_0x1902bf=[];_0x1acd5b&&_0x1902bf[_0x202ecc(0x13e)](_0x202ecc(0x143),'',_0x202ecc(0x14f),'');_0x1902bf[_0x202ecc(0x13e)](_0x202ecc(0x149)+_0x584fb8['name']+'\x20('+(_0x584fb8[_0x202ecc(0x167)]||_0x202ecc(0x1bc))+')');if(_0x4ec53d===_0x202ecc(0x188))_0x1902bf[_0x202ecc(0x13e)](_0x202ecc(0x165)+_0x28aad2+_0x202ecc(0x1c4),_0x202ecc(0x12d),_0x202ecc(0x157),_0x202ecc(0x1a4),_0x202ecc(0x132));else{if(_0x4ec53d===_0x202ecc(0x1a2))_0x1902bf[_0x202ecc(0x13e)](_0x202ecc(0x165)+_0x28aad2+'.getOne(id);');else{if(_0x4ec53d===_0x202ecc(0x135))_0x1902bf[_0x202ecc(0x13e)](_0x202ecc(0x165)+_0x28aad2+_0x202ecc(0x199));else{if(_0x4ec53d===_0x202ecc(0x13c))_0x1902bf[_0x202ecc(0x13e)]('const\x20result\x20=\x20await\x20client.models.'+_0x28aad2+_0x202ecc(0x1a6));else _0x4ec53d===_0x202ecc(0x172)||_0x4ec53d==='remove'?_0x1902bf['push'](_0x202ecc(0x165)+_0x28aad2+_0x202ecc(0x1c6)):_0x1902bf[_0x202ecc(0x13e)](_0x202ecc(0x165)+_0x28aad2+'.'+_0x4ec53d+_0x202ecc(0x17c));}}}return _0x1902bf['join']('\x0a');}export function generateSqlCodeTemplate(_0x4263a6,_0x33afcc){const _0x19edd1=a141_0x47e4,_0x2cd331=_0x33afcc?.[_0x19edd1(0x18f)]??_0x19edd1(0x17a),_0x43fca5=_0x33afcc?.[_0x19edd1(0x184)]??!![],_0x42582e=[];return _0x42582e['push'](_0x19edd1(0x193)+_0x4263a6[_0x19edd1(0x13b)]+'\x20('+_0x4263a6[_0x19edd1(0x189)]+')'),_0x2cd331===_0x19edd1(0x17a)?(_0x43fca5&&_0x42582e[_0x19edd1(0x13e)](_0x19edd1(0x143),'',_0x19edd1(0x14f),''),_0x42582e['push'](_0x19edd1(0x133),_0x19edd1(0x130)+_0x4263a6[_0x19edd1(0x189)]+'\x27,',_0x19edd1(0x179),_0x19edd1(0x132),_0x19edd1(0x12f),_0x19edd1(0x163))):_0x42582e[_0x19edd1(0x13e)]('//\x20BFF\x20context:\x20context.client.sql.execute\x20returns\x20rows\x20directly','export\x20default\x20async\x20function\x20handler(params,\x20context)\x20{','\x20\x20const\x20rows\x20=\x20await\x20context.client.sql.execute({',_0x19edd1(0x1b6)+_0x4263a6[_0x19edd1(0x189)]+'\x27,','\x20\x20\x20\x20params:\x20{\x20/*\x20parameter\x20values\x20*/\x20},',_0x19edd1(0x155),_0x19edd1(0x181),'}'),_0x42582e[_0x19edd1(0x194)]('\x0a');}export async function getErConfig(_0xbeab05,_0x41233e){const _0x27d538=a141_0x47e4,_0x3298f9=await apiRequest(_0x27d538(0x14c),{'method':_0x27d538(0x166),'body':{'appCode':_0xbeab05,'dblinkId':_0x41233e}});return _0x3298f9[_0x27d538(0x129)];}export async function createErRelation(_0x2af9fb){const _0x5de6d2=a141_0x47e4,_0x23e3da=await apiRequest(_0x5de6d2(0x198),{'method':_0x5de6d2(0x166),'body':_0x2af9fb});return _0x23e3da[_0x5de6d2(0x129)];}export async function updateErRelation(_0xdd923b){const _0x10a7dc=a141_0x47e4,_0x154e16=await apiRequest(_0x10a7dc(0x156),{'method':'POST','body':_0xdd923b});return _0x154e16[_0x10a7dc(0x129)];}export async function deleteErRelation(_0x8c1c6a){const _0x427d21=a141_0x47e4,_0x45a4d1=await apiRequest(_0x427d21(0x1af),{'method':_0x427d21(0x166),'body':_0x8c1c6a});return _0x45a4d1[_0x427d21(0x129)];}function buildQuery(_0x1bdccc){const _0x1cd371=a141_0x47e4,_0x41e38e=new URLSearchParams();for(const [_0x334f99,_0x524490]of Object['entries'](_0x1bdccc)){if(_0x524490===undefined||_0x524490==='')continue;_0x41e38e[_0x1cd371(0x127)](_0x334f99,String(_0x524490));}const _0x2e66af=_0x41e38e[_0x1cd371(0x13f)]();return _0x2e66af?'?'+_0x2e66af:'';}export async function listDbLinks(_0x5aceb6,_0xcf6a5e){const _0x13df3a=a141_0x47e4,_0x450e80=await apiRequest('/smartapi/dblink/getList',{'method':_0x13df3a(0x166),'body':{'appCode':_0x5aceb6,'currentPage':_0xcf6a5e?.[_0x13df3a(0x12b)]??0x1,'pageSize':_0xcf6a5e?.['pageSize']??0x64}});return{'items':extractList(_0x450e80[_0x13df3a(0x129)]),'paging':extractPaging(_0x450e80['data'])};}export async function getDbLinkInfo(_0xd63943){const _0x54d167=a141_0x47e4,_0x3a069e=await apiRequest(_0x54d167(0x13d)+buildQuery({'id':_0xd63943}));return _0x3a069e['data'];}export async function createDbLink(_0x522da2){const _0x4713bf=a141_0x47e4,_0x3d18f7=await apiRequest('/smartapi/dblink/create',{'method':_0x4713bf(0x166),'body':_0x522da2});return _0x3d18f7[_0x4713bf(0x129)];}export async function updateDbLink(_0x3c0a6c){const _0x22576b=a141_0x47e4,_0x54e737=await apiRequest(_0x22576b(0x17d),{'method':_0x22576b(0x166),'body':_0x3c0a6c});return _0x54e737['data'];}export async function deleteDbLink(_0x1ad219){const _0x188c8c=a141_0x47e4;await apiRequest(_0x188c8c(0x17f),{'method':'POST','body':{'id':_0x1ad219}});}export async function testDbLinkConnect(_0xd06edd){const _0x56729=a141_0x47e4,_0x411091=await apiRequest(_0x56729(0x140)+buildQuery({'id':_0xd06edd}));return _0x411091['data'];}export async function startDbAnalysis(_0x579bc1,_0x5b1e46){const _0x2ae53b=a141_0x47e4,_0x156a3f=await apiRequest(_0x2ae53b(0x19f),{'method':_0x2ae53b(0x166),'body':{'dbLinkId':_0x579bc1,..._0x5b1e46&&_0x5b1e46[_0x2ae53b(0x176)]>0x0?{'tableNames':_0x5b1e46}:{}}}),_0x57b239=_0x156a3f[_0x2ae53b(0x129)];if(typeof _0x57b239===_0x2ae53b(0x177))return _0x57b239;if(_0x57b239&&typeof _0x57b239===_0x2ae53b(0x1c0)&&typeof _0x57b239['planId']===_0x2ae53b(0x177))return _0x57b239[_0x2ae53b(0x170)];return _0x57b239!=null?String(_0x57b239):'';}export async function cancelDbAnalysis(_0x50bad1){const _0x522082=a141_0x47e4;await apiRequest(_0x522082(0x178)+buildQuery({'planId':_0x50bad1}),{'method':_0x522082(0x166)});}export async function getDbAnalysisStatus(_0x426a98){const _0x4b6db0=a141_0x47e4,_0x593c5e=await apiRequest(_0x4b6db0(0x152)+encodeURIComponent(_0x426a98));return _0x593c5e[_0x4b6db0(0x129)];}export async function getDbAllTableList(_0x4b821b,_0x57b508){const _0x4769ca=a141_0x47e4,_0x2429ae=await apiRequest(_0x4769ca(0x195)+buildQuery({'appCode':_0x4b821b,'dbLinkId':_0x57b508})),_0x3c0a8e=_0x2429ae[_0x4769ca(0x129)];if(Array[_0x4769ca(0x1b3)](_0x3c0a8e))return _0x3c0a8e;return extractList(_0x3c0a8e);}export async function getDbTableDiff(_0x543ea6,_0x530302,_0xe7058){const _0x5bbdb5=a141_0x47e4,_0x1c0986=await apiRequest(_0x5bbdb5(0x16f)+buildQuery({'appCode':_0x543ea6,'dbLinkId':_0x530302,'pageIndex':_0xe7058?.['pageIndex']??0x1,'pageSize':_0xe7058?.[_0x5bbdb5(0x183)]??0x14,'tableName':_0xe7058?.[_0x5bbdb5(0x167)]})),_0x4ee425=_0x1c0986['data'];return{'totalCount':_0x4ee425?.[_0x5bbdb5(0x16b)]??0x0,'tableList':Array[_0x5bbdb5(0x1b3)](_0x4ee425?.[_0x5bbdb5(0x144)])?_0x4ee425[_0x5bbdb5(0x144)]:[]};}const REMOTE_APP_PAGE_SIZE=0xc8;export async function listRemoteApps(){const _0x141818=a141_0x47e4,_0x23e116=await apiRequest('/smartapi/app/getList',{'method':_0x141818(0x166),'body':{'currentPage':0x1,'pageSize':REMOTE_APP_PAGE_SIZE}}),_0x1f10a4=extractList(_0x23e116[_0x141818(0x129)]),_0x3bab56=extractPaging(_0x23e116[_0x141818(0x129)]);return _0x3bab56&&_0x3bab56[_0x141818(0x16b)]>REMOTE_APP_PAGE_SIZE&&console['warn'](_0x141818(0x12a)+REMOTE_APP_PAGE_SIZE+'\x20of\x20'+_0x3bab56[_0x141818(0x16b)]+_0x141818(0x159)+_0x141818(0x1a3)),_0x1f10a4;}
@@ -1 +1 @@
1
- const a142_0x54add5=a142_0x3b4c;(function(_0x532427,_0x18c931){const _0xf40b98=a142_0x3b4c,_0x312465=_0x532427();while(!![]){try{const _0x418faf=parseInt(_0xf40b98(0x1dd))/0x1+-parseInt(_0xf40b98(0x1e4))/0x2*(-parseInt(_0xf40b98(0x1e0))/0x3)+-parseInt(_0xf40b98(0x1db))/0x4+parseInt(_0xf40b98(0x1dc))/0x5+parseInt(_0xf40b98(0x1d7))/0x6*(-parseInt(_0xf40b98(0x1df))/0x7)+parseInt(_0xf40b98(0x1d8))/0x8*(parseInt(_0xf40b98(0x1de))/0x9)+parseInt(_0xf40b98(0x1e5))/0xa*(-parseInt(_0xf40b98(0x1e3))/0xb);if(_0x418faf===_0x18c931)break;else _0x312465['push'](_0x312465['shift']());}catch(_0x4d097e){_0x312465['push'](_0x312465['shift']());}}}(a142_0x39b8,0xaa5ad));import{resolve}from'node:path';function a142_0x3b4c(_0x21a1fb,_0x545a15){_0x21a1fb=_0x21a1fb-0x1d6;const _0x39b824=a142_0x39b8();let _0x3b4ce8=_0x39b824[_0x21a1fb];return _0x3b4ce8;}import{findProjectRootDirectory}from'../../context.js';function a142_0x39b8(){const _0x4f613e=['.rabetbase','1018716KLNbad','190112sgLrVZ','/bff','bff-trash','5360336JUDdps','3752185emGcZL','1355327WQZnUG','468UDIktm','56cZMYpm','402pCymMQ','bff','bff.lock.json','34111tcIrsw','19468doRGyf','4030lIdenz'];a142_0x39b8=function(){return _0x4f613e;};return a142_0x39b8();}const DOT_DIR=a142_0x54add5(0x1d6),LOCK_FILE_NAME=a142_0x54add5(0x1e2),TRASH_DIR_NAME=a142_0x54add5(0x1da);export function loadBffProjectConfig(_0x1511f5,_0x1a263a){const _0x414d3c=a142_0x54add5,_0x2d1430=resolve(_0x1a263a??findProjectRootDirectory()),_0xcbd227=DOT_DIR+_0x414d3c(0x1d9),_0x58d8fb=_0xcbd227+'/'+_0x1511f5;return{'projectRoot':_0x2d1430,'appCode':_0x1511f5,'scriptsBaseDir':DOT_DIR,'scriptsWorkspaceRoot':_0xcbd227,'scriptsRoot':_0x58d8fb,'scriptsRootDir':resolve(_0x2d1430,DOT_DIR,_0x414d3c(0x1e1),_0x1511f5),'lockFilePath':resolve(_0x2d1430,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x2d1430,DOT_DIR,TRASH_DIR_NAME)};}
1
+ function a142_0x191d(){const _0x27f17c=['51WHBNKR','2429976mXOLbT','358068dPDxbd','2272460wQSsaq','6523OQqucU','27CELmGw','18600rbTSID','12399248fXTnCr','519490UNqJyU','2dwMQXl','bff.lock.json','.rabetbase','7KAewfx','/bff','742941BDlYfG'];a142_0x191d=function(){return _0x27f17c;};return a142_0x191d();}const a142_0x5a377b=a142_0x37c5;function a142_0x37c5(_0x2b0b64,_0x4ebfbc){_0x2b0b64=_0x2b0b64-0x11f;const _0x191ddb=a142_0x191d();let _0x37c5b7=_0x191ddb[_0x2b0b64];return _0x37c5b7;}(function(_0x93985c,_0x1d6afc){const _0x34ccdc=a142_0x37c5,_0x219c86=_0x93985c();while(!![]){try{const _0xada485=parseInt(_0x34ccdc(0x126))/0x1*(-parseInt(_0x34ccdc(0x121))/0x2)+-parseInt(_0x34ccdc(0x127))/0x3*(-parseInt(_0x34ccdc(0x129))/0x4)+parseInt(_0x34ccdc(0x12a))/0x5+parseInt(_0x34ccdc(0x128))/0x6*(parseInt(_0x34ccdc(0x124))/0x7)+-parseInt(_0x34ccdc(0x11f))/0x8+parseInt(_0x34ccdc(0x12c))/0x9*(-parseInt(_0x34ccdc(0x120))/0xa)+parseInt(_0x34ccdc(0x12b))/0xb*(parseInt(_0x34ccdc(0x12d))/0xc);if(_0xada485===_0x1d6afc)break;else _0x219c86['push'](_0x219c86['shift']());}catch(_0x59a753){_0x219c86['push'](_0x219c86['shift']());}}}(a142_0x191d,0xcff15));import{resolve}from'node:path';import{findProjectRootDirectory}from'../../context.js';const DOT_DIR=a142_0x5a377b(0x123),LOCK_FILE_NAME=a142_0x5a377b(0x122),TRASH_DIR_NAME='bff-trash';export function loadBffProjectConfig(_0x1dc311,_0x1d99a9){const _0x306808=a142_0x5a377b,_0x408499=resolve(_0x1d99a9??findProjectRootDirectory()),_0x4b4e79=DOT_DIR+_0x306808(0x125),_0x1ec844=_0x4b4e79+'/'+_0x1dc311;return{'projectRoot':_0x408499,'appCode':_0x1dc311,'scriptsBaseDir':DOT_DIR,'scriptsWorkspaceRoot':_0x4b4e79,'scriptsRoot':_0x1ec844,'scriptsRootDir':resolve(_0x408499,DOT_DIR,'bff',_0x1dc311),'lockFilePath':resolve(_0x408499,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x408499,DOT_DIR,TRASH_DIR_NAME)};}
@@ -1 +1 @@
1
- const a143_0x4a75d2=a143_0x2877;(function(_0x2b0c97,_0x543903){const _0x2ea446=a143_0x2877,_0x4c2742=_0x2b0c97();while(!![]){try{const _0x3a1878=-parseInt(_0x2ea446(0xcb))/0x1+-parseInt(_0x2ea446(0xd6))/0x2*(-parseInt(_0x2ea446(0xec))/0x3)+parseInt(_0x2ea446(0xe4))/0x4*(parseInt(_0x2ea446(0xd3))/0x5)+-parseInt(_0x2ea446(0xea))/0x6*(-parseInt(_0x2ea446(0xe9))/0x7)+-parseInt(_0x2ea446(0xd4))/0x8*(parseInt(_0x2ea446(0xe5))/0x9)+-parseInt(_0x2ea446(0xdb))/0xa*(-parseInt(_0x2ea446(0xda))/0xb)+parseInt(_0x2ea446(0xc4))/0xc*(-parseInt(_0x2ea446(0xc7))/0xd);if(_0x3a1878===_0x543903)break;else _0x4c2742['push'](_0x4c2742['shift']());}catch(_0x1daee1){_0x4c2742['push'](_0x4c2742['shift']());}}}(a143_0x49ba,0xf0bf2));function a143_0x49ba(){const _0x210924=['push','117722rgLWPZ','before','endsWith','functionName','scriptsRootDir','all','isDirectory','ENOENT','112510TWzPWP','10784uxZqnL','trim','103006QrljCk','.js','datasetCode','get','66MsGVCr','471740AOFHFA','name','HOOK','COMMON','split','code','ENDPOINT','isFile','replace','172qFQKjQ','3645mzxtZc','set','operationType','beforeScriptId','11592931dOfXDK','6Jzqvto','F_OK','33xadbNE','248664jekoiy','map','toUpperCase','1144paabJK','HOOK/','afterScriptId'];a143_0x49ba=function(){return _0x210924;};return a143_0x49ba();}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=['COMMON','ENDPOINT',a143_0x4a75d2(0xdd)];export function normalizeBffType(_0x125005){const _0x2b4078=a143_0x4a75d2;if(!_0x125005)return undefined;const _0x178d88=_0x125005[_0x2b4078(0xd5)]()[_0x2b4078(0xc6)]();return SUPPORTED_BFF_TYPES['includes'](_0x178d88)?_0x178d88:undefined;}async function scanJsFilesRecursively(_0x20e391,_0x57fbfc){const _0x3a4d1b=a143_0x4a75d2,_0x714066=[];try{const _0x5c3151=await readdir(_0x20e391,{'withFileTypes':!![]});for(const _0x54a80e of _0x5c3151){const _0x2af4a5=join(_0x20e391,_0x54a80e['name']);if(_0x54a80e['isDirectory']())_0x714066[_0x3a4d1b(0xca)](...await scanJsFilesRecursively(_0x2af4a5,_0x57fbfc+'/'+_0x54a80e[_0x3a4d1b(0xdc)]));else _0x54a80e['isFile']()&&_0x54a80e[_0x3a4d1b(0xdc)][_0x3a4d1b(0xcd)](_0x3a4d1b(0xd7))&&_0x714066[_0x3a4d1b(0xca)]({'lockKey':_0x57fbfc+'/'+_0x54a80e['name']['replace'](/\.js$/,''),'filePath':_0x2af4a5});}}catch(_0x4de16c){if(_0x4de16c[_0x3a4d1b(0xe0)]!==_0x3a4d1b(0xd2))throw _0x4de16c;}return _0x714066;}async function scanFlatFunctions(_0x48ee2c,_0x13dd9a){const _0x46cfe1=a143_0x4a75d2,_0x4699f2=join(_0x48ee2c[_0x46cfe1(0xcf)],_0x13dd9a),_0x1912ca=await scanJsFilesRecursively(_0x4699f2,_0x13dd9a);return _0x1912ca[_0x46cfe1(0xc5)](({lockKey:_0x541535,filePath:_0xae45ec})=>({'type':_0x13dd9a,'name':_0x541535['split']('/')['at'](-0x1)??'','filePath':_0xae45ec,'lockKey':_0x541535}));}async function scanHookFunctions(_0x1ff468){const _0x25a202=a143_0x4a75d2,_0x22af20=join(_0x1ff468[_0x25a202(0xcf)],'HOOK'),_0x5031c4=[];try{const _0x564642=await readdir(_0x22af20,{'withFileTypes':!![]});for(const _0x49ecf9 of _0x564642){if(!_0x49ecf9[_0x25a202(0xd1)]())continue;const _0x1bc40c=_0x49ecf9[_0x25a202(0xdc)],_0x1e92b5=join(_0x22af20,_0x1bc40c),_0x3bd241=await readdir(_0x1e92b5,{'withFileTypes':!![]});for(const _0x1f4d5d of _0x3bd241){if(!_0x1f4d5d[_0x25a202(0xd1)]())continue;const _0x15bc00=_0x1f4d5d['name'],_0xe11dd9=join(_0x1e92b5,_0x15bc00),_0x136a89=await readdir(_0xe11dd9,{'withFileTypes':!![]});for(const _0x2f9fcc of _0x136a89){if(!_0x2f9fcc['isDirectory']())continue;const _0x1e1904=_0x2f9fcc[_0x25a202(0xdc)],_0x2394a6=join(_0xe11dd9,_0x1e1904),_0xbef6e0=await readdir(_0x2394a6,{'withFileTypes':!![]});for(const _0x9f41be of _0xbef6e0){if(!_0x9f41be[_0x25a202(0xe2)]()||!_0x9f41be[_0x25a202(0xdc)][_0x25a202(0xcd)]('.js'))continue;const _0x202ac9=_0x9f41be[_0x25a202(0xdc)][_0x25a202(0xe3)](/\.js$/,'');_0x5031c4[_0x25a202(0xca)]({'type':_0x25a202(0xdd),'name':_0x202ac9,'filePath':join(_0x2394a6,_0x9f41be['name']),'lockKey':_0x25a202(0xc8)+_0x1bc40c+'/'+_0x15bc00+'/'+_0x1e1904+'/'+_0x202ac9,'alias':_0x1bc40c,'operationType':_0x15bc00,'functionNode':_0x1e1904});}}}}}catch(_0x5c1fe2){if(_0x5c1fe2['code']!==_0x25a202(0xd2))throw _0x5c1fe2;}return _0x5031c4;}export async function scanLocalBffFunctions(_0x103e11,_0x3ed48b){const _0x22b79c=a143_0x4a75d2;if(_0x3ed48b===_0x22b79c(0xde)||_0x3ed48b===_0x22b79c(0xe1))return scanFlatFunctions(_0x103e11,_0x3ed48b);if(_0x3ed48b===_0x22b79c(0xdd))return scanHookFunctions(_0x103e11);const [_0x5b4a8c,_0x41d067,_0x1715c3]=await Promise[_0x22b79c(0xd0)]([scanFlatFunctions(_0x103e11,'COMMON'),scanFlatFunctions(_0x103e11,_0x22b79c(0xe1)),scanHookFunctions(_0x103e11)]);return[..._0x5b4a8c,..._0x41d067,..._0x1715c3];}export function resolveLocalFilePathFromLockKey(_0x23182,_0x15492b){const _0xcd3f92=a143_0x4a75d2;return join(_0x23182[_0xcd3f92(0xcf)],..._0x15492b[_0xcd3f92(0xdf)]('/'))+_0xcd3f92(0xd7);}function a143_0x2877(_0x54af8f,_0x30a4a4){_0x54af8f=_0x54af8f-0xc4;const _0x49ba17=a143_0x49ba();let _0x287742=_0x49ba17[_0x54af8f];return _0x287742;}export function createHookLocationMap(_0x1ff4dd){const _0xcc3c66=a143_0x4a75d2,_0x38d77b=new Map();for(const _0x53a523 of _0x1ff4dd){_0x53a523[_0xcc3c66(0xe8)]&&_0x38d77b[_0xcc3c66(0xe6)](_0x53a523[_0xcc3c66(0xe8)],{'datasetCode':_0x53a523['datasetCode'],'operationType':snakeToCamel(_0x53a523['operationType']),'functionNode':_0xcc3c66(0xcc)}),_0x53a523['afterScriptId']&&_0x38d77b[_0xcc3c66(0xe6)](_0x53a523[_0xcc3c66(0xc9)],{'datasetCode':_0x53a523['datasetCode'],'operationType':snakeToCamel(_0x53a523[_0xcc3c66(0xe7)]),'functionNode':'after'});}return _0x38d77b;}export function resolveRemoteScriptTarget(_0xae8af0,_0x3af1f3,_0x25d392,_0x271619,_0x1335b0){const _0x48e786=a143_0x4a75d2,_0x27ad58=normalizeBffType(_0x3af1f3['scriptType']);if(!_0x27ad58||!_0x3af1f3[_0x48e786(0xce)])return null;if(_0x27ad58===_0x48e786(0xdd)){const _0x1c9f68=(_0x3af1f3['id']?_0x25d392[_0x48e786(0xd9)](_0x3af1f3['id']):undefined)??findHookLocationByRemoteId(_0x271619,_0x3af1f3['id']);if(!_0x1c9f68)return null;const _0x125775=_0x1c9f68['alias']||_0x1335b0[_0x48e786(0xd9)](_0x1c9f68[_0x48e786(0xd8)]),_0x10a23=_0x125775??_0x1c9f68[_0x48e786(0xd8)],_0x7802c5={..._0x1c9f68,'alias':_0x125775},_0x53e98c=_0x48e786(0xc8)+_0x10a23+'/'+_0x7802c5[_0x48e786(0xe7)]+'/'+_0x7802c5['functionNode']+'/'+_0x3af1f3[_0x48e786(0xce)];return{'lockKey':_0x53e98c,'filePath':resolveLocalFilePathFromLockKey(_0xae8af0,_0x53e98c),'type':_0x48e786(0xdd),'hookLocation':_0x7802c5};}const _0x3f7715=_0x27ad58+'/'+_0x3af1f3[_0x48e786(0xce)];return{'lockKey':_0x3f7715,'filePath':resolveLocalFilePathFromLockKey(_0xae8af0,_0x3f7715),'type':_0x27ad58};}export async function ensureParentDirectory(_0x359fa8){await mkdir(dirname(_0x359fa8),{'recursive':!![]});}export async function fileExists(_0x4fba11){const _0xc681e9=a143_0x4a75d2;try{return await access(_0x4fba11,constants[_0xc681e9(0xeb)]),!![];}catch{return![];}}export async function directoryExists(_0x1f665a){const _0x589d75=a143_0x4a75d2;try{const _0x4b0d87=await stat(_0x1f665a);return _0x4b0d87[_0x589d75(0xd1)]();}catch{return![];}}
1
+ const a143_0x230c76=a143_0x41ed;(function(_0x401c84,_0x448f18){const _0xa2fb93=a143_0x41ed,_0x5d5c80=_0x401c84();while(!![]){try{const _0x3850e5=-parseInt(_0xa2fb93(0x145))/0x1*(parseInt(_0xa2fb93(0x152))/0x2)+-parseInt(_0xa2fb93(0x13d))/0x3*(parseInt(_0xa2fb93(0x14d))/0x4)+-parseInt(_0xa2fb93(0x139))/0x5+parseInt(_0xa2fb93(0x142))/0x6+parseInt(_0xa2fb93(0x135))/0x7+parseInt(_0xa2fb93(0x141))/0x8*(parseInt(_0xa2fb93(0x150))/0x9)+-parseInt(_0xa2fb93(0x134))/0xa*(-parseInt(_0xa2fb93(0x12e))/0xb);if(_0x3850e5===_0x448f18)break;else _0x5d5c80['push'](_0x5d5c80['shift']());}catch(_0x17c318){_0x5d5c80['push'](_0x5d5c80['shift']());}}}(a143_0x5b49,0x517b8));function a143_0x41ed(_0xc81cc7,_0x519df8){_0xc81cc7=_0xc81cc7-0x12c;const _0x5b49b5=a143_0x5b49();let _0x41edca=_0x5b49b5[_0xc81cc7];return _0x41edca;}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_0x230c76(0x13e),a143_0x230c76(0x12d),a143_0x230c76(0x13c)];export function normalizeBffType(_0x2dc7a2){const _0x32f804=a143_0x230c76;if(!_0x2dc7a2)return undefined;const _0x28b05a=_0x2dc7a2[_0x32f804(0x12f)]()[_0x32f804(0x13b)]();return SUPPORTED_BFF_TYPES[_0x32f804(0x14c)](_0x28b05a)?_0x28b05a:undefined;}function a143_0x5b49(){const _0x3963a9=['code','functionName','beforeScriptId','.js','push','ENDPOINT','22hyKAiO','trim','get','HOOK/','name','datasetCode','1590440iVmsXZ','2444253GzRFLB','isDirectory','operationType','functionNode','724415HcyEyK','F_OK','toUpperCase','HOOK','1483656RdjkLb','COMMON','replace','all','344zsTVbt','3644448oneYhx','set','split','1Gcudnn','endsWith','afterScriptId','after','alias','ENOENT','before','includes','4vwBrXO','scriptsRootDir','isFile','48177JqmAWg','map','1063334nukkeJ','scriptType'];a143_0x5b49=function(){return _0x3963a9;};return a143_0x5b49();}async function scanJsFilesRecursively(_0x5f4143,_0x3b4b1f){const _0x5be773=a143_0x230c76,_0x16ac0a=[];try{const _0x24abe3=await readdir(_0x5f4143,{'withFileTypes':!![]});for(const _0x4adeb1 of _0x24abe3){const _0x1724c0=join(_0x5f4143,_0x4adeb1[_0x5be773(0x132)]);if(_0x4adeb1[_0x5be773(0x136)]())_0x16ac0a[_0x5be773(0x12c)](...await scanJsFilesRecursively(_0x1724c0,_0x3b4b1f+'/'+_0x4adeb1['name']));else _0x4adeb1[_0x5be773(0x14f)]()&&_0x4adeb1[_0x5be773(0x132)][_0x5be773(0x146)](_0x5be773(0x157))&&_0x16ac0a['push']({'lockKey':_0x3b4b1f+'/'+_0x4adeb1[_0x5be773(0x132)][_0x5be773(0x13f)](/\.js$/,''),'filePath':_0x1724c0});}}catch(_0xfed461){if(_0xfed461[_0x5be773(0x154)]!==_0x5be773(0x14a))throw _0xfed461;}return _0x16ac0a;}async function scanFlatFunctions(_0x6fe0fe,_0x3b4324){const _0x517071=a143_0x230c76,_0x5c5b54=join(_0x6fe0fe[_0x517071(0x14e)],_0x3b4324),_0x28c1e0=await scanJsFilesRecursively(_0x5c5b54,_0x3b4324);return _0x28c1e0[_0x517071(0x151)](({lockKey:_0x2b6b04,filePath:_0x23c30e})=>({'type':_0x3b4324,'name':_0x2b6b04[_0x517071(0x144)]('/')['at'](-0x1)??'','filePath':_0x23c30e,'lockKey':_0x2b6b04}));}async function scanHookFunctions(_0x84e91e){const _0xd65924=a143_0x230c76,_0x1326a1=join(_0x84e91e[_0xd65924(0x14e)],_0xd65924(0x13c)),_0x1ce4d6=[];try{const _0x56fbdb=await readdir(_0x1326a1,{'withFileTypes':!![]});for(const _0x941400 of _0x56fbdb){if(!_0x941400[_0xd65924(0x136)]())continue;const _0x30e744=_0x941400[_0xd65924(0x132)],_0x4c32ac=join(_0x1326a1,_0x30e744),_0x16fed3=await readdir(_0x4c32ac,{'withFileTypes':!![]});for(const _0x5a39bc of _0x16fed3){if(!_0x5a39bc[_0xd65924(0x136)]())continue;const _0x2a3992=_0x5a39bc[_0xd65924(0x132)],_0x506c55=join(_0x4c32ac,_0x2a3992),_0x4154de=await readdir(_0x506c55,{'withFileTypes':!![]});for(const _0x4e37f2 of _0x4154de){if(!_0x4e37f2['isDirectory']())continue;const _0x3e71c6=_0x4e37f2['name'],_0x4de08b=join(_0x506c55,_0x3e71c6),_0x2d28db=await readdir(_0x4de08b,{'withFileTypes':!![]});for(const _0xea7eff of _0x2d28db){if(!_0xea7eff[_0xd65924(0x14f)]()||!_0xea7eff[_0xd65924(0x132)][_0xd65924(0x146)]('.js'))continue;const _0x10cd34=_0xea7eff[_0xd65924(0x132)]['replace'](/\.js$/,'');_0x1ce4d6[_0xd65924(0x12c)]({'type':'HOOK','name':_0x10cd34,'filePath':join(_0x4de08b,_0xea7eff[_0xd65924(0x132)]),'lockKey':_0xd65924(0x131)+_0x30e744+'/'+_0x2a3992+'/'+_0x3e71c6+'/'+_0x10cd34,'alias':_0x30e744,'operationType':_0x2a3992,'functionNode':_0x3e71c6});}}}}}catch(_0x4b2fdd){if(_0x4b2fdd['code']!==_0xd65924(0x14a))throw _0x4b2fdd;}return _0x1ce4d6;}export async function scanLocalBffFunctions(_0x564ea,_0x173e23){const _0x25ac2d=a143_0x230c76;if(_0x173e23==='COMMON'||_0x173e23===_0x25ac2d(0x12d))return scanFlatFunctions(_0x564ea,_0x173e23);if(_0x173e23===_0x25ac2d(0x13c))return scanHookFunctions(_0x564ea);const [_0x5a5101,_0x2c1ecd,_0x2a3437]=await Promise[_0x25ac2d(0x140)]([scanFlatFunctions(_0x564ea,_0x25ac2d(0x13e)),scanFlatFunctions(_0x564ea,'ENDPOINT'),scanHookFunctions(_0x564ea)]);return[..._0x5a5101,..._0x2c1ecd,..._0x2a3437];}export function resolveLocalFilePathFromLockKey(_0x2464a9,_0x41d1d5){const _0x431d5c=a143_0x230c76;return join(_0x2464a9['scriptsRootDir'],..._0x41d1d5[_0x431d5c(0x144)]('/'))+_0x431d5c(0x157);}export function createHookLocationMap(_0x34fd6c){const _0x22e05b=a143_0x230c76,_0x124deb=new Map();for(const _0x24fccf of _0x34fd6c){_0x24fccf[_0x22e05b(0x156)]&&_0x124deb[_0x22e05b(0x143)](_0x24fccf[_0x22e05b(0x156)],{'datasetCode':_0x24fccf[_0x22e05b(0x133)],'operationType':snakeToCamel(_0x24fccf[_0x22e05b(0x137)]),'functionNode':_0x22e05b(0x14b)}),_0x24fccf['afterScriptId']&&_0x124deb[_0x22e05b(0x143)](_0x24fccf[_0x22e05b(0x147)],{'datasetCode':_0x24fccf[_0x22e05b(0x133)],'operationType':snakeToCamel(_0x24fccf[_0x22e05b(0x137)]),'functionNode':_0x22e05b(0x148)});}return _0x124deb;}export function resolveRemoteScriptTarget(_0x2de3ce,_0x1946ef,_0x3acc55,_0x35ea5c,_0x3d37a9){const _0x3f0f08=a143_0x230c76,_0x1a152f=normalizeBffType(_0x1946ef[_0x3f0f08(0x153)]);if(!_0x1a152f||!_0x1946ef['functionName'])return null;if(_0x1a152f===_0x3f0f08(0x13c)){const _0x359482=(_0x1946ef['id']?_0x3acc55[_0x3f0f08(0x130)](_0x1946ef['id']):undefined)??findHookLocationByRemoteId(_0x35ea5c,_0x1946ef['id']);if(!_0x359482)return null;const _0x2cecb0=_0x359482[_0x3f0f08(0x149)]||_0x3d37a9[_0x3f0f08(0x130)](_0x359482[_0x3f0f08(0x133)]),_0x3f5d7b=_0x2cecb0??_0x359482['datasetCode'],_0x2fe67d={..._0x359482,'alias':_0x2cecb0},_0x41ad1e=_0x3f0f08(0x131)+_0x3f5d7b+'/'+_0x2fe67d[_0x3f0f08(0x137)]+'/'+_0x2fe67d[_0x3f0f08(0x138)]+'/'+_0x1946ef[_0x3f0f08(0x155)];return{'lockKey':_0x41ad1e,'filePath':resolveLocalFilePathFromLockKey(_0x2de3ce,_0x41ad1e),'type':_0x3f0f08(0x13c),'hookLocation':_0x2fe67d};}const _0x50067b=_0x1a152f+'/'+_0x1946ef[_0x3f0f08(0x155)];return{'lockKey':_0x50067b,'filePath':resolveLocalFilePathFromLockKey(_0x2de3ce,_0x50067b),'type':_0x1a152f};}export async function ensureParentDirectory(_0x3f69e9){await mkdir(dirname(_0x3f69e9),{'recursive':!![]});}export async function fileExists(_0x2908dc){const _0x258ca4=a143_0x230c76;try{return await access(_0x2908dc,constants[_0x258ca4(0x13a)]),!![];}catch{return![];}}export async function directoryExists(_0x55111d){try{const _0x430e05=await stat(_0x55111d);return _0x430e05['isDirectory']();}catch{return![];}}
@@ -1 +1 @@
1
- (function(_0x16061a,_0x491feb){const _0x12990f=a144_0x4bb2,_0x3f3a1c=_0x16061a();while(!![]){try{const _0x2730c2=-parseInt(_0x12990f(0x17a))/0x1+-parseInt(_0x12990f(0x172))/0x2+parseInt(_0x12990f(0x17d))/0x3*(parseInt(_0x12990f(0x175))/0x4)+parseInt(_0x12990f(0x173))/0x5+-parseInt(_0x12990f(0x179))/0x6*(-parseInt(_0x12990f(0x174))/0x7)+-parseInt(_0x12990f(0x17b))/0x8+parseInt(_0x12990f(0x178))/0x9*(-parseInt(_0x12990f(0x176))/0xa);if(_0x2730c2===_0x491feb)break;else _0x3f3a1c['push'](_0x3f3a1c['shift']());}catch(_0x279313){_0x3f3a1c['push'](_0x3f3a1c['shift']());}}}(a144_0x61af,0x2cd45));import{readFile}from'node:fs/promises';import a144_0x7cdeb0 from'node:crypto';function a144_0x61af(){const _0x488322=['md5','9pSttNz','862986seeBQx','132463NDXwXP','772392ZBTUCC','hex','171yISRWy','digest','update','createHash','30458tonTBl','1368165WWEklK','14CDFrYt','13108IXxCce','3202220ojSPEc'];a144_0x61af=function(){return _0x488322;};return a144_0x61af();}function a144_0x4bb2(_0x1c2b17,_0x77b260){_0x1c2b17=_0x1c2b17-0x16f;const _0x61af74=a144_0x61af();let _0x4bb239=_0x61af74[_0x1c2b17];return _0x4bb239;}export function computeContentHash(_0x46c951){const _0xdfc063=a144_0x4bb2;return a144_0x7cdeb0[_0xdfc063(0x171)](_0xdfc063(0x177))[_0xdfc063(0x170)](_0x46c951)[_0xdfc063(0x16f)](_0xdfc063(0x17c));}export async function computeFileHash(_0x92de88){const _0x1be792=await readFile(_0x92de88,'utf8');return computeContentHash(_0x1be792);}
1
+ function a144_0x5683(_0x1c8a51,_0x5904a5){_0x1c8a51=_0x1c8a51-0x1d2;const _0x36743c=a144_0x3674();let _0x568342=_0x36743c[_0x1c8a51];return _0x568342;}function a144_0x3674(){const _0x23e1fc=['2868500RbzALi','478rhGvck','digest','46EFTQFs','1256307sUQFYB','8JukLac','hex','1451296lUHrMC','md5','7zfbKej','453609VmuQtu','1931410URZhiV','update','createHash','1817142cdKLfw','utf8'];a144_0x3674=function(){return _0x23e1fc;};return a144_0x3674();}(function(_0x59d1b4,_0x5d7116){const _0x582abb=a144_0x5683,_0x34f85b=_0x59d1b4();while(!![]){try{const _0x437bd3=-parseInt(_0x582abb(0x1d5))/0x1*(-parseInt(_0x582abb(0x1d3))/0x2)+-parseInt(_0x582abb(0x1d6))/0x3+parseInt(_0x582abb(0x1d9))/0x4+parseInt(_0x582abb(0x1dd))/0x5+-parseInt(_0x582abb(0x1e0))/0x6*(-parseInt(_0x582abb(0x1db))/0x7)+-parseInt(_0x582abb(0x1d7))/0x8*(parseInt(_0x582abb(0x1dc))/0x9)+-parseInt(_0x582abb(0x1d2))/0xa;if(_0x437bd3===_0x5d7116)break;else _0x34f85b['push'](_0x34f85b['shift']());}catch(_0x56c50a){_0x34f85b['push'](_0x34f85b['shift']());}}}(a144_0x3674,0x4aef9));import{readFile}from'node:fs/promises';import a144_0x1a2dd1 from'node:crypto';export function computeContentHash(_0x13178c){const _0x13f284=a144_0x5683;return a144_0x1a2dd1[_0x13f284(0x1df)](_0x13f284(0x1da))[_0x13f284(0x1de)](_0x13178c)[_0x13f284(0x1d4)](_0x13f284(0x1d8));}export async function computeFileHash(_0x35c888){const _0x2c5fea=a144_0x5683,_0xf9f2f0=await readFile(_0x35c888,_0x2c5fea(0x1e1));return computeContentHash(_0xf9f2f0);}