@lovrabet/rabetbase-cli 2.5.2 → 2.5.3-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (348) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.d.ts +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/api/generate-sdk-config-file.d.ts +2 -1
  6. package/lib/api/generate-sdk-config-file.js +1 -1
  7. package/lib/auth/auth-server-ui.js +1 -1
  8. package/lib/auth/auth-server.js +1 -1
  9. package/lib/auth/constant.js +1 -1
  10. package/lib/auth/get-cookie.js +1 -1
  11. package/lib/auth/get-session-user.js +1 -1
  12. package/lib/auth/is-session-valid.js +1 -1
  13. package/lib/auth/login-success-html.js +1 -1
  14. package/lib/auth/logout.js +1 -1
  15. package/lib/cli-flags.js +1 -1
  16. package/lib/cli.js +1 -1
  17. package/lib/commands/api/generate.js +1 -1
  18. package/lib/commands/api/index.js +1 -1
  19. package/lib/commands/api/list.js +1 -1
  20. package/lib/commands/api/pull.js +1 -1
  21. package/lib/commands/api/shared.js +1 -1
  22. package/lib/commands/app/index.js +1 -1
  23. package/lib/commands/app/list.js +1 -1
  24. package/lib/commands/app/members-list.js +1 -1
  25. package/lib/commands/app/remote-directory.js +1 -1
  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/index.js +1 -1
  101. package/lib/commands/deployment/sync-all.js +1 -1
  102. package/lib/commands/deployment/sync-jobs.js +1 -1
  103. package/lib/commands/deployment/sync-status.js +1 -1
  104. package/lib/commands/doctor.js +1 -1
  105. package/lib/commands/file/index.js +1 -1
  106. package/lib/commands/instant-api-policy/current.js +1 -1
  107. package/lib/commands/instant-api-policy/index.js +1 -1
  108. package/lib/commands/instant-api-policy/init.js +1 -1
  109. package/lib/commands/instant-api-policy/publish.js +1 -1
  110. package/lib/commands/instant-api-policy/pull.js +1 -1
  111. package/lib/commands/instant-api-policy/revision.js +1 -1
  112. package/lib/commands/instant-api-policy/revisions.js +1 -1
  113. package/lib/commands/instant-api-policy/rollback.js +1 -1
  114. package/lib/commands/instant-api-policy/shared.js +1 -1
  115. package/lib/commands/instant-api-policy/validate.js +1 -1
  116. package/lib/commands/issue/index.js +1 -1
  117. package/lib/commands/issue/nudge.js +1 -1
  118. package/lib/commands/issue/report.js +1 -1
  119. package/lib/commands/issue/shared.js +1 -1
  120. package/lib/commands/kb/create.js +1 -1
  121. package/lib/commands/kb/delete.js +1 -1
  122. package/lib/commands/kb/detail.js +1 -1
  123. package/lib/commands/kb/index.js +1 -1
  124. package/lib/commands/kb/list.js +1 -1
  125. package/lib/commands/kb/search.js +1 -1
  126. package/lib/commands/kb/shared.js +1 -1
  127. package/lib/commands/kb/update.js +1 -1
  128. package/lib/commands/logs/index.js +1 -1
  129. package/lib/commands/menu/asset-update.js +1 -1
  130. package/lib/commands/menu/delete.js +1 -1
  131. package/lib/commands/menu/external-link-create.js +1 -1
  132. package/lib/commands/menu/external-link-update.js +1 -1
  133. package/lib/commands/menu/group-create.js +1 -1
  134. package/lib/commands/menu/group-update.js +1 -1
  135. package/lib/commands/menu/index.js +1 -1
  136. package/lib/commands/menu/list.js +1 -1
  137. package/lib/commands/menu/move.js +1 -1
  138. package/lib/commands/menu/regroup-start.js +1 -1
  139. package/lib/commands/menu/rename.js +1 -1
  140. package/lib/commands/menu/shared/compare-table.js +1 -1
  141. package/lib/commands/menu/shared/delete-plan.js +1 -1
  142. package/lib/commands/menu/shared/facts.js +1 -1
  143. package/lib/commands/menu/shared/index.js +1 -1
  144. package/lib/commands/menu/shared/inquirer.js +1 -1
  145. package/lib/commands/menu/shared/local-pages.js +1 -1
  146. package/lib/commands/menu/shared/logic.js +1 -1
  147. package/lib/commands/menu/shared/mutations.js +1 -1
  148. package/lib/commands/menu/shared/service.js +1 -1
  149. package/lib/commands/menu/shared/sync-core.js +1 -1
  150. package/lib/commands/menu/shared/update-core.js +1 -1
  151. package/lib/commands/menu/shared/valid-url.js +1 -1
  152. package/lib/commands/menu/sync.js +1 -1
  153. package/lib/commands/menu/visibility-update.js +1 -1
  154. package/lib/commands/notification/config-create.js +1 -1
  155. package/lib/commands/notification/config-delete.js +1 -1
  156. package/lib/commands/notification/config-list.js +1 -1
  157. package/lib/commands/notification/config-update.js +1 -1
  158. package/lib/commands/notification/index.js +1 -1
  159. package/lib/commands/notification/shared.js +1 -1
  160. package/lib/commands/ocr/index.js +1 -1
  161. package/lib/commands/page/create.js +1 -1
  162. package/lib/commands/page/custom/detail.js +1 -1
  163. package/lib/commands/page/custom/list.js +1 -1
  164. package/lib/commands/page/custom/publish.js +1 -1
  165. package/lib/commands/page/custom/shared.js +1 -1
  166. package/lib/commands/page/custom/syntax.js +1 -1
  167. package/lib/commands/page/custom/update.js +1 -1
  168. package/lib/commands/page/data-list-status.js +1 -1
  169. package/lib/commands/page/generate-start.js +1 -1
  170. package/lib/commands/page/generate-status.js +1 -1
  171. package/lib/commands/page/index.js +1 -1
  172. package/lib/commands/page/pull.js +1 -1
  173. package/lib/commands/page/push.js +1 -1
  174. package/lib/commands/page/relation-audit.js +1 -1
  175. package/lib/commands/page/restore.js +1 -1
  176. package/lib/commands/page/shared.js +1 -1
  177. package/lib/commands/page/sync.js +1 -1
  178. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  179. package/lib/commands/project/create/format-elapsed.js +1 -1
  180. package/lib/commands/project/create/main.js +1 -1
  181. package/lib/commands/project/create/materialize-project-template.js +1 -1
  182. package/lib/commands/project/create/project-name.js +1 -1
  183. package/lib/commands/project/create/project-template-archive.js +1 -1
  184. package/lib/commands/project/create/project-template-path.js +1 -1
  185. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  186. package/lib/commands/project/create/use-format-code.js +1 -1
  187. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  188. package/lib/commands/project/domain-routing-sync.js +1 -1
  189. package/lib/commands/project/index.js +1 -1
  190. package/lib/commands/project/upgrade.js +1 -1
  191. package/lib/commands/registry.js +1 -1
  192. package/lib/commands/role/delete.js +1 -1
  193. package/lib/commands/role/detail.js +1 -1
  194. package/lib/commands/role/index.js +1 -1
  195. package/lib/commands/role/list.js +1 -1
  196. package/lib/commands/role/shared.js +1 -1
  197. package/lib/commands/role/update.js +1 -1
  198. package/lib/commands/role/user-add.js +1 -1
  199. package/lib/commands/role/user-remove.js +1 -1
  200. package/lib/commands/role/user-resolve.js +1 -1
  201. package/lib/commands/rule/get.js +1 -1
  202. package/lib/commands/rule/index.js +1 -1
  203. package/lib/commands/rule/list.js +1 -1
  204. package/lib/commands/rule/set.js +1 -1
  205. package/lib/commands/rule/shared.js +1 -1
  206. package/lib/commands/run/index.js +1 -1
  207. package/lib/commands/schema.js +1 -1
  208. package/lib/commands/sql/create.js +1 -1
  209. package/lib/commands/sql/delete.js +1 -1
  210. package/lib/commands/sql/detail.js +1 -1
  211. package/lib/commands/sql/exec.js +1 -1
  212. package/lib/commands/sql/index.js +1 -1
  213. package/lib/commands/sql/list.js +1 -1
  214. package/lib/commands/sql/pull.js +1 -1
  215. package/lib/commands/sql/push.js +1 -1
  216. package/lib/commands/sql/shared.js +1 -1
  217. package/lib/commands/sql/status.js +1 -1
  218. package/lib/commands/sql/validate.js +1 -1
  219. package/lib/commands/task/index.js +1 -1
  220. package/lib/commands/task/status.js +1 -1
  221. package/lib/commands/tenant/index.js +1 -1
  222. package/lib/commands/tenant/members-list.js +1 -1
  223. package/lib/commands/tenant/shared.js +1 -1
  224. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  225. package/lib/commands/user-account/index.js +1 -1
  226. package/lib/commands/workspace/add.js +1 -1
  227. package/lib/commands/workspace/index.js +1 -1
  228. package/lib/commands/workspace/remove.js +1 -1
  229. package/lib/config/domain-config.js +1 -1
  230. package/lib/config/project-domain-routing.js +1 -1
  231. package/lib/config/region-config.d.ts +23 -0
  232. package/lib/config/region-config.js +1 -0
  233. package/lib/config/schema.d.ts +15 -0
  234. package/lib/config/schema.js +1 -1
  235. package/lib/constant/cdn.js +1 -1
  236. package/lib/constant/cli.js +1 -1
  237. package/lib/constant/defaults.js +1 -1
  238. package/lib/constant/domain.js +1 -1
  239. package/lib/constant/env.js +1 -1
  240. package/lib/constant/output.js +1 -1
  241. package/lib/constant/paths.js +1 -1
  242. package/lib/constant/region.js +1 -1
  243. package/lib/constant/risk.js +1 -1
  244. package/lib/constant/routing-profile.js +1 -1
  245. package/lib/context/app-resolver.d.ts +6 -0
  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.d.ts +13 -0
  250. package/lib/context.js +1 -1
  251. package/lib/core/alias-resolver.js +1 -1
  252. package/lib/core/api-client.d.ts +2 -0
  253. package/lib/core/api-client.js +1 -1
  254. package/lib/core/bff/config.js +1 -1
  255. package/lib/core/bff/file-system.js +1 -1
  256. package/lib/core/bff/hash.js +1 -1
  257. package/lib/core/bff/lock.js +1 -1
  258. package/lib/core/bff/utils.js +1 -1
  259. package/lib/core/db-resolver.js +1 -1
  260. package/lib/core/instant-api-policy/config.js +1 -1
  261. package/lib/core/kb-search-client.js +1 -1
  262. package/lib/core/page/file-system.js +1 -1
  263. package/lib/core/page/hash.js +1 -1
  264. package/lib/core/page/lock.js +1 -1
  265. package/lib/core/page/lr-smart-jsx.d.ts +6 -0
  266. package/lib/core/page/lr-smart-jsx.js +1 -0
  267. package/lib/core/sql-index-auditor.js +1 -1
  268. package/lib/core/sql-sync/config.js +1 -1
  269. package/lib/core/sql-sync/file-system.js +1 -1
  270. package/lib/core/sql-sync/hash.js +1 -1
  271. package/lib/core/sql-sync/lock.js +1 -1
  272. package/lib/core/sql-sync/utils.js +1 -1
  273. package/lib/core/sql-validator.js +1 -1
  274. package/lib/errors.js +1 -1
  275. package/lib/framework/build-all-flags.js +1 -1
  276. package/lib/framework/error-output.js +1 -1
  277. package/lib/framework/explicit-yes.js +1 -1
  278. package/lib/framework/flags.js +1 -1
  279. package/lib/framework/help.js +1 -1
  280. package/lib/framework/index.js +1 -1
  281. package/lib/framework/output.js +1 -1
  282. package/lib/framework/response.js +1 -1
  283. package/lib/framework/runner-alias.js +1 -1
  284. package/lib/framework/runner.js +1 -1
  285. package/lib/framework/schema-export.js +1 -1
  286. package/lib/framework/supported-flags.js +1 -1
  287. package/lib/framework/types.js +1 -1
  288. package/lib/generated/build-info.d.ts +4 -4
  289. package/lib/generated/build-info.js +1 -1
  290. package/lib/generated/official-routing.js +1 -1
  291. package/lib/generated/routing-contract.js +1 -1
  292. package/lib/help.js +1 -1
  293. package/lib/postinstall.js +1 -1
  294. package/lib/runtime/confirmation.js +1 -1
  295. package/lib/runtime/event.js +1 -1
  296. package/lib/runtime/index.js +1 -1
  297. package/lib/runtime/queue.js +1 -1
  298. package/lib/runtime/resolve.js +1 -1
  299. package/lib/skills/builtin-skill.js +1 -1
  300. package/lib/skills/main.js +1 -1
  301. package/lib/skills/npx-skills-add.js +1 -1
  302. package/lib/skills/skill-presence.js +1 -1
  303. package/lib/telemetry/cli-command-trace.js +1 -1
  304. package/lib/telemetry/cli-help-trace.js +1 -1
  305. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  306. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  307. package/lib/telemetry/send-cli-trace-log.js +1 -1
  308. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  309. package/lib/types/index.d.ts +1 -1
  310. package/lib/utils/ai_config.js +1 -1
  311. package/lib/utils/apply-jq-filter.js +1 -1
  312. package/lib/utils/cdn-config.js +1 -1
  313. package/lib/utils/check-sdk-version.js +1 -1
  314. package/lib/utils/cli-version-check.js +1 -1
  315. package/lib/utils/cli-version-policy.js +1 -1
  316. package/lib/utils/config.d.ts +2 -8
  317. package/lib/utils/config.js +1 -1
  318. package/lib/utils/entity-with-id.js +1 -1
  319. package/lib/utils/file-utils.js +1 -1
  320. package/lib/utils/guides-cdn.js +1 -1
  321. package/lib/utils/http-client.js +1 -1
  322. package/lib/utils/is-non-interactive.js +1 -1
  323. package/lib/utils/logger.js +1 -1
  324. package/lib/utils/params.js +1 -1
  325. package/lib/utils/platform.js +1 -1
  326. package/lib/utils/sleep.js +1 -1
  327. package/lib/utils/template-replacer.d.ts +2 -1
  328. package/lib/utils/template-replacer.js +1 -1
  329. package/lib/utils/update-notice.js +1 -1
  330. package/lib/utils/version.js +1 -1
  331. package/lib/utils/with-active-cookie.js +1 -1
  332. package/lib/utils/write-cli-side-channel.js +1 -1
  333. package/package.json +1 -1
  334. package/skills/rabetbase/SKILL.md +6 -5
  335. package/skills/rabetbase/guides/page-development-workflow.md +3 -0
  336. package/skills/rabetbase/guides/sdk-client-generation.md +5 -5
  337. package/skills/rabetbase/knowledge/page-schema/LrSmartJsx.md +11 -3
  338. package/skills/rabetbase/references/rabetbase-api-pull.md +5 -4
  339. package/skills/rabetbase/references/rabetbase-app-list.md +3 -0
  340. package/skills/rabetbase/references/rabetbase-bff-list.md +1 -1
  341. package/skills/rabetbase/references/rabetbase-bff-pull.md +2 -0
  342. package/skills/rabetbase/references/rabetbase-bff-status.md +2 -0
  343. package/skills/rabetbase/references/rabetbase-config.md +10 -9
  344. package/skills/rabetbase/references/rabetbase-doctor.md +2 -2
  345. package/skills/rabetbase/references/rabetbase-page-push.md +5 -1
  346. package/skills/rabetbase/references/rabetbase-workspace.md +4 -2
  347. package/skills/rabetbase.manifest.json +3 -3
  348. package/templates/generate-api/client.ts.tpl +1 -1
