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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (332) hide show
  1. package/README.md +1 -1
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/api/generate-sdk-config-file.js +1 -1
  6. package/lib/auth/auth-server-ui.js +1 -1
  7. package/lib/auth/auth-server.js +1 -1
  8. package/lib/auth/constant.js +1 -1
  9. package/lib/auth/get-cookie.js +1 -1
  10. package/lib/auth/get-session-user.js +1 -1
  11. package/lib/auth/is-session-valid.js +1 -1
  12. package/lib/auth/login-success-html.js +1 -1
  13. package/lib/auth/logout.js +1 -1
  14. package/lib/cli-flags.js +1 -1
  15. package/lib/cli.js +1 -1
  16. package/lib/commands/api/generate.js +1 -1
  17. package/lib/commands/api/index.js +1 -1
  18. package/lib/commands/api/list.js +1 -1
  19. package/lib/commands/api/pull.js +1 -1
  20. package/lib/commands/api/shared.js +1 -1
  21. package/lib/commands/app/index.js +1 -1
  22. package/lib/commands/app/list.js +1 -1
  23. package/lib/commands/app/members-list.js +1 -1
  24. package/lib/commands/app/remote-directory.js +1 -1
  25. package/lib/commands/app/shared.d.ts +1 -0
  26. package/lib/commands/app/shared.js +1 -1
  27. package/lib/commands/app-config/delete.js +1 -1
  28. package/lib/commands/app-config/get.js +1 -1
  29. package/lib/commands/app-config/index.js +1 -1
  30. package/lib/commands/app-config/list.js +1 -1
  31. package/lib/commands/app-config/set.js +1 -1
  32. package/lib/commands/app-config/shared.js +1 -1
  33. package/lib/commands/auth/index.js +1 -1
  34. package/lib/commands/bff/create.js +1 -1
  35. package/lib/commands/bff/delete.js +1 -1
  36. package/lib/commands/bff/detail.js +1 -1
  37. package/lib/commands/bff/index.js +1 -1
  38. package/lib/commands/bff/list.js +1 -1
  39. package/lib/commands/bff/pull.js +1 -1
  40. package/lib/commands/bff/push.js +1 -1
  41. package/lib/commands/bff/status.js +1 -1
  42. package/lib/commands/cli-skill/index.js +1 -1
  43. package/lib/commands/cli-update.js +1 -1
  44. package/lib/commands/codegen/index.js +1 -1
  45. package/lib/commands/codegen/sdk.js +1 -1
  46. package/lib/commands/codegen/sql.js +1 -1
  47. package/lib/commands/common/app-registry.js +1 -1
  48. package/lib/commands/common/app-selector.js +1 -1
  49. package/lib/commands/common/async-task.js +1 -1
  50. package/lib/commands/common/dry-run.js +1 -1
  51. package/lib/commands/common/flags.js +1 -1
  52. package/lib/commands/common/local-file.js +1 -1
  53. package/lib/commands/common/validate.js +1 -1
  54. package/lib/commands/config/delete.js +1 -1
  55. package/lib/commands/config/get.js +1 -1
  56. package/lib/commands/config/index.js +1 -1
  57. package/lib/commands/config/init.js +1 -1
  58. package/lib/commands/config/list.js +1 -1
  59. package/lib/commands/config/set.js +1 -1
  60. package/lib/commands/config/shared.js +1 -1
  61. package/lib/commands/dataset/business-group-update.js +1 -1
  62. package/lib/commands/dataset/business-groups.js +1 -1
  63. package/lib/commands/dataset/capability.js +1 -1
  64. package/lib/commands/dataset/delete.js +1 -1
  65. package/lib/commands/dataset/detail.js +1 -1
  66. package/lib/commands/dataset/extend-update.js +1 -1
  67. package/lib/commands/dataset/field-restore.js +1 -1
  68. package/lib/commands/dataset/field-update.js +1 -1
  69. package/lib/commands/dataset/generate.js +1 -1
  70. package/lib/commands/dataset/index.js +1 -1
  71. package/lib/commands/dataset/list.js +1 -1
  72. package/lib/commands/dataset/operations.js +1 -1
  73. package/lib/commands/dataset/relation-audit.js +1 -1
  74. package/lib/commands/dataset/relation-create.js +1 -1
  75. package/lib/commands/dataset/relation-delete.js +1 -1
  76. package/lib/commands/dataset/relation-shared.js +1 -1
  77. package/lib/commands/dataset/relation-update.js +1 -1
  78. package/lib/commands/dataset/relations.js +1 -1
  79. package/lib/commands/dataset/rename.js +1 -1
  80. package/lib/commands/dataset/restore.js +1 -1
  81. package/lib/commands/dataset/user-deleted-field-list.js +1 -1
  82. package/lib/commands/db/analysis-batching.js +1 -1
  83. package/lib/commands/db/analyze-batch-plan.js +1 -1
  84. package/lib/commands/db/analyze-cancel.js +1 -1
  85. package/lib/commands/db/analyze-start.js +1 -1
  86. package/lib/commands/db/analyze-status.js +1 -1
  87. package/lib/commands/db/create.js +1 -1
  88. package/lib/commands/db/delete.js +1 -1
  89. package/lib/commands/db/detail.js +1 -1
  90. package/lib/commands/db/diff-refresh-start.js +1 -1
  91. package/lib/commands/db/diff-refresh-status.js +1 -1
  92. package/lib/commands/db/diff.js +1 -1
  93. package/lib/commands/db/index.js +1 -1
  94. package/lib/commands/db/list.js +1 -1
  95. package/lib/commands/db/shared.js +1 -1
  96. package/lib/commands/db/table-diff-shared.js +1 -1
  97. package/lib/commands/db/tables.js +1 -1
  98. package/lib/commands/db/test.js +1 -1
  99. package/lib/commands/db/update.js +1 -1
  100. package/lib/commands/deployment/auto-sync.js +1 -1
  101. package/lib/commands/deployment/index.js +1 -1
  102. package/lib/commands/deployment/sync-all.js +1 -1
  103. package/lib/commands/deployment/sync-jobs.js +1 -1
  104. package/lib/commands/deployment/sync-status.js +1 -1
  105. package/lib/commands/deployment/sync.js +1 -1
  106. package/lib/commands/doctor.js +1 -1
  107. package/lib/commands/file/index.js +1 -1
  108. package/lib/commands/instant-api-policy/current.js +1 -1
  109. package/lib/commands/instant-api-policy/index.js +1 -1
  110. package/lib/commands/instant-api-policy/init.js +1 -1
  111. package/lib/commands/instant-api-policy/publish.js +1 -1
  112. package/lib/commands/instant-api-policy/pull.js +1 -1
  113. package/lib/commands/instant-api-policy/revision.js +1 -1
  114. package/lib/commands/instant-api-policy/revisions.js +1 -1
  115. package/lib/commands/instant-api-policy/rollback.js +1 -1
  116. package/lib/commands/instant-api-policy/shared.js +1 -1
  117. package/lib/commands/instant-api-policy/validate.js +1 -1
  118. package/lib/commands/issue/index.js +1 -1
  119. package/lib/commands/issue/nudge.js +1 -1
  120. package/lib/commands/issue/report.js +1 -1
  121. package/lib/commands/issue/shared.js +1 -1
  122. package/lib/commands/kb/create.js +1 -1
  123. package/lib/commands/kb/delete.js +1 -1
  124. package/lib/commands/kb/detail.js +1 -1
  125. package/lib/commands/kb/index.js +1 -1
  126. package/lib/commands/kb/list.js +1 -1
  127. package/lib/commands/kb/search.js +1 -1
  128. package/lib/commands/kb/shared.js +1 -1
  129. package/lib/commands/kb/update.js +1 -1
  130. package/lib/commands/logs/index.js +1 -1
  131. package/lib/commands/menu/asset-update.js +1 -1
  132. package/lib/commands/menu/delete.js +1 -1
  133. package/lib/commands/menu/external-link-create.js +1 -1
  134. package/lib/commands/menu/external-link-update.js +1 -1
  135. package/lib/commands/menu/group-create.js +1 -1
  136. package/lib/commands/menu/group-update.js +1 -1
  137. package/lib/commands/menu/index.js +1 -1
  138. package/lib/commands/menu/list.js +1 -1
  139. package/lib/commands/menu/move.js +1 -1
  140. package/lib/commands/menu/regroup-start.js +1 -1
  141. package/lib/commands/menu/rename.js +1 -1
  142. package/lib/commands/menu/shared/compare-table.js +1 -1
  143. package/lib/commands/menu/shared/delete-plan.js +1 -1
  144. package/lib/commands/menu/shared/facts.js +1 -1
  145. package/lib/commands/menu/shared/index.js +1 -1
  146. package/lib/commands/menu/shared/inquirer.js +1 -1
  147. package/lib/commands/menu/shared/local-pages.js +1 -1
  148. package/lib/commands/menu/shared/logic.js +1 -1
  149. package/lib/commands/menu/shared/mutations.js +1 -1
  150. package/lib/commands/menu/shared/service.js +1 -1
  151. package/lib/commands/menu/shared/sync-core.js +1 -1
  152. package/lib/commands/menu/shared/update-core.js +1 -1
  153. package/lib/commands/menu/shared/valid-url.js +1 -1
  154. package/lib/commands/menu/sync.js +1 -1
  155. package/lib/commands/menu/visibility-update.js +1 -1
  156. package/lib/commands/notification/config-create.js +1 -1
  157. package/lib/commands/notification/config-delete.js +1 -1
  158. package/lib/commands/notification/config-list.js +1 -1
  159. package/lib/commands/notification/config-update.js +1 -1
  160. package/lib/commands/notification/index.js +1 -1
  161. package/lib/commands/notification/shared.js +1 -1
  162. package/lib/commands/ocr/index.js +1 -1
  163. package/lib/commands/page/create.js +1 -1
  164. package/lib/commands/page/custom/detail.js +1 -1
  165. package/lib/commands/page/custom/list.js +1 -1
  166. package/lib/commands/page/custom/publish.js +1 -1
  167. package/lib/commands/page/custom/shared.js +1 -1
  168. package/lib/commands/page/custom/syntax.js +1 -1
  169. package/lib/commands/page/custom/template.js +1 -1
  170. package/lib/commands/page/custom/update.js +1 -1
  171. package/lib/commands/page/data-list-status.js +1 -1
  172. package/lib/commands/page/generate-start.js +1 -1
  173. package/lib/commands/page/generate-status.js +1 -1
  174. package/lib/commands/page/index.js +1 -1
  175. package/lib/commands/page/pull.js +1 -1
  176. package/lib/commands/page/push.js +1 -1
  177. package/lib/commands/page/relation-audit.js +1 -1
  178. package/lib/commands/page/restore.js +1 -1
  179. package/lib/commands/page/shared.js +1 -1
  180. package/lib/commands/page/sync.js +1 -1
  181. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  182. package/lib/commands/project/create/format-elapsed.js +1 -1
  183. package/lib/commands/project/create/main.js +1 -1
  184. package/lib/commands/project/create/materialize-project-template.js +1 -1
  185. package/lib/commands/project/create/project-name.js +1 -1
  186. package/lib/commands/project/create/project-template-archive.js +1 -1
  187. package/lib/commands/project/create/project-template-path.js +1 -1
  188. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  189. package/lib/commands/project/create/use-format-code.js +1 -1
  190. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  191. package/lib/commands/project/domain-routing-sync.js +1 -1
  192. package/lib/commands/project/index.js +1 -1
  193. package/lib/commands/project/upgrade.js +1 -1
  194. package/lib/commands/registry.js +1 -1
  195. package/lib/commands/role/delete.js +1 -1
  196. package/lib/commands/role/detail.js +1 -1
  197. package/lib/commands/role/index.js +1 -1
  198. package/lib/commands/role/list.js +1 -1
  199. package/lib/commands/role/shared.js +1 -1
  200. package/lib/commands/role/update.js +1 -1
  201. package/lib/commands/role/user-add.js +1 -1
  202. package/lib/commands/role/user-remove.js +1 -1
  203. package/lib/commands/role/user-resolve.js +1 -1
  204. package/lib/commands/rule/get.js +1 -1
  205. package/lib/commands/rule/index.js +1 -1
  206. package/lib/commands/rule/list.js +1 -1
  207. package/lib/commands/rule/set.js +1 -1
  208. package/lib/commands/rule/shared.js +1 -1
  209. package/lib/commands/run/index.js +1 -1
  210. package/lib/commands/schema.js +1 -1
  211. package/lib/commands/sql/create.js +1 -1
  212. package/lib/commands/sql/delete.js +1 -1
  213. package/lib/commands/sql/detail.js +1 -1
  214. package/lib/commands/sql/exec.js +1 -1
  215. package/lib/commands/sql/index.js +1 -1
  216. package/lib/commands/sql/list.js +1 -1
  217. package/lib/commands/sql/pull.js +1 -1
  218. package/lib/commands/sql/push.js +1 -1
  219. package/lib/commands/sql/shared.js +1 -1
  220. package/lib/commands/sql/status.js +1 -1
  221. package/lib/commands/sql/validate.js +1 -1
  222. package/lib/commands/task/index.js +1 -1
  223. package/lib/commands/task/status.js +1 -1
  224. package/lib/commands/tenant/index.js +1 -1
  225. package/lib/commands/tenant/members-list.js +1 -1
  226. package/lib/commands/tenant/shared.js +1 -1
  227. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  228. package/lib/commands/user-account/index.js +1 -1
  229. package/lib/commands/workspace/add.js +1 -1
  230. package/lib/commands/workspace/index.js +1 -1
  231. package/lib/commands/workspace/remove.js +1 -1
  232. package/lib/config/domain-config.d.ts +3 -7
  233. package/lib/config/domain-config.js +1 -1
  234. package/lib/config/project-domain-routing.js +1 -1
  235. package/lib/config/schema.js +1 -1
  236. package/lib/constant/cdn.js +1 -1
  237. package/lib/constant/cli.js +1 -1
  238. package/lib/constant/defaults.js +1 -1
  239. package/lib/constant/domain.js +1 -1
  240. package/lib/constant/env.js +1 -1
  241. package/lib/constant/output.js +1 -1
  242. package/lib/constant/paths.js +1 -1
  243. package/lib/constant/region.js +1 -1
  244. package/lib/constant/risk.js +1 -1
  245. package/lib/constant/routing-profile.js +1 -1
  246. package/lib/context/app-resolver.js +1 -1
  247. package/lib/context/auth-resolver.js +1 -1
  248. package/lib/context/config-loader.js +1 -1
  249. package/lib/context.js +1 -1
  250. package/lib/core/alias-resolver.js +1 -1
  251. package/lib/core/api-client.d.ts +1 -0
  252. package/lib/core/api-client.js +1 -1
  253. package/lib/core/bff/config.js +1 -1
  254. package/lib/core/bff/file-system.js +1 -1
  255. package/lib/core/bff/hash.js +1 -1
  256. package/lib/core/bff/lock.js +1 -1
  257. package/lib/core/bff/utils.js +1 -1
  258. package/lib/core/db-resolver.js +1 -1
  259. package/lib/core/instant-api-policy/config.js +1 -1
  260. package/lib/core/kb-search-client.js +1 -1
  261. package/lib/core/page/file-system.js +1 -1
  262. package/lib/core/page/hash.js +1 -1
  263. package/lib/core/page/lock.js +1 -1
  264. package/lib/core/sql-index-auditor.js +1 -1
  265. package/lib/core/sql-sync/config.js +1 -1
  266. package/lib/core/sql-sync/file-system.js +1 -1
  267. package/lib/core/sql-sync/hash.js +1 -1
  268. package/lib/core/sql-sync/lock.js +1 -1
  269. package/lib/core/sql-sync/utils.js +1 -1
  270. package/lib/core/sql-validator.js +1 -1
  271. package/lib/errors.js +1 -1
  272. package/lib/framework/build-all-flags.js +1 -1
  273. package/lib/framework/error-output.js +1 -1
  274. package/lib/framework/explicit-yes.js +1 -1
  275. package/lib/framework/flags.js +1 -1
  276. package/lib/framework/help.js +1 -1
  277. package/lib/framework/index.js +1 -1
  278. package/lib/framework/output.js +1 -1
  279. package/lib/framework/response.js +1 -1
  280. package/lib/framework/runner-alias.js +1 -1
  281. package/lib/framework/runner.js +1 -1
  282. package/lib/framework/schema-export.js +1 -1
  283. package/lib/framework/supported-flags.js +1 -1
  284. package/lib/framework/types.js +1 -1
  285. package/lib/generated/build-info.d.ts +4 -4
  286. package/lib/generated/build-info.js +1 -1
  287. package/lib/generated/official-routing.d.ts +1 -1
  288. package/lib/generated/official-routing.js +1 -1
  289. package/lib/generated/routing-contract.d.ts +1 -3
  290. package/lib/generated/routing-contract.js +1 -1
  291. package/lib/help.js +1 -1
  292. package/lib/postinstall.js +1 -1
  293. package/lib/runtime/confirmation.js +1 -1
  294. package/lib/runtime/event.js +1 -1
  295. package/lib/runtime/index.js +1 -1
  296. package/lib/runtime/queue.js +1 -1
  297. package/lib/runtime/resolve.js +1 -1
  298. package/lib/skills/builtin-skill.js +1 -1
  299. package/lib/skills/main.js +1 -1
  300. package/lib/skills/npx-skills-add.js +1 -1
  301. package/lib/skills/skill-presence.js +1 -1
  302. package/lib/telemetry/cli-command-trace.js +1 -1
  303. package/lib/telemetry/cli-help-trace.js +1 -1
  304. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  305. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  306. package/lib/telemetry/send-cli-trace-log.js +1 -1
  307. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  308. package/lib/utils/ai_config.js +1 -1
  309. package/lib/utils/apply-jq-filter.js +1 -1
  310. package/lib/utils/cdn-config.js +1 -1
  311. package/lib/utils/check-sdk-version.js +1 -1
  312. package/lib/utils/cli-version-check.js +1 -1
  313. package/lib/utils/cli-version-policy.js +1 -1
  314. package/lib/utils/config.js +1 -1
  315. package/lib/utils/entity-with-id.js +1 -1
  316. package/lib/utils/file-utils.js +1 -1
  317. package/lib/utils/guides-cdn.js +1 -1
  318. package/lib/utils/http-client.js +1 -1
  319. package/lib/utils/is-non-interactive.js +1 -1
  320. package/lib/utils/logger.js +1 -1
  321. package/lib/utils/params.js +1 -1
  322. package/lib/utils/platform.js +1 -1
  323. package/lib/utils/sleep.js +1 -1
  324. package/lib/utils/template-replacer.js +1 -1
  325. package/lib/utils/update-notice.js +1 -1
  326. package/lib/utils/version.js +1 -1
  327. package/lib/utils/with-active-cookie.js +1 -1
  328. package/lib/utils/write-cli-side-channel.js +1 -1
  329. package/package.json +1 -1
  330. package/skills/rabetbase/SKILL.md +2 -2
  331. package/skills/rabetbase/references/rabetbase-app-members-list.md +2 -0
  332. package/skills/rabetbase.manifest.json +3 -3
