@lovrabet/rabetbase-cli 2.3.14-beta.1 → 2.3.15-beta.1

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/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/login-success-html.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/generate.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/api/shared.js +1 -1
  19. package/lib/commands/app/add.js +1 -1
  20. package/lib/commands/app/index.js +1 -1
  21. package/lib/commands/app/list.js +1 -1
  22. package/lib/commands/app/remote-directory.js +1 -1
  23. package/lib/commands/app/remove.js +1 -1
  24. package/lib/commands/app/shared.js +1 -1
  25. package/lib/commands/app-config/delete.js +1 -1
  26. package/lib/commands/app-config/get.js +1 -1
  27. package/lib/commands/app-config/index.js +1 -1
  28. package/lib/commands/app-config/list.js +1 -1
  29. package/lib/commands/app-config/set.js +1 -1
  30. package/lib/commands/app-config/shared.js +1 -1
  31. package/lib/commands/auth/index.js +1 -1
  32. package/lib/commands/bff/create.js +1 -1
  33. package/lib/commands/bff/delete.js +1 -1
  34. package/lib/commands/bff/detail.js +1 -1
  35. package/lib/commands/bff/index.js +1 -1
  36. package/lib/commands/bff/list.js +1 -1
  37. package/lib/commands/bff/pull.js +1 -1
  38. package/lib/commands/bff/push.js +1 -1
  39. package/lib/commands/bff/status.js +1 -1
  40. package/lib/commands/cli-skill/index.js +1 -1
  41. package/lib/commands/cli-update.js +1 -1
  42. package/lib/commands/codegen/index.js +1 -1
  43. package/lib/commands/codegen/sdk.js +1 -1
  44. package/lib/commands/codegen/sql.js +1 -1
  45. package/lib/commands/common/app-registry.js +1 -1
  46. package/lib/commands/common/app-selector.js +1 -1
  47. package/lib/commands/common/async-task.js +1 -1
  48. package/lib/commands/common/dry-run.js +1 -1
  49. package/lib/commands/common/flags.js +1 -1
  50. package/lib/commands/common/local-file.js +1 -1
  51. package/lib/commands/common/validate.js +1 -1
  52. package/lib/commands/config/get.js +1 -1
  53. package/lib/commands/config/index.js +1 -1
  54. package/lib/commands/config/list.js +1 -1
  55. package/lib/commands/config/set.js +1 -1
  56. package/lib/commands/config/shared.js +1 -1
  57. package/lib/commands/data/filter.js +1 -1
  58. package/lib/commands/data/getOne.js +1 -1
  59. package/lib/commands/data/index.js +1 -1
  60. package/lib/commands/data/shared.js +1 -1
  61. package/lib/commands/dataset/business-group-update.js +1 -1
  62. package/lib/commands/dataset/capability.js +1 -1
  63. package/lib/commands/dataset/delete.js +1 -1
  64. package/lib/commands/dataset/detail.js +1 -1
  65. package/lib/commands/dataset/extend-update.js +1 -1
  66. package/lib/commands/dataset/field-update.js +1 -1
  67. package/lib/commands/dataset/generate.js +1 -1
  68. package/lib/commands/dataset/index.js +1 -1
  69. package/lib/commands/dataset/list.js +1 -1
  70. package/lib/commands/dataset/operations.js +1 -1
  71. package/lib/commands/dataset/relation-audit.js +1 -1
  72. package/lib/commands/dataset/relation-create.js +1 -1
  73. package/lib/commands/dataset/relation-delete.js +1 -1
  74. package/lib/commands/dataset/relation-shared.js +1 -1
  75. package/lib/commands/dataset/relation-update.js +1 -1
  76. package/lib/commands/dataset/relations.js +1 -1
  77. package/lib/commands/dataset/rename.js +1 -1
  78. package/lib/commands/dataset/restore.js +1 -1
  79. package/lib/commands/db/analysis-batching.js +1 -1
  80. package/lib/commands/db/analyze-batch-plan.js +1 -1
  81. package/lib/commands/db/analyze-cancel.js +1 -1
  82. package/lib/commands/db/analyze-start.js +1 -1
  83. package/lib/commands/db/analyze-status.js +1 -1
  84. package/lib/commands/db/create.js +1 -1
  85. package/lib/commands/db/delete.js +1 -1
  86. package/lib/commands/db/detail.js +1 -1
  87. package/lib/commands/db/diff.js +1 -1
  88. package/lib/commands/db/index.js +1 -1
  89. package/lib/commands/db/list.js +1 -1
  90. package/lib/commands/db/shared.js +1 -1
  91. package/lib/commands/db/tables.js +1 -1
  92. package/lib/commands/db/test.js +1 -1
  93. package/lib/commands/db/update.js +1 -1
  94. package/lib/commands/doctor.js +1 -1
  95. package/lib/commands/file/index.js +1 -1
  96. package/lib/commands/init/index.js +1 -1
  97. package/lib/commands/issue/index.js +1 -1
  98. package/lib/commands/issue/nudge.js +1 -1
  99. package/lib/commands/issue/report.js +1 -1
  100. package/lib/commands/issue/shared.js +1 -1
  101. package/lib/commands/logs/index.js +1 -1
  102. package/lib/commands/menu/asset-update.js +1 -1
  103. package/lib/commands/menu/delete.js +1 -1
  104. package/lib/commands/menu/external-link-create.js +1 -1
  105. package/lib/commands/menu/external-link-update.js +1 -1
  106. package/lib/commands/menu/group-create.js +1 -1
  107. package/lib/commands/menu/group-update.js +1 -1
  108. package/lib/commands/menu/index.js +1 -1
  109. package/lib/commands/menu/list.js +1 -1
  110. package/lib/commands/menu/move.js +1 -1
  111. package/lib/commands/menu/regroup-start.js +1 -1
  112. package/lib/commands/menu/shared/compare-table.js +1 -1
  113. package/lib/commands/menu/shared/delete-plan.js +1 -1
  114. package/lib/commands/menu/shared/facts.js +1 -1
  115. package/lib/commands/menu/shared/index.js +1 -1
  116. package/lib/commands/menu/shared/inquirer.js +1 -1
  117. package/lib/commands/menu/shared/local-pages.js +1 -1
  118. package/lib/commands/menu/shared/logic.js +1 -1
  119. package/lib/commands/menu/shared/mutations.js +1 -1
  120. package/lib/commands/menu/shared/service.js +1 -1
  121. package/lib/commands/menu/shared/sync-core.js +1 -1
  122. package/lib/commands/menu/shared/update-core.js +1 -1
  123. package/lib/commands/menu/shared/valid-url.js +1 -1
  124. package/lib/commands/menu/sync.js +1 -1
  125. package/lib/commands/notification/config-list.js +1 -1
  126. package/lib/commands/notification/index.js +1 -1
  127. package/lib/commands/ocr/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/restore.js +1 -1
  135. package/lib/commands/page/shared.js +1 -1
  136. package/lib/commands/page/standard-page-status.js +1 -1
  137. package/lib/commands/page/sync.js +1 -1
  138. package/lib/commands/permit/index.js +1 -1
  139. package/lib/commands/permit/page-get.js +1 -1
  140. package/lib/commands/permit/page-set.js +1 -1
  141. package/lib/commands/permit/role-apis-set.js +1 -1
  142. package/lib/commands/permit/role-menus-set.js +1 -1
  143. package/lib/commands/permit/role-menus.js +1 -1
  144. package/lib/commands/permit/shared.js +1 -1
  145. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  146. package/lib/commands/project/create/format-elapsed.js +1 -1
  147. package/lib/commands/project/create/main.js +1 -1
  148. package/lib/commands/project/create/non-interactive.js +1 -1
  149. package/lib/commands/project/create/project-template-path.js +1 -1
  150. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  151. package/lib/commands/project/create/use-format-code.js +1 -1
  152. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  153. package/lib/commands/project/index.js +1 -1
  154. package/lib/commands/project/init.js +1 -1
  155. package/lib/commands/project/upgrade.js +1 -1
  156. package/lib/commands/registry.js +1 -1
  157. package/lib/commands/role/create.js +1 -1
  158. package/lib/commands/role/delete.js +1 -1
  159. package/lib/commands/role/detail.js +1 -1
  160. package/lib/commands/role/index.js +1 -1
  161. package/lib/commands/role/list.js +1 -1
  162. package/lib/commands/role/shared.js +1 -1
  163. package/lib/commands/role/update.js +1 -1
  164. package/lib/commands/role/user-add.js +1 -1
  165. package/lib/commands/role/user-remove.js +1 -1
  166. package/lib/commands/role/user-resolve.js +1 -1
  167. package/lib/commands/run/index.js +1 -1
  168. package/lib/commands/schema.js +1 -1
  169. package/lib/commands/sql/create.js +1 -1
  170. package/lib/commands/sql/delete.js +1 -1
  171. package/lib/commands/sql/detail.js +1 -1
  172. package/lib/commands/sql/exec.js +1 -1
  173. package/lib/commands/sql/index.js +1 -1
  174. package/lib/commands/sql/list.js +1 -1
  175. package/lib/commands/sql/pull.js +1 -1
  176. package/lib/commands/sql/push.js +1 -1
  177. package/lib/commands/sql/save.js +1 -1
  178. package/lib/commands/sql/shared.js +1 -1
  179. package/lib/commands/sql/status.js +1 -1
  180. package/lib/commands/sql/validate.js +1 -1
  181. package/lib/commands/task/index.js +1 -1
  182. package/lib/commands/task/status.js +1 -1
  183. package/lib/commands/workspace/add.js +1 -1
  184. package/lib/commands/workspace/index.js +1 -1
  185. package/lib/commands/workspace/remove.js +1 -1
  186. package/lib/config/schema.js +1 -1
  187. package/lib/constant/cdn.js +1 -1
  188. package/lib/constant/cli.js +1 -1
  189. package/lib/constant/defaults.js +1 -1
  190. package/lib/constant/domain.js +1 -1
  191. package/lib/constant/env.js +1 -1
  192. package/lib/constant/output.js +1 -1
  193. package/lib/constant/paths.js +1 -1
  194. package/lib/constant/risk.js +1 -1
  195. package/lib/context/app-resolver.js +1 -1
  196. package/lib/context/auth-resolver.js +1 -1
  197. package/lib/context/config-loader.js +1 -1
  198. package/lib/context.js +1 -1
  199. package/lib/core/alias-resolver.js +1 -1
  200. package/lib/core/api-client.js +1 -1
  201. package/lib/core/bff/config.js +1 -1
  202. package/lib/core/bff/file-system.js +1 -1
  203. package/lib/core/bff/hash.js +1 -1
  204. package/lib/core/bff/lock.js +1 -1
  205. package/lib/core/bff/utils.js +1 -1
  206. package/lib/core/db-resolver.js +1 -1
  207. package/lib/core/page/file-system.js +1 -1
  208. package/lib/core/page/hash.js +1 -1
  209. package/lib/core/page/lock.js +1 -1
  210. package/lib/core/sql-index-auditor.js +1 -1
  211. package/lib/core/sql-sync/config.js +1 -1
  212. package/lib/core/sql-sync/file-system.js +1 -1
  213. package/lib/core/sql-sync/hash.js +1 -1
  214. package/lib/core/sql-sync/lock.js +1 -1
  215. package/lib/core/sql-sync/utils.js +1 -1
  216. package/lib/core/sql-validator.js +1 -1
  217. package/lib/errors.js +1 -1
  218. package/lib/framework/build-all-flags.js +1 -1
  219. package/lib/framework/error-output.js +1 -1
  220. package/lib/framework/explicit-yes.js +1 -1
  221. package/lib/framework/flags.js +1 -1
  222. package/lib/framework/help.js +1 -1
  223. package/lib/framework/index.js +1 -1
  224. package/lib/framework/output.js +1 -1
  225. package/lib/framework/response.js +1 -1
  226. package/lib/framework/runner-alias.js +1 -1
  227. package/lib/framework/runner.js +1 -1
  228. package/lib/framework/schema-export.js +1 -1
  229. package/lib/framework/types.js +1 -1
  230. package/lib/generated/build-info.js +1 -1
  231. package/lib/help.js +1 -1
  232. package/lib/skills/main.js +1 -1
  233. package/lib/skills/npx-skills-add.js +1 -1
  234. package/lib/telemetry/cli-command-trace.js +1 -1
  235. package/lib/telemetry/cli-help-trace.js +1 -1
  236. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  237. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  238. package/lib/telemetry/send-cli-trace-log.js +1 -1
  239. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  240. package/lib/utils/ai_config.js +1 -1
  241. package/lib/utils/apply-jq-filter.js +1 -1
  242. package/lib/utils/cdn-config.js +1 -1
  243. package/lib/utils/check-sdk-version.js +1 -1
  244. package/lib/utils/cli-version-check.js +1 -1
  245. package/lib/utils/cli-version-policy.js +1 -1
  246. package/lib/utils/config.js +1 -1
  247. package/lib/utils/copy-directory.js +1 -1
  248. package/lib/utils/entity-with-id.js +1 -1
  249. package/lib/utils/file-utils.js +1 -1
  250. package/lib/utils/guides-cdn.js +1 -1
  251. package/lib/utils/http-client.js +1 -1
  252. package/lib/utils/is-non-interactive.js +1 -1
  253. package/lib/utils/logger.js +1 -1
  254. package/lib/utils/params.js +1 -1
  255. package/lib/utils/platform.js +1 -1
  256. package/lib/utils/rules-cdn.js +1 -1
  257. package/lib/utils/sleep.js +1 -1
  258. package/lib/utils/template-replacer.js +1 -1
  259. package/lib/utils/update-notice.js +1 -1
  260. package/lib/utils/version.js +1 -1
  261. package/lib/utils/with-active-cookie.js +1 -1
  262. package/lib/utils/write-cli-side-channel.js +1 -1
  263. package/package.json +1 -1
