@lovrabet/lovrabet-cli 2.1.9-beta.2 → 2.1.9-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/NOTICE +5 -0
  2. package/README.md +156 -0
  3. package/lib/cli.js +1 -1
  4. package/lib/commands/api-doc/index.js +1 -1
  5. package/lib/commands/app/cache.js +1 -1
  6. package/lib/commands/app/definitions.js +1 -1
  7. package/lib/commands/app/eligibility.js +1 -1
  8. package/lib/commands/app/mock-loader.js +1 -1
  9. package/lib/commands/app/remote-source.js +1 -1
  10. package/lib/commands/app/shared.js +1 -1
  11. package/lib/commands/app-config/get.js +1 -1
  12. package/lib/commands/app-config/index.js +1 -1
  13. package/lib/commands/app-config/shared.js +1 -1
  14. package/lib/commands/artifact/index.js +1 -1
  15. package/lib/commands/auth/index.js +1 -1
  16. package/lib/commands/auth/prompt.js +1 -1
  17. package/lib/commands/bff/detail.js +1 -1
  18. package/lib/commands/bff/exec.js +1 -1
  19. package/lib/commands/bff/index.js +1 -1
  20. package/lib/commands/cli-skill/index.js +1 -1
  21. package/lib/commands/common/config-policy.js +1 -1
  22. package/lib/commands/common/constraints.js +1 -1
  23. package/lib/commands/common/flags.js +1 -1
  24. package/lib/commands/common/local-file.js +1 -1
  25. package/lib/commands/config/definitions.js +1 -1
  26. package/lib/commands/config/shared.js +1 -1
  27. package/lib/commands/data/index.js +1 -1
  28. package/lib/commands/dataset/detail.js +1 -1
  29. package/lib/commands/dataset/index.js +1 -1
  30. package/lib/commands/dataset/list.js +1 -1
  31. package/lib/commands/dataset/sdk-doc.js +1 -1
  32. package/lib/commands/doctor.js +1 -1
  33. package/lib/commands/file/index.js +1 -1
  34. package/lib/commands/init.js +1 -1
  35. package/lib/commands/kb/index.js +1 -1
  36. package/lib/commands/logs/index.js +1 -1
  37. package/lib/commands/ocr/index.js +1 -1
  38. package/lib/commands/personal-bff/index.js +1 -1
  39. package/lib/commands/registry.js +1 -1
  40. package/lib/commands/schema.js +1 -1
  41. package/lib/commands/service/dynamic.js +1 -1
  42. package/lib/commands/service/index.js +1 -1
  43. package/lib/commands/service/registry.js +1 -1
  44. package/lib/commands/skill/commands/create.js +1 -1
  45. package/lib/commands/skill/commands/install.js +1 -1
  46. package/lib/commands/skill/commands/list.js +1 -1
  47. package/lib/commands/skill/commands/push.js +1 -1
  48. package/lib/commands/skill/commands/validate.js +1 -1
  49. package/lib/commands/skill/flags.js +1 -1
  50. package/lib/commands/skill/index.js +1 -1
  51. package/lib/commands/skill/manifest-helpers.js +1 -1
  52. package/lib/commands/skill/push-execute.js +1 -1
  53. package/lib/commands/skill/push-flow-helpers.js +1 -1
  54. package/lib/commands/skill/push-retarget.js +1 -1
  55. package/lib/commands/skill/scopes.js +1 -1
  56. package/lib/commands/skill/summary.js +1 -1
  57. package/lib/commands/skill/templates.js +1 -1
  58. package/lib/commands/skill/validate.js +1 -1
  59. package/lib/commands/sql/detail.js +1 -1
  60. package/lib/commands/sql/exec.js +1 -1
  61. package/lib/commands/sql/index.js +1 -1
  62. package/lib/commands/update.js +1 -1
  63. package/lib/commands/workspace/index.js +1 -1
  64. package/lib/config/schema.js +1 -1
  65. package/lib/constant/app.js +1 -1
  66. package/lib/constant/auth-mode.js +1 -1
  67. package/lib/constant/cli.js +1 -1
  68. package/lib/constant/defaults.js +1 -1
  69. package/lib/constant/distribution.js +1 -1
  70. package/lib/constant/domain.js +1 -1
  71. package/lib/constant/env.js +1 -1
  72. package/lib/constant/output.js +1 -1
  73. package/lib/constant/product.js +1 -1
  74. package/lib/constant/risk.js +1 -1
  75. package/lib/constant/url.js +1 -1
  76. package/lib/context.js +1 -1
  77. package/lib/core/api-client.js +1 -1
  78. package/lib/core/db-resolver.js +1 -1
  79. package/lib/core/sdk-client.js +1 -1
  80. package/lib/errors.js +1 -1
  81. package/lib/framework/build-all-flags.js +1 -1
  82. package/lib/framework/dryrun.js +1 -1
  83. package/lib/framework/flags.js +1 -1
  84. package/lib/framework/help.js +1 -1
  85. package/lib/framework/index.js +1 -1
  86. package/lib/framework/output.js +1 -1
  87. package/lib/framework/preparse.js +1 -1
  88. package/lib/framework/response.js +1 -1
  89. package/lib/framework/runner-confirmation.js +1 -1
  90. package/lib/framework/runner-error.js +1 -1
  91. package/lib/framework/runner.js +1 -1
  92. package/lib/framework/schema-export.js +1 -1
  93. package/lib/framework/service-order.js +1 -1
  94. package/lib/framework/types.js +1 -1
  95. package/lib/generated/build-info.js +1 -1
  96. package/lib/help.js +1 -1
  97. package/lib/skills/npx-skills-add.js +1 -1
  98. package/lib/skills/runtime-skill-sync/constants.js +1 -1
  99. package/lib/skills/runtime-skill-sync/fs-utils.js +1 -1
  100. package/lib/skills/runtime-skill-sync/hashing.js +1 -1
  101. package/lib/skills/runtime-skill-sync/links.js +1 -1
  102. package/lib/skills/runtime-skill-sync/list-local.js +1 -1
  103. package/lib/skills/runtime-skill-sync/local-files.js +1 -1
  104. package/lib/skills/runtime-skill-sync/materialize.js +1 -1
  105. package/lib/skills/runtime-skill-sync/metadata.js +1 -1
  106. package/lib/skills/runtime-skill-sync/paths.js +1 -1
  107. package/lib/skills/runtime-skill-sync/push.js +1 -1
  108. package/lib/skills/runtime-skill-sync/scopes.js +1 -1
  109. package/lib/skills/runtime-skill-sync/zip-codec.js +1 -1
  110. package/lib/skills/runtime-skill-sync/zip-package.js +1 -1
  111. package/lib/skills/runtime-skill-sync.js +1 -1
  112. package/lib/utils/apply-jq-filter.js +1 -1
  113. package/lib/utils/logger.js +1 -1
  114. package/lib/utils/params.js +1 -1
  115. package/lib/utils/platform.js +1 -1
  116. package/lib/utils/update-notice.js +1 -1
  117. package/lib/utils/version.js +1 -1
  118. package/lib/utils/write-cli-side-channel.js +1 -1
  119. package/package.json +18 -2
