@lovrabet/rabetbase-cli 2.5.0-beta.6 → 2.5.1-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 (312) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/api/generate-sdk-config-file.js +1 -1
  5. package/lib/auth/auth-server-ui.js +1 -1
  6. package/lib/auth/auth-server.d.ts +7 -0
  7. package/lib/auth/auth-server.js +1 -1
  8. package/lib/auth/constant.js +1 -1
  9. package/lib/auth/get-cookie.js +1 -1
  10. package/lib/auth/get-session-user.js +1 -1
  11. package/lib/auth/is-session-valid.js +1 -1
  12. package/lib/auth/login-success-html.js +1 -1
  13. package/lib/auth/logout.js +1 -1
  14. package/lib/cli-flags.js +1 -1
  15. package/lib/cli.js +1 -1
  16. package/lib/commands/api/generate.js +1 -1
  17. package/lib/commands/api/index.js +1 -1
  18. package/lib/commands/api/list.js +1 -1
  19. package/lib/commands/api/pull.js +1 -1
  20. package/lib/commands/api/shared.js +1 -1
  21. package/lib/commands/app/index.js +1 -1
  22. package/lib/commands/app/list.js +1 -1
  23. package/lib/commands/app/members-list.js +1 -1
  24. package/lib/commands/app/remote-directory.js +1 -1
  25. package/lib/commands/app/shared.js +1 -1
  26. package/lib/commands/app-config/delete.js +1 -1
  27. package/lib/commands/app-config/get.js +1 -1
  28. package/lib/commands/app-config/index.js +1 -1
  29. package/lib/commands/app-config/list.js +1 -1
  30. package/lib/commands/app-config/set.js +1 -1
  31. package/lib/commands/app-config/shared.js +1 -1
  32. package/lib/commands/auth/index.js +1 -1
  33. package/lib/commands/bff/create.js +1 -1
  34. package/lib/commands/bff/delete.js +1 -1
  35. package/lib/commands/bff/detail.js +1 -1
  36. package/lib/commands/bff/index.js +1 -1
  37. package/lib/commands/bff/list.js +1 -1
  38. package/lib/commands/bff/pull.js +1 -1
  39. package/lib/commands/bff/push.js +1 -1
  40. package/lib/commands/bff/status.js +1 -1
  41. package/lib/commands/cli-skill/index.js +1 -1
  42. package/lib/commands/cli-update.js +1 -1
  43. package/lib/commands/codegen/index.js +1 -1
  44. package/lib/commands/codegen/sdk.js +1 -1
  45. package/lib/commands/codegen/sql.js +1 -1
  46. package/lib/commands/common/app-registry.js +1 -1
  47. package/lib/commands/common/app-selector.js +1 -1
  48. package/lib/commands/common/async-task.js +1 -1
  49. package/lib/commands/common/dry-run.js +1 -1
  50. package/lib/commands/common/flags.js +1 -1
  51. package/lib/commands/common/local-file.js +1 -1
  52. package/lib/commands/common/validate.js +1 -1
  53. package/lib/commands/config/delete.js +1 -1
  54. package/lib/commands/config/get.js +1 -1
  55. package/lib/commands/config/index.js +1 -1
  56. package/lib/commands/config/init.d.ts +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-update.js +1 -1
  68. package/lib/commands/dataset/generate.js +1 -1
  69. package/lib/commands/dataset/index.js +1 -1
  70. package/lib/commands/dataset/list.js +1 -1
  71. package/lib/commands/dataset/operations.js +1 -1
  72. package/lib/commands/dataset/relation-audit.js +1 -1
  73. package/lib/commands/dataset/relation-create.js +1 -1
  74. package/lib/commands/dataset/relation-delete.js +1 -1
  75. package/lib/commands/dataset/relation-shared.js +1 -1
  76. package/lib/commands/dataset/relation-update.js +1 -1
  77. package/lib/commands/dataset/relations.js +1 -1
  78. package/lib/commands/dataset/rename.js +1 -1
  79. package/lib/commands/dataset/restore.js +1 -1
  80. package/lib/commands/db/analysis-batching.js +1 -1
  81. package/lib/commands/db/analyze-batch-plan.js +1 -1
  82. package/lib/commands/db/analyze-cancel.js +1 -1
  83. package/lib/commands/db/analyze-start.js +1 -1
  84. package/lib/commands/db/analyze-status.js +1 -1
  85. package/lib/commands/db/create.js +1 -1
  86. package/lib/commands/db/delete.js +1 -1
  87. package/lib/commands/db/detail.js +1 -1
  88. package/lib/commands/db/diff-refresh-start.js +1 -1
  89. package/lib/commands/db/diff-refresh-status.js +1 -1
  90. package/lib/commands/db/diff.js +1 -1
  91. package/lib/commands/db/index.js +1 -1
  92. package/lib/commands/db/list.js +1 -1
  93. package/lib/commands/db/shared.js +1 -1
  94. package/lib/commands/db/table-diff-shared.js +1 -1
  95. package/lib/commands/db/tables.js +1 -1
  96. package/lib/commands/db/test.js +1 -1
  97. package/lib/commands/db/update.js +1 -1
  98. package/lib/commands/doctor.js +1 -1
  99. package/lib/commands/file/index.js +1 -1
  100. package/lib/commands/issue/index.js +1 -1
  101. package/lib/commands/issue/nudge.js +1 -1
  102. package/lib/commands/issue/report.js +1 -1
  103. package/lib/commands/issue/shared.js +1 -1
  104. package/lib/commands/kb/create.js +1 -1
  105. package/lib/commands/kb/delete.js +1 -1
  106. package/lib/commands/kb/detail.js +1 -1
  107. package/lib/commands/kb/index.js +1 -1
  108. package/lib/commands/kb/list.js +1 -1
  109. package/lib/commands/kb/search.js +1 -1
  110. package/lib/commands/kb/shared.js +1 -1
  111. package/lib/commands/kb/update.js +1 -1
  112. package/lib/commands/logs/index.js +1 -1
  113. package/lib/commands/menu/asset-update.js +1 -1
  114. package/lib/commands/menu/delete.js +1 -1
  115. package/lib/commands/menu/external-link-create.js +1 -1
  116. package/lib/commands/menu/external-link-update.js +1 -1
  117. package/lib/commands/menu/group-create.js +1 -1
  118. package/lib/commands/menu/group-update.js +1 -1
  119. package/lib/commands/menu/index.js +1 -1
  120. package/lib/commands/menu/list.js +1 -1
  121. package/lib/commands/menu/move.js +1 -1
  122. package/lib/commands/menu/regroup-start.js +1 -1
  123. package/lib/commands/menu/rename.js +1 -1
  124. package/lib/commands/menu/shared/compare-table.js +1 -1
  125. package/lib/commands/menu/shared/delete-plan.js +1 -1
  126. package/lib/commands/menu/shared/facts.js +1 -1
  127. package/lib/commands/menu/shared/index.js +1 -1
  128. package/lib/commands/menu/shared/inquirer.js +1 -1
  129. package/lib/commands/menu/shared/local-pages.js +1 -1
  130. package/lib/commands/menu/shared/logic.js +1 -1
  131. package/lib/commands/menu/shared/mutations.js +1 -1
  132. package/lib/commands/menu/shared/service.js +1 -1
  133. package/lib/commands/menu/shared/sync-core.js +1 -1
  134. package/lib/commands/menu/shared/update-core.js +1 -1
  135. package/lib/commands/menu/shared/valid-url.js +1 -1
  136. package/lib/commands/menu/sync.js +1 -1
  137. package/lib/commands/menu/visibility-update.js +1 -1
  138. package/lib/commands/notification/config-create.js +1 -1
  139. package/lib/commands/notification/config-delete.js +1 -1
  140. package/lib/commands/notification/config-list.js +1 -1
  141. package/lib/commands/notification/config-update.js +1 -1
  142. package/lib/commands/notification/index.js +1 -1
  143. package/lib/commands/notification/shared.js +1 -1
  144. package/lib/commands/ocr/index.js +1 -1
  145. package/lib/commands/page/create.js +1 -1
  146. package/lib/commands/page/custom/detail.js +1 -1
  147. package/lib/commands/page/custom/list.js +1 -1
  148. package/lib/commands/page/custom/publish.js +1 -1
  149. package/lib/commands/page/custom/shared.js +1 -1
  150. package/lib/commands/page/custom/syntax.js +1 -1
  151. package/lib/commands/page/custom/template.js +1 -1
  152. package/lib/commands/page/custom/update.js +1 -1
  153. package/lib/commands/page/data-list-status.js +1 -1
  154. package/lib/commands/page/generate-start.js +1 -1
  155. package/lib/commands/page/generate-status.js +1 -1
  156. package/lib/commands/page/index.js +1 -1
  157. package/lib/commands/page/pull.js +1 -1
  158. package/lib/commands/page/push.js +1 -1
  159. package/lib/commands/page/relation-audit.js +1 -1
  160. package/lib/commands/page/restore.js +1 -1
  161. package/lib/commands/page/shared.js +1 -1
  162. package/lib/commands/page/sync.js +1 -1
  163. package/lib/commands/project/create/enhanced-guided-create.js +1 -1
  164. package/lib/commands/project/create/format-elapsed.js +1 -1
  165. package/lib/commands/project/create/main.js +1 -1
  166. package/lib/commands/project/create/materialize-project-template.js +1 -1
  167. package/lib/commands/project/create/project-name.js +1 -1
  168. package/lib/commands/project/create/project-template-archive.js +1 -1
  169. package/lib/commands/project/create/project-template-path.js +1 -1
  170. package/lib/commands/project/create/use-copy-project-template.js +1 -1
  171. package/lib/commands/project/create/use-format-code.js +1 -1
  172. package/lib/commands/project/create/use-install-dependencies.js +1 -1
  173. package/lib/commands/project/index.js +1 -1
  174. package/lib/commands/project/upgrade.js +1 -1
  175. package/lib/commands/registry.js +1 -1
  176. package/lib/commands/role/delete.js +1 -1
  177. package/lib/commands/role/detail.js +1 -1
  178. package/lib/commands/role/index.js +1 -1
  179. package/lib/commands/role/list.js +1 -1
  180. package/lib/commands/role/shared.js +1 -1
  181. package/lib/commands/role/update.js +1 -1
  182. package/lib/commands/role/user-add.js +1 -1
  183. package/lib/commands/role/user-remove.js +1 -1
  184. package/lib/commands/role/user-resolve.js +1 -1
  185. package/lib/commands/run/index.js +1 -1
  186. package/lib/commands/schema.js +1 -1
  187. package/lib/commands/sql/create.js +1 -1
  188. package/lib/commands/sql/delete.js +1 -1
  189. package/lib/commands/sql/detail.js +1 -1
  190. package/lib/commands/sql/exec.js +1 -1
  191. package/lib/commands/sql/index.js +1 -1
  192. package/lib/commands/sql/list.js +1 -1
  193. package/lib/commands/sql/pull.js +1 -1
  194. package/lib/commands/sql/push.js +1 -1
  195. package/lib/commands/sql/shared.js +1 -1
  196. package/lib/commands/sql/status.js +1 -1
  197. package/lib/commands/sql/validate.js +1 -1
  198. package/lib/commands/task/index.js +1 -1
  199. package/lib/commands/task/status.js +1 -1
  200. package/lib/commands/tenant/index.js +1 -1
  201. package/lib/commands/tenant/members-list.js +1 -1
  202. package/lib/commands/tenant/shared.js +1 -1
  203. package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
  204. package/lib/commands/user-account/index.js +1 -1
  205. package/lib/commands/workspace/add.js +1 -1
  206. package/lib/commands/workspace/index.js +1 -1
  207. package/lib/commands/workspace/remove.js +1 -1
  208. package/lib/config/domain-config.d.ts +1 -1
  209. package/lib/config/domain-config.js +1 -1
  210. package/lib/config/project-routing.d.ts +30 -0
  211. package/lib/config/project-routing.js +1 -0
  212. package/lib/config/schema.d.ts +1 -1
  213. package/lib/config/schema.js +1 -1
  214. package/lib/constant/cdn.js +1 -1
  215. package/lib/constant/cli.js +1 -1
  216. package/lib/constant/defaults.js +1 -1
  217. package/lib/constant/domain.d.ts +7 -2
  218. package/lib/constant/domain.js +1 -1
  219. package/lib/constant/env.js +1 -1
  220. package/lib/constant/output.js +1 -1
  221. package/lib/constant/paths.js +1 -1
  222. package/lib/constant/region.d.ts +2 -2
  223. package/lib/constant/region.js +1 -1
  224. package/lib/constant/risk.js +1 -1
  225. package/lib/constant/routing-profile.d.ts +115 -0
  226. package/lib/constant/routing-profile.js +1 -0
  227. package/lib/context/app-resolver.js +1 -1
  228. package/lib/context/auth-resolver.js +1 -1
  229. package/lib/context/config-loader.js +1 -1
  230. package/lib/context.js +1 -1
  231. package/lib/core/alias-resolver.js +1 -1
  232. package/lib/core/api-client.js +1 -1
  233. package/lib/core/bff/config.js +1 -1
  234. package/lib/core/bff/file-system.js +1 -1
  235. package/lib/core/bff/hash.js +1 -1
  236. package/lib/core/bff/lock.js +1 -1
  237. package/lib/core/bff/utils.js +1 -1
  238. package/lib/core/db-resolver.js +1 -1
  239. package/lib/core/page/file-system.js +1 -1
  240. package/lib/core/page/hash.js +1 -1
  241. package/lib/core/page/lock.js +1 -1
  242. package/lib/core/sql-index-auditor.js +1 -1
  243. package/lib/core/sql-sync/config.js +1 -1
  244. package/lib/core/sql-sync/file-system.js +1 -1
  245. package/lib/core/sql-sync/hash.js +1 -1
  246. package/lib/core/sql-sync/lock.js +1 -1
  247. package/lib/core/sql-sync/utils.js +1 -1
  248. package/lib/core/sql-validator.js +1 -1
  249. package/lib/errors.js +1 -1
  250. package/lib/framework/build-all-flags.js +1 -1
  251. package/lib/framework/error-output.js +1 -1
  252. package/lib/framework/explicit-yes.js +1 -1
  253. package/lib/framework/flags.js +1 -1
  254. package/lib/framework/help.js +1 -1
  255. package/lib/framework/index.js +1 -1
  256. package/lib/framework/output.js +1 -1
  257. package/lib/framework/response.js +1 -1
  258. package/lib/framework/runner-alias.js +1 -1
  259. package/lib/framework/runner.js +1 -1
  260. package/lib/framework/schema-export.js +1 -1
  261. package/lib/framework/types.js +1 -1
  262. package/lib/generated/build-info.d.ts +4 -4
  263. package/lib/generated/build-info.js +1 -1
  264. package/lib/help.js +1 -1
  265. package/lib/postinstall.js +1 -1
  266. package/lib/runtime/confirmation.js +1 -1
  267. package/lib/runtime/event.js +1 -1
  268. package/lib/runtime/index.js +1 -1
  269. package/lib/runtime/queue.js +1 -1
  270. package/lib/runtime/resolve.js +1 -1
  271. package/lib/skills/builtin-skill.js +1 -1
  272. package/lib/skills/main.js +1 -1
  273. package/lib/skills/npx-skills-add.js +1 -1
  274. package/lib/skills/skill-presence.js +1 -1
  275. package/lib/telemetry/cli-command-trace.js +1 -1
  276. package/lib/telemetry/cli-help-trace.js +1 -1
  277. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  278. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  279. package/lib/telemetry/send-cli-trace-log.js +1 -1
  280. package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
  281. package/lib/utils/ai_config.js +1 -1
  282. package/lib/utils/apply-jq-filter.js +1 -1
  283. package/lib/utils/cdn-config.js +1 -1
  284. package/lib/utils/check-sdk-version.js +1 -1
  285. package/lib/utils/cli-version-check.js +1 -1
  286. package/lib/utils/cli-version-policy.js +1 -1
  287. package/lib/utils/config.js +1 -1
  288. package/lib/utils/entity-with-id.js +1 -1
  289. package/lib/utils/file-utils.js +1 -1
  290. package/lib/utils/guides-cdn.js +1 -1
  291. package/lib/utils/http-client.js +1 -1
  292. package/lib/utils/is-non-interactive.js +1 -1
  293. package/lib/utils/logger.js +1 -1
  294. package/lib/utils/params.js +1 -1
  295. package/lib/utils/platform.js +1 -1
  296. package/lib/utils/sleep.js +1 -1
  297. package/lib/utils/template-replacer.js +1 -1
  298. package/lib/utils/update-notice.js +1 -1
  299. package/lib/utils/version.js +1 -1
  300. package/lib/utils/with-active-cookie.js +1 -1
  301. package/lib/utils/write-cli-side-channel.js +1 -1
  302. package/package.json +1 -2
  303. package/skills/rabetbase/SKILL.md +10 -5
  304. package/skills/rabetbase/guides/frontend-development.md +2 -0
  305. package/skills/rabetbase/guides/sdk-client-generation.md +3 -2
  306. package/skills/rabetbase/guides/typescript-sdk.md +42 -0
  307. package/skills/rabetbase/references/rabetbase-api-pull.md +5 -3
  308. package/skills/rabetbase/references/rabetbase-config.md +9 -5
  309. package/skills/rabetbase/references/rabetbase-init.md +11 -5
  310. package/skills/rabetbase/references/rabetbase-project-create.md +6 -5
  311. package/skills/rabetbase.manifest.json +3 -3
  312. package/templates/README.md +13 -17