@@ -1 +1 @@
1
- const a176_0x782f01=a176_0x12ea;(function(_0x2c70f5,_0x121119){const _0x189905=a176_0x12ea,_0x2a8852=_0x2c70f5();while(!![]){try{const _0x52b5d6=-parseInt(_0x189905(0x206))/0x1*(-parseInt(_0x189905(0x1f4))/0x2)+parseInt(_0x189905(0x213))/0x3*(-parseInt(_0x189905(0x22b))/0x4)+-parseInt(_0x189905(0x212))/0x5*(parseInt(_0x189905(0x21c))/0x6)+parseInt(_0x189905(0x1fe))/0x7+parseInt(_0x189905(0x1f2))/0x8+-parseInt(_0x189905(0x221))/0x9*(-parseInt(_0x189905(0x21b))/0xa)+parseInt(_0x189905(0x210))/0xb*(-parseInt(_0x189905(0x204))/0xc);if(_0x52b5d6===_0x121119)break;else _0x2a8852['push'](_0x2a8852['shift']());}catch(_0x298ccc){_0x2a8852['push'](_0x2a8852['shift']());}}}(a176_0x26fb,0x19a12));import{mkdir,readFile,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';import{updateSqlQuery}from'../../core/api-client.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';import{getDbName,listDatabases}from'../../core/db-resolver.js';import{scanLocalSqlQueries}from'../../core/sql-sync/file-system.js';import{computeSqlFileHash}from'../../core/sql-sync/hash.js';import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile,writeSqlLockFile}from'../../core/sql-sync/lock.js';import{fileExists}from'../../core/bff/file-system.js';function a176_0x12ea(_0x48a81b,_0x32a476){_0x48a81b=_0x48a81b-0x1ec;const _0x26fb80=a176_0x26fb();let _0x12eaa1=_0x26fb80[_0x48a81b];return _0x12eaa1;}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(_0x5a58c9,_0x16fa3b,_0x286cd3){const _0x4e5e4b=a176_0x12ea,_0x23677a=await scanLocalSqlQueries(_0x5a58c9),_0x300a9d=new Map();for(const _0x38d6a5 of _0x23677a){if(_0x286cd3&&_0x38d6a5[_0x4e5e4b(0x219)]!==_0x286cd3)continue;const _0x133650=_0x300a9d[_0x4e5e4b(0x205)](_0x38d6a5['sqlCode'])??[];_0x133650[_0x4e5e4b(0x20f)](_0x38d6a5),_0x300a9d[_0x4e5e4b(0x1fa)](_0x38d6a5[_0x4e5e4b(0x219)],_0x133650);}if(_0x286cd3&&!_0x300a9d[_0x4e5e4b(0x220)](_0x286cd3))throw CliErrors[_0x4e5e4b(0x20a)](_0x4e5e4b(0x229)+_0x286cd3);const _0xe16cfd=[];for(const [_0x1db2da,_0x37149c]of _0x300a9d[_0x4e5e4b(0x228)]()){if(_0x37149c[_0x4e5e4b(0x224)]===0x1){_0xe16cfd[_0x4e5e4b(0x20f)](_0x37149c[0x0]);continue;}const _0x48703b=_0x16fa3b[_0x4e5e4b(0x20e)][_0x1db2da],_0x39bd07=_0x48703b?.[_0x4e5e4b(0x1fb)],_0x199759=_0x39bd07?_0x37149c[_0x4e5e4b(0x222)](_0x415b4f=>_0x415b4f[_0x4e5e4b(0x202)]!==_0x39bd07):_0x37149c;if(_0x48703b&&_0x199759[_0x4e5e4b(0x224)]===0x1){_0xe16cfd[_0x4e5e4b(0x20f)](_0x199759[0x0]);continue;}throw CliErrors[_0x4e5e4b(0x20a)](_0x4e5e4b(0x1fc)+_0x1db2da+_0x4e5e4b(0x1f6));}return _0xe16cfd;}export const sqlPush={'service':a176_0x782f01(0x20b),'command':a176_0x782f01(0x20f),'description':a176_0x782f01(0x226),'risk':a176_0x782f01(0x223),'flags':[SQLCODE_FLAG_OPTIONAL,{'name':a176_0x782f01(0x22a),'type':a176_0x782f01(0x21a),'description':a176_0x782f01(0x1f5)}],async 'dryRun'(_0x166a26){const _0x4c0ae6=a176_0x782f01,_0x17169e=loadSqlProjectConfig(_0x166a26[_0x4c0ae6(0x227)]),_0x107ce7=await readSqlLockFile(_0x17169e[_0x4c0ae6(0x1ed)]),{appLock:_0x2f7080}=ensureSqlLockScope(_0x107ce7??createEmptySqlLock(),_0x166a26[_0x4c0ae6(0x227)],_0x17169e[_0x4c0ae6(0x1ef)],_0x4c0ae6(0x20f)),_0x3288e2=await getTargetSqlQueries(_0x17169e,_0x2f7080,_0x166a26[_0x4c0ae6(0x20c)]('sqlcode')||undefined),_0x12baaa=[];for(const _0x48c049 of _0x3288e2){const _0x2d5391=await computeSqlFileHash(_0x48c049[_0x4c0ae6(0x211)]),_0xdbf4c8=_0x2f7080[_0x4c0ae6(0x20e)][_0x48c049[_0x4c0ae6(0x219)]],_0x48ec12=!!_0xdbf4c8&&(_0xdbf4c8[_0x4c0ae6(0x1fb)]!==_0x48c049[_0x4c0ae6(0x202)]||!!_0x48c049[_0x4c0ae6(0x21f)]&&_0xdbf4c8['sqlName']!==_0x48c049[_0x4c0ae6(0x21f)]);if(!_0x166a26[_0x4c0ae6(0x1f0)]('force')&&_0xdbf4c8&&_0xdbf4c8['hash']===_0x2d5391&&!_0x48ec12)continue;_0x12baaa[_0x4c0ae6(0x20f)](_0x48c049[_0x4c0ae6(0x219)]);}return{'method':_0x4c0ae6(0x218),'url':'/smartapi/custom/updateUserCustomSql','body':{'sqlCodes':_0x12baaa,'appCode':_0x166a26['appCode']},'description':'Would\x20push\x20'+_0x12baaa[_0x4c0ae6(0x224)]+'\x20SQL\x20file(s)'};},async 'execute'(_0x5e4a88){const _0x476e20=a176_0x782f01,_0x1bdb33=loadSqlProjectConfig(_0x5e4a88['appCode']),_0x5f0627=await readSqlLockFile(_0x1bdb33[_0x476e20(0x1ed)]),{lockData:_0x21cd18,appLock:_0x4bd197}=ensureSqlLockScope(_0x5f0627??createEmptySqlLock(),_0x5e4a88['appCode'],_0x1bdb33[_0x476e20(0x1ef)],'push'),_0x200c16=await getTargetSqlQueries(_0x1bdb33,_0x4bd197,_0x5e4a88['str'](_0x476e20(0x21d))||undefined);if(_0x200c16['length']===0x0)return{'ok':!![],'data':{'pushed':[],'skipped':[],'failed':[]},'message':_0x476e20(0x21e)};const _0x29c986=[],_0x5e6f25=[],_0x24fd0d=[];for(const _0x509ba5 of _0x200c16){const _0x292e5a=_0x4bd197['sqls'][_0x509ba5[_0x476e20(0x219)]];if(!_0x292e5a){_0x24fd0d[_0x476e20(0x20f)]({'sqlCode':_0x509ba5['sqlCode'],'error':_0x476e20(0x20d)});continue;}try{const _0xa144da=await computeSqlFileHash(_0x509ba5[_0x476e20(0x211)]),_0x28c753=_0x292e5a[_0x476e20(0x1fb)]!==_0x509ba5[_0x476e20(0x202)]||!!_0x509ba5[_0x476e20(0x21f)]&&_0x292e5a[_0x476e20(0x21f)]!==_0x509ba5[_0x476e20(0x21f)];if(!_0x5e4a88[_0x476e20(0x1f0)]('force')&&_0x292e5a['hash']===_0xa144da&&!_0x28c753){_0x5e6f25[_0x476e20(0x20f)]({'sqlCode':_0x509ba5[_0x476e20(0x219)],'reason':'unchanged'});continue;}if(_0x292e5a[_0x476e20(0x215)]==null){_0x24fd0d[_0x476e20(0x20f)]({'sqlCode':_0x509ba5[_0x476e20(0x219)],'error':_0x476e20(0x1f8)});continue;}const _0x5e6faa=await readFile(_0x509ba5[_0x476e20(0x211)],'utf8'),_0x176a26=stripLocalSqlMetadata(_0x5e6faa,_0x509ba5[_0x476e20(0x208)]),_0x4f26ef=_0x509ba5[_0x476e20(0x21f)]||_0x292e5a[_0x476e20(0x21f)],_0x621c7f=await resolveTargetDbBinding(_0x5e4a88['appCode'],_0x509ba5,_0x292e5a),_0x489e3a=await updateSqlQuery({'id':_0x292e5a['remoteId'],'appCode':_0x5e4a88[_0x476e20(0x227)],'sqlCode':_0x509ba5[_0x476e20(0x219)],'sqlName':_0x4f26ef,'dbId':_0x621c7f[_0x476e20(0x216)],'version':_0x292e5a[_0x476e20(0x215)],'sqlContent':_0x176a26,'sqlConfig':_0x292e5a['sqlConfig']??undefined}),_0x551100=_0x489e3a[_0x476e20(0x216)]?await getDbName(_0x5e4a88['appCode'],Number(_0x489e3a[_0x476e20(0x216)]))['catch'](()=>_0x621c7f[_0x476e20(0x1ec)]):_0x621c7f[_0x476e20(0x1ec)];_0x4bd197['sqls'][_0x509ba5[_0x476e20(0x219)]]={...buildSqlLockEntry(_0x489e3a,_0x176a26,_0xa144da,{'dbName':_0x551100}),'path':_0x509ba5[_0x476e20(0x202)],'mode':_0x292e5a['mode']},await archivePreviousSqlFileIfNeeded(_0x1bdb33,_0x292e5a[_0x476e20(0x1fb)],_0x509ba5[_0x476e20(0x202)]),_0x29c986[_0x476e20(0x20f)]({'sqlCode':_0x509ba5[_0x476e20(0x219)],'remoteId':_0x292e5a[_0x476e20(0x1f1)]});}catch(_0xf6ab4c){_0x24fd0d[_0x476e20(0x20f)]({'sqlCode':_0x509ba5['sqlCode'],'error':_0xf6ab4c instanceof Error?_0xf6ab4c['message']:String(_0xf6ab4c)});}}return _0x4bd197[_0x476e20(0x209)]=new Date()[_0x476e20(0x1f9)](),await writeSqlLockFile(_0x1bdb33[_0x476e20(0x1ed)],_0x21cd18),{'ok':_0x24fd0d['length']===0x0,'data':{'pushed':_0x29c986,'skipped':_0x5e6f25,'failed':_0x24fd0d},'message':'Push\x20complete:\x20'+_0x29c986['length']+'\x20pushed,\x20'+_0x5e6f25[_0x476e20(0x224)]+'\x20skipped,\x20'+_0x24fd0d['length']+_0x476e20(0x214)};}};function a176_0x26fb(){const _0x1435e7=['sql','str','local\x20SQL\x20is\x20not\x20tracked\x20by\x20sql.lock.json;\x20use\x20`rabetbase\x20sql\x20create`\x20or\x20`rabetbase\x20sql\x20pull`\x20first','sqls','push','50171XzUQOC','filePath','219405cDfJix','50943yoTjcp','\x20failed','version','dbId','startsWith','POST','sqlCode','boolean','10awxHSm','6mGCNMs','sqlcode','No\x20local\x20SQL\x20files\x20found.','sqlName','has','1644291BXIaLT','filter','high-risk-write','length','sqlRootDir','Push\x20local\x20SQL\x20files\x20to\x20remote','appCode','entries','Local\x20SQL\x20not\x20found:\x20','force','20zkJnfI','dbName','lockFilePath','dbDirectory','sqlRoot','bool','remoteId','269752Swxqpi','replace','4NAHEQl','Force\x20push\x20even\x20if\x20local\x20hash\x20matches\x20lock','.\x20Keep\x20only\x20one\x20file\x20under\x20its\x20sqlCode\x20directory\x20before\x20pushing.','\x22\x20for\x20sqlCode\x20','missing\x20remote\x20version;\x20run\x20`rabetbase\x20sql\x20pull`\x20to\x20refresh\x20version\x20info\x20first','toISOString','set','path','Multiple\x20local\x20SQL\x20files\x20found\x20for\x20sqlCode\x20','trashDir','286209fUlmDK','\x22\x20matches\x20multiple\x20databases\x20for\x20sqlCode\x20','No\x20database\x20matches\x20local\x20directory\x20\x22','isFinite','relativePath','exec','588ptNyVi','get','99974hnUxpa','projectRoot','mode','lastSync','validation'];a176_0x26fb=function(){return _0x1435e7;};return a176_0x26fb();}async function archivePreviousSqlFileIfNeeded(_0x57265c,_0x1225c3,_0x20daa7){const _0x115432=a176_0x782f01;if(!_0x1225c3||_0x1225c3===_0x20daa7)return;const _0x176a5c=join(_0x57265c['sqlRootDir'],_0x1225c3);if(!await fileExists(_0x176a5c))return;const _0x1a468e=await moveToTrash(_0x57265c[_0x115432(0x207)],_0x57265c[_0x115432(0x1fd)],_0x176a5c);await cleanupEmptyDirectories(dirname(_0x176a5c),_0x57265c[_0x115432(0x225)]),void _0x1a468e;}async function moveToTrash(_0x342161,_0x42c798,_0x2ba801){const _0x199739=a176_0x782f01,_0x39bd2f=new Date()[_0x199739(0x1f9)]()[_0x199739(0x1f3)](/[:.]/g,'-'),_0x41478f=relative(_0x342161,_0x2ba801),_0x56b3d9=join(_0x42c798,_0x39bd2f,_0x41478f);return await mkdir(dirname(_0x56b3d9),{'recursive':!![]}),await rename(_0x2ba801,_0x56b3d9),_0x56b3d9;}async function cleanupEmptyDirectories(_0x165e76,_0x1ac53f){const _0x243306=a176_0x782f01;let _0xffda22=resolve(_0x165e76);const _0x67f621=resolve(_0x1ac53f);while(_0xffda22[_0x243306(0x217)](''+_0x67f621+sep)||_0xffda22===_0x67f621){if(_0xffda22===_0x67f621)return;try{const _0x586ed3=await readdir(_0xffda22);if(_0x586ed3[_0x243306(0x224)]>0x0)return;await rmdir(_0xffda22);}catch{return;}_0xffda22=dirname(_0xffda22);}}async function resolveTargetDbBinding(_0x57132a,_0x3a095e,_0x523d70){const _0x7e816f=a176_0x782f01,_0x42ad4e=_0x3a095e[_0x7e816f(0x1ee)];if(!_0x42ad4e)return{'dbId':_0x523d70['dbId'],'dbName':_0x523d70[_0x7e816f(0x1ec)]};const _0x4d44c2=buildDbDirectoryName(_0x523d70[_0x7e816f(0x1ec)],_0x523d70['dbId']);if(_0x42ad4e===_0x4d44c2)return{'dbId':_0x523d70['dbId'],'dbName':_0x523d70[_0x7e816f(0x1ec)]};const _0x546e98=parseExplicitDbDirectory(_0x42ad4e);if(_0x546e98!=null)return{'dbId':_0x546e98,'dbName':await getDbName(_0x57132a,_0x546e98)['catch'](()=>undefined)};const _0x5569cb=await listDatabases(_0x57132a),_0x59fb30=_0x5569cb[_0x7e816f(0x222)](_0x31af1b=>buildDbDirectoryName(_0x31af1b['dbName'],_0x31af1b[_0x7e816f(0x216)])===_0x42ad4e);if(_0x59fb30['length']===0x1)return{'dbId':_0x59fb30[0x0][_0x7e816f(0x216)],'dbName':_0x59fb30[0x0][_0x7e816f(0x1ec)]};if(_0x59fb30[_0x7e816f(0x224)]===0x0)throw CliErrors[_0x7e816f(0x20a)](_0x7e816f(0x200)+_0x42ad4e+_0x7e816f(0x1f7)+_0x3a095e['sqlCode']+'.');const _0x313a33=_0x59fb30['map'](_0x443635=>_0x443635[_0x7e816f(0x1ec)]+'\x20('+_0x443635[_0x7e816f(0x216)]+')')['join'](',\x20');throw CliErrors['validation']('Local\x20directory\x20\x22'+_0x42ad4e+_0x7e816f(0x1ff)+_0x3a095e[_0x7e816f(0x219)]+':\x20'+_0x313a33);}function parseExplicitDbDirectory(_0x44bc39){const _0x1e3954=a176_0x782f01,_0x2ad1d6=/^db-(\d+)$/[_0x1e3954(0x203)](_0x44bc39);if(!_0x2ad1d6)return null;const _0x396cfa=Number(_0x2ad1d6[0x1]);return Number[_0x1e3954(0x201)](_0x396cfa)&&_0x396cfa>0x0?_0x396cfa:null;}
1
+ const a176_0x34404f=a176_0x4f09;(function(_0x4d41f7,_0x1cc348){const _0x532d39=a176_0x4f09,_0x10dca0=_0x4d41f7();while(!![]){try{const _0x4acc7a=parseInt(_0x532d39(0x14f))/0x1+-parseInt(_0x532d39(0x164))/0x2*(parseInt(_0x532d39(0x157))/0x3)+-parseInt(_0x532d39(0x148))/0x4*(-parseInt(_0x532d39(0x147))/0x5)+parseInt(_0x532d39(0x183))/0x6+parseInt(_0x532d39(0x149))/0x7+parseInt(_0x532d39(0x175))/0x8*(-parseInt(_0x532d39(0x185))/0x9)+-parseInt(_0x532d39(0x182))/0xa*(parseInt(_0x532d39(0x16a))/0xb);if(_0x4acc7a===_0x1cc348)break;else _0x10dca0['push'](_0x10dca0['shift']());}catch(_0x217247){_0x10dca0['push'](_0x10dca0['shift']());}}}(a176_0x3fd7,0x3e2a6));import{mkdir,readFile,readdir,rename,rmdir}from'node:fs/promises';import{dirname,join,relative,resolve,sep}from'node:path';import{updateSqlQuery}from'../../core/api-client.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';import{getDbName,listDatabases}from'../../core/db-resolver.js';import{scanLocalSqlQueries}from'../../core/sql-sync/file-system.js';import{computeSqlFileHash}from'../../core/sql-sync/hash.js';import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile,writeSqlLockFile}from'../../core/sql-sync/lock.js';import{fileExists}from'../../core/bff/file-system.js';import{CliErrors}from'../../errors.js';function a176_0x4f09(_0x4e020c,_0x1e7c02){_0x4e020c=_0x4e020c-0x144;const _0x3fd78d=a176_0x3fd7();let _0x4f097e=_0x3fd78d[_0x4e020c];return _0x4f097e;}import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{buildSqlLockEntry,stripLocalSqlMetadata}from'./shared.js';function a176_0x3fd7(){const _0x49ee4d=['61587TPOQpr','sqlRoot','local\x20SQL\x20is\x20not\x20tracked\x20by\x20sql.lock.json;\x20use\x20`rabetbase\x20sql\x20create`\x20or\x20`rabetbase\x20sql\x20pull`\x20first','remoteId','85YIonLl','11932znpadW','636692BnHNZa','isFinite','lockFilePath','No\x20local\x20SQL\x20files\x20found.','filePath','sqlcode','246854jqImYj','mode','trashDir','dbId','\x20SQL\x20file(s)','Would\x20push\x20','push','relativePath','6VRbtUh','Force\x20push\x20even\x20if\x20local\x20hash\x20matches\x20lock','sqls','boolean','bool','exec','validation','Push\x20complete:\x20','force','set','path','sql','unchanged','143508rTYZWE','appCode','dbName','str','Multiple\x20local\x20SQL\x20files\x20found\x20for\x20sqlCode\x20','Push\x20local\x20SQL\x20files\x20to\x20remote','361680PHkJJT','hash','missing\x20remote\x20version;\x20run\x20`rabetbase\x20sql\x20pull`\x20to\x20refresh\x20version\x20info\x20first','version','sqlConfig','utf8','has','join','sqlRootDir','sqlName','startsWith','496LNxTpQ','lastSync','filter','entries','/smartapi/custom/updateUserCustomSql','Local\x20directory\x20\x22','\x22\x20matches\x20multiple\x20databases\x20for\x20sqlCode\x20','catch','message','sqlCode','replace','length','map','10lzafWt','2800578whiLvG','\x20skipped,\x20'];a176_0x3fd7=function(){return _0x49ee4d;};return a176_0x3fd7();}import{buildDbDirectoryName}from'../../core/sql-sync/utils.js';async function getTargetSqlQueries(_0x4a36df,_0x34f4aa,_0x48f674){const _0x49b234=a176_0x4f09,_0x37af29=await scanLocalSqlQueries(_0x4a36df),_0x46bac6=new Map();for(const _0x51a043 of _0x37af29){if(_0x48f674&&_0x51a043['sqlCode']!==_0x48f674)continue;const _0x4fa177=_0x46bac6['get'](_0x51a043['sqlCode'])??[];_0x4fa177[_0x49b234(0x155)](_0x51a043),_0x46bac6[_0x49b234(0x160)](_0x51a043['sqlCode'],_0x4fa177);}if(_0x48f674&&!_0x46bac6[_0x49b234(0x170)](_0x48f674))throw CliErrors[_0x49b234(0x15d)]('Local\x20SQL\x20not\x20found:\x20'+_0x48f674);const _0x29b96f=[];for(const [_0x46c1d6,_0x8827af]of _0x46bac6[_0x49b234(0x178)]()){if(_0x8827af[_0x49b234(0x180)]===0x1){_0x29b96f['push'](_0x8827af[0x0]);continue;}const _0x1faa4a=_0x34f4aa[_0x49b234(0x159)][_0x46c1d6],_0x7ab372=_0x1faa4a?.[_0x49b234(0x161)],_0x18e426=_0x7ab372?_0x8827af[_0x49b234(0x177)](_0x403ac4=>_0x403ac4[_0x49b234(0x156)]!==_0x7ab372):_0x8827af;if(_0x1faa4a&&_0x18e426[_0x49b234(0x180)]===0x1){_0x29b96f[_0x49b234(0x155)](_0x18e426[0x0]);continue;}throw CliErrors[_0x49b234(0x15d)](_0x49b234(0x168)+_0x46c1d6+'.\x20Keep\x20only\x20one\x20file\x20under\x20its\x20sqlCode\x20directory\x20before\x20pushing.');}return _0x29b96f;}export const sqlPush={'service':a176_0x34404f(0x162),'command':a176_0x34404f(0x155),'description':a176_0x34404f(0x169),'risk':'high-risk-write','flags':[SQLCODE_FLAG_OPTIONAL,{'name':a176_0x34404f(0x15f),'type':a176_0x34404f(0x15a),'description':a176_0x34404f(0x158)}],async 'dryRun'(_0x5842b0){const _0x3cde6d=a176_0x34404f,_0x9f56a3=loadSqlProjectConfig(_0x5842b0[_0x3cde6d(0x165)]),_0x3b4283=await readSqlLockFile(_0x9f56a3['lockFilePath']),{appLock:_0x146c8a}=ensureSqlLockScope(_0x3b4283??createEmptySqlLock(),_0x5842b0['appCode'],_0x9f56a3[_0x3cde6d(0x144)],_0x3cde6d(0x155)),_0x1d6126=await getTargetSqlQueries(_0x9f56a3,_0x146c8a,_0x5842b0[_0x3cde6d(0x167)]('sqlcode')||undefined),_0x596054=[];for(const _0xb76020 of _0x1d6126){const _0x562513=await computeSqlFileHash(_0xb76020[_0x3cde6d(0x14d)]),_0x51e937=_0x146c8a[_0x3cde6d(0x159)][_0xb76020[_0x3cde6d(0x17e)]],_0x1f81fd=!!_0x51e937&&(_0x51e937[_0x3cde6d(0x161)]!==_0xb76020[_0x3cde6d(0x156)]||!!_0xb76020[_0x3cde6d(0x173)]&&_0x51e937[_0x3cde6d(0x173)]!==_0xb76020[_0x3cde6d(0x173)]);if(!_0x5842b0[_0x3cde6d(0x15b)](_0x3cde6d(0x15f))&&_0x51e937&&_0x51e937['hash']===_0x562513&&!_0x1f81fd)continue;_0x596054['push'](_0xb76020[_0x3cde6d(0x17e)]);}return{'method':'POST','url':_0x3cde6d(0x179),'body':{'sqlCodes':_0x596054,'appCode':_0x5842b0[_0x3cde6d(0x165)]},'description':_0x3cde6d(0x154)+_0x596054['length']+_0x3cde6d(0x153)};},async 'execute'(_0x5d9c72){const _0x3fcf13=a176_0x34404f,_0xda5cc8=loadSqlProjectConfig(_0x5d9c72[_0x3fcf13(0x165)]),_0x472b71=await readSqlLockFile(_0xda5cc8['lockFilePath']),{lockData:_0x59f037,appLock:_0x10ced8}=ensureSqlLockScope(_0x472b71??createEmptySqlLock(),_0x5d9c72[_0x3fcf13(0x165)],_0xda5cc8['sqlRoot'],_0x3fcf13(0x155)),_0x15edba=await getTargetSqlQueries(_0xda5cc8,_0x10ced8,_0x5d9c72[_0x3fcf13(0x167)](_0x3fcf13(0x14e))||undefined);if(_0x15edba[_0x3fcf13(0x180)]===0x0)return{'ok':!![],'data':{'pushed':[],'skipped':[],'failed':[]},'message':_0x3fcf13(0x14c)};const _0x54eb35=[],_0x1738be=[],_0x185005=[];for(const _0x496e3c of _0x15edba){const _0x4911fb=_0x10ced8[_0x3fcf13(0x159)][_0x496e3c[_0x3fcf13(0x17e)]];if(!_0x4911fb){_0x185005[_0x3fcf13(0x155)]({'sqlCode':_0x496e3c[_0x3fcf13(0x17e)],'error':_0x3fcf13(0x145)});continue;}try{const _0x536e4b=await computeSqlFileHash(_0x496e3c[_0x3fcf13(0x14d)]),_0x337054=_0x4911fb['path']!==_0x496e3c[_0x3fcf13(0x156)]||!!_0x496e3c[_0x3fcf13(0x173)]&&_0x4911fb[_0x3fcf13(0x173)]!==_0x496e3c[_0x3fcf13(0x173)];if(!_0x5d9c72[_0x3fcf13(0x15b)](_0x3fcf13(0x15f))&&_0x4911fb[_0x3fcf13(0x16b)]===_0x536e4b&&!_0x337054){_0x1738be[_0x3fcf13(0x155)]({'sqlCode':_0x496e3c[_0x3fcf13(0x17e)],'reason':_0x3fcf13(0x163)});continue;}if(_0x4911fb['version']==null){_0x185005[_0x3fcf13(0x155)]({'sqlCode':_0x496e3c['sqlCode'],'error':_0x3fcf13(0x16c)});continue;}const _0x23b352=await readFile(_0x496e3c[_0x3fcf13(0x14d)],_0x3fcf13(0x16f)),_0x47dcac=stripLocalSqlMetadata(_0x23b352,_0x496e3c['mode']),_0x4dc4e3=_0x496e3c['sqlName']||_0x4911fb[_0x3fcf13(0x173)],_0x4e2b50=await resolveTargetDbBinding(_0x5d9c72[_0x3fcf13(0x165)],_0x496e3c,_0x4911fb),_0x2402a8=await updateSqlQuery({'id':_0x4911fb[_0x3fcf13(0x146)],'appCode':_0x5d9c72[_0x3fcf13(0x165)],'sqlCode':_0x496e3c['sqlCode'],'sqlName':_0x4dc4e3,'dbId':_0x4e2b50[_0x3fcf13(0x152)],'version':_0x4911fb[_0x3fcf13(0x16d)],'sqlContent':_0x47dcac,'sqlConfig':_0x4911fb[_0x3fcf13(0x16e)]??undefined}),_0x373984=_0x2402a8[_0x3fcf13(0x152)]?await getDbName(_0x5d9c72[_0x3fcf13(0x165)],Number(_0x2402a8[_0x3fcf13(0x152)]))['catch'](()=>_0x4e2b50[_0x3fcf13(0x166)]):_0x4e2b50['dbName'];_0x10ced8[_0x3fcf13(0x159)][_0x496e3c[_0x3fcf13(0x17e)]]={...buildSqlLockEntry(_0x2402a8,_0x47dcac,_0x536e4b,{'dbName':_0x373984}),'path':_0x496e3c[_0x3fcf13(0x156)],'mode':_0x4911fb[_0x3fcf13(0x150)]},await archivePreviousSqlFileIfNeeded(_0xda5cc8,_0x4911fb['path'],_0x496e3c['relativePath']),_0x54eb35[_0x3fcf13(0x155)]({'sqlCode':_0x496e3c['sqlCode'],'remoteId':_0x4911fb[_0x3fcf13(0x146)]});}catch(_0x1fbc7c){_0x185005['push']({'sqlCode':_0x496e3c[_0x3fcf13(0x17e)],'error':_0x1fbc7c instanceof Error?_0x1fbc7c[_0x3fcf13(0x17d)]:String(_0x1fbc7c)});}}return _0x10ced8[_0x3fcf13(0x176)]=new Date()['toISOString'](),await writeSqlLockFile(_0xda5cc8[_0x3fcf13(0x14b)],_0x59f037),{'ok':_0x185005[_0x3fcf13(0x180)]===0x0,'data':{'pushed':_0x54eb35,'skipped':_0x1738be,'failed':_0x185005},'message':_0x3fcf13(0x15e)+_0x54eb35[_0x3fcf13(0x180)]+'\x20pushed,\x20'+_0x1738be[_0x3fcf13(0x180)]+_0x3fcf13(0x184)+_0x185005[_0x3fcf13(0x180)]+'\x20failed'};}};async function archivePreviousSqlFileIfNeeded(_0x379fe2,_0x5f0845,_0x37b4f0){const _0x3eb492=a176_0x34404f;if(!_0x5f0845||_0x5f0845===_0x37b4f0)return;const _0x1ad543=join(_0x379fe2['sqlRootDir'],_0x5f0845);if(!await fileExists(_0x1ad543))return;const _0x27d07c=await moveToTrash(_0x379fe2['projectRoot'],_0x379fe2[_0x3eb492(0x151)],_0x1ad543);await cleanupEmptyDirectories(dirname(_0x1ad543),_0x379fe2[_0x3eb492(0x172)]),void _0x27d07c;}async function moveToTrash(_0x957c49,_0x40bd99,_0x22f87e){const _0x1ecbc3=a176_0x34404f,_0x3fff24=new Date()['toISOString']()[_0x1ecbc3(0x17f)](/[:.]/g,'-'),_0x5b9b24=relative(_0x957c49,_0x22f87e),_0x11dd43=join(_0x40bd99,_0x3fff24,_0x5b9b24);return await mkdir(dirname(_0x11dd43),{'recursive':!![]}),await rename(_0x22f87e,_0x11dd43),_0x11dd43;}async function cleanupEmptyDirectories(_0x125f16,_0x516dbd){const _0x2831e8=a176_0x34404f;let _0x24236a=resolve(_0x125f16);const _0x342a89=resolve(_0x516dbd);while(_0x24236a[_0x2831e8(0x174)](''+_0x342a89+sep)||_0x24236a===_0x342a89){if(_0x24236a===_0x342a89)return;try{const _0xe8c8b5=await readdir(_0x24236a);if(_0xe8c8b5[_0x2831e8(0x180)]>0x0)return;await rmdir(_0x24236a);}catch{return;}_0x24236a=dirname(_0x24236a);}}async function resolveTargetDbBinding(_0xe9a658,_0x1ed5ea,_0x426e2d){const _0x3ce4fa=a176_0x34404f,_0x23af5d=_0x1ed5ea['dbDirectory'];if(!_0x23af5d)return{'dbId':_0x426e2d[_0x3ce4fa(0x152)],'dbName':_0x426e2d[_0x3ce4fa(0x166)]};const _0x4208d9=buildDbDirectoryName(_0x426e2d['dbName'],_0x426e2d['dbId']);if(_0x23af5d===_0x4208d9)return{'dbId':_0x426e2d[_0x3ce4fa(0x152)],'dbName':_0x426e2d[_0x3ce4fa(0x166)]};const _0x1da198=parseExplicitDbDirectory(_0x23af5d);if(_0x1da198!=null)return{'dbId':_0x1da198,'dbName':await getDbName(_0xe9a658,_0x1da198)[_0x3ce4fa(0x17c)](()=>undefined)};const _0x2aea3c=await listDatabases(_0xe9a658),_0x4de116=_0x2aea3c['filter'](_0x540373=>buildDbDirectoryName(_0x540373[_0x3ce4fa(0x166)],_0x540373[_0x3ce4fa(0x152)])===_0x23af5d);if(_0x4de116[_0x3ce4fa(0x180)]===0x1)return{'dbId':_0x4de116[0x0]['dbId'],'dbName':_0x4de116[0x0][_0x3ce4fa(0x166)]};if(_0x4de116[_0x3ce4fa(0x180)]===0x0)throw CliErrors['validation']('No\x20database\x20matches\x20local\x20directory\x20\x22'+_0x23af5d+'\x22\x20for\x20sqlCode\x20'+_0x1ed5ea['sqlCode']+'.');const _0x27d4cc=_0x4de116[_0x3ce4fa(0x181)](_0x33799f=>_0x33799f[_0x3ce4fa(0x166)]+'\x20('+_0x33799f[_0x3ce4fa(0x152)]+')')[_0x3ce4fa(0x171)](',\x20');throw CliErrors['validation'](_0x3ce4fa(0x17a)+_0x23af5d+_0x3ce4fa(0x17b)+_0x1ed5ea[_0x3ce4fa(0x17e)]+':\x20'+_0x27d4cc);}function parseExplicitDbDirectory(_0x210b3d){const _0x50d27b=a176_0x34404f,_0xef8691=/^db-(\d+)$/[_0x50d27b(0x15c)](_0x210b3d);if(!_0xef8691)return null;const _0x943557=Number(_0xef8691[0x1]);return Number[_0x50d27b(0x14a)](_0x943557)&&_0x943557>0x0?_0x943557:null;}
@@ -1 +1 @@
1
- function a177_0x1897(_0x2958cd,_0x192b4b){_0x2958cd=_0x2958cd-0x125;const _0x3987fb=a177_0x3987();let _0x189793=_0x3987fb[_0x2958cd];return _0x189793;}function a177_0x3987(){const _0x506901=['save','validation','748359HAmWsL','1821496fZwLuM','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`.','46188EhzvGK','71562ZAbvcq','Deprecated:\x20use\x20sql\x20create\x20to\x20create\x20and\x20sql\x20push\x20to\x20update','Path\x20to\x20the\x20SQL\x20file','9596JmprQM','245zmwPMg','`rabetbase\x20sql\x20save`\x20has\x20been\x20deprecated.','30qPhoGR','file','3066CceFZn','sql','588275ZZAEvJ','39VFjwJw','Query\x20description','string','Target\x20database\x20—\x20accepts\x20a\x20numeric\x20ID\x20or\x20database\x20name\x20(e.g.\x20ecommerce_db)','SQL\x20query\x20display\x20name','sqlname'];a177_0x3987=function(){return _0x506901;};return a177_0x3987();}const a177_0x53e75a=a177_0x1897;(function(_0x38da82,_0x4af870){const _0x4b7989=a177_0x1897,_0xd6558f=_0x38da82();while(!![]){try{const _0x2a439d=parseInt(_0x4b7989(0x139))/0x1+-parseInt(_0x4b7989(0x125))/0x2*(parseInt(_0x4b7989(0x12d))/0x3)+parseInt(_0x4b7989(0x138))/0x4+parseInt(_0x4b7989(0x12c))/0x5+-parseInt(_0x4b7989(0x12a))/0x6*(parseInt(_0x4b7989(0x126))/0x7)+-parseInt(_0x4b7989(0x136))/0x8+parseInt(_0x4b7989(0x135))/0x9*(parseInt(_0x4b7989(0x128))/0xa);if(_0x2a439d===_0x4af870)break;else _0xd6558f['push'](_0xd6558f['shift']());}catch(_0x3a84d8){_0xd6558f['push'](_0xd6558f['shift']());}}}(a177_0x3987,0x22bbf));import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const SQL_SAVE_DEPRECATED_HINT=[a177_0x53e75a(0x127),'Create\x20new\x20SQL\x20with\x20`rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml`.',a177_0x53e75a(0x137)]['join']('\x0a');export const sqlSave={'service':a177_0x53e75a(0x12b),'command':a177_0x53e75a(0x133),'description':a177_0x53e75a(0x13a),'risk':'write','requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a177_0x53e75a(0x129),'type':a177_0x53e75a(0x12f),'required':!![],'description':a177_0x53e75a(0x13b)},SQLCODE_FLAG_OPTIONAL,{'name':a177_0x53e75a(0x132),'type':a177_0x53e75a(0x12f),'description':a177_0x53e75a(0x131)},{'name':'db','type':'string','description':a177_0x53e75a(0x130)},{'name':'description','type':a177_0x53e75a(0x12f),'description':a177_0x53e75a(0x12e)}],async 'validate'(){const _0x59cc06=a177_0x53e75a;throw CliErrors[_0x59cc06(0x134)](SQL_SAVE_DEPRECATED_HINT);},async 'execute'(){const _0x5a4389=a177_0x53e75a;throw CliErrors[_0x5a4389(0x134)](SQL_SAVE_DEPRECATED_HINT);}};
1
+ function a177_0x3745(_0x5ef9b5,_0x1bdb66){_0x5ef9b5=_0x5ef9b5-0xcc;const _0x53fb45=a177_0x53fb();let _0x374593=_0x53fb45[_0x5ef9b5];return _0x374593;}const a177_0x1f5209=a177_0x3745;(function(_0x278b09,_0x2710b3){const _0x56a121=a177_0x3745,_0x57c7e7=_0x278b09();while(!![]){try{const _0x1fb6af=-parseInt(_0x56a121(0xd9))/0x1+parseInt(_0x56a121(0xdc))/0x2+parseInt(_0x56a121(0xde))/0x3*(parseInt(_0x56a121(0xd6))/0x4)+parseInt(_0x56a121(0xdd))/0x5*(parseInt(_0x56a121(0xd2))/0x6)+-parseInt(_0x56a121(0xcf))/0x7+-parseInt(_0x56a121(0xe1))/0x8*(-parseInt(_0x56a121(0xda))/0x9)+-parseInt(_0x56a121(0xcd))/0xa*(parseInt(_0x56a121(0xcc))/0xb);if(_0x1fb6af===_0x2710b3)break;else _0x57c7e7['push'](_0x57c7e7['shift']());}catch(_0x1e129c){_0x57c7e7['push'](_0x57c7e7['shift']());}}}(a177_0x53fb,0x97fca));function a177_0x53fb(){const _0x1cbfc3=['string','Target\x20database\x20—\x20accepts\x20a\x20numeric\x20ID\x20or\x20database\x20name\x20(e.g.\x20ecommerce_db)','Query\x20description','86788uovGng','Create\x20new\x20SQL\x20with\x20`rabetbase\x20sql\x20create\x20--name\x20<name>\x20--db-id\x20<id>\x20--mode\x20sql|mybatisXml`.','Path\x20to\x20the\x20SQL\x20file','639513kGtGDB','36fGtNLM','save','341258PvmxWc','5261230GYBnRK','84UJkwfc','file','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`.','836536qkEgBx','write','sqlname','validation','1045lmVASZ','47030fZZPUn','SQL\x20query\x20display\x20name','3778761DRiShv','sql','`rabetbase\x20sql\x20save`\x20has\x20been\x20deprecated.','6nMjDTQ'];a177_0x53fb=function(){return _0x1cbfc3;};return a177_0x53fb();}import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const SQL_SAVE_DEPRECATED_HINT=[a177_0x1f5209(0xd1),a177_0x1f5209(0xd7),a177_0x1f5209(0xe0)]['join']('\x0a');export const sqlSave={'service':a177_0x1f5209(0xd0),'command':a177_0x1f5209(0xdb),'description':'Deprecated:\x20use\x20sql\x20create\x20to\x20create\x20and\x20sql\x20push\x20to\x20update','risk':a177_0x1f5209(0xe2),'requiresAuth':![],'requiresAppCode':![],'flags':[{'name':a177_0x1f5209(0xdf),'type':a177_0x1f5209(0xd3),'required':!![],'description':a177_0x1f5209(0xd8)},SQLCODE_FLAG_OPTIONAL,{'name':a177_0x1f5209(0xe3),'type':a177_0x1f5209(0xd3),'description':a177_0x1f5209(0xce)},{'name':'db','type':a177_0x1f5209(0xd3),'description':a177_0x1f5209(0xd4)},{'name':'description','type':a177_0x1f5209(0xd3),'description':a177_0x1f5209(0xd5)}],async 'validate'(){const _0x3eb405=a177_0x1f5209;throw CliErrors[_0x3eb405(0xe4)](SQL_SAVE_DEPRECATED_HINT);},async 'execute'(){const _0x433c38=a177_0x1f5209;throw CliErrors[_0x433c38(0xe4)](SQL_SAVE_DEPRECATED_HINT);}};
@@ -1 +1 @@
1
- const a178_0x46e33c=a178_0x2e1c;(function(_0x9abdc8,_0xf1696f){const _0x23a325=a178_0x2e1c,_0xab418f=_0x9abdc8();while(!![]){try{const _0x578325=parseInt(_0x23a325(0x1ad))/0x1*(parseInt(_0x23a325(0x1c6))/0x2)+parseInt(_0x23a325(0x1a8))/0x3+-parseInt(_0x23a325(0x1c9))/0x4*(-parseInt(_0x23a325(0x1be))/0x5)+-parseInt(_0x23a325(0x1ab))/0x6*(-parseInt(_0x23a325(0x1c4))/0x7)+-parseInt(_0x23a325(0x1b6))/0x8*(parseInt(_0x23a325(0x1ca))/0x9)+-parseInt(_0x23a325(0x1b3))/0xa*(-parseInt(_0x23a325(0x1b2))/0xb)+parseInt(_0x23a325(0x1cb))/0xc*(-parseInt(_0x23a325(0x1a3))/0xd);if(_0x578325===_0xf1696f)break;else _0xab418f['push'](_0xab418f['shift']());}catch(_0x5726f9){_0xab418f['push'](_0xab418f['shift']());}}}(a178_0x350a,0x614e7));import{createInterface}from'node:readline';import{join}from'node:path';import{buildDefaultSqlFileName,buildSqlRelativePath,detectSqlMode}from'../../core/sql-sync/utils.js';export const SQL_LOCAL_REL_DIR=a178_0x46e33c(0x1b5);export function buildSqlLockEntry(_0x3d7bad,_0x354445,_0x4bdd85,_0x426f40){const _0x32929f=a178_0x46e33c,_0x12cacd=detectSqlMode(_0x354445);return{'path':buildSqlRelativePath(_0x3d7bad[_0x32929f(0x1c7)],_0x3d7bad[_0x32929f(0x1c5)],_0x426f40?.['dbName'],_0x12cacd,_0x3d7bad[_0x32929f(0x1a9)]),'hash':_0x4bdd85,'remoteId':_0x3d7bad['id'],'version':_0x3d7bad[_0x32929f(0x1c2)],'dbId':Number(_0x3d7bad[_0x32929f(0x1a9)]),'dbName':_0x426f40?.['dbName'],'sqlName':_0x3d7bad[_0x32929f(0x1c5)],'sqlConfig':_0x3d7bad['sqlConfig']??undefined,'mode':_0x12cacd};}export function cloneSqlLockData(_0x12a0a5){const _0x26dc5f=a178_0x46e33c;return{'apps':Object['fromEntries'](Object[_0x26dc5f(0x1a5)](_0x12a0a5['apps'])['map'](([_0x3eb0e1,_0x62a2d6])=>[_0x3eb0e1,{'sqlRoot':_0x62a2d6[_0x26dc5f(0x1ac)],'lastSync':_0x62a2d6['lastSync'],'sqls':{..._0x62a2d6[_0x26dc5f(0x1b0)]}}]))};}export function ensureRemoteSqlContent(_0x402774){const _0x4c08fd=a178_0x46e33c;return _0x402774[_0x4c08fd(0x1bc)]??'';}function a178_0x2e1c(_0x3043e5,_0x54e4dd){_0x3043e5=_0x3043e5-0x19d;const _0x350adc=a178_0x350a();let _0x2e1cd8=_0x350adc[_0x3043e5];return _0x2e1cd8;}export function buildLocalSqlFileContent(_0x38f6fc,_0x42d8d8,_0x5750d6){const _0x1bb52e=a178_0x46e33c,_0x4a707c=_0x5750d6?.[_0x1bb52e(0x1c0)]??detectSqlMode(_0x42d8d8),_0x5cecca=stripLocalSqlMetadata(_0x42d8d8,_0x4a707c)[_0x1bb52e(0x1a6)](),_0x2a09f3=[...buildMetadataHeaderLines({'sqlCode':_0x38f6fc[_0x1bb52e(0x1c7)],'sqlName':_0x38f6fc[_0x1bb52e(0x1c5)],'dbId':_0x38f6fc[_0x1bb52e(0x1a9)],'dbName':_0x5750d6?.['dbName'],'mode':_0x4a707c,'syncedAt':_0x5750d6?.[_0x1bb52e(0x1c3)],'description':_0x5750d6?.[_0x1bb52e(0x1af)]},_0x4a707c),'',_0x5cecca],_0xca3071=_0x2a09f3[_0x1bb52e(0x1bd)]('\x0a');return _0xca3071[_0x1bb52e(0x1bb)]('\x0a')?_0xca3071:_0xca3071+'\x0a';}export function stripLocalSqlMetadata(_0x592192,_0x4fd000){const _0x3260a3=a178_0x46e33c,_0x3a3960=_0x592192[_0x3260a3(0x1b8)](/\r\n/g,'\x0a')[_0x3260a3(0x1aa)]('\x0a'),_0x363de8=[];let _0x59d1e4=0x0;if(_0x4fd000===_0x3260a3(0x1b9))while(_0x59d1e4<_0x3a3960[_0x3260a3(0x1b7)]){const _0x4e90df=_0x3a3960[_0x59d1e4]??'';if(/^\s*<!--\s*@lovrabet\./[_0x3260a3(0x1a2)](_0x4e90df)){_0x59d1e4++;continue;}if(_0x4e90df[_0x3260a3(0x1a6)]()===''&&_0x59d1e4>0x0){_0x59d1e4++;continue;}break;}else while(_0x59d1e4<_0x3a3960[_0x3260a3(0x1b7)]){const _0x341249=_0x3a3960[_0x59d1e4]??'';if(/^\s*--\s*@lovrabet\./[_0x3260a3(0x1a2)](_0x341249)){_0x59d1e4++;continue;}if(_0x341249['trim']()===''&&_0x59d1e4>0x0){_0x59d1e4++;continue;}break;}for(;_0x59d1e4<_0x3a3960[_0x3260a3(0x1b7)];_0x59d1e4++){_0x363de8[_0x3260a3(0x19d)](_0x3a3960[_0x59d1e4]);}return _0x363de8[_0x3260a3(0x1bd)]('\x0a')[_0x3260a3(0x1a4)]();}export function resolveSqlMode(_0x4fb61b,_0x11f86c){const _0x28449d=a178_0x46e33c;if(_0x11f86c?.[_0x28449d(0x1c0)])return _0x11f86c[_0x28449d(0x1c0)];return detectSqlMode(_0x4fb61b);}function a178_0x350a(){const _0x119c19=['616055MIgtGb','40IqHWhw','stdin','.rabetbase/sql','168lawvkC','length','replace','mybatisXml','path','endsWith','sqlContent','join','1756195WVHoke','yes','mode','stderr','version','syncedAt','7SYbacT','sqlName','4dnrCwB','sqlCode','map','4TVTSji','118953BqrmzG','12ktEFHv','<!--\x20@lovrabet.','includes','push','dbName','filter','question','--\x20@lovrabet.','test','17819971bLCweq','trimStart','entries','trim','\x20[y/N]\x20','35133UFOYWK','dbId','split','4287270FpOjDE','sqlRoot','372688ZaXhld','close','description','sqls','toLowerCase'];a178_0x350a=function(){return _0x119c19;};return a178_0x350a();}export function resolveSqlFileName(_0x2cf7ac,_0x26982b,_0x3d96b0){const _0x10e5ab=a178_0x46e33c;if(_0x3d96b0?.[_0x10e5ab(0x1ba)])return _0x3d96b0[_0x10e5ab(0x1ba)];if(_0x3d96b0?.[_0x10e5ab(0x1c5)]||_0x3d96b0?.[_0x10e5ab(0x19e)])return buildSqlRelativePath(_0x2cf7ac,_0x3d96b0?.[_0x10e5ab(0x1c5)],_0x3d96b0?.[_0x10e5ab(0x19e)],resolveSqlMode(_0x26982b,_0x3d96b0),_0x3d96b0?.[_0x10e5ab(0x1a9)]);return buildDefaultSqlFileName(_0x2cf7ac,resolveSqlMode(_0x26982b,_0x3d96b0));}export function resolveSqlLocalDir(_0x4e72d4,_0x578180){return join(_0x4e72d4,SQL_LOCAL_REL_DIR,_0x578180);}export async function confirmForceOverwrite(_0x1c3042){const _0xcce0a5=a178_0x46e33c,_0x52986b=createInterface({'input':process[_0xcce0a5(0x1b4)],'output':process[_0xcce0a5(0x1c1)]}),_0xbf15d=await new Promise(_0x273fd7=>{const _0x1911f8=_0xcce0a5;_0x52986b[_0x1911f8(0x1a0)](_0x1c3042+_0x1911f8(0x1a7),_0x273fd7);});return _0x52986b[_0xcce0a5(0x1ae)](),['y',_0xcce0a5(0x1bf)][_0xcce0a5(0x1cd)](_0xbf15d['trim']()[_0xcce0a5(0x1b1)]());}export function findSqlLockScope(_0x58c917,_0x1e889d){return _0x58c917['apps'][_0x1e889d];}function buildMetadataHeaderLines(_0x16a071,_0x4dcc63){const _0x214605=a178_0x46e33c,_0x23f8c7=[[_0x214605(0x1c7),_0x16a071[_0x214605(0x1c7)]],[_0x214605(0x1c5),_0x16a071['sqlName']],[_0x214605(0x1a9),_0x16a071[_0x214605(0x1a9)]],[_0x214605(0x19e),_0x16a071[_0x214605(0x19e)]],['mode',_0x16a071[_0x214605(0x1c0)]],[_0x214605(0x1c3),_0x16a071[_0x214605(0x1c3)]],[_0x214605(0x1af),_0x16a071[_0x214605(0x1af)]]];if(_0x4dcc63==='mybatisXml')return _0x23f8c7[_0x214605(0x19f)](([,_0x2bde47])=>_0x2bde47!==undefined&&_0x2bde47!==null&&String(_0x2bde47)[_0x214605(0x1a6)]()!=='')['map'](([_0x2313f4,_0x3ab78f])=>_0x214605(0x1cc)+_0x2313f4+':\x20'+String(_0x3ab78f)+'\x20-->');return _0x23f8c7[_0x214605(0x19f)](([,_0x5aeab1])=>_0x5aeab1!==undefined&&_0x5aeab1!==null&&String(_0x5aeab1)[_0x214605(0x1a6)]()!=='')[_0x214605(0x1c8)](([_0x15aeb5,_0x32fc49])=>_0x214605(0x1a1)+_0x15aeb5+':\x20'+String(_0x32fc49));}
1
+ const a178_0x558815=a178_0xaaf8;(function(_0x4ba46,_0x3ddfff){const _0x1342c3=a178_0xaaf8,_0x208f2d=_0x4ba46();while(!![]){try{const _0x49c46a=parseInt(_0x1342c3(0x19f))/0x1*(-parseInt(_0x1342c3(0x195))/0x2)+-parseInt(_0x1342c3(0x192))/0x3*(parseInt(_0x1342c3(0x19d))/0x4)+parseInt(_0x1342c3(0x19a))/0x5*(parseInt(_0x1342c3(0x199))/0x6)+-parseInt(_0x1342c3(0x1b1))/0x7*(-parseInt(_0x1342c3(0x1a7))/0x8)+parseInt(_0x1342c3(0x1ac))/0x9+parseInt(_0x1342c3(0x18c))/0xa+-parseInt(_0x1342c3(0x18b))/0xb;if(_0x49c46a===_0x3ddfff)break;else _0x208f2d['push'](_0x208f2d['shift']());}catch(_0x2b691e){_0x208f2d['push'](_0x208f2d['shift']());}}}(a178_0x3b2b,0x5c813));import{createInterface}from'node:readline';import{join}from'node:path';import{buildDefaultSqlFileName,buildSqlRelativePath,detectSqlMode}from'../../core/sql-sync/utils.js';function a178_0xaaf8(_0x92b42b,_0x474207){_0x92b42b=_0x92b42b-0x18b;const _0x3b2b57=a178_0x3b2b();let _0xaaf8be=_0x3b2b57[_0x92b42b];return _0xaaf8be;}export const SQL_LOCAL_REL_DIR=a178_0x558815(0x1ad);export function buildSqlLockEntry(_0x2eb13e,_0x2e3457,_0xc5c5c9,_0x5be135){const _0x5da681=a178_0x558815,_0x4cc6bb=detectSqlMode(_0x2e3457);return{'path':buildSqlRelativePath(_0x2eb13e['sqlCode'],_0x2eb13e[_0x5da681(0x18e)],_0x5be135?.[_0x5da681(0x1af)],_0x4cc6bb,_0x2eb13e['dbId']),'hash':_0xc5c5c9,'remoteId':_0x2eb13e['id'],'version':_0x2eb13e['version'],'dbId':Number(_0x2eb13e[_0x5da681(0x1b2)]),'dbName':_0x5be135?.['dbName'],'sqlName':_0x2eb13e[_0x5da681(0x18e)],'sqlConfig':_0x2eb13e[_0x5da681(0x1b5)]??undefined,'mode':_0x4cc6bb};}export function cloneSqlLockData(_0x43859b){const _0x32d4a3=a178_0x558815;return{'apps':Object['fromEntries'](Object[_0x32d4a3(0x1a1)](_0x43859b[_0x32d4a3(0x1a0)])[_0x32d4a3(0x1a5)](([_0x1d1b73,_0x2db63a])=>[_0x1d1b73,{'sqlRoot':_0x2db63a[_0x32d4a3(0x1a3)],'lastSync':_0x2db63a['lastSync'],'sqls':{..._0x2db63a[_0x32d4a3(0x194)]}}]))};}export function ensureRemoteSqlContent(_0x2ab097){return _0x2ab097['sqlContent']??'';}export function buildLocalSqlFileContent(_0x50c177,_0x1e6ec6,_0x575ac7){const _0x3303fa=a178_0x558815,_0x202834=_0x575ac7?.[_0x3303fa(0x1a6)]??detectSqlMode(_0x1e6ec6),_0x434b6e=stripLocalSqlMetadata(_0x1e6ec6,_0x202834)[_0x3303fa(0x1a4)](),_0x320513=[...buildMetadataHeaderLines({'sqlCode':_0x50c177[_0x3303fa(0x19b)],'sqlName':_0x50c177[_0x3303fa(0x18e)],'dbId':_0x50c177['dbId'],'dbName':_0x575ac7?.['dbName'],'mode':_0x202834,'syncedAt':_0x575ac7?.['syncedAt'],'description':_0x575ac7?.[_0x3303fa(0x1ab)]},_0x202834),'',_0x434b6e],_0x33dadc=_0x320513[_0x3303fa(0x197)]('\x0a');return _0x33dadc['endsWith']('\x0a')?_0x33dadc:_0x33dadc+'\x0a';}function a178_0x3b2b(){const _0x5aa9f9=['mode','56bakaCe','path','\x20-->','stderr','description','6530571fFLrtm','.rabetbase/sql','includes','dbName','close','476994pmetUd','dbId','trimStart','length','sqlConfig','10482846GAqfHB','7133940EGvfqa','replace','sqlName','test','syncedAt','filter','309UweWsZ','yes','sqls','1520DioVkt','question','join','stdin','6TmozzZ','1945145KXCgUd','sqlCode','push','11908AUZvpE','mybatisXml','877gRruDT','apps','entries','toLowerCase','sqlRoot','trim','map'];a178_0x3b2b=function(){return _0x5aa9f9;};return a178_0x3b2b();}export function stripLocalSqlMetadata(_0x9344d0,_0x33af85){const _0x517e58=a178_0x558815,_0x21f01e=_0x9344d0[_0x517e58(0x18d)](/\r\n/g,'\x0a')['split']('\x0a'),_0x530f96=[];let _0x9c0281=0x0;if(_0x33af85===_0x517e58(0x19e))while(_0x9c0281<_0x21f01e[_0x517e58(0x1b4)]){const _0x41fae6=_0x21f01e[_0x9c0281]??'';if(/^\s*<!--\s*@lovrabet\./[_0x517e58(0x18f)](_0x41fae6)){_0x9c0281++;continue;}if(_0x41fae6[_0x517e58(0x1a4)]()===''&&_0x9c0281>0x0){_0x9c0281++;continue;}break;}else while(_0x9c0281<_0x21f01e[_0x517e58(0x1b4)]){const _0x2ec5bf=_0x21f01e[_0x9c0281]??'';if(/^\s*--\s*@lovrabet\./['test'](_0x2ec5bf)){_0x9c0281++;continue;}if(_0x2ec5bf[_0x517e58(0x1a4)]()===''&&_0x9c0281>0x0){_0x9c0281++;continue;}break;}for(;_0x9c0281<_0x21f01e['length'];_0x9c0281++){_0x530f96[_0x517e58(0x19c)](_0x21f01e[_0x9c0281]);}return _0x530f96['join']('\x0a')[_0x517e58(0x1b3)]();}export function resolveSqlMode(_0x5465e5,_0x535af8){const _0x5de07d=a178_0x558815;if(_0x535af8?.[_0x5de07d(0x1a6)])return _0x535af8['mode'];return detectSqlMode(_0x5465e5);}export function resolveSqlFileName(_0x5f54ee,_0x45d634,_0x1b79c3){const _0x4fdbd6=a178_0x558815;if(_0x1b79c3?.[_0x4fdbd6(0x1a8)])return _0x1b79c3[_0x4fdbd6(0x1a8)];if(_0x1b79c3?.[_0x4fdbd6(0x18e)]||_0x1b79c3?.[_0x4fdbd6(0x1af)])return buildSqlRelativePath(_0x5f54ee,_0x1b79c3?.[_0x4fdbd6(0x18e)],_0x1b79c3?.[_0x4fdbd6(0x1af)],resolveSqlMode(_0x45d634,_0x1b79c3),_0x1b79c3?.[_0x4fdbd6(0x1b2)]);return buildDefaultSqlFileName(_0x5f54ee,resolveSqlMode(_0x45d634,_0x1b79c3));}export function resolveSqlLocalDir(_0x19ec77,_0x38affc){return join(_0x19ec77,SQL_LOCAL_REL_DIR,_0x38affc);}export async function confirmForceOverwrite(_0x2c05a9){const _0x52865b=a178_0x558815,_0x241831=createInterface({'input':process[_0x52865b(0x198)],'output':process[_0x52865b(0x1aa)]}),_0x545b4f=await new Promise(_0x1f6f6a=>{const _0x532ba0=_0x52865b;_0x241831[_0x532ba0(0x196)](_0x2c05a9+'\x20[y/N]\x20',_0x1f6f6a);});return _0x241831[_0x52865b(0x1b0)](),['y',_0x52865b(0x193)][_0x52865b(0x1ae)](_0x545b4f[_0x52865b(0x1a4)]()[_0x52865b(0x1a2)]());}export function findSqlLockScope(_0x25ed04,_0x1137ee){const _0x2d7e28=a178_0x558815;return _0x25ed04[_0x2d7e28(0x1a0)][_0x1137ee];}function buildMetadataHeaderLines(_0x57cc07,_0x1d5697){const _0x24c3cd=a178_0x558815,_0x269700=[['sqlCode',_0x57cc07[_0x24c3cd(0x19b)]],[_0x24c3cd(0x18e),_0x57cc07[_0x24c3cd(0x18e)]],['dbId',_0x57cc07[_0x24c3cd(0x1b2)]],[_0x24c3cd(0x1af),_0x57cc07[_0x24c3cd(0x1af)]],['mode',_0x57cc07[_0x24c3cd(0x1a6)]],[_0x24c3cd(0x190),_0x57cc07[_0x24c3cd(0x190)]],['description',_0x57cc07[_0x24c3cd(0x1ab)]]];if(_0x1d5697===_0x24c3cd(0x19e))return _0x269700[_0x24c3cd(0x191)](([,_0x5b8333])=>_0x5b8333!==undefined&&_0x5b8333!==null&&String(_0x5b8333)['trim']()!=='')['map'](([_0x3efcc9,_0x20479f])=>'<!--\x20@lovrabet.'+_0x3efcc9+':\x20'+String(_0x20479f)+_0x24c3cd(0x1a9));return _0x269700[_0x24c3cd(0x191)](([,_0x3baf3f])=>_0x3baf3f!==undefined&&_0x3baf3f!==null&&String(_0x3baf3f)[_0x24c3cd(0x1a4)]()!=='')[_0x24c3cd(0x1a5)](([_0x48dbf8,_0x13bcd0])=>'--\x20@lovrabet.'+_0x48dbf8+':\x20'+String(_0x13bcd0));}
@@ -1 +1 @@
1
- const a179_0x1442f6=a179_0x229e;(function(_0x29ec40,_0x1598d1){const _0x2d65d0=a179_0x229e,_0x270748=_0x29ec40();while(!![]){try{const _0x1ba4a2=-parseInt(_0x2d65d0(0x137))/0x1*(-parseInt(_0x2d65d0(0x11a))/0x2)+-parseInt(_0x2d65d0(0x11e))/0x3+parseInt(_0x2d65d0(0x12a))/0x4*(-parseInt(_0x2d65d0(0x119))/0x5)+parseInt(_0x2d65d0(0x131))/0x6+-parseInt(_0x2d65d0(0x125))/0x7*(parseInt(_0x2d65d0(0x127))/0x8)+parseInt(_0x2d65d0(0x12f))/0x9*(-parseInt(_0x2d65d0(0x123))/0xa)+-parseInt(_0x2d65d0(0x11c))/0xb*(-parseInt(_0x2d65d0(0x130))/0xc);if(_0x1ba4a2===_0x1598d1)break;else _0x270748['push'](_0x270748['shift']());}catch(_0x2eb645){_0x270748['push'](_0x270748['shift']());}}}(a179_0x261d,0x8628d));import{listSqlQueries}from'../../core/api-client.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';import{scanLocalSqlQueries}from'../../core/sql-sync/file-system.js';import{computeSqlFileHash}from'../../core/sql-sync/hash.js';function a179_0x261d(){const _0xd6a1db=['paging','2690073VQnKRC','36408WQRGCa','1719012PDfjca','Check\x20local\x20SQL\x20sync\x20status\x20against\x20lock\x20file','sqlRoot','remote','sqls','relativePath','203964kVqIAT','\x20remote-only','map','has','hash','182445JmXmUO','4lJYtWu','totalCount','3102vivGck','sqlCode','509076YuoSMK','\x20added,\x20','status','lockKey','sql','10aWLExr','push','35sIPkfJ','appCode','675912oRsqfv','keys','All\x20SQL\x20queries\x20are\x20in\x20sync.','12YLzvlb','length','sqlName','\x20modified,\x20'];a179_0x261d=function(){return _0xd6a1db;};return a179_0x261d();}import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile}from'../../core/sql-sync/lock.js';const PAGE_SIZE=0x64;async function fetchAllSqlCodes(_0x506fa7){const _0x16c701=a179_0x229e,_0x24dea0=[];let _0x1b2b2b=0x1;while(!![]){const _0x556e56=await listSqlQueries(_0x506fa7,{'currentPage':_0x1b2b2b,'pageSize':PAGE_SIZE}),_0xb3bd48=_0x556e56['tableData']??[];_0x24dea0[_0x16c701(0x124)](..._0xb3bd48[_0x16c701(0x139)](_0xa347d3=>_0xa347d3[_0x16c701(0x11d)]));if(_0xb3bd48['length']===0x0)break;const _0x47fa00=_0x556e56[_0x16c701(0x12e)]?.[_0x16c701(0x11b)];if(_0x47fa00!=null?_0x24dea0[_0x16c701(0x12b)]>=_0x47fa00:_0xb3bd48[_0x16c701(0x12b)]<PAGE_SIZE)break;_0x1b2b2b++;}return _0x24dea0;}function a179_0x229e(_0xbbdda7,_0x5e8340){_0xbbdda7=_0xbbdda7-0x118;const _0x261d31=a179_0x261d();let _0x229e7b=_0x261d31[_0xbbdda7];return _0x229e7b;}export const sqlStatus={'service':a179_0x1442f6(0x122),'command':a179_0x1442f6(0x120),'description':a179_0x1442f6(0x132),'risk':'read','flags':[{'name':a179_0x1442f6(0x134),'type':'boolean','description':'Also\x20check\x20for\x20remote-only\x20SQL\x20queries\x20not\x20present\x20locally'}],async 'execute'(_0x5b9045){const _0xaebce0=a179_0x1442f6,_0x251064=loadSqlProjectConfig(_0x5b9045[_0xaebce0(0x126)]),_0x49ecb5=await readSqlLockFile(_0x251064['lockFilePath']),{appLock:_0x4b1160}=ensureSqlLockScope(_0x49ecb5??createEmptySqlLock(),_0x251064[_0xaebce0(0x126)],_0x251064[_0xaebce0(0x133)],_0xaebce0(0x120)),_0x4ca928=await scanLocalSqlQueries(_0x251064),_0x5a732a=[],_0x38526b=[],_0x519458=[],_0x80d60c=[],_0x169e14=new Set(_0x4ca928['map'](_0x1283fb=>_0x1283fb[_0xaebce0(0x121)]));for(const _0x4db1e0 of _0x4ca928){const _0x589677=await computeSqlFileHash(_0x4db1e0['filePath']),_0x3a6d52=_0x4b1160[_0xaebce0(0x135)][_0x4db1e0['lockKey']],_0x36b967=!!_0x3a6d52&&_0x3a6d52['path']!==_0x4db1e0[_0xaebce0(0x136)],_0x444a1d=!!_0x3a6d52&&!!_0x4db1e0[_0xaebce0(0x12c)]&&_0x3a6d52[_0xaebce0(0x12c)]!==_0x4db1e0[_0xaebce0(0x12c)];if(!_0x3a6d52)_0x5a732a[_0xaebce0(0x124)](_0x4db1e0[_0xaebce0(0x121)]);else _0x3a6d52[_0xaebce0(0x118)]!==_0x589677||_0x36b967||_0x444a1d?_0x38526b[_0xaebce0(0x124)](_0x4db1e0[_0xaebce0(0x121)]):_0x519458['push'](_0x4db1e0[_0xaebce0(0x121)]);}for(const _0x26cf9a of Object[_0xaebce0(0x128)](_0x4b1160[_0xaebce0(0x135)])){!_0x169e14[_0xaebce0(0x13a)](_0x26cf9a)&&_0x80d60c[_0xaebce0(0x124)](_0x26cf9a);}const _0x4ba754=[];if(_0x5b9045['bool'](_0xaebce0(0x134))){const _0x11d18b=await fetchAllSqlCodes(_0x5b9045[_0xaebce0(0x126)]);for(const _0x4d4b0d of _0x11d18b){!_0x169e14[_0xaebce0(0x13a)](_0x4d4b0d)&&!_0x4b1160[_0xaebce0(0x135)][_0x4d4b0d]&&_0x4ba754[_0xaebce0(0x124)](_0x4d4b0d);}}const _0x501c55=_0x5a732a[_0xaebce0(0x12b)]===0x0&&_0x38526b[_0xaebce0(0x12b)]===0x0&&_0x80d60c[_0xaebce0(0x12b)]===0x0&&_0x4ba754[_0xaebce0(0x12b)]===0x0;return{'ok':!![],'data':{'added':_0x5a732a,'modified':_0x38526b,'missing':_0x80d60c,'unchanged':_0x519458,'remoteOnly':_0x4ba754},'message':_0x501c55?_0xaebce0(0x129):_0x5a732a[_0xaebce0(0x12b)]+_0xaebce0(0x11f)+_0x38526b[_0xaebce0(0x12b)]+_0xaebce0(0x12d)+_0x80d60c[_0xaebce0(0x12b)]+'\x20missing,\x20'+_0x519458['length']+'\x20unchanged'+(_0x4ba754[_0xaebce0(0x12b)]>0x0?',\x20'+_0x4ba754['length']+_0xaebce0(0x138):'')};}};
1
+ const a179_0x379b0f=a179_0xd16c;function a179_0xd16c(_0x2bf438,_0x2d1126){_0x2bf438=_0x2bf438-0xbe;const _0x40768b=a179_0x4076();let _0xd16ca6=_0x40768b[_0x2bf438];return _0xd16ca6;}(function(_0x79a793,_0x318ab6){const _0x59d793=a179_0xd16c,_0x3afb17=_0x79a793();while(!![]){try{const _0x180419=-parseInt(_0x59d793(0xc0))/0x1*(-parseInt(_0x59d793(0xc7))/0x2)+parseInt(_0x59d793(0xcf))/0x3+-parseInt(_0x59d793(0xcc))/0x4+parseInt(_0x59d793(0xd7))/0x5*(-parseInt(_0x59d793(0xc6))/0x6)+-parseInt(_0x59d793(0xc8))/0x7+-parseInt(_0x59d793(0xcb))/0x8+parseInt(_0x59d793(0xd2))/0x9;if(_0x180419===_0x318ab6)break;else _0x3afb17['push'](_0x3afb17['shift']());}catch(_0x4479d4){_0x3afb17['push'](_0x3afb17['shift']());}}}(a179_0x4076,0x9619c));import{listSqlQueries}from'../../core/api-client.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';import{scanLocalSqlQueries}from'../../core/sql-sync/file-system.js';import{computeSqlFileHash}from'../../core/sql-sync/hash.js';import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile}from'../../core/sql-sync/lock.js';function a179_0x4076(){const _0x426ace=['map','sqlRoot','18430209kOFVVf','totalCount','boolean','Check\x20local\x20SQL\x20sync\x20status\x20against\x20lock\x20file','All\x20SQL\x20queries\x20are\x20in\x20sync.','556805SdvfBt','\x20missing,\x20','keys','status','lockFilePath','sqls','path','length','\x20remote-only','appCode','filePath','\x20modified,\x20','paging','tableData','relativePath','bool','1JzHayf','push','sqlName','lockKey','hash','\x20added,\x20','18hXtqqV','1990004kRbJej','4743830oZAJeg','has','Also\x20check\x20for\x20remote-only\x20SQL\x20queries\x20not\x20present\x20locally','6127760YZJdBi','4521864pfjodd','\x20unchanged','read','1440654FYEvHI'];a179_0x4076=function(){return _0x426ace;};return a179_0x4076();}const PAGE_SIZE=0x64;async function fetchAllSqlCodes(_0x4801de){const _0x5ce012=a179_0xd16c,_0x22eb3c=[];let _0x4e7544=0x1;while(!![]){const _0x26b1f6=await listSqlQueries(_0x4801de,{'currentPage':_0x4e7544,'pageSize':PAGE_SIZE}),_0xeff654=_0x26b1f6[_0x5ce012(0xe4)]??[];_0x22eb3c[_0x5ce012(0xc1)](..._0xeff654[_0x5ce012(0xd0)](_0x37c213=>_0x37c213['sqlCode']));if(_0xeff654[_0x5ce012(0xde)]===0x0)break;const _0x49af1a=_0x26b1f6[_0x5ce012(0xe3)]?.[_0x5ce012(0xd3)];if(_0x49af1a!=null?_0x22eb3c[_0x5ce012(0xde)]>=_0x49af1a:_0xeff654[_0x5ce012(0xde)]<PAGE_SIZE)break;_0x4e7544++;}return _0x22eb3c;}export const sqlStatus={'service':'sql','command':a179_0x379b0f(0xda),'description':a179_0x379b0f(0xd5),'risk':a179_0x379b0f(0xce),'flags':[{'name':'remote','type':a179_0x379b0f(0xd4),'description':a179_0x379b0f(0xca)}],async 'execute'(_0x3dc2d7){const _0xdfba20=a179_0x379b0f,_0xee2510=loadSqlProjectConfig(_0x3dc2d7['appCode']),_0x176c08=await readSqlLockFile(_0xee2510[_0xdfba20(0xdb)]),{appLock:_0x27c35b}=ensureSqlLockScope(_0x176c08??createEmptySqlLock(),_0xee2510[_0xdfba20(0xe0)],_0xee2510[_0xdfba20(0xd1)],_0xdfba20(0xda)),_0x853794=await scanLocalSqlQueries(_0xee2510),_0x1829de=[],_0x67ff0c=[],_0x75d0e9=[],_0x292f74=[],_0x18ceb1=new Set(_0x853794['map'](_0x5985ad=>_0x5985ad[_0xdfba20(0xc3)]));for(const _0x44ff88 of _0x853794){const _0x2f6446=await computeSqlFileHash(_0x44ff88[_0xdfba20(0xe1)]),_0x4ccd29=_0x27c35b[_0xdfba20(0xdc)][_0x44ff88[_0xdfba20(0xc3)]],_0x3a86dd=!!_0x4ccd29&&_0x4ccd29[_0xdfba20(0xdd)]!==_0x44ff88[_0xdfba20(0xbe)],_0x3564f1=!!_0x4ccd29&&!!_0x44ff88[_0xdfba20(0xc2)]&&_0x4ccd29[_0xdfba20(0xc2)]!==_0x44ff88[_0xdfba20(0xc2)];if(!_0x4ccd29)_0x1829de[_0xdfba20(0xc1)](_0x44ff88[_0xdfba20(0xc3)]);else _0x4ccd29[_0xdfba20(0xc4)]!==_0x2f6446||_0x3a86dd||_0x3564f1?_0x67ff0c['push'](_0x44ff88['lockKey']):_0x75d0e9[_0xdfba20(0xc1)](_0x44ff88[_0xdfba20(0xc3)]);}for(const _0x46b613 of Object[_0xdfba20(0xd9)](_0x27c35b['sqls'])){!_0x18ceb1[_0xdfba20(0xc9)](_0x46b613)&&_0x292f74[_0xdfba20(0xc1)](_0x46b613);}const _0x44f9d1=[];if(_0x3dc2d7[_0xdfba20(0xbf)]('remote')){const _0xa90297=await fetchAllSqlCodes(_0x3dc2d7['appCode']);for(const _0x405429 of _0xa90297){!_0x18ceb1[_0xdfba20(0xc9)](_0x405429)&&!_0x27c35b['sqls'][_0x405429]&&_0x44f9d1['push'](_0x405429);}}const _0xe62fba=_0x1829de['length']===0x0&&_0x67ff0c[_0xdfba20(0xde)]===0x0&&_0x292f74[_0xdfba20(0xde)]===0x0&&_0x44f9d1[_0xdfba20(0xde)]===0x0;return{'ok':!![],'data':{'added':_0x1829de,'modified':_0x67ff0c,'missing':_0x292f74,'unchanged':_0x75d0e9,'remoteOnly':_0x44f9d1},'message':_0xe62fba?_0xdfba20(0xd6):_0x1829de['length']+_0xdfba20(0xc5)+_0x67ff0c[_0xdfba20(0xde)]+_0xdfba20(0xe2)+_0x292f74['length']+_0xdfba20(0xd8)+_0x75d0e9[_0xdfba20(0xde)]+_0xdfba20(0xcd)+(_0x44f9d1[_0xdfba20(0xde)]>0x0?',\x20'+_0x44f9d1[_0xdfba20(0xde)]+_0xdfba20(0xdf):'')};}};
@@ -1 +1 @@
1
- const a180_0x5f1ecf=a180_0x1642;function a180_0x1642(_0x19c75b,_0x3d2e20){_0x19c75b=_0x19c75b-0x124;const _0x5d70c0=a180_0x5d70();let _0x164231=_0x5d70c0[_0x19c75b];return _0x164231;}(function(_0x47c6b5,_0x46f4e2){const _0x423229=a180_0x1642,_0x3178b7=_0x47c6b5();while(!![]){try{const _0x378189=parseInt(_0x423229(0x14a))/0x1+-parseInt(_0x423229(0x13e))/0x2*(-parseInt(_0x423229(0x155))/0x3)+parseInt(_0x423229(0x144))/0x4*(-parseInt(_0x423229(0x134))/0x5)+-parseInt(_0x423229(0x160))/0x6*(-parseInt(_0x423229(0x165))/0x7)+parseInt(_0x423229(0x157))/0x8*(-parseInt(_0x423229(0x15b))/0x9)+-parseInt(_0x423229(0x14d))/0xa+parseInt(_0x423229(0x126))/0xb;if(_0x378189===_0x46f4e2)break;else _0x3178b7['push'](_0x3178b7['shift']());}catch(_0x1b2023){_0x3178b7['push'](_0x3178b7['shift']());}}}(a180_0x5d70,0x6d456));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';function a180_0x5d70(){const _0x164605=['\x22\x20not\x20found\x20or\x20not\x20accessible','size','Path\x20to\x20the\x20SQL\x20file\x20to\x20validate','toLowerCase','tables','length','index_type','isArray','name','pkField','File\x20not\x20found:\x20','5EqITfB','columns','Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)','string','sqlType','tableName','flatMap','dataset','valid','read','2788yevntP','filter','joinAudit','file','indexes','map','2507004WXfHmO','SQL\x20schema\x20validation','find','get','schema:','\x22\x20not\x20found\x20in\x20any\x20dataset','109311YjTJfK','indexName','index_name','8623220IYtNSE','push','Dataset\x20\x22','flagMissing','Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against','type','from','fields','717wwTkkm','validation','8vnLkjo','trim','split','dbtableConfig','876222xjKACT','reason','Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)','str','sql','11580AHgFCN','message','schemas','utf-8','index_columns','854BhNfNG','columnNames','unshift','14916748JSNVOA','Audit\x20top-level\x20JOIN\x20equality\x20predicates\x20against\x20dataset\x20index\x20metadata','primary'];a180_0x5d70=function(){return _0x164605;};return a180_0x5d70();}import{CliErrors}from'../../errors.js';import{assertDatasetIsDbTableBacked,filterDbTableBackedDatasets}from'../../commands/dataset/capability.js';export const sqlValidate={'service':a180_0x5f1ecf(0x15f),'command':'validate','description':a180_0x5f1ecf(0x15d),'risk':a180_0x5f1ecf(0x13d),'flags':[{'name':a180_0x5f1ecf(0x141),'type':a180_0x5f1ecf(0x137),'description':a180_0x5f1ecf(0x12b)},{'name':a180_0x5f1ecf(0x15f),'type':'string','description':a180_0x5f1ecf(0x136)},{'name':a180_0x5f1ecf(0x162),'type':'string','description':a180_0x5f1ecf(0x151)},{'name':'check-indexes','type':'boolean','description':a180_0x5f1ecf(0x127)}],async 'execute'(_0x2ac045){const _0x55c4fc=a180_0x5f1ecf,_0x3d2178=_0x2ac045[_0x55c4fc(0x15e)](_0x55c4fc(0x141)),_0x487e54=_0x2ac045[_0x55c4fc(0x15e)](_0x55c4fc(0x15f)),_0x4eaf49=_0x2ac045['str'](_0x55c4fc(0x162)),_0x252ba4=_0x2ac045['bool']('check-indexes');if(!_0x3d2178&&!_0x487e54)throw CliErrors[_0x55c4fc(0x150)](_0x55c4fc(0x141),'Provide\x20--file\x20or\x20--sql');if(_0x252ba4&&!_0x4eaf49)throw CliErrors[_0x55c4fc(0x156)]('--check-indexes\x20requires\x20--schemas.');let _0xc58e3c;if(_0x3d2178){const _0x246499=resolve(process['cwd'](),_0x3d2178);if(!existsSync(_0x246499))throw CliErrors[_0x55c4fc(0x156)](_0x55c4fc(0x133)+_0x246499);_0xc58e3c=readFileSync(_0x246499,_0x55c4fc(0x163));}else _0xc58e3c=_0x487e54;const _0x28b4db=validateSql(_0xc58e3c),_0x387b87={'valid':_0x28b4db['valid'],'sqlType':_0x28b4db[_0x55c4fc(0x138)][_0x55c4fc(0x152)],'isSelectOnly':_0x28b4db[_0x55c4fc(0x138)]['isSelectOnly'],'isDangerous':_0x28b4db['sqlType']['isDangerous'],'tables':_0x28b4db[_0x55c4fc(0x12d)],'parameters':_0x28b4db['parameters'],'message':_0x28b4db[_0x55c4fc(0x161)]};_0x28b4db[_0x55c4fc(0x138)][_0x55c4fc(0x15c)]&&(_0x387b87['reason']=_0x28b4db[_0x55c4fc(0x138)][_0x55c4fc(0x15c)]);if(_0x4eaf49&&_0x28b4db[_0x55c4fc(0x13c)]){const _0x94ee32=_0x4eaf49[_0x55c4fc(0x159)](',')['map'](_0x4d95e4=>_0x4d95e4[_0x55c4fc(0x158)]())[_0x55c4fc(0x13f)](Boolean),_0x58491b=[],_0x2e4004=[],_0x5fa30c=filterDbTableBackedDatasets(await listDatasets(_0x2ac045['appCode'])),_0x37c77f=new Map(_0x5fa30c[_0x55c4fc(0x143)](_0x1db2cb=>[_0x1db2cb['dbtableConfig']?.[_0x55c4fc(0x139)]?.['toLowerCase'](),_0x1db2cb]));for(const _0x2cda37 of _0x28b4db[_0x55c4fc(0x12d)]){const _0x4c313a=_0x37c77f[_0x55c4fc(0x147)](_0x2cda37[_0x55c4fc(0x12c)]());!_0x4c313a&&_0x58491b['push']('Table\x20\x22'+_0x2cda37+_0x55c4fc(0x149));}for(const _0x2e7a4c of _0x94ee32){let _0x366c8a;try{_0x366c8a=await getDatasetDetail(_0x2e7a4c);}catch{_0x58491b[_0x55c4fc(0x14e)](_0x55c4fc(0x14f)+_0x2e7a4c+_0x55c4fc(0x129));continue;}assertDatasetIsDbTableBacked(_0x366c8a,_0x55c4fc(0x145));const _0x507c70=Array[_0x55c4fc(0x130)](_0x366c8a['fields'])?_0x366c8a[_0x55c4fc(0x154)]:[],_0x3b36af=new Set(_0x507c70[_0x55c4fc(0x143)](_0x2fa1e7=>_0x2fa1e7[_0x55c4fc(0x131)]?.['toLowerCase']())),_0x1248e7=_0x366c8a[_0x55c4fc(0x15a)]?.[_0x55c4fc(0x139)]||_0x366c8a[_0x55c4fc(0x139)]||_0x2e7a4c;_0x387b87[_0x55c4fc(0x148)+_0x1248e7]={'code':_0x2e7a4c,'tableName':_0x1248e7,'fieldCount':_0x3b36af[_0x55c4fc(0x12a)],'fields':Array[_0x55c4fc(0x153)](_0x3b36af)};if(_0x252ba4){const _0x4e09fd=normalizeDatasetIndexes(_0x366c8a);_0x2e4004[_0x55c4fc(0x14e)]({'tableName':_0x1248e7,..._0x4e09fd});}}_0x58491b[_0x55c4fc(0x12e)]>0x0&&(_0x387b87['schemaWarnings']=_0x58491b),_0x252ba4&&(_0x387b87[_0x55c4fc(0x140)]=auditSqlJoinIndexes(_0xc58e3c,_0x2e4004));}return{'ok':_0x28b4db[_0x55c4fc(0x13c)],'data':_0x387b87,'message':_0x28b4db[_0x55c4fc(0x161)]};}};function normalizeDatasetIndexes(_0x821b77){const _0x1ad06a=a180_0x5f1ecf,_0x20ca3b=Array[_0x1ad06a(0x130)](_0x821b77?.[_0x1ad06a(0x13b)]?.[_0x1ad06a(0x142)])?_0x821b77[_0x1ad06a(0x13b)][_0x1ad06a(0x142)]:Array[_0x1ad06a(0x130)](_0x821b77?.[_0x1ad06a(0x142)])?_0x821b77['indexes']:[],_0x115227=_0x20ca3b[_0x1ad06a(0x13a)](_0x1eb4db=>{const _0x548d8c=_0x1ad06a,_0x448e2f=Array[_0x548d8c(0x130)](_0x1eb4db?.['index_columns'])?_0x1eb4db[_0x548d8c(0x164)]:Array[_0x548d8c(0x130)](_0x1eb4db?.[_0x548d8c(0x124)])?_0x1eb4db[_0x548d8c(0x124)]:Array[_0x548d8c(0x130)](_0x1eb4db?.[_0x548d8c(0x135)])?_0x1eb4db['columns']:[],_0x5175a5=_0x448e2f[_0x548d8c(0x13f)](_0x581c72=>typeof _0x581c72===_0x548d8c(0x137))[_0x548d8c(0x143)](_0x2941d5=>_0x2941d5[_0x548d8c(0x158)]())[_0x548d8c(0x13f)](Boolean);if(_0x5175a5[_0x548d8c(0x12e)]===0x0)return[];const _0x18939e=[_0x1eb4db?.[_0x548d8c(0x14b)],_0x1eb4db?.[_0x548d8c(0x14c)],_0x1eb4db?.[_0x548d8c(0x131)]][_0x548d8c(0x146)](_0x335fd5=>typeof _0x335fd5==='string'&&_0x335fd5[_0x548d8c(0x158)]()),_0xc0820=[_0x1eb4db?.[_0x548d8c(0x12f)],_0x1eb4db?.[_0x548d8c(0x152)]][_0x548d8c(0x146)](_0x2b9e23=>typeof _0x2b9e23===_0x548d8c(0x137)&&_0x2b9e23[_0x548d8c(0x158)]());return[{..._0x18939e?{'name':_0x18939e[_0x548d8c(0x158)]()}:{},..._0xc0820?{'type':_0xc0820['trim']()}:{},'columns':_0x5175a5}];}),_0x1e4ed5=[..._0x115227],_0x4f8022=typeof _0x821b77?.[_0x1ad06a(0x15a)]?.[_0x1ad06a(0x132)]===_0x1ad06a(0x137)?_0x821b77[_0x1ad06a(0x15a)][_0x1ad06a(0x132)][_0x1ad06a(0x159)](',')[_0x1ad06a(0x143)](_0x4bf7bf=>_0x4bf7bf['trim']())[_0x1ad06a(0x13f)](Boolean):[];return _0x4f8022[_0x1ad06a(0x12e)]>0x0&&_0x1e4ed5[_0x1ad06a(0x125)]({'type':_0x1ad06a(0x128),'columns':_0x4f8022}),{'indexes':_0x1e4ed5,'metadataAvailable':_0x115227['length']>0x0};}
1
+ const a180_0x298a70=a180_0x37bd;(function(_0x45d89a,_0x910d92){const _0x185570=a180_0x37bd,_0x1f8942=_0x45d89a();while(!![]){try{const _0xe19854=-parseInt(_0x185570(0xc9))/0x1*(-parseInt(_0x185570(0xd8))/0x2)+-parseInt(_0x185570(0xf5))/0x3+parseInt(_0x185570(0xe2))/0x4*(parseInt(_0x185570(0xeb))/0x5)+parseInt(_0x185570(0xf6))/0x6*(-parseInt(_0x185570(0xf1))/0x7)+-parseInt(_0x185570(0xea))/0x8*(parseInt(_0x185570(0xd5))/0x9)+parseInt(_0x185570(0xf2))/0xa+-parseInt(_0x185570(0xe0))/0xb;if(_0xe19854===_0x910d92)break;else _0x1f8942['push'](_0x1f8942['shift']());}catch(_0x53837f){_0x1f8942['push'](_0x1f8942['shift']());}}}(a180_0x6345,0xe35ef));import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';import{validateSql}from'../../core/sql-validator.js';function a180_0x37bd(_0x2de38a,_0x4da0e8){_0x2de38a=_0x2de38a-0xbc;const _0x6345b5=a180_0x6345();let _0x37bdec=_0x6345b5[_0x2de38a];return _0x37bdec;}function a180_0x6345(){const _0x357893=['pkField','length','from','Dataset\x20\x22','Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)','type','schemaWarnings','tables','string','23FKXVUl','sql','isSelectOnly','validation','map','dbtableConfig','\x22\x20not\x20found\x20in\x20any\x20dataset','schema:','indexName','fields','cwd','valid','34911czpBRD','parameters','Path\x20to\x20the\x20SQL\x20file\x20to\x20validate','68794zkkTCq','Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)','reason','Table\x20\x22','schemas','tableName','Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against','appCode','3861693dSHFTA','isArray','4ZahqxN','toLowerCase','find','index_type','message','size','utf-8','columns','2024AZbfsK','9068165RTSXFE','filter','read','--check-indexes\x20requires\x20--schemas.','SQL\x20schema\x20validation','validate','273Hppubb','16252390ZEPgJA','str','flagMissing','2283543CPMYXv','185394oHbYrx','unshift','split','dataset','push','File\x20not\x20found:\x20','indexes','file','sqlType','get','isDangerous','Provide\x20--file\x20or\x20--sql','name','index_columns','trim'];a180_0x6345=function(){return _0x357893;};return a180_0x6345();}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';export const sqlValidate={'service':a180_0x298a70(0xca),'command':a180_0x298a70(0xf0),'description':a180_0x298a70(0xc4),'risk':a180_0x298a70(0xed),'flags':[{'name':a180_0x298a70(0xfd),'type':a180_0x298a70(0xc8),'description':a180_0x298a70(0xd7)},{'name':a180_0x298a70(0xca),'type':a180_0x298a70(0xc8),'description':a180_0x298a70(0xd9)},{'name':a180_0x298a70(0xdc),'type':a180_0x298a70(0xc8),'description':a180_0x298a70(0xde)},{'name':'check-indexes','type':'boolean','description':'Audit\x20top-level\x20JOIN\x20equality\x20predicates\x20against\x20dataset\x20index\x20metadata'}],async 'execute'(_0xdca971){const _0x583d35=a180_0x298a70,_0x890794=_0xdca971[_0x583d35(0xf3)](_0x583d35(0xfd)),_0xbfbae9=_0xdca971[_0x583d35(0xf3)](_0x583d35(0xca)),_0x63ae17=_0xdca971[_0x583d35(0xf3)](_0x583d35(0xdc)),_0xf87917=_0xdca971['bool']('check-indexes');if(!_0x890794&&!_0xbfbae9)throw CliErrors[_0x583d35(0xf4)](_0x583d35(0xfd),_0x583d35(0xbc));if(_0xf87917&&!_0x63ae17)throw CliErrors['validation'](_0x583d35(0xee));let _0x2a0554;if(_0x890794){const _0x541d1c=resolve(process[_0x583d35(0xd3)](),_0x890794);if(!existsSync(_0x541d1c))throw CliErrors[_0x583d35(0xcc)](_0x583d35(0xfb)+_0x541d1c);_0x2a0554=readFileSync(_0x541d1c,_0x583d35(0xe8));}else _0x2a0554=_0xbfbae9;const _0x1990a7=validateSql(_0x2a0554),_0xbbefc9={'valid':_0x1990a7[_0x583d35(0xd4)],'sqlType':_0x1990a7['sqlType'][_0x583d35(0xc5)],'isSelectOnly':_0x1990a7[_0x583d35(0xfe)][_0x583d35(0xcb)],'isDangerous':_0x1990a7[_0x583d35(0xfe)][_0x583d35(0x100)],'tables':_0x1990a7['tables'],'parameters':_0x1990a7[_0x583d35(0xd6)],'message':_0x1990a7[_0x583d35(0xe6)]};_0x1990a7[_0x583d35(0xfe)][_0x583d35(0xda)]&&(_0xbbefc9['reason']=_0x1990a7['sqlType']['reason']);if(_0x63ae17&&_0x1990a7[_0x583d35(0xd4)]){const _0x5f425a=_0x63ae17[_0x583d35(0xf8)](',')[_0x583d35(0xcd)](_0x8df41=>_0x8df41[_0x583d35(0xbf)]())['filter'](Boolean),_0x4fddb8=[],_0x210dcb=[],_0x1b7496=filterDbTableBackedDatasets(await listDatasets(_0xdca971[_0x583d35(0xdf)])),_0x3f635d=new Map(_0x1b7496[_0x583d35(0xcd)](_0x1ba5eb=>[_0x1ba5eb[_0x583d35(0xce)]?.['tableName']?.['toLowerCase'](),_0x1ba5eb]));for(const _0x59d8df of _0x1990a7[_0x583d35(0xc7)]){const _0x1bbb43=_0x3f635d[_0x583d35(0xff)](_0x59d8df[_0x583d35(0xe3)]());!_0x1bbb43&&_0x4fddb8[_0x583d35(0xfa)](_0x583d35(0xdb)+_0x59d8df+_0x583d35(0xcf));}for(const _0x178e6b of _0x5f425a){let _0x42f2c8;try{_0x42f2c8=await getDatasetDetail(_0x178e6b);}catch{_0x4fddb8[_0x583d35(0xfa)](_0x583d35(0xc3)+_0x178e6b+'\x22\x20not\x20found\x20or\x20not\x20accessible');continue;}assertDatasetIsDbTableBacked(_0x42f2c8,_0x583d35(0xef));const _0x27b54c=Array[_0x583d35(0xe1)](_0x42f2c8['fields'])?_0x42f2c8[_0x583d35(0xd2)]:[],_0x118f67=new Set(_0x27b54c[_0x583d35(0xcd)](_0x2d54f8=>_0x2d54f8['name']?.[_0x583d35(0xe3)]())),_0x45e5c2=_0x42f2c8[_0x583d35(0xce)]?.[_0x583d35(0xdd)]||_0x42f2c8[_0x583d35(0xdd)]||_0x178e6b;_0xbbefc9[_0x583d35(0xd0)+_0x45e5c2]={'code':_0x178e6b,'tableName':_0x45e5c2,'fieldCount':_0x118f67[_0x583d35(0xe7)],'fields':Array[_0x583d35(0xc2)](_0x118f67)};if(_0xf87917){const _0x38cf4b=normalizeDatasetIndexes(_0x42f2c8);_0x210dcb[_0x583d35(0xfa)]({'tableName':_0x45e5c2,..._0x38cf4b});}}_0x4fddb8[_0x583d35(0xc1)]>0x0&&(_0xbbefc9[_0x583d35(0xc6)]=_0x4fddb8),_0xf87917&&(_0xbbefc9['joinAudit']=auditSqlJoinIndexes(_0x2a0554,_0x210dcb));}return{'ok':_0x1990a7[_0x583d35(0xd4)],'data':_0xbbefc9,'message':_0x1990a7['message']};}};function normalizeDatasetIndexes(_0x35cf30){const _0x57b965=a180_0x298a70,_0x44ae57=Array[_0x57b965(0xe1)](_0x35cf30?.['dataset']?.[_0x57b965(0xfc)])?_0x35cf30[_0x57b965(0xf9)]['indexes']:Array['isArray'](_0x35cf30?.[_0x57b965(0xfc)])?_0x35cf30[_0x57b965(0xfc)]:[],_0x4ba35c=_0x44ae57['flatMap'](_0x4098cb=>{const _0x2c486e=_0x57b965,_0x208bbd=Array[_0x2c486e(0xe1)](_0x4098cb?.[_0x2c486e(0xbe)])?_0x4098cb[_0x2c486e(0xbe)]:Array[_0x2c486e(0xe1)](_0x4098cb?.['columnNames'])?_0x4098cb['columnNames']:Array[_0x2c486e(0xe1)](_0x4098cb?.[_0x2c486e(0xe9)])?_0x4098cb[_0x2c486e(0xe9)]:[],_0x35a973=_0x208bbd[_0x2c486e(0xec)](_0x12d63c=>typeof _0x12d63c===_0x2c486e(0xc8))[_0x2c486e(0xcd)](_0x232e91=>_0x232e91[_0x2c486e(0xbf)]())[_0x2c486e(0xec)](Boolean);if(_0x35a973[_0x2c486e(0xc1)]===0x0)return[];const _0x46a188=[_0x4098cb?.[_0x2c486e(0xd1)],_0x4098cb?.['index_name'],_0x4098cb?.[_0x2c486e(0xbd)]][_0x2c486e(0xe4)](_0x435485=>typeof _0x435485===_0x2c486e(0xc8)&&_0x435485[_0x2c486e(0xbf)]()),_0x3b1665=[_0x4098cb?.[_0x2c486e(0xe5)],_0x4098cb?.[_0x2c486e(0xc5)]][_0x2c486e(0xe4)](_0x5a26eb=>typeof _0x5a26eb==='string'&&_0x5a26eb[_0x2c486e(0xbf)]());return[{..._0x46a188?{'name':_0x46a188[_0x2c486e(0xbf)]()}:{},..._0x3b1665?{'type':_0x3b1665['trim']()}:{},'columns':_0x35a973}];}),_0x284748=[..._0x4ba35c],_0x2298b3=typeof _0x35cf30?.[_0x57b965(0xce)]?.[_0x57b965(0xc0)]===_0x57b965(0xc8)?_0x35cf30[_0x57b965(0xce)][_0x57b965(0xc0)][_0x57b965(0xf8)](',')[_0x57b965(0xcd)](_0x4aab45=>_0x4aab45[_0x57b965(0xbf)]())[_0x57b965(0xec)](Boolean):[];return _0x2298b3['length']>0x0&&_0x284748[_0x57b965(0xf7)]({'type':'primary','columns':_0x2298b3}),{'indexes':_0x284748,'metadataAvailable':_0x4ba35c[_0x57b965(0xc1)]>0x0};}
@@ -1 +1 @@
1
- (function(_0xca7d2f,_0x34b093){const _0x40d81b=a181_0x1d5a,_0x324eeb=_0xca7d2f();while(!![]){try{const _0x1eebc5=parseInt(_0x40d81b(0x11f))/0x1*(parseInt(_0x40d81b(0x126))/0x2)+-parseInt(_0x40d81b(0x124))/0x3+-parseInt(_0x40d81b(0x123))/0x4+-parseInt(_0x40d81b(0x122))/0x5*(-parseInt(_0x40d81b(0x125))/0x6)+parseInt(_0x40d81b(0x121))/0x7+-parseInt(_0x40d81b(0x11e))/0x8+parseInt(_0x40d81b(0x120))/0x9;if(_0x1eebc5===_0x34b093)break;else _0x324eeb['push'](_0x324eeb['shift']());}catch(_0x41fa61){_0x324eeb['push'](_0x324eeb['shift']());}}}(a181_0x1adf,0x20013));import{taskStatus}from'../../commands/task/status.js';function a181_0x1d5a(_0x45d4ce,_0x35ffc7){_0x45d4ce=_0x45d4ce-0x11e;const _0x1adf09=a181_0x1adf();let _0x1d5a74=_0x1adf09[_0x45d4ce];return _0x1d5a74;}function a181_0x1adf(){const _0x421728=['1116272Ejqwqk','75752FGMDKq','606123heuYXo','468328JVGGMn','95RJSScw','68388vgjjih','541068kUrBnp','33654KagJxJ','6WnqUDy'];a181_0x1adf=function(){return _0x421728;};return a181_0x1adf();}export const taskDefinitions=[taskStatus];
1
+ (function(_0x46499a,_0x5efbd5){const _0x339b36=a181_0x5b86,_0x307c48=_0x46499a();while(!![]){try{const _0x153277=parseInt(_0x339b36(0x1c9))/0x1*(-parseInt(_0x339b36(0x1d4))/0x2)+-parseInt(_0x339b36(0x1ce))/0x3*(parseInt(_0x339b36(0x1d1))/0x4)+-parseInt(_0x339b36(0x1d0))/0x5*(parseInt(_0x339b36(0x1cf))/0x6)+-parseInt(_0x339b36(0x1d3))/0x7+parseInt(_0x339b36(0x1cc))/0x8*(parseInt(_0x339b36(0x1ca))/0x9)+parseInt(_0x339b36(0x1cb))/0xa*(-parseInt(_0x339b36(0x1cd))/0xb)+parseInt(_0x339b36(0x1d2))/0xc;if(_0x153277===_0x5efbd5)break;else _0x307c48['push'](_0x307c48['shift']());}catch(_0x40f301){_0x307c48['push'](_0x307c48['shift']());}}}(a181_0x257a,0x5b104));import{taskStatus}from'../../commands/task/status.js';function a181_0x257a(){const _0x3fe12e=['2258770RZtJWN','2187784jxTFDM','11EzPfak','90159QSWbIL','12yyYfyB','231705olvRQh','28jFYSqZ','16416912mVQPLe','2076480jPPHdY','2158JQiALB','664Mzlamr','18WuaJHf'];a181_0x257a=function(){return _0x3fe12e;};return a181_0x257a();}function a181_0x5b86(_0x1756a7,_0x2bd710){_0x1756a7=_0x1756a7-0x1c9;const _0x257ace=a181_0x257a();let _0x5b8607=_0x257ace[_0x1756a7];return _0x5b8607;}export const taskDefinitions=[taskStatus];
@@ -1 +1 @@
1
- function a182_0x1182(){const _0x59710a=['125808WHUsTI','apiError','task','1217000oqbVll','39KThMPw','1vWIfhT',',\x20received\x20','read','task-id','status','10234524PpBOlS','str','352216ZKgumY','11glkdJB','string','267804UIUIZb','appCode','9TmApxx','trim','8497630woeifF','340478HGxwyi','isTerminal','42nrPZzL','taskId'];a182_0x1182=function(){return _0x59710a;};return a182_0x1182();}const a182_0x29f290=a182_0x4e67;function a182_0x4e67(_0x142e62,_0x1c41fb){_0x142e62=_0x142e62-0x17b;const _0x1182eb=a182_0x1182();let _0x4e67fd=_0x1182eb[_0x142e62];return _0x4e67fd;}(function(_0x420c52,_0x5147cb){const _0x101f41=a182_0x4e67,_0x24515f=_0x420c52();while(!![]){try{const _0x25fd6f=-parseInt(_0x101f41(0x18c))/0x1*(parseInt(_0x101f41(0x183))/0x2)+-parseInt(_0x101f41(0x18b))/0x3*(-parseInt(_0x101f41(0x17b))/0x4)+-parseInt(_0x101f41(0x18a))/0x5+-parseInt(_0x101f41(0x17e))/0x6+-parseInt(_0x101f41(0x185))/0x7*(parseInt(_0x101f41(0x187))/0x8)+parseInt(_0x101f41(0x180))/0x9*(parseInt(_0x101f41(0x182))/0xa)+-parseInt(_0x101f41(0x17c))/0xb*(parseInt(_0x101f41(0x191))/0xc);if(_0x25fd6f===_0x5147cb)break;else _0x24515f['push'](_0x24515f['shift']());}catch(_0x14a5a6){_0x24515f['push'](_0x24515f['shift']());}}}(a182_0x1182,0x8fc9f));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';export const taskStatus={'service':a182_0x29f290(0x189),'command':a182_0x29f290(0x190),'description':'Query\x20an\x20asynchronous\x20task;\x20repeat\x20for\x20PENDING\x20or\x20PROCESSING\x20until\x20SUCCESS\x20or\x20FAILED','risk':a182_0x29f290(0x18e),'defaultOutputFormat':'compress','structuredErrors':!![],'flags':[{'name':a182_0x29f290(0x18f),'type':a182_0x29f290(0x17d),'required':!![],'description':'Task\x20id\x20returned\x20by\x20an\x20asynchronous\x20platform\x20command'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x23764e){const _0x4f9287=a182_0x29f290;if(!_0x23764e[_0x4f9287(0x192)]('task-id')[_0x4f9287(0x181)]())throw CliErrors['flagMissing'](_0x4f9287(0x18f));},async 'execute'(_0x80a655){const _0x3adb79=a182_0x29f290,_0x3feb1e=_0x80a655[_0x3adb79(0x192)](_0x3adb79(0x18f))[_0x3adb79(0x181)](),_0x12beb2=normalizeAsyncTask(await getAsyncTaskStatus(_0x3feb1e,_0x80a655['appCode'],_0x80a655['cookie']));if(_0x12beb2[_0x3adb79(0x186)]!==_0x3feb1e)throw CliErrors[_0x3adb79(0x188)]('Task\x20status\x20response\x20id\x20mismatch:\x20requested\x20'+_0x3feb1e+_0x3adb79(0x18d)+_0x12beb2[_0x3adb79(0x186)]+'.');const _0x1f63f0=buildAsyncTaskStatusCommand(_0x12beb2['taskId'],_0x80a655[_0x3adb79(0x17f)]);return{'ok':!![],'message':asyncTaskMessage(_0x12beb2),'data':{'appCode':_0x80a655[_0x3adb79(0x17f)],..._0x12beb2,'query':_0x12beb2[_0x3adb79(0x184)]?null:{'command':_0x1f63f0}}};}};
1
+ const a182_0x416758=a182_0xc70c;(function(_0x2c5c80,_0x20370e){const _0x3a7c42=a182_0xc70c,_0x2e1bfa=_0x2c5c80();while(!![]){try{const _0x56aa28=-parseInt(_0x3a7c42(0xed))/0x1+parseInt(_0x3a7c42(0xe0))/0x2+parseInt(_0x3a7c42(0xe7))/0x3*(parseInt(_0x3a7c42(0xdb))/0x4)+parseInt(_0x3a7c42(0xe5))/0x5+-parseInt(_0x3a7c42(0xde))/0x6+-parseInt(_0x3a7c42(0xeb))/0x7+parseInt(_0x3a7c42(0xdf))/0x8*(parseInt(_0x3a7c42(0xd9))/0x9);if(_0x56aa28===_0x20370e)break;else _0x2e1bfa['push'](_0x2e1bfa['shift']());}catch(_0x1e6b10){_0x2e1bfa['push'](_0x2e1bfa['shift']());}}}(a182_0x30e2,0xc9f98));function a182_0xc70c(_0x5c7b2b,_0x23d3da){_0x5c7b2b=_0x5c7b2b-0xd6;const _0x30e22f=a182_0x30e2();let _0xc70cb9=_0x30e22f[_0x5c7b2b];return _0xc70cb9;}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';export const taskStatus={'service':a182_0x416758(0xe4),'command':a182_0x416758(0xe1),'description':'Query\x20an\x20asynchronous\x20task;\x20repeat\x20for\x20PENDING\x20or\x20PROCESSING\x20until\x20SUCCESS\x20or\x20FAILED','risk':a182_0x416758(0xe6),'defaultOutputFormat':'compress','structuredErrors':!![],'flags':[{'name':a182_0x416758(0xd6),'type':a182_0x416758(0xd8),'required':!![],'description':'Task\x20id\x20returned\x20by\x20an\x20asynchronous\x20platform\x20command'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x4a2a70){const _0x17a494=a182_0x416758;if(!_0x4a2a70['str'](_0x17a494(0xd6))[_0x17a494(0xe9)]())throw CliErrors[_0x17a494(0xea)](_0x17a494(0xd6));},async 'execute'(_0x2dbabf){const _0x58f262=a182_0x416758,_0x52fe78=_0x2dbabf[_0x58f262(0xdc)](_0x58f262(0xd6))[_0x58f262(0xe9)](),_0x1c92c7=normalizeAsyncTask(await getAsyncTaskStatus(_0x52fe78,_0x2dbabf[_0x58f262(0xec)],_0x2dbabf[_0x58f262(0xdd)]));if(_0x1c92c7[_0x58f262(0xe8)]!==_0x52fe78)throw CliErrors[_0x58f262(0xd7)](_0x58f262(0xe3)+_0x52fe78+_0x58f262(0xe2)+_0x1c92c7[_0x58f262(0xe8)]+'.');const _0x170a0b=buildAsyncTaskStatusCommand(_0x1c92c7[_0x58f262(0xe8)],_0x2dbabf['appCode']);return{'ok':!![],'message':asyncTaskMessage(_0x1c92c7),'data':{'appCode':_0x2dbabf[_0x58f262(0xec)],..._0x1c92c7,'query':_0x1c92c7[_0x58f262(0xda)]?null:{'command':_0x170a0b}}};}};function a182_0x30e2(){const _0xeb0cd1=[',\x20received\x20','Task\x20status\x20response\x20id\x20mismatch:\x20requested\x20','task','4003080tAAEIw','read','3SDLizQ','taskId','trim','flagMissing','4829097YNaAMB','appCode','1449923NVSUZG','task-id','apiError','string','36xocdVY','isTerminal','1073588rnzcMY','str','cookie','2590050whrQlS','3156176AilSYS','1503312krePBY','status'];a182_0x30e2=function(){return _0xeb0cd1;};return a182_0x30e2();}
@@ -1 +1 @@
1
- const a183_0xe13b48=a183_0xe61f;(function(_0x5e9cba,_0x49de54){const _0x490e67=a183_0xe61f,_0x487a17=_0x5e9cba();while(!![]){try{const _0x12cac3=parseInt(_0x490e67(0x161))/0x1+-parseInt(_0x490e67(0x162))/0x2+-parseInt(_0x490e67(0x169))/0x3+-parseInt(_0x490e67(0x16b))/0x4*(parseInt(_0x490e67(0x165))/0x5)+-parseInt(_0x490e67(0x164))/0x6+parseInt(_0x490e67(0x16d))/0x7*(-parseInt(_0x490e67(0x16c))/0x8)+parseInt(_0x490e67(0x16e))/0x9;if(_0x12cac3===_0x49de54)break;else _0x487a17['push'](_0x487a17['shift']());}catch(_0x3d2ca3){_0x487a17['push'](_0x487a17['shift']());}}}(a183_0x28cb,0xe23d4));import{buildAppAddFlags,runAppAdd,validateAppName}from'../../commands/common/app-registry.js';function a183_0x28cb(){const _0x37cb2e=['24292224mRpyWt','855091zvexAP','2234926gPmNgY','workspace','654324CJTGIm','95GsVpiZ','write','name','workspace\x20add','678042ehcCMq','Register\x20an\x20app\x20profile\x20in\x20the\x20current\x20workspace\x20(or\x20--global)','55052KENlIl','8deigAG','6394661DaHoED'];a183_0x28cb=function(){return _0x37cb2e;};return a183_0x28cb();}function a183_0xe61f(_0x3ab325,_0x5abd31){_0x3ab325=_0x3ab325-0x161;const _0x28cbf8=a183_0x28cb();let _0xe61f5=_0x28cbf8[_0x3ab325];return _0xe61f5;}export const workspaceAddDefinition={'service':a183_0xe13b48(0x163),'command':'add','description':a183_0xe13b48(0x16a),'risk':a183_0xe13b48(0x166),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a183_0xe13b48(0x167),'description':'App\x20profile\x20name','required':!![]}],'flags':buildAppAddFlags(),'validate':_0xf6e9b8=>validateAppName(_0xf6e9b8,a183_0xe13b48(0x168)),'execute':_0x1071d4=>runAppAdd(_0x1071d4,a183_0xe13b48(0x168))};
1
+ function a183_0x2460(_0x31d006,_0x58656a){_0x31d006=_0x31d006-0x16c;const _0x4c7cc9=a183_0x4c7c();let _0x246036=_0x4c7cc9[_0x31d006];return _0x246036;}function a183_0x4c7c(){const _0x30ab70=['1956460QlsbPu','2329833kGGsaX','2yXuDgn','6878367ySOBxa','6913740uzJQol','12145jbqgOt','520KXUKNf','add','Register\x20an\x20app\x20profile\x20in\x20the\x20current\x20workspace\x20(or\x20--global)','1195742ZPLCJg','workspace\x20add','App\x20profile\x20name','name','510512advYHK'];a183_0x4c7c=function(){return _0x30ab70;};return a183_0x4c7c();}const a183_0x5f376e=a183_0x2460;(function(_0x1fda13,_0x4916a4){const _0x4ce751=a183_0x2460,_0x249cee=_0x1fda13();while(!![]){try{const _0xd2e045=parseInt(_0x4ce751(0x16c))/0x1*(parseInt(_0x4ce751(0x173))/0x2)+-parseInt(_0x4ce751(0x172))/0x3+parseInt(_0x4ce751(0x170))/0x4+-parseInt(_0x4ce751(0x171))/0x5+parseInt(_0x4ce751(0x175))/0x6+-parseInt(_0x4ce751(0x176))/0x7*(-parseInt(_0x4ce751(0x177))/0x8)+-parseInt(_0x4ce751(0x174))/0x9;if(_0xd2e045===_0x4916a4)break;else _0x249cee['push'](_0x249cee['shift']());}catch(_0x2b91da){_0x249cee['push'](_0x249cee['shift']());}}}(a183_0x4c7c,0xa038d));import{buildAppAddFlags,runAppAdd,validateAppName}from'../../commands/common/app-registry.js';export const workspaceAddDefinition={'service':'workspace','command':a183_0x5f376e(0x178),'description':a183_0x5f376e(0x179),'risk':'write','requiresAuth':![],'requiresAppCode':![],'args':[{'name':a183_0x5f376e(0x16f),'description':a183_0x5f376e(0x16e),'required':!![]}],'flags':buildAppAddFlags(),'validate':_0x1476bd=>validateAppName(_0x1476bd,a183_0x5f376e(0x16d)),'execute':_0x11f576=>runAppAdd(_0x11f576,a183_0x5f376e(0x16d))};
@@ -1 +1 @@
1
- function a184_0xc8f5(){const _0x4c6cef=['use','validation','1499733fjBgqX','API\x20directory\x20path\x20for\x20this\x20workspace\x20app\x20profile','Pass\x20--appcode\x20<code>,\x20or\x20choose\x20one\x20of:\x20','write','\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`','apps','4385XAyvDK','\x20--app\x20','length','11MKJEKF','\x22\x20not\x20found.','number','defaultFormat','Use\x20`','riskLevel','app','init','Switch\x20the\x20current\x20workspace\x20app\x20binding','workspace','441bElWog','\x20--appcode\x20<code>`.','apiDir','.\x20Credentials:\x20not\x20written.','initialized','keys','\x20(appcode:\x20','10oRQyDd','trim','266FgzGRK','appcode','globalConfig','App\x20\x22','32488IasgTh','string','env','updated','isArray','flag','Initialize\x20the\x20current\x20workspace\x20app\x20binding','\x20workspace\x20use\x20--app\x20<name>`.','85380ZogmqO','Invalid\x20appcode:\x20','\x20workspace\x20<init|use>\x20--app\x20<name>\x20[--appcode\x20<code>]','Missing\x20workspace\x20app\x20selector.','join','workspace.','locale','Workspace\x20','format','3659748bnMhHj','project',').\x20Config:\x20','App\x20profile\x20name\x20to\x20use\x20in\x20this\x20workspace','1926OjSSmZ','2081cANREl','pageSize','Target\x20environment','str','Default\x20output\x20format\x20for\x20this\x20workspace\x20app\x20profile','1796808TfSNCu'];a184_0xc8f5=function(){return _0x4c6cef;};return a184_0xc8f5();}const a184_0x1175d6=a184_0x3ebd;function a184_0x3ebd(_0x1b1d8f,_0x34ec89){_0x1b1d8f=_0x1b1d8f-0x1bb;const _0xc8f570=a184_0xc8f5();let _0x3ebd2d=_0xc8f570[_0x1b1d8f];return _0x3ebd2d;}(function(_0x334358,_0x353442){const _0xed29f6=a184_0x3ebd,_0x2bcb8c=_0x334358();while(!![]){try{const _0x2aadff=parseInt(_0xed29f6(0x1f2))/0x1*(parseInt(_0xed29f6(0x1d8))/0x2)+-parseInt(_0xed29f6(0x1e4))/0x3+-parseInt(_0xed29f6(0x1f7))/0x4+-parseInt(_0xed29f6(0x1c2))/0x5*(-parseInt(_0xed29f6(0x1f1))/0x6)+-parseInt(_0xed29f6(0x1cf))/0x7*(parseInt(_0xed29f6(0x1dc))/0x8)+-parseInt(_0xed29f6(0x1bc))/0x9*(-parseInt(_0xed29f6(0x1d6))/0xa)+parseInt(_0xed29f6(0x1c5))/0xb*(parseInt(_0xed29f6(0x1ed))/0xc);if(_0x2aadff===_0x353442)break;else _0x2bcb8c['push'](_0x2bcb8c['shift']());}catch(_0x1ae380){_0x2bcb8c['push'](_0x2bcb8c['shift']());}}}(a184_0xc8f5,0x485d1));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+a184_0x1175d6(0x1e6),SAFE_PROFILE_KEYS=[a184_0x1175d6(0x1d9),a184_0x1175d6(0x1de),'apiDir',a184_0x1175d6(0x1ec),a184_0x1175d6(0x1f3),a184_0x1175d6(0x1ca),a184_0x1175d6(0x1ea)],workspaceFlags=[{'name':a184_0x1175d6(0x1cb),'type':a184_0x1175d6(0x1dd),'description':a184_0x1175d6(0x1f0)},{'name':a184_0x1175d6(0x1d9),'type':a184_0x1175d6(0x1dd),'description':'App\x20code\x20to\x20bind\x20to\x20this\x20workspace'},{'name':a184_0x1175d6(0x1de),'type':a184_0x1175d6(0x1dd),'description':a184_0x1175d6(0x1f4),'enum':[...RABETBASE_ENV_VALUES]},{'name':'apiDir','type':'string','description':a184_0x1175d6(0x1bd)},{'name':'defaultFormat','type':a184_0x1175d6(0x1dd),'description':a184_0x1175d6(0x1f6),'enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':a184_0x1175d6(0x1f3),'type':a184_0x1175d6(0x1c7),'description':'Default\x20page\x20size\x20for\x20this\x20workspace\x20app\x20profile'},{'name':'riskLevel','type':a184_0x1175d6(0x1dd),'description':'Risk\x20level\x20for\x20this\x20workspace\x20app\x20profile','enum':[...RISK_LEVEL_VALUES]},{'name':a184_0x1175d6(0x1ea),'type':a184_0x1175d6(0x1dd),'description':'Locale\x20for\x20this\x20workspace\x20app\x20profile'}];function isRecord(_0x1c5cb3){const _0x37c0be=a184_0x1175d6;return!!_0x1c5cb3&&typeof _0x1c5cb3==='object'&&!Array[_0x37c0be(0x1e0)](_0x1c5cb3);}function assertValidAppcode(_0x9f854f){const _0x1fe72f=a184_0x1175d6,{valid:_0x4fb5b6,message:_0x5cccb0}=validateAppcode(_0x9f854f);if(!_0x4fb5b6)throw CliErrors['validation'](_0x1fe72f(0x1e5)+_0x9f854f,_0x5cccb0);}function sanitizeProfile(_0x519509){if(!isRecord(_0x519509))return{};const _0x7d3231={};for(const _0x55cb35 of SAFE_PROFILE_KEYS){if(_0x519509[_0x55cb35]!==undefined)_0x7d3231[_0x55cb35]=_0x519509[_0x55cb35];}return _0x7d3231;}function cloneProfile(_0x3d6888){return isRecord(_0x3d6888)?{..._0x3d6888}:{};}function collectWorkspaceProfileOverrides(_0x316c26){const _0xe2d687=a184_0x1175d6,_0xcc579e={},_0x3e551f=_0x316c26['str'](_0xe2d687(0x1de)),_0x430455=_0x316c26[_0xe2d687(0x1f5)](_0xe2d687(0x1d1)),_0x82ac42=_0x316c26[_0xe2d687(0x1f5)](_0xe2d687(0x1c8)),_0x1dec24=_0x316c26[_0xe2d687(0x1e1)](_0xe2d687(0x1f3)),_0x8fe3dc=_0x316c26['str']('riskLevel'),_0x2c071=_0x316c26['str'](_0xe2d687(0x1ea));if(_0x3e551f)_0xcc579e[_0xe2d687(0x1de)]=_0x3e551f;if(_0x430455)_0xcc579e['apiDir']=_0x430455;if(_0x82ac42)_0xcc579e[_0xe2d687(0x1ec)]=_0x82ac42;if(_0x1dec24!==undefined&&_0x1dec24!=='')_0xcc579e['pageSize']=Number(_0x1dec24);if(_0x8fe3dc)_0xcc579e[_0xe2d687(0x1ca)]=_0x8fe3dc;if(_0x2c071)_0xcc579e[_0xe2d687(0x1ea)]=_0x2c071;return _0xcc579e;}async function validateWorkspaceArgs(_0x137372){const _0x1263d0=a184_0x1175d6,_0x56992c=_0x137372[_0x1263d0(0x1f5)](_0x1263d0(0x1cb))['trim'](),_0x39678a=_0x137372[_0x1263d0(0x1f5)](_0x1263d0(0x1d9))[_0x1263d0(0x1d7)]();if(!_0x56992c&&!_0x39678a)throw CliErrors['validation'](_0x1263d0(0x1e7),'Use\x20`'+CLI_BIN_NAME+'\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`'+CLI_BIN_NAME+'\x20workspace\x20use\x20--app\x20<name>`.');if(_0x39678a)assertValidAppcode(_0x39678a);}function resolveKnownApps(){const _0x3818e8=a184_0x1175d6,{config:_0x50e9a2,layers:_0x3649c6}=readRawConfigWithLayers(),_0x2fd0ac=isRecord(_0x50e9a2['apps'])?_0x50e9a2[_0x3818e8(0x1c1)]:{},_0x1702f0=isRecord(_0x3649c6[_0x3818e8(0x1da)][_0x3818e8(0x1c1)])?_0x3649c6[_0x3818e8(0x1da)][_0x3818e8(0x1c1)]:{};return{..._0x1702f0,..._0x2fd0ac};}async function configureWorkspace(_0x21d783,_0xb92a7){const _0x40ea66=a184_0x1175d6,_0x170c5a=_0x21d783[_0x40ea66(0x1f5)](_0x40ea66(0x1cb))[_0x40ea66(0x1d7)](),_0x283cdb=_0x21d783[_0x40ea66(0x1f5)]('appcode')[_0x40ea66(0x1d7)](),_0x46b05d=_0x170c5a||_0x283cdb;if(!_0x46b05d)throw CliErrors[_0x40ea66(0x1bb)](_0x40ea66(0x1e7),'Use\x20`'+CLI_BIN_NAME+_0x40ea66(0x1c0)+CLI_BIN_NAME+_0x40ea66(0x1e3));if(_0x283cdb)assertValidAppcode(_0x283cdb);const _0x5f0327=resolveWriteConfigPath(_0x40ea66(0x1ee)),_0x416a22=readConfigFile(_0x5f0327),_0x2490d0=resolveKnownApps(),_0x7f6b2c=isRecord(_0x416a22[_0x40ea66(0x1c1)])?{..._0x416a22[_0x40ea66(0x1c1)]}:{},_0x5d9122=cloneProfile(_0x7f6b2c[_0x46b05d]),_0x1c414a=sanitizeProfile(_0x2490d0[_0x46b05d]),_0x580e44=_0x283cdb?{}:_0x1c414a,_0x12d368=_0x283cdb||_0x580e44['appcode'];if(!_0x12d368){const _0x23fc3e=Object[_0x40ea66(0x1d4)](_0x2490d0),_0x380d52=_0x23fc3e[_0x40ea66(0x1c4)]===0x0?_0x40ea66(0x1c9)+CLI_BIN_NAME+'\x20workspace\x20'+_0xb92a7+_0x40ea66(0x1c3)+_0x46b05d+_0x40ea66(0x1d0):_0x40ea66(0x1be)+_0x23fc3e[_0x40ea66(0x1e8)](',\x20');throw CliErrors['validation'](_0x40ea66(0x1db)+_0x46b05d+_0x40ea66(0x1c6),_0x380d52);}assertValidAppcode(String(_0x12d368));const _0x3373a8={..._0x580e44,..._0x5d9122,'appcode':String(_0x12d368),...collectWorkspaceProfileOverrides(_0x21d783)};return _0x7f6b2c[_0x46b05d]=_0x3373a8,_0x416a22[_0x40ea66(0x1c1)]=_0x7f6b2c,_0x416a22['defaultApp']=_0x46b05d,delete _0x416a22[_0x40ea66(0x1d9)],delete _0x416a22[_0x40ea66(0x1cb)],_0x3373a8[_0x40ea66(0x1de)]&&(_0x416a22[_0x40ea66(0x1de)]=_0x3373a8[_0x40ea66(0x1de)]),writeConfigFile(_0x5f0327,_0x416a22),{'ok':!![],'message':_0x40ea66(0x1eb)+(_0xb92a7==='init'?_0x40ea66(0x1d3):_0x40ea66(0x1df))+':\x20'+_0x46b05d+_0x40ea66(0x1d5)+_0x3373a8[_0x40ea66(0x1d9)]+_0x40ea66(0x1ef)+_0x5f0327+_0x40ea66(0x1d2),'data':{'operation':_0x40ea66(0x1e9)+_0xb92a7,'configPath':_0x5f0327,'app':_0x46b05d,'appcode':_0x3373a8[_0x40ea66(0x1d9)],'env':_0x3373a8[_0x40ea66(0x1de)]??null,'credentialsWritten':![]}};}const workspaceInitDefinition={'service':a184_0x1175d6(0x1ce),'command':a184_0x1175d6(0x1cc),'description':a184_0x1175d6(0x1e2),'risk':a184_0x1175d6(0x1bf),'requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0xd8d132=>configureWorkspace(_0xd8d132,'init')},workspaceUseDefinition={'service':'workspace','command':a184_0x1175d6(0x1f8),'description':a184_0x1175d6(0x1cd),'risk':a184_0x1175d6(0x1bf),'requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x428029=>configureWorkspace(_0x428029,a184_0x1175d6(0x1f8))};export const workspaceDefinitions=[workspaceInitDefinition,workspaceUseDefinition,workspaceAddDefinition,workspaceRemoveDefinition];export{WORKSPACE_USAGE};
1
+ const a184_0xd8dca9=a184_0x3f2d;(function(_0x21daca,_0x548fb2){const _0x3e9631=a184_0x3f2d,_0x34a683=_0x21daca();while(!![]){try{const _0x28b186=parseInt(_0x3e9631(0xfb))/0x1+parseInt(_0x3e9631(0xfd))/0x2*(parseInt(_0x3e9631(0x107))/0x3)+parseInt(_0x3e9631(0xfc))/0x4*(parseInt(_0x3e9631(0x102))/0x5)+-parseInt(_0x3e9631(0x11d))/0x6+parseInt(_0x3e9631(0xef))/0x7+parseInt(_0x3e9631(0x10a))/0x8*(-parseInt(_0x3e9631(0xf3))/0x9)+-parseInt(_0x3e9631(0xf0))/0xa;if(_0x28b186===_0x548fb2)break;else _0x34a683['push'](_0x34a683['shift']());}catch(_0x129b87){_0x34a683['push'](_0x34a683['shift']());}}}(a184_0x3b9f,0xc6cbc));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';function a184_0x3f2d(_0x2ac886,_0x4ac2a4){_0x2ac886=_0x2ac886-0xef;const _0x3b9f4c=a184_0x3b9f();let _0x3f2da2=_0x3b9f4c[_0x2ac886];return _0x3f2da2;}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+a184_0xd8dca9(0x121),SAFE_PROFILE_KEYS=[a184_0xd8dca9(0x110),a184_0xd8dca9(0x103),a184_0xd8dca9(0x10b),'format',a184_0xd8dca9(0xfa),'riskLevel',a184_0xd8dca9(0x11f)],workspaceFlags=[{'name':a184_0xd8dca9(0x11c),'type':a184_0xd8dca9(0x117),'description':a184_0xd8dca9(0xf5)},{'name':a184_0xd8dca9(0x110),'type':'string','description':a184_0xd8dca9(0x105)},{'name':a184_0xd8dca9(0x103),'type':a184_0xd8dca9(0x117),'description':'Target\x20environment','enum':[...RABETBASE_ENV_VALUES]},{'name':a184_0xd8dca9(0x10b),'type':a184_0xd8dca9(0x117),'description':a184_0xd8dca9(0x113)},{'name':a184_0xd8dca9(0x120),'type':a184_0xd8dca9(0x117),'description':'Default\x20output\x20format\x20for\x20this\x20workspace\x20app\x20profile','enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':a184_0xd8dca9(0xfa),'type':a184_0xd8dca9(0xff),'description':a184_0xd8dca9(0x118)},{'name':a184_0xd8dca9(0x100),'type':a184_0xd8dca9(0x117),'description':a184_0xd8dca9(0x11b),'enum':[...RISK_LEVEL_VALUES]},{'name':'locale','type':a184_0xd8dca9(0x117),'description':a184_0xd8dca9(0xf8)}];function isRecord(_0x2e3566){const _0x15f423=a184_0xd8dca9;return!!_0x2e3566&&typeof _0x2e3566===_0x15f423(0x123)&&!Array['isArray'](_0x2e3566);}function assertValidAppcode(_0x10b400){const _0x325e13=a184_0xd8dca9,{valid:_0x6c64a4,message:_0x4e23d6}=validateAppcode(_0x10b400);if(!_0x6c64a4)throw CliErrors[_0x325e13(0xf9)](_0x325e13(0x10c)+_0x10b400,_0x4e23d6);}function sanitizeProfile(_0x4b1d87){if(!isRecord(_0x4b1d87))return{};const _0x513498={};for(const _0x482ee6 of SAFE_PROFILE_KEYS){if(_0x4b1d87[_0x482ee6]!==undefined)_0x513498[_0x482ee6]=_0x4b1d87[_0x482ee6];}return _0x513498;}function cloneProfile(_0x4106f9){return isRecord(_0x4106f9)?{..._0x4106f9}:{};}function collectWorkspaceProfileOverrides(_0x5ebe48){const _0x66e314=a184_0xd8dca9,_0x473a5a={},_0x5c24a9=_0x5ebe48['str'](_0x66e314(0x103)),_0x39cdb3=_0x5ebe48[_0x66e314(0xf7)](_0x66e314(0x10b)),_0x525225=_0x5ebe48[_0x66e314(0xf7)](_0x66e314(0x120)),_0x3c33a0=_0x5ebe48[_0x66e314(0x119)](_0x66e314(0xfa)),_0x1daab4=_0x5ebe48['str'](_0x66e314(0x100)),_0x41d74e=_0x5ebe48[_0x66e314(0xf7)](_0x66e314(0x11f));if(_0x5c24a9)_0x473a5a[_0x66e314(0x103)]=_0x5c24a9;if(_0x39cdb3)_0x473a5a[_0x66e314(0x10b)]=_0x39cdb3;if(_0x525225)_0x473a5a[_0x66e314(0x112)]=_0x525225;if(_0x3c33a0!==undefined&&_0x3c33a0!=='')_0x473a5a[_0x66e314(0xfa)]=Number(_0x3c33a0);if(_0x1daab4)_0x473a5a[_0x66e314(0x100)]=_0x1daab4;if(_0x41d74e)_0x473a5a[_0x66e314(0x11f)]=_0x41d74e;return _0x473a5a;}async function validateWorkspaceArgs(_0x5587d5){const _0xb8c818=a184_0xd8dca9,_0x5c6eac=_0x5587d5[_0xb8c818(0xf7)](_0xb8c818(0x11c))[_0xb8c818(0x114)](),_0x49b1e7=_0x5587d5[_0xb8c818(0xf7)]('appcode')[_0xb8c818(0x114)]();if(!_0x5c6eac&&!_0x49b1e7)throw CliErrors[_0xb8c818(0xf9)](_0xb8c818(0x126),_0xb8c818(0x115)+CLI_BIN_NAME+_0xb8c818(0x124)+CLI_BIN_NAME+_0xb8c818(0xf4));if(_0x49b1e7)assertValidAppcode(_0x49b1e7);}function resolveKnownApps(){const _0x444ed0=a184_0xd8dca9,{config:_0x46d2b1,layers:_0x5bfa8f}=readRawConfigWithLayers(),_0x3b8ecd=isRecord(_0x46d2b1[_0x444ed0(0x10e)])?_0x46d2b1[_0x444ed0(0x10e)]:{},_0x107c87=isRecord(_0x5bfa8f['globalConfig'][_0x444ed0(0x10e)])?_0x5bfa8f['globalConfig']['apps']:{};return{..._0x107c87,..._0x3b8ecd};}async function configureWorkspace(_0x1f7166,_0x2c7341){const _0x33967f=a184_0xd8dca9,_0x5723b4=_0x1f7166[_0x33967f(0xf7)](_0x33967f(0x11c))[_0x33967f(0x114)](),_0x23ea3d=_0x1f7166[_0x33967f(0xf7)]('appcode')[_0x33967f(0x114)](),_0x21f435=_0x5723b4||_0x23ea3d;if(!_0x21f435)throw CliErrors[_0x33967f(0xf9)](_0x33967f(0x126),_0x33967f(0x115)+CLI_BIN_NAME+_0x33967f(0x124)+CLI_BIN_NAME+_0x33967f(0xf4));if(_0x23ea3d)assertValidAppcode(_0x23ea3d);const _0x510455=resolveWriteConfigPath(_0x33967f(0x101)),_0xc582d0=readConfigFile(_0x510455),_0x58df72=resolveKnownApps(),_0x4a0f56=isRecord(_0xc582d0[_0x33967f(0x10e)])?{..._0xc582d0['apps']}:{},_0x4f49fc=cloneProfile(_0x4a0f56[_0x21f435]),_0x41aa90=sanitizeProfile(_0x58df72[_0x21f435]),_0x4759fa=_0x23ea3d?{}:_0x41aa90,_0x4f4153=_0x23ea3d||_0x4759fa[_0x33967f(0x110)];if(!_0x4f4153){const _0x35d81b=Object[_0x33967f(0x125)](_0x58df72),_0x4c801f=_0x35d81b[_0x33967f(0x109)]===0x0?_0x33967f(0x115)+CLI_BIN_NAME+_0x33967f(0x111)+_0x2c7341+_0x33967f(0x11a)+_0x21f435+_0x33967f(0x127):_0x33967f(0x116)+_0x35d81b[_0x33967f(0xf2)](',\x20');throw CliErrors[_0x33967f(0xf9)](_0x33967f(0x10d)+_0x21f435+_0x33967f(0x104),_0x4c801f);}assertValidAppcode(String(_0x4f4153));const _0x162346={..._0x4759fa,..._0x4f49fc,'appcode':String(_0x4f4153),...collectWorkspaceProfileOverrides(_0x1f7166)};return _0x4a0f56[_0x21f435]=_0x162346,_0xc582d0['apps']=_0x4a0f56,_0xc582d0[_0x33967f(0x106)]=_0x21f435,delete _0xc582d0[_0x33967f(0x110)],delete _0xc582d0[_0x33967f(0x11c)],_0x162346[_0x33967f(0x103)]&&(_0xc582d0['env']=_0x162346[_0x33967f(0x103)]),writeConfigFile(_0x510455,_0xc582d0),{'ok':!![],'message':_0x33967f(0x108)+(_0x2c7341==='init'?'initialized':'updated')+':\x20'+_0x21f435+_0x33967f(0xfe)+_0x162346[_0x33967f(0x110)]+_0x33967f(0x10f)+_0x510455+_0x33967f(0xf1),'data':{'operation':'workspace.'+_0x2c7341,'configPath':_0x510455,'app':_0x21f435,'appcode':_0x162346[_0x33967f(0x110)],'env':_0x162346[_0x33967f(0x103)]??null,'credentialsWritten':![]}};}const workspaceInitDefinition={'service':'workspace','command':a184_0xd8dca9(0x128),'description':'Initialize\x20the\x20current\x20workspace\x20app\x20binding','risk':a184_0xd8dca9(0xf6),'requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x681078=>configureWorkspace(_0x681078,'init')},workspaceUseDefinition={'service':'workspace','command':a184_0xd8dca9(0x122),'description':a184_0xd8dca9(0x11e),'risk':a184_0xd8dca9(0xf6),'requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x97e9f1=>configureWorkspace(_0x97e9f1,a184_0xd8dca9(0x122))};export const workspaceDefinitions=[workspaceInitDefinition,workspaceUseDefinition,workspaceAddDefinition,workspaceRemoveDefinition];function a184_0x3b9f(){const _0x42192b=['use','object','\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`','keys','Missing\x20workspace\x20app\x20selector.','\x20--appcode\x20<code>`.','init','9699144TQSrOC','8816610tYnRSo','.\x20Credentials:\x20not\x20written.','join','9SCVkQD','\x20workspace\x20use\x20--app\x20<name>`.','App\x20profile\x20name\x20to\x20use\x20in\x20this\x20workspace','write','str','Locale\x20for\x20this\x20workspace\x20app\x20profile','validation','pageSize','28864TcYPzB','4cusXzr','44spsyxo','\x20(appcode:\x20','number','riskLevel','project','5609260SiAyAq','env','\x22\x20not\x20found.','App\x20code\x20to\x20bind\x20to\x20this\x20workspace','defaultApp','123183aJCzPr','Workspace\x20','length','7713976izdByW','apiDir','Invalid\x20appcode:\x20','App\x20\x22','apps',').\x20Config:\x20','appcode','\x20workspace\x20','format','API\x20directory\x20path\x20for\x20this\x20workspace\x20app\x20profile','trim','Use\x20`','Pass\x20--appcode\x20<code>,\x20or\x20choose\x20one\x20of:\x20','string','Default\x20page\x20size\x20for\x20this\x20workspace\x20app\x20profile','flag','\x20--app\x20','Risk\x20level\x20for\x20this\x20workspace\x20app\x20profile','app','4676844JUllOG','Switch\x20the\x20current\x20workspace\x20app\x20binding','locale','defaultFormat','\x20workspace\x20<init|use>\x20--app\x20<name>\x20[--appcode\x20<code>]'];a184_0x3b9f=function(){return _0x42192b;};return a184_0x3b9f();}export{WORKSPACE_USAGE};
@@ -1 +1 @@
1
- const a185_0x2f998c=a185_0x5570;(function(_0x227d2a,_0xd36596){const _0x46ab60=a185_0x5570,_0x384d28=_0x227d2a();while(!![]){try{const _0xfe78e0=-parseInt(_0x46ab60(0x76))/0x1+parseInt(_0x46ab60(0x71))/0x2+-parseInt(_0x46ab60(0x77))/0x3+parseInt(_0x46ab60(0x79))/0x4*(parseInt(_0x46ab60(0x72))/0x5)+-parseInt(_0x46ab60(0x75))/0x6+-parseInt(_0x46ab60(0x74))/0x7+parseInt(_0x46ab60(0x78))/0x8;if(_0xfe78e0===_0xd36596)break;else _0x384d28['push'](_0x384d28['shift']());}catch(_0x1c636d){_0x384d28['push'](_0x384d28['shift']());}}}(a185_0x1aeb,0x69142));function a185_0x1aeb(){const _0x3e3b8b=['2271702KCbqfe','16191992UbrNmZ','4djkSdO','workspace\x20remove','high-risk-write','301230kxvToD','1779205hYnaZr','name','2209774mdPRBj','2468376wKfrWp','615741iXbtzr'];a185_0x1aeb=function(){return _0x3e3b8b;};return a185_0x1aeb();}import{buildAppRemoveFlags,runAppRemove,validateAppName}from'../../commands/common/app-registry.js';function a185_0x5570(_0x1f729e,_0x16a244){_0x1f729e=_0x1f729e-0x6f;const _0x1aebbd=a185_0x1aeb();let _0x5570bb=_0x1aebbd[_0x1f729e];return _0x5570bb;}export const workspaceRemoveDefinition={'service':'workspace','command':'remove','description':'Remove\x20an\x20app\x20profile\x20from\x20the\x20current\x20workspace\x20(or\x20--global)','risk':a185_0x2f998c(0x70),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a185_0x2f998c(0x73),'description':'App\x20profile\x20name\x20to\x20remove','required':!![]}],'flags':buildAppRemoveFlags(),'validate':_0x3df709=>validateAppName(_0x3df709,'workspace\x20remove'),'execute':_0x2eee81=>runAppRemove(_0x2eee81,a185_0x2f998c(0x6f))};
1
+ const a185_0x11063d=a185_0x9a40;function a185_0x4d25(){const _0x4ac206=['30fzjMWe','56PfCBJJ','high-risk-write','remove','workspace','2297168xBKASf','2669579eCenCL','441324ZPHdKY','1275039ZzJGwb','name','162755IDgZyC','4564044atFMol','100DbPwLe','317168vscfTW','workspace\x20remove','Remove\x20an\x20app\x20profile\x20from\x20the\x20current\x20workspace\x20(or\x20--global)','App\x20profile\x20name\x20to\x20remove','4UmDClr'];a185_0x4d25=function(){return _0x4ac206;};return a185_0x4d25();}(function(_0x4f9cd5,_0x4aefe8){const _0x3ca19c=a185_0x9a40,_0x14ee92=_0x4f9cd5();while(!![]){try{const _0x5b21c8=-parseInt(_0x3ca19c(0x11d))/0x1+-parseInt(_0x3ca19c(0x11b))/0x2+-parseInt(_0x3ca19c(0x11e))/0x3*(-parseInt(_0x3ca19c(0x115))/0x4)+parseInt(_0x3ca19c(0x120))/0x5*(parseInt(_0x3ca19c(0x116))/0x6)+parseInt(_0x3ca19c(0x117))/0x7*(-parseInt(_0x3ca19c(0x111))/0x8)+-parseInt(_0x3ca19c(0x121))/0x9+-parseInt(_0x3ca19c(0x110))/0xa*(-parseInt(_0x3ca19c(0x11c))/0xb);if(_0x5b21c8===_0x4aefe8)break;else _0x14ee92['push'](_0x14ee92['shift']());}catch(_0x370898){_0x14ee92['push'](_0x14ee92['shift']());}}}(a185_0x4d25,0x92992));import{buildAppRemoveFlags,runAppRemove,validateAppName}from'../../commands/common/app-registry.js';function a185_0x9a40(_0x2247d1,_0x5df2ae){_0x2247d1=_0x2247d1-0x110;const _0x4d2575=a185_0x4d25();let _0x9a4062=_0x4d2575[_0x2247d1];return _0x9a4062;}export const workspaceRemoveDefinition={'service':a185_0x11063d(0x11a),'command':a185_0x11063d(0x119),'description':a185_0x11063d(0x113),'risk':a185_0x11063d(0x118),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a185_0x11063d(0x11f),'description':a185_0x11063d(0x114),'required':!![]}],'flags':buildAppRemoveFlags(),'validate':_0x586de8=>validateAppName(_0x586de8,a185_0x11063d(0x112)),'execute':_0x3a7a53=>runAppRemove(_0x3a7a53,a185_0x11063d(0x112))};
@@ -1 +1 @@
1
- const a186_0x287531=a186_0x191e;(function(_0x45bb95,_0x2b0f91){const _0x591215=a186_0x191e,_0x3e4ea0=_0x45bb95();while(!![]){try{const _0x3e7e90=-parseInt(_0x591215(0x175))/0x1*(-parseInt(_0x591215(0x17c))/0x2)+parseInt(_0x591215(0x177))/0x3+-parseInt(_0x591215(0x174))/0x4*(parseInt(_0x591215(0x161))/0x5)+-parseInt(_0x591215(0x181))/0x6+parseInt(_0x591215(0x176))/0x7+-parseInt(_0x591215(0x185))/0x8*(parseInt(_0x591215(0x186))/0x9)+parseInt(_0x591215(0x167))/0xa;if(_0x3e7e90===_0x2b0f91)break;else _0x3e4ea0['push'](_0x3e4ea0['shift']());}catch(_0x493712){_0x3e4ea0['push'](_0x3e4ea0['shift']());}}}(a186_0x41aa,0x994c5));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RABETBASE_ENV_VALUES}from'../constant/env.js';import{RABETBASE_OUTPUT_FORMAT_VALUES}from'../constant/output.js';import{RISK_LEVEL_VALUES}from'../constant/risk.js';export{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';export const PROJECT_CREATE_INHERITABLE_KEYS=['cookie',a186_0x287531(0x164),a186_0x287531(0x168),a186_0x287531(0x16c),a186_0x287531(0x165)];export const TOP_LEVEL_CONFIG_KEYS=new Set([a186_0x287531(0x16d),a186_0x287531(0x16b),a186_0x287531(0x168),a186_0x287531(0x16c),a186_0x287531(0x163),a186_0x287531(0x164),'apiDir']);export const CONFIG_ENUM_VALUES={'env':[...RABETBASE_ENV_VALUES],'format':[...RABETBASE_OUTPUT_FORMAT_VALUES]};function a186_0x41aa(){const _0x3f4900=['locale','trim','pageSize','env','format','appcode','length','Config\x20key\x20(','inherit','defaultApp','API\x20directory\x20path','entries','2258572FwzuAb','1038881kegeEx','5870151UczWWN','1252041RtYssS','join','apiDir','Default\x20output\x20format\x20for\x20this\x20app\x20(profile)','Target\x20environment','2cDiUuW','map','en-US','app','defaultFormat','6830496xJMHCn','keys','zh-CN','apps','16nnXXzc','2638719vzDWGw','string','Access\x20key','toLowerCase','5akBNRf','Default\x20page\x20size','cookie','accessKey','riskLevel','Risk\x20level','6225290aEFnmK'];a186_0x41aa=function(){return _0x3f4900;};return a186_0x41aa();}export function formatConfigKeyList(_0x535049){const _0x4454e2=a186_0x287531;return[..._0x535049][_0x4454e2(0x178)](',\x20');}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function isTopLevelConfigKey(_0x58a760){return TOP_LEVEL_CONFIG_KEYS['has'](_0x58a760);}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}function a186_0x191e(_0x3c4f90,_0x4b4703){_0x3c4f90=_0x3c4f90-0x160;const _0x41aabd=a186_0x41aa();let _0x191e1c=_0x41aabd[_0x3c4f90];return _0x191e1c;}export function getConfigCommandKeyDescription(){const _0x595b50=a186_0x287531;return _0x595b50(0x16f)+getTopLevelConfigKeySummary()+')';}export const APP_PROFILE_FLAG_KEY_MAP={'env':a186_0x287531(0x16b),'apiDir':'apiDir','cookie':'cookie','accessKey':a186_0x287531(0x164),'defaultFormat':a186_0x287531(0x16c),'pageSize':'pageSize','riskLevel':a186_0x287531(0x165),'locale':a186_0x287531(0x168)};export function getAppProfileFlagDefs(){const _0x11dbdb=a186_0x287531;return[{'name':_0x11dbdb(0x16b),'type':'string','description':_0x11dbdb(0x17b),'enum':[...RABETBASE_ENV_VALUES]},{'name':_0x11dbdb(0x179),'type':_0x11dbdb(0x187),'description':_0x11dbdb(0x172)},{'name':_0x11dbdb(0x163),'type':_0x11dbdb(0x187),'description':'Auth\x20cookie','hidden':!![]},{'name':_0x11dbdb(0x164),'type':_0x11dbdb(0x187),'description':_0x11dbdb(0x188),'hidden':!![]},{'name':_0x11dbdb(0x180),'type':'string','description':_0x11dbdb(0x17a),'enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':_0x11dbdb(0x16a),'type':'number','description':_0x11dbdb(0x162)},{'name':_0x11dbdb(0x165),'type':_0x11dbdb(0x187),'description':_0x11dbdb(0x166),'enum':[...RISK_LEVEL_VALUES]},{'name':_0x11dbdb(0x168),'type':_0x11dbdb(0x187),'description':'Locale'}];}export function collectAppProfileOverrides(_0x2f1ee7){const _0x49e4a2=a186_0x287531,_0x2c5837={};for(const [_0x37288c,_0x528870]of Object[_0x49e4a2(0x173)](APP_PROFILE_FLAG_KEY_MAP)){const _0x378175=_0x2f1ee7(_0x37288c);if(!_0x378175)continue;_0x2c5837[_0x528870]=_0x528870===_0x49e4a2(0x16a)?Number(_0x378175):_0x378175;}return _0x2c5837;}export function buildAppProfileListFields(_0x5e7b8c){const _0x4d127f=a186_0x287531;return{'env':_0x5e7b8c[_0x4d127f(0x16b)]??null,'apiDir':_0x5e7b8c[_0x4d127f(0x179)]??null,'hasCookie':!!_0x5e7b8c[_0x4d127f(0x163)],'hasAccessKey':!!_0x5e7b8c[_0x4d127f(0x164)],'format':_0x5e7b8c['format']??null,'pageSize':_0x5e7b8c[_0x4d127f(0x16a)]??null,'riskLevel':_0x5e7b8c[_0x4d127f(0x165)]??null,'locale':_0x5e7b8c['locale']??null};}export function buildAppDoctorFields(_0x344707,_0x3566af){const _0x572e5b=a186_0x287531;return{'env':{'value':_0x344707[_0x572e5b(0x16b)]||_0x3566af['env'],'source':_0x344707[_0x572e5b(0x16b)]?_0x572e5b(0x17f):_0x572e5b(0x170)},'apiDir':{'value':_0x344707['apiDir']||_0x3566af['apiDir'],'source':_0x344707[_0x572e5b(0x179)]?_0x572e5b(0x17f):_0x572e5b(0x170)},'cookie':{'value':_0x344707[_0x572e5b(0x163)]||_0x3566af[_0x572e5b(0x163)],'source':_0x344707[_0x572e5b(0x163)]?_0x572e5b(0x17f):_0x572e5b(0x170)},'accessKey':{'value':_0x344707['accessKey']||_0x3566af[_0x572e5b(0x164)],'source':_0x344707[_0x572e5b(0x164)]?_0x572e5b(0x17f):_0x572e5b(0x170)}};}export function buildCanonicalAppConfig(_0x42096d,_0x3564f7){const _0x234b3e=a186_0x287531,_0x35d590=_0x42096d[_0x234b3e(0x17d)](_0x1e0ba4=>String(_0x1e0ba4||'')[_0x234b3e(0x169)]())['filter'](Boolean);if(_0x35d590['length']===0x0)return{};const _0xd8b1cb={};for(const _0x3e2f36 of _0x35d590){_0xd8b1cb[_0x3e2f36]=_0x3564f7?{'appcode':_0x3e2f36,'env':_0x3564f7}:{'appcode':_0x3e2f36};}return{'apps':_0xd8b1cb,'defaultApp':_0x35d590[0x0]};}export function buildCanonicalProjectConfig(_0x5c4e3c,_0x57596c){const _0x1457ae=a186_0x287531,{appCodes:appCodes=[],env:_0x4368f0,metadata:_0x4aa07a}=_0x57596c,_0xb721e1={..._0x5c4e3c,..._0x4aa07a||{}};delete _0xb721e1[_0x1457ae(0x16d)],delete _0xb721e1[_0x1457ae(0x17f)];if(_0x4368f0)_0xb721e1[_0x1457ae(0x16b)]=_0x4368f0;else!_0xb721e1[_0x1457ae(0x16b)]&&(_0xb721e1[_0x1457ae(0x16b)]=DEFAULT_CONFIG_VALUES[_0x1457ae(0x16b)]);const _0xa6e9aa=buildCanonicalAppConfig(appCodes,_0xb721e1[_0x1457ae(0x16b)]);return Object[_0x1457ae(0x182)](_0xa6e9aa)[_0x1457ae(0x16e)]>0x0&&(_0xb721e1[_0x1457ae(0x184)]=_0xa6e9aa[_0x1457ae(0x184)],_0xb721e1[_0x1457ae(0x171)]=_0xa6e9aa[_0x1457ae(0x171)]),_0xb721e1;}const LOCALE_MAP={'zh':a186_0x287531(0x183),'zh-cn':'zh-CN','zh_cn':a186_0x287531(0x183),'en':a186_0x287531(0x17e),'en-us':'en-US','en_us':'en-US'};export function normalizeLocale(_0x45eb80){const _0x52103f=a186_0x287531;if(!_0x45eb80)return null;return LOCALE_MAP[_0x45eb80[_0x52103f(0x160)]()]??null;}
1
+ const a186_0x2599bc=a186_0x3b04;(function(_0x2b96ac,_0x5482f6){const _0x4a71a8=a186_0x3b04,_0x453725=_0x2b96ac();while(!![]){try{const _0x5ac054=parseInt(_0x4a71a8(0xcf))/0x1+-parseInt(_0x4a71a8(0xbe))/0x2+-parseInt(_0x4a71a8(0xc3))/0x3*(parseInt(_0x4a71a8(0xc7))/0x4)+-parseInt(_0x4a71a8(0xbc))/0x5*(-parseInt(_0x4a71a8(0xc9))/0x6)+-parseInt(_0x4a71a8(0xc8))/0x7*(-parseInt(_0x4a71a8(0xdc))/0x8)+-parseInt(_0x4a71a8(0xd9))/0x9+parseInt(_0x4a71a8(0xd3))/0xa*(-parseInt(_0x4a71a8(0xc1))/0xb);if(_0x5ac054===_0x5482f6)break;else _0x453725['push'](_0x453725['shift']());}catch(_0x352b05){_0x453725['push'](_0x453725['shift']());}}}(a186_0x2faa,0xd56c0));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RABETBASE_ENV_VALUES}from'../constant/env.js';import{RABETBASE_OUTPUT_FORMAT_VALUES}from'../constant/output.js';import{RISK_LEVEL_VALUES}from'../constant/risk.js';export{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';export const PROJECT_CREATE_INHERITABLE_KEYS=['cookie',a186_0x2599bc(0xdb),a186_0x2599bc(0xb9),'format',a186_0x2599bc(0xcc)];export const TOP_LEVEL_CONFIG_KEYS=new Set([a186_0x2599bc(0xca),a186_0x2599bc(0xd7),a186_0x2599bc(0xb9),'format',a186_0x2599bc(0xc6),a186_0x2599bc(0xdb),a186_0x2599bc(0xd5)]);export const CONFIG_ENUM_VALUES={'env':[...RABETBASE_ENV_VALUES],'format':[...RABETBASE_OUTPUT_FORMAT_VALUES]};export function formatConfigKeyList(_0x1a86b2){const _0x238612=a186_0x2599bc;return[..._0x1a86b2][_0x238612(0xdd)](',\x20');}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function isTopLevelConfigKey(_0x14ddbb){return TOP_LEVEL_CONFIG_KEYS['has'](_0x14ddbb);}function a186_0x2faa(){const _0x2ec196=['109137oFjESk','toLowerCase','Access\x20key','cookie','68pAORTT','4719281XsabKz','54QQiDoa','appcode','inherit','riskLevel','Risk\x20level','filter','971306VMMzXT','format','number','zh-CN','1277690tyspWW','Locale','apiDir','Config\x20key\x20(','env','trim','1215504wdeRQr','en-US','accessKey','16JcMnFb','join','Default\x20output\x20format\x20for\x20this\x20app\x20(profile)','app','entries','length','Default\x20page\x20size','locale','Target\x20environment','defaultApp','246305QVdUPk','string','2015154EKClkA','apps','Auth\x20cookie','11ysTTsB','pageSize'];a186_0x2faa=function(){return _0x2ec196;};return a186_0x2faa();}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}function a186_0x3b04(_0x30cdfa,_0x1ba40b){_0x30cdfa=_0x30cdfa-0xb4;const _0x2faa62=a186_0x2faa();let _0x3b0435=_0x2faa62[_0x30cdfa];return _0x3b0435;}export function getConfigCommandKeyDescription(){const _0x2a7ba2=a186_0x2599bc;return _0x2a7ba2(0xd6)+getTopLevelConfigKeySummary()+')';}export const APP_PROFILE_FLAG_KEY_MAP={'env':a186_0x2599bc(0xd7),'apiDir':a186_0x2599bc(0xd5),'cookie':a186_0x2599bc(0xc6),'accessKey':a186_0x2599bc(0xdb),'defaultFormat':a186_0x2599bc(0xd0),'pageSize':'pageSize','riskLevel':a186_0x2599bc(0xcc),'locale':a186_0x2599bc(0xb9)};export function getAppProfileFlagDefs(){const _0x10611c=a186_0x2599bc;return[{'name':_0x10611c(0xd7),'type':_0x10611c(0xbd),'description':_0x10611c(0xba),'enum':[...RABETBASE_ENV_VALUES]},{'name':_0x10611c(0xd5),'type':'string','description':'API\x20directory\x20path'},{'name':_0x10611c(0xc6),'type':_0x10611c(0xbd),'description':_0x10611c(0xc0),'hidden':!![]},{'name':_0x10611c(0xdb),'type':'string','description':_0x10611c(0xc5),'hidden':!![]},{'name':'defaultFormat','type':_0x10611c(0xbd),'description':_0x10611c(0xb4),'enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':_0x10611c(0xc2),'type':_0x10611c(0xd1),'description':_0x10611c(0xb8)},{'name':'riskLevel','type':_0x10611c(0xbd),'description':_0x10611c(0xcd),'enum':[...RISK_LEVEL_VALUES]},{'name':_0x10611c(0xb9),'type':_0x10611c(0xbd),'description':_0x10611c(0xd4)}];}export function collectAppProfileOverrides(_0xa2272c){const _0x3aacec=a186_0x2599bc,_0x2664ab={};for(const [_0x50c146,_0x10fbc7]of Object[_0x3aacec(0xb6)](APP_PROFILE_FLAG_KEY_MAP)){const _0x365e08=_0xa2272c(_0x50c146);if(!_0x365e08)continue;_0x2664ab[_0x10fbc7]=_0x10fbc7===_0x3aacec(0xc2)?Number(_0x365e08):_0x365e08;}return _0x2664ab;}export function buildAppProfileListFields(_0x5cae6b){const _0x245d31=a186_0x2599bc;return{'env':_0x5cae6b[_0x245d31(0xd7)]??null,'apiDir':_0x5cae6b[_0x245d31(0xd5)]??null,'hasCookie':!!_0x5cae6b[_0x245d31(0xc6)],'hasAccessKey':!!_0x5cae6b[_0x245d31(0xdb)],'format':_0x5cae6b[_0x245d31(0xd0)]??null,'pageSize':_0x5cae6b['pageSize']??null,'riskLevel':_0x5cae6b[_0x245d31(0xcc)]??null,'locale':_0x5cae6b[_0x245d31(0xb9)]??null};}export function buildAppDoctorFields(_0x391ebc,_0x5221ab){const _0x416aca=a186_0x2599bc;return{'env':{'value':_0x391ebc[_0x416aca(0xd7)]||_0x5221ab[_0x416aca(0xd7)],'source':_0x391ebc[_0x416aca(0xd7)]?_0x416aca(0xb5):_0x416aca(0xcb)},'apiDir':{'value':_0x391ebc['apiDir']||_0x5221ab['apiDir'],'source':_0x391ebc[_0x416aca(0xd5)]?_0x416aca(0xb5):_0x416aca(0xcb)},'cookie':{'value':_0x391ebc['cookie']||_0x5221ab[_0x416aca(0xc6)],'source':_0x391ebc[_0x416aca(0xc6)]?_0x416aca(0xb5):_0x416aca(0xcb)},'accessKey':{'value':_0x391ebc['accessKey']||_0x5221ab['accessKey'],'source':_0x391ebc[_0x416aca(0xdb)]?_0x416aca(0xb5):_0x416aca(0xcb)}};}export function buildCanonicalAppConfig(_0x5d9cf9,_0x152218){const _0x2697ff=a186_0x2599bc,_0x441f09=_0x5d9cf9['map'](_0x4f74c8=>String(_0x4f74c8||'')[_0x2697ff(0xd8)]())[_0x2697ff(0xce)](Boolean);if(_0x441f09[_0x2697ff(0xb7)]===0x0)return{};const _0x97948b={};for(const _0x2a76b2 of _0x441f09){_0x97948b[_0x2a76b2]=_0x152218?{'appcode':_0x2a76b2,'env':_0x152218}:{'appcode':_0x2a76b2};}return{'apps':_0x97948b,'defaultApp':_0x441f09[0x0]};}export function buildCanonicalProjectConfig(_0x312a93,_0x2677da){const _0x2d80fa=a186_0x2599bc,{appCodes:appCodes=[],env:_0x39e7b5,metadata:_0x3aae6e}=_0x2677da,_0x24b348={..._0x312a93,..._0x3aae6e||{}};delete _0x24b348[_0x2d80fa(0xca)],delete _0x24b348['app'];if(_0x39e7b5)_0x24b348[_0x2d80fa(0xd7)]=_0x39e7b5;else!_0x24b348['env']&&(_0x24b348[_0x2d80fa(0xd7)]=DEFAULT_CONFIG_VALUES[_0x2d80fa(0xd7)]);const _0x2fe863=buildCanonicalAppConfig(appCodes,_0x24b348['env']);return Object['keys'](_0x2fe863)['length']>0x0&&(_0x24b348[_0x2d80fa(0xbf)]=_0x2fe863[_0x2d80fa(0xbf)],_0x24b348[_0x2d80fa(0xbb)]=_0x2fe863['defaultApp']),_0x24b348;}const LOCALE_MAP={'zh':'zh-CN','zh-cn':'zh-CN','zh_cn':a186_0x2599bc(0xd2),'en':'en-US','en-us':a186_0x2599bc(0xda),'en_us':a186_0x2599bc(0xda)};export function normalizeLocale(_0x26a3a9){const _0x2383ef=a186_0x2599bc;if(!_0x26a3a9)return null;return LOCALE_MAP[_0x26a3a9[_0x2383ef(0xc4)]()]??null;}
@@ -1 +1 @@
1
- function a187_0x1866(){const _0x514563=['319592GXeKNa','476430QGxtLa','6455MjdgMq','9AaXipH','842028JLEEWH','232uvYNyE','795872VWxCTu','https://g.lovrabet.com/dist/rabetbase-cli/config/index.json','837605DrJZOV','5908968fudjRu','63mUTXmN'];a187_0x1866=function(){return _0x514563;};return a187_0x1866();}function a187_0x247d(_0x306341,_0x5bc265){_0x306341=_0x306341-0x10d;const _0x186688=a187_0x1866();let _0x247d96=_0x186688[_0x306341];return _0x247d96;}const a187_0x565d97=a187_0x247d;(function(_0x10b566,_0x5978a6){const _0x5bce57=a187_0x247d,_0x1b2e58=_0x10b566();while(!![]){try{const _0x4a0cb8=parseInt(_0x5bce57(0x10d))/0x1*(-parseInt(_0x5bce57(0x110))/0x2)+-parseInt(_0x5bce57(0x10f))/0x3+parseInt(_0x5bce57(0x111))/0x4+parseInt(_0x5bce57(0x113))/0x5+parseInt(_0x5bce57(0x114))/0x6+parseInt(_0x5bce57(0x115))/0x7*(parseInt(_0x5bce57(0x116))/0x8)+parseInt(_0x5bce57(0x10e))/0x9*(-parseInt(_0x5bce57(0x117))/0xa);if(_0x4a0cb8===_0x5978a6)break;else _0x1b2e58['push'](_0x1b2e58['shift']());}catch(_0x2b3b99){_0x1b2e58['push'](_0x1b2e58['shift']());}}}(a187_0x1866,0x9ab9f));export const CLI_VERSION_POLICY_URL=a187_0x565d97(0x112);
1
+ const a187_0x467629=a187_0x1369;function a187_0x296f(){const _0xf7ff4c=['8pDBkWJ','384292uyyHCE','12qNOqsN','346331BBUkTE','3093454IiOIMk','5MZPntP','11ygTIQu','1685890AdlHFA','3201309lqfmvc','74RBLdOj','https://g.lovrabet.com/dist/rabetbase-cli/config/index.json','4375kLzPtC','12039OtTjNp','1806UdOGZL'];a187_0x296f=function(){return _0xf7ff4c;};return a187_0x296f();}(function(_0x384530,_0xca4809){const _0x232af6=a187_0x1369,_0xaf80cd=_0x384530();while(!![]){try{const _0x45a151=parseInt(_0x232af6(0xeb))/0x1+-parseInt(_0x232af6(0xf1))/0x2*(parseInt(_0x232af6(0xf4))/0x3)+parseInt(_0x232af6(0xf7))/0x4*(-parseInt(_0x232af6(0xed))/0x5)+-parseInt(_0x232af6(0xf5))/0x6*(parseInt(_0x232af6(0xf3))/0x7)+parseInt(_0x232af6(0xf6))/0x8*(parseInt(_0x232af6(0xf0))/0x9)+-parseInt(_0x232af6(0xef))/0xa*(-parseInt(_0x232af6(0xee))/0xb)+parseInt(_0x232af6(0xf8))/0xc*(-parseInt(_0x232af6(0xec))/0xd);if(_0x45a151===_0xca4809)break;else _0xaf80cd['push'](_0xaf80cd['shift']());}catch(_0x4f5048){_0xaf80cd['push'](_0xaf80cd['shift']());}}}(a187_0x296f,0x30d30));function a187_0x1369(_0x282af0,_0x1419c0){_0x282af0=_0x282af0-0xeb;const _0x296fc3=a187_0x296f();let _0x136915=_0x296fc3[_0x282af0];return _0x136915;}export const CLI_VERSION_POLICY_URL=a187_0x467629(0xf2);
@@ -1 +1 @@
1
- const a188_0x243e6b=a188_0x1081;function a188_0x180c(){const _0x5a5ee4=['expectParentId','force','Menu\x20label','label','Menu\x20sort\x20value','title','100eudGCe','Show\x20help','project','Output\x20path','string','dryRun','@lovrabet/rabetbase-cli','app','<expr>','remote','Config\x20key','skipImports','Comma-separated\x20menu\x20IDs','page','SQL\x20string','skip-imports','sqlname','2543218GltksH','120WrBdlM','sqlcode','Tags','expect-path','pagesize','Name','expectedChildrenCount','Expected\x20affected\x20count','sort','confirm','dry-run','32rLomoH','map','12Pywhmv','Skip\x20import\x20generation','SQL\x20name','fromEnv','boolean','expectPath','46660wtXnCS','clear','rabetbase','enable-bff-save','<code>','dbid','1544114ofrNJU','Read\x20value\x20from\x20environment\x20variable','Description\x20file','Config\x20value','from-env','expected-children-count','nonInteractive','1UINrza','keyword','non-interactive','Code\x20filter','Watch\x20mode','Operation\x20type','description-file','File\x20path','fromEntries','dbId','Use\x20global\x20config\x20scope','output','enableBffSave','schemas','params','Use\x20remote','task-id','Output\x20format','stdin','verbose','Confirm\x20destructive\x20action','file','3886582EmxNGv','<name>','expectedCount','json\x20|\x20pretty\x20|\x20compress','format','Force\x20overwrite','50265098sogiCq','datasetcode','Expected\x20current\x20parent\x20menu\x20id','tags','key','global','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','1240857DwlYzH','parent-id','sql','Dataset\x20code','Verbose\x20output','Expected\x20current\x20child\x20count','Preview\x20operation\x20without\x20executing','Alias\x20for\x20--non-interactive','Record\x20ID','watch','SQL\x20code','operation-type','target','Read\x20value\x20from\x20stdin','29568YuAetA','Enable\x20BFF\x20save','operation','yes','function-node','Clear','env','description','JSON\x20params','95ENrdvh','Page\x20size','Force\x20non-interactive\x20mode\x20(CI)','code','operationType','type','expected-count','Asynchronous\x20task\x20ID','value','Parent\x20menu\x20id','DB\x20ID','name','Skip\x20confirmation\x20for\x20high-risk\x20writes','expect-parent-id','sqlName','reveal','sql-name','help','Use\x20project\x20config\x20scope','all'];a188_0x180c=function(){return _0x5a5ee4;};return a188_0x180c();}(function(_0x19fcf5,_0x3763c6){const _0x19e457=a188_0x1081,_0x304002=_0x19fcf5();while(!![]){try{const _0x432467=parseInt(_0x19e457(0xf9))/0x1*(-parseInt(_0x19e457(0x15e))/0x2)+-parseInt(_0x19e457(0xd9))/0x3*(parseInt(_0x19e457(0xec))/0x4)+-parseInt(_0x19e457(0x133))/0x5*(-parseInt(_0x19e457(0x12a))/0x6)+parseInt(_0x19e457(0x10f))/0x7+parseInt(_0x19e457(0xe4))/0x8*(-parseInt(_0x19e457(0x11c))/0x9)+-parseInt(_0x19e457(0x14d))/0xa*(parseInt(_0x19e457(0xf2))/0xb)+-parseInt(_0x19e457(0xe6))/0xc*(-parseInt(_0x19e457(0x115))/0xd);if(_0x432467===_0x3763c6)break;else _0x304002['push'](_0x304002['shift']());}catch(_0xb68ba6){_0x304002['push'](_0x304002['shift']());}}}(a188_0x180c,0xc8acb));export const CLI_BIN_NAME=a188_0x243e6b(0xee);export const CLI_DISPLAY_NAME='Rabetbase\x20CLI';export const NPM_PACKAGE_NAME=a188_0x243e6b(0x153);export const GLOBAL_FLAGS=[{'name':'appcode','meowKey':'appcode','type':a188_0x243e6b(0x151),'description':'Override\x20appcode','hint':a188_0x243e6b(0xf0)},{'name':a188_0x243e6b(0x154),'meowKey':a188_0x243e6b(0x154),'type':a188_0x243e6b(0x151),'description':'Select\x20app\x20profile\x20by\x20name','hint':a188_0x243e6b(0x110)},{'name':a188_0x243e6b(0x130),'meowKey':a188_0x243e6b(0x130),'type':a188_0x243e6b(0x151),'description':'Environment','hint':'production\x20|\x20daily'},{'name':a188_0x243e6b(0x113),'meowKey':a188_0x243e6b(0x113),'type':a188_0x243e6b(0x151),'description':a188_0x243e6b(0x10a),'hint':a188_0x243e6b(0x112)},{'name':'jq','meowKey':'jq','type':a188_0x243e6b(0x151),'description':a188_0x243e6b(0x11b),'hint':a188_0x243e6b(0x155)},{'name':a188_0x243e6b(0xe3),'meowKey':a188_0x243e6b(0x152),'type':a188_0x243e6b(0xea),'description':a188_0x243e6b(0x122)},{'name':a188_0x243e6b(0x12d),'meowKey':a188_0x243e6b(0x12d),'type':a188_0x243e6b(0xea),'description':a188_0x243e6b(0x13f)},{'name':a188_0x243e6b(0xfb),'meowKey':a188_0x243e6b(0xf8),'type':a188_0x243e6b(0xea),'description':a188_0x243e6b(0x135)},{'name':'global','meowKey':a188_0x243e6b(0x11a),'type':a188_0x243e6b(0xea),'description':a188_0x243e6b(0x103)},{'name':a188_0x243e6b(0x14f),'meowKey':a188_0x243e6b(0x14f),'type':a188_0x243e6b(0xea),'description':a188_0x243e6b(0x145)},{'name':'ci','meowKey':'ci','type':a188_0x243e6b(0xea),'description':a188_0x243e6b(0x123),'hidden':!![]},{'name':'help','meowKey':a188_0x243e6b(0x144),'type':a188_0x243e6b(0xea),'description':a188_0x243e6b(0x14e)},{'name':a188_0x243e6b(0x13e),'meowKey':'name','type':a188_0x243e6b(0x151),'description':a188_0x243e6b(0xde),'hidden':!![]},{'name':a188_0x243e6b(0x14c),'meowKey':'title','type':a188_0x243e6b(0x151),'description':'Title','hidden':!![]},{'name':a188_0x243e6b(0xed),'meowKey':a188_0x243e6b(0xed),'type':a188_0x243e6b(0xea),'description':a188_0x243e6b(0x12f),'hidden':!![]},{'name':a188_0x243e6b(0x125),'meowKey':'watch','type':'boolean','description':a188_0x243e6b(0xfd),'hidden':!![]},{'name':a188_0x243e6b(0x104),'meowKey':a188_0x243e6b(0x104),'type':a188_0x243e6b(0x151),'description':a188_0x243e6b(0x150),'hidden':!![]},{'name':'params','meowKey':a188_0x243e6b(0x107),'type':a188_0x243e6b(0x151),'description':a188_0x243e6b(0x132),'hidden':!![]},{'name':a188_0x243e6b(0x116),'meowKey':a188_0x243e6b(0x116),'type':'string','description':a188_0x243e6b(0x11f),'hidden':!![]},{'name':a188_0x243e6b(0x146),'meowKey':a188_0x243e6b(0x146),'type':a188_0x243e6b(0xea),'description':'Apply\x20to\x20all','hidden':!![]},{'name':a188_0x243e6b(0xef),'meowKey':a188_0x243e6b(0x105),'type':a188_0x243e6b(0xea),'description':a188_0x243e6b(0x12b),'hidden':!![]},{'name':'id','meowKey':'id','type':a188_0x243e6b(0x151),'description':a188_0x243e6b(0x124),'hidden':!![]},{'name':a188_0x243e6b(0x138),'meowKey':'type','type':a188_0x243e6b(0x151),'description':'Type\x20filter','hidden':!![]},{'name':a188_0x243e6b(0x10e),'meowKey':'file','type':a188_0x243e6b(0x151),'description':a188_0x243e6b(0x100),'hidden':!![]},{'name':'sqlcode','meowKey':a188_0x243e6b(0xda),'type':a188_0x243e6b(0x151),'description':a188_0x243e6b(0x126),'hidden':!![]},{'name':a188_0x243e6b(0x143),'meowKey':a188_0x243e6b(0x141),'type':a188_0x243e6b(0x151),'description':a188_0x243e6b(0xe8),'hidden':!![]},{'name':a188_0x243e6b(0x15d),'meowKey':a188_0x243e6b(0x15d),'type':a188_0x243e6b(0x151),'description':a188_0x243e6b(0xe8),'hidden':!![]},{'name':'db-id','meowKey':a188_0x243e6b(0x102),'type':a188_0x243e6b(0x151),'description':'DB\x20ID','hidden':!![]},{'name':'dbid','meowKey':a188_0x243e6b(0xf1),'type':a188_0x243e6b(0x151),'description':a188_0x243e6b(0x13d),'hidden':!![]},{'name':a188_0x243e6b(0x131),'meowKey':a188_0x243e6b(0x131),'type':a188_0x243e6b(0x151),'description':'Description','hidden':!![]},{'name':a188_0x243e6b(0xff),'meowKey':'descriptionFile','type':a188_0x243e6b(0x151),'description':a188_0x243e6b(0xf4),'hidden':!![]},{'name':a188_0x243e6b(0x15a),'meowKey':a188_0x243e6b(0x15a),'type':'string','description':'Page\x20number','hidden':!![]},{'name':a188_0x243e6b(0xdd),'meowKey':a188_0x243e6b(0xdd),'type':'string','description':a188_0x243e6b(0x134),'hidden':!![]},{'name':'keyword','meowKey':a188_0x243e6b(0xfa),'type':a188_0x243e6b(0x151),'description':'Keyword\x20filter','hidden':!![]},{'name':a188_0x243e6b(0x136),'meowKey':'code','type':a188_0x243e6b(0x151),'description':a188_0x243e6b(0xfc),'hidden':!![]},{'name':a188_0x243e6b(0x11e),'meowKey':a188_0x243e6b(0x11e),'type':'string','description':a188_0x243e6b(0x15b),'hidden':!![]},{'name':a188_0x243e6b(0x106),'meowKey':a188_0x243e6b(0x106),'type':a188_0x243e6b(0x151),'description':'Schemas','hidden':!![]},{'name':a188_0x243e6b(0x12c),'meowKey':a188_0x243e6b(0x12c),'type':a188_0x243e6b(0x151),'description':a188_0x243e6b(0xfe),'hidden':!![]},{'name':a188_0x243e6b(0x128),'meowKey':a188_0x243e6b(0x128),'type':a188_0x243e6b(0x151),'description':'Target\x20path','hidden':!![]},{'name':a188_0x243e6b(0x15c),'meowKey':a188_0x243e6b(0x158),'type':'boolean','description':a188_0x243e6b(0xe7),'hidden':!![]},{'name':a188_0x243e6b(0x119),'meowKey':'key','type':'string','description':a188_0x243e6b(0x157),'hidden':!![]},{'name':'value','meowKey':a188_0x243e6b(0x13b),'type':'string','description':a188_0x243e6b(0xf5),'hidden':!![]},{'name':a188_0x243e6b(0x118),'meowKey':a188_0x243e6b(0x118),'type':a188_0x243e6b(0x151),'description':a188_0x243e6b(0xdb),'hidden':!![]},{'name':a188_0x243e6b(0x10b),'meowKey':a188_0x243e6b(0x10b),'type':a188_0x243e6b(0xea),'description':a188_0x243e6b(0x129),'hidden':!![]},{'name':a188_0x243e6b(0xf6),'meowKey':a188_0x243e6b(0xe9),'type':a188_0x243e6b(0x151),'description':a188_0x243e6b(0xf3),'hidden':!![]},{'name':a188_0x243e6b(0x142),'meowKey':'reveal','type':a188_0x243e6b(0xea),'description':'Reveal\x20sensitive\x20value','hidden':!![]},{'name':a188_0x243e6b(0x148),'meowKey':a188_0x243e6b(0x148),'type':a188_0x243e6b(0xea),'description':a188_0x243e6b(0x114),'hidden':!![]},{'name':'confirm','meowKey':a188_0x243e6b(0xe2),'type':a188_0x243e6b(0xea),'description':a188_0x243e6b(0x10d),'hidden':!![]},{'name':a188_0x243e6b(0x156),'meowKey':a188_0x243e6b(0x156),'type':a188_0x243e6b(0xea),'description':a188_0x243e6b(0x108),'hidden':!![]},{'name':a188_0x243e6b(0x10c),'meowKey':a188_0x243e6b(0x10c),'type':a188_0x243e6b(0xea),'description':a188_0x243e6b(0x120),'hidden':!![]},{'name':a188_0x243e6b(0x139),'meowKey':a188_0x243e6b(0x111),'type':a188_0x243e6b(0x151),'description':a188_0x243e6b(0xe0),'hidden':!![]},{'name':a188_0x243e6b(0x14a),'meowKey':a188_0x243e6b(0x14a),'type':a188_0x243e6b(0x151),'description':a188_0x243e6b(0x149),'hidden':!![]},{'name':a188_0x243e6b(0x11d),'meowKey':'parentId','type':a188_0x243e6b(0x151),'description':a188_0x243e6b(0x13c),'hidden':!![]},{'name':a188_0x243e6b(0xe1),'meowKey':a188_0x243e6b(0xe1),'type':a188_0x243e6b(0x151),'description':a188_0x243e6b(0x14b),'hidden':!![]},{'name':a188_0x243e6b(0x140),'meowKey':a188_0x243e6b(0x147),'type':'string','description':a188_0x243e6b(0x117),'hidden':!![]},{'name':a188_0x243e6b(0xdc),'meowKey':a188_0x243e6b(0xeb),'type':a188_0x243e6b(0x151),'description':'Expected\x20current\x20menu\x20path','hidden':!![]},{'name':a188_0x243e6b(0xf7),'meowKey':a188_0x243e6b(0xdf),'type':a188_0x243e6b(0x151),'description':a188_0x243e6b(0x121),'hidden':!![]},{'name':'menu-ids','meowKey':'menuIds','type':'string','description':a188_0x243e6b(0x159),'hidden':!![]},{'name':a188_0x243e6b(0x109),'meowKey':'taskId','type':a188_0x243e6b(0x151),'description':a188_0x243e6b(0x13a),'hidden':!![]},{'name':a188_0x243e6b(0x127),'meowKey':a188_0x243e6b(0x137),'type':a188_0x243e6b(0x151),'description':'Operation\x20type','hidden':!![]},{'name':a188_0x243e6b(0x12e),'meowKey':'functionNode','type':a188_0x243e6b(0x151),'description':'Function\x20node','hidden':!![]}];export const PIPELINE_FLAG_NAMES=new Set(['appcode',a188_0x243e6b(0x154),a188_0x243e6b(0x130),a188_0x243e6b(0x113),'jq',a188_0x243e6b(0xe3),a188_0x243e6b(0x12d),a188_0x243e6b(0xfb),'ci']);function a188_0x1081(_0x357ba4,_0x54c18d){_0x357ba4=_0x357ba4-0xd9;const _0x180c6c=a188_0x180c();let _0x1081cd=_0x180c6c[_0x357ba4];return _0x1081cd;}export function buildMeowFlags(){const _0x511cb2=a188_0x243e6b;return Object[_0x511cb2(0x101)](GLOBAL_FLAGS[_0x511cb2(0xe5)](_0x2bf4c2=>[_0x2bf4c2['meowKey'],{'type':_0x2bf4c2[_0x511cb2(0x138)]}]));}
1
+ const a188_0xe113cf=a188_0x50ed;(function(_0x50953b,_0x3e4192){const _0x2b1d76=a188_0x50ed,_0x10d106=_0x50953b();while(!![]){try{const _0x30dd51=parseInt(_0x2b1d76(0xcc))/0x1+-parseInt(_0x2b1d76(0xdb))/0x2+-parseInt(_0x2b1d76(0xec))/0x3*(-parseInt(_0x2b1d76(0xff))/0x4)+parseInt(_0x2b1d76(0xd8))/0x5+-parseInt(_0x2b1d76(0x120))/0x6*(parseInt(_0x2b1d76(0xd6))/0x7)+parseInt(_0x2b1d76(0xfb))/0x8+-parseInt(_0x2b1d76(0x13a))/0x9;if(_0x30dd51===_0x3e4192)break;else _0x10d106['push'](_0x10d106['shift']());}catch(_0x4a4e4c){_0x10d106['push'](_0x10d106['shift']());}}}(a188_0xdfbc,0xf1a38));export const CLI_BIN_NAME=a188_0xe113cf(0xcb);export const CLI_DISPLAY_NAME=a188_0xe113cf(0xd0);function a188_0x50ed(_0x494097,_0x1410bf){_0x494097=_0x494097-0xc4;const _0xdfbc8e=a188_0xdfbc();let _0x50ed40=_0xdfbc8e[_0x494097];return _0x50ed40;}export const NPM_PACKAGE_NAME='@lovrabet/rabetbase-cli';export const GLOBAL_FLAGS=[{'name':'appcode','meowKey':a188_0xe113cf(0x13e),'type':a188_0xe113cf(0xf7),'description':a188_0xe113cf(0xee),'hint':'<code>'},{'name':'app','meowKey':a188_0xe113cf(0xdd),'type':a188_0xe113cf(0xf7),'description':a188_0xe113cf(0x13d),'hint':a188_0xe113cf(0x124)},{'name':a188_0xe113cf(0xf0),'meowKey':a188_0xe113cf(0xf0),'type':'string','description':'Environment','hint':a188_0xe113cf(0xed)},{'name':a188_0xe113cf(0x105),'meowKey':a188_0xe113cf(0x105),'type':a188_0xe113cf(0xf7),'description':a188_0xe113cf(0xea),'hint':a188_0xe113cf(0xeb)},{'name':'jq','meowKey':'jq','type':a188_0xe113cf(0xf7),'description':a188_0xe113cf(0x129),'hint':'<expr>'},{'name':a188_0xe113cf(0x128),'meowKey':a188_0xe113cf(0x109),'type':a188_0xe113cf(0x12d),'description':a188_0xe113cf(0xcd)},{'name':'yes','meowKey':a188_0xe113cf(0x12e),'type':a188_0xe113cf(0x12d),'description':'Skip\x20confirmation\x20for\x20high-risk\x20writes'},{'name':a188_0xe113cf(0xd7),'meowKey':a188_0xe113cf(0xdc),'type':'boolean','description':a188_0xe113cf(0x12a)},{'name':a188_0xe113cf(0x104),'meowKey':a188_0xe113cf(0x104),'type':a188_0xe113cf(0x12d),'description':a188_0xe113cf(0xf4)},{'name':'project','meowKey':a188_0xe113cf(0x112),'type':'boolean','description':a188_0xe113cf(0xf5)},{'name':'ci','meowKey':'ci','type':a188_0xe113cf(0x12d),'description':a188_0xe113cf(0x134),'hidden':!![]},{'name':a188_0xe113cf(0xcf),'meowKey':'help','type':'boolean','description':a188_0xe113cf(0x10c)},{'name':a188_0xe113cf(0xd4),'meowKey':a188_0xe113cf(0xd4),'type':a188_0xe113cf(0xf7),'description':a188_0xe113cf(0x102),'hidden':!![]},{'name':'title','meowKey':a188_0xe113cf(0x10e),'type':a188_0xe113cf(0xf7),'description':'Title','hidden':!![]},{'name':a188_0xe113cf(0xef),'meowKey':'clear','type':'boolean','description':'Clear','hidden':!![]},{'name':'watch','meowKey':a188_0xe113cf(0x13c),'type':a188_0xe113cf(0x12d),'description':a188_0xe113cf(0xe0),'hidden':!![]},{'name':'output','meowKey':a188_0xe113cf(0x108),'type':a188_0xe113cf(0xf7),'description':'Output\x20path','hidden':!![]},{'name':a188_0xe113cf(0x10d),'meowKey':a188_0xe113cf(0x10d),'type':a188_0xe113cf(0xf7),'description':'JSON\x20params','hidden':!![]},{'name':a188_0xe113cf(0x107),'meowKey':a188_0xe113cf(0x107),'type':a188_0xe113cf(0xf7),'description':'Dataset\x20code','hidden':!![]},{'name':a188_0xe113cf(0xd1),'meowKey':'all','type':a188_0xe113cf(0x12d),'description':a188_0xe113cf(0xdf),'hidden':!![]},{'name':a188_0xe113cf(0x101),'meowKey':a188_0xe113cf(0xfa),'type':a188_0xe113cf(0x12d),'description':a188_0xe113cf(0xf3),'hidden':!![]},{'name':'id','meowKey':'id','type':'string','description':'Record\x20ID','hidden':!![]},{'name':a188_0xe113cf(0xe2),'meowKey':a188_0xe113cf(0xe2),'type':'string','description':a188_0xe113cf(0x10b),'hidden':!![]},{'name':'file','meowKey':a188_0xe113cf(0x11c),'type':a188_0xe113cf(0xf7),'description':a188_0xe113cf(0x113),'hidden':!![]},{'name':a188_0xe113cf(0x11e),'meowKey':a188_0xe113cf(0x11e),'type':a188_0xe113cf(0xf7),'description':a188_0xe113cf(0xca),'hidden':!![]},{'name':a188_0xe113cf(0x111),'meowKey':a188_0xe113cf(0x141),'type':a188_0xe113cf(0xf7),'description':a188_0xe113cf(0xe4),'hidden':!![]},{'name':'sqlname','meowKey':'sqlname','type':a188_0xe113cf(0xf7),'description':'SQL\x20name','hidden':!![]},{'name':a188_0xe113cf(0x122),'meowKey':a188_0xe113cf(0xfc),'type':a188_0xe113cf(0xf7),'description':'DB\x20ID','hidden':!![]},{'name':a188_0xe113cf(0xc8),'meowKey':a188_0xe113cf(0xc8),'type':a188_0xe113cf(0xf7),'description':a188_0xe113cf(0xde),'hidden':!![]},{'name':a188_0xe113cf(0xe6),'meowKey':a188_0xe113cf(0xe6),'type':'string','description':a188_0xe113cf(0xe3),'hidden':!![]},{'name':a188_0xe113cf(0xc5),'meowKey':a188_0xe113cf(0x11f),'type':a188_0xe113cf(0xf7),'description':a188_0xe113cf(0x121),'hidden':!![]},{'name':a188_0xe113cf(0xe9),'meowKey':a188_0xe113cf(0xe9),'type':a188_0xe113cf(0xf7),'description':'Page\x20number','hidden':!![]},{'name':a188_0xe113cf(0x130),'meowKey':a188_0xe113cf(0x130),'type':'string','description':a188_0xe113cf(0x118),'hidden':!![]},{'name':a188_0xe113cf(0x12f),'meowKey':a188_0xe113cf(0x12f),'type':a188_0xe113cf(0xf7),'description':a188_0xe113cf(0x11a),'hidden':!![]},{'name':'code','meowKey':a188_0xe113cf(0xe5),'type':a188_0xe113cf(0xf7),'description':a188_0xe113cf(0xd2),'hidden':!![]},{'name':a188_0xe113cf(0xc4),'meowKey':'sql','type':a188_0xe113cf(0xf7),'description':'SQL\x20string','hidden':!![]},{'name':a188_0xe113cf(0x114),'meowKey':a188_0xe113cf(0x114),'type':a188_0xe113cf(0xf7),'description':a188_0xe113cf(0x140),'hidden':!![]},{'name':a188_0xe113cf(0x115),'meowKey':a188_0xe113cf(0x115),'type':a188_0xe113cf(0xf7),'description':a188_0xe113cf(0xf6),'hidden':!![]},{'name':a188_0xe113cf(0xfe),'meowKey':a188_0xe113cf(0xfe),'type':a188_0xe113cf(0xf7),'description':'Target\x20path','hidden':!![]},{'name':a188_0xe113cf(0x127),'meowKey':a188_0xe113cf(0x11d),'type':'boolean','description':a188_0xe113cf(0x138),'hidden':!![]},{'name':a188_0xe113cf(0x137),'meowKey':a188_0xe113cf(0x137),'type':'string','description':a188_0xe113cf(0x13f),'hidden':!![]},{'name':'value','meowKey':'value','type':a188_0xe113cf(0xf7),'description':a188_0xe113cf(0x10f),'hidden':!![]},{'name':a188_0xe113cf(0x11b),'meowKey':a188_0xe113cf(0x11b),'type':'string','description':a188_0xe113cf(0xda),'hidden':!![]},{'name':a188_0xe113cf(0xe7),'meowKey':'stdin','type':a188_0xe113cf(0x12d),'description':a188_0xe113cf(0x10a),'hidden':!![]},{'name':'from-env','meowKey':'fromEnv','type':'string','description':'Read\x20value\x20from\x20environment\x20variable','hidden':!![]},{'name':a188_0xe113cf(0xfd),'meowKey':a188_0xe113cf(0xfd),'type':a188_0xe113cf(0x12d),'description':a188_0xe113cf(0xce),'hidden':!![]},{'name':a188_0xe113cf(0x117),'meowKey':a188_0xe113cf(0x117),'type':a188_0xe113cf(0x12d),'description':'Force\x20overwrite','hidden':!![]},{'name':a188_0xe113cf(0x133),'meowKey':a188_0xe113cf(0x133),'type':a188_0xe113cf(0x12d),'description':'Confirm\x20destructive\x20action','hidden':!![]},{'name':a188_0xe113cf(0x12c),'meowKey':'remote','type':a188_0xe113cf(0x12d),'description':'Use\x20remote','hidden':!![]},{'name':a188_0xe113cf(0xf1),'meowKey':a188_0xe113cf(0xf1),'type':a188_0xe113cf(0x12d),'description':a188_0xe113cf(0xd3),'hidden':!![]},{'name':a188_0xe113cf(0xd5),'meowKey':a188_0xe113cf(0x119),'type':a188_0xe113cf(0xf7),'description':a188_0xe113cf(0x106),'hidden':!![]},{'name':a188_0xe113cf(0x116),'meowKey':a188_0xe113cf(0x116),'type':'string','description':'Menu\x20label','hidden':!![]},{'name':a188_0xe113cf(0x125),'meowKey':a188_0xe113cf(0xc7),'type':'string','description':a188_0xe113cf(0x13b),'hidden':!![]},{'name':a188_0xe113cf(0x139),'meowKey':'sort','type':'string','description':a188_0xe113cf(0xe8),'hidden':!![]},{'name':a188_0xe113cf(0x12b),'meowKey':'expectParentId','type':a188_0xe113cf(0xf7),'description':a188_0xe113cf(0xf8),'hidden':!![]},{'name':a188_0xe113cf(0x100),'meowKey':'expectPath','type':a188_0xe113cf(0xf7),'description':a188_0xe113cf(0x142),'hidden':!![]},{'name':'expected-children-count','meowKey':a188_0xe113cf(0x132),'type':a188_0xe113cf(0xf7),'description':a188_0xe113cf(0xe1),'hidden':!![]},{'name':a188_0xe113cf(0x103),'meowKey':a188_0xe113cf(0xc9),'type':a188_0xe113cf(0xf7),'description':'Comma-separated\x20menu\x20IDs','hidden':!![]},{'name':'task-id','meowKey':a188_0xe113cf(0x126),'type':'string','description':a188_0xe113cf(0xc6),'hidden':!![]},{'name':a188_0xe113cf(0xf9),'meowKey':a188_0xe113cf(0x131),'type':a188_0xe113cf(0xf7),'description':a188_0xe113cf(0xf6),'hidden':!![]},{'name':a188_0xe113cf(0x135),'meowKey':a188_0xe113cf(0x123),'type':a188_0xe113cf(0xf7),'description':a188_0xe113cf(0xd9),'hidden':!![]}];function a188_0xdfbc(){const _0xd06ff3=['fromEntries','key','Skip\x20import\x20generation','sort','28830888rFZnlA','Parent\x20menu\x20id','watch','Select\x20app\x20profile\x20by\x20name','appcode','Config\x20key','Schemas','sqlName','Expected\x20current\x20menu\x20path','sql','description-file','Asynchronous\x20task\x20ID','parentId','dbid','menuIds','SQL\x20code','rabetbase','1104351lxypRf','Preview\x20operation\x20without\x20executing','Reveal\x20sensitive\x20value','help','Rabetbase\x20CLI','all','Code\x20filter','Verbose\x20output','name','expected-count','1967bwqMEh','non-interactive','9799110eJZpRT','Function\x20node','Tags','540306GhExVH','nonInteractive','app','DB\x20ID','Apply\x20to\x20all','Watch\x20mode','Expected\x20current\x20child\x20count','type','Description','SQL\x20name','code','description','stdin','Menu\x20sort\x20value','page','Output\x20format','json\x20|\x20pretty\x20|\x20compress','30CeUALs','production\x20|\x20daily','Override\x20appcode','clear','env','verbose','meowKey','Enable\x20BFF\x20save','Use\x20global\x20config\x20scope','Use\x20project\x20config\x20scope','Operation\x20type','string','Expected\x20current\x20parent\x20menu\x20id','operation-type','enableBffSave','15480240OONIdZ','dbId','reveal','target','105544wyIZoB','expect-path','enable-bff-save','Name','menu-ids','global','format','Expected\x20affected\x20count','datasetcode','output','dryRun','Read\x20value\x20from\x20stdin','Type\x20filter','Show\x20help','params','title','Config\x20value','map','sql-name','project','File\x20path','schemas','operation','label','force','Page\x20size','expectedCount','Keyword\x20filter','tags','file','skipImports','sqlcode','descriptionFile','17076Ztbxtq','Description\x20file','db-id','functionNode','<name>','parent-id','taskId','skip-imports','dry-run','Filter\x20JSON\x20output\x20(JQ_PATH\x20>\x20bundled\x20jq\x20>\x20PATH;\x20use\x20with\x20--format\x20json\x20or\x20compress)','Force\x20non-interactive\x20mode\x20(CI)','expect-parent-id','remote','boolean','yes','keyword','pagesize','operationType','expectedChildrenCount','confirm','Alias\x20for\x20--non-interactive','function-node'];a188_0xdfbc=function(){return _0xd06ff3;};return a188_0xdfbc();}export const PIPELINE_FLAG_NAMES=new Set(['appcode',a188_0xe113cf(0xdd),a188_0xe113cf(0xf0),a188_0xe113cf(0x105),'jq',a188_0xe113cf(0x128),a188_0xe113cf(0x12e),a188_0xe113cf(0xd7),'ci']);export function buildMeowFlags(){const _0xdb5c3a=a188_0xe113cf;return Object[_0xdb5c3a(0x136)](GLOBAL_FLAGS[_0xdb5c3a(0x110)](_0x1376f4=>[_0x1376f4[_0xdb5c3a(0xf2)],{'type':_0x1376f4['type']}]));}
@@ -1 +1 @@
1
- const a189_0x4eefd9=a189_0x424e;function a189_0x569f(){const _0x395832=['8MEpgJI','compress','3gdQCDF','7749240nKtauj','708vhfjSF','high-risk-write','6XWItdz','3848097herLJx','9gOOuNp','4zBbUal','5460445woMrxZ','en-US','production','5901357GKyQra','333307VptUIy','11491766OUYybG','698322qPrphp'];a189_0x569f=function(){return _0x395832;};return a189_0x569f();}(function(_0x2171ef,_0x4410c0){const _0x485de5=a189_0x424e,_0x54f5a0=_0x2171ef();while(!![]){try{const _0x1e9aae=parseInt(_0x485de5(0x14d))/0x1*(-parseInt(_0x485de5(0x14a))/0x2)+-parseInt(_0x485de5(0x152))/0x3*(parseInt(_0x485de5(0x154))/0x4)+-parseInt(_0x485de5(0x155))/0x5*(-parseInt(_0x485de5(0x151))/0x6)+-parseInt(_0x485de5(0x147))/0x7*(-parseInt(_0x485de5(0x14b))/0x8)+parseInt(_0x485de5(0x153))/0x9*(parseInt(_0x485de5(0x14e))/0xa)+-parseInt(_0x485de5(0x149))/0xb+parseInt(_0x485de5(0x14f))/0xc*(parseInt(_0x485de5(0x148))/0xd);if(_0x1e9aae===_0x4410c0)break;else _0x54f5a0['push'](_0x54f5a0['shift']());}catch(_0x3e1a7b){_0x54f5a0['push'](_0x54f5a0['shift']());}}}(a189_0x569f,0xcf005));import{DEFAULT_API_DIR}from'../constant/paths.js';function a189_0x424e(_0x49b0f4,_0x511799){_0x49b0f4=_0x49b0f4-0x146;const _0x569ff5=a189_0x569f();let _0x424e00=_0x569ff5[_0x49b0f4];return _0x424e00;}export const DEFAULT_CONFIG_VALUES={'env':a189_0x4eefd9(0x146),'format':'compress','locale':a189_0x4eefd9(0x156),'riskLevel':a189_0x4eefd9(0x150),'apiDir':DEFAULT_API_DIR};export const DEFAULT_COMMAND_OUTPUT_FORMAT=a189_0x4eefd9(0x14c);
1
+ const a189_0x514cf4=a189_0x2c9a;(function(_0x1a0051,_0xfce1b6){const _0x2c828b=a189_0x2c9a,_0x9e2455=_0x1a0051();while(!![]){try{const _0x20531b=-parseInt(_0x2c828b(0xcd))/0x1+-parseInt(_0x2c828b(0xcb))/0x2*(parseInt(_0x2c828b(0xcc))/0x3)+parseInt(_0x2c828b(0xd0))/0x4+-parseInt(_0x2c828b(0xc6))/0x5*(-parseInt(_0x2c828b(0xce))/0x6)+parseInt(_0x2c828b(0xcf))/0x7+parseInt(_0x2c828b(0xc9))/0x8*(parseInt(_0x2c828b(0xca))/0x9)+-parseInt(_0x2c828b(0xc7))/0xa;if(_0x20531b===_0xfce1b6)break;else _0x9e2455['push'](_0x9e2455['shift']());}catch(_0x3079f8){_0x9e2455['push'](_0x9e2455['shift']());}}}(a189_0x3a7e,0x866e5));function a189_0x2c9a(_0x2df475,_0x33898b){_0x2df475=_0x2df475-0xc6;const _0x3a7e1b=a189_0x3a7e();let _0x2c9af2=_0x3a7e1b[_0x2df475];return _0x2c9af2;}import{DEFAULT_API_DIR}from'../constant/paths.js';export const DEFAULT_CONFIG_VALUES={'env':a189_0x514cf4(0xd1),'format':a189_0x514cf4(0xc8),'locale':a189_0x514cf4(0xd3),'riskLevel':a189_0x514cf4(0xd2),'apiDir':DEFAULT_API_DIR};function a189_0x3a7e(){const _0x598798=['942662LLjmZQ','7584gbpckW','6613362puRYMO','4238980RfisXb','production','high-risk-write','en-US','365LSHhxx','7634050FWeIcG','compress','10616StYfQW','7389ZEZdlG','4TRnhuP','1394331ofmuag'];a189_0x3a7e=function(){return _0x598798;};return a189_0x3a7e();}export const DEFAULT_COMMAND_OUTPUT_FORMAT='compress';