@lovrabet/rabetbase-cli 2.1.8 → 2.1.9

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 (196) 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/delete.js +1 -1
  52. package/lib/commands/dataset/detail.js +1 -1
  53. package/lib/commands/dataset/index.js +1 -1
  54. package/lib/commands/dataset/link-create.js +1 -1
  55. package/lib/commands/dataset/link-delete.js +1 -1
  56. package/lib/commands/dataset/link-shared.js +1 -1
  57. package/lib/commands/dataset/link-update.js +1 -1
  58. package/lib/commands/dataset/links.js +1 -1
  59. package/lib/commands/dataset/list.js +1 -1
  60. package/lib/commands/dataset/operations.js +1 -1
  61. package/lib/commands/db/analyze-cancel.js +1 -1
  62. package/lib/commands/db/analyze-start.js +1 -1
  63. package/lib/commands/db/analyze-status.js +1 -1
  64. package/lib/commands/db/create.js +1 -1
  65. package/lib/commands/db/delete.js +1 -1
  66. package/lib/commands/db/detail.js +1 -1
  67. package/lib/commands/db/diff.js +1 -1
  68. package/lib/commands/db/index.js +1 -1
  69. package/lib/commands/db/list.js +1 -1
  70. package/lib/commands/db/shared.js +1 -1
  71. package/lib/commands/db/tables.js +1 -1
  72. package/lib/commands/db/test.js +1 -1
  73. package/lib/commands/db/update.js +1 -1
  74. package/lib/commands/doctor.js +1 -1
  75. package/lib/commands/init/index.js +1 -1
  76. package/lib/commands/issue/index.js +1 -1
  77. package/lib/commands/issue/report.js +1 -1
  78. package/lib/commands/logs/index.js +1 -1
  79. package/lib/commands/menu/index.js +1 -1
  80. package/lib/commands/menu/shared/compare-table.js +1 -1
  81. package/lib/commands/menu/shared/index.js +1 -1
  82. package/lib/commands/menu/shared/inquirer.js +1 -1
  83. package/lib/commands/menu/shared/local-pages.js +1 -1
  84. package/lib/commands/menu/shared/logic.js +1 -1
  85. package/lib/commands/menu/shared/service.js +1 -1
  86. package/lib/commands/menu/shared/sync-core.js +1 -1
  87. package/lib/commands/menu/shared/update-core.js +1 -1
  88. package/lib/commands/menu/shared/valid-url.js +1 -1
  89. package/lib/commands/menu/sync.js +1 -1
  90. package/lib/commands/menu/update.js +1 -1
  91. package/lib/commands/page/generate-start.js +1 -1
  92. package/lib/commands/page/generate-status.js +1 -1
  93. package/lib/commands/page/index.js +1 -1
  94. package/lib/commands/page/pull.js +1 -1
  95. package/lib/commands/page/push.js +1 -1
  96. package/lib/commands/page/shared.js +1 -1
  97. package/lib/commands/page/standard-page-status.js +1 -1
  98. package/lib/commands/page/sync.js +1 -1
  99. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  100. package/lib/commands/project/create/format-elapsed.js +1 -1
  101. package/lib/commands/project/create/main.js +1 -1
  102. package/lib/commands/project/create/non-interactive.js +1 -1
  103. package/lib/commands/project/create/project-template-path.js +1 -1
  104. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  105. package/lib/commands/project/create/use-format-code.js +1 -1
  106. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  107. package/lib/commands/project/index.js +1 -1
  108. package/lib/commands/project/init.js +1 -1
  109. package/lib/commands/project/upgrade.js +1 -1
  110. package/lib/commands/registry.js +1 -1
  111. package/lib/commands/run/index.js +1 -1
  112. package/lib/commands/schema.js +1 -1
  113. package/lib/commands/skill/index.js +1 -1
  114. package/lib/commands/sql/create.js +1 -1
  115. package/lib/commands/sql/delete.js +1 -1
  116. package/lib/commands/sql/detail.js +1 -1
  117. package/lib/commands/sql/exec.js +1 -1
  118. package/lib/commands/sql/index.js +1 -1
  119. package/lib/commands/sql/list.js +1 -1
  120. package/lib/commands/sql/pull.js +1 -1
  121. package/lib/commands/sql/push.js +1 -1
  122. package/lib/commands/sql/save.js +1 -1
  123. package/lib/commands/sql/shared.js +1 -1
  124. package/lib/commands/sql/status.js +1 -1
  125. package/lib/commands/sql/validate.js +1 -1
  126. package/lib/config/schema.js +1 -1
  127. package/lib/constant/cdn.js +1 -1
  128. package/lib/constant/cli.js +1 -1
  129. package/lib/constant/defaults.js +1 -1
  130. package/lib/constant/domain.js +1 -1
  131. package/lib/constant/env.js +1 -1
  132. package/lib/constant/output.js +1 -1
  133. package/lib/constant/paths.js +1 -1
  134. package/lib/constant/risk.js +1 -1
  135. package/lib/context.js +1 -1
  136. package/lib/core/alias-resolver.js +1 -1
  137. package/lib/core/api-client.js +1 -1
  138. package/lib/core/bff/config.js +1 -1
  139. package/lib/core/bff/file-system.js +1 -1
  140. package/lib/core/bff/hash.js +1 -1
  141. package/lib/core/bff/lock.js +1 -1
  142. package/lib/core/bff/utils.js +1 -1
  143. package/lib/core/db-resolver.js +1 -1
  144. package/lib/core/page/file-system.js +1 -1
  145. package/lib/core/page/hash.js +1 -1
  146. package/lib/core/page/lock.js +1 -1
  147. package/lib/core/sql-sync/config.js +1 -1
  148. package/lib/core/sql-sync/file-system.js +1 -1
  149. package/lib/core/sql-sync/hash.js +1 -1
  150. package/lib/core/sql-sync/lock.js +1 -1
  151. package/lib/core/sql-sync/utils.js +1 -1
  152. package/lib/core/sql-validator.js +1 -1
  153. package/lib/errors.js +1 -1
  154. package/lib/framework/build-all-flags.js +1 -1
  155. package/lib/framework/flags.js +1 -1
  156. package/lib/framework/help.js +1 -1
  157. package/lib/framework/index.js +1 -1
  158. package/lib/framework/output.js +1 -1
  159. package/lib/framework/response.js +1 -1
  160. package/lib/framework/runner-alias.js +1 -1
  161. package/lib/framework/runner.js +1 -1
  162. package/lib/framework/schema-export.js +1 -1
  163. package/lib/framework/types.js +1 -1
  164. package/lib/generated/build-info.js +1 -1
  165. package/lib/help.js +1 -1
  166. package/lib/skills/main.js +1 -1
  167. package/lib/skills/npx-skills-add.js +1 -1
  168. package/lib/telemetry/cli-command-trace.js +1 -1
  169. package/lib/telemetry/cli-help-trace.js +1 -1
  170. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  171. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  172. package/lib/telemetry/send-cli-trace-log.js +1 -1
  173. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  174. package/lib/utils/ai_config.js +1 -1
  175. package/lib/utils/apply-jq-filter.js +1 -1
  176. package/lib/utils/cdn-config.js +1 -1
  177. package/lib/utils/check-sdk-version.js +1 -1
  178. package/lib/utils/cli-version-check.js +1 -1
  179. package/lib/utils/cli-version-policy.js +1 -1
  180. package/lib/utils/config.js +1 -1
  181. package/lib/utils/copy-directory.js +1 -1
  182. package/lib/utils/entity-with-id.js +1 -1
  183. package/lib/utils/file-utils.js +1 -1
  184. package/lib/utils/guides-cdn.js +1 -1
  185. package/lib/utils/http-client.js +1 -1
  186. package/lib/utils/is-non-interactive.js +1 -1
  187. package/lib/utils/logger.js +1 -1
  188. package/lib/utils/params.js +1 -1
  189. package/lib/utils/platform.js +1 -1
  190. package/lib/utils/rules-cdn.js +1 -1
  191. package/lib/utils/sleep.js +1 -1
  192. package/lib/utils/template-replacer.js +1 -1
  193. package/lib/utils/version.js +1 -1
  194. package/lib/utils/with-active-cookie.js +1 -1
  195. package/lib/utils/write-cli-side-channel.js +1 -1
  196. package/package.json +1 -1