@@ -1 +1 @@
1
- const a216_0x5ac64f=a216_0x1763;function a216_0x37ba(){const _0x45a05e=['228RKxxoa','bool','map','10001484azovMu','\x22\x20not\x20found\x20in\x20any\x20dataset','file','size','Table\x20\x22','get','dbtableConfig','message','flagMissing','\x22\x20not\x20found\x20or\x20not\x20accessible','index_type','check-indexes','validate','name','primary','6KSHJik','validation','unshift','indexName','sql','tableName','isArray','Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)','string','index_name','pkField','cwd','from','index_columns','Dataset\x20\x22','136vSvbHv','tables','schemas','File\x20not\x20found:\x20','boolean','Path\x20to\x20the\x20SQL\x20file\x20to\x20validate','filter','indexes','1955795HCbyfM','96771wbtgMI','toLowerCase','122480ZLFkHU','448TUKVUE','push','utf-8','split','217816CjXiAB','fields','joinAudit','sqlType','1HFjaTB','840488djYrfQ','columnNames','11989970rQyCsq','schemaWarnings','Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against','columns','isDangerous','--check-indexes\x20requires\x20--schemas.','str','trim','valid','reason','length','type'];a216_0x37ba=function(){return _0x45a05e;};return a216_0x37ba();}(function(_0x34077f,_0x37023c){const _0xc4418c=a216_0x1763,_0x134ab3=_0x34077f();while(!![]){try{const _0x2e6749=-parseInt(_0xc4418c(0x103))/0x1*(parseInt(_0xc4418c(0xff))/0x2)+parseInt(_0xc4418c(0xf8))/0x3*(parseInt(_0xc4418c(0xef))/0x4)+-parseInt(_0xc4418c(0xf7))/0x5*(-parseInt(_0xc4418c(0xe0))/0x6)+parseInt(_0xc4418c(0xfb))/0x7*(parseInt(_0xc4418c(0xfa))/0x8)+-parseInt(_0xc4418c(0xd1))/0x9+parseInt(_0xc4418c(0x106))/0xa+-parseInt(_0xc4418c(0x104))/0xb*(parseInt(_0xc4418c(0xce))/0xc);if(_0x2e6749===_0x37023c)break;else _0x134ab3['push'](_0x134ab3['shift']());}catch(_0x386f38){_0x134ab3['push'](_0x134ab3['shift']());}}}(a216_0x37ba,0xf2dee));import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';import{validateSql}from'../../core/sql-validator.js';function a216_0x1763(_0xb973a7,_0x1df5ec){_0xb973a7=_0xb973a7-0xc9;const _0x37baae=a216_0x37ba();let _0x17631d=_0x37baae[_0xb973a7];return _0x17631d;}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':a216_0x5ac64f(0xe4),'command':a216_0x5ac64f(0xdd),'description':'Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)','risk':'read','flags':[{'name':a216_0x5ac64f(0xd3),'type':a216_0x5ac64f(0xe8),'description':a216_0x5ac64f(0xf4)},{'name':'sql','type':a216_0x5ac64f(0xe8),'description':a216_0x5ac64f(0xe7)},{'name':a216_0x5ac64f(0xf1),'type':'string','description':a216_0x5ac64f(0x108)},{'name':a216_0x5ac64f(0xdc),'type':a216_0x5ac64f(0xf3),'description':'Audit\x20top-level\x20JOIN\x20equality\x20predicates\x20against\x20dataset\x20index\x20metadata'}],async 'execute'(_0x49d126){const _0x4f9b01=a216_0x5ac64f,_0x2c29a5=_0x49d126[_0x4f9b01(0x10c)](_0x4f9b01(0xd3)),_0x4ee814=_0x49d126[_0x4f9b01(0x10c)](_0x4f9b01(0xe4)),_0x38959c=_0x49d126[_0x4f9b01(0x10c)]('schemas'),_0x4a142a=_0x49d126[_0x4f9b01(0xcf)](_0x4f9b01(0xdc));if(!_0x2c29a5&&!_0x4ee814)throw CliErrors[_0x4f9b01(0xd9)]('file','Provide\x20--file\x20or\x20--sql');if(_0x4a142a&&!_0x38959c)throw CliErrors[_0x4f9b01(0xe1)](_0x4f9b01(0x10b));let _0x5d36a4;if(_0x2c29a5){const _0x4f5a6a=resolve(process[_0x4f9b01(0xeb)](),_0x2c29a5);if(!existsSync(_0x4f5a6a))throw CliErrors[_0x4f9b01(0xe1)](_0x4f9b01(0xf2)+_0x4f5a6a);_0x5d36a4=readFileSync(_0x4f5a6a,_0x4f9b01(0xfd));}else _0x5d36a4=_0x4ee814;const _0x40c024=validateSql(_0x5d36a4),_0x451bc9={'valid':_0x40c024['valid'],'sqlType':_0x40c024[_0x4f9b01(0x102)]['type'],'isSelectOnly':_0x40c024[_0x4f9b01(0x102)]['isSelectOnly'],'isDangerous':_0x40c024[_0x4f9b01(0x102)][_0x4f9b01(0x10a)],'tables':_0x40c024['tables'],'parameters':_0x40c024['parameters'],'message':_0x40c024[_0x4f9b01(0xd8)]};_0x40c024[_0x4f9b01(0x102)][_0x4f9b01(0xcb)]&&(_0x451bc9[_0x4f9b01(0xcb)]=_0x40c024['sqlType'][_0x4f9b01(0xcb)]);if(_0x38959c&&_0x40c024['valid']){const _0x13fe52=_0x38959c['split'](',')[_0x4f9b01(0xd0)](_0x196fe5=>_0x196fe5[_0x4f9b01(0xc9)]())[_0x4f9b01(0xf5)](Boolean),_0x306446=[],_0x5a05b9=[],_0x4a3c75=filterDbTableBackedDatasets(await listDatasets(_0x49d126['appCode'])),_0x262872=new Map(_0x4a3c75[_0x4f9b01(0xd0)](_0x1192c4=>[_0x1192c4[_0x4f9b01(0xd7)]?.[_0x4f9b01(0xe5)]?.['toLowerCase'](),_0x1192c4]));for(const _0x285db0 of _0x40c024[_0x4f9b01(0xf0)]){const _0x1c4ed4=_0x262872[_0x4f9b01(0xd6)](_0x285db0['toLowerCase']());!_0x1c4ed4&&_0x306446[_0x4f9b01(0xfc)](_0x4f9b01(0xd5)+_0x285db0+_0x4f9b01(0xd2));}for(const _0x3d513f of _0x13fe52){let _0x26ac46;try{_0x26ac46=await getDatasetDetail(_0x3d513f);}catch{_0x306446[_0x4f9b01(0xfc)](_0x4f9b01(0xee)+_0x3d513f+_0x4f9b01(0xda));continue;}assertDatasetIsDbTableBacked(_0x26ac46,'SQL\x20schema\x20validation');const _0x4aa336=Array[_0x4f9b01(0xe6)](_0x26ac46[_0x4f9b01(0x100)])?_0x26ac46[_0x4f9b01(0x100)]:[],_0x1c6641=new Set(_0x4aa336[_0x4f9b01(0xd0)](_0x1073f4=>_0x1073f4['name']?.[_0x4f9b01(0xf9)]())),_0x1ea4a6=_0x26ac46[_0x4f9b01(0xd7)]?.[_0x4f9b01(0xe5)]||_0x26ac46[_0x4f9b01(0xe5)]||_0x3d513f;_0x451bc9['schema:'+_0x1ea4a6]={'code':_0x3d513f,'tableName':_0x1ea4a6,'fieldCount':_0x1c6641[_0x4f9b01(0xd4)],'fields':Array[_0x4f9b01(0xec)](_0x1c6641)};if(_0x4a142a){const _0x7fc793=normalizeDatasetIndexes(_0x26ac46);_0x5a05b9[_0x4f9b01(0xfc)]({'tableName':_0x1ea4a6,..._0x7fc793});}}_0x306446[_0x4f9b01(0xcc)]>0x0&&(_0x451bc9[_0x4f9b01(0x107)]=_0x306446),_0x4a142a&&(_0x451bc9[_0x4f9b01(0x101)]=auditSqlJoinIndexes(_0x5d36a4,_0x5a05b9));}return{'ok':_0x40c024[_0x4f9b01(0xca)],'data':_0x451bc9,'message':_0x40c024[_0x4f9b01(0xd8)]};}};function normalizeDatasetIndexes(_0x1adc8a){const _0x3822b7=a216_0x5ac64f,_0x1b9ad3=Array[_0x3822b7(0xe6)](_0x1adc8a?.['dataset']?.[_0x3822b7(0xf6)])?_0x1adc8a['dataset']['indexes']:Array[_0x3822b7(0xe6)](_0x1adc8a?.[_0x3822b7(0xf6)])?_0x1adc8a[_0x3822b7(0xf6)]:[],_0x3f0a5c=_0x1b9ad3['flatMap'](_0x5a2996=>{const _0x5baf6a=_0x3822b7,_0x5aaebb=Array[_0x5baf6a(0xe6)](_0x5a2996?.[_0x5baf6a(0xed)])?_0x5a2996['index_columns']:Array[_0x5baf6a(0xe6)](_0x5a2996?.[_0x5baf6a(0x105)])?_0x5a2996[_0x5baf6a(0x105)]:Array[_0x5baf6a(0xe6)](_0x5a2996?.[_0x5baf6a(0x109)])?_0x5a2996[_0x5baf6a(0x109)]:[],_0x2fab23=_0x5aaebb[_0x5baf6a(0xf5)](_0x1ceed5=>typeof _0x1ceed5===_0x5baf6a(0xe8))[_0x5baf6a(0xd0)](_0x39c38a=>_0x39c38a[_0x5baf6a(0xc9)]())[_0x5baf6a(0xf5)](Boolean);if(_0x2fab23[_0x5baf6a(0xcc)]===0x0)return[];const _0x5edbee=[_0x5a2996?.[_0x5baf6a(0xe3)],_0x5a2996?.[_0x5baf6a(0xe9)],_0x5a2996?.[_0x5baf6a(0xde)]]['find'](_0x1bd6df=>typeof _0x1bd6df===_0x5baf6a(0xe8)&&_0x1bd6df['trim']()),_0x3faa54=[_0x5a2996?.[_0x5baf6a(0xdb)],_0x5a2996?.[_0x5baf6a(0xcd)]]['find'](_0x9bcd8a=>typeof _0x9bcd8a==='string'&&_0x9bcd8a['trim']());return[{..._0x5edbee?{'name':_0x5edbee['trim']()}:{},..._0x3faa54?{'type':_0x3faa54[_0x5baf6a(0xc9)]()}:{},'columns':_0x2fab23}];}),_0x159ccd=[..._0x3f0a5c],_0x9c51c=typeof _0x1adc8a?.['dbtableConfig']?.[_0x3822b7(0xea)]===_0x3822b7(0xe8)?_0x1adc8a[_0x3822b7(0xd7)][_0x3822b7(0xea)][_0x3822b7(0xfe)](',')[_0x3822b7(0xd0)](_0x604ddb=>_0x604ddb[_0x3822b7(0xc9)]())[_0x3822b7(0xf5)](Boolean):[];return _0x9c51c[_0x3822b7(0xcc)]>0x0&&_0x159ccd[_0x3822b7(0xe2)]({'type':_0x3822b7(0xdf),'columns':_0x9c51c}),{'indexes':_0x159ccd,'metadataAvailable':_0x3f0a5c[_0x3822b7(0xcc)]>0x0};}
1
+ const a216_0x4ff32a=a216_0x250d;function a216_0x250d(_0x1b16ed,_0x2582ff){_0x1b16ed=_0x1b16ed-0x6d;const _0x391c1b=a216_0x391c();let _0x250d14=_0x391c1b[_0x1b16ed];return _0x250d14;}(function(_0x248243,_0x2ecc70){const _0x7025b2=a216_0x250d,_0x32cc1b=_0x248243();while(!![]){try{const _0xbd4c80=parseInt(_0x7025b2(0x92))/0x1*(parseInt(_0x7025b2(0x97))/0x2)+parseInt(_0x7025b2(0x72))/0x3*(-parseInt(_0x7025b2(0x6d))/0x4)+-parseInt(_0x7025b2(0x78))/0x5*(-parseInt(_0x7025b2(0x6f))/0x6)+parseInt(_0x7025b2(0xa9))/0x7+parseInt(_0x7025b2(0x83))/0x8*(-parseInt(_0x7025b2(0x86))/0x9)+parseInt(_0x7025b2(0x8a))/0xa*(parseInt(_0x7025b2(0x7b))/0xb)+parseInt(_0x7025b2(0x90))/0xc*(parseInt(_0x7025b2(0xab))/0xd);if(_0xbd4c80===_0x2ecc70)break;else _0x32cc1b['push'](_0x32cc1b['shift']());}catch(_0x5de944){_0x32cc1b['push'](_0x32cc1b['shift']());}}}(a216_0x391c,0x3078c));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';function a216_0x391c(){const _0x363a3a=['bool','validation','trim','660JNpllx','Comma-separated\x20dataset\x20codes\x20to\x20cross-check\x20table/column\x20names\x20against','\x22\x20not\x20found\x20in\x20any\x20dataset','type','read','valid','11844vZbgIf','columns','111811QibuHE','Dataset\x20\x22','sqlType','validate','dbtableConfig','2GQFymq','isArray','filter','dataset','name','find','columnNames','parameters','toLowerCase','check-indexes','indexName','fields','Validate\x20SQL\x20content\x20without\x20saving\x20(type\x20detection,\x20parameter\x20extraction,\x20optional\x20schema\x20check)','push','tableName','flatMap','indexes','tables','368809GAoOwF','str','4745EuAzWd','--check-indexes\x20requires\x20--schemas.','flagMissing','split','get','unshift','reason','appCode','357288Wuxpdy','pkField','269538wKmJAa','index_name','sql','9eoQBpU','from','Table\x20\x22','string','message','size','5TRKLnp','length','Provide\x20--file\x20or\x20--sql','46673BNZtXF','utf-8','schema:','\x22\x20not\x20found\x20or\x20not\x20accessible','Inline\x20SQL\x20content\x20to\x20validate\x20(alternative\x20to\x20--file)','isDangerous','Audit\x20top-level\x20JOIN\x20equality\x20predicates\x20against\x20dataset\x20index\x20metadata','file','54744NJjNWM','isSelectOnly','map','504lDzGFm'];a216_0x391c=function(){return _0x363a3a;};return a216_0x391c();}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':a216_0x4ff32a(0x71),'command':a216_0x4ff32a(0x95),'description':a216_0x4ff32a(0xa3),'risk':a216_0x4ff32a(0x8e),'flags':[{'name':a216_0x4ff32a(0x82),'type':a216_0x4ff32a(0x75),'description':'Path\x20to\x20the\x20SQL\x20file\x20to\x20validate'},{'name':a216_0x4ff32a(0x71),'type':a216_0x4ff32a(0x75),'description':a216_0x4ff32a(0x7f)},{'name':'schemas','type':'string','description':a216_0x4ff32a(0x8b)},{'name':a216_0x4ff32a(0xa0),'type':'boolean','description':a216_0x4ff32a(0x81)}],async 'execute'(_0xe82334){const _0x215afb=a216_0x4ff32a,_0x1c6d6b=_0xe82334[_0x215afb(0xaa)]('file'),_0x290d86=_0xe82334[_0x215afb(0xaa)](_0x215afb(0x71)),_0x1bb209=_0xe82334[_0x215afb(0xaa)]('schemas'),_0x576759=_0xe82334[_0x215afb(0x87)]('check-indexes');if(!_0x1c6d6b&&!_0x290d86)throw CliErrors[_0x215afb(0xad)]('file',_0x215afb(0x7a));if(_0x576759&&!_0x1bb209)throw CliErrors['validation'](_0x215afb(0xac));let _0x264901;if(_0x1c6d6b){const _0x3f4bfb=resolve(process['cwd'](),_0x1c6d6b);if(!existsSync(_0x3f4bfb))throw CliErrors[_0x215afb(0x88)]('File\x20not\x20found:\x20'+_0x3f4bfb);_0x264901=readFileSync(_0x3f4bfb,_0x215afb(0x7c));}else _0x264901=_0x290d86;const _0x92ac9e=validateSql(_0x264901),_0x46e684={'valid':_0x92ac9e[_0x215afb(0x8f)],'sqlType':_0x92ac9e[_0x215afb(0x94)][_0x215afb(0x8d)],'isSelectOnly':_0x92ac9e[_0x215afb(0x94)][_0x215afb(0x84)],'isDangerous':_0x92ac9e['sqlType'][_0x215afb(0x80)],'tables':_0x92ac9e[_0x215afb(0xa8)],'parameters':_0x92ac9e[_0x215afb(0x9e)],'message':_0x92ac9e[_0x215afb(0x76)]};_0x92ac9e[_0x215afb(0x94)][_0x215afb(0xb1)]&&(_0x46e684[_0x215afb(0xb1)]=_0x92ac9e[_0x215afb(0x94)][_0x215afb(0xb1)]);if(_0x1bb209&&_0x92ac9e[_0x215afb(0x8f)]){const _0x54bed3=_0x1bb209[_0x215afb(0xae)](',')[_0x215afb(0x85)](_0x113dad=>_0x113dad[_0x215afb(0x89)]())[_0x215afb(0x99)](Boolean),_0x1897b6=[],_0x3ee826=[],_0xc83c1f=filterDbTableBackedDatasets(await listDatasets(_0xe82334[_0x215afb(0xb2)])),_0x242fee=new Map(_0xc83c1f[_0x215afb(0x85)](_0x479649=>[_0x479649['dbtableConfig']?.['tableName']?.[_0x215afb(0x9f)](),_0x479649]));for(const _0x28e9ba of _0x92ac9e[_0x215afb(0xa8)]){const _0x475ab8=_0x242fee[_0x215afb(0xaf)](_0x28e9ba[_0x215afb(0x9f)]());!_0x475ab8&&_0x1897b6[_0x215afb(0xa4)](_0x215afb(0x74)+_0x28e9ba+_0x215afb(0x8c));}for(const _0x139093 of _0x54bed3){let _0x16e825;try{_0x16e825=await getDatasetDetail(_0x139093);}catch{_0x1897b6[_0x215afb(0xa4)](_0x215afb(0x93)+_0x139093+_0x215afb(0x7e));continue;}assertDatasetIsDbTableBacked(_0x16e825,'SQL\x20schema\x20validation');const _0xd2f3fc=Array[_0x215afb(0x98)](_0x16e825[_0x215afb(0xa2)])?_0x16e825[_0x215afb(0xa2)]:[],_0x1d6560=new Set(_0xd2f3fc['map'](_0x483336=>_0x483336[_0x215afb(0x9b)]?.[_0x215afb(0x9f)]())),_0x7620b9=_0x16e825[_0x215afb(0x96)]?.[_0x215afb(0xa5)]||_0x16e825['tableName']||_0x139093;_0x46e684[_0x215afb(0x7d)+_0x7620b9]={'code':_0x139093,'tableName':_0x7620b9,'fieldCount':_0x1d6560[_0x215afb(0x77)],'fields':Array[_0x215afb(0x73)](_0x1d6560)};if(_0x576759){const _0x258e3c=normalizeDatasetIndexes(_0x16e825);_0x3ee826[_0x215afb(0xa4)]({'tableName':_0x7620b9,..._0x258e3c});}}_0x1897b6[_0x215afb(0x79)]>0x0&&(_0x46e684['schemaWarnings']=_0x1897b6),_0x576759&&(_0x46e684['joinAudit']=auditSqlJoinIndexes(_0x264901,_0x3ee826));}return{'ok':_0x92ac9e[_0x215afb(0x8f)],'data':_0x46e684,'message':_0x92ac9e[_0x215afb(0x76)]};}};function normalizeDatasetIndexes(_0x226184){const _0x9928c8=a216_0x4ff32a,_0x11274e=Array[_0x9928c8(0x98)](_0x226184?.[_0x9928c8(0x9a)]?.['indexes'])?_0x226184[_0x9928c8(0x9a)][_0x9928c8(0xa7)]:Array[_0x9928c8(0x98)](_0x226184?.[_0x9928c8(0xa7)])?_0x226184[_0x9928c8(0xa7)]:[],_0x2a10de=_0x11274e[_0x9928c8(0xa6)](_0x24cf14=>{const _0x5845b6=_0x9928c8,_0x14d714=Array[_0x5845b6(0x98)](_0x24cf14?.['index_columns'])?_0x24cf14['index_columns']:Array[_0x5845b6(0x98)](_0x24cf14?.['columnNames'])?_0x24cf14[_0x5845b6(0x9d)]:Array[_0x5845b6(0x98)](_0x24cf14?.[_0x5845b6(0x91)])?_0x24cf14['columns']:[],_0x2f4c1e=_0x14d714[_0x5845b6(0x99)](_0x47c60a=>typeof _0x47c60a===_0x5845b6(0x75))[_0x5845b6(0x85)](_0x377d36=>_0x377d36['trim']())[_0x5845b6(0x99)](Boolean);if(_0x2f4c1e[_0x5845b6(0x79)]===0x0)return[];const _0x441ce2=[_0x24cf14?.[_0x5845b6(0xa1)],_0x24cf14?.[_0x5845b6(0x70)],_0x24cf14?.['name']][_0x5845b6(0x9c)](_0x203825=>typeof _0x203825===_0x5845b6(0x75)&&_0x203825[_0x5845b6(0x89)]()),_0xce7956=[_0x24cf14?.['index_type'],_0x24cf14?.[_0x5845b6(0x8d)]][_0x5845b6(0x9c)](_0x4f3d96=>typeof _0x4f3d96===_0x5845b6(0x75)&&_0x4f3d96['trim']());return[{..._0x441ce2?{'name':_0x441ce2[_0x5845b6(0x89)]()}:{},..._0xce7956?{'type':_0xce7956[_0x5845b6(0x89)]()}:{},'columns':_0x2f4c1e}];}),_0x130940=[..._0x2a10de],_0x31d7cc=typeof _0x226184?.[_0x9928c8(0x96)]?.[_0x9928c8(0x6e)]===_0x9928c8(0x75)?_0x226184['dbtableConfig'][_0x9928c8(0x6e)][_0x9928c8(0xae)](',')[_0x9928c8(0x85)](_0x2271d5=>_0x2271d5[_0x9928c8(0x89)]())[_0x9928c8(0x99)](Boolean):[];return _0x31d7cc[_0x9928c8(0x79)]>0x0&&_0x130940[_0x9928c8(0xb0)]({'type':'primary','columns':_0x31d7cc}),{'indexes':_0x130940,'metadataAvailable':_0x2a10de[_0x9928c8(0x79)]>0x0};}
@@ -1 +1 @@
1
- (function(_0x31e744,_0x2dd95f){const _0x3449f7=a217_0x5054,_0x28fd54=_0x31e744();while(!![]){try{const _0x10e7cb=-parseInt(_0x3449f7(0x132))/0x1+parseInt(_0x3449f7(0x12f))/0x2*(parseInt(_0x3449f7(0x136))/0x3)+parseInt(_0x3449f7(0x137))/0x4+parseInt(_0x3449f7(0x133))/0x5*(-parseInt(_0x3449f7(0x131))/0x6)+parseInt(_0x3449f7(0x135))/0x7+parseInt(_0x3449f7(0x12e))/0x8*(parseInt(_0x3449f7(0x130))/0x9)+parseInt(_0x3449f7(0x134))/0xa*(-parseInt(_0x3449f7(0x138))/0xb);if(_0x10e7cb===_0x2dd95f)break;else _0x28fd54['push'](_0x28fd54['shift']());}catch(_0x466684){_0x28fd54['push'](_0x28fd54['shift']());}}}(a217_0xf9d7,0xece5a));import{taskStatus}from'../../commands/task/status.js';export const taskDefinitions=[taskStatus];function a217_0x5054(_0x34ec9f,_0x26fee7){_0x34ec9f=_0x34ec9f-0x12e;const _0xf9d7a8=a217_0xf9d7();let _0x5054f3=_0xf9d7a8[_0x34ec9f];return _0x5054f3;}function a217_0xf9d7(){const _0x56aba7=['855769pPnJfs','65225SmHXbQ','1563570OTWZcU','4941258Jhgfhi','1019058HEpaWc','941380OnxSNt','99iVhQzb','16432vJPJYA','8YYeCue','7119GxjGTl','318IDoQOT'];a217_0xf9d7=function(){return _0x56aba7;};return a217_0xf9d7();}
1
+ (function(_0x1ad525,_0x183560){const _0x1d9020=a217_0x5500,_0x4f2075=_0x1ad525();while(!![]){try{const _0x28553c=parseInt(_0x1d9020(0x10b))/0x1+parseInt(_0x1d9020(0x10d))/0x2+-parseInt(_0x1d9020(0x112))/0x3+-parseInt(_0x1d9020(0x113))/0x4+-parseInt(_0x1d9020(0x10f))/0x5*(parseInt(_0x1d9020(0x10c))/0x6)+-parseInt(_0x1d9020(0x10e))/0x7+-parseInt(_0x1d9020(0x110))/0x8*(-parseInt(_0x1d9020(0x111))/0x9);if(_0x28553c===_0x183560)break;else _0x4f2075['push'](_0x4f2075['shift']());}catch(_0x4641a2){_0x4f2075['push'](_0x4f2075['shift']());}}}(a217_0x3252,0x1fb08));import{taskStatus}from'../../commands/task/status.js';export const taskDefinitions=[taskStatus];function a217_0x5500(_0x535a96,_0x560409){_0x535a96=_0x535a96-0x10b;const _0x32525d=a217_0x3252();let _0x55007a=_0x32525d[_0x535a96];return _0x55007a;}function a217_0x3252(){const _0x22b0f2=['1334522TcoyMA','5riQKpf','4014272ShMBbh','9pvEbSH','476676Ihumfi','722444efvqxd','49816Tqgzgx','341826meYTsn','330640TAuvxr'];a217_0x3252=function(){return _0x22b0f2;};return a217_0x3252();}
@@ -1 +1 @@
1
- const a218_0x1baa00=a218_0x5266;(function(_0x463da4,_0x102992){const _0x281a84=a218_0x5266,_0x178ea9=_0x463da4();while(!![]){try{const _0x2e3258=parseInt(_0x281a84(0x123))/0x1*(-parseInt(_0x281a84(0x120))/0x2)+parseInt(_0x281a84(0x126))/0x3*(-parseInt(_0x281a84(0x11f))/0x4)+parseInt(_0x281a84(0x12b))/0x5+-parseInt(_0x281a84(0x127))/0x6*(parseInt(_0x281a84(0x118))/0x7)+-parseInt(_0x281a84(0x11b))/0x8+parseInt(_0x281a84(0x12a))/0x9+parseInt(_0x281a84(0x11e))/0xa;if(_0x2e3258===_0x102992)break;else _0x178ea9['push'](_0x178ea9['shift']());}catch(_0x189af3){_0x178ea9['push'](_0x178ea9['shift']());}}}(a218_0x3e85,0x80d29));function a218_0x5266(_0x23bacc,_0x343f08){_0x23bacc=_0x23bacc-0x117;const _0x3e8570=a218_0x3e85();let _0x526613=_0x3e8570[_0x23bacc];return _0x526613;}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asyncTaskMessage,buildAsyncTaskStatusCommand,normalizeAsyncTask}from'../../commands/common/async-task.js';import{getAsyncTaskStatus}from'../../core/api-client.js';function a218_0x3e85(){const _0x11aea4=['str','task-id','17189PDPDbi','Query\x20an\x20asynchronous\x20task;\x20repeat\x20for\x20PENDING\x20or\x20PROCESSING\x20until\x20SUCCESS\x20or\x20FAILED','flagMissing','35886WfhBaZ','167502SfrbYi','compress','isTerminal','4614570zLUlMB','607590ituxZO','trim','84MlubKA','status','string','3271664nkTECV','appCode','taskId','21398550lhfsJt','284wvFawl','76CwiLWq'];a218_0x3e85=function(){return _0x11aea4;};return a218_0x3e85();}import{CliErrors}from'../../errors.js';export const taskStatus={'service':'task','command':a218_0x1baa00(0x119),'description':a218_0x1baa00(0x124),'risk':'read','defaultOutputFormat':a218_0x1baa00(0x128),'structuredErrors':!![],'flags':[{'name':a218_0x1baa00(0x122),'type':a218_0x1baa00(0x11a),'required':!![],'description':'Task\x20id\x20returned\x20by\x20an\x20asynchronous\x20platform\x20command'},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2fbc7d){const _0x6a769b=a218_0x1baa00;if(!_0x2fbc7d[_0x6a769b(0x121)](_0x6a769b(0x122))[_0x6a769b(0x117)]())throw CliErrors[_0x6a769b(0x125)](_0x6a769b(0x122));},async 'execute'(_0x54b960){const _0x437150=a218_0x1baa00,_0x5db969=_0x54b960[_0x437150(0x121)](_0x437150(0x122))[_0x437150(0x117)](),_0x316a85=normalizeAsyncTask(await getAsyncTaskStatus(_0x5db969,_0x54b960['appCode'],_0x54b960['cookie']));if(_0x316a85[_0x437150(0x11d)]!==_0x5db969)throw CliErrors['apiError']('Task\x20status\x20response\x20id\x20mismatch:\x20requested\x20'+_0x5db969+',\x20received\x20'+_0x316a85[_0x437150(0x11d)]+'.');const _0x1ddae2=buildAsyncTaskStatusCommand(_0x316a85[_0x437150(0x11d)],_0x54b960['appCode']);return{'ok':!![],'message':asyncTaskMessage(_0x316a85),'data':{'appCode':_0x54b960[_0x437150(0x11c)],..._0x316a85,'query':_0x316a85[_0x437150(0x129)]?null:{'command':_0x1ddae2}}};}};
1
+ const a218_0x1ad049=a218_0x7e26;function a218_0x7e26(_0x403449,_0x17514e){_0x403449=_0x403449-0xfc;const _0xbc8bcd=a218_0xbc8b();let _0x7e26b0=_0xbc8bcd[_0x403449];return _0x7e26b0;}(function(_0x32c42c,_0x428528){const _0x164ff6=a218_0x7e26,_0x4a01c1=_0x32c42c();while(!![]){try{const _0x48e1ef=-parseInt(_0x164ff6(0x10a))/0x1*(-parseInt(_0x164ff6(0x105))/0x2)+-parseInt(_0x164ff6(0x109))/0x3*(parseInt(_0x164ff6(0x116))/0x4)+parseInt(_0x164ff6(0x114))/0x5*(-parseInt(_0x164ff6(0x10c))/0x6)+-parseInt(_0x164ff6(0xfd))/0x7*(parseInt(_0x164ff6(0x115))/0x8)+parseInt(_0x164ff6(0x10d))/0x9*(-parseInt(_0x164ff6(0x100))/0xa)+parseInt(_0x164ff6(0x106))/0xb*(-parseInt(_0x164ff6(0x10b))/0xc)+-parseInt(_0x164ff6(0x117))/0xd*(-parseInt(_0x164ff6(0x113))/0xe);if(_0x48e1ef===_0x428528)break;else _0x4a01c1['push'](_0x4a01c1['shift']());}catch(_0x6454a6){_0x4a01c1['push'](_0x4a01c1['shift']());}}}(a218_0xbc8b,0x50553));import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{asyncTaskMessage,buildAsyncTaskStatusCommand,normalizeAsyncTask}from'../../commands/common/async-task.js';import{getAsyncTaskStatus}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a218_0xbc8b(){const _0x4236cc=['Task\x20status\x20response\x20id\x20mismatch:\x20requested\x20','Task\x20id\x20returned\x20by\x20an\x20asynchronous\x20platform\x20command','112238KrNbeB','305100wZuGZJ','40wacQHM','2504BMkrvg','1599WLhkzS','taskId','483273JvrLoY','status','trim','161360hdKRDh','string','flagMissing','isTerminal','apiError','361668MpoYNz','11PbgNbn','task-id','Query\x20an\x20asynchronous\x20task;\x20repeat\x20for\x20PENDING\x20or\x20PROCESSING\x20until\x20SUCCESS\x20or\x20FAILED','1878sLFwxh','3kJNMOm','4430244dKJUKg','6ICHDEf','18kkCiwX','str','appCode','compress'];a218_0xbc8b=function(){return _0x4236cc;};return a218_0xbc8b();}export const taskStatus={'service':'task','command':a218_0x1ad049(0xfe),'description':a218_0x1ad049(0x108),'risk':'read','defaultOutputFormat':a218_0x1ad049(0x110),'structuredErrors':!![],'flags':[{'name':'task-id','type':a218_0x1ad049(0x101),'required':!![],'description':a218_0x1ad049(0x112)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x1b0fff){const _0x2e5bb2=a218_0x1ad049;if(!_0x1b0fff[_0x2e5bb2(0x10e)](_0x2e5bb2(0x107))[_0x2e5bb2(0xff)]())throw CliErrors[_0x2e5bb2(0x102)](_0x2e5bb2(0x107));},async 'execute'(_0x546699){const _0x3a65e8=a218_0x1ad049,_0x52f38f=_0x546699[_0x3a65e8(0x10e)](_0x3a65e8(0x107))[_0x3a65e8(0xff)](),_0x278cf8=normalizeAsyncTask(await getAsyncTaskStatus(_0x52f38f,_0x546699[_0x3a65e8(0x10f)],_0x546699['cookie']));if(_0x278cf8[_0x3a65e8(0xfc)]!==_0x52f38f)throw CliErrors[_0x3a65e8(0x104)](_0x3a65e8(0x111)+_0x52f38f+',\x20received\x20'+_0x278cf8['taskId']+'.');const _0x140472=buildAsyncTaskStatusCommand(_0x278cf8[_0x3a65e8(0xfc)],_0x546699['appCode']);return{'ok':!![],'message':asyncTaskMessage(_0x278cf8),'data':{'appCode':_0x546699[_0x3a65e8(0x10f)],..._0x278cf8,'query':_0x278cf8[_0x3a65e8(0x103)]?null:{'command':_0x140472}}};}};
@@ -1 +1 @@
1
- function a219_0x10ef(){const _0x7cc440=['150oiRwAm','40cLRSWh','7216QvGuka','875IKElvw','2826087vEiWyC','16925VFioox','1730379UtBgmP','6012999PCFVfY','1785796SrhxdB','525376JnunRC','15rAnRRT'];a219_0x10ef=function(){return _0x7cc440;};return a219_0x10ef();}(function(_0x163e0a,_0x1ba368){const _0x319e98=a219_0x5d1e,_0x4f9a9f=_0x163e0a();while(!![]){try{const _0x356a51=parseInt(_0x319e98(0xf1))/0x1+-parseInt(_0x319e98(0xf3))/0x2+-parseInt(_0x319e98(0xf5))/0x3*(-parseInt(_0x319e98(0xf4))/0x4)+parseInt(_0x319e98(0xf0))/0x5*(-parseInt(_0x319e98(0xf6))/0x6)+parseInt(_0x319e98(0xee))/0x7*(-parseInt(_0x319e98(0xed))/0x8)+parseInt(_0x319e98(0xf2))/0x9+parseInt(_0x319e98(0xec))/0xa*(-parseInt(_0x319e98(0xef))/0xb);if(_0x356a51===_0x1ba368)break;else _0x4f9a9f['push'](_0x4f9a9f['shift']());}catch(_0xca6528){_0x4f9a9f['push'](_0x4f9a9f['shift']());}}}(a219_0x10ef,0xe4d35));import{tenantMembersListDefinition}from'../../commands/tenant/members-list.js';function a219_0x5d1e(_0x41f96a,_0x128250){_0x41f96a=_0x41f96a-0xec;const _0x10ef80=a219_0x10ef();let _0x5d1ea3=_0x10ef80[_0x41f96a];return _0x5d1ea3;}export const tenantDefinitions=[tenantMembersListDefinition];
1
+ function a219_0x3118(){const _0x3333f7=['11FuOOZx','750651aOsqwy','2913ItkvxH','2360430pQZVGr','5702988tFvsOf','4muXeUs','1174435IEEMyp','138RxFwME','308HvYhbp','8fwTzki','36048dZdpcO','1580733xQPSMC'];a219_0x3118=function(){return _0x3333f7;};return a219_0x3118();}(function(_0x3c6d8e,_0x16c66b){const _0x136700=a219_0x4f21,_0x2b8c3a=_0x3c6d8e();while(!![]){try{const _0x4ee0ad=parseInt(_0x136700(0x14e))/0x1*(-parseInt(_0x136700(0x147))/0x2)+parseInt(_0x136700(0x14d))/0x3*(parseInt(_0x136700(0x145))/0x4)+-parseInt(_0x136700(0x146))/0x5+parseInt(_0x136700(0x14a))/0x6*(parseInt(_0x136700(0x148))/0x7)+parseInt(_0x136700(0x149))/0x8*(-parseInt(_0x136700(0x14b))/0x9)+-parseInt(_0x136700(0x14f))/0xa*(parseInt(_0x136700(0x14c))/0xb)+parseInt(_0x136700(0x144))/0xc;if(_0x4ee0ad===_0x16c66b)break;else _0x2b8c3a['push'](_0x2b8c3a['shift']());}catch(_0x100f03){_0x2b8c3a['push'](_0x2b8c3a['shift']());}}}(a219_0x3118,0x22bae));import{tenantMembersListDefinition}from'../../commands/tenant/members-list.js';function a219_0x4f21(_0x4e28b2,_0x48c19d){_0x4e28b2=_0x4e28b2-0x144;const _0x3118d8=a219_0x3118();let _0x4f21b3=_0x3118d8[_0x4e28b2];return _0x4f21b3;}export const tenantDefinitions=[tenantMembersListDefinition];
@@ -1 +1 @@
1
- function a220_0x33f1(_0x2b51ae,_0x4f9166){_0x2b51ae=_0x2b51ae-0x102;const _0x5dcdb1=a220_0x5dcd();let _0x33f1c4=_0x5dcdb1[_0x2b51ae];return _0x33f1c4;}const a220_0x26c1bb=a220_0x33f1;(function(_0x42f73a,_0x3dd16b){const _0x5f5261=a220_0x33f1,_0x79ffce=_0x42f73a();while(!![]){try{const _0x9e970a=-parseInt(_0x5f5261(0x110))/0x1+-parseInt(_0x5f5261(0x112))/0x2*(parseInt(_0x5f5261(0x103))/0x3)+parseInt(_0x5f5261(0x109))/0x4*(-parseInt(_0x5f5261(0x104))/0x5)+parseInt(_0x5f5261(0x10b))/0x6*(-parseInt(_0x5f5261(0x106))/0x7)+parseInt(_0x5f5261(0x102))/0x8*(parseInt(_0x5f5261(0x10e))/0x9)+-parseInt(_0x5f5261(0x115))/0xa+parseInt(_0x5f5261(0x10c))/0xb;if(_0x9e970a===_0x3dd16b)break;else _0x79ffce['push'](_0x79ffce['shift']());}catch(_0x16020c){_0x79ffce['push'](_0x79ffce['shift']());}}}(a220_0x5dcd,0x39139));function a220_0x5dcd(){const _0xde3144=['Pass\x20--tenant-code\x20<code>.','1289835FWPzMC','members-list','145052lHoHNF','\x20tenant\x20member(s)','31282ZRaLMZ','tenant','flagMissing','4002160DBGEFl','tenant-code','24SzKATG','27hBncVU','404555DohZWd','trim','483679tCANlH','str','string','4PqMAXI','read','18wlmLfX','8558869typcYi'];a220_0x5dcd=function(){return _0xde3144;};return a220_0x5dcd();}import{listCurrentUserTenantMemberships,listTenantDirectoryMembers}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{assertTenantAccessible,projectTenantMembers}from'../../commands/tenant/shared.js';export const tenantMembersListDefinition={'service':a220_0x26c1bb(0x113),'command':a220_0x26c1bb(0x10f),'description':'List\x20members\x20of\x20a\x20tenant\x20available\x20to\x20the\x20current\x20account','risk':a220_0x26c1bb(0x10a),'requiresAuth':!![],'requiresAppCode':![],'structuredErrors':!![],'flags':[{'name':a220_0x26c1bb(0x116),'type':a220_0x26c1bb(0x108),'required':!![],'description':'Exact\x20tenant\x20code'}],async 'validate'(_0x278886){const _0x167842=a220_0x26c1bb;if(!_0x278886[_0x167842(0x107)]('tenant-code')[_0x167842(0x105)]())throw CliErrors[_0x167842(0x114)](_0x167842(0x116),_0x167842(0x10d));},async 'execute'(_0x433739){const _0x1f4084=a220_0x26c1bb,_0x3f784b=_0x433739[_0x1f4084(0x107)](_0x1f4084(0x116))[_0x1f4084(0x105)](),_0x2b0fee=await listCurrentUserTenantMemberships();assertTenantAccessible(_0x3f784b,_0x2b0fee);const _0x541e56=projectTenantMembers(await listTenantDirectoryMembers(_0x3f784b));return{'ok':!![],'data':{'tenantCode':_0x3f784b,'items':_0x541e56,'totalCount':_0x541e56['length']},'message':'Found\x20'+_0x541e56['length']+_0x1f4084(0x111)};}};
1
+ function a220_0x5dad(){const _0x5a7be7=['Exact\x20tenant\x20code','length','1196ZczyUf','16kKoGMt','501083NyWwzh','36358BSDDlD','190qrQiAt','591806Fgvmbr','read','tenant','205735CwXoTd','str','trim','3489QcXXnD','\x20tenant\x20member(s)','flagMissing','members-list','288NeNIvl','2127525MlsCNI','List\x20members\x20of\x20a\x20tenant\x20available\x20to\x20the\x20current\x20account','Pass\x20--tenant-code\x20<code>.','tenant-code','Found\x20','1386963nXIWeF'];a220_0x5dad=function(){return _0x5a7be7;};return a220_0x5dad();}const a220_0x220cce=a220_0x5597;(function(_0xe3424,_0x420d08){const _0x28236f=a220_0x5597,_0x31f2de=_0xe3424();while(!![]){try{const _0x3d8204=-parseInt(_0x28236f(0x100))/0x1+parseInt(_0x28236f(0xfd))/0x2+parseInt(_0x28236f(0x103))/0x3*(-parseInt(_0x28236f(0xf8))/0x4)+-parseInt(_0x28236f(0x108))/0x5+-parseInt(_0x28236f(0x107))/0x6*(parseInt(_0x28236f(0xfb))/0x7)+parseInt(_0x28236f(0xf9))/0x8*(parseInt(_0x28236f(0xf5))/0x9)+-parseInt(_0x28236f(0xfc))/0xa*(-parseInt(_0x28236f(0xfa))/0xb);if(_0x3d8204===_0x420d08)break;else _0x31f2de['push'](_0x31f2de['shift']());}catch(_0x464c14){_0x31f2de['push'](_0x31f2de['shift']());}}}(a220_0x5dad,0x3aeb7));function a220_0x5597(_0x546f2d,_0xca27b3){_0x546f2d=_0x546f2d-0xf2;const _0x5dadda=a220_0x5dad();let _0x55974b=_0x5dadda[_0x546f2d];return _0x55974b;}import{listCurrentUserTenantMemberships,listTenantDirectoryMembers}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{assertTenantAccessible,projectTenantMembers}from'../../commands/tenant/shared.js';export const tenantMembersListDefinition={'service':a220_0x220cce(0xff),'command':a220_0x220cce(0x106),'description':a220_0x220cce(0x109),'risk':a220_0x220cce(0xfe),'requiresAuth':!![],'requiresAppCode':![],'structuredErrors':!![],'flags':[{'name':a220_0x220cce(0xf3),'type':'string','required':!![],'description':a220_0x220cce(0xf6)}],async 'validate'(_0x38bf16){const _0x46cd1d=a220_0x220cce;if(!_0x38bf16[_0x46cd1d(0x101)](_0x46cd1d(0xf3))['trim']())throw CliErrors[_0x46cd1d(0x105)](_0x46cd1d(0xf3),_0x46cd1d(0xf2));},async 'execute'(_0x554496){const _0x235fd9=a220_0x220cce,_0x95ced=_0x554496[_0x235fd9(0x101)]('tenant-code')[_0x235fd9(0x102)](),_0x269f5c=await listCurrentUserTenantMemberships();assertTenantAccessible(_0x95ced,_0x269f5c);const _0x411662=projectTenantMembers(await listTenantDirectoryMembers(_0x95ced));return{'ok':!![],'data':{'tenantCode':_0x95ced,'items':_0x411662,'totalCount':_0x411662[_0x235fd9(0xf7)]},'message':_0x235fd9(0xf4)+_0x411662[_0x235fd9(0xf7)]+_0x235fd9(0x104)};}};
@@ -1 +1 @@
1
- (function(_0x22ea9a,_0x5d72ff){const _0x20c597=a221_0x5df2,_0x55fde5=_0x22ea9a();while(!![]){try{const _0xa16d18=parseInt(_0x20c597(0x15c))/0x1+parseInt(_0x20c597(0x153))/0x2+parseInt(_0x20c597(0x14e))/0x3*(parseInt(_0x20c597(0x15d))/0x4)+parseInt(_0x20c597(0x160))/0x5+-parseInt(_0x20c597(0x15e))/0x6*(parseInt(_0x20c597(0x14f))/0x7)+-parseInt(_0x20c597(0x151))/0x8*(parseInt(_0x20c597(0x15b))/0x9)+parseInt(_0x20c597(0x154))/0xa;if(_0xa16d18===_0x5d72ff)break;else _0x55fde5['push'](_0x55fde5['shift']());}catch(_0x8c1e03){_0x55fde5['push'](_0x55fde5['shift']());}}}(a221_0x3874,0xecf43));import{CliErrors}from'../../errors.js';function textOrNull(_0x26baa1){const _0x3b69a6=a221_0x5df2,_0x3c0152=_0x26baa1?.[_0x3b69a6(0x158)]();return _0x3c0152?_0x3c0152:null;}export function projectTenantMembers(_0x26a134){const _0x56129e=a221_0x5df2,_0x5ace89=new Map();for(const _0x365c6b of _0x26a134){const _0x53c99b=Number(_0x365c6b[_0x56129e(0x14b)]);if(!Number['isFinite'](_0x53c99b)||_0x53c99b<=0x0)continue;const _0x8bf767={'userId':_0x53c99b,'username':textOrNull(_0x365c6b['username']),'displayName':textOrNull(_0x365c6b[_0x56129e(0x150)]),'role':_0x365c6b[_0x56129e(0x15f)]===!![]?_0x56129e(0x155):_0x56129e(0x159),'status':textOrNull(_0x365c6b[_0x56129e(0x14d)])},_0x5166aa=_0x5ace89[_0x56129e(0x15a)](_0x53c99b);if(!_0x5166aa){_0x5ace89[_0x56129e(0x152)](_0x53c99b,_0x8bf767);continue;}_0x5166aa[_0x56129e(0x157)]??=_0x8bf767[_0x56129e(0x157)],_0x5166aa['displayName']??=_0x8bf767[_0x56129e(0x163)],_0x5166aa[_0x56129e(0x14d)]??=_0x8bf767[_0x56129e(0x14d)];if(_0x8bf767[_0x56129e(0x14a)]==='ADMIN')_0x5166aa[_0x56129e(0x14a)]=_0x56129e(0x155);}return[..._0x5ace89[_0x56129e(0x161)]()]['sort']((_0x5ce1b0,_0x5778c4)=>_0x5ce1b0[_0x56129e(0x14b)]-_0x5778c4[_0x56129e(0x14b)]);}function a221_0x3874(){const _0x3bfa36=['ADMIN','some','username','trim','MEMBER','get','112383QeBsvS','770823zhblvl','4bzucYK','11271288XGJPhe','adminFlag','7000745zHlEYT','values','Check\x20--tenant-code\x20or\x20login\x20with\x20an\x20account\x20that\x20belongs\x20to\x20this\x20tenant.','displayName','role','userId','Tenant\x20\x22','status','1977522StMyCC','7eNmRdL','nickname','744EoxANe','set','1316294cafkZU','5221090sPMdSg'];a221_0x3874=function(){return _0x3bfa36;};return a221_0x3874();}function a221_0x5df2(_0x43e991,_0x53a13a){_0x43e991=_0x43e991-0x14a;const _0x387484=a221_0x3874();let _0x5df21b=_0x387484[_0x43e991];return _0x5df21b;}export function assertTenantAccessible(_0x432b39,_0x44723d){const _0x4ad7bb=a221_0x5df2;if(_0x44723d[_0x4ad7bb(0x156)](_0xb6758d=>_0xb6758d['tenantCode']===_0x432b39))return;throw CliErrors['validation'](_0x4ad7bb(0x14c)+_0x432b39+'\x22\x20is\x20not\x20available\x20to\x20the\x20current\x20account.',_0x4ad7bb(0x162));}
1
+ (function(_0x371c5d,_0x5350b5){const _0x562487=a221_0xdc69,_0x409eb9=_0x371c5d();while(!![]){try{const _0x1c226f=parseInt(_0x562487(0x136))/0x1+parseInt(_0x562487(0x13f))/0x2*(-parseInt(_0x562487(0x12e))/0x3)+-parseInt(_0x562487(0x144))/0x4*(-parseInt(_0x562487(0x131))/0x5)+parseInt(_0x562487(0x13b))/0x6+parseInt(_0x562487(0x149))/0x7+parseInt(_0x562487(0x147))/0x8*(parseInt(_0x562487(0x13e))/0x9)+parseInt(_0x562487(0x137))/0xa*(-parseInt(_0x562487(0x13a))/0xb);if(_0x1c226f===_0x5350b5)break;else _0x409eb9['push'](_0x409eb9['shift']());}catch(_0x96e2e1){_0x409eb9['push'](_0x409eb9['shift']());}}}(a221_0x2a9e,0x2f7c3));function a221_0x2a9e(){const _0x52bdb6=['ADMIN','status','1749yYUxoS','sort','adminFlag','35aRfCQP','Tenant\x20\x22','userId','Check\x20--tenant-code\x20or\x20login\x20with\x20an\x20account\x20that\x20belongs\x20to\x20this\x20tenant.','displayName','336608fJIWiQ','510BvaVgs','tenantCode','values','111991dgXqym','799686ipWyAg','isFinite','trim','9iqzNir','652LfPlTQ','role','nickname','validation','set','133412fqZrvd','\x22\x20is\x20not\x20available\x20to\x20the\x20current\x20account.','username','872232REOayL','some','639793LxARVA'];a221_0x2a9e=function(){return _0x52bdb6;};return a221_0x2a9e();}function a221_0xdc69(_0x5320fb,_0x1e8141){_0x5320fb=_0x5320fb-0x12c;const _0x2a9e34=a221_0x2a9e();let _0xdc69c0=_0x2a9e34[_0x5320fb];return _0xdc69c0;}import{CliErrors}from'../../errors.js';function textOrNull(_0x296b59){const _0xba809e=a221_0xdc69,_0x1db228=_0x296b59?.[_0xba809e(0x13d)]();return _0x1db228?_0x1db228:null;}export function projectTenantMembers(_0x17fa34){const _0x348bce=a221_0xdc69,_0x38f1bf=new Map();for(const _0x3a9df0 of _0x17fa34){const _0x5cbe42=Number(_0x3a9df0[_0x348bce(0x133)]);if(!Number[_0x348bce(0x13c)](_0x5cbe42)||_0x5cbe42<=0x0)continue;const _0x19f2da={'userId':_0x5cbe42,'username':textOrNull(_0x3a9df0[_0x348bce(0x146)]),'displayName':textOrNull(_0x3a9df0[_0x348bce(0x141)]),'role':_0x3a9df0[_0x348bce(0x130)]===!![]?'ADMIN':'MEMBER','status':textOrNull(_0x3a9df0[_0x348bce(0x12d)])},_0x4ac9ec=_0x38f1bf['get'](_0x5cbe42);if(!_0x4ac9ec){_0x38f1bf[_0x348bce(0x143)](_0x5cbe42,_0x19f2da);continue;}_0x4ac9ec[_0x348bce(0x146)]??=_0x19f2da[_0x348bce(0x146)],_0x4ac9ec['displayName']??=_0x19f2da[_0x348bce(0x135)],_0x4ac9ec[_0x348bce(0x12d)]??=_0x19f2da[_0x348bce(0x12d)];if(_0x19f2da[_0x348bce(0x140)]===_0x348bce(0x12c))_0x4ac9ec[_0x348bce(0x140)]='ADMIN';}return[..._0x38f1bf[_0x348bce(0x139)]()][_0x348bce(0x12f)]((_0x30a22b,_0x1fad7f)=>_0x30a22b[_0x348bce(0x133)]-_0x1fad7f['userId']);}export function assertTenantAccessible(_0x3fb6e6,_0x34bd11){const _0x1971b2=a221_0xdc69;if(_0x34bd11[_0x1971b2(0x148)](_0x4a0143=>_0x4a0143[_0x1971b2(0x138)]===_0x3fb6e6))return;throw CliErrors[_0x1971b2(0x142)](_0x1971b2(0x132)+_0x3fb6e6+_0x1971b2(0x145),_0x1971b2(0x134));}
@@ -1 +1 @@
1
- const a222_0x5429c3=a222_0x4fc8;(function(_0x48e6ea,_0x57c5cd){const _0x59e2aa=a222_0x4fc8,_0x4c2de7=_0x48e6ea();while(!![]){try{const _0x206113=parseInt(_0x59e2aa(0x17b))/0x1*(-parseInt(_0x59e2aa(0x17d))/0x2)+parseInt(_0x59e2aa(0x183))/0x3+-parseInt(_0x59e2aa(0x190))/0x4*(-parseInt(_0x59e2aa(0x188))/0x5)+-parseInt(_0x59e2aa(0x187))/0x6*(parseInt(_0x59e2aa(0x182))/0x7)+parseInt(_0x59e2aa(0x181))/0x8+-parseInt(_0x59e2aa(0x17a))/0x9+parseInt(_0x59e2aa(0x18a))/0xa;if(_0x206113===_0x57c5cd)break;else _0x4c2de7['push'](_0x4c2de7['shift']());}catch(_0x5a9ad9){_0x4c2de7['push'](_0x4c2de7['shift']());}}}(a222_0x2045,0xbfa96));function a222_0x4fc8(_0x507eb0,_0x179825){_0x507eb0=_0x507eb0-0x177;const _0x20452b=a222_0x2045();let _0x4fc823=_0x20452b[_0x507eb0];return _0x4fc823;}import{asDryRunResult}from'../../commands/common/dry-run.js';import{bindDingTalkSandboxAccount,DING_TALK_SANDBOX_BIND_PATH}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const PROVIDER_ID=a222_0x5429c3(0x18b),CURRENT_BINDING_WARNING=a222_0x5429c3(0x178);function readDingTalkUserId(_0x15e70e){const _0x3358bd=a222_0x5429c3,_0x1a6f02=_0x15e70e[_0x3358bd(0x17f)](_0x3358bd(0x184))[_0x3358bd(0x179)]();if(!_0x1a6f02)throw CliErrors['validation'](_0x3358bd(0x180),_0x3358bd(0x186));return _0x1a6f02;}function buildBindingData(_0x22698f,_0x4b90f5){const _0xef439=a222_0x5429c3;return{'operation':'bind','selector':{'providerId':PROVIDER_ID,'dingTalkUserId':_0x22698f},'before':null,'after':{'providerId':PROVIDER_ID,'dingTalkUserId':_0x22698f,'bound':!![]},'dryRun':_0x4b90f5,'backend':{'method':_0xef439(0x18d),'path':DING_TALK_SANDBOX_BIND_PATH},'warnings':[CURRENT_BINDING_WARNING]};}export const dingTalkSandboxBind={'service':a222_0x5429c3(0x177),'command':a222_0x5429c3(0x18c),'description':a222_0x5429c3(0x17c),'risk':a222_0x5429c3(0x189),'requiresAuth':!![],'requiresAppCode':![],'structuredErrors':!![],'flags':[{'name':'ding-talk-user-id','type':a222_0x5429c3(0x18e),'required':!![],'description':a222_0x5429c3(0x17e)}],async 'validate'(_0x20167e){readDingTalkUserId(_0x20167e);},async 'dryRun'(_0x4668a7){const _0x21482c=a222_0x5429c3,_0x544ff7=readDingTalkUserId(_0x4668a7);return asDryRunResult(buildBindingData(_0x544ff7,!![]),{'method':_0x21482c(0x18d),'url':DING_TALK_SANDBOX_BIND_PATH});},async 'execute'(_0x35321f){const _0x9ce0b1=a222_0x5429c3,_0x42eb28=readDingTalkUserId(_0x35321f),_0x54ed6d=await bindDingTalkSandboxAccount(_0x42eb28);if(_0x54ed6d!==!![])throw CliErrors[_0x9ce0b1(0x185)]('DingTalk\x20sandbox\x20account\x20binding\x20was\x20not\x20confirmed.',_0x9ce0b1(0x18f));return{'ok':!![],'data':buildBindingData(_0x42eb28,![]),'message':_0x9ce0b1(0x191)};}};function a222_0x2045(){const _0x29e690=['DingTalk\x20user\x20id\x20returned\x20by\x20the\x20sandbox','str','--ding-talk-user-id\x20cannot\x20be\x20empty.','6063048UZIOfi','7ndSUYU','1654485AyzORC','ding-talk-user-id','apiError','Pass\x20the\x20DingTalk\x20user\x20id\x20returned\x20by\x20the\x20sandbox.','2274786DBnODA','15ClnuZW','write','4857510heEQFu','dingtalk','dingding-sandbox-bind','POST','string','Retry\x20with\x20the\x20same\x20--ding-talk-user-id\x20only\x20after\x20checking\x20the\x20current\x20platform\x20session.','646792lLVhGS','Bound\x20current\x20user\x20to\x20DingTalk\x20sandbox\x20account.','user-account','The\x20current\x20binding\x20is\x20not\x20exposed\x20by\x20the\x20server;\x20before\x20is\x20unavailable.','trim','2107710DEZjfF','13162bqWUrA','Bind\x20the\x20current\x20platform\x20user\x20to\x20a\x20DingTalk\x20sandbox\x20account','134LoaodT'];a222_0x2045=function(){return _0x29e690;};return a222_0x2045();}
1
+ const a222_0xb52d8=a222_0x583d;function a222_0x583d(_0x270747,_0x4d6ccd){_0x270747=_0x270747-0x78;const _0xc8a9e7=a222_0xc8a9();let _0x583d29=_0xc8a9e7[_0x270747];return _0x583d29;}function a222_0xc8a9(){const _0x333ca3=['1278968mJpsTs','dingtalk','bind','49SSXqIh','user-account','string','Bind\x20the\x20current\x20platform\x20user\x20to\x20a\x20DingTalk\x20sandbox\x20account','32pFPqoW','5fdqpws','The\x20current\x20binding\x20is\x20not\x20exposed\x20by\x20the\x20server;\x20before\x20is\x20unavailable.','5360580KHGbYB','write','1169464uQgUlO','Pass\x20the\x20DingTalk\x20user\x20id\x20returned\x20by\x20the\x20sandbox.','POST','trim','validation','60NitRDO','48010WUKbVg','ding-talk-user-id','26098127TdKwpS','241578sRrsbP','4793874BRwXlJ','Retry\x20with\x20the\x20same\x20--ding-talk-user-id\x20only\x20after\x20checking\x20the\x20current\x20platform\x20session.','DingTalk\x20user\x20id\x20returned\x20by\x20the\x20sandbox','str','Bound\x20current\x20user\x20to\x20DingTalk\x20sandbox\x20account.','apiError'];a222_0xc8a9=function(){return _0x333ca3;};return a222_0xc8a9();}(function(_0x21efad,_0x31700c){const _0x28329a=a222_0x583d,_0x5d2391=_0x21efad();while(!![]){try{const _0x2b86e6=-parseInt(_0x28329a(0x7d))/0x1*(parseInt(_0x28329a(0x8e))/0x2)+parseInt(_0x28329a(0x81))/0x3+-parseInt(_0x28329a(0x87))/0x4*(parseInt(_0x28329a(0x8f))/0x5)+-parseInt(_0x28329a(0x91))/0x6+parseInt(_0x28329a(0x8a))/0x7*(-parseInt(_0x28329a(0x93))/0x8)+-parseInt(_0x28329a(0x80))/0x9*(parseInt(_0x28329a(0x7c))/0xa)+parseInt(_0x28329a(0x7f))/0xb;if(_0x2b86e6===_0x31700c)break;else _0x5d2391['push'](_0x5d2391['shift']());}catch(_0x287b5b){_0x5d2391['push'](_0x5d2391['shift']());}}}(a222_0xc8a9,0xc47f2));import{asDryRunResult}from'../../commands/common/dry-run.js';import{bindDingTalkSandboxAccount,DING_TALK_SANDBOX_BIND_PATH}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';const PROVIDER_ID=a222_0xb52d8(0x88),CURRENT_BINDING_WARNING=a222_0xb52d8(0x90);function readDingTalkUserId(_0xcab41f){const _0x2d429f=a222_0xb52d8,_0x2352a1=_0xcab41f[_0x2d429f(0x84)](_0x2d429f(0x7e))[_0x2d429f(0x7a)]();if(!_0x2352a1)throw CliErrors[_0x2d429f(0x7b)]('--ding-talk-user-id\x20cannot\x20be\x20empty.',_0x2d429f(0x78));return _0x2352a1;}function buildBindingData(_0x170302,_0x58b46e){const _0x5a59a2=a222_0xb52d8;return{'operation':_0x5a59a2(0x89),'selector':{'providerId':PROVIDER_ID,'dingTalkUserId':_0x170302},'before':null,'after':{'providerId':PROVIDER_ID,'dingTalkUserId':_0x170302,'bound':!![]},'dryRun':_0x58b46e,'backend':{'method':_0x5a59a2(0x79),'path':DING_TALK_SANDBOX_BIND_PATH},'warnings':[CURRENT_BINDING_WARNING]};}export const dingTalkSandboxBind={'service':a222_0xb52d8(0x8b),'command':'dingding-sandbox-bind','description':a222_0xb52d8(0x8d),'risk':a222_0xb52d8(0x92),'requiresAuth':!![],'requiresAppCode':![],'structuredErrors':!![],'flags':[{'name':a222_0xb52d8(0x7e),'type':a222_0xb52d8(0x8c),'required':!![],'description':a222_0xb52d8(0x83)}],async 'validate'(_0x5c6b7b){readDingTalkUserId(_0x5c6b7b);},async 'dryRun'(_0x54fe83){const _0x5df6fd=a222_0xb52d8,_0xff1cbc=readDingTalkUserId(_0x54fe83);return asDryRunResult(buildBindingData(_0xff1cbc,!![]),{'method':_0x5df6fd(0x79),'url':DING_TALK_SANDBOX_BIND_PATH});},async 'execute'(_0x2988bf){const _0x270422=a222_0xb52d8,_0x4e9d24=readDingTalkUserId(_0x2988bf),_0x46c798=await bindDingTalkSandboxAccount(_0x4e9d24);if(_0x46c798!==!![])throw CliErrors[_0x270422(0x86)]('DingTalk\x20sandbox\x20account\x20binding\x20was\x20not\x20confirmed.',_0x270422(0x82));return{'ok':!![],'data':buildBindingData(_0x4e9d24,![]),'message':_0x270422(0x85)};}};
@@ -1 +1 @@
1
- (function(_0x4cab41,_0x4905ea){const _0x487ad4=a223_0x509d,_0x31be88=_0x4cab41();while(!![]){try{const _0x16b619=-parseInt(_0x487ad4(0x16e))/0x1*(parseInt(_0x487ad4(0x16f))/0x2)+parseInt(_0x487ad4(0x16a))/0x3+parseInt(_0x487ad4(0x168))/0x4+parseInt(_0x487ad4(0x169))/0x5*(-parseInt(_0x487ad4(0x16c))/0x6)+-parseInt(_0x487ad4(0x16b))/0x7+parseInt(_0x487ad4(0x16d))/0x8+-parseInt(_0x487ad4(0x170))/0x9;if(_0x16b619===_0x4905ea)break;else _0x31be88['push'](_0x31be88['shift']());}catch(_0x53d953){_0x31be88['push'](_0x31be88['shift']());}}}(a223_0x2834,0xc9272));function a223_0x2834(){const _0x5b437b=['9231800BXQzwZ','143mrEnrX','2072HAllfW','8732196lNyOGc','3952688PdfUJM','18650cvzVsI','764658PkXBrj','1329223TNZSRk','426gRgBit'];a223_0x2834=function(){return _0x5b437b;};return a223_0x2834();}import{dingTalkSandboxBind}from'../../commands/user-account/dingding-sandbox-bind.js';function a223_0x509d(_0x407eee,_0x22352a){_0x407eee=_0x407eee-0x168;const _0x283400=a223_0x2834();let _0x509d8e=_0x283400[_0x407eee];return _0x509d8e;}export const userAccountDefinitions=[dingTalkSandboxBind];
1
+ (function(_0x401c3c,_0x31c807){const _0x219296=a223_0x468d,_0x115187=_0x401c3c();while(!![]){try{const _0x180b33=-parseInt(_0x219296(0x71))/0x1+-parseInt(_0x219296(0x6c))/0x2*(parseInt(_0x219296(0x72))/0x3)+-parseInt(_0x219296(0x70))/0x4*(parseInt(_0x219296(0x6d))/0x5)+-parseInt(_0x219296(0x78))/0x6*(parseInt(_0x219296(0x75))/0x7)+-parseInt(_0x219296(0x6f))/0x8*(parseInt(_0x219296(0x6e))/0x9)+parseInt(_0x219296(0x77))/0xa*(parseInt(_0x219296(0x73))/0xb)+-parseInt(_0x219296(0x76))/0xc*(-parseInt(_0x219296(0x74))/0xd);if(_0x180b33===_0x31c807)break;else _0x115187['push'](_0x115187['shift']());}catch(_0x5a7181){_0x115187['push'](_0x115187['shift']());}}}(a223_0xc3d2,0xc6141));import{dingTalkSandboxBind}from'../../commands/user-account/dingding-sandbox-bind.js';export const userAccountDefinitions=[dingTalkSandboxBind];function a223_0x468d(_0x1b52a9,_0x499f8b){_0x1b52a9=_0x1b52a9-0x6c;const _0xc3d2b6=a223_0xc3d2();let _0x468db2=_0xc3d2b6[_0x1b52a9];return _0x468db2;}function a223_0xc3d2(){const _0x23f601=['7122SBjOOV','24TtGxtn','139520mfItIE','8798247IvWVVv','8KViXKD','104CCguUi','958015ZgCTvw','75963fvWniu','8426352nIWqcu','813683lCjySz','5502FkigKG','756PEzyrq','10SChxxD'];a223_0xc3d2=function(){return _0x23f601;};return a223_0xc3d2();}
@@ -1 +1 @@
1
- const a224_0x321582=a224_0x4a55;(function(_0x6259e9,_0x2d7b33){const _0x2a3548=a224_0x4a55,_0x345a5b=_0x6259e9();while(!![]){try{const _0xf13b90=parseInt(_0x2a3548(0xbf))/0x1*(-parseInt(_0x2a3548(0xba))/0x2)+-parseInt(_0x2a3548(0xb4))/0x3+parseInt(_0x2a3548(0xb9))/0x4+-parseInt(_0x2a3548(0xbb))/0x5+parseInt(_0x2a3548(0xbe))/0x6*(parseInt(_0x2a3548(0xb6))/0x7)+-parseInt(_0x2a3548(0xb3))/0x8+parseInt(_0x2a3548(0xc0))/0x9;if(_0xf13b90===_0x2d7b33)break;else _0x345a5b['push'](_0x345a5b['shift']());}catch(_0x52b900){_0x345a5b['push'](_0x345a5b['shift']());}}}(a224_0x2547,0xd3f5c));import{buildAppAddFlags,runAppAdd,validateAppName}from'../../commands/common/app-registry.js';function a224_0x2547(){const _0x564b9b=['Register\x20an\x20app\x20profile\x20in\x20the\x20current\x20workspace\x20(or\x20--global)','119jRjTbs','name','workspace\x20add','3211456AVIHqF','532594WZMiOq','7673650JCoCKS','workspace','write','286746blczcE','5LdjfkH','35407341xjIStM','7361288ONzTrr','2684688IIlJCv'];a224_0x2547=function(){return _0x564b9b;};return a224_0x2547();}function a224_0x4a55(_0x1d08f2,_0x153703){_0x1d08f2=_0x1d08f2-0xb3;const _0x25473d=a224_0x2547();let _0x4a55d=_0x25473d[_0x1d08f2];return _0x4a55d;}export const workspaceAddDefinition={'service':a224_0x321582(0xbc),'command':'add','description':a224_0x321582(0xb5),'risk':a224_0x321582(0xbd),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a224_0x321582(0xb7),'description':'App\x20profile\x20name','required':!![]}],'flags':buildAppAddFlags(),'validate':_0x551bfa=>validateAppName(_0x551bfa,a224_0x321582(0xb8)),'execute':_0x2c4798=>runAppAdd(_0x2c4798,'workspace\x20add')};
1
+ function a224_0x556a(){const _0x1a5ee0=['workspace','10141576KhOtKz','name','382vTjAkz','96219hasdld','18Ezqykw','10630DqPsAb','25639042JlhrzU','84meLBFZ','1671745uWRyNJ','App\x20profile\x20name','workspace\x20add','write','666xUobWl','4166FFxPvs','1919001nAzSid'];a224_0x556a=function(){return _0x1a5ee0;};return a224_0x556a();}const a224_0x22e9b0=a224_0x55c4;(function(_0xc01b36,_0x4a0d58){const _0x666928=a224_0x55c4,_0x245ee8=_0xc01b36();while(!![]){try{const _0x5fc72d=-parseInt(_0x666928(0x1e2))/0x1*(parseInt(_0x666928(0x1e7))/0x2)+-parseInt(_0x666928(0x1e8))/0x3*(parseInt(_0x666928(0x1ec))/0x4)+-parseInt(_0x666928(0x1dd))/0x5*(parseInt(_0x666928(0x1e9))/0x6)+-parseInt(_0x666928(0x1e3))/0x7+parseInt(_0x666928(0x1e5))/0x8+parseInt(_0x666928(0x1e1))/0x9*(-parseInt(_0x666928(0x1ea))/0xa)+parseInt(_0x666928(0x1eb))/0xb;if(_0x5fc72d===_0x4a0d58)break;else _0x245ee8['push'](_0x245ee8['shift']());}catch(_0x57da78){_0x245ee8['push'](_0x245ee8['shift']());}}}(a224_0x556a,0xbcd34));function a224_0x55c4(_0x2fc823,_0x2dfaa7){_0x2fc823=_0x2fc823-0x1dd;const _0x556ae2=a224_0x556a();let _0x55c4b9=_0x556ae2[_0x2fc823];return _0x55c4b9;}import{buildAppAddFlags,runAppAdd,validateAppName}from'../../commands/common/app-registry.js';export const workspaceAddDefinition={'service':a224_0x22e9b0(0x1e4),'command':'add','description':'Register\x20an\x20app\x20profile\x20in\x20the\x20current\x20workspace\x20(or\x20--global)','risk':a224_0x22e9b0(0x1e0),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a224_0x22e9b0(0x1e6),'description':a224_0x22e9b0(0x1de),'required':!![]}],'flags':buildAppAddFlags(),'validate':_0x18fdc1=>validateAppName(_0x18fdc1,a224_0x22e9b0(0x1df)),'execute':_0x233b08=>runAppAdd(_0x233b08,a224_0x22e9b0(0x1df))};
@@ -1 +1 @@
1
- const a225_0x50d5a0=a225_0x5739;(function(_0x48ec0b,_0x30872d){const _0x4f1260=a225_0x5739,_0xa65312=_0x48ec0b();while(!![]){try{const _0x1844ed=parseInt(_0x4f1260(0x125))/0x1+parseInt(_0x4f1260(0x109))/0x2*(-parseInt(_0x4f1260(0x126))/0x3)+-parseInt(_0x4f1260(0x11d))/0x4+-parseInt(_0x4f1260(0x10a))/0x5+parseInt(_0x4f1260(0x11b))/0x6+-parseInt(_0x4f1260(0x116))/0x7+-parseInt(_0x4f1260(0x124))/0x8*(-parseInt(_0x4f1260(0x12b))/0x9);if(_0x1844ed===_0x30872d)break;else _0xa65312['push'](_0xa65312['shift']());}catch(_0x46a2d9){_0xa65312['push'](_0xa65312['shift']());}}}(a225_0x1bc5,0x514be));import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{RABETBASE_ENV_VALUES}from'../../constant/env.js';import{RABETBASE_OUTPUT_FORMAT_VALUES}from'../../constant/output.js';import{RISK_LEVEL_VALUES}from'../../constant/risk.js';import{validateAppcode}from'../../commands/common/validate.js';import{readConfigFile,readRawConfigWithLayers,resolveWriteConfigPath,writeConfigFile}from'../../context.js';import{workspaceAddDefinition}from'../../commands/workspace/add.js';import{workspaceRemoveDefinition}from'../../commands/workspace/remove.js';function a225_0x5739(_0x56d76b,_0x285c7e){_0x56d76b=_0x56d76b-0xff;const _0x1bc582=a225_0x1bc5();let _0x5739bd=_0x1bc582[_0x56d76b];return _0x5739bd;}import{normalizeStoredDefaultApp}from'../../config/schema.js';const WORKSPACE_USAGE=CLI_BIN_NAME+a225_0x50d5a0(0x12a),SAFE_PROFILE_KEYS=[a225_0x50d5a0(0x122),a225_0x50d5a0(0x11a),'apiDir',a225_0x50d5a0(0x104),a225_0x50d5a0(0x106),a225_0x50d5a0(0x108),a225_0x50d5a0(0x136)],workspaceFlags=[{'name':a225_0x50d5a0(0x12e),'type':a225_0x50d5a0(0x10f),'description':a225_0x50d5a0(0x107)},{'name':a225_0x50d5a0(0x122),'type':a225_0x50d5a0(0x10f),'description':a225_0x50d5a0(0x127)},{'name':a225_0x50d5a0(0x11a),'type':a225_0x50d5a0(0x10f),'description':a225_0x50d5a0(0x119),'enum':[...RABETBASE_ENV_VALUES]},{'name':'apiDir','type':a225_0x50d5a0(0x10f),'description':a225_0x50d5a0(0x115)},{'name':a225_0x50d5a0(0x103),'type':a225_0x50d5a0(0x10f),'description':a225_0x50d5a0(0x129),'enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':a225_0x50d5a0(0x106),'type':a225_0x50d5a0(0x12d),'description':a225_0x50d5a0(0x118)},{'name':a225_0x50d5a0(0x108),'type':a225_0x50d5a0(0x10f),'description':'Risk\x20level\x20for\x20this\x20workspace\x20app\x20profile','enum':[...RISK_LEVEL_VALUES]},{'name':'locale','type':'string','description':a225_0x50d5a0(0x105)}];function isRecord(_0x4f9b79){const _0x50a65a=a225_0x50d5a0;return!!_0x4f9b79&&typeof _0x4f9b79===_0x50a65a(0x11c)&&!Array['isArray'](_0x4f9b79);}function assertValidAppcode(_0x509109){const _0x45e4d5=a225_0x50d5a0,{valid:_0x27d126,message:_0x3c4c9a}=validateAppcode(_0x509109);if(!_0x27d126)throw CliErrors[_0x45e4d5(0x131)](_0x45e4d5(0x111)+_0x509109,_0x3c4c9a);}function sanitizeProfile(_0x4aad97){if(!isRecord(_0x4aad97))return{};const _0x51684f={};for(const _0x31c078 of SAFE_PROFILE_KEYS){if(_0x4aad97[_0x31c078]!==undefined)_0x51684f[_0x31c078]=_0x4aad97[_0x31c078];}return _0x51684f;}function cloneProfile(_0x23c59c){return isRecord(_0x23c59c)?{..._0x23c59c}:{};}function collectWorkspaceProfileOverrides(_0x10c513){const _0x4472cf=a225_0x50d5a0,_0x173aea={},_0x38b066=_0x10c513[_0x4472cf(0x121)](_0x4472cf(0x11a)),_0x486bf6=_0x10c513[_0x4472cf(0x121)](_0x4472cf(0x101)),_0x28b97c=_0x10c513[_0x4472cf(0x121)](_0x4472cf(0x103)),_0x2d7ab0=_0x10c513[_0x4472cf(0x11f)](_0x4472cf(0x106)),_0x24f2c1=_0x10c513[_0x4472cf(0x121)]('riskLevel'),_0x547393=_0x10c513[_0x4472cf(0x121)](_0x4472cf(0x136));if(_0x38b066)_0x173aea[_0x4472cf(0x11a)]=_0x38b066;if(_0x486bf6)_0x173aea[_0x4472cf(0x101)]=_0x486bf6;if(_0x28b97c)_0x173aea[_0x4472cf(0x104)]=_0x28b97c;if(_0x2d7ab0!==undefined&&_0x2d7ab0!=='')_0x173aea['pageSize']=Number(_0x2d7ab0);if(_0x24f2c1)_0x173aea[_0x4472cf(0x108)]=_0x24f2c1;if(_0x547393)_0x173aea[_0x4472cf(0x136)]=_0x547393;return _0x173aea;}async function validateWorkspaceArgs(_0x10d178){const _0x6aa4a7=a225_0x50d5a0,_0x18a450=_0x10d178[_0x6aa4a7(0x121)]('app')[_0x6aa4a7(0x10e)](),_0x22a364=_0x10d178[_0x6aa4a7(0x121)](_0x6aa4a7(0x122))['trim']();if(!_0x18a450&&!_0x22a364)throw CliErrors[_0x6aa4a7(0x131)](_0x6aa4a7(0x102),_0x6aa4a7(0x112)+CLI_BIN_NAME+_0x6aa4a7(0x135)+CLI_BIN_NAME+_0x6aa4a7(0x113));if(_0x22a364)assertValidAppcode(_0x22a364);}function resolveKnownApps(){const _0x1ca26e=a225_0x50d5a0,{config:_0x767d03,layers:_0x57ab73}=readRawConfigWithLayers(),_0x27e342=isRecord(_0x767d03[_0x1ca26e(0x137)])?_0x767d03[_0x1ca26e(0x137)]:{},_0x477caf=isRecord(_0x57ab73[_0x1ca26e(0x11e)][_0x1ca26e(0x137)])?_0x57ab73[_0x1ca26e(0x11e)]['apps']:{};return{..._0x477caf,..._0x27e342};}async function configureWorkspace(_0x3d8398,_0x23b738){const _0x3a2113=a225_0x50d5a0,_0x199813=_0x3d8398[_0x3a2113(0x121)](_0x3a2113(0x12e))[_0x3a2113(0x10e)](),_0x19d393=_0x3d8398['str'](_0x3a2113(0x122))[_0x3a2113(0x10e)](),_0x5711e9=_0x199813||_0x19d393;if(!_0x5711e9)throw CliErrors['validation']('Missing\x20workspace\x20app\x20selector.',_0x3a2113(0x112)+CLI_BIN_NAME+_0x3a2113(0x135)+CLI_BIN_NAME+_0x3a2113(0x113));if(_0x19d393)assertValidAppcode(_0x19d393);const _0x6202c7=resolveWriteConfigPath('project'),_0x45cb99=readConfigFile(_0x6202c7),_0x53cc70=resolveKnownApps(),_0x1315e7=isRecord(_0x45cb99[_0x3a2113(0x137)])?{..._0x45cb99['apps']}:{},_0x2d18bd=cloneProfile(_0x1315e7[_0x5711e9]),_0x444871=sanitizeProfile(_0x53cc70[_0x5711e9]),_0x51bc62=_0x19d393?{}:_0x444871,_0x4eed7a=_0x19d393||_0x51bc62[_0x3a2113(0x122)];if(!_0x4eed7a){const _0x20a4f0=Object['keys'](_0x53cc70),_0x22847c=_0x20a4f0[_0x3a2113(0xff)]===0x0?_0x3a2113(0x112)+CLI_BIN_NAME+_0x3a2113(0x134)+_0x23b738+_0x3a2113(0x10d)+_0x5711e9+_0x3a2113(0x128):'Pass\x20--appcode\x20<code>,\x20or\x20choose\x20one\x20of:\x20'+_0x20a4f0[_0x3a2113(0x130)](',\x20');throw CliErrors['validation'](_0x3a2113(0x132)+_0x5711e9+_0x3a2113(0x100),_0x22847c);}assertValidAppcode(String(_0x4eed7a));const _0x1f3214={..._0x51bc62,..._0x2d18bd,'appcode':String(_0x4eed7a),...collectWorkspaceProfileOverrides(_0x3d8398)};return _0x1315e7[_0x5711e9]=_0x1f3214,_0x45cb99[_0x3a2113(0x137)]=_0x1315e7,normalizeStoredDefaultApp(_0x45cb99,_0x5711e9),delete _0x45cb99['appcode'],delete _0x45cb99[_0x3a2113(0x12e)],_0x1f3214[_0x3a2113(0x11a)]&&(_0x45cb99[_0x3a2113(0x11a)]=_0x1f3214['env']),writeConfigFile(_0x6202c7,_0x45cb99),{'ok':!![],'message':_0x3a2113(0x133)+(_0x23b738===_0x3a2113(0x12c)?'initialized':_0x3a2113(0x110))+':\x20'+_0x5711e9+_0x3a2113(0x10b)+_0x1f3214[_0x3a2113(0x122)]+').\x20Config:\x20'+_0x6202c7+_0x3a2113(0x12f),'data':{'operation':'workspace.'+_0x23b738,'configPath':_0x6202c7,'app':_0x5711e9,'appcode':_0x1f3214[_0x3a2113(0x122)],'env':_0x1f3214['env']??null,'credentialsWritten':![]}};}function a225_0x1bc5(){const _0x33973a=['1940lXyCTl','51351UlqjpD','App\x20code\x20to\x20bind\x20to\x20this\x20workspace','\x20--appcode\x20<code>`.','Default\x20output\x20format\x20for\x20this\x20workspace\x20app\x20profile','\x20workspace\x20<init|use>\x20--app\x20<name>\x20[--appcode\x20<code>]','14908419FyJXyv','init','number','app','.\x20Credentials:\x20not\x20written.','join','validation','App\x20\x22','Workspace\x20','\x20workspace\x20','\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`','locale','apps','length','\x22\x20not\x20found.','apiDir','Missing\x20workspace\x20app\x20selector.','defaultFormat','format','App\x20locale\x20for\x20this\x20workspace\x20app\x20profile\x20(not\x20CLI\x20language;\x20reserved\x20for\x20later\x20app\x20use)','pageSize','App\x20profile\x20name\x20to\x20use\x20in\x20this\x20workspace','riskLevel','52PCyQNA','1792765bpBFYx','\x20(appcode:\x20','use','\x20--app\x20','trim','string','updated','Invalid\x20appcode:\x20','Use\x20`','\x20workspace\x20use\x20--app\x20<name>`.','workspace','API\x20directory\x20path\x20for\x20this\x20workspace\x20app\x20profile','3040464EcrsQW','write','Default\x20page\x20size\x20for\x20this\x20workspace\x20app\x20profile','Target\x20environment','env','2859138jzqZkn','object','2256068NDoFdg','globalConfig','flag','Switch\x20the\x20current\x20workspace\x20app\x20binding','str','appcode','Initialize\x20the\x20current\x20workspace\x20app\x20binding','8dNGmOd'];a225_0x1bc5=function(){return _0x33973a;};return a225_0x1bc5();}const workspaceInitDefinition={'service':a225_0x50d5a0(0x114),'command':'init','description':a225_0x50d5a0(0x123),'risk':a225_0x50d5a0(0x117),'requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x45c1dc=>configureWorkspace(_0x45c1dc,a225_0x50d5a0(0x12c))},workspaceUseDefinition={'service':a225_0x50d5a0(0x114),'command':'use','description':a225_0x50d5a0(0x120),'risk':'write','requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x46167b=>configureWorkspace(_0x46167b,a225_0x50d5a0(0x10c))};export const workspaceDefinitions=[workspaceInitDefinition,workspaceUseDefinition,workspaceAddDefinition,workspaceRemoveDefinition];export{WORKSPACE_USAGE};
1
+ const a225_0x282953=a225_0x437c;(function(_0x3391e9,_0x133f4f){const _0x5680f3=a225_0x437c,_0x201144=_0x3391e9();while(!![]){try{const _0x56e25e=-parseInt(_0x5680f3(0x16f))/0x1+parseInt(_0x5680f3(0x156))/0x2+-parseInt(_0x5680f3(0x17d))/0x3+-parseInt(_0x5680f3(0x16d))/0x4+parseInt(_0x5680f3(0x183))/0x5+parseInt(_0x5680f3(0x16e))/0x6+parseInt(_0x5680f3(0x164))/0x7;if(_0x56e25e===_0x133f4f)break;else _0x201144['push'](_0x201144['shift']());}catch(_0x22b6ec){_0x201144['push'](_0x201144['shift']());}}}(a225_0x2730,0x33fdd));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';function a225_0x437c(_0xf1defc,_0x4cf832){_0xf1defc=_0xf1defc-0x150;const _0x273059=a225_0x2730();let _0x437c12=_0x273059[_0xf1defc];return _0x437c12;}import{validateAppcode}from'../../commands/common/validate.js';import{readConfigFile,readRawConfigWithLayers,resolveWriteConfigPath,writeConfigFile}from'../../context.js';import{workspaceAddDefinition}from'../../commands/workspace/add.js';function a225_0x2730(){const _0x5d4338=['500712dhbFvV','346351jnNHum','region','init','App\x20profile\x20name\x20to\x20use\x20in\x20this\x20workspace','defaultFormat','initialized','Switch\x20the\x20current\x20workspace\x20app\x20binding','apiDir','Risk\x20level\x20for\x20this\x20workspace\x20app\x20profile','validation','length','app','workspace.','App\x20locale\x20for\x20this\x20workspace\x20app\x20profile\x20(not\x20CLI\x20language;\x20reserved\x20for\x20later\x20app\x20use)','513927HzMtGz','\x20--appcode\x20<code>`.','number','\x20workspace\x20use\x20--app\x20<name>`.','project','.\x20Credentials:\x20not\x20written.','1776610mIawQq','write','\x22\x20not\x20found.','trim','isArray','pageSize','Use\x20`','App\x20\x22','object','apps','appcode','Target\x20environment','Invalid\x20appcode:\x20','577142cpzxlF','updated','keys','string','\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`','riskLevel','use','\x20(appcode:\x20','env','Missing\x20workspace\x20app\x20selector.','globalConfig','workspace','locale','App\x20code\x20to\x20bind\x20to\x20this\x20workspace','122675kxBmXg','format','\x20--app\x20','str','join','\x20workspace\x20',').\x20Config:\x20','Pass\x20--appcode\x20<code>,\x20or\x20choose\x20one\x20of:\x20','flag','57012pHYsnr'];a225_0x2730=function(){return _0x5d4338;};return a225_0x2730();}import{workspaceRemoveDefinition}from'../../commands/workspace/remove.js';import{normalizeStoredDefaultApp}from'../../config/schema.js';import{ENABLED_LOVRABET_REGION_VALUES}from'../../constant/region.js';const WORKSPACE_USAGE=CLI_BIN_NAME+'\x20workspace\x20<init|use>\x20--app\x20<name>\x20[--appcode\x20<code>]',SAFE_PROFILE_KEYS=[a225_0x282953(0x153),a225_0x282953(0x170),a225_0x282953(0x15e),a225_0x282953(0x176),a225_0x282953(0x165),'pageSize',a225_0x282953(0x15b),'locale'],workspaceFlags=[{'name':a225_0x282953(0x17a),'type':a225_0x282953(0x159),'description':a225_0x282953(0x172)},{'name':a225_0x282953(0x153),'type':'string','description':a225_0x282953(0x163)},{'name':a225_0x282953(0x170),'type':a225_0x282953(0x159),'description':'Country/region\x20for\x20this\x20workspace\x20app\x20profile','enum':[...ENABLED_LOVRABET_REGION_VALUES]},{'name':a225_0x282953(0x15e),'type':a225_0x282953(0x159),'description':a225_0x282953(0x154),'enum':[...RABETBASE_ENV_VALUES]},{'name':a225_0x282953(0x176),'type':a225_0x282953(0x159),'description':'API\x20directory\x20path\x20for\x20this\x20workspace\x20app\x20profile'},{'name':a225_0x282953(0x173),'type':a225_0x282953(0x159),'description':'Default\x20output\x20format\x20for\x20this\x20workspace\x20app\x20profile','enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':a225_0x282953(0x188),'type':a225_0x282953(0x17f),'description':'Default\x20page\x20size\x20for\x20this\x20workspace\x20app\x20profile'},{'name':'riskLevel','type':a225_0x282953(0x159),'description':a225_0x282953(0x177),'enum':[...RISK_LEVEL_VALUES]},{'name':'locale','type':a225_0x282953(0x159),'description':a225_0x282953(0x17c)}];function isRecord(_0x1b0735){const _0x5d638e=a225_0x282953;return!!_0x1b0735&&typeof _0x1b0735===_0x5d638e(0x151)&&!Array[_0x5d638e(0x187)](_0x1b0735);}function assertValidAppcode(_0x3528ac){const _0x2c481b=a225_0x282953,{valid:_0x2a41d8,message:_0x48e385}=validateAppcode(_0x3528ac);if(!_0x2a41d8)throw CliErrors[_0x2c481b(0x178)](_0x2c481b(0x155)+_0x3528ac,_0x48e385);}function sanitizeProfile(_0xec1a4c){if(!isRecord(_0xec1a4c))return{};const _0x48a199={};for(const _0x3eec74 of SAFE_PROFILE_KEYS){if(_0xec1a4c[_0x3eec74]!==undefined)_0x48a199[_0x3eec74]=_0xec1a4c[_0x3eec74];}return _0x48a199;}function cloneProfile(_0x4f29d4){return isRecord(_0x4f29d4)?{..._0x4f29d4}:{};}function collectWorkspaceProfileOverrides(_0x44f8df){const _0xd7305=a225_0x282953,_0x142b93={},_0x3e58a7=_0x44f8df['str'](_0xd7305(0x170)),_0x462da8=_0x44f8df[_0xd7305(0x167)]('env'),_0x47a861=_0x44f8df[_0xd7305(0x167)]('apiDir'),_0x2ba09f=_0x44f8df['str'](_0xd7305(0x173)),_0x54b048=_0x44f8df[_0xd7305(0x16c)](_0xd7305(0x188)),_0xf901b9=_0x44f8df['str'](_0xd7305(0x15b)),_0x263100=_0x44f8df[_0xd7305(0x167)](_0xd7305(0x162));if(_0x3e58a7)_0x142b93['region']=_0x3e58a7;if(_0x462da8)_0x142b93[_0xd7305(0x15e)]=_0x462da8;if(_0x47a861)_0x142b93['apiDir']=_0x47a861;if(_0x2ba09f)_0x142b93[_0xd7305(0x165)]=_0x2ba09f;if(_0x54b048!==undefined&&_0x54b048!=='')_0x142b93['pageSize']=Number(_0x54b048);if(_0xf901b9)_0x142b93[_0xd7305(0x15b)]=_0xf901b9;if(_0x263100)_0x142b93[_0xd7305(0x162)]=_0x263100;return _0x142b93;}async function validateWorkspaceArgs(_0x275c5d){const _0x5f342d=a225_0x282953,_0x260fa6=_0x275c5d[_0x5f342d(0x167)](_0x5f342d(0x17a))[_0x5f342d(0x186)](),_0xe8f7ea=_0x275c5d[_0x5f342d(0x167)](_0x5f342d(0x153))['trim']();if(!_0x260fa6&&!_0xe8f7ea)throw CliErrors['validation'](_0x5f342d(0x15f),'Use\x20`'+CLI_BIN_NAME+_0x5f342d(0x15a)+CLI_BIN_NAME+_0x5f342d(0x180));if(_0xe8f7ea)assertValidAppcode(_0xe8f7ea);}function resolveKnownApps(){const _0x57e0c8=a225_0x282953,{config:_0x3490ed,layers:_0x252dcf}=readRawConfigWithLayers(),_0xf62704=isRecord(_0x3490ed[_0x57e0c8(0x152)])?_0x3490ed[_0x57e0c8(0x152)]:{},_0x405136=isRecord(_0x252dcf[_0x57e0c8(0x160)][_0x57e0c8(0x152)])?_0x252dcf[_0x57e0c8(0x160)][_0x57e0c8(0x152)]:{};return{..._0x405136,..._0xf62704};}async function configureWorkspace(_0x3413cb,_0x5ce85e){const _0x453777=a225_0x282953,_0x562f92=_0x3413cb[_0x453777(0x167)](_0x453777(0x17a))[_0x453777(0x186)](),_0x5994a7=_0x3413cb['str'](_0x453777(0x153))['trim'](),_0x3554fa=_0x562f92||_0x5994a7;if(!_0x3554fa)throw CliErrors['validation'](_0x453777(0x15f),_0x453777(0x189)+CLI_BIN_NAME+'\x20workspace\x20init\x20--appcode\x20<code>`\x20or\x20`'+CLI_BIN_NAME+_0x453777(0x180));if(_0x5994a7)assertValidAppcode(_0x5994a7);const _0x88c23c=resolveWriteConfigPath(_0x453777(0x181)),_0x1ecbd4=readConfigFile(_0x88c23c),_0x2de1f3=resolveKnownApps(),_0x520267=isRecord(_0x1ecbd4['apps'])?{..._0x1ecbd4['apps']}:{},_0x255bc0=cloneProfile(_0x520267[_0x3554fa]),_0x3f877b=sanitizeProfile(_0x2de1f3[_0x3554fa]),_0x2a3e93=_0x5994a7?{}:_0x3f877b,_0x2cb30f=_0x5994a7||_0x2a3e93['appcode'];if(!_0x2cb30f){const _0x3a70f4=Object[_0x453777(0x158)](_0x2de1f3),_0xb63761=_0x3a70f4[_0x453777(0x179)]===0x0?_0x453777(0x189)+CLI_BIN_NAME+_0x453777(0x169)+_0x5ce85e+_0x453777(0x166)+_0x3554fa+_0x453777(0x17e):_0x453777(0x16b)+_0x3a70f4[_0x453777(0x168)](',\x20');throw CliErrors['validation'](_0x453777(0x150)+_0x3554fa+_0x453777(0x185),_0xb63761);}assertValidAppcode(String(_0x2cb30f));const _0xf83b37={..._0x2a3e93,..._0x255bc0,'appcode':String(_0x2cb30f),...collectWorkspaceProfileOverrides(_0x3413cb)};return _0x520267[_0x3554fa]=_0xf83b37,_0x1ecbd4[_0x453777(0x152)]=_0x520267,normalizeStoredDefaultApp(_0x1ecbd4,_0x3554fa),delete _0x1ecbd4[_0x453777(0x153)],delete _0x1ecbd4[_0x453777(0x17a)],_0xf83b37[_0x453777(0x15e)]&&(_0x1ecbd4['env']=_0xf83b37['env']),writeConfigFile(_0x88c23c,_0x1ecbd4),{'ok':!![],'message':'Workspace\x20'+(_0x5ce85e===_0x453777(0x171)?_0x453777(0x174):_0x453777(0x157))+':\x20'+_0x3554fa+_0x453777(0x15d)+_0xf83b37[_0x453777(0x153)]+_0x453777(0x16a)+_0x88c23c+_0x453777(0x182),'data':{'operation':_0x453777(0x17b)+_0x5ce85e,'configPath':_0x88c23c,'app':_0x3554fa,'appcode':_0xf83b37[_0x453777(0x153)],'region':_0xf83b37[_0x453777(0x170)]??null,'env':_0xf83b37[_0x453777(0x15e)]??null,'credentialsWritten':![]}};}const workspaceInitDefinition={'service':'workspace','command':a225_0x282953(0x171),'description':'Initialize\x20the\x20current\x20workspace\x20app\x20binding','risk':a225_0x282953(0x184),'requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x42d4a6=>configureWorkspace(_0x42d4a6,'init')},workspaceUseDefinition={'service':a225_0x282953(0x161),'command':a225_0x282953(0x15c),'description':a225_0x282953(0x175),'risk':'write','requiresAuth':![],'requiresAppCode':![],'args':[],'flags':workspaceFlags,'validate':validateWorkspaceArgs,'execute':_0x3e776a=>configureWorkspace(_0x3e776a,'use')};export const workspaceDefinitions=[workspaceInitDefinition,workspaceUseDefinition,workspaceAddDefinition,workspaceRemoveDefinition];export{WORKSPACE_USAGE};
@@ -1 +1 @@
1
- const a226_0x48d146=a226_0x50f5;(function(_0x143bd8,_0x49ed04){const _0x1c259a=a226_0x50f5,_0x123a9f=_0x143bd8();while(!![]){try{const _0x2e4c4e=parseInt(_0x1c259a(0x14e))/0x1*(parseInt(_0x1c259a(0x148))/0x2)+parseInt(_0x1c259a(0x154))/0x3*(parseInt(_0x1c259a(0x14c))/0x4)+-parseInt(_0x1c259a(0x151))/0x5+-parseInt(_0x1c259a(0x14d))/0x6+parseInt(_0x1c259a(0x147))/0x7*(parseInt(_0x1c259a(0x14f))/0x8)+parseInt(_0x1c259a(0x149))/0x9+-parseInt(_0x1c259a(0x150))/0xa;if(_0x2e4c4e===_0x49ed04)break;else _0x123a9f['push'](_0x123a9f['shift']());}catch(_0x4c2f86){_0x123a9f['push'](_0x123a9f['shift']());}}}(a226_0x3cc5,0x3d77e));import{buildAppRemoveFlags,runAppRemove,validateAppName}from'../../commands/common/app-registry.js';function a226_0x50f5(_0x491a93,_0x1ce3f2){_0x491a93=_0x491a93-0x147;const _0x3cc501=a226_0x3cc5();let _0x50f567=_0x3cc501[_0x491a93];return _0x50f567;}function a226_0x3cc5(){const _0x239052=['7lNKMxj','41236pHRhLB','1032192CRkRSN','name','workspace','20348dcfBZk','1703322bRDePb','8KdKHyR','3254656mwAMms','625440ctReKp','2043700qdQJpJ','write','workspace\x20remove','189WrBhYm','App\x20profile\x20name\x20to\x20remove'];a226_0x3cc5=function(){return _0x239052;};return a226_0x3cc5();}export const workspaceRemoveDefinition={'service':a226_0x48d146(0x14b),'command':'remove','description':'Remove\x20an\x20app\x20profile\x20from\x20the\x20current\x20workspace\x20(or\x20--global)','risk':a226_0x48d146(0x152),'requiresAuth':![],'requiresAppCode':![],'args':[{'name':a226_0x48d146(0x14a),'description':a226_0x48d146(0x155),'required':!![]}],'flags':buildAppRemoveFlags(),'validate':_0x2bdb53=>validateAppName(_0x2bdb53,a226_0x48d146(0x153)),'execute':_0x463863=>runAppRemove(_0x463863,a226_0x48d146(0x153))};
1
+ function a226_0x164d(_0x4f59aa,_0x229396){_0x4f59aa=_0x4f59aa-0x93;const _0x5a3215=a226_0x5a32();let _0x164d25=_0x5a3215[_0x4f59aa];return _0x164d25;}const a226_0x2df0a1=a226_0x164d;function a226_0x5a32(){const _0x261393=['5604foLLbj','177380QsqAGP','160556UMXvVe','9XwQGms','36051RdTBhc','18RhnSrH','name','Remove\x20an\x20app\x20profile\x20from\x20the\x20current\x20workspace\x20(or\x20--global)','workspace\x20remove','20317EQwKpv','1398072oeGNJd','66pwWXPx','150888MbuDYn','35gYUDEh','764940fPQxiB'];a226_0x5a32=function(){return _0x261393;};return a226_0x5a32();}(function(_0x243e45,_0x350ae5){const _0x4d4f5d=a226_0x164d,_0x333d5c=_0x243e45();while(!![]){try{const _0x5c613c=-parseInt(_0x4d4f5d(0x97))/0x1+-parseInt(_0x4d4f5d(0x9f))/0x2*(-parseInt(_0x4d4f5d(0x96))/0x3)+parseInt(_0x4d4f5d(0x95))/0x4*(parseInt(_0x4d4f5d(0xa0))/0x5)+-parseInt(_0x4d4f5d(0x9e))/0x6*(-parseInt(_0x4d4f5d(0x94))/0x7)+parseInt(_0x4d4f5d(0x9d))/0x8+-parseInt(_0x4d4f5d(0x98))/0x9*(-parseInt(_0x4d4f5d(0xa1))/0xa)+-parseInt(_0x4d4f5d(0x9c))/0xb*(parseInt(_0x4d4f5d(0x93))/0xc);if(_0x5c613c===_0x350ae5)break;else _0x333d5c['push'](_0x333d5c['shift']());}catch(_0xe3d1fc){_0x333d5c['push'](_0x333d5c['shift']());}}}(a226_0x5a32,0x34898));import{buildAppRemoveFlags,runAppRemove,validateAppName}from'../../commands/common/app-registry.js';export const workspaceRemoveDefinition={'service':'workspace','command':'remove','description':a226_0x2df0a1(0x9a),'risk':'write','requiresAuth':![],'requiresAppCode':![],'args':[{'name':a226_0x2df0a1(0x99),'description':'App\x20profile\x20name\x20to\x20remove','required':!![]}],'flags':buildAppRemoveFlags(),'validate':_0x302c74=>validateAppName(_0x302c74,'workspace\x20remove'),'execute':_0x58c56e=>runAppRemove(_0x58c56e,a226_0x2df0a1(0x9b))};
@@ -1 +1 @@
1
- const a227_0x5e968d=a227_0x3b6b;(function(_0x2183b9,_0x581c8a){const _0x174a59=a227_0x3b6b,_0x28d7cd=_0x2183b9();while(!![]){try{const _0x31ad91=parseInt(_0x174a59(0x175))/0x1*(parseInt(_0x174a59(0x168))/0x2)+parseInt(_0x174a59(0x157))/0x3*(-parseInt(_0x174a59(0x152))/0x4)+-parseInt(_0x174a59(0x16d))/0x5+parseInt(_0x174a59(0x158))/0x6+-parseInt(_0x174a59(0x165))/0x7*(parseInt(_0x174a59(0x172))/0x8)+-parseInt(_0x174a59(0x159))/0x9+parseInt(_0x174a59(0x134))/0xa;if(_0x31ad91===_0x581c8a)break;else _0x28d7cd['push'](_0x28d7cd['shift']());}catch(_0x35bd93){_0x28d7cd['push'](_0x28d7cd['shift']());}}}(a227_0x46cb,0xe9b5a));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=['userDomain','apiDomain',a227_0x5e968d(0x15f),a227_0x5e968d(0x167),'kbDomain',a227_0x5e968d(0x163),a227_0x5e968d(0x178),a227_0x5e968d(0x15a)];function a227_0x3b6b(_0x13ca8d,_0xc04f8a){_0x13ca8d=_0x13ca8d-0x132;const _0x46cb85=a227_0x46cb();let _0x3b6b15=_0x46cb85[_0x13ca8d];return _0x3b6b15;}const DOMAIN_FLAGS={'userDomain':a227_0x5e968d(0x15d),'apiDomain':a227_0x5e968d(0x177),'runtimeDomain':a227_0x5e968d(0x156),'skillDomain':a227_0x5e968d(0x169),'kbDomain':a227_0x5e968d(0x173),'appDomain':a227_0x5e968d(0x13b),'localDomain':a227_0x5e968d(0x16e),'certificateDomain':a227_0x5e968d(0x13e)};export const LEGACY_DOMAIN_CONFIG_FIELDS=[a227_0x5e968d(0x13c),a227_0x5e968d(0x17d),'skillHubDomain'];const ENTERPRISE_TO_LOCAL_FIELD={'userDomain':a227_0x5e968d(0x14f),'apiDomain':a227_0x5e968d(0x160),'runtimeDomain':a227_0x5e968d(0x15f),'skillDomain':'skillDomain','kbDomain':a227_0x5e968d(0x144),'appDomain':'appDomain','localDomain':'localDomain','certificateDomain':a227_0x5e968d(0x15a)},ROUTING_CONSUMER='rabetbase-cli';export function normalizeDomainOrigin(_0x1ef3e9,_0x1ed134){const _0x812d89=a227_0x5e968d;if(typeof _0x1ed134!==_0x812d89(0x16b)||!_0x1ed134[_0x812d89(0x17f)]())throw CliErrors['validation'](_0x812d89(0x17c)+_0x1ef3e9+_0x812d89(0x170));let _0x5b96aa;try{_0x5b96aa=new URL(_0x1ed134['trim']());}catch{throw CliErrors['validation']('Invalid\x20'+_0x1ef3e9+_0x812d89(0x162)+_0x1ed134+'\x22\x20is\x20not\x20a\x20valid\x20URL.');}if(_0x5b96aa[_0x812d89(0x174)]!==_0x812d89(0x180)||_0x5b96aa[_0x812d89(0x14d)]||_0x5b96aa[_0x812d89(0x176)]||_0x5b96aa[_0x812d89(0x13f)]!=='/'&&_0x5b96aa[_0x812d89(0x13f)]!==''||_0x5b96aa[_0x812d89(0x16c)]||_0x5b96aa[_0x812d89(0x139)])throw CliErrors[_0x812d89(0x15b)](_0x812d89(0x17c)+_0x1ef3e9+':\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.','For\x20internal\x20deployments,\x20terminate\x20TLS\x20at\x20the\x20ingress,\x20reverse\x20proxy,\x20or\x20load\x20balancer;\x20an\x20internal\x20CA\x20is\x20supported.');return _0x5b96aa[_0x812d89(0x141)];}export function normalizeRoutingDomainValue(_0x52b481,_0x4f0f69){const _0x480055=a227_0x5e968d;if(typeof _0x4f0f69===_0x480055(0x16b))return normalizeDomainOrigin(_0x52b481,_0x4f0f69);if(!_0x4f0f69||typeof _0x4f0f69!==_0x480055(0x148)||Array[_0x480055(0x15e)](_0x4f0f69))throw CliErrors['validation']('Invalid\x20'+_0x52b481+_0x480055(0x14c));const _0x1e08f2=_0x4f0f69,_0x1a33c4=_0x1e08f2[ROUTING_CONSUMER]??_0x1e08f2[_0x480055(0x154)];if(_0x1a33c4===undefined)throw CliErrors[_0x480055(0x15b)](_0x480055(0x13d)+_0x52b481+'\x20does\x20not\x20provide\x20a\x20Domain\x20for\x20'+ROUTING_CONSUMER+_0x480055(0x164));return normalizeDomainOrigin(_0x52b481,_0x1a33c4);}export function normalizeCdnBaseUrl(_0x40f83d,_0x4f1229){const _0x49fb6e=a227_0x5e968d;if(typeof _0x4f1229!=='string'||!_0x4f1229[_0x49fb6e(0x17f)]())throw CliErrors[_0x49fb6e(0x15b)](_0x49fb6e(0x145)+_0x40f83d+_0x49fb6e(0x147));const _0x2635b5=_0x4f1229['trim']()[_0x49fb6e(0x155)](/\/$/,'');let _0x39d02d;try{_0x39d02d=new URL(_0x2635b5);}catch{throw CliErrors[_0x49fb6e(0x15b)](_0x49fb6e(0x145)+_0x40f83d+':\x20\x22'+_0x4f1229+_0x49fb6e(0x142));}if(_0x39d02d[_0x49fb6e(0x174)]!=='https:'||_0x39d02d['username']||_0x39d02d[_0x49fb6e(0x176)]||_0x39d02d['search']||_0x39d02d[_0x49fb6e(0x139)]||_0x39d02d[_0x49fb6e(0x14e)]['replace'](/\/$/,'')!==_0x2635b5||_0x40f83d===_0x49fb6e(0x146)&&_0x39d02d[_0x49fb6e(0x141)]!==_0x2635b5)throw CliErrors[_0x49fb6e(0x15b)](_0x49fb6e(0x145)+_0x40f83d+_0x49fb6e(0x153)+(_0x40f83d===_0x49fb6e(0x146)?'origin':_0x49fb6e(0x17a))+_0x49fb6e(0x13a));return _0x2635b5;}export function resolveEnterpriseRoutingConfig(_0x13ef87){const _0x4d33a5=a227_0x5e968d;return resolveEnterpriseRoutingManifest(_0x13ef87)?.[_0x4d33a5(0x171)];}function a227_0x46cb(){const _0x5c4fe3=['Invalid\x20domain\x20config:\x20provide\x20at\x20least\x20one\x20supported\x20Domain.','trim','https:','Domain\x20config\x20file\x20not\x20found:\x20','Enterprise\x20routing\x20manifest\x20is\x20missing\x20required\x20CDN\x20field(s):\x20','28278210uUOtOp','Unsupported\x20routing\x20manifest:\x20expected\x20protocol\x20\x22','Invalid\x20domain\x20config\x20JSON:\x20','length','keys','hash','\x20without\x20credentials,\x20query,\x20or\x20fragment.','app-domain','agentDomain','Enterprise\x20','certificate-domain','pathname','enterprise-v1','origin','\x22\x20is\x20not\x20a\x20valid\x20URL.','Enterprise\x20routing\x20manifests\x20cannot\x20be\x20combined\x20with\x20individual\x20Domain\x20flags.','kbDomain','Invalid\x20cdn.','lovrabet',':\x20expected\x20a\x20non-empty\x20HTTPS\x20URL.','object','Enterprise\x20routing\x20manifest\x20is\x20missing\x20required\x20Domain(s):\x20','includes','Update\x20the\x20manifest\x20so\x20both\x20CLIs\x20consume\x20the\x20same\x20routing\x20data.',':\x20expected\x20an\x20HTTPS\x20origin\x20or\x20consumer\x20Domain\x20object.','username','href','userDomain','mode','Unsupported\x20domain\x20config\x20field(s):\x20','129036tTaRGf',':\x20expected\x20an\x20HTTPS\x20','default','replace','runtime-domain','27tyhHaT','3752454OzYJdP','1516851xSoCtm','certificateDomain','validation','join','user-domain','isArray','runtimeDomain','apiDomain','Invalid\x20enterprise\x20routing\x20config:\x20expected\x20an\x20object.',':\x20\x22','appDomain','\x20and\x20has\x20no\x20default.','12817574sGyffK','cdn','skillDomain','1318SNNJZX','skill-domain','legacy','string','search','8223005obMOqC','local-domain','str',':\x20expected\x20a\x20non-empty\x20HTTPS\x20origin.','domains','8GeQOLJ','kb-domain','protocol','2183dzCZrs','password','api-domain','localDomain','filter','base\x20URL','\x22\x20and\x20kind\x20\x22','Invalid\x20','platformDomain'];a227_0x46cb=function(){return _0x5c4fe3;};return a227_0x46cb();}export function resolveEnterpriseRoutingManifest(_0x39e7c4){const _0x5118e3=a227_0x5e968d;if(_0x39e7c4===undefined)return undefined;if(!_0x39e7c4||typeof _0x39e7c4!==_0x5118e3(0x148)||Array[_0x5118e3(0x15e)](_0x39e7c4))throw CliErrors['validation'](_0x5118e3(0x161));return parseEnterpriseRoutingManifest(_0x39e7c4);}export function readDomainConfigInput(_0xd95063){const _0x492189=a227_0x5e968d,_0x32b6ac=isAbsolute(_0xd95063)?_0xd95063:resolve(process['cwd'](),_0xd95063);if(!existsSync(_0x32b6ac))throw CliErrors[_0x492189(0x15b)](_0x492189(0x132)+_0x32b6ac);let _0x5d5758;try{_0x5d5758=JSON['parse'](readFileSync(_0x32b6ac,'utf8'));}catch{throw CliErrors[_0x492189(0x15b)](_0x492189(0x136)+_0x32b6ac);}if(!_0x5d5758||typeof _0x5d5758!=='object'||Array[_0x492189(0x15e)](_0x5d5758))throw CliErrors['validation']('Invalid\x20domain\x20config:\x20expected\x20a\x20JSON\x20object.');const _0x7d4919=_0x5d5758;if('protocol'in _0x7d4919)return parseEnterpriseRoutingManifest(_0x7d4919);const _0x1d0732=Object['keys'](_0x7d4919)[_0x492189(0x179)](_0x24ffd4=>!DOMAIN_CONFIG_FIELDS[_0x492189(0x14a)](_0x24ffd4));if(_0x1d0732[_0x492189(0x137)]>0x0)throw CliErrors['validation'](_0x492189(0x151)+_0x1d0732['join'](',\x20'),'Allowed\x20fields:\x20'+DOMAIN_CONFIG_FIELDS[_0x492189(0x15c)](',\x20'));const _0x4d652e={};for(const _0x170950 of DOMAIN_CONFIG_FIELDS){_0x7d4919[_0x170950]!==undefined&&(_0x4d652e[_0x170950]=normalizeDomainOrigin(_0x170950,_0x7d4919[_0x170950]));}if(Object[_0x492189(0x138)](_0x4d652e)[_0x492189(0x137)]===0x0)throw CliErrors['validation'](_0x492189(0x17e));return{'mode':'legacy','domains':_0x4d652e};}export function readDomainConfig(_0x265aad){return readDomainConfigInput(_0x265aad)['domains'];}export function resolveDomainConfigInput(_0x18102a){const _0x19cc5b=a227_0x5e968d,_0x4f12ba=(_0x18102a[_0x19cc5b(0x16f)]('domain-config')||'')[_0x19cc5b(0x17f)](),_0x106087=_0x4f12ba?readDomainConfigInput(_0x4f12ba):{'mode':_0x19cc5b(0x16a),'domains':{}},_0x40cdbd=DOMAIN_CONFIG_FIELDS[_0x19cc5b(0x179)](_0x651d37=>Boolean((_0x18102a[_0x19cc5b(0x16f)](DOMAIN_FLAGS[_0x651d37])||'')[_0x19cc5b(0x17f)]()));if(_0x106087[_0x19cc5b(0x150)]==='enterprise-v1'&&_0x40cdbd[_0x19cc5b(0x137)]>0x0)throw CliErrors['validation'](_0x19cc5b(0x143),_0x19cc5b(0x14b));for(const _0x1f2bea of DOMAIN_CONFIG_FIELDS){const _0xe4724e=(_0x18102a['str'](DOMAIN_FLAGS[_0x1f2bea])||'')[_0x19cc5b(0x17f)]();if(_0xe4724e)_0x106087[_0x19cc5b(0x171)][_0x1f2bea]=normalizeDomainOrigin(_0x1f2bea,_0xe4724e);}return _0x106087;}export function resolveDomainFlags(_0x255b86){const _0x50d0e5=a227_0x5e968d;return resolveDomainConfigInput(_0x255b86)[_0x50d0e5(0x171)];}export function parseEnterpriseRoutingManifest(_0x5dddfe){const _0x48a5b3=a227_0x5e968d;if(_0x5dddfe['protocol']!==ENTERPRISE_ROUTING_PROTOCOL||_0x5dddfe['kind']!==ENTERPRISE_ROUTING_KIND)throw CliErrors[_0x48a5b3(0x15b)](_0x48a5b3(0x135)+ENTERPRISE_ROUTING_PROTOCOL+_0x48a5b3(0x17b)+ENTERPRISE_ROUTING_KIND+'\x22.');if(!_0x5dddfe[_0x48a5b3(0x171)]||typeof _0x5dddfe[_0x48a5b3(0x171)]!==_0x48a5b3(0x148)||Array[_0x48a5b3(0x15e)](_0x5dddfe[_0x48a5b3(0x171)]))throw CliErrors[_0x48a5b3(0x15b)]('Invalid\x20enterprise\x20routing\x20manifest:\x20domains\x20must\x20be\x20an\x20object.');if(!_0x5dddfe[_0x48a5b3(0x166)]||typeof _0x5dddfe[_0x48a5b3(0x166)]!==_0x48a5b3(0x148)||Array[_0x48a5b3(0x15e)](_0x5dddfe[_0x48a5b3(0x166)]))throw CliErrors[_0x48a5b3(0x15b)]('Invalid\x20enterprise\x20routing\x20manifest:\x20cdn\x20must\x20be\x20an\x20object.');const _0x4b682c=_0x5dddfe[_0x48a5b3(0x171)],_0x50d362=REQUIRED_ENTERPRISE_ROUTING_DOMAIN_FIELDS[_0x48a5b3(0x179)](_0x557b1f=>_0x4b682c[_0x557b1f]===undefined);if(_0x50d362['length']>0x0)throw CliErrors[_0x48a5b3(0x15b)](_0x48a5b3(0x149)+_0x50d362[_0x48a5b3(0x15c)](',\x20'));if(_0x4b682c[_0x48a5b3(0x178)]===undefined!==(_0x4b682c[_0x48a5b3(0x15a)]===undefined))throw CliErrors[_0x48a5b3(0x15b)]('Enterprise\x20routing\x20manifest\x20requires\x20localDomain\x20and\x20certificateDomain\x20together.');const _0x2952af=_0x5dddfe[_0x48a5b3(0x166)],_0x25fa34=Object[_0x48a5b3(0x138)](_0x2952af)[_0x48a5b3(0x179)](_0x66861=>!ENTERPRISE_ROUTING_CDN_FIELDS[_0x48a5b3(0x14a)](_0x66861));if(_0x25fa34[_0x48a5b3(0x137)]>0x0)throw CliErrors[_0x48a5b3(0x15b)]('Unsupported\x20enterprise\x20CDN\x20field(s):\x20'+_0x25fa34[_0x48a5b3(0x15c)](',\x20'),'Allowed\x20fields:\x20'+ENTERPRISE_ROUTING_CDN_FIELDS[_0x48a5b3(0x15c)](',\x20'));const _0xb61257=REQUIRED_ENTERPRISE_ROUTING_CDN_FIELDS['filter'](_0x341722=>_0x2952af[_0x341722]===undefined);if(_0xb61257[_0x48a5b3(0x137)]>0x0)throw CliErrors[_0x48a5b3(0x15b)](_0x48a5b3(0x133)+_0xb61257[_0x48a5b3(0x15c)](',\x20'));const _0x2441ac={};for(const _0x479310 of ENTERPRISE_ROUTING_CDN_FIELDS){_0x2441ac[_0x479310]=normalizeCdnBaseUrl(_0x479310,_0x2952af[_0x479310]);}const _0x28a9c0={},_0x1718c1={};for(const _0x49ed51 of ENTERPRISE_ROUTING_DOMAIN_FIELDS){const _0x779f36=_0x4b682c[_0x49ed51];if(_0x779f36===undefined)continue;const _0x3c962c=normalizeRoutingDomainValue(_0x49ed51,_0x779f36);_0x28a9c0[_0x49ed51]=_0x3c962c;const _0x2385aa=ENTERPRISE_TO_LOCAL_FIELD[_0x49ed51];_0x2385aa&&(_0x1718c1[_0x2385aa]=_0x3c962c);}return{'mode':_0x48a5b3(0x140),'domains':_0x1718c1,'manifestDomains':_0x28a9c0,'cdn':_0x2441ac};}
1
+ const a227_0x23a198=a227_0x43f2;function a227_0x4bfc(){const _0x380e61=['platformDomain','121995nWIQbw','Invalid\x20domain\x20config:\x20expected\x20a\x20JSON\x20object.','Unsupported\x20enterprise\x20CDN\x20field(s):\x20','userDomain','apiDomain','origin','732606tTeRbn','certificate-domain','certificateDomain','kb-domain','enterprise-v1','localDomain','string','lovrabet','pathname','skill-domain',':\x20expected\x20a\x20non-empty\x20HTTPS\x20URL.','cdn','filter','length','href','user-domain','legacy','skillDomain','kind','Invalid\x20cdn.','\x22\x20and\x20kind\x20\x22','https:','local-domain','1859050vLUcgj','utf8','25557whuBGu','1566474MQguGO','object','Invalid\x20','join','runtimeDomain','agentDomain','Allowed\x20fields:\x20','\x20and\x20has\x20no\x20default.',':\x20\x22','hash','\x22\x20is\x20not\x20a\x20valid\x20URL.','api-domain','Unsupported\x20domain\x20config\x20field(s):\x20',':\x20expected\x20an\x20HTTPS\x20','35lbYiHz','str','domains','kbDomain','includes','default',':\x20expected\x20an\x20HTTPS\x20origin\x20without\x20credentials,\x20path,\x20query,\x20or\x20fragment.','\x20without\x20credentials,\x20query,\x20or\x20fragment.','Enterprise\x20routing\x20manifest\x20is\x20missing\x20required\x20CDN\x20field(s):\x20','search','skillHubDomain','app-domain','100MDvmuC','\x20does\x20not\x20provide\x20a\x20Domain\x20for\x20','isArray','Invalid\x20enterprise\x20routing\x20manifest:\x20domains\x20must\x20be\x20an\x20object.','Enterprise\x20routing\x20manifests\x20cannot\x20be\x20combined\x20with\x20individual\x20Domain\x20flags.','trim','cwd','appDomain','parse','protocol','Domain\x20config\x20file\x20not\x20found:\x20','Update\x20the\x20manifest\x20so\x20both\x20CLIs\x20consume\x20the\x20same\x20routing\x20data.','Invalid\x20enterprise\x20routing\x20manifest:\x20cdn\x20must\x20be\x20an\x20object.','For\x20internal\x20deployments,\x20terminate\x20TLS\x20at\x20the\x20ingress,\x20reverse\x20proxy,\x20or\x20load\x20balancer;\x20an\x20internal\x20CA\x20is\x20supported.','1982936TKixAY','username','validation','replace','25921026aDEWeU'];a227_0x4bfc=function(){return _0x380e61;};return a227_0x4bfc();}(function(_0x5d53d5,_0x2c5fa5){const _0x539e39=a227_0x43f2,_0x2360bd=_0x5d53d5();while(!![]){try{const _0x108e54=parseInt(_0x539e39(0xb9))/0x1+-parseInt(_0x539e39(0xb7))/0x2+-parseInt(_0x539e39(0xba))/0x3+parseInt(_0x539e39(0xd4))/0x4*(-parseInt(_0x539e39(0xe8))/0x5)+parseInt(_0x539e39(0xee))/0x6*(-parseInt(_0x539e39(0xc8))/0x7)+parseInt(_0x539e39(0xe2))/0x8+parseInt(_0x539e39(0xe6))/0x9;if(_0x108e54===_0x2c5fa5)break;else _0x2360bd['push'](_0x2360bd['shift']());}catch(_0xfd5d27){_0x2360bd['push'](_0x2360bd['shift']());}}}(a227_0x4bfc,0x7585f));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=[a227_0x23a198(0xeb),'apiDomain',a227_0x23a198(0xbe),'skillDomain',a227_0x23a198(0xcb),a227_0x23a198(0xdb),a227_0x23a198(0xf3),a227_0x23a198(0xf0)];const DOMAIN_FLAGS={'userDomain':a227_0x23a198(0xaf),'apiDomain':a227_0x23a198(0xc5),'runtimeDomain':'runtime-domain','skillDomain':a227_0x23a198(0xf7),'kbDomain':a227_0x23a198(0xf1),'appDomain':a227_0x23a198(0xd3),'localDomain':a227_0x23a198(0xb6),'certificateDomain':a227_0x23a198(0xef)};export const LEGACY_DOMAIN_CONFIG_FIELDS=[a227_0x23a198(0xbf),a227_0x23a198(0xe7),a227_0x23a198(0xd2)];const ENTERPRISE_TO_LOCAL_FIELD={'userDomain':'userDomain','apiDomain':a227_0x23a198(0xec),'runtimeDomain':'runtimeDomain','skillDomain':a227_0x23a198(0xb1),'kbDomain':'kbDomain','appDomain':a227_0x23a198(0xdb),'localDomain':'localDomain','certificateDomain':a227_0x23a198(0xf0)},ROUTING_CONSUMER='rabetbase-cli';export function normalizeDomainOrigin(_0x1738e9,_0x1b596f){const _0x32b60d=a227_0x23a198;if(typeof _0x1b596f!==_0x32b60d(0xf4)||!_0x1b596f['trim']())throw CliErrors[_0x32b60d(0xe4)](_0x32b60d(0xbc)+_0x1738e9+':\x20expected\x20a\x20non-empty\x20HTTPS\x20origin.');let _0x507cce;try{_0x507cce=new URL(_0x1b596f[_0x32b60d(0xd9)]());}catch{throw CliErrors[_0x32b60d(0xe4)](_0x32b60d(0xbc)+_0x1738e9+_0x32b60d(0xc2)+_0x1b596f+'\x22\x20is\x20not\x20a\x20valid\x20URL.');}if(_0x507cce['protocol']!=='https:'||_0x507cce[_0x32b60d(0xe3)]||_0x507cce['password']||_0x507cce[_0x32b60d(0xf6)]!=='/'&&_0x507cce[_0x32b60d(0xf6)]!==''||_0x507cce[_0x32b60d(0xd1)]||_0x507cce[_0x32b60d(0xc3)])throw CliErrors[_0x32b60d(0xe4)](_0x32b60d(0xbc)+_0x1738e9+_0x32b60d(0xce),_0x32b60d(0xe1));return _0x507cce[_0x32b60d(0xed)];}export function normalizeRoutingDomainValue(_0x438dda,_0x364cf5){const _0x4256fa=a227_0x23a198;if(typeof _0x364cf5===_0x4256fa(0xf4))return normalizeDomainOrigin(_0x438dda,_0x364cf5);if(!_0x364cf5||typeof _0x364cf5!==_0x4256fa(0xbb)||Array[_0x4256fa(0xd6)](_0x364cf5))throw CliErrors['validation']('Invalid\x20'+_0x438dda+':\x20expected\x20an\x20HTTPS\x20origin\x20or\x20consumer\x20Domain\x20object.');const _0x57dd16=_0x364cf5,_0x26142b=_0x57dd16[ROUTING_CONSUMER]??_0x57dd16[_0x4256fa(0xcd)];if(_0x26142b===undefined)throw CliErrors[_0x4256fa(0xe4)]('Enterprise\x20'+_0x438dda+_0x4256fa(0xd5)+ROUTING_CONSUMER+_0x4256fa(0xc1));return normalizeDomainOrigin(_0x438dda,_0x26142b);}export function normalizeCdnBaseUrl(_0x213f3e,_0xdb04e6){const _0x53936b=a227_0x23a198;if(typeof _0xdb04e6!=='string'||!_0xdb04e6[_0x53936b(0xd9)]())throw CliErrors[_0x53936b(0xe4)](_0x53936b(0xb3)+_0x213f3e+_0x53936b(0xf8));const _0x3a61be=_0xdb04e6[_0x53936b(0xd9)]()['replace'](/\/$/,'');let _0x513898;try{_0x513898=new URL(_0x3a61be);}catch{throw CliErrors[_0x53936b(0xe4)](_0x53936b(0xb3)+_0x213f3e+':\x20\x22'+_0xdb04e6+_0x53936b(0xc4));}if(_0x513898[_0x53936b(0xdd)]!==_0x53936b(0xb5)||_0x513898[_0x53936b(0xe3)]||_0x513898['password']||_0x513898['search']||_0x513898[_0x53936b(0xc3)]||_0x513898[_0x53936b(0xfc)][_0x53936b(0xe5)](/\/$/,'')!==_0x3a61be||_0x213f3e===_0x53936b(0xf5)&&_0x513898[_0x53936b(0xed)]!==_0x3a61be)throw CliErrors[_0x53936b(0xe4)]('Invalid\x20cdn.'+_0x213f3e+_0x53936b(0xc7)+(_0x213f3e===_0x53936b(0xf5)?'origin':'base\x20URL')+_0x53936b(0xcf));return _0x3a61be;}export function resolveEnterpriseRoutingConfig(_0x202ba9){const _0xdc0af4=a227_0x23a198;return resolveEnterpriseRoutingManifest(_0x202ba9)?.[_0xdc0af4(0xca)];}export function resolveEnterpriseRoutingManifest(_0x5dce97){const _0x257758=a227_0x23a198;if(_0x5dce97===undefined)return undefined;if(!_0x5dce97||typeof _0x5dce97!==_0x257758(0xbb)||Array[_0x257758(0xd6)](_0x5dce97))throw CliErrors[_0x257758(0xe4)]('Invalid\x20enterprise\x20routing\x20config:\x20expected\x20an\x20object.');return parseEnterpriseRoutingManifest(_0x5dce97);}function a227_0x43f2(_0x166356,_0x12823a){_0x166356=_0x166356-0xaf;const _0x4bfc68=a227_0x4bfc();let _0x43f2cd=_0x4bfc68[_0x166356];return _0x43f2cd;}export function readDomainConfigInput(_0x5aa124){const _0x4dbf48=a227_0x23a198,_0x23ec38=isAbsolute(_0x5aa124)?_0x5aa124:resolve(process[_0x4dbf48(0xda)](),_0x5aa124);if(!existsSync(_0x23ec38))throw CliErrors[_0x4dbf48(0xe4)](_0x4dbf48(0xde)+_0x23ec38);let _0x4eb89c;try{_0x4eb89c=JSON[_0x4dbf48(0xdc)](readFileSync(_0x23ec38,_0x4dbf48(0xb8)));}catch{throw CliErrors[_0x4dbf48(0xe4)]('Invalid\x20domain\x20config\x20JSON:\x20'+_0x23ec38);}if(!_0x4eb89c||typeof _0x4eb89c!==_0x4dbf48(0xbb)||Array['isArray'](_0x4eb89c))throw CliErrors[_0x4dbf48(0xe4)](_0x4dbf48(0xe9));const _0x496192=_0x4eb89c;if(_0x4dbf48(0xdd)in _0x496192)return parseEnterpriseRoutingManifest(_0x496192);const _0x1faa7a=Object['keys'](_0x496192)[_0x4dbf48(0xfa)](_0x20d9aa=>!DOMAIN_CONFIG_FIELDS[_0x4dbf48(0xcc)](_0x20d9aa));if(_0x1faa7a[_0x4dbf48(0xfb)]>0x0)throw CliErrors['validation'](_0x4dbf48(0xc6)+_0x1faa7a[_0x4dbf48(0xbd)](',\x20'),_0x4dbf48(0xc0)+DOMAIN_CONFIG_FIELDS[_0x4dbf48(0xbd)](',\x20'));const _0x16b64d={};for(const _0x1ca3b1 of DOMAIN_CONFIG_FIELDS){_0x496192[_0x1ca3b1]!==undefined&&(_0x16b64d[_0x1ca3b1]=normalizeDomainOrigin(_0x1ca3b1,_0x496192[_0x1ca3b1]));}if(Object['keys'](_0x16b64d)['length']===0x0)throw CliErrors['validation']('Invalid\x20domain\x20config:\x20provide\x20at\x20least\x20one\x20supported\x20Domain.');return{'mode':_0x4dbf48(0xb0),'domains':_0x16b64d};}export function readDomainConfig(_0x17c735){const _0x37aeb3=a227_0x23a198;return readDomainConfigInput(_0x17c735)[_0x37aeb3(0xca)];}export function resolveDomainConfigInput(_0x36e685){const _0x5b2a9d=a227_0x23a198,_0x3b56d1=(_0x36e685[_0x5b2a9d(0xc9)]('domain-config')||'')['trim'](),_0x2ad8fd=_0x3b56d1?readDomainConfigInput(_0x3b56d1):{'mode':_0x5b2a9d(0xb0),'domains':{}},_0x2dcb9b=DOMAIN_CONFIG_FIELDS[_0x5b2a9d(0xfa)](_0x4721c8=>Boolean((_0x36e685[_0x5b2a9d(0xc9)](DOMAIN_FLAGS[_0x4721c8])||'')[_0x5b2a9d(0xd9)]()));if(_0x2ad8fd['mode']==='enterprise-v1'&&_0x2dcb9b['length']>0x0)throw CliErrors[_0x5b2a9d(0xe4)](_0x5b2a9d(0xd8),_0x5b2a9d(0xdf));for(const _0x151efc of DOMAIN_CONFIG_FIELDS){const _0xab4b92=(_0x36e685[_0x5b2a9d(0xc9)](DOMAIN_FLAGS[_0x151efc])||'')[_0x5b2a9d(0xd9)]();if(_0xab4b92)_0x2ad8fd[_0x5b2a9d(0xca)][_0x151efc]=normalizeDomainOrigin(_0x151efc,_0xab4b92);}return _0x2ad8fd;}export function resolveDomainFlags(_0xe67466){return resolveDomainConfigInput(_0xe67466)['domains'];}export function parseEnterpriseRoutingManifest(_0x8fbe15){const _0x48475f=a227_0x23a198;if(_0x8fbe15[_0x48475f(0xdd)]!==ENTERPRISE_ROUTING_PROTOCOL||_0x8fbe15[_0x48475f(0xb2)]!==ENTERPRISE_ROUTING_KIND)throw CliErrors['validation']('Unsupported\x20routing\x20manifest:\x20expected\x20protocol\x20\x22'+ENTERPRISE_ROUTING_PROTOCOL+_0x48475f(0xb4)+ENTERPRISE_ROUTING_KIND+'\x22.');if(!_0x8fbe15['domains']||typeof _0x8fbe15[_0x48475f(0xca)]!==_0x48475f(0xbb)||Array[_0x48475f(0xd6)](_0x8fbe15[_0x48475f(0xca)]))throw CliErrors[_0x48475f(0xe4)](_0x48475f(0xd7));if(!_0x8fbe15[_0x48475f(0xf9)]||typeof _0x8fbe15[_0x48475f(0xf9)]!==_0x48475f(0xbb)||Array['isArray'](_0x8fbe15[_0x48475f(0xf9)]))throw CliErrors[_0x48475f(0xe4)](_0x48475f(0xe0));const _0x454159=_0x8fbe15['domains'],_0x412797=REQUIRED_ENTERPRISE_ROUTING_DOMAIN_FIELDS[_0x48475f(0xfa)](_0x59805a=>_0x454159[_0x59805a]===undefined);if(_0x412797[_0x48475f(0xfb)]>0x0)throw CliErrors['validation']('Enterprise\x20routing\x20manifest\x20is\x20missing\x20required\x20Domain(s):\x20'+_0x412797['join'](',\x20'));if(_0x454159['localDomain']===undefined!==(_0x454159['certificateDomain']===undefined))throw CliErrors[_0x48475f(0xe4)]('Enterprise\x20routing\x20manifest\x20requires\x20localDomain\x20and\x20certificateDomain\x20together.');const _0x351a6d=_0x8fbe15[_0x48475f(0xf9)],_0x1e66b4=Object['keys'](_0x351a6d)[_0x48475f(0xfa)](_0x4df9c3=>!ENTERPRISE_ROUTING_CDN_FIELDS['includes'](_0x4df9c3));if(_0x1e66b4[_0x48475f(0xfb)]>0x0)throw CliErrors[_0x48475f(0xe4)](_0x48475f(0xea)+_0x1e66b4[_0x48475f(0xbd)](',\x20'),_0x48475f(0xc0)+ENTERPRISE_ROUTING_CDN_FIELDS[_0x48475f(0xbd)](',\x20'));const _0x38c997=REQUIRED_ENTERPRISE_ROUTING_CDN_FIELDS[_0x48475f(0xfa)](_0x4b1164=>_0x351a6d[_0x4b1164]===undefined);if(_0x38c997[_0x48475f(0xfb)]>0x0)throw CliErrors[_0x48475f(0xe4)](_0x48475f(0xd0)+_0x38c997['join'](',\x20'));const _0x56b5de={};for(const _0x4222d2 of ENTERPRISE_ROUTING_CDN_FIELDS){_0x56b5de[_0x4222d2]=normalizeCdnBaseUrl(_0x4222d2,_0x351a6d[_0x4222d2]);}const _0x2d82fe={},_0x374a14={};for(const _0x57488f of ENTERPRISE_ROUTING_DOMAIN_FIELDS){const _0x4d36d2=_0x454159[_0x57488f];if(_0x4d36d2===undefined)continue;const _0x2d08ee=normalizeRoutingDomainValue(_0x57488f,_0x4d36d2);_0x2d82fe[_0x57488f]=_0x2d08ee;const _0x4386c6=ENTERPRISE_TO_LOCAL_FIELD[_0x57488f];_0x4386c6&&(_0x374a14[_0x4386c6]=_0x2d08ee);}return{'mode':_0x48475f(0xf2),'domains':_0x374a14,'manifestDomains':_0x2d82fe,'cdn':_0x56b5de};}
@@ -1 +1 @@
1
- const a228_0x4acc66=a228_0x13c0;(function(_0x1e4a2f,_0x1946c3){const _0x2f610b=a228_0x13c0,_0x27bc41=_0x1e4a2f();while(!![]){try{const _0x586dfe=parseInt(_0x2f610b(0x1b8))/0x1*(parseInt(_0x2f610b(0x1af))/0x2)+parseInt(_0x2f610b(0x1ad))/0x3+-parseInt(_0x2f610b(0x1b9))/0x4*(parseInt(_0x2f610b(0x1ba))/0x5)+-parseInt(_0x2f610b(0x1b1))/0x6*(-parseInt(_0x2f610b(0x1b6))/0x7)+-parseInt(_0x2f610b(0x1b2))/0x8*(-parseInt(_0x2f610b(0x1ae))/0x9)+parseInt(_0x2f610b(0x1b3))/0xa+-parseInt(_0x2f610b(0x1bd))/0xb;if(_0x586dfe===_0x1946c3)break;else _0x27bc41['push'](_0x27bc41['shift']());}catch(_0x2be6f9){_0x27bc41['push'](_0x27bc41['shift']());}}}(a228_0x23a6,0xf22e7));function a228_0x13c0(_0x411813,_0x1bef3e){_0x411813=_0x411813-0x1aa;const _0x23a626=a228_0x23a6();let _0x13c03d=_0x23a626[_0x411813];return _0x13c03d;}import{readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{join}from'node:path';import{getActiveRegion,getActiveCdn,getApiDomain,getAppDomain,getCertificateDomain,getKbDomain,getLocalDomain,getRuntimeDomain,getSkillDomain,getUserDomain,isIndependentDeployment}from'../constant/domain.js';import{getOfficialRoutingProfile}from'../constant/routing-profile.js';export const PROJECT_DOMAIN_ROUTING_FILE_NAME=a228_0x4acc66(0x1b7);export const PROJECT_DOMAIN_ROUTING_PROTOCOL=a228_0x4acc66(0x1b0);function a228_0x23a6(){const _0x574075=['394KsVfyG','1046828uhmyuf','35bovXVg','.tmp','origin','11479633MfXZtG','official','local','utf8','independent','stringify','Independent\x20deployment\x20routing\x20requires\x20localDomain\x20and\x20certificateDomain\x20together.','pid','4747848aPbgPg','9NdsBsJ','2098fsDiMj','lovrabet-project-domain-routing/v1','535614gjTIEC','11759576HOtWfU','2231200WegHCl','http://localhost','/cert/lovrabet-dev.json','14ObAAco','rabetbase.domain-routing.json'];a228_0x23a6=function(){return _0x574075;};return a228_0x23a6();}export function getProjectDomainRoutingManifest(){const _0x5c5592=a228_0x4acc66,_0x315a9a=getActiveRegion(),_0x19cac3=isIndependentDeployment(),_0x3caade=getOfficialRoutingProfile(_0x315a9a),_0x2ebc51=getLocalDomain(),_0x1af00d=getCertificateDomain(),_0x5f268b=getActiveCdn();if(!!_0x2ebc51!==!!_0x1af00d)throw new Error(_0x5c5592(0x1ab));return{'protocol':PROJECT_DOMAIN_ROUTING_PROTOCOL,'mode':_0x19cac3?_0x5c5592(0x1c1):_0x5c5592(0x1be),'region':_0x19cac3?null:_0x315a9a,'domains':{'api':getApiDomain(),'runtime':getRuntimeDomain(),'user':getUserDomain(),'app':getAppDomain(),'skill':getSkillDomain(),'kb':getKbDomain()},'cdn':_0x5f268b,'local':_0x2ebc51&&_0x1af00d?{'origin':_0x2ebc51,'certificateUrl':_0x1af00d+_0x5c5592(0x1b5)}:_0x19cac3?{'origin':_0x5c5592(0x1b4)}:{'origin':_0x3caade[_0x5c5592(0x1bf)][_0x5c5592(0x1bc)],'certificateUrl':_0x5f268b['lovrabet']+'/cert/lovrabet-dev.json'}};}export function writeProjectDomainRoutingManifest(_0x22331d){const _0xf7e108=a228_0x4acc66,_0x1365bc=getProjectDomainRoutingManifest(),_0x3fd12c=join(_0x22331d,PROJECT_DOMAIN_ROUTING_FILE_NAME),_0x16e347=JSON[_0xf7e108(0x1aa)](_0x1365bc,null,0x2)+'\x0a';try{if(readFileSync(_0x3fd12c,_0xf7e108(0x1c0))===_0x16e347)return{'path':_0x3fd12c,'manifest':_0x1365bc,'changed':![]};}catch{}const _0x19726c=_0x3fd12c+'.'+process[_0xf7e108(0x1ac)]+'.'+Date['now']()+_0xf7e108(0x1bb);try{writeFileSync(_0x19726c,_0x16e347,{'encoding':'utf8','mode':0x1a4}),renameSync(_0x19726c,_0x3fd12c);}catch(_0x2eb06b){try{unlinkSync(_0x19726c);}catch{}throw _0x2eb06b;}return{'path':_0x3fd12c,'manifest':_0x1365bc,'changed':!![]};}
1
+ function a228_0x4b25(){const _0x2370a8=['1818894ysUclY','1778073GMSTNu','.tmp','utf8','996dhUxvW','2117591mCthyO','1882815NYFuyA','3470AIgEsM','110mtupom','rabetbase.domain-routing.json','8Ooexht','6923997MDxKqu','/cert/lovrabet-dev.json','official','origin','292RLYasl','Independent\x20deployment\x20routing\x20requires\x20localDomain\x20and\x20certificateDomain\x20together.','lovrabet-project-domain-routing/v1','now','independent','9630HCzUZE','http://localhost','pid','lovrabet'];a228_0x4b25=function(){return _0x2370a8;};return a228_0x4b25();}const a228_0xdf784d=a228_0x4c58;(function(_0x514f72,_0x33abae){const _0x199bbb=a228_0x4c58,_0x3b7f44=_0x514f72();while(!![]){try{const _0x4f545c=-parseInt(_0x199bbb(0x1c0))/0x1*(-parseInt(_0x199bbb(0x1b0))/0x2)+-parseInt(_0x199bbb(0x1bf))/0x3+-parseInt(_0x199bbb(0x1bd))/0x4*(parseInt(_0x199bbb(0x1b5))/0x5)+parseInt(_0x199bbb(0x1b9))/0x6+-parseInt(_0x199bbb(0x1be))/0x7*(parseInt(_0x199bbb(0x1c3))/0x8)+-parseInt(_0x199bbb(0x1ac))/0x9+parseInt(_0x199bbb(0x1c1))/0xa*(parseInt(_0x199bbb(0x1ba))/0xb);if(_0x4f545c===_0x33abae)break;else _0x3b7f44['push'](_0x3b7f44['shift']());}catch(_0x1d1c66){_0x3b7f44['push'](_0x3b7f44['shift']());}}}(a228_0x4b25,0x63cf1));import{readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{join}from'node:path';import{getActiveRegion,getActiveCdn,getApiDomain,getAppDomain,getCertificateDomain,getKbDomain,getLocalDomain,getRuntimeDomain,getSkillDomain,getUserDomain,isIndependentDeployment}from'../constant/domain.js';import{getOfficialRoutingProfile}from'../constant/routing-profile.js';export const PROJECT_DOMAIN_ROUTING_FILE_NAME=a228_0xdf784d(0x1c2);export const PROJECT_DOMAIN_ROUTING_PROTOCOL=a228_0xdf784d(0x1b2);function a228_0x4c58(_0xea6968,_0xe5db3e){_0xea6968=_0xea6968-0x1ac;const _0x4b25be=a228_0x4b25();let _0x4c58b8=_0x4b25be[_0xea6968];return _0x4c58b8;}export function getProjectDomainRoutingManifest(){const _0x117440=a228_0xdf784d,_0x182126=getActiveRegion(),_0x4052ae=isIndependentDeployment(),_0x3caa5c=getOfficialRoutingProfile(_0x182126),_0x44d3bb=getLocalDomain(),_0x600d32=getCertificateDomain(),_0x483b9f=getActiveCdn();if(!!_0x44d3bb!==!!_0x600d32)throw new Error(_0x117440(0x1b1));return{'protocol':PROJECT_DOMAIN_ROUTING_PROTOCOL,'mode':_0x4052ae?_0x117440(0x1b4):_0x117440(0x1ae),'region':_0x4052ae?null:_0x182126,'domains':{'api':getApiDomain(),'runtime':getRuntimeDomain(),'user':getUserDomain(),'app':getAppDomain(),'skill':getSkillDomain(),'kb':getKbDomain()},'cdn':_0x483b9f,'local':_0x44d3bb&&_0x600d32?{'origin':_0x44d3bb,'certificateUrl':_0x600d32+_0x117440(0x1ad)}:_0x4052ae?{'origin':_0x117440(0x1b6)}:{'origin':_0x3caa5c['local'][_0x117440(0x1af)],'certificateUrl':_0x483b9f[_0x117440(0x1b8)]+_0x117440(0x1ad)}};}export function writeProjectDomainRoutingManifest(_0x287c63){const _0x1dc179=a228_0xdf784d,_0x13bbe8=getProjectDomainRoutingManifest(),_0x4e497d=join(_0x287c63,PROJECT_DOMAIN_ROUTING_FILE_NAME),_0x399c44=JSON['stringify'](_0x13bbe8,null,0x2)+'\x0a';try{if(readFileSync(_0x4e497d,_0x1dc179(0x1bc))===_0x399c44)return{'path':_0x4e497d,'manifest':_0x13bbe8,'changed':![]};}catch{}const _0x27fc5e=_0x4e497d+'.'+process[_0x1dc179(0x1b7)]+'.'+Date[_0x1dc179(0x1b3)]()+_0x1dc179(0x1bb);try{writeFileSync(_0x27fc5e,_0x399c44,{'encoding':_0x1dc179(0x1bc),'mode':0x1a4}),renameSync(_0x27fc5e,_0x4e497d);}catch(_0x13fd9c){try{unlinkSync(_0x27fc5e);}catch{}throw _0x13fd9c;}return{'path':_0x4e497d,'manifest':_0x13bbe8,'changed':!![]};}
@@ -0,0 +1,23 @@
1
+ import { type LovrabetRegion } from "../constant/region.js";
2
+ export type RegionConfigSource = "app" | "project" | "global" | "config" | "default";
3
+ export declare function selectConfiguredRegion(options: {
4
+ appRegion?: unknown;
5
+ projectRegion?: unknown;
6
+ globalRegion?: unknown;
7
+ mergedRegion?: unknown;
8
+ }): {
9
+ value: unknown;
10
+ source: RegionConfigSource;
11
+ };
12
+ /** Resolve one stored region value without silently accepting unknown spellings. */
13
+ export declare function resolveConfiguredRegion(value: unknown, location?: string): LovrabetRegion;
14
+ export declare function resolveEffectiveRegion(options: {
15
+ appRegion?: unknown;
16
+ projectRegion?: unknown;
17
+ globalRegion?: unknown;
18
+ mergedRegion?: unknown;
19
+ appName?: string;
20
+ }): {
21
+ region: LovrabetRegion;
22
+ source: RegionConfigSource;
23
+ };
@@ -0,0 +1 @@
1
+ function a229_0x484c(_0x1f666e,_0xb88bb6){_0x1f666e=_0x1f666e-0x1aa;const _0x23eb29=a229_0x23eb();let _0x484cf5=_0x23eb29[_0x1f666e];return _0x484cf5;}const a229_0x3d6050=a229_0x484c;(function(_0x3e82f6,_0x29d493){const _0x39e59a=a229_0x484c,_0x568290=_0x3e82f6();while(!![]){try{const _0x37008b=parseInt(_0x39e59a(0x1b8))/0x1+-parseInt(_0x39e59a(0x1b2))/0x2+-parseInt(_0x39e59a(0x1c4))/0x3*(-parseInt(_0x39e59a(0x1af))/0x4)+parseInt(_0x39e59a(0x1bb))/0x5+parseInt(_0x39e59a(0x1b0))/0x6*(parseInt(_0x39e59a(0x1b5))/0x7)+parseInt(_0x39e59a(0x1bd))/0x8+-parseInt(_0x39e59a(0x1ac))/0x9;if(_0x37008b===_0x29d493)break;else _0x568290['push'](_0x568290['shift']());}catch(_0x1c226f){_0x568290['push'](_0x568290['shift']());}}}(a229_0x23eb,0x7812f));import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_LOVRABET_REGION,isInvalidLovrabetRegion,normalizeLovrabetRegion}from'../constant/region.js';import{CliErrors}from'../errors.js';export function selectConfiguredRegion(_0x3c6c7a){const _0x394ac3=a229_0x484c;if(_0x3c6c7a[_0x394ac3(0x1b1)]!==undefined&&_0x3c6c7a[_0x394ac3(0x1b1)]!==null&&_0x3c6c7a[_0x394ac3(0x1b1)]!=='')return{'value':_0x3c6c7a[_0x394ac3(0x1b1)],'source':'app'};if(_0x3c6c7a['projectRegion']!==undefined&&_0x3c6c7a['projectRegion']!==null&&_0x3c6c7a[_0x394ac3(0x1ba)]!=='')return{'value':_0x3c6c7a[_0x394ac3(0x1ba)],'source':_0x394ac3(0x1b3)};if(_0x3c6c7a['globalRegion']!==undefined&&_0x3c6c7a['globalRegion']!==null&&_0x3c6c7a['globalRegion']!=='')return{'value':_0x3c6c7a[_0x394ac3(0x1b7)],'source':_0x394ac3(0x1c1)};if(_0x3c6c7a[_0x394ac3(0x1bc)]!==undefined&&_0x3c6c7a[_0x394ac3(0x1bc)]!==null&&_0x3c6c7a['mergedRegion']!=='')return{'value':_0x3c6c7a[_0x394ac3(0x1bc)],'source':'config'};return{'value':undefined,'source':'default'};}function describeConfiguredRegion(_0xb73fcb){const _0x572ce1=a229_0x484c;return typeof _0xb73fcb===_0x572ce1(0x1ab)?JSON['stringify'](_0xb73fcb):'a\x20value\x20of\x20type\x20'+(_0xb73fcb===null?_0x572ce1(0x1bf):typeof _0xb73fcb);}function a229_0x23eb(){const _0x46172d=['null','\x20doctor`\x20to\x20locate\x20and\x20repair\x20the\x20invalid\x20configuration\x20before\x20retrying.','global','project\x20Rabetbase\x20configuration','source','6SYsadL','Invalid\x20country/region\x20','\x20in\x20','appName','string','5924574CaMEnb','Run\x20`','app','1713336OPICbm','132EGCneA','appRegion','979488ABTddT','project','Rabetbase\x20configuration','125594JvxKXh','global\x20Rabetbase\x20configuration','globalRegion','112423wutDZv','app\x20profile\x20\x22','projectRegion','987365aRBfQY','mergedRegion','628520eoMHmj','selected\x20app\x20profile'];a229_0x23eb=function(){return _0x46172d;};return a229_0x23eb();}export function resolveConfiguredRegion(_0x3e97b4,_0x400215=a229_0x3d6050(0x1b4)){const _0x29c894=a229_0x3d6050;if(isInvalidLovrabetRegion(_0x3e97b4))throw CliErrors['validation'](_0x29c894(0x1c5)+describeConfiguredRegion(_0x3e97b4)+_0x29c894(0x1c6)+_0x400215+'.',_0x29c894(0x1ad)+CLI_BIN_NAME+_0x29c894(0x1c0));return normalizeLovrabetRegion(_0x3e97b4)??DEFAULT_LOVRABET_REGION;}export function resolveEffectiveRegion(_0x2942ec){const _0x21d7ba=a229_0x3d6050,_0x3ac51f=selectConfiguredRegion(_0x2942ec),_0x3af841=_0x3ac51f['source']===_0x21d7ba(0x1ae)?_0x2942ec[_0x21d7ba(0x1aa)]?_0x21d7ba(0x1b9)+_0x2942ec[_0x21d7ba(0x1aa)]+'\x22':_0x21d7ba(0x1be):_0x3ac51f[_0x21d7ba(0x1c3)]===_0x21d7ba(0x1b3)?_0x21d7ba(0x1c2):_0x3ac51f[_0x21d7ba(0x1c3)]==='global'?_0x21d7ba(0x1b6):_0x21d7ba(0x1b4);return{'region':resolveConfiguredRegion(_0x3ac51f['value'],_0x3af841),'source':_0x3ac51f['source']};}
@@ -19,11 +19,16 @@ export declare function getAppProfileFlagDefs(): FlagDef[];
19
19
  export declare function collectAppProfileOverrides(getFlagValue: (name: string) => string): Record<string, any>;
20
20
  export declare function buildAppProfileListFields(profile: Record<string, any>): Record<string, unknown>;
21
21
  export declare function buildAppDoctorFields(profile: Record<string, any>, effective: {
22
+ region: string;
22
23
  env: string;
23
24
  apiDir: string;
24
25
  cookie?: string;
25
26
  accessKey?: string;
26
27
  }): {
28
+ region: {
29
+ value: string;
30
+ source: "app" | "inherit";
31
+ };
27
32
  env: {
28
33
  value: string;
29
34
  source: "app" | "inherit";
@@ -49,4 +54,14 @@ export declare function buildCanonicalProjectConfig(base: Record<string, unknown
49
54
  env?: string;
50
55
  metadata?: ConfigMetadataFields;
51
56
  }): Record<string, any>;
57
+ /**
58
+ * Return the public on-disk configuration without persisting the default
59
+ * internal routing mode. Historical files remain readable; every CLI write
60
+ * converges them to the minimal representation.
61
+ *
62
+ * When a non-default top-level value coexists with an explicit default app
63
+ * override, move the inherited value into the other profiles first. This
64
+ * preserves effective routing while still removing every default marker.
65
+ */
66
+ export declare function normalizeConfigForWrite(input: Record<string, any>): Record<string, any>;
52
67
  export declare function normalizeLocale(value: string): "zh-CN" | "en-US" | null;
@@ -1 +1 @@
1
- const a229_0x3c0c55=a229_0x24f7;(function(_0x39119b,_0x38a0e2){const _0x476405=a229_0x24f7,_0x57cc93=_0x39119b();while(!![]){try{const _0x1a5f08=parseInt(_0x476405(0x10e))/0x1*(parseInt(_0x476405(0xed))/0x2)+parseInt(_0x476405(0x113))/0x3*(-parseInt(_0x476405(0x105))/0x4)+parseInt(_0x476405(0xff))/0x5+-parseInt(_0x476405(0x103))/0x6+parseInt(_0x476405(0xfd))/0x7+parseInt(_0x476405(0xe6))/0x8+-parseInt(_0x476405(0x110))/0x9;if(_0x1a5f08===_0x38a0e2)break;else _0x57cc93['push'](_0x57cc93['shift']());}catch(_0x2d03a5){_0x57cc93['push'](_0x57cc93['shift']());}}}(a229_0x4085,0xaeeac));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{RABETBASE_ENV_VALUES}from'../constant/env.js';import{RABETBASE_OUTPUT_FORMAT_VALUES}from'../constant/output.js';import{RISK_LEVEL_VALUES}from'../constant/risk.js';import{ENABLED_LOVRABET_REGION_VALUES}from'../constant/region.js';export{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';export const PROJECT_CREATE_INHERITABLE_KEYS=[a229_0x3c0c55(0x101),a229_0x3c0c55(0x111),a229_0x3c0c55(0xf8),a229_0x3c0c55(0x109),'riskLevel','region',a229_0x3c0c55(0x112),a229_0x3c0c55(0xfa),a229_0x3c0c55(0xe5),a229_0x3c0c55(0x10a),a229_0x3c0c55(0xfe),a229_0x3c0c55(0xf7),a229_0x3c0c55(0xfc),a229_0x3c0c55(0xe8),a229_0x3c0c55(0xe1)];export const TOP_LEVEL_CONFIG_KEYS=new Set(['appcode',a229_0x3c0c55(0xe7),'locale',a229_0x3c0c55(0x109),a229_0x3c0c55(0x101),a229_0x3c0c55(0x111),a229_0x3c0c55(0xf6),a229_0x3c0c55(0x10d),a229_0x3c0c55(0xfa),a229_0x3c0c55(0xe5),a229_0x3c0c55(0x10a),'skillDomain',a229_0x3c0c55(0xf7),'appDomain',a229_0x3c0c55(0xe8),a229_0x3c0c55(0xe1)]);export const CONFIG_ENUM_VALUES={'env':[...RABETBASE_ENV_VALUES],'format':[...RABETBASE_OUTPUT_FORMAT_VALUES],'region':[...ENABLED_LOVRABET_REGION_VALUES]};export function formatConfigKeyList(_0x4808bf){return[..._0x4808bf]['join'](',\x20');}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function isTopLevelConfigKey(_0x50228b){const _0x5cca6b=a229_0x3c0c55;return TOP_LEVEL_CONFIG_KEYS[_0x5cca6b(0xef)](_0x50228b);}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){return'Config\x20key\x20('+getTopLevelConfigKeySummary()+')';}export const APP_PROFILE_FLAG_KEY_MAP={'env':'env','apiDir':a229_0x3c0c55(0xf6),'cookie':a229_0x3c0c55(0x101),'accessKey':a229_0x3c0c55(0x111),'defaultFormat':a229_0x3c0c55(0x109),'pageSize':a229_0x3c0c55(0x106),'riskLevel':a229_0x3c0c55(0x10b),'locale':a229_0x3c0c55(0xf8)};export function getAppProfileFlagDefs(){const _0x346588=a229_0x3c0c55;return[{'name':_0x346588(0xe7),'type':_0x346588(0xf2),'description':_0x346588(0x107),'enum':[...RABETBASE_ENV_VALUES]},{'name':'apiDir','type':_0x346588(0xf2),'description':_0x346588(0xf5)},{'name':_0x346588(0x101),'type':_0x346588(0xf2),'description':_0x346588(0xeb),'hidden':!![]},{'name':_0x346588(0x111),'type':_0x346588(0xf2),'description':_0x346588(0xe4),'hidden':!![]},{'name':_0x346588(0xf1),'type':'string','description':_0x346588(0xe3),'enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':_0x346588(0x106),'type':'number','description':_0x346588(0xe2)},{'name':_0x346588(0x10b),'type':_0x346588(0xf2),'description':_0x346588(0x104),'enum':[...RISK_LEVEL_VALUES]},{'name':_0x346588(0xf8),'type':_0x346588(0xf2),'description':_0x346588(0xf9)}];}export function collectAppProfileOverrides(_0x190108){const _0x2e942d=a229_0x3c0c55,_0x49d9b0={};for(const [_0x5c027f,_0x165f11]of Object[_0x2e942d(0xf4)](APP_PROFILE_FLAG_KEY_MAP)){const _0x1bed39=_0x190108(_0x5c027f);if(!_0x1bed39)continue;_0x49d9b0[_0x165f11]=_0x165f11==='pageSize'?Number(_0x1bed39):_0x1bed39;}return _0x49d9b0;}function a229_0x24f7(_0x287d08,_0x1a5680){_0x287d08=_0x287d08-0xe0;const _0x408560=a229_0x4085();let _0x24f74d=_0x408560[_0x287d08];return _0x24f74d;}export function buildAppProfileListFields(_0x5a2399){const _0x591eb4=a229_0x3c0c55;return{'env':_0x5a2399[_0x591eb4(0xe7)]??null,'apiDir':_0x5a2399[_0x591eb4(0xf6)]??null,'hasCookie':!!_0x5a2399['cookie'],'hasAccessKey':!!_0x5a2399[_0x591eb4(0x111)],'format':_0x5a2399['format']??null,'pageSize':_0x5a2399[_0x591eb4(0x106)]??null,'riskLevel':_0x5a2399[_0x591eb4(0x10b)]??null,'locale':_0x5a2399[_0x591eb4(0xf8)]??null};}export function buildAppDoctorFields(_0x33d121,_0x21340d){const _0x432525=a229_0x3c0c55;return{'env':{'value':_0x33d121[_0x432525(0xe7)]||_0x21340d[_0x432525(0xe7)],'source':_0x33d121[_0x432525(0xe7)]?_0x432525(0x10c):'inherit'},'apiDir':{'value':_0x33d121[_0x432525(0xf6)]||_0x21340d[_0x432525(0xf6)],'source':_0x33d121[_0x432525(0xf6)]?'app':_0x432525(0xec)},'cookie':{'value':_0x33d121['cookie']||_0x21340d[_0x432525(0x101)],'source':_0x33d121[_0x432525(0x101)]?_0x432525(0x10c):_0x432525(0xec)},'accessKey':{'value':_0x33d121[_0x432525(0x111)]||_0x21340d['accessKey'],'source':_0x33d121[_0x432525(0x111)]?'app':_0x432525(0xec)}};}export function buildCanonicalAppConfig(_0x3d5b78,_0x254c3e){const _0x53d598=a229_0x3c0c55,_0x785660=_0x3d5b78[_0x53d598(0xe9)](_0x4b4f2d=>String(_0x4b4f2d||'')['trim']())[_0x53d598(0x108)](Boolean);if(_0x785660[_0x53d598(0x102)]===0x0)return{};const _0x3642e6={};for(const _0x279e85 of _0x785660){_0x3642e6[_0x279e85]=_0x254c3e?{'appcode':_0x279e85,'env':_0x254c3e}:{'appcode':_0x279e85};}return _0x785660[_0x53d598(0x102)]>0x1?{'apps':_0x3642e6,'defaultApp':_0x785660[0x0]}:{'apps':_0x3642e6};}export function normalizeStoredDefaultApp(_0x25688d,_0x30626e){const _0x52747e=a229_0x3c0c55,_0x3bb11f=_0x25688d[_0x52747e(0xfb)]&&typeof _0x25688d[_0x52747e(0xfb)]===_0x52747e(0xe0)?_0x25688d[_0x52747e(0xfb)]:{},_0x114e77=Object[_0x52747e(0x10f)](_0x3bb11f);if(_0x114e77['length']<=0x1)return delete _0x25688d['defaultApp'],undefined;const _0x2bbe2d=typeof _0x25688d[_0x52747e(0x100)]===_0x52747e(0xf2)&&_0x3bb11f[_0x25688d['defaultApp']]?_0x25688d[_0x52747e(0x100)]:undefined,_0x108fe6=_0x30626e&&_0x3bb11f[_0x30626e]?_0x30626e:_0x2bbe2d;if(_0x108fe6)return _0x25688d[_0x52747e(0x100)]=_0x108fe6,_0x108fe6;return delete _0x25688d[_0x52747e(0x100)],undefined;}export function buildCanonicalProjectConfig(_0x4e5f6c,_0x5771be){const _0x127e68=a229_0x3c0c55,{appCodes:appCodes=[],env:_0x1d3a9f,metadata:_0x2b1c87}=_0x5771be,_0x5c14b3={..._0x4e5f6c,..._0x2b1c87||{}};delete _0x5c14b3[_0x127e68(0xee)],delete _0x5c14b3['app'];if(_0x1d3a9f)_0x5c14b3[_0x127e68(0xe7)]=_0x1d3a9f;else!_0x5c14b3['env']&&(_0x5c14b3[_0x127e68(0xe7)]=DEFAULT_CONFIG_VALUES[_0x127e68(0xe7)]);const _0x235294=buildCanonicalAppConfig(appCodes,_0x5c14b3[_0x127e68(0xe7)]);if(Object[_0x127e68(0x10f)](_0x235294)[_0x127e68(0x102)]>0x0){_0x5c14b3[_0x127e68(0xfb)]=_0x235294['apps'];if(_0x235294[_0x127e68(0x100)])_0x5c14b3[_0x127e68(0x100)]=_0x235294[_0x127e68(0x100)];else delete _0x5c14b3[_0x127e68(0x100)];}return _0x5c14b3;}const LOCALE_MAP={'zh':'zh-CN','zh-cn':a229_0x3c0c55(0xea),'zh_cn':'zh-CN','en':a229_0x3c0c55(0xf3),'en-us':'en-US','en_us':'en-US'};export function normalizeLocale(_0x74a7d9){const _0x3d17af=a229_0x3c0c55;if(!_0x74a7d9)return null;return LOCALE_MAP[_0x74a7d9[_0x3d17af(0xf0)]()]??null;}function a229_0x4085(){const _0x12e346=['map','zh-CN','Auth\x20cookie','inherit','325010DUpDcp','appcode','has','toLowerCase','defaultFormat','string','en-US','entries','API\x20directory\x20path','apiDir','kbDomain','locale','App\x20locale\x20(not\x20CLI\x20language;\x20reserved\x20for\x20later\x20app\x20use)','userDomain','apps','appDomain','8236907EQifEM','skillDomain','1940595MUCxPs','defaultApp','cookie','length','5352366VXisFW','Risk\x20level','6356keDhyW','pageSize','Target\x20environment','filter','format','runtimeDomain','riskLevel','app','region','2FhCUdv','keys','5358798mJTxuo','accessKey','routing','1026gQoWSK','object','certificateDomain','Default\x20page\x20size','Default\x20output\x20format\x20for\x20this\x20app\x20(profile)','Access\x20key','apiDomain','6860408zRcENZ','env','localDomain'];a229_0x4085=function(){return _0x12e346;};return a229_0x4085();}
1
+ const a230_0xa77104=a230_0x4ff9;(function(_0x4c83f2,_0xd2be60){const _0x3795bf=a230_0x4ff9,_0x2a46a7=_0x4c83f2();while(!![]){try{const _0x309952=parseInt(_0x3795bf(0x1bf))/0x1+parseInt(_0x3795bf(0x1b3))/0x2+parseInt(_0x3795bf(0x1bd))/0x3+-parseInt(_0x3795bf(0x1a0))/0x4+parseInt(_0x3795bf(0x1ba))/0x5+-parseInt(_0x3795bf(0x190))/0x6+-parseInt(_0x3795bf(0x1c4))/0x7;if(_0x309952===_0xd2be60)break;else _0x2a46a7['push'](_0x2a46a7['shift']());}catch(_0xb8a6a2){_0x2a46a7['push'](_0x2a46a7['shift']());}}}(a230_0x1c90,0xbef5c));import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{isDaily,isProduction,RABETBASE_ENV_VALUES}from'../constant/env.js';function a230_0x1c90(){const _0x2b83e6=['number','en-US','867020rtPaxl','pageSize','Target\x20environment','8434830OUUUSo','kbDomain','string','env','riskLevel','join','cookie','entries','some','inherit','toLowerCase','trim','app','isArray','object','certificateDomain','2925468EMTPVW','defaultApp','App\x20locale\x20(not\x20CLI\x20language;\x20reserved\x20for\x20later\x20app\x20use)','Auth\x20cookie','zh-CN','appDomain','accessKey','length','region','userDomain','format','map','API\x20directory\x20path','Config\x20key\x20(','Risk\x20level','apps','skillDomain','keys','Access\x20key','1167828Mynlqq','runtimeDomain','values','apiDomain','filter','Default\x20page\x20size','localDomain','6570745VMIddl','has','defaultFormat','2817321EekmXr','apiDir','206034SfJqKw','fromEntries','locale'];a230_0x1c90=function(){return _0x2b83e6;};return a230_0x1c90();}import{RABETBASE_OUTPUT_FORMAT_VALUES}from'../constant/output.js';import{RISK_LEVEL_VALUES}from'../constant/risk.js';import{ENABLED_LOVRABET_REGION_VALUES}from'../constant/region.js';export{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';export const PROJECT_CREATE_INHERITABLE_KEYS=['cookie',a230_0xa77104(0x1a6),a230_0xa77104(0x1c1),a230_0xa77104(0x1aa),'riskLevel',a230_0xa77104(0x1a8),'routing',a230_0xa77104(0x1a9),'apiDomain',a230_0xa77104(0x1b4),a230_0xa77104(0x1b0),'kbDomain','appDomain',a230_0xa77104(0x1b9),a230_0xa77104(0x19f)];export const TOP_LEVEL_CONFIG_KEYS=new Set(['appcode','env',a230_0xa77104(0x1c1),a230_0xa77104(0x1aa),'cookie',a230_0xa77104(0x1a6),a230_0xa77104(0x1be),'region','userDomain',a230_0xa77104(0x1b6),a230_0xa77104(0x1b4),a230_0xa77104(0x1b0),a230_0xa77104(0x191),a230_0xa77104(0x1a5),a230_0xa77104(0x1b9),a230_0xa77104(0x19f)]);export const CONFIG_ENUM_VALUES={'env':[...RABETBASE_ENV_VALUES],'format':[...RABETBASE_OUTPUT_FORMAT_VALUES],'region':[...ENABLED_LOVRABET_REGION_VALUES]};export function formatConfigKeyList(_0x25f9f6){const _0x498d24=a230_0xa77104;return[..._0x25f9f6][_0x498d24(0x195)](',\x20');}function a230_0x4ff9(_0x3dc027,_0x2fbadb){_0x3dc027=_0x3dc027-0x18e;const _0x1c908d=a230_0x1c90();let _0x4ff954=_0x1c908d[_0x3dc027];return _0x4ff954;}export function getTopLevelConfigKeyList(){return[...TOP_LEVEL_CONFIG_KEYS];}export function isTopLevelConfigKey(_0x276069){const _0x6fe5be=a230_0xa77104;return TOP_LEVEL_CONFIG_KEYS[_0x6fe5be(0x1bb)](_0x276069);}export function getTopLevelConfigKeySummary(){return formatConfigKeyList(getTopLevelConfigKeyList());}export function getConfigCommandKeyDescription(){const _0x1faac2=a230_0xa77104;return _0x1faac2(0x1ad)+getTopLevelConfigKeySummary()+')';}export const APP_PROFILE_FLAG_KEY_MAP={'region':'region','env':a230_0xa77104(0x193),'apiDir':a230_0xa77104(0x1be),'cookie':a230_0xa77104(0x196),'accessKey':'accessKey','defaultFormat':'format','pageSize':a230_0xa77104(0x18e),'riskLevel':a230_0xa77104(0x194),'locale':a230_0xa77104(0x1c1)};export function getAppProfileFlagDefs(){const _0x33769c=a230_0xa77104;return[{'name':_0x33769c(0x1a8),'type':_0x33769c(0x192),'description':'Country/region\x20for\x20this\x20app\x20profile','enum':[...ENABLED_LOVRABET_REGION_VALUES]},{'name':'env','type':_0x33769c(0x192),'description':_0x33769c(0x18f),'enum':[...RABETBASE_ENV_VALUES]},{'name':_0x33769c(0x1be),'type':_0x33769c(0x192),'description':_0x33769c(0x1ac)},{'name':'cookie','type':'string','description':_0x33769c(0x1a3),'hidden':!![]},{'name':_0x33769c(0x1a6),'type':'string','description':_0x33769c(0x1b2),'hidden':!![]},{'name':_0x33769c(0x1bc),'type':_0x33769c(0x192),'description':'Default\x20output\x20format\x20for\x20this\x20app\x20(profile)','enum':[...RABETBASE_OUTPUT_FORMAT_VALUES]},{'name':_0x33769c(0x18e),'type':_0x33769c(0x1c2),'description':_0x33769c(0x1b8)},{'name':_0x33769c(0x194),'type':_0x33769c(0x192),'description':_0x33769c(0x1ae),'enum':[...RISK_LEVEL_VALUES]},{'name':'locale','type':_0x33769c(0x192),'description':_0x33769c(0x1a2)}];}export function collectAppProfileOverrides(_0x1536b0){const _0x44aae8=a230_0xa77104,_0x8cfa19={};for(const [_0x37e8b1,_0x4412e4]of Object[_0x44aae8(0x197)](APP_PROFILE_FLAG_KEY_MAP)){const _0x3e4756=_0x1536b0(_0x37e8b1);if(!_0x3e4756)continue;_0x8cfa19[_0x4412e4]=_0x4412e4==='pageSize'?Number(_0x3e4756):_0x3e4756;}return _0x8cfa19;}export function buildAppProfileListFields(_0x53278d){const _0x317944=a230_0xa77104;return{'region':_0x53278d[_0x317944(0x1a8)]??null,'env':_0x53278d['env']??null,'apiDir':_0x53278d[_0x317944(0x1be)]??null,'hasCookie':!!_0x53278d['cookie'],'hasAccessKey':!!_0x53278d[_0x317944(0x1a6)],'format':_0x53278d[_0x317944(0x1aa)]??null,'pageSize':_0x53278d['pageSize']??null,'riskLevel':_0x53278d[_0x317944(0x194)]??null,'locale':_0x53278d[_0x317944(0x1c1)]??null};}export function buildAppDoctorFields(_0x40442e,_0x209e8f){const _0x5a873d=a230_0xa77104;return{'region':{'value':_0x40442e[_0x5a873d(0x1a8)]||_0x209e8f[_0x5a873d(0x1a8)],'source':_0x40442e[_0x5a873d(0x1a8)]?'app':_0x5a873d(0x199)},'env':{'value':_0x40442e[_0x5a873d(0x193)]||_0x209e8f[_0x5a873d(0x193)],'source':_0x40442e[_0x5a873d(0x193)]?_0x5a873d(0x19c):_0x5a873d(0x199)},'apiDir':{'value':_0x40442e['apiDir']||_0x209e8f[_0x5a873d(0x1be)],'source':_0x40442e[_0x5a873d(0x1be)]?_0x5a873d(0x19c):_0x5a873d(0x199)},'cookie':{'value':_0x40442e[_0x5a873d(0x196)]||_0x209e8f[_0x5a873d(0x196)],'source':_0x40442e[_0x5a873d(0x196)]?_0x5a873d(0x19c):_0x5a873d(0x199)},'accessKey':{'value':_0x40442e[_0x5a873d(0x1a6)]||_0x209e8f[_0x5a873d(0x1a6)],'source':_0x40442e[_0x5a873d(0x1a6)]?_0x5a873d(0x19c):_0x5a873d(0x199)}};}export function buildCanonicalAppConfig(_0x421625,_0x59e579){const _0xb0df4a=a230_0xa77104,_0x2c7559=_0x421625['map'](_0x28a78f=>String(_0x28a78f||'')[_0xb0df4a(0x19b)]())[_0xb0df4a(0x1b7)](Boolean);if(_0x2c7559[_0xb0df4a(0x1a7)]===0x0)return{};const _0x4bc7d3={};for(const _0xae9f3 of _0x2c7559){_0x4bc7d3[_0xae9f3]=_0x59e579&&!isProduction(_0x59e579)?{'appcode':_0xae9f3,'env':_0x59e579}:{'appcode':_0xae9f3};}return _0x2c7559[_0xb0df4a(0x1a7)]>0x1?{'apps':_0x4bc7d3,'defaultApp':_0x2c7559[0x0]}:{'apps':_0x4bc7d3};}export function normalizeStoredDefaultApp(_0x1ceee3,_0x26d3c0){const _0x2bb82e=a230_0xa77104,_0x11af60=_0x1ceee3[_0x2bb82e(0x1af)]&&typeof _0x1ceee3[_0x2bb82e(0x1af)]===_0x2bb82e(0x19e)?_0x1ceee3[_0x2bb82e(0x1af)]:{},_0x446d9d=Object[_0x2bb82e(0x1b1)](_0x11af60);if(_0x446d9d['length']<=0x1)return delete _0x1ceee3[_0x2bb82e(0x1a1)],undefined;const _0xcc543c=typeof _0x1ceee3['defaultApp']===_0x2bb82e(0x192)&&_0x11af60[_0x1ceee3[_0x2bb82e(0x1a1)]]?_0x1ceee3[_0x2bb82e(0x1a1)]:undefined,_0x4948d8=_0x26d3c0&&_0x11af60[_0x26d3c0]?_0x26d3c0:_0xcc543c;if(_0x4948d8)return _0x1ceee3[_0x2bb82e(0x1a1)]=_0x4948d8,_0x4948d8;return delete _0x1ceee3[_0x2bb82e(0x1a1)],undefined;}export function buildCanonicalProjectConfig(_0x5e5e1d,_0x397eec){const _0x5b4687=a230_0xa77104,{appCodes:appCodes=[],env:_0x5734c2,metadata:_0x18963f}=_0x397eec,_0xba0724={..._0x5e5e1d,..._0x18963f||{}};delete _0xba0724['appcode'],delete _0xba0724['app'];const _0x189f8d=_0x5734c2||(typeof _0xba0724[_0x5b4687(0x193)]===_0x5b4687(0x192)?_0xba0724[_0x5b4687(0x193)]:'')||DEFAULT_CONFIG_VALUES['env'];if(isProduction(_0x189f8d))delete _0xba0724[_0x5b4687(0x193)];else _0xba0724['env']=_0x189f8d;const _0x2ea018=buildCanonicalAppConfig(appCodes,_0x189f8d);if(Object[_0x5b4687(0x1b1)](_0x2ea018)['length']>0x0){_0xba0724['apps']=_0x2ea018[_0x5b4687(0x1af)];if(_0x2ea018['defaultApp'])_0xba0724[_0x5b4687(0x1a1)]=_0x2ea018['defaultApp'];else delete _0xba0724['defaultApp'];}return normalizeConfigForWrite(_0xba0724);}function isRecord(_0x185de6){const _0xce06a9=a230_0xa77104;return!!_0x185de6&&typeof _0x185de6===_0xce06a9(0x19e)&&!Array[_0xce06a9(0x19d)](_0x185de6);}export function normalizeConfigForWrite(_0x55e1ac){const _0xfd7fe0=a230_0xa77104,_0x34e03d={..._0x55e1ac},_0xe95c70=isRecord(_0x55e1ac[_0xfd7fe0(0x1af)])?_0x55e1ac['apps']:undefined,_0x421f14=_0xe95c70?Object[_0xfd7fe0(0x1c0)](Object['entries'](_0xe95c70)[_0xfd7fe0(0x1ab)](([_0x1f4a83,_0x1dc2be])=>[_0x1f4a83,isRecord(_0x1dc2be)?{..._0x1dc2be}:_0x1dc2be])):undefined;if(_0x421f14){const _0x552a50=typeof _0x34e03d[_0xfd7fe0(0x193)]===_0xfd7fe0(0x192)?_0x34e03d[_0xfd7fe0(0x193)]:undefined,_0x34f05c=Object[_0xfd7fe0(0x1b5)](_0x421f14)[_0xfd7fe0(0x198)](_0x3478fb=>isRecord(_0x3478fb)&&typeof _0x3478fb[_0xfd7fe0(0x193)]===_0xfd7fe0(0x192)&&isProduction(_0x3478fb[_0xfd7fe0(0x193)]));if(_0x552a50&&isDaily(_0x552a50)&&_0x34f05c){for(const _0x468e0f of Object[_0xfd7fe0(0x1b5)](_0x421f14)){if(!isRecord(_0x468e0f))continue;if(_0x468e0f[_0xfd7fe0(0x193)]===undefined)_0x468e0f[_0xfd7fe0(0x193)]=_0x552a50;}delete _0x34e03d['env'];}for(const _0x33bbfb of Object[_0xfd7fe0(0x1b5)](_0x421f14)){isRecord(_0x33bbfb)&&typeof _0x33bbfb[_0xfd7fe0(0x193)]==='string'&&isProduction(_0x33bbfb[_0xfd7fe0(0x193)])&&delete _0x33bbfb[_0xfd7fe0(0x193)];}_0x34e03d[_0xfd7fe0(0x1af)]=_0x421f14;}return typeof _0x34e03d[_0xfd7fe0(0x193)]===_0xfd7fe0(0x192)&&isProduction(_0x34e03d[_0xfd7fe0(0x193)])&&delete _0x34e03d['env'],_0x34e03d;}const LOCALE_MAP={'zh':a230_0xa77104(0x1a4),'zh-cn':a230_0xa77104(0x1a4),'zh_cn':a230_0xa77104(0x1a4),'en':'en-US','en-us':a230_0xa77104(0x1c3),'en_us':a230_0xa77104(0x1c3)};export function normalizeLocale(_0x235ecc){const _0x5902d9=a230_0xa77104;if(!_0x235ecc)return null;return LOCALE_MAP[_0x235ecc[_0x5902d9(0x19a)]()]??null;}
@@ -1 +1 @@
1
- const a230_0x5cc373=a230_0x1ba2;(function(_0x274df5,_0x380d73){const _0x15d3bc=a230_0x1ba2,_0x540f5a=_0x274df5();while(!![]){try{const _0x1bc981=-parseInt(_0x15d3bc(0x176))/0x1*(-parseInt(_0x15d3bc(0x17a))/0x2)+parseInt(_0x15d3bc(0x182))/0x3*(parseInt(_0x15d3bc(0x175))/0x4)+-parseInt(_0x15d3bc(0x17d))/0x5*(parseInt(_0x15d3bc(0x183))/0x6)+-parseInt(_0x15d3bc(0x17c))/0x7*(parseInt(_0x15d3bc(0x17e))/0x8)+parseInt(_0x15d3bc(0x17f))/0x9*(-parseInt(_0x15d3bc(0x179))/0xa)+-parseInt(_0x15d3bc(0x17b))/0xb+-parseInt(_0x15d3bc(0x181))/0xc*(-parseInt(_0x15d3bc(0x178))/0xd);if(_0x1bc981===_0x380d73)break;else _0x540f5a['push'](_0x540f5a['shift']());}catch(_0x231f12){_0x540f5a['push'](_0x540f5a['shift']());}}}(a230_0x5403,0x99612));function a230_0x5403(){const _0x40859d=['5604434ivgIFi','7AycBuK','3215635ArWvLv','3426712EMKfSH','2211822iAeYsw','/config/index.json','11266932NBJAcu','9FuMdDv','6WiQKGf','/templates/projects','473276HZhUTc','713697Reyhyu','https://g.lovrabet.com/dist/rabetbase-cli','26Wjbdqv','30qgkggN','2iWPEUS'];a230_0x5403=function(){return _0x40859d;};return a230_0x5403();}export const RABETBASE_CDN_BASE_URL=a230_0x5cc373(0x177);function a230_0x1ba2(_0x522840,_0x245e5c){_0x522840=_0x522840-0x175;const _0x5403c0=a230_0x5403();let _0x1ba20d=_0x5403c0[_0x522840];return _0x1ba20d;}export const CLI_VERSION_POLICY_URL=RABETBASE_CDN_BASE_URL+a230_0x5cc373(0x180);export const PROJECT_TEMPLATE_ASSET_BASE_URL=RABETBASE_CDN_BASE_URL+a230_0x5cc373(0x184);
1
+ const a231_0x242356=a231_0x254b;function a231_0x254b(_0x2ce6a9,_0x410b0c){_0x2ce6a9=_0x2ce6a9-0x6d;const _0x17e7ec=a231_0x17e7();let _0x254be8=_0x17e7ec[_0x2ce6a9];return _0x254be8;}function a231_0x17e7(){const _0x1fac67=['19540kjUymr','1OlehoX','102zwrcFy','30926HvneVd','3660428IWkYvX','2195457jrwyyW','/templates/projects','3088owzSZg','47739288wEJXCG','152270YbKdtk','36zeGkqo','3TELRQU','1434234nTwwPt'];a231_0x17e7=function(){return _0x1fac67;};return a231_0x17e7();}(function(_0x1c0f7f,_0x3485d7){const _0x399abb=a231_0x254b,_0x42dda9=_0x1c0f7f();while(!![]){try{const _0x3eb204=-parseInt(_0x399abb(0x6f))/0x1*(parseInt(_0x399abb(0x6d))/0x2)+parseInt(_0x399abb(0x79))/0x3*(-parseInt(_0x399abb(0x72))/0x4)+-parseInt(_0x399abb(0x6e))/0x5*(-parseInt(_0x399abb(0x70))/0x6)+parseInt(_0x399abb(0x71))/0x7*(-parseInt(_0x399abb(0x75))/0x8)+parseInt(_0x399abb(0x78))/0x9*(parseInt(_0x399abb(0x77))/0xa)+parseInt(_0x399abb(0x73))/0xb+parseInt(_0x399abb(0x76))/0xc;if(_0x3eb204===_0x3485d7)break;else _0x42dda9['push'](_0x42dda9['shift']());}catch(_0x1a8b96){_0x42dda9['push'](_0x42dda9['shift']());}}}(a231_0x17e7,0xec3d1));export const RABETBASE_CDN_BASE_URL='https://g.lovrabet.com/dist/rabetbase-cli';export const CLI_VERSION_POLICY_URL=RABETBASE_CDN_BASE_URL+'/config/index.json';export const PROJECT_TEMPLATE_ASSET_BASE_URL=RABETBASE_CDN_BASE_URL+a231_0x242356(0x74);