@@ -1 +1 @@
1
- (function(_0xc37bc6,_0x25b1c4){const _0x508c9a=a217_0x4d04,_0x38ce4d=_0xc37bc6();while(!![]){try{const _0x46d29d=parseInt(_0x508c9a(0x190))/0x1*(parseInt(_0x508c9a(0x177))/0x2)+-parseInt(_0x508c9a(0x19c))/0x3*(parseInt(_0x508c9a(0x173))/0x4)+parseInt(_0x508c9a(0x18e))/0x5+parseInt(_0x508c9a(0x17e))/0x6*(parseInt(_0x508c9a(0x172))/0x7)+-parseInt(_0x508c9a(0x16c))/0x8+parseInt(_0x508c9a(0x16f))/0x9+-parseInt(_0x508c9a(0x174))/0xa;if(_0x46d29d===_0x25b1c4)break;else _0x38ce4d['push'](_0x38ce4d['shift']());}catch(_0x25c323){_0x38ce4d['push'](_0x38ce4d['shift']());}}}(a217_0x3d59,0x9c9a7));import{createInterface}from'node:readline';import{join}from'node:path';import{buildDefaultSqlFileName,buildSqlRelativePath,detectSqlMode}from'../../core/sql-sync/utils.js';function a217_0x3d59(){const _0x2cee49=['lastSync','<!--\x20@lovrabet.','6hKySqU','endsWith','replace','syncedAt','sqlCode','stdin','sqlContent','push','--\x20@lovrabet.','dbId','join','test','trimStart','\x20-->','sqlConfig','question','3492335dzZVxo','\x20[y/N]\x20','1GadNbY','version','toLowerCase','includes','mybatisXml','apps','close','dbName','yes','split','description','entries','132bfeXSg','3631784kGakMX','trim','map','3243240zZyVlr','filter','mode','7646513WhBoXl','83844dWfynU','8918940viwfkI','length','stderr','1516824gmPCsF','sqlRoot','sqlName','fromEntries','path'];a217_0x3d59=function(){return _0x2cee49;};return a217_0x3d59();}export const SQL_LOCAL_REL_DIR='.rabetbase/sql';export function buildSqlLockEntry(_0x3ee506,_0x2a6dea,_0x37c76f,_0x4916b2){const _0x51f1b7=a217_0x4d04,_0x4dd54f=detectSqlMode(_0x2a6dea);return{'path':buildSqlRelativePath(_0x3ee506['sqlCode'],_0x3ee506[_0x51f1b7(0x179)],_0x4916b2?.[_0x51f1b7(0x197)],_0x4dd54f,_0x3ee506[_0x51f1b7(0x187)]),'hash':_0x37c76f,'remoteId':_0x3ee506['id'],'version':_0x3ee506[_0x51f1b7(0x191)],'dbId':Number(_0x3ee506[_0x51f1b7(0x187)]),'dbName':_0x4916b2?.[_0x51f1b7(0x197)],'sqlName':_0x3ee506[_0x51f1b7(0x179)],'sqlConfig':_0x3ee506[_0x51f1b7(0x18c)]??undefined,'mode':_0x4dd54f};}export function cloneSqlLockData(_0x595b7e){const _0x524a05=a217_0x4d04;return{'apps':Object[_0x524a05(0x17a)](Object[_0x524a05(0x19b)](_0x595b7e[_0x524a05(0x195)])[_0x524a05(0x16e)](([_0x2ca608,_0x3e0e0e])=>[_0x2ca608,{'sqlRoot':_0x3e0e0e[_0x524a05(0x178)],'lastSync':_0x3e0e0e[_0x524a05(0x17c)],'sqls':{..._0x3e0e0e['sqls']}}]))};}export function ensureRemoteSqlContent(_0x45402){const _0x223bc7=a217_0x4d04;return _0x45402[_0x223bc7(0x184)]??'';}export function buildLocalSqlFileContent(_0x2d4e1f,_0x3dffcb,_0x133da8){const _0xa16ac6=a217_0x4d04,_0xc45e18=_0x133da8?.[_0xa16ac6(0x171)]??detectSqlMode(_0x3dffcb),_0x5a2c5e=stripLocalSqlMetadata(_0x3dffcb,_0xc45e18)[_0xa16ac6(0x16d)](),_0x223a79=[...buildMetadataHeaderLines({'sqlCode':_0x2d4e1f[_0xa16ac6(0x182)],'sqlName':_0x2d4e1f['sqlName'],'dbId':_0x2d4e1f[_0xa16ac6(0x187)],'dbName':_0x133da8?.[_0xa16ac6(0x197)],'mode':_0xc45e18,'syncedAt':_0x133da8?.[_0xa16ac6(0x181)],'description':_0x133da8?.[_0xa16ac6(0x19a)]},_0xc45e18),'',_0x5a2c5e],_0x1e9eb8=_0x223a79[_0xa16ac6(0x188)]('\x0a');return _0x1e9eb8[_0xa16ac6(0x17f)]('\x0a')?_0x1e9eb8:_0x1e9eb8+'\x0a';}export function stripLocalSqlMetadata(_0x4b371a,_0x206191){const _0x118cfb=a217_0x4d04,_0x9a3e8d=_0x4b371a[_0x118cfb(0x180)](/\r\n/g,'\x0a')[_0x118cfb(0x199)]('\x0a'),_0x164170=[];let _0x33f3ee=0x0;if(_0x206191===_0x118cfb(0x194))while(_0x33f3ee<_0x9a3e8d[_0x118cfb(0x175)]){const _0x3383dd=_0x9a3e8d[_0x33f3ee]??'';if(/^\s*<!--\s*@lovrabet\./['test'](_0x3383dd)){_0x33f3ee++;continue;}if(_0x3383dd[_0x118cfb(0x16d)]()===''&&_0x33f3ee>0x0){_0x33f3ee++;continue;}break;}else while(_0x33f3ee<_0x9a3e8d[_0x118cfb(0x175)]){const _0x17b8ba=_0x9a3e8d[_0x33f3ee]??'';if(/^\s*--\s*@lovrabet\./[_0x118cfb(0x189)](_0x17b8ba)){_0x33f3ee++;continue;}if(_0x17b8ba[_0x118cfb(0x16d)]()===''&&_0x33f3ee>0x0){_0x33f3ee++;continue;}break;}for(;_0x33f3ee<_0x9a3e8d[_0x118cfb(0x175)];_0x33f3ee++){_0x164170[_0x118cfb(0x185)](_0x9a3e8d[_0x33f3ee]);}return _0x164170[_0x118cfb(0x188)]('\x0a')[_0x118cfb(0x18a)]();}export function resolveSqlMode(_0x216922,_0x32aa51){const _0x19552c=a217_0x4d04;if(_0x32aa51?.[_0x19552c(0x171)])return _0x32aa51[_0x19552c(0x171)];return detectSqlMode(_0x216922);}export function resolveSqlFileName(_0x30f256,_0x5b29d9,_0x3d1513){const _0x2b5cdc=a217_0x4d04;if(_0x3d1513?.['path'])return _0x3d1513[_0x2b5cdc(0x17b)];if(_0x3d1513?.[_0x2b5cdc(0x179)]||_0x3d1513?.['dbName'])return buildSqlRelativePath(_0x30f256,_0x3d1513?.[_0x2b5cdc(0x179)],_0x3d1513?.[_0x2b5cdc(0x197)],resolveSqlMode(_0x5b29d9,_0x3d1513),_0x3d1513?.[_0x2b5cdc(0x187)]);return buildDefaultSqlFileName(_0x30f256,resolveSqlMode(_0x5b29d9,_0x3d1513));}export function resolveSqlLocalDir(_0x41b5f7,_0xcf0dbf){return join(_0x41b5f7,SQL_LOCAL_REL_DIR,_0xcf0dbf);}export async function confirmForceOverwrite(_0x4c8678){const _0x3ba72b=a217_0x4d04,_0xb92e11=createInterface({'input':process[_0x3ba72b(0x183)],'output':process[_0x3ba72b(0x176)]}),_0x4e80de=await new Promise(_0x47e32e=>{const _0x169636=_0x3ba72b;_0xb92e11[_0x169636(0x18d)](_0x4c8678+_0x169636(0x18f),_0x47e32e);});return _0xb92e11[_0x3ba72b(0x196)](),['y',_0x3ba72b(0x198)][_0x3ba72b(0x193)](_0x4e80de['trim']()[_0x3ba72b(0x192)]());}function a217_0x4d04(_0x1a4580,_0x486c18){_0x1a4580=_0x1a4580-0x16c;const _0x3d59b6=a217_0x3d59();let _0x4d04de=_0x3d59b6[_0x1a4580];return _0x4d04de;}export function findSqlLockScope(_0x2ab754,_0x1125ed){return _0x2ab754['apps'][_0x1125ed];}function buildMetadataHeaderLines(_0x59f0d5,_0x3498f5){const _0x8b5121=a217_0x4d04,_0x19c90b=[[_0x8b5121(0x182),_0x59f0d5[_0x8b5121(0x182)]],[_0x8b5121(0x179),_0x59f0d5[_0x8b5121(0x179)]],[_0x8b5121(0x187),_0x59f0d5['dbId']],['dbName',_0x59f0d5['dbName']],[_0x8b5121(0x171),_0x59f0d5[_0x8b5121(0x171)]],[_0x8b5121(0x181),_0x59f0d5[_0x8b5121(0x181)]],[_0x8b5121(0x19a),_0x59f0d5[_0x8b5121(0x19a)]]];if(_0x3498f5==='mybatisXml')return _0x19c90b[_0x8b5121(0x170)](([,_0x324d50])=>_0x324d50!==undefined&&_0x324d50!==null&&String(_0x324d50)[_0x8b5121(0x16d)]()!=='')[_0x8b5121(0x16e)](([_0x3842ba,_0x3238d2])=>_0x8b5121(0x17d)+_0x3842ba+':\x20'+String(_0x3238d2)+_0x8b5121(0x18b));return _0x19c90b['filter'](([,_0x5e65a6])=>_0x5e65a6!==undefined&&_0x5e65a6!==null&&String(_0x5e65a6)[_0x8b5121(0x16d)]()!=='')[_0x8b5121(0x16e)](([_0x3b6237,_0x22091b])=>_0x8b5121(0x186)+_0x3b6237+':\x20'+String(_0x22091b));}
1
+ const a217_0x3d43c9=a217_0xec6c;(function(_0x3b3320,_0x53d1e4){const _0x555faf=a217_0xec6c,_0x57ca6b=_0x3b3320();while(!![]){try{const _0x16729b=-parseInt(_0x555faf(0xf0))/0x1+parseInt(_0x555faf(0xff))/0x2*(-parseInt(_0x555faf(0xf5))/0x3)+-parseInt(_0x555faf(0xf2))/0x4*(-parseInt(_0x555faf(0xe3))/0x5)+-parseInt(_0x555faf(0xef))/0x6*(parseInt(_0x555faf(0x104))/0x7)+-parseInt(_0x555faf(0xe0))/0x8*(parseInt(_0x555faf(0xdb))/0x9)+-parseInt(_0x555faf(0xf3))/0xa*(parseInt(_0x555faf(0xe8))/0xb)+parseInt(_0x555faf(0xf1))/0xc*(parseInt(_0x555faf(0xf6))/0xd);if(_0x16729b===_0x53d1e4)break;else _0x57ca6b['push'](_0x57ca6b['shift']());}catch(_0x4abe92){_0x57ca6b['push'](_0x57ca6b['shift']());}}}(a217_0x1f39,0x809ad));function a217_0xec6c(_0x51e9e8,_0x518065){_0x51e9e8=_0x51e9e8-0xd5;const _0x1f39e1=a217_0x1f39();let _0xec6c2c=_0x1f39e1[_0x51e9e8];return _0xec6c2c;}import{createInterface}from'node:readline';import{join}from'node:path';function a217_0x1f39(){const _0x368ea9=['toLowerCase','filter','question','dbId','1426779RsICNZ','endsWith','lastSync','<!--\x20@lovrabet.','sqlCode','32WVwIUE','split','sqlConfig','3729245IJYjoD','fromEntries','apps','mybatisXml','entries','33pwQKzf','join','description','mode','dbName','\x20[y/N]\x20','push','2916138uuSiOC','787133RoBrEg','2208528qhvxqi','4oBPPla','589690UZtXIu','includes','711513dhrDpY','182THriMv','stderr','trim','sqls','syncedAt','path','.rabetbase/sql','close','map','6Sswafg','sqlName','version','sqlContent','length','7GVNqaM','replace','trimStart'];a217_0x1f39=function(){return _0x368ea9;};return a217_0x1f39();}import{buildDefaultSqlFileName,buildSqlRelativePath,detectSqlMode}from'../../core/sql-sync/utils.js';export const SQL_LOCAL_REL_DIR=a217_0x3d43c9(0xfc);export function buildSqlLockEntry(_0x2fd118,_0xf52ea4,_0x4942cb,_0x1dcc1f){const _0x20b3bf=a217_0x3d43c9,_0x1d8e9e=detectSqlMode(_0xf52ea4);return{'path':buildSqlRelativePath(_0x2fd118[_0x20b3bf(0xdf)],_0x2fd118[_0x20b3bf(0x100)],_0x1dcc1f?.[_0x20b3bf(0xec)],_0x1d8e9e,_0x2fd118[_0x20b3bf(0xda)]),'hash':_0x4942cb,'remoteId':_0x2fd118['id'],'version':_0x2fd118[_0x20b3bf(0x101)],'dbId':Number(_0x2fd118['dbId']),'dbName':_0x1dcc1f?.[_0x20b3bf(0xec)],'sqlName':_0x2fd118[_0x20b3bf(0x100)],'sqlConfig':_0x2fd118[_0x20b3bf(0xe2)]??undefined,'mode':_0x1d8e9e};}export function cloneSqlLockData(_0x138ef6){const _0x5bf0c2=a217_0x3d43c9;return{'apps':Object[_0x5bf0c2(0xe4)](Object[_0x5bf0c2(0xe7)](_0x138ef6[_0x5bf0c2(0xe5)])[_0x5bf0c2(0xfe)](([_0xec8331,_0x5b4136])=>[_0xec8331,{'sqlRoot':_0x5b4136['sqlRoot'],'lastSync':_0x5b4136[_0x5bf0c2(0xdd)],'sqls':{..._0x5b4136[_0x5bf0c2(0xf9)]}}]))};}export function ensureRemoteSqlContent(_0xa0ae55){const _0x3b79e0=a217_0x3d43c9;return _0xa0ae55[_0x3b79e0(0x102)]??'';}export function buildLocalSqlFileContent(_0xa3fea8,_0x423599,_0x4c746c){const _0x550289=a217_0x3d43c9,_0x8b8fe0=_0x4c746c?.[_0x550289(0xeb)]??detectSqlMode(_0x423599),_0x54e6cf=stripLocalSqlMetadata(_0x423599,_0x8b8fe0)['trim'](),_0x4c97bb=[...buildMetadataHeaderLines({'sqlCode':_0xa3fea8[_0x550289(0xdf)],'sqlName':_0xa3fea8[_0x550289(0x100)],'dbId':_0xa3fea8[_0x550289(0xda)],'dbName':_0x4c746c?.['dbName'],'mode':_0x8b8fe0,'syncedAt':_0x4c746c?.['syncedAt'],'description':_0x4c746c?.['description']},_0x8b8fe0),'',_0x54e6cf],_0x160c98=_0x4c97bb[_0x550289(0xe9)]('\x0a');return _0x160c98[_0x550289(0xdc)]('\x0a')?_0x160c98:_0x160c98+'\x0a';}export function stripLocalSqlMetadata(_0x113761,_0x76e74c){const _0x347b82=a217_0x3d43c9,_0x49618f=_0x113761[_0x347b82(0xd5)](/\r\n/g,'\x0a')[_0x347b82(0xe1)]('\x0a'),_0xf08384=[];let _0x347cfa=0x0;if(_0x76e74c===_0x347b82(0xe6))while(_0x347cfa<_0x49618f['length']){const _0x4e3634=_0x49618f[_0x347cfa]??'';if(/^\s*<!--\s*@lovrabet\./['test'](_0x4e3634)){_0x347cfa++;continue;}if(_0x4e3634[_0x347b82(0xf8)]()===''&&_0x347cfa>0x0){_0x347cfa++;continue;}break;}else while(_0x347cfa<_0x49618f[_0x347b82(0x103)]){const _0x3bf3c3=_0x49618f[_0x347cfa]??'';if(/^\s*--\s*@lovrabet\./['test'](_0x3bf3c3)){_0x347cfa++;continue;}if(_0x3bf3c3['trim']()===''&&_0x347cfa>0x0){_0x347cfa++;continue;}break;}for(;_0x347cfa<_0x49618f['length'];_0x347cfa++){_0xf08384[_0x347b82(0xee)](_0x49618f[_0x347cfa]);}return _0xf08384[_0x347b82(0xe9)]('\x0a')[_0x347b82(0xd6)]();}export function resolveSqlMode(_0x300ea0,_0x40cb9a){const _0x3bbf07=a217_0x3d43c9;if(_0x40cb9a?.[_0x3bbf07(0xeb)])return _0x40cb9a[_0x3bbf07(0xeb)];return detectSqlMode(_0x300ea0);}export function resolveSqlFileName(_0x39fb16,_0xa8c65e,_0x32c036){const _0x568bf2=a217_0x3d43c9;if(_0x32c036?.[_0x568bf2(0xfb)])return _0x32c036['path'];if(_0x32c036?.['sqlName']||_0x32c036?.[_0x568bf2(0xec)])return buildSqlRelativePath(_0x39fb16,_0x32c036?.[_0x568bf2(0x100)],_0x32c036?.['dbName'],resolveSqlMode(_0xa8c65e,_0x32c036),_0x32c036?.[_0x568bf2(0xda)]);return buildDefaultSqlFileName(_0x39fb16,resolveSqlMode(_0xa8c65e,_0x32c036));}export function resolveSqlLocalDir(_0x344877,_0x347c4b){return join(_0x344877,SQL_LOCAL_REL_DIR,_0x347c4b);}export async function confirmForceOverwrite(_0x383d4a){const _0x5e0364=a217_0x3d43c9,_0x1038a4=createInterface({'input':process['stdin'],'output':process[_0x5e0364(0xf7)]}),_0x51220d=await new Promise(_0x2b8e83=>{const _0x304d3e=_0x5e0364;_0x1038a4[_0x304d3e(0xd9)](_0x383d4a+_0x304d3e(0xed),_0x2b8e83);});return _0x1038a4[_0x5e0364(0xfd)](),['y','yes'][_0x5e0364(0xf4)](_0x51220d[_0x5e0364(0xf8)]()[_0x5e0364(0xd7)]());}export function findSqlLockScope(_0x9f87a7,_0x1512cd){const _0x1b93e0=a217_0x3d43c9;return _0x9f87a7[_0x1b93e0(0xe5)][_0x1512cd];}function buildMetadataHeaderLines(_0x557346,_0x31ab28){const _0x458163=a217_0x3d43c9,_0x4306df=[['sqlCode',_0x557346[_0x458163(0xdf)]],['sqlName',_0x557346['sqlName']],[_0x458163(0xda),_0x557346[_0x458163(0xda)]],[_0x458163(0xec),_0x557346['dbName']],[_0x458163(0xeb),_0x557346[_0x458163(0xeb)]],[_0x458163(0xfa),_0x557346[_0x458163(0xfa)]],[_0x458163(0xea),_0x557346[_0x458163(0xea)]]];if(_0x31ab28==='mybatisXml')return _0x4306df[_0x458163(0xd8)](([,_0x1fcc93])=>_0x1fcc93!==undefined&&_0x1fcc93!==null&&String(_0x1fcc93)[_0x458163(0xf8)]()!=='')[_0x458163(0xfe)](([_0x5a2544,_0x21ca2a])=>_0x458163(0xde)+_0x5a2544+':\x20'+String(_0x21ca2a)+'\x20-->');return _0x4306df[_0x458163(0xd8)](([,_0x599f8b])=>_0x599f8b!==undefined&&_0x599f8b!==null&&String(_0x599f8b)['trim']()!=='')[_0x458163(0xfe)](([_0x2d5d45,_0x4b60bc])=>'--\x20@lovrabet.'+_0x2d5d45+':\x20'+String(_0x4b60bc));}
@@ -1 +1 @@
1
- const a218_0x296826=a218_0x18f0;function a218_0x5ad0(){const _0x150e79=['3ixsRpu','totalCount','status','\x20unchanged','boolean','read','tableData','233525UlXeAE','has','5576536VsVfPX','paging','appCode','path','push','1511550FjKsqn','sqls','sqlName','10308ZIqrvn','hash','length','910gPUIuz','lockFilePath','lockKey','812392dNmpAU','sql','\x20added,\x20','map','10230390rMcTnb','\x20missing,\x20','517606aSKSvr','All\x20SQL\x20queries\x20are\x20in\x20sync.','\x20remote-only','bool','Check\x20local\x20SQL\x20sync\x20status\x20against\x20lock\x20file'];a218_0x5ad0=function(){return _0x150e79;};return a218_0x5ad0();}function a218_0x18f0(_0x50a12d,_0x397ea9){_0x50a12d=_0x50a12d-0x1cd;const _0x5ad062=a218_0x5ad0();let _0x18f08f=_0x5ad062[_0x50a12d];return _0x18f08f;}(function(_0x4c476e,_0x25b551){const _0x1a04e8=a218_0x18f0,_0x373473=_0x4c476e();while(!![]){try{const _0x3d94ae=parseInt(_0x1a04e8(0x1de))/0x1*(parseInt(_0x1a04e8(0x1d9))/0x2)+parseInt(_0x1a04e8(0x1ec))/0x3+-parseInt(_0x1a04e8(0x1d3))/0x4+parseInt(_0x1a04e8(0x1e5))/0x5+parseInt(_0x1a04e8(0x1cd))/0x6*(-parseInt(_0x1a04e8(0x1d0))/0x7)+parseInt(_0x1a04e8(0x1e7))/0x8+-parseInt(_0x1a04e8(0x1d7))/0x9;if(_0x3d94ae===_0x25b551)break;else _0x373473['push'](_0x373473['shift']());}catch(_0x3bd9ac){_0x373473['push'](_0x373473['shift']());}}}(a218_0x5ad0,0x70853));import{listSqlQueries}from'../../core/api-client.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';import{scanLocalSqlQueries}from'../../core/sql-sync/file-system.js';import{computeSqlFileHash}from'../../core/sql-sync/hash.js';import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile}from'../../core/sql-sync/lock.js';const PAGE_SIZE=0x64;async function fetchAllSqlCodes(_0x2f45d0){const _0x17654e=a218_0x18f0,_0x21ecff=[];let _0x3cef67=0x1;while(!![]){const _0xb93f36=await listSqlQueries(_0x2f45d0,{'currentPage':_0x3cef67,'pageSize':PAGE_SIZE}),_0x5dd665=_0xb93f36[_0x17654e(0x1e4)]??[];_0x21ecff[_0x17654e(0x1eb)](..._0x5dd665[_0x17654e(0x1d6)](_0x3d5595=>_0x3d5595['sqlCode']));if(_0x5dd665['length']===0x0)break;const _0x4bccd7=_0xb93f36[_0x17654e(0x1e8)]?.[_0x17654e(0x1df)];if(_0x4bccd7!=null?_0x21ecff[_0x17654e(0x1cf)]>=_0x4bccd7:_0x5dd665[_0x17654e(0x1cf)]<PAGE_SIZE)break;_0x3cef67++;}return _0x21ecff;}export const sqlStatus={'service':a218_0x296826(0x1d4),'command':a218_0x296826(0x1e0),'description':a218_0x296826(0x1dd),'risk':a218_0x296826(0x1e3),'flags':[{'name':'remote','type':a218_0x296826(0x1e2),'description':'Also\x20check\x20for\x20remote-only\x20SQL\x20queries\x20not\x20present\x20locally'}],async 'execute'(_0x48559c){const _0x1a4e9c=a218_0x296826,_0x49bc8e=loadSqlProjectConfig(_0x48559c[_0x1a4e9c(0x1e9)]),_0x471827=await readSqlLockFile(_0x49bc8e[_0x1a4e9c(0x1d1)]),{appLock:_0x11ed0f}=ensureSqlLockScope(_0x471827??createEmptySqlLock(),_0x49bc8e[_0x1a4e9c(0x1e9)],_0x49bc8e['sqlRoot'],_0x1a4e9c(0x1e0)),_0x33bbae=await scanLocalSqlQueries(_0x49bc8e),_0x51d42b=[],_0x4bd402=[],_0x4377ba=[],_0x454fc5=[],_0x618f5c=new Set(_0x33bbae[_0x1a4e9c(0x1d6)](_0x1b8a18=>_0x1b8a18[_0x1a4e9c(0x1d2)]));for(const _0x3a011f of _0x33bbae){const _0x53da18=await computeSqlFileHash(_0x3a011f['filePath']),_0x224532=_0x11ed0f[_0x1a4e9c(0x1ed)][_0x3a011f['lockKey']],_0x6a49fb=!!_0x224532&&_0x224532[_0x1a4e9c(0x1ea)]!==_0x3a011f['relativePath'],_0x37bc85=!!_0x224532&&!!_0x3a011f['sqlName']&&_0x224532[_0x1a4e9c(0x1ee)]!==_0x3a011f[_0x1a4e9c(0x1ee)];if(!_0x224532)_0x51d42b[_0x1a4e9c(0x1eb)](_0x3a011f[_0x1a4e9c(0x1d2)]);else _0x224532[_0x1a4e9c(0x1ce)]!==_0x53da18||_0x6a49fb||_0x37bc85?_0x4bd402[_0x1a4e9c(0x1eb)](_0x3a011f[_0x1a4e9c(0x1d2)]):_0x4377ba[_0x1a4e9c(0x1eb)](_0x3a011f[_0x1a4e9c(0x1d2)]);}for(const _0x3d04a0 of Object['keys'](_0x11ed0f['sqls'])){!_0x618f5c[_0x1a4e9c(0x1e6)](_0x3d04a0)&&_0x454fc5[_0x1a4e9c(0x1eb)](_0x3d04a0);}const _0x456bde=[];if(_0x48559c[_0x1a4e9c(0x1dc)]('remote')){const _0x3cef46=await fetchAllSqlCodes(_0x48559c[_0x1a4e9c(0x1e9)]);for(const _0x14e735 of _0x3cef46){!_0x618f5c[_0x1a4e9c(0x1e6)](_0x14e735)&&!_0x11ed0f[_0x1a4e9c(0x1ed)][_0x14e735]&&_0x456bde[_0x1a4e9c(0x1eb)](_0x14e735);}}const _0x27e1db=_0x51d42b[_0x1a4e9c(0x1cf)]===0x0&&_0x4bd402[_0x1a4e9c(0x1cf)]===0x0&&_0x454fc5[_0x1a4e9c(0x1cf)]===0x0&&_0x456bde[_0x1a4e9c(0x1cf)]===0x0;return{'ok':!![],'data':{'added':_0x51d42b,'modified':_0x4bd402,'missing':_0x454fc5,'unchanged':_0x4377ba,'remoteOnly':_0x456bde},'message':_0x27e1db?_0x1a4e9c(0x1da):_0x51d42b[_0x1a4e9c(0x1cf)]+_0x1a4e9c(0x1d5)+_0x4bd402[_0x1a4e9c(0x1cf)]+'\x20modified,\x20'+_0x454fc5[_0x1a4e9c(0x1cf)]+_0x1a4e9c(0x1d8)+_0x4377ba[_0x1a4e9c(0x1cf)]+_0x1a4e9c(0x1e1)+(_0x456bde[_0x1a4e9c(0x1cf)]>0x0?',\x20'+_0x456bde['length']+_0x1a4e9c(0x1db):'')};}};
1
+ const a218_0x3a7907=a218_0x2f4f;function a218_0x2f4f(_0x5c9ade,_0x34dcf2){_0x5c9ade=_0x5c9ade-0x8b;const _0x421f8a=a218_0x421f();let _0x2f4f5b=_0x421f8a[_0x5c9ade];return _0x2f4f5b;}(function(_0x380a60,_0x2c6ff4){const _0xf152b3=a218_0x2f4f,_0x6855a6=_0x380a60();while(!![]){try{const _0x28e15f=-parseInt(_0xf152b3(0xa2))/0x1*(parseInt(_0xf152b3(0x9e))/0x2)+parseInt(_0xf152b3(0x9c))/0x3*(-parseInt(_0xf152b3(0x8d))/0x4)+-parseInt(_0xf152b3(0x92))/0x5*(-parseInt(_0xf152b3(0x8c))/0x6)+parseInt(_0xf152b3(0xb2))/0x7+-parseInt(_0xf152b3(0xa5))/0x8+parseInt(_0xf152b3(0x90))/0x9+-parseInt(_0xf152b3(0x9a))/0xa*(parseInt(_0xf152b3(0x9f))/0xb);if(_0x28e15f===_0x2c6ff4)break;else _0x6855a6['push'](_0x6855a6['shift']());}catch(_0x49c01d){_0x6855a6['push'](_0x6855a6['shift']());}}}(a218_0x421f,0xb3c10));import{listSqlQueries}from'../../core/api-client.js';import{loadSqlProjectConfig}from'../../core/sql-sync/config.js';import{scanLocalSqlQueries}from'../../core/sql-sync/file-system.js';import{computeSqlFileHash}from'../../core/sql-sync/hash.js';import{createEmptySqlLock,ensureSqlLockScope,readSqlLockFile}from'../../core/sql-sync/lock.js';const PAGE_SIZE=0x64;async function fetchAllSqlCodes(_0x327149){const _0x328fdf=a218_0x2f4f,_0x6467f6=[];let _0x1c6864=0x1;while(!![]){const _0x5c83be=await listSqlQueries(_0x327149,{'currentPage':_0x1c6864,'pageSize':PAGE_SIZE}),_0x5d1ffe=_0x5c83be[_0x328fdf(0x8f)]??[];_0x6467f6['push'](..._0x5d1ffe[_0x328fdf(0x8b)](_0x2e0a73=>_0x2e0a73[_0x328fdf(0xac)]));if(_0x5d1ffe['length']===0x0)break;const _0x481cad=_0x5c83be[_0x328fdf(0xa0)]?.[_0x328fdf(0xa4)];if(_0x481cad!=null?_0x6467f6['length']>=_0x481cad:_0x5d1ffe['length']<PAGE_SIZE)break;_0x1c6864++;}return _0x6467f6;}function a218_0x421f(){const _0x4121c6=['paging','lockKey','1652aSAqVe','\x20unchanged','totalCount','2094984NryPvl','relativePath','push','sqlName','status','length','has','sqlCode','appCode','lockFilePath','filePath','All\x20SQL\x20queries\x20are\x20in\x20sync.','\x20remote-only','4088441nvJBkz','map','7202694vcNhXr','14908RvONzy','\x20modified,\x20','tableData','9757089usXTgN','path','5mUxagQ','remote','keys','sqls','hash','sqlRoot','\x20added,\x20','\x20missing,\x20','94450ZhMjBm','bool','801pGcIYE','Check\x20local\x20SQL\x20sync\x20status\x20against\x20lock\x20file','934ADYcpN','121rDuRXc'];a218_0x421f=function(){return _0x4121c6;};return a218_0x421f();}export const sqlStatus={'service':'sql','command':a218_0x3a7907(0xa9),'description':a218_0x3a7907(0x9d),'risk':'read','flags':[{'name':'remote','type':'boolean','description':'Also\x20check\x20for\x20remote-only\x20SQL\x20queries\x20not\x20present\x20locally'}],async 'execute'(_0xe60182){const _0x419471=a218_0x3a7907,_0xd21796=loadSqlProjectConfig(_0xe60182[_0x419471(0xad)]),_0x25547c=await readSqlLockFile(_0xd21796[_0x419471(0xae)]),{appLock:_0xb40734}=ensureSqlLockScope(_0x25547c??createEmptySqlLock(),_0xd21796[_0x419471(0xad)],_0xd21796[_0x419471(0x97)],_0x419471(0xa9)),_0x1c74a9=await scanLocalSqlQueries(_0xd21796),_0xb733d5=[],_0x584de5=[],_0x2c89af=[],_0x421bf0=[],_0x392999=new Set(_0x1c74a9[_0x419471(0x8b)](_0x238ce9=>_0x238ce9[_0x419471(0xa1)]));for(const _0xe8e75b of _0x1c74a9){const _0x3e5990=await computeSqlFileHash(_0xe8e75b[_0x419471(0xaf)]),_0x26cf77=_0xb40734[_0x419471(0x95)][_0xe8e75b[_0x419471(0xa1)]],_0x255789=!!_0x26cf77&&_0x26cf77[_0x419471(0x91)]!==_0xe8e75b[_0x419471(0xa6)],_0x50bdd3=!!_0x26cf77&&!!_0xe8e75b['sqlName']&&_0x26cf77[_0x419471(0xa8)]!==_0xe8e75b['sqlName'];if(!_0x26cf77)_0xb733d5[_0x419471(0xa7)](_0xe8e75b[_0x419471(0xa1)]);else _0x26cf77[_0x419471(0x96)]!==_0x3e5990||_0x255789||_0x50bdd3?_0x584de5[_0x419471(0xa7)](_0xe8e75b[_0x419471(0xa1)]):_0x2c89af[_0x419471(0xa7)](_0xe8e75b[_0x419471(0xa1)]);}for(const _0x2154b3 of Object[_0x419471(0x94)](_0xb40734[_0x419471(0x95)])){!_0x392999[_0x419471(0xab)](_0x2154b3)&&_0x421bf0[_0x419471(0xa7)](_0x2154b3);}const _0x5bb0de=[];if(_0xe60182[_0x419471(0x9b)](_0x419471(0x93))){const _0x43f323=await fetchAllSqlCodes(_0xe60182[_0x419471(0xad)]);for(const _0x4870c5 of _0x43f323){!_0x392999[_0x419471(0xab)](_0x4870c5)&&!_0xb40734['sqls'][_0x4870c5]&&_0x5bb0de[_0x419471(0xa7)](_0x4870c5);}}const _0x219acd=_0xb733d5[_0x419471(0xaa)]===0x0&&_0x584de5[_0x419471(0xaa)]===0x0&&_0x421bf0['length']===0x0&&_0x5bb0de[_0x419471(0xaa)]===0x0;return{'ok':!![],'data':{'added':_0xb733d5,'modified':_0x584de5,'missing':_0x421bf0,'unchanged':_0x2c89af,'remoteOnly':_0x5bb0de},'message':_0x219acd?_0x419471(0xb0):_0xb733d5[_0x419471(0xaa)]+_0x419471(0x98)+_0x584de5['length']+_0x419471(0x8e)+_0x421bf0[_0x419471(0xaa)]+_0x419471(0x99)+_0x2c89af[_0x419471(0xaa)]+_0x419471(0xa3)+(_0x5bb0de[_0x419471(0xaa)]>0x0?',\x20'+_0x5bb0de[_0x419471(0xaa)]+_0x419471(0xb1):'')};}};
@@ -1 +1 @@
1
- function a219_0x7538(){const _0x31e208=['Provide\x20--file\x20or\x20--sql','utf-8','trim','toLowerCase','read','sql','2uiAJkp','pkField','push','836202YtdfCj','\x22\x20not\x20found\x20or\x20not\x20accessible','schemas','dataset','index_columns','flatMap','get','1200OOsmdL','dbtableConfig','isDangerous','map','cwd','length','name','reason','schemaWarnings','string','tableName','Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)','indexes','isSelectOnly','Dataset\x20\x22','appCode','primary','size','str','Path\x20to\x20the\x20SQL\x20file\x20to\x20validate','file','isArray','columnNames','130932XXzpbI','167354mopRXi','bool','joinAudit','find','576705yzZYKq','flagMissing','SQL\x20schema\x20validation','--check-indexes\x20requires\x20--schemas.','1176570VAWVPP','from','filter','check-indexes','index_type','File\x20not\x20found:\x20','sqlType','columns','type','validation','parameters','4479587ngzFQq','tables','message','3228360ELRPbK','split','Audit\x20top-level\x20JOIN\x20equality\x20predicates\x20against\x20dataset\x20index\x20metadata'];a219_0x7538=function(){return _0x31e208;};return a219_0x7538();}function a219_0x3249(_0x36407d,_0x2d9515){_0x36407d=_0x36407d-0x9b;const _0x75387=a219_0x7538();let _0x3249d5=_0x75387[_0x36407d];return _0x3249d5;}const a219_0x51d7f7=a219_0x3249;(function(_0x3841dc,_0x42ea79){const _0x5cb61e=a219_0x3249,_0x51ea41=_0x3841dc();while(!![]){try{const _0x215a01=-parseInt(_0x5cb61e(0xae))/0x1*(parseInt(_0x5cb61e(0xd0))/0x2)+-parseInt(_0x5cb61e(0xd8))/0x3+-parseInt(_0x5cb61e(0xa5))/0x4+parseInt(_0x5cb61e(0xd4))/0x5+parseInt(_0x5cb61e(0xb1))/0x6+-parseInt(_0x5cb61e(0xa2))/0x7+parseInt(_0x5cb61e(0xb8))/0x8*(parseInt(_0x5cb61e(0xcf))/0x9);if(_0x215a01===_0x42ea79)break;else _0x51ea41['push'](_0x51ea41['shift']());}catch(_0xbd24b5){_0x51ea41['push'](_0x51ea41['shift']());}}}(a219_0x7538,0x690fd));import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';import{validateSql}from'../../core/sql-validator.js';import{auditSqlJoinIndexes}from'../../core/sql-index-auditor.js';import{getDatasetDetail,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{assertDatasetIsDbTableBacked,filterDbTableBackedDatasets}from'../../commands/dataset/capability.js';export const sqlValidate={'service':'sql','command':'validate','description':a219_0x51d7f7(0xc3),'risk':a219_0x51d7f7(0xac),'flags':[{'name':a219_0x51d7f7(0xcc),'type':a219_0x51d7f7(0xc1),'description':a219_0x51d7f7(0xcb)},{'name':a219_0x51d7f7(0xad),'type':a219_0x51d7f7(0xc1),'description':'Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)'},{'name':a219_0x51d7f7(0xb3),'type':a219_0x51d7f7(0xc1),'description':'Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against'},{'name':'check-indexes','type':'boolean','description':a219_0x51d7f7(0xa7)}],async 'execute'(_0x40194e){const _0x3870d9=a219_0x51d7f7,_0x4ab81e=_0x40194e[_0x3870d9(0xca)](_0x3870d9(0xcc)),_0x4e1a55=_0x40194e[_0x3870d9(0xca)](_0x3870d9(0xad)),_0x5d80fc=_0x40194e[_0x3870d9(0xca)](_0x3870d9(0xb3)),_0x4a06f3=_0x40194e[_0x3870d9(0xd1)](_0x3870d9(0xdb));if(!_0x4ab81e&&!_0x4e1a55)throw CliErrors[_0x3870d9(0xd5)]('file',_0x3870d9(0xa8));if(_0x4a06f3&&!_0x5d80fc)throw CliErrors['validation'](_0x3870d9(0xd7));let _0xfe84af;if(_0x4ab81e){const _0x345482=resolve(process[_0x3870d9(0xbc)](),_0x4ab81e);if(!existsSync(_0x345482))throw CliErrors[_0x3870d9(0xa0)](_0x3870d9(0x9c)+_0x345482);_0xfe84af=readFileSync(_0x345482,_0x3870d9(0xa9));}else _0xfe84af=_0x4e1a55;const _0x218677=validateSql(_0xfe84af),_0x361a66={'valid':_0x218677['valid'],'sqlType':_0x218677[_0x3870d9(0x9d)][_0x3870d9(0x9f)],'isSelectOnly':_0x218677[_0x3870d9(0x9d)][_0x3870d9(0xc5)],'isDangerous':_0x218677[_0x3870d9(0x9d)][_0x3870d9(0xba)],'tables':_0x218677[_0x3870d9(0xa3)],'parameters':_0x218677[_0x3870d9(0xa1)],'message':_0x218677[_0x3870d9(0xa4)]};_0x218677[_0x3870d9(0x9d)][_0x3870d9(0xbf)]&&(_0x361a66[_0x3870d9(0xbf)]=_0x218677['sqlType'][_0x3870d9(0xbf)]);if(_0x5d80fc&&_0x218677['valid']){const _0x5f0d7c=_0x5d80fc[_0x3870d9(0xa6)](',')[_0x3870d9(0xbb)](_0x33d09f=>_0x33d09f[_0x3870d9(0xaa)]())['filter'](Boolean),_0x1b7ae3=[],_0x1388dc=[],_0x984e2d=filterDbTableBackedDatasets(await listDatasets(_0x40194e[_0x3870d9(0xc7)])),_0xca91ff=new Map(_0x984e2d[_0x3870d9(0xbb)](_0x13e741=>[_0x13e741[_0x3870d9(0xb9)]?.[_0x3870d9(0xc2)]?.[_0x3870d9(0xab)](),_0x13e741]));for(const _0x37d9fe of _0x218677[_0x3870d9(0xa3)]){const _0x54b753=_0xca91ff[_0x3870d9(0xb7)](_0x37d9fe[_0x3870d9(0xab)]());!_0x54b753&&_0x1b7ae3[_0x3870d9(0xb0)]('Table\x20\x22'+_0x37d9fe+'\x22\x20not\x20found\x20in\x20any\x20dataset');}for(const _0x1670fc of _0x5f0d7c){let _0x47cfca;try{_0x47cfca=await getDatasetDetail(_0x1670fc);}catch{_0x1b7ae3[_0x3870d9(0xb0)](_0x3870d9(0xc6)+_0x1670fc+_0x3870d9(0xb2));continue;}assertDatasetIsDbTableBacked(_0x47cfca,_0x3870d9(0xd6));const _0x3e5546=Array[_0x3870d9(0xcd)](_0x47cfca['fields'])?_0x47cfca['fields']:[],_0x46f5f1=new Set(_0x3e5546['map'](_0x534139=>_0x534139[_0x3870d9(0xbe)]?.[_0x3870d9(0xab)]())),_0x47bab3=_0x47cfca[_0x3870d9(0xb9)]?.['tableName']||_0x47cfca['tableName']||_0x1670fc;_0x361a66['schema:'+_0x47bab3]={'code':_0x1670fc,'tableName':_0x47bab3,'fieldCount':_0x46f5f1[_0x3870d9(0xc9)],'fields':Array[_0x3870d9(0xd9)](_0x46f5f1)};if(_0x4a06f3){const _0x9ad2bd=normalizeDatasetIndexes(_0x47cfca);_0x1388dc['push']({'tableName':_0x47bab3,..._0x9ad2bd});}}_0x1b7ae3[_0x3870d9(0xbd)]>0x0&&(_0x361a66[_0x3870d9(0xc0)]=_0x1b7ae3),_0x4a06f3&&(_0x361a66[_0x3870d9(0xd2)]=auditSqlJoinIndexes(_0xfe84af,_0x1388dc));}return{'ok':_0x218677['valid'],'data':_0x361a66,'message':_0x218677[_0x3870d9(0xa4)]};}};function normalizeDatasetIndexes(_0x590e23){const _0x4b8ac4=a219_0x51d7f7,_0x51d12b=Array[_0x4b8ac4(0xcd)](_0x590e23?.['dataset']?.[_0x4b8ac4(0xc4)])?_0x590e23[_0x4b8ac4(0xb4)]['indexes']:Array[_0x4b8ac4(0xcd)](_0x590e23?.[_0x4b8ac4(0xc4)])?_0x590e23[_0x4b8ac4(0xc4)]:[],_0x1197b9=_0x51d12b[_0x4b8ac4(0xb6)](_0x1b8c1d=>{const _0x1873ec=_0x4b8ac4,_0x1a4d76=Array[_0x1873ec(0xcd)](_0x1b8c1d?.[_0x1873ec(0xb5)])?_0x1b8c1d[_0x1873ec(0xb5)]:Array[_0x1873ec(0xcd)](_0x1b8c1d?.[_0x1873ec(0xce)])?_0x1b8c1d[_0x1873ec(0xce)]:Array[_0x1873ec(0xcd)](_0x1b8c1d?.[_0x1873ec(0x9e)])?_0x1b8c1d[_0x1873ec(0x9e)]:[],_0x18eee3=_0x1a4d76[_0x1873ec(0xda)](_0x2357cb=>typeof _0x2357cb==='string')['map'](_0x25caaa=>_0x25caaa[_0x1873ec(0xaa)]())[_0x1873ec(0xda)](Boolean);if(_0x18eee3[_0x1873ec(0xbd)]===0x0)return[];const _0x5879df=[_0x1b8c1d?.['indexName'],_0x1b8c1d?.['index_name'],_0x1b8c1d?.[_0x1873ec(0xbe)]][_0x1873ec(0xd3)](_0x2866da=>typeof _0x2866da===_0x1873ec(0xc1)&&_0x2866da[_0x1873ec(0xaa)]()),_0x4035b9=[_0x1b8c1d?.[_0x1873ec(0x9b)],_0x1b8c1d?.[_0x1873ec(0x9f)]]['find'](_0xeb891c=>typeof _0xeb891c===_0x1873ec(0xc1)&&_0xeb891c['trim']());return[{..._0x5879df?{'name':_0x5879df[_0x1873ec(0xaa)]()}:{},..._0x4035b9?{'type':_0x4035b9[_0x1873ec(0xaa)]()}:{},'columns':_0x18eee3}];}),_0x530df5=[..._0x1197b9],_0x1f7d43=typeof _0x590e23?.[_0x4b8ac4(0xb9)]?.[_0x4b8ac4(0xaf)]===_0x4b8ac4(0xc1)?_0x590e23[_0x4b8ac4(0xb9)]['pkField'][_0x4b8ac4(0xa6)](',')[_0x4b8ac4(0xbb)](_0x1ec925=>_0x1ec925[_0x4b8ac4(0xaa)]())[_0x4b8ac4(0xda)](Boolean):[];return _0x1f7d43[_0x4b8ac4(0xbd)]>0x0&&_0x530df5['unshift']({'type':_0x4b8ac4(0xc8),'columns':_0x1f7d43}),{'indexes':_0x530df5,'metadataAvailable':_0x1197b9[_0x4b8ac4(0xbd)]>0x0};}
1
+ const a219_0x18708a=a219_0x1532;(function(_0x25dc9e,_0x5e7d8c){const _0x359ecd=a219_0x1532,_0x5c1ffe=_0x25dc9e();while(!![]){try{const _0x3dc493=-parseInt(_0x359ecd(0xbf))/0x1+parseInt(_0x359ecd(0x94))/0x2+parseInt(_0x359ecd(0xa8))/0x3+-parseInt(_0x359ecd(0xad))/0x4+-parseInt(_0x359ecd(0xa4))/0x5+parseInt(_0x359ecd(0xc0))/0x6*(parseInt(_0x359ecd(0xaf))/0x7)+parseInt(_0x359ecd(0xaa))/0x8;if(_0x3dc493===_0x5e7d8c)break;else _0x5c1ffe['push'](_0x5c1ffe['shift']());}catch(_0xa672d){_0x5c1ffe['push'](_0x5c1ffe['shift']());}}}(a219_0x4d9a,0x595be));function a219_0x1532(_0x408f26,_0x56bf5f){_0x408f26=_0x408f26-0x83;const _0x4d9a3e=a219_0x4d9a();let _0x1532e0=_0x4d9a3e[_0x408f26];return _0x1532e0;}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 a219_0x4d9a(){const _0x6cabb=['indexName','3978600grglTE','Table\x20\x22','File\x20not\x20found:\x20','1588268mUeuzr','sql','2289007wVWxVS','columnNames','flagMissing','length','type','schemas','\x22\x20not\x20found\x20in\x20any\x20dataset','read','appCode','push','split','tables','utf-8','check-indexes','--check-indexes\x20requires\x20--schemas.','Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against','185204kjvVky','6GXSCQY','bool','cwd','pkField','dataset','SQL\x20schema\x20validation','unshift','flatMap','tableName','reason','primary','Path\x20to\x20the\x20SQL\x20file\x20to\x20validate','schemaWarnings','sqlType','map','isArray','parameters','find','filter','columns','isDangerous','valid','285420ZjOvrr','validate','get','fields','from','index_name','Dataset\x20\x22','message','trim','str','toLowerCase','dbtableConfig','file','Audit\x20top-level\x20JOIN\x20equality\x20predicates\x20against\x20dataset\x20index\x20metadata','string','index_type','1325765DXXdll','indexes','Provide\x20--file\x20or\x20--sql','index_columns','739206AUfNzV'];a219_0x4d9a=function(){return _0x6cabb;};return a219_0x4d9a();}import{CliErrors}from'../../errors.js';import{assertDatasetIsDbTableBacked,filterDbTableBackedDatasets}from'../../commands/dataset/capability.js';export const sqlValidate={'service':a219_0x18708a(0xae),'command':a219_0x18708a(0x95),'description':'Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)','risk':a219_0x18708a(0xb6),'flags':[{'name':a219_0x18708a(0xa0),'type':'string','description':a219_0x18708a(0x89)},{'name':'sql','type':a219_0x18708a(0xa2),'description':'Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)'},{'name':a219_0x18708a(0xb4),'type':a219_0x18708a(0xa2),'description':a219_0x18708a(0xbe)},{'name':'check-indexes','type':'boolean','description':a219_0x18708a(0xa1)}],async 'execute'(_0x254779){const _0x15ad0d=a219_0x18708a,_0x499ed8=_0x254779['str'](_0x15ad0d(0xa0)),_0x3567c2=_0x254779[_0x15ad0d(0x9d)](_0x15ad0d(0xae)),_0x2ce6bf=_0x254779[_0x15ad0d(0x9d)](_0x15ad0d(0xb4)),_0x25a71c=_0x254779[_0x15ad0d(0xc1)](_0x15ad0d(0xbc));if(!_0x499ed8&&!_0x3567c2)throw CliErrors[_0x15ad0d(0xb1)](_0x15ad0d(0xa0),_0x15ad0d(0xa6));if(_0x25a71c&&!_0x2ce6bf)throw CliErrors['validation'](_0x15ad0d(0xbd));let _0x1d822d;if(_0x499ed8){const _0x419705=resolve(process[_0x15ad0d(0xc2)](),_0x499ed8);if(!existsSync(_0x419705))throw CliErrors['validation'](_0x15ad0d(0xac)+_0x419705);_0x1d822d=readFileSync(_0x419705,_0x15ad0d(0xbb));}else _0x1d822d=_0x3567c2;const _0xf33aa4=validateSql(_0x1d822d),_0x52557d={'valid':_0xf33aa4['valid'],'sqlType':_0xf33aa4[_0x15ad0d(0x8b)][_0x15ad0d(0xb3)],'isSelectOnly':_0xf33aa4[_0x15ad0d(0x8b)]['isSelectOnly'],'isDangerous':_0xf33aa4[_0x15ad0d(0x8b)][_0x15ad0d(0x92)],'tables':_0xf33aa4[_0x15ad0d(0xba)],'parameters':_0xf33aa4[_0x15ad0d(0x8e)],'message':_0xf33aa4[_0x15ad0d(0x9b)]};_0xf33aa4['sqlType'][_0x15ad0d(0x87)]&&(_0x52557d[_0x15ad0d(0x87)]=_0xf33aa4[_0x15ad0d(0x8b)][_0x15ad0d(0x87)]);if(_0x2ce6bf&&_0xf33aa4[_0x15ad0d(0x93)]){const _0x34ba1d=_0x2ce6bf['split'](',')['map'](_0x408647=>_0x408647['trim']())[_0x15ad0d(0x90)](Boolean),_0x2e331a=[],_0x3db5ac=[],_0x4ace2d=filterDbTableBackedDatasets(await listDatasets(_0x254779[_0x15ad0d(0xb7)])),_0x52da43=new Map(_0x4ace2d['map'](_0x813760=>[_0x813760[_0x15ad0d(0x9f)]?.[_0x15ad0d(0x86)]?.[_0x15ad0d(0x9e)](),_0x813760]));for(const _0x2860a2 of _0xf33aa4[_0x15ad0d(0xba)]){const _0x584439=_0x52da43[_0x15ad0d(0x96)](_0x2860a2['toLowerCase']());!_0x584439&&_0x2e331a[_0x15ad0d(0xb8)](_0x15ad0d(0xab)+_0x2860a2+_0x15ad0d(0xb5));}for(const _0x31e3f4 of _0x34ba1d){let _0x23f6c8;try{_0x23f6c8=await getDatasetDetail(_0x31e3f4);}catch{_0x2e331a['push'](_0x15ad0d(0x9a)+_0x31e3f4+'\x22\x20not\x20found\x20or\x20not\x20accessible');continue;}assertDatasetIsDbTableBacked(_0x23f6c8,_0x15ad0d(0x83));const _0x11244b=Array[_0x15ad0d(0x8d)](_0x23f6c8[_0x15ad0d(0x97)])?_0x23f6c8[_0x15ad0d(0x97)]:[],_0x4c1759=new Set(_0x11244b[_0x15ad0d(0x8c)](_0x27d23f=>_0x27d23f['name']?.['toLowerCase']())),_0x40fbf4=_0x23f6c8[_0x15ad0d(0x9f)]?.[_0x15ad0d(0x86)]||_0x23f6c8[_0x15ad0d(0x86)]||_0x31e3f4;_0x52557d['schema:'+_0x40fbf4]={'code':_0x31e3f4,'tableName':_0x40fbf4,'fieldCount':_0x4c1759['size'],'fields':Array[_0x15ad0d(0x98)](_0x4c1759)};if(_0x25a71c){const _0x8e891=normalizeDatasetIndexes(_0x23f6c8);_0x3db5ac[_0x15ad0d(0xb8)]({'tableName':_0x40fbf4,..._0x8e891});}}_0x2e331a[_0x15ad0d(0xb2)]>0x0&&(_0x52557d[_0x15ad0d(0x8a)]=_0x2e331a),_0x25a71c&&(_0x52557d['joinAudit']=auditSqlJoinIndexes(_0x1d822d,_0x3db5ac));}return{'ok':_0xf33aa4[_0x15ad0d(0x93)],'data':_0x52557d,'message':_0xf33aa4[_0x15ad0d(0x9b)]};}};function normalizeDatasetIndexes(_0x3ae6b6){const _0x47538d=a219_0x18708a,_0x43fbd5=Array[_0x47538d(0x8d)](_0x3ae6b6?.[_0x47538d(0xc4)]?.[_0x47538d(0xa5)])?_0x3ae6b6[_0x47538d(0xc4)][_0x47538d(0xa5)]:Array[_0x47538d(0x8d)](_0x3ae6b6?.['indexes'])?_0x3ae6b6[_0x47538d(0xa5)]:[],_0x1dd3a7=_0x43fbd5[_0x47538d(0x85)](_0x25f50c=>{const _0x41978d=_0x47538d,_0x535641=Array[_0x41978d(0x8d)](_0x25f50c?.[_0x41978d(0xa7)])?_0x25f50c[_0x41978d(0xa7)]:Array['isArray'](_0x25f50c?.[_0x41978d(0xb0)])?_0x25f50c[_0x41978d(0xb0)]:Array['isArray'](_0x25f50c?.[_0x41978d(0x91)])?_0x25f50c[_0x41978d(0x91)]:[],_0x37fdb0=_0x535641[_0x41978d(0x90)](_0x13addf=>typeof _0x13addf===_0x41978d(0xa2))[_0x41978d(0x8c)](_0x3a3b82=>_0x3a3b82[_0x41978d(0x9c)]())['filter'](Boolean);if(_0x37fdb0[_0x41978d(0xb2)]===0x0)return[];const _0x55a8fb=[_0x25f50c?.[_0x41978d(0xa9)],_0x25f50c?.[_0x41978d(0x99)],_0x25f50c?.['name']][_0x41978d(0x8f)](_0x51cdd1=>typeof _0x51cdd1===_0x41978d(0xa2)&&_0x51cdd1['trim']()),_0x5f425d=[_0x25f50c?.[_0x41978d(0xa3)],_0x25f50c?.[_0x41978d(0xb3)]][_0x41978d(0x8f)](_0x3a946a=>typeof _0x3a946a==='string'&&_0x3a946a['trim']());return[{..._0x55a8fb?{'name':_0x55a8fb[_0x41978d(0x9c)]()}:{},..._0x5f425d?{'type':_0x5f425d[_0x41978d(0x9c)]()}:{},'columns':_0x37fdb0}];}),_0x3d6bdd=[..._0x1dd3a7],_0x2aa8ad=typeof _0x3ae6b6?.[_0x47538d(0x9f)]?.['pkField']===_0x47538d(0xa2)?_0x3ae6b6[_0x47538d(0x9f)][_0x47538d(0xc3)][_0x47538d(0xb9)](',')[_0x47538d(0x8c)](_0x21bcd0=>_0x21bcd0[_0x47538d(0x9c)]())[_0x47538d(0x90)](Boolean):[];return _0x2aa8ad[_0x47538d(0xb2)]>0x0&&_0x3d6bdd[_0x47538d(0x84)]({'type':_0x47538d(0x88),'columns':_0x2aa8ad}),{'indexes':_0x3d6bdd,'metadataAvailable':_0x1dd3a7[_0x47538d(0xb2)]>0x0};}
@@ -1 +1 @@
1
- function a220_0x33dd(_0x42f53d,_0xd4a873){_0x42f53d=_0x42f53d-0xa0;const _0x68f3e9=a220_0x68f3();let _0x33ddca=_0x68f3e9[_0x42f53d];return _0x33ddca;}(function(_0x581520,_0x1b57a9){const _0x36ea39=a220_0x33dd,_0x596f86=_0x581520();while(!![]){try{const _0x2c686a=parseInt(_0x36ea39(0xa7))/0x1+parseInt(_0x36ea39(0xa6))/0x2+-parseInt(_0x36ea39(0xa5))/0x3*(parseInt(_0x36ea39(0xa3))/0x4)+parseInt(_0x36ea39(0xa2))/0x5+-parseInt(_0x36ea39(0xa4))/0x6+-parseInt(_0x36ea39(0xa1))/0x7+-parseInt(_0x36ea39(0xa0))/0x8*(-parseInt(_0x36ea39(0xa8))/0x9);if(_0x2c686a===_0x1b57a9)break;else _0x596f86['push'](_0x596f86['shift']());}catch(_0xa1d838){_0x596f86['push'](_0x596f86['shift']());}}}(a220_0x68f3,0xe9ce8));import{taskStatus}from'../../commands/task/status.js';export const taskDefinitions=[taskStatus];function a220_0x68f3(){const _0xea36d3=['4556316Flyxys','602061sIkodo','2697852yauTNO','617964DLxkAV','9lVktVG','1410392vmaDsf','3695755TJPnur','1512605GDGyzP','4ostBkz'];a220_0x68f3=function(){return _0xea36d3;};return a220_0x68f3();}
1
+ (function(_0x2b0d12,_0x3a339a){const _0x7cc224=a220_0x3c86,_0x308a56=_0x2b0d12();while(!![]){try{const _0x40c81b=parseInt(_0x7cc224(0x187))/0x1*(parseInt(_0x7cc224(0x185))/0x2)+-parseInt(_0x7cc224(0x17c))/0x3+-parseInt(_0x7cc224(0x180))/0x4+-parseInt(_0x7cc224(0x183))/0x5*(-parseInt(_0x7cc224(0x184))/0x6)+-parseInt(_0x7cc224(0x182))/0x7*(parseInt(_0x7cc224(0x186))/0x8)+parseInt(_0x7cc224(0x17f))/0x9*(-parseInt(_0x7cc224(0x17e))/0xa)+-parseInt(_0x7cc224(0x181))/0xb*(-parseInt(_0x7cc224(0x17d))/0xc);if(_0x40c81b===_0x3a339a)break;else _0x308a56['push'](_0x308a56['shift']());}catch(_0x27d57c){_0x308a56['push'](_0x308a56['shift']());}}}(a220_0x3d2b,0x2f172));function a220_0x3d2b(){const _0x353e06=['1203824WkTqwk','9757ZiaMjQ','129661gdWKQd','11735nBuFOD','354reRSio','458ZWUGJR','8QzYDJh','627UYPOXT','638100jJmvcf','6252kCSVkt','191220aHrNpJ','9AydEoQ'];a220_0x3d2b=function(){return _0x353e06;};return a220_0x3d2b();}function a220_0x3c86(_0x377081,_0x291e1d){_0x377081=_0x377081-0x17c;const _0x3d2bd5=a220_0x3d2b();let _0x3c86b4=_0x3d2bd5[_0x377081];return _0x3c86b4;}import{taskStatus}from'../../commands/task/status.js';export const taskDefinitions=[taskStatus];
@@ -1 +1 @@
1
- const a221_0x3a397a=a221_0x5a7e;(function(_0x49f7e3,_0x3c53cb){const _0x51b849=a221_0x5a7e,_0x4829f2=_0x49f7e3();while(!![]){try{const _0x5456d0=-parseInt(_0x51b849(0x15c))/0x1*(-parseInt(_0x51b849(0x162))/0x2)+-parseInt(_0x51b849(0x171))/0x3+parseInt(_0x51b849(0x166))/0x4*(parseInt(_0x51b849(0x173))/0x5)+-parseInt(_0x51b849(0x16d))/0x6+parseInt(_0x51b849(0x170))/0x7+-parseInt(_0x51b849(0x161))/0x8*(parseInt(_0x51b849(0x169))/0x9)+-parseInt(_0x51b849(0x15b))/0xa*(-parseInt(_0x51b849(0x16c))/0xb);if(_0x5456d0===_0x3c53cb)break;else _0x4829f2['push'](_0x4829f2['shift']());}catch(_0x20178d){_0x4829f2['push'](_0x4829f2['shift']());}}}(a221_0x4ab0,0x55807));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a221_0x4ab0(){const _0xd87af6=['1889055yxYRaw','1475754GuryAV','read','61810xFmtEv','appCode','Task\x20id\x20returned\x20by\x20an\x20asynchronous\x20platform\x20command','890wNxzED','15QHBYEp','trim','flagMissing','task-id','task','437608yKGuVc','40252AwYRZb','cookie','str','string','48rMAQTH',',\x20received\x20','Task\x20status\x20response\x20id\x20mismatch:\x20requested\x20','99ZPMwqN','compress','Query\x20an\x20asynchronous\x20task;\x20repeat\x20for\x20PENDING\x20or\x20PROCESSING\x20until\x20SUCCESS\x20or\x20FAILED','100353TPOuDO','529212CuWfiJ','isTerminal','apiError'];a221_0x4ab0=function(){return _0xd87af6;};return a221_0x4ab0();}import{asyncTaskMessage,buildAsyncTaskStatusCommand,normalizeAsyncTask}from'../../commands/common/async-task.js';import{getAsyncTaskStatus}from'../../core/api-client.js';function a221_0x5a7e(_0x2fa801,_0x4da748){_0x2fa801=_0x2fa801-0x15b;const _0x4ab0f2=a221_0x4ab0();let _0x5a7ecb=_0x4ab0f2[_0x2fa801];return _0x5a7ecb;}import{CliErrors}from'../../errors.js';export const taskStatus={'service':a221_0x3a397a(0x160),'command':'status','description':a221_0x3a397a(0x16b),'risk':a221_0x3a397a(0x172),'defaultOutputFormat':a221_0x3a397a(0x16a),'structuredErrors':!![],'flags':[{'name':'task-id','type':a221_0x3a397a(0x165),'required':!![],'description':a221_0x3a397a(0x175)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0xcb93db){const _0x3e3e9b=a221_0x3a397a;if(!_0xcb93db[_0x3e3e9b(0x164)](_0x3e3e9b(0x15f))[_0x3e3e9b(0x15d)]())throw CliErrors[_0x3e3e9b(0x15e)](_0x3e3e9b(0x15f));},async 'execute'(_0x332f96){const _0x2f6fe6=a221_0x3a397a,_0x11e8a6=_0x332f96['str'](_0x2f6fe6(0x15f))['trim'](),_0x4458d7=normalizeAsyncTask(await getAsyncTaskStatus(_0x11e8a6,_0x332f96[_0x2f6fe6(0x174)],_0x332f96[_0x2f6fe6(0x163)]));if(_0x4458d7['taskId']!==_0x11e8a6)throw CliErrors[_0x2f6fe6(0x16f)](_0x2f6fe6(0x168)+_0x11e8a6+_0x2f6fe6(0x167)+_0x4458d7['taskId']+'.');const _0x5afb3f=buildAsyncTaskStatusCommand(_0x4458d7['taskId'],_0x332f96[_0x2f6fe6(0x174)]);return{'ok':!![],'message':asyncTaskMessage(_0x4458d7),'data':{'appCode':_0x332f96[_0x2f6fe6(0x174)],..._0x4458d7,'query':_0x4458d7[_0x2f6fe6(0x16e)]?null:{'command':_0x5afb3f}}};}};
1
+ function a221_0x5931(_0x59802e,_0x2c4183){_0x59802e=_0x59802e-0x132;const _0x319dc8=a221_0x319d();let _0x5931b7=_0x319dc8[_0x59802e];return _0x5931b7;}const a221_0x53d472=a221_0x5931;(function(_0x284578,_0x394dd3){const _0xcd9a89=a221_0x5931,_0x1dfe69=_0x284578();while(!![]){try{const _0x1870e9=parseInt(_0xcd9a89(0x145))/0x1+-parseInt(_0xcd9a89(0x149))/0x2*(-parseInt(_0xcd9a89(0x138))/0x3)+-parseInt(_0xcd9a89(0x13b))/0x4+parseInt(_0xcd9a89(0x144))/0x5+-parseInt(_0xcd9a89(0x134))/0x6+-parseInt(_0xcd9a89(0x141))/0x7*(parseInt(_0xcd9a89(0x13c))/0x8)+-parseInt(_0xcd9a89(0x135))/0x9;if(_0x1870e9===_0x394dd3)break;else _0x1dfe69['push'](_0x1dfe69['shift']());}catch(_0x4e85ab){_0x1dfe69['push'](_0x1dfe69['shift']());}}}(a221_0x319d,0x74c16));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a221_0x319d(){const _0x5ebf8=['task','1683012HUXFMd','84192suzggH',',\x20received\x20','status','Task\x20status\x20response\x20id\x20mismatch:\x20requested\x20','read','98AxLxPq','apiError','Task\x20id\x20returned\x20by\x20an\x20asynchronous\x20platform\x20command','2119755vapHYj','932940rVxhYN','Query\x20an\x20asynchronous\x20task;\x20repeat\x20for\x20PENDING\x20or\x20PROCESSING\x20until\x20SUCCESS\x20or\x20FAILED','isTerminal','appCode','4WvoGRy','taskId','task-id','741168rGoCzn','1711062VrPMUO','str','cookie','4611WursKG','trim'];a221_0x319d=function(){return _0x5ebf8;};return a221_0x319d();}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':a221_0x53d472(0x13a),'command':a221_0x53d472(0x13e),'description':a221_0x53d472(0x146),'risk':a221_0x53d472(0x140),'defaultOutputFormat':'compress','structuredErrors':!![],'flags':[{'name':'task-id','type':'string','required':!![],'description':a221_0x53d472(0x143)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x337b13){const _0x462ae2=a221_0x53d472;if(!_0x337b13['str'](_0x462ae2(0x133))[_0x462ae2(0x139)]())throw CliErrors['flagMissing'](_0x462ae2(0x133));},async 'execute'(_0x5a0321){const _0x4b0a32=a221_0x53d472,_0x4e900d=_0x5a0321[_0x4b0a32(0x136)]('task-id')['trim'](),_0x37368c=normalizeAsyncTask(await getAsyncTaskStatus(_0x4e900d,_0x5a0321[_0x4b0a32(0x148)],_0x5a0321[_0x4b0a32(0x137)]));if(_0x37368c[_0x4b0a32(0x132)]!==_0x4e900d)throw CliErrors[_0x4b0a32(0x142)](_0x4b0a32(0x13f)+_0x4e900d+_0x4b0a32(0x13d)+_0x37368c['taskId']+'.');const _0x25f308=buildAsyncTaskStatusCommand(_0x37368c[_0x4b0a32(0x132)],_0x5a0321['appCode']);return{'ok':!![],'message':asyncTaskMessage(_0x37368c),'data':{'appCode':_0x5a0321[_0x4b0a32(0x148)],..._0x37368c,'query':_0x37368c[_0x4b0a32(0x147)]?null:{'command':_0x25f308}}};}};
@@ -1 +1 @@
1
- function a222_0x2416(){const _0x4164c7=['9uDcXxT','5238255xYBJen','2295294xBueHU','8853992IkYJDy','3885728scsnWq','1271939xZLTYB','6045473mpglRQ','74454tdmCyb'];a222_0x2416=function(){return _0x4164c7;};return a222_0x2416();}function a222_0x41a6(_0x12e018,_0xc40571){_0x12e018=_0x12e018-0x1c5;const _0x241675=a222_0x2416();let _0x41a68b=_0x241675[_0x12e018];return _0x41a68b;}(function(_0x5ecf34,_0x16aea6){const _0x527ebe=a222_0x41a6,_0x40febe=_0x5ecf34();while(!![]){try{const _0x5471a2=parseInt(_0x527ebe(0x1c9))/0x1+-parseInt(_0x527ebe(0x1cb))/0x2*(-parseInt(_0x527ebe(0x1cc))/0x3)+parseInt(_0x527ebe(0x1c8))/0x4+-parseInt(_0x527ebe(0x1c5))/0x5+-parseInt(_0x527ebe(0x1c6))/0x6+parseInt(_0x527ebe(0x1ca))/0x7+-parseInt(_0x527ebe(0x1c7))/0x8;if(_0x5471a2===_0x16aea6)break;else _0x40febe['push'](_0x40febe['shift']());}catch(_0x352b7e){_0x40febe['push'](_0x40febe['shift']());}}}(a222_0x2416,0xa670e));import{tenantMembersListDefinition}from'../../commands/tenant/members-list.js';export const tenantDefinitions=[tenantMembersListDefinition];
1
+ (function(_0x341e35,_0x355580){const _0x504158=a222_0x102e,_0x3fcfc1=_0x341e35();while(!![]){try{const _0xa3f5f=-parseInt(_0x504158(0x13a))/0x1*(-parseInt(_0x504158(0x141))/0x2)+-parseInt(_0x504158(0x13c))/0x3+parseInt(_0x504158(0x142))/0x4+-parseInt(_0x504158(0x13b))/0x5+-parseInt(_0x504158(0x13e))/0x6+-parseInt(_0x504158(0x140))/0x7+parseInt(_0x504158(0x13f))/0x8*(parseInt(_0x504158(0x13d))/0x9);if(_0xa3f5f===_0x355580)break;else _0x3fcfc1['push'](_0x3fcfc1['shift']());}catch(_0x592149){_0x3fcfc1['push'](_0x3fcfc1['shift']());}}}(a222_0x1eb4,0x786b6));import{tenantMembersListDefinition}from'../../commands/tenant/members-list.js';function a222_0x102e(_0x11319a,_0x1c274b){_0x11319a=_0x11319a-0x13a;const _0x1eb4f1=a222_0x1eb4();let _0x102ea0=_0x1eb4f1[_0x11319a];return _0x102ea0;}function a222_0x1eb4(){const _0x17cff0=['636415cSfdSy','1973601LmlMNi','9KRUJAP','5356878ONnNCE','16571704HtFLsP','6539134JcvYBT','8IbZoum','2500672MOZeBu','102183MgrEBA'];a222_0x1eb4=function(){return _0x17cff0;};return a222_0x1eb4();}export const tenantDefinitions=[tenantMembersListDefinition];
@@ -1 +1 @@
1
- const a223_0x46ac1f=a223_0x59b3;(function(_0x35850f,_0x264ec8){const _0x2170b2=a223_0x59b3,_0x48738a=_0x35850f();while(!![]){try{const _0xf1debc=-parseInt(_0x2170b2(0x1a1))/0x1*(-parseInt(_0x2170b2(0x1af))/0x2)+parseInt(_0x2170b2(0x1a9))/0x3+parseInt(_0x2170b2(0x1a6))/0x4*(-parseInt(_0x2170b2(0x1a7))/0x5)+-parseInt(_0x2170b2(0x1aa))/0x6+-parseInt(_0x2170b2(0x1b0))/0x7+parseInt(_0x2170b2(0x1a2))/0x8+-parseInt(_0x2170b2(0x1a8))/0x9*(parseInt(_0x2170b2(0x1a3))/0xa);if(_0xf1debc===_0x264ec8)break;else _0x48738a['push'](_0x48738a['shift']());}catch(_0x40fc51){_0x48738a['push'](_0x48738a['shift']());}}}(a223_0x1b70,0xdcd2d));import{listCurrentUserTenantMemberships,listTenantDirectoryMembers}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a223_0x59b3(_0x145f54,_0x8462b4){_0x145f54=_0x145f54-0x19e;const _0x1b7040=a223_0x1b70();let _0x59b39a=_0x1b7040[_0x145f54];return _0x59b39a;}import{assertTenantAccessible,projectTenantMembers}from'../../commands/tenant/shared.js';export const tenantMembersListDefinition={'service':a223_0x46ac1f(0x1a0),'command':'members-list','description':a223_0x46ac1f(0x19e),'risk':a223_0x46ac1f(0x1ab),'requiresAuth':!![],'requiresAppCode':![],'structuredErrors':!![],'flags':[{'name':a223_0x46ac1f(0x1a4),'type':'string','required':!![],'description':a223_0x46ac1f(0x1ae)}],async 'validate'(_0x276a09){const _0x3e11d5=a223_0x46ac1f;if(!_0x276a09[_0x3e11d5(0x1ad)](_0x3e11d5(0x1a4))[_0x3e11d5(0x1a5)]())throw CliErrors[_0x3e11d5(0x1ac)](_0x3e11d5(0x1a4),_0x3e11d5(0x1b1));},async 'execute'(_0x3b7bc4){const _0x5a4c24=a223_0x46ac1f,_0x5eed7f=_0x3b7bc4['str'](_0x5a4c24(0x1a4))[_0x5a4c24(0x1a5)](),_0x3900a4=await listCurrentUserTenantMemberships();assertTenantAccessible(_0x5eed7f,_0x3900a4);const _0x52806b=projectTenantMembers(await listTenantDirectoryMembers(_0x5eed7f));return{'ok':!![],'data':{'tenantCode':_0x5eed7f,'items':_0x52806b,'totalCount':_0x52806b[_0x5a4c24(0x19f)]},'message':'Found\x20'+_0x52806b[_0x5a4c24(0x19f)]+'\x20tenant\x20member(s)'};}};function a223_0x1b70(){const _0x4d04a2=['trim','37984VRejzz','45oVkdmP','2545659rQfvWz','4193868haSzAN','4953444sHOLrL','read','flagMissing','str','Exact\x20tenant\x20code','26fzuYOK','5165657EPSyFG','Pass\x20--tenant-code\x20<code>.','List\x20members\x20of\x20a\x20tenant\x20available\x20to\x20the\x20current\x20account','length','tenant','13754ltOyoX','10076600osUrRe','10dmAYrA','tenant-code'];a223_0x1b70=function(){return _0x4d04a2;};return a223_0x1b70();}
1
+ function a223_0x44f1(_0x3f4a1e,_0x11d091){_0x3f4a1e=_0x3f4a1e-0x168;const _0x35c9d6=a223_0x35c9();let _0x44f1ea=_0x35c9d6[_0x3f4a1e];return _0x44f1ea;}const a223_0x44542f=a223_0x44f1;(function(_0x2ba146,_0x2c1ac1){const _0x191879=a223_0x44f1,_0x3881e5=_0x2ba146();while(!![]){try{const _0x44458a=-parseInt(_0x191879(0x17d))/0x1+-parseInt(_0x191879(0x16a))/0x2+parseInt(_0x191879(0x16e))/0x3+-parseInt(_0x191879(0x172))/0x4*(parseInt(_0x191879(0x16d))/0x5)+-parseInt(_0x191879(0x171))/0x6*(-parseInt(_0x191879(0x177))/0x7)+-parseInt(_0x191879(0x169))/0x8*(-parseInt(_0x191879(0x17b))/0x9)+parseInt(_0x191879(0x173))/0xa;if(_0x44458a===_0x2c1ac1)break;else _0x3881e5['push'](_0x3881e5['shift']());}catch(_0x271be3){_0x3881e5['push'](_0x3881e5['shift']());}}}(a223_0x35c9,0xdebad));import{listCurrentUserTenantMemberships,listTenantDirectoryMembers}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a223_0x35c9(){const _0x13dd4a=['trim','7MjzSmZ','length','Found\x20','\x20tenant\x20member(s)','918TXSpES','Pass\x20--tenant-code\x20<code>.','70365XdmcwA','members-list','124792JaKMmU','2329424WwlsNH','tenant-code','Exact\x20tenant\x20code','1037735lfeYWt','1581387lupVME','flagMissing','List\x20members\x20of\x20a\x20tenant\x20available\x20to\x20the\x20current\x20account','8575806yBvnkl','32PXkYpT','2602260TYucDZ','str','read'];a223_0x35c9=function(){return _0x13dd4a;};return a223_0x35c9();}import{assertTenantAccessible,projectTenantMembers}from'../../commands/tenant/shared.js';export const tenantMembersListDefinition={'service':'tenant','command':a223_0x44542f(0x168),'description':a223_0x44542f(0x170),'risk':a223_0x44542f(0x175),'requiresAuth':!![],'requiresAppCode':![],'structuredErrors':!![],'flags':[{'name':a223_0x44542f(0x16b),'type':'string','required':!![],'description':a223_0x44542f(0x16c)}],async 'validate'(_0x423ae8){const _0x4ca4eb=a223_0x44542f;if(!_0x423ae8[_0x4ca4eb(0x174)]('tenant-code')[_0x4ca4eb(0x176)]())throw CliErrors[_0x4ca4eb(0x16f)]('tenant-code',_0x4ca4eb(0x17c));},async 'execute'(_0x3708ca){const _0x387de8=a223_0x44542f,_0x595613=_0x3708ca['str'](_0x387de8(0x16b))['trim'](),_0x543c0b=await listCurrentUserTenantMemberships();assertTenantAccessible(_0x595613,_0x543c0b);const _0x205b4f=projectTenantMembers(await listTenantDirectoryMembers(_0x595613));return{'ok':!![],'data':{'tenantCode':_0x595613,'items':_0x205b4f,'totalCount':_0x205b4f[_0x387de8(0x178)]},'message':_0x387de8(0x179)+_0x205b4f['length']+_0x387de8(0x17a)};}};
@@ -1 +1 @@
1
- (function(_0x3fa559,_0x3342c8){const _0x175745=a224_0xabaa,_0x3bc25c=_0x3fa559();while(!![]){try{const _0x38c9aa=-parseInt(_0x175745(0x14a))/0x1*(parseInt(_0x175745(0x13f))/0x2)+parseInt(_0x175745(0x13a))/0x3*(-parseInt(_0x175745(0x132))/0x4)+parseInt(_0x175745(0x147))/0x5+-parseInt(_0x175745(0x136))/0x6*(-parseInt(_0x175745(0x145))/0x7)+parseInt(_0x175745(0x133))/0x8*(parseInt(_0x175745(0x12f))/0x9)+-parseInt(_0x175745(0x13c))/0xa+-parseInt(_0x175745(0x146))/0xb*(-parseInt(_0x175745(0x137))/0xc);if(_0x38c9aa===_0x3342c8)break;else _0x3bc25c['push'](_0x3bc25c['shift']());}catch(_0x54ce58){_0x3bc25c['push'](_0x3bc25c['shift']());}}}(a224_0x27de,0xa2595));function a224_0x27de(){const _0x66e0e8=['values','3042WqIeTt','40884qCydIC','tenantCode','displayName','6ALBZsX','validation','9635880UhsGGE','sort','set','366tpGlOo','status','role','get','nickname','some','4417kYigXK','880mKIBrH','6112315okmiXx','ADMIN','\x22\x20is\x20not\x20available\x20to\x20the\x20current\x20account.','1221XxcHWI','Tenant\x20\x22','Check\x20--tenant-code\x20or\x20login\x20with\x20an\x20account\x20that\x20belongs\x20to\x20this\x20tenant.','userId','207Lgbrix','trim','isFinite','762872aoHYHi','145568ixAwft','username'];a224_0x27de=function(){return _0x66e0e8;};return a224_0x27de();}function a224_0xabaa(_0x5d7962,_0x4f4753){_0x5d7962=_0x5d7962-0x12c;const _0x27ded0=a224_0x27de();let _0xabaaac=_0x27ded0[_0x5d7962];return _0xabaaac;}import{CliErrors}from'../../errors.js';function textOrNull(_0x213854){const _0x545aab=a224_0xabaa,_0x1861c2=_0x213854?.[_0x545aab(0x130)]();return _0x1861c2?_0x1861c2:null;}export function projectTenantMembers(_0x252f3a){const _0x2cda25=a224_0xabaa,_0x99c9=new Map();for(const _0x30b6ce of _0x252f3a){const _0x46e8cc=Number(_0x30b6ce['userId']);if(!Number[_0x2cda25(0x131)](_0x46e8cc)||_0x46e8cc<=0x0)continue;const _0x2c2563={'userId':_0x46e8cc,'username':textOrNull(_0x30b6ce['username']),'displayName':textOrNull(_0x30b6ce[_0x2cda25(0x143)]),'role':_0x30b6ce['adminFlag']===!![]?_0x2cda25(0x148):'MEMBER','status':textOrNull(_0x30b6ce['status'])},_0x53b5b1=_0x99c9[_0x2cda25(0x142)](_0x46e8cc);if(!_0x53b5b1){_0x99c9[_0x2cda25(0x13e)](_0x46e8cc,_0x2c2563);continue;}_0x53b5b1[_0x2cda25(0x134)]??=_0x2c2563[_0x2cda25(0x134)],_0x53b5b1[_0x2cda25(0x139)]??=_0x2c2563[_0x2cda25(0x139)],_0x53b5b1[_0x2cda25(0x140)]??=_0x2c2563[_0x2cda25(0x140)];if(_0x2c2563[_0x2cda25(0x141)]===_0x2cda25(0x148))_0x53b5b1[_0x2cda25(0x141)]=_0x2cda25(0x148);}return[..._0x99c9[_0x2cda25(0x135)]()][_0x2cda25(0x13d)]((_0x4404dd,_0x171271)=>_0x4404dd[_0x2cda25(0x12e)]-_0x171271[_0x2cda25(0x12e)]);}export function assertTenantAccessible(_0x441fa1,_0x491a8e){const _0x18b011=a224_0xabaa;if(_0x491a8e[_0x18b011(0x144)](_0x21d8c=>_0x21d8c[_0x18b011(0x138)]===_0x441fa1))return;throw CliErrors[_0x18b011(0x13b)](_0x18b011(0x12c)+_0x441fa1+_0x18b011(0x149),_0x18b011(0x12d));}
1
+ (function(_0x1bff39,_0x3da2cf){const _0x51b055=a224_0x3df3,_0x4d6460=_0x1bff39();while(!![]){try{const _0x4cb569=-parseInt(_0x51b055(0x161))/0x1+-parseInt(_0x51b055(0x155))/0x2+-parseInt(_0x51b055(0x15e))/0x3+parseInt(_0x51b055(0x165))/0x4*(-parseInt(_0x51b055(0x163))/0x5)+parseInt(_0x51b055(0x169))/0x6+parseInt(_0x51b055(0x162))/0x7*(-parseInt(_0x51b055(0x16a))/0x8)+parseInt(_0x51b055(0x159))/0x9;if(_0x4cb569===_0x3da2cf)break;else _0x4d6460['push'](_0x4d6460['shift']());}catch(_0x5d9721){_0x4d6460['push'](_0x4d6460['shift']());}}}(a224_0x30af,0xecf2a));function a224_0x30af(){const _0x4b896a=['MEMBER','status','displayName','1837038qwibZF','40104ikvHjj','get','ADMIN','sort','189756rLeyNb','Check\x20--tenant-code\x20or\x20login\x20with\x20an\x20account\x20that\x20belongs\x20to\x20this\x20tenant.','some','tenantCode','32329755MoTiNl','isFinite','adminFlag','Tenant\x20\x22','validation','5730786jGmeYr','userId','username','683820LYeYts','133aMdPsP','23165KdfZNP','set','124jCNJnr'];a224_0x30af=function(){return _0x4b896a;};return a224_0x30af();}import{CliErrors}from'../../errors.js';function textOrNull(_0x5d58e5){const _0x176092=_0x5d58e5?.['trim']();return _0x176092?_0x176092:null;}function a224_0x3df3(_0x2efb2d,_0xd0339c){_0x2efb2d=_0x2efb2d-0x154;const _0x30af85=a224_0x30af();let _0x3df3cc=_0x30af85[_0x2efb2d];return _0x3df3cc;}export function projectTenantMembers(_0x58d7f9){const _0x53a45f=a224_0x3df3,_0xad12d2=new Map();for(const _0x231883 of _0x58d7f9){const _0x24eca5=Number(_0x231883[_0x53a45f(0x15f)]);if(!Number[_0x53a45f(0x15a)](_0x24eca5)||_0x24eca5<=0x0)continue;const _0x20fc18={'userId':_0x24eca5,'username':textOrNull(_0x231883['username']),'displayName':textOrNull(_0x231883['nickname']),'role':_0x231883[_0x53a45f(0x15b)]===!![]?'ADMIN':_0x53a45f(0x166),'status':textOrNull(_0x231883[_0x53a45f(0x167)])},_0x9bd16f=_0xad12d2[_0x53a45f(0x16b)](_0x24eca5);if(!_0x9bd16f){_0xad12d2[_0x53a45f(0x164)](_0x24eca5,_0x20fc18);continue;}_0x9bd16f[_0x53a45f(0x160)]??=_0x20fc18[_0x53a45f(0x160)],_0x9bd16f[_0x53a45f(0x168)]??=_0x20fc18[_0x53a45f(0x168)],_0x9bd16f[_0x53a45f(0x167)]??=_0x20fc18[_0x53a45f(0x167)];if(_0x20fc18['role']===_0x53a45f(0x16c))_0x9bd16f['role']=_0x53a45f(0x16c);}return[..._0xad12d2['values']()][_0x53a45f(0x154)]((_0x33be80,_0x5634ea)=>_0x33be80[_0x53a45f(0x15f)]-_0x5634ea[_0x53a45f(0x15f)]);}export function assertTenantAccessible(_0x48cf56,_0x406b9d){const _0x174a2c=a224_0x3df3;if(_0x406b9d[_0x174a2c(0x157)](_0x8ab556=>_0x8ab556[_0x174a2c(0x158)]===_0x48cf56))return;throw CliErrors[_0x174a2c(0x15d)](_0x174a2c(0x15c)+_0x48cf56+'\x22\x20is\x20not\x20available\x20to\x20the\x20current\x20account.',_0x174a2c(0x156));}
@@ -1 +1 @@
1
- const a225_0x2da18a=a225_0x5722;(function(_0x5b69c4,_0x45f867){const _0x25b0ec=a225_0x5722,_0x1042f5=_0x5b69c4();while(!![]){try{const _0x48aa0e=parseInt(_0x25b0ec(0x8b))/0x1+-parseInt(_0x25b0ec(0x84))/0x2*(-parseInt(_0x25b0ec(0x85))/0x3)+parseInt(_0x25b0ec(0x7e))/0x4*(parseInt(_0x25b0ec(0x88))/0x5)+parseInt(_0x25b0ec(0x75))/0x6*(parseInt(_0x25b0ec(0x79))/0x7)+parseInt(_0x25b0ec(0x7a))/0x8*(-parseInt(_0x25b0ec(0x77))/0x9)+parseInt(_0x25b0ec(0x7b))/0xa+-parseInt(_0x25b0ec(0x8c))/0xb;if(_0x48aa0e===_0x45f867)break;else _0x1042f5['push'](_0x1042f5['shift']());}catch(_0x402f5f){_0x1042f5['push'](_0x1042f5['shift']());}}}(a225_0x312f,0x66c28));import{asDryRunResult}from'../../commands/common/dry-run.js';import{bindDingTalkSandboxAccount,DING_TALK_SANDBOX_BIND_PATH}from'../../core/api-client.js';function a225_0x5722(_0xdf8c45,_0x4dfabd){_0xdf8c45=_0xdf8c45-0x74;const _0x312fa5=a225_0x312f();let _0x572204=_0x312fa5[_0xdf8c45];return _0x572204;}import{CliErrors}from'../../errors.js';const PROVIDER_ID=a225_0x2da18a(0x8d),CURRENT_BINDING_WARNING=a225_0x2da18a(0x76);function readDingTalkUserId(_0x2cadf3){const _0x481a9b=a225_0x2da18a,_0x2ec45c=_0x2cadf3[_0x481a9b(0x86)](_0x481a9b(0x80))['trim']();if(!_0x2ec45c)throw CliErrors[_0x481a9b(0x83)](_0x481a9b(0x7c),_0x481a9b(0x7f));return _0x2ec45c;}function a225_0x312f(){const _0x1b5c82=['943422AyObSo','The\x20current\x20binding\x20is\x20not\x20exposed\x20by\x20the\x20server;\x20before\x20is\x20unavailable.','46449mjCBwF','user-account','7aWCARR','8FBTixp','7672030Rvgaut','--ding-talk-user-id\x20cannot\x20be\x20empty.','Bound\x20current\x20user\x20to\x20DingTalk\x20sandbox\x20account.','75356heIHTe','Pass\x20the\x20DingTalk\x20user\x20id\x20returned\x20by\x20the\x20sandbox.','ding-talk-user-id','Bind\x20the\x20current\x20platform\x20user\x20to\x20a\x20DingTalk\x20sandbox\x20account','POST','validation','178626FwkVRR','9TcygJO','str','DingTalk\x20sandbox\x20account\x20binding\x20was\x20not\x20confirmed.','80xMzbQN','Retry\x20with\x20the\x20same\x20--ding-talk-user-id\x20only\x20after\x20checking\x20the\x20current\x20platform\x20session.','string','622652FKlaWO','18594290hsTFqF','dingtalk','dingding-sandbox-bind'];a225_0x312f=function(){return _0x1b5c82;};return a225_0x312f();}function buildBindingData(_0x316c20,_0x88d06a){const _0x5a5c33=a225_0x2da18a;return{'operation':'bind','selector':{'providerId':PROVIDER_ID,'dingTalkUserId':_0x316c20},'before':null,'after':{'providerId':PROVIDER_ID,'dingTalkUserId':_0x316c20,'bound':!![]},'dryRun':_0x88d06a,'backend':{'method':_0x5a5c33(0x82),'path':DING_TALK_SANDBOX_BIND_PATH},'warnings':[CURRENT_BINDING_WARNING]};}export const dingTalkSandboxBind={'service':a225_0x2da18a(0x78),'command':a225_0x2da18a(0x74),'description':a225_0x2da18a(0x81),'risk':'write','requiresAuth':!![],'requiresAppCode':![],'structuredErrors':!![],'flags':[{'name':a225_0x2da18a(0x80),'type':a225_0x2da18a(0x8a),'required':!![],'description':'DingTalk\x20user\x20id\x20returned\x20by\x20the\x20sandbox'}],async 'validate'(_0x2030e6){readDingTalkUserId(_0x2030e6);},async 'dryRun'(_0x498e78){const _0x1e532d=a225_0x2da18a,_0x56fd5a=readDingTalkUserId(_0x498e78);return asDryRunResult(buildBindingData(_0x56fd5a,!![]),{'method':_0x1e532d(0x82),'url':DING_TALK_SANDBOX_BIND_PATH});},async 'execute'(_0x1a9e1b){const _0x9476b2=a225_0x2da18a,_0x4e42f2=readDingTalkUserId(_0x1a9e1b),_0x46bac9=await bindDingTalkSandboxAccount(_0x4e42f2);if(_0x46bac9!==!![])throw CliErrors['apiError'](_0x9476b2(0x87),_0x9476b2(0x89));return{'ok':!![],'data':buildBindingData(_0x4e42f2,![]),'message':_0x9476b2(0x7d)};}};
1
+ function a225_0x112f(){const _0x5e1802=['2925480YnAJyw','1076853yjcTnp','bind','Bound\x20current\x20user\x20to\x20DingTalk\x20sandbox\x20account.','2fZejjq','POST','5feStfj','string','The\x20current\x20binding\x20is\x20not\x20exposed\x20by\x20the\x20server;\x20before\x20is\x20unavailable.','Pass\x20the\x20DingTalk\x20user\x20id\x20returned\x20by\x20the\x20sandbox.','854565PkNOEn','DingTalk\x20user\x20id\x20returned\x20by\x20the\x20sandbox','dingding-sandbox-bind','validation','11jgdkGb','trim','7321398bVKUAZ','user-account','41967jJalvj','DingTalk\x20sandbox\x20account\x20binding\x20was\x20not\x20confirmed.','3461980gmleKk','--ding-talk-user-id\x20cannot\x20be\x20empty.','1160SCCGWM','3849475BaZZjK','Bind\x20the\x20current\x20platform\x20user\x20to\x20a\x20DingTalk\x20sandbox\x20account','write','ding-talk-user-id'];a225_0x112f=function(){return _0x5e1802;};return a225_0x112f();}const a225_0x5d8eeb=a225_0x39b4;(function(_0x19df34,_0x44be6e){const _0x431d1a=a225_0x39b4,_0x2d8bf9=_0x19df34();while(!![]){try{const _0x4fefa6=parseInt(_0x431d1a(0x7e))/0x1+-parseInt(_0x431d1a(0x78))/0x2*(parseInt(_0x431d1a(0x75))/0x3)+-parseInt(_0x431d1a(0x74))/0x4+parseInt(_0x431d1a(0x7a))/0x5*(parseInt(_0x431d1a(0x69))/0x6)+-parseInt(_0x431d1a(0x70))/0x7+parseInt(_0x431d1a(0x6f))/0x8*(parseInt(_0x431d1a(0x6b))/0x9)+-parseInt(_0x431d1a(0x6d))/0xa*(parseInt(_0x431d1a(0x67))/0xb);if(_0x4fefa6===_0x44be6e)break;else _0x2d8bf9['push'](_0x2d8bf9['shift']());}catch(_0x27dbf3){_0x2d8bf9['push'](_0x2d8bf9['shift']());}}}(a225_0x112f,0xbaa49));import{asDryRunResult}from'../../commands/common/dry-run.js';import{bindDingTalkSandboxAccount,DING_TALK_SANDBOX_BIND_PATH}from'../../core/api-client.js';function a225_0x39b4(_0x3c0d35,_0x42d85d){_0x3c0d35=_0x3c0d35-0x65;const _0x112fc2=a225_0x112f();let _0x39b4d9=_0x112fc2[_0x3c0d35];return _0x39b4d9;}import{CliErrors}from'../../errors.js';const PROVIDER_ID='dingtalk',CURRENT_BINDING_WARNING=a225_0x5d8eeb(0x7c);function readDingTalkUserId(_0x5ea09c){const _0x16a2e5=a225_0x5d8eeb,_0x3e53=_0x5ea09c['str'](_0x16a2e5(0x73))[_0x16a2e5(0x68)]();if(!_0x3e53)throw CliErrors[_0x16a2e5(0x66)](_0x16a2e5(0x6e),_0x16a2e5(0x7d));return _0x3e53;}function buildBindingData(_0x5e3f8f,_0x44d587){const _0x44e1f4=a225_0x5d8eeb;return{'operation':_0x44e1f4(0x76),'selector':{'providerId':PROVIDER_ID,'dingTalkUserId':_0x5e3f8f},'before':null,'after':{'providerId':PROVIDER_ID,'dingTalkUserId':_0x5e3f8f,'bound':!![]},'dryRun':_0x44d587,'backend':{'method':_0x44e1f4(0x79),'path':DING_TALK_SANDBOX_BIND_PATH},'warnings':[CURRENT_BINDING_WARNING]};}export const dingTalkSandboxBind={'service':a225_0x5d8eeb(0x6a),'command':a225_0x5d8eeb(0x65),'description':a225_0x5d8eeb(0x71),'risk':a225_0x5d8eeb(0x72),'requiresAuth':!![],'requiresAppCode':![],'structuredErrors':!![],'flags':[{'name':a225_0x5d8eeb(0x73),'type':a225_0x5d8eeb(0x7b),'required':!![],'description':a225_0x5d8eeb(0x7f)}],async 'validate'(_0x4f89a5){readDingTalkUserId(_0x4f89a5);},async 'dryRun'(_0x4079c1){const _0x1f3fd1=a225_0x5d8eeb,_0x3d7a26=readDingTalkUserId(_0x4079c1);return asDryRunResult(buildBindingData(_0x3d7a26,!![]),{'method':_0x1f3fd1(0x79),'url':DING_TALK_SANDBOX_BIND_PATH});},async 'execute'(_0x133b85){const _0x8407fc=a225_0x5d8eeb,_0x4e729a=readDingTalkUserId(_0x133b85),_0x3c9d48=await bindDingTalkSandboxAccount(_0x4e729a);if(_0x3c9d48!==!![])throw CliErrors['apiError'](_0x8407fc(0x6c),'Retry\x20with\x20the\x20same\x20--ding-talk-user-id\x20only\x20after\x20checking\x20the\x20current\x20platform\x20session.');return{'ok':!![],'data':buildBindingData(_0x4e729a,![]),'message':_0x8407fc(0x77)};}};
@@ -1 +1 @@
1
- function a226_0x1d49(){const _0xcbc8cd=['522935QuXEeL','227028hoWOkX','138826lQwZUW','6QhoNmG','536wrTsOu','164582pPTkdH','759610EheThT','22023bXWTmC','159856YqCwWE'];a226_0x1d49=function(){return _0xcbc8cd;};return a226_0x1d49();}(function(_0x5de297,_0x5159fc){const _0x21fd79=a226_0x1e9b,_0x3d87d7=_0x5de297();while(!![]){try{const _0x861868=-parseInt(_0x21fd79(0xce))/0x1+-parseInt(_0x21fd79(0xd4))/0x2+parseInt(_0x21fd79(0xd3))/0x3+parseInt(_0x21fd79(0xd1))/0x4+parseInt(_0x21fd79(0xcf))/0x5+parseInt(_0x21fd79(0xd5))/0x6*(-parseInt(_0x21fd79(0xd2))/0x7)+-parseInt(_0x21fd79(0xd6))/0x8*(-parseInt(_0x21fd79(0xd0))/0x9);if(_0x861868===_0x5159fc)break;else _0x3d87d7['push'](_0x3d87d7['shift']());}catch(_0x5b016e){_0x3d87d7['push'](_0x3d87d7['shift']());}}}(a226_0x1d49,0x1dfbb));function a226_0x1e9b(_0x13d235,_0x274731){_0x13d235=_0x13d235-0xce;const _0x1d49f3=a226_0x1d49();let _0x1e9ba5=_0x1d49f3[_0x13d235];return _0x1e9ba5;}import{dingTalkSandboxBind}from'../../commands/user-account/dingding-sandbox-bind.js';export const userAccountDefinitions=[dingTalkSandboxBind];
1
+ (function(_0x2fd396,_0x5bac8e){const _0x29122e=a226_0x4a55,_0x144479=_0x2fd396();while(!![]){try{const _0x2c5645=-parseInt(_0x29122e(0x1a9))/0x1+-parseInt(_0x29122e(0x1ab))/0x2+parseInt(_0x29122e(0x1ae))/0x3+-parseInt(_0x29122e(0x1ad))/0x4*(-parseInt(_0x29122e(0x1ac))/0x5)+-parseInt(_0x29122e(0x1b0))/0x6*(-parseInt(_0x29122e(0x1a7))/0x7)+-parseInt(_0x29122e(0x1aa))/0x8*(-parseInt(_0x29122e(0x1a8))/0x9)+-parseInt(_0x29122e(0x1af))/0xa;if(_0x2c5645===_0x5bac8e)break;else _0x144479['push'](_0x144479['shift']());}catch(_0x2c671b){_0x144479['push'](_0x144479['shift']());}}}(a226_0x4660,0x935d2));import{dingTalkSandboxBind}from'../../commands/user-account/dingding-sandbox-bind.js';function a226_0x4660(){const _0x3aa613=['3184QJgHpT','615606ReqRvu','228295JwrYLu','60IYFHfT','2976195eBLBGq','14610710ukoRys','12qSNnsY','617939jXAemd','19350SxpFJb','336728zAXOEU'];a226_0x4660=function(){return _0x3aa613;};return a226_0x4660();}function a226_0x4a55(_0x541137,_0x5d046c){_0x541137=_0x541137-0x1a7;const _0x46604f=a226_0x4660();let _0x4a55f9=_0x46604f[_0x541137];return _0x4a55f9;}export const userAccountDefinitions=[dingTalkSandboxBind];
@@ -1 +1 @@
1
- function a227_0x42da(){const _0x441049=['4PMLFvg','App\x20profile\x20name','12HAspAD','195548PoePLs','2221515nkaYfc','45hsrUyj','912BKLTJN','3346350zMIsht','write','workspace\x20add','workspace','527580TaJMCt','1682752SdHQJO','16IXoeSw','35530zSqnfd','9593370ruOoip','add','Register\x20an\x20app\x20profile\x20in\x20the\x20current\x20workspace\x20(or\x20--global)'];a227_0x42da=function(){return _0x441049;};return a227_0x42da();}const a227_0x3a6b2d=a227_0x26d0;(function(_0x358ef4,_0x35389d){const _0x42d66f=a227_0x26d0,_0x1dd1c1=_0x358ef4();while(!![]){try{const _0x121b58=-parseInt(_0x42d66f(0x1d1))/0x1*(-parseInt(_0x42d66f(0x1c7))/0x2)+parseInt(_0x42d66f(0x1cf))/0x3*(parseInt(_0x42d66f(0x1c4))/0x4)+parseInt(_0x42d66f(0x1c8))/0x5*(parseInt(_0x42d66f(0x1c6))/0x6)+parseInt(_0x42d66f(0x1cb))/0x7+-parseInt(_0x42d66f(0x1d0))/0x8*(parseInt(_0x42d66f(0x1c9))/0x9)+-parseInt(_0x42d66f(0x1c1))/0xa+parseInt(_0x42d66f(0x1c0))/0xb*(-parseInt(_0x42d66f(0x1ca))/0xc);if(_0x121b58===_0x35389d)break;else _0x1dd1c1['push'](_0x1dd1c1['shift']());}catch(_0x4f9bbc){_0x1dd1c1['push'](_0x1dd1c1['shift']());}}}(a227_0x42da,0xcf9bb));import{buildAppAddFlags,runAppAdd,validateAppName}from'../../commands/common/app-registry.js';function a227_0x26d0(_0xe3f5e3,_0x4540e4){_0xe3f5e3=_0xe3f5e3-0x1c0;const _0x42da1c=a227_0x42da();let _0x26d094=_0x42da1c[_0xe3f5e3];return _0x26d094;}export const workspaceAddDefinition={'service':a227_0x3a6b2d(0x1ce),'command':a227_0x3a6b2d(0x1c2),'description':a227_0x3a6b2d(0x1c3),'risk':a227_0x3a6b2d(0x1cc),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':'name','description':a227_0x3a6b2d(0x1c5),'required':!![]}],'flags':buildAppAddFlags(),'validate':_0x2bed53=>validateAppName(_0x2bed53,a227_0x3a6b2d(0x1cd)),'execute':_0x5f21f9=>runAppAdd(_0x5f21f9,a227_0x3a6b2d(0x1cd))};
1
+ const a227_0x32e8a2=a227_0x3d55;function a227_0x3d55(_0x5e8d18,_0x49a770){_0x5e8d18=_0x5e8d18-0x17a;const _0x4042b9=a227_0x4042();let _0x3d55b=_0x4042b9[_0x5e8d18];return _0x3d55b;}(function(_0xa12989,_0x5d1a01){const _0x139cef=a227_0x3d55,_0x98d8b4=_0xa12989();while(!![]){try{const _0x5801dc=-parseInt(_0x139cef(0x17d))/0x1*(-parseInt(_0x139cef(0x187))/0x2)+-parseInt(_0x139cef(0x188))/0x3*(parseInt(_0x139cef(0x17c))/0x4)+-parseInt(_0x139cef(0x17f))/0x5*(-parseInt(_0x139cef(0x186))/0x6)+-parseInt(_0x139cef(0x181))/0x7*(-parseInt(_0x139cef(0x182))/0x8)+-parseInt(_0x139cef(0x18b))/0x9*(-parseInt(_0x139cef(0x184))/0xa)+-parseInt(_0x139cef(0x17e))/0xb*(parseInt(_0x139cef(0x189))/0xc)+-parseInt(_0x139cef(0x18c))/0xd*(parseInt(_0x139cef(0x183))/0xe);if(_0x5801dc===_0x5d1a01)break;else _0x98d8b4['push'](_0x98d8b4['shift']());}catch(_0x14c3ae){_0x98d8b4['push'](_0x98d8b4['shift']());}}}(a227_0x4042,0x353b2));import{buildAppAddFlags,runAppAdd,validateAppName}from'../../commands/common/app-registry.js';function a227_0x4042(){const _0x884aad=['42290srIQkJ','write','438qFLIOj','86sqVvyL','3OjScIZ','36YQpbLh','App\x20profile\x20name','270FuXxZp','3641859UptpcD','workspace','Register\x20an\x20app\x20profile\x20in\x20the\x20current\x20workspace\x20(or\x20--global)','add','1112444ogpVZP','131EQJKAM','482471LuRdjN','26930cbdZwV','workspace\x20add','70VvvLJV','305752vcuYSB','14RHGNbt'];a227_0x4042=function(){return _0x884aad;};return a227_0x4042();}export const workspaceAddDefinition={'service':a227_0x32e8a2(0x18d),'command':a227_0x32e8a2(0x17b),'description':a227_0x32e8a2(0x17a),'risk':a227_0x32e8a2(0x185),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':'name','description':a227_0x32e8a2(0x18a),'required':!![]}],'flags':buildAppAddFlags(),'validate':_0x1f2219=>validateAppName(_0x1f2219,a227_0x32e8a2(0x180)),'execute':_0x42b1db=>runAppAdd(_0x42b1db,'workspace\x20add')};
@@ -1 +1 @@
1
- const a228_0x41349a=a228_0x13c5;(function(_0x590c90,_0x5b9f0a){const _0x264a6f=a228_0x13c5,_0x3fe30b=_0x590c90();while(!![]){try{const _0x5329c4=parseInt(_0x264a6f(0x20f))/0x1+-parseInt(_0x264a6f(0x1e3))/0x2+-parseInt(_0x264a6f(0x1f6))/0x3*(parseInt(_0x264a6f(0x1ed))/0x4)+parseInt(_0x264a6f(0x208))/0x5*(parseInt(_0x264a6f(0x20d))/0x6)+parseInt(_0x264a6f(0x1ef))/0x7+-parseInt(_0x264a6f(0x213))/0x8+parseInt(_0x264a6f(0x1e6))/0x9;if(_0x5329c4===_0x5b9f0a)break;else _0x3fe30b['push'](_0x3fe30b['shift']());}catch(_0x46c21e){_0x3fe30b['push'](_0x3fe30b['shift']());}}}(a228_0x29fb,0x2de9f));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 a228_0x13c5(_0x3828ae,_0x495868){_0x3828ae=_0x3828ae-0x1df;const _0x29fbac=a228_0x29fb();let _0x13c5e8=_0x29fbac[_0x3828ae];return _0x13c5e8;}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';import{normalizeStoredDefaultApp}from'../../config/schema.js';const WORKSPACE_USAGE=CLI_BIN_NAME+'\x20workspace\x20<init|use>\x20--app\x20<name>\x20[--appcode\x20<code>]',SAFE_PROFILE_KEYS=[a228_0x41349a(0x1e8),a228_0x41349a(0x1f2),a228_0x41349a(0x203),'format',a228_0x41349a(0x1f3),a228_0x41349a(0x20e),a228_0x41349a(0x204)],workspaceFlags=[{'name':a228_0x41349a(0x1e4),'type':a228_0x41349a(0x209),'description':a228_0x41349a(0x1e7)},{'name':a228_0x41349a(0x1e8),'type':a228_0x41349a(0x209),'description':a228_0x41349a(0x214)},{'name':a228_0x41349a(0x1f2),'type':a228_0x41349a(0x209),'description':a228_0x41349a(0x1e2),'enum':[...RABETBASE_ENV_VALUES]},{'name':a228_0x41349a(0x203),'type':a228_0x41349a(0x209),'description':'API\x20directory\x20path\x20for\x20this\x20workspace\x20app\x20profile'},{'name':'defaultFormat','type':a228_0x41349a(0x209),'description':'Default\x20output\x20format\x20for\x20this\x20workspace\x20app\x20profile','enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':a228_0x41349a(0x1f3),'type':a228_0x41349a(0x206),'description':a228_0x41349a(0x1f5)},{'name':'riskLevel','type':a228_0x41349a(0x209),'description':a228_0x41349a(0x1f1),'enum':[...RISK_LEVEL_VALUES]},{'name':a228_0x41349a(0x204),'type':a228_0x41349a(0x209),'description':a228_0x41349a(0x1ee)}];function isRecord(_0xe343eb){const _0x759e75=a228_0x41349a;return!!_0xe343eb&&typeof _0xe343eb===_0x759e75(0x1fe)&&!Array['isArray'](_0xe343eb);}function assertValidAppcode(_0x650a13){const _0x433310=a228_0x41349a,{valid:_0x32373c,message:_0x3edfdb}=validateAppcode(_0x650a13);if(!_0x32373c)throw CliErrors[_0x433310(0x1eb)](_0x433310(0x200)+_0x650a13,_0x3edfdb);}function sanitizeProfile(_0x5f5a03){if(!isRecord(_0x5f5a03))return{};const _0x2ccbf2={};for(const _0x54e29e of SAFE_PROFILE_KEYS){if(_0x5f5a03[_0x54e29e]!==undefined)_0x2ccbf2[_0x54e29e]=_0x5f5a03[_0x54e29e];}return _0x2ccbf2;}function cloneProfile(_0x56696f){return isRecord(_0x56696f)?{..._0x56696f}:{};}function a228_0x29fb(){const _0x3b8674=['114893AREkcA','str','\x20--app\x20','use','2691248tOSndT','App\x20code\x20to\x20bind\x20to\x20this\x20workspace','Workspace\x20','workspace','\x20--appcode\x20<code>`.','App\x20\x22','Target\x20environment','619014QRinwd','app','Switch\x20the\x20current\x20workspace\x20app\x20binding','5894271YmAUNc','App\x20profile\x20name\x20to\x20use\x20in\x20this\x20workspace','appcode','project','keys','validation','Use\x20`','146960LiYgkQ','App\x20locale\x20for\x20this\x20workspace\x20app\x20profile\x20(not\x20CLI\x20language;\x20reserved\x20for\x20later\x20app\x20use)','1003674XiXHfi','\x20workspace\x20','Risk\x20level\x20for\x20this\x20workspace\x20app\x20profile','env','pageSize','Missing\x20workspace\x20app\x20selector.','Default\x20page\x20size\x20for\x20this\x20workspace\x20app\x20profile','15zMrrUI','initialized','write','\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`','workspace.','join','\x20workspace\x20use\x20--app\x20<name>`.','trim','object',').\x20Config:\x20','Invalid\x20appcode:\x20','init','format','apiDir','locale','defaultFormat','number','globalConfig','30730DpTohe','string','.\x20Credentials:\x20not\x20written.','apps','\x22\x20not\x20found.','102CFlOGm','riskLevel'];a228_0x29fb=function(){return _0x3b8674;};return a228_0x29fb();}function collectWorkspaceProfileOverrides(_0x51d0dc){const _0x5bad37=a228_0x41349a,_0xca2d91={},_0x280fa0=_0x51d0dc['str'](_0x5bad37(0x1f2)),_0x1dcd83=_0x51d0dc[_0x5bad37(0x210)](_0x5bad37(0x203)),_0x5deb5b=_0x51d0dc[_0x5bad37(0x210)](_0x5bad37(0x205)),_0x58332e=_0x51d0dc['flag'](_0x5bad37(0x1f3)),_0x5c14a7=_0x51d0dc[_0x5bad37(0x210)](_0x5bad37(0x20e)),_0x2e8e0c=_0x51d0dc[_0x5bad37(0x210)](_0x5bad37(0x204));if(_0x280fa0)_0xca2d91[_0x5bad37(0x1f2)]=_0x280fa0;if(_0x1dcd83)_0xca2d91[_0x5bad37(0x203)]=_0x1dcd83;if(_0x5deb5b)_0xca2d91[_0x5bad37(0x202)]=_0x5deb5b;if(_0x58332e!==undefined&&_0x58332e!=='')_0xca2d91['pageSize']=Number(_0x58332e);if(_0x5c14a7)_0xca2d91[_0x5bad37(0x20e)]=_0x5c14a7;if(_0x2e8e0c)_0xca2d91[_0x5bad37(0x204)]=_0x2e8e0c;return _0xca2d91;}async function validateWorkspaceArgs(_0x3b34ad){const _0x1fb4bf=a228_0x41349a,_0x14d35d=_0x3b34ad[_0x1fb4bf(0x210)](_0x1fb4bf(0x1e4))[_0x1fb4bf(0x1fd)](),_0x2dbf58=_0x3b34ad['str'](_0x1fb4bf(0x1e8))[_0x1fb4bf(0x1fd)]();if(!_0x14d35d&&!_0x2dbf58)throw CliErrors['validation'](_0x1fb4bf(0x1f4),_0x1fb4bf(0x1ec)+CLI_BIN_NAME+_0x1fb4bf(0x1f9)+CLI_BIN_NAME+_0x1fb4bf(0x1fc));if(_0x2dbf58)assertValidAppcode(_0x2dbf58);}function resolveKnownApps(){const _0x518a2a=a228_0x41349a,{config:_0xe1d240,layers:_0x3ef6f}=readRawConfigWithLayers(),_0x2ee4ea=isRecord(_0xe1d240['apps'])?_0xe1d240['apps']:{},_0x7a7145=isRecord(_0x3ef6f[_0x518a2a(0x207)]['apps'])?_0x3ef6f['globalConfig']['apps']:{};return{..._0x7a7145,..._0x2ee4ea};}async function configureWorkspace(_0x3ba9d5,_0xe66db3){const _0x3bed8b=a228_0x41349a,_0x387f53=_0x3ba9d5['str'](_0x3bed8b(0x1e4))['trim'](),_0x132f3c=_0x3ba9d5['str'](_0x3bed8b(0x1e8))[_0x3bed8b(0x1fd)](),_0x59f870=_0x387f53||_0x132f3c;if(!_0x59f870)throw CliErrors[_0x3bed8b(0x1eb)](_0x3bed8b(0x1f4),_0x3bed8b(0x1ec)+CLI_BIN_NAME+'\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`'+CLI_BIN_NAME+_0x3bed8b(0x1fc));if(_0x132f3c)assertValidAppcode(_0x132f3c);const _0x5449b7=resolveWriteConfigPath(_0x3bed8b(0x1e9)),_0xbbf573=readConfigFile(_0x5449b7),_0x4c718e=resolveKnownApps(),_0x12b20e=isRecord(_0xbbf573['apps'])?{..._0xbbf573['apps']}:{},_0x339df5=cloneProfile(_0x12b20e[_0x59f870]),_0x78ff33=sanitizeProfile(_0x4c718e[_0x59f870]),_0xd6dab1=_0x132f3c?{}:_0x78ff33,_0x118a30=_0x132f3c||_0xd6dab1[_0x3bed8b(0x1e8)];if(!_0x118a30){const _0x3561e9=Object[_0x3bed8b(0x1ea)](_0x4c718e),_0x1702bc=_0x3561e9['length']===0x0?_0x3bed8b(0x1ec)+CLI_BIN_NAME+_0x3bed8b(0x1f0)+_0xe66db3+_0x3bed8b(0x211)+_0x59f870+_0x3bed8b(0x1e0):'Pass\x20--appcode\x20<code>,\x20or\x20choose\x20one\x20of:\x20'+_0x3561e9[_0x3bed8b(0x1fb)](',\x20');throw CliErrors[_0x3bed8b(0x1eb)](_0x3bed8b(0x1e1)+_0x59f870+_0x3bed8b(0x20c),_0x1702bc);}assertValidAppcode(String(_0x118a30));const _0x2d8480={..._0xd6dab1,..._0x339df5,'appcode':String(_0x118a30),...collectWorkspaceProfileOverrides(_0x3ba9d5)};return _0x12b20e[_0x59f870]=_0x2d8480,_0xbbf573[_0x3bed8b(0x20b)]=_0x12b20e,normalizeStoredDefaultApp(_0xbbf573,_0x59f870),delete _0xbbf573[_0x3bed8b(0x1e8)],delete _0xbbf573['app'],_0x2d8480[_0x3bed8b(0x1f2)]&&(_0xbbf573[_0x3bed8b(0x1f2)]=_0x2d8480[_0x3bed8b(0x1f2)]),writeConfigFile(_0x5449b7,_0xbbf573),{'ok':!![],'message':_0x3bed8b(0x215)+(_0xe66db3===_0x3bed8b(0x201)?_0x3bed8b(0x1f7):'updated')+':\x20'+_0x59f870+'\x20(appcode:\x20'+_0x2d8480[_0x3bed8b(0x1e8)]+_0x3bed8b(0x1ff)+_0x5449b7+_0x3bed8b(0x20a),'data':{'operation':_0x3bed8b(0x1fa)+_0xe66db3,'configPath':_0x5449b7,'app':_0x59f870,'appcode':_0x2d8480[_0x3bed8b(0x1e8)],'env':_0x2d8480['env']??null,'credentialsWritten':![]}};}const workspaceInitDefinition={'service':a228_0x41349a(0x1df),'command':a228_0x41349a(0x201),'description':'Initialize\x20the\x20current\x20workspace\x20app\x20binding','risk':a228_0x41349a(0x1f8),'requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x27e29d=>configureWorkspace(_0x27e29d,a228_0x41349a(0x201))},workspaceUseDefinition={'service':a228_0x41349a(0x1df),'command':'use','description':a228_0x41349a(0x1e5),'risk':a228_0x41349a(0x1f8),'requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x6a65e=>configureWorkspace(_0x6a65e,a228_0x41349a(0x212))};export const workspaceDefinitions=[workspaceInitDefinition,workspaceUseDefinition,workspaceAddDefinition,workspaceRemoveDefinition];export{WORKSPACE_USAGE};
1
+ const a228_0xa5f72c=a228_0x15e8;(function(_0x4ef569,_0x40ee2b){const _0x21457d=a228_0x15e8,_0x79a87e=_0x4ef569();while(!![]){try{const _0x170d89=parseInt(_0x21457d(0x14b))/0x1*(-parseInt(_0x21457d(0x14c))/0x2)+-parseInt(_0x21457d(0x13f))/0x3*(-parseInt(_0x21457d(0x12f))/0x4)+parseInt(_0x21457d(0x129))/0x5+-parseInt(_0x21457d(0x144))/0x6*(parseInt(_0x21457d(0x12a))/0x7)+-parseInt(_0x21457d(0x150))/0x8*(-parseInt(_0x21457d(0x146))/0x9)+parseInt(_0x21457d(0x139))/0xa+-parseInt(_0x21457d(0x123))/0xb;if(_0x170d89===_0x40ee2b)break;else _0x79a87e['push'](_0x79a87e['shift']());}catch(_0x20a668){_0x79a87e['push'](_0x79a87e['shift']());}}}(a228_0x1716,0x1a464));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';function a228_0x1716(){const _0x1628db=['Default\x20page\x20size\x20for\x20this\x20workspace\x20app\x20profile','locale','\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`','App\x20\x22','588216ToqvWB','\x20(appcode:\x20','874953pIFPww','\x20workspace\x20<init|use>\x20--app\x20<name>\x20[--appcode\x20<code>]','join','length','Workspace\x20','106OzCIWT','2492xYSlmw','app','Target\x20environment','Invalid\x20appcode:\x20','8TxonNe','format',').\x20Config:\x20','Pass\x20--appcode\x20<code>,\x20or\x20choose\x20one\x20of:\x20','globalConfig','write','apiDir','API\x20directory\x20path\x20for\x20this\x20workspace\x20app\x20profile','riskLevel','Use\x20`','Switch\x20the\x20current\x20workspace\x20app\x20binding','Default\x20output\x20format\x20for\x20this\x20workspace\x20app\x20profile','workspace','keys','1918994JVrDEl','env','updated','App\x20code\x20to\x20bind\x20to\x20this\x20workspace','\x20workspace\x20use\x20--app\x20<name>`.','pageSize','371525hynMhI','7tEyMSh','init','Initialize\x20the\x20current\x20workspace\x20app\x20binding','use','\x22\x20not\x20found.','5076FUYpDh','defaultFormat','object','string','Missing\x20workspace\x20app\x20selector.','trim','appcode','App\x20locale\x20for\x20this\x20workspace\x20app\x20profile\x20(not\x20CLI\x20language;\x20reserved\x20for\x20later\x20app\x20use)','apps','number','1718870fpgLki','validation','isArray','\x20workspace\x20','\x20--app\x20','str','399fVAemo'];a228_0x1716=function(){return _0x1628db;};return a228_0x1716();}import{workspaceRemoveDefinition}from'../../commands/workspace/remove.js';import{normalizeStoredDefaultApp}from'../../config/schema.js';const WORKSPACE_USAGE=CLI_BIN_NAME+a228_0xa5f72c(0x147),SAFE_PROFILE_KEYS=[a228_0xa5f72c(0x135),a228_0xa5f72c(0x124),'apiDir',a228_0xa5f72c(0x151),a228_0xa5f72c(0x128),a228_0xa5f72c(0x11d),'locale'],workspaceFlags=[{'name':'app','type':'string','description':'App\x20profile\x20name\x20to\x20use\x20in\x20this\x20workspace'},{'name':a228_0xa5f72c(0x135),'type':a228_0xa5f72c(0x132),'description':a228_0xa5f72c(0x126)},{'name':a228_0xa5f72c(0x124),'type':a228_0xa5f72c(0x132),'description':a228_0xa5f72c(0x14e),'enum':[...RABETBASE_ENV_VALUES]},{'name':'apiDir','type':a228_0xa5f72c(0x132),'description':a228_0xa5f72c(0x157)},{'name':a228_0xa5f72c(0x130),'type':a228_0xa5f72c(0x132),'description':a228_0xa5f72c(0x120),'enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':a228_0xa5f72c(0x128),'type':a228_0xa5f72c(0x138),'description':a228_0xa5f72c(0x140)},{'name':a228_0xa5f72c(0x11d),'type':a228_0xa5f72c(0x132),'description':'Risk\x20level\x20for\x20this\x20workspace\x20app\x20profile','enum':[...RISK_LEVEL_VALUES]},{'name':a228_0xa5f72c(0x141),'type':a228_0xa5f72c(0x132),'description':a228_0xa5f72c(0x136)}];function isRecord(_0x3d2ffb){const _0x45fd1b=a228_0xa5f72c;return!!_0x3d2ffb&&typeof _0x3d2ffb===_0x45fd1b(0x131)&&!Array[_0x45fd1b(0x13b)](_0x3d2ffb);}function assertValidAppcode(_0x120391){const _0x2799c3=a228_0xa5f72c,{valid:_0x3276a2,message:_0x8344a7}=validateAppcode(_0x120391);if(!_0x3276a2)throw CliErrors[_0x2799c3(0x13a)](_0x2799c3(0x14f)+_0x120391,_0x8344a7);}function sanitizeProfile(_0x2aa8bd){if(!isRecord(_0x2aa8bd))return{};const _0x3dcf0e={};for(const _0x26bf89 of SAFE_PROFILE_KEYS){if(_0x2aa8bd[_0x26bf89]!==undefined)_0x3dcf0e[_0x26bf89]=_0x2aa8bd[_0x26bf89];}return _0x3dcf0e;}function cloneProfile(_0xa7751b){return isRecord(_0xa7751b)?{..._0xa7751b}:{};}function collectWorkspaceProfileOverrides(_0x123da7){const _0x26df29=a228_0xa5f72c,_0x311e0e={},_0x159b66=_0x123da7[_0x26df29(0x13e)](_0x26df29(0x124)),_0x57b896=_0x123da7[_0x26df29(0x13e)](_0x26df29(0x156)),_0x371465=_0x123da7[_0x26df29(0x13e)](_0x26df29(0x130)),_0x16ec35=_0x123da7['flag'](_0x26df29(0x128)),_0x3a707c=_0x123da7[_0x26df29(0x13e)](_0x26df29(0x11d)),_0x4cc740=_0x123da7[_0x26df29(0x13e)]('locale');if(_0x159b66)_0x311e0e[_0x26df29(0x124)]=_0x159b66;if(_0x57b896)_0x311e0e[_0x26df29(0x156)]=_0x57b896;if(_0x371465)_0x311e0e['format']=_0x371465;if(_0x16ec35!==undefined&&_0x16ec35!=='')_0x311e0e[_0x26df29(0x128)]=Number(_0x16ec35);if(_0x3a707c)_0x311e0e['riskLevel']=_0x3a707c;if(_0x4cc740)_0x311e0e[_0x26df29(0x141)]=_0x4cc740;return _0x311e0e;}async function validateWorkspaceArgs(_0x510661){const _0x1e2882=a228_0xa5f72c,_0x2dc6cb=_0x510661[_0x1e2882(0x13e)](_0x1e2882(0x14d))[_0x1e2882(0x134)](),_0x222af7=_0x510661['str'](_0x1e2882(0x135))[_0x1e2882(0x134)]();if(!_0x2dc6cb&&!_0x222af7)throw CliErrors[_0x1e2882(0x13a)](_0x1e2882(0x133),_0x1e2882(0x11e)+CLI_BIN_NAME+_0x1e2882(0x142)+CLI_BIN_NAME+_0x1e2882(0x127));if(_0x222af7)assertValidAppcode(_0x222af7);}function resolveKnownApps(){const _0x1b43a0=a228_0xa5f72c,{config:_0x46b49d,layers:_0x131b77}=readRawConfigWithLayers(),_0x34debe=isRecord(_0x46b49d[_0x1b43a0(0x137)])?_0x46b49d['apps']:{},_0x15fba7=isRecord(_0x131b77[_0x1b43a0(0x154)][_0x1b43a0(0x137)])?_0x131b77[_0x1b43a0(0x154)][_0x1b43a0(0x137)]:{};return{..._0x15fba7,..._0x34debe};}async function configureWorkspace(_0x5a40d8,_0x457252){const _0x53cc1c=a228_0xa5f72c,_0xb1f5bf=_0x5a40d8[_0x53cc1c(0x13e)](_0x53cc1c(0x14d))[_0x53cc1c(0x134)](),_0x3d5828=_0x5a40d8[_0x53cc1c(0x13e)](_0x53cc1c(0x135))[_0x53cc1c(0x134)](),_0x3a41cb=_0xb1f5bf||_0x3d5828;if(!_0x3a41cb)throw CliErrors['validation'](_0x53cc1c(0x133),'Use\x20`'+CLI_BIN_NAME+_0x53cc1c(0x142)+CLI_BIN_NAME+_0x53cc1c(0x127));if(_0x3d5828)assertValidAppcode(_0x3d5828);const _0x5aeedd=resolveWriteConfigPath('project'),_0x2ee648=readConfigFile(_0x5aeedd),_0x354d42=resolveKnownApps(),_0x25e1d4=isRecord(_0x2ee648[_0x53cc1c(0x137)])?{..._0x2ee648[_0x53cc1c(0x137)]}:{},_0x5ac173=cloneProfile(_0x25e1d4[_0x3a41cb]),_0x1bea16=sanitizeProfile(_0x354d42[_0x3a41cb]),_0x36233c=_0x3d5828?{}:_0x1bea16,_0x56f2bf=_0x3d5828||_0x36233c[_0x53cc1c(0x135)];if(!_0x56f2bf){const _0x52acde=Object[_0x53cc1c(0x122)](_0x354d42),_0x49c083=_0x52acde[_0x53cc1c(0x149)]===0x0?_0x53cc1c(0x11e)+CLI_BIN_NAME+_0x53cc1c(0x13c)+_0x457252+_0x53cc1c(0x13d)+_0x3a41cb+'\x20--appcode\x20<code>`.':_0x53cc1c(0x153)+_0x52acde[_0x53cc1c(0x148)](',\x20');throw CliErrors[_0x53cc1c(0x13a)](_0x53cc1c(0x143)+_0x3a41cb+_0x53cc1c(0x12e),_0x49c083);}assertValidAppcode(String(_0x56f2bf));const _0x1fe878={..._0x36233c,..._0x5ac173,'appcode':String(_0x56f2bf),...collectWorkspaceProfileOverrides(_0x5a40d8)};return _0x25e1d4[_0x3a41cb]=_0x1fe878,_0x2ee648[_0x53cc1c(0x137)]=_0x25e1d4,normalizeStoredDefaultApp(_0x2ee648,_0x3a41cb),delete _0x2ee648[_0x53cc1c(0x135)],delete _0x2ee648[_0x53cc1c(0x14d)],_0x1fe878['env']&&(_0x2ee648[_0x53cc1c(0x124)]=_0x1fe878[_0x53cc1c(0x124)]),writeConfigFile(_0x5aeedd,_0x2ee648),{'ok':!![],'message':_0x53cc1c(0x14a)+(_0x457252===_0x53cc1c(0x12b)?'initialized':_0x53cc1c(0x125))+':\x20'+_0x3a41cb+_0x53cc1c(0x145)+_0x1fe878['appcode']+_0x53cc1c(0x152)+_0x5aeedd+'.\x20Credentials:\x20not\x20written.','data':{'operation':'workspace.'+_0x457252,'configPath':_0x5aeedd,'app':_0x3a41cb,'appcode':_0x1fe878[_0x53cc1c(0x135)],'env':_0x1fe878[_0x53cc1c(0x124)]??null,'credentialsWritten':![]}};}const workspaceInitDefinition={'service':a228_0xa5f72c(0x121),'command':a228_0xa5f72c(0x12b),'description':a228_0xa5f72c(0x12c),'risk':a228_0xa5f72c(0x155),'requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x540a07=>configureWorkspace(_0x540a07,a228_0xa5f72c(0x12b))},workspaceUseDefinition={'service':a228_0xa5f72c(0x121),'command':a228_0xa5f72c(0x12d),'description':a228_0xa5f72c(0x11f),'risk':'write','requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x4d83a3=>configureWorkspace(_0x4d83a3,a228_0xa5f72c(0x12d))};export const workspaceDefinitions=[workspaceInitDefinition,workspaceUseDefinition,workspaceAddDefinition,workspaceRemoveDefinition];function a228_0x15e8(_0x200293,_0x5f1b40){_0x200293=_0x200293-0x11d;const _0x17160e=a228_0x1716();let _0x15e8a6=_0x17160e[_0x200293];return _0x15e8a6;}export{WORKSPACE_USAGE};
@@ -1 +1 @@
1
- const a229_0x4bf4ea=a229_0xf3fe;function a229_0x1588(){const _0x232043=['6268505FPfThn','2ibHcOq','1144201KjJrbR','remove','1609278YrenHI','workspace\x20remove','225XQWhLN','write','848720HeIkvW','workspace','10339469jkdFHa','App\x20profile\x20name\x20to\x20remove','2702160VdBLMJ','1608570yenGVt','name'];a229_0x1588=function(){return _0x232043;};return a229_0x1588();}(function(_0xef76fa,_0x4929bd){const _0x1f15c7=a229_0xf3fe,_0x167c8a=_0xef76fa();while(!![]){try{const _0x3b5502=-parseInt(_0x1f15c7(0x131))/0x1*(parseInt(_0x1f15c7(0x130))/0x2)+parseInt(_0x1f15c7(0x12d))/0x3+-parseInt(_0x1f15c7(0x12c))/0x4+parseInt(_0x1f15c7(0x12f))/0x5+-parseInt(_0x1f15c7(0x133))/0x6+-parseInt(_0x1f15c7(0x12a))/0x7+parseInt(_0x1f15c7(0x137))/0x8*(parseInt(_0x1f15c7(0x135))/0x9);if(_0x3b5502===_0x4929bd)break;else _0x167c8a['push'](_0x167c8a['shift']());}catch(_0x7256eb){_0x167c8a['push'](_0x167c8a['shift']());}}}(a229_0x1588,0xd6240));import{buildAppRemoveFlags,runAppRemove,validateAppName}from'../../commands/common/app-registry.js';function a229_0xf3fe(_0x110ecb,_0x4dcec9){_0x110ecb=_0x110ecb-0x129;const _0x1588e4=a229_0x1588();let _0xf3fe66=_0x1588e4[_0x110ecb];return _0xf3fe66;}export const workspaceRemoveDefinition={'service':a229_0x4bf4ea(0x129),'command':a229_0x4bf4ea(0x132),'description':'Remove\x20an\x20app\x20profile\x20from\x20the\x20current\x20workspace\x20(or\x20--global)','risk':a229_0x4bf4ea(0x136),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a229_0x4bf4ea(0x12e),'description':a229_0x4bf4ea(0x12b),'required':!![]}],'flags':buildAppRemoveFlags(),'validate':_0x28f39d=>validateAppName(_0x28f39d,a229_0x4bf4ea(0x134)),'execute':_0xd745b2=>runAppRemove(_0xd745b2,a229_0x4bf4ea(0x134))};
1
+ function a229_0x7fb5(){const _0x50d9fa=['26FzSLhS','workspace','3TzrzEr','174lTYszH','write','4532JtsgeF','867580OlWpTg','1934568DuajLD','remove','1598608PYSHFT','workspace\x20remove','3826450NLqNpy','281988OBuYME','App\x20profile\x20name\x20to\x20remove','27770rCUnbW','Remove\x20an\x20app\x20profile\x20from\x20the\x20current\x20workspace\x20(or\x20--global)','name'];a229_0x7fb5=function(){return _0x50d9fa;};return a229_0x7fb5();}const a229_0x1de710=a229_0x5582;function a229_0x5582(_0xb32c60,_0x2a60f6){_0xb32c60=_0xb32c60-0x161;const _0x7fb52=a229_0x7fb5();let _0x5582b2=_0x7fb52[_0xb32c60];return _0x5582b2;}(function(_0x4f1714,_0x47e31b){const _0x25859f=a229_0x5582,_0xdf295c=_0x4f1714();while(!![]){try{const _0x3a43b2=-parseInt(_0x25859f(0x16a))/0x1*(-parseInt(_0x25859f(0x165))/0x2)+parseInt(_0x25859f(0x167))/0x3*(parseInt(_0x25859f(0x171))/0x4)+-parseInt(_0x25859f(0x162))/0x5*(-parseInt(_0x25859f(0x168))/0x6)+-parseInt(_0x25859f(0x16b))/0x7+-parseInt(_0x25859f(0x16e))/0x8+-parseInt(_0x25859f(0x16c))/0x9+parseInt(_0x25859f(0x170))/0xa;if(_0x3a43b2===_0x47e31b)break;else _0xdf295c['push'](_0xdf295c['shift']());}catch(_0x25d68e){_0xdf295c['push'](_0xdf295c['shift']());}}}(a229_0x7fb5,0x20d06));import{buildAppRemoveFlags,runAppRemove,validateAppName}from'../../commands/common/app-registry.js';export const workspaceRemoveDefinition={'service':a229_0x1de710(0x166),'command':a229_0x1de710(0x16d),'description':a229_0x1de710(0x163),'risk':a229_0x1de710(0x169),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a229_0x1de710(0x164),'description':a229_0x1de710(0x161),'required':!![]}],'flags':buildAppRemoveFlags(),'validate':_0x32be46=>validateAppName(_0x32be46,'workspace\x20remove'),'execute':_0x13e875=>runAppRemove(_0x13e875,a229_0x1de710(0x16f))};
@@ -1,12 +1,9 @@
1
- import { ENTERPRISE_ROUTING_CDN_FIELDS, ENTERPRISE_ROUTING_DOMAIN_FIELDS, ENTERPRISE_ROUTING_CONSUMERS } from "../generated/routing-contract.js";
1
+ import { ENTERPRISE_ROUTING_CDN_FIELDS, ENTERPRISE_ROUTING_DOMAIN_FIELDS } from "../generated/routing-contract.js";
2
2
  export declare const DOMAIN_CONFIG_FIELDS: readonly ["userDomain", "apiDomain", "runtimeDomain", "skillDomain", "kbDomain", "appDomain", "localDomain", "certificateDomain"];
