@lovrabet/rabetbase-cli 2.3.13-beta.2 → 2.3.13-beta.3

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 (263) hide show
  1. package/README.md +1 -1
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/auth/auth-server-ui.js +1 -1
  6. package/lib/auth/auth-server.js +1 -1
  7. package/lib/auth/constant.js +1 -1
  8. package/lib/auth/get-cookie.js +1 -1
  9. package/lib/auth/get-session-user.js +1 -1
  10. package/lib/auth/is-session-valid.js +1 -1
  11. package/lib/auth/login-success-html.js +1 -1
  12. package/lib/auth/logout.js +1 -1
  13. package/lib/cli-flags.js +1 -1
  14. package/lib/cli.js +1 -1
  15. package/lib/commands/api/generate.js +1 -1
  16. package/lib/commands/api/index.js +1 -1
  17. package/lib/commands/api/list.js +1 -1
  18. package/lib/commands/api/pull.js +1 -1
  19. package/lib/commands/api/shared.js +1 -1
  20. package/lib/commands/app/add.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/remote-directory.js +1 -1
  24. package/lib/commands/app/remove.js +1 -1
  25. package/lib/commands/app/shared.js +1 -1
  26. package/lib/commands/app-config/delete.js +1 -1
  27. package/lib/commands/app-config/get.js +1 -1
  28. package/lib/commands/app-config/index.js +1 -1
  29. package/lib/commands/app-config/list.js +1 -1
  30. package/lib/commands/app-config/set.js +1 -1
  31. package/lib/commands/app-config/shared.js +1 -1
  32. package/lib/commands/auth/index.js +1 -1
  33. package/lib/commands/bff/create.js +1 -1
  34. package/lib/commands/bff/delete.js +1 -1
  35. package/lib/commands/bff/detail.js +1 -1
  36. package/lib/commands/bff/index.js +1 -1
  37. package/lib/commands/bff/list.js +1 -1
  38. package/lib/commands/bff/pull.js +1 -1
  39. package/lib/commands/bff/push.js +1 -1
  40. package/lib/commands/bff/status.js +1 -1
  41. package/lib/commands/cli-skill/index.js +1 -1
  42. package/lib/commands/cli-update.js +1 -1
  43. package/lib/commands/codegen/index.js +1 -1
  44. package/lib/commands/codegen/sdk.js +1 -1
  45. package/lib/commands/codegen/sql.js +1 -1
  46. package/lib/commands/common/app-registry.js +1 -1
  47. package/lib/commands/common/app-selector.js +1 -1
  48. package/lib/commands/common/async-task.js +1 -1
  49. package/lib/commands/common/dry-run.js +1 -1
  50. package/lib/commands/common/flags.js +1 -1
  51. package/lib/commands/common/local-file.js +1 -1
  52. package/lib/commands/common/validate.js +1 -1
  53. package/lib/commands/config/get.js +1 -1
  54. package/lib/commands/config/index.js +1 -1
  55. package/lib/commands/config/list.js +1 -1
  56. package/lib/commands/config/set.js +1 -1
  57. package/lib/commands/config/shared.js +1 -1
  58. package/lib/commands/data/filter.js +1 -1
  59. package/lib/commands/data/getOne.js +1 -1
  60. package/lib/commands/data/index.js +1 -1
  61. package/lib/commands/data/shared.js +1 -1
  62. package/lib/commands/dataset/business-group-update.js +1 -1
  63. package/lib/commands/dataset/capability.js +1 -1
  64. package/lib/commands/dataset/delete.js +1 -1
  65. package/lib/commands/dataset/detail.js +1 -1
  66. package/lib/commands/dataset/extend-update.js +1 -1
  67. package/lib/commands/dataset/field-update.js +1 -1
  68. package/lib/commands/dataset/generate.js +1 -1
  69. package/lib/commands/dataset/index.js +1 -1
  70. package/lib/commands/dataset/list.js +1 -1
  71. package/lib/commands/dataset/operations.js +1 -1
  72. package/lib/commands/dataset/relation-audit.js +1 -1
  73. package/lib/commands/dataset/relation-create.js +1 -1
  74. package/lib/commands/dataset/relation-delete.js +1 -1
  75. package/lib/commands/dataset/relation-shared.js +1 -1
  76. package/lib/commands/dataset/relation-update.js +1 -1
  77. package/lib/commands/dataset/relations.js +1 -1
  78. package/lib/commands/dataset/rename.js +1 -1
  79. package/lib/commands/dataset/restore.js +1 -1
  80. package/lib/commands/db/analysis-batching.js +1 -1
  81. package/lib/commands/db/analyze-batch-plan.js +1 -1
  82. package/lib/commands/db/analyze-cancel.js +1 -1
  83. package/lib/commands/db/analyze-start.js +1 -1
  84. package/lib/commands/db/analyze-status.js +1 -1
  85. package/lib/commands/db/create.js +1 -1
  86. package/lib/commands/db/delete.js +1 -1
  87. package/lib/commands/db/detail.js +1 -1
  88. package/lib/commands/db/diff.js +1 -1
  89. package/lib/commands/db/index.js +1 -1
  90. package/lib/commands/db/list.js +1 -1
  91. package/lib/commands/db/shared.js +1 -1
  92. package/lib/commands/db/tables.js +1 -1
  93. package/lib/commands/db/test.js +1 -1
  94. package/lib/commands/db/update.js +1 -1
  95. package/lib/commands/doctor.js +1 -1
  96. package/lib/commands/file/index.js +1 -1
  97. package/lib/commands/init/index.js +1 -1
  98. package/lib/commands/issue/index.js +1 -1
  99. package/lib/commands/issue/nudge.js +1 -1
  100. package/lib/commands/issue/report.js +1 -1
  101. package/lib/commands/issue/shared.js +1 -1
  102. package/lib/commands/logs/index.js +1 -1
  103. package/lib/commands/menu/asset-update.js +1 -0
  104. package/lib/commands/menu/delete.js +1 -1
  105. package/lib/commands/menu/external-link-create.js +1 -1
  106. package/lib/commands/menu/external-link-update.js +1 -0
  107. package/lib/commands/menu/group-create.js +1 -1
  108. package/lib/commands/menu/group-update.js +1 -1
  109. package/lib/commands/menu/index.js +1 -1
  110. package/lib/commands/menu/list.js +1 -1
  111. package/lib/commands/menu/move.js +1 -1
  112. package/lib/commands/menu/regroup-start.js +1 -1
  113. package/lib/commands/menu/shared/compare-table.js +1 -1
  114. package/lib/commands/menu/shared/delete-plan.js +1 -1
  115. package/lib/commands/menu/shared/facts.js +1 -1
  116. package/lib/commands/menu/shared/index.js +1 -1
  117. package/lib/commands/menu/shared/inquirer.js +1 -1
  118. package/lib/commands/menu/shared/local-pages.js +1 -1
  119. package/lib/commands/menu/shared/logic.js +1 -1
  120. package/lib/commands/menu/shared/mutations.js +1 -1
  121. package/lib/commands/menu/shared/service.js +1 -1
  122. package/lib/commands/menu/shared/sync-core.js +1 -1
  123. package/lib/commands/menu/shared/update-core.js +1 -1
  124. package/lib/commands/menu/shared/valid-url.js +1 -1
  125. package/lib/commands/menu/sync.js +1 -1
  126. package/lib/commands/notification/config-list.js +1 -1
  127. package/lib/commands/notification/index.js +1 -1
  128. package/lib/commands/page/generate-start.js +1 -1
  129. package/lib/commands/page/generate-status.js +1 -1
  130. package/lib/commands/page/index.js +1 -1
  131. package/lib/commands/page/pull.js +1 -1
  132. package/lib/commands/page/push.js +1 -1
  133. package/lib/commands/page/relation-audit.js +1 -1
  134. package/lib/commands/page/shared.js +1 -1
  135. package/lib/commands/page/standard-page-status.js +1 -1
  136. package/lib/commands/page/sync.js +1 -1
  137. package/lib/commands/permit/index.js +1 -1
  138. package/lib/commands/permit/page-get.js +1 -1
  139. package/lib/commands/permit/page-set.js +1 -1
  140. package/lib/commands/permit/role-apis-set.js +1 -1
  141. package/lib/commands/permit/role-menus-set.js +1 -1
  142. package/lib/commands/permit/role-menus.js +1 -1
  143. package/lib/commands/permit/shared.js +1 -1
  144. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  145. package/lib/commands/project/create/format-elapsed.js +1 -1
  146. package/lib/commands/project/create/main.js +1 -1
  147. package/lib/commands/project/create/non-interactive.js +1 -1
  148. package/lib/commands/project/create/project-template-path.js +1 -1
  149. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  150. package/lib/commands/project/create/use-format-code.js +1 -1
  151. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  152. package/lib/commands/project/index.js +1 -1
  153. package/lib/commands/project/init.js +1 -1
  154. package/lib/commands/project/upgrade.js +1 -1
  155. package/lib/commands/registry.js +1 -1
  156. package/lib/commands/role/create.js +1 -1
  157. package/lib/commands/role/delete.js +1 -1
  158. package/lib/commands/role/detail.js +1 -1
  159. package/lib/commands/role/index.js +1 -1
  160. package/lib/commands/role/list.js +1 -1
  161. package/lib/commands/role/shared.js +1 -1
  162. package/lib/commands/role/update.js +1 -1
  163. package/lib/commands/role/user-add.js +1 -1
  164. package/lib/commands/role/user-remove.js +1 -1
  165. package/lib/commands/role/user-resolve.js +1 -1
  166. package/lib/commands/run/index.js +1 -1
  167. package/lib/commands/schema.js +1 -1
  168. package/lib/commands/sql/create.js +1 -1
  169. package/lib/commands/sql/delete.js +1 -1
  170. package/lib/commands/sql/detail.js +1 -1
  171. package/lib/commands/sql/exec.js +1 -1
  172. package/lib/commands/sql/index.js +1 -1
  173. package/lib/commands/sql/list.js +1 -1
  174. package/lib/commands/sql/pull.js +1 -1
  175. package/lib/commands/sql/push.js +1 -1
  176. package/lib/commands/sql/save.js +1 -1
  177. package/lib/commands/sql/shared.js +1 -1
  178. package/lib/commands/sql/status.js +1 -1
  179. package/lib/commands/sql/validate.js +1 -1
  180. package/lib/commands/task/index.js +1 -1
  181. package/lib/commands/task/status.js +1 -1
  182. package/lib/commands/workspace/add.js +1 -1
  183. package/lib/commands/workspace/index.js +1 -1
  184. package/lib/commands/workspace/remove.js +1 -1
  185. package/lib/config/schema.js +1 -1
  186. package/lib/constant/cdn.js +1 -1
  187. package/lib/constant/cli.js +1 -1
  188. package/lib/constant/defaults.js +1 -1
  189. package/lib/constant/domain.js +1 -1
  190. package/lib/constant/env.js +1 -1
  191. package/lib/constant/output.js +1 -1
  192. package/lib/constant/paths.js +1 -1
  193. package/lib/constant/risk.js +1 -1
  194. package/lib/context/app-resolver.js +1 -1
  195. package/lib/context/auth-resolver.js +1 -1
  196. package/lib/context/config-loader.js +1 -1
  197. package/lib/context.js +1 -1
  198. package/lib/core/alias-resolver.js +1 -1
  199. package/lib/core/api-client.js +1 -1
  200. package/lib/core/bff/config.js +1 -1
  201. package/lib/core/bff/file-system.js +1 -1
  202. package/lib/core/bff/hash.js +1 -1
  203. package/lib/core/bff/lock.js +1 -1
  204. package/lib/core/bff/utils.js +1 -1
  205. package/lib/core/db-resolver.js +1 -1
  206. package/lib/core/page/file-system.js +1 -1
  207. package/lib/core/page/hash.js +1 -1
  208. package/lib/core/page/lock.js +1 -1
  209. package/lib/core/sql-index-auditor.js +1 -1
  210. package/lib/core/sql-sync/config.js +1 -1
  211. package/lib/core/sql-sync/file-system.js +1 -1
  212. package/lib/core/sql-sync/hash.js +1 -1
  213. package/lib/core/sql-sync/lock.js +1 -1
  214. package/lib/core/sql-sync/utils.js +1 -1
  215. package/lib/core/sql-validator.js +1 -1
  216. package/lib/errors.js +1 -1
  217. package/lib/framework/build-all-flags.js +1 -1
  218. package/lib/framework/error-output.js +1 -1
  219. package/lib/framework/explicit-yes.js +1 -1
  220. package/lib/framework/flags.js +1 -1
  221. package/lib/framework/help.js +1 -1
  222. package/lib/framework/index.js +1 -1
  223. package/lib/framework/output.js +1 -1
  224. package/lib/framework/response.js +1 -1
  225. package/lib/framework/runner-alias.js +1 -1
  226. package/lib/framework/runner.js +1 -1
  227. package/lib/framework/schema-export.js +1 -1
  228. package/lib/framework/types.js +1 -1
  229. package/lib/generated/build-info.js +1 -1
  230. package/lib/help.js +1 -1
  231. package/lib/skills/main.js +1 -1
  232. package/lib/skills/npx-skills-add.js +1 -1
  233. package/lib/telemetry/cli-command-trace.js +1 -1
  234. package/lib/telemetry/cli-help-trace.js +1 -1
  235. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  236. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  237. package/lib/telemetry/send-cli-trace-log.js +1 -1
  238. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  239. package/lib/utils/ai_config.js +1 -1
  240. package/lib/utils/apply-jq-filter.js +1 -1
  241. package/lib/utils/cdn-config.js +1 -1
  242. package/lib/utils/check-sdk-version.js +1 -1
  243. package/lib/utils/cli-version-check.js +1 -1
  244. package/lib/utils/cli-version-policy.js +1 -1
  245. package/lib/utils/config.js +1 -1
  246. package/lib/utils/copy-directory.js +1 -1
  247. package/lib/utils/entity-with-id.js +1 -1
  248. package/lib/utils/file-utils.js +1 -1
  249. package/lib/utils/guides-cdn.js +1 -1
  250. package/lib/utils/http-client.js +1 -1
  251. package/lib/utils/is-non-interactive.js +1 -1
  252. package/lib/utils/logger.js +1 -1
  253. package/lib/utils/params.js +1 -1
  254. package/lib/utils/platform.js +1 -1
  255. package/lib/utils/rules-cdn.js +1 -1
  256. package/lib/utils/sleep.js +1 -1
  257. package/lib/utils/template-replacer.js +1 -1
  258. package/lib/utils/update-notice.js +1 -1
  259. package/lib/utils/version.js +1 -1
  260. package/lib/utils/with-active-cookie.js +1 -1
  261. package/lib/utils/write-cli-side-channel.js +1 -1
  262. package/package.json +1 -1
  263. package/lib/commands/menu/update.js +0 -1