package/NOTICE ADDED
@@ -0,0 +1,5 @@
1
+ Lovrabet CLI
2
+ Copyright 2026 Lovrabet Team
3
+
4
+ This product includes software developed by the Lovrabet Team.
5
+ Project home: https://github.com/lovrabet/lovrabet-cli
package/README.md ADDED
@@ -0,0 +1,156 @@
1
+ # Lovrabet CLI
2
+
3
+ Lovrabet CLI is the runtime command-line interface for Lovrabet applications. It
4
+ helps developers, delivery teams, operators, and AI agents work with published
5
+ apps, datasets, records, SQL queries, BFF scripts, files, OCR, knowledge bases,
6
+ artifacts, and runtime Skills from a stable terminal surface.
7
+
8
+ The CLI is designed for runtime operations: discover the right app, inspect data
9
+ contracts, query real records, execute approved runtime capabilities, and turn
10
+ repeatable workflows into agent-ready Skills.
11
+
12
+ ## Requirements
13
+
14
+ - Node.js 20 or later
15
+ - A Lovrabet account with access to the target runtime app
16
+ - A User Access Key for authenticated commands
17
+
18
+ ## Install
19
+
20
+ ```bash
21
+ npm install -g @lovrabet/lovrabet-cli@latest
22
+ lovrabet --version
23
+ lovrabet --help
24
+ ```
25
+
26
+ You can also run a specific version with npm tooling:
27
+
28
+ ```bash
29
+ npx @lovrabet/lovrabet-cli@latest --help
30
+ ```
31
+
32
+ ## Quick Start
33
+
34
+ Authenticate first:
35
+
36
+ ```bash
37
+ lovrabet auth login
38
+ lovrabet auth info --format compress
39
+ ```
40
+
41
+ For non-interactive environments, pass an Access Key explicitly:
42
+
43
+ ```bash
44
+ lovrabet auth login --access-key <ACCESS_KEY>
45
+ ```
46
+
47
+ List available runtime apps:
48
+
49
+ ```bash
50
+ lovrabet app list
51
+ ```
52
+
53
+ Bind the current workspace to an app, or pass `--app` / `--appcode` on each
54
+ command:
55
+
56
+ ```bash
57
+ lovrabet workspace init --app <app-name>
58
+ lovrabet workspace init --appcode <app-code>
59
+ ```
60
+
61
+ Discover a dataset and inspect its contract before querying records:
62
+
63
+ ```bash
64
+ lovrabet dataset list --name customer
65
+ lovrabet dataset detail --code <dataset-code>
66
+ lovrabet data filter --code <dataset-code> --params '{"currentPage":1,"pageSize":20}'
67
+ ```
68
+
69
+ Use `--format pretty` for human-readable output and `--format json` or
70
+ `--format compress` for scripts and agents.
71
+
72
+ ## AI Agent Skill
73
+
74
+ If your coding environment supports the `skills` CLI, install the Lovrabet CLI
75
+ Built-in Skill so the agent can follow the correct app resolution, dataset
76
+ inspection, data query, and risk-control workflow:
77
+
78
+ ```bash
79
+ lovrabet cli-skill install
80
+ ```
81
+
82
+ Equivalent direct installation:
83
+
84
+ ```bash
85
+ npx skills add lovrabet/lovrabet-cli -g -y
86
+ ```
87
+
88
+ After selecting an app, install app-specific business Skills when available:
89
+
90
+ ```bash
91
+ lovrabet skill install
92
+ lovrabet skill install --scope personal
93
+ lovrabet skill install --scope company
94
+ ```
95
+
96
+ ## Common Commands
97
+
98
+ | Area | Commands |
99
+ | --- | --- |
100
+ | Authentication | `lovrabet auth login`, `lovrabet auth info`, `lovrabet auth logout` |
101
+ | App and workspace | `lovrabet app list`, `lovrabet workspace init`, `lovrabet workspace use` |
102
+ | Dataset discovery | `lovrabet dataset list`, `lovrabet dataset detail`, `lovrabet dataset sdk-doc` |
103
+ | Data operations | `lovrabet data filter`, `lovrabet data getOne`, `lovrabet data create`, `lovrabet data update`, `lovrabet data delete`, `lovrabet data aggregate` |
104
+ | SQL and BFF | `lovrabet sql detail`, `lovrabet sql exec`, `lovrabet bff detail`, `lovrabet bff exec` |
105
+ | Personal assets | `lovrabet personal-bff list`, `lovrabet artifact list`, `lovrabet kb list` |
106
+ | Runtime files and OCR | `lovrabet file upload`, `lovrabet file query-url`, `lovrabet ocr recognize` |
107
+ | Skills | `lovrabet cli-skill install`, `lovrabet skill install`, `lovrabet skill create`, `lovrabet skill validate`, `lovrabet skill push` |
108
+ | Diagnostics | `lovrabet doctor`, `lovrabet schema`, `lovrabet logs show`, `lovrabet update` |
109
+
110
+ Run command-level help for flags and prerequisites:
111
+
112
+ ```bash
113
+ lovrabet <service> --help
114
+ lovrabet <service> <command> --help
115
+ ```
116
+
117
+ ## Output and Automation
118
+
119
+ Global options are available across commands:
120
+
121
+ ```bash
122
+ lovrabet dataset list --format json
123
+ lovrabet data filter --code <dataset-code> --params '{"currentPage":1,"pageSize":10}' --jq '.data'
124
+ lovrabet data update --code <dataset-code> --params '{"id":1,"status":"done"}' --dry-run
125
+ ```
126
+
127
+ Important options:
128
+
129
+ - `--app <name>`: select an app profile by name
130
+ - `--appcode <code>`: override the target app code
131
+ - `--env production|development|daily`: choose the target environment
132
+ - `--format json|pretty|compress`: choose output format
133
+ - `--jq <expr>`: filter JSON output
134
+ - `--dry-run`: preview supported write operations
135
+ - `--yes`: skip confirmation for high-risk writes
136
+ - `--non-interactive`: force CI-friendly behavior
137
+
138
+ ## Safety Notes
139
+
140
+ - Inspect dataset contracts with `dataset detail` before writing records.
141
+ - Prefer read commands before write commands when diagnosing data issues.
142
+ - Use `--dry-run` where supported before create, update, delete, artifact,
143
+ personal BFF, or Skill operations.
144
+ - Use `--yes` only when the target app, dataset, parameters, and impact are
145
+ already verified.
146
+ - Do not commit Access Keys, generated credentials, or local user config files.
147
+
148
+ ## Documentation
149
+
150
+ - Website: <https://www.lovrabet.com>
151
+ - Developer documentation: <https://open.lovrabet.com/>
152
+ - CLI help: `lovrabet --help`
153
+
154
+ ## License
155
+
156
+ Licensed under Apache-2.0. See `LICENSE` and `NOTICE` for details.
package/lib/cli.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- (function(_0x5aea05,_0x967a52){const _0x4c8bf0=a0_0x121c,_0x1fdc85=_0x5aea05();while(!![]){try{const _0x2b9439=-parseInt(_0x4c8bf0(0x152))/0x1*(-parseInt(_0x4c8bf0(0x162))/0x2)+parseInt(_0x4c8bf0(0x14a))/0x3*(-parseInt(_0x4c8bf0(0x159))/0x4)+-parseInt(_0x4c8bf0(0x153))/0x5+-parseInt(_0x4c8bf0(0x156))/0x6+-parseInt(_0x4c8bf0(0x161))/0x7*(-parseInt(_0x4c8bf0(0x15a))/0x8)+parseInt(_0x4c8bf0(0x13f))/0x9*(-parseInt(_0x4c8bf0(0x149))/0xa)+-parseInt(_0x4c8bf0(0x167))/0xb*(-parseInt(_0x4c8bf0(0x166))/0xc);if(_0x2b9439===_0x967a52)break;else _0x1fdc85['push'](_0x1fdc85['shift']());}catch(_0x7d6d54){_0x1fdc85['push'](_0x1fdc85['shift']());}}}(a0_0x1d6c,0x6efb7));function a0_0x1d6c(){const _0x38a88e=['Unexpected\x20error:','38763GWcDbi','exitCode','\x20->\x20--','length','original','ExitPromptError','slice','message','log','exit','1880tUXNdY','90SYtYHB','cancelled','error','assign','\x0aCancelled.\x0a','args','code',':\x20--','1IMpXFD','4001060KGqfqP','input','stderr','3315216nBtSqG','write','help','55804IeJcgM','40tEYyFu','hint','ERR_STREAM_DESTROYED','unknownCommand','name','Error:\x20','defaultCommand','1063349YvCgOW','1119804Bjpfzv','[preparse]\x20','handler','flags','2059368orHeyN','110QIUbjQ','definition'];a0_0x1d6c=function(){return _0x38a88e;};return a0_0x1d6c();}import{jsx as a0_0x52bda0}from'react/jsx-runtime';import a0_0x1dbae9 from'meow';import{render}from'ink';function a0_0x121c(_0x4e3620,_0x1a577a){_0x4e3620=_0x4e3620-0x13f;const _0x1d6c6f=a0_0x1d6c();let _0x121c48=_0x1d6c6f[_0x4e3620];return _0x121c48;}import{Help}from'./help.js';import{CliError,CliErrors}from'./errors.js';import{buildConfigFromFlags,initGlobalEnvironment}from'./context.js';import{isKnownService,getServiceEntry,findDefinition,getAllDefinitions}from'./commands/registry.js';import{generateDynamicServiceHelp,resolveDynamicServiceCommand}from'./commands/service/dynamic.js';import{runCommand,createPipelineEnv}from'./framework/runner.js';import{generateCommandHelp,generateServiceHelp,generateFullHelp}from'./framework/help.js';import{buildMeowFlags}from'./constant/cli.js';import{getCliVersionDisplay}from'./utils/version.js';const helpText=generateFullHelp(),cli=a0_0x1dbae9(helpText,{'importMeta':import.meta,'flags':buildMeowFlags(),'version':getCliVersionDisplay()});void main()['catch'](handleError);async function main(){try{await run();}catch(_0x39d1ea){handleError(_0x39d1ea);}}async function run(){const _0x49db36=a0_0x121c;let _0x1690a1=cli[_0x49db36(0x154)][0x0],_0x548364=cli['input'][0x1];const _0x25cd97=cli[_0x49db36(0x165)];try{const {correctFlags:_0x4fb320}=await import('./framework/preparse.js'),_0x8acf2d=getAllDefinitions()['flatMap'](_0x60b324=>_0x60b324[_0x49db36(0x165)]??[]),{flags:_0x4a5c1d,corrections:_0x39a8c2}=_0x4fb320(_0x25cd97,_0x8acf2d);if(_0x39a8c2[_0x49db36(0x142)]>0x0){for(const _0x252592 of _0x39a8c2){process[_0x49db36(0x155)][_0x49db36(0x157)](_0x49db36(0x163)+_0x252592[_0x49db36(0x164)]+_0x49db36(0x151)+_0x252592[_0x49db36(0x143)]+_0x49db36(0x141)+_0x252592['corrected']+'\x0a');}Object[_0x49db36(0x14d)](_0x25cd97,_0x4a5c1d);}}catch{}if(!_0x1690a1){const {waitUntilExit:_0x39d238}=render(a0_0x52bda0(Help,{}));await _0x39d238();return;}if(!isKnownService(_0x1690a1)){const _0x1a817d=resolveDynamicServiceCommand(cli[_0x49db36(0x154)],_0x25cd97);if(_0x1a817d){if(_0x25cd97[_0x49db36(0x158)]){console[_0x49db36(0x147)](generateCommandHelp(_0x1a817d[_0x49db36(0x168)]));return;}Object['assign'](_0x25cd97,_0x1a817d[_0x49db36(0x165)]);const _0x3cdee8=buildConfigFromFlags(_0x25cd97);await initGlobalEnvironment(_0x3cdee8);const _0x344dd9=createPipelineEnv(_0x3cdee8,_0x25cd97);_0x344dd9[_0x49db36(0x14f)]=_0x1a817d[_0x49db36(0x14f)],await runCommand(_0x1a817d['definition'],_0x344dd9);return;}if(_0x25cd97['help']){const _0x295f98=generateDynamicServiceHelp(_0x1690a1);if(_0x295f98){console[_0x49db36(0x147)](_0x295f98);return;}}const {waitUntilExit:_0x14c27f}=render(a0_0x52bda0(Help,{}));await _0x14c27f();return;}const _0x459ee2=getServiceEntry(_0x1690a1);if(!_0x548364){if(_0x25cd97['help']){console['log'](generateServiceHelp(_0x1690a1));return;}if(_0x459ee2[_0x49db36(0x160)])_0x548364=_0x459ee2[_0x49db36(0x160)];else{console[_0x49db36(0x147)](generateServiceHelp(_0x1690a1));return;}}const _0x5d838c=findDefinition(_0x1690a1,_0x548364);!_0x5d838c&&(console['log'](generateServiceHelp(_0x1690a1)),handleError(CliErrors[_0x49db36(0x15d)](_0x1690a1+'\x20'+_0x548364)));if(_0x25cd97[_0x49db36(0x158)]){console['log'](generateCommandHelp(_0x5d838c));return;}const _0x235a9b=buildConfigFromFlags(_0x25cd97);await initGlobalEnvironment(_0x235a9b);const _0x41988c=createPipelineEnv(_0x235a9b,_0x25cd97);_0x41988c[_0x49db36(0x14f)]=cli[_0x49db36(0x154)][_0x49db36(0x145)](0x2),await runCommand(_0x5d838c,_0x41988c);}function handleError(_0x69f71d){const _0x23a293=a0_0x121c;if(_0x69f71d instanceof CliError){_0x69f71d[_0x23a293(0x150)]===_0x23a293(0x14b)&&(process[_0x23a293(0x155)][_0x23a293(0x157)]('\x0aCancelled.\x0a'),process[_0x23a293(0x148)](0x0));console[_0x23a293(0x14c)](_0x23a293(0x15f)+_0x69f71d[_0x23a293(0x146)]);if(_0x69f71d['hint'])console['error']('Hint:\x20'+_0x69f71d[_0x23a293(0x15b)]);process['exit'](_0x69f71d[_0x23a293(0x140)]);}isUserCancellation(_0x69f71d)&&(process[_0x23a293(0x155)][_0x23a293(0x157)](_0x23a293(0x14e)),process[_0x23a293(0x148)](0x0)),console[_0x23a293(0x14c)](_0x23a293(0x169),_0x69f71d),process[_0x23a293(0x148)](0x1);}function isUserCancellation(_0x26c6c9){const _0x378a28=a0_0x121c;if(!(_0x26c6c9 instanceof Error))return![];if(_0x26c6c9[_0x378a28(0x15e)]===_0x378a28(0x144))return!![];if(_0x26c6c9[_0x378a28(0x150)]==='ERR_USE_AFTER_CLOSE')return!![];if(_0x26c6c9[_0x378a28(0x150)]===_0x378a28(0x15c))return!![];return![];}
2
+ const a0_0x49fef4=a0_0x2a84;(function(_0x29aa0d,_0xc83115){const _0x4e032f=a0_0x2a84,_0x516006=_0x29aa0d();while(!![]){try{const _0x487262=parseInt(_0x4e032f(0x97))/0x1+-parseInt(_0x4e032f(0x88))/0x2+parseInt(_0x4e032f(0x8e))/0x3+parseInt(_0x4e032f(0x93))/0x4+parseInt(_0x4e032f(0x7c))/0x5+parseInt(_0x4e032f(0x9e))/0x6+-parseInt(_0x4e032f(0x8b))/0x7;if(_0x487262===_0xc83115)break;else _0x516006['push'](_0x516006['shift']());}catch(_0x2a5943){_0x516006['push'](_0x516006['shift']());}}}(a0_0x28b5,0x86a9e));function a0_0x2a84(_0x3eef4c,_0x3dd23c){_0x3eef4c=_0x3eef4c-0x7c;const _0x28b59f=a0_0x28b5();let _0x2a84cb=_0x28b59f[_0x3eef4c];return _0x2a84cb;}import{jsx as a0_0x15bf29}from'react/jsx-runtime';import a0_0x3d9436 from'meow';import{render}from'ink';import{Help}from'./help.js';import{CliError,CliErrors}from'./errors.js';import{buildConfigFromFlags,initGlobalEnvironment}from'./context.js';import{isKnownService,getServiceEntry,findDefinition,getAllDefinitions}from'./commands/registry.js';import{generateDynamicServiceHelp,resolveDynamicServiceCommand}from'./commands/service/dynamic.js';import{runCommand,createPipelineEnv}from'./framework/runner.js';import{generateCommandHelp,generateServiceHelp,generateFullHelp}from'./framework/help.js';function a0_0x28b5(){const _0x3a0119=['2144211lNtaJn','write','ERR_STREAM_DESTROYED','unknownCommand','ERR_USE_AFTER_CLOSE','1886224vwGuDV','definition','exitCode','code','884952ZCPQZU','stderr','flags','input','Unexpected\x20error:','ExitPromptError','args','348540CpmQDz','slice','log','\x20->\x20--','hint','catch','3507735VBilyz','Hint:\x20','error','handler','cancelled','corrected','exit','assign','./framework/preparse.js','help','[preparse]\x20','flatMap','202182BbbIuS','length','message','15247463skMEmk','\x0aCancelled.\x0a','defaultCommand'];a0_0x28b5=function(){return _0x3a0119;};return a0_0x28b5();}import{buildMeowFlags}from'./constant/cli.js';import{getCliVersionDisplay}from'./utils/version.js';const helpText=generateFullHelp(),cli=a0_0x3d9436(helpText,{'importMeta':import.meta,'flags':buildMeowFlags(),'version':getCliVersionDisplay()});void main()[a0_0x49fef4(0xa3)](handleError);async function main(){try{await run();}catch(_0x5f1a6e){handleError(_0x5f1a6e);}}async function run(){const _0x4af414=a0_0x49fef4;let _0x4300d4=cli[_0x4af414(0x9a)][0x0],_0x17a535=cli[_0x4af414(0x9a)][0x1];const _0x279cc0=cli[_0x4af414(0x99)];try{const {correctFlags:_0x37c30e}=await import(_0x4af414(0x84)),_0x1e4a56=getAllDefinitions()[_0x4af414(0x87)](_0x33f2c8=>_0x33f2c8[_0x4af414(0x99)]??[]),{flags:_0x134f2a,corrections:_0xf3b958}=_0x37c30e(_0x279cc0,_0x1e4a56);if(_0xf3b958[_0x4af414(0x89)]>0x0){for(const _0x4d355c of _0xf3b958){process[_0x4af414(0x98)]['write'](_0x4af414(0x86)+_0x4d355c[_0x4af414(0x7f)]+':\x20--'+_0x4d355c['original']+_0x4af414(0xa1)+_0x4d355c[_0x4af414(0x81)]+'\x0a');}Object['assign'](_0x279cc0,_0x134f2a);}}catch{}if(!_0x4300d4){const {waitUntilExit:_0x5414d4}=render(a0_0x15bf29(Help,{}));await _0x5414d4();return;}if(!isKnownService(_0x4300d4)){const _0x508d01=resolveDynamicServiceCommand(cli[_0x4af414(0x9a)],_0x279cc0);if(_0x508d01){if(_0x279cc0['help']){console[_0x4af414(0xa0)](generateCommandHelp(_0x508d01[_0x4af414(0x94)]));return;}Object[_0x4af414(0x83)](_0x279cc0,_0x508d01[_0x4af414(0x99)]);const _0x1c58ef=buildConfigFromFlags(_0x279cc0);await initGlobalEnvironment(_0x1c58ef);const _0x39a95e=createPipelineEnv(_0x1c58ef,_0x279cc0);_0x39a95e['args']=_0x508d01['args'],await runCommand(_0x508d01[_0x4af414(0x94)],_0x39a95e);return;}if(_0x279cc0[_0x4af414(0x85)]){const _0x4c4007=generateDynamicServiceHelp(_0x4300d4);if(_0x4c4007){console[_0x4af414(0xa0)](_0x4c4007);return;}}const {waitUntilExit:_0xb69b84}=render(a0_0x15bf29(Help,{}));await _0xb69b84();return;}const _0x432465=getServiceEntry(_0x4300d4);if(!_0x17a535){if(_0x279cc0['help']){console[_0x4af414(0xa0)](generateServiceHelp(_0x4300d4));return;}if(_0x432465[_0x4af414(0x8d)])_0x17a535=_0x432465['defaultCommand'];else{console['log'](generateServiceHelp(_0x4300d4));return;}}const _0xe13126=findDefinition(_0x4300d4,_0x17a535);!_0xe13126&&(console[_0x4af414(0xa0)](generateServiceHelp(_0x4300d4)),handleError(CliErrors[_0x4af414(0x91)](_0x4300d4+'\x20'+_0x17a535)));if(_0x279cc0[_0x4af414(0x85)]){console[_0x4af414(0xa0)](generateCommandHelp(_0xe13126));return;}const _0x5a3225=buildConfigFromFlags(_0x279cc0);await initGlobalEnvironment(_0x5a3225);const _0x2ede5c=createPipelineEnv(_0x5a3225,_0x279cc0);_0x2ede5c[_0x4af414(0x9d)]=cli[_0x4af414(0x9a)][_0x4af414(0x9f)](0x2),await runCommand(_0xe13126,_0x2ede5c);}function handleError(_0x1d8448){const _0x2c386e=a0_0x49fef4;if(_0x1d8448 instanceof CliError){_0x1d8448[_0x2c386e(0x96)]===_0x2c386e(0x80)&&(process[_0x2c386e(0x98)][_0x2c386e(0x8f)](_0x2c386e(0x8c)),process['exit'](0x0));console[_0x2c386e(0x7e)]('Error:\x20'+_0x1d8448[_0x2c386e(0x8a)]);if(_0x1d8448[_0x2c386e(0xa2)])console[_0x2c386e(0x7e)](_0x2c386e(0x7d)+_0x1d8448[_0x2c386e(0xa2)]);process['exit'](_0x1d8448[_0x2c386e(0x95)]);}isUserCancellation(_0x1d8448)&&(process[_0x2c386e(0x98)]['write'](_0x2c386e(0x8c)),process[_0x2c386e(0x82)](0x0)),console[_0x2c386e(0x7e)](_0x2c386e(0x9b),_0x1d8448),process[_0x2c386e(0x82)](0x1);}function isUserCancellation(_0x87853e){const _0x3bcf6c=a0_0x49fef4;if(!(_0x87853e instanceof Error))return![];if(_0x87853e['name']===_0x3bcf6c(0x9c))return!![];if(_0x87853e[_0x3bcf6c(0x96)]===_0x3bcf6c(0x92))return!![];if(_0x87853e[_0x3bcf6c(0x96)]===_0x3bcf6c(0x90))return!![];return![];}
@@ -1 +1 @@
1
- const a1_0x1fba45=a1_0x4212;function a1_0x4212(_0x30ee1b,_0x368391){_0x30ee1b=_0x30ee1b-0x83;const _0x606f3f=a1_0x606f();let _0x4212e3=_0x606f3f[_0x30ee1b];return _0x4212e3;}(function(_0x1c7831,_0x2a83dc){const _0x598df0=a1_0x4212,_0x54f41b=_0x1c7831();while(!![]){try{const _0x3450ef=parseInt(_0x598df0(0xa2))/0x1+-parseInt(_0x598df0(0xbc))/0x2+-parseInt(_0x598df0(0xb1))/0x3+-parseInt(_0x598df0(0xcb))/0x4*(-parseInt(_0x598df0(0xd8))/0x5)+parseInt(_0x598df0(0xab))/0x6*(-parseInt(_0x598df0(0xa9))/0x7)+parseInt(_0x598df0(0xf3))/0x8*(parseInt(_0x598df0(0xa5))/0x9)+-parseInt(_0x598df0(0xb7))/0xa*(parseInt(_0x598df0(0xef))/0xb);if(_0x3450ef===_0x2a83dc)break;else _0x54f41b['push'](_0x54f41b['shift']());}catch(_0x433f3f){_0x54f41b['push'](_0x54f41b['shift']());}}}(a1_0x606f,0x96714));import{CliErrors}from'../../errors.js';const CATEGORY_FLAG={'name':a1_0x1fba45(0xed),'type':a1_0x1fba45(0xd1),'description':a1_0x1fba45(0xc9)},KEYWORD_FLAG={'name':a1_0x1fba45(0xae),'type':'string','description':'Search\x20docs\x20by\x20code,\x20summary,\x20path,\x20or\x20usage\x20text'},DOC_CODE_FLAG={'name':'code','type':a1_0x1fba45(0xd1),'required':!![],'description':'API\x20doc\x20code,\x20for\x20example\x20dataset_list'},DOCS=[{'code':a1_0x1fba45(0xf4),'category':'dataset','title':a1_0x1fba45(0xea),'method':a1_0x1fba45(0x85),'path':a1_0x1fba45(0x99),'summary':a1_0x1fba45(0x92),'whenToUse':a1_0x1fba45(0xaa),'pathParams':[],'queryParams':[],'bodySchema':a1_0x1fba45(0xb4),'responseHighlights':['tableData\x20contains\x20dataset\x20id/code/name',a1_0x1fba45(0xe8)],'examples':[a1_0x1fba45(0x90)],'notes':[a1_0x1fba45(0xee)],'markdown':[a1_0x1fba45(0xd3),'',a1_0x1fba45(0xa4)]['join']('\x0a')},{'code':'dataset_detail','category':a1_0x1fba45(0xd7),'title':'Dataset\x20detail','method':a1_0x1fba45(0x9c),'path':a1_0x1fba45(0xa0),'summary':'获取数据集详情','whenToUse':a1_0x1fba45(0x93),'pathParams':[],'queryParams':[{'name':a1_0x1fba45(0x9a),'description':a1_0x1fba45(0xad)}],'bodySchema':a1_0x1fba45(0xdb),'responseHighlights':[a1_0x1fba45(0xca),a1_0x1fba45(0xac),a1_0x1fba45(0x8d)],'examples':[a1_0x1fba45(0xf6)],'notes':[a1_0x1fba45(0xbf)],'markdown':[a1_0x1fba45(0xbe),'',a1_0x1fba45(0x95)][a1_0x1fba45(0xa1)]('\x0a')},{'code':a1_0x1fba45(0xda),'category':a1_0x1fba45(0xd7),'title':a1_0x1fba45(0xd5),'method':a1_0x1fba45(0x85),'path':a1_0x1fba45(0xdf),'summary':'条件过滤查询数据','whenToUse':a1_0x1fba45(0xf2),'pathParams':[{'name':'appCode','description':a1_0x1fba45(0xd4)},{'name':a1_0x1fba45(0xb2),'description':a1_0x1fba45(0xad)}],'queryParams':[],'bodySchema':a1_0x1fba45(0xbb),'responseHighlights':[a1_0x1fba45(0xec),a1_0x1fba45(0xdd)],'examples':[a1_0x1fba45(0x97)],'notes':[a1_0x1fba45(0xb0)],'markdown':['##\x20Filter\x20dataset\x20data','',a1_0x1fba45(0x98)]['join']('\x0a')},{'code':a1_0x1fba45(0x89),'category':'dataset','title':'Aggregate\x20dataset\x20data','method':a1_0x1fba45(0x85),'path':a1_0x1fba45(0xe3),'summary':a1_0x1fba45(0x9d),'whenToUse':a1_0x1fba45(0xd6),'pathParams':[{'name':a1_0x1fba45(0xb8),'description':a1_0x1fba45(0xd4)},{'name':a1_0x1fba45(0xb2),'description':a1_0x1fba45(0xad)}],'queryParams':[],'bodySchema':'{\x22aggregate\x22:[{\x22column\x22:\x20\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[]}','responseHighlights':[a1_0x1fba45(0xd2),'where\x20filters\x20before\x20aggregation'],'examples':[a1_0x1fba45(0xd9)],'notes':[a1_0x1fba45(0xa8),'`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.'],'markdown':[a1_0x1fba45(0xe7),'',a1_0x1fba45(0xf0)][a1_0x1fba45(0xa1)]('\x0a')},{'code':a1_0x1fba45(0xc3),'category':a1_0x1fba45(0xd7),'title':a1_0x1fba45(0x96),'method':a1_0x1fba45(0x85),'path':a1_0x1fba45(0xcd),'summary':a1_0x1fba45(0xba),'whenToUse':a1_0x1fba45(0xcf),'pathParams':[{'name':a1_0x1fba45(0xb8),'description':a1_0x1fba45(0xd4)},{'name':a1_0x1fba45(0xb2),'description':a1_0x1fba45(0xad)}],'queryParams':[],'bodySchema':'{\x22id\x22:123}','responseHighlights':['Returns\x20one\x20matching\x20business\x20record'],'examples':['lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27'],'notes':[a1_0x1fba45(0x8f)],'markdown':'##\x20Get\x20one\x20dataset\x20record\x0a\x0aRead\x20one\x20record\x20by\x20id.'},{'code':a1_0x1fba45(0x84),'category':a1_0x1fba45(0xd7),'title':a1_0x1fba45(0x88),'method':a1_0x1fba45(0x85),'path':a1_0x1fba45(0xb5),'summary':a1_0x1fba45(0xcc),'whenToUse':a1_0x1fba45(0xf7),'pathParams':[{'name':a1_0x1fba45(0xb8),'description':a1_0x1fba45(0xd4)},{'name':a1_0x1fba45(0xb2),'description':a1_0x1fba45(0xad)}],'queryParams':[],'bodySchema':a1_0x1fba45(0xc6),'responseHighlights':['Returns\x20the\x20created\x20record\x20or\x20backend\x20operation\x20result'],'examples':['lovrabet\x20data\x20create\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22name\x22:\x22demo\x22}\x27'],'notes':['This\x20is\x20a\x20write\x20operation;\x20use\x20dry-run\x20when\x20available\x20and\x20safe\x20fixtures\x20for\x20smoke\x20tests.'],'markdown':a1_0x1fba45(0xaf)},{'code':a1_0x1fba45(0xa7),'category':'bf','title':a1_0x1fba45(0xb3),'method':a1_0x1fba45(0x9c),'path':a1_0x1fba45(0xce),'summary':a1_0x1fba45(0xf1),'whenToUse':a1_0x1fba45(0xeb),'pathParams':[{'name':'appCode','description':a1_0x1fba45(0xd4)}],'queryParams':[],'bodySchema':a1_0x1fba45(0xdb),'responseHighlights':[a1_0x1fba45(0x9f)],'examples':[a1_0x1fba45(0x8b)],'notes':[a1_0x1fba45(0x83)],'markdown':'##\x20List\x20BF\x20endpoint\x20functions\x0a\x0aDiscover\x20executable\x20endpoint\x20functions.'},{'code':'bf_execute','category':'bf','title':a1_0x1fba45(0x86),'method':'POST','path':a1_0x1fba45(0xc0),'summary':a1_0x1fba45(0xe2),'whenToUse':a1_0x1fba45(0xf5),'pathParams':[{'name':a1_0x1fba45(0xb8),'description':a1_0x1fba45(0xd4)},{'name':a1_0x1fba45(0xdc),'description':a1_0x1fba45(0xe1)}],'queryParams':[],'bodySchema':'{\x22param\x22:\x22value\x22}','responseHighlights':['Returns\x20script\x20business\x20payload'],'examples':['lovrabet\x20bff\x20exec\x20--name\x20<functionName>\x20--params\x20\x27{}\x27'],'notes':['Script\x20behavior\x20may\x20have\x20side\x20effects;\x20inspect\x20detail\x20first.'],'markdown':a1_0x1fba45(0xe9)},{'code':a1_0x1fba45(0xc7),'category':a1_0x1fba45(0xe4),'title':'Execute\x20custom\x20SQL','method':a1_0x1fba45(0x85),'path':a1_0x1fba45(0x8c),'summary':a1_0x1fba45(0xbd),'whenToUse':'已经确认目标\x20sqlCode\x20存在,并需要实际执行该自定义\x20SQL\x20时使用','pathParams':[],'queryParams':[],'bodySchema':a1_0x1fba45(0x87),'responseHighlights':[a1_0x1fba45(0xde)],'examples':[a1_0x1fba45(0xc8)],'notes':[a1_0x1fba45(0x94)],'markdown':a1_0x1fba45(0x9b)}];function a1_0x606f(){const _0x1a1bfd=['lovrabet\x20dataset\x20list\x20--appcode\x20<appCode>\x20--format\x20compress','API\x20doc\x20code\x20not\x20found:\x20','分页获取数据集列表','需要按数据集\x20code\x20获取字段、表信息、关联关系(relations)或操作定义时使用','Use\x20`lovrabet\x20sql\x20detail`\x20before\x20execution.','Inspect\x20field\x20names,\x20relations,\x20and\x20operation\x20metadata\x20for\x20a\x20known\x20dataset\x20code.','Get\x20one\x20dataset\x20record','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22currentPage\x22:1,\x22pageSize\x22:5}\x27','Use\x20`where`,\x20`select`,\x20`orderBy`,\x20`currentPage`,\x20and\x20`pageSize`\x20to\x20inspect\x20live\x20data\x20shape.','/api/dataset/get-dataset-list-by-app-code','code','##\x20Execute\x20custom\x20SQL\x0a\x0aExecute\x20a\x20configured\x20SQL\x20script\x20by\x20sqlCode.','GET','聚合查询数据集数据','str','Returns\x20endpoint\x20functionName/id/description','/api/dataset/getOneByCode?code={datasetCode}','join','1209892PxNHmG','includes','Use\x20this\x20API\x20or\x20`lovrabet\x20dataset\x20list`\x20to\x20discover\x20available\x20dataset\x20codes\x20before\x20reading\x20data.','5103963eIUWJQ','path','bf_function_list','Use\x20`having`\x20only\x20for\x20post-aggregation\x20filters.','35qLZVVj','需要按\x20appCode\x20分页获取运行态数据集列表,并优先收敛可用\x20datasetCode\x20时使用','84714UOLzPG','relations\x20contains\x20the\x20object-shaped\x20API\x20relations\x20value\x20when\x20returned','32-character\x20dataset\x20code','keyword','##\x20Create\x20dataset\x20record\x0a\x0aCreate\x20one\x20data\x20record\x20in\x20a\x20dataset.','Use\x20read-only\x20data\x20commands\x20before\x20writing\x20Artifacts\x20that\x20display\x20real\x20data.','2683677ofVgqv','datasetCode','List\x20BF\x20endpoint\x20functions','{\x22appCode\x22:\x22app-aa63b188\x22,\x22currentPage\x22:1,\x22pageSize\x22:100}','/api/{appCode}/{datasetCode}/create','toLowerCase','773950OTRQDn','appCode','whenToUse','查询单条数据','{\x22where\x22:{},\x22currentPage\x22:1,\x22pageSize\x22:20}','1296152gnUujN','执行自定义\x20SQL','##\x20Dataset\x20detail','If\x20SDK\x20usage\x20is\x20needed,\x20follow\x20with\x20`lovrabet\x20dataset\x20sdk-doc\x20--code\x20<datasetCode>`.','/api/endpoint/{appCode}/{scriptName}','trim','filter','dataset_data_get_one','detail','map','{\x22fieldName\x22:\x22value\x22}','custom_sql_execute','lovrabet\x20sql\x20exec\x20--sqlcode\x20<sqlCode>\x20--params\x20\x27{}\x27','Filter\x20docs\x20by\x20category,\x20for\x20example\x20dataset','fields/properties\x20describe\x20data\x20shape','52rGiAXP','创建数据','/api/{appCode}/{datasetCode}/getOne','/api/endpoint/{appCode}/functions','已经知道记录\x20id,需要按数据集读取单条业务数据时使用','api-doc','string','result\x20rows\x20contain\x20aggregate\x20aliases','##\x20List\x20datasets','Current\x20app\x20code','Filter\x20dataset\x20data','需要按\x20groupBy\x20分组并做\x20count、sum、avg、max、min\x20等聚合统计时使用','dataset','104735zcDsEU','lovrabet\x20data\x20aggregate\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}]}\x27','dataset_data_filter','None','scriptName','paging\x20contains\x20pagination','Returns\x20SQL\x20execution\x20payload','/api/{appCode}/{datasetCode}/filter','method','Endpoint\x20function\x20name','执行指定\x20BF\x20函数','/api/{appCode}/{datasetCode}/aggregate','custom_sql','List\x20available\x20runtime\x20API\x20documentation\x20entries','read','##\x20Aggregate\x20dataset\x20data','paging.totalCount\x20gives\x20total\x20rows','##\x20Execute\x20BF\x20endpoint\x20function\x0a\x0aExecute\x20a\x20known\x20endpoint\x20script.','List\x20datasets','需要先确认当前应用有哪些可执行的\x20BF/ENDPOINT\x20函数,以及收敛可用\x20scriptName\x20时使用','tableData\x20contains\x20records','category','CLI\x20users\x20should\x20prefer\x20`lovrabet\x20dataset\x20list`\x20for\x20this\x20workflow.','55rsjHfy','Aggregate\x20supports\x20COUNT,\x20SUM,\x20AVG,\x20MAX,\x20and\x20MIN\x20definitions\x20in\x20the\x20`aggregate`\x20array.','获取应用下可调用的\x20BF\x20函数列表','需要携带\x20where、orderBy、分页等条件读取业务数据时使用','16gFcifm','dataset_list','已经确认目标\x20BF\x20的\x20scriptName,且需要实际调用该\x20ENDPOINT\x20脚本完成业务操作时使用','lovrabet\x20dataset\x20detail\x20--code\x20<datasetCode>\x20--appcode\x20<appCode>','需要向指定数据集新增一条业务数据时使用','CLI\x20has\x20typed\x20`bff\x20detail`\x20and\x20`bff\x20exec`\x20commands\x20for\x20endpoint\x20scripts.','dataset_data_create','POST','Execute\x20BF\x20endpoint\x20function','{\x22appCode\x22:\x22app-aa63b188\x22,\x22sqlCode\x22:\x22xxxxxxxx-xxxxxxxx\x22,\x22params\x22:{}}','Create\x20dataset\x20record','dataset_data_aggregate','title','lovrabet\x20bff\x20detail\x20--id\x20<scriptId>\x20--appcode\x20<appCode>','/api/custom/executeSql','operations\x20describes\x20runtime\x20APIs','Show\x20runtime\x20API\x20documentation\x20by\x20code','Prefer\x20`filter`\x20when\x20the\x20record\x20id\x20is\x20unknown.'];a1_0x606f=function(){return _0x1a1bfd;};return a1_0x606f();}function entrySummary(_0x588c9e){const _0xc197b9=a1_0x1fba45;return{'code':_0x588c9e['code'],'category':_0x588c9e[_0xc197b9(0xed)],'method':_0x588c9e['method'],'path':_0x588c9e[_0xc197b9(0xa6)],'summary':_0x588c9e['summary'],'whenToUse':_0x588c9e[_0xc197b9(0xb9)]};}export function listApiDocEntries(_0x164c88={}){const _0x506558=a1_0x1fba45,_0x390f38=String(_0x164c88[_0x506558(0xed)]||'')[_0x506558(0xc1)](),_0x1db4bc=String(_0x164c88[_0x506558(0xae)]||'')[_0x506558(0xc1)]()[_0x506558(0xb6)]();return DOCS[_0x506558(0xc2)](_0x4aed6e=>{const _0xf6cb85=_0x506558;if(_0x390f38&&_0x4aed6e[_0xf6cb85(0xed)]!==_0x390f38)return![];if(!_0x1db4bc)return!![];return[_0x4aed6e[_0xf6cb85(0x9a)],_0x4aed6e['category'],_0x4aed6e[_0xf6cb85(0xe0)],_0x4aed6e[_0xf6cb85(0xa6)],_0x4aed6e['summary'],_0x4aed6e[_0xf6cb85(0xb9)],_0x4aed6e[_0xf6cb85(0x8a)]][_0xf6cb85(0xa1)]('\x20')[_0xf6cb85(0xb6)]()[_0xf6cb85(0xa3)](_0x1db4bc);})[_0x506558(0xc5)](entrySummary);}export function getApiDocDetail(_0x18a54f){const _0x4cc8e3=a1_0x1fba45,_0x5b6852=DOCS['find'](_0x33f317=>_0x33f317['code']===_0x18a54f);if(!_0x5b6852)throw CliErrors['validation'](_0x4cc8e3(0x91)+_0x18a54f);return{..._0x5b6852};}const apiDocList={'service':a1_0x1fba45(0xd0),'command':'list','description':a1_0x1fba45(0xe5),'risk':a1_0x1fba45(0xe6),'requiresAppCode':![],'flags':[CATEGORY_FLAG,KEYWORD_FLAG],async 'execute'(_0x4fad37){const _0x582a29=a1_0x1fba45,_0x2c697b=listApiDocEntries({'category':_0x4fad37[_0x582a29(0x9e)](_0x582a29(0xed)),'keyword':_0x4fad37[_0x582a29(0x9e)](_0x582a29(0xae))});return{'ok':!![],'data':{'total':_0x2c697b['length'],'items':_0x2c697b}};}},apiDocDetail={'service':a1_0x1fba45(0xd0),'command':a1_0x1fba45(0xc4),'description':a1_0x1fba45(0x8e),'risk':a1_0x1fba45(0xe6),'requiresAppCode':![],'flags':[DOC_CODE_FLAG],async 'execute'(_0x185ac5){const _0x49f918=a1_0x1fba45;return{'ok':!![],'data':getApiDocDetail(_0x185ac5[_0x49f918(0x9e)](_0x49f918(0x9a)))};}};export const apiDocDefinitions=[apiDocList,apiDocDetail];
1
+ const a1_0x34576b=a1_0x2b0c;(function(_0x4b7d10,_0x16031a){const _0x3f5cd9=a1_0x2b0c,_0x3f75f9=_0x4b7d10();while(!![]){try{const _0x2f0def=parseInt(_0x3f5cd9(0xe3))/0x1+-parseInt(_0x3f5cd9(0xad))/0x2*(-parseInt(_0x3f5cd9(0xa4))/0x3)+-parseInt(_0x3f5cd9(0x108))/0x4+-parseInt(_0x3f5cd9(0xbe))/0x5+-parseInt(_0x3f5cd9(0xef))/0x6+parseInt(_0x3f5cd9(0xe9))/0x7*(-parseInt(_0x3f5cd9(0x113))/0x8)+-parseInt(_0x3f5cd9(0xa0))/0x9*(-parseInt(_0x3f5cd9(0x102))/0xa);if(_0x2f0def===_0x16031a)break;else _0x3f75f9['push'](_0x3f75f9['shift']());}catch(_0x259066){_0x3f75f9['push'](_0x3f75f9['shift']());}}}(a1_0x183a,0xd7c34));function a1_0x183a(){const _0x4a9165=['List\x20BF\x20endpoint\x20functions','765bvsZia','/api/{appCode}/{datasetCode}/create','dataset','scriptName','4807866Cbatrl','32-character\x20dataset\x20code','custom_sql','Create\x20dataset\x20record','tableData\x20contains\x20records','CLI\x20has\x20typed\x20`bff\x20detail`\x20and\x20`bff\x20exec`\x20commands\x20for\x20endpoint\x20scripts.','已经确认目标\x20BF\x20的\x20scriptName,且需要实际调用该\x20ENDPOINT\x20脚本完成业务操作时使用','需要按\x20appCode\x20分页获取运行态数据集列表,并优先收敛可用\x20datasetCode\x20时使用','Inspect\x20field\x20names,\x20relations,\x20and\x20operation\x20metadata\x20for\x20a\x20known\x20dataset\x20code.','2fSAtFt','whenToUse','dataset_data_create','需要向指定数据集新增一条业务数据时使用','dataset_data_filter','map','/api/dataset/get-dataset-list-by-app-code','Dataset\x20detail','dataset_detail','custom_sql_execute','toLowerCase','CLI\x20users\x20should\x20prefer\x20`lovrabet\x20dataset\x20list`\x20for\x20this\x20workflow.','{\x22where\x22:{},\x22currentPage\x22:1,\x22pageSize\x22:20}','If\x20SDK\x20usage\x20is\x20needed,\x20follow\x20with\x20`lovrabet\x20dataset\x20sdk-doc\x20--code\x20<datasetCode>`.','POST','lovrabet\x20sql\x20exec\x20--sqlcode\x20<sqlCode>\x20--params\x20\x27{}\x27','Current\x20app\x20code','4185445KUfJHR','join','api-doc','This\x20is\x20a\x20write\x20operation;\x20use\x20dry-run\x20when\x20available\x20and\x20safe\x20fixtures\x20for\x20smoke\x20tests.','Filter\x20dataset\x20data','Get\x20one\x20dataset\x20record','执行自定义\x20SQL','detail','Filter\x20docs\x20by\x20category,\x20for\x20example\x20dataset','需要携带\x20where、orderBy、分页等条件读取业务数据时使用','find','lovrabet\x20data\x20filter\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22currentPage\x22:1,\x22pageSize\x22:5}\x27','Prefer\x20`filter`\x20when\x20the\x20record\x20id\x20is\x20unknown.','##\x20Get\x20one\x20dataset\x20record\x0a\x0aRead\x20one\x20record\x20by\x20id.','length','获取数据集详情','bf_execute','tableData\x20contains\x20dataset\x20id/code/name','category','需要按数据集\x20code\x20获取字段、表信息、关联关系(relations)或操作定义时使用','List\x20datasets','filter','Aggregate\x20supports\x20COUNT,\x20SUM,\x20AVG,\x20MAX,\x20and\x20MIN\x20definitions\x20in\x20the\x20`aggregate`\x20array.','##\x20Execute\x20BF\x20endpoint\x20function\x0a\x0aExecute\x20a\x20known\x20endpoint\x20script.','Search\x20docs\x20by\x20code,\x20summary,\x20path,\x20or\x20usage\x20text','Show\x20runtime\x20API\x20documentation\x20by\x20code','Aggregate\x20dataset\x20data','/api/endpoint/{appCode}/functions','##\x20Create\x20dataset\x20record\x0a\x0aCreate\x20one\x20data\x20record\x20in\x20a\x20dataset.','fields/properties\x20describe\x20data\x20shape','None','{\x22param\x22:\x22value\x22}','Execute\x20custom\x20SQL','method','##\x20Dataset\x20detail','summary','查询单条数据','363790NyBgZU','Endpoint\x20function\x20name','where\x20filters\x20before\x20aggregation','paging.totalCount\x20gives\x20total\x20rows','Script\x20behavior\x20may\x20have\x20side\x20effects;\x20inspect\x20detail\x20first.','read','1148LUOAmu','str','lovrabet\x20dataset\x20list\x20--appcode\x20<appCode>\x20--format\x20compress','{\x22appCode\x22:\x22app-aa63b188\x22,\x22currentPage\x22:1,\x22pageSize\x22:100}','appCode','Returns\x20one\x20matching\x20business\x20record','686280IupsmJ','operations\x20describes\x20runtime\x20APIs','##\x20Execute\x20custom\x20SQL\x0a\x0aExecute\x20a\x20configured\x20SQL\x20script\x20by\x20sqlCode.','Returns\x20the\x20created\x20record\x20or\x20backend\x20operation\x20result','list','string','result\x20rows\x20contain\x20aggregate\x20aliases','code','Returns\x20script\x20business\x20payload','datasetCode','/api/{appCode}/{datasetCode}/aggregate','lovrabet\x20data\x20create\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22name\x22:\x22demo\x22}\x27','`field`\x20is\x20accepted\x20as\x20a\x20deprecated\x20alias\x20for\x20`column`;\x20new\x20calls\x20should\x20use\x20`column`.','Use\x20read-only\x20data\x20commands\x20before\x20writing\x20Artifacts\x20that\x20display\x20real\x20data.','已经确认目标\x20sqlCode\x20存在,并需要实际执行该自定义\x20SQL\x20时使用','Use\x20`lovrabet\x20sql\x20detail`\x20before\x20execution.','bf_function_list','keyword','Returns\x20SQL\x20execution\x20payload','249000JbczNU','需要按\x20groupBy\x20分组并做\x20count、sum、avg、max、min\x20等聚合统计时使用','trim','{\x22fieldName\x22:\x22value\x22}','##\x20List\x20BF\x20endpoint\x20functions\x0a\x0aDiscover\x20executable\x20endpoint\x20functions.','/api/{appCode}/{datasetCode}/getOne','3144444qbFmZf','获取应用下可调用的\x20BF\x20函数列表','需要先确认当前应用有哪些可执行的\x20BF/ENDPOINT\x20函数,以及收敛可用\x20scriptName\x20时使用','GET','paging\x20contains\x20pagination','{\x22aggregate\x22:[{\x22column\x22:\x20\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}],\x22groupBy\x22:[]}','relations\x20contains\x20the\x20object-shaped\x20API\x20relations\x20value\x20when\x20returned','dataset_data_aggregate','List\x20available\x20runtime\x20API\x20documentation\x20entries','{\x22id\x22:123}','聚合查询数据集数据','71296sYUSoq','lovrabet\x20bff\x20exec\x20--name\x20<functionName>\x20--params\x20\x27{}\x27','lovrabet\x20bff\x20detail\x20--id\x20<scriptId>\x20--appcode\x20<appCode>'];a1_0x183a=function(){return _0x4a9165;};return a1_0x183a();}import{CliErrors}from'../../errors.js';const CATEGORY_FLAG={'name':a1_0x34576b(0xd0),'type':a1_0x34576b(0xf4),'description':a1_0x34576b(0xc6)},KEYWORD_FLAG={'name':'keyword','type':a1_0x34576b(0xf4),'description':a1_0x34576b(0xd6)},DOC_CODE_FLAG={'name':a1_0x34576b(0xf6),'type':a1_0x34576b(0xf4),'required':!![],'description':'API\x20doc\x20code,\x20for\x20example\x20dataset_list'},DOCS=[{'code':'dataset_list','category':'dataset','title':a1_0x34576b(0xd2),'method':a1_0x34576b(0xbb),'path':a1_0x34576b(0xb3),'summary':'分页获取数据集列表','whenToUse':a1_0x34576b(0xab),'pathParams':[],'queryParams':[],'bodySchema':a1_0x34576b(0xec),'responseHighlights':[a1_0x34576b(0xcf),a1_0x34576b(0xe6)],'examples':[a1_0x34576b(0xeb)],'notes':[a1_0x34576b(0xb8)],'markdown':['##\x20List\x20datasets','','Use\x20this\x20API\x20or\x20`lovrabet\x20dataset\x20list`\x20to\x20discover\x20available\x20dataset\x20codes\x20before\x20reading\x20data.'][a1_0x34576b(0xbf)]('\x0a')},{'code':a1_0x34576b(0xb5),'category':a1_0x34576b(0xa2),'title':a1_0x34576b(0xb4),'method':a1_0x34576b(0x10b),'path':'/api/dataset/getOneByCode?code={datasetCode}','summary':a1_0x34576b(0xcd),'whenToUse':a1_0x34576b(0xd1),'pathParams':[],'queryParams':[{'name':'code','description':'32-character\x20dataset\x20code'}],'bodySchema':a1_0x34576b(0xdc),'responseHighlights':[a1_0x34576b(0xdb),a1_0x34576b(0x10e),a1_0x34576b(0xf0)],'examples':['lovrabet\x20dataset\x20detail\x20--code\x20<datasetCode>\x20--appcode\x20<appCode>'],'notes':[a1_0x34576b(0xba)],'markdown':[a1_0x34576b(0xe0),'',a1_0x34576b(0xac)][a1_0x34576b(0xbf)]('\x0a')},{'code':a1_0x34576b(0xb1),'category':a1_0x34576b(0xa2),'title':a1_0x34576b(0xc2),'method':a1_0x34576b(0xbb),'path':'/api/{appCode}/{datasetCode}/filter','summary':'条件过滤查询数据','whenToUse':a1_0x34576b(0xc7),'pathParams':[{'name':a1_0x34576b(0xed),'description':a1_0x34576b(0xbd)},{'name':a1_0x34576b(0xf8),'description':a1_0x34576b(0xa5)}],'queryParams':[],'bodySchema':a1_0x34576b(0xb9),'responseHighlights':[a1_0x34576b(0xa8),a1_0x34576b(0x10c)],'examples':[a1_0x34576b(0xc9)],'notes':[a1_0x34576b(0xfc)],'markdown':['##\x20Filter\x20dataset\x20data','','Use\x20`where`,\x20`select`,\x20`orderBy`,\x20`currentPage`,\x20and\x20`pageSize`\x20to\x20inspect\x20live\x20data\x20shape.'][a1_0x34576b(0xbf)]('\x0a')},{'code':a1_0x34576b(0x10f),'category':'dataset','title':a1_0x34576b(0xd8),'method':a1_0x34576b(0xbb),'path':a1_0x34576b(0xf9),'summary':a1_0x34576b(0x112),'whenToUse':a1_0x34576b(0x103),'pathParams':[{'name':a1_0x34576b(0xed),'description':a1_0x34576b(0xbd)},{'name':a1_0x34576b(0xf8),'description':a1_0x34576b(0xa5)}],'queryParams':[],'bodySchema':a1_0x34576b(0x10d),'responseHighlights':[a1_0x34576b(0xf5),a1_0x34576b(0xe5)],'examples':['lovrabet\x20data\x20aggregate\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22aggregate\x22:[{\x22column\x22:\x22id\x22,\x22type\x22:\x22COUNT\x22,\x22alias\x22:\x22cnt\x22}]}\x27'],'notes':['Use\x20`having`\x20only\x20for\x20post-aggregation\x20filters.',a1_0x34576b(0xfb)],'markdown':['##\x20Aggregate\x20dataset\x20data','',a1_0x34576b(0xd4)][a1_0x34576b(0xbf)]('\x0a')},{'code':'dataset_data_get_one','category':a1_0x34576b(0xa2),'title':a1_0x34576b(0xc3),'method':a1_0x34576b(0xbb),'path':a1_0x34576b(0x107),'summary':a1_0x34576b(0xe2),'whenToUse':'已经知道记录\x20id,需要按数据集读取单条业务数据时使用','pathParams':[{'name':a1_0x34576b(0xed),'description':a1_0x34576b(0xbd)},{'name':'datasetCode','description':a1_0x34576b(0xa5)}],'queryParams':[],'bodySchema':a1_0x34576b(0x111),'responseHighlights':[a1_0x34576b(0xee)],'examples':['lovrabet\x20data\x20getOne\x20--code\x20<datasetCode>\x20--params\x20\x27{\x22id\x22:123}\x27'],'notes':[a1_0x34576b(0xca)],'markdown':a1_0x34576b(0xcb)},{'code':a1_0x34576b(0xaf),'category':a1_0x34576b(0xa2),'title':a1_0x34576b(0xa7),'method':'POST','path':a1_0x34576b(0xa1),'summary':'创建数据','whenToUse':a1_0x34576b(0xb0),'pathParams':[{'name':a1_0x34576b(0xed),'description':a1_0x34576b(0xbd)},{'name':a1_0x34576b(0xf8),'description':a1_0x34576b(0xa5)}],'queryParams':[],'bodySchema':a1_0x34576b(0x105),'responseHighlights':[a1_0x34576b(0xf2)],'examples':[a1_0x34576b(0xfa)],'notes':[a1_0x34576b(0xc1)],'markdown':a1_0x34576b(0xda)},{'code':a1_0x34576b(0xff),'category':'bf','title':a1_0x34576b(0x116),'method':a1_0x34576b(0x10b),'path':a1_0x34576b(0xd9),'summary':a1_0x34576b(0x109),'whenToUse':a1_0x34576b(0x10a),'pathParams':[{'name':a1_0x34576b(0xed),'description':a1_0x34576b(0xbd)}],'queryParams':[],'bodySchema':a1_0x34576b(0xdc),'responseHighlights':['Returns\x20endpoint\x20functionName/id/description'],'examples':[a1_0x34576b(0x115)],'notes':[a1_0x34576b(0xa9)],'markdown':a1_0x34576b(0x106)},{'code':a1_0x34576b(0xce),'category':'bf','title':'Execute\x20BF\x20endpoint\x20function','method':a1_0x34576b(0xbb),'path':'/api/endpoint/{appCode}/{scriptName}','summary':'执行指定\x20BF\x20函数','whenToUse':a1_0x34576b(0xaa),'pathParams':[{'name':a1_0x34576b(0xed),'description':a1_0x34576b(0xbd)},{'name':a1_0x34576b(0xa3),'description':a1_0x34576b(0xe4)}],'queryParams':[],'bodySchema':a1_0x34576b(0xdd),'responseHighlights':[a1_0x34576b(0xf7)],'examples':[a1_0x34576b(0x114)],'notes':[a1_0x34576b(0xe7)],'markdown':a1_0x34576b(0xd5)},{'code':a1_0x34576b(0xb6),'category':a1_0x34576b(0xa6),'title':a1_0x34576b(0xde),'method':a1_0x34576b(0xbb),'path':'/api/custom/executeSql','summary':a1_0x34576b(0xc4),'whenToUse':a1_0x34576b(0xfd),'pathParams':[],'queryParams':[],'bodySchema':'{\x22appCode\x22:\x22app-aa63b188\x22,\x22sqlCode\x22:\x22xxxxxxxx-xxxxxxxx\x22,\x22params\x22:{}}','responseHighlights':[a1_0x34576b(0x101)],'examples':[a1_0x34576b(0xbc)],'notes':[a1_0x34576b(0xfe)],'markdown':a1_0x34576b(0xf1)}];function entrySummary(_0x1bb937){const _0x5ce083=a1_0x34576b;return{'code':_0x1bb937['code'],'category':_0x1bb937[_0x5ce083(0xd0)],'method':_0x1bb937[_0x5ce083(0xdf)],'path':_0x1bb937['path'],'summary':_0x1bb937[_0x5ce083(0xe1)],'whenToUse':_0x1bb937[_0x5ce083(0xae)]};}export function listApiDocEntries(_0x4560b7={}){const _0x5404f2=a1_0x34576b,_0x3b9d4a=String(_0x4560b7[_0x5404f2(0xd0)]||'')[_0x5404f2(0x104)](),_0x37a013=String(_0x4560b7['keyword']||'')[_0x5404f2(0x104)]()['toLowerCase']();return DOCS[_0x5404f2(0xd3)](_0x315408=>{const _0x32ae3b=_0x5404f2;if(_0x3b9d4a&&_0x315408[_0x32ae3b(0xd0)]!==_0x3b9d4a)return![];if(!_0x37a013)return!![];return[_0x315408[_0x32ae3b(0xf6)],_0x315408['category'],_0x315408[_0x32ae3b(0xdf)],_0x315408['path'],_0x315408[_0x32ae3b(0xe1)],_0x315408[_0x32ae3b(0xae)],_0x315408['title']][_0x32ae3b(0xbf)]('\x20')[_0x32ae3b(0xb7)]()['includes'](_0x37a013);})[_0x5404f2(0xb2)](entrySummary);}export function getApiDocDetail(_0xcabdf2){const _0x27021a=a1_0x34576b,_0x3e6497=DOCS[_0x27021a(0xc8)](_0x4e59e6=>_0x4e59e6[_0x27021a(0xf6)]===_0xcabdf2);if(!_0x3e6497)throw CliErrors['validation']('API\x20doc\x20code\x20not\x20found:\x20'+_0xcabdf2);return{..._0x3e6497};}const apiDocList={'service':a1_0x34576b(0xc0),'command':a1_0x34576b(0xf3),'description':a1_0x34576b(0x110),'risk':a1_0x34576b(0xe8),'requiresAppCode':![],'flags':[CATEGORY_FLAG,KEYWORD_FLAG],async 'execute'(_0xa68bad){const _0x1ce875=a1_0x34576b,_0x2d1b0a=listApiDocEntries({'category':_0xa68bad[_0x1ce875(0xea)](_0x1ce875(0xd0)),'keyword':_0xa68bad[_0x1ce875(0xea)](_0x1ce875(0x100))});return{'ok':!![],'data':{'total':_0x2d1b0a[_0x1ce875(0xcc)],'items':_0x2d1b0a}};}},apiDocDetail={'service':'api-doc','command':a1_0x34576b(0xc5),'description':a1_0x34576b(0xd7),'risk':'read','requiresAppCode':![],'flags':[DOC_CODE_FLAG],async 'execute'(_0x21c123){const _0x3fc4f4=a1_0x34576b;return{'ok':!![],'data':getApiDocDetail(_0x21c123[_0x3fc4f4(0xea)]('code'))};}};function a1_0x2b0c(_0x1849d6,_0x5b2802){_0x1849d6=_0x1849d6-0xa0;const _0x183ad4=a1_0x183a();let _0x2b0cc3=_0x183ad4[_0x1849d6];return _0x2b0cc3;}export const apiDocDefinitions=[apiDocList,apiDocDetail];
@@ -1 +1 @@
1
- function a2_0x1185(){const _0x9728f4=['701108mEgoUP','4323918kVKNdV','my-apps.json','EACCES','1740705gChzXI','digest','1166967Shybxh','31141000UVxvbh','hex','12zrVJEZ','isArray','2fMNeZE','parse','stringify','EPERM','code','594844ZRbVBU','trim','unknown','homeDirName','slice','appName','sha256','50dzmHAs','EXDEV','ak_','432fyeiEa','34580YJSMJn'];a2_0x1185=function(){return _0x9728f4;};return a2_0x1185();}function a2_0x28d5(_0xfabb18,_0x381b18){_0xfabb18=_0xfabb18-0x11f;const _0x118549=a2_0x1185();let _0x28d501=_0x118549[_0xfabb18];return _0x28d501;}(function(_0x5f8a00,_0x287447){const _0xf47e8e=a2_0x28d5,_0x14315a=_0x5f8a00();while(!![]){try{const _0x27fc46=parseInt(_0xf47e8e(0x12c))/0x1*(parseInt(_0xf47e8e(0x127))/0x2)+-parseInt(_0xf47e8e(0x125))/0x3*(-parseInt(_0xf47e8e(0x138))/0x4)+parseInt(_0xf47e8e(0x120))/0x5+parseInt(_0xf47e8e(0x139))/0x6+parseInt(_0xf47e8e(0x137))/0x7*(parseInt(_0xf47e8e(0x136))/0x8)+parseInt(_0xf47e8e(0x122))/0x9*(parseInt(_0xf47e8e(0x133))/0xa)+-parseInt(_0xf47e8e(0x123))/0xb;if(_0x27fc46===_0x287447)break;else _0x14315a['push'](_0x14315a['shift']());}catch(_0x3be868){_0x14315a['push'](_0x14315a['shift']());}}}(a2_0x1185,0x6d935));import{createHash}from'node:crypto';import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{homedir}from'node:os';import{dirname,resolve}from'node:path';import{PRODUCT_CONFIG}from'../../constant/product.js';import{isRuntimeAccessibleApp}from'../../commands/app/eligibility.js';export function fingerprintAccessKey(_0x4d4311){const _0x2b999c=a2_0x28d5,_0xf57664=_0x4d4311[_0x2b999c(0x12d)](),_0xae6a2d=_0xf57664[_0x2b999c(0x130)](-0x6)||_0x2b999c(0x12e),_0x1238c6=createHash(_0x2b999c(0x132))['update'](_0xf57664)[_0x2b999c(0x121)](_0x2b999c(0x124))[_0x2b999c(0x130)](0x0,0xc);return _0x2b999c(0x135)+_0xae6a2d+'_'+_0x1238c6;}export function getAppCacheFilePath(_0x1ac71a,_0x12bca3){const _0x10e6ec=a2_0x28d5;return resolve(homedir(),PRODUCT_CONFIG[_0x10e6ec(0x12f)],'cache',_0x1ac71a,fingerprintAccessKey(_0x12bca3),_0x10e6ec(0x13a));}export function readCachedAppList(_0x4d9169,_0xb12b24){const _0x2f9c1f=a2_0x28d5;if(!_0xb12b24?.['trim']())return null;const _0x2078e2=getAppCacheFilePath(_0x4d9169,_0xb12b24);if(!existsSync(_0x2078e2))return null;try{const _0x9a32fc=readFileSync(_0x2078e2,'utf8');if(!_0x9a32fc[_0x2f9c1f(0x12d)]())return null;const _0x415c47=JSON[_0x2f9c1f(0x128)](_0x9a32fc);if(!Array[_0x2f9c1f(0x126)](_0x415c47['items']))return null;return _0x415c47;}catch{return null;}}export function writeCachedAppList(_0x360822,_0x3761ad,_0x160f5f){const _0x248d05=a2_0x28d5,_0x2db283=getAppCacheFilePath(_0x360822,_0x3761ad),_0x150c99=dirname(_0x2db283);!existsSync(_0x150c99)&&mkdirSync(_0x150c99,{'recursive':!![]});const _0x5be455=_0x2db283+'.tmp';try{writeFileSync(_0x5be455,JSON[_0x248d05(0x129)](_0x160f5f,null,0x2)+'\x0a',{'encoding':'utf8','mode':0x180});try{renameSync(_0x5be455,_0x2db283);}catch(_0x52af71){if(_0x52af71[_0x248d05(0x12b)]===_0x248d05(0x12a)||_0x52af71['code']===_0x248d05(0x134)||_0x52af71[_0x248d05(0x12b)]===_0x248d05(0x11f)){writeFileSync(_0x2db283,JSON[_0x248d05(0x129)](_0x160f5f,null,0x2)+'\x0a',{'encoding':'utf8'});try{unlinkSync(_0x5be455);}catch{}}else throw _0x52af71;}}catch(_0x3e2603){try{unlinkSync(_0x5be455);}catch{}throw _0x3e2603;}return _0x2db283;}export function resolveCachedAppCode(_0x88120f,_0xace442,_0x276079){const _0x3eaaa6=a2_0x28d5;if(!_0x88120f)return undefined;const _0x387e7f=readCachedAppList(_0xace442,_0x276079),_0xa59d3c=_0x387e7f?.['items']['find'](_0x2b2f91=>_0x2b2f91[_0x3eaaa6(0x131)]===_0x88120f&&isRuntimeAccessibleApp(_0x2b2f91));return _0xa59d3c?.['appCode']?.[_0x3eaaa6(0x12d)]()||undefined;}
1
+ (function(_0x4a70fd,_0x195fff){const _0x435f7d=a2_0x1658,_0x548dfc=_0x4a70fd();while(!![]){try{const _0x38e527=parseInt(_0x435f7d(0x1f8))/0x1*(parseInt(_0x435f7d(0x1ea))/0x2)+-parseInt(_0x435f7d(0x205))/0x3*(parseInt(_0x435f7d(0x1e9))/0x4)+-parseInt(_0x435f7d(0x1f5))/0x5*(-parseInt(_0x435f7d(0x1f1))/0x6)+parseInt(_0x435f7d(0x1fa))/0x7+parseInt(_0x435f7d(0x1eb))/0x8*(parseInt(_0x435f7d(0x204))/0x9)+-parseInt(_0x435f7d(0x1e6))/0xa+parseInt(_0x435f7d(0x1f0))/0xb*(-parseInt(_0x435f7d(0x1fd))/0xc);if(_0x38e527===_0x195fff)break;else _0x548dfc['push'](_0x548dfc['shift']());}catch(_0x23d774){_0x548dfc['push'](_0x548dfc['shift']());}}}(a2_0x5324,0x56c09));import{createHash}from'node:crypto';function a2_0x1658(_0x2c29bc,_0x87c063){_0x2c29bc=_0x2c29bc-0x1e6;const _0x53249c=a2_0x5324();let _0x1658a2=_0x53249c[_0x2c29bc];return _0x1658a2;}import{existsSync,mkdirSync,readFileSync,renameSync,unlinkSync,writeFileSync}from'node:fs';import{homedir}from'node:os';import{dirname,resolve}from'node:path';import{PRODUCT_CONFIG}from'../../constant/product.js';import{isRuntimeAccessibleApp}from'../../commands/app/eligibility.js';export function fingerprintAccessKey(_0xc0b136){const _0x37ddbb=a2_0x1658,_0x369022=_0xc0b136[_0x37ddbb(0x201)](),_0x221e93=_0x369022[_0x37ddbb(0x203)](-0x6)||_0x37ddbb(0x1fc),_0x223f15=createHash('sha256')['update'](_0x369022)[_0x37ddbb(0x1ef)](_0x37ddbb(0x1f7))['slice'](0x0,0xc);return _0x37ddbb(0x1f6)+_0x221e93+'_'+_0x223f15;}export function getAppCacheFilePath(_0x411799,_0x1ff483){const _0x530655=a2_0x1658;return resolve(homedir(),PRODUCT_CONFIG[_0x530655(0x202)],_0x530655(0x1f4),_0x411799,fingerprintAccessKey(_0x1ff483),'my-apps.json');}export function readCachedAppList(_0x15787c,_0x57b78e){const _0xa65de4=a2_0x1658;if(!_0x57b78e?.[_0xa65de4(0x201)]())return null;const _0x5f1639=getAppCacheFilePath(_0x15787c,_0x57b78e);if(!existsSync(_0x5f1639))return null;try{const _0x1238a4=readFileSync(_0x5f1639,'utf8');if(!_0x1238a4[_0xa65de4(0x201)]())return null;const _0x551833=JSON[_0xa65de4(0x1fe)](_0x1238a4);if(!Array[_0xa65de4(0x1f2)](_0x551833[_0xa65de4(0x1ff)]))return null;return _0x551833;}catch{return null;}}export function writeCachedAppList(_0x2a5c22,_0x48ed6f,_0x36fb90){const _0x15c855=a2_0x1658,_0x2ff1a1=getAppCacheFilePath(_0x2a5c22,_0x48ed6f),_0x2a21a3=dirname(_0x2ff1a1);!existsSync(_0x2a21a3)&&mkdirSync(_0x2a21a3,{'recursive':!![]});const _0x5a6129=_0x2ff1a1+_0x15c855(0x1e7);try{writeFileSync(_0x5a6129,JSON[_0x15c855(0x1fb)](_0x36fb90,null,0x2)+'\x0a',{'encoding':_0x15c855(0x1f9),'mode':0x180});try{renameSync(_0x5a6129,_0x2ff1a1);}catch(_0x39b929){if(_0x39b929[_0x15c855(0x1f3)]==='EPERM'||_0x39b929['code']===_0x15c855(0x1ee)||_0x39b929[_0x15c855(0x1f3)]===_0x15c855(0x1ec)){writeFileSync(_0x2ff1a1,JSON[_0x15c855(0x1fb)](_0x36fb90,null,0x2)+'\x0a',{'encoding':_0x15c855(0x1f9)});try{unlinkSync(_0x5a6129);}catch{}}else throw _0x39b929;}}catch(_0x575dc8){try{unlinkSync(_0x5a6129);}catch{}throw _0x575dc8;}return _0x2ff1a1;}export function resolveCachedAppCode(_0x7850e6,_0x4a67ee,_0x37292d){const _0x492fa8=a2_0x1658;if(!_0x7850e6)return undefined;const _0xa79164=readCachedAppList(_0x4a67ee,_0x37292d),_0x177c35=_0xa79164?.[_0x492fa8(0x1ff)][_0x492fa8(0x1ed)](_0x23c74a=>_0x23c74a[_0x492fa8(0x1e8)]===_0x7850e6&&isRuntimeAccessibleApp(_0x23c74a));return _0x177c35?.[_0x492fa8(0x200)]?.['trim']()||undefined;}function a2_0x5324(){const _0x59f004=['461224zEVjbM','13848mHgtNA','EACCES','find','EXDEV','digest','228239HIgONx','18JcGheL','isArray','code','cache','894275yxrGMD','ak_','hex','1fcEhNf','utf8','3761044CuXntN','stringify','unknown','84VAwWor','parse','items','appCode','trim','homeDirName','slice','837plutqt','12VCFJHb','2577680toPLaH','.tmp','appName','707104HzYwOi'];a2_0x5324=function(){return _0x59f004;};return a2_0x5324();}
@@ -1 +1 @@
1
- const a3_0x44a92b=a3_0x2957;(function(_0x419fd5,_0x362126){const _0x1027f7=a3_0x2957,_0x2257ab=_0x419fd5();while(!![]){try{const _0x48ff0c=-parseInt(_0x1027f7(0xfa))/0x1+parseInt(_0x1027f7(0x151))/0x2*(parseInt(_0x1027f7(0x125))/0x3)+parseInt(_0x1027f7(0x101))/0x4+parseInt(_0x1027f7(0x150))/0x5+-parseInt(_0x1027f7(0x133))/0x6*(-parseInt(_0x1027f7(0x13f))/0x7)+parseInt(_0x1027f7(0x110))/0x8*(parseInt(_0x1027f7(0x119))/0x9)+-parseInt(_0x1027f7(0x104))/0xa*(parseInt(_0x1027f7(0x11c))/0xb);if(_0x48ff0c===_0x362126)break;else _0x2257ab['push'](_0x2257ab['shift']());}catch(_0x3daee4){_0x2257ab['push'](_0x2257ab['shift']());}}}(a3_0x1a8e,0x4d510));import{CliErrors}from'../../errors.js';import{initCreateFlagDefs,initImportFlagDefs,runInit,runInitImport}from'../../commands/init.js';import{getEnv,RUNTIME_ENV_VALUES}from'../../constant/env.js';import{buildAppProfileListFields}from'../../config/schema.js';function a3_0x1a8e(){const _0xf7b634=['\x20is\x20deprecated.\x20Use\x20`','production','198sJPETq','string','Target\x20environment\x20(default:\x20current\x20env)','args','import','`\x20instead.','remote','../../context.js','Available\x20remote\x20apps:\x20','Refreshed\x20app\x20cache\x20with\x20','\x22\x20not\x20found.','../../commands/app/cache.js','15169nLiqgP','Remote\x20app\x20name\x20to\x20activate','appPublishStatus','raw','validation','List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','envName','cachePath','defaultApp','read','no-cache','No\x20apps\x20found\x20on\x20the\x20platform.','Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','write','Loaded\x20','\x20app\x20','langs','616065TyDngJ','15276lpVwhv','type','mergedCli','\x20workspace\x20use\x20--app\x20<name>\x20[--env\x20daily]','Deprecated:\x20use\x20workspace\x20use\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','\x20app\x20list`\x20to\x20discover\x20remote\x20apps,\x20or\x20add\x20apps.','global','258774rMnQdt','\x20app(s)\x20for\x20env=\x22','\x20cached\x20app(s)\x20for\x20env=\x22','items','isArray','Usage:\x20','push','2402260lmHZRR','project-default','Missing\x20app\x20name.','50SLGrAp','Read\x20app\x20list\x20from\x20local\x20cache\x20only','trim','fetchedAt','Deprecated:\x20use\x20workspace\x20init\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','bool','local','cache','length','../../commands/app/remote-source.js','env','2656dgaNrc','.\x20Local\x20aliases\x20can\x20be\x20added\x20under\x20apps.<alias>.appcode.','appcode','Include\x20unpublished\x20apps\x20for\x20diagnostics','config','boolean','enableI18n','appCode','str','1638usALtD','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','Use\x20`','919017gOcMyT','No\x20cached\x20apps\x20found.','Use\x20global\x20config\x20scope','i18nInfo','.appcode\x20to\x20.lovrabet.json.','source','App\x20\x22','\x20app\x20use\x20<name>\x20[--global]','pull','54lKzooB','from','\x20workspace\x20init\x20--appcode\x20<code>\x20[--env\x20daily]','find','use','map','name','include-unpublished','appName','accessKey','nonInteractive','app'];a3_0x1a8e=function(){return _0xf7b634;};return a3_0x1a8e();}import{CLI_BIN_NAME,readConfig,writeConfig,scopeLabel,enrichAppListItemsWithMergedSelection}from'../../commands/app/shared.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{filterRuntimeAccessibleApps,findAppByCode,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../../commands/app/eligibility.js';function a3_0x2957(_0x3d799b,_0x58682b){_0x3d799b=_0x3d799b-0xf6;const _0x1a8e89=a3_0x1a8e();let _0x2957c9=_0x1a8e89[_0x3d799b];return _0x2957c9;}const GLOBAL_FLAG={'name':'global','type':a3_0x44a92b(0x115),'description':a3_0x44a92b(0x11e),'default':![]};function collectFlags(_0x2c5759,_0x2c7903){const _0x42a0a6=a3_0x44a92b,_0x15b4ee={};for(const _0x294805 of _0x2c7903){const _0xe5016=_0x294805[_0x42a0a6(0x152)]===_0x42a0a6(0x115)?_0x2c5759[_0x42a0a6(0x10a)](_0x294805[_0x42a0a6(0x12b)]):_0x2c5759[_0x42a0a6(0x118)](_0x294805[_0x42a0a6(0x12b)]);if(_0xe5016!==''&&_0xe5016!==![])_0x15b4ee[_0x294805[_0x42a0a6(0x12b)]]=_0xe5016;}if(_0x2c5759[_0x42a0a6(0x12f)])_0x15b4ee[_0x42a0a6(0x12f)]=!![];return _0x15b4ee;}function normalizeLanguages(_0x42f94c){const _0x38f657=a3_0x44a92b;if(!Array[_0x38f657(0xfe)](_0x42f94c))return[];return _0x42f94c['filter'](_0x41962d=>typeof _0x41962d==='string')[_0x38f657(0x12a)](_0x5264f5=>_0x5264f5[_0x38f657(0x106)]())['filter'](Boolean);}function buildRemoteAppI18nFields(_0x58f724){const _0x16fe31=a3_0x44a92b,_0xaa89c4=normalizeLanguages(_0x58f724[_0x16fe31(0x11f)]?.[_0x16fe31(0x14f)]);return{'enableI18n':typeof _0x58f724[_0x16fe31(0x116)]==='boolean'?_0x58f724[_0x16fe31(0x116)]:null,'languages':_0xaa89c4,'i18nInfo':_0x58f724[_0x16fe31(0x11f)]?{..._0x58f724[_0x16fe31(0x11f)],'langs':_0xaa89c4['length']?_0xaa89c4:null}:null};}const initDef={'service':a3_0x44a92b(0x130),'command':'init','description':a3_0x44a92b(0x108),'risk':a3_0x44a92b(0x14c),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initCreateFlagDefs,async 'execute'(_0x1bcbd4){const _0x47cc1d=a3_0x44a92b;return warnDeprecatedAppCommand('init',CLI_BIN_NAME+_0x47cc1d(0x127)),await runInit(collectFlags(_0x1bcbd4,initCreateFlagDefs)),{'ok':!![]};}},listDef={'service':a3_0x44a92b(0x130),'command':'list','description':a3_0x44a92b(0x144),'risk':a3_0x44a92b(0x148),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':a3_0x44a92b(0x10f),'type':'string','description':'Filter\x20by\x20environment\x20(default:\x20current\x20env)','enum':[...RUNTIME_ENV_VALUES]},{'name':a3_0x44a92b(0x10b),'type':a3_0x44a92b(0x115),'description':a3_0x44a92b(0x105),'default':![]},{'name':'no-cache','type':a3_0x44a92b(0x115),'description':a3_0x44a92b(0x11a),'default':![]},{'name':'include-unpublished','type':'boolean','description':a3_0x44a92b(0x113),'default':![]}],async 'execute'(_0x52f24c){const _0x5a4349=a3_0x44a92b,_0x2325e8=_0x52f24c[_0x5a4349(0x118)]('env')||_0x52f24c[_0x5a4349(0x145)]||getEnv()||'production',_0x152bf1=_0x52f24c['bool'](_0x5a4349(0x10b)),_0x120061=_0x52f24c[_0x5a4349(0x10a)](_0x5a4349(0x149)),_0x575ee2=_0x52f24c[_0x5a4349(0x10a)](_0x5a4349(0x12c)),{readRawConfigWithLayers:_0x20936c,resolveDefaultAppSource:_0x11b2f4,getLocalAppAliases:_0x15e774}=await import('../../context.js'),{getRemoteAppList:_0xc4666b}=await import(_0x5a4349(0x10e)),{config:_0x504b72,layers:_0x24c0d1}=_0x20936c(),_0x504520=_0x11b2f4(_0x24c0d1),{defaultApp:_0x4b3596}=_0x504b72,_0x135366=await _0xc4666b({'env':_0x2325e8,'accessKey':_0x52f24c[_0x5a4349(0x12e)],'localOnly':_0x152bf1,'noCache':_0x120061}),_0x4a8e69=_0x575ee2?_0x135366[_0x5a4349(0xfd)]:filterRuntimeAccessibleApps(_0x135366['items']),_0xcb6e9a=_0x135366[_0x5a4349(0xfd)]['length']-_0x4a8e69[_0x5a4349(0x10d)],_0x5e84ea=_0x4a8e69['map'](_0xe9051e=>{const _0x1df817=_0x5a4349;return{'name':_0xe9051e[_0x1df817(0x12d)],'appcode':_0xe9051e['appCode'],'named':!![],'definedIn':_0x1df817(0x139),'isDefault':_0xe9051e[_0x1df817(0x12d)]===_0x4b3596,...buildAppProfileListFields(_0x2325e8),...buildRemoteAppI18nFields(_0xe9051e),'source':_0x135366['source'],'owner':_0xe9051e['appOwnerName']??null,'status':_0xe9051e[_0x1df817(0x141)]??null,'cachedAt':_0x135366[_0x1df817(0x107)]};}),_0x5ee33f=_0x15e774(_0x504b72);let _0x5b79f1=0x0;for(const [_0x2de6f5,_0x246aff]of Object['entries'](_0x5ee33f)){const _0xfd62cf=typeof _0x246aff['appcode']===_0x5a4349(0x134)?_0x246aff[_0x5a4349(0x112)][_0x5a4349(0x106)]():'';if(!_0xfd62cf)continue;const _0x4cbd10=findAppByCode(_0x135366['items'],_0xfd62cf);if(!_0x575ee2&&_0x4cbd10&&!isRuntimeAccessibleApp(_0x4cbd10))continue;_0x5b79f1+=0x1,_0x5e84ea[_0x5a4349(0x100)]({'name':_0x2de6f5,'appcode':_0xfd62cf,'named':!![],'definedIn':'local','isDefault':_0x2de6f5===_0x4b3596,...buildAppProfileListFields(_0x2325e8),'source':_0x5a4349(0x114),'owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0x5e84ea,_0x52f24c[_0x5a4349(0x153)]);const _0x542435=_0x5e84ea[_0x5a4349(0x128)](_0x53e04e=>_0x53e04e['isCurrent']===!![]),_0xc13055=_0x4b3596??_0x542435?.['name']??null,_0x530d95={'env':_0x2325e8,'source':_0x135366[_0x5a4349(0x121)],'fetchedAt':_0x135366[_0x5a4349(0x107)],'cachePath':_0x135366['cachePath'],'globalPath':_0x24c0d1['globalPath']??null,'projectPath':_0x24c0d1['projectPath']??null,'defaultApp':_0xc13055,'defaultAppSource':_0x4b3596!=null?_0x504520:null,'localAliasCount':_0x5b79f1,'remoteTotal':_0x135366[_0x5a4349(0xfd)]['length'],'hiddenUnpublishedCount':_0xcb6e9a,'includeUnpublished':_0x575ee2};if(_0x5e84ea[_0x5a4349(0x10d)]===0x0)return{'ok':!![],'data':{'items':_0x5e84ea,'meta':_0x530d95},'message':_0x135366[_0x5a4349(0x121)]===_0x5a4349(0x10c)?_0x5a4349(0x11d):_0x5a4349(0x14a)};return{'ok':!![],'data':{'items':_0x5e84ea,'meta':_0x530d95}};}},pullDef={'service':a3_0x44a92b(0x130),'command':a3_0x44a92b(0x124),'description':a3_0x44a92b(0x109),'risk':a3_0x44a92b(0x14c),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a3_0x44a92b(0x10f),'type':a3_0x44a92b(0x134),'description':a3_0x44a92b(0x135),'enum':[...RUNTIME_ENV_VALUES]},{'name':'local','type':a3_0x44a92b(0x115),'description':'Read\x20from\x20local\x20cache\x20only','default':![]},{'name':a3_0x44a92b(0x149),'type':'boolean','description':a3_0x44a92b(0x11a),'default':![]}],async 'execute'(_0x87c60){const _0x2fc0b5=a3_0x44a92b,_0x4f217d=_0x87c60[_0x2fc0b5(0x118)]('env')||_0x87c60[_0x2fc0b5(0x145)]||getEnv()||_0x2fc0b5(0x132),_0x3a3cff=_0x87c60[_0x2fc0b5(0x10a)](_0x2fc0b5(0x10b)),_0x416da4=_0x87c60[_0x2fc0b5(0x10a)]('no-cache'),{getRemoteAppList:_0x4a3877}=await import(_0x2fc0b5(0x10e)),_0x570386=await _0x4a3877({'env':_0x4f217d,'accessKey':_0x87c60[_0x2fc0b5(0x12e)],'localOnly':_0x3a3cff,'noCache':_0x416da4});return{'ok':!![],'data':{'total':_0x570386[_0x2fc0b5(0xfd)][_0x2fc0b5(0x10d)],'env':_0x4f217d,'source':_0x570386[_0x2fc0b5(0x121)],'fetchedAt':_0x570386[_0x2fc0b5(0x107)],'cachePath':_0x570386[_0x2fc0b5(0x146)]},'message':_0x570386['source']===_0x2fc0b5(0x10c)?_0x2fc0b5(0x14d)+_0x570386[_0x2fc0b5(0xfd)][_0x2fc0b5(0x10d)]+_0x2fc0b5(0xfc)+_0x4f217d+'\x22.':_0x2fc0b5(0x13c)+_0x570386['items']['length']+_0x2fc0b5(0xfb)+_0x4f217d+'\x22.'};}},useDef={'service':'app','command':a3_0x44a92b(0x129),'description':a3_0x44a92b(0xf7),'risk':a3_0x44a92b(0x14c),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':'name','description':a3_0x44a92b(0x140),'required':!![]}],'flags':[GLOBAL_FLAG],async 'validate'(_0x3de318){const _0x583862=a3_0x44a92b;if(!_0x3de318[_0x583862(0x136)][0x0])throw CliErrors[_0x583862(0x143)](_0x583862(0x103),'Usage:\x20'+CLI_BIN_NAME+_0x583862(0x123));},async 'execute'(_0x2a45a5){const _0x3c64e7=a3_0x44a92b;warnDeprecatedAppCommand(_0x3c64e7(0x129),CLI_BIN_NAME+_0x3c64e7(0xf6));const _0xb21944=_0x2a45a5['args'][0x0];if(!_0xb21944)throw CliErrors[_0x3c64e7(0x143)](_0x3c64e7(0x103),_0x3c64e7(0xff)+CLI_BIN_NAME+_0x3c64e7(0x123));const {buildConfigFromFlags:_0x22464d,resolveLocalAppAliasCode:_0x11fdb4}=await import(_0x3c64e7(0x13a)),{readCachedAppList:_0x28acc4}=await import(_0x3c64e7(0x13e)),_0x5b799a=_0x2a45a5['str']('env'),_0xbea4b5=_0x22464d(_0x5b799a?{'env':_0x5b799a}:{}),_0x54315a=_0x28acc4(_0xbea4b5[_0x3c64e7(0x10f)],_0xbea4b5[_0x3c64e7(0x12e)]),_0x475b1f=_0x54315a?.['items'][_0x3c64e7(0x128)](_0x2ab966=>_0x2ab966[_0x3c64e7(0x12d)]===_0xb21944),_0x34f792=_0x11fdb4(_0xbea4b5[_0x3c64e7(0x142)]??{},_0xb21944);if(_0x475b1f&&!isRuntimeAccessibleApp(_0x475b1f))throw runtimeInaccessibleAppError(_0x475b1f,'\x22'+_0xb21944+'\x22');if(_0x34f792){const _0x73894d=_0x54315a?.[_0x3c64e7(0xfd)]['find'](_0x32ec7c=>_0x32ec7c[_0x3c64e7(0x117)]?.[_0x3c64e7(0x106)]()===_0x34f792);if(_0x73894d&&!isRuntimeAccessibleApp(_0x73894d))throw runtimeInaccessibleAppError(_0x73894d,'\x22'+_0xb21944+'\x22');}if(!_0x475b1f&&!_0x34f792&&_0xbea4b5['defaultApp']!==_0xb21944){const _0x4478bb=[..._0x54315a?.[_0x3c64e7(0xfd)][_0x3c64e7(0x12a)](_0x356625=>_0x356625[_0x3c64e7(0x12d)])??[]],_0x56ceda=_0x4478bb[_0x3c64e7(0x10d)]===0x0?_0x3c64e7(0x11b)+CLI_BIN_NAME+_0x3c64e7(0xf8)+_0xb21944+_0x3c64e7(0x120):_0x3c64e7(0x13b)+Array[_0x3c64e7(0x126)](new Set(_0x4478bb))['join'](',\x20')+_0x3c64e7(0x111);throw CliErrors[_0x3c64e7(0x143)](_0x3c64e7(0x122)+_0xb21944+_0x3c64e7(0x13d),_0x56ceda);}const _0x2b7197=_0x2a45a5['bool'](_0x3c64e7(0xf9));let _0x29db79;if(_0x2b7197)_0x29db79={'global':!![]};else{const {isInProject:_0x4efb83}=await import(_0x3c64e7(0x13a)),_0x16e5ed=_0x4efb83();_0x29db79=toScopeFlags(resolveConfigScope({'explicitGlobal':![],'policy':_0x3c64e7(0x102),'inProject':_0x16e5ed}));}const _0x3a1d98=readConfig(_0x29db79);return _0x3a1d98[_0x3c64e7(0x147)]=_0xb21944,writeConfig(_0x3a1d98,_0x29db79),{'ok':!![],'message':'Default\x20app\x20candidate\x20set\x20to\x20\x22'+_0xb21944+'\x22'+scopeLabel(_0x29db79)+'.'};}};function warnDeprecatedAppCommand(_0xdf7669,_0x52e570){const _0x40bcf0=a3_0x44a92b;console['warn'](CLI_BIN_NAME+_0x40bcf0(0x14e)+_0xdf7669+_0x40bcf0(0x131)+_0x52e570+_0x40bcf0(0x138));}const importDef={'service':a3_0x44a92b(0x130),'command':a3_0x44a92b(0x137),'description':a3_0x44a92b(0x14b),'risk':a3_0x44a92b(0x14c),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initImportFlagDefs,async 'execute'(_0x177473){return await runInitImport(collectFlags(_0x177473,initImportFlagDefs)),{'ok':!![]};}};export const appDefinitions=[initDef,listDef,pullDef,useDef,importDef];
1
+ const a3_0x132a24=a3_0x52c8;(function(_0x34ea92,_0x1bad8d){const _0x451e29=a3_0x52c8,_0x434c18=_0x34ea92();while(!![]){try{const _0x6386b6=parseInt(_0x451e29(0x1c1))/0x1*(parseInt(_0x451e29(0x1ee))/0x2)+parseInt(_0x451e29(0x1c7))/0x3+parseInt(_0x451e29(0x1d5))/0x4+-parseInt(_0x451e29(0x1fa))/0x5+-parseInt(_0x451e29(0x1e6))/0x6*(-parseInt(_0x451e29(0x1c3))/0x7)+-parseInt(_0x451e29(0x1fe))/0x8+-parseInt(_0x451e29(0x1ed))/0x9;if(_0x6386b6===_0x1bad8d)break;else _0x434c18['push'](_0x434c18['shift']());}catch(_0x3de7f6){_0x434c18['push'](_0x434c18['shift']());}}}(a3_0x43d8,0xa3a6c));import{CliErrors}from'../../errors.js';import{initCreateFlagDefs,initImportFlagDefs,runInit,runInitImport}from'../../commands/init.js';import{getEnv,RUNTIME_ENV_VALUES}from'../../constant/env.js';function a3_0x52c8(_0x5a5c41,_0x52de31){_0x5a5c41=_0x5a5c41-0x1aa;const _0x43d8b8=a3_0x43d8();let _0x52c85c=_0x43d8b8[_0x5a5c41];return _0x52c85c;}import{buildAppProfileListFields}from'../../config/schema.js';import{CLI_BIN_NAME,readConfig,writeConfig,scopeLabel,enrichAppListItemsWithMergedSelection}from'../../commands/app/shared.js';import{resolveConfigScope,toScopeFlags}from'../../commands/common/config-policy.js';import{filterRuntimeAccessibleApps,findAppByCode,isRuntimeAccessibleApp,runtimeInaccessibleAppError}from'../../commands/app/eligibility.js';const GLOBAL_FLAG={'name':'global','type':a3_0x132a24(0x1ce),'description':a3_0x132a24(0x1df),'default':![]};function a3_0x43d8(){const _0x5bf296=['Use\x20`','no-cache','cachePath','appCode','2876208gRGCar','Read\x20from\x20local\x20cache\x20only','cache','warn','../../commands/app/cache.js','name','\x20app\x20use\x20<name>\x20[--global]','Deprecated:\x20use\x20workspace\x20init\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','map','Remote\x20app\x20name\x20to\x20activate','Use\x20global\x20config\x20scope','No\x20apps\x20found\x20on\x20the\x20platform.','\x20is\x20deprecated.\x20Use\x20`','Usage:\x20','trim','\x20workspace\x20init\x20--appcode\x20<code>\x20[--env\x20daily]','type','84546pAhPXv','entries','Filter\x20by\x20environment\x20(default:\x20current\x20env)','Deprecated:\x20use\x20workspace\x20use\x20to\x20bind\x20the\x20current\x20directory\x20to\x20an\x20app','length','args','`\x20instead.','16592067NarmxC','810396NSqbNs','\x20workspace\x20use\x20--app\x20<name>\x20[--env\x20daily]','use','Available\x20remote\x20apps:\x20','fetchedAt','appOwnerName','join','import','bool','Target\x20environment\x20(default:\x20current\x20env)','No\x20cached\x20apps\x20found.','str','1128750WGLYRv','mergedCli','list','include-unpublished','1610784NGigUq','appPublishStatus','find','from','Default\x20app\x20candidate\x20set\x20to\x20\x22','env','raw','Missing\x20app\x20name.','filter','local','.appcode\x20to\x20.lovrabet.json.','langs','globalPath','global','nonInteractive','\x22\x20not\x20found.','app','items','../../context.js','../../commands/app/remote-source.js','config','defaultApp','envName','remote','2vyINtc','validation','539FnNWZy','enableI18n','Refreshed\x20app\x20cache\x20with\x20','projectPath','979566DfFujh','write','production','source','push','Force\x20remote\x20fetch\x20and\x20refresh\x20local\x20cache','accessKey','boolean','appName','string'];a3_0x43d8=function(){return _0x5bf296;};return a3_0x43d8();}function collectFlags(_0x2d078a,_0x5ec672){const _0x109cc3=a3_0x132a24,_0x265163={};for(const _0x1cbbf1 of _0x5ec672){const _0x549371=_0x1cbbf1[_0x109cc3(0x1e5)]==='boolean'?_0x2d078a[_0x109cc3(0x1f6)](_0x1cbbf1['name']):_0x2d078a[_0x109cc3(0x1f9)](_0x1cbbf1['name']);if(_0x549371!==''&&_0x549371!==![])_0x265163[_0x1cbbf1[_0x109cc3(0x1da)]]=_0x549371;}if(_0x2d078a[_0x109cc3(0x1b7)])_0x265163[_0x109cc3(0x1b7)]=!![];return _0x265163;}function normalizeLanguages(_0x530608){const _0x5309d5=a3_0x132a24;if(!Array['isArray'](_0x530608))return[];return _0x530608[_0x5309d5(0x1b1)](_0xc6ea60=>typeof _0xc6ea60==='string')[_0x5309d5(0x1dd)](_0x4a032c=>_0x4a032c[_0x5309d5(0x1e3)]())[_0x5309d5(0x1b1)](Boolean);}function buildRemoteAppI18nFields(_0x591a0c){const _0x29db51=a3_0x132a24,_0x108e44=normalizeLanguages(_0x591a0c['i18nInfo']?.[_0x29db51(0x1b4)]);return{'enableI18n':typeof _0x591a0c[_0x29db51(0x1c4)]==='boolean'?_0x591a0c[_0x29db51(0x1c4)]:null,'languages':_0x108e44,'i18nInfo':_0x591a0c['i18nInfo']?{..._0x591a0c['i18nInfo'],'langs':_0x108e44[_0x29db51(0x1ea)]?_0x108e44:null}:null};}const initDef={'service':a3_0x132a24(0x1b9),'command':'init','description':a3_0x132a24(0x1dc),'risk':a3_0x132a24(0x1c8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initCreateFlagDefs,async 'execute'(_0x5ca3a9){const _0x6dc1cc=a3_0x132a24;return warnDeprecatedAppCommand('init',CLI_BIN_NAME+_0x6dc1cc(0x1e4)),await runInit(collectFlags(_0x5ca3a9,initCreateFlagDefs)),{'ok':!![]};}},listDef={'service':a3_0x132a24(0x1b9),'command':a3_0x132a24(0x1fc),'description':'List\x20apps\x20available\x20to\x20the\x20current\x20access\x20key','risk':'read','requiresAuth':!![],'requiresAppCode':![],'hasFormat':!![],'flags':[{'name':a3_0x132a24(0x1ae),'type':'string','description':a3_0x132a24(0x1e8),'enum':[...RUNTIME_ENV_VALUES]},{'name':a3_0x132a24(0x1b2),'type':a3_0x132a24(0x1ce),'description':'Read\x20app\x20list\x20from\x20local\x20cache\x20only','default':![]},{'name':a3_0x132a24(0x1d2),'type':'boolean','description':a3_0x132a24(0x1cc),'default':![]},{'name':a3_0x132a24(0x1fd),'type':a3_0x132a24(0x1ce),'description':'Include\x20unpublished\x20apps\x20for\x20diagnostics','default':![]}],async 'execute'(_0x1a5c6d){const _0x2e9e4f=a3_0x132a24,_0x1eb112=_0x1a5c6d['str'](_0x2e9e4f(0x1ae))||_0x1a5c6d[_0x2e9e4f(0x1bf)]||getEnv()||_0x2e9e4f(0x1c9),_0x392455=_0x1a5c6d[_0x2e9e4f(0x1f6)](_0x2e9e4f(0x1b2)),_0x47173d=_0x1a5c6d[_0x2e9e4f(0x1f6)](_0x2e9e4f(0x1d2)),_0x150d4c=_0x1a5c6d[_0x2e9e4f(0x1f6)](_0x2e9e4f(0x1fd)),{readRawConfigWithLayers:_0x1b18af,resolveDefaultAppSource:_0x5812bc,getLocalAppAliases:_0x41ad28}=await import(_0x2e9e4f(0x1bb)),{getRemoteAppList:_0xe9ab3c}=await import(_0x2e9e4f(0x1bc)),{config:_0x259b45,layers:_0x10d614}=_0x1b18af(),_0xdc3a05=_0x5812bc(_0x10d614),{defaultApp:_0x1efa4a}=_0x259b45,_0x42a1cb=await _0xe9ab3c({'env':_0x1eb112,'accessKey':_0x1a5c6d[_0x2e9e4f(0x1cd)],'localOnly':_0x392455,'noCache':_0x47173d}),_0x567efb=_0x150d4c?_0x42a1cb[_0x2e9e4f(0x1ba)]:filterRuntimeAccessibleApps(_0x42a1cb['items']),_0x2b9a9e=_0x42a1cb['items'][_0x2e9e4f(0x1ea)]-_0x567efb[_0x2e9e4f(0x1ea)],_0x1ef04c=_0x567efb[_0x2e9e4f(0x1dd)](_0x3ea044=>{const _0x374f18=_0x2e9e4f;return{'name':_0x3ea044[_0x374f18(0x1cf)],'appcode':_0x3ea044['appCode'],'named':!![],'definedIn':_0x374f18(0x1c0),'isDefault':_0x3ea044[_0x374f18(0x1cf)]===_0x1efa4a,...buildAppProfileListFields(_0x1eb112),...buildRemoteAppI18nFields(_0x3ea044),'source':_0x42a1cb[_0x374f18(0x1ca)],'owner':_0x3ea044[_0x374f18(0x1f3)]??null,'status':_0x3ea044[_0x374f18(0x1aa)]??null,'cachedAt':_0x42a1cb['fetchedAt']};}),_0x1c0feb=_0x41ad28(_0x259b45);let _0x3e4268=0x0;for(const [_0x73bcf7,_0x5277ec]of Object[_0x2e9e4f(0x1e7)](_0x1c0feb)){const _0x3b2d43=typeof _0x5277ec['appcode']===_0x2e9e4f(0x1d0)?_0x5277ec['appcode'][_0x2e9e4f(0x1e3)]():'';if(!_0x3b2d43)continue;const _0x38f7d9=findAppByCode(_0x42a1cb[_0x2e9e4f(0x1ba)],_0x3b2d43);if(!_0x150d4c&&_0x38f7d9&&!isRuntimeAccessibleApp(_0x38f7d9))continue;_0x3e4268+=0x1,_0x1ef04c[_0x2e9e4f(0x1cb)]({'name':_0x73bcf7,'appcode':_0x3b2d43,'named':!![],'definedIn':'local','isDefault':_0x73bcf7===_0x1efa4a,...buildAppProfileListFields(_0x1eb112),'source':_0x2e9e4f(0x1bd),'owner':null,'status':null,'cachedAt':null});}enrichAppListItemsWithMergedSelection(_0x1ef04c,_0x1a5c6d[_0x2e9e4f(0x1fb)]);const _0x5b5b67=_0x1ef04c['find'](_0x1b2931=>_0x1b2931['isCurrent']===!![]),_0xccf022=_0x1efa4a??_0x5b5b67?.[_0x2e9e4f(0x1da)]??null,_0x40b6b1={'env':_0x1eb112,'source':_0x42a1cb[_0x2e9e4f(0x1ca)],'fetchedAt':_0x42a1cb[_0x2e9e4f(0x1f2)],'cachePath':_0x42a1cb[_0x2e9e4f(0x1d3)],'globalPath':_0x10d614[_0x2e9e4f(0x1b5)]??null,'projectPath':_0x10d614[_0x2e9e4f(0x1c6)]??null,'defaultApp':_0xccf022,'defaultAppSource':_0x1efa4a!=null?_0xdc3a05:null,'localAliasCount':_0x3e4268,'remoteTotal':_0x42a1cb[_0x2e9e4f(0x1ba)][_0x2e9e4f(0x1ea)],'hiddenUnpublishedCount':_0x2b9a9e,'includeUnpublished':_0x150d4c};if(_0x1ef04c[_0x2e9e4f(0x1ea)]===0x0)return{'ok':!![],'data':{'items':_0x1ef04c,'meta':_0x40b6b1},'message':_0x42a1cb[_0x2e9e4f(0x1ca)]===_0x2e9e4f(0x1d7)?_0x2e9e4f(0x1f8):_0x2e9e4f(0x1e0)};return{'ok':!![],'data':{'items':_0x1ef04c,'meta':_0x40b6b1}};}},pullDef={'service':a3_0x132a24(0x1b9),'command':'pull','description':'Refresh\x20the\x20local\x20app\x20cache\x20from\x20the\x20platform','risk':a3_0x132a24(0x1c8),'requiresAuth':!![],'requiresAppCode':![],'hasFormat':![],'flags':[{'name':a3_0x132a24(0x1ae),'type':a3_0x132a24(0x1d0),'description':a3_0x132a24(0x1f7),'enum':[...RUNTIME_ENV_VALUES]},{'name':a3_0x132a24(0x1b2),'type':a3_0x132a24(0x1ce),'description':a3_0x132a24(0x1d6),'default':![]},{'name':a3_0x132a24(0x1d2),'type':a3_0x132a24(0x1ce),'description':a3_0x132a24(0x1cc),'default':![]}],async 'execute'(_0x3dfae2){const _0x31c15e=a3_0x132a24,_0x3e35a3=_0x3dfae2[_0x31c15e(0x1f9)](_0x31c15e(0x1ae))||_0x3dfae2[_0x31c15e(0x1bf)]||getEnv()||_0x31c15e(0x1c9),_0x483fa1=_0x3dfae2[_0x31c15e(0x1f6)](_0x31c15e(0x1b2)),_0x59f91a=_0x3dfae2[_0x31c15e(0x1f6)](_0x31c15e(0x1d2)),{getRemoteAppList:_0x5ea2e4}=await import(_0x31c15e(0x1bc)),_0x280b52=await _0x5ea2e4({'env':_0x3e35a3,'accessKey':_0x3dfae2[_0x31c15e(0x1cd)],'localOnly':_0x483fa1,'noCache':_0x59f91a});return{'ok':!![],'data':{'total':_0x280b52[_0x31c15e(0x1ba)][_0x31c15e(0x1ea)],'env':_0x3e35a3,'source':_0x280b52[_0x31c15e(0x1ca)],'fetchedAt':_0x280b52[_0x31c15e(0x1f2)],'cachePath':_0x280b52['cachePath']},'message':_0x280b52[_0x31c15e(0x1ca)]===_0x31c15e(0x1d7)?'Loaded\x20'+_0x280b52['items'][_0x31c15e(0x1ea)]+'\x20cached\x20app(s)\x20for\x20env=\x22'+_0x3e35a3+'\x22.':_0x31c15e(0x1c5)+_0x280b52[_0x31c15e(0x1ba)][_0x31c15e(0x1ea)]+'\x20app(s)\x20for\x20env=\x22'+_0x3e35a3+'\x22.'};}},useDef={'service':a3_0x132a24(0x1b9),'command':'use','description':a3_0x132a24(0x1e9),'risk':a3_0x132a24(0x1c8),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'args':[{'name':a3_0x132a24(0x1da),'description':a3_0x132a24(0x1de),'required':!![]}],'flags':[GLOBAL_FLAG],async 'validate'(_0x5ae178){const _0x249502=a3_0x132a24;if(!_0x5ae178[_0x249502(0x1eb)][0x0])throw CliErrors[_0x249502(0x1c2)]('Missing\x20app\x20name.',_0x249502(0x1e2)+CLI_BIN_NAME+_0x249502(0x1db));},async 'execute'(_0x3329ae){const _0x4d142b=a3_0x132a24;warnDeprecatedAppCommand(_0x4d142b(0x1f0),CLI_BIN_NAME+_0x4d142b(0x1ef));const _0x349cc4=_0x3329ae['args'][0x0];if(!_0x349cc4)throw CliErrors['validation'](_0x4d142b(0x1b0),_0x4d142b(0x1e2)+CLI_BIN_NAME+'\x20app\x20use\x20<name>\x20[--global]');const {buildConfigFromFlags:_0x9275ae,resolveLocalAppAliasCode:_0x3f8bc2}=await import(_0x4d142b(0x1bb)),{readCachedAppList:_0x2562d1}=await import(_0x4d142b(0x1d9)),_0x328f27=_0x3329ae[_0x4d142b(0x1f9)](_0x4d142b(0x1ae)),_0xff83c7=_0x9275ae(_0x328f27?{'env':_0x328f27}:{}),_0x499d71=_0x2562d1(_0xff83c7[_0x4d142b(0x1ae)],_0xff83c7[_0x4d142b(0x1cd)]),_0x44419e=_0x499d71?.['items'][_0x4d142b(0x1ab)](_0xce6b70=>_0xce6b70[_0x4d142b(0x1cf)]===_0x349cc4),_0x3258e9=_0x3f8bc2(_0xff83c7[_0x4d142b(0x1af)]??{},_0x349cc4);if(_0x44419e&&!isRuntimeAccessibleApp(_0x44419e))throw runtimeInaccessibleAppError(_0x44419e,'\x22'+_0x349cc4+'\x22');if(_0x3258e9){const _0x565b5d=_0x499d71?.[_0x4d142b(0x1ba)]['find'](_0x3404a8=>_0x3404a8[_0x4d142b(0x1d4)]?.[_0x4d142b(0x1e3)]()===_0x3258e9);if(_0x565b5d&&!isRuntimeAccessibleApp(_0x565b5d))throw runtimeInaccessibleAppError(_0x565b5d,'\x22'+_0x349cc4+'\x22');}if(!_0x44419e&&!_0x3258e9&&_0xff83c7['defaultApp']!==_0x349cc4){const _0x4e557b=[..._0x499d71?.[_0x4d142b(0x1ba)]['map'](_0xdca81a=>_0xdca81a[_0x4d142b(0x1cf)])??[]],_0x244d66=_0x4e557b[_0x4d142b(0x1ea)]===0x0?_0x4d142b(0x1d1)+CLI_BIN_NAME+'\x20app\x20list`\x20to\x20discover\x20remote\x20apps,\x20or\x20add\x20apps.'+_0x349cc4+_0x4d142b(0x1b3):_0x4d142b(0x1f1)+Array[_0x4d142b(0x1ac)](new Set(_0x4e557b))[_0x4d142b(0x1f4)](',\x20')+'.\x20Local\x20aliases\x20can\x20be\x20added\x20under\x20apps.<alias>.appcode.';throw CliErrors[_0x4d142b(0x1c2)]('App\x20\x22'+_0x349cc4+_0x4d142b(0x1b8),_0x244d66);}const _0x25cd35=_0x3329ae[_0x4d142b(0x1f6)](_0x4d142b(0x1b6));let _0x4dbf85;if(_0x25cd35)_0x4dbf85={'global':!![]};else{const {isInProject:_0x62f7ff}=await import(_0x4d142b(0x1bb)),_0x346a18=_0x62f7ff();_0x4dbf85=toScopeFlags(resolveConfigScope({'explicitGlobal':![],'policy':'project-default','inProject':_0x346a18}));}const _0x10b485=readConfig(_0x4dbf85);return _0x10b485[_0x4d142b(0x1be)]=_0x349cc4,writeConfig(_0x10b485,_0x4dbf85),{'ok':!![],'message':_0x4d142b(0x1ad)+_0x349cc4+'\x22'+scopeLabel(_0x4dbf85)+'.'};}};function warnDeprecatedAppCommand(_0x400b5c,_0x4e61fc){const _0x3ab2a2=a3_0x132a24;console[_0x3ab2a2(0x1d8)](CLI_BIN_NAME+'\x20app\x20'+_0x400b5c+_0x3ab2a2(0x1e1)+_0x4e61fc+_0x3ab2a2(0x1ec));}const importDef={'service':'app','command':a3_0x132a24(0x1f5),'description':'Import\x20the\x20default\x20app\x20selection\x20from\x20a\x20.rabetbase.json\x20file','risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initImportFlagDefs,async 'execute'(_0x1edcd8){return await runInitImport(collectFlags(_0x1edcd8,initImportFlagDefs)),{'ok':!![]};}};export const appDefinitions=[initDef,listDef,pullDef,useDef,importDef];
@@ -1 +1 @@
1
- (function(_0xf48def,_0x20c01c){const _0x7642c7=a4_0x4c50,_0x14f26c=_0xf48def();while(!![]){try{const _0xd81939=parseInt(_0x7642c7(0xd8))/0x1*(parseInt(_0x7642c7(0xe8))/0x2)+-parseInt(_0x7642c7(0xda))/0x3*(parseInt(_0x7642c7(0xe3))/0x4)+-parseInt(_0x7642c7(0xe5))/0x5*(-parseInt(_0x7642c7(0xe2))/0x6)+-parseInt(_0x7642c7(0xeb))/0x7+parseInt(_0x7642c7(0xdc))/0x8+parseInt(_0x7642c7(0xe6))/0x9*(-parseInt(_0x7642c7(0xdb))/0xa)+parseInt(_0x7642c7(0xea))/0xb;if(_0xd81939===_0x20c01c)break;else _0x14f26c['push'](_0x14f26c['shift']());}catch(_0x242105){_0x14f26c['push'](_0x14f26c['shift']());}}}(a4_0x59ca,0x822ef));import{CLI_BIN_NAME}from'../../constant/cli.js';import{RUNTIME_ACCESSIBLE_APP_STATUS}from'../../constant/app.js';import{CliErrors}from'../../errors.js';export function normalizeAppPublishStatus(_0xe21850){const _0x2fef0c=a4_0x4c50;if(typeof _0xe21850!==_0x2fef0c(0xdf))return null;const _0x179223=_0xe21850['trim']();return _0x179223?_0x179223['toUpperCase']():null;}export function isRuntimeAccessibleApp(_0x1001cb){const _0x51afc1=a4_0x4c50;return normalizeAppPublishStatus(_0x1001cb[_0x51afc1(0xee)])===RUNTIME_ACCESSIBLE_APP_STATUS;}export function filterRuntimeAccessibleApps(_0x515d58){const _0xe294ba=a4_0x4c50;return _0x515d58[_0xe294ba(0xed)](isRuntimeAccessibleApp);}export function findAppByName(_0x148206,_0x5c0129){const _0x4425c5=a4_0x4c50;return _0x148206[_0x4425c5(0xef)](_0x1ce3b2=>_0x1ce3b2[_0x4425c5(0xd9)]===_0x5c0129);}export function findAppByCode(_0x2816f0,_0x5ae88e){const _0x1d9cf0=a4_0x4c50,_0x217cf9=_0x5ae88e[_0x1d9cf0(0xe1)]();if(!_0x217cf9)return undefined;return _0x2816f0[_0x1d9cf0(0xef)](_0x42b72c=>_0x42b72c[_0x1d9cf0(0xe7)]?.[_0x1d9cf0(0xe1)]()===_0x217cf9);}export function runtimeInaccessibleAppError(_0x4b4360,_0x50f8b0){const _0x1e6db8=a4_0x4c50,_0x51c5dc=normalizeAppPublishStatus(_0x4b4360['appPublishStatus'])??_0x1e6db8(0xe4);return CliErrors[_0x1e6db8(0xdd)](_0x1e6db8(0xe0)+_0x50f8b0+_0x1e6db8(0xe9),'Current\x20status:\x20'+_0x51c5dc+_0x1e6db8(0xde)+CLI_BIN_NAME+_0x1e6db8(0xec));}function a4_0x4c50(_0x353c48,_0x240fea){_0x353c48=_0x353c48-0xd8;const _0x59ca4d=a4_0x59ca();let _0x4c50c8=_0x59ca4d[_0x353c48];return _0x4c50c8;}function a4_0x59ca(){const _0x584d53=['string','App\x20','trim','5246424ESzkfp','32dKffpT','UNKNOWN','5ARTYTZ','206955PXKSum','appCode','4JVapmW','\x20is\x20not\x20available\x20for\x20runtime\x20AI\x20access.','8863294gyGiUi','1837955UxCjBx','\x20dataset/data/sql/bff\x20commands,\x20or\x20choose\x20a\x20published\x20app.','filter','appPublishStatus','find','56773NYnFxj','appName','286416ExjiAQ','260HQEvdo','2909904dhCYxS','validation','.\x20Publish\x20the\x20app\x20before\x20using\x20'];a4_0x59ca=function(){return _0x584d53;};return a4_0x59ca();}
1
+ (function(_0x4d877e,_0x496b03){const _0x5924b4=a4_0x478e,_0x41c568=_0x4d877e();while(!![]){try{const _0x1e7ba2=-parseInt(_0x5924b4(0x10f))/0x1*(parseInt(_0x5924b4(0x109))/0x2)+parseInt(_0x5924b4(0x106))/0x3+-parseInt(_0x5924b4(0x100))/0x4+-parseInt(_0x5924b4(0x108))/0x5+parseInt(_0x5924b4(0x110))/0x6*(-parseInt(_0x5924b4(0x104))/0x7)+-parseInt(_0x5924b4(0x103))/0x8*(-parseInt(_0x5924b4(0x102))/0x9)+parseInt(_0x5924b4(0x10a))/0xa;if(_0x1e7ba2===_0x496b03)break;else _0x41c568['push'](_0x41c568['shift']());}catch(_0x28c35e){_0x41c568['push'](_0x41c568['shift']());}}}(a4_0x45f6,0x619a4));import{CLI_BIN_NAME}from'../../constant/cli.js';import{RUNTIME_ACCESSIBLE_APP_STATUS}from'../../constant/app.js';import{CliErrors}from'../../errors.js';export function normalizeAppPublishStatus(_0x364904){const _0x4c872b=a4_0x478e;if(typeof _0x364904!=='string')return null;const _0x419b8f=_0x364904[_0x4c872b(0x112)]();return _0x419b8f?_0x419b8f[_0x4c872b(0x105)]():null;}function a4_0x478e(_0x2c7e4f,_0x327feb){_0x2c7e4f=_0x2c7e4f-0x100;const _0x45f646=a4_0x45f6();let _0x478e46=_0x45f646[_0x2c7e4f];return _0x478e46;}export function isRuntimeAccessibleApp(_0x567700){const _0x17479d=a4_0x478e;return normalizeAppPublishStatus(_0x567700[_0x17479d(0x113)])===RUNTIME_ACCESSIBLE_APP_STATUS;}export function filterRuntimeAccessibleApps(_0x4902e7){return _0x4902e7['filter'](isRuntimeAccessibleApp);}function a4_0x45f6(){const _0x4b8b3a=['trim','appPublishStatus','1253368LpFeNj','find','81epIjCe','344408jAvHPe','7sYuguZ','toUpperCase','1644000JLcvpS','appCode','1928270gkuukV','8huuPPr','9074320fbignh','UNKNOWN','\x20dataset/data/sql/bff\x20commands,\x20or\x20choose\x20a\x20published\x20app.','App\x20','Current\x20status:\x20','160211PgTzLf','619626ZRFAgr','appName'];a4_0x45f6=function(){return _0x4b8b3a;};return a4_0x45f6();}export function findAppByName(_0x15753f,_0x1f485d){const _0x1b8959=a4_0x478e;return _0x15753f[_0x1b8959(0x101)](_0x3f2c8a=>_0x3f2c8a[_0x1b8959(0x111)]===_0x1f485d);}export function findAppByCode(_0x476d24,_0x9e6805){const _0x528b62=a4_0x478e,_0x2e0b18=_0x9e6805[_0x528b62(0x112)]();if(!_0x2e0b18)return undefined;return _0x476d24['find'](_0x1e78d1=>_0x1e78d1[_0x528b62(0x107)]?.[_0x528b62(0x112)]()===_0x2e0b18);}export function runtimeInaccessibleAppError(_0x43aead,_0x4a6be9){const _0x1714b7=a4_0x478e,_0x1f4ac8=normalizeAppPublishStatus(_0x43aead[_0x1714b7(0x113)])??_0x1714b7(0x10b);return CliErrors['validation'](_0x1714b7(0x10d)+_0x4a6be9+'\x20is\x20not\x20available\x20for\x20runtime\x20AI\x20access.',_0x1714b7(0x10e)+_0x1f4ac8+'.\x20Publish\x20the\x20app\x20before\x20using\x20'+CLI_BIN_NAME+_0x1714b7(0x10c));}
@@ -1 +1 @@
1
- (function(_0x4c942c,_0x1f00d8){const _0x5767c3=a5_0x1a6f,_0x46dadf=_0x4c942c();while(!![]){try{const _0x112ff2=parseInt(_0x5767c3(0x14c))/0x1+parseInt(_0x5767c3(0x140))/0x2*(-parseInt(_0x5767c3(0x13e))/0x3)+-parseInt(_0x5767c3(0x148))/0x4+-parseInt(_0x5767c3(0x143))/0x5*(parseInt(_0x5767c3(0x149))/0x6)+parseInt(_0x5767c3(0x13b))/0x7*(parseInt(_0x5767c3(0x145))/0x8)+-parseInt(_0x5767c3(0x14b))/0x9*(parseInt(_0x5767c3(0x142))/0xa)+-parseInt(_0x5767c3(0x146))/0xb*(-parseInt(_0x5767c3(0x141))/0xc);if(_0x112ff2===_0x1f00d8)break;else _0x46dadf['push'](_0x46dadf['shift']());}catch(_0x21576c){_0x46dadf['push'](_0x46dadf['shift']());}}}(a5_0x2de4,0x24eb7));import{fileURLToPath}from'url';import{dirname,join}from'path';import{readFileSync}from'fs';function a5_0x1a6f(_0x12dd4a,_0x13ebf2){_0x12dd4a=_0x12dd4a-0x13b;const _0x2de4c2=a5_0x2de4();let _0x1a6f28=_0x2de4c2[_0x12dd4a];return _0x1a6f28;}const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function a5_0x2de4(){const _0x5c6f64=['482315PGrXhn','parse','181672ASQpLj','11dDiYiR','utf-8','1183328WZTtgW','6xLYyzY','tableData','57357rMLGRs','239482aToZDP','49AKkNTt','errorCode','errorMsg','3StpdQS','data','536156czJIXy','6487332oLrylv','200miQavB'];a5_0x2de4=function(){return _0x5c6f64;};return a5_0x2de4();}function loadMockAppList(){const _0x362aae=a5_0x1a6f,_0x5bacef=join(__dirname,'../../../mock/app-list.json'),_0x4473d5=readFileSync(_0x5bacef,_0x362aae(0x147));return JSON[_0x362aae(0x144)](_0x4473d5);}let _cached=null;export function getMockAppList(){return!_cached&&(_cached=loadMockAppList()),_cached;}export function getMockRemoteAppItems(){const _0x14c2b8=a5_0x1a6f,_0x34b6ab=getMockAppList();if(!_0x34b6ab['success'])throw new Error('Mock\x20API\x20error:\x20'+_0x34b6ab[_0x14c2b8(0x13d)]+'\x20('+_0x34b6ab[_0x14c2b8(0x13c)]+')');return _0x34b6ab[_0x14c2b8(0x13f)][_0x14c2b8(0x14a)];}
1
+ (function(_0x4eecb9,_0x589415){const _0x420553=a5_0x30ed,_0x167b83=_0x4eecb9();while(!![]){try{const _0x21674f=-parseInt(_0x420553(0x77))/0x1*(parseInt(_0x420553(0x72))/0x2)+parseInt(_0x420553(0x70))/0x3+parseInt(_0x420553(0x71))/0x4*(parseInt(_0x420553(0x74))/0x5)+-parseInt(_0x420553(0x75))/0x6+parseInt(_0x420553(0x6b))/0x7+-parseInt(_0x420553(0x76))/0x8+parseInt(_0x420553(0x73))/0x9*(-parseInt(_0x420553(0x6e))/0xa);if(_0x21674f===_0x589415)break;else _0x167b83['push'](_0x167b83['shift']());}catch(_0x31532d){_0x167b83['push'](_0x167b83['shift']());}}}(a5_0x1f95,0xd795f));function a5_0x1f95(){const _0x825473=['2131866xnQzto','4jdHdLv','174830gHUfvc','1972575yNZwad','6970805tqCGJe','1824684lLpyPK','8317760EGofPC','6GjRUpq','errorCode','parse','6060285PSapgW','data','utf-8','10afhrUh','Mock\x20API\x20error:\x20'];a5_0x1f95=function(){return _0x825473;};return a5_0x1f95();}function a5_0x30ed(_0x50cee9,_0x24db49){_0x50cee9=_0x50cee9-0x69;const _0x1f95ae=a5_0x1f95();let _0x30edb7=_0x1f95ae[_0x50cee9];return _0x30edb7;}import{fileURLToPath}from'url';import{dirname,join}from'path';import{readFileSync}from'fs';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function loadMockAppList(){const _0x279095=a5_0x30ed,_0x177b1d=join(__dirname,'../../../mock/app-list.json'),_0x4ed866=readFileSync(_0x177b1d,_0x279095(0x6d));return JSON[_0x279095(0x6a)](_0x4ed866);}let _cached=null;export function getMockAppList(){return!_cached&&(_cached=loadMockAppList()),_cached;}export function getMockRemoteAppItems(){const _0xe6c60a=a5_0x30ed,_0x2ce250=getMockAppList();if(!_0x2ce250['success'])throw new Error(_0xe6c60a(0x6f)+_0x2ce250['errorMsg']+'\x20('+_0x2ce250[_0xe6c60a(0x69)]+')');return _0x2ce250[_0xe6c60a(0x6c)]['tableData'];}
@@ -1 +1 @@
1
- (function(_0x4065c2,_0x23a4f1){const _0x2c6ce2=a6_0x863c,_0x46d78d=_0x4065c2();while(!![]){try{const _0x4d0820=-parseInt(_0x2c6ce2(0x176))/0x1*(parseInt(_0x2c6ce2(0x16d))/0x2)+-parseInt(_0x2c6ce2(0x175))/0x3*(-parseInt(_0x2c6ce2(0x17b))/0x4)+-parseInt(_0x2c6ce2(0x172))/0x5*(parseInt(_0x2c6ce2(0x16e))/0x6)+-parseInt(_0x2c6ce2(0x173))/0x7*(parseInt(_0x2c6ce2(0x17a))/0x8)+parseInt(_0x2c6ce2(0x178))/0x9+parseInt(_0x2c6ce2(0x171))/0xa+-parseInt(_0x2c6ce2(0x169))/0xb*(parseInt(_0x2c6ce2(0x179))/0xc);if(_0x4d0820===_0x23a4f1)break;else _0x46d78d['push'](_0x46d78d['shift']());}catch(_0x32f27a){_0x46d78d['push'](_0x46d78d['shift']());}}}(a6_0x57c9,0x370dd));import{getMyApps}from'../../core/api-client.js';import{getMockRemoteAppItems}from'../../commands/app/mock-loader.js';import{getAppCacheFilePath,readCachedAppList,writeCachedAppList}from'../../commands/app/cache.js';function a6_0x863c(_0x532b92,_0x516004){_0x532b92=_0x532b92-0x168;const _0x57c9dc=a6_0x57c9();let _0x863c95=_0x57c9dc[_0x532b92];return _0x863c95;}import{productEnv}from'../../constant/product.js';export function shouldUseMockRemoteApps(){const _0x1452b7=a6_0x863c,_0x5eb1fc=(productEnv(_0x1452b7(0x168))||'')['trim']()[_0x1452b7(0x170)]();return _0x5eb1fc===_0x1452b7(0x16f);}export async function getRemoteAppItems(){if(shouldUseMockRemoteApps())return getMockRemoteAppItems();return getMyApps();}function a6_0x57c9(){const _0x411b75=['2oOBmCJ','135906MppQLh','mock','toLowerCase','4328940jMukZF','35tAJMpO','42PMrwcK','fetchedAt','2730AxtVGX','264462yyVheW','trim','52488QTcVQx','24oloFBF','88496BYevBw','1904ubRrGV','APP_LIST_SOURCE','863467MfyIDw','cache','toISOString','items'];a6_0x57c9=function(){return _0x411b75;};return a6_0x57c9();}export async function getRemoteAppList(_0x2cf66d){const _0xc2a6d5=a6_0x863c,{env:_0x13d748,accessKey:_0xef3427,localOnly:localOnly=![],noCache:noCache=![]}=_0x2cf66d,_0x38477c=readCachedAppList(_0x13d748,_0xef3427),_0x3a714e=_0xef3427?.[_0xc2a6d5(0x177)]()?getAppCacheFilePath(_0x13d748,_0xef3427):null;if(localOnly)return{'items':_0x38477c?.[_0xc2a6d5(0x16c)]??[],'source':_0xc2a6d5(0x16a),'fetchedAt':_0x38477c?.[_0xc2a6d5(0x174)]??null,'cachePath':_0x3a714e};try{const _0x4fcabe=await getRemoteAppItems(),_0x4918c7=shouldUseMockRemoteApps()?'mock':'remote',_0x444118=new Date()[_0xc2a6d5(0x16b)](),_0x20a199=_0xef3427?.['trim']()?writeCachedAppList(_0x13d748,_0xef3427,{'env':_0x13d748,'fetchedAt':_0x444118,'source':_0x4918c7,'items':_0x4fcabe}):null;return{'items':_0x4fcabe,'source':_0x4918c7,'fetchedAt':_0x444118,'cachePath':_0x20a199};}catch(_0x163283){if(!noCache&&_0x38477c)return{'items':_0x38477c[_0xc2a6d5(0x16c)],'source':_0xc2a6d5(0x16a),'fetchedAt':_0x38477c[_0xc2a6d5(0x174)],'cachePath':_0x3a714e};throw _0x163283;}}
1
+ (function(_0x53f731,_0x1ff799){const _0x1cf37f=a6_0x2da0,_0x219f66=_0x53f731();while(!![]){try{const _0x5cdf53=-parseInt(_0x1cf37f(0xaf))/0x1*(parseInt(_0x1cf37f(0xac))/0x2)+parseInt(_0x1cf37f(0xb3))/0x3+parseInt(_0x1cf37f(0xb2))/0x4*(parseInt(_0x1cf37f(0xb0))/0x5)+-parseInt(_0x1cf37f(0xb5))/0x6+parseInt(_0x1cf37f(0xae))/0x7*(parseInt(_0x1cf37f(0xa9))/0x8)+parseInt(_0x1cf37f(0xa4))/0x9*(parseInt(_0x1cf37f(0xa8))/0xa)+-parseInt(_0x1cf37f(0xa5))/0xb*(parseInt(_0x1cf37f(0xb1))/0xc);if(_0x5cdf53===_0x1ff799)break;else _0x219f66['push'](_0x219f66['shift']());}catch(_0x16dd9d){_0x219f66['push'](_0x219f66['shift']());}}}(a6_0xa72f,0x32dff));import{getMyApps}from'../../core/api-client.js';import{getMockRemoteAppItems}from'../../commands/app/mock-loader.js';import{getAppCacheFilePath,readCachedAppList,writeCachedAppList}from'../../commands/app/cache.js';import{productEnv}from'../../constant/product.js';export function shouldUseMockRemoteApps(){const _0x38c13c=a6_0x2da0,_0x45ac04=(productEnv(_0x38c13c(0xa6))||'')[_0x38c13c(0xab)]()['toLowerCase']();return _0x45ac04===_0x38c13c(0xa7);}function a6_0x2da0(_0x2f8a74,_0x4ca61c){_0x2f8a74=_0x2f8a74-0xa4;const _0xa72f10=a6_0xa72f();let _0x2da017=_0xa72f10[_0x2f8a74];return _0x2da017;}function a6_0xa72f(){const _0x53fd70=['cache','51399xxvkcU','2350942YjtjwV','APP_LIST_SOURCE','mock','590JUWEtp','293816miSHrm','fetchedAt','trim','2xqGFPR','items','14kmpHQb','47201cgsiIv','115375EmAWzP','36KmOAtd','64nUTRTd','944025PakfZA','remote','1185168cnhcta'];a6_0xa72f=function(){return _0x53fd70;};return a6_0xa72f();}export async function getRemoteAppItems(){if(shouldUseMockRemoteApps())return getMockRemoteAppItems();return getMyApps();}export async function getRemoteAppList(_0x200755){const _0x2814a0=a6_0x2da0,{env:_0x194740,accessKey:_0x5dea2f,localOnly:localOnly=![],noCache:noCache=![]}=_0x200755,_0x443b78=readCachedAppList(_0x194740,_0x5dea2f),_0x342657=_0x5dea2f?.[_0x2814a0(0xab)]()?getAppCacheFilePath(_0x194740,_0x5dea2f):null;if(localOnly)return{'items':_0x443b78?.[_0x2814a0(0xad)]??[],'source':_0x2814a0(0xb6),'fetchedAt':_0x443b78?.[_0x2814a0(0xaa)]??null,'cachePath':_0x342657};try{const _0x276f7d=await getRemoteAppItems(),_0x322d32=shouldUseMockRemoteApps()?_0x2814a0(0xa7):_0x2814a0(0xb4),_0x65b624=new Date()['toISOString'](),_0x4fdf12=_0x5dea2f?.[_0x2814a0(0xab)]()?writeCachedAppList(_0x194740,_0x5dea2f,{'env':_0x194740,'fetchedAt':_0x65b624,'source':_0x322d32,'items':_0x276f7d}):null;return{'items':_0x276f7d,'source':_0x322d32,'fetchedAt':_0x65b624,'cachePath':_0x4fdf12};}catch(_0x53f71f){if(!noCache&&_0x443b78)return{'items':_0x443b78['items'],'source':_0x2814a0(0xb6),'fetchedAt':_0x443b78['fetchedAt'],'cachePath':_0x342657};throw _0x53f71f;}}
@@ -1 +1 @@
1
- function a7_0x5d3e(_0x35c69c,_0x4df350){_0x35c69c=_0x35c69c-0x18e;const _0x26f863=a7_0x26f8();let _0x5d3e2d=_0x26f863[_0x35c69c];return _0x5d3e2d;}(function(_0x1b4d0a,_0x15e938){const _0x13430f=a7_0x5d3e,_0x3deb3e=_0x1b4d0a();while(!![]){try{const _0x3fe4b1=parseInt(_0x13430f(0x19c))/0x1*(parseInt(_0x13430f(0x1a4))/0x2)+parseInt(_0x13430f(0x19d))/0x3*(-parseInt(_0x13430f(0x192))/0x4)+-parseInt(_0x13430f(0x19a))/0x5*(parseInt(_0x13430f(0x19b))/0x6)+-parseInt(_0x13430f(0x191))/0x7*(parseInt(_0x13430f(0x1a3))/0x8)+-parseInt(_0x13430f(0x18e))/0x9+-parseInt(_0x13430f(0x18f))/0xa*(parseInt(_0x13430f(0x19f))/0xb)+parseInt(_0x13430f(0x1a5))/0xc;if(_0x3fe4b1===_0x15e938)break;else _0x3deb3e['push'](_0x3deb3e['shift']());}catch(_0x19b976){_0x3deb3e['push'](_0x3deb3e['shift']());}}}(a7_0x26f8,0x6bb28));import{CLI_BIN_NAME}from'../../constant/cli.js';import{formatScopeLabel}from'../../commands/common/config-policy.js';export{CLI_BIN_NAME};function a7_0x26f8(){const _0x3c4dd5=['trim','global','4747696OQNiKK','38prMCDg','19407516FuNyHl','3240666NeTRyk','10hVFLRH','defaultApp','7lnHvjB','96sbEPoV','appCode','appcode','currentApp','name','named','local','find','10HbcIuH','455790AbQuXw','29347DXBoDI','23889TMhXqB','isCurrent','4808980pUGPTv','definedIn'];a7_0x26f8=function(){return _0x3c4dd5;};return a7_0x26f8();}export function enrichAppListItemsWithMergedSelection(_0x1befd0,_0x334c01){const _0x55b12a=a7_0x5d3e;if(!_0x334c01)return;const _0x2b3c22=!!(_0x334c01[_0x55b12a(0x195)]??_0x334c01['defaultApp']);for(const _0x91b09a of _0x1befd0){_0x91b09a['isCurrent']=![];}const _0x47bb7d=_0x334c01[_0x55b12a(0x193)]!=null?String(_0x334c01['appCode'])['trim']():'';if(_0x2b3c22){const _0x5a3f9c=_0x334c01[_0x55b12a(0x195)]??_0x334c01[_0x55b12a(0x190)];if(_0x5a3f9c){const _0x148411=_0x1befd0[_0x55b12a(0x199)](_0x1501ea=>_0x1501ea['named']===!![]&&_0x1501ea[_0x55b12a(0x196)]===_0x5a3f9c&&_0x1501ea[_0x55b12a(0x1a0)]===_0x55b12a(0x198)),_0x54d3ad=_0x148411??_0x1befd0[_0x55b12a(0x199)](_0x5ab9e6=>_0x5ab9e6[_0x55b12a(0x197)]===!![]&&_0x5ab9e6[_0x55b12a(0x196)]===_0x5a3f9c);if(_0x54d3ad){const _0x130c36=String(_0x54d3ad['appcode']??'')[_0x55b12a(0x1a1)]();if(!_0x47bb7d||_0x130c36===_0x47bb7d){_0x54d3ad['isCurrent']=!![];return;}}}if(_0x47bb7d){const _0xf021cc=_0x1befd0['find'](_0x5d638d=>String(_0x5d638d[_0x55b12a(0x194)]??'')[_0x55b12a(0x1a1)]()===_0x47bb7d);_0xf021cc&&(_0xf021cc[_0x55b12a(0x19e)]=!![]);}return;}if(!_0x47bb7d)return;for(const _0x3a7f9 of _0x1befd0){String(_0x3a7f9['appcode']??'')[_0x55b12a(0x1a1)]()===_0x47bb7d&&(_0x3a7f9['isCurrent']=!![]);}}export{readScopedConfig as readConfig,writeScopedConfig as writeConfig,isInProject}from'../../context.js';export function scopeLabel(_0x475380){const _0x46d194=a7_0x5d3e;return formatScopeLabel(_0x475380['global']?_0x46d194(0x1a2):'project');}
1
+ (function(_0x928dd2,_0x40062f){const _0x31bbae=a7_0x4667,_0x8f80cb=_0x928dd2();while(!![]){try{const _0xbf931b=parseInt(_0x31bbae(0x139))/0x1*(parseInt(_0x31bbae(0x13b))/0x2)+-parseInt(_0x31bbae(0x131))/0x3+parseInt(_0x31bbae(0x12f))/0x4*(parseInt(_0x31bbae(0x12e))/0x5)+parseInt(_0x31bbae(0x138))/0x6+-parseInt(_0x31bbae(0x13e))/0x7+-parseInt(_0x31bbae(0x13a))/0x8*(-parseInt(_0x31bbae(0x13d))/0x9)+-parseInt(_0x31bbae(0x130))/0xa;if(_0xbf931b===_0x40062f)break;else _0x8f80cb['push'](_0x8f80cb['shift']());}catch(_0x4468be){_0x8f80cb['push'](_0x8f80cb['shift']());}}}(a7_0x1692,0x8a3a0));function a7_0x4667(_0x4159b5,_0x3d6772){_0x4159b5=_0x4159b5-0x12d;const _0x1692d4=a7_0x1692();let _0x466787=_0x1692d4[_0x4159b5];return _0x466787;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{formatScopeLabel}from'../../commands/common/config-policy.js';export{CLI_BIN_NAME};export function enrichAppListItemsWithMergedSelection(_0x5819c1,_0x570039){const _0x20b797=a7_0x4667;if(!_0x570039)return;const _0x5224b1=!!(_0x570039['currentApp']??_0x570039[_0x20b797(0x142)]);for(const _0x250adf of _0x5819c1){_0x250adf['isCurrent']=![];}const _0x96b30f=_0x570039[_0x20b797(0x135)]!=null?String(_0x570039[_0x20b797(0x135)])['trim']():'';if(_0x5224b1){const _0x773b8f=_0x570039[_0x20b797(0x140)]??_0x570039[_0x20b797(0x142)];if(_0x773b8f){const _0x40aaaf=_0x5819c1[_0x20b797(0x137)](_0x413a0f=>_0x413a0f[_0x20b797(0x12d)]===!![]&&_0x413a0f[_0x20b797(0x136)]===_0x773b8f&&_0x413a0f['definedIn']===_0x20b797(0x133)),_0x1922dd=_0x40aaaf??_0x5819c1['find'](_0x21a8f5=>_0x21a8f5['named']===!![]&&_0x21a8f5['name']===_0x773b8f);if(_0x1922dd){const _0x1703e3=String(_0x1922dd[_0x20b797(0x13c)]??'')[_0x20b797(0x13f)]();if(!_0x96b30f||_0x1703e3===_0x96b30f){_0x1922dd[_0x20b797(0x134)]=!![];return;}}}if(_0x96b30f){const _0x2048ac=_0x5819c1[_0x20b797(0x137)](_0x1cce25=>String(_0x1cce25[_0x20b797(0x13c)]??'')[_0x20b797(0x13f)]()===_0x96b30f);_0x2048ac&&(_0x2048ac[_0x20b797(0x134)]=!![]);}return;}if(!_0x96b30f)return;for(const _0x3bd0fa of _0x5819c1){String(_0x3bd0fa[_0x20b797(0x13c)]??'')[_0x20b797(0x13f)]()===_0x96b30f&&(_0x3bd0fa[_0x20b797(0x134)]=!![]);}}function a7_0x1692(){const _0x3a3f53=['8yYZfcG','22gAcRsn','appcode','6565239DeLoXb','964509nJEUra','trim','currentApp','global','defaultApp','named','25285YhCyeg','820hCSUHB','17389980KYSDKz','1693764rHmMQO','project','local','isCurrent','appCode','name','find','1882578GzhCOf','84330RIbiaa'];a7_0x1692=function(){return _0x3a3f53;};return a7_0x1692();}export{readScopedConfig as readConfig,writeScopedConfig as writeConfig,isInProject}from'../../context.js';export function scopeLabel(_0x2d705c){const _0x4d2815=a7_0x4667;return formatScopeLabel(_0x2d705c[_0x4d2815(0x141)]?_0x4d2815(0x141):_0x4d2815(0x132));}
@@ -1 +1 @@
1
- const a8_0x37cef7=a8_0x70ec;(function(_0x295c93,_0x3a81bb){const _0x3a60e6=a8_0x70ec,_0x553076=_0x295c93();while(!![]){try{const _0x2b35bb=-parseInt(_0x3a60e6(0x76))/0x1+parseInt(_0x3a60e6(0x7c))/0x2+parseInt(_0x3a60e6(0x68))/0x3*(-parseInt(_0x3a60e6(0x71))/0x4)+-parseInt(_0x3a60e6(0x6e))/0x5*(-parseInt(_0x3a60e6(0x73))/0x6)+parseInt(_0x3a60e6(0x70))/0x7+parseInt(_0x3a60e6(0x72))/0x8+-parseInt(_0x3a60e6(0x69))/0x9*(parseInt(_0x3a60e6(0x7b))/0xa);if(_0x2b35bb===_0x3a81bb)break;else _0x553076['push'](_0x553076['shift']());}catch(_0x2a9162){_0x553076['push'](_0x553076['shift']());}}}(a8_0x5de0,0x1fb0e));import{getRuntimeAppConfigByKey}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{projectAppConfigVisibilityCheck}from'../../commands/app-config/shared.js';export const appConfigGet={'service':a8_0x37cef7(0x6f),'command':a8_0x37cef7(0x78),'description':a8_0x37cef7(0x6d),'risk':a8_0x37cef7(0x7f),'args':[{'name':a8_0x37cef7(0x6a),'description':a8_0x37cef7(0x74),'required':!![]}],'flags':[],async 'execute'(_0x24503b){const _0x1d321d=a8_0x37cef7,_0x369748=_0x24503b[_0x1d321d(0x7a)][0x0]?.[_0x1d321d(0x7d)]();if(!_0x369748)throw CliErrors[_0x1d321d(0x77)]('Missing\x20app-config\x20key.',_0x1d321d(0x80)+CLI_BIN_NAME+_0x1d321d(0x79));try{const _0x410c42=await getRuntimeAppConfigByKey(_0x24503b[_0x1d321d(0x6b)],_0x369748);return{'ok':!![],'data':projectAppConfigVisibilityCheck(_0x410c42,{'appCode':_0x24503b[_0x1d321d(0x6b)],'key':_0x369748})};}catch{throw CliErrors[_0x1d321d(0x75)](_0x1d321d(0x7e)+_0x369748+_0x1d321d(0x6c)+_0x24503b[_0x1d321d(0x6b)],'Check\x20that\x20the\x20key\x20exists,\x20the\x20current\x20AccessKey\x20has\x20permission,\x20and\x20the\x20runtime\x20read-only\x20app-config\x20endpoint\x20is\x20available.');}}};function a8_0x70ec(_0x1f717c,_0x29bd46){_0x1f717c=_0x1f717c-0x68;const _0x5de0a9=a8_0x5de0();let _0x70ec56=_0x5de0a9[_0x1f717c];return _0x70ec56;}function a8_0x5de0(){const _0x4fe399=['46792AvCDDX','427432cbgybM','7668tPnwlU','App\x20config\x20key','apiError','85729bLeFeF','validation','get','\x20app-config\x20get\x20<key>','args','8600qWHXNv','230048HpCqvG','trim','Unable\x20to\x20inspect\x20app-config\x20key\x20status:\x20key=','read','Usage:\x20','45eBcpWE','18frLoyP','key','appCode',',\x20appCode=','Check\x20whether\x20one\x20runtime\x20app-config\x20key\x20is\x20configured\x20without\x20printing\x20its\x20value','265udRnQA','app-config','1095766MbjKea'];a8_0x5de0=function(){return _0x4fe399;};return a8_0x5de0();}
1
+ function a8_0x5f3c(_0x461772,_0x3110e8){_0x461772=_0x461772-0x15c;const _0x3e84a4=a8_0x3e84();let _0x5f3c49=_0x3e84a4[_0x461772];return _0x5f3c49;}const a8_0x526fc7=a8_0x5f3c;(function(_0x592dc4,_0x5b02ca){const _0x40a7cd=a8_0x5f3c,_0xc737ab=_0x592dc4();while(!![]){try{const _0xd88c6a=parseInt(_0x40a7cd(0x172))/0x1*(parseInt(_0x40a7cd(0x160))/0x2)+parseInt(_0x40a7cd(0x15f))/0x3+parseInt(_0x40a7cd(0x166))/0x4+-parseInt(_0x40a7cd(0x171))/0x5*(parseInt(_0x40a7cd(0x16a))/0x6)+parseInt(_0x40a7cd(0x162))/0x7*(parseInt(_0x40a7cd(0x170))/0x8)+parseInt(_0x40a7cd(0x163))/0x9+-parseInt(_0x40a7cd(0x16d))/0xa;if(_0xd88c6a===_0x5b02ca)break;else _0xc737ab['push'](_0xc737ab['shift']());}catch(_0x5b0064){_0xc737ab['push'](_0xc737ab['shift']());}}}(a8_0x3e84,0xad3aa));import{getRuntimeAppConfigByKey}from'../../core/api-client.js';function a8_0x3e84(){const _0x330620=['apiError','appCode','17913580UTebTV','\x20app-config\x20get\x20<key>','args','8oDILvH','4295UQGLNy','1XjtBxS','Check\x20that\x20the\x20key\x20exists,\x20the\x20current\x20AccessKey\x20has\x20permission,\x20and\x20the\x20runtime\x20read-only\x20app-config\x20endpoint\x20is\x20available.','App\x20config\x20key','trim','2452791SetEMb','1432814DRmWjH','read','5039867bhqLXv','10471401ZPxjWy','Missing\x20app-config\x20key.','Check\x20whether\x20one\x20runtime\x20app-config\x20key\x20is\x20configured\x20without\x20printing\x20its\x20value','1748856szqKlK','Unable\x20to\x20inspect\x20app-config\x20key\x20status:\x20key=','key',',\x20appCode=','9456XPzAPg'];a8_0x3e84=function(){return _0x330620;};return a8_0x3e84();}import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{projectAppConfigVisibilityCheck}from'../../commands/app-config/shared.js';export const appConfigGet={'service':'app-config','command':'get','description':a8_0x526fc7(0x165),'risk':a8_0x526fc7(0x161),'args':[{'name':a8_0x526fc7(0x168),'description':a8_0x526fc7(0x15d),'required':!![]}],'flags':[],async 'execute'(_0x21def5){const _0x225c3b=a8_0x526fc7,_0x3ef971=_0x21def5[_0x225c3b(0x16f)][0x0]?.[_0x225c3b(0x15e)]();if(!_0x3ef971)throw CliErrors['validation'](_0x225c3b(0x164),'Usage:\x20'+CLI_BIN_NAME+_0x225c3b(0x16e));try{const _0x1bd30d=await getRuntimeAppConfigByKey(_0x21def5['appCode'],_0x3ef971);return{'ok':!![],'data':projectAppConfigVisibilityCheck(_0x1bd30d,{'appCode':_0x21def5[_0x225c3b(0x16c)],'key':_0x3ef971})};}catch{throw CliErrors[_0x225c3b(0x16b)](_0x225c3b(0x167)+_0x3ef971+_0x225c3b(0x169)+_0x21def5[_0x225c3b(0x16c)],_0x225c3b(0x15c));}}};
@@ -1 +1 @@
1
- (function(_0x183974,_0x272a9d){const _0x151922=a9_0x43c7,_0xc78d3=_0x183974();while(!![]){try{const _0x2f785f=parseInt(_0x151922(0x15a))/0x1*(-parseInt(_0x151922(0x156))/0x2)+parseInt(_0x151922(0x158))/0x3+-parseInt(_0x151922(0x159))/0x4+parseInt(_0x151922(0x15e))/0x5+-parseInt(_0x151922(0x15d))/0x6+parseInt(_0x151922(0x157))/0x7*(-parseInt(_0x151922(0x15b))/0x8)+parseInt(_0x151922(0x15c))/0x9;if(_0x2f785f===_0x272a9d)break;else _0xc78d3['push'](_0xc78d3['shift']());}catch(_0x5e6a5d){_0xc78d3['push'](_0xc78d3['shift']());}}}(a9_0x4db7,0x4c912));import{appConfigGet}from'../../commands/app-config/get.js';function a9_0x43c7(_0xecba75,_0x34c9fe){_0xecba75=_0xecba75-0x156;const _0x4db7b9=a9_0x4db7();let _0x43c72d=_0x4db7b9[_0xecba75];return _0x43c72d;}export const appConfigDefinitions=[appConfigGet];function a9_0x4db7(){const _0x1fb3ee=['1969680JIHxIX','13901ikdNEj','1593896CHZyvc','4295034Pdiblo','872118XqgxSA','2371100iSmRSZ','54vIQUtj','7BoQkyh','1723527IMWZXC'];a9_0x4db7=function(){return _0x1fb3ee;};return a9_0x4db7();}
1
+ (function(_0x59b7c4,_0x41d12a){const _0x12d1e4=a9_0x2275,_0x48f818=_0x59b7c4();while(!![]){try{const _0x35d77c=parseInt(_0x12d1e4(0xcf))/0x1*(-parseInt(_0x12d1e4(0xcd))/0x2)+-parseInt(_0x12d1e4(0xcb))/0x3*(parseInt(_0x12d1e4(0xc7))/0x4)+parseInt(_0x12d1e4(0xce))/0x5+parseInt(_0x12d1e4(0xd0))/0x6+-parseInt(_0x12d1e4(0xd1))/0x7*(-parseInt(_0x12d1e4(0xca))/0x8)+-parseInt(_0x12d1e4(0xd2))/0x9*(-parseInt(_0x12d1e4(0xc8))/0xa)+parseInt(_0x12d1e4(0xcc))/0xb*(-parseInt(_0x12d1e4(0xc9))/0xc);if(_0x35d77c===_0x41d12a)break;else _0x48f818['push'](_0x48f818['shift']());}catch(_0x3b2baf){_0x48f818['push'](_0x48f818['shift']());}}}(a9_0x3d4b,0xadbee));function a9_0x3d4b(){const _0x1a952a=['4WlkvGs','150sWAunN','4730316weZbGP','1614376FYozYX','462057xbvbqb','33vxhRsk','1371944IQSitO','3490060oCNYwl','1jDYVuQ','7356948cWfXWO','7oidbCO','364959eOVpXj'];a9_0x3d4b=function(){return _0x1a952a;};return a9_0x3d4b();}import{appConfigGet}from'../../commands/app-config/get.js';function a9_0x2275(_0x437a4a,_0x12ad9d){_0x437a4a=_0x437a4a-0xc7;const _0x3d4b97=a9_0x3d4b();let _0x2275da=_0x3d4b97[_0x437a4a];return _0x2275da;}export const appConfigDefinitions=[appConfigGet];
@@ -1 +1 @@
1
- function a10_0x4e19(_0x49c8e7,_0x5d7250){_0x49c8e7=_0x49c8e7-0xf4;const _0x270108=a10_0x2701();let _0x4e1962=_0x270108[_0x49c8e7];return _0x4e1962;}(function(_0x4dfe29,_0x1059d2){const _0x24b39c=a10_0x4e19,_0x42a97d=_0x4dfe29();while(!![]){try{const _0x4d0b0b=-parseInt(_0x24b39c(0xfe))/0x1+-parseInt(_0x24b39c(0x101))/0x2*(-parseInt(_0x24b39c(0xf6))/0x3)+parseInt(_0x24b39c(0xfd))/0x4*(parseInt(_0x24b39c(0x107))/0x5)+parseInt(_0x24b39c(0x106))/0x6+parseInt(_0x24b39c(0xff))/0x7+parseInt(_0x24b39c(0xfc))/0x8*(parseInt(_0x24b39c(0xf4))/0x9)+parseInt(_0x24b39c(0x10c))/0xa*(-parseInt(_0x24b39c(0xf5))/0xb);if(_0x4d0b0b===_0x1059d2)break;else _0x42a97d['push'](_0x42a97d['shift']());}catch(_0x534a0c){_0x42a97d['push'](_0x42a97d['shift']());}}}(a10_0x2701,0xbb7bd));function a10_0x2701(){const _0x6a77c1=['key','isArray','1681800tBTagP','395QUBuCI','map','parse','gmtCreate','string','19390730fwqGEd','createTime','36180EaFCvB','11ZJHMrq','41061Glypvw','length','gmtModified','appCode','trim','filter','1168nSrKOY','63572nUnbST','1391409TScTYb','5781580XJptav','split','168NyYgdr','tags','traceId'];a10_0x2701=function(){return _0x6a77c1;};return a10_0x2701();}function normalizeTags(_0x48ec46){const _0x366438=a10_0x4e19;if(Array[_0x366438(0x105)](_0x48ec46))return _0x48ec46[_0x366438(0x108)](_0x1d0c37=>String(_0x1d0c37))[_0x366438(0xfb)](Boolean);if(typeof _0x48ec46!==_0x366438(0x10b))return[];const _0x495c9a=_0x48ec46['trim']();if(!_0x495c9a)return[];try{const _0x2091a5=JSON[_0x366438(0x109)](_0x495c9a);if(Array[_0x366438(0x105)](_0x2091a5))return _0x2091a5[_0x366438(0x108)](_0x2a9bd3=>String(_0x2a9bd3))[_0x366438(0xfb)](Boolean);}catch{}return _0x495c9a[_0x366438(0x100)](',')[_0x366438(0x108)](_0x2df92b=>_0x2df92b['trim']())[_0x366438(0xfb)](Boolean);}export function projectAppConfigVisibilityCheck(_0x1ff31c,_0x1df42e){const _0x3a4809=a10_0x4e19,_0x2ec731=_0x1ff31c['value'],_0x5a6a08={'appCode':typeof _0x1ff31c[_0x3a4809(0xf9)]===_0x3a4809(0x10b)&&_0x1ff31c[_0x3a4809(0xf9)][_0x3a4809(0xfa)]()?_0x1ff31c[_0x3a4809(0xf9)]:_0x1df42e[_0x3a4809(0xf9)],'key':typeof _0x1ff31c['key']===_0x3a4809(0x10b)&&_0x1ff31c[_0x3a4809(0x104)][_0x3a4809(0xfa)]()?_0x1ff31c['key']:_0x1df42e[_0x3a4809(0x104)],'tags':normalizeTags(_0x1ff31c[_0x3a4809(0x102)]),'hasValue':typeof _0x2ec731===_0x3a4809(0x10b)?_0x2ec731[_0x3a4809(0xf7)]>0x0:_0x2ec731!=null,'valueRedacted':!![],'gmtModified':_0x1ff31c[_0x3a4809(0xf8)]??_0x1ff31c['updateTime']??'','gmtCreate':_0x1ff31c[_0x3a4809(0x10a)]??_0x1ff31c[_0x3a4809(0x10d)]??''};return typeof _0x1ff31c['traceId']===_0x3a4809(0x10b)&&_0x1ff31c[_0x3a4809(0x103)][_0x3a4809(0xfa)]()&&(_0x5a6a08['traceId']=_0x1ff31c[_0x3a4809(0x103)]),_0x5a6a08;}
1
+ (function(_0x371144,_0x1f638e){const _0x364dc9=a10_0x4bf5,_0x2c125f=_0x371144();while(!![]){try{const _0x284286=parseInt(_0x364dc9(0xcb))/0x1+-parseInt(_0x364dc9(0xde))/0x2+parseInt(_0x364dc9(0xc7))/0x3*(parseInt(_0x364dc9(0xdd))/0x4)+parseInt(_0x364dc9(0xd0))/0x5*(parseInt(_0x364dc9(0xcf))/0x6)+-parseInt(_0x364dc9(0xd6))/0x7+-parseInt(_0x364dc9(0xcc))/0x8*(parseInt(_0x364dc9(0xce))/0x9)+-parseInt(_0x364dc9(0xdf))/0xa*(parseInt(_0x364dc9(0xc8))/0xb);if(_0x284286===_0x1f638e)break;else _0x2c125f['push'](_0x2c125f['shift']());}catch(_0x26d859){_0x2c125f['push'](_0x2c125f['shift']());}}}(a10_0x4942,0xe911e));function a10_0x4bf5(_0x2a31f0,_0x1063bc){_0x2a31f0=_0x2a31f0-0xc7;const _0x494216=a10_0x4942();let _0x4bf551=_0x494216[_0x2a31f0];return _0x4bf551;}function normalizeTags(_0x428bb8){const _0x5db963=a10_0x4bf5;if(Array[_0x5db963(0xda)](_0x428bb8))return _0x428bb8[_0x5db963(0xd1)](_0x56f78b=>String(_0x56f78b))[_0x5db963(0xd5)](Boolean);if(typeof _0x428bb8!==_0x5db963(0xd8))return[];const _0x9bae22=_0x428bb8[_0x5db963(0xca)]();if(!_0x9bae22)return[];try{const _0x19c2fe=JSON['parse'](_0x9bae22);if(Array[_0x5db963(0xda)](_0x19c2fe))return _0x19c2fe['map'](_0x384273=>String(_0x384273))[_0x5db963(0xd5)](Boolean);}catch{}return _0x9bae22[_0x5db963(0xd9)](',')['map'](_0x507dec=>_0x507dec[_0x5db963(0xca)]())[_0x5db963(0xd5)](Boolean);}function a10_0x4942(){const _0x5dcd44=['traceId','string','split','isArray','tags','gmtModified','20istyyo','3545518GikbWI','30UDIAyV','1090335oYCYsv','540188SVJycK','appCode','trim','1325300kWrzhO','8geaGDp','key','7941204pFurml','78VyWOyC','583855GqQxZw','map','value','updateTime','createTime','filter','6324185WOmiQb'];a10_0x4942=function(){return _0x5dcd44;};return a10_0x4942();}export function projectAppConfigVisibilityCheck(_0x4b68ab,_0x37276c){const _0x532852=a10_0x4bf5,_0x1d0e15=_0x4b68ab[_0x532852(0xd2)],_0x2d72d4={'appCode':typeof _0x4b68ab[_0x532852(0xc9)]===_0x532852(0xd8)&&_0x4b68ab[_0x532852(0xc9)]['trim']()?_0x4b68ab[_0x532852(0xc9)]:_0x37276c[_0x532852(0xc9)],'key':typeof _0x4b68ab[_0x532852(0xcd)]===_0x532852(0xd8)&&_0x4b68ab[_0x532852(0xcd)][_0x532852(0xca)]()?_0x4b68ab[_0x532852(0xcd)]:_0x37276c[_0x532852(0xcd)],'tags':normalizeTags(_0x4b68ab[_0x532852(0xdb)]),'hasValue':typeof _0x1d0e15===_0x532852(0xd8)?_0x1d0e15['length']>0x0:_0x1d0e15!=null,'valueRedacted':!![],'gmtModified':_0x4b68ab[_0x532852(0xdc)]??_0x4b68ab[_0x532852(0xd3)]??'','gmtCreate':_0x4b68ab['gmtCreate']??_0x4b68ab[_0x532852(0xd4)]??''};return typeof _0x4b68ab['traceId']===_0x532852(0xd8)&&_0x4b68ab[_0x532852(0xd7)][_0x532852(0xca)]()&&(_0x2d72d4[_0x532852(0xd7)]=_0x4b68ab['traceId']),_0x2d72d4;}