@lovrabet/rabetbase-cli 2.1.7-beta.7 → 2.1.7-beta.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
- const a121_0x2241b2=a121_0x2a66;(function(_0x2aeb29,_0x17077a){const _0x43d5c7=a121_0x2a66,_0x43c209=_0x2aeb29();while(!![]){try{const _0x5b2d2f=parseInt(_0x43d5c7(0xcb))/0x1*(parseInt(_0x43d5c7(0xea))/0x2)+parseInt(_0x43d5c7(0xaf))/0x3*(-parseInt(_0x43d5c7(0xbc))/0x4)+-parseInt(_0x43d5c7(0xd6))/0x5*(parseInt(_0x43d5c7(0xc2))/0x6)+parseInt(_0x43d5c7(0xb9))/0x7+parseInt(_0x43d5c7(0xe5))/0x8*(-parseInt(_0x43d5c7(0xb7))/0x9)+-parseInt(_0x43d5c7(0xcc))/0xa+parseInt(_0x43d5c7(0xce))/0xb;if(_0x5b2d2f===_0x17077a)break;else _0x43c209['push'](_0x43c209['shift']());}catch(_0xb50184){_0x43c209['push'](_0x43c209['shift']());}}}(a121_0x51b7,0x28e0d));import{mkdir,readFile,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';import{updateSqlQuery}from'../../core/api-client.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';import{getDbName,listDatabases}from'../../core/db-resolver.js';import{scanLocalSqlQueries}from'../../core/sql-sync/file-system.js';import{computeSqlFileHash}from'../../core/sql-sync/hash.js';import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile,writeSqlLockFile}from'../../core/sql-sync/lock.js';function a121_0x2a66(_0x5efc8f,_0x1f8300){_0x5efc8f=_0x5efc8f-0xaf;const _0x51b71f=a121_0x51b7();let _0x2a66f6=_0x51b71f[_0x5efc8f];return _0x2a66f6;}import{fileExists}from'../../core/bff/file-system.js';import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{buildSqlLockEntry,stripLocalSqlMetadata}from'./shared.js';import{buildDbDirectoryName}from'../../core/sql-sync/utils.js';async function getTargetSqlQueries(_0x11703a,_0x496b35,_0x441311){const _0x23b569=a121_0x2a66,_0x407f91=await scanLocalSqlQueries(_0x11703a),_0x657ac9=new Map();for(const _0x4617f9 of _0x407f91){if(_0x441311&&_0x4617f9['sqlCode']!==_0x441311)continue;const _0x3f0b58=_0x657ac9[_0x23b569(0xb8)](_0x4617f9[_0x23b569(0xb5)])??[];_0x3f0b58[_0x23b569(0xe8)](_0x4617f9),_0x657ac9[_0x23b569(0xc0)](_0x4617f9['sqlCode'],_0x3f0b58);}if(_0x441311&&!_0x657ac9[_0x23b569(0xbe)](_0x441311))throw CliErrors[_0x23b569(0xd5)](_0x23b569(0xbb)+_0x441311);const _0x2a8ff7=[];for(const [_0x33aaa2,_0x1edff2]of _0x657ac9[_0x23b569(0xd3)]()){if(_0x1edff2[_0x23b569(0xd9)]===0x1){_0x2a8ff7[_0x23b569(0xe8)](_0x1edff2[0x0]);continue;}const _0x2af6e5=_0x496b35[_0x23b569(0xcd)][_0x33aaa2],_0x50e0e8=_0x2af6e5?.[_0x23b569(0xec)],_0x400944=_0x50e0e8?_0x1edff2[_0x23b569(0xba)](_0x4fffee=>_0x4fffee[_0x23b569(0xb0)]!==_0x50e0e8):_0x1edff2;if(_0x2af6e5&&_0x400944[_0x23b569(0xd9)]===0x1){_0x2a8ff7[_0x23b569(0xe8)](_0x400944[0x0]);continue;}throw CliErrors[_0x23b569(0xd5)](_0x23b569(0xe1)+_0x33aaa2+_0x23b569(0xdf));}return _0x2a8ff7;}export const sqlPush={'service':a121_0x2241b2(0xb4),'command':'push','description':'Push\x20local\x20SQL\x20files\x20to\x20remote','risk':a121_0x2241b2(0xc5),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':a121_0x2241b2(0xeb),'type':a121_0x2241b2(0xde),'description':a121_0x2241b2(0xe4)}],async 'dryRun'(_0x271a28){const _0x11344f=a121_0x2241b2,_0x55403d=loadSqlProjectConfig(_0x271a28[_0x11344f(0xed)]),_0x746f1f=await readSqlLockFile(_0x55403d['lockFilePath']),{appLock:_0x4255e7}=ensureSqlLockScope(_0x746f1f??createEmptySqlLock(),_0x271a28[_0x11344f(0xed)],_0x55403d[_0x11344f(0xc9)],_0x11344f(0xe8)),_0x17d9c9=await getTargetSqlQueries(_0x55403d,_0x4255e7,_0x271a28[_0x11344f(0xe7)](_0x11344f(0xe2))||undefined),_0x544867=[];for(const _0x261a4c of _0x17d9c9){const _0x234b82=await computeSqlFileHash(_0x261a4c['filePath']),_0x456284=_0x4255e7[_0x11344f(0xcd)][_0x261a4c['sqlCode']],_0x4bdaf8=!!_0x456284&&(_0x456284[_0x11344f(0xec)]!==_0x261a4c[_0x11344f(0xb0)]||!!_0x261a4c[_0x11344f(0xb1)]&&_0x456284[_0x11344f(0xb1)]!==_0x261a4c['sqlName']);if(!_0x271a28[_0x11344f(0xc1)](_0x11344f(0xeb))&&_0x456284&&_0x456284[_0x11344f(0xd7)]===_0x234b82&&!_0x4bdaf8)continue;_0x544867[_0x11344f(0xe8)](_0x261a4c['sqlCode']);}return{'method':_0x11344f(0xda),'url':'/smartapi/custom/updateUserCustomSql','body':{'sqlCodes':_0x544867,'appCode':_0x271a28[_0x11344f(0xed)]},'description':_0x11344f(0xd2)+_0x544867['length']+'\x20SQL\x20file(s)'};},async 'execute'(_0x3391f7){const _0x59b4ec=a121_0x2241b2,_0x754f73=loadSqlProjectConfig(_0x3391f7[_0x59b4ec(0xed)]),_0x34d2cd=await readSqlLockFile(_0x754f73[_0x59b4ec(0xb6)]),{lockData:_0x5b369c,appLock:_0x1c8257}=ensureSqlLockScope(_0x34d2cd??createEmptySqlLock(),_0x3391f7[_0x59b4ec(0xed)],_0x754f73[_0x59b4ec(0xc9)],_0x59b4ec(0xe8)),_0x534c30=await getTargetSqlQueries(_0x754f73,_0x1c8257,_0x3391f7[_0x59b4ec(0xe7)](_0x59b4ec(0xe2))||undefined);if(_0x534c30[_0x59b4ec(0xd9)]===0x0)return{'ok':!![],'data':{'pushed':[],'skipped':[],'failed':[]},'message':_0x59b4ec(0xdb)};const _0x1c9f75=[],_0x136ced=[],_0x48428d=[];for(const _0x512004 of _0x534c30){const _0x422781=_0x1c8257[_0x59b4ec(0xcd)][_0x512004['sqlCode']];if(!_0x422781){_0x48428d[_0x59b4ec(0xe8)]({'sqlCode':_0x512004[_0x59b4ec(0xb5)],'error':_0x59b4ec(0xb3)});continue;}try{const _0x50cd0e=await computeSqlFileHash(_0x512004[_0x59b4ec(0xe6)]),_0x30e5a3=_0x422781['path']!==_0x512004[_0x59b4ec(0xb0)]||!!_0x512004['sqlName']&&_0x422781[_0x59b4ec(0xb1)]!==_0x512004[_0x59b4ec(0xb1)];if(!_0x3391f7[_0x59b4ec(0xc1)](_0x59b4ec(0xeb))&&_0x422781[_0x59b4ec(0xd7)]===_0x50cd0e&&!_0x30e5a3){_0x136ced[_0x59b4ec(0xe8)]({'sqlCode':_0x512004[_0x59b4ec(0xb5)],'reason':'unchanged'});continue;}if(_0x422781[_0x59b4ec(0xcf)]==null){_0x48428d['push']({'sqlCode':_0x512004[_0x59b4ec(0xb5)],'error':'missing\x20remote\x20version;\x20run\x20`rabetbase\x20sql\x20pull`\x20to\x20refresh\x20version\x20info\x20first'});continue;}const _0x523fa0=await readFile(_0x512004[_0x59b4ec(0xe6)],'utf8'),_0x59c171=stripLocalSqlMetadata(_0x523fa0,_0x512004[_0x59b4ec(0xd8)]),_0x2acab8=_0x512004[_0x59b4ec(0xb1)]||_0x422781[_0x59b4ec(0xb1)],_0x269024=await resolveTargetDbBinding(_0x3391f7[_0x59b4ec(0xed)],_0x512004,_0x422781),_0xccb19f=await updateSqlQuery({'id':_0x422781[_0x59b4ec(0xbd)],'appCode':_0x3391f7[_0x59b4ec(0xed)],'sqlCode':_0x512004[_0x59b4ec(0xb5)],'sqlName':_0x2acab8,'dbId':_0x269024['dbId'],'version':_0x422781[_0x59b4ec(0xcf)],'sqlContent':_0x59c171,'sqlConfig':_0x422781[_0x59b4ec(0xdd)]??undefined}),_0x55fe2d=_0xccb19f[_0x59b4ec(0xc6)]?await getDbName(_0x3391f7[_0x59b4ec(0xed)],Number(_0xccb19f['dbId']))['catch'](()=>_0x269024[_0x59b4ec(0xbf)]):_0x269024[_0x59b4ec(0xbf)];_0x1c8257[_0x59b4ec(0xcd)][_0x512004[_0x59b4ec(0xb5)]]={...buildSqlLockEntry(_0xccb19f,_0x59c171,_0x50cd0e,{'dbName':_0x55fe2d}),'path':_0x512004[_0x59b4ec(0xb0)],'mode':_0x422781[_0x59b4ec(0xd8)]},await archivePreviousSqlFileIfNeeded(_0x754f73,_0x422781[_0x59b4ec(0xec)],_0x512004['relativePath']),_0x1c9f75[_0x59b4ec(0xe8)]({'sqlCode':_0x512004[_0x59b4ec(0xb5)],'remoteId':_0x422781[_0x59b4ec(0xbd)]});}catch(_0x33b277){_0x48428d[_0x59b4ec(0xe8)]({'sqlCode':_0x512004[_0x59b4ec(0xb5)],'error':_0x33b277 instanceof Error?_0x33b277[_0x59b4ec(0xca)]:String(_0x33b277)});}}return _0x1c8257[_0x59b4ec(0xd4)]=new Date()[_0x59b4ec(0xdc)](),await writeSqlLockFile(_0x754f73['lockFilePath'],_0x5b369c),{'ok':_0x48428d['length']===0x0,'data':{'pushed':_0x1c9f75,'skipped':_0x136ced,'failed':_0x48428d},'message':_0x59b4ec(0xc3)+_0x1c9f75[_0x59b4ec(0xd9)]+_0x59b4ec(0xe3)+_0x136ced[_0x59b4ec(0xd9)]+'\x20skipped,\x20'+_0x48428d[_0x59b4ec(0xd9)]+'\x20failed'};}};async function archivePreviousSqlFileIfNeeded(_0x1f7182,_0x1eab77,_0xc8bd13){const _0x5558d9=a121_0x2241b2;if(!_0x1eab77||_0x1eab77===_0xc8bd13)return;const _0x416466=join(_0x1f7182[_0x5558d9(0xe9)],_0x1eab77);if(!await fileExists(_0x416466))return;const _0x10660b=await moveToTrash(_0x1f7182[_0x5558d9(0xc8)],_0x1f7182['trashDir'],_0x416466);await cleanupEmptyDirectories(dirname(_0x416466),_0x1f7182[_0x5558d9(0xe9)]),void _0x10660b;}async function moveToTrash(_0x15ddf2,_0x471245,_0x190ef1){const _0x4659d0=a121_0x2241b2,_0xe92d58=new Date()[_0x4659d0(0xdc)]()['replace'](/[:.]/g,'-'),_0x240d84=relative(_0x15ddf2,_0x190ef1),_0x3d45e6=join(_0x471245,_0xe92d58,_0x240d84);return await mkdir(dirname(_0x3d45e6),{'recursive':!![]}),await rename(_0x190ef1,_0x3d45e6),_0x3d45e6;}function a121_0x51b7(){const _0x46516d=['high-risk-write','dbId','dbDirectory','projectRoot','sqlRoot','message','74297HIMCdd','3109960xmLNsq','sqls','12419858xXXyaO','version','\x22\x20for\x20sqlCode\x20','catch','Would\x20push\x20','entries','lastSync','validation','1595130nfpxTN','hash','mode','length','POST','No\x20local\x20SQL\x20files\x20found.','toISOString','sqlConfig','boolean','.\x20Keep\x20only\x20one\x20file\x20under\x20its\x20sqlCode\x20directory\x20before\x20pushing.','Local\x20directory\x20\x22','Multiple\x20local\x20SQL\x20files\x20found\x20for\x20sqlCode\x20','sqlcode','\x20pushed,\x20','Force\x20push\x20even\x20if\x20local\x20hash\x20matches\x20lock','7088FGmGug','filePath','str','push','sqlRootDir','2hwYrWJ','force','path','appCode','360516LRbPaa','relativePath','sqlName','join','local\x20SQL\x20is\x20not\x20tracked\x20by\x20sql.lock.json;\x20use\x20`rabetbase\x20sql\x20create`\x20or\x20`rabetbase\x20sql\x20pull`\x20first','sql','sqlCode','lockFilePath','3024XjzUxw','get','924868nxRewe','filter','Local\x20SQL\x20not\x20found:\x20','8tURuLZ','remoteId','has','dbName','set','bool','6LrypmL','Push\x20complete:\x20','map'];a121_0x51b7=function(){return _0x46516d;};return a121_0x51b7();}async function cleanupEmptyDirectories(_0x12f512,_0x1568c3){const _0x210a8c=a121_0x2241b2;let _0x5a5e50=resolve(_0x12f512);const _0x1b4a31=resolve(_0x1568c3);while(_0x5a5e50['startsWith'](''+_0x1b4a31+sep)||_0x5a5e50===_0x1b4a31){if(_0x5a5e50===_0x1b4a31)return;try{const _0x3a5e04=await readdir(_0x5a5e50);if(_0x3a5e04[_0x210a8c(0xd9)]>0x0)return;await rmdir(_0x5a5e50);}catch{return;}_0x5a5e50=dirname(_0x5a5e50);}}async function resolveTargetDbBinding(_0x395cb0,_0x42f3e2,_0x290859){const _0x3b3fdf=a121_0x2241b2,_0x184f6a=_0x42f3e2[_0x3b3fdf(0xc7)];if(!_0x184f6a)return{'dbId':_0x290859[_0x3b3fdf(0xc6)],'dbName':_0x290859[_0x3b3fdf(0xbf)]};const _0x459163=buildDbDirectoryName(_0x290859['dbName'],_0x290859['dbId']);if(_0x184f6a===_0x459163)return{'dbId':_0x290859[_0x3b3fdf(0xc6)],'dbName':_0x290859['dbName']};const _0x19209c=parseExplicitDbDirectory(_0x184f6a);if(_0x19209c!=null)return{'dbId':_0x19209c,'dbName':await getDbName(_0x395cb0,_0x19209c)[_0x3b3fdf(0xd1)](()=>undefined)};const _0x248434=await listDatabases(_0x395cb0),_0x578df2=_0x248434[_0x3b3fdf(0xba)](_0x1f0563=>buildDbDirectoryName(_0x1f0563[_0x3b3fdf(0xbf)],_0x1f0563[_0x3b3fdf(0xc6)])===_0x184f6a);if(_0x578df2[_0x3b3fdf(0xd9)]===0x1)return{'dbId':_0x578df2[0x0]['dbId'],'dbName':_0x578df2[0x0][_0x3b3fdf(0xbf)]};if(_0x578df2[_0x3b3fdf(0xd9)]===0x0)throw CliErrors[_0x3b3fdf(0xd5)]('No\x20database\x20matches\x20local\x20directory\x20\x22'+_0x184f6a+_0x3b3fdf(0xd0)+_0x42f3e2[_0x3b3fdf(0xb5)]+'.');const _0x2d4537=_0x578df2[_0x3b3fdf(0xc4)](_0x3a92ff=>_0x3a92ff['dbName']+'\x20('+_0x3a92ff[_0x3b3fdf(0xc6)]+')')[_0x3b3fdf(0xb2)](',\x20');throw CliErrors[_0x3b3fdf(0xd5)](_0x3b3fdf(0xe0)+_0x184f6a+'\x22\x20matches\x20multiple\x20databases\x20for\x20sqlCode\x20'+_0x42f3e2[_0x3b3fdf(0xb5)]+':\x20'+_0x2d4537);}function parseExplicitDbDirectory(_0x2e8cab){const _0x40499a=/^db-(\d+)$/['exec'](_0x2e8cab);if(!_0x40499a)return null;const _0x7ff37b=Number(_0x40499a[0x1]);return Number['isFinite'](_0x7ff37b)&&_0x7ff37b>0x0?_0x7ff37b:null;}
1
+ const a121_0x16bd1e=a121_0x5652;(function(_0x5048fd,_0x361671){const _0x33defb=a121_0x5652,_0x51d025=_0x5048fd();while(!![]){try{const _0x6b38a9=parseInt(_0x33defb(0xae))/0x1*(parseInt(_0x33defb(0xce))/0x2)+-parseInt(_0x33defb(0xb2))/0x3+parseInt(_0x33defb(0xa2))/0x4*(-parseInt(_0x33defb(0xcd))/0x5)+-parseInt(_0x33defb(0xb3))/0x6+parseInt(_0x33defb(0xad))/0x7+parseInt(_0x33defb(0xa9))/0x8*(parseInt(_0x33defb(0xc4))/0x9)+parseInt(_0x33defb(0xbd))/0xa;if(_0x6b38a9===_0x361671)break;else _0x51d025['push'](_0x51d025['shift']());}catch(_0x18e8b1){_0x51d025['push'](_0x51d025['shift']());}}}(a121_0x2983,0xd8931));import{mkdir,readFile,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';import{updateSqlQuery}from'../../core/api-client.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';import{getDbName,listDatabases}from'../../core/db-resolver.js';function a121_0x2983(){const _0x323b00=['str','Force\x20push\x20even\x20if\x20local\x20hash\x20matches\x20lock','validation','631043AmGRnd','3553nqWVir','get','exec','map','3299061VLbVIU','1994352NLzmLW','Push\x20local\x20SQL\x20files\x20to\x20remote','dbDirectory','dbId','high-risk-write','sql','remoteId','sqlRoot','mode','force','17654990fWstHC','filePath','sqlCode','\x22\x20matches\x20multiple\x20databases\x20for\x20sqlCode\x20','sqlName','projectRoot','unchanged','369PdBPHV','sqlConfig','/smartapi/custom/updateUserCustomSql','boolean','filter','version','missing\x20remote\x20version;\x20run\x20`rabetbase\x20sql\x20pull`\x20to\x20refresh\x20version\x20info\x20first','appCode','startsWith','25XCtZuC','132LzJJkH','replace','sqlRootDir','toISOString','join','\x20pushed,\x20','lastSync','sqls','POST','Would\x20push\x20','push','utf8','No\x20local\x20SQL\x20files\x20found.','trashDir','sqlcode','message','length','path','relativePath','626516FbzizT','dbName','bool','No\x20database\x20matches\x20local\x20directory\x20\x22','catch','hash','lockFilePath','197496mVjori'];a121_0x2983=function(){return _0x323b00;};return a121_0x2983();}import{scanLocalSqlQueries}from'../../core/sql-sync/file-system.js';import{computeSqlFileHash}from'../../core/sql-sync/hash.js';import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile,writeSqlLockFile}from'../../core/sql-sync/lock.js';import{fileExists}from'../../core/bff/file-system.js';function a121_0x5652(_0x53ece0,_0x1deea9){_0x53ece0=_0x53ece0-0x98;const _0x29833e=a121_0x2983();let _0x56525c=_0x29833e[_0x53ece0];return _0x56525c;}import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{buildSqlLockEntry,stripLocalSqlMetadata}from'./shared.js';import{buildDbDirectoryName}from'../../core/sql-sync/utils.js';async function getTargetSqlQueries(_0xd6b912,_0x3eed7a,_0x2671bb){const _0x1bb1e4=a121_0x5652,_0x50d18a=await scanLocalSqlQueries(_0xd6b912),_0x3432c2=new Map();for(const _0x209088 of _0x50d18a){if(_0x2671bb&&_0x209088[_0x1bb1e4(0xbf)]!==_0x2671bb)continue;const _0x164b89=_0x3432c2[_0x1bb1e4(0xaf)](_0x209088[_0x1bb1e4(0xbf)])??[];_0x164b89[_0x1bb1e4(0x99)](_0x209088),_0x3432c2['set'](_0x209088[_0x1bb1e4(0xbf)],_0x164b89);}if(_0x2671bb&&!_0x3432c2['has'](_0x2671bb))throw CliErrors[_0x1bb1e4(0xac)]('Local\x20SQL\x20not\x20found:\x20'+_0x2671bb);const _0x3903c7=[];for(const [_0x32c87e,_0x2f8e1e]of _0x3432c2['entries']()){if(_0x2f8e1e[_0x1bb1e4(0x9f)]===0x1){_0x3903c7[_0x1bb1e4(0x99)](_0x2f8e1e[0x0]);continue;}const _0x4b4d79=_0x3eed7a[_0x1bb1e4(0xd5)][_0x32c87e],_0x17f231=_0x4b4d79?.[_0x1bb1e4(0xa0)],_0x36f2d6=_0x17f231?_0x2f8e1e['filter'](_0x5f2d25=>_0x5f2d25['relativePath']!==_0x17f231):_0x2f8e1e;if(_0x4b4d79&&_0x36f2d6[_0x1bb1e4(0x9f)]===0x1){_0x3903c7[_0x1bb1e4(0x99)](_0x36f2d6[0x0]);continue;}throw CliErrors['validation']('Multiple\x20local\x20SQL\x20files\x20found\x20for\x20sqlCode\x20'+_0x32c87e+'.\x20Keep\x20only\x20one\x20file\x20under\x20its\x20sqlCode\x20directory\x20before\x20pushing.');}return _0x3903c7;}export const sqlPush={'service':a121_0x16bd1e(0xb8),'command':a121_0x16bd1e(0x99),'description':a121_0x16bd1e(0xb4),'risk':a121_0x16bd1e(0xb7),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':'force','type':a121_0x16bd1e(0xc7),'description':a121_0x16bd1e(0xab)}],async 'dryRun'(_0x229f79){const _0x4e25d2=a121_0x16bd1e,_0x44886f=loadSqlProjectConfig(_0x229f79['appCode']),_0x3c198a=await readSqlLockFile(_0x44886f[_0x4e25d2(0xa8)]),{appLock:_0x11d93e}=ensureSqlLockScope(_0x3c198a??createEmptySqlLock(),_0x229f79[_0x4e25d2(0xcb)],_0x44886f[_0x4e25d2(0xba)],_0x4e25d2(0x99)),_0x168f05=await getTargetSqlQueries(_0x44886f,_0x11d93e,_0x229f79[_0x4e25d2(0xaa)](_0x4e25d2(0x9d))||undefined),_0x1216d0=[];for(const _0x401dcc of _0x168f05){const _0x331cec=await computeSqlFileHash(_0x401dcc[_0x4e25d2(0xbe)]),_0x55f52e=_0x11d93e['sqls'][_0x401dcc[_0x4e25d2(0xbf)]],_0x54ed9c=!!_0x55f52e&&(_0x55f52e[_0x4e25d2(0xa0)]!==_0x401dcc[_0x4e25d2(0xa1)]||!!_0x401dcc[_0x4e25d2(0xc1)]&&_0x55f52e['sqlName']!==_0x401dcc[_0x4e25d2(0xc1)]);if(!_0x229f79[_0x4e25d2(0xa4)](_0x4e25d2(0xbc))&&_0x55f52e&&_0x55f52e[_0x4e25d2(0xa7)]===_0x331cec&&!_0x54ed9c)continue;_0x1216d0['push'](_0x401dcc[_0x4e25d2(0xbf)]);}return{'method':_0x4e25d2(0xd6),'url':_0x4e25d2(0xc6),'body':{'sqlCodes':_0x1216d0,'appCode':_0x229f79[_0x4e25d2(0xcb)]},'description':_0x4e25d2(0x98)+_0x1216d0[_0x4e25d2(0x9f)]+'\x20SQL\x20file(s)'};},async 'execute'(_0x5730a8){const _0x2779c5=a121_0x16bd1e,_0x11f1ee=loadSqlProjectConfig(_0x5730a8[_0x2779c5(0xcb)]),_0x1ec88a=await readSqlLockFile(_0x11f1ee[_0x2779c5(0xa8)]),{lockData:_0x5df2b0,appLock:_0x99ccad}=ensureSqlLockScope(_0x1ec88a??createEmptySqlLock(),_0x5730a8[_0x2779c5(0xcb)],_0x11f1ee['sqlRoot'],_0x2779c5(0x99)),_0x4640bb=await getTargetSqlQueries(_0x11f1ee,_0x99ccad,_0x5730a8['str'](_0x2779c5(0x9d))||undefined);if(_0x4640bb[_0x2779c5(0x9f)]===0x0)return{'ok':!![],'data':{'pushed':[],'skipped':[],'failed':[]},'message':_0x2779c5(0x9b)};const _0x43b13b=[],_0x681a29=[],_0xdfbfc3=[];for(const _0xd25aad of _0x4640bb){const _0x38bee4=_0x99ccad[_0x2779c5(0xd5)][_0xd25aad[_0x2779c5(0xbf)]];if(!_0x38bee4){_0xdfbfc3[_0x2779c5(0x99)]({'sqlCode':_0xd25aad[_0x2779c5(0xbf)],'error':'local\x20SQL\x20is\x20not\x20tracked\x20by\x20sql.lock.json;\x20use\x20`rabetbase\x20sql\x20create`\x20or\x20`rabetbase\x20sql\x20pull`\x20first'});continue;}try{const _0x2fbfc2=await computeSqlFileHash(_0xd25aad[_0x2779c5(0xbe)]),_0x4ae418=_0x38bee4[_0x2779c5(0xa0)]!==_0xd25aad['relativePath']||!!_0xd25aad[_0x2779c5(0xc1)]&&_0x38bee4[_0x2779c5(0xc1)]!==_0xd25aad[_0x2779c5(0xc1)];if(!_0x5730a8[_0x2779c5(0xa4)](_0x2779c5(0xbc))&&_0x38bee4[_0x2779c5(0xa7)]===_0x2fbfc2&&!_0x4ae418){_0x681a29['push']({'sqlCode':_0xd25aad[_0x2779c5(0xbf)],'reason':_0x2779c5(0xc3)});continue;}if(_0x38bee4['version']==null){_0xdfbfc3[_0x2779c5(0x99)]({'sqlCode':_0xd25aad[_0x2779c5(0xbf)],'error':_0x2779c5(0xca)});continue;}const _0x399c52=await readFile(_0xd25aad[_0x2779c5(0xbe)],_0x2779c5(0x9a)),_0x465434=stripLocalSqlMetadata(_0x399c52,_0xd25aad[_0x2779c5(0xbb)]),_0x387c1e=_0xd25aad[_0x2779c5(0xc1)]||_0x38bee4['sqlName'],_0x2ff236=await resolveTargetDbBinding(_0x5730a8[_0x2779c5(0xcb)],_0xd25aad,_0x38bee4),_0x1ec4e8=await updateSqlQuery({'id':_0x38bee4[_0x2779c5(0xb9)],'appCode':_0x5730a8['appCode'],'sqlCode':_0xd25aad[_0x2779c5(0xbf)],'sqlName':_0x387c1e,'dbId':_0x2ff236[_0x2779c5(0xb6)],'version':_0x38bee4[_0x2779c5(0xc9)],'sqlContent':_0x465434,'sqlConfig':_0x38bee4[_0x2779c5(0xc5)]??undefined}),_0x49ba84=_0x1ec4e8[_0x2779c5(0xb6)]?await getDbName(_0x5730a8['appCode'],Number(_0x1ec4e8[_0x2779c5(0xb6)]))['catch'](()=>_0x2ff236[_0x2779c5(0xa3)]):_0x2ff236[_0x2779c5(0xa3)];_0x99ccad[_0x2779c5(0xd5)][_0xd25aad['sqlCode']]={...buildSqlLockEntry(_0x1ec4e8,_0x465434,_0x2fbfc2,{'dbName':_0x49ba84}),'path':_0xd25aad['relativePath'],'mode':_0x38bee4[_0x2779c5(0xbb)]},await archivePreviousSqlFileIfNeeded(_0x11f1ee,_0x38bee4[_0x2779c5(0xa0)],_0xd25aad[_0x2779c5(0xa1)]),_0x43b13b[_0x2779c5(0x99)]({'sqlCode':_0xd25aad[_0x2779c5(0xbf)],'remoteId':_0x38bee4[_0x2779c5(0xb9)]});}catch(_0x14c104){_0xdfbfc3[_0x2779c5(0x99)]({'sqlCode':_0xd25aad['sqlCode'],'error':_0x14c104 instanceof Error?_0x14c104[_0x2779c5(0x9e)]:String(_0x14c104)});}}return _0x99ccad[_0x2779c5(0xd4)]=new Date()[_0x2779c5(0xd1)](),await writeSqlLockFile(_0x11f1ee[_0x2779c5(0xa8)],_0x5df2b0),{'ok':_0xdfbfc3['length']===0x0,'data':{'pushed':_0x43b13b,'skipped':_0x681a29,'failed':_0xdfbfc3},'message':'Push\x20complete:\x20'+_0x43b13b['length']+_0x2779c5(0xd3)+_0x681a29[_0x2779c5(0x9f)]+'\x20skipped,\x20'+_0xdfbfc3[_0x2779c5(0x9f)]+'\x20failed'};}};async function archivePreviousSqlFileIfNeeded(_0x2116cc,_0x4137ba,_0x765ea7){const _0x4380af=a121_0x16bd1e;if(!_0x4137ba||_0x4137ba===_0x765ea7)return;const _0x1f0eda=join(_0x2116cc['sqlRootDir'],_0x4137ba);if(!await fileExists(_0x1f0eda))return;const _0x5d7b84=await moveToTrash(_0x2116cc[_0x4380af(0xc2)],_0x2116cc[_0x4380af(0x9c)],_0x1f0eda);await cleanupEmptyDirectories(dirname(_0x1f0eda),_0x2116cc[_0x4380af(0xd0)]),void _0x5d7b84;}async function moveToTrash(_0x351616,_0x7cf02e,_0x13a1d3){const _0x28c927=a121_0x16bd1e,_0x2e4823=new Date()[_0x28c927(0xd1)]()[_0x28c927(0xcf)](/[:.]/g,'-'),_0x32a059=relative(_0x351616,_0x13a1d3),_0x523332=join(_0x7cf02e,_0x2e4823,_0x32a059);return await mkdir(dirname(_0x523332),{'recursive':!![]}),await rename(_0x13a1d3,_0x523332),_0x523332;}async function cleanupEmptyDirectories(_0x343e2e,_0x3b1598){const _0x5b7588=a121_0x16bd1e;let _0x3eab1c=resolve(_0x343e2e);const _0x39b8ff=resolve(_0x3b1598);while(_0x3eab1c[_0x5b7588(0xcc)](''+_0x39b8ff+sep)||_0x3eab1c===_0x39b8ff){if(_0x3eab1c===_0x39b8ff)return;try{const _0x22d387=await readdir(_0x3eab1c);if(_0x22d387[_0x5b7588(0x9f)]>0x0)return;await rmdir(_0x3eab1c);}catch{return;}_0x3eab1c=dirname(_0x3eab1c);}}async function resolveTargetDbBinding(_0x107f26,_0x280170,_0x49d4cc){const _0x58f9e8=a121_0x16bd1e,_0x46c07c=_0x280170[_0x58f9e8(0xb5)];if(!_0x46c07c)return{'dbId':_0x49d4cc[_0x58f9e8(0xb6)],'dbName':_0x49d4cc[_0x58f9e8(0xa3)]};const _0x45e0e9=buildDbDirectoryName(_0x49d4cc[_0x58f9e8(0xa3)],_0x49d4cc['dbId']);if(_0x46c07c===_0x45e0e9)return{'dbId':_0x49d4cc[_0x58f9e8(0xb6)],'dbName':_0x49d4cc[_0x58f9e8(0xa3)]};const _0x5c2c04=parseExplicitDbDirectory(_0x46c07c);if(_0x5c2c04!=null)return{'dbId':_0x5c2c04,'dbName':await getDbName(_0x107f26,_0x5c2c04)[_0x58f9e8(0xa6)](()=>undefined)};const _0x11cf1b=await listDatabases(_0x107f26),_0x347df6=_0x11cf1b[_0x58f9e8(0xc8)](_0x466168=>buildDbDirectoryName(_0x466168[_0x58f9e8(0xa3)],_0x466168[_0x58f9e8(0xb6)])===_0x46c07c);if(_0x347df6[_0x58f9e8(0x9f)]===0x1)return{'dbId':_0x347df6[0x0][_0x58f9e8(0xb6)],'dbName':_0x347df6[0x0][_0x58f9e8(0xa3)]};if(_0x347df6[_0x58f9e8(0x9f)]===0x0)throw CliErrors['validation'](_0x58f9e8(0xa5)+_0x46c07c+'\x22\x20for\x20sqlCode\x20'+_0x280170[_0x58f9e8(0xbf)]+'.');const _0x3eda5f=_0x347df6[_0x58f9e8(0xb1)](_0x57bbba=>_0x57bbba[_0x58f9e8(0xa3)]+'\x20('+_0x57bbba['dbId']+')')[_0x58f9e8(0xd2)](',\x20');throw CliErrors[_0x58f9e8(0xac)]('Local\x20directory\x20\x22'+_0x46c07c+_0x58f9e8(0xc0)+_0x280170['sqlCode']+':\x20'+_0x3eda5f);}function parseExplicitDbDirectory(_0xf1205f){const _0x469fa=a121_0x16bd1e,_0xc00ab9=/^db-(\d+)$/[_0x469fa(0xb0)](_0xf1205f);if(!_0xc00ab9)return null;const _0x2b3870=Number(_0xc00ab9[0x1]);return Number['isFinite'](_0x2b3870)&&_0x2b3870>0x0?_0x2b3870:null;}
@@ -1 +1 @@
1
- const a122_0xbb0be8=a122_0x4a0a;function a122_0x4b9b(){const _0x325058=['Update\x20existing\x20SQL\x20by\x20editing\x20the\x20synced\x20file\x20under\x20`.rabetbase/sql/<appCode>/<dbName|db-<id>>/`\x20and\x20then\x20running\x20`rabetbase\x20sql\x20push\x20--sqlcode\x20<code>\x20--yes`.','3720pbQbeG','66VBpqCB','Path\x20to\x20the\x20SQL\x20file','SQL\x20query\x20display\x20name','37580389sBENmV','file','37528enJNBt','save','71754yucAJu','1224RSjZsL','2761165MLeXHb','106100EYQEzD','11238340aEvqhs','string','`rabetbase\x20sql\x20save`\x20has\x20been\x20deprecated.','1rQcjzY','write','Query\x20description','Target\x20database\x20—\x20accepts\x20a\x20numeric\x20ID\x20or\x20database\x20name\x20(e.g.\x20ecommerce_db)','validation','13566tnepls','sqlname'];a122_0x4b9b=function(){return _0x325058;};return a122_0x4b9b();}function a122_0x4a0a(_0x551a7d,_0x575db5){_0x551a7d=_0x551a7d-0x86;const _0x4b9b98=a122_0x4b9b();let _0x4a0a80=_0x4b9b98[_0x551a7d];return _0x4a0a80;}(function(_0x27df06,_0x26849d){const _0x1f19c9=a122_0x4a0a,_0xe5ec42=_0x27df06();while(!![]){try{const _0x4558bb=parseInt(_0x1f19c9(0x91))/0x1*(parseInt(_0x1f19c9(0x8a))/0x2)+parseInt(_0x1f19c9(0x9a))/0x3*(-parseInt(_0x1f19c9(0x8d))/0x4)+-parseInt(_0x1f19c9(0x8c))/0x5+parseInt(_0x1f19c9(0x99))/0x6*(-parseInt(_0x1f19c9(0x96))/0x7)+-parseInt(_0x1f19c9(0x88))/0x8*(-parseInt(_0x1f19c9(0x8b))/0x9)+-parseInt(_0x1f19c9(0x8e))/0xa+parseInt(_0x1f19c9(0x86))/0xb;if(_0x4558bb===_0x26849d)break;else _0xe5ec42['push'](_0xe5ec42['shift']());}catch(_0x496e79){_0xe5ec42['push'](_0xe5ec42['shift']());}}}(a122_0x4b9b,0x99953));import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const SQL_SAVE_DEPRECATED_HINT=[a122_0xbb0be8(0x90),'Create\x20new\x20SQL\x20with\x20`rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml`.',a122_0xbb0be8(0x98)]['join']('\x0a');export const sqlSave={'service':'sql','command':a122_0xbb0be8(0x89),'description':'Deprecated:\x20use\x20sql\x20create\x20to\x20create\x20and\x20sql\x20push\x20to\x20update','risk':a122_0xbb0be8(0x92),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a122_0xbb0be8(0x87),'type':a122_0xbb0be8(0x8f),'required':!![],'description':a122_0xbb0be8(0x9b)},SQLCODE_FLAG_OPTIONAL,{'name':a122_0xbb0be8(0x97),'type':a122_0xbb0be8(0x8f),'description':a122_0xbb0be8(0x9c)},{'name':'db','type':a122_0xbb0be8(0x8f),'description':a122_0xbb0be8(0x94)},{'name':'description','type':a122_0xbb0be8(0x8f),'description':a122_0xbb0be8(0x93)}],async 'validate'(){const _0x14eeae=a122_0xbb0be8;throw CliErrors[_0x14eeae(0x95)](SQL_SAVE_DEPRECATED_HINT);},async 'execute'(){throw CliErrors['validation'](SQL_SAVE_DEPRECATED_HINT);}};
1
+ function a122_0x12a1(){const _0x5bf686=['Update\x20existing\x20SQL\x20by\x20editing\x20the\x20synced\x20file\x20under\x20`.rabetbase/sql/<appCode>/<dbName|db-<id>>/`\x20and\x20then\x20running\x20`rabetbase\x20sql\x20push\x20--sqlcode\x20<code>\x20--yes`.','8SKlBwX','string','1037541MBmgQO','12822viNJLO','38211276gkhjBp','4208910ONjTKS','join','Path\x20to\x20the\x20SQL\x20file','5HtofGk','description','file','3LsUQAR','Deprecated:\x20use\x20sql\x20create\x20to\x20create\x20and\x20sql\x20push\x20to\x20update','Query\x20description','21AdofPs','20QMZOfq','47336Grbqby','sqlname','3612466NMuApC','Target\x20database\x20—\x20accepts\x20a\x20numeric\x20ID\x20or\x20database\x20name\x20(e.g.\x20ecommerce_db)','Create\x20new\x20SQL\x20with\x20`rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml`.','save','14496858zzYyOe','write','validation'];a122_0x12a1=function(){return _0x5bf686;};return a122_0x12a1();}const a122_0x57150c=a122_0xe63d;(function(_0x176189,_0x500b82){const _0x27e4f8=a122_0xe63d,_0x1fb057=_0x176189();while(!![]){try{const _0x4aed24=parseInt(_0x27e4f8(0x91))/0x1*(parseInt(_0x27e4f8(0x89))/0x2)+parseInt(_0x27e4f8(0x88))/0x3*(-parseInt(_0x27e4f8(0xa0))/0x4)+parseInt(_0x27e4f8(0x8e))/0x5*(-parseInt(_0x27e4f8(0x8b))/0x6)+parseInt(_0x27e4f8(0x94))/0x7*(parseInt(_0x27e4f8(0x96))/0x8)+-parseInt(_0x27e4f8(0x9c))/0x9+parseInt(_0x27e4f8(0x95))/0xa*(parseInt(_0x27e4f8(0x98))/0xb)+parseInt(_0x27e4f8(0x8a))/0xc;if(_0x4aed24===_0x500b82)break;else _0x1fb057['push'](_0x1fb057['shift']());}catch(_0x35e5e3){_0x1fb057['push'](_0x1fb057['shift']());}}}(a122_0x12a1,0xd5690));import{CliErrors}from'../../errors.js';function a122_0xe63d(_0x366df0,_0x1be3aa){_0x366df0=_0x366df0-0x87;const _0x12a15c=a122_0x12a1();let _0xe63d25=_0x12a15c[_0x366df0];return _0xe63d25;}import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const SQL_SAVE_DEPRECATED_HINT=['`rabetbase\x20sql\x20save`\x20has\x20been\x20deprecated.',a122_0x57150c(0x9a),a122_0x57150c(0x9f)][a122_0x57150c(0x8c)]('\x0a');export const sqlSave={'service':'sql','command':a122_0x57150c(0x9b),'description':a122_0x57150c(0x92),'risk':a122_0x57150c(0x9d),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a122_0x57150c(0x90),'type':a122_0x57150c(0x87),'required':!![],'description':a122_0x57150c(0x8d)},SQLCODE_FLAG_OPTIONAL,{'name':a122_0x57150c(0x97),'type':'string','description':'SQL\x20query\x20display\x20name'},{'name':'db','type':a122_0x57150c(0x87),'description':a122_0x57150c(0x99)},{'name':a122_0x57150c(0x8f),'type':a122_0x57150c(0x87),'description':a122_0x57150c(0x93)}],async 'validate'(){const _0x55c0b4=a122_0x57150c;throw CliErrors[_0x55c0b4(0x9e)](SQL_SAVE_DEPRECATED_HINT);},async 'execute'(){const _0xa4511c=a122_0x57150c;throw CliErrors[_0xa4511c(0x9e)](SQL_SAVE_DEPRECATED_HINT);}};
@@ -1 +1 @@
1
- const a123_0x370077=a123_0x38db;(function(_0x57376b,_0x57a5f8){const _0x5bb609=a123_0x38db,_0x4d9203=_0x57376b();while(!![]){try{const _0x11968a=parseInt(_0x5bb609(0x17c))/0x1+-parseInt(_0x5bb609(0x16e))/0x2*(parseInt(_0x5bb609(0x16b))/0x3)+parseInt(_0x5bb609(0x179))/0x4*(-parseInt(_0x5bb609(0x168))/0x5)+-parseInt(_0x5bb609(0x170))/0x6*(-parseInt(_0x5bb609(0x169))/0x7)+-parseInt(_0x5bb609(0x172))/0x8*(-parseInt(_0x5bb609(0x185))/0x9)+-parseInt(_0x5bb609(0x18c))/0xa*(parseInt(_0x5bb609(0x181))/0xb)+-parseInt(_0x5bb609(0x160))/0xc*(-parseInt(_0x5bb609(0x175))/0xd);if(_0x11968a===_0x57a5f8)break;else _0x4d9203['push'](_0x4d9203['shift']());}catch(_0x532558){_0x4d9203['push'](_0x4d9203['shift']());}}}(a123_0x4853,0x6ef29));import{createInterface}from'node:readline';import{join}from'node:path';import{buildDefaultSqlFileName,buildSqlRelativePath,detectSqlMode}from'../../core/sql-sync/utils.js';function a123_0x38db(_0x8238d8,_0x135ad6){_0x8238d8=_0x8238d8-0x15e;const _0x485340=a123_0x4853();let _0x38db77=_0x485340[_0x8238d8];return _0x38db77;}export const SQL_LOCAL_REL_DIR=a123_0x370077(0x16f);function a123_0x4853(){const _0x31ad6c=['--\x20@lovrabet.','16atLDdk','sqlCode','split','13GlJlDx','map','mybatisXml','question','4qsyRxZ','dbName','apps','396598qRBwBS','join','stdin','syncedAt','trimStart','576642RPhysy','<!--\x20@lovrabet.','sqlName','close','773082mlrQER','\x20-->','test','fromEntries','sqls','path','version','110SyBYGh','sqlContent','length','entries','filter','12995652CFrEUL','sqlConfig','\x20[y/N]\x20','description','dbId','yes','endsWith','trim','860290DUkDvq','805TnmBPI','mode','5451YLGMXi','lastSync','sqlRoot','674xYQWPC','.rabetbase/sql','8562UmCrQO'];a123_0x4853=function(){return _0x31ad6c;};return a123_0x4853();}export function buildSqlLockEntry(_0x5813e1,_0x168ba4,_0x13a38b,_0x3e5f12){const _0x365a62=a123_0x370077,_0x2243b4=detectSqlMode(_0x168ba4);return{'path':buildSqlRelativePath(_0x5813e1[_0x365a62(0x173)],_0x5813e1['sqlName'],_0x3e5f12?.['dbName'],_0x2243b4,_0x5813e1[_0x365a62(0x164)]),'hash':_0x13a38b,'remoteId':_0x5813e1['id'],'version':_0x5813e1[_0x365a62(0x18b)],'dbId':Number(_0x5813e1['dbId']),'dbName':_0x3e5f12?.[_0x365a62(0x17a)],'sqlName':_0x5813e1[_0x365a62(0x183)],'sqlConfig':_0x5813e1[_0x365a62(0x161)]??undefined,'mode':_0x2243b4};}export function cloneSqlLockData(_0x1bd4e2){const _0x4d1db2=a123_0x370077;return{'apps':Object[_0x4d1db2(0x188)](Object[_0x4d1db2(0x15e)](_0x1bd4e2['apps'])[_0x4d1db2(0x176)](([_0x2f38e7,_0xb499bd])=>[_0x2f38e7,{'sqlRoot':_0xb499bd[_0x4d1db2(0x16d)],'lastSync':_0xb499bd[_0x4d1db2(0x16c)],'sqls':{..._0xb499bd[_0x4d1db2(0x189)]}}]))};}export function ensureRemoteSqlContent(_0x3227b2){const _0xd317b8=a123_0x370077;return _0x3227b2[_0xd317b8(0x18d)]??'';}export function buildLocalSqlFileContent(_0xf3adf4,_0x425d18,_0x2ad223){const _0x597ee9=a123_0x370077,_0x56ccd5=_0x2ad223?.[_0x597ee9(0x16a)]??detectSqlMode(_0x425d18),_0x456510=stripLocalSqlMetadata(_0x425d18,_0x56ccd5)[_0x597ee9(0x167)](),_0x5a254c=[...buildMetadataHeaderLines({'sqlCode':_0xf3adf4[_0x597ee9(0x173)],'sqlName':_0xf3adf4[_0x597ee9(0x183)],'dbId':_0xf3adf4['dbId'],'dbName':_0x2ad223?.['dbName'],'mode':_0x56ccd5,'syncedAt':_0x2ad223?.[_0x597ee9(0x17f)],'description':_0x2ad223?.[_0x597ee9(0x163)]},_0x56ccd5),'',_0x456510],_0x18af8d=_0x5a254c[_0x597ee9(0x17d)]('\x0a');return _0x18af8d[_0x597ee9(0x166)]('\x0a')?_0x18af8d:_0x18af8d+'\x0a';}export function stripLocalSqlMetadata(_0x49a040,_0x1429c0){const _0x3bc648=a123_0x370077,_0x35c93f=_0x49a040['replace'](/\r\n/g,'\x0a')[_0x3bc648(0x174)]('\x0a'),_0x13fce3=[];let _0x5c1fdb=0x0;if(_0x1429c0===_0x3bc648(0x177))while(_0x5c1fdb<_0x35c93f['length']){const _0x6f8703=_0x35c93f[_0x5c1fdb]??'';if(/^\s*<!--\s*@lovrabet\./['test'](_0x6f8703)){_0x5c1fdb++;continue;}if(_0x6f8703[_0x3bc648(0x167)]()===''&&_0x5c1fdb>0x0){_0x5c1fdb++;continue;}break;}else while(_0x5c1fdb<_0x35c93f[_0x3bc648(0x18e)]){const _0x35fbfb=_0x35c93f[_0x5c1fdb]??'';if(/^\s*--\s*@lovrabet\./[_0x3bc648(0x187)](_0x35fbfb)){_0x5c1fdb++;continue;}if(_0x35fbfb[_0x3bc648(0x167)]()===''&&_0x5c1fdb>0x0){_0x5c1fdb++;continue;}break;}for(;_0x5c1fdb<_0x35c93f[_0x3bc648(0x18e)];_0x5c1fdb++){_0x13fce3['push'](_0x35c93f[_0x5c1fdb]);}return _0x13fce3[_0x3bc648(0x17d)]('\x0a')[_0x3bc648(0x180)]();}export function resolveSqlMode(_0x4ffd27,_0x4948b4){const _0x2c94d4=a123_0x370077;if(_0x4948b4?.[_0x2c94d4(0x16a)])return _0x4948b4[_0x2c94d4(0x16a)];return detectSqlMode(_0x4ffd27);}export function resolveSqlFileName(_0x509915,_0x10e1e7,_0x5038d4){const _0x40bfdd=a123_0x370077;if(_0x5038d4?.[_0x40bfdd(0x18a)])return _0x5038d4[_0x40bfdd(0x18a)];if(_0x5038d4?.[_0x40bfdd(0x183)]||_0x5038d4?.[_0x40bfdd(0x17a)])return buildSqlRelativePath(_0x509915,_0x5038d4?.['sqlName'],_0x5038d4?.[_0x40bfdd(0x17a)],resolveSqlMode(_0x10e1e7,_0x5038d4),_0x5038d4?.[_0x40bfdd(0x164)]);return buildDefaultSqlFileName(_0x509915,resolveSqlMode(_0x10e1e7,_0x5038d4));}export function resolveSqlLocalDir(_0x1ddbef,_0x561e71){return join(_0x1ddbef,SQL_LOCAL_REL_DIR,_0x561e71);}export async function confirmForceOverwrite(_0x4d7bd1){const _0x6f47c4=a123_0x370077,_0x4b1e2b=createInterface({'input':process[_0x6f47c4(0x17e)],'output':process['stderr']}),_0x4357ce=await new Promise(_0x59e5c5=>{const _0x378032=_0x6f47c4;_0x4b1e2b[_0x378032(0x178)](_0x4d7bd1+_0x378032(0x162),_0x59e5c5);});return _0x4b1e2b[_0x6f47c4(0x184)](),['y',_0x6f47c4(0x165)]['includes'](_0x4357ce[_0x6f47c4(0x167)]()['toLowerCase']());}export function findSqlLockScope(_0xe91bde,_0x671483){const _0x36424d=a123_0x370077;return _0xe91bde[_0x36424d(0x17b)][_0x671483];}function buildMetadataHeaderLines(_0x9aa3e7,_0x5518b0){const _0x1bdce2=a123_0x370077,_0x39d3b2=[[_0x1bdce2(0x173),_0x9aa3e7[_0x1bdce2(0x173)]],[_0x1bdce2(0x183),_0x9aa3e7[_0x1bdce2(0x183)]],[_0x1bdce2(0x164),_0x9aa3e7[_0x1bdce2(0x164)]],['dbName',_0x9aa3e7['dbName']],[_0x1bdce2(0x16a),_0x9aa3e7[_0x1bdce2(0x16a)]],[_0x1bdce2(0x17f),_0x9aa3e7['syncedAt']],[_0x1bdce2(0x163),_0x9aa3e7['description']]];if(_0x5518b0===_0x1bdce2(0x177))return _0x39d3b2['filter'](([,_0x36270a])=>_0x36270a!==undefined&&_0x36270a!==null&&String(_0x36270a)['trim']()!=='')[_0x1bdce2(0x176)](([_0x340620,_0x1439d5])=>_0x1bdce2(0x182)+_0x340620+':\x20'+String(_0x1439d5)+_0x1bdce2(0x186));return _0x39d3b2[_0x1bdce2(0x15f)](([,_0x10fff9])=>_0x10fff9!==undefined&&_0x10fff9!==null&&String(_0x10fff9)[_0x1bdce2(0x167)]()!=='')[_0x1bdce2(0x176)](([_0x386426,_0x2bc012])=>_0x1bdce2(0x171)+_0x386426+':\x20'+String(_0x2bc012));}
1
+ (function(_0x3b60e5,_0x40e136){const _0x563da3=a123_0x2cdc,_0x51fb2d=_0x3b60e5();while(!![]){try{const _0xf2e4a7=-parseInt(_0x563da3(0xb7))/0x1*(-parseInt(_0x563da3(0xab))/0x2)+-parseInt(_0x563da3(0xc2))/0x3*(parseInt(_0x563da3(0xbf))/0x4)+parseInt(_0x563da3(0xac))/0x5*(parseInt(_0x563da3(0xc9))/0x6)+parseInt(_0x563da3(0xa4))/0x7+parseInt(_0x563da3(0xb4))/0x8+-parseInt(_0x563da3(0xcb))/0x9+-parseInt(_0x563da3(0xb2))/0xa;if(_0xf2e4a7===_0x40e136)break;else _0x51fb2d['push'](_0x51fb2d['shift']());}catch(_0x1da939){_0x51fb2d['push'](_0x51fb2d['shift']());}}}(a123_0x5bf9,0x8b892));import{createInterface}from'node:readline';function a123_0x5bf9(){const _0x556e32=['1086vkAaSw','stdin','8175969UozSVE','split','--\x20@lovrabet.','description','dbId','4597425JSsCoa','replace','filter','stderr','syncedAt','question','lastSync','1006kavFxY','24585jxBfHX','map','\x20-->','path','sqlCode','push','13358730nSIPhz','test','6817520wwsqhB','trim','join','2081VmxzDC','sqlName','dbName','trimStart','close','sqls','fromEntries','length','4PKbhvu','sqlRoot','mybatisXml','1889499HTObSE','<!--\x20@lovrabet.','sqlConfig','mode','apps','\x20[y/N]\x20','yes'];a123_0x5bf9=function(){return _0x556e32;};return a123_0x5bf9();}import{join}from'node:path';import{buildDefaultSqlFileName,buildSqlRelativePath,detectSqlMode}from'../../core/sql-sync/utils.js';export const SQL_LOCAL_REL_DIR='.rabetbase/sql';export function buildSqlLockEntry(_0x5050f9,_0xbafec9,_0x4309c3,_0x92810){const _0x41f78b=a123_0x2cdc,_0x1f507e=detectSqlMode(_0xbafec9);return{'path':buildSqlRelativePath(_0x5050f9[_0x41f78b(0xb0)],_0x5050f9[_0x41f78b(0xb8)],_0x92810?.[_0x41f78b(0xb9)],_0x1f507e,_0x5050f9[_0x41f78b(0xa3)]),'hash':_0x4309c3,'remoteId':_0x5050f9['id'],'version':_0x5050f9['version'],'dbId':Number(_0x5050f9['dbId']),'dbName':_0x92810?.[_0x41f78b(0xb9)],'sqlName':_0x5050f9[_0x41f78b(0xb8)],'sqlConfig':_0x5050f9[_0x41f78b(0xc4)]??undefined,'mode':_0x1f507e};}export function cloneSqlLockData(_0x38e20f){const _0x15e08d=a123_0x2cdc;return{'apps':Object[_0x15e08d(0xbd)](Object['entries'](_0x38e20f[_0x15e08d(0xc6)])[_0x15e08d(0xad)](([_0x17b5f8,_0x33f90a])=>[_0x17b5f8,{'sqlRoot':_0x33f90a[_0x15e08d(0xc0)],'lastSync':_0x33f90a[_0x15e08d(0xaa)],'sqls':{..._0x33f90a[_0x15e08d(0xbc)]}}]))};}export function ensureRemoteSqlContent(_0x1db24d){return _0x1db24d['sqlContent']??'';}export function buildLocalSqlFileContent(_0x1d1e70,_0x5a53ee,_0x2889db){const _0x4c2ef4=a123_0x2cdc,_0x4ea0bd=_0x2889db?.[_0x4c2ef4(0xc5)]??detectSqlMode(_0x5a53ee),_0x56ed29=stripLocalSqlMetadata(_0x5a53ee,_0x4ea0bd)['trim'](),_0x172389=[...buildMetadataHeaderLines({'sqlCode':_0x1d1e70[_0x4c2ef4(0xb0)],'sqlName':_0x1d1e70[_0x4c2ef4(0xb8)],'dbId':_0x1d1e70[_0x4c2ef4(0xa3)],'dbName':_0x2889db?.[_0x4c2ef4(0xb9)],'mode':_0x4ea0bd,'syncedAt':_0x2889db?.['syncedAt'],'description':_0x2889db?.[_0x4c2ef4(0xa2)]},_0x4ea0bd),'',_0x56ed29],_0x211dcb=_0x172389[_0x4c2ef4(0xb6)]('\x0a');return _0x211dcb['endsWith']('\x0a')?_0x211dcb:_0x211dcb+'\x0a';}function a123_0x2cdc(_0x32127a,_0x4bbfa3){_0x32127a=_0x32127a-0xa2;const _0x5bf96c=a123_0x5bf9();let _0x2cdc88=_0x5bf96c[_0x32127a];return _0x2cdc88;}export function stripLocalSqlMetadata(_0x5402ed,_0x210178){const _0x420718=a123_0x2cdc,_0x3b46c9=_0x5402ed[_0x420718(0xa5)](/\r\n/g,'\x0a')[_0x420718(0xcc)]('\x0a'),_0x3717ae=[];let _0x12598e=0x0;if(_0x210178===_0x420718(0xc1))while(_0x12598e<_0x3b46c9[_0x420718(0xbe)]){const _0x148e92=_0x3b46c9[_0x12598e]??'';if(/^\s*<!--\s*@lovrabet\./[_0x420718(0xb3)](_0x148e92)){_0x12598e++;continue;}if(_0x148e92[_0x420718(0xb5)]()===''&&_0x12598e>0x0){_0x12598e++;continue;}break;}else while(_0x12598e<_0x3b46c9['length']){const _0x5efbeb=_0x3b46c9[_0x12598e]??'';if(/^\s*--\s*@lovrabet\./[_0x420718(0xb3)](_0x5efbeb)){_0x12598e++;continue;}if(_0x5efbeb[_0x420718(0xb5)]()===''&&_0x12598e>0x0){_0x12598e++;continue;}break;}for(;_0x12598e<_0x3b46c9[_0x420718(0xbe)];_0x12598e++){_0x3717ae[_0x420718(0xb1)](_0x3b46c9[_0x12598e]);}return _0x3717ae['join']('\x0a')[_0x420718(0xba)]();}export function resolveSqlMode(_0x24b3a4,_0xab7c5b){const _0x3a0e48=a123_0x2cdc;if(_0xab7c5b?.['mode'])return _0xab7c5b[_0x3a0e48(0xc5)];return detectSqlMode(_0x24b3a4);}export function resolveSqlFileName(_0x27c6e5,_0x9d9a9,_0x2a6e96){const _0x3bb5e8=a123_0x2cdc;if(_0x2a6e96?.[_0x3bb5e8(0xaf)])return _0x2a6e96[_0x3bb5e8(0xaf)];if(_0x2a6e96?.[_0x3bb5e8(0xb8)]||_0x2a6e96?.[_0x3bb5e8(0xb9)])return buildSqlRelativePath(_0x27c6e5,_0x2a6e96?.[_0x3bb5e8(0xb8)],_0x2a6e96?.[_0x3bb5e8(0xb9)],resolveSqlMode(_0x9d9a9,_0x2a6e96),_0x2a6e96?.[_0x3bb5e8(0xa3)]);return buildDefaultSqlFileName(_0x27c6e5,resolveSqlMode(_0x9d9a9,_0x2a6e96));}export function resolveSqlLocalDir(_0x3d9dec,_0x315278){return join(_0x3d9dec,SQL_LOCAL_REL_DIR,_0x315278);}export async function confirmForceOverwrite(_0x3ef961){const _0x3d0dbc=a123_0x2cdc,_0x2342f8=createInterface({'input':process[_0x3d0dbc(0xca)],'output':process[_0x3d0dbc(0xa7)]}),_0x474698=await new Promise(_0x477e17=>{const _0x2b59ed=_0x3d0dbc;_0x2342f8[_0x2b59ed(0xa9)](_0x3ef961+_0x2b59ed(0xc7),_0x477e17);});return _0x2342f8[_0x3d0dbc(0xbb)](),['y',_0x3d0dbc(0xc8)]['includes'](_0x474698[_0x3d0dbc(0xb5)]()['toLowerCase']());}export function findSqlLockScope(_0x4e99b0,_0x1a87c4){const _0x5d8d8d=a123_0x2cdc;return _0x4e99b0[_0x5d8d8d(0xc6)][_0x1a87c4];}function buildMetadataHeaderLines(_0x491b2d,_0x764c79){const _0x7823a1=a123_0x2cdc,_0x7cdd4d=[['sqlCode',_0x491b2d[_0x7823a1(0xb0)]],[_0x7823a1(0xb8),_0x491b2d[_0x7823a1(0xb8)]],[_0x7823a1(0xa3),_0x491b2d[_0x7823a1(0xa3)]],[_0x7823a1(0xb9),_0x491b2d['dbName']],[_0x7823a1(0xc5),_0x491b2d[_0x7823a1(0xc5)]],['syncedAt',_0x491b2d[_0x7823a1(0xa8)]],[_0x7823a1(0xa2),_0x491b2d[_0x7823a1(0xa2)]]];if(_0x764c79==='mybatisXml')return _0x7cdd4d[_0x7823a1(0xa6)](([,_0x368297])=>_0x368297!==undefined&&_0x368297!==null&&String(_0x368297)['trim']()!=='')[_0x7823a1(0xad)](([_0x3d2abc,_0x318b3f])=>_0x7823a1(0xc3)+_0x3d2abc+':\x20'+String(_0x318b3f)+_0x7823a1(0xae));return _0x7cdd4d[_0x7823a1(0xa6)](([,_0x332a4d])=>_0x332a4d!==undefined&&_0x332a4d!==null&&String(_0x332a4d)['trim']()!=='')['map'](([_0x3507aa,_0x26fcfe])=>_0x7823a1(0xcd)+_0x3507aa+':\x20'+String(_0x26fcfe));}
@@ -1 +1 @@
1
- const a124_0x1e84cc=a124_0x3dc4;(function(_0x16a559,_0x3510a9){const _0xacba9b=a124_0x3dc4,_0x19f219=_0x16a559();while(!![]){try{const _0x375d47=-parseInt(_0xacba9b(0x73))/0x1*(parseInt(_0xacba9b(0x76))/0x2)+-parseInt(_0xacba9b(0x7f))/0x3+-parseInt(_0xacba9b(0x92))/0x4+parseInt(_0xacba9b(0x7d))/0x5+parseInt(_0xacba9b(0x97))/0x6*(-parseInt(_0xacba9b(0x77))/0x7)+-parseInt(_0xacba9b(0x72))/0x8+parseInt(_0xacba9b(0x87))/0x9;if(_0x375d47===_0x3510a9)break;else _0x19f219['push'](_0x19f219['shift']());}catch(_0x4fa4e8){_0x19f219['push'](_0x19f219['shift']());}}}(a124_0x2090,0xdeaf1));import{listSqlQueries}from'../../core/api-client.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';import{scanLocalSqlQueries}from'../../core/sql-sync/file-system.js';import{computeSqlFileHash}from'../../core/sql-sync/hash.js';import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile}from'../../core/sql-sync/lock.js';const PAGE_SIZE=0x64;async function fetchAllSqlCodes(_0x54185b){const _0x596663=a124_0x3dc4,_0x45a466=[];let _0x1a3bd4=0x1;while(!![]){const _0xf4df3a=await listSqlQueries(_0x54185b,{'currentPage':_0x1a3bd4,'pageSize':PAGE_SIZE}),_0x4261e8=_0xf4df3a[_0x596663(0x85)]??[];_0x45a466['push'](..._0x4261e8['map'](_0xf15a5a=>_0xf15a5a['sqlCode']));if(_0x4261e8[_0x596663(0x7a)]===0x0)break;const _0xd3fac=_0xf4df3a[_0x596663(0x75)]?.[_0x596663(0x80)];if(_0xd3fac!=null?_0x45a466[_0x596663(0x7a)]>=_0xd3fac:_0x4261e8['length']<PAGE_SIZE)break;_0x1a3bd4++;}return _0x45a466;}function a124_0x3dc4(_0x2f0db6,_0x4cf017){_0x2f0db6=_0x2f0db6-0x72;const _0x20909f=a124_0x2090();let _0x3dc47f=_0x20909f[_0x2f0db6];return _0x3dc47f;}export const sqlStatus={'service':a124_0x1e84cc(0x8a),'command':'status','description':a124_0x1e84cc(0x79),'risk':a124_0x1e84cc(0x83),'flags':[{'name':a124_0x1e84cc(0x7c),'type':a124_0x1e84cc(0x96),'description':a124_0x1e84cc(0x81)}],async 'execute'(_0x17401d){const _0x1b8b0c=a124_0x1e84cc,_0x467a9f=loadSqlProjectConfig(_0x17401d[_0x1b8b0c(0x93)]),_0x3f22f9=await readSqlLockFile(_0x467a9f[_0x1b8b0c(0x8b)]),{appLock:_0x101987}=ensureSqlLockScope(_0x3f22f9??createEmptySqlLock(),_0x467a9f[_0x1b8b0c(0x93)],_0x467a9f[_0x1b8b0c(0x86)],_0x1b8b0c(0x78)),_0x382f35=await scanLocalSqlQueries(_0x467a9f),_0x14e1f3=[],_0x3e395a=[],_0x52d14a=[],_0x35d194=[],_0xe277e9=new Set(_0x382f35[_0x1b8b0c(0x8f)](_0x3a80d2=>_0x3a80d2[_0x1b8b0c(0x8c)]));for(const _0x22ce5e of _0x382f35){const _0xf637ef=await computeSqlFileHash(_0x22ce5e[_0x1b8b0c(0x82)]),_0x591682=_0x101987[_0x1b8b0c(0x8e)][_0x22ce5e[_0x1b8b0c(0x8c)]],_0x81a942=!!_0x591682&&_0x591682[_0x1b8b0c(0x7e)]!==_0x22ce5e[_0x1b8b0c(0x94)],_0x5b4b36=!!_0x591682&&!!_0x22ce5e[_0x1b8b0c(0x7b)]&&_0x591682[_0x1b8b0c(0x7b)]!==_0x22ce5e[_0x1b8b0c(0x7b)];if(!_0x591682)_0x14e1f3[_0x1b8b0c(0x88)](_0x22ce5e[_0x1b8b0c(0x8c)]);else _0x591682['hash']!==_0xf637ef||_0x81a942||_0x5b4b36?_0x3e395a[_0x1b8b0c(0x88)](_0x22ce5e['lockKey']):_0x52d14a[_0x1b8b0c(0x88)](_0x22ce5e[_0x1b8b0c(0x8c)]);}for(const _0x3afc57 of Object[_0x1b8b0c(0x95)](_0x101987[_0x1b8b0c(0x8e)])){!_0xe277e9['has'](_0x3afc57)&&_0x35d194['push'](_0x3afc57);}const _0x46a385=[];if(_0x17401d[_0x1b8b0c(0x74)](_0x1b8b0c(0x7c))){const _0x4e74dd=await fetchAllSqlCodes(_0x17401d[_0x1b8b0c(0x93)]);for(const _0x332256 of _0x4e74dd){!_0xe277e9[_0x1b8b0c(0x91)](_0x332256)&&!_0x101987[_0x1b8b0c(0x8e)][_0x332256]&&_0x46a385[_0x1b8b0c(0x88)](_0x332256);}}const _0x5519a6=_0x14e1f3['length']===0x0&&_0x3e395a[_0x1b8b0c(0x7a)]===0x0&&_0x35d194[_0x1b8b0c(0x7a)]===0x0&&_0x46a385[_0x1b8b0c(0x7a)]===0x0;return{'ok':!![],'data':{'added':_0x14e1f3,'modified':_0x3e395a,'missing':_0x35d194,'unchanged':_0x52d14a,'remoteOnly':_0x46a385},'message':_0x5519a6?_0x1b8b0c(0x84):_0x14e1f3[_0x1b8b0c(0x7a)]+'\x20added,\x20'+_0x3e395a['length']+_0x1b8b0c(0x8d)+_0x35d194[_0x1b8b0c(0x7a)]+_0x1b8b0c(0x89)+_0x52d14a[_0x1b8b0c(0x7a)]+_0x1b8b0c(0x90)+(_0x46a385['length']>0x0?',\x20'+_0x46a385[_0x1b8b0c(0x7a)]+'\x20remote-only':'')};}};function a124_0x2090(){const _0x259807=['2154EenkDQ','14268224VabilK','594637ugtQNq','bool','paging','2iiPyUh','8309pXNYrT','status','Check\x20local\x20SQL\x20sync\x20status\x20against\x20lock\x20file','length','sqlName','remote','4392230hKugKf','path','3277503YYxski','totalCount','Also\x20check\x20for\x20remote-only\x20SQL\x20queries\x20not\x20present\x20locally','filePath','read','All\x20SQL\x20queries\x20are\x20in\x20sync.','tableData','sqlRoot','39500559uTPlRL','push','\x20missing,\x20','sql','lockFilePath','lockKey','\x20modified,\x20','sqls','map','\x20unchanged','has','1833940JFktIo','appCode','relativePath','keys','boolean'];a124_0x2090=function(){return _0x259807;};return a124_0x2090();}
1
+ function a124_0x2426(_0x2f57a1,_0x3a4214){_0x2f57a1=_0x2f57a1-0x174;const _0xab51de=a124_0xab51();let _0x2426d7=_0xab51de[_0x2f57a1];return _0x2426d7;}const a124_0xc7f8b4=a124_0x2426;(function(_0x243535,_0x458783){const _0x1f55df=a124_0x2426,_0x4a0ae4=_0x243535();while(!![]){try{const _0x5a5a5f=-parseInt(_0x1f55df(0x18c))/0x1+-parseInt(_0x1f55df(0x176))/0x2+parseInt(_0x1f55df(0x189))/0x3*(parseInt(_0x1f55df(0x178))/0x4)+parseInt(_0x1f55df(0x17a))/0x5*(-parseInt(_0x1f55df(0x184))/0x6)+parseInt(_0x1f55df(0x186))/0x7+parseInt(_0x1f55df(0x18e))/0x8*(parseInt(_0x1f55df(0x182))/0x9)+parseInt(_0x1f55df(0x195))/0xa*(-parseInt(_0x1f55df(0x193))/0xb);if(_0x5a5a5f===_0x458783)break;else _0x4a0ae4['push'](_0x4a0ae4['shift']());}catch(_0x1bcac3){_0x4a0ae4['push'](_0x4a0ae4['shift']());}}}(a124_0xab51,0x60722));import{listSqlQueries}from'../../core/api-client.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';import{scanLocalSqlQueries}from'../../core/sql-sync/file-system.js';import{computeSqlFileHash}from'../../core/sql-sync/hash.js';import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile}from'../../core/sql-sync/lock.js';function a124_0xab51(){const _0x554f48=['280wkMiYk','status','sqls','map','All\x20SQL\x20queries\x20are\x20in\x20sync.','55UecRsZ','sqlRoot','124220mAKYlR','tableData','sqlName','144728pUewYT','\x20unchanged','9588qePsql','has','5CUTuGI','\x20remote-only','\x20added,\x20','push','length','read','Also\x20check\x20for\x20remote-only\x20SQL\x20queries\x20not\x20present\x20locally','sql','108639fTmRhn','appCode','3233190pxQUZU','lockKey','1348270UeCxcL','bool','hash','813MrMHHS','totalCount','filePath','196301jidcSU','remote'];a124_0xab51=function(){return _0x554f48;};return a124_0xab51();}const PAGE_SIZE=0x64;async function fetchAllSqlCodes(_0x552699){const _0x580dfe=a124_0x2426,_0x4fd2cb=[];let _0x4c816a=0x1;while(!![]){const _0x5448c1=await listSqlQueries(_0x552699,{'currentPage':_0x4c816a,'pageSize':PAGE_SIZE}),_0x284b27=_0x5448c1[_0x580dfe(0x174)]??[];_0x4fd2cb[_0x580dfe(0x17d)](..._0x284b27[_0x580dfe(0x191)](_0x5a44e8=>_0x5a44e8['sqlCode']));if(_0x284b27[_0x580dfe(0x17e)]===0x0)break;const _0x11c758=_0x5448c1['paging']?.[_0x580dfe(0x18a)];if(_0x11c758!=null?_0x4fd2cb[_0x580dfe(0x17e)]>=_0x11c758:_0x284b27[_0x580dfe(0x17e)]<PAGE_SIZE)break;_0x4c816a++;}return _0x4fd2cb;}export const sqlStatus={'service':a124_0xc7f8b4(0x181),'command':a124_0xc7f8b4(0x18f),'description':'Check\x20local\x20SQL\x20sync\x20status\x20against\x20lock\x20file','risk':a124_0xc7f8b4(0x17f),'flags':[{'name':a124_0xc7f8b4(0x18d),'type':'boolean','description':a124_0xc7f8b4(0x180)}],async 'execute'(_0x4e72b1){const _0x4c7724=a124_0xc7f8b4,_0x3f2331=loadSqlProjectConfig(_0x4e72b1[_0x4c7724(0x183)]),_0x364c55=await readSqlLockFile(_0x3f2331['lockFilePath']),{appLock:_0x46effe}=ensureSqlLockScope(_0x364c55??createEmptySqlLock(),_0x3f2331[_0x4c7724(0x183)],_0x3f2331[_0x4c7724(0x194)],_0x4c7724(0x18f)),_0x2132a6=await scanLocalSqlQueries(_0x3f2331),_0x1615c2=[],_0x381a0e=[],_0x4e8311=[],_0x25dba1=[],_0x220211=new Set(_0x2132a6[_0x4c7724(0x191)](_0x5e15e1=>_0x5e15e1[_0x4c7724(0x185)]));for(const _0x138798 of _0x2132a6){const _0x2ea308=await computeSqlFileHash(_0x138798[_0x4c7724(0x18b)]),_0x4e268d=_0x46effe[_0x4c7724(0x190)][_0x138798[_0x4c7724(0x185)]],_0xb3e086=!!_0x4e268d&&_0x4e268d['path']!==_0x138798['relativePath'],_0x4a427e=!!_0x4e268d&&!!_0x138798[_0x4c7724(0x175)]&&_0x4e268d[_0x4c7724(0x175)]!==_0x138798['sqlName'];if(!_0x4e268d)_0x1615c2[_0x4c7724(0x17d)](_0x138798[_0x4c7724(0x185)]);else _0x4e268d[_0x4c7724(0x188)]!==_0x2ea308||_0xb3e086||_0x4a427e?_0x381a0e[_0x4c7724(0x17d)](_0x138798[_0x4c7724(0x185)]):_0x4e8311['push'](_0x138798[_0x4c7724(0x185)]);}for(const _0x4f93fa of Object['keys'](_0x46effe[_0x4c7724(0x190)])){!_0x220211['has'](_0x4f93fa)&&_0x25dba1[_0x4c7724(0x17d)](_0x4f93fa);}const _0x10899e=[];if(_0x4e72b1[_0x4c7724(0x187)](_0x4c7724(0x18d))){const _0xbd2e7=await fetchAllSqlCodes(_0x4e72b1[_0x4c7724(0x183)]);for(const _0x3acf1b of _0xbd2e7){!_0x220211[_0x4c7724(0x179)](_0x3acf1b)&&!_0x46effe[_0x4c7724(0x190)][_0x3acf1b]&&_0x10899e[_0x4c7724(0x17d)](_0x3acf1b);}}const _0x575932=_0x1615c2[_0x4c7724(0x17e)]===0x0&&_0x381a0e[_0x4c7724(0x17e)]===0x0&&_0x25dba1['length']===0x0&&_0x10899e[_0x4c7724(0x17e)]===0x0;return{'ok':!![],'data':{'added':_0x1615c2,'modified':_0x381a0e,'missing':_0x25dba1,'unchanged':_0x4e8311,'remoteOnly':_0x10899e},'message':_0x575932?_0x4c7724(0x192):_0x1615c2[_0x4c7724(0x17e)]+_0x4c7724(0x17c)+_0x381a0e[_0x4c7724(0x17e)]+'\x20modified,\x20'+_0x25dba1[_0x4c7724(0x17e)]+'\x20missing,\x20'+_0x4e8311[_0x4c7724(0x17e)]+_0x4c7724(0x177)+(_0x10899e[_0x4c7724(0x17e)]>0x0?',\x20'+_0x10899e[_0x4c7724(0x17e)]+_0x4c7724(0x17b):'')};}};
@@ -1 +1 @@
1
- function a125_0x31bb(_0x11e5fb,_0x12cf1e){_0x11e5fb=_0x11e5fb-0x89;const _0x5c5da7=a125_0x5c5d();let _0x31bbf0=_0x5c5da7[_0x11e5fb];return _0x31bbf0;}const a125_0x4e699a=a125_0x31bb;function a125_0x5c5d(){const _0x24421c=['isDangerous','10znvXlI','trim','64oEUMhy','sql','reason','schemas','tableName','9170217aqTRXF','valid','Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)','map','fields','\x22\x20not\x20found\x20in\x20any\x20dataset','string','291620mCQQLY','from','push','2628717yyWPiu','Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)','1019228wMYeWy','156708yLEgqn','isArray','cwd','size','parameters','Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against','message','sqlType','schemaWarnings','filter','toLowerCase','flagMissing','tables','dbtableConfig','310cbWOSz','Provide\x20--file\x20or\x20--sql','Table\x20\x22','utf-8','2288006pSSGZg','isSelectOnly','5532604hDABMj','Dataset\x20\x22','File\x20not\x20found:\x20','str','read','file','length','validation','Path\x20to\x20the\x20SQL\x20file\x20to\x20validate'];a125_0x5c5d=function(){return _0x24421c;};return a125_0x5c5d();}(function(_0x5de2db,_0x558b2a){const _0x577725=a125_0x31bb,_0x5af822=_0x5de2db();while(!![]){try{const _0x408b9=-parseInt(_0x577725(0xb7))/0x1+parseInt(_0x577725(0x98))/0x2+-parseInt(_0x577725(0xb5))/0x3+parseInt(_0x577725(0x9a))/0x4+-parseInt(_0x577725(0x94))/0x5*(-parseInt(_0x577725(0xb8))/0x6)+parseInt(_0x577725(0xb2))/0x7*(-parseInt(_0x577725(0xa6))/0x8)+-parseInt(_0x577725(0xab))/0x9*(parseInt(_0x577725(0xa4))/0xa);if(_0x408b9===_0x558b2a)break;else _0x5af822['push'](_0x5af822['shift']());}catch(_0x41c628){_0x5af822['push'](_0x5af822['shift']());}}}(a125_0x5c5d,0xdb6fa));import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';import{validateSql}from'../../core/sql-validator.js';import{getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const sqlValidate={'service':a125_0x4e699a(0xa7),'command':'validate','description':a125_0x4e699a(0xb6),'risk':a125_0x4e699a(0x9e),'flags':[{'name':'file','type':a125_0x4e699a(0xb1),'description':a125_0x4e699a(0xa2)},{'name':a125_0x4e699a(0xa7),'type':a125_0x4e699a(0xb1),'description':a125_0x4e699a(0xad)},{'name':a125_0x4e699a(0xa9),'type':a125_0x4e699a(0xb1),'description':a125_0x4e699a(0x8b)}],async 'execute'(_0x2a9c8d){const _0x365631=a125_0x4e699a,_0x41fe64=_0x2a9c8d[_0x365631(0x9d)](_0x365631(0x9f)),_0x3c0ac4=_0x2a9c8d['str'](_0x365631(0xa7));if(!_0x41fe64&&!_0x3c0ac4)throw CliErrors[_0x365631(0x91)]('file',_0x365631(0x95));let _0x1d2ea7;if(_0x41fe64){const _0x180daa=resolve(process[_0x365631(0xba)](),_0x41fe64);if(!existsSync(_0x180daa))throw CliErrors[_0x365631(0xa1)](_0x365631(0x9c)+_0x180daa);_0x1d2ea7=readFileSync(_0x180daa,_0x365631(0x97));}else _0x1d2ea7=_0x3c0ac4;const _0x48a349=validateSql(_0x1d2ea7),_0x4c4730={'valid':_0x48a349['valid'],'sqlType':_0x48a349[_0x365631(0x8d)]['type'],'isSelectOnly':_0x48a349[_0x365631(0x8d)][_0x365631(0x99)],'isDangerous':_0x48a349[_0x365631(0x8d)][_0x365631(0xa3)],'tables':_0x48a349['tables'],'parameters':_0x48a349[_0x365631(0x8a)],'message':_0x48a349['message']};_0x48a349[_0x365631(0x8d)]['reason']&&(_0x4c4730[_0x365631(0xa8)]=_0x48a349[_0x365631(0x8d)][_0x365631(0xa8)]);const _0x5cb5c8=_0x2a9c8d[_0x365631(0x9d)](_0x365631(0xa9));if(_0x5cb5c8&&_0x48a349[_0x365631(0xac)]){const _0x3a977b=_0x5cb5c8['split'](',')[_0x365631(0xae)](_0x24db18=>_0x24db18[_0x365631(0xa5)]())[_0x365631(0x8f)](Boolean),_0x499082=[],_0x221c77=await listDatasets(_0x2a9c8d['appCode']),_0x40946a=new Map(_0x221c77['map'](_0x551742=>[_0x551742['dbtableConfig']?.[_0x365631(0xaa)]?.[_0x365631(0x90)](),_0x551742]));for(const _0x3ebbfa of _0x48a349[_0x365631(0x92)]){const _0x1cc929=_0x40946a['get'](_0x3ebbfa[_0x365631(0x90)]());!_0x1cc929&&_0x499082[_0x365631(0xb4)](_0x365631(0x96)+_0x3ebbfa+_0x365631(0xb0));}for(const _0x2cb54a of _0x3a977b){try{const _0x56b0ea=await getDatasetDetail(_0x2cb54a),_0x5a9020=Array[_0x365631(0xb9)](_0x56b0ea[_0x365631(0xaf)])?_0x56b0ea[_0x365631(0xaf)]:[],_0x14f85a=new Set(_0x5a9020[_0x365631(0xae)](_0x2ef781=>_0x2ef781['name']?.[_0x365631(0x90)]())),_0x292415=_0x56b0ea[_0x365631(0x93)]?.[_0x365631(0xaa)]||_0x56b0ea[_0x365631(0xaa)]||_0x2cb54a;_0x4c4730['schema:'+_0x292415]={'code':_0x2cb54a,'tableName':_0x292415,'fieldCount':_0x14f85a[_0x365631(0x89)],'fields':Array[_0x365631(0xb3)](_0x14f85a)};}catch{_0x499082[_0x365631(0xb4)](_0x365631(0x9b)+_0x2cb54a+'\x22\x20not\x20found\x20or\x20not\x20accessible');}}_0x499082[_0x365631(0xa0)]>0x0&&(_0x4c4730[_0x365631(0x8e)]=_0x499082);}return{'ok':_0x48a349[_0x365631(0xac)],'data':_0x4c4730,'message':_0x48a349[_0x365631(0x8c)]};}};
1
+ const a125_0x39781c=a125_0x57b8;function a125_0x57b8(_0x3c7f26,_0x456f8d){_0x3c7f26=_0x3c7f26-0x15a;const _0x581ab9=a125_0x581a();let _0x57b8a0=_0x581ab9[_0x3c7f26];return _0x57b8a0;}(function(_0x4e78b5,_0x295f2d){const _0x1ff7c4=a125_0x57b8,_0x2131f4=_0x4e78b5();while(!![]){try{const _0x409471=parseInt(_0x1ff7c4(0x15c))/0x1+parseInt(_0x1ff7c4(0x15f))/0x2*(-parseInt(_0x1ff7c4(0x177))/0x3)+parseInt(_0x1ff7c4(0x17a))/0x4+-parseInt(_0x1ff7c4(0x171))/0x5+parseInt(_0x1ff7c4(0x164))/0x6+parseInt(_0x1ff7c4(0x181))/0x7+-parseInt(_0x1ff7c4(0x173))/0x8;if(_0x409471===_0x295f2d)break;else _0x2131f4['push'](_0x2131f4['shift']());}catch(_0x5be4b1){_0x2131f4['push'](_0x2131f4['shift']());}}}(a125_0x581a,0x5d2d2));import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';import{validateSql}from'../../core/sql-validator.js';import{getDatasetDetail,listDatasets}from'../../core/api-client.js';function a125_0x581a(){const _0x347526=['269407IFiLQm','Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against','string','1092ertEpj','file','parameters','sqlType','isSelectOnly','3992622QiQbtr','push','schemas','Dataset\x20\x22','appCode','\x22\x20not\x20found\x20or\x20not\x20accessible','validate','flagMissing','split','Path\x20to\x20the\x20SQL\x20file\x20to\x20validate','get','map','str','553170jcDaZX','isDangerous','10977560omZBru','utf-8','valid','cwd','2481LUQQve','Provide\x20--file\x20or\x20--sql','isArray','2856056MLbBCG','reason','toLowerCase','\x22\x20not\x20found\x20in\x20any\x20dataset','Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)','fields','validation','4670141HNyXlh','dbtableConfig','Table\x20\x22','tables','tableName','sql'];a125_0x581a=function(){return _0x347526;};return a125_0x581a();}import{CliErrors}from'../../errors.js';export const sqlValidate={'service':a125_0x39781c(0x15b),'command':a125_0x39781c(0x16a),'description':a125_0x39781c(0x17e),'risk':'read','flags':[{'name':a125_0x39781c(0x160),'type':a125_0x39781c(0x15e),'description':a125_0x39781c(0x16d)},{'name':a125_0x39781c(0x15b),'type':'string','description':'Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)'},{'name':a125_0x39781c(0x166),'type':'string','description':a125_0x39781c(0x15d)}],async 'execute'(_0x4a7273){const _0x51d4ce=a125_0x39781c,_0x1796c3=_0x4a7273[_0x51d4ce(0x170)](_0x51d4ce(0x160)),_0xb63afd=_0x4a7273[_0x51d4ce(0x170)](_0x51d4ce(0x15b));if(!_0x1796c3&&!_0xb63afd)throw CliErrors[_0x51d4ce(0x16b)](_0x51d4ce(0x160),_0x51d4ce(0x178));let _0x25ceae;if(_0x1796c3){const _0x34fcee=resolve(process[_0x51d4ce(0x176)](),_0x1796c3);if(!existsSync(_0x34fcee))throw CliErrors[_0x51d4ce(0x180)]('File\x20not\x20found:\x20'+_0x34fcee);_0x25ceae=readFileSync(_0x34fcee,_0x51d4ce(0x174));}else _0x25ceae=_0xb63afd;const _0x2bcc6e=validateSql(_0x25ceae),_0x217475={'valid':_0x2bcc6e['valid'],'sqlType':_0x2bcc6e[_0x51d4ce(0x162)]['type'],'isSelectOnly':_0x2bcc6e['sqlType'][_0x51d4ce(0x163)],'isDangerous':_0x2bcc6e[_0x51d4ce(0x162)][_0x51d4ce(0x172)],'tables':_0x2bcc6e[_0x51d4ce(0x184)],'parameters':_0x2bcc6e[_0x51d4ce(0x161)],'message':_0x2bcc6e['message']};_0x2bcc6e[_0x51d4ce(0x162)]['reason']&&(_0x217475[_0x51d4ce(0x17b)]=_0x2bcc6e[_0x51d4ce(0x162)][_0x51d4ce(0x17b)]);const _0x28c122=_0x4a7273['str'](_0x51d4ce(0x166));if(_0x28c122&&_0x2bcc6e[_0x51d4ce(0x175)]){const _0x7a6615=_0x28c122[_0x51d4ce(0x16c)](',')['map'](_0x2a1c28=>_0x2a1c28['trim']())['filter'](Boolean),_0x333600=[],_0x398bc7=await listDatasets(_0x4a7273[_0x51d4ce(0x168)]),_0x580a20=new Map(_0x398bc7[_0x51d4ce(0x16f)](_0x1f8d35=>[_0x1f8d35['dbtableConfig']?.[_0x51d4ce(0x15a)]?.[_0x51d4ce(0x17c)](),_0x1f8d35]));for(const _0x336376 of _0x2bcc6e[_0x51d4ce(0x184)]){const _0x41c617=_0x580a20[_0x51d4ce(0x16e)](_0x336376['toLowerCase']());!_0x41c617&&_0x333600[_0x51d4ce(0x165)](_0x51d4ce(0x183)+_0x336376+_0x51d4ce(0x17d));}for(const _0x254bdd of _0x7a6615){try{const _0x2b2f2f=await getDatasetDetail(_0x254bdd),_0x1d0727=Array[_0x51d4ce(0x179)](_0x2b2f2f['fields'])?_0x2b2f2f[_0x51d4ce(0x17f)]:[],_0x2811ed=new Set(_0x1d0727[_0x51d4ce(0x16f)](_0x3bc7d1=>_0x3bc7d1['name']?.[_0x51d4ce(0x17c)]())),_0x32dfe7=_0x2b2f2f[_0x51d4ce(0x182)]?.[_0x51d4ce(0x15a)]||_0x2b2f2f[_0x51d4ce(0x15a)]||_0x254bdd;_0x217475['schema:'+_0x32dfe7]={'code':_0x254bdd,'tableName':_0x32dfe7,'fieldCount':_0x2811ed['size'],'fields':Array['from'](_0x2811ed)};}catch{_0x333600[_0x51d4ce(0x165)](_0x51d4ce(0x167)+_0x254bdd+_0x51d4ce(0x169));}}_0x333600['length']>0x0&&(_0x217475['schemaWarnings']=_0x333600);}return{'ok':_0x2bcc6e[_0x51d4ce(0x175)],'data':_0x217475,'message':_0x2bcc6e['message']};}};
@@ -1 +1 @@
1
- const a126_0x1ce9e2=a126_0xf7cd;(function(_0x26a7f1,_0x44b43d){const _0x1af747=a126_0xf7cd,_0x422623=_0x26a7f1();while(!![]){try{const _0x1edddd=parseInt(_0x1af747(0x142))/0x1+-parseInt(_0x1af747(0x14d))/0x2+-parseInt(_0x1af747(0x146))/0x3*(parseInt(_0x1af747(0x161))/0x4)+parseInt(_0x1af747(0x157))/0x5*(-parseInt(_0x1af747(0x155))/0x6)+-parseInt(_0x1af747(0x159))/0x7*(-parseInt(_0x1af747(0x14a))/0x8)+parseInt(_0x1af747(0x153))/0x9+-parseInt(_0x1af747(0x14b))/0xa;if(_0x1edddd===_0x44b43d)break;else _0x422623['push'](_0x422623['shift']());}catch(_0x18635f){_0x422623['push'](_0x422623['shift']());}}}(a126_0x55f8,0x912ac));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';function a126_0xf7cd(_0x3f6c45,_0x312eef){_0x3f6c45=_0x3f6c45-0x140;const _0x55f80b=a126_0x55f8();let _0xf7cd9a=_0x55f80b[_0x3f6c45];return _0xf7cd9a;}import{RABETBASE_ENV_VALUES}from'../constant/env.js';import{RABETBASE_OUTPUT_FORMAT_VALUES}from'../constant/output.js';import{RISK_LEVEL_VALUES}from'../constant/risk.js';export{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';export const PROJECT_CREATE_INHERITABLE_KEYS=[a126_0x1ce9e2(0x158),'accessKey',a126_0x1ce9e2(0x169),a126_0x1ce9e2(0x15d),a126_0x1ce9e2(0x14c)];export const TOP_LEVEL_CONFIG_KEYS=new Set([a126_0x1ce9e2(0x163),a126_0x1ce9e2(0x167),a126_0x1ce9e2(0x169),'format','cookie',a126_0x1ce9e2(0x154),'apiDir']);export const CONFIG_ENUM_VALUES={'env':[...RABETBASE_ENV_VALUES],'format':[...RABETBASE_OUTPUT_FORMAT_VALUES]};export function formatConfigKeyList(_0xff0db4){const _0x3c9665=a126_0x1ce9e2;return[..._0xff0db4][_0x3c9665(0x16a)](',\x20');}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function isTopLevelConfigKey(_0x5ea3be){const _0x302d45=a126_0x1ce9e2;return TOP_LEVEL_CONFIG_KEYS[_0x302d45(0x15c)](_0x5ea3be);}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x2b4d2a=a126_0x1ce9e2;return _0x2b4d2a(0x150)+getTopLevelConfigKeySummary()+')';}export const APP_PROFILE_FLAG_KEY_MAP={'env':a126_0x1ce9e2(0x167),'apiDir':a126_0x1ce9e2(0x148),'cookie':a126_0x1ce9e2(0x158),'accessKey':a126_0x1ce9e2(0x154),'defaultFormat':a126_0x1ce9e2(0x15d),'pageSize':a126_0x1ce9e2(0x145),'riskLevel':a126_0x1ce9e2(0x14c),'locale':a126_0x1ce9e2(0x169)};export function getAppProfileFlagDefs(){const _0x323c98=a126_0x1ce9e2;return[{'name':_0x323c98(0x167),'type':_0x323c98(0x143),'description':_0x323c98(0x15a),'enum':[...RABETBASE_ENV_VALUES]},{'name':_0x323c98(0x148),'type':_0x323c98(0x143),'description':'API\x20directory\x20path'},{'name':_0x323c98(0x158),'type':_0x323c98(0x143),'description':_0x323c98(0x152),'hidden':!![]},{'name':_0x323c98(0x154),'type':'string','description':_0x323c98(0x144),'hidden':!![]},{'name':_0x323c98(0x140),'type':_0x323c98(0x143),'description':_0x323c98(0x141),'enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':'pageSize','type':_0x323c98(0x166),'description':_0x323c98(0x149)},{'name':_0x323c98(0x14c),'type':_0x323c98(0x143),'description':_0x323c98(0x15f),'enum':[...RISK_LEVEL_VALUES]},{'name':_0x323c98(0x169),'type':'string','description':_0x323c98(0x156)}];}export function collectAppProfileOverrides(_0x5f02d4){const _0x27d954=a126_0x1ce9e2,_0x35b0ce={};for(const [_0x250713,_0x4cb9d6]of Object[_0x27d954(0x14f)](APP_PROFILE_FLAG_KEY_MAP)){const _0x1f8c7b=_0x5f02d4(_0x250713);if(!_0x1f8c7b)continue;_0x35b0ce[_0x4cb9d6]=_0x4cb9d6===_0x27d954(0x145)?Number(_0x1f8c7b):_0x1f8c7b;}return _0x35b0ce;}export function buildAppProfileListFields(_0x3843c0){const _0x1c67ee=a126_0x1ce9e2;return{'env':_0x3843c0[_0x1c67ee(0x167)]??null,'apiDir':_0x3843c0[_0x1c67ee(0x148)]??null,'hasCookie':!!_0x3843c0[_0x1c67ee(0x158)],'hasAccessKey':!!_0x3843c0[_0x1c67ee(0x154)],'format':_0x3843c0[_0x1c67ee(0x15d)]??null,'pageSize':_0x3843c0['pageSize']??null,'riskLevel':_0x3843c0[_0x1c67ee(0x14c)]??null,'locale':_0x3843c0[_0x1c67ee(0x169)]??null};}export function buildAppDoctorFields(_0x307905,_0x3e8f20){const _0x18cb3d=a126_0x1ce9e2;return{'env':{'value':_0x307905['env']||_0x3e8f20['env'],'source':_0x307905[_0x18cb3d(0x167)]?_0x18cb3d(0x165):_0x18cb3d(0x151)},'apiDir':{'value':_0x307905[_0x18cb3d(0x148)]||_0x3e8f20[_0x18cb3d(0x148)],'source':_0x307905[_0x18cb3d(0x148)]?_0x18cb3d(0x165):_0x18cb3d(0x151)},'cookie':{'value':_0x307905[_0x18cb3d(0x158)]||_0x3e8f20[_0x18cb3d(0x158)],'source':_0x307905['cookie']?'app':_0x18cb3d(0x151)},'accessKey':{'value':_0x307905[_0x18cb3d(0x154)]||_0x3e8f20['accessKey'],'source':_0x307905['accessKey']?_0x18cb3d(0x165):_0x18cb3d(0x151)}};}export function buildCanonicalAppConfig(_0x454b87,_0x7ad654){const _0x1c2d4f=a126_0x1ce9e2,_0x357625=_0x454b87[_0x1c2d4f(0x160)](_0x24a793=>String(_0x24a793||'')[_0x1c2d4f(0x162)]())['filter'](Boolean);if(_0x357625[_0x1c2d4f(0x14e)]===0x0)return{};const _0x2e61d7={};for(const _0xb465f8 of _0x357625){_0x2e61d7[_0xb465f8]=_0x7ad654?{'appcode':_0xb465f8,'env':_0x7ad654}:{'appcode':_0xb465f8};}return{'apps':_0x2e61d7,'defaultApp':_0x357625[0x0]};}function a126_0x55f8(){const _0xfa2b3e=['10670240LcWjfu','riskLevel','11330ILGoLq','length','entries','Config\x20key\x20(','inherit','Auth\x20cookie','9539397bUPZRY','accessKey','6NrEUZg','Locale','5188010NpmITI','cookie','21RJayXj','Target\x20environment','en-US','has','format','zh-CN','Risk\x20level','map','269912gZlwBM','trim','appcode','defaultApp','app','number','env','keys','locale','join','defaultFormat','Default\x20output\x20format\x20for\x20this\x20app\x20(profile)','950811TLGaRc','string','Access\x20key','pageSize','15VSHyKY','apps','apiDir','Default\x20page\x20size','2750776OnePxr'];a126_0x55f8=function(){return _0xfa2b3e;};return a126_0x55f8();}export function buildCanonicalProjectConfig(_0x5540ca,_0x4b6f64){const _0xd4786d=a126_0x1ce9e2,{appCodes:appCodes=[],env:_0x976ac0,metadata:_0x4fa76d}=_0x4b6f64,_0x5beee5={..._0x5540ca,..._0x4fa76d||{}};delete _0x5beee5[_0xd4786d(0x163)],delete _0x5beee5['app'];if(_0x976ac0)_0x5beee5['env']=_0x976ac0;else!_0x5beee5['env']&&(_0x5beee5['env']=DEFAULT_CONFIG_VALUES[_0xd4786d(0x167)]);const _0x59b5e8=buildCanonicalAppConfig(appCodes,_0x5beee5['env']);return Object[_0xd4786d(0x168)](_0x59b5e8)['length']>0x0&&(_0x5beee5[_0xd4786d(0x147)]=_0x59b5e8[_0xd4786d(0x147)],_0x5beee5['defaultApp']=_0x59b5e8[_0xd4786d(0x164)]),_0x5beee5;}const LOCALE_MAP={'zh':'zh-CN','zh-cn':a126_0x1ce9e2(0x15e),'zh_cn':'zh-CN','en':a126_0x1ce9e2(0x15b),'en-us':a126_0x1ce9e2(0x15b),'en_us':a126_0x1ce9e2(0x15b)};export function normalizeLocale(_0x56ba16){if(!_0x56ba16)return null;return LOCALE_MAP[_0x56ba16['toLowerCase']()]??null;}
1
+ const a126_0x372b14=a126_0x3645;(function(_0x56af4b,_0x14d41f){const _0x43a8f7=a126_0x3645,_0x2dca97=_0x56af4b();while(!![]){try{const _0x528ed8=-parseInt(_0x43a8f7(0x1bf))/0x1*(parseInt(_0x43a8f7(0x1c7))/0x2)+-parseInt(_0x43a8f7(0x1bd))/0x3+-parseInt(_0x43a8f7(0x1ae))/0x4*(parseInt(_0x43a8f7(0x1af))/0x5)+-parseInt(_0x43a8f7(0x1c0))/0x6+-parseInt(_0x43a8f7(0x1c2))/0x7*(-parseInt(_0x43a8f7(0x1a5))/0x8)+-parseInt(_0x43a8f7(0x1a1))/0x9*(parseInt(_0x43a8f7(0x1a2))/0xa)+parseInt(_0x43a8f7(0x1b5))/0xb*(parseInt(_0x43a8f7(0x1a0))/0xc);if(_0x528ed8===_0x14d41f)break;else _0x2dca97['push'](_0x2dca97['shift']());}catch(_0x1da71a){_0x2dca97['push'](_0x2dca97['shift']());}}}(a126_0x4b83,0x92641));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RABETBASE_ENV_VALUES}from'../constant/env.js';import{RABETBASE_OUTPUT_FORMAT_VALUES}from'../constant/output.js';import{RISK_LEVEL_VALUES}from'../constant/risk.js';export{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';export const PROJECT_CREATE_INHERITABLE_KEYS=['cookie',a126_0x372b14(0x1a9),a126_0x372b14(0x1c8),'format','riskLevel'];export const TOP_LEVEL_CONFIG_KEYS=new Set([a126_0x372b14(0x1c9),a126_0x372b14(0x1a4),'locale','format','cookie','accessKey','apiDir']);export const CONFIG_ENUM_VALUES={'env':[...RABETBASE_ENV_VALUES],'format':[...RABETBASE_OUTPUT_FORMAT_VALUES]};export function formatConfigKeyList(_0x55fa04){const _0x5181ca=a126_0x372b14;return[..._0x55fa04][_0x5181ca(0x1a6)](',\x20');}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function isTopLevelConfigKey(_0x1b8fb2){const _0x489a79=a126_0x372b14;return TOP_LEVEL_CONFIG_KEYS[_0x489a79(0x1b6)](_0x1b8fb2);}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){return'Config\x20key\x20('+getTopLevelConfigKeySummary()+')';}export const APP_PROFILE_FLAG_KEY_MAP={'env':a126_0x372b14(0x1a4),'apiDir':'apiDir','cookie':a126_0x372b14(0x1c6),'accessKey':a126_0x372b14(0x1a9),'defaultFormat':a126_0x372b14(0x1b4),'pageSize':'pageSize','riskLevel':a126_0x372b14(0x1a8),'locale':a126_0x372b14(0x1c8)};export function getAppProfileFlagDefs(){const _0x16d101=a126_0x372b14;return[{'name':_0x16d101(0x1a4),'type':_0x16d101(0x1b3),'description':_0x16d101(0x1ab),'enum':[...RABETBASE_ENV_VALUES]},{'name':_0x16d101(0x1ad),'type':_0x16d101(0x1b3),'description':_0x16d101(0x1c4)},{'name':_0x16d101(0x1c6),'type':_0x16d101(0x1b3),'description':'Auth\x20cookie','hidden':!![]},{'name':_0x16d101(0x1a9),'type':_0x16d101(0x1b3),'description':_0x16d101(0x1bc),'hidden':!![]},{'name':_0x16d101(0x1bb),'type':_0x16d101(0x1b3),'description':_0x16d101(0x1c3),'enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':'pageSize','type':_0x16d101(0x1aa),'description':_0x16d101(0x1b8)},{'name':_0x16d101(0x1a8),'type':_0x16d101(0x1b3),'description':'Risk\x20level','enum':[...RISK_LEVEL_VALUES]},{'name':_0x16d101(0x1c8),'type':_0x16d101(0x1b3),'description':_0x16d101(0x1be)}];}export function collectAppProfileOverrides(_0x2f99a2){const _0x109aa2={};for(const [_0x146b8a,_0x401d6d]of Object['entries'](APP_PROFILE_FLAG_KEY_MAP)){const _0x17905d=_0x2f99a2(_0x146b8a);if(!_0x17905d)continue;_0x109aa2[_0x401d6d]=_0x401d6d==='pageSize'?Number(_0x17905d):_0x17905d;}return _0x109aa2;}export function buildAppProfileListFields(_0x360c41){const _0x2d7705=a126_0x372b14;return{'env':_0x360c41['env']??null,'apiDir':_0x360c41[_0x2d7705(0x1ad)]??null,'hasCookie':!!_0x360c41['cookie'],'hasAccessKey':!!_0x360c41['accessKey'],'format':_0x360c41[_0x2d7705(0x1b4)]??null,'pageSize':_0x360c41[_0x2d7705(0x1b7)]??null,'riskLevel':_0x360c41[_0x2d7705(0x1a8)]??null,'locale':_0x360c41[_0x2d7705(0x1c8)]??null};}export function buildAppDoctorFields(_0xc856a9,_0x541faf){const _0x1e1691=a126_0x372b14;return{'env':{'value':_0xc856a9[_0x1e1691(0x1a4)]||_0x541faf[_0x1e1691(0x1a4)],'source':_0xc856a9[_0x1e1691(0x1a4)]?_0x1e1691(0x1b9):_0x1e1691(0x1c1)},'apiDir':{'value':_0xc856a9[_0x1e1691(0x1ad)]||_0x541faf[_0x1e1691(0x1ad)],'source':_0xc856a9['apiDir']?_0x1e1691(0x1b9):_0x1e1691(0x1c1)},'cookie':{'value':_0xc856a9[_0x1e1691(0x1c6)]||_0x541faf[_0x1e1691(0x1c6)],'source':_0xc856a9[_0x1e1691(0x1c6)]?_0x1e1691(0x1b9):_0x1e1691(0x1c1)},'accessKey':{'value':_0xc856a9[_0x1e1691(0x1a9)]||_0x541faf[_0x1e1691(0x1a9)],'source':_0xc856a9[_0x1e1691(0x1a9)]?_0x1e1691(0x1b9):'inherit'}};}function a126_0x3645(_0x317f2e,_0x5c7645){_0x317f2e=_0x317f2e-0x1a0;const _0x4b835b=a126_0x4b83();let _0x36456b=_0x4b835b[_0x317f2e];return _0x36456b;}export function buildCanonicalAppConfig(_0x31186f,_0x5b7b9d){const _0x2ba4b3=a126_0x372b14,_0x1c55d5=_0x31186f[_0x2ba4b3(0x1ac)](_0x364821=>String(_0x364821||'')['trim']())[_0x2ba4b3(0x1b2)](Boolean);if(_0x1c55d5[_0x2ba4b3(0x1a7)]===0x0)return{};const _0x1d36e7={};for(const _0x58d67f of _0x1c55d5){_0x1d36e7[_0x58d67f]=_0x5b7b9d?{'appcode':_0x58d67f,'env':_0x5b7b9d}:{'appcode':_0x58d67f};}return{'apps':_0x1d36e7,'defaultApp':_0x1c55d5[0x0]};}export function buildCanonicalProjectConfig(_0xb10538,_0x250d8c){const _0x1a8269=a126_0x372b14,{appCodes:appCodes=[],env:_0x127d5a,metadata:_0x154734}=_0x250d8c,_0x48b114={..._0xb10538,..._0x154734||{}};delete _0x48b114[_0x1a8269(0x1c9)],delete _0x48b114[_0x1a8269(0x1b9)];if(_0x127d5a)_0x48b114['env']=_0x127d5a;else!_0x48b114[_0x1a8269(0x1a4)]&&(_0x48b114[_0x1a8269(0x1a4)]=DEFAULT_CONFIG_VALUES[_0x1a8269(0x1a4)]);const _0x4977e1=buildCanonicalAppConfig(appCodes,_0x48b114[_0x1a8269(0x1a4)]);return Object[_0x1a8269(0x1c5)](_0x4977e1)['length']>0x0&&(_0x48b114[_0x1a8269(0x1b0)]=_0x4977e1[_0x1a8269(0x1b0)],_0x48b114[_0x1a8269(0x1ba)]=_0x4977e1['defaultApp']),_0x48b114;}const LOCALE_MAP={'zh':a126_0x372b14(0x1b1),'zh-cn':a126_0x372b14(0x1b1),'zh_cn':a126_0x372b14(0x1b1),'en':a126_0x372b14(0x1a3),'en-us':'en-US','en_us':a126_0x372b14(0x1a3)};export function normalizeLocale(_0x20e252){if(!_0x20e252)return null;return LOCALE_MAP[_0x20e252['toLowerCase']()]??null;}function a126_0x4b83(){const _0x5c8131=['228tybhap','37728oBtTRb','600RYoqKr','en-US','env','120twFweH','join','length','riskLevel','accessKey','number','Target\x20environment','map','apiDir','1705492rykRCr','5nMsXAl','apps','zh-CN','filter','string','format','1222870KVIuvB','has','pageSize','Default\x20page\x20size','app','defaultApp','defaultFormat','Access\x20key','2358132wlXSdX','Locale','263dDnTvX','4653792vumrID','inherit','400981UPGiCT','Default\x20output\x20format\x20for\x20this\x20app\x20(profile)','API\x20directory\x20path','keys','cookie','1006AlyRjP','locale','appcode'];a126_0x4b83=function(){return _0x5c8131;};return a126_0x4b83();}
@@ -1 +1 @@
1
- function a127_0x21ba(){const _0x154b8d=['1918650rrNcrY','2302400XCOzvM','102LpWQqs','9htQUQr','2152808TtswpX','137431SPnUra','13738797uMKpey','360072WveDcb','649826TYxQAa'];a127_0x21ba=function(){return _0x154b8d;};return a127_0x21ba();}(function(_0x4622f3,_0x5911d2){const _0x278f97=a127_0x304b,_0x435b20=_0x4622f3();while(!![]){try{const _0x17496d=-parseInt(_0x278f97(0xa8))/0x1+parseInt(_0x278f97(0xa9))/0x2*(-parseInt(_0x278f97(0xad))/0x3)+parseInt(_0x278f97(0xab))/0x4+parseInt(_0x278f97(0xaa))/0x5+parseInt(_0x278f97(0xac))/0x6*(-parseInt(_0x278f97(0xa6))/0x7)+-parseInt(_0x278f97(0xae))/0x8+parseInt(_0x278f97(0xa7))/0x9;if(_0x17496d===_0x5911d2)break;else _0x435b20['push'](_0x435b20['shift']());}catch(_0x4c7c47){_0x435b20['push'](_0x435b20['shift']());}}}(a127_0x21ba,0x85d5e));function a127_0x304b(_0x4518a8,_0xa9dc90){_0x4518a8=_0x4518a8-0xa6;const _0x21baa5=a127_0x21ba();let _0x304bb1=_0x21baa5[_0x4518a8];return _0x304bb1;}export const CLI_VERSION_POLICY_URL='https://g.lovrabet.com/dist/rabetbase-cli/config/index.json';
1
+ function a127_0x59d7(_0x368f5b,_0x4a6578){_0x368f5b=_0x368f5b-0x6b;const _0x3be024=a127_0x3be0();let _0x59d770=_0x3be024[_0x368f5b];return _0x59d770;}function a127_0x3be0(){const _0xe0c612=['7tTVRaP','12CgGqhu','284PwqAJF','4814TGEnQx','640330XbUPte','18PFEsdO','1232328khnUdN','718434JDYlKk','27435vCWXOM','7558925kowwzK','1667220HuQSFK','156dSxoso'];a127_0x3be0=function(){return _0xe0c612;};return a127_0x3be0();}(function(_0x5ea79c,_0x166d75){const _0xee9f0d=a127_0x59d7,_0x15a138=_0x5ea79c();while(!![]){try{const _0x96fc7b=parseInt(_0xee9f0d(0x72))/0x1*(-parseInt(_0xee9f0d(0x6e))/0x2)+-parseInt(_0xee9f0d(0x76))/0x3+-parseInt(_0xee9f0d(0x71))/0x4*(-parseInt(_0xee9f0d(0x6b))/0x5)+-parseInt(_0xee9f0d(0x6d))/0x6+-parseInt(_0xee9f0d(0x6f))/0x7*(-parseInt(_0xee9f0d(0x75))/0x8)+parseInt(_0xee9f0d(0x74))/0x9*(-parseInt(_0xee9f0d(0x73))/0xa)+-parseInt(_0xee9f0d(0x6c))/0xb*(-parseInt(_0xee9f0d(0x70))/0xc);if(_0x96fc7b===_0x166d75)break;else _0x15a138['push'](_0x15a138['shift']());}catch(_0x27c29a){_0x15a138['push'](_0x15a138['shift']());}}}(a127_0x3be0,0x333df));export const CLI_VERSION_POLICY_URL='https://g.lovrabet.com/dist/rabetbase-cli/config/index.json';
@@ -1 +1 @@
1
- const a128_0x714aa9=a128_0x5099;(function(_0x267104,_0x4c1a32){const _0x3c335b=a128_0x5099,_0x1ff8fd=_0x267104();while(!![]){try{const _0x126706=parseInt(_0x3c335b(0x10f))/0x1+parseInt(_0x3c335b(0x12d))/0x2*(parseInt(_0x3c335b(0x134))/0x3)+parseInt(_0x3c335b(0x116))/0x4+parseInt(_0x3c335b(0x150))/0x5+-parseInt(_0x3c335b(0x119))/0x6+parseInt(_0x3c335b(0x12f))/0x7+-parseInt(_0x3c335b(0x13c))/0x8*(parseInt(_0x3c335b(0xfd))/0x9);if(_0x126706===_0x4c1a32)break;else _0x1ff8fd['push'](_0x1ff8fd['shift']());}catch(_0x24fcc4){_0x1ff8fd['push'](_0x1ff8fd['shift']());}}}(a128_0x24eb,0xc5619));function a128_0x5099(_0x46c195,_0x1a11dc){_0x46c195=_0x46c195-0xfb;const _0x24eb57=a128_0x24eb();let _0x5099f5=_0x24eb57[_0x46c195];return _0x5099f5;}export const CLI_BIN_NAME=a128_0x714aa9(0x105);export const CLI_DISPLAY_NAME=a128_0x714aa9(0x161);export const NPM_PACKAGE_NAME=a128_0x714aa9(0x109);export const GLOBAL_FLAGS=[{'name':a128_0x714aa9(0x11c),'meowKey':a128_0x714aa9(0x11c),'type':a128_0x714aa9(0x157),'description':a128_0x714aa9(0x10b),'hint':a128_0x714aa9(0x104)},{'name':a128_0x714aa9(0x117),'meowKey':a128_0x714aa9(0x117),'type':'string','description':a128_0x714aa9(0x14a),'hint':a128_0x714aa9(0x151)},{'name':a128_0x714aa9(0x133),'meowKey':a128_0x714aa9(0x133),'type':'string','description':a128_0x714aa9(0x15f),'hint':'production\x20|\x20daily'},{'name':a128_0x714aa9(0x126),'meowKey':'format','type':a128_0x714aa9(0x157),'description':a128_0x714aa9(0x15b),'hint':a128_0x714aa9(0x110)},{'name':'jq','meowKey':'jq','type':a128_0x714aa9(0x157),'description':'Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','hint':'<expr>'},{'name':a128_0x714aa9(0x146),'meowKey':a128_0x714aa9(0x13d),'type':a128_0x714aa9(0x106),'description':a128_0x714aa9(0x128)},{'name':a128_0x714aa9(0x15d),'meowKey':a128_0x714aa9(0x15d),'type':a128_0x714aa9(0x106),'description':a128_0x714aa9(0x10c)},{'name':a128_0x714aa9(0x149),'meowKey':a128_0x714aa9(0x101),'type':a128_0x714aa9(0x106),'description':'Force\x20non-interactive\x20mode\x20(CI)'},{'name':a128_0x714aa9(0x143),'meowKey':'global','type':'boolean','description':'Use\x20global\x20config\x20scope'},{'name':a128_0x714aa9(0x14d),'meowKey':a128_0x714aa9(0x14d),'type':'boolean','description':a128_0x714aa9(0x121)},{'name':'ci','meowKey':'ci','type':a128_0x714aa9(0x106),'description':'Alias\x20for\x20--non-interactive','hidden':!![]},{'name':a128_0x714aa9(0xfc),'meowKey':a128_0x714aa9(0xfc),'type':a128_0x714aa9(0x106),'description':a128_0x714aa9(0x113)},{'name':a128_0x714aa9(0x159),'meowKey':a128_0x714aa9(0x159),'type':a128_0x714aa9(0x157),'description':'Name','hidden':!![]},{'name':a128_0x714aa9(0x13b),'meowKey':a128_0x714aa9(0x13b),'type':'string','description':'Title','hidden':!![]},{'name':a128_0x714aa9(0x11f),'meowKey':a128_0x714aa9(0x11f),'type':a128_0x714aa9(0x106),'description':a128_0x714aa9(0x102),'hidden':!![]},{'name':a128_0x714aa9(0x147),'meowKey':a128_0x714aa9(0x147),'type':a128_0x714aa9(0x106),'description':a128_0x714aa9(0x154),'hidden':!![]},{'name':a128_0x714aa9(0x139),'meowKey':a128_0x714aa9(0x139),'type':'string','description':a128_0x714aa9(0x123),'hidden':!![]},{'name':a128_0x714aa9(0x145),'meowKey':a128_0x714aa9(0x145),'type':a128_0x714aa9(0x157),'description':'JSON\x20params','hidden':!![]},{'name':a128_0x714aa9(0x11d),'meowKey':a128_0x714aa9(0x11d),'type':a128_0x714aa9(0x157),'description':a128_0x714aa9(0x141),'hidden':!![]},{'name':a128_0x714aa9(0x156),'meowKey':a128_0x714aa9(0x156),'type':'boolean','description':'Apply\x20to\x20all','hidden':!![]},{'name':a128_0x714aa9(0x132),'meowKey':'enableBffSave','type':a128_0x714aa9(0x106),'description':a128_0x714aa9(0x136),'hidden':!![]},{'name':'id','meowKey':'id','type':a128_0x714aa9(0x157),'description':a128_0x714aa9(0x14c),'hidden':!![]},{'name':a128_0x714aa9(0x120),'meowKey':a128_0x714aa9(0x120),'type':a128_0x714aa9(0x157),'description':a128_0x714aa9(0x14e),'hidden':!![]},{'name':a128_0x714aa9(0x122),'meowKey':a128_0x714aa9(0x122),'type':'string','description':a128_0x714aa9(0x135),'hidden':!![]},{'name':a128_0x714aa9(0x12e),'meowKey':a128_0x714aa9(0x12e),'type':a128_0x714aa9(0x157),'description':a128_0x714aa9(0x144),'hidden':!![]},{'name':'sql-name','meowKey':a128_0x714aa9(0x148),'type':a128_0x714aa9(0x157),'description':a128_0x714aa9(0x131),'hidden':!![]},{'name':a128_0x714aa9(0x10d),'meowKey':a128_0x714aa9(0x10d),'type':'string','description':a128_0x714aa9(0x131),'hidden':!![]},{'name':a128_0x714aa9(0x11a),'meowKey':a128_0x714aa9(0x112),'type':a128_0x714aa9(0x157),'description':a128_0x714aa9(0xfe),'hidden':!![]},{'name':a128_0x714aa9(0x115),'meowKey':'dbid','type':a128_0x714aa9(0x157),'description':a128_0x714aa9(0xfe),'hidden':!![]},{'name':a128_0x714aa9(0x15e),'meowKey':a128_0x714aa9(0x15e),'type':a128_0x714aa9(0x157),'description':a128_0x714aa9(0x125),'hidden':!![]},{'name':a128_0x714aa9(0x11e),'meowKey':'descriptionFile','type':a128_0x714aa9(0x157),'description':a128_0x714aa9(0x108),'hidden':!![]},{'name':'page','meowKey':a128_0x714aa9(0x13e),'type':'string','description':a128_0x714aa9(0xff),'hidden':!![]},{'name':a128_0x714aa9(0x15a),'meowKey':'pagesize','type':a128_0x714aa9(0x157),'description':a128_0x714aa9(0x138),'hidden':!![]},{'name':'keyword','meowKey':a128_0x714aa9(0x137),'type':a128_0x714aa9(0x157),'description':a128_0x714aa9(0x127),'hidden':!![]},{'name':a128_0x714aa9(0x158),'meowKey':a128_0x714aa9(0x158),'type':'string','description':'Code\x20filter','hidden':!![]},{'name':a128_0x714aa9(0x13f),'meowKey':'sql','type':a128_0x714aa9(0x157),'description':a128_0x714aa9(0x152),'hidden':!![]},{'name':'schemas','meowKey':a128_0x714aa9(0x130),'type':a128_0x714aa9(0x157),'description':a128_0x714aa9(0x124),'hidden':!![]},{'name':a128_0x714aa9(0x12a),'meowKey':a128_0x714aa9(0x12a),'type':a128_0x714aa9(0x157),'description':a128_0x714aa9(0x155),'hidden':!![]},{'name':a128_0x714aa9(0x14f),'meowKey':a128_0x714aa9(0x14f),'type':a128_0x714aa9(0x157),'description':a128_0x714aa9(0x10e),'hidden':!![]},{'name':'skip-imports','meowKey':a128_0x714aa9(0x100),'type':a128_0x714aa9(0x106),'description':'Skip\x20import\x20generation','hidden':!![]},{'name':a128_0x714aa9(0x13a),'meowKey':'key','type':a128_0x714aa9(0x157),'description':a128_0x714aa9(0x15c),'hidden':!![]},{'name':'value','meowKey':'value','type':a128_0x714aa9(0x157),'description':a128_0x714aa9(0x12b),'hidden':!![]},{'name':'force','meowKey':a128_0x714aa9(0x142),'type':a128_0x714aa9(0x106),'description':'Force\x20overwrite','hidden':!![]},{'name':a128_0x714aa9(0x140),'meowKey':a128_0x714aa9(0x140),'type':a128_0x714aa9(0x106),'description':a128_0x714aa9(0x103),'hidden':!![]},{'name':a128_0x714aa9(0x153),'meowKey':a128_0x714aa9(0x153),'type':a128_0x714aa9(0x106),'description':a128_0x714aa9(0xfb),'hidden':!![]},{'name':'verbose','meowKey':a128_0x714aa9(0x114),'type':a128_0x714aa9(0x106),'description':a128_0x714aa9(0x118),'hidden':!![]},{'name':a128_0x714aa9(0x11b),'meowKey':a128_0x714aa9(0x14b),'type':a128_0x714aa9(0x157),'description':'Expected\x20affected\x20count','hidden':!![]},{'name':a128_0x714aa9(0x107),'meowKey':a128_0x714aa9(0x111),'type':'string','description':a128_0x714aa9(0x155),'hidden':!![]},{'name':a128_0x714aa9(0x10a),'meowKey':'functionNode','type':a128_0x714aa9(0x157),'description':a128_0x714aa9(0x160),'hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set([a128_0x714aa9(0x11c),a128_0x714aa9(0x117),'env',a128_0x714aa9(0x126),'jq','dry-run',a128_0x714aa9(0x15d),a128_0x714aa9(0x149),'ci']);export function buildMeowFlags(){const _0xd0e3a1=a128_0x714aa9;return Object[_0xd0e3a1(0x12c)](GLOBAL_FLAGS['map'](_0x27643c=>[_0x27643c[_0xd0e3a1(0x129)],{'type':_0x27643c['type']}]));}function a128_0x24eb(){const _0x15c6fb=['SQL\x20string','remote','Watch\x20mode','Operation\x20type','all','string','code','name','pagesize','Output\x20format','Config\x20key','yes','description','Environment','Function\x20node','Rabetbase\x20CLI','Use\x20remote','help','13763709orUCUi','DB\x20ID','Page\x20number','skipImports','nonInteractive','Clear','Confirm\x20destructive\x20action','<code>','rabetbase','boolean','operation-type','Description\x20file','@lovrabet/rabetbase-cli','function-node','Override\x20appcode','Skip\x20confirmation\x20for\x20high-risk\x20writes','sqlname','Target\x20path','547853BnUZSV','json\x20|\x20pretty\x20|\x20compress','operationType','dbId','Show\x20help','verbose','dbid','2277156uNTNJP','app','Verbose\x20output','7330326eeelzQ','db-id','expected-count','appcode','datasetcode','description-file','clear','type','Use\x20project\x20config\x20scope','file','Output\x20path','Schemas','Description','format','Keyword\x20filter','Preview\x20operation\x20without\x20executing','meowKey','operation','Config\x20value','fromEntries','30746FlgnCp','sqlcode','1691326tuFhRk','schemas','SQL\x20name','enable-bff-save','env','294WSvUGJ','File\x20path','Enable\x20BFF\x20save','keyword','Page\x20size','output','key','title','8LXapju','dryRun','page','sql','confirm','Dataset\x20code','force','global','SQL\x20code','params','dry-run','watch','sqlName','non-interactive','Select\x20app\x20profile\x20by\x20name','expectedCount','Record\x20ID','project','Type\x20filter','target','3470905zAQgWX','<name>'];a128_0x24eb=function(){return _0x15c6fb;};return a128_0x24eb();}
1
+ const a128_0xa9a544=a128_0x1a2c;(function(_0xe657c7,_0x2ebb64){const _0x3c94cd=a128_0x1a2c,_0x2f0ee9=_0xe657c7();while(!![]){try{const _0x2a189a=parseInt(_0x3c94cd(0x215))/0x1*(-parseInt(_0x3c94cd(0x1ea))/0x2)+parseInt(_0x3c94cd(0x227))/0x3+parseInt(_0x3c94cd(0x203))/0x4*(-parseInt(_0x3c94cd(0x222))/0x5)+parseInt(_0x3c94cd(0x220))/0x6*(-parseInt(_0x3c94cd(0x1d6))/0x7)+parseInt(_0x3c94cd(0x22f))/0x8+-parseInt(_0x3c94cd(0x1d5))/0x9+parseInt(_0x3c94cd(0x1d2))/0xa;if(_0x2a189a===_0x2ebb64)break;else _0x2f0ee9['push'](_0x2f0ee9['shift']());}catch(_0x3b1464){_0x2f0ee9['push'](_0x2f0ee9['shift']());}}}(a128_0x2530,0xa3fba));export const CLI_BIN_NAME=a128_0xa9a544(0x200);function a128_0x2530(){const _0x5d36ca=['Function\x20node','Page\x20size','force','rabetbase','map','page','44YVGKho','Type\x20filter','clear','Override\x20appcode','skipImports','Preview\x20operation\x20without\x20executing','Output\x20format','yes','nonInteractive','Code\x20filter','Record\x20ID','enable-bff-save','code','Skip\x20import\x20generation','dry-run','schemas','Target\x20path','json\x20|\x20pretty\x20|\x20compress','1OFpKzE','keyword','JSON\x20params','project','Use\x20global\x20config\x20scope','Force\x20non-interactive\x20mode\x20(CI)','db-id','sqlName','meowKey','env','app','11442wyQEcf','name','324965JGMGxD','SQL\x20code','Rabetbase\x20CLI','verbose','skip-imports','304608SQxLGM','format','SQL\x20string','Name','sql','expected-count','watch','all','7160904mdzzXi','dbId','type','value','sqlname','description','global','appcode','function-node','27055700KrAvsA','Select\x20app\x20profile\x20by\x20name','pagesize','11682846eItrVq','3689HNRwAW','file','Verbose\x20output','params','Confirm\x20destructive\x20action','Operation\x20type','Config\x20key','<code>','operation-type','File\x20path','Show\x20help','<expr>','sql-name','enableBffSave','key','expectedCount','string','sqlcode','non-interactive','SQL\x20name','25078mAqFGL','boolean','help','remote','Force\x20overwrite','Page\x20number','Use\x20remote','title','DB\x20ID','confirm','output','Title','target','datasetcode','production\x20|\x20daily','dryRun','operation','dbid','Clear'];a128_0x2530=function(){return _0x5d36ca;};return a128_0x2530();}export const CLI_DISPLAY_NAME=a128_0xa9a544(0x224);export const NPM_PACKAGE_NAME='@lovrabet/rabetbase-cli';export const GLOBAL_FLAGS=[{'name':a128_0xa9a544(0x1d0),'meowKey':a128_0xa9a544(0x1d0),'type':a128_0xa9a544(0x1e6),'description':a128_0xa9a544(0x206),'hint':a128_0xa9a544(0x1dd)},{'name':'app','meowKey':a128_0xa9a544(0x21f),'type':a128_0xa9a544(0x1e6),'description':a128_0xa9a544(0x1d3),'hint':'<name>'},{'name':'env','meowKey':a128_0xa9a544(0x21e),'type':a128_0xa9a544(0x1e6),'description':'Environment','hint':a128_0xa9a544(0x1f8)},{'name':a128_0xa9a544(0x228),'meowKey':a128_0xa9a544(0x228),'type':a128_0xa9a544(0x1e6),'description':a128_0xa9a544(0x209),'hint':a128_0xa9a544(0x214)},{'name':'jq','meowKey':'jq','type':'string','description':'Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','hint':a128_0xa9a544(0x1e1)},{'name':a128_0xa9a544(0x211),'meowKey':a128_0xa9a544(0x1f9),'type':a128_0xa9a544(0x1eb),'description':a128_0xa9a544(0x208)},{'name':a128_0xa9a544(0x20a),'meowKey':a128_0xa9a544(0x20a),'type':a128_0xa9a544(0x1eb),'description':'Skip\x20confirmation\x20for\x20high-risk\x20writes'},{'name':a128_0xa9a544(0x1e8),'meowKey':a128_0xa9a544(0x20b),'type':a128_0xa9a544(0x1eb),'description':a128_0xa9a544(0x21a)},{'name':a128_0xa9a544(0x1cf),'meowKey':a128_0xa9a544(0x1cf),'type':'boolean','description':a128_0xa9a544(0x219)},{'name':a128_0xa9a544(0x218),'meowKey':a128_0xa9a544(0x218),'type':a128_0xa9a544(0x1eb),'description':'Use\x20project\x20config\x20scope'},{'name':'ci','meowKey':'ci','type':a128_0xa9a544(0x1eb),'description':'Alias\x20for\x20--non-interactive','hidden':!![]},{'name':'help','meowKey':a128_0xa9a544(0x1ec),'type':a128_0xa9a544(0x1eb),'description':a128_0xa9a544(0x1e0)},{'name':'name','meowKey':a128_0xa9a544(0x221),'type':a128_0xa9a544(0x1e6),'description':a128_0xa9a544(0x22a),'hidden':!![]},{'name':a128_0xa9a544(0x1f1),'meowKey':'title','type':a128_0xa9a544(0x1e6),'description':a128_0xa9a544(0x1f5),'hidden':!![]},{'name':a128_0xa9a544(0x205),'meowKey':a128_0xa9a544(0x205),'type':a128_0xa9a544(0x1eb),'description':a128_0xa9a544(0x1fc),'hidden':!![]},{'name':a128_0xa9a544(0x22d),'meowKey':a128_0xa9a544(0x22d),'type':a128_0xa9a544(0x1eb),'description':'Watch\x20mode','hidden':!![]},{'name':a128_0xa9a544(0x1f4),'meowKey':a128_0xa9a544(0x1f4),'type':a128_0xa9a544(0x1e6),'description':'Output\x20path','hidden':!![]},{'name':'params','meowKey':a128_0xa9a544(0x1d9),'type':a128_0xa9a544(0x1e6),'description':a128_0xa9a544(0x217),'hidden':!![]},{'name':a128_0xa9a544(0x1f7),'meowKey':a128_0xa9a544(0x1f7),'type':a128_0xa9a544(0x1e6),'description':'Dataset\x20code','hidden':!![]},{'name':a128_0xa9a544(0x22e),'meowKey':a128_0xa9a544(0x22e),'type':a128_0xa9a544(0x1eb),'description':'Apply\x20to\x20all','hidden':!![]},{'name':a128_0xa9a544(0x20e),'meowKey':a128_0xa9a544(0x1e3),'type':a128_0xa9a544(0x1eb),'description':'Enable\x20BFF\x20save','hidden':!![]},{'name':'id','meowKey':'id','type':'string','description':a128_0xa9a544(0x20d),'hidden':!![]},{'name':a128_0xa9a544(0x1cb),'meowKey':a128_0xa9a544(0x1cb),'type':'string','description':a128_0xa9a544(0x204),'hidden':!![]},{'name':'file','meowKey':a128_0xa9a544(0x1d7),'type':'string','description':a128_0xa9a544(0x1df),'hidden':!![]},{'name':a128_0xa9a544(0x1e7),'meowKey':'sqlcode','type':a128_0xa9a544(0x1e6),'description':a128_0xa9a544(0x223),'hidden':!![]},{'name':a128_0xa9a544(0x1e2),'meowKey':a128_0xa9a544(0x21c),'type':a128_0xa9a544(0x1e6),'description':a128_0xa9a544(0x1e9),'hidden':!![]},{'name':a128_0xa9a544(0x1cd),'meowKey':'sqlname','type':a128_0xa9a544(0x1e6),'description':'SQL\x20name','hidden':!![]},{'name':a128_0xa9a544(0x21b),'meowKey':a128_0xa9a544(0x230),'type':a128_0xa9a544(0x1e6),'description':a128_0xa9a544(0x1f2),'hidden':!![]},{'name':a128_0xa9a544(0x1fb),'meowKey':'dbid','type':a128_0xa9a544(0x1e6),'description':a128_0xa9a544(0x1f2),'hidden':!![]},{'name':a128_0xa9a544(0x1ce),'meowKey':'description','type':'string','description':'Description','hidden':!![]},{'name':'description-file','meowKey':'descriptionFile','type':a128_0xa9a544(0x1e6),'description':'Description\x20file','hidden':!![]},{'name':a128_0xa9a544(0x202),'meowKey':a128_0xa9a544(0x202),'type':'string','description':a128_0xa9a544(0x1ef),'hidden':!![]},{'name':'pagesize','meowKey':a128_0xa9a544(0x1d4),'type':a128_0xa9a544(0x1e6),'description':a128_0xa9a544(0x1fe),'hidden':!![]},{'name':a128_0xa9a544(0x216),'meowKey':a128_0xa9a544(0x216),'type':'string','description':'Keyword\x20filter','hidden':!![]},{'name':'code','meowKey':a128_0xa9a544(0x20f),'type':a128_0xa9a544(0x1e6),'description':a128_0xa9a544(0x20c),'hidden':!![]},{'name':'sql','meowKey':a128_0xa9a544(0x22b),'type':a128_0xa9a544(0x1e6),'description':a128_0xa9a544(0x229),'hidden':!![]},{'name':a128_0xa9a544(0x212),'meowKey':a128_0xa9a544(0x212),'type':'string','description':'Schemas','hidden':!![]},{'name':a128_0xa9a544(0x1fa),'meowKey':a128_0xa9a544(0x1fa),'type':'string','description':a128_0xa9a544(0x1db),'hidden':!![]},{'name':a128_0xa9a544(0x1f6),'meowKey':a128_0xa9a544(0x1f6),'type':a128_0xa9a544(0x1e6),'description':a128_0xa9a544(0x213),'hidden':!![]},{'name':a128_0xa9a544(0x226),'meowKey':a128_0xa9a544(0x207),'type':a128_0xa9a544(0x1eb),'description':a128_0xa9a544(0x210),'hidden':!![]},{'name':a128_0xa9a544(0x1e4),'meowKey':a128_0xa9a544(0x1e4),'type':a128_0xa9a544(0x1e6),'description':a128_0xa9a544(0x1dc),'hidden':!![]},{'name':a128_0xa9a544(0x1cc),'meowKey':a128_0xa9a544(0x1cc),'type':a128_0xa9a544(0x1e6),'description':'Config\x20value','hidden':!![]},{'name':a128_0xa9a544(0x1ff),'meowKey':a128_0xa9a544(0x1ff),'type':'boolean','description':a128_0xa9a544(0x1ee),'hidden':!![]},{'name':'confirm','meowKey':a128_0xa9a544(0x1f3),'type':a128_0xa9a544(0x1eb),'description':a128_0xa9a544(0x1da),'hidden':!![]},{'name':a128_0xa9a544(0x1ed),'meowKey':a128_0xa9a544(0x1ed),'type':a128_0xa9a544(0x1eb),'description':a128_0xa9a544(0x1f0),'hidden':!![]},{'name':a128_0xa9a544(0x225),'meowKey':a128_0xa9a544(0x225),'type':a128_0xa9a544(0x1eb),'description':a128_0xa9a544(0x1d8),'hidden':!![]},{'name':a128_0xa9a544(0x22c),'meowKey':a128_0xa9a544(0x1e5),'type':a128_0xa9a544(0x1e6),'description':'Expected\x20affected\x20count','hidden':!![]},{'name':a128_0xa9a544(0x1de),'meowKey':'operationType','type':a128_0xa9a544(0x1e6),'description':'Operation\x20type','hidden':!![]},{'name':a128_0xa9a544(0x1d1),'meowKey':'functionNode','type':a128_0xa9a544(0x1e6),'description':a128_0xa9a544(0x1fd),'hidden':!![]}];function a128_0x1a2c(_0xdaddb3,_0x2d58c2){_0xdaddb3=_0xdaddb3-0x1cb;const _0x2530b6=a128_0x2530();let _0x1a2c72=_0x2530b6[_0xdaddb3];return _0x1a2c72;}export const PIPELINE_FLAG_NAMES=new Set([a128_0xa9a544(0x1d0),a128_0xa9a544(0x21f),a128_0xa9a544(0x21e),a128_0xa9a544(0x228),'jq',a128_0xa9a544(0x211),'yes',a128_0xa9a544(0x1e8),'ci']);export function buildMeowFlags(){const _0x58fde6=a128_0xa9a544;return Object['fromEntries'](GLOBAL_FLAGS[_0x58fde6(0x201)](_0x2c9e3e=>[_0x2c9e3e[_0x58fde6(0x21d)],{'type':_0x2c9e3e['type']}]));}
@@ -1 +1 @@
1
- function a129_0x5e4e(_0x4133ef,_0x57a580){_0x4133ef=_0x4133ef-0x137;const _0x10f26f=a129_0x10f2();let _0x5e4e7a=_0x10f26f[_0x4133ef];return _0x5e4e7a;}function a129_0x10f2(){const _0x536d83=['4390900lLkEkW','high-risk-write','1840956ZGnWEi','30suzJOM','10760dzjRVa','5218caMCjG','7zsUDpk','35579112kgLZcR','100592mQjacf','compress','7560MPbhCj','117HMDIFg','2750KRfzHK','4230vFjwYQ','production'];a129_0x10f2=function(){return _0x536d83;};return a129_0x10f2();}const a129_0x1ee61b=a129_0x5e4e;(function(_0x553c49,_0x2d445c){const _0x1a47ca=a129_0x5e4e,_0x5df324=_0x553c49();while(!![]){try{const _0x5b3a15=-parseInt(_0x1a47ca(0x13b))/0x1*(-parseInt(_0x1a47ca(0x144))/0x2)+-parseInt(_0x1a47ca(0x142))/0x3*(parseInt(_0x1a47ca(0x138))/0x4)+-parseInt(_0x1a47ca(0x13f))/0x5+parseInt(_0x1a47ca(0x141))/0x6*(-parseInt(_0x1a47ca(0x145))/0x7)+-parseInt(_0x1a47ca(0x143))/0x8*(parseInt(_0x1a47ca(0x13a))/0x9)+-parseInt(_0x1a47ca(0x13d))/0xa*(parseInt(_0x1a47ca(0x13c))/0xb)+parseInt(_0x1a47ca(0x137))/0xc;if(_0x5b3a15===_0x2d445c)break;else _0x5df324['push'](_0x5df324['shift']());}catch(_0x3de393){_0x5df324['push'](_0x5df324['shift']());}}}(a129_0x10f2,0x9207f));import{DEFAULT_API_DIR}from'../constant/paths.js';export const DEFAULT_CONFIG_VALUES={'env':a129_0x1ee61b(0x13e),'format':a129_0x1ee61b(0x139),'locale':'en-US','riskLevel':a129_0x1ee61b(0x140),'apiDir':DEFAULT_API_DIR};export const DEFAULT_COMMAND_OUTPUT_FORMAT=a129_0x1ee61b(0x139);
1
+ const a129_0x55d12=a129_0xe95f;(function(_0x499686,_0x592d17){const _0x1249e5=a129_0xe95f,_0x3e4eb1=_0x499686();while(!![]){try{const _0x517885=parseInt(_0x1249e5(0x1a7))/0x1+-parseInt(_0x1249e5(0x1ac))/0x2+parseInt(_0x1249e5(0x1aa))/0x3*(parseInt(_0x1249e5(0x1b3))/0x4)+parseInt(_0x1249e5(0x1a6))/0x5+-parseInt(_0x1249e5(0x1b0))/0x6*(-parseInt(_0x1249e5(0x1af))/0x7)+parseInt(_0x1249e5(0x1a5))/0x8*(-parseInt(_0x1249e5(0x1ab))/0x9)+-parseInt(_0x1249e5(0x1b1))/0xa*(-parseInt(_0x1249e5(0x1a8))/0xb);if(_0x517885===_0x592d17)break;else _0x3e4eb1['push'](_0x3e4eb1['shift']());}catch(_0x3493cf){_0x3e4eb1['push'](_0x3e4eb1['shift']());}}}(a129_0x284a,0x6137b));import{DEFAULT_API_DIR}from'../constant/paths.js';export const DEFAULT_CONFIG_VALUES={'env':a129_0x55d12(0x1a9),'format':a129_0x55d12(0x1ad),'locale':a129_0x55d12(0x1b2),'riskLevel':a129_0x55d12(0x1ae),'apiDir':DEFAULT_API_DIR};function a129_0x284a(){const _0x3a0e63=['3663usImHL','1404498EnIckr','compress','high-risk-write','7WrUEnW','3706338txMouU','250oCoUze','en-US','697108efFquF','15256JUPupE','1691245PNYfKA','648677fzMqvP','42977OGDxiQ','production','3qSXrDh'];a129_0x284a=function(){return _0x3a0e63;};return a129_0x284a();}function a129_0xe95f(_0x54c1b8,_0x2edc58){_0x54c1b8=_0x54c1b8-0x1a5;const _0x284a5c=a129_0x284a();let _0xe95f19=_0x284a5c[_0x54c1b8];return _0xe95f19;}export const DEFAULT_COMMAND_OUTPUT_FORMAT='compress';
@@ -1 +1 @@
1
- const a130_0x26ab2b=a130_0xbaca;function a130_0xbaca(_0x4a27cb,_0x1a17c0){_0x4a27cb=_0x4a27cb-0xc0;const _0x203f0e=a130_0x203f();let _0xbacaea=_0x203f0e[_0x4a27cb];return _0xbacaea;}(function(_0x4f57e2,_0x4db4fe){const _0x13aa58=a130_0xbaca,_0x57ea94=_0x4f57e2();while(!![]){try{const _0x44e0de=-parseInt(_0x13aa58(0xce))/0x1+parseInt(_0x13aa58(0xc8))/0x2*(-parseInt(_0x13aa58(0xc7))/0x3)+parseInt(_0x13aa58(0xd0))/0x4*(-parseInt(_0x13aa58(0xc0))/0x5)+parseInt(_0x13aa58(0xc5))/0x6+-parseInt(_0x13aa58(0xc4))/0x7*(-parseInt(_0x13aa58(0xcf))/0x8)+parseInt(_0x13aa58(0xcc))/0x9*(-parseInt(_0x13aa58(0xc9))/0xa)+parseInt(_0x13aa58(0xc3))/0xb;if(_0x44e0de===_0x4db4fe)break;else _0x57ea94['push'](_0x57ea94['shift']());}catch(_0x410a7c){_0x57ea94['push'](_0x57ea94['shift']());}}}(a130_0x203f,0xc2102));import{getEnv,isProduction}from'../constant/env.js';let customApiDomain,customUserDomain,customRuntimeDomain;export function initDomains(_0x25d408){const _0x39de31=a130_0xbaca;customApiDomain=_0x25d408?.[_0x39de31(0xc1)],customUserDomain=_0x25d408?.[_0x39de31(0xc6)],customRuntimeDomain=_0x25d408?.[_0x39de31(0xc2)];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?'https://user.lovrabet.com':'https://user-daily.lovrabet.com');export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?'https://api.lovrabet.com':a130_0x26ab2b(0xcd));export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?a130_0x26ab2b(0xca):a130_0x26ab2b(0xcb));function a130_0x203f(){const _0x4ced6b=['userDomain','4011GVBAaX','652cAOVzI','5742210jeBuXA','https://runtime.lovrabet.com','https://daily-runtime.lovrabet.com','9GmOgLV','https://daily-api.lovrabet.com','1335399lSozRZ','8KFAqTy','202064sTZSUJ','70DGNKAg','apiDomain','runtimeDomain','10415592xQcaoh','10023216SEvVxv','8812968qvJNXz'];a130_0x203f=function(){return _0x4ced6b;};return a130_0x203f();}
1
+ function a130_0x1aeb(_0x48a759,_0x27639c){_0x48a759=_0x48a759-0xf7;const _0x59b82f=a130_0x59b8();let _0x1aeb13=_0x59b82f[_0x48a759];return _0x1aeb13;}const a130_0x3e50d4=a130_0x1aeb;(function(_0x65be3d,_0x163cbc){const _0x38f9e0=a130_0x1aeb,_0xa4bbaf=_0x65be3d();while(!![]){try{const _0x50ac6d=-parseInt(_0x38f9e0(0xf8))/0x1+parseInt(_0x38f9e0(0xf9))/0x2+-parseInt(_0x38f9e0(0x106))/0x3*(parseInt(_0x38f9e0(0xfe))/0x4)+-parseInt(_0x38f9e0(0x107))/0x5*(-parseInt(_0x38f9e0(0xfa))/0x6)+parseInt(_0x38f9e0(0xff))/0x7*(-parseInt(_0x38f9e0(0x109))/0x8)+-parseInt(_0x38f9e0(0xf7))/0x9*(-parseInt(_0x38f9e0(0x101))/0xa)+-parseInt(_0x38f9e0(0x105))/0xb*(-parseInt(_0x38f9e0(0xfb))/0xc);if(_0x50ac6d===_0x163cbc)break;else _0xa4bbaf['push'](_0xa4bbaf['shift']());}catch(_0x413193){_0xa4bbaf['push'](_0xa4bbaf['shift']());}}}(a130_0x59b8,0xcd9ee));import{getEnv,isProduction}from'../constant/env.js';function a130_0x59b8(){const _0x177977=['23620uENnsc','https://user-daily.lovrabet.com','8xEyflP','9MVxkqf','1001090uCBHUS','242362bbWYyL','78pdyNbT','15184140KiFArI','runtimeDomain','apiDomain','4iSNXtw','8685999qJcBeL','https://daily-runtime.lovrabet.com','473630BkGZtP','https://daily-api.lovrabet.com','https://runtime.lovrabet.com','https://user.lovrabet.com','33eFHcYg','2825466gcLnrL'];a130_0x59b8=function(){return _0x177977;};return a130_0x59b8();}let customApiDomain,customUserDomain,customRuntimeDomain;export function initDomains(_0xbbfab9){const _0xeb1b45=a130_0x1aeb;customApiDomain=_0xbbfab9?.[_0xeb1b45(0xfd)],customUserDomain=_0xbbfab9?.['userDomain'],customRuntimeDomain=_0xbbfab9?.[_0xeb1b45(0xfc)];}export const getUserDomain=()=>customUserDomain||(isProduction(getEnv())?a130_0x3e50d4(0x104):a130_0x3e50d4(0x108));export const getApiDomain=()=>customApiDomain||(isProduction(getEnv())?'https://api.lovrabet.com':a130_0x3e50d4(0x102));export const getRuntimeDomain=()=>customRuntimeDomain||(isProduction(getEnv())?a130_0x3e50d4(0x103):a130_0x3e50d4(0x100));
@@ -1 +1 @@
1
- const a131_0x5937ce=a131_0x5b80;(function(_0x3b422c,_0x1676f5){const _0x175685=a131_0x5b80,_0x3a85a1=_0x3b422c();while(!![]){try{const _0xf4fa2c=-parseInt(_0x175685(0xde))/0x1+-parseInt(_0x175685(0xe3))/0x2*(-parseInt(_0x175685(0xd9))/0x3)+-parseInt(_0x175685(0xd8))/0x4*(parseInt(_0x175685(0xda))/0x5)+-parseInt(_0x175685(0xdf))/0x6+parseInt(_0x175685(0xdb))/0x7+parseInt(_0x175685(0xe1))/0x8*(parseInt(_0x175685(0xdc))/0x9)+parseInt(_0x175685(0xe0))/0xa;if(_0xf4fa2c===_0x1676f5)break;else _0x3a85a1['push'](_0x3a85a1['shift']());}catch(_0x3043ac){_0x3a85a1['push'](_0x3a85a1['shift']());}}}(a131_0x13bb,0x62bb4));export const RABETBASE_ENV_VALUES=['production',a131_0x5937ce(0xe5)];export function normalizeEnv(_0x1ffc4e){const _0x16bb38=a131_0x5937ce;return _0x1ffc4e===_0x16bb38(0xdd)?_0x16bb38(0xe4):_0x1ffc4e;}export function isProduction(_0x51dce2){const _0x5650a2=a131_0x5937ce;return normalizeEnv(_0x51dce2)===_0x5650a2(0xe4);}function a131_0x5b80(_0xb18d4b,_0xb3127d){_0xb18d4b=_0xb18d4b-0xd7;const _0x13bb3b=a131_0x13bb();let _0x5b80b7=_0x13bb3b[_0xb18d4b];return _0x5b80b7;}function a131_0x13bb(){const _0x527223=['15NhbuGM','5665xabFve','5651037qmESpI','5067qkPplh','online','442121GnTpIh','1493844sphRCE','2454350hVyyWf','2216oyMHul','development','118334VCYpWK','production','daily','dev','1444mvsGhi'];a131_0x13bb=function(){return _0x527223;};return a131_0x13bb();}export function isDaily(_0x2cfb90){return normalizeEnv(_0x2cfb90)==='daily';}export function isDev(_0x412913){const _0x5c5bb0=a131_0x5937ce,_0x4a0618=normalizeEnv(_0x412913);return _0x4a0618===_0x5c5bb0(0xe2)||_0x4a0618===_0x5c5bb0(0xd7);}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||'production');export function getEnv(){return env;}export function initEnv(_0x5ce986){env=normalizeEnv(_0x5ce986);}
1
+ const a131_0x4ff3ee=a131_0x46ed;(function(_0x312544,_0x224318){const _0x560617=a131_0x46ed,_0x2dc7d3=_0x312544();while(!![]){try{const _0x2f6180=-parseInt(_0x560617(0xb7))/0x1*(-parseInt(_0x560617(0xb4))/0x2)+parseInt(_0x560617(0xb6))/0x3+-parseInt(_0x560617(0xb8))/0x4+-parseInt(_0x560617(0xb5))/0x5+-parseInt(_0x560617(0xbb))/0x6+parseInt(_0x560617(0xbd))/0x7*(parseInt(_0x560617(0xb9))/0x8)+parseInt(_0x560617(0xba))/0x9;if(_0x2f6180===_0x224318)break;else _0x2dc7d3['push'](_0x2dc7d3['shift']());}catch(_0x1e0c91){_0x2dc7d3['push'](_0x2dc7d3['shift']());}}}(a131_0x1711,0xcf76d));export const RABETBASE_ENV_VALUES=[a131_0x4ff3ee(0xbe),a131_0x4ff3ee(0xbf)];export function normalizeEnv(_0x9c5c5c){const _0xc490=a131_0x4ff3ee;return _0x9c5c5c===_0xc490(0xb3)?_0xc490(0xbe):_0x9c5c5c;}export function isProduction(_0x1cda3d){const _0x1e7e51=a131_0x4ff3ee;return normalizeEnv(_0x1cda3d)===_0x1e7e51(0xbe);}export function isDaily(_0x1bf1b9){const _0x53aa74=a131_0x4ff3ee;return normalizeEnv(_0x1bf1b9)===_0x53aa74(0xbf);}function a131_0x1711(){const _0x2bc1e0=['21060918uflDWZ','3333906zjHskZ','development','7DPxLhn','production','daily','online','60dLuVoI','7802800FTYWwc','223095iceisl','28799Icgljz','1502888VYVMCM','506152GyYhez'];a131_0x1711=function(){return _0x2bc1e0;};return a131_0x1711();}export function isDev(_0x15b340){const _0x105b30=a131_0x4ff3ee,_0x5dfda7=normalizeEnv(_0x15b340);return _0x5dfda7===_0x105b30(0xbc)||_0x5dfda7==='dev';}let env=normalizeEnv(process.env.RABETBASE_ENV||process.env.LOVRABET_ENV||a131_0x4ff3ee(0xbe));function a131_0x46ed(_0x4da2c2,_0x46bd62){_0x4da2c2=_0x4da2c2-0xb3;const _0x171152=a131_0x1711();let _0x46ed48=_0x171152[_0x4da2c2];return _0x46ed48;}export function getEnv(){return env;}export function initEnv(_0x3dc522){env=normalizeEnv(_0x3dc522);}
@@ -1 +1 @@
1
- const a132_0x2816ec=a132_0x133d;(function(_0x3f51fe,_0x4c88b0){const _0x3f5021=a132_0x133d,_0x469463=_0x3f51fe();while(!![]){try{const _0x3ceff2=-parseInt(_0x3f5021(0x111))/0x1+-parseInt(_0x3f5021(0x10c))/0x2+parseInt(_0x3f5021(0x10e))/0x3*(-parseInt(_0x3f5021(0x10f))/0x4)+-parseInt(_0x3f5021(0x115))/0x5*(-parseInt(_0x3f5021(0x10d))/0x6)+parseInt(_0x3f5021(0x114))/0x7+parseInt(_0x3f5021(0x116))/0x8*(parseInt(_0x3f5021(0x113))/0x9)+parseInt(_0x3f5021(0x117))/0xa;if(_0x3ceff2===_0x4c88b0)break;else _0x469463['push'](_0x469463['shift']());}catch(_0x212c73){_0x469463['push'](_0x469463['shift']());}}}(a132_0x750b,0x471ea));export const RABETBASE_OUTPUT_FORMAT_VALUES=[a132_0x2816ec(0x110),a132_0x2816ec(0x112),'compress'];function a132_0x133d(_0xd92ea2,_0x5b4a7a){_0xd92ea2=_0xd92ea2-0x10c;const _0x750b1c=a132_0x750b();let _0x133dfb=_0x750b1c[_0xd92ea2];return _0x133dfb;}function a132_0x750b(){const _0x559f8c=['297RFghBq','923825nVXKkH','10OKCZSo','101488QTwstM','2536450IbXhID','879992bKqHIc','1226766JkRQyq','207618ibqoYQ','8MiOcKv','json','343466igiIhY','pretty'];a132_0x750b=function(){return _0x559f8c;};return a132_0x750b();}
1
+ const a132_0x3c90dc=a132_0x1f4f;function a132_0x1f4f(_0x3fae1b,_0xedd0ed){_0x3fae1b=_0x3fae1b-0x1ad;const _0xc58492=a132_0xc584();let _0x1f4f9b=_0xc58492[_0x3fae1b];return _0x1f4f9b;}(function(_0x4f7353,_0x53e1b7){const _0x4612b0=a132_0x1f4f,_0x58b046=_0x4f7353();while(!![]){try{const _0x38eaa1=parseInt(_0x4612b0(0x1b4))/0x1+-parseInt(_0x4612b0(0x1af))/0x2*(parseInt(_0x4612b0(0x1ad))/0x3)+parseInt(_0x4612b0(0x1b7))/0x4+parseInt(_0x4612b0(0x1b9))/0x5*(-parseInt(_0x4612b0(0x1b3))/0x6)+-parseInt(_0x4612b0(0x1b8))/0x7*(-parseInt(_0x4612b0(0x1ae))/0x8)+parseInt(_0x4612b0(0x1b0))/0x9+-parseInt(_0x4612b0(0x1b5))/0xa*(parseInt(_0x4612b0(0x1b6))/0xb);if(_0x38eaa1===_0x53e1b7)break;else _0x58b046['push'](_0x58b046['shift']());}catch(_0x2b6a22){_0x58b046['push'](_0x58b046['shift']());}}}(a132_0xc584,0x50fa5));export const RABETBASE_OUTPUT_FORMAT_VALUES=['json',a132_0x3c90dc(0x1b2),a132_0x3c90dc(0x1b1)];function a132_0xc584(){const _0x3544d2=['5774uEJbXc','5211468nxawAa','compress','pretty','6OueDpQ','457150qhKOqw','237620Ymychx','451dfmVXK','1806180uTJvuL','1022XHnhYH','3214985EXfgKU','63kftcsI','28592VKmPVV'];a132_0xc584=function(){return _0x3544d2;};return a132_0xc584();}
@@ -1 +1 @@
1
- function a133_0xb508(){const _0x3b1eb8=['45EYjsdF','19bUIkXQ','11RzDovT','108314JsPfXz','1602476AHlAul','4823jvezgO','8264RLqlKp','28038876uaKAPH','491330FhooWf','5415440hPeLqP','1401432uNtjlY','./src/api','6JODtSb'];a133_0xb508=function(){return _0x3b1eb8;};return a133_0xb508();}const a133_0x26c756=a133_0x1a7b;(function(_0x1a07c7,_0x233c5b){const _0x21bf86=a133_0x1a7b,_0x265ecb=_0x1a07c7();while(!![]){try{const _0x140cc1=-parseInt(_0x21bf86(0x1fb))/0x1*(-parseInt(_0x21bf86(0x1fd))/0x2)+parseInt(_0x21bf86(0x1f9))/0x3*(parseInt(_0x21bf86(0x1fe))/0x4)+parseInt(_0x21bf86(0x1f6))/0x5+-parseInt(_0x21bf86(0x1f7))/0x6+parseInt(_0x21bf86(0x1f2))/0x7*(parseInt(_0x21bf86(0x1f3))/0x8)+-parseInt(_0x21bf86(0x1fa))/0x9*(parseInt(_0x21bf86(0x1f5))/0xa)+-parseInt(_0x21bf86(0x1fc))/0xb*(parseInt(_0x21bf86(0x1f4))/0xc);if(_0x140cc1===_0x233c5b)break;else _0x265ecb['push'](_0x265ecb['shift']());}catch(_0x40fb54){_0x265ecb['push'](_0x265ecb['shift']());}}}(a133_0xb508,0xc5914));function a133_0x1a7b(_0x77bda6,_0xb90b26){_0x77bda6=_0x77bda6-0x1f2;const _0xb5085e=a133_0xb508();let _0x1a7b89=_0xb5085e[_0x77bda6];return _0x1a7b89;}export const DEFAULT_API_DIR=a133_0x26c756(0x1f8);
1
+ function a133_0x1408(){const _0x56a0c2=['894958eWLnNA','10YPtnAy','33629652VLwiiT','332200pMCsJM','2573488KvNIFW','./src/api','2zKQlsA','3431442USQjja','8642334MEVfGq','16XHXNcN','2112687MFhlas'];a133_0x1408=function(){return _0x56a0c2;};return a133_0x1408();}const a133_0x2942c8=a133_0x5e6d;(function(_0x3de435,_0x30826e){const _0x527e6b=a133_0x5e6d,_0x28ea21=_0x3de435();while(!![]){try{const _0x1d36e2=parseInt(_0x527e6b(0x94))/0x1*(parseInt(_0x527e6b(0x99))/0x2)+parseInt(_0x527e6b(0x98))/0x3+parseInt(_0x527e6b(0x9d))/0x4+-parseInt(_0x527e6b(0x9c))/0x5+parseInt(_0x527e6b(0x96))/0x6+parseInt(_0x527e6b(0x95))/0x7*(parseInt(_0x527e6b(0x97))/0x8)+parseInt(_0x527e6b(0x9b))/0x9*(-parseInt(_0x527e6b(0x9a))/0xa);if(_0x1d36e2===_0x30826e)break;else _0x28ea21['push'](_0x28ea21['shift']());}catch(_0x49c827){_0x28ea21['push'](_0x28ea21['shift']());}}}(a133_0x1408,0xd2084));function a133_0x5e6d(_0x1dc6be,_0x54fd92){_0x1dc6be=_0x1dc6be-0x93;const _0x14085a=a133_0x1408();let _0x5e6da5=_0x14085a[_0x1dc6be];return _0x5e6da5;}export const DEFAULT_API_DIR=a133_0x2942c8(0x93);
@@ -1 +1 @@
1
- function a134_0x2967(){const _0x2a34e0=['63UevCtP','1037040kVNbTl','407012iYcUNz','30UhZDCt','88120lfjINz','131327shDrqf','3051508BseaaA','470UzcbfW','2356239mkjfZi','write','280357kbuKuE','5lcxZNI','read'];a134_0x2967=function(){return _0x2a34e0;};return a134_0x2967();}const a134_0x46c246=a134_0x3ff3;function a134_0x3ff3(_0x490a77,_0x5419e1){_0x490a77=_0x490a77-0xde;const _0x2967af=a134_0x2967();let _0x3ff396=_0x2967af[_0x490a77];return _0x3ff396;}(function(_0x4f5d56,_0x106499){const _0x3f57d6=a134_0x3ff3,_0x3a6a0b=_0x4f5d56();while(!![]){try{const _0x2ea47b=parseInt(_0x3f57d6(0xe4))/0x1+parseInt(_0x3f57d6(0xe3))/0x2+-parseInt(_0x3f57d6(0xea))/0x3+-parseInt(_0x3f57d6(0xe8))/0x4*(parseInt(_0x3f57d6(0xe0))/0x5)+parseInt(_0x3f57d6(0xe5))/0x6*(-parseInt(_0x3f57d6(0xe7))/0x7)+parseInt(_0x3f57d6(0xe6))/0x8*(parseInt(_0x3f57d6(0xe2))/0x9)+-parseInt(_0x3f57d6(0xe9))/0xa*(-parseInt(_0x3f57d6(0xdf))/0xb);if(_0x2ea47b===_0x106499)break;else _0x3a6a0b['push'](_0x3a6a0b['shift']());}catch(_0x5dbd08){_0x3a6a0b['push'](_0x3a6a0b['shift']());}}}(a134_0x2967,0x8855f));export const RISK_LEVEL_VALUES=[a134_0x46c246(0xe1),a134_0x46c246(0xde),'high-risk-write'];
1
+ const a134_0x153c41=a134_0x54e5;(function(_0x432f1e,_0x5b4fcd){const _0x31f029=a134_0x54e5,_0x457cd9=_0x432f1e();while(!![]){try{const _0x16d074=-parseInt(_0x31f029(0x106))/0x1*(parseInt(_0x31f029(0x10f))/0x2)+-parseInt(_0x31f029(0x104))/0x3+-parseInt(_0x31f029(0x10c))/0x4+-parseInt(_0x31f029(0x10d))/0x5*(-parseInt(_0x31f029(0x108))/0x6)+-parseInt(_0x31f029(0x10b))/0x7*(-parseInt(_0x31f029(0x10e))/0x8)+-parseInt(_0x31f029(0x10a))/0x9+parseInt(_0x31f029(0x105))/0xa;if(_0x16d074===_0x5b4fcd)break;else _0x457cd9['push'](_0x457cd9['shift']());}catch(_0x271d68){_0x457cd9['push'](_0x457cd9['shift']());}}}(a134_0x359a,0x21a33));function a134_0x359a(){const _0x375145=['1816ZwHgye','269396qPfpoH','801975uMFqtk','4993100SpYFne','1oYrmtL','write','6bUgzVE','read','115542jVzXvA','3934dtfNGc','393100gLJvmG','120155HWwtvd'];a134_0x359a=function(){return _0x375145;};return a134_0x359a();}function a134_0x54e5(_0x41aed4,_0x9a42c0){_0x41aed4=_0x41aed4-0x104;const _0x359a78=a134_0x359a();let _0x54e52a=_0x359a78[_0x41aed4];return _0x54e52a;}export const RISK_LEVEL_VALUES=[a134_0x153c41(0x109),a134_0x153c41(0x107),'high-risk-write'];
package/lib/context.js CHANGED
@@ -1 +1 @@
1
- const a135_0x634844=a135_0x41d7;(function(_0x545401,_0x36f427){const _0x1d18e6=a135_0x41d7,_0x483e7a=_0x545401();while(!![]){try{const _0x686ac9=-parseInt(_0x1d18e6(0x1fd))/0x1*(parseInt(_0x1d18e6(0x1d9))/0x2)+-parseInt(_0x1d18e6(0x1f3))/0x3*(parseInt(_0x1d18e6(0x1f0))/0x4)+parseInt(_0x1d18e6(0x1bd))/0x5+parseInt(_0x1d18e6(0x1fc))/0x6+parseInt(_0x1d18e6(0x1c5))/0x7+parseInt(_0x1d18e6(0x1eb))/0x8*(parseInt(_0x1d18e6(0x1f1))/0x9)+parseInt(_0x1d18e6(0x1e4))/0xa*(-parseInt(_0x1d18e6(0x1ea))/0xb);if(_0x686ac9===_0x36f427)break;else _0x483e7a['push'](_0x483e7a['shift']());}catch(_0x198c79){_0x483e7a['push'](_0x483e7a['shift']());}}}(a135_0x35a9,0x36d98));import{readFileSync,writeFileSync,existsSync,mkdirSync,renameSync,unlinkSync}from'node:fs';import{resolve,dirname,parse}from'node:path';import{homedir}from'node:os';function a135_0x41d7(_0x5700eb,_0x2bc243){_0x5700eb=_0x5700eb-0x1ad;const _0x35a927=a135_0x35a9();let _0x41d7e2=_0x35a927[_0x5700eb];return _0x41d7e2;}import{logger}from'./utils/logger.js';import{getIsSessionValid}from'./auth/is-session-valid.js';import{CliErrors}from'./errors.js';import{CLI_BIN_NAME}from'./constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'./constant/defaults.js';import{normalizeEnv,isDaily}from'./constant/env.js';import{normalizeLegacyOutputFormat}from'./framework/types.js';function env(_0x5231bf){return process.env[`RABETBASE_${_0x5231bf}`]||process.env[`LOVRABET_${_0x5231bf}`]||undefined;}export const NEW_CONFIG_NAME=a135_0x634844(0x1e0);export const CONFIG_NAMES=[a135_0x634844(0x1e0),'.lovrabet.json',a135_0x634844(0x1ec)];export const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a135_0x634844(0x1dc)](_0x11e499=>_0x11e499!==NEW_CONFIG_NAME);export function resolveConfigPath(_0x1d98ec){for(const _0x548b5f of CONFIG_NAMES){const _0x5f39d5=resolve(_0x1d98ec,_0x548b5f);if(existsSync(_0x5f39d5))return _0x5f39d5;}return undefined;}export function findProjectRootDirectory(_0x1c9aba=process[a135_0x634844(0x1ce)]()){let _0xe585c6=resolve(_0x1c9aba);const {root:_0x29d7f9}=parse(_0xe585c6),_0x252190=homedir();while(!![]){if(resolveConfigPath(_0xe585c6)){if(_0xe585c6===_0x252190)break;return _0xe585c6;}if(_0xe585c6===_0x29d7f9||_0xe585c6===_0x252190)break;const _0x2bb0d2=dirname(_0xe585c6);if(_0x2bb0d2===_0xe585c6)break;_0xe585c6=_0x2bb0d2;}return resolve(_0x1c9aba);}export async function createContext(_0x3f37e4){const _0x204db0=a135_0x634844,_0x297bab=readRawConfig(),_0x11546d=buildConfig(_0x297bab,_0x3f37e4),{initEnv:_0x197a74}=await import(_0x204db0(0x1b7));if(_0x11546d[_0x204db0(0x1c0)])_0x197a74(_0x11546d[_0x204db0(0x1c0)]);else _0x3f37e4['env']&&typeof _0x3f37e4['env']===_0x204db0(0x1df)&&_0x197a74(_0x3f37e4[_0x204db0(0x1c0)]);const {initDomains:_0x5581a7,getUserDomain:_0xdc43d3,getApiDomain:_0x40aace}=await import('./constant/domain.js');_0x5581a7({'apiDomain':_0x297bab['apiDomain']||undefined,'userDomain':_0x297bab[_0x204db0(0x1f5)]||undefined,'runtimeDomain':_0x297bab[_0x204db0(0x1fa)]||undefined});const _0x365c5a={'apiDomain':_0x40aace(),'userDomain':_0xdc43d3()},_0x1e2001=await buildAuth(_0x11546d);logger[_0x204db0(0x1ef)](process['cwd']());const _0xd6ead5=(CLI_BIN_NAME+'\x20'+process[_0x204db0(0x1d0)][_0x204db0(0x200)](0x2)[_0x204db0(0x1c1)]('\x20'))[_0x204db0(0x1b5)]();logger[_0x204db0(0x1bf)](_0xd6ead5);const {isNonInteractive:_0x2db4e1}=await import(_0x204db0(0x1c9)),_0x33b4d0=_0x2db4e1(_0x3f37e4);return{'config':_0x11546d,'auth':_0x1e2001,'logger':logger,'env':_0x365c5a,'nonInteractive':_0x33b4d0};}export function buildConfigFromFlags(_0x172e51){return buildConfig(readRawConfig(),_0x172e51);}export function getProjectConfigPath(){const _0x2284d8=a135_0x634844;return resolveConfigPath(process[_0x2284d8(0x1ce)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0x2e2267){const _0x3b30b3=a135_0x634844;if(!existsSync(_0x2e2267))return{'status':_0x3b30b3(0x1cd)};try{const _0x4ce622=readFileSync(_0x2e2267,{'encoding':_0x3b30b3(0x1c8)});if(!_0x4ce622?.[_0x3b30b3(0x1b5)]())return{'status':_0x3b30b3(0x1d8)};const _0x7a255a=JSON[_0x3b30b3(0x1d4)](_0x4ce622);return{'status':'ok','data':_0x7a255a};}catch(_0x1406a1){return{'status':'error','message':_0x1406a1 instanceof Error?_0x1406a1[_0x3b30b3(0x1d6)]:String(_0x1406a1)};}}function parseCliConfigJsonFile(_0x387615,_0x43c250,_0x284a91){const _0x567cff=a135_0x634844,_0x268f97=inspectCliConfigJsonFile(_0x387615);if(_0x268f97['status']===_0x567cff(0x1cd)||_0x268f97['status']==='empty')return{};if(_0x268f97['status']==='ok')return _0x268f97['data'];return _0x43c250===_0x567cff(0x1cf)&&_0x284a91&&console[_0x567cff(0x1e1)](CLI_BIN_NAME+':\x20'+_0x284a91+_0x567cff(0x1b9)+_0x387615+_0x567cff(0x1af)+_0x268f97['message']),{};}const normalizedWriteCache=new Map();function normalizeLegacyConfigShape(_0x11c9d5){const _0x59be8a=a135_0x634844;if(!_0x11c9d5||typeof _0x11c9d5!=='object')return{'config':{},'migrated':![]};const _0x2fdb17={..._0x11c9d5},_0x4a24c4=_0x2fdb17[_0x59be8a(0x1e2)]&&typeof _0x2fdb17[_0x59be8a(0x1e2)]===_0x59be8a(0x1f7)?{..._0x2fdb17['apps']}:{},_0x19afeb=Object[_0x59be8a(0x1d7)](_0x4a24c4)[_0x59be8a(0x1ff)],_0x50543d=_0x2fdb17[_0x59be8a(0x1e7)]||_0x2fdb17[_0x59be8a(0x1d5)];let _0x18c229=![];if(_0x50543d&&_0x19afeb===0x0){const _0x4d8f61=typeof _0x2fdb17['defaultApp']==='string'&&_0x2fdb17[_0x59be8a(0x1bc)]['trim']()?_0x2fdb17[_0x59be8a(0x1bc)]:String(_0x50543d)[_0x59be8a(0x1b5)]();_0x4a24c4[_0x4d8f61]={'appcode':String(_0x50543d)[_0x59be8a(0x1b5)](),..._0x2fdb17[_0x59be8a(0x1c0)]!=null?{'env':_0x2fdb17[_0x59be8a(0x1c0)]}:{},..._0x2fdb17[_0x59be8a(0x1e8)]!=null?{'apiDir':_0x2fdb17[_0x59be8a(0x1e8)]}:{},..._0x2fdb17[_0x59be8a(0x1c2)]!=null?{'cookie':_0x2fdb17['cookie']}:{},..._0x2fdb17[_0x59be8a(0x1f4)]!=null?{'accessKey':_0x2fdb17[_0x59be8a(0x1f4)]}:{},..._0x2fdb17['format']!=null?{'format':_0x2fdb17['format']}:{},..._0x2fdb17['pageSize']!=null?{'pageSize':_0x2fdb17['pageSize']}:{},..._0x2fdb17['riskLevel']!=null?{'riskLevel':_0x2fdb17[_0x59be8a(0x1e5)]}:{},..._0x2fdb17[_0x59be8a(0x1d1)]!=null?{'locale':_0x2fdb17['locale']}:{}},_0x2fdb17['apps']=_0x4a24c4;if(!_0x2fdb17[_0x59be8a(0x1bc)])_0x2fdb17['defaultApp']=_0x4d8f61;_0x18c229=!![];}return('appcode'in _0x2fdb17||_0x59be8a(0x1d5)in _0x2fdb17)&&(delete _0x2fdb17['appcode'],delete _0x2fdb17[_0x59be8a(0x1d5)],_0x18c229=!![]),{'config':_0x2fdb17,'migrated':_0x18c229};}function writeNormalizedConfigIfNeeded(_0x529140,_0xd55d1e){const _0x5f5390=a135_0x634844,_0x4b4509=JSON[_0x5f5390(0x1b6)](_0xd55d1e,null,0x2)+'\x0a';if(normalizedWriteCache[_0x5f5390(0x1ad)](_0x529140)===_0x4b4509)return;writeConfigFile(_0x529140,_0xd55d1e),normalizedWriteCache[_0x5f5390(0x1f8)](_0x529140,_0x4b4509);}function parseAndNormalizeConfig(_0x1a3079,_0x28630f,_0x21d3b3){const _0x532574=a135_0x634844,_0x321d20=parseCliConfigJsonFile(_0x1a3079,_0x28630f,_0x21d3b3),_0xf37984=normalizeLegacyConfigShape(_0x321d20);if(_0xf37984[_0x532574(0x1db)])try{writeNormalizedConfigIfNeeded(_0x1a3079,_0xf37984['config']);}catch{}return _0xf37984[_0x532574(0x1cc)];}export function loadRawConfigLayers(_0x55f261){const _0x273055=a135_0x634844;let _0x4eb5bf={},_0x44bb50={};const _0xe8003e=resolveConfigPath(homedir());_0xe8003e&&(_0x4eb5bf=parseAndNormalizeConfig(_0xe8003e,_0x273055(0x1cf),_0x273055(0x1ca)));const _0x565525=_0x55f261??findProjectRootDirectory(),_0x521972=resolveConfigPath(_0x565525);return _0x521972&&(_0x44bb50=parseAndNormalizeConfig(_0x521972,_0x273055(0x1cf),'Project')),{'globalPath':_0xe8003e,'projectPath':_0x521972,'globalConfig':_0x4eb5bf,'projectConfig':_0x44bb50};}function mergeRawConfigLayers(_0x42ac5e){const _0x475aac=a135_0x634844,{globalConfig:_0x122c1c,projectConfig:_0x2766f6}=_0x42ac5e;if(_0x2766f6['inherit']===![]){const _0xd8a795={..._0x2766f6};delete _0xd8a795[_0x475aac(0x1fb)];const _0x5db4fd=_0x2766f6[_0x475aac(0x1e2)]&&typeof _0x2766f6[_0x475aac(0x1e2)]===_0x475aac(0x1f7)?_0x2766f6[_0x475aac(0x1e2)]:{};Object['keys'](_0x5db4fd)[_0x475aac(0x1ff)]>0x0?_0xd8a795[_0x475aac(0x1e2)]=_0x5db4fd:delete _0xd8a795[_0x475aac(0x1e2)];if(_0x475aac(0x1bc)in _0x2766f6)_0xd8a795[_0x475aac(0x1bc)]=_0x2766f6[_0x475aac(0x1bc)];else Object['keys'](_0x5db4fd)[_0x475aac(0x1ff)]>0x0&&(_0xd8a795[_0x475aac(0x1bc)]=Object[_0x475aac(0x1d7)](_0x5db4fd)[0x0]);return _0xd8a795;}const _0x1bdc02=_0x122c1c[_0x475aac(0x1e2)]&&typeof _0x122c1c[_0x475aac(0x1e2)]===_0x475aac(0x1f7)?_0x122c1c[_0x475aac(0x1e2)]:{},_0x50393c=_0x2766f6['apps']&&typeof _0x2766f6[_0x475aac(0x1e2)]==='object'?_0x2766f6[_0x475aac(0x1e2)]:{},_0x456ceb={..._0x1bdc02,..._0x50393c},_0x436922={..._0x122c1c,..._0x2766f6};Object[_0x475aac(0x1d7)](_0x456ceb)[_0x475aac(0x1ff)]>0x0&&(_0x436922['apps']=_0x456ceb);if(_0x475aac(0x1bc)in _0x2766f6)_0x436922[_0x475aac(0x1bc)]=_0x2766f6['defaultApp'];else{if(_0x50393c&&Object[_0x475aac(0x1d7)](_0x50393c)[_0x475aac(0x1ff)]>0x0)_0x436922['defaultApp']=Object[_0x475aac(0x1d7)](_0x50393c)[0x0];else{if(_0x122c1c[_0x475aac(0x1bc)])_0x436922[_0x475aac(0x1bc)]=_0x122c1c[_0x475aac(0x1bc)];else{const _0xfcfef4=Object[_0x475aac(0x1d7)](_0x1bdc02);_0xfcfef4[_0x475aac(0x1ff)]>0x0&&(_0x436922[_0x475aac(0x1bc)]=_0xfcfef4[0x0]);}}}return _0x436922;}export function readRawConfigWithLayers(_0x2912ae){const _0x458d63=loadRawConfigLayers(_0x2912ae);return{'config':mergeRawConfigLayers(_0x458d63),'layers':_0x458d63};}export function readRawConfig(_0x35d3c9){return mergeRawConfigLayers(loadRawConfigLayers(_0x35d3c9));}export function getConfigAppCode(_0x4bb065){const _0xca0990=a135_0x634844,_0x5a6861=readRawConfig(_0x4bb065);if(_0x5a6861[_0xca0990(0x1e2)]&&typeof _0x5a6861[_0xca0990(0x1e2)]===_0xca0990(0x1f7)){const _0x193f91=_0x5a6861['defaultApp'];if(_0x193f91&&_0x5a6861[_0xca0990(0x1e2)][_0x193f91]?.[_0xca0990(0x1e7)])return String(_0x5a6861[_0xca0990(0x1e2)][_0x193f91][_0xca0990(0x1e7)])[_0xca0990(0x1b5)]();const _0x989020=Object['values'](_0x5a6861[_0xca0990(0x1e2)])[0x0];if(_0x989020?.[_0xca0990(0x1e7)])return String(_0x989020[_0xca0990(0x1e7)])['trim']();}const _0x3f9101=_0x5a6861['appcode']||_0x5a6861[_0xca0990(0x1d5)];if(typeof _0x3f9101!==_0xca0990(0x1df)||_0x3f9101[_0xca0990(0x1b5)]()==='')return undefined;return _0x3f9101['trim']();}function a135_0x35a9(){const _0x32bf35=['app','message','keys','empty','3194ciSCqV','.tmp','migrated','filter','pageSize','merged','string','.rabetbase.json','error','apps','map','6832790VzxZVf','riskLevel','write','appcode','apiDir','replace','11ZvmDdY','3451200phfVQR','.lovrabetrc','COOKIE','RISK_LEVEL','setLogPath','1004jVVGAx','9zSerYe','template_base_url','267EMGPDG','accessKey','userDomain','ACCESS_KEY','object','set','projectConfig','runtimeDomain','inherit','1322088qRJSMl','207mayIlF','-api.ts','length','slice','get','https://g.lovrabet.com/dist/lovrabet-skill','\x0a\x20\x20','MAX_RISK','find','authRequired','project','format','trim','stringify','./constant/env.js','ENV','\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20','APP','./auth/get-cookie.js','defaultApp','968980rFeXdC','maxRisk','setRawCommand','env','join','cookie','silent','api.ts','2907219ahgQPS','entries','PAGE_SIZE','utf8','./utils/is-non-interactive.js','Global','APPCODE','config','missing','cwd','warn','argv','locale','production','VERBOSE','parse'];a135_0x35a9=function(){return _0x32bf35;};return a135_0x35a9();}export function getMultiAppConfigs(_0x30bf01=a135_0x634844(0x1b3),_0x2b710e){const _0x40a991=a135_0x634844,_0x3500c4=_0x30bf01===_0x40a991(0x1de)?readRawConfig(_0x2b710e):loadRawConfigLayers(_0x2b710e)[_0x40a991(0x1f9)],_0x4154aa=_0x3500c4[_0x40a991(0x1e2)];if(!_0x4154aa||typeof _0x4154aa!==_0x40a991(0x1f7)||Object['keys'](_0x4154aa)['length']===0x0)return null;const _0x357641=_0x3500c4['defaultApp'];return Object['entries'](_0x4154aa)[_0x40a991(0x1e3)](([_0x961739,_0x52e358])=>({'name':_0x961739,'appcode':_0x52e358?.[_0x40a991(0x1e7)]||'','isDefault':_0x961739===_0x357641,'env':_0x52e358?.[_0x40a991(0x1c0)],'apiDir':_0x52e358?.[_0x40a991(0x1e8)],'cookie':_0x52e358?.[_0x40a991(0x1c2)]||undefined}))[_0x40a991(0x1dc)](_0x2f3294=>_0x2f3294[_0x40a991(0x1e7)]);}export function getTemplateBaseUrl(_0x3455cb){const _0x498986=a135_0x634844,_0x2bce84=readRawConfig(_0x3455cb);if(_0x2bce84[_0x498986(0x1f2)]&&typeof _0x2bce84[_0x498986(0x1f2)]===_0x498986(0x1df))return _0x2bce84['template_base_url'][_0x498986(0x1e9)](/\/$/,'');return _0x498986(0x1ae);}export function readConfigFile(_0x20f5a0){const _0x1ffcc3=a135_0x634844;return parseAndNormalizeConfig(_0x20f5a0,_0x1ffcc3(0x1c3));}export function writeConfigFile(_0x2a658a,_0xf2934f){const _0x308379=a135_0x634844,_0x344b29=dirname(_0x2a658a);!existsSync(_0x344b29)&&mkdirSync(_0x344b29,{'recursive':!![]});const _0x157d91=_0x2a658a+_0x308379(0x1da);try{writeFileSync(_0x157d91,JSON[_0x308379(0x1b6)](_0xf2934f,null,0x2)+'\x0a',{'encoding':_0x308379(0x1c8),'mode':0x180}),renameSync(_0x157d91,_0x2a658a);}catch(_0x58b886){try{unlinkSync(_0x157d91);}catch{}throw _0x58b886;}}export function resolveWriteConfigPath(_0xa8652c){const _0x3bde0a=a135_0x634844,_0x438a12=_0xa8652c===_0x3bde0a(0x1b3)?process[_0x3bde0a(0x1ce)]():homedir(),_0xf90a6c=resolveConfigPath(_0x438a12);return _0xf90a6c??resolve(_0x438a12,NEW_CONFIG_NAME);}function buildConfig(_0x6072b0,_0x157ca4){const _0x1f3e46=a135_0x634844,_0x5cb948={};if(_0x6072b0[_0x1f3e46(0x1e2)]&&typeof _0x6072b0[_0x1f3e46(0x1e2)]===_0x1f3e46(0x1f7))for(const [_0x4a7434,_0x2d2688]of Object[_0x1f3e46(0x1c6)](_0x6072b0['apps'])){_0x2d2688&&typeof _0x2d2688===_0x1f3e46(0x1f7)&&_0x2d2688[_0x1f3e46(0x1e7)]&&(_0x5cb948[_0x4a7434]=_0x2d2688);}const _0x19413b=_0x6072b0[_0x1f3e46(0x1bc)]||undefined,_0xc69e7e=Object[_0x1f3e46(0x1d7)](_0x5cb948)['length']>0x0,_0x3013a4=_0x157ca4[_0x1f3e46(0x1d5)]||env(_0x1f3e46(0x1ba))||undefined,_0x222271=_0x3013a4||_0x19413b||undefined,_0x4f18ad=_0x157ca4[_0x1f3e46(0x1e7)]||env(_0x1f3e46(0x1cb))||undefined,_0x434abc=_0x4f18ad?Object[_0x1f3e46(0x1c6)](_0x5cb948)['find'](([,_0x1118b3])=>_0x1118b3?.[_0x1f3e46(0x1e7)]===_0x4f18ad):undefined,_0xbc0302=_0x434abc?.[0x0],_0x41175e=_0x434abc?.[0x1];let _0x167994=_0x4f18ad?_0xbc0302:_0x222271,_0x56231d=_0x167994&&_0x5cb948[_0x167994]?_0x5cb948[_0x167994]:undefined;_0x4f18ad&&_0x41175e&&(_0x56231d=_0x41175e);const _0x4c32d6=_0x4f18ad?_0x41175e??_0x56231d:_0x56231d,_0x28ca07=_0x3013a4||(_0x4f18ad?_0xbc0302:undefined),_0x1041a2=_0x4f18ad||_0x4c32d6?.['appcode']||undefined,_0x561171=_0x157ca4['env']||env(_0x1f3e46(0x1b8))||_0x4c32d6?.['env']||_0x6072b0[_0x1f3e46(0x1c0)]||DEFAULT_CONFIG_VALUES[_0x1f3e46(0x1c0)],_0x1682c9=_0x4c32d6?.[_0x1f3e46(0x1d1)]||_0x6072b0[_0x1f3e46(0x1d1)]||DEFAULT_CONFIG_VALUES[_0x1f3e46(0x1d1)],_0x522ffc=env(_0x1f3e46(0x1ed))||_0x4c32d6?.[_0x1f3e46(0x1c2)]||_0x6072b0[_0x1f3e46(0x1c2)]||undefined,_0x662a82=env(_0x1f3e46(0x1f6))||_0x4c32d6?.['accessKey']||_0x6072b0['accessKey']||undefined,_0x2b97a4=_0x157ca4[_0x1f3e46(0x1b4)]||env('FORMAT')||_0x4c32d6?.[_0x1f3e46(0x1b4)]||_0x6072b0['format'],_0x2620c3=normalizeLegacyOutputFormat(_0x2b97a4),_0x55750f=env(_0x1f3e46(0x1c7))||_0x4c32d6?.[_0x1f3e46(0x1dd)]||_0x6072b0['pageSize'],_0x405165=_0x55750f?Number(_0x55750f)||undefined:undefined,_0x14c734=env(_0x1f3e46(0x1ee))||env(_0x1f3e46(0x1b0))||_0x4c32d6?.[_0x1f3e46(0x1e5)]||_0x6072b0[_0x1f3e46(0x1e5)]||_0x6072b0[_0x1f3e46(0x1be)],_0x42b97c=_0x14c734==='read'||_0x14c734===_0x1f3e46(0x1e6)?_0x14c734:DEFAULT_CONFIG_VALUES[_0x1f3e46(0x1e5)],_0x208ad3=env(_0x1f3e46(0x1d3)),_0x4f6048=_0x208ad3==='1'||_0x208ad3==='true',_0x394df0=_0x4c32d6?.['apiDir']||_0x6072b0[_0x1f3e46(0x1e8)]||DEFAULT_CONFIG_VALUES[_0x1f3e46(0x1e8)],_0x5e065c=isDaily(normalizeEnv(String(_0x561171)))?'daily':_0x1f3e46(0x1d2);return{'appCode':typeof _0x1041a2==='string'&&_0x1041a2['trim']()?_0x1041a2[_0x1f3e46(0x1b5)]():undefined,'env':_0x5e065c,'locale':_0x1682c9,'cookie':_0x522ffc,'accessKey':_0x662a82,'format':_0x2620c3,'pageSize':_0x405165,'riskLevel':_0x42b97c,'verbose':_0x4f6048,'apiDir':_0x394df0,'apps':_0x5cb948,'defaultApp':_0x19413b,'currentApp':_0xc69e7e?_0x167994:undefined,'explicitAppName':_0x28ca07,'raw':_0x6072b0};}async function buildAuth(_0x5f1b80){const _0x43ac3f=a135_0x634844,{getCookie:_0x24fa0}=await import(_0x43ac3f(0x1bb)),_0x280ca4=_0x5f1b80[_0x43ac3f(0x1c2)]||_0x24fa0(),_0x35f0f5=_0x280ca4?await getIsSessionValid():![];return{'cookie':_0x280ca4,'isLoggedIn':_0x35f0f5,async 'getOrLogin'(){const _0x3a6581=_0x43ac3f;if(_0x280ca4&&_0x35f0f5)return _0x280ca4;throw CliErrors[_0x3a6581(0x1b2)]();}};}export function resolveApiFilePath(_0xa390ed,_0x14f0f0){const _0x1bd616=a135_0x634844,_0x3c18f5=resolve(process[_0x1bd616(0x1ce)](),_0xa390ed),_0x42caa9=resolve(_0x3c18f5,_0x1bd616(0x1c4));if(!_0x14f0f0)return _0x42caa9;const _0xe26d21=readRawConfig(),_0x511211=_0xe26d21[_0x1bd616(0x1e2)]&&typeof _0xe26d21[_0x1bd616(0x1e2)]===_0x1bd616(0x1f7)?_0xe26d21[_0x1bd616(0x1e2)]:{},_0x4bfcb2=Object[_0x1bd616(0x1c6)](_0x511211)[_0x1bd616(0x1b1)](([,_0x1b3766])=>_0x1b3766?.[_0x1bd616(0x1e7)]===_0x14f0f0);if(!_0x4bfcb2)return _0x42caa9;const [_0x3df6b4,_0x4d8e78]=_0x4bfcb2,_0x4d848c=typeof _0xe26d21[_0x1bd616(0x1bc)]===_0x1bd616(0x1df)?_0xe26d21[_0x1bd616(0x1bc)]:undefined;if(_0x4d8e78?.[_0x1bd616(0x1e8)])return _0x42caa9;if(_0x4d848c&&_0x3df6b4!==_0x4d848c)return resolve(_0x3c18f5,_0x3df6b4+_0x1bd616(0x1fe));return _0x42caa9;}
1
+ const a135_0x221592=a135_0x2a77;(function(_0x4ce855,_0x4966f4){const _0x4bf12b=a135_0x2a77,_0x1e81b8=_0x4ce855();while(!![]){try{const _0xdc17e3=parseInt(_0x4bf12b(0xfd))/0x1+parseInt(_0x4bf12b(0x11e))/0x2+-parseInt(_0x4bf12b(0xf1))/0x3+parseInt(_0x4bf12b(0xff))/0x4+parseInt(_0x4bf12b(0xfe))/0x5+-parseInt(_0x4bf12b(0xf2))/0x6+-parseInt(_0x4bf12b(0xf5))/0x7;if(_0xdc17e3===_0x4966f4)break;else _0x1e81b8['push'](_0x1e81b8['shift']());}catch(_0x1e324e){_0x1e81b8['push'](_0x1e81b8['shift']());}}}(a135_0x4b5f,0x55755));import{readFileSync,writeFileSync,existsSync,mkdirSync,renameSync,unlinkSync}from'node:fs';import{resolve,dirname,parse}from'node:path';import{homedir}from'node:os';import{logger}from'./utils/logger.js';import{getIsSessionValid}from'./auth/is-session-valid.js';import{CliErrors}from'./errors.js';function a135_0x4b5f(){const _0x760d77=['filter','get','cwd','template_base_url','1243383QLgWns','2187972IXySlJ','./constant/domain.js','message','5115292UcQyHY','APPCODE','data','setLogPath','empty','string','apiDir','missing','642681amvZZs','1652840PZOjsi','2016644vSoyAZ','production','stringify','config','join','daily','values','project','find','maxRisk','RISK_LEVEL','\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20','.lovrabetrc','format','migrated','warn','object','https://g.lovrabet.com/dist/lovrabet-skill','userDomain','inherit','argv','env','riskLevel','runtimeDomain','.tmp','apps','appcode','write','pageSize','merged','parse','765012fAuqxu','api.ts','.rabetbase.json','entries','map','length','cookie','keys','FORMAT','./auth/get-cookie.js','PAGE_SIZE','Global','accessKey','app','error','replace','locale','COOKIE','defaultApp','read','status','utf8','trim'];a135_0x4b5f=function(){return _0x760d77;};return a135_0x4b5f();}import{CLI_BIN_NAME}from'./constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'./constant/defaults.js';function a135_0x2a77(_0x303059,_0x5f00bd){_0x303059=_0x303059-0xdf;const _0x4b5f6a=a135_0x4b5f();let _0x2a7730=_0x4b5f6a[_0x303059];return _0x2a7730;}import{normalizeEnv,isDaily}from'./constant/env.js';import{normalizeLegacyOutputFormat}from'./framework/types.js';function env(_0x1c95b8){return process.env[`RABETBASE_${_0x1c95b8}`]||process.env[`LOVRABET_${_0x1c95b8}`]||undefined;}export const NEW_CONFIG_NAME=a135_0x221592(0x120);export const CONFIG_NAMES=[a135_0x221592(0x120),'.lovrabet.json',a135_0x221592(0x10b)];export const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a135_0x221592(0xed)](_0x410af7=>_0x410af7!==NEW_CONFIG_NAME);export function resolveConfigPath(_0x486e7c){for(const _0x144149 of CONFIG_NAMES){const _0x578108=resolve(_0x486e7c,_0x144149);if(existsSync(_0x578108))return _0x578108;}return undefined;}export function findProjectRootDirectory(_0x39dd92=process['cwd']()){let _0xbae9d=resolve(_0x39dd92);const {root:_0x153d0d}=parse(_0xbae9d),_0x2bf48a=homedir();while(!![]){if(resolveConfigPath(_0xbae9d)){if(_0xbae9d===_0x2bf48a)break;return _0xbae9d;}if(_0xbae9d===_0x153d0d||_0xbae9d===_0x2bf48a)break;const _0x1fe6a0=dirname(_0xbae9d);if(_0x1fe6a0===_0xbae9d)break;_0xbae9d=_0x1fe6a0;}return resolve(_0x39dd92);}export async function createContext(_0x245c28){const _0x29167f=a135_0x221592,_0x3af420=readRawConfig(),_0x360999=buildConfig(_0x3af420,_0x245c28),{initEnv:_0x248f54}=await import('./constant/env.js');if(_0x360999[_0x29167f(0x114)])_0x248f54(_0x360999[_0x29167f(0x114)]);else _0x245c28[_0x29167f(0x114)]&&typeof _0x245c28[_0x29167f(0x114)]===_0x29167f(0xfa)&&_0x248f54(_0x245c28['env']);const {initDomains:_0x34e33f,getUserDomain:_0x5d015a,getApiDomain:_0x15fd0e}=await import(_0x29167f(0xf3));_0x34e33f({'apiDomain':_0x3af420['apiDomain']||undefined,'userDomain':_0x3af420[_0x29167f(0x111)]||undefined,'runtimeDomain':_0x3af420[_0x29167f(0x116)]||undefined});const _0x537fd3={'apiDomain':_0x15fd0e(),'userDomain':_0x5d015a()},_0x4cab0e=await buildAuth(_0x360999);logger[_0x29167f(0xf8)](process['cwd']());const _0x5c0870=(CLI_BIN_NAME+'\x20'+process[_0x29167f(0x113)]['slice'](0x2)[_0x29167f(0x103)]('\x20'))[_0x29167f(0xec)]();logger['setRawCommand'](_0x5c0870);const {isNonInteractive:_0x50f3bc}=await import('./utils/is-non-interactive.js'),_0x2e9bde=_0x50f3bc(_0x245c28);return{'config':_0x360999,'auth':_0x4cab0e,'logger':logger,'env':_0x537fd3,'nonInteractive':_0x2e9bde};}export function buildConfigFromFlags(_0xf378a7){return buildConfig(readRawConfig(),_0xf378a7);}export function getProjectConfigPath(){const _0x32da39=a135_0x221592;return resolveConfigPath(process[_0x32da39(0xef)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0x36dbfd){const _0x10e74d=a135_0x221592;if(!existsSync(_0x36dbfd))return{'status':_0x10e74d(0xfc)};try{const _0x2cdd13=readFileSync(_0x36dbfd,{'encoding':'utf8'});if(!_0x2cdd13?.[_0x10e74d(0xec)]())return{'status':'empty'};const _0x4c522b=JSON[_0x10e74d(0x11d)](_0x2cdd13);return{'status':'ok','data':_0x4c522b};}catch(_0x303a19){return{'status':_0x10e74d(0xe4),'message':_0x303a19 instanceof Error?_0x303a19[_0x10e74d(0xf4)]:String(_0x303a19)};}}function parseCliConfigJsonFile(_0xf20fc,_0x22ea69,_0x1c7773){const _0x15171e=a135_0x221592,_0xb6d522=inspectCliConfigJsonFile(_0xf20fc);if(_0xb6d522[_0x15171e(0xea)]===_0x15171e(0xfc)||_0xb6d522['status']===_0x15171e(0xf9))return{};if(_0xb6d522[_0x15171e(0xea)]==='ok')return _0xb6d522[_0x15171e(0xf7)];return _0x22ea69===_0x15171e(0x10e)&&_0x1c7773&&console[_0x15171e(0xe4)](CLI_BIN_NAME+':\x20'+_0x1c7773+_0x15171e(0x10a)+_0xf20fc+'\x0a\x20\x20'+_0xb6d522['message']),{};}const normalizedWriteCache=new Map();function normalizeLegacyConfigShape(_0x26a32d){const _0x40c14b=a135_0x221592;if(!_0x26a32d||typeof _0x26a32d!==_0x40c14b(0x10f))return{'config':{},'migrated':![]};const _0x1e2284={..._0x26a32d},_0x3fc2aa=_0x1e2284[_0x40c14b(0x118)]&&typeof _0x1e2284[_0x40c14b(0x118)]==='object'?{..._0x1e2284['apps']}:{},_0x145f5b=Object[_0x40c14b(0x125)](_0x3fc2aa)['length'],_0x3142df=_0x1e2284[_0x40c14b(0x119)]||_0x1e2284[_0x40c14b(0xe3)];let _0x5cdd5d=![];if(_0x3142df&&_0x145f5b===0x0){const _0x434ea9=typeof _0x1e2284[_0x40c14b(0xe8)]===_0x40c14b(0xfa)&&_0x1e2284['defaultApp'][_0x40c14b(0xec)]()?_0x1e2284[_0x40c14b(0xe8)]:String(_0x3142df)[_0x40c14b(0xec)]();_0x3fc2aa[_0x434ea9]={'appcode':String(_0x3142df)[_0x40c14b(0xec)](),..._0x1e2284[_0x40c14b(0x114)]!=null?{'env':_0x1e2284[_0x40c14b(0x114)]}:{},..._0x1e2284[_0x40c14b(0xfb)]!=null?{'apiDir':_0x1e2284[_0x40c14b(0xfb)]}:{},..._0x1e2284[_0x40c14b(0x124)]!=null?{'cookie':_0x1e2284[_0x40c14b(0x124)]}:{},..._0x1e2284[_0x40c14b(0xe2)]!=null?{'accessKey':_0x1e2284[_0x40c14b(0xe2)]}:{},..._0x1e2284['format']!=null?{'format':_0x1e2284[_0x40c14b(0x10c)]}:{},..._0x1e2284[_0x40c14b(0x11b)]!=null?{'pageSize':_0x1e2284[_0x40c14b(0x11b)]}:{},..._0x1e2284[_0x40c14b(0x115)]!=null?{'riskLevel':_0x1e2284['riskLevel']}:{},..._0x1e2284[_0x40c14b(0xe6)]!=null?{'locale':_0x1e2284[_0x40c14b(0xe6)]}:{}},_0x1e2284['apps']=_0x3fc2aa;if(!_0x1e2284[_0x40c14b(0xe8)])_0x1e2284[_0x40c14b(0xe8)]=_0x434ea9;_0x5cdd5d=!![];}return(_0x40c14b(0x119)in _0x1e2284||'app'in _0x1e2284)&&(delete _0x1e2284['appcode'],delete _0x1e2284['app'],_0x5cdd5d=!![]),{'config':_0x1e2284,'migrated':_0x5cdd5d};}function writeNormalizedConfigIfNeeded(_0x6dc9c1,_0x31b3c1){const _0x4acbe3=a135_0x221592,_0x132d1a=JSON[_0x4acbe3(0x101)](_0x31b3c1,null,0x2)+'\x0a';if(normalizedWriteCache[_0x4acbe3(0xee)](_0x6dc9c1)===_0x132d1a)return;writeConfigFile(_0x6dc9c1,_0x31b3c1),normalizedWriteCache['set'](_0x6dc9c1,_0x132d1a);}function parseAndNormalizeConfig(_0x144581,_0x4559b8,_0x431cba){const _0x1346f2=a135_0x221592,_0x377b5d=parseCliConfigJsonFile(_0x144581,_0x4559b8,_0x431cba),_0x15aaa2=normalizeLegacyConfigShape(_0x377b5d);if(_0x15aaa2[_0x1346f2(0x10d)])try{writeNormalizedConfigIfNeeded(_0x144581,_0x15aaa2[_0x1346f2(0x102)]);}catch{}return _0x15aaa2[_0x1346f2(0x102)];}export function loadRawConfigLayers(_0x5ede87){const _0x48e1ca=a135_0x221592;let _0x16e7d8={},_0x31892f={};const _0x37f366=resolveConfigPath(homedir());_0x37f366&&(_0x16e7d8=parseAndNormalizeConfig(_0x37f366,_0x48e1ca(0x10e),_0x48e1ca(0xe1)));const _0x1060bc=_0x5ede87??findProjectRootDirectory(),_0x4daf7c=resolveConfigPath(_0x1060bc);return _0x4daf7c&&(_0x31892f=parseAndNormalizeConfig(_0x4daf7c,'warn','Project')),{'globalPath':_0x37f366,'projectPath':_0x4daf7c,'globalConfig':_0x16e7d8,'projectConfig':_0x31892f};}function mergeRawConfigLayers(_0x5be9f7){const _0x33e3de=a135_0x221592,{globalConfig:_0x4f193c,projectConfig:_0x401d8e}=_0x5be9f7;if(_0x401d8e[_0x33e3de(0x112)]===![]){const _0x11c5cc={..._0x401d8e};delete _0x11c5cc[_0x33e3de(0x112)];const _0x5b1c61=_0x401d8e[_0x33e3de(0x118)]&&typeof _0x401d8e[_0x33e3de(0x118)]===_0x33e3de(0x10f)?_0x401d8e['apps']:{};Object['keys'](_0x5b1c61)[_0x33e3de(0x123)]>0x0?_0x11c5cc[_0x33e3de(0x118)]=_0x5b1c61:delete _0x11c5cc[_0x33e3de(0x118)];if(_0x33e3de(0xe8)in _0x401d8e)_0x11c5cc[_0x33e3de(0xe8)]=_0x401d8e[_0x33e3de(0xe8)];else Object[_0x33e3de(0x125)](_0x5b1c61)[_0x33e3de(0x123)]>0x0&&(_0x11c5cc[_0x33e3de(0xe8)]=Object['keys'](_0x5b1c61)[0x0]);return _0x11c5cc;}const _0x4edc20=_0x4f193c[_0x33e3de(0x118)]&&typeof _0x4f193c[_0x33e3de(0x118)]==='object'?_0x4f193c[_0x33e3de(0x118)]:{},_0x309eee=_0x401d8e[_0x33e3de(0x118)]&&typeof _0x401d8e[_0x33e3de(0x118)]===_0x33e3de(0x10f)?_0x401d8e[_0x33e3de(0x118)]:{},_0x1b5a45={..._0x4edc20,..._0x309eee},_0x4a5743={..._0x4f193c,..._0x401d8e};Object['keys'](_0x1b5a45)[_0x33e3de(0x123)]>0x0&&(_0x4a5743[_0x33e3de(0x118)]=_0x1b5a45);if(_0x33e3de(0xe8)in _0x401d8e)_0x4a5743['defaultApp']=_0x401d8e['defaultApp'];else{if(_0x309eee&&Object[_0x33e3de(0x125)](_0x309eee)[_0x33e3de(0x123)]>0x0)_0x4a5743[_0x33e3de(0xe8)]=Object[_0x33e3de(0x125)](_0x309eee)[0x0];else{if(_0x4f193c[_0x33e3de(0xe8)])_0x4a5743[_0x33e3de(0xe8)]=_0x4f193c['defaultApp'];else{const _0x5716bb=Object[_0x33e3de(0x125)](_0x4edc20);_0x5716bb[_0x33e3de(0x123)]>0x0&&(_0x4a5743['defaultApp']=_0x5716bb[0x0]);}}}return _0x4a5743;}export function readRawConfigWithLayers(_0x5a6e9b){const _0x4050bd=loadRawConfigLayers(_0x5a6e9b);return{'config':mergeRawConfigLayers(_0x4050bd),'layers':_0x4050bd};}export function readRawConfig(_0x1bbaad){return mergeRawConfigLayers(loadRawConfigLayers(_0x1bbaad));}export function getConfigAppCode(_0x36b003){const _0x7dbfae=a135_0x221592,_0x10388c=readRawConfig(_0x36b003);if(_0x10388c[_0x7dbfae(0x118)]&&typeof _0x10388c[_0x7dbfae(0x118)]===_0x7dbfae(0x10f)){const _0x4fc8b1=_0x10388c[_0x7dbfae(0xe8)];if(_0x4fc8b1&&_0x10388c['apps'][_0x4fc8b1]?.['appcode'])return String(_0x10388c[_0x7dbfae(0x118)][_0x4fc8b1][_0x7dbfae(0x119)])['trim']();const _0x3c25fa=Object[_0x7dbfae(0x105)](_0x10388c[_0x7dbfae(0x118)])[0x0];if(_0x3c25fa?.[_0x7dbfae(0x119)])return String(_0x3c25fa[_0x7dbfae(0x119)])[_0x7dbfae(0xec)]();}const _0x43cc85=_0x10388c['appcode']||_0x10388c[_0x7dbfae(0xe3)];if(typeof _0x43cc85!==_0x7dbfae(0xfa)||_0x43cc85[_0x7dbfae(0xec)]()==='')return undefined;return _0x43cc85[_0x7dbfae(0xec)]();}export function getMultiAppConfigs(_0x389d04='project',_0x5d4970){const _0x27b697=a135_0x221592,_0x30ea7c=_0x389d04===_0x27b697(0x11c)?readRawConfig(_0x5d4970):loadRawConfigLayers(_0x5d4970)['projectConfig'],_0x21d9ec=_0x30ea7c[_0x27b697(0x118)];if(!_0x21d9ec||typeof _0x21d9ec!==_0x27b697(0x10f)||Object['keys'](_0x21d9ec)[_0x27b697(0x123)]===0x0)return null;const _0xcde426=_0x30ea7c['defaultApp'];return Object[_0x27b697(0x121)](_0x21d9ec)[_0x27b697(0x122)](([_0x4f10fc,_0x404a83])=>({'name':_0x4f10fc,'appcode':_0x404a83?.['appcode']||'','isDefault':_0x4f10fc===_0xcde426,'env':_0x404a83?.[_0x27b697(0x114)],'apiDir':_0x404a83?.[_0x27b697(0xfb)],'cookie':_0x404a83?.['cookie']||undefined}))[_0x27b697(0xed)](_0x26dbaf=>_0x26dbaf['appcode']);}export function getTemplateBaseUrl(_0x3c5546){const _0x15b2dc=a135_0x221592,_0x379c17=readRawConfig(_0x3c5546);if(_0x379c17[_0x15b2dc(0xf0)]&&typeof _0x379c17['template_base_url']===_0x15b2dc(0xfa))return _0x379c17[_0x15b2dc(0xf0)][_0x15b2dc(0xe5)](/\/$/,'');return _0x15b2dc(0x110);}export function readConfigFile(_0x563581){return parseAndNormalizeConfig(_0x563581,'silent');}export function writeConfigFile(_0x479b5b,_0x4310be){const _0x43bac5=a135_0x221592,_0x51cfbd=dirname(_0x479b5b);!existsSync(_0x51cfbd)&&mkdirSync(_0x51cfbd,{'recursive':!![]});const _0x1de834=_0x479b5b+_0x43bac5(0x117);try{writeFileSync(_0x1de834,JSON[_0x43bac5(0x101)](_0x4310be,null,0x2)+'\x0a',{'encoding':_0x43bac5(0xeb),'mode':0x180}),renameSync(_0x1de834,_0x479b5b);}catch(_0x3e4e21){try{unlinkSync(_0x1de834);}catch{}throw _0x3e4e21;}}export function resolveWriteConfigPath(_0xd332de){const _0x3bc588=a135_0x221592,_0x30548f=_0xd332de===_0x3bc588(0x106)?process['cwd']():homedir(),_0x4f52c1=resolveConfigPath(_0x30548f);return _0x4f52c1??resolve(_0x30548f,NEW_CONFIG_NAME);}function buildConfig(_0x2d26d0,_0x6bd0cf){const _0x2833da=a135_0x221592,_0x4d8e77={};if(_0x2d26d0[_0x2833da(0x118)]&&typeof _0x2d26d0[_0x2833da(0x118)]===_0x2833da(0x10f))for(const [_0x143d48,_0x20cdb5]of Object['entries'](_0x2d26d0[_0x2833da(0x118)])){_0x20cdb5&&typeof _0x20cdb5===_0x2833da(0x10f)&&_0x20cdb5[_0x2833da(0x119)]&&(_0x4d8e77[_0x143d48]=_0x20cdb5);}const _0x1377a3=_0x2d26d0[_0x2833da(0xe8)]||undefined,_0xc3d031=Object['keys'](_0x4d8e77)[_0x2833da(0x123)]>0x0,_0x149b85=_0x6bd0cf[_0x2833da(0xe3)]||env('APP')||undefined,_0x387942=_0x149b85||_0x1377a3||undefined,_0x8d8864=_0x6bd0cf[_0x2833da(0x119)]||env(_0x2833da(0xf6))||undefined,_0x16f57d=_0x8d8864?Object[_0x2833da(0x121)](_0x4d8e77)[_0x2833da(0x107)](([,_0x48c5b8])=>_0x48c5b8?.[_0x2833da(0x119)]===_0x8d8864):undefined,_0x54bb34=_0x16f57d?.[0x0],_0x6dd912=_0x16f57d?.[0x1];let _0x2c5466=_0x8d8864?_0x54bb34:_0x387942,_0x26bf7e=_0x2c5466&&_0x4d8e77[_0x2c5466]?_0x4d8e77[_0x2c5466]:undefined;_0x8d8864&&_0x6dd912&&(_0x26bf7e=_0x6dd912);const _0x502cb5=_0x8d8864?_0x6dd912??_0x26bf7e:_0x26bf7e,_0x3a0fd7=_0x149b85||(_0x8d8864?_0x54bb34:undefined),_0xf94f5=_0x8d8864||_0x502cb5?.[_0x2833da(0x119)]||undefined,_0x4ecd94=_0x6bd0cf[_0x2833da(0x114)]||env('ENV')||_0x502cb5?.[_0x2833da(0x114)]||_0x2d26d0['env']||DEFAULT_CONFIG_VALUES['env'],_0x2bce92=_0x502cb5?.['locale']||_0x2d26d0[_0x2833da(0xe6)]||DEFAULT_CONFIG_VALUES['locale'],_0x1c324a=env(_0x2833da(0xe7))||_0x502cb5?.[_0x2833da(0x124)]||_0x2d26d0[_0x2833da(0x124)]||undefined,_0x1d58be=env('ACCESS_KEY')||_0x502cb5?.['accessKey']||_0x2d26d0[_0x2833da(0xe2)]||undefined,_0x28ecdc=_0x6bd0cf[_0x2833da(0x10c)]||env(_0x2833da(0x126))||_0x502cb5?.[_0x2833da(0x10c)]||_0x2d26d0[_0x2833da(0x10c)],_0x4a90df=normalizeLegacyOutputFormat(_0x28ecdc),_0xa8dada=env(_0x2833da(0xe0))||_0x502cb5?.['pageSize']||_0x2d26d0['pageSize'],_0xaee9c8=_0xa8dada?Number(_0xa8dada)||undefined:undefined,_0x51547c=env(_0x2833da(0x109))||env('MAX_RISK')||_0x502cb5?.[_0x2833da(0x115)]||_0x2d26d0[_0x2833da(0x115)]||_0x2d26d0[_0x2833da(0x108)],_0x23f1ea=_0x51547c===_0x2833da(0xe9)||_0x51547c===_0x2833da(0x11a)?_0x51547c:DEFAULT_CONFIG_VALUES[_0x2833da(0x115)],_0xb37bca=env('VERBOSE'),_0x4705f2=_0xb37bca==='1'||_0xb37bca==='true',_0x388c12=_0x502cb5?.[_0x2833da(0xfb)]||_0x2d26d0[_0x2833da(0xfb)]||DEFAULT_CONFIG_VALUES[_0x2833da(0xfb)],_0x1c44ba=isDaily(normalizeEnv(String(_0x4ecd94)))?_0x2833da(0x104):_0x2833da(0x100);return{'appCode':typeof _0xf94f5===_0x2833da(0xfa)&&_0xf94f5[_0x2833da(0xec)]()?_0xf94f5[_0x2833da(0xec)]():undefined,'env':_0x1c44ba,'locale':_0x2bce92,'cookie':_0x1c324a,'accessKey':_0x1d58be,'format':_0x4a90df,'pageSize':_0xaee9c8,'riskLevel':_0x23f1ea,'verbose':_0x4705f2,'apiDir':_0x388c12,'apps':_0x4d8e77,'defaultApp':_0x1377a3,'currentApp':_0xc3d031?_0x2c5466:undefined,'explicitAppName':_0x3a0fd7,'raw':_0x2d26d0};}async function buildAuth(_0x37a1cd){const _0x116c0c=a135_0x221592,{getCookie:_0x4b4592}=await import(_0x116c0c(0xdf)),_0x338b2b=_0x37a1cd['cookie']||_0x4b4592(),_0x2bad9c=_0x338b2b?await getIsSessionValid():![];return{'cookie':_0x338b2b,'isLoggedIn':_0x2bad9c,async 'getOrLogin'(){if(_0x338b2b&&_0x2bad9c)return _0x338b2b;throw CliErrors['authRequired']();}};}export function resolveApiFilePath(_0xcd155,_0x5e7316){const _0x41582e=a135_0x221592,_0x267e23=resolve(process[_0x41582e(0xef)](),_0xcd155),_0x31d3d6=resolve(_0x267e23,_0x41582e(0x11f));if(!_0x5e7316)return _0x31d3d6;const _0x31fad4=readRawConfig(),_0x20fb52=_0x31fad4[_0x41582e(0x118)]&&typeof _0x31fad4[_0x41582e(0x118)]===_0x41582e(0x10f)?_0x31fad4[_0x41582e(0x118)]:{},_0x40b469=Object[_0x41582e(0x121)](_0x20fb52)['find'](([,_0x453f9a])=>_0x453f9a?.[_0x41582e(0x119)]===_0x5e7316);if(!_0x40b469)return _0x31d3d6;const [_0xf5bcda,_0xa33433]=_0x40b469,_0x2f7ed7=typeof _0x31fad4[_0x41582e(0xe8)]===_0x41582e(0xfa)?_0x31fad4[_0x41582e(0xe8)]:undefined;if(_0xa33433?.['apiDir'])return _0x31d3d6;if(_0x2f7ed7&&_0xf5bcda!==_0x2f7ed7)return resolve(_0x267e23,_0xf5bcda+'-api.ts');return _0x31d3d6;}