@@ -1 +1 @@
1
- const a173_0x4314f0=a173_0x1450;(function(_0xa9b461,_0x4d18d7){const _0x2e9122=a173_0x1450,_0x13e605=_0xa9b461();while(!![]){try{const _0x35499f=-parseInt(_0x2e9122(0xc4))/0x1*(parseInt(_0x2e9122(0xb7))/0x2)+parseInt(_0x2e9122(0xab))/0x3+-parseInt(_0x2e9122(0xa9))/0x4+-parseInt(_0x2e9122(0xa3))/0x5*(parseInt(_0x2e9122(0xb8))/0x6)+parseInt(_0x2e9122(0xcd))/0x7*(-parseInt(_0x2e9122(0xa6))/0x8)+parseInt(_0x2e9122(0x90))/0x9*(-parseInt(_0x2e9122(0xa1))/0xa)+parseInt(_0x2e9122(0xc9))/0xb*(parseInt(_0x2e9122(0x9f))/0xc);if(_0x35499f===_0x4d18d7)break;else _0x13e605['push'](_0x13e605['shift']());}catch(_0x9e7489){_0x13e605['push'](_0x13e605['shift']());}}}(a173_0x38f2,0x22d13));import{mkdir,readFile,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';function a173_0x1450(_0x461735,_0x5b4264){_0x461735=_0x461735-0x8e;const _0x38f296=a173_0x38f2();let _0x1450bc=_0x38f296[_0x461735];return _0x1450bc;}import{updateSqlQuery}from'../../core/api-client.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';import{getDbName,listDatabases}from'../../core/db-resolver.js';function a173_0x38f2(){const _0x621961=['2265TcgPds','sqlCode','Push\x20complete:\x20','8RVMJeq','Local\x20directory\x20\x22','push','1066580eNSTqx','No\x20database\x20matches\x20local\x20directory\x20\x22','114267OdzxjY','dbId','validation','str','Force\x20push\x20even\x20if\x20local\x20hash\x20matches\x20lock','Multiple\x20local\x20SQL\x20files\x20found\x20for\x20sqlCode\x20','bool','sqlConfig','sql','entries','lockFilePath','startsWith','47666UiETki','72hsTMhI','get','No\x20local\x20SQL\x20files\x20found.','toISOString','\x22\x20matches\x20multiple\x20databases\x20for\x20sqlCode\x20','Would\x20push\x20','boolean','\x20failed','mode','replace','lastSync','force','6upFTHm','hash','appCode','dbName','sqlName','1086118KPscOS','\x20SQL\x20file(s)','utf8','filter','688681uEJFjj','remoteId','filePath','high-risk-write','109773BDHKhc','version','message','trashDir','sqls','relativePath','path','catch','missing\x20remote\x20version;\x20run\x20`rabetbase\x20sql\x20pull`\x20to\x20refresh\x20version\x20info\x20first','isFinite','has','length','sqlcode','sqlRoot','join','84jCEqmX','Local\x20SQL\x20not\x20found:\x20','60CFiqEH','sqlRootDir'];a173_0x38f2=function(){return _0x621961;};return a173_0x38f2();}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';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(_0x4a841c,_0x4e4a3b,_0x7c4f37){const _0x55a685=a173_0x1450,_0x4c2eec=await scanLocalSqlQueries(_0x4a841c),_0x1a4368=new Map();for(const _0x413caa of _0x4c2eec){if(_0x7c4f37&&_0x413caa[_0x55a685(0xa4)]!==_0x7c4f37)continue;const _0x5ead5d=_0x1a4368[_0x55a685(0xb9)](_0x413caa[_0x55a685(0xa4)])??[];_0x5ead5d[_0x55a685(0xa8)](_0x413caa),_0x1a4368['set'](_0x413caa[_0x55a685(0xa4)],_0x5ead5d);}if(_0x7c4f37&&!_0x1a4368[_0x55a685(0x9a)](_0x7c4f37))throw CliErrors[_0x55a685(0xad)](_0x55a685(0xa0)+_0x7c4f37);const _0x5727f5=[];for(const [_0x4fb760,_0xecd05f]of _0x1a4368[_0x55a685(0xb4)]()){if(_0xecd05f['length']===0x1){_0x5727f5[_0x55a685(0xa8)](_0xecd05f[0x0]);continue;}const _0x4ebf15=_0x4e4a3b['sqls'][_0x4fb760],_0x3163b8=_0x4ebf15?.[_0x55a685(0x96)],_0x339d04=_0x3163b8?_0xecd05f[_0x55a685(0xcc)](_0x4ca238=>_0x4ca238[_0x55a685(0x95)]!==_0x3163b8):_0xecd05f;if(_0x4ebf15&&_0x339d04[_0x55a685(0x9b)]===0x1){_0x5727f5[_0x55a685(0xa8)](_0x339d04[0x0]);continue;}throw CliErrors[_0x55a685(0xad)](_0x55a685(0xb0)+_0x4fb760+'.\x20Keep\x20only\x20one\x20file\x20under\x20its\x20sqlCode\x20directory\x20before\x20pushing.');}return _0x5727f5;}export const sqlPush={'service':a173_0x4314f0(0xb3),'command':'push','description':'Push\x20local\x20SQL\x20files\x20to\x20remote','risk':a173_0x4314f0(0x8f),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':a173_0x4314f0(0xc3),'type':a173_0x4314f0(0xbe),'description':a173_0x4314f0(0xaf)}],async 'dryRun'(_0x5bb5c4){const _0x24a137=a173_0x4314f0,_0x1f0f6e=loadSqlProjectConfig(_0x5bb5c4[_0x24a137(0xc6)]),_0x291707=await readSqlLockFile(_0x1f0f6e[_0x24a137(0xb5)]),{appLock:_0x9a6467}=ensureSqlLockScope(_0x291707??createEmptySqlLock(),_0x5bb5c4[_0x24a137(0xc6)],_0x1f0f6e[_0x24a137(0x9d)],_0x24a137(0xa8)),_0x2be6a1=await getTargetSqlQueries(_0x1f0f6e,_0x9a6467,_0x5bb5c4[_0x24a137(0xae)](_0x24a137(0x9c))||undefined),_0x577143=[];for(const _0x134568 of _0x2be6a1){const _0x4fe53e=await computeSqlFileHash(_0x134568[_0x24a137(0x8e)]),_0x3b2f88=_0x9a6467[_0x24a137(0x94)][_0x134568[_0x24a137(0xa4)]],_0x53a341=!!_0x3b2f88&&(_0x3b2f88['path']!==_0x134568[_0x24a137(0x95)]||!!_0x134568[_0x24a137(0xc8)]&&_0x3b2f88[_0x24a137(0xc8)]!==_0x134568[_0x24a137(0xc8)]);if(!_0x5bb5c4[_0x24a137(0xb1)]('force')&&_0x3b2f88&&_0x3b2f88['hash']===_0x4fe53e&&!_0x53a341)continue;_0x577143['push'](_0x134568[_0x24a137(0xa4)]);}return{'method':'POST','url':'/smartapi/custom/updateUserCustomSql','body':{'sqlCodes':_0x577143,'appCode':_0x5bb5c4[_0x24a137(0xc6)]},'description':_0x24a137(0xbd)+_0x577143[_0x24a137(0x9b)]+_0x24a137(0xca)};},async 'execute'(_0x2babe8){const _0x3cfd98=a173_0x4314f0,_0x17569d=loadSqlProjectConfig(_0x2babe8[_0x3cfd98(0xc6)]),_0x48868d=await readSqlLockFile(_0x17569d['lockFilePath']),{lockData:_0x464e41,appLock:_0x462efb}=ensureSqlLockScope(_0x48868d??createEmptySqlLock(),_0x2babe8[_0x3cfd98(0xc6)],_0x17569d[_0x3cfd98(0x9d)],'push'),_0xc19ad3=await getTargetSqlQueries(_0x17569d,_0x462efb,_0x2babe8[_0x3cfd98(0xae)](_0x3cfd98(0x9c))||undefined);if(_0xc19ad3[_0x3cfd98(0x9b)]===0x0)return{'ok':!![],'data':{'pushed':[],'skipped':[],'failed':[]},'message':_0x3cfd98(0xba)};const _0x544c25=[],_0x4e86c0=[],_0xc58632=[];for(const _0x49593a of _0xc19ad3){const _0x1cdc39=_0x462efb[_0x3cfd98(0x94)][_0x49593a['sqlCode']];if(!_0x1cdc39){_0xc58632[_0x3cfd98(0xa8)]({'sqlCode':_0x49593a[_0x3cfd98(0xa4)],'error':'local\x20SQL\x20is\x20not\x20tracked\x20by\x20sql.lock.json;\x20use\x20`rabetbase\x20sql\x20create`\x20or\x20`rabetbase\x20sql\x20pull`\x20first'});continue;}try{const _0x15aba1=await computeSqlFileHash(_0x49593a['filePath']),_0x2d90ea=_0x1cdc39[_0x3cfd98(0x96)]!==_0x49593a[_0x3cfd98(0x95)]||!!_0x49593a[_0x3cfd98(0xc8)]&&_0x1cdc39[_0x3cfd98(0xc8)]!==_0x49593a[_0x3cfd98(0xc8)];if(!_0x2babe8['bool'](_0x3cfd98(0xc3))&&_0x1cdc39[_0x3cfd98(0xc5)]===_0x15aba1&&!_0x2d90ea){_0x4e86c0['push']({'sqlCode':_0x49593a[_0x3cfd98(0xa4)],'reason':'unchanged'});continue;}if(_0x1cdc39[_0x3cfd98(0x91)]==null){_0xc58632[_0x3cfd98(0xa8)]({'sqlCode':_0x49593a[_0x3cfd98(0xa4)],'error':_0x3cfd98(0x98)});continue;}const _0x671f10=await readFile(_0x49593a['filePath'],_0x3cfd98(0xcb)),_0xcc449a=stripLocalSqlMetadata(_0x671f10,_0x49593a['mode']),_0x130bae=_0x49593a[_0x3cfd98(0xc8)]||_0x1cdc39[_0x3cfd98(0xc8)],_0x1e6fa6=await resolveTargetDbBinding(_0x2babe8['appCode'],_0x49593a,_0x1cdc39),_0x288168=await updateSqlQuery({'id':_0x1cdc39[_0x3cfd98(0xce)],'appCode':_0x2babe8['appCode'],'sqlCode':_0x49593a[_0x3cfd98(0xa4)],'sqlName':_0x130bae,'dbId':_0x1e6fa6['dbId'],'version':_0x1cdc39[_0x3cfd98(0x91)],'sqlContent':_0xcc449a,'sqlConfig':_0x1cdc39[_0x3cfd98(0xb2)]??undefined}),_0x470741=_0x288168[_0x3cfd98(0xac)]?await getDbName(_0x2babe8[_0x3cfd98(0xc6)],Number(_0x288168[_0x3cfd98(0xac)]))[_0x3cfd98(0x97)](()=>_0x1e6fa6[_0x3cfd98(0xc7)]):_0x1e6fa6[_0x3cfd98(0xc7)];_0x462efb[_0x3cfd98(0x94)][_0x49593a[_0x3cfd98(0xa4)]]={...buildSqlLockEntry(_0x288168,_0xcc449a,_0x15aba1,{'dbName':_0x470741}),'path':_0x49593a['relativePath'],'mode':_0x1cdc39[_0x3cfd98(0xc0)]},await archivePreviousSqlFileIfNeeded(_0x17569d,_0x1cdc39[_0x3cfd98(0x96)],_0x49593a[_0x3cfd98(0x95)]),_0x544c25['push']({'sqlCode':_0x49593a[_0x3cfd98(0xa4)],'remoteId':_0x1cdc39[_0x3cfd98(0xce)]});}catch(_0x534f34){_0xc58632[_0x3cfd98(0xa8)]({'sqlCode':_0x49593a['sqlCode'],'error':_0x534f34 instanceof Error?_0x534f34[_0x3cfd98(0x92)]:String(_0x534f34)});}}return _0x462efb[_0x3cfd98(0xc2)]=new Date()[_0x3cfd98(0xbb)](),await writeSqlLockFile(_0x17569d['lockFilePath'],_0x464e41),{'ok':_0xc58632[_0x3cfd98(0x9b)]===0x0,'data':{'pushed':_0x544c25,'skipped':_0x4e86c0,'failed':_0xc58632},'message':_0x3cfd98(0xa5)+_0x544c25[_0x3cfd98(0x9b)]+'\x20pushed,\x20'+_0x4e86c0[_0x3cfd98(0x9b)]+'\x20skipped,\x20'+_0xc58632['length']+_0x3cfd98(0xbf)};}};async function archivePreviousSqlFileIfNeeded(_0x69436a,_0x3350c2,_0x5c79f8){const _0x1fb4fd=a173_0x4314f0;if(!_0x3350c2||_0x3350c2===_0x5c79f8)return;const _0x3c5d91=join(_0x69436a['sqlRootDir'],_0x3350c2);if(!await fileExists(_0x3c5d91))return;const _0x2e2585=await moveToTrash(_0x69436a['projectRoot'],_0x69436a[_0x1fb4fd(0x93)],_0x3c5d91);await cleanupEmptyDirectories(dirname(_0x3c5d91),_0x69436a[_0x1fb4fd(0xa2)]),void _0x2e2585;}async function moveToTrash(_0x1ec126,_0x5e1fd8,_0x1a0a1b){const _0x468aee=a173_0x4314f0,_0x10ea94=new Date()[_0x468aee(0xbb)]()[_0x468aee(0xc1)](/[:.]/g,'-'),_0xf6b133=relative(_0x1ec126,_0x1a0a1b),_0x482611=join(_0x5e1fd8,_0x10ea94,_0xf6b133);return await mkdir(dirname(_0x482611),{'recursive':!![]}),await rename(_0x1a0a1b,_0x482611),_0x482611;}async function cleanupEmptyDirectories(_0x2c5ca5,_0x1f84c5){const _0x537fff=a173_0x4314f0;let _0xe684c5=resolve(_0x2c5ca5);const _0x15f571=resolve(_0x1f84c5);while(_0xe684c5[_0x537fff(0xb6)](''+_0x15f571+sep)||_0xe684c5===_0x15f571){if(_0xe684c5===_0x15f571)return;try{const _0x1fdd4b=await readdir(_0xe684c5);if(_0x1fdd4b['length']>0x0)return;await rmdir(_0xe684c5);}catch{return;}_0xe684c5=dirname(_0xe684c5);}}async function resolveTargetDbBinding(_0x530022,_0x56621d,_0x5824e0){const _0x568241=a173_0x4314f0,_0x3b5bcf=_0x56621d['dbDirectory'];if(!_0x3b5bcf)return{'dbId':_0x5824e0[_0x568241(0xac)],'dbName':_0x5824e0['dbName']};const _0x3f2d2b=buildDbDirectoryName(_0x5824e0[_0x568241(0xc7)],_0x5824e0[_0x568241(0xac)]);if(_0x3b5bcf===_0x3f2d2b)return{'dbId':_0x5824e0[_0x568241(0xac)],'dbName':_0x5824e0[_0x568241(0xc7)]};const _0x4e1ad7=parseExplicitDbDirectory(_0x3b5bcf);if(_0x4e1ad7!=null)return{'dbId':_0x4e1ad7,'dbName':await getDbName(_0x530022,_0x4e1ad7)['catch'](()=>undefined)};const _0x1b7844=await listDatabases(_0x530022),_0x11f95e=_0x1b7844[_0x568241(0xcc)](_0x445741=>buildDbDirectoryName(_0x445741[_0x568241(0xc7)],_0x445741['dbId'])===_0x3b5bcf);if(_0x11f95e[_0x568241(0x9b)]===0x1)return{'dbId':_0x11f95e[0x0][_0x568241(0xac)],'dbName':_0x11f95e[0x0][_0x568241(0xc7)]};if(_0x11f95e[_0x568241(0x9b)]===0x0)throw CliErrors['validation'](_0x568241(0xaa)+_0x3b5bcf+'\x22\x20for\x20sqlCode\x20'+_0x56621d['sqlCode']+'.');const _0x3aaf57=_0x11f95e['map'](_0x174014=>_0x174014[_0x568241(0xc7)]+'\x20('+_0x174014[_0x568241(0xac)]+')')[_0x568241(0x9e)](',\x20');throw CliErrors['validation'](_0x568241(0xa7)+_0x3b5bcf+_0x568241(0xbc)+_0x56621d[_0x568241(0xa4)]+':\x20'+_0x3aaf57);}function parseExplicitDbDirectory(_0x439e7c){const _0x2bc95c=a173_0x4314f0,_0xd9e1b0=/^db-(\d+)$/['exec'](_0x439e7c);if(!_0xd9e1b0)return null;const _0xe1e86c=Number(_0xd9e1b0[0x1]);return Number[_0x2bc95c(0x99)](_0xe1e86c)&&_0xe1e86c>0x0?_0xe1e86c:null;}
1
+ const a174_0xe7f959=a174_0x3eae;(function(_0x543f68,_0x444120){const _0x131212=a174_0x3eae,_0x9c7c8d=_0x543f68();while(!![]){try{const _0x2b50ae=-parseInt(_0x131212(0x183))/0x1*(-parseInt(_0x131212(0x181))/0x2)+parseInt(_0x131212(0x199))/0x3*(parseInt(_0x131212(0x1a7))/0x4)+parseInt(_0x131212(0x1a6))/0x5+-parseInt(_0x131212(0x1a1))/0x6+parseInt(_0x131212(0x1ab))/0x7*(parseInt(_0x131212(0x1aa))/0x8)+parseInt(_0x131212(0x18d))/0x9*(parseInt(_0x131212(0x189))/0xa)+parseInt(_0x131212(0x186))/0xb*(-parseInt(_0x131212(0x185))/0xc);if(_0x2b50ae===_0x444120)break;else _0x9c7c8d['push'](_0x9c7c8d['shift']());}catch(_0x3503c9){_0x9c7c8d['push'](_0x9c7c8d['shift']());}}}(a174_0x34d6,0x25a01));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';function a174_0x3eae(_0x715a06,_0x5a99a0){_0x715a06=_0x715a06-0x16f;const _0x34d61e=a174_0x34d6();let _0x3eae15=_0x34d61e[_0x715a06];return _0x3eae15;}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 a174_0x34d6(){const _0x2a0236=['10mTrsfj','Local\x20SQL\x20not\x20found:\x20','has','map','1539819waJdrT','Multiple\x20local\x20SQL\x20files\x20found\x20for\x20sqlCode\x20','relativePath','sqlRootDir','missing\x20remote\x20version;\x20run\x20`rabetbase\x20sql\x20pull`\x20to\x20refresh\x20version\x20info\x20first','str','\x20skipped,\x20','lastSync','validation','No\x20local\x20SQL\x20files\x20found.','filePath','Push\x20complete:\x20','3TTDXzB','sqlRoot','No\x20database\x20matches\x20local\x20directory\x20\x22','lockFilePath','filter','force','version','sqlcode','422340DhOADI','sqls','length','boolean','Force\x20push\x20even\x20if\x20local\x20hash\x20matches\x20lock','1521005DFKuyx','146612WbkFFt','Push\x20local\x20SQL\x20files\x20to\x20remote','exec','392cmUpDw','28959bBYdfN','POST','startsWith','trashDir','bool','unchanged','remoteId','dbDirectory','replace','sqlName','local\x20SQL\x20is\x20not\x20tracked\x20by\x20sql.lock.json;\x20use\x20`rabetbase\x20sql\x20create`\x20or\x20`rabetbase\x20sql\x20pull`\x20first','get','\x22\x20for\x20sqlCode\x20','/smartapi/custom/updateUserCustomSql','push','sqlCode','dbName','appCode','path','mode','Would\x20push\x20','sqlConfig','dbId','\x20pushed,\x20','\x20SQL\x20file(s)','\x20failed','toISOString','Local\x20directory\x20\x22','136522hffuJl','set','3Teslib','projectRoot','2779752NhLTxZ','33ndNuTf','entries','catch'];a174_0x34d6=function(){return _0x2a0236;};return a174_0x34d6();}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(_0x3db009,_0x2a995b,_0x2f7f57){const _0x19f6fa=a174_0x3eae,_0x245c63=await scanLocalSqlQueries(_0x3db009),_0xb4da8f=new Map();for(const _0x4ee655 of _0x245c63){if(_0x2f7f57&&_0x4ee655['sqlCode']!==_0x2f7f57)continue;const _0x5c5f8a=_0xb4da8f[_0x19f6fa(0x170)](_0x4ee655[_0x19f6fa(0x174)])??[];_0x5c5f8a[_0x19f6fa(0x173)](_0x4ee655),_0xb4da8f[_0x19f6fa(0x182)](_0x4ee655[_0x19f6fa(0x174)],_0x5c5f8a);}if(_0x2f7f57&&!_0xb4da8f[_0x19f6fa(0x18b)](_0x2f7f57))throw CliErrors[_0x19f6fa(0x195)](_0x19f6fa(0x18a)+_0x2f7f57);const _0x45dde4=[];for(const [_0x2469b4,_0x42abe7]of _0xb4da8f[_0x19f6fa(0x187)]()){if(_0x42abe7[_0x19f6fa(0x1a3)]===0x1){_0x45dde4['push'](_0x42abe7[0x0]);continue;}const _0x386f07=_0x2a995b[_0x19f6fa(0x1a2)][_0x2469b4],_0x14584a=_0x386f07?.[_0x19f6fa(0x177)],_0x5177ae=_0x14584a?_0x42abe7[_0x19f6fa(0x19d)](_0x427d5c=>_0x427d5c['relativePath']!==_0x14584a):_0x42abe7;if(_0x386f07&&_0x5177ae[_0x19f6fa(0x1a3)]===0x1){_0x45dde4[_0x19f6fa(0x173)](_0x5177ae[0x0]);continue;}throw CliErrors[_0x19f6fa(0x195)](_0x19f6fa(0x18e)+_0x2469b4+'.\x20Keep\x20only\x20one\x20file\x20under\x20its\x20sqlCode\x20directory\x20before\x20pushing.');}return _0x45dde4;}export const sqlPush={'service':'sql','command':'push','description':a174_0xe7f959(0x1a8),'risk':'high-risk-write','flags':[SQLCODE_FLAG_OPTIONAL,{'name':a174_0xe7f959(0x19e),'type':a174_0xe7f959(0x1a4),'description':a174_0xe7f959(0x1a5)}],async 'dryRun'(_0x50edbf){const _0x17faa1=a174_0xe7f959,_0x55aa15=loadSqlProjectConfig(_0x50edbf[_0x17faa1(0x176)]),_0x46f209=await readSqlLockFile(_0x55aa15[_0x17faa1(0x19c)]),{appLock:_0x3b18f3}=ensureSqlLockScope(_0x46f209??createEmptySqlLock(),_0x50edbf[_0x17faa1(0x176)],_0x55aa15[_0x17faa1(0x19a)],'push'),_0x2afc3b=await getTargetSqlQueries(_0x55aa15,_0x3b18f3,_0x50edbf[_0x17faa1(0x192)]('sqlcode')||undefined),_0x476331=[];for(const _0x1ab07d of _0x2afc3b){const _0x595d25=await computeSqlFileHash(_0x1ab07d[_0x17faa1(0x197)]),_0x55b933=_0x3b18f3['sqls'][_0x1ab07d[_0x17faa1(0x174)]],_0x269334=!!_0x55b933&&(_0x55b933[_0x17faa1(0x177)]!==_0x1ab07d[_0x17faa1(0x18f)]||!!_0x1ab07d[_0x17faa1(0x1b4)]&&_0x55b933[_0x17faa1(0x1b4)]!==_0x1ab07d[_0x17faa1(0x1b4)]);if(!_0x50edbf[_0x17faa1(0x1af)]('force')&&_0x55b933&&_0x55b933['hash']===_0x595d25&&!_0x269334)continue;_0x476331[_0x17faa1(0x173)](_0x1ab07d[_0x17faa1(0x174)]);}return{'method':_0x17faa1(0x1ac),'url':_0x17faa1(0x172),'body':{'sqlCodes':_0x476331,'appCode':_0x50edbf['appCode']},'description':_0x17faa1(0x179)+_0x476331[_0x17faa1(0x1a3)]+_0x17faa1(0x17d)};},async 'execute'(_0x4aff68){const _0x127875=a174_0xe7f959,_0x4fb347=loadSqlProjectConfig(_0x4aff68['appCode']),_0xc40571=await readSqlLockFile(_0x4fb347['lockFilePath']),{lockData:_0x1aa6b1,appLock:_0x504726}=ensureSqlLockScope(_0xc40571??createEmptySqlLock(),_0x4aff68[_0x127875(0x176)],_0x4fb347[_0x127875(0x19a)],'push'),_0x454290=await getTargetSqlQueries(_0x4fb347,_0x504726,_0x4aff68['str'](_0x127875(0x1a0))||undefined);if(_0x454290[_0x127875(0x1a3)]===0x0)return{'ok':!![],'data':{'pushed':[],'skipped':[],'failed':[]},'message':_0x127875(0x196)};const _0x29857c=[],_0x450343=[],_0x16777a=[];for(const _0x2e41f6 of _0x454290){const _0x1b9169=_0x504726[_0x127875(0x1a2)][_0x2e41f6[_0x127875(0x174)]];if(!_0x1b9169){_0x16777a['push']({'sqlCode':_0x2e41f6[_0x127875(0x174)],'error':_0x127875(0x16f)});continue;}try{const _0x5ef864=await computeSqlFileHash(_0x2e41f6['filePath']),_0x4b7e2a=_0x1b9169[_0x127875(0x177)]!==_0x2e41f6[_0x127875(0x18f)]||!!_0x2e41f6[_0x127875(0x1b4)]&&_0x1b9169[_0x127875(0x1b4)]!==_0x2e41f6[_0x127875(0x1b4)];if(!_0x4aff68[_0x127875(0x1af)](_0x127875(0x19e))&&_0x1b9169['hash']===_0x5ef864&&!_0x4b7e2a){_0x450343[_0x127875(0x173)]({'sqlCode':_0x2e41f6[_0x127875(0x174)],'reason':_0x127875(0x1b0)});continue;}if(_0x1b9169[_0x127875(0x19f)]==null){_0x16777a[_0x127875(0x173)]({'sqlCode':_0x2e41f6[_0x127875(0x174)],'error':_0x127875(0x191)});continue;}const _0x27fff0=await readFile(_0x2e41f6[_0x127875(0x197)],'utf8'),_0x42bee6=stripLocalSqlMetadata(_0x27fff0,_0x2e41f6[_0x127875(0x178)]),_0x5e20a5=_0x2e41f6[_0x127875(0x1b4)]||_0x1b9169['sqlName'],_0x48363e=await resolveTargetDbBinding(_0x4aff68[_0x127875(0x176)],_0x2e41f6,_0x1b9169),_0x1d1132=await updateSqlQuery({'id':_0x1b9169['remoteId'],'appCode':_0x4aff68[_0x127875(0x176)],'sqlCode':_0x2e41f6['sqlCode'],'sqlName':_0x5e20a5,'dbId':_0x48363e[_0x127875(0x17b)],'version':_0x1b9169[_0x127875(0x19f)],'sqlContent':_0x42bee6,'sqlConfig':_0x1b9169[_0x127875(0x17a)]??undefined}),_0x3a2c3c=_0x1d1132[_0x127875(0x17b)]?await getDbName(_0x4aff68[_0x127875(0x176)],Number(_0x1d1132[_0x127875(0x17b)]))[_0x127875(0x188)](()=>_0x48363e[_0x127875(0x175)]):_0x48363e[_0x127875(0x175)];_0x504726[_0x127875(0x1a2)][_0x2e41f6['sqlCode']]={...buildSqlLockEntry(_0x1d1132,_0x42bee6,_0x5ef864,{'dbName':_0x3a2c3c}),'path':_0x2e41f6[_0x127875(0x18f)],'mode':_0x1b9169[_0x127875(0x178)]},await archivePreviousSqlFileIfNeeded(_0x4fb347,_0x1b9169[_0x127875(0x177)],_0x2e41f6[_0x127875(0x18f)]),_0x29857c[_0x127875(0x173)]({'sqlCode':_0x2e41f6['sqlCode'],'remoteId':_0x1b9169[_0x127875(0x1b1)]});}catch(_0x58f2b2){_0x16777a['push']({'sqlCode':_0x2e41f6[_0x127875(0x174)],'error':_0x58f2b2 instanceof Error?_0x58f2b2['message']:String(_0x58f2b2)});}}return _0x504726[_0x127875(0x194)]=new Date()[_0x127875(0x17f)](),await writeSqlLockFile(_0x4fb347[_0x127875(0x19c)],_0x1aa6b1),{'ok':_0x16777a['length']===0x0,'data':{'pushed':_0x29857c,'skipped':_0x450343,'failed':_0x16777a},'message':_0x127875(0x198)+_0x29857c[_0x127875(0x1a3)]+_0x127875(0x17c)+_0x450343[_0x127875(0x1a3)]+_0x127875(0x193)+_0x16777a[_0x127875(0x1a3)]+_0x127875(0x17e)};}};async function archivePreviousSqlFileIfNeeded(_0x585b27,_0x4f58dc,_0x42c92b){const _0x1c5076=a174_0xe7f959;if(!_0x4f58dc||_0x4f58dc===_0x42c92b)return;const _0x220bc8=join(_0x585b27[_0x1c5076(0x190)],_0x4f58dc);if(!await fileExists(_0x220bc8))return;const _0x4fd7b5=await moveToTrash(_0x585b27[_0x1c5076(0x184)],_0x585b27[_0x1c5076(0x1ae)],_0x220bc8);await cleanupEmptyDirectories(dirname(_0x220bc8),_0x585b27[_0x1c5076(0x190)]),void _0x4fd7b5;}async function moveToTrash(_0x14b4ef,_0x268426,_0x310f0a){const _0x5b90fc=a174_0xe7f959,_0x346581=new Date()[_0x5b90fc(0x17f)]()[_0x5b90fc(0x1b3)](/[:.]/g,'-'),_0x498a23=relative(_0x14b4ef,_0x310f0a),_0x1daa1b=join(_0x268426,_0x346581,_0x498a23);return await mkdir(dirname(_0x1daa1b),{'recursive':!![]}),await rename(_0x310f0a,_0x1daa1b),_0x1daa1b;}async function cleanupEmptyDirectories(_0x55b477,_0x5e6126){const _0x42e22e=a174_0xe7f959;let _0x2edc09=resolve(_0x55b477);const _0x44f65f=resolve(_0x5e6126);while(_0x2edc09[_0x42e22e(0x1ad)](''+_0x44f65f+sep)||_0x2edc09===_0x44f65f){if(_0x2edc09===_0x44f65f)return;try{const _0x32a791=await readdir(_0x2edc09);if(_0x32a791[_0x42e22e(0x1a3)]>0x0)return;await rmdir(_0x2edc09);}catch{return;}_0x2edc09=dirname(_0x2edc09);}}async function resolveTargetDbBinding(_0x146e69,_0x2a0379,_0x5bf052){const _0x2085e2=a174_0xe7f959,_0x368577=_0x2a0379[_0x2085e2(0x1b2)];if(!_0x368577)return{'dbId':_0x5bf052[_0x2085e2(0x17b)],'dbName':_0x5bf052[_0x2085e2(0x175)]};const _0xce1b1=buildDbDirectoryName(_0x5bf052[_0x2085e2(0x175)],_0x5bf052[_0x2085e2(0x17b)]);if(_0x368577===_0xce1b1)return{'dbId':_0x5bf052[_0x2085e2(0x17b)],'dbName':_0x5bf052['dbName']};const _0x295742=parseExplicitDbDirectory(_0x368577);if(_0x295742!=null)return{'dbId':_0x295742,'dbName':await getDbName(_0x146e69,_0x295742)[_0x2085e2(0x188)](()=>undefined)};const _0x41596e=await listDatabases(_0x146e69),_0x254fd2=_0x41596e['filter'](_0x469da5=>buildDbDirectoryName(_0x469da5[_0x2085e2(0x175)],_0x469da5[_0x2085e2(0x17b)])===_0x368577);if(_0x254fd2[_0x2085e2(0x1a3)]===0x1)return{'dbId':_0x254fd2[0x0][_0x2085e2(0x17b)],'dbName':_0x254fd2[0x0][_0x2085e2(0x175)]};if(_0x254fd2['length']===0x0)throw CliErrors['validation'](_0x2085e2(0x19b)+_0x368577+_0x2085e2(0x171)+_0x2a0379[_0x2085e2(0x174)]+'.');const _0x4a5cd9=_0x254fd2[_0x2085e2(0x18c)](_0x37f82a=>_0x37f82a[_0x2085e2(0x175)]+'\x20('+_0x37f82a[_0x2085e2(0x17b)]+')')['join'](',\x20');throw CliErrors[_0x2085e2(0x195)](_0x2085e2(0x180)+_0x368577+'\x22\x20matches\x20multiple\x20databases\x20for\x20sqlCode\x20'+_0x2a0379[_0x2085e2(0x174)]+':\x20'+_0x4a5cd9);}function parseExplicitDbDirectory(_0x5cc311){const _0x4644fe=a174_0xe7f959,_0x349f32=/^db-(\d+)$/[_0x4644fe(0x1a9)](_0x5cc311);if(!_0x349f32)return null;const _0x4e9973=Number(_0x349f32[0x1]);return Number['isFinite'](_0x4e9973)&&_0x4e9973>0x0?_0x4e9973:null;}
@@ -1 +1 @@
1
- function a174_0x33c5(){const _0x10dc17=['6988192egPmwW','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`.','54703FTQvOz','540rmcllA','save','2944455bFmHlB','Create\x20new\x20SQL\x20with\x20`rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml`.','file','SQL\x20query\x20display\x20name','sqlname','5236sUvXDs','validation','4AyFEEY','write','10483587ryFrbT','Deprecated:\x20use\x20sql\x20create\x20to\x20create\x20and\x20sql\x20push\x20to\x20update','Query\x20description','349eZxfuu','string','182395uoDewk','14SfsEhm','2091018opdLhi','join','Path\x20to\x20the\x20SQL\x20file'];a174_0x33c5=function(){return _0x10dc17;};return a174_0x33c5();}const a174_0xe7e1fb=a174_0x114c;(function(_0x2e4449,_0x1da81a){const _0x2ddf3b=a174_0x114c,_0x5ad2ef=_0x2e4449();while(!![]){try{const _0x10820a=-parseInt(_0x2ddf3b(0xd9))/0x1*(parseInt(_0x2ddf3b(0xd2))/0x2)+-parseInt(_0x2ddf3b(0xcd))/0x3+-parseInt(_0x2ddf3b(0xd4))/0x4*(-parseInt(_0x2ddf3b(0xdb))/0x5)+parseInt(_0x2ddf3b(0xdd))/0x6*(parseInt(_0x2ddf3b(0xdc))/0x7)+parseInt(_0x2ddf3b(0xe0))/0x8+parseInt(_0x2ddf3b(0xd6))/0x9+parseInt(_0x2ddf3b(0xcb))/0xa*(-parseInt(_0x2ddf3b(0xca))/0xb);if(_0x10820a===_0x1da81a)break;else _0x5ad2ef['push'](_0x5ad2ef['shift']());}catch(_0x1a04ce){_0x5ad2ef['push'](_0x5ad2ef['shift']());}}}(a174_0x33c5,0x9478f));import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a174_0x114c(_0x50c0f0,_0x47eb04){_0x50c0f0=_0x50c0f0-0xc9;const _0x33c53f=a174_0x33c5();let _0x114c08=_0x33c53f[_0x50c0f0];return _0x114c08;}const SQL_SAVE_DEPRECATED_HINT=['`rabetbase\x20sql\x20save`\x20has\x20been\x20deprecated.',a174_0xe7e1fb(0xce),a174_0xe7e1fb(0xc9)][a174_0xe7e1fb(0xde)]('\x0a');export const sqlSave={'service':'sql','command':a174_0xe7e1fb(0xcc),'description':a174_0xe7e1fb(0xd7),'risk':a174_0xe7e1fb(0xd5),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a174_0xe7e1fb(0xcf),'type':a174_0xe7e1fb(0xda),'required':!![],'description':a174_0xe7e1fb(0xdf)},SQLCODE_FLAG_OPTIONAL,{'name':a174_0xe7e1fb(0xd1),'type':a174_0xe7e1fb(0xda),'description':a174_0xe7e1fb(0xd0)},{'name':'db','type':a174_0xe7e1fb(0xda),'description':'Target\x20database\x20—\x20accepts\x20a\x20numeric\x20ID\x20or\x20database\x20name\x20(e.g.\x20ecommerce_db)'},{'name':'description','type':a174_0xe7e1fb(0xda),'description':a174_0xe7e1fb(0xd8)}],async 'validate'(){const _0x552186=a174_0xe7e1fb;throw CliErrors[_0x552186(0xd3)](SQL_SAVE_DEPRECATED_HINT);},async 'execute'(){throw CliErrors['validation'](SQL_SAVE_DEPRECATED_HINT);}};
1
+ const a175_0x5b4306=a175_0x413d;(function(_0x5a9d1c,_0x3e0351){const _0x16366e=a175_0x413d,_0xda6a08=_0x5a9d1c();while(!![]){try{const _0x5653c2=-parseInt(_0x16366e(0x104))/0x1*(-parseInt(_0x16366e(0x101))/0x2)+-parseInt(_0x16366e(0xfa))/0x3*(parseInt(_0x16366e(0xf9))/0x4)+parseInt(_0x16366e(0x100))/0x5+-parseInt(_0x16366e(0xf6))/0x6*(parseInt(_0x16366e(0xfb))/0x7)+parseInt(_0x16366e(0x102))/0x8*(parseInt(_0x16366e(0x103))/0x9)+parseInt(_0x16366e(0x105))/0xa+-parseInt(_0x16366e(0x108))/0xb;if(_0x5653c2===_0x3e0351)break;else _0xda6a08['push'](_0xda6a08['shift']());}catch(_0x397f82){_0xda6a08['push'](_0xda6a08['shift']());}}}(a175_0x2b10,0xa939d));function a175_0x413d(_0x3dc1ba,_0x1cb718){_0x3dc1ba=_0x3dc1ba-0xf6;const _0x2b1011=a175_0x2b10();let _0x413dd3=_0x2b1011[_0x3dc1ba];return _0x413dd3;}import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const SQL_SAVE_DEPRECATED_HINT=['`rabetbase\x20sql\x20save`\x20has\x20been\x20deprecated.',a175_0x5b4306(0xfe),a175_0x5b4306(0xfd)]['join']('\x0a');export const sqlSave={'service':'sql','command':a175_0x5b4306(0x10b),'description':a175_0x5b4306(0xfc),'risk':a175_0x5b4306(0xf8),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a175_0x5b4306(0xf7),'type':'string','required':!![],'description':a175_0x5b4306(0x106)},SQLCODE_FLAG_OPTIONAL,{'name':a175_0x5b4306(0x109),'type':a175_0x5b4306(0x10a),'description':a175_0x5b4306(0x10c)},{'name':'db','type':'string','description':'Target\x20database\x20—\x20accepts\x20a\x20numeric\x20ID\x20or\x20database\x20name\x20(e.g.\x20ecommerce_db)'},{'name':a175_0x5b4306(0x107),'type':a175_0x5b4306(0x10a),'description':'Query\x20description'}],async 'validate'(){throw CliErrors['validation'](SQL_SAVE_DEPRECATED_HINT);},async 'execute'(){const _0x3ba90e=a175_0x5b4306;throw CliErrors[_0x3ba90e(0xff)](SQL_SAVE_DEPRECATED_HINT);}};function a175_0x2b10(){const _0x7b4b9b=['178759xamCyT','Deprecated:\x20use\x20sql\x20create\x20to\x20create\x20and\x20sql\x20push\x20to\x20update','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`.','Create\x20new\x20SQL\x20with\x20`rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml`.','validation','710970ejVEcJ','130bSIqzV','4399192SOiuvf','18wCnNCq','13149gWvBiv','12159930xSdTlG','Path\x20to\x20the\x20SQL\x20file','description','4985805rzcqfl','sqlname','string','save','SQL\x20query\x20display\x20name','234IFVWdv','file','write','425572xfcqvV','33mPrklP'];a175_0x2b10=function(){return _0x7b4b9b;};return a175_0x2b10();}
@@ -1 +1 @@
1
- const a175_0x3440ac=a175_0x3cd9;(function(_0x5ebb57,_0x1f1414){const _0xf268a6=a175_0x3cd9,_0x455f72=_0x5ebb57();while(!![]){try{const _0x561af8=-parseInt(_0xf268a6(0x16b))/0x1+parseInt(_0xf268a6(0x17e))/0x2*(-parseInt(_0xf268a6(0x168))/0x3)+-parseInt(_0xf268a6(0x185))/0x4+-parseInt(_0xf268a6(0x17d))/0x5+-parseInt(_0xf268a6(0x16c))/0x6+parseInt(_0xf268a6(0x15d))/0x7+parseInt(_0xf268a6(0x173))/0x8;if(_0x561af8===_0x1f1414)break;else _0x455f72['push'](_0x455f72['shift']());}catch(_0x55868f){_0x455f72['push'](_0x455f72['shift']());}}}(a175_0x4312,0xe4f9f));import{createInterface}from'node:readline';import{join}from'node:path';function a175_0x4312(){const _0x1a7a31=['stderr','423513UyonqN','10703526KOPTGT','dbId','trim','sqls','split','filter','version','53097016czDoLu','close','fromEntries','sqlRoot','apps','--\x20@lovrabet.','sqlCode','sqlContent','join','includes','3702745EYbRNQ','1235246RzwXMm','dbName','yes','lastSync','length','\x20[y/N]\x20','endsWith','7058864Oplgpk','sqlName','mode','1740935jBSzGn','entries','toLowerCase','question','map','.rabetbase/sql','test','syncedAt','<!--\x20@lovrabet.','trimStart','\x20-->','6TwKluR','description'];a175_0x4312=function(){return _0x1a7a31;};return a175_0x4312();}import{buildDefaultSqlFileName,buildSqlRelativePath,detectSqlMode}from'../../core/sql-sync/utils.js';export const SQL_LOCAL_REL_DIR=a175_0x3440ac(0x162);export function buildSqlLockEntry(_0x968f9c,_0x5b6c4b,_0x74b7e9,_0x459a2f){const _0x118bb2=a175_0x3440ac,_0x427797=detectSqlMode(_0x5b6c4b);return{'path':buildSqlRelativePath(_0x968f9c['sqlCode'],_0x968f9c[_0x118bb2(0x186)],_0x459a2f?.[_0x118bb2(0x17f)],_0x427797,_0x968f9c[_0x118bb2(0x16d)]),'hash':_0x74b7e9,'remoteId':_0x968f9c['id'],'version':_0x968f9c[_0x118bb2(0x172)],'dbId':Number(_0x968f9c[_0x118bb2(0x16d)]),'dbName':_0x459a2f?.[_0x118bb2(0x17f)],'sqlName':_0x968f9c[_0x118bb2(0x186)],'sqlConfig':_0x968f9c['sqlConfig']??undefined,'mode':_0x427797};}export function cloneSqlLockData(_0xb05c15){const _0x14f3d6=a175_0x3440ac;return{'apps':Object[_0x14f3d6(0x175)](Object[_0x14f3d6(0x15e)](_0xb05c15['apps'])[_0x14f3d6(0x161)](([_0x47e22a,_0x1dc154])=>[_0x47e22a,{'sqlRoot':_0x1dc154[_0x14f3d6(0x176)],'lastSync':_0x1dc154[_0x14f3d6(0x181)],'sqls':{..._0x1dc154[_0x14f3d6(0x16f)]}}]))};}export function ensureRemoteSqlContent(_0x2e7698){const _0x260918=a175_0x3440ac;return _0x2e7698[_0x260918(0x17a)]??'';}export function buildLocalSqlFileContent(_0x3fd735,_0x91bab5,_0x1d6779){const _0x38b449=a175_0x3440ac,_0x4e3b40=_0x1d6779?.[_0x38b449(0x15c)]??detectSqlMode(_0x91bab5),_0x46a86d=stripLocalSqlMetadata(_0x91bab5,_0x4e3b40)['trim'](),_0x2e603d=[...buildMetadataHeaderLines({'sqlCode':_0x3fd735[_0x38b449(0x179)],'sqlName':_0x3fd735[_0x38b449(0x186)],'dbId':_0x3fd735[_0x38b449(0x16d)],'dbName':_0x1d6779?.[_0x38b449(0x17f)],'mode':_0x4e3b40,'syncedAt':_0x1d6779?.[_0x38b449(0x164)],'description':_0x1d6779?.[_0x38b449(0x169)]},_0x4e3b40),'',_0x46a86d],_0x434fc7=_0x2e603d[_0x38b449(0x17b)]('\x0a');return _0x434fc7[_0x38b449(0x184)]('\x0a')?_0x434fc7:_0x434fc7+'\x0a';}export function stripLocalSqlMetadata(_0x2e525d,_0x376e62){const _0x24a97f=a175_0x3440ac,_0x2f58c9=_0x2e525d['replace'](/\r\n/g,'\x0a')[_0x24a97f(0x170)]('\x0a'),_0xf61cb=[];let _0x55a1f7=0x0;if(_0x376e62==='mybatisXml')while(_0x55a1f7<_0x2f58c9[_0x24a97f(0x182)]){const _0x59f9ea=_0x2f58c9[_0x55a1f7]??'';if(/^\s*<!--\s*@lovrabet\./[_0x24a97f(0x163)](_0x59f9ea)){_0x55a1f7++;continue;}if(_0x59f9ea['trim']()===''&&_0x55a1f7>0x0){_0x55a1f7++;continue;}break;}else while(_0x55a1f7<_0x2f58c9[_0x24a97f(0x182)]){const _0x17ef1a=_0x2f58c9[_0x55a1f7]??'';if(/^\s*--\s*@lovrabet\./['test'](_0x17ef1a)){_0x55a1f7++;continue;}if(_0x17ef1a[_0x24a97f(0x16e)]()===''&&_0x55a1f7>0x0){_0x55a1f7++;continue;}break;}for(;_0x55a1f7<_0x2f58c9['length'];_0x55a1f7++){_0xf61cb['push'](_0x2f58c9[_0x55a1f7]);}return _0xf61cb[_0x24a97f(0x17b)]('\x0a')[_0x24a97f(0x166)]();}export function resolveSqlMode(_0x484bd3,_0x2e8b83){const _0x4cdb55=a175_0x3440ac;if(_0x2e8b83?.[_0x4cdb55(0x15c)])return _0x2e8b83[_0x4cdb55(0x15c)];return detectSqlMode(_0x484bd3);}export function resolveSqlFileName(_0x168bc5,_0x52c909,_0x1c0024){const _0x5cf74f=a175_0x3440ac;if(_0x1c0024?.['path'])return _0x1c0024['path'];if(_0x1c0024?.[_0x5cf74f(0x186)]||_0x1c0024?.['dbName'])return buildSqlRelativePath(_0x168bc5,_0x1c0024?.[_0x5cf74f(0x186)],_0x1c0024?.['dbName'],resolveSqlMode(_0x52c909,_0x1c0024),_0x1c0024?.[_0x5cf74f(0x16d)]);return buildDefaultSqlFileName(_0x168bc5,resolveSqlMode(_0x52c909,_0x1c0024));}function a175_0x3cd9(_0x35d059,_0x1bff0f){_0x35d059=_0x35d059-0x15c;const _0x43127f=a175_0x4312();let _0x3cd962=_0x43127f[_0x35d059];return _0x3cd962;}export function resolveSqlLocalDir(_0x2a2f01,_0x15aeba){return join(_0x2a2f01,SQL_LOCAL_REL_DIR,_0x15aeba);}export async function confirmForceOverwrite(_0x735454){const _0x4097f7=a175_0x3440ac,_0x41864e=createInterface({'input':process['stdin'],'output':process[_0x4097f7(0x16a)]}),_0x305f2a=await new Promise(_0x2aa461=>{const _0x305ece=_0x4097f7;_0x41864e[_0x305ece(0x160)](_0x735454+_0x305ece(0x183),_0x2aa461);});return _0x41864e[_0x4097f7(0x174)](),['y',_0x4097f7(0x180)][_0x4097f7(0x17c)](_0x305f2a[_0x4097f7(0x16e)]()[_0x4097f7(0x15f)]());}export function findSqlLockScope(_0x39d010,_0x8e4e7f){const _0x364df=a175_0x3440ac;return _0x39d010[_0x364df(0x177)][_0x8e4e7f];}function buildMetadataHeaderLines(_0x1bd599,_0x3ceffc){const _0x2edf7e=a175_0x3440ac,_0x5a2f23=[[_0x2edf7e(0x179),_0x1bd599[_0x2edf7e(0x179)]],['sqlName',_0x1bd599['sqlName']],[_0x2edf7e(0x16d),_0x1bd599[_0x2edf7e(0x16d)]],[_0x2edf7e(0x17f),_0x1bd599[_0x2edf7e(0x17f)]],[_0x2edf7e(0x15c),_0x1bd599[_0x2edf7e(0x15c)]],[_0x2edf7e(0x164),_0x1bd599[_0x2edf7e(0x164)]],['description',_0x1bd599[_0x2edf7e(0x169)]]];if(_0x3ceffc==='mybatisXml')return _0x5a2f23[_0x2edf7e(0x171)](([,_0x35796a])=>_0x35796a!==undefined&&_0x35796a!==null&&String(_0x35796a)[_0x2edf7e(0x16e)]()!=='')[_0x2edf7e(0x161)](([_0x39dd31,_0x727a34])=>_0x2edf7e(0x165)+_0x39dd31+':\x20'+String(_0x727a34)+_0x2edf7e(0x167));return _0x5a2f23[_0x2edf7e(0x171)](([,_0x2d1e59])=>_0x2d1e59!==undefined&&_0x2d1e59!==null&&String(_0x2d1e59)[_0x2edf7e(0x16e)]()!=='')[_0x2edf7e(0x161)](([_0x7b2e88,_0x518c08])=>_0x2edf7e(0x178)+_0x7b2e88+':\x20'+String(_0x518c08));}
1
+ const a176_0x558c03=a176_0x5b4a;(function(_0x3a1d22,_0xec3e31){const _0x2260a2=a176_0x5b4a,_0x118cc4=_0x3a1d22();while(!![]){try{const _0x5abddd=parseInt(_0x2260a2(0xb0))/0x1+-parseInt(_0x2260a2(0xd0))/0x2+-parseInt(_0x2260a2(0xcc))/0x3+-parseInt(_0x2260a2(0xcb))/0x4+parseInt(_0x2260a2(0xc8))/0x5+parseInt(_0x2260a2(0xcd))/0x6+parseInt(_0x2260a2(0xb5))/0x7;if(_0x5abddd===_0xec3e31)break;else _0x118cc4['push'](_0x118cc4['shift']());}catch(_0x1aaa46){_0x118cc4['push'](_0x118cc4['shift']());}}}(a176_0x583e,0x7e6f1));import{createInterface}from'node:readline';import{join}from'node:path';import{buildDefaultSqlFileName,buildSqlRelativePath,detectSqlMode}from'../../core/sql-sync/utils.js';function a176_0x5b4a(_0x5cc118,_0x4b7bf7){_0x5cc118=_0x5cc118-0xa6;const _0x583ecf=a176_0x583e();let _0x5b4ad8=_0x583ecf[_0x5cc118];return _0x5b4ad8;}export const SQL_LOCAL_REL_DIR=a176_0x558c03(0xce);export function buildSqlLockEntry(_0x1ed70a,_0x2a86ce,_0xcee3a2,_0x3ab615){const _0x2494cc=a176_0x558c03,_0x229e77=detectSqlMode(_0x2a86ce);return{'path':buildSqlRelativePath(_0x1ed70a[_0x2494cc(0xaf)],_0x1ed70a[_0x2494cc(0xba)],_0x3ab615?.['dbName'],_0x229e77,_0x1ed70a[_0x2494cc(0xa9)]),'hash':_0xcee3a2,'remoteId':_0x1ed70a['id'],'version':_0x1ed70a[_0x2494cc(0xbe)],'dbId':Number(_0x1ed70a[_0x2494cc(0xa9)]),'dbName':_0x3ab615?.['dbName'],'sqlName':_0x1ed70a[_0x2494cc(0xba)],'sqlConfig':_0x1ed70a[_0x2494cc(0xc2)]??undefined,'mode':_0x229e77};}export function cloneSqlLockData(_0x41bdc2){const _0x488fba=a176_0x558c03;return{'apps':Object[_0x488fba(0xa6)](Object[_0x488fba(0xd1)](_0x41bdc2[_0x488fba(0xa8)])[_0x488fba(0xc7)](([_0x781662,_0x2c1022])=>[_0x781662,{'sqlRoot':_0x2c1022[_0x488fba(0xc5)],'lastSync':_0x2c1022['lastSync'],'sqls':{..._0x2c1022[_0x488fba(0xc9)]}}]))};}export function ensureRemoteSqlContent(_0x417024){const _0x5f1036=a176_0x558c03;return _0x417024[_0x5f1036(0xb3)]??'';}export function buildLocalSqlFileContent(_0x4f7f53,_0x4592d5,_0x3440d5){const _0x3a12c7=a176_0x558c03,_0x4a3f08=_0x3440d5?.['mode']??detectSqlMode(_0x4592d5),_0x35cee3=stripLocalSqlMetadata(_0x4592d5,_0x4a3f08)['trim'](),_0x27cf87=[...buildMetadataHeaderLines({'sqlCode':_0x4f7f53[_0x3a12c7(0xaf)],'sqlName':_0x4f7f53[_0x3a12c7(0xba)],'dbId':_0x4f7f53[_0x3a12c7(0xa9)],'dbName':_0x3440d5?.['dbName'],'mode':_0x4a3f08,'syncedAt':_0x3440d5?.[_0x3a12c7(0xa7)],'description':_0x3440d5?.[_0x3a12c7(0xcf)]},_0x4a3f08),'',_0x35cee3],_0x93739a=_0x27cf87[_0x3a12c7(0xbd)]('\x0a');return _0x93739a['endsWith']('\x0a')?_0x93739a:_0x93739a+'\x0a';}export function stripLocalSqlMetadata(_0x508bba,_0xae7d59){const _0x55e620=a176_0x558c03,_0x3c212c=_0x508bba[_0x55e620(0xad)](/\r\n/g,'\x0a')[_0x55e620(0xb7)]('\x0a'),_0x5b7437=[];let _0x17d057=0x0;if(_0xae7d59===_0x55e620(0xc6))while(_0x17d057<_0x3c212c[_0x55e620(0xb6)]){const _0x5a2976=_0x3c212c[_0x17d057]??'';if(/^\s*<!--\s*@lovrabet\./[_0x55e620(0xc1)](_0x5a2976)){_0x17d057++;continue;}if(_0x5a2976['trim']()===''&&_0x17d057>0x0){_0x17d057++;continue;}break;}else while(_0x17d057<_0x3c212c[_0x55e620(0xb6)]){const _0xeb8362=_0x3c212c[_0x17d057]??'';if(/^\s*--\s*@lovrabet\./[_0x55e620(0xc1)](_0xeb8362)){_0x17d057++;continue;}if(_0xeb8362[_0x55e620(0xb1)]()===''&&_0x17d057>0x0){_0x17d057++;continue;}break;}for(;_0x17d057<_0x3c212c['length'];_0x17d057++){_0x5b7437[_0x55e620(0xbf)](_0x3c212c[_0x17d057]);}return _0x5b7437[_0x55e620(0xbd)]('\x0a')[_0x55e620(0xab)]();}export function resolveSqlMode(_0x338d95,_0x233a3d){const _0x4cc5ae=a176_0x558c03;if(_0x233a3d?.['mode'])return _0x233a3d[_0x4cc5ae(0xae)];return detectSqlMode(_0x338d95);}export function resolveSqlFileName(_0x27050c,_0x3c7e2f,_0x4b24ae){const _0x359a06=a176_0x558c03;if(_0x4b24ae?.['path'])return _0x4b24ae[_0x359a06(0xb9)];if(_0x4b24ae?.[_0x359a06(0xba)]||_0x4b24ae?.[_0x359a06(0xc4)])return buildSqlRelativePath(_0x27050c,_0x4b24ae?.[_0x359a06(0xba)],_0x4b24ae?.['dbName'],resolveSqlMode(_0x3c7e2f,_0x4b24ae),_0x4b24ae?.[_0x359a06(0xa9)]);return buildDefaultSqlFileName(_0x27050c,resolveSqlMode(_0x3c7e2f,_0x4b24ae));}export function resolveSqlLocalDir(_0x305dd4,_0x278935){return join(_0x305dd4,SQL_LOCAL_REL_DIR,_0x278935);}export async function confirmForceOverwrite(_0x3368cc){const _0x2dc61c=a176_0x558c03,_0x969e54=createInterface({'input':process[_0x2dc61c(0xbc)],'output':process['stderr']}),_0x25c9c9=await new Promise(_0x18af12=>{const _0xdff40f=_0x2dc61c;_0x969e54[_0xdff40f(0xac)](_0x3368cc+_0xdff40f(0xb2),_0x18af12);});return _0x969e54[_0x2dc61c(0xc0)](),['y',_0x2dc61c(0xca)][_0x2dc61c(0xc3)](_0x25c9c9[_0x2dc61c(0xb1)]()[_0x2dc61c(0xbb)]());}function a176_0x583e(){const _0x4f919c=['fromEntries','syncedAt','apps','dbId','filter','trimStart','question','replace','mode','sqlCode','792943lzFoOP','trim','\x20[y/N]\x20','sqlContent','\x20-->','1651104zvRoWp','length','split','--\x20@lovrabet.','path','sqlName','toLowerCase','stdin','join','version','push','close','test','sqlConfig','includes','dbName','sqlRoot','mybatisXml','map','2182195SkhAOx','sqls','yes','3042704pyoPGU','2474832ZhjmMS','5113710ilquRr','.rabetbase/sql','description','428092JhJkRW','entries'];a176_0x583e=function(){return _0x4f919c;};return a176_0x583e();}export function findSqlLockScope(_0x177286,_0x3b6d29){const _0x1189c8=a176_0x558c03;return _0x177286[_0x1189c8(0xa8)][_0x3b6d29];}function buildMetadataHeaderLines(_0x106641,_0x1c09f3){const _0x5235ae=a176_0x558c03,_0xb92bc3=[[_0x5235ae(0xaf),_0x106641[_0x5235ae(0xaf)]],[_0x5235ae(0xba),_0x106641[_0x5235ae(0xba)]],[_0x5235ae(0xa9),_0x106641[_0x5235ae(0xa9)]],[_0x5235ae(0xc4),_0x106641[_0x5235ae(0xc4)]],[_0x5235ae(0xae),_0x106641[_0x5235ae(0xae)]],[_0x5235ae(0xa7),_0x106641['syncedAt']],['description',_0x106641[_0x5235ae(0xcf)]]];if(_0x1c09f3===_0x5235ae(0xc6))return _0xb92bc3[_0x5235ae(0xaa)](([,_0x22cb6a])=>_0x22cb6a!==undefined&&_0x22cb6a!==null&&String(_0x22cb6a)[_0x5235ae(0xb1)]()!=='')[_0x5235ae(0xc7)](([_0x30ce8b,_0x2d62e3])=>'<!--\x20@lovrabet.'+_0x30ce8b+':\x20'+String(_0x2d62e3)+_0x5235ae(0xb4));return _0xb92bc3[_0x5235ae(0xaa)](([,_0x371c33])=>_0x371c33!==undefined&&_0x371c33!==null&&String(_0x371c33)[_0x5235ae(0xb1)]()!=='')[_0x5235ae(0xc7)](([_0x36c62c,_0x1ea85e])=>_0x5235ae(0xb8)+_0x36c62c+':\x20'+String(_0x1ea85e));}
@@ -1 +1 @@
1
- const a176_0x2e13d3=a176_0x5a5d;(function(_0xcf69e6,_0x615036){const _0x21f5a8=a176_0x5a5d,_0x35899b=_0xcf69e6();while(!![]){try{const _0x17c326=parseInt(_0x21f5a8(0x11c))/0x1+parseInt(_0x21f5a8(0x107))/0x2+-parseInt(_0x21f5a8(0x116))/0x3*(parseInt(_0x21f5a8(0x118))/0x4)+-parseInt(_0x21f5a8(0x111))/0x5+-parseInt(_0x21f5a8(0x10e))/0x6+-parseInt(_0x21f5a8(0x11d))/0x7*(-parseInt(_0x21f5a8(0x11a))/0x8)+-parseInt(_0x21f5a8(0xff))/0x9;if(_0x17c326===_0x615036)break;else _0x35899b['push'](_0x35899b['shift']());}catch(_0x4c6807){_0x35899b['push'](_0x35899b['shift']());}}}(a176_0x4ded,0xe0e1c));import{listSqlQueries}from'../../core/api-client.js';function a176_0x4ded(){const _0x122a13=['status','lockKey','sqlRoot','hash','has','2871056mLaeTH','\x20added,\x20','paging','totalCount','sql','path','keys','70452keaFtr','map','tableData','5099015jHOOJY','push','boolean','remote','length','1009284gDnZku','Also\x20check\x20for\x20remote-only\x20SQL\x20queries\x20not\x20present\x20locally','8xfgpOA','appCode','7541384tHjLFY','lockFilePath','758940vhKImw','7OjDTQg','\x20modified,\x20','sqls','bool','relativePath','sqlCode','sqlName','4604616hOzlDU','All\x20SQL\x20queries\x20are\x20in\x20sync.','\x20missing,\x20'];a176_0x4ded=function(){return _0x122a13;};return a176_0x4ded();}import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';import{scanLocalSqlQueries}from'../../core/sql-sync/file-system.js';function a176_0x5a5d(_0x2c5360,_0x3fc373){_0x2c5360=_0x2c5360-0xf9;const _0x4dedd7=a176_0x4ded();let _0x5a5d74=_0x4dedd7[_0x2c5360];return _0x5a5d74;}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(_0x1345e6){const _0x4e11c0=a176_0x5a5d,_0xc1cd41=[];let _0x33b164=0x1;while(!![]){const _0x4a0457=await listSqlQueries(_0x1345e6,{'currentPage':_0x33b164,'pageSize':PAGE_SIZE}),_0x5a9809=_0x4a0457[_0x4e11c0(0x110)]??[];_0xc1cd41[_0x4e11c0(0x112)](..._0x5a9809[_0x4e11c0(0x10f)](_0x47d424=>_0x47d424[_0x4e11c0(0xfd)]));if(_0x5a9809[_0x4e11c0(0x115)]===0x0)break;const _0x29787b=_0x4a0457[_0x4e11c0(0x109)]?.[_0x4e11c0(0x10a)];if(_0x29787b!=null?_0xc1cd41[_0x4e11c0(0x115)]>=_0x29787b:_0x5a9809[_0x4e11c0(0x115)]<PAGE_SIZE)break;_0x33b164++;}return _0xc1cd41;}export const sqlStatus={'service':a176_0x2e13d3(0x10b),'command':a176_0x2e13d3(0x102),'description':'Check\x20local\x20SQL\x20sync\x20status\x20against\x20lock\x20file','risk':'read','flags':[{'name':a176_0x2e13d3(0x114),'type':a176_0x2e13d3(0x113),'description':a176_0x2e13d3(0x117)}],async 'execute'(_0xc00c69){const _0x21414f=a176_0x2e13d3,_0x210ff6=loadSqlProjectConfig(_0xc00c69['appCode']),_0xe466db=await readSqlLockFile(_0x210ff6[_0x21414f(0x11b)]),{appLock:_0x400815}=ensureSqlLockScope(_0xe466db??createEmptySqlLock(),_0x210ff6[_0x21414f(0x119)],_0x210ff6[_0x21414f(0x104)],_0x21414f(0x102)),_0x3257e9=await scanLocalSqlQueries(_0x210ff6),_0x3ba6de=[],_0x15095d=[],_0x3354f0=[],_0x15fe0a=[],_0x56f638=new Set(_0x3257e9[_0x21414f(0x10f)](_0x4efbe2=>_0x4efbe2[_0x21414f(0x103)]));for(const _0x52b90a of _0x3257e9){const _0xd2fef2=await computeSqlFileHash(_0x52b90a['filePath']),_0x4022fb=_0x400815['sqls'][_0x52b90a[_0x21414f(0x103)]],_0x269d6d=!!_0x4022fb&&_0x4022fb[_0x21414f(0x10c)]!==_0x52b90a[_0x21414f(0xfc)],_0x184f91=!!_0x4022fb&&!!_0x52b90a['sqlName']&&_0x4022fb[_0x21414f(0xfe)]!==_0x52b90a[_0x21414f(0xfe)];if(!_0x4022fb)_0x3ba6de[_0x21414f(0x112)](_0x52b90a['lockKey']);else _0x4022fb[_0x21414f(0x105)]!==_0xd2fef2||_0x269d6d||_0x184f91?_0x15095d['push'](_0x52b90a['lockKey']):_0x3354f0[_0x21414f(0x112)](_0x52b90a[_0x21414f(0x103)]);}for(const _0x3b2dc3 of Object[_0x21414f(0x10d)](_0x400815[_0x21414f(0xfa)])){!_0x56f638['has'](_0x3b2dc3)&&_0x15fe0a['push'](_0x3b2dc3);}const _0x5107c1=[];if(_0xc00c69[_0x21414f(0xfb)](_0x21414f(0x114))){const _0x558e92=await fetchAllSqlCodes(_0xc00c69[_0x21414f(0x119)]);for(const _0x38a397 of _0x558e92){!_0x56f638[_0x21414f(0x106)](_0x38a397)&&!_0x400815['sqls'][_0x38a397]&&_0x5107c1[_0x21414f(0x112)](_0x38a397);}}const _0x51b68f=_0x3ba6de[_0x21414f(0x115)]===0x0&&_0x15095d[_0x21414f(0x115)]===0x0&&_0x15fe0a[_0x21414f(0x115)]===0x0&&_0x5107c1[_0x21414f(0x115)]===0x0;return{'ok':!![],'data':{'added':_0x3ba6de,'modified':_0x15095d,'missing':_0x15fe0a,'unchanged':_0x3354f0,'remoteOnly':_0x5107c1},'message':_0x51b68f?_0x21414f(0x100):_0x3ba6de['length']+_0x21414f(0x108)+_0x15095d['length']+_0x21414f(0xf9)+_0x15fe0a[_0x21414f(0x115)]+_0x21414f(0x101)+_0x3354f0['length']+'\x20unchanged'+(_0x5107c1[_0x21414f(0x115)]>0x0?',\x20'+_0x5107c1[_0x21414f(0x115)]+'\x20remote-only':'')};}};
1
+ function a177_0x5c96(){const _0x3f46ce=['lockFilePath','paging','6872310eLqYDT','push','lockKey','204937sFDdKq','length','Check\x20local\x20SQL\x20sync\x20status\x20against\x20lock\x20file','sqlCode','All\x20SQL\x20queries\x20are\x20in\x20sync.','sqlRoot','822VJcvwQ','path','bool','11gvFuyC','read','6910CHJrQd','\x20missing,\x20','sqls','267001rIsPPQ','appCode','8xEKtfQ','has','477GTRXho','Also\x20check\x20for\x20remote-only\x20SQL\x20queries\x20not\x20present\x20locally','sqlName','keys','\x20modified,\x20','792560GFPjam','hash','filePath','remote','\x20remote-only','4210SKKJFV','map','status','relativePath','tableData','1212363drPpwP','sql'];a177_0x5c96=function(){return _0x3f46ce;};return a177_0x5c96();}const a177_0x47cc4d=a177_0x3570;(function(_0x16bf17,_0x5df043){const _0x5e3a45=a177_0x3570,_0x6640b2=_0x16bf17();while(!![]){try{const _0x46d9ec=parseInt(_0x5e3a45(0x1fa))/0x1+-parseInt(_0x5e3a45(0x1dd))/0x2*(parseInt(_0x5e3a45(0x1e4))/0x3)+parseInt(_0x5e3a45(0x1e9))/0x4+parseInt(_0x5e3a45(0x1ee))/0x5*(-parseInt(_0x5e3a45(0x1d8))/0x6)+parseInt(_0x5e3a45(0x1e0))/0x7+parseInt(_0x5e3a45(0x1e2))/0x8*(-parseInt(_0x5e3a45(0x1f3))/0x9)+-parseInt(_0x5e3a45(0x1f7))/0xa*(-parseInt(_0x5e3a45(0x1db))/0xb);if(_0x46d9ec===_0x5df043)break;else _0x6640b2['push'](_0x6640b2['shift']());}catch(_0x3d7a11){_0x6640b2['push'](_0x6640b2['shift']());}}}(a177_0x5c96,0x50555));import{listSqlQueries}from'../../core/api-client.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';function a177_0x3570(_0x4bec28,_0x3e1586){_0x4bec28=_0x4bec28-0x1d8;const _0x5c96dc=a177_0x5c96();let _0x3570fd=_0x5c96dc[_0x4bec28];return _0x3570fd;}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(_0x4ea496){const _0x9b73c1=a177_0x3570,_0x5050c6=[];let _0x5a33a3=0x1;while(!![]){const _0x138c50=await listSqlQueries(_0x4ea496,{'currentPage':_0x5a33a3,'pageSize':PAGE_SIZE}),_0x271d2b=_0x138c50[_0x9b73c1(0x1f2)]??[];_0x5050c6[_0x9b73c1(0x1f8)](..._0x271d2b[_0x9b73c1(0x1ef)](_0x529c8d=>_0x529c8d[_0x9b73c1(0x1fd)]));if(_0x271d2b['length']===0x0)break;const _0x278c28=_0x138c50[_0x9b73c1(0x1f6)]?.['totalCount'];if(_0x278c28!=null?_0x5050c6[_0x9b73c1(0x1fb)]>=_0x278c28:_0x271d2b[_0x9b73c1(0x1fb)]<PAGE_SIZE)break;_0x5a33a3++;}return _0x5050c6;}export const sqlStatus={'service':a177_0x47cc4d(0x1f4),'command':a177_0x47cc4d(0x1f0),'description':a177_0x47cc4d(0x1fc),'risk':a177_0x47cc4d(0x1dc),'flags':[{'name':a177_0x47cc4d(0x1ec),'type':'boolean','description':a177_0x47cc4d(0x1e5)}],async 'execute'(_0x37d9cf){const _0x50dcc1=a177_0x47cc4d,_0x58a250=loadSqlProjectConfig(_0x37d9cf[_0x50dcc1(0x1e1)]),_0x558050=await readSqlLockFile(_0x58a250[_0x50dcc1(0x1f5)]),{appLock:_0x1526b0}=ensureSqlLockScope(_0x558050??createEmptySqlLock(),_0x58a250['appCode'],_0x58a250[_0x50dcc1(0x1ff)],'status'),_0x459b18=await scanLocalSqlQueries(_0x58a250),_0x59003d=[],_0x311b42=[],_0x3ece9b=[],_0x496501=[],_0x354193=new Set(_0x459b18[_0x50dcc1(0x1ef)](_0xac5880=>_0xac5880[_0x50dcc1(0x1f9)]));for(const _0x3e03ae of _0x459b18){const _0x3b73bf=await computeSqlFileHash(_0x3e03ae[_0x50dcc1(0x1eb)]),_0x1bb415=_0x1526b0[_0x50dcc1(0x1df)][_0x3e03ae[_0x50dcc1(0x1f9)]],_0x5ce8b6=!!_0x1bb415&&_0x1bb415[_0x50dcc1(0x1d9)]!==_0x3e03ae[_0x50dcc1(0x1f1)],_0xc72d8f=!!_0x1bb415&&!!_0x3e03ae[_0x50dcc1(0x1e6)]&&_0x1bb415[_0x50dcc1(0x1e6)]!==_0x3e03ae[_0x50dcc1(0x1e6)];if(!_0x1bb415)_0x59003d[_0x50dcc1(0x1f8)](_0x3e03ae[_0x50dcc1(0x1f9)]);else _0x1bb415[_0x50dcc1(0x1ea)]!==_0x3b73bf||_0x5ce8b6||_0xc72d8f?_0x311b42['push'](_0x3e03ae[_0x50dcc1(0x1f9)]):_0x3ece9b[_0x50dcc1(0x1f8)](_0x3e03ae[_0x50dcc1(0x1f9)]);}for(const _0x14c1a0 of Object[_0x50dcc1(0x1e7)](_0x1526b0[_0x50dcc1(0x1df)])){!_0x354193[_0x50dcc1(0x1e3)](_0x14c1a0)&&_0x496501['push'](_0x14c1a0);}const _0x5beb04=[];if(_0x37d9cf[_0x50dcc1(0x1da)](_0x50dcc1(0x1ec))){const _0x5eef3c=await fetchAllSqlCodes(_0x37d9cf['appCode']);for(const _0x157f57 of _0x5eef3c){!_0x354193[_0x50dcc1(0x1e3)](_0x157f57)&&!_0x1526b0[_0x50dcc1(0x1df)][_0x157f57]&&_0x5beb04[_0x50dcc1(0x1f8)](_0x157f57);}}const _0x43cf32=_0x59003d[_0x50dcc1(0x1fb)]===0x0&&_0x311b42[_0x50dcc1(0x1fb)]===0x0&&_0x496501['length']===0x0&&_0x5beb04['length']===0x0;return{'ok':!![],'data':{'added':_0x59003d,'modified':_0x311b42,'missing':_0x496501,'unchanged':_0x3ece9b,'remoteOnly':_0x5beb04},'message':_0x43cf32?_0x50dcc1(0x1fe):_0x59003d[_0x50dcc1(0x1fb)]+'\x20added,\x20'+_0x311b42[_0x50dcc1(0x1fb)]+_0x50dcc1(0x1e8)+_0x496501[_0x50dcc1(0x1fb)]+_0x50dcc1(0x1de)+_0x3ece9b[_0x50dcc1(0x1fb)]+'\x20unchanged'+(_0x5beb04['length']>0x0?',\x20'+_0x5beb04[_0x50dcc1(0x1fb)]+_0x50dcc1(0x1ed):'')};}};
@@ -1 +1 @@
1
- function a177_0x1225(_0x397d25,_0x5dfb2e){_0x397d25=_0x397d25-0x1d5;const _0x158f55=a177_0x158f();let _0x12258d=_0x158f55[_0x397d25];return _0x12258d;}const a177_0xc64d2a=a177_0x1225;(function(_0x49aaca,_0x1345e0){const _0x78745=a177_0x1225,_0x32b2de=_0x49aaca();while(!![]){try{const _0x51d72b=-parseInt(_0x78745(0x1f0))/0x1*(-parseInt(_0x78745(0x216))/0x2)+-parseInt(_0x78745(0x1f7))/0x3*(parseInt(_0x78745(0x202))/0x4)+-parseInt(_0x78745(0x1f2))/0x5*(parseInt(_0x78745(0x1d6))/0x6)+parseInt(_0x78745(0x1e5))/0x7+parseInt(_0x78745(0x1d7))/0x8*(parseInt(_0x78745(0x20e))/0x9)+parseInt(_0x78745(0x1e4))/0xa*(-parseInt(_0x78745(0x1f8))/0xb)+-parseInt(_0x78745(0x1dd))/0xc;if(_0x51d72b===_0x1345e0)break;else _0x32b2de['push'](_0x32b2de['shift']());}catch(_0x576898){_0x32b2de['push'](_0x32b2de['shift']());}}}(a177_0x158f,0xcf0a2));import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';import{validateSql}from'../../core/sql-validator.js';import{auditSqlJoinIndexes}from'../../core/sql-index-auditor.js';import{getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{assertDatasetIsDbTableBacked,filterDbTableBackedDatasets}from'../../commands/dataset/capability.js';function a177_0x158f(){const _0x31a3e7=['columnNames','string','validation','appCode','36739wYWgNM','schemas','5ajpOMp','toLowerCase','boolean','reason','isArray','165030KJPdnF','5357EPRaTb','message','index_name','split','fields','type','size','schemaWarnings','\x22\x20not\x20found\x20or\x20not\x20accessible','indexName','4YkOjKU','Audit\x20top-level\x20JOIN\x20equality\x20predicates\x20against\x20dataset\x20index\x20metadata','validate','--check-indexes\x20requires\x20--schemas.','check-indexes','dataset','map','isSelectOnly','file','from','name','unshift','2154177ZuHtLm','\x22\x20not\x20found\x20in\x20any\x20dataset','valid','tables','joinAudit','Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)','push','indexes','54dVklSA','sqlType','pkField','Path\x20to\x20the\x20SQL\x20file\x20to\x20validate','6701694HXhgLs','40eMsRjf','bool','sql','columns','SQL\x20schema\x20validation','find','13714344nSvjzX','str','dbtableConfig','length','index_columns','Table\x20\x22','Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)','8330qlUKGG','9658656ljsnKp','tableName','File\x20not\x20found:\x20','utf-8','primary','get','trim'];a177_0x158f=function(){return _0x31a3e7;};return a177_0x158f();}export const sqlValidate={'service':a177_0xc64d2a(0x1d9),'command':a177_0xc64d2a(0x204),'description':a177_0xc64d2a(0x1e3),'risk':'read','flags':[{'name':a177_0xc64d2a(0x20a),'type':a177_0xc64d2a(0x1ed),'description':a177_0xc64d2a(0x1d5)},{'name':'sql','type':a177_0xc64d2a(0x1ed),'description':a177_0xc64d2a(0x213)},{'name':a177_0xc64d2a(0x1f1),'type':a177_0xc64d2a(0x1ed),'description':'Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against'},{'name':'check-indexes','type':a177_0xc64d2a(0x1f4),'description':a177_0xc64d2a(0x203)}],async 'execute'(_0xb82258){const _0x91f0b2=a177_0xc64d2a,_0x22fc36=_0xb82258[_0x91f0b2(0x1de)](_0x91f0b2(0x20a)),_0x297e17=_0xb82258[_0x91f0b2(0x1de)]('sql'),_0x521b41=_0xb82258[_0x91f0b2(0x1de)](_0x91f0b2(0x1f1)),_0x3bfdff=_0xb82258[_0x91f0b2(0x1d8)](_0x91f0b2(0x206));if(!_0x22fc36&&!_0x297e17)throw CliErrors['flagMissing']('file','Provide\x20--file\x20or\x20--sql');if(_0x3bfdff&&!_0x521b41)throw CliErrors[_0x91f0b2(0x1ee)](_0x91f0b2(0x205));let _0x1372c9;if(_0x22fc36){const _0x570cd6=resolve(process['cwd'](),_0x22fc36);if(!existsSync(_0x570cd6))throw CliErrors[_0x91f0b2(0x1ee)](_0x91f0b2(0x1e7)+_0x570cd6);_0x1372c9=readFileSync(_0x570cd6,_0x91f0b2(0x1e8));}else _0x1372c9=_0x297e17;const _0x191d61=validateSql(_0x1372c9),_0x276dce={'valid':_0x191d61[_0x91f0b2(0x210)],'sqlType':_0x191d61[_0x91f0b2(0x217)]['type'],'isSelectOnly':_0x191d61[_0x91f0b2(0x217)][_0x91f0b2(0x209)],'isDangerous':_0x191d61['sqlType']['isDangerous'],'tables':_0x191d61[_0x91f0b2(0x211)],'parameters':_0x191d61['parameters'],'message':_0x191d61['message']};_0x191d61[_0x91f0b2(0x217)]['reason']&&(_0x276dce['reason']=_0x191d61[_0x91f0b2(0x217)][_0x91f0b2(0x1f5)]);if(_0x521b41&&_0x191d61[_0x91f0b2(0x210)]){const _0x405216=_0x521b41[_0x91f0b2(0x1fb)](',')[_0x91f0b2(0x208)](_0x1174c0=>_0x1174c0['trim']())['filter'](Boolean),_0x3f1792=[],_0x3b228a=[],_0x45300c=filterDbTableBackedDatasets(await listDatasets(_0xb82258[_0x91f0b2(0x1ef)])),_0x21a730=new Map(_0x45300c[_0x91f0b2(0x208)](_0x222bc4=>[_0x222bc4['dbtableConfig']?.['tableName']?.[_0x91f0b2(0x1f3)](),_0x222bc4]));for(const _0x1c9af9 of _0x191d61[_0x91f0b2(0x211)]){const _0x50e652=_0x21a730[_0x91f0b2(0x1ea)](_0x1c9af9[_0x91f0b2(0x1f3)]());!_0x50e652&&_0x3f1792['push'](_0x91f0b2(0x1e2)+_0x1c9af9+_0x91f0b2(0x20f));}for(const _0x40b011 of _0x405216){let _0x1a08cc;try{_0x1a08cc=await getDatasetDetail(_0x40b011);}catch{_0x3f1792[_0x91f0b2(0x214)]('Dataset\x20\x22'+_0x40b011+_0x91f0b2(0x200));continue;}assertDatasetIsDbTableBacked(_0x1a08cc,_0x91f0b2(0x1db));const _0x4b8dce=Array[_0x91f0b2(0x1f6)](_0x1a08cc['fields'])?_0x1a08cc[_0x91f0b2(0x1fc)]:[],_0x22b1a2=new Set(_0x4b8dce[_0x91f0b2(0x208)](_0x55e05e=>_0x55e05e[_0x91f0b2(0x20c)]?.[_0x91f0b2(0x1f3)]())),_0x2a3b04=_0x1a08cc[_0x91f0b2(0x1df)]?.[_0x91f0b2(0x1e6)]||_0x1a08cc[_0x91f0b2(0x1e6)]||_0x40b011;_0x276dce['schema:'+_0x2a3b04]={'code':_0x40b011,'tableName':_0x2a3b04,'fieldCount':_0x22b1a2[_0x91f0b2(0x1fe)],'fields':Array[_0x91f0b2(0x20b)](_0x22b1a2)};if(_0x3bfdff){const _0x3841c8=normalizeDatasetIndexes(_0x1a08cc);_0x3b228a[_0x91f0b2(0x214)]({'tableName':_0x2a3b04,..._0x3841c8});}}_0x3f1792[_0x91f0b2(0x1e0)]>0x0&&(_0x276dce[_0x91f0b2(0x1ff)]=_0x3f1792),_0x3bfdff&&(_0x276dce[_0x91f0b2(0x212)]=auditSqlJoinIndexes(_0x1372c9,_0x3b228a));}return{'ok':_0x191d61[_0x91f0b2(0x210)],'data':_0x276dce,'message':_0x191d61[_0x91f0b2(0x1f9)]};}};function normalizeDatasetIndexes(_0x58284c){const _0x295cc0=a177_0xc64d2a,_0x227b39=Array[_0x295cc0(0x1f6)](_0x58284c?.[_0x295cc0(0x207)]?.[_0x295cc0(0x215)])?_0x58284c['dataset'][_0x295cc0(0x215)]:Array[_0x295cc0(0x1f6)](_0x58284c?.['indexes'])?_0x58284c['indexes']:[],_0x5ce694=_0x227b39['flatMap'](_0x443333=>{const _0x5f0117=_0x295cc0,_0x136a84=Array['isArray'](_0x443333?.[_0x5f0117(0x1e1)])?_0x443333[_0x5f0117(0x1e1)]:Array[_0x5f0117(0x1f6)](_0x443333?.['columnNames'])?_0x443333[_0x5f0117(0x1ec)]:Array[_0x5f0117(0x1f6)](_0x443333?.[_0x5f0117(0x1da)])?_0x443333[_0x5f0117(0x1da)]:[],_0x498b19=_0x136a84['filter'](_0x540f3f=>typeof _0x540f3f===_0x5f0117(0x1ed))[_0x5f0117(0x208)](_0x21e04a=>_0x21e04a[_0x5f0117(0x1eb)]())['filter'](Boolean);if(_0x498b19[_0x5f0117(0x1e0)]===0x0)return[];const _0x4844cf=[_0x443333?.[_0x5f0117(0x201)],_0x443333?.[_0x5f0117(0x1fa)],_0x443333?.[_0x5f0117(0x20c)]]['find'](_0x38d34f=>typeof _0x38d34f===_0x5f0117(0x1ed)&&_0x38d34f[_0x5f0117(0x1eb)]()),_0x368a2e=[_0x443333?.['index_type'],_0x443333?.[_0x5f0117(0x1fd)]][_0x5f0117(0x1dc)](_0x2eec44=>typeof _0x2eec44===_0x5f0117(0x1ed)&&_0x2eec44[_0x5f0117(0x1eb)]());return[{..._0x4844cf?{'name':_0x4844cf[_0x5f0117(0x1eb)]()}:{},..._0x368a2e?{'type':_0x368a2e[_0x5f0117(0x1eb)]()}:{},'columns':_0x498b19}];}),_0x4970d8=[..._0x5ce694],_0x4d6441=typeof _0x58284c?.[_0x295cc0(0x1df)]?.[_0x295cc0(0x218)]===_0x295cc0(0x1ed)?_0x58284c[_0x295cc0(0x1df)]['pkField'][_0x295cc0(0x1fb)](',')[_0x295cc0(0x208)](_0x4509ee=>_0x4509ee['trim']())['filter'](Boolean):[];return _0x4d6441['length']>0x0&&_0x4970d8[_0x295cc0(0x20d)]({'type':_0x295cc0(0x1e9),'columns':_0x4d6441}),{'indexes':_0x4970d8,'metadataAvailable':_0x5ce694[_0x295cc0(0x1e0)]>0x0};}
1
+ function a178_0x2481(_0x2b8415,_0x1f3615){_0x2b8415=_0x2b8415-0x189;const _0x1c32aa=a178_0x1c32();let _0x24815e=_0x1c32aa[_0x2b8415];return _0x24815e;}const a178_0x329b75=a178_0x2481;(function(_0x147e23,_0x40c565){const _0x3f212d=a178_0x2481,_0x5ed143=_0x147e23();while(!![]){try{const _0x3863cc=parseInt(_0x3f212d(0x1c6))/0x1*(parseInt(_0x3f212d(0x1ab))/0x2)+-parseInt(_0x3f212d(0x1bf))/0x3*(parseInt(_0x3f212d(0x1ba))/0x4)+-parseInt(_0x3f212d(0x1c7))/0x5*(parseInt(_0x3f212d(0x1ca))/0x6)+parseInt(_0x3f212d(0x1a0))/0x7+parseInt(_0x3f212d(0x18d))/0x8*(-parseInt(_0x3f212d(0x1af))/0x9)+-parseInt(_0x3f212d(0x1a9))/0xa+parseInt(_0x3f212d(0x1c9))/0xb;if(_0x3863cc===_0x40c565)break;else _0x5ed143['push'](_0x5ed143['shift']());}catch(_0x5b0cda){_0x5ed143['push'](_0x5ed143['shift']());}}}(a178_0x1c32,0xb9f47));import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';import{validateSql}from'../../core/sql-validator.js';import{auditSqlJoinIndexes}from'../../core/sql-index-auditor.js';import{getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{assertDatasetIsDbTableBacked,filterDbTableBackedDatasets}from'../../commands/dataset/capability.js';function a178_0x1c32(){const _0x5e0d19=['isSelectOnly','File\x20not\x20found:\x20','read','1477373FFNyVG','25Crpugz','appCode','15261499YlpcbR','1335432DeMJSQ','columnNames','columns','push','sql','SQL\x20schema\x20validation','split','file','pkField','88HEcczX','tableName','index_name','index_columns','cwd','size','trim','isArray','type','indexes','dataset','joinAudit','bool','isDangerous','message','check-indexes','primary','flatMap','\x22\x20not\x20found\x20in\x20any\x20dataset','4956868rFaYMk','valid','Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)','filter','find','validate','map','schema:','validation','70390BNIczu','--check-indexes\x20requires\x20--schemas.','2zMJBAZ','Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)','Dataset\x20\x22','toLowerCase','258831ppXjZs','name','sqlType','utf-8','flagMissing','str','boolean','Path\x20to\x20the\x20SQL\x20file\x20to\x20validate','Table\x20\x22','Audit\x20top-level\x20JOIN\x20equality\x20predicates\x20against\x20dataset\x20index\x20metadata','tables','1833316rvDwpH','length','Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against','schemas','reason','9LTuxPz','string','dbtableConfig','indexName'];a178_0x1c32=function(){return _0x5e0d19;};return a178_0x1c32();}export const sqlValidate={'service':a178_0x329b75(0x1ce),'command':a178_0x329b75(0x1a5),'description':a178_0x329b75(0x1a2),'risk':a178_0x329b75(0x1c5),'flags':[{'name':'file','type':a178_0x329b75(0x1c0),'description':a178_0x329b75(0x1b6)},{'name':'sql','type':a178_0x329b75(0x1c0),'description':a178_0x329b75(0x1ac)},{'name':a178_0x329b75(0x1bd),'type':a178_0x329b75(0x1c0),'description':a178_0x329b75(0x1bc)},{'name':a178_0x329b75(0x19c),'type':a178_0x329b75(0x1b5),'description':a178_0x329b75(0x1b8)}],async 'execute'(_0x5be594){const _0x114594=a178_0x329b75,_0x35d657=_0x5be594[_0x114594(0x1b4)]('file'),_0x1e3997=_0x5be594[_0x114594(0x1b4)](_0x114594(0x1ce)),_0x2fb951=_0x5be594[_0x114594(0x1b4)]('schemas'),_0x1b7d7e=_0x5be594[_0x114594(0x199)](_0x114594(0x19c));if(!_0x35d657&&!_0x1e3997)throw CliErrors[_0x114594(0x1b3)](_0x114594(0x18b),'Provide\x20--file\x20or\x20--sql');if(_0x1b7d7e&&!_0x2fb951)throw CliErrors[_0x114594(0x1a8)](_0x114594(0x1aa));let _0x255b19;if(_0x35d657){const _0x256c2d=resolve(process[_0x114594(0x191)](),_0x35d657);if(!existsSync(_0x256c2d))throw CliErrors[_0x114594(0x1a8)](_0x114594(0x1c4)+_0x256c2d);_0x255b19=readFileSync(_0x256c2d,_0x114594(0x1b2));}else _0x255b19=_0x1e3997;const _0x33cb26=validateSql(_0x255b19),_0x886195={'valid':_0x33cb26['valid'],'sqlType':_0x33cb26[_0x114594(0x1b1)][_0x114594(0x195)],'isSelectOnly':_0x33cb26['sqlType'][_0x114594(0x1c3)],'isDangerous':_0x33cb26[_0x114594(0x1b1)][_0x114594(0x19a)],'tables':_0x33cb26[_0x114594(0x1b9)],'parameters':_0x33cb26['parameters'],'message':_0x33cb26[_0x114594(0x19b)]};_0x33cb26[_0x114594(0x1b1)][_0x114594(0x1be)]&&(_0x886195[_0x114594(0x1be)]=_0x33cb26['sqlType'][_0x114594(0x1be)]);if(_0x2fb951&&_0x33cb26[_0x114594(0x1a1)]){const _0x421476=_0x2fb951[_0x114594(0x18a)](',')[_0x114594(0x1a6)](_0x1d8cb9=>_0x1d8cb9[_0x114594(0x193)]())[_0x114594(0x1a3)](Boolean),_0x586563=[],_0x175864=[],_0x4960d1=filterDbTableBackedDatasets(await listDatasets(_0x5be594[_0x114594(0x1c8)])),_0x423fbd=new Map(_0x4960d1[_0x114594(0x1a6)](_0x197651=>[_0x197651[_0x114594(0x1c1)]?.['tableName']?.[_0x114594(0x1ae)](),_0x197651]));for(const _0x4e7512 of _0x33cb26[_0x114594(0x1b9)]){const _0x507e95=_0x423fbd['get'](_0x4e7512['toLowerCase']());!_0x507e95&&_0x586563[_0x114594(0x1cd)](_0x114594(0x1b7)+_0x4e7512+_0x114594(0x19f));}for(const _0x57d429 of _0x421476){let _0x2fc798;try{_0x2fc798=await getDatasetDetail(_0x57d429);}catch{_0x586563['push'](_0x114594(0x1ad)+_0x57d429+'\x22\x20not\x20found\x20or\x20not\x20accessible');continue;}assertDatasetIsDbTableBacked(_0x2fc798,_0x114594(0x189));const _0xf2b27b=Array[_0x114594(0x194)](_0x2fc798['fields'])?_0x2fc798['fields']:[],_0x5b2e59=new Set(_0xf2b27b[_0x114594(0x1a6)](_0x2b29a7=>_0x2b29a7[_0x114594(0x1b0)]?.[_0x114594(0x1ae)]())),_0x2ce023=_0x2fc798['dbtableConfig']?.[_0x114594(0x18e)]||_0x2fc798[_0x114594(0x18e)]||_0x57d429;_0x886195[_0x114594(0x1a7)+_0x2ce023]={'code':_0x57d429,'tableName':_0x2ce023,'fieldCount':_0x5b2e59[_0x114594(0x192)],'fields':Array['from'](_0x5b2e59)};if(_0x1b7d7e){const _0x3c63e3=normalizeDatasetIndexes(_0x2fc798);_0x175864[_0x114594(0x1cd)]({'tableName':_0x2ce023,..._0x3c63e3});}}_0x586563['length']>0x0&&(_0x886195['schemaWarnings']=_0x586563),_0x1b7d7e&&(_0x886195[_0x114594(0x198)]=auditSqlJoinIndexes(_0x255b19,_0x175864));}return{'ok':_0x33cb26[_0x114594(0x1a1)],'data':_0x886195,'message':_0x33cb26['message']};}};function normalizeDatasetIndexes(_0x465e6d){const _0x16f9eb=a178_0x329b75,_0x5e697f=Array[_0x16f9eb(0x194)](_0x465e6d?.[_0x16f9eb(0x197)]?.[_0x16f9eb(0x196)])?_0x465e6d[_0x16f9eb(0x197)]['indexes']:Array[_0x16f9eb(0x194)](_0x465e6d?.[_0x16f9eb(0x196)])?_0x465e6d[_0x16f9eb(0x196)]:[],_0x660dc=_0x5e697f[_0x16f9eb(0x19e)](_0xe1e18=>{const _0x58ea54=_0x16f9eb,_0x24c1fe=Array[_0x58ea54(0x194)](_0xe1e18?.['index_columns'])?_0xe1e18[_0x58ea54(0x190)]:Array['isArray'](_0xe1e18?.[_0x58ea54(0x1cb)])?_0xe1e18[_0x58ea54(0x1cb)]:Array[_0x58ea54(0x194)](_0xe1e18?.[_0x58ea54(0x1cc)])?_0xe1e18[_0x58ea54(0x1cc)]:[],_0x4f8aa3=_0x24c1fe[_0x58ea54(0x1a3)](_0x312e7f=>typeof _0x312e7f===_0x58ea54(0x1c0))[_0x58ea54(0x1a6)](_0x43fa57=>_0x43fa57[_0x58ea54(0x193)]())[_0x58ea54(0x1a3)](Boolean);if(_0x4f8aa3[_0x58ea54(0x1bb)]===0x0)return[];const _0xa732ac=[_0xe1e18?.[_0x58ea54(0x1c2)],_0xe1e18?.[_0x58ea54(0x18f)],_0xe1e18?.[_0x58ea54(0x1b0)]][_0x58ea54(0x1a4)](_0x1ba713=>typeof _0x1ba713===_0x58ea54(0x1c0)&&_0x1ba713[_0x58ea54(0x193)]()),_0x4fd367=[_0xe1e18?.['index_type'],_0xe1e18?.[_0x58ea54(0x195)]][_0x58ea54(0x1a4)](_0x35d3c1=>typeof _0x35d3c1==='string'&&_0x35d3c1['trim']());return[{..._0xa732ac?{'name':_0xa732ac[_0x58ea54(0x193)]()}:{},..._0x4fd367?{'type':_0x4fd367[_0x58ea54(0x193)]()}:{},'columns':_0x4f8aa3}];}),_0x1bd314=[..._0x660dc],_0x1d4da5=typeof _0x465e6d?.['dbtableConfig']?.[_0x16f9eb(0x18c)]===_0x16f9eb(0x1c0)?_0x465e6d[_0x16f9eb(0x1c1)][_0x16f9eb(0x18c)]['split'](',')[_0x16f9eb(0x1a6)](_0x57c444=>_0x57c444[_0x16f9eb(0x193)]())['filter'](Boolean):[];return _0x1d4da5[_0x16f9eb(0x1bb)]>0x0&&_0x1bd314['unshift']({'type':_0x16f9eb(0x19d),'columns':_0x1d4da5}),{'indexes':_0x1bd314,'metadataAvailable':_0x660dc[_0x16f9eb(0x1bb)]>0x0};}
@@ -1 +1 @@
1
- (function(_0x2e1b62,_0x35ae8d){const _0x5b43ec=a178_0x46d6,_0x4cb6a2=_0x2e1b62();while(!![]){try{const _0x31db59=parseInt(_0x5b43ec(0x1e7))/0x1+parseInt(_0x5b43ec(0x1e3))/0x2*(-parseInt(_0x5b43ec(0x1eb))/0x3)+-parseInt(_0x5b43ec(0x1e5))/0x4+parseInt(_0x5b43ec(0x1e8))/0x5*(-parseInt(_0x5b43ec(0x1e4))/0x6)+-parseInt(_0x5b43ec(0x1ea))/0x7+-parseInt(_0x5b43ec(0x1e2))/0x8*(parseInt(_0x5b43ec(0x1e9))/0x9)+-parseInt(_0x5b43ec(0x1e1))/0xa*(-parseInt(_0x5b43ec(0x1e6))/0xb);if(_0x31db59===_0x35ae8d)break;else _0x4cb6a2['push'](_0x4cb6a2['shift']());}catch(_0x18b9bd){_0x4cb6a2['push'](_0x4cb6a2['shift']());}}}(a178_0x2a12,0x678b8));function a178_0x2a12(){const _0x2af1bf=['9mEeuDO','5073418VEqZDQ','950541KjxnFY','5817550iYGfCx','5386096frqvzL','2jDXhSt','4779408Grvffr','327528qtfpxk','44OqcUPr','690433FhJPSc','5nhJbDA'];a178_0x2a12=function(){return _0x2af1bf;};return a178_0x2a12();}import{taskStatus}from'../../commands/task/status.js';function a178_0x46d6(_0x328e5e,_0x3557af){_0x328e5e=_0x328e5e-0x1e1;const _0x2a1272=a178_0x2a12();let _0x46d646=_0x2a1272[_0x328e5e];return _0x46d646;}export const taskDefinitions=[taskStatus];
1
+ (function(_0x84bf25,_0x50506c){const _0x1e3fcc=a179_0x516e,_0x3f5638=_0x84bf25();while(!![]){try{const _0x3721d6=-parseInt(_0x1e3fcc(0xec))/0x1+-parseInt(_0x1e3fcc(0xe8))/0x2*(parseInt(_0x1e3fcc(0xe6))/0x3)+parseInt(_0x1e3fcc(0xe5))/0x4*(parseInt(_0x1e3fcc(0xea))/0x5)+-parseInt(_0x1e3fcc(0xe9))/0x6+-parseInt(_0x1e3fcc(0xee))/0x7*(-parseInt(_0x1e3fcc(0xeb))/0x8)+-parseInt(_0x1e3fcc(0xed))/0x9+parseInt(_0x1e3fcc(0xef))/0xa*(parseInt(_0x1e3fcc(0xe7))/0xb);if(_0x3721d6===_0x50506c)break;else _0x3f5638['push'](_0x3f5638['shift']());}catch(_0x35501e){_0x3f5638['push'](_0x3f5638['shift']());}}}(a179_0x5a98,0xd94ee));import{taskStatus}from'../../commands/task/status.js';function a179_0x516e(_0x58d7ac,_0x27f46c){_0x58d7ac=_0x58d7ac-0xe5;const _0x5a98cd=a179_0x5a98();let _0x516e02=_0x5a98cd[_0x58d7ac];return _0x516e02;}function a179_0x5a98(){const _0x536de9=['9478089XmClQO','49kwzwPW','13073340xUEskY','303544KAnTvd','16080DlXGMg','11otjvpV','442YJmOOr','3285714cNUpZw','115HKXiJa','1526712MDMUFi','713191nBtYIU'];a179_0x5a98=function(){return _0x536de9;};return a179_0x5a98();}export const taskDefinitions=[taskStatus];
@@ -1 +1 @@
1
- const a179_0xc546e3=a179_0x2e7e;(function(_0x4d6aee,_0x168e6c){const _0x3cf915=a179_0x2e7e,_0x31897f=_0x4d6aee();while(!![]){try{const _0x5770d8=parseInt(_0x3cf915(0x79))/0x1+-parseInt(_0x3cf915(0x75))/0x2*(parseInt(_0x3cf915(0x7e))/0x3)+parseInt(_0x3cf915(0x89))/0x4+parseInt(_0x3cf915(0x74))/0x5+-parseInt(_0x3cf915(0x7a))/0x6*(parseInt(_0x3cf915(0x83))/0x7)+parseInt(_0x3cf915(0x77))/0x8*(parseInt(_0x3cf915(0x7f))/0x9)+-parseInt(_0x3cf915(0x81))/0xa*(parseInt(_0x3cf915(0x86))/0xb);if(_0x5770d8===_0x168e6c)break;else _0x31897f['push'](_0x31897f['shift']());}catch(_0x1bb6e1){_0x31897f['push'](_0x31897f['shift']());}}}(a179_0x40f3,0xd5228));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a179_0x2e7e(_0x4d0c7,_0x3fccb2){_0x4d0c7=_0x4d0c7-0x73;const _0x40f3b1=a179_0x40f3();let _0x2e7e37=_0x40f3b1[_0x4d0c7];return _0x2e7e37;}import{asyncTaskMessage,buildAsyncTaskStatusCommand,normalizeAsyncTask}from'../../commands/common/async-task.js';function a179_0x40f3(){const _0xa38852=[',\x20received\x20','27290eWktVu','str','21cIAPVS','Task\x20status\x20response\x20id\x20mismatch:\x20requested\x20','apiError','9306zIUxvQ','flagMissing','compress','1380308XSaIkN','Query\x20an\x20asynchronous\x20task;\x20repeat\x20for\x20PENDING\x20or\x20PROCESSING\x20until\x20SUCCESS\x20or\x20FAILED','task','read','trim','7968765zHrVbC','675718nDmvQL','taskId','8aWHuEi','task-id','1459115XOUjuN','3067656nwIdqA','Task\x20id\x20returned\x20by\x20an\x20asynchronous\x20platform\x20command','status','appCode','3aZvhfV','14899284rAjvYg'];a179_0x40f3=function(){return _0xa38852;};return a179_0x40f3();}import{getAsyncTaskStatus}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';export const taskStatus={'service':a179_0xc546e3(0x8b),'command':a179_0xc546e3(0x7c),'description':a179_0xc546e3(0x8a),'risk':a179_0xc546e3(0x8c),'defaultOutputFormat':a179_0xc546e3(0x88),'structuredErrors':!![],'flags':[{'name':'task-id','type':'string','required':!![],'description':a179_0xc546e3(0x7b)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x46c65f){const _0x24b6a5=a179_0xc546e3;if(!_0x46c65f['str'](_0x24b6a5(0x78))['trim']())throw CliErrors[_0x24b6a5(0x87)](_0x24b6a5(0x78));},async 'execute'(_0x58ea9d){const _0x42a380=a179_0xc546e3,_0x3c2241=_0x58ea9d[_0x42a380(0x82)]('task-id')[_0x42a380(0x73)](),_0x379839=normalizeAsyncTask(await getAsyncTaskStatus(_0x3c2241,_0x58ea9d[_0x42a380(0x7d)],_0x58ea9d['cookie']));if(_0x379839[_0x42a380(0x76)]!==_0x3c2241)throw CliErrors[_0x42a380(0x85)](_0x42a380(0x84)+_0x3c2241+_0x42a380(0x80)+_0x379839[_0x42a380(0x76)]+'.');const _0x59d14b=buildAsyncTaskStatusCommand(_0x379839[_0x42a380(0x76)],_0x58ea9d[_0x42a380(0x7d)]);return{'ok':!![],'message':asyncTaskMessage(_0x379839),'data':{'appCode':_0x58ea9d[_0x42a380(0x7d)],..._0x379839,'query':_0x379839['isTerminal']?null:{'command':_0x59d14b}}};}};
1
+ const a180_0x43a7a4=a180_0xcc51;(function(_0x3d1cbf,_0x1567d2){const _0x37e1a4=a180_0xcc51,_0x4744d4=_0x3d1cbf();while(!![]){try{const _0x31c2a4=-parseInt(_0x37e1a4(0xf1))/0x1+-parseInt(_0x37e1a4(0xfc))/0x2*(-parseInt(_0x37e1a4(0xfa))/0x3)+-parseInt(_0x37e1a4(0xf4))/0x4+-parseInt(_0x37e1a4(0x104))/0x5+-parseInt(_0x37e1a4(0x105))/0x6+-parseInt(_0x37e1a4(0xee))/0x7*(parseInt(_0x37e1a4(0x107))/0x8)+-parseInt(_0x37e1a4(0xf2))/0x9*(-parseInt(_0x37e1a4(0x103))/0xa);if(_0x31c2a4===_0x1567d2)break;else _0x4744d4['push'](_0x4744d4['shift']());}catch(_0x44d26e){_0x4744d4['push'](_0x4744d4['shift']());}}}(a180_0x3372,0x32650));function a180_0x3372(){const _0x52c2bf=['1069744CNPsdT','14rAMTMA','read','appCode','298164SgDZjg','63mEllzW','task','1262088WrofgE','flagMissing',',\x20received\x20','Query\x20an\x20asynchronous\x20task;\x20repeat\x20for\x20PENDING\x20or\x20PROCESSING\x20until\x20SUCCESS\x20or\x20FAILED','taskId','task-id','21066iVHYyu','apiError','10MsHWyZ','str','Task\x20id\x20returned\x20by\x20an\x20asynchronous\x20platform\x20command','status','Task\x20status\x20response\x20id\x20mismatch:\x20requested\x20','isTerminal','string','2129010HVCmKp','702165mQxjuL','1784676RCPofA','trim'];a180_0x3372=function(){return _0x52c2bf;};return a180_0x3372();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asyncTaskMessage,buildAsyncTaskStatusCommand,normalizeAsyncTask}from'../../commands/common/async-task.js';import{getAsyncTaskStatus}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a180_0xcc51(_0x214775,_0x286aa7){_0x214775=_0x214775-0xee;const _0x33722b=a180_0x3372();let _0xcc518a=_0x33722b[_0x214775];return _0xcc518a;}export const taskStatus={'service':a180_0x43a7a4(0xf3),'command':a180_0x43a7a4(0xff),'description':a180_0x43a7a4(0xf7),'risk':a180_0x43a7a4(0xef),'defaultOutputFormat':'compress','structuredErrors':!![],'flags':[{'name':a180_0x43a7a4(0xf9),'type':a180_0x43a7a4(0x102),'required':!![],'description':a180_0x43a7a4(0xfe)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x677746){const _0x551323=a180_0x43a7a4;if(!_0x677746[_0x551323(0xfd)](_0x551323(0xf9))[_0x551323(0x106)]())throw CliErrors[_0x551323(0xf5)](_0x551323(0xf9));},async 'execute'(_0x59d26d){const _0xedd245=a180_0x43a7a4,_0x390110=_0x59d26d[_0xedd245(0xfd)](_0xedd245(0xf9))[_0xedd245(0x106)](),_0x4b232d=normalizeAsyncTask(await getAsyncTaskStatus(_0x390110,_0x59d26d[_0xedd245(0xf0)],_0x59d26d['cookie']));if(_0x4b232d[_0xedd245(0xf8)]!==_0x390110)throw CliErrors[_0xedd245(0xfb)](_0xedd245(0x100)+_0x390110+_0xedd245(0xf6)+_0x4b232d[_0xedd245(0xf8)]+'.');const _0x3b8542=buildAsyncTaskStatusCommand(_0x4b232d[_0xedd245(0xf8)],_0x59d26d['appCode']);return{'ok':!![],'message':asyncTaskMessage(_0x4b232d),'data':{'appCode':_0x59d26d[_0xedd245(0xf0)],..._0x4b232d,'query':_0x4b232d[_0xedd245(0x101)]?null:{'command':_0x3b8542}}};}};
@@ -1 +1 @@
1
- function a180_0x30b5(_0x10f8a1,_0xe76951){_0x10f8a1=_0x10f8a1-0x77;const _0x125ba1=a180_0x125b();let _0x30b514=_0x125ba1[_0x10f8a1];return _0x30b514;}const a180_0x358b09=a180_0x30b5;(function(_0x337ac8,_0x49a770){const _0x16c8fa=a180_0x30b5,_0x495138=_0x337ac8();while(!![]){try{const _0x369716=parseInt(_0x16c8fa(0x85))/0x1*(-parseInt(_0x16c8fa(0x78))/0x2)+-parseInt(_0x16c8fa(0x77))/0x3*(-parseInt(_0x16c8fa(0x7c))/0x4)+parseInt(_0x16c8fa(0x81))/0x5*(-parseInt(_0x16c8fa(0x79))/0x6)+-parseInt(_0x16c8fa(0x84))/0x7+parseInt(_0x16c8fa(0x7e))/0x8+-parseInt(_0x16c8fa(0x7a))/0x9*(parseInt(_0x16c8fa(0x86))/0xa)+-parseInt(_0x16c8fa(0x80))/0xb*(-parseInt(_0x16c8fa(0x7f))/0xc);if(_0x369716===_0x49a770)break;else _0x495138['push'](_0x495138['shift']());}catch(_0x33f2f7){_0x495138['push'](_0x495138['shift']());}}}(a180_0x125b,0x5d1e5));import{buildAppAddFlags,runAppAdd,validateAppName}from'../../commands/common/app-registry.js';function a180_0x125b(){const _0x5c9059=['4422824LDJGwH','12TqKcgQ','15195862zblXPJ','299570aDJkdo','App\x20profile\x20name','Register\x20an\x20app\x20profile\x20in\x20the\x20current\x20workspace\x20(or\x20--global)','4889045rkSkwG','37085OAbWzo','20RHcEmc','71946BxMxpU','14NoJbrO','54ykTADS','1329507HZftAx','workspace\x20add','40bUwMLl','workspace'];a180_0x125b=function(){return _0x5c9059;};return a180_0x125b();}export const workspaceAddDefinition={'service':a180_0x358b09(0x7d),'command':'add','description':a180_0x358b09(0x83),'risk':'write','requiresAuth':![],'requiresAppCode':![],'args':[{'name':'name','description':a180_0x358b09(0x82),'required':!![]}],'flags':buildAppAddFlags(),'validate':_0x3942ec=>validateAppName(_0x3942ec,'workspace\x20add'),'execute':_0x18f931=>runAppAdd(_0x18f931,a180_0x358b09(0x7b))};
1
+ const a181_0xc6f4cd=a181_0x42f5;function a181_0x42f5(_0x132f83,_0x2f938c){_0x132f83=_0x132f83-0x197;const _0x40b2e9=a181_0x40b2();let _0x42f51a=_0x40b2e9[_0x132f83];return _0x42f51a;}(function(_0x5248f9,_0x32d97b){const _0x255b9b=a181_0x42f5,_0x272057=_0x5248f9();while(!![]){try{const _0xd016a6=-parseInt(_0x255b9b(0x1a1))/0x1+-parseInt(_0x255b9b(0x19c))/0x2*(-parseInt(_0x255b9b(0x19b))/0x3)+parseInt(_0x255b9b(0x19a))/0x4+-parseInt(_0x255b9b(0x1a2))/0x5+parseInt(_0x255b9b(0x199))/0x6+-parseInt(_0x255b9b(0x19e))/0x7+parseInt(_0x255b9b(0x197))/0x8;if(_0xd016a6===_0x32d97b)break;else _0x272057['push'](_0x272057['shift']());}catch(_0x29e45d){_0x272057['push'](_0x272057['shift']());}}}(a181_0x40b2,0x699db));function a181_0x40b2(){const _0xc97c61=['workspace\x20add','186198GXGGcp','2339328syhOLL','174627QIDtvt','4QKiGjI','write','771099qqlTUa','Register\x20an\x20app\x20profile\x20in\x20the\x20current\x20workspace\x20(or\x20--global)','add','72963JKKJXk','1514040rcuYKd','1489984DIHqEW'];a181_0x40b2=function(){return _0xc97c61;};return a181_0x40b2();}import{buildAppAddFlags,runAppAdd,validateAppName}from'../../commands/common/app-registry.js';export const workspaceAddDefinition={'service':'workspace','command':a181_0xc6f4cd(0x1a0),'description':a181_0xc6f4cd(0x19f),'risk':a181_0xc6f4cd(0x19d),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':'name','description':'App\x20profile\x20name','required':!![]}],'flags':buildAppAddFlags(),'validate':_0x487528=>validateAppName(_0x487528,a181_0xc6f4cd(0x198)),'execute':_0x57d198=>runAppAdd(_0x57d198,a181_0xc6f4cd(0x198))};
@@ -1 +1 @@
1
- const a181_0x1cbc3a=a181_0x24f0;function a181_0x24f0(_0x1304e0,_0x849e1){_0x1304e0=_0x1304e0-0x162;const _0x28522f=a181_0x2852();let _0x24f059=_0x28522f[_0x1304e0];return _0x24f059;}(function(_0x4f6e14,_0x57165a){const _0xaab2a2=a181_0x24f0,_0x13e788=_0x4f6e14();while(!![]){try{const _0x49ff39=-parseInt(_0xaab2a2(0x167))/0x1+-parseInt(_0xaab2a2(0x186))/0x2+parseInt(_0xaab2a2(0x169))/0x3+parseInt(_0xaab2a2(0x187))/0x4+-parseInt(_0xaab2a2(0x176))/0x5+parseInt(_0xaab2a2(0x16f))/0x6+parseInt(_0xaab2a2(0x17c))/0x7*(-parseInt(_0xaab2a2(0x18d))/0x8);if(_0x49ff39===_0x57165a)break;else _0x13e788['push'](_0x13e788['shift']());}catch(_0x57e5fe){_0x13e788['push'](_0x13e788['shift']());}}}(a181_0x2852,0x22011));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.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';import{validateAppcode}from'../../commands/common/validate.js';import{readConfigFile,readRawConfigWithLayers,resolveWriteConfigPath,writeConfigFile}from'../../context.js';import{workspaceAddDefinition}from'../../commands/workspace/add.js';import{workspaceRemoveDefinition}from'../../commands/workspace/remove.js';const WORKSPACE_USAGE=CLI_BIN_NAME+a181_0x1cbc3a(0x19c),SAFE_PROFILE_KEYS=[a181_0x1cbc3a(0x183),'env','apiDir',a181_0x1cbc3a(0x17e),a181_0x1cbc3a(0x185),a181_0x1cbc3a(0x174),a181_0x1cbc3a(0x18c)],workspaceFlags=[{'name':a181_0x1cbc3a(0x165),'type':'string','description':a181_0x1cbc3a(0x17f)},{'name':'appcode','type':a181_0x1cbc3a(0x18b),'description':a181_0x1cbc3a(0x19a)},{'name':a181_0x1cbc3a(0x179),'type':a181_0x1cbc3a(0x18b),'description':a181_0x1cbc3a(0x16a),'enum':[...RABETBASE_ENV_VALUES]},{'name':'apiDir','type':a181_0x1cbc3a(0x18b),'description':a181_0x1cbc3a(0x162)},{'name':a181_0x1cbc3a(0x173),'type':'string','description':a181_0x1cbc3a(0x181),'enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':a181_0x1cbc3a(0x185),'type':a181_0x1cbc3a(0x194),'description':a181_0x1cbc3a(0x189)},{'name':a181_0x1cbc3a(0x174),'type':'string','description':a181_0x1cbc3a(0x193),'enum':[...RISK_LEVEL_VALUES]},{'name':a181_0x1cbc3a(0x18c),'type':a181_0x1cbc3a(0x18b),'description':a181_0x1cbc3a(0x182)}];function isRecord(_0x2115ae){const _0xd5c1a7=a181_0x1cbc3a;return!!_0x2115ae&&typeof _0x2115ae===_0xd5c1a7(0x177)&&!Array[_0xd5c1a7(0x19b)](_0x2115ae);}function assertValidAppcode(_0x4a7cb5){const _0x4a076b=a181_0x1cbc3a,{valid:_0x12c549,message:_0x369704}=validateAppcode(_0x4a7cb5);if(!_0x12c549)throw CliErrors['validation'](_0x4a076b(0x178)+_0x4a7cb5,_0x369704);}function sanitizeProfile(_0x439aa6){if(!isRecord(_0x439aa6))return{};const _0x268b2b={};for(const _0x5850a0 of SAFE_PROFILE_KEYS){if(_0x439aa6[_0x5850a0]!==undefined)_0x268b2b[_0x5850a0]=_0x439aa6[_0x5850a0];}return _0x268b2b;}function cloneProfile(_0x149aab){return isRecord(_0x149aab)?{..._0x149aab}:{};}function a181_0x2852(){const _0x5f2b72=['riskLevel','validation','49505LVsgdS','object','Invalid\x20appcode:\x20','env','Initialize\x20the\x20current\x20workspace\x20app\x20binding','\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`','7HLegYp','globalConfig','format','App\x20profile\x20name\x20to\x20use\x20in\x20this\x20workspace','use','Default\x20output\x20format\x20for\x20this\x20workspace\x20app\x20profile','Locale\x20for\x20this\x20workspace\x20app\x20profile','appcode','apiDir','pageSize','85464gYNjUI','89656oMnetT','Switch\x20the\x20current\x20workspace\x20app\x20binding','Default\x20page\x20size\x20for\x20this\x20workspace\x20app\x20profile','trim','string','locale','1978920mYpGZC','workspace.','.\x20Credentials:\x20not\x20written.','\x20(appcode:\x20','Use\x20`','\x20workspace\x20','Risk\x20level\x20for\x20this\x20workspace\x20app\x20profile','number','apps','workspace','write','\x22\x20not\x20found.','keys','App\x20code\x20to\x20bind\x20to\x20this\x20workspace','isArray','\x20workspace\x20<init|use>\x20--app\x20<name>\x20[--appcode\x20<code>]','App\x20\x22','API\x20directory\x20path\x20for\x20this\x20workspace\x20app\x20profile','str','project','app','Workspace\x20','32229CAfPHI','Pass\x20--appcode\x20<code>,\x20or\x20choose\x20one\x20of:\x20','564510WVEEix','Target\x20environment',').\x20Config:\x20','defaultApp','flag','length','1565544PLoLyh','Missing\x20workspace\x20app\x20selector.','\x20workspace\x20use\x20--app\x20<name>`.','init','defaultFormat'];a181_0x2852=function(){return _0x5f2b72;};return a181_0x2852();}function collectWorkspaceProfileOverrides(_0x4a4943){const _0x80c6ca=a181_0x1cbc3a,_0x3f4d0c={},_0x59f712=_0x4a4943[_0x80c6ca(0x163)](_0x80c6ca(0x179)),_0x3e4d59=_0x4a4943['str'](_0x80c6ca(0x184)),_0x47b392=_0x4a4943[_0x80c6ca(0x163)](_0x80c6ca(0x173)),_0x408a07=_0x4a4943[_0x80c6ca(0x16d)](_0x80c6ca(0x185)),_0x5e8733=_0x4a4943[_0x80c6ca(0x163)](_0x80c6ca(0x174)),_0x17eeb6=_0x4a4943[_0x80c6ca(0x163)](_0x80c6ca(0x18c));if(_0x59f712)_0x3f4d0c[_0x80c6ca(0x179)]=_0x59f712;if(_0x3e4d59)_0x3f4d0c[_0x80c6ca(0x184)]=_0x3e4d59;if(_0x47b392)_0x3f4d0c[_0x80c6ca(0x17e)]=_0x47b392;if(_0x408a07!==undefined&&_0x408a07!=='')_0x3f4d0c[_0x80c6ca(0x185)]=Number(_0x408a07);if(_0x5e8733)_0x3f4d0c[_0x80c6ca(0x174)]=_0x5e8733;if(_0x17eeb6)_0x3f4d0c[_0x80c6ca(0x18c)]=_0x17eeb6;return _0x3f4d0c;}async function validateWorkspaceArgs(_0x3a0bfb){const _0x9bd8ef=a181_0x1cbc3a,_0x284f5d=_0x3a0bfb[_0x9bd8ef(0x163)]('app')['trim'](),_0x334371=_0x3a0bfb['str']('appcode')[_0x9bd8ef(0x18a)]();if(!_0x284f5d&&!_0x334371)throw CliErrors[_0x9bd8ef(0x175)]('Missing\x20workspace\x20app\x20selector.','Use\x20`'+CLI_BIN_NAME+'\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`'+CLI_BIN_NAME+'\x20workspace\x20use\x20--app\x20<name>`.');if(_0x334371)assertValidAppcode(_0x334371);}function resolveKnownApps(){const _0x2e179a=a181_0x1cbc3a,{config:_0x26f5a2,layers:_0x27ed2b}=readRawConfigWithLayers(),_0x26ab38=isRecord(_0x26f5a2['apps'])?_0x26f5a2[_0x2e179a(0x195)]:{},_0x34bcc7=isRecord(_0x27ed2b[_0x2e179a(0x17d)][_0x2e179a(0x195)])?_0x27ed2b[_0x2e179a(0x17d)]['apps']:{};return{..._0x34bcc7,..._0x26ab38};}async function configureWorkspace(_0x127820,_0x429176){const _0x55d6a0=a181_0x1cbc3a,_0x1532ca=_0x127820[_0x55d6a0(0x163)](_0x55d6a0(0x165))[_0x55d6a0(0x18a)](),_0x5ab524=_0x127820[_0x55d6a0(0x163)](_0x55d6a0(0x183))['trim'](),_0x4475a2=_0x1532ca||_0x5ab524;if(!_0x4475a2)throw CliErrors['validation'](_0x55d6a0(0x170),_0x55d6a0(0x191)+CLI_BIN_NAME+_0x55d6a0(0x17b)+CLI_BIN_NAME+_0x55d6a0(0x171));if(_0x5ab524)assertValidAppcode(_0x5ab524);const _0x13f68b=resolveWriteConfigPath(_0x55d6a0(0x164)),_0x2ae820=readConfigFile(_0x13f68b),_0x1a4184=resolveKnownApps(),_0x22516a=isRecord(_0x2ae820['apps'])?{..._0x2ae820[_0x55d6a0(0x195)]}:{},_0x4b91e1=cloneProfile(_0x22516a[_0x4475a2]),_0x4b2003=sanitizeProfile(_0x1a4184[_0x4475a2]),_0x46c3b7=_0x5ab524?{}:_0x4b2003,_0x23c600=_0x5ab524||_0x46c3b7[_0x55d6a0(0x183)];if(!_0x23c600){const _0x39ae05=Object[_0x55d6a0(0x199)](_0x1a4184),_0x2cfc5a=_0x39ae05[_0x55d6a0(0x16e)]===0x0?_0x55d6a0(0x191)+CLI_BIN_NAME+_0x55d6a0(0x192)+_0x429176+'\x20--app\x20'+_0x4475a2+'\x20--appcode\x20<code>`.':_0x55d6a0(0x168)+_0x39ae05['join'](',\x20');throw CliErrors[_0x55d6a0(0x175)](_0x55d6a0(0x19d)+_0x4475a2+_0x55d6a0(0x198),_0x2cfc5a);}assertValidAppcode(String(_0x23c600));const _0x1a3bf2={..._0x46c3b7,..._0x4b91e1,'appcode':String(_0x23c600),...collectWorkspaceProfileOverrides(_0x127820)};return _0x22516a[_0x4475a2]=_0x1a3bf2,_0x2ae820[_0x55d6a0(0x195)]=_0x22516a,_0x2ae820[_0x55d6a0(0x16c)]=_0x4475a2,delete _0x2ae820[_0x55d6a0(0x183)],delete _0x2ae820[_0x55d6a0(0x165)],_0x1a3bf2[_0x55d6a0(0x179)]&&(_0x2ae820[_0x55d6a0(0x179)]=_0x1a3bf2[_0x55d6a0(0x179)]),writeConfigFile(_0x13f68b,_0x2ae820),{'ok':!![],'message':_0x55d6a0(0x166)+(_0x429176===_0x55d6a0(0x172)?'initialized':'updated')+':\x20'+_0x4475a2+_0x55d6a0(0x190)+_0x1a3bf2[_0x55d6a0(0x183)]+_0x55d6a0(0x16b)+_0x13f68b+_0x55d6a0(0x18f),'data':{'operation':_0x55d6a0(0x18e)+_0x429176,'configPath':_0x13f68b,'app':_0x4475a2,'appcode':_0x1a3bf2[_0x55d6a0(0x183)],'env':_0x1a3bf2[_0x55d6a0(0x179)]??null,'credentialsWritten':![]}};}const workspaceInitDefinition={'service':a181_0x1cbc3a(0x196),'command':a181_0x1cbc3a(0x172),'description':a181_0x1cbc3a(0x17a),'risk':a181_0x1cbc3a(0x197),'requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x22a53c=>configureWorkspace(_0x22a53c,a181_0x1cbc3a(0x172))},workspaceUseDefinition={'service':a181_0x1cbc3a(0x196),'command':a181_0x1cbc3a(0x180),'description':a181_0x1cbc3a(0x188),'risk':a181_0x1cbc3a(0x197),'requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x5e8d37=>configureWorkspace(_0x5e8d37,'use')};export const workspaceDefinitions=[workspaceInitDefinition,workspaceUseDefinition,workspaceAddDefinition,workspaceRemoveDefinition];export{WORKSPACE_USAGE};
1
+ const a182_0x382459=a182_0x605b;(function(_0x47ce3a,_0x289bb2){const _0x1eafcb=a182_0x605b,_0x3482b2=_0x47ce3a();while(!![]){try{const _0x1962f7=parseInt(_0x1eafcb(0x17e))/0x1*(parseInt(_0x1eafcb(0x187))/0x2)+parseInt(_0x1eafcb(0x196))/0x3+-parseInt(_0x1eafcb(0x193))/0x4*(parseInt(_0x1eafcb(0x178))/0x5)+-parseInt(_0x1eafcb(0x191))/0x6+parseInt(_0x1eafcb(0x16f))/0x7*(-parseInt(_0x1eafcb(0x171))/0x8)+-parseInt(_0x1eafcb(0x17d))/0x9*(-parseInt(_0x1eafcb(0x16d))/0xa)+-parseInt(_0x1eafcb(0x19b))/0xb;if(_0x1962f7===_0x289bb2)break;else _0x3482b2['push'](_0x3482b2['shift']());}catch(_0x5443e7){_0x3482b2['push'](_0x3482b2['shift']());}}}(a182_0x47cf,0x714c1));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.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';import{validateAppcode}from'../../commands/common/validate.js';import{readConfigFile,readRawConfigWithLayers,resolveWriteConfigPath,writeConfigFile}from'../../context.js';import{workspaceAddDefinition}from'../../commands/workspace/add.js';import{workspaceRemoveDefinition}from'../../commands/workspace/remove.js';const WORKSPACE_USAGE=CLI_BIN_NAME+a182_0x382459(0x19a),SAFE_PROFILE_KEYS=['appcode','env',a182_0x382459(0x163),a182_0x382459(0x169),a182_0x382459(0x194),'riskLevel','locale'],workspaceFlags=[{'name':a182_0x382459(0x183),'type':'string','description':a182_0x382459(0x166)},{'name':a182_0x382459(0x164),'type':a182_0x382459(0x17c),'description':'App\x20code\x20to\x20bind\x20to\x20this\x20workspace'},{'name':a182_0x382459(0x18c),'type':'string','description':a182_0x382459(0x17b),'enum':[...RABETBASE_ENV_VALUES]},{'name':a182_0x382459(0x163),'type':'string','description':a182_0x382459(0x19c)},{'name':a182_0x382459(0x17a),'type':a182_0x382459(0x17c),'description':a182_0x382459(0x198),'enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':a182_0x382459(0x194),'type':a182_0x382459(0x16b),'description':'Default\x20page\x20size\x20for\x20this\x20workspace\x20app\x20profile'},{'name':a182_0x382459(0x184),'type':'string','description':a182_0x382459(0x173),'enum':[...RISK_LEVEL_VALUES]},{'name':a182_0x382459(0x176),'type':a182_0x382459(0x17c),'description':a182_0x382459(0x168)}];function isRecord(_0x4aa233){const _0x2e9cfa=a182_0x382459;return!!_0x4aa233&&typeof _0x4aa233===_0x2e9cfa(0x17f)&&!Array[_0x2e9cfa(0x181)](_0x4aa233);}function assertValidAppcode(_0x5b4b5c){const _0x1af955=a182_0x382459,{valid:_0x3f401e,message:_0x5c2506}=validateAppcode(_0x5b4b5c);if(!_0x3f401e)throw CliErrors['validation'](_0x1af955(0x179)+_0x5b4b5c,_0x5c2506);}function sanitizeProfile(_0x10f526){if(!isRecord(_0x10f526))return{};const _0x44b51d={};for(const _0x47bb7c of SAFE_PROFILE_KEYS){if(_0x10f526[_0x47bb7c]!==undefined)_0x44b51d[_0x47bb7c]=_0x10f526[_0x47bb7c];}return _0x44b51d;}function cloneProfile(_0x1b75df){return isRecord(_0x1b75df)?{..._0x1b75df}:{};}function a182_0x605b(_0x211aff,_0x2c1fdf){_0x211aff=_0x211aff-0x163;const _0x47cf20=a182_0x47cf();let _0x605b85=_0x47cf20[_0x211aff];return _0x605b85;}function a182_0x47cf(){const _0x609c0b=['length','isArray','Use\x20`','app','riskLevel','Pass\x20--appcode\x20<code>,\x20or\x20choose\x20one\x20of:\x20','Missing\x20workspace\x20app\x20selector.','120986evfYHR','\x20workspace\x20',').\x20Config:\x20','trim','join','env','Initialize\x20the\x20current\x20workspace\x20app\x20binding','workspace.','workspace','str','4247136vAUULk','use','118468NhIxJT','pageSize','defaultApp','2758155lZeBfY','initialized','Default\x20output\x20format\x20for\x20this\x20workspace\x20app\x20profile','validation','\x20workspace\x20<init|use>\x20--app\x20<name>\x20[--appcode\x20<code>]','6547200jgYilq','API\x20directory\x20path\x20for\x20this\x20workspace\x20app\x20profile','write','\x20workspace\x20use\x20--app\x20<name>`.','apiDir','appcode','globalConfig','App\x20profile\x20name\x20to\x20use\x20in\x20this\x20workspace','Switch\x20the\x20current\x20workspace\x20app\x20binding','Locale\x20for\x20this\x20workspace\x20app\x20profile','format','\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`','number','apps','922390rmnseq','init','21nrHxXU','\x20--app\x20','38800tKOAjf','flag','Risk\x20level\x20for\x20this\x20workspace\x20app\x20profile','Workspace\x20','keys','locale','\x22\x20not\x20found.','15JGVbLE','Invalid\x20appcode:\x20','defaultFormat','Target\x20environment','string','81hTbpbX','2LfbKxU','object'];a182_0x47cf=function(){return _0x609c0b;};return a182_0x47cf();}function collectWorkspaceProfileOverrides(_0x5f5c07){const _0x1403a4=a182_0x382459,_0x12fec3={},_0x8abab3=_0x5f5c07[_0x1403a4(0x190)](_0x1403a4(0x18c)),_0x206169=_0x5f5c07[_0x1403a4(0x190)]('apiDir'),_0x119757=_0x5f5c07[_0x1403a4(0x190)](_0x1403a4(0x17a)),_0x1724ef=_0x5f5c07[_0x1403a4(0x172)](_0x1403a4(0x194)),_0x340189=_0x5f5c07[_0x1403a4(0x190)](_0x1403a4(0x184)),_0xf9991d=_0x5f5c07[_0x1403a4(0x190)](_0x1403a4(0x176));if(_0x8abab3)_0x12fec3[_0x1403a4(0x18c)]=_0x8abab3;if(_0x206169)_0x12fec3[_0x1403a4(0x163)]=_0x206169;if(_0x119757)_0x12fec3[_0x1403a4(0x169)]=_0x119757;if(_0x1724ef!==undefined&&_0x1724ef!=='')_0x12fec3[_0x1403a4(0x194)]=Number(_0x1724ef);if(_0x340189)_0x12fec3[_0x1403a4(0x184)]=_0x340189;if(_0xf9991d)_0x12fec3[_0x1403a4(0x176)]=_0xf9991d;return _0x12fec3;}async function validateWorkspaceArgs(_0x317d61){const _0xa19b13=a182_0x382459,_0x1fb160=_0x317d61[_0xa19b13(0x190)](_0xa19b13(0x183))[_0xa19b13(0x18a)](),_0x1c8556=_0x317d61[_0xa19b13(0x190)](_0xa19b13(0x164))['trim']();if(!_0x1fb160&&!_0x1c8556)throw CliErrors[_0xa19b13(0x199)](_0xa19b13(0x186),_0xa19b13(0x182)+CLI_BIN_NAME+_0xa19b13(0x16a)+CLI_BIN_NAME+_0xa19b13(0x19e));if(_0x1c8556)assertValidAppcode(_0x1c8556);}function resolveKnownApps(){const _0x5ede78=a182_0x382459,{config:_0x8503ed,layers:_0x1a778c}=readRawConfigWithLayers(),_0x2b3494=isRecord(_0x8503ed[_0x5ede78(0x16c)])?_0x8503ed[_0x5ede78(0x16c)]:{},_0x4a329e=isRecord(_0x1a778c['globalConfig'][_0x5ede78(0x16c)])?_0x1a778c[_0x5ede78(0x165)][_0x5ede78(0x16c)]:{};return{..._0x4a329e,..._0x2b3494};}async function configureWorkspace(_0x51fede,_0x3ce0f2){const _0x4b43cc=a182_0x382459,_0x4e62be=_0x51fede[_0x4b43cc(0x190)]('app')[_0x4b43cc(0x18a)](),_0x3f46b1=_0x51fede['str'](_0x4b43cc(0x164))[_0x4b43cc(0x18a)](),_0x2e75e4=_0x4e62be||_0x3f46b1;if(!_0x2e75e4)throw CliErrors[_0x4b43cc(0x199)](_0x4b43cc(0x186),_0x4b43cc(0x182)+CLI_BIN_NAME+'\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`'+CLI_BIN_NAME+'\x20workspace\x20use\x20--app\x20<name>`.');if(_0x3f46b1)assertValidAppcode(_0x3f46b1);const _0x36c716=resolveWriteConfigPath('project'),_0x5ca9f2=readConfigFile(_0x36c716),_0x2d4e5c=resolveKnownApps(),_0x456bb2=isRecord(_0x5ca9f2[_0x4b43cc(0x16c)])?{..._0x5ca9f2['apps']}:{},_0x187840=cloneProfile(_0x456bb2[_0x2e75e4]),_0x2f3fbd=sanitizeProfile(_0x2d4e5c[_0x2e75e4]),_0x5a928c=_0x3f46b1?{}:_0x2f3fbd,_0x1a7d51=_0x3f46b1||_0x5a928c[_0x4b43cc(0x164)];if(!_0x1a7d51){const _0x3741c5=Object[_0x4b43cc(0x175)](_0x2d4e5c),_0x54a6b7=_0x3741c5[_0x4b43cc(0x180)]===0x0?'Use\x20`'+CLI_BIN_NAME+_0x4b43cc(0x188)+_0x3ce0f2+_0x4b43cc(0x170)+_0x2e75e4+'\x20--appcode\x20<code>`.':_0x4b43cc(0x185)+_0x3741c5[_0x4b43cc(0x18b)](',\x20');throw CliErrors['validation']('App\x20\x22'+_0x2e75e4+_0x4b43cc(0x177),_0x54a6b7);}assertValidAppcode(String(_0x1a7d51));const _0x5dc60b={..._0x5a928c,..._0x187840,'appcode':String(_0x1a7d51),...collectWorkspaceProfileOverrides(_0x51fede)};return _0x456bb2[_0x2e75e4]=_0x5dc60b,_0x5ca9f2['apps']=_0x456bb2,_0x5ca9f2[_0x4b43cc(0x195)]=_0x2e75e4,delete _0x5ca9f2['appcode'],delete _0x5ca9f2[_0x4b43cc(0x183)],_0x5dc60b['env']&&(_0x5ca9f2[_0x4b43cc(0x18c)]=_0x5dc60b['env']),writeConfigFile(_0x36c716,_0x5ca9f2),{'ok':!![],'message':_0x4b43cc(0x174)+(_0x3ce0f2===_0x4b43cc(0x16e)?_0x4b43cc(0x197):'updated')+':\x20'+_0x2e75e4+'\x20(appcode:\x20'+_0x5dc60b[_0x4b43cc(0x164)]+_0x4b43cc(0x189)+_0x36c716+'.\x20Credentials:\x20not\x20written.','data':{'operation':_0x4b43cc(0x18e)+_0x3ce0f2,'configPath':_0x36c716,'app':_0x2e75e4,'appcode':_0x5dc60b['appcode'],'env':_0x5dc60b[_0x4b43cc(0x18c)]??null,'credentialsWritten':![]}};}const workspaceInitDefinition={'service':a182_0x382459(0x18f),'command':'init','description':a182_0x382459(0x18d),'risk':a182_0x382459(0x19d),'requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x433c7c=>configureWorkspace(_0x433c7c,a182_0x382459(0x16e))},workspaceUseDefinition={'service':a182_0x382459(0x18f),'command':a182_0x382459(0x192),'description':a182_0x382459(0x167),'risk':a182_0x382459(0x19d),'requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x4659f7=>configureWorkspace(_0x4659f7,'use')};export const workspaceDefinitions=[workspaceInitDefinition,workspaceUseDefinition,workspaceAddDefinition,workspaceRemoveDefinition];export{WORKSPACE_USAGE};
@@ -1 +1 @@
1
- const a182_0xfa9283=a182_0x584b;(function(_0x453976,_0x2788d2){const _0x4ee7df=a182_0x584b,_0x38bc8d=_0x453976();while(!![]){try{const _0x83a4ad=parseInt(_0x4ee7df(0xa3))/0x1*(-parseInt(_0x4ee7df(0xa2))/0x2)+parseInt(_0x4ee7df(0xae))/0x3*(parseInt(_0x4ee7df(0xaa))/0x4)+-parseInt(_0x4ee7df(0xa9))/0x5*(parseInt(_0x4ee7df(0xa6))/0x6)+-parseInt(_0x4ee7df(0xa7))/0x7*(parseInt(_0x4ee7df(0xac))/0x8)+-parseInt(_0x4ee7df(0xad))/0x9*(-parseInt(_0x4ee7df(0xab))/0xa)+-parseInt(_0x4ee7df(0xa0))/0xb*(parseInt(_0x4ee7df(0xa5))/0xc)+parseInt(_0x4ee7df(0xa8))/0xd;if(_0x83a4ad===_0x2788d2)break;else _0x38bc8d['push'](_0x38bc8d['shift']());}catch(_0x1a9c37){_0x38bc8d['push'](_0x38bc8d['shift']());}}}(a182_0x2086,0xac2cf));function a182_0x2086(){const _0x44371c=['222HSTBfR','high-risk-write','2533157JSzgNe','workspace\x20remove','2174116vJbuhu','1wDBceq','App\x20profile\x20name\x20to\x20remove','12gPCUZX','258qKsCBE','133gVpEIa','18250518lSmauv','40555QIUHbL','5348zYAnrW','5420UWhHCs','27512nhMDsd','15507mAVvYv'];a182_0x2086=function(){return _0x44371c;};return a182_0x2086();}import{buildAppRemoveFlags,runAppRemove,validateAppName}from'../../commands/common/app-registry.js';function a182_0x584b(_0x5a7bb5,_0x4469d1){_0x5a7bb5=_0x5a7bb5-0x9f;const _0x2086a2=a182_0x2086();let _0x584b8e=_0x2086a2[_0x5a7bb5];return _0x584b8e;}export const workspaceRemoveDefinition={'service':'workspace','command':'remove','description':'Remove\x20an\x20app\x20profile\x20from\x20the\x20current\x20workspace\x20(or\x20--global)','risk':a182_0xfa9283(0x9f),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':'name','description':a182_0xfa9283(0xa4),'required':!![]}],'flags':buildAppRemoveFlags(),'validate':_0x382e98=>validateAppName(_0x382e98,a182_0xfa9283(0xa1)),'execute':_0x1d8e05=>runAppRemove(_0x1d8e05,a182_0xfa9283(0xa1))};
1
+ function a183_0x5c9d(_0x1552cf,_0x54daff){_0x1552cf=_0x1552cf-0xf3;const _0x596bb1=a183_0x596b();let _0x5c9d6a=_0x596bb1[_0x1552cf];return _0x5c9d6a;}const a183_0x557431=a183_0x5c9d;(function(_0x3d92de,_0x260795){const _0x78f2f=a183_0x5c9d,_0x474464=_0x3d92de();while(!![]){try{const _0x17ccf0=-parseInt(_0x78f2f(0xf5))/0x1*(-parseInt(_0x78f2f(0xf6))/0x2)+-parseInt(_0x78f2f(0x101))/0x3*(parseInt(_0x78f2f(0xfb))/0x4)+-parseInt(_0x78f2f(0xf7))/0x5*(parseInt(_0x78f2f(0x103))/0x6)+-parseInt(_0x78f2f(0xf4))/0x7*(-parseInt(_0x78f2f(0x100))/0x8)+-parseInt(_0x78f2f(0xf9))/0x9+-parseInt(_0x78f2f(0xff))/0xa+-parseInt(_0x78f2f(0xfd))/0xb*(-parseInt(_0x78f2f(0x102))/0xc);if(_0x17ccf0===_0x260795)break;else _0x474464['push'](_0x474464['shift']());}catch(_0x25984d){_0x474464['push'](_0x474464['shift']());}}}(a183_0x596b,0x3f783));import{buildAppRemoveFlags,runAppRemove,validateAppName}from'../../commands/common/app-registry.js';export const workspaceRemoveDefinition={'service':a183_0x557431(0xf8),'command':a183_0x557431(0xfa),'description':a183_0x557431(0xfe),'risk':a183_0x557431(0xf3),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':'name','description':'App\x20profile\x20name\x20to\x20remove','required':!![]}],'flags':buildAppRemoveFlags(),'validate':_0x864dfa=>validateAppName(_0x864dfa,'workspace\x20remove'),'execute':_0x112e52=>runAppRemove(_0x112e52,a183_0x557431(0xfc))};function a183_0x596b(){const _0x20508e=['11821HeNXQw','70kBpxNt','685oCFYNg','workspace','1149057KudNyr','remove','54220BJvWRR','workspace\x20remove','2600147VvYyrk','Remove\x20an\x20app\x20profile\x20from\x20the\x20current\x20workspace\x20(or\x20--global)','3269600zdiyvw','8DxMcfX','105ktDyEs','24chLzDu','2718ydvLed','high-risk-write','2552207gLbkaq'];a183_0x596b=function(){return _0x20508e;};return a183_0x596b();}
@@ -1 +1 @@
1
- const a183_0x1a6d76=a183_0x3701;(function(_0x258080,_0x4ccb44){const _0x5069ce=a183_0x3701,_0x2c3ed9=_0x258080();while(!![]){try{const _0x553862=parseInt(_0x5069ce(0x14d))/0x1*(parseInt(_0x5069ce(0x12d))/0x2)+-parseInt(_0x5069ce(0x13f))/0x3+-parseInt(_0x5069ce(0x146))/0x4+-parseInt(_0x5069ce(0x13d))/0x5*(-parseInt(_0x5069ce(0x149))/0x6)+-parseInt(_0x5069ce(0x12f))/0x7*(-parseInt(_0x5069ce(0x135))/0x8)+-parseInt(_0x5069ce(0x126))/0x9+parseInt(_0x5069ce(0x144))/0xa;if(_0x553862===_0x4ccb44)break;else _0x2c3ed9['push'](_0x2c3ed9['shift']());}catch(_0x8f9173){_0x2c3ed9['push'](_0x2c3ed9['shift']());}}}(a183_0xb505,0xf1873));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=[a183_0x1a6d76(0x131),a183_0x1a6d76(0x128),a183_0x1a6d76(0x137),a183_0x1a6d76(0x134),a183_0x1a6d76(0x139)];export const TOP_LEVEL_CONFIG_KEYS=new Set([a183_0x1a6d76(0x14e),a183_0x1a6d76(0x12c),a183_0x1a6d76(0x137),a183_0x1a6d76(0x134),'cookie',a183_0x1a6d76(0x128),a183_0x1a6d76(0x13a)]);export const CONFIG_ENUM_VALUES={'env':[...RABETBASE_ENV_VALUES],'format':[...RABETBASE_OUTPUT_FORMAT_VALUES]};export function formatConfigKeyList(_0x2d3ae1){const _0x1d2707=a183_0x1a6d76;return[..._0x2d3ae1][_0x1d2707(0x14b)](',\x20');}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function isTopLevelConfigKey(_0x56ec32){const _0xc58d3a=a183_0x1a6d76;return TOP_LEVEL_CONFIG_KEYS[_0xc58d3a(0x141)](_0x56ec32);}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){return'Config\x20key\x20('+getTopLevelConfigKeySummary()+')';}function a183_0xb505(){const _0x4affe8=['length','10027458NukEXS','app','accessKey','trim','toLowerCase','entries','env','422RtXZPz','en-US','4515YxSHuJ','API\x20directory\x20path','cookie','Access\x20key','inherit','format','17496zeeNCV','zh-CN','locale','pageSize','riskLevel','apiDir','defaultApp','string','5rgpPvV','apps','5548020HNMzBH','Locale','has','number','keys','7734530Pcoitm','Risk\x20level','2453020ATsuAO','map','Auth\x20cookie','3985422hiswgy','Default\x20page\x20size','join','filter','8141ZzKVAl','appcode'];a183_0xb505=function(){return _0x4affe8;};return a183_0xb505();}function a183_0x3701(_0x536adf,_0x39098c){_0x536adf=_0x536adf-0x126;const _0xb5057d=a183_0xb505();let _0x370168=_0xb5057d[_0x536adf];return _0x370168;}export const APP_PROFILE_FLAG_KEY_MAP={'env':a183_0x1a6d76(0x12c),'apiDir':a183_0x1a6d76(0x13a),'cookie':'cookie','accessKey':'accessKey','defaultFormat':a183_0x1a6d76(0x134),'pageSize':a183_0x1a6d76(0x138),'riskLevel':a183_0x1a6d76(0x139),'locale':'locale'};export function getAppProfileFlagDefs(){const _0x48e232=a183_0x1a6d76;return[{'name':'env','type':_0x48e232(0x13c),'description':'Target\x20environment','enum':[...RABETBASE_ENV_VALUES]},{'name':'apiDir','type':_0x48e232(0x13c),'description':_0x48e232(0x130)},{'name':_0x48e232(0x131),'type':'string','description':_0x48e232(0x148),'hidden':!![]},{'name':_0x48e232(0x128),'type':_0x48e232(0x13c),'description':_0x48e232(0x132),'hidden':!![]},{'name':'defaultFormat','type':_0x48e232(0x13c),'description':'Default\x20output\x20format\x20for\x20this\x20app\x20(profile)','enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':'pageSize','type':_0x48e232(0x142),'description':_0x48e232(0x14a)},{'name':_0x48e232(0x139),'type':_0x48e232(0x13c),'description':_0x48e232(0x145),'enum':[...RISK_LEVEL_VALUES]},{'name':_0x48e232(0x137),'type':'string','description':_0x48e232(0x140)}];}export function collectAppProfileOverrides(_0x529886){const _0x32a90f=a183_0x1a6d76,_0x5797dc={};for(const [_0x472055,_0x1bcbcf]of Object[_0x32a90f(0x12b)](APP_PROFILE_FLAG_KEY_MAP)){const _0x2234d5=_0x529886(_0x472055);if(!_0x2234d5)continue;_0x5797dc[_0x1bcbcf]=_0x1bcbcf==='pageSize'?Number(_0x2234d5):_0x2234d5;}return _0x5797dc;}export function buildAppProfileListFields(_0x7efc78){const _0x28ba5f=a183_0x1a6d76;return{'env':_0x7efc78[_0x28ba5f(0x12c)]??null,'apiDir':_0x7efc78[_0x28ba5f(0x13a)]??null,'hasCookie':!!_0x7efc78[_0x28ba5f(0x131)],'hasAccessKey':!!_0x7efc78[_0x28ba5f(0x128)],'format':_0x7efc78['format']??null,'pageSize':_0x7efc78[_0x28ba5f(0x138)]??null,'riskLevel':_0x7efc78['riskLevel']??null,'locale':_0x7efc78[_0x28ba5f(0x137)]??null};}export function buildAppDoctorFields(_0x19f20a,_0x32a92e){const _0x4bfe5b=a183_0x1a6d76;return{'env':{'value':_0x19f20a['env']||_0x32a92e['env'],'source':_0x19f20a['env']?_0x4bfe5b(0x127):'inherit'},'apiDir':{'value':_0x19f20a['apiDir']||_0x32a92e[_0x4bfe5b(0x13a)],'source':_0x19f20a[_0x4bfe5b(0x13a)]?_0x4bfe5b(0x127):_0x4bfe5b(0x133)},'cookie':{'value':_0x19f20a[_0x4bfe5b(0x131)]||_0x32a92e[_0x4bfe5b(0x131)],'source':_0x19f20a[_0x4bfe5b(0x131)]?_0x4bfe5b(0x127):'inherit'},'accessKey':{'value':_0x19f20a[_0x4bfe5b(0x128)]||_0x32a92e[_0x4bfe5b(0x128)],'source':_0x19f20a[_0x4bfe5b(0x128)]?_0x4bfe5b(0x127):'inherit'}};}export function buildCanonicalAppConfig(_0x34ee98,_0xf66008){const _0x17e758=a183_0x1a6d76,_0x1daaf7=_0x34ee98[_0x17e758(0x147)](_0x473c5a=>String(_0x473c5a||'')[_0x17e758(0x129)]())[_0x17e758(0x14c)](Boolean);if(_0x1daaf7[_0x17e758(0x14f)]===0x0)return{};const _0x3b67f3={};for(const _0x1d8cb4 of _0x1daaf7){_0x3b67f3[_0x1d8cb4]=_0xf66008?{'appcode':_0x1d8cb4,'env':_0xf66008}:{'appcode':_0x1d8cb4};}return{'apps':_0x3b67f3,'defaultApp':_0x1daaf7[0x0]};}export function buildCanonicalProjectConfig(_0x175567,_0x283045){const _0xd68321=a183_0x1a6d76,{appCodes:appCodes=[],env:_0x3f36e3,metadata:_0x2bf913}=_0x283045,_0x213c0e={..._0x175567,..._0x2bf913||{}};delete _0x213c0e['appcode'],delete _0x213c0e[_0xd68321(0x127)];if(_0x3f36e3)_0x213c0e[_0xd68321(0x12c)]=_0x3f36e3;else!_0x213c0e[_0xd68321(0x12c)]&&(_0x213c0e[_0xd68321(0x12c)]=DEFAULT_CONFIG_VALUES[_0xd68321(0x12c)]);const _0x4d8896=buildCanonicalAppConfig(appCodes,_0x213c0e[_0xd68321(0x12c)]);return Object[_0xd68321(0x143)](_0x4d8896)[_0xd68321(0x14f)]>0x0&&(_0x213c0e[_0xd68321(0x13e)]=_0x4d8896['apps'],_0x213c0e['defaultApp']=_0x4d8896[_0xd68321(0x13b)]),_0x213c0e;}const LOCALE_MAP={'zh':'zh-CN','zh-cn':'zh-CN','zh_cn':a183_0x1a6d76(0x136),'en':a183_0x1a6d76(0x12e),'en-us':a183_0x1a6d76(0x12e),'en_us':a183_0x1a6d76(0x12e)};export function normalizeLocale(_0x1a53c3){const _0x5a04bc=a183_0x1a6d76;if(!_0x1a53c3)return null;return LOCALE_MAP[_0x1a53c3[_0x5a04bc(0x12a)]()]??null;}
1
+ const a184_0x5bc6f7=a184_0x5c0f;(function(_0x43a467,_0x56d032){const _0x9ddf1=a184_0x5c0f,_0x4dc1bf=_0x43a467();while(!![]){try{const _0x487b72=parseInt(_0x9ddf1(0x124))/0x1*(parseInt(_0x9ddf1(0x122))/0x2)+-parseInt(_0x9ddf1(0x13b))/0x3*(parseInt(_0x9ddf1(0x134))/0x4)+-parseInt(_0x9ddf1(0x11b))/0x5*(-parseInt(_0x9ddf1(0x139))/0x6)+-parseInt(_0x9ddf1(0x137))/0x7*(-parseInt(_0x9ddf1(0x127))/0x8)+parseInt(_0x9ddf1(0x135))/0x9+parseInt(_0x9ddf1(0x11f))/0xa+-parseInt(_0x9ddf1(0x117))/0xb;if(_0x487b72===_0x56d032)break;else _0x4dc1bf['push'](_0x4dc1bf['shift']());}catch(_0x3621ba){_0x4dc1bf['push'](_0x4dc1bf['shift']());}}}(a184_0x2e5b,0xd85cf));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';function a184_0x5c0f(_0x5f1845,_0x39248d){_0x5f1845=_0x5f1845-0x112;const _0x2e5b94=a184_0x2e5b();let _0x5c0f38=_0x2e5b94[_0x5f1845];return _0x5c0f38;}export{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';export const PROJECT_CREATE_INHERITABLE_KEYS=[a184_0x5bc6f7(0x138),a184_0x5bc6f7(0x119),a184_0x5bc6f7(0x133),a184_0x5bc6f7(0x120),'riskLevel'];export const TOP_LEVEL_CONFIG_KEYS=new Set([a184_0x5bc6f7(0x12c),a184_0x5bc6f7(0x13a),a184_0x5bc6f7(0x133),a184_0x5bc6f7(0x120),a184_0x5bc6f7(0x138),a184_0x5bc6f7(0x119),a184_0x5bc6f7(0x130)]);export const CONFIG_ENUM_VALUES={'env':[...RABETBASE_ENV_VALUES],'format':[...RABETBASE_OUTPUT_FORMAT_VALUES]};export function formatConfigKeyList(_0x1d4db6){return[..._0x1d4db6]['join'](',\x20');}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}function a184_0x2e5b(){const _0x3f7bd3=['Default\x20page\x20size','defaultApp','apps','riskLevel','filter','18456614ZvPLNp','entries','accessKey','string','11845AxmfWj','pageSize','defaultFormat','app','814350WsNYoE','format','has','456694JvDUhG','inherit','3JUhTqt','API\x20directory\x20path','Target\x20environment','8qDIXga','length','Default\x20output\x20format\x20for\x20this\x20app\x20(profile)','en-US','trim','appcode','number','map','toLowerCase','apiDir','Access\x20key','zh-CN','locale','188AtoFti','3917781BOoacF','Config\x20key\x20(','10339364nRcaAc','cookie','2148UPwdHr','env','61458YNsopP'];a184_0x2e5b=function(){return _0x3f7bd3;};return a184_0x2e5b();}export function isTopLevelConfigKey(_0x3f89f9){const _0x3ff7e7=a184_0x5bc6f7;return TOP_LEVEL_CONFIG_KEYS[_0x3ff7e7(0x121)](_0x3f89f9);}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x329072=a184_0x5bc6f7;return _0x329072(0x136)+getTopLevelConfigKeySummary()+')';}export const APP_PROFILE_FLAG_KEY_MAP={'env':a184_0x5bc6f7(0x13a),'apiDir':a184_0x5bc6f7(0x130),'cookie':a184_0x5bc6f7(0x138),'accessKey':'accessKey','defaultFormat':a184_0x5bc6f7(0x120),'pageSize':'pageSize','riskLevel':a184_0x5bc6f7(0x115),'locale':a184_0x5bc6f7(0x133)};export function getAppProfileFlagDefs(){const _0x3606e8=a184_0x5bc6f7;return[{'name':_0x3606e8(0x13a),'type':_0x3606e8(0x11a),'description':_0x3606e8(0x126),'enum':[...RABETBASE_ENV_VALUES]},{'name':'apiDir','type':_0x3606e8(0x11a),'description':_0x3606e8(0x125)},{'name':'cookie','type':_0x3606e8(0x11a),'description':'Auth\x20cookie','hidden':!![]},{'name':_0x3606e8(0x119),'type':_0x3606e8(0x11a),'description':_0x3606e8(0x131),'hidden':!![]},{'name':_0x3606e8(0x11d),'type':'string','description':_0x3606e8(0x129),'enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':_0x3606e8(0x11c),'type':_0x3606e8(0x12d),'description':_0x3606e8(0x112)},{'name':_0x3606e8(0x115),'type':_0x3606e8(0x11a),'description':'Risk\x20level','enum':[...RISK_LEVEL_VALUES]},{'name':_0x3606e8(0x133),'type':'string','description':'Locale'}];}export function collectAppProfileOverrides(_0x183217){const _0x1d2288=a184_0x5bc6f7,_0x466ae6={};for(const [_0x3d1318,_0xfab53c]of Object[_0x1d2288(0x118)](APP_PROFILE_FLAG_KEY_MAP)){const _0x5c867c=_0x183217(_0x3d1318);if(!_0x5c867c)continue;_0x466ae6[_0xfab53c]=_0xfab53c===_0x1d2288(0x11c)?Number(_0x5c867c):_0x5c867c;}return _0x466ae6;}export function buildAppProfileListFields(_0x524c03){const _0x291147=a184_0x5bc6f7;return{'env':_0x524c03[_0x291147(0x13a)]??null,'apiDir':_0x524c03[_0x291147(0x130)]??null,'hasCookie':!!_0x524c03[_0x291147(0x138)],'hasAccessKey':!!_0x524c03[_0x291147(0x119)],'format':_0x524c03[_0x291147(0x120)]??null,'pageSize':_0x524c03[_0x291147(0x11c)]??null,'riskLevel':_0x524c03['riskLevel']??null,'locale':_0x524c03[_0x291147(0x133)]??null};}export function buildAppDoctorFields(_0x12bb0f,_0x2864d){const _0x1d3b15=a184_0x5bc6f7;return{'env':{'value':_0x12bb0f[_0x1d3b15(0x13a)]||_0x2864d[_0x1d3b15(0x13a)],'source':_0x12bb0f[_0x1d3b15(0x13a)]?_0x1d3b15(0x11e):'inherit'},'apiDir':{'value':_0x12bb0f['apiDir']||_0x2864d[_0x1d3b15(0x130)],'source':_0x12bb0f[_0x1d3b15(0x130)]?'app':_0x1d3b15(0x123)},'cookie':{'value':_0x12bb0f[_0x1d3b15(0x138)]||_0x2864d[_0x1d3b15(0x138)],'source':_0x12bb0f['cookie']?'app':_0x1d3b15(0x123)},'accessKey':{'value':_0x12bb0f[_0x1d3b15(0x119)]||_0x2864d[_0x1d3b15(0x119)],'source':_0x12bb0f[_0x1d3b15(0x119)]?_0x1d3b15(0x11e):'inherit'}};}export function buildCanonicalAppConfig(_0x2f747a,_0x2660dd){const _0x494132=a184_0x5bc6f7,_0x24ea85=_0x2f747a[_0x494132(0x12e)](_0x42b9b7=>String(_0x42b9b7||'')[_0x494132(0x12b)]())[_0x494132(0x116)](Boolean);if(_0x24ea85[_0x494132(0x128)]===0x0)return{};const _0x31322f={};for(const _0x23049e of _0x24ea85){_0x31322f[_0x23049e]=_0x2660dd?{'appcode':_0x23049e,'env':_0x2660dd}:{'appcode':_0x23049e};}return{'apps':_0x31322f,'defaultApp':_0x24ea85[0x0]};}export function buildCanonicalProjectConfig(_0x3af47f,_0x9b2720){const _0x266a83=a184_0x5bc6f7,{appCodes:appCodes=[],env:_0x369b30,metadata:_0x3c00cd}=_0x9b2720,_0x2fee21={..._0x3af47f,..._0x3c00cd||{}};delete _0x2fee21[_0x266a83(0x12c)],delete _0x2fee21['app'];if(_0x369b30)_0x2fee21[_0x266a83(0x13a)]=_0x369b30;else!_0x2fee21['env']&&(_0x2fee21['env']=DEFAULT_CONFIG_VALUES[_0x266a83(0x13a)]);const _0x8cb661=buildCanonicalAppConfig(appCodes,_0x2fee21[_0x266a83(0x13a)]);return Object['keys'](_0x8cb661)[_0x266a83(0x128)]>0x0&&(_0x2fee21[_0x266a83(0x114)]=_0x8cb661[_0x266a83(0x114)],_0x2fee21[_0x266a83(0x113)]=_0x8cb661[_0x266a83(0x113)]),_0x2fee21;}const LOCALE_MAP={'zh':a184_0x5bc6f7(0x132),'zh-cn':a184_0x5bc6f7(0x132),'zh_cn':'zh-CN','en':a184_0x5bc6f7(0x12a),'en-us':a184_0x5bc6f7(0x12a),'en_us':a184_0x5bc6f7(0x12a)};export function normalizeLocale(_0x42723b){const _0x542e9e=a184_0x5bc6f7;if(!_0x42723b)return null;return LOCALE_MAP[_0x42723b[_0x542e9e(0x12f)]()]??null;}
@@ -1 +1 @@
1
- function a184_0x4378(_0x36e225,_0x477295){_0x36e225=_0x36e225-0x104;const _0x3a78a0=a184_0x3a78();let _0x43787e=_0x3a78a0[_0x36e225];return _0x43787e;}const a184_0x4ec703=a184_0x4378;(function(_0x440fcf,_0x178274){const _0x319e2b=a184_0x4378,_0x3d36a6=_0x440fcf();while(!![]){try{const _0x767de8=-parseInt(_0x319e2b(0x111))/0x1*(-parseInt(_0x319e2b(0x10b))/0x2)+parseInt(_0x319e2b(0x10d))/0x3*(parseInt(_0x319e2b(0x10c))/0x4)+-parseInt(_0x319e2b(0x106))/0x5*(-parseInt(_0x319e2b(0x110))/0x6)+parseInt(_0x319e2b(0x109))/0x7+-parseInt(_0x319e2b(0x10f))/0x8*(parseInt(_0x319e2b(0x104))/0x9)+parseInt(_0x319e2b(0x107))/0xa*(-parseInt(_0x319e2b(0x108))/0xb)+parseInt(_0x319e2b(0x105))/0xc*(parseInt(_0x319e2b(0x10a))/0xd);if(_0x767de8===_0x178274)break;else _0x3d36a6['push'](_0x3d36a6['shift']());}catch(_0x1d5d95){_0x3d36a6['push'](_0x3d36a6['shift']());}}}(a184_0x3a78,0x8ac15));function a184_0x3a78(){const _0x59ccf0=['24lnHuNE','42zbtzdg','88091xlmEdY','2010861gUNJqq','3481080yaipao','515340VHuDsZ','10DrJFQT','11004961ctcEAD','2617419XrWyUQ','26eZckLA','2DJwQIF','20pvQFNI','285249nvVgDT','https://g.lovrabet.com/dist/rabetbase-cli/config/index.json'];a184_0x3a78=function(){return _0x59ccf0;};return a184_0x3a78();}export const CLI_VERSION_POLICY_URL=a184_0x4ec703(0x10e);
1
+ function a185_0x2855(){const _0xd407ac=['16541370XgskeW','80aeBFZa','1062808CwQvFU','1479168BcGsZj','https://g.lovrabet.com/dist/rabetbase-cli/config/index.json','63HvzaKY','6005335RFZbGI','3ynPDDc','2317648FWqKva','1087716ofIIJM','180138EbJJvB'];a185_0x2855=function(){return _0xd407ac;};return a185_0x2855();}function a185_0x5aee(_0x311d6f,_0x5f4731){_0x311d6f=_0x311d6f-0x126;const _0x28552a=a185_0x2855();let _0x5aeee5=_0x28552a[_0x311d6f];return _0x5aeee5;}const a185_0x426835=a185_0x5aee;(function(_0x12f24d,_0x4776a1){const _0x3ede17=a185_0x5aee,_0x597797=_0x12f24d();while(!![]){try{const _0x36875b=parseInt(_0x3ede17(0x12a))/0x1+-parseInt(_0x3ede17(0x12f))/0x2+parseInt(_0x3ede17(0x128))/0x3*(parseInt(_0x3ede17(0x129))/0x4)+parseInt(_0x3ede17(0x12d))/0x5*(-parseInt(_0x3ede17(0x12b))/0x6)+parseInt(_0x3ede17(0x127))/0x7+parseInt(_0x3ede17(0x12e))/0x8*(parseInt(_0x3ede17(0x126))/0x9)+-parseInt(_0x3ede17(0x12c))/0xa;if(_0x36875b===_0x4776a1)break;else _0x597797['push'](_0x597797['shift']());}catch(_0x2bb190){_0x597797['push'](_0x597797['shift']());}}}(a185_0x2855,0x8dd25));export const CLI_VERSION_POLICY_URL=a185_0x426835(0x130);
@@ -1 +1 @@
1
- const a185_0x840f5b=a185_0xc3b2;(function(_0x2bff7c,_0xf3a5cf){const _0x1ed510=a185_0xc3b2,_0x5368aa=_0x2bff7c();while(!![]){try{const _0x2bec71=-parseInt(_0x1ed510(0x178))/0x1*(-parseInt(_0x1ed510(0x16a))/0x2)+-parseInt(_0x1ed510(0x149))/0x3+-parseInt(_0x1ed510(0x146))/0x4+-parseInt(_0x1ed510(0x130))/0x5+-parseInt(_0x1ed510(0x188))/0x6*(-parseInt(_0x1ed510(0x12c))/0x7)+parseInt(_0x1ed510(0x19a))/0x8+parseInt(_0x1ed510(0x176))/0x9;if(_0x2bec71===_0xf3a5cf)break;else _0x5368aa['push'](_0x5368aa['shift']());}catch(_0x13bd3a){_0x5368aa['push'](_0x5368aa['shift']());}}}(a185_0x4e1d,0xbbe5b));export const CLI_BIN_NAME='rabetbase';export const CLI_DISPLAY_NAME=a185_0x840f5b(0x162);export const NPM_PACKAGE_NAME='@lovrabet/rabetbase-cli';function a185_0xc3b2(_0x55e440,_0x4a1b7e){_0x55e440=_0x55e440-0x11b;const _0x4e1d06=a185_0x4e1d();let _0xc3b225=_0x4e1d06[_0x55e440];return _0xc3b225;}export const GLOBAL_FLAGS=[{'name':a185_0x840f5b(0x180),'meowKey':a185_0x840f5b(0x180),'type':a185_0x840f5b(0x155),'description':a185_0x840f5b(0x17b),'hint':a185_0x840f5b(0x167)},{'name':a185_0x840f5b(0x192),'meowKey':'app','type':a185_0x840f5b(0x155),'description':a185_0x840f5b(0x173),'hint':'<name>'},{'name':a185_0x840f5b(0x168),'meowKey':a185_0x840f5b(0x168),'type':a185_0x840f5b(0x155),'description':a185_0x840f5b(0x148),'hint':a185_0x840f5b(0x156)},{'name':a185_0x840f5b(0x174),'meowKey':a185_0x840f5b(0x174),'type':a185_0x840f5b(0x155),'description':a185_0x840f5b(0x16b),'hint':a185_0x840f5b(0x171)},{'name':'jq','meowKey':'jq','type':a185_0x840f5b(0x155),'description':a185_0x840f5b(0x134),'hint':a185_0x840f5b(0x19b)},{'name':'dry-run','meowKey':a185_0x840f5b(0x138),'type':a185_0x840f5b(0x16e),'description':'Preview\x20operation\x20without\x20executing'},{'name':'yes','meowKey':a185_0x840f5b(0x12e),'type':a185_0x840f5b(0x16e),'description':a185_0x840f5b(0x17a)},{'name':a185_0x840f5b(0x191),'meowKey':a185_0x840f5b(0x14b),'type':'boolean','description':a185_0x840f5b(0x195)},{'name':a185_0x840f5b(0x11b),'meowKey':a185_0x840f5b(0x11b),'type':a185_0x840f5b(0x16e),'description':'Use\x20global\x20config\x20scope'},{'name':a185_0x840f5b(0x12f),'meowKey':'project','type':a185_0x840f5b(0x16e),'description':a185_0x840f5b(0x137)},{'name':'ci','meowKey':'ci','type':'boolean','description':a185_0x840f5b(0x198),'hidden':!![]},{'name':'help','meowKey':'help','type':a185_0x840f5b(0x16e),'description':a185_0x840f5b(0x124)},{'name':a185_0x840f5b(0x172),'meowKey':a185_0x840f5b(0x172),'type':a185_0x840f5b(0x155),'description':a185_0x840f5b(0x133),'hidden':!![]},{'name':'title','meowKey':a185_0x840f5b(0x177),'type':a185_0x840f5b(0x155),'description':a185_0x840f5b(0x185),'hidden':!![]},{'name':a185_0x840f5b(0x18f),'meowKey':a185_0x840f5b(0x18f),'type':a185_0x840f5b(0x16e),'description':a185_0x840f5b(0x14d),'hidden':!![]},{'name':a185_0x840f5b(0x18d),'meowKey':a185_0x840f5b(0x18d),'type':'boolean','description':a185_0x840f5b(0x189),'hidden':!![]},{'name':a185_0x840f5b(0x18a),'meowKey':a185_0x840f5b(0x18a),'type':'string','description':a185_0x840f5b(0x14f),'hidden':!![]},{'name':a185_0x840f5b(0x150),'meowKey':a185_0x840f5b(0x150),'type':'string','description':a185_0x840f5b(0x128),'hidden':!![]},{'name':a185_0x840f5b(0x182),'meowKey':a185_0x840f5b(0x182),'type':a185_0x840f5b(0x155),'description':a185_0x840f5b(0x144),'hidden':!![]},{'name':a185_0x840f5b(0x135),'meowKey':a185_0x840f5b(0x135),'type':a185_0x840f5b(0x16e),'description':a185_0x840f5b(0x15a),'hidden':!![]},{'name':a185_0x840f5b(0x141),'meowKey':a185_0x840f5b(0x15d),'type':a185_0x840f5b(0x16e),'description':'Enable\x20BFF\x20save','hidden':!![]},{'name':'id','meowKey':'id','type':a185_0x840f5b(0x155),'description':a185_0x840f5b(0x194),'hidden':!![]},{'name':a185_0x840f5b(0x17f),'meowKey':a185_0x840f5b(0x17f),'type':a185_0x840f5b(0x155),'description':a185_0x840f5b(0x123),'hidden':!![]},{'name':a185_0x840f5b(0x11f),'meowKey':'file','type':'string','description':a185_0x840f5b(0x170),'hidden':!![]},{'name':a185_0x840f5b(0x190),'meowKey':a185_0x840f5b(0x190),'type':a185_0x840f5b(0x155),'description':a185_0x840f5b(0x15e),'hidden':!![]},{'name':a185_0x840f5b(0x16f),'meowKey':'sqlName','type':a185_0x840f5b(0x155),'description':'SQL\x20name','hidden':!![]},{'name':a185_0x840f5b(0x136),'meowKey':a185_0x840f5b(0x136),'type':a185_0x840f5b(0x155),'description':'SQL\x20name','hidden':!![]},{'name':'db-id','meowKey':a185_0x840f5b(0x13f),'type':a185_0x840f5b(0x155),'description':a185_0x840f5b(0x13b),'hidden':!![]},{'name':'dbid','meowKey':'dbid','type':a185_0x840f5b(0x155),'description':'DB\x20ID','hidden':!![]},{'name':a185_0x840f5b(0x199),'meowKey':a185_0x840f5b(0x199),'type':'string','description':a185_0x840f5b(0x166),'hidden':!![]},{'name':a185_0x840f5b(0x11e),'meowKey':a185_0x840f5b(0x17e),'type':'string','description':'Description\x20file','hidden':!![]},{'name':a185_0x840f5b(0x13e),'meowKey':a185_0x840f5b(0x13e),'type':a185_0x840f5b(0x155),'description':a185_0x840f5b(0x160),'hidden':!![]},{'name':'pagesize','meowKey':a185_0x840f5b(0x18e),'type':a185_0x840f5b(0x155),'description':a185_0x840f5b(0x13a),'hidden':!![]},{'name':a185_0x840f5b(0x121),'meowKey':a185_0x840f5b(0x121),'type':'string','description':a185_0x840f5b(0x18b),'hidden':!![]},{'name':a185_0x840f5b(0x151),'meowKey':a185_0x840f5b(0x151),'type':a185_0x840f5b(0x155),'description':'Code\x20filter','hidden':!![]},{'name':a185_0x840f5b(0x15f),'meowKey':a185_0x840f5b(0x15f),'type':a185_0x840f5b(0x155),'description':a185_0x840f5b(0x131),'hidden':!![]},{'name':a185_0x840f5b(0x154),'meowKey':'schemas','type':'string','description':a185_0x840f5b(0x169),'hidden':!![]},{'name':'operation','meowKey':a185_0x840f5b(0x158),'type':a185_0x840f5b(0x155),'description':'Operation\x20type','hidden':!![]},{'name':a185_0x840f5b(0x183),'meowKey':a185_0x840f5b(0x183),'type':a185_0x840f5b(0x155),'description':a185_0x840f5b(0x142),'hidden':!![]},{'name':a185_0x840f5b(0x13d),'meowKey':a185_0x840f5b(0x152),'type':a185_0x840f5b(0x16e),'description':a185_0x840f5b(0x16c),'hidden':!![]},{'name':a185_0x840f5b(0x127),'meowKey':'key','type':'string','description':a185_0x840f5b(0x139),'hidden':!![]},{'name':a185_0x840f5b(0x140),'meowKey':'value','type':a185_0x840f5b(0x155),'description':a185_0x840f5b(0x163),'hidden':!![]},{'name':'tags','meowKey':'tags','type':a185_0x840f5b(0x155),'description':a185_0x840f5b(0x145),'hidden':!![]},{'name':a185_0x840f5b(0x132),'meowKey':a185_0x840f5b(0x132),'type':'boolean','description':'Read\x20value\x20from\x20stdin','hidden':!![]},{'name':'from-env','meowKey':a185_0x840f5b(0x181),'type':'string','description':a185_0x840f5b(0x17d),'hidden':!![]},{'name':a185_0x840f5b(0x12d),'meowKey':'reveal','type':'boolean','description':a185_0x840f5b(0x19c),'hidden':!![]},{'name':a185_0x840f5b(0x129),'meowKey':a185_0x840f5b(0x129),'type':a185_0x840f5b(0x16e),'description':a185_0x840f5b(0x125),'hidden':!![]},{'name':'confirm','meowKey':a185_0x840f5b(0x11d),'type':a185_0x840f5b(0x16e),'description':a185_0x840f5b(0x179),'hidden':!![]},{'name':a185_0x840f5b(0x13c),'meowKey':a185_0x840f5b(0x13c),'type':a185_0x840f5b(0x16e),'description':'Use\x20remote','hidden':!![]},{'name':a185_0x840f5b(0x184),'meowKey':'verbose','type':a185_0x840f5b(0x16e),'description':a185_0x840f5b(0x159),'hidden':!![]},{'name':a185_0x840f5b(0x196),'meowKey':'expectedCount','type':a185_0x840f5b(0x155),'description':a185_0x840f5b(0x120),'hidden':!![]},{'name':a185_0x840f5b(0x143),'meowKey':a185_0x840f5b(0x143),'type':'string','description':'Menu\x20label','hidden':!![]},{'name':a185_0x840f5b(0x15b),'meowKey':a185_0x840f5b(0x17c),'type':'string','description':a185_0x840f5b(0x14e),'hidden':!![]},{'name':a185_0x840f5b(0x12a),'meowKey':a185_0x840f5b(0x12a),'type':a185_0x840f5b(0x155),'description':a185_0x840f5b(0x157),'hidden':!![]},{'name':a185_0x840f5b(0x15c),'meowKey':a185_0x840f5b(0x165),'type':a185_0x840f5b(0x155),'description':a185_0x840f5b(0x18c),'hidden':!![]},{'name':a185_0x840f5b(0x161),'meowKey':a185_0x840f5b(0x122),'type':a185_0x840f5b(0x155),'description':a185_0x840f5b(0x193),'hidden':!![]},{'name':a185_0x840f5b(0x197),'meowKey':'expectedChildrenCount','type':a185_0x840f5b(0x155),'description':a185_0x840f5b(0x153),'hidden':!![]},{'name':'menu-ids','meowKey':a185_0x840f5b(0x11c),'type':'string','description':'Comma-separated\x20menu\x20IDs','hidden':!![]},{'name':'task-id','meowKey':a185_0x840f5b(0x126),'type':a185_0x840f5b(0x155),'description':a185_0x840f5b(0x16d),'hidden':!![]},{'name':a185_0x840f5b(0x14a),'meowKey':a185_0x840f5b(0x175),'type':'string','description':a185_0x840f5b(0x12b),'hidden':!![]},{'name':'function-node','meowKey':a185_0x840f5b(0x147),'type':'string','description':a185_0x840f5b(0x14c),'hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set(['appcode',a185_0x840f5b(0x192),a185_0x840f5b(0x168),a185_0x840f5b(0x174),'jq',a185_0x840f5b(0x187),a185_0x840f5b(0x12e),a185_0x840f5b(0x191),'ci']);export function buildMeowFlags(){const _0x52e8c8=a185_0x840f5b;return Object['fromEntries'](GLOBAL_FLAGS[_0x52e8c8(0x164)](_0x33af9d=>[_0x33af9d[_0x52e8c8(0x186)],{'type':_0x33af9d[_0x52e8c8(0x17f)]}]));}function a185_0x4e1d(){const _0x147401=['Clear','Parent\x20menu\x20id','Output\x20path','params','code','skipImports','Expected\x20current\x20child\x20count','schemas','string','production\x20|\x20daily','Menu\x20sort\x20value','operation','Verbose\x20output','Apply\x20to\x20all','parent-id','expect-parent-id','enableBffSave','SQL\x20code','sql','Page\x20number','expect-path','Rabetbase\x20CLI','Config\x20value','map','expectParentId','Description','<code>','env','Schemas','1522olmhYK','Output\x20format','Skip\x20import\x20generation','Asynchronous\x20task\x20ID','boolean','sql-name','File\x20path','json\x20|\x20pretty\x20|\x20compress','name','Select\x20app\x20profile\x20by\x20name','format','operationType','12543201nVNzal','title','1583azfpUP','Confirm\x20destructive\x20action','Skip\x20confirmation\x20for\x20high-risk\x20writes','Override\x20appcode','parentId','Read\x20value\x20from\x20environment\x20variable','descriptionFile','type','appcode','fromEnv','datasetcode','target','verbose','Title','meowKey','dry-run','5334zboTpH','Watch\x20mode','output','Keyword\x20filter','Expected\x20current\x20parent\x20menu\x20id','watch','pagesize','clear','sqlcode','non-interactive','app','Expected\x20current\x20menu\x20path','Record\x20ID','Force\x20non-interactive\x20mode\x20(CI)','expected-count','expected-children-count','Alias\x20for\x20--non-interactive','description','2222880kVOSLf','<expr>','Reveal\x20sensitive\x20value','global','menuIds','confirm','description-file','file','Expected\x20affected\x20count','keyword','expectPath','Type\x20filter','Show\x20help','Force\x20overwrite','taskId','key','JSON\x20params','force','sort','Operation\x20type','10367xTeoUD','reveal','yes','project','3440215dDcfmo','SQL\x20string','stdin','Name','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','all','sqlname','Use\x20project\x20config\x20scope','dryRun','Config\x20key','Page\x20size','DB\x20ID','remote','skip-imports','page','dbId','value','enable-bff-save','Target\x20path','label','Dataset\x20code','Tags','5157352wIexHk','functionNode','Environment','4337439RSHWTn','operation-type','nonInteractive','Function\x20node'];a185_0x4e1d=function(){return _0x147401;};return a185_0x4e1d();}
1
+ const a186_0x95c00e=a186_0x3c8a;(function(_0x57cf17,_0x132d3e){const _0x31f4a6=a186_0x3c8a,_0xb02353=_0x57cf17();while(!![]){try{const _0x76efc2=-parseInt(_0x31f4a6(0x167))/0x1*(-parseInt(_0x31f4a6(0x1cf))/0x2)+-parseInt(_0x31f4a6(0x1ba))/0x3*(parseInt(_0x31f4a6(0x192))/0x4)+parseInt(_0x31f4a6(0x17f))/0x5+-parseInt(_0x31f4a6(0x18c))/0x6+-parseInt(_0x31f4a6(0x175))/0x7*(parseInt(_0x31f4a6(0x168))/0x8)+parseInt(_0x31f4a6(0x17b))/0x9+-parseInt(_0x31f4a6(0x1a6))/0xa*(parseInt(_0x31f4a6(0x1b0))/0xb);if(_0x76efc2===_0x132d3e)break;else _0xb02353['push'](_0xb02353['shift']());}catch(_0x39fe24){_0xb02353['push'](_0xb02353['shift']());}}}(a186_0xb310,0x4efa8));export const CLI_BIN_NAME=a186_0x95c00e(0x1ad);function a186_0xb310(){const _0x5a01cb=['1717965GgsjRP','Apply\x20to\x20all','help','params','Use\x20global\x20config\x20scope','Menu\x20sort\x20value','enable-bff-save','Config\x20key','Keyword\x20filter','Use\x20project\x20config\x20scope','Watch\x20mode','<expr>','Description','443292fLczhJ','Code\x20filter','sort','operation-type','Operation\x20type','all','12VCOjGc','expected-count','Show\x20help','skipImports','Rabetbase\x20CLI','clear','SQL\x20name','Read\x20value\x20from\x20environment\x20variable','Title','operation','Output\x20path','Clear','Target\x20path','code','Use\x20remote','Skip\x20confirmation\x20for\x20high-risk\x20writes','Page\x20size','fromEnv','menuIds','skip-imports','10whhwXM','reveal','title','Config\x20value','description','operationType','json\x20|\x20pretty\x20|\x20compress','rabetbase','<name>','Function\x20node','9049040doKDea','expectedChildrenCount','expected-children-count','key','project','stdin','Preview\x20operation\x20without\x20executing','Record\x20ID','Force\x20overwrite','verbose','203571pGOkUU','Expected\x20current\x20menu\x20path','yes','schemas','tags','Type\x20filter','remote','@lovrabet/rabetbase-cli','from-env','expectPath','keyword','type','Schemas','Comma-separated\x20menu\x20IDs','confirm','sql','Force\x20non-interactive\x20mode\x20(CI)','Output\x20format','dry-run','description-file','watch','283456SHkzNN','SQL\x20code','Expected\x20current\x20parent\x20menu\x20id','sqlcode','expect-parent-id','function-node','Expected\x20current\x20child\x20count','SQL\x20string','app','non-interactive','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','dbid','sql-name','enableBffSave','env','name','nonInteractive','format','string','Environment','Expected\x20affected\x20count','Enable\x20BFF\x20save','output','Name','label','Confirm\x20destructive\x20action','appcode','JSON\x20params','4MSsOYb','756160WhQfBw','pagesize','page','sqlname','dbId','force','file','Reveal\x20sensitive\x20value','<code>','Menu\x20label','DB\x20ID','Read\x20value\x20from\x20stdin','Tags','7UXnovt','target','taskId','global','datasetcode','boolean','5468436ETQzve','fromEntries','File\x20path','expectParentId'];a186_0xb310=function(){return _0x5a01cb;};return a186_0xb310();}export const CLI_DISPLAY_NAME=a186_0x95c00e(0x196);export const NPM_PACKAGE_NAME=a186_0x95c00e(0x1c1);export const GLOBAL_FLAGS=[{'name':a186_0x95c00e(0x165),'meowKey':'appcode','type':a186_0x95c00e(0x1e1),'description':'Override\x20appcode','hint':a186_0x95c00e(0x170)},{'name':'app','meowKey':a186_0x95c00e(0x1d7),'type':a186_0x95c00e(0x1e1),'description':'Select\x20app\x20profile\x20by\x20name','hint':a186_0x95c00e(0x1ae)},{'name':a186_0x95c00e(0x1dd),'meowKey':'env','type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x1e2),'hint':'production\x20|\x20daily'},{'name':a186_0x95c00e(0x1e0),'meowKey':'format','type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x1cb),'hint':a186_0x95c00e(0x1ac)},{'name':'jq','meowKey':'jq','type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x1d9),'hint':a186_0x95c00e(0x18a)},{'name':'dry-run','meowKey':'dryRun','type':a186_0x95c00e(0x17a),'description':a186_0x95c00e(0x1b6)},{'name':a186_0x95c00e(0x1bc),'meowKey':a186_0x95c00e(0x1bc),'type':a186_0x95c00e(0x17a),'description':a186_0x95c00e(0x1a1)},{'name':a186_0x95c00e(0x1d8),'meowKey':a186_0x95c00e(0x1df),'type':a186_0x95c00e(0x17a),'description':a186_0x95c00e(0x1ca)},{'name':a186_0x95c00e(0x178),'meowKey':a186_0x95c00e(0x178),'type':a186_0x95c00e(0x17a),'description':a186_0x95c00e(0x183)},{'name':a186_0x95c00e(0x1b4),'meowKey':a186_0x95c00e(0x1b4),'type':a186_0x95c00e(0x17a),'description':a186_0x95c00e(0x188)},{'name':'ci','meowKey':'ci','type':'boolean','description':'Alias\x20for\x20--non-interactive','hidden':!![]},{'name':a186_0x95c00e(0x181),'meowKey':a186_0x95c00e(0x181),'type':a186_0x95c00e(0x17a),'description':a186_0x95c00e(0x194)},{'name':a186_0x95c00e(0x1de),'meowKey':a186_0x95c00e(0x1de),'type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x162),'hidden':!![]},{'name':a186_0x95c00e(0x1a8),'meowKey':a186_0x95c00e(0x1a8),'type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x19a),'hidden':!![]},{'name':a186_0x95c00e(0x197),'meowKey':a186_0x95c00e(0x197),'type':a186_0x95c00e(0x17a),'description':a186_0x95c00e(0x19d),'hidden':!![]},{'name':a186_0x95c00e(0x1ce),'meowKey':a186_0x95c00e(0x1ce),'type':a186_0x95c00e(0x17a),'description':a186_0x95c00e(0x189),'hidden':!![]},{'name':a186_0x95c00e(0x161),'meowKey':a186_0x95c00e(0x161),'type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x19c),'hidden':!![]},{'name':'params','meowKey':a186_0x95c00e(0x182),'type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x166),'hidden':!![]},{'name':a186_0x95c00e(0x179),'meowKey':a186_0x95c00e(0x179),'type':a186_0x95c00e(0x1e1),'description':'Dataset\x20code','hidden':!![]},{'name':a186_0x95c00e(0x191),'meowKey':'all','type':a186_0x95c00e(0x17a),'description':a186_0x95c00e(0x180),'hidden':!![]},{'name':a186_0x95c00e(0x185),'meowKey':a186_0x95c00e(0x1dc),'type':a186_0x95c00e(0x17a),'description':a186_0x95c00e(0x160),'hidden':!![]},{'name':'id','meowKey':'id','type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x1b7),'hidden':!![]},{'name':'type','meowKey':'type','type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x1bf),'hidden':!![]},{'name':'file','meowKey':a186_0x95c00e(0x16e),'type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x17d),'hidden':!![]},{'name':a186_0x95c00e(0x1d2),'meowKey':a186_0x95c00e(0x1d2),'type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x1d0),'hidden':!![]},{'name':a186_0x95c00e(0x1db),'meowKey':'sqlName','type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x198),'hidden':!![]},{'name':a186_0x95c00e(0x16b),'meowKey':'sqlname','type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x198),'hidden':!![]},{'name':'db-id','meowKey':a186_0x95c00e(0x16c),'type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x172),'hidden':!![]},{'name':'dbid','meowKey':a186_0x95c00e(0x1da),'type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x172),'hidden':!![]},{'name':'description','meowKey':a186_0x95c00e(0x1aa),'type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x18b),'hidden':!![]},{'name':a186_0x95c00e(0x1cd),'meowKey':'descriptionFile','type':a186_0x95c00e(0x1e1),'description':'Description\x20file','hidden':!![]},{'name':a186_0x95c00e(0x16a),'meowKey':a186_0x95c00e(0x16a),'type':a186_0x95c00e(0x1e1),'description':'Page\x20number','hidden':!![]},{'name':a186_0x95c00e(0x169),'meowKey':a186_0x95c00e(0x169),'type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x1a2),'hidden':!![]},{'name':a186_0x95c00e(0x1c4),'meowKey':a186_0x95c00e(0x1c4),'type':'string','description':a186_0x95c00e(0x187),'hidden':!![]},{'name':'code','meowKey':a186_0x95c00e(0x19f),'type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x18d),'hidden':!![]},{'name':a186_0x95c00e(0x1c9),'meowKey':a186_0x95c00e(0x1c9),'type':'string','description':a186_0x95c00e(0x1d6),'hidden':!![]},{'name':a186_0x95c00e(0x1bd),'meowKey':a186_0x95c00e(0x1bd),'type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x1c6),'hidden':!![]},{'name':'operation','meowKey':a186_0x95c00e(0x19b),'type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x190),'hidden':!![]},{'name':a186_0x95c00e(0x176),'meowKey':a186_0x95c00e(0x176),'type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x19e),'hidden':!![]},{'name':a186_0x95c00e(0x1a5),'meowKey':a186_0x95c00e(0x195),'type':'boolean','description':'Skip\x20import\x20generation','hidden':!![]},{'name':a186_0x95c00e(0x1b3),'meowKey':a186_0x95c00e(0x1b3),'type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x186),'hidden':!![]},{'name':'value','meowKey':'value','type':'string','description':a186_0x95c00e(0x1a9),'hidden':!![]},{'name':a186_0x95c00e(0x1be),'meowKey':a186_0x95c00e(0x1be),'type':'string','description':a186_0x95c00e(0x174),'hidden':!![]},{'name':a186_0x95c00e(0x1b5),'meowKey':a186_0x95c00e(0x1b5),'type':'boolean','description':a186_0x95c00e(0x173),'hidden':!![]},{'name':a186_0x95c00e(0x1c2),'meowKey':a186_0x95c00e(0x1a3),'type':'string','description':a186_0x95c00e(0x199),'hidden':!![]},{'name':'reveal','meowKey':a186_0x95c00e(0x1a7),'type':'boolean','description':a186_0x95c00e(0x16f),'hidden':!![]},{'name':a186_0x95c00e(0x16d),'meowKey':a186_0x95c00e(0x16d),'type':a186_0x95c00e(0x17a),'description':a186_0x95c00e(0x1b8),'hidden':!![]},{'name':a186_0x95c00e(0x1c8),'meowKey':a186_0x95c00e(0x1c8),'type':'boolean','description':a186_0x95c00e(0x164),'hidden':!![]},{'name':a186_0x95c00e(0x1c0),'meowKey':a186_0x95c00e(0x1c0),'type':a186_0x95c00e(0x17a),'description':a186_0x95c00e(0x1a0),'hidden':!![]},{'name':a186_0x95c00e(0x1b9),'meowKey':'verbose','type':'boolean','description':'Verbose\x20output','hidden':!![]},{'name':a186_0x95c00e(0x193),'meowKey':'expectedCount','type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x1e3),'hidden':!![]},{'name':a186_0x95c00e(0x163),'meowKey':a186_0x95c00e(0x163),'type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x171),'hidden':!![]},{'name':'parent-id','meowKey':'parentId','type':a186_0x95c00e(0x1e1),'description':'Parent\x20menu\x20id','hidden':!![]},{'name':'sort','meowKey':a186_0x95c00e(0x18e),'type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x184),'hidden':!![]},{'name':a186_0x95c00e(0x1d3),'meowKey':a186_0x95c00e(0x17e),'type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x1d1),'hidden':!![]},{'name':'expect-path','meowKey':a186_0x95c00e(0x1c3),'type':'string','description':a186_0x95c00e(0x1bb),'hidden':!![]},{'name':a186_0x95c00e(0x1b2),'meowKey':a186_0x95c00e(0x1b1),'type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x1d5),'hidden':!![]},{'name':'menu-ids','meowKey':a186_0x95c00e(0x1a4),'type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x1c7),'hidden':!![]},{'name':'task-id','meowKey':a186_0x95c00e(0x177),'type':a186_0x95c00e(0x1e1),'description':'Asynchronous\x20task\x20ID','hidden':!![]},{'name':a186_0x95c00e(0x18f),'meowKey':a186_0x95c00e(0x1ab),'type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x190),'hidden':!![]},{'name':a186_0x95c00e(0x1d4),'meowKey':'functionNode','type':a186_0x95c00e(0x1e1),'description':a186_0x95c00e(0x1af),'hidden':!![]}];function a186_0x3c8a(_0x1b1472,_0x2deeba){_0x1b1472=_0x1b1472-0x160;const _0xb310b6=a186_0xb310();let _0x3c8a23=_0xb310b6[_0x1b1472];return _0x3c8a23;}export const PIPELINE_FLAG_NAMES=new Set([a186_0x95c00e(0x165),a186_0x95c00e(0x1d7),'env',a186_0x95c00e(0x1e0),'jq',a186_0x95c00e(0x1cc),'yes',a186_0x95c00e(0x1d8),'ci']);export function buildMeowFlags(){const _0x2a3878=a186_0x95c00e;return Object[_0x2a3878(0x17c)](GLOBAL_FLAGS['map'](_0x2e3ce3=>[_0x2e3ce3['meowKey'],{'type':_0x2e3ce3[_0x2a3878(0x1c5)]}]));}
@@ -1 +1 @@
1
- const a186_0x3ac461=a186_0x28c8;function a186_0x28c8(_0x286f35,_0x20f18b){_0x286f35=_0x286f35-0xf1;const _0x5e6d21=a186_0x5e6d();let _0x28c8d7=_0x5e6d21[_0x286f35];return _0x28c8d7;}(function(_0x54b46e,_0x31a4c8){const _0x24f2cf=a186_0x28c8,_0x1cfd44=_0x54b46e();while(!![]){try{const _0xba91a8=-parseInt(_0x24f2cf(0xf4))/0x1*(parseInt(_0x24f2cf(0xf8))/0x2)+parseInt(_0x24f2cf(0xf5))/0x3+parseInt(_0x24f2cf(0xf3))/0x4+-parseInt(_0x24f2cf(0xfd))/0x5*(parseInt(_0x24f2cf(0xfa))/0x6)+-parseInt(_0x24f2cf(0xf7))/0x7+-parseInt(_0x24f2cf(0xf1))/0x8+parseInt(_0x24f2cf(0xfe))/0x9*(parseInt(_0x24f2cf(0xfc))/0xa);if(_0xba91a8===_0x31a4c8)break;else _0x1cfd44['push'](_0x1cfd44['shift']());}catch(_0x326ec8){_0x1cfd44['push'](_0x1cfd44['shift']());}}}(a186_0x5e6d,0xa008e));import{DEFAULT_API_DIR}from'../constant/paths.js';export const DEFAULT_CONFIG_VALUES={'env':a186_0x3ac461(0xf9),'format':a186_0x3ac461(0xf2),'locale':a186_0x3ac461(0xfb),'riskLevel':a186_0x3ac461(0xf6),'apiDir':DEFAULT_API_DIR};export const DEFAULT_COMMAND_OUTPUT_FORMAT=a186_0x3ac461(0xf2);function a186_0x5e6d(){const _0x1e3eaf=['16402563vOkAXQ','6282304qDQNaR','compress','2004176opmjlr','89fADNGz','2893857pkdUcT','high-risk-write','6649223CPWnNC','6074RuFsbH','production','342108yarnue','en-US','10tFWifY','55ScNMYH'];a186_0x5e6d=function(){return _0x1e3eaf;};return a186_0x5e6d();}
1
+ const a187_0x594b65=a187_0x18d9;(function(_0x3a8b44,_0x5ee7dc){const _0xbbf95e=a187_0x18d9,_0xf04a64=_0x3a8b44();while(!![]){try{const _0x308750=parseInt(_0xbbf95e(0x1f4))/0x1*(-parseInt(_0xbbf95e(0x1f6))/0x2)+parseInt(_0xbbf95e(0x1f1))/0x3*(parseInt(_0xbbf95e(0x1f2))/0x4)+-parseInt(_0xbbf95e(0x1f5))/0x5+-parseInt(_0xbbf95e(0x1fb))/0x6+-parseInt(_0xbbf95e(0x1f8))/0x7*(parseInt(_0xbbf95e(0x1ef))/0x8)+parseInt(_0xbbf95e(0x1f9))/0x9*(-parseInt(_0xbbf95e(0x1f0))/0xa)+parseInt(_0xbbf95e(0x1fd))/0xb;if(_0x308750===_0x5ee7dc)break;else _0xf04a64['push'](_0xf04a64['shift']());}catch(_0x2f3fc5){_0xf04a64['push'](_0xf04a64['shift']());}}}(a187_0x1cb9,0x6a3f1));import{DEFAULT_API_DIR}from'../constant/paths.js';function a187_0x1cb9(){const _0x1ffbf3=['9UVwFYg','3488515iJzjzV','75004MmidXe','high-risk-write','7hnVjfo','528813pLnSoI','en-US','4282632xeXRNH','production','25154701dliAWc','2408584uOzTik','10EvrKOm','9ZmvXSc','342956xWJnmq','compress'];a187_0x1cb9=function(){return _0x1ffbf3;};return a187_0x1cb9();}export const DEFAULT_CONFIG_VALUES={'env':a187_0x594b65(0x1fc),'format':a187_0x594b65(0x1f3),'locale':a187_0x594b65(0x1fa),'riskLevel':a187_0x594b65(0x1f7),'apiDir':DEFAULT_API_DIR};function a187_0x18d9(_0xa232ea,_0x59d461){_0xa232ea=_0xa232ea-0x1ef;const _0x1cb923=a187_0x1cb9();let _0x18d9c9=_0x1cb923[_0xa232ea];return _0x18d9c9;}export const DEFAULT_COMMAND_OUTPUT_FORMAT=a187_0x594b65(0x1f3);