3
3
  export type DomainConfigField = (typeof DOMAIN_CONFIG_FIELDS)[number];
4
4
  export type DomainConfig = Partial<Record<DomainConfigField, string>>;
5
5
  export type EnterpriseRoutingDomainField = (typeof ENTERPRISE_ROUTING_DOMAIN_FIELDS)[number];
6
- export type EnterpriseRoutingConsumer = (typeof ENTERPRISE_ROUTING_CONSUMERS)[number];
7
- export type EnterpriseRoutingDomainOverrides = Partial<Record<"default" | EnterpriseRoutingConsumer, string>>;
8
- export type EnterpriseRoutingDomainValue = string | EnterpriseRoutingDomainOverrides;
9
- export type EnterpriseRoutingDomains = Record<EnterpriseRoutingDomainField, EnterpriseRoutingDomainValue | undefined>;
6
+ export type EnterpriseRoutingDomains = Record<EnterpriseRoutingDomainField, string | undefined>;
10
7
  export type EnterpriseRoutingCdnField = (typeof ENTERPRISE_ROUTING_CDN_FIELDS)[number];
11
8
  export type EnterpriseRoutingCdn = Record<EnterpriseRoutingCdnField, string>;
12
9
  export type DomainConfigInput = {
@@ -21,7 +18,7 @@ export type DomainConfigInput = {
21
18
  /** Old domain keys accepted only while reading existing configuration. */
22
19
  export declare const LEGACY_DOMAIN_CONFIG_FIELDS: readonly ["agentDomain", "platformDomain", "skillHubDomain"];
23
20
  export declare function normalizeDomainOrigin(field: DomainConfigField | EnterpriseRoutingDomainField, input: unknown): string;
24
- export declare function normalizeRoutingDomainValue(field: EnterpriseRoutingDomainField, input: unknown): EnterpriseRoutingDomainValue;
21
+ export declare function normalizeRoutingDomainValue(field: EnterpriseRoutingDomainField, input: unknown): string;
25
22
  export declare function normalizeCdnBaseUrl(field: EnterpriseRoutingCdnField, input: unknown): string;
26
23
  /**
27
24
  * Parse the optional enterprise routing value stored in CLI configuration.
@@ -32,7 +29,6 @@ export declare function resolveEnterpriseRoutingConfig(input: unknown): DomainCo
32
29
  export declare function resolveEnterpriseRoutingManifest(input: unknown): Extract<DomainConfigInput, {
33
30
  mode: "enterprise-v1";
34
31
  }> | undefined;
35
- export declare function resolveRoutingDomainValue(field: EnterpriseRoutingDomainField, value: EnterpriseRoutingDomainValue, consumer: EnterpriseRoutingConsumer): string;
36
32
  export declare function readDomainConfigInput(filePath: string): DomainConfigInput;
37
33
  export declare function readDomainConfig(filePath: string): DomainConfig;
38
34
  export declare function resolveDomainConfigInput(ctx: {
@@ -1 +1 @@
1
- const a230_0xbaf8f5=a230_0x1794;function a230_0x4a83(){const _0x3d4f11=[':\x20expected\x20a\x20non-empty\x20HTTPS\x20origin.','username','Allowed\x20consumers:\x20','isArray','default','replace','\x20does\x20not\x20provide\x20a\x20Domain\x20for\x20','362958gqLnwy','enterprise-v1','Allowed\x20fields:\x20','certificateDomain','origin','certificate-domain','\x22\x20is\x20not\x20a\x20valid\x20URL.','skill-domain','platformDomain','124xhgNBG','32761160JjuvFA','includes','domains','Invalid\x20enterprise\x20routing\x20manifest:\x20cdn\x20must\x20be\x20an\x20object.',':\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.',':\x20consumer\x20Domain\x20object\x20cannot\x20be\x20empty.','lovrabet','domain-config','Unsupported\x20','appDomain','pathname','https:','utf8','rabetbase-cli','mode','Invalid\x20domain\x20config:\x20provide\x20at\x20least\x20one\x20supported\x20Domain.','protocol','keys','runtimeDomain','localDomain','apiDomain','runtime-domain','href',':\x20expected\x20a\x20non-empty\x20HTTPS\x20URL.','kbDomain','Enterprise\x20',':\x20expected\x20an\x20HTTPS\x20','password','Domain\x20config\x20file\x20not\x20found:\x20','Invalid\x20enterprise\x20routing\x20manifest:\x20domains\x20must\x20be\x20an\x20object.',':\x20\x22','\x20without\x20credentials,\x20query,\x20or\x20fragment.','join','10550qbTWGB','kb-domain','filter','agentDomain','object','52210xmbyjt','str','userDomain','cdn','legacy','length','base\x20URL','kind','Invalid\x20domain\x20config:\x20expected\x20a\x20JSON\x20object.','skillHubDomain','Enterprise\x20routing\x20manifest\x20is\x20missing\x20required\x20Domain(s):\x20','string','1730772wdUZHw','Unsupported\x20enterprise\x20Domain\x20field(s):\x20','6623480CXUuAt','Unsupported\x20routing\x20manifest:\x20expected\x20protocol\x20\x22','Enterprise\x20routing\x20manifest\x20is\x20missing\x20required\x20CDN\x20field(s):\x20','Invalid\x20cdn.','133IGVvgm','trim','cwd','user-domain','local-domain','Invalid\x20','api-domain','222kiNzBV','Unsupported\x20enterprise\x20CDN\x20field(s):\x20','hash','app-domain','validation','For\x20internal\x20deployments,\x20terminate\x20TLS\x20at\x20the\x20ingress,\x20reverse\x20proxy,\x20or\x20load\x20balancer;\x20an\x20internal\x20CA\x20is\x20supported.','\x20consumer(s):\x20','812196iWokQy'];a230_0x4a83=function(){return _0x3d4f11;};return a230_0x4a83();}(function(_0x1afba4,_0x2bd393){const _0x38b551=a230_0x1794,_0x3fa707=_0x1afba4();while(!![]){try{const _0x260d6f=-parseInt(_0x38b551(0xb2))/0x1*(-parseInt(_0x38b551(0x94))/0x2)+parseInt(_0x38b551(0xb9))/0x3+-parseInt(_0x38b551(0xca))/0x4*(-parseInt(_0x38b551(0x99))/0x5)+parseInt(_0x38b551(0xc1))/0x6*(parseInt(_0x38b551(0xab))/0x7)+parseInt(_0x38b551(0xa7))/0x8+parseInt(_0x38b551(0xa5))/0x9+-parseInt(_0x38b551(0x73))/0xa;if(_0x260d6f===_0x2bd393)break;else _0x3fa707['push'](_0x3fa707['shift']());}catch(_0x54d956){_0x3fa707['push'](_0x3fa707['shift']());}}}(a230_0x4a83,0xa0e22));import{existsSync,readFileSync}from'node:fs';import{isAbsolute,resolve}from'node:path';import{CliErrors}from'../errors.js';import{ENTERPRISE_ROUTING_CDN_FIELDS,ENTERPRISE_ROUTING_DOMAIN_FIELDS,ENTERPRISE_ROUTING_KIND,ENTERPRISE_ROUTING_PROTOCOL,ENTERPRISE_ROUTING_TOP_LEVEL_FIELDS,ENTERPRISE_ROUTING_CONSUMERS,REQUIRED_ENTERPRISE_ROUTING_CDN_FIELDS,REQUIRED_ENTERPRISE_ROUTING_DOMAIN_FIELDS}from'../generated/routing-contract.js';export const DOMAIN_CONFIG_FIELDS=[a230_0xbaf8f5(0x9b),'apiDomain',a230_0xbaf8f5(0x85),'skillDomain',a230_0xbaf8f5(0x8b),a230_0xbaf8f5(0x7c),a230_0xbaf8f5(0x86),a230_0xbaf8f5(0xc4)];const DOMAIN_FLAGS={'userDomain':a230_0xbaf8f5(0xae),'apiDomain':a230_0xbaf8f5(0xb1),'runtimeDomain':a230_0xbaf8f5(0x88),'skillDomain':a230_0xbaf8f5(0xc8),'kbDomain':a230_0xbaf8f5(0x95),'appDomain':a230_0xbaf8f5(0xb5),'localDomain':a230_0xbaf8f5(0xaf),'certificateDomain':a230_0xbaf8f5(0xc6)};export const LEGACY_DOMAIN_CONFIG_FIELDS=[a230_0xbaf8f5(0x97),a230_0xbaf8f5(0xc9),a230_0xbaf8f5(0xa2)];const ENTERPRISE_TO_LOCAL_FIELD={'userDomain':'userDomain','apiDomain':a230_0xbaf8f5(0x87),'runtimeDomain':a230_0xbaf8f5(0x85),'skillDomain':'skillDomain','kbDomain':a230_0xbaf8f5(0x8b),'appDomain':a230_0xbaf8f5(0x7c),'localDomain':a230_0xbaf8f5(0x86),'certificateDomain':a230_0xbaf8f5(0xc4)},ROUTING_CONSUMER=a230_0xbaf8f5(0x80);export function normalizeDomainOrigin(_0x5b5132,_0x3f4dcb){const _0x49633a=a230_0xbaf8f5;if(typeof _0x3f4dcb!==_0x49633a(0xa4)||!_0x3f4dcb[_0x49633a(0xac)]())throw CliErrors[_0x49633a(0xb6)](_0x49633a(0xb0)+_0x5b5132+_0x49633a(0xba));let _0x777c9a;try{_0x777c9a=new URL(_0x3f4dcb[_0x49633a(0xac)]());}catch{throw CliErrors['validation'](_0x49633a(0xb0)+_0x5b5132+_0x49633a(0x91)+_0x3f4dcb+_0x49633a(0xc7));}if(_0x777c9a[_0x49633a(0x83)]!==_0x49633a(0x7e)||_0x777c9a[_0x49633a(0xbb)]||_0x777c9a[_0x49633a(0x8e)]||_0x777c9a[_0x49633a(0x7d)]!=='/'&&_0x777c9a['pathname']!==''||_0x777c9a['search']||_0x777c9a[_0x49633a(0xb4)])throw CliErrors[_0x49633a(0xb6)](_0x49633a(0xb0)+_0x5b5132+_0x49633a(0x77),_0x49633a(0xb7));return _0x777c9a[_0x49633a(0xc5)];}export function normalizeRoutingDomainValue(_0x2fa5a1,_0x182e96){const _0x175c2f=a230_0xbaf8f5;if(typeof _0x182e96===_0x175c2f(0xa4))return normalizeDomainOrigin(_0x2fa5a1,_0x182e96);if(!_0x182e96||typeof _0x182e96!==_0x175c2f(0x98)||Array[_0x175c2f(0xbd)](_0x182e96))throw CliErrors[_0x175c2f(0xb6)](_0x175c2f(0xb0)+_0x2fa5a1+':\x20expected\x20an\x20HTTPS\x20origin\x20or\x20consumer\x20Domain\x20object.');const _0xd76280=_0x182e96,_0x37e25b=Object['keys'](_0xd76280),_0x5e0105=[_0x175c2f(0xbe),...ENTERPRISE_ROUTING_CONSUMERS],_0x5a31d0=_0x37e25b[_0x175c2f(0x96)](_0x135d2c=>!_0x5e0105[_0x175c2f(0x74)](_0x135d2c));if(_0x5a31d0['length']>0x0)throw CliErrors[_0x175c2f(0xb6)](_0x175c2f(0x7b)+_0x2fa5a1+_0x175c2f(0xb8)+_0x5a31d0[_0x175c2f(0x93)](',\x20'),_0x175c2f(0xbc)+_0x5e0105['join'](',\x20'));if(_0x37e25b[_0x175c2f(0x9e)]===0x0)throw CliErrors[_0x175c2f(0xb6)](_0x175c2f(0xb0)+_0x2fa5a1+_0x175c2f(0x78));const _0x58af52={};for(const _0x2f19b0 of _0x37e25b){const _0x5198cb=_0x2f19b0;_0x58af52[_0x5198cb]=normalizeDomainOrigin(_0x2fa5a1,_0xd76280[_0x2f19b0]);}return _0x58af52;}export function normalizeCdnBaseUrl(_0x564141,_0x206653){const _0x392b30=a230_0xbaf8f5;if(typeof _0x206653!==_0x392b30(0xa4)||!_0x206653[_0x392b30(0xac)]())throw CliErrors[_0x392b30(0xb6)]('Invalid\x20cdn.'+_0x564141+_0x392b30(0x8a));const _0x189eb6=_0x206653[_0x392b30(0xac)]()[_0x392b30(0xbf)](/\/$/,'');let _0x2e7e91;try{_0x2e7e91=new URL(_0x189eb6);}catch{throw CliErrors['validation'](_0x392b30(0xaa)+_0x564141+':\x20\x22'+_0x206653+_0x392b30(0xc7));}if(_0x2e7e91[_0x392b30(0x83)]!==_0x392b30(0x7e)||_0x2e7e91[_0x392b30(0xbb)]||_0x2e7e91[_0x392b30(0x8e)]||_0x2e7e91['search']||_0x2e7e91[_0x392b30(0xb4)]||_0x2e7e91[_0x392b30(0x89)][_0x392b30(0xbf)](/\/$/,'')!==_0x189eb6||_0x564141===_0x392b30(0x79)&&_0x2e7e91[_0x392b30(0xc5)]!==_0x189eb6)throw CliErrors[_0x392b30(0xb6)](_0x392b30(0xaa)+_0x564141+_0x392b30(0x8d)+(_0x564141===_0x392b30(0x79)?_0x392b30(0xc5):_0x392b30(0x9f))+_0x392b30(0x92));return _0x189eb6;}export function resolveEnterpriseRoutingConfig(_0x349794){const _0x51feb4=a230_0xbaf8f5;return resolveEnterpriseRoutingManifest(_0x349794)?.[_0x51feb4(0x75)];}export function resolveEnterpriseRoutingManifest(_0x56571e){const _0xa9298=a230_0xbaf8f5;if(_0x56571e===undefined)return undefined;if(!_0x56571e||typeof _0x56571e!==_0xa9298(0x98)||Array[_0xa9298(0xbd)](_0x56571e))throw CliErrors[_0xa9298(0xb6)]('Invalid\x20enterprise\x20routing\x20config:\x20expected\x20an\x20object.');return parseEnterpriseRoutingManifest(_0x56571e);}export function resolveRoutingDomainValue(_0x4253b6,_0x531d27,_0x3f7d75){const _0x56a7ea=a230_0xbaf8f5;if(typeof _0x531d27===_0x56a7ea(0xa4))return _0x531d27;const _0x515a0a=_0x531d27[_0x3f7d75]??_0x531d27['default'];if(!_0x515a0a)throw CliErrors[_0x56a7ea(0xb6)](_0x56a7ea(0x8c)+_0x4253b6+_0x56a7ea(0xc0)+_0x3f7d75+'\x20and\x20has\x20no\x20default.');return _0x515a0a;}export function readDomainConfigInput(_0x5e4392){const _0x461f7d=a230_0xbaf8f5,_0x4862e9=isAbsolute(_0x5e4392)?_0x5e4392:resolve(process[_0x461f7d(0xad)](),_0x5e4392);if(!existsSync(_0x4862e9))throw CliErrors[_0x461f7d(0xb6)](_0x461f7d(0x8f)+_0x4862e9);let _0x639ba6;try{_0x639ba6=JSON['parse'](readFileSync(_0x4862e9,_0x461f7d(0x7f)));}catch{throw CliErrors['validation']('Invalid\x20domain\x20config\x20JSON:\x20'+_0x4862e9);}if(!_0x639ba6||typeof _0x639ba6!==_0x461f7d(0x98)||Array['isArray'](_0x639ba6))throw CliErrors[_0x461f7d(0xb6)](_0x461f7d(0xa1));const _0x13f104=_0x639ba6;if('protocol'in _0x13f104)return parseEnterpriseRoutingManifest(_0x13f104);const _0x353da2=Object['keys'](_0x13f104)[_0x461f7d(0x96)](_0x2ce49d=>!DOMAIN_CONFIG_FIELDS[_0x461f7d(0x74)](_0x2ce49d));if(_0x353da2[_0x461f7d(0x9e)]>0x0)throw CliErrors['validation']('Unsupported\x20domain\x20config\x20field(s):\x20'+_0x353da2[_0x461f7d(0x93)](',\x20'),'Allowed\x20fields:\x20'+DOMAIN_CONFIG_FIELDS[_0x461f7d(0x93)](',\x20'));const _0x25905b={};for(const _0x4cf122 of DOMAIN_CONFIG_FIELDS){_0x13f104[_0x4cf122]!==undefined&&(_0x25905b[_0x4cf122]=normalizeDomainOrigin(_0x4cf122,_0x13f104[_0x4cf122]));}if(Object[_0x461f7d(0x84)](_0x25905b)[_0x461f7d(0x9e)]===0x0)throw CliErrors[_0x461f7d(0xb6)](_0x461f7d(0x82));return{'mode':_0x461f7d(0x9d),'domains':_0x25905b};}export function readDomainConfig(_0x5d7fe0){return readDomainConfigInput(_0x5d7fe0)['domains'];}export function resolveDomainConfigInput(_0x1175d5){const _0x1f52b4=a230_0xbaf8f5,_0xb3d986=(_0x1175d5['str'](_0x1f52b4(0x7a))||'')[_0x1f52b4(0xac)](),_0x4822bd=_0xb3d986?readDomainConfigInput(_0xb3d986):{'mode':_0x1f52b4(0x9d),'domains':{}},_0x11840e=DOMAIN_CONFIG_FIELDS[_0x1f52b4(0x96)](_0xb0e778=>Boolean((_0x1175d5[_0x1f52b4(0x9a)](DOMAIN_FLAGS[_0xb0e778])||'')[_0x1f52b4(0xac)]()));if(_0x4822bd[_0x1f52b4(0x81)]===_0x1f52b4(0xc2)&&_0x11840e[_0x1f52b4(0x9e)]>0x0)throw CliErrors['validation']('Enterprise\x20routing\x20manifests\x20cannot\x20be\x20combined\x20with\x20individual\x20Domain\x20flags.','Update\x20the\x20manifest\x20so\x20both\x20CLIs\x20consume\x20the\x20same\x20routing\x20data.');for(const _0x218285 of DOMAIN_CONFIG_FIELDS){const _0x4e51cf=(_0x1175d5[_0x1f52b4(0x9a)](DOMAIN_FLAGS[_0x218285])||'')[_0x1f52b4(0xac)]();if(_0x4e51cf)_0x4822bd[_0x1f52b4(0x75)][_0x218285]=normalizeDomainOrigin(_0x218285,_0x4e51cf);}return _0x4822bd;}function a230_0x1794(_0x19532b,_0x4c737c){_0x19532b=_0x19532b-0x73;const _0x4a83bf=a230_0x4a83();let _0x179456=_0x4a83bf[_0x19532b];return _0x179456;}export function resolveDomainFlags(_0x566409){return resolveDomainConfigInput(_0x566409)['domains'];}export function parseEnterpriseRoutingManifest(_0x5ab4f0){const _0x49103b=a230_0xbaf8f5,_0x36fd79=Object[_0x49103b(0x84)](_0x5ab4f0)[_0x49103b(0x96)](_0x4adf51=>!ENTERPRISE_ROUTING_TOP_LEVEL_FIELDS[_0x49103b(0x74)](_0x4adf51));if(_0x36fd79['length']>0x0)throw CliErrors['validation']('Unsupported\x20enterprise\x20routing\x20field(s):\x20'+_0x36fd79[_0x49103b(0x93)](',\x20'));if(_0x5ab4f0[_0x49103b(0x83)]!==ENTERPRISE_ROUTING_PROTOCOL||_0x5ab4f0[_0x49103b(0xa0)]!==ENTERPRISE_ROUTING_KIND)throw CliErrors[_0x49103b(0xb6)](_0x49103b(0xa8)+ENTERPRISE_ROUTING_PROTOCOL+'\x22\x20and\x20kind\x20\x22'+ENTERPRISE_ROUTING_KIND+'\x22.');if(!_0x5ab4f0[_0x49103b(0x75)]||typeof _0x5ab4f0[_0x49103b(0x75)]!=='object'||Array[_0x49103b(0xbd)](_0x5ab4f0[_0x49103b(0x75)]))throw CliErrors['validation'](_0x49103b(0x90));if(!_0x5ab4f0['cdn']||typeof _0x5ab4f0['cdn']!==_0x49103b(0x98)||Array[_0x49103b(0xbd)](_0x5ab4f0[_0x49103b(0x9c)]))throw CliErrors[_0x49103b(0xb6)](_0x49103b(0x76));const _0x433697=_0x5ab4f0['domains'],_0x4887fb=Object['keys'](_0x433697)[_0x49103b(0x96)](_0x2b7149=>!ENTERPRISE_ROUTING_DOMAIN_FIELDS[_0x49103b(0x74)](_0x2b7149));if(_0x4887fb[_0x49103b(0x9e)]>0x0)throw CliErrors[_0x49103b(0xb6)](_0x49103b(0xa6)+_0x4887fb[_0x49103b(0x93)](',\x20'),_0x49103b(0xc3)+ENTERPRISE_ROUTING_DOMAIN_FIELDS[_0x49103b(0x93)](',\x20'));const _0x3c528b=REQUIRED_ENTERPRISE_ROUTING_DOMAIN_FIELDS[_0x49103b(0x96)](_0x2d1372=>_0x433697[_0x2d1372]===undefined);if(_0x3c528b[_0x49103b(0x9e)]>0x0)throw CliErrors[_0x49103b(0xb6)](_0x49103b(0xa3)+_0x3c528b[_0x49103b(0x93)](',\x20'));if(_0x433697[_0x49103b(0x86)]===undefined!==(_0x433697[_0x49103b(0xc4)]===undefined))throw CliErrors['validation']('Enterprise\x20routing\x20manifest\x20requires\x20localDomain\x20and\x20certificateDomain\x20together.');const _0x11c563=_0x5ab4f0[_0x49103b(0x9c)],_0x443e00=Object['keys'](_0x11c563)[_0x49103b(0x96)](_0x348575=>!ENTERPRISE_ROUTING_CDN_FIELDS[_0x49103b(0x74)](_0x348575));if(_0x443e00['length']>0x0)throw CliErrors[_0x49103b(0xb6)](_0x49103b(0xb3)+_0x443e00['join'](',\x20'),_0x49103b(0xc3)+ENTERPRISE_ROUTING_CDN_FIELDS[_0x49103b(0x93)](',\x20'));const _0xb3df30=REQUIRED_ENTERPRISE_ROUTING_CDN_FIELDS['filter'](_0x194218=>_0x11c563[_0x194218]===undefined);if(_0xb3df30[_0x49103b(0x9e)]>0x0)throw CliErrors[_0x49103b(0xb6)](_0x49103b(0xa9)+_0xb3df30[_0x49103b(0x93)](',\x20'));const _0xb9d289={};for(const _0x365aad of ENTERPRISE_ROUTING_CDN_FIELDS){_0xb9d289[_0x365aad]=normalizeCdnBaseUrl(_0x365aad,_0x11c563[_0x365aad]);}const _0xbd5a4={},_0x312f30={};for(const _0x380d87 of ENTERPRISE_ROUTING_DOMAIN_FIELDS){const _0x479d92=_0x433697[_0x380d87];if(_0x479d92===undefined)continue;const _0x30940d=normalizeRoutingDomainValue(_0x380d87,_0x479d92);_0xbd5a4[_0x380d87]=_0x30940d;const _0xeb04c8=ENTERPRISE_TO_LOCAL_FIELD[_0x380d87];_0xeb04c8&&(_0x312f30[_0xeb04c8]=resolveRoutingDomainValue(_0x380d87,_0x30940d,ROUTING_CONSUMER));}return{'mode':_0x49103b(0xc2),'domains':_0x312f30,'manifestDomains':_0xbd5a4,'cdn':_0xb9d289};}
1
+ const a230_0x23b41d=a230_0x2a3a;(function(_0xefaa6d,_0x5e21c6){const _0x2e4ebe=a230_0x2a3a,_0x234687=_0xefaa6d();while(!![]){try{const _0x2c6d9e=parseInt(_0x2e4ebe(0x141))/0x1*(parseInt(_0x2e4ebe(0x185))/0x2)+parseInt(_0x2e4ebe(0x17c))/0x3*(parseInt(_0x2e4ebe(0x152))/0x4)+-parseInt(_0x2e4ebe(0x175))/0x5+parseInt(_0x2e4ebe(0x13d))/0x6+parseInt(_0x2e4ebe(0x142))/0x7*(parseInt(_0x2e4ebe(0x148))/0x8)+parseInt(_0x2e4ebe(0x164))/0x9*(-parseInt(_0x2e4ebe(0x13b))/0xa)+parseInt(_0x2e4ebe(0x13e))/0xb*(parseInt(_0x2e4ebe(0x137))/0xc);if(_0x2c6d9e===_0x5e21c6)break;else _0x234687['push'](_0x234687['shift']());}catch(_0x7358a0){_0x234687['push'](_0x234687['shift']());}}}(a230_0x3966,0x2f24a));import{existsSync,readFileSync}from'node:fs';import{isAbsolute,resolve}from'node:path';import{CliErrors}from'../errors.js';import{ENTERPRISE_ROUTING_CDN_FIELDS,ENTERPRISE_ROUTING_DOMAIN_FIELDS,ENTERPRISE_ROUTING_KIND,ENTERPRISE_ROUTING_PROTOCOL,REQUIRED_ENTERPRISE_ROUTING_CDN_FIELDS,REQUIRED_ENTERPRISE_ROUTING_DOMAIN_FIELDS}from'../generated/routing-contract.js';export const DOMAIN_CONFIG_FIELDS=[a230_0x23b41d(0x15a),a230_0x23b41d(0x160),a230_0x23b41d(0x154),'skillDomain',a230_0x23b41d(0x17d),a230_0x23b41d(0x15c),'localDomain',a230_0x23b41d(0x136)];const DOMAIN_FLAGS={'userDomain':a230_0x23b41d(0x162),'apiDomain':a230_0x23b41d(0x144),'runtimeDomain':a230_0x23b41d(0x15e),'skillDomain':a230_0x23b41d(0x157),'kbDomain':a230_0x23b41d(0x138),'appDomain':a230_0x23b41d(0x187),'localDomain':a230_0x23b41d(0x14f),'certificateDomain':a230_0x23b41d(0x13c)};export const LEGACY_DOMAIN_CONFIG_FIELDS=[a230_0x23b41d(0x183),a230_0x23b41d(0x147),a230_0x23b41d(0x16a)];function a230_0x3966(){const _0x593703=['kbDomain','localDomain','join','validation','Enterprise\x20routing\x20manifest\x20is\x20missing\x20required\x20CDN\x20field(s):\x20','object','agentDomain','Invalid\x20enterprise\x20routing\x20manifest:\x20domains\x20must\x20be\x20an\x20object.','2oXtvUv','skillDomain','app-domain','Unsupported\x20routing\x20manifest:\x20expected\x20protocol\x20\x22','trim','string','Domain\x20config\x20file\x20not\x20found:\x20','enterprise-v1','domain-config','\x20without\x20credentials,\x20query,\x20or\x20fragment.','certificateDomain','12gaVGWP','kb-domain','Invalid\x20cdn.','keys','2327530TnFIdM','certificate-domain','66648Ysoper','5620109hoCTZp','cdn','str','85061ZSIUJu','14gmmIRF','isArray','api-domain',':\x20expected\x20a\x20non-empty\x20HTTPS\x20URL.','kind','platformDomain','157088xyQIwu','search','default','filter',':\x20\x22','Unsupported\x20enterprise\x20CDN\x20field(s):\x20','password','local-domain','utf8','mode','4528SagHTZ','Unsupported\x20domain\x20config\x20field(s):\x20','runtimeDomain',':\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.','username','skill-domain',':\x20expected\x20a\x20non-empty\x20HTTPS\x20origin.','origin','userDomain','Invalid\x20domain\x20config\x20JSON:\x20','appDomain','hash','runtime-domain','https:','apiDomain','Enterprise\x20','user-domain','lovrabet','9lXrsRm','Invalid\x20domain\x20config:\x20expected\x20a\x20JSON\x20object.','length','replace','Enterprise\x20routing\x20manifest\x20is\x20missing\x20required\x20Domain(s):\x20','\x20does\x20not\x20provide\x20a\x20Domain\x20for\x20','skillHubDomain','Update\x20the\x20manifest\x20so\x20both\x20CLIs\x20consume\x20the\x20same\x20routing\x20data.','Enterprise\x20routing\x20manifest\x20requires\x20localDomain\x20and\x20certificateDomain\x20together.','domains','Invalid\x20','legacy','href','cwd','protocol','base\x20URL','pathname','1719485UgXcMf',':\x20expected\x20an\x20HTTPS\x20','Allowed\x20fields:\x20','For\x20internal\x20deployments,\x20terminate\x20TLS\x20at\x20the\x20ingress,\x20reverse\x20proxy,\x20or\x20load\x20balancer;\x20an\x20internal\x20CA\x20is\x20supported.',':\x20expected\x20an\x20HTTPS\x20origin\x20or\x20consumer\x20Domain\x20object.','includes','\x22\x20and\x20kind\x20\x22','327qyUrEE'];a230_0x3966=function(){return _0x593703;};return a230_0x3966();}function a230_0x2a3a(_0x30b01d,_0x3efd6e){_0x30b01d=_0x30b01d-0x133;const _0x3966e6=a230_0x3966();let _0x2a3a22=_0x3966e6[_0x30b01d];return _0x2a3a22;}const ENTERPRISE_TO_LOCAL_FIELD={'userDomain':a230_0x23b41d(0x15a),'apiDomain':'apiDomain','runtimeDomain':a230_0x23b41d(0x154),'skillDomain':a230_0x23b41d(0x186),'kbDomain':a230_0x23b41d(0x17d),'appDomain':a230_0x23b41d(0x15c),'localDomain':a230_0x23b41d(0x17e),'certificateDomain':a230_0x23b41d(0x136)},ROUTING_CONSUMER='rabetbase-cli';export function normalizeDomainOrigin(_0x472502,_0x532670){const _0x577969=a230_0x23b41d;if(typeof _0x532670!=='string'||!_0x532670[_0x577969(0x189)]())throw CliErrors['validation'](_0x577969(0x16e)+_0x472502+_0x577969(0x158));let _0x273cb0;try{_0x273cb0=new URL(_0x532670[_0x577969(0x189)]());}catch{throw CliErrors[_0x577969(0x180)](_0x577969(0x16e)+_0x472502+_0x577969(0x14c)+_0x532670+'\x22\x20is\x20not\x20a\x20valid\x20URL.');}if(_0x273cb0[_0x577969(0x172)]!==_0x577969(0x15f)||_0x273cb0[_0x577969(0x156)]||_0x273cb0[_0x577969(0x14e)]||_0x273cb0[_0x577969(0x174)]!=='/'&&_0x273cb0[_0x577969(0x174)]!==''||_0x273cb0[_0x577969(0x149)]||_0x273cb0[_0x577969(0x15d)])throw CliErrors[_0x577969(0x180)](_0x577969(0x16e)+_0x472502+_0x577969(0x155),_0x577969(0x178));return _0x273cb0[_0x577969(0x159)];}export function normalizeRoutingDomainValue(_0x3be143,_0x4fb57f){const _0x59f696=a230_0x23b41d;if(typeof _0x4fb57f==='string')return normalizeDomainOrigin(_0x3be143,_0x4fb57f);if(!_0x4fb57f||typeof _0x4fb57f!==_0x59f696(0x182)||Array[_0x59f696(0x143)](_0x4fb57f))throw CliErrors[_0x59f696(0x180)](_0x59f696(0x16e)+_0x3be143+_0x59f696(0x179));const _0x8b9945=_0x4fb57f,_0x56bca4=_0x8b9945[ROUTING_CONSUMER]??_0x8b9945[_0x59f696(0x14a)];if(_0x56bca4===undefined)throw CliErrors['validation'](_0x59f696(0x161)+_0x3be143+_0x59f696(0x169)+ROUTING_CONSUMER+'\x20and\x20has\x20no\x20default.');return normalizeDomainOrigin(_0x3be143,_0x56bca4);}export function normalizeCdnBaseUrl(_0x11d5d2,_0x10359c){const _0x10423d=a230_0x23b41d;if(typeof _0x10359c!==_0x10423d(0x18a)||!_0x10359c[_0x10423d(0x189)]())throw CliErrors[_0x10423d(0x180)](_0x10423d(0x139)+_0x11d5d2+_0x10423d(0x145));const _0x281169=_0x10359c[_0x10423d(0x189)]()[_0x10423d(0x167)](/\/$/,'');let _0x4abcb4;try{_0x4abcb4=new URL(_0x281169);}catch{throw CliErrors[_0x10423d(0x180)](_0x10423d(0x139)+_0x11d5d2+_0x10423d(0x14c)+_0x10359c+'\x22\x20is\x20not\x20a\x20valid\x20URL.');}if(_0x4abcb4[_0x10423d(0x172)]!==_0x10423d(0x15f)||_0x4abcb4['username']||_0x4abcb4[_0x10423d(0x14e)]||_0x4abcb4[_0x10423d(0x149)]||_0x4abcb4['hash']||_0x4abcb4[_0x10423d(0x170)]['replace'](/\/$/,'')!==_0x281169||_0x11d5d2==='lovrabet'&&_0x4abcb4['origin']!==_0x281169)throw CliErrors['validation'](_0x10423d(0x139)+_0x11d5d2+_0x10423d(0x176)+(_0x11d5d2===_0x10423d(0x163)?_0x10423d(0x159):_0x10423d(0x173))+_0x10423d(0x135));return _0x281169;}export function resolveEnterpriseRoutingConfig(_0x15c4bf){const _0x41e498=a230_0x23b41d;return resolveEnterpriseRoutingManifest(_0x15c4bf)?.[_0x41e498(0x16d)];}export function resolveEnterpriseRoutingManifest(_0x187b74){const _0xb384ed=a230_0x23b41d;if(_0x187b74===undefined)return undefined;if(!_0x187b74||typeof _0x187b74!==_0xb384ed(0x182)||Array[_0xb384ed(0x143)](_0x187b74))throw CliErrors[_0xb384ed(0x180)]('Invalid\x20enterprise\x20routing\x20config:\x20expected\x20an\x20object.');return parseEnterpriseRoutingManifest(_0x187b74);}export function readDomainConfigInput(_0x4edaec){const _0x2e81ed=a230_0x23b41d,_0x27d228=isAbsolute(_0x4edaec)?_0x4edaec:resolve(process[_0x2e81ed(0x171)](),_0x4edaec);if(!existsSync(_0x27d228))throw CliErrors[_0x2e81ed(0x180)](_0x2e81ed(0x18b)+_0x27d228);let _0x3ff8ea;try{_0x3ff8ea=JSON['parse'](readFileSync(_0x27d228,_0x2e81ed(0x150)));}catch{throw CliErrors[_0x2e81ed(0x180)](_0x2e81ed(0x15b)+_0x27d228);}if(!_0x3ff8ea||typeof _0x3ff8ea!=='object'||Array[_0x2e81ed(0x143)](_0x3ff8ea))throw CliErrors[_0x2e81ed(0x180)](_0x2e81ed(0x165));const _0x3fc8af=_0x3ff8ea;if(_0x2e81ed(0x172)in _0x3fc8af)return parseEnterpriseRoutingManifest(_0x3fc8af);const _0x19c649=Object[_0x2e81ed(0x13a)](_0x3fc8af)[_0x2e81ed(0x14b)](_0x387fec=>!DOMAIN_CONFIG_FIELDS[_0x2e81ed(0x17a)](_0x387fec));if(_0x19c649['length']>0x0)throw CliErrors[_0x2e81ed(0x180)](_0x2e81ed(0x153)+_0x19c649[_0x2e81ed(0x17f)](',\x20'),'Allowed\x20fields:\x20'+DOMAIN_CONFIG_FIELDS['join'](',\x20'));const _0x5eb843={};for(const _0xfa5e5b of DOMAIN_CONFIG_FIELDS){_0x3fc8af[_0xfa5e5b]!==undefined&&(_0x5eb843[_0xfa5e5b]=normalizeDomainOrigin(_0xfa5e5b,_0x3fc8af[_0xfa5e5b]));}if(Object[_0x2e81ed(0x13a)](_0x5eb843)['length']===0x0)throw CliErrors[_0x2e81ed(0x180)]('Invalid\x20domain\x20config:\x20provide\x20at\x20least\x20one\x20supported\x20Domain.');return{'mode':'legacy','domains':_0x5eb843};}export function readDomainConfig(_0xf0954d){const _0x2749f0=a230_0x23b41d;return readDomainConfigInput(_0xf0954d)[_0x2749f0(0x16d)];}export function resolveDomainConfigInput(_0x36a413){const _0xe7484a=a230_0x23b41d,_0x5da317=(_0x36a413[_0xe7484a(0x140)](_0xe7484a(0x134))||'')['trim'](),_0x49faf1=_0x5da317?readDomainConfigInput(_0x5da317):{'mode':_0xe7484a(0x16f),'domains':{}},_0xca544f=DOMAIN_CONFIG_FIELDS[_0xe7484a(0x14b)](_0x45fb22=>Boolean((_0x36a413['str'](DOMAIN_FLAGS[_0x45fb22])||'')[_0xe7484a(0x189)]()));if(_0x49faf1[_0xe7484a(0x151)]===_0xe7484a(0x133)&&_0xca544f[_0xe7484a(0x166)]>0x0)throw CliErrors[_0xe7484a(0x180)]('Enterprise\x20routing\x20manifests\x20cannot\x20be\x20combined\x20with\x20individual\x20Domain\x20flags.',_0xe7484a(0x16b));for(const _0xb9c147 of DOMAIN_CONFIG_FIELDS){const _0xf581e3=(_0x36a413['str'](DOMAIN_FLAGS[_0xb9c147])||'')['trim']();if(_0xf581e3)_0x49faf1[_0xe7484a(0x16d)][_0xb9c147]=normalizeDomainOrigin(_0xb9c147,_0xf581e3);}return _0x49faf1;}export function resolveDomainFlags(_0x324cb4){const _0xa4eff4=a230_0x23b41d;return resolveDomainConfigInput(_0x324cb4)[_0xa4eff4(0x16d)];}export function parseEnterpriseRoutingManifest(_0x2fb93b){const _0x5976a0=a230_0x23b41d;if(_0x2fb93b[_0x5976a0(0x172)]!==ENTERPRISE_ROUTING_PROTOCOL||_0x2fb93b[_0x5976a0(0x146)]!==ENTERPRISE_ROUTING_KIND)throw CliErrors[_0x5976a0(0x180)](_0x5976a0(0x188)+ENTERPRISE_ROUTING_PROTOCOL+_0x5976a0(0x17b)+ENTERPRISE_ROUTING_KIND+'\x22.');if(!_0x2fb93b[_0x5976a0(0x16d)]||typeof _0x2fb93b[_0x5976a0(0x16d)]!==_0x5976a0(0x182)||Array[_0x5976a0(0x143)](_0x2fb93b[_0x5976a0(0x16d)]))throw CliErrors['validation'](_0x5976a0(0x184));if(!_0x2fb93b[_0x5976a0(0x13f)]||typeof _0x2fb93b[_0x5976a0(0x13f)]!==_0x5976a0(0x182)||Array[_0x5976a0(0x143)](_0x2fb93b[_0x5976a0(0x13f)]))throw CliErrors[_0x5976a0(0x180)]('Invalid\x20enterprise\x20routing\x20manifest:\x20cdn\x20must\x20be\x20an\x20object.');const _0x3e67c5=_0x2fb93b[_0x5976a0(0x16d)],_0x2f0134=REQUIRED_ENTERPRISE_ROUTING_DOMAIN_FIELDS[_0x5976a0(0x14b)](_0x2c469a=>_0x3e67c5[_0x2c469a]===undefined);if(_0x2f0134[_0x5976a0(0x166)]>0x0)throw CliErrors['validation'](_0x5976a0(0x168)+_0x2f0134[_0x5976a0(0x17f)](',\x20'));if(_0x3e67c5[_0x5976a0(0x17e)]===undefined!==(_0x3e67c5['certificateDomain']===undefined))throw CliErrors['validation'](_0x5976a0(0x16c));const _0x272374=_0x2fb93b[_0x5976a0(0x13f)],_0x2cb74b=Object[_0x5976a0(0x13a)](_0x272374)['filter'](_0x42cf5e=>!ENTERPRISE_ROUTING_CDN_FIELDS['includes'](_0x42cf5e));if(_0x2cb74b[_0x5976a0(0x166)]>0x0)throw CliErrors[_0x5976a0(0x180)](_0x5976a0(0x14d)+_0x2cb74b[_0x5976a0(0x17f)](',\x20'),_0x5976a0(0x177)+ENTERPRISE_ROUTING_CDN_FIELDS['join'](',\x20'));const _0x2822fc=REQUIRED_ENTERPRISE_ROUTING_CDN_FIELDS[_0x5976a0(0x14b)](_0x159166=>_0x272374[_0x159166]===undefined);if(_0x2822fc['length']>0x0)throw CliErrors['validation'](_0x5976a0(0x181)+_0x2822fc[_0x5976a0(0x17f)](',\x20'));const _0x505bcc={};for(const _0x35ee0b of ENTERPRISE_ROUTING_CDN_FIELDS){_0x505bcc[_0x35ee0b]=normalizeCdnBaseUrl(_0x35ee0b,_0x272374[_0x35ee0b]);}const _0x879f66={},_0x1e8bea={};for(const _0x2a5e05 of ENTERPRISE_ROUTING_DOMAIN_FIELDS){const _0x2722e7=_0x3e67c5[_0x2a5e05];if(_0x2722e7===undefined)continue;const _0x6776cf=normalizeRoutingDomainValue(_0x2a5e05,_0x2722e7);_0x879f66[_0x2a5e05]=_0x6776cf;const _0x13b685=ENTERPRISE_TO_LOCAL_FIELD[_0x2a5e05];_0x13b685&&(_0x1e8bea[_0x13b685]=_0x6776cf);}return{'mode':_0x5976a0(0x133),'domains':_0x1e8bea,'manifestDomains':_0x879f66,'cdn':_0x505bcc};}
@@ -1 +1 @@
1
- const a231_0x41ec67=a231_0x44ee;(function(_0x5a7ae8,_0x230552){const _0x5aab4a=a231_0x44ee,_0x498d2b=_0x5a7ae8();while(!![]){try{const _0x39700a=-parseInt(_0x5aab4a(0x1e6))/0x1+-parseInt(_0x5aab4a(0x1ec))/0x2+parseInt(_0x5aab4a(0x1f1))/0x3*(-parseInt(_0x5aab4a(0x1f2))/0x4)+-parseInt(_0x5aab4a(0x1f3))/0x5*(parseInt(_0x5aab4a(0x1ef))/0x6)+-parseInt(_0x5aab4a(0x1e7))/0x7*(-parseInt(_0x5aab4a(0x1e8))/0x8)+parseInt(_0x5aab4a(0x1e3))/0x9*(-parseInt(_0x5aab4a(0x1e9))/0xa)+parseInt(_0x5aab4a(0x1f4))/0xb;if(_0x39700a===_0x230552)break;else _0x498d2b['push'](_0x498d2b['shift']());}catch(_0x20608f){_0x498d2b['push'](_0x498d2b['shift']());}}}(a231_0x72b7,0x5e682));import{renameSync,unlinkSync,writeFileSync}from'node:fs';import{join}from'node:path';import{getActiveRegion,getActiveCdn,getAppDomain,getCertificateDomain,getLocalDomain,getRuntimeDomain,getUserDomain,isIndependentDeployment}from'../constant/domain.js';import{getOfficialRoutingProfile}from'../constant/routing-profile.js';export const PROJECT_DOMAIN_ROUTING_FILE_NAME=a231_0x41ec67(0x1ed);export const PROJECT_DOMAIN_ROUTING_PROTOCOL=a231_0x41ec67(0x1f9);export function getProjectDomainRoutingManifest(){const _0x532fd2=a231_0x41ec67,_0x5b09f4=getActiveRegion(),_0x1779dc=isIndependentDeployment(),_0x436f99=getOfficialRoutingProfile(_0x5b09f4),_0x84013e=getLocalDomain(),_0x322b26=getCertificateDomain(),_0xd8349c=getActiveCdn();if(!!_0x84013e!==!!_0x322b26)throw new Error(_0x532fd2(0x1ea));return{'protocol':PROJECT_DOMAIN_ROUTING_PROTOCOL,'mode':_0x1779dc?_0x532fd2(0x1ee):_0x532fd2(0x1f0),'region':_0x1779dc?null:_0x5b09f4,'domains':{'user':getUserDomain(),'app':getAppDomain(),'runtime':getRuntimeDomain()},'cdn':_0xd8349c,'local':_0x84013e&&_0x322b26?{'origin':_0x84013e,'certificateUrl':_0x322b26+_0x532fd2(0x1e5)}:_0x1779dc?{'origin':_0x532fd2(0x1fa)}:{'origin':_0x436f99['local'][_0x532fd2(0x1f5)],'certificateUrl':_0xd8349c[_0x532fd2(0x1f8)]+'/cert/lovrabet-dev.json'}};}function a231_0x44ee(_0x17384c,_0x426b45){_0x17384c=_0x17384c-0x1e3;const _0x72b705=a231_0x72b7();let _0x44eec1=_0x72b705[_0x17384c];return _0x44eec1;}export function writeProjectDomainRoutingManifest(_0x1efcfc){const _0x29ef68=a231_0x41ec67,_0xe7bd90=getProjectDomainRoutingManifest(),_0x594dac=join(_0x1efcfc,PROJECT_DOMAIN_ROUTING_FILE_NAME),_0x382cb1=_0x594dac+'.'+process[_0x29ef68(0x1eb)]+'.'+Date[_0x29ef68(0x1f7)]()+'.tmp';try{writeFileSync(_0x382cb1,JSON[_0x29ef68(0x1f6)](_0xe7bd90,null,0x2)+'\x0a',{'encoding':_0x29ef68(0x1e4),'mode':0x1a4}),renameSync(_0x382cb1,_0x594dac);}catch(_0x5f114b){try{unlinkSync(_0x382cb1);}catch{}throw _0x5f114b;}return{'path':_0x594dac,'manifest':_0xe7bd90};}function a231_0x72b7(){const _0x323693=['40nQTLIu','28206123vxixjm','origin','stringify','now','lovrabet','lovrabet-project-domain-routing/v1','http://localhost','60948DKLTiI','utf8','/cert/lovrabet-dev.json','737049RJDyow','7GXEYAY','2404936AUZvpQ','370lfRZKt','Independent\x20deployment\x20routing\x20requires\x20localDomain\x20and\x20certificateDomain\x20together.','pid','351232WqUiSt','rabetbase.domain-routing.json','independent','557154XQFrbr','official','9cdgWxx','762692tevzUQ'];a231_0x72b7=function(){return _0x323693;};return a231_0x72b7();}
1
+ const a231_0x1249ef=a231_0x4a95;(function(_0x4407ff,_0x3e5b8f){const _0x15ebd9=a231_0x4a95,_0x5922cf=_0x4407ff();while(!![]){try{const _0x267e20=parseInt(_0x15ebd9(0x1a1))/0x1+parseInt(_0x15ebd9(0x190))/0x2+parseInt(_0x15ebd9(0x19b))/0x3+parseInt(_0x15ebd9(0x198))/0x4+parseInt(_0x15ebd9(0x195))/0x5*(parseInt(_0x15ebd9(0x199))/0x6)+parseInt(_0x15ebd9(0x1a4))/0x7+-parseInt(_0x15ebd9(0x194))/0x8;if(_0x267e20===_0x3e5b8f)break;else _0x5922cf['push'](_0x5922cf['shift']());}catch(_0x136221){_0x5922cf['push'](_0x5922cf['shift']());}}}(a231_0x45d5,0x6430d));import{renameSync,unlinkSync,writeFileSync}from'node:fs';import{join}from'node:path';import{getActiveRegion,getActiveCdn,getAppDomain,getCertificateDomain,getLocalDomain,getRuntimeDomain,getUserDomain,isIndependentDeployment}from'../constant/domain.js';import{getOfficialRoutingProfile}from'../constant/routing-profile.js';export const PROJECT_DOMAIN_ROUTING_FILE_NAME=a231_0x1249ef(0x19d);export const PROJECT_DOMAIN_ROUTING_PROTOCOL=a231_0x1249ef(0x192);export function getProjectDomainRoutingManifest(){const _0x21b8e4=a231_0x1249ef,_0x51a58c=getActiveRegion(),_0x5b9acd=isIndependentDeployment(),_0x422a41=getOfficialRoutingProfile(_0x51a58c),_0x2ca214=getLocalDomain(),_0x22211e=getCertificateDomain(),_0x1f8ff1=getActiveCdn();if(!!_0x2ca214!==!!_0x22211e)throw new Error(_0x21b8e4(0x196));return{'protocol':PROJECT_DOMAIN_ROUTING_PROTOCOL,'mode':_0x5b9acd?_0x21b8e4(0x19f):_0x21b8e4(0x197),'region':_0x5b9acd?null:_0x51a58c,'domains':{'user':getUserDomain(),'app':getAppDomain(),'runtime':getRuntimeDomain()},'cdn':_0x1f8ff1,'local':_0x2ca214&&_0x22211e?{'origin':_0x2ca214,'certificateUrl':_0x22211e+_0x21b8e4(0x193)}:_0x5b9acd?{'origin':_0x21b8e4(0x1a2)}:{'origin':_0x422a41[_0x21b8e4(0x1a0)][_0x21b8e4(0x19e)],'certificateUrl':_0x1f8ff1['lovrabet']+_0x21b8e4(0x193)}};}function a231_0x4a95(_0x4c0816,_0x59ce6b){_0x4c0816=_0x4c0816-0x190;const _0x45d5f5=a231_0x45d5();let _0x4a95e0=_0x45d5f5[_0x4c0816];return _0x4a95e0;}export function writeProjectDomainRoutingManifest(_0x6fe036){const _0x1fb90c=a231_0x1249ef,_0x3a35c6=getProjectDomainRoutingManifest(),_0x23a957=join(_0x6fe036,PROJECT_DOMAIN_ROUTING_FILE_NAME),_0x3d1e4f=_0x23a957+'.'+process[_0x1fb90c(0x1a3)]+'.'+Date[_0x1fb90c(0x19a)]()+_0x1fb90c(0x191);try{writeFileSync(_0x3d1e4f,JSON['stringify'](_0x3a35c6,null,0x2)+'\x0a',{'encoding':_0x1fb90c(0x19c),'mode':0x1a4}),renameSync(_0x3d1e4f,_0x23a957);}catch(_0x748ccb){try{unlinkSync(_0x3d1e4f);}catch{}throw _0x748ccb;}return{'path':_0x23a957,'manifest':_0x3a35c6};}function a231_0x45d5(){const _0x3a77f8=['163983QEnLeY','http://localhost','pid','3506440XtAYUT','772408sqpdrn','.tmp','lovrabet-project-domain-routing/v1','/cert/lovrabet-dev.json','17407104uYLAQt','190dHTQHW','Independent\x20deployment\x20routing\x20requires\x20localDomain\x20and\x20certificateDomain\x20together.','official','2385004CLydgD','84894jmlfVQ','now','1203747JcWoWb','utf8','rabetbase.domain-routing.json','origin','independent','local'];a231_0x45d5=function(){return _0x3a77f8;};return a231_0x45d5();}