@@ -1 +1 @@
1
- (function(_0x4072e5,_0x4b14de){const _0x5e7151=a136_0x187e,_0x185b10=_0x4072e5();while(!![]){try{const _0x4eedb2=parseInt(_0x5e7151(0x79))/0x1+parseInt(_0x5e7151(0x68))/0x2*(-parseInt(_0x5e7151(0x6b))/0x3)+parseInt(_0x5e7151(0x75))/0x4*(parseInt(_0x5e7151(0x69))/0x5)+parseInt(_0x5e7151(0x71))/0x6*(-parseInt(_0x5e7151(0x74))/0x7)+parseInt(_0x5e7151(0x6c))/0x8*(-parseInt(_0x5e7151(0x6e))/0x9)+parseInt(_0x5e7151(0x70))/0xa*(-parseInt(_0x5e7151(0x67))/0xb)+-parseInt(_0x5e7151(0x77))/0xc*(-parseInt(_0x5e7151(0x76))/0xd);if(_0x4eedb2===_0x4b14de)break;else _0x185b10['push'](_0x185b10['shift']());}catch(_0xc46b02){_0x185b10['push'](_0x185b10['shift']());}}}(a136_0x1f5a,0x9933c));import{readFileSync,existsSync}from'node:fs';function a136_0x1f5a(){const _0x53436e=['4EdLkel','410033qgYJeq','492LDDeTv','utf-8','688088OhFJfr','1894959jdyert','224372HrHEni','494885JNEntO','datasetCode','12gQefQy','106168wyLzyC','set','54ZddpNz','get','50fVXpRS','126030oBsfGC','cwd','find','21cRmztl'];a136_0x1f5a=function(){return _0x53436e;};return a136_0x1f5a();}import{resolve}from'node:path';const cache=new Map();function a136_0x187e(_0x232748,_0xbaf037){_0x232748=_0x232748-0x67;const _0x1f5ab3=a136_0x1f5a();let _0x187e07=_0x1f5ab3[_0x232748];return _0x187e07;}function parseApiFile(_0x5af4b7){const _0x11ab4e=[],_0xcbf0a5=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0xc93700;while((_0xc93700=_0xcbf0a5['exec'](_0x5af4b7))!==null){_0x11ab4e['push']({'datasetCode':_0xc93700[0x1],'tableName':_0xc93700[0x2],'name':_0xc93700[0x3],'alias':_0xc93700[0x4]});}return _0x11ab4e;}export function loadAliasMap(_0x19a55c,_0x2bc41f,_0x4512ed){const _0x2b47c4=a136_0x187e,_0x6203f=_0x4512ed??resolve(process[_0x2b47c4(0x72)](),_0x19a55c,'api.ts');if(cache['has'](_0x6203f))return cache[_0x2b47c4(0x6f)](_0x6203f);if(!existsSync(_0x6203f))return cache[_0x2b47c4(0x6d)](_0x6203f,[]),[];try{const _0x2fea98=readFileSync(_0x6203f,_0x2b47c4(0x78)),_0x293e04=parseApiFile(_0x2fea98);return cache[_0x2b47c4(0x6d)](_0x6203f,_0x293e04),_0x293e04;}catch{return cache['set'](_0x6203f,[]),[];}}export function resolveAlias(_0x544043,_0x3d2424,_0x4b4a69,_0x13c47c){const _0x253466=a136_0x187e;if(!_0x3d2424)return undefined;const _0xe6ab5f=loadAliasMap(_0x544043,_0x4b4a69,_0x13c47c),_0x184c58=_0xe6ab5f[_0x253466(0x73)](_0x1b8cbb=>_0x1b8cbb['alias']===_0x3d2424);return _0x184c58?.[_0x253466(0x6a)];}export function listAliases(_0x551a47,_0x14761a,_0x419f14){return loadAliasMap(_0x551a47,_0x14761a,_0x419f14);}
1
+ function a136_0x1e24(){const _0x590446=['137966zqheRi','16695IFgIzi','1608hjzttT','21068424iObuTu','has','utf-8','3fSkMEs','push','90zhkWFQ','50nZmWnT','4155349bhjzbV','set','alias','cwd','243300xcajDL','142245ZwMJSN','api.ts','808BDeNUy','get','13010305ChFvuo','exec'];a136_0x1e24=function(){return _0x590446;};return a136_0x1e24();}(function(_0x240423,_0x3b5b34){const _0x4a427a=a136_0x5a92,_0x31defb=_0x240423();while(!![]){try{const _0x4bebcf=-parseInt(_0x4a427a(0x1e1))/0x1*(-parseInt(_0x4a427a(0x1db))/0x2)+parseInt(_0x4a427a(0x1e3))/0x3*(parseInt(_0x4a427a(0x1e9))/0x4)+parseInt(_0x4a427a(0x1dc))/0x5*(-parseInt(_0x4a427a(0x1dd))/0x6)+parseInt(_0x4a427a(0x1ee))/0x7+parseInt(_0x4a427a(0x1ec))/0x8*(parseInt(_0x4a427a(0x1ea))/0x9)+parseInt(_0x4a427a(0x1e4))/0xa*(-parseInt(_0x4a427a(0x1e5))/0xb)+-parseInt(_0x4a427a(0x1de))/0xc;if(_0x4bebcf===_0x3b5b34)break;else _0x31defb['push'](_0x31defb['shift']());}catch(_0x21d2a7){_0x31defb['push'](_0x31defb['shift']());}}}(a136_0x1e24,0xe7446));import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';const cache=new Map();function a136_0x5a92(_0x526651,_0x4ae48e){_0x526651=_0x526651-0x1da;const _0x1e24d3=a136_0x1e24();let _0x5a921f=_0x1e24d3[_0x526651];return _0x5a921f;}function parseApiFile(_0x16450f){const _0x32353b=a136_0x5a92,_0x3f7cab=[],_0x97de34=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x3d53e2;while((_0x3d53e2=_0x97de34[_0x32353b(0x1da)](_0x16450f))!==null){_0x3f7cab[_0x32353b(0x1e2)]({'datasetCode':_0x3d53e2[0x1],'tableName':_0x3d53e2[0x2],'name':_0x3d53e2[0x3],'alias':_0x3d53e2[0x4]});}return _0x3f7cab;}export function loadAliasMap(_0xee77f2,_0x965af7,_0x3df268){const _0x1e166c=a136_0x5a92,_0x4834d1=_0x3df268??resolve(process[_0x1e166c(0x1e8)](),_0xee77f2,_0x1e166c(0x1eb));if(cache[_0x1e166c(0x1df)](_0x4834d1))return cache[_0x1e166c(0x1ed)](_0x4834d1);if(!existsSync(_0x4834d1))return cache[_0x1e166c(0x1e6)](_0x4834d1,[]),[];try{const _0x25f329=readFileSync(_0x4834d1,_0x1e166c(0x1e0)),_0x16864d=parseApiFile(_0x25f329);return cache['set'](_0x4834d1,_0x16864d),_0x16864d;}catch{return cache['set'](_0x4834d1,[]),[];}}export function resolveAlias(_0xedc19e,_0x30f291,_0x273929,_0xee8584){const _0x21b2e0=a136_0x5a92;if(!_0x30f291)return undefined;const _0x2a722a=loadAliasMap(_0xedc19e,_0x273929,_0xee8584),_0x10bb8a=_0x2a722a['find'](_0x45116f=>_0x45116f[_0x21b2e0(0x1e7)]===_0x30f291);return _0x10bb8a?.['datasetCode'];}export function listAliases(_0x2a13df,_0x5f125f,_0x3eb373){return loadAliasMap(_0x2a13df,_0x5f125f,_0x3eb373);}
@@ -1 +1 @@
1
- (function(_0x59735b,_0x3a4bf2){const _0x825ccf=a137_0xa216,_0x3e605c=_0x59735b();while(!![]){try{const _0x27024b=-parseInt(_0x825ccf(0x1a3))/0x1*(-parseInt(_0x825ccf(0x139))/0x2)+-parseInt(_0x825ccf(0x1c5))/0x3*(parseInt(_0x825ccf(0x167))/0x4)+parseInt(_0x825ccf(0x179))/0x5*(-parseInt(_0x825ccf(0x13e))/0x6)+parseInt(_0x825ccf(0x1b8))/0x7+parseInt(_0x825ccf(0x13a))/0x8+parseInt(_0x825ccf(0x1b9))/0x9*(parseInt(_0x825ccf(0x1bf))/0xa)+-parseInt(_0x825ccf(0x13b))/0xb*(parseInt(_0x825ccf(0x15e))/0xc);if(_0x27024b===_0x3a4bf2)break;else _0x3e605c['push'](_0x3e605c['shift']());}catch(_0x2cc962){_0x3e605c['push'](_0x3e605c['shift']());}}}(a137_0x9202,0x9aae7));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(_0x30b918){_activeCookie=_0x30b918||undefined;}export function clearActiveCookie(){_activeCookie=undefined;}const DEFAULT_REQUEST_TIMEOUT_MS=0x7530;async function apiRequest(_0xab565d,_0x3812b5={}){const _0x1030c1=a137_0xa216,{method:method=_0x1030c1(0x1b5),body:_0x182ef5,headers:headers={},timeout:timeout=DEFAULT_REQUEST_TIMEOUT_MS,useRuntime:useRuntime=![]}=_0x3812b5,_0x876bca=useRuntime?getRuntimeDomain():getApiDomain(),_0x425cf7=_activeCookie||getCookie(),_0x1cdf41=''+_0x876bca+_0xab565d,_0x1f8f40=new AbortController(),_0x3b5c67=setTimeout(()=>_0x1f8f40[_0x1030c1(0x164)](),timeout);try{const _0x31f0a0=await fetch(_0x1cdf41,{'method':method,'headers':{'Content-Type':'application/json','Cookie':_0x425cf7,'X-Invoke-Source':_0x1030c1(0x19e),...headers},'body':_0x182ef5?JSON['stringify'](_0x182ef5):undefined,'signal':_0x1f8f40[_0x1030c1(0x152)]});let _0x4aaeae;try{_0x4aaeae=await _0x31f0a0['json']();}catch{throw CliErrors[_0x1030c1(0x176)]('API\x20returned\x20non-JSON\x20response\x20(HTTP\x20'+_0x31f0a0[_0x1030c1(0x1c4)]+')',_0x31f0a0['status']>=0x190?_0x1030c1(0x14f):undefined);}if(!_0x31f0a0['ok']||_0x4aaeae[_0x1030c1(0x1b2)]===![])throw CliErrors['apiError'](_0x4aaeae[_0x1030c1(0x159)]||_0x4aaeae[_0x1030c1(0x14d)]||_0x1030c1(0x16e)+_0x31f0a0[_0x1030c1(0x1c4)],_0x4aaeae[_0x1030c1(0x182)]?_0x1030c1(0x191)+_0x4aaeae['errorCode']:undefined);return _0x4aaeae;}catch(_0x371c79){if(_0x371c79 instanceof Error&&_0x371c79[_0x1030c1(0x155)]===_0x1030c1(0x1c8))throw CliErrors[_0x1030c1(0x176)](_0x1030c1(0x145)+_0x1cdf41);throw _0x371c79;}finally{clearTimeout(_0x3b5c67);}}function isAuthFailure(_0x46b7f7){const _0x1c8100=a137_0xa216,_0x4434eb=_0x46b7f7[_0x1c8100(0x159)]||_0x46b7f7['message']||_0x46b7f7[_0x1c8100(0x18e)]?.[_0x1c8100(0x14d)]||_0x46b7f7[_0x1c8100(0x173)]||_0x46b7f7[_0x1c8100(0x165)]||'';return _0x46b7f7[_0x1c8100(0x182)]===_0x1c8100(0x17f)||_0x46b7f7[_0x1c8100(0x1c7)]===0x191||_0x46b7f7['code']===_0x1c8100(0x1ac)||_0x4434eb[_0x1c8100(0x162)]('401')||_0x4434eb[_0x1c8100(0x162)](_0x1c8100(0x19f))||_0x4434eb['includes']('登录')||_0x4434eb['includes']('认证');}export async function platformFetch(_0x588f1f,_0x3383f4){const _0x1c776b=a137_0xa216,_0x4616d2=await fetch(_0x588f1f,{'method':_0x3383f4[_0x1c776b(0x138)]??_0x1c776b(0x1b5),'headers':{'Content-Type':'application/json','Cookie':_0x3383f4[_0x1c776b(0x135)]},..._0x3383f4['body']&&{'body':JSON['stringify'](_0x3383f4[_0x1c776b(0x19b)])}});if(!_0x4616d2['ok']){if(_0x4616d2['status']===0x191)throw CliErrors['authRequired']();throw CliErrors[_0x1c776b(0x176)](_0x3383f4[_0x1c776b(0x142)]+_0x1c776b(0x168)+_0x4616d2[_0x1c776b(0x1c4)]);}const _0x11dd0e=await _0x4616d2['json']();if(_0x11dd0e[_0x1c776b(0x1b2)]===![]){if(isAuthFailure(_0x11dd0e))throw CliErrors['authRequired']();throw CliErrors[_0x1c776b(0x176)](_0x11dd0e[_0x1c776b(0x159)]||_0x11dd0e['message']||_0x3383f4[_0x1c776b(0x142)]+_0x1c776b(0x187));}return _0x11dd0e[_0x1c776b(0x18e)];}export async function listBffScripts(_0x389f17,_0x30ceb1,_0x3e91cf){const _0x56d198=a137_0xa216;let _0x37da71=_0x56d198(0x1ad)+_0x389f17;if(_0x30ceb1)_0x37da71+=_0x56d198(0x1b1)+_0x30ceb1;const _0x1f5ee8=await apiRequest(_0x37da71);let _0x1eb0cb=extractList(_0x1f5ee8[_0x56d198(0x18e)]);if(_0x3e91cf?.[_0x56d198(0x13f)]){const _0x1347e9=_0x3e91cf[_0x56d198(0x13f)][_0x56d198(0x161)]();_0x1eb0cb=_0x1eb0cb[_0x56d198(0x140)](_0x585a50=>_0x585a50[_0x56d198(0x13c)]?.[_0x56d198(0x161)]()[_0x56d198(0x162)](_0x1347e9)||_0x585a50[_0x56d198(0x147)]?.[_0x56d198(0x161)]()[_0x56d198(0x162)](_0x1347e9));}return _0x1eb0cb;}export async function getBffScriptInfo(_0x3692de){const _0x7559bf=a137_0xa216,_0x16269e=await apiRequest(_0x7559bf(0x1a4)+_0x3692de);if(!_0x16269e[_0x7559bf(0x18e)])throw CliErrors[_0x7559bf(0x16f)]('BFF\x20script\x20not\x20found:\x20id='+_0x3692de);return _0x16269e[_0x7559bf(0x18e)];}export async function saveBffScript(_0x85c843){const _0x484cc5=a137_0xa216,_0x1fa4fa=await apiRequest(_0x484cc5(0x19c),{'method':_0x484cc5(0x14b),'body':_0x85c843}),{id:_0x1c4344,entity:_0x2b97bc}=normalizeEntityWithIdResponse(_0x1fa4fa[_0x484cc5(0x18e)]);if(_0x1c4344!==undefined){const _0x412ea3=typeof _0x2b97bc[_0x484cc5(0x13c)]===_0x484cc5(0x18a)||typeof _0x2b97bc[_0x484cc5(0x166)]===_0x484cc5(0x18a)?_0x2b97bc:undefined;return{'id':_0x1c4344,'script':_0x412ea3};}throw CliErrors[_0x484cc5(0x176)](_0x484cc5(0x183));}export async function deleteBffScript(_0x3fc747){const _0x39d541=a137_0xa216;await apiRequest('/api/management/library/scripts/delete',{'method':_0x39d541(0x14b),'body':{'id':_0x3fc747}});}export async function getBffScriptStatistics(_0x4e71e3){const _0x5bada9=a137_0xa216,_0x1c7fe7=await apiRequest(_0x5bada9(0x19a)+_0x4e71e3);return extractList(_0x1c7fe7[_0x5bada9(0x18e)]);}export async function clearBffScriptCache(){const _0x374618=a137_0xa216,_0x103419=await apiRequest(_0x374618(0x18d),{'method':'POST','useRuntime':!![]});return typeof _0x103419[_0x374618(0x18e)]==='string'?_0x103419[_0x374618(0x18e)]:'';}export async function listBffDatasetOperations(_0x8ff119,_0x1cd1f8){const _0x1eb007=a137_0xa216,_0x1ecb3a=await apiRequest(_0x1eb007(0x1b3),{'method':'POST','body':{'appCode':_0x8ff119,'datasetId':_0x1cd1f8}});return _0x1ecb3a['data'];}export async function listSqlQueries(_0x4a53ed,_0x3eb1bf){const _0x4d67ce=a137_0xa216,_0x3bbff8=await apiRequest(_0x4d67ce(0x1a0),{'method':_0x4d67ce(0x14b),'body':{'appCode':_0x4a53ed,'currentPage':_0x3eb1bf?.[_0x4d67ce(0x178)]??0x1,'pageSize':_0x3eb1bf?.[_0x4d67ce(0x16d)]??0x32,'sqlCode':_0x3eb1bf?.[_0x4d67ce(0x189)],'sqlName':_0x3eb1bf?.['sqlName']}});return _0x3bbff8[_0x4d67ce(0x18e)];}export async function getSqlQueryInfo(_0x5e520b,_0x4c7632){const _0x1c1f6b=a137_0xa216,_0x8b58e6=await listSqlQueries(_0x5e520b,{'sqlCode':_0x4c7632}),_0x26a066=_0x8b58e6['tableData']?.[0x0];if(!_0x26a066)throw CliErrors[_0x1c1f6b(0x16f)](_0x1c1f6b(0x14a)+_0x4c7632);return _0x26a066;}export async function getSqlQueryDetail(_0x178a2b){const _0x2bac79=a137_0xa216,_0x5c9dfd=await apiRequest(_0x2bac79(0x1ce)+(_0x2bac79(0x1c3)+encodeURIComponent(_0x178a2b)));if(!_0x5c9dfd[_0x2bac79(0x18e)])throw CliErrors[_0x2bac79(0x16f)](_0x2bac79(0x14a)+_0x178a2b);return _0x5c9dfd['data'];}export async function getSqlQueryDetailById(_0x1b2f5b){const _0x40d5a4=a137_0xa216,_0x4ec569=await apiRequest(_0x40d5a4(0x141)+_0x1b2f5b);if(!_0x4ec569['data'])throw CliErrors[_0x40d5a4(0x16f)](_0x40d5a4(0x146)+_0x1b2f5b);return _0x4ec569[_0x40d5a4(0x18e)];}export async function createSqlQuery(_0x49fb83){const _0x1ba743=a137_0xa216,_0x24b2db=await apiRequest(_0x1ba743(0x17d),{'method':_0x1ba743(0x14b),'body':_0x49fb83}),{id:_0x5af897,entity:_0x25693b}=normalizeEntityWithIdResponse(_0x24b2db[_0x1ba743(0x18e)]);if(!(_0x1ba743(0x189)in _0x25693b)&&_0x5af897)return getSqlQueryDetailById(_0x5af897);return normalizeSqlQueryEntity(_0x25693b);}export async function updateSqlQuery(_0x4ed29d){const _0x6dbc38=a137_0xa216,_0xd71fc5=await apiRequest(_0x6dbc38(0x1a1),{'method':_0x6dbc38(0x14b),'body':_0x4ed29d}),{id:_0x2686d0,entity:_0x2f1a7e}=normalizeEntityWithIdResponse(_0xd71fc5[_0x6dbc38(0x18e)]);if(!(_0x6dbc38(0x189)in _0x2f1a7e)){if(_0x4ed29d['sqlCode'])return getSqlQueryDetail(_0x4ed29d[_0x6dbc38(0x189)]);if(_0x2686d0)return getSqlQueryDetailById(_0x2686d0);}return normalizeSqlQueryEntity(_0x2f1a7e);}function a137_0xa216(_0x2f2ec1,_0x4669ab){_0x2f2ec1=_0x2f2ec1-0x12b;const _0x92024a=a137_0x9202();let _0xa21640=_0x92024a[_0x2f2ec1];return _0xa21640;}export async function deleteSqlQuery(_0x12bccc){const _0x283d34=a137_0xa216;await apiRequest(_0x283d34(0x130),{'method':_0x283d34(0x14b),'body':_0x12bccc});}export async function saveSqlQuery(_0x1d2a3e){const _0xfd1bda=a137_0xa216,_0x4212c3=await apiRequest(_0xfd1bda(0x17c),{'method':_0xfd1bda(0x14b),'body':_0x1d2a3e});return _0x4212c3[_0xfd1bda(0x18e)];}function normalizeSqlQueryEntity(_0x3ff58b){const _0x2820d7=a137_0xa216;return{..._0x3ff58b,'id':Number(_0x3ff58b['id']),'dbId':_0x3ff58b[_0x2820d7(0x184)]==null?undefined:Number(_0x3ff58b[_0x2820d7(0x184)]),'version':_0x3ff58b['version']==null?undefined:Number(_0x3ff58b[_0x2820d7(0x180)])};}export async function executeSql(_0x53c71c,_0x333337,_0x3b977b){const _0x1f67d2=a137_0xa216,_0x32607b=await apiRequest('/api/custom/executeSql',{'method':'POST','body':{'appCode':_0x53c71c,'sqlCode':_0x333337,..._0x3b977b&&{'params':_0x3b977b}},'useRuntime':!![]});return _0x32607b[_0x1f67d2(0x18e)];}export async function executeDatasetDataOperation(_0x5d07f4,_0x3fb287,_0x1f4503,_0x534e97={}){const _0x276f5b=a137_0xa216;try{const _0x3d36de=await apiRequest(_0x276f5b(0x1aa)+_0x5d07f4+'/'+_0x3fb287+'/'+_0x1f4503,{'method':_0x276f5b(0x14b),'body':_0x534e97,'useRuntime':!![]});return _0x3d36de[_0x276f5b(0x18e)];}catch(_0x377053){if(_0x1f4503==='getOne'&&_0x377053 instanceof CliError&&_0x377053[_0x276f5b(0x1c7)]==='api_error'&&_0x534e97['id']!==undefined&&_0x534e97['id']!==null&&_0x534e97['id']!==''){const _0x5cb1c6=await apiRequest('/api/'+_0x5d07f4+'/'+_0x3fb287+_0x276f5b(0x157),{'method':_0x276f5b(0x14b),'body':{'where':{'id':{'$eq':_0x534e97['id']}},'currentPage':0x1,'pageSize':0x1},'useRuntime':!![]}),_0x3ce8d9=Array[_0x276f5b(0x136)](_0x5cb1c6['data']?.[_0x276f5b(0x131)])?_0x5cb1c6['data']['tableData']:[];return _0x3ce8d9[0x0]??null;}throw _0x377053;}}export async function listDatasets(_0x2f838d,_0x6c4919){const _0x188470=a137_0xa216,_0x296912={'appCode':_0x2f838d,'deleted':![]};if(_0x6c4919?.[_0x188470(0x1c7)])_0x296912[_0x188470(0x1c7)]=_0x6c4919[_0x188470(0x1c7)];if(_0x6c4919?.[_0x188470(0x155)])_0x296912['name']=_0x6c4919[_0x188470(0x155)];const _0x2f7837=await apiRequest(_0x188470(0x1c9),{'method':_0x188470(0x14b),'body':_0x296912});return extractList(_0x2f7837[_0x188470(0x18e)]);}export async function deleteDataset(_0x13fbee,_0x325f9d){const _0x17bca1=a137_0xa216;await apiRequest(_0x17bca1(0x134),{'method':_0x17bca1(0x14b),'body':{'appCode':_0x13fbee,'datasetId':_0x325f9d}});}export async function searchDatasets(_0x5f09f7,_0x16d639){const _0x526151=a137_0xa216,_0x2acd56=await listDatasets(_0x5f09f7,{'name':_0x16d639}),_0x5509e9=_0x16d639[_0x526151(0x161)](),_0x2591c3=new Set(_0x2acd56[_0x526151(0x137)](_0x2a70cd=>_0x2a70cd['id'])),_0x4b6ce4=_0x2acd56[_0x526151(0x140)](_0x158065=>_0x158065['dbtableConfig']?.[_0x526151(0x1ae)]?.[_0x526151(0x161)]()[_0x526151(0x162)](_0x5509e9)||_0x158065['description']?.['toLowerCase']()[_0x526151(0x162)](_0x5509e9)),_0x3557c0=await listDatasets(_0x5f09f7,{'code':_0x16d639});for(const _0x4678c0 of _0x3557c0){!_0x2591c3['has'](_0x4678c0['id'])&&(_0x2acd56['push'](_0x4678c0),_0x2591c3[_0x526151(0x1b0)](_0x4678c0['id']));}return _0x2acd56;}export function normalizeDatasetOperations(_0x5e2c21){const _0x1a5c0b=a137_0xa216;if(Array[_0x1a5c0b(0x136)](_0x5e2c21))return _0x5e2c21['filter'](_0x13d223=>_0x13d223!=null&&typeof _0x13d223===_0x1a5c0b(0x1a8));if(_0x5e2c21&&typeof _0x5e2c21===_0x1a5c0b(0x1a8))return Object['entries'](_0x5e2c21)[_0x1a5c0b(0x140)](([,_0x26f42a])=>_0x26f42a!=null&&typeof _0x26f42a===_0x1a5c0b(0x1a8))[_0x1a5c0b(0x137)](([_0x1ba117,_0x37fb77])=>({..._0x37fb77,'name':_0x37fb77[_0x1a5c0b(0x155)]??_0x37fb77[_0x1a5c0b(0x195)]??_0x1ba117}));return[];}export async function getDatasetDetail(_0x33d8f3){const _0x5b0685=a137_0xa216,_0x20c0c3=/^\d+$/[_0x5b0685(0x174)](_0x33d8f3)?'id':_0x5b0685(0x1c7),_0x10d039=await apiRequest('/smartapi/dataset/get-driven-data?'+_0x20c0c3+'='+_0x33d8f3);return _0x10d039[_0x5b0685(0x18e)];}function a137_0x9202(){const _0x2c5ce8=['12bHNKEE','/api/management/library/scripts/info?id=','modelCode','Use\x20the\x20platform\x20console\x20to\x20see\x20all.','/smartapi/dblink/testConnect','object','sqlName','/api/','Operation\x20\x22','401','/api/management/library/scripts/list?appCode=','tableName','api_error','add','&type=','success','/smartapi/dataset/get-dataset-operation','const\x20result\x20=\x20await\x20client.models.','GET','\x20\x20\x20\x20sqlCode:\x20\x27','responseFields','2114245PLSfJu','18IxZWqh','Dataset\x20not\x20found:\x20','\x22\x20not\x20found\x20in\x20dataset\x20','\x20\x20});','/smartapi/dblink/getOne','type','4180810SIbFTR','planId','join','\x20\x20sqlCode:\x20\x27','?sqlCode=','status','961293dbhUCi','\x20\x20return\x20rows;','code','AbortError','/smartapi/dataset/get-dataset-list','\x20\x20pageSize:\x2020,','displayName','.filter({','/smartapi/question/er-config/erDelete','/smartapi/custom/getUserCustomSql','set','\x20\x20\x20\x20params:\x20{\x20/*\x20parameter\x20values\x20*/\x20},','.remove(id);','sdk','/smartapi/lovrabet/dataset/','clientOperationId','find','target','/smartapi/dblink/getList','/smartapi/custom/deleteUserCustomSql','tableData','//\x20','\x20\x20where:\x20{},','/smartapi/dataset/delete-dataset','cookie','isArray','map','method','86468gQgkss','9455160XcKpzy','1628825spHuPr','functionName','operations','1104438gMeRNI','scriptName','filter','/smartapi/custom/getUserCustomSql?id=','label','/smartapi/dblink/delete','/generate-standard-pages/start','Request\x20timeout:\x20','SQL\x20query\x20not\x20found:\x20id=','description','/smartapi/dblink/update','getOne','SQL\x20query\x20not\x20found:\x20','POST','import\x20{\x20LovrabetClient\x20}\x20from\x20\x27@lovrabet/sdk\x27;','message','create','Check\x20your\x20auth\x20cookie\x20and\x20try\x20again.','//\x20SQL:\x20','delete','signal','length','push','name','const\x20results\x20=\x20data.execResult\x20||\x20[];','/filter','});','errorMsg','totalCount','operationId','path','\x20apps.\x20','108jijdsv','if\x20(!data.execSuccess)\x20throw\x20new\x20Error(\x27SQL\x20execution\x20failed\x27);','/smartapi/dblink/getAllTableList','toLowerCase','includes','/smartapi/question/er-config','abort','error','scriptType','4ZngbdV','\x20failed,\x20HTTP\x20','//\x20BFF\x20context:\x20context.client.sql.execute\x20returns\x20rows\x20directly','update','/smartapi/question/er-config/update-single','/smartapi/question/er-config/erCreate','pageSize','API\x20error:\x20','validation','Warning:\x20showing\x20first\x20','pageIndex','toString','errorMessage','test','warn','apiError','(/*\x20params\x20*/);','currentPage','15dvRPBA','/sync-to-pages','/smartapi/db-analysis/status/','/api/node-toolbox/sql/save','/smartapi/custom/saveUserCustomSql','export\x20default\x20async\x20function\x20handler(params,\x20context)\x20{','UNAUTHORIZED','version','/smartapi/app/getList','errorCode','BFF\x20save\x20returned\x20no\x20valid\x20id','dbId','/smartapi/db-analysis/jobs/cancel','entries','\x20failed','/smartapi/lovrabet/update-page','sqlCode','string','/smartapi/dblink/getTableDiffV2ByPage','\x20\x20const\x20rows\x20=\x20await\x20context.client.sql.execute({','/api/management/script/cache/clear','data','/generate-standard-pages/status?','\x20\x20currentPage:\x201,','API\x20error\x20code:\x20','requestFields','modelId','/smartapi/lovrabet/detail?pageId=','operationName','table','/smartapi/dblink/create','tableList','/standard-page-status?appCode=','/api/management/library/scripts/statistics?appCode=','body','/api/management/library/scripts/save','.update(id,\x20{\x20/*\x20fields\x20*/\x20});','cli:rabetbase','Unauthorized','/smartapi/custom/queryUserCustomSqlList','/smartapi/custom/updateUserCustomSql','const\x20client\x20=\x20new\x20LovrabetClient({\x20appCode:\x20\x27<YOUR_APP_CODE>\x27\x20});'];a137_0x9202=function(){return _0x2c5ce8;};return a137_0x9202();}export async function getDatasetOperations(_0x5b9ff7){const _0x1d9108=a137_0xa216,_0x37a0d4=await getDatasetDetail(_0x5b9ff7),_0x383060=normalizeDatasetOperations(_0x37a0d4[_0x1d9108(0x13d)])[_0x1d9108(0x137)](_0x5775e6=>({'name':_0x5775e6[_0x1d9108(0x155)]||_0x5775e6['operationName'],'displayName':_0x5775e6[_0x1d9108(0x1cb)]||_0x5775e6[_0x1d9108(0x155)],'type':_0x5775e6[_0x1d9108(0x1be)],'method':_0x5775e6[_0x1d9108(0x138)],'path':_0x5775e6[_0x1d9108(0x15c)],'enabled':_0x5775e6['enabled']??!![],'requestFields':_0x5775e6[_0x1d9108(0x192)],'responseFields':_0x5775e6[_0x1d9108(0x1b7)]}));return{'dataset':{'id':_0x37a0d4['id']??_0x37a0d4[_0x1d9108(0x193)],'name':_0x37a0d4[_0x1d9108(0x155)],'code':_0x37a0d4[_0x1d9108(0x1c7)]||_0x37a0d4[_0x1d9108(0x1a5)],'tableName':_0x37a0d4[_0x1d9108(0x1ae)]||_0x37a0d4['dbtableConfig']?.['tableName']},'operations':_0x383060};}export async function getOperationDetail(_0x2f0f04,_0x1e36e4,_0x1a5836){const _0x107494=a137_0xa216;let _0x5d5e8c=_0x1e36e4;if(!/^\d+$/[_0x107494(0x174)](_0x1e36e4)){const _0x508de8=await listDatasets(_0x2f0f04,{'code':_0x1e36e4}),_0x18309a=_0x508de8[_0x107494(0x12d)](_0x163d3d=>_0x163d3d[_0x107494(0x1c7)]===_0x1e36e4||String(_0x163d3d['id'])===_0x1e36e4);if(!_0x18309a)throw CliErrors[_0x107494(0x16f)](_0x107494(0x1ba)+_0x1e36e4);_0x5d5e8c=String(_0x18309a['id']);}const _0x49700a=await getDatasetDetail(_0x5d5e8c),_0x1bffda=normalizeDatasetOperations(_0x49700a[_0x107494(0x13d)])[_0x107494(0x12d)](_0x92b2b1=>(_0x92b2b1[_0x107494(0x155)]||_0x92b2b1[_0x107494(0x195)])===_0x1a5836);if(!_0x1bffda)throw CliErrors[_0x107494(0x16f)](_0x107494(0x1ab)+_0x1a5836+_0x107494(0x1bb)+_0x1e36e4);return{'dataset':{'id':_0x49700a['id']??_0x49700a[_0x107494(0x193)],'name':_0x49700a[_0x107494(0x155)],'code':_0x49700a[_0x107494(0x1c7)]||_0x49700a[_0x107494(0x1a5)],'tableName':_0x49700a[_0x107494(0x1ae)]||_0x49700a['dbtableConfig']?.[_0x107494(0x1ae)]},'operation':_0x1bffda};}export async function startGenerateStandardPages(_0x13aece,_0x18d4db,_0x25c73b){const _0x21373f=a137_0xa216,_0x59cb1a=await apiRequest(_0x21373f(0x12b)+_0x18d4db+_0x21373f(0x144),{'method':_0x21373f(0x14b),'body':{'appCode':_0x13aece,..._0x25c73b?.['clientOperationId']?{'clientOperationId':_0x25c73b[_0x21373f(0x12c)]}:{}},'timeout':DEFAULT_REQUEST_TIMEOUT_MS});return _0x59cb1a[_0x21373f(0x18e)];}export async function getGenerateStandardPagesStatus(_0x4e5b9e,_0x40265a,_0x1ae536){const _0x1b592c=a137_0xa216,_0x322fac=new URLSearchParams({'appCode':_0x4e5b9e});_0x1ae536[_0x1b592c(0x15b)]&&_0x322fac['set'](_0x1b592c(0x15b),_0x1ae536[_0x1b592c(0x15b)]);_0x1ae536[_0x1b592c(0x12c)]&&_0x322fac[_0x1b592c(0x1cf)]('clientOperationId',_0x1ae536[_0x1b592c(0x12c)]);const _0x30cc96=await apiRequest(_0x1b592c(0x12b)+_0x40265a+_0x1b592c(0x18f)+_0x322fac['toString']());return _0x30cc96[_0x1b592c(0x18e)];}export async function getStandardPageStatus(_0x881529,_0x4e2613){const _0x17e256=a137_0xa216,_0x235668=await apiRequest('/smartapi/lovrabet/dataset/'+_0x4e2613+_0x17e256(0x199)+encodeURIComponent(_0x881529));return _0x235668['data'];}export async function tryGetStandardPageStatus(_0x4efd8c,_0x44516c){const _0x59d86a=a137_0xa216;try{return await getStandardPageStatus(_0x4efd8c,_0x44516c);}catch(_0xb08b15){if(_0xb08b15 instanceof CliError&&_0xb08b15[_0x59d86a(0x1c7)]===_0x59d86a(0x1af)&&/404|not found|non-json response/i[_0x59d86a(0x174)](_0xb08b15[_0x59d86a(0x14d)]))return null;throw _0xb08b15;}}export async function syncStandardPages(_0x562a39,_0x5b640c){const _0x3c7363=a137_0xa216,_0x4211e9=await apiRequest(_0x3c7363(0x12b)+_0x5b640c+_0x3c7363(0x17a),{'method':_0x3c7363(0x14b),'body':{'appCode':_0x562a39}});return _0x4211e9[_0x3c7363(0x18e)];}export async function getPageDetail(_0x20fec2){const _0x50752=a137_0xa216,_0xeef4d9=await apiRequest(_0x50752(0x194)+_0x20fec2);if(!_0xeef4d9[_0x50752(0x18e)])throw CliErrors[_0x50752(0x16f)]('Page\x20not\x20found:\x20'+_0x20fec2);return _0xeef4d9[_0x50752(0x18e)];}export async function updatePage(_0x3518aa,_0x4805e0,_0xf6d2dc,_0x3bf9a9){const _0x2b3418=a137_0xa216,_0x47de76=await apiRequest(_0x2b3418(0x188),{'method':'POST','body':{'appCode':_0x3518aa,'pageId':_0x4805e0,'code':_0xf6d2dc,'datasetIds':_0x3bf9a9}});return _0x47de76['data'];}export function generateSdkCode(_0x3ac85c,_0x4b985b,_0x57aa2a){const _0x2fee73=a137_0xa216,_0x3add09=_0x57aa2a?.['includeImports']??!![],_0x449f08='dataset_'+_0x3ac85c[_0x2fee73(0x1c7)]?.['replace'](/-/g,'_'),_0x18b560=_0x4b985b['name']||_0x4b985b[_0x2fee73(0x195)]||_0x2fee73(0x140),_0x41685b=[];_0x3add09&&_0x41685b['push'](_0x2fee73(0x14c),'',_0x2fee73(0x1a2),'');_0x41685b[_0x2fee73(0x154)](_0x2fee73(0x132)+_0x3ac85c[_0x2fee73(0x155)]+'\x20('+(_0x3ac85c[_0x2fee73(0x1ae)]||_0x2fee73(0x196))+')');if(_0x18b560==='filter')_0x41685b[_0x2fee73(0x154)]('const\x20result\x20=\x20await\x20client.models.'+_0x449f08+_0x2fee73(0x1cc),_0x2fee73(0x133),_0x2fee73(0x1ca),_0x2fee73(0x190),_0x2fee73(0x158));else{if(_0x18b560===_0x2fee73(0x149))_0x41685b[_0x2fee73(0x154)](_0x2fee73(0x1b4)+_0x449f08+'.getOne(id);');else{if(_0x18b560===_0x2fee73(0x14e))_0x41685b[_0x2fee73(0x154)](_0x2fee73(0x1b4)+_0x449f08+'.create({\x20/*\x20fields\x20*/\x20});');else{if(_0x18b560===_0x2fee73(0x16a))_0x41685b['push'](_0x2fee73(0x1b4)+_0x449f08+_0x2fee73(0x19d));else _0x18b560===_0x2fee73(0x151)||_0x18b560==='remove'?_0x41685b[_0x2fee73(0x154)](_0x2fee73(0x1b4)+_0x449f08+_0x2fee73(0x1d1)):_0x41685b['push']('const\x20result\x20=\x20await\x20client.models.'+_0x449f08+'.'+_0x18b560+_0x2fee73(0x177));}}}return _0x41685b[_0x2fee73(0x1c1)]('\x0a');}export function generateSqlCodeTemplate(_0x22be3e,_0x101af4){const _0x233ca7=a137_0xa216,_0x5a4fac=_0x101af4?.[_0x233ca7(0x12e)]??'sdk',_0x198ff4=_0x101af4?.['includeImports']??!![],_0x5d8d79=[];return _0x5d8d79['push'](_0x233ca7(0x150)+_0x22be3e[_0x233ca7(0x1a9)]+'\x20('+_0x22be3e[_0x233ca7(0x189)]+')'),_0x5a4fac===_0x233ca7(0x1d2)?(_0x198ff4&&_0x5d8d79[_0x233ca7(0x154)](_0x233ca7(0x14c),'',_0x233ca7(0x1a2),''),_0x5d8d79[_0x233ca7(0x154)]('const\x20data\x20=\x20await\x20client.sql.execute({',_0x233ca7(0x1c2)+_0x22be3e['sqlCode']+'\x27,','\x20\x20params:\x20{\x20/*\x20parameter\x20values\x20*/\x20},',_0x233ca7(0x158),_0x233ca7(0x15f),_0x233ca7(0x156))):_0x5d8d79[_0x233ca7(0x154)](_0x233ca7(0x169),_0x233ca7(0x17e),_0x233ca7(0x18c),_0x233ca7(0x1b6)+_0x22be3e[_0x233ca7(0x189)]+'\x27,',_0x233ca7(0x1d0),_0x233ca7(0x1bc),_0x233ca7(0x1c6),'}'),_0x5d8d79['join']('\x0a');}export async function getErConfig(_0x2fd6b2,_0x4bbfa1){const _0x357219=a137_0xa216,_0x1a6bf5=await apiRequest(_0x357219(0x163),{'method':'POST','body':{'appCode':_0x2fd6b2,'dblinkId':_0x4bbfa1}});return _0x1a6bf5[_0x357219(0x18e)];}export async function createErRelation(_0x17bbbd){const _0xeee4a5=a137_0xa216,_0x483941=await apiRequest(_0xeee4a5(0x16c),{'method':_0xeee4a5(0x14b),'body':_0x17bbbd});return _0x483941[_0xeee4a5(0x18e)];}export async function updateErRelation(_0x5272db){const _0x5c4ccf=a137_0xa216,_0x1b9b11=await apiRequest(_0x5c4ccf(0x16b),{'method':_0x5c4ccf(0x14b),'body':_0x5272db});return _0x1b9b11[_0x5c4ccf(0x18e)];}export async function deleteErRelation(_0x5b28e5){const _0x4a73cc=a137_0xa216,_0x45129e=await apiRequest(_0x4a73cc(0x1cd),{'method':_0x4a73cc(0x14b),'body':_0x5b28e5});return _0x45129e[_0x4a73cc(0x18e)];}function buildQuery(_0x1ee66c){const _0x2930d5=a137_0xa216,_0x3d6d49=new URLSearchParams();for(const [_0xb8b3be,_0x15f8ae]of Object[_0x2930d5(0x186)](_0x1ee66c)){if(_0x15f8ae===undefined||_0x15f8ae==='')continue;_0x3d6d49[_0x2930d5(0x1cf)](_0xb8b3be,String(_0x15f8ae));}const _0x2a2c26=_0x3d6d49[_0x2930d5(0x172)]();return _0x2a2c26?'?'+_0x2a2c26:'';}export async function listDbLinks(_0x2c422e,_0x5be4a7){const _0x38696d=a137_0xa216,_0x3f8d18=await apiRequest(_0x38696d(0x12f),{'method':_0x38696d(0x14b),'body':{'appCode':_0x2c422e,'currentPage':_0x5be4a7?.[_0x38696d(0x178)]??0x1,'pageSize':_0x5be4a7?.['pageSize']??0x64}});return{'items':extractList(_0x3f8d18[_0x38696d(0x18e)]),'paging':extractPaging(_0x3f8d18['data'])};}export async function getDbLinkInfo(_0x30e4d5){const _0x488c31=a137_0xa216,_0x32e068=await apiRequest(_0x488c31(0x1bd)+buildQuery({'id':_0x30e4d5}));return _0x32e068[_0x488c31(0x18e)];}export async function createDbLink(_0xe9c50d){const _0x5976a3=a137_0xa216,_0x4fea5a=await apiRequest(_0x5976a3(0x197),{'method':'POST','body':_0xe9c50d});return _0x4fea5a[_0x5976a3(0x18e)];}export async function updateDbLink(_0x276b1b){const _0x2e1ec2=a137_0xa216,_0x297b87=await apiRequest(_0x2e1ec2(0x148),{'method':_0x2e1ec2(0x14b),'body':_0x276b1b});return _0x297b87[_0x2e1ec2(0x18e)];}export async function deleteDbLink(_0x5eda84){const _0x5496d3=a137_0xa216;await apiRequest(_0x5496d3(0x143),{'method':'POST','body':{'id':_0x5eda84}});}export async function testDbLinkConnect(_0x5dd8cf){const _0x3a9609=a137_0xa216,_0x3b1650=await apiRequest(_0x3a9609(0x1a7)+buildQuery({'id':_0x5dd8cf}));return _0x3b1650[_0x3a9609(0x18e)];}export async function startDbAnalysis(_0x4a1857,_0x1cc509){const _0x3f616d=a137_0xa216,_0xa6496a=await apiRequest('/smartapi/db-analysis/start',{'method':'POST','body':{'dbLinkId':_0x4a1857,..._0x1cc509&&_0x1cc509[_0x3f616d(0x153)]>0x0?{'tableNames':_0x1cc509}:{}}}),_0xad6591=_0xa6496a['data'];if(typeof _0xad6591==='string')return _0xad6591;if(_0xad6591&&typeof _0xad6591===_0x3f616d(0x1a8)&&typeof _0xad6591[_0x3f616d(0x1c0)]===_0x3f616d(0x18a))return _0xad6591[_0x3f616d(0x1c0)];return _0xad6591!=null?String(_0xad6591):'';}export async function cancelDbAnalysis(_0x4c1462){const _0x5bfbcb=a137_0xa216;await apiRequest(_0x5bfbcb(0x185)+buildQuery({'planId':_0x4c1462}),{'method':_0x5bfbcb(0x14b)});}export async function getDbAnalysisStatus(_0x3f528b){const _0x201bb6=a137_0xa216,_0x713e1b=await apiRequest(_0x201bb6(0x17b)+encodeURIComponent(_0x3f528b));return _0x713e1b['data'];}export async function getDbAllTableList(_0xb43720,_0x2cceb6){const _0xbd30ca=a137_0xa216,_0x3a8efd=await apiRequest(_0xbd30ca(0x160)+buildQuery({'appCode':_0xb43720,'dbLinkId':_0x2cceb6})),_0x36c26c=_0x3a8efd['data'];if(Array['isArray'](_0x36c26c))return _0x36c26c;return extractList(_0x36c26c);}export async function getDbTableDiff(_0x565745,_0x3dc9ca,_0x1bc262){const _0x1e2c70=a137_0xa216,_0x438b8f=await apiRequest(_0x1e2c70(0x18b)+buildQuery({'appCode':_0x565745,'dbLinkId':_0x3dc9ca,'pageIndex':_0x1bc262?.[_0x1e2c70(0x171)]??0x1,'pageSize':_0x1bc262?.[_0x1e2c70(0x16d)]??0x14,'tableName':_0x1bc262?.['tableName']})),_0x1c1b8d=_0x438b8f['data'];return{'totalCount':_0x1c1b8d?.['totalCount']??0x0,'tableList':Array['isArray'](_0x1c1b8d?.[_0x1e2c70(0x198)])?_0x1c1b8d['tableList']:[]};}const REMOTE_APP_PAGE_SIZE=0xc8;export async function listRemoteApps(){const _0xb6a8c1=a137_0xa216,_0x5f0b39=await apiRequest(_0xb6a8c1(0x181),{'method':_0xb6a8c1(0x14b),'body':{'currentPage':0x1,'pageSize':REMOTE_APP_PAGE_SIZE}}),_0x46c338=extractList(_0x5f0b39[_0xb6a8c1(0x18e)]),_0x2b74f0=extractPaging(_0x5f0b39[_0xb6a8c1(0x18e)]);return _0x2b74f0&&_0x2b74f0[_0xb6a8c1(0x15a)]>REMOTE_APP_PAGE_SIZE&&console[_0xb6a8c1(0x175)](_0xb6a8c1(0x170)+REMOTE_APP_PAGE_SIZE+'\x20of\x20'+_0x2b74f0[_0xb6a8c1(0x15a)]+_0xb6a8c1(0x15d)+_0xb6a8c1(0x1a6)),_0x46c338;}
1
+ (function(_0xe0ad12,_0xaa3156){const _0x2e172b=a137_0x56d3,_0x125835=_0xe0ad12();while(!![]){try{const _0x57a252=-parseInt(_0x2e172b(0x74))/0x1+parseInt(_0x2e172b(0x80))/0x2*(-parseInt(_0x2e172b(0xa4))/0x3)+parseInt(_0x2e172b(0x82))/0x4*(-parseInt(_0x2e172b(0xdd))/0x5)+parseInt(_0x2e172b(0x9a))/0x6+parseInt(_0x2e172b(0x89))/0x7+-parseInt(_0x2e172b(0xc4))/0x8*(-parseInt(_0x2e172b(0xda))/0x9)+parseInt(_0x2e172b(0x85))/0xa;if(_0x57a252===_0xaa3156)break;else _0x125835['push'](_0x125835['shift']());}catch(_0x362b23){_0x125835['push'](_0x125835['shift']());}}}(a137_0x55c9,0xa854c));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(_0x2e0dae){_activeCookie=_0x2e0dae||undefined;}export function clearActiveCookie(){_activeCookie=undefined;}const DEFAULT_REQUEST_TIMEOUT_MS=0x7530;function createFetchFailureError(_0x552505,_0x170177){const _0x5b05fb=a137_0x56d3,_0x44b5ed=_0x170177 instanceof Error?_0x170177[_0x5b05fb(0xab)]:String(_0x170177);return CliErrors[_0x5b05fb(0x8d)](_0x5b05fb(0xae)+_0x552505+(_0x44b5ed?'\x20('+_0x44b5ed+')':''),_0x5b05fb(0xb4));}async function apiRequest(_0x4cefd1,_0x56d7d3={}){const _0x4110d6=a137_0x56d3,{method:method=_0x4110d6(0x87),body:_0x276323,headers:headers={},timeout:timeout=DEFAULT_REQUEST_TIMEOUT_MS,useRuntime:useRuntime=![]}=_0x56d7d3,_0x49db1f=useRuntime?getRuntimeDomain():getApiDomain(),_0x51d57a=_activeCookie||getCookie(),_0x47949b=''+_0x49db1f+_0x4cefd1,_0x29b23b=new AbortController(),_0x4004ea=setTimeout(()=>_0x29b23b[_0x4110d6(0x9e)](),timeout);try{const _0x2b0e8f=await fetch(_0x47949b,{'method':method,'headers':{'Content-Type':_0x4110d6(0xd9),'Cookie':_0x51d57a,'X-Invoke-Source':_0x4110d6(0x75),...headers},'body':_0x276323?JSON['stringify'](_0x276323):undefined,'signal':_0x29b23b['signal']});let _0x199642;try{_0x199642=await _0x2b0e8f['json']();}catch{throw CliErrors[_0x4110d6(0x8d)](_0x4110d6(0xa2)+_0x2b0e8f[_0x4110d6(0xbf)]+')',_0x2b0e8f[_0x4110d6(0xbf)]>=0x190?'Check\x20your\x20auth\x20cookie\x20and\x20try\x20again.':undefined);}if(!_0x2b0e8f['ok']||_0x199642[_0x4110d6(0x78)]===![])throw CliErrors[_0x4110d6(0x8d)](_0x199642[_0x4110d6(0x91)]||_0x199642['message']||'API\x20error:\x20'+_0x2b0e8f[_0x4110d6(0xbf)],_0x199642[_0x4110d6(0xdf)]?_0x4110d6(0xd3)+_0x199642[_0x4110d6(0xdf)]:undefined);return _0x199642;}catch(_0x4ae75c){if(_0x4ae75c instanceof CliError)throw _0x4ae75c;if(_0x4ae75c instanceof Error&&_0x4ae75c[_0x4110d6(0xed)]===_0x4110d6(0x102))throw CliErrors[_0x4110d6(0x8d)]('Request\x20timeout:\x20'+_0x47949b);throw createFetchFailureError(_0x47949b,_0x4ae75c);}finally{clearTimeout(_0x4004ea);}}function isAuthFailure(_0x10f125){const _0x15712b=a137_0x56d3,_0x38e77b=_0x10f125[_0x15712b(0x91)]||_0x10f125[_0x15712b(0xab)]||_0x10f125[_0x15712b(0x9b)]?.[_0x15712b(0xab)]||_0x10f125[_0x15712b(0xe4)]||_0x10f125[_0x15712b(0xdb)]||'';return _0x10f125[_0x15712b(0xdf)]===_0x15712b(0x73)||_0x10f125[_0x15712b(0xf1)]===0x191||_0x10f125[_0x15712b(0xf1)]===_0x15712b(0xcd)||_0x38e77b[_0x15712b(0x7c)](_0x15712b(0xcd))||_0x38e77b[_0x15712b(0x7c)](_0x15712b(0x6c))||_0x38e77b[_0x15712b(0x7c)]('登录')||_0x38e77b['includes']('认证');}export async function platformFetch(_0x5c2ec9,_0x3dc4d5){const _0x883ab5=a137_0x56d3;let _0x9879f3;try{_0x9879f3=await fetch(_0x5c2ec9,{'method':_0x3dc4d5[_0x883ab5(0xd0)]??_0x883ab5(0x87),'headers':{'Content-Type':_0x883ab5(0xd9),'Cookie':_0x3dc4d5[_0x883ab5(0xd4)]},..._0x3dc4d5[_0x883ab5(0xb0)]&&{'body':JSON[_0x883ab5(0xc3)](_0x3dc4d5[_0x883ab5(0xb0)])}});}catch(_0x2fee9d){throw createFetchFailureError(_0x5c2ec9,_0x2fee9d);}if(!_0x9879f3['ok']){if(_0x9879f3['status']===0x191)throw CliErrors[_0x883ab5(0xc0)]();throw CliErrors[_0x883ab5(0x8d)](_0x3dc4d5[_0x883ab5(0xc2)]+_0x883ab5(0xc8)+_0x9879f3['status']);}const _0x2ee495=await _0x9879f3[_0x883ab5(0x8c)]();if(_0x2ee495[_0x883ab5(0x78)]===![]){if(isAuthFailure(_0x2ee495))throw CliErrors[_0x883ab5(0xc0)]();throw CliErrors[_0x883ab5(0x8d)](_0x2ee495[_0x883ab5(0x91)]||_0x2ee495[_0x883ab5(0xab)]||_0x3dc4d5[_0x883ab5(0xc2)]+'\x20failed');}return _0x2ee495['data'];}export async function listBffScripts(_0x55abb5,_0x3e419b,_0x5eab90){const _0x254bbd=a137_0x56d3;let _0x50cfa6=_0x254bbd(0xff)+_0x55abb5;if(_0x3e419b)_0x50cfa6+=_0x254bbd(0x6d)+_0x3e419b;const _0x440745=await apiRequest(_0x50cfa6);let _0x5cea1c=extractList(_0x440745['data']);if(_0x5eab90?.[_0x254bbd(0xad)]){const _0x1340a8=_0x5eab90[_0x254bbd(0xad)][_0x254bbd(0xbb)]();_0x5cea1c=_0x5cea1c[_0x254bbd(0xeb)](_0x596f6d=>_0x596f6d[_0x254bbd(0xba)]?.['toLowerCase']()['includes'](_0x1340a8)||_0x596f6d[_0x254bbd(0xf8)]?.['toLowerCase']()[_0x254bbd(0x7c)](_0x1340a8));}return _0x5cea1c;}export async function getBffScriptInfo(_0x4b251f){const _0x439606=a137_0x56d3,_0x5a8303=await apiRequest(_0x439606(0x99)+_0x4b251f);if(!_0x5a8303[_0x439606(0x9b)])throw CliErrors[_0x439606(0xca)](_0x439606(0xcc)+_0x4b251f);return _0x5a8303[_0x439606(0x9b)];}export async function saveBffScript(_0x5e750d){const _0x377619=a137_0x56d3,_0x38ad7d=await apiRequest(_0x377619(0x8e),{'method':_0x377619(0x84),'body':_0x5e750d}),{id:_0x263a4a,entity:_0x5a9a81}=normalizeEntityWithIdResponse(_0x38ad7d[_0x377619(0x9b)]);if(_0x263a4a!==undefined){const _0x5d0817=typeof _0x5a9a81['functionName']===_0x377619(0xe9)||typeof _0x5a9a81[_0x377619(0xe2)]===_0x377619(0xe9)?_0x5a9a81:undefined;return{'id':_0x263a4a,'script':_0x5d0817};}throw CliErrors[_0x377619(0x8d)](_0x377619(0x8f));}export async function deleteBffScript(_0x508bbf){const _0x73ddda=a137_0x56d3;await apiRequest(_0x73ddda(0x7d),{'method':'POST','body':{'id':_0x508bbf}});}export async function getBffScriptStatistics(_0x762e9b){const _0x52ad12=a137_0x56d3,_0x34a97f=await apiRequest(_0x52ad12(0xde)+_0x762e9b);return extractList(_0x34a97f[_0x52ad12(0x9b)]);}export async function clearBffScriptCache(){const _0x8b3d9a=a137_0x56d3,_0x468ea8=await apiRequest('/api/management/script/cache/clear',{'method':'POST','useRuntime':!![]});return typeof _0x468ea8['data']===_0x8b3d9a(0xe9)?_0x468ea8[_0x8b3d9a(0x9b)]:'';}export async function listBffDatasetOperations(_0x48874c,_0x434d4f){const _0x9355ce=a137_0x56d3,_0x2d9bc1=await apiRequest('/smartapi/dataset/get-dataset-operation',{'method':'POST','body':{'appCode':_0x48874c,'datasetId':_0x434d4f}});return _0x2d9bc1[_0x9355ce(0x9b)];}export async function listSqlQueries(_0x3008cb,_0xd5d1bf){const _0x97436d=a137_0x56d3,_0x1feb44=await apiRequest(_0x97436d(0xd7),{'method':_0x97436d(0x84),'body':{'appCode':_0x3008cb,'currentPage':_0xd5d1bf?.[_0x97436d(0xe0)]??0x1,'pageSize':_0xd5d1bf?.[_0x97436d(0xe1)]??0x32,'sqlCode':_0xd5d1bf?.[_0x97436d(0xa1)],'sqlName':_0xd5d1bf?.[_0x97436d(0xa5)]}});return _0x1feb44[_0x97436d(0x9b)];}export async function getSqlQueryInfo(_0x10d808,_0x23db77){const _0x11580b=a137_0x56d3,_0x5b1ffc=await listSqlQueries(_0x10d808,{'sqlCode':_0x23db77}),_0x231b92=_0x5b1ffc['tableData']?.[0x0];if(!_0x231b92)throw CliErrors[_0x11580b(0xca)](_0x11580b(0xdc)+_0x23db77);return _0x231b92;}export async function getSqlQueryDetail(_0x14193b){const _0x369e33=a137_0x56d3,_0xd29257=await apiRequest('/smartapi/custom/getUserCustomSql'+(_0x369e33(0xd8)+encodeURIComponent(_0x14193b)));if(!_0xd29257[_0x369e33(0x9b)])throw CliErrors['validation'](_0x369e33(0xdc)+_0x14193b);return _0xd29257[_0x369e33(0x9b)];}export async function getSqlQueryDetailById(_0x1d335b){const _0xba4bfd=a137_0x56d3,_0x53ca2c=await apiRequest('/smartapi/custom/getUserCustomSql?id='+_0x1d335b);if(!_0x53ca2c[_0xba4bfd(0x9b)])throw CliErrors[_0xba4bfd(0xca)](_0xba4bfd(0xc5)+_0x1d335b);return _0x53ca2c[_0xba4bfd(0x9b)];}export async function createSqlQuery(_0x3b1c29){const _0x3e14b6=a137_0x56d3,_0x10a9c1=await apiRequest(_0x3e14b6(0xf3),{'method':_0x3e14b6(0x84),'body':_0x3b1c29}),{id:_0x48fa05,entity:_0x36e37f}=normalizeEntityWithIdResponse(_0x10a9c1[_0x3e14b6(0x9b)]);if(!(_0x3e14b6(0xa1)in _0x36e37f)&&_0x48fa05)return getSqlQueryDetailById(_0x48fa05);return normalizeSqlQueryEntity(_0x36e37f);}export async function updateSqlQuery(_0x36878b){const _0x4b46e8=a137_0x56d3,_0x14ccc5=await apiRequest(_0x4b46e8(0x7e),{'method':'POST','body':_0x36878b}),{id:_0x1e2db5,entity:_0x30aa4b}=normalizeEntityWithIdResponse(_0x14ccc5[_0x4b46e8(0x9b)]);if(!(_0x4b46e8(0xa1)in _0x30aa4b)){if(_0x36878b[_0x4b46e8(0xa1)])return getSqlQueryDetail(_0x36878b[_0x4b46e8(0xa1)]);if(_0x1e2db5)return getSqlQueryDetailById(_0x1e2db5);}return normalizeSqlQueryEntity(_0x30aa4b);}export async function deleteSqlQuery(_0x44b606){const _0x36f248=a137_0x56d3;await apiRequest(_0x36f248(0xb6),{'method':_0x36f248(0x84),'body':_0x44b606});}export async function saveSqlQuery(_0xf4b205){const _0x421ba6=a137_0x56d3,_0x530118=await apiRequest(_0x421ba6(0xfd),{'method':'POST','body':_0xf4b205});return _0x530118[_0x421ba6(0x9b)];}function normalizeSqlQueryEntity(_0x1e40ff){const _0x579786=a137_0x56d3;return{..._0x1e40ff,'id':Number(_0x1e40ff['id']),'dbId':_0x1e40ff[_0x579786(0xb5)]==null?undefined:Number(_0x1e40ff[_0x579786(0xb5)]),'version':_0x1e40ff[_0x579786(0x90)]==null?undefined:Number(_0x1e40ff[_0x579786(0x90)])};}export async function executeSql(_0x3b0913,_0x1ec8ca,_0x5ddc81){const _0x2055f4=a137_0x56d3,_0x14869d=await apiRequest('/api/custom/executeSql',{'method':_0x2055f4(0x84),'body':{'appCode':_0x3b0913,'sqlCode':_0x1ec8ca,..._0x5ddc81&&{'params':_0x5ddc81}},'useRuntime':!![]});return _0x14869d[_0x2055f4(0x9b)];}export async function executeDatasetDataOperation(_0x230fb6,_0x1c916f,_0x4568d9,_0x537b16={}){const _0xaf8c66=a137_0x56d3;try{const _0x1902ba=await apiRequest('/api/'+_0x230fb6+'/'+_0x1c916f+'/'+_0x4568d9,{'method':_0xaf8c66(0x84),'body':_0x537b16,'useRuntime':!![]});return _0x1902ba[_0xaf8c66(0x9b)];}catch(_0x4c0153){if(_0x4568d9==='getOne'&&_0x4c0153 instanceof CliError&&_0x4c0153['code']==='api_error'&&_0x537b16['id']!==undefined&&_0x537b16['id']!==null&&_0x537b16['id']!==''){const _0x4c6dcf=await apiRequest(_0xaf8c66(0xc9)+_0x230fb6+'/'+_0x1c916f+_0xaf8c66(0xb8),{'method':'POST','body':{'where':{'id':{'$eq':_0x537b16['id']}},'currentPage':0x1,'pageSize':0x1},'useRuntime':!![]}),_0x64e9fd=Array[_0xaf8c66(0x104)](_0x4c6dcf[_0xaf8c66(0x9b)]?.[_0xaf8c66(0x100)])?_0x4c6dcf[_0xaf8c66(0x9b)][_0xaf8c66(0x100)]:[];return _0x64e9fd[0x0]??null;}throw _0x4c0153;}}export async function listDatasets(_0x3df7c9,_0x29131a){const _0xdab887=a137_0x56d3,_0x437058={'appCode':_0x3df7c9,'deleted':![]};if(_0x29131a?.['code'])_0x437058[_0xdab887(0xf1)]=_0x29131a[_0xdab887(0xf1)];if(_0x29131a?.[_0xdab887(0xed)])_0x437058[_0xdab887(0xed)]=_0x29131a[_0xdab887(0xed)];const _0x8ddc65=await apiRequest(_0xdab887(0x7b),{'method':_0xdab887(0x84),'body':_0x437058});return extractList(_0x8ddc65[_0xdab887(0x9b)]);}export async function deleteDataset(_0x7e8de5,_0x4d39a6){const _0x4d2943=a137_0x56d3;await apiRequest(_0x4d2943(0x79),{'method':_0x4d2943(0x84),'body':{'appCode':_0x7e8de5,'datasetId':_0x4d39a6}});}export async function searchDatasets(_0x33af3d,_0xd25c92){const _0x23b013=a137_0x56d3,_0x32dffd=await listDatasets(_0x33af3d,{'name':_0xd25c92}),_0x486abf=_0xd25c92[_0x23b013(0xbb)](),_0x5a12da=new Set(_0x32dffd[_0x23b013(0xb2)](_0x492bf6=>_0x492bf6['id'])),_0x4eeb67=_0x32dffd[_0x23b013(0xeb)](_0x333205=>_0x333205[_0x23b013(0x71)]?.[_0x23b013(0xb3)]?.[_0x23b013(0xbb)]()[_0x23b013(0x7c)](_0x486abf)||_0x333205[_0x23b013(0xf8)]?.[_0x23b013(0xbb)]()[_0x23b013(0x7c)](_0x486abf)),_0x4634df=await listDatasets(_0x33af3d,{'code':_0xd25c92});for(const _0x430dea of _0x4634df){!_0x5a12da['has'](_0x430dea['id'])&&(_0x32dffd[_0x23b013(0xf0)](_0x430dea),_0x5a12da[_0x23b013(0xfe)](_0x430dea['id']));}return _0x32dffd;}export function normalizeDatasetOperations(_0x45d42c){const _0x473bbe=a137_0x56d3;if(Array[_0x473bbe(0x104)](_0x45d42c))return _0x45d42c[_0x473bbe(0xeb)](_0x472b0d=>_0x472b0d!=null&&typeof _0x472b0d==='object');if(_0x45d42c&&typeof _0x45d42c==='object')return Object[_0x473bbe(0x6e)](_0x45d42c)['filter'](([,_0xbcacec])=>_0xbcacec!=null&&typeof _0xbcacec===_0x473bbe(0xaa))[_0x473bbe(0xb2)](([_0xea962b,_0x330309])=>({..._0x330309,'name':_0x330309[_0x473bbe(0xed)]??_0x330309[_0x473bbe(0xf4)]??_0xea962b}));return[];}export async function getDatasetDetail(_0xe750e6){const _0x3fe121=a137_0x56d3,_0x3a810d=/^\d+$/['test'](_0xe750e6)?'id':_0x3fe121(0xf1),_0x4a75df=await apiRequest(_0x3fe121(0xa6)+_0x3a810d+'='+_0xe750e6);return _0x4a75df[_0x3fe121(0x9b)];}export async function getDatasetOperations(_0x5bd569){const _0x51236c=a137_0x56d3,_0x2a6ef6=await getDatasetDetail(_0x5bd569),_0x3ccfd6=normalizeDatasetOperations(_0x2a6ef6[_0x51236c(0x8b)])[_0x51236c(0xb2)](_0x467bc4=>({'name':_0x467bc4[_0x51236c(0xed)]||_0x467bc4['operationName'],'displayName':_0x467bc4['displayName']||_0x467bc4['name'],'type':_0x467bc4['type'],'method':_0x467bc4[_0x51236c(0xd0)],'path':_0x467bc4[_0x51236c(0xbe)],'enabled':_0x467bc4[_0x51236c(0xd2)]??!![],'requestFields':_0x467bc4[_0x51236c(0xf6)],'responseFields':_0x467bc4[_0x51236c(0xe6)]}));return{'dataset':{'id':_0x2a6ef6['id']??_0x2a6ef6[_0x51236c(0x83)],'name':_0x2a6ef6[_0x51236c(0xed)],'code':_0x2a6ef6[_0x51236c(0xf1)]||_0x2a6ef6[_0x51236c(0xfc)],'tableName':_0x2a6ef6[_0x51236c(0xb3)]||_0x2a6ef6[_0x51236c(0x71)]?.['tableName']},'operations':_0x3ccfd6};}function a137_0x55c9(){const _0x116a7f=['json','apiError','/api/management/library/scripts/save','BFF\x20save\x20returned\x20no\x20valid\x20id','version','errorMsg','/smartapi/dblink/delete','\x22\x20not\x20found\x20in\x20dataset\x20','/smartapi/dblink/create','/smartapi/dblink/testConnect','update','(/*\x20params\x20*/);','const\x20client\x20=\x20new\x20LovrabetClient({\x20appCode:\x20\x27<YOUR_APP_CODE>\x27\x20});','/api/management/library/scripts/info?id=','6930456vSjzwi','data','/smartapi/dblink/getList','/smartapi/dblink/getTableDiffV2ByPage','abort','/smartapi/dblink/getAllTableList','totalCount','sqlCode','API\x20returned\x20non-JSON\x20response\x20(HTTP\x20','includeImports','1899831IwbIMe','sqlName','/smartapi/dataset/get-driven-data?','planId','/smartapi/db-analysis/status/','/sync-to-pages','object','message','/smartapi/dblink/update','scriptName','Request\x20failed:\x20','join','body','/smartapi/question/er-config/update-single','map','tableName','Check\x20network\x20connectivity\x20and\x20try\x20again.','dbId','/smartapi/custom/deleteUserCustomSql','operationId','/filter','//\x20BFF\x20context:\x20context.client.sql.execute\x20returns\x20rows\x20directly','functionName','toLowerCase','});','\x20\x20sqlCode:\x20\x27','path','status','authRequired','Operation\x20\x22','label','stringify','4485512QpHknY','SQL\x20query\x20not\x20found:\x20id=','\x20of\x20','test','\x20failed,\x20HTTP\x20','/api/','validation','warn','BFF\x20script\x20not\x20found:\x20id=','401','/smartapi/app/getList','Warning:\x20showing\x20first\x20','method','\x20\x20});','enabled','API\x20error\x20code:\x20','cookie','toString','.update(id,\x20{\x20/*\x20fields\x20*/\x20});','/smartapi/custom/queryUserCustomSqlList','?sqlCode=','application/json','9RArVtK','error','SQL\x20query\x20not\x20found:\x20','5oksfRJ','/api/management/library/scripts/statistics?appCode=','errorCode','currentPage','pageSize','scriptType','//\x20','errorMessage','/smartapi/lovrabet/dataset/','responseFields','Use\x20the\x20platform\x20console\x20to\x20see\x20all.','api_error','string','target','filter','/generate-standard-pages/start','name','dataset_','import\x20{\x20LovrabetClient\x20}\x20from\x20\x27@lovrabet/sdk\x27;','push','code','.filter({','/smartapi/custom/saveUserCustomSql','operationName','/standard-page-status?appCode=','requestFields','getOne','description','\x20\x20where:\x20{},','Page\x20not\x20found:\x20','const\x20results\x20=\x20data.execResult\x20||\x20[];','modelCode','/api/node-toolbox/sql/save','add','/api/management/library/scripts/list?appCode=','tableData','find','AbortError','clientOperationId','isArray','/smartapi/question/er-config','sdk','.create({\x20/*\x20fields\x20*/\x20});','/generate-standard-pages/status?','Unauthorized','&type=','entries','/smartapi/db-analysis/jobs/cancel','//\x20SQL:\x20','dbtableConfig','length','UNAUTHORIZED','414460MFRclQ','cli:rabetbase','\x20\x20const\x20rows\x20=\x20await\x20context.client.sql.execute({','const\x20result\x20=\x20await\x20client.models.','success','/smartapi/dataset/delete-dataset','tableList','/smartapi/dataset/get-dataset-list','includes','/api/management/library/scripts/delete','/smartapi/custom/updateUserCustomSql','.getOne(id);','2pluOPk','\x20\x20\x20\x20params:\x20{\x20/*\x20parameter\x20values\x20*/\x20},','4899292rVMpvm','modelId','POST','3761570ZgmfWt','/smartapi/db-analysis/start','GET','\x20\x20return\x20rows;','6090854JGpqIY','set','operations'];a137_0x55c9=function(){return _0x116a7f;};return a137_0x55c9();}export async function getOperationDetail(_0x7ba726,_0x661da8,_0x532b64){const _0x2ea3d2=a137_0x56d3;let _0x315db9=_0x661da8;if(!/^\d+$/['test'](_0x661da8)){const _0x11f868=await listDatasets(_0x7ba726,{'code':_0x661da8}),_0x3eaa2c=_0x11f868[_0x2ea3d2(0x101)](_0x91a154=>_0x91a154[_0x2ea3d2(0xf1)]===_0x661da8||String(_0x91a154['id'])===_0x661da8);if(!_0x3eaa2c)throw CliErrors[_0x2ea3d2(0xca)]('Dataset\x20not\x20found:\x20'+_0x661da8);_0x315db9=String(_0x3eaa2c['id']);}const _0x752738=await getDatasetDetail(_0x315db9),_0x410ef8=normalizeDatasetOperations(_0x752738[_0x2ea3d2(0x8b)])[_0x2ea3d2(0x101)](_0x49b9df=>(_0x49b9df[_0x2ea3d2(0xed)]||_0x49b9df[_0x2ea3d2(0xf4)])===_0x532b64);if(!_0x410ef8)throw CliErrors[_0x2ea3d2(0xca)](_0x2ea3d2(0xc1)+_0x532b64+_0x2ea3d2(0x93)+_0x661da8);return{'dataset':{'id':_0x752738['id']??_0x752738[_0x2ea3d2(0x83)],'name':_0x752738[_0x2ea3d2(0xed)],'code':_0x752738[_0x2ea3d2(0xf1)]||_0x752738[_0x2ea3d2(0xfc)],'tableName':_0x752738[_0x2ea3d2(0xb3)]||_0x752738[_0x2ea3d2(0x71)]?.['tableName']},'operation':_0x410ef8};}export async function startGenerateStandardPages(_0x145a72,_0x5c219b,_0x5e0b32){const _0x2ceb5f=a137_0x56d3,_0x4f1536=await apiRequest(_0x2ceb5f(0xe5)+_0x5c219b+_0x2ceb5f(0xec),{'method':_0x2ceb5f(0x84),'body':{'appCode':_0x145a72,..._0x5e0b32?.['clientOperationId']?{'clientOperationId':_0x5e0b32[_0x2ceb5f(0x103)]}:{}},'timeout':DEFAULT_REQUEST_TIMEOUT_MS});return _0x4f1536['data'];}export async function getGenerateStandardPagesStatus(_0x548ee3,_0x1e8d5d,_0xdbe5e4){const _0x599b77=a137_0x56d3,_0x50fea4=new URLSearchParams({'appCode':_0x548ee3});_0xdbe5e4[_0x599b77(0xb7)]&&_0x50fea4[_0x599b77(0x8a)](_0x599b77(0xb7),_0xdbe5e4[_0x599b77(0xb7)]);_0xdbe5e4['clientOperationId']&&_0x50fea4['set'](_0x599b77(0x103),_0xdbe5e4[_0x599b77(0x103)]);const _0x101608=await apiRequest(_0x599b77(0xe5)+_0x1e8d5d+_0x599b77(0x6b)+_0x50fea4[_0x599b77(0xd5)]());return _0x101608[_0x599b77(0x9b)];}export async function getStandardPageStatus(_0x1cccfb,_0x5f0186){const _0x9fc527=a137_0x56d3,_0x7b1326=await apiRequest('/smartapi/lovrabet/dataset/'+_0x5f0186+_0x9fc527(0xf5)+encodeURIComponent(_0x1cccfb));return _0x7b1326['data'];}export async function tryGetStandardPageStatus(_0x56a0f5,_0x54e907){const _0x3f8ce2=a137_0x56d3;try{return await getStandardPageStatus(_0x56a0f5,_0x54e907);}catch(_0xbbef70){if(_0xbbef70 instanceof CliError&&_0xbbef70['code']===_0x3f8ce2(0xe8)&&/404|not found|non-json response/i[_0x3f8ce2(0xc7)](_0xbbef70['message']))return null;throw _0xbbef70;}}function a137_0x56d3(_0x564266,_0x22e734){_0x564266=_0x564266-0x6a;const _0x55c950=a137_0x55c9();let _0x56d39b=_0x55c950[_0x564266];return _0x56d39b;}export async function syncStandardPages(_0x6cf86a,_0x327a25){const _0x6155d0=a137_0x56d3,_0x11d5b2=await apiRequest('/smartapi/lovrabet/dataset/'+_0x327a25+_0x6155d0(0xa9),{'method':_0x6155d0(0x84),'body':{'appCode':_0x6cf86a}});return _0x11d5b2[_0x6155d0(0x9b)];}export async function getPageDetail(_0x5692b2){const _0x3837d9=a137_0x56d3,_0x21e7b2=await apiRequest('/smartapi/lovrabet/detail?pageId='+_0x5692b2);if(!_0x21e7b2[_0x3837d9(0x9b)])throw CliErrors['validation'](_0x3837d9(0xfa)+_0x5692b2);return _0x21e7b2[_0x3837d9(0x9b)];}export async function updatePage(_0x147118,_0x809f,_0x126dfa,_0x11a97c){const _0x974599=a137_0x56d3,_0x1fffc1=await apiRequest('/smartapi/lovrabet/update-page',{'method':_0x974599(0x84),'body':{'appCode':_0x147118,'pageId':_0x809f,'code':_0x126dfa,'datasetIds':_0x11a97c}});return _0x1fffc1[_0x974599(0x9b)];}export function generateSdkCode(_0x424635,_0x23d26e,_0x557e2d){const _0x390cb7=a137_0x56d3,_0x323786=_0x557e2d?.['includeImports']??!![],_0x137de3=_0x390cb7(0xee)+_0x424635[_0x390cb7(0xf1)]?.['replace'](/-/g,'_'),_0x376b73=_0x23d26e[_0x390cb7(0xed)]||_0x23d26e['operationName']||'filter',_0x122c0f=[];_0x323786&&_0x122c0f[_0x390cb7(0xf0)](_0x390cb7(0xef),'','const\x20client\x20=\x20new\x20LovrabetClient({\x20appCode:\x20\x27<YOUR_APP_CODE>\x27\x20});','');_0x122c0f[_0x390cb7(0xf0)](_0x390cb7(0xe3)+_0x424635[_0x390cb7(0xed)]+'\x20('+(_0x424635[_0x390cb7(0xb3)]||'table')+')');if(_0x376b73==='filter')_0x122c0f['push'](_0x390cb7(0x77)+_0x137de3+_0x390cb7(0xf2),_0x390cb7(0xf9),'\x20\x20pageSize:\x2020,','\x20\x20currentPage:\x201,',_0x390cb7(0xbc));else{if(_0x376b73===_0x390cb7(0xf7))_0x122c0f['push'](_0x390cb7(0x77)+_0x137de3+_0x390cb7(0x7f));else{if(_0x376b73==='create')_0x122c0f[_0x390cb7(0xf0)]('const\x20result\x20=\x20await\x20client.models.'+_0x137de3+_0x390cb7(0x6a));else{if(_0x376b73===_0x390cb7(0x96))_0x122c0f[_0x390cb7(0xf0)](_0x390cb7(0x77)+_0x137de3+_0x390cb7(0xd6));else _0x376b73==='delete'||_0x376b73==='remove'?_0x122c0f['push'](_0x390cb7(0x77)+_0x137de3+'.remove(id);'):_0x122c0f[_0x390cb7(0xf0)](_0x390cb7(0x77)+_0x137de3+'.'+_0x376b73+_0x390cb7(0x97));}}}return _0x122c0f[_0x390cb7(0xaf)]('\x0a');}export function generateSqlCodeTemplate(_0x35145b,_0x62f73d){const _0x48a57b=a137_0x56d3,_0x2b2889=_0x62f73d?.[_0x48a57b(0xea)]??'sdk',_0x1b4522=_0x62f73d?.[_0x48a57b(0xa3)]??!![],_0x1da266=[];return _0x1da266[_0x48a57b(0xf0)](_0x48a57b(0x70)+_0x35145b[_0x48a57b(0xa5)]+'\x20('+_0x35145b[_0x48a57b(0xa1)]+')'),_0x2b2889===_0x48a57b(0x106)?(_0x1b4522&&_0x1da266[_0x48a57b(0xf0)]('import\x20{\x20LovrabetClient\x20}\x20from\x20\x27@lovrabet/sdk\x27;','',_0x48a57b(0x98),''),_0x1da266['push']('const\x20data\x20=\x20await\x20client.sql.execute({',_0x48a57b(0xbd)+_0x35145b[_0x48a57b(0xa1)]+'\x27,','\x20\x20params:\x20{\x20/*\x20parameter\x20values\x20*/\x20},',_0x48a57b(0xbc),'if\x20(!data.execSuccess)\x20throw\x20new\x20Error(\x27SQL\x20execution\x20failed\x27);',_0x48a57b(0xfb))):_0x1da266[_0x48a57b(0xf0)](_0x48a57b(0xb9),'export\x20default\x20async\x20function\x20handler(params,\x20context)\x20{',_0x48a57b(0x76),'\x20\x20\x20\x20sqlCode:\x20\x27'+_0x35145b[_0x48a57b(0xa1)]+'\x27,',_0x48a57b(0x81),_0x48a57b(0xd1),_0x48a57b(0x88),'}'),_0x1da266[_0x48a57b(0xaf)]('\x0a');}export async function getErConfig(_0xea43b,_0x2cff81){const _0x49b19c=a137_0x56d3,_0xe01e83=await apiRequest(_0x49b19c(0x105),{'method':_0x49b19c(0x84),'body':{'appCode':_0xea43b,'dblinkId':_0x2cff81}});return _0xe01e83[_0x49b19c(0x9b)];}export async function createErRelation(_0x58ee72){const _0x5b65a8=a137_0x56d3,_0x524730=await apiRequest('/smartapi/question/er-config/erCreate',{'method':_0x5b65a8(0x84),'body':_0x58ee72});return _0x524730[_0x5b65a8(0x9b)];}export async function updateErRelation(_0x2e4fa9){const _0x242885=a137_0x56d3,_0x4fd816=await apiRequest(_0x242885(0xb1),{'method':'POST','body':_0x2e4fa9});return _0x4fd816[_0x242885(0x9b)];}export async function deleteErRelation(_0x1f12f2){const _0x9980e4=a137_0x56d3,_0x373f07=await apiRequest('/smartapi/question/er-config/erDelete',{'method':'POST','body':_0x1f12f2});return _0x373f07[_0x9980e4(0x9b)];}function buildQuery(_0x16f66e){const _0x47830a=a137_0x56d3,_0x2c964e=new URLSearchParams();for(const [_0x267668,_0x449c77]of Object[_0x47830a(0x6e)](_0x16f66e)){if(_0x449c77===undefined||_0x449c77==='')continue;_0x2c964e[_0x47830a(0x8a)](_0x267668,String(_0x449c77));}const _0x558c77=_0x2c964e['toString']();return _0x558c77?'?'+_0x558c77:'';}export async function listDbLinks(_0x35ed2f,_0x443b2f){const _0x3e0364=a137_0x56d3,_0x30c7db=await apiRequest(_0x3e0364(0x9c),{'method':_0x3e0364(0x84),'body':{'appCode':_0x35ed2f,'currentPage':_0x443b2f?.[_0x3e0364(0xe0)]??0x1,'pageSize':_0x443b2f?.[_0x3e0364(0xe1)]??0x64}});return{'items':extractList(_0x30c7db[_0x3e0364(0x9b)]),'paging':extractPaging(_0x30c7db['data'])};}export async function getDbLinkInfo(_0x82deff){const _0x445ecc=a137_0x56d3,_0x13d268=await apiRequest('/smartapi/dblink/getOne'+buildQuery({'id':_0x82deff}));return _0x13d268[_0x445ecc(0x9b)];}export async function createDbLink(_0x419cf6){const _0x4fd2a0=a137_0x56d3,_0xd3a166=await apiRequest(_0x4fd2a0(0x94),{'method':_0x4fd2a0(0x84),'body':_0x419cf6});return _0xd3a166['data'];}export async function updateDbLink(_0x3cd68b){const _0x1d5095=a137_0x56d3,_0x19698c=await apiRequest(_0x1d5095(0xac),{'method':_0x1d5095(0x84),'body':_0x3cd68b});return _0x19698c[_0x1d5095(0x9b)];}export async function deleteDbLink(_0x48d8f8){const _0x4dc959=a137_0x56d3;await apiRequest(_0x4dc959(0x92),{'method':_0x4dc959(0x84),'body':{'id':_0x48d8f8}});}export async function testDbLinkConnect(_0x2a4a75){const _0x170ad5=a137_0x56d3,_0x107a50=await apiRequest(_0x170ad5(0x95)+buildQuery({'id':_0x2a4a75}));return _0x107a50[_0x170ad5(0x9b)];}export async function startDbAnalysis(_0x221ea0,_0x4380f9){const _0x1a5caf=a137_0x56d3,_0x499202=await apiRequest(_0x1a5caf(0x86),{'method':_0x1a5caf(0x84),'body':{'dbLinkId':_0x221ea0,..._0x4380f9&&_0x4380f9[_0x1a5caf(0x72)]>0x0?{'tableNames':_0x4380f9}:{}}}),_0x31a8f6=_0x499202[_0x1a5caf(0x9b)];if(typeof _0x31a8f6===_0x1a5caf(0xe9))return _0x31a8f6;if(_0x31a8f6&&typeof _0x31a8f6===_0x1a5caf(0xaa)&&typeof _0x31a8f6['planId']===_0x1a5caf(0xe9))return _0x31a8f6[_0x1a5caf(0xa7)];return _0x31a8f6!=null?String(_0x31a8f6):'';}export async function cancelDbAnalysis(_0x2e3fe6){const _0x3f0e13=a137_0x56d3;await apiRequest(_0x3f0e13(0x6f)+buildQuery({'planId':_0x2e3fe6}),{'method':_0x3f0e13(0x84)});}export async function getDbAnalysisStatus(_0x2389bd){const _0x28e59a=a137_0x56d3,_0x350266=await apiRequest(_0x28e59a(0xa8)+encodeURIComponent(_0x2389bd));return _0x350266['data'];}export async function getDbAllTableList(_0x2c8f87,_0x5e3f94){const _0x44ffba=a137_0x56d3,_0x1da473=await apiRequest(_0x44ffba(0x9f)+buildQuery({'appCode':_0x2c8f87,'dbLinkId':_0x5e3f94})),_0x4f32bb=_0x1da473[_0x44ffba(0x9b)];if(Array[_0x44ffba(0x104)](_0x4f32bb))return _0x4f32bb;return extractList(_0x4f32bb);}export async function getDbTableDiff(_0x409287,_0x28dd36,_0x480339){const _0x5290ac=a137_0x56d3,_0x3b8c05=await apiRequest(_0x5290ac(0x9d)+buildQuery({'appCode':_0x409287,'dbLinkId':_0x28dd36,'pageIndex':_0x480339?.['pageIndex']??0x1,'pageSize':_0x480339?.[_0x5290ac(0xe1)]??0x14,'tableName':_0x480339?.[_0x5290ac(0xb3)]})),_0x2dc935=_0x3b8c05['data'];return{'totalCount':_0x2dc935?.[_0x5290ac(0xa0)]??0x0,'tableList':Array[_0x5290ac(0x104)](_0x2dc935?.[_0x5290ac(0x7a)])?_0x2dc935[_0x5290ac(0x7a)]:[]};}const REMOTE_APP_PAGE_SIZE=0xc8;export async function listRemoteApps(){const _0x25729f=a137_0x56d3,_0x192646=await apiRequest(_0x25729f(0xce),{'method':_0x25729f(0x84),'body':{'currentPage':0x1,'pageSize':REMOTE_APP_PAGE_SIZE}}),_0x44543f=extractList(_0x192646[_0x25729f(0x9b)]),_0x1a1037=extractPaging(_0x192646[_0x25729f(0x9b)]);return _0x1a1037&&_0x1a1037[_0x25729f(0xa0)]>REMOTE_APP_PAGE_SIZE&&console[_0x25729f(0xcb)](_0x25729f(0xcf)+REMOTE_APP_PAGE_SIZE+_0x25729f(0xc6)+_0x1a1037[_0x25729f(0xa0)]+'\x20apps.\x20'+_0x25729f(0xe7)),_0x44543f;}
@@ -1 +1 @@
1
- const a138_0x28191b=a138_0x24e7;(function(_0x24a8ab,_0x4f2267){const _0x4b1f74=a138_0x24e7,_0x2b1859=_0x24a8ab();while(!![]){try{const _0x4a570c=-parseInt(_0x4b1f74(0xd2))/0x1+-parseInt(_0x4b1f74(0xd4))/0x2*(parseInt(_0x4b1f74(0xcf))/0x3)+parseInt(_0x4b1f74(0xd6))/0x4+parseInt(_0x4b1f74(0xd1))/0x5*(-parseInt(_0x4b1f74(0xd0))/0x6)+-parseInt(_0x4b1f74(0xd5))/0x7+parseInt(_0x4b1f74(0xce))/0x8*(-parseInt(_0x4b1f74(0xd3))/0x9)+parseInt(_0x4b1f74(0xcd))/0xa*(parseInt(_0x4b1f74(0xd7))/0xb);if(_0x4a570c===_0x4f2267)break;else _0x2b1859['push'](_0x2b1859['shift']());}catch(_0x290870){_0x2b1859['push'](_0x2b1859['shift']());}}}(a138_0x295c,0xafc2c));import{resolve}from'node:path';function a138_0x295c(){const _0x1f2125=['9clzJoi','862254soUeoW','5434219smJLZM','3272056VTNzmU','1715945AsynCs','/bff','bff-trash','.rabetbase','bff.lock.json','bff','220AXRUjL','6473168Faruwn','9cGAinu','23028dyrSZO','215iSYpvD','486110mFirTF'];a138_0x295c=function(){return _0x1f2125;};return a138_0x295c();}import{findProjectRootDirectory}from'../../context.js';const DOT_DIR=a138_0x28191b(0xda),LOCK_FILE_NAME=a138_0x28191b(0xcb),TRASH_DIR_NAME=a138_0x28191b(0xd9);function a138_0x24e7(_0xa95bab,_0x7e3010){_0xa95bab=_0xa95bab-0xcb;const _0x295c91=a138_0x295c();let _0x24e7c8=_0x295c91[_0xa95bab];return _0x24e7c8;}export function loadBffProjectConfig(_0x3ef69b,_0x33d08b){const _0x1346d4=a138_0x28191b,_0x271764=resolve(_0x33d08b??findProjectRootDirectory()),_0x92c0d7=DOT_DIR+_0x1346d4(0xd8),_0x13638d=_0x92c0d7+'/'+_0x3ef69b;return{'projectRoot':_0x271764,'appCode':_0x3ef69b,'scriptsBaseDir':DOT_DIR,'scriptsWorkspaceRoot':_0x92c0d7,'scriptsRoot':_0x13638d,'scriptsRootDir':resolve(_0x271764,DOT_DIR,_0x1346d4(0xcc),_0x3ef69b),'lockFilePath':resolve(_0x271764,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x271764,DOT_DIR,TRASH_DIR_NAME)};}
1
+ const a138_0xb98a9f=a138_0x9a47;(function(_0x606172,_0x53b4b0){const _0x5640e4=a138_0x9a47,_0x1c980f=_0x606172();while(!![]){try{const _0x36223b=parseInt(_0x5640e4(0x170))/0x1+parseInt(_0x5640e4(0x171))/0x2*(parseInt(_0x5640e4(0x16a))/0x3)+parseInt(_0x5640e4(0x16e))/0x4+-parseInt(_0x5640e4(0x173))/0x5+-parseInt(_0x5640e4(0x16b))/0x6*(-parseInt(_0x5640e4(0x168))/0x7)+parseInt(_0x5640e4(0x172))/0x8+-parseInt(_0x5640e4(0x16c))/0x9;if(_0x36223b===_0x53b4b0)break;else _0x1c980f['push'](_0x1c980f['shift']());}catch(_0x2f2851){_0x1c980f['push'](_0x1c980f['shift']());}}}(a138_0x8d90,0xeff4e));import{resolve}from'node:path';function a138_0x8d90(){const _0x511f1c=['7496736akTabd','/bff','1293087idNWsx','154NzQOFm','14061560JabJcx','2018740GHMkns','bff.lock.json','bff','39221GVQHro','.rabetbase','30714jrYKDA','1074sttChK','47966571Bungoq','bff-trash'];a138_0x8d90=function(){return _0x511f1c;};return a138_0x8d90();}import{findProjectRootDirectory}from'../../context.js';const DOT_DIR=a138_0xb98a9f(0x169),LOCK_FILE_NAME=a138_0xb98a9f(0x174),TRASH_DIR_NAME=a138_0xb98a9f(0x16d);function a138_0x9a47(_0x396d37,_0x5f4ae1){_0x396d37=_0x396d37-0x167;const _0x8d90d0=a138_0x8d90();let _0x9a47a6=_0x8d90d0[_0x396d37];return _0x9a47a6;}export function loadBffProjectConfig(_0x4c2aba,_0x2c00a0){const _0x33eb9a=a138_0xb98a9f,_0x13c97d=resolve(_0x2c00a0??findProjectRootDirectory()),_0xc99576=DOT_DIR+_0x33eb9a(0x16f),_0x259dc0=_0xc99576+'/'+_0x4c2aba;return{'projectRoot':_0x13c97d,'appCode':_0x4c2aba,'scriptsBaseDir':DOT_DIR,'scriptsWorkspaceRoot':_0xc99576,'scriptsRoot':_0x259dc0,'scriptsRootDir':resolve(_0x13c97d,DOT_DIR,_0x33eb9a(0x167),_0x4c2aba),'lockFilePath':resolve(_0x13c97d,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x13c97d,DOT_DIR,TRASH_DIR_NAME)};}
@@ -1 +1 @@
1
- const a139_0x28d669=a139_0x4282;(function(_0x510c38,_0x1cba9a){const _0xb76d43=a139_0x4282,_0x28d2d6=_0x510c38();while(!![]){try{const _0xb5eab1=parseInt(_0xb76d43(0x7f))/0x1+parseInt(_0xb76d43(0x82))/0x2+-parseInt(_0xb76d43(0x69))/0x3*(-parseInt(_0xb76d43(0x6d))/0x4)+-parseInt(_0xb76d43(0x6f))/0x5*(parseInt(_0xb76d43(0x67))/0x6)+parseInt(_0xb76d43(0x80))/0x7*(parseInt(_0xb76d43(0x72))/0x8)+parseInt(_0xb76d43(0x78))/0x9+-parseInt(_0xb76d43(0x88))/0xa;if(_0xb5eab1===_0x1cba9a)break;else _0x28d2d6['push'](_0x28d2d6['shift']());}catch(_0x5bf265){_0x28d2d6['push'](_0x28d2d6['shift']());}}}(a139_0x537e,0x91843));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=[a139_0x28d669(0x6e),a139_0x28d669(0x77),a139_0x28d669(0x8a)];export function normalizeBffType(_0x1f6d87){const _0x5d9a11=a139_0x28d669;if(!_0x1f6d87)return undefined;const _0x198dce=_0x1f6d87[_0x5d9a11(0x8d)]()[_0x5d9a11(0x8c)]();return SUPPORTED_BFF_TYPES[_0x5d9a11(0x76)](_0x198dce)?_0x198dce:undefined;}async function scanJsFilesRecursively(_0x31efad,_0x489b6d){const _0x174f56=a139_0x28d669,_0x377c62=[];try{const _0x531960=await readdir(_0x31efad,{'withFileTypes':!![]});for(const _0x1dece3 of _0x531960){const _0xf8414c=join(_0x31efad,_0x1dece3[_0x174f56(0x81)]);if(_0x1dece3[_0x174f56(0x73)]())_0x377c62[_0x174f56(0x85)](...await scanJsFilesRecursively(_0xf8414c,_0x489b6d+'/'+_0x1dece3[_0x174f56(0x81)]));else _0x1dece3[_0x174f56(0x74)]()&&_0x1dece3[_0x174f56(0x81)][_0x174f56(0x71)]('.js')&&_0x377c62[_0x174f56(0x85)]({'lockKey':_0x489b6d+'/'+_0x1dece3[_0x174f56(0x81)][_0x174f56(0x86)](/\.js$/,''),'filePath':_0xf8414c});}}catch(_0x4cad33){if(_0x4cad33[_0x174f56(0x7b)]!=='ENOENT')throw _0x4cad33;}return _0x377c62;}async function scanFlatFunctions(_0x4f928a,_0x456979){const _0x2e4152=a139_0x28d669,_0x35ea98=join(_0x4f928a['scriptsRootDir'],_0x456979),_0x3cb2f5=await scanJsFilesRecursively(_0x35ea98,_0x456979);return _0x3cb2f5[_0x2e4152(0x87)](({lockKey:_0x336c51,filePath:_0x5b2db2})=>({'type':_0x456979,'name':_0x336c51[_0x2e4152(0x7d)]('/')['at'](-0x1)??'','filePath':_0x5b2db2,'lockKey':_0x336c51}));}async function scanHookFunctions(_0xc8d6b){const _0x40a05e=a139_0x28d669,_0x1c7e3f=join(_0xc8d6b[_0x40a05e(0x68)],'HOOK'),_0x41c037=[];try{const _0xf5c1c9=await readdir(_0x1c7e3f,{'withFileTypes':!![]});for(const _0x48e2e6 of _0xf5c1c9){if(!_0x48e2e6['isDirectory']())continue;const _0x5985fe=_0x48e2e6[_0x40a05e(0x81)],_0x70854a=join(_0x1c7e3f,_0x5985fe),_0x72150c=await readdir(_0x70854a,{'withFileTypes':!![]});for(const _0x521138 of _0x72150c){if(!_0x521138[_0x40a05e(0x73)]())continue;const _0x2b14ec=_0x521138[_0x40a05e(0x81)],_0x4bc8f2=join(_0x70854a,_0x2b14ec),_0x49f95f=await readdir(_0x4bc8f2,{'withFileTypes':!![]});for(const _0x20dd71 of _0x49f95f){if(!_0x20dd71['isDirectory']())continue;const _0x1520fc=_0x20dd71[_0x40a05e(0x81)],_0x804b71=join(_0x4bc8f2,_0x1520fc),_0x32ff72=await readdir(_0x804b71,{'withFileTypes':!![]});for(const _0x387b03 of _0x32ff72){if(!_0x387b03[_0x40a05e(0x74)]()||!_0x387b03[_0x40a05e(0x81)]['endsWith'](_0x40a05e(0x70)))continue;const _0x2d1441=_0x387b03[_0x40a05e(0x81)]['replace'](/\.js$/,'');_0x41c037[_0x40a05e(0x85)]({'type':_0x40a05e(0x8a),'name':_0x2d1441,'filePath':join(_0x804b71,_0x387b03[_0x40a05e(0x81)]),'lockKey':_0x40a05e(0x6b)+_0x5985fe+'/'+_0x2b14ec+'/'+_0x1520fc+'/'+_0x2d1441,'alias':_0x5985fe,'operationType':_0x2b14ec,'functionNode':_0x1520fc});}}}}}catch(_0x44288d){if(_0x44288d[_0x40a05e(0x7b)]!=='ENOENT')throw _0x44288d;}return _0x41c037;}export async function scanLocalBffFunctions(_0x3be512,_0x5e4113){const _0x9dd84=a139_0x28d669;if(_0x5e4113==='COMMON'||_0x5e4113===_0x9dd84(0x77))return scanFlatFunctions(_0x3be512,_0x5e4113);if(_0x5e4113==='HOOK')return scanHookFunctions(_0x3be512);const [_0x1afac7,_0xdc7c26,_0x4e60a7]=await Promise['all']([scanFlatFunctions(_0x3be512,_0x9dd84(0x6e)),scanFlatFunctions(_0x3be512,_0x9dd84(0x77)),scanHookFunctions(_0x3be512)]);return[..._0x1afac7,..._0xdc7c26,..._0x4e60a7];}export function resolveLocalFilePathFromLockKey(_0x56f173,_0x4db820){const _0x30b80c=a139_0x28d669;return join(_0x56f173['scriptsRootDir'],..._0x4db820[_0x30b80c(0x7d)]('/'))+_0x30b80c(0x70);}export function createHookLocationMap(_0x349501){const _0xc3aaa1=a139_0x28d669,_0x241b88=new Map();for(const _0xc5c26e of _0x349501){_0xc5c26e[_0xc3aaa1(0x8b)]&&_0x241b88[_0xc3aaa1(0x89)](_0xc5c26e[_0xc3aaa1(0x8b)],{'datasetCode':_0xc5c26e[_0xc3aaa1(0x7c)],'operationType':snakeToCamel(_0xc5c26e[_0xc3aaa1(0x6a)]),'functionNode':_0xc3aaa1(0x83)}),_0xc5c26e[_0xc3aaa1(0x75)]&&_0x241b88[_0xc3aaa1(0x89)](_0xc5c26e[_0xc3aaa1(0x75)],{'datasetCode':_0xc5c26e[_0xc3aaa1(0x7c)],'operationType':snakeToCamel(_0xc5c26e['operationType']),'functionNode':_0xc3aaa1(0x7a)});}return _0x241b88;}export function resolveRemoteScriptTarget(_0x3d7f8a,_0x2cc66f,_0x5bc280,_0x245047,_0x48ee7c){const _0x3aeef4=a139_0x28d669,_0x58b294=normalizeBffType(_0x2cc66f[_0x3aeef4(0x7e)]);if(!_0x58b294||!_0x2cc66f[_0x3aeef4(0x84)])return null;if(_0x58b294===_0x3aeef4(0x8a)){const _0x364c9b=(_0x2cc66f['id']?_0x5bc280['get'](_0x2cc66f['id']):undefined)??findHookLocationByRemoteId(_0x245047,_0x2cc66f['id']);if(!_0x364c9b)return null;const _0x43f498=_0x364c9b[_0x3aeef4(0x6c)]||_0x48ee7c['get'](_0x364c9b[_0x3aeef4(0x7c)]),_0x15c263=_0x43f498??_0x364c9b[_0x3aeef4(0x7c)],_0x2ebe5b={..._0x364c9b,'alias':_0x43f498},_0x116177=_0x3aeef4(0x6b)+_0x15c263+'/'+_0x2ebe5b['operationType']+'/'+_0x2ebe5b[_0x3aeef4(0x8e)]+'/'+_0x2cc66f['functionName'];return{'lockKey':_0x116177,'filePath':resolveLocalFilePathFromLockKey(_0x3d7f8a,_0x116177),'type':_0x3aeef4(0x8a),'hookLocation':_0x2ebe5b};}const _0xe74eaf=_0x58b294+'/'+_0x2cc66f['functionName'];return{'lockKey':_0xe74eaf,'filePath':resolveLocalFilePathFromLockKey(_0x3d7f8a,_0xe74eaf),'type':_0x58b294};}export async function ensureParentDirectory(_0xb54282){await mkdir(dirname(_0xb54282),{'recursive':!![]});}function a139_0x4282(_0xaa38c4,_0x4038ce){_0xaa38c4=_0xaa38c4-0x67;const _0x537e57=a139_0x537e();let _0x428275=_0x537e57[_0xaa38c4];return _0x428275;}export async function fileExists(_0x2a3747){const _0x90915c=a139_0x28d669;try{return await access(_0x2a3747,constants[_0x90915c(0x79)]),!![];}catch{return![];}}function a139_0x537e(){const _0x4f0d53=['44JRhgfr','COMMON','5mbfTeA','.js','endsWith','1576aBRyWk','isDirectory','isFile','afterScriptId','includes','ENDPOINT','8619921HtDHMg','F_OK','after','code','datasetCode','split','scriptType','158994epVhRk','13727BzEjyT','name','1639006IvusmH','before','functionName','push','replace','map','14937040dNLkgO','set','HOOK','beforeScriptId','toUpperCase','trim','functionNode','1538634kUnBiA','scriptsRootDir','6435FRQPFn','operationType','HOOK/','alias'];a139_0x537e=function(){return _0x4f0d53;};return a139_0x537e();}export async function directoryExists(_0x36a0f2){const _0x343c44=a139_0x28d669;try{const _0x45b877=await stat(_0x36a0f2);return _0x45b877[_0x343c44(0x73)]();}catch{return![];}}
1
+ const a139_0x4312a3=a139_0x1263;function a139_0x1263(_0x54e408,_0x484992){_0x54e408=_0x54e408-0x1c2;const _0x25233e=a139_0x2523();let _0x126318=_0x25233e[_0x54e408];return _0x126318;}(function(_0x235981,_0x4e7eca){const _0x78a8de=a139_0x1263,_0xd5199b=_0x235981();while(!![]){try{const _0x336bde=parseInt(_0x78a8de(0x1d9))/0x1*(-parseInt(_0x78a8de(0x1e7))/0x2)+-parseInt(_0x78a8de(0x1e0))/0x3*(-parseInt(_0x78a8de(0x1d4))/0x4)+-parseInt(_0x78a8de(0x1d0))/0x5*(-parseInt(_0x78a8de(0x1c6))/0x6)+-parseInt(_0x78a8de(0x1d8))/0x7+-parseInt(_0x78a8de(0x1c7))/0x8*(-parseInt(_0x78a8de(0x1cb))/0x9)+-parseInt(_0x78a8de(0x1c3))/0xa+-parseInt(_0x78a8de(0x1e4))/0xb*(-parseInt(_0x78a8de(0x1e8))/0xc);if(_0x336bde===_0x4e7eca)break;else _0xd5199b['push'](_0xd5199b['shift']());}catch(_0x52bf80){_0xd5199b['push'](_0xd5199b['shift']());}}}(a139_0x2523,0x19283));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=[a139_0x4312a3(0x1cc),a139_0x4312a3(0x1e2),a139_0x4312a3(0x1cd)];export function normalizeBffType(_0x147ca5){const _0x5d76f8=a139_0x4312a3;if(!_0x147ca5)return undefined;const _0x31171a=_0x147ca5[_0x5d76f8(0x1c9)]()[_0x5d76f8(0x1d5)]();return SUPPORTED_BFF_TYPES[_0x5d76f8(0x1ca)](_0x31171a)?_0x31171a:undefined;}async function scanJsFilesRecursively(_0x3f48e7,_0xa61272){const _0x28ea6a=a139_0x4312a3,_0x171c05=[];try{const _0x12137d=await readdir(_0x3f48e7,{'withFileTypes':!![]});for(const _0x19f3ea of _0x12137d){const _0x35f6cc=join(_0x3f48e7,_0x19f3ea[_0x28ea6a(0x1e1)]);if(_0x19f3ea[_0x28ea6a(0x1dd)]())_0x171c05[_0x28ea6a(0x1da)](...await scanJsFilesRecursively(_0x35f6cc,_0xa61272+'/'+_0x19f3ea[_0x28ea6a(0x1e1)]));else _0x19f3ea['isFile']()&&_0x19f3ea[_0x28ea6a(0x1e1)][_0x28ea6a(0x1d1)]('.js')&&_0x171c05[_0x28ea6a(0x1da)]({'lockKey':_0xa61272+'/'+_0x19f3ea[_0x28ea6a(0x1e1)][_0x28ea6a(0x1e6)](/\.js$/,''),'filePath':_0x35f6cc});}}catch(_0x38f148){if(_0x38f148['code']!=='ENOENT')throw _0x38f148;}return _0x171c05;}async function scanFlatFunctions(_0x74118f,_0x50bc87){const _0x216f19=a139_0x4312a3,_0x18e337=join(_0x74118f['scriptsRootDir'],_0x50bc87),_0x4ea800=await scanJsFilesRecursively(_0x18e337,_0x50bc87);return _0x4ea800[_0x216f19(0x1db)](({lockKey:_0x1c28e7,filePath:_0x58f3fa})=>({'type':_0x50bc87,'name':_0x1c28e7[_0x216f19(0x1c2)]('/')['at'](-0x1)??'','filePath':_0x58f3fa,'lockKey':_0x1c28e7}));}async function scanHookFunctions(_0x224844){const _0x4ab2c7=a139_0x4312a3,_0x3f5ebb=join(_0x224844[_0x4ab2c7(0x1d3)],_0x4ab2c7(0x1cd)),_0x1b2c44=[];try{const _0x35e3d2=await readdir(_0x3f5ebb,{'withFileTypes':!![]});for(const _0x282083 of _0x35e3d2){if(!_0x282083[_0x4ab2c7(0x1dd)]())continue;const _0x4b7f89=_0x282083[_0x4ab2c7(0x1e1)],_0x497a7f=join(_0x3f5ebb,_0x4b7f89),_0x9ab345=await readdir(_0x497a7f,{'withFileTypes':!![]});for(const _0xea249 of _0x9ab345){if(!_0xea249[_0x4ab2c7(0x1dd)]())continue;const _0x4afe56=_0xea249['name'],_0x11455a=join(_0x497a7f,_0x4afe56),_0x46024c=await readdir(_0x11455a,{'withFileTypes':!![]});for(const _0x45707f of _0x46024c){if(!_0x45707f[_0x4ab2c7(0x1dd)]())continue;const _0x17bbd6=_0x45707f[_0x4ab2c7(0x1e1)],_0x37f508=join(_0x11455a,_0x17bbd6),_0x3c81d6=await readdir(_0x37f508,{'withFileTypes':!![]});for(const _0x4452db of _0x3c81d6){if(!_0x4452db['isFile']()||!_0x4452db[_0x4ab2c7(0x1e1)][_0x4ab2c7(0x1d1)](_0x4ab2c7(0x1d7)))continue;const _0x3f1c5c=_0x4452db['name']['replace'](/\.js$/,'');_0x1b2c44[_0x4ab2c7(0x1da)]({'type':_0x4ab2c7(0x1cd),'name':_0x3f1c5c,'filePath':join(_0x37f508,_0x4452db[_0x4ab2c7(0x1e1)]),'lockKey':_0x4ab2c7(0x1de)+_0x4b7f89+'/'+_0x4afe56+'/'+_0x17bbd6+'/'+_0x3f1c5c,'alias':_0x4b7f89,'operationType':_0x4afe56,'functionNode':_0x17bbd6});}}}}}catch(_0x55d439){if(_0x55d439[_0x4ab2c7(0x1c5)]!=='ENOENT')throw _0x55d439;}return _0x1b2c44;}export async function scanLocalBffFunctions(_0x32fb26,_0x1845a2){const _0x5b9977=a139_0x4312a3;if(_0x1845a2===_0x5b9977(0x1cc)||_0x1845a2==='ENDPOINT')return scanFlatFunctions(_0x32fb26,_0x1845a2);if(_0x1845a2==='HOOK')return scanHookFunctions(_0x32fb26);const [_0x4a44a5,_0x249507,_0x57aa64]=await Promise['all']([scanFlatFunctions(_0x32fb26,_0x5b9977(0x1cc)),scanFlatFunctions(_0x32fb26,_0x5b9977(0x1e2)),scanHookFunctions(_0x32fb26)]);return[..._0x4a44a5,..._0x249507,..._0x57aa64];}function a139_0x2523(){const _0x2f184f=['756118AWlLVD','operationType','replace','24eMtmaa','12NEasjg','alias','split','948610OirkDE','before','code','18CadXBI','993944XQtEeh','datasetCode','trim','includes','9bLbcEw','COMMON','HOOK','beforeScriptId','functionNode','270155HrecIr','endsWith','set','scriptsRootDir','8156AsbLDM','toUpperCase','functionName','.js','411019SnHInF','13132xhzqdO','push','map','F_OK','isDirectory','HOOK/','afterScriptId','87fYUEjg','name','ENDPOINT','get'];a139_0x2523=function(){return _0x2f184f;};return a139_0x2523();}export function resolveLocalFilePathFromLockKey(_0x4dd3d2,_0x521ed3){const _0x133919=a139_0x4312a3;return join(_0x4dd3d2[_0x133919(0x1d3)],..._0x521ed3[_0x133919(0x1c2)]('/'))+_0x133919(0x1d7);}export function createHookLocationMap(_0x556f33){const _0xec4388=a139_0x4312a3,_0x34b5f9=new Map();for(const _0x307046 of _0x556f33){_0x307046['beforeScriptId']&&_0x34b5f9[_0xec4388(0x1d2)](_0x307046[_0xec4388(0x1ce)],{'datasetCode':_0x307046[_0xec4388(0x1c8)],'operationType':snakeToCamel(_0x307046[_0xec4388(0x1e5)]),'functionNode':_0xec4388(0x1c4)}),_0x307046[_0xec4388(0x1df)]&&_0x34b5f9[_0xec4388(0x1d2)](_0x307046['afterScriptId'],{'datasetCode':_0x307046['datasetCode'],'operationType':snakeToCamel(_0x307046['operationType']),'functionNode':'after'});}return _0x34b5f9;}export function resolveRemoteScriptTarget(_0x6e80ac,_0x29e0f5,_0x4f0a74,_0x31f7fa,_0xd588bc){const _0x5c6e08=a139_0x4312a3,_0x71cb99=normalizeBffType(_0x29e0f5['scriptType']);if(!_0x71cb99||!_0x29e0f5['functionName'])return null;if(_0x71cb99===_0x5c6e08(0x1cd)){const _0x204ac2=(_0x29e0f5['id']?_0x4f0a74[_0x5c6e08(0x1e3)](_0x29e0f5['id']):undefined)??findHookLocationByRemoteId(_0x31f7fa,_0x29e0f5['id']);if(!_0x204ac2)return null;const _0x4f98e6=_0x204ac2[_0x5c6e08(0x1e9)]||_0xd588bc[_0x5c6e08(0x1e3)](_0x204ac2[_0x5c6e08(0x1c8)]),_0x5d6e4e=_0x4f98e6??_0x204ac2[_0x5c6e08(0x1c8)],_0x2353b5={..._0x204ac2,'alias':_0x4f98e6},_0x593339='HOOK/'+_0x5d6e4e+'/'+_0x2353b5[_0x5c6e08(0x1e5)]+'/'+_0x2353b5[_0x5c6e08(0x1cf)]+'/'+_0x29e0f5[_0x5c6e08(0x1d6)];return{'lockKey':_0x593339,'filePath':resolveLocalFilePathFromLockKey(_0x6e80ac,_0x593339),'type':_0x5c6e08(0x1cd),'hookLocation':_0x2353b5};}const _0x3bf85b=_0x71cb99+'/'+_0x29e0f5[_0x5c6e08(0x1d6)];return{'lockKey':_0x3bf85b,'filePath':resolveLocalFilePathFromLockKey(_0x6e80ac,_0x3bf85b),'type':_0x71cb99};}export async function ensureParentDirectory(_0x1a2208){await mkdir(dirname(_0x1a2208),{'recursive':!![]});}export async function fileExists(_0x413077){const _0x27993e=a139_0x4312a3;try{return await access(_0x413077,constants[_0x27993e(0x1dc)]),!![];}catch{return![];}}export async function directoryExists(_0x3e98b3){const _0x33ad92=a139_0x4312a3;try{const _0x2bea4e=await stat(_0x3e98b3);return _0x2bea4e[_0x33ad92(0x1dd)]();}catch{return![];}}
@@ -1 +1 @@
1
- (function(_0x2ecd0f,_0xb2c55c){const _0x5ed350=a140_0x519d,_0x52bc7c=_0x2ecd0f();while(!![]){try{const _0x18f4d5=parseInt(_0x5ed350(0xda))/0x1+-parseInt(_0x5ed350(0xd6))/0x2*(-parseInt(_0x5ed350(0xd2))/0x3)+parseInt(_0x5ed350(0xd1))/0x4*(parseInt(_0x5ed350(0xd5))/0x5)+-parseInt(_0x5ed350(0xd7))/0x6+parseInt(_0x5ed350(0xd8))/0x7+parseInt(_0x5ed350(0xdb))/0x8+-parseInt(_0x5ed350(0xd4))/0x9;if(_0x18f4d5===_0xb2c55c)break;else _0x52bc7c['push'](_0x52bc7c['shift']());}catch(_0x5d2e66){_0x52bc7c['push'](_0x52bc7c['shift']());}}}(a140_0x553a,0x2a5e1));function a140_0x553a(){const _0x3f2702=['529191EmeLpb','6345imlHrk','16nhktFz','929442TDdJjn','141785KXFLvQ','createHash','12894MTJNmj','960408IBYPgd','update','md5','316lGhFvY','50172BvvLTC','hex'];a140_0x553a=function(){return _0x3f2702;};return a140_0x553a();}import{readFile}from'node:fs/promises';function a140_0x519d(_0x23e778,_0x8d5e7f){_0x23e778=_0x23e778-0xd0;const _0x553a39=a140_0x553a();let _0x519d5c=_0x553a39[_0x23e778];return _0x519d5c;}import a140_0x258e90 from'node:crypto';export function computeContentHash(_0x29b437){const _0x4ec56b=a140_0x519d;return a140_0x258e90[_0x4ec56b(0xd9)](_0x4ec56b(0xd0))[_0x4ec56b(0xdc)](_0x29b437)['digest'](_0x4ec56b(0xd3));}export async function computeFileHash(_0x165c55){const _0x7414d5=await readFile(_0x165c55,'utf8');return computeContentHash(_0x7414d5);}
1
+ function a140_0x5e55(_0xa6a01a,_0xbe7ada){_0xa6a01a=_0xa6a01a-0x1a0;const _0x833e87=a140_0x833e();let _0x5e5562=_0x833e87[_0xa6a01a];return _0x5e5562;}(function(_0x10abd8,_0x4b40a3){const _0x3883b7=a140_0x5e55,_0x223d6d=_0x10abd8();while(!![]){try{const _0x33df3e=parseInt(_0x3883b7(0x1a8))/0x1+parseInt(_0x3883b7(0x1a7))/0x2+-parseInt(_0x3883b7(0x1ac))/0x3+parseInt(_0x3883b7(0x1a1))/0x4+parseInt(_0x3883b7(0x1a5))/0x5*(-parseInt(_0x3883b7(0x1a3))/0x6)+-parseInt(_0x3883b7(0x1a6))/0x7+parseInt(_0x3883b7(0x1a2))/0x8;if(_0x33df3e===_0x4b40a3)break;else _0x223d6d['push'](_0x223d6d['shift']());}catch(_0x3e4ecf){_0x223d6d['push'](_0x223d6d['shift']());}}}(a140_0x833e,0x49739));import{readFile}from'node:fs/promises';import a140_0x484ac6 from'node:crypto';function a140_0x833e(){const _0x4cbe84=['md5','2867615hmdYPB','236649xBGPZB','473476rRpwzS','177384dFHPFy','digest','update','createHash','1278792OlbLjl','hex','1299788nFiTal','4763056hiuIww','6FKLNzs'];a140_0x833e=function(){return _0x4cbe84;};return a140_0x833e();}export function computeContentHash(_0x3a8f81){const _0x1207d9=a140_0x5e55;return a140_0x484ac6[_0x1207d9(0x1ab)](_0x1207d9(0x1a4))[_0x1207d9(0x1aa)](_0x3a8f81)[_0x1207d9(0x1a9)](_0x1207d9(0x1a0));}export async function computeFileHash(_0x2057a5){const _0x389116=await readFile(_0x2057a5,'utf8');return computeContentHash(_0x389116);}
@@ -1 +1 @@
1
- (function(_0x9ab74a,_0x456cfb){const _0x694788=a141_0x4cac,_0x117ff3=_0x9ab74a();while(!![]){try{const _0x10c668=parseInt(_0x694788(0x8e))/0x1+parseInt(_0x694788(0x96))/0x2+-parseInt(_0x694788(0x87))/0x3+parseInt(_0x694788(0x8b))/0x4+-parseInt(_0x694788(0x92))/0x5*(parseInt(_0x694788(0x9a))/0x6)+-parseInt(_0x694788(0x89))/0x7*(-parseInt(_0x694788(0x95))/0x8)+-parseInt(_0x694788(0x93))/0x9*(parseInt(_0x694788(0x88))/0xa);if(_0x10c668===_0x456cfb)break;else _0x117ff3['push'](_0x117ff3['shift']());}catch(_0x25229f){_0x117ff3['push'](_0x117ff3['shift']());}}}(a141_0x1f26,0x58a72));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';function a141_0x4cac(_0x4c893,_0x2516cd){_0x4c893=_0x4c893-0x86;const _0x1f26ee=a141_0x1f26();let _0x4cacba=_0x1f26ee[_0x4c893];return _0x4cacba;}export function createEmptyBffLock(){return{'apps':{}};}function a141_0x1f26(){const _0x97c95=['1540024QItiia','189204vdhEvp','ENOENT','stringify','utf8','545646ftlgwo','functions','1276755LItfFA','89160qirTRU','7RaVnIS','object','976332uyHlSS','scriptsRoot','Failed\x20to\x20read\x20BFF\x20lock\x20file:\x20','357376lIobYS','apps','lastSync','code','5wxyVGp','9CXadcA','\x22\x20vs\x20lock\x20\x22'];a141_0x1f26=function(){return _0x97c95;};return a141_0x1f26();}export function ensureLockScope(_0x456e5a,_0x4a2321,_0x5e13c7,_0x49b399){const _0x5234de=a141_0x4cac,_0x37bd60={'apps':_0x456e5a[_0x5234de(0x8f)]&&typeof _0x456e5a[_0x5234de(0x8f)]===_0x5234de(0x8a)?_0x456e5a[_0x5234de(0x8f)]:{}};let _0x4f8f19=_0x37bd60[_0x5234de(0x8f)][_0x4a2321];if(!_0x4f8f19)return _0x4f8f19={'scriptsRoot':_0x5e13c7,'lastSync':'','functions':{}},_0x37bd60['apps'][_0x4a2321]=_0x4f8f19,{'lockData':_0x37bd60,'appLock':_0x4f8f19};if(!_0x4f8f19['scriptsRoot'])_0x4f8f19[_0x5234de(0x8c)]=_0x5e13c7;else{if(_0x4f8f19[_0x5234de(0x8c)]!==_0x5e13c7)throw new Error(_0x49b399+':\x20scriptsRoot\x20mismatch\x20—\x20'+('current\x20\x22'+_0x5e13c7+_0x5234de(0x94)+_0x4f8f19[_0x5234de(0x8c)]+'\x22.\x20')+'Check\x20.rabetbase/bff.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.');}return!_0x4f8f19[_0x5234de(0x86)]&&(_0x4f8f19['functions']={}),!_0x4f8f19['lastSync']&&(_0x4f8f19[_0x5234de(0x90)]=''),{'lockData':_0x37bd60,'appLock':_0x4f8f19};}export async function readBffLockFile(_0x186761){const _0x5ca16d=a141_0x4cac;try{const _0x510e78=await readFile(_0x186761,_0x5ca16d(0x99)),_0x4ac3b8=JSON['parse'](_0x510e78);return{'apps':_0x4ac3b8[_0x5ca16d(0x8f)]&&typeof _0x4ac3b8[_0x5ca16d(0x8f)]===_0x5ca16d(0x8a)?_0x4ac3b8[_0x5ca16d(0x8f)]:{}};}catch(_0x4aa000){if(_0x4aa000[_0x5ca16d(0x91)]===_0x5ca16d(0x97))return null;throw new Error(_0x5ca16d(0x8d)+String(_0x4aa000));}}export async function writeBffLockFile(_0x4df5a0,_0x3e0f54){const _0x1b9a6f=a141_0x4cac;await mkdir(dirname(_0x4df5a0),{'recursive':!![]}),await writeFile(_0x4df5a0,JSON[_0x1b9a6f(0x98)](_0x3e0f54,null,0x2),'utf8');}
1
+ function a141_0x451b(){const _0xd38540=['\x22.\x20','16jkoBOq','1428148WmuUWg','stringify','current\x20\x22','lastSync','1564728EhzUJx','object',':\x20scriptsRoot\x20mismatch\x20—\x20','apps','434992gPWLri','utf8','Check\x20.rabetbase/bff.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.','309490GmPsGn','ENOENT','6588924UulUDB','Failed\x20to\x20read\x20BFF\x20lock\x20file:\x20','scriptsRoot','5341189UScvoR','1373559QvvHMd'];a141_0x451b=function(){return _0xd38540;};return a141_0x451b();}(function(_0x540e41,_0x5239ad){const _0x3db823=a141_0x3eea,_0x447817=_0x540e41();while(!![]){try{const _0x48dedf=-parseInt(_0x3db823(0x13a))/0x1+parseInt(_0x3db823(0x146))/0x2+parseInt(_0x3db823(0x143))/0x3+-parseInt(_0x3db823(0x14a))/0x4+parseInt(_0x3db823(0x13d))/0x5+-parseInt(_0x3db823(0x13f))/0x6+parseInt(_0x3db823(0x142))/0x7*(parseInt(_0x3db823(0x145))/0x8);if(_0x48dedf===_0x5239ad)break;else _0x447817['push'](_0x447817['shift']());}catch(_0x26c2e2){_0x447817['push'](_0x447817['shift']());}}}(a141_0x451b,0xcbfdf));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptyBffLock(){return{'apps':{}};}function a141_0x3eea(_0x322f92,_0x5701f7){_0x322f92=_0x322f92-0x139;const _0x451bc2=a141_0x451b();let _0x3eea23=_0x451bc2[_0x322f92];return _0x3eea23;}export function ensureLockScope(_0x540bc3,_0x22cd65,_0x460a19,_0x2a2abb){const _0x32df30=a141_0x3eea,_0x136ab9={'apps':_0x540bc3['apps']&&typeof _0x540bc3[_0x32df30(0x139)]==='object'?_0x540bc3[_0x32df30(0x139)]:{}};let _0x27b7f8=_0x136ab9[_0x32df30(0x139)][_0x22cd65];if(!_0x27b7f8)return _0x27b7f8={'scriptsRoot':_0x460a19,'lastSync':'','functions':{}},_0x136ab9[_0x32df30(0x139)][_0x22cd65]=_0x27b7f8,{'lockData':_0x136ab9,'appLock':_0x27b7f8};if(!_0x27b7f8['scriptsRoot'])_0x27b7f8['scriptsRoot']=_0x460a19;else{if(_0x27b7f8[_0x32df30(0x141)]!==_0x460a19)throw new Error(_0x2a2abb+_0x32df30(0x14c)+(_0x32df30(0x148)+_0x460a19+'\x22\x20vs\x20lock\x20\x22'+_0x27b7f8['scriptsRoot']+_0x32df30(0x144))+_0x32df30(0x13c));}return!_0x27b7f8['functions']&&(_0x27b7f8['functions']={}),!_0x27b7f8[_0x32df30(0x149)]&&(_0x27b7f8['lastSync']=''),{'lockData':_0x136ab9,'appLock':_0x27b7f8};}export async function readBffLockFile(_0x618bf6){const _0x24a412=a141_0x3eea;try{const _0x1953d1=await readFile(_0x618bf6,_0x24a412(0x13b)),_0x2842bf=JSON['parse'](_0x1953d1);return{'apps':_0x2842bf[_0x24a412(0x139)]&&typeof _0x2842bf['apps']===_0x24a412(0x14b)?_0x2842bf['apps']:{}};}catch(_0x41794f){if(_0x41794f['code']===_0x24a412(0x13e))return null;throw new Error(_0x24a412(0x140)+String(_0x41794f));}}export async function writeBffLockFile(_0x5d5949,_0x22727c){const _0x47c953=a141_0x3eea;await mkdir(dirname(_0x5d5949),{'recursive':!![]}),await writeFile(_0x5d5949,JSON[_0x47c953(0x147)](_0x22727c,null,0x2),_0x47c953(0x13b));}
@@ -1 +1 @@
1
- (function(_0xe1f3ed,_0x38f632){const _0x265812=a143_0x43d8,_0x35b790=_0xe1f3ed();while(!![]){try{const _0x265858=-parseInt(_0x265812(0x171))/0x1*(-parseInt(_0x265812(0x16e))/0x2)+parseInt(_0x265812(0x174))/0x3*(-parseInt(_0x265812(0x172))/0x4)+parseInt(_0x265812(0x169))/0x5+-parseInt(_0x265812(0x17e))/0x6*(parseInt(_0x265812(0x16b))/0x7)+-parseInt(_0x265812(0x17b))/0x8+-parseInt(_0x265812(0x178))/0x9+parseInt(_0x265812(0x16d))/0xa*(parseInt(_0x265812(0x17c))/0xb);if(_0x265858===_0x38f632)break;else _0x35b790['push'](_0x35b790['shift']());}catch(_0x4e90e6){_0x35b790['push'](_0x35b790['shift']());}}}(a143_0x5888,0x4f8fd));export function snakeToCamel(_0x49f849){const _0x5c810a=a143_0x43d8;return _0x49f849['toLowerCase']()[_0x5c810a(0x16a)](/_([a-z])/g,(_0x132a60,_0x5e0b09)=>_0x5e0b09['toUpperCase']());}export function findHookLocationByRemoteId(_0x710b72,_0x1489ba){const _0x82715a=a143_0x43d8;if(!_0x1489ba)return undefined;for(const _0x3cfa98 of Object[_0x82715a(0x173)](_0x710b72)){if(_0x3cfa98[_0x82715a(0x179)]===_0x1489ba&&_0x3cfa98[_0x82715a(0x16c)]&&_0x3cfa98[_0x82715a(0x175)]&&_0x3cfa98[_0x82715a(0x170)])return{'datasetCode':_0x3cfa98[_0x82715a(0x16c)],'operationType':_0x3cfa98[_0x82715a(0x175)],'functionNode':_0x3cfa98[_0x82715a(0x170)]};}return undefined;}export function extractScriptDescription(_0x8974f0){const _0xc9fde9=a143_0x43d8,_0x4a0a34=_0x8974f0[_0xc9fde9(0x177)](/\[\s*脚本描述\s*]\s*(.+)/);return _0x4a0a34?.[0x1]?.[_0xc9fde9(0x17d)]()||undefined;}function a143_0x43d8(_0x4dbd51,_0x457685){_0x4dbd51=_0x4dbd51-0x169;const _0x588833=a143_0x5888();let _0x43d885=_0x588833[_0x4dbd51];return _0x43d885;}function a143_0x5888(){const _0x4050cb=['after','3848560gXPyci','640816dmcxtd','trim','18yTjSrC','2512000zYyKKV','replace','313796Jpuuot','datasetCode','190wGidoy','532982YhZQgp','toLowerCase','functionNode','1yNCgqc','972rIopNw','values','4035iOxLrR','operationType','before','match','5467329YmFxwN','remoteId'];a143_0x5888=function(){return _0x4050cb;};return a143_0x5888();}export function isValidBffFunctionName(_0x5a4673){return/^[A-Za-z_$][A-Za-z0-9_$]*$/['test'](_0x5a4673);}export function normalizeHookFunctionNode(_0x42312e){const _0xd99e=a143_0x43d8;if(!_0x42312e)return undefined;const _0x1384d5=_0x42312e[_0xd99e(0x17d)]()[_0xd99e(0x16f)]();if(_0x1384d5===_0xd99e(0x176)||_0x1384d5===_0xd99e(0x17a))return _0x1384d5;return undefined;}
1
+ function a143_0x2edb(){const _0x555bf2=['after','datasetCode','10424029ylgIEz','functionNode','toLowerCase','248eMZYSE','318577kFpkny','toUpperCase','2FODXBF','13119uYlrSC','9612ctbFwY','9069792gAvJrT','230iilCqp','470601rFlkvh','556dxTduS','trim','2155FQiyPm','replace','operationType','1758111ELqeWs'];a143_0x2edb=function(){return _0x555bf2;};return a143_0x2edb();}(function(_0x1b7a2c,_0x17abff){const _0x174e69=a143_0x284c,_0x59c3bc=_0x1b7a2c();while(!![]){try{const _0x1420b4=-parseInt(_0x174e69(0x14d))/0x1*(-parseInt(_0x174e69(0x156))/0x2)+-parseInt(_0x174e69(0x157))/0x3*(parseInt(_0x174e69(0x148))/0x4)+-parseInt(_0x174e69(0x14a))/0x5*(-parseInt(_0x174e69(0x144))/0x6)+-parseInt(_0x174e69(0x154))/0x7*(parseInt(_0x174e69(0x153))/0x8)+-parseInt(_0x174e69(0x147))/0x9*(parseInt(_0x174e69(0x146))/0xa)+parseInt(_0x174e69(0x150))/0xb+parseInt(_0x174e69(0x145))/0xc;if(_0x1420b4===_0x17abff)break;else _0x59c3bc['push'](_0x59c3bc['shift']());}catch(_0x319cda){_0x59c3bc['push'](_0x59c3bc['shift']());}}}(a143_0x2edb,0xe3385));export function snakeToCamel(_0x4f287d){const _0x3ef759=a143_0x284c;return _0x4f287d['toLowerCase']()[_0x3ef759(0x14b)](/_([a-z])/g,(_0x22fd1d,_0x1a9a46)=>_0x1a9a46[_0x3ef759(0x155)]());}function a143_0x284c(_0x3fa6e5,_0x56f038){_0x3fa6e5=_0x3fa6e5-0x144;const _0x2edb41=a143_0x2edb();let _0x284c1f=_0x2edb41[_0x3fa6e5];return _0x284c1f;}export function findHookLocationByRemoteId(_0x42be1d,_0x400199){const _0x3f394e=a143_0x284c;if(!_0x400199)return undefined;for(const _0x508540 of Object['values'](_0x42be1d)){if(_0x508540['remoteId']===_0x400199&&_0x508540[_0x3f394e(0x14f)]&&_0x508540[_0x3f394e(0x14c)]&&_0x508540[_0x3f394e(0x151)])return{'datasetCode':_0x508540['datasetCode'],'operationType':_0x508540[_0x3f394e(0x14c)],'functionNode':_0x508540['functionNode']};}return undefined;}export function extractScriptDescription(_0xb53b26){const _0x39d5df=_0xb53b26['match'](/\[\s*脚本描述\s*]\s*(.+)/);return _0x39d5df?.[0x1]?.['trim']()||undefined;}export function isValidBffFunctionName(_0x527f43){return/^[A-Za-z_$][A-Za-z0-9_$]*$/['test'](_0x527f43);}export function normalizeHookFunctionNode(_0x53be87){const _0x3cd3e0=a143_0x284c;if(!_0x53be87)return undefined;const _0x517c46=_0x53be87[_0x3cd3e0(0x149)]()[_0x3cd3e0(0x152)]();if(_0x517c46==='before'||_0x517c46===_0x3cd3e0(0x14e))return _0x517c46;return undefined;}
@@ -1 +1 @@
1
- function a144_0x249a(_0x291ec4,_0x4e7f54){_0x291ec4=_0x291ec4-0x106;const _0x1ab554=a144_0x1ab5();let _0x249a24=_0x1ab554[_0x291ec4];return _0x249a24;}(function(_0x17f632,_0x2e6cf8){const _0x376b08=a144_0x249a,_0x3d4ba1=_0x17f632();while(!![]){try{const _0x17ce61=-parseInt(_0x376b08(0x11f))/0x1+parseInt(_0x376b08(0x121))/0x2*(-parseInt(_0x376b08(0x11c))/0x3)+-parseInt(_0x376b08(0x10e))/0x4+parseInt(_0x376b08(0x108))/0x5*(parseInt(_0x376b08(0x118))/0x6)+parseInt(_0x376b08(0x113))/0x7*(-parseInt(_0x376b08(0x110))/0x8)+-parseInt(_0x376b08(0x112))/0x9*(-parseInt(_0x376b08(0x10f))/0xa)+parseInt(_0x376b08(0x11b))/0xb;if(_0x17ce61===_0x2e6cf8)break;else _0x3d4ba1['push'](_0x3d4ba1['shift']());}catch(_0x27ee32){_0x3d4ba1['push'](_0x3d4ba1['shift']());}}}(a144_0x1ab5,0x933c1));import{listDatasets}from'../core/api-client.js';const cache=new Map();export async function listDatabases(_0x5a684c){const _0x50ebd3=a144_0x249a;if(cache[_0x50ebd3(0x111)](_0x5a684c))return cache['get'](_0x5a684c);const _0x2464f1=await listDatasets(_0x5a684c),_0x1f2997=new Map();for(const _0x1d34cd of _0x2464f1){const _0x22fa92=_0x1d34cd[_0x50ebd3(0x120)];_0x22fa92?.[_0x50ebd3(0x119)]!=null&&_0x1f2997['set'](_0x22fa92['dbId'],_0x22fa92[_0x50ebd3(0x11a)]??_0x50ebd3(0x114)+_0x22fa92['dbId']);}const _0x4e6a0e=[..._0x1f2997[_0x50ebd3(0x109)]()][_0x50ebd3(0x11e)](([_0x23d19e,_0x3966d8])=>({'dbId':_0x23d19e,'dbName':_0x3966d8}));return cache[_0x50ebd3(0x115)](_0x5a684c,_0x4e6a0e),_0x4e6a0e;}export async function resolveDb(_0x218bc3,_0x219865){const _0x19e933=a144_0x249a,_0x583ad3=await listDatabases(_0x218bc3);if(_0x583ad3[_0x19e933(0x10b)]===0x0)return{'resolved':[],'error':'No\x20linked\x20databases\x20found\x20for\x20this\x20app.\x20Make\x20sure\x20datasets\x20have\x20been\x20created.'};if(!_0x219865)return{'resolved':_0x583ad3};const _0x44f153=Number(_0x219865);if(!Number['isNaN'](_0x44f153)){const _0x303244=_0x583ad3[_0x19e933(0x11d)](_0x33c6d1=>_0x33c6d1[_0x19e933(0x119)]===_0x44f153);if(_0x303244)return{'resolved':[_0x303244]};}const _0x209190=_0x219865[_0x19e933(0x10d)](),_0x394d3f=_0x583ad3[_0x19e933(0x10c)](_0x357e86=>_0x357e86[_0x19e933(0x11a)][_0x19e933(0x10d)]()[_0x19e933(0x106)](_0x209190));if(_0x394d3f[_0x19e933(0x10b)]>0x0)return{'resolved':_0x394d3f};const _0x54b62b=_0x583ad3['map'](_0x4e00f1=>_0x4e00f1[_0x19e933(0x11a)]+'\x20('+_0x4e00f1[_0x19e933(0x119)]+')')[_0x19e933(0x117)](',\x20');return{'resolved':[],'error':'No\x20database\x20matching\x20\x22'+_0x219865+_0x19e933(0x116)+_0x54b62b};}export async function resolveOneDb(_0x1fac86,_0x394087){const _0x3acc52=a144_0x249a,{resolved:_0x5a2c03,error:_0x2d97ed}=await resolveDb(_0x1fac86,_0x394087);if(_0x2d97ed)return{'db':null,'error':_0x2d97ed};if(_0x5a2c03[_0x3acc52(0x10b)]===0x1)return{'db':_0x5a2c03[0x0]};if(!_0x394087){const _0x412f20=_0x5a2c03['map'](_0x362a95=>_0x362a95[_0x3acc52(0x11a)]+'\x20('+_0x362a95[_0x3acc52(0x119)]+')')[_0x3acc52(0x117)](',\x20');return{'db':null,'error':_0x3acc52(0x10a)+_0x412f20};}const _0x54741c=_0x5a2c03[_0x3acc52(0x11e)](_0x3a1ea5=>_0x3a1ea5['dbName']+'\x20('+_0x3a1ea5[_0x3acc52(0x119)]+')')[_0x3acc52(0x117)](',\x20');return{'db':null,'error':'\x22'+_0x394087+'\x22\x20matches\x20multiple\x20databases:\x20'+_0x54741c+_0x3acc52(0x107)};}function a144_0x1ab5(){const _0x32df4e=['4110VfvJxC','247944LSMIis','has','21843CopEmZ','210JAsmSy','db-','set','\x22.\x20Available:\x20','join','30rEADCq','dbId','dbName','21285484PMaJdE','808467emdzDl','find','map','719728yeNRln','dbtableConfig','2VscCSr','includes','.\x20Be\x20more\x20specific.','384855CRFsBt','entries','Multiple\x20databases\x20found.\x20Specify\x20one\x20with\x20--db:\x20','length','filter','toLowerCase','3181264HxBPSu'];a144_0x1ab5=function(){return _0x32df4e;};return a144_0x1ab5();}export async function getDbName(_0x5aee99,_0xe483d3){const _0x3fc810=a144_0x249a,_0x3e18d3=await listDatabases(_0x5aee99);return _0x3e18d3['find'](_0x35bc4e=>_0x35bc4e[_0x3fc810(0x119)]===_0xe483d3)?.[_0x3fc810(0x11a)];}
1
+ (function(_0x554385,_0x186b7e){const _0x15032b=a144_0x1d87,_0x1d383a=_0x554385();while(!![]){try{const _0x231712=-parseInt(_0x15032b(0x176))/0x1+parseInt(_0x15032b(0x183))/0x2*(parseInt(_0x15032b(0x174))/0x3)+parseInt(_0x15032b(0x181))/0x4*(-parseInt(_0x15032b(0x182))/0x5)+-parseInt(_0x15032b(0x180))/0x6*(parseInt(_0x15032b(0x17a))/0x7)+-parseInt(_0x15032b(0x16b))/0x8*(parseInt(_0x15032b(0x16f))/0x9)+-parseInt(_0x15032b(0x17d))/0xa*(parseInt(_0x15032b(0x17e))/0xb)+parseInt(_0x15032b(0x171))/0xc;if(_0x231712===_0x186b7e)break;else _0x1d383a['push'](_0x1d383a['shift']());}catch(_0x129deb){_0x1d383a['push'](_0x1d383a['shift']());}}}(a144_0xed0b,0xde79b));import{listDatasets}from'../core/api-client.js';function a144_0x1d87(_0x2d6471,_0x291fc9){_0x2d6471=_0x2d6471-0x168;const _0xed0b3d=a144_0xed0b();let _0x1d8757=_0xed0b3d[_0x2d6471];return _0x1d8757;}const cache=new Map();function a144_0xed0b(){const _0x3a5983=['\x22\x20matches\x20multiple\x20databases:\x20','map','10AWzkdg','13377199jlqpEM','filter','1410402cqkhOm','669652nNOkwb','5FeSmZE','2EWNFGp','entries','find','\x22.\x20Available:\x20','dbtableConfig','No\x20database\x20matching\x20\x22','isNaN','Multiple\x20databases\x20found.\x20Specify\x20one\x20with\x20--db:\x20','8gyhJDR','.\x20Be\x20more\x20specific.','dbId','set','6660153bbHHAq','toLowerCase','42225948bZNaQl','db-','dbName','2800695sQMGwt','has','242261fFYZPM','length','No\x20linked\x20databases\x20found\x20for\x20this\x20app.\x20Make\x20sure\x20datasets\x20have\x20been\x20created.','join','35zzsgSt'];a144_0xed0b=function(){return _0x3a5983;};return a144_0xed0b();}export async function listDatabases(_0x2926cc){const _0x3d6f47=a144_0x1d87;if(cache[_0x3d6f47(0x175)](_0x2926cc))return cache['get'](_0x2926cc);const _0x569f22=await listDatasets(_0x2926cc),_0x57e259=new Map();for(const _0xf397c2 of _0x569f22){const _0x113ee5=_0xf397c2[_0x3d6f47(0x187)];_0x113ee5?.['dbId']!=null&&_0x57e259[_0x3d6f47(0x16e)](_0x113ee5[_0x3d6f47(0x16d)],_0x113ee5[_0x3d6f47(0x173)]??_0x3d6f47(0x172)+_0x113ee5[_0x3d6f47(0x16d)]);}const _0x3dd846=[..._0x57e259[_0x3d6f47(0x184)]()][_0x3d6f47(0x17c)](([_0x48ba1f,_0x43ed68])=>({'dbId':_0x48ba1f,'dbName':_0x43ed68}));return cache['set'](_0x2926cc,_0x3dd846),_0x3dd846;}export async function resolveDb(_0xc718db,_0x509841){const _0x45b43d=a144_0x1d87,_0x3bac9f=await listDatabases(_0xc718db);if(_0x3bac9f[_0x45b43d(0x177)]===0x0)return{'resolved':[],'error':_0x45b43d(0x178)};if(!_0x509841)return{'resolved':_0x3bac9f};const _0x4d5711=Number(_0x509841);if(!Number[_0x45b43d(0x169)](_0x4d5711)){const _0x437809=_0x3bac9f[_0x45b43d(0x185)](_0x367f7a=>_0x367f7a[_0x45b43d(0x16d)]===_0x4d5711);if(_0x437809)return{'resolved':[_0x437809]};}const _0x542262=_0x509841['toLowerCase'](),_0xc7a5e7=_0x3bac9f[_0x45b43d(0x17f)](_0x473470=>_0x473470[_0x45b43d(0x173)][_0x45b43d(0x170)]()['includes'](_0x542262));if(_0xc7a5e7[_0x45b43d(0x177)]>0x0)return{'resolved':_0xc7a5e7};const _0x1e0b90=_0x3bac9f[_0x45b43d(0x17c)](_0x250e0a=>_0x250e0a[_0x45b43d(0x173)]+'\x20('+_0x250e0a['dbId']+')')[_0x45b43d(0x179)](',\x20');return{'resolved':[],'error':_0x45b43d(0x168)+_0x509841+_0x45b43d(0x186)+_0x1e0b90};}export async function resolveOneDb(_0x2444f7,_0x57f556){const _0x526a3a=a144_0x1d87,{resolved:_0x3b96d6,error:_0x1d0a04}=await resolveDb(_0x2444f7,_0x57f556);if(_0x1d0a04)return{'db':null,'error':_0x1d0a04};if(_0x3b96d6[_0x526a3a(0x177)]===0x1)return{'db':_0x3b96d6[0x0]};if(!_0x57f556){const _0x5ec5fc=_0x3b96d6[_0x526a3a(0x17c)](_0x1041f7=>_0x1041f7[_0x526a3a(0x173)]+'\x20('+_0x1041f7[_0x526a3a(0x16d)]+')')['join'](',\x20');return{'db':null,'error':_0x526a3a(0x16a)+_0x5ec5fc};}const _0xf2d04c=_0x3b96d6[_0x526a3a(0x17c)](_0x1cc796=>_0x1cc796[_0x526a3a(0x173)]+'\x20('+_0x1cc796[_0x526a3a(0x16d)]+')')['join'](',\x20');return{'db':null,'error':'\x22'+_0x57f556+_0x526a3a(0x17b)+_0xf2d04c+_0x526a3a(0x16c)};}export async function getDbName(_0xf39885,_0x165e16){const _0x27c3e6=a144_0x1d87,_0x31b2c0=await listDatabases(_0xf39885);return _0x31b2c0[_0x27c3e6(0x185)](_0x249c24=>_0x249c24[_0x27c3e6(0x16d)]===_0x165e16)?.[_0x27c3e6(0x173)];}
@@ -1 +1 @@
1
- const a145_0x4924d4=a145_0x34b9;(function(_0x3262f8,_0xc30d4a){const _0x1613f6=a145_0x34b9,_0x244e9=_0x3262f8();while(!![]){try{const _0xbf9406=-parseInt(_0x1613f6(0x1b7))/0x1*(parseInt(_0x1613f6(0x1b8))/0x2)+parseInt(_0x1613f6(0x1b5))/0x3*(parseInt(_0x1613f6(0x1b1))/0x4)+-parseInt(_0x1613f6(0x1b3))/0x5*(-parseInt(_0x1613f6(0x1ae))/0x6)+-parseInt(_0x1613f6(0x1b6))/0x7+parseInt(_0x1613f6(0x1b4))/0x8*(parseInt(_0x1613f6(0x1b2))/0x9)+parseInt(_0x1613f6(0x1af))/0xa+-parseInt(_0x1613f6(0x1ad))/0xb;if(_0xbf9406===_0xc30d4a)break;else _0x244e9['push'](_0x244e9['shift']());}catch(_0x58a6a1){_0x244e9['push'](_0x244e9['shift']());}}}(a145_0x24fb,0x7acf6));import{constants}from'node:fs';import{access,mkdir}from'node:fs/promises';function a145_0x34b9(_0x5c81f1,_0x10aa33){_0x5c81f1=_0x5c81f1-0x1a9;const _0x24fb29=a145_0x24fb();let _0x34b92d=_0x24fb29[_0x5c81f1];return _0x34b92d;}import{dirname,join,resolve}from'node:path';export function loadPageProjectConfig(_0x5e2969,_0x349ca7=process[a145_0x4924d4(0x1a9)]()){const _0x4096f3=a145_0x4924d4,_0xa76119=resolve(_0x349ca7),_0x303b6b=join(_0xa76119,'.rabetbase',_0x4096f3(0x1ac));return{'projectRoot':_0xa76119,'pagesBaseDir':_0x303b6b,'appPagesDir':join(_0x303b6b,_0x5e2969),'lockFilePath':join(_0xa76119,'.rabetbase','page.lock.json')};}export function buildPageFileName(_0x441c09,_0x43acf2){const _0x422047=a145_0x4924d4;return _0x441c09+'-'+String(_0x43acf2)[_0x422047(0x1ab)]()+_0x422047(0x1b0);}export function resolvePageFilePath(_0x5e4701,_0x5dea91,_0x4979b0){return join(_0x5e4701['appPagesDir'],buildPageFileName(_0x5dea91,_0x4979b0));}export async function ensureParentDirectory(_0x2b2f56){await mkdir(dirname(_0x2b2f56),{'recursive':!![]});}function a145_0x24fb(){const _0x23c399=['8706kBkbVI','1442112YFBlMy','255638JoNzQR','4FEcmFs','cwd','F_OK','toUpperCase','page','19681123xgBjWR','61668sbjgWy','6895710gPMKTO','.json','796QuapHZ','1818dUEckN','380wvLCJC','38072vIRAZh'];a145_0x24fb=function(){return _0x23c399;};return a145_0x24fb();}export async function fileExists(_0x3d03ef){const _0x1316dd=a145_0x4924d4;try{return await access(_0x3d03ef,constants[_0x1316dd(0x1aa)]),!![];}catch{return![];}}
1
+ const a145_0x266674=a145_0x2529;(function(_0x31845b,_0x2a1638){const _0xac22a8=a145_0x2529,_0x39e312=_0x31845b();while(!![]){try{const _0x5e0f0a=-parseInt(_0xac22a8(0x14f))/0x1+-parseInt(_0xac22a8(0x14e))/0x2*(parseInt(_0xac22a8(0x154))/0x3)+parseInt(_0xac22a8(0x152))/0x4+parseInt(_0xac22a8(0x153))/0x5+parseInt(_0xac22a8(0x147))/0x6*(-parseInt(_0xac22a8(0x145))/0x7)+parseInt(_0xac22a8(0x149))/0x8*(parseInt(_0xac22a8(0x151))/0x9)+parseInt(_0xac22a8(0x150))/0xa*(parseInt(_0xac22a8(0x155))/0xb);if(_0x5e0f0a===_0x2a1638)break;else _0x39e312['push'](_0x39e312['shift']());}catch(_0x1e2bb3){_0x39e312['push'](_0x39e312['shift']());}}}(a145_0x1f7c,0xebcdc));import{constants}from'node:fs';import{access,mkdir}from'node:fs/promises';function a145_0x1f7c(){const _0x3764fd=['cwd','3143944KWfHEu','page','.rabetbase','page.lock.json','F_OK','118oactsG','1064705dOajix','10IqfNgj','9QtGYkW','3302740XTcdee','1498665EEpYgW','7824SsXpRz','27511858UvmjZJ','appPagesDir','12845420gYezsX','toUpperCase','6ekVciw'];a145_0x1f7c=function(){return _0x3764fd;};return a145_0x1f7c();}function a145_0x2529(_0x44592f,_0xe34d94){_0x44592f=_0x44592f-0x145;const _0x1f7c31=a145_0x1f7c();let _0x252993=_0x1f7c31[_0x44592f];return _0x252993;}import{dirname,join,resolve}from'node:path';export function loadPageProjectConfig(_0x43db10,_0xd4329d=process[a145_0x266674(0x148)]()){const _0x1281e2=a145_0x266674,_0x1ab1db=resolve(_0xd4329d),_0x4dba86=join(_0x1ab1db,_0x1281e2(0x14b),_0x1281e2(0x14a));return{'projectRoot':_0x1ab1db,'pagesBaseDir':_0x4dba86,'appPagesDir':join(_0x4dba86,_0x43db10),'lockFilePath':join(_0x1ab1db,_0x1281e2(0x14b),_0x1281e2(0x14c))};}export function buildPageFileName(_0x19f884,_0x35f023){const _0x515fd1=a145_0x266674;return _0x19f884+'-'+String(_0x35f023)[_0x515fd1(0x146)]()+'.json';}export function resolvePageFilePath(_0x47adbf,_0x5af670,_0x13d51b){const _0x18ecee=a145_0x266674;return join(_0x47adbf[_0x18ecee(0x156)],buildPageFileName(_0x5af670,_0x13d51b));}export async function ensureParentDirectory(_0x2dea90){await mkdir(dirname(_0x2dea90),{'recursive':!![]});}export async function fileExists(_0x4cf7f1){const _0x4e8202=a145_0x266674;try{return await access(_0x4cf7f1,constants[_0x4e8202(0x14d)]),!![];}catch{return![];}}
@@ -1 +1 @@
1
- function a146_0x3053(_0xa8dbab,_0x5b0ebd){_0xa8dbab=_0xa8dbab-0x113;const _0x277875=a146_0x2778();let _0x30534f=_0x277875[_0xa8dbab];return _0x30534f;}(function(_0x5efba4,_0x295b08){const _0x36adb9=a146_0x3053,_0x29775d=_0x5efba4();while(!![]){try{const _0x3abad3=parseInt(_0x36adb9(0x116))/0x1*(-parseInt(_0x36adb9(0x121))/0x2)+-parseInt(_0x36adb9(0x119))/0x3+parseInt(_0x36adb9(0x113))/0x4*(-parseInt(_0x36adb9(0x11b))/0x5)+-parseInt(_0x36adb9(0x122))/0x6+-parseInt(_0x36adb9(0x11d))/0x7+-parseInt(_0x36adb9(0x118))/0x8+parseInt(_0x36adb9(0x124))/0x9*(parseInt(_0x36adb9(0x11f))/0xa);if(_0x3abad3===_0x295b08)break;else _0x29775d['push'](_0x29775d['shift']());}catch(_0x5171f1){_0x29775d['push'](_0x29775d['shift']());}}}(a146_0x2778,0xc7aca));import a146_0xfa7449 from'node:crypto';import{readFile}from'node:fs/promises';export function serializePageSchemaForFile(_0x1f33c0){const _0x1d40d0=a146_0x3053;return JSON[_0x1d40d0(0x11c)](JSON[_0x1d40d0(0x115)](_0x1f33c0),null,0x2)+'\x0a';}export function computePageContentHash(_0x4aa680){const _0xf8d78a=a146_0x3053;return a146_0xfa7449[_0xf8d78a(0x117)](_0xf8d78a(0x123))[_0xf8d78a(0x120)](_0x4aa680)[_0xf8d78a(0x11a)](_0xf8d78a(0x114));}export function computeSerializedSchemaHash(_0x47b2de){return computePageContentHash(serializePageSchemaForFile(_0x47b2de));}function a146_0x2778(){const _0x3ed803=['171PbzVYA','4hJIsoO','hex','parse','117905tTNvpn','createHash','4107272JlkpDI','2071242bOSTXL','digest','673945ZWctPK','stringify','3464489BydRkR','utf8','2482010FARvlL','update','26VMnyPT','3189894EorOsA','md5'];a146_0x2778=function(){return _0x3ed803;};return a146_0x2778();}export async function computePageFileHash(_0x3609b0){const _0x3233ac=a146_0x3053,_0x15757e=await readFile(_0x3609b0,_0x3233ac(0x11e));return computePageContentHash(_0x15757e);}
1
+ (function(_0x4f40a2,_0xf392ff){const _0xd76393=a146_0x2d3c,_0x25465a=_0x4f40a2();while(!![]){try{const _0x4dbd27=parseInt(_0xd76393(0x1f2))/0x1+parseInt(_0xd76393(0x1f5))/0x2+parseInt(_0xd76393(0x1f6))/0x3*(-parseInt(_0xd76393(0x1f4))/0x4)+parseInt(_0xd76393(0x1f1))/0x5+-parseInt(_0xd76393(0x1ef))/0x6+parseInt(_0xd76393(0x1ed))/0x7+-parseInt(_0xd76393(0x1ec))/0x8*(parseInt(_0xd76393(0x1ee))/0x9);if(_0x4dbd27===_0xf392ff)break;else _0x25465a['push'](_0x25465a['shift']());}catch(_0x498c51){_0x25465a['push'](_0x25465a['shift']());}}}(a146_0x2bdf,0xb9422));import a146_0x1f81d5 from'node:crypto';function a146_0x2d3c(_0x3f2662,_0x270795){_0x3f2662=_0x3f2662-0x1ec;const _0x2bdf00=a146_0x2bdf();let _0x2d3c3f=_0x2bdf00[_0x3f2662];return _0x2d3c3f;}import{readFile}from'node:fs/promises';export function serializePageSchemaForFile(_0x1db6c1){const _0x56e725=a146_0x2d3c;return JSON[_0x56e725(0x1f8)](JSON[_0x56e725(0x1f0)](_0x1db6c1),null,0x2)+'\x0a';}function a146_0x2bdf(){const _0xa59f0c=['53559CxArMP','5932344vVILzz','parse','2222050qOQvPu','1248265OTWzBY','digest','2214304tgAMpy','1092010jgeYAU','6UXRXba','hex','stringify','328zEYQJS','6020035YqBQUi'];a146_0x2bdf=function(){return _0xa59f0c;};return a146_0x2bdf();}export function computePageContentHash(_0x2baaab){const _0x3543dd=a146_0x2d3c;return a146_0x1f81d5['createHash']('md5')['update'](_0x2baaab)[_0x3543dd(0x1f3)](_0x3543dd(0x1f7));}export function computeSerializedSchemaHash(_0x321aab){return computePageContentHash(serializePageSchemaForFile(_0x321aab));}export async function computePageFileHash(_0x4f71b2){const _0x52c510=await readFile(_0x4f71b2,'utf8');return computePageContentHash(_0x52c510);}
@@ -1 +1 @@
1
- function a147_0x3a78(){const _0x3396ce=['8AIMVDC','apps','6ktUAkH','495860fOtnnS','pages','6589iGyOch','17050eTuyIr','stringify','5839717LgLVHK','parse','209763stybnz','6323MHXZgh','object','224FEewSQ','193774GHDcRd','1128093uHKQPi','394bVNvmu','48avxKbs','lastSync'];a147_0x3a78=function(){return _0x3396ce;};return a147_0x3a78();}(function(_0x40e07d,_0x4d4aa1){const _0x4e137a=a147_0x154c,_0x1d7c67=_0x40e07d();while(!![]){try{const _0x329be5=parseInt(_0x4e137a(0x87))/0x1*(-parseInt(_0x4e137a(0x8c))/0x2)+-parseInt(_0x4e137a(0x8b))/0x3+-parseInt(_0x4e137a(0x8f))/0x4*(-parseInt(_0x4e137a(0x7f))/0x5)+parseInt(_0x4e137a(0x7e))/0x6*(-parseInt(_0x4e137a(0x8a))/0x7)+parseInt(_0x4e137a(0x89))/0x8*(-parseInt(_0x4e137a(0x86))/0x9)+parseInt(_0x4e137a(0x82))/0xa*(parseInt(_0x4e137a(0x81))/0xb)+parseInt(_0x4e137a(0x8d))/0xc*(parseInt(_0x4e137a(0x84))/0xd);if(_0x329be5===_0x4d4aa1)break;else _0x1d7c67['push'](_0x1d7c67['shift']());}catch(_0x7068ba){_0x1d7c67['push'](_0x1d7c67['shift']());}}}(a147_0x3a78,0xae727));function a147_0x154c(_0x335dd4,_0x2f3d09){_0x335dd4=_0x335dd4-0x7e;const _0x3a78b3=a147_0x3a78();let _0x154c91=_0x3a78b3[_0x335dd4];return _0x154c91;}import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptyPageLock(){return{'apps':{}};}export function ensurePageLockScope(_0x3fd09f,_0x57b768){const _0x5a6c6c=a147_0x154c,_0x5eda1f={'apps':_0x3fd09f['apps']&&typeof _0x3fd09f[_0x5a6c6c(0x90)]===_0x5a6c6c(0x88)?_0x3fd09f[_0x5a6c6c(0x90)]:{}};let _0x3496c6=_0x5eda1f[_0x5a6c6c(0x90)][_0x57b768];if(!_0x3496c6)return _0x3496c6={'lastSync':'','pages':{}},_0x5eda1f[_0x5a6c6c(0x90)][_0x57b768]=_0x3496c6,{'lockData':_0x5eda1f,'appLock':_0x3496c6};return!_0x3496c6[_0x5a6c6c(0x8e)]&&(_0x3496c6[_0x5a6c6c(0x8e)]=''),(!_0x3496c6[_0x5a6c6c(0x80)]||typeof _0x3496c6['pages']!=='object')&&(_0x3496c6[_0x5a6c6c(0x80)]={}),{'lockData':_0x5eda1f,'appLock':_0x3496c6};}export async function readPageLockFile(_0x44561b){const _0x8ceb09=a147_0x154c;try{const _0x19a42f=await readFile(_0x44561b,'utf8'),_0x4a9b37=JSON[_0x8ceb09(0x85)](_0x19a42f);return{'apps':_0x4a9b37[_0x8ceb09(0x90)]&&typeof _0x4a9b37['apps']===_0x8ceb09(0x88)?_0x4a9b37[_0x8ceb09(0x90)]:{}};}catch(_0x4448dc){if(_0x4448dc['code']==='ENOENT')return null;throw new Error('Failed\x20to\x20read\x20page\x20lock\x20file:\x20'+String(_0x4448dc));}}export async function writePageLockFile(_0x4fc709,_0x12dd41){const _0x37f2ba=a147_0x154c;await mkdir(dirname(_0x4fc709),{'recursive':!![]}),await writeFile(_0x4fc709,JSON[_0x37f2ba(0x83)](_0x12dd41,null,0x2),'utf8');}
1
+ (function(_0x44ca6a,_0x9a48a5){const _0x17fa29=a147_0x5cf8,_0x4bdec5=_0x44ca6a();while(!![]){try{const _0x38f5a9=parseInt(_0x17fa29(0xaa))/0x1*(-parseInt(_0x17fa29(0xa9))/0x2)+parseInt(_0x17fa29(0xac))/0x3*(-parseInt(_0x17fa29(0xb5))/0x4)+parseInt(_0x17fa29(0xae))/0x5*(parseInt(_0x17fa29(0xb6))/0x6)+parseInt(_0x17fa29(0xb4))/0x7*(-parseInt(_0x17fa29(0xb8))/0x8)+-parseInt(_0x17fa29(0xaf))/0x9*(-parseInt(_0x17fa29(0xb3))/0xa)+parseInt(_0x17fa29(0xb9))/0xb+parseInt(_0x17fa29(0xba))/0xc*(-parseInt(_0x17fa29(0xb1))/0xd);if(_0x38f5a9===_0x9a48a5)break;else _0x4bdec5['push'](_0x4bdec5['shift']());}catch(_0x50a630){_0x4bdec5['push'](_0x4bdec5['shift']());}}}(a147_0x4371,0xf326f));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptyPageLock(){return{'apps':{}};}function a147_0x4371(){const _0x4abd6e=['21355RtCbOc','9BqFAag','pages','13ghftWs','object','10643190XjGBbK','2303agtPmf','64968YVKRqN','2412NnInXe','ENOENT','30432vICRzR','15741187jUAgTN','4405932zAQPxL','apps','utf8','588ydcmPZ','2009GBnZKL','lastSync','186FskhTP','code'];a147_0x4371=function(){return _0x4abd6e;};return a147_0x4371();}export function ensurePageLockScope(_0x345da7,_0x5200de){const _0x2d5aca=a147_0x5cf8,_0x2ec0b9={'apps':_0x345da7['apps']&&typeof _0x345da7[_0x2d5aca(0xa7)]===_0x2d5aca(0xb2)?_0x345da7[_0x2d5aca(0xa7)]:{}};let _0x287aed=_0x2ec0b9[_0x2d5aca(0xa7)][_0x5200de];if(!_0x287aed)return _0x287aed={'lastSync':'','pages':{}},_0x2ec0b9[_0x2d5aca(0xa7)][_0x5200de]=_0x287aed,{'lockData':_0x2ec0b9,'appLock':_0x287aed};return!_0x287aed[_0x2d5aca(0xab)]&&(_0x287aed[_0x2d5aca(0xab)]=''),(!_0x287aed[_0x2d5aca(0xb0)]||typeof _0x287aed[_0x2d5aca(0xb0)]!==_0x2d5aca(0xb2))&&(_0x287aed[_0x2d5aca(0xb0)]={}),{'lockData':_0x2ec0b9,'appLock':_0x287aed};}export async function readPageLockFile(_0x44414f){const _0x24a08f=a147_0x5cf8;try{const _0x53aacd=await readFile(_0x44414f,_0x24a08f(0xa8)),_0x2d0660=JSON['parse'](_0x53aacd);return{'apps':_0x2d0660[_0x24a08f(0xa7)]&&typeof _0x2d0660[_0x24a08f(0xa7)]===_0x24a08f(0xb2)?_0x2d0660['apps']:{}};}catch(_0x2f8317){if(_0x2f8317[_0x24a08f(0xad)]===_0x24a08f(0xb7))return null;throw new Error('Failed\x20to\x20read\x20page\x20lock\x20file:\x20'+String(_0x2f8317));}}function a147_0x5cf8(_0x524378,_0x2aed7a){_0x524378=_0x524378-0xa7;const _0x4371d1=a147_0x4371();let _0x5cf802=_0x4371d1[_0x524378];return _0x5cf802;}export async function writePageLockFile(_0x46ec8a,_0x33ef96){const _0x35f0e4=a147_0x5cf8;await mkdir(dirname(_0x46ec8a),{'recursive':!![]}),await writeFile(_0x46ec8a,JSON['stringify'](_0x33ef96,null,0x2),_0x35f0e4(0xa8));}
@@ -1 +1 @@
1
- (function(_0xd5d819,_0x4d47cf){const _0xc58a7f=a149_0x1898,_0x1b27ea=_0xd5d819();while(!![]){try{const _0x36ab77=parseInt(_0xc58a7f(0x1eb))/0x1*(-parseInt(_0xc58a7f(0x1e1))/0x2)+parseInt(_0xc58a7f(0x1e9))/0x3*(-parseInt(_0xc58a7f(0x1ed))/0x4)+parseInt(_0xc58a7f(0x1e8))/0x5*(-parseInt(_0xc58a7f(0x1ec))/0x6)+parseInt(_0xc58a7f(0x1e2))/0x7*(parseInt(_0xc58a7f(0x1e4))/0x8)+-parseInt(_0xc58a7f(0x1e3))/0x9+-parseInt(_0xc58a7f(0x1e6))/0xa*(-parseInt(_0xc58a7f(0x1e7))/0xb)+parseInt(_0xc58a7f(0x1e5))/0xc;if(_0x36ab77===_0x4d47cf)break;else _0x1b27ea['push'](_0x1b27ea['shift']());}catch(_0x45506f){_0x1b27ea['push'](_0x1b27ea['shift']());}}}(a149_0x532d,0x2911d));import{resolve}from'node:path';function a149_0x532d(){const _0x2f9c91=['77Tnotmn','15gmlUzY','2463KCmDPX','/sql','1NBbKYm','614598vTbjbx','624oUGqbP','451942MhlEbA','1358OECdVC','2503107LCJZVU','2720JFpcVu','11010516FwPhcW','177410xFUKSv'];a149_0x532d=function(){return _0x2f9c91;};return a149_0x532d();}function a149_0x1898(_0x1025d4,_0x25e62a){_0x1025d4=_0x1025d4-0x1e1;const _0x532dff=a149_0x532d();let _0x18985c=_0x532dff[_0x1025d4];return _0x18985c;}import{findProjectRootDirectory}from'../../context.js';const DOT_DIR='.rabetbase',LOCK_FILE_NAME='sql.lock.json',TRASH_DIR_NAME='sql-trash';export function loadSqlProjectConfig(_0xf19bdc,_0x1d47c3){const _0x33caea=a149_0x1898,_0x2dd32e=resolve(_0x1d47c3??findProjectRootDirectory()),_0x3b8f5c=DOT_DIR+_0x33caea(0x1ea),_0x33e44c=_0x3b8f5c+'/'+_0xf19bdc;return{'projectRoot':_0x2dd32e,'appCode':_0xf19bdc,'sqlWorkspaceRoot':_0x3b8f5c,'sqlRoot':_0x33e44c,'sqlRootDir':resolve(_0x2dd32e,DOT_DIR,'sql',_0xf19bdc),'lockFilePath':resolve(_0x2dd32e,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x2dd32e,DOT_DIR,TRASH_DIR_NAME)};}
1
+ const a149_0x386544=a149_0x2598;function a149_0x593f(){const _0x5cc344=['14icELVa','sql-trash','78150gEIAJv','839586SGrYNl','2810220mKhqlm','3339765RfiKlS','1233GTiKAr','3020108lgQako','/sql','41176OUMlMb','1360736seOFcM','sql','18kXLSIJ'];a149_0x593f=function(){return _0x5cc344;};return a149_0x593f();}(function(_0x54b2d6,_0x261553){const _0x103e35=a149_0x2598,_0x2b3ed6=_0x54b2d6();while(!![]){try{const _0x4d3f12=-parseInt(_0x103e35(0x18d))/0x1*(-parseInt(_0x103e35(0x197))/0x2)+parseInt(_0x103e35(0x192))/0x3+-parseInt(_0x103e35(0x195))/0x4+-parseInt(_0x103e35(0x193))/0x5+-parseInt(_0x103e35(0x191))/0x6+parseInt(_0x103e35(0x18e))/0x7*(-parseInt(_0x103e35(0x198))/0x8)+-parseInt(_0x103e35(0x194))/0x9*(-parseInt(_0x103e35(0x190))/0xa);if(_0x4d3f12===_0x261553)break;else _0x2b3ed6['push'](_0x2b3ed6['shift']());}catch(_0x5df8ed){_0x2b3ed6['push'](_0x2b3ed6['shift']());}}}(a149_0x593f,0x73f04));import{resolve}from'node:path';import{findProjectRootDirectory}from'../../context.js';function a149_0x2598(_0x2d800c,_0x1ea2b9){_0x2d800c=_0x2d800c-0x18d;const _0x593fb6=a149_0x593f();let _0x259874=_0x593fb6[_0x2d800c];return _0x259874;}const DOT_DIR='.rabetbase',LOCK_FILE_NAME='sql.lock.json',TRASH_DIR_NAME=a149_0x386544(0x18f);export function loadSqlProjectConfig(_0x37f7a7,_0x3dc72a){const _0x412913=a149_0x386544,_0x1c5026=resolve(_0x3dc72a??findProjectRootDirectory()),_0x40757d=DOT_DIR+_0x412913(0x196),_0x44673b=_0x40757d+'/'+_0x37f7a7;return{'projectRoot':_0x1c5026,'appCode':_0x37f7a7,'sqlWorkspaceRoot':_0x40757d,'sqlRoot':_0x44673b,'sqlRootDir':resolve(_0x1c5026,DOT_DIR,_0x412913(0x199),_0x37f7a7),'lockFilePath':resolve(_0x1c5026,DOT_DIR,LOCK_FILE_NAME),'trashDir':resolve(_0x1c5026,DOT_DIR,TRASH_DIR_NAME)};}
@@ -1 +1 @@
1
- (function(_0x300e6f,_0x475460){const _0x33d3f3=a150_0xb26a,_0x383422=_0x300e6f();while(!![]){try{const _0x18e2a4=parseInt(_0x33d3f3(0x11a))/0x1+parseInt(_0x33d3f3(0x11c))/0x2+parseInt(_0x33d3f3(0x113))/0x3*(-parseInt(_0x33d3f3(0x117))/0x4)+parseInt(_0x33d3f3(0x125))/0x5*(parseInt(_0x33d3f3(0x11b))/0x6)+parseInt(_0x33d3f3(0x116))/0x7*(-parseInt(_0x33d3f3(0x122))/0x8)+-parseInt(_0x33d3f3(0x111))/0x9+parseInt(_0x33d3f3(0x123))/0xa;if(_0x18e2a4===_0x475460)break;else _0x383422['push'](_0x383422['shift']());}catch(_0x12ea46){_0x383422['push'](_0x383422['shift']());}}}(a150_0x7946,0x9a779));import{readdir,stat}from'node:fs/promises';import{extname,join,relative}from'node:path';import{buildDefaultSqlFileName,buildSqlRelativePath}from'./utils.js';function extensionToMode(_0x309a64){const _0x42d20c=a150_0xb26a;if(_0x309a64===_0x42d20c(0x126))return _0x42d20c(0x11f);if(_0x309a64==='.xml')return _0x42d20c(0x121);return undefined;}async function scanSqlFilesRecursively(_0x55b0f8,_0x7c5623){const _0x2511f8=a150_0xb26a,_0x29098a=[];try{const _0x352801=await readdir(_0x55b0f8,{'withFileTypes':!![]});for(const _0x573b58 of _0x352801){const _0x3fb38d=join(_0x55b0f8,_0x573b58[_0x2511f8(0x120)]);if(_0x573b58['isDirectory']()){_0x29098a[_0x2511f8(0x124)](...await scanSqlFilesRecursively(_0x3fb38d,_0x7c5623));continue;}if(!_0x573b58['isFile']())continue;const _0x49ce34=extname(_0x573b58[_0x2511f8(0x120)])['toLowerCase'](),_0x3687df=extensionToMode(_0x49ce34);if(!_0x3687df)continue;const _0xd01a94=relative(_0x7c5623,_0x3fb38d)[_0x2511f8(0x11d)](/\\/g,'/'),_0x490680=_0xd01a94[_0x2511f8(0x128)]('/')[_0x2511f8(0x12b)](Boolean),_0x4a5af1=parseSqlPath(_0x490680,_0x573b58[_0x2511f8(0x120)],_0x49ce34);if(!_0x4a5af1)continue;_0x29098a['push']({'sqlCode':_0x4a5af1[_0x2511f8(0x12c)],'sqlName':_0x4a5af1['sqlName'],'dbDirectory':_0x490680[0x0],'filePath':_0x3fb38d,'relativePath':_0xd01a94,'lockKey':_0x4a5af1['sqlCode'],'mode':_0x3687df});}}catch(_0x397da6){if(_0x397da6[_0x2511f8(0x12e)]!=='ENOENT')throw _0x397da6;}return _0x29098a;}export async function scanLocalSqlQueries(_0x1a9202){const _0x1b218a=a150_0xb26a;return scanSqlFilesRecursively(_0x1a9202[_0x1b218a(0x112)],_0x1a9202[_0x1b218a(0x112)]);}function a150_0xb26a(_0xfb844c,_0x449e78){_0xfb844c=_0xfb844c-0x111;const _0x7946a7=a150_0x7946();let _0xb26a2=_0x7946a7[_0xfb844c];return _0xb26a2;}export function resolveLocalSqlFilePath(_0x2affc3,_0x248116,_0x370924){const _0x525974=a150_0xb26a,_0x817bb7=_0x370924?.[_0x525974(0x12a)]||(_0x370924?.[_0x525974(0x11e)]||_0x370924?.['dbName']?buildSqlRelativePath(_0x248116,_0x370924?.[_0x525974(0x11e)],_0x370924?.['dbName'],_0x370924?.[_0x525974(0x127)]||_0x525974(0x11f),_0x370924?.[_0x525974(0x114)]):buildDefaultSqlFileName(_0x248116,_0x370924?.[_0x525974(0x127)]||_0x525974(0x11f)));return join(_0x2affc3[_0x525974(0x112)],_0x817bb7);}export async function directoryExists(_0x497f65){const _0x3a08a4=a150_0xb26a;try{const _0x419e3b=await stat(_0x497f65);return _0x419e3b[_0x3a08a4(0x12d)]();}catch{return![];}}function a150_0x7946(){const _0x334ccf=['path','filter','sqlCode','isDirectory','code','212526CTmnzA','sqlRootDir','346671VqupXv','dbId','indexOf','8719809DcZhRM','16UMLzgz','slice','test','12156uJIQvt','41502lmftzK','1378762zGoWWt','replace','sqlName','sql','name','mybatisXml','8ZJuWHY','11300800gutJSH','push','385uKcgNq','.sql','mode','split','length'];a150_0x7946=function(){return _0x334ccf;};return a150_0x7946();}function parseSqlPath(_0x35f633,_0x385b4d,_0x4204d1){const _0x15ca90=a150_0xb26a,_0x2a45cd=_0x385b4d[_0x15ca90(0x118)](0x0,-_0x4204d1['length']);if(_0x35f633['length']<0x2)return null;const _0x10832b=_0x2a45cd[_0x15ca90(0x115)]('_');if(_0x10832b<=0x0||_0x10832b>=_0x2a45cd[_0x15ca90(0x129)]-0x1)return null;const _0x374e85=_0x2a45cd[_0x15ca90(0x118)](0x0,_0x10832b);if(!isLikelySqlCode(_0x374e85))return null;return{'sqlCode':_0x374e85,'sqlName':_0x2a45cd[_0x15ca90(0x118)](_0x10832b+0x1)};}function isLikelySqlCode(_0x35514e){const _0x5a059a=a150_0xb26a;return/^[A-Za-z0-9-]+-[A-Za-z0-9-]+$/[_0x5a059a(0x119)](_0x35514e);}
1
+ (function(_0x3b2429,_0x431f04){const _0x2e96d2=a150_0x4775,_0x12b4e4=_0x3b2429();while(!![]){try{const _0x2bf2ba=parseInt(_0x2e96d2(0xc4))/0x1+-parseInt(_0x2e96d2(0xb5))/0x2+parseInt(_0x2e96d2(0xc9))/0x3*(-parseInt(_0x2e96d2(0xb9))/0x4)+parseInt(_0x2e96d2(0xc1))/0x5*(parseInt(_0x2e96d2(0xb8))/0x6)+parseInt(_0x2e96d2(0xb1))/0x7+-parseInt(_0x2e96d2(0xbf))/0x8+parseInt(_0x2e96d2(0xad))/0x9;if(_0x2bf2ba===_0x431f04)break;else _0x12b4e4['push'](_0x12b4e4['shift']());}catch(_0x42ad36){_0x12b4e4['push'](_0x12b4e4['shift']());}}}(a150_0x2fb0,0xdef50));import{readdir,stat}from'node:fs/promises';import{extname,join,relative}from'node:path';function a150_0x4775(_0xa3df5e,_0x1eb9ae){_0xa3df5e=_0xa3df5e-0xab;const _0x2fb0da=a150_0x2fb0();let _0x4775af=_0x2fb0da[_0xa3df5e];return _0x4775af;}import{buildDefaultSqlFileName,buildSqlRelativePath}from'./utils.js';function extensionToMode(_0x3a2581){const _0x534981=a150_0x4775;if(_0x3a2581===_0x534981(0xc5))return _0x534981(0xc6);if(_0x3a2581===_0x534981(0xbb))return _0x534981(0xb6);return undefined;}async function scanSqlFilesRecursively(_0x348166,_0x5ecc84){const _0x5ceb4=a150_0x4775,_0x208da4=[];try{const _0x13c5fe=await readdir(_0x348166,{'withFileTypes':!![]});for(const _0x3e0a22 of _0x13c5fe){const _0x5163d4=join(_0x348166,_0x3e0a22[_0x5ceb4(0xb3)]);if(_0x3e0a22['isDirectory']()){_0x208da4[_0x5ceb4(0xbd)](...await scanSqlFilesRecursively(_0x5163d4,_0x5ecc84));continue;}if(!_0x3e0a22[_0x5ceb4(0xc0)]())continue;const _0x52fbc4=extname(_0x3e0a22[_0x5ceb4(0xb3)])[_0x5ceb4(0xb7)](),_0x4a9aa3=extensionToMode(_0x52fbc4);if(!_0x4a9aa3)continue;const _0x3bbb8e=relative(_0x5ecc84,_0x5163d4)[_0x5ceb4(0xac)](/\\/g,'/'),_0x39e7b3=_0x3bbb8e[_0x5ceb4(0xab)]('/')[_0x5ceb4(0xbe)](Boolean),_0x57330d=parseSqlPath(_0x39e7b3,_0x3e0a22[_0x5ceb4(0xb3)],_0x52fbc4);if(!_0x57330d)continue;_0x208da4[_0x5ceb4(0xbd)]({'sqlCode':_0x57330d['sqlCode'],'sqlName':_0x57330d[_0x5ceb4(0xc2)],'dbDirectory':_0x39e7b3[0x0],'filePath':_0x5163d4,'relativePath':_0x3bbb8e,'lockKey':_0x57330d[_0x5ceb4(0xbc)],'mode':_0x4a9aa3});}}catch(_0x487ef7){if(_0x487ef7[_0x5ceb4(0xc7)]!==_0x5ceb4(0xc3))throw _0x487ef7;}return _0x208da4;}export async function scanLocalSqlQueries(_0x2db18d){const _0x1110b6=a150_0x4775;return scanSqlFilesRecursively(_0x2db18d[_0x1110b6(0xba)],_0x2db18d[_0x1110b6(0xba)]);}export function resolveLocalSqlFilePath(_0x35492c,_0x46fd66,_0x2e51bc){const _0x596ab1=a150_0x4775,_0x4e970=_0x2e51bc?.['path']||(_0x2e51bc?.[_0x596ab1(0xc2)]||_0x2e51bc?.[_0x596ab1(0xb4)]?buildSqlRelativePath(_0x46fd66,_0x2e51bc?.[_0x596ab1(0xc2)],_0x2e51bc?.[_0x596ab1(0xb4)],_0x2e51bc?.[_0x596ab1(0xaf)]||_0x596ab1(0xc6),_0x2e51bc?.['dbId']):buildDefaultSqlFileName(_0x46fd66,_0x2e51bc?.[_0x596ab1(0xaf)]||_0x596ab1(0xc6)));return join(_0x35492c[_0x596ab1(0xba)],_0x4e970);}export async function directoryExists(_0x25a90c){const _0x55fe2d=a150_0x4775;try{const _0x28a025=await stat(_0x25a90c);return _0x28a025[_0x55fe2d(0xca)]();}catch{return![];}}function a150_0x2fb0(){const _0x5bb420=['length','3tNKtQz','isDirectory','split','replace','289080oEskuV','test','mode','indexOf','9877056LWglVw','slice','name','dbName','2989148KgzOPQ','mybatisXml','toLowerCase','6OWtwdI','2593904SKXzXN','sqlRootDir','.xml','sqlCode','push','filter','4221696jRzgjc','isFile','8030315cWgaqT','sqlName','ENOENT','534803upsxDt','.sql','sql','code'];a150_0x2fb0=function(){return _0x5bb420;};return a150_0x2fb0();}function parseSqlPath(_0x59d24d,_0x4fa39b,_0x4b083e){const _0x4a672a=a150_0x4775,_0x4eee31=_0x4fa39b[_0x4a672a(0xb2)](0x0,-_0x4b083e[_0x4a672a(0xc8)]);if(_0x59d24d[_0x4a672a(0xc8)]<0x2)return null;const _0x427c8f=_0x4eee31[_0x4a672a(0xb0)]('_');if(_0x427c8f<=0x0||_0x427c8f>=_0x4eee31[_0x4a672a(0xc8)]-0x1)return null;const _0x2472bd=_0x4eee31[_0x4a672a(0xb2)](0x0,_0x427c8f);if(!isLikelySqlCode(_0x2472bd))return null;return{'sqlCode':_0x2472bd,'sqlName':_0x4eee31[_0x4a672a(0xb2)](_0x427c8f+0x1)};}function isLikelySqlCode(_0x31cca7){const _0x1c6288=a150_0x4775;return/^[A-Za-z0-9-]+-[A-Za-z0-9-]+$/[_0x1c6288(0xae)](_0x31cca7);}
@@ -1 +1 @@
1
- function a151_0x3600(_0x2dc668,_0x306312){_0x2dc668=_0x2dc668-0x1ab;const _0x11afe5=a151_0x11af();let _0x360005=_0x11afe5[_0x2dc668];return _0x360005;}(function(_0xd5c7bb,_0x3396ec){const _0x6b1b92=a151_0x3600,_0x43b097=_0xd5c7bb();while(!![]){try{const _0x3b226a=-parseInt(_0x6b1b92(0x1b7))/0x1*(-parseInt(_0x6b1b92(0x1ad))/0x2)+parseInt(_0x6b1b92(0x1b2))/0x3+parseInt(_0x6b1b92(0x1b6))/0x4*(parseInt(_0x6b1b92(0x1b5))/0x5)+parseInt(_0x6b1b92(0x1b3))/0x6*(parseInt(_0x6b1b92(0x1ab))/0x7)+-parseInt(_0x6b1b92(0x1b0))/0x8+parseInt(_0x6b1b92(0x1ae))/0x9*(-parseInt(_0x6b1b92(0x1af))/0xa)+-parseInt(_0x6b1b92(0x1b4))/0xb*(parseInt(_0x6b1b92(0x1ba))/0xc);if(_0x3b226a===_0x3396ec)break;else _0x43b097['push'](_0x43b097['shift']());}catch(_0x44cac7){_0x43b097['push'](_0x43b097['shift']());}}}(a151_0x11af,0x68882));import{readFile}from'node:fs/promises';function a151_0x11af(){const _0x145efc=['18211TYavGZ','utf8','digest','21394356ijzmmw','49jwkyhl','update','62ibueWJ','4527jcZeIj','1880GEhmEb','421672izPLyV','createHash','1967835ANHIlv','718056ZRPoJt','11JZDpDz','5KtkgBM','1200320OrsjRT'];a151_0x11af=function(){return _0x145efc;};return a151_0x11af();}import a151_0x397670 from'node:crypto';export function computeSqlContentHash(_0x1873af){const _0x37c99b=a151_0x3600;return a151_0x397670[_0x37c99b(0x1b1)]('md5')[_0x37c99b(0x1ac)](_0x1873af)[_0x37c99b(0x1b9)]('hex');}export async function computeSqlFileHash(_0x35bca7){const _0x453d3d=a151_0x3600,_0x1073ce=await readFile(_0x35bca7,_0x453d3d(0x1b8));return computeSqlContentHash(_0x1073ce);}
1
+ (function(_0x4fcca2,_0x125783){const _0x40d4e1=a151_0x54b9,_0x59e01a=_0x4fcca2();while(!![]){try{const _0x50b7d3=-parseInt(_0x40d4e1(0x109))/0x1*(-parseInt(_0x40d4e1(0x112))/0x2)+parseInt(_0x40d4e1(0x108))/0x3+parseInt(_0x40d4e1(0x10a))/0x4*(-parseInt(_0x40d4e1(0x10b))/0x5)+parseInt(_0x40d4e1(0x10e))/0x6*(parseInt(_0x40d4e1(0x10f))/0x7)+-parseInt(_0x40d4e1(0x10c))/0x8*(-parseInt(_0x40d4e1(0x111))/0x9)+parseInt(_0x40d4e1(0x113))/0xa+-parseInt(_0x40d4e1(0x107))/0xb;if(_0x50b7d3===_0x125783)break;else _0x59e01a['push'](_0x59e01a['shift']());}catch(_0x1ea1b2){_0x59e01a['push'](_0x59e01a['shift']());}}}(a151_0x4390,0x26852));import{readFile}from'node:fs/promises';import a151_0x2f6f44 from'node:crypto';function a151_0x54b9(_0x12d9b1,_0x37343e){_0x12d9b1=_0x12d9b1-0x106;const _0x4390af=a151_0x4390();let _0x54b94d=_0x4390af[_0x12d9b1];return _0x54b94d;}export function computeSqlContentHash(_0x33c2ae){const _0xacb9b0=a151_0x54b9;return a151_0x2f6f44[_0xacb9b0(0x10d)](_0xacb9b0(0x114))[_0xacb9b0(0x115)](_0x33c2ae)[_0xacb9b0(0x110)]('hex');}function a151_0x4390(){const _0x486eb7=['1502340cnBmWr','md5','update','utf8','4444858QjeAvA','644196GgIiJt','6853zAHXWN','87964JnScOn','45ElySPV','40libmnw','createHash','398724paHiHu','7ieYgIJ','digest','35946EdNjKQ','90qGPBGs'];a151_0x4390=function(){return _0x486eb7;};return a151_0x4390();}export async function computeSqlFileHash(_0x15d909){const _0x5896b0=a151_0x54b9,_0x233ca0=await readFile(_0x15d909,_0x5896b0(0x106));return computeSqlContentHash(_0x233ca0);}
@@ -1 +1 @@
1
- (function(_0x4f4c62,_0x11df57){const _0x1991c8=a152_0x593c,_0x9dc9eb=_0x4f4c62();while(!![]){try{const _0x281f53=-parseInt(_0x1991c8(0x149))/0x1+-parseInt(_0x1991c8(0x137))/0x2+parseInt(_0x1991c8(0x147))/0x3*(parseInt(_0x1991c8(0x148))/0x4)+-parseInt(_0x1991c8(0x13e))/0x5+parseInt(_0x1991c8(0x13f))/0x6+parseInt(_0x1991c8(0x13b))/0x7*(-parseInt(_0x1991c8(0x139))/0x8)+-parseInt(_0x1991c8(0x144))/0x9*(-parseInt(_0x1991c8(0x140))/0xa);if(_0x281f53===_0x11df57)break;else _0x9dc9eb['push'](_0x9dc9eb['shift']());}catch(_0x3e617f){_0x9dc9eb['push'](_0x9dc9eb['shift']());}}}(a152_0x444b,0x1f93e));import{mkdir,readFile,writeFile}from'node:fs/promises';function a152_0x444b(){const _0x285203=['296WbarJK','58376DKCWWK','sqls','Check\x20.rabetbase/sql.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.','403464EujLsD','apps','48MMKNmm','lastSync','149443iTRCpy','utf8','\x22\x20vs\x20lock\x20\x22','1203625QeQLbd','1055718SfZGvr','240yzCcOp','code','ENOENT',':\x20sqlRoot\x20mismatch\x20—\x20current\x20\x22','198333rISHQj','sqlRoot','stringify','2166JyQbAY'];a152_0x444b=function(){return _0x285203;};return a152_0x444b();}import{dirname}from'node:path';export function createEmptySqlLock(){return{'apps':{}};}export function ensureSqlLockScope(_0xd4fba4,_0x4a2f06,_0xa56759,_0x6c271a){const _0x231ce=a152_0x593c,_0x6529b7=_0xd4fba4??createEmptySqlLock();let _0x56dabc=_0x6529b7[_0x231ce(0x138)][_0x4a2f06];if(!_0x56dabc)return _0x56dabc={'sqlRoot':_0xa56759,'lastSync':'','sqls':{}},_0x6529b7[_0x231ce(0x138)][_0x4a2f06]=_0x56dabc,{'lockData':_0x6529b7,'appLock':_0x56dabc};if(!_0x56dabc['sqlRoot'])_0x56dabc[_0x231ce(0x145)]=_0xa56759;else{if(_0x56dabc[_0x231ce(0x145)]!==_0xa56759)throw new Error(_0x6c271a+_0x231ce(0x143)+_0xa56759+_0x231ce(0x13d)+_0x56dabc[_0x231ce(0x145)]+'\x22.\x20'+_0x231ce(0x136));}return!_0x56dabc[_0x231ce(0x14a)]&&(_0x56dabc[_0x231ce(0x14a)]={}),!_0x56dabc[_0x231ce(0x13a)]&&(_0x56dabc[_0x231ce(0x13a)]=''),{'lockData':_0x6529b7,'appLock':_0x56dabc};}export async function readSqlLockFile(_0x207eb3){const _0x2073ea=a152_0x593c;try{const _0x4c25c2=await readFile(_0x207eb3,'utf8');return JSON['parse'](_0x4c25c2);}catch(_0x2e98db){if(_0x2e98db[_0x2073ea(0x141)]===_0x2073ea(0x142))return null;throw new Error('Failed\x20to\x20read\x20SQL\x20lock\x20file:\x20'+String(_0x2e98db));}}function a152_0x593c(_0x15dc61,_0x37ebe4){_0x15dc61=_0x15dc61-0x136;const _0x444bc4=a152_0x444b();let _0x593cb0=_0x444bc4[_0x15dc61];return _0x593cb0;}export async function writeSqlLockFile(_0x282ccd,_0x2729a5){const _0x4e37df=a152_0x593c;await mkdir(dirname(_0x282ccd),{'recursive':!![]}),await writeFile(_0x282ccd,JSON[_0x4e37df(0x146)](_0x2729a5,null,0x2),_0x4e37df(0x13c));}
1
+ (function(_0x4bf250,_0x40a8c5){const _0x254460=a152_0x2702,_0x104f08=_0x4bf250();while(!![]){try{const _0x4fb3d5=parseInt(_0x254460(0x11b))/0x1+parseInt(_0x254460(0x120))/0x2*(-parseInt(_0x254460(0x126))/0x3)+-parseInt(_0x254460(0x125))/0x4+parseInt(_0x254460(0x114))/0x5*(parseInt(_0x254460(0x116))/0x6)+-parseInt(_0x254460(0x119))/0x7*(parseInt(_0x254460(0x122))/0x8)+parseInt(_0x254460(0x11e))/0x9*(parseInt(_0x254460(0x117))/0xa)+-parseInt(_0x254460(0x11f))/0xb*(-parseInt(_0x254460(0x123))/0xc);if(_0x4fb3d5===_0x40a8c5)break;else _0x104f08['push'](_0x104f08['shift']());}catch(_0x2484e4){_0x104f08['push'](_0x104f08['shift']());}}}(a152_0x3292,0xaa59d));import{mkdir,readFile,writeFile}from'node:fs/promises';import{dirname}from'node:path';export function createEmptySqlLock(){return{'apps':{}};}export function ensureSqlLockScope(_0x11373e,_0x422736,_0x32bd31,_0x538cac){const _0x262c24=a152_0x2702,_0x35965c=_0x11373e??createEmptySqlLock();let _0x56bb7e=_0x35965c[_0x262c24(0x115)][_0x422736];if(!_0x56bb7e)return _0x56bb7e={'sqlRoot':_0x32bd31,'lastSync':'','sqls':{}},_0x35965c[_0x262c24(0x115)][_0x422736]=_0x56bb7e,{'lockData':_0x35965c,'appLock':_0x56bb7e};if(!_0x56bb7e[_0x262c24(0x124)])_0x56bb7e['sqlRoot']=_0x32bd31;else{if(_0x56bb7e[_0x262c24(0x124)]!==_0x32bd31)throw new Error(_0x538cac+':\x20sqlRoot\x20mismatch\x20—\x20current\x20\x22'+_0x32bd31+'\x22\x20vs\x20lock\x20\x22'+_0x56bb7e[_0x262c24(0x124)]+_0x262c24(0x118)+_0x262c24(0x11d));}return!_0x56bb7e['sqls']&&(_0x56bb7e[_0x262c24(0x121)]={}),!_0x56bb7e[_0x262c24(0x111)]&&(_0x56bb7e['lastSync']=''),{'lockData':_0x35965c,'appLock':_0x56bb7e};}function a152_0x3292(){const _0x4b872c=['5397460okSAFC','20319YkBiSB','lastSync','ENOENT','stringify','348130AFtisB','apps','42joyIcS','500kBxxmR','\x22.\x20','100919PgDkBS','utf8','1130897Icvodk','Failed\x20to\x20read\x20SQL\x20lock\x20file:\x20','Check\x20.rabetbase/sql.lock.json\x20or\x20operate\x20from\x20the\x20correct\x20project\x20directory.','118143zvSsAk','8877WhgEnk','370WDqoyj','sqls','400lKKxsf','25968QbIzew','sqlRoot'];a152_0x3292=function(){return _0x4b872c;};return a152_0x3292();}function a152_0x2702(_0x42a3f9,_0x1e504b){_0x42a3f9=_0x42a3f9-0x111;const _0x3292ac=a152_0x3292();let _0x27027c=_0x3292ac[_0x42a3f9];return _0x27027c;}export async function readSqlLockFile(_0x566a5f){const _0x5d351d=a152_0x2702;try{const _0x29bc9a=await readFile(_0x566a5f,'utf8');return JSON['parse'](_0x29bc9a);}catch(_0x33c47f){if(_0x33c47f['code']===_0x5d351d(0x112))return null;throw new Error(_0x5d351d(0x11c)+String(_0x33c47f));}}export async function writeSqlLockFile(_0x5eac6c,_0x4bc09c){const _0x5341dc=a152_0x2702;await mkdir(dirname(_0x5eac6c),{'recursive':!![]}),await writeFile(_0x5eac6c,JSON[_0x5341dc(0x113)](_0x4bc09c,null,0x2),_0x5341dc(0x11a));}
@@ -1 +1 @@
1
- (function(_0x1f4bd1,_0x3d27d3){const _0x3f3c75=a154_0x5023,_0x3f6ae3=_0x1f4bd1();while(!![]){try{const _0x131256=-parseInt(_0x3f3c75(0xfa))/0x1+-parseInt(_0x3f3c75(0xf8))/0x2+-parseInt(_0x3f3c75(0xef))/0x3*(-parseInt(_0x3f3c75(0xec))/0x4)+parseInt(_0x3f3c75(0xfd))/0x5*(parseInt(_0x3f3c75(0xee))/0x6)+parseInt(_0x3f3c75(0xfc))/0x7*(-parseInt(_0x3f3c75(0xf6))/0x8)+parseInt(_0x3f3c75(0xf0))/0x9*(-parseInt(_0x3f3c75(0xf1))/0xa)+parseInt(_0x3f3c75(0xfb))/0xb;if(_0x131256===_0x3d27d3)break;else _0x3f6ae3['push'](_0x3f6ae3['shift']());}catch(_0x5703ce){_0x3f6ae3['push'](_0x3f6ae3['shift']());}}}(a154_0x4e3a,0xcd511));function a154_0x4e3a(){const _0x443589=['1216116BNQFhx','43322796uniijA','14gmHvhG','2473690sMBMFM','unknown-db','4273804yTiTBS','replace','6CZfEaM','3PuPLpv','199296fWElqV','560ldBvKf','mybatisXml','.sql','trim','.xml','3756208exGUum','sql','2530832RVmSDG','unknown-sql'];a154_0x4e3a=function(){return _0x443589;};return a154_0x4e3a();}export function detectSqlMode(_0x137863){const _0x4b6693=a154_0x5023,_0x422d90=_0x137863['trimStart']();if(/^<(select|insert|update|delete)\b/i['test'](_0x422d90))return _0x4b6693(0xf2);return _0x4b6693(0xf7);}export function getSqlFileExtension(_0x296e7a){const _0x343681=a154_0x5023;return _0x296e7a==='mybatisXml'?_0x343681(0xf5):_0x343681(0xf3);}function a154_0x5023(_0x23a5fa,_0x5b8b34){_0x23a5fa=_0x23a5fa-0xeb;const _0x4e3a81=a154_0x4e3a();let _0x50236d=_0x4e3a81[_0x23a5fa];return _0x50236d;}export function buildDefaultSqlFileName(_0x16b954,_0x62cb68){return''+_0x16b954+getSqlFileExtension(_0x62cb68);}export function sanitizeSqlPathSegment(_0x2e350e,_0xaac6a3){const _0x55b10c=a154_0x5023,_0x3468fe=String(_0x2e350e??'')[_0x55b10c(0xf4)](),_0x319b25=_0x3468fe[_0x55b10c(0xed)](/[<>:"/\\|?*\u0000-\u001F]/g,'-')[_0x55b10c(0xed)](/\s+/g,'-')[_0x55b10c(0xed)](/-+/g,'-')[_0x55b10c(0xed)](/^\.+/,'')[_0x55b10c(0xed)](/\.+$/,'')[_0x55b10c(0xed)](/^-+/,'')[_0x55b10c(0xed)](/-+$/,'');return _0x319b25||_0xaac6a3;}export function buildDbDirectoryName(_0x2f1af5,_0x259bbe){const _0x322c21=a154_0x5023;return sanitizeSqlPathSegment(_0x2f1af5,_0x259bbe!=null?'db-'+_0x259bbe:_0x322c21(0xeb));}export function buildSqlRelativePath(_0x2de23b,_0x20f903,_0x4091b1,_0x823fa,_0x464eac){const _0x4174b6=a154_0x5023,_0x4a91c1=buildDbDirectoryName(_0x4091b1,_0x464eac),_0x30ff3e=sanitizeSqlPathSegment(_0x2de23b,_0x4174b6(0xf9)),_0x34c904=sanitizeSqlPathSegment(_0x20f903,_0x30ff3e);return _0x4a91c1+'/'+_0x30ff3e+'_'+_0x34c904+getSqlFileExtension(_0x823fa);}
1
+ (function(_0x5a7425,_0x2e2142){const _0x2a2857=a154_0x25d9,_0x1c3a93=_0x5a7425();while(!![]){try{const _0x190262=-parseInt(_0x2a2857(0xe3))/0x1*(parseInt(_0x2a2857(0xdc))/0x2)+-parseInt(_0x2a2857(0xe9))/0x3*(-parseInt(_0x2a2857(0xea))/0x4)+parseInt(_0x2a2857(0xe4))/0x5+-parseInt(_0x2a2857(0xdd))/0x6*(parseInt(_0x2a2857(0xd9))/0x7)+parseInt(_0x2a2857(0xdb))/0x8*(-parseInt(_0x2a2857(0xe2))/0x9)+-parseInt(_0x2a2857(0xe5))/0xa*(-parseInt(_0x2a2857(0xe0))/0xb)+parseInt(_0x2a2857(0xe6))/0xc;if(_0x190262===_0x2e2142)break;else _0x1c3a93['push'](_0x1c3a93['shift']());}catch(_0x579691){_0x1c3a93['push'](_0x1c3a93['shift']());}}}(a154_0x288a,0x9df01));export function detectSqlMode(_0x135dbc){const _0x4af9e6=a154_0x25d9,_0x298f96=_0x135dbc[_0x4af9e6(0xed)]();if(/^<(select|insert|update|delete)\b/i[_0x4af9e6(0xec)](_0x298f96))return _0x4af9e6(0xeb);return _0x4af9e6(0xe7);}export function getSqlFileExtension(_0x2bb231){const _0x53130d=a154_0x25d9;return _0x2bb231===_0x53130d(0xeb)?'.xml':_0x53130d(0xe8);}export function buildDefaultSqlFileName(_0x3b9343,_0x331e97){return''+_0x3b9343+getSqlFileExtension(_0x331e97);}export function sanitizeSqlPathSegment(_0x2db6b9,_0x3a0dd3){const _0x2ad86b=a154_0x25d9,_0x258aad=String(_0x2db6b9??'')[_0x2ad86b(0xe1)](),_0x1ca69f=_0x258aad[_0x2ad86b(0xd8)](/[<>:"/\\|?*\u0000-\u001F]/g,'-')[_0x2ad86b(0xd8)](/\s+/g,'-')[_0x2ad86b(0xd8)](/-+/g,'-')[_0x2ad86b(0xd8)](/^\.+/,'')[_0x2ad86b(0xd8)](/\.+$/,'')['replace'](/^-+/,'')[_0x2ad86b(0xd8)](/-+$/,'');return _0x1ca69f||_0x3a0dd3;}export function buildDbDirectoryName(_0x2ff521,_0x73ab21){const _0x398789=a154_0x25d9;return sanitizeSqlPathSegment(_0x2ff521,_0x73ab21!=null?_0x398789(0xde)+_0x73ab21:_0x398789(0xda));}function a154_0x288a(){const _0x437d91=['30cVbKzD','db-','unknown-sql','6765ySfZyk','trim','14526iSwLyp','1080089PVAEOM','4420155Supqym','260GUFyiP','30924960qVXYUD','sql','.sql','3FYsGJu','324208ItxCII','mybatisXml','test','trimStart','replace','1074535rNzhyO','unknown-db','5272OpOvoT','2TJkJsv'];a154_0x288a=function(){return _0x437d91;};return a154_0x288a();}function a154_0x25d9(_0x30c058,_0x241b87){_0x30c058=_0x30c058-0xd8;const _0x288a71=a154_0x288a();let _0x25d966=_0x288a71[_0x30c058];return _0x25d966;}export function buildSqlRelativePath(_0x13cf0a,_0x10273b,_0xab5a2a,_0x14048c,_0x11294b){const _0x458958=a154_0x25d9,_0x40322e=buildDbDirectoryName(_0xab5a2a,_0x11294b),_0x50e6d7=sanitizeSqlPathSegment(_0x13cf0a,_0x458958(0xdf)),_0x35ec12=sanitizeSqlPathSegment(_0x10273b,_0x50e6d7);return _0x40322e+'/'+_0x50e6d7+'_'+_0x35ec12+getSqlFileExtension(_0x14048c);}