@@ -1 +1 @@
1
- (function(_0xfeba6e,_0x8a8121){const _0x37d3b9=a217_0x4e46,_0x59be9a=_0xfeba6e();while(!![]){try{const _0x2b4693=-parseInt(_0x37d3b9(0xc0))/0x1*(parseInt(_0x37d3b9(0xc9))/0x2)+parseInt(_0x37d3b9(0xca))/0x3+-parseInt(_0x37d3b9(0xd7))/0x4*(parseInt(_0x37d3b9(0xbf))/0x5)+parseInt(_0x37d3b9(0xdd))/0x6+parseInt(_0x37d3b9(0xe1))/0x7+-parseInt(_0x37d3b9(0xba))/0x8*(parseInt(_0x37d3b9(0xe2))/0x9)+parseInt(_0x37d3b9(0xcc))/0xa*(parseInt(_0x37d3b9(0xdb))/0xb);if(_0x2b4693===_0x8a8121)break;else _0x59be9a['push'](_0x59be9a['shift']());}catch(_0x3d20bf){_0x59be9a['push'](_0x59be9a['shift']());}}}(a217_0x5c89,0xaf8cf));function a217_0x5c89(){const _0x4b462e=['entries','length','PAGE_SIZE','projectConfig','string','2053894IXPnOa','690726MGKFRY','ACCESS_KEY','1590mgenzE','APP','app','high-risk-write','apiDir','find','locale','globalConfig','keys','true','read','1730276maEuOu','format','defaultApp','FORMAT','216689hjbsSC','accessKey','3713748DGzTGz','env','production','cookie','1366512ULPfzZ','3398544dYxedD','trim','RISK_LEVEL','pageSize','24EdBVCq','riskLevel','object','apps','daily','15KdTuKj','1WothXf','VERBOSE','write','appcode'];a217_0x5c89=function(){return _0x4b462e;};return a217_0x5c89();}import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{isDaily,normalizeEnv}from'../constant/env.js';import{normalizeLegacyOutputFormat,riskLevelOrder}from'../framework/types.js';function a217_0x4e46(_0x1d0253,_0x54f4aa){_0x1d0253=_0x1d0253-0xb8;const _0x5c89f6=a217_0x5c89();let _0x4e469e=_0x5c89f6[_0x1d0253];return _0x4e469e;}function stringConfigValue(_0x1b9aa1){const _0x37bfe5=a217_0x4e46;return typeof _0x1b9aa1===_0x37bfe5(0xc8)&&_0x1b9aa1[_0x37bfe5(0xe3)]()?_0x1b9aa1['trim']():undefined;}function appProfiles(_0x387c1c){const _0x226873=a217_0x4e46;return _0x387c1c[_0x226873(0xbd)]&&typeof _0x387c1c[_0x226873(0xbd)]===_0x226873(0xbc)?_0x387c1c[_0x226873(0xbd)]:{};}function resolveDefaultAppName(_0x5d9ec5){const _0x49b104=a217_0x4e46,_0x27e1b8=stringConfigValue(_0x5d9ec5[_0x49b104(0xd9)]);if(_0x27e1b8)return _0x27e1b8;const _0x359b56=Object[_0x49b104(0xd4)](appProfiles(_0x5d9ec5));return _0x359b56[_0x49b104(0xc5)]===0x1?_0x359b56[0x0]:undefined;}function resolveTopLevelAppCode(_0x42918a){const _0x432174=a217_0x4e46;return stringConfigValue(_0x42918a['appcode'])||stringConfigValue(_0x42918a[_0x432174(0xce)]);}function normalizeRiskCeiling(_0x43c75e){const _0x1f85a5=a217_0x4e46;if(_0x43c75e===undefined||_0x43c75e===null)return undefined;if(_0x43c75e===_0x1f85a5(0xd6)||_0x43c75e===_0x1f85a5(0xc2)||_0x43c75e===_0x1f85a5(0xcf))return _0x43c75e;return _0x1f85a5(0xd6);}function resolveRiskCeiling(..._0x4126d5){const _0x3b87bf=a217_0x4e46;let _0x3f00b3;for(const _0xa2840e of _0x4126d5){const _0x39f109=normalizeRiskCeiling(_0xa2840e);_0x39f109&&(!_0x3f00b3||riskLevelOrder(_0x39f109)<riskLevelOrder(_0x3f00b3))&&(_0x3f00b3=_0x39f109);}return _0x3f00b3??DEFAULT_CONFIG_VALUES[_0x3b87bf(0xbb)];}export function resolveAppConfig({raw:_0x37240d,flags:_0x22f03d,layers:_0x1d3caf,readEnv:_0x8fde53}){const _0x197cac=a217_0x4e46,_0x58819d=_0x1d3caf?.['projectConfig']??{},_0x9f93c4=_0x1d3caf?.[_0x197cac(0xd3)]??{},_0x138fe0=!!_0x1d3caf?.['projectPath']||Object[_0x197cac(0xd4)](_0x58819d)[_0x197cac(0xc5)]>0x0,_0x2faad7=!_0x138fe0,_0x5066df=_0x138fe0?resolveDefaultAppName(_0x58819d):undefined,_0x51a92f=_0x2faad7?resolveDefaultAppName(_0x9f93c4):undefined,_0x446336=stringConfigValue(_0x22f03d[_0x197cac(0xce)]),_0xa426c4=_0x8fde53(_0x197cac(0xcd)),_0x2bb0c2={};if(_0x37240d[_0x197cac(0xbd)]&&typeof _0x37240d[_0x197cac(0xbd)]===_0x197cac(0xbc))for(const [_0x3479b0,_0x4a1677]of Object[_0x197cac(0xc4)](_0x37240d[_0x197cac(0xbd)])){_0x4a1677&&typeof _0x4a1677===_0x197cac(0xbc)&&_0x4a1677[_0x197cac(0xc3)]&&(_0x2bb0c2[_0x3479b0]=_0x4a1677);}const _0x5d9d86=_0x5066df||_0x51a92f||resolveDefaultAppName(_0x37240d),_0x453e0c=Object[_0x197cac(0xd4)](_0x2bb0c2)[_0x197cac(0xc5)]>0x0,_0x116011=_0x446336||_0x5066df||_0xa426c4||_0x51a92f||_0x5d9d86||undefined,_0x3a4ff2=stringConfigValue(_0x22f03d['appcode']),_0x4a98e1=_0x3a4ff2?Object[_0x197cac(0xc4)](_0x2bb0c2)[_0x197cac(0xd1)](([,_0x5de7e8])=>_0x5de7e8?.[_0x197cac(0xc3)]===_0x3a4ff2):undefined,_0x2d022f=_0x4a98e1?.[0x0],_0x5ae249=_0x4a98e1?.[0x1],_0x44e1af=_0x3a4ff2?_0x2d022f:_0x116011;let _0x5730f6=_0x44e1af&&_0x2bb0c2[_0x44e1af]?_0x2bb0c2[_0x44e1af]:undefined;_0x3a4ff2&&_0x5ae249&&(_0x5730f6=_0x5ae249);const _0x136918=_0x3a4ff2?_0x5ae249??_0x5730f6:_0x5730f6,_0x2e55f4=!_0x446336&&!_0x5066df&&_0xa426c4&&_0x44e1af===_0xa426c4,_0x4f2298=_0x446336||(_0x2e55f4?_0xa426c4:undefined)||(_0x3a4ff2?_0x2d022f:undefined),_0x26cd9b=_0x136918?.[_0x197cac(0xc3)],_0x591841=_0x138fe0?resolveTopLevelAppCode(_0x58819d):undefined,_0x39dace=_0x2faad7?resolveTopLevelAppCode(_0x9f93c4):undefined,_0x40ddae=_0x446336||_0x5066df?_0x26cd9b:undefined,_0x78aaca=!_0x446336&&!_0x5066df?_0x26cd9b:undefined,_0x30a832=_0x3a4ff2||_0x40ddae||_0x591841||_0x78aaca||_0x39dace||undefined,_0x17a891=_0x138fe0?stringConfigValue(_0x58819d[_0x197cac(0xde)]):undefined,_0x2f04bf=_0x2faad7?stringConfigValue(_0x9f93c4[_0x197cac(0xde)]):undefined,_0x1ec201=_0x22f03d['env']||_0x136918?.['env']||_0x17a891||_0x8fde53('ENV')||_0x2f04bf||_0x37240d[_0x197cac(0xde)]||DEFAULT_CONFIG_VALUES['env'],_0x3b4e66=_0x136918?.[_0x197cac(0xd2)]||_0x37240d[_0x197cac(0xd2)]||DEFAULT_CONFIG_VALUES[_0x197cac(0xd2)],_0x43a641=_0x8fde53('COOKIE')||_0x136918?.[_0x197cac(0xe0)]||_0x37240d[_0x197cac(0xe0)]||undefined,_0x5e2b5b=_0x8fde53(_0x197cac(0xcb))||_0x136918?.[_0x197cac(0xdc)]||_0x37240d[_0x197cac(0xdc)]||undefined,_0x456eee=_0x22f03d['format']||_0x8fde53(_0x197cac(0xda))||_0x136918?.['format']||_0x37240d[_0x197cac(0xd8)],_0x956e2e=normalizeLegacyOutputFormat(_0x456eee),_0x295aba=_0x8fde53(_0x197cac(0xc6))||_0x136918?.['pageSize']||_0x37240d[_0x197cac(0xb9)],_0x3ddb2a=_0x295aba?Number(_0x295aba)||undefined:undefined,_0x41ffb6=_0x1d3caf?[_0x1d3caf['globalConfig'][_0x197cac(0xbb)],_0x1d3caf[_0x197cac(0xc7)][_0x197cac(0xbb)]]:[_0x37240d[_0x197cac(0xbb)]],_0x867d31=resolveRiskCeiling(..._0x41ffb6,_0x136918?.[_0x197cac(0xbb)]),_0x321475=resolveRiskCeiling(_0x867d31,_0x8fde53(_0x197cac(0xb8))),_0x1a6052=_0x8fde53(_0x197cac(0xc1)),_0x20ab63=_0x1a6052==='1'||_0x1a6052===_0x197cac(0xd5),_0xdafa3d=_0x136918?.[_0x197cac(0xd0)]||_0x37240d['apiDir']||DEFAULT_CONFIG_VALUES['apiDir'],_0x2c0b1e=isDaily(normalizeEnv(String(_0x1ec201)))?_0x197cac(0xbe):_0x197cac(0xdf);return{'appCode':typeof _0x30a832===_0x197cac(0xc8)&&_0x30a832[_0x197cac(0xe3)]()?_0x30a832[_0x197cac(0xe3)]():undefined,'env':_0x2c0b1e,'locale':_0x3b4e66,'cookie':_0x43a641,'accessKey':_0x5e2b5b,'format':_0x956e2e,'pageSize':_0x3ddb2a,'riskLevel':_0x321475,'verbose':_0x20ab63,'apiDir':_0xdafa3d,'apps':_0x2bb0c2,'defaultApp':_0x5d9d86,'currentApp':_0x453e0c?_0x44e1af:undefined,'explicitAppName':_0x4f2298};}
1
+ (function(_0x36f8b1,_0x14c361){const _0x56b589=a219_0x45bf,_0x45334e=_0x36f8b1();while(!![]){try{const _0x81e1f2=parseInt(_0x56b589(0x117))/0x1+-parseInt(_0x56b589(0x11c))/0x2*(-parseInt(_0x56b589(0x129))/0x3)+parseInt(_0x56b589(0x11b))/0x4+-parseInt(_0x56b589(0x12b))/0x5+-parseInt(_0x56b589(0x126))/0x6+parseInt(_0x56b589(0x114))/0x7*(-parseInt(_0x56b589(0x123))/0x8)+-parseInt(_0x56b589(0x113))/0x9;if(_0x81e1f2===_0x14c361)break;else _0x45334e['push'](_0x45334e['shift']());}catch(_0x5d5b4c){_0x45334e['push'](_0x45334e['shift']());}}}(a219_0x1e4c,0x3a937));function a219_0x1e4c(){const _0x1973b0=['ACCESS_KEY','115296ffzWRs','cookie','production','843534uSqrCm','ENV','write','282195ZQWuYC','locale','856100tUTYFV','appcode','projectConfig','object','app','daily','keys','accessKey','riskLevel','find','env','trim','APP','COOKIE','1411659npUUmB','63LGmYMb','globalConfig','entries','404032puywxo','RISK_LEVEL','string','pageSize','608272KVtbkg','6qkXCmz','FORMAT','length','apps','format','high-risk-write'];a219_0x1e4c=function(){return _0x1973b0;};return a219_0x1e4c();}import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';function a219_0x45bf(_0x185778,_0x3bfc3e){_0x185778=_0x185778-0x109;const _0x1e4cbf=a219_0x1e4c();let _0x45bfc9=_0x1e4cbf[_0x185778];return _0x45bfc9;}import{isDaily,normalizeEnv}from'../constant/env.js';import{normalizeLegacyOutputFormat,riskLevelOrder}from'../framework/types.js';function stringConfigValue(_0x3233f2){const _0x30b657=a219_0x45bf;return typeof _0x3233f2===_0x30b657(0x119)&&_0x3233f2[_0x30b657(0x110)]()?_0x3233f2['trim']():undefined;}function appProfiles(_0x1f383e){const _0x550adc=a219_0x45bf;return _0x1f383e[_0x550adc(0x11f)]&&typeof _0x1f383e[_0x550adc(0x11f)]==='object'?_0x1f383e['apps']:{};}function resolveDefaultAppName(_0x56b3ef){const _0x224abc=stringConfigValue(_0x56b3ef['defaultApp']);if(_0x224abc)return _0x224abc;const _0x4b44fd=Object['keys'](appProfiles(_0x56b3ef));return _0x4b44fd['length']===0x1?_0x4b44fd[0x0]:undefined;}function resolveTopLevelAppCode(_0x362d7a){const _0x2310a4=a219_0x45bf;return stringConfigValue(_0x362d7a[_0x2310a4(0x12c)])||stringConfigValue(_0x362d7a[_0x2310a4(0x109)]);}function normalizeRiskCeiling(_0x499ae2){const _0x84c89c=a219_0x45bf;if(_0x499ae2===undefined||_0x499ae2===null)return undefined;if(_0x499ae2==='read'||_0x499ae2===_0x84c89c(0x128)||_0x499ae2===_0x84c89c(0x121))return _0x499ae2;return'read';}function resolveRiskCeiling(..._0xde74e4){const _0x48488c=a219_0x45bf;let _0xfccb57;for(const _0x4b4dc6 of _0xde74e4){const _0x1e93cf=normalizeRiskCeiling(_0x4b4dc6);_0x1e93cf&&(!_0xfccb57||riskLevelOrder(_0x1e93cf)<riskLevelOrder(_0xfccb57))&&(_0xfccb57=_0x1e93cf);}return _0xfccb57??DEFAULT_CONFIG_VALUES[_0x48488c(0x10d)];}export function resolveAppConfig({raw:_0xd10c8d,flags:_0x1fe1c2,layers:_0x5ec60a,readEnv:_0x59a549}){const _0x3a8c03=a219_0x45bf,_0x479c95=_0x5ec60a?.[_0x3a8c03(0x12d)]??{},_0x373f50=_0x5ec60a?.[_0x3a8c03(0x115)]??{},_0x2fd9e1=!!_0x5ec60a?.['projectPath']||Object[_0x3a8c03(0x10b)](_0x479c95)[_0x3a8c03(0x11e)]>0x0,_0x5eb9f5=!_0x2fd9e1,_0x3fe34b=_0x2fd9e1?resolveDefaultAppName(_0x479c95):undefined,_0x56f25b=_0x5eb9f5?resolveDefaultAppName(_0x373f50):undefined,_0x4fe1d0=stringConfigValue(_0x1fe1c2[_0x3a8c03(0x109)]),_0x562d22=_0x59a549(_0x3a8c03(0x111)),_0x233450={};if(_0xd10c8d[_0x3a8c03(0x11f)]&&typeof _0xd10c8d[_0x3a8c03(0x11f)]===_0x3a8c03(0x12e))for(const [_0x1f15e5,_0x4cbfcb]of Object[_0x3a8c03(0x116)](_0xd10c8d[_0x3a8c03(0x11f)])){_0x4cbfcb&&typeof _0x4cbfcb===_0x3a8c03(0x12e)&&_0x4cbfcb[_0x3a8c03(0x12c)]&&(_0x233450[_0x1f15e5]=_0x4cbfcb);}const _0x4de257=_0x3fe34b||_0x56f25b||resolveDefaultAppName(_0xd10c8d),_0x1d9334=Object[_0x3a8c03(0x10b)](_0x233450)[_0x3a8c03(0x11e)]>0x0,_0x4ecdc4=_0x4fe1d0||_0x3fe34b||_0x562d22||_0x56f25b||_0x4de257||undefined,_0x2a525f=stringConfigValue(_0x1fe1c2['appcode']),_0x310948=_0x2a525f?Object['entries'](_0x233450)[_0x3a8c03(0x10e)](([,_0x91dff3])=>_0x91dff3?.['appcode']===_0x2a525f):undefined,_0x12f741=_0x310948?.[0x0],_0x78b6fd=_0x310948?.[0x1],_0x1383dc=_0x2a525f?_0x12f741:_0x4ecdc4;let _0x11ae5a=_0x1383dc&&_0x233450[_0x1383dc]?_0x233450[_0x1383dc]:undefined;_0x2a525f&&_0x78b6fd&&(_0x11ae5a=_0x78b6fd);const _0xe73f2=_0x2a525f?_0x78b6fd??_0x11ae5a:_0x11ae5a,_0xe2cab3=!_0x4fe1d0&&!_0x3fe34b&&_0x562d22&&_0x1383dc===_0x562d22,_0x3f2aaf=_0x4fe1d0||(_0xe2cab3?_0x562d22:undefined)||(_0x2a525f?_0x12f741:undefined),_0x3b903a=_0xe73f2?.[_0x3a8c03(0x12c)],_0x5b5223=_0x2fd9e1?resolveTopLevelAppCode(_0x479c95):undefined,_0x43bf5a=_0x5eb9f5?resolveTopLevelAppCode(_0x373f50):undefined,_0x50d515=_0x4fe1d0||_0x3fe34b?_0x3b903a:undefined,_0x3485a6=!_0x4fe1d0&&!_0x3fe34b?_0x3b903a:undefined,_0x1d95c8=_0x2a525f||_0x50d515||_0x5b5223||_0x3485a6||_0x43bf5a||undefined,_0x1362ab=_0x2fd9e1?stringConfigValue(_0x479c95[_0x3a8c03(0x10f)]):undefined,_0xce649e=_0x5eb9f5?stringConfigValue(_0x373f50[_0x3a8c03(0x10f)]):undefined,_0x27584e=_0x1fe1c2[_0x3a8c03(0x10f)]||_0xe73f2?.[_0x3a8c03(0x10f)]||_0x1362ab||_0x59a549(_0x3a8c03(0x127))||_0xce649e||_0xd10c8d[_0x3a8c03(0x10f)]||DEFAULT_CONFIG_VALUES['env'],_0x107a40=_0xe73f2?.[_0x3a8c03(0x12a)]||_0xd10c8d[_0x3a8c03(0x12a)]||DEFAULT_CONFIG_VALUES[_0x3a8c03(0x12a)],_0xa87033=_0x59a549(_0x3a8c03(0x112))||_0xe73f2?.[_0x3a8c03(0x124)]||_0xd10c8d[_0x3a8c03(0x124)]||undefined,_0x4db095=_0x59a549(_0x3a8c03(0x122))||_0xe73f2?.['accessKey']||_0xd10c8d[_0x3a8c03(0x10c)]||undefined,_0xcb953c=_0x1fe1c2[_0x3a8c03(0x120)]||_0x59a549(_0x3a8c03(0x11d))||_0xe73f2?.[_0x3a8c03(0x120)]||_0xd10c8d[_0x3a8c03(0x120)],_0x4c4880=normalizeLegacyOutputFormat(_0xcb953c),_0x7e992e=_0x59a549('PAGE_SIZE')||_0xe73f2?.['pageSize']||_0xd10c8d[_0x3a8c03(0x11a)],_0x37f610=_0x7e992e?Number(_0x7e992e)||undefined:undefined,_0x25af11=_0x5ec60a?[_0x5ec60a['globalConfig'][_0x3a8c03(0x10d)],_0x5ec60a[_0x3a8c03(0x12d)][_0x3a8c03(0x10d)]]:[_0xd10c8d[_0x3a8c03(0x10d)]],_0x1688c1=resolveRiskCeiling(..._0x25af11,_0xe73f2?.[_0x3a8c03(0x10d)]),_0x34d640=resolveRiskCeiling(_0x1688c1,_0x59a549(_0x3a8c03(0x118))),_0x55c8b0=_0x59a549('VERBOSE'),_0x368426=_0x55c8b0==='1'||_0x55c8b0==='true',_0xaa0133=_0xe73f2?.['apiDir']||_0xd10c8d['apiDir']||DEFAULT_CONFIG_VALUES['apiDir'],_0xb12cbe=isDaily(normalizeEnv(String(_0x27584e)))?_0x3a8c03(0x10a):_0x3a8c03(0x125);return{'appCode':typeof _0x1d95c8===_0x3a8c03(0x119)&&_0x1d95c8[_0x3a8c03(0x110)]()?_0x1d95c8[_0x3a8c03(0x110)]():undefined,'env':_0xb12cbe,'locale':_0x107a40,'cookie':_0xa87033,'accessKey':_0x4db095,'format':_0x4c4880,'pageSize':_0x37f610,'riskLevel':_0x34d640,'verbose':_0x368426,'apiDir':_0xaa0133,'apps':_0x233450,'defaultApp':_0x4de257,'currentApp':_0x1d9334?_0x1383dc:undefined,'explicitAppName':_0x3f2aaf};}
@@ -1 +1 @@
1
- function a218_0x3417(_0x1f9b33,_0x47bdef){_0x1f9b33=_0x1f9b33-0x11e;const _0x54e06d=a218_0x54e0();let _0x3417bd=_0x54e06d[_0x1f9b33];return _0x3417bd;}(function(_0x49a892,_0xde122f){const _0x4a5b62=a218_0x3417,_0x3b1627=_0x49a892();while(!![]){try{const _0xa5c7a5=-parseInt(_0x4a5b62(0x122))/0x1*(-parseInt(_0x4a5b62(0x129))/0x2)+-parseInt(_0x4a5b62(0x12b))/0x3+parseInt(_0x4a5b62(0x121))/0x4*(parseInt(_0x4a5b62(0x128))/0x5)+parseInt(_0x4a5b62(0x120))/0x6*(-parseInt(_0x4a5b62(0x11f))/0x7)+-parseInt(_0x4a5b62(0x124))/0x8*(-parseInt(_0x4a5b62(0x126))/0x9)+-parseInt(_0x4a5b62(0x11e))/0xa*(-parseInt(_0x4a5b62(0x12c))/0xb)+parseInt(_0x4a5b62(0x127))/0xc;if(_0xa5c7a5===_0xde122f)break;else _0x3b1627['push'](_0x3b1627['shift']());}catch(_0x220202){_0x3b1627['push'](_0x3b1627['shift']());}}}(a218_0x54e0,0x7972f));import{getIsSessionValid}from'../auth/is-session-valid.js';import{CliErrors}from'../errors.js';function a218_0x54e0(){const _0x2a9154=['22850FGEFuu','60226jRBLUX','../auth/get-cookie.js','2829336MTBiwU','3079714Xrajka','10urZDvS','28QKtEaU','1434102NWyPbU','752xbavwA','9fRRvwk','cookie','41304uOHJNA','authRequired','54HrpLHk','11466072wPxSeh'];a218_0x54e0=function(){return _0x2a9154;};return a218_0x54e0();}export async function buildAuth(_0x36ff5a){const _0x46af83=a218_0x3417,{getCookie:_0x418935}=await import(_0x46af83(0x12a)),_0x1b4044=_0x36ff5a[_0x46af83(0x123)]||_0x418935(),_0x148ca0=_0x1b4044?await getIsSessionValid():![];return{'cookie':_0x1b4044,'isLoggedIn':_0x148ca0,async 'getOrLogin'(){const _0x4907f1=_0x46af83;if(_0x1b4044&&_0x148ca0)return _0x1b4044;throw CliErrors[_0x4907f1(0x125)]();}};}
1
+ (function(_0x255b8f,_0xa8d8b2){const _0xfa5574=a220_0x53f5,_0x124aab=_0x255b8f();while(!![]){try{const _0x30ecea=parseInt(_0xfa5574(0x101))/0x1*(-parseInt(_0xfa5574(0xfe))/0x2)+-parseInt(_0xfa5574(0x109))/0x3*(parseInt(_0xfa5574(0xff))/0x4)+-parseInt(_0xfa5574(0xfd))/0x5*(-parseInt(_0xfa5574(0x104))/0x6)+parseInt(_0xfa5574(0x105))/0x7*(-parseInt(_0xfa5574(0x100))/0x8)+parseInt(_0xfa5574(0x108))/0x9*(parseInt(_0xfa5574(0x106))/0xa)+-parseInt(_0xfa5574(0x107))/0xb*(parseInt(_0xfa5574(0xfa))/0xc)+-parseInt(_0xfa5574(0xfb))/0xd*(-parseInt(_0xfa5574(0xfc))/0xe);if(_0x30ecea===_0xa8d8b2)break;else _0x124aab['push'](_0x124aab['shift']());}catch(_0xf387ff){_0x124aab['push'](_0x124aab['shift']());}}}(a220_0x4bb9,0xbe639));function a220_0x4bb9(){const _0x5244be=['17022RyqoHb','8758855xPPDdm','3760PsfsDy','22OFcUOm','6912iszSBA','558429rYFmDQ','5973108uyIegT','7199751pZbzWh','98fMFjkG','505GExDKo','10DIxtPF','4uhbdUh','8aaQXtC','247867Smhitq','authRequired','../auth/get-cookie.js'];a220_0x4bb9=function(){return _0x5244be;};return a220_0x4bb9();}import{getIsSessionValid}from'../auth/is-session-valid.js';import{CliErrors}from'../errors.js';function a220_0x53f5(_0x363300,_0x4b54eb){_0x363300=_0x363300-0xfa;const _0x4bb925=a220_0x4bb9();let _0x53f544=_0x4bb925[_0x363300];return _0x53f544;}export async function buildAuth(_0x4a3a24){const _0x33a1f8=a220_0x53f5,{getCookie:_0x3ffea9}=await import(_0x33a1f8(0x103)),_0xffa93a=_0x4a3a24['cookie']||_0x3ffea9(),_0xe2365b=_0xffa93a?await getIsSessionValid():![];return{'cookie':_0xffa93a,'isLoggedIn':_0xe2365b,async 'getOrLogin'(){const _0x1a7778=_0x33a1f8;if(_0xffa93a&&_0xe2365b)return _0xffa93a;throw CliErrors[_0x1a7778(0x102)]();}};}
@@ -1 +1 @@
1
- const a219_0x2386f7=a219_0x4cfb;(function(_0x3dfdbd,_0x4f4c8e){const _0x5680c6=a219_0x4cfb,_0x25b716=_0x3dfdbd();while(!![]){try{const _0x555acb=-parseInt(_0x5680c6(0x142))/0x1+parseInt(_0x5680c6(0x11e))/0x2*(-parseInt(_0x5680c6(0x11f))/0x3)+-parseInt(_0x5680c6(0x148))/0x4*(-parseInt(_0x5680c6(0x12d))/0x5)+parseInt(_0x5680c6(0x13b))/0x6*(-parseInt(_0x5680c6(0x149))/0x7)+-parseInt(_0x5680c6(0x147))/0x8+parseInt(_0x5680c6(0x12a))/0x9+parseInt(_0x5680c6(0x137))/0xa*(parseInt(_0x5680c6(0x146))/0xb);if(_0x555acb===_0x4f4c8e)break;else _0x25b716['push'](_0x25b716['shift']());}catch(_0x1ac4d1){_0x25b716['push'](_0x25b716['shift']());}}}(a219_0x2c80,0x1b9d7));import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{dirname,parse,resolve}from'node:path';import{homedir}from'node:os';import{CLI_BIN_NAME}from'../constant/cli.js';export const NEW_CONFIG_NAME=a219_0x2386f7(0x135);export const CONFIG_NAMES=[NEW_CONFIG_NAME];function a219_0x2c80(){const _0x10f265=['264738TMxjnb','app','locale','riskLevel','apps','kbDomain','\x0a\x20\x20','67312MUJojo','silent','appcode','defaultApp','7062AafUYF','1503856LFECig','13204PRnkAH','35FahHGd','pageSize','missing','Project','keys','migrated','cookie','cwd','skillDomain','projectPath','Global','126658wmBtfG','9kbztwY','empty','warn','length','utf8','env','get','accessKey','stringify','config','appDomain','261540NEApgV','status','message','5kYTpJV','format','error','.tmp','data','parse','inherit','trim','.rabetbase.json','set','11630txmOIU','apiDomain','object','string'];a219_0x2c80=function(){return _0x10f265;};return a219_0x2c80();}const normalizedWriteCache=new Map();export function resolveConfigPath(_0x21ee6d){for(const _0x3c522a of CONFIG_NAMES){const _0x8746ac=resolve(_0x21ee6d,_0x3c522a);if(existsSync(_0x8746ac))return _0x8746ac;}return undefined;}export function findProjectRootDirectory(_0x33fd98=process[a219_0x2386f7(0x11a)]()){let _0x2ff05b=resolve(_0x33fd98);const {root:_0x4b850c}=parse(_0x2ff05b),_0x40fe12=homedir();while(!![]){if(resolveConfigPath(_0x2ff05b)){if(_0x2ff05b===_0x40fe12)break;return _0x2ff05b;}if(_0x2ff05b===_0x4b850c||_0x2ff05b===_0x40fe12)break;const _0x82bd18=dirname(_0x2ff05b);if(_0x82bd18===_0x2ff05b)break;_0x2ff05b=_0x82bd18;}return resolve(_0x33fd98);}export function getProjectConfigPath(){const _0xc9f308=a219_0x2386f7;return resolveConfigPath(process[_0xc9f308(0x11a)]());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0x22ff83){const _0x3796e0=a219_0x2386f7;if(!existsSync(_0x22ff83))return{'status':'missing'};try{const _0xfc6ab5=readFileSync(_0x22ff83,{'encoding':'utf8'});if(!_0xfc6ab5?.['trim']())return{'status':_0x3796e0(0x120)};const _0x243cf5=JSON[_0x3796e0(0x132)](_0xfc6ab5);return{'status':'ok','data':_0x243cf5};}catch(_0x5ca72e){return{'status':'error','message':_0x5ca72e instanceof Error?_0x5ca72e[_0x3796e0(0x12c)]:String(_0x5ca72e)};}}function parseCliConfigJsonFile(_0x22ba52,_0x4c146d,_0x1607eb){const _0x24372a=a219_0x2386f7,_0x11e6d1=inspectCliConfigJsonFile(_0x22ba52);if(_0x11e6d1[_0x24372a(0x12b)]===_0x24372a(0x14b)||_0x11e6d1['status']===_0x24372a(0x120))return{};if(_0x11e6d1[_0x24372a(0x12b)]==='ok')return _0x11e6d1[_0x24372a(0x131)];return _0x4c146d===_0x24372a(0x121)&&_0x1607eb&&console[_0x24372a(0x12f)](CLI_BIN_NAME+':\x20'+_0x1607eb+'\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20'+_0x22ba52+_0x24372a(0x141)+_0x11e6d1[_0x24372a(0x12c)]),{};}function a219_0x4cfb(_0x3b3b33,_0x48fafc){_0x3b3b33=_0x3b3b33-0x117;const _0x2c8052=a219_0x2c80();let _0x4cfb05=_0x2c8052[_0x3b3b33];return _0x4cfb05;}function normalizeLegacyConfigShape(_0x1d6a09){const _0x46bc78=a219_0x2386f7;if(!_0x1d6a09||typeof _0x1d6a09!==_0x46bc78(0x139))return{'config':{},'migrated':![]};const _0x2e6ff1={..._0x1d6a09},_0x500c6d=_0x2e6ff1[_0x46bc78(0x13f)]&&typeof _0x2e6ff1[_0x46bc78(0x13f)]==='object'?{..._0x2e6ff1['apps']}:{},_0x11f453=Object[_0x46bc78(0x117)](_0x500c6d)[_0x46bc78(0x122)],_0x4f48fb=_0x2e6ff1['appcode']||_0x2e6ff1[_0x46bc78(0x13c)];let _0x12d7a0=![];if(_0x4f48fb&&_0x11f453===0x0){const _0x3b1e7e=typeof _0x2e6ff1[_0x46bc78(0x145)]===_0x46bc78(0x13a)&&_0x2e6ff1[_0x46bc78(0x145)]['trim']()?_0x2e6ff1['defaultApp']:String(_0x4f48fb)['trim']();_0x500c6d[_0x3b1e7e]={'appcode':String(_0x4f48fb)[_0x46bc78(0x134)](),..._0x2e6ff1['env']!=null?{'env':_0x2e6ff1[_0x46bc78(0x124)]}:{},..._0x2e6ff1['apiDir']!=null?{'apiDir':_0x2e6ff1['apiDir']}:{},..._0x2e6ff1['cookie']!=null?{'cookie':_0x2e6ff1[_0x46bc78(0x119)]}:{},..._0x2e6ff1[_0x46bc78(0x126)]!=null?{'accessKey':_0x2e6ff1[_0x46bc78(0x126)]}:{},..._0x2e6ff1[_0x46bc78(0x12e)]!=null?{'format':_0x2e6ff1['format']}:{},..._0x2e6ff1[_0x46bc78(0x14a)]!=null?{'pageSize':_0x2e6ff1[_0x46bc78(0x14a)]}:{},..._0x2e6ff1[_0x46bc78(0x13e)]!=null?{'riskLevel':_0x2e6ff1['riskLevel']}:{},..._0x2e6ff1['locale']!=null?{'locale':_0x2e6ff1['locale']}:{}},_0x2e6ff1[_0x46bc78(0x13f)]=_0x500c6d,delete _0x2e6ff1['defaultApp'],_0x12d7a0=!![];}return(_0x46bc78(0x144)in _0x2e6ff1||'app'in _0x2e6ff1)&&(delete _0x2e6ff1[_0x46bc78(0x144)],delete _0x2e6ff1[_0x46bc78(0x13c)],_0x12d7a0=!![]),{'config':_0x2e6ff1,'migrated':_0x12d7a0};}function writeNormalizedConfigIfNeeded(_0x2b9f0d,_0x212a98){const _0x5b8257=a219_0x2386f7,_0xc3b825=JSON[_0x5b8257(0x127)](_0x212a98,null,0x2)+'\x0a';if(normalizedWriteCache[_0x5b8257(0x125)](_0x2b9f0d)===_0xc3b825)return;writeConfigFile(_0x2b9f0d,_0x212a98),normalizedWriteCache[_0x5b8257(0x136)](_0x2b9f0d,_0xc3b825);}function parseAndNormalizeConfig(_0x312e63,_0x19a162,_0x3439f1){const _0x22a00e=a219_0x2386f7,_0x4484ee=parseCliConfigJsonFile(_0x312e63,_0x19a162,_0x3439f1),_0x45d7df=normalizeLegacyConfigShape(_0x4484ee);if(_0x45d7df[_0x22a00e(0x118)])try{writeNormalizedConfigIfNeeded(_0x312e63,_0x45d7df[_0x22a00e(0x128)]);}catch{}return _0x45d7df['config'];}export function loadRawConfigLayers(_0x36a5b8){const _0x5d67aa=a219_0x2386f7;let _0x50c396={},_0x216123={};const _0x53ff69=resolveConfigPath(homedir());_0x53ff69&&(_0x50c396=parseAndNormalizeConfig(_0x53ff69,_0x5d67aa(0x121),_0x5d67aa(0x11d)));const _0xd08feb=_0x36a5b8??findProjectRootDirectory(),_0x149f33=resolveConfigPath(_0xd08feb);return _0x149f33&&(_0x216123=parseAndNormalizeConfig(_0x149f33,_0x5d67aa(0x121),_0x5d67aa(0x14c))),{'globalPath':_0x53ff69,'projectPath':_0x149f33,'globalConfig':_0x50c396,'projectConfig':_0x216123};}const INHERIT_WHITELIST=[a219_0x2386f7(0x119),a219_0x2386f7(0x126),a219_0x2386f7(0x13d),a219_0x2386f7(0x12e),a219_0x2386f7(0x13e),a219_0x2386f7(0x14a),'region','userDomain',a219_0x2386f7(0x138),'runtimeDomain',a219_0x2386f7(0x11b),a219_0x2386f7(0x140),a219_0x2386f7(0x129)];export function mergeRawConfigLayers(_0x5b6284){const _0x157141=a219_0x2386f7,{globalConfig:_0x5d7b01,projectConfig:_0x1606b0}=_0x5b6284,_0x5a2067=!!_0x5b6284[_0x157141(0x11c)]||Object[_0x157141(0x117)](_0x1606b0)['length']>0x0;if(!_0x5a2067)return mergeGlobalOnly(_0x5d7b01);return mergeProjectFirst(_0x5d7b01,_0x1606b0);}function mergeGlobalOnly(_0x44114a){const _0x18a613=a219_0x2386f7,_0xad7141={..._0x44114a};delete _0xad7141[_0x18a613(0x133)];const _0x133313=_0x44114a[_0x18a613(0x13f)]&&typeof _0x44114a[_0x18a613(0x13f)]===_0x18a613(0x139)?_0x44114a[_0x18a613(0x13f)]:{};if(Object['keys'](_0x133313)[_0x18a613(0x122)]>0x0)_0xad7141[_0x18a613(0x13f)]=_0x133313;if(_0x44114a['defaultApp'])_0xad7141['defaultApp']=_0x44114a['defaultApp'];return _0xad7141;}function mergeProjectFirst(_0x3fcb25,_0x3da275){const _0x5655e4=a219_0x2386f7,_0x2678d1={..._0x3da275};delete _0x2678d1[_0x5655e4(0x133)];for(const _0x156cd0 of INHERIT_WHITELIST){!(_0x156cd0 in _0x2678d1)&&_0x156cd0 in _0x3fcb25&&(_0x2678d1[_0x156cd0]=_0x3fcb25[_0x156cd0]);}const _0x2345d0=_0x3da275['apps']&&typeof _0x3da275[_0x5655e4(0x13f)]===_0x5655e4(0x139)?_0x3da275[_0x5655e4(0x13f)]:{};return Object[_0x5655e4(0x117)](_0x2345d0)['length']>0x0?_0x2678d1[_0x5655e4(0x13f)]=_0x2345d0:delete _0x2678d1[_0x5655e4(0x13f)],'defaultApp'in _0x3da275?_0x2678d1[_0x5655e4(0x145)]=_0x3da275[_0x5655e4(0x145)]:delete _0x2678d1[_0x5655e4(0x145)],_0x2678d1;}export function readRawConfigWithLayers(_0x1f2c44){const _0x40385a=loadRawConfigLayers(_0x1f2c44);return{'config':mergeRawConfigLayers(_0x40385a),'layers':_0x40385a};}export function readRawConfig(_0x4f9b14){return mergeRawConfigLayers(loadRawConfigLayers(_0x4f9b14));}export function readConfigFile(_0x1103fd){const _0x4ae683=a219_0x2386f7;return parseAndNormalizeConfig(_0x1103fd,_0x4ae683(0x143));}export function writeConfigFile(_0x13ec75,_0x2735ad){const _0x537f31=a219_0x2386f7,_0x4320d4=dirname(_0x13ec75);!existsSync(_0x4320d4)&&mkdirSync(_0x4320d4,{'recursive':!![]});const _0x1a72e2=_0x13ec75+_0x537f31(0x130);try{writeFileSync(_0x1a72e2,JSON[_0x537f31(0x127)](_0x2735ad,null,0x2)+'\x0a',{'encoding':_0x537f31(0x123),'mode':0x180}),renameSync(_0x1a72e2,_0x13ec75);}catch(_0x3ccbaf){try{unlinkSync(_0x1a72e2);}catch{}throw _0x3ccbaf;}}export function resolveWriteConfigPath(_0x58217f){const _0x3f88a2=a219_0x2386f7,_0x20f27d=_0x58217f==='project'?process[_0x3f88a2(0x11a)]():homedir(),_0x15a3ad=resolveConfigPath(_0x20f27d);return _0x15a3ad??resolve(_0x20f27d,NEW_CONFIG_NAME);}
1
+ function a221_0xd493(){const _0x79fc5=['appDomain','apps','silent','set','defaultApp','project','app','config','string','\x0a\x20\x20','2OybNox','empty','1015530ZsSBFC','accessKey','Project','trim','userDomain','kbDomain','missing','message','inherit','pageSize','projectPath','format','cookie','utf8','2244543kjuCuL','appcode','stringify','warn','parse','\x20config\x20file\x20ignored\x20(invalid\x20JSON\x20or\x20unreadable):\x20','error','3384QcqjqQ','272azYChE','apiDir','region','keys','227470WGdGUv','length','481556wMibTM','riskLevel','status','60IgsZDt','7368592HNtSzQ','certificateDomain','45TkuSYl','locale','data','154108WQyfnW','Global','object'];a221_0xd493=function(){return _0x79fc5;};return a221_0xd493();}const a221_0x4bdbbe=a221_0x47a5;(function(_0x4e4e91,_0x3449c0){const _0x5e3ad1=a221_0x47a5,_0x34f1f1=_0x4e4e91();while(!![]){try{const _0x339f9f=parseInt(_0x5e3ad1(0xb8))/0x1*(-parseInt(_0x5e3ad1(0xd6))/0x2)+parseInt(_0x5e3ad1(0xdc))/0x3*(parseInt(_0x5e3ad1(0xdf))/0x4)+-parseInt(_0x5e3ad1(0xd4))/0x5*(-parseInt(_0x5e3ad1(0xd9))/0x6)+parseInt(_0x5e3ad1(0xc8))/0x7+parseInt(_0x5e3ad1(0xd0))/0x8*(parseInt(_0x5e3ad1(0xcf))/0x9)+parseInt(_0x5e3ad1(0xba))/0xa+-parseInt(_0x5e3ad1(0xda))/0xb;if(_0x339f9f===_0x3449c0)break;else _0x34f1f1['push'](_0x34f1f1['shift']());}catch(_0x77a6e6){_0x34f1f1['push'](_0x34f1f1['shift']());}}}(a221_0xd493,0x4d3f3));import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{dirname,parse,resolve}from'node:path';import{homedir}from'node:os';import{CLI_BIN_NAME}from'../constant/cli.js';export const NEW_CONFIG_NAME='.rabetbase.json';export const CONFIG_NAMES=[NEW_CONFIG_NAME];const normalizedWriteCache=new Map();function a221_0x47a5(_0x35f133,_0x16774d){_0x35f133=_0x35f133-0xb3;const _0xd4935d=a221_0xd493();let _0x47a521=_0xd4935d[_0x35f133];return _0x47a521;}export function resolveConfigPath(_0x1c208b){for(const _0x3baca0 of CONFIG_NAMES){const _0xf9f334=resolve(_0x1c208b,_0x3baca0);if(existsSync(_0xf9f334))return _0xf9f334;}return undefined;}export function findProjectRootDirectory(_0x413336=process['cwd']()){let _0xff29fc=resolve(_0x413336);const {root:_0x4ca687}=parse(_0xff29fc),_0x42e7b7=homedir();while(!![]){if(resolveConfigPath(_0xff29fc)){if(_0xff29fc===_0x42e7b7)break;return _0xff29fc;}if(_0xff29fc===_0x4ca687||_0xff29fc===_0x42e7b7)break;const _0x2087c=dirname(_0xff29fc);if(_0x2087c===_0xff29fc)break;_0xff29fc=_0x2087c;}return resolve(_0x413336);}export function getProjectConfigPath(){return resolveConfigPath(process['cwd']());}export function getGlobalConfigPath(){return resolveConfigPath(homedir());}export function isInProject(){return!!getProjectConfigPath();}export function inspectCliConfigJsonFile(_0x155582){const _0x4e6aac=a221_0x47a5;if(!existsSync(_0x155582))return{'status':_0x4e6aac(0xc0)};try{const _0x2c47a9=readFileSync(_0x155582,{'encoding':_0x4e6aac(0xc7)});if(!_0x2c47a9?.[_0x4e6aac(0xbd)]())return{'status':_0x4e6aac(0xb9)};const _0x2517c2=JSON[_0x4e6aac(0xcc)](_0x2c47a9);return{'status':'ok','data':_0x2517c2};}catch(_0x4d58ae){return{'status':_0x4e6aac(0xce),'message':_0x4d58ae instanceof Error?_0x4d58ae[_0x4e6aac(0xc1)]:String(_0x4d58ae)};}}function parseCliConfigJsonFile(_0x56bc23,_0x17a82e,_0x3a47ba){const _0x3b34b6=a221_0x47a5,_0x456b28=inspectCliConfigJsonFile(_0x56bc23);if(_0x456b28['status']==='missing'||_0x456b28[_0x3b34b6(0xd8)]==='empty')return{};if(_0x456b28[_0x3b34b6(0xd8)]==='ok')return _0x456b28[_0x3b34b6(0xde)];return _0x17a82e===_0x3b34b6(0xcb)&&_0x3a47ba&&console[_0x3b34b6(0xce)](CLI_BIN_NAME+':\x20'+_0x3a47ba+_0x3b34b6(0xcd)+_0x56bc23+_0x3b34b6(0xb7)+_0x456b28[_0x3b34b6(0xc1)]),{};}function normalizeLegacyConfigShape(_0x1ad436){const _0x5db036=a221_0x47a5;if(!_0x1ad436||typeof _0x1ad436!==_0x5db036(0xe1))return{'config':{},'migrated':![]};const _0x2c873c={..._0x1ad436},_0x227757=_0x2c873c[_0x5db036(0xe3)]&&typeof _0x2c873c[_0x5db036(0xe3)]===_0x5db036(0xe1)?{..._0x2c873c[_0x5db036(0xe3)]}:{},_0x11a96f=Object['keys'](_0x227757)[_0x5db036(0xd5)],_0x4159d1=_0x2c873c[_0x5db036(0xc9)]||_0x2c873c[_0x5db036(0xb4)];let _0x3db8c5=![];if(_0x4159d1&&_0x11a96f===0x0){const _0x5f3baa=typeof _0x2c873c[_0x5db036(0xe6)]===_0x5db036(0xb6)&&_0x2c873c['defaultApp'][_0x5db036(0xbd)]()?_0x2c873c[_0x5db036(0xe6)]:String(_0x4159d1)[_0x5db036(0xbd)]();_0x227757[_0x5f3baa]={'appcode':String(_0x4159d1)[_0x5db036(0xbd)](),..._0x2c873c['env']!=null?{'env':_0x2c873c['env']}:{},..._0x2c873c[_0x5db036(0xd1)]!=null?{'apiDir':_0x2c873c[_0x5db036(0xd1)]}:{},..._0x2c873c[_0x5db036(0xc6)]!=null?{'cookie':_0x2c873c[_0x5db036(0xc6)]}:{},..._0x2c873c[_0x5db036(0xbb)]!=null?{'accessKey':_0x2c873c[_0x5db036(0xbb)]}:{},..._0x2c873c['format']!=null?{'format':_0x2c873c[_0x5db036(0xc5)]}:{},..._0x2c873c[_0x5db036(0xc3)]!=null?{'pageSize':_0x2c873c[_0x5db036(0xc3)]}:{},..._0x2c873c[_0x5db036(0xd7)]!=null?{'riskLevel':_0x2c873c[_0x5db036(0xd7)]}:{},..._0x2c873c[_0x5db036(0xdd)]!=null?{'locale':_0x2c873c[_0x5db036(0xdd)]}:{}},_0x2c873c['apps']=_0x227757,delete _0x2c873c[_0x5db036(0xe6)],_0x3db8c5=!![];}return(_0x5db036(0xc9)in _0x2c873c||_0x5db036(0xb4)in _0x2c873c)&&(delete _0x2c873c[_0x5db036(0xc9)],delete _0x2c873c[_0x5db036(0xb4)],_0x3db8c5=!![]),{'config':_0x2c873c,'migrated':_0x3db8c5};}function writeNormalizedConfigIfNeeded(_0x277ce8,_0x3e8248){const _0x5e549f=a221_0x47a5,_0x4124cc=JSON[_0x5e549f(0xca)](_0x3e8248,null,0x2)+'\x0a';if(normalizedWriteCache['get'](_0x277ce8)===_0x4124cc)return;writeConfigFile(_0x277ce8,_0x3e8248),normalizedWriteCache[_0x5e549f(0xe5)](_0x277ce8,_0x4124cc);}function parseAndNormalizeConfig(_0x5e3495,_0x435425,_0x234ec6){const _0x17244d=a221_0x47a5,_0x1688c5=parseCliConfigJsonFile(_0x5e3495,_0x435425,_0x234ec6),_0x24ac52=normalizeLegacyConfigShape(_0x1688c5);if(_0x24ac52['migrated'])try{writeNormalizedConfigIfNeeded(_0x5e3495,_0x24ac52[_0x17244d(0xb5)]);}catch{}return _0x24ac52['config'];}export function loadRawConfigLayers(_0x19106f){const _0x495610=a221_0x47a5;let _0x482c67={},_0x24ae28={};const _0xc0a9f5=resolveConfigPath(homedir());_0xc0a9f5&&(_0x482c67=parseAndNormalizeConfig(_0xc0a9f5,'warn',_0x495610(0xe0)));const _0x2805da=_0x19106f??findProjectRootDirectory(),_0x21118e=resolveConfigPath(_0x2805da);return _0x21118e&&(_0x24ae28=parseAndNormalizeConfig(_0x21118e,_0x495610(0xcb),_0x495610(0xbc))),{'globalPath':_0xc0a9f5,'projectPath':_0x21118e,'globalConfig':_0x482c67,'projectConfig':_0x24ae28};}const INHERIT_WHITELIST=[a221_0x4bdbbe(0xc6),a221_0x4bdbbe(0xbb),a221_0x4bdbbe(0xdd),a221_0x4bdbbe(0xc5),'riskLevel',a221_0x4bdbbe(0xc3),a221_0x4bdbbe(0xd2),a221_0x4bdbbe(0xbe),'apiDomain','runtimeDomain','skillDomain',a221_0x4bdbbe(0xbf),a221_0x4bdbbe(0xe2),'localDomain',a221_0x4bdbbe(0xdb)];export function mergeRawConfigLayers(_0x43b456){const _0x504514=a221_0x4bdbbe,{globalConfig:_0xb883da,projectConfig:_0x414288}=_0x43b456,_0x42cd9e=!!_0x43b456[_0x504514(0xc4)]||Object[_0x504514(0xd3)](_0x414288)[_0x504514(0xd5)]>0x0;if(!_0x42cd9e)return mergeGlobalOnly(_0xb883da);return mergeProjectFirst(_0xb883da,_0x414288);}function mergeGlobalOnly(_0xb277f6){const _0x3fdf59=a221_0x4bdbbe,_0x518e48={..._0xb277f6};delete _0x518e48[_0x3fdf59(0xc2)];const _0x4e9ef8=_0xb277f6[_0x3fdf59(0xe3)]&&typeof _0xb277f6['apps']===_0x3fdf59(0xe1)?_0xb277f6[_0x3fdf59(0xe3)]:{};if(Object[_0x3fdf59(0xd3)](_0x4e9ef8)['length']>0x0)_0x518e48[_0x3fdf59(0xe3)]=_0x4e9ef8;if(_0xb277f6[_0x3fdf59(0xe6)])_0x518e48[_0x3fdf59(0xe6)]=_0xb277f6['defaultApp'];return _0x518e48;}function mergeProjectFirst(_0x2a4eea,_0x37ab26){const _0x566520=a221_0x4bdbbe,_0x4a1af4={..._0x37ab26};delete _0x4a1af4[_0x566520(0xc2)];for(const _0x12b84b of INHERIT_WHITELIST){!(_0x12b84b in _0x4a1af4)&&_0x12b84b in _0x2a4eea&&(_0x4a1af4[_0x12b84b]=_0x2a4eea[_0x12b84b]);}const _0x229f16=_0x37ab26[_0x566520(0xe3)]&&typeof _0x37ab26[_0x566520(0xe3)]===_0x566520(0xe1)?_0x37ab26[_0x566520(0xe3)]:{};return Object['keys'](_0x229f16)[_0x566520(0xd5)]>0x0?_0x4a1af4['apps']=_0x229f16:delete _0x4a1af4[_0x566520(0xe3)],_0x566520(0xe6)in _0x37ab26?_0x4a1af4['defaultApp']=_0x37ab26[_0x566520(0xe6)]:delete _0x4a1af4[_0x566520(0xe6)],_0x4a1af4;}export function readRawConfigWithLayers(_0x3a0be0){const _0x2b07c0=loadRawConfigLayers(_0x3a0be0);return{'config':mergeRawConfigLayers(_0x2b07c0),'layers':_0x2b07c0};}export function readRawConfig(_0x4424f9){return mergeRawConfigLayers(loadRawConfigLayers(_0x4424f9));}export function readConfigFile(_0x180c52){const _0x1e23fc=a221_0x4bdbbe;return parseAndNormalizeConfig(_0x180c52,_0x1e23fc(0xe4));}export function writeConfigFile(_0x4935e7,_0x25be65){const _0x1c4525=a221_0x4bdbbe,_0x2af29e=dirname(_0x4935e7);!existsSync(_0x2af29e)&&mkdirSync(_0x2af29e,{'recursive':!![]});const _0x4932df=_0x4935e7+'.tmp';try{writeFileSync(_0x4932df,JSON[_0x1c4525(0xca)](_0x25be65,null,0x2)+'\x0a',{'encoding':_0x1c4525(0xc7),'mode':0x180}),renameSync(_0x4932df,_0x4935e7);}catch(_0x2055b2){try{unlinkSync(_0x4932df);}catch{}throw _0x2055b2;}}export function resolveWriteConfigPath(_0x44d865){const _0x36b22d=a221_0x4bdbbe,_0x11e4e9=_0x44d865===_0x36b22d(0xb3)?process['cwd']():homedir(),_0x1cfa4e=resolveConfigPath(_0x11e4e9);return _0x1cfa4e??resolve(_0x11e4e9,NEW_CONFIG_NAME);}
package/lib/context.js CHANGED
@@ -1 +1 @@
1
- const a220_0xd7d89=a220_0xb93a;(function(_0xe6b426,_0x5c1d0b){const _0x48a56d=a220_0xb93a,_0x2bf791=_0xe6b426();while(!![]){try{const _0x2048a0=parseInt(_0x48a56d(0x16d))/0x1*(parseInt(_0x48a56d(0x164))/0x2)+parseInt(_0x48a56d(0x169))/0x3*(-parseInt(_0x48a56d(0x16a))/0x4)+-parseInt(_0x48a56d(0x16b))/0x5+parseInt(_0x48a56d(0x156))/0x6*(parseInt(_0x48a56d(0x15d))/0x7)+parseInt(_0x48a56d(0x151))/0x8*(parseInt(_0x48a56d(0x158))/0x9)+parseInt(_0x48a56d(0x163))/0xa*(parseInt(_0x48a56d(0x152))/0xb)+parseInt(_0x48a56d(0x14c))/0xc*(parseInt(_0x48a56d(0x14e))/0xd);if(_0x2048a0===_0x5c1d0b)break;else _0x2bf791['push'](_0x2bf791['shift']());}catch(_0x1f3a8f){_0x2bf791['push'](_0x2bf791['shift']());}}}(a220_0x4480,0xec558));import{resolve}from'node:path';import{CLI_BIN_NAME}from'./constant/cli.js';import{buildAuth}from'./context/auth-resolver.js';import{resolveAppConfig}from'./context/app-resolver.js';import{CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile}from'./context/config-loader.js';import{normalizeLovrabetRegion}from'./constant/region.js';import{logger}from'./utils/logger.js';function a220_0x4480(){const _0x46b57a=['object','10dCufdZ','38eIyOoz','length','setRawCommand','platformDomain','https://g.lovrabet.com/dist/lovrabet-skill','3VRPNkC','6877932wCYhGA','8577705kMhiHD','kbDomain','2521OjYzRR','region','merged','-api.ts','apiDir','env','skillHubDomain','./constant/domain.js','cookie','trim','api.ts','projectConfig','defaultApp','slice','apps','globalConfig','48JYBHof','./constant/env.js','5326061ZxIKnm','entries','template_base_url','1192qjuXFV','2692217SWOltv','project','agentDomain','runtimeDomain','6gjiBKs','keys','90855iaOBwN','cwd','raw','replace','string','6772213piaKKo','map','appcode','setLogPath','apiDomain'];a220_0x4480=function(){return _0x46b57a;};return a220_0x4480();}export{CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile};function env(_0x294feb){return process.env[`RABETBASE_${_0x294feb}`]||process.env[`LOVRABET_${_0x294feb}`]||undefined;}function optionalString(_0x4d2549){const _0x39fc30=a220_0xb93a;return typeof _0x4d2549===_0x39fc30(0x15c)&&_0x4d2549[_0x39fc30(0x176)]()?_0x4d2549[_0x39fc30(0x176)]():undefined;}export async function createContext(_0x2697b7){const _0x5601f6=a220_0xb93a,{config:_0x1c8fa0,layers:_0x3844b9}=readRawConfigWithLayers(),_0x81d968=buildConfig(_0x1c8fa0,_0x2697b7,_0x3844b9);await initGlobalEnvironment(_0x81d968);const {getUserDomain:_0x2f7e9a,getApiDomain:_0x9e5ce3}=await import(_0x5601f6(0x174)),_0x50fe82={'apiDomain':_0x9e5ce3(),'userDomain':_0x2f7e9a()},_0x2af498=await buildAuth(_0x81d968);logger[_0x5601f6(0x160)](process['cwd']());const _0x55c49a=(CLI_BIN_NAME+'\x20'+process['argv'][_0x5601f6(0x149)](0x2)['join']('\x20'))['trim']();logger[_0x5601f6(0x166)](_0x55c49a);const {isNonInteractive:_0x5b1e60}=await import('./utils/is-non-interactive.js'),_0x89f67d=_0x5b1e60(_0x2697b7);return{'config':_0x81d968,'auth':_0x2af498,'logger':logger,'env':_0x50fe82,'nonInteractive':_0x89f67d};}export function buildConfigFromFlags(_0x326aa8){const {config:_0x1e03e6,layers:_0x4e338b}=readRawConfigWithLayers();return buildConfig(_0x1e03e6,_0x326aa8,_0x4e338b);}export async function initGlobalEnvironment(_0x16d60f){const _0x2b78fe=a220_0xb93a,{initEnv:_0x56ff91}=await import(_0x2b78fe(0x14d));_0x56ff91(_0x16d60f[_0x2b78fe(0x172)]);const {initDomains:_0x165912}=await import(_0x2b78fe(0x174));_0x165912({'region':normalizeLovrabetRegion(_0x16d60f[_0x2b78fe(0x15a)]?.[_0x2b78fe(0x16e)]),'apiDomain':optionalString(_0x16d60f['raw']?.[_0x2b78fe(0x161)]),'userDomain':optionalString(_0x16d60f[_0x2b78fe(0x15a)]?.['userDomain']),'runtimeDomain':optionalString(_0x16d60f['raw']?.[_0x2b78fe(0x155)]),'skillDomain':optionalString(_0x16d60f['raw']?.['skillDomain'])||optionalString(_0x16d60f[_0x2b78fe(0x15a)]?.[_0x2b78fe(0x173)])||optionalString(_0x16d60f[_0x2b78fe(0x15a)]?.['agentDomain'])||optionalString(_0x16d60f[_0x2b78fe(0x15a)]?.[_0x2b78fe(0x167)]),'kbDomain':optionalString(_0x16d60f['raw']?.[_0x2b78fe(0x16c)])||optionalString(_0x16d60f[_0x2b78fe(0x15a)]?.[_0x2b78fe(0x154)])||optionalString(_0x16d60f[_0x2b78fe(0x15a)]?.[_0x2b78fe(0x167)]),'appDomain':optionalString(_0x16d60f[_0x2b78fe(0x15a)]?.['appDomain'])});}function a220_0xb93a(_0x30d8dd,_0x413985){_0x30d8dd=_0x30d8dd-0x146;const _0x448074=a220_0x4480();let _0xb93a80=_0x448074[_0x30d8dd];return _0xb93a80;}export function getConfigAppCode(_0x5dc32e){const _0x4073bb=a220_0xb93a,_0x566124=readRawConfig(_0x5dc32e);if(_0x566124[_0x4073bb(0x14a)]&&typeof _0x566124['apps']==='object'){const _0x24509c=_0x566124[_0x4073bb(0x148)];if(_0x24509c)return _0x566124[_0x4073bb(0x14a)][_0x24509c]?.[_0x4073bb(0x15f)]?String(_0x566124[_0x4073bb(0x14a)][_0x24509c][_0x4073bb(0x15f)])['trim']():undefined;const _0x5bbbfa=Object['values'](_0x566124[_0x4073bb(0x14a)]);if(_0x5bbbfa['length']===0x1&&_0x5bbbfa[0x0]?.['appcode'])return String(_0x5bbbfa[0x0][_0x4073bb(0x15f)])['trim']();}const _0x2d0d9a=_0x566124[_0x4073bb(0x15f)]||_0x566124['app'];if(typeof _0x2d0d9a!==_0x4073bb(0x15c)||_0x2d0d9a[_0x4073bb(0x176)]()==='')return undefined;return _0x2d0d9a[_0x4073bb(0x176)]();}export function getMultiAppConfigs(_0x42ae32=a220_0xd7d89(0x153),_0x1f133d){const _0x4883e5=a220_0xd7d89,_0x1bcb71=loadRawConfigLayers(_0x1f133d);let _0xc4a82f,_0x7c122a;if(_0x42ae32===_0x4883e5(0x16f)){const _0x2171a6=_0x1bcb71[_0x4883e5(0x14b)][_0x4883e5(0x14a)]&&typeof _0x1bcb71['globalConfig']['apps']==='object'?_0x1bcb71[_0x4883e5(0x14b)][_0x4883e5(0x14a)]:{},_0x5b9dae=_0x1bcb71['projectConfig'][_0x4883e5(0x14a)]&&typeof _0x1bcb71[_0x4883e5(0x147)][_0x4883e5(0x14a)]===_0x4883e5(0x162)?_0x1bcb71[_0x4883e5(0x147)][_0x4883e5(0x14a)]:{};_0xc4a82f={..._0x2171a6,..._0x5b9dae};const _0x953d74=readRawConfig(_0x1f133d);_0x7c122a=_0x953d74[_0x4883e5(0x148)];}else _0xc4a82f=_0x1bcb71[_0x4883e5(0x147)]['apps'],_0x7c122a=_0x1bcb71[_0x4883e5(0x147)][_0x4883e5(0x148)];!_0x7c122a&&_0xc4a82f&&typeof _0xc4a82f===_0x4883e5(0x162)&&Object[_0x4883e5(0x157)](_0xc4a82f)[_0x4883e5(0x165)]===0x1&&(_0x7c122a=Object[_0x4883e5(0x157)](_0xc4a82f)[0x0]);if(!_0xc4a82f||typeof _0xc4a82f!==_0x4883e5(0x162)||Object['keys'](_0xc4a82f)[_0x4883e5(0x165)]===0x0)return null;return Object[_0x4883e5(0x14f)](_0xc4a82f)[_0x4883e5(0x15e)](([_0x3220a0,_0x3e9049])=>({'name':_0x3220a0,'appcode':_0x3e9049?.[_0x4883e5(0x15f)]||'','isDefault':_0x3220a0===_0x7c122a,'env':_0x3e9049?.[_0x4883e5(0x172)],'apiDir':_0x3e9049?.[_0x4883e5(0x171)],'cookie':_0x3e9049?.[_0x4883e5(0x175)]||undefined}))['filter'](_0x5da412=>_0x5da412[_0x4883e5(0x15f)]);}export function getTemplateBaseUrl(_0x352d60){const _0x55606f=a220_0xd7d89,_0x32c60b=readRawConfig(_0x352d60);if(_0x32c60b[_0x55606f(0x150)]&&typeof _0x32c60b[_0x55606f(0x150)]===_0x55606f(0x15c))return _0x32c60b[_0x55606f(0x150)][_0x55606f(0x15b)](/\/$/,'');return _0x55606f(0x168);}function buildConfig(_0x830925,_0x3cc0a1,_0x14b4b6){return{...resolveAppConfig({'raw':_0x830925,'flags':_0x3cc0a1,'layers':_0x14b4b6,'readEnv':env}),'raw':_0x830925};}export function resolveApiFilePath(_0xde82c0,_0x289497){const _0x4a9409=a220_0xd7d89,_0x5683c4=resolve(process[_0x4a9409(0x159)](),_0xde82c0),_0x40cc3b=resolve(_0x5683c4,_0x4a9409(0x146));if(!_0x289497)return _0x40cc3b;const _0x112f61=readRawConfig(),_0x5d7cd3=_0x112f61[_0x4a9409(0x14a)]&&typeof _0x112f61[_0x4a9409(0x14a)]===_0x4a9409(0x162)?_0x112f61[_0x4a9409(0x14a)]:{},_0x2723e0=Object[_0x4a9409(0x14f)](_0x5d7cd3)['find'](([,_0x9dd737])=>_0x9dd737?.['appcode']===_0x289497);if(!_0x2723e0)return _0x40cc3b;const [_0x3bffe3,_0x1b8d5f]=_0x2723e0,_0x45f3c9=typeof _0x112f61[_0x4a9409(0x148)]===_0x4a9409(0x15c)?_0x112f61[_0x4a9409(0x148)]:undefined;if(_0x1b8d5f?.['apiDir'])return _0x40cc3b;if(_0x45f3c9&&_0x3bffe3!==_0x45f3c9)return resolve(_0x5683c4,_0x3bffe3+_0x4a9409(0x170));return _0x40cc3b;}
1
+ const a222_0x117440=a222_0x4079;(function(_0x246fe3,_0x42b7df){const _0x4ad910=a222_0x4079,_0x3c1e09=_0x246fe3();while(!![]){try{const _0x10e7b0=-parseInt(_0x4ad910(0x11b))/0x1+parseInt(_0x4ad910(0x102))/0x2+parseInt(_0x4ad910(0xf2))/0x3+parseInt(_0x4ad910(0xf1))/0x4*(-parseInt(_0x4ad910(0x10e))/0x5)+-parseInt(_0x4ad910(0xfc))/0x6+-parseInt(_0x4ad910(0x119))/0x7+parseInt(_0x4ad910(0x117))/0x8;if(_0x10e7b0===_0x42b7df)break;else _0x3c1e09['push'](_0x3c1e09['shift']());}catch(_0x2d0302){_0x3c1e09['push'](_0x3c1e09['shift']());}}}(a222_0x39e1,0x52918));function a222_0x4079(_0x945a6b,_0x120fa1){_0x945a6b=_0x945a6b-0xea;const _0x39e185=a222_0x39e1();let _0x40793f=_0x39e185[_0x945a6b];return _0x40793f;}import{resolve}from'node:path';function a222_0x39e1(){const _0x3ac4d1=['app','find','agentDomain','keys','object','setRawCommand','platformDomain','1891656jYladx','env','globalConfig','apps','appcode','apiDir','103204hGuYnc','raw','cwd','./constant/env.js','localDomain','join','runtimeDomain','project','skillHubDomain','https://g.lovrabet.com/dist/lovrabet-skill','./utils/is-non-interactive.js','./constant/domain.js','1095APhlCV','slice','kbDomain','userDomain','template_base_url','projectConfig','defaultApp','argv','entries','10440296YpJgHf','-api.ts','2256317avIzpg','appDomain','6681jHJcfE','setLogPath','string','trim','merged','api.ts','apiDomain','length','11652alZAZg','791388whJiAd','filter','map'];a222_0x39e1=function(){return _0x3ac4d1;};return a222_0x39e1();}import{CLI_BIN_NAME}from'./constant/cli.js';import{buildAuth}from'./context/auth-resolver.js';import{resolveAppConfig}from'./context/app-resolver.js';import{CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile}from'./context/config-loader.js';import{normalizeLovrabetRegion}from'./constant/region.js';import{logger}from'./utils/logger.js';export{CONFIG_NAMES,NEW_CONFIG_NAME,findProjectRootDirectory,getGlobalConfigPath,getProjectConfigPath,inspectCliConfigJsonFile,isInProject,loadRawConfigLayers,mergeRawConfigLayers,readConfigFile,readRawConfig,readRawConfigWithLayers,resolveConfigPath,resolveWriteConfigPath,writeConfigFile};function env(_0x30492b){return process.env[`RABETBASE_${_0x30492b}`]||process.env[`LOVRABET_${_0x30492b}`]||undefined;}function optionalString(_0x215396){const _0x13be9f=a222_0x4079;return typeof _0x215396===_0x13be9f(0xeb)&&_0x215396[_0x13be9f(0xec)]()?_0x215396[_0x13be9f(0xec)]():undefined;}export async function createContext(_0x2f2935){const _0x419870=a222_0x4079,{config:_0xfbe83e,layers:_0x161e7b}=readRawConfigWithLayers(),_0x4ebf68=buildConfig(_0xfbe83e,_0x2f2935,_0x161e7b);await initGlobalEnvironment(_0x4ebf68);const {getUserDomain:_0x10c32c,getApiDomain:_0x285b16}=await import(_0x419870(0x10d)),_0x265ff0={'apiDomain':_0x285b16(),'userDomain':_0x10c32c()},_0x5c1f37=await buildAuth(_0x4ebf68);logger[_0x419870(0xea)](process[_0x419870(0x104)]());const _0x44815b=(CLI_BIN_NAME+'\x20'+process[_0x419870(0x115)][_0x419870(0x10f)](0x2)[_0x419870(0x107)]('\x20'))[_0x419870(0xec)]();logger[_0x419870(0xfa)](_0x44815b);const {isNonInteractive:_0x153787}=await import(_0x419870(0x10c)),_0x3229d2=_0x153787(_0x2f2935);return{'config':_0x4ebf68,'auth':_0x5c1f37,'logger':logger,'env':_0x265ff0,'nonInteractive':_0x3229d2};}export function buildConfigFromFlags(_0x301ab5){const {config:_0x388321,layers:_0x20d9fb}=readRawConfigWithLayers();return buildConfig(_0x388321,_0x301ab5,_0x20d9fb);}export async function initGlobalEnvironment(_0xab421){const _0x23af80=a222_0x4079,{initEnv:_0x3c8bf1}=await import(_0x23af80(0x105));_0x3c8bf1(_0xab421[_0x23af80(0xfd)]);const {initDomains:_0x1397be}=await import('./constant/domain.js');_0x1397be({'region':normalizeLovrabetRegion(_0xab421['raw']?.['region']),'apiDomain':optionalString(_0xab421['raw']?.[_0x23af80(0xef)]),'userDomain':optionalString(_0xab421['raw']?.[_0x23af80(0x111)]),'runtimeDomain':optionalString(_0xab421['raw']?.[_0x23af80(0x108)]),'skillDomain':optionalString(_0xab421['raw']?.['skillDomain'])||optionalString(_0xab421[_0x23af80(0x103)]?.[_0x23af80(0x10a)])||optionalString(_0xab421[_0x23af80(0x103)]?.[_0x23af80(0xf7)])||optionalString(_0xab421[_0x23af80(0x103)]?.[_0x23af80(0xfb)]),'kbDomain':optionalString(_0xab421['raw']?.[_0x23af80(0x110)])||optionalString(_0xab421[_0x23af80(0x103)]?.['agentDomain'])||optionalString(_0xab421[_0x23af80(0x103)]?.[_0x23af80(0xfb)]),'appDomain':optionalString(_0xab421['raw']?.[_0x23af80(0x11a)]),'localDomain':optionalString(_0xab421[_0x23af80(0x103)]?.[_0x23af80(0x106)]),'certificateDomain':optionalString(_0xab421['raw']?.['certificateDomain'])});}export function getConfigAppCode(_0x408a1e){const _0x4a5436=a222_0x4079,_0x45c397=readRawConfig(_0x408a1e);if(_0x45c397[_0x4a5436(0xff)]&&typeof _0x45c397[_0x4a5436(0xff)]===_0x4a5436(0xf9)){const _0x4f2656=_0x45c397[_0x4a5436(0x114)];if(_0x4f2656)return _0x45c397[_0x4a5436(0xff)][_0x4f2656]?.[_0x4a5436(0x100)]?String(_0x45c397['apps'][_0x4f2656]['appcode'])['trim']():undefined;const _0x1c6246=Object['values'](_0x45c397[_0x4a5436(0xff)]);if(_0x1c6246[_0x4a5436(0xf0)]===0x1&&_0x1c6246[0x0]?.[_0x4a5436(0x100)])return String(_0x1c6246[0x0][_0x4a5436(0x100)])[_0x4a5436(0xec)]();}const _0x32ba57=_0x45c397[_0x4a5436(0x100)]||_0x45c397[_0x4a5436(0xf5)];if(typeof _0x32ba57!==_0x4a5436(0xeb)||_0x32ba57['trim']()==='')return undefined;return _0x32ba57[_0x4a5436(0xec)]();}export function getMultiAppConfigs(_0x472c07=a222_0x117440(0x109),_0x1b6742){const _0x301e26=a222_0x117440,_0x5841fc=loadRawConfigLayers(_0x1b6742);let _0x3cf71c,_0x347144;if(_0x472c07===_0x301e26(0xed)){const _0x3c69fb=_0x5841fc[_0x301e26(0xfe)]['apps']&&typeof _0x5841fc['globalConfig'][_0x301e26(0xff)]===_0x301e26(0xf9)?_0x5841fc['globalConfig'][_0x301e26(0xff)]:{},_0x481ae8=_0x5841fc[_0x301e26(0x113)][_0x301e26(0xff)]&&typeof _0x5841fc['projectConfig'][_0x301e26(0xff)]===_0x301e26(0xf9)?_0x5841fc['projectConfig'][_0x301e26(0xff)]:{};_0x3cf71c={..._0x3c69fb,..._0x481ae8};const _0x54246c=readRawConfig(_0x1b6742);_0x347144=_0x54246c['defaultApp'];}else _0x3cf71c=_0x5841fc[_0x301e26(0x113)]['apps'],_0x347144=_0x5841fc['projectConfig'][_0x301e26(0x114)];!_0x347144&&_0x3cf71c&&typeof _0x3cf71c===_0x301e26(0xf9)&&Object[_0x301e26(0xf8)](_0x3cf71c)['length']===0x1&&(_0x347144=Object[_0x301e26(0xf8)](_0x3cf71c)[0x0]);if(!_0x3cf71c||typeof _0x3cf71c!==_0x301e26(0xf9)||Object[_0x301e26(0xf8)](_0x3cf71c)[_0x301e26(0xf0)]===0x0)return null;return Object[_0x301e26(0x116)](_0x3cf71c)[_0x301e26(0xf4)](([_0x4af2b2,_0x1b3014])=>({'name':_0x4af2b2,'appcode':_0x1b3014?.[_0x301e26(0x100)]||'','isDefault':_0x4af2b2===_0x347144,'env':_0x1b3014?.['env'],'apiDir':_0x1b3014?.[_0x301e26(0x101)],'cookie':_0x1b3014?.['cookie']||undefined}))[_0x301e26(0xf3)](_0x59da7e=>_0x59da7e[_0x301e26(0x100)]);}export function getTemplateBaseUrl(_0x1d8658){const _0x4d0240=a222_0x117440,_0x258a6d=readRawConfig(_0x1d8658);if(_0x258a6d['template_base_url']&&typeof _0x258a6d[_0x4d0240(0x112)]==='string')return _0x258a6d['template_base_url']['replace'](/\/$/,'');return _0x4d0240(0x10b);}function buildConfig(_0x5d360b,_0x1b04b3,_0x5d5f2f){return{...resolveAppConfig({'raw':_0x5d360b,'flags':_0x1b04b3,'layers':_0x5d5f2f,'readEnv':env}),'raw':_0x5d360b};}export function resolveApiFilePath(_0x5024c1,_0xfa2d24){const _0x59cce9=a222_0x117440,_0x105e92=resolve(process[_0x59cce9(0x104)](),_0x5024c1),_0x6164de=resolve(_0x105e92,_0x59cce9(0xee));if(!_0xfa2d24)return _0x6164de;const _0x219c03=readRawConfig(),_0x4d6a4a=_0x219c03['apps']&&typeof _0x219c03[_0x59cce9(0xff)]==='object'?_0x219c03[_0x59cce9(0xff)]:{},_0x2248fe=Object[_0x59cce9(0x116)](_0x4d6a4a)[_0x59cce9(0xf6)](([,_0x88170e])=>_0x88170e?.[_0x59cce9(0x100)]===_0xfa2d24);if(!_0x2248fe)return _0x6164de;const [_0x994823,_0x1b88ac]=_0x2248fe,_0x2cdce2=typeof _0x219c03[_0x59cce9(0x114)]===_0x59cce9(0xeb)?_0x219c03[_0x59cce9(0x114)]:undefined;if(_0x1b88ac?.[_0x59cce9(0x101)])return _0x6164de;if(_0x2cdce2&&_0x994823!==_0x2cdce2)return resolve(_0x105e92,_0x994823+_0x59cce9(0x118));return _0x6164de;}
@@ -1 +1 @@
1
- (function(_0xadfa4e,_0x59dbcb){const _0x502da0=a221_0x4376,_0x268548=_0xadfa4e();while(!![]){try{const _0x214d7c=parseInt(_0x502da0(0x15f))/0x1*(parseInt(_0x502da0(0x15a))/0x2)+-parseInt(_0x502da0(0x160))/0x3*(-parseInt(_0x502da0(0x156))/0x4)+-parseInt(_0x502da0(0x164))/0x5*(-parseInt(_0x502da0(0x167))/0x6)+parseInt(_0x502da0(0x158))/0x7*(parseInt(_0x502da0(0x159))/0x8)+parseInt(_0x502da0(0x166))/0x9*(parseInt(_0x502da0(0x15c))/0xa)+-parseInt(_0x502da0(0x157))/0xb*(-parseInt(_0x502da0(0x165))/0xc)+-parseInt(_0x502da0(0x168))/0xd*(parseInt(_0x502da0(0x163))/0xe);if(_0x214d7c===_0x59dbcb)break;else _0x268548['push'](_0x268548['shift']());}catch(_0x260e5a){_0x268548['push'](_0x268548['shift']());}}}(a221_0x3e8f,0x6f47b));import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';function a221_0x4376(_0x33af16,_0x232160){_0x33af16=_0x33af16-0x156;const _0x3e8fb5=a221_0x3e8f();let _0x43767a=_0x3e8fb5[_0x33af16];return _0x43767a;}const cache=new Map();function parseApiFile(_0xa1180a){const _0x3d9e42=a221_0x4376,_0x350758=[],_0x39e6a9=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x5d41ee;while((_0x5d41ee=_0x39e6a9[_0x3d9e42(0x15e)](_0xa1180a))!==null){_0x350758['push']({'datasetCode':_0x5d41ee[0x1],'tableName':_0x5d41ee[0x2],'name':_0x5d41ee[0x3],'alias':_0x5d41ee[0x4]});}return _0x350758;}export function loadAliasMap(_0x53840b,_0x2128fb,_0x4b734a){const _0x34d7d0=a221_0x4376,_0x32f339=_0x4b734a??resolve(process['cwd'](),_0x53840b,_0x34d7d0(0x16a));if(cache[_0x34d7d0(0x162)](_0x32f339))return cache[_0x34d7d0(0x169)](_0x32f339);if(!existsSync(_0x32f339))return cache[_0x34d7d0(0x161)](_0x32f339,[]),[];try{const _0x33b15f=readFileSync(_0x32f339,_0x34d7d0(0x15b)),_0x25b554=parseApiFile(_0x33b15f);return cache[_0x34d7d0(0x161)](_0x32f339,_0x25b554),_0x25b554;}catch{return cache['set'](_0x32f339,[]),[];}}export function resolveAlias(_0x536025,_0xd7dfa3,_0x1d284a,_0x4134e4){const _0x3c2bd2=a221_0x4376;if(!_0xd7dfa3)return undefined;const _0x57764e=loadAliasMap(_0x536025,_0x1d284a,_0x4134e4),_0x1d68e5=_0x57764e[_0x3c2bd2(0x16b)](_0x1c088d=>_0x1c088d['alias']===_0xd7dfa3);return _0x1d68e5?.[_0x3c2bd2(0x15d)];}function a221_0x3e8f(){const _0x39b691=['18hZOgmA','6123PGUMoF','get','api.ts','find','392LLVjfF','33BSEHwq','423059nYWTNi','80psTUCK','8BoXYma','utf-8','187490veWyvu','datasetCode','exec','73313cLnBXS','2361uNQkZp','set','has','45206MfpVar','726430NojWxn','89340BNgkNe','261tipmIy'];a221_0x3e8f=function(){return _0x39b691;};return a221_0x3e8f();}export function listAliases(_0x3f43b8,_0x2d1190,_0x138efd){return loadAliasMap(_0x3f43b8,_0x2d1190,_0x138efd);}
1
+ (function(_0x3f937d,_0x57f171){const _0x1a8b08=a223_0x1fd5,_0x25bd0a=_0x3f937d();while(!![]){try{const _0x198c8f=-parseInt(_0x1a8b08(0x87))/0x1+-parseInt(_0x1a8b08(0x7c))/0x2+-parseInt(_0x1a8b08(0x86))/0x3+-parseInt(_0x1a8b08(0x79))/0x4+-parseInt(_0x1a8b08(0x82))/0x5+-parseInt(_0x1a8b08(0x7a))/0x6*(parseInt(_0x1a8b08(0x7b))/0x7)+parseInt(_0x1a8b08(0x78))/0x8*(parseInt(_0x1a8b08(0x80))/0x9);if(_0x198c8f===_0x57f171)break;else _0x25bd0a['push'](_0x25bd0a['shift']());}catch(_0x2e24d0){_0x25bd0a['push'](_0x25bd0a['shift']());}}}(a223_0x39e1,0xe4d33));function a223_0x39e1(){const _0x52a6ca=['api.ts','datasetCode','4718388TgsCmN','1622909EUDahz','alias','264WyzVKA','2248240Aeoual','282tCoooV','219905ZHywyS','2710032PORZyL','cwd','exec','has','2462571Vxxpak','utf-8','7514370omXdrS','set'];a223_0x39e1=function(){return _0x52a6ca;};return a223_0x39e1();}function a223_0x1fd5(_0x427483,_0x1ad21e){_0x427483=_0x427483-0x77;const _0x39e151=a223_0x39e1();let _0x1fd585=_0x39e151[_0x427483];return _0x1fd585;}import{readFileSync,existsSync}from'node:fs';import{resolve}from'node:path';const cache=new Map();function parseApiFile(_0x4b3c69){const _0x200847=a223_0x1fd5,_0x19c3ae=[],_0x26c9d0=/\{\s*datasetCode:\s*"([^"]+)"\s*,\s*tableName:\s*"([^"]+)"\s*,\s*name:\s*"([^"]*?)"\s*,\s*alias:\s*"([^"]+)"\s*,?\s*\}/g;let _0x52caf0;while((_0x52caf0=_0x26c9d0[_0x200847(0x7e)](_0x4b3c69))!==null){_0x19c3ae['push']({'datasetCode':_0x52caf0[0x1],'tableName':_0x52caf0[0x2],'name':_0x52caf0[0x3],'alias':_0x52caf0[0x4]});}return _0x19c3ae;}export function loadAliasMap(_0x3963d0,_0x1396ce,_0x1cb799){const _0x2c6179=a223_0x1fd5,_0x9161c1=_0x1cb799??resolve(process[_0x2c6179(0x7d)](),_0x3963d0,_0x2c6179(0x84));if(cache[_0x2c6179(0x7f)](_0x9161c1))return cache['get'](_0x9161c1);if(!existsSync(_0x9161c1))return cache['set'](_0x9161c1,[]),[];try{const _0x26b398=readFileSync(_0x9161c1,_0x2c6179(0x81)),_0x1e1ec6=parseApiFile(_0x26b398);return cache[_0x2c6179(0x83)](_0x9161c1,_0x1e1ec6),_0x1e1ec6;}catch{return cache['set'](_0x9161c1,[]),[];}}export function resolveAlias(_0x17daea,_0x3b30d6,_0x99d9ef,_0x54b004){const _0x198bda=a223_0x1fd5;if(!_0x3b30d6)return undefined;const _0xab5272=loadAliasMap(_0x17daea,_0x99d9ef,_0x54b004),_0x2801d4=_0xab5272['find'](_0x7062f3=>_0x7062f3[_0x198bda(0x77)]===_0x3b30d6);return _0x2801d4?.[_0x198bda(0x85)];}export function listAliases(_0x34eca1,_0x79f042,_0x251eb2){return loadAliasMap(_0x34eca1,_0x79f042,_0x251